@angular/cdk 17.0.2 → 17.1.0-next.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 (113) hide show
  1. package/a11y/index.d.ts +10 -10
  2. package/accordion/index.d.ts +3 -3
  3. package/bidi/index.d.ts +2 -2
  4. package/clipboard/index.d.ts +2 -2
  5. package/collections/index.d.ts +1 -1
  6. package/esm2022/a11y/a11y-module.mjs +3 -4
  7. package/esm2022/a11y/focus-monitor/focus-monitor.mjs +21 -5
  8. package/esm2022/a11y/focus-trap/focus-trap.mjs +3 -2
  9. package/esm2022/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +14 -7
  10. package/esm2022/a11y/live-announcer/live-announcer.mjs +3 -2
  11. package/esm2022/a11y/public-api.mjs +2 -2
  12. package/esm2022/accordion/accordion-item.mjs +3 -2
  13. package/esm2022/accordion/accordion-module.mjs +3 -3
  14. package/esm2022/accordion/accordion.mjs +3 -2
  15. package/esm2022/bidi/bidi-module.mjs +3 -3
  16. package/esm2022/bidi/dir.mjs +3 -2
  17. package/esm2022/clipboard/clipboard-module.mjs +3 -3
  18. package/esm2022/clipboard/copy-to-clipboard.mjs +3 -2
  19. package/esm2022/clipboard/pending-copy.mjs +1 -1
  20. package/esm2022/collections/dispose-view-repeater-strategy.mjs +5 -4
  21. package/esm2022/collections/recycle-view-repeater-strategy.mjs +5 -4
  22. package/esm2022/collections/view-repeater.mjs +13 -1
  23. package/esm2022/dialog/dialog-container.mjs +5 -6
  24. package/esm2022/dialog/dialog-module.mjs +2 -2
  25. package/esm2022/drag-drop/drag-drop-registry.mjs +1 -1
  26. package/esm2022/drag-drop/drop-list-ref.mjs +37 -23
  27. package/esm2022/layout/breakpoints-observer.mjs +1 -1
  28. package/esm2022/menu/menu-bar.mjs +5 -5
  29. package/esm2022/menu/menu-base.mjs +3 -2
  30. package/esm2022/menu/menu-item-selectable.mjs +3 -2
  31. package/esm2022/menu/menu-item.mjs +5 -5
  32. package/esm2022/menu/menu-stack.mjs +8 -1
  33. package/esm2022/menu/menu-trigger-base.mjs +3 -2
  34. package/esm2022/menu/menu.mjs +6 -6
  35. package/esm2022/observers/observe-content.mjs +5 -4
  36. package/esm2022/overlay/overlay-container.mjs +1 -1
  37. package/esm2022/overlay/overlay-directives.mjs +9 -3
  38. package/esm2022/overlay/scroll/block-scroll-strategy.mjs +1 -1
  39. package/esm2022/platform/features/scrolling.mjs +23 -4
  40. package/esm2022/portal/portal-directives.mjs +11 -7
  41. package/esm2022/portal/portal-injector.mjs +1 -1
  42. package/esm2022/scrolling/scrollable.mjs +7 -7
  43. package/esm2022/stepper/step-header.mjs +3 -2
  44. package/esm2022/stepper/step-label.mjs +3 -2
  45. package/esm2022/stepper/stepper-button.mjs +5 -3
  46. package/esm2022/stepper/stepper-module.mjs +7 -6
  47. package/esm2022/stepper/stepper.mjs +5 -3
  48. package/esm2022/table/cell.mjs +24 -11
  49. package/esm2022/table/row.mjs +23 -10
  50. package/esm2022/table/table-module.mjs +4 -5
  51. package/esm2022/table/table.mjs +28 -15
  52. package/esm2022/table/text-column.mjs +6 -5
  53. package/esm2022/text-field/autofill.mjs +3 -2
  54. package/esm2022/text-field/autosize.mjs +3 -2
  55. package/esm2022/text-field/text-field-module.mjs +3 -3
  56. package/esm2022/tree/nested-node.mjs +3 -3
  57. package/esm2022/tree/node.mjs +3 -2
  58. package/esm2022/tree/outlet.mjs +3 -2
  59. package/esm2022/tree/padding.mjs +7 -7
  60. package/esm2022/tree/toggle.mjs +7 -13
  61. package/esm2022/tree/tree-module.mjs +3 -3
  62. package/esm2022/tree/tree.mjs +8 -7
  63. package/esm2022/version.mjs +1 -1
  64. package/fesm2022/a11y.mjs +40 -16
  65. package/fesm2022/a11y.mjs.map +1 -1
  66. package/fesm2022/accordion.mjs +6 -4
  67. package/fesm2022/accordion.mjs.map +1 -1
  68. package/fesm2022/bidi.mjs +4 -3
  69. package/fesm2022/bidi.mjs.map +1 -1
  70. package/fesm2022/cdk.mjs +1 -1
  71. package/fesm2022/cdk.mjs.map +1 -1
  72. package/fesm2022/clipboard.mjs +4 -3
  73. package/fesm2022/clipboard.mjs.map +1 -1
  74. package/fesm2022/collections.mjs +26 -14
  75. package/fesm2022/collections.mjs.map +1 -1
  76. package/fesm2022/dialog.mjs +5 -6
  77. package/fesm2022/dialog.mjs.map +1 -1
  78. package/fesm2022/drag-drop.mjs +36 -22
  79. package/fesm2022/drag-drop.mjs.map +1 -1
  80. package/fesm2022/layout.mjs.map +1 -1
  81. package/fesm2022/menu.mjs +24 -14
  82. package/fesm2022/menu.mjs.map +1 -1
  83. package/fesm2022/observers.mjs +4 -3
  84. package/fesm2022/observers.mjs.map +1 -1
  85. package/fesm2022/overlay.mjs +8 -2
  86. package/fesm2022/overlay.mjs.map +1 -1
  87. package/fesm2022/platform.mjs +23 -4
  88. package/fesm2022/platform.mjs.map +1 -1
  89. package/fesm2022/portal.mjs +10 -6
  90. package/fesm2022/portal.mjs.map +1 -1
  91. package/fesm2022/scrolling.mjs +6 -6
  92. package/fesm2022/scrolling.mjs.map +1 -1
  93. package/fesm2022/stepper.mjs +18 -11
  94. package/fesm2022/stepper.mjs.map +1 -1
  95. package/fesm2022/table.mjs +79 -39
  96. package/fesm2022/table.mjs.map +1 -1
  97. package/fesm2022/text-field.mjs +6 -4
  98. package/fesm2022/text-field.mjs.map +1 -1
  99. package/fesm2022/tree.mjs +25 -25
  100. package/fesm2022/tree.mjs.map +1 -1
  101. package/menu/index.d.ts +4 -4
  102. package/observers/index.d.ts +2 -2
  103. package/package.json +3 -3
  104. package/platform/index.d.ts +1 -1
  105. package/portal/index.d.ts +5 -5
  106. package/schematics/ng-add/index.js +1 -1
  107. package/schematics/ng-add/index.mjs +1 -1
  108. package/schematics/update-tool/target-version.js +1 -2
  109. package/schematics/update-tool/target-version.mjs +1 -2
  110. package/stepper/index.d.ts +12 -12
  111. package/table/index.d.ts +28 -28
  112. package/text-field/index.d.ts +3 -3
  113. package/tree/index.d.ts +13 -15
@@ -1 +1 @@
1
- {"version":3,"file":"layout.mjs","sources":["../../../../../../src/cdk/layout/layout-module.ts","../../../../../../src/cdk/layout/media-matcher.ts","../../../../../../src/cdk/layout/breakpoints-observer.ts","../../../../../../src/cdk/layout/breakpoints.ts","../../../../../../src/cdk/layout/layout_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\n\n@NgModule({})\nexport class LayoutModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Injectable, CSP_NONCE, Optional, Inject} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set<string> = new Set<string>();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\n@Injectable({providedIn: 'root'})\nexport class MediaMatcher {\n /** The internal matchMedia method to return back a MediaQueryList like object. */\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor(\n private _platform: Platform,\n @Optional() @Inject(CSP_NONCE) private _nonce?: string | null,\n ) {\n this._matchMedia =\n this._platform.isBrowser && window.matchMedia\n ? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n // call it from a different scope.\n window.matchMedia.bind(window)\n : noopMatchMedia;\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query, this._nonce);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string, nonce: string | undefined | null) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n\n if (nonce) {\n mediaQueryStyleNode.nonce = nonce;\n }\n\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head!.appendChild(mediaQueryStyleNode);\n }\n\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n console.error(e);\n }\n}\n\n/** No-op matchMedia replacement for non-browser platforms. */\nfunction noopMatchMedia(query: string): MediaQueryList {\n // Use `as any` here to avoid adding additional necessary properties for\n // the noop matcher.\n return {\n matches: query === 'all' || query === '',\n media: query,\n addListener: () => {},\n removeListener: () => {},\n } as any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceArray} from '@angular/cdk/coercion';\nimport {Injectable, NgZone, OnDestroy} from '@angular/core';\nimport {combineLatest, concat, Observable, Observer, Subject} from 'rxjs';\nimport {debounceTime, map, skip, startWith, take, takeUntil} from 'rxjs/operators';\nimport {MediaMatcher} from './media-matcher';\n\n/** The current state of a layout breakpoint. */\nexport interface BreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n/** The current state of a layout breakpoint. */\ninterface InternalBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /** The media query being to be matched */\n query: string;\n}\n\ninterface Query {\n observable: Observable<InternalBreakpointState>;\n mql: MediaQueryList;\n}\n\n/** Utility for checking the matching state of @media queries. */\n@Injectable({providedIn: 'root'})\nexport class BreakpointObserver implements OnDestroy {\n /** A map of all media queries currently being listened for. */\n private _queries = new Map<string, Query>();\n /** A subject for all other observables to takeUntil based on. */\n private readonly _destroySubject = new Subject<void>();\n\n constructor(private _mediaMatcher: MediaMatcher, private _zone: NgZone) {}\n\n /** Completes the active subject, signalling to all other observables to complete. */\n ngOnDestroy() {\n this._destroySubject.next();\n this._destroySubject.complete();\n }\n\n /**\n * Whether one or more media queries match the current viewport size.\n * @param value One or more media queries to check.\n * @returns Whether any of the media queries match.\n */\n isMatched(value: string | readonly string[]): boolean {\n const queries = splitQueries(coerceArray(value));\n return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);\n }\n\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param value One or more media queries to check.\n * @returns A stream of matches for the given queries.\n */\n observe(value: string | readonly string[]): Observable<BreakpointState> {\n const queries = splitQueries(coerceArray(value));\n const observables = queries.map(query => this._registerQuery(query).observable);\n\n let stateObservable = combineLatest(observables);\n // Emit the first state immediately, and then debounce the subsequent emissions.\n stateObservable = concat(\n stateObservable.pipe(take(1)),\n stateObservable.pipe(skip(1), debounceTime(0)),\n );\n return stateObservable.pipe(\n map(breakpointStates => {\n const response: BreakpointState = {\n matches: false,\n breakpoints: {},\n };\n breakpointStates.forEach(({matches, query}) => {\n response.matches = response.matches || matches;\n response.breakpoints[query] = matches;\n });\n return response;\n }),\n );\n }\n\n /** Registers a specific query to be listened for. */\n private _registerQuery(query: string): Query {\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return this._queries.get(query)!;\n }\n\n const mql = this._mediaMatcher.matchMedia(query);\n\n // Create callback for match changes and add it is as a listener.\n const queryObservable = new Observable((observer: Observer<MediaQueryListEvent>) => {\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n const handler = (e: MediaQueryListEvent): void => this._zone.run(() => observer.next(e));\n mql.addListener(handler);\n\n return () => {\n mql.removeListener(handler);\n };\n }).pipe(\n startWith(mql),\n map(({matches}) => ({query, matches})),\n takeUntil(this._destroySubject),\n );\n\n // Add the MediaQueryList to the set of queries.\n const output = {observable: queryObservable, mql};\n this._queries.set(query, output);\n return output;\n }\n}\n\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries: readonly string[]): readonly string[] {\n return queries\n .map(query => query.split(','))\n .reduce((a1, a2) => a1.concat(a2))\n .map(query => query.trim());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\nexport const Breakpoints = {\n XSmall: '(max-width: 599.98px)',\n Small: '(min-width: 600px) and (max-width: 959.98px)',\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\n Large: '(min-width: 1280px) and (max-width: 1919.98px)',\n XLarge: '(min-width: 1920px)',\n\n Handset:\n '(max-width: 599.98px) and (orientation: portrait), ' +\n '(max-width: 959.98px) and (orientation: landscape)',\n Tablet:\n '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n Web:\n '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n\n HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n\n HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MediaMatcher"],"mappings":";;;;;;;MAUa,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,QAAQ;mBAAC,EAAE,CAAA;;;ACCZ;AACA,MAAM,kCAAkC,GAAgB,IAAI,GAAG,EAAU,CAAC;AAE1E;AACA,IAAI,mBAAiD,CAAC;AAEtD;MAEa,YAAY,CAAA;IAIvB,WACU,CAAA,SAAmB,EACY,MAAsB,EAAA;QADrD,IAAS,CAAA,SAAA,GAAT,SAAS,CAAU;QACY,IAAM,CAAA,MAAA,GAAN,MAAM,CAAgB;AAE7D,QAAA,IAAI,CAAC,WAAW;AACd,YAAA,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,MAAM,CAAC,UAAU;AAC3C;;AAEE,oBAAA,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;kBAC9B,cAAc,CAAC;KACtB;AAED;;;;;AAKG;AACH,IAAA,UAAU,CAAC,KAAa,EAAA;QACtB,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;AACjD,YAAA,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;AAC1C,SAAA;AACD,QAAA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AM,EAAC,CAAA;;AA2FhC;;;AAGG;AACH,SAAS,YAAY,CAAC,OAA0B,EAAA;AAC9C,IAAA,OAAO,OAAO;SACX,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC9B,SAAA,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;SACjC,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAChC;;ACtIA;AACA;AACa,MAAA,WAAW,GAAG;AACzB,IAAA,MAAM,EAAE,uBAAuB;AAC/B,IAAA,KAAK,EAAE,8CAA8C;AACrD,IAAA,MAAM,EAAE,+CAA+C;AACvD,IAAA,KAAK,EAAE,gDAAgD;AACvD,IAAA,MAAM,EAAE,qBAAqB;AAE7B,IAAA,OAAO,EACL,qDAAqD;QACrD,oDAAoD;AACtD,IAAA,MAAM,EACJ,4EAA4E;QAC5E,4EAA4E;AAC9E,IAAA,GAAG,EACD,kDAAkD;QAClD,kDAAkD;AAEpD,IAAA,eAAe,EAAE,mDAAmD;AACpE,IAAA,cAAc,EAAE,0EAA0E;AAC1F,IAAA,WAAW,EAAE,gDAAgD;AAE7D,IAAA,gBAAgB,EAAE,oDAAoD;AACtE,IAAA,eAAe,EAAE,4EAA4E;AAC7F,IAAA,YAAY,EAAE,kDAAkD;;;AChClE;;AAEG;;;;"}
1
+ {"version":3,"file":"layout.mjs","sources":["../../../../../../src/cdk/layout/layout-module.ts","../../../../../../src/cdk/layout/media-matcher.ts","../../../../../../src/cdk/layout/breakpoints-observer.ts","../../../../../../src/cdk/layout/breakpoints.ts","../../../../../../src/cdk/layout/layout_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\n\n@NgModule({})\nexport class LayoutModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Injectable, CSP_NONCE, Optional, Inject} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set<string> = new Set<string>();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\n@Injectable({providedIn: 'root'})\nexport class MediaMatcher {\n /** The internal matchMedia method to return back a MediaQueryList like object. */\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor(\n private _platform: Platform,\n @Optional() @Inject(CSP_NONCE) private _nonce?: string | null,\n ) {\n this._matchMedia =\n this._platform.isBrowser && window.matchMedia\n ? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n // call it from a different scope.\n window.matchMedia.bind(window)\n : noopMatchMedia;\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query, this._nonce);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string, nonce: string | undefined | null) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n\n if (nonce) {\n mediaQueryStyleNode.nonce = nonce;\n }\n\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head!.appendChild(mediaQueryStyleNode);\n }\n\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n console.error(e);\n }\n}\n\n/** No-op matchMedia replacement for non-browser platforms. */\nfunction noopMatchMedia(query: string): MediaQueryList {\n // Use `as any` here to avoid adding additional necessary properties for\n // the noop matcher.\n return {\n matches: query === 'all' || query === '',\n media: query,\n addListener: () => {},\n removeListener: () => {},\n } as any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceArray} from '@angular/cdk/coercion';\nimport {Injectable, NgZone, OnDestroy} from '@angular/core';\nimport {combineLatest, concat, Observable, Observer, Subject} from 'rxjs';\nimport {debounceTime, map, skip, startWith, take, takeUntil} from 'rxjs/operators';\nimport {MediaMatcher} from './media-matcher';\n\n/** The current state of a layout breakpoint. */\nexport interface BreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n/** The current state of a layout breakpoint. */\ninterface InternalBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /** The media query being to be matched */\n query: string;\n}\n\ninterface Query {\n observable: Observable<InternalBreakpointState>;\n mql: MediaQueryList;\n}\n\n/** Utility for checking the matching state of @media queries. */\n@Injectable({providedIn: 'root'})\nexport class BreakpointObserver implements OnDestroy {\n /** A map of all media queries currently being listened for. */\n private _queries = new Map<string, Query>();\n /** A subject for all other observables to takeUntil based on. */\n private readonly _destroySubject = new Subject<void>();\n\n constructor(\n private _mediaMatcher: MediaMatcher,\n private _zone: NgZone,\n ) {}\n\n /** Completes the active subject, signalling to all other observables to complete. */\n ngOnDestroy() {\n this._destroySubject.next();\n this._destroySubject.complete();\n }\n\n /**\n * Whether one or more media queries match the current viewport size.\n * @param value One or more media queries to check.\n * @returns Whether any of the media queries match.\n */\n isMatched(value: string | readonly string[]): boolean {\n const queries = splitQueries(coerceArray(value));\n return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);\n }\n\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param value One or more media queries to check.\n * @returns A stream of matches for the given queries.\n */\n observe(value: string | readonly string[]): Observable<BreakpointState> {\n const queries = splitQueries(coerceArray(value));\n const observables = queries.map(query => this._registerQuery(query).observable);\n\n let stateObservable = combineLatest(observables);\n // Emit the first state immediately, and then debounce the subsequent emissions.\n stateObservable = concat(\n stateObservable.pipe(take(1)),\n stateObservable.pipe(skip(1), debounceTime(0)),\n );\n return stateObservable.pipe(\n map(breakpointStates => {\n const response: BreakpointState = {\n matches: false,\n breakpoints: {},\n };\n breakpointStates.forEach(({matches, query}) => {\n response.matches = response.matches || matches;\n response.breakpoints[query] = matches;\n });\n return response;\n }),\n );\n }\n\n /** Registers a specific query to be listened for. */\n private _registerQuery(query: string): Query {\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return this._queries.get(query)!;\n }\n\n const mql = this._mediaMatcher.matchMedia(query);\n\n // Create callback for match changes and add it is as a listener.\n const queryObservable = new Observable((observer: Observer<MediaQueryListEvent>) => {\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n const handler = (e: MediaQueryListEvent): void => this._zone.run(() => observer.next(e));\n mql.addListener(handler);\n\n return () => {\n mql.removeListener(handler);\n };\n }).pipe(\n startWith(mql),\n map(({matches}) => ({query, matches})),\n takeUntil(this._destroySubject),\n );\n\n // Add the MediaQueryList to the set of queries.\n const output = {observable: queryObservable, mql};\n this._queries.set(query, output);\n return output;\n }\n}\n\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries: readonly string[]): readonly string[] {\n return queries\n .map(query => query.split(','))\n .reduce((a1, a2) => a1.concat(a2))\n .map(query => query.trim());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\nexport const Breakpoints = {\n XSmall: '(max-width: 599.98px)',\n Small: '(min-width: 600px) and (max-width: 959.98px)',\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\n Large: '(min-width: 1280px) and (max-width: 1919.98px)',\n XLarge: '(min-width: 1920px)',\n\n Handset:\n '(max-width: 599.98px) and (orientation: portrait), ' +\n '(max-width: 959.98px) and (orientation: landscape)',\n Tablet:\n '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n Web:\n '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n\n HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n\n HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.MediaMatcher"],"mappings":";;;;;;;MAUa,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,E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A;AACa,MAAA,WAAW,GAAG;AACzB,IAAA,MAAM,EAAE,uBAAuB;AAC/B,IAAA,KAAK,EAAE,8CAA8C;AACrD,IAAA,MAAM,EAAE,+CAA+C;AACvD,IAAA,KAAK,EAAE,gDAAgD;AACvD,IAAA,MAAM,EAAE,qBAAqB;AAE7B,IAAA,OAAO,EACL,qDAAqD;QACrD,oDAAoD;AACtD,IAAA,MAAM,EACJ,4EAA4E;QAC5E,4EAA4E;AAC9E,IAAA,GAAG,EACD,kDAAkD;QAClD,kDAAkD;AAEpD,IAAA,eAAe,EAAE,mDAAmD;AACpE,IAAA,cAAc,EAAE,0EAA0E;AAC1F,IAAA,WAAW,EAAE,gDAAgD;AAE7D,IAAA,gBAAgB,EAAE,oDAAoD;AACtE,IAAA,eAAe,EAAE,4EAA4E;AAC7F,IAAA,YAAY,EAAE,kDAAkD;;;AChClE;;AAEG;;;;"}
package/fesm2022/menu.mjs CHANGED
@@ -34,6 +34,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
34
34
  /** Injection token used to return classes implementing the Menu interface */
35
35
  const CDK_MENU = new InjectionToken('cdk-menu');
36
36
 
37
+ /** The relative item in the inline menu to focus after closing all popup menus. */
38
+ var FocusNext;
39
+ (function (FocusNext) {
40
+ FocusNext[FocusNext["nextItem"] = 0] = "nextItem";
41
+ FocusNext[FocusNext["previousItem"] = 1] = "previousItem";
42
+ FocusNext[FocusNext["currentItem"] = 2] = "currentItem";
43
+ })(FocusNext || (FocusNext = {}));
37
44
  /** Injection token used for an implementation of MenuStack. */
38
45
  const MENU_STACK = new InjectionToken('cdk-menu-stack');
39
46
  /** Provider that provides the parent menu stack, or a new menu stack if there is no parent one. */
@@ -262,7 +269,7 @@ class CdkMenuTriggerBase {
262
269
  return this._childMenuInjector;
263
270
  }
264
271
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CdkMenuTriggerBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
265
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: CdkMenuTriggerBase, host: { properties: { "attr.aria-controls": "childMenu?.id", "attr.data-cdk-menu-stack-id": "menuStack.id" } }, ngImport: i0 }); }
272
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: CdkMenuTriggerBase, isStandalone: true, host: { properties: { "attr.aria-controls": "childMenu?.id", "attr.data-cdk-menu-stack-id": "menuStack.id" } }, ngImport: i0 }); }
266
273
  }
267
274
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CdkMenuTriggerBase, decorators: [{
268
275
  type: Directive,
@@ -271,6 +278,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
271
278
  '[attr.aria-controls]': 'childMenu?.id',
272
279
  '[attr.data-cdk-menu-stack-id]': 'menuStack.id',
273
280
  },
281
+ standalone: true,
274
282
  }]
275
283
  }] });
276
284
 
@@ -954,8 +962,8 @@ class CdkMenuItem {
954
962
  event.preventDefault();
955
963
  this._menuStack.close(parentMenu, {
956
964
  focusNextOnEmpty: this._menuStack.inlineMenuOrientation() === 'horizontal'
957
- ? 1 /* FocusNext.previousItem */
958
- : 2 /* FocusNext.currentItem */,
965
+ ? FocusNext.previousItem
966
+ : FocusNext.currentItem,
959
967
  focusParentTrigger: true,
960
968
  });
961
969
  }
@@ -968,7 +976,7 @@ class CdkMenuItem {
968
976
  if (!this.hasMenu && this._menuStack.inlineMenuOrientation() === 'horizontal') {
969
977
  event.preventDefault();
970
978
  this._menuStack.closeAll({
971
- focusNextOnEmpty: 0 /* FocusNext.nextItem */,
979
+ focusNextOnEmpty: FocusNext.nextItem,
972
980
  focusParentTrigger: true,
973
981
  });
974
982
  }
@@ -1232,7 +1240,7 @@ class CdkMenuBase extends CdkMenuGroup {
1232
1240
  }
1233
1241
  }
1234
1242
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CdkMenuBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1235
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: CdkMenuBase, inputs: { id: "id" }, host: { attributes: { "role": "menu" }, listeners: { "focus": "focusFirstItem()", "focusin": "menuStack.setHasFocus(true)", "focusout": "menuStack.setHasFocus(false)" }, properties: { "tabindex": "_getTabIndex()", "id": "id", "attr.aria-orientation": "orientation", "attr.data-cdk-menu-stack-id": "menuStack.id" } }, queries: [{ propertyName: "items", predicate: CdkMenuItem, descendants: true }], usesInheritance: true, ngImport: i0 }); }
1243
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.4", type: CdkMenuBase, isStandalone: true, inputs: { id: "id" }, host: { attributes: { "role": "menu" }, listeners: { "focus": "focusFirstItem()", "focusin": "menuStack.setHasFocus(true)", "focusout": "menuStack.setHasFocus(false)" }, properties: { "tabindex": "_getTabIndex()", "id": "id", "attr.aria-orientation": "orientation", "attr.data-cdk-menu-stack-id": "menuStack.id" } }, queries: [{ propertyName: "items", predicate: CdkMenuItem, descendants: true }], usesInheritance: true, ngImport: i0 }); }
1236
1244
  }
1237
1245
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CdkMenuBase, decorators: [{
1238
1246
  type: Directive,
@@ -1248,6 +1256,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
1248
1256
  '(focusin)': 'menuStack.setHasFocus(true)',
1249
1257
  '(focusout)': 'menuStack.setHasFocus(false)',
1250
1258
  },
1259
+ standalone: true,
1251
1260
  }]
1252
1261
  }], propDecorators: { id: [{
1253
1262
  type: Input
@@ -1303,7 +1312,7 @@ class CdkMenu extends CdkMenuBase {
1303
1312
  if (!hasModifierKey(event)) {
1304
1313
  event.preventDefault();
1305
1314
  this.menuStack.close(this, {
1306
- focusNextOnEmpty: 2 /* FocusNext.currentItem */,
1315
+ focusNextOnEmpty: FocusNext.currentItem,
1307
1316
  focusParentTrigger: true,
1308
1317
  });
1309
1318
  }
@@ -1324,15 +1333,15 @@ class CdkMenu extends CdkMenuBase {
1324
1333
  _toggleMenuFocus(focusNext) {
1325
1334
  const keyManager = this.keyManager;
1326
1335
  switch (focusNext) {
1327
- case 0 /* FocusNext.nextItem */:
1336
+ case FocusNext.nextItem:
1328
1337
  keyManager.setFocusOrigin('keyboard');
1329
1338
  keyManager.setNextItemActive();
1330
1339
  break;
1331
- case 1 /* FocusNext.previousItem */:
1340
+ case FocusNext.previousItem:
1332
1341
  keyManager.setFocusOrigin('keyboard');
1333
1342
  keyManager.setPreviousItemActive();
1334
1343
  break;
1335
- case 2 /* FocusNext.currentItem */:
1344
+ case FocusNext.currentItem:
1336
1345
  if (keyManager.activeItem) {
1337
1346
  keyManager.setFocusOrigin('keyboard');
1338
1347
  keyManager.setActiveItem(keyManager.activeItem);
@@ -1444,17 +1453,17 @@ class CdkMenuBar extends CdkMenuBase {
1444
1453
  _toggleOpenMenu(focusNext) {
1445
1454
  const keyManager = this.keyManager;
1446
1455
  switch (focusNext) {
1447
- case 0 /* FocusNext.nextItem */:
1456
+ case FocusNext.nextItem:
1448
1457
  keyManager.setFocusOrigin('keyboard');
1449
1458
  keyManager.setNextItemActive();
1450
1459
  keyManager.activeItem?.getMenuTrigger()?.open();
1451
1460
  break;
1452
- case 1 /* FocusNext.previousItem */:
1461
+ case FocusNext.previousItem:
1453
1462
  keyManager.setFocusOrigin('keyboard');
1454
1463
  keyManager.setPreviousItemActive();
1455
1464
  keyManager.activeItem?.getMenuTrigger()?.open();
1456
1465
  break;
1457
- case 2 /* FocusNext.currentItem */:
1466
+ case FocusNext.currentItem:
1458
1467
  if (keyManager.activeItem) {
1459
1468
  keyManager.setFocusOrigin('keyboard');
1460
1469
  keyManager.setActiveItem(keyManager.activeItem);
@@ -1504,7 +1513,7 @@ class CdkMenuItemSelectable extends CdkMenuItem {
1504
1513
  this.closeOnSpacebarTrigger = false;
1505
1514
  }
1506
1515
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CdkMenuItemSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1507
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.4", type: CdkMenuItemSelectable, inputs: { checked: ["cdkMenuItemChecked", "checked", booleanAttribute] }, host: { properties: { "attr.aria-checked": "!!checked", "attr.aria-disabled": "disabled || null" } }, usesInheritance: true, ngImport: i0 }); }
1516
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.4", type: CdkMenuItemSelectable, isStandalone: true, inputs: { checked: ["cdkMenuItemChecked", "checked", booleanAttribute] }, host: { properties: { "attr.aria-checked": "!!checked", "attr.aria-disabled": "disabled || null" } }, usesInheritance: true, ngImport: i0 }); }
1508
1517
  }
1509
1518
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CdkMenuItemSelectable, decorators: [{
1510
1519
  type: Directive,
@@ -1513,6 +1522,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
1513
1522
  '[attr.aria-checked]': '!!checked',
1514
1523
  '[attr.aria-disabled]': 'disabled || null',
1515
1524
  },
1525
+ standalone: true,
1516
1526
  }]
1517
1527
  }], propDecorators: { checked: [{
1518
1528
  type: Input,
@@ -1866,5 +1876,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImpor
1866
1876
  * Generated bundle index. Do not edit.
1867
1877
  */
1868
1878
 
1869
- export { CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuBase, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuModule, CdkMenuTrigger, CdkMenuTriggerBase, CdkTargetMenuAim, ContextMenuTracker, MENU_AIM, MENU_STACK, MENU_TRIGGER, MenuStack, PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER, PARENT_OR_NEW_MENU_STACK_PROVIDER, PointerFocusTracker, TargetMenuAim };
1879
+ export { CDK_MENU, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuBase, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuModule, CdkMenuTrigger, CdkMenuTriggerBase, CdkTargetMenuAim, ContextMenuTracker, FocusNext, MENU_AIM, MENU_STACK, MENU_TRIGGER, MenuStack, PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER, PARENT_OR_NEW_MENU_STACK_PROVIDER, PointerFocusTracker, TargetMenuAim };
1870
1880
  //# sourceMappingURL=menu.mjs.map