/// import React from 'react'; import { ConditionBuilderFields, ConditionBuilderFuncs } from './types'; import { ThemeProps, LocaleProps, ConditionGroupValue } from 'amis-core'; import { ConditionBuilderConfig } from './config'; import { FormulaPickerProps } from '../formula/Picker'; interface ConditionGroupState { isCollapsed: boolean; } export interface ConditionGroupProps extends ThemeProps, LocaleProps { builderMode?: 'simple' | 'full'; config: ConditionBuilderConfig; value?: ConditionGroupValue; fields: ConditionBuilderFields; funcs?: ConditionBuilderFuncs; showNot?: boolean; showANDOR?: boolean; showIf?: boolean; formulaForIf?: FormulaPickerProps; data?: any; disabled?: boolean; searchable?: boolean; onChange: (value: ConditionGroupValue) => void; removeable?: boolean; onRemove?: (e: React.MouseEvent) => void; draggable?: boolean; onDragStart?: (e: React.MouseEvent) => void; fieldClassName?: string; formula?: FormulaPickerProps; popOverContainer?: any; renderEtrValue?: any; selectMode?: 'list' | 'tree' | 'chained'; isCollapsed?: boolean; depth: number; isAddBtnVisibleOn?: (param: { depth: number; breadth: number; }) => boolean; isAddGroupBtnVisibleOn?: (param: { depth: number; breadth: number; }) => boolean; } export declare class ConditionGroup extends React.Component { constructor(props: ConditionGroupProps); componentDidUpdate(prevProps: Readonly): void; getValue(): ConditionGroupValue; handleNotClick(): void; handleConjunctionChange(val: { value: 'or' | 'and'; }): void; handleAdd(): void; handleAddGroup(): void; handleItemChange(item: any, index: number): void; handleItemRemove(index: number): void; toggleCollapse(): void; render(): React.JSX.Element; } declare const _default: { new (props: Omit & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): React.JSX.Element; context: unknown; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType<{ new (props: Omit & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): React.JSX.Element; context: unknown; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof ConditionGroup; }>; } & import("hoist-non-react-statics").NonReactStatics<{ new (props: Omit & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): React.JSX.Element; context: unknown; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof ConditionGroup; }, {}> & { ComposedComponent: { new (props: Omit & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): React.JSX.Element; context: unknown; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof ConditionGroup; }; }; export default _default;