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

svelte-dnd-action

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-dnd-action - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

4

dist/index.js

@@ -644,2 +644,6 @@ (function (global, factory) {

dispatchFinalizeEvent(shadowElDropZone, items);
if (shadowElDropZone !== originDropZone) {
// letting the origin drop zone know the element was permanently taken away
dispatchFinalizeEvent(originDropZone, dzToConfig.get(originDropZone).items);
}
shadowElDropZone.children[shadowElIdx].style.visibility = '';

@@ -646,0 +650,0 @@ cleanupPostDrop();

4

package.json

@@ -9,3 +9,3 @@ {

"prepublishOnly": "npm run build",
"test": "cypress open"
"test": "cypress run"
},

@@ -34,3 +34,3 @@ "devDependencies": {

"description": "*Awesome drag and drop library for Svelte 3 (not using the browser's built in dnd, thanks god): Rich animations, nested containers, touch support and more *",
"version": "0.1.3",
"version": "0.1.4",
"dependencies": {

@@ -37,0 +37,0 @@ "acorn": "^7.1.1",

@@ -95,3 +95,3 @@ # SVELTE DND ACTION

- `consider` - dispatched whenever the dragged element needs to make room for itself in a new position in the items list and when it leaves. The host (your component) is expected to update the items list (you can keep a copy of the original list if you need to)
- `finalize` - dispatched when the dragged element is dropped into position. The expectation is the same - update the list of items.
- `finalize` - dispatched on the target and origin dnd-zones when the dragged element is dropped into position. The expectation is the same - update the list of items.
In both cases the payload (within e.detail) is the same: an object with a single attribute: `items`, that contains the updated items list.

@@ -98,0 +98,0 @@ You have to listen for both events and update the list of items in order for this library to work correctly.

@@ -132,2 +132,6 @@ import { observe, unobserve } from './helpers/observer';

dispatchFinalizeEvent(shadowElDropZone, items);
if (shadowElDropZone !== originDropZone) {
// letting the origin drop zone know the element was permanently taken away
dispatchFinalizeEvent(originDropZone, dzToConfig.get(originDropZone).items);
}
shadowElDropZone.children[shadowElIdx].style.visibility = '';

@@ -134,0 +138,0 @@ cleanupPostDrop();

Sorry, the diff of this file is not supported yet

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