Skip to content

Commit

Permalink
Feat(root): refactor new folder structure (#41)
Browse files Browse the repository at this point in the history
* feat(root): Create new strucutre packages

Co-authored-by: erfan moghadasi <erfanmoghadasi@users.noreply.github.com>

* feat: handle type structure

* fix: change the files and directories names

* fix(form & root): move the useQuery files and api files from form module to root of the core package

* fix: use aliases for importing types and utils from various modules

---------

Co-authored-by: MRBadri <badri0000badri@gmail.com>
Co-authored-by: erfan moghadasi <erfanmoghadasi@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 23, 2024
1 parent 6529a69 commit 8e4fdc1
Show file tree
Hide file tree
Showing 109 changed files with 294 additions and 859 deletions.
36 changes: 18 additions & 18 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
// {
// "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
// "rules": {
// "@nx/enforce-module-boundaries": [
// "error",
// {
// "enforceBuildableLibDependency": true,
// "allow": [],
// "depConstraints": [
// {
// "sourceTag": "*",
// "onlyDependOnLibsWithTags": ["*"]
// }
// ]
// }
// ]
// }
// },
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
Expand Down
24 changes: 5 additions & 19 deletions apps/docs/src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
import { FormBuilderProps } from 'packages/core/src/components/builder/builder.types';

import { Link, Route, Routes } from 'react-router-dom';

import { Stack } from '@mui/material';

import { Builder } from '@mui-builder/core';

// const createGridContainer = (children, option) => {
// return {
// id: Math.random() * Math.random(),
// groupType: 'grid',
// type: 'container',
// props: {
// children,
// ...option,
// },
// };
// };
import Builder, { BuilderProps } from '@mui-builder/core';

export function App() {
const groupList: FormBuilderProps[] = [
const children: BuilderProps[] = [
// Fields
{
id: 'form-field-1',
Expand Down Expand Up @@ -67,15 +53,15 @@ export function App() {
},

{
id: 'form-field-2',
id: 'form-field-273',
groupType: 'grid',
type: 'container',
props: {
rowSpacing: 2,
columnSpacing: 2,
children: [
{
id: 'form-field-4',
id: 'form-field-4kldjd',
groupType: 'grid',
type: 'item',
props: {
Expand Down Expand Up @@ -214,7 +200,7 @@ export function App() {
path="/"
element={
<Stack direction="row" alignItems="flex-end">
<Builder groupList={groupList} />
<Builder children={children} />
</Stack>
}
/>
Expand Down
12 changes: 0 additions & 12 deletions packages/components/form/.babelrc

This file was deleted.

18 changes: 0 additions & 18 deletions packages/components/form/.eslintrc.json

This file was deleted.

23 changes: 0 additions & 23 deletions packages/components/form/CHANGELOG.md

This file was deleted.

7 changes: 0 additions & 7 deletions packages/components/form/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions packages/components/form/package.json

This file was deleted.

29 changes: 0 additions & 29 deletions packages/components/form/project.json

This file was deleted.

22 changes: 0 additions & 22 deletions packages/components/form/src/components/builder/builder.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions packages/components/form/src/hooks/useScript/useScript.types.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/components/form/src/index.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/components/form/src/types/api.types.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/components/form/src/utils/selector/selector.types.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/components/form/tsconfig.json

This file was deleted.

24 changes: 0 additions & 24 deletions packages/components/form/tsconfig.lib.json

This file was deleted.

12 changes: 0 additions & 12 deletions packages/components/grid/.babelrc

This file was deleted.

18 changes: 0 additions & 18 deletions packages/components/grid/.eslintrc.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/components/grid/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions packages/components/grid/package.json

This file was deleted.

Loading

0 comments on commit 8e4fdc1

Please sign in to comment.