@react-querybuilder/core 8.9.2 → 8.10.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/{arrayUtils-BF1P8iHS.mjs → arrayUtils-C9sO4qLO.mjs} +3 -75
- package/dist/arrayUtils-C9sO4qLO.mjs.map +1 -0
- package/dist/arrayUtils-QxZOZTf6.js +73 -0
- package/dist/arrayUtils-QxZOZTf6.js.map +1 -0
- package/dist/basic-BmpEwexQ.d.mts +363 -0
- package/dist/basic-CDDA-KZa.d.ts +363 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +553 -1247
- package/dist/cjs/react-querybuilder_core.cjs.development.js +408 -121
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +553 -1247
- 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-H7RhQiIc.mjs → convertQuery-BUgyz1GA.mjs} +2 -2
- package/dist/{convertQuery-H7RhQiIc.mjs.map → convertQuery-BUgyz1GA.mjs.map} +1 -1
- package/dist/{export-r-V7bU31.d.mts → export-Ccjfea21.d.mts} +3 -2
- package/dist/{export-DyrnTh6K.d.ts → export-GUuxJ7zR.d.ts} +3 -2
- package/dist/formatQuery.d.mts +3 -2
- package/dist/formatQuery.d.ts +3 -2
- package/dist/formatQuery.js +217 -87
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +217 -87
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-Cksobmln.d.ts → import-D-hm1phN.d.ts} +2 -2
- package/dist/{import-BwbbP4oU.d.mts → import-Dxevzw_-.d.mts} +2 -2
- package/dist/{isRuleGroup-CnhYpLOM.mjs → isRuleGroup-CGe_rb2w.mjs} +1 -1
- package/dist/{isRuleGroup-CnhYpLOM.mjs.map → isRuleGroup-CGe_rb2w.mjs.map} +1 -1
- package/dist/{optGroupUtils-CXLgyg2i.js → optGroupUtils-B0hTpodo.js} +114 -1
- package/dist/optGroupUtils-B0hTpodo.js.map +1 -0
- package/dist/{optGroupUtils-Duv-M8rf.mjs → optGroupUtils-DrubUpx0.mjs} +86 -3
- package/dist/optGroupUtils-DrubUpx0.mjs.map +1 -0
- package/dist/parseCEL.d.mts +292 -11
- package/dist/parseCEL.d.ts +292 -11
- package/dist/parseCEL.js +114 -30
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +69 -31
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseJSONata.d.mts +3 -2
- package/dist/parseJSONata.d.ts +3 -2
- package/dist/parseJSONata.js +49 -77
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +4 -5
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.d.mts +4 -3
- package/dist/parseJsonLogic.d.ts +4 -3
- package/dist/parseJsonLogic.js +5 -6
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +5 -6
- package/dist/parseJsonLogic.mjs.map +1 -1
- package/dist/parseMongoDB.d.mts +3 -2
- package/dist/parseMongoDB.d.ts +3 -2
- package/dist/parseMongoDB.js +15 -16
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +5 -6
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/{parseNumber-BtGKa58z.mjs → parseNumber-B_-sR6d5.mjs} +1 -1
- package/dist/{parseNumber-BtGKa58z.mjs.map → parseNumber-B_-sR6d5.mjs.map} +1 -1
- package/dist/{parseNumber-Bcys1kOH.js → parseNumber-D4iQDxK-.js} +1 -1
- package/dist/{parseNumber-Bcys1kOH.js.map → parseNumber-D4iQDxK-.js.map} +1 -1
- package/dist/parseSQL.d.mts +3 -2
- package/dist/parseSQL.d.ts +3 -2
- package/dist/parseSQL.js +11 -15
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +12 -16
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.d.mts +3 -2
- package/dist/parseSpEL.d.ts +3 -2
- package/dist/parseSpEL.js +7 -9
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +5 -6
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/{prepareQueryObjects-BqFEs4eV.js → prepareQueryObjects-BOUWfel5.js} +4 -5
- package/dist/prepareQueryObjects-BOUWfel5.js.map +1 -0
- package/dist/{prepareQueryObjects-CS6Wmhmf.mjs → prepareQueryObjects-CJNpnGcJ.mjs} +5 -6
- package/dist/prepareQueryObjects-CJNpnGcJ.mjs.map +1 -0
- package/dist/query-builder-layout.css +1 -1
- package/dist/query-builder-layout.css.map +1 -1
- package/dist/query-builder.css +1 -1
- package/dist/query-builder.css.map +1 -1
- package/dist/react-querybuilder_core.d.mts +553 -1247
- package/dist/react-querybuilder_core.legacy-esm.d.ts +553 -1247
- package/dist/react-querybuilder_core.legacy-esm.js +412 -119
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +405 -122
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +553 -1247
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/styles/_layout.scss +61 -17
- package/dist/styles/_main.scss +17 -4
- package/dist/{transformQuery-FL_nlpp5.js → transformQuery-CWDPogO5.js} +1 -1
- package/dist/{transformQuery-FL_nlpp5.js.map → transformQuery-CWDPogO5.js.map} +1 -1
- package/dist/{transformQuery-DdMvmrCh.mjs → transformQuery-DHvtgDgZ.mjs} +2 -2
- package/dist/{transformQuery-DdMvmrCh.mjs.map → transformQuery-DHvtgDgZ.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 +2 -2
- package/package.json +14 -12
- package/dist/arrayUtils-BF1P8iHS.mjs.map +0 -1
- package/dist/arrayUtils-D5EoIsKP.js +0 -164
- package/dist/arrayUtils-D5EoIsKP.js.map +0 -1
- package/dist/basic-BfD-7CN3.d.mts +0 -1235
- package/dist/basic-C8xXKHIA.d.ts +0 -1235
- package/dist/objectUtils-BBZSfZJz.js +0 -17
- package/dist/objectUtils-BBZSfZJz.js.map +0 -1
- package/dist/objectUtils-BtWdcZVG.mjs +0 -11
- package/dist/objectUtils-BtWdcZVG.mjs.map +0 -1
- package/dist/optGroupUtils-CXLgyg2i.js.map +0 -1
- package/dist/optGroupUtils-Duv-M8rf.mjs.map +0 -1
- package/dist/prepareQueryObjects-BqFEs4eV.js.map +0 -1
- package/dist/prepareQueryObjects-CS6Wmhmf.mjs.map +0 -1
|
@@ -65,6 +65,108 @@ const defaultPlaceholderValueLabel = defaultPlaceholderLabel;
|
|
|
65
65
|
*/
|
|
66
66
|
const defaultPlaceholderValueGroupLabel = defaultPlaceholderLabel;
|
|
67
67
|
/**
|
|
68
|
+
* Default configuration of translatable strings.
|
|
69
|
+
*
|
|
70
|
+
* @group Defaults
|
|
71
|
+
*/
|
|
72
|
+
const defaultTranslations = {
|
|
73
|
+
fields: {
|
|
74
|
+
title: "Field",
|
|
75
|
+
placeholderName: defaultPlaceholderFieldName,
|
|
76
|
+
placeholderLabel: defaultPlaceholderFieldLabel,
|
|
77
|
+
placeholderGroupLabel: defaultPlaceholderFieldGroupLabel
|
|
78
|
+
},
|
|
79
|
+
operators: {
|
|
80
|
+
title: "Operator",
|
|
81
|
+
placeholderName: defaultPlaceholderOperatorName,
|
|
82
|
+
placeholderLabel: defaultPlaceholderOperatorLabel,
|
|
83
|
+
placeholderGroupLabel: defaultPlaceholderOperatorGroupLabel
|
|
84
|
+
},
|
|
85
|
+
values: {
|
|
86
|
+
title: "Values",
|
|
87
|
+
placeholderName: defaultPlaceholderValueName,
|
|
88
|
+
placeholderLabel: defaultPlaceholderValueLabel,
|
|
89
|
+
placeholderGroupLabel: defaultPlaceholderValueGroupLabel
|
|
90
|
+
},
|
|
91
|
+
matchMode: { title: "Match mode" },
|
|
92
|
+
matchThreshold: { title: "Match threshold" },
|
|
93
|
+
value: { title: "Value" },
|
|
94
|
+
removeRule: {
|
|
95
|
+
label: "⨯",
|
|
96
|
+
title: "Remove rule"
|
|
97
|
+
},
|
|
98
|
+
removeGroup: {
|
|
99
|
+
label: "⨯",
|
|
100
|
+
title: "Remove group"
|
|
101
|
+
},
|
|
102
|
+
addRule: {
|
|
103
|
+
label: "+ Rule",
|
|
104
|
+
title: "Add rule"
|
|
105
|
+
},
|
|
106
|
+
addGroup: {
|
|
107
|
+
label: "+ Group",
|
|
108
|
+
title: "Add group"
|
|
109
|
+
},
|
|
110
|
+
combinators: { title: "Combinator" },
|
|
111
|
+
notToggle: {
|
|
112
|
+
label: "Not",
|
|
113
|
+
title: "Invert this group"
|
|
114
|
+
},
|
|
115
|
+
cloneRule: {
|
|
116
|
+
label: "⧉",
|
|
117
|
+
title: "Clone rule"
|
|
118
|
+
},
|
|
119
|
+
cloneRuleGroup: {
|
|
120
|
+
label: "⧉",
|
|
121
|
+
title: "Clone group"
|
|
122
|
+
},
|
|
123
|
+
shiftActionUp: {
|
|
124
|
+
label: "˄",
|
|
125
|
+
title: "Shift up"
|
|
126
|
+
},
|
|
127
|
+
shiftActionDown: {
|
|
128
|
+
label: "˅",
|
|
129
|
+
title: "Shift down"
|
|
130
|
+
},
|
|
131
|
+
dragHandle: {
|
|
132
|
+
label: "⁞⁞",
|
|
133
|
+
title: "Drag handle"
|
|
134
|
+
},
|
|
135
|
+
lockRule: {
|
|
136
|
+
label: "🔓",
|
|
137
|
+
title: "Lock rule"
|
|
138
|
+
},
|
|
139
|
+
lockGroup: {
|
|
140
|
+
label: "🔓",
|
|
141
|
+
title: "Lock group"
|
|
142
|
+
},
|
|
143
|
+
lockRuleDisabled: {
|
|
144
|
+
label: "🔒",
|
|
145
|
+
title: "Unlock rule"
|
|
146
|
+
},
|
|
147
|
+
lockGroupDisabled: {
|
|
148
|
+
label: "🔒",
|
|
149
|
+
title: "Unlock group"
|
|
150
|
+
},
|
|
151
|
+
muteRule: {
|
|
152
|
+
label: "🔊",
|
|
153
|
+
title: "Mute rule"
|
|
154
|
+
},
|
|
155
|
+
muteGroup: {
|
|
156
|
+
label: "🔊",
|
|
157
|
+
title: "Mute group"
|
|
158
|
+
},
|
|
159
|
+
unmuteRule: {
|
|
160
|
+
label: "🔇",
|
|
161
|
+
title: "Unmute rule"
|
|
162
|
+
},
|
|
163
|
+
unmuteGroup: {
|
|
164
|
+
label: "🔇",
|
|
165
|
+
title: "Unmute group"
|
|
166
|
+
},
|
|
167
|
+
valueSourceSelector: { title: "Value source" }
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
68
170
|
* Default character used to `.join` and `.split` arrays.
|
|
69
171
|
*
|
|
70
172
|
* @group Defaults
|
|
@@ -313,8 +415,11 @@ const standardClassnames = {
|
|
|
313
415
|
dndDropNotAllowed: "dndDropNotAllowed",
|
|
314
416
|
dragHandle: "queryBuilder-dragHandle",
|
|
315
417
|
disabled: "queryBuilder-disabled",
|
|
418
|
+
muted: "queryBuilder-muted",
|
|
316
419
|
lockRule: "rule-lock",
|
|
317
420
|
lockGroup: "ruleGroup-lock",
|
|
421
|
+
muteRule: "rule-mute",
|
|
422
|
+
muteGroup: "ruleGroup-mute",
|
|
318
423
|
valueSource: "rule-valueSource",
|
|
319
424
|
valueListItem: "rule-value-list-item",
|
|
320
425
|
branches: "queryBuilder-branches",
|
|
@@ -349,6 +454,9 @@ const defaultControlClassnames = {
|
|
|
349
454
|
dragHandle: "",
|
|
350
455
|
lockRule: "",
|
|
351
456
|
lockGroup: "",
|
|
457
|
+
muteRule: "",
|
|
458
|
+
muteGroup: "",
|
|
459
|
+
muted: "",
|
|
352
460
|
valueSource: "",
|
|
353
461
|
actionElement: "",
|
|
354
462
|
valueSelector: "",
|
|
@@ -399,6 +507,8 @@ const TestID = {
|
|
|
399
507
|
dragHandle: "drag-handle",
|
|
400
508
|
lockRule: "lock-rule",
|
|
401
509
|
lockGroup: "lock-group",
|
|
510
|
+
muteRule: "mute-rule",
|
|
511
|
+
muteGroup: "mute-group",
|
|
402
512
|
valueSourceSelector: "value-source-selector",
|
|
403
513
|
matchModeEditor: "match-mode-editor"
|
|
404
514
|
};
|
|
@@ -667,6 +777,21 @@ const defaultValidator = (query) => {
|
|
|
667
777
|
return result;
|
|
668
778
|
};
|
|
669
779
|
|
|
780
|
+
//#endregion
|
|
781
|
+
//#region src/utils/objectUtils.ts
|
|
782
|
+
/**
|
|
783
|
+
* A strongly-typed version of `Object.keys()`.
|
|
784
|
+
*
|
|
785
|
+
* [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-keys.ts)
|
|
786
|
+
*/
|
|
787
|
+
const objectKeys = Object.keys;
|
|
788
|
+
/**
|
|
789
|
+
* A strongly-typed version of `Object.entries()`.
|
|
790
|
+
*
|
|
791
|
+
* [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-entries.ts)
|
|
792
|
+
*/
|
|
793
|
+
const objectEntries = Object.entries;
|
|
794
|
+
|
|
670
795
|
//#endregion
|
|
671
796
|
//#region src/utils/optGroupUtils.ts
|
|
672
797
|
const isOptionWithName = (opt) => isPojo(opt) && "name" in opt && typeof opt.name === "string";
|
|
@@ -843,6 +968,42 @@ const uniqOptList = (originalArray) => {
|
|
|
843
968
|
if (isFlexibleOptionGroupArray(originalArray)) return uniqOptGroups(originalArray);
|
|
844
969
|
return uniqByIdentifier(originalArray.map((o) => toFullOption(o)));
|
|
845
970
|
};
|
|
971
|
+
const prepareOptionList = (props) => {
|
|
972
|
+
// istanbul ignore next
|
|
973
|
+
const { optionList: optionListPropOriginal, baseOption = {}, labelMap = {}, placeholder: { placeholderName = defaultPlaceholderName, placeholderLabel = defaultPlaceholderLabel, placeholderGroupLabel = defaultPlaceholderLabel } = {}, autoSelectOption = true } = props;
|
|
974
|
+
const defaultOption = {
|
|
975
|
+
id: placeholderName,
|
|
976
|
+
name: placeholderName,
|
|
977
|
+
value: placeholderName,
|
|
978
|
+
label: placeholderLabel
|
|
979
|
+
};
|
|
980
|
+
const optionsProp = optionListPropOriginal ?? [defaultOption];
|
|
981
|
+
let optionList = [];
|
|
982
|
+
const opts = Array.isArray(optionsProp) ? toFullOptionList(optionsProp, baseOption, labelMap) : objectKeys(toFullOptionMap(optionsProp, baseOption)).map((opt) => ({
|
|
983
|
+
...optionsProp[opt],
|
|
984
|
+
name: opt,
|
|
985
|
+
value: opt
|
|
986
|
+
})).sort((a, b) => a.label.localeCompare(b.label));
|
|
987
|
+
if (isFlexibleOptionGroupArray(opts)) optionList = autoSelectOption ? uniqOptGroups(opts) : uniqOptGroups([{
|
|
988
|
+
label: placeholderGroupLabel,
|
|
989
|
+
options: [defaultOption]
|
|
990
|
+
}, ...opts]);
|
|
991
|
+
else optionList = autoSelectOption ? uniqByIdentifier(opts) : uniqByIdentifier([defaultOption, ...opts]);
|
|
992
|
+
let optionsMap = {};
|
|
993
|
+
if (!Array.isArray(optionsProp)) {
|
|
994
|
+
const op = toFullOptionMap(optionsProp, baseOption);
|
|
995
|
+
optionsMap = autoSelectOption ? op : {
|
|
996
|
+
...op,
|
|
997
|
+
[placeholderName]: defaultOption
|
|
998
|
+
};
|
|
999
|
+
} else if (isFlexibleOptionGroupArray(optionList)) for (const og of optionList) for (const opt of og.options) optionsMap[opt.value ?? opt.name] = toFullOption(opt, baseOption);
|
|
1000
|
+
else for (const opt of optionList) optionsMap[opt.value ?? opt.name] = toFullOption(opt, baseOption);
|
|
1001
|
+
return {
|
|
1002
|
+
defaultOption,
|
|
1003
|
+
optionList,
|
|
1004
|
+
optionsMap
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
846
1007
|
|
|
847
1008
|
//#endregion
|
|
848
1009
|
//#region src/utils/filterFieldsByComparator.ts
|
|
@@ -944,9 +1105,11 @@ function transformQuery(query, options = {}) {
|
|
|
944
1105
|
const isValidationResult = (vr) => isPojo(vr) && typeof vr.valid === "boolean";
|
|
945
1106
|
/**
|
|
946
1107
|
* Determines if a rule or group is valid based on a validation result (if defined)
|
|
947
|
-
* or a validator function. Returns `true` if neither are defined
|
|
1108
|
+
* or a validator function. Returns `true` if neither are defined and the `muted`
|
|
1109
|
+
* property is not `true`.
|
|
948
1110
|
*/
|
|
949
1111
|
const isRuleOrGroupValid = (rg, validationResult, validator) => {
|
|
1112
|
+
if (rg.muted) return false;
|
|
950
1113
|
if (typeof validationResult === "boolean") return validationResult;
|
|
951
1114
|
if (isValidationResult(validationResult)) return validationResult.valid;
|
|
952
1115
|
if (typeof validator === "function" && !isRuleGroup(rg)) {
|
|
@@ -1220,19 +1383,45 @@ const defaultRuleGroupProcessorCEL = (ruleGroup, options) => {
|
|
|
1220
1383
|
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
1221
1384
|
const processRuleGroup = (rg, outermost) => {
|
|
1222
1385
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermost ? fallbackExpression : "";
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
|
|
1386
|
+
const processedRules = [];
|
|
1387
|
+
let precedingCombinator = "";
|
|
1388
|
+
let firstRule = true;
|
|
1389
|
+
for (const rule of rg.rules) {
|
|
1390
|
+
if (typeof rule === "string") {
|
|
1391
|
+
precedingCombinator = celCombinatorMap[rule];
|
|
1392
|
+
continue;
|
|
1393
|
+
}
|
|
1394
|
+
if (isRuleGroup(rule)) {
|
|
1395
|
+
const processedGroup = processRuleGroup(rule);
|
|
1396
|
+
if (processedGroup) {
|
|
1397
|
+
if (!firstRule && precedingCombinator) {
|
|
1398
|
+
processedRules.push(precedingCombinator);
|
|
1399
|
+
precedingCombinator = "";
|
|
1400
|
+
}
|
|
1401
|
+
firstRule = false;
|
|
1402
|
+
processedRules.push(processedGroup);
|
|
1403
|
+
}
|
|
1404
|
+
continue;
|
|
1405
|
+
}
|
|
1226
1406
|
const [validationResult, fieldValidator] = validateRule(rule);
|
|
1227
|
-
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName)
|
|
1407
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
|
|
1228
1408
|
const fieldData = getOption(fields, rule.field);
|
|
1229
|
-
|
|
1409
|
+
const processedRule = ruleProcessor(rule, {
|
|
1230
1410
|
...options,
|
|
1231
1411
|
parseNumbers: getParseNumberBoolean(fieldData?.inputType),
|
|
1232
1412
|
escapeQuotes: (rule.valueSource ?? "value") === "value",
|
|
1233
1413
|
fieldData
|
|
1234
1414
|
});
|
|
1235
|
-
|
|
1415
|
+
if (processedRule) {
|
|
1416
|
+
if (!firstRule && precedingCombinator) {
|
|
1417
|
+
processedRules.push(precedingCombinator);
|
|
1418
|
+
precedingCombinator = "";
|
|
1419
|
+
}
|
|
1420
|
+
firstRule = false;
|
|
1421
|
+
processedRules.push(processedRule);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
const expression = processedRules.join(isRuleGroupType(rg) ? ` ${celCombinatorMap[rg.combinator]} ` : " ");
|
|
1236
1425
|
const [prefix, suffix] = rg.not || !outermost ? [`${rg.not ? "!" : ""}(`, ")"] : ["", ""];
|
|
1237
1426
|
return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
|
|
1238
1427
|
};
|
|
@@ -1259,11 +1448,10 @@ const defaultRuleProcessorCEL = (rule, opts = {}) => {
|
|
|
1259
1448
|
else if (matchEval) {
|
|
1260
1449
|
const { mode, threshold } = matchEval;
|
|
1261
1450
|
const arrayElementAlias = "elem_alias";
|
|
1262
|
-
const
|
|
1451
|
+
const nestedArrayFilter = defaultRuleGroupProcessorCEL(transformQuery(rule.value, { ruleProcessor: (r) => ({
|
|
1263
1452
|
...r,
|
|
1264
1453
|
field: `${arrayElementAlias}${r.field ? `.${r.field}` : ""}`
|
|
1265
|
-
}) });
|
|
1266
|
-
const nestedArrayFilter = defaultRuleGroupProcessorCEL(celQuery, opts);
|
|
1454
|
+
}) }), opts);
|
|
1267
1455
|
switch (mode) {
|
|
1268
1456
|
case "all": return `${field}.all(${arrayElementAlias}, ${nestedArrayFilter})`;
|
|
1269
1457
|
case "none":
|
|
@@ -1297,8 +1485,7 @@ const defaultRuleProcessorCEL = (rule, opts = {}) => {
|
|
|
1297
1485
|
case "in":
|
|
1298
1486
|
case "notin": {
|
|
1299
1487
|
const [prefix, suffix] = shouldNegate$2(operatorTL) ? ["!(", ")"] : ["", ""];
|
|
1300
|
-
|
|
1301
|
-
return `${prefix}${field} in [${valueAsArray.map((val) => valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `"${escapeDoubleQuotes(val, escapeQuotes)}"`).join(", ")}]${suffix}`;
|
|
1488
|
+
return `${prefix}${field} in [${toArray(value).map((val) => valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `"${escapeDoubleQuotes(val, escapeQuotes)}"`).join(", ")}]${suffix}`;
|
|
1302
1489
|
}
|
|
1303
1490
|
case "between":
|
|
1304
1491
|
case "notbetween": {
|
|
@@ -1518,19 +1705,45 @@ const defaultRuleGroupProcessorSpEL = (ruleGroup, options) => {
|
|
|
1518
1705
|
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
1519
1706
|
const processRuleGroup = (rg, outermost) => {
|
|
1520
1707
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermost ? fallbackExpression : "";
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1523
|
-
|
|
1708
|
+
const processedRules = [];
|
|
1709
|
+
let precedingCombinator = "";
|
|
1710
|
+
let firstRule = true;
|
|
1711
|
+
for (const rule of rg.rules) {
|
|
1712
|
+
if (typeof rule === "string") {
|
|
1713
|
+
precedingCombinator = rule;
|
|
1714
|
+
continue;
|
|
1715
|
+
}
|
|
1716
|
+
if (isRuleGroup(rule)) {
|
|
1717
|
+
const processedGroup = processRuleGroup(rule);
|
|
1718
|
+
if (processedGroup) {
|
|
1719
|
+
if (!firstRule && precedingCombinator) {
|
|
1720
|
+
processedRules.push(precedingCombinator);
|
|
1721
|
+
precedingCombinator = "";
|
|
1722
|
+
}
|
|
1723
|
+
firstRule = false;
|
|
1724
|
+
processedRules.push(processedGroup);
|
|
1725
|
+
}
|
|
1726
|
+
continue;
|
|
1727
|
+
}
|
|
1524
1728
|
const [validationResult, fieldValidator] = validateRule(rule);
|
|
1525
|
-
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName)
|
|
1729
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
|
|
1526
1730
|
const fieldData = getOption(fields, rule.field);
|
|
1527
|
-
|
|
1731
|
+
const processedRule = ruleProcessor(rule, {
|
|
1528
1732
|
...options,
|
|
1529
1733
|
parseNumbers: getParseNumberBoolean(fieldData?.inputType),
|
|
1530
1734
|
escapeQuotes: (rule.valueSource ?? "value") === "value",
|
|
1531
1735
|
fieldData
|
|
1532
1736
|
});
|
|
1533
|
-
|
|
1737
|
+
if (processedRule) {
|
|
1738
|
+
if (!firstRule && precedingCombinator) {
|
|
1739
|
+
processedRules.push(precedingCombinator);
|
|
1740
|
+
precedingCombinator = "";
|
|
1741
|
+
}
|
|
1742
|
+
firstRule = false;
|
|
1743
|
+
processedRules.push(processedRule);
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
const expression = processedRules.join(isRuleGroupType(rg) ? ` ${rg.combinator} ` : " ");
|
|
1534
1747
|
const [prefix, suffix] = rg.not || !outermost ? [`${rg.not ? "!" : ""}(`, ")"] : ["", ""];
|
|
1535
1748
|
return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
|
|
1536
1749
|
};
|
|
@@ -1586,15 +1799,9 @@ const defaultRuleProcessorSpEL = (rule, opts = {}) => {
|
|
|
1586
1799
|
case "contains":
|
|
1587
1800
|
case "doesnotcontain": return wrapInNegation(`${field} matches ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
|
|
1588
1801
|
case "beginswith":
|
|
1589
|
-
case "doesnotbeginwith": {
|
|
1590
|
-
const valueTL = valueIsField ? `'^'.concat(${trimIfString(value)})` : `'${typeof value === "string" && !value.startsWith("^") || useBareValue ? "^" : ""}${escapeSingleQuotes(value, escapeQuotes)}'`;
|
|
1591
|
-
return wrapInNegation(`${field} matches ${valueTL}`, shouldNegate$1(operatorTL));
|
|
1592
|
-
}
|
|
1802
|
+
case "doesnotbeginwith": return wrapInNegation(`${field} matches ${valueIsField ? `'^'.concat(${trimIfString(value)})` : `'${typeof value === "string" && !value.startsWith("^") || useBareValue ? "^" : ""}${escapeSingleQuotes(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
|
|
1593
1803
|
case "endswith":
|
|
1594
|
-
case "doesnotendwith": {
|
|
1595
|
-
const valueTL = valueIsField ? `${trimIfString(value)}.concat('$')` : `'${escapeSingleQuotes(value, escapeQuotes)}${typeof value === "string" && !value.endsWith("$") || useBareValue ? "$" : ""}'`;
|
|
1596
|
-
return wrapInNegation(`${field} matches ${valueTL}`, shouldNegate$1(operatorTL));
|
|
1597
|
-
}
|
|
1804
|
+
case "doesnotendwith": return wrapInNegation(`${field} matches ${valueIsField ? `${trimIfString(value)}.concat('$')` : `'${escapeSingleQuotes(value, escapeQuotes)}${typeof value === "string" && !value.endsWith("$") || useBareValue ? "$" : ""}'`}`, shouldNegate$1(operatorTL));
|
|
1598
1805
|
case "null": return `${field} == null`;
|
|
1599
1806
|
case "notnull": return `${field} != null`;
|
|
1600
1807
|
case "in":
|
|
@@ -1707,11 +1914,10 @@ const defaultRuleProcessorDrizzle = (rule, _options) => {
|
|
|
1707
1914
|
if (opts.preset !== "postgresql") return;
|
|
1708
1915
|
const { mode, threshold } = matchEval;
|
|
1709
1916
|
const arrayElementAlias = "elem_alias";
|
|
1710
|
-
const
|
|
1917
|
+
const nestedArrayFilter = defaultRuleGroupProcessorDrizzle(transformQuery(rule.value, { ruleProcessor: (r) => ({
|
|
1711
1918
|
...r,
|
|
1712
1919
|
field: arrayElementAlias
|
|
1713
|
-
}) })
|
|
1714
|
-
const nestedArrayFilter = defaultRuleGroupProcessorDrizzle(sqlQuery, {
|
|
1920
|
+
}) }), {
|
|
1715
1921
|
...opts,
|
|
1716
1922
|
context: {
|
|
1717
1923
|
...opts.context,
|
|
@@ -1797,7 +2003,6 @@ const defaultRuleGroupProcessorDrizzle = (ruleGroup, options, _meta) => (columns
|
|
|
1797
2003
|
const { fields, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, validateRule, validationMap } = options;
|
|
1798
2004
|
if (!columns || !drizzleOperators) return;
|
|
1799
2005
|
const { and, not, or } = drizzleOperators;
|
|
1800
|
-
const query = isRuleGroupType(ruleGroup) ? ruleGroup : convertFromIC(ruleGroup);
|
|
1801
2006
|
const ruleProcessor = defaultRuleProcessorDrizzle;
|
|
1802
2007
|
const processRuleGroup = (rg, _outermost) => {
|
|
1803
2008
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return;
|
|
@@ -1821,7 +2026,7 @@ const defaultRuleGroupProcessorDrizzle = (ruleGroup, options, _meta) => (columns
|
|
|
1821
2026
|
const ruleGroupSQL = rg.combinator === "or" ? or(...processedRules) : and(...processedRules);
|
|
1822
2027
|
return rg.not ? not(ruleGroupSQL) : ruleGroupSQL;
|
|
1823
2028
|
};
|
|
1824
|
-
return processRuleGroup(
|
|
2029
|
+
return processRuleGroup(convertFromIC(ruleGroup), true);
|
|
1825
2030
|
};
|
|
1826
2031
|
|
|
1827
2032
|
//#endregion
|
|
@@ -1833,7 +2038,6 @@ const defaultRuleGroupProcessorDrizzle = (ruleGroup, options, _meta) => (columns
|
|
|
1833
2038
|
*/
|
|
1834
2039
|
const defaultRuleGroupProcessorElasticSearch = (ruleGroup, options) => {
|
|
1835
2040
|
const { fields, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
1836
|
-
const query = convertFromIC(ruleGroup);
|
|
1837
2041
|
const processRuleGroup = (rg) => {
|
|
1838
2042
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return false;
|
|
1839
2043
|
const processedRules = rg.rules.map((rule) => {
|
|
@@ -1850,7 +2054,7 @@ const defaultRuleGroupProcessorElasticSearch = (ruleGroup, options) => {
|
|
|
1850
2054
|
if (processedRules.length === 0) return false;
|
|
1851
2055
|
return { bool: rg.not ? { must_not: /^or$/i.test(rg.combinator) ? { bool: { should: processedRules } } : processedRules } : { [/^or$/i.test(rg.combinator) ? "should" : "must"]: processedRules } };
|
|
1852
2056
|
};
|
|
1853
|
-
const processedRuleGroup = processRuleGroup(
|
|
2057
|
+
const processedRuleGroup = processRuleGroup(convertFromIC(ruleGroup));
|
|
1854
2058
|
return processedRuleGroup === false ? {} : processedRuleGroup;
|
|
1855
2059
|
};
|
|
1856
2060
|
|
|
@@ -1865,19 +2069,45 @@ const defaultRuleGroupProcessorJSONata = (ruleGroup, options) => {
|
|
|
1865
2069
|
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
1866
2070
|
const processRuleGroup = (rg, outermost) => {
|
|
1867
2071
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermost ? fallbackExpression : "";
|
|
1868
|
-
const
|
|
1869
|
-
|
|
1870
|
-
|
|
2072
|
+
const processedRules = [];
|
|
2073
|
+
let precedingCombinator = "";
|
|
2074
|
+
let firstRule = true;
|
|
2075
|
+
for (const rule of rg.rules) {
|
|
2076
|
+
if (typeof rule === "string") {
|
|
2077
|
+
precedingCombinator = rule;
|
|
2078
|
+
continue;
|
|
2079
|
+
}
|
|
2080
|
+
if (isRuleGroup(rule)) {
|
|
2081
|
+
const processedGroup = processRuleGroup(rule);
|
|
2082
|
+
if (processedGroup) {
|
|
2083
|
+
if (!firstRule && precedingCombinator) {
|
|
2084
|
+
processedRules.push(precedingCombinator);
|
|
2085
|
+
precedingCombinator = "";
|
|
2086
|
+
}
|
|
2087
|
+
firstRule = false;
|
|
2088
|
+
processedRules.push(processedGroup);
|
|
2089
|
+
}
|
|
2090
|
+
continue;
|
|
2091
|
+
}
|
|
1871
2092
|
const [validationResult, fieldValidator] = validateRule(rule);
|
|
1872
|
-
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName)
|
|
2093
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
|
|
1873
2094
|
const fieldData = getOption(fields, rule.field);
|
|
1874
|
-
|
|
2095
|
+
const processedRule = ruleProcessor(rule, {
|
|
1875
2096
|
...options,
|
|
1876
2097
|
parseNumbers: getParseNumberBoolean(fieldData?.inputType),
|
|
1877
2098
|
escapeQuotes: (rule.valueSource ?? "value") === "value",
|
|
1878
2099
|
fieldData
|
|
1879
2100
|
});
|
|
1880
|
-
|
|
2101
|
+
if (processedRule) {
|
|
2102
|
+
if (!firstRule && precedingCombinator) {
|
|
2103
|
+
processedRules.push(precedingCombinator);
|
|
2104
|
+
precedingCombinator = "";
|
|
2105
|
+
}
|
|
2106
|
+
firstRule = false;
|
|
2107
|
+
processedRules.push(processedRule);
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
const expression = processedRules.join(isRuleGroupType(rg) ? ` ${rg.combinator} ` : " ");
|
|
1881
2111
|
const [prefix, suffix] = rg.not || !outermost ? [`${rg.not ? "$not" : ""}(`, ")"] : ["", ""];
|
|
1882
2112
|
return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
|
|
1883
2113
|
};
|
|
@@ -1923,7 +2153,6 @@ const defaultRuleGroupProcessorJsonLogic = (ruleGroup, options) => {
|
|
|
1923
2153
|
*/
|
|
1924
2154
|
const defaultRuleGroupProcessorLDAP = (ruleGroup, options) => {
|
|
1925
2155
|
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
1926
|
-
const query = convertFromIC(ruleGroup);
|
|
1927
2156
|
const processRuleGroup = (rg, outermost) => {
|
|
1928
2157
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermost ? fallbackExpression : "";
|
|
1929
2158
|
const rules = rg.rules.map((rule) => {
|
|
@@ -1943,7 +2172,7 @@ const defaultRuleGroupProcessorLDAP = (ruleGroup, options) => {
|
|
|
1943
2172
|
const [prefix, suffix] = rules.length > 1 ? [`${notPrefix}(${rg.combinator === "or" ? "|" : "&"}`, `)${notSuffix}`] : [notPrefix, notSuffix];
|
|
1944
2173
|
return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
|
|
1945
2174
|
};
|
|
1946
|
-
return processRuleGroup(
|
|
2175
|
+
return processRuleGroup(convertFromIC(ruleGroup), true);
|
|
1947
2176
|
};
|
|
1948
2177
|
|
|
1949
2178
|
//#endregion
|
|
@@ -1998,20 +2227,46 @@ const defaultRuleGroupProcessorNL = (ruleGroup, options) => {
|
|
|
1998
2227
|
const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
|
|
1999
2228
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : "";
|
|
2000
2229
|
const rg2 = isRuleGroupTypeIC(rg) && rg.rules.some((r) => typeof r === "string" && lc(r) === "xor") ? convertFromIC(rg) : rg;
|
|
2001
|
-
const processedRules =
|
|
2002
|
-
|
|
2003
|
-
|
|
2230
|
+
const processedRules = [];
|
|
2231
|
+
let precedingCombinator = "";
|
|
2232
|
+
let firstRule = true;
|
|
2233
|
+
for (const rule of rg2.rules) {
|
|
2234
|
+
if (typeof rule === "string") {
|
|
2235
|
+
precedingCombinator = `, ${translations[rule] ?? rule} `;
|
|
2236
|
+
continue;
|
|
2237
|
+
}
|
|
2238
|
+
if (isRuleGroup(rule)) {
|
|
2239
|
+
const processedGroup = processRuleGroup(rule, rg2.rules.length === 1 && !(rg2.not || /^xor$/i.test(rg2.combinator ?? "")));
|
|
2240
|
+
// istanbul ignore else
|
|
2241
|
+
if (processedGroup) {
|
|
2242
|
+
if (!firstRule && precedingCombinator) {
|
|
2243
|
+
processedRules.push(precedingCombinator);
|
|
2244
|
+
precedingCombinator = "";
|
|
2245
|
+
}
|
|
2246
|
+
firstRule = false;
|
|
2247
|
+
processedRules.push(processedGroup);
|
|
2248
|
+
}
|
|
2249
|
+
continue;
|
|
2250
|
+
}
|
|
2004
2251
|
const [validationResult, fieldValidator] = validateRule(rule);
|
|
2005
|
-
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName)
|
|
2252
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
|
|
2006
2253
|
const escapeQuotes = (rule.valueSource ?? "value") === "value";
|
|
2007
2254
|
const fieldData = getOption(fields, rule.field);
|
|
2008
|
-
|
|
2255
|
+
const processedRule = ruleProcessor(rule, {
|
|
2009
2256
|
...options,
|
|
2010
2257
|
parseNumbers: getParseNumberBoolean(fieldData?.inputType),
|
|
2011
2258
|
escapeQuotes,
|
|
2012
2259
|
fieldData
|
|
2013
2260
|
});
|
|
2014
|
-
|
|
2261
|
+
if (processedRule) {
|
|
2262
|
+
if (!firstRule && precedingCombinator) {
|
|
2263
|
+
processedRules.push(precedingCombinator);
|
|
2264
|
+
precedingCombinator = "";
|
|
2265
|
+
}
|
|
2266
|
+
firstRule = false;
|
|
2267
|
+
processedRules.push(processedRule);
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2015
2270
|
if (processedRules.length === 0) return fallbackExpression;
|
|
2016
2271
|
const isXOR = lc(rg2.combinator ?? "") === "xor";
|
|
2017
2272
|
const combinator = isXOR ? rg2.combinator.slice(1) : rg2.combinator;
|
|
@@ -2019,7 +2274,7 @@ const defaultRuleGroupProcessorNL = (ruleGroup, options) => {
|
|
|
2019
2274
|
const [prefixTL, suffixTL] = ["groupPrefix", "groupSuffix"].map((key) => rg2.not ? isXOR ? getNLTranslataion(key, translations, ["not", "xor"]) : getNLTranslataion(key, translations, ["not"]) : isXOR ? getNLTranslataion(key, translations, ["xor"]) : getNLTranslataion(key, translations));
|
|
2020
2275
|
const prefix = mustWrap ? `${prefixTL} (`.trim() : "";
|
|
2021
2276
|
const suffix = mustWrap ? `) ${suffixTL}`.trim() : "";
|
|
2022
|
-
return `${prefix}${processedRules.
|
|
2277
|
+
return `${prefix}${processedRules.join(isRuleGroupType(rg2) ? `, ${translations[combinator] ?? combinator} ` : "")}${suffix}`;
|
|
2023
2278
|
};
|
|
2024
2279
|
return processRuleGroup(ruleGroup, true);
|
|
2025
2280
|
};
|
|
@@ -2069,11 +2324,37 @@ const defaultRuleGroupProcessorParameterized = (ruleGroup, options) => {
|
|
|
2069
2324
|
};
|
|
2070
2325
|
const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
|
|
2071
2326
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : "";
|
|
2072
|
-
const processedRules =
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2327
|
+
const processedRules = [];
|
|
2328
|
+
let precedingCombinator = "";
|
|
2329
|
+
let firstRule = true;
|
|
2330
|
+
for (const rule of rg.rules) {
|
|
2331
|
+
if (typeof rule === "string") {
|
|
2332
|
+
precedingCombinator = rule;
|
|
2333
|
+
continue;
|
|
2334
|
+
}
|
|
2335
|
+
if (isRuleGroup(rule)) {
|
|
2336
|
+
const processedGroup = processRuleGroup(rule, rg.rules.length === 1);
|
|
2337
|
+
// istanbul ignore else
|
|
2338
|
+
if (processedGroup) {
|
|
2339
|
+
if (!firstRule && precedingCombinator) {
|
|
2340
|
+
processedRules.push(precedingCombinator);
|
|
2341
|
+
precedingCombinator = "";
|
|
2342
|
+
}
|
|
2343
|
+
firstRule = false;
|
|
2344
|
+
processedRules.push(processedGroup);
|
|
2345
|
+
}
|
|
2346
|
+
continue;
|
|
2347
|
+
}
|
|
2348
|
+
const processedRule = processRule(rule);
|
|
2349
|
+
if (processedRule) {
|
|
2350
|
+
if (!firstRule && precedingCombinator) {
|
|
2351
|
+
processedRules.push(precedingCombinator);
|
|
2352
|
+
precedingCombinator = "";
|
|
2353
|
+
}
|
|
2354
|
+
firstRule = false;
|
|
2355
|
+
processedRules.push(processedRule);
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2077
2358
|
if (processedRules.length === 0) return fallbackExpression;
|
|
2078
2359
|
return `${rg.not ? "NOT " : ""}(${processedRules.join(isRuleGroupType(rg) ? ` ${rg.combinator} ` : " ")})`;
|
|
2079
2360
|
};
|
|
@@ -2182,20 +2463,46 @@ const defaultRuleGroupProcessorSQL = (ruleGroup, options) => {
|
|
|
2182
2463
|
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
2183
2464
|
const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
|
|
2184
2465
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : "";
|
|
2185
|
-
const processedRules =
|
|
2186
|
-
|
|
2187
|
-
|
|
2466
|
+
const processedRules = [];
|
|
2467
|
+
let precedingCombinator = "";
|
|
2468
|
+
let firstRule = true;
|
|
2469
|
+
for (const rule of rg.rules) {
|
|
2470
|
+
if (typeof rule === "string") {
|
|
2471
|
+
precedingCombinator = rule;
|
|
2472
|
+
continue;
|
|
2473
|
+
}
|
|
2474
|
+
if (isRuleGroup(rule)) {
|
|
2475
|
+
const processedGroup = processRuleGroup(rule, rg.rules.length === 1);
|
|
2476
|
+
// istanbul ignore else
|
|
2477
|
+
if (processedGroup) {
|
|
2478
|
+
if (!firstRule && precedingCombinator) {
|
|
2479
|
+
processedRules.push(precedingCombinator);
|
|
2480
|
+
precedingCombinator = "";
|
|
2481
|
+
}
|
|
2482
|
+
firstRule = false;
|
|
2483
|
+
processedRules.push(processedGroup);
|
|
2484
|
+
}
|
|
2485
|
+
continue;
|
|
2486
|
+
}
|
|
2188
2487
|
const [validationResult, fieldValidator] = validateRule(rule);
|
|
2189
|
-
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName)
|
|
2488
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
|
|
2190
2489
|
const escapeQuotes = (rule.valueSource ?? "value") === "value";
|
|
2191
2490
|
const fieldData = getOption(fields, rule.field);
|
|
2192
|
-
|
|
2491
|
+
const processedRule = ruleProcessor(rule, {
|
|
2193
2492
|
...options,
|
|
2194
2493
|
parseNumbers: getParseNumberBoolean(fieldData?.inputType),
|
|
2195
2494
|
escapeQuotes,
|
|
2196
2495
|
fieldData
|
|
2197
2496
|
});
|
|
2198
|
-
|
|
2497
|
+
if (processedRule) {
|
|
2498
|
+
if (!firstRule && precedingCombinator) {
|
|
2499
|
+
processedRules.push(precedingCombinator);
|
|
2500
|
+
precedingCombinator = "";
|
|
2501
|
+
}
|
|
2502
|
+
firstRule = false;
|
|
2503
|
+
processedRules.push(processedRule);
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2199
2506
|
if (processedRules.length === 0) return fallbackExpression;
|
|
2200
2507
|
return `${rg.not ? "NOT " : ""}(${processedRules.join(isRuleGroupType(rg) ? ` ${rg.combinator} ` : " ")})`;
|
|
2201
2508
|
};
|
|
@@ -2473,10 +2780,7 @@ const defaultRuleProcessorJsonLogic = (rule, options = {}) => {
|
|
|
2473
2780
|
case "null":
|
|
2474
2781
|
case "notnull": return { [`${operatorLC === "notnull" ? "!" : "="}=`]: [fieldObject, null] };
|
|
2475
2782
|
case "in":
|
|
2476
|
-
case "notin": {
|
|
2477
|
-
const valueAsArray = toArray(value).map((v) => fieldOrNumberRenderer(v));
|
|
2478
|
-
return negateIfNotOp(operatorLC, { in: [fieldObject, valueAsArray] });
|
|
2479
|
-
}
|
|
2783
|
+
case "notin": return negateIfNotOp(operatorLC, { in: [fieldObject, toArray(value).map((v) => fieldOrNumberRenderer(v))] });
|
|
2480
2784
|
case "between":
|
|
2481
2785
|
case "notbetween": {
|
|
2482
2786
|
const valueAsArray = toArray(value);
|
|
@@ -2507,20 +2811,11 @@ const defaultRuleProcessorJsonLogic = (rule, options = {}) => {
|
|
|
2507
2811
|
return false;
|
|
2508
2812
|
}
|
|
2509
2813
|
case "contains":
|
|
2510
|
-
case "doesnotcontain": {
|
|
2511
|
-
const jsonRule = { in: [fieldOrNumberRenderer(value), fieldObject] };
|
|
2512
|
-
return negateIfNotOp(operatorLC, jsonRule);
|
|
2513
|
-
}
|
|
2814
|
+
case "doesnotcontain": return negateIfNotOp(operatorLC, { in: [fieldOrNumberRenderer(value), fieldObject] });
|
|
2514
2815
|
case "beginswith":
|
|
2515
|
-
case "doesnotbeginwith": {
|
|
2516
|
-
const jsonRule = { startsWith: [fieldObject, fieldOrNumberRenderer(value)] };
|
|
2517
|
-
return negateIfNotOp(operatorLC, jsonRule);
|
|
2518
|
-
}
|
|
2816
|
+
case "doesnotbeginwith": return negateIfNotOp(operatorLC, { startsWith: [fieldObject, fieldOrNumberRenderer(value)] });
|
|
2519
2817
|
case "endswith":
|
|
2520
|
-
case "doesnotendwith": {
|
|
2521
|
-
const jsonRule = { endsWith: [fieldObject, fieldOrNumberRenderer(value)] };
|
|
2522
|
-
return negateIfNotOp(operatorLC, jsonRule);
|
|
2523
|
-
}
|
|
2818
|
+
case "doesnotendwith": return negateIfNotOp(operatorLC, { endsWith: [fieldObject, fieldOrNumberRenderer(value)] });
|
|
2524
2819
|
}
|
|
2525
2820
|
return false;
|
|
2526
2821
|
};
|
|
@@ -2555,10 +2850,7 @@ const defaultRuleProcessorLDAP = (rule, options = {}) => {
|
|
|
2555
2850
|
case "null":
|
|
2556
2851
|
case "notnull": return negateIf(`(${field}=*)`, operatorLC === "notnull");
|
|
2557
2852
|
case "in":
|
|
2558
|
-
case "notin": {
|
|
2559
|
-
const valueAsArray = toArray(value);
|
|
2560
|
-
return negateIf(`(|${valueAsArray.map((val) => `(${field}=${ldapEscape(val)})`).join("")})`, operatorLC === "notin");
|
|
2561
|
-
}
|
|
2853
|
+
case "notin": return negateIf(`(|${toArray(value).map((val) => `(${field}=${ldapEscape(val)})`).join("")})`, operatorLC === "notin");
|
|
2562
2854
|
case "between":
|
|
2563
2855
|
case "notbetween": {
|
|
2564
2856
|
const valueAsArray = toArray(value);
|
|
@@ -2726,10 +3018,9 @@ const defaultRuleProcessorNL = (rule, opts) => {
|
|
|
2726
3018
|
});
|
|
2727
3019
|
const operatorLC = lc(operator);
|
|
2728
3020
|
if ((operatorLC === "in" || operatorLC === "notin" || operatorLC === "between" || operatorLC === "notbetween") && !value) return "";
|
|
2729
|
-
const processedOperator = operatorProcessor(rule, opts);
|
|
2730
3021
|
const wordOrderMap = {
|
|
2731
3022
|
S: processedField,
|
|
2732
|
-
V:
|
|
3023
|
+
V: operatorProcessor(rule, opts),
|
|
2733
3024
|
O: value
|
|
2734
3025
|
};
|
|
2735
3026
|
return normalizeConstituentWordOrder(wordOrder).map((term) => `${wordOrderMap[term]}`).join(" ").trim();
|
|
@@ -3495,6 +3786,26 @@ const getValueSourcesUtil = (fieldData, operator, getValueSources) => {
|
|
|
3495
3786
|
});
|
|
3496
3787
|
};
|
|
3497
3788
|
|
|
3789
|
+
//#endregion
|
|
3790
|
+
//#region src/utils/mergeAnyTranslations.ts
|
|
3791
|
+
/**
|
|
3792
|
+
* Merges any number of partial translations into a single definition.
|
|
3793
|
+
*/
|
|
3794
|
+
const mergeAnyTranslations = (base, ...otherTranslations) => produce(base, (draft) => {
|
|
3795
|
+
for (const translations of otherTranslations)
|
|
3796
|
+
// istanbul ignore else
|
|
3797
|
+
if (translations) for (const t of objectKeys(translations)) if (draft[t]) Object.assign(draft[t], translations[t]);
|
|
3798
|
+
else Object.assign(draft, { [t]: translations[t] });
|
|
3799
|
+
});
|
|
3800
|
+
const mergeAnyTranslation = (el, keyPropContextMap, defaults) => {
|
|
3801
|
+
const finalKeys = objectEntries(keyPropContextMap).map(([key, [pT, cT]]) => [key, pT ?? cT ?? defaults?.[el]?.[key]]).filter((k) => !!k[1]);
|
|
3802
|
+
if (finalKeys.length > 0 || defaults) {
|
|
3803
|
+
const defaultProperties = defaults?.[el] ?? {};
|
|
3804
|
+
const finalObject = Object.assign({}, defaultProperties, Object.fromEntries(finalKeys));
|
|
3805
|
+
return { [el]: finalObject };
|
|
3806
|
+
}
|
|
3807
|
+
};
|
|
3808
|
+
|
|
3498
3809
|
//#endregion
|
|
3499
3810
|
//#region src/utils/mergeClassnames.ts
|
|
3500
3811
|
const joinClassnamesByName = (name, args) => clsx(args.map((c) => clsx(c?.[name])));
|
|
@@ -3522,6 +3833,9 @@ const mergeClassnames = (...args) => ({
|
|
|
3522
3833
|
dragHandle: joinClassnamesByName("dragHandle", args),
|
|
3523
3834
|
lockRule: joinClassnamesByName("lockRule", args),
|
|
3524
3835
|
lockGroup: joinClassnamesByName("lockGroup", args),
|
|
3836
|
+
muteRule: joinClassnamesByName("muteRule", args),
|
|
3837
|
+
muteGroup: joinClassnamesByName("muteGroup", args),
|
|
3838
|
+
muted: joinClassnamesByName("muted", args),
|
|
3525
3839
|
valueSource: joinClassnamesByName("valueSource", args),
|
|
3526
3840
|
actionElement: joinClassnamesByName("actionElement", args),
|
|
3527
3841
|
valueSelector: joinClassnamesByName("valueSelector", args),
|
|
@@ -3541,21 +3855,6 @@ const mergeClassnames = (...args) => ({
|
|
|
3541
3855
|
hasSubQuery: joinClassnamesByName("hasSubQuery", args)
|
|
3542
3856
|
});
|
|
3543
3857
|
|
|
3544
|
-
//#endregion
|
|
3545
|
-
//#region src/utils/objectUtils.ts
|
|
3546
|
-
/**
|
|
3547
|
-
* A strongly-typed version of `Object.keys()`.
|
|
3548
|
-
*
|
|
3549
|
-
* [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-keys.ts)
|
|
3550
|
-
*/
|
|
3551
|
-
const objectKeys = Object.keys;
|
|
3552
|
-
/**
|
|
3553
|
-
* A strongly-typed version of `Object.entries()`.
|
|
3554
|
-
*
|
|
3555
|
-
* [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-entries.ts)
|
|
3556
|
-
*/
|
|
3557
|
-
const objectEntries = Object.entries;
|
|
3558
|
-
|
|
3559
3858
|
//#endregion
|
|
3560
3859
|
//#region src/utils/prepareQueryObjects.ts
|
|
3561
3860
|
/**
|
|
@@ -3665,12 +3964,11 @@ const update = (query, prop, value, pathOrID, { resetOnFieldChange = true, reset
|
|
|
3665
3964
|
resetValueSource = true;
|
|
3666
3965
|
resetValue = true;
|
|
3667
3966
|
}
|
|
3668
|
-
const
|
|
3967
|
+
const defaultValueSource = getFirstOption(getValueSourcesUtil({
|
|
3669
3968
|
name: ruleOrGroup.field,
|
|
3670
3969
|
value: ruleOrGroup.field,
|
|
3671
3970
|
label: ""
|
|
3672
|
-
}, ruleOrGroup.operator, getValueSources);
|
|
3673
|
-
const defaultValueSource = getFirstOption(valueSources);
|
|
3971
|
+
}, ruleOrGroup.operator, getValueSources));
|
|
3674
3972
|
if (resetValueSource && ruleOrGroup.valueSource && defaultValueSource !== ruleOrGroup.valueSource || prop === "valueSource" && value !== ruleOrGroup.valueSource) {
|
|
3675
3973
|
resetValue = !!ruleOrGroup.valueSource || !ruleOrGroup.valueSource && value !== defaultValueSource;
|
|
3676
3974
|
ruleOrGroup.valueSource = resetValueSource ? defaultValueSource : value;
|
|
@@ -3715,8 +4013,7 @@ const getNextPath = (query, currentPath, newPathOrShiftDirection) => {
|
|
|
3715
4013
|
return [...getParentPath(parentPath), parentPath.at(-1) + 1];
|
|
3716
4014
|
} else {
|
|
3717
4015
|
const evaluationPath = [...getParentPath(currentPath), currentPath.at(-1) + (ic ? 2 : 1)];
|
|
3718
|
-
|
|
3719
|
-
if (isRuleGroup(entityToEvaluate)) return [...evaluationPath, 0];
|
|
4016
|
+
if (isRuleGroup(findPath(evaluationPath, query))) return [...evaluationPath, 0];
|
|
3720
4017
|
else return [...getParentPath(currentPath), currentPath.at(-1) + (ic ? 3 : 2)];
|
|
3721
4018
|
}
|
|
3722
4019
|
return currentPath;
|
|
@@ -3750,8 +4047,7 @@ const move = (query, oldPathOrID, newPath, { clone = false, combinators = defaul
|
|
|
3750
4047
|
const newNewPath = [...nextPath];
|
|
3751
4048
|
const commonAncestorPath = getCommonAncestorPath(oldPath, nextPath);
|
|
3752
4049
|
if (!clone && oldPath.length === commonAncestorPath.length + 1 && nextPath[commonAncestorPath.length] > oldPath[commonAncestorPath.length]) newNewPath[commonAncestorPath.length] -= independentCombinators ? 2 : 1;
|
|
3753
|
-
const
|
|
3754
|
-
const parentToInsertInto = findPath(newNewParentPath, draft);
|
|
4050
|
+
const parentToInsertInto = findPath(getParentPath(newNewPath), draft);
|
|
3755
4051
|
const newIndex = newNewPath.at(-1);
|
|
3756
4052
|
/**
|
|
3757
4053
|
* This function 1) glosses over the need for type assertions to splice directly
|
|
@@ -3760,15 +4056,9 @@ const move = (query, oldPathOrID, newPath, { clone = false, combinators = defaul
|
|
|
3760
4056
|
const insertRuleOrGroup = (...args) => parentToInsertInto.rules.splice(newIndex, 0, ...args);
|
|
3761
4057
|
if (parentToInsertInto.rules.length === 0 || !independentCombinators) insertRuleOrGroup(ruleOrGroup);
|
|
3762
4058
|
else if (newIndex === 0) if (ruleToRemoveIndex === 0 && oldNextCombinator) insertRuleOrGroup(ruleOrGroup, oldNextCombinator);
|
|
3763
|
-
else
|
|
3764
|
-
const newNextCombinator = parentToInsertInto.rules[1] ?? oldPrevCombinator ?? getFirstOption(combinators);
|
|
3765
|
-
insertRuleOrGroup(ruleOrGroup, newNextCombinator);
|
|
3766
|
-
}
|
|
4059
|
+
else insertRuleOrGroup(ruleOrGroup, parentToInsertInto.rules[1] ?? oldPrevCombinator ?? getFirstOption(combinators));
|
|
3767
4060
|
else if (oldPrevCombinator) insertRuleOrGroup(oldPrevCombinator, ruleOrGroup);
|
|
3768
|
-
else
|
|
3769
|
-
const newPrevCombinator = parentToInsertInto.rules[newIndex - 2] ?? oldNextCombinator ?? getFirstOption(combinators);
|
|
3770
|
-
insertRuleOrGroup(newPrevCombinator, ruleOrGroup);
|
|
3771
|
-
}
|
|
4061
|
+
else insertRuleOrGroup(parentToInsertInto.rules[newIndex - 2] ?? oldNextCombinator ?? getFirstOption(combinators), ruleOrGroup);
|
|
3772
4062
|
});
|
|
3773
4063
|
};
|
|
3774
4064
|
/**
|
|
@@ -3791,17 +4081,11 @@ const insert = (query, ruleOrGroup, path, { combinators = defaultCombinators, co
|
|
|
3791
4081
|
if (parentToInsertInto.rules.length === 0 || !independentCombinators) insertRuleOrGroup(newIndex, rorg);
|
|
3792
4082
|
else if (replace && independentCombinators) insertRuleOrGroup(newIndex + newIndex % 2, rorg);
|
|
3793
4083
|
else if (newIndex === 0) if (rorg.path?.at(-1) === 0 && combinatorSucceeding) insertRuleOrGroup(newIndex, rorg, combinatorSucceeding);
|
|
3794
|
-
else
|
|
3795
|
-
const newNextCombinator = parentToInsertInto.rules[1] ?? combinatorPreceding ?? getFirstOption(combinators);
|
|
3796
|
-
insertRuleOrGroup(newIndex, rorg, newNextCombinator);
|
|
3797
|
-
}
|
|
4084
|
+
else insertRuleOrGroup(newIndex, rorg, parentToInsertInto.rules[1] ?? combinatorPreceding ?? getFirstOption(combinators));
|
|
3798
4085
|
else {
|
|
3799
4086
|
const normalizedNewIndex = newIndex % 2 === 0 ? newIndex - 1 : newIndex;
|
|
3800
4087
|
if (combinatorPreceding) insertRuleOrGroup(normalizedNewIndex, combinatorPreceding, rorg);
|
|
3801
|
-
else
|
|
3802
|
-
const newPrevCombinator = parentToInsertInto.rules[normalizedNewIndex - 2] ?? combinatorSucceeding ?? getFirstOption(combinators);
|
|
3803
|
-
insertRuleOrGroup(normalizedNewIndex, newPrevCombinator, rorg);
|
|
3804
|
-
}
|
|
4088
|
+
else insertRuleOrGroup(normalizedNewIndex, parentToInsertInto.rules[normalizedNewIndex - 2] ?? combinatorSucceeding ?? getFirstOption(combinators), rorg);
|
|
3805
4089
|
}
|
|
3806
4090
|
});
|
|
3807
4091
|
/**
|
|
@@ -3835,8 +4119,7 @@ const group = (query, sourcePathOrID, targetPathOrID, { clone = false, combinato
|
|
|
3835
4119
|
const newNewPath = [...nextPath];
|
|
3836
4120
|
const commonAncestorPath = getCommonAncestorPath(sourcePath, nextPath);
|
|
3837
4121
|
if (!clone && sourcePath.length === commonAncestorPath.length + 1 && nextPath[commonAncestorPath.length] > sourcePath[commonAncestorPath.length]) newNewPath[commonAncestorPath.length] -= independentCombinators ? 2 : 1;
|
|
3838
|
-
const
|
|
3839
|
-
const parentOfTargetPath = findPath(newNewParentPath, draft);
|
|
4122
|
+
const parentOfTargetPath = findPath(getParentPath(newNewPath), draft);
|
|
3840
4123
|
const targetPathIndex = newNewPath.at(-1);
|
|
3841
4124
|
parentOfTargetPath.rules.splice(targetPathIndex, 1, prepareRuleOrGroup(independentCombinators ? { rules: [
|
|
3842
4125
|
targetRuleOrGroup,
|
|
@@ -3850,5 +4133,5 @@ const group = (query, sourcePathOrID, targetPathOrID, { clone = false, combinato
|
|
|
3850
4133
|
};
|
|
3851
4134
|
|
|
3852
4135
|
//#endregion
|
|
3853
|
-
export { LogType, TestID, add, bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, clsx, convertFromIC, convertQuery, convertToIC, defaultCELValueProcessor, defaultCombinatorLabelMap, defaultCombinators, defaultCombinatorsExtended, defaultControlClassnames, defaultExportOperatorMap, defaultJoinChar, defaultMatchModes, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorLabelMap, defaultOperatorNegationMap, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultOperators, defaultPlaceholderFieldGroupLabel, defaultPlaceholderFieldLabel, defaultPlaceholderFieldName, defaultPlaceholderLabel, defaultPlaceholderName, defaultPlaceholderOperatorGroupLabel, defaultPlaceholderOperatorLabel, defaultPlaceholderOperatorName, defaultPlaceholderValueGroupLabel, defaultPlaceholderValueLabel, defaultPlaceholderValueName, 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, defaultValidator, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, filterFieldsByComparator, findID, findPath, formatQuery, formatQueryOptionPresets, generateAccessibleDescription, generateID, getCommonAncestorPath, getFirstOption, getMatchModesUtil, getNLTranslataion, getOption, getParentPath, getParseNumberMethod, getPathOfID, getQuoteFieldNamesWithArray, getQuotedFieldName, getValidationClassNames, getValueSourcesUtil, group, groupInvalidReasons, insert, isAncestor, isFlexibleOptionArray, isFlexibleOptionGroupArray, isFullOptionArray, isFullOptionGroupArray, isOptionGroupArray, isPojo, isRuleGroup, isRuleGroupType, isRuleGroupTypeIC, isRuleOrGroupValid, isRuleType, isValidValue, isValidationResult, isValueProcessorLegacy, joinWith, jsonLogicAdditionalOperators, lc, mapSQLOperator, mergeClassnames, mongoDbFallback, mongoOperators, move, normalizeConstituentWordOrder, nullFreeArray, nullOrUndefinedOrEmpty, numericRegex, numerifyValues, objectEntries, objectKeys, parseNumber, pathIsDisabled, pathsAreEqual, prepareRule, prepareRuleGroup, prepareRuleOrGroup, prismaFallback, prismaOperators, processMatchMode, regenerateID, regenerateIDs, remove, rootPath, shouldRenderAsNumber, splitBy, sqlDialectPresets, standardClassnames, toArray, toFlatOptionArray, toFullOption, toFullOptionList, toFullOptionMap, transformQuery, trimIfString, uniqByIdentifier, uniqByName, uniqOptGroups, uniqOptList, update };
|
|
4136
|
+
export { LogType, TestID, add, bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, clsx, convertFromIC, convertQuery, convertToIC, defaultCELValueProcessor, defaultCombinatorLabelMap, defaultCombinators, defaultCombinatorsExtended, defaultControlClassnames, defaultExportOperatorMap, defaultJoinChar, defaultMatchModes, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorLabelMap, defaultOperatorNegationMap, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultOperators, defaultPlaceholderFieldGroupLabel, defaultPlaceholderFieldLabel, defaultPlaceholderFieldName, defaultPlaceholderLabel, defaultPlaceholderName, defaultPlaceholderOperatorGroupLabel, defaultPlaceholderOperatorLabel, defaultPlaceholderOperatorName, defaultPlaceholderValueGroupLabel, defaultPlaceholderValueLabel, defaultPlaceholderValueName, 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, defaultTranslations, defaultValidator, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, filterFieldsByComparator, findID, findPath, formatQuery, formatQueryOptionPresets, generateAccessibleDescription, generateID, getCommonAncestorPath, getFirstOption, getMatchModesUtil, getNLTranslataion, getOption, getParentPath, getParseNumberMethod, getPathOfID, getQuoteFieldNamesWithArray, getQuotedFieldName, getValidationClassNames, getValueSourcesUtil, group, groupInvalidReasons, insert, isAncestor, isFlexibleOptionArray, isFlexibleOptionGroupArray, isFullOptionArray, isFullOptionGroupArray, isOptionGroupArray, isPojo, isRuleGroup, isRuleGroupType, isRuleGroupTypeIC, isRuleOrGroupValid, isRuleType, isValidValue, isValidationResult, isValueProcessorLegacy, joinWith, jsonLogicAdditionalOperators, lc, mapSQLOperator, mergeAnyTranslation, mergeAnyTranslations, mergeClassnames, mongoDbFallback, mongoOperators, move, normalizeConstituentWordOrder, nullFreeArray, nullOrUndefinedOrEmpty, numericRegex, numerifyValues, objectEntries, objectKeys, parseNumber, pathIsDisabled, pathsAreEqual, prepareOptionList, prepareRule, prepareRuleGroup, prepareRuleOrGroup, prismaFallback, prismaOperators, processMatchMode, regenerateID, regenerateIDs, remove, rootPath, shouldRenderAsNumber, splitBy, sqlDialectPresets, standardClassnames, toArray, toFlatOptionArray, toFullOption, toFullOptionList, toFullOptionMap, transformQuery, trimIfString, uniqByIdentifier, uniqByName, uniqOptGroups, uniqOptList, update };
|
|
3854
4137
|
//# sourceMappingURL=react-querybuilder_core.mjs.map
|