@brightspace-ui/core 3.194.1 → 3.194.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.
@@ -367,6 +367,10 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
367
367
  this.dropNested = false;
368
368
  }
369
369
 
370
+ get dropDisabled() {
371
+ return this._dropNestedOnly && !this.dropNested;
372
+ }
373
+
370
374
  connectedCallback() {
371
375
  super.connectedCallback();
372
376
  if (!this.key) {
@@ -393,10 +397,6 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
393
397
  if (this.shadowRoot) this.shadowRoot.querySelector(`#${this._itemDragId}`).activateKeyboardMode();
394
398
  }
395
399
 
396
- get #disabledDrop() {
397
- return this._dropNestedOnly && !this.dropNested;
398
- }
399
-
400
400
  _annoucePositionChange(dragTargetKey, dropTargetKey, dropLocation) {
401
401
  /** Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change). */
402
402
  this.dispatchEvent(new CustomEvent('d2l-list-item-position-change', {
@@ -551,7 +551,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
551
551
  this.dragging = false;
552
552
 
553
553
  // check the dropEffect in case the user cancelled by Escape while dragging ('none' set by browser)
554
- if (!this.#disabledDrop && e.dataTransfer.dropEffect !== 'none' && dragState.shouldDrop(e.timeStamp)) {
554
+ if (!dragState.dropTarget?.dropDisabled && e.dataTransfer.dropEffect !== 'none' && dragState.shouldDrop(e.timeStamp)) {
555
555
 
556
556
  const dropTargetList = findComposedAncestor(dragState.dropTarget, node => node.tagName === 'D2L-LIST');
557
557
  const shouldDispatchPositionChange = !dragState.dragTargets.find(dragTarget => {
@@ -615,7 +615,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
615
615
  }
616
616
 
617
617
  _onDragOver(e) {
618
- if (!this.key || this.#disabledDrop) return;
618
+ if (!this.key || this.dropDisabled) return;
619
619
  const dragState = getDragState();
620
620
  dragState.updateTime(e.timeStamp);
621
621
  e.preventDefault();
@@ -903,7 +903,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
903
903
  }
904
904
 
905
905
  #onDropEnterHelper(e, isTopHalf, isMiddle) {
906
- if (this.#disabledDrop) return;
906
+ if (this.dropDisabled) return;
907
907
  e.dataTransfer.dropEffect = 'move';
908
908
 
909
909
  let location;
@@ -9145,6 +9145,9 @@
9145
9145
  "description": "**Selection:** Value to identify item if selectable",
9146
9146
  "type": "string"
9147
9147
  },
9148
+ {
9149
+ "name": "dropDisabled"
9150
+ },
9148
9151
  {
9149
9152
  "name": "draggable",
9150
9153
  "attribute": "draggable",
@@ -9555,6 +9558,9 @@
9555
9558
  "description": "**Selection:** Value to identify item if selectable",
9556
9559
  "type": "string"
9557
9560
  },
9561
+ {
9562
+ "name": "dropDisabled"
9563
+ },
9558
9564
  {
9559
9565
  "name": "draggable",
9560
9566
  "attribute": "draggable",
@@ -10107,6 +10113,9 @@
10107
10113
  "description": "**Selection:** Value to identify item if selectable",
10108
10114
  "type": "string"
10109
10115
  },
10116
+ {
10117
+ "name": "dropDisabled"
10118
+ },
10110
10119
  {
10111
10120
  "name": "draggable",
10112
10121
  "attribute": "draggable",
@@ -10456,6 +10465,9 @@
10456
10465
  "description": "**Selection:** Value to identify item if selectable",
10457
10466
  "type": "string"
10458
10467
  },
10468
+ {
10469
+ "name": "dropDisabled"
10470
+ },
10459
10471
  {
10460
10472
  "name": "draggable",
10461
10473
  "attribute": "draggable",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.194.1",
3
+ "version": "3.194.2",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",