Skip to content

Commit

Permalink
bump deps (react-dnd -> 14)
Browse files Browse the repository at this point in the history
  • Loading branch information
JabX committed Mar 27, 2021
1 parent 87f05b0 commit 00acaf3
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 74 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "10.7.4"
"version": "10.8.0-alpha.0"
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"tslint-ci": "tslint --project tsconfig.json --force | sed -E 's|(.+): (.+):(.+):(.+) - (.+)|\\#\\#vso[task.logissue type=\\L\\1\\E;sourcepath=\\2;linenumber=\\3;columnnumber=\\4;]\\5|g'"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "11.1.0",
"lerna": "3.22.1",
"postcss": "8.2.4",
"@rollup/plugin-node-resolve": "11.2.1",
"lerna": "4.0.0",
"postcss": "8.2.8",
"postcss-import": "14.0.0",
"rollup": "2.38.0",
"rollup": "2.43.0",
"rollup-plugin-copy-glob": "0.3.1",
"rollup-plugin-postcss": "4.0.0",
"rollup-plugin-typescript2": "0.29.0",
"rollup-plugin-typescript2": "0.30.0",
"tslint": "6.1.3",
"typescript": "4.1.3",
"typescript": "4.2.3",
"typescript-tslint-plugin": "1.0.1"
}
}
16 changes: 8 additions & 8 deletions packages/collections/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/collections",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, collections module",
"main": "lib/focus4.collections.js",
"repository": {
Expand All @@ -16,14 +16,14 @@
"start": "rollup -cw"
},
"dependencies": {
"@focus4/core": "^10.7.4",
"@focus4/forms": "^10.7.4",
"@focus4/stores": "^10.7.4",
"@focus4/styling": "^10.7.4",
"@focus4/toolbox": "^10.7.4",
"@focus4/core": "^10.8.0-alpha.0",
"@focus4/forms": "^10.8.0-alpha.0",
"@focus4/stores": "^10.8.0-alpha.0",
"@focus4/styling": "^10.8.0-alpha.0",
"@focus4/toolbox": "^10.8.0-alpha.0",
"popmotion": "8.7.3",
"react-dnd": "11.1.3",
"react-dnd-html5-backend": "11.1.3",
"react-dnd": "14.0.2",
"react-dnd-html5-backend": "14.0.0",
"react-pose": "4.0.9"
}
}
10 changes: 6 additions & 4 deletions packages/collections/src/list/dnd-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export function useDragSource<T>({
type: string;
}) {
return useDrag({
item: {type, dragged: draggedItems},
type,
/** Est appelé au lancement du drag. */
begin() {
item() {
// Si on a un store, on va regarder si on a des éléments sélectionnés.
if (store) {
// Si l'élément en cours de drag est sélectionné, alors on embarque tous les éléments sélectionnés.
Expand All @@ -33,6 +33,8 @@ export function useDragSource<T>({
// Idem.
draggedItems.push(data);
}

return draggedItems;
},
/** Vide la liste d'élements à la fin du drag. */
end() {
Expand All @@ -45,6 +47,6 @@ export function useDragSource<T>({
* Récupère les élements en cours de drag and drop.
* @param monitor Le monitor react-dnd.
*/
export function getDraggedItems<T>(monitor: DropTargetMonitor | undefined) {
return monitor!.getItem().dragged as T[];
export function getDraggedItems<T>(monitor: DropTargetMonitor<IObservableArray<T>> | undefined) {
return monitor!.getItem();
}
9 changes: 5 additions & 4 deletions packages/collections/src/list/drag-layer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import i18next from "i18next";
import {isObservableArray} from "mobx";
import {useDragLayer} from "react-dnd";

import {CSSProp, useTheme} from "@focus4/styling";
Expand Down Expand Up @@ -28,10 +29,10 @@ export function DndDragLayer({i18nPrefix = "focus", theme: pTheme}: DndDragLayer
const {currentOffset, isDragging, item} = useDragLayer(monitor => ({
currentOffset: monitor.getClientOffset(),
isDragging: monitor.isDragging(),
item: monitor.getItem()
item: monitor.getItem() as {}[]
}));

if (!isDragging || !item || !item.dragged || !currentOffset) {
if (!isDragging || !item || !isObservableArray(item) || !currentOffset) {
return <div />;
}

Expand All @@ -45,8 +46,8 @@ export function DndDragLayer({i18nPrefix = "focus", theme: pTheme}: DndDragLayer
<div className={theme.container()}>
<div className={theme.layer()} style={{transform: `translate(${x - 18}px, ${y - 20}px)`}}>
<FontIcon>drag_handle</FontIcon>
<div className={theme.count()}>{item.dragged.length}</div>
<div>{i18next.t(`${i18nPrefix}.dragLayer.item`, {count: item.dragged.length})}</div>
<div className={theme.count()}>{item.length}</div>
<div>{i18next.t(`${i18nPrefix}.dragLayer.item`, {count: item.length})}</div>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/collections/src/list/list/line.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {IObservableArray} from "mobx";
import {useAsObservableSource, useLocalStore, useObserver} from "mobx-react";
import {ComponentType, Ref, useCallback, useEffect, useLayoutEffect} from "react";
import {getEmptyImage} from "react-dnd-html5-backend";
import posed from "react-pose";
import {ComponentType, Ref, useCallback, useEffect, useLayoutEffect} from "react";

import {CollectionStore} from "@focus4/stores";
import {getIcon, springPose, ToBem} from "@focus4/styling";
Expand Down
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/core",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, core module",
"main": "lib/focus4.core.js",
"repository": {
Expand All @@ -16,15 +16,15 @@
},
"dependencies": {
"@types/lodash": "4.14.168",
"@types/react": "17.0.0",
"@types/react": "17.0.3",
"@types/uuid": "8.3.0",
"i18next": "19.8.4",
"lodash": "4.17.20",
"i18next": "20.1.0",
"lodash": "4.17.21",
"mobx": "4.15.7",
"mobx-utils": "5.6.2",
"tslib": "2.1.0",
"uuid": "8.3.2",
"whatwg-fetch": "3.5.0",
"whatwg-fetch": "3.6.2",
"yester": "0.10.0"
}
}
16 changes: 8 additions & 8 deletions packages/focus4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "focus4",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, all modules",
"main": "index.js",
"repository": {
Expand All @@ -15,12 +15,12 @@
"start": "tsc --watch"
},
"dependencies": {
"@focus4/collections": "^10.7.4",
"@focus4/core": "^10.7.4",
"@focus4/forms": "^10.7.4",
"@focus4/layout": "^10.7.4",
"@focus4/stores": "^10.7.4",
"@focus4/styling": "^10.7.4",
"@focus4/toolbox": "^10.7.4"
"@focus4/collections": "^10.8.0-alpha.0",
"@focus4/core": "^10.8.0-alpha.0",
"@focus4/forms": "^10.8.0-alpha.0",
"@focus4/layout": "^10.8.0-alpha.0",
"@focus4/stores": "^10.8.0-alpha.0",
"@focus4/styling": "^10.8.0-alpha.0",
"@focus4/toolbox": "^10.8.0-alpha.0"
}
}
26 changes: 13 additions & 13 deletions packages/forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/forms",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, forms module",
"main": "lib/focus4.forms.js",
"repository": {
Expand All @@ -17,23 +17,23 @@
"test-ci": "jest --ci --reporters=default --reporters=jest-junit"
},
"dependencies": {
"@focus4/core": "^10.7.4",
"@focus4/stores": "^10.7.4",
"@focus4/styling": "^10.7.4",
"@focus4/toolbox": "^10.7.4",
"@focus4/core": "^10.8.0-alpha.0",
"@focus4/stores": "^10.8.0-alpha.0",
"@focus4/styling": "^10.8.0-alpha.0",
"@focus4/toolbox": "^10.8.0-alpha.0",
"@types/moment-timezone": "0.5.30",
"@types/numeral": "0.0.30",
"@types/react-dom": "17.0.0",
"@types/numeral": "2.0.1",
"@types/react-dom": "17.0.3",
"inputmask-core": "2.2.0",
"lodash-decorators": "6.0.1",
"moment-timezone": "0.5.32",
"moment-timezone": "0.5.33",
"numeral": "2.0.6",
"react-dom": "17.0.1"
"react-dom": "17.0.2"
},
"devDependencies": {
"@types/enzyme": "3.10.8",
"@types/jest": "26.0.20",
"@types/react-test-renderer": "17.0.0",
"@types/jest": "26.0.22",
"@types/react-test-renderer": "17.0.1",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"enzyme-to-json": "3.6.1",
Expand All @@ -42,7 +42,7 @@
"jest-enzyme": "7.1.2",
"jest-junit": "12.0.0",
"postcss-import": "14.0.0",
"react-test-renderer": "17.0.1",
"ts-jest": "26.4.4"
"react-test-renderer": "17.0.2",
"ts-jest": "26.5.4"
}
}
10 changes: 5 additions & 5 deletions packages/layout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/layout",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, layout module",
"main": "lib/focus4.layout.js",
"repository": {
Expand All @@ -15,10 +15,10 @@
"start": "rollup -cw"
},
"dependencies": {
"@focus4/core": "^10.7.4",
"@focus4/styling": "^10.7.4",
"@focus4/toolbox": "^10.7.4",
"@types/react-transition-group": "4.4.0",
"@focus4/core": "^10.8.0-alpha.0",
"@focus4/styling": "^10.8.0-alpha.0",
"@focus4/toolbox": "^10.8.0-alpha.0",
"@types/react-transition-group": "4.4.1",
"intersection-observer": "0.12.0",
"popmotion": "8.7.3",
"react-pose": "4.0.9",
Expand Down
12 changes: 6 additions & 6 deletions packages/legacy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/legacy",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, legacy module",
"main": "lib/focus4.legacy.js",
"repository": {
Expand All @@ -15,11 +15,11 @@
"start": "rollup -cw"
},
"dependencies": {
"@focus4/core": "^10.7.4",
"@focus4/forms": "^10.7.4",
"@focus4/stores": "^10.7.4",
"@focus4/styling": "^10.7.4",
"@focus4/toolbox": "^10.7.4",
"@focus4/core": "^10.8.0-alpha.0",
"@focus4/forms": "^10.8.0-alpha.0",
"@focus4/stores": "^10.8.0-alpha.0",
"@focus4/styling": "^10.8.0-alpha.0",
"@focus4/toolbox": "^10.8.0-alpha.0",
"core-decorators": "0.20.0"
}
}
8 changes: 4 additions & 4 deletions packages/stores/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/stores",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, stores module",
"main": "lib/focus4.stores.js",
"repository": {
Expand All @@ -17,13 +17,13 @@
"test-ci": "jest --ci --reporters=default --reporters=jest-junit"
},
"dependencies": {
"@focus4/core": "^10.7.4",
"@focus4/core": "^10.8.0-alpha.0",
"moment": "2.29.1"
},
"devDependencies": {
"@types/jest": "26.0.20",
"@types/jest": "26.0.22",
"jest": "26.6.3",
"jest-junit": "12.0.0",
"ts-jest": "26.4.4"
"ts-jest": "26.5.4"
}
}
11 changes: 6 additions & 5 deletions packages/styling/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/styling",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, styling module",
"main": "lib/focus4.styling.js",
"repository": {
Expand All @@ -17,21 +17,22 @@
"test-ci": "jest --ci --reporters=default --reporters=jest-junit"
},
"dependencies": {
"@focus4/core": "^10.7.4",
"@focus4/core": "^10.8.0-alpha.0",
"@types/classnames": "2.2.11",
"@types/css-modules-loader-core": "1.1.0",
"@types/glob": "7.1.3",
"classnames": "2.2.6",
"css-modules-loader-core": "1.1.0",
"glob": "7.1.6",
"material-design-icons-iconfont": "6.1.0",
"mobx-react": "6.3.1",
"react": "17.0.1"
"react": "17.0.2"
},
"devDependencies": {
"@types/jest": "26.0.20",
"@types/jest": "26.0.22",
"jest": "26.6.3",
"jest-junit": "12.0.0",
"react-toolbox": "2.0.0-beta.13",
"ts-jest": "26.4.4"
"ts-jest": "26.5.4"
}
}
8 changes: 4 additions & 4 deletions packages/toolbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@focus4/toolbox",
"version": "10.7.4",
"version": "10.8.0-alpha.0",
"description": "Focus v4, toolbox module",
"main": "lib/focus4.toolbox.js",
"repository": {
Expand All @@ -16,9 +16,9 @@
"start": "rollup -cw"
},
"dependencies": {
"@focus4/core": "^10.7.4",
"@focus4/styling": "^10.7.4",
"@types/ramda": "0.27.35",
"@focus4/core": "^10.8.0-alpha.0",
"@focus4/styling": "^10.8.0-alpha.0",
"@types/ramda": "0.27.39",
"react-toolbox": "2.0.0-beta.13"
}
}

0 comments on commit 00acaf3

Please sign in to comment.