diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..ac31c4e8 Binary files /dev/null and b/.DS_Store differ diff --git a/.eslintrc.js b/.eslintrc.js index 26e8b289..0470cb70 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,9 +9,7 @@ module.exports = { // 'plugins' section only 'activate' these plugins // still need manually edit 'rules' to actually use them // such as { react/xxx: 'error' } - plugins: [ - 'react', - ], + plugins: ['react'], // 'extends' section will extend these configs // and they will take effect directly extends: [ @@ -26,12 +24,15 @@ module.exports = { quotes: [2, 'single'], semi: [2, 'always'], 'jsx-quotes': [2, 'prefer-single'], - 'linebreak-style': [2, 'unix'], + // 'linebreak-style': [2, 'unix'], 'arrow-parens': [2, 'as-needed'], - 'react/jsx-curly-spacing': [2, { - when: 'always', - spacing: { objectLiterals: 'never' }, - }], + 'react/jsx-curly-spacing': [ + 2, + { + when: 'always', + spacing: { objectLiterals: 'never' }, + }, + ], 'no-restricted-syntax': [ 'error', 'ForInStatement', @@ -47,11 +48,11 @@ module.exports = { 'react/require-default-props': 0, 'no-underscore-dangle': 0, 'no-multi-spaces': 0, - 'jsx-a11y/click-events-have-key-events': 0, // allow click handler on
- 'jsx-a11y/no-static-element-interactions': 0, // allow click handler on
- 'no-unused-expressions': [2, { allowShortCircuit: true }], // allow x && y() - 'import/no-extraneous-dependencies': [2, { devDependencies: true }], // so can import enzyme, which is dev dependencies - 'react/jsx-props-no-spreading': 0, // allow passing in props like { ...restProps } + 'jsx-a11y/click-events-have-key-events': 0, // allow click handler on
+ 'jsx-a11y/no-static-element-interactions': 0, // allow click handler on
+ 'no-unused-expressions': [2, { allowShortCircuit: true }], // allow x && y() + 'import/no-extraneous-dependencies': [2, { devDependencies: true }], // so can import enzyme, which is dev dependencies + 'react/jsx-props-no-spreading': 0, // allow passing in props like { ...restProps } }, // don't know what these are... generated by eslint --init diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..b6a7d89c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +16 diff --git a/config/webpack.config.js b/config/webpack.config.js index b3851869..eba0ca92 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -20,6 +20,10 @@ module.exports = { resolve: { // our code can resolve 'xxx' instead of writing 'xxx.jsx' extensions: ['*', '.js', '.jsx'], + fallback: { + 'react/jsx-runtime': 'react/jsx-runtime.js', + 'react/jsx-dev-runtime': 'react/jsx-dev-runtime.js', + }, }, module: { // For every file that match regex in 'test', webpack pipes the code through to loaders diff --git a/index.d.ts b/index.d.ts index e650b613..2c5b871c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,16 +4,39 @@ type Checked = 0 | 0.5 | 1; type CheckedStatus = 'checked' | 'custom' | 'unchecked'; +type SearchDataProp = { + folders: { + [key: string]: number; + }; + files: { + [key: string]: { + allMatchesArray: any[]; + matchCount: number; + matches: any; + }; + }; +}; + export interface FolderTreeProps { data: NodeData; iconComponents?: IconComponents; indentPixels?: number; + offsetToggleIcon?: boolean; + iconSize?: number; + debug?: boolean; initCheckedStatus?: CheckedStatus; initOpenStatus?: OpenStatus; onChange?: OnChange; onNameClick?: OnNameClick; + onIconClick?: (event: MouseEvent, nodeData: NodeData) => void; readOnly?: boolean; showCheckbox?: boolean; + searchData: SearchDataProp; + showSearchData?: boolean; + dndConfig?: { + onDrop: (dropTargetItem: {}, dragItem: {}) => void; + onDragStart?: (dragItem: {}) => void; + }; } export type Icon = React.FunctionComponent; @@ -40,6 +63,10 @@ export interface NodeData { children?: Array; isOpen?: boolean; name: string; + fileID?: string; + folderID?: string; + matchCount?: number; + showSearchData?: boolean; [key: string]: any; } @@ -56,4 +83,21 @@ declare const FolderTree: React.FunctionComponent; export const testData: NodeData; +export const findTargetNode: (root: NodeData, path: number[]) => NodeData; + +export type NodeDataKeys = keyof NodeData; +export type NodeDataValues = NodeData[T]; + +export const findAllTargetPathByProp: ( + root: NodeData, + propName: T, + targetVal: NodeDataValues +) => number[][]; + +export const findTargetPathByProp: ( + root: NodeData, + propName: T, + targetVal: NodeDataValues +) => number[] | null; + export default FolderTree; diff --git a/package.json b/package.json index e238bec4..23eb5774 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "react-folder-tree", - "version": "5.0.3", + "name": "script-custom-react-folder-tree", + "version": "5.2.17", "description": "customizable react folder tree library", "main": "dist/react-folder-tree.bundle.js", "typings": "index.d.ts", @@ -43,9 +43,9 @@ "license": "MIT", "private": false, "scripts": { - "prebuild": "rm -rf dist/", + "prebuild": "rimraf dist", "build": "webpack --config config/webpack.prod.config.js", - "start": "NODE_ENV=development node scripts/dev-server.js", + "start": "cross-env NODE_ENV=development node scripts/dev-server.js", "lint": "eslint src/ --ext .js,.jsx", "test": "jest --collect-coverage", "prepublish": "yarn build" @@ -70,6 +70,7 @@ "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", "clean-terminal-webpack-plugin": "^3.0.0", + "cross-env": "^7.0.3", "css-loader": "^5.0.1", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", @@ -102,6 +103,7 @@ }, "dependencies": { "prop-types": "^15.7.2", + "react-beautiful-dnd": "^13.1.1", "react-icons": "^4.1.0", "use-tree-state": "1.0.0" } diff --git a/src/components/EditableName/EditableName.jsx b/src/components/EditableName/EditableName.jsx index a6df1c4b..8844e15f 100644 --- a/src/components/EditableName/EditableName.jsx +++ b/src/components/EditableName/EditableName.jsx @@ -14,10 +14,10 @@ const EditableName = ({ CancelIcon, nodeData, }) => { - const { name } = nodeData; + const { name, showSearchData, matchCount } = nodeData; const [inputVal, setInputVal] = useState(name); - const onInputChange = e => setInputVal(e.target.value); + const onInputChange = (e) => setInputVal(e.target.value); const cancelEditing = () => { setInputVal(name); @@ -31,21 +31,17 @@ const EditableName = ({ const editingName = ( - - + + @@ -53,7 +49,15 @@ const EditableName = ({ const displayName = ( - { name } + {name} + {showSearchData && typeof matchCount === 'number' && matchCount > 0 && ( + + {' '} + {'('} + {matchCount} + {')'} + + )} ); diff --git a/src/components/FolderTree/FolderTree.jsx b/src/components/FolderTree/FolderTree.jsx index bec37928..ea700ca2 100644 --- a/src/components/FolderTree/FolderTree.jsx +++ b/src/components/FolderTree/FolderTree.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { DragDropContext } from 'react-beautiful-dnd'; import PropTypes from 'prop-types'; import useTreeState, { testData, @@ -14,27 +15,34 @@ import './FolderTree.scss'; const FolderTree = ({ data, - onChange = console.log, // eslint-disable-line + onChange = console.log, // eslint-disable-line + childFilesData = [], + activeFileId = null, + activeParentFileId = null, initCheckedStatus = 'unchecked', initOpenStatus = 'open', iconComponents = {}, showCheckbox = true, indentPixels = 30, + iconSize = 20, + offsetToggleIcon = false, onNameClick = null, + onIconClick = null, readOnly = false, + debug = false, + searchData = null, + showSearchData = false, + dndConfig = { + onDrop: null, + onDragStart: null, + }, }) => { const options = { initCheckedStatus, initOpenStatus, }; const { treeState, reducers } = useTreeState({ data, options, onChange }); - const { - checkNode, - renameNode, - deleteNode, - addNode, - toggleOpen, - } = reducers; + const { checkNode, renameNode, deleteNode, addNode, toggleOpen } = reducers; if (!treeState) return null; @@ -45,27 +53,67 @@ const FolderTree = ({ handleAddNode: addNode, handleToggleOpen: toggleOpen, onNameClick, + onIconClick, + activeFileId, + activeParentFileId, + childFilesData, iconComponents, indentPixels, + iconSize, + offsetToggleIcon, showCheckbox, readOnly, + debug, + searchData, + showSearchData, }; /* ---------- - custom configs are passed down in context, which is same for each tree node - tree node specific data is passed recursively to each node, which is different for each node ---------- */ + + if (debug) { + console.log('tree state: ', treeState, activeParentFileId, childFilesData) + } + + const { onDrop, onDragStart } = dndConfig || {}; + + const handleDragEnd = result => { + if (!result.destination) { + return; + } + + if (result.destination.index === result.source.index) { + return; + } + + const dropTargetItem = { + folderID: result.destination.droppableId, + }; + const dragItem = { + fileID: result.draggableId, + }; + onDrop?.(dropTargetItem, dragItem); + }; + + const handleDragStart = result => { + const dragItem = { + fileID: result.draggableId, + }; + onDragStart?.(dragItem); + }; + return (
- - + + + +
); @@ -90,9 +138,23 @@ FolderTree.propTypes = { CaretDownIcon: PropTypes.func, }), indentPixels: PropTypes.number, + iconSize: PropTypes.number, + offsetToggleIcon: PropTypes.bool, onNameClick: PropTypes.func, + onIconClick: PropTypes.func, showCheckbox: PropTypes.bool, readOnly: PropTypes.bool, + debug: PropTypes.bool, + + activeFileId: PropTypes.string || PropTypes.bool, + activeParentFileId: PropTypes.string || PropTypes.bool, + childFilesData: PropTypes.array, + searchData: PropTypes.object, + showSearchData: PropTypes.bool, + dndConfig: PropTypes.shape({ + onDrop: PropTypes.func, + onDragStart: PropTypes.func, + }), }; export { diff --git a/src/components/SandBox/SandBox.jsx b/src/components/SandBox/SandBox.jsx index a884d74f..7b2a755b 100644 --- a/src/components/SandBox/SandBox.jsx +++ b/src/components/SandBox/SandBox.jsx @@ -1,20 +1,68 @@ import React from 'react'; -import FolderTree, { testData } from '../FolderTree/FolderTree'; +import PropTypes from 'prop-types'; +import FolderTree from '../FolderTree/FolderTree'; +import { testData } from '../../utils/testData'; +import testChilds from '../../utils/testChilds'; +import testProject from '../../utils/testProject'; /* eslint-disable */ const SandBox = () => { - const onTreeStateChange = (state, e ) => console.log({ state, e }); + const onTreeStateChange = (state, e) => console.log({ state, e }); + + const dndConfig = { + onDragStart: (dragItem) => { + console.log('onDragStart', dragItem); + }, + onDrop: (dropTargetItem, dragItem) => { + console.log('onDrop', dropTargetItem, dragItem); + }, + }; + return ( -
- -
+ !!testData && ( +
+ { + console.log('INSIDE ICON CLICK', e, nodeData); + console.log( + 'event target postion', + e.target.getBoundingClientRect() + ); + }} + readOnly + showCheckbox={false} + offsetToggleIcon={true} + indentPixels={20} + debug={true} + searchData={{ + files: { + YWm9BjSXt4PiCLMB: { + matchCount: 3, + }, + }, + folders: { + Ga1zvj8qWOEfOVL2: 6, + }, + }} + showSearchData={true} + /> +
+ ) ); }; +SandBox.propTypes = { + dndConfig: PropTypes.shape({ + onDrop: PropTypes.func, + onDragStart: PropTypes.func, + }), +}; + export default SandBox; diff --git a/src/components/TreeNode/TreeNode.jsx b/src/components/TreeNode/TreeNode.jsx index a78846e5..c9e551a5 100644 --- a/src/components/TreeNode/TreeNode.jsx +++ b/src/components/TreeNode/TreeNode.jsx @@ -1,7 +1,11 @@ import React, { useContext, + useEffect, useState, + forwardRef, + useMemo, } from 'react'; +import { Droppable, Draggable } from 'react-beautiful-dnd'; import PropTypes from 'prop-types'; import { AiFillCaretRight, @@ -26,18 +30,19 @@ import { getDefaultIcon, } from '../../utils/iconUtils'; -const TreeNode = ({ +const TreeNodeChild = forwardRef(({ path, name, checked, isOpen, children, + fileID, + folderID, + provided, + snapshot, + skipChildren = true, ...restData -}) => { - const nodeData = { - path, name, checked, isOpen, ...restData, - }; - +}, ref) => { const { handleCheck, handleRename, @@ -47,19 +52,84 @@ const TreeNode = ({ iconComponents, indentPixels, + iconSize, + offsetToggleIcon, onNameClick, + onIconClick, showCheckbox, readOnly, + + searchData, + showSearchData, + activeFileId, + activeParentFileId, + childFilesData, + + debug, } = useContext(ConfigContext); + const isChildFile = restData.childFile; const isFolder = !!children; + let matchCount = 0; + + if (showSearchData && !!searchData) { + matchCount = isFolder + ? searchData.folders?.[folderID] + : searchData.files?.[fileID]?.matchCount; + } + + const nodeData = { + path, + name, + checked, + isOpen, + fileID, + folderID, + matchCount, + showSearchData, + ...restData, + }; + + const level = path.length; + + const offsetSize = !isFolder ? 0 : iconSize; + const offsetDiff = offsetToggleIcon ? offsetSize : 0; const treeNodeStyle = { - marginLeft: path.length * indentPixels, + marginLeft: level * indentPixels - offsetDiff, }; + if(isChildFile) { + treeNodeStyle.marginLeft = treeNodeStyle.marginLeft -10; + } + + if (debug) { + console.log('----'); + console.log({ + name, + level, + isFolder, + folderID, + fileID, + matchCount, + marginLeft: treeNodeStyle.marginLeft, + }); + console.log({ + indentPixels, + iconSize, + offsetDiff, + offsetSize, + offsetToggleIcon, + }); + } + + if(debug && activeParentFileId) { + console.log('activeParentFileId', activeParentFileId) + } + const [isSelected, setIsSelected] = useState(false); const [isEditing, setIsEditing] = useState(false); + const [showChildren, setShowChildren]= useState(true); const { FileIcon = getDefaultIcon(AiOutlineFile), @@ -72,31 +142,27 @@ const TreeNode = ({ AddFolderIcon = getDefaultIcon(AiOutlineFolderAdd), CaretRightIcon = getDefaultIcon(AiFillCaretRight), CaretDownIcon = getDefaultIcon(AiFillCaretDown), - OKIcon = getDefaultIcon(AiOutlineCheck), + OKIcon = getDefaultIcon(AiOutlineCheck) } = iconComponents; let TypeIcon = FileIcon; let TypeIconType = 'FileIcon'; if (isFolder) { - TypeIcon = isOpen - ? FolderOpenIcon - : FolderIcon; + TypeIcon = isOpen ? FolderOpenIcon : FolderIcon; - TypeIconType = isOpen - ? 'FolderOpenIcon' - : 'FolderIcon'; + TypeIconType = isOpen ? 'FolderOpenIcon' : 'FolderIcon'; } - const handleCheckBoxChange = e => { + const handleCheckBoxChange = (e) => { if (readOnly) return; const newStatus = +e.target.checked; handleCheck(path, newStatus); }; - const onNameChange = newName => handleRename(path, newName); + const onNameChange = (newName) => handleRename(path, newName); - const selectMe = () => (!isEditing && !readOnly && setIsSelected(true)); + const selectMe = () => !isEditing && !readOnly && setIsSelected(true); const unSelectMe = () => setIsSelected(false); const openMe = () => handleToggleOpen(path, true); @@ -113,6 +179,10 @@ const TreeNode = ({ const addFolder = () => handleAddNode(path, true); const handleNameClick = () => { + if(!isEditing && activeFileId === fileID && (typeof childrenFiles === 'object' && childrenFiles.length > 0)) { + setShowChildren(!showChildren) + } + const defaultOnClick = selectMe; if (onNameClick && typeof onNameClick === 'function') { !isEditing && onNameClick({ defaultOnClick, nodeData }); @@ -121,123 +191,247 @@ const TreeNode = ({ } }; + const handleIconClick = (e) => { + if (debug) { + console.log('---'); + console.log('Clicked on icon'); + console.log('e', e); + console.log('nodeData: ', nodeData); + console.log('---'); + } + onIconClick?.(e, nodeData); + }; + const TreeNodeToolBar = ( - + - { - isFolder && ( - <> - - - - ) - } + {isFolder && ( + <> + + + + )} ); const folderCaret = ( - - { - isOpen - ? ( - - ) - : ( - - ) - } + + {isOpen ? ( + + ) : ( + + )} ); + // 'TreeNode__no-checkbox': !showCheckbox, + // TreeNode__folder: isFolder, + // TreeNode__file: !isFolder, + // TreeNode__selected: isSelected, + // TreeNode__editing: isEditing, + // TreeNode__dragged: isDragging, + // TreeNode__dragged-over: isOver, + // TreeNode__open: isOpen, + // TreeNode__root: level === 0, + // TreeNode__top: level === 1, + // [`TreeNode__level-${level}`]: true, + + const { isDragging, isDraggingOver: isOver } = snapshot || {}; + const { style, ...draggableProps } = provided && provided.draggableProps || {}; + const dndProps = isFolder ? { ...provided.droppableProps } : { ...draggableProps, ...provided.dragHandleProps }; + const dragStyle = isDragging && !isFolder ? style : null; + + if(skipChildren && isChildFile) { + return + } + + const isActiveFile = fileID === activeFileId; + const activeParentFile = fileID === activeParentFileId; + const childrenFiles = useMemo(() => { + let setChildren = []; + if(typeof childFilesData === 'object' && typeof childFilesData.filter === 'function') { + setChildren = childFilesData.filter((file) => file.parentFileId === fileID).sort((a, b) => { + const firstName = a.name.toLowerCase() + const secondName = b.name.toLowerCase() + + // Extract the name without numbers at the end + const nameA = firstName.replace(/ \d+$/, ''); + const nameB = secondName.replace(/ \d+$/, ''); + + // Compare names without numbers + if (nameA < nameB) { + return -1; + } else if (nameA > nameB) { + return 1; + } else { + // Names are the same without numbers, compare the numbers + const numA = parseInt(a.name.match(/\d+$/)); + const numB = parseInt(b.name.match(/\d+$/)); + return numA - numB; + } + }); + } + return setChildren; + }, [childFilesData]) + + const toolbarContainerClasses = isChildFile ? iconContainerClassName('typeIconContainer') + ' childIconContainer': iconContainerClassName('typeIconContainer') + return ( <> -
- { showCheckbox && ( - +
+ {showCheckbox && ( + )} - { isFolder && folderCaret } + {isFolder && folderCaret} - + - { isSelected && TreeNodeToolBar } - + {isSelected && TreeNodeToolBar} + {/* Hide while also preventing dnd from complaining of missing provided.placeholder */} + {isFolder &&
{provided.placeholder}
}
- { - isFolder && isOpen && children.map((data, idx) => ( - - )) + { activeParentFile && showChildren && + childrenFiles.map((data, idx) => { + return ( + + ) + }) } + + {isFolder + && isOpen + && children.map((data, idx) => ( + + ))} ); -}; +}); -TreeNode.propTypes = { +TreeNodeChild.propTypes = { path: PropTypes.array.isRequired, name: PropTypes.string.isRequired, checked: PropTypes.number.isRequired, isOpen: PropTypes.bool, + fileID: PropTypes.string, + folderID: PropTypes.string, + children: PropTypes.array, + snapshot: PropTypes.object, + provided: PropTypes.object, +}; + +let indexCounter = 0; + +const TreeNode = props => { + const { folderID, fileID } = props; + const isFolder = !!props.children; + const isChildFile = props.childFile; + const [index, setIndex] = useState(0); + + useEffect(() => { + indexCounter += 1; + setIndex(indexCounter); + }, []); + + if (index === 0) { + return null; + } + + if(isChildFile) { + // non-dragable, only parent file is + return ( + + ) + } + return isFolder ? ( + + {(provided, snapshot) => ( + + )} + + ) : ( + + {(provided, snapshot) => ( + + )} + + ); +}; + +TreeNode.propTypes = { + isOpen: PropTypes.bool, + fileID: PropTypes.string, + folderID: PropTypes.string, children: PropTypes.array, }; diff --git a/src/components/TreeNode/TreeNode.test.js b/src/components/TreeNode/TreeNode.test.js index 2c642353..01a8e7f6 100644 --- a/src/components/TreeNode/TreeNode.test.js +++ b/src/components/TreeNode/TreeNode.test.js @@ -1,4 +1,5 @@ -import React, { createContext } from 'react'; +import React from 'react'; +import { DragDropContext } from 'react-beautiful-dnd'; import { mount } from 'enzyme'; import TreeNode from './TreeNode'; @@ -13,6 +14,9 @@ const deleteNode = jest.fn(); const addNode = jest.fn(); const toggleOpen = jest.fn(); const onNameClick = jest.fn(); +const dndConfig = { + onDrop: null, +}; const render = ({ iconComponents = {}, @@ -24,7 +28,6 @@ const render = ({ name, checked, isOpen, - children, ...restData }) => { const configs = { @@ -45,14 +48,17 @@ const render = ({ - + + + )); }; diff --git a/src/test/jest-setup.js b/src/test/jest-setup.js index 76b0ba5d..4e4789fa 100644 --- a/src/test/jest-setup.js +++ b/src/test/jest-setup.js @@ -1,5 +1,18 @@ +/* eslint-disable */ +import React from 'react'; import { configure } from 'enzyme'; // import Adapter from 'enzyme-adapter-react-16'; import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; configure({ adapter: new Adapter() }); + +// Mock implementation for react-beautiful-dnd + +const DragDropContext = ({ children }) =>
{children}
; +const Draggable = ({ children }) => children({ draggableProps: {}, dragHandleProps: {}, innerRef: () => {} }, { isDragging: false }); +const Droppable = ({ children }) => children({ droppableProps: {}, placeholder: null }, { isDraggingOver: false }); +jest.mock('react-beautiful-dnd', () => ({ + DragDropContext, + Droppable, + Draggable, +})); diff --git a/src/utils/testChilds.js b/src/utils/testChilds.js new file mode 100644 index 00000000..36288e87 --- /dev/null +++ b/src/utils/testChilds.js @@ -0,0 +1,123 @@ +const testChilds = [ + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "SCHEDULE 1", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "SCHEDULE 2", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wE", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "SCHEDULE 3", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "SCHEDULE 4", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "SCHEDULE 5", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "Agreement Of Sales", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "apple", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "Hello World", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "Loan Agreement 1", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "Loan Agreement 2", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "Loan Agreement 3", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, + { + "_id": "qxwj4x0oye2lvlik2v8mr", + "name": "Payment Instructions", + "type": "FILE", + "fileID": "YaoaDjLBqmufx1wX", + "projectID": "vzHQt2ohbPs2M2mwHky0flezLrkeJZjV", + "childFile": true, + "parentFileId": "Dpcd9UcAW8wd6sFF", + "userID": "grvOSOVgW7YQotHYGSJpBVwQvOE2", + }, +] +export default testChilds; \ No newline at end of file diff --git a/src/utils/testData.js b/src/utils/testData.js index 36ab63d4..ef15a4dd 100644 --- a/src/utils/testData.js +++ b/src/utils/testData.js @@ -1,47 +1,98 @@ const testData = { name: 'All Cryptos', children: [ - { name: 'Bitcoin' }, - { name: 'Etherium' }, - { name: 'Polkadot' }, + { + name: 'Bitcoin', + fileID: 'FCGk0rlxnozNwO7X', + }, + { + name: 'Etherium', + fileID: 'C7hdysACGIBQR0CC', + }, + { + name: 'Polkadot', + fileID: '3XPTvpd20DhLYg6j', + }, { name: 'POW', children: [ - { name: 'Bitcoin' }, - { name: 'Litecoin' }, - { name: 'Bitcoin Cash' }, + { + name: 'Bitcoin', + fileID: 'FwNTUcPZv0ET2adh', + }, + { + name: 'Litecoin', + fileID: 'BaJ5vmxUKPNuca7V', + }, + { + name: 'Bitcoin Cash', + fileID: 'wmAB3wqXmT7yx3Um', + }, ], + folderID: '4WIhn55ynVOGiHix', }, { name: 'Public Chains', children: [ - { name: 'Ripple' }, - { name: 'Chainlink' }, + { + name: 'Ripple', + fileID: 'GNLwtJCdXjFGo3R7', + }, + { + name: 'Chainlink', + fileID: 'xgwySK2ABj3oQUng', + }, { name: 'POW', children: [ - { name: 'Bitcoin' }, - { name: 'Litecoin' }, - { name: 'Bitcoin Cash' }, + { + name: 'Bitcoin', + fileID: 'YWm9BjSXt4PiCLMB', + }, + { + name: 'Litecoin', + fileID: '1Cxoe9DBs7oiEWps', + }, + { + name: 'Bitcoin Cash', + fileID: 'rFSWgJu0d9Lgoso1', + }, ], + folderID: 'Ga1zvj8qWOEfOVL2', }, { name: 'POS', children: [ - { name: 'Etherium' }, - { name: 'EOS' }, + { + name: 'Etherium', + fileID: 'FdLmoTCujAjM9VME', + }, + { + name: 'EOS', + fileID: 'Q4SXolIgSodJJR9r', + }, { name: 'Crosschain', children: [ - { name: 'Polkadot' }, - { name: 'Cosmos' }, + { + name: 'Polkadot', + fileID: 'SayEciikZbEGeiWy', + }, + { + name: 'Cosmos', + fileID: '1YX7vvp1oSikZbEG', + }, ], + folderID: '3PetnwWjtbJErDuk', }, ], + folderID: 'ufJsFqhGMYDmGHNO', }, ], + folderID: 'lerFQtc7usZlV0QI', }, ], + folderID: 'KEdX5ukj6cyqHhri', }; const testDataWithId = { diff --git a/src/utils/testProject.js b/src/utils/testProject.js new file mode 100644 index 00000000..fe611475 --- /dev/null +++ b/src/utils/testProject.js @@ -0,0 +1,50 @@ + +const testProject = { + "name": "Test Project (Tree)", + "type": "FOLDER", + "folderID": "project_root", + "emoji": null, + "children": [ + { + "_id": "tEwGZaAECPHe08ja", + "name": "Document One", + "type": "FILE", + "childFile": false, + "parentFileId": null, + "fileID": "tEwGZaAECPHe08ja", + "emoji": null, + "isExternalFormat": false, + "extension": null, + "assetSourceId": null + }, + { + "name": "Empty", + "type": "FOLDER", + "folderID": "OaSx0vsjnG6zmGc7", + "emoji": null, + "children": [] + }, + { + "name": "Employees", + "type": "FOLDER", + "folderID": "S1sZzKHKcpEMkEsE", + "emoji": null, + "children": [ + { + "_id": "Dpcd9UcAW8wd6sFF", + "name": "Example Parent File", + "type": "FILE", + "childFile": false, + "parentFileId": null, + "fileID": "Dpcd9UcAW8wd6sFF", + "emoji": null, + "isExternalFormat": false, + "extension": null, + "assetSourceId": null + }, + ] + } + ] +} + +export default testProject; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 25e96d42..a3f1aebc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -910,6 +910,20 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.15.4": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" + integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ== + dependencies: + regenerator-runtime "^0.13.11" + +"@babel/runtime@^7.9.2": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.5.tgz#8564dd588182ce0047d55d7a75e93921107b57ec" + integrity sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA== + dependencies: + regenerator-runtime "^0.13.11" + "@babel/template@^7.14.5", "@babel/template@^7.3.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" @@ -1245,6 +1259,14 @@ dependencies: "@types/node" "*" +"@types/hoist-non-react-statics@^3.3.0": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" + integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + "@types/html-minifier-terser@^5.0.0": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#3c9ee980f1a10d6021ae6632ca3e79ca2ec4fb50" @@ -1304,6 +1326,35 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== +"@types/prop-types@*": + version "15.7.5" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" + integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + +"@types/react-redux@^7.1.20": + version "7.1.25" + resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.25.tgz#de841631205b24f9dfb4967dd4a7901e048f9a88" + integrity sha512-bAGh4e+w5D8dajd6InASVIyCo4pZLJ66oLb80F9OBLO1gKESbZcRCJpTT6uLXX+HAB57zw1WTdwJdAsewuTweg== + dependencies: + "@types/hoist-non-react-statics" "^3.3.0" + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + redux "^4.0.0" + +"@types/react@*": + version "18.2.14" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.14.tgz#fa7a6fecf1ce35ca94e74874f70c56ce88f7a127" + integrity sha512-A0zjq+QN/O0Kpe30hA1GidzyFjatVvrpIvWLxD+xv67Vt91TWWgco9IvrJBkeyHm1trGaFS/FSGqPlhyeZRm0g== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.3" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" + integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== + "@types/source-list-map@*": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" @@ -2639,6 +2690,13 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -2650,7 +2708,7 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2659,6 +2717,13 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +css-box-model@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1" + integrity sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw== + dependencies: + tiny-invariant "^1.0.6" + css-loader@^5.0.1: version "5.2.6" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.6.tgz#c3c82ab77fea1f360e587d871a6811f4450cc8d1" @@ -2713,6 +2778,11 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" +csstype@^3.0.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" + integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -4133,6 +4203,13 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -5668,6 +5745,11 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= +memoize-one@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" + integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== + memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -6753,6 +6835,11 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== +raf-schd@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a" + integrity sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ== + raf@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" @@ -6795,6 +6882,19 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" +react-beautiful-dnd@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.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@^16.8.0 || ^17": version "17.0.2" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" @@ -6814,11 +6914,23 @@ react-icons@^4.1.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-is@^16.13.1, react-is@^16.8.1, react-is@^16.8.6: +react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.6: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-redux@^7.2.0: + version "7.2.9" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d" + integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ== + dependencies: + "@babel/runtime" "^7.15.4" + "@types/react-redux" "^7.1.20" + hoist-non-react-statics "^3.3.2" + loose-envify "^1.4.0" + prop-types "^15.7.2" + react-is "^17.0.2" + react-shallow-renderer@^16.13.1: version "16.14.1" resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz#bf0d02df8a519a558fd9b8215442efa5c840e124" @@ -6954,6 +7066,13 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" +redux@^4.0.0, redux@^4.0.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" + integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== + dependencies: + "@babel/runtime" "^7.9.2" + reflect.ownkeys@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" @@ -6971,6 +7090,11 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + regenerator-runtime@^0.13.4: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" @@ -8091,6 +8215,11 @@ thunky@^1.0.2: resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== +tiny-invariant@^1.0.6: + version "1.3.1" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" + integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -8361,6 +8490,11 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +use-memo-one@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99" + integrity sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ== + use-tree-state@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/use-tree-state/-/use-tree-state-1.0.0.tgz#78e1e629b55faa33e9fef9ee409b383612ff429c"