feat: @formily/* 统一成 @nocobase/schema,清理所有的 ts build 报错 (#566)

Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachycode#566
This commit is contained in:
sealday 2024-04-02 18:13:33 +08:00
parent c2ea05e451
commit dbb1703dff
916 changed files with 3830 additions and 2866 deletions

View File

@ -45,7 +45,8 @@
} }
}, },
"dependencies": { "dependencies": {
"pm2": "^5.2.0" "pm2": "^5.2.0",
"rimraf": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@changesets/cli": "^2.27.1", "@changesets/cli": "^2.27.1",
@ -55,8 +56,9 @@
"@nocobase/build": "workspace:*", "@nocobase/build": "workspace:*",
"@nocobase/cli": "workspace:*", "@nocobase/cli": "workspace:*",
"@nocobase/preset-nocobase": "workspace:*", "@nocobase/preset-nocobase": "workspace:*",
"@types/react": "^17.0.0", "@nocobase/test": "workspace:*",
"@types/react-dom": "^17.0.0", "@types/react": "^18.2.73",
"@types/react-dom": "^18.2.23",
"auto-changelog": "^2.4.0", "auto-changelog": "^2.4.0",
"axios": "^1.6.2", "axios": "^1.6.2",
"commander": "^9.2.0", "commander": "^9.2.0",
@ -69,10 +71,10 @@
"prettier-plugin-sql": "^0.17.0", "prettier-plugin-sql": "^0.17.0",
"pretty-format": "^24.0.0", "pretty-format": "^24.0.0",
"pretty-quick": "^3.1.0", "pretty-quick": "^3.1.0",
"react": "^18.0.0", "react": "^18.2.0",
"react-dom": "^18.0.0", "react-dom": "^18.2.0",
"tsx": "^4.6.2", "tsx": "^4.6.2",
"typescript": "5.1.3", "typescript": "5.4.3",
"umi": "^4.0.69" "umi": "^4.0.69"
}, },
"packageManager": "pnpm@8.15.5", "packageManager": "pnpm@8.15.5",
@ -86,18 +88,28 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@formily/core": "2.2.27",
"@formily/grid": "2.2.27",
"@formily/json-schema": "2.2.27",
"@formily/path": "2.2.27",
"@formily/react": "2.2.27",
"@formily/reactive": "2.2.27",
"@formily/reactive-react": "2.2.27",
"@formily/shared": "2.2.27",
"@formily/validator": "2.2.27",
"@types/node": "^20.12.2", "@types/node": "^20.12.2",
"@types/react": "^17.0.0", "@types/react": "18.2.73",
"@types/react-dom": "^17.0.0", "@types/react-dom": "18.2.23",
"@typescript-eslint/parser": "^6.2.0", "@typescript-eslint/parser": "^6.2.0",
"antd": "5.12.8", "antd": "5.16.0",
"nwsapi": "2.2.7", "nwsapi": "2.2.7",
"prettier": "^3.1.1", "prettier": "^3.1.1",
"react": "^18.0.0", "react": "18.2.0",
"react-dom": "^18.0.0", "react-dom": "18.2.0",
"react-router": "^6.11.2", "react-router": "^6.11.2",
"react-router-dom": "^6.11.2", "react-router-dom": "^6.11.2",
"tsx": "^4.6.2" "tsx": "^4.6.2",
"typescript": "5.4.3"
} }
}, },
"licenses": [ "licenses": [

View File

@ -17,5 +17,8 @@
"lodash": "4.17.21", "lodash": "4.17.21",
"minimatch": "^5.1.1" "minimatch": "^5.1.1"
}, },
"devDependencies": {
"@types/lodash": "4.17.0"
},
"gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1"
} }

View File

@ -15,4 +15,4 @@ export const cacheManager = {
} }
: {}), : {}),
}, },
} as CacheManagerOptions; };

View File

@ -32,7 +32,7 @@
"gulp-typescript": "6.0.0-alpha.1", "gulp-typescript": "6.0.0-alpha.1",
"tar": "^6.2.0", "tar": "^6.2.0",
"tsup": "7.2.0", "tsup": "7.2.0",
"typescript": "5.1.3", "typescript": "5.4.3",
"update-notifier": "3.0.0", "update-notifier": "3.0.0",
"vite": "^5.0.0", "vite": "^5.0.0",
"vite-plugin-css-injected-by-js": "^3.2.1", "vite-plugin-css-injected-by-js": "^3.2.1",

View File

@ -39,6 +39,7 @@ const external = [
'@nocobase/logger', '@nocobase/logger',
'@nocobase/resourcer', '@nocobase/resourcer',
'@nocobase/sdk', '@nocobase/sdk',
'@nocobase/schema',
'@nocobase/server', '@nocobase/server',
'@nocobase/test', '@nocobase/test',
'@nocobase/utils', '@nocobase/utils',

View File

@ -1,4 +1,5 @@
import { RedisStore } from 'cache-manager-redis-yet'; import type { RedisStore } from 'cache-manager-redis-yet';
import type { RedisClientType } from 'redis';
import { BloomFilter } from '.'; import { BloomFilter } from '.';
import { Cache } from '../cache'; import { Cache } from '../cache';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Select, Table, TableProps } from 'antd'; import { Select, Table, TableProps } from 'antd';
import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';
import useUrlState from '@ahooksjs/use-url-state'; import useUrlState from '@ahooksjs/use-url-state';

View File

@ -1,7 +1,7 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import { Button, Form, FormProps, Input, InputNumber, notification } from 'antd'; import { Button, Form, FormProps, Input, InputNumber, notification } from 'antd';
import { SchemaComponent, useDataBlockResource, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, useDataBlockResource, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -7,7 +7,7 @@ import {
useCollectionRecordData, useCollectionRecordData,
withDynamicSchemaProps, withDynamicSchemaProps,
} from '@nocobase/client'; } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import useUrlState from '@ahooksjs/use-url-state'; import useUrlState from '@ahooksjs/use-url-state';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -8,7 +8,7 @@ import {
useCollectionRecordData, useCollectionRecordData,
withDynamicSchemaProps, withDynamicSchemaProps,
} from '@nocobase/client'; } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { SchemaComponent, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -17,8 +17,8 @@ import {
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { observer, useFieldSchema } from '@formily/react'; import { observer, useFieldSchema } from '@nocobase/schema';
const schema: ISchema = { const schema: ISchema = {
type: 'void', type: 'void',

View File

@ -9,7 +9,7 @@ import {
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
const schema: ISchema = { const schema: ISchema = {
type: 'void', type: 'void',

View File

@ -1,4 +1,4 @@
import { ISchema, observer, useForm } from '@formily/react'; import { ISchema, observer, useForm } from '@nocobase/schema';
import { import {
Action, Action,
Application, Application,

View File

@ -1,4 +1,4 @@
import { ISchema, observer } from '@formily/react'; import { ISchema, observer } from '@nocobase/schema';
import { import {
Application, Application,
CollectionProvider, CollectionProvider,

View File

@ -9,8 +9,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
const Hello = observer(() => { const Hello = observer(() => {
const field = useField<Field>(); const field = useField<Field>();

View File

@ -9,8 +9,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
import { Avatar } from 'antd'; import { Avatar } from 'antd';
const Hello = observer(() => { const Hello = observer(() => {

View File

@ -11,7 +11,7 @@ import {
} from '@nocobase/client'; } from '@nocobase/client';
import React from 'react'; import React from 'react';
import { appOptions } from './schema-initializer-common'; import { appOptions } from './schema-initializer-common';
import { useFieldSchema } from '@formily/react'; import { useFieldSchema } from '@nocobase/schema';
const Demo = () => { const Demo = () => {
const { insert } = useSchemaInitializer(); const { insert } = useSchemaInitializer();

View File

@ -4,7 +4,7 @@
import { Grid, SchemaInitializer, Application, SchemaInitializerSelect, useDesignable } from '@nocobase/client'; import { Grid, SchemaInitializer, Application, SchemaInitializerSelect, useDesignable } from '@nocobase/client';
import React from 'react'; import React from 'react';
import { appOptions } from './schema-initializer-common'; import { appOptions } from './schema-initializer-common';
import { useFieldSchema } from '@formily/react'; import { useFieldSchema } from '@nocobase/schema';
const OpenModeSelect = () => { const OpenModeSelect = () => {
const fieldSchema = useFieldSchema(); const fieldSchema = useFieldSchema();

View File

@ -11,8 +11,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
import { ButtonProps, ListProps, List, Card } from 'antd'; import { ButtonProps, ListProps, List, Card } from 'antd';
const Hello = observer(() => { const Hello = observer(() => {

View File

@ -7,8 +7,8 @@ import {
useDesignable, useDesignable,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
import { Button } from 'antd'; import { Button } from 'antd';
const Hello = observer(() => { const Hello = observer(() => {

View File

@ -9,8 +9,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
const Hello = observer(() => { const Hello = observer(() => {
const field = useField<Field>(); const field = useField<Field>();

View File

@ -11,7 +11,7 @@ import {
useDesignable, useDesignable,
} from '@nocobase/client'; } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { ISchema, useField } from '@formily/react'; import { ISchema, useField } from '@nocobase/schema';
export const SchemaSettingsBlockTitleItem = function BlockTitleItem() { export const SchemaSettingsBlockTitleItem = function BlockTitleItem() {
const filed = useField(); const filed = useField();

View File

@ -4,7 +4,7 @@
import React, { FC, useState } from 'react'; import React, { FC, useState } from 'react';
import { Application, SchemaSettings, SchemaSettingsItem, useDesignable } from '@nocobase/client'; import { Application, SchemaSettings, SchemaSettingsItem, useDesignable } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { observer, useField } from '@formily/react'; import { observer, useField } from '@nocobase/schema';
import { Button, Input, Space } from 'antd'; import { Button, Input, Space } from 'antd';
const MarkdownEdit = () => { const MarkdownEdit = () => {

View File

@ -1,7 +1,7 @@
/** /**
* defaultShowCode: true * defaultShowCode: true
*/ */
import { ISchema } from '@formily/react'; import { ISchema } from '@nocobase/schema';
import { import {
Application, Application,
FormItem, FormItem,

View File

@ -4,7 +4,7 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import { Application, SchemaSettings, SchemaSettingsSelectItem, useDesignable } from '@nocobase/client'; import { Application, SchemaSettings, SchemaSettingsSelectItem, useDesignable } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { observer, useField } from '@formily/react'; import { observer, useField } from '@nocobase/schema';
import { Table } from 'antd'; import { Table } from 'antd';
const PageSize = () => { const PageSize = () => {

View File

@ -4,7 +4,7 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import { Application, SchemaSettings, SchemaSettingsSwitchItem, useDesignable } from '@nocobase/client'; import { Application, SchemaSettings, SchemaSettingsSwitchItem, useDesignable } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { observer, useField } from '@formily/react'; import { observer, useField } from '@nocobase/schema';
import { Form, Input } from 'antd'; import { Form, Input } from 'antd';
const FormItemRequired = () => { const FormItemRequired = () => {

View File

@ -1,4 +1,4 @@
import { ISchema, useField, useFieldSchema } from '@formily/react'; import { ISchema, useField, useFieldSchema } from '@nocobase/schema';
import { import {
Application, Application,
CardItem, CardItem,

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Select, Table, TableProps } from 'antd'; import { Select, Table, TableProps } from 'antd';
import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, UseDataBlockProps, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';
import useUrlState from '@ahooksjs/use-url-state'; import useUrlState from '@ahooksjs/use-url-state';

View File

@ -1,7 +1,7 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import { Button, Form, FormProps, Input, InputNumber, notification } from 'antd'; import { Button, Form, FormProps, Input, InputNumber, notification } from 'antd';
import { SchemaComponent, useDataBlockResource, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, useDataBlockResource, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -7,7 +7,7 @@ import {
useCollectionRecordData, useCollectionRecordData,
withDynamicSchemaProps, withDynamicSchemaProps,
} from '@nocobase/client'; } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import useUrlState from '@ahooksjs/use-url-state'; import useUrlState from '@ahooksjs/use-url-state';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -8,7 +8,7 @@ import {
useCollectionRecordData, useCollectionRecordData,
withDynamicSchemaProps, withDynamicSchemaProps,
} from '@nocobase/client'; } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { SchemaComponent, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client'; import { SchemaComponent, useDataBlockRequest, withDynamicSchemaProps } from '@nocobase/client';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';

View File

@ -17,8 +17,8 @@ import {
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { observer, useFieldSchema } from '@formily/react'; import { observer, useFieldSchema } from '@nocobase/schema';
const schema: ISchema = { const schema: ISchema = {
type: 'void', type: 'void',

View File

@ -9,7 +9,7 @@ import {
import { createApp } from '../../../data-source/demos/createApp'; import { createApp } from '../../../data-source/demos/createApp';
import { Table, TableProps } from 'antd'; import { Table, TableProps } from 'antd';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
const schema: ISchema = { const schema: ISchema = {
type: 'void', type: 'void',

View File

@ -1,4 +1,4 @@
import { ISchema, observer, useForm } from '@formily/react'; import { ISchema, observer, useForm } from '@nocobase/schema';
import { import {
Action, Action,
Application, Application,

View File

@ -1,4 +1,4 @@
import { ISchema, observer } from '@formily/react'; import { ISchema, observer } from '@nocobase/schema';
import { import {
Application, Application,
CollectionProvider, CollectionProvider,

View File

@ -9,8 +9,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
const Hello = observer(() => { const Hello = observer(() => {
const field = useField<Field>(); const field = useField<Field>();

View File

@ -9,8 +9,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
import { Avatar } from 'antd'; import { Avatar } from 'antd';
const Hello = observer(() => { const Hello = observer(() => {

View File

@ -11,7 +11,7 @@ import {
} from '@nocobase/client'; } from '@nocobase/client';
import React from 'react'; import React from 'react';
import { appOptions } from './schema-initializer-common'; import { appOptions } from './schema-initializer-common';
import { useFieldSchema } from '@formily/react'; import { useFieldSchema } from '@nocobase/schema';
const Demo = () => { const Demo = () => {
const { insert } = useSchemaInitializer(); const { insert } = useSchemaInitializer();

View File

@ -4,7 +4,7 @@
import { Grid, SchemaInitializer, Application, SchemaInitializerSelect, useDesignable } from '@nocobase/client'; import { Grid, SchemaInitializer, Application, SchemaInitializerSelect, useDesignable } from '@nocobase/client';
import React from 'react'; import React from 'react';
import { appOptions } from './schema-initializer-common'; import { appOptions } from './schema-initializer-common';
import { useFieldSchema } from '@formily/react'; import { useFieldSchema } from '@nocobase/schema';
const OpenModeSelect = () => { const OpenModeSelect = () => {
const fieldSchema = useFieldSchema(); const fieldSchema = useFieldSchema();

View File

@ -11,8 +11,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
import { ButtonProps, ListProps, List, Card } from 'antd'; import { ButtonProps, ListProps, List, Card } from 'antd';
const Hello = observer(() => { const Hello = observer(() => {

View File

@ -7,8 +7,8 @@ import {
useDesignable, useDesignable,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
import { Button } from 'antd'; import { Button } from 'antd';
const Hello = observer(() => { const Hello = observer(() => {

View File

@ -9,8 +9,8 @@ import {
useSchemaInitializerItem, useSchemaInitializerItem,
useSchemaInitializerRender, useSchemaInitializerRender,
} from '@nocobase/client'; } from '@nocobase/client';
import { observer, useField, useFieldSchema } from '@formily/react'; import { observer, useField, useFieldSchema } from '@nocobase/schema';
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
const Hello = observer(() => { const Hello = observer(() => {
const field = useField<Field>(); const field = useField<Field>();

View File

@ -11,7 +11,7 @@ import {
useDesignable, useDesignable,
} from '@nocobase/client'; } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { ISchema, useField } from '@formily/react'; import { ISchema, useField } from '@nocobase/schema';
export const SchemaSettingsBlockTitleItem = function BlockTitleItem() { export const SchemaSettingsBlockTitleItem = function BlockTitleItem() {
const filed = useField(); const filed = useField();

View File

@ -4,7 +4,7 @@
import React, { FC, useState } from 'react'; import React, { FC, useState } from 'react';
import { Application, SchemaSettings, SchemaSettingsItem, useDesignable } from '@nocobase/client'; import { Application, SchemaSettings, SchemaSettingsItem, useDesignable } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { observer, useField } from '@formily/react'; import { observer, useField } from '@nocobase/schema';
import { Button, Input, Space } from 'antd'; import { Button, Input, Space } from 'antd';
const MarkdownEdit = () => { const MarkdownEdit = () => {

View File

@ -1,7 +1,7 @@
/** /**
* defaultShowCode: true * defaultShowCode: true
*/ */
import { ISchema } from '@formily/react'; import { ISchema } from '@nocobase/schema';
import { import {
Application, Application,
FormItem, FormItem,

View File

@ -4,7 +4,7 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import { Application, SchemaSettings, SchemaSettingsSelectItem, useDesignable } from '@nocobase/client'; import { Application, SchemaSettings, SchemaSettingsSelectItem, useDesignable } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { observer, useField } from '@formily/react'; import { observer, useField } from '@nocobase/schema';
import { Table } from 'antd'; import { Table } from 'antd';
const PageSize = () => { const PageSize = () => {

View File

@ -4,7 +4,7 @@
import React, { FC } from 'react'; import React, { FC } from 'react';
import { Application, SchemaSettings, SchemaSettingsSwitchItem, useDesignable } from '@nocobase/client'; import { Application, SchemaSettings, SchemaSettingsSwitchItem, useDesignable } from '@nocobase/client';
import { appOptions } from './schema-settings-common'; import { appOptions } from './schema-settings-common';
import { observer, useField } from '@formily/react'; import { observer, useField } from '@nocobase/schema';
import { Form, Input } from 'antd'; import { Form, Input } from 'antd';
const FormItemRequired = () => { const FormItemRequired = () => {

View File

@ -1,4 +1,4 @@
import { ISchema, useField, useFieldSchema } from '@formily/react'; import { ISchema, useField, useFieldSchema } from '@nocobase/schema';
import { import {
Application, Application,
CardItem, CardItem,

View File

@ -8,7 +8,7 @@
"dependencies": { "dependencies": {
"@ahooksjs/use-url-state": "3.5.1", "@ahooksjs/use-url-state": "3.5.1",
"@ant-design/cssinjs": "^1.11.1", "@ant-design/cssinjs": "^1.11.1",
"@ant-design/icons": "^5.1.4", "@ant-design/icons": "^5.3.6",
"@ant-design/pro-layout": "^7.16.11", "@ant-design/pro-layout": "^7.16.11",
"@antv/g2plot": "^2.4.18", "@antv/g2plot": "^2.4.18",
"@ctrl/tinycolor": "^3.6.0", "@ctrl/tinycolor": "^3.6.0",
@ -19,20 +19,12 @@
"@dnd-kit/utilities": "^3.2.2", "@dnd-kit/utilities": "^3.2.2",
"@emotion/css": "^11.7.1", "@emotion/css": "^11.7.1",
"@formily/antd-v5": "^1.1.9", "@formily/antd-v5": "^1.1.9",
"@formily/core": "^2.2.27",
"@formily/grid": "^2.2.27",
"@formily/json-schema": "^2.2.27",
"@formily/path": "^2.2.27",
"@formily/react": "^2.2.27",
"@formily/reactive": "^2.2.27",
"@formily/reactive-react": "^2.2.27",
"@formily/shared": "^2.2.27",
"@formily/validator": "^2.2.27",
"@nocobase/evaluators": "workspace:*", "@nocobase/evaluators": "workspace:*",
"@nocobase/schema": "workspace:*",
"@nocobase/sdk": "workspace:*", "@nocobase/sdk": "workspace:*",
"@nocobase/utils": "workspace:*", "@nocobase/utils": "workspace:*",
"ahooks": "^3.7.2", "ahooks": "^3.7.2",
"antd": "^5.12.8", "antd": "5.16.0",
"antd-style": "3.4.5", "antd-style": "3.4.5",
"axios": "^1.6.2", "axios": "^1.6.2",
"classnames": "^2.3.1", "classnames": "^2.3.1",
@ -71,6 +63,7 @@
}, },
"devDependencies": { "devDependencies": {
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"@types/lodash": "^4.17.0",
"@types/markdown-it": "12.2.3", "@types/markdown-it": "12.2.3",
"@types/markdown-it-highlightjs": "3.3.1", "@types/markdown-it-highlightjs": "3.3.1",
"@types/react-big-calendar": "^1.6.4", "@types/react-big-calendar": "^1.6.4",

View File

@ -1,5 +1,5 @@
import { Field } from '@formily/core'; import { Field } from '@nocobase/schema';
import { Schema, useField, useFieldSchema } from '@formily/react'; import { Schema, useField, useFieldSchema } from '@nocobase/schema';
import React, { createContext, useContext, useEffect } from 'react'; import React, { createContext, useContext, useEffect } from 'react';
import { Navigate } from 'react-router-dom'; import { Navigate } from 'react-router-dom';
import { omit } from 'lodash'; import { omit } from 'lodash';

View File

@ -1,5 +1,5 @@
import { ISchema } from '@formily/react'; import { ISchema } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { Card } from 'antd'; import { Card } from 'antd';
import React from 'react'; import React from 'react';
import { SchemaComponent } from '../schema-component'; import { SchemaComponent } from '../schema-component';

View File

@ -1,5 +1,5 @@
import { onFieldChange } from '@formily/core'; import { onFieldChange } from '@nocobase/schema';
import { connect } from '@formily/react'; import { connect } from '@nocobase/schema';
import { Checkbox } from 'antd'; import { Checkbox } from 'antd';
import uniq from 'lodash/uniq'; import uniq from 'lodash/uniq';
import React, { useContext } from 'react'; import React, { useContext } from 'react';

View File

@ -1,6 +1,6 @@
import { FormItem, FormLayout } from '@formily/antd-v5'; import { FormItem, FormLayout } from '@formily/antd-v5';
import { ArrayField } from '@formily/core'; import { ArrayField } from '@nocobase/schema';
import { connect, useField, useForm } from '@formily/react'; import { connect, useField, useForm } from '@nocobase/schema';
import { Checkbox, Table, Tag } from 'antd'; import { Checkbox, Table, Tag } from 'antd';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import React, { createContext } from 'react'; import React, { createContext } from 'react';

View File

@ -1,4 +1,4 @@
import { createForm } from '@formily/core'; import { createForm } from '@nocobase/schema';
import React, { createContext, useContext, useMemo, useState } from 'react'; import React, { createContext, useContext, useMemo, useState } from 'react';
import { FormProvider, SchemaComponent } from '../../schema-component'; import { FormProvider, SchemaComponent } from '../../schema-component';
import { scopesSchema } from './schemas/scopes'; import { scopesSchema } from './schemas/scopes';

View File

@ -1,5 +1,5 @@
import { ArrayField } from '@formily/core'; import { ArrayField } from '@nocobase/schema';
import { connect, useField } from '@formily/react'; import { connect, useField } from '@nocobase/schema';
import { Checkbox, Select, Table, Tag } from 'antd'; import { Checkbox, Select, Table, Tag } from 'antd';
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';

View File

@ -1,5 +1,5 @@
import { ISchema } from '@formily/react'; import { ISchema } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { useRoleResourceValues } from './useRoleResourceValues'; import { useRoleResourceValues } from './useRoleResourceValues';
import { useSaveRoleResourceAction } from './useSaveRoleResourceAction'; import { useSaveRoleResourceAction } from './useSaveRoleResourceAction';

View File

@ -1,5 +1,5 @@
import { ISchema } from '@formily/react'; import { ISchema } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import pick from 'lodash/pick'; import pick from 'lodash/pick';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { useRequest } from '../../../api-client'; import { useRequest } from '../../../api-client';

View File

@ -1,4 +1,4 @@
import { ISchema } from '@formily/react'; import { ISchema } from '@nocobase/schema';
import { useContext, useEffect } from 'react'; import { useContext, useEffect } from 'react';
import { useFormBlockContext } from '../../../block-provider'; import { useFormBlockContext } from '../../../block-provider';
import { useFilterOptions } from '../../../schema-component'; import { useFilterOptions } from '../../../schema-component';

View File

@ -1,4 +1,4 @@
import { useForm } from '@formily/react'; import { useForm } from '@nocobase/schema';
import { useActionContext, useAPIClient, useRecord, useResourceActionContext } from '../../../'; import { useActionContext, useAPIClient, useRecord, useResourceActionContext } from '../../../';
export const useSaveRoleResourceAction = () => { export const useSaveRoleResourceAction = () => {

View File

@ -1,4 +1,4 @@
import { createContext } from 'react'; import React, { createContext } from 'react';
import { APIClient } from './APIClient'; import { APIClient } from './APIClient';
export const APIClientContext = createContext<APIClient>(new APIClient()); export const APIClientContext = createContext<APIClient>(new APIClient());

View File

@ -1,4 +1,4 @@
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { APIClient, APIClientProvider, useAPIClient, useRequest } from '@nocobase/client'; import { APIClient, APIClientProvider, useAPIClient, useRequest } from '@nocobase/client';
import { Button, Input, Space, Table } from 'antd'; import { Button, Input, Space, Table } from 'antd';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';

View File

@ -1,4 +1,4 @@
import { merge } from '@formily/shared'; import { merge } from '@nocobase/schema';
import { useRequest as useReq, useSetState } from 'ahooks'; import { useRequest as useReq, useSetState } from 'ahooks';
import { Options, Result } from 'ahooks/es/useRequest/src/types'; import { Options, Result } from 'ahooks/es/useRequest/src/types';
import { AxiosRequestConfig } from 'axios'; import { AxiosRequestConfig } from 'axios';

View File

@ -1,4 +1,4 @@
import { define, observable } from '@formily/reactive'; import { define, observable } from '@nocobase/schema';
import { APIClientOptions, getSubAppName } from '@nocobase/sdk'; import { APIClientOptions, getSubAppName } from '@nocobase/sdk';
import { i18n as i18next } from 'i18next'; import { i18n as i18next } from 'i18next';
import get from 'lodash/get'; import get from 'lodash/get';

View File

@ -1,4 +1,4 @@
import { define, observable } from '@formily/reactive'; import { define, observable } from '@nocobase/schema';
import { getSubAppName } from '@nocobase/sdk'; import { getSubAppName } from '@nocobase/sdk';
import { Application } from './Application'; import { Application } from './Application';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { fireEvent, render, screen, waitFor } from '@nocobase/test/client'; import { fireEvent, render, screen, waitFor } from '@nocobase/test/client';
import { SchemaToolbarProvider, useSchemaToolbar, useSchemaToolbarRender } from '../schema-toolbar'; import { SchemaToolbarProvider, useSchemaToolbar, useSchemaToolbarRender } from '../schema-toolbar';
import { SchemaComponent, SchemaComponentProvider, SortableContext, SortableProvider } from '../../schema-component'; import { SchemaComponent, SchemaComponentProvider, SortableContext, SortableProvider } from '../../schema-component';
import { useFieldSchema } from '@formily/react'; import { useFieldSchema } from '@nocobase/schema';
import { Application, ApplicationContext } from '@nocobase/client'; import { Application, ApplicationContext } from '@nocobase/client';
describe('SchemaToolbar', () => { describe('SchemaToolbar', () => {

View File

@ -1,4 +1,4 @@
import { observer } from '@formily/reactive-react'; import { observer } from '@nocobase/schema';
import React, { FC, useCallback, useEffect } from 'react'; import React, { FC, useCallback, useEffect } from 'react';
import { ErrorBoundary } from 'react-error-boundary'; import { ErrorBoundary } from 'react-error-boundary';
import type { Application } from '../Application'; import type { Application } from '../Application';

View File

@ -1,4 +1,4 @@
import { useExpressionScope } from '@formily/react'; import { useExpressionScope } from '@nocobase/schema';
import { merge, omit } from 'lodash'; import { merge, omit } from 'lodash';
import React, { ComponentType, useMemo } from 'react'; import React, { ComponentType, useMemo } from 'react';
import { useDesignable } from '../../schema-component'; import { useDesignable } from '../../schema-component';

View File

@ -1,4 +1,4 @@
import { useForm } from '@formily/react'; import { useForm } from '@nocobase/schema';
import React, { FC, useCallback, useMemo } from 'react'; import React, { FC, useCallback, useMemo } from 'react';
import { useActionContext, SchemaComponent } from '../../../schema-component'; import { useActionContext, SchemaComponent } from '../../../schema-component';
import { useSchemaInitializerItem } from '../context'; import { useSchemaInitializerItem } from '../context';

View File

@ -1,4 +1,4 @@
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import classNames from 'classnames'; import classNames from 'classnames';
import React, { ReactNode, memo, useMemo } from 'react'; import React, { ReactNode, memo, useMemo } from 'react';
import { Icon } from '../../../icon'; import { Icon } from '../../../icon';

View File

@ -1,6 +1,6 @@
import Icon, { RightOutlined } from '@ant-design/icons'; import Icon, { RightOutlined } from '@ant-design/icons';
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { Menu, MenuProps, theme } from 'antd'; import { Menu, MenuProps, theme } from 'antd';
import React, { FC, ReactNode, useMemo } from 'react'; import React, { FC, ReactNode, useMemo } from 'react';
import { useCompile } from '../../../schema-component'; import { useCompile } from '../../../schema-component';

View File

@ -1,4 +1,4 @@
import { ISchema, observer } from '@formily/react'; import { ISchema, observer } from '@nocobase/schema';
import { ConfigProvider, Popover, theme } from 'antd'; import { ConfigProvider, Popover, theme } from 'antd';
import React, { ComponentType, useCallback, useMemo, useState } from 'react'; import React, { ComponentType, useCallback, useMemo, useState } from 'react';

View File

@ -1,4 +1,4 @@
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { ButtonProps, PopoverProps } from 'antd'; import { ButtonProps, PopoverProps } from 'antd';
import { ComponentType, ReactNode } from 'react'; import { ComponentType, ReactNode } from 'react';
import type { import type {

View File

@ -5,7 +5,7 @@ import { SchemaSettingsChildren } from './SchemaSettingsChildren';
import { SchemaSettingsIcon } from './SchemaSettingsIcon'; import { SchemaSettingsIcon } from './SchemaSettingsIcon';
import React from 'react'; import React from 'react';
import { useDesignable } from '../../../schema-component'; import { useDesignable } from '../../../schema-component';
import { useField, useFieldSchema } from '@formily/react'; import { useField, useFieldSchema } from '@nocobase/schema';
/** /**
* @internal * @internal

View File

@ -4,8 +4,8 @@ import { SchemaSettingOptions } from '../types';
import React from 'react'; import React from 'react';
import { SchemaSettingsWrapper } from '../components'; import { SchemaSettingsWrapper } from '../components';
import { SchemaSettingsProps } from '../../../schema-settings'; import { SchemaSettingsProps } from '../../../schema-settings';
import { Schema } from '@formily/json-schema'; import { Schema } from '@nocobase/schema';
import { GeneralField } from '@formily/core'; import { GeneralField } from '@nocobase/schema';
import { Designable } from '../../../schema-component'; import { Designable } from '../../../schema-component';
type UseSchemaSettingsRenderOptions<T = {}> = Omit<SchemaSettingOptions<T>, 'name' | 'items'> & type UseSchemaSettingsRenderOptions<T = {}> = Omit<SchemaSettingOptions<T>, 'name' | 'items'> &

View File

@ -1,5 +1,5 @@
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import { ISchema } from '@formily/json-schema'; import { ISchema } from '@nocobase/schema';
import { useComponent, useDesignable } from '../../../schema-component'; import { useComponent, useDesignable } from '../../../schema-component';
import { SchemaToolbar, SchemaToolbarProps } from '../../../schema-settings/GeneralSchemaDesigner'; import { SchemaToolbar, SchemaToolbarProps } from '../../../schema-settings/GeneralSchemaDesigner';

View File

@ -7,17 +7,18 @@ import * as dndKitSortable from '@dnd-kit/sortable';
import * as dndKitUtilities from '@dnd-kit/utilities'; import * as dndKitUtilities from '@dnd-kit/utilities';
import * as emotionCss from '@emotion/css'; import * as emotionCss from '@emotion/css';
import * as formilyAntdV5 from '@formily/antd-v5'; import * as formilyAntdV5 from '@formily/antd-v5';
import * as formilyCore from '@formily/core'; import * as formilyCore from '@nocobase/schema';
import * as formilyJsonSchema from '@formily/json-schema'; import * as formilyJsonSchema from '@nocobase/schema';
import * as formilyPath from '@formily/path'; import * as formilyPath from '@nocobase/schema';
import * as formilyReact from '@formily/react'; import * as formilyReact from '@nocobase/schema';
import * as formilyJsonReactive from '@formily/reactive'; import * as formilyJsonReactive from '@nocobase/schema';
import * as formilyReactiveReact from '@formily/reactive-react'; import * as formilyReactiveReact from '@nocobase/schema';
import * as formilyShared from '@formily/shared'; import * as formilyShared from '@nocobase/schema';
import * as formilyValidator from '@formily/validator'; import * as formilyValidator from '@nocobase/schema';
import * as nocobaseEvaluators from '@nocobase/evaluators/client'; import * as nocobaseEvaluators from '@nocobase/evaluators/client';
import * as nocobaseClientUtils from '@nocobase/utils/client'; import * as nocobaseClientUtils from '@nocobase/utils/client';
import * as nocobaseSDK from '@nocobase/sdk'; import * as nocobaseSDK from '@nocobase/sdk';
import * as nocobaseSchema from '@nocobase/schema';
import { dayjs } from '@nocobase/utils/client'; import { dayjs } from '@nocobase/utils/client';
import * as ahooks from 'ahooks'; import * as ahooks from 'ahooks';
import * as antd from 'antd'; import * as antd from 'antd';
@ -77,6 +78,7 @@ export function defineGlobalDeps(requirejs: RequireJS) {
requirejs.define('@nocobase/evaluators', () => nocobaseEvaluators); requirejs.define('@nocobase/evaluators', () => nocobaseEvaluators);
requirejs.define('@nocobase/evaluators/client', () => nocobaseEvaluators); requirejs.define('@nocobase/evaluators/client', () => nocobaseEvaluators);
requirejs.define('@nocobase/sdk', () => nocobaseSDK); requirejs.define('@nocobase/sdk', () => nocobaseSDK);
requirejs.define('@nocobase/schema', () => nocobaseSchema);
// dnd-kit 相关 // dnd-kit 相关
requirejs.define('@dnd-kit/accessibility', () => dndKitAccessibility); requirejs.define('@dnd-kit/accessibility', () => dndKitAccessibility);

View File

@ -1,6 +1,6 @@
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import { Field, GeneralField } from '@formily/core'; import { Field, GeneralField } from '@nocobase/schema';
import { RecursionField, useField, useFieldSchema } from '@formily/react'; import { RecursionField, useField, useFieldSchema } from '@nocobase/schema';
import { Col, Row } from 'antd'; import { Col, Row } from 'antd';
import merge from 'deepmerge'; import merge from 'deepmerge';
import template from 'lodash/template'; import template from 'lodash/template';

View File

@ -1,5 +1,5 @@
import { createForm } from '@formily/core'; import { createForm } from '@nocobase/schema';
import { useField } from '@formily/react'; import { useField } from '@nocobase/schema';
import { Spin } from 'antd'; import { Spin } from 'antd';
import _ from 'lodash'; import _ from 'lodash';
import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react'; import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';

View File

@ -1,5 +1,5 @@
import { createForm } from '@formily/core'; import { createForm } from '@nocobase/schema';
import { RecursionField, Schema, useField, useFieldSchema } from '@formily/react'; import { RecursionField, Schema, useField, useFieldSchema } from '@nocobase/schema';
import { Spin } from 'antd'; import { Spin } from 'antd';
import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react'; import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';
import { useCollection_deprecated } from '../collection-manager'; import { useCollection_deprecated } from '../collection-manager';

View File

@ -1,6 +1,6 @@
import { createForm, onFormValuesChange } from '@formily/core'; import { createForm, onFormValuesChange } from '@nocobase/schema';
import { useField } from '@formily/react'; import { useField } from '@nocobase/schema';
import { autorun } from '@formily/reactive'; import { autorun } from '@nocobase/schema';
import { forEach } from '@nocobase/utils/client'; import { forEach } from '@nocobase/utils/client';
import { Spin } from 'antd'; import { Spin } from 'antd';
import React, { createContext, useContext, useEffect, useMemo } from 'react'; import React, { createContext, useContext, useEffect, useMemo } from 'react';

View File

@ -1,5 +1,5 @@
import { createForm } from '@formily/core'; import { createForm } from '@nocobase/schema';
import { FormContext, useField, useFieldSchema } from '@formily/react'; import { FormContext, useField, useFieldSchema } from '@nocobase/schema';
import React, { createContext, useContext, useMemo, useState } from 'react'; import React, { createContext, useContext, useMemo, useState } from 'react';
import { useCollectionManager_deprecated } from '../collection-manager'; import { useCollectionManager_deprecated } from '../collection-manager';
import { FixedBlockWrapper, SchemaComponentOptions } from '../schema-component'; import { FixedBlockWrapper, SchemaComponentOptions } from '../schema-component';

View File

@ -1,5 +1,5 @@
import { ArrayField, Field } from '@formily/core'; import { ArrayField, Field } from '@nocobase/schema';
import { useField, useFieldSchema } from '@formily/react'; import { useField, useFieldSchema } from '@nocobase/schema';
import React, { createContext, useContext, useEffect } from 'react'; import React, { createContext, useContext, useEffect } from 'react';
import { APIClient } from '../api-client'; import { APIClient } from '../api-client';
import { BlockProvider, useBlockRequestContext } from './BlockProvider'; import { BlockProvider, useBlockRequestContext } from './BlockProvider';

View File

@ -1,5 +1,5 @@
import { ArrayField } from '@formily/core'; import { ArrayField } from '@nocobase/schema';
import { Schema, useField, useFieldSchema } from '@formily/react'; import { Schema, useField, useFieldSchema } from '@nocobase/schema';
import _ from 'lodash'; import _ from 'lodash';
import uniq from 'lodash/uniq'; import uniq from 'lodash/uniq';
import React, { createContext, useContext, useEffect, useState } from 'react'; import React, { createContext, useContext, useEffect, useState } from 'react';

View File

@ -1,6 +1,6 @@
import { Field, Form } from '@formily/core'; import { Field, Form } from '@nocobase/schema';
import { SchemaExpressionScopeContext, useField, useFieldSchema, useForm } from '@formily/react'; import { SchemaExpressionScopeContext, useField, useFieldSchema, useForm } from '@nocobase/schema';
import { untracked } from '@formily/reactive'; import { untracked } from '@nocobase/schema';
import { isURL, parse } from '@nocobase/utils/client'; import { isURL, parse } from '@nocobase/utils/client';
import { App, message } from 'antd'; import { App, message } from 'antd';
import _ from 'lodash'; import _ from 'lodash';

View File

@ -1,4 +1,4 @@
import { reaction } from '@formily/reactive'; import { reaction } from '@nocobase/schema';
import { flatten, getValuesByPath } from '@nocobase/utils/client'; import { flatten, getValuesByPath } from '@nocobase/utils/client';
import _ from 'lodash'; import _ from 'lodash';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';

View File

@ -1,5 +1,5 @@
import { ArrayField } from '@formily/core'; import { ArrayField } from '@nocobase/schema';
import { useField } from '@formily/react'; import { useField } from '@nocobase/schema';
import { error } from '@nocobase/utils/client'; import { error } from '@nocobase/utils/client';
import React from 'react'; import React from 'react';
import { SchemaComponentOptions } from '..'; import { SchemaComponentOptions } from '..';

View File

@ -1,7 +1,7 @@
import { DownOutlined, PlusOutlined } from '@ant-design/icons'; import { DownOutlined, PlusOutlined } from '@ant-design/icons';
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { ISchema, useField, useForm } from '@formily/react'; import { ISchema, useField, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { Button, Dropdown, MenuProps } from 'antd'; import { Button, Dropdown, MenuProps } from 'antd';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';

View File

@ -1,7 +1,7 @@
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { useField, useForm } from '@formily/react'; import { useField, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { Button, Dropdown, MenuProps } from 'antd'; import { Button, Dropdown, MenuProps } from 'antd';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import React, { useCallback, useMemo, useState } from 'react'; import React, { useCallback, useMemo, useState } from 'react';

View File

@ -1,7 +1,7 @@
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { ISchema } from '@formily/react'; import { ISchema } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { Button, Dropdown, MenuProps } from 'antd'; import { Button, Dropdown, MenuProps } from 'antd';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';

View File

@ -1,6 +1,6 @@
import { DeleteOutlined, ExclamationCircleFilled } from '@ant-design/icons'; import { DeleteOutlined, ExclamationCircleFilled } from '@ant-design/icons';
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import { useForm } from '@formily/react'; import { useForm } from '@nocobase/schema';
import { Button, message } from 'antd'; import { Button, message } from 'antd';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';

View File

@ -1,6 +1,6 @@
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { ISchema, useForm } from '@formily/react'; import { ISchema, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import cloneDeep from 'lodash/cloneDeep'; import cloneDeep from 'lodash/cloneDeep';
import omit from 'lodash/omit'; import omit from 'lodash/omit';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';

View File

@ -1,6 +1,6 @@
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { ISchema, useForm } from '@formily/react'; import { ISchema, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import cloneDeep from 'lodash/cloneDeep'; import cloneDeep from 'lodash/cloneDeep';
import omit from 'lodash/omit'; import omit from 'lodash/omit';
import set from 'lodash/set'; import set from 'lodash/set';

View File

@ -1,6 +1,6 @@
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { ISchema, useForm } from '@formily/react'; import { ISchema, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import cloneDeep from 'lodash/cloneDeep'; import cloneDeep from 'lodash/cloneDeep';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';

View File

@ -1,6 +1,6 @@
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { ISchema, useForm } from '@formily/react'; import { ISchema, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { omit, set } from 'lodash'; import { omit, set } from 'lodash';
import cloneDeep from 'lodash/cloneDeep'; import cloneDeep from 'lodash/cloneDeep';
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';

View File

@ -1,7 +1,7 @@
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { useField, useForm } from '@formily/react'; import { useField, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { Button } from 'antd'; import { Button } from 'antd';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import React, { useState } from 'react'; import React, { useState } from 'react';

View File

@ -1,8 +1,8 @@
import { SyncOutlined } from '@ant-design/icons'; import { SyncOutlined } from '@ant-design/icons';
import { FormLayout } from '@formily/antd-v5'; import { FormLayout } from '@formily/antd-v5';
import { createForm } from '@formily/core'; import { createForm } from '@nocobase/schema';
import { useField, useForm } from '@formily/react'; import { useField, useForm } from '@nocobase/schema';
import { uid } from '@formily/shared'; import { uid } from '@nocobase/schema';
import { Button } from 'antd'; import { Button } from 'antd';
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';

Some files were not shown because too many files have changed in this diff Show More