@react-stately/dnd
Advanced tools
Comparing version 3.0.0-nightly.3085 to 3.0.0-nightly.3086
@@ -1,2 +0,2 @@ | ||
var $kXFQY$react = require("react"); | ||
var $4zSno$react = require("react"); | ||
@@ -22,8 +22,8 @@ function $parcel$exportWildcard(dest, source) { | ||
} | ||
var $3585abb7393c2560$exports = {}; | ||
var $97a0ee2d5f702098$exports = {}; | ||
$parcel$export($3585abb7393c2560$exports, "useDraggableCollectionState", () => $3585abb7393c2560$export$29efd034f1d79f81); | ||
$parcel$export($97a0ee2d5f702098$exports, "useDraggableCollectionState", () => $97a0ee2d5f702098$export$29efd034f1d79f81); | ||
function $3585abb7393c2560$export$29efd034f1d79f81(props) { | ||
let [draggingKeys, setDraggingKeys] = $kXFQY$react.useState(new Set()); | ||
function $97a0ee2d5f702098$export$29efd034f1d79f81(props) { | ||
let [draggingKeys, setDraggingKeys] = $4zSno$react.useState(new Set()); | ||
let getKeys = (key)=>{ | ||
@@ -76,8 +76,8 @@ // The clicked item is always added to the drag. If it is selected, then all of the | ||
var $0cff40b4ffb5d954$exports = {}; | ||
var $493c7e7e2c1a0cd7$exports = {}; | ||
$parcel$export($0cff40b4ffb5d954$exports, "useDroppableCollectionState", () => $0cff40b4ffb5d954$export$926850f6ecef79d0); | ||
$parcel$export($493c7e7e2c1a0cd7$exports, "useDroppableCollectionState", () => $493c7e7e2c1a0cd7$export$926850f6ecef79d0); | ||
function $0cff40b4ffb5d954$export$926850f6ecef79d0(props) { | ||
let [target1, setTarget] = $kXFQY$react.useState(null); | ||
function $493c7e7e2c1a0cd7$export$926850f6ecef79d0(props) { | ||
let [target1, setTarget] = $4zSno$react.useState(null); | ||
let getOppositeTarget = (target)=>{ | ||
@@ -121,5 +121,5 @@ if (target.dropPosition === 'before') { | ||
isDropTarget (dropTarget) { | ||
if ($0cff40b4ffb5d954$var$isEqualDropTarget(dropTarget, target1)) return true; | ||
if ($493c7e7e2c1a0cd7$var$isEqualDropTarget(dropTarget, target1)) return true; | ||
// Check if the targets point at the same point between two items, one referring before, and the other after. | ||
if (dropTarget?.type === 'item' && target1?.type === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $0cff40b4ffb5d954$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $0cff40b4ffb5d954$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1)); | ||
if (dropTarget?.type === 'item' && target1?.type === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $493c7e7e2c1a0cd7$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $493c7e7e2c1a0cd7$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1)); | ||
return false; | ||
@@ -132,3 +132,3 @@ }, | ||
} | ||
function $0cff40b4ffb5d954$var$isEqualDropTarget(a, b) { | ||
function $493c7e7e2c1a0cd7$var$isEqualDropTarget(a, b) { | ||
if (!a) return !b; | ||
@@ -144,6 +144,6 @@ switch(a.type){ | ||
$parcel$exportWildcard(module.exports, $3585abb7393c2560$exports); | ||
$parcel$exportWildcard(module.exports, $0cff40b4ffb5d954$exports); | ||
$parcel$exportWildcard(module.exports, $97a0ee2d5f702098$exports); | ||
$parcel$exportWildcard(module.exports, $493c7e7e2c1a0cd7$exports); | ||
//# sourceMappingURL=main.js.map |
@@ -1,2 +0,2 @@ | ||
import {useState as $cQDsQ$useState} from "react"; | ||
import {useState as $gjNPF$useState} from "react"; | ||
@@ -6,8 +6,8 @@ function $parcel$export(e, n, v, s) { | ||
} | ||
var $3d49872db6c3ff6a$exports = {}; | ||
var $cfde1c3ca5456981$exports = {}; | ||
$parcel$export($3d49872db6c3ff6a$exports, "useDraggableCollectionState", () => $3d49872db6c3ff6a$export$29efd034f1d79f81); | ||
$parcel$export($cfde1c3ca5456981$exports, "useDraggableCollectionState", () => $cfde1c3ca5456981$export$29efd034f1d79f81); | ||
function $3d49872db6c3ff6a$export$29efd034f1d79f81(props) { | ||
let [draggingKeys, setDraggingKeys] = $cQDsQ$useState(new Set()); | ||
function $cfde1c3ca5456981$export$29efd034f1d79f81(props) { | ||
let [draggingKeys, setDraggingKeys] = $gjNPF$useState(new Set()); | ||
let getKeys = (key)=>{ | ||
@@ -60,8 +60,8 @@ // The clicked item is always added to the drag. If it is selected, then all of the | ||
var $bffaa0c5c19165a2$exports = {}; | ||
var $dabc5ba65f76be17$exports = {}; | ||
$parcel$export($bffaa0c5c19165a2$exports, "useDroppableCollectionState", () => $bffaa0c5c19165a2$export$926850f6ecef79d0); | ||
$parcel$export($dabc5ba65f76be17$exports, "useDroppableCollectionState", () => $dabc5ba65f76be17$export$926850f6ecef79d0); | ||
function $bffaa0c5c19165a2$export$926850f6ecef79d0(props) { | ||
let [target1, setTarget] = $cQDsQ$useState(null); | ||
function $dabc5ba65f76be17$export$926850f6ecef79d0(props) { | ||
let [target1, setTarget] = $gjNPF$useState(null); | ||
let getOppositeTarget = (target)=>{ | ||
@@ -105,5 +105,5 @@ if (target.dropPosition === 'before') { | ||
isDropTarget (dropTarget) { | ||
if ($bffaa0c5c19165a2$var$isEqualDropTarget(dropTarget, target1)) return true; | ||
if ($dabc5ba65f76be17$var$isEqualDropTarget(dropTarget, target1)) return true; | ||
// Check if the targets point at the same point between two items, one referring before, and the other after. | ||
if (dropTarget?.type === 'item' && target1?.type === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $bffaa0c5c19165a2$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $bffaa0c5c19165a2$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1)); | ||
if (dropTarget?.type === 'item' && target1?.type === 'item' && dropTarget.key !== target1.key && dropTarget.dropPosition !== target1.dropPosition && dropTarget.dropPosition !== 'on' && target1.dropPosition !== 'on') return $dabc5ba65f76be17$var$isEqualDropTarget(getOppositeTarget(dropTarget), target1) || $dabc5ba65f76be17$var$isEqualDropTarget(dropTarget, getOppositeTarget(target1)); | ||
return false; | ||
@@ -116,3 +116,3 @@ }, | ||
} | ||
function $bffaa0c5c19165a2$var$isEqualDropTarget(a, b) { | ||
function $dabc5ba65f76be17$var$isEqualDropTarget(a, b) { | ||
if (!a) return !b; | ||
@@ -130,3 +130,3 @@ switch(a.type){ | ||
export {$3d49872db6c3ff6a$export$29efd034f1d79f81 as useDraggableCollectionState, $bffaa0c5c19165a2$export$926850f6ecef79d0 as useDroppableCollectionState}; | ||
export {$cfde1c3ca5456981$export$29efd034f1d79f81 as useDraggableCollectionState, $dabc5ba65f76be17$export$926850f6ecef79d0 as useDroppableCollectionState}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@react-stately/dnd", | ||
"version": "3.0.0-nightly.3085+dfe72ee07", | ||
"version": "3.0.0-nightly.3086+b2abc5d94", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,5 +21,5 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-stately/selection": "3.0.0-nightly.1394+dfe72ee07", | ||
"@react-stately/utils": "3.0.0-nightly.1394+dfe72ee07", | ||
"@react-types/shared": "3.0.0-nightly.1394+dfe72ee07" | ||
"@react-stately/selection": "3.0.0-nightly.1395+b2abc5d94", | ||
"@react-stately/utils": "3.0.0-nightly.1395+b2abc5d94", | ||
"@react-types/shared": "3.0.0-nightly.1395+b2abc5d94" | ||
}, | ||
@@ -32,3 +32,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "dfe72ee076f7ca27728d0b6b4c1ef86e11191ece" | ||
"gitHead": "b2abc5d94162a7bd614fffcdf11e3d3754dc7d9f" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package