@react-querybuilder/core 8.16.1 → 8.17.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.
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +56 -5
- package/dist/cjs/react-querybuilder_core.cjs.development.js +155 -9
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +56 -5
- package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/{convertQuery-Lx2HQa0m.js → convertQuery-BoMPXL7_.js} +2 -2
- package/dist/{convertQuery-Lx2HQa0m.js.map → convertQuery-BoMPXL7_.js.map} +1 -1
- package/dist/{convertQuery-BeJJH9BI.mjs → convertQuery-CQwOrjQr.mjs} +2 -2
- package/dist/{convertQuery-BeJJH9BI.mjs.map → convertQuery-CQwOrjQr.mjs.map} +1 -1
- package/dist/formatQuery.d.mts +37 -3
- package/dist/formatQuery.d.ts +37 -3
- package/dist/formatQuery.js +158 -12
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +157 -13
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-BC_bAKQ8.d.mts → import-BQ5xaW6i.d.mts} +2 -2
- package/dist/{import-D1KnXhkQ.d.ts → import-CSHMjlid.d.ts} +2 -2
- package/dist/{index-Ds06V0zO.d.ts → index-CREDWM32.d.mts} +21 -4
- package/dist/{index-AAZg4Uh1.d.mts → index-CREDWM32.d.ts} +21 -4
- package/dist/{objectUtils-D96eEEzL.mjs → objectUtils-D-w8MzpZ.mjs} +1 -1
- package/dist/{objectUtils-D96eEEzL.mjs.map → objectUtils-D-w8MzpZ.mjs.map} +1 -1
- package/dist/{objectUtils-Bzug_QfX.js → objectUtils-DxVaGCdg.js} +1 -2
- package/dist/{objectUtils-Bzug_QfX.js.map → objectUtils-DxVaGCdg.js.map} +1 -1
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +3 -4
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +3 -3
- package/dist/parseCypher.d.mts +1 -1
- package/dist/parseCypher.d.ts +1 -1
- package/dist/parseCypher.js +0 -1
- package/dist/parseCypher.js.map +1 -1
- package/dist/parseGremlin.d.mts +1 -1
- package/dist/parseGremlin.d.ts +1 -1
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js +2 -3
- package/dist/parseJSONata.mjs +2 -2
- package/dist/parseJsonLogic.d.mts +2 -2
- package/dist/parseJsonLogic.d.ts +2 -2
- package/dist/parseJsonLogic.js +4 -4
- package/dist/parseJsonLogic.mjs +4 -4
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js +4 -4
- package/dist/parseMongoDB.mjs +4 -4
- package/dist/parseSPARQL.d.mts +1 -1
- package/dist/parseSPARQL.d.ts +1 -1
- package/dist/parseSPARQL.js +0 -1
- package/dist/parseSPARQL.js.map +1 -1
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js +3 -4
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +3 -3
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/parseSpEL.js +3 -4
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +3 -3
- package/dist/{prepareQueryObjects-uA10ZpZX.mjs → prepareQueryObjects-BXf5aV-A.mjs} +3 -3
- package/dist/{prepareQueryObjects-uA10ZpZX.mjs.map → prepareQueryObjects-BXf5aV-A.mjs.map} +1 -1
- package/dist/{prepareQueryObjects-BoG5Rt8z.js → prepareQueryObjects-gRQqiBPR.js} +3 -3
- package/dist/{prepareQueryObjects-BoG5Rt8z.js.map → prepareQueryObjects-gRQqiBPR.js.map} +1 -1
- package/dist/react-querybuilder_core.d.mts +56 -5
- package/dist/react-querybuilder_core.legacy-esm.d.ts +56 -5
- package/dist/react-querybuilder_core.legacy-esm.js +161 -17
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +154 -10
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +56 -5
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/transformQuery.d.mts +1 -1
- package/dist/transformQuery.d.ts +1 -1
- package/dist/transformQuery.js +1 -1
- package/dist/transformQuery.mjs +1 -1
- package/dist/{utils-ChLG90DP.mjs → utils-01WaTGBL.mjs} +2 -2
- package/dist/{utils-ChLG90DP.mjs.map → utils-01WaTGBL.mjs.map} +1 -1
- package/dist/{utils-Qwkq2Q0F.js → utils-ZlKseh1X.js} +2 -3
- package/dist/{utils-Qwkq2Q0F.js.map → utils-ZlKseh1X.js.map} +1 -1
- package/package.json +15 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ValueSources, k as OptionList, y as FullField } from "./index-
|
|
1
|
+
import { b as ValueSources, k as OptionList, y as FullField } from "./index-CREDWM32.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-
|
|
27
|
+
//# sourceMappingURL=import-BQ5xaW6i.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ValueSources, k as OptionList, y as FullField } from "./index-
|
|
1
|
+
import { b as ValueSources, k as OptionList, y as FullField } from "./index-CREDWM32.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-
|
|
27
|
+
//# sourceMappingURL=import-CSHMjlid.d.ts.map
|
|
@@ -1085,8 +1085,6 @@ interface RuleType<F extends string = string, O extends string = string, V = any
|
|
|
1085
1085
|
/**
|
|
1086
1086
|
* Opaque metadata for use by extension packages. The core library
|
|
1087
1087
|
* preserves this property but does not read or interpret it.
|
|
1088
|
-
* Extensions like `@react-querybuilder/graph` use `meta` to store
|
|
1089
|
-
* domain-specific context (e.g., graph pattern information).
|
|
1090
1088
|
*/
|
|
1091
1089
|
meta?: M;
|
|
1092
1090
|
}
|
|
@@ -1311,7 +1309,7 @@ type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersM
|
|
|
1311
1309
|
*
|
|
1312
1310
|
* @group Export
|
|
1313
1311
|
*/
|
|
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";
|
|
1312
|
+
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
1313
|
/**
|
|
1316
1314
|
* Export formats for {@link formatQuery} that produce objects instead of strings.
|
|
1317
1315
|
*
|
|
@@ -1627,6 +1625,15 @@ type ValueProcessorLegacy = (field: string, operator: string, value: any, valueS
|
|
|
1627
1625
|
* | `jsonlogic` | {@link defaultRuleProcessorJsonLogic} |
|
|
1628
1626
|
* | `elasticsearch` | {@link defaultRuleProcessorElasticSearch} |
|
|
1629
1627
|
* | `jsonata` | {@link defaultRuleProcessorJSONata} |
|
|
1628
|
+
* | `natural_language` | {@link defaultRuleProcessorNL} |
|
|
1629
|
+
* | `ldap` | {@link defaultRuleProcessorLDAP} |
|
|
1630
|
+
* | `drizzle` | {@link defaultRuleProcessorDrizzle} |
|
|
1631
|
+
* | `tanstack_db` | {@link defaultRuleProcessorTanStackDB} |
|
|
1632
|
+
* | `prisma` | {@link defaultRuleProcessorPrisma} |
|
|
1633
|
+
* | `sequelize` | {@link defaultRuleProcessorSequelize} |
|
|
1634
|
+
* | `cypher` | {@link defaultRuleProcessorCypher} |
|
|
1635
|
+
* | `sparql` | {@link defaultRuleProcessorSPARQL} |
|
|
1636
|
+
* | `gremlin` | {@link defaultRuleProcessorGremlin} |
|
|
1630
1637
|
*
|
|
1631
1638
|
* @group Export
|
|
1632
1639
|
*/
|
|
@@ -1651,6 +1658,16 @@ type RuleProcessor = (rule: RuleType, options?: ValueProcessorOptions, meta?: {
|
|
|
1651
1658
|
* | `jsonlogic` | {@link defaultRuleGroupProcessorJsonLogic} |
|
|
1652
1659
|
* | `elasticsearch` | {@link defaultRuleGroupProcessorElasticSearch} |
|
|
1653
1660
|
* | `jsonata` | {@link defaultRuleGroupProcessorJSONata} |
|
|
1661
|
+
* | `natural_language` | {@link defaultRuleGroupProcessorNL} |
|
|
1662
|
+
* | `ldap` | {@link defaultRuleGroupProcessorLDAP} |
|
|
1663
|
+
* | `drizzle` | {@link defaultRuleGroupProcessorDrizzle} |
|
|
1664
|
+
* | `tanstack_db` | {@link defaultRuleGroupProcessorTanStackDB} |
|
|
1665
|
+
* | `prisma` | {@link defaultRuleGroupProcessorPrisma} |
|
|
1666
|
+
* | `sequelize` | {@link defaultRuleGroupProcessorSequelize} |
|
|
1667
|
+
* | `cypher` | {@link defaultRuleGroupProcessorCypher} |
|
|
1668
|
+
* | `sparql` | {@link defaultRuleGroupProcessorSPARQL} |
|
|
1669
|
+
* | `gremlin` | {@link defaultRuleGroupProcessorGremlin} |
|
|
1670
|
+
* | `diagnostics` | {@link defaultRuleGroupProcessorDiagnostics} |
|
|
1654
1671
|
*
|
|
1655
1672
|
* @group Export
|
|
1656
1673
|
*/
|
|
@@ -1896,4 +1913,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | "ruleSeparator" | "bet
|
|
|
1896
1913
|
type NLTranslations = Partial<Record<NLTranslationKey, string>>;
|
|
1897
1914
|
//#endregion
|
|
1898
1915
|
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-
|
|
1916
|
+
//# sourceMappingURL=index-CREDWM32.d.mts.map
|
|
@@ -1085,8 +1085,6 @@ interface RuleType<F extends string = string, O extends string = string, V = any
|
|
|
1085
1085
|
/**
|
|
1086
1086
|
* Opaque metadata for use by extension packages. The core library
|
|
1087
1087
|
* preserves this property but does not read or interpret it.
|
|
1088
|
-
* Extensions like `@react-querybuilder/graph` use `meta` to store
|
|
1089
|
-
* domain-specific context (e.g., graph pattern information).
|
|
1090
1088
|
*/
|
|
1091
1089
|
meta?: M;
|
|
1092
1090
|
}
|
|
@@ -1311,7 +1309,7 @@ type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersM
|
|
|
1311
1309
|
*
|
|
1312
1310
|
* @group Export
|
|
1313
1311
|
*/
|
|
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";
|
|
1312
|
+
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
1313
|
/**
|
|
1316
1314
|
* Export formats for {@link formatQuery} that produce objects instead of strings.
|
|
1317
1315
|
*
|
|
@@ -1627,6 +1625,15 @@ type ValueProcessorLegacy = (field: string, operator: string, value: any, valueS
|
|
|
1627
1625
|
* | `jsonlogic` | {@link defaultRuleProcessorJsonLogic} |
|
|
1628
1626
|
* | `elasticsearch` | {@link defaultRuleProcessorElasticSearch} |
|
|
1629
1627
|
* | `jsonata` | {@link defaultRuleProcessorJSONata} |
|
|
1628
|
+
* | `natural_language` | {@link defaultRuleProcessorNL} |
|
|
1629
|
+
* | `ldap` | {@link defaultRuleProcessorLDAP} |
|
|
1630
|
+
* | `drizzle` | {@link defaultRuleProcessorDrizzle} |
|
|
1631
|
+
* | `tanstack_db` | {@link defaultRuleProcessorTanStackDB} |
|
|
1632
|
+
* | `prisma` | {@link defaultRuleProcessorPrisma} |
|
|
1633
|
+
* | `sequelize` | {@link defaultRuleProcessorSequelize} |
|
|
1634
|
+
* | `cypher` | {@link defaultRuleProcessorCypher} |
|
|
1635
|
+
* | `sparql` | {@link defaultRuleProcessorSPARQL} |
|
|
1636
|
+
* | `gremlin` | {@link defaultRuleProcessorGremlin} |
|
|
1630
1637
|
*
|
|
1631
1638
|
* @group Export
|
|
1632
1639
|
*/
|
|
@@ -1651,6 +1658,16 @@ type RuleProcessor = (rule: RuleType, options?: ValueProcessorOptions, meta?: {
|
|
|
1651
1658
|
* | `jsonlogic` | {@link defaultRuleGroupProcessorJsonLogic} |
|
|
1652
1659
|
* | `elasticsearch` | {@link defaultRuleGroupProcessorElasticSearch} |
|
|
1653
1660
|
* | `jsonata` | {@link defaultRuleGroupProcessorJSONata} |
|
|
1661
|
+
* | `natural_language` | {@link defaultRuleGroupProcessorNL} |
|
|
1662
|
+
* | `ldap` | {@link defaultRuleGroupProcessorLDAP} |
|
|
1663
|
+
* | `drizzle` | {@link defaultRuleGroupProcessorDrizzle} |
|
|
1664
|
+
* | `tanstack_db` | {@link defaultRuleGroupProcessorTanStackDB} |
|
|
1665
|
+
* | `prisma` | {@link defaultRuleGroupProcessorPrisma} |
|
|
1666
|
+
* | `sequelize` | {@link defaultRuleGroupProcessorSequelize} |
|
|
1667
|
+
* | `cypher` | {@link defaultRuleGroupProcessorCypher} |
|
|
1668
|
+
* | `sparql` | {@link defaultRuleGroupProcessorSPARQL} |
|
|
1669
|
+
* | `gremlin` | {@link defaultRuleGroupProcessorGremlin} |
|
|
1670
|
+
* | `diagnostics` | {@link defaultRuleGroupProcessorDiagnostics} |
|
|
1654
1671
|
*
|
|
1655
1672
|
* @group Export
|
|
1656
1673
|
*/
|
|
@@ -1896,4 +1913,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | "ruleSeparator" | "bet
|
|
|
1896
1913
|
type NLTranslations = Partial<Record<NLTranslationKey, string>>;
|
|
1897
1914
|
//#endregion
|
|
1898
1915
|
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-
|
|
1916
|
+
//# sourceMappingURL=index-CREDWM32.d.ts.map
|
|
@@ -48,4 +48,4 @@ const isUnsafeKey = (key) => key === "__proto__" || key === "constructor" || key
|
|
|
48
48
|
//#endregion
|
|
49
49
|
export { isRuleGroupTypeIC as a, nullOrUndefinedOrEmpty as c, isRuleGroupType as i, numericRegex$1 as l, objectKeys as n, isPojo as o, isRuleGroup as r, lc as s, isUnsafeKey as t };
|
|
50
50
|
|
|
51
|
-
//# sourceMappingURL=objectUtils-
|
|
51
|
+
//# sourceMappingURL=objectUtils-D-w8MzpZ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectUtils-
|
|
1
|
+
{"version":3,"file":"objectUtils-D-w8MzpZ.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,4 +1,3 @@
|
|
|
1
|
-
require("./parseJSONata.js");
|
|
2
1
|
let numeric_quantity = require("numeric-quantity");
|
|
3
2
|
//#region src/utils/misc.ts
|
|
4
3
|
/**
|
|
@@ -102,4 +101,4 @@ Object.defineProperty(exports, "objectKeys", {
|
|
|
102
101
|
}
|
|
103
102
|
});
|
|
104
103
|
|
|
105
|
-
//# sourceMappingURL=objectUtils-
|
|
104
|
+
//# sourceMappingURL=objectUtils-DxVaGCdg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectUtils-
|
|
1
|
+
{"version":3,"file":"objectUtils-DxVaGCdg.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"}
|
package/dist/parseCEL.d.mts
CHANGED
|
@@ -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-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
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-CREDWM32.mjs";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-BQ5xaW6i.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";
|
package/dist/parseCEL.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
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-CREDWM32.js";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-CSHMjlid.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";
|
package/dist/parseCEL.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_utils = require("./utils-
|
|
3
|
-
const require_objectUtils = require("./objectUtils-
|
|
4
|
-
const require_prepareQueryObjects = require("./prepareQueryObjects-
|
|
5
|
-
require("./parseJSONata.js");
|
|
2
|
+
const require_utils = require("./utils-ZlKseh1X.js");
|
|
3
|
+
const require_objectUtils = require("./objectUtils-DxVaGCdg.js");
|
|
4
|
+
const require_prepareQueryObjects = require("./prepareQueryObjects-gRQqiBPR.js");
|
|
6
5
|
let _ts_jison_parser = require("@ts-jison/parser");
|
|
7
6
|
let _ts_jison_lexer = require("@ts-jison/lexer");
|
|
8
7
|
//#region src/utils/parseCEL/celParser.ts
|