@bravobit/bb-foundation 0.15.4 → 0.16.1

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 (377) hide show
  1. package/auth/lib/auth.interceptor.d.ts +1 -1
  2. package/auth/lib/auth.service.d.ts +1 -1
  3. package/auth/package.json +5 -5
  4. package/collections/package.json +5 -5
  5. package/controls/bravobit-bb-foundation-controls.d.ts +5 -0
  6. package/controls/lib/checkbox/checkbox.component.d.ts +27 -0
  7. package/controls/lib/checkbox/checkbox.module.d.ts +9 -0
  8. package/controls/lib/controls.module.d.ts +7 -0
  9. package/controls/package.json +10 -0
  10. package/controls/public_api.d.ts +3 -0
  11. package/dashboard/package.json +5 -5
  12. package/dialog/package.json +5 -5
  13. package/elements/package.json +5 -5
  14. package/{esm2015/auth/bravobit-bb-foundation-auth.js → esm2020/auth/bravobit-bb-foundation-auth.mjs} +0 -0
  15. package/esm2020/auth/lib/auth.interceptor.mjs +94 -0
  16. package/{esm2015/auth/lib/auth.module.js → esm2020/auth/lib/auth.module.mjs} +5 -5
  17. package/esm2020/auth/lib/auth.service.mjs +276 -0
  18. package/esm2020/auth/lib/auth.session.mjs +131 -0
  19. package/{esm2015/auth/lib/directives/authenticated.directive.js → esm2020/auth/lib/directives/authenticated.directive.mjs} +5 -6
  20. package/esm2020/auth/lib/directives/permission.directive.mjs +80 -0
  21. package/esm2020/auth/lib/directives/role.directive.mjs +37 -0
  22. package/esm2020/auth/lib/guards/anonymous.guard.mjs +34 -0
  23. package/esm2020/auth/lib/guards/authenticated.guard.mjs +35 -0
  24. package/{esm2015/auth/lib/helpers/jwt.helper.js → esm2020/auth/lib/helpers/jwt.helper.mjs} +3 -3
  25. package/{esm2015/auth/lib/helpers/mapper.helper.js → esm2020/auth/lib/helpers/mapper.helper.mjs} +4 -4
  26. package/{esm2015/auth/lib/interfaces/config.interface.js → esm2020/auth/lib/interfaces/config.interface.mjs} +0 -0
  27. package/{esm2015/auth/lib/interfaces/mapper.interface.js → esm2020/auth/lib/interfaces/mapper.interface.mjs} +0 -0
  28. package/{esm2015/auth/lib/interfaces/provider.interface.js → esm2020/auth/lib/interfaces/provider.interface.mjs} +0 -0
  29. package/{esm2015/auth/lib/interfaces/token.interface.js → esm2020/auth/lib/interfaces/token.interface.mjs} +0 -0
  30. package/esm2020/auth/lib/permissions.service.mjs +56 -0
  31. package/esm2020/auth/lib/providers/email.provider.mjs +25 -0
  32. package/esm2020/auth/lib/providers/verify.provider.mjs +19 -0
  33. package/{esm2015/auth/lib/tokens/use-authorization.token.js → esm2020/auth/lib/tokens/use-authorization.token.mjs} +0 -0
  34. package/{esm2015/auth/public_api.js → esm2020/auth/public_api.mjs} +0 -0
  35. package/{esm2015/bravobit-bb-foundation.js → esm2020/bravobit-bb-foundation.mjs} +0 -0
  36. package/{esm2015/collections/bravobit-bb-foundation-collections.js → esm2020/collections/bravobit-bb-foundation-collections.mjs} +0 -0
  37. package/esm2020/collections/lib/collection.mjs +98 -0
  38. package/{esm2015/collections/lib/collections.module.js → esm2020/collections/lib/collections.module.mjs} +5 -5
  39. package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +123 -0
  40. package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +31 -0
  41. package/{esm2015/collections/lib/components/collections.directive.js → esm2020/collections/lib/components/collections.directive.mjs} +13 -13
  42. package/{esm2015/collections/lib/interfaces/collection.interface.js → esm2020/collections/lib/interfaces/collection.interface.mjs} +0 -0
  43. package/esm2020/collections/lib/providers/api-collection.provider.mjs +68 -0
  44. package/esm2020/collections/lib/providers/collection.provider.mjs +13 -0
  45. package/{esm2015/collections/lib/providers/local-collection.provider.js → esm2020/collections/lib/providers/local-collection.provider.mjs} +0 -0
  46. package/{esm2015/collections/public_api.js → esm2020/collections/public_api.mjs} +0 -0
  47. package/esm2020/controls/bravobit-bb-foundation-controls.mjs +5 -0
  48. package/esm2020/controls/lib/checkbox/checkbox.component.mjs +86 -0
  49. package/esm2020/controls/lib/checkbox/checkbox.module.mjs +19 -0
  50. package/esm2020/controls/lib/controls.module.mjs +16 -0
  51. package/esm2020/controls/public_api.mjs +4 -0
  52. package/{esm2015/dashboard/bravobit-bb-foundation-dashboard.js → esm2020/dashboard/bravobit-bb-foundation-dashboard.mjs} +0 -0
  53. package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +56 -0
  54. package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +30 -0
  55. package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +31 -0
  56. package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +29 -0
  57. package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +75 -0
  58. package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +99 -0
  59. package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +62 -0
  60. package/{esm2015/dashboard/lib/dashboard.module.js → esm2020/dashboard/lib/dashboard.module.mjs} +5 -5
  61. package/{esm2015/dashboard/public_api.js → esm2020/dashboard/public_api.mjs} +0 -0
  62. package/{esm2015/dialog/bravobit-bb-foundation-dialog.js → esm2020/dialog/bravobit-bb-foundation-dialog.mjs} +0 -0
  63. package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +12 -0
  64. package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +37 -0
  65. package/{esm2015/dialog/lib/dialog-container/dialog-container.component.js → esm2020/dialog/lib/dialog-container/dialog-container.component.mjs} +6 -15
  66. package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +25 -0
  67. package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +11 -0
  68. package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +46 -0
  69. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +134 -0
  70. package/{esm2015/dialog/lib/dialog.injector.js → esm2020/dialog/lib/dialog.injector.mjs} +0 -0
  71. package/{esm2015/dialog/lib/dialog.insertion.js → esm2020/dialog/lib/dialog.insertion.mjs} +4 -4
  72. package/{esm2015/dialog/lib/dialog.interfaces.js → esm2020/dialog/lib/dialog.interfaces.mjs} +0 -0
  73. package/{esm2015/dialog/lib/dialog.module.js → esm2020/dialog/lib/dialog.module.mjs} +5 -9
  74. package/{esm2015/dialog/lib/dialog.ref.js → esm2020/dialog/lib/dialog.ref.mjs} +0 -0
  75. package/{esm2015/dialog/lib/dialog.service.js → esm2020/dialog/lib/dialog.service.mjs} +5 -5
  76. package/{esm2015/dialog/public_api.js → esm2020/dialog/public_api.mjs} +0 -0
  77. package/{esm2015/elements/bravobit-bb-foundation-elements.js → esm2020/elements/bravobit-bb-foundation-elements.mjs} +0 -0
  78. package/esm2020/elements/lib/avatar/avatar.component.mjs +142 -0
  79. package/esm2020/elements/lib/button/button.component.mjs +61 -0
  80. package/esm2020/elements/lib/checkbox/checkbox.component.mjs +73 -0
  81. package/esm2020/elements/lib/date-picker/date-picker.component.mjs +304 -0
  82. package/{esm2015/elements/lib/directives/addon.directive.js → esm2020/elements/lib/directives/addon.directive.mjs} +7 -7
  83. package/esm2020/elements/lib/directives/autosize.directive.mjs +72 -0
  84. package/{esm2015/elements/lib/directives/focus-trap.directive.js → esm2020/elements/lib/directives/focus-trap.directive.mjs} +4 -4
  85. package/{esm2015/elements/lib/directives/focus.directive.js → esm2020/elements/lib/directives/focus.directive.mjs} +4 -4
  86. package/esm2020/elements/lib/directives/form-submit.directive.mjs +50 -0
  87. package/esm2020/elements/lib/directives/input.directive.mjs +136 -0
  88. package/{esm2015/elements/lib/directives/template.directive.js → esm2020/elements/lib/directives/template.directive.mjs} +4 -4
  89. package/esm2020/elements/lib/dropdown/dropdown.component.mjs +100 -0
  90. package/{esm2015/elements/lib/elements.interfaces.js → esm2020/elements/lib/elements.interfaces.mjs} +0 -0
  91. package/{esm2015/elements/lib/elements.module.js → esm2020/elements/lib/elements.module.mjs} +5 -5
  92. package/esm2020/elements/lib/file-picker/file-picker.component.mjs +236 -0
  93. package/esm2020/elements/lib/form-control/form-control.component.mjs +49 -0
  94. package/esm2020/elements/lib/form-error/form-error.component.mjs +108 -0
  95. package/esm2020/elements/lib/form-group/form-group.component.mjs +18 -0
  96. package/esm2020/elements/lib/icon/icon.component.mjs +102 -0
  97. package/esm2020/elements/lib/image-picker/image-picker.component.mjs +106 -0
  98. package/esm2020/elements/lib/pipes/file-image.pipe.mjs +42 -0
  99. package/{esm2015/elements/lib/pipes/file-size.pipe.js → esm2020/elements/lib/pipes/file-size.pipe.mjs} +4 -4
  100. package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +94 -0
  101. package/esm2020/elements/lib/spinner/spinner.component.mjs +25 -0
  102. package/esm2020/elements/lib/tag/tag.component.mjs +18 -0
  103. package/{esm2015/elements/public_api.js → esm2020/elements/public_api.mjs} +0 -0
  104. package/{esm2015/http/bravobit-bb-foundation-http.js → esm2020/http/bravobit-bb-foundation-http.mjs} +0 -0
  105. package/esm2020/http/lib/classes/http.config.mjs +29 -0
  106. package/esm2020/http/lib/classes/http.error.mjs +20 -0
  107. package/{esm2015/http/lib/http.interfaces.js → esm2020/http/lib/http.interfaces.mjs} +0 -0
  108. package/{esm2015/http/lib/http.module.js → esm2020/http/lib/http.module.mjs} +5 -5
  109. package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +50 -0
  110. package/esm2020/http/lib/interceptors/error.interceptor.mjs +32 -0
  111. package/{esm2015/http/public_api.js → esm2020/http/public_api.mjs} +0 -0
  112. package/{esm2015/lib/core/coercions/boolean-coercion.js → esm2020/lib/core/coercions/boolean-coercion.mjs} +0 -0
  113. package/{esm2015/lib/core/miscellaneous/regex.js → esm2020/lib/core/miscellaneous/regex.mjs} +0 -0
  114. package/esm2020/lib/core/miscellaneous/validator.mjs +85 -0
  115. package/{esm2015/lib/core/mixins/can-disable.js → esm2020/lib/core/mixins/can-disable.mjs} +0 -0
  116. package/{esm2015/lib/core/mixins/can-hide-errors.js → esm2020/lib/core/mixins/can-hide-errors.mjs} +0 -0
  117. package/{esm2015/lib/core/mixins/can-load.js → esm2020/lib/core/mixins/can-load.mjs} +0 -0
  118. package/{esm2015/lib/core/mixins/constructor.js → esm2020/lib/core/mixins/constructor.mjs} +0 -0
  119. package/{esm2015/lib/core/mixins/has-error.js → esm2020/lib/core/mixins/has-error.mjs} +0 -0
  120. package/{esm2015/lib/core/mixins/is-focused.js → esm2020/lib/core/mixins/is-focused.mjs} +0 -0
  121. package/{esm2015/lib/core/mixins/is-grouped.js → esm2020/lib/core/mixins/is-grouped.mjs} +0 -0
  122. package/{esm2015/lib/core/mixins/is-readonly.js → esm2020/lib/core/mixins/is-readonly.mjs} +0 -0
  123. package/{esm2015/lib/core/mixins/is-required.js → esm2020/lib/core/mixins/is-required.mjs} +0 -0
  124. package/esm2020/lib/core/services/clipboard.service.mjs +70 -0
  125. package/esm2020/lib/core/services/exif.service.mjs +163 -0
  126. package/esm2020/lib/core/services/file-loader.service.mjs +87 -0
  127. package/esm2020/lib/core/services/image-converter.service.mjs +123 -0
  128. package/{esm2015/lib/core/services/languages.service.js → esm2020/lib/core/services/languages.service.mjs} +4 -4
  129. package/{esm2015/lib/core/services/network.service.js → esm2020/lib/core/services/network.service.mjs} +5 -6
  130. package/esm2020/lib/core/services/patch.service.mjs +63 -0
  131. package/{esm2015/lib/core/services/platform.service.js → esm2020/lib/core/services/platform.service.mjs} +5 -5
  132. package/{esm2015/lib/core/tokens/accept-language.token.js → esm2020/lib/core/tokens/accept-language.token.mjs} +0 -0
  133. package/{esm2015/lib/core/tokens/base-url.token.js → esm2020/lib/core/tokens/base-url.token.mjs} +0 -0
  134. package/{esm2015/lib/core/tokens/cookie.token.js → esm2020/lib/core/tokens/cookie.token.mjs} +0 -0
  135. package/{esm2015/lib/core/tokens/location.token.js → esm2020/lib/core/tokens/location.token.mjs} +0 -0
  136. package/{esm2015/lib/core/tokens/navigator.token.js → esm2020/lib/core/tokens/navigator.token.mjs} +0 -0
  137. package/{esm2015/lib/core/tokens/window.token.js → esm2020/lib/core/tokens/window.token.mjs} +0 -0
  138. package/{esm2015/localize/bravobit-bb-foundation-localize.js → esm2020/localize/bravobit-bb-foundation-localize.mjs} +0 -0
  139. package/{esm2015/localize/lib/functions/date.function.js → esm2020/localize/lib/functions/date.function.mjs} +0 -0
  140. package/{esm2015/localize/lib/functions/lowercase.function.js → esm2020/localize/lib/functions/lowercase.function.mjs} +0 -0
  141. package/{esm2015/localize/lib/functions/uppercase.function.js → esm2020/localize/lib/functions/uppercase.function.mjs} +0 -0
  142. package/{esm2015/localize/lib/handlers/missing.handler.js → esm2020/localize/lib/handlers/missing.handler.mjs} +0 -0
  143. package/{esm2015/localize/lib/interfaces/config.interfaces.js → esm2020/localize/lib/interfaces/config.interfaces.mjs} +0 -0
  144. package/{esm2015/localize/lib/interfaces/dictionary.interfaces.js → esm2020/localize/lib/interfaces/dictionary.interfaces.mjs} +0 -0
  145. package/{esm2015/localize/lib/interfaces/functions.interfaces.js → esm2020/localize/lib/interfaces/functions.interfaces.mjs} +0 -0
  146. package/{esm2015/localize/lib/interfaces/handlers.interfaces.js → esm2020/localize/lib/interfaces/handlers.interfaces.mjs} +0 -0
  147. package/{esm2015/localize/lib/interfaces/options.interfaces.js → esm2020/localize/lib/interfaces/options.interfaces.mjs} +0 -0
  148. package/{esm2015/localize/lib/localizations/dutch.localization.js → esm2020/localize/lib/localizations/dutch.localization.mjs} +0 -0
  149. package/{esm2015/localize/lib/localizations/english.localization.js → esm2020/localize/lib/localizations/english.localization.mjs} +0 -0
  150. package/esm2020/localize/lib/localize.dictionary.mjs +135 -0
  151. package/{esm2015/localize/lib/localize.module.js → esm2020/localize/lib/localize.module.mjs} +5 -5
  152. package/{esm2015/localize/lib/localize.pipe.js → esm2020/localize/lib/localize.pipe.mjs} +5 -5
  153. package/esm2020/localize/lib/localize.service.mjs +277 -0
  154. package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +88 -0
  155. package/{esm2015/localize/lib/views/localize-template-or-string.directive.js → esm2020/localize/lib/views/localize-template-or-string.directive.mjs} +4 -4
  156. package/{esm2015/localize/lib/views/localize-template.directive.js → esm2020/localize/lib/views/localize-template.directive.mjs} +4 -4
  157. package/{esm2015/localize/public_api.js → esm2020/localize/public_api.mjs} +0 -0
  158. package/{esm2015/notifications/bravobit-bb-foundation-notifications.js → esm2020/notifications/bravobit-bb-foundation-notifications.mjs} +0 -0
  159. package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +100 -0
  160. package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +47 -0
  161. package/{esm2015/notifications/lib/notifications.animations.js → esm2020/notifications/lib/notifications.animations.mjs} +0 -0
  162. package/{esm2015/notifications/lib/notifications.injector.js → esm2020/notifications/lib/notifications.injector.mjs} +0 -0
  163. package/{esm2015/notifications/lib/notifications.interfaces.js → esm2020/notifications/lib/notifications.interfaces.mjs} +0 -0
  164. package/{esm2015/notifications/lib/notifications.module.js → esm2020/notifications/lib/notifications.module.mjs} +6 -7
  165. package/{esm2015/notifications/lib/notifications.service.js → esm2020/notifications/lib/notifications.service.mjs} +5 -5
  166. package/{esm2015/notifications/public_api.js → esm2020/notifications/public_api.mjs} +0 -0
  167. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  168. package/{esm2015/recaptcha/bravobit-bb-foundation-recaptcha.js → esm2020/recaptcha/bravobit-bb-foundation-recaptcha.mjs} +0 -0
  169. package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +185 -0
  170. package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +90 -0
  171. package/{esm2015/recaptcha/lib/recaptcha.interface.js → esm2020/recaptcha/lib/recaptcha.interface.mjs} +0 -0
  172. package/{esm2015/recaptcha/lib/recaptcha.module.js → esm2020/recaptcha/lib/recaptcha.module.mjs} +5 -5
  173. package/{esm2015/recaptcha/public_api.js → esm2020/recaptcha/public_api.mjs} +0 -0
  174. package/{esm2015/rxjs/bravobit-bb-foundation-rxjs.js → esm2020/rxjs/bravobit-bb-foundation-rxjs.mjs} +0 -0
  175. package/esm2020/rxjs/lib/operators/combine-latest-map.operator.mjs +10 -0
  176. package/{esm2015/rxjs/lib/operators/filter-nil.operator.js → esm2020/rxjs/lib/operators/filter-nil.operator.mjs} +0 -0
  177. package/{esm2015/rxjs/public_api.js → esm2020/rxjs/public_api.mjs} +0 -0
  178. package/{esm2015/storage/bravobit-bb-foundation-storage.js → esm2020/storage/bravobit-bb-foundation-storage.mjs} +0 -0
  179. package/{esm2015/storage/lib/interfaces/attributes.interface.js → esm2020/storage/lib/interfaces/attributes.interface.mjs} +0 -0
  180. package/{esm2015/storage/lib/interfaces/memory.interface.js → esm2020/storage/lib/interfaces/memory.interface.mjs} +0 -0
  181. package/{esm2015/storage/lib/interfaces/strategy.interface.js → esm2020/storage/lib/interfaces/strategy.interface.mjs} +0 -0
  182. package/esm2020/storage/lib/storage.service.mjs +109 -0
  183. package/esm2020/storage/lib/strategies/cookie-storage.strategy.mjs +142 -0
  184. package/{esm2015/storage/lib/strategies/memory-storage.strategy.js → esm2020/storage/lib/strategies/memory-storage.strategy.mjs} +2 -2
  185. package/esm2020/storage/lib/strategies/polyfill-storage.strategy.mjs +102 -0
  186. package/{esm2015/storage/public_api.js → esm2020/storage/public_api.mjs} +0 -0
  187. package/{esm2015/table/bravobit-bb-foundation-table.js → esm2020/table/bravobit-bb-foundation-table.mjs} +0 -0
  188. package/esm2020/table/lib/components/table/table.component.mjs +191 -0
  189. package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +11 -0
  190. package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +131 -0
  191. package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +136 -0
  192. package/esm2020/table/lib/data/datasource.data.mjs +32 -0
  193. package/esm2020/table/lib/data/generic.data.mjs +72 -0
  194. package/{esm2015/table/lib/interfaces/datasource.interface.js → esm2020/table/lib/interfaces/datasource.interface.mjs} +0 -0
  195. package/{esm2015/table/lib/interfaces/table.interfaces.js → esm2020/table/lib/interfaces/table.interfaces.mjs} +0 -0
  196. package/{esm2015/table/lib/table.module.js → esm2020/table/lib/table.module.mjs} +5 -5
  197. package/{esm2015/table/public_api.js → esm2020/table/public_api.mjs} +0 -0
  198. package/fesm2015/{bravobit-bb-foundation-auth.js → bravobit-bb-foundation-auth.mjs} +79 -68
  199. package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -0
  200. package/fesm2015/{bravobit-bb-foundation-collections.js → bravobit-bb-foundation-collections.mjs} +33 -47
  201. package/fesm2015/bravobit-bb-foundation-collections.mjs.map +1 -0
  202. package/fesm2015/bravobit-bb-foundation-controls.mjs +123 -0
  203. package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -0
  204. package/fesm2015/bravobit-bb-foundation-dashboard.mjs +416 -0
  205. package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -0
  206. package/fesm2015/{bravobit-bb-foundation-dialog.js → bravobit-bb-foundation-dialog.mjs} +45 -106
  207. package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -0
  208. package/fesm2015/{bravobit-bb-foundation-elements.js → bravobit-bb-foundation-elements.mjs} +193 -302
  209. package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -0
  210. package/fesm2015/{bravobit-bb-foundation-http.js → bravobit-bb-foundation-http.mjs} +18 -16
  211. package/fesm2015/bravobit-bb-foundation-http.mjs.map +1 -0
  212. package/fesm2015/{bravobit-bb-foundation-localize.js → bravobit-bb-foundation-localize.mjs} +63 -69
  213. package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -0
  214. package/fesm2015/bravobit-bb-foundation-notifications.mjs +377 -0
  215. package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -0
  216. package/fesm2015/{bravobit-bb-foundation-recaptcha.js → bravobit-bb-foundation-recaptcha.mjs} +40 -47
  217. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs.map +1 -0
  218. package/fesm2015/{bravobit-bb-foundation-rxjs.js → bravobit-bb-foundation-rxjs.mjs} +1 -1
  219. package/fesm2015/bravobit-bb-foundation-rxjs.mjs.map +1 -0
  220. package/fesm2015/{bravobit-bb-foundation-storage.js → bravobit-bb-foundation-storage.mjs} +12 -10
  221. package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -0
  222. package/fesm2015/bravobit-bb-foundation-table.mjs +603 -0
  223. package/fesm2015/bravobit-bb-foundation-table.mjs.map +1 -0
  224. package/fesm2015/{bravobit-bb-foundation.js → bravobit-bb-foundation.mjs} +74 -64
  225. package/fesm2015/bravobit-bb-foundation.mjs.map +1 -0
  226. package/fesm2020/bravobit-bb-foundation-auth.mjs +928 -0
  227. package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -0
  228. package/fesm2020/bravobit-bb-foundation-collections.mjs +434 -0
  229. package/fesm2020/bravobit-bb-foundation-collections.mjs.map +1 -0
  230. package/fesm2020/bravobit-bb-foundation-controls.mjs +121 -0
  231. package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -0
  232. package/fesm2020/bravobit-bb-foundation-dashboard.mjs +404 -0
  233. package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -0
  234. package/fesm2020/bravobit-bb-foundation-dialog.mjs +584 -0
  235. package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -0
  236. package/fesm2020/bravobit-bb-foundation-elements.mjs +1993 -0
  237. package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -0
  238. package/fesm2020/bravobit-bb-foundation-http.mjs +168 -0
  239. package/fesm2020/bravobit-bb-foundation-http.mjs.map +1 -0
  240. package/fesm2020/bravobit-bb-foundation-localize.mjs +832 -0
  241. package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -0
  242. package/fesm2020/bravobit-bb-foundation-notifications.mjs +375 -0
  243. package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -0
  244. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +300 -0
  245. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +1 -0
  246. package/fesm2020/bravobit-bb-foundation-rxjs.mjs +21 -0
  247. package/fesm2020/bravobit-bb-foundation-rxjs.mjs.map +1 -0
  248. package/fesm2020/bravobit-bb-foundation-storage.mjs +413 -0
  249. package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -0
  250. package/fesm2020/bravobit-bb-foundation-table.mjs +592 -0
  251. package/fesm2020/bravobit-bb-foundation-table.mjs.map +1 -0
  252. package/fesm2020/bravobit-bb-foundation.mjs +895 -0
  253. package/fesm2020/bravobit-bb-foundation.mjs.map +1 -0
  254. package/http/package.json +5 -5
  255. package/localize/package.json +5 -5
  256. package/notifications/package.json +5 -5
  257. package/package.json +125 -8
  258. package/recaptcha/package.json +5 -5
  259. package/rxjs/package.json +5 -5
  260. package/storage/package.json +5 -5
  261. package/table/lib/components/table/table.component.d.ts +3 -0
  262. package/table/package.json +5 -5
  263. package/bundles/bravobit-bb-foundation-auth.umd.js +0 -1483
  264. package/bundles/bravobit-bb-foundation-auth.umd.js.map +0 -1
  265. package/bundles/bravobit-bb-foundation-collections.umd.js +0 -868
  266. package/bundles/bravobit-bb-foundation-collections.umd.js.map +0 -1
  267. package/bundles/bravobit-bb-foundation-dashboard.umd.js +0 -876
  268. package/bundles/bravobit-bb-foundation-dashboard.umd.js.map +0 -1
  269. package/bundles/bravobit-bb-foundation-dialog.umd.js +0 -716
  270. package/bundles/bravobit-bb-foundation-dialog.umd.js.map +0 -1
  271. package/bundles/bravobit-bb-foundation-elements.umd.js +0 -2768
  272. package/bundles/bravobit-bb-foundation-elements.umd.js.map +0 -1
  273. package/bundles/bravobit-bb-foundation-http.umd.js +0 -535
  274. package/bundles/bravobit-bb-foundation-http.umd.js.map +0 -1
  275. package/bundles/bravobit-bb-foundation-localize.umd.js +0 -1292
  276. package/bundles/bravobit-bb-foundation-localize.umd.js.map +0 -1
  277. package/bundles/bravobit-bb-foundation-notifications.umd.js +0 -794
  278. package/bundles/bravobit-bb-foundation-notifications.umd.js.map +0 -1
  279. package/bundles/bravobit-bb-foundation-recaptcha.umd.js +0 -683
  280. package/bundles/bravobit-bb-foundation-recaptcha.umd.js.map +0 -1
  281. package/bundles/bravobit-bb-foundation-rxjs.umd.js +0 -29
  282. package/bundles/bravobit-bb-foundation-rxjs.umd.js.map +0 -1
  283. package/bundles/bravobit-bb-foundation-storage.umd.js +0 -799
  284. package/bundles/bravobit-bb-foundation-storage.umd.js.map +0 -1
  285. package/bundles/bravobit-bb-foundation-table.umd.js +0 -1070
  286. package/bundles/bravobit-bb-foundation-table.umd.js.map +0 -1
  287. package/bundles/bravobit-bb-foundation.umd.js +0 -1440
  288. package/bundles/bravobit-bb-foundation.umd.js.map +0 -1
  289. package/esm2015/auth/lib/auth.interceptor.js +0 -95
  290. package/esm2015/auth/lib/auth.service.js +0 -299
  291. package/esm2015/auth/lib/auth.session.js +0 -136
  292. package/esm2015/auth/lib/directives/permission.directive.js +0 -81
  293. package/esm2015/auth/lib/directives/role.directive.js +0 -38
  294. package/esm2015/auth/lib/guards/anonymous.guard.js +0 -35
  295. package/esm2015/auth/lib/guards/authenticated.guard.js +0 -36
  296. package/esm2015/auth/lib/permissions.service.js +0 -58
  297. package/esm2015/auth/lib/providers/email.provider.js +0 -26
  298. package/esm2015/auth/lib/providers/verify.provider.js +0 -20
  299. package/esm2015/collections/lib/collection.js +0 -104
  300. package/esm2015/collections/lib/components/collections-pager/collections-pager.component.js +0 -136
  301. package/esm2015/collections/lib/components/collections-viewer/collections-viewer.component.js +0 -39
  302. package/esm2015/collections/lib/providers/api-collection.provider.js +0 -69
  303. package/esm2015/collections/lib/providers/collection.provider.js +0 -14
  304. package/esm2015/dashboard/lib/dashboard/dashboard.component.js +0 -64
  305. package/esm2015/dashboard/lib/dashboard-header/dashboard-header.component.js +0 -41
  306. package/esm2015/dashboard/lib/dashboard-menu/dashboard-menu.component.js +0 -39
  307. package/esm2015/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.js +0 -38
  308. package/esm2015/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.js +0 -83
  309. package/esm2015/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.js +0 -110
  310. package/esm2015/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.js +0 -71
  311. package/esm2015/dialog/lib/dialog-actions/dialog-actions.component.js +0 -20
  312. package/esm2015/dialog/lib/dialog-confirm/dialog-confirm.component.js +0 -45
  313. package/esm2015/dialog/lib/dialog-header/dialog-header.component.js +0 -33
  314. package/esm2015/dialog/lib/dialog-link/dialog-link.component.js +0 -19
  315. package/esm2015/dialog/lib/dialog-modal/dialog-modal.component.js +0 -54
  316. package/esm2015/dialog/lib/dialog-overlay/dialog-overlay.component.js +0 -143
  317. package/esm2015/elements/lib/avatar/avatar.component.js +0 -151
  318. package/esm2015/elements/lib/button/button.component.js +0 -79
  319. package/esm2015/elements/lib/checkbox/checkbox.component.js +0 -83
  320. package/esm2015/elements/lib/date-picker/date-picker.component.js +0 -322
  321. package/esm2015/elements/lib/directives/autosize.directive.js +0 -74
  322. package/esm2015/elements/lib/directives/form-submit.directive.js +0 -53
  323. package/esm2015/elements/lib/directives/input.directive.js +0 -139
  324. package/esm2015/elements/lib/dropdown/dropdown.component.js +0 -111
  325. package/esm2015/elements/lib/file-picker/file-picker.component.js +0 -247
  326. package/esm2015/elements/lib/form-control/form-control.component.js +0 -58
  327. package/esm2015/elements/lib/form-error/form-error.component.js +0 -116
  328. package/esm2015/elements/lib/form-group/form-group.component.js +0 -27
  329. package/esm2015/elements/lib/icon/icon.component.js +0 -110
  330. package/esm2015/elements/lib/image-picker/image-picker.component.js +0 -119
  331. package/esm2015/elements/lib/pipes/file-image.pipe.js +0 -45
  332. package/esm2015/elements/lib/pipes/relative-time.pipe.js +0 -96
  333. package/esm2015/elements/lib/spinner/spinner.component.js +0 -34
  334. package/esm2015/elements/lib/tag/tag.component.js +0 -26
  335. package/esm2015/http/lib/classes/http.config.js +0 -31
  336. package/esm2015/http/lib/classes/http.error.js +0 -21
  337. package/esm2015/http/lib/interceptors/base-url.interceptor.js +0 -52
  338. package/esm2015/http/lib/interceptors/error.interceptor.js +0 -33
  339. package/esm2015/lib/core/miscellaneous/validator.js +0 -86
  340. package/esm2015/lib/core/services/clipboard.service.js +0 -72
  341. package/esm2015/lib/core/services/exif.service.js +0 -168
  342. package/esm2015/lib/core/services/file-loader.service.js +0 -90
  343. package/esm2015/lib/core/services/image-converter.service.js +0 -130
  344. package/esm2015/lib/core/services/patch.service.js +0 -65
  345. package/esm2015/localize/lib/localize.dictionary.js +0 -137
  346. package/esm2015/localize/lib/localize.service.js +0 -282
  347. package/esm2015/localize/lib/views/localize-string/localize-string.component.js +0 -99
  348. package/esm2015/notifications/lib/notifications-item/notifications-item.component.js +0 -108
  349. package/esm2015/notifications/lib/notifications-list/notifications-list.component.js +0 -56
  350. package/esm2015/recaptcha/lib/recaptcha/recaptcha.component.js +0 -199
  351. package/esm2015/recaptcha/lib/recaptcha-loader.service.js +0 -93
  352. package/esm2015/rxjs/lib/operators/combine-latest-map.operator.js +0 -7
  353. package/esm2015/storage/lib/storage.service.js +0 -111
  354. package/esm2015/storage/lib/strategies/cookie-storage.strategy.js +0 -143
  355. package/esm2015/storage/lib/strategies/polyfill-storage.strategy.js +0 -102
  356. package/esm2015/table/lib/components/table/table.component.js +0 -196
  357. package/esm2015/table/lib/components/table-cell/table-cell.component.js +0 -19
  358. package/esm2015/table/lib/components/table-header-cell/table-header-cell.component.js +0 -141
  359. package/esm2015/table/lib/components/table-pager/table-pager.component.js +0 -146
  360. package/esm2015/table/lib/data/datasource.data.js +0 -32
  361. package/esm2015/table/lib/data/generic.data.js +0 -73
  362. package/fesm2015/bravobit-bb-foundation-auth.js.map +0 -1
  363. package/fesm2015/bravobit-bb-foundation-collections.js.map +0 -1
  364. package/fesm2015/bravobit-bb-foundation-dashboard.js +0 -468
  365. package/fesm2015/bravobit-bb-foundation-dashboard.js.map +0 -1
  366. package/fesm2015/bravobit-bb-foundation-dialog.js.map +0 -1
  367. package/fesm2015/bravobit-bb-foundation-elements.js.map +0 -1
  368. package/fesm2015/bravobit-bb-foundation-http.js.map +0 -1
  369. package/fesm2015/bravobit-bb-foundation-localize.js.map +0 -1
  370. package/fesm2015/bravobit-bb-foundation-notifications.js +0 -393
  371. package/fesm2015/bravobit-bb-foundation-notifications.js.map +0 -1
  372. package/fesm2015/bravobit-bb-foundation-recaptcha.js.map +0 -1
  373. package/fesm2015/bravobit-bb-foundation-rxjs.js.map +0 -1
  374. package/fesm2015/bravobit-bb-foundation-storage.js.map +0 -1
  375. package/fesm2015/bravobit-bb-foundation-table.js +0 -626
  376. package/fesm2015/bravobit-bb-foundation-table.js.map +0 -1
  377. package/fesm2015/bravobit-bb-foundation.js.map +0 -1
@@ -1,799 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@bravobit/bb-foundation')) :
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';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
-
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;
130
- }());
131
-
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;
275
- }());
276
-
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;
332
- }());
333
-
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;
650
- }
651
-
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.11", 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.11", ngImport: i0__namespace, type: Storage, providedIn: 'root' });
773
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", 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
- }] }];
785
- } });
786
-
787
- /**
788
- * Generated bundle index. Do not edit.
789
- */
790
-
791
- exports.CookieStorage = CookieStorage;
792
- exports.MemoryStorage = MemoryStorage;
793
- exports.PolyfillStorage = PolyfillStorage;
794
- exports.Storage = Storage;
795
-
796
- Object.defineProperty(exports, '__esModule', { value: true });
797
-
798
- }));
799
- //# sourceMappingURL=bravobit-bb-foundation-storage.umd.js.map