@react-querybuilder/core 8.11.1 → 8.12.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/{basic-BeKPP0_1.d.ts → basic-DbvrfPNz.d.mts} +39 -4
- package/dist/{basic-B4vXboTG.d.mts → basic-o1-sYjK6.d.ts} +39 -4
- package/dist/chunk-BxBTb9qk.js +39 -0
- package/dist/chunk-DrjzjjTJ.mjs +23 -0
- package/dist/chunk-Dv2ph0Ay.js +23 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +131 -53
- package/dist/cjs/react-querybuilder_core.cjs.development.js +36 -39
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +131 -53
- 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-CqX3rPvj.mjs → convertQuery-Cj4t-LT4.mjs} +2 -2
- package/dist/{convertQuery-CqX3rPvj.mjs.map → convertQuery-Cj4t-LT4.mjs.map} +1 -1
- package/dist/{convertQuery-DAqoID3O.js → convertQuery-DuY_BJHy.js} +3 -3
- package/dist/{convertQuery-DAqoID3O.js.map → convertQuery-DuY_BJHy.js.map} +1 -1
- package/dist/{export-BjRt-qrK.d.mts → export-CCULKoP4.d.mts} +2 -2
- package/dist/{export-CQB0nuvW.d.ts → export-WDHFbiPz.d.ts} +2 -2
- package/dist/formatQuery.d.mts +15 -3
- package/dist/formatQuery.d.ts +15 -3
- package/dist/formatQuery.js +172 -425
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +4 -257
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-Dvayhrgj.d.ts → import-BSWb9Vgd.d.ts} +2 -2
- package/dist/{import-Bc_p8ls9.d.mts → import-CLyHpgk8.d.mts} +2 -2
- package/dist/{isRuleGroup-CYcfPgbg.mjs → isRuleGroup-BcfwGaIN.mjs} +1 -1
- package/dist/{isRuleGroup-CYcfPgbg.mjs.map → isRuleGroup-BcfwGaIN.mjs.map} +1 -1
- package/dist/{isRuleGroup-DqAs2x4E.js → isRuleGroup-Do9KKsmt.js} +2 -40
- package/dist/{isRuleGroup-DqAs2x4E.js.map → isRuleGroup-Do9KKsmt.js.map} +1 -1
- package/dist/parseCEL.d.mts +32 -7
- package/dist/parseCEL.d.ts +32 -7
- package/dist/parseCEL.js +181 -12
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +174 -8
- 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 +6 -5
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +3 -3
- package/dist/parseJsonLogic.d.mts +3 -3
- package/dist/parseJsonLogic.d.ts +3 -3
- package/dist/parseJsonLogic.js +10 -11
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +4 -5
- 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 +20 -21
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +4 -5
- 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 +10 -13
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +3 -5
- 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 +7 -7
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +3 -4
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/{prepareQueryObjects-DPCC-iHp.mjs → prepareQueryObjects-BfnyRV5t.mjs} +4 -3
- package/dist/{prepareQueryObjects-DPCC-iHp.mjs.map → prepareQueryObjects-BfnyRV5t.mjs.map} +1 -1
- package/dist/{prepareQueryObjects-BOUWfel5.js → prepareQueryObjects-DCtJJrF5.js} +14 -13
- package/dist/prepareQueryObjects-DCtJJrF5.js.map +1 -0
- package/dist/react-querybuilder_core.d.mts +131 -53
- package/dist/react-querybuilder_core.legacy-esm.d.ts +131 -53
- package/dist/react-querybuilder_core.legacy-esm.js +43 -21
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +36 -14
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +131 -53
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/{transformQuery-DCCpjtyq.mjs → transformQuery-Bq4iyYsE.mjs} +9 -2
- package/dist/{transformQuery-DCCpjtyq.mjs.map → transformQuery-Bq4iyYsE.mjs.map} +1 -1
- package/dist/{transformQuery-CWDPogO5.js → transformQuery-DvJTAvkh.js} +10 -3
- package/dist/{transformQuery-CWDPogO5.js.map → transformQuery-DvJTAvkh.js.map} +1 -1
- package/dist/transformQuery.d.mts +1 -1
- package/dist/transformQuery.d.ts +1 -1
- package/dist/transformQuery.js +2 -2
- package/dist/transformQuery.mjs +2 -2
- package/dist/utils-CoYbYnVo.js +706 -0
- package/dist/utils-CoYbYnVo.js.map +1 -0
- package/dist/utils-DxH23QtE.mjs +514 -0
- package/dist/utils-DxH23QtE.mjs.map +1 -0
- package/package.json +15 -15
- package/dist/arrayUtils-A_OXU9W1.mjs +0 -50
- package/dist/arrayUtils-A_OXU9W1.mjs.map +0 -1
- package/dist/arrayUtils-QxZOZTf6.js +0 -73
- package/dist/arrayUtils-QxZOZTf6.js.map +0 -1
- package/dist/optGroupUtils-B0hTpodo.js +0 -251
- package/dist/optGroupUtils-B0hTpodo.js.map +0 -1
- package/dist/optGroupUtils-VeZ3k7-1.mjs +0 -185
- package/dist/optGroupUtils-VeZ3k7-1.mjs.map +0 -1
- package/dist/parseNumber-CXdMVNFx.mjs +0 -24
- package/dist/parseNumber-CXdMVNFx.mjs.map +0 -1
- package/dist/parseNumber-D4iQDxK-.js +0 -31
- package/dist/parseNumber-D4iQDxK-.js.map +0 -1
- package/dist/prepareQueryObjects-BOUWfel5.js.map +0 -1
package/dist/formatQuery.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as transformQuery } from "./transformQuery-DCCpjtyq.mjs";
|
|
6
|
-
import { t as convertFromIC } from "./convertQuery-CqX3rPvj.mjs";
|
|
1
|
+
import { E as parseNumber, M as defaultPlaceholderOperatorName, O as toArray, S as toFlatOptionArray, _ as shouldRenderAsNumber, a as getNLTranslataion, c as isValidValue, d as mapSQLOperator, f as mongoOperators, g as processMatchMode, h as prismaOperators, i as defaultNLTranslations, j as defaultPlaceholderFieldName, k as trimIfString, l as isValueProcessorLegacy, m as numerifyValues, n as bigIntJsonStringifyReplacer, o as getQuoteFieldNamesWithArray, p as normalizeConstituentWordOrder, r as celCombinatorMap, s as getQuotedFieldName, t as bigIntJsonParseReviver, u as jsonLogicAdditionalOperators, v as getParseNumberMethod, w as toFullOptionList, y as getOption } from "./utils-DxH23QtE.mjs";
|
|
2
|
+
import { a as lc, i as isPojo, n as isRuleGroupType, o as nullOrUndefinedOrEmpty, r as isRuleGroupTypeIC, t as isRuleGroup } from "./isRuleGroup-BcfwGaIN.mjs";
|
|
3
|
+
import { t as transformQuery } from "./transformQuery-Bq4iyYsE.mjs";
|
|
4
|
+
import { t as convertFromIC } from "./convertQuery-Cj4t-LT4.mjs";
|
|
7
5
|
import { produce } from "immer";
|
|
8
6
|
|
|
9
7
|
//#region src/utils/isRuleOrGroupValid.ts
|
|
@@ -29,257 +27,6 @@ const isRuleOrGroupValid = (rg, validationResult, validator) => {
|
|
|
29
27
|
return true;
|
|
30
28
|
};
|
|
31
29
|
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/utils/getParseNumberMethod.ts
|
|
34
|
-
const getParseNumberMethod = ({ parseNumbers, inputType }) => {
|
|
35
|
-
if (typeof parseNumbers === "string") {
|
|
36
|
-
const [method, level] = parseNumbers.split("-");
|
|
37
|
-
if (level === "limited") return inputType === "number" ? method : false;
|
|
38
|
-
return method;
|
|
39
|
-
}
|
|
40
|
-
return parseNumbers ? "strict" : false;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/utils/formatQuery/utils.ts
|
|
45
|
-
/**
|
|
46
|
-
* Maps a {@link DefaultOperatorName} to a SQL operator.
|
|
47
|
-
*
|
|
48
|
-
* @group Export
|
|
49
|
-
*/
|
|
50
|
-
const mapSQLOperator = (rqbOperator) => {
|
|
51
|
-
switch (lc(rqbOperator)) {
|
|
52
|
-
case "null": return "is null";
|
|
53
|
-
case "notnull": return "is not null";
|
|
54
|
-
case "notin": return "not in";
|
|
55
|
-
case "notbetween": return "not between";
|
|
56
|
-
case "contains":
|
|
57
|
-
case "beginswith":
|
|
58
|
-
case "endswith": return "like";
|
|
59
|
-
case "doesnotcontain":
|
|
60
|
-
case "doesnotbeginwith":
|
|
61
|
-
case "doesnotendwith": return "not like";
|
|
62
|
-
default: return rqbOperator;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Maps a (lowercase) {@link DefaultOperatorName} to a MongoDB operator.
|
|
67
|
-
*
|
|
68
|
-
* @group Export
|
|
69
|
-
*/
|
|
70
|
-
const mongoOperators = {
|
|
71
|
-
"=": "$eq",
|
|
72
|
-
"!=": "$ne",
|
|
73
|
-
"<": "$lt",
|
|
74
|
-
"<=": "$lte",
|
|
75
|
-
">": "$gt",
|
|
76
|
-
">=": "$gte",
|
|
77
|
-
in: "$in",
|
|
78
|
-
notin: "$nin",
|
|
79
|
-
notIn: "$nin"
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Maps a (lowercase) {@link DefaultOperatorName} to a Prisma ORM operator.
|
|
83
|
-
*
|
|
84
|
-
* @group Export
|
|
85
|
-
*/
|
|
86
|
-
const prismaOperators = {
|
|
87
|
-
"=": "equals",
|
|
88
|
-
"!=": "not",
|
|
89
|
-
"<": "lt",
|
|
90
|
-
"<=": "lte",
|
|
91
|
-
">": "gt",
|
|
92
|
-
">=": "gte",
|
|
93
|
-
in: "in",
|
|
94
|
-
notin: "notIn"
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* Maps a {@link DefaultCombinatorName} to a CEL combinator.
|
|
98
|
-
*
|
|
99
|
-
* @group Export
|
|
100
|
-
*/
|
|
101
|
-
const celCombinatorMap = {
|
|
102
|
-
and: "&&",
|
|
103
|
-
or: "||"
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Register these operators with `jsonLogic` before applying the result
|
|
107
|
-
* of `formatQuery(query, 'jsonlogic')`.
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```
|
|
111
|
-
* for (const [op, func] of Object.entries(jsonLogicAdditionalOperators)) {
|
|
112
|
-
* jsonLogic.add_operation(op, func);
|
|
113
|
-
* }
|
|
114
|
-
* jsonLogic.apply({ "startsWith": [{ "var": "firstName" }, "Stev"] }, data);
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
|
-
* @group Export
|
|
118
|
-
*/
|
|
119
|
-
const jsonLogicAdditionalOperators = {
|
|
120
|
-
startsWith: (a, b) => typeof a === "string" && a.startsWith(b),
|
|
121
|
-
endsWith: (a, b) => typeof a === "string" && a.endsWith(b)
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Converts all `string`-type `value` properties of a query object into `number` where appropriate.
|
|
125
|
-
*
|
|
126
|
-
* Used by {@link formatQuery} for the `json*` formats when `parseNumbers` is `true`.
|
|
127
|
-
*
|
|
128
|
-
* @group Export
|
|
129
|
-
*/
|
|
130
|
-
const numerifyValues = (rg, options) => ({
|
|
131
|
-
...rg,
|
|
132
|
-
rules: rg.rules.map((r) => {
|
|
133
|
-
if (typeof r === "string") return r;
|
|
134
|
-
if (isRuleGroup(r)) return numerifyValues(r, options);
|
|
135
|
-
const fieldData = getOption(options.fields, r.field);
|
|
136
|
-
const parseNumbers = getParseNumberMethod({
|
|
137
|
-
parseNumbers: options.parseNumbers,
|
|
138
|
-
inputType: fieldData?.inputType
|
|
139
|
-
});
|
|
140
|
-
if (Array.isArray(r.value)) return {
|
|
141
|
-
...r,
|
|
142
|
-
value: r.value.map((v) => parseNumber(v, { parseNumbers }))
|
|
143
|
-
};
|
|
144
|
-
const valAsArray = toArray(r.value, { retainEmptyStrings: true }).map((v) => parseNumber(v, { parseNumbers }));
|
|
145
|
-
if (valAsArray.every((v) => typeof v === "number")) {
|
|
146
|
-
// istanbul ignore else
|
|
147
|
-
if (valAsArray.length > 1) return {
|
|
148
|
-
...r,
|
|
149
|
-
value: valAsArray
|
|
150
|
-
};
|
|
151
|
-
else if (valAsArray.length === 1) return {
|
|
152
|
-
...r,
|
|
153
|
-
value: valAsArray[0]
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
return r;
|
|
157
|
-
})
|
|
158
|
-
});
|
|
159
|
-
/**
|
|
160
|
-
* Determines whether a value is _anything_ except an empty `string` or `NaN`.
|
|
161
|
-
*
|
|
162
|
-
* @group Export
|
|
163
|
-
*/
|
|
164
|
-
const isValidValue = (value) => typeof value === "string" && value.length > 0 || typeof value === "number" && !Number.isNaN(value) || typeof value !== "string" && typeof value !== "number";
|
|
165
|
-
/**
|
|
166
|
-
* Determines whether {@link formatQuery} should render the given value as a number.
|
|
167
|
-
* As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and
|
|
168
|
-
* `string` values will return `true` if they test positive against {@link numericRegex}.
|
|
169
|
-
*
|
|
170
|
-
* @group Export
|
|
171
|
-
*/
|
|
172
|
-
const shouldRenderAsNumber = (value, parseNumbers) => !!parseNumbers && (typeof value === "number" || typeof value === "bigint" || typeof value === "string" && numericRegex.test(value));
|
|
173
|
-
/**
|
|
174
|
-
* Used by {@link formatQuery} to determine whether the given value processor is a
|
|
175
|
-
* "legacy" value processor by counting the number of arguments. Legacy value
|
|
176
|
-
* processors take 3 arguments (not counting any arguments with default values), while
|
|
177
|
-
* rule-based value processors take no more than 2 arguments.
|
|
178
|
-
*
|
|
179
|
-
* @group Export
|
|
180
|
-
*/
|
|
181
|
-
const isValueProcessorLegacy = (valueProcessor) => valueProcessor.length >= 3;
|
|
182
|
-
/**
|
|
183
|
-
* Converts the `quoteFieldNamesWith` option into an array of two strings.
|
|
184
|
-
* If the option is a string, the array elements are both that string.
|
|
185
|
-
*
|
|
186
|
-
* @default
|
|
187
|
-
* ['', '']
|
|
188
|
-
*
|
|
189
|
-
* @group Export
|
|
190
|
-
*/
|
|
191
|
-
const getQuoteFieldNamesWithArray = (quoteFieldNamesWith = ["", ""]) => Array.isArray(quoteFieldNamesWith) ? quoteFieldNamesWith : typeof quoteFieldNamesWith === "string" ? [quoteFieldNamesWith, quoteFieldNamesWith] : quoteFieldNamesWith ?? ["", ""];
|
|
192
|
-
/**
|
|
193
|
-
* Given a field name and relevant {@link ValueProcessorOptions}, returns the field name
|
|
194
|
-
* wrapped in the configured quote character(s).
|
|
195
|
-
*
|
|
196
|
-
* @group Export
|
|
197
|
-
*/
|
|
198
|
-
const getQuotedFieldName = (fieldName, { quoteFieldNamesWith, fieldIdentifierSeparator }) => {
|
|
199
|
-
const [qPre, qPost] = getQuoteFieldNamesWithArray(quoteFieldNamesWith);
|
|
200
|
-
return typeof fieldIdentifierSeparator === "string" && fieldIdentifierSeparator.length > 0 ? joinWith(splitBy(fieldName, fieldIdentifierSeparator).map((part) => `${qPre}${part}${qPost}`), fieldIdentifierSeparator) : `${qPre}${fieldName}${qPost}`;
|
|
201
|
-
};
|
|
202
|
-
const defaultWordOrder = [
|
|
203
|
-
"S",
|
|
204
|
-
"V",
|
|
205
|
-
"O"
|
|
206
|
-
];
|
|
207
|
-
/**
|
|
208
|
-
* Given a [Constituent word order](https://en.wikipedia.org/wiki/Word_order#Constituent_word_orders)
|
|
209
|
-
* like "svo" or "sov", returns a permutation of `["S", "V", "O"]` based on the first occurrence of
|
|
210
|
-
* each letter in the input string (case insensitive). This widens the valid input from abbreviations
|
|
211
|
-
* like "svo" to more expressive strings like "subject-verb-object" or "sub ver obj". Any missing
|
|
212
|
-
* letters are appended in the default order "SVO" (e.g., "object" would yield `["O", "S", "V"]`).
|
|
213
|
-
*
|
|
214
|
-
* @group Export
|
|
215
|
-
*/
|
|
216
|
-
const normalizeConstituentWordOrder = (input) => {
|
|
217
|
-
const result = [];
|
|
218
|
-
const letterSet = new Set(defaultWordOrder);
|
|
219
|
-
for (const char of input.toUpperCase()) if (letterSet.has(char)) {
|
|
220
|
-
result.push(char);
|
|
221
|
-
letterSet.delete(char);
|
|
222
|
-
if (letterSet.size === 0) break;
|
|
223
|
-
}
|
|
224
|
-
for (const letter of defaultWordOrder) if (letterSet.has(letter)) result.push(letter);
|
|
225
|
-
return result;
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* Default translations used by {@link formatQuery} for "natural_language" format.
|
|
229
|
-
*
|
|
230
|
-
* @group Export
|
|
231
|
-
*/
|
|
232
|
-
const defaultNLTranslations = {
|
|
233
|
-
groupPrefix: "",
|
|
234
|
-
groupPrefix_not_xor: "either zero or more than one of",
|
|
235
|
-
groupPrefix_xor: "exactly one of",
|
|
236
|
-
groupSuffix: "is true",
|
|
237
|
-
groupSuffix_not: "is not true"
|
|
238
|
-
};
|
|
239
|
-
/**
|
|
240
|
-
* Note: This function assumes `conditions.length > 0`
|
|
241
|
-
*/
|
|
242
|
-
const translationMatchFilter = (key, keyToTest, conditions) => keyToTest.startsWith(key) && conditions.every((c) => keyToTest.includes(`_${c}`) && keyToTest.match(/_/g)?.length === conditions.length);
|
|
243
|
-
/**
|
|
244
|
-
* Used by {@link formatQuery} to get a translation based on certain conditions
|
|
245
|
-
* for the "natural_language" format.
|
|
246
|
-
*
|
|
247
|
-
* @group Export
|
|
248
|
-
*/
|
|
249
|
-
const getNLTranslataion = (key, translations, conditions = []) => conditions.length === 0 ? translations[key] ?? defaultNLTranslations[key] ?? "" : Object.entries(translations).find(([keyToTest]) => translationMatchFilter(key, keyToTest, conditions))?.[1] ?? Object.entries(defaultNLTranslations).find(([keyToTest]) => translationMatchFilter(key, keyToTest, conditions))?.[1] ?? defaultNLTranslations[key] ?? "";
|
|
250
|
-
const processMatchMode = (rule) => {
|
|
251
|
-
const { mode, threshold } = rule.match ?? {};
|
|
252
|
-
if (mode) {
|
|
253
|
-
if (!isRuleGroup(rule.value)) return false;
|
|
254
|
-
const matchModeLC = lc(mode);
|
|
255
|
-
const matchModeCoerced = matchModeLC === "atleast" && threshold === 1 ? "some" : matchModeLC === "atmost" && threshold === 0 ? "none" : matchModeLC;
|
|
256
|
-
if ((matchModeCoerced === "atleast" || matchModeCoerced === "atmost" || matchModeCoerced === "exactly") && (typeof threshold !== "number" || threshold < 0)) return false;
|
|
257
|
-
return {
|
|
258
|
-
mode: matchModeCoerced,
|
|
259
|
-
threshold
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
/**
|
|
264
|
-
* "Replacer" method for JSON.stringify's second argument. Converts `bigint` values to
|
|
265
|
-
* objects with a `$bigint` property having a value of a string representation of
|
|
266
|
-
* the actual `bigint`-type value.
|
|
267
|
-
*
|
|
268
|
-
* Inverse of {@link bigIntJsonParseReviver}.
|
|
269
|
-
*
|
|
270
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
|
|
271
|
-
*/
|
|
272
|
-
const bigIntJsonStringifyReplacer = (_key, value) => typeof value === "bigint" ? { $bigint: value.toString() } : value;
|
|
273
|
-
/**
|
|
274
|
-
* "Reviver" method for JSON.parse's second argument. Converts objects having a single
|
|
275
|
-
* `$bigint: string` property to an actual `bigint` value.
|
|
276
|
-
*
|
|
277
|
-
* Inverse of {@link bigIntJsonStringifyReplacer}.
|
|
278
|
-
*
|
|
279
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
|
|
280
|
-
*/
|
|
281
|
-
const bigIntJsonParseReviver = (_key, value) => isPojo(value) && Object.keys(value).length === 1 && typeof value.$bigint === "string" ? BigInt(value.$bigint) : value;
|
|
282
|
-
|
|
283
30
|
//#endregion
|
|
284
31
|
//#region src/utils/formatQuery/defaultRuleGroupProcessorCEL.ts
|
|
285
32
|
/**
|