Skip to content

Commit 46a537e

Browse files
authored
Merge pull request #205 from codebdy/add-yup-validation
Add yup validation
2 parents aa73036 + da67ca5 commit 46a537e

File tree

180 files changed

+1215
-568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+1215
-568
lines changed

apps/example-antd5/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@
2828
"@rxdrag/shared": "workspace:*",
2929
"@rxdrag/minions-runtime-react": "workspace:*",
3030
"@rxdrag/controller-editor-antd5": "workspace:*",
31+
"@rxdrag/react-antd-shell-inline": "workspace:*",
32+
"example-common": "workspace:*",
33+
"controller-editor-example": "workspace:*",
34+
"logicflow-editor-example": "workspace:*",
35+
"inline-editor-example": "workspace:*",
3136
"antd": "^5.6.2",
3237
"axios": "^1.4.0",
38+
"styled-components": "^5.3.9",
3339
"classnames": "^2.3.2",
3440
"mockjs": "^1.1.0",
3541
"react": "^18.2.0",
@@ -45,8 +51,9 @@
4551
"@types/react-dom": "^18.0.11",
4652
"@vitejs/plugin-react": "^3.1.0",
4753
"@types/lodash": "^4.14.191",
54+
"@types/styled-components": "^5.1.26",
4855
"typescript": "^4.9.3",
4956
"vite": "^4.2.0",
5057
"vite-plugin-require-transform": "^1.0.9"
5158
}
52-
}
59+
}

apps/example-antd5/src/App.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import { Routes, Route } from 'react-router-dom';
22
import './App.css';
33
import { IFrameCanvasRender } from '@rxdrag/react-core';
44
import { IFramePreviewRender } from "@rxdrag/react-antd-shell"
5-
import { usePredefinedComponents } from './hooks/usePredefinedComponents';
6-
import { Antd5Example } from './Antd5Example';
5+
import { Antd5Example } from './normal/Antd5Example';
76
import { useMemo } from 'react';
8-
import { controllerDefines } from 'controller/defines';
97
import { ControllerFactories } from '@rxdrag/react-runner';
8+
import { controllerDefines } from 'normal/controller/defines';
9+
import { usePredefinedComponents } from 'normal/hooks/usePredefinedComponents';
10+
import { routes } from 'example-common';
11+
import { InlineEditorExample } from "inline-editor-example";
12+
import { LogicflowEditorExample } from "logicflow-editor-example";
13+
import { ControllerEditorExample } from "controller-editor-example";
1014

1115
function App() {
1216
const { designers, components } = usePredefinedComponents()
@@ -22,15 +26,21 @@ function App() {
2226

2327
return (
2428
<Routes>
25-
<Route path={'/'} element={<Antd5Example />}>
29+
<Route path={routes.index} element={<Antd5Example />}>
30+
</Route>
31+
<Route path={routes.inline} element={<InlineEditorExample />}>
32+
</Route>
33+
<Route path={routes.controller} element={<ControllerEditorExample />}>
34+
</Route>
35+
<Route path={routes.logicflow} element={<LogicflowEditorExample />}>
2636
</Route>
2737
<Route path={'/canvas-render'} element={<IFrameCanvasRender designers={designers} />}>
2838
</Route>
2939
<Route path={'/preview-render'} element={<IFramePreviewRender components={components} controllerFactories={controllerFactories} />}>
3040
</Route>
3141
</Routes>
3242

33-
);
43+
);//
3444
}
3545

3646
export default App;

apps/example-antd5/src/Antd5Example.tsx renamed to apps/example-antd5/src/normal/Antd5Example.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ import {
1313
historyIcon,
1414
outlineIcon,
1515
} from "@rxdrag/react-antd-shell"
16-
import { toolsLocales } from "./locales"
16+
import { toolsLocales } from "../locales"
1717
import { ResourceWidget } from "./ResourceWidget"
1818
import { SaveButton } from "./widgets/SaveButton"
1919
import { PagesWidget } from "./PagesWidget"
2020
import { pages } from "./data"
21-
import { minionsLocales } from "controller/locales"
22-
import { minionsMaterialCategories } from "controller/materials"
23-
import { controllerDefines } from "controller/defines"
21+
import { minionsLocales } from "normal/controller/locales"
22+
import { minionsMaterialCategories } from "normal/controller/materials"
23+
import { controllerDefines } from "normal/controller/defines"
24+
import { MenuButton } from "example-common"
2425

2526
export enum LeftNavType {
2627
pages = "pages",
@@ -69,7 +70,9 @@ export const Antd5Example = memo(() => {
6970
}
7071
topBar={
7172
<>
72-
<Logo />
73+
<Space>
74+
<Logo />
75+
</Space>
7376
<Space>
7477
<ThemeButton />
7578
<LangButtons />
@@ -79,6 +82,7 @@ export const Antd5Example = memo(() => {
7982
icon={<GithubFilled />}
8083
> Github</Button>
8184
<SaveButton />
85+
<MenuButton />
8286
</Space>
8387
</>
8488
}
Lines changed: 1 addition & 0 deletions

apps/example-antd5/src/ResourceWidget/index.tsx renamed to apps/example-antd5/src/normal/ResourceWidget/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ComponentResourceWidget, PaneContainer, TemplateResourceWidget } from "@rxdrag/react-antd-shell"
22
import { useSettersTranslate, useRegisterComponentMaterial } from "@rxdrag/react-core"
3-
import { materials, fields } from "materials"
3+
import { materials, fields } from "normal/materials"
44
import { memo, useEffect } from "react"
55
import { FieldMaterial } from "@rxdrag/react-antd-materials"
66
import { ResourceCollapsePanel } from "./ResourceCollapsePanel"

0 commit comments

Comments
 (0)