diff --git a/designable/antd/package.json b/designable/antd/package.json
index 91b43e52dc0..a0a054d9c66 100644
--- a/designable/antd/package.json
+++ b/designable/antd/package.json
@@ -30,7 +30,7 @@
"start": "webpack-dev-server --config playground/webpack.dev.ts"
},
"devDependencies": {
- "@designable/react-settings-form": "^0.1.32",
+ "@designable/react-settings-form": "^0.1.33",
"file-loader": "^5.0.2",
"fs-extra": "^8.1.0",
"html-webpack-plugin": "^3.2.0",
@@ -53,8 +53,8 @@
"react-is": ">=16.8.0 || >=17.0.0"
},
"dependencies": {
- "@designable/core": "^0.1.32",
- "@designable/react": "^0.1.32",
+ "@designable/core": "^0.1.33",
+ "@designable/react": "^0.1.33",
"@formily/shared": "2.0.0-beta.64",
"@formily/antd": "2.0.0-beta.64",
"@formily/core": "2.0.0-beta.64",
diff --git a/designable/antd/playground/main.tsx b/designable/antd/playground/main.tsx
index 7e604c60699..6a14116bdcc 100644
--- a/designable/antd/playground/main.tsx
+++ b/designable/antd/playground/main.tsx
@@ -63,7 +63,7 @@ const App = () => {
>
-
+
) => {
return (props: any) => {
diff --git a/designable/antd/src/components/FormContainer/styles.less b/designable/antd/src/components/DesignableContainer/styles.less
similarity index 100%
rename from designable/antd/src/components/FormContainer/styles.less
rename to designable/antd/src/components/DesignableContainer/styles.less
diff --git a/designable/antd/src/components/DesignableField/index.tsx b/designable/antd/src/components/DesignableField/index.tsx
index 92dcd570a14..b81f78f8157 100644
--- a/designable/antd/src/components/DesignableField/index.tsx
+++ b/designable/antd/src/components/DesignableField/index.tsx
@@ -38,11 +38,11 @@ import {
import { clone } from '@formily/shared'
import * as defaultSchema from '../../schemas'
import { Card, Slider, Rate } from 'antd'
-import { createFormContainer } from '../FormContainer'
+import { createDesignableContainer } from '../DesignableContainer'
import { FormItemSwitcher } from '../FormItemSwitcher'
-import { FormTab as DesignableFormTab } from '../FormTab'
-import { FormCollapse as DesignableFormCollapse } from '../FormCollapse'
-import { EmptyObject as DesignableEmptyObject } from '../EmptyObject'
+import { DesignableFormTab } from '../DesignableFormTab'
+import { DesignableFormCollapse } from '../DesignableFormCollapse'
+import { DesignableObject } from '../DesignableObject'
Schema.silent()
@@ -99,9 +99,9 @@ export const createDesignableField = (options: IDesignableFieldProps = {}) => {
},
components: {
...options.components,
- Space: createFormContainer(Space),
- FormGrid: createFormContainer(FormGrid),
- FormLayout: createFormContainer(FormLayout),
+ Space: createDesignableContainer(Space),
+ FormGrid: createDesignableContainer(FormGrid),
+ FormLayout: createDesignableContainer(FormLayout),
FormTab: DesignableFormTab,
FormCollapse: DesignableFormCollapse,
FormItem,
@@ -162,11 +162,11 @@ export const createDesignableField = (options: IDesignableFieldProps = {}) => {
const fieldProps = getFieldProps()
if (props.type === 'object') {
return (
-
+
{props.children}
-
+
)
} else if (props.type === 'array') {
return
diff --git a/designable/antd/src/components/DesignableForm/styles.less b/designable/antd/src/components/DesignableForm/styles.less
index 43d685bf6e1..591c8705700 100644
--- a/designable/antd/src/components/DesignableForm/styles.less
+++ b/designable/antd/src/components/DesignableForm/styles.less
@@ -8,6 +8,15 @@
.@{ant-prefix}-picker-input,
.@{ant-prefix}-picker,
.@{ant-prefix}-cascader-picker-label,
+ .@{ant-prefix}-slider,
+ .@{ant-prefix}-checkbox,
+ .@{ant-prefix}-radio,
+ .@{ant-prefix}-radio-wrapper,
+ .@{ant-prefix}-checkbox-group,
+ .@{ant-prefix}-checkbox-wrapper,
+ .@{ant-prefix}-radio-group,
+ .@{ant-prefix}-upload,
+ .@{ant-prefix}-transfer,
.@{ant-prefix}-select,
.@{ant-prefix}-select-selector {
pointer-events: none !important;
diff --git a/designable/antd/src/components/FormCollapse/index.tsx b/designable/antd/src/components/DesignableFormCollapse/index.tsx
similarity index 97%
rename from designable/antd/src/components/FormCollapse/index.tsx
rename to designable/antd/src/components/DesignableFormCollapse/index.tsx
index 017bc2b15bd..eaa84c8ea34 100644
--- a/designable/antd/src/components/FormCollapse/index.tsx
+++ b/designable/antd/src/components/DesignableFormCollapse/index.tsx
@@ -39,7 +39,7 @@ const getCorrectActiveKey = (
return tabs[tabs.length - 1].id
}
-export const FormCollapse: React.FC & {
+export const DesignableFormCollapse: React.FC & {
CollapsePanel?: React.FC
} = observer((props) => {
const [activeKey, setActiveKey] = useState([])
@@ -134,6 +134,6 @@ export const FormCollapse: React.FC & {
)
})
-FormCollapse.CollapsePanel = (props) => {
+DesignableFormCollapse.CollapsePanel = (props) => {
return {props.children}
}
diff --git a/designable/antd/src/components/FormTab/index.tsx b/designable/antd/src/components/DesignableFormTab/index.tsx
similarity index 97%
rename from designable/antd/src/components/FormTab/index.tsx
rename to designable/antd/src/components/DesignableFormTab/index.tsx
index 87ff071dc52..a7b04c62689 100644
--- a/designable/antd/src/components/FormTab/index.tsx
+++ b/designable/antd/src/components/DesignableFormTab/index.tsx
@@ -28,7 +28,7 @@ const getCorrectActiveKey = (activeKey: string, tabs: TreeNode[]) => {
return tabs[tabs.length - 1].id
}
-export const FormTab: React.FC & {
+export const DesignableFormTab: React.FC & {
TabPane?: React.FC
} = observer((props) => {
const [activeKey, setActiveKey] = useState()
@@ -121,6 +121,6 @@ export const FormTab: React.FC & {
)
})
-FormTab.TabPane = (props) => {
+DesignableFormTab.TabPane = (props) => {
return {props.children}
}
diff --git a/designable/antd/src/components/EmptyObject/index.tsx b/designable/antd/src/components/DesignableObject/index.tsx
similarity index 87%
rename from designable/antd/src/components/EmptyObject/index.tsx
rename to designable/antd/src/components/DesignableObject/index.tsx
index e9665ddde21..5b35493b5a7 100644
--- a/designable/antd/src/components/EmptyObject/index.tsx
+++ b/designable/antd/src/components/DesignableObject/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { useNodeIdProps, useTreeNode } from '@designable/react'
import { Droppable } from '../Droppable'
-export const EmptyObject: React.FC = (props) => {
+export const DesignableObject: React.FC = (props) => {
const node = useTreeNode()
const nodeId = useNodeIdProps()
if (node.children.length === 0) return
diff --git a/package.json b/package.json
index 483c37eab8b..be9b3e423e5 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
},
"workspaces": [
"packages/*",
- "designable/*"
+ "designable/*",
+ "devtools/*"
],
"scripts": {
"bootstrap": "lerna bootstrap",
diff --git a/yarn.lock b/yarn.lock
index 8e3f20eff2b..ea17244a55f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1155,12 +1155,12 @@
resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-3.4.0.tgz#c3c5ae543c897caa9c2a68630bed355be5f9990f"
integrity sha512-JZButFdZ1+/xAfpguQHoabIXkcqRRKpMrWKBkpEZZyxfY9C1DpADFB8PEqGSTeFr135SaTRfKqGKx5xSCLI7ZQ==
-"@designable/core@0.1.32", "@designable/core@^0.1.32":
- version "0.1.32"
- resolved "https://registry.yarnpkg.com/@designable/core/-/core-0.1.32.tgz#ef12a0e23d42d3052912376c468a217de3ca451a"
- integrity sha512-FwWyRAH3iUCs5b31ceb1+NlBtbJ9vHGCB+EtoZAhOa+U1HXsSJENsiwrosD9gP4L2ZqoEivfmeqQFkwkekMV+g==
+"@designable/core@0.1.33", "@designable/core@^0.1.33":
+ version "0.1.33"
+ resolved "https://registry.yarnpkg.com/@designable/core/-/core-0.1.33.tgz#689f123b0417c739433436e5f65ab3944fc98d22"
+ integrity sha512-GSkqGLLEgzQcJeEVdyRYxqUYEgovn16Nj89WMNGc0H4wKOZYeCs26Cq32NBaFaRz5oy2LB/91fbHQrQ0tJxnjQ==
dependencies:
- "@designable/shared" "0.1.32"
+ "@designable/shared" "0.1.33"
"@formily/json-schema" "^2.0.0-beta.50"
"@formily/path" "^2.0.0-beta.50"
"@formily/reactive" "^2.0.0-beta.50"
@@ -1176,14 +1176,14 @@
"@formily/reactive" "^2.0.0-beta.50"
"@juggle/resize-observer" "^3.3.1"
-"@designable/react-settings-form@^0.1.32":
- version "0.1.32"
- resolved "https://registry.yarnpkg.com/@designable/react-settings-form/-/react-settings-form-0.1.32.tgz#dd67c5e1ed3cf92f374b4bbf1d11bc527c205257"
- integrity sha512-cPZyhNJB9pHTuJY4olJ1gOnUUyzYezGMQRjU3Lu7WmY7fEGf22Q/Jiutrf7RiuNSUpg212P37I+KUSINoeN4xw==
+"@designable/react-settings-form@^0.1.33":
+ version "0.1.33"
+ resolved "https://registry.yarnpkg.com/@designable/react-settings-form/-/react-settings-form-0.1.33.tgz#de102a3ec7ede4d5f0d24623171ec00805f477d4"
+ integrity sha512-bIoONlLLvYOb9rJIkRwYFhdDcu7p6aJ1sXyjuFNct139870QA3HSG0nCjwjB0MDxqtHItJLyNPnZ0QcKy4DUBQ==
dependencies:
- "@designable/core" "0.1.32"
- "@designable/react" "0.1.32"
- "@designable/shared" "0.1.32"
+ "@designable/core" "0.1.33"
+ "@designable/react" "0.1.33"
+ "@designable/shared" "0.1.33"
"@formily/antd" "^2.0.0-beta.50"
"@formily/core" "^2.0.0-beta.50"
"@formily/react" "^2.0.0-beta.50"
@@ -1191,13 +1191,13 @@
"@formily/reactive-react" "^2.0.0-beta.50"
react-color "^2.19.3"
-"@designable/react@0.1.32", "@designable/react@^0.1.32":
- version "0.1.32"
- resolved "https://registry.yarnpkg.com/@designable/react/-/react-0.1.32.tgz#e30b7e71b1deb13e0c59716c5f63e78527d42fba"
- integrity sha512-IXlJdOpSv8zxnkrottz7P7E55coEbuV1swRB15yI5/J2S3W3Tap6AEVHZyJRbRPv4chxdNbllkasT9IeK/GDGQ==
+"@designable/react@0.1.33", "@designable/react@^0.1.33":
+ version "0.1.33"
+ resolved "https://registry.yarnpkg.com/@designable/react/-/react-0.1.33.tgz#ee22be6a2bd2fc4ba0a000b59917b9d83acafdae"
+ integrity sha512-0u8tQqzD0jC7jGI/cmLKhrinB0Ms9Pi86mcHMptnqwmtPd+R/wqqIw4n4FRLk3g0ARYOHHovY2Nnwo+Kp4L5qQ==
dependencies:
- "@designable/core" "0.1.32"
- "@designable/shared" "0.1.32"
+ "@designable/core" "0.1.33"
+ "@designable/shared" "0.1.33"
"@formily/reactive" "^2.0.0-beta.50"
"@formily/reactive-react" "^2.0.0-beta.50"
"@juggle/resize-observer" "^3.3.1"
@@ -1209,10 +1209,10 @@
dependencies:
requestidlecallback "^0.3.0"
-"@designable/shared@0.1.32":
- version "0.1.32"
- resolved "https://registry.yarnpkg.com/@designable/shared/-/shared-0.1.32.tgz#105fd2650ddbd2c9f3665ca91c6ec5055152803b"
- integrity sha512-dRR95iNt8UWNsGy72ym2SS2Kr8RVpItfDfTJ90+bzIJRVw8sGcJ060+Rm4XWZNFktGyMKpH+LunUtJmfZJysNg==
+"@designable/shared@0.1.33":
+ version "0.1.33"
+ resolved "https://registry.yarnpkg.com/@designable/shared/-/shared-0.1.33.tgz#69a373e5a6bbcf3171f751ed28b8ca15fe19ab6d"
+ integrity sha512-LCOlLuqDAkvr34bPFoxfAVuQYfv3OqiW10aHOSvJU6CsaKrVgdYYVIwN5iV78B2TuIIYK2h7jYv5WhTsa384ng==
dependencies:
requestidlecallback "^0.3.0"