@react-querybuilder/core 8.17.0 → 8.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +57 -16
  2. package/dist/cjs/react-querybuilder_core.cjs.development.js +212 -206
  3. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  4. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +57 -16
  5. package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
  6. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  7. package/dist/{convertQuery-BoMPXL7_.js → convertQuery-BJKNgecE.js} +2 -2
  8. package/dist/{convertQuery-BoMPXL7_.js.map → convertQuery-BJKNgecE.js.map} +1 -1
  9. package/dist/{convertQuery-CQwOrjQr.mjs → convertQuery-J1CaoDxe.mjs} +2 -2
  10. package/dist/{convertQuery-CQwOrjQr.mjs.map → convertQuery-J1CaoDxe.mjs.map} +1 -1
  11. package/dist/formatQuery.d.mts +5 -3
  12. package/dist/formatQuery.d.ts +5 -3
  13. package/dist/formatQuery.js +203 -203
  14. package/dist/formatQuery.js.map +1 -1
  15. package/dist/formatQuery.mjs +203 -203
  16. package/dist/formatQuery.mjs.map +1 -1
  17. package/dist/{import-CSHMjlid.d.ts → import-Qs1-kgv5.d.ts} +2 -2
  18. package/dist/{import-BQ5xaW6i.d.mts → import-ShTj5IdB.d.mts} +2 -2
  19. package/dist/{index-CREDWM32.d.ts → index-DlVg-QXo.d.mts} +32 -3
  20. package/dist/{index-CREDWM32.d.mts → index-DlVg-QXo.d.ts} +32 -3
  21. package/dist/{objectUtils-DxVaGCdg.js → objectUtils-DBJI82bl.js} +2 -2
  22. package/dist/objectUtils-DBJI82bl.js.map +1 -0
  23. package/dist/{objectUtils-D-w8MzpZ.mjs → objectUtils-ZvPkF6u6.mjs} +2 -2
  24. package/dist/objectUtils-ZvPkF6u6.mjs.map +1 -0
  25. package/dist/parseCEL.d.mts +7 -7
  26. package/dist/parseCEL.d.ts +7 -7
  27. package/dist/parseCEL.js +6 -6
  28. package/dist/parseCEL.js.map +1 -1
  29. package/dist/parseCEL.mjs +6 -6
  30. package/dist/parseCEL.mjs.map +1 -1
  31. package/dist/parseCypher.d.mts +1 -1
  32. package/dist/parseCypher.d.ts +1 -1
  33. package/dist/parseCypher.js.map +1 -1
  34. package/dist/parseCypher.mjs.map +1 -1
  35. package/dist/parseGremlin.d.mts +1 -1
  36. package/dist/parseGremlin.d.ts +1 -1
  37. package/dist/parseGremlin.js.map +1 -1
  38. package/dist/parseGremlin.mjs.map +1 -1
  39. package/dist/parseJSONata.d.mts +2 -2
  40. package/dist/parseJSONata.d.ts +2 -2
  41. package/dist/parseJSONata.js +2 -2
  42. package/dist/parseJSONata.js.map +1 -1
  43. package/dist/parseJSONata.mjs +2 -2
  44. package/dist/parseJSONata.mjs.map +1 -1
  45. package/dist/parseJsonLogic.d.mts +2 -2
  46. package/dist/parseJsonLogic.d.ts +2 -2
  47. package/dist/parseJsonLogic.js +11 -11
  48. package/dist/parseJsonLogic.js.map +1 -1
  49. package/dist/parseJsonLogic.mjs +11 -11
  50. package/dist/parseJsonLogic.mjs.map +1 -1
  51. package/dist/parseMongoDB.d.mts +2 -2
  52. package/dist/parseMongoDB.d.ts +2 -2
  53. package/dist/parseMongoDB.js +4 -4
  54. package/dist/parseMongoDB.js.map +1 -1
  55. package/dist/parseMongoDB.mjs +4 -4
  56. package/dist/parseMongoDB.mjs.map +1 -1
  57. package/dist/parseSPARQL.d.mts +1 -1
  58. package/dist/parseSPARQL.d.ts +1 -1
  59. package/dist/parseSPARQL.js.map +1 -1
  60. package/dist/parseSPARQL.mjs.map +1 -1
  61. package/dist/parseSQL.d.mts +2 -2
  62. package/dist/parseSQL.d.ts +2 -2
  63. package/dist/parseSQL.js +3 -3
  64. package/dist/parseSQL.js.map +1 -1
  65. package/dist/parseSQL.mjs +3 -3
  66. package/dist/parseSQL.mjs.map +1 -1
  67. package/dist/parseSpEL.d.mts +2 -2
  68. package/dist/parseSpEL.d.ts +2 -2
  69. package/dist/parseSpEL.js +3 -3
  70. package/dist/parseSpEL.js.map +1 -1
  71. package/dist/parseSpEL.mjs +3 -3
  72. package/dist/parseSpEL.mjs.map +1 -1
  73. package/dist/{prepareQueryObjects-BXf5aV-A.mjs → prepareQueryObjects-Cd_tt4oy.mjs} +3 -3
  74. package/dist/{prepareQueryObjects-BXf5aV-A.mjs.map → prepareQueryObjects-Cd_tt4oy.mjs.map} +1 -1
  75. package/dist/{prepareQueryObjects-gRQqiBPR.js → prepareQueryObjects-DaAXX792.js} +3 -3
  76. package/dist/{prepareQueryObjects-gRQqiBPR.js.map → prepareQueryObjects-DaAXX792.js.map} +1 -1
  77. package/dist/react-querybuilder_core.d.mts +57 -16
  78. package/dist/react-querybuilder_core.legacy-esm.d.ts +57 -16
  79. package/dist/react-querybuilder_core.legacy-esm.js +210 -204
  80. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  81. package/dist/react-querybuilder_core.mjs +212 -206
  82. package/dist/react-querybuilder_core.mjs.map +1 -1
  83. package/dist/react-querybuilder_core.production.d.mts +57 -16
  84. package/dist/react-querybuilder_core.production.mjs +1 -1
  85. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  86. package/dist/transformQuery.d.mts +1 -1
  87. package/dist/transformQuery.d.ts +1 -1
  88. package/dist/transformQuery.js +1 -1
  89. package/dist/transformQuery.mjs +1 -1
  90. package/dist/{utils-ZlKseh1X.js → utils-BpaOtylk.js} +3 -3
  91. package/dist/utils-BpaOtylk.js.map +1 -0
  92. package/dist/{utils-01WaTGBL.mjs → utils-CJRGiPb-.mjs} +3 -3
  93. package/dist/utils-CJRGiPb-.mjs.map +1 -0
  94. package/package.json +12 -12
  95. package/dist/objectUtils-D-w8MzpZ.mjs.map +0 -1
  96. package/dist/objectUtils-DxVaGCdg.js.map +0 -1
  97. package/dist/utils-01WaTGBL.mjs.map +0 -1
  98. package/dist/utils-ZlKseh1X.js.map +0 -1
@@ -871,7 +871,36 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
871
871
  // Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
872
872
  ```
873
873
  */
874
- type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? undefined extends SpecifiedOptions[Key] ? never : Key : Key]: SpecifiedOptions[Key] }> & Required<Options>>>>;
874
+ type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
875
+ ? Result : never;
876
+ type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key] }>>>;
877
+ /**
878
+ Collapses literal types in a union into their corresponding primitive types, when possible. For example, `CollapseLiterals<'foo' | 'bar' | (string & {})>` returns `string`.
879
+
880
+ Note: This doesn't collapse literals within tagged types. For example, `CollapseLiterals<Tagged<'foo' | (string & {}), 'Tag'>>` returns `("foo" & Tag<"Tag", never>) | (string & Tag<"Tag", never>)` and not `string & Tag<"Tag", never>`.
881
+
882
+ Use-case: For collapsing unions created using {@link LiteralUnion}.
883
+
884
+ @example
885
+ ```
886
+ import type {LiteralUnion} from 'type-fest';
887
+
888
+ type A = CollapseLiterals<'foo' | 'bar' | (string & {})>;
889
+ //=> string
890
+
891
+ type B = CollapseLiterals<LiteralUnion<1 | 2 | 3, number>>;
892
+ //=> number
893
+
894
+ type C = CollapseLiterals<LiteralUnion<'onClick' | 'onChange', `on${string}`>>;
895
+ //=> `on${string}`
896
+
897
+ type D = CollapseLiterals<'click' | 'change' | (`on${string}` & {})>;
898
+ //=> 'click' | 'change' | `on${string}`
899
+
900
+ type E = CollapseLiterals<LiteralUnion<'foo' | 'bar', string> | null | undefined>;
901
+ //=> string | null | undefined
902
+ ```
903
+ */
875
904
  //#endregion
876
905
  //#region ../../node_modules/type-fest/source/except.d.ts
877
906
  /**
@@ -1119,7 +1148,7 @@ type SetArrayRequired<TArray extends UnknownArray, Keys, Counter extends any[] =
1119
1148
  : never; // Should never happen
1120
1149
  //#endregion
1121
1150
  //#region src/types/options.d.ts
1122
- type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { [Key in KeysType]-?: Required<Pick<ObjectType, Key>> & Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & Except<ObjectType, KeysType>;
1151
+ type RequireAtLeastOne<O, K extends keyof O> = { [P in K]-?: Required<Pick<O, P>> & Partial<Pick<O, Exclude<K, P>>> }[K] & Except<O, K>;
1123
1152
  type StringUnionToFlexibleOptionArray<Op extends string> = Array<Op extends unknown ? FlexibleOption<Op> : never>;
1124
1153
  type StringUnionToFullOptionArray<Op extends string> = Array<Op extends unknown ? FullOption<Op> : never>;
1125
1154
  /**
@@ -2552,6 +2581,10 @@ interface Classnames {
2552
2581
  * Classname(s) applied to async components in their "loading" state.
2553
2582
  */
2554
2583
  loading: Classname;
2584
+ /**
2585
+ * Classname(s) applied to value editors for relative date/time values.
2586
+ */
2587
+ valueDateTimeRelative: Classname;
2555
2588
  }
2556
2589
  /**
2557
2590
  * Placeholder strings for option lists.
@@ -2607,7 +2640,9 @@ interface BaseTranslations<LabelType = string> {
2607
2640
  operators: BaseTranslationWithPlaceholders;
2608
2641
  values: BaseTranslationWithPlaceholders;
2609
2642
  matchMode: BaseTranslation;
2610
- matchThreshold: BaseTranslation;
2643
+ matchThreshold: BaseTranslation & {
2644
+ placeholderName?: string;
2645
+ };
2611
2646
  value: BaseTranslation;
2612
2647
  removeRule: BaseTranslationWithLabel<LabelType>;
2613
2648
  removeGroup: BaseTranslationWithLabel<LabelType>;
@@ -2917,6 +2952,7 @@ declare const standardClassnames: {
2917
2952
  readonly justified: "queryBuilder-justified";
2918
2953
  readonly hasSubQuery: "rule-hasSubQuery";
2919
2954
  readonly loading: "queryBuilder-loading";
2955
+ readonly valueDateTimeRelative: "rule-value-dateTimeRelative";
2920
2956
  };
2921
2957
  /**
2922
2958
  * Default classnames for each component.
@@ -3021,20 +3057,23 @@ declare const splitBy: (str?: string, splitChar?: string) => string[];
3021
3057
  * // would return
3022
3058
  * 'this\\,\\,that, , the other, , , \\,'
3023
3059
  */
3024
- declare const joinWith: (strArr: any[], joinChar?: string) => string;
3060
+ declare const joinWith: (strArr: unknown[], joinChar?: string) => string;
3061
+ type IsUnknown<T> = unknown extends T ? true : false;
3062
+ type Trimmed<T> = IsUnknown<T> extends true ? string : T;
3025
3063
  /**
3026
3064
  * Trims the value if it is a string. Otherwise returns the value as is.
3027
3065
  */
3028
- declare const trimIfString: (val: any) => any;
3066
+ declare const trimIfString: <T>(val: T) => Trimmed<T>;
3067
+ type ToArrayResult<T> = IsUnknown<T> extends true ? string[] : T extends readonly (infer U)[] ? Trimmed<U>[] : T extends string ? string[] : T extends number ? number[] : never[];
3029
3068
  /**
3030
3069
  * Splits a string by comma then trims each element. Arrays are returned as is except
3031
3070
  * any string elements are trimmed.
3032
3071
  */
3033
- declare const toArray: (a: any, {
3072
+ declare const toArray: <T>(a: T, {
3034
3073
  retainEmptyStrings
3035
3074
  }?: {
3036
3075
  retainEmptyStrings?: boolean;
3037
- }) => any[];
3076
+ }) => ToArrayResult<T>;
3038
3077
  /**
3039
3078
  * Determines if an array is free of `null`/`undefined`.
3040
3079
  */
@@ -3751,7 +3790,7 @@ declare const numerifyValues: (rg: RuleGroupTypeAny, options: SetRequired<Format
3751
3790
  *
3752
3791
  * @group Export
3753
3792
  */
3754
- declare const isValidValue: (value: any) => boolean;
3793
+ declare const isValidValue: (value: unknown) => boolean;
3755
3794
  /**
3756
3795
  * Determines whether {@link formatQuery} should render the given value as a number.
3757
3796
  * As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and
@@ -3759,7 +3798,7 @@ declare const isValidValue: (value: any) => boolean;
3759
3798
  *
3760
3799
  * @group Export
3761
3800
  */
3762
- declare const shouldRenderAsNumber: (value: any, parseNumbers?: boolean) => boolean;
3801
+ declare const shouldRenderAsNumber: (value: unknown, parseNumbers?: boolean) => boolean;
3763
3802
  /**
3764
3803
  * Used by {@link formatQuery} to determine whether the given value processor is a
3765
3804
  * "legacy" value processor by counting the number of arguments. Legacy value
@@ -3868,6 +3907,8 @@ declare const bigIntJsonParseReviver: (_key: string, value: unknown) => unknown;
3868
3907
  /**
3869
3908
  * Default value processor used by {@link formatQuery} for "sql" format.
3870
3909
  *
3910
+ * @deprecated Prefer {@link defaultValueProcessorByRule}.
3911
+ *
3871
3912
  * @group Export
3872
3913
  */
3873
3914
  declare const defaultValueProcessor: ValueProcessorLegacy;
@@ -4020,7 +4061,7 @@ declare const numericRegex: RegExp;
4020
4061
  /**
4021
4062
  * Determines if a variable is a plain old JavaScript object, aka POJO.
4022
4063
  */
4023
- declare const isPojo: (obj: any) => obj is Record<string, any>;
4064
+ declare const isPojo: (obj: unknown) => obj is Record<string, any>;
4024
4065
  /**
4025
4066
  * Simple helper to determine whether a value is null, undefined, or an empty string.
4026
4067
  */
@@ -4101,25 +4142,25 @@ declare const uniqByIdentifier: <T extends RequireAtLeastOne$1<{
4101
4142
  *
4102
4143
  * @group Option Lists
4103
4144
  */
4104
- declare const isOptionGroupArray: (arr: any) => arr is OptionGroup<BaseOption>[];
4145
+ declare const isOptionGroupArray: (arr: unknown) => arr is OptionGroup<BaseOption>[];
4105
4146
  /**
4106
4147
  * Determines if an array is a flat array of {@link FlexibleOption}.
4107
4148
  *
4108
4149
  * @group Option Lists
4109
4150
  */
4110
- declare const isFlexibleOptionArray: (arr: any) => arr is FlexibleOption[];
4151
+ declare const isFlexibleOptionArray: (arr: unknown) => arr is FlexibleOption[];
4111
4152
  /**
4112
4153
  * Determines if an array is a flat array of {@link FullOption}.
4113
4154
  *
4114
4155
  * @group Option Lists
4115
4156
  */
4116
- declare const isFullOptionArray: (arr: any) => arr is FullOption[];
4157
+ declare const isFullOptionArray: (arr: unknown) => arr is FullOption[];
4117
4158
  /**
4118
4159
  * Determines if a {@link FlexibleOptionList} is a {@link FlexibleOptionGroup} array.
4119
4160
  *
4120
4161
  * @group Option Lists
4121
4162
  */
4122
- declare const isFlexibleOptionGroupArray: (arr: any, {
4163
+ declare const isFlexibleOptionGroupArray: (arr: unknown, {
4123
4164
  allowEmpty
4124
4165
  }?: {
4125
4166
  allowEmpty?: boolean;
@@ -4129,7 +4170,7 @@ declare const isFlexibleOptionGroupArray: (arr: any, {
4129
4170
  *
4130
4171
  * @group Option Lists
4131
4172
  */
4132
- declare const isFullOptionGroupArray: (arr: any, {
4173
+ declare const isFullOptionGroupArray: (arr: unknown, {
4133
4174
  allowEmpty
4134
4175
  }?: {
4135
4176
  allowEmpty?: boolean;
@@ -4204,7 +4245,7 @@ interface ParseNumberOptions {
4204
4245
  * If that returns `NaN`, the string is returned unchanged. Numeric values are returned
4205
4246
  * as-is regardless of the `parseNumbers` option.
4206
4247
  */
4207
- declare const parseNumber: (val: any, {
4248
+ declare const parseNumber: (val: unknown, {
4208
4249
  parseNumbers,
4209
4250
  bigIntOnOverflow
4210
4251
  }?: ParseNumberOptions) => any;
@@ -871,7 +871,36 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
871
871
  // Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
872
872
  ```
873
873
  */
874
- type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? undefined extends SpecifiedOptions[Key] ? never : Key : Key]: SpecifiedOptions[Key] }> & Required<Options>>>>;
874
+ type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
875
+ ? Result : never;
876
+ type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key] }>>>;
877
+ /**
878
+ Collapses literal types in a union into their corresponding primitive types, when possible. For example, `CollapseLiterals<'foo' | 'bar' | (string & {})>` returns `string`.
879
+
880
+ Note: This doesn't collapse literals within tagged types. For example, `CollapseLiterals<Tagged<'foo' | (string & {}), 'Tag'>>` returns `("foo" & Tag<"Tag", never>) | (string & Tag<"Tag", never>)` and not `string & Tag<"Tag", never>`.
881
+
882
+ Use-case: For collapsing unions created using {@link LiteralUnion}.
883
+
884
+ @example
885
+ ```
886
+ import type {LiteralUnion} from 'type-fest';
887
+
888
+ type A = CollapseLiterals<'foo' | 'bar' | (string & {})>;
889
+ //=> string
890
+
891
+ type B = CollapseLiterals<LiteralUnion<1 | 2 | 3, number>>;
892
+ //=> number
893
+
894
+ type C = CollapseLiterals<LiteralUnion<'onClick' | 'onChange', `on${string}`>>;
895
+ //=> `on${string}`
896
+
897
+ type D = CollapseLiterals<'click' | 'change' | (`on${string}` & {})>;
898
+ //=> 'click' | 'change' | `on${string}`
899
+
900
+ type E = CollapseLiterals<LiteralUnion<'foo' | 'bar', string> | null | undefined>;
901
+ //=> string | null | undefined
902
+ ```
903
+ */
875
904
  //#endregion
876
905
  //#region ../../node_modules/type-fest/source/except.d.ts
877
906
  /**
@@ -1119,7 +1148,7 @@ type SetArrayRequired<TArray extends UnknownArray, Keys, Counter extends any[] =
1119
1148
  : never; // Should never happen
1120
1149
  //#endregion
1121
1150
  //#region src/types/options.d.ts
1122
- type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { [Key in KeysType]-?: Required<Pick<ObjectType, Key>> & Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & Except<ObjectType, KeysType>;
1151
+ type RequireAtLeastOne<O, K extends keyof O> = { [P in K]-?: Required<Pick<O, P>> & Partial<Pick<O, Exclude<K, P>>> }[K] & Except<O, K>;
1123
1152
  type StringUnionToFlexibleOptionArray<Op extends string> = Array<Op extends unknown ? FlexibleOption<Op> : never>;
1124
1153
  type StringUnionToFullOptionArray<Op extends string> = Array<Op extends unknown ? FullOption<Op> : never>;
1125
1154
  /**
@@ -2552,6 +2581,10 @@ interface Classnames {
2552
2581
  * Classname(s) applied to async components in their "loading" state.
2553
2582
  */
2554
2583
  loading: Classname;
2584
+ /**
2585
+ * Classname(s) applied to value editors for relative date/time values.
2586
+ */
2587
+ valueDateTimeRelative: Classname;
2555
2588
  }
2556
2589
  /**
2557
2590
  * Placeholder strings for option lists.
@@ -2607,7 +2640,9 @@ interface BaseTranslations<LabelType = string> {
2607
2640
  operators: BaseTranslationWithPlaceholders;
2608
2641
  values: BaseTranslationWithPlaceholders;
2609
2642
  matchMode: BaseTranslation;
2610
- matchThreshold: BaseTranslation;
2643
+ matchThreshold: BaseTranslation & {
2644
+ placeholderName?: string;
2645
+ };
2611
2646
  value: BaseTranslation;
2612
2647
  removeRule: BaseTranslationWithLabel<LabelType>;
2613
2648
  removeGroup: BaseTranslationWithLabel<LabelType>;
@@ -2917,6 +2952,7 @@ declare const standardClassnames: {
2917
2952
  readonly justified: "queryBuilder-justified";
2918
2953
  readonly hasSubQuery: "rule-hasSubQuery";
2919
2954
  readonly loading: "queryBuilder-loading";
2955
+ readonly valueDateTimeRelative: "rule-value-dateTimeRelative";
2920
2956
  };
2921
2957
  /**
2922
2958
  * Default classnames for each component.
@@ -3021,20 +3057,23 @@ declare const splitBy: (str?: string, splitChar?: string) => string[];
3021
3057
  * // would return
3022
3058
  * 'this\\,\\,that, , the other, , , \\,'
3023
3059
  */
3024
- declare const joinWith: (strArr: any[], joinChar?: string) => string;
3060
+ declare const joinWith: (strArr: unknown[], joinChar?: string) => string;
3061
+ type IsUnknown<T> = unknown extends T ? true : false;
3062
+ type Trimmed<T> = IsUnknown<T> extends true ? string : T;
3025
3063
  /**
3026
3064
  * Trims the value if it is a string. Otherwise returns the value as is.
3027
3065
  */
3028
- declare const trimIfString: (val: any) => any;
3066
+ declare const trimIfString: <T>(val: T) => Trimmed<T>;
3067
+ type ToArrayResult<T> = IsUnknown<T> extends true ? string[] : T extends readonly (infer U)[] ? Trimmed<U>[] : T extends string ? string[] : T extends number ? number[] : never[];
3029
3068
  /**
3030
3069
  * Splits a string by comma then trims each element. Arrays are returned as is except
3031
3070
  * any string elements are trimmed.
3032
3071
  */
3033
- declare const toArray: (a: any, {
3072
+ declare const toArray: <T>(a: T, {
3034
3073
  retainEmptyStrings
3035
3074
  }?: {
3036
3075
  retainEmptyStrings?: boolean;
3037
- }) => any[];
3076
+ }) => ToArrayResult<T>;
3038
3077
  /**
3039
3078
  * Determines if an array is free of `null`/`undefined`.
3040
3079
  */
@@ -3751,7 +3790,7 @@ declare const numerifyValues: (rg: RuleGroupTypeAny, options: SetRequired<Format
3751
3790
  *
3752
3791
  * @group Export
3753
3792
  */
3754
- declare const isValidValue: (value: any) => boolean;
3793
+ declare const isValidValue: (value: unknown) => boolean;
3755
3794
  /**
3756
3795
  * Determines whether {@link formatQuery} should render the given value as a number.
3757
3796
  * As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and
@@ -3759,7 +3798,7 @@ declare const isValidValue: (value: any) => boolean;
3759
3798
  *
3760
3799
  * @group Export
3761
3800
  */
3762
- declare const shouldRenderAsNumber: (value: any, parseNumbers?: boolean) => boolean;
3801
+ declare const shouldRenderAsNumber: (value: unknown, parseNumbers?: boolean) => boolean;
3763
3802
  /**
3764
3803
  * Used by {@link formatQuery} to determine whether the given value processor is a
3765
3804
  * "legacy" value processor by counting the number of arguments. Legacy value
@@ -3868,6 +3907,8 @@ declare const bigIntJsonParseReviver: (_key: string, value: unknown) => unknown;
3868
3907
  /**
3869
3908
  * Default value processor used by {@link formatQuery} for "sql" format.
3870
3909
  *
3910
+ * @deprecated Prefer {@link defaultValueProcessorByRule}.
3911
+ *
3871
3912
  * @group Export
3872
3913
  */
3873
3914
  declare const defaultValueProcessor: ValueProcessorLegacy;
@@ -4020,7 +4061,7 @@ declare const numericRegex: RegExp;
4020
4061
  /**
4021
4062
  * Determines if a variable is a plain old JavaScript object, aka POJO.
4022
4063
  */
4023
- declare const isPojo: (obj: any) => obj is Record<string, any>;
4064
+ declare const isPojo: (obj: unknown) => obj is Record<string, any>;
4024
4065
  /**
4025
4066
  * Simple helper to determine whether a value is null, undefined, or an empty string.
4026
4067
  */
@@ -4101,25 +4142,25 @@ declare const uniqByIdentifier: <T extends RequireAtLeastOne$1<{
4101
4142
  *
4102
4143
  * @group Option Lists
4103
4144
  */
4104
- declare const isOptionGroupArray: (arr: any) => arr is OptionGroup<BaseOption>[];
4145
+ declare const isOptionGroupArray: (arr: unknown) => arr is OptionGroup<BaseOption>[];
4105
4146
  /**
4106
4147
  * Determines if an array is a flat array of {@link FlexibleOption}.
4107
4148
  *
4108
4149
  * @group Option Lists
4109
4150
  */
4110
- declare const isFlexibleOptionArray: (arr: any) => arr is FlexibleOption[];
4151
+ declare const isFlexibleOptionArray: (arr: unknown) => arr is FlexibleOption[];
4111
4152
  /**
4112
4153
  * Determines if an array is a flat array of {@link FullOption}.
4113
4154
  *
4114
4155
  * @group Option Lists
4115
4156
  */
4116
- declare const isFullOptionArray: (arr: any) => arr is FullOption[];
4157
+ declare const isFullOptionArray: (arr: unknown) => arr is FullOption[];
4117
4158
  /**
4118
4159
  * Determines if a {@link FlexibleOptionList} is a {@link FlexibleOptionGroup} array.
4119
4160
  *
4120
4161
  * @group Option Lists
4121
4162
  */
4122
- declare const isFlexibleOptionGroupArray: (arr: any, {
4163
+ declare const isFlexibleOptionGroupArray: (arr: unknown, {
4123
4164
  allowEmpty
4124
4165
  }?: {
4125
4166
  allowEmpty?: boolean;
@@ -4129,7 +4170,7 @@ declare const isFlexibleOptionGroupArray: (arr: any, {
4129
4170
  *
4130
4171
  * @group Option Lists
4131
4172
  */
4132
- declare const isFullOptionGroupArray: (arr: any, {
4173
+ declare const isFullOptionGroupArray: (arr: unknown, {
4133
4174
  allowEmpty
4134
4175
  }?: {
4135
4176
  allowEmpty?: boolean;
@@ -4204,7 +4245,7 @@ interface ParseNumberOptions {
4204
4245
  * If that returns `NaN`, the string is returned unchanged. Numeric values are returned
4205
4246
  * as-is regardless of the `parseNumbers` option.
4206
4247
  */
4207
- declare const parseNumber: (val: any, {
4248
+ declare const parseNumber: (val: unknown, {
4208
4249
  parseNumbers,
4209
4250
  bigIntOnOverflow
4210
4251
  }?: ParseNumberOptions) => any;