@angular/cdk 22.0.0-next.0 → 22.0.0-next.2

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.
package/fesm2022/cdk.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Version } from '@angular/core';
2
2
 
3
- const VERSION = new Version('22.0.0-next.0');
3
+ const VERSION = new Version('22.0.0-next.2');
4
4
 
5
5
  export { VERSION };
6
6
  //# sourceMappingURL=cdk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/version.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 {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('22.0.0-next.0');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"cdk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/version.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 {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('22.0.0-next.2');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
@@ -1548,10 +1548,13 @@ class SingleAxisSortStrategy {
1548
1548
  };
1549
1549
  }
1550
1550
  enter(item, pointerX, pointerY, index) {
1551
- const newIndex = index == null || index < 0 ? this._getItemIndexFromPointerPosition(item, pointerX, pointerY) : index;
1552
1551
  const activeDraggables = this._activeDraggables;
1553
1552
  const currentIndex = activeDraggables.indexOf(item);
1554
1553
  const placeholder = item.getPlaceholderElement();
1554
+ if (currentIndex > -1) {
1555
+ activeDraggables.splice(currentIndex, 1);
1556
+ }
1557
+ const newIndex = index == null || index < 0 ? this._getItemIndexFromPointerPosition(item, pointerX, pointerY) : index;
1555
1558
  let newPositionReference = activeDraggables[newIndex];
1556
1559
  if (newPositionReference === item) {
1557
1560
  newPositionReference = activeDraggables[newIndex + 1];
@@ -1559,9 +1562,6 @@ class SingleAxisSortStrategy {
1559
1562
  if (!newPositionReference && (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) && this._shouldEnterAsFirstChild(pointerX, pointerY)) {
1560
1563
  newPositionReference = activeDraggables[0];
1561
1564
  }
1562
- if (currentIndex > -1) {
1563
- activeDraggables.splice(currentIndex, 1);
1564
- }
1565
1565
  if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {
1566
1566
  const element = newPositionReference.getRootElement();
1567
1567
  element.parentElement.insertBefore(placeholder, element);