-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump react-dnd from 11.1.3 to 14.0.2 #405
Merged
nelsonni
merged 5 commits into
development
from
dependabot/npm_and_yarn/development/react-dnd-14.0.2
Jul 6, 2021
Merged
Bump react-dnd from 11.1.3 to 14.0.2 #405
nelsonni
merged 5 commits into
development
from
dependabot/npm_and_yarn/development/react-dnd-14.0.2
Jul 6, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependabot
bot
force-pushed
the
dependabot/npm_and_yarn/development/react-dnd-14.0.2
branch
from
May 3, 2021 05:07
481f87f
to
b1ec3ff
Compare
Bumps [react-dnd](https://github.com/react-dnd/react-dnd) from 11.1.3 to 14.0.2. - [Release notes](https://github.com/react-dnd/react-dnd/releases) - [Changelog](https://github.com/react-dnd/react-dnd/blob/main/CHANGELOG.md) - [Commits](react-dnd/react-dnd@v11.1.3...v14.0.2) Signed-off-by: dependabot[bot] <support@github.com>
nelsonni
force-pushed
the
dependabot/npm_and_yarn/development/react-dnd-14.0.2
branch
from
June 30, 2021 22:46
b1ec3ff
to
ab05ca6
Compare
ERROR in src/components/CanvasComponent.tsx:46:15
TS2571: Object is of type 'unknown'.
44 | accept: ['CARD', 'STACK'],
45 | canDrop: (_item, monitor) => {
> 46 | return !monitor.getItem().captured;
| ^^^^^^^^^^^^^^^^^
47 | },
48 | drop: (item, monitor) => {
49 | switch (item.type) {
ERROR in src/components/CanvasComponent.tsx:49:15
TS2571: Object is of type 'unknown'.
47 | },
48 | drop: (item, monitor) => {
> 49 | switch (item.type) {
| ^^^^
50 | case 'CARD': {
51 | const card = cards[monitor.getItem().id];
52 | const delta = monitor.getDifferenceFromInitialOffset();
ERROR in src/components/CanvasComponent.tsx:51:30
TS2571: Object is of type 'unknown'.
49 | switch (item.type) {
50 | case 'CARD': {
> 51 | const card = cards[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
52 | const delta = monitor.getDifferenceFromInitialOffset();
53 | if (!delta) return; // no dragging is occurring, perhaps a card was picked up and dropped without dragging
54 | if (card.captured) {
ERROR in src/components/CanvasComponent.tsx:62:32
TS2571: Object is of type 'unknown'.
60 | }
61 | case 'STACK': {
> 62 | const stack = stacks[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
63 | const delta = monitor.getDifferenceFromInitialOffset();
64 | if (!delta) return; // no dragging is occurring, perhaps a stack was picked up and dropped without dragging
65 | dispatch(updateStack({ ...stack, left: Math.round(stack.left + delta.x), top: Math.round(stack.top + delta.y) }));
ERROR in src/components/CardComponent.tsx:85:12
TS2339: Property 'isDragging' does not exist on type 'unknown'.
83 |
84 | // Enable CardComponent as a drop source (i.e. allowing this card to be draggable)
> 85 | const [{ isDragging }, drag] = useDrag({
| ^^^^^^^^^^
86 | item: { type: 'CARD', id: props.id },
87 | collect: monitor => ({
88 | isDragging: !!monitor.isDragging(),
ERROR in src/components/CardComponent.tsx:85:42
TS2345: Argument of type '{ item: { type: string; id: string; }; collect: (monitor: DragSourceMonitor<{ type: string; id: string; }, unknown>) => { isDragging: boolean; }; }' is not assignable to parameter of type 'FactoryOrInstance<DragSourceHookSpec<{ type: string; id: string; }, unknown, unknown>>'.
Property 'type' is missing in type '{ item: { type: string; id: string; }; collect: (monitor: DragSourceMonitor<{ type: string; id: string; }, unknown>) => { isDragging: boolean; }; }' but required in type 'DragSourceHookSpec<{ type: string; id: string; }, unknown, unknown>'.
83 |
84 | // Enable CardComponent as a drop source (i.e. allowing this card to be draggable)
> 85 | const [{ isDragging }, drag] = useDrag({
| ^
> 86 | item: { type: 'CARD', id: props.id },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 87 | collect: monitor => ({
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 88 | isDragging: !!monitor.isDragging(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 89 | }),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 90 | });
| ^^^^
91 |
92 | // Enable CardComponent as a drop target (i.e. allow other elements to be dropped on this card)
93 | const [{ isOver }, drop] = useDrop({
ERROR in src/components/CardComponent.tsx:97:26
TS2571: Object is of type 'unknown'.
95 | canDrop: (item, monitor) => {
96 | const dropTarget = cards[props.id];
> 97 | const dropSource = item.type === 'CARD' ? cards[monitor.getItem().id] : stacks[monitor.getItem().id];
| ^^^^
98 | return dropTarget.id !== dropSource.id; // restrict dropped items from accepting a self-referencing drop (i.e. dropping a card on itself)
99 | },
100 | drop: (item, monitor) => {
ERROR in src/components/CardComponent.tsx:97:55
TS2571: Object is of type 'unknown'.
95 | canDrop: (item, monitor) => {
96 | const dropTarget = cards[props.id];
> 97 | const dropSource = item.type === 'CARD' ? cards[monitor.getItem().id] : stacks[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
98 | return dropTarget.id !== dropSource.id; // restrict dropped items from accepting a self-referencing drop (i.e. dropping a card on itself)
99 | },
100 | drop: (item, monitor) => {
ERROR in src/components/CardComponent.tsx:97:86
TS2571: Object is of type 'unknown'.
95 | canDrop: (item, monitor) => {
96 | const dropTarget = cards[props.id];
> 97 | const dropSource = item.type === 'CARD' ? cards[monitor.getItem().id] : stacks[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
98 | return dropTarget.id !== dropSource.id; // restrict dropped items from accepting a self-referencing drop (i.e. dropping a card on itself)
99 | },
100 | drop: (item, monitor) => {
ERROR in src/components/CardComponent.tsx:104:15
TS2571: Object is of type 'unknown'.
102 | const delta = monitor.getDifferenceFromInitialOffset();
103 | if (!delta) return; // no dragging is occurring, perhaps a draggable element was picked up and dropped without dragging
> 104 | switch (item.type) {
| ^^^^
105 | case 'CARD': {
106 | const dropSource = cards[monitor.getItem().id];
107 | if (dropSource.captured) {
ERROR in src/components/CardComponent.tsx:106:36
TS2571: Object is of type 'unknown'.
104 | switch (item.type) {
105 | case 'CARD': {
> 106 | const dropSource = cards[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
107 | if (dropSource.captured) {
108 | dispatch(popCard(stacks[dropSource.captured], dropSource, delta));
109 | }
ERROR in src/components/CardComponent.tsx:121:39
TS2571: Object is of type 'unknown'.
119 | case 'STACK': {
120 | if (!props.captured) {
> 121 | const dropSource = stacks[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
122 | const actions = pushCards(dropSource, [dropTarget]);
123 | actions.map(action => dispatch(action));
124 | }
ERROR in src/components/StackComponent.tsx:17:12
TS2339: Property 'isDragging' does not exist on type 'unknown'.
15 |
16 | // Enable StackComponent as a drop source (i.e. allowing this stack to be draggable)
> 17 | const [{ isDragging }, drag] = useDrag({
| ^^^^^^^^^^
18 | item: { type: 'STACK', id: props.id },
19 | collect: monitor => ({
20 | item: monitor.getItem(),
ERROR in src/components/StackComponent.tsx:17:42
TS2345: Argument of type '{ item: { type: string; id: string; }; collect: (monitor: DragSourceMonitor<{ type: string; id: string; }, unknown>) => { item: { type: string; id: string; }; isDragging: boolean; }; }' is not assignable to parameter of type 'FactoryOrInstance<DragSourceHookSpec<{ type: string; id: string; }, unknown, unknown>>'.
Property 'type' is missing in type '{ item: { type: string; id: string; }; collect: (monitor: DragSourceMonitor<{ type: string; id: string; }, unknown>) => { item: { type: string; id: string; }; isDragging: boolean; }; }' but required in type 'DragSourceHookSpec<{ type: string; id: string; }, unknown, unknown>'.
15 |
16 | // Enable StackComponent as a drop source (i.e. allowing this stack to be draggable)
> 17 | const [{ isDragging }, drag] = useDrag({
| ^
> 18 | item: { type: 'STACK', id: props.id },
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 19 | collect: monitor => ({
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 20 | item: monitor.getItem(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 21 | isDragging: !!monitor.isDragging()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 22 | })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 23 | });
| ^^^^
24 |
25 | // Enable StackComponent as a drop target (i.e. allow other elements to be dropped on this stack)
26 | const [, drop] = useDrop({
ERROR in src/components/StackComponent.tsx:30:26
TS2571: Object is of type 'unknown'.
28 | canDrop: (item, monitor) => {
29 | const dropTarget = stacks[props.id];
> 30 | const dropSource = item.type === 'CARD' ? cards[monitor.getItem().id] : stacks[monitor.getItem().id];
| ^^^^
31 | return dropTarget && dropTarget.id !== dropSource.id; // restrict dropped items from accepting a self-referencing drop (i.e. dropping a stack on itself)
32 | },
33 | drop: (item, monitor) => {
ERROR in src/components/StackComponent.tsx:30:55
TS2571: Object is of type 'unknown'.
28 | canDrop: (item, monitor) => {
29 | const dropTarget = stacks[props.id];
> 30 | const dropSource = item.type === 'CARD' ? cards[monitor.getItem().id] : stacks[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
31 | return dropTarget && dropTarget.id !== dropSource.id; // restrict dropped items from accepting a self-referencing drop (i.e. dropping a stack on itself)
32 | },
33 | drop: (item, monitor) => {
ERROR in src/components/StackComponent.tsx:30:86
TS2571: Object is of type 'unknown'.
28 | canDrop: (item, monitor) => {
29 | const dropTarget = stacks[props.id];
> 30 | const dropSource = item.type === 'CARD' ? cards[monitor.getItem().id] : stacks[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
31 | return dropTarget && dropTarget.id !== dropSource.id; // restrict dropped items from accepting a self-referencing drop (i.e. dropping a stack on itself)
32 | },
33 | drop: (item, monitor) => {
ERROR in src/components/StackComponent.tsx:36:15
TS2571: Object is of type 'unknown'.
34 | const delta = monitor.getDifferenceFromInitialOffset();
35 | if (!delta) return; // no dragging is occurring, perhaps a draggable element was picked up and dropped without dragging
> 36 | switch (item.type) {
| ^^^^
37 | case 'CARD': {
38 | const dropTarget = stacks[props.id];
39 | const dropSource = cards[monitor.getItem().id];
ERROR in src/components/StackComponent.tsx:39:36
TS2571: Object is of type 'unknown'.
37 | case 'CARD': {
38 | const dropTarget = stacks[props.id];
> 39 | const dropSource = cards[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
40 | if (dropSource.captured) {
41 | dispatch(popCard(dropTarget, dropSource, delta));
42 | }
ERROR in src/components/StackComponent.tsx:47:37
TS2571: Object is of type 'unknown'.
45 | case 'STACK': {
46 | const dropTarget = stacks[props.id];
> 47 | const dropSource = stacks[monitor.getItem().id];
| ^^^^^^^^^^^^^^^^^
48 | const actions: Action[] = pushCards(dropTarget, dropSource.cards.map(id => cards[id]));
49 | actions.push({ type: ActionKeys.REMOVE_STACK, id: dropSource.id });
50 | actions.map(action => dispatch(action)); |
nelsonni
requested changes
Jun 30, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must resolve runtime errors thrown by Electron-Forge and Webpack (see issue comment for error messages).
Per previous discussion in #358 (comment), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps react-dnd from 11.1.3 to 14.0.2.
Release notes
Sourced from react-dnd's releases.
... (truncated)
Commits
f6e9642
chore: version bumps (#3152)2ccd0c6
Add warning to useDrag'sspec.begin
(#3151)1fdd144
Fix Stale Closure issue in Hooks Example (#3134)03df2fe
chore: cut 14.0.1059466a
fix: simplify useDragType (#3127)f740f8d
chore: bump versions (#3126)8073361
useDrag() Hook Changes (#3114)83d8a47
Dependabot autofix6055276
Dependabot autofix0e5a222
Dependabot autofixYou can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)