chore: add API comments (#3919)

* chore: add API comments

* refactor: rename
This commit is contained in:
Zeke Zhang 2024-04-03 23:19:54 +08:00 committed by GitHub
parent 0a64855bfe
commit 2f40bfab2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
53 changed files with 173 additions and 33 deletions

View File

@ -28,7 +28,7 @@ import {
import { DataBlockCollector } from '../filter-provider/FilterProvider';
import { RecordProvider, useRecordIndex } from '../record-provider';
import { useAssociationNames } from './hooks';
import { useDataBlockParentRecord } from './hooks/useDataBlockSourceId';
import { useDataBlockParentRecord } from './hooks/useDataBlockParentRecord';
/**
* @deprecated
@ -53,11 +53,21 @@ export const BlockRequestContext_deprecated = createContext<{
}>({});
BlockRequestContext_deprecated.displayName = 'BlockRequestContext_deprecated';
/**
* @deprecated
* use `useDataBlockResource` instead
* @returns
*/
export const useBlockResource = () => {
const resource = useDataBlockResource();
return useContext(BlockResourceContext) || resource;
};
/**
* @internal
* @param props
* @returns
*/
export const MaybeCollectionProvider = (props) => {
const { collection } = props;
return collection ? (
@ -71,6 +81,7 @@ export const MaybeCollectionProvider = (props) => {
/**
* @deprecated
* use `DataBlockRequestProvider` instead
* @param props
* @returns
*/
@ -115,11 +126,17 @@ export const BlockRequestProvider_deprecated = (props) => {
/**
* @deprecated
* use `useDataBlockRequest` instead
*/
export const useBlockRequestContext = () => {
return useContext(BlockRequestContext_deprecated);
};
/**
* @internal
* @param props
* @returns
*/
export const RenderChildrenWithAssociationFilter: React.FC<any> = (props) => {
const fieldSchema = useFieldSchema();
const { findComponent } = useDesignable();
@ -176,12 +193,19 @@ export const RenderChildrenWithAssociationFilter: React.FC<any> = (props) => {
return props.children;
};
/**
* @internal
*/
const BlockContext = createContext<{
/** 用以区分区块的标识 */
name: string;
}>(null);
BlockContext.displayName = 'BlockContext';
/**
* @internal
* @returns
*/
export const useBlockContext = () => {
return useContext(BlockContext);
};
@ -203,7 +227,8 @@ const useCompatDataBlockParentRecord = (props) => {
};
/**
* @deprecated use `DataBlockProvider` instead
* @deprecated
* use `DataBlockProvider` instead
*/
export const BlockProvider = (props: {
name: string;
@ -248,6 +273,11 @@ export const BlockProvider = (props: {
);
};
/**
* @deprecated
* use `useDataBlockProps` instead
* @returns
*/
export const useBlockAssociationContext = () => {
const { association } = useDataBlockProps();
return useContext(BlockAssociationContext) || association;
@ -276,8 +306,6 @@ export const useFilterByTk = () => {
/**
* @deprecated
* 使 useSourceIdFromParentRecord
* @returns
*/
export const useSourceIdFromRecord = () => {
const record = useRecord();
@ -289,6 +317,10 @@ export const useSourceIdFromRecord = () => {
}
};
/**
* @deprecated
* @returns
*/
export const useSourceIdFromParentRecord = () => {
const cm = useCollectionManager();
const parentRecordData = useCollectionParentRecordData();
@ -303,6 +335,10 @@ export const useSourceIdFromParentRecord = () => {
}
};
/**
* @internal
* @returns
*/
export const useParamsFromRecord = () => {
const filterByTk = useFilterByTk();
const record = useRecord();

View File

@ -3,13 +3,16 @@ import { useField } from '@formily/react';
import { Spin } from 'antd';
import _ from 'lodash';
import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
import { useCollectionParentRecord } from '../data-source/collection-record/CollectionRecordProvider';
import { RecordProvider } from '../record-provider';
import { BlockProvider, useBlockRequestContext } from './BlockProvider';
import { useParsedFilter } from './hooks';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
import { TemplateBlockProvider } from './TemplateBlockProvider';
import { useParsedFilter } from './hooks';
/**
* @internal
*/
export const DetailsBlockContext = createContext<any>({});
DetailsBlockContext.displayName = 'DetailsBlockContext';
@ -74,7 +77,7 @@ export const DetailsBlockProvider = withDynamicSchemaProps((props) => {
});
/**
* @deprecated
* @internal
*/
export const useDetailsBlockContext = () => {
return useContext(DetailsBlockContext);
@ -82,7 +85,7 @@ export const useDetailsBlockContext = () => {
/**
* @deprecated
* useDetailsWithPaginationProps useDetailsProps
* use `useDetailsWithPaginationProps` or `useDetailsProps` instead
* @returns
*/
export const useDetailsBlockProps = () => {

View File

@ -2,6 +2,7 @@ import { createForm } from '@formily/core';
import { RecursionField, Schema, useField, useFieldSchema } from '@formily/react';
import { Spin } from 'antd';
import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
import { useCollection_deprecated } from '../collection-manager';
import { CollectionRecord, useCollectionParentRecordData, useCollectionRecord } from '../data-source';
import { RecordProvider, useRecord } from '../record-provider';
@ -10,7 +11,6 @@ import { Templates as DataTemplateSelect } from '../schema-component/antd/form-v
import { BlockProvider, useBlockRequestContext } from './BlockProvider';
import { TemplateBlockProvider } from './TemplateBlockProvider';
import { FormActiveFieldsProvider } from './hooks/useFormActiveFields';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
export const FormBlockContext = createContext<{
form?: any;
@ -76,6 +76,7 @@ const InternalFormBlockProvider = (props) => {
};
/**
* @internal
* update create
* @returns
*/
@ -128,10 +129,17 @@ export const FormBlockProvider = withDynamicSchemaProps((props) => {
);
});
/**
* @internal
* @returns
*/
export const useFormBlockContext = () => {
return useContext(FormBlockContext);
};
/**
* @internal
*/
export const useFormBlockProps = () => {
const ctx = useFormBlockContext();
const record = useRecord();
@ -169,6 +177,9 @@ const RenderChildrenWithDataTemplates = ({ form }) => {
);
};
/**
* @internal
*/
export const findFormBlock = (schema: Schema) => {
while (schema) {
if (schema['x-decorator'] === 'FormBlockProvider') {

View File

@ -9,6 +9,9 @@ import { RecordProvider } from '../record-provider';
import { BlockProvider, useBlockRequestContext } from './BlockProvider';
import { useFormBlockContext } from './FormBlockProvider';
/**
* @internal
*/
export const FormFieldContext = createContext<any>({});
FormFieldContext.displayName = 'FormFieldContext';
@ -75,9 +78,15 @@ const InternalFormFieldProvider = (props) => {
);
};
/**
* @internal
*/
export const WithoutFormFieldResource = createContext(null);
WithoutFormFieldResource.displayName = 'WithoutFormFieldResource';
/**
* @internal
*/
export const FormFieldProvider = (props) => {
return (
<WithoutFormFieldResource.Provider value={false}>
@ -88,10 +97,16 @@ export const FormFieldProvider = (props) => {
);
};
/**
* @internal
*/
export const useFormFieldContext = () => {
return useContext(FormFieldContext);
};
/**
* @internal
*/
export const useFormFieldProps = () => {
const ctx = useFormFieldContext();
useEffect(() => {

View File

@ -1,15 +1,21 @@
import { createForm } from '@formily/core';
import { FormContext, useField, useFieldSchema } from '@formily/react';
import React, { createContext, useCallback, useContext, useMemo, useState } from 'react';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
import { useCollectionManager_deprecated } from '../collection-manager';
import { useTableBlockParams } from '../modules/blocks/data-blocks/table';
import { FixedBlockWrapper, SchemaComponentOptions } from '../schema-component';
import { BlockProvider, RenderChildrenWithAssociationFilter, useBlockRequestContext } from './BlockProvider';
import { useTableBlockParams } from '../modules/blocks/data-blocks/table';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
/**
* @internal
*/
export const TableBlockContext = createContext<any>({});
TableBlockContext.displayName = 'TableBlockContext';
/**
* @internal
*/
export function getIdsWithChildren(nodes) {
const ids = [];
if (nodes) {
@ -79,6 +85,7 @@ const InternalTableBlockProvider = (props: Props) => {
};
/**
* @internal
* schema
* @param props
* @returns
@ -138,6 +145,9 @@ export const TableBlockProvider = withDynamicSchemaProps((props) => {
);
});
/**
* @internal
*/
export const useTableBlockContext = () => {
return useContext(TableBlockContext);
};

View File

@ -6,6 +6,9 @@ import { BlockProvider, useBlockRequestContext } from './BlockProvider';
import { useFormBlockContext } from './FormBlockProvider';
import { useFormFieldContext } from './FormFieldProvider';
/**
* @internal
*/
export const TableFieldContext = createContext<any>({});
TableFieldContext.displayName = 'TableFieldContext';
@ -122,9 +125,15 @@ export class TableFieldResource {
}
}
/**
* @internal
*/
export const WithoutTableFieldResource = createContext(null);
WithoutTableFieldResource.displayName = 'WithoutTableFieldResource';
/**
* @internal
*/
export const TableFieldProvider = (props) => {
return (
<WithoutTableFieldResource.Provider value={false}>
@ -135,10 +144,16 @@ export const TableFieldProvider = (props) => {
);
};
/**
* @internal
*/
export const useTableFieldContext = () => {
return useContext(TableFieldContext);
};
/**
* @internal
*/
export const useTableFieldProps = () => {
const field = useField<ArrayField>();
const ctx = useTableFieldContext();

View File

@ -3,6 +3,7 @@ import { Schema, useField, useFieldSchema } from '@formily/react';
import _ from 'lodash';
import uniq from 'lodash/uniq';
import React, { createContext, useContext, useEffect, useState } from 'react';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
import { useCollectionManager_deprecated } from '../collection-manager';
import { useCollectionParentRecordData } from '../data-source/collection-record/CollectionRecordProvider';
import { isInFilterFormBlock } from '../filter-provider';
@ -11,7 +12,6 @@ import { RecordProvider, useRecord } from '../record-provider';
import { SchemaComponentOptions } from '../schema-component';
import { BlockProvider, RenderChildrenWithAssociationFilter, useBlockRequestContext } from './BlockProvider';
import { useParsedFilter } from './hooks';
import { withDynamicSchemaProps } from '../application/hoc/withDynamicSchemaProps';
type Params = {
filter?: any;
@ -20,6 +20,9 @@ type Params = {
sort?: any;
};
/**
* @internal
*/
export const TableSelectorContext = createContext<any>({});
TableSelectorContext.displayName = 'TableSelectorContext';
const TableSelectorParamsContext = createContext<Params>({}); // 用于传递参数

View File

@ -7,6 +7,9 @@ const TemplateBlockContext = createContext<{
}>({});
TemplateBlockContext.displayName = 'TemplateBlockContext';
/**
* @internal
*/
export const useTemplateBlockContext = () => {
return useContext(TemplateBlockContext);
};

View File

@ -34,9 +34,9 @@ import { useBlockRequestContext, useFilterByTk, useParamsFromRecord } from '../B
import { useDetailsBlockContext } from '../DetailsBlockProvider';
import { TableFieldResource } from '../TableFieldProvider';
export * from './useDataBlockParentRecord';
export * from './useFormActiveFields';
export * from './useParsedFilter';
export * from './useDataBlockSourceId';
export const usePickActionProps = () => {
const form = useForm();

View File

@ -15,6 +15,7 @@ interface ProviderProps extends Partial<FormActiveFieldsProviderValue> {
}
/**
* @internal
*
* @param param0
* @returns

View File

@ -8,6 +8,11 @@ import { getPath } from '../../variables/utils/getPath';
import { getVariableName } from '../../variables/utils/getVariableName';
import { isVariable } from '../../variables/utils/isVariable';
/**
* @internal
* @param param0
* @returns
*/
export function useParsedFilter({ filterOption }: { filterOption: any }) {
const { parseFilter, findVariable } = useParseDataScopeFilter();
const [filter, setFilter] = useState({});

View File

@ -3,6 +3,7 @@ import { gridRowColWrap } from '../../../schema-initializer/utils';
/**
* @deprecated
* use `createFormBlockInitializers` instead
*/
export const createFormBlockInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'CreateFormBlockInitializers',

View File

@ -3,6 +3,7 @@ import { gridRowColWrap } from '../../../schema-initializer/utils';
/**
* @deprecated
* use `customizeCreateFormBlockInitializers` instead
*/
export const customizeCreateFormBlockInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'CusomeizeCreateFormBlockInitializers',

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer } from '../../../../application/schema-init
/**
* @deprecated
* use `detailsActionInitializers` instead
*
*/
export const detailsActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -8,6 +8,7 @@ const useVisibleCollection = () => {
/**
* @deprecated
* use `readPrettyFormActionInitializers` instead
*
*/
export const readPrettyFormActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -1,6 +1,7 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { CompatibleSchemaInitializer } from '../../../../application/schema-initializer/CompatibleSchemaInitializer';
import { SchemaInitializerChildren } from '../../../../application/schema-initializer/components/SchemaInitializerChildren';
import { useCompile } from '../../../../schema-component';
import {
gridRowColWrap,
@ -8,7 +9,6 @@ import {
useFormItemInitializerFields,
useInheritsFormItemInitializerFields,
} from '../../../../schema-initializer/utils';
import { SchemaInitializerChildren } from '../../../../application/schema-initializer/components/SchemaInitializerChildren';
const ParentCollectionFields = () => {
const inheritFields = useInheritsFormItemInitializerFields();
@ -47,7 +47,7 @@ const AssociatedFields = () => {
/**
* @deprecated
* 使 readPrettyFormItemInitializers
* use `readPrettyFormItemInitializers` instead
*/
export const readPrettyFormItemInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'ReadPrettyFormItemInitializers',

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer } from '../../../../application/schema-init
/**
* @deprecated
* use `createFormActionInitializers` instead
*/
export const createFormActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'CreateFormActionInitializers',

View File

@ -1,9 +1,10 @@
import { gridRowColWrap, useFormItemInitializerFields } from '../../../../schema-initializer/utils';
import { ParentCollectionFields, AssociatedFields } from '../../../../schema-initializer/buttons/FormItemInitializers';
import { CompatibleSchemaInitializer } from '../../../../application/schema-initializer/CompatibleSchemaInitializer';
import { AssociatedFields, ParentCollectionFields } from '../../../../schema-initializer/buttons/FormItemInitializers';
import { gridRowColWrap, useFormItemInitializerFields } from '../../../../schema-initializer/utils';
/**
* @deprecated
* use `formItemInitializers` instead
*
*/
export const formItemInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer } from '../../../../application/schema-init
/**
* @deprecated
* use `updateFormActionInitializers` instead
*/
export const updateFormActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'UpdateFormActionInitializers',

View File

@ -3,6 +3,7 @@ import { useCollection_deprecated } from '../../../../collection-manager';
/**
* @deprecated
* use `gridCardActionInitializers` instead
*/
export const gridCardActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'GridCardActionInitializers',

View File

@ -3,6 +3,7 @@ import { useCollection_deprecated } from '../../../../collection-manager';
/**
* @deprecated
* use `gridCardItemActionInitializers` instead
*/
export const gridCardItemActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'GridCardItemActionInitializers',

View File

@ -3,6 +3,7 @@ import { useCollection_deprecated } from '../../../../collection-manager';
/**
* @deprecated
* use `listActionInitializers` instead
*
*/
export const listActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -3,6 +3,7 @@ import { useCollection_deprecated } from '../../../../collection-manager';
/**
* @deprecated
* use `listItemActionInitializers` instead
*/
export const listItemActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'ListItemActionInitializers',

View File

@ -247,6 +247,7 @@ const commonOptions = {
/**
* @deprecated
* use `tableActionColumnInitializers` instead
*/
export const tableActionColumnInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'TableActionColumnInitializers',

View File

@ -4,6 +4,7 @@ import { useCollection_deprecated } from '../../../../collection-manager/hooks/u
/**
* @deprecated
* use `tableActionInitializers` instead
*
*/
export const tableActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -1,14 +1,14 @@
import { useFieldSchema } from '@formily/react';
import React, { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { CompatibleSchemaInitializer } from '../../../../application/schema-initializer/CompatibleSchemaInitializer';
import { SchemaInitializerChildren } from '../../../../application/schema-initializer/components/SchemaInitializerChildren';
import { useCompile } from '../../../../schema-component';
import {
useAssociatedTableColumnInitializerFields,
useInheritsTableColumnInitializerFields,
useTableColumnInitializerFields,
} from '../../../../schema-initializer/utils';
import { SchemaInitializerChildren } from '../../../../application/schema-initializer/components/SchemaInitializerChildren';
import { CompatibleSchemaInitializer } from '../../../../application/schema-initializer/CompatibleSchemaInitializer';
// 表格列配置
const ParentCollectionFields = () => {
@ -49,6 +49,7 @@ const AssociatedFields = () => {
/**
* @deprecated
* use `tableColumnInitializers` instead
*/
export const tableColumnInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'TableColumnInitializers',

View File

@ -81,6 +81,7 @@ export const associationFilterFilterBlockInitializer = new SchemaInitializer({
/**
* @deprecated
* use `filterCollapseItemInitializer` instead
*/
export const filterCollapseItemInitializer_deprecated = new CompatibleSchemaInitializer({
name: 'AssociationFilterInitializers',

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer } from '../../../../application/schema-init
/**
* @deprecated
* use `filterFormActionInitializers` instead
*
*/
export const filterFormActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -1,12 +1,13 @@
import { gridRowColWrap, useFilterFormItemInitializerFields } from '../../../../schema-initializer/utils';
import {
FilterParentCollectionFields,
FilterAssociatedFields,
} from '../../../../schema-initializer/buttons/FormItemInitializers';
import { CompatibleSchemaInitializer } from '../../../../application/schema-initializer/CompatibleSchemaInitializer';
import {
FilterAssociatedFields,
FilterParentCollectionFields,
} from '../../../../schema-initializer/buttons/FormItemInitializers';
import { gridRowColWrap, useFilterFormItemInitializerFields } from '../../../../schema-initializer/utils';
/**
* @deprecated
* use `filterFormItemInitializers` instead
*/
export const filterFormItemInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'FilterFormItemInitializers',

View File

@ -84,6 +84,7 @@ const commonOptions = {
/**
* @deprecated
* use `tableSelectorInitializers` instead
*/
export const tableSelectorInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'TableSelectorInitializers',

View File

@ -3,6 +3,7 @@ import { gridRowColWrap } from '../../schema-initializer/utils';
/**
* @deprecated
* use `blockInitializers` instead
*/
export const blockInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'BlockInitializers',

View File

@ -1,9 +1,9 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { CompatibleSchemaInitializer } from '../../application/schema-initializer/CompatibleSchemaInitializer';
import { SchemaInitializerChildren } from '../../application/schema-initializer/components/SchemaInitializerChildren';
import { useCompile } from '../../schema-component';
import { gridRowColWrap, useCustomFormItemInitializerFields, useInheritsFormItemInitializerFields } from '../utils';
import { SchemaInitializerChildren } from '../../application/schema-initializer/components/SchemaInitializerChildren';
import { CompatibleSchemaInitializer } from '../../application/schema-initializer/CompatibleSchemaInitializer';
// 表单里配置字段
const ParentCollectionFields = () => {
@ -26,6 +26,7 @@ const ParentCollectionFields = () => {
/**
* @deprecated
* use `customFormItemInitializers` instead
*/
export const customFormItemInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'CustomFormItemInitializers',

View File

@ -13,8 +13,8 @@ import {
useCreateEditFormBlock,
} from '../..';
import { CompatibleSchemaInitializer } from '../../application/schema-initializer/CompatibleSchemaInitializer';
import { gridRowColWrap } from '../utils';
import { useCreateSingleDetailsSchema } from '../../modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer';
import { gridRowColWrap } from '../utils';
const recursiveParent = (schema: Schema) => {
if (!schema) return null;
@ -259,6 +259,7 @@ function useRecordBlocks() {
/**
* @deprecated
* use `recordBlockInitializers` instead
*/
export const recordBlockInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'RecordBlockInitializers',

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer } from '../../application/schema-initialize
/**
* @deprecated
* use `subTableActionInitializers` instead
*
*/
export const subTableActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -40,6 +40,7 @@ export const CreateFormBulkEditBlockInitializers: SchemaInitializer = new Schema
/**
* @deprecated
* use `bulkEditBlockInitializers` instead
*/
export const BulkEditBlockInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'BulkEditBlockInitializers',

View File

@ -1,8 +1,9 @@
import { CompatibleSchemaInitializer, SchemaInitializer } from '@nocobase/client';
import { CompatibleSchemaInitializer } from '@nocobase/client';
import { BulkEditSubmitActionInitializer } from './BulkEditSubmitActionInitializer';
/**
* @deprecated
* use `bulkEditFormActionInitializers` instead
*/
export const BulkEditFormActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'BulkEditFormActionInitializers',

View File

@ -3,6 +3,7 @@ import { useCustomBulkEditFormItemInitializerFields } from './utils';
/**
* @deprecated
* use `bulkEditFormItemInitializers` instead
*/
export const BulkEditFormItemInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'BulkEditFormItemInitializers',

View File

@ -12,6 +12,7 @@ import { useTranslation } from 'react-i18next';
/**
* @deprecated
* use `auditLogsTableActionColumnInitializers` instead
*/
export const auditLogsTableActionColumnInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'AuditLogsTableActionColumnInitializers',

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer } from '@nocobase/client';
/**
* @deprecated
* use `auditLogsTableActionInitializers` instead
*
*/
export const auditLogsTableActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -46,6 +46,7 @@ const AssociatedFields = () => {
/**
* @deprecated
* use `auditLogsTableColumnInitializers` instead
*/
export const auditLogsTableColumnInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'AuditLogsTableColumnInitializers',

View File

@ -3,6 +3,7 @@ import { generateNTemplate } from '../../../locale';
/**
* @deprecated
* use `calendarActionInitializers` instead
*
*/
export const CalendarActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -52,6 +52,7 @@ const ChartInitializer = () => {
/**
* @deprecated
* use `chartInitializers` instead
*/
export const chartInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'ChartInitializers',

View File

@ -125,6 +125,7 @@ const ChartFilterCollapseInitializer = (props) => {
/**
* @deprecated
* use `chartFilterActionInitializers` instead
*/
export const chartFilterActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'ChartFilterActionInitializers',

View File

@ -9,15 +9,14 @@ import {
CollectionFieldProvider,
CollectionManagerProvider,
CollectionProvider,
DEFAULT_DATA_SOURCE_KEY,
CompatibleSchemaInitializer,
DEFAULT_DATA_SOURCE_KEY,
FormDialog,
HTMLEncode,
SchemaComponent,
SchemaComponentOptions,
SchemaInitializerItem,
gridRowColWrap,
useCollectionManager_deprecated,
useDataSourceManager,
useDesignable,
useGlobalTheme,
@ -311,6 +310,7 @@ const filterItemInitializers = {
/**
* @deprecated
* use `chartFilterItemInitializers` instead
*/
export const chartFilterItemInitializers_deprecated = new CompatibleSchemaInitializer({
...filterItemInitializers,

View File

@ -3,6 +3,7 @@ import { CompatibleSchemaInitializer, useCollection_deprecated } from '@nocobase
/**
* @deprecated
* use `ganttActionInitializers` instead
*/
export const GanttActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'GanttActionInitializers',

View File

@ -61,6 +61,7 @@ export const KanbanCardDesigner = () => {
/**
* @deprecated
* use `kanbanCardInitializers` instead
*/
export const kanbanCardInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'KanbanCardInitializers',

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer, useCollection_deprecated } from '@nocobase
/**
* @deprecated
* use `kanbanActionInitializers` instead
*/
export const kanbanActionInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'KanbanActionInitializers',

View File

@ -2,6 +2,7 @@ import { CompatibleSchemaInitializer, useCollection_deprecated } from '@nocobase
/**
* @deprecated
* use `mapActionInitializers` instead
*
*/
export const mapActionInitializers_deprecated = new CompatibleSchemaInitializer({

View File

@ -3,6 +3,7 @@ import { generateNTemplate } from '../../../locale';
/**
* @deprecated
* use `mBlockInitializers` instead
*/
export const mBlockInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'MBlockInitializers',

View File

@ -3,6 +3,7 @@ import { NAMESPACE } from '../../locale';
/**
* @deprecated
* use `snapshotBlockInitializers` instead
*/
export const snapshotBlockInitializers_deprecated = new CompatibleSchemaInitializer({
name: 'SnapshotBlockInitializers',

View File

@ -17,14 +17,12 @@ import {
SchemaComponentContext,
SchemaInitializerItem,
SchemaInitializerItemType,
SchemaSettingsBlockTitleItem,
SchemaSettingsDivider,
SchemaSettingsItem,
SchemaSettingsRemove,
VariableScopeProvider,
css,
gridRowColWrap,
useCompile,
useDataSourceManager,
useFormActiveFields,
useFormBlockContext,
@ -34,8 +32,8 @@ import {
useSchemaOptionsContext,
} from '@nocobase/client';
import WorkflowPlugin, {
JOB_STATUS,
DetailsBlockProvider,
JOB_STATUS,
SimpleDesigner,
useAvailableUpstreams,
useFlowContext,
@ -108,6 +106,7 @@ const blockTypeNames = {
/**
* @deprecated
* use `addBlockButton` instead
*/
export const addBlockButton_deprecated = new CompatibleSchemaInitializer({
name: 'AddBlockButton',
@ -421,6 +420,7 @@ function ActionInitializer() {
/**
* @deprecated
* use `addActionButton` instead
*/
export const addActionButton_deprecated = new CompatibleSchemaInitializer({
name: 'AddActionButton',

View File

@ -340,6 +340,7 @@ const CustomItemsComponent = (props) => {
/**
* @deprecated
* use `addCustomFormField` instead
*/
export const addCustomFormField_deprecated = new CompatibleSchemaInitializer({
name: 'AddCustomFormField',