@angular/cdk 20.0.0-next.7 → 20.0.0-next.8

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 (86) hide show
  1. package/dialog/index.d.ts +1 -1
  2. package/drag-drop/index.d.ts +4 -0
  3. package/fesm2022/{a11y-module-tRUj0Pog.mjs → a11y-module-CEBjqXuv.mjs} +3 -4
  4. package/fesm2022/a11y-module-CEBjqXuv.mjs.map +1 -0
  5. package/fesm2022/a11y.mjs +5 -5
  6. package/fesm2022/a11y.mjs.map +1 -1
  7. package/fesm2022/accordion.mjs.map +1 -1
  8. package/fesm2022/activedescendant-key-manager-BYiHZAZc.mjs.map +1 -1
  9. package/fesm2022/array-Hg8isvLj.mjs.map +1 -1
  10. package/fesm2022/bidi.mjs +2 -3
  11. package/fesm2022/bidi.mjs.map +1 -1
  12. package/fesm2022/breakpoints-observer-CsCzbYlX.mjs.map +1 -1
  13. package/fesm2022/cdk.mjs +1 -1
  14. package/fesm2022/cdk.mjs.map +1 -1
  15. package/fesm2022/clipboard.mjs +1 -2
  16. package/fesm2022/clipboard.mjs.map +1 -1
  17. package/fesm2022/coercion/private.mjs.map +1 -1
  18. package/fesm2022/coercion.mjs.map +1 -1
  19. package/fesm2022/css-pixel-value-C1yoKJ7R.mjs.map +1 -1
  20. package/fesm2022/data-source-CL6Fasig.mjs.map +1 -1
  21. package/fesm2022/dialog.mjs +22 -8
  22. package/fesm2022/dialog.mjs.map +1 -1
  23. package/fesm2022/{directionality-6lVHj23y.mjs → directionality-kM9GX3mp.mjs} +2 -3
  24. package/fesm2022/directionality-kM9GX3mp.mjs.map +1 -0
  25. package/fesm2022/dispose-view-repeater-strategy-BLw1RSwm.mjs.map +1 -1
  26. package/fesm2022/drag-drop.mjs +55 -3
  27. package/fesm2022/drag-drop.mjs.map +1 -1
  28. package/fesm2022/element-CpqV8p-X.mjs.map +1 -1
  29. package/fesm2022/fake-event-detection-D0_6qVp2.mjs.map +1 -1
  30. package/fesm2022/focus-key-manager-DgyxYbV2.mjs.map +1 -1
  31. package/fesm2022/{focus-monitor-BZnK-7fT.mjs → focus-monitor-jX8r4DY-.mjs} +2 -3
  32. package/fesm2022/focus-monitor-jX8r4DY-.mjs.map +1 -0
  33. package/fesm2022/id-generator-B33AfkWd.mjs.map +1 -1
  34. package/fesm2022/keycodes-DPWmI2Ix.mjs.map +1 -1
  35. package/fesm2022/keycodes.mjs.map +1 -1
  36. package/fesm2022/layout.mjs.map +1 -1
  37. package/fesm2022/list-key-manager-CYBoL_nN.mjs.map +1 -1
  38. package/fesm2022/listbox.mjs +1 -1
  39. package/fesm2022/listbox.mjs.map +1 -1
  40. package/fesm2022/menu.mjs +3 -3
  41. package/fesm2022/menu.mjs.map +1 -1
  42. package/fesm2022/observers/private.mjs.map +1 -1
  43. package/fesm2022/observers.mjs.map +1 -1
  44. package/fesm2022/{overlay-module-UgjfuiDh.mjs → overlay-module-BcjSxQND.mjs} +90 -76
  45. package/fesm2022/overlay-module-BcjSxQND.mjs.map +1 -0
  46. package/fesm2022/overlay.mjs +3 -3
  47. package/fesm2022/overlay.mjs.map +1 -1
  48. package/fesm2022/passive-listeners-ZmZRMx8D.mjs.map +1 -1
  49. package/fesm2022/platform-BInyKIh1.mjs.map +1 -1
  50. package/fesm2022/platform.mjs.map +1 -1
  51. package/fesm2022/portal.mjs +1 -2
  52. package/fesm2022/portal.mjs.map +1 -1
  53. package/fesm2022/private.mjs.map +1 -1
  54. package/fesm2022/recycle-view-repeater-strategy-Ce0p4WhD.mjs.map +1 -1
  55. package/fesm2022/scrolling-BXVcIfjZ.mjs.map +1 -1
  56. package/fesm2022/scrolling.mjs +3 -3
  57. package/fesm2022/scrolling.mjs.map +1 -1
  58. package/fesm2022/selection-model-88BErm4w.mjs.map +1 -1
  59. package/fesm2022/shadow-dom-DFvX9W95.mjs.map +1 -1
  60. package/fesm2022/stepper.mjs +1 -2
  61. package/fesm2022/stepper.mjs.map +1 -1
  62. package/fesm2022/style-loader-DpEDdstc.mjs.map +1 -1
  63. package/fesm2022/table.mjs +3 -3
  64. package/fesm2022/table.mjs.map +1 -1
  65. package/fesm2022/test-environment-BgaaXvCA.mjs.map +1 -1
  66. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  67. package/fesm2022/testing/testbed.mjs.map +1 -1
  68. package/fesm2022/testing.mjs.map +1 -1
  69. package/fesm2022/text-field.mjs +2 -2
  70. package/fesm2022/text-field.mjs.map +1 -1
  71. package/fesm2022/tree-key-manager-DIhQ-v4R.mjs.map +1 -1
  72. package/fesm2022/tree.mjs +1 -2
  73. package/fesm2022/tree.mjs.map +1 -1
  74. package/fesm2022/typeahead-BAa3HZoh.mjs.map +1 -1
  75. package/fesm2022/unique-selection-dispatcher-SqPM2COI.mjs.map +1 -1
  76. package/menu/index.d.ts +1 -1
  77. package/overlay/index.d.ts +67 -70
  78. package/{overlay-module.d-24bhgNtF.d.ts → overlay-module.d-CXZs2tcX.d.ts} +8 -2
  79. package/package.json +1 -1
  80. package/schematics/ng-add/index.js +1 -1
  81. package/schematics/utils/project-targets.js +11 -5
  82. package/schematics/utils/project-targets.js.map +1 -1
  83. package/fesm2022/a11y-module-tRUj0Pog.mjs.map +0 -1
  84. package/fesm2022/directionality-6lVHj23y.mjs.map +0 -1
  85. package/fesm2022/focus-monitor-BZnK-7fT.mjs.map +0 -1
  86. package/fesm2022/overlay-module-UgjfuiDh.mjs.map +0 -1
@@ -1,6 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, signal, EventEmitter, Injectable } from '@angular/core';
3
- import { DOCUMENT } from '@angular/common';
2
+ import { InjectionToken, inject, DOCUMENT, signal, EventEmitter, Injectable } from '@angular/core';
4
3
 
5
4
  /**
6
5
  * Injection token used to inject the document into Directionality.
@@ -75,4 +74,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.5",
75
74
  }], ctorParameters: () => [] });
76
75
 
77
76
  export { DIR_DOCUMENT, Directionality, _resolveDirectionality };
78
- //# sourceMappingURL=directionality-6lVHj23y.mjs.map
77
+ //# sourceMappingURL=directionality-kM9GX3mp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directionality-kM9GX3mp.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/bidi/dir-document-token.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/bidi/directionality.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.dev/license\n */\n\nimport {inject, InjectionToken, DOCUMENT} from '@angular/core';\n\n/**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-browser because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nexport const DIR_DOCUMENT = new InjectionToken<Document>('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n});\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function DIR_DOCUMENT_FACTORY(): Document {\n return inject(DOCUMENT);\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.dev/license\n */\n\nimport {EventEmitter, Injectable, OnDestroy, inject, signal} from '@angular/core';\nimport {DIR_DOCUMENT} from './dir-document-token';\n\nexport type Direction = 'ltr' | 'rtl';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n const value = rawValue?.toLowerCase() || '';\n\n if (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n return RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n }\n\n return value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\n@Injectable({providedIn: 'root'})\nexport class Directionality implements OnDestroy {\n /** The current 'ltr' or 'rtl' value. */\n get value() {\n return this.valueSignal();\n }\n\n /**\n * The current 'ltr' or 'rtl' value.\n */\n readonly valueSignal = signal<Direction>('ltr');\n\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n readonly change = new EventEmitter<Direction>();\n\n constructor(...args: unknown[]);\n\n constructor() {\n const _document = inject(DIR_DOCUMENT, {optional: true});\n\n if (_document) {\n const bodyDir = _document.body ? _document.body.dir : null;\n const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n this.valueSignal.set(_resolveDirectionality(bodyDir || htmlDir || 'ltr'));\n }\n }\n\n ngOnDestroy() {\n this.change.complete();\n }\n}\n"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;;;;AAcG;MACU,YAAY,GAAG,IAAI,cAAc,CAAW,aAAa,EAAE;AACtE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,oBAAoB;AAC9B,CAAA;AAED;;;;AAIG;SACa,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB;;ACxBA;AACA,MAAM,kBAAkB,GACtB,oHAAoH;AAEtH;AACM,SAAU,sBAAsB,CAAC,QAAgB,EAAA;IACrD,MAAM,KAAK,GAAG,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE;AAE3C,IAAA,IAAI,KAAK,KAAK,MAAM,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE,QAAQ,EAAE;AAC/E,QAAA,OAAO,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,KAAK,GAAG,KAAK;;IAGpE,OAAO,KAAK,KAAK,KAAK,GAAG,KAAK,GAAG,KAAK;AACxC;AAEA;;;AAGG;MAEU,cAAc,CAAA;;AAEzB,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,WAAW,EAAE;;AAG3B;;AAEG;AACM,IAAA,WAAW,GAAG,MAAM,CAAY,KAAK,CAAC;;AAGtC,IAAA,MAAM,GAAG,IAAI,YAAY,EAAa;AAI/C,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;QAExD,IAAI,SAAS,EAAE;AACb,YAAA,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI;AAC1D,YAAA,MAAM,OAAO,GAAG,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,GAAG,IAAI;AAChF,YAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,sBAAsB,CAAC,OAAO,IAAI,OAAO,IAAI,KAAK,CAAC,CAAC;;;IAI7E,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;;8GA3Bb,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADF,MAAM,EAAA,CAAA;;kGAClB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"dispose-view-repeater-strategy-BLw1RSwm.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk/collections/dispose-view-repeater-strategy.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.dev/license\n */\n\nimport {\n EmbeddedViewRef,\n IterableChangeRecord,\n IterableChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n _ViewRepeater,\n _ViewRepeaterItemChanged,\n _ViewRepeaterItemContext,\n _ViewRepeaterItemContextFactory,\n _ViewRepeaterItemValueResolver,\n _ViewRepeaterOperation,\n} from './view-repeater';\n\n/**\n * A repeater that destroys views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will always construct a new embedded view for each item.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport class _DisposeViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>>\n implements _ViewRepeater<T, R, C>\n{\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ) {\n changes.forEachOperation(\n (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n let view: EmbeddedViewRef<C> | undefined;\n let operation: _ViewRepeaterOperation;\n if (record.previousIndex == null) {\n const insertContext = itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = viewContainerRef.createEmbeddedView(\n insertContext.templateRef,\n insertContext.context,\n insertContext.index,\n );\n operation = _ViewRepeaterOperation.INSERTED;\n } else if (currentIndex == null) {\n viewContainerRef.remove(adjustedPreviousIndex!);\n operation = _ViewRepeaterOperation.REMOVED;\n } else {\n view = viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef<C>;\n viewContainerRef.move(view!, currentIndex);\n operation = _ViewRepeaterOperation.MOVED;\n }\n\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n },\n );\n }\n\n detach() {}\n}\n"],"names":[],"mappings":";;AAuBA;;;;;;;;AAQG;MACU,4BAA4B,CAAA;IAGvC,YAAY,CACV,OAA2B,EAC3B,gBAAkC,EAClC,kBAA4D,EAC5D,iBAAuD,EACvD,eAAgD,EAAA;QAEhD,OAAO,CAAC,gBAAgB,CACtB,CACE,MAA+B,EAC/B,qBAAoC,EACpC,YAA2B,KACzB;AACF,YAAA,IAAI,IAAoC;AACxC,YAAA,IAAI,SAAiC;AACrC,YAAA,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;gBAChC,MAAM,aAAa,GAAG,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,EAAE,YAAY,CAAC;AACrF,gBAAA,IAAI,GAAG,gBAAgB,CAAC,kBAAkB,CACxC,aAAa,CAAC,WAAW,EACzB,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,KAAK,CACpB;AACD,gBAAA,SAAS,GAAG,sBAAsB,CAAC,QAAQ;;AACtC,iBAAA,IAAI,YAAY,IAAI,IAAI,EAAE;AAC/B,gBAAA,gBAAgB,CAAC,MAAM,CAAC,qBAAsB,CAAC;AAC/C,gBAAA,SAAS,GAAG,sBAAsB,CAAC,OAAO;;iBACrC;AACL,gBAAA,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,qBAAsB,CAAuB;AACzE,gBAAA,gBAAgB,CAAC,IAAI,CAAC,IAAK,EAAE,YAAY,CAAC;AAC1C,gBAAA,SAAS,GAAG,sBAAsB,CAAC,KAAK;;YAG1C,IAAI,eAAe,EAAE;AACnB,gBAAA,eAAe,CAAC;oBACd,OAAO,EAAE,IAAI,EAAE,OAAO;oBACtB,SAAS;oBACT,MAAM;AACP,iBAAA,CAAC;;AAEN,SAAC,CACF;;AAGH,IAAA,MAAM;AACP;;;;"}
1
+ {"version":3,"file":"dispose-view-repeater-strategy-BLw1RSwm.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/collections/dispose-view-repeater-strategy.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.dev/license\n */\n\nimport {\n EmbeddedViewRef,\n IterableChangeRecord,\n IterableChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n _ViewRepeater,\n _ViewRepeaterItemChanged,\n _ViewRepeaterItemContext,\n _ViewRepeaterItemContextFactory,\n _ViewRepeaterItemValueResolver,\n _ViewRepeaterOperation,\n} from './view-repeater';\n\n/**\n * A repeater that destroys views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will always construct a new embedded view for each item.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nexport class _DisposeViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemContext<T>>\n implements _ViewRepeater<T, R, C>\n{\n applyChanges(\n changes: IterableChanges<R>,\n viewContainerRef: ViewContainerRef,\n itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>,\n itemValueResolver: _ViewRepeaterItemValueResolver<T, R>,\n itemViewChanged?: _ViewRepeaterItemChanged<R, C>,\n ) {\n changes.forEachOperation(\n (\n record: IterableChangeRecord<R>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n let view: EmbeddedViewRef<C> | undefined;\n let operation: _ViewRepeaterOperation;\n if (record.previousIndex == null) {\n const insertContext = itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = viewContainerRef.createEmbeddedView(\n insertContext.templateRef,\n insertContext.context,\n insertContext.index,\n );\n operation = _ViewRepeaterOperation.INSERTED;\n } else if (currentIndex == null) {\n viewContainerRef.remove(adjustedPreviousIndex!);\n operation = _ViewRepeaterOperation.REMOVED;\n } else {\n view = viewContainerRef.get(adjustedPreviousIndex!) as EmbeddedViewRef<C>;\n viewContainerRef.move(view!, currentIndex);\n operation = _ViewRepeaterOperation.MOVED;\n }\n\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n },\n );\n }\n\n detach() {}\n}\n"],"names":[],"mappings":";;AAuBA;;;;;;;;AAQG;MACU,4BAA4B,CAAA;IAGvC,YAAY,CACV,OAA2B,EAC3B,gBAAkC,EAClC,kBAA4D,EAC5D,iBAAuD,EACvD,eAAgD,EAAA;QAEhD,OAAO,CAAC,gBAAgB,CACtB,CACE,MAA+B,EAC/B,qBAAoC,EACpC,YAA2B,KACzB;AACF,YAAA,IAAI,IAAoC;AACxC,YAAA,IAAI,SAAiC;AACrC,YAAA,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;gBAChC,MAAM,aAAa,GAAG,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,EAAE,YAAY,CAAC;AACrF,gBAAA,IAAI,GAAG,gBAAgB,CAAC,kBAAkB,CACxC,aAAa,CAAC,WAAW,EACzB,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,KAAK,CACpB;AACD,gBAAA,SAAS,GAAG,sBAAsB,CAAC,QAAQ;;AACtC,iBAAA,IAAI,YAAY,IAAI,IAAI,EAAE;AAC/B,gBAAA,gBAAgB,CAAC,MAAM,CAAC,qBAAsB,CAAC;AAC/C,gBAAA,SAAS,GAAG,sBAAsB,CAAC,OAAO;;iBACrC;AACL,gBAAA,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,qBAAsB,CAAuB;AACzE,gBAAA,gBAAgB,CAAC,IAAI,CAAC,IAAK,EAAE,YAAY,CAAC;AAC1C,gBAAA,SAAS,GAAG,sBAAsB,CAAC,KAAK;;YAG1C,IAAI,eAAe,EAAE;AACnB,gBAAA,eAAe,CAAC;oBACd,OAAO,EAAE,IAAI,EAAE,OAAO;oBACtB,SAAS;oBACT,MAAM;AACP,iBAAA,CAAC;;AAEN,SAAC,CACF;;AAGH,IAAA,MAAM;AACP;;;;"}
@@ -1,6 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, inject, NgZone, RendererFactory2, ChangeDetectionStrategy, ViewEncapsulation, Component, Injectable, InjectionToken, ElementRef, booleanAttribute, Input, Directive, ViewContainerRef, ChangeDetectorRef, EventEmitter, Injector, afterNextRender, numberAttribute, Output, TemplateRef, NgModule } from '@angular/core';
3
- import { DOCUMENT } from '@angular/common';
2
+ import { signal, inject, NgZone, DOCUMENT, RendererFactory2, ChangeDetectionStrategy, ViewEncapsulation, Component, Injectable, InjectionToken, ElementRef, booleanAttribute, Input, Directive, ViewContainerRef, ChangeDetectorRef, EventEmitter, Injector, afterNextRender, numberAttribute, Output, TemplateRef, NgModule } from '@angular/core';
4
3
  import { Subject, Subscription, interval, animationFrameScheduler, Observable, merge, BehaviorSubject } from 'rxjs';
5
4
  import { _getEventTarget, _getShadowRoot } from './shadow-dom-DFvX9W95.mjs';
6
5
  import { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from './fake-event-detection-D0_6qVp2.mjs';
@@ -9,10 +8,11 @@ import { takeUntil, map, take, tap, switchMap, startWith } from 'rxjs/operators'
9
8
  import { _CdkPrivateStyleLoader } from './style-loader-DpEDdstc.mjs';
10
9
  import { ViewportRuler, ScrollDispatcher, CdkScrollableModule } from './scrolling.mjs';
11
10
  export { CdkScrollable as ɵɵCdkScrollable } from './scrolling.mjs';
12
- import { Directionality } from './directionality-6lVHj23y.mjs';
11
+ import { Directionality } from './directionality-kM9GX3mp.mjs';
13
12
  import { _IdGenerator } from './id-generator-B33AfkWd.mjs';
14
13
  import { coerceArray } from './array-Hg8isvLj.mjs';
15
14
  import './platform-BInyKIh1.mjs';
15
+ import '@angular/common';
16
16
  import './scrolling-BXVcIfjZ.mjs';
17
17
  import './bidi.mjs';
18
18
  import './recycle-view-repeater-strategy-Ce0p4WhD.mjs';
@@ -104,6 +104,20 @@ function isInsideClientRect(clientRect, x, y) {
104
104
  const { top, bottom, left, right } = clientRect;
105
105
  return y >= top && y <= bottom && x >= left && x <= right;
106
106
  }
107
+ /**
108
+ * Checks if the child element is overflowing from its parent.
109
+ * @param parentRect - The bounding rect of the parent element.
110
+ * @param childRect - The bounding rect of the child element.
111
+ */
112
+ function isOverflowingParent(parentRect, childRect) {
113
+ // check for horizontal overflow (left and right)
114
+ const isLeftOverflowing = childRect.left < parentRect.left;
115
+ const isRightOverflowing = childRect.left + childRect.width > parentRect.right;
116
+ // check for vertical overflow (top and bottom)
117
+ const isTopOverflowing = childRect.top < parentRect.top;
118
+ const isBottomOverflowing = childRect.top + childRect.height > parentRect.bottom;
119
+ return isLeftOverflowing || isRightOverflowing || isTopOverflowing || isBottomOverflowing;
120
+ }
107
121
  /**
108
122
  * Updates the top/left positions of a `DOMRect`, as well as their bottom/right counterparts.
109
123
  * @param domRect `DOMRect` that should be updated.
@@ -799,6 +813,40 @@ class DragRef {
799
813
  this._activeTransform = { x: 0, y: 0 };
800
814
  this._passiveTransform = { x: 0, y: 0 };
801
815
  }
816
+ /** Resets drag item to end of boundary element. */
817
+ resetToBoundary() {
818
+ if (
819
+ // can be null if the drag item was never dragged.
820
+ this._boundaryElement &&
821
+ this._rootElement &&
822
+ // check if we are overflowing off our boundary element
823
+ isOverflowingParent(this._boundaryElement.getBoundingClientRect(), this._rootElement.getBoundingClientRect())) {
824
+ const parentRect = this._boundaryElement.getBoundingClientRect();
825
+ const childRect = this._rootElement.getBoundingClientRect();
826
+ let offsetX = 0;
827
+ let offsetY = 0;
828
+ // check if we are overflowing from left or right
829
+ if (childRect.left < parentRect.left) {
830
+ offsetX = parentRect.left - childRect.left;
831
+ }
832
+ else if (childRect.right > parentRect.right) {
833
+ offsetX = parentRect.right - childRect.right;
834
+ }
835
+ // check if we are overflowing from top or bottom
836
+ if (childRect.top < parentRect.top) {
837
+ offsetY = parentRect.top - childRect.top;
838
+ }
839
+ else if (childRect.bottom > parentRect.bottom) {
840
+ offsetY = parentRect.bottom - childRect.bottom;
841
+ }
842
+ const currentLeft = this._activeTransform.x;
843
+ const currentTop = this._activeTransform.y;
844
+ let x = currentLeft + offsetX, y = currentTop + offsetY;
845
+ this._rootElement.style.transform = getTransform(x, y);
846
+ this._activeTransform = { x, y };
847
+ this._passiveTransform = { x, y };
848
+ }
849
+ }
802
850
  /**
803
851
  * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.
804
852
  * @param handle Handle element that should be disabled.
@@ -3506,6 +3554,10 @@ class CdkDrag {
3506
3554
  reset() {
3507
3555
  this._dragRef.reset();
3508
3556
  }
3557
+ /** Resets drag item to end of boundary element. */
3558
+ resetToBoundary() {
3559
+ this._dragRef.resetToBoundary();
3560
+ }
3509
3561
  /**
3510
3562
  * Gets the pixel coordinates of the draggable outside of a drop container.
3511
3563
  */