@theseam/ui-common 0.4.11 → 0.4.12-beta.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 (254) hide show
  1. package/breadcrumbs/breadcrumbs/breadcrumbs.component.scss +1 -1
  2. package/buttons/public-api.d.ts +1 -0
  3. package/buttons/testing/anchor-badge-button.harness.d.ts +16 -0
  4. package/buttons/testing/anchor-button.harness.d.ts +16 -0
  5. package/buttons/testing/badge-button.harness.d.ts +15 -0
  6. package/buttons/testing/base-badge-button.harness.d.ts +15 -0
  7. package/buttons/testing/base-button.harness.d.ts +19 -0
  8. package/buttons/testing/button.harness.d.ts +15 -0
  9. package/buttons/testing/index.d.ts +5 -0
  10. package/buttons/testing/toggle-button.harness.d.ts +21 -0
  11. package/checkbox/checkbox.component.d.ts +1 -1
  12. package/checkbox/checkbox.module.d.ts +2 -3
  13. package/datatable/datatable/datatable.component.d.ts +10 -1
  14. package/datatable/datatable.module.d.ts +1 -1
  15. package/datatable/models/action-item-column-position.d.ts +13 -0
  16. package/datatable/services/columns-manager.service.d.ts +7 -0
  17. package/datatable/utils/create-action-menu-column.d.ts +1 -1
  18. package/esm2020/breadcrumbs/breadcrumbs/breadcrumbs.component.mjs +2 -2
  19. package/esm2020/buttons/button/button.component.mjs +2 -1
  20. package/esm2020/buttons/public-api.mjs +2 -1
  21. package/esm2020/buttons/testing/anchor-badge-button.harness.mjs +18 -0
  22. package/esm2020/buttons/testing/anchor-button.harness.mjs +18 -0
  23. package/esm2020/buttons/testing/badge-button.harness.mjs +14 -0
  24. package/esm2020/buttons/testing/base-badge-button.harness.mjs +29 -0
  25. package/esm2020/buttons/testing/base-button.harness.mjs +41 -0
  26. package/esm2020/buttons/testing/button.harness.mjs +16 -0
  27. package/esm2020/buttons/testing/index.mjs +6 -0
  28. package/esm2020/buttons/testing/toggle-button.harness.mjs +25 -0
  29. package/esm2020/carousel/carousel.component.mjs +2 -1
  30. package/esm2020/checkbox/checkbox.component.mjs +8 -3
  31. package/esm2020/checkbox/checkbox.module.mjs +5 -12
  32. package/esm2020/datatable/datatable/datatable.component.mjs +20 -4
  33. package/esm2020/datatable/datatable-action-menu/datatable-action-menu.component.mjs +2 -2
  34. package/esm2020/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.mjs +1 -1
  35. package/esm2020/datatable/datatable-export-button/datatable-export-button.component.mjs +1 -1
  36. package/esm2020/datatable/datatable.module.mjs +5 -5
  37. package/esm2020/datatable/models/action-item-column-position.mjs +5 -0
  38. package/esm2020/datatable/services/columns-manager.service.mjs +27 -2
  39. package/esm2020/datatable/utils/create-action-menu-column.mjs +4 -3
  40. package/esm2020/datatable-dynamic/datatable-dynamic-action-menu/datatable-dynamic-action-menu.component.mjs +1 -1
  41. package/esm2020/datatable-dynamic/datatable-dynamic.component.mjs +1 -1
  42. package/esm2020/form-field/form-field.component.mjs +4 -4
  43. package/esm2020/framework/base-layout/base-layout.component.mjs +14 -4
  44. package/esm2020/framework/base-layout/base-layout.module.mjs +6 -1
  45. package/esm2020/framework/base-layout/directives/base-layout-nav-toggle.directive.mjs +21 -5
  46. package/esm2020/framework/base-layout/directives/base-layout-side-bar-header.directive.mjs +16 -0
  47. package/esm2020/framework/base-layout/index.mjs +2 -1
  48. package/esm2020/framework/nav/horizontal-nav/horizontal-nav.component.mjs +55 -0
  49. package/esm2020/framework/nav/index.mjs +6 -0
  50. package/esm2020/framework/nav/nav-item/nav-item.component.mjs +227 -0
  51. package/esm2020/framework/nav/nav-utils.mjs +107 -0
  52. package/esm2020/framework/nav/nav.models.mjs +2 -0
  53. package/esm2020/framework/nav/nav.module.mjs +67 -0
  54. package/esm2020/framework/nav/nav.service.mjs +204 -0
  55. package/esm2020/framework/public-api.mjs +2 -1
  56. package/esm2020/framework/schema-form/index.mjs +2 -1
  57. package/esm2020/framework/schema-form/schema-form-framework.component.mjs +6 -3
  58. package/esm2020/framework/schema-form/schema-form-framework.mjs +62 -7
  59. package/esm2020/framework/schema-form/schema-form-widget.mjs +2 -0
  60. package/esm2020/framework/schema-form/schema-form.module.mjs +1 -8
  61. package/esm2020/framework/schema-form-controls/schema-form-checkbox/schema-form-checkbox.component.mjs +21 -11
  62. package/esm2020/framework/schema-form-controls/schema-form-divider/schema-form-divider.component.mjs +20 -0
  63. package/esm2020/framework/schema-form-controls/schema-form-input/schema-form-input.component.mjs +17 -8
  64. package/esm2020/framework/schema-form-controls/schema-form-number/schema-form-number.component.mjs +14 -5
  65. package/esm2020/framework/schema-form-controls/schema-form-select/schema-form-select.component.mjs +19 -9
  66. package/esm2020/framework/schema-form-controls/schema-form-submit/schema-form-submit.component.mjs +21 -13
  67. package/esm2020/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.mjs +30 -18
  68. package/esm2020/framework/schema-form-controls/schema-form-tel/schema-form-tel.component.mjs +48 -0
  69. package/esm2020/framework/schema-form-controls/schema-form-tiled-select/schema-form-tiled-select.component.mjs +57 -0
  70. package/esm2020/framework/side-nav/side-nav-item/side-nav-item.component.mjs +28 -67
  71. package/esm2020/framework/side-nav/side-nav-toggle/side-nav-toggle.component.mjs +12 -5
  72. package/esm2020/framework/side-nav/side-nav.component.mjs +116 -38
  73. package/esm2020/framework/side-nav/side-nav.models.mjs +1 -1
  74. package/esm2020/framework/side-nav/side-nav.module.mjs +9 -39
  75. package/esm2020/framework/side-nav/side-nav.service.mjs +1 -1
  76. package/esm2020/framework/top-bar/index.mjs +3 -1
  77. package/esm2020/framework/top-bar/top-bar-compact-menu-btn-detail.directive.mjs +16 -0
  78. package/esm2020/framework/top-bar/top-bar-item.directive.mjs +10 -4
  79. package/esm2020/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.mjs +6 -4
  80. package/esm2020/framework/top-bar/top-bar-nav-toggle-btn-detail.directive.mjs +16 -0
  81. package/esm2020/framework/top-bar/top-bar.component.mjs +55 -11
  82. package/esm2020/framework/top-bar/top-bar.module.mjs +15 -5
  83. package/esm2020/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.component.mjs +3 -3
  84. package/esm2020/layout/layout.service.mjs +12 -2
  85. package/esm2020/menu/menu-item.component.mjs +3 -3
  86. package/esm2020/menu/menu-toggle.directive.mjs +7 -2
  87. package/esm2020/menu/public-api.mjs +5 -1
  88. package/esm2020/menu/testing/menu-footer.harness.mjs +28 -0
  89. package/esm2020/menu/testing/menu-header.harness.mjs +23 -0
  90. package/esm2020/menu/testing/menu-item.harness.mjs +59 -0
  91. package/esm2020/menu/testing/menu.harness.mjs +163 -0
  92. package/esm2020/menu/testing/utils.mjs +13 -0
  93. package/esm2020/story-helpers/args-to-tpl.mjs +83 -0
  94. package/esm2020/story-helpers/public-api.mjs +2 -2
  95. package/esm2020/table-cell-types/table-cell-type-string/table-cell-type-string.component.mjs +4 -2
  96. package/esm2020/tel-input/public-api.mjs +2 -1
  97. package/esm2020/tel-input/tel-input/tel-input.component.mjs +22 -10
  98. package/esm2020/tel-input/tel-input.directive.mjs +12 -13
  99. package/esm2020/tel-input/tel-input.module.mjs +10 -9
  100. package/esm2020/tel-input/testing/tel-input.harness.mjs +49 -0
  101. package/esm2020/testing/harnesses/ng-select-dropdown.harness.mjs +39 -0
  102. package/esm2020/testing/harnesses/ng-select-option.harness.mjs +26 -0
  103. package/esm2020/testing/harnesses/ng-select.harness.mjs +104 -0
  104. package/esm2020/testing/public-api.mjs +4 -1
  105. package/esm2020/tiled-select/components/tiled-select/tiled-select.component.mjs +1 -1
  106. package/esm2020/utils/geo-json/coerce-feature-collection.mjs +1 -1
  107. package/esm2020/utils/geo-json/is-feature-collection.validator.mjs +1 -1
  108. package/esm2020/utils/geo-json/is-only-geometry-types.mjs +1 -1
  109. package/esm2020/utils/geo-json/merge-polygons.mjs +1 -1
  110. package/esm2020/utils/geo-json/no-inner-rings.validator.mjs +1 -1
  111. package/esm2020/utils/geo-json/split-multi-polygons.mjs +1 -1
  112. package/fesm2015/theseam-ui-common-breadcrumbs.mjs +2 -2
  113. package/fesm2015/theseam-ui-common-breadcrumbs.mjs.map +1 -1
  114. package/fesm2015/theseam-ui-common-buttons.mjs +181 -3
  115. package/fesm2015/theseam-ui-common-buttons.mjs.map +1 -1
  116. package/fesm2015/theseam-ui-common-carousel.mjs +1 -0
  117. package/fesm2015/theseam-ui-common-carousel.mjs.map +1 -1
  118. package/fesm2015/theseam-ui-common-checkbox.mjs +12 -14
  119. package/fesm2015/theseam-ui-common-checkbox.mjs.map +1 -1
  120. package/fesm2015/theseam-ui-common-datatable-dynamic.mjs +2 -2
  121. package/fesm2015/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  122. package/fesm2015/theseam-ui-common-datatable.mjs +60 -14
  123. package/fesm2015/theseam-ui-common-datatable.mjs.map +1 -1
  124. package/fesm2015/theseam-ui-common-form-field.mjs +3 -3
  125. package/fesm2015/theseam-ui-common-form-field.mjs.map +1 -1
  126. package/fesm2015/theseam-ui-common-framework.mjs +1155 -322
  127. package/fesm2015/theseam-ui-common-framework.mjs.map +1 -1
  128. package/fesm2015/theseam-ui-common-google-maps.mjs +2 -2
  129. package/fesm2015/theseam-ui-common-google-maps.mjs.map +1 -1
  130. package/fesm2015/theseam-ui-common-layout.mjs +11 -2
  131. package/fesm2015/theseam-ui-common-layout.mjs.map +1 -1
  132. package/fesm2015/theseam-ui-common-menu.mjs +337 -6
  133. package/fesm2015/theseam-ui-common-menu.mjs.map +1 -1
  134. package/fesm2015/theseam-ui-common-story-helpers.mjs +86 -1
  135. package/fesm2015/theseam-ui-common-story-helpers.mjs.map +1 -1
  136. package/fesm2015/theseam-ui-common-table-cell-types.mjs +3 -1
  137. package/fesm2015/theseam-ui-common-table-cell-types.mjs.map +1 -1
  138. package/fesm2015/theseam-ui-common-tel-input.mjs +105 -29
  139. package/fesm2015/theseam-ui-common-tel-input.mjs.map +1 -1
  140. package/fesm2015/theseam-ui-common-testing.mjs +197 -1
  141. package/fesm2015/theseam-ui-common-testing.mjs.map +1 -1
  142. package/fesm2015/theseam-ui-common-tiled-select.mjs.map +1 -1
  143. package/fesm2015/theseam-ui-common-utils.mjs.map +1 -1
  144. package/fesm2020/theseam-ui-common-breadcrumbs.mjs +2 -2
  145. package/fesm2020/theseam-ui-common-breadcrumbs.mjs.map +1 -1
  146. package/fesm2020/theseam-ui-common-buttons.mjs +154 -2
  147. package/fesm2020/theseam-ui-common-buttons.mjs.map +1 -1
  148. package/fesm2020/theseam-ui-common-carousel.mjs +1 -0
  149. package/fesm2020/theseam-ui-common-carousel.mjs.map +1 -1
  150. package/fesm2020/theseam-ui-common-checkbox.mjs +12 -14
  151. package/fesm2020/theseam-ui-common-checkbox.mjs.map +1 -1
  152. package/fesm2020/theseam-ui-common-datatable-dynamic.mjs +2 -2
  153. package/fesm2020/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  154. package/fesm2020/theseam-ui-common-datatable.mjs +60 -14
  155. package/fesm2020/theseam-ui-common-datatable.mjs.map +1 -1
  156. package/fesm2020/theseam-ui-common-form-field.mjs +3 -3
  157. package/fesm2020/theseam-ui-common-form-field.mjs.map +1 -1
  158. package/fesm2020/theseam-ui-common-framework.mjs +1151 -326
  159. package/fesm2020/theseam-ui-common-framework.mjs.map +1 -1
  160. package/fesm2020/theseam-ui-common-google-maps.mjs +2 -2
  161. package/fesm2020/theseam-ui-common-google-maps.mjs.map +1 -1
  162. package/fesm2020/theseam-ui-common-layout.mjs +11 -2
  163. package/fesm2020/theseam-ui-common-layout.mjs.map +1 -1
  164. package/fesm2020/theseam-ui-common-menu.mjs +283 -5
  165. package/fesm2020/theseam-ui-common-menu.mjs.map +1 -1
  166. package/fesm2020/theseam-ui-common-story-helpers.mjs +84 -1
  167. package/fesm2020/theseam-ui-common-story-helpers.mjs.map +1 -1
  168. package/fesm2020/theseam-ui-common-table-cell-types.mjs +3 -1
  169. package/fesm2020/theseam-ui-common-table-cell-types.mjs.map +1 -1
  170. package/fesm2020/theseam-ui-common-tel-input.mjs +89 -29
  171. package/fesm2020/theseam-ui-common-tel-input.mjs.map +1 -1
  172. package/fesm2020/theseam-ui-common-testing.mjs +165 -1
  173. package/fesm2020/theseam-ui-common-testing.mjs.map +1 -1
  174. package/fesm2020/theseam-ui-common-tiled-select.mjs.map +1 -1
  175. package/fesm2020/theseam-ui-common-utils.mjs.map +1 -1
  176. package/framework/base-layout/base-layout.component.d.ts +4 -2
  177. package/framework/base-layout/base-layout.component.scss +18 -10
  178. package/framework/base-layout/base-layout.module.d.ts +11 -10
  179. package/framework/base-layout/directives/base-layout-nav-toggle.directive.d.ts +8 -3
  180. package/framework/base-layout/directives/base-layout-side-bar-header.directive.d.ts +9 -0
  181. package/framework/base-layout/index.d.ts +1 -0
  182. package/framework/base-layout/styles/_variables.scss +21 -0
  183. package/framework/nav/_nav-theme.scss +4 -0
  184. package/framework/nav/horizontal-nav/horizontal-nav.component.d.ts +25 -0
  185. package/framework/nav/horizontal-nav/horizontal-nav.component.scss +50 -0
  186. package/framework/nav/index.d.ts +5 -0
  187. package/framework/nav/nav-item/nav-item.component.d.ts +74 -0
  188. package/framework/nav/nav-item/nav-item.component.scss +203 -0
  189. package/framework/nav/nav-utils.d.ts +20 -0
  190. package/framework/nav/nav.models.d.ts +77 -0
  191. package/framework/nav/nav.module.d.ts +17 -0
  192. package/framework/nav/nav.service.d.ts +27 -0
  193. package/framework/nav/styles/_themes/light/_variables.scss +56 -0
  194. package/framework/nav/styles/_themes/primary/_variables.scss +56 -0
  195. package/framework/nav/styles/_utilities.scss +3 -0
  196. package/framework/nav/styles/_variables.scss +2 -0
  197. package/framework/public-api.d.ts +1 -0
  198. package/framework/schema-form/index.d.ts +1 -0
  199. package/framework/schema-form/schema-form-framework.d.ts +12 -1
  200. package/framework/schema-form/schema-form-widget.d.ts +61 -0
  201. package/framework/schema-form/schema-form.module.d.ts +1 -2
  202. package/framework/schema-form-controls/schema-form-checkbox/schema-form-checkbox.component.d.ts +12 -11
  203. package/framework/schema-form-controls/schema-form-divider/schema-form-divider.component.d.ts +12 -0
  204. package/framework/schema-form-controls/schema-form-input/schema-form-input.component.d.ts +10 -9
  205. package/framework/schema-form-controls/schema-form-number/schema-form-number.component.d.ts +8 -7
  206. package/framework/schema-form-controls/schema-form-select/schema-form-select.component.d.ts +10 -9
  207. package/framework/schema-form-controls/schema-form-submit/schema-form-submit.component.d.ts +10 -9
  208. package/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.d.ts +10 -9
  209. package/framework/schema-form-controls/schema-form-tel/schema-form-tel.component.d.ts +23 -0
  210. package/framework/schema-form-controls/schema-form-tiled-select/schema-form-tiled-select.component.d.ts +32 -0
  211. package/framework/side-nav/side-nav-item/side-nav-item.component.d.ts +7 -14
  212. package/framework/side-nav/side-nav-item/side-nav-item.component.scss +7 -5
  213. package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.d.ts +5 -3
  214. package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.scss +3 -6
  215. package/framework/side-nav/side-nav.component.d.ts +13 -1
  216. package/framework/side-nav/side-nav.component.scss +0 -1
  217. package/framework/side-nav/side-nav.models.d.ts +7 -1
  218. package/framework/side-nav/side-nav.module.d.ts +1 -9
  219. package/framework/side-nav/styles/_themes/light/_variables.scss +24 -14
  220. package/framework/side-nav/styles/_themes/primary/_variables.scss +8 -0
  221. package/framework/top-bar/index.d.ts +2 -0
  222. package/framework/top-bar/top-bar-compact-menu-btn-detail.directive.d.ts +8 -0
  223. package/framework/top-bar/top-bar-item.directive.d.ts +4 -1
  224. package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.d.ts +5 -2
  225. package/framework/top-bar/top-bar-nav-toggle-btn-detail.directive.d.ts +8 -0
  226. package/framework/top-bar/top-bar.component.d.ts +25 -3
  227. package/framework/top-bar/top-bar.component.scss +7 -2
  228. package/framework/top-bar/top-bar.module.d.ts +10 -8
  229. package/layout/layout.service.d.ts +9 -1
  230. package/menu/menu-footer-action/menu-footer-action.component.d.ts +1 -1
  231. package/menu/menu-toggle.directive.d.ts +2 -1
  232. package/menu/public-api.d.ts +4 -0
  233. package/menu/testing/menu-footer.harness.d.ts +22 -0
  234. package/menu/testing/menu-header.harness.d.ts +18 -0
  235. package/menu/testing/menu-item.harness.d.ts +37 -0
  236. package/menu/testing/menu.harness.d.ts +74 -0
  237. package/menu/testing/utils.d.ts +5 -0
  238. package/package.json +2 -2
  239. package/story-helpers/args-to-tpl.d.ts +25 -0
  240. package/story-helpers/public-api.d.ts +1 -0
  241. package/styles/vendor/ngx-datatable/_ngx-datatable.scss +57 -14
  242. package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +33 -5
  243. package/tel-input/public-api.d.ts +1 -0
  244. package/tel-input/tel-input/tel-input.component.d.ts +2 -2
  245. package/tel-input/tel-input.directive.d.ts +1 -1
  246. package/tel-input/tel-input.module.d.ts +7 -7
  247. package/tel-input/testing/tel-input.harness.d.ts +19 -0
  248. package/testing/harnesses/ng-select-dropdown.harness.d.ts +23 -0
  249. package/testing/harnesses/ng-select-option.harness.d.ts +18 -0
  250. package/testing/harnesses/ng-select.harness.d.ts +50 -0
  251. package/testing/public-api.d.ts +3 -0
  252. package/tiled-select/components/tiled-select/tiled-select.component.d.ts +10 -10
  253. package/esm2020/framework/schema-form-controls/schema-form-controls.module.mjs +0 -79
  254. package/framework/schema-form-controls/schema-form-controls.module.d.ts +0 -20
@@ -3,7 +3,8 @@ import * as i0 from '@angular/core';
3
3
  import { NgModule, Injectable } from '@angular/core';
4
4
  import * as i1 from '@angular/flex-layout';
5
5
  import { FlexLayoutModule } from '@angular/flex-layout';
6
- import { map, startWith, distinctUntilChanged, shareReplay } from 'rxjs/operators';
6
+ import { BehaviorSubject } from 'rxjs';
7
+ import { map, startWith, distinctUntilChanged, shareReplay, switchMap } from 'rxjs/operators';
7
8
 
8
9
  // TODO: Make sure the `@angular/flex-layout` breakpoints and bootstrap
9
10
  // breakpoints work the same.
@@ -79,11 +80,19 @@ function observeMediaQuery(mediaObserver, alias) {
79
80
  class TheSeamLayoutService {
80
81
  constructor(_media) {
81
82
  this._media = _media;
82
- this.isMobile$ = this.observe('lt-sm');
83
+ this._mobileBreakpoint = new BehaviorSubject('lt-sm');
84
+ this.mobileBreakpoint$ = this._mobileBreakpoint.asObservable();
85
+ this.isMobile$ = this.mobileBreakpoint$.pipe(switchMap(breakpoint => this.observe(breakpoint)), shareReplay({ bufferSize: 1, refCount: true }));
83
86
  }
84
87
  observe(alias) {
85
88
  return observeMediaQuery(this._media, alias);
86
89
  }
90
+ /**
91
+ * Update breakpoint observed by isMobile$
92
+ */
93
+ setMobileBreakpoint(alias) {
94
+ this._mobileBreakpoint.next(alias);
95
+ }
87
96
  }
88
97
  TheSeamLayoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamLayoutService, deps: [{ token: i1.MediaObserver }], target: i0.ɵɵFactoryTarget.Injectable });
89
98
  TheSeamLayoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamLayoutService, providedIn: 'root' });
@@ -1 +1 @@
1
- {"version":3,"file":"theseam-ui-common-layout.mjs","sources":["../../../projects/ui-common/layout/breakpoint-aliases.ts","../../../projects/ui-common/layout/layout.module.ts","../../../projects/ui-common/layout/observe-media-query.ts","../../../projects/ui-common/layout/layout.service.ts","../../../projects/ui-common/layout/theseam-ui-common-layout.ts"],"sourcesContent":["// TODO: Make sure the `@angular/flex-layout` breakpoints and bootstrap\n// breakpoints work the same.\n//\n// I like the more spread-out ranges in '@angular/flex-layout', but since our\n// styles are mostly based on bootstrap it may be worth it to drop down closer\n// to the bootstrap breakpoints.\n//\n// Another option is to create new aliases to blend a mix between them, if it\n// doesn't add to much complexity.\n\n/**\n * | breakpoint | mediaQuery |\n * |------------|---------------------------------------------------------|\n * | xs | 'screen and (max-width: 599px)' |\n * | sm | 'screen and (min-width: 600px) and (max-width: 959px)' |\n * | md | 'screen and (min-width: 960px) and (max-width: 1279px)' |\n * | lg | 'screen and (min-width: 1280px) and (max-width: 1919px)'|\n * | xl | 'screen and (min-width: 1920px) and (max-width: 5000px)'|\n * | | |\n * | lt-sm | 'screen and (max-width: 599px)' |\n * | lt-md | 'screen and (max-width: 959px)' |\n * | lt-lg | 'screen and (max-width: 1279px)' |\n * | lt-xl | 'screen and (max-width: 1919px)' |\n * | | |\n * | gt-xs | 'screen and (min-width: 600px)' |\n * | gt-sm | 'screen and (min-width: 960px)' |\n * | gt-md | 'screen and (min-width: 1280px)' |\n * | gt-lg | 'screen and (min-width: 1920px)' |\n */\nexport type MediaQueryAliases =\n // Breakpoint MediaQuery\n 'xs' // 'screen and (max-width: 599px)'\n | 'sm' // 'screen and (min-width: 600px) and (max-width: 959px)'\n | 'md' // 'screen and (min-width: 960px) and (max-width: 1279px)'\n | 'lg' // 'screen and (min-width: 1280px) and (max-width: 1919px)'\n | 'xl' // 'screen and (min-width: 1920px) and (max-width: 5000px)'\n | 'lt-sm' // 'screen and (max-width: 599px)'\n | 'lt-md' // 'screen and (max-width: 959px)'\n | 'lt-lg' // 'screen and (max-width: 1279px)'\n | 'lt-xl' // 'screen and (max-width: 1919px)'\n | 'gt-xs' // 'screen and (min-width: 600px)'\n | 'gt-sm' // 'screen and (min-width: 960px)'\n | 'gt-md' // 'screen and (min-width: 1280px)'\n | 'gt-lg' // 'screen and (min-width: 1920px)'\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { FlexLayoutModule } from '@angular/flex-layout'\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n FlexLayoutModule\n ],\n exports: [\n FlexLayoutModule\n ]\n})\nexport class TheSeamLayoutModule { }\n","import { MediaObserver } from '@angular/flex-layout'\nimport { Observable } from 'rxjs'\nimport { distinctUntilChanged, map, shareReplay, startWith, tap } from 'rxjs/operators'\n\nimport { MediaQueryAliases } from './breakpoint-aliases'\n\nconst mediaQueriesMap: { [breakpoint: string]: string } = {\n 'xs': 'screen and (max-width: 599px)',\n 'sm': 'screen and (min-width: 600px) and (max-width: 959px)',\n 'md': 'screen and (min-width: 960px) and (max-width: 1279px)',\n 'lg': 'screen and (min-width: 1280px) and (max-width: 1919px)',\n 'xl': 'screen and (min-width: 1920px) and (max-width: 5000px)',\n 'lt-sm': 'screen and (max-width: 599px)',\n 'lt-md': 'screen and (max-width: 959px)',\n 'lt-lg': 'screen and (max-width: 1279px)',\n 'lt-xl': 'screen and (max-width: 1919px)',\n 'gt-xs': 'screen and (min-width: 600px)',\n 'gt-sm': 'screen and (min-width: 960px)',\n 'gt-md': 'screen and (min-width: 1280px)',\n 'gt-lg': 'screen and (min-width: 1920px)'\n}\n\n/**\n * TODO: Find out if the MediaObserver can return an immediate result on load\n * accurately like the native matchMedia. If not switch to another that can or\n * just implement it myself. I would rather use a well tested library for\n * something like that, since it could have a lot of affect on performance.\n */\nfunction isMediaQueryActive(query: string, fallback: MediaObserver) {\n if (window && window.matchMedia) {\n const x = window.matchMedia(mediaQueriesMap[query])\n return x.matches\n }\n return fallback.isActive(query)\n}\n\n/**\n * Observable helper for observing a single breakpoint alias with\n * `@angular/flex-layout` MediaObserver.\n */\nexport function observeMediaQuery(\n mediaObserver: MediaObserver,\n alias: MediaQueryAliases\n): Observable<boolean> {\n // console.log(alias, mediaObserver.isActive(alias), isMediaQueryActive(alias, mediaObserver))\n return mediaObserver.asObservable()\n .pipe(\n map(_ => mediaObserver.isActive(alias)),\n // startWith(mediaObserver.isActive(alias)),\n startWith(isMediaQueryActive(alias, mediaObserver)),\n distinctUntilChanged(),\n shareReplay({ refCount: true, bufferSize: 1 })\n )\n}\n","import { inject, Injectable, InjectionToken } from '@angular/core'\nimport { MediaObserver } from '@angular/flex-layout'\nimport { Observable } from 'rxjs'\n\nimport { MediaQueryAliases } from './breakpoint-aliases'\nimport { observeMediaQuery } from './observe-media-query'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TheSeamLayoutService {\n\n /**\n * Is app a mobile-like size.\n */\n public isMobile$: Observable<boolean>\n\n constructor(\n private _media: MediaObserver\n ) {\n this.isMobile$ = this.observe('lt-sm')\n }\n\n public observe(alias: MediaQueryAliases): Observable<boolean> {\n return observeMediaQuery(this._media, alias)\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"theseam-ui-common-layout.mjs","sources":["../../../projects/ui-common/layout/breakpoint-aliases.ts","../../../projects/ui-common/layout/layout.module.ts","../../../projects/ui-common/layout/observe-media-query.ts","../../../projects/ui-common/layout/layout.service.ts","../../../projects/ui-common/layout/theseam-ui-common-layout.ts"],"sourcesContent":["// TODO: Make sure the `@angular/flex-layout` breakpoints and bootstrap\n// breakpoints work the same.\n//\n// I like the more spread-out ranges in '@angular/flex-layout', but since our\n// styles are mostly based on bootstrap it may be worth it to drop down closer\n// to the bootstrap breakpoints.\n//\n// Another option is to create new aliases to blend a mix between them, if it\n// doesn't add to much complexity.\n\n/**\n * | breakpoint | mediaQuery |\n * |------------|---------------------------------------------------------|\n * | xs | 'screen and (max-width: 599px)' |\n * | sm | 'screen and (min-width: 600px) and (max-width: 959px)' |\n * | md | 'screen and (min-width: 960px) and (max-width: 1279px)' |\n * | lg | 'screen and (min-width: 1280px) and (max-width: 1919px)'|\n * | xl | 'screen and (min-width: 1920px) and (max-width: 5000px)'|\n * | | |\n * | lt-sm | 'screen and (max-width: 599px)' |\n * | lt-md | 'screen and (max-width: 959px)' |\n * | lt-lg | 'screen and (max-width: 1279px)' |\n * | lt-xl | 'screen and (max-width: 1919px)' |\n * | | |\n * | gt-xs | 'screen and (min-width: 600px)' |\n * | gt-sm | 'screen and (min-width: 960px)' |\n * | gt-md | 'screen and (min-width: 1280px)' |\n * | gt-lg | 'screen and (min-width: 1920px)' |\n */\nexport type MediaQueryAliases =\n // Breakpoint MediaQuery\n 'xs' // 'screen and (max-width: 599px)'\n | 'sm' // 'screen and (min-width: 600px) and (max-width: 959px)'\n | 'md' // 'screen and (min-width: 960px) and (max-width: 1279px)'\n | 'lg' // 'screen and (min-width: 1280px) and (max-width: 1919px)'\n | 'xl' // 'screen and (min-width: 1920px) and (max-width: 5000px)'\n | 'lt-sm' // 'screen and (max-width: 599px)'\n | 'lt-md' // 'screen and (max-width: 959px)'\n | 'lt-lg' // 'screen and (max-width: 1279px)'\n | 'lt-xl' // 'screen and (max-width: 1919px)'\n | 'gt-xs' // 'screen and (min-width: 600px)'\n | 'gt-sm' // 'screen and (min-width: 960px)'\n | 'gt-md' // 'screen and (min-width: 1280px)'\n | 'gt-lg' // 'screen and (min-width: 1920px)'\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { FlexLayoutModule } from '@angular/flex-layout'\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n FlexLayoutModule\n ],\n exports: [\n FlexLayoutModule\n ]\n})\nexport class TheSeamLayoutModule { }\n","import { MediaObserver } from '@angular/flex-layout'\nimport { Observable } from 'rxjs'\nimport { distinctUntilChanged, map, shareReplay, startWith, tap } from 'rxjs/operators'\n\nimport { MediaQueryAliases } from './breakpoint-aliases'\n\nconst mediaQueriesMap: { [breakpoint: string]: string } = {\n 'xs': 'screen and (max-width: 599px)',\n 'sm': 'screen and (min-width: 600px) and (max-width: 959px)',\n 'md': 'screen and (min-width: 960px) and (max-width: 1279px)',\n 'lg': 'screen and (min-width: 1280px) and (max-width: 1919px)',\n 'xl': 'screen and (min-width: 1920px) and (max-width: 5000px)',\n 'lt-sm': 'screen and (max-width: 599px)',\n 'lt-md': 'screen and (max-width: 959px)',\n 'lt-lg': 'screen and (max-width: 1279px)',\n 'lt-xl': 'screen and (max-width: 1919px)',\n 'gt-xs': 'screen and (min-width: 600px)',\n 'gt-sm': 'screen and (min-width: 960px)',\n 'gt-md': 'screen and (min-width: 1280px)',\n 'gt-lg': 'screen and (min-width: 1920px)'\n}\n\n/**\n * TODO: Find out if the MediaObserver can return an immediate result on load\n * accurately like the native matchMedia. If not switch to another that can or\n * just implement it myself. I would rather use a well tested library for\n * something like that, since it could have a lot of affect on performance.\n */\nfunction isMediaQueryActive(query: string, fallback: MediaObserver) {\n if (window && window.matchMedia) {\n const x = window.matchMedia(mediaQueriesMap[query])\n return x.matches\n }\n return fallback.isActive(query)\n}\n\n/**\n * Observable helper for observing a single breakpoint alias with\n * `@angular/flex-layout` MediaObserver.\n */\nexport function observeMediaQuery(\n mediaObserver: MediaObserver,\n alias: MediaQueryAliases\n): Observable<boolean> {\n // console.log(alias, mediaObserver.isActive(alias), isMediaQueryActive(alias, mediaObserver))\n return mediaObserver.asObservable()\n .pipe(\n map(_ => mediaObserver.isActive(alias)),\n // startWith(mediaObserver.isActive(alias)),\n startWith(isMediaQueryActive(alias, mediaObserver)),\n distinctUntilChanged(),\n shareReplay({ refCount: true, bufferSize: 1 })\n )\n}\n","import { Injectable } from '@angular/core'\nimport { MediaObserver } from '@angular/flex-layout'\nimport { BehaviorSubject, Observable } from 'rxjs'\nimport { shareReplay, switchMap } from 'rxjs/operators'\n\nimport { MediaQueryAliases } from './breakpoint-aliases'\nimport { observeMediaQuery } from './observe-media-query'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TheSeamLayoutService {\n\n /**\n * Observes if app is a mobile-like size.\n * Default mobile breakpoint is <= 599px,\n * use setMobileBreakpoint() to change size.\n */\n public isMobile$: Observable<boolean>\n\n private _mobileBreakpoint = new BehaviorSubject<MediaQueryAliases>('lt-sm')\n public mobileBreakpoint$ = this._mobileBreakpoint.asObservable()\n\n constructor(\n private _media: MediaObserver\n ) {\n this.isMobile$ = this.mobileBreakpoint$.pipe(\n switchMap(breakpoint => this.observe(breakpoint)),\n shareReplay({ bufferSize: 1, refCount: true })\n )\n }\n\n public observe(alias: MediaQueryAliases): Observable<boolean> {\n return observeMediaQuery(this._media, alias)\n }\n\n /**\n * Update breakpoint observed by isMobile$\n */\n public setMobileBreakpoint(alias: MediaQueryAliases) {\n this._mobileBreakpoint.next(alias)\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
@@ -1,3 +1,6 @@
1
+ import { ContentContainerComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
2
+ import { waitOnConditionAsync } from '@theseam/ui-common/utils';
3
+ import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
1
4
  import { animation, style, group, animate, query, useAnimation, trigger, transition } from '@angular/animations';
2
5
  import * as i0 from '@angular/core';
3
6
  import { Component, ChangeDetectionStrategy, InjectionToken, Inject, Optional, Input, HostListener, forwardRef, EventEmitter, TemplateRef, ViewChild, Output, inject, ChangeDetectorRef, Directive, Self, HostBinding, NgModule } from '@angular/core';
@@ -14,12 +17,282 @@ import { __decorate } from 'tslib';
14
17
  import { UP_ARROW, DOWN_ARROW, END, hasModifierKey, HOME, RIGHT_ARROW, LEFT_ARROW, ESCAPE, ENTER, SPACE } from '@angular/cdk/keycodes';
15
18
  import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
16
19
  import { TemplatePortal } from '@angular/cdk/portal';
17
- import { coerceNumberProperty } from '@angular/cdk/coercion';
18
20
  import { map, switchMap, startWith, distinctUntilChanged, takeUntil } from 'rxjs/operators';
19
21
  import * as i1$1 from '@angular/cdk/overlay';
20
22
  import { OverlayModule } from '@angular/cdk/overlay';
21
23
  import * as i4 from '@angular/cdk/bidi';
22
24
 
25
+ /**
26
+ * Workaround to wait on the animation to finish in browser, until a generic
27
+ * broswer-based solution is added, for Storybook interactions.
28
+ */
29
+ async function animatingWait() {
30
+ const selectAnimating = () => document.querySelectorAll('.seam-menu-container .ng-animating');
31
+ if (selectAnimating().length === 0) {
32
+ return;
33
+ }
34
+ await waitOnConditionAsync(() => selectAnimating().length === 0, 1000);
35
+ }
36
+
37
+ class TheSeamMenuFooterHarness extends ContentContainerComponentHarness {
38
+ /**
39
+ * Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
40
+ * @param options Options for filtering which menu item instances are considered a match.
41
+ * @return a `HarnessPredicate` configured with the given options.
42
+ */
43
+ static with(options = {}) {
44
+ return new HarnessPredicate(this, options)
45
+ .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text));
46
+ }
47
+ /** Gets the text of the menu item. */
48
+ async getText() {
49
+ return (await this.host()).text();
50
+ }
51
+ /** Clicks the menu item. */
52
+ async click() {
53
+ return (await this.host()).click().then(() => animatingWait());
54
+ }
55
+ /** Hovers the menu item. */
56
+ async hover() {
57
+ return (await this.host()).hover().then(() => animatingWait());
58
+ }
59
+ }
60
+ /** The selector for the host element of a `MenuFooterComponent` instance. */
61
+ TheSeamMenuFooterHarness.hostSelector = 'seam-menu-footer';
62
+
63
+ class TheSeamMenuHeaderHarness extends ContentContainerComponentHarness {
64
+ /**
65
+ * Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
66
+ * @param options Options for filtering which menu item instances are considered a match.
67
+ * @return a `HarnessPredicate` configured with the given options.
68
+ */
69
+ static with(options = {}) {
70
+ return new HarnessPredicate(this, options);
71
+ }
72
+ /** Clicks the menu item. */
73
+ async click() {
74
+ return (await this.host()).click().then(() => animatingWait());
75
+ }
76
+ /** Hovers the menu item. */
77
+ async hover() {
78
+ return (await this.host()).hover().then(() => animatingWait());
79
+ }
80
+ }
81
+ /** The selector for the host element of a `MenuHeaderComponent` instance. */
82
+ TheSeamMenuHeaderHarness.hostSelector = 'seam-menu-header';
83
+
84
+ class TheSeamMenuHarness extends ContentContainerComponentHarness {
85
+ constructor() {
86
+ super(...arguments);
87
+ this._documentRootLocator = this.documentRootLocatorFactory();
88
+ }
89
+ /**
90
+ * Gets a `HarnessPredicate` that can be used to search for a menu with specific attributes.
91
+ * @param options Options for filtering which menu instances are considered a match.
92
+ * @return a `HarnessPredicate` configured with the given options.
93
+ */
94
+ static with(options = {}) {
95
+ return new HarnessPredicate(this, options).addOption('triggerText', options.triggerText, (harness, text) => HarnessPredicate.stringMatches(harness.getTriggerText(), text));
96
+ }
97
+ /** Whether the menu is disabled. */
98
+ async isDisabled() {
99
+ const disabled = (await this.host()).getAttribute('disabled');
100
+ return coerceBooleanProperty(await disabled);
101
+ }
102
+ /** Whether the menu is open. */
103
+ async isOpen() {
104
+ return !!(await this._getMenuPanel());
105
+ }
106
+ /** Gets the text of the menu's trigger element. */
107
+ async getTriggerText() {
108
+ return (await this.host()).text();
109
+ }
110
+ /** Focuses the menu. */
111
+ async focus() {
112
+ return (await this.host()).focus().then(() => animatingWait());
113
+ }
114
+ /** Blurs the menu. */
115
+ async blur() {
116
+ return (await this.host()).blur().then(() => animatingWait());
117
+ }
118
+ /** Whether the menu is focused. */
119
+ async isFocused() {
120
+ return (await this.host()).isFocused();
121
+ }
122
+ /** Opens the menu. */
123
+ async open() {
124
+ if (!(await this.isOpen())) {
125
+ return (await this.host()).click().then(() => animatingWait());
126
+ }
127
+ }
128
+ /** Closes the menu. */
129
+ async close() {
130
+ const panel = await this._getMenuPanel();
131
+ if (panel) {
132
+ return panel.sendKeys(TestKey.ESCAPE).then(() => animatingWait());
133
+ }
134
+ }
135
+ /**
136
+ * Gets a list of `TheSeamMenuItemHarness` representing the items in the menu.
137
+ * @param filters Optionally filters which menu items are included.
138
+ */
139
+ async getItems(filters) {
140
+ const panelId = await this._getPanelId();
141
+ if (panelId) {
142
+ return this._documentRootLocator.locatorForAll(TheSeamMenuItemHarness.with({
143
+ ...(filters || {}),
144
+ ancestor: `#${panelId}`,
145
+ }))();
146
+ }
147
+ return [];
148
+ }
149
+ /**
150
+ * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.
151
+ * @param itemFilter A filter used to represent which item in the menu should be clicked. The
152
+ * first matching menu item will be clicked.
153
+ * @param subItemFilters A list of filters representing the items to click in any subsequent
154
+ * sub-menus. The first item in the sub-menu matching the corresponding filter in
155
+ * `subItemFilters` will be clicked.
156
+ */
157
+ async clickItem(itemFilter, ...subItemFilters) {
158
+ await this.open();
159
+ const items = await this.getItems(itemFilter);
160
+ if (!items.length) {
161
+ throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);
162
+ }
163
+ if (!subItemFilters.length) {
164
+ return items[0].click();
165
+ }
166
+ const menu = await items[0].getSubmenu();
167
+ if (!menu) {
168
+ throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);
169
+ }
170
+ return menu.clickItem(...subItemFilters);
171
+ }
172
+ /**
173
+ * Hovers an item in the menu, and optionally continues hovering items in subsequent sub-menus.
174
+ * @param itemFilter A filter used to represent which item in the menu should be hovered. The
175
+ * first matching menu item will be hovered.
176
+ * @param subItemFilters A list of filters representing the items to hover in any subsequent
177
+ * sub-menus. The first item in the sub-menu matching the corresponding filter in
178
+ * `subItemFilters` will be hovered.
179
+ */
180
+ async hoverItem(itemFilter, ...subItemFilters) {
181
+ await this.open();
182
+ const items = await this.getItems(itemFilter);
183
+ if (!items.length) {
184
+ throw Error(`Could not find item matching ${JSON.stringify(itemFilter)}`);
185
+ }
186
+ if (!subItemFilters.length) {
187
+ return items[0].hover();
188
+ }
189
+ const menu = await items[0].getSubmenu();
190
+ if (!menu) {
191
+ throw Error(`Item matching ${JSON.stringify(itemFilter)} does not have a submenu`);
192
+ }
193
+ return menu.hoverItem(...subItemFilters);
194
+ }
195
+ /**
196
+ * Gets a `TheSeamMenuHeaderHarness` representing the header in the menu.
197
+ * @param filters Optionally filters which menu items are included.
198
+ */
199
+ async getHeader(filters) {
200
+ const panelId = await this._getPanelId();
201
+ if (panelId) {
202
+ return this._documentRootLocator.locatorForOptional(TheSeamMenuHeaderHarness.with({
203
+ ...(filters || {}),
204
+ ancestor: `#${panelId}`,
205
+ }))();
206
+ }
207
+ return null;
208
+ }
209
+ /**
210
+ * Gets a `TheSeamMenuFooterHarness` representing the footer in the menu.
211
+ * @param filters Optionally filters which menu items are included.
212
+ */
213
+ async getFooter(filters) {
214
+ const panelId = await this._getPanelId();
215
+ if (panelId) {
216
+ return this._documentRootLocator.locatorForOptional(TheSeamMenuFooterHarness.with({
217
+ ...(filters || {}),
218
+ ancestor: `#${panelId}`,
219
+ }))();
220
+ }
221
+ return null;
222
+ }
223
+ async getRootHarnessLoader() {
224
+ const panelId = await this._getPanelId();
225
+ return this.documentRootLocatorFactory().harnessLoaderFor(`#${panelId}`);
226
+ }
227
+ /** Gets the menu panel associated with this menu. */
228
+ async _getMenuPanel() {
229
+ const panelId = await this._getPanelId();
230
+ return panelId ? this._documentRootLocator.locatorForOptional(`#${panelId}`)() : null;
231
+ }
232
+ /** Gets the id of the menu panel associated with this menu. */
233
+ async _getPanelId() {
234
+ const panelId = await (await this.host()).getAttribute('aria-controls');
235
+ return panelId || null;
236
+ }
237
+ }
238
+ /** The selector for the host element of a `MenuComponent` instance. */
239
+ TheSeamMenuHarness.hostSelector = '.seam-menu-toggle';
240
+
241
+ class TheSeamMenuItemHarness extends ContentContainerComponentHarness {
242
+ /**
243
+ * Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
244
+ * @param options Options for filtering which menu item instances are considered a match.
245
+ * @return a `HarnessPredicate` configured with the given options.
246
+ */
247
+ static with(options = {}) {
248
+ return new HarnessPredicate(this, options)
249
+ .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))
250
+ .addOption('hasSubmenu', options.hasSubmenu, async (harness, hasSubmenu) => (await harness.hasSubmenu()) === hasSubmenu);
251
+ }
252
+ /** Whether the menu is disabled. */
253
+ async isDisabled() {
254
+ const disabled = (await this.host()).getAttribute('disabled');
255
+ return coerceBooleanProperty(await disabled);
256
+ }
257
+ /** Gets the text of the menu item. */
258
+ async getText() {
259
+ return (await this.host()).text();
260
+ }
261
+ /** Focuses the menu item. */
262
+ async focus() {
263
+ return (await this.host()).focus().then(() => animatingWait());
264
+ }
265
+ /** Blurs the menu item. */
266
+ async blur() {
267
+ return (await this.host()).blur().then(() => animatingWait());
268
+ }
269
+ /** Whether the menu item is focused. */
270
+ async isFocused() {
271
+ return (await this.host()).isFocused();
272
+ }
273
+ /** Clicks the menu item. */
274
+ async click() {
275
+ return (await this.host()).click().then(() => animatingWait());
276
+ }
277
+ /** Hovers the menu item. */
278
+ async hover() {
279
+ return (await this.host()).hover().then(() => animatingWait());
280
+ }
281
+ /** Whether this item has a submenu. */
282
+ async hasSubmenu() {
283
+ return (await this.host()).matchesSelector(TheSeamMenuHarness.hostSelector);
284
+ }
285
+ /** Gets the submenu associated with this menu item, or null if none. */
286
+ async getSubmenu() {
287
+ if (await this.hasSubmenu()) {
288
+ return new TheSeamMenuHarness(this.locatorFactory);
289
+ }
290
+ return null;
291
+ }
292
+ }
293
+ /** The selector for the host element of a `MenuItemComponent` instance. */
294
+ TheSeamMenuItemHarness.hostSelector = '.seam-menu-item';
295
+
23
296
  const menuDropdownPanelSlideIn = animation([
24
297
  style({
25
298
  opacity: 0,
@@ -199,7 +472,7 @@ class MenuItemComponent extends _seamMenuItemMixinBase {
199
472
  }
200
473
  }
201
474
  MenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MenuItemComponent, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: THESEAM_MENU_PANEL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
202
- MenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: MenuItemComponent, selector: "[seamMenuItem]", inputs: { disabled: "disabled", role: "role", icon: "icon", iconClass: "iconClass", sublevelIcon: "sublevelIcon", subLevelIconClass: "subLevelIconClass", badgeText: "badgeText", badgeTheme: "badgeTheme" }, host: { listeners: { "click": "_checkDisabled($event)", "mouseenter": "_handleMouseEnter()" }, properties: { "attr.role": "role", "class.seam-menu-item-highlighted": "_highlighted", "class.seam-menu-item-submenu-trigger": "_triggersSubmenu", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled.toString()", "attr.disabled": "disabled || null" }, classAttribute: "seam-menu-item dropdown-item" }, exportAs: ["seamMenuItem"], usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex flex-row\">\n <seam-icon *ngIf=\"icon\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pr-2\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n <div class=\"flex-fill\">\n <div class=\"text-truncate\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"badgeText\">\n <span class=\"badge badge-pill{{ badgeTheme ? ' badge-' + badgeTheme : '' }} position-relative\"\n style=\"top: -8px\"\n >{{ badgeText }}</span>\n </div>\n </div>\n <seam-icon *ngIf=\"_triggersSubmenu\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pl-2\"\n [icon]=\"sublevelIcon\"\n [iconClass]=\"subLevelIconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n</div>\n", styles: [":host.cdk-mouse-focused:not(:hover){background:transparent}:host[aria-expanded]{color:#16181b;text-decoration:none;background-color:#e9ecef}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
475
+ MenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: MenuItemComponent, selector: "[seamMenuItem]", inputs: { disabled: "disabled", role: "role", icon: "icon", iconClass: "iconClass", sublevelIcon: "sublevelIcon", subLevelIconClass: "subLevelIconClass", badgeText: "badgeText", badgeTheme: "badgeTheme" }, host: { listeners: { "click": "_checkDisabled($event)", "mouseenter": "_handleMouseEnter()" }, properties: { "attr.role": "role", "class.seam-menu-item-highlighted": "_highlighted", "class.seam-menu-item-submenu-trigger": "_triggersSubmenu", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled.toString()", "attr.disabled": "disabled || null" }, classAttribute: "seam-menu-item dropdown-item" }, exportAs: ["seamMenuItem"], usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex flex-row\">\n <seam-icon *ngIf=\"icon\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pr-2\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n\n <div class=\"text-truncate\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"badgeText\" class=\"ml-2\">\n <span class=\"badge badge-pill{{ badgeTheme ? ' badge-' + badgeTheme : '' }} position-relative\"\n style=\"top: -2px\"\n >{{ badgeText }}</span>\n </div>\n\n <div class=\"d-flex flex-grow-1 justify-content-end\">\n <seam-icon *ngIf=\"_triggersSubmenu\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pl-2\"\n [icon]=\"sublevelIcon\"\n [iconClass]=\"subLevelIconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n </div>\n</div>\n", styles: [":host.cdk-mouse-focused:not(:hover){background:transparent}:host[aria-expanded]{color:#16181b;text-decoration:none;background-color:#e9ecef}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
203
476
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MenuItemComponent, decorators: [{
204
477
  type: Component,
205
478
  args: [{ selector: '[seamMenuItem]', exportAs: 'seamMenuItem', inputs: ['disabled'], host: {
@@ -210,7 +483,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
210
483
  '[attr.tabindex]': '_getTabIndex()',
211
484
  '[attr.aria-disabled]': 'disabled.toString()',
212
485
  '[attr.disabled]': 'disabled || null',
213
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-flex flex-row\">\n <seam-icon *ngIf=\"icon\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pr-2\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n <div class=\"flex-fill\">\n <div class=\"text-truncate\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"badgeText\">\n <span class=\"badge badge-pill{{ badgeTheme ? ' badge-' + badgeTheme : '' }} position-relative\"\n style=\"top: -8px\"\n >{{ badgeText }}</span>\n </div>\n </div>\n <seam-icon *ngIf=\"_triggersSubmenu\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pl-2\"\n [icon]=\"sublevelIcon\"\n [iconClass]=\"subLevelIconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n</div>\n", styles: [":host.cdk-mouse-focused:not(:hover){background:transparent}:host[aria-expanded]{color:#16181b;text-decoration:none;background-color:#e9ecef}\n"] }]
486
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-flex flex-row\">\n <seam-icon *ngIf=\"icon\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pr-2\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n\n <div class=\"text-truncate\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"badgeText\" class=\"ml-2\">\n <span class=\"badge badge-pill{{ badgeTheme ? ' badge-' + badgeTheme : '' }} position-relative\"\n style=\"top: -2px\"\n >{{ badgeText }}</span>\n </div>\n\n <div class=\"d-flex flex-grow-1 justify-content-end\">\n <seam-icon *ngIf=\"_triggersSubmenu\"\n style=\"width: 30px; height: 20px; flex: 0 0 auto;\"\n class=\"pl-2\"\n [icon]=\"sublevelIcon\"\n [iconClass]=\"subLevelIconClass\"\n iconType=\"image-fill\">\n </seam-icon>\n </div>\n</div>\n", styles: [":host.cdk-mouse-focused:not(:hover){background:transparent}:host[aria-expanded]{color:#16181b;text-decoration:none;background-color:#e9ecef}\n"] }]
214
487
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
215
488
  type: Inject,
216
489
  args: [DOCUMENT]
@@ -591,6 +864,7 @@ class MenuToggleDirective {
591
864
  overlayY: 'bottom',
592
865
  },
593
866
  ];
867
+ this.menuToggle = new EventEmitter();
594
868
  // TODO: Figure out how to automatically handle this. I think the offset can
595
869
  // be calculated using the first item's offsetTop and borderTop. The problem
596
870
  // is that I was only able to calculate it after the animation had started, so
@@ -650,6 +924,7 @@ class MenuToggleDirective {
650
924
  // this._overlayRef.backdropClick().subscribe(v => {
651
925
  // console.log('backdropClick', v)
652
926
  // })
927
+ this.menuToggle.emit(true);
653
928
  }
654
929
  /** The text direction of the containing app. */
655
930
  get dir() {
@@ -678,6 +953,7 @@ class MenuToggleDirective {
678
953
  this.menu?.closed.emit();
679
954
  }
680
955
  this._active = false;
956
+ this.menuToggle.emit(false);
681
957
  }
682
958
  menuOpen() {
683
959
  return (this._overlayRef && this._overlayRef.hasAttached()) ?? false;
@@ -784,7 +1060,7 @@ class MenuToggleDirective {
784
1060
  }
785
1061
  }
786
1062
  MenuToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MenuToggleDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$1.Overlay }, { token: i1.FocusMonitor }, { token: THESEAM_MENU_PANEL, optional: true }, { token: MenuItemComponent, optional: true, self: true }, { token: i4.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
787
- MenuToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: MenuToggleDirective, selector: "[seamMenuToggle]", inputs: { menu: ["seamMenuToggle", "menu"], positions: "positions", seamMenuTogglePositionsOffsetY: "seamMenuTogglePositionsOffsetY" }, outputs: { menuOpened: "menuOpened", menuClosed: "menuClosed" }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "mousedown": "_onMouseDown($event)", "keydown": "_onKeydown($event)", "click": "_onClick($event)", "document:keydown": "_onDocumentKeydown($event)" }, properties: { "attr.aria-expanded": "menuOpen() || null", "attr.aria-controls": "menuOpen() ? menu.panelId : null" }, classAttribute: "seam-menu-toggle" }, exportAs: ["seamMenuToggle"], ngImport: i0 });
1063
+ MenuToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: MenuToggleDirective, selector: "[seamMenuToggle]", inputs: { menu: ["seamMenuToggle", "menu"], positions: "positions", seamMenuTogglePositionsOffsetY: "seamMenuTogglePositionsOffsetY" }, outputs: { menuToggle: "menuToggle", menuOpened: "menuOpened", menuClosed: "menuClosed" }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "mousedown": "_onMouseDown($event)", "keydown": "_onKeydown($event)", "click": "_onClick($event)", "document:keydown": "_onDocumentKeydown($event)" }, properties: { "attr.aria-expanded": "menuOpen() || null", "attr.aria-controls": "menuOpen() ? menu.panelId : null" }, classAttribute: "seam-menu-toggle" }, exportAs: ["seamMenuToggle"], ngImport: i0 });
788
1064
  __decorate([
789
1065
  InputNumber(0)
790
1066
  ], MenuToggleDirective.prototype, "seamMenuTogglePositionsOffsetY", void 0);
@@ -817,6 +1093,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
817
1093
  args: ['seamMenuToggle']
818
1094
  }], positions: [{
819
1095
  type: Input
1096
+ }], menuToggle: [{
1097
+ type: Output
820
1098
  }], seamMenuTogglePositionsOffsetY: [{
821
1099
  type: Input
822
1100
  }], menuOpened: [{
@@ -1006,5 +1284,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1006
1284
  * Generated bundle index. Do not edit.
1007
1285
  */
1008
1286
 
1009
- export { LIB_MENU, MenuComponent, MenuDividerComponent, MenuFooterActionComponent, MenuFooterComponent, MenuHeaderComponent, MenuItemComponent, MenuToggleDirective, THESEAM_MENU_PANEL, TheSeamMenuModule, menuDropdownPanelExpandIn, menuDropdownPanelExpandOut, menuDropdownPanelFadeIn, menuDropdownPanelFadeOut, menuDropdownPanelIn, menuDropdownPanelOut, menuDropdownPanelSlideIn, menuDropdownPanelSlideOut };
1287
+ export { LIB_MENU, MenuComponent, MenuDividerComponent, MenuFooterActionComponent, MenuFooterComponent, MenuHeaderComponent, MenuItemComponent, MenuToggleDirective, THESEAM_MENU_PANEL, TheSeamMenuFooterHarness, TheSeamMenuHarness, TheSeamMenuHeaderHarness, TheSeamMenuItemHarness, TheSeamMenuModule, menuDropdownPanelExpandIn, menuDropdownPanelExpandOut, menuDropdownPanelFadeIn, menuDropdownPanelFadeOut, menuDropdownPanelIn, menuDropdownPanelOut, menuDropdownPanelSlideIn, menuDropdownPanelSlideOut };
1010
1288
  //# sourceMappingURL=theseam-ui-common-menu.mjs.map