Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atlaskit/drag-and-drop

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/drag-and-drop - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

6

CHANGELOG.md
# @atlaskit/drag-and-drop
## 0.8.0
### Minor Changes
- [`1e3f9743e57`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1e3f9743e57) - A _monitor_ that is added during an event (eg `onDragStart`) will no longer be called for the current event. This is to prevent the accidental creation of infinite loops. This behaviour matches native [`EventTargets`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) where an event listener cannot add another event listener during an active event to the same event target in the same event phase.
## 0.7.1

@@ -4,0 +10,0 @@

26

dist/cjs/make-adapter/make-monitor.js

@@ -87,19 +87,17 @@ "use strict";

return;
}
} // Creating an array from the set _before_ iterating
// This is so that monitors added during the current event will not be called.
// This behaviour matches native EventTargets where an event listener
// cannot add another event listener during an active event to the same
// event target in the same event (for us we have a single global event target)
var _iterator2 = _createForOfIteratorHelper(dragging.active),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var _monitor$eventName;
var active = Array.from(dragging.active);
var _monitor = _step2.value;
// @ts-expect-error: I cannot get this type working!
(_monitor$eventName = _monitor[eventName]) === null || _monitor$eventName === void 0 ? void 0 : _monitor$eventName.call(_monitor, payload);
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
for (var _i = 0, _active = active; _i < _active.length; _i++) {
var _monitor$eventName;
var _monitor = _active[_i];
// @ts-expect-error: I cannot get this type working!
(_monitor$eventName = _monitor[eventName]) === null || _monitor$eventName === void 0 ? void 0 : _monitor$eventName.call(_monitor, payload);
}

@@ -106,0 +104,0 @@

{
"name": "@atlaskit/drag-and-drop",
"version": "0.7.1",
"version": "0.8.0",
"sideEffects": false
}

@@ -56,5 +56,12 @@ export function makeMonitor() {

return;
}
} // Creating an array from the set _before_ iterating
// This is so that monitors added during the current event will not be called.
// This behaviour matches native EventTargets where an event listener
// cannot add another event listener during an active event to the same
// event target in the same event (for us we have a single global event target)
for (const monitor of dragging.active) {
const active = Array.from(dragging.active);
for (const monitor of active) {
var _monitor$eventName;

@@ -61,0 +68,0 @@

{
"name": "@atlaskit/drag-and-drop",
"version": "0.7.1",
"version": "0.8.0",
"sideEffects": false
}

@@ -78,19 +78,17 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";

return;
}
} // Creating an array from the set _before_ iterating
// This is so that monitors added during the current event will not be called.
// This behaviour matches native EventTargets where an event listener
// cannot add another event listener during an active event to the same
// event target in the same event (for us we have a single global event target)
var _iterator2 = _createForOfIteratorHelper(dragging.active),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var _monitor$eventName;
var active = Array.from(dragging.active);
var _monitor = _step2.value;
// @ts-expect-error: I cannot get this type working!
(_monitor$eventName = _monitor[eventName]) === null || _monitor$eventName === void 0 ? void 0 : _monitor$eventName.call(_monitor, payload);
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
for (var _i = 0, _active = active; _i < _active.length; _i++) {
var _monitor$eventName;
var _monitor = _active[_i];
// @ts-expect-error: I cannot get this type working!
(_monitor$eventName = _monitor[eventName]) === null || _monitor$eventName === void 0 ? void 0 : _monitor$eventName.call(_monitor, payload);
}

@@ -97,0 +95,0 @@

{
"name": "@atlaskit/drag-and-drop",
"version": "0.7.1",
"version": "0.8.0",
"sideEffects": false
}
{
"name": "@atlaskit/drag-and-drop",
"version": "0.7.1",
"version": "0.8.0",
"description": "A performance optimized drag and drop framework for everyone",

@@ -5,0 +5,0 @@ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc