;
/**
* Inject Xrm state into a child and provide Xrm state through
* a component's context. Can detect when the form has been saved
* because the entityId will appear as a value in the child props.
* Save handlers are run properly after the save. An update after
* save is automatically called. Using this component as your parent
* is alot like using `connect` in `react-redux`.
*
* The Xrm.FormContext is obtained via FormContextHolder or window.parent.
*/
export declare class EntityForm extends Dynamics
{
constructor(props: P, context: any);
private formContextResolved;
private deferredFormContext;
private __className;
private __disposables;
private __afterSaves;
/** Attributes live outside the react world, so make it instance var. */
protected _attributeState: AttributeState;
getChildContext(): EntityFormContext;
static childContextTypes: {
notifier: PropTypes.Requireable;
xrm: PropTypes.Requireable;
errorHandler: PropTypes.Requireable;
formContextP: PropTypes.Requireable;
};
/** Can push a thunk. */
readonly _afterSaves: Array<() => void>;
/** Can push a Disposable. */
readonly _disposables: Array;
/** Get the class name. From Office Fabric. */
readonly className: string;
/**
* Setup the FormContext if it is not already set. When resolved, force an update.
*/
componentDidMount(): void;
componentWillUnmount(): void;
componentWillMount(): void;
/**
* Setup connections force an update so that values are propagated.
* @returns true if connections were created, false otherwise.
*/
protected connect: (attributes: string[]) => Promise;
protected onChangeHandler: (name: string, value: any) => void;
/** For each value in a connected state. */
protected clear: (names: string[], fire?: boolean) => Promise;
/** Give a FormContext, extract some values to pass to children as props on the next render. */
protected extractValues: (fctx: Xrm.FormContext) => void;
/**
* Setting value in dynamics attribute does *not* fire change event automatically,
* which is good for us. If fire is true, `fireOnChange()` is called.
*/
protected setValue: (name: string, value: any, fire?: boolean) => Promise;
render(): React.ReactElement;
}
export default EntityForm;