@theseam/ui-common 0.4.19-beta.0 → 0.4.20

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 (140) hide show
  1. package/breadcrumbs/breadcrumbs/breadcrumbs.component.scss +1 -1
  2. package/datatable/datatable/datatable.component.d.ts +1 -10
  3. package/datatable/services/columns-manager.service.d.ts +0 -7
  4. package/datatable/utils/create-action-menu-column.d.ts +1 -1
  5. package/esm2020/breadcrumbs/breadcrumbs/breadcrumbs.component.mjs +2 -2
  6. package/esm2020/datatable/datatable/datatable.component.mjs +4 -20
  7. package/esm2020/datatable/datatable-action-menu/datatable-action-menu.component.mjs +2 -2
  8. package/esm2020/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.mjs +1 -1
  9. package/esm2020/datatable/datatable-export-button/datatable-export-button.component.mjs +1 -1
  10. package/esm2020/datatable/services/columns-manager.service.mjs +2 -27
  11. package/esm2020/datatable/utils/create-action-menu-column.mjs +3 -4
  12. package/esm2020/datatable-dynamic/datatable-dynamic-action-menu/datatable-dynamic-action-menu.component.mjs +1 -1
  13. package/esm2020/datatable-dynamic/datatable-dynamic.component.mjs +1 -1
  14. package/esm2020/framework/base-layout/base-layout.component.mjs +4 -14
  15. package/esm2020/framework/base-layout/base-layout.module.mjs +1 -6
  16. package/esm2020/framework/base-layout/directives/base-layout-nav-toggle.directive.mjs +5 -21
  17. package/esm2020/framework/base-layout/index.mjs +1 -2
  18. package/esm2020/framework/public-api.mjs +1 -2
  19. package/esm2020/framework/schema-form/schema-form-framework.mjs +5 -5
  20. package/esm2020/framework/schema-form-controls/schema-form-input/schema-form-input.component.mjs +3 -3
  21. package/esm2020/framework/schema-form-controls/schema-form-select/schema-form-select.component.mjs +3 -3
  22. package/esm2020/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.mjs +2 -2
  23. package/esm2020/framework/side-nav/side-nav-item/side-nav-item.component.mjs +67 -28
  24. package/esm2020/framework/side-nav/side-nav-toggle/side-nav-toggle.component.mjs +5 -12
  25. package/esm2020/framework/side-nav/side-nav.component.mjs +38 -116
  26. package/esm2020/framework/side-nav/side-nav.models.mjs +1 -1
  27. package/esm2020/framework/side-nav/side-nav.module.mjs +39 -9
  28. package/esm2020/framework/side-nav/side-nav.service.mjs +1 -1
  29. package/esm2020/framework/top-bar/index.mjs +1 -3
  30. package/esm2020/framework/top-bar/top-bar-item.directive.mjs +4 -10
  31. package/esm2020/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.mjs +4 -6
  32. package/esm2020/framework/top-bar/top-bar.component.mjs +11 -55
  33. package/esm2020/framework/top-bar/top-bar.module.mjs +5 -15
  34. package/esm2020/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.component.mjs +3 -3
  35. package/esm2020/layout/layout.service.mjs +2 -12
  36. package/esm2020/menu/menu-toggle.directive.mjs +2 -7
  37. package/esm2020/table-cell-types/table-cell-type-string/table-cell-type-string.component.mjs +2 -4
  38. package/esm2020/utils/geo-json/coerce-feature-collection.mjs +1 -1
  39. package/esm2020/utils/geo-json/is-feature-collection.validator.mjs +1 -1
  40. package/esm2020/utils/geo-json/is-only-geometry-types.mjs +1 -1
  41. package/esm2020/utils/geo-json/merge-polygons.mjs +1 -1
  42. package/esm2020/utils/geo-json/no-empty-feature-collection.validator.mjs +24 -0
  43. package/esm2020/utils/geo-json/no-inner-rings.validator.mjs +1 -1
  44. package/esm2020/utils/geo-json/split-multi-polygons.mjs +1 -1
  45. package/esm2020/utils/public-api.mjs +2 -1
  46. package/fesm2015/theseam-ui-common-breadcrumbs.mjs +2 -2
  47. package/fesm2015/theseam-ui-common-breadcrumbs.mjs.map +1 -1
  48. package/fesm2015/theseam-ui-common-datatable-dynamic.mjs +2 -2
  49. package/fesm2015/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  50. package/fesm2015/theseam-ui-common-datatable.mjs +10 -56
  51. package/fesm2015/theseam-ui-common-datatable.mjs.map +1 -1
  52. package/fesm2015/theseam-ui-common-framework.mjs +164 -913
  53. package/fesm2015/theseam-ui-common-framework.mjs.map +1 -1
  54. package/fesm2015/theseam-ui-common-google-maps.mjs +2 -2
  55. package/fesm2015/theseam-ui-common-google-maps.mjs.map +1 -1
  56. package/fesm2015/theseam-ui-common-layout.mjs +2 -11
  57. package/fesm2015/theseam-ui-common-layout.mjs.map +1 -1
  58. package/fesm2015/theseam-ui-common-menu.mjs +1 -6
  59. package/fesm2015/theseam-ui-common-menu.mjs.map +1 -1
  60. package/fesm2015/theseam-ui-common-table-cell-types.mjs +1 -3
  61. package/fesm2015/theseam-ui-common-table-cell-types.mjs.map +1 -1
  62. package/fesm2015/theseam-ui-common-utils.mjs +23 -1
  63. package/fesm2015/theseam-ui-common-utils.mjs.map +1 -1
  64. package/fesm2020/theseam-ui-common-breadcrumbs.mjs +2 -2
  65. package/fesm2020/theseam-ui-common-breadcrumbs.mjs.map +1 -1
  66. package/fesm2020/theseam-ui-common-datatable-dynamic.mjs +2 -2
  67. package/fesm2020/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  68. package/fesm2020/theseam-ui-common-datatable.mjs +10 -56
  69. package/fesm2020/theseam-ui-common-datatable.mjs.map +1 -1
  70. package/fesm2020/theseam-ui-common-framework.mjs +164 -915
  71. package/fesm2020/theseam-ui-common-framework.mjs.map +1 -1
  72. package/fesm2020/theseam-ui-common-google-maps.mjs +2 -2
  73. package/fesm2020/theseam-ui-common-google-maps.mjs.map +1 -1
  74. package/fesm2020/theseam-ui-common-layout.mjs +2 -11
  75. package/fesm2020/theseam-ui-common-layout.mjs.map +1 -1
  76. package/fesm2020/theseam-ui-common-menu.mjs +1 -6
  77. package/fesm2020/theseam-ui-common-menu.mjs.map +1 -1
  78. package/fesm2020/theseam-ui-common-table-cell-types.mjs +1 -3
  79. package/fesm2020/theseam-ui-common-table-cell-types.mjs.map +1 -1
  80. package/fesm2020/theseam-ui-common-utils.mjs +23 -1
  81. package/fesm2020/theseam-ui-common-utils.mjs.map +1 -1
  82. package/framework/base-layout/base-layout.component.d.ts +2 -4
  83. package/framework/base-layout/base-layout.component.scss +10 -18
  84. package/framework/base-layout/base-layout.module.d.ts +10 -11
  85. package/framework/base-layout/directives/base-layout-nav-toggle.directive.d.ts +3 -8
  86. package/framework/base-layout/index.d.ts +0 -1
  87. package/framework/base-layout/styles/_variables.scss +0 -21
  88. package/framework/public-api.d.ts +0 -1
  89. package/framework/side-nav/side-nav-item/side-nav-item.component.d.ts +14 -7
  90. package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -7
  91. package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.d.ts +3 -5
  92. package/framework/side-nav/side-nav-toggle/side-nav-toggle.component.scss +6 -3
  93. package/framework/side-nav/side-nav.component.d.ts +1 -13
  94. package/framework/side-nav/side-nav.component.scss +1 -0
  95. package/framework/side-nav/side-nav.models.d.ts +1 -7
  96. package/framework/side-nav/side-nav.module.d.ts +9 -1
  97. package/framework/side-nav/styles/_themes/light/_variables.scss +14 -24
  98. package/framework/side-nav/styles/_themes/primary/_variables.scss +0 -8
  99. package/framework/top-bar/index.d.ts +0 -2
  100. package/framework/top-bar/top-bar-item.directive.d.ts +1 -4
  101. package/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.d.ts +2 -5
  102. package/framework/top-bar/top-bar.component.d.ts +3 -25
  103. package/framework/top-bar/top-bar.component.scss +2 -7
  104. package/framework/top-bar/top-bar.module.d.ts +8 -10
  105. package/layout/layout.service.d.ts +1 -9
  106. package/menu/menu-toggle.directive.d.ts +1 -2
  107. package/package.json +2 -2
  108. package/styles/vendor/ngx-datatable/_ngx-datatable.scss +14 -57
  109. package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +5 -33
  110. package/utils/geo-json/no-empty-feature-collection.validator.d.ts +3 -0
  111. package/utils/public-api.d.ts +1 -0
  112. package/datatable/models/action-item-column-position.d.ts +0 -13
  113. package/esm2020/datatable/models/action-item-column-position.mjs +0 -5
  114. package/esm2020/framework/base-layout/directives/base-layout-side-bar-header.directive.mjs +0 -16
  115. package/esm2020/framework/nav/horizontal-nav/horizontal-nav.component.mjs +0 -55
  116. package/esm2020/framework/nav/index.mjs +0 -6
  117. package/esm2020/framework/nav/nav-item/nav-item.component.mjs +0 -227
  118. package/esm2020/framework/nav/nav-utils.mjs +0 -107
  119. package/esm2020/framework/nav/nav.models.mjs +0 -2
  120. package/esm2020/framework/nav/nav.module.mjs +0 -67
  121. package/esm2020/framework/nav/nav.service.mjs +0 -204
  122. package/esm2020/framework/top-bar/top-bar-compact-menu-btn-detail.directive.mjs +0 -16
  123. package/esm2020/framework/top-bar/top-bar-nav-toggle-btn-detail.directive.mjs +0 -16
  124. package/framework/base-layout/directives/base-layout-side-bar-header.directive.d.ts +0 -9
  125. package/framework/nav/_nav-theme.scss +0 -4
  126. package/framework/nav/horizontal-nav/horizontal-nav.component.d.ts +0 -25
  127. package/framework/nav/horizontal-nav/horizontal-nav.component.scss +0 -50
  128. package/framework/nav/index.d.ts +0 -5
  129. package/framework/nav/nav-item/nav-item.component.d.ts +0 -74
  130. package/framework/nav/nav-item/nav-item.component.scss +0 -203
  131. package/framework/nav/nav-utils.d.ts +0 -20
  132. package/framework/nav/nav.models.d.ts +0 -77
  133. package/framework/nav/nav.module.d.ts +0 -17
  134. package/framework/nav/nav.service.d.ts +0 -27
  135. package/framework/nav/styles/_themes/light/_variables.scss +0 -56
  136. package/framework/nav/styles/_themes/primary/_variables.scss +0 -56
  137. package/framework/nav/styles/_utilities.scss +0 -3
  138. package/framework/nav/styles/_variables.scss +0 -2
  139. package/framework/top-bar/top-bar-compact-menu-btn-detail.directive.d.ts +0 -8
  140. package/framework/top-bar/top-bar-nav-toggle-btn-detail.directive.d.ts +0 -8
@@ -3,8 +3,7 @@ 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 { BehaviorSubject } from 'rxjs';
7
- import { map, startWith, distinctUntilChanged, shareReplay, switchMap } from 'rxjs/operators';
6
+ import { map, startWith, distinctUntilChanged, shareReplay } from 'rxjs/operators';
8
7
 
9
8
  // TODO: Make sure the `@angular/flex-layout` breakpoints and bootstrap
10
9
  // breakpoints work the same.
@@ -80,19 +79,11 @@ function observeMediaQuery(mediaObserver, alias) {
80
79
  class TheSeamLayoutService {
81
80
  constructor(_media) {
82
81
  this._media = _media;
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 }));
82
+ this.isMobile$ = this.observe('lt-sm');
86
83
  }
87
84
  observe(alias) {
88
85
  return observeMediaQuery(this._media, alias);
89
86
  }
90
- /**
91
- * Update breakpoint observed by isMobile$
92
- */
93
- setMobileBreakpoint(alias) {
94
- this._mobileBreakpoint.next(alias);
95
- }
96
87
  }
97
88
  TheSeamLayoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamLayoutService, deps: [{ token: i1.MediaObserver }], target: i0.ɵɵFactoryTarget.Injectable });
98
89
  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 { 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":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;MCMa,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAP5B,YAAY;AACZ,QAAA,gBAAgB,aAGhB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGP,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,E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,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA,CAAA;2FAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
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":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;MCMa,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAA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A,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA,CAAA;2FAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
@@ -864,7 +864,6 @@ class MenuToggleDirective {
864
864
  overlayY: 'bottom',
865
865
  },
866
866
  ];
867
- this.menuToggle = new EventEmitter();
868
867
  // TODO: Figure out how to automatically handle this. I think the offset can
869
868
  // be calculated using the first item's offsetTop and borderTop. The problem
870
869
  // is that I was only able to calculate it after the animation had started, so
@@ -924,7 +923,6 @@ class MenuToggleDirective {
924
923
  // this._overlayRef.backdropClick().subscribe(v => {
925
924
  // console.log('backdropClick', v)
926
925
  // })
927
- this.menuToggle.emit(true);
928
926
  }
929
927
  /** The text direction of the containing app. */
930
928
  get dir() {
@@ -953,7 +951,6 @@ class MenuToggleDirective {
953
951
  this.menu?.closed.emit();
954
952
  }
955
953
  this._active = false;
956
- this.menuToggle.emit(false);
957
954
  }
958
955
  menuOpen() {
959
956
  return (this._overlayRef && this._overlayRef.hasAttached()) ?? false;
@@ -1060,7 +1057,7 @@ class MenuToggleDirective {
1060
1057
  }
1061
1058
  }
1062
1059
  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 });
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 });
1060
+ 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 });
1064
1061
  __decorate([
1065
1062
  InputNumber(0)
1066
1063
  ], MenuToggleDirective.prototype, "seamMenuTogglePositionsOffsetY", void 0);
@@ -1093,8 +1090,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1093
1090
  args: ['seamMenuToggle']
1094
1091
  }], positions: [{
1095
1092
  type: Input
1096
- }], menuToggle: [{
1097
- type: Output
1098
1093
  }], seamMenuTogglePositionsOffsetY: [{
1099
1094
  type: Input
1100
1095
  }], menuOpened: [{