@react-querybuilder/core 8.16.0 → 8.16.2

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 (74) hide show
  1. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +43 -4
  2. package/dist/cjs/react-querybuilder_core.cjs.development.js +182 -18
  3. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  4. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +43 -4
  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-BeJJH9BI.mjs.map +1 -1
  8. package/dist/convertQuery-Lx2HQa0m.js.map +1 -1
  9. package/dist/formatQuery.d.mts +42 -3
  10. package/dist/formatQuery.d.ts +42 -3
  11. package/dist/formatQuery.js +182 -18
  12. package/dist/formatQuery.js.map +1 -1
  13. package/dist/formatQuery.mjs +180 -19
  14. package/dist/formatQuery.mjs.map +1 -1
  15. package/dist/{import-BHlzBLM_.d.mts → import-BXXgiPlr.d.mts} +2 -2
  16. package/dist/{import-C6imciDf.d.ts → import-DqzM2MBd.d.ts} +2 -2
  17. package/dist/{index-D-Iej37L.d.mts → index-CR-tk4Ci.d.mts} +3 -3
  18. package/dist/{index-Cjapnb-H.d.ts → index-NSVgGj45.d.ts} +3 -3
  19. package/dist/objectUtils-Bzug_QfX.js.map +1 -1
  20. package/dist/objectUtils-D96eEEzL.mjs.map +1 -1
  21. package/dist/parseCEL.d.mts +2 -2
  22. package/dist/parseCEL.d.ts +2 -2
  23. package/dist/parseCEL.js.map +1 -1
  24. package/dist/parseCEL.mjs.map +1 -1
  25. package/dist/parseCypher.d.mts +1 -1
  26. package/dist/parseCypher.d.ts +1 -1
  27. package/dist/parseCypher.js.map +1 -1
  28. package/dist/parseCypher.mjs.map +1 -1
  29. package/dist/parseGremlin.d.mts +1 -1
  30. package/dist/parseGremlin.d.ts +1 -1
  31. package/dist/parseGremlin.js.map +1 -1
  32. package/dist/parseGremlin.mjs.map +1 -1
  33. package/dist/parseJSONata.d.mts +2 -2
  34. package/dist/parseJSONata.d.ts +2 -2
  35. package/dist/parseJSONata.js.map +1 -1
  36. package/dist/parseJSONata.mjs.map +1 -1
  37. package/dist/parseJsonLogic.d.mts +2 -2
  38. package/dist/parseJsonLogic.d.ts +2 -2
  39. package/dist/parseJsonLogic.js.map +1 -1
  40. package/dist/parseJsonLogic.mjs.map +1 -1
  41. package/dist/parseMongoDB.d.mts +2 -2
  42. package/dist/parseMongoDB.d.ts +2 -2
  43. package/dist/parseMongoDB.js.map +1 -1
  44. package/dist/parseMongoDB.mjs.map +1 -1
  45. package/dist/parseSPARQL.d.mts +1 -1
  46. package/dist/parseSPARQL.d.ts +1 -1
  47. package/dist/parseSPARQL.js.map +1 -1
  48. package/dist/parseSPARQL.mjs.map +1 -1
  49. package/dist/parseSQL.d.mts +2 -2
  50. package/dist/parseSQL.d.ts +2 -2
  51. package/dist/parseSQL.js.map +1 -1
  52. package/dist/parseSQL.mjs.map +1 -1
  53. package/dist/parseSpEL.d.mts +2 -2
  54. package/dist/parseSpEL.d.ts +2 -2
  55. package/dist/parseSpEL.js.map +1 -1
  56. package/dist/parseSpEL.mjs.map +1 -1
  57. package/dist/prepareQueryObjects-BoG5Rt8z.js.map +1 -1
  58. package/dist/prepareQueryObjects-uA10ZpZX.mjs.map +1 -1
  59. package/dist/react-querybuilder_core.d.mts +43 -4
  60. package/dist/react-querybuilder_core.legacy-esm.d.ts +43 -4
  61. package/dist/react-querybuilder_core.legacy-esm.js +192 -31
  62. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  63. package/dist/react-querybuilder_core.mjs +180 -19
  64. package/dist/react-querybuilder_core.mjs.map +1 -1
  65. package/dist/react-querybuilder_core.production.d.mts +43 -4
  66. package/dist/react-querybuilder_core.production.mjs +1 -1
  67. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  68. package/dist/transformQuery.d.mts +1 -1
  69. package/dist/transformQuery.d.ts +1 -1
  70. package/dist/transformQuery.js.map +1 -1
  71. package/dist/transformQuery.mjs.map +1 -1
  72. package/dist/utils-ChLG90DP.mjs.map +1 -1
  73. package/dist/utils-Qwkq2Q0F.js.map +1 -1
  74. package/package.json +19 -15
@@ -1,4 +1,4 @@
1
- import { b as ValueSources, k as OptionList, y as FullField } from "./index-D-Iej37L.mjs";
1
+ import { b as ValueSources, k as OptionList, y as FullField } from "./index-CR-tk4Ci.mjs";
2
2
 
3
3
  //#region src/types/import.d.ts
4
4
  /**
@@ -24,4 +24,4 @@ interface ParserCommonOptions {
24
24
  }
25
25
  //#endregion
26
26
  export { ParserCommonOptions as t };
27
- //# sourceMappingURL=import-BHlzBLM_.d.mts.map
27
+ //# sourceMappingURL=import-BXXgiPlr.d.mts.map
@@ -1,4 +1,4 @@
1
- import { b as ValueSources, k as OptionList, y as FullField } from "./index-Cjapnb-H.js";
1
+ import { b as ValueSources, k as OptionList, y as FullField } from "./index-NSVgGj45.js";
2
2
 
3
3
  //#region src/types/import.d.ts
4
4
  /**
@@ -24,4 +24,4 @@ interface ParserCommonOptions {
24
24
  }
25
25
  //#endregion
26
26
  export { ParserCommonOptions as t };
27
- //# sourceMappingURL=import-C6imciDf.d.ts.map
27
+ //# sourceMappingURL=import-DqzM2MBd.d.ts.map
@@ -1311,7 +1311,7 @@ type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersM
1311
1311
  *
1312
1312
  * @group Export
1313
1313
  */
1314
- type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "prisma" | "sequelize" | "cypher" | "gql" | "sparql" | "gremlin" | "diagnostics";
1314
+ type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "tanstack_db" | "prisma" | "sequelize" | "cypher" | "gql" | "sparql" | "gremlin" | "diagnostics";
1315
1315
  /**
1316
1316
  * Export formats for {@link formatQuery} that produce objects instead of strings.
1317
1317
  *
@@ -1887,7 +1887,7 @@ type GroupVariantCondition = "not" | "xor";
1887
1887
  *
1888
1888
  * @group Export
1889
1889
  */
1890
- type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMoreGroupVariants}` | `groupSuffix${ZeroOrMoreGroupVariants}`;
1890
+ type NLTranslationKey = "and" | "or" | "true" | "false" | "ruleSeparator" | "betweenAnd" | "afterSubject" | "afterVerb" | "afterObject" | "listSeparator" | `groupPrefix${ZeroOrMoreGroupVariants}` | `groupSuffix${ZeroOrMoreGroupVariants}`;
1891
1891
  /**
1892
1892
  * `translations` config object for "natural_language" format.
1893
1893
  *
@@ -1896,4 +1896,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMo
1896
1896
  type NLTranslations = Partial<Record<NLTranslationKey, string>>;
1897
1897
  //#endregion
1898
1898
  export { SetRequired as A, RuleGroupTypeIC as C, RuleGroupType as D, DefaultRuleGroupType as E, RuleType as O, RuleGroupTypeAny as S, DefaultOperatorName as T, ValueProcessorLegacy as _, ExportOperatorMap as a, ValueSources as b, NLTranslationKey as c, ParameterizedSQL as d, RQBJsonLogic as f, ValueProcessorByRule as g, SQLPreset as h, ExportObjectFormats as i, Except as j, OptionList as k, NLTranslations as l, RuleProcessor as m, DiagnosticsResult as n, FormatQueryOptions as o, RuleGroupProcessor as p, ExportFormat as r, GroupVariantCondition as s, ConstituentWordOrder as t, ParameterizedNamedSQL as u, ValueProcessorOptions as v, DefaultCombinatorName as w, DefaultRuleGroupTypeIC as x, FullField as y };
1899
- //# sourceMappingURL=index-D-Iej37L.d.mts.map
1899
+ //# sourceMappingURL=index-CR-tk4Ci.d.mts.map
@@ -1311,7 +1311,7 @@ type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersM
1311
1311
  *
1312
1312
  * @group Export
1313
1313
  */
1314
- type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "prisma" | "sequelize" | "cypher" | "gql" | "sparql" | "gremlin" | "diagnostics";
1314
+ type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "tanstack_db" | "prisma" | "sequelize" | "cypher" | "gql" | "sparql" | "gremlin" | "diagnostics";
1315
1315
  /**
1316
1316
  * Export formats for {@link formatQuery} that produce objects instead of strings.
1317
1317
  *
@@ -1887,7 +1887,7 @@ type GroupVariantCondition = "not" | "xor";
1887
1887
  *
1888
1888
  * @group Export
1889
1889
  */
1890
- type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMoreGroupVariants}` | `groupSuffix${ZeroOrMoreGroupVariants}`;
1890
+ type NLTranslationKey = "and" | "or" | "true" | "false" | "ruleSeparator" | "betweenAnd" | "afterSubject" | "afterVerb" | "afterObject" | "listSeparator" | `groupPrefix${ZeroOrMoreGroupVariants}` | `groupSuffix${ZeroOrMoreGroupVariants}`;
1891
1891
  /**
1892
1892
  * `translations` config object for "natural_language" format.
1893
1893
  *
@@ -1896,4 +1896,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMo
1896
1896
  type NLTranslations = Partial<Record<NLTranslationKey, string>>;
1897
1897
  //#endregion
1898
1898
  export { SetRequired as A, RuleGroupTypeIC as C, RuleGroupType as D, DefaultRuleGroupType as E, RuleType as O, RuleGroupTypeAny as S, DefaultOperatorName as T, ValueProcessorLegacy as _, ExportOperatorMap as a, ValueSources as b, NLTranslationKey as c, ParameterizedSQL as d, RQBJsonLogic as f, ValueProcessorByRule as g, SQLPreset as h, ExportObjectFormats as i, Except as j, OptionList as k, NLTranslations as l, RuleProcessor as m, DiagnosticsResult as n, FormatQueryOptions as o, RuleGroupProcessor as p, ExportFormat as r, GroupVariantCondition as s, ConstituentWordOrder as t, ParameterizedNamedSQL as u, ValueProcessorOptions as v, DefaultCombinatorName as w, DefaultRuleGroupTypeIC as x, FullField as y };
1899
- //# sourceMappingURL=index-Cjapnb-H.d.ts.map
1899
+ //# sourceMappingURL=index-NSVgGj45.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"objectUtils-Bzug_QfX.js","names":["numericQuantityRegex"],"sources":["../src/utils/misc.ts","../src/utils/isRuleGroup.ts","../src/utils/objectUtils.ts"],"sourcesContent":["import { numericRegex as numericQuantityRegex } from 'numeric-quantity';\n\n/**\n * Converts a value to lowercase if it's a string, otherwise returns the value as is.\n */\n// v8 ignore next\nexport const lc = <T>(v: T): T => (typeof v === 'string' ? (v.toLowerCase() as T) : v);\n\n/**\n * Regex matching numeric strings. Passes for positive/negative integers, decimals,\n * and E notation, with optional surrounding whitespace.\n */\nexport const numericRegex: RegExp = new RegExp(\n numericQuantityRegex.source.replace(/^\\^/, String.raw`^\\s*`).replace(/\\$$/, String.raw`\\s*$`)\n);\n\n/**\n * Determines if a variable is a plain old JavaScript object, aka POJO.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const isPojo = (obj: any): obj is Record<string, any> =>\n obj === null || typeof obj !== 'object' ? false : Object.getPrototypeOf(obj) === Object.prototype;\n\n/**\n * Simple helper to determine whether a value is null, undefined, or an empty string.\n */\nexport const nullOrUndefinedOrEmpty = (value: unknown): value is null | undefined | '' =>\n value === null || value === undefined || value === '';\n","import type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isPojo } from './misc';\n\n/**\n * Determines if an object is a {@link RuleType} (only checks for a `field` property).\n */\nexport const isRuleType = (s: unknown): s is RuleType =>\n isPojo(s) && 'field' in s && typeof s.field === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupType} or {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroup = (rg: unknown): rg is RuleGroupTypeAny =>\n isPojo(rg) && Array.isArray(rg.rules);\n\n/**\n * Determines if an object is a {@link RuleGroupType}.\n */\nexport const isRuleGroupType = (rg: unknown): rg is RuleGroupType =>\n isRuleGroup(rg) && typeof rg.combinator === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroupTypeIC = (rg: unknown): rg is RuleGroupTypeIC =>\n isRuleGroup(rg) && rg.combinator === undefined;\n","// All code in this file is adapted from:\n// npm: https://www.npmjs.com/package/ts-extras\n// src: https://github.com/sindresorhus/ts-extras\n\n/**\n * Original looked like this (not sure why template string is used):\n * ```\n * type ObjectKeys<T extends object> = `${Exclude<keyof T, symbol>}`;\n * ```\n */\ntype ObjectKeys<T extends object> = Exclude<keyof T, symbol>;\n\n/**\n * A strongly-typed version of `Object.keys()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-keys.ts)\n */\nexport const objectKeys = Object.keys as <Type extends object>(\n value: Type\n) => Array<ObjectKeys<Type>>;\n\n/**\n * A strongly-typed version of `Object.entries()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-entries.ts)\n */\nexport const objectEntries = Object.entries as <Type extends Record<PropertyKey, unknown>>(\n value: Type\n) => Array<[ObjectKeys<Type>, Type[ObjectKeys<Type>]]>;\n\n/**\n * Returns `true` if the key could cause prototype pollution when used\n * as a property name in bracket-notation assignment.\n */\nexport const isUnsafeKey = (key: unknown): boolean =>\n key === '__proto__' || key === 'constructor' || key === 'prototype';\n"],"mappings":";;;;;;;AAMA,MAAa,MAAS,MAAa,OAAO,MAAM,WAAY,EAAE,aAAa,GAAS;;;;;AAMpF,MAAa,eAAuB,IAAI,OACtCA,iBAAAA,aAAqB,OAAO,QAAQ,OAAO,OAAO,GAAG,OAAO,CAAC,QAAQ,OAAO,OAAO,GAAG,OAAO,CAC9F;;;;AAMD,MAAa,UAAU,QACrB,QAAQ,QAAQ,OAAO,QAAQ,WAAW,QAAQ,OAAO,eAAe,IAAI,KAAK,OAAO;;;;AAK1F,MAAa,0BAA0B,UACrC,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU;;;;;;ACfrD,MAAa,eAAe,OAC1B,OAAO,GAAG,IAAI,MAAM,QAAQ,GAAG,MAAM;;;;AAKvC,MAAa,mBAAmB,OAC9B,YAAY,GAAG,IAAI,OAAO,GAAG,eAAe;;;;AAK9C,MAAa,qBAAqB,OAChC,YAAY,GAAG,IAAI,GAAG,eAAe,KAAA;;;;;;;;ACRvC,MAAa,aAAa,OAAO;;;;;AAiBjC,MAAa,eAAe,QAC1B,QAAQ,eAAe,QAAQ,iBAAiB,QAAQ"}
1
+ {"version":3,"file":"objectUtils-Bzug_QfX.js","names":["numericQuantityRegex"],"sources":["../src/utils/misc.ts","../src/utils/isRuleGroup.ts","../src/utils/objectUtils.ts"],"sourcesContent":["import { numericRegex as numericQuantityRegex } from 'numeric-quantity';\n\n/**\n * Converts a value to lowercase if it's a string, otherwise returns the value as is.\n */\n// v8 ignore next\nexport const lc = <T>(v: T): T => (typeof v === 'string' ? (v.toLowerCase() as T) : v);\n\n/**\n * Regex matching numeric strings. Passes for positive/negative integers, decimals,\n * and E notation, with optional surrounding whitespace.\n */\nexport const numericRegex: RegExp = new RegExp(\n numericQuantityRegex.source.replace(/^\\^/, String.raw`^\\s*`).replace(/\\$$/, String.raw`\\s*$`)\n);\n\n/**\n * Determines if a variable is a plain old JavaScript object, aka POJO.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const isPojo = (obj: any): obj is Record<string, any> =>\n obj === null || typeof obj !== 'object' ? false : Object.getPrototypeOf(obj) === Object.prototype;\n\n/**\n * Simple helper to determine whether a value is null, undefined, or an empty string.\n */\nexport const nullOrUndefinedOrEmpty = (value: unknown): value is null | undefined | '' =>\n value === null || value === undefined || value === '';\n","import type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isPojo } from './misc';\n\n/**\n * Determines if an object is a {@link RuleType} (only checks for a `field` property).\n */\nexport const isRuleType = (s: unknown): s is RuleType =>\n isPojo(s) && 'field' in s && typeof s.field === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupType} or {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroup = (rg: unknown): rg is RuleGroupTypeAny =>\n isPojo(rg) && Array.isArray(rg.rules);\n\n/**\n * Determines if an object is a {@link RuleGroupType}.\n */\nexport const isRuleGroupType = (rg: unknown): rg is RuleGroupType =>\n isRuleGroup(rg) && typeof rg.combinator === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroupTypeIC = (rg: unknown): rg is RuleGroupTypeIC =>\n isRuleGroup(rg) && rg.combinator === undefined;\n","// All code in this file is adapted from:\n// npm: https://www.npmjs.com/package/ts-extras\n// src: https://github.com/sindresorhus/ts-extras\n\n/**\n * Original looked like this (not sure why template string is used):\n * ```\n * type ObjectKeys<T extends object> = `${Exclude<keyof T, symbol>}`;\n * ```\n */\ntype ObjectKeys<T extends object> = Exclude<keyof T, symbol>;\n\n/**\n * A strongly-typed version of `Object.keys()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-keys.ts)\n */\nexport const objectKeys = Object.keys as <Type extends object>(\n value: Type\n) => Array<ObjectKeys<Type>>;\n\n/**\n * A strongly-typed version of `Object.entries()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-entries.ts)\n */\nexport const objectEntries = Object.entries as <Type extends Record<PropertyKey, unknown>>(\n value: Type\n) => Array<[ObjectKeys<Type>, Type[ObjectKeys<Type>]]>;\n\n/**\n * Returns `true` if the key could cause prototype pollution when used\n * as a property name in bracket-notation assignment.\n */\nexport const isUnsafeKey = (key: unknown): boolean =>\n key === '__proto__' || key === 'constructor' || key === 'prototype';\n"],"mappings":";;;;;;;AAMA,MAAa,MAAS,MAAa,OAAO,MAAM,WAAY,EAAE,YAAY,IAAU;;;;;AAMpF,MAAa,eAAuB,IAAI,OACtCA,iBAAAA,aAAqB,OAAO,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE,QAAQ,OAAO,OAAO,GAAG,MAAM,CAC9F;;;;AAMA,MAAa,UAAU,QACrB,QAAQ,QAAQ,OAAO,QAAQ,WAAW,QAAQ,OAAO,eAAe,GAAG,MAAM,OAAO;;;;AAK1F,MAAa,0BAA0B,UACrC,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU;;;;;;ACfrD,MAAa,eAAe,OAC1B,OAAO,EAAE,KAAK,MAAM,QAAQ,GAAG,KAAK;;;;AAKtC,MAAa,mBAAmB,OAC9B,YAAY,EAAE,KAAK,OAAO,GAAG,eAAe;;;;AAK9C,MAAa,qBAAqB,OAChC,YAAY,EAAE,KAAK,GAAG,eAAe,KAAA;;;;;;;;ACRvC,MAAa,aAAa,OAAO;;;;;AAiBjC,MAAa,eAAe,QAC1B,QAAQ,eAAe,QAAQ,iBAAiB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"objectUtils-D96eEEzL.mjs","names":["numericRegex","numericQuantityRegex"],"sources":["../src/utils/misc.ts","../src/utils/isRuleGroup.ts","../src/utils/objectUtils.ts"],"sourcesContent":["import { numericRegex as numericQuantityRegex } from 'numeric-quantity';\n\n/**\n * Converts a value to lowercase if it's a string, otherwise returns the value as is.\n */\n// v8 ignore next\nexport const lc = <T>(v: T): T => (typeof v === 'string' ? (v.toLowerCase() as T) : v);\n\n/**\n * Regex matching numeric strings. Passes for positive/negative integers, decimals,\n * and E notation, with optional surrounding whitespace.\n */\nexport const numericRegex: RegExp = new RegExp(\n numericQuantityRegex.source.replace(/^\\^/, String.raw`^\\s*`).replace(/\\$$/, String.raw`\\s*$`)\n);\n\n/**\n * Determines if a variable is a plain old JavaScript object, aka POJO.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const isPojo = (obj: any): obj is Record<string, any> =>\n obj === null || typeof obj !== 'object' ? false : Object.getPrototypeOf(obj) === Object.prototype;\n\n/**\n * Simple helper to determine whether a value is null, undefined, or an empty string.\n */\nexport const nullOrUndefinedOrEmpty = (value: unknown): value is null | undefined | '' =>\n value === null || value === undefined || value === '';\n","import type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isPojo } from './misc';\n\n/**\n * Determines if an object is a {@link RuleType} (only checks for a `field` property).\n */\nexport const isRuleType = (s: unknown): s is RuleType =>\n isPojo(s) && 'field' in s && typeof s.field === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupType} or {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroup = (rg: unknown): rg is RuleGroupTypeAny =>\n isPojo(rg) && Array.isArray(rg.rules);\n\n/**\n * Determines if an object is a {@link RuleGroupType}.\n */\nexport const isRuleGroupType = (rg: unknown): rg is RuleGroupType =>\n isRuleGroup(rg) && typeof rg.combinator === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroupTypeIC = (rg: unknown): rg is RuleGroupTypeIC =>\n isRuleGroup(rg) && rg.combinator === undefined;\n","// All code in this file is adapted from:\n// npm: https://www.npmjs.com/package/ts-extras\n// src: https://github.com/sindresorhus/ts-extras\n\n/**\n * Original looked like this (not sure why template string is used):\n * ```\n * type ObjectKeys<T extends object> = `${Exclude<keyof T, symbol>}`;\n * ```\n */\ntype ObjectKeys<T extends object> = Exclude<keyof T, symbol>;\n\n/**\n * A strongly-typed version of `Object.keys()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-keys.ts)\n */\nexport const objectKeys = Object.keys as <Type extends object>(\n value: Type\n) => Array<ObjectKeys<Type>>;\n\n/**\n * A strongly-typed version of `Object.entries()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-entries.ts)\n */\nexport const objectEntries = Object.entries as <Type extends Record<PropertyKey, unknown>>(\n value: Type\n) => Array<[ObjectKeys<Type>, Type[ObjectKeys<Type>]]>;\n\n/**\n * Returns `true` if the key could cause prototype pollution when used\n * as a property name in bracket-notation assignment.\n */\nexport const isUnsafeKey = (key: unknown): boolean =>\n key === '__proto__' || key === 'constructor' || key === 'prototype';\n"],"mappings":";;;;;;AAMA,MAAa,MAAS,MAAa,OAAO,MAAM,WAAY,EAAE,aAAa,GAAS;;;;;AAMpF,MAAaA,iBAAuB,IAAI,OACtCC,aAAqB,OAAO,QAAQ,OAAO,OAAO,GAAG,OAAO,CAAC,QAAQ,OAAO,OAAO,GAAG,OAAO,CAC9F;;;;AAMD,MAAa,UAAU,QACrB,QAAQ,QAAQ,OAAO,QAAQ,WAAW,QAAQ,OAAO,eAAe,IAAI,KAAK,OAAO;;;;AAK1F,MAAa,0BAA0B,UACrC,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU;;;;;;ACfrD,MAAa,eAAe,OAC1B,OAAO,GAAG,IAAI,MAAM,QAAQ,GAAG,MAAM;;;;AAKvC,MAAa,mBAAmB,OAC9B,YAAY,GAAG,IAAI,OAAO,GAAG,eAAe;;;;AAK9C,MAAa,qBAAqB,OAChC,YAAY,GAAG,IAAI,GAAG,eAAe,KAAA;;;;;;;;ACRvC,MAAa,aAAa,OAAO;;;;;AAiBjC,MAAa,eAAe,QAC1B,QAAQ,eAAe,QAAQ,iBAAiB,QAAQ"}
1
+ {"version":3,"file":"objectUtils-D96eEEzL.mjs","names":["numericRegex","numericQuantityRegex"],"sources":["../src/utils/misc.ts","../src/utils/isRuleGroup.ts","../src/utils/objectUtils.ts"],"sourcesContent":["import { numericRegex as numericQuantityRegex } from 'numeric-quantity';\n\n/**\n * Converts a value to lowercase if it's a string, otherwise returns the value as is.\n */\n// v8 ignore next\nexport const lc = <T>(v: T): T => (typeof v === 'string' ? (v.toLowerCase() as T) : v);\n\n/**\n * Regex matching numeric strings. Passes for positive/negative integers, decimals,\n * and E notation, with optional surrounding whitespace.\n */\nexport const numericRegex: RegExp = new RegExp(\n numericQuantityRegex.source.replace(/^\\^/, String.raw`^\\s*`).replace(/\\$$/, String.raw`\\s*$`)\n);\n\n/**\n * Determines if a variable is a plain old JavaScript object, aka POJO.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const isPojo = (obj: any): obj is Record<string, any> =>\n obj === null || typeof obj !== 'object' ? false : Object.getPrototypeOf(obj) === Object.prototype;\n\n/**\n * Simple helper to determine whether a value is null, undefined, or an empty string.\n */\nexport const nullOrUndefinedOrEmpty = (value: unknown): value is null | undefined | '' =>\n value === null || value === undefined || value === '';\n","import type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isPojo } from './misc';\n\n/**\n * Determines if an object is a {@link RuleType} (only checks for a `field` property).\n */\nexport const isRuleType = (s: unknown): s is RuleType =>\n isPojo(s) && 'field' in s && typeof s.field === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupType} or {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroup = (rg: unknown): rg is RuleGroupTypeAny =>\n isPojo(rg) && Array.isArray(rg.rules);\n\n/**\n * Determines if an object is a {@link RuleGroupType}.\n */\nexport const isRuleGroupType = (rg: unknown): rg is RuleGroupType =>\n isRuleGroup(rg) && typeof rg.combinator === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroupTypeIC = (rg: unknown): rg is RuleGroupTypeIC =>\n isRuleGroup(rg) && rg.combinator === undefined;\n","// All code in this file is adapted from:\n// npm: https://www.npmjs.com/package/ts-extras\n// src: https://github.com/sindresorhus/ts-extras\n\n/**\n * Original looked like this (not sure why template string is used):\n * ```\n * type ObjectKeys<T extends object> = `${Exclude<keyof T, symbol>}`;\n * ```\n */\ntype ObjectKeys<T extends object> = Exclude<keyof T, symbol>;\n\n/**\n * A strongly-typed version of `Object.keys()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-keys.ts)\n */\nexport const objectKeys = Object.keys as <Type extends object>(\n value: Type\n) => Array<ObjectKeys<Type>>;\n\n/**\n * A strongly-typed version of `Object.entries()`.\n *\n * [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-entries.ts)\n */\nexport const objectEntries = Object.entries as <Type extends Record<PropertyKey, unknown>>(\n value: Type\n) => Array<[ObjectKeys<Type>, Type[ObjectKeys<Type>]]>;\n\n/**\n * Returns `true` if the key could cause prototype pollution when used\n * as a property name in bracket-notation assignment.\n */\nexport const isUnsafeKey = (key: unknown): boolean =>\n key === '__proto__' || key === 'constructor' || key === 'prototype';\n"],"mappings":";;;;;;AAMA,MAAa,MAAS,MAAa,OAAO,MAAM,WAAY,EAAE,YAAY,IAAU;;;;;AAMpF,MAAaA,iBAAuB,IAAI,OACtCC,aAAqB,OAAO,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE,QAAQ,OAAO,OAAO,GAAG,MAAM,CAC9F;;;;AAMA,MAAa,UAAU,QACrB,QAAQ,QAAQ,OAAO,QAAQ,WAAW,QAAQ,OAAO,eAAe,GAAG,MAAM,OAAO;;;;AAK1F,MAAa,0BAA0B,UACrC,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU;;;;;;ACfrD,MAAa,eAAe,OAC1B,OAAO,EAAE,KAAK,MAAM,QAAQ,GAAG,KAAK;;;;AAKtC,MAAa,mBAAmB,OAC9B,YAAY,EAAE,KAAK,OAAO,GAAG,eAAe;;;;AAK9C,MAAa,qBAAqB,OAChC,YAAY,EAAE,KAAK,GAAG,eAAe,KAAA;;;;;;;;ACRvC,MAAa,aAAa,OAAO;;;;;AAiBjC,MAAa,eAAe,QAC1B,QAAQ,eAAe,QAAQ,iBAAiB,QAAQ"}
@@ -1,5 +1,5 @@
1
- import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-D-Iej37L.mjs";
2
- import { t as ParserCommonOptions } from "./import-BHlzBLM_.mjs";
1
+ import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-CR-tk4Ci.mjs";
2
+ import { t as ParserCommonOptions } from "./import-BXXgiPlr.mjs";
3
3
 
4
4
  //#region src/utils/parseCEL/types.d.ts
5
5
  type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "FieldsObject" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";
@@ -1,5 +1,5 @@
1
- import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-Cjapnb-H.js";
2
- import { t as ParserCommonOptions } from "./import-C6imciDf.js";
1
+ import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-NSVgGj45.js";
2
+ import { t as ParserCommonOptions } from "./import-DqzM2MBd.js";
3
3
 
4
4
  //#region src/utils/parseCEL/types.d.ts
5
5
  type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "FieldsObject" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";