@bravobit/bb-foundation 0.25.2 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/collections/lib/interfaces/collection.interface.d.ts +1 -1
  2. package/controls/lib/control-error/control-error.interface.d.ts +3 -3
  3. package/dialog/lib/dialog.service.d.ts +1 -1
  4. package/elements/lib/elements.interfaces.d.ts +2 -2
  5. package/esm2020/auth/lib/auth.interceptor.mjs +3 -3
  6. package/esm2020/auth/lib/auth.module.mjs +4 -4
  7. package/esm2020/auth/lib/auth.service.mjs +3 -3
  8. package/esm2020/auth/lib/directives/authenticated.directive.mjs +9 -9
  9. package/esm2020/auth/lib/guards/anonymous.guard.mjs +3 -3
  10. package/esm2020/auth/lib/guards/authenticated.guard.mjs +3 -3
  11. package/esm2020/collections/lib/collections.module.mjs +4 -4
  12. package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +3 -3
  13. package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +3 -3
  14. package/esm2020/collections/lib/components/collections.directive.mjs +12 -12
  15. package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +22 -22
  16. package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +12 -12
  17. package/esm2020/controls/lib/checkbox/checkbox.module.mjs +4 -4
  18. package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +8 -8
  19. package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +3 -3
  20. package/esm2020/controls/lib/control-error/control-error.module.mjs +4 -4
  21. package/esm2020/controls/lib/controls.module.mjs +4 -4
  22. package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +15 -15
  23. package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +3 -3
  24. package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +3 -3
  25. package/esm2020/controls/lib/form-control/form-control.module.mjs +4 -4
  26. package/esm2020/controls/lib/radio/radio-button/radio-button.component.mjs +12 -12
  27. package/esm2020/controls/lib/radio/radio-group/radio-group.component.mjs +25 -25
  28. package/esm2020/controls/lib/radio/radio.module.mjs +4 -4
  29. package/esm2020/controls/lib/toggle/toggle/toggle.component.mjs +20 -20
  30. package/esm2020/controls/lib/toggle/toggle-group/toggle-group.component.mjs +12 -12
  31. package/esm2020/controls/lib/toggle/toggle.module.mjs +4 -4
  32. package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +3 -3
  33. package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +3 -3
  34. package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +3 -3
  35. package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +3 -3
  36. package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +3 -3
  37. package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +3 -3
  38. package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +3 -3
  39. package/esm2020/dashboard/lib/dashboard.module.mjs +4 -4
  40. package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +3 -3
  41. package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +3 -3
  42. package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +7 -7
  43. package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +3 -3
  44. package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +3 -3
  45. package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +7 -7
  46. package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +3 -3
  47. package/esm2020/dialog/lib/dialog.insertion.mjs +3 -3
  48. package/esm2020/dialog/lib/dialog.module.mjs +4 -4
  49. package/esm2020/dialog/lib/dialog.service.mjs +8 -6
  50. package/esm2020/elements/lib/avatar/avatar.component.mjs +3 -3
  51. package/esm2020/elements/lib/button/button.component.mjs +10 -10
  52. package/esm2020/elements/lib/checkbox/checkbox.component.mjs +11 -11
  53. package/esm2020/elements/lib/date-picker/date-picker.component.mjs +14 -14
  54. package/esm2020/elements/lib/directives/addon.directive.mjs +6 -6
  55. package/esm2020/elements/lib/directives/form-submit.directive.mjs +3 -3
  56. package/esm2020/elements/lib/directives/form-submitter.directive.mjs +3 -3
  57. package/esm2020/elements/lib/directives/input.directive.mjs +6 -6
  58. package/esm2020/elements/lib/dropdown/dropdown.component.mjs +6 -6
  59. package/esm2020/elements/lib/elements.module.mjs +4 -4
  60. package/esm2020/elements/lib/file-picker/file-picker.component.mjs +3 -3
  61. package/esm2020/elements/lib/form-control/form-control.component.mjs +3 -3
  62. package/esm2020/elements/lib/form-error/form-error.component.mjs +11 -11
  63. package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
  64. package/esm2020/elements/lib/icon/icon.component.mjs +17 -17
  65. package/esm2020/elements/lib/image-picker/image-picker.component.mjs +3 -3
  66. package/esm2020/elements/lib/pipes/file-image.pipe.mjs +3 -3
  67. package/esm2020/elements/lib/pipes/file-size.pipe.mjs +3 -3
  68. package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +3 -3
  69. package/esm2020/elements/lib/spinner/spinner.component.mjs +3 -3
  70. package/esm2020/elements/lib/tag/tag.component.mjs +3 -3
  71. package/esm2020/http/lib/http.module.mjs +4 -4
  72. package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +3 -3
  73. package/esm2020/http/lib/interceptors/error.interceptor.mjs +3 -3
  74. package/esm2020/lib/core/mixins/can-disable.mjs +5 -5
  75. package/esm2020/lib/core/mixins/can-hide-errors.mjs +5 -5
  76. package/esm2020/lib/core/mixins/can-load.mjs +5 -5
  77. package/esm2020/lib/core/mixins/has-error.mjs +5 -5
  78. package/esm2020/lib/core/mixins/is-focused.mjs +5 -5
  79. package/esm2020/lib/core/mixins/is-grouped.mjs +5 -5
  80. package/esm2020/lib/core/mixins/is-readonly.mjs +5 -5
  81. package/esm2020/lib/core/mixins/is-required.mjs +5 -5
  82. package/esm2020/lib/core/services/clipboard.service.mjs +3 -3
  83. package/esm2020/lib/core/services/exif.service.mjs +3 -3
  84. package/esm2020/lib/core/services/file-loader.service.mjs +3 -3
  85. package/esm2020/lib/core/services/image-converter.service.mjs +3 -3
  86. package/esm2020/lib/core/services/languages.service.mjs +3 -3
  87. package/esm2020/lib/core/services/network.service.mjs +3 -3
  88. package/esm2020/lib/core/services/patch.service.mjs +3 -3
  89. package/esm2020/localize/lib/localize.module.mjs +4 -4
  90. package/esm2020/localize/lib/localize.pipe.mjs +3 -3
  91. package/esm2020/localize/lib/localize.service.mjs +3 -3
  92. package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +11 -11
  93. package/esm2020/localize/lib/views/localize-template.directive.mjs +3 -3
  94. package/esm2020/masking/lib/directives/currency-mask.directive.mjs +3 -3
  95. package/esm2020/masking/lib/directives/date-mask.directive.mjs +5 -5
  96. package/esm2020/masking/lib/directives/input-mask.directive.mjs +11 -11
  97. package/esm2020/masking/lib/masking.module.mjs +4 -4
  98. package/esm2020/masking/lib/masking.service.mjs +3 -3
  99. package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +7 -7
  100. package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +3 -3
  101. package/esm2020/notifications/lib/notifications.module.mjs +4 -4
  102. package/esm2020/notifications/lib/notifications.service.mjs +3 -3
  103. package/esm2020/permissions/lib/directives/permission.directive.mjs +17 -17
  104. package/esm2020/permissions/lib/guards/permission.guard.mjs +3 -3
  105. package/esm2020/permissions/lib/permissions.module.mjs +4 -4
  106. package/esm2020/permissions/lib/permissions.service.mjs +3 -3
  107. package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
  108. package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +3 -3
  109. package/esm2020/recaptcha/lib/recaptcha.module.mjs +4 -4
  110. package/esm2020/storage/lib/storage.service.mjs +3 -3
  111. package/esm2020/table/lib/components/table/table.component.mjs +9 -9
  112. package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +3 -3
  113. package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +15 -15
  114. package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +3 -3
  115. package/esm2020/table/lib/table.module.mjs +4 -4
  116. package/esm2020/theming/lib/theming.directive.mjs +9 -9
  117. package/esm2020/theming/lib/theming.module.mjs +4 -4
  118. package/esm2020/tooltip/bravobit-bb-foundation-tooltip.mjs +5 -0
  119. package/esm2020/tooltip/lib/tooltip-container/tooltip-container.component.mjs +31 -0
  120. package/esm2020/tooltip/lib/tooltip.directive.mjs +140 -0
  121. package/esm2020/tooltip/lib/tooltip.interfaces.mjs +4 -0
  122. package/esm2020/tooltip/lib/tooltip.module.mjs +31 -0
  123. package/esm2020/tooltip/public_api.mjs +5 -0
  124. package/esm2020/utils/lib/directives/autosize.directive.mjs +3 -3
  125. package/esm2020/utils/lib/directives/focus-trap.directive.mjs +3 -3
  126. package/esm2020/utils/lib/directives/focus.directive.mjs +3 -3
  127. package/esm2020/utils/lib/directives/template.directive.mjs +8 -8
  128. package/esm2020/utils/lib/utils.module.mjs +4 -4
  129. package/fesm2015/bravobit-bb-foundation-auth.mjs +24 -25
  130. package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -1
  131. package/fesm2015/bravobit-bb-foundation-collections.mjs +22 -22
  132. package/fesm2015/bravobit-bb-foundation-controls.mjs +151 -152
  133. package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
  134. package/fesm2015/bravobit-bb-foundation-dashboard.mjs +25 -26
  135. package/fesm2015/bravobit-bb-foundation-dialog.mjs +44 -41
  136. package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
  137. package/fesm2015/bravobit-bb-foundation-elements.mjs +117 -118
  138. package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
  139. package/fesm2015/bravobit-bb-foundation-http.mjs +10 -11
  140. package/fesm2015/bravobit-bb-foundation-localize.mjs +23 -24
  141. package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
  142. package/fesm2015/bravobit-bb-foundation-masking.mjs +24 -25
  143. package/fesm2015/bravobit-bb-foundation-masking.mjs.map +1 -1
  144. package/fesm2015/bravobit-bb-foundation-notifications.mjs +16 -17
  145. package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
  146. package/fesm2015/bravobit-bb-foundation-permissions.mjs +26 -27
  147. package/fesm2015/bravobit-bb-foundation-permissions.mjs.map +1 -1
  148. package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +10 -11
  149. package/fesm2015/bravobit-bb-foundation-rxjs.mjs +0 -1
  150. package/fesm2015/bravobit-bb-foundation-storage.mjs +3 -4
  151. package/fesm2015/bravobit-bb-foundation-table.mjs +33 -34
  152. package/fesm2015/bravobit-bb-foundation-table.mjs.map +1 -1
  153. package/fesm2015/bravobit-bb-foundation-theming.mjs +12 -13
  154. package/fesm2015/bravobit-bb-foundation-theming.mjs.map +1 -1
  155. package/fesm2015/bravobit-bb-foundation-tooltip.mjs +210 -0
  156. package/fesm2015/bravobit-bb-foundation-tooltip.mjs.map +1 -0
  157. package/fesm2015/bravobit-bb-foundation-utils.mjs +20 -21
  158. package/fesm2015/bravobit-bb-foundation-utils.mjs.map +1 -1
  159. package/fesm2015/bravobit-bb-foundation.mjs +53 -54
  160. package/fesm2015/bravobit-bb-foundation.mjs.map +1 -1
  161. package/fesm2020/bravobit-bb-foundation-auth.mjs +24 -25
  162. package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -1
  163. package/fesm2020/bravobit-bb-foundation-collections.mjs +22 -22
  164. package/fesm2020/bravobit-bb-foundation-controls.mjs +151 -152
  165. package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
  166. package/fesm2020/bravobit-bb-foundation-dashboard.mjs +25 -26
  167. package/fesm2020/bravobit-bb-foundation-dialog.mjs +41 -41
  168. package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
  169. package/fesm2020/bravobit-bb-foundation-elements.mjs +116 -117
  170. package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
  171. package/fesm2020/bravobit-bb-foundation-http.mjs +10 -11
  172. package/fesm2020/bravobit-bb-foundation-localize.mjs +23 -24
  173. package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
  174. package/fesm2020/bravobit-bb-foundation-masking.mjs +24 -25
  175. package/fesm2020/bravobit-bb-foundation-masking.mjs.map +1 -1
  176. package/fesm2020/bravobit-bb-foundation-notifications.mjs +16 -17
  177. package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
  178. package/fesm2020/bravobit-bb-foundation-permissions.mjs +26 -27
  179. package/fesm2020/bravobit-bb-foundation-permissions.mjs.map +1 -1
  180. package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +10 -11
  181. package/fesm2020/bravobit-bb-foundation-rxjs.mjs +0 -1
  182. package/fesm2020/bravobit-bb-foundation-storage.mjs +3 -4
  183. package/fesm2020/bravobit-bb-foundation-table.mjs +33 -34
  184. package/fesm2020/bravobit-bb-foundation-table.mjs.map +1 -1
  185. package/fesm2020/bravobit-bb-foundation-theming.mjs +12 -13
  186. package/fesm2020/bravobit-bb-foundation-theming.mjs.map +1 -1
  187. package/fesm2020/bravobit-bb-foundation-tooltip.mjs +203 -0
  188. package/fesm2020/bravobit-bb-foundation-tooltip.mjs.map +1 -0
  189. package/fesm2020/bravobit-bb-foundation-utils.mjs +20 -21
  190. package/fesm2020/bravobit-bb-foundation-utils.mjs.map +1 -1
  191. package/fesm2020/bravobit-bb-foundation.mjs +53 -54
  192. package/fesm2020/bravobit-bb-foundation.mjs.map +1 -1
  193. package/http/lib/http.interfaces.d.ts +1 -1
  194. package/lib/core/mixins/can-disable.d.ts +1 -1
  195. package/lib/core/mixins/can-hide-errors.d.ts +1 -1
  196. package/lib/core/mixins/can-load.d.ts +1 -1
  197. package/lib/core/mixins/constructor.d.ts +1 -1
  198. package/lib/core/mixins/has-error.d.ts +1 -1
  199. package/lib/core/mixins/is-focused.d.ts +1 -1
  200. package/lib/core/mixins/is-grouped.d.ts +1 -1
  201. package/lib/core/mixins/is-readonly.d.ts +1 -1
  202. package/lib/core/mixins/is-required.d.ts +1 -1
  203. package/localize/lib/dictionary/dictionary.data.d.ts +1 -1
  204. package/masking/lib/input-mask.interface.d.ts +3 -3
  205. package/package.json +13 -5
  206. package/permissions/lib/permissions.interface.d.ts +2 -2
  207. package/recaptcha/lib/recaptcha.interface.d.ts +2 -2
  208. package/rxjs/lib/operators/combine-latest-map.operator.d.ts +1 -1
  209. package/table/lib/interfaces/table.interfaces.d.ts +1 -1
  210. package/theming/lib/theming.interface.d.ts +6 -6
  211. package/theming/lib/utils/theming.variable.d.ts +1 -1
  212. package/tooltip/index.d.ts +5 -0
  213. package/tooltip/lib/tooltip-container/tooltip-container.component.d.ts +10 -0
  214. package/tooltip/lib/tooltip.directive.d.ts +32 -0
  215. package/tooltip/lib/tooltip.interfaces.d.ts +4 -0
  216. package/tooltip/lib/tooltip.module.d.ts +10 -0
  217. package/tooltip/public_api.d.ts +4 -0
@@ -0,0 +1,210 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, Injector, Directive, Input, HostListener, NgModule } from '@angular/core';
3
+ import * as i1 from '@bravobit/bb-foundation/utils';
4
+ import { UtilsModule } from '@bravobit/bb-foundation/utils';
5
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
6
+ import { ComponentPortal } from '@angular/cdk/portal';
7
+ import * as i1$1 from '@angular/cdk/overlay';
8
+ import { OverlayModule } from '@angular/cdk/overlay';
9
+
10
+ const TOOLTIP_DATA = new InjectionToken('Data to display in tooltip');
11
+ const TOOLTIP_CLASS = new InjectionToken('Class to display in tooltip');
12
+
13
+ class TooltipContainerComponent {
14
+ constructor(data, classes) {
15
+ this.data = data;
16
+ this.classes = classes;
17
+ }
18
+ get classBinding() {
19
+ return [this.classes]
20
+ .filter(item => !!item)
21
+ .join(' ');
22
+ }
23
+ }
24
+ TooltipContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TooltipContainerComponent, deps: [{ token: TOOLTIP_DATA }, { token: TOOLTIP_CLASS }], target: i0.ɵɵFactoryTarget.Component });
25
+ TooltipContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: TooltipContainerComponent, selector: "bb-tooltip-container", host: { properties: { "class": "this.classBinding" }, classAttribute: "bb-tooltip-container" }, ngImport: i0, template: "<ng-template [bbTemplate]=\"data\">\n {{ data }}\n</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;font-size:14px;max-width:400px;padding:8px 10px;-webkit-user-select:none;user-select:none;position:relative;border-radius:4px;pointer-events:none;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:#111111e6}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.bb-tooltip-container>small{display:block;font-size:12px;margin-top:4px;color:#fff6}.bb-tooltip-container-bottom,.bb-tooltip-container-top,.bb-tooltip-container-left,.bb-tooltip-container-right{pointer-events:none}.bb-tooltip-container-top .bb-tooltip-container:after{left:50%;top:100%;transform:translate(-50%);border-width:6px 6px 0 6px;border-color:rgba(17,17,17,.9) transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent rgba(17,17,17,.9) transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent rgba(17,17,17,.9)}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent rgba(17,17,17,.9) transparent transparent}\n"], dependencies: [{ kind: "directive", type: i1.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TooltipContainerComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: 'bb-tooltip-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-tooltip-container' }, preserveWhitespaces: false, template: "<ng-template [bbTemplate]=\"data\">\n {{ data }}\n</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;font-size:14px;max-width:400px;padding:8px 10px;-webkit-user-select:none;user-select:none;position:relative;border-radius:4px;pointer-events:none;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:#111111e6}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.bb-tooltip-container>small{display:block;font-size:12px;margin-top:4px;color:#fff6}.bb-tooltip-container-bottom,.bb-tooltip-container-top,.bb-tooltip-container-left,.bb-tooltip-container-right{pointer-events:none}.bb-tooltip-container-top .bb-tooltip-container:after{left:50%;top:100%;transform:translate(-50%);border-width:6px 6px 0 6px;border-color:rgba(17,17,17,.9) transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent rgba(17,17,17,.9) transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent rgba(17,17,17,.9)}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent rgba(17,17,17,.9) transparent transparent}\n"] }]
29
+ }], ctorParameters: function () {
30
+ return [{ type: undefined, decorators: [{
31
+ type: Inject,
32
+ args: [TOOLTIP_DATA]
33
+ }] }, { type: undefined, decorators: [{
34
+ type: Inject,
35
+ args: [TOOLTIP_CLASS]
36
+ }] }];
37
+ }, propDecorators: { classBinding: [{
38
+ type: HostBinding,
39
+ args: ['class']
40
+ }] } });
41
+
42
+ class TooltipDirective {
43
+ // Disabled.
44
+ get bbTooltipDisabled() {
45
+ return this._bbTooltipDisabled;
46
+ }
47
+ set bbTooltipDisabled(value) {
48
+ const newValue = coerceBooleanProperty(value);
49
+ if (newValue !== this.bbTooltipDisabled) {
50
+ this._bbTooltipDisabled = newValue;
51
+ this._changeDetectorRef.markForCheck();
52
+ }
53
+ }
54
+ constructor(_overlay, _viewContainer, _elementRef, _changeDetectorRef) {
55
+ this._overlay = _overlay;
56
+ this._viewContainer = _viewContainer;
57
+ this._elementRef = _elementRef;
58
+ this._changeDetectorRef = _changeDetectorRef;
59
+ this.bbTooltipClass = null;
60
+ this.bbTooltipOrigin = null;
61
+ this.bbTooltipPositions = [];
62
+ this._bbTooltipDisabled = false;
63
+ // State.
64
+ this._overlayRef = null;
65
+ }
66
+ showTooltip() {
67
+ var _a;
68
+ if (((_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()) || this.bbTooltipDisabled) {
69
+ return;
70
+ }
71
+ this.attachTooltip();
72
+ }
73
+ hideTooltip() {
74
+ var _a, _b;
75
+ if (!((_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached())) {
76
+ return;
77
+ }
78
+ (_b = this._overlayRef) === null || _b === void 0 ? void 0 : _b.detach();
79
+ }
80
+ ngOnDestroy() {
81
+ var _a;
82
+ (_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.dispose();
83
+ }
84
+ attachTooltip() {
85
+ if (this._overlayRef === null) {
86
+ const positionStrategy = this.getPositionStrategy();
87
+ const scrollStrategy = this._overlay.scrollStrategies.reposition();
88
+ this._overlayRef = this._overlay.create({ positionStrategy, scrollStrategy });
89
+ }
90
+ const injector = Injector.create({
91
+ providers: [
92
+ { provide: TOOLTIP_DATA, useValue: this.bbTooltip },
93
+ { provide: TOOLTIP_CLASS, useValue: this.bbTooltipClass }
94
+ ]
95
+ });
96
+ const component = new ComponentPortal(TooltipContainerComponent, this._viewContainer, injector);
97
+ this._overlayRef.attach(component);
98
+ }
99
+ getPositionStrategy() {
100
+ var _a;
101
+ const element = (_a = this.bbTooltipOrigin) !== null && _a !== void 0 ? _a : this._elementRef;
102
+ const positions = this.getPositions();
103
+ return this._overlay
104
+ .position()
105
+ .flexibleConnectedTo(element)
106
+ .withPositions(positions);
107
+ }
108
+ getPositions() {
109
+ var _a;
110
+ if (((_a = this.bbTooltipPositions) === null || _a === void 0 ? void 0 : _a.length) > 0) {
111
+ return this.bbTooltipPositions;
112
+ }
113
+ return [
114
+ {
115
+ originX: 'center',
116
+ originY: 'top',
117
+ overlayX: 'center',
118
+ overlayY: 'bottom',
119
+ offsetY: -10,
120
+ panelClass: 'bb-tooltip-container-top'
121
+ },
122
+ {
123
+ originX: 'center',
124
+ originY: 'bottom',
125
+ overlayX: 'center',
126
+ overlayY: 'top',
127
+ offsetY: 10,
128
+ panelClass: 'bb-tooltip-container-bottom'
129
+ },
130
+ {
131
+ originX: 'start',
132
+ originY: 'center',
133
+ overlayX: 'end',
134
+ overlayY: 'center',
135
+ offsetX: -10,
136
+ panelClass: 'bb-tooltip-container-left'
137
+ },
138
+ {
139
+ originX: 'end',
140
+ originY: 'center',
141
+ overlayX: 'start',
142
+ overlayY: 'center',
143
+ offsetX: 10,
144
+ panelClass: 'bb-tooltip-container-right'
145
+ }
146
+ ];
147
+ }
148
+ }
149
+ TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
150
+ TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: TooltipDirective, selector: "[bbTooltip]", inputs: { bbTooltip: "bbTooltip", bbTooltipClass: "bbTooltipClass", bbTooltipOrigin: "bbTooltipOrigin", bbTooltipPositions: "bbTooltipPositions", bbTooltipDisabled: "bbTooltipDisabled" }, host: { listeners: { "mouseenter": "showTooltip()", "focus": "showTooltip()", "mouseleave": "hideTooltip()", "blur": "hideTooltip()" } }, ngImport: i0 });
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TooltipDirective, decorators: [{
152
+ type: Directive,
153
+ args: [{
154
+ selector: '[bbTooltip]'
155
+ }]
156
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { bbTooltip: [{
157
+ type: Input
158
+ }], bbTooltipClass: [{
159
+ type: Input
160
+ }], bbTooltipOrigin: [{
161
+ type: Input
162
+ }], bbTooltipPositions: [{
163
+ type: Input
164
+ }], bbTooltipDisabled: [{
165
+ type: Input
166
+ }], showTooltip: [{
167
+ type: HostListener,
168
+ args: ['mouseenter']
169
+ }, {
170
+ type: HostListener,
171
+ args: ['focus']
172
+ }], hideTooltip: [{
173
+ type: HostListener,
174
+ args: ['mouseleave']
175
+ }, {
176
+ type: HostListener,
177
+ args: ['blur']
178
+ }] } });
179
+
180
+ class TooltipModule {
181
+ }
182
+ TooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
183
+ TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.0", ngImport: i0, type: TooltipModule, declarations: [TooltipContainerComponent,
184
+ TooltipDirective], imports: [UtilsModule,
185
+ OverlayModule], exports: [TooltipDirective] });
186
+ TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TooltipModule, imports: [UtilsModule,
187
+ OverlayModule] });
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: TooltipModule, decorators: [{
189
+ type: NgModule,
190
+ args: [{
191
+ imports: [
192
+ UtilsModule,
193
+ OverlayModule
194
+ ],
195
+ declarations: [
196
+ TooltipContainerComponent,
197
+ TooltipDirective
198
+ ],
199
+ exports: [
200
+ TooltipDirective
201
+ ]
202
+ }]
203
+ }] });
204
+
205
+ /**
206
+ * Generated bundle index. Do not edit.
207
+ */
208
+
209
+ export { TOOLTIP_CLASS, TOOLTIP_DATA, TooltipContainerComponent, TooltipDirective, TooltipModule };
210
+ //# sourceMappingURL=bravobit-bb-foundation-tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bravobit-bb-foundation-tooltip.mjs","sources":["../../../projects/bb-foundation/tooltip/src/lib/tooltip.interfaces.ts","../../../projects/bb-foundation/tooltip/src/lib/tooltip-container/tooltip-container.component.ts","../../../projects/bb-foundation/tooltip/src/lib/tooltip-container/tooltip-container.component.html","../../../projects/bb-foundation/tooltip/src/lib/tooltip.directive.ts","../../../projects/bb-foundation/tooltip/src/lib/tooltip.module.ts","../../../projects/bb-foundation/tooltip/src/bravobit-bb-foundation-tooltip.ts"],"sourcesContent":["import {InjectionToken, TemplateRef} from '@angular/core';\n\nexport type TooltipData = string | TemplateRef<void>;\n\nexport const TOOLTIP_DATA = new InjectionToken<TooltipData>('Data to display in tooltip');\nexport const TOOLTIP_CLASS = new InjectionToken<string>('Class to display in tooltip');\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject, ViewEncapsulation} from '@angular/core';\nimport {TOOLTIP_CLASS, TOOLTIP_DATA, TooltipData} from '../tooltip.interfaces';\n\n@Component({\n selector: 'bb-tooltip-container',\n templateUrl: './tooltip-container.component.html',\n styleUrls: ['./tooltip-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {'class': 'bb-tooltip-container'},\n preserveWhitespaces: false\n\n})\nexport class TooltipContainerComponent {\n\n constructor(@Inject(TOOLTIP_DATA) public data: TooltipData,\n @Inject(TOOLTIP_CLASS) public classes: string) {\n }\n\n @HostBinding('class')\n get classBinding() {\n return [this.classes]\n .filter(item => !!item)\n .join(' ');\n }\n\n}\n","<ng-template [bbTemplate]=\"data\">\n {{ data }}\n</ng-template>\n","import {ChangeDetectorRef, Directive, ElementRef, HostListener, Injector, Input, OnDestroy, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {TooltipContainerComponent} from './tooltip-container/tooltip-container.component';\nimport {ConnectedPosition, Overlay, OverlayRef} from '@angular/cdk/overlay';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {TOOLTIP_CLASS, TOOLTIP_DATA} from './tooltip.interfaces';\nimport {ComponentPortal} from '@angular/cdk/portal';\n\n@Directive({\n selector: '[bbTooltip]'\n})\nexport class TooltipDirective implements OnDestroy {\n\n // Inputs.\n @Input() bbTooltip!: string | TemplateRef<void>;\n @Input() bbTooltipClass: string | null = null;\n @Input() bbTooltipOrigin: HTMLElement | null = null;\n @Input() bbTooltipPositions: ConnectedPosition[] = [];\n\n // Disabled.\n @Input()\n get bbTooltipDisabled(): boolean {\n return this._bbTooltipDisabled;\n }\n\n set bbTooltipDisabled(value: BooleanInput) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this.bbTooltipDisabled) {\n this._bbTooltipDisabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n private _bbTooltipDisabled: boolean = false;\n\n // State.\n private _overlayRef: OverlayRef | null = null;\n\n constructor(private _overlay: Overlay,\n private _viewContainer: ViewContainerRef,\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef) {\n }\n\n @HostListener('mouseenter')\n @HostListener('focus')\n showTooltip() {\n if (this._overlayRef?.hasAttached() || this.bbTooltipDisabled) {\n return;\n }\n this.attachTooltip();\n }\n\n @HostListener('mouseleave')\n @HostListener('blur')\n hideTooltip() {\n if (!this._overlayRef?.hasAttached()) {\n return;\n }\n this._overlayRef?.detach();\n }\n\n ngOnDestroy() {\n this._overlayRef?.dispose();\n }\n\n private attachTooltip() {\n if (this._overlayRef === null) {\n const positionStrategy = this.getPositionStrategy();\n const scrollStrategy = this._overlay.scrollStrategies.reposition();\n this._overlayRef = this._overlay.create({positionStrategy, scrollStrategy});\n }\n\n const injector = Injector.create({\n providers: [\n {provide: TOOLTIP_DATA, useValue: this.bbTooltip},\n {provide: TOOLTIP_CLASS, useValue: this.bbTooltipClass}\n ]\n });\n const component = new ComponentPortal(TooltipContainerComponent, this._viewContainer, injector);\n this._overlayRef.attach(component);\n }\n\n private getPositionStrategy() {\n const element = this.bbTooltipOrigin ?? this._elementRef;\n const positions = this.getPositions();\n\n return this._overlay\n .position()\n .flexibleConnectedTo(element)\n .withPositions(positions);\n }\n\n private getPositions() {\n if (this.bbTooltipPositions?.length > 0) {\n return this.bbTooltipPositions;\n }\n\n return [\n {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -10,\n panelClass: 'bb-tooltip-container-top'\n },\n {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 10,\n panelClass: 'bb-tooltip-container-bottom'\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -10,\n panelClass: 'bb-tooltip-container-left'\n },\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: 10,\n panelClass: 'bb-tooltip-container-right'\n }\n ] satisfies ConnectedPosition[];\n }\n\n static ngAcceptInputType_bbTooltip: string | TemplateRef<void>;\n static ngAcceptInputType_bbTooltipClass: string | null;\n static ngAcceptInputType_bbTooltipOrigin: HTMLElement | null;\n static ngAcceptInputType_bbTooltipDisabled: BooleanInput;\n static ngAcceptInputType_bbTooltipPositions: ConnectedPosition[];\n\n}\n","import {TooltipContainerComponent} from './tooltip-container/tooltip-container.component';\nimport {UtilsModule} from '@bravobit/bb-foundation/utils';\nimport {TooltipDirective} from './tooltip.directive';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n imports: [\n UtilsModule,\n OverlayModule\n ],\n declarations: [\n TooltipContainerComponent,\n TooltipDirective\n ],\n exports: [\n TooltipDirective\n ]\n})\nexport class TooltipModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;MAIa,YAAY,GAAG,IAAI,cAAc,CAAc,4BAA4B,EAAE;MAC7E,aAAa,GAAG,IAAI,cAAc,CAAS,6BAA6B;;MCQxE,yBAAyB,CAAA;IAElC,WAAyC,CAAA,IAAiB,EAChB,OAAe,EAAA;AADhB,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAa;AAChB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;KACxD;AAED,IAAA,IACI,YAAY,GAAA;AACZ,QAAA,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;aAChB,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC;aACtB,IAAI,CAAC,GAAG,CAAC,CAAC;KAClB;;sHAXQ,yBAAyB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAEd,YAAY,EAAA,EAAA,EAAA,KAAA,EACZ,aAAa,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAHxB,yBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,4JCbtC,uEAGA,EAAA,MAAA,EAAA,C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EAAA,EAAA,IAAA,EAAA,aAAa,iBAPlB,yBAAyB;AACzB,QAAA,gBAAgB,aALhB,WAAW;QACX,aAAa,aAOb,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGX,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAXlB,WAAW;QACX,aAAa,CAAA,EAAA,CAAA,CAAA;2FAUR,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,aAAa;AAChB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,yBAAyB;wBACzB,gBAAgB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;AACnB,qBAAA;iBACJ,CAAA;;;AClBD;;AAEG;;;;"}
@@ -3,10 +3,6 @@ import { TemplateRef, Directive, Input, HostBinding, HostListener, NgModule } fr
3
3
  import * as i1 from '@angular/cdk/platform';
4
4
 
5
5
  class BbTemplate {
6
- constructor(_templateRef, _viewContainerRef) {
7
- this._templateRef = _templateRef;
8
- this._viewContainerRef = _viewContainerRef;
9
- }
10
6
  set bbTemplate(content) {
11
7
  // Get the template.
12
8
  const template = content instanceof TemplateRef
@@ -16,10 +12,14 @@ class BbTemplate {
16
12
  this._viewContainerRef.clear();
17
13
  this._viewContainerRef.createEmbeddedView(template);
18
14
  }
15
+ constructor(_templateRef, _viewContainerRef) {
16
+ this._templateRef = _templateRef;
17
+ this._viewContainerRef = _viewContainerRef;
18
+ }
19
19
  }
20
- BbTemplate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbTemplate, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
21
- BbTemplate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: BbTemplate, selector: "[bbTemplate]", inputs: { bbTemplate: "bbTemplate" }, ngImport: i0 });
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbTemplate, decorators: [{
20
+ BbTemplate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbTemplate, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
21
+ BbTemplate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: BbTemplate, selector: "[bbTemplate]", inputs: { bbTemplate: "bbTemplate" }, ngImport: i0 });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbTemplate, decorators: [{
23
23
  type: Directive,
24
24
  args: [{
25
25
  selector: '[bbTemplate]'
@@ -70,9 +70,9 @@ class BbAutosize {
70
70
  this._renderer.setStyle(this.element, 'height', value);
71
71
  }
72
72
  }
73
- BbAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbAutosize, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
74
- BbAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", 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 });
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbAutosize, decorators: [{
73
+ BbAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbAutosize, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
74
+ BbAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", 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 });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbAutosize, decorators: [{
76
76
  type: Directive,
77
77
  args: [{
78
78
  selector: 'textarea[bbAutosize]'
@@ -126,9 +126,9 @@ class BbFocus {
126
126
  setTimeout(() => this.nativeElement.focus(), 0);
127
127
  }
128
128
  }
129
- BbFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbFocus, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
130
- BbFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: BbFocus, selector: "[bbFocus]", ngImport: i0 });
131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbFocus, decorators: [{
129
+ BbFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbFocus, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
130
+ BbFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: BbFocus, selector: "[bbFocus]", ngImport: i0 });
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbFocus, decorators: [{
132
132
  type: Directive,
133
133
  args: [{
134
134
  selector: '[bbFocus]'
@@ -197,9 +197,9 @@ class BbFocusTrap {
197
197
  return Array(...nodes);
198
198
  }
199
199
  }
200
- BbFocusTrap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbFocusTrap, deps: [{ token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
201
- BbFocusTrap.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: BbFocusTrap, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BbFocusTrap, decorators: [{
200
+ BbFocusTrap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbFocusTrap, deps: [{ token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
201
+ BbFocusTrap.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: BbFocusTrap, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: BbFocusTrap, decorators: [{
203
203
  type: Directive,
204
204
  args: [{
205
205
  selector: '[bbFocusTrap]'
@@ -211,16 +211,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
211
211
 
212
212
  class UtilsModule {
213
213
  }
214
- UtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
215
- UtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: UtilsModule, declarations: [BbTemplate,
214
+ UtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
215
+ UtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.0", ngImport: i0, type: UtilsModule, declarations: [BbTemplate,
216
216
  BbAutosize,
217
217
  BbFocus,
218
218
  BbFocusTrap], exports: [BbTemplate,
219
219
  BbAutosize,
220
220
  BbFocus,
221
221
  BbFocusTrap] });
222
- UtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UtilsModule });
223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UtilsModule, decorators: [{
222
+ UtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: UtilsModule });
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: UtilsModule, decorators: [{
224
224
  type: NgModule,
225
225
  args: [{
226
226
  declarations: [
@@ -244,4 +244,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
244
244
 
245
245
  export { BbAutosize, BbFocus, BbFocusTrap, BbTemplate, UtilsModule };
246
246
  //# sourceMappingURL=bravobit-bb-foundation-utils.mjs.map
247
- //# sourceMappingURL=bravobit-bb-foundation-utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bravobit-bb-foundation-utils.mjs","sources":["../../../projects/bb-foundation/utils/src/lib/directives/template.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/autosize.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus-trap.directive.ts","../../../projects/bb-foundation/utils/src/lib/utils.module.ts","../../../projects/bb-foundation/utils/src/bravobit-bb-foundation-utils.ts"],"sourcesContent":["import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[bbTemplate]'\n})\nexport class BbTemplate {\n\n @Input() set bbTemplate(content: string | TemplateRef<any>) {\n // Get the template.\n const template = content instanceof TemplateRef\n ? content\n : this._templateRef;\n\n // Clear the view container ref and create the view.\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(template);\n }\n\n constructor(private _templateRef: TemplateRef<any>,\n private _viewContainerRef: ViewContainerRef) {\n }\n\n\n // Required so that the template type checker can infer the type of the coerced inputs.\n static ngAcceptInputType_bbTemplate: string | TemplateRef<any>;\n\n}\n","import {AfterViewInit, Directive, ElementRef, HostBinding, HostListener, Input, Renderer2} from '@angular/core';\n\n@Directive({\n selector: 'textarea[bbAutosize]'\n})\nexport class BbAutosize implements AfterViewInit {\n\n // Min/max heights for the textarea.\n @Input() @HostBinding('style.min-height') minHeight: string | null = null;\n @Input() @HostBinding('style.max-height') maxHeight: string | null = null;\n @Input() @HostBinding('rows') rows: number = 1;\n\n constructor(private _renderer: Renderer2,\n private _elementRef: ElementRef) {\n }\n\n get element() {\n return this._elementRef?.nativeElement as HTMLTextAreaElement;\n }\n\n ngAfterViewInit() {\n // Update the styles after the DOM has loaded.\n this.updateStyles();\n }\n\n @HostListener('window:resize')\n onWindowResize() {\n // Update the styles when the window is resized.\n this.updateStyles();\n }\n\n @HostListener('input')\n onInputReceived() {\n // Update the styles after the textarea received input.\n this.updateStyles();\n }\n\n private updateStyles() {\n // Validate the element exists.\n if (!this.element) {\n return;\n }\n\n // Calculate border height which is not included in the scroll height.\n const borderHeight = this.element?.offsetHeight - this.element?.clientHeight;\n\n // Reset textarea height to auto that correctly calculate the new height.\n this.setHeight('auto');\n\n // Set new height.\n this.setHeight(`${this.element?.scrollHeight + borderHeight}px`);\n }\n\n private setHeight(value: string) {\n this._renderer.setStyle(this.element, 'height', value);\n }\n\n}\n","import {AfterViewInit, Directive, ElementRef, NgZone} from '@angular/core';\n\n@Directive({\n selector: '[bbFocus]'\n})\nexport class BbFocus implements AfterViewInit {\n\n constructor(private _zone: NgZone,\n private _elementRef: ElementRef) {\n }\n\n private get nativeElement() {\n return this._elementRef.nativeElement;\n }\n\n ngAfterViewInit() {\n // Run the method outside the Angular zone.\n this._zone.runOutsideAngular(() => this.focus());\n }\n\n private focus() {\n // Check if set timeout exists and the user is\n // using the site on desktop devices.\n if (!setTimeout) {\n return;\n }\n\n // Check if the element and the focus method exist, if so focus the element.\n if (!this.nativeElement || !this.nativeElement.focus) {\n return;\n }\n\n // Execute the focus method in a timeout.\n setTimeout(() => this.nativeElement.focus(), 0);\n }\n\n}\n","import {Directive, ElementRef, HostListener} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocusTrap]'\n})\nexport class BbFocusTrap {\n\n private readonly _focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n 'select:not([disabled]):not([aria-hidden])',\n 'textarea:not([disabled]):not([aria-hidden])',\n 'button:not([disabled]):not([aria-hidden])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])'\n ];\n\n constructor(private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent) {\n // Validate it is a tab event.\n if (!this.isTabEvent(event)) {\n return;\n }\n\n // Trap the focus inside the element.\n return this.trapFocus(event);\n }\n\n trapFocus(event: KeyboardEvent) {\n // Validate that the DOM is available.\n if (!this._platform.isBrowser) {\n return;\n }\n\n // Get all focusable nodes.\n const focusableNodes = this.getFocusableNodes();\n\n // Focus the first available element if the focus\n // is not in the modal.\n if (!this.element.contains(document.activeElement)) {\n return this.focus(focusableNodes[0]);\n }\n\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n this.focus(focusableNodes[focusableNodes.length - 1]);\n return event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n this.focus(focusableNodes[0]);\n return event.preventDefault();\n }\n }\n\n private get element() {\n return this._elementRef.nativeElement;\n }\n\n private getFocusableNodes() {\n const nodes = this.element.querySelectorAll(this._focusableElements);\n return Array(...nodes);\n }\n\n private focus = (element: HTMLElement) => {\n return element && element.focus && element.focus();\n };\n\n private isTabEvent = (event: KeyboardEvent) => {\n return event?.key === 'Tab' || event?.keyCode === 9;\n };\n\n}\n","import {BbFocusTrap} from './directives/focus-trap.directive';\nimport {BbTemplate} from './directives/template.directive';\nimport {BbAutosize} from './directives/autosize.directive';\nimport {BbFocus} from './directives/focus.directive';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n declarations: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ],\n exports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ]\n})\nexport class UtilsModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAKa,UAAU,CAAA;IAanB,WAAoB,CAAA,YAA8B,EAC9B,iBAAmC,EAAA;AADnC,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;AAC9B,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;KACtD;IAbD,IAAa,UAAU,CAAC,OAAkC,EAAA;;AAEtD,QAAA,MAAM,QAAQ,GAAG,OAAO,YAAY,WAAW;AAC3C,cAAE,OAAO;AACT,cAAE,IAAI,CAAC,YAAY,CAAC;;AAGxB,QAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC/B,QAAA,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;KACvD;;uG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O;wBACP,WAAW;AACd,qBAAA;iBACJ,CAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravobit-bb-foundation-utils.mjs","sources":["../../../projects/bb-foundation/utils/src/lib/directives/template.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/autosize.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus-trap.directive.ts","../../../projects/bb-foundation/utils/src/lib/utils.module.ts","../../../projects/bb-foundation/utils/src/bravobit-bb-foundation-utils.ts"],"sourcesContent":["import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[bbTemplate]'\n})\nexport class BbTemplate {\n\n @Input() set bbTemplate(content: string | TemplateRef<any>) {\n // Get the template.\n const template = content instanceof TemplateRef\n ? content\n : this._templateRef;\n\n // Clear the view container ref and create the view.\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(template);\n }\n\n constructor(private _templateRef: TemplateRef<any>,\n private _viewContainerRef: ViewContainerRef) {\n }\n\n\n // Required so that the template type checker can infer the type of the coerced inputs.\n static ngAcceptInputType_bbTemplate: string | TemplateRef<any>;\n\n}\n","import {AfterViewInit, Directive, ElementRef, HostBinding, HostListener, Input, Renderer2} from '@angular/core';\n\n@Directive({\n selector: 'textarea[bbAutosize]'\n})\nexport class BbAutosize implements AfterViewInit {\n\n // Min/max heights for the textarea.\n @Input() @HostBinding('style.min-height') minHeight: string | null = null;\n @Input() @HostBinding('style.max-height') maxHeight: string | null = null;\n @Input() @HostBinding('rows') rows: number = 1;\n\n constructor(private _renderer: Renderer2,\n private _elementRef: ElementRef) {\n }\n\n get element() {\n return this._elementRef?.nativeElement as HTMLTextAreaElement;\n }\n\n ngAfterViewInit() {\n // Update the styles after the DOM has loaded.\n this.updateStyles();\n }\n\n @HostListener('window:resize')\n onWindowResize() {\n // Update the styles when the window is resized.\n this.updateStyles();\n }\n\n @HostListener('input')\n onInputReceived() {\n // Update the styles after the textarea received input.\n this.updateStyles();\n }\n\n private updateStyles() {\n // Validate the element exists.\n if (!this.element) {\n return;\n }\n\n // Calculate border height which is not included in the scroll height.\n const borderHeight = this.element?.offsetHeight - this.element?.clientHeight;\n\n // Reset textarea height to auto that correctly calculate the new height.\n this.setHeight('auto');\n\n // Set new height.\n this.setHeight(`${this.element?.scrollHeight + borderHeight}px`);\n }\n\n private setHeight(value: string) {\n this._renderer.setStyle(this.element, 'height', value);\n }\n\n}\n","import {AfterViewInit, Directive, ElementRef, NgZone} from '@angular/core';\n\n@Directive({\n selector: '[bbFocus]'\n})\nexport class BbFocus implements AfterViewInit {\n\n constructor(private _zone: NgZone,\n private _elementRef: ElementRef) {\n }\n\n private get nativeElement() {\n return this._elementRef.nativeElement;\n }\n\n ngAfterViewInit() {\n // Run the method outside the Angular zone.\n this._zone.runOutsideAngular(() => this.focus());\n }\n\n private focus() {\n // Check if set timeout exists and the user is\n // using the site on desktop devices.\n if (!setTimeout) {\n return;\n }\n\n // Check if the element and the focus method exist, if so focus the element.\n if (!this.nativeElement || !this.nativeElement.focus) {\n return;\n }\n\n // Execute the focus method in a timeout.\n setTimeout(() => this.nativeElement.focus(), 0);\n }\n\n}\n","import {Directive, ElementRef, HostListener} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocusTrap]'\n})\nexport class BbFocusTrap {\n\n private readonly _focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n 'select:not([disabled]):not([aria-hidden])',\n 'textarea:not([disabled]):not([aria-hidden])',\n 'button:not([disabled]):not([aria-hidden])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])'\n ];\n\n constructor(private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent) {\n // Validate it is a tab event.\n if (!this.isTabEvent(event)) {\n return;\n }\n\n // Trap the focus inside the element.\n return this.trapFocus(event);\n }\n\n trapFocus(event: KeyboardEvent) {\n // Validate that the DOM is available.\n if (!this._platform.isBrowser) {\n return;\n }\n\n // Get all focusable nodes.\n const focusableNodes = this.getFocusableNodes();\n\n // Focus the first available element if the focus\n // is not in the modal.\n if (!this.element.contains(document.activeElement)) {\n return this.focus(focusableNodes[0]);\n }\n\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n this.focus(focusableNodes[focusableNodes.length - 1]);\n return event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n this.focus(focusableNodes[0]);\n return event.preventDefault();\n }\n }\n\n private get element() {\n return this._elementRef.nativeElement;\n }\n\n private getFocusableNodes() {\n const nodes = this.element.querySelectorAll(this._focusableElements);\n return Array(...nodes);\n }\n\n private focus = (element: HTMLElement) => {\n return element && element.focus && element.focus();\n };\n\n private isTabEvent = (event: KeyboardEvent) => {\n return event?.key === 'Tab' || event?.keyCode === 9;\n };\n\n}\n","import {BbFocusTrap} from './directives/focus-trap.directive';\nimport {BbTemplate} from './directives/template.directive';\nimport {BbAutosize} from './directives/autosize.directive';\nimport {BbFocus} from './directives/focus.directive';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n declarations: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ],\n exports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ]\n})\nexport class UtilsModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAKa,UAAU,CAAA;IAEnB,IAAa,UAAU,CAAC,OAAkC,EAAA;;AAEtD,QAAA,MAAM,QAAQ,GAAG,OAAO,YAAY,WAAW;AAC3C,cAAE,OAAO;AACT,cAAE,IAAI,CAAC,YAAY,CAAC;;AAGxB,QAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK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