@bravobit/bb-foundation 0.15.6 → 0.16.3

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 (388) 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/lib/collection.d.ts +1 -1
  5. package/collections/package.json +5 -5
  6. package/controls/bravobit-bb-foundation-controls.d.ts +5 -0
  7. package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +47 -0
  8. package/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +18 -0
  9. package/controls/lib/checkbox/checkbox.module.d.ts +9 -0
  10. package/controls/lib/controls.module.d.ts +7 -0
  11. package/controls/package.json +10 -0
  12. package/controls/public_api.d.ts +4 -0
  13. package/dashboard/package.json +5 -5
  14. package/dialog/package.json +5 -5
  15. package/elements/package.json +5 -5
  16. package/{esm2015/auth/bravobit-bb-foundation-auth.js → esm2020/auth/bravobit-bb-foundation-auth.mjs} +0 -0
  17. package/esm2020/auth/lib/auth.interceptor.mjs +94 -0
  18. package/{esm2015/auth/lib/auth.module.js → esm2020/auth/lib/auth.module.mjs} +5 -5
  19. package/esm2020/auth/lib/auth.service.mjs +276 -0
  20. package/esm2020/auth/lib/auth.session.mjs +131 -0
  21. package/{esm2015/auth/lib/directives/authenticated.directive.js → esm2020/auth/lib/directives/authenticated.directive.mjs} +5 -6
  22. package/esm2020/auth/lib/directives/permission.directive.mjs +80 -0
  23. package/esm2020/auth/lib/directives/role.directive.mjs +37 -0
  24. package/esm2020/auth/lib/guards/anonymous.guard.mjs +34 -0
  25. package/esm2020/auth/lib/guards/authenticated.guard.mjs +35 -0
  26. package/{esm2015/auth/lib/helpers/jwt.helper.js → esm2020/auth/lib/helpers/jwt.helper.mjs} +3 -3
  27. package/{esm2015/auth/lib/helpers/mapper.helper.js → esm2020/auth/lib/helpers/mapper.helper.mjs} +4 -4
  28. package/{esm2015/auth/lib/interfaces/config.interface.js → esm2020/auth/lib/interfaces/config.interface.mjs} +0 -0
  29. package/{esm2015/auth/lib/interfaces/mapper.interface.js → esm2020/auth/lib/interfaces/mapper.interface.mjs} +0 -0
  30. package/{esm2015/auth/lib/interfaces/provider.interface.js → esm2020/auth/lib/interfaces/provider.interface.mjs} +0 -0
  31. package/{esm2015/auth/lib/interfaces/token.interface.js → esm2020/auth/lib/interfaces/token.interface.mjs} +0 -0
  32. package/esm2020/auth/lib/permissions.service.mjs +56 -0
  33. package/esm2020/auth/lib/providers/email.provider.mjs +25 -0
  34. package/esm2020/auth/lib/providers/verify.provider.mjs +19 -0
  35. package/{esm2015/auth/lib/tokens/use-authorization.token.js → esm2020/auth/lib/tokens/use-authorization.token.mjs} +0 -0
  36. package/{esm2015/auth/public_api.js → esm2020/auth/public_api.mjs} +0 -0
  37. package/{esm2015/bravobit-bb-foundation.js → esm2020/bravobit-bb-foundation.mjs} +0 -0
  38. package/{esm2015/collections/bravobit-bb-foundation-collections.js → esm2020/collections/bravobit-bb-foundation-collections.mjs} +0 -0
  39. package/esm2020/collections/lib/collection.mjs +102 -0
  40. package/{esm2015/collections/lib/collections.module.js → esm2020/collections/lib/collections.module.mjs} +5 -5
  41. package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +123 -0
  42. package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +31 -0
  43. package/{esm2015/collections/lib/components/collections.directive.js → esm2020/collections/lib/components/collections.directive.mjs} +13 -13
  44. package/{esm2015/collections/lib/interfaces/collection.interface.js → esm2020/collections/lib/interfaces/collection.interface.mjs} +0 -0
  45. package/esm2020/collections/lib/providers/api-collection.provider.mjs +71 -0
  46. package/esm2020/collections/lib/providers/collection.provider.mjs +13 -0
  47. package/{esm2015/collections/lib/providers/local-collection.provider.js → esm2020/collections/lib/providers/local-collection.provider.mjs} +0 -0
  48. package/{esm2015/collections/public_api.js → esm2020/collections/public_api.mjs} +0 -0
  49. package/esm2020/controls/bravobit-bb-foundation-controls.mjs +5 -0
  50. package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +153 -0
  51. package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +48 -0
  52. package/esm2020/controls/lib/checkbox/checkbox.module.mjs +19 -0
  53. package/esm2020/controls/lib/controls.module.mjs +16 -0
  54. package/esm2020/controls/public_api.mjs +5 -0
  55. package/{esm2015/dashboard/bravobit-bb-foundation-dashboard.js → esm2020/dashboard/bravobit-bb-foundation-dashboard.mjs} +0 -0
  56. package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +56 -0
  57. package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +30 -0
  58. package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +31 -0
  59. package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +29 -0
  60. package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +75 -0
  61. package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +99 -0
  62. package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +62 -0
  63. package/{esm2015/dashboard/lib/dashboard.module.js → esm2020/dashboard/lib/dashboard.module.mjs} +5 -5
  64. package/{esm2015/dashboard/public_api.js → esm2020/dashboard/public_api.mjs} +0 -0
  65. package/{esm2015/dialog/bravobit-bb-foundation-dialog.js → esm2020/dialog/bravobit-bb-foundation-dialog.mjs} +0 -0
  66. package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +12 -0
  67. package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +37 -0
  68. package/{esm2015/dialog/lib/dialog-container/dialog-container.component.js → esm2020/dialog/lib/dialog-container/dialog-container.component.mjs} +6 -15
  69. package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +25 -0
  70. package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +11 -0
  71. package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +46 -0
  72. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +134 -0
  73. package/{esm2015/dialog/lib/dialog.injector.js → esm2020/dialog/lib/dialog.injector.mjs} +0 -0
  74. package/{esm2015/dialog/lib/dialog.insertion.js → esm2020/dialog/lib/dialog.insertion.mjs} +4 -4
  75. package/{esm2015/dialog/lib/dialog.interfaces.js → esm2020/dialog/lib/dialog.interfaces.mjs} +0 -0
  76. package/{esm2015/dialog/lib/dialog.module.js → esm2020/dialog/lib/dialog.module.mjs} +5 -9
  77. package/{esm2015/dialog/lib/dialog.ref.js → esm2020/dialog/lib/dialog.ref.mjs} +0 -0
  78. package/{esm2015/dialog/lib/dialog.service.js → esm2020/dialog/lib/dialog.service.mjs} +5 -5
  79. package/{esm2015/dialog/public_api.js → esm2020/dialog/public_api.mjs} +0 -0
  80. package/{esm2015/elements/bravobit-bb-foundation-elements.js → esm2020/elements/bravobit-bb-foundation-elements.mjs} +0 -0
  81. package/esm2020/elements/lib/avatar/avatar.component.mjs +142 -0
  82. package/esm2020/elements/lib/button/button.component.mjs +61 -0
  83. package/esm2020/elements/lib/checkbox/checkbox.component.mjs +73 -0
  84. package/esm2020/elements/lib/date-picker/date-picker.component.mjs +304 -0
  85. package/{esm2015/elements/lib/directives/addon.directive.js → esm2020/elements/lib/directives/addon.directive.mjs} +7 -7
  86. package/esm2020/elements/lib/directives/autosize.directive.mjs +72 -0
  87. package/{esm2015/elements/lib/directives/focus-trap.directive.js → esm2020/elements/lib/directives/focus-trap.directive.mjs} +4 -4
  88. package/{esm2015/elements/lib/directives/focus.directive.js → esm2020/elements/lib/directives/focus.directive.mjs} +4 -4
  89. package/esm2020/elements/lib/directives/form-submit.directive.mjs +50 -0
  90. package/esm2020/elements/lib/directives/input.directive.mjs +136 -0
  91. package/{esm2015/elements/lib/directives/template.directive.js → esm2020/elements/lib/directives/template.directive.mjs} +4 -4
  92. package/esm2020/elements/lib/dropdown/dropdown.component.mjs +100 -0
  93. package/{esm2015/elements/lib/elements.interfaces.js → esm2020/elements/lib/elements.interfaces.mjs} +0 -0
  94. package/{esm2015/elements/lib/elements.module.js → esm2020/elements/lib/elements.module.mjs} +5 -5
  95. package/esm2020/elements/lib/file-picker/file-picker.component.mjs +236 -0
  96. package/esm2020/elements/lib/form-control/form-control.component.mjs +49 -0
  97. package/esm2020/elements/lib/form-error/form-error.component.mjs +108 -0
  98. package/esm2020/elements/lib/form-group/form-group.component.mjs +18 -0
  99. package/esm2020/elements/lib/icon/icon.component.mjs +102 -0
  100. package/esm2020/elements/lib/image-picker/image-picker.component.mjs +106 -0
  101. package/esm2020/elements/lib/pipes/file-image.pipe.mjs +42 -0
  102. package/{esm2015/elements/lib/pipes/file-size.pipe.js → esm2020/elements/lib/pipes/file-size.pipe.mjs} +4 -4
  103. package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +94 -0
  104. package/esm2020/elements/lib/spinner/spinner.component.mjs +25 -0
  105. package/esm2020/elements/lib/tag/tag.component.mjs +18 -0
  106. package/{esm2015/elements/public_api.js → esm2020/elements/public_api.mjs} +0 -0
  107. package/{esm2015/http/bravobit-bb-foundation-http.js → esm2020/http/bravobit-bb-foundation-http.mjs} +0 -0
  108. package/esm2020/http/lib/classes/http.config.mjs +29 -0
  109. package/esm2020/http/lib/classes/http.error.mjs +20 -0
  110. package/{esm2015/http/lib/http.interfaces.js → esm2020/http/lib/http.interfaces.mjs} +0 -0
  111. package/{esm2015/http/lib/http.module.js → esm2020/http/lib/http.module.mjs} +5 -5
  112. package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +50 -0
  113. package/esm2020/http/lib/interceptors/error.interceptor.mjs +32 -0
  114. package/{esm2015/http/public_api.js → esm2020/http/public_api.mjs} +0 -0
  115. package/{esm2015/lib/core/miscellaneous/regex.js → esm2020/lib/core/miscellaneous/regex.mjs} +0 -0
  116. package/esm2020/lib/core/miscellaneous/validator.mjs +85 -0
  117. package/esm2020/lib/core/mixins/can-disable.mjs +16 -0
  118. package/{esm2015/lib/core/mixins/can-hide-errors.js → esm2020/lib/core/mixins/can-hide-errors.mjs} +2 -2
  119. package/esm2020/lib/core/mixins/can-load.mjs +16 -0
  120. package/{esm2015/lib/core/mixins/constructor.js → esm2020/lib/core/mixins/constructor.mjs} +0 -0
  121. package/esm2020/lib/core/mixins/has-error.mjs +16 -0
  122. package/esm2020/lib/core/mixins/is-focused.mjs +16 -0
  123. package/esm2020/lib/core/mixins/is-grouped.mjs +16 -0
  124. package/esm2020/lib/core/mixins/is-readonly.mjs +16 -0
  125. package/esm2020/lib/core/mixins/is-required.mjs +16 -0
  126. package/esm2020/lib/core/services/clipboard.service.mjs +70 -0
  127. package/esm2020/lib/core/services/exif.service.mjs +163 -0
  128. package/esm2020/lib/core/services/file-loader.service.mjs +87 -0
  129. package/esm2020/lib/core/services/image-converter.service.mjs +123 -0
  130. package/{esm2015/lib/core/services/languages.service.js → esm2020/lib/core/services/languages.service.mjs} +4 -4
  131. package/{esm2015/lib/core/services/network.service.js → esm2020/lib/core/services/network.service.mjs} +5 -6
  132. package/esm2020/lib/core/services/patch.service.mjs +63 -0
  133. package/{esm2015/lib/core/services/platform.service.js → esm2020/lib/core/services/platform.service.mjs} +5 -5
  134. package/{esm2015/lib/core/tokens/accept-language.token.js → esm2020/lib/core/tokens/accept-language.token.mjs} +0 -0
  135. package/{esm2015/lib/core/tokens/base-url.token.js → esm2020/lib/core/tokens/base-url.token.mjs} +0 -0
  136. package/{esm2015/lib/core/tokens/cookie.token.js → esm2020/lib/core/tokens/cookie.token.mjs} +0 -0
  137. package/{esm2015/lib/core/tokens/location.token.js → esm2020/lib/core/tokens/location.token.mjs} +0 -0
  138. package/{esm2015/lib/core/tokens/navigator.token.js → esm2020/lib/core/tokens/navigator.token.mjs} +0 -0
  139. package/{esm2015/lib/core/tokens/window.token.js → esm2020/lib/core/tokens/window.token.mjs} +0 -0
  140. package/{esm2015/localize/bravobit-bb-foundation-localize.js → esm2020/localize/bravobit-bb-foundation-localize.mjs} +0 -0
  141. package/{esm2015/localize/lib/functions/date.function.js → esm2020/localize/lib/functions/date.function.mjs} +0 -0
  142. package/{esm2015/localize/lib/functions/lowercase.function.js → esm2020/localize/lib/functions/lowercase.function.mjs} +0 -0
  143. package/{esm2015/localize/lib/functions/uppercase.function.js → esm2020/localize/lib/functions/uppercase.function.mjs} +0 -0
  144. package/{esm2015/localize/lib/handlers/missing.handler.js → esm2020/localize/lib/handlers/missing.handler.mjs} +0 -0
  145. package/{esm2015/localize/lib/interfaces/config.interfaces.js → esm2020/localize/lib/interfaces/config.interfaces.mjs} +0 -0
  146. package/{esm2015/localize/lib/interfaces/dictionary.interfaces.js → esm2020/localize/lib/interfaces/dictionary.interfaces.mjs} +0 -0
  147. package/{esm2015/localize/lib/interfaces/functions.interfaces.js → esm2020/localize/lib/interfaces/functions.interfaces.mjs} +0 -0
  148. package/{esm2015/localize/lib/interfaces/handlers.interfaces.js → esm2020/localize/lib/interfaces/handlers.interfaces.mjs} +0 -0
  149. package/{esm2015/localize/lib/interfaces/options.interfaces.js → esm2020/localize/lib/interfaces/options.interfaces.mjs} +0 -0
  150. package/{esm2015/localize/lib/localizations/dutch.localization.js → esm2020/localize/lib/localizations/dutch.localization.mjs} +0 -0
  151. package/{esm2015/localize/lib/localizations/english.localization.js → esm2020/localize/lib/localizations/english.localization.mjs} +0 -0
  152. package/esm2020/localize/lib/localize.dictionary.mjs +135 -0
  153. package/{esm2015/localize/lib/localize.module.js → esm2020/localize/lib/localize.module.mjs} +5 -5
  154. package/{esm2015/localize/lib/localize.pipe.js → esm2020/localize/lib/localize.pipe.mjs} +5 -5
  155. package/esm2020/localize/lib/localize.service.mjs +277 -0
  156. package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +88 -0
  157. package/{esm2015/localize/lib/views/localize-template-or-string.directive.js → esm2020/localize/lib/views/localize-template-or-string.directive.mjs} +4 -4
  158. package/{esm2015/localize/lib/views/localize-template.directive.js → esm2020/localize/lib/views/localize-template.directive.mjs} +4 -4
  159. package/{esm2015/localize/public_api.js → esm2020/localize/public_api.mjs} +0 -0
  160. package/{esm2015/notifications/bravobit-bb-foundation-notifications.js → esm2020/notifications/bravobit-bb-foundation-notifications.mjs} +0 -0
  161. package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +100 -0
  162. package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +47 -0
  163. package/{esm2015/notifications/lib/notifications.animations.js → esm2020/notifications/lib/notifications.animations.mjs} +0 -0
  164. package/{esm2015/notifications/lib/notifications.injector.js → esm2020/notifications/lib/notifications.injector.mjs} +0 -0
  165. package/{esm2015/notifications/lib/notifications.interfaces.js → esm2020/notifications/lib/notifications.interfaces.mjs} +0 -0
  166. package/{esm2015/notifications/lib/notifications.module.js → esm2020/notifications/lib/notifications.module.mjs} +6 -7
  167. package/{esm2015/notifications/lib/notifications.service.js → esm2020/notifications/lib/notifications.service.mjs} +5 -5
  168. package/{esm2015/notifications/public_api.js → esm2020/notifications/public_api.mjs} +0 -0
  169. package/{esm2015/public_api.js → esm2020/public_api.mjs} +1 -2
  170. package/{esm2015/recaptcha/bravobit-bb-foundation-recaptcha.js → esm2020/recaptcha/bravobit-bb-foundation-recaptcha.mjs} +0 -0
  171. package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +185 -0
  172. package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +90 -0
  173. package/{esm2015/recaptcha/lib/recaptcha.interface.js → esm2020/recaptcha/lib/recaptcha.interface.mjs} +0 -0
  174. package/{esm2015/recaptcha/lib/recaptcha.module.js → esm2020/recaptcha/lib/recaptcha.module.mjs} +5 -5
  175. package/{esm2015/recaptcha/public_api.js → esm2020/recaptcha/public_api.mjs} +0 -0
  176. package/{esm2015/rxjs/bravobit-bb-foundation-rxjs.js → esm2020/rxjs/bravobit-bb-foundation-rxjs.mjs} +0 -0
  177. package/esm2020/rxjs/lib/operators/combine-latest-map.operator.mjs +10 -0
  178. package/{esm2015/rxjs/lib/operators/filter-nil.operator.js → esm2020/rxjs/lib/operators/filter-nil.operator.mjs} +0 -0
  179. package/{esm2015/rxjs/public_api.js → esm2020/rxjs/public_api.mjs} +0 -0
  180. package/{esm2015/storage/bravobit-bb-foundation-storage.js → esm2020/storage/bravobit-bb-foundation-storage.mjs} +0 -0
  181. package/{esm2015/storage/lib/interfaces/attributes.interface.js → esm2020/storage/lib/interfaces/attributes.interface.mjs} +0 -0
  182. package/{esm2015/storage/lib/interfaces/memory.interface.js → esm2020/storage/lib/interfaces/memory.interface.mjs} +0 -0
  183. package/{esm2015/storage/lib/interfaces/strategy.interface.js → esm2020/storage/lib/interfaces/strategy.interface.mjs} +0 -0
  184. package/esm2020/storage/lib/storage.service.mjs +109 -0
  185. package/esm2020/storage/lib/strategies/cookie-storage.strategy.mjs +142 -0
  186. package/{esm2015/storage/lib/strategies/memory-storage.strategy.js → esm2020/storage/lib/strategies/memory-storage.strategy.mjs} +2 -2
  187. package/esm2020/storage/lib/strategies/polyfill-storage.strategy.mjs +102 -0
  188. package/{esm2015/storage/public_api.js → esm2020/storage/public_api.mjs} +0 -0
  189. package/{esm2015/table/bravobit-bb-foundation-table.js → esm2020/table/bravobit-bb-foundation-table.mjs} +0 -0
  190. package/esm2020/table/lib/components/table/table.component.mjs +191 -0
  191. package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +11 -0
  192. package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +131 -0
  193. package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +136 -0
  194. package/esm2020/table/lib/data/datasource.data.mjs +32 -0
  195. package/esm2020/table/lib/data/generic.data.mjs +72 -0
  196. package/{esm2015/table/lib/interfaces/datasource.interface.js → esm2020/table/lib/interfaces/datasource.interface.mjs} +0 -0
  197. package/{esm2015/table/lib/interfaces/table.interfaces.js → esm2020/table/lib/interfaces/table.interfaces.mjs} +0 -0
  198. package/{esm2015/table/lib/table.module.js → esm2020/table/lib/table.module.mjs} +5 -5
  199. package/{esm2015/table/public_api.js → esm2020/table/public_api.mjs} +0 -0
  200. package/fesm2015/{bravobit-bb-foundation-auth.js → bravobit-bb-foundation-auth.mjs} +79 -68
  201. package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -0
  202. package/fesm2015/{bravobit-bb-foundation-collections.js → bravobit-bb-foundation-collections.mjs} +45 -57
  203. package/fesm2015/bravobit-bb-foundation-collections.mjs.map +1 -0
  204. package/fesm2015/bravobit-bb-foundation-controls.mjs +235 -0
  205. package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -0
  206. package/fesm2015/bravobit-bb-foundation-dashboard.mjs +416 -0
  207. package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -0
  208. package/fesm2015/{bravobit-bb-foundation-dialog.js → bravobit-bb-foundation-dialog.mjs} +45 -106
  209. package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -0
  210. package/fesm2015/{bravobit-bb-foundation-elements.js → bravobit-bb-foundation-elements.mjs} +195 -303
  211. package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -0
  212. package/fesm2015/{bravobit-bb-foundation-http.js → bravobit-bb-foundation-http.mjs} +18 -16
  213. package/fesm2015/bravobit-bb-foundation-http.mjs.map +1 -0
  214. package/fesm2015/{bravobit-bb-foundation-localize.js → bravobit-bb-foundation-localize.mjs} +63 -69
  215. package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -0
  216. package/fesm2015/bravobit-bb-foundation-notifications.mjs +377 -0
  217. package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -0
  218. package/fesm2015/{bravobit-bb-foundation-recaptcha.js → bravobit-bb-foundation-recaptcha.mjs} +40 -47
  219. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs.map +1 -0
  220. package/fesm2015/{bravobit-bb-foundation-rxjs.js → bravobit-bb-foundation-rxjs.mjs} +1 -1
  221. package/fesm2015/bravobit-bb-foundation-rxjs.mjs.map +1 -0
  222. package/fesm2015/{bravobit-bb-foundation-storage.js → bravobit-bb-foundation-storage.mjs} +12 -10
  223. package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -0
  224. package/fesm2015/bravobit-bb-foundation-table.mjs +603 -0
  225. package/fesm2015/bravobit-bb-foundation-table.mjs.map +1 -0
  226. package/fesm2015/{bravobit-bb-foundation.js → bravobit-bb-foundation.mjs} +76 -69
  227. package/fesm2015/bravobit-bb-foundation.mjs.map +1 -0
  228. package/fesm2020/bravobit-bb-foundation-auth.mjs +928 -0
  229. package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -0
  230. package/fesm2020/bravobit-bb-foundation-collections.mjs +441 -0
  231. package/fesm2020/bravobit-bb-foundation-collections.mjs.map +1 -0
  232. package/fesm2020/bravobit-bb-foundation-controls.mjs +233 -0
  233. package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -0
  234. package/fesm2020/bravobit-bb-foundation-dashboard.mjs +404 -0
  235. package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -0
  236. package/fesm2020/bravobit-bb-foundation-dialog.mjs +584 -0
  237. package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -0
  238. package/fesm2020/bravobit-bb-foundation-elements.mjs +1994 -0
  239. package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -0
  240. package/fesm2020/bravobit-bb-foundation-http.mjs +168 -0
  241. package/fesm2020/bravobit-bb-foundation-http.mjs.map +1 -0
  242. package/fesm2020/bravobit-bb-foundation-localize.mjs +832 -0
  243. package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -0
  244. package/fesm2020/bravobit-bb-foundation-notifications.mjs +375 -0
  245. package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -0
  246. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +300 -0
  247. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +1 -0
  248. package/fesm2020/bravobit-bb-foundation-rxjs.mjs +21 -0
  249. package/fesm2020/bravobit-bb-foundation-rxjs.mjs.map +1 -0
  250. package/fesm2020/bravobit-bb-foundation-storage.mjs +413 -0
  251. package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -0
  252. package/fesm2020/bravobit-bb-foundation-table.mjs +592 -0
  253. package/fesm2020/bravobit-bb-foundation-table.mjs.map +1 -0
  254. package/fesm2020/bravobit-bb-foundation.mjs +892 -0
  255. package/fesm2020/bravobit-bb-foundation.mjs.map +1 -0
  256. package/http/package.json +5 -5
  257. package/localize/package.json +5 -5
  258. package/notifications/package.json +5 -5
  259. package/package.json +126 -8
  260. package/public_api.d.ts +0 -1
  261. package/recaptcha/package.json +5 -5
  262. package/rxjs/package.json +5 -5
  263. package/storage/package.json +5 -5
  264. package/table/package.json +5 -5
  265. package/bundles/bravobit-bb-foundation-auth.umd.js +0 -1483
  266. package/bundles/bravobit-bb-foundation-auth.umd.js.map +0 -1
  267. package/bundles/bravobit-bb-foundation-collections.umd.js +0 -868
  268. package/bundles/bravobit-bb-foundation-collections.umd.js.map +0 -1
  269. package/bundles/bravobit-bb-foundation-dashboard.umd.js +0 -876
  270. package/bundles/bravobit-bb-foundation-dashboard.umd.js.map +0 -1
  271. package/bundles/bravobit-bb-foundation-dialog.umd.js +0 -716
  272. package/bundles/bravobit-bb-foundation-dialog.umd.js.map +0 -1
  273. package/bundles/bravobit-bb-foundation-elements.umd.js +0 -2768
  274. package/bundles/bravobit-bb-foundation-elements.umd.js.map +0 -1
  275. package/bundles/bravobit-bb-foundation-http.umd.js +0 -535
  276. package/bundles/bravobit-bb-foundation-http.umd.js.map +0 -1
  277. package/bundles/bravobit-bb-foundation-localize.umd.js +0 -1292
  278. package/bundles/bravobit-bb-foundation-localize.umd.js.map +0 -1
  279. package/bundles/bravobit-bb-foundation-notifications.umd.js +0 -794
  280. package/bundles/bravobit-bb-foundation-notifications.umd.js.map +0 -1
  281. package/bundles/bravobit-bb-foundation-recaptcha.umd.js +0 -683
  282. package/bundles/bravobit-bb-foundation-recaptcha.umd.js.map +0 -1
  283. package/bundles/bravobit-bb-foundation-rxjs.umd.js +0 -29
  284. package/bundles/bravobit-bb-foundation-rxjs.umd.js.map +0 -1
  285. package/bundles/bravobit-bb-foundation-storage.umd.js +0 -799
  286. package/bundles/bravobit-bb-foundation-storage.umd.js.map +0 -1
  287. package/bundles/bravobit-bb-foundation-table.umd.js +0 -1084
  288. package/bundles/bravobit-bb-foundation-table.umd.js.map +0 -1
  289. package/bundles/bravobit-bb-foundation.umd.js +0 -1440
  290. package/bundles/bravobit-bb-foundation.umd.js.map +0 -1
  291. package/esm2015/auth/lib/auth.interceptor.js +0 -95
  292. package/esm2015/auth/lib/auth.service.js +0 -299
  293. package/esm2015/auth/lib/auth.session.js +0 -136
  294. package/esm2015/auth/lib/directives/permission.directive.js +0 -81
  295. package/esm2015/auth/lib/directives/role.directive.js +0 -38
  296. package/esm2015/auth/lib/guards/anonymous.guard.js +0 -35
  297. package/esm2015/auth/lib/guards/authenticated.guard.js +0 -36
  298. package/esm2015/auth/lib/permissions.service.js +0 -58
  299. package/esm2015/auth/lib/providers/email.provider.js +0 -26
  300. package/esm2015/auth/lib/providers/verify.provider.js +0 -20
  301. package/esm2015/collections/lib/collection.js +0 -104
  302. package/esm2015/collections/lib/components/collections-pager/collections-pager.component.js +0 -136
  303. package/esm2015/collections/lib/components/collections-viewer/collections-viewer.component.js +0 -39
  304. package/esm2015/collections/lib/providers/api-collection.provider.js +0 -69
  305. package/esm2015/collections/lib/providers/collection.provider.js +0 -14
  306. package/esm2015/dashboard/lib/dashboard/dashboard.component.js +0 -64
  307. package/esm2015/dashboard/lib/dashboard-header/dashboard-header.component.js +0 -41
  308. package/esm2015/dashboard/lib/dashboard-menu/dashboard-menu.component.js +0 -39
  309. package/esm2015/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.js +0 -38
  310. package/esm2015/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.js +0 -83
  311. package/esm2015/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.js +0 -110
  312. package/esm2015/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.js +0 -71
  313. package/esm2015/dialog/lib/dialog-actions/dialog-actions.component.js +0 -20
  314. package/esm2015/dialog/lib/dialog-confirm/dialog-confirm.component.js +0 -45
  315. package/esm2015/dialog/lib/dialog-header/dialog-header.component.js +0 -33
  316. package/esm2015/dialog/lib/dialog-link/dialog-link.component.js +0 -19
  317. package/esm2015/dialog/lib/dialog-modal/dialog-modal.component.js +0 -54
  318. package/esm2015/dialog/lib/dialog-overlay/dialog-overlay.component.js +0 -143
  319. package/esm2015/elements/lib/avatar/avatar.component.js +0 -151
  320. package/esm2015/elements/lib/button/button.component.js +0 -79
  321. package/esm2015/elements/lib/checkbox/checkbox.component.js +0 -83
  322. package/esm2015/elements/lib/date-picker/date-picker.component.js +0 -322
  323. package/esm2015/elements/lib/directives/autosize.directive.js +0 -74
  324. package/esm2015/elements/lib/directives/form-submit.directive.js +0 -53
  325. package/esm2015/elements/lib/directives/input.directive.js +0 -139
  326. package/esm2015/elements/lib/dropdown/dropdown.component.js +0 -111
  327. package/esm2015/elements/lib/file-picker/file-picker.component.js +0 -247
  328. package/esm2015/elements/lib/form-control/form-control.component.js +0 -58
  329. package/esm2015/elements/lib/form-error/form-error.component.js +0 -116
  330. package/esm2015/elements/lib/form-group/form-group.component.js +0 -27
  331. package/esm2015/elements/lib/icon/icon.component.js +0 -110
  332. package/esm2015/elements/lib/image-picker/image-picker.component.js +0 -119
  333. package/esm2015/elements/lib/pipes/file-image.pipe.js +0 -45
  334. package/esm2015/elements/lib/pipes/relative-time.pipe.js +0 -96
  335. package/esm2015/elements/lib/spinner/spinner.component.js +0 -34
  336. package/esm2015/elements/lib/tag/tag.component.js +0 -26
  337. package/esm2015/http/lib/classes/http.config.js +0 -31
  338. package/esm2015/http/lib/classes/http.error.js +0 -21
  339. package/esm2015/http/lib/interceptors/base-url.interceptor.js +0 -52
  340. package/esm2015/http/lib/interceptors/error.interceptor.js +0 -33
  341. package/esm2015/lib/core/coercions/boolean-coercion.js +0 -4
  342. package/esm2015/lib/core/miscellaneous/validator.js +0 -86
  343. package/esm2015/lib/core/mixins/can-disable.js +0 -16
  344. package/esm2015/lib/core/mixins/can-load.js +0 -16
  345. package/esm2015/lib/core/mixins/has-error.js +0 -16
  346. package/esm2015/lib/core/mixins/is-focused.js +0 -16
  347. package/esm2015/lib/core/mixins/is-grouped.js +0 -16
  348. package/esm2015/lib/core/mixins/is-readonly.js +0 -16
  349. package/esm2015/lib/core/mixins/is-required.js +0 -16
  350. package/esm2015/lib/core/services/clipboard.service.js +0 -72
  351. package/esm2015/lib/core/services/exif.service.js +0 -168
  352. package/esm2015/lib/core/services/file-loader.service.js +0 -90
  353. package/esm2015/lib/core/services/image-converter.service.js +0 -130
  354. package/esm2015/lib/core/services/patch.service.js +0 -65
  355. package/esm2015/localize/lib/localize.dictionary.js +0 -137
  356. package/esm2015/localize/lib/localize.service.js +0 -282
  357. package/esm2015/localize/lib/views/localize-string/localize-string.component.js +0 -99
  358. package/esm2015/notifications/lib/notifications-item/notifications-item.component.js +0 -108
  359. package/esm2015/notifications/lib/notifications-list/notifications-list.component.js +0 -56
  360. package/esm2015/recaptcha/lib/recaptcha/recaptcha.component.js +0 -199
  361. package/esm2015/recaptcha/lib/recaptcha-loader.service.js +0 -93
  362. package/esm2015/rxjs/lib/operators/combine-latest-map.operator.js +0 -7
  363. package/esm2015/storage/lib/storage.service.js +0 -111
  364. package/esm2015/storage/lib/strategies/cookie-storage.strategy.js +0 -143
  365. package/esm2015/storage/lib/strategies/polyfill-storage.strategy.js +0 -102
  366. package/esm2015/table/lib/components/table/table.component.js +0 -204
  367. package/esm2015/table/lib/components/table-cell/table-cell.component.js +0 -19
  368. package/esm2015/table/lib/components/table-header-cell/table-header-cell.component.js +0 -143
  369. package/esm2015/table/lib/components/table-pager/table-pager.component.js +0 -146
  370. package/esm2015/table/lib/data/datasource.data.js +0 -32
  371. package/esm2015/table/lib/data/generic.data.js +0 -73
  372. package/fesm2015/bravobit-bb-foundation-auth.js.map +0 -1
  373. package/fesm2015/bravobit-bb-foundation-collections.js.map +0 -1
  374. package/fesm2015/bravobit-bb-foundation-dashboard.js +0 -468
  375. package/fesm2015/bravobit-bb-foundation-dashboard.js.map +0 -1
  376. package/fesm2015/bravobit-bb-foundation-dialog.js.map +0 -1
  377. package/fesm2015/bravobit-bb-foundation-elements.js.map +0 -1
  378. package/fesm2015/bravobit-bb-foundation-http.js.map +0 -1
  379. package/fesm2015/bravobit-bb-foundation-localize.js.map +0 -1
  380. package/fesm2015/bravobit-bb-foundation-notifications.js +0 -393
  381. package/fesm2015/bravobit-bb-foundation-notifications.js.map +0 -1
  382. package/fesm2015/bravobit-bb-foundation-recaptcha.js.map +0 -1
  383. package/fesm2015/bravobit-bb-foundation-rxjs.js.map +0 -1
  384. package/fesm2015/bravobit-bb-foundation-storage.js.map +0 -1
  385. package/fesm2015/bravobit-bb-foundation-table.js +0 -636
  386. package/fesm2015/bravobit-bb-foundation-table.js.map +0 -1
  387. package/fesm2015/bravobit-bb-foundation.js.map +0 -1
  388. package/lib/core/coercions/boolean-coercion.d.ts +0 -1
@@ -1,2768 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('rxjs'), require('@angular/common'), require('@bravobit/bb-foundation'), require('@angular/forms'), require('rxjs/operators'), require('@bravobit/bb-foundation/localize'), require('@angular/platform-browser')) :
3
- typeof define === 'function' && define.amd ? define('@bravobit/bb-foundation/elements', ['exports', '@angular/core', '@angular/animations', 'rxjs', '@angular/common', '@bravobit/bb-foundation', '@angular/forms', 'rxjs/operators', '@bravobit/bb-foundation/localize', '@angular/platform-browser'], 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"].elements = {}), global.ng.core, global.ng.animations, global.rxjs, global.ng.common, global.bravobit["bb-foundation"], global.ng.forms, global.rxjs.operators, global.bravobit["bb-foundation"].localize, global.ng.platformBrowser));
5
- })(this, (function (exports, i0, animations, rxjs, i1, i1$1, i5, operators, i4, i2) { '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
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
28
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
29
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
-
32
- /*! *****************************************************************************
33
- Copyright (c) Microsoft Corporation.
34
-
35
- Permission to use, copy, modify, and/or distribute this software for any
36
- purpose with or without fee is hereby granted.
37
-
38
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
42
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
- PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
46
- /* global Reflect, Promise */
47
- var extendStatics = function (d, b) {
48
- extendStatics = Object.setPrototypeOf ||
49
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50
- function (d, b) { for (var p in b)
51
- if (Object.prototype.hasOwnProperty.call(b, p))
52
- d[p] = b[p]; };
53
- return extendStatics(d, b);
54
- };
55
- function __extends(d, b) {
56
- if (typeof b !== "function" && b !== null)
57
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
58
- extendStatics(d, b);
59
- function __() { this.constructor = d; }
60
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61
- }
62
- var __assign = function () {
63
- __assign = Object.assign || function __assign(t) {
64
- for (var s, i = 1, n = arguments.length; i < n; i++) {
65
- s = arguments[i];
66
- for (var p in s)
67
- if (Object.prototype.hasOwnProperty.call(s, p))
68
- t[p] = s[p];
69
- }
70
- return t;
71
- };
72
- return __assign.apply(this, arguments);
73
- };
74
- function __rest(s, e) {
75
- var t = {};
76
- for (var p in s)
77
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
78
- t[p] = s[p];
79
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
80
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
81
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
82
- t[p[i]] = s[p[i]];
83
- }
84
- return t;
85
- }
86
- function __decorate(decorators, target, key, desc) {
87
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
88
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
89
- r = Reflect.decorate(decorators, target, key, desc);
90
- else
91
- for (var i = decorators.length - 1; i >= 0; i--)
92
- if (d = decorators[i])
93
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
94
- return c > 3 && r && Object.defineProperty(target, key, r), r;
95
- }
96
- function __param(paramIndex, decorator) {
97
- return function (target, key) { decorator(target, key, paramIndex); };
98
- }
99
- function __metadata(metadataKey, metadataValue) {
100
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
101
- return Reflect.metadata(metadataKey, metadataValue);
102
- }
103
- function __awaiter(thisArg, _arguments, P, generator) {
104
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
105
- return new (P || (P = Promise))(function (resolve, reject) {
106
- function fulfilled(value) { try {
107
- step(generator.next(value));
108
- }
109
- catch (e) {
110
- reject(e);
111
- } }
112
- function rejected(value) { try {
113
- step(generator["throw"](value));
114
- }
115
- catch (e) {
116
- reject(e);
117
- } }
118
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
119
- step((generator = generator.apply(thisArg, _arguments || [])).next());
120
- });
121
- }
122
- function __generator(thisArg, body) {
123
- var _ = { label: 0, sent: function () { if (t[0] & 1)
124
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
125
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
126
- function verb(n) { return function (v) { return step([n, v]); }; }
127
- function step(op) {
128
- if (f)
129
- throw new TypeError("Generator is already executing.");
130
- while (_)
131
- try {
132
- 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)
133
- return t;
134
- if (y = 0, t)
135
- op = [op[0] & 2, t.value];
136
- switch (op[0]) {
137
- case 0:
138
- case 1:
139
- t = op;
140
- break;
141
- case 4:
142
- _.label++;
143
- return { value: op[1], done: false };
144
- case 5:
145
- _.label++;
146
- y = op[1];
147
- op = [0];
148
- continue;
149
- case 7:
150
- op = _.ops.pop();
151
- _.trys.pop();
152
- continue;
153
- default:
154
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
155
- _ = 0;
156
- continue;
157
- }
158
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
159
- _.label = op[1];
160
- break;
161
- }
162
- if (op[0] === 6 && _.label < t[1]) {
163
- _.label = t[1];
164
- t = op;
165
- break;
166
- }
167
- if (t && _.label < t[2]) {
168
- _.label = t[2];
169
- _.ops.push(op);
170
- break;
171
- }
172
- if (t[2])
173
- _.ops.pop();
174
- _.trys.pop();
175
- continue;
176
- }
177
- op = body.call(thisArg, _);
178
- }
179
- catch (e) {
180
- op = [6, e];
181
- y = 0;
182
- }
183
- finally {
184
- f = t = 0;
185
- }
186
- if (op[0] & 5)
187
- throw op[1];
188
- return { value: op[0] ? op[1] : void 0, done: true };
189
- }
190
- }
191
- var __createBinding = Object.create ? (function (o, m, k, k2) {
192
- if (k2 === undefined)
193
- k2 = k;
194
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
195
- }) : (function (o, m, k, k2) {
196
- if (k2 === undefined)
197
- k2 = k;
198
- o[k2] = m[k];
199
- });
200
- function __exportStar(m, o) {
201
- for (var p in m)
202
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
203
- __createBinding(o, m, p);
204
- }
205
- function __values(o) {
206
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
207
- if (m)
208
- return m.call(o);
209
- if (o && typeof o.length === "number")
210
- return {
211
- next: function () {
212
- if (o && i >= o.length)
213
- o = void 0;
214
- return { value: o && o[i++], done: !o };
215
- }
216
- };
217
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
218
- }
219
- function __read(o, n) {
220
- var m = typeof Symbol === "function" && o[Symbol.iterator];
221
- if (!m)
222
- return o;
223
- var i = m.call(o), r, ar = [], e;
224
- try {
225
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
226
- ar.push(r.value);
227
- }
228
- catch (error) {
229
- e = { error: error };
230
- }
231
- finally {
232
- try {
233
- if (r && !r.done && (m = i["return"]))
234
- m.call(i);
235
- }
236
- finally {
237
- if (e)
238
- throw e.error;
239
- }
240
- }
241
- return ar;
242
- }
243
- /** @deprecated */
244
- function __spread() {
245
- for (var ar = [], i = 0; i < arguments.length; i++)
246
- ar = ar.concat(__read(arguments[i]));
247
- return ar;
248
- }
249
- /** @deprecated */
250
- function __spreadArrays() {
251
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
252
- s += arguments[i].length;
253
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
254
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
255
- r[k] = a[j];
256
- return r;
257
- }
258
- function __spreadArray(to, from, pack) {
259
- if (pack || arguments.length === 2)
260
- for (var i = 0, l = from.length, ar; i < l; i++) {
261
- if (ar || !(i in from)) {
262
- if (!ar)
263
- ar = Array.prototype.slice.call(from, 0, i);
264
- ar[i] = from[i];
265
- }
266
- }
267
- return to.concat(ar || Array.prototype.slice.call(from));
268
- }
269
- function __await(v) {
270
- return this instanceof __await ? (this.v = v, this) : new __await(v);
271
- }
272
- function __asyncGenerator(thisArg, _arguments, generator) {
273
- if (!Symbol.asyncIterator)
274
- throw new TypeError("Symbol.asyncIterator is not defined.");
275
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
276
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
277
- function verb(n) { if (g[n])
278
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
279
- function resume(n, v) { try {
280
- step(g[n](v));
281
- }
282
- catch (e) {
283
- settle(q[0][3], e);
284
- } }
285
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
286
- function fulfill(value) { resume("next", value); }
287
- function reject(value) { resume("throw", value); }
288
- function settle(f, v) { if (f(v), q.shift(), q.length)
289
- resume(q[0][0], q[0][1]); }
290
- }
291
- function __asyncDelegator(o) {
292
- var i, p;
293
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
294
- 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; }
295
- }
296
- function __asyncValues(o) {
297
- if (!Symbol.asyncIterator)
298
- throw new TypeError("Symbol.asyncIterator is not defined.");
299
- var m = o[Symbol.asyncIterator], i;
300
- 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);
301
- 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); }); }; }
302
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
303
- }
304
- function __makeTemplateObject(cooked, raw) {
305
- if (Object.defineProperty) {
306
- Object.defineProperty(cooked, "raw", { value: raw });
307
- }
308
- else {
309
- cooked.raw = raw;
310
- }
311
- return cooked;
312
- }
313
- ;
314
- var __setModuleDefault = Object.create ? (function (o, v) {
315
- Object.defineProperty(o, "default", { enumerable: true, value: v });
316
- }) : function (o, v) {
317
- o["default"] = v;
318
- };
319
- function __importStar(mod) {
320
- if (mod && mod.__esModule)
321
- return mod;
322
- var result = {};
323
- if (mod != null)
324
- for (var k in mod)
325
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
326
- __createBinding(result, mod, k);
327
- __setModuleDefault(result, mod);
328
- return result;
329
- }
330
- function __importDefault(mod) {
331
- return (mod && mod.__esModule) ? mod : { default: mod };
332
- }
333
- function __classPrivateFieldGet(receiver, state, kind, f) {
334
- if (kind === "a" && !f)
335
- throw new TypeError("Private accessor was defined without a getter");
336
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
337
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
338
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
339
- }
340
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
341
- if (kind === "m")
342
- throw new TypeError("Private method is not writable");
343
- if (kind === "a" && !f)
344
- throw new TypeError("Private accessor was defined without a setter");
345
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
346
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
347
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
348
- }
349
-
350
- var BbDropdown = /** @class */ (function () {
351
- function BbDropdown(_elementRef) {
352
- this._elementRef = _elementRef;
353
- // State.
354
- this.visible$ = new rxjs.BehaviorSubject(false);
355
- }
356
- BbDropdown.prototype.toggle = function () {
357
- return this.visible$.next(!this.visible$.getValue());
358
- };
359
- BbDropdown.prototype.close = function () {
360
- return this.visible$.next(false);
361
- };
362
- BbDropdown.prototype.onDocumentClick = function (target) {
363
- var _a, _b;
364
- if (!target) {
365
- return;
366
- }
367
- if ((_b = (_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.contains(target)) {
368
- return;
369
- }
370
- return this.close();
371
- };
372
- return BbDropdown;
373
- }());
374
- BbDropdown.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbDropdown, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
375
- BbDropdown.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbDropdown, selector: "bb-dropdown", host: { listeners: { "document:click": "onDocumentClick($event.target)" }, classAttribute: "bb-dropdown" }, ngImport: i0__namespace, template: "<button (click)=\"toggle()\"\n [class.opened]=\"visible$ | async\"\n type=\"button\">\n <ng-content></ng-content>\n</button>\n\n<div *ngIf=\"visible$ | async\"\n [@dropdownMenuAnimation]=\"true\"\n class=\"bb-dropdown-menu\"\n role=\"list\">\n <ng-content select=\"[bbDropdownItem], hr\"></ng-content>\n</div>\n", styles: [".bb-dropdown{position:relative;display:inline-block}.bb-dropdown.right>.bb-dropdown-menu{right:0;left:auto;transform-origin:top right}.bb-dropdown-menu{left:0;top:100%;padding:0;z-index:10;display:block;margin:10px 0 0;border-radius:4px;position:absolute;list-style-type:none;background-color:#fff;border:1px solid #cccccc;transform-origin:top left;box-shadow:0 0 6px #0000001a}.bb-dropdown-menu:after{width:0;top:-5px;height:0;right:5px;content:\"\";position:absolute;border-style:solid;border-width:0 10px 5px 10px;border-color:transparent transparent #d9d9d9 transparent}.bb-dropdown-menu>hr{margin:0;height:1px;border:none;background-color:#ccc}.bb-dropdown-item{width:100%;border:none;line-height:1;display:block;cursor:pointer;text-align:left;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:12px 20px;white-space:nowrap;text-decoration:none;color:#676767!important;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-dropdown-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.bb-dropdown-item:hover{background-color:#f6f6f6}.bb-dropdown-item:focus{box-shadow:0 0 0 3px #dce0e980}.bb-dropdown-item:active{background-color:#f0f0f0}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1__namespace.AsyncPipe }, animations: [
376
- animations.trigger('dropdownMenuAnimation', [
377
- animations.transition(':enter', [
378
- // 1. Set the initial state.
379
- animations.style({ opacity: 0, transform: 'scale(0.9)' }),
380
- // 2. Start the animation to show the item.
381
- animations.animate('80ms cubic-bezier(0, 0, .2, 1)', animations.style({ opacity: 1, transform: 'scale(1)' }))
382
- ]),
383
- animations.transition(':leave', [
384
- // 1. Set the initial state.
385
- animations.style({ opacity: 1, transform: 'scale(1)' }),
386
- // 2. Start the animation to hide the item.
387
- animations.animate('80ms cubic-bezier(0, 0, .2, 1)', animations.style({ opacity: 0, transform: 'scale(0.9)' }))
388
- ])
389
- ])
390
- ], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
391
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbDropdown, decorators: [{
392
- type: i0.Component,
393
- args: [{
394
- selector: 'bb-dropdown',
395
- templateUrl: './dropdown.component.html',
396
- styleUrls: ['./dropdown.component.scss'],
397
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
398
- encapsulation: i0.ViewEncapsulation.None,
399
- host: { 'class': 'bb-dropdown' },
400
- preserveWhitespaces: false,
401
- animations: [
402
- animations.trigger('dropdownMenuAnimation', [
403
- animations.transition(':enter', [
404
- // 1. Set the initial state.
405
- animations.style({ opacity: 0, transform: 'scale(0.9)' }),
406
- // 2. Start the animation to show the item.
407
- animations.animate('80ms cubic-bezier(0, 0, .2, 1)', animations.style({ opacity: 1, transform: 'scale(1)' }))
408
- ]),
409
- animations.transition(':leave', [
410
- // 1. Set the initial state.
411
- animations.style({ opacity: 1, transform: 'scale(1)' }),
412
- // 2. Start the animation to hide the item.
413
- animations.animate('80ms cubic-bezier(0, 0, .2, 1)', animations.style({ opacity: 0, transform: 'scale(0.9)' }))
414
- ])
415
- ])
416
- ]
417
- }]
418
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { onDocumentClick: [{
419
- type: i0.HostListener,
420
- args: ['document:click', ['$event.target']]
421
- }] } });
422
- var BbDropdownItem = /** @class */ (function () {
423
- function BbDropdownItem(_parent) {
424
- this._parent = _parent;
425
- // Inputs.
426
- this.closeOnClick = true;
427
- }
428
- BbDropdownItem.prototype.onClick = function () {
429
- var _a;
430
- if (!this.closeOnClick) {
431
- return;
432
- }
433
- (_a = this._parent) === null || _a === void 0 ? void 0 : _a.close();
434
- };
435
- return BbDropdownItem;
436
- }());
437
- BbDropdownItem.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbDropdownItem, deps: [{ token: BbDropdown, host: true, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
438
- BbDropdownItem.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbDropdownItem, selector: "[bbDropdownItem]", inputs: { closeOnClick: "closeOnClick" }, host: { listeners: { "click": "onClick()" }, classAttribute: "bb-dropdown-item" }, ngImport: i0__namespace });
439
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbDropdownItem, decorators: [{
440
- type: i0.Directive,
441
- args: [{
442
- selector: '[bbDropdownItem]',
443
- host: {
444
- 'class': 'bb-dropdown-item'
445
- }
446
- }]
447
- }], ctorParameters: function () {
448
- return [{ type: BbDropdown, decorators: [{
449
- type: i0.Optional
450
- }, {
451
- type: i0.Host
452
- }] }];
453
- }, propDecorators: { closeOnClick: [{
454
- type: i0.Input
455
- }], onClick: [{
456
- type: i0.HostListener,
457
- args: ['click']
458
- }] } });
459
-
460
- var ELEMENTS_ICONS = new i0.InjectionToken('elements_icons');
461
- var ELEMENTS_ERRORS = new i0.InjectionToken('elements_errors');
462
-
463
- var BbSpinnerBase = /** @class */ (function () {
464
- function BbSpinnerBase() {
465
- }
466
- return BbSpinnerBase;
467
- }());
468
- var BbSpinnerMixinBase = i1$1.mixinDisabled(BbSpinnerBase);
469
- var BbSpinner = /** @class */ (function (_super) {
470
- __extends(BbSpinner, _super);
471
- function BbSpinner() {
472
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
473
- // Inputs.
474
- _this.color = '#303f9f';
475
- _this.alt = 'Loading...';
476
- return _this;
477
- }
478
- return BbSpinner;
479
- }(BbSpinnerMixinBase));
480
- BbSpinner.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbSpinner, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
481
- BbSpinner.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbSpinner, selector: "bb-spinner", inputs: { color: "color", alt: "alt", disabled: "disabled" }, host: { classAttribute: "bb-spinner" }, usesInheritance: true, ngImport: i0__namespace, template: "<!--\n The spinner element.\n\n This element contains a circle with a 25% bar that spins\n indefinitely. The border color can be set via the \"color\"\n property.\n-->\n<div class=\"bb-spinner-container\">\n <div [style.border-left-color]=\"color\"\n [class.disabled]=\"disabled\"\n class=\"bb-spinner-loader\"\n aria-live=\"assertive\"\n role=\"alert\">\n {{ alt }}\n </div>\n <ng-content select=\"img\"></ng-content>\n</div>\n\n<!--\n The content of the spinner.\n\n This element contains the content of the spinner. The user\n can set the content inside the tag.\n-->\n<span class=\"bb-spinner-content\">\n <ng-content></ng-content>\n</span>\n", styles: [".bb-spinner{color:#565656;padding:20px 0;text-align:center;align-items:center;display:inline-flex;flex-direction:column;justify-content:center}.bb-spinner.block{display:flex}.bb-spinner.inverse .bb-spinner-loader{border-color:#ffffff26}.bb-spinner.inverse .bb-spinner-content{color:#ffffff80}.bb-spinner.small .bb-spinner-loader,.bb-spinner.small .bb-spinner-loader:after{width:20px;height:20px;min-width:20px;min-height:20px}.bb-spinner.small .bb-spinner-loader{border-width:2px}.bb-spinner.small .bb-spinner-content{font-size:12px}.bb-spinner.medium .bb-spinner-loader,.bb-spinner.medium .bb-spinner-loader:after{width:60px;height:60px;min-width:60px;min-height:60px}.bb-spinner.medium .bb-spinner-loader{border-width:4px}.bb-spinner.medium .bb-spinner-content{font-size:16px}.bb-spinner.large .bb-spinner-loader,.bb-spinner.large .bb-spinner-loader:after{width:100px;height:100px;min-width:100px;min-height:100px}.bb-spinner.large .bb-spinner-loader{border-width:6px}.bb-spinner.large .bb-spinner-content{font-size:20px}.bb-spinner.horizontal{text-align:left;flex-direction:row}.bb-spinner.horizontal .bb-spinner-content:not(:empty){margin-left:10px;margin-top:0}.bb-spinner.vertical{text-align:center;flex-direction:column}.bb-spinner.vertical .bb-spinner-content:not(:empty){margin-left:0;margin-top:10px}.bb-spinner-container{display:flex;position:relative}.bb-spinner-container>img{top:20%;left:20%;width:60%;height:60%;position:absolute}.bb-spinner-loader{margin:0;padding:0;overflow:hidden;text-indent:100%;color:transparent;position:relative;display:inline-block;vertical-align:middle;border:4px solid #f2f4f6;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}.bb-spinner-loader,.bb-spinner-loader:after{width:60px;height:60px;min-width:60px;min-height:60px;border-radius:50%}.bb-spinner-loader.disabled{cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-animation-play-state:paused;animation-play-state:paused}.bb-spinner-content:not(:empty){font-size:16px;margin-top:10px;font-weight:500}@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
482
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbSpinner, decorators: [{
483
- type: i0.Component,
484
- args: [{
485
- selector: 'bb-spinner',
486
- templateUrl: './spinner.component.html',
487
- styleUrls: ['./spinner.component.scss'],
488
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
489
- encapsulation: i0.ViewEncapsulation.None,
490
- host: { 'class': 'bb-spinner' },
491
- inputs: ['color', 'alt', 'disabled'],
492
- preserveWhitespaces: false
493
- }]
494
- }], propDecorators: { color: [{
495
- type: i0.Input
496
- }], alt: [{
497
- type: i0.Input
498
- }] } });
499
-
500
- var BbButtonBase = /** @class */ (function () {
501
- function BbButtonBase(_elementRef) {
502
- this._elementRef = _elementRef;
503
- }
504
- return BbButtonBase;
505
- }());
506
- var BbButtonMixinBase = i1$1.mixinDisabled(i1$1.mixinLoad(BbButtonBase));
507
- var BbButton = /** @class */ (function (_super) {
508
- __extends(BbButton, _super);
509
- function BbButton(_elementRef) {
510
- return _super.call(this, _elementRef) || this;
511
- }
512
- Object.defineProperty(BbButton.prototype, "nativeElement", {
513
- get: function () {
514
- return this._elementRef.nativeElement;
515
- },
516
- enumerable: false,
517
- configurable: true
518
- });
519
- BbButton.prototype.focus = function () {
520
- this.nativeElement && this.nativeElement.focus();
521
- };
522
- return BbButton;
523
- }(BbButtonMixinBase));
524
- BbButton.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbButton, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
525
- BbButton.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbButton, selector: "button[bb-button]", inputs: { disabled: "disabled", loading: "loading" }, host: { properties: { "class.loading": "loading", "attr.disabled": "disabled || loading || null" }, classAttribute: "bb-button" }, exportAs: ["bbButton"], usesInheritance: true, ngImport: i0__namespace, template: "<bb-spinner [class.visible]=\"loading\"\n class=\"bb-button-spinner small\">\n</bb-spinner>\n\n<ng-content></ng-content>\n", styles: [".bb-button{height:38px;padding:0 8px;cursor:pointer;font-size:16px;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;font-style:normal;border-radius:4px;text-align:center;align-items:center;display:inline-flex;text-decoration:none;justify-content:center;background-color:#fff;color:#2d3c4d!important;border:1px solid #d4d8e1;transition-duration:.2s;box-shadow:0 6px 6px -6px #0000001a;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:padding-left,background-color,box-shadow}.bb-button:hover{background-color:#fcfcfb}.bb-button:focus,.bb-button:active{box-shadow:0 6px 6px -6px #0000001a,0 0 0 3px #dce0e980}.bb-button.full{width:100%}.bb-button.full.loading{padding-left:42px}.bb-button.primary{border-color:#2f2b85;color:#fff!important;background-color:#5b53ff}.bb-button.primary:hover{background-color:#564ee6}.bb-button.primary:focus,.bb-button.primary:active{box-shadow:0 6px 6px -6px #0000001a,0 0 0 3px #5b53ff80}.bb-button.destructive{border-color:#8f2020;color:#fff!important;background-color:#d32f2f}.bb-button.destructive:hover{background-color:#c32929}.bb-button.destructive:focus,.bb-button.destructive:active{box-shadow:0 6px 6px -6px #0000001a,0 0 0 3px #d32f2f80}.bb-button:disabled,.bb-button:disabled:focus,.bb-button:disabled:hover,.bb-button:disabled:active,.bb-button[disabled],.bb-button[disabled]:focus,.bb-button[disabled]:hover,.bb-button[disabled]:active,.bb-button.loading,.bb-button.loading:focus,.bb-button.loading:hover,.bb-button.loading:active{opacity:.4;cursor:default;box-shadow:none}.bb-button-spinner{width:0;opacity:0;overflow:hidden;visibility:hidden;padding:0!important;transition:width .2s cubic-bezier(0,0,.2,1),opacity .1s cubic-bezier(0,0,.2,1)}.bb-button-spinner.visible{opacity:1;width:20px;margin-right:8px;visibility:visible}.bb-button.loading.full>.bb-button-spinner{left:8px;margin-right:0;position:absolute}\n"], components: [{ type: BbSpinner, selector: "bb-spinner", inputs: ["color", "alt", "disabled"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
526
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbButton, decorators: [{
527
- type: i0.Component,
528
- args: [{
529
- selector: 'button[bb-button]',
530
- templateUrl: './button.component.html',
531
- styleUrls: ['./button.component.scss'],
532
- exportAs: 'bbButton',
533
- host: {
534
- 'class': 'bb-button',
535
- '[class.loading]': 'loading',
536
- '[attr.disabled]': 'disabled || loading || null'
537
- },
538
- inputs: ['disabled', 'loading'],
539
- encapsulation: i0.ViewEncapsulation.None,
540
- changeDetection: i0.ChangeDetectionStrategy.OnPush
541
- }]
542
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; } });
543
- var BbAnchor = /** @class */ (function (_super) {
544
- __extends(BbAnchor, _super);
545
- function BbAnchor(_elementRef) {
546
- return _super.call(this, _elementRef) || this;
547
- }
548
- BbAnchor.prototype.stopDisabledEvents = function (event) {
549
- // If the button is not disabled (and not loading) let all events pass.
550
- if (!this.disabled && !this.loading) {
551
- return;
552
- }
553
- // If the button is disabled and/or loading stop
554
- // the event from bubbling up.
555
- event.preventDefault();
556
- event.stopImmediatePropagation();
557
- };
558
- return BbAnchor;
559
- }(BbButton));
560
- BbAnchor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbAnchor, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
561
- BbAnchor.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbAnchor, selector: "a[bb-button]", inputs: { disabled: "disabled", loading: "loading", tabIndex: "tabIndex" }, host: { listeners: { "click": "stopDisabledEvents($event)" }, properties: { "attr.tabindex": "(disabled || loading) ? -1 : (tabIndex || 0)", "attr.disabled": "disabled || loading || null", "attr.aria-disabled": "(disabled || loading).toString()" }, classAttribute: "bb-button" }, exportAs: ["bbButton", "bbAnchor"], usesInheritance: true, ngImport: i0__namespace, template: "<bb-spinner [class.visible]=\"loading\"\n class=\"bb-button-spinner small\">\n</bb-spinner>\n\n<ng-content></ng-content>\n", styles: [".bb-button{height:38px;padding:0 8px;cursor:pointer;font-size:16px;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;font-style:normal;border-radius:4px;text-align:center;align-items:center;display:inline-flex;text-decoration:none;justify-content:center;background-color:#fff;color:#2d3c4d!important;border:1px solid #d4d8e1;transition-duration:.2s;box-shadow:0 6px 6px -6px #0000001a;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:padding-left,background-color,box-shadow}.bb-button:hover{background-color:#fcfcfb}.bb-button:focus,.bb-button:active{box-shadow:0 6px 6px -6px #0000001a,0 0 0 3px #dce0e980}.bb-button.full{width:100%}.bb-button.full.loading{padding-left:42px}.bb-button.primary{border-color:#2f2b85;color:#fff!important;background-color:#5b53ff}.bb-button.primary:hover{background-color:#564ee6}.bb-button.primary:focus,.bb-button.primary:active{box-shadow:0 6px 6px -6px #0000001a,0 0 0 3px #5b53ff80}.bb-button.destructive{border-color:#8f2020;color:#fff!important;background-color:#d32f2f}.bb-button.destructive:hover{background-color:#c32929}.bb-button.destructive:focus,.bb-button.destructive:active{box-shadow:0 6px 6px -6px #0000001a,0 0 0 3px #d32f2f80}.bb-button:disabled,.bb-button:disabled:focus,.bb-button:disabled:hover,.bb-button:disabled:active,.bb-button[disabled],.bb-button[disabled]:focus,.bb-button[disabled]:hover,.bb-button[disabled]:active,.bb-button.loading,.bb-button.loading:focus,.bb-button.loading:hover,.bb-button.loading:active{opacity:.4;cursor:default;box-shadow:none}.bb-button-spinner{width:0;opacity:0;overflow:hidden;visibility:hidden;padding:0!important;transition:width .2s cubic-bezier(0,0,.2,1),opacity .1s cubic-bezier(0,0,.2,1)}.bb-button-spinner.visible{opacity:1;width:20px;margin-right:8px;visibility:visible}.bb-button.loading.full>.bb-button-spinner{left:8px;margin-right:0;position:absolute}\n"], components: [{ type: BbSpinner, selector: "bb-spinner", inputs: ["color", "alt", "disabled"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
562
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbAnchor, decorators: [{
563
- type: i0.Component,
564
- args: [{
565
- selector: 'a[bb-button]',
566
- templateUrl: './button.component.html',
567
- styleUrls: ['./button.component.scss'],
568
- exportAs: 'bbButton, bbAnchor',
569
- host: {
570
- 'class': 'bb-button',
571
- '[attr.tabindex]': '(disabled || loading) ? -1 : (tabIndex || 0)',
572
- '[attr.disabled]': 'disabled || loading || null',
573
- '[attr.aria-disabled]': '(disabled || loading).toString()',
574
- '(click)': 'stopDisabledEvents($event)'
575
- },
576
- inputs: ['disabled', 'loading'],
577
- encapsulation: i0.ViewEncapsulation.None,
578
- changeDetection: i0.ChangeDetectionStrategy.OnPush
579
- }]
580
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { tabIndex: [{
581
- type: i0.Input
582
- }] } });
583
-
584
- var BbImagePickerBase = /** @class */ (function () {
585
- function BbImagePickerBase() {
586
- }
587
- return BbImagePickerBase;
588
- }());
589
- var BbImagePickerMixinBase = i1$1.mixinDisabled(i1$1.mixinGrouped(BbImagePickerBase));
590
- var BbImagePicker = /** @class */ (function (_super) {
591
- __extends(BbImagePicker, _super);
592
- function BbImagePicker(_converter) {
593
- var _this = _super.call(this) || this;
594
- _this._converter = _converter;
595
- // Inputs.
596
- _this.label = null;
597
- _this.placeholder = null;
598
- _this.styleDimensions = null;
599
- _this.cropDimensions = null;
600
- // Form.
601
- _this._value$ = new rxjs.BehaviorSubject(null);
602
- _this.valueChange = new i0.EventEmitter();
603
- _this.onTouchedCallback = function () {
604
- };
605
- _this.onChangeCallback = function () {
606
- };
607
- return _this;
608
- }
609
- Object.defineProperty(BbImagePicker.prototype, "value", {
610
- get: function () {
611
- return this._value$.getValue();
612
- },
613
- set: function (value) {
614
- this._value$.next(value);
615
- this.valueChange.emit(value);
616
- },
617
- enumerable: false,
618
- configurable: true
619
- });
620
- Object.defineProperty(BbImagePicker.prototype, "image", {
621
- get: function () {
622
- var _this = this;
623
- return this._value$.pipe(operators.map(function (value) { return value || _this.placeholder; }), operators.map(function (value) { return value ? "url(" + value + ")" : null; }));
624
- },
625
- enumerable: false,
626
- configurable: true
627
- });
628
- BbImagePicker.prototype.onFileChange = function (event) {
629
- return __awaiter(this, void 0, void 0, function () {
630
- var file, _a, error_1;
631
- return __generator(this, function (_b) {
632
- switch (_b.label) {
633
- case 0:
634
- file = event.target.files[0];
635
- // Check if the file exists.
636
- if (!file || this.disabled) {
637
- return [2 /*return*/];
638
- }
639
- _b.label = 1;
640
- case 1:
641
- _b.trys.push([1, 3, , 4]);
642
- _a = this;
643
- return [4 /*yield*/, this._converter.toDataUri(file, this.cropDimensions)];
644
- case 2:
645
- _a.value = _b.sent();
646
- return [3 /*break*/, 4];
647
- case 3:
648
- error_1 = _b.sent();
649
- this.value = null;
650
- return [3 /*break*/, 4];
651
- case 4:
652
- this.onChangeCallback(this.value);
653
- if (this.fileInput && this.fileInput.nativeElement) {
654
- this.fileInput.nativeElement.value = '';
655
- }
656
- return [2 /*return*/];
657
- }
658
- });
659
- });
660
- };
661
- BbImagePicker.prototype.openFilePicker = function () {
662
- if (this.disabled) {
663
- return;
664
- }
665
- // Execute a click on the file input.
666
- this.fileInput
667
- && this.fileInput.nativeElement
668
- && this.fileInput.nativeElement.click
669
- && this.fileInput.nativeElement.click();
670
- };
671
- BbImagePicker.prototype.writeValue = function (value) {
672
- this.value = value;
673
- };
674
- BbImagePicker.prototype.registerOnChange = function (method) {
675
- this.onChangeCallback = method;
676
- };
677
- BbImagePicker.prototype.registerOnTouched = function (method) {
678
- this.onTouchedCallback = method;
679
- };
680
- BbImagePicker.prototype.setDisabledState = function (isDisabled) {
681
- this.disabled = isDisabled;
682
- };
683
- return BbImagePicker;
684
- }(BbImagePickerMixinBase));
685
- BbImagePicker.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbImagePicker, deps: [{ token: i1__namespace$1.ImageConverter }], target: i0__namespace.ɵɵFactoryTarget.Component });
686
- BbImagePicker.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbImagePicker, selector: "bb-image-picker", inputs: { grouped: "grouped", disabled: "disabled", label: "label", placeholder: "placeholder", styleDimensions: "styleDimensions", cropDimensions: "cropDimensions", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.disabled": "disabled", "class.grouped": "grouped" }, classAttribute: "bb-image-picker" }, providers: [{ provide: i5.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return BbImagePicker; }), multi: true }], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<!-- The input that can open the file picker. -->\n<input #fileInput\n (change)=\"onFileChange($event)\"\n class=\"bb-image-picker-input\"\n type=\"file\"\n tabindex=\"-1\"\n accept=\"image/*\">\n\n<span [style.width]=\"styleDimensions?.width || '100%'\"\n [style.height]=\"styleDimensions?.height || '215px'\"\n [style.background-image]=\"image | async\"\n class=\"bb-image-input-image\">\n </span>\n\n<button *ngIf=\"label as labelText\"\n (click)=\"openFilePicker()\"\n bb-button\n class=\"bb-image-input-button\"\n type=\"button\">\n {{ labelText }}\n</button>\n", styles: [".bb-image-picker{display:flex;align-items:center;flex-direction:column}.bb-image-picker.circle>.bb-image-input-image{border-radius:50%}.bb-image-picker.grouped{margin-bottom:20px}.bb-image-picker.disabled{opacity:.5;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.bb-image-picker-input{opacity:0;z-index:-1;width:.1px;height:.1px;overflow:hidden;position:absolute}.bb-image-input-image{display:flex;cursor:default;position:relative;border-radius:4px;align-items:center;justify-content:center;background:rgba(0,0,0,.2) url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) center center/cover no-repeat}.bb-image-input-button{margin-top:10px}\n"], components: [{ type: BbButton, selector: "button[bb-button]", inputs: ["disabled", "loading"], exportAs: ["bbButton"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
687
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbImagePicker, decorators: [{
688
- type: i0.Component,
689
- args: [{
690
- selector: 'bb-image-picker',
691
- templateUrl: './image-picker.component.html',
692
- styleUrls: ['./image-picker.component.scss'],
693
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
694
- encapsulation: i0.ViewEncapsulation.None,
695
- host: {
696
- 'class': 'bb-image-picker',
697
- '[class.disabled]': 'disabled',
698
- '[class.grouped]': 'grouped'
699
- },
700
- inputs: ['grouped', 'disabled'],
701
- providers: [{ provide: i5.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return BbImagePicker; }), multi: true }],
702
- preserveWhitespaces: false
703
- }]
704
- }], ctorParameters: function () { return [{ type: i1__namespace$1.ImageConverter }]; }, propDecorators: { fileInput: [{
705
- type: i0.ViewChild,
706
- args: ['fileInput', { static: true }]
707
- }], label: [{
708
- type: i0.Input
709
- }], placeholder: [{
710
- type: i0.Input
711
- }], styleDimensions: [{
712
- type: i0.Input
713
- }], cropDimensions: [{
714
- type: i0.Input
715
- }], value: [{
716
- type: i0.Input
717
- }], valueChange: [{
718
- type: i0.Output
719
- }] } });
720
-
721
- var BbFormSubmit = /** @class */ (function () {
722
- function BbFormSubmit(_host, _formDirective) {
723
- this._host = _host;
724
- this._formDirective = _formDirective;
725
- }
726
- BbFormSubmit.prototype.ngOnInit = function () {
727
- // Submit changes.
728
- var regularSubmitChanges$ = rxjs.fromEvent(this.nativeElement, 'submit').pipe(operators.mapTo(true));
729
- // Reactive form submit changes.
730
- var reactiveSubmitChanges$ = this.reactiveSubmitChanges();
731
- // Reset changes.
732
- var resetChanges$ = rxjs.fromEvent(this.nativeElement, 'reset').pipe(operators.mapTo(false));
733
- // Listen to the submit status.
734
- this.submitStatus$ = rxjs.merge(regularSubmitChanges$, reactiveSubmitChanges$, resetChanges$).pipe(operators.startWith(false), operators.distinctUntilChanged(), operators.shareReplay(1));
735
- };
736
- BbFormSubmit.prototype.submit = function () {
737
- var _a, _b;
738
- (_b = (_a = this._formDirective) === null || _a === void 0 ? void 0 : _a.ngSubmit) === null || _b === void 0 ? void 0 : _b.emit();
739
- };
740
- BbFormSubmit.prototype.reset = function () {
741
- var _a;
742
- return (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.reset();
743
- };
744
- Object.defineProperty(BbFormSubmit.prototype, "nativeElement", {
745
- get: function () {
746
- var _a;
747
- return (_a = this._host) === null || _a === void 0 ? void 0 : _a.nativeElement;
748
- },
749
- enumerable: false,
750
- configurable: true
751
- });
752
- BbFormSubmit.prototype.reactiveSubmitChanges = function () {
753
- if (!this._formDirective) {
754
- return rxjs.EMPTY;
755
- }
756
- return this._formDirective.ngSubmit.pipe(operators.mapTo(true));
757
- };
758
- return BbFormSubmit;
759
- }());
760
- BbFormSubmit.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormSubmit, deps: [{ token: i0__namespace.ElementRef }, { token: i5__namespace.FormGroupDirective, optional: true, self: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
761
- BbFormSubmit.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbFormSubmit, selector: "form", exportAs: ["bbForm"], ngImport: i0__namespace });
762
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormSubmit, decorators: [{
763
- type: i0.Directive,
764
- args: [{
765
- selector: 'form',
766
- exportAs: 'bbForm'
767
- }]
768
- }], ctorParameters: function () {
769
- return [{ type: i0__namespace.ElementRef }, { type: i5__namespace.FormGroupDirective, decorators: [{
770
- type: i0.Optional
771
- }, {
772
- type: i0.Self
773
- }] }];
774
- } });
775
-
776
- var BbFormError = /** @class */ (function () {
777
- function BbFormError(_form, _control, _errors) {
778
- this._form = _form;
779
- this._control = _control;
780
- this._errors = _errors;
781
- // Outputs.
782
- this.errorChange = new i0.EventEmitter();
783
- // Subscriptions.
784
- this._ngControl = null;
785
- }
786
- Object.defineProperty(BbFormError.prototype, "control", {
787
- get: function () {
788
- return this._ngControl;
789
- },
790
- // Inputs.
791
- set: function (value) {
792
- this._ngControl = value;
793
- },
794
- enumerable: false,
795
- configurable: true
796
- });
797
- BbFormError.prototype.ngOnInit = function () {
798
- var _this = this;
799
- // Set the control if it was not set before.
800
- if (!this.control) {
801
- this.control = this._control;
802
- }
803
- // Listen for the submit changes
804
- var submitStatus$ = this.submitStatusChanges();
805
- // An observable that emits error changes.
806
- var errorChanges$ = this.statusChanges().pipe(operators.map(function () { return _this.getError(_this.control.errors); }), operators.distinctUntilChanged(), operators.map(function (error) { return typeof error === 'string' ? { token: error } : error; }));
807
- // Whenever the user submitted the form we want to
808
- // listen for any error changes.
809
- this.error$ = rxjs.combineLatest([submitStatus$, errorChanges$]).pipe(operators.map(function (_a) {
810
- var _b = __read(_a, 2), submitted = _b[0], error = _b[1];
811
- // If not submitted return null.
812
- if (!submitted) {
813
- return null;
814
- }
815
- // Return the error if submitted.
816
- return error;
817
- }), operators.tap(function (value) { return _this.errorChange.emit(value); }));
818
- };
819
- BbFormError.prototype.getError = function (errors) {
820
- // Validate the errors exist.
821
- if (!errors) {
822
- return null;
823
- }
824
- // Get the first error in the errors.
825
- var _a = __read(Object.keys(errors), 1), errorName = _a[0];
826
- var error = errors[errorName];
827
- // Validate the error exists.
828
- if (!error) {
829
- return null;
830
- }
831
- // Map the arrays into a object so we can
832
- // access the functions by a key-lookup.
833
- var errorFunctions = this._errors.reduce(function (previous, current) { return (Object.assign(Object.assign({}, previous), current)); }, {});
834
- // Get the error function.
835
- var errorFunction = errorFunctions[errorName] || errorFunctions['unknown'];
836
- // Validate the error function exists.
837
- if (!errorFunction) {
838
- return null;
839
- }
840
- // Return the parsed error.
841
- return errorFunction(error);
842
- };
843
- BbFormError.prototype.submitStatusChanges = function () {
844
- if (!this._form) {
845
- return rxjs.of(true);
846
- }
847
- return this._form.submitStatus$;
848
- };
849
- BbFormError.prototype.statusChanges = function () {
850
- if (!this.control) {
851
- return rxjs.EMPTY;
852
- }
853
- if (!this.control.statusChanges) {
854
- return rxjs.EMPTY;
855
- }
856
- return this.control.statusChanges.pipe(operators.startWith(this.control.status), operators.delay(0));
857
- };
858
- return BbFormError;
859
- }());
860
- BbFormError.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormError, deps: [{ token: BbFormSubmit, optional: true }, { token: i5__namespace.NgControl, optional: true }, { token: ELEMENTS_ERRORS, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
861
- BbFormError.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbFormError, selector: "bb-form-error", inputs: { control: "control" }, outputs: { errorChange: "errorChange" }, host: { classAttribute: "bb-form-error" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"error$ | async as error\">\n <p *ngIf=\"error?.token | bbLocalize:{optional: true, data: error?.data} as message\"\n class=\"bb-form-error-message\">\n {{ message }}\n </p>\n</ng-container>", styles: [".bb-form-error{display:block}.bb-form-error-message{color:#c23934;display:block;font-size:13px;margin-top:4px}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1__namespace.AsyncPipe, "bbLocalize": i4__namespace.BbLocalize }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
862
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormError, decorators: [{
863
- type: i0.Component,
864
- args: [{
865
- selector: 'bb-form-error',
866
- templateUrl: './form-error.component.html',
867
- styleUrls: ['./form-error.component.scss'],
868
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
869
- encapsulation: i0.ViewEncapsulation.None,
870
- host: {
871
- 'class': 'bb-form-error'
872
- },
873
- preserveWhitespaces: false
874
- }]
875
- }], ctorParameters: function () {
876
- return [{ type: BbFormSubmit, decorators: [{
877
- type: i0.Optional
878
- }] }, { type: i5__namespace.NgControl, decorators: [{
879
- type: i0.Optional
880
- }] }, { type: undefined, decorators: [{
881
- type: i0.Optional
882
- }, {
883
- type: i0.Inject,
884
- args: [ELEMENTS_ERRORS]
885
- }] }];
886
- }, propDecorators: { control: [{
887
- type: i0.Input
888
- }], errorChange: [{
889
- type: i0.Output
890
- }] } });
891
-
892
- var BbTemplate = /** @class */ (function () {
893
- function BbTemplate(_templateRef, _viewContainerRef) {
894
- this._templateRef = _templateRef;
895
- this._viewContainerRef = _viewContainerRef;
896
- }
897
- Object.defineProperty(BbTemplate.prototype, "bbTemplate", {
898
- set: function (content) {
899
- // Get the template.
900
- var template = content instanceof i0.TemplateRef
901
- ? content
902
- : this._templateRef;
903
- // Clear the view container ref and create the view.
904
- this._viewContainerRef.clear();
905
- this._viewContainerRef.createEmbeddedView(template);
906
- },
907
- enumerable: false,
908
- configurable: true
909
- });
910
- return BbTemplate;
911
- }());
912
- BbTemplate.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbTemplate, deps: [{ token: i0__namespace.TemplateRef }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
913
- BbTemplate.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbTemplate, selector: "[bbTemplate]", inputs: { bbTemplate: "bbTemplate" }, ngImport: i0__namespace });
914
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbTemplate, decorators: [{
915
- type: i0.Directive,
916
- args: [{
917
- selector: '[bbTemplate]'
918
- }]
919
- }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { bbTemplate: [{
920
- type: i0.Input
921
- }] } });
922
-
923
- var nextUniqueId$2 = 0;
924
- var BbFormControlBase = /** @class */ (function () {
925
- function BbFormControlBase() {
926
- }
927
- return BbFormControlBase;
928
- }());
929
- var BbFormControlMixinBase = i1$1.mixinDisabled(i1$1.mixinFocused(i1$1.mixinReadonly(i1$1.mixinGrouped(i1$1.mixinRequired(i1$1.mixinError(i1$1.mixinHideErrors(BbFormControlBase)))))));
930
- var BbFormControl = /** @class */ (function (_super) {
931
- __extends(BbFormControl, _super);
932
- function BbFormControl() {
933
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
934
- // Inputs.
935
- _this.label = null;
936
- _this.hint = null;
937
- // Data.
938
- _this.arrow = false;
939
- // Data.
940
- _this.labelId = "bb-form-control-" + nextUniqueId$2++;
941
- return _this;
942
- }
943
- BbFormControl.prototype.onErrorChange = function (error) {
944
- this.error = !!error;
945
- };
946
- return BbFormControl;
947
- }(BbFormControlMixinBase));
948
- BbFormControl.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormControl, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
949
- BbFormControl.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbFormControl, selector: "bb-form-control", inputs: { grouped: "grouped", hideErrors: "hideErrors", label: "label", hint: "hint" }, host: { properties: { "class.readonly": "readonly", "class.required": "required", "class.disabled": "disabled", "class.focused": "focused", "class.grouped": "grouped", "class.arrow": "arrow", "class.error": "error" }, classAttribute: "bb-form-control" }, queries: [{ propertyName: "ngControl", first: true, predicate: i5.NgControl, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<!-- Label of the form control. -->\n<label *ngIf=\"label as labelContent\"\n [attr.for]=\"labelId\"\n class=\"bb-form-control-label\">\n <ng-template [bbTemplate]=\"labelContent\">\n {{ labelContent }}\n </ng-template>\n</label>\n\n<!-- The input with the addons. -->\n<div class=\"bb-form-control-container\">\n <ng-content select=\"[bbPrefix]\"></ng-content>\n <ng-content select=\"[bbInput]\"></ng-content>\n <ng-content select=\"[bbSuffix]\"></ng-content>\n</div>\n\n<!-- The error component. -->\n<bb-form-error *ngIf=\"!hideErrors\"\n [control]=\"ngControl\"\n (errorChange)=\"onErrorChange($event)\">\n</bb-form-error>\n\n<!-- The form control hint. -->\n<p *ngIf=\"hint as hintContent\"\n class=\"bb-form-control-hint\">\n <ng-template [bbTemplate]=\"hintContent\">\n {{ hintContent }}\n </ng-template>\n</p>\n", styles: [".bb-form-control{color:#2d3c4d;display:block}.bb-form-control>.bb-form-control-container>*.bb-prefix,.bb-form-control>.bb-form-control-container>*.bb-suffix{margin:0 8px;color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control.grouped{margin-bottom:20px}.bb-form-control.small{max-width:240px}.bb-form-control.medium{max-width:480px}.bb-form-control.large{max-width:720px}.bb-form-control.required>.bb-form-control-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bb-form-control.disabled>.bb-form-control-container{cursor:default;pointer-events:none;background-color:#cccccca3}.bb-form-control.disabled>.bb-form-control-container>input,.bb-form-control.disabled>.bb-form-control-container>textarea,.bb-form-control.disabled>.bb-form-control-container>select{color:#aaa}.bb-form-control.readonly>.bb-form-control-container{cursor:default;border:1px dotted #bdc4c9}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container{background-color:#fff;box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a,0 0 0 3px #007bff33}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input::-moz-placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea::-moz-placeholder{color:#b4b4b4;-moz-transition:color .3s cubic-bezier(0,0,.2,1);transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input:-ms-input-placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea:-ms-input-placeholder{color:#b4b4b4;-ms-transition:color .3s cubic-bezier(0,0,.2,1);transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>input::placeholder,.bb-form-control:not(.disabled):not(.readonly).focused>.bb-form-control-container>textarea::placeholder{color:#b4b4b4;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control.error>.bb-form-control-label{color:#c23934}.bb-form-control.error>.bb-form-control-hint{display:none}.bb-form-control.error>.bb-form-control-container{border:1px solid #962b26;background-color:#c2393440!important;box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a,0 0 0 3px #c2393466!important}.bb-form-control.error>.bb-form-control-container>*.bb-prefix,.bb-form-control.error>.bb-form-control-container>.bb-suffix{color:#c23934}.bb-form-control.error>.bb-form-control-container>input::-moz-placeholder,.bb-form-control.error>.bb-form-control-container>textarea::-moz-placeholder{color:#c2393466!important}.bb-form-control.error>.bb-form-control-container>input:-ms-input-placeholder,.bb-form-control.error>.bb-form-control-container>textarea:-ms-input-placeholder{color:#c2393466!important}.bb-form-control.error>.bb-form-control-container>input::placeholder,.bb-form-control.error>.bb-form-control-container>textarea::placeholder{color:#c2393466!important}.bb-form-control.arrow>.bb-form-control-container:after{top:0;right:0;bottom:0;width:20px;content:\"\";height:36px;display:flex;min-width:20px;position:absolute;pointer-events:none;background-repeat:no-repeat;background-position:calc(100% - 8px) center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAGCAYAAAAYLBS/AAAACXBIWXMAAAsSAAALEgHS3X78AAAAWUlEQVQYlY3QsQ2DMAAEwMMTsAkrZInvWY3WXiIjJJtkA1OBRCIRf/nSffFTrXXGE4uxbCXJBw+8R0CStcAg3JKsUI7mDzzBBd3AC4Cp9/4z21o7znl9A9gBAf4fpjLTwkUAAAAASUVORK5CYII=)}.bb-form-control-container{width:100%;display:flex;overflow:hidden;position:relative;border-radius:3px;align-items:center;border:1px solid #b6bbc1;background-color:#fff8ff;transition-duration:.25s;transition-property:background-color,box-shadow;transition-timing-function:cubic-bezier(0,0,.2,1);box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a}.bb-form-control-container>input::-moz-placeholder,.bb-form-control-container>textarea::-moz-placeholder{color:#d2d2d2;-moz-transition:color .3s cubic-bezier(0,0,.2,1);transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input:-ms-input-placeholder,.bb-form-control-container>textarea:-ms-input-placeholder{color:#d2d2d2;-ms-transition:color .3s cubic-bezier(0,0,.2,1);transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input::placeholder,.bb-form-control-container>textarea::placeholder{color:#d2d2d2;transition:color .3s cubic-bezier(0,0,.2,1)}.bb-form-control-container>input,.bb-form-control-container>textarea,.bb-form-control-container>select{margin:0;width:100%;border:none;color:#3d464d;font-size:16px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent}.bb-form-control-container>input,.bb-form-control-container>select{height:36px;padding:0 8px}.bb-form-control-container>select{padding-right:28px}.bb-form-control-container>select>::-ms-expand{display:none}.bb-form-control-container>input::-ms-clear,.bb-form-control-container>input::-ms-reveal{width:0;height:0;display:none}.bb-form-control-container>input::-webkit-search-decoration,.bb-form-control-container>input::-webkit-search-cancel-button,.bb-form-control-container>input::-webkit-search-results-button,.bb-form-control-container>input::-webkit-search-results-decoration{display:none}.bb-form-control-container>textarea{resize:none;padding:8px}.bb-form-control-label{color:#000;display:block;position:relative;margin-bottom:4px;transition:color 30ms cubic-bezier(0,0,.2,1)}.bb-form-control-error,.bb-form-control-hint{display:block;font-size:13px;margin-top:4px}.bb-form-control-error{color:#c23934}.bb-form-control-hint{color:#738694}\n"], components: [{ type: BbFormError, selector: "bb-form-error", inputs: ["control"], outputs: ["errorChange"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
950
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormControl, decorators: [{
951
- type: i0.Component,
952
- args: [{
953
- selector: 'bb-form-control',
954
- templateUrl: './form-control.component.html',
955
- styleUrls: ['./form-control.component.scss'],
956
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
957
- encapsulation: i0.ViewEncapsulation.None,
958
- host: {
959
- 'class': 'bb-form-control',
960
- '[class.readonly]': 'readonly',
961
- '[class.required]': 'required',
962
- '[class.disabled]': 'disabled',
963
- '[class.focused]': 'focused',
964
- '[class.grouped]': 'grouped',
965
- '[class.arrow]': 'arrow',
966
- '[class.error]': 'error'
967
- },
968
- inputs: ['grouped', 'hideErrors'],
969
- preserveWhitespaces: false
970
- }]
971
- }], propDecorators: { ngControl: [{
972
- type: i0.ContentChild,
973
- args: [i5.NgControl]
974
- }], label: [{
975
- type: i0.Input
976
- }], hint: [{
977
- type: i0.Input
978
- }] } });
979
-
980
- var BbFileImage = /** @class */ (function () {
981
- function BbFileImage(_platform, _image, _sanitizer) {
982
- this._platform = _platform;
983
- this._image = _image;
984
- this._sanitizer = _sanitizer;
985
- }
986
- BbFileImage.prototype.transform = function (file) {
987
- return __awaiter(this, void 0, void 0, function () {
988
- var _this = this;
989
- return __generator(this, function (_a) {
990
- // If the file is not a file return.
991
- if (!this._platform.isBrowser || !(file instanceof File)) {
992
- return [2 /*return*/, null];
993
- }
994
- return [2 /*return*/, this._image.fileToImage(file, [
995
- 'image/png',
996
- 'image/jpeg',
997
- 'image/gif',
998
- 'image/svg+xml'
999
- ]).then(function (image) {
1000
- if (!image) {
1001
- return null;
1002
- }
1003
- return {
1004
- background: _this._sanitizer.bypassSecurityTrustStyle("url(" + image.src + ")"),
1005
- aspectRatio: image.height / image.width
1006
- };
1007
- }).catch(function () {
1008
- return null;
1009
- })];
1010
- });
1011
- });
1012
- };
1013
- return BbFileImage;
1014
- }());
1015
- BbFileImage.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFileImage, deps: [{ token: i1__namespace$1.Platform }, { token: i1__namespace$1.ImageConverter }, { token: i2__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1016
- BbFileImage.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFileImage, name: "bbFileImage" });
1017
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFileImage, decorators: [{
1018
- type: i0.Pipe,
1019
- args: [{
1020
- name: 'bbFileImage'
1021
- }]
1022
- }], ctorParameters: function () { return [{ type: i1__namespace$1.Platform }, { type: i1__namespace$1.ImageConverter }, { type: i2__namespace.DomSanitizer }]; } });
1023
-
1024
- var BbFileSize = /** @class */ (function () {
1025
- function BbFileSize() {
1026
- this.format = function (value, decimals) {
1027
- if (decimals === void 0) { decimals = 2; }
1028
- if (value === 0) {
1029
- return '0 Bytes';
1030
- }
1031
- var k = 1024;
1032
- var dm = decimals < 0 ? 0 : decimals;
1033
- var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
1034
- var index = Math.floor(Math.log(value) / Math.log(k));
1035
- return parseFloat((value / Math.pow(k, index)).toFixed(dm)) + ' ' + sizes[index];
1036
- };
1037
- }
1038
- BbFileSize.prototype.transform = function (value) {
1039
- return this.format(value);
1040
- };
1041
- return BbFileSize;
1042
- }());
1043
- BbFileSize.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFileSize, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1044
- BbFileSize.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFileSize, name: "bbFileSize" });
1045
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFileSize, decorators: [{
1046
- type: i0.Pipe,
1047
- args: [{
1048
- name: 'bbFileSize'
1049
- }]
1050
- }] });
1051
-
1052
- var nextUniqueId$1 = 0;
1053
- var BbFilePickerBase = /** @class */ (function () {
1054
- function BbFilePickerBase() {
1055
- }
1056
- return BbFilePickerBase;
1057
- }());
1058
- var BbFilePickerMixinBase$1 = i1$1.mixinRequired(i1$1.mixinDisabled(i1$1.mixinGrouped(i1$1.mixinError(i1$1.mixinHideErrors(BbFilePickerBase)))));
1059
- var BbFilePicker = /** @class */ (function (_super) {
1060
- __extends(BbFilePicker, _super);
1061
- function BbFilePicker() {
1062
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
1063
- // Inputs.
1064
- _this.label = null;
1065
- _this.hint = null;
1066
- _this.accept = null;
1067
- _this.showImages = true;
1068
- _this.allowDragging = true;
1069
- // State.
1070
- _this.labelId = "bb-file-picker-" + nextUniqueId$1++;
1071
- _this.hovered = false;
1072
- _this.value$ = new rxjs.BehaviorSubject({});
1073
- _this.valueChange = new i0.EventEmitter();
1074
- _this.onTouchedCallback = function () {
1075
- };
1076
- _this.onChangeCallback = function () {
1077
- };
1078
- _this.saveFile = function (files) {
1079
- // Validate the files exist.
1080
- if (!files) {
1081
- return;
1082
- }
1083
- // Retrieve the first file.
1084
- var file = files[0];
1085
- // Validate the first file exists.
1086
- if (!file) {
1087
- return;
1088
- }
1089
- // Save the file.
1090
- _this.value = file;
1091
- };
1092
- _this.getFileListFromEvent = function (event) {
1093
- var element = event.target;
1094
- if (!element) {
1095
- return null;
1096
- }
1097
- return element.files;
1098
- };
1099
- _this.preventDefault = function (event) {
1100
- event.preventDefault();
1101
- event.stopPropagation();
1102
- };
1103
- return _this;
1104
- }
1105
- Object.defineProperty(BbFilePicker.prototype, "value", {
1106
- get: function () {
1107
- var file = this.value$.getValue().file;
1108
- return file;
1109
- },
1110
- set: function (value) {
1111
- this.value$.next({ file: value });
1112
- this.valueChange.emit(value);
1113
- },
1114
- enumerable: false,
1115
- configurable: true
1116
- });
1117
- BbFilePicker.prototype.onDrag = function (event, isHovered) {
1118
- // Validate the input can support drag.
1119
- if (!this.allowDragging || this.disabled) {
1120
- return;
1121
- }
1122
- // Prevent the default event action
1123
- // and start the hovering.
1124
- this.preventDefault(event);
1125
- this.hovered = isHovered;
1126
- };
1127
- BbFilePicker.prototype.onDrop = function (event) {
1128
- // Validate the input can support drag.
1129
- if (!this.allowDragging || this.disabled) {
1130
- return;
1131
- }
1132
- // Prevent the default event action
1133
- // and stop the hovering.
1134
- this.preventDefault(event);
1135
- this.hovered = false;
1136
- // Save the file.
1137
- this.saveFile(event['dataTransfer'].files);
1138
- // Run the on change callback.
1139
- this.onChangeCallback(this.value);
1140
- };
1141
- BbFilePicker.prototype.onButtonPressed = function (file) {
1142
- if (file) {
1143
- this.value = null;
1144
- this.onChangeCallback(this.value);
1145
- return;
1146
- }
1147
- return this.openFilePicker();
1148
- };
1149
- BbFilePicker.prototype.openFilePicker = function () {
1150
- return this.fileInput
1151
- && this.fileInput.nativeElement
1152
- && this.fileInput.nativeElement.click
1153
- && this.fileInput.nativeElement.click();
1154
- };
1155
- BbFilePicker.prototype.onFileChange = function (event) {
1156
- // Validate the input is not disabled.
1157
- if (this.disabled) {
1158
- return;
1159
- }
1160
- // Extract the file from the event.
1161
- var fileList = this.getFileListFromEvent(event);
1162
- // Save the file.
1163
- this.saveFile(fileList);
1164
- // Run the on change callback.
1165
- this.onChangeCallback(this.value);
1166
- // Clear the file input.
1167
- if (this.fileInput && this.fileInput.nativeElement) {
1168
- this.fileInput.nativeElement.value = '';
1169
- }
1170
- };
1171
- BbFilePicker.prototype.writeValue = function (value) {
1172
- this.value = value;
1173
- };
1174
- BbFilePicker.prototype.registerOnChange = function (method) {
1175
- this.onChangeCallback = method;
1176
- };
1177
- BbFilePicker.prototype.registerOnTouched = function (method) {
1178
- this.onTouchedCallback = method;
1179
- };
1180
- BbFilePicker.prototype.setDisabledState = function (isDisabled) {
1181
- this.disabled = isDisabled;
1182
- };
1183
- BbFilePicker.prototype.onErrorChange = function (error) {
1184
- this.error = !!error;
1185
- };
1186
- BbFilePicker.prototype.validate = function (_a) {
1187
- var value = _a.value;
1188
- if (value === null || value === undefined) {
1189
- return null;
1190
- }
1191
- var regexString = (this.accept || '*')
1192
- .replace(/\*/g, '.\*')
1193
- .replace(/,/g, '|');
1194
- var mimeTypeRegex = new RegExp(regexString);
1195
- var isNotValid = (typeof File === 'undefined') || !(value instanceof File) || !mimeTypeRegex.test(value === null || value === void 0 ? void 0 : value.type);
1196
- return isNotValid && {
1197
- invalidFileType: true
1198
- };
1199
- };
1200
- return BbFilePicker;
1201
- }(BbFilePickerMixinBase$1));
1202
- BbFilePicker.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFilePicker, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
1203
- BbFilePicker.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbFilePicker, selector: "bb-file-picker", inputs: { disabled: "disabled", hideErrors: "hideErrors", grouped: "grouped", required: "required", label: "label", hint: "hint", accept: "accept", showImages: "showImages", allowDragging: "allowDragging", value: "value" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "dragover": "onDrag($event,true)", "dragleave": "onDrag($event,false)", "drop": "onDrop($event)" }, properties: { "class.required": "required", "class.disabled": "disabled", "class.grouped": "grouped", "class.hovered": "hovered", "class.error": "error" }, classAttribute: "bb-file-picker" }, providers: [
1204
- {
1205
- provide: i5.NG_VALUE_ACCESSOR,
1206
- useExisting: i0.forwardRef(function () { return BbFilePicker; }),
1207
- multi: true
1208
- },
1209
- {
1210
- provide: i5.NG_VALIDATORS,
1211
- useExisting: BbFilePicker,
1212
- multi: true
1213
- }
1214
- ], queries: [{ propertyName: "extraTemplate", first: true, predicate: ["extra"], descendants: true }], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<!-- The label of the input. -->\n<label *ngIf=\"label as labelContent\"\n [for]=\"labelId\"\n class=\"bb-file-picker-label\">\n <ng-template [bbTemplate]=\"labelContent\">\n {{ labelContent }}\n </ng-template>\n</label>\n\n<!-- The input that can open the file picker. -->\n<input #fileInput\n [accept]=\"accept\"\n [disabled]=\"disabled\"\n (change)=\"onFileChange($event)\"\n class=\"bb-file-picker-input\"\n type=\"file\"\n tabindex=\"-1\">\n\n<div *ngIf=\"value$ | async as data\"\n class=\"bb-file-picker-wrapper\">\n <!-- The button that accepts files. -->\n <div class=\"bb-file-picker-container\">\n <button [class.destructive]=\"!!data?.file\"\n [class.standalone]=\"!allowDragging\"\n [disabled]=\"disabled\"\n [id]=\"labelId\"\n (click)=\"onButtonPressed(data?.file)\"\n type=\"button\"\n class=\"bb-file-picker-button\">\n <ng-container *ngTemplateOutlet=\"data?.file ? closeIcon : uploadIcon\"></ng-container>\n {{ (data?.file ? 'file-picker.remove' : 'file-picker.choose') | bbLocalize }}\n </button>\n <div *ngIf=\"allowDragging\"\n class=\"bb-file-picker-zone\">\n {{ 'file-picker.drop' | bbLocalize }}\n </div>\n </div>\n\n <ng-container *ngIf=\"!!extraTemplate\">\n <ng-container *ngTemplateOutlet=\"extraTemplate; context: {$implicit: data?.file}\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"showImages\">\n <div *ngIf=\"data?.file | bbFileImage | async as image\"\n class=\"bb-file-picker-image-container\">\n <div class=\"bb-file-picker-image-wrapper\">\n <div [@bbFilePickerImageAnimation]=\"true\"\n [style.padding-top.%]=\"image?.aspectRatio * 100\"\n [style.background-image]=\"image?.background\"\n class=\"bb-file-picker-image\">\n </div>\n </div>\n </div>\n </ng-container>\n\n <!-- Extra information of the file. -->\n <div [class.visible]=\"!!data?.file\"\n class=\"bb-file-picker-info\">\n <span *ngIf=\"data?.file?.name as name\">{{ name }}</span>\n <span *ngIf=\"data?.file?.size as size\">{{ size | bbFileSize }}</span>\n </div>\n</div>\n\n<bb-form-error *ngIf=\"!hideErrors\"\n (errorChange)=\"onErrorChange($event)\">\n</bb-form-error>\n\n<!-- The file picker hint. -->\n<p *ngIf=\"hint as hintContent\"\n class=\"bb-file-picker-hint\">\n <ng-template [bbTemplate]=\"hintContent\">\n {{ hintContent }}\n </ng-template>\n</p>\n\n<!-- Upload icon. -->\n<ng-template #uploadIcon>\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n class=\"bb-file-picker-icon\"\n width=\"24\"\n height=\"24\">\n <path fill=\"currentColor\"\n d=\"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5a2.5 2.5 0 010-5H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5z\"></path>\n <path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path>\n </svg>\n</ng-template>\n\n<!-- Close icon. -->\n<ng-template #closeIcon>\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n class=\"bb-file-picker-icon\"\n width=\"24\"\n height=\"24\">\n <path fill=\"currentColor\"\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"></path>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n </svg>\n</ng-template>\n", styles: [".bb-file-picker{display:block}.bb-file-picker.disabled>.bb-file-picker-wrapper{cursor:default;background-color:#cccccca3}.bb-file-picker.grouped{margin-bottom:20px}.bb-file-picker.full>.bb-file-picker-wrapper{width:100%}.bb-file-picker:not(.disabled) .bb-file-picker-button{background-color:#fff}.bb-file-picker:not(.disabled):focus>.bb-file-picker-wrapper,.bb-file-picker:not(.disabled).hovered>.bb-file-picker-wrapper{box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a,0 0 0 3px #007bff33}.bb-file-picker.required>.bb-file-picker-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bb-file-picker.error>.bb-file-picker-label{color:#c23934}.bb-file-picker.error>.bb-file-picker-hint{display:none}.bb-file-picker.error>.bb-file-picker-wrapper{border:1px solid #962b26;background-color:#c2393440!important;box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a,0 0 0 3px #c2393466!important}.bb-file-picker.error .bb-file-picker-button{background-color:transparent}.bb-file-picker-wrapper{max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px;display:inline-flex;flex-direction:column;border:1px solid #b6bbc1;background-color:#fff8ff;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a}.bb-file-picker-label{color:#000;display:block;position:relative;margin-bottom:4px}.bb-file-picker-input{opacity:0;z-index:-1;width:.1px;height:.1px;overflow:hidden;position:absolute}.bb-file-picker-container{min-height:38px;display:inline-flex}.bb-file-picker-button{margin:0;z-index:1;border:none;color:#2196f3;line-height:1;cursor:pointer;padding:0 12px;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:500;align-items:center;white-space:nowrap;display:inline-flex;border-top-left-radius:3px;border-bottom-left-radius:3px;border-right:1px solid #b6bbc1;background-color:#ffffff80;transition:box-shadow .2s cubic-bezier(0,0,.2,1)}.bb-file-picker-button:focus{box-shadow:0 0 0 3px #007bff33}.bb-file-picker-button:disabled{cursor:default}.bb-file-picker-button.destructive{color:#f55656}.bb-file-picker-button.standalone{width:100%;border-right:none;border-top-right-radius:3px;border-bottom-right-radius:3px}.bb-file-picker-icon{margin-right:4px}.bb-file-picker-zone{flex:1;color:#848f99;font-size:14px;padding:8px 12px;line-height:18px;align-items:center;display:inline-flex;justify-content:center}.bb-file-picker-info{height:0;color:#848f99;padding:0 12px;overflow:hidden;line-height:36px;align-items:center;display:inline-flex;background-color:#fff8ff;border-top:0 solid #b6bbc1;transition:height .2s cubic-bezier(0,0,.2,1)}.bb-file-picker-info.visible{height:38px;border-top-width:1px}.bb-file-picker-info>span{opacity:.4;max-width:100%;font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bb-file-picker-info>span:first-child{flex:1}.bb-file-picker-info>span:last-child{margin-left:12px}.bb-file-picker-image-container{overflow:hidden;border-top:1px solid #b6bbc1}.bb-file-picker-image-wrapper{width:100%;max-width:40%;margin:20px auto}.bb-file-picker-image{width:100%;display:flex;overflow:hidden;position:relative;border-radius:4px;will-change:opacity;background-size:cover;background-position:center;background-repeat:no-repeat}.bb-file-picker-hint{display:block;color:#738694;font-size:13px;margin-top:4px}\n"], components: [{ type: BbFormError, selector: "bb-form-error", inputs: ["control"], outputs: ["errorChange"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1__namespace.AsyncPipe, "bbLocalize": i4__namespace.BbLocalize, "bbFileImage": BbFileImage, "bbFileSize": BbFileSize }, animations: [
1215
- animations.trigger('bbFilePickerImageAnimation', [
1216
- animations.transition(':enter', [
1217
- animations.style({ opacity: 0 }),
1218
- animations.animate('200ms', animations.style({ opacity: 1 }))
1219
- ]),
1220
- animations.transition(':leave', [
1221
- animations.animate('200ms', animations.style({ opacity: 0 }))
1222
- ])
1223
- ])
1224
- ], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
1225
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFilePicker, decorators: [{
1226
- type: i0.Component,
1227
- args: [{
1228
- selector: 'bb-file-picker',
1229
- templateUrl: './file-picker.component.html',
1230
- styleUrls: ['./file-picker.component.scss'],
1231
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1232
- encapsulation: i0.ViewEncapsulation.None,
1233
- providers: [
1234
- {
1235
- provide: i5.NG_VALUE_ACCESSOR,
1236
- useExisting: i0.forwardRef(function () { return BbFilePicker; }),
1237
- multi: true
1238
- },
1239
- {
1240
- provide: i5.NG_VALIDATORS,
1241
- useExisting: BbFilePicker,
1242
- multi: true
1243
- }
1244
- ],
1245
- host: {
1246
- 'class': 'bb-file-picker',
1247
- '[class.required]': 'required',
1248
- '[class.disabled]': 'disabled',
1249
- '[class.grouped]': 'grouped',
1250
- '[class.hovered]': 'hovered',
1251
- '[class.error]': 'error'
1252
- },
1253
- animations: [
1254
- animations.trigger('bbFilePickerImageAnimation', [
1255
- animations.transition(':enter', [
1256
- animations.style({ opacity: 0 }),
1257
- animations.animate('200ms', animations.style({ opacity: 1 }))
1258
- ]),
1259
- animations.transition(':leave', [
1260
- animations.animate('200ms', animations.style({ opacity: 0 }))
1261
- ])
1262
- ])
1263
- ],
1264
- inputs: ['disabled', 'hideErrors', 'grouped', 'required'],
1265
- preserveWhitespaces: false
1266
- }]
1267
- }], propDecorators: { fileInput: [{
1268
- type: i0.ViewChild,
1269
- args: ['fileInput', { static: true }]
1270
- }], extraTemplate: [{
1271
- type: i0.ContentChild,
1272
- args: ['extra']
1273
- }], label: [{
1274
- type: i0.Input
1275
- }], hint: [{
1276
- type: i0.Input
1277
- }], accept: [{
1278
- type: i0.Input
1279
- }], showImages: [{
1280
- type: i0.Input
1281
- }], allowDragging: [{
1282
- type: i0.Input
1283
- }], value: [{
1284
- type: i0.Input
1285
- }], valueChange: [{
1286
- type: i0.Output
1287
- }], onDrag: [{
1288
- type: i0.HostListener,
1289
- args: ['dragover', ['$event', 'true']]
1290
- }, {
1291
- type: i0.HostListener,
1292
- args: ['dragleave', ['$event', 'false']]
1293
- }], onDrop: [{
1294
- type: i0.HostListener,
1295
- args: ['drop', ['$event']]
1296
- }] } });
1297
-
1298
- var BbSelect = /** @class */ (function () {
1299
- function BbSelect(_elementRef, _ngControl, _formControl) {
1300
- this._elementRef = _elementRef;
1301
- this._ngControl = _ngControl;
1302
- this._formControl = _formControl;
1303
- this.hasArrow = true;
1304
- this._disabled = false;
1305
- this._required = false;
1306
- }
1307
- BbSelect.prototype.ngOnInit = function () {
1308
- // Set an arrow on the form control if
1309
- // it requires one.
1310
- this._formControl.arrow = this.hasArrow;
1311
- };
1312
- BbSelect.prototype.ngDoCheck = function () {
1313
- if (this._ngControl) {
1314
- this.disabled = this._ngControl.disabled;
1315
- }
1316
- };
1317
- BbSelect.prototype.ngOnDestroy = function () {
1318
- var _a;
1319
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1320
- };
1321
- BbSelect.prototype.focus = function () {
1322
- var _a, _b;
1323
- return (_b = (_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
1324
- };
1325
- BbSelect.prototype.setFocus = function (hasFocus) {
1326
- if (!this._formControl) {
1327
- return;
1328
- }
1329
- this._formControl.focused = hasFocus;
1330
- };
1331
- Object.defineProperty(BbSelect.prototype, "id", {
1332
- get: function () {
1333
- var _a, _b;
1334
- return (_b = (_a = this._formControl) === null || _a === void 0 ? void 0 : _a.labelId) !== null && _b !== void 0 ? _b : null;
1335
- },
1336
- enumerable: false,
1337
- configurable: true
1338
- });
1339
- Object.defineProperty(BbSelect.prototype, "disabled", {
1340
- get: function () {
1341
- if (this._ngControl && this._ngControl.disabled !== null) {
1342
- return this._ngControl.disabled;
1343
- }
1344
- return this._disabled;
1345
- },
1346
- set: function (newValue) {
1347
- this._disabled = i1$1.coerceBooleanProperty(newValue);
1348
- if (!this._formControl) {
1349
- return;
1350
- }
1351
- this._formControl.disabled = this._disabled;
1352
- },
1353
- enumerable: false,
1354
- configurable: true
1355
- });
1356
- Object.defineProperty(BbSelect.prototype, "required", {
1357
- get: function () {
1358
- return this._required;
1359
- },
1360
- set: function (newValue) {
1361
- this._required = i1$1.coerceBooleanProperty(newValue);
1362
- if (!this._formControl) {
1363
- return;
1364
- }
1365
- this._formControl.required = this._required;
1366
- },
1367
- enumerable: false,
1368
- configurable: true
1369
- });
1370
- return BbSelect;
1371
- }());
1372
- BbSelect.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbSelect, deps: [{ token: i0__namespace.ElementRef }, { token: i5__namespace.NgControl, optional: true, self: true }, { token: BbFormControl, host: true, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1373
- BbSelect.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbSelect, selector: "select[bbInput]", inputs: { disabled: "disabled", required: "required" }, host: { listeners: { "focus": "setFocus(true)", "blur": "setFocus(false)" }, properties: { "disabled": "disabled", "attr.id": "this.id" } }, ngImport: i0__namespace });
1374
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbSelect, decorators: [{
1375
- type: i0.Directive,
1376
- args: [{
1377
- selector: 'select[bbInput]',
1378
- host: {
1379
- '[disabled]': 'disabled',
1380
- '(focus)': 'setFocus(true)',
1381
- '(blur)': 'setFocus(false)'
1382
- }
1383
- }]
1384
- }], ctorParameters: function () {
1385
- return [{ type: i0__namespace.ElementRef }, { type: i5__namespace.NgControl, decorators: [{
1386
- type: i0.Optional
1387
- }, {
1388
- type: i0.Self
1389
- }] }, { type: BbFormControl, decorators: [{
1390
- type: i0.Optional
1391
- }, {
1392
- type: i0.Host
1393
- }] }];
1394
- }, propDecorators: { id: [{
1395
- type: i0.HostBinding,
1396
- args: ['attr.id']
1397
- }], disabled: [{
1398
- type: i0.Input
1399
- }], required: [{
1400
- type: i0.Input
1401
- }] } });
1402
- var BbInput = /** @class */ (function (_super) {
1403
- __extends(BbInput, _super);
1404
- function BbInput(_elementRef, _ngControl, _formControl) {
1405
- var _this = _super.call(this, _elementRef, _ngControl, _formControl) || this;
1406
- _this._elementRef = _elementRef;
1407
- _this._ngControl = _ngControl;
1408
- _this._formControl = _formControl;
1409
- _this.hasArrow = false;
1410
- _this._readonly = false;
1411
- return _this;
1412
- }
1413
- Object.defineProperty(BbInput.prototype, "readonly", {
1414
- get: function () {
1415
- return this._readonly;
1416
- },
1417
- set: function (newValue) {
1418
- this._readonly = i1$1.coerceBooleanProperty(newValue);
1419
- if (!this._formControl) {
1420
- return;
1421
- }
1422
- this._formControl.readonly = this._readonly;
1423
- },
1424
- enumerable: false,
1425
- configurable: true
1426
- });
1427
- return BbInput;
1428
- }(BbSelect));
1429
- BbInput.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbInput, deps: [{ token: i0__namespace.ElementRef }, { token: i5__namespace.NgControl, optional: true, self: true }, { token: BbFormControl, host: true, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1430
- BbInput.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbInput, selector: "input[bbInput], textarea[bbInput]", inputs: { readonly: "readonly" }, host: { listeners: { "focus": "setFocus(true)", "blur": "setFocus(false)" }, properties: { "disabled": "disabled", "readonly": "readonly" } }, usesInheritance: true, ngImport: i0__namespace });
1431
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbInput, decorators: [{
1432
- type: i0.Directive,
1433
- args: [{
1434
- selector: 'input[bbInput], textarea[bbInput]',
1435
- host: {
1436
- '[disabled]': 'disabled',
1437
- '[readonly]': 'readonly',
1438
- '(focus)': 'setFocus(true)',
1439
- '(blur)': 'setFocus(false)'
1440
- }
1441
- }]
1442
- }], ctorParameters: function () {
1443
- return [{ type: i0__namespace.ElementRef }, { type: i5__namespace.NgControl, decorators: [{
1444
- type: i0.Optional
1445
- }, {
1446
- type: i0.Self
1447
- }] }, { type: BbFormControl, decorators: [{
1448
- type: i0.Optional
1449
- }, {
1450
- type: i0.Host
1451
- }] }];
1452
- }, propDecorators: { readonly: [{
1453
- type: i0.Input
1454
- }] } });
1455
-
1456
- var BbDatePickerBase = /** @class */ (function () {
1457
- function BbDatePickerBase() {
1458
- }
1459
- return BbDatePickerBase;
1460
- }());
1461
- var BbFilePickerMixinBase = i1$1.mixinRequired(i1$1.mixinReadonly(i1$1.mixinDisabled(i1$1.mixinGrouped(i1$1.mixinError(i1$1.mixinHideErrors(BbDatePickerBase))))));
1462
- var BbDatePicker = /** @class */ (function (_super) {
1463
- __extends(BbDatePicker, _super);
1464
- function BbDatePicker(_localeId) {
1465
- var _this = _super.call(this) || this;
1466
- _this._localeId = _localeId;
1467
- // Readonly data.
1468
- _this._yearRegex = /^(10|[1-9][0-9])\d{2}$/; // Note: 1000 - 9999
1469
- // Inputs.
1470
- _this.label = null;
1471
- _this.hint = null;
1472
- _this.dayPlaceholder = 'dd';
1473
- _this.monthPlaceholder = 'mm';
1474
- _this.yearPlaceholder = 'yyyy';
1475
- _this.trackByValue = function (_, item) { return item === null || item === void 0 ? void 0 : item.value; };
1476
- _this.years$ = new rxjs.BehaviorSubject(null);
1477
- _this.valueChange = new i0.EventEmitter();
1478
- // Subscriptions.
1479
- _this._subscription = new rxjs.Subscription();
1480
- _this.onTouchedCallback = function () {
1481
- };
1482
- _this.onChangeCallback = function () {
1483
- };
1484
- _this.formToDateString = function (_g) {
1485
- var year = _g.year, month = _g.month, day = _g.day;
1486
- var _a;
1487
- if ((_a = _this.form) === null || _a === void 0 ? void 0 : _a.invalid) {
1488
- return null;
1489
- }
1490
- var prefixedMonth = _this.padString("" + month, 2, '0');
1491
- var prefixedDay = _this.padString("" + day, 2, '0');
1492
- return [year, prefixedMonth, prefixedDay].join('-');
1493
- };
1494
- _this.parseYearFormat = function (value) {
1495
- var _a, _b, _c, _d, _e, _f;
1496
- // Transform the value to a definitive string.
1497
- var yearString = "" + value;
1498
- var currentFullYear = new Date().getFullYear();
1499
- // Handle default "current" syntax.
1500
- if (yearString === 'current') {
1501
- return currentFullYear;
1502
- }
1503
- // Handle "current + {amount}" syntax.
1504
- if (/^current\s?\+\s?\d+$/.test(yearString)) {
1505
- var amount = (_c = Number((_b = (_a = yearString === null || yearString === void 0 ? void 0 : yearString.split('+')) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.trim())) !== null && _c !== void 0 ? _c : 0;
1506
- return currentFullYear + amount;
1507
- }
1508
- // Handle "current - {amount}" syntax.
1509
- if (/^current\s?-\s?\d+$/.test(yearString)) {
1510
- var amount = (_f = Number((_e = (_d = yearString === null || yearString === void 0 ? void 0 : yearString.split('-')) === null || _d === void 0 ? void 0 : _d[1]) === null || _e === void 0 ? void 0 : _e.trim())) !== null && _f !== void 0 ? _f : 0;
1511
- return currentFullYear - amount;
1512
- }
1513
- // Handling the default number case.
1514
- if (/^[0-9]{4}$/.test(yearString)) {
1515
- return Number(yearString);
1516
- }
1517
- // We could not parse it.
1518
- return null;
1519
- };
1520
- _this.getDaysInMonth = function (month, year) {
1521
- if (month === void 0) { month = null; }
1522
- if (year === void 0) { year = null; }
1523
- var _a;
1524
- if (((_a = _this.form) === null || _a === void 0 ? void 0 : _a.invalid) || month === null || year === null) {
1525
- return 31;
1526
- }
1527
- var parsedYear = parseInt(year, 10);
1528
- return new Date(parsedYear, month, 0).getDate();
1529
- };
1530
- _this.isValidDateString = function (value) {
1531
- return typeof value === 'string' && /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.test(value);
1532
- };
1533
- _this.padString = function (value, maxLength, fillString) {
1534
- if (fillString === void 0) { fillString = '0'; }
1535
- var count = maxLength - value.length;
1536
- for (var index = 0; index < count; index++) {
1537
- value = "" + fillString + value;
1538
- }
1539
- return value;
1540
- };
1541
- return _this;
1542
- }
1543
- Object.defineProperty(BbDatePicker.prototype, "years", {
1544
- set: function (value) {
1545
- this.parseYears(value);
1546
- },
1547
- enumerable: false,
1548
- configurable: true
1549
- });
1550
- Object.defineProperty(BbDatePicker.prototype, "value", {
1551
- get: function () {
1552
- var _a;
1553
- return this.formToDateString((_a = this.form) === null || _a === void 0 ? void 0 : _a.value);
1554
- },
1555
- set: function (value) {
1556
- this.parseDateStringInForm(value);
1557
- this.valueChange.emit(this.value);
1558
- },
1559
- enumerable: false,
1560
- configurable: true
1561
- });
1562
- BbDatePicker.prototype.ngOnInit = function () {
1563
- this.composeForm();
1564
- this.getData();
1565
- this.handleChanges();
1566
- };
1567
- BbDatePicker.prototype.ngOnDestroy = function () {
1568
- var _a;
1569
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1570
- };
1571
- BbDatePicker.prototype.writeValue = function (value) {
1572
- this.parseDateStringInForm(value);
1573
- };
1574
- BbDatePicker.prototype.registerOnChange = function (method) {
1575
- this.onChangeCallback = method;
1576
- };
1577
- BbDatePicker.prototype.registerOnTouched = function (method) {
1578
- this.onTouchedCallback = method;
1579
- };
1580
- BbDatePicker.prototype.setDisabledState = function (isDisabled) {
1581
- var _a, _b;
1582
- this.disabled = isDisabled;
1583
- if (this.disabled) {
1584
- (_a = this.form) === null || _a === void 0 ? void 0 : _a.disable();
1585
- }
1586
- else {
1587
- (_b = this.form) === null || _b === void 0 ? void 0 : _b.enable();
1588
- }
1589
- };
1590
- BbDatePicker.prototype.onErrorChange = function (error) {
1591
- this.error = !!error;
1592
- };
1593
- BbDatePicker.prototype.validate = function (_g) {
1594
- var value = _g.value;
1595
- if (value === null || value === undefined) {
1596
- return null;
1597
- }
1598
- var data = this.parseDateString(value);
1599
- var date = new Date(data === null || data === void 0 ? void 0 : data.year, (data === null || data === void 0 ? void 0 : data.month) - 1, data === null || data === void 0 ? void 0 : data.day);
1600
- var maxDays = this.getDaysInMonth(data === null || data === void 0 ? void 0 : data.month, "" + (data === null || data === void 0 ? void 0 : data.year));
1601
- var isInvalidDate = date.toString() === 'Invalid Date';
1602
- var exceededMaxDays = (data === null || data === void 0 ? void 0 : data.day) > maxDays;
1603
- return (isInvalidDate || exceededMaxDays) && {
1604
- invalidDate: true
1605
- };
1606
- };
1607
- BbDatePicker.prototype.handleChanges = function () {
1608
- var _this = this;
1609
- var dateOrNull$ = this.form.valueChanges.pipe(operators.map(function (value) { return _this.formToDateString(value); }), operators.distinctUntilChanged());
1610
- var subscription = dateOrNull$.subscribe(function () {
1611
- _this.valueChange.emit(_this.value);
1612
- _this.onChangeCallback(_this.value);
1613
- });
1614
- this._subscription.add(subscription);
1615
- };
1616
- BbDatePicker.prototype.getData = function () {
1617
- var _this = this;
1618
- var years$ = this.years$.asObservable();
1619
- var months$ = this.getMonthData();
1620
- var days$ = this.getDayData();
1621
- this.data$ = rxjs.combineLatest([years$, months$, days$]).pipe(operators.map(function (_g) {
1622
- var _h = __read(_g, 3), years = _h[0], months = _h[1], days = _h[2];
1623
- return ({ years: years, months: months, days: days });
1624
- }), operators.tap(function (data) { var _a; return _this.verifyListData((_a = data === null || data === void 0 ? void 0 : data.days) === null || _a === void 0 ? void 0 : _a.length, data === null || data === void 0 ? void 0 : data.years); }));
1625
- };
1626
- BbDatePicker.prototype.verifyListData = function (maxDays, years) {
1627
- var dayControl = this.form.get('day');
1628
- if ((dayControl === null || dayControl === void 0 ? void 0 : dayControl.value) !== null && (dayControl === null || dayControl === void 0 ? void 0 : dayControl.value) > maxDays) {
1629
- dayControl.patchValue(maxDays);
1630
- }
1631
- var yearControl = this.form.get('year');
1632
- if (years !== null && (yearControl === null || yearControl === void 0 ? void 0 : yearControl.value) !== null && this._yearRegex.test(yearControl === null || yearControl === void 0 ? void 0 : yearControl.value)) {
1633
- var selectedYear = Number(yearControl === null || yearControl === void 0 ? void 0 : yearControl.value);
1634
- var firstYear = Math.min.apply(Math, __spreadArray([], __read(years)));
1635
- var lastYear = Math.max.apply(Math, __spreadArray([], __read(years)));
1636
- if (selectedYear < firstYear || selectedYear > lastYear) {
1637
- Promise.resolve().then(function () { return yearControl.patchValue(null); });
1638
- }
1639
- }
1640
- };
1641
- BbDatePicker.prototype.getDayData = function () {
1642
- var _this = this;
1643
- var _a;
1644
- var count$ = this.form.valueChanges.pipe(operators.startWith((_a = this.form) === null || _a === void 0 ? void 0 : _a.value), operators.map(function (_g) {
1645
- var month = _g.month, year = _g.year;
1646
- return _this.getDaysInMonth(month, year);
1647
- }), operators.distinctUntilChanged());
1648
- return count$.pipe(operators.map(function (count) { return Array(count).fill(0).map(function (_, index) { return ({
1649
- label: "" + (index + 1),
1650
- value: index + 1
1651
- }); }); }));
1652
- };
1653
- BbDatePicker.prototype.getMonthData = function () {
1654
- var _this = this;
1655
- var array = Array(12).fill(0).map(function (_, month) {
1656
- var date = new Date(2000, month, 1);
1657
- var label = i1.formatDate(date, 'LLLL', _this._localeId);
1658
- return { label: label, value: month + 1 };
1659
- });
1660
- return rxjs.of(array);
1661
- };
1662
- BbDatePicker.prototype.composeForm = function () {
1663
- var required = i5.Validators.required, pattern = i5.Validators.pattern, minLength = i5.Validators.minLength, maxLength = i5.Validators.maxLength;
1664
- var yearPattern = pattern(this._yearRegex);
1665
- var yearValidators = [required, yearPattern, minLength(4), maxLength(4)];
1666
- this.form = new i5.FormGroup({
1667
- day: new i5.FormControl(null, required),
1668
- month: new i5.FormControl(null, required),
1669
- year: new i5.FormControl(null, yearValidators)
1670
- });
1671
- };
1672
- BbDatePicker.prototype.parseDateStringInForm = function (value) {
1673
- var _a, _b;
1674
- // If the date string was not a valid format, reset the form.
1675
- if (!this.isValidDateString(value)) {
1676
- if (value !== null) {
1677
- (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset({ year: null, month: null, day: null }, { emitEvent: false });
1678
- }
1679
- return;
1680
- }
1681
- // Parse the date string and save in the form.
1682
- var data = this.parseDateString(value);
1683
- var year = (data === null || data === void 0 ? void 0 : data.year) !== null && (data === null || data === void 0 ? void 0 : data.year) !== undefined
1684
- ? this.padString("" + (data === null || data === void 0 ? void 0 : data.year), 4, '0')
1685
- : null;
1686
- var formData = Object.assign(Object.assign({}, (data !== null && data !== void 0 ? data : {})), { year: year });
1687
- (_b = this.form) === null || _b === void 0 ? void 0 : _b.patchValue(formData, { emitEvent: false });
1688
- };
1689
- BbDatePicker.prototype.parseDateString = function (value) {
1690
- if (!this.isValidDateString(value)) {
1691
- return null;
1692
- }
1693
- // Parse the date string.
1694
- var _g = __read(value === null || value === void 0 ? void 0 : value.split('-'), 3), year = _g[0], month = _g[1], day = _g[2];
1695
- return {
1696
- day: day ? parseInt(day, 10) : null,
1697
- month: month ? parseInt(month, 10) : null,
1698
- year: year ? parseInt(year, 10) : null
1699
- };
1700
- };
1701
- BbDatePicker.prototype.parseYears = function (values) {
1702
- if (!values) {
1703
- return this.years$.next(null);
1704
- }
1705
- // Parse the values to years (in numbers).
1706
- var _g = __read(values, 2), first = _g[0], last = _g[1];
1707
- var firstYear = this.parseYearFormat(first);
1708
- var lastYear = this.parseYearFormat(last);
1709
- // Check cases in where we cannot parse.
1710
- if (firstYear === null || lastYear === null) {
1711
- return this.years$.next(null);
1712
- }
1713
- var difference = firstYear - lastYear;
1714
- var absoluteDifference = Math.abs(difference) + 1;
1715
- // Create an array with years.
1716
- var years = Array(absoluteDifference)
1717
- .fill(0)
1718
- .map(function (_, index) { return difference < 0 ? (firstYear + index) : (firstYear - index); });
1719
- // Validate we have one or more years.
1720
- if ((years === null || years === void 0 ? void 0 : years.length) <= 0) {
1721
- return this.years$.next(null);
1722
- }
1723
- // Push the years.
1724
- return this.years$.next(years);
1725
- };
1726
- return BbDatePicker;
1727
- }(BbFilePickerMixinBase));
1728
- BbDatePicker.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbDatePicker, deps: [{ token: i0.LOCALE_ID }], target: i0__namespace.ɵɵFactoryTarget.Component });
1729
- BbDatePicker.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbDatePicker, selector: "bb-date-picker", inputs: { required: "required", readonly: "readonly", disabled: "disabled", grouped: "grouped", hideErrors: "hideErrors", label: "label", hint: "hint", dayPlaceholder: "dayPlaceholder", monthPlaceholder: "monthPlaceholder", yearPlaceholder: "yearPlaceholder", years: "years", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.required": "required", "class.readonly": "readonly", "class.disabled": "disabled", "class.grouped": "grouped", "class.error": "error" }, classAttribute: "bb-date-picker" }, providers: [
1730
- {
1731
- provide: i5.NG_VALUE_ACCESSOR,
1732
- useExisting: i0.forwardRef(function () { return BbDatePicker; }),
1733
- multi: true
1734
- },
1735
- {
1736
- provide: i5.NG_VALIDATORS,
1737
- useExisting: BbDatePicker,
1738
- multi: true
1739
- }
1740
- ], usesInheritance: true, ngImport: i0__namespace, template: "<!-- Label of the date picker. -->\n<label *ngIf=\"label as labelContent\"\n class=\"bb-date-picker-label\">\n <ng-template [bbTemplate]=\"labelContent\">\n {{ labelContent }}\n </ng-template>\n</label>\n\n<!-- The form containing the year/month/day fields. -->\n<form *ngIf=\"data$ | async as data\"\n [formGroup]=\"form\"\n class=\"bb-date-picker-container\"\n novalidate>\n <div class=\"bb-date-picker-item\">\n <bb-form-control hideErrors>\n <select [class.has-value]=\"!!form?.get('day')?.value\"\n bbInput\n autocomplete=\"off\"\n formControlName=\"day\">\n <option [ngValue]=\"null\">{{ dayPlaceholder }}</option>\n <option *ngFor=\"let day of data?.days; trackBy: trackByValue\"\n [ngValue]=\"day?.value\">\n {{ day?.label }}\n </option>\n </select>\n </bb-form-control>\n </div>\n <div class=\"bb-date-picker-item\">\n <bb-form-control hideErrors>\n <select [class.has-value]=\"!!form?.get('month')?.value\"\n bbInput\n autocomplete=\"off\"\n formControlName=\"month\">\n <option [ngValue]=\"null\">{{ monthPlaceholder }}</option>\n <option *ngFor=\"let month of data?.months; trackBy: trackByValue\"\n [ngValue]=\"month?.value\">\n {{ month?.label }}\n </option>\n </select>\n </bb-form-control>\n </div>\n <div class=\"bb-date-picker-item\">\n <bb-form-control hideErrors>\n <select *ngIf=\"data?.years?.length > 0; else defaultYearInputTemplate\"\n [class.has-value]=\"!!form?.get('year')?.value\"\n bbInput\n autocomplete=\"off\"\n formControlName=\"year\">\n <option [ngValue]=\"null\">{{ yearPlaceholder }}</option>\n <option *ngFor=\"let year of data?.years\"\n [value]=\"year\">\n {{ year }}\n </option>\n </select>\n\n <ng-template #defaultYearInputTemplate>\n <input [placeholder]=\"yearPlaceholder\"\n bbInput\n type=\"text\"\n inputmode=\"numeric\"\n minlength=\"4\"\n maxlength=\"4\"\n pattern=\"^[0-9]{4}$\"\n formControlName=\"year\"\n autocomplete=\"off\">\n </ng-template>\n </bb-form-control>\n </div>\n</form>\n\n<!-- The date picker error. -->\n<bb-form-error *ngIf=\"!hideErrors\"\n (errorChange)=\"onErrorChange($event)\">\n</bb-form-error>\n\n<!-- The date picker hint. -->\n<p *ngIf=\"hint as hintContent\"\n class=\"bb-date-picker-hint\">\n <ng-template [bbTemplate]=\"hintContent\">\n {{ hintContent }}\n </ng-template>\n</p>\n", styles: [".bb-date-picker{display:block}.bb-date-picker.required>.bb-date-picker-label:after{content:\"*\";color:#c23934;font-size:12px;line-height:1.5}.bb-date-picker.readonly{pointer-events:none}.bb-date-picker.readonly .bb-form-control-container{cursor:default;border:1px dotted #bdc4c9;background-color:#f9f9f9!important}.bb-date-picker.readonly .bb-form-control-container>select:disabled{opacity:1}.bb-date-picker.grouped{margin-bottom:20px}.bb-date-picker.error>.bb-date-picker-label{color:#c23934}.bb-date-picker.error .bb-form-control-container{border:1px solid #962b26;background-color:#c2393440!important;box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a,0 0 0 3px #c2393466!important}.bb-date-picker-label{color:#000;display:block;font-size:16px;font-weight:500;margin-bottom:4px}.bb-date-picker-container{display:flex}.bb-date-picker-item{flex:1}.bb-date-picker-item>bb-form-control.focused{z-index:1;position:relative}.bb-date-picker-item>.bb-form-control>.bb-form-control-container>select>option:first-child{color:#d2d2d2}.bb-date-picker-item>.bb-form-control>.bb-form-control-container>select:not(.has-value){color:#d2d2d2}.bb-date-picker-item>.bb-form-control>.bb-form-control-container>select:not(.has-value)>option:not(:first-child){color:#000}.bb-date-picker-item:not(:first-child):not(:last-child) .bb-form-control-container{border-radius:0!important}.bb-date-picker-item:first-child .bb-form-control-container{border-right:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.bb-date-picker-item:last-child .bb-form-control-container{border-left:none!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}.bb-date-picker-hint{display:block;color:#738694;font-size:13px;margin-top:4px;pointer-events:all}\n"], components: [{ type: BbFormControl, selector: "bb-form-control", inputs: ["grouped", "hideErrors", "label", "hint"] }, { type: BbFormError, selector: "bb-form-error", inputs: ["control"], outputs: ["errorChange"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }, { type: i5__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: BbFormSubmit, selector: "form", exportAs: ["bbForm"] }, { type: i5__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: BbSelect, selector: "select[bbInput]", inputs: ["disabled", "required"] }, { type: i5__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: BbInput, selector: "input[bbInput], textarea[bbInput]", inputs: ["readonly"] }, { type: i5__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { type: i5__namespace.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i5__namespace.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
1741
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbDatePicker, decorators: [{
1742
- type: i0.Component,
1743
- args: [{
1744
- selector: 'bb-date-picker',
1745
- templateUrl: './date-picker.component.html',
1746
- styleUrls: ['./date-picker.component.scss'],
1747
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1748
- encapsulation: i0.ViewEncapsulation.None,
1749
- providers: [
1750
- {
1751
- provide: i5.NG_VALUE_ACCESSOR,
1752
- useExisting: i0.forwardRef(function () { return BbDatePicker; }),
1753
- multi: true
1754
- },
1755
- {
1756
- provide: i5.NG_VALIDATORS,
1757
- useExisting: BbDatePicker,
1758
- multi: true
1759
- }
1760
- ],
1761
- host: {
1762
- 'class': 'bb-date-picker',
1763
- '[class.required]': 'required',
1764
- '[class.readonly]': 'readonly',
1765
- '[class.disabled]': 'disabled',
1766
- '[class.grouped]': 'grouped',
1767
- '[class.error]': 'error'
1768
- },
1769
- inputs: ['required', 'readonly', 'disabled', 'grouped', 'hideErrors'],
1770
- preserveWhitespaces: false
1771
- }]
1772
- }], ctorParameters: function () {
1773
- return [{ type: undefined, decorators: [{
1774
- type: i0.Inject,
1775
- args: [i0.LOCALE_ID]
1776
- }] }];
1777
- }, propDecorators: { label: [{
1778
- type: i0.Input
1779
- }], hint: [{
1780
- type: i0.Input
1781
- }], dayPlaceholder: [{
1782
- type: i0.Input
1783
- }], monthPlaceholder: [{
1784
- type: i0.Input
1785
- }], yearPlaceholder: [{
1786
- type: i0.Input
1787
- }], years: [{
1788
- type: i0.Input
1789
- }], value: [{
1790
- type: i0.Input
1791
- }], valueChange: [{
1792
- type: i0.Output
1793
- }] } });
1794
-
1795
- var BbSuffix = /** @class */ (function () {
1796
- function BbSuffix() {
1797
- }
1798
- return BbSuffix;
1799
- }());
1800
- BbSuffix.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbSuffix, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
1801
- BbSuffix.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbSuffix, selector: "[bbSuffix]", host: { classAttribute: "bb-suffix" }, ngImport: i0__namespace });
1802
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbSuffix, decorators: [{
1803
- type: i0.Directive,
1804
- args: [{
1805
- selector: '[bbSuffix]',
1806
- host: {
1807
- 'class': 'bb-suffix'
1808
- }
1809
- }]
1810
- }] });
1811
- var BbPrefix = /** @class */ (function () {
1812
- function BbPrefix() {
1813
- }
1814
- return BbPrefix;
1815
- }());
1816
- BbPrefix.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbPrefix, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
1817
- BbPrefix.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbPrefix, selector: "[bbPrefix]", host: { classAttribute: "bb-prefix" }, ngImport: i0__namespace });
1818
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbPrefix, decorators: [{
1819
- type: i0.Directive,
1820
- args: [{
1821
- selector: '[bbPrefix]',
1822
- host: {
1823
- 'class': 'bb-prefix'
1824
- }
1825
- }]
1826
- }] });
1827
-
1828
- var BbFormGroupBase = /** @class */ (function () {
1829
- function BbFormGroupBase() {
1830
- }
1831
- return BbFormGroupBase;
1832
- }());
1833
- var BbFormGroupMixinBase = i1$1.mixinGrouped(BbFormGroupBase);
1834
- var BbFormGroup = /** @class */ (function (_super) {
1835
- __extends(BbFormGroup, _super);
1836
- function BbFormGroup() {
1837
- return _super !== null && _super.apply(this, arguments) || this;
1838
- }
1839
- return BbFormGroup;
1840
- }(BbFormGroupMixinBase));
1841
- BbFormGroup.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormGroup, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
1842
- BbFormGroup.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbFormGroup, selector: "bb-form-group", inputs: { grouped: "grouped" }, host: { properties: { "class.grouped": "grouped" }, classAttribute: "bb-form-group" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-content></ng-content>\n", styles: [".bb-form-group{width:100%;display:flex;flex-wrap:wrap;margin-top:-10px}.bb-form-group>*{margin-top:10px}.bb-form-group>*:not(:first-child){margin-left:10px}.bb-form-group.start{justify-content:flex-start}.bb-form-group.end{justify-content:flex-end}.bb-form-group.vertical{flex-direction:column;justify-content:normal}.bb-form-group.vertical>*{margin-left:0}.bb-form-group.vertical.start{align-items:flex-start}.bb-form-group.vertical.end{align-items:flex-end}.bb-form-group.grouped{margin-bottom:20px}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
1843
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFormGroup, decorators: [{
1844
- type: i0.Component,
1845
- args: [{
1846
- selector: 'bb-form-group',
1847
- templateUrl: './form-group.component.html',
1848
- styleUrls: ['./form-group.component.scss'],
1849
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1850
- encapsulation: i0.ViewEncapsulation.None,
1851
- host: {
1852
- 'class': 'bb-form-group',
1853
- '[class.grouped]': 'grouped'
1854
- },
1855
- inputs: ['grouped'],
1856
- preserveWhitespaces: false
1857
- }]
1858
- }] });
1859
-
1860
- var BbFocusTrap = /** @class */ (function () {
1861
- function BbFocusTrap(_platform, _elementRef) {
1862
- this._platform = _platform;
1863
- this._elementRef = _elementRef;
1864
- this._focusableElements = [
1865
- 'a[href]',
1866
- 'area[href]',
1867
- 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
1868
- 'select:not([disabled]):not([aria-hidden])',
1869
- 'textarea:not([disabled]):not([aria-hidden])',
1870
- 'button:not([disabled]):not([aria-hidden])',
1871
- 'iframe',
1872
- 'object',
1873
- 'embed',
1874
- '[contenteditable]',
1875
- '[tabindex]:not([tabindex^="-"])'
1876
- ];
1877
- this.focus = function (element) {
1878
- return element && element.focus && element.focus();
1879
- };
1880
- this.isTabEvent = function (event) {
1881
- return event.key === 'Tab' || event.keyCode === 9;
1882
- };
1883
- }
1884
- BbFocusTrap.prototype.onKeydown = function (event) {
1885
- // Validate it is a tab event.
1886
- if (!this.isTabEvent(event)) {
1887
- return;
1888
- }
1889
- // Trap the focus inside the element.
1890
- return this.trapFocus(event);
1891
- };
1892
- BbFocusTrap.prototype.trapFocus = function (event) {
1893
- // Validate that the DOM is available.
1894
- if (!this._platform.isBrowser) {
1895
- return;
1896
- }
1897
- // Get all focusable nodes.
1898
- var focusableNodes = this.getFocusableNodes();
1899
- // Focus the first available element if the focus
1900
- // is not in the modal.
1901
- if (!this.element.contains(document.activeElement)) {
1902
- return this.focus(focusableNodes[0]);
1903
- }
1904
- var focusedItemIndex = focusableNodes.indexOf(document.activeElement);
1905
- if (event.shiftKey && focusedItemIndex === 0) {
1906
- this.focus(focusableNodes[focusableNodes.length - 1]);
1907
- return event.preventDefault();
1908
- }
1909
- if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {
1910
- this.focus(focusableNodes[0]);
1911
- return event.preventDefault();
1912
- }
1913
- };
1914
- Object.defineProperty(BbFocusTrap.prototype, "element", {
1915
- get: function () {
1916
- return this._elementRef.nativeElement;
1917
- },
1918
- enumerable: false,
1919
- configurable: true
1920
- });
1921
- BbFocusTrap.prototype.getFocusableNodes = function () {
1922
- var nodes = this.element.querySelectorAll(this._focusableElements);
1923
- return Array.apply(void 0, __spreadArray([], __read(nodes)));
1924
- };
1925
- return BbFocusTrap;
1926
- }());
1927
- BbFocusTrap.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFocusTrap, deps: [{ token: i1__namespace$1.Platform }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1928
- BbFocusTrap.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbFocusTrap, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0__namespace });
1929
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFocusTrap, decorators: [{
1930
- type: i0.Directive,
1931
- args: [{
1932
- selector: '[bbFocusTrap]'
1933
- }]
1934
- }], ctorParameters: function () { return [{ type: i1__namespace$1.Platform }, { type: i0__namespace.ElementRef }]; }, propDecorators: { onKeydown: [{
1935
- type: i0.HostListener,
1936
- args: ['keydown', ['$event']]
1937
- }] } });
1938
-
1939
- var BbAutosize = /** @class */ (function () {
1940
- function BbAutosize(_renderer, _elementRef) {
1941
- this._renderer = _renderer;
1942
- this._elementRef = _elementRef;
1943
- // Min/max heights for the textarea.
1944
- this.minHeight = null;
1945
- this.maxHeight = null;
1946
- this.rows = 1;
1947
- }
1948
- Object.defineProperty(BbAutosize.prototype, "element", {
1949
- get: function () {
1950
- var _a;
1951
- return (_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement;
1952
- },
1953
- enumerable: false,
1954
- configurable: true
1955
- });
1956
- BbAutosize.prototype.ngAfterViewInit = function () {
1957
- // Update the styles after the DOM has loaded.
1958
- this.updateStyles();
1959
- };
1960
- BbAutosize.prototype.onWindowResize = function () {
1961
- // Update the styles when the window is resized.
1962
- this.updateStyles();
1963
- };
1964
- BbAutosize.prototype.onInputReceived = function () {
1965
- // Update the styles after the textarea received input.
1966
- this.updateStyles();
1967
- };
1968
- BbAutosize.prototype.updateStyles = function () {
1969
- var _a, _b, _c;
1970
- // Validate the element exists.
1971
- if (!this.element) {
1972
- return;
1973
- }
1974
- // Calculate border height which is not included in the scroll height.
1975
- var borderHeight = ((_a = this.element) === null || _a === void 0 ? void 0 : _a.offsetHeight) - ((_b = this.element) === null || _b === void 0 ? void 0 : _b.clientHeight);
1976
- // Reset textarea height to auto that correctly calculate the new height.
1977
- this.setHeight('auto');
1978
- // Set new height.
1979
- this.setHeight(((_c = this.element) === null || _c === void 0 ? void 0 : _c.scrollHeight) + borderHeight + "px");
1980
- };
1981
- BbAutosize.prototype.setHeight = function (value) {
1982
- this._renderer.setStyle(this.element, 'height', value);
1983
- };
1984
- return BbAutosize;
1985
- }());
1986
- BbAutosize.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbAutosize, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1987
- BbAutosize.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbAutosize, selector: "textarea[bbAutosize]", inputs: { minHeight: "minHeight", maxHeight: "maxHeight", rows: "rows" }, host: { listeners: { "window:resize": "onWindowResize()", "input": "onInputReceived()" }, properties: { "style.min-height": "this.minHeight", "style.max-height": "this.maxHeight", "rows": "this.rows" } }, ngImport: i0__namespace });
1988
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbAutosize, decorators: [{
1989
- type: i0.Directive,
1990
- args: [{
1991
- selector: 'textarea[bbAutosize]'
1992
- }]
1993
- }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }]; }, propDecorators: { minHeight: [{
1994
- type: i0.Input
1995
- }, {
1996
- type: i0.HostBinding,
1997
- args: ['style.min-height']
1998
- }], maxHeight: [{
1999
- type: i0.Input
2000
- }, {
2001
- type: i0.HostBinding,
2002
- args: ['style.max-height']
2003
- }], rows: [{
2004
- type: i0.Input
2005
- }, {
2006
- type: i0.HostBinding,
2007
- args: ['rows']
2008
- }], onWindowResize: [{
2009
- type: i0.HostListener,
2010
- args: ['window:resize']
2011
- }], onInputReceived: [{
2012
- type: i0.HostListener,
2013
- args: ['input']
2014
- }] } });
2015
-
2016
- var BbRelativeTime = /** @class */ (function () {
2017
- function BbRelativeTime(_localize, _localeId) {
2018
- this._localize = _localize;
2019
- this._localeId = _localeId;
2020
- this.isValidDate = function (date) {
2021
- return typeof date === 'object' &&
2022
- typeof date.getTime === 'function' &&
2023
- !isNaN(date.getTime());
2024
- };
2025
- this.parseAsDate = function (value) {
2026
- // Add a Z after the date so
2027
- // it is treated as a UTC date.
2028
- if (typeof value === 'string' && /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/.test(value)) {
2029
- return new Date(value + "Z");
2030
- }
2031
- // Return the regular parsed date.
2032
- return new Date(value);
2033
- };
2034
- this.isToday = function (date) {
2035
- var today = new Date();
2036
- return (date === null || date === void 0 ? void 0 : date.getDate()) === (today === null || today === void 0 ? void 0 : today.getDate()) &&
2037
- (date === null || date === void 0 ? void 0 : date.getMonth()) === (today === null || today === void 0 ? void 0 : today.getMonth()) &&
2038
- (date === null || date === void 0 ? void 0 : date.getFullYear()) === (today === null || today === void 0 ? void 0 : today.getFullYear());
2039
- };
2040
- this.isYesterday = function (date) {
2041
- var _a, _b;
2042
- var yesterday = new Date((_a = new Date()) === null || _a === void 0 ? void 0 : _a.setDate(((_b = new Date()) === null || _b === void 0 ? void 0 : _b.getDate()) - 1));
2043
- return (date === null || date === void 0 ? void 0 : date.getDate()) === (yesterday === null || yesterday === void 0 ? void 0 : yesterday.getDate()) &&
2044
- (date === null || date === void 0 ? void 0 : date.getMonth()) === (yesterday === null || yesterday === void 0 ? void 0 : yesterday.getMonth()) &&
2045
- (date === null || date === void 0 ? void 0 : date.getFullYear()) === (yesterday === null || yesterday === void 0 ? void 0 : yesterday.getFullYear());
2046
- };
2047
- this.isTomorrow = function (date) {
2048
- var _a, _b;
2049
- var tomorrow = new Date((_a = new Date()) === null || _a === void 0 ? void 0 : _a.setDate(((_b = new Date()) === null || _b === void 0 ? void 0 : _b.getDate()) + 1));
2050
- return (date === null || date === void 0 ? void 0 : date.getDate()) === (tomorrow === null || tomorrow === void 0 ? void 0 : tomorrow.getDate()) &&
2051
- (date === null || date === void 0 ? void 0 : date.getMonth()) === (tomorrow === null || tomorrow === void 0 ? void 0 : tomorrow.getMonth()) &&
2052
- (date === null || date === void 0 ? void 0 : date.getFullYear()) === (tomorrow === null || tomorrow === void 0 ? void 0 : tomorrow.getFullYear());
2053
- };
2054
- this._datePipe = new i1.DatePipe(this._localeId);
2055
- }
2056
- BbRelativeTime.prototype.transform = function (value) {
2057
- // Parse the value to a date object.
2058
- var date = this.parseAsDate(value);
2059
- // Check if the date is valid.
2060
- if (!this.isValidDate(date)) {
2061
- return value;
2062
- }
2063
- // Return the formatted date.
2064
- return this.format(date);
2065
- };
2066
- BbRelativeTime.prototype.format = function (date) {
2067
- // It happens tomorrow.
2068
- if (this.isTomorrow(date)) {
2069
- return this.formatString(date, 'times.tomorrow_at', 'shortTime');
2070
- }
2071
- // It happened today.
2072
- if (this.isToday(date)) {
2073
- return this.formatString(date, 'times.today_at', 'shortTime');
2074
- }
2075
- // It happened yesterday.
2076
- if (this.isYesterday(date)) {
2077
- return this.formatString(date, 'times.yesterday_at', 'shortTime');
2078
- }
2079
- // Just return the date.
2080
- return this.formatString(date);
2081
- };
2082
- BbRelativeTime.prototype.formatString = function (date, token, format) {
2083
- // Just return the parsed date.
2084
- if (!this._localize || !token || !format) {
2085
- return this._datePipe.transform(date, 'mediumDate');
2086
- }
2087
- // Return the translated formatting.
2088
- return this._localize.translate({
2089
- token: token,
2090
- data: { date: this._datePipe.transform(date, format) }
2091
- });
2092
- };
2093
- return BbRelativeTime;
2094
- }());
2095
- BbRelativeTime.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbRelativeTime, deps: [{ token: i4__namespace.Localize, optional: true }, { token: i0.LOCALE_ID }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
2096
- BbRelativeTime.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbRelativeTime, name: "bbRelativeTime" });
2097
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbRelativeTime, decorators: [{
2098
- type: i0.Pipe,
2099
- args: [{
2100
- name: 'bbRelativeTime'
2101
- }]
2102
- }], ctorParameters: function () {
2103
- return [{ type: i4__namespace.Localize, decorators: [{
2104
- type: i0.Optional
2105
- }] }, { type: undefined, decorators: [{
2106
- type: i0.Inject,
2107
- args: [i0.LOCALE_ID]
2108
- }] }];
2109
- } });
2110
-
2111
- var nextUniqueId = 0;
2112
- var BbCheckboxBase = /** @class */ (function () {
2113
- function BbCheckboxBase() {
2114
- }
2115
- return BbCheckboxBase;
2116
- }());
2117
- var BbCheckboxMixinBase = i1$1.mixinDisabled(i1$1.mixinGrouped(BbCheckboxBase));
2118
- var BbCheckbox = /** @class */ (function (_super) {
2119
- __extends(BbCheckbox, _super);
2120
- function BbCheckbox(_changeDetection) {
2121
- var _this = _super.call(this) || this;
2122
- _this._changeDetection = _changeDetection;
2123
- // Data.
2124
- _this.labelId = "bb-checkbox-" + nextUniqueId++;
2125
- _this._checked = false;
2126
- // Methods.
2127
- _this.onChange = function () {
2128
- };
2129
- _this.onTouched = function () {
2130
- };
2131
- return _this;
2132
- }
2133
- Object.defineProperty(BbCheckbox.prototype, "checked", {
2134
- get: function () {
2135
- return this._checked;
2136
- },
2137
- set: function (value) {
2138
- this._checked = i1$1.coerceBooleanProperty(value);
2139
- this._changeDetection.markForCheck();
2140
- },
2141
- enumerable: false,
2142
- configurable: true
2143
- });
2144
- BbCheckbox.prototype.registerOnChange = function (fn) {
2145
- this.onChange = fn;
2146
- };
2147
- BbCheckbox.prototype.registerOnTouched = function (fn) {
2148
- this.onTouched = fn;
2149
- };
2150
- BbCheckbox.prototype.setDisabledState = function (isDisabled) {
2151
- this.disabled = isDisabled;
2152
- this._changeDetection.markForCheck();
2153
- };
2154
- BbCheckbox.prototype.writeValue = function (newValue) {
2155
- this.checked = newValue;
2156
- };
2157
- BbCheckbox.prototype.onInteractionEvent = function (event) {
2158
- // Stop the propagation to prevent it from bubbling up.
2159
- event.stopPropagation();
2160
- };
2161
- BbCheckbox.prototype.onInputClick = function (event) {
2162
- // Stop the propagation to prevent it from bubbling up.
2163
- event.stopPropagation();
2164
- // Toggle the value.
2165
- this.checked = !this.checked;
2166
- // Emit the change event.
2167
- this.onChange && this.onChange(this.checked);
2168
- };
2169
- return BbCheckbox;
2170
- }(BbCheckboxMixinBase));
2171
- BbCheckbox.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbCheckbox, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
2172
- BbCheckbox.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbCheckbox, selector: "bb-checkbox", inputs: { grouped: "grouped", disabled: "disabled", tabIndex: "tabIndex", checked: "checked" }, host: { properties: { "class.grouped": "grouped" }, classAttribute: "bb-checkbox" }, providers: [
2173
- { provide: i5.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return BbCheckbox; }), multi: true }
2174
- ], usesInheritance: true, ngImport: i0__namespace, template: "<input [id]=\"labelId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n class=\"bb-checkbox-input\"\n tabindex=\"-1\"\n type=\"checkbox\">\n\n<label [for]=\"labelId\"\n [attr.tabindex]=\"disabled ? -1 : (tabIndex || 0)\"\n (keyup.space)=\"onInputClick($event)\"\n class=\"bb-checkbox-label\">\n <span>\n <svg width=\"12px\"\n height=\"10px\"\n viewbox=\"0 0 12 10\">\n <polyline points=\"1.5 6 4.5 9 10.5 1\"></polyline>\n </svg>\n </span>\n <span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".bb-checkbox{display:block}.bb-checkbox+.bb-checkbox{margin-top:5px}.bb-checkbox.grouped{margin-bottom:20px}.bb-checkbox-input{display:none}.bb-checkbox-label{margin:0;display:flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-checkbox-label>span{display:inline-block;vertical-align:middle;transform:translate(0)}.bb-checkbox-label>span:first-child{width:18px;height:18px;min-width:18px;min-height:18px;position:relative;border-radius:3px;vertical-align:middle;border:1px solid #bdc4c9;transition:all .2s ease}.bb-checkbox-label>span:last-child{padding-left:8px}.bb-checkbox-label>span:first-child>svg{top:3px;left:2px;fill:none;stroke:#fff;stroke-width:2;position:absolute;stroke-linecap:round;transition-delay:.1s;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all .3s ease;transform:translate(0)}.bb-checkbox-input:not(:disabled):not(:checked)+.bb-checkbox-label:focus>span:first-child{box-shadow:0 0 0 3px #decdcd80}.bb-checkbox-input:not(:disabled):checked+.bb-checkbox-label:focus>span:first-child{box-shadow:0 0 0 3px #5b53ff80}.bb-checkbox-input:checked+.bb-checkbox-label>span:first-child{border-color:#5b53ff;background-color:#5b53ff}.bb-checkbox-input:checked+.bb-checkbox-label>span:first-child>svg{stroke-dashoffset:0}.bb-checkbox-input:disabled+.bb-checkbox-label{cursor:default;pointer-events:none}.bb-checkbox-input:disabled:checked+.bb-checkbox-label>span:first-child{border-color:#cccccca3;background-color:#cccccca3}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
2175
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbCheckbox, decorators: [{
2176
- type: i0.Component,
2177
- args: [{
2178
- selector: 'bb-checkbox',
2179
- templateUrl: './checkbox.component.html',
2180
- styleUrls: ['./checkbox.component.scss'],
2181
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2182
- encapsulation: i0.ViewEncapsulation.None,
2183
- providers: [
2184
- { provide: i5.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return BbCheckbox; }), multi: true }
2185
- ],
2186
- host: {
2187
- 'class': 'bb-checkbox',
2188
- '[class.grouped]': 'grouped'
2189
- },
2190
- inputs: ['grouped', 'disabled'],
2191
- preserveWhitespaces: false
2192
- }]
2193
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { tabIndex: [{
2194
- type: i0.Input
2195
- }], checked: [{
2196
- type: i0.Input
2197
- }] } });
2198
-
2199
- var BbFocus = /** @class */ (function () {
2200
- function BbFocus(_zone, _platform, _elementRef) {
2201
- this._zone = _zone;
2202
- this._platform = _platform;
2203
- this._elementRef = _elementRef;
2204
- }
2205
- Object.defineProperty(BbFocus.prototype, "nativeElement", {
2206
- get: function () {
2207
- return this._elementRef.nativeElement;
2208
- },
2209
- enumerable: false,
2210
- configurable: true
2211
- });
2212
- BbFocus.prototype.ngAfterViewInit = function () {
2213
- var _this = this;
2214
- // Run the method outside the Angular zone.
2215
- this._zone.runOutsideAngular(function () { return _this.focus(); });
2216
- };
2217
- BbFocus.prototype.focus = function () {
2218
- var _this = this;
2219
- // Check if set timeout exists and the user is
2220
- // using the site on desktop devices.
2221
- if (!this._platform.isDesktop || !setTimeout) {
2222
- return;
2223
- }
2224
- // Check if the element and the focus method exist, if so focus the element.
2225
- if (!this.nativeElement || !this.nativeElement.focus) {
2226
- return;
2227
- }
2228
- // Execute the focus method in a timeout.
2229
- setTimeout(function () { return _this.nativeElement.focus(); }, 0);
2230
- };
2231
- return BbFocus;
2232
- }());
2233
- BbFocus.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFocus, deps: [{ token: i0__namespace.NgZone }, { token: i1__namespace$1.Platform }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2234
- BbFocus.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.11", type: BbFocus, selector: "[bbFocus]", ngImport: i0__namespace });
2235
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbFocus, decorators: [{
2236
- type: i0.Directive,
2237
- args: [{
2238
- selector: '[bbFocus]'
2239
- }]
2240
- }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i1__namespace$1.Platform }, { type: i0__namespace.ElementRef }]; } });
2241
-
2242
- var BbAvatar = /** @class */ (function () {
2243
- function BbAvatar() {
2244
- // Inputs.
2245
- this.size = 40;
2246
- // State.
2247
- this.state$ = new rxjs.BehaviorSubject('initials');
2248
- // Data.
2249
- this._src = null;
2250
- this._title = null;
2251
- this._initials = '!';
2252
- this._color = 'rgb(255, 255, 255)';
2253
- this._backgroundColor = 'rgb(66, 66, 66)';
2254
- this.toRGb = function (value) {
2255
- var baseRed = 128;
2256
- var baseGreen = 128;
2257
- var baseBlue = 128;
2258
- var seed = value.charCodeAt(0) ^ value.charCodeAt(1);
2259
- var rand_1 = Math.abs((Math.sin(seed++) * 10000)) % 256;
2260
- var rand_2 = Math.abs((Math.sin(seed++) * 10000)) % 256;
2261
- var rand_3 = Math.abs((Math.sin(seed++) * 10000)) % 256;
2262
- var r = Math.round((rand_1 + baseRed) / 2);
2263
- var g = Math.round((rand_2 + baseGreen) / 2);
2264
- var b = Math.round((rand_3 + baseBlue) / 2);
2265
- return { r: r, g: g, b: b };
2266
- };
2267
- this.getInitials = function (name) {
2268
- // Get all the initials.
2269
- var names = (name || '').split(' ');
2270
- var initials = names.map(function (name) { return name.charAt(0).toUpperCase(); });
2271
- // Check if there are any initials.
2272
- if (initials.length <= 0) {
2273
- return null;
2274
- }
2275
- // Get the first and last initials.
2276
- if (initials.length > 1) {
2277
- return "" + initials[0] + initials[initials.length - 1];
2278
- }
2279
- // Get only the first initial.
2280
- return initials[0];
2281
- };
2282
- this.parseColorFormat = function (value) {
2283
- var _a;
2284
- // Hex 3 values.
2285
- var match = value.match(/^#([0-9a-f]{3})$/i);
2286
- if (match && match[1]) {
2287
- var r = parseInt(match[1].charAt(0), 16) * 0x11;
2288
- var g = parseInt(match[1].charAt(1), 16) * 0x11;
2289
- var b = parseInt(match[1].charAt(2), 16) * 0x11;
2290
- return { r: r, g: g, b: b };
2291
- }
2292
- // Hex 6 values.
2293
- match = value.match(/^#([0-9a-f]{6})$/i);
2294
- if (match && match[1]) {
2295
- var r = parseInt(match[1].substr(0, 2), 16);
2296
- var g = parseInt(match[1].substr(2, 2), 16);
2297
- var b = parseInt(match[1].substr(4, 2), 16);
2298
- return { r: r, g: g, b: b };
2299
- }
2300
- // Rgb values.
2301
- match = value.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);
2302
- if (match) {
2303
- var r = parseInt(match[1], 10);
2304
- var g = parseInt(match[2], 10);
2305
- var b = parseInt(match[3], 10);
2306
- return { r: r, g: g, b: b };
2307
- }
2308
- // Not a supported color format.
2309
- (_a = console === null || console === void 0 ? void 0 : console.warn) === null || _a === void 0 ? void 0 : _a.call(console, "BbAvatar: Unsupported tintColor \"" + value + "\" was used.");
2310
- return null;
2311
- };
2312
- }
2313
- Object.defineProperty(BbAvatar.prototype, "src", {
2314
- get: function () {
2315
- return this._src;
2316
- },
2317
- set: function (value) {
2318
- this._src = value;
2319
- if (this._src) {
2320
- this.state$.next('image');
2321
- }
2322
- },
2323
- enumerable: false,
2324
- configurable: true
2325
- });
2326
- Object.defineProperty(BbAvatar.prototype, "title", {
2327
- get: function () {
2328
- return this._title;
2329
- },
2330
- set: function (value) {
2331
- // Set the title and the initials.
2332
- this._title = value || '!';
2333
- this._initials = this.getInitials(this._title);
2334
- // Generate the colors based on the name.
2335
- var _b = this.toRGb(this._title), r = _b.r, g = _b.g, b = _b.b;
2336
- this.setColors(r, g, b);
2337
- },
2338
- enumerable: false,
2339
- configurable: true
2340
- });
2341
- Object.defineProperty(BbAvatar.prototype, "tintColor", {
2342
- set: function (value) {
2343
- var result = this.parseColorFormat(value);
2344
- if (!result) {
2345
- return;
2346
- }
2347
- var r = result.r, g = result.g, b = result.b;
2348
- this.setColors(r, g, b);
2349
- },
2350
- enumerable: false,
2351
- configurable: true
2352
- });
2353
- Object.defineProperty(BbAvatar.prototype, "color", {
2354
- get: function () {
2355
- return this._color;
2356
- },
2357
- enumerable: false,
2358
- configurable: true
2359
- });
2360
- Object.defineProperty(BbAvatar.prototype, "backgroundColor", {
2361
- get: function () {
2362
- return this._backgroundColor;
2363
- },
2364
- enumerable: false,
2365
- configurable: true
2366
- });
2367
- Object.defineProperty(BbAvatar.prototype, "initials", {
2368
- get: function () {
2369
- return this._initials;
2370
- },
2371
- enumerable: false,
2372
- configurable: true
2373
- });
2374
- BbAvatar.prototype.setColors = function (red, green, blue) {
2375
- this._color = "rgb(" + red + "," + green + "," + blue + ")";
2376
- this._backgroundColor = "rgba(" + red + "," + green + "," + blue + ", 0.25)";
2377
- };
2378
- return BbAvatar;
2379
- }());
2380
- BbAvatar.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbAvatar, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2381
- BbAvatar.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbAvatar, selector: "bb-avatar", inputs: { size: "size", src: "src", title: "title", tintColor: "tintColor" }, host: { attributes: { "role": "img" }, properties: { "style.width.px": "size", "style.height.px": "size", "style.font-size.px": "size / 2", "style.color": "color", "style.background-color": "backgroundColor", "attr.title": "this.title" }, classAttribute: "bb-avatar" }, ngImport: i0__namespace, template: "<ng-container [ngSwitch]=\"state$ | async\">\n <!-- Image. -->\n <ng-container *ngSwitchCase=\"'image'\">\n <img [src]=\"src\"\n [alt]=\"initials\"\n (error)=\"state$?.next('initials')\"\n class=\"bb-avatar-image\">\n </ng-container>\n\n <!-- Default initials fallback. -->\n <ng-container *ngSwitchDefault>\n {{ initials }}\n </ng-container>\n</ng-container>\n", styles: [".bb-avatar{line-height:1;font-size:18px;overflow:hidden;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border-radius:50%;align-items:center;display:inline-flex;justify-content:center}.bb-avatar.rounded{border-radius:4px}.bb-avatar.square{border-radius:0}.bb-avatar-image{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;position:absolute}\n"], directives: [{ type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
2382
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbAvatar, decorators: [{
2383
- type: i0.Component,
2384
- args: [{
2385
- selector: 'bb-avatar',
2386
- templateUrl: './avatar.component.html',
2387
- styleUrls: ['./avatar.component.scss'],
2388
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2389
- encapsulation: i0.ViewEncapsulation.None,
2390
- preserveWhitespaces: false,
2391
- host: {
2392
- 'class': 'bb-avatar',
2393
- 'role': 'img',
2394
- '[style.width.px]': 'size',
2395
- '[style.height.px]': 'size',
2396
- '[style.font-size.px]': 'size / 2',
2397
- '[style.color]': 'color',
2398
- '[style.background-color]': 'backgroundColor'
2399
- }
2400
- }]
2401
- }], propDecorators: { size: [{
2402
- type: i0.Input
2403
- }], src: [{
2404
- type: i0.Input
2405
- }], title: [{
2406
- type: i0.Input
2407
- }, {
2408
- type: i0.HostBinding,
2409
- args: ['attr.title']
2410
- }], tintColor: [{
2411
- type: i0.Input
2412
- }] } });
2413
-
2414
- var BbIcon = /** @class */ (function () {
2415
- function BbIcon(_registry) {
2416
- this._registry = _registry;
2417
- // Data.
2418
- this._src = null;
2419
- // State.
2420
- this.state$ = new rxjs.BehaviorSubject(null);
2421
- this.alt = null;
2422
- this.size = 24;
2423
- this._ariaHidden = true;
2424
- this.warn = function (content) {
2425
- return console && console.warn && console.warn(content);
2426
- };
2427
- }
2428
- Object.defineProperty(BbIcon.prototype, "src", {
2429
- get: function () {
2430
- return this._src;
2431
- },
2432
- set: function (newValue) {
2433
- this.state$.next(this.convert(newValue));
2434
- this._src = newValue;
2435
- },
2436
- enumerable: false,
2437
- configurable: true
2438
- });
2439
- Object.defineProperty(BbIcon.prototype, "ariaHidden", {
2440
- get: function () {
2441
- return this._ariaHidden;
2442
- },
2443
- set: function (newValue) {
2444
- this._ariaHidden = i1$1.coerceBooleanProperty(newValue);
2445
- },
2446
- enumerable: false,
2447
- configurable: true
2448
- });
2449
- BbIcon.prototype.convert = function (src) {
2450
- var _this = this;
2451
- var _a = __read((src || '').split(':'), 2), namespace = _a[0], value = _a[1];
2452
- var onError = function () {
2453
- _this.warn("ElementsModule: The icon with src \"" + src + "\" could not be rendered correctly; Did you put a correct src attribute?");
2454
- return { type: 'unknown' };
2455
- };
2456
- if (!namespace || !value || !this._registry) {
2457
- return onError();
2458
- }
2459
- // Try to find a image icon.
2460
- var imageIcon = this.findImageIcon(namespace, value);
2461
- if (imageIcon) {
2462
- return imageIcon;
2463
- }
2464
- // Try to find a font icon.
2465
- var fontIcon = this.findFontIcon(namespace, value);
2466
- if (fontIcon) {
2467
- return fontIcon;
2468
- }
2469
- // Return the on error function.
2470
- return onError();
2471
- };
2472
- BbIcon.prototype.findImageIcon = function (namespace, value) {
2473
- var data = this._registry.find(function (item) { return item['namespace'] === namespace && item['name'] === value; });
2474
- if (!data) {
2475
- return null;
2476
- }
2477
- return { type: data['type'], src: data['src'] };
2478
- };
2479
- BbIcon.prototype.findFontIcon = function (namespace, content) {
2480
- var data = this._registry.find(function (item) { return item['namespace'] === namespace; });
2481
- if (!data) {
2482
- return null;
2483
- }
2484
- var uses = data['uses'];
2485
- if (uses === 'data-attribute') {
2486
- return { type: data['type'], className: data['className'], attribute: content };
2487
- }
2488
- return { type: data['type'], className: data['className'], content: content };
2489
- };
2490
- return BbIcon;
2491
- }());
2492
- BbIcon.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbIcon, deps: [{ token: ELEMENTS_ICONS, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
2493
- BbIcon.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbIcon, selector: "bb-icon", inputs: { alt: "alt", size: "size", src: "src", ariaHidden: "ariaHidden" }, host: { properties: { "attr.aria-hidden": "ariaHidden", "style.width.px": "size", "style.height.px": "size", "style.min-width.px": "size", "style.min-height.px": "size", "style.font-size.px": "size" }, classAttribute: "bb-icon" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as data\"\n [ngSwitch]=\"data?.type\">\n <i *ngSwitchCase=\"'font'\"\n [attr.data-icon]=\"data?.attribute\"\n [class]=\"data?.className\">\n {{ data?.content }}\n </i>\n <img *ngSwitchCase=\"'image'\"\n [src]=\"data?.src\"\n [alt]=\"alt\">\n <svg *ngSwitchCase=\"'unknown'\"\n viewBox=\"0 0 1 1\">\n <rect x=\"0\" y=\"0\" width=\"1\" height=\"1\" fill=\"#c5c5c5\"></rect>\n </svg>\n</ng-container>\n", styles: [".bb-icon{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center}.bb-icon>i{font-size:inherit}.bb-icon>img,.bb-icon>svg{width:100%;height:100%;display:flex}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "async": i1__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
2494
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbIcon, decorators: [{
2495
- type: i0.Component,
2496
- args: [{
2497
- selector: 'bb-icon',
2498
- templateUrl: './icon.component.html',
2499
- styleUrls: ['./icon.component.scss'],
2500
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2501
- encapsulation: i0.ViewEncapsulation.None,
2502
- host: {
2503
- 'class': 'bb-icon',
2504
- '[attr.aria-hidden]': 'ariaHidden',
2505
- '[style.width.px]': 'size',
2506
- '[style.height.px]': 'size',
2507
- '[style.min-width.px]': 'size',
2508
- '[style.min-height.px]': 'size',
2509
- '[style.font-size.px]': 'size'
2510
- },
2511
- preserveWhitespaces: false
2512
- }]
2513
- }], ctorParameters: function () {
2514
- return [{ type: undefined, decorators: [{
2515
- type: i0.Optional
2516
- }, {
2517
- type: i0.Inject,
2518
- args: [ELEMENTS_ICONS]
2519
- }] }];
2520
- }, propDecorators: { alt: [{
2521
- type: i0.Input
2522
- }], size: [{
2523
- type: i0.Input
2524
- }], src: [{
2525
- type: i0.Input
2526
- }], ariaHidden: [{
2527
- type: i0.Input
2528
- }] } });
2529
-
2530
- var BbTag = /** @class */ (function () {
2531
- function BbTag() {
2532
- // Outputs.
2533
- this.onClose = new i0.EventEmitter();
2534
- }
2535
- return BbTag;
2536
- }());
2537
- BbTag.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbTag, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2538
- BbTag.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.11", type: BbTag, selector: "bb-tag", outputs: { onClose: "onClose" }, host: { classAttribute: "bb-tag" }, ngImport: i0__namespace, template: "<ng-content></ng-content>\n\n<button *ngIf=\"onClose?.observers?.length > 0\"\n (click)=\"onClose.emit()\"\n type=\"button\">\n Close\n</button>", styles: [".bb-tag{cursor:default;padding:0 7px;font-size:12px;list-style:none;line-height:20px;border-radius:4px;white-space:nowrap;display:inline-block;color:#000000a6;border:1px solid #d9d9d9;background-color:#fafafa;font-variant:tabular-nums;font-feature-settings:\"tnum\"}.bb-tag:not(:last-child){margin-right:8px}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
2539
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: BbTag, decorators: [{
2540
- type: i0.Component,
2541
- args: [{
2542
- selector: 'bb-tag',
2543
- templateUrl: './tag.component.html',
2544
- styleUrls: ['./tag.component.scss'],
2545
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2546
- encapsulation: i0.ViewEncapsulation.None,
2547
- preserveWhitespaces: false,
2548
- host: { 'class': 'bb-tag' }
2549
- }]
2550
- }], propDecorators: { onClose: [{
2551
- type: i0.Output
2552
- }] } });
2553
-
2554
- var DECLARATIONS_EXPORTS = [
2555
- // Directives.
2556
- BbTemplate,
2557
- BbFormError,
2558
- BbFormSubmit,
2559
- BbInput,
2560
- BbSelect,
2561
- BbFocus,
2562
- BbFocusTrap,
2563
- BbAutosize,
2564
- BbPrefix,
2565
- BbSuffix,
2566
- // Pipes.
2567
- BbFileSize,
2568
- BbFileImage,
2569
- BbRelativeTime,
2570
- // Components.
2571
- BbButton,
2572
- BbAnchor,
2573
- BbSpinner,
2574
- BbIcon,
2575
- BbFormControl,
2576
- BbFormGroup,
2577
- BbCheckbox,
2578
- BbDropdown,
2579
- BbDropdownItem,
2580
- BbTag,
2581
- BbAvatar,
2582
- BbFilePicker,
2583
- BbImagePicker,
2584
- BbDatePicker
2585
- ];
2586
- var ElementsModule = /** @class */ (function () {
2587
- function ElementsModule() {
2588
- }
2589
- ElementsModule.forRoot = function () {
2590
- return {
2591
- ngModule: ElementsModule,
2592
- providers: [
2593
- { provide: ELEMENTS_ERRORS, useFactory: getErrors, multi: true },
2594
- ELEMENTS_MATERIAL_ICON
2595
- ]
2596
- };
2597
- };
2598
- return ElementsModule;
2599
- }());
2600
- ElementsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: ElementsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2601
- ElementsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: ElementsModule, declarations: [
2602
- // Directives.
2603
- BbTemplate,
2604
- BbFormError,
2605
- BbFormSubmit,
2606
- BbInput,
2607
- BbSelect,
2608
- BbFocus,
2609
- BbFocusTrap,
2610
- BbAutosize,
2611
- BbPrefix,
2612
- BbSuffix,
2613
- // Pipes.
2614
- BbFileSize,
2615
- BbFileImage,
2616
- BbRelativeTime,
2617
- // Components.
2618
- BbButton,
2619
- BbAnchor,
2620
- BbSpinner,
2621
- BbIcon,
2622
- BbFormControl,
2623
- BbFormGroup,
2624
- BbCheckbox,
2625
- BbDropdown,
2626
- BbDropdownItem,
2627
- BbTag,
2628
- BbAvatar,
2629
- BbFilePicker,
2630
- BbImagePicker,
2631
- BbDatePicker
2632
- ], imports: [i1.CommonModule, i5.ReactiveFormsModule, i4.LocalizeModule], exports: [
2633
- // Directives.
2634
- BbTemplate,
2635
- BbFormError,
2636
- BbFormSubmit,
2637
- BbInput,
2638
- BbSelect,
2639
- BbFocus,
2640
- BbFocusTrap,
2641
- BbAutosize,
2642
- BbPrefix,
2643
- BbSuffix,
2644
- // Pipes.
2645
- BbFileSize,
2646
- BbFileImage,
2647
- BbRelativeTime,
2648
- // Components.
2649
- BbButton,
2650
- BbAnchor,
2651
- BbSpinner,
2652
- BbIcon,
2653
- BbFormControl,
2654
- BbFormGroup,
2655
- BbCheckbox,
2656
- BbDropdown,
2657
- BbDropdownItem,
2658
- BbTag,
2659
- BbAvatar,
2660
- BbFilePicker,
2661
- BbImagePicker,
2662
- BbDatePicker
2663
- ] });
2664
- ElementsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: ElementsModule, imports: [[i1.CommonModule, i5.ReactiveFormsModule, i4.LocalizeModule]] });
2665
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.11", ngImport: i0__namespace, type: ElementsModule, decorators: [{
2666
- type: i0.NgModule,
2667
- args: [{
2668
- imports: [i1.CommonModule, i5.ReactiveFormsModule, i4.LocalizeModule],
2669
- declarations: __spreadArray([], __read(DECLARATIONS_EXPORTS)),
2670
- exports: __spreadArray([], __read(DECLARATIONS_EXPORTS))
2671
- }]
2672
- }] });
2673
- var ELEMENTS_MATERIAL_ICON = {
2674
- provide: ELEMENTS_ICONS,
2675
- useValue: { namespace: 'material', className: 'material-icons', uses: 'content', type: 'font' },
2676
- multi: true
2677
- };
2678
- function getErrors() {
2679
- var data = {
2680
- unknown: function () { return 'form-control-errors.unknown'; },
2681
- required: function () { return 'form-control-errors.required'; },
2682
- pattern: function () { return 'form-control-errors.pattern'; },
2683
- email: function () { return 'form-control-errors.email'; },
2684
- emailTaken: function () { return 'form-control-errors.emailTaken'; },
2685
- passwordMatch: function () { return 'form-control-errors.passwordMatch'; },
2686
- confirm: function () { return 'form-control-errors.confirm'; },
2687
- fullNumber: function () { return 'form-control-errors.fullNumber'; },
2688
- min: function (_a) {
2689
- var min = _a.min;
2690
- return ({ token: 'form-control-errors.min', data: { min: min } });
2691
- },
2692
- max: function (_a) {
2693
- var max = _a.max;
2694
- return ({ token: 'form-control-errors.max', data: { max: max } });
2695
- },
2696
- maxFileSize: function (_a) {
2697
- var maxSize = _a.maxSize;
2698
- return ({ token: 'form-control-errors.maxFileSize', data: { maxSize: maxSize } });
2699
- },
2700
- minDate: function (_a) {
2701
- var date = _a.date;
2702
- return ({ token: 'form-control-errors.minDate', data: { date: date } });
2703
- },
2704
- maxDate: function (_a) {
2705
- var date = _a.date;
2706
- return ({ token: 'form-control-errors.maxDate', data: { date: date } });
2707
- },
2708
- invalidDate: function () { return 'form-control-errors.invalidDate'; },
2709
- invalidFileType: function () { return 'form-control-errors.invalidFileType'; },
2710
- minlength: function (_a) {
2711
- var requiredLength = _a.requiredLength, actualLength = _a.actualLength;
2712
- return ({
2713
- token: 'form-control-errors.minlength',
2714
- data: { requiredLength: requiredLength, actualLength: actualLength }
2715
- });
2716
- },
2717
- maxlength: function (_a) {
2718
- var requiredLength = _a.requiredLength, actualLength = _a.actualLength;
2719
- return ({
2720
- token: 'form-control-errors.maxlength',
2721
- data: { requiredLength: requiredLength, actualLength: actualLength }
2722
- });
2723
- }
2724
- };
2725
- return data;
2726
- }
2727
-
2728
- /**
2729
- * Generated bundle index. Do not edit.
2730
- */
2731
-
2732
- exports.BbAnchor = BbAnchor;
2733
- exports.BbAutosize = BbAutosize;
2734
- exports.BbAvatar = BbAvatar;
2735
- exports.BbButton = BbButton;
2736
- exports.BbCheckbox = BbCheckbox;
2737
- exports.BbDatePicker = BbDatePicker;
2738
- exports.BbDropdown = BbDropdown;
2739
- exports.BbDropdownItem = BbDropdownItem;
2740
- exports.BbFileImage = BbFileImage;
2741
- exports.BbFilePicker = BbFilePicker;
2742
- exports.BbFileSize = BbFileSize;
2743
- exports.BbFocus = BbFocus;
2744
- exports.BbFocusTrap = BbFocusTrap;
2745
- exports.BbFormControl = BbFormControl;
2746
- exports.BbFormError = BbFormError;
2747
- exports.BbFormGroup = BbFormGroup;
2748
- exports.BbFormSubmit = BbFormSubmit;
2749
- exports.BbIcon = BbIcon;
2750
- exports.BbImagePicker = BbImagePicker;
2751
- exports.BbInput = BbInput;
2752
- exports.BbPrefix = BbPrefix;
2753
- exports.BbRelativeTime = BbRelativeTime;
2754
- exports.BbSelect = BbSelect;
2755
- exports.BbSpinner = BbSpinner;
2756
- exports.BbSuffix = BbSuffix;
2757
- exports.BbTag = BbTag;
2758
- exports.BbTemplate = BbTemplate;
2759
- exports.ELEMENTS_ERRORS = ELEMENTS_ERRORS;
2760
- exports.ELEMENTS_ICONS = ELEMENTS_ICONS;
2761
- exports.ELEMENTS_MATERIAL_ICON = ELEMENTS_MATERIAL_ICON;
2762
- exports.ElementsModule = ElementsModule;
2763
- exports.getErrors = getErrors;
2764
-
2765
- Object.defineProperty(exports, '__esModule', { value: true });
2766
-
2767
- }));
2768
- //# sourceMappingURL=bravobit-bb-foundation-elements.umd.js.map