@react-aria/dnd 3.1.1-nightly.3796 → 3.1.1-nightly.3804

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/dist/module.js CHANGED
@@ -3506,9 +3506,10 @@ function $ddf25448c71fc93a$export$8d0e41d2815afac5(props, state, ref) {
3506
3506
  let dragSession = $67560de7c78cb232$export$418e185dd3f1b968();
3507
3507
  let { dropProps: dropProps } = (0, $bfaab576ce1c580e$export$f7b0c5d28b66b6a5)(props, state, ref);
3508
3508
  let id = (0, $fP8tg$useId)();
3509
+ var _collection_getTextValue;
3509
3510
  let getText = (key)=>{
3510
- var _collection_getItem;
3511
- return (_collection_getItem = collection.getItem(key)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue;
3511
+ var _collection_getTextValue1, _collection_getItem;
3512
+ return (_collection_getTextValue = (_collection_getTextValue1 = collection.getTextValue) === null || _collection_getTextValue1 === void 0 ? void 0 : _collection_getTextValue1.call(collection, key)) !== null && _collection_getTextValue !== void 0 ? _collection_getTextValue : (_collection_getItem = collection.getItem(key)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue;
3512
3513
  };
3513
3514
  let label = "";
3514
3515
  let labelledBy;
@@ -3623,7 +3624,6 @@ function $fd98cf7cbf233429$export$b35afafff42da2d9(props, state) {
3623
3624
  let description;
3624
3625
  // Override description to include selected item count.
3625
3626
  let modality = (0, $7252cd45fc48c07c$export$49bac5d6d4b352ea)();
3626
- var _item_textValue;
3627
3627
  if (!props.hasDragButton && state.selectionManager.selectionMode !== "none") {
3628
3628
  let msg = $fd98cf7cbf233429$var$MESSAGES[modality][isSelected ? "selected" : "notSelected"];
3629
3629
  if (props.hasAction && modality === "keyboard") msg += "Alt";
@@ -3637,9 +3637,14 @@ function $fd98cf7cbf233429$export$b35afafff42da2d9(props, state) {
3637
3637
  } else if (isSelected) dragButtonLabel = stringFormatter.format("dragSelectedItems", {
3638
3638
  count: numKeysForDrag
3639
3639
  });
3640
- else dragButtonLabel = stringFormatter.format("dragItem", {
3641
- itemText: (_item_textValue = item === null || item === void 0 ? void 0 : item.textValue) !== null && _item_textValue !== void 0 ? _item_textValue : ""
3642
- });
3640
+ else {
3641
+ var _state_collection, _state_collection_getTextValue;
3642
+ var _state_collection_getTextValue1, _ref;
3643
+ let itemText = (_ref = (_state_collection_getTextValue1 = (_state_collection_getTextValue = (_state_collection = state.collection).getTextValue) === null || _state_collection_getTextValue === void 0 ? void 0 : _state_collection_getTextValue.call(_state_collection, props.key)) !== null && _state_collection_getTextValue1 !== void 0 ? _state_collection_getTextValue1 : item === null || item === void 0 ? void 0 : item.textValue) !== null && _ref !== void 0 ? _ref : "";
3644
+ dragButtonLabel = stringFormatter.format("dragItem", {
3645
+ itemText: itemText
3646
+ });
3647
+ }
3643
3648
  let descriptionProps = (0, $fP8tg$useDescription)(description);
3644
3649
  if (description) Object.assign(dragProps, descriptionProps);
3645
3650
  if (!props.hasDragButton && props.hasAction) {