//#region src/shared/builder-components/types/builder-field-type.d.ts type BuilderFieldType = 'BOOLEAN' | 'TEXT' | 'DATE' | 'NUMBER' | 'STATEMENT' | 'LIST' | 'MULTI_LIST' | 'GROUP'; //#endregion //#region src/shared/query/model/constants/query-operators.d.ts declare const queryOperators: { readonly LARGER: "LARGER"; readonly SMALLER: "SMALLER"; readonly LARGER_EQUAL: "LARGER_EQUAL"; readonly SMALLER_EQUAL: "SMALLER_EQUAL"; readonly EQUAL: "EQUAL"; readonly NOT_EQUAL: "NOT_EQUAL"; readonly ALL_IN: "ALL_IN"; /** * @deprecated Use `IN` instead. This alias will be removed in 2.0.0. */ readonly ANY_IN: "ANY_IN"; readonly IN: "IN"; readonly NOT_IN: "NOT_IN"; readonly BETWEEN: "BETWEEN"; readonly NOT_BETWEEN: "NOT_BETWEEN"; readonly IS_NULL: "IS_NULL"; readonly IS_NOT_NULL: "IS_NOT_NULL"; /** * @deprecated Use `CONTAINS` instead. This alias will be removed in 2.0.0. */ readonly LIKE: "LIKE"; /** * @deprecated Use `NOT_CONTAINS` instead. This alias will be removed in 2.0.0. */ readonly NOT_LIKE: "NOT_LIKE"; readonly CONTAINS: "CONTAINS"; readonly NOT_CONTAINS: "NOT_CONTAINS"; readonly STARTS_WITH: "STARTS_WITH"; readonly ENDS_WITH: "ENDS_WITH"; }; type QueryOperator = keyof typeof queryOperators; //#endregion //#region src/shared/query/model/types/query-tree.d.ts type QueryGroupValue = 'AND' | 'OR'; type QueryGroupType = 'with-modifiers' | 'without-modifiers'; type GroupReadOnly = boolean | IGroupReadOnlyConfig; type RuleReadOnly = boolean | IRuleReadOnlyConfig; type GroupReadOnlyTarget = 'negation' | 'combinator'; type RuleReadOnlyTarget = 'field' | 'operator' | 'value'; type QueryRuleValueSource = 'value' | 'field'; type QueryRuleValue = string | number | string[] | number[] | boolean; interface IGroupReadOnlyConfig { enabled: boolean; targets?: GroupReadOnlyTarget[]; inheritToChildren?: boolean; } interface IRuleReadOnlyConfig { enabled: boolean; targets?: RuleReadOnlyTarget[]; } interface IRuleNodeBase { id?: string; parent?: string; field: string; operator?: QueryOperator; operators?: QueryOperator[]; readOnly?: RuleReadOnly; } interface ILiteralRuleNode extends IRuleNodeBase { valueSource?: 'value'; value?: QueryRuleValue; valueField?: undefined; } interface IFieldReferenceRuleNode extends IRuleNodeBase { valueSource: 'field'; value?: undefined; valueField: string; } type IDenormalizedRuleNode = ILiteralRuleNode | IFieldReferenceRuleNode; interface IDenormalizedGroupNodeBase { id?: string; parent?: string; type: 'GROUP'; children: DenormalizedNode[]; readOnly?: GroupReadOnly; } interface IDenormalizedGroupNodeWithModifiers extends IDenormalizedGroupNodeBase { value: QueryGroupValue; isNegated: boolean; } interface IDenormalizedGroupNodeWithoutModifiers extends IDenormalizedGroupNodeBase { value?: undefined; isNegated?: undefined; } type DenormalizedGroupNode = IDenormalizedGroupNodeWithModifiers | IDenormalizedGroupNodeWithoutModifiers; type DenormalizedNode = IDenormalizedRuleNode | DenormalizedGroupNode; interface INormalizedRuleNodeBase extends IRuleNodeBase { id: string; parent?: string; } interface INormalizedLiteralRuleNode extends INormalizedRuleNodeBase { valueSource?: 'value'; value?: QueryRuleValue; valueField?: undefined; } interface INormalizedFieldReferenceRuleNode extends INormalizedRuleNodeBase { valueSource: 'field'; value?: undefined; valueField: string; } type INormalizedRuleNode = INormalizedLiteralRuleNode | INormalizedFieldReferenceRuleNode; interface INormalizedGroupNodeBase { id: string; parent?: string; type: 'GROUP'; children: string[]; readOnly?: GroupReadOnly; } interface INormalizedGroupNodeWithModifiers extends INormalizedGroupNodeBase { value: QueryGroupValue; isNegated: boolean; } interface INormalizedGroupNodeWithoutModifiers extends INormalizedGroupNodeBase { value?: undefined; isNegated?: undefined; } type NormalizedGroupNode = INormalizedGroupNodeWithModifiers | INormalizedGroupNodeWithoutModifiers; type NormalizedNode = INormalizedRuleNode | NormalizedGroupNode; type DenormalizedQuery = DenormalizedNode[]; type NormalizedQuery = NormalizedNode[]; //#endregion //#region src/shared/builder-components/types/builder-field-operator.d.ts type BuilderFieldOperator = QueryOperator; //#endregion //#region src/shared/builder-components/types/builder-field-value.d.ts type BuilderFieldValue = string | number | string[] | number[] | boolean | Array<{ value: string | number; label: string; }>; //#endregion //#region src/shared/builder-components/types/builder-field-usage-limit-scope.d.ts type BuilderFieldUsageLimitScope = 'global' | 'parent'; //#endregion //#region src/shared/builder-components/types/builder-field-comparison-type.d.ts type BuilderFieldComparisonType = 'string' | 'number' | 'date' | 'boolean'; //#endregion //#region src/shared/builder-components/types/builder-operator-validation-rule.d.ts type IBuilderOperatorValidationRule = Partial & { operators: BuilderFieldOperator[]; }; //#endregion //#region src/shared/builder-components/types/builder-validation-config.d.ts interface IBuilderValidationConfig { common?: Partial; rules?: Array>; } //#endregion //#region src/shared/builder-components/types/builder-field-validation-base.d.ts interface IBuilderFieldValidationBase { required?: boolean; oneOf?: TValue[]; custom?: (value: TValue, context: IBuilderValidationMessageContext) => boolean | Promise; customMessage?: BuilderValidationMessage; } //#endregion //#region src/shared/builder-components/types/boolean-value-validation-rule.d.ts type IBooleanValueValidationRule = IBuilderFieldValidationBase; //#endregion //#region src/shared/builder-components/types/boolean-field-validation-rule.d.ts type IBooleanFieldValidationRule = IBooleanValueValidationRule; //#endregion //#region src/shared/builder-components/types/boolean-field-validation.d.ts type IBooleanFieldValidation = Partial | IBuilderValidationConfig; //#endregion //#region src/shared/builder-components/types/builder-field-comparison-config.d.ts interface IBuilderFieldComparisonConfig { type?: BuilderFieldComparisonType; comparableFields?: string[]; } //#endregion //#region src/shared/builder-components/types/builder-field-base.d.ts interface IBuilderFieldBase { field: string; label: string; value?: TValue; type: TType; operators?: BuilderFieldOperator[]; validation?: TValidation; usageLimit?: IBuilderFieldUsageLimit; fieldComparison?: IBuilderFieldComparisonConfig; } //#endregion //#region src/shared/builder-components/types/boolean-field-props.d.ts type IBooleanFieldProps = IBuilderFieldBase<'BOOLEAN', boolean, IBooleanFieldValidation>; //#endregion //#region src/shared/builder-components/types/builder-range-validation.d.ts interface IBuilderRangeValidation { common?: Partial; start?: Partial; end?: Partial; allowEqual?: boolean; requireAscending?: boolean; validate?: (range: [TRangeValue, TRangeValue], context: IBuilderValidationMessageContext) => boolean | Promise; message?: BuilderValidationMessage; } //#endregion //#region src/shared/builder-components/types/text-value-validation-rule.d.ts interface ITextValueValidationRule extends IBuilderFieldValidationBase { minLength?: number; maxLength?: number; matches?: RegExp; } //#endregion //#region src/shared/builder-components/types/text-field-validation-rule.d.ts interface ITextFieldValidationRule extends ITextValueValidationRule { range?: IBuilderRangeValidation; } //#endregion //#region src/shared/builder-components/types/text-field-validation.d.ts type ITextFieldValidation = Partial | IBuilderValidationConfig; //#endregion //#region src/shared/builder-components/types/text-field-props.d.ts type ITextFieldProps = IBuilderFieldBase<'TEXT', string, ITextFieldValidation>; //#endregion //#region src/shared/builder-components/types/date-value-validation-rule.d.ts interface IDateValueValidationRule extends IBuilderFieldValidationBase { minDate?: string | Date; maxDate?: string | Date; } //#endregion //#region src/shared/builder-components/types/date-field-validation-rule.d.ts interface IDateFieldValidationRule extends IDateValueValidationRule { range?: IBuilderRangeValidation; } //#endregion //#region src/shared/builder-components/types/date-field-validation.d.ts type IDateFieldValidation = Partial | IBuilderValidationConfig; //#endregion //#region src/shared/builder-components/types/date-field-props.d.ts type IDateFieldProps = IBuilderFieldBase<'DATE', string, IDateFieldValidation>; //#endregion //#region src/shared/builder-components/types/number-value-validation-rule.d.ts interface INumberValueValidationRule extends IBuilderFieldValidationBase { min?: number; max?: number; integer?: boolean; positive?: boolean; negative?: boolean; } //#endregion //#region src/shared/builder-components/types/number-field-validation-rule.d.ts interface INumberFieldValidationRule extends INumberValueValidationRule { range?: IBuilderRangeValidation; } //#endregion //#region src/shared/builder-components/types/number-field-validation.d.ts type INumberFieldValidation = Partial | IBuilderValidationConfig; //#endregion //#region src/shared/builder-components/types/number-field-props.d.ts type INumberFieldProps = IBuilderFieldBase<'NUMBER', number, INumberFieldValidation>; //#endregion //#region src/shared/builder-components/types/statement-value-validation-rule.d.ts type IStatementValueValidationRule = IBuilderFieldValidationBase & { minLength?: number; maxLength?: number; matches?: RegExp; }; //#endregion //#region src/shared/builder-components/types/statement-field-validation-rule.d.ts type IStatementFieldValidationRule = IStatementValueValidationRule; //#endregion //#region src/shared/builder-components/types/statement-field-validation.d.ts type IStatementFieldValidation = Partial | IBuilderValidationConfig; //#endregion //#region src/shared/builder-components/types/statement-field-props.d.ts type IStatementFieldProps = IBuilderFieldBase<'STATEMENT', string, IStatementFieldValidation>; //#endregion //#region src/shared/builder-components/types/list-value-validation-rule.d.ts type IListValueValidationRule = IBuilderFieldValidationBase; //#endregion //#region src/shared/builder-components/types/list-field-validation-rule.d.ts type IListFieldValidationRule = IListValueValidationRule; //#endregion //#region src/shared/builder-components/types/list-field-validation.d.ts type IListFieldValidation = Partial | IBuilderValidationConfig; //#endregion //#region src/shared/builder-components/types/list-field-props.d.ts type IListFieldProps = IBuilderFieldBase<'LIST', Array<{ value: string | number; label: string; }>, IListFieldValidation>; //#endregion //#region src/shared/builder-components/types/multi-list-value-validation-rule.d.ts interface IMultiListValueValidationRule extends IBuilderFieldValidationBase> { minItems?: number; maxItems?: number; } //#endregion //#region src/shared/builder-components/types/multi-list-field-validation-rule.d.ts type IMultiListFieldValidationRule = IMultiListValueValidationRule; //#endregion //#region src/shared/builder-components/types/multi-list-field-validation.d.ts type IMultiListFieldValidation = Partial | IBuilderValidationConfig; //#endregion //#region src/shared/builder-components/types/multi-list-field-props.d.ts type IMultiListFieldProps = IBuilderFieldBase<'MULTI_LIST', Array<{ value: string | number; label: string; }>, IMultiListFieldValidation>; //#endregion //#region src/shared/builder-components/types/group-field-props.d.ts type IGroupFieldProps = IBuilderFieldBase<'GROUP', undefined, never>; //#endregion //#region src/shared/builder-components/types/builder-field-props.d.ts type IBuilderFieldProps = IBooleanFieldProps | ITextFieldProps | IDateFieldProps | INumberFieldProps | IStatementFieldProps | IListFieldProps | IMultiListFieldProps | IGroupFieldProps; //#endregion //#region src/shared/builder-components/types/builder-validation-message-context.d.ts interface IBuilderValidationMessageContext { field: IBuilderFieldProps; operator?: BuilderFieldOperator; value?: BuilderFieldValue; ruleId?: string; rangeBoundary?: 'start' | 'end'; usageLimit?: IBuilderFieldUsageLimit; } //#endregion //#region src/shared/builder-components/types/builder-validation-message.d.ts type BuilderValidationMessage = string | ((context: IBuilderValidationMessageContext) => string); //#endregion //#region src/shared/builder-components/types/builder-field-usage-limit.d.ts interface IBuilderFieldUsageLimit { key?: string; max: number; scope?: BuilderFieldUsageLimitScope; message?: BuilderValidationMessage; } //#endregion export { INormalizedGroupNodeBase as $, IBooleanFieldProps as A, BuilderFieldOperator as B, IDateFieldValidationRule as C, ITextFieldValidationRule as D, ITextFieldValidation as E, IBuilderFieldValidationBase as F, IDenormalizedGroupNodeBase as G, DenormalizedQuery as H, IBuilderValidationConfig as I, IDenormalizedRuleNode as J, IDenormalizedGroupNodeWithModifiers as K, IBuilderOperatorValidationRule as L, IBooleanFieldValidation as M, IBooleanFieldValidationRule as N, ITextValueValidationRule as O, IBooleanValueValidationRule as P, INormalizedFieldReferenceRuleNode as Q, BuilderFieldComparisonType as R, IDateFieldValidation as S, ITextFieldProps as T, GroupReadOnly as U, DenormalizedNode as V, GroupReadOnlyTarget as W, IGroupReadOnlyConfig as X, IFieldReferenceRuleNode as Y, ILiteralRuleNode as Z, INumberFieldProps as _, IMultiListFieldProps as a, NormalizedGroupNode as at, INumberValueValidationRule as b, IMultiListValueValidationRule as c, QueryGroupType as ct, IListFieldValidationRule as d, QueryRuleValueSource as dt, INormalizedGroupNodeWithModifiers as et, IListValueValidationRule as f, RuleReadOnly as ft, IStatementValueValidationRule as g, BuilderFieldType as gt, IStatementFieldValidationRule as h, queryOperators as ht, IGroupFieldProps as i, IRuleReadOnlyConfig as it, IBuilderFieldComparisonConfig as j, IBuilderRangeValidation as k, IListFieldProps as l, QueryGroupValue as lt, IStatementFieldValidation as m, QueryOperator as mt, IBuilderValidationMessageContext as n, INormalizedLiteralRuleNode as nt, IMultiListFieldValidation as o, NormalizedNode as ot, IStatementFieldProps as p, RuleReadOnlyTarget as pt, IDenormalizedGroupNodeWithoutModifiers as q, IBuilderFieldProps as r, INormalizedRuleNode as rt, IMultiListFieldValidationRule as s, NormalizedQuery as st, BuilderValidationMessage as t, INormalizedGroupNodeWithoutModifiers as tt, IListFieldValidation as u, QueryRuleValue as ut, INumberFieldValidation as v, IDateValueValidationRule as w, IDateFieldProps as x, INumberFieldValidationRule as y, BuilderFieldValue as z };