@react-querybuilder/core 8.14.4 → 8.15.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 +201 -8
- package/dist/cjs/react-querybuilder_core.cjs.development.js +394 -58
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +201 -8
- 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-CeJSNn37.mjs → convertQuery-BeJJH9BI.mjs} +2 -2
- package/dist/convertQuery-BeJJH9BI.mjs.map +1 -0
- package/dist/{convertQuery-J8LpTG-7.js → convertQuery-Lx2HQa0m.js} +2 -2
- package/dist/convertQuery-Lx2HQa0m.js.map +1 -0
- package/dist/formatQuery.d.mts +24 -2
- package/dist/formatQuery.d.ts +24 -2
- package/dist/formatQuery.js +373 -47
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +373 -48
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-BwQqExpO.d.mts → import-0wp72lLT.d.mts} +2 -2
- package/dist/{import-CrJf23Nf.d.ts → import-yRVJh7E1.d.ts} +2 -2
- package/dist/{index-CYT4Saz-.d.mts → index-D5TXNIzF.d.ts} +149 -5
- package/dist/{index-DBlQeLax.d.ts → index-Lht_Wq3V.d.mts} +149 -5
- package/dist/{objectUtils-ButT0Mng.js → objectUtils-Bzug_QfX.js} +2 -2
- package/dist/objectUtils-Bzug_QfX.js.map +1 -0
- package/dist/{objectUtils-C0WB-8ex.mjs → objectUtils-D96eEEzL.mjs} +2 -2
- package/dist/objectUtils-D96eEEzL.mjs.map +1 -0
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +35 -35
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +35 -35
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js +11 -11
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +11 -11
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.d.mts +2 -2
- package/dist/parseJsonLogic.d.ts +2 -2
- package/dist/parseJsonLogic.js +6 -6
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +6 -6
- package/dist/parseJsonLogic.mjs.map +1 -1
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js +6 -6
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +6 -6
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js +16 -16
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +16 -16
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/parseSpEL.js +10 -10
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +10 -10
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/{prepareQueryObjects-DO3qXriW.js → prepareQueryObjects-BoG5Rt8z.js} +6 -6
- package/dist/prepareQueryObjects-BoG5Rt8z.js.map +1 -0
- package/dist/{prepareQueryObjects-BfMlS4ql.mjs → prepareQueryObjects-uA10ZpZX.mjs} +6 -6
- package/dist/prepareQueryObjects-uA10ZpZX.mjs.map +1 -0
- package/dist/query-builder.css +1 -1
- package/dist/query-builder.css.map +1 -1
- package/dist/react-querybuilder_core.d.mts +201 -8
- package/dist/react-querybuilder_core.legacy-esm.d.ts +201 -8
- package/dist/react-querybuilder_core.legacy-esm.js +433 -89
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +393 -59
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +201 -8
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/styles/_main.scss +4 -0
- 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-BlMGIhvx.mjs → utils-ChLG90DP.mjs} +3 -3
- package/dist/utils-ChLG90DP.mjs.map +1 -0
- package/dist/{utils-CZRhzje-.js → utils-Qwkq2Q0F.js} +3 -3
- package/dist/utils-Qwkq2Q0F.js.map +1 -0
- package/package.json +9 -14
- package/dist/convertQuery-CeJSNn37.mjs.map +0 -1
- package/dist/convertQuery-J8LpTG-7.js.map +0 -1
- package/dist/objectUtils-ButT0Mng.js.map +0 -1
- package/dist/objectUtils-C0WB-8ex.mjs.map +0 -1
- package/dist/prepareQueryObjects-BfMlS4ql.mjs.map +0 -1
- package/dist/prepareQueryObjects-DO3qXriW.js.map +0 -1
- package/dist/utils-BlMGIhvx.mjs.map +0 -1
- package/dist/utils-CZRhzje-.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isRuleGroupTypeIC, i as isRuleGroupType, r as isRuleGroup, s as lc } from "./objectUtils-
|
|
1
|
+
import { a as isRuleGroupTypeIC, i as isRuleGroupType, r as isRuleGroup, s as lc } from "./objectUtils-D96eEEzL.mjs";
|
|
2
2
|
//#region src/utils/convertQuery.ts
|
|
3
3
|
const combinatorLevels = [
|
|
4
4
|
"or",
|
|
@@ -80,4 +80,4 @@ const convertToIC = (rg) => {
|
|
|
80
80
|
//#endregion
|
|
81
81
|
export { convertToIC as n, convertFromIC as t };
|
|
82
82
|
|
|
83
|
-
//# sourceMappingURL=convertQuery-
|
|
83
|
+
//# sourceMappingURL=convertQuery-BeJJH9BI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertQuery-BeJJH9BI.mjs","names":[],"sources":["../src/utils/convertQuery.ts"],"sourcesContent":["import type {\n RuleGroupArray,\n RuleGroupICArray,\n RuleGroupType,\n RuleGroupTypeAny,\n RuleGroupTypeIC,\n RuleType,\n ToRuleGroupType,\n ToRuleGroupTypeIC,\n} from '../types';\nimport { isRuleGroup, isRuleGroupType, isRuleGroupTypeIC } from './isRuleGroup';\nimport { lc } from './misc';\n\nconst combinatorLevels = ['or', 'xor', 'and'] as const;\n\nconst isSameString = (a: unknown, b: string) => lc(a) === b;\n\nconst generateRuleGroupICWithConsistentCombinators = (\n rg: RuleGroupTypeIC,\n baseCombinatorLevel: number = 0\n): RuleGroupTypeIC => {\n const baseCombinator = combinatorLevels[baseCombinatorLevel];\n\n // oxlint-disable-next-line typescript/no-explicit-any\n if (!rg.rules.includes(baseCombinator as any)) {\n // No instances of this combinator, so group based on the next\n // combinator level if at least two levels remain\n return baseCombinatorLevel < combinatorLevels.length - 2\n ? generateRuleGroupICWithConsistentCombinators(rg, baseCombinatorLevel + 1)\n : rg;\n }\n\n const newRules = [...rg.rules] as RuleGroupICArray;\n let cursor = 0;\n\n // Group all chains of combinators in the rule array that are not the base combinator\n while (cursor < newRules.length - 2) {\n if (isSameString(newRules[cursor + 1], baseCombinator)) {\n cursor += 2;\n continue;\n }\n\n let nextBaseCombinatorIndex = -1;\n for (let i = cursor + 2; i < newRules.length; i++) {\n if (typeof newRules[i] === 'string' && lc(newRules[i]) === baseCombinator) {\n nextBaseCombinatorIndex = i;\n break;\n }\n }\n\n if (nextBaseCombinatorIndex === -1) {\n // No more instances of this combinator, so group all remaining rules and exit the loop\n newRules.splice(\n cursor,\n newRules.length,\n generateRuleGroupICWithConsistentCombinators(\n // oxlint-disable-next-line typescript/no-explicit-any\n { rules: newRules.slice(cursor) as any },\n baseCombinatorLevel + 1\n )\n );\n break;\n } else {\n // Group all rules between the current cursor and the next instance of the base combinator\n newRules.splice(\n cursor,\n nextBaseCombinatorIndex - cursor,\n generateRuleGroupICWithConsistentCombinators(\n // oxlint-disable-next-line typescript/no-explicit-any\n { rules: newRules.slice(cursor, nextBaseCombinatorIndex) as any },\n baseCombinatorLevel + 1\n )\n );\n }\n }\n\n return { ...rg, rules: newRules };\n};\n\n/**\n * Converts a {@link RuleGroupTypeIC} to {@link RuleGroupType}.\n *\n * This function is idempotent: {@link RuleGroupType} queries will be\n * returned as-is.\n *\n * @group Query Tools\n */\nexport const convertFromIC = <RG extends RuleGroupTypeAny>(rg: RG): ToRuleGroupType<RG> => {\n if (isRuleGroupType(rg)) {\n return rg as ToRuleGroupType<RG>;\n }\n const processedRG = generateRuleGroupICWithConsistentCombinators(rg);\n const rules: RuleGroupArray = [];\n let combinator = 'and';\n for (const [idx, r] of processedRG.rules.entries()) {\n if (typeof r === 'string') {\n if (idx === 1) combinator = r;\n } else {\n rules.push(isRuleGroup(r) ? convertFromIC(r) : r);\n }\n }\n return { ...processedRG, combinator, rules } as ToRuleGroupType<RG>;\n};\n\n/**\n * Converts a {@link RuleGroupType} to {@link RuleGroupTypeIC}.\n *\n * This function is idempotent: {@link RuleGroupTypeIC} queries will be\n * returned as-is.\n *\n * @group Query Tools\n */\nexport const convertToIC = <RG extends RuleGroupTypeAny>(rg: RG): ToRuleGroupTypeIC<RG> => {\n if (isRuleGroupTypeIC(rg)) {\n return rg as ToRuleGroupTypeIC<RG>;\n }\n const { combinator, ...queryWithoutCombinator } = rg;\n const rules: (RuleGroupTypeIC | RuleType | string)[] = [];\n const { length } = rg.rules;\n for (let idx = 0; idx < length; idx++) {\n const r = rg.rules[idx];\n if (isRuleGroup(r)) {\n rules.push(convertToIC(r));\n } else {\n rules.push(r);\n }\n if (combinator && idx < length - 1) {\n rules.push(combinator);\n }\n }\n return { ...queryWithoutCombinator, rules } as ToRuleGroupTypeIC<RG>;\n};\n\n/**\n * Converts a {@link RuleGroupType} to {@link RuleGroupTypeIC}. For a more explicit\n * operation, use {@link convertToIC}.\n *\n * @group Query Tools\n */\nfunction convertQuery(query: RuleGroupType): RuleGroupTypeIC;\n/**\n * Converts a {@link RuleGroupTypeIC} to {@link RuleGroupType}. For a more explicit\n * operation, use {@link convertFromIC}.\n *\n * @group Query Tools\n */\nfunction convertQuery(query: RuleGroupTypeIC): RuleGroupType;\nfunction convertQuery(query: RuleGroupType | RuleGroupTypeIC): RuleGroupType | RuleGroupTypeIC {\n return isRuleGroupTypeIC(query) ? convertFromIC(query) : convertToIC(query);\n}\n\nexport { convertQuery };\n"],"mappings":";;AAaA,MAAM,mBAAmB;CAAC;CAAM;CAAO;CAAM;AAE7C,MAAM,gBAAgB,GAAY,MAAc,GAAG,EAAE,KAAK;AAE1D,MAAM,gDACJ,IACA,sBAA8B,MACV;CACpB,MAAM,iBAAiB,iBAAiB;AAGxC,KAAI,CAAC,GAAG,MAAM,SAAS,eAAsB,CAG3C,QAAO,sBAAsB,iBAAiB,SAAS,IACnD,6CAA6C,IAAI,sBAAsB,EAAE,GACzE;CAGN,MAAM,WAAW,CAAC,GAAG,GAAG,MAAM;CAC9B,IAAI,SAAS;AAGb,QAAO,SAAS,SAAS,SAAS,GAAG;AACnC,MAAI,aAAa,SAAS,SAAS,IAAI,eAAe,EAAE;AACtD,aAAU;AACV;;EAGF,IAAI,0BAA0B;AAC9B,OAAK,IAAI,IAAI,SAAS,GAAG,IAAI,SAAS,QAAQ,IAC5C,KAAI,OAAO,SAAS,OAAO,YAAY,GAAG,SAAS,GAAG,KAAK,gBAAgB;AACzE,6BAA0B;AAC1B;;AAIJ,MAAI,4BAA4B,IAAI;AAElC,YAAS,OACP,QACA,SAAS,QACT,6CAEE,EAAE,OAAO,SAAS,MAAM,OAAO,EAAS,EACxC,sBAAsB,EACvB,CACF;AACD;QAGA,UAAS,OACP,QACA,0BAA0B,QAC1B,6CAEE,EAAE,OAAO,SAAS,MAAM,QAAQ,wBAAwB,EAAS,EACjE,sBAAsB,EACvB,CACF;;AAIL,QAAO;EAAE,GAAG;EAAI,OAAO;EAAU;;;;;;;;;;AAWnC,MAAa,iBAA8C,OAAgC;AACzF,KAAI,gBAAgB,GAAG,CACrB,QAAO;CAET,MAAM,cAAc,6CAA6C,GAAG;CACpE,MAAM,QAAwB,EAAE;CAChC,IAAI,aAAa;AACjB,MAAK,MAAM,CAAC,KAAK,MAAM,YAAY,MAAM,SAAS,CAChD,KAAI,OAAO,MAAM;MACX,QAAQ,EAAG,cAAa;OAE5B,OAAM,KAAK,YAAY,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;AAGrD,QAAO;EAAE,GAAG;EAAa;EAAY;EAAO;;;;;;;;;;AAW9C,MAAa,eAA4C,OAAkC;AACzF,KAAI,kBAAkB,GAAG,CACvB,QAAO;CAET,MAAM,EAAE,YAAY,GAAG,2BAA2B;CAClD,MAAM,QAAiD,EAAE;CACzD,MAAM,EAAE,WAAW,GAAG;AACtB,MAAK,IAAI,MAAM,GAAG,MAAM,QAAQ,OAAO;EACrC,MAAM,IAAI,GAAG,MAAM;AACnB,MAAI,YAAY,EAAE,CAChB,OAAM,KAAK,YAAY,EAAE,CAAC;MAE1B,OAAM,KAAK,EAAE;AAEf,MAAI,cAAc,MAAM,SAAS,EAC/B,OAAM,KAAK,WAAW;;AAG1B,QAAO;EAAE,GAAG;EAAwB;EAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_objectUtils = require("./objectUtils-
|
|
1
|
+
const require_objectUtils = require("./objectUtils-Bzug_QfX.js");
|
|
2
2
|
//#region src/utils/convertQuery.ts
|
|
3
3
|
const combinatorLevels = [
|
|
4
4
|
"or",
|
|
@@ -91,4 +91,4 @@ Object.defineProperty(exports, "convertToIC", {
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
-
//# sourceMappingURL=convertQuery-
|
|
94
|
+
//# sourceMappingURL=convertQuery-Lx2HQa0m.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertQuery-Lx2HQa0m.js","names":["lc","isRuleGroupType","isRuleGroup","isRuleGroupTypeIC"],"sources":["../src/utils/convertQuery.ts"],"sourcesContent":["import type {\n RuleGroupArray,\n RuleGroupICArray,\n RuleGroupType,\n RuleGroupTypeAny,\n RuleGroupTypeIC,\n RuleType,\n ToRuleGroupType,\n ToRuleGroupTypeIC,\n} from '../types';\nimport { isRuleGroup, isRuleGroupType, isRuleGroupTypeIC } from './isRuleGroup';\nimport { lc } from './misc';\n\nconst combinatorLevels = ['or', 'xor', 'and'] as const;\n\nconst isSameString = (a: unknown, b: string) => lc(a) === b;\n\nconst generateRuleGroupICWithConsistentCombinators = (\n rg: RuleGroupTypeIC,\n baseCombinatorLevel: number = 0\n): RuleGroupTypeIC => {\n const baseCombinator = combinatorLevels[baseCombinatorLevel];\n\n // oxlint-disable-next-line typescript/no-explicit-any\n if (!rg.rules.includes(baseCombinator as any)) {\n // No instances of this combinator, so group based on the next\n // combinator level if at least two levels remain\n return baseCombinatorLevel < combinatorLevels.length - 2\n ? generateRuleGroupICWithConsistentCombinators(rg, baseCombinatorLevel + 1)\n : rg;\n }\n\n const newRules = [...rg.rules] as RuleGroupICArray;\n let cursor = 0;\n\n // Group all chains of combinators in the rule array that are not the base combinator\n while (cursor < newRules.length - 2) {\n if (isSameString(newRules[cursor + 1], baseCombinator)) {\n cursor += 2;\n continue;\n }\n\n let nextBaseCombinatorIndex = -1;\n for (let i = cursor + 2; i < newRules.length; i++) {\n if (typeof newRules[i] === 'string' && lc(newRules[i]) === baseCombinator) {\n nextBaseCombinatorIndex = i;\n break;\n }\n }\n\n if (nextBaseCombinatorIndex === -1) {\n // No more instances of this combinator, so group all remaining rules and exit the loop\n newRules.splice(\n cursor,\n newRules.length,\n generateRuleGroupICWithConsistentCombinators(\n // oxlint-disable-next-line typescript/no-explicit-any\n { rules: newRules.slice(cursor) as any },\n baseCombinatorLevel + 1\n )\n );\n break;\n } else {\n // Group all rules between the current cursor and the next instance of the base combinator\n newRules.splice(\n cursor,\n nextBaseCombinatorIndex - cursor,\n generateRuleGroupICWithConsistentCombinators(\n // oxlint-disable-next-line typescript/no-explicit-any\n { rules: newRules.slice(cursor, nextBaseCombinatorIndex) as any },\n baseCombinatorLevel + 1\n )\n );\n }\n }\n\n return { ...rg, rules: newRules };\n};\n\n/**\n * Converts a {@link RuleGroupTypeIC} to {@link RuleGroupType}.\n *\n * This function is idempotent: {@link RuleGroupType} queries will be\n * returned as-is.\n *\n * @group Query Tools\n */\nexport const convertFromIC = <RG extends RuleGroupTypeAny>(rg: RG): ToRuleGroupType<RG> => {\n if (isRuleGroupType(rg)) {\n return rg as ToRuleGroupType<RG>;\n }\n const processedRG = generateRuleGroupICWithConsistentCombinators(rg);\n const rules: RuleGroupArray = [];\n let combinator = 'and';\n for (const [idx, r] of processedRG.rules.entries()) {\n if (typeof r === 'string') {\n if (idx === 1) combinator = r;\n } else {\n rules.push(isRuleGroup(r) ? convertFromIC(r) : r);\n }\n }\n return { ...processedRG, combinator, rules } as ToRuleGroupType<RG>;\n};\n\n/**\n * Converts a {@link RuleGroupType} to {@link RuleGroupTypeIC}.\n *\n * This function is idempotent: {@link RuleGroupTypeIC} queries will be\n * returned as-is.\n *\n * @group Query Tools\n */\nexport const convertToIC = <RG extends RuleGroupTypeAny>(rg: RG): ToRuleGroupTypeIC<RG> => {\n if (isRuleGroupTypeIC(rg)) {\n return rg as ToRuleGroupTypeIC<RG>;\n }\n const { combinator, ...queryWithoutCombinator } = rg;\n const rules: (RuleGroupTypeIC | RuleType | string)[] = [];\n const { length } = rg.rules;\n for (let idx = 0; idx < length; idx++) {\n const r = rg.rules[idx];\n if (isRuleGroup(r)) {\n rules.push(convertToIC(r));\n } else {\n rules.push(r);\n }\n if (combinator && idx < length - 1) {\n rules.push(combinator);\n }\n }\n return { ...queryWithoutCombinator, rules } as ToRuleGroupTypeIC<RG>;\n};\n\n/**\n * Converts a {@link RuleGroupType} to {@link RuleGroupTypeIC}. For a more explicit\n * operation, use {@link convertToIC}.\n *\n * @group Query Tools\n */\nfunction convertQuery(query: RuleGroupType): RuleGroupTypeIC;\n/**\n * Converts a {@link RuleGroupTypeIC} to {@link RuleGroupType}. For a more explicit\n * operation, use {@link convertFromIC}.\n *\n * @group Query Tools\n */\nfunction convertQuery(query: RuleGroupTypeIC): RuleGroupType;\nfunction convertQuery(query: RuleGroupType | RuleGroupTypeIC): RuleGroupType | RuleGroupTypeIC {\n return isRuleGroupTypeIC(query) ? convertFromIC(query) : convertToIC(query);\n}\n\nexport { convertQuery };\n"],"mappings":";;AAaA,MAAM,mBAAmB;CAAC;CAAM;CAAO;CAAM;AAE7C,MAAM,gBAAgB,GAAY,MAAcA,oBAAAA,GAAG,EAAE,KAAK;AAE1D,MAAM,gDACJ,IACA,sBAA8B,MACV;CACpB,MAAM,iBAAiB,iBAAiB;AAGxC,KAAI,CAAC,GAAG,MAAM,SAAS,eAAsB,CAG3C,QAAO,sBAAsB,iBAAiB,SAAS,IACnD,6CAA6C,IAAI,sBAAsB,EAAE,GACzE;CAGN,MAAM,WAAW,CAAC,GAAG,GAAG,MAAM;CAC9B,IAAI,SAAS;AAGb,QAAO,SAAS,SAAS,SAAS,GAAG;AACnC,MAAI,aAAa,SAAS,SAAS,IAAI,eAAe,EAAE;AACtD,aAAU;AACV;;EAGF,IAAI,0BAA0B;AAC9B,OAAK,IAAI,IAAI,SAAS,GAAG,IAAI,SAAS,QAAQ,IAC5C,KAAI,OAAO,SAAS,OAAO,YAAYA,oBAAAA,GAAG,SAAS,GAAG,KAAK,gBAAgB;AACzE,6BAA0B;AAC1B;;AAIJ,MAAI,4BAA4B,IAAI;AAElC,YAAS,OACP,QACA,SAAS,QACT,6CAEE,EAAE,OAAO,SAAS,MAAM,OAAO,EAAS,EACxC,sBAAsB,EACvB,CACF;AACD;QAGA,UAAS,OACP,QACA,0BAA0B,QAC1B,6CAEE,EAAE,OAAO,SAAS,MAAM,QAAQ,wBAAwB,EAAS,EACjE,sBAAsB,EACvB,CACF;;AAIL,QAAO;EAAE,GAAG;EAAI,OAAO;EAAU;;;;;;;;;;AAWnC,MAAa,iBAA8C,OAAgC;AACzF,KAAIC,oBAAAA,gBAAgB,GAAG,CACrB,QAAO;CAET,MAAM,cAAc,6CAA6C,GAAG;CACpE,MAAM,QAAwB,EAAE;CAChC,IAAI,aAAa;AACjB,MAAK,MAAM,CAAC,KAAK,MAAM,YAAY,MAAM,SAAS,CAChD,KAAI,OAAO,MAAM;MACX,QAAQ,EAAG,cAAa;OAE5B,OAAM,KAAKC,oBAAAA,YAAY,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;AAGrD,QAAO;EAAE,GAAG;EAAa;EAAY;EAAO;;;;;;;;;;AAW9C,MAAa,eAA4C,OAAkC;AACzF,KAAIC,oBAAAA,kBAAkB,GAAG,CACvB,QAAO;CAET,MAAM,EAAE,YAAY,GAAG,2BAA2B;CAClD,MAAM,QAAiD,EAAE;CACzD,MAAM,EAAE,WAAW,GAAG;AACtB,MAAK,IAAI,MAAM,GAAG,MAAM,QAAQ,OAAO;EACrC,MAAM,IAAI,GAAG,MAAM;AACnB,MAAID,oBAAAA,YAAY,EAAE,CAChB,OAAM,KAAK,YAAY,EAAE,CAAC;MAE1B,OAAM,KAAK,EAAE;AAEf,MAAI,cAAc,MAAM,SAAS,EAC/B,OAAM,KAAK,WAAW;;AAG1B,QAAO;EAAE,GAAG;EAAwB;EAAO"}
|
package/dist/formatQuery.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as SetRequired, O as RuleType, S as RuleGroupTypeAny, _ as ValueProcessorLegacy, a as ExportOperatorMap, c as NLTranslationKey, d as ParameterizedSQL, f as RQBJsonLogic, g as ValueProcessorByRule, h as SQLPreset, i as ExportObjectFormats, l as NLTranslations, m as RuleProcessor, n as DiagnosticsResult, o as FormatQueryOptions, p as RuleGroupProcessor, r as ExportFormat, s as GroupVariantCondition, t as ConstituentWordOrder, u as ParameterizedNamedSQL, v as ValueProcessorOptions } from "./index-Lht_Wq3V.mjs";
|
|
2
2
|
import { Column, Operators, SQL, Table } from "drizzle-orm";
|
|
3
3
|
import { WhereOptions } from "sequelize";
|
|
4
4
|
|
|
@@ -174,6 +174,19 @@ declare const defaultRuleGroupProcessorSpEL: RuleGroupProcessor<string>;
|
|
|
174
174
|
*/
|
|
175
175
|
declare const defaultRuleGroupProcessorSQL: RuleGroupProcessor<string>;
|
|
176
176
|
//#endregion
|
|
177
|
+
//#region src/utils/formatQuery/defaultRuleGroupProcessorDiagnostics.d.ts
|
|
178
|
+
/**
|
|
179
|
+
* Rule group processor used by {@link formatQuery} for "diagnostics" format.
|
|
180
|
+
*
|
|
181
|
+
* Produces a {@link DiagnosticsResult} containing an annotated copy of the query
|
|
182
|
+
* tree (`query`) with `valid`, `reasons`, `path`, and `level` properties on every
|
|
183
|
+
* rule and group; a flat `diagnostics` array; aggregate `stats`; and a per-field
|
|
184
|
+
* `fieldSummary`.
|
|
185
|
+
*
|
|
186
|
+
* @group Export
|
|
187
|
+
*/
|
|
188
|
+
declare const defaultRuleGroupProcessorDiagnostics: RuleGroupProcessor<DiagnosticsResult>;
|
|
189
|
+
//#endregion
|
|
177
190
|
//#region src/utils/formatQuery/defaultRuleProcessorDrizzle.d.ts
|
|
178
191
|
/**
|
|
179
192
|
* Default rule processor used by {@link formatQuery} for the "drizzle" format.
|
|
@@ -422,6 +435,15 @@ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "ldap" | (For
|
|
|
422
435
|
format: "ldap";
|
|
423
436
|
})): string;
|
|
424
437
|
/**
|
|
438
|
+
* Generates a {@link DiagnosticsResult} from a query object, containing an annotated
|
|
439
|
+
* query tree, a flat diagnostics array, aggregate stats, and a per-field summary.
|
|
440
|
+
*
|
|
441
|
+
* @group Export
|
|
442
|
+
*/
|
|
443
|
+
declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "diagnostics" | (FormatQueryOptions & {
|
|
444
|
+
format: "diagnostics";
|
|
445
|
+
})): DiagnosticsResult;
|
|
446
|
+
/**
|
|
425
447
|
* Generates a formatted (indented two spaces) JSON string from a query object.
|
|
426
448
|
*
|
|
427
449
|
* @group Export
|
|
@@ -675,5 +697,5 @@ declare const defaultValueProcessorMongoDBByRule: RuleProcessor;
|
|
|
675
697
|
*/
|
|
676
698
|
declare const defaultValueProcessorSpELByRule: RuleProcessor;
|
|
677
699
|
//#endregion
|
|
678
|
-
export { bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, defaultCELValueProcessor, defaultExportOperatorMap, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleProcessorCEL, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultSpELValueProcessor, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, formatQuery, formatQueryOptionPresets, getNLTranslataion, getQuoteFieldNamesWithArray, getQuotedFieldName, isValidValue, isValueProcessorLegacy, jsonLogicAdditionalOperators, mapSQLOperator, mongoDbFallback, mongoOperators, normalizeConstituentWordOrder, numerifyValues, prismaFallback, prismaOperators, processMatchMode, shouldRenderAsNumber, sqlDialectPresets };
|
|
700
|
+
export { bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, defaultCELValueProcessor, defaultExportOperatorMap, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorDiagnostics, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleProcessorCEL, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultSpELValueProcessor, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, formatQuery, formatQueryOptionPresets, getNLTranslataion, getQuoteFieldNamesWithArray, getQuotedFieldName, isValidValue, isValueProcessorLegacy, jsonLogicAdditionalOperators, mapSQLOperator, mongoDbFallback, mongoOperators, normalizeConstituentWordOrder, numerifyValues, prismaFallback, prismaOperators, processMatchMode, shouldRenderAsNumber, sqlDialectPresets };
|
|
679
701
|
//# sourceMappingURL=formatQuery.d.mts.map
|
package/dist/formatQuery.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as SetRequired, O as RuleType, S as RuleGroupTypeAny, _ as ValueProcessorLegacy, a as ExportOperatorMap, c as NLTranslationKey, d as ParameterizedSQL, f as RQBJsonLogic, g as ValueProcessorByRule, h as SQLPreset, i as ExportObjectFormats, l as NLTranslations, m as RuleProcessor, n as DiagnosticsResult, o as FormatQueryOptions, p as RuleGroupProcessor, r as ExportFormat, s as GroupVariantCondition, t as ConstituentWordOrder, u as ParameterizedNamedSQL, v as ValueProcessorOptions } from "./index-D5TXNIzF.js";
|
|
2
2
|
import { Column, Operators, SQL, Table } from "drizzle-orm";
|
|
3
3
|
import { WhereOptions } from "sequelize";
|
|
4
4
|
|
|
@@ -174,6 +174,19 @@ declare const defaultRuleGroupProcessorSpEL: RuleGroupProcessor<string>;
|
|
|
174
174
|
*/
|
|
175
175
|
declare const defaultRuleGroupProcessorSQL: RuleGroupProcessor<string>;
|
|
176
176
|
//#endregion
|
|
177
|
+
//#region src/utils/formatQuery/defaultRuleGroupProcessorDiagnostics.d.ts
|
|
178
|
+
/**
|
|
179
|
+
* Rule group processor used by {@link formatQuery} for "diagnostics" format.
|
|
180
|
+
*
|
|
181
|
+
* Produces a {@link DiagnosticsResult} containing an annotated copy of the query
|
|
182
|
+
* tree (`query`) with `valid`, `reasons`, `path`, and `level` properties on every
|
|
183
|
+
* rule and group; a flat `diagnostics` array; aggregate `stats`; and a per-field
|
|
184
|
+
* `fieldSummary`.
|
|
185
|
+
*
|
|
186
|
+
* @group Export
|
|
187
|
+
*/
|
|
188
|
+
declare const defaultRuleGroupProcessorDiagnostics: RuleGroupProcessor<DiagnosticsResult>;
|
|
189
|
+
//#endregion
|
|
177
190
|
//#region src/utils/formatQuery/defaultRuleProcessorDrizzle.d.ts
|
|
178
191
|
/**
|
|
179
192
|
* Default rule processor used by {@link formatQuery} for the "drizzle" format.
|
|
@@ -422,6 +435,15 @@ declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "ldap" | (For
|
|
|
422
435
|
format: "ldap";
|
|
423
436
|
})): string;
|
|
424
437
|
/**
|
|
438
|
+
* Generates a {@link DiagnosticsResult} from a query object, containing an annotated
|
|
439
|
+
* query tree, a flat diagnostics array, aggregate stats, and a per-field summary.
|
|
440
|
+
*
|
|
441
|
+
* @group Export
|
|
442
|
+
*/
|
|
443
|
+
declare function formatQuery(ruleGroup: RuleGroupTypeAny, options: "diagnostics" | (FormatQueryOptions & {
|
|
444
|
+
format: "diagnostics";
|
|
445
|
+
})): DiagnosticsResult;
|
|
446
|
+
/**
|
|
425
447
|
* Generates a formatted (indented two spaces) JSON string from a query object.
|
|
426
448
|
*
|
|
427
449
|
* @group Export
|
|
@@ -675,5 +697,5 @@ declare const defaultValueProcessorMongoDBByRule: RuleProcessor;
|
|
|
675
697
|
*/
|
|
676
698
|
declare const defaultValueProcessorSpELByRule: RuleProcessor;
|
|
677
699
|
//#endregion
|
|
678
|
-
export { bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, defaultCELValueProcessor, defaultExportOperatorMap, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleProcessorCEL, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultSpELValueProcessor, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, formatQuery, formatQueryOptionPresets, getNLTranslataion, getQuoteFieldNamesWithArray, getQuotedFieldName, isValidValue, isValueProcessorLegacy, jsonLogicAdditionalOperators, mapSQLOperator, mongoDbFallback, mongoOperators, normalizeConstituentWordOrder, numerifyValues, prismaFallback, prismaOperators, processMatchMode, shouldRenderAsNumber, sqlDialectPresets };
|
|
700
|
+
export { bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, defaultCELValueProcessor, defaultExportOperatorMap, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorDiagnostics, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleProcessorCEL, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultSpELValueProcessor, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, formatQuery, formatQueryOptionPresets, getNLTranslataion, getQuoteFieldNamesWithArray, getQuotedFieldName, isValidValue, isValueProcessorLegacy, jsonLogicAdditionalOperators, mapSQLOperator, mongoDbFallback, mongoOperators, normalizeConstituentWordOrder, numerifyValues, prismaFallback, prismaOperators, processMatchMode, shouldRenderAsNumber, sqlDialectPresets };
|
|
679
701
|
//# sourceMappingURL=formatQuery.d.ts.map
|