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

@uxpin/html-dnd

Package Overview
Dependencies
Maintainers
31
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uxpin/html-dnd - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

6

dist/html_dnd.js

@@ -9,3 +9,3 @@ var __extends = (this && this.__extends) || function (d, b) {

"use strict";
function simulate(draggable, droppable, dndSimulateConfig) {
function simulate(draggable, droppable, dndSimulateConfig, middleStep) {
var _a = calculateMousePositions(draggable, droppable, dndSimulateConfig), dragX = _a.dragX, dragY = _a.dragY, dropX = _a.dropX, dropY = _a.dropY;

@@ -22,2 +22,6 @@ var store = new DragDataStore();

setTimeout(function () {
if (middleStep) {
var dragOverEventMiddleStep = createEventWithDataTransfer("dragover", dataTransfer, 0, 0, 0, dropX, dropY, false, false, false, false, 0, null);
middleStep.dispatchEvent(dragOverEventMiddleStep);
}
var dragOverEvent = createEventWithDataTransfer("dragover", dataTransfer, 0, 0, 0, dropX, dropY, false, false, false, false, 0, null);

@@ -24,0 +28,0 @@ droppable.dispatchEvent(dragOverEvent);

3

lib/index.js

@@ -19,4 +19,5 @@ var util = require('util');

var droppable = document.querySelector(selectorDroppable);
var middleStep = dndSimulateConfig.middleStep ? document.querySelector(dndSimulateConfig.middleStep) : null;
dnd.simulate(draggable, droppable, dndSimulateConfig);
dnd.simulate(draggable, droppable, dndSimulateConfig, middleStep);
})(arguments[0], arguments[1], arguments[2]);`, coreCode);

@@ -23,0 +24,0 @@

{
"name": "@uxpin/html-dnd",
"version": "2.0.0",
"version": "2.1.0",
"description": "HTML Drag and Drop Simulator for E2E testing",

@@ -5,0 +5,0 @@ "keywords": [

@@ -9,3 +9,3 @@ namespace dnd {

export function simulate(draggable: Element, droppable: Element, dndSimulateConfig: DndSimulateConfig): void {
export function simulate(draggable: Element, droppable: Element, dndSimulateConfig: DndSimulateConfig, middleStep?:Element): void {
const {dragX, dragY, dropX, dropY} = calculateMousePositions(draggable, droppable, dndSimulateConfig);

@@ -27,2 +27,7 @@

setTimeout(function() {
if (middleStep) {
const dragOverEventMiddleStep = createEventWithDataTransfer("dragover", dataTransfer, 0, 0, 0, dropX, dropY, false, false, false, false, 0, null);
middleStep.dispatchEvent(dragOverEventMiddleStep);
}
const dragOverEvent = createEventWithDataTransfer("dragover", dataTransfer, 0, 0, 0, dropX, dropY, false, false, false, false, 0, null);

@@ -29,0 +34,0 @@ droppable.dispatchEvent(dragOverEvent);

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