Skip to content

An open source alternative to Tableau. Embeddable visual analytic

chore(): use forked dnd

kyusho1854b76382b2
diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml
index 4582a105..1da89286 100644
--- a/.github/workflows/auto-build.yml
+++ b/.github/workflows/auto-build.yml
@@ -17,5 +17,4 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- - run: yarn patch-package
- run: yarn workspace @kanaries/graphic-walker build
\ No newline at end of file
diff --git a/packages/graphic-walker/package.json b/packages/graphic-walker/package.json
index e5b25373..d3b38d3b 100644
--- a/packages/graphic-walker/package.json
+++ b/packages/graphic-walker/package.json
@@ -7,8 +7,7 @@
"build": "tsc && vite build",
"build:app": "vite build --config vite-app.config.ts",
"serve": "vite preview",
- "type": "tsc src/lib.ts --declaration --emitDeclarationOnly --jsx react --esModuleInterop --outDir dist",
- "postinstall": "patch-package"
+ "type": "tsc src/lib.ts --declaration --emitDeclarationOnly --jsx react --esModuleInterop --outDir dist"
},
"files": [
"dist",
@@ -35,17 +34,16 @@
"dependencies": {
"@heroicons/react": "^2.0.8",
"@kanaries/web-data-loader": "0.1.5",
+ "@kanatayou/react-beautiful-dnd": "0.0.1",
"autoprefixer": "^10.3.5",
"i18next": "^21.9.1",
"i18next-browser-languagedetector": "^6.1.5",
"immer": "^9.0.15",
"mobx": "^6.3.3",
"mobx-react-lite": "^3.2.1",
- "patch-package": "^6.5.0",
"postcss": "^8.3.7",
"postinstall-postinstall": "^2.1.0",
"re-resizable": "^6.9.8",
- "react-beautiful-dnd": "^13.1.1",
"react-i18next": "^11.18.6",
"react-json-view": "^1.21.3",
"react-shadow": "^20.0.0",
diff --git a/packages/graphic-walker/src/fields/aestheticFields.tsx b/packages/graphic-walker/src/fields/aestheticFields.tsx
index 322ca934..4ec77a0f 100644
--- a/packages/graphic-walker/src/fields/aestheticFields.tsx
+++ b/packages/graphic-walker/src/fields/aestheticFields.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Droppable } from "react-beautiful-dnd";
+import { Droppable } from "@kanatayou/react-beautiful-dnd";
import { DRAGGABLE_STATE_KEYS } from './fieldsContext';
import { AestheticFieldContainer } from './components'
import OBFieldContainer from './obComponents/obFContainer';
diff --git a/packages/graphic-walker/src/fields/datasetFields/dimFields.tsx b/packages/graphic-walker/src/fields/datasetFields/dimFields.tsx
index 978c2409..b8d09035 100644
--- a/packages/graphic-walker/src/fields/datasetFields/dimFields.tsx
+++ b/packages/graphic-walker/src/fields/datasetFields/dimFields.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Draggable, DroppableProvided } from 'react-beautiful-dnd';
+import { Draggable, DroppableProvided } from '@kanatayou/react-beautiful-dnd';
import { observer } from 'mobx-react-lite';
import { useGlobalStore } from '../../store';
import DataTypeIcon from '../../components/dataTypeIcon';
diff --git a/packages/graphic-walker/src/fields/datasetFields/index.tsx b/packages/graphic-walker/src/fields/datasetFields/index.tsx
index c25f545f..12f08d6e 100644
--- a/packages/graphic-walker/src/fields/datasetFields/index.tsx
+++ b/packages/graphic-walker/src/fields/datasetFields/index.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Droppable } from "react-beautiful-dnd";
+import { Droppable } from "@kanatayou/react-beautiful-dnd";
import { useTranslation } from "react-i18next";
import styled from 'styled-components';
import { NestContainer } from "../../components/container";
diff --git a/packages/graphic-walker/src/fields/datasetFields/meaFields.tsx b/packages/graphic-walker/src/fields/datasetFields/meaFields.tsx
index 23aca795..1fc7b541 100644
--- a/packages/graphic-walker/src/fields/datasetFields/meaFields.tsx
+++ b/packages/graphic-walker/src/fields/datasetFields/meaFields.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { Draggable, DroppableProvided } from 'react-beautiful-dnd';
+import { Draggable, DroppableProvided } from '@kanatayou/react-beautiful-dnd';
import { observer } from 'mobx-react-lite';
import { useGlobalStore } from '../../store';
import DataTypeIcon from '../../components/dataTypeIcon';
diff --git a/packages/graphic-walker/src/fields/fieldsContext.tsx b/packages/graphic-walker/src/fields/fieldsContext.tsx
index a2f55a5c..0120c28e 100644
--- a/packages/graphic-walker/src/fields/fieldsContext.tsx
+++ b/packages/graphic-walker/src/fields/fieldsContext.tsx
@@ -5,7 +5,7 @@ import {
DropResult,
ResponderProvided,
DraggableLocation,
-} from "react-beautiful-dnd";
+} from "@kanatayou/react-beautiful-dnd";
import { useGlobalStore } from '../store';
window['__react-beautiful-dnd-disable-dev-warnings'] = true;
diff --git a/packages/graphic-walker/src/fields/filterField/filterPill.tsx b/packages/graphic-walker/src/fields/filterField/filterPill.tsx
index fd254981..f723f0dd 100644
--- a/packages/graphic-walker/src/fields/filterField/filterPill.tsx
+++ b/packages/graphic-walker/src/fields/filterField/filterPill.tsx
@@ -1,6 +1,6 @@
import { observer } from 'mobx-react-lite';
import React from 'react';
-import { DraggableProvided } from "react-beautiful-dnd";
+import { DraggableProvided } from "@kanatayou/react-beautiful-dnd";
import { useTranslation } from 'react-i18next';
import styled from 'styled-components';
import { PencilSquareIcon } from '@heroicons/react/24/solid';
diff --git a/packages/graphic-walker/src/fields/filterField/index.tsx b/packages/graphic-walker/src/fields/filterField/index.tsx
index 690b1f1f..b37961da 100644
--- a/packages/graphic-walker/src/fields/filterField/index.tsx
+++ b/packages/graphic-walker/src/fields/filterField/index.tsx
@@ -3,7 +3,7 @@ import React from 'react';
import {
Draggable,
Droppable, DroppableProvided,
-} from "react-beautiful-dnd";
+} from "@kanatayou/react-beautiful-dnd";
import { useGlobalStore } from '../../store';
import { FilterFieldContainer, FilterFieldsContainer } from '../components';
diff --git a/packages/graphic-walker/src/fields/obComponents/obFContainer.tsx b/packages/graphic-walker/src/fields/obComponents/obFContainer.tsx
index 5ae9d314..c75c2ad7 100644
--- a/packages/graphic-walker/src/fields/obComponents/obFContainer.tsx
+++ b/packages/graphic-walker/src/fields/obComponents/obFContainer.tsx
@@ -5,7 +5,7 @@ import { useGlobalStore } from '../../store';
import {
Draggable,
DroppableProvided
-} from "react-beautiful-dnd";
+} from "@kanatayou/react-beautiful-dnd";
import { IDraggableStateKey } from '../../interfaces';
import OBPill from './obPill';
diff --git a/packages/graphic-walker/src/fields/obComponents/obPill.tsx b/packages/graphic-walker/src/fields/obComponents/obPill.tsx
index b60cbcf6..c4960ca7 100644
--- a/packages/graphic-walker/src/fields/obComponents/obPill.tsx
+++ b/packages/graphic-walker/src/fields/obComponents/obPill.tsx
@@ -2,7 +2,7 @@ import { BarsArrowDownIcon, BarsArrowUpIcon } from '@heroicons/react/24/outline'
import { observer } from 'mobx-react-lite';
import React from 'react';
import { useTranslation } from 'react-i18next';
-import { DraggableProvided } from 'react-beautiful-dnd';
+import { DraggableProvided } from '@kanatayou/react-beautiful-dnd';
import { COUNT_FIELD_ID } from '../../constants';
import { IDraggableStateKey } from '../../interfaces';
import { useGlobalStore } from '../../store';
diff --git a/packages/graphic-walker/src/fields/posFields/index.tsx b/packages/graphic-walker/src/fields/posFields/index.tsx
index dce397d0..60f7b05b 100644
--- a/packages/graphic-walker/src/fields/posFields/index.tsx
+++ b/packages/graphic-walker/src/fields/posFields/index.tsx
@@ -1,6 +1,6 @@
import React, { useMemo } from 'react';
import { observer } from 'mobx-react-lite';
-import { Droppable } from "react-beautiful-dnd";
+import { Droppable } from "@kanatayou/react-beautiful-dnd";
import { useGlobalStore } from '../../store';
import { FieldListContainer } from "../components";
import { DRAGGABLE_STATE_KEYS } from '../fieldsContext';
diff --git a/packages/graphic-walker/src/global.d.ts b/packages/graphic-walker/src/global.d.ts
new file mode 100644
index 00000000..23f0c31d
--- /dev/null
+++ b/packages/graphic-walker/src/global.d.ts
@@ -0,0 +1,7 @@
+declare module '@kanatayou/react-beautiful-dnd' {
+ export const DOM: {
+ setHead: (head: HTMLElement | ShadowRoot) => void;
+ setBody: (body: HTMLElement | ShadowRoot) => void;
+ };
+ export * from 'react-beautiful-dnd';
+}
diff --git a/packages/graphic-walker/src/index.tsx b/packages/graphic-walker/src/index.tsx
index b55ccdd5..8daec36f 100644
--- a/packages/graphic-walker/src/index.tsx
+++ b/packages/graphic-walker/src/index.tsx
@@ -1,7 +1,8 @@
import React, { useEffect, useRef, useState } from 'react';
import { StyleSheetManager } from 'styled-components';
import root from 'react-shadow';
-import { DOM } from 'react-beautiful-dnd';
+import { DOM } from '@kanatayou/react-beautiful-dnd';
+import { observer } from 'mobx-react-lite';
import App, { EditorProps } from './App';
import { StoreWrapper } from './store/index';
import { FieldsContextWrapper } from './fields/fieldsContext';
@@ -9,7 +10,6 @@ import { FieldsContextWrapper } from './fields/fieldsContext';
import './empty_sheet.css';
import tailwindStyle from "tailwindcss/tailwind.css?inline";
import style from './index.css?inline';
-import { observer } from 'mobx-react-lite';
export const GraphicWalker: React.FC<EditorProps> = observer(props => {
diff --git a/yarn.lock b/yarn.lock
index a8623fe4..039346f4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -339,6 +339,19 @@
"@types/papaparse" "^5.0.3"
papaparse "^5.1.1"
+"@kanatayou/[email protected]":
+ version "0.0.1"
+ resolved "https://registry.npmmirror.com/@kanatayou/react-beautiful-dnd/-/react-beautiful-dnd-0.0.1.tgz#bd8c1c67325b045453bdd37ec5d43910fb58ee21"
+ integrity sha512-Npy3jIob2qiqG80iTPS+4vdaOC/VOQNnJW7zNYG8LAgjiVkc8Bi/NN1MdwN2zx5sWANOyIa+yhrMmga2pHVHyQ==
+ dependencies:
+ "@babel/runtime" "^7.9.2"
+ css-box-model "^1.2.0"
+ memoize-one "^5.1.1"
+ raf-schd "^4.0.2"
+ react-redux "^7.2.0"
+ redux "^4.0.4"
+ use-memo-one "^1.1.1"
+
"@nodelib/[email protected]":
version "2.1.5"
resolved "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -507,20 +520,13 @@
dependencies:
"@types/react" "*"
-"@types/react-dom@^17.x":
+"@types/react-dom@^17.x", "@types/react-dom@^18.0.6":
version "17.0.18"
resolved "https://registry.npmmirror.com/@types/react-dom/-/react-dom-17.0.18.tgz#8f7af38f5d9b42f79162eea7492e5a1caff70dc2"
integrity sha512-rLVtIfbwyur2iFKykP2w0pl/1unw26b5td16d5xMgp7/yjTHomkyxPYChFoCr/FtEX1lN9wY6lFj1qvKdS5kDw==
dependencies:
"@types/react" "^17"
-"@types/react-dom@^18.0.6":
- version "18.0.10"
- resolved "https://registry.npmmirror.com/@types/react-dom/-/react-dom-18.0.10.tgz#3b66dec56aa0f16a6cc26da9e9ca96c35c0b4352"
- integrity sha512-E42GW/JA4Qv15wQdqJq8DL4JhNpB3prJgjgapN3qJT9K2zO5IIAQh4VXvCEDupoqAwnz0cY4RlXeC/ajX5SFHg==
- dependencies:
- "@types/react" "*"
-
"@types/react-redux@^7.1.20":
version "7.1.24"
resolved "https://registry.npmmirror.com/@types/react-redux/-/react-redux-7.1.24.tgz#6caaff1603aba17b27d20f8ad073e4c077e975c0"
@@ -531,7 +537,7 @@
hoist-non-react-statics "^3.3.0"
redux "^4.0.0"
-"@types/react@*", "@types/react@^17", "@types/react@^17.x":
+"@types/react@*", "@types/react@^17", "@types/react@^17.x", "@types/react@^18.0.15":
version "17.0.52"
resolved "https://registry.npmmirror.com/@types/react/-/react-17.0.52.tgz#10d8b907b5c563ac014a541f289ae8eaa9bf2e9b"
integrity sha512-vwk8QqVODi0VaZZpDXQCmEmiOuyjEFPY7Ttaw5vjM112LOq37yz1CDJGrRJwA1fYEq4Iitd5rnjd1yWAc/bT+A==
@@ -540,15 +546,6 @@
"@types/scheduler" "*"
csstype "^3.0.2"
-"@types/react@^18.0.15":
- version "18.0.26"
- resolved "https://registry.npmmirror.com/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917"
- integrity sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==
- dependencies:
- "@types/prop-types" "*"
- "@types/scheduler" "*"
- csstype "^3.0.2"
-
"@types/scheduler@*":
version "0.16.2"
resolved "https://registry.npmmirror.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
@@ -2262,19 +2259,6 @@ react-base16-styling@^0.6.0:
lodash.flow "^3.3.0"
pure-color "^1.2.0"
-react-beautiful-dnd@^13.1.1:
- version "13.1.1"
- resolved "https://registry.npmmirror.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz#b0f3087a5840920abf8bb2325f1ffa46d8c4d0a2"
- integrity sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==
- dependencies:
- "@babel/runtime" "^7.9.2"
- css-box-model "^1.2.0"
- memoize-one "^5.1.1"
- raf-schd "^4.0.2"
- react-redux "^7.2.0"
- redux "^4.0.4"
- use-memo-one "^1.1.1"
-
react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.npmmirror.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"