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

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/import.mjs 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) {
package/dist/main.js CHANGED
@@ -3525,9 +3525,10 @@ function $c5557edbed563ebf$export$8d0e41d2815afac5(props, state, ref) {
3525
3525
  let dragSession = $28e10663603f5ea1$export$418e185dd3f1b968();
3526
3526
  let { dropProps: dropProps } = (0, $fc1876157e07bcec$export$f7b0c5d28b66b6a5)(props, state, ref);
3527
3527
  let id = (0, $4vY0V$reactariautils.useId)();
3528
+ var _collection_getTextValue;
3528
3529
  let getText = (key)=>{
3529
- var _collection_getItem;
3530
- return (_collection_getItem = collection.getItem(key)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue;
3530
+ var _collection_getTextValue1, _collection_getItem;
3531
+ 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;
3531
3532
  };
3532
3533
  let label = "";
3533
3534
  let labelledBy;
@@ -3642,7 +3643,6 @@ function $0cbbd00cda972c67$export$b35afafff42da2d9(props, state) {
3642
3643
  let description;
3643
3644
  // Override description to include selected item count.
3644
3645
  let modality = (0, $4620ae0dc40f0031$export$49bac5d6d4b352ea)();
3645
- var _item_textValue;
3646
3646
  if (!props.hasDragButton && state.selectionManager.selectionMode !== "none") {
3647
3647
  let msg = $0cbbd00cda972c67$var$MESSAGES[modality][isSelected ? "selected" : "notSelected"];
3648
3648
  if (props.hasAction && modality === "keyboard") msg += "Alt";
@@ -3656,9 +3656,14 @@ function $0cbbd00cda972c67$export$b35afafff42da2d9(props, state) {
3656
3656
  } else if (isSelected) dragButtonLabel = stringFormatter.format("dragSelectedItems", {
3657
3657
  count: numKeysForDrag
3658
3658
  });
3659
- else dragButtonLabel = stringFormatter.format("dragItem", {
3660
- itemText: (_item_textValue = item === null || item === void 0 ? void 0 : item.textValue) !== null && _item_textValue !== void 0 ? _item_textValue : ""
3661
- });
3659
+ else {
3660
+ var _state_collection, _state_collection_getTextValue;
3661
+ var _state_collection_getTextValue1, _ref;
3662
+ 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 : "";
3663
+ dragButtonLabel = stringFormatter.format("dragItem", {
3664
+ itemText: itemText
3665
+ });
3666
+ }
3662
3667
  let descriptionProps = (0, $4vY0V$reactariautils.useDescription)(description);
3663
3668
  if (description) Object.assign(dragProps, descriptionProps);
3664
3669
  if (!props.hasDragButton && props.hasAction) {