import { ModelRule, Operator, Rule } from '../../types'; /** * Gets the default value for a field accounting for * - any default value hard coded on the config * - any previous values when appropriate * - account for different value types when switching operators */ export declare const defaultVal: (newOpt: Operator, m: ModelRule) => any; /** * If the user has changed the operator on a rule then we try and remember their value when possible * If the operators differ with type (e.g. an operator has a `valueType`) then we always create a new field default via returning null) */ export declare const getValue: (newOpt: Operator, m: ModelRule) => (index: number) => any; export declare const fieldDefault: (newOpt: Operator, m: ModelRule) => string | false | 0; export declare const operatorChangedUpdatedModel: (newOperator: Operator, model: ModelRule) => Rule; export declare const valueChangedUpdateModel: (model: ModelRule, value: any, argIndex: number) => Rule; /** * Test a value considered to be allowed for validation reasons * A boolean cast to falsy is considered invalid, except special case * that we allow `0` because that's a valid numeric comparison. * This will consider blank strings invalid, to test against that explicitly the user * should define an operator such as `is_blank` * This shouldn't be used on a boolean value */ export declare const isValueInvalid: (x: any) => boolean; export declare const isPartialRuleError: (model: ModelRule) => boolean; //# sourceMappingURL=expression-rule.helpers.d.ts.map