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

react-beautiful-dnd

Package Overview
Dependencies
Maintainers
2
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-beautiful-dnd - npm Package Compare versions

Comparing version 12.0.0-alpha.4 to 12.0.0-alpha.6

src/state/middleware/util/validate-dimensions.js

56

package.json
{
"name": "react-beautiful-dnd",
"version": "12.0.0-alpha.4",
"version": "12.0.0-alpha.6",
"description": "Beautiful and accessible drag and drop for lists with React",

@@ -62,3 +62,3 @@ "author": "Alex Reardon <areardon@atlassian.com>",

"raf-schd": "^4.0.1",
"react-redux": "^7.0.3",
"react-redux": "^7.1.0",
"redux": "^4.0.1",

@@ -69,4 +69,4 @@ "tiny-invariant": "^1.0.4",

"devDependencies": {
"@atlaskit/css-reset": "^4.0.0",
"@atlaskit/theme": "^9.1.0",
"@atlaskit/css-reset": "^5.0.2",
"@atlaskit/theme": "^9.1.1",
"@babel/core": "^7.4.5",

@@ -79,31 +79,32 @@ "@babel/plugin-proposal-class-properties": "^7.4.4",

"@babel/preset-react": "^7.0.0",
"@emotion/babel-preset-css-prop": "^10.0.9",
"@emotion/core": "^10.0.10",
"@emotion/styled": "^10.0.12",
"@storybook/react": "^5.1.3",
"@storybook/theming": "^5.1.3",
"@emotion/babel-preset-css-prop": "^10.0.14",
"@emotion/core": "^10.0.14",
"@emotion/styled": "^10.0.14",
"@storybook/react": "^5.1.9",
"@storybook/theming": "^5.1.9",
"@testing-library/react": "^8.0.4",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-emotion": "^10.0.13",
"babel-plugin-emotion": "^10.0.14",
"cross-env": "^5.2.0",
"cypress": "^3.3.1",
"emotion-theming": "^10.0.10",
"emotion-theming": "^10.0.14",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint": "^5.16.0",
"eslint": "^6.0.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^4.3.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-cypress": "^2.2.1",
"eslint-plugin-emotion": "^10.0.7",
"eslint-plugin-flowtype": "^3.10.1",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jest": "^22.6.4",
"eslint-plugin-emotion": "^10.0.14",
"eslint-plugin-flowtype": "^3.11.1",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jest": "^22.7.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^1.6.0",
"flow-bin": "0.96.0",
"eslint-plugin-react": "^7.14.2",
"eslint-plugin-react-hooks": "^1.6.1",
"flow-bin": "0.102.0",
"fs-extra": "^8.0.1",

@@ -120,10 +121,9 @@ "globby": "^9.2.0",

"react-test-renderer": "^16.8.6",
"react-testing-library": "^7.0.1",
"react-window": "^1.8.1",
"react-window": "^1.8.3",
"rimraf": "^2.6.3",
"rollup": "^1.14.6",
"rollup-plugin-babel": "^4.3.2",
"rollup": "^1.16.2",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.1",
"rollup-plugin-node-resolve": "^5.1.0",
"rollup-plugin-replace": "^2.2.0",

@@ -141,5 +141,5 @@ "rollup-plugin-size-snapshot": "^0.9.0",

"testcafe-reporter-xunit": "^2.1.0",
"url-loader": "^1.1.2",
"url-loader": "^2.0.1",
"wait-port": "^0.2.2",
"webpack": "^4.33.0"
"webpack": "^4.35.0"
},

@@ -146,0 +146,0 @@ "peerDependencies": {

@@ -36,3 +36,2 @@ // @flow

// TODO: swap order
export function find<T>(list: Array<T>, predicate: PredicateFn<T>): ?T {

@@ -39,0 +38,0 @@ if (list.find) {

@@ -13,3 +13,2 @@ // @flow

DisplacementGroups,
DraggableId,
LiftEffect,

@@ -50,3 +49,2 @@ } from '../types';

const afterDragging: DraggableDimension[] = insideHome.slice(rawIndex + 1);
// TODO: toDroppableIdMap?
const effected: DraggableIdMap = afterDragging.reduce(

@@ -53,0 +51,0 @@ (previous: DraggableIdMap, item: DraggableDimension): DraggableIdMap => {

// @flow
import invariant from 'tiny-invariant';
import { completeDrop, initialPublish } from '../action-creators';
import type { DimensionMarshal } from '../dimension-marshal/dimension-marshal-types';
import type { State, ScrollOptions, LiftRequest } from '../../types';
import type { MiddlewareStore, Action, Dispatch } from '../store-types';
import { completeDrop, initialPublish } from '../action-creators';
import validateDimensions from './util/validate-dimensions';

@@ -39,2 +40,4 @@ export default (marshal: DimensionMarshal) => ({

validateDimensions(critical, dimensions);
// Okay, we are good to start dragging now

@@ -41,0 +44,0 @@ dispatch(

@@ -5,3 +5,7 @@ // @flow

export default (announce: Announce) => {
export type ExpiringAnnounce = Announce & {
wasCalled: () => boolean,
};
export default (announce: Announce): ExpiringAnnounce => {
let wasCalled: boolean = false;

@@ -8,0 +12,0 @@ let isExpired: boolean = false;

@@ -5,3 +5,5 @@ // @flow

import * as timings from '../../../debug/timings';
import getExpiringAnnounce from './expiring-announce';
import getExpiringAnnounce, {
type ExpiringAnnounce,
} from './expiring-announce';
import getAsyncMarshal, { type AsyncMarshal } from './async-marshal';

@@ -61,3 +63,3 @@ import type {

const willExpire: Announce = getExpiringAnnounce(announce);
const willExpire: ExpiringAnnounce = getExpiringAnnounce(announce);
const provided: ResponderProvided = {

@@ -64,0 +66,0 @@ announce: willExpire,

// @flow
import invariant from 'tiny-invariant';
import type {

@@ -28,3 +27,2 @@ DimensionMap,

import scrollDroppable from '../droppable/scroll-droppable';
import getFrame from '../get-frame';

@@ -31,0 +29,0 @@ type Args = {|

@@ -52,3 +52,3 @@ // @flow

const scheduled: () => void = rafSchd(updateScroll);
const scheduled = rafSchd(updateScroll);
const binding: EventBinding = getWindowScrollBinding(scheduled);

@@ -55,0 +55,0 @@ let unbind: () => void = noop;

@@ -55,2 +55,4 @@ // @flow

return () => {
// unmounting after a timeout to let any annoucements
// during a mount be published
setTimeout(function remove() {

@@ -57,0 +59,0 @@ const toBeRemoved: ?HTMLElement = ref.current;

@@ -50,2 +50,10 @@ // @flow

// window.addEventListener(
// 'touchmove',
// (event: Event) => {
// console.log('TOUCHMOVE. prevented?', event.defaultPrevented);
// },
// { capture: false, passive: false },
// );
type GetBindingArgs = {|

@@ -426,2 +434,19 @@ cancel: () => void,

);
// This is needed for safari
// Simply adding a non capture, non passive 'touchmove' listener.
// This forces event.preventDefault() in dynamically added
// touchmove event handlers to actually work
// https://github.com/atlassian/react-beautiful-dnd/issues/1374
useLayoutEffect(function webkitHack() {
const unbind = bindEvents(window, [
{
eventName: 'touchmove',
fn: noop,
options: { capture: false, passive: false },
},
]);
return unbind;
});
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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