@angular/cdk 13.0.3 → 13.0.4

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/fesm2020/cdk.mjs CHANGED
@@ -8,7 +8,7 @@ import { Version } from '@angular/core';
8
8
  * found in the LICENSE file at https://angular.io/license
9
9
  */
10
10
  /** Current version of the Angular Component Development Kit. */
11
- const VERSION = new Version('13.0.3');
11
+ const VERSION = new Version('13.0.4');
12
12
 
13
13
  /**
14
14
  * @license
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/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 */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('13.0.3');\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\nexport * from './version';\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\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACXtD;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/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 */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('13.0.4');\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\nexport * from './version';\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\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACXtD;;;;;;;;ACAA;;;;;;;;;;"}
@@ -1642,6 +1642,13 @@ class DropListRef {
1642
1642
  if (newPositionReference === item) {
1643
1643
  newPositionReference = activeDraggables[newIndex + 1];
1644
1644
  }
1645
+ // If we didn't find a new position reference, it means that either the item didn't start off
1646
+ // in this container, or that the item requested to be inserted at the end of the list.
1647
+ if (!newPositionReference &&
1648
+ (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) &&
1649
+ this._shouldEnterAsFirstChild(pointerX, pointerY)) {
1650
+ newPositionReference = activeDraggables[0];
1651
+ }
1645
1652
  // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it
1646
1653
  // into another container and back again), we have to ensure that it isn't duplicated.
1647
1654
  if (currentIndex > -1) {
@@ -1654,11 +1661,6 @@ class DropListRef {
1654
1661
  element.parentElement.insertBefore(placeholder, element);
1655
1662
  activeDraggables.splice(newIndex, 0, item);
1656
1663
  }
1657
- else if (this._shouldEnterAsFirstChild(pointerX, pointerY)) {
1658
- const reference = activeDraggables[0].getRootElement();
1659
- reference.parentNode.insertBefore(placeholder, reference);
1660
- activeDraggables.unshift(item);
1661
- }
1662
1664
  else {
1663
1665
  coerceElement(this.element).appendChild(placeholder);
1664
1666
  activeDraggables.push(item);