diff --git a/packages/core/client/src/acl/ACLShortcut.tsx b/packages/core/client/src/acl/ACLShortcut.tsx index 05c02e9eb..afd31b5c5 100644 --- a/packages/core/client/src/acl/ACLShortcut.tsx +++ b/packages/core/client/src/acl/ACLShortcut.tsx @@ -6,7 +6,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; import { PluginManager } from '../plugin-manager'; -import { ActionContext, SchemaComponent } from '../schema-component'; +import { ActionContextProvider, SchemaComponent } from '../schema-component'; import * as components from './Configuration'; const schema: ISchema = { @@ -61,7 +61,7 @@ export const ACLShortcut2 = () => { const [visible, setVisible] = useState(false); const { t } = useTranslation(); return ( - + } title={t('Roles & Permissions')} @@ -70,6 +70,6 @@ export const ACLShortcut2 = () => { }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx b/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx index 2adfa65ae..b7aafd3b6 100644 --- a/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx +++ b/packages/core/client/src/collection-manager/CollectionManagerShortcut.tsx @@ -6,7 +6,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; import { PluginManager } from '../plugin-manager'; -import { ActionContext, SchemaComponent } from '../schema-component'; +import { ActionContextProvider, SchemaComponent } from '../schema-component'; import { AddCollectionField, AddFieldAction, @@ -109,7 +109,7 @@ export const CollectionManagerShortcut2 = () => { const [visible, setVisible] = useState(false); const { t } = useTranslation(); return ( - + } title={t('Collections & Fields')} @@ -132,6 +132,6 @@ export const CollectionManagerShortcut2 = () => { EditCategoryAction, }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx b/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx index 7ebab6601..1f80a6688 100644 --- a/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/AddCategoryAction.tsx @@ -4,7 +4,7 @@ import { cloneDeep } from 'lodash'; import React, { useContext, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useAPIClient } from '../../api-client'; -import { ActionContext, SchemaComponent, useActionContext } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext } from '../../schema-component'; import { useCancelAction } from '../action-hooks'; import { CollectionCategroriesContext } from '../context'; import * as components from './components'; @@ -40,7 +40,7 @@ export const AddCategoryAction = (props) => { const [visible, setVisible] = useState(false); const { t } = useTranslation(); return ( - +
setVisible(true)} title={t('Add category')}> {children || }
@@ -55,6 +55,6 @@ export const AddCategoryAction = (props) => { ...scope, }} /> -
+ ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/AddCollectionAction.tsx b/packages/core/client/src/collection-manager/Configuration/AddCollectionAction.tsx index 0c93937f8..00924a411 100644 --- a/packages/core/client/src/collection-manager/Configuration/AddCollectionAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/AddCollectionAction.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useRequest } from '../../api-client'; import { RecordProvider, useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useResourceActionContext, useResourceContext } from '../ResourceActionProvider'; import { useCancelAction } from '../action-hooks'; import { useCollectionManager } from '../hooks'; @@ -261,7 +261,7 @@ export const AddCollectionAction = (props) => { } = useResourceActionContext(); return ( - + { ...scope, }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx b/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx index a1701141b..d44d29df7 100644 --- a/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/AddFieldAction.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useRequest } from '../../api-client'; import { RecordProvider, useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useResourceActionContext, useResourceContext } from '../ResourceActionProvider'; import { useCancelAction } from '../action-hooks'; import { useCollectionManager } from '../hooks'; @@ -222,7 +222,7 @@ export const AddFieldAction = (props) => { return ( record.template !== 'view' && ( - + { ...scope, }} /> - + ) ); diff --git a/packages/core/client/src/collection-manager/Configuration/AddSubFieldAction.tsx b/packages/core/client/src/collection-manager/Configuration/AddSubFieldAction.tsx index 909db409a..d5dc14f52 100644 --- a/packages/core/client/src/collection-manager/Configuration/AddSubFieldAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/AddSubFieldAction.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useRequest } from '../../api-client'; import { RecordProvider } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useCollectionManager } from '../hooks'; import { useOptions } from '../hooks/useOptions'; import { IField } from '../interfaces/types'; @@ -112,7 +112,7 @@ export const AddSubFieldAction = () => { }; }); return ( - + { scope={{ createOnly: true, useCreateSubField }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/EditCategoryAction.tsx b/packages/core/client/src/collection-manager/Configuration/EditCategoryAction.tsx index 39ab96f04..041ae76f1 100644 --- a/packages/core/client/src/collection-manager/Configuration/EditCategoryAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/EditCategoryAction.tsx @@ -3,7 +3,7 @@ import { cloneDeep } from 'lodash'; import React, { useContext, useEffect, useState } from 'react'; import { useAPIClient, useRequest } from '../../api-client'; import { RecordProvider, useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useCancelAction } from '../action-hooks'; import { CollectionCategroriesContext } from '../context'; import { useResourceActionContext } from '../ResourceActionProvider'; @@ -61,7 +61,7 @@ export const EditCategoryAction = (props) => { const compile = useCompile(); return ( - + <>{children || setVisible(true)}>{compile('{{ t("Edit category") }}')}} { ...scope, }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/EditCollectionAction.tsx b/packages/core/client/src/collection-manager/Configuration/EditCollectionAction.tsx index 52e42f6ec..12108736d 100644 --- a/packages/core/client/src/collection-manager/Configuration/EditCollectionAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/EditCollectionAction.tsx @@ -7,7 +7,7 @@ import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useRequest } from '../../api-client'; import { RecordProvider, useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useResourceActionContext, useResourceContext } from '../ResourceActionProvider'; import { useCancelAction } from '../action-hooks'; import { useCollectionManager } from '../hooks'; @@ -128,7 +128,7 @@ export const EditCollectionAction = (props) => { return ( - + { const templateConf = getTemplate(record.template); @@ -158,7 +158,7 @@ export const EditCollectionAction = (props) => { ...scope, }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/EditFieldAction.tsx b/packages/core/client/src/collection-manager/Configuration/EditFieldAction.tsx index 8767a97a2..b9ae3ba19 100644 --- a/packages/core/client/src/collection-manager/Configuration/EditFieldAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/EditFieldAction.tsx @@ -7,7 +7,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useAPIClient, useRequest } from '../../api-client'; import { RecordProvider, useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useResourceActionContext, useResourceContext } from '../ResourceActionProvider'; import { useCancelAction, useUpdateAction } from '../action-hooks'; import { useCollectionManager } from '../hooks'; @@ -145,7 +145,7 @@ export const EditFieldAction = (props) => { const [data, setData] = useState({}); return ( - + { const { data } = await api.resource('collections.fields', record.collectionName).get({ @@ -187,7 +187,7 @@ export const EditFieldAction = (props) => { ...scope, }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx b/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx index 9baec4257..cddd4c7f8 100644 --- a/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/EditSubFieldAction.tsx @@ -6,7 +6,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useAPIClient, useRequest } from '../../api-client'; import { useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent } from '../../schema-component'; import { useUpdateAction } from '../action-hooks'; import { useCollectionManager } from '../hooks'; import { IField } from '../interfaces/types'; @@ -98,7 +98,7 @@ export const EditSubFieldAction = (props) => { const api = useAPIClient(); const { t } = useTranslation(); return ( - + { // const { data } = await api.resource('collections.fields', record.collectionName).get({ @@ -120,6 +120,6 @@ export const EditSubFieldAction = (props) => { components={{ ...components, ArrayTable }} scope={{ useUpdateCollectionField }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/OverridingCollectionField.tsx b/packages/core/client/src/collection-manager/Configuration/OverridingCollectionField.tsx index 73088f33a..f210c154f 100644 --- a/packages/core/client/src/collection-manager/Configuration/OverridingCollectionField.tsx +++ b/packages/core/client/src/collection-manager/Configuration/OverridingCollectionField.tsx @@ -7,7 +7,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useAPIClient, useRequest } from '../../api-client'; import { RecordProvider, useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useResourceActionContext, useResourceContext } from '../ResourceActionProvider'; import { useCancelAction } from '../action-hooks'; import { useCollectionManager } from '../hooks'; @@ -148,7 +148,7 @@ export const OverridingFieldAction = (props) => { const disabled = getIsOverriding(currentFields, record); return ( - + { ...scope, }} /> - + ); }; diff --git a/packages/core/client/src/collection-manager/Configuration/SyncFieldsAction.tsx b/packages/core/client/src/collection-manager/Configuration/SyncFieldsAction.tsx index 1f2bb4426..74f4ade3c 100644 --- a/packages/core/client/src/collection-manager/Configuration/SyncFieldsAction.tsx +++ b/packages/core/client/src/collection-manager/Configuration/SyncFieldsAction.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useRequest } from '../../api-client'; import { RecordProvider, useRecord } from '../../record-provider'; -import { ActionContext, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext, useCompile } from '../../schema-component'; import { useCancelAction } from '../action-hooks'; import { useCollectionManager } from '../hooks'; import { IField } from '../interfaces/types'; @@ -167,7 +167,7 @@ export const SyncFieldsActionCom = (props) => { return ( record.template === 'view' && ( - + {children || ( - + ); }); diff --git a/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx b/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx index 5a4c6abb1..983f5ae81 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx @@ -8,7 +8,7 @@ import { useCurrentAppInfo } from '../../../../../appInfo'; import { useBlockRequestContext, useGanttBlockContext, useTableBlockContext } from '../../../../../block-provider'; import { RecordProvider } from '../../../../../record-provider'; import { useDesignable } from '../../../../../schema-component'; -import { ActionContext } from '../../../action'; +import { ActionContextProvider } from '../../../action'; import { convertToBarTasks } from '../../helpers/bar-helper'; import { ganttDateRange, seedDates } from '../../helpers/date-helper'; import { removeHiddenTasks, sortTasks } from '../../helpers/other-helper'; @@ -44,11 +44,11 @@ const GanttRecordViewer = (props) => { return ( eventSchema && ( - + - + ) ); diff --git a/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.tsx b/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.tsx index 1825ee360..35d2f18cd 100644 --- a/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.tsx +++ b/packages/core/client/src/schema-component/antd/kanban/Kanban.Card.tsx @@ -4,7 +4,7 @@ import { observer, RecursionField, useFieldSchema } from '@formily/react'; import { Card } from 'antd'; import React, { useContext, useState } from 'react'; import cls from 'classnames'; -import { ActionContext } from '..'; +import { ActionContextProvider } from '..'; import { DndContext } from '../..'; import { RecordProvider } from '../../../record-provider'; import { SchemaComponentOptions } from '../../core/SchemaComponentOptions'; @@ -86,7 +86,7 @@ export const KanbanCard: any = observer( {cardViewerSchema && ( - - + )} ); diff --git a/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx b/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx index 481ee9f61..490fe0fad 100644 --- a/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx +++ b/packages/core/client/src/schema-initializer/components/CreateRecordAction.tsx @@ -7,7 +7,7 @@ import { useDesignable } from '../../'; import { useACLRolesCheck, useRecordPkValue } from '../../acl/ACLProvider'; import { CollectionProvider, useCollection, useCollectionManager } from '../../collection-manager'; import { useRecord } from '../../record-provider'; -import { ActionContext, useActionContext, useCompile } from '../../schema-component'; +import { ActionContextProvider, useActionContext, useCompile } from '../../schema-component'; import { linkageAction } from '../../schema-component/antd/action/utils'; export const actionDesignerCss = css` @@ -102,7 +102,7 @@ export const CreateRecordAction = observer( }, [linkageRules, values]); return (
- + { @@ -113,7 +113,7 @@ export const CreateRecordAction = observer( - +
); }, diff --git a/packages/core/client/src/schema-initializer/components/DuplicateAction.tsx b/packages/core/client/src/schema-initializer/components/DuplicateAction.tsx index 23666c8df..92933756e 100644 --- a/packages/core/client/src/schema-initializer/components/DuplicateAction.tsx +++ b/packages/core/client/src/schema-initializer/components/DuplicateAction.tsx @@ -1,6 +1,6 @@ import React, { createContext, useContext, useState } from 'react'; import { observer, RecursionField, useField, useFieldSchema } from '@formily/react'; -import { RecordProvider, ActionContext, useActionContext, useRecord, useCollection } from '../../'; +import { RecordProvider, ActionContextProvider, useActionContext, useRecord, useCollection } from '../../'; import { useTranslation } from 'react-i18next'; import { css, cx } from '@emotion/css'; import { useAPIClient, useBlockRequestContext, useDesignable } from '../../'; @@ -111,9 +111,9 @@ export const DuplicateAction = observer((props: any) => { {loading ? t('Duplicating') : children || t('Duplicate')} )} - + - + diff --git a/packages/core/client/src/schema-settings/SchemaSettings.tsx b/packages/core/client/src/schema-settings/SchemaSettings.tsx index 22f922389..55ea1b903 100644 --- a/packages/core/client/src/schema-settings/SchemaSettings.tsx +++ b/packages/core/client/src/schema-settings/SchemaSettings.tsx @@ -25,7 +25,7 @@ import { createPortal } from 'react-dom'; import { useTranslation } from 'react-i18next'; import { APIClientProvider, - ActionContext, + ActionContextProvider, CollectionFieldOptions, CollectionManagerContext, Designable, @@ -664,7 +664,7 @@ SchemaSettings.PopupItem = function PopupItem(props) { const [visible, setVisible] = useState(false); const ctx = useContext(SchemaSettingsContext); return ( - + { @@ -681,7 +681,7 @@ SchemaSettings.PopupItem = function PopupItem(props) { ...schema, }} /> - + ); }; diff --git a/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx b/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx index 0efbde53e..6c0540819 100644 --- a/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx +++ b/packages/core/client/src/system-settings/SystemSettingsShortcut.tsx @@ -9,7 +9,7 @@ import { useHistory } from 'react-router-dom'; import { useSystemSettings } from '.'; import { i18n, PluginManager, useAPIClient, useRequest } from '..'; import locale from '../locale'; -import { ActionContext, SchemaComponent, useActionContext } from '../schema-component'; +import { ActionContextProvider, SchemaComponent, useActionContext } from '../schema-component'; const langs = Object.keys(locale).map((lang) => { return { @@ -300,7 +300,7 @@ export const SystemSettingsShortcut2 = () => { const [visible, setVisible] = useState(false); const { t } = useTranslation(); return ( - + { @@ -313,6 +313,6 @@ export const SystemSettingsShortcut2 = () => { scope={{ useSaveSystemSettingsValues, useSystemSettingsValues, useCloseAction }} schema={schema} /> - + ); }; diff --git a/packages/plugins/auth/src/client/settings/Authenticator.tsx b/packages/plugins/auth/src/client/settings/Authenticator.tsx index ffb75fda1..6d076f6fa 100644 --- a/packages/plugins/auth/src/client/settings/Authenticator.tsx +++ b/packages/plugins/auth/src/client/settings/Authenticator.tsx @@ -1,5 +1,5 @@ import { - ActionContext, + ActionContextProvider, SchemaComponent, useAPIClient, useActionContext, @@ -38,7 +38,7 @@ const AddNew = () => { })); return ( - + - + ); }; @@ -146,7 +146,7 @@ export const EditQuery = () => { const form = useMemo(() => createForm(), []); const schema = getSchema(record, { form, isNewRecord: false }); return ( - + { form.setValues(record); @@ -156,6 +156,6 @@ export const EditQuery = () => { {lang('Edit')} - + ); }; diff --git a/packages/plugins/file-manager/src/client/FileStorageShortcut.tsx b/packages/plugins/file-manager/src/client/FileStorageShortcut.tsx index 456ecdb1d..e2c07ee4b 100644 --- a/packages/plugins/file-manager/src/client/FileStorageShortcut.tsx +++ b/packages/plugins/file-manager/src/client/FileStorageShortcut.tsx @@ -1,6 +1,6 @@ import { FileOutlined } from '@ant-design/icons'; import { uid } from '@formily/shared'; -import { ActionContext, PluginManager, SchemaComponent } from '@nocobase/client'; +import { ActionContextProvider, PluginManager, SchemaComponent } from '@nocobase/client'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { storageSchema } from './schemas/storage'; @@ -24,7 +24,7 @@ export const FileStorageShortcut = () => { const [visible, setVisible] = useState(false); const { t } = useTranslation(); return ( - + { @@ -34,6 +34,6 @@ export const FileStorageShortcut = () => { title={t('File manager')} /> - + ); }; diff --git a/packages/plugins/map/src/client/block/MapBlock.tsx b/packages/plugins/map/src/client/block/MapBlock.tsx index 40f9192aa..ddc6ff62f 100644 --- a/packages/plugins/map/src/client/block/MapBlock.tsx +++ b/packages/plugins/map/src/client/block/MapBlock.tsx @@ -1,7 +1,14 @@ import { CheckOutlined, EnvironmentOutlined, ExpandOutlined } from '@ant-design/icons'; import { css } from '@emotion/css'; import { RecursionField, Schema, useFieldSchema } from '@formily/react'; -import { ActionContext, RecordProvider, useCollection, useCompile, useFilterAPI, useProps } from '@nocobase/client'; +import { + ActionContextProvider, + RecordProvider, + useCollection, + useCompile, + useFilterAPI, + useProps, +} from '@nocobase/client'; import { useMemoizedFn } from 'ahooks'; import { Button, Space } from 'antd'; import React, { useEffect, useMemo, useRef, useState } from 'react'; @@ -272,11 +279,11 @@ const MapBlockDrawer = (props) => { return ( schema && ( - + - + ) ); }; diff --git a/packages/plugins/workflow/src/client/ExecutionCanvas.tsx b/packages/plugins/workflow/src/client/ExecutionCanvas.tsx index 03ebe779b..c4036e960 100644 --- a/packages/plugins/workflow/src/client/ExecutionCanvas.tsx +++ b/packages/plugins/workflow/src/client/ExecutionCanvas.tsx @@ -4,7 +4,7 @@ import { css } from '@emotion/css'; import { Link } from 'react-router-dom'; import { - ActionContext, + ActionContextProvider, SchemaComponent, useCompile, useDocumentTitle, @@ -47,7 +47,7 @@ function JobModal() { const instruction = instructions.get(node.type); return ( - + - + ); } @@ -141,7 +141,7 @@ export function ExecutionCanvas() { nodes, execution, viewJob, - setViewJob + setViewJob, }} >
diff --git a/packages/plugins/workflow/src/client/WorkflowCanvas.tsx b/packages/plugins/workflow/src/client/WorkflowCanvas.tsx index a7ba981ea..e1ad74ce5 100644 --- a/packages/plugins/workflow/src/client/WorkflowCanvas.tsx +++ b/packages/plugins/workflow/src/client/WorkflowCanvas.tsx @@ -7,7 +7,7 @@ import classnames from 'classnames'; import { useTranslation } from 'react-i18next'; import { - ActionContext, + ActionContextProvider, ResourceActionProvider, SchemaComponent, useDocumentTitle, @@ -202,7 +202,7 @@ export function WorkflowCanvas() { >
diff --git a/packages/plugins/workflow/src/client/components/OpenDrawer.tsx b/packages/plugins/workflow/src/client/components/OpenDrawer.tsx index bae15b73d..7b2506dff 100644 --- a/packages/plugins/workflow/src/client/components/OpenDrawer.tsx +++ b/packages/plugins/workflow/src/client/components/OpenDrawer.tsx @@ -1,13 +1,13 @@ import React, { useState } from 'react'; import { useFieldSchema } from '@formily/react'; -import { ActionContext, SchemaComponent } from '@nocobase/client'; +import { ActionContextProvider, SchemaComponent } from '@nocobase/client'; export default function ({ component = 'div', children, ...props }) { const [visible, setVisible] = useState(false); const fieldSchema = useFieldSchema(); return ( - + {React.createElement( component, { @@ -19,6 +19,6 @@ export default function ({ component = 'div', children, ...props }) { children, )} - + ); } diff --git a/packages/plugins/workflow/src/client/nodes/index.tsx b/packages/plugins/workflow/src/client/nodes/index.tsx index 3e35779df..2e0e0b747 100644 --- a/packages/plugins/workflow/src/client/nodes/index.tsx +++ b/packages/plugins/workflow/src/client/nodes/index.tsx @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'; import { Registry, parse, str2moment } from '@nocobase/utils/client'; import { - ActionContext, + ActionContextProvider, SchemaComponent, SchemaInitializerItemOptions, useActionContext, @@ -371,7 +371,7 @@ export function NodeDefaultView(props) { - + - + {children} diff --git a/packages/plugins/workflow/src/client/nodes/manual/SchemaConfig.tsx b/packages/plugins/workflow/src/client/nodes/manual/SchemaConfig.tsx index 9cb3b4254..f2d84e511 100644 --- a/packages/plugins/workflow/src/client/nodes/manual/SchemaConfig.tsx +++ b/packages/plugins/workflow/src/client/nodes/manual/SchemaConfig.tsx @@ -11,7 +11,7 @@ import { InitializerWithSwitch, SchemaInitializerProvider, gridRowColWrap, - ActionContext, + ActionContextProvider, GeneralSchemaDesigner, SchemaSettings, useCompile, @@ -360,7 +360,7 @@ export function SchemaConfigButton(props) {
setVisible(true)}> {workflow.executed ? lang('View user interface') : lang('Configure user interface')}
- {props.children} + {props.children} ); } diff --git a/packages/plugins/workflow/src/client/nodes/manual/forms/custom.tsx b/packages/plugins/workflow/src/client/nodes/manual/forms/custom.tsx index 4a882f844..f3f60785c 100644 --- a/packages/plugins/workflow/src/client/nodes/manual/forms/custom.tsx +++ b/packages/plugins/workflow/src/client/nodes/manual/forms/custom.tsx @@ -6,7 +6,7 @@ import { useForm } from '@formily/react'; import { ArrayTable } from '@formily/antd'; import { - ActionContext, + ActionContextProvider, CollectionContext, CollectionProvider, gridRowColWrap, @@ -206,7 +206,7 @@ function AddCustomFormField(props) { component={component} title="{{t('Configure fields')}}" /> - + {interfaceOptions ? ( ) : null} - + ); } diff --git a/packages/plugins/workflow/src/client/triggers/index.tsx b/packages/plugins/workflow/src/client/triggers/index.tsx index 80c1bafba..1a2caf618 100644 --- a/packages/plugins/workflow/src/client/triggers/index.tsx +++ b/packages/plugins/workflow/src/client/triggers/index.tsx @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'; import { InfoOutlined } from '@ant-design/icons'; import { - ActionContext, + ActionContextProvider, SchemaComponent, SchemaInitializerItemOptions, useActionContext, @@ -199,7 +199,7 @@ export const TriggerConfig = () => { /> - + { scope={scope} components={components} /> - + ); };