/** * @file 一些处理方法 */ import React from 'react'; import { RendererPluginAction, RendererPluginEvent } from 'amis-editor-core'; import { ActionConfig } from './types'; import CmptActionSelect from './comp-action-select'; import { ActionData } from '.'; export declare const getArgsWrapper: (items: any, multiple?: boolean, patch?: {}) => { items: any[]; type: string; name: string; multiple: boolean; strictMode: boolean; }; export declare const renderCmptSelect: (componentLabel: string, required: boolean, onChange?: ((value: string, oldVal: any, data: any, form: any) => void) | undefined, hideAutoFill?: boolean) => { type: string; name: string; label: string; showIcon: boolean; searchable: boolean; required: boolean; selfDisabledAffectChildren: boolean; size: string; source: string; mode: string; autoFill: { __rendererLabel?: string | undefined; __rendererName?: string | undefined; __nodeId?: string | undefined; __nodeSchema?: string | undefined; __isScopeContainer: string; }; onChange: (value: string, oldVal: any, data: any, form: any) => Promise; }[]; export declare const renderCmptActionSelect: (componentLabel: string, required: boolean, onChange?: ((value: string, oldVal: any, data: any, form: any) => void) | undefined, hideAutoFill?: boolean, manager?: any) => ({ type: string; name: string; label: string; showIcon: boolean; searchable: boolean; required: boolean; selfDisabledAffectChildren: boolean; size: string; source: string; mode: string; autoFill: { __rendererLabel?: string | undefined; __rendererName?: string | undefined; __nodeId?: string | undefined; __nodeSchema?: string | undefined; __isScopeContainer: string; }; onChange: (value: string, oldVal: any, data: any, form: any) => Promise; } | { type: string; name: string; mode: string; size: string; required: boolean; label: string; visibleOn: string; onChange: (value: string, oldVal: any, data: any, form: any) => Promise; asFormItem?: undefined; component?: undefined; description?: undefined; } | { asFormItem: boolean; label: string; name: string; mode: string; required: boolean; visibleOn: string; component: typeof CmptActionSelect; description: string; type?: undefined; size?: undefined; onChange?: undefined; })[]; export declare const renderCmptIdInput: (onChange?: ((value: string, oldVal: any, data: any, form: any) => void) | undefined) => { type: string; name: string; mode: string; size: string; required: boolean; label: string; visibleOn: string; onChange: (value: string, oldVal: any, data: any, form: any) => Promise; }; export declare const getActionCommonProps: (actionType: string, info?: any) => RendererPluginAction; export declare const buildLinkActionDesc: (manager: EditorManager, info: any) => React.JSX.Element; export declare const COMMON_ACTION_SCHEMA_MAP: { [propName: string]: RendererPluginAction; }; export declare const getEventLabel: (events: RendererPluginEvent[], name: string) => any; export declare const getEventDesc: (events: RendererPluginEvent[], name: string) => any; export declare const getEventStrongDesc: (events: RendererPluginEvent[], name: string) => any; export declare const getOldActionSchema: (manager: EditorManager, context: BaseEventContext) => { type: string; className: string; content: string; inline: boolean; tooltipTheme: string; placement: string; body: { type: string; label: string; className: string; actionType: string; dialog: { type: string; title: string; body: { type: string; body: any[]; }; onConfirm: (values: any[]) => void; }; }[]; }; /** * 获取事件动作面板所需属性配置 */ export declare const getEventControlConfig: (manager: EditorManager, context: BaseEventContext) => { showOldEntry: boolean; actions: any; events: any; actionTree: any; commonActions: any; owner: string; addBroadcast: any; removeBroadcast: any; allComponents: any; getContextSchemas: (id?: string | undefined, withoutSuper?: boolean | undefined) => Promise; getComponents: (action: RendererPluginAction) => any; actionConfigInitFormatter: (action: ActionConfig) => Promise<{ actionType: any; args: any; }>; actionConfigSubmitFormatter: (config: ActionConfig, type?: string | undefined, actionData?: ActionData | undefined, shcema?: any) => ActionConfig; }; /** * 更新localStorage存储的常用动作 */ export declare const updateCommonUseActions: (action: Option) => void; export declare const getActionsByRendererName: (pluginActions: any, rendererName: string) => RendererPluginAction[];