@react-querybuilder/core 8.10.0 → 8.11.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 (73) hide show
  1. package/dist/{arrayUtils-C9sO4qLO.mjs → arrayUtils-A_OXU9W1.mjs} +3 -3
  2. package/dist/{arrayUtils-C9sO4qLO.mjs.map → arrayUtils-A_OXU9W1.mjs.map} +1 -1
  3. package/dist/{basic-CDDA-KZa.d.ts → basic-DEc65Kng.d.mts} +21 -21
  4. package/dist/{basic-BmpEwexQ.d.mts → basic-Dd_M2f3M.d.ts} +21 -21
  5. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +412 -278
  6. package/dist/cjs/react-querybuilder_core.cjs.development.js +53 -1
  7. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  8. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +412 -278
  9. package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
  10. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  11. package/dist/{convertQuery-BUgyz1GA.mjs → convertQuery-CqX3rPvj.mjs} +3 -3
  12. package/dist/{convertQuery-BUgyz1GA.mjs.map → convertQuery-CqX3rPvj.mjs.map} +1 -1
  13. package/dist/{export-Ccjfea21.d.mts → export-Dy4FckB-.d.ts} +6 -6
  14. package/dist/{export-GUuxJ7zR.d.ts → export-t1V2N8pz.d.mts} +6 -6
  15. package/dist/formatQuery.d.mts +2 -2
  16. package/dist/formatQuery.d.ts +2 -2
  17. package/dist/formatQuery.mjs +6 -6
  18. package/dist/{import-Dxevzw_-.d.mts → import-Cz8canKo.d.mts} +3 -3
  19. package/dist/{import-D-hm1phN.d.ts → import-DtS9Ocx5.d.ts} +3 -3
  20. package/dist/{isRuleGroup-CGe_rb2w.mjs → isRuleGroup-CYcfPgbg.mjs} +2 -2
  21. package/dist/{isRuleGroup-CGe_rb2w.mjs.map → isRuleGroup-CYcfPgbg.mjs.map} +1 -1
  22. package/dist/lexer-C53tqS2p.js +406 -0
  23. package/dist/lexer-C53tqS2p.js.map +1 -0
  24. package/dist/optGroupUtils-B0hTpodo.js.map +1 -1
  25. package/dist/{optGroupUtils-DrubUpx0.mjs → optGroupUtils-VeZ3k7-1.mjs} +3 -3
  26. package/dist/optGroupUtils-VeZ3k7-1.mjs.map +1 -0
  27. package/dist/parseCEL.d.mts +2 -2
  28. package/dist/parseCEL.d.ts +2 -2
  29. package/dist/parseCEL.js +760 -1095
  30. package/dist/parseCEL.js.map +1 -1
  31. package/dist/parseCEL.mjs +763 -1099
  32. package/dist/parseCEL.mjs.map +1 -1
  33. package/dist/parseJSONata.d.mts +2 -2
  34. package/dist/parseJSONata.d.ts +2 -2
  35. package/dist/parseJSONata.mjs +3 -3
  36. package/dist/parseJsonLogic.d.mts +3 -3
  37. package/dist/parseJsonLogic.d.ts +3 -3
  38. package/dist/parseJsonLogic.mjs +5 -5
  39. package/dist/parseMongoDB.d.mts +2 -2
  40. package/dist/parseMongoDB.d.ts +2 -2
  41. package/dist/parseMongoDB.mjs +5 -5
  42. package/dist/{parseNumber-B_-sR6d5.mjs → parseNumber-CXdMVNFx.mjs} +2 -2
  43. package/dist/{parseNumber-B_-sR6d5.mjs.map → parseNumber-CXdMVNFx.mjs.map} +1 -1
  44. package/dist/parseSQL.d.mts +2 -2
  45. package/dist/parseSQL.d.ts +2 -2
  46. package/dist/parseSQL.js +2680 -3021
  47. package/dist/parseSQL.js.map +1 -1
  48. package/dist/parseSQL.mjs +2684 -3026
  49. package/dist/parseSQL.mjs.map +1 -1
  50. package/dist/parseSpEL.d.mts +2 -2
  51. package/dist/parseSpEL.d.ts +2 -2
  52. package/dist/parseSpEL.mjs +4 -4
  53. package/dist/{prepareQueryObjects-CJNpnGcJ.mjs → prepareQueryObjects-DPCC-iHp.mjs} +4 -4
  54. package/dist/{prepareQueryObjects-CJNpnGcJ.mjs.map → prepareQueryObjects-DPCC-iHp.mjs.map} +1 -1
  55. package/dist/query-builder.css +1 -1
  56. package/dist/query-builder.css.map +1 -1
  57. package/dist/react-querybuilder_core.d.mts +412 -278
  58. package/dist/react-querybuilder_core.legacy-esm.d.ts +412 -278
  59. package/dist/react-querybuilder_core.legacy-esm.js +57 -9
  60. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  61. package/dist/react-querybuilder_core.mjs +50 -2
  62. package/dist/react-querybuilder_core.mjs.map +1 -1
  63. package/dist/react-querybuilder_core.production.d.mts +412 -278
  64. package/dist/react-querybuilder_core.production.mjs +1 -1
  65. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  66. package/dist/styles/_main.scss +5 -0
  67. package/dist/{transformQuery-DHvtgDgZ.mjs → transformQuery-DCCpjtyq.mjs} +3 -3
  68. package/dist/{transformQuery-DHvtgDgZ.mjs.map → transformQuery-DCCpjtyq.mjs.map} +1 -1
  69. package/dist/transformQuery.d.mts +1 -1
  70. package/dist/transformQuery.d.ts +1 -1
  71. package/dist/transformQuery.mjs +2 -2
  72. package/package.json +9 -9
  73. package/dist/optGroupUtils-DrubUpx0.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { defaultJoinChar } from "./optGroupUtils-DrubUpx0.mjs";
1
+ import { c as defaultJoinChar } from "./optGroupUtils-VeZ3k7-1.mjs";
2
2
 
3
3
  //#region src/utils/arrayUtils.ts
4
4
  /**
@@ -46,5 +46,5 @@ const trimIfString = (val) => typeof val === "string" ? val.trim() : val;
46
46
  const toArray = (v, { retainEmptyStrings } = {}) => Array.isArray(v) ? v.map((v$1) => trimIfString(v$1)) : typeof v === "string" ? splitBy(v, defaultJoinChar).filter(retainEmptyStrings ? () => true : (s) => !/^\s*$/.test(s)).map((s) => s.trim()) : typeof v === "number" ? [v] : [];
47
47
 
48
48
  //#endregion
49
- export { joinWith, splitBy, toArray, trimIfString };
50
- //# sourceMappingURL=arrayUtils-C9sO4qLO.mjs.map
49
+ export { trimIfString as i, splitBy as n, toArray as r, joinWith as t };
50
+ //# sourceMappingURL=arrayUtils-A_OXU9W1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrayUtils-C9sO4qLO.mjs","names":["v"],"sources":["../src/utils/arrayUtils.ts"],"sourcesContent":["import { defaultJoinChar } from '../defaults';\n\n/**\n * Splits a string by a given character (see {@link defaultJoinChar}). Escaped characters\n * (characters preceded by a backslash) will not apply to the split, and the backslash will\n * be removed in the array element. Inverse of {@link joinWith}.\n *\n * @example\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,')\n * // or\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,', ',')\n * // would return\n * ['this,,that', '', 'the other', '', '', ',']\n */\nexport const splitBy = (str?: string, splitChar: string = defaultJoinChar): string[] =>\n typeof str === 'string'\n ? str\n .split(`\\\\${splitChar}`)\n .map(c => c.split(splitChar))\n .reduce((prev, curr, idx) => {\n if (idx === 0) {\n return curr;\n }\n return [...prev.slice(0, -1), `${prev.at(-1)}${splitChar}${curr[0]}`, ...curr.slice(1)];\n }, [])\n : [];\n\n/**\n * Joins an array of strings using the given character (see {@link defaultJoinChar}). When\n * the given character appears in an array element, a backslash will be added just before it\n * to distinguish it from the join character. Effectively the inverse of {@link splitBy}.\n *\n * TIP: The join character can actually be a string of any length. Only the first character\n * will be searched for in the array elements and preceded by a backslash.\n *\n * @example\n * joinWith(['this,,that', '', 'the other', '', '', ','], ', ')\n * // would return\n * 'this\\\\,\\\\,that, , the other, , , \\\\,'\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const joinWith = (strArr: any[], joinChar: string = defaultJoinChar): string =>\n strArr.map(str => `${str ?? ''}`.replaceAll(joinChar[0], `\\\\${joinChar[0]}`)).join(joinChar);\n\n/**\n * Trims the value if it is a string. Otherwise returns the value as is.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const trimIfString = (val: any): any => (typeof val === 'string' ? val.trim() : val);\n\n/**\n * Splits a string by comma then trims each element. Arrays are returned as is except\n * any string elements are trimmed.\n */\nexport const toArray = (\n // oxlint-disable-next-line typescript/no-explicit-any\n v: any,\n { retainEmptyStrings }: { retainEmptyStrings?: boolean } = {}\n // oxlint-disable-next-line typescript/no-explicit-any\n): any[] =>\n Array.isArray(v)\n ? v.map(v => trimIfString(v))\n : typeof v === 'string'\n ? splitBy(v, defaultJoinChar)\n .filter(retainEmptyStrings ? () => true : s => !/^\\s*$/.test(s))\n .map(s => s.trim())\n : typeof v === 'number'\n ? [v]\n : [];\n\n/**\n * Determines if an array is free of `null`/`undefined`.\n */\nexport const nullFreeArray = <T>(arr: T[]): arr is Exclude<T, null>[] =>\n arr.every(el => el === false || (el ?? false) !== false);\n"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAa,WAAW,KAAc,YAAoB,oBACxD,OAAO,QAAQ,WACX,IACG,MAAM,KAAK,YAAY,CACvB,KAAI,MAAK,EAAE,MAAM,UAAU,CAAC,CAC5B,QAAQ,MAAM,MAAM,QAAQ;AAC3B,KAAI,QAAQ,EACV,QAAO;AAET,QAAO;EAAC,GAAG,KAAK,MAAM,GAAG,GAAG;EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,YAAY,KAAK;EAAM,GAAG,KAAK,MAAM,EAAE;EAAC;GACtF,EAAE,CAAC,GACR,EAAE;;;;;;;;;;;;;;AAgBR,MAAa,YAAY,QAAe,WAAmB,oBACzD,OAAO,KAAI,QAAO,GAAG,OAAO,KAAK,WAAW,SAAS,IAAI,KAAK,SAAS,KAAK,CAAC,CAAC,KAAK,SAAS;;;;AAM9F,MAAa,gBAAgB,QAAmB,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAG;;;;;AAMvF,MAAa,WAEX,GACA,EAAE,uBAAyD,EAAE,KAG7D,MAAM,QAAQ,EAAE,GACZ,EAAE,KAAI,QAAK,aAAaA,IAAE,CAAC,GAC3B,OAAO,MAAM,WACX,QAAQ,GAAG,gBAAgB,CACxB,OAAO,2BAA2B,QAAO,MAAK,CAAC,QAAQ,KAAK,EAAE,CAAC,CAC/D,KAAI,MAAK,EAAE,MAAM,CAAC,GACrB,OAAO,MAAM,WACX,CAAC,EAAE,GACH,EAAE"}
1
+ {"version":3,"file":"arrayUtils-A_OXU9W1.mjs","names":["v"],"sources":["../src/utils/arrayUtils.ts"],"sourcesContent":["import { defaultJoinChar } from '../defaults';\n\n/**\n * Splits a string by a given character (see {@link defaultJoinChar}). Escaped characters\n * (characters preceded by a backslash) will not apply to the split, and the backslash will\n * be removed in the array element. Inverse of {@link joinWith}.\n *\n * @example\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,')\n * // or\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,', ',')\n * // would return\n * ['this,,that', '', 'the other', '', '', ',']\n */\nexport const splitBy = (str?: string, splitChar: string = defaultJoinChar): string[] =>\n typeof str === 'string'\n ? str\n .split(`\\\\${splitChar}`)\n .map(c => c.split(splitChar))\n .reduce((prev, curr, idx) => {\n if (idx === 0) {\n return curr;\n }\n return [...prev.slice(0, -1), `${prev.at(-1)}${splitChar}${curr[0]}`, ...curr.slice(1)];\n }, [])\n : [];\n\n/**\n * Joins an array of strings using the given character (see {@link defaultJoinChar}). When\n * the given character appears in an array element, a backslash will be added just before it\n * to distinguish it from the join character. Effectively the inverse of {@link splitBy}.\n *\n * TIP: The join character can actually be a string of any length. Only the first character\n * will be searched for in the array elements and preceded by a backslash.\n *\n * @example\n * joinWith(['this,,that', '', 'the other', '', '', ','], ', ')\n * // would return\n * 'this\\\\,\\\\,that, , the other, , , \\\\,'\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const joinWith = (strArr: any[], joinChar: string = defaultJoinChar): string =>\n strArr.map(str => `${str ?? ''}`.replaceAll(joinChar[0], `\\\\${joinChar[0]}`)).join(joinChar);\n\n/**\n * Trims the value if it is a string. Otherwise returns the value as is.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const trimIfString = (val: any): any => (typeof val === 'string' ? val.trim() : val);\n\n/**\n * Splits a string by comma then trims each element. Arrays are returned as is except\n * any string elements are trimmed.\n */\nexport const toArray = (\n // oxlint-disable-next-line typescript/no-explicit-any\n v: any,\n { retainEmptyStrings }: { retainEmptyStrings?: boolean } = {}\n // oxlint-disable-next-line typescript/no-explicit-any\n): any[] =>\n Array.isArray(v)\n ? v.map(v => trimIfString(v))\n : typeof v === 'string'\n ? splitBy(v, defaultJoinChar)\n .filter(retainEmptyStrings ? () => true : s => !/^\\s*$/.test(s))\n .map(s => s.trim())\n : typeof v === 'number'\n ? [v]\n : [];\n\n/**\n * Determines if an array is free of `null`/`undefined`.\n */\nexport const nullFreeArray = <T>(arr: T[]): arr is Exclude<T, null>[] =>\n arr.every(el => el === false || (el ?? false) !== false);\n"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAa,WAAW,KAAc,YAAoB,oBACxD,OAAO,QAAQ,WACX,IACG,MAAM,KAAK,YAAY,CACvB,KAAI,MAAK,EAAE,MAAM,UAAU,CAAC,CAC5B,QAAQ,MAAM,MAAM,QAAQ;AAC3B,KAAI,QAAQ,EACV,QAAO;AAET,QAAO;EAAC,GAAG,KAAK,MAAM,GAAG,GAAG;EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,YAAY,KAAK;EAAM,GAAG,KAAK,MAAM,EAAE;EAAC;GACtF,EAAE,CAAC,GACR,EAAE;;;;;;;;;;;;;;AAgBR,MAAa,YAAY,QAAe,WAAmB,oBACzD,OAAO,KAAI,QAAO,GAAG,OAAO,KAAK,WAAW,SAAS,IAAI,KAAK,SAAS,KAAK,CAAC,CAAC,KAAK,SAAS;;;;AAM9F,MAAa,gBAAgB,QAAmB,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAG;;;;;AAMvF,MAAa,WAEX,GACA,EAAE,uBAAyD,EAAE,KAG7D,MAAM,QAAQ,EAAE,GACZ,EAAE,KAAI,QAAK,aAAaA,IAAE,CAAC,GAC3B,OAAO,MAAM,WACX,QAAQ,GAAG,gBAAgB,CACxB,OAAO,2BAA2B,QAAO,MAAK,CAAC,QAAQ,KAAK,EAAE,CAAC,CAC/D,KAAI,MAAK,EAAE,MAAM,CAAC,GACrB,OAAO,MAAM,WACX,CAAC,EAAE,GACH,EAAE"}
@@ -1,7 +1,7 @@
1
- import { Except, RequireAtLeastOne, SetRequired, Simplify } from "type-fest";
1
+ import { Except, SetRequired, Simplify } from "type-fest";
2
2
 
3
3
  //#region src/types/options.d.ts
4
-
4
+ type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { [Key in KeysType]-?: Required<Pick<ObjectType, Key>> & Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & Except<ObjectType, KeysType>;
5
5
  /**
6
6
  * Adds an `unknown` index property to an interface.
7
7
  */
@@ -31,8 +31,8 @@ interface BaseOption<N extends string = string> {
31
31
  type Option<N extends string = string> = Simplify<WithUnknownIndex<SetRequired<BaseOption<N>, "name">>>;
32
32
  /**
33
33
  * A generic {@link Option} with either a `name` or `value` as its primary identifier.
34
- * {@link OptionList}-type props on the {@link QueryBuilder} component accept this type,
35
- * but corresponding props passed down to subcomponents will always be translated
34
+ * {@link OptionList}-type props on the {@link react-querybuilder!QueryBuilder QueryBuilder} component accept this type,
35
+ * but corresponding props passed down to subcomponents will always be augmented
36
36
  * to {@link FullOption} first.
37
37
  *
38
38
  * @group Option Lists
@@ -44,11 +44,11 @@ type FlexibleOption<N extends string = string> = Simplify<WithUnknownIndex<Requi
44
44
  *
45
45
  * @group Option Lists
46
46
  */
47
- type ToFlexibleOption<Opt extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt extends string ? FlexibleOption<Opt> : Opt, "name" | "value">>;
47
+ type ToFlexibleOption<Opt$1 extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt$1 extends string ? FlexibleOption<Opt$1> : Opt$1, "name" | "value">>;
48
48
  /**
49
49
  * A generic {@link Option} requiring both `name` _and_ `value` properties.
50
50
  * Props that extend {@link OptionList} accept {@link BaseOption}, but
51
- * corresponding props sent to subcomponents will always be translated to this
51
+ * corresponding props sent to subcomponents will always be augmented to this
52
52
  * type first to ensure both `name` and `value` are available.
53
53
  *
54
54
  * NOTE: Do not extend from this type directly. Use {@link BaseFullOption}
@@ -72,38 +72,38 @@ type BaseFullOption<N extends string = string> = Simplify<SetRequired<BaseOption
72
72
  *
73
73
  * @group Option Lists
74
74
  */
75
- type ToFullOption<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt : Opt extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt & FullOption<IdentifierType>> : never;
75
+ type ToFullOption<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1 : Opt$1 extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt$1 & FullOption<IdentifierType>> : never;
76
76
  /**
77
77
  * A group of {@link Option}s, usually within an {@link OptionList}.
78
78
  *
79
79
  * @group Option Lists
80
80
  */
81
- interface OptionGroup<Opt extends BaseOption = FlexibleOption> {
81
+ interface OptionGroup<Opt$1 extends BaseOption = FlexibleOption> {
82
82
  label: string;
83
- options: WithUnknownIndex<Opt>[];
83
+ options: WithUnknownIndex<Opt$1>[];
84
84
  }
85
85
  /**
86
86
  * A group of {@link BaseOption}s, usually within a {@link FlexibleOptionList}.
87
87
  *
88
88
  * @group Option Lists
89
89
  */
90
- type FlexibleOptionGroup<Opt extends BaseOption | string = BaseOption> = {
90
+ type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
91
91
  label: string;
92
- options: (Opt extends BaseFullOption ? Opt : ToFlexibleOption<Opt>)[];
92
+ options: (Opt$1 extends BaseFullOption ? Opt$1 : ToFlexibleOption<Opt$1>)[];
93
93
  };
94
94
  /**
95
95
  * Either an array of {@link Option}s or an array of {@link OptionGroup}s.
96
96
  *
97
97
  * @group Option Lists
98
98
  */
99
- type OptionList<Opt extends Option = Option> = Opt[] | OptionGroup<Opt>[];
99
+ type OptionList<Opt$1 extends Option = Option> = Opt$1[] | OptionGroup<Opt$1>[];
100
100
  /**
101
101
  * An array of options or option groups, like {@link OptionList} but the option type
102
102
  * may use either `name` or `value` as the primary identifier.
103
103
  *
104
104
  * @group Option Lists
105
105
  */
106
- type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | FlexibleOptionGroup<ToFlexibleOption<Opt>>[];
106
+ type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] | FlexibleOptionGroup<ToFlexibleOption<Opt$1>>[];
107
107
  /**
108
108
  * An array of options or option groups, like {@link OptionList}, but using
109
109
  * {@link FullOption} instead of {@link Option}. This means that every member is
@@ -111,7 +111,7 @@ type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | Flex
111
111
  *
112
112
  * @group Option Lists
113
113
  */
114
- type FullOptionList<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt[] | OptionGroup<Opt>[] : ToFullOption<Opt>[] | OptionGroup<ToFullOption<Opt>>[];
114
+ type FullOptionList<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1[] | OptionGroup<Opt$1>[] : ToFullOption<Opt$1>[] | OptionGroup<ToFullOption<Opt$1>>[];
115
115
  //#endregion
116
116
  //#region src/types/ruleGroups.d.ts
117
117
  /**
@@ -266,7 +266,7 @@ type Classname = string | string[] | Record<string, any>;
266
266
  */
267
267
  type ValueSource = "value" | "field";
268
268
  /**
269
- * Type of {@link ValueEditor} that will be displayed.
269
+ * Type of {@link react-querybuilder!ValueEditor ValueEditor} that will be displayed.
270
270
  */
271
271
  type ValueEditorType = "text" | "select" | "checkbox" | "radio" | "textarea" | "switch" | "multiselect" | null;
272
272
  /**
@@ -317,7 +317,7 @@ interface BaseFullField<FieldName extends string = string, OperatorName extends
317
317
  comparator?: string | ((f: FullField, operator: string) => boolean);
318
318
  }
319
319
  /**
320
- * Full field definition used in the `fields` prop of {@link QueryBuilder}.
320
+ * Full field definition used in the `fields` prop of {@link react-querybuilder!QueryBuilder QueryBuilder}.
321
321
  * This type requires both `name` and `value`, but the `fields` prop itself
322
322
  * can use a {@link FlexibleOption} where only one of `name` or `value` is
323
323
  * required (along with `label`), or {@link Field} where only `name` and
@@ -331,12 +331,12 @@ interface BaseFullField<FieldName extends string = string, OperatorName extends
331
331
  type FullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> = Simplify<FullOption<FieldName> & BaseFullField<FieldName, OperatorName, ValueName, OperatorObj, ValueObj>>;
332
332
  /**
333
333
  * Allowed values of the {@link FullOperator} property `arity`. A value of `"unary"` or
334
- * a number less than two will cause the default {@link ValueEditor} to render `null`.
334
+ * a number less than two will cause the default {@link react-querybuilder!ValueEditor ValueEditor} to render `null`.
335
335
  */
336
336
  type Arity = number | "unary" | "binary" | "ternary";
337
337
  /**
338
338
  * Full operator definition used in the `operators`/`getOperators` props of
339
- * {@link QueryBuilder}. This type requires both `name` and `value`, but the
339
+ * {@link react-querybuilder!QueryBuilder QueryBuilder}. This type requires both `name` and `value`, but the
340
340
  * `operators`/`getOperators` props themselves can use a {@link FlexibleOption}
341
341
  * where only one of `name` or `value` is required, or {@link FullOperator} where
342
342
  * only `name` is required.
@@ -355,9 +355,9 @@ type ParseNumberMethodName = "enhanced" | "native" | "strict";
355
355
 
356
356
  type ParseNumbersModerationLevel = "-limited" | "";
357
357
  /**
358
- * Options for the `parseNumbers` prop of {@link QueryBuilder}.
358
+ * Options for the `parseNumbers` prop of {@link react-querybuilder!QueryBuilder QueryBuilder}.
359
359
  */
360
360
  type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersModerationLevel}`;
361
361
  //#endregion
362
- export { DefaultCombinatorName, DefaultOperatorName, DefaultRuleGroupType, DefaultRuleGroupTypeIC, FlexibleOptionList, FullField, FullOperator, FullOptionList, InputType, OptionList, ParseNumbersPropConfig, QueryValidator, RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType, RuleValidator, ValidationMap, ValidationResult, ValueSource, ValueSources };
363
- //# sourceMappingURL=basic-CDDA-KZa.d.ts.map
362
+ export { RuleGroupType as _, ValueSource as a, FullOptionList as b, RuleValidator as c, DefaultRuleGroupTypeIC as d, RuleGroupTypeAny as f, DefaultRuleGroupType as g, DefaultOperatorName as h, ParseNumbersPropConfig as i, ValidationMap as l, DefaultCombinatorName as m, FullOperator as n, ValueSources as o, RuleGroupTypeIC as p, InputType as r, QueryValidator as s, FullField as t, ValidationResult as u, RuleType as v, OptionList as x, FlexibleOptionList as y };
363
+ //# sourceMappingURL=basic-DEc65Kng.d.mts.map
@@ -1,7 +1,7 @@
1
- import { Except, RequireAtLeastOne, SetRequired, Simplify } from "type-fest";
1
+ import { Except, SetRequired, Simplify } from "type-fest";
2
2
 
3
3
  //#region src/types/options.d.ts
4
-
4
+ type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { [Key in KeysType]-?: Required<Pick<ObjectType, Key>> & Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & Except<ObjectType, KeysType>;
5
5
  /**
6
6
  * Adds an `unknown` index property to an interface.
7
7
  */
@@ -31,8 +31,8 @@ interface BaseOption<N extends string = string> {
31
31
  type Option<N extends string = string> = Simplify<WithUnknownIndex<SetRequired<BaseOption<N>, "name">>>;
32
32
  /**
33
33
  * A generic {@link Option} with either a `name` or `value` as its primary identifier.
34
- * {@link OptionList}-type props on the {@link QueryBuilder} component accept this type,
35
- * but corresponding props passed down to subcomponents will always be translated
34
+ * {@link OptionList}-type props on the {@link react-querybuilder!QueryBuilder QueryBuilder} component accept this type,
35
+ * but corresponding props passed down to subcomponents will always be augmented
36
36
  * to {@link FullOption} first.
37
37
  *
38
38
  * @group Option Lists
@@ -44,11 +44,11 @@ type FlexibleOption<N extends string = string> = Simplify<WithUnknownIndex<Requi
44
44
  *
45
45
  * @group Option Lists
46
46
  */
47
- type ToFlexibleOption<Opt extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt extends string ? FlexibleOption<Opt> : Opt, "name" | "value">>;
47
+ type ToFlexibleOption<Opt$1 extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt$1 extends string ? FlexibleOption<Opt$1> : Opt$1, "name" | "value">>;
48
48
  /**
49
49
  * A generic {@link Option} requiring both `name` _and_ `value` properties.
50
50
  * Props that extend {@link OptionList} accept {@link BaseOption}, but
51
- * corresponding props sent to subcomponents will always be translated to this
51
+ * corresponding props sent to subcomponents will always be augmented to this
52
52
  * type first to ensure both `name` and `value` are available.
53
53
  *
54
54
  * NOTE: Do not extend from this type directly. Use {@link BaseFullOption}
@@ -72,38 +72,38 @@ type BaseFullOption<N extends string = string> = Simplify<SetRequired<BaseOption
72
72
  *
73
73
  * @group Option Lists
74
74
  */
75
- type ToFullOption<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt : Opt extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt & FullOption<IdentifierType>> : never;
75
+ type ToFullOption<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1 : Opt$1 extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt$1 & FullOption<IdentifierType>> : never;
76
76
  /**
77
77
  * A group of {@link Option}s, usually within an {@link OptionList}.
78
78
  *
79
79
  * @group Option Lists
80
80
  */
81
- interface OptionGroup<Opt extends BaseOption = FlexibleOption> {
81
+ interface OptionGroup<Opt$1 extends BaseOption = FlexibleOption> {
82
82
  label: string;
83
- options: WithUnknownIndex<Opt>[];
83
+ options: WithUnknownIndex<Opt$1>[];
84
84
  }
85
85
  /**
86
86
  * A group of {@link BaseOption}s, usually within a {@link FlexibleOptionList}.
87
87
  *
88
88
  * @group Option Lists
89
89
  */
90
- type FlexibleOptionGroup<Opt extends BaseOption | string = BaseOption> = {
90
+ type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
91
91
  label: string;
92
- options: (Opt extends BaseFullOption ? Opt : ToFlexibleOption<Opt>)[];
92
+ options: (Opt$1 extends BaseFullOption ? Opt$1 : ToFlexibleOption<Opt$1>)[];
93
93
  };
94
94
  /**
95
95
  * Either an array of {@link Option}s or an array of {@link OptionGroup}s.
96
96
  *
97
97
  * @group Option Lists
98
98
  */
99
- type OptionList<Opt extends Option = Option> = Opt[] | OptionGroup<Opt>[];
99
+ type OptionList<Opt$1 extends Option = Option> = Opt$1[] | OptionGroup<Opt$1>[];
100
100
  /**
101
101
  * An array of options or option groups, like {@link OptionList} but the option type
102
102
  * may use either `name` or `value` as the primary identifier.
103
103
  *
104
104
  * @group Option Lists
105
105
  */
106
- type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | FlexibleOptionGroup<ToFlexibleOption<Opt>>[];
106
+ type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] | FlexibleOptionGroup<ToFlexibleOption<Opt$1>>[];
107
107
  /**
108
108
  * An array of options or option groups, like {@link OptionList}, but using
109
109
  * {@link FullOption} instead of {@link Option}. This means that every member is
@@ -111,7 +111,7 @@ type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | Flex
111
111
  *
112
112
  * @group Option Lists
113
113
  */
114
- type FullOptionList<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt[] | OptionGroup<Opt>[] : ToFullOption<Opt>[] | OptionGroup<ToFullOption<Opt>>[];
114
+ type FullOptionList<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1[] | OptionGroup<Opt$1>[] : ToFullOption<Opt$1>[] | OptionGroup<ToFullOption<Opt$1>>[];
115
115
  //#endregion
116
116
  //#region src/types/ruleGroups.d.ts
117
117
  /**
@@ -266,7 +266,7 @@ type Classname = string | string[] | Record<string, any>;
266
266
  */
267
267
  type ValueSource = "value" | "field";
268
268
  /**
269
- * Type of {@link ValueEditor} that will be displayed.
269
+ * Type of {@link react-querybuilder!ValueEditor ValueEditor} that will be displayed.
270
270
  */
271
271
  type ValueEditorType = "text" | "select" | "checkbox" | "radio" | "textarea" | "switch" | "multiselect" | null;
272
272
  /**
@@ -317,7 +317,7 @@ interface BaseFullField<FieldName extends string = string, OperatorName extends
317
317
  comparator?: string | ((f: FullField, operator: string) => boolean);
318
318
  }
319
319
  /**
320
- * Full field definition used in the `fields` prop of {@link QueryBuilder}.
320
+ * Full field definition used in the `fields` prop of {@link react-querybuilder!QueryBuilder QueryBuilder}.
321
321
  * This type requires both `name` and `value`, but the `fields` prop itself
322
322
  * can use a {@link FlexibleOption} where only one of `name` or `value` is
323
323
  * required (along with `label`), or {@link Field} where only `name` and
@@ -331,12 +331,12 @@ interface BaseFullField<FieldName extends string = string, OperatorName extends
331
331
  type FullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> = Simplify<FullOption<FieldName> & BaseFullField<FieldName, OperatorName, ValueName, OperatorObj, ValueObj>>;
332
332
  /**
333
333
  * Allowed values of the {@link FullOperator} property `arity`. A value of `"unary"` or
334
- * a number less than two will cause the default {@link ValueEditor} to render `null`.
334
+ * a number less than two will cause the default {@link react-querybuilder!ValueEditor ValueEditor} to render `null`.
335
335
  */
336
336
  type Arity = number | "unary" | "binary" | "ternary";
337
337
  /**
338
338
  * Full operator definition used in the `operators`/`getOperators` props of
339
- * {@link QueryBuilder}. This type requires both `name` and `value`, but the
339
+ * {@link react-querybuilder!QueryBuilder QueryBuilder}. This type requires both `name` and `value`, but the
340
340
  * `operators`/`getOperators` props themselves can use a {@link FlexibleOption}
341
341
  * where only one of `name` or `value` is required, or {@link FullOperator} where
342
342
  * only `name` is required.
@@ -355,9 +355,9 @@ type ParseNumberMethodName = "enhanced" | "native" | "strict";
355
355
 
356
356
  type ParseNumbersModerationLevel = "-limited" | "";
357
357
  /**
358
- * Options for the `parseNumbers` prop of {@link QueryBuilder}.
358
+ * Options for the `parseNumbers` prop of {@link react-querybuilder!QueryBuilder QueryBuilder}.
359
359
  */
360
360
  type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersModerationLevel}`;
361
361
  //#endregion
362
- export { DefaultCombinatorName, DefaultOperatorName, DefaultRuleGroupType, DefaultRuleGroupTypeIC, FlexibleOptionList, FullField, FullOperator, FullOptionList, InputType, OptionList, ParseNumbersPropConfig, QueryValidator, RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType, RuleValidator, ValidationMap, ValidationResult, ValueSource, ValueSources };
363
- //# sourceMappingURL=basic-BmpEwexQ.d.mts.map
362
+ export { RuleGroupType as _, ValueSource as a, FullOptionList as b, RuleValidator as c, DefaultRuleGroupTypeIC as d, RuleGroupTypeAny as f, DefaultRuleGroupType as g, DefaultOperatorName as h, ParseNumbersPropConfig as i, ValidationMap as l, DefaultCombinatorName as m, FullOperator as n, ValueSources as o, RuleGroupTypeIC as p, InputType as r, QueryValidator as s, FullField as t, ValidationResult as u, RuleType as v, OptionList as x, FlexibleOptionList as y };
363
+ //# sourceMappingURL=basic-Dd_M2f3M.d.ts.map