renamed draggable to drag-n-drop

pull/2620/head
Seth Samuel 2 years ago
parent 3767aa137e
commit 4f9972e206
  1. 2
      jest.config.js
  2. 16
      libs/remix-ui/drag-n-drop/.babelrc
  3. 1
      libs/remix-ui/drag-n-drop/.eslintrc.json
  4. 7
      libs/remix-ui/drag-n-drop/README.md
  5. 9
      libs/remix-ui/drag-n-drop/jest.config.js
  6. 4
      libs/remix-ui/drag-n-drop/package.json
  7. 2
      libs/remix-ui/drag-n-drop/src/index.ts
  8. 0
      libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.module.css
  9. 10
      libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.spec.tsx
  10. 2
      libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.tsx
  11. 12
      libs/remix-ui/drag-n-drop/tsconfig.json
  12. 13
      libs/remix-ui/drag-n-drop/tsconfig.lib.json
  13. 0
      libs/remix-ui/drag-n-drop/tsconfig.spec.json
  14. 3
      libs/remix-ui/draggable/.babelrc
  15. 10
      libs/remix-ui/draggable/README.md
  16. 14
      libs/remix-ui/draggable/jest.config.js
  17. 1
      libs/remix-ui/draggable/src/index.ts
  18. 7
      libs/remix-ui/draggable/src/lib/remix-ui-draggable.spec.ts
  19. 11
      libs/remix-ui/draggable/tsconfig.lib.json
  20. 2
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
  21. 6
      libs/remix-ui/workspace/src/lib/components/file-render.tsx
  22. 11
      nx.json
  23. 5
      tsconfig.base.json
  24. 20
      workspace.json

@ -21,5 +21,5 @@ module.exports = {
"<rootDir>/../../dist/libs/remix-ws-templates/src/index.js"
,
"@remix-project/remixd": "<rootDir>/../../dist/libs/remixd/index.js"
},"projects": "<rootDir>/libs/remix-ui/draggable"
},"projects":"<rootDir>/libs/remix-ui/drag-n-drop"
};

@ -0,0 +1,16 @@
{
"presets": [
[
"@nrwl/react/babel", {
"runtime": "automatic",
"useBuiltIns": "usage"
}
]
],
"plugins": [
]
}

@ -1,5 +1,6 @@
{
"extends": [
"plugin:@nrwl/nx/react",
"../../../.eslintrc.json"
],
"ignorePatterns": [

@ -0,0 +1,7 @@
# remix-ui-drag-n-drop
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test remix-ui-drag-n-drop` to execute the unit tests via [Jest](https://jestjs.io).

@ -0,0 +1,9 @@
module.exports = {
displayName: 'remix-ui-drag-n-drop',
preset: '../../../jest.preset.js',
transform: {
'^.+\\.[tj]sx?$': 'babel-jest'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../../coverage/libs/remix-ui/drag-n-drop'
};

@ -0,0 +1,4 @@
{
"name": "@remix-ui/drag-n-drop",
"version": "0.0.1"
}

@ -0,0 +1,2 @@
export * from './lib/remix-ui-drag-n-drop';

@ -0,0 +1,10 @@
import { render } from '@testing-library/react';
import RemixUiDragNDrop from './remix-ui-drag-n-drop';
describe('RemixUiDragNDrop', () => {
it('should render successfully', () => {
const { baseElement } = render(< RemixUiDragNDrop />);
expect(baseElement).toBeTruthy();
});
});

@ -51,7 +51,7 @@ export const Drag = (props: DragType) => {
};
export const Draggable = (props: DraggableType) => {
const dragRef = useRef<HTMLSpanElement>(),
const dragRef = useRef<HTMLSpanElement | null>(null),
file = props.file,
context = useContext(MoveContext);

@ -1,13 +1,17 @@
{
"extends": "../../../tsconfig.base.json",
"files": [],
"include": [],
"compilerOptions": {
"jsx": "react",
"jsx": "react-jsx",
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"

@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"types": ["node"]
},
"files": [
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": ["**/*.spec.ts", "**/*.spec.tsx"],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
}

@ -1,3 +0,0 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
}

@ -1,10 +0,0 @@
# remix-ui-draggable
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test remix-ui-draggable` to execute the unit tests via [Jest](https://jestjs.io).

@ -1,14 +0,0 @@
module.exports = {
displayName: 'remix-ui-draggable',
preset: '../../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
}
},
transform: {
'^.+\\.[tj]sx?$': 'ts-jest'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../../coverage/libs/remix-ui/draggable'
};

@ -1 +0,0 @@
export * from './lib/remix-ui-draggable';

@ -1,7 +0,0 @@
import { remixUiDraggable } from './remix-ui-draggable';
describe('remixUiDraggable', () => {
it('should work', () => {
expect(remixUiDraggable()).toEqual('remix-ui-draggable');
})
})

@ -1,11 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],
"include": ["**/*.ts", "src/lib/remix-ui-draggable.tsx"]
}

@ -10,7 +10,7 @@ import '../css/file-explorer.css'
import { checkSpecialChars, extractNameFromKey, extractParentFromKey, joinPath } from '@remix-ui/helper'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { FileRender } from './file-render'
import { Drag } from '@remix-project/remix-ui/draggable'
import {Drag} from "@remix-ui/drag-n-drop"
export const FileExplorer = (props: FileExplorerProps) => {
const { name, contextMenuItems, removedContextMenuItems, files, fileState } = props

@ -7,7 +7,7 @@ import { getPathIcon } from '@remix-ui/helper'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { FileLabel } from './file-label'
import { fileDecoration, FileDecorationIcons } from '@remix-ui/file-decorators'
import {Draggable} from "@remix-ui/drag-n-drop"
@ -122,7 +122,9 @@ export const FileRender = (props: RenderFileProps) => {
label={
<>
<div className="d-flex flex-row">
<FileLabel file={file} fileDecorations={props.fileDecorations} focusEdit={props.focusEdit} editModeOff={props.editModeOff} />
<Draggable isDraggable={props.focusEdit.element!==null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}>
<FileLabel file={file} fileDecorations={props.fileDecorations} focusEdit={props.focusEdit} editModeOff={props.editModeOff} />
</Draggable>
<FileDecorationIcons file={file} fileDecorations={props.fileDecorations}/>
</div>
</>

@ -204,14 +204,9 @@
},
"etherscan": {
"tags": []
},
"remix-ui-drag-n-drop": {
"tags": []
}
},
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
]
}
}

@ -153,7 +153,10 @@
"libs/remix-ui/permission-handler/src/index.ts"
],
"@remix-ui/file-decorators": ["libs/remix-ui/file-decorators/src/index.ts"],
"@remix-ui/tooltip-popup": ["libs/remix-ui/tooltip-popup/src/index.ts"]
"@remix-ui/tooltip-popup": ["libs/remix-ui/tooltip-popup/src/index.ts"],
"@remix-ui/drag-n-drop": [
"libs/remix-ui/drag-n-drop/src/index.ts"
]
}
},
"exclude": [

@ -1516,6 +1516,26 @@
}
}
},
"remix-ui-drag-n-drop": {
"root": "libs/remix-ui/drag-n-drop",
"sourceRoot": "libs/remix-ui/drag-n-drop/src",
"projectType": "library",
"architect": {
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "libs/remix-ui/drag-n-drop/.eslintrc.json",
"tsConfig": [
"libs/remix-ui/drag-n-drop/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"vyper": {
"root": "apps/vyper",
"sourceRoot": "apps/vyper/src",

Loading…
Cancel
Save