@bravobit/bb-foundation 0.21.6 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/auth/lib/auth.interceptor.d.ts +1 -1
  2. package/auth/lib/auth.module.d.ts +4 -5
  3. package/auth/lib/auth.service.d.ts +4 -7
  4. package/auth/lib/directives/abstract.directive.d.ts +12 -0
  5. package/auth/lib/directives/authenticated.directive.d.ts +7 -4
  6. package/auth/lib/directives/permission.directive.d.ts +11 -11
  7. package/auth/lib/guards/anonymous.guard.d.ts +8 -5
  8. package/auth/lib/guards/authenticated.guard.d.ts +8 -5
  9. package/auth/lib/guards/permission.guard.d.ts +15 -0
  10. package/auth/lib/interfaces/config.interface.d.ts +14 -8
  11. package/auth/lib/interfaces/permission.interface.d.ts +6 -0
  12. package/auth/lib/interfaces/provider.interface.d.ts +10 -3
  13. package/auth/lib/permissions/permissions.handler.d.ts +9 -0
  14. package/auth/lib/permissions/permissions.service.d.ts +16 -0
  15. package/auth/lib/providers/email.provider.d.ts +2 -8
  16. package/auth/lib/providers/verify.provider.d.ts +2 -6
  17. package/auth/public_api.d.ts +4 -4
  18. package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +5 -1
  19. package/controls/lib/control-error/control-error/control-error.animation.d.ts +1 -0
  20. package/controls/lib/control-error/control-error/control-error.component.d.ts +17 -0
  21. package/controls/lib/control-error/control-error-submit.directive.d.ts +15 -0
  22. package/controls/lib/control-error/control-error.defaults.d.ts +2 -0
  23. package/controls/lib/control-error/control-error.interface.d.ts +12 -0
  24. package/controls/lib/control-error/control-error.module.d.ts +9 -0
  25. package/controls/lib/controls.interfaces.d.ts +4 -0
  26. package/controls/lib/controls.module.d.ts +7 -2
  27. package/controls/lib/form-control/form-control/form-control.component.d.ts +31 -0
  28. package/controls/lib/form-control/form-control-addon/form-control-addon.component.d.ts +6 -0
  29. package/controls/lib/form-control/form-control-input.directive.d.ts +35 -0
  30. package/controls/lib/form-control/form-control.module.d.ts +11 -0
  31. package/controls/public_api.d.ts +9 -0
  32. package/dashboard/lib/dashboard/dashboard.component.d.ts +2 -1
  33. package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +10 -5
  34. package/dialog/lib/dialog-container/dialog-container.animations.d.ts +1 -0
  35. package/dialog/lib/dialog-container/dialog-container.component.d.ts +5 -7
  36. package/dialog/lib/dialog-header/dialog-header.component.d.ts +1 -3
  37. package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +7 -3
  38. package/dialog/lib/dialog-overlay/dialog-overlay.animations.d.ts +1 -0
  39. package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +5 -7
  40. package/dialog/lib/dialog.service.d.ts +4 -3
  41. package/elements/lib/directives/focus-trap.directive.d.ts +1 -1
  42. package/elements/lib/directives/focus.directive.d.ts +1 -3
  43. package/elements/lib/pipes/file-image.pipe.d.ts +2 -1
  44. package/esm2020/auth/lib/auth.interceptor.mjs +9 -12
  45. package/esm2020/auth/lib/auth.module.mjs +7 -17
  46. package/esm2020/auth/lib/auth.service.mjs +29 -55
  47. package/esm2020/auth/lib/directives/abstract.directive.mjs +40 -0
  48. package/esm2020/auth/lib/directives/authenticated.directive.mjs +25 -14
  49. package/esm2020/auth/lib/directives/permission.directive.mjs +24 -46
  50. package/esm2020/auth/lib/guards/anonymous.guard.mjs +28 -19
  51. package/esm2020/auth/lib/guards/authenticated.guard.mjs +31 -20
  52. package/esm2020/auth/lib/guards/permission.guard.mjs +53 -0
  53. package/esm2020/auth/lib/helpers/jwt.helper.mjs +7 -7
  54. package/esm2020/auth/lib/interfaces/config.interface.mjs +1 -1
  55. package/esm2020/auth/lib/interfaces/permission.interface.mjs +2 -0
  56. package/esm2020/auth/lib/interfaces/provider.interface.mjs +1 -1
  57. package/esm2020/auth/lib/permissions/permissions.handler.mjs +33 -0
  58. package/esm2020/auth/lib/permissions/permissions.service.mjs +64 -0
  59. package/esm2020/auth/lib/providers/email.provider.mjs +8 -9
  60. package/esm2020/auth/lib/providers/verify.provider.mjs +8 -5
  61. package/esm2020/auth/public_api.mjs +5 -5
  62. package/esm2020/collections/lib/collections.module.mjs +4 -4
  63. package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +3 -3
  64. package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +3 -3
  65. package/esm2020/collections/lib/components/collections.directive.mjs +12 -12
  66. package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +19 -6
  67. package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +4 -4
  68. package/esm2020/controls/lib/checkbox/checkbox.module.mjs +4 -4
  69. package/esm2020/controls/lib/control-error/control-error/control-error.animation.mjs +14 -0
  70. package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +63 -0
  71. package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +47 -0
  72. package/esm2020/controls/lib/control-error/control-error.defaults.mjs +26 -0
  73. package/esm2020/controls/lib/control-error/control-error.interface.mjs +3 -0
  74. package/esm2020/controls/lib/control-error/control-error.module.mjs +19 -0
  75. package/esm2020/controls/lib/controls.interfaces.mjs +2 -0
  76. package/esm2020/controls/lib/controls.module.mjs +45 -8
  77. package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +94 -0
  78. package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +22 -0
  79. package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +124 -0
  80. package/esm2020/controls/lib/form-control/form-control.module.mjs +33 -0
  81. package/esm2020/controls/public_api.mjs +10 -1
  82. package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +7 -6
  83. package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +3 -3
  84. package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +3 -3
  85. package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +3 -3
  86. package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +3 -3
  87. package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +3 -3
  88. package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +3 -3
  89. package/esm2020/dashboard/lib/dashboard.module.mjs +4 -4
  90. package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +3 -3
  91. package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +17 -11
  92. package/esm2020/dialog/lib/dialog-container/dialog-container.animations.mjs +29 -0
  93. package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +28 -104
  94. package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +7 -14
  95. package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +4 -4
  96. package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +29 -8
  97. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.animations.mjs +26 -0
  98. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +29 -84
  99. package/esm2020/dialog/lib/dialog.insertion.mjs +3 -3
  100. package/esm2020/dialog/lib/dialog.module.mjs +4 -4
  101. package/esm2020/dialog/lib/dialog.service.mjs +8 -7
  102. package/esm2020/elements/lib/avatar/avatar.component.mjs +8 -6
  103. package/esm2020/elements/lib/button/button.component.mjs +6 -6
  104. package/esm2020/elements/lib/checkbox/checkbox.component.mjs +3 -3
  105. package/esm2020/elements/lib/date-picker/date-picker.component.mjs +3 -3
  106. package/esm2020/elements/lib/directives/addon.directive.mjs +6 -6
  107. package/esm2020/elements/lib/directives/autosize.directive.mjs +3 -3
  108. package/esm2020/elements/lib/directives/focus-trap.directive.mjs +5 -5
  109. package/esm2020/elements/lib/directives/focus.directive.mjs +7 -9
  110. package/esm2020/elements/lib/directives/form-submit.directive.mjs +3 -3
  111. package/esm2020/elements/lib/directives/form-submitter.directive.mjs +3 -3
  112. package/esm2020/elements/lib/directives/input.directive.mjs +6 -6
  113. package/esm2020/elements/lib/directives/template.directive.mjs +3 -3
  114. package/esm2020/elements/lib/dropdown/dropdown.component.mjs +6 -6
  115. package/esm2020/elements/lib/elements.module.mjs +4 -4
  116. package/esm2020/elements/lib/file-picker/file-picker.component.mjs +3 -3
  117. package/esm2020/elements/lib/form-control/form-control.component.mjs +3 -3
  118. package/esm2020/elements/lib/form-error/form-error.component.mjs +3 -3
  119. package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
  120. package/esm2020/elements/lib/icon/icon.component.mjs +3 -3
  121. package/esm2020/elements/lib/image-picker/image-picker.component.mjs +3 -3
  122. package/esm2020/elements/lib/pipes/file-image.pipe.mjs +8 -7
  123. package/esm2020/elements/lib/pipes/file-size.pipe.mjs +3 -3
  124. package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +3 -3
  125. package/esm2020/elements/lib/spinner/spinner.component.mjs +3 -3
  126. package/esm2020/elements/lib/tag/tag.component.mjs +3 -3
  127. package/esm2020/http/lib/http.module.mjs +4 -4
  128. package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +3 -3
  129. package/esm2020/http/lib/interceptors/error.interceptor.mjs +3 -3
  130. package/esm2020/lib/core/services/clipboard.service.mjs +5 -5
  131. package/esm2020/lib/core/services/exif.service.mjs +5 -5
  132. package/esm2020/lib/core/services/file-loader.service.mjs +3 -3
  133. package/esm2020/lib/core/services/image-converter.service.mjs +5 -5
  134. package/esm2020/lib/core/services/languages.service.mjs +3 -3
  135. package/esm2020/lib/core/services/network.service.mjs +7 -7
  136. package/esm2020/lib/core/services/patch.service.mjs +7 -7
  137. package/esm2020/localize/lib/localize.module.mjs +4 -4
  138. package/esm2020/localize/lib/localize.pipe.mjs +3 -3
  139. package/esm2020/localize/lib/localize.service.mjs +5 -5
  140. package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +3 -3
  141. package/esm2020/localize/lib/views/localize-template-or-string.directive.mjs +3 -3
  142. package/esm2020/localize/lib/views/localize-template.directive.mjs +3 -3
  143. package/esm2020/masking/lib/directives/currency-mask.directive.mjs +3 -3
  144. package/esm2020/masking/lib/directives/date-mask.directive.mjs +3 -3
  145. package/esm2020/masking/lib/directives/input-mask.directive.mjs +3 -3
  146. package/esm2020/masking/lib/masking.module.mjs +4 -4
  147. package/esm2020/masking/lib/masking.service.mjs +3 -3
  148. package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +5 -5
  149. package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +7 -7
  150. package/esm2020/notifications/lib/notifications.module.mjs +4 -4
  151. package/esm2020/notifications/lib/notifications.service.mjs +5 -5
  152. package/esm2020/public_api.mjs +1 -2
  153. package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
  154. package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +10 -10
  155. package/esm2020/recaptcha/lib/recaptcha.module.mjs +4 -4
  156. package/esm2020/storage/lib/storage.service.mjs +5 -5
  157. package/esm2020/table/lib/components/table/table.component.mjs +9 -9
  158. package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +3 -3
  159. package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +3 -3
  160. package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +3 -3
  161. package/esm2020/table/lib/table.module.mjs +4 -4
  162. package/esm2020/theming/lib/themes/checkbox-group.theme.mjs +17 -2
  163. package/esm2020/theming/lib/themes/checkbox.theme.mjs +35 -2
  164. package/esm2020/theming/lib/themes/control-error.theme.mjs +11 -0
  165. package/esm2020/theming/lib/themes/form-control-addon.theme.mjs +6 -0
  166. package/esm2020/theming/lib/themes/form-control.theme.mjs +45 -0
  167. package/esm2020/theming/lib/theming.data.mjs +82 -0
  168. package/esm2020/theming/lib/theming.directive.mjs +38 -0
  169. package/esm2020/theming/lib/theming.interface.mjs +2 -3
  170. package/esm2020/theming/lib/theming.module.mjs +12 -34
  171. package/esm2020/theming/lib/utils/theming.variable.mjs +41 -0
  172. package/esm2020/theming/public_api.mjs +6 -3
  173. package/fesm2015/bravobit-bb-foundation-auth.mjs +326 -284
  174. package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -1
  175. package/fesm2015/bravobit-bb-foundation-collections.mjs +22 -22
  176. package/fesm2015/bravobit-bb-foundation-controls.mjs +493 -24
  177. package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
  178. package/fesm2015/bravobit-bb-foundation-dashboard.mjs +29 -28
  179. package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  180. package/fesm2015/bravobit-bb-foundation-dialog.mjs +185 -233
  181. package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
  182. package/fesm2015/bravobit-bb-foundation-elements.mjs +99 -97
  183. package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
  184. package/fesm2015/bravobit-bb-foundation-http.mjs +10 -10
  185. package/fesm2015/bravobit-bb-foundation-localize.mjs +20 -20
  186. package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
  187. package/fesm2015/bravobit-bb-foundation-masking.mjs +16 -16
  188. package/fesm2015/bravobit-bb-foundation-notifications.mjs +18 -17
  189. package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
  190. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +16 -16
  191. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  192. package/fesm2015/bravobit-bb-foundation-storage.mjs +4 -4
  193. package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -1
  194. package/fesm2015/bravobit-bb-foundation-table.mjs +22 -22
  195. package/fesm2015/bravobit-bb-foundation-theming.mjs +251 -128
  196. package/fesm2015/bravobit-bb-foundation-theming.mjs.map +1 -1
  197. package/fesm2015/bravobit-bb-foundation.mjs +33 -73
  198. package/fesm2015/bravobit-bb-foundation.mjs.map +1 -1
  199. package/fesm2020/bravobit-bb-foundation-auth.mjs +306 -277
  200. package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -1
  201. package/fesm2020/bravobit-bb-foundation-collections.mjs +22 -22
  202. package/fesm2020/bravobit-bb-foundation-controls.mjs +477 -24
  203. package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
  204. package/fesm2020/bravobit-bb-foundation-dashboard.mjs +29 -28
  205. package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -1
  206. package/fesm2020/bravobit-bb-foundation-dialog.mjs +175 -233
  207. package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
  208. package/fesm2020/bravobit-bb-foundation-elements.mjs +99 -97
  209. package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
  210. package/fesm2020/bravobit-bb-foundation-http.mjs +10 -10
  211. package/fesm2020/bravobit-bb-foundation-localize.mjs +20 -20
  212. package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
  213. package/fesm2020/bravobit-bb-foundation-masking.mjs +16 -16
  214. package/fesm2020/bravobit-bb-foundation-notifications.mjs +17 -17
  215. package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
  216. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +16 -16
  217. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
  218. package/fesm2020/bravobit-bb-foundation-storage.mjs +4 -4
  219. package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -1
  220. package/fesm2020/bravobit-bb-foundation-table.mjs +22 -22
  221. package/fesm2020/bravobit-bb-foundation-theming.mjs +252 -120
  222. package/fesm2020/bravobit-bb-foundation-theming.mjs.map +1 -1
  223. package/fesm2020/bravobit-bb-foundation.mjs +32 -70
  224. package/fesm2020/bravobit-bb-foundation.mjs.map +1 -1
  225. package/lib/core/services/clipboard.service.d.ts +2 -2
  226. package/lib/core/services/exif.service.d.ts +1 -1
  227. package/lib/core/services/image-converter.service.d.ts +1 -1
  228. package/lib/core/services/network.service.d.ts +4 -4
  229. package/lib/core/services/patch.service.d.ts +4 -4
  230. package/localize/lib/localize.service.d.ts +1 -1
  231. package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
  232. package/notifications/lib/notifications.service.d.ts +1 -1
  233. package/package.json +4 -4
  234. package/public_api.d.ts +0 -1
  235. package/recaptcha/lib/recaptcha-loader.service.d.ts +3 -3
  236. package/storage/lib/storage.service.d.ts +1 -1
  237. package/theming/lib/themes/checkbox-group.theme.d.ts +14 -3
  238. package/theming/lib/themes/checkbox.theme.d.ts +30 -17
  239. package/theming/lib/themes/control-error.theme.d.ts +9 -0
  240. package/theming/lib/themes/form-control-addon.theme.d.ts +5 -0
  241. package/theming/lib/themes/form-control.theme.d.ts +32 -0
  242. package/theming/lib/theming.data.d.ts +17 -0
  243. package/theming/lib/theming.directive.d.ts +13 -0
  244. package/theming/lib/theming.interface.d.ts +19 -8
  245. package/theming/lib/theming.module.d.ts +3 -9
  246. package/theming/lib/utils/theming.variable.d.ts +16 -0
  247. package/theming/public_api.d.ts +5 -2
  248. package/auth/lib/directives/role.directive.d.ts +0 -16
  249. package/auth/lib/helpers/mapper.helper.d.ts +0 -23
  250. package/auth/lib/interfaces/mapper.interface.d.ts +0 -19
  251. package/auth/lib/permissions.service.d.ts +0 -14
  252. package/esm2020/auth/lib/directives/role.directive.mjs +0 -37
  253. package/esm2020/auth/lib/helpers/mapper.helper.mjs +0 -35
  254. package/esm2020/auth/lib/interfaces/mapper.interface.mjs +0 -2
  255. package/esm2020/auth/lib/permissions.service.mjs +0 -56
  256. package/esm2020/lib/core/services/platform.service.mjs +0 -42
  257. package/esm2020/theming/lib/themes/theme.mjs +0 -34
  258. package/esm2020/theming/lib/theming.service.mjs +0 -77
  259. package/lib/core/services/platform.service.d.ts +0 -18
  260. package/theming/lib/themes/theme.d.ts +0 -12
  261. package/theming/lib/theming.service.d.ts +0 -22
@@ -1,11 +1,11 @@
1
1
  import { take, switchMap } from 'rxjs/operators';
2
- import { Subject, lastValueFrom, fromEvent, race } from 'rxjs';
2
+ import { Subject, Subscription, lastValueFrom, fromEvent, race } from 'rxjs';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, HostListener, HostBinding, Directive, ViewChild, Injectable, NgModule } from '@angular/core';
4
+ import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, HostListener, Optional, Inject, HostBinding, Input, Directive, ViewChild, Injectable, NgModule } from '@angular/core';
5
5
  import { trigger, transition, group, query, style, animate } from '@angular/animations';
6
- import * as i1 from '@bravobit/bb-foundation';
7
6
  import * as i1$1 from '@angular/common';
8
- import { CommonModule } from '@angular/common';
7
+ import { DOCUMENT, CommonModule } from '@angular/common';
8
+ import * as i1 from '@bravobit/bb-foundation';
9
9
  import * as i4 from '@bravobit/bb-foundation/elements';
10
10
  import { BbButton, ElementsModule } from '@bravobit/bb-foundation/elements';
11
11
  import * as i8 from '@bravobit/bb-foundation/localize';
@@ -34,24 +34,44 @@ class BbDialogRef {
34
34
  class BbDialogConfig {
35
35
  }
36
36
 
37
+ const bbDialogOverlayAnimation = trigger('bbDialogOverlayAnimation', [
38
+ transition(':enter, * => open', [
39
+ group([
40
+ query('.bb-dialog-overlay-backdrop', [
41
+ style({ opacity: 0 }),
42
+ animate('240ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1 }))
43
+ ]),
44
+ query('.bb-dialog-modal', [
45
+ style({ opacity: 0, transform: 'scale(0.98)' }),
46
+ animate('200ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1, transform: 'none' }))
47
+ ])
48
+ ])
49
+ ]),
50
+ transition(':leave, * => close', [
51
+ group([
52
+ query('.bb-dialog-modal', [
53
+ animate('200ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0, transform: 'scale(0.98)' }))
54
+ ]),
55
+ query('.bb-dialog-overlay-backdrop', [
56
+ animate('240ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))
57
+ ])
58
+ ])
59
+ ])
60
+ ]);
61
+
37
62
  class BbDialogOverlay {
38
63
  constructor(_elementRef, _changeDetection) {
39
64
  this._elementRef = _elementRef;
40
65
  this._changeDetection = _changeDetection;
41
- // Inputs.
42
- this.animations = true;
43
66
  // Outputs.
44
67
  this.closeRequested = new EventEmitter();
45
68
  // State.
46
- this._state = 'open';
69
+ this.state = 'open';
47
70
  this._closed$ = new Subject();
71
+ // Subscriptions.
72
+ this._subscription = new Subscription();
48
73
  }
49
- get state() {
50
- return this.animations
51
- ? this._state
52
- : 'none';
53
- }
54
- ngAfterViewInit() {
74
+ ngOnInit() {
55
75
  this.listenForClicks();
56
76
  }
57
77
  ngOnDestroy() {
@@ -59,13 +79,13 @@ class BbDialogOverlay {
59
79
  (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
60
80
  }
61
81
  onKeyEvent(event) {
62
- if (event.key === 'Escape') {
82
+ if ((event === null || event === void 0 ? void 0 : event.key) === 'Escape') {
63
83
  this.closeRequested.emit();
64
84
  }
65
85
  }
66
86
  onAnimationDone(event) {
67
87
  // Check if the dialog is being destroyed.
68
- if (!['close', 'none'].includes(event.toState)) {
88
+ if (!['close'].includes(event === null || event === void 0 ? void 0 : event.toState)) {
69
89
  return;
70
90
  }
71
91
  this._closed$.next();
@@ -74,99 +94,52 @@ class BbDialogOverlay {
74
94
  close() {
75
95
  // We need change detection to run
76
96
  // here else it won't close in all scenario's.
77
- this._state = 'close';
97
+ this.state = 'close';
78
98
  this._changeDetection.markForCheck();
79
99
  // Listen for the closed trigger.
80
100
  const observable$ = this._closed$.pipe(take(1));
81
101
  return lastValueFrom(observable$);
82
102
  }
83
103
  listenForClicks() {
84
- if (!this._elementRef || !this._elementRef.nativeElement) {
104
+ var _a, _b;
105
+ const element = (_b = (_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement) !== null && _b !== void 0 ? _b : null;
106
+ if (!element) {
85
107
  return;
86
108
  }
87
- const mouseDown$ = fromEvent(this._elementRef.nativeElement, 'mousedown');
88
- const touchStart$ = fromEvent(this._elementRef.nativeElement, 'touchstart');
109
+ const mouseDown$ = fromEvent(element, 'mousedown');
110
+ const touchStart$ = fromEvent(element, 'touchstart');
89
111
  const start$ = race([mouseDown$, touchStart$]);
90
- const mouseUp$ = fromEvent(this._elementRef.nativeElement, 'mouseup');
91
- const touchEnd$ = fromEvent(this._elementRef.nativeElement, 'touchend');
112
+ const mouseUp$ = fromEvent(element, 'mouseup');
113
+ const touchEnd$ = fromEvent(element, 'touchend');
92
114
  const end$ = race([mouseUp$, touchEnd$]);
93
- this._subscription = start$.pipe(switchMap(() => end$)).subscribe(() => {
94
- this.closeRequested.next();
95
- });
115
+ const clicks$ = start$.pipe(switchMap(() => end$));
116
+ const subscription = clicks$.subscribe(() => this.closeRequested.next());
117
+ this._subscription.add(subscription);
96
118
  }
97
119
  }
98
- BbDialogOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogOverlay, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
99
- BbDialogOverlay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogOverlay, selector: "bb-dialog-overlay", inputs: { animations: "animations" }, outputs: { closeRequested: "closeRequested" }, host: { listeners: { "window:keyup": "onKeyEvent($event)", "@bbDialogAnimation.done": "onAnimationDone($event)" }, properties: { "@bbDialogAnimation": "state" }, classAttribute: "bb-dialog-overlay" }, ngImport: i0, template: "<div class=\"bb-dialog-overlay-backdrop\"></div>\n\n<ng-content select=\"[bb-dialog-modal]\"></ng-content>\n", styles: [".bb-dialog-overlay,.bb-dialog-overlay-backdrop{top:0;left:0;right:0;bottom:0;display:flex;z-index:1000;position:fixed;flex-direction:column}.bb-dialog-overlay{padding:20px}.bb-dialog-overlay-backdrop{background-color:#00000080}.bb-dialog-overlay-component{z-index:1001;display:block;position:relative}\n"], animations: [
100
- trigger('bbDialogAnimation', [
101
- transition('* => none', []),
102
- transition(':enter, * => open', [
103
- group([
104
- query('.bb-dialog-overlay-backdrop', [
105
- style({ opacity: 0 }),
106
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1 }))
107
- ]),
108
- query('.bb-dialog-modal', [
109
- style({ transform: 'scale(0.95)' }),
110
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' }))
111
- ])
112
- ])
113
- ]),
114
- transition(':leave, * => close', [
115
- group([
116
- query('.bb-dialog-overlay-backdrop', [
117
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))
118
- ]),
119
- query('.bb-dialog-modal', [
120
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0, transform: 'scale(0.95)' }))
121
- ])
122
- ])
123
- ])
124
- ])
125
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogOverlay, decorators: [{
120
+ BbDialogOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogOverlay, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
121
+ BbDialogOverlay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogOverlay, selector: "bb-dialog-overlay", outputs: { closeRequested: "closeRequested" }, host: { listeners: { "window:keyup": "onKeyEvent($event)", "@bbDialogOverlayAnimation.done": "onAnimationDone($event)" }, properties: { "@bbDialogOverlayAnimation": "state" }, classAttribute: "bb-dialog-overlay" }, ngImport: i0, template: "<div class=\"bb-dialog-overlay-backdrop\"></div>\n\n<ng-content select=\"[bb-dialog-modal]\"></ng-content>\n", styles: [".bb-dialog-overlay,.bb-dialog-overlay-backdrop{top:0;left:0;right:0;bottom:0;display:flex;z-index:1000;position:fixed;flex-direction:column}.bb-dialog-overlay{padding:20px}.bb-dialog-overlay-backdrop{will-change:opacity;background-color:#1119}.bb-dialog-overlay-component{z-index:1001;display:block;position:relative}\n"], animations: [bbDialogOverlayAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogOverlay, decorators: [{
127
123
  type: Component,
128
- args: [{ selector: 'bb-dialog-overlay', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-overlay', '[@bbDialogAnimation]': 'state' }, animations: [
129
- trigger('bbDialogAnimation', [
130
- transition('* => none', []),
131
- transition(':enter, * => open', [
132
- group([
133
- query('.bb-dialog-overlay-backdrop', [
134
- style({ opacity: 0 }),
135
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1 }))
136
- ]),
137
- query('.bb-dialog-modal', [
138
- style({ transform: 'scale(0.95)' }),
139
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' }))
140
- ])
141
- ])
142
- ]),
143
- transition(':leave, * => close', [
144
- group([
145
- query('.bb-dialog-overlay-backdrop', [
146
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))
147
- ]),
148
- query('.bb-dialog-modal', [
149
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0, transform: 'scale(0.95)' }))
150
- ])
151
- ])
152
- ])
153
- ])
154
- ], template: "<div class=\"bb-dialog-overlay-backdrop\"></div>\n\n<ng-content select=\"[bb-dialog-modal]\"></ng-content>\n", styles: [".bb-dialog-overlay,.bb-dialog-overlay-backdrop{top:0;left:0;right:0;bottom:0;display:flex;z-index:1000;position:fixed;flex-direction:column}.bb-dialog-overlay{padding:20px}.bb-dialog-overlay-backdrop{background-color:#00000080}.bb-dialog-overlay-component{z-index:1001;display:block;position:relative}\n"] }]
155
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { animations: [{
156
- type: Input
157
- }], closeRequested: [{
124
+ args: [{ selector: 'bb-dialog-overlay', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: {
125
+ 'class': 'bb-dialog-overlay',
126
+ '[@bbDialogOverlayAnimation]': 'state'
127
+ }, animations: [bbDialogOverlayAnimation], template: "<div class=\"bb-dialog-overlay-backdrop\"></div>\n\n<ng-content select=\"[bb-dialog-modal]\"></ng-content>\n", styles: [".bb-dialog-overlay,.bb-dialog-overlay-backdrop{top:0;left:0;right:0;bottom:0;display:flex;z-index:1000;position:fixed;flex-direction:column}.bb-dialog-overlay{padding:20px}.bb-dialog-overlay-backdrop{will-change:opacity;background-color:#1119}.bb-dialog-overlay-component{z-index:1001;display:block;position:relative}\n"] }]
128
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { closeRequested: [{
158
129
  type: Output
159
130
  }], onKeyEvent: [{
160
131
  type: HostListener,
161
132
  args: ['window:keyup', ['$event']]
162
133
  }], onAnimationDone: [{
163
134
  type: HostListener,
164
- args: ['@bbDialogAnimation.done', ['$event']]
135
+ args: ['@bbDialogOverlayAnimation.done', ['$event']]
165
136
  }] } });
166
137
 
167
138
  class BbDialogModal {
168
- constructor(_patch) {
139
+ constructor(_patch, _renderer, _document) {
169
140
  this._patch = _patch;
141
+ this._renderer = _renderer;
142
+ this._document = _document;
170
143
  // Styling.
171
144
  this.maxWidth = '420px';
172
145
  }
@@ -175,17 +148,38 @@ class BbDialogModal {
175
148
  }
176
149
  ngOnInit() {
177
150
  this._patch.mobileVerticalHeight();
151
+ this.allowGlobalOverflow(false);
152
+ }
153
+ ngOnDestroy() {
154
+ this.allowGlobalOverflow(true);
155
+ }
156
+ allowGlobalOverflow(allow) {
157
+ var _a, _b;
158
+ const element = (_b = (_a = this._document) === null || _a === void 0 ? void 0 : _a.documentElement) !== null && _b !== void 0 ? _b : null;
159
+ if (!element) {
160
+ return;
161
+ }
162
+ allow
163
+ ? this._renderer.removeStyle(element, 'overflow')
164
+ : this._renderer.setStyle(element, 'overflow', 'hidden');
178
165
  }
179
166
  }
180
- BbDialogModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogModal, deps: [{ token: i1.Patch }], target: i0.ɵɵFactoryTarget.Component });
181
- BbDialogModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogModal, selector: "[bb-dialog-modal]", inputs: { maxWidth: "maxWidth" }, host: { attributes: { "role": "dialog" }, listeners: { "click": "onOverlayClickedEvent($event)", "touchstart": "onOverlayClickedEvent($event)", "touchend": "onOverlayClickedEvent($event)", "mouseup": "onOverlayClickedEvent($event)", "mousedown": "onOverlayClickedEvent($event)" }, properties: { "style.max-width": "this.maxWidth" }, classAttribute: "bb-dialog-modal" }, ngImport: i0, template: "<ng-content select=\"[bb-dialog-header]\">\n\n</ng-content>\n\n<div class=\"bb-dialog-modal-body\">\n <ng-content></ng-content>\n</div>\n\n<ng-content select=\"[bb-dialog-actions]\">\n\n</ng-content>\n", styles: [".bb-dialog-modal{width:100%;margin:auto;z-index:1001;display:flex;max-width:420px;border-radius:4px;position:relative;flex-direction:column;background-color:#fff;max-height:calc(var(--vh, 1vh) * 100 - 40px)}.bb-dialog-modal-body{padding:20px;color:#738694;font-size:13px;overflow-y:auto;line-height:1.4;background-color:#f1f3f6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogModal, decorators: [{
167
+ BbDialogModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogModal, deps: [{ token: i1.Patch }, { token: i0.Renderer2 }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
168
+ BbDialogModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogModal, selector: "[bb-dialog-modal]", inputs: { maxWidth: "maxWidth" }, host: { attributes: { "role": "dialog" }, listeners: { "click": "onOverlayClickedEvent($event)", "touchstart": "onOverlayClickedEvent($event)", "touchend": "onOverlayClickedEvent($event)", "mouseup": "onOverlayClickedEvent($event)", "mousedown": "onOverlayClickedEvent($event)" }, properties: { "style.max-width": "this.maxWidth" }, classAttribute: "bb-dialog-modal" }, ngImport: i0, template: "<ng-content select=\"[bb-dialog-header]\">\n\n</ng-content>\n\n<div class=\"bb-dialog-modal-body\">\n <ng-content></ng-content>\n</div>\n\n<ng-content select=\"[bb-dialog-actions]\">\n\n</ng-content>\n", styles: [".bb-dialog-modal{width:100%;margin:auto;z-index:1001;display:flex;max-width:420px;border-radius:4px;position:relative;flex-direction:column;background-color:#fff;will-change:opacity,transform;max-height:calc(var(--vh, 1vh) * 100 - 40px)}.bb-dialog-modal-body{padding:20px;color:#738694;font-size:13px;overflow-y:auto;line-height:1.4;background-color:#f1f3f6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogModal, decorators: [{
183
170
  type: Component,
184
171
  args: [{ selector: '[bb-dialog-modal]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: {
185
172
  'class': 'bb-dialog-modal',
186
173
  'role': 'dialog'
187
- }, template: "<ng-content select=\"[bb-dialog-header]\">\n\n</ng-content>\n\n<div class=\"bb-dialog-modal-body\">\n <ng-content></ng-content>\n</div>\n\n<ng-content select=\"[bb-dialog-actions]\">\n\n</ng-content>\n", styles: [".bb-dialog-modal{width:100%;margin:auto;z-index:1001;display:flex;max-width:420px;border-radius:4px;position:relative;flex-direction:column;background-color:#fff;max-height:calc(var(--vh, 1vh) * 100 - 40px)}.bb-dialog-modal-body{padding:20px;color:#738694;font-size:13px;overflow-y:auto;line-height:1.4;background-color:#f1f3f6}\n"] }]
188
- }], ctorParameters: function () { return [{ type: i1.Patch }]; }, propDecorators: { maxWidth: [{
174
+ }, template: "<ng-content select=\"[bb-dialog-header]\">\n\n</ng-content>\n\n<div class=\"bb-dialog-modal-body\">\n <ng-content></ng-content>\n</div>\n\n<ng-content select=\"[bb-dialog-actions]\">\n\n</ng-content>\n", styles: [".bb-dialog-modal{width:100%;margin:auto;z-index:1001;display:flex;max-width:420px;border-radius:4px;position:relative;flex-direction:column;background-color:#fff;will-change:opacity,transform;max-height:calc(var(--vh, 1vh) * 100 - 40px)}.bb-dialog-modal-body{padding:20px;color:#738694;font-size:13px;overflow-y:auto;line-height:1.4;background-color:#f1f3f6}\n"] }]
175
+ }], ctorParameters: function () {
176
+ return [{ type: i1.Patch }, { type: i0.Renderer2 }, { type: Document, decorators: [{
177
+ type: Optional
178
+ }, {
179
+ type: Inject,
180
+ args: [DOCUMENT]
181
+ }] }];
182
+ }, propDecorators: { maxWidth: [{
189
183
  type: HostBinding,
190
184
  args: ['style.max-width']
191
185
  }, {
@@ -209,52 +203,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
209
203
 
210
204
  class BbDialogHeader {
211
205
  constructor() {
212
- // Inputs.
213
- this.iconName = null;
214
- this.iconColor = 'black';
215
206
  // Outputs.
216
207
  this.closeRequested = new EventEmitter();
217
208
  }
218
209
  }
219
- BbDialogHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
220
- BbDialogHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogHeader, selector: "[bb-dialog-header]", inputs: { iconName: "iconName", iconColor: "iconColor" }, outputs: { closeRequested: "closeRequested" }, host: { classAttribute: "bb-dialog-header" }, ngImport: i0, template: "<div class=\"bb-dialog-header-row\">\n <div *ngIf=\"iconName as icon\"\n [style.color]=\"iconColor\"\n class=\"bb-dialog-header-icon\">\n <i class=\"material-icons\">{{ icon }}</i>\n </div>\n\n <div class=\"bb-dialog-header-content\">\n <ng-content></ng-content>\n </div>\n\n <button *ngIf=\"closeRequested?.observed\"\n (click)=\"closeRequested?.emit()\"\n type=\"button\"\n class=\"bb-dialog-header-close\">\n </button>\n</div>\n\n<nav class=\"bb-dialog-header-navigation\">\n <ng-content select=\"[bb-dialog-link]\"></ng-content>\n</nav>\n", styles: [".bb-dialog-header{display:flex;min-height:60px;flex-direction:column;justify-content:center;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-dialog-header .bb-dialog-header-content,.bb-dialog-header .bb-dialog-header-content h1{max-width:100%;font-size:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bb-dialog-header-row,.bb-dialog-header-navigation{width:100%;display:flex;align-items:center}.bb-dialog-header-row{padding:10px 20px}.bb-dialog-header-navigation{width:100%;padding:0 20px;overflow-x:auto;white-space:nowrap}.bb-dialog-header-navigation:empty{margin:0;height:0;padding:0;visibility:hidden}.bb-dialog-header-content{flex:1}.bb-dialog-header-icon{width:40px;height:40px;display:flex;min-width:40px;overflow:hidden;min-height:40px;margin-right:10px;border-radius:50%;position:relative;align-items:center;justify-content:center}.bb-dialog-header-icon:after{top:0;left:0;right:0;bottom:0;content:\"\";opacity:.14;position:absolute;background-color:currentColor}.bb-dialog-header-close{width:32px;height:32px;border:none;min-width:32px;min-height:32px;overflow:hidden;margin-left:10px;border-radius:4px;position:relative;margin-right:-10px;display:inline-block;background-color:transparent}.bb-dialog-header-close:before,.bb-dialog-header-close:after{top:50%;left:20%;width:60%;height:2px;content:\"\";margin-top:-1px;position:absolute;background-color:#a2a9ba}.bb-dialog-header-close:before{transform:rotate(45deg)}.bb-dialog-header-close:after{transform:rotate(-45deg)}.bb-dialog-header-close:hover{background-color:#00000014}.bb-dialog-header-close:focus{background-color:#0000001f}.bb-dialog-header-close:active{background-color:#00000029}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogHeader, decorators: [{
210
+ BbDialogHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
211
+ BbDialogHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogHeader, selector: "[bb-dialog-header]", outputs: { closeRequested: "closeRequested" }, host: { classAttribute: "bb-dialog-header" }, ngImport: i0, template: "<div class=\"bb-dialog-header-row\">\n <div class=\"bb-dialog-header-content\">\n <ng-content></ng-content>\n </div>\n\n <button *ngIf=\"closeRequested?.observed\"\n (click)=\"closeRequested?.emit()\"\n type=\"button\"\n class=\"bb-dialog-header-close\">\n </button>\n</div>\n\n<nav class=\"bb-dialog-header-navigation\">\n <ng-content select=\"[bb-dialog-link]\"></ng-content>\n</nav>\n", styles: [".bb-dialog-header{display:flex;min-height:60px;flex-direction:column;justify-content:center;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-dialog-header .bb-dialog-header-content,.bb-dialog-header .bb-dialog-header-content h1{max-width:100%;font-size:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bb-dialog-header-row,.bb-dialog-header-navigation{width:100%;display:flex;align-items:center}.bb-dialog-header-row{padding:10px 20px}.bb-dialog-header-navigation{width:100%;padding:0 20px;overflow-x:auto;white-space:nowrap}.bb-dialog-header-navigation:empty{margin:0;height:0;padding:0;visibility:hidden}.bb-dialog-header-content{flex:1}.bb-dialog-header-close{width:32px;height:32px;border:none;min-width:32px;min-height:32px;overflow:hidden;margin-left:10px;border-radius:4px;position:relative;margin-right:-10px;display:inline-block;background-color:transparent}.bb-dialog-header-close:before,.bb-dialog-header-close:after{top:50%;left:20%;width:60%;height:2px;content:\"\";margin-top:-1px;position:absolute;background-color:#a2a9ba}.bb-dialog-header-close:before{transform:rotate(45deg)}.bb-dialog-header-close:after{transform:rotate(-45deg)}.bb-dialog-header-close:hover{background-color:#00000014}.bb-dialog-header-close:focus{background-color:#0000001f}.bb-dialog-header-close:active{background-color:#00000029}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogHeader, decorators: [{
222
213
  type: Component,
223
- args: [{ selector: '[bb-dialog-header]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-header' }, template: "<div class=\"bb-dialog-header-row\">\n <div *ngIf=\"iconName as icon\"\n [style.color]=\"iconColor\"\n class=\"bb-dialog-header-icon\">\n <i class=\"material-icons\">{{ icon }}</i>\n </div>\n\n <div class=\"bb-dialog-header-content\">\n <ng-content></ng-content>\n </div>\n\n <button *ngIf=\"closeRequested?.observed\"\n (click)=\"closeRequested?.emit()\"\n type=\"button\"\n class=\"bb-dialog-header-close\">\n </button>\n</div>\n\n<nav class=\"bb-dialog-header-navigation\">\n <ng-content select=\"[bb-dialog-link]\"></ng-content>\n</nav>\n", styles: [".bb-dialog-header{display:flex;min-height:60px;flex-direction:column;justify-content:center;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-dialog-header .bb-dialog-header-content,.bb-dialog-header .bb-dialog-header-content h1{max-width:100%;font-size:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bb-dialog-header-row,.bb-dialog-header-navigation{width:100%;display:flex;align-items:center}.bb-dialog-header-row{padding:10px 20px}.bb-dialog-header-navigation{width:100%;padding:0 20px;overflow-x:auto;white-space:nowrap}.bb-dialog-header-navigation:empty{margin:0;height:0;padding:0;visibility:hidden}.bb-dialog-header-content{flex:1}.bb-dialog-header-icon{width:40px;height:40px;display:flex;min-width:40px;overflow:hidden;min-height:40px;margin-right:10px;border-radius:50%;position:relative;align-items:center;justify-content:center}.bb-dialog-header-icon:after{top:0;left:0;right:0;bottom:0;content:\"\";opacity:.14;position:absolute;background-color:currentColor}.bb-dialog-header-close{width:32px;height:32px;border:none;min-width:32px;min-height:32px;overflow:hidden;margin-left:10px;border-radius:4px;position:relative;margin-right:-10px;display:inline-block;background-color:transparent}.bb-dialog-header-close:before,.bb-dialog-header-close:after{top:50%;left:20%;width:60%;height:2px;content:\"\";margin-top:-1px;position:absolute;background-color:#a2a9ba}.bb-dialog-header-close:before{transform:rotate(45deg)}.bb-dialog-header-close:after{transform:rotate(-45deg)}.bb-dialog-header-close:hover{background-color:#00000014}.bb-dialog-header-close:focus{background-color:#0000001f}.bb-dialog-header-close:active{background-color:#00000029}\n"] }]
224
- }], propDecorators: { iconName: [{
225
- type: Input
226
- }], iconColor: [{
227
- type: Input
228
- }], closeRequested: [{
214
+ args: [{ selector: '[bb-dialog-header]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-header' }, template: "<div class=\"bb-dialog-header-row\">\n <div class=\"bb-dialog-header-content\">\n <ng-content></ng-content>\n </div>\n\n <button *ngIf=\"closeRequested?.observed\"\n (click)=\"closeRequested?.emit()\"\n type=\"button\"\n class=\"bb-dialog-header-close\">\n </button>\n</div>\n\n<nav class=\"bb-dialog-header-navigation\">\n <ng-content select=\"[bb-dialog-link]\"></ng-content>\n</nav>\n", styles: [".bb-dialog-header{display:flex;min-height:60px;flex-direction:column;justify-content:center;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-dialog-header .bb-dialog-header-content,.bb-dialog-header .bb-dialog-header-content h1{max-width:100%;font-size:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bb-dialog-header-row,.bb-dialog-header-navigation{width:100%;display:flex;align-items:center}.bb-dialog-header-row{padding:10px 20px}.bb-dialog-header-navigation{width:100%;padding:0 20px;overflow-x:auto;white-space:nowrap}.bb-dialog-header-navigation:empty{margin:0;height:0;padding:0;visibility:hidden}.bb-dialog-header-content{flex:1}.bb-dialog-header-close{width:32px;height:32px;border:none;min-width:32px;min-height:32px;overflow:hidden;margin-left:10px;border-radius:4px;position:relative;margin-right:-10px;display:inline-block;background-color:transparent}.bb-dialog-header-close:before,.bb-dialog-header-close:after{top:50%;left:20%;width:60%;height:2px;content:\"\";margin-top:-1px;position:absolute;background-color:#a2a9ba}.bb-dialog-header-close:before{transform:rotate(45deg)}.bb-dialog-header-close:after{transform:rotate(-45deg)}.bb-dialog-header-close:hover{background-color:#00000014}.bb-dialog-header-close:focus{background-color:#0000001f}.bb-dialog-header-close:active{background-color:#00000029}\n"] }]
215
+ }], propDecorators: { closeRequested: [{
229
216
  type: Output
230
217
  }] } });
231
218
 
232
219
  class BbDialogLink {
233
220
  }
234
- BbDialogLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
235
- BbDialogLink.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogLink, selector: "[bb-dialog-link]", host: { classAttribute: "bb-dialog-link" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [".bb-dialog-link{height:30px;display:flex;font-size:16px;font-weight:500;white-space:nowrap;align-items:center;color:#6b5c5c!important;background-color:transparent;text-decoration:none!important;border-bottom:2px solid transparent}.bb-dialog-link+.bb-dialog-link{margin-left:10px}.bb-dialog-link:hover:not(.disabled){border-bottom:2px solid rgba(117,119,148,.2)}.bb-dialog-link.active,.bb-dialog-link.active:hover{color:#5b53ff!important;border-bottom-color:#5b53ff}.bb-dialog-link.disabled,.bb-dialog-link.disabled:focus,.bb-dialog-link.disabled:hover,.bb-dialog-link.disabled:active{opacity:.4;cursor:default;box-shadow:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogLink, decorators: [{
221
+ BbDialogLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
+ BbDialogLink.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogLink, selector: "[bb-dialog-link]", host: { classAttribute: "bb-dialog-link" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [".bb-dialog-link{border:none;height:30px;display:flex;font-size:16px;-webkit-appearance:none;appearance:none;font-weight:500;white-space:nowrap;align-items:center;color:#6b5c5c!important;background-color:transparent;text-decoration:none!important;border-bottom:2px solid transparent}.bb-dialog-link+.bb-dialog-link{margin-left:10px}.bb-dialog-link:hover:not(.disabled){border-bottom:2px solid rgba(117,119,148,.2)}.bb-dialog-link.active,.bb-dialog-link.active:hover{color:#5b53ff!important;border-bottom-color:#5b53ff}.bb-dialog-link.disabled,.bb-dialog-link.disabled:focus,.bb-dialog-link.disabled:hover,.bb-dialog-link.disabled:active{opacity:.4;cursor:default;box-shadow:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogLink, decorators: [{
237
224
  type: Component,
238
- args: [{ selector: '[bb-dialog-link]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-link' }, template: "<ng-content></ng-content>\n", styles: [".bb-dialog-link{height:30px;display:flex;font-size:16px;font-weight:500;white-space:nowrap;align-items:center;color:#6b5c5c!important;background-color:transparent;text-decoration:none!important;border-bottom:2px solid transparent}.bb-dialog-link+.bb-dialog-link{margin-left:10px}.bb-dialog-link:hover:not(.disabled){border-bottom:2px solid rgba(117,119,148,.2)}.bb-dialog-link.active,.bb-dialog-link.active:hover{color:#5b53ff!important;border-bottom-color:#5b53ff}.bb-dialog-link.disabled,.bb-dialog-link.disabled:focus,.bb-dialog-link.disabled:hover,.bb-dialog-link.disabled:active{opacity:.4;cursor:default;box-shadow:none}\n"] }]
225
+ args: [{ selector: '[bb-dialog-link]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-link' }, template: "<ng-content></ng-content>\n", styles: [".bb-dialog-link{border:none;height:30px;display:flex;font-size:16px;-webkit-appearance:none;appearance:none;font-weight:500;white-space:nowrap;align-items:center;color:#6b5c5c!important;background-color:transparent;text-decoration:none!important;border-bottom:2px solid transparent}.bb-dialog-link+.bb-dialog-link{margin-left:10px}.bb-dialog-link:hover:not(.disabled){border-bottom:2px solid rgba(117,119,148,.2)}.bb-dialog-link.active,.bb-dialog-link.active:hover{color:#5b53ff!important;border-bottom-color:#5b53ff}.bb-dialog-link.disabled,.bb-dialog-link.disabled:focus,.bb-dialog-link.disabled:hover,.bb-dialog-link.disabled:active{opacity:.4;cursor:default;box-shadow:none}\n"] }]
239
226
  }] });
240
227
 
241
228
  class BbDialogActions {
242
229
  }
243
- BbDialogActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
244
- BbDialogActions.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogActions, selector: "[bb-dialog-actions]", host: { classAttribute: "bb-dialog-actions" }, ngImport: i0, template: "<bb-form-group class=\"end\">\n <ng-content></ng-content>\n</bb-form-group>\n", styles: [".bb-dialog-actions{padding:20px;display:block;background-color:#fff;border-top:1px solid #d8d8d8;border-bottom-left-radius:4px;border-bottom-right-radius:4px}\n"], dependencies: [{ kind: "component", type: i4.BbFormGroup, selector: "bb-form-group", inputs: ["grouped"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogActions, decorators: [{
230
+ BbDialogActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
231
+ BbDialogActions.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogActions, selector: "[bb-dialog-actions]", host: { classAttribute: "bb-dialog-actions" }, ngImport: i0, template: "<bb-form-group class=\"end\">\n <ng-content></ng-content>\n</bb-form-group>\n", styles: [".bb-dialog-actions{padding:20px;display:block;background-color:#fff;border-top:1px solid #d8d8d8;border-bottom-left-radius:4px;border-bottom-right-radius:4px}\n"], dependencies: [{ kind: "component", type: i4.BbFormGroup, selector: "bb-form-group", inputs: ["grouped"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogActions, decorators: [{
246
233
  type: Component,
247
234
  args: [{ selector: '[bb-dialog-actions]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-actions' }, template: "<bb-form-group class=\"end\">\n <ng-content></ng-content>\n</bb-form-group>\n", styles: [".bb-dialog-actions{padding:20px;display:block;background-color:#fff;border-top:1px solid #d8d8d8;border-bottom-left-radius:4px;border-bottom-right-radius:4px}\n"] }]
248
235
  }] });
249
236
 
237
+ const bbDialogContainerAnimation = trigger('bbDialogContainerAnimation', [
238
+ transition(':enter', [
239
+ group([
240
+ query('.bb-dialog-container-backdrop', [
241
+ style({ opacity: 0 }),
242
+ animate('180ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1 }))
243
+ ]),
244
+ query('.bb-dialog-container-component', [
245
+ style({ opacity: 0, transform: 'scale(0.96)' }),
246
+ animate('180ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1, transform: 'none' }))
247
+ ])
248
+ ])
249
+ ]),
250
+ transition(':leave', [
251
+ group([
252
+ query('.bb-dialog-container-backdrop', [
253
+ animate('180ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))
254
+ ]),
255
+ query('.bb-dialog-container-component', [
256
+ animate('180ms cubic-bezier(0, 0, 0.2, 1)', style({
257
+ opacity: 0,
258
+ transform: 'scale(0.96)'
259
+ }))
260
+ ])
261
+ ])
262
+ ])
263
+ ]);
264
+
250
265
  class BbDialogInsertion {
251
266
  constructor(viewContainerRef) {
252
267
  this.viewContainerRef = viewContainerRef;
253
268
  }
254
269
  }
255
- BbDialogInsertion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogInsertion, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
256
- BbDialogInsertion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogInsertion, selector: "[bbDialogInsertion]", ngImport: i0 });
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogInsertion, decorators: [{
270
+ BbDialogInsertion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogInsertion, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
271
+ BbDialogInsertion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogInsertion, selector: "[bbDialogInsertion]", ngImport: i0 });
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogInsertion, decorators: [{
258
273
  type: Directive,
259
274
  args: [{
260
275
  selector: '[bbDialogInsertion]'
@@ -262,175 +277,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImpor
262
277
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
263
278
 
264
279
  class BbDialogContainer {
265
- constructor(_elementRef, _changeDetection, _componentFactoryResolver) {
280
+ constructor(_elementRef) {
266
281
  this._elementRef = _elementRef;
267
- this._changeDetection = _changeDetection;
268
- this._componentFactoryResolver = _componentFactoryResolver;
269
282
  // Data.
270
283
  this.componentRef = null;
271
284
  this.childComponentType = null;
272
285
  // State.
273
286
  this.overlayClicked$ = new Subject();
287
+ // Subscription.
288
+ this._subscription = new Subscription();
274
289
  }
275
290
  get onOverlayClicked() {
276
291
  return this.overlayClicked$.pipe(take(1));
277
292
  }
278
- ngAfterViewInit() {
293
+ ngOnInit() {
279
294
  // Load the child component.
280
295
  this.loadChildComponent(this.childComponentType);
281
296
  // Listen for mouse click on the dialog container.
282
297
  this.listenForClicks();
283
- // Detect changes to notify change detection.
284
- this._changeDetection.detectChanges();
285
298
  }
286
299
  ngOnDestroy() {
287
- this._subscription && this._subscription.unsubscribe();
300
+ var _a;
301
+ (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
288
302
  }
289
303
  onAnimationDone(event) {
304
+ var _a;
290
305
  // Check if the dialog is being destroyed.
291
306
  if (event.toState !== 'void') {
292
307
  return;
293
308
  }
294
309
  // Destroy the ref if it exists.
295
- this.componentRef && this.componentRef.destroy();
310
+ (_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.destroy();
296
311
  }
297
312
  listenForClicks() {
298
- if (!this._elementRef || !this._elementRef.nativeElement) {
313
+ var _a, _b;
314
+ const element = (_b = (_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement) !== null && _b !== void 0 ? _b : null;
315
+ if (!element) {
299
316
  return;
300
317
  }
301
- const mouseDown$ = fromEvent(this._elementRef.nativeElement, 'mousedown');
302
- const touchStart$ = fromEvent(this._elementRef.nativeElement, 'touchstart');
318
+ const mouseDown$ = fromEvent(element, 'mousedown');
319
+ const touchStart$ = fromEvent(element, 'touchstart');
303
320
  const start$ = race([mouseDown$, touchStart$]);
304
- const mouseUp$ = fromEvent(this._elementRef.nativeElement, 'mouseup');
305
- const touchEnd$ = fromEvent(this._elementRef.nativeElement, 'touchend');
321
+ const mouseUp$ = fromEvent(element, 'mouseup');
322
+ const touchEnd$ = fromEvent(element, 'touchend');
306
323
  const end$ = race([mouseUp$, touchEnd$]);
307
- this._subscription = start$.pipe(switchMap(() => end$)).subscribe(() => {
308
- this.overlayClicked$.next();
309
- });
324
+ const clicks$ = start$.pipe(switchMap(() => end$));
325
+ const subscription = clicks$.subscribe(() => this.overlayClicked$.next());
326
+ this._subscription.add(subscription);
310
327
  }
311
328
  loadChildComponent(componentType) {
312
- // Resolve the component.
313
- const componentFactory = this._componentFactoryResolver.resolveComponentFactory(componentType);
314
329
  // Get the view container ref and clear it.
315
330
  const viewContainerRef = this.insertion.viewContainerRef;
316
331
  viewContainerRef.clear();
317
332
  // Create an instance of the component.
318
- this.componentRef = viewContainerRef.createComponent(componentFactory);
333
+ this.componentRef = viewContainerRef.createComponent(componentType);
319
334
  }
320
335
  }
321
- BbDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogContainer, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
322
- BbDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogContainer, selector: "bb-dialog-container", host: { listeners: { "@bbDialogAnimation.done": "onAnimationDone($event)" }, properties: { "@bbDialogAnimation": "true" }, classAttribute: "bb-dialog-container" }, viewQueries: [{ propertyName: "insertion", first: true, predicate: BbDialogInsertion, descendants: true, static: true }], ngImport: i0, template: "<div class=\"bb-dialog-container-backdrop\">\n</div>\n\n<div class=\"bb-dialog-container-component\">\n <ng-container bbDialogInsertion>\n </ng-container>\n</div>\n", styles: [".bb-dialog-container,.bb-dialog-container-backdrop{top:0;left:0;right:0;bottom:0;z-index:1000;position:fixed}.bb-dialog-container{display:flex}.bb-dialog-container-backdrop{background-color:#00000080}.bb-dialog-container-component{width:100%;margin:auto;padding:20px;z-index:1001;display:block}\n"], dependencies: [{ kind: "directive", type: BbDialogInsertion, selector: "[bbDialogInsertion]" }], animations: [
323
- trigger('bbDialogAnimation', [
324
- transition(':enter', [
325
- group([
326
- query('.bb-dialog-container-backdrop', [
327
- style({
328
- opacity: 0
329
- }),
330
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
331
- opacity: 1
332
- }))
333
- ]),
334
- query('.bb-dialog-container-component', [
335
- style({
336
- transform: 'scale(0.95)'
337
- }),
338
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
339
- transform: 'scale(1)'
340
- }))
341
- ])
342
- ])
343
- ]),
344
- transition(':leave', [
345
- group([
346
- query('.bb-dialog-container-backdrop', [
347
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
348
- opacity: 0
349
- }))
350
- ]),
351
- query('.bb-dialog-container-component', [
352
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
353
- opacity: 0,
354
- transform: 'scale(0.95)'
355
- }))
356
- ])
357
- ])
358
- ])
359
- ])
360
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogContainer, decorators: [{
336
+ BbDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogContainer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
337
+ BbDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogContainer, selector: "bb-dialog-container", host: { listeners: { "@bbDialogContainerAnimation.done": "onAnimationDone($event)" }, properties: { "@bbDialogContainerAnimation": "true" }, classAttribute: "bb-dialog-container" }, viewQueries: [{ propertyName: "insertion", first: true, predicate: BbDialogInsertion, descendants: true, static: true }], ngImport: i0, template: "<div class=\"bb-dialog-container-backdrop\"></div>\n\n<div class=\"bb-dialog-container-component\">\n <ng-container bbDialogInsertion></ng-container>\n</div>\n", styles: [".bb-dialog-container,.bb-dialog-container-backdrop{top:0;left:0;right:0;bottom:0;z-index:1000;position:fixed}.bb-dialog-container{display:flex}.bb-dialog-container-backdrop{will-change:opacity;background-color:#1119}.bb-dialog-container-component{width:100%;margin:auto;padding:20px;z-index:1001;display:block;will-change:opacity,transform}\n"], dependencies: [{ kind: "directive", type: BbDialogInsertion, selector: "[bbDialogInsertion]" }], animations: [bbDialogContainerAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogContainer, decorators: [{
362
339
  type: Component,
363
- args: [{ selector: 'bb-dialog-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-dialog-container', '[@bbDialogAnimation]': 'true' }, preserveWhitespaces: false, animations: [
364
- trigger('bbDialogAnimation', [
365
- transition(':enter', [
366
- group([
367
- query('.bb-dialog-container-backdrop', [
368
- style({
369
- opacity: 0
370
- }),
371
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
372
- opacity: 1
373
- }))
374
- ]),
375
- query('.bb-dialog-container-component', [
376
- style({
377
- transform: 'scale(0.95)'
378
- }),
379
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
380
- transform: 'scale(1)'
381
- }))
382
- ])
383
- ])
384
- ]),
385
- transition(':leave', [
386
- group([
387
- query('.bb-dialog-container-backdrop', [
388
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
389
- opacity: 0
390
- }))
391
- ]),
392
- query('.bb-dialog-container-component', [
393
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({
394
- opacity: 0,
395
- transform: 'scale(0.95)'
396
- }))
397
- ])
398
- ])
399
- ])
400
- ])
401
- ], template: "<div class=\"bb-dialog-container-backdrop\">\n</div>\n\n<div class=\"bb-dialog-container-component\">\n <ng-container bbDialogInsertion>\n </ng-container>\n</div>\n", styles: [".bb-dialog-container,.bb-dialog-container-backdrop{top:0;left:0;right:0;bottom:0;z-index:1000;position:fixed}.bb-dialog-container{display:flex}.bb-dialog-container-backdrop{background-color:#00000080}.bb-dialog-container-component{width:100%;margin:auto;padding:20px;z-index:1001;display:block}\n"] }]
402
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { insertion: [{
340
+ args: [{ selector: 'bb-dialog-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
341
+ 'class': 'bb-dialog-container',
342
+ '[@bbDialogContainerAnimation]': 'true'
343
+ }, preserveWhitespaces: false, animations: [bbDialogContainerAnimation], template: "<div class=\"bb-dialog-container-backdrop\"></div>\n\n<div class=\"bb-dialog-container-component\">\n <ng-container bbDialogInsertion></ng-container>\n</div>\n", styles: [".bb-dialog-container,.bb-dialog-container-backdrop{top:0;left:0;right:0;bottom:0;z-index:1000;position:fixed}.bb-dialog-container{display:flex}.bb-dialog-container-backdrop{will-change:opacity;background-color:#1119}.bb-dialog-container-component{width:100%;margin:auto;padding:20px;z-index:1001;display:block;will-change:opacity,transform}\n"] }]
344
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { insertion: [{
403
345
  type: ViewChild,
404
346
  args: [BbDialogInsertion, { static: true }]
405
347
  }], onAnimationDone: [{
406
348
  type: HostListener,
407
- args: ['@bbDialogAnimation.done', ['$event']]
349
+ args: ['@bbDialogContainerAnimation.done', ['$event']]
408
350
  }] } });
409
351
 
410
352
  let nextUniqueId = 0;
411
353
  class BbDialogConfirm {
412
- constructor(config, dialogRef) {
413
- this.config = config;
414
- this.dialogRef = dialogRef;
354
+ constructor(_config, _dialogRef) {
355
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
356
+ this._config = _config;
357
+ this._dialogRef = _dialogRef;
358
+ // Readonly data.
359
+ this.title = (_c = (_b = (_a = this._config) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : null;
360
+ this.description = (_f = (_e = (_d = this._config) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.description) !== null && _f !== void 0 ? _f : null;
361
+ this.cancelButtonText = (_j = (_h = (_g = this._config) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.cancelButtonText) !== null && _j !== void 0 ? _j : null;
362
+ this.confirmButtonText = (_m = (_l = (_k = this._config) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l.confirmButtonText) !== null && _m !== void 0 ? _m : null;
363
+ this.width = (_q = (_p = (_o = this._config) === null || _o === void 0 ? void 0 : _o.data) === null || _p === void 0 ? void 0 : _p.width) !== null && _q !== void 0 ? _q : null;
415
364
  // Id.
416
365
  this.dialogId = `bb-dialog-confirm-${nextUniqueId++}`;
417
366
  }
418
367
  ngAfterViewInit() {
368
+ var _a;
419
369
  // Initial focus the button.
420
- this.confirmButton.focus();
370
+ (_a = this.confirmButton) === null || _a === void 0 ? void 0 : _a.focus();
421
371
  }
422
372
  onClose(result) {
423
- this.dialogRef.close(result);
373
+ this._dialogRef.close(result);
424
374
  }
425
375
  }
426
- BbDialogConfirm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogConfirm, deps: [{ token: BbDialogConfig }, { token: BbDialogRef }], target: i0.ɵɵFactoryTarget.Component });
427
- BbDialogConfirm.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: BbDialogConfirm, selector: "bb-dialog-confirm", host: { classAttribute: "bb-dialog-confirm" }, viewQueries: [{ propertyName: "confirmButton", first: true, predicate: ["confirm"], descendants: true, read: BbButton }], ngImport: i0, template: "<div [attr.aria-labelledby]=\"dialogId\"\n bb-dialog-modal\n bbFocusTrap>\n <header bb-dialog-header>\n <h1 *ngIf=\"config?.data?.title as title\"\n [id]=\"dialogId\">\n {{ title | bbLocalize:{optional: true} }}\n </h1>\n </header>\n\n <p>\n {{ config?.data?.description | bbLocalize:{optional: true} }}\n </p>\n\n <footer bb-dialog-actions>\n <button *ngIf=\"config?.data?.cancelButtonText as cancelButtonText\"\n (click)=\"onClose(false)\"\n bb-button\n type=\"button\">\n {{ cancelButtonText | bbLocalize:{optional: true} }}\n </button>\n <button #confirm\n *ngIf=\"config?.data?.confirmButtonText as confirmButtonText\"\n (click)=\"onClose(true)\"\n bb-button\n type=\"button\"\n class=\"destructive\">\n {{ confirmButtonText | bbLocalize:{optional: true} }}\n </button>\n </footer>\n</div>\n", styles: [".bb-dialog-confirm{display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.BbFocusTrap, selector: "[bbFocusTrap]" }, { kind: "component", type: i4.BbButton, selector: "button[bb-button]", inputs: ["disabled", "loading"], exportAs: ["bbButton"] }, { kind: "component", type: BbDialogModal, selector: "[bb-dialog-modal]", inputs: ["maxWidth"] }, { kind: "component", type: BbDialogHeader, selector: "[bb-dialog-header]", inputs: ["iconName", "iconColor"], outputs: ["closeRequested"] }, { kind: "component", type: BbDialogActions, selector: "[bb-dialog-actions]" }, { kind: "pipe", type: i8.BbLocalize, name: "bbLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: BbDialogConfirm, decorators: [{
376
+ BbDialogConfirm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogConfirm, deps: [{ token: BbDialogConfig }, { token: BbDialogRef }], target: i0.ɵɵFactoryTarget.Component });
377
+ BbDialogConfirm.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbDialogConfirm, selector: "bb-dialog-confirm", host: { classAttribute: "bb-dialog-confirm" }, viewQueries: [{ propertyName: "confirmButton", first: true, predicate: ["confirm"], descendants: true, read: BbButton }], ngImport: i0, template: "<div [attr.aria-labelledby]=\"dialogId\"\n [maxWidth]=\"width\"\n bb-dialog-modal\n bbFocusTrap>\n <header bb-dialog-header>\n <h1 *ngIf=\"title as titleLabel\"\n [id]=\"dialogId\">\n {{ titleLabel | bbLocalize:{optional: true} }}\n </h1>\n </header>\n\n <p *ngIf=\"description as descriptionContent\"\n class=\"bb-dialog-confirm-description\">\n <ng-template [bbTemplate]=\"descriptionContent\">\n {{ $any(descriptionContent) | bbLocalize:{optional: true} }}\n </ng-template>\n </p>\n\n <footer bb-dialog-actions>\n <button *ngIf=\"cancelButtonText as cancelButtonTextLabel\"\n (click)=\"onClose(false)\"\n bb-button\n type=\"button\">\n {{ cancelButtonTextLabel | bbLocalize:{optional: true} }}\n </button>\n <button #confirm\n *ngIf=\"confirmButtonText as confirmButtonTextLabel\"\n (click)=\"onClose(true)\"\n bb-button\n type=\"button\"\n class=\"destructive\">\n {{ confirmButtonTextLabel | bbLocalize:{optional: true} }}\n </button>\n </footer>\n</div>\n", styles: [".bb-dialog-confirm{display:block}.bb-dialog-confirm-description{line-height:2}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }, { kind: "directive", type: i4.BbFocusTrap, selector: "[bbFocusTrap]" }, { kind: "component", type: i4.BbButton, selector: "button[bb-button]", inputs: ["disabled", "loading"], exportAs: ["bbButton"] }, { kind: "component", type: BbDialogModal, selector: "[bb-dialog-modal]", inputs: ["maxWidth"] }, { kind: "component", type: BbDialogHeader, selector: "[bb-dialog-header]", outputs: ["closeRequested"] }, { kind: "component", type: BbDialogActions, selector: "[bb-dialog-actions]" }, { kind: "pipe", type: i8.BbLocalize, name: "bbLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbDialogConfirm, decorators: [{
429
379
  type: Component,
430
- args: [{ selector: 'bb-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-confirm' }, template: "<div [attr.aria-labelledby]=\"dialogId\"\n bb-dialog-modal\n bbFocusTrap>\n <header bb-dialog-header>\n <h1 *ngIf=\"config?.data?.title as title\"\n [id]=\"dialogId\">\n {{ title | bbLocalize:{optional: true} }}\n </h1>\n </header>\n\n <p>\n {{ config?.data?.description | bbLocalize:{optional: true} }}\n </p>\n\n <footer bb-dialog-actions>\n <button *ngIf=\"config?.data?.cancelButtonText as cancelButtonText\"\n (click)=\"onClose(false)\"\n bb-button\n type=\"button\">\n {{ cancelButtonText | bbLocalize:{optional: true} }}\n </button>\n <button #confirm\n *ngIf=\"config?.data?.confirmButtonText as confirmButtonText\"\n (click)=\"onClose(true)\"\n bb-button\n type=\"button\"\n class=\"destructive\">\n {{ confirmButtonText | bbLocalize:{optional: true} }}\n </button>\n </footer>\n</div>\n", styles: [".bb-dialog-confirm{display:block}\n"] }]
380
+ args: [{ selector: 'bb-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: { 'class': 'bb-dialog-confirm' }, template: "<div [attr.aria-labelledby]=\"dialogId\"\n [maxWidth]=\"width\"\n bb-dialog-modal\n bbFocusTrap>\n <header bb-dialog-header>\n <h1 *ngIf=\"title as titleLabel\"\n [id]=\"dialogId\">\n {{ titleLabel | bbLocalize:{optional: true} }}\n </h1>\n </header>\n\n <p *ngIf=\"description as descriptionContent\"\n class=\"bb-dialog-confirm-description\">\n <ng-template [bbTemplate]=\"descriptionContent\">\n {{ $any(descriptionContent) | bbLocalize:{optional: true} }}\n </ng-template>\n </p>\n\n <footer bb-dialog-actions>\n <button *ngIf=\"cancelButtonText as cancelButtonTextLabel\"\n (click)=\"onClose(false)\"\n bb-button\n type=\"button\">\n {{ cancelButtonTextLabel | bbLocalize:{optional: true} }}\n </button>\n <button #confirm\n *ngIf=\"confirmButtonText as confirmButtonTextLabel\"\n (click)=\"onClose(true)\"\n bb-button\n type=\"button\"\n class=\"destructive\">\n {{ confirmButtonTextLabel | bbLocalize:{optional: true} }}\n </button>\n </footer>\n</div>\n", styles: [".bb-dialog-confirm{display:block}.bb-dialog-confirm-description{line-height:2}\n"] }]
431
381
  }], ctorParameters: function () { return [{ type: BbDialogConfig }, { type: BbDialogRef }]; }, propDecorators: { confirmButton: [{
432
382
  type: ViewChild,
433
- args: ['confirm', { read: BbButton }]
383
+ args: ['confirm', { read: BbButton, static: false }]
434
384
  }] } });
435
385
 
436
386
  class BbDialogInjector {
@@ -461,12 +411,14 @@ class Dialog {
461
411
  return this.createDialog(componentType, config);
462
412
  }
463
413
  confirm(title, description, options = {}) {
414
+ var _a, _b, _c;
464
415
  return this.open(BbDialogConfirm, {
465
416
  data: {
466
417
  title,
467
418
  description,
468
- cancelButtonText: options.cancelButtonText || 'dialog.default_cancel_button',
469
- confirmButtonText: options.confirmButtonText || 'dialog.default_confirm_button'
419
+ width: (_a = options === null || options === void 0 ? void 0 : options.width) !== null && _a !== void 0 ? _a : '420px',
420
+ cancelButtonText: (_b = options.cancelButtonText) !== null && _b !== void 0 ? _b : 'dialog.default_cancel_button',
421
+ confirmButtonText: (_c = options.confirmButtonText) !== null && _c !== void 0 ? _c : 'dialog.default_confirm_button'
470
422
  }
471
423
  });
472
424
  }
@@ -475,7 +427,7 @@ class Dialog {
475
427
  const dialogRef = new BbDialogRef();
476
428
  // Create a map with the config.
477
429
  const map = new WeakMap();
478
- map.set(BbDialogConfig, config);
430
+ map.set(BbDialogConfig, config !== null && config !== void 0 ? config : {});
479
431
  map.set(BbDialogRef, dialogRef);
480
432
  // Create a custom injector.
481
433
  const dialogInjector = new BbDialogInjector(this._injector, map);
@@ -515,9 +467,9 @@ class Dialog {
515
467
  dialogComponentRef = null;
516
468
  }
517
469
  }
518
- Dialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: Dialog, deps: [{ token: i0.Injector }, { token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
519
- Dialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: Dialog });
520
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: Dialog, decorators: [{
470
+ Dialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: Dialog, deps: [{ token: i0.Injector }, { token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
471
+ Dialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: Dialog });
472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: Dialog, decorators: [{
521
473
  type: Injectable
522
474
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }]; } });
523
475
 
@@ -529,8 +481,8 @@ class DialogModule {
529
481
  };
530
482
  }
531
483
  }
532
- DialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
533
- DialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: DialogModule, declarations: [BbDialogContainer,
484
+ DialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
485
+ DialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: DialogModule, declarations: [BbDialogContainer,
534
486
  BbDialogOverlay,
535
487
  BbDialogModal,
536
488
  BbDialogHeader,
@@ -544,10 +496,10 @@ DialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
544
496
  BbDialogHeader,
545
497
  BbDialogLink,
546
498
  BbDialogActions] });
547
- DialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: DialogModule, imports: [CommonModule,
499
+ DialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DialogModule, imports: [CommonModule,
548
500
  LocalizeModule,
549
501
  ElementsModule] });
550
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: DialogModule, decorators: [{
502
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DialogModule, decorators: [{
551
503
  type: NgModule,
552
504
  args: [{
553
505
  imports: [