@react-querybuilder/core 8.9.1 → 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-C9sO4qLO.mjs +50 -0
- 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 +569 -1252
- package/dist/cjs/react-querybuilder_core.cjs.development.js +430 -140
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +569 -1252
- 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-BUgyz1GA.mjs +75 -0
- package/dist/convertQuery-BUgyz1GA.mjs.map +1 -0
- package/dist/export-Ccjfea21.d.mts +453 -0
- package/dist/{export-DyrnTh6K.d.ts → export-GUuxJ7zR.d.ts} +3 -2
- package/dist/formatQuery.d.mts +668 -0
- package/dist/formatQuery.d.ts +3 -2
- package/dist/formatQuery.js +217 -87
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +2496 -0
- package/dist/formatQuery.mjs.map +1 -0
- package/dist/{import-Cksobmln.d.ts → import-D-hm1phN.d.ts} +2 -2
- package/dist/import-Dxevzw_-.d.mts +28 -0
- package/dist/isRuleGroup-CGe_rb2w.mjs +40 -0
- package/dist/isRuleGroup-CGe_rb2w.mjs.map +1 -0
- package/dist/isRuleGroup-DqAs2x4E.js.map +1 -1
- package/dist/{optGroupUtils-CXLgyg2i.js → optGroupUtils-B0hTpodo.js} +114 -1
- package/dist/optGroupUtils-B0hTpodo.js.map +1 -0
- package/dist/optGroupUtils-DrubUpx0.mjs +185 -0
- package/dist/optGroupUtils-DrubUpx0.mjs.map +1 -0
- package/dist/parseCEL.d.mts +315 -0
- package/dist/parseCEL.d.ts +292 -11
- package/dist/parseCEL.js +114 -30
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +2631 -0
- package/dist/parseCEL.mjs.map +1 -0
- package/dist/parseJSONata.d.mts +37 -0
- package/dist/parseJSONata.d.ts +3 -2
- package/dist/parseJSONata.js +49 -77
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +267 -0
- package/dist/parseJSONata.mjs.map +1 -0
- package/dist/parseJsonLogic.d.mts +37 -0
- package/dist/parseJsonLogic.d.ts +4 -3
- package/dist/parseJsonLogic.js +5 -6
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +190 -0
- package/dist/parseJsonLogic.mjs.map +1 -0
- package/dist/parseMongoDB.d.mts +80 -0
- package/dist/parseMongoDB.d.ts +3 -2
- package/dist/parseMongoDB.js +15 -16
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +266 -0
- package/dist/parseMongoDB.mjs.map +1 -0
- package/dist/parseNumber-B_-sR6d5.mjs +24 -0
- package/dist/parseNumber-B_-sR6d5.mjs.map +1 -0
- 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 +38 -0
- package/dist/parseSQL.d.ts +3 -2
- package/dist/parseSQL.js +11 -15
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +6622 -0
- package/dist/parseSQL.mjs.map +1 -0
- package/dist/parseSpEL.d.mts +35 -0
- package/dist/parseSpEL.d.ts +3 -2
- package/dist/parseSpEL.js +7 -9
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +272 -0
- package/dist/parseSpEL.mjs.map +1 -0
- package/dist/{prepareQueryObjects-BqFEs4eV.js → prepareQueryObjects-BOUWfel5.js} +4 -5
- package/dist/prepareQueryObjects-BOUWfel5.js.map +1 -0
- package/dist/prepareQueryObjects-CJNpnGcJ.mjs +153 -0
- 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 +569 -1252
- package/dist/react-querybuilder_core.legacy-esm.d.ts +569 -1252
- package/dist/react-querybuilder_core.legacy-esm.js +430 -136
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +426 -141
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +569 -1252
- 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-DHvtgDgZ.mjs +41 -0
- package/dist/transformQuery-DHvtgDgZ.mjs.map +1 -0
- package/dist/transformQuery.d.mts +118 -0
- package/dist/transformQuery.d.ts +1 -1
- package/dist/transformQuery.js +1 -1
- package/dist/transformQuery.mjs +4 -0
- package/package.json +78 -28
- package/dist/arrayUtils-D5EoIsKP.js +0 -164
- package/dist/arrayUtils-D5EoIsKP.js.map +0 -1
- 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/optGroupUtils-CXLgyg2i.js.map +0 -1
- package/dist/prepareQueryObjects-BqFEs4eV.js.map +0 -1
package/dist/styles/_layout.scss
CHANGED
|
@@ -84,9 +84,13 @@
|
|
|
84
84
|
/* #endregion */
|
|
85
85
|
|
|
86
86
|
/* #region Branches */
|
|
87
|
-
|
|
87
|
+
@mixin branch-layout-styles($direction) {
|
|
88
|
+
$ltr-after: if($direction == rtl, before, after);
|
|
89
|
+
$ltr-before: if($direction == rtl, after, before);
|
|
90
|
+
$margin-side: if($direction == rtl, right, left);
|
|
91
|
+
|
|
88
92
|
.ruleGroup-body {
|
|
89
|
-
margin-
|
|
93
|
+
margin-#{$margin-side}: calc(2 * var(--#{$rqb-var-prefix}branch-indent));
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
.rule,
|
|
@@ -97,26 +101,40 @@
|
|
|
97
101
|
&::after {
|
|
98
102
|
content: '';
|
|
99
103
|
width: var(--#{$rqb-var-prefix}branch-indent);
|
|
100
|
-
|
|
104
|
+
#{$margin-side}: calc(
|
|
101
105
|
-1 * (var(--#{$rqb-var-prefix}branch-indent) + var(--#{$rqb-var-prefix}branch-width))
|
|
102
106
|
);
|
|
103
107
|
border-radius: 0;
|
|
104
108
|
position: absolute;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
&::#{$ltr-before} {
|
|
108
112
|
top: calc(-1 * var(--#{$rqb-var-prefix}spacing));
|
|
109
113
|
height: calc(50% + var(--#{$rqb-var-prefix}spacing));
|
|
110
|
-
|
|
114
|
+
@if $direction == rtl {
|
|
115
|
+
border-width: 0
|
|
116
|
+
var(--#{$rqb-var-prefix}branch-width)
|
|
117
|
+
var(--#{$rqb-var-prefix}branch-width)
|
|
118
|
+
0;
|
|
119
|
+
} @else {
|
|
120
|
+
border-width: 0
|
|
121
|
+
0
|
|
122
|
+
var(--#{$rqb-var-prefix}branch-width)
|
|
123
|
+
var(--#{$rqb-var-prefix}branch-width);
|
|
124
|
+
}
|
|
111
125
|
}
|
|
112
126
|
|
|
113
|
-
|
|
127
|
+
&::#{$ltr-after} {
|
|
114
128
|
top: 50%;
|
|
115
129
|
height: 50%;
|
|
116
|
-
|
|
130
|
+
@if $direction == rtl {
|
|
131
|
+
border-width: 0 var(--#{$rqb-var-prefix}branch-width) 0 0;
|
|
132
|
+
} @else {
|
|
133
|
+
border-width: 0 0 0 var(--#{$rqb-var-prefix}branch-width);
|
|
134
|
+
}
|
|
117
135
|
}
|
|
118
136
|
|
|
119
|
-
&:last-child
|
|
137
|
+
&:last-child::#{$ltr-after} {
|
|
120
138
|
display: none;
|
|
121
139
|
}
|
|
122
140
|
}
|
|
@@ -125,7 +143,7 @@
|
|
|
125
143
|
.ruleGroup .ruleGroup {
|
|
126
144
|
&::before,
|
|
127
145
|
&::after {
|
|
128
|
-
|
|
146
|
+
#{$margin-side}: calc(
|
|
129
147
|
-1 *
|
|
130
148
|
(
|
|
131
149
|
var(--#{$rqb-var-prefix}branch-indent) + var(--#{$rqb-var-prefix}branch-width) +
|
|
@@ -134,12 +152,12 @@
|
|
|
134
152
|
);
|
|
135
153
|
}
|
|
136
154
|
|
|
137
|
-
|
|
155
|
+
&::#{$ltr-before} {
|
|
138
156
|
top: calc(-1 * (var(--#{$rqb-var-prefix}spacing) + var(--#{$rqb-var-prefix}border-width)));
|
|
139
157
|
height: calc(50% + var(--#{$rqb-var-prefix}spacing) + var(--#{$rqb-var-prefix}border-width));
|
|
140
158
|
}
|
|
141
159
|
|
|
142
|
-
|
|
160
|
+
&::#{$ltr-after} {
|
|
143
161
|
height: calc(50% + var(--#{$rqb-var-prefix}border-width));
|
|
144
162
|
}
|
|
145
163
|
}
|
|
@@ -147,24 +165,40 @@
|
|
|
147
165
|
.betweenRules {
|
|
148
166
|
position: relative;
|
|
149
167
|
|
|
150
|
-
|
|
168
|
+
&::#{$ltr-before} {
|
|
151
169
|
content: '';
|
|
152
170
|
width: var(--#{$rqb-var-prefix}branch-indent);
|
|
153
|
-
|
|
171
|
+
#{$margin-side}: calc(
|
|
154
172
|
-1 * (var(--#{$rqb-var-prefix}branch-indent) + var(--#{$rqb-var-prefix}branch-width))
|
|
155
173
|
);
|
|
156
174
|
border-radius: 0;
|
|
157
175
|
position: absolute;
|
|
158
176
|
top: calc(-1 * var(--#{$rqb-var-prefix}spacing));
|
|
159
177
|
height: calc(100% + var(--#{$rqb-var-prefix}spacing));
|
|
160
|
-
|
|
178
|
+
@if $direction == rtl {
|
|
179
|
+
border-width: 0 var(--#{$rqb-var-prefix}branch-width) 0 0;
|
|
180
|
+
} @else {
|
|
181
|
+
border-width: 0 0 0 var(--#{$rqb-var-prefix}branch-width);
|
|
182
|
+
}
|
|
161
183
|
}
|
|
162
184
|
}
|
|
163
185
|
}
|
|
186
|
+
|
|
187
|
+
/* LTR */
|
|
188
|
+
.queryBuilder-branches:dir(ltr) {
|
|
189
|
+
@include branch-layout-styles(ltr);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* RTL */
|
|
193
|
+
.queryBuilder-branches:dir(rtl) {
|
|
194
|
+
@include branch-layout-styles(rtl);
|
|
195
|
+
}
|
|
164
196
|
/* #endregion */
|
|
165
197
|
|
|
166
198
|
/* #region Justified */
|
|
167
|
-
|
|
199
|
+
@mixin justified-auto-margin($direction) {
|
|
200
|
+
$margin-side: if($direction == rtl, right, left);
|
|
201
|
+
|
|
168
202
|
.ruleGroup-combinators,
|
|
169
203
|
.ruleGroup-notToggle,
|
|
170
204
|
.shiftActions,
|
|
@@ -187,15 +221,25 @@
|
|
|
187
221
|
& + .rule-cloneRule,
|
|
188
222
|
& + .rule-lock,
|
|
189
223
|
& + .rule-remove {
|
|
190
|
-
margin-
|
|
224
|
+
margin-#{$margin-side}: auto !important;
|
|
191
225
|
}
|
|
192
226
|
}
|
|
193
227
|
|
|
194
228
|
.ruleGroup-addRule,
|
|
195
229
|
.ruleGroup-addGroup {
|
|
196
230
|
&:first-child {
|
|
197
|
-
margin-
|
|
231
|
+
margin-#{$margin-side}: auto !important;
|
|
198
232
|
}
|
|
199
233
|
}
|
|
200
234
|
}
|
|
235
|
+
|
|
236
|
+
/* LTR */
|
|
237
|
+
.queryBuilder-justified:dir(ltr) {
|
|
238
|
+
@include justified-auto-margin(ltr);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* RTL */
|
|
242
|
+
.queryBuilder-justified:dir(rtl) {
|
|
243
|
+
@include justified-auto-margin(rtl);
|
|
244
|
+
}
|
|
201
245
|
/* #endregion */
|
package/dist/styles/_main.scss
CHANGED
|
@@ -88,7 +88,10 @@
|
|
|
88
88
|
/* #endregion */
|
|
89
89
|
|
|
90
90
|
/* #region Branch styles */
|
|
91
|
-
|
|
91
|
+
@mixin branch-styles($direction) {
|
|
92
|
+
$before-after: if($direction == rtl, after, before);
|
|
93
|
+
$border-side: if($direction == rtl, right, left);
|
|
94
|
+
|
|
92
95
|
.rule,
|
|
93
96
|
.ruleGroup .ruleGroup {
|
|
94
97
|
&::before,
|
|
@@ -97,18 +100,28 @@
|
|
|
97
100
|
border-style: var(--#{$rqb-var-prefix}branch-style);
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
&:last-child
|
|
101
|
-
border-bottom-
|
|
103
|
+
&:last-child::#{$before-after} {
|
|
104
|
+
border-bottom-#{$border-side}-radius: var(--#{$rqb-var-prefix}branch-radius);
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
.betweenRules {
|
|
106
109
|
position: relative;
|
|
107
110
|
|
|
108
|
-
|
|
111
|
+
&::#{$before-after} {
|
|
109
112
|
border-color: var(--#{$rqb-var-prefix}branch-color);
|
|
110
113
|
border-style: var(--#{$rqb-var-prefix}branch-style);
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
}
|
|
117
|
+
|
|
118
|
+
/* LTR */
|
|
119
|
+
.queryBuilder-branches:dir(ltr) {
|
|
120
|
+
@include branch-styles(ltr);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* RTL */
|
|
124
|
+
.queryBuilder-branches:dir(rtl) {
|
|
125
|
+
@include branch-styles(rtl);
|
|
126
|
+
}
|
|
114
127
|
/* #endregion */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformQuery-
|
|
1
|
+
{"version":3,"file":"transformQuery-CWDPogO5.js","names":["isRuleGroupType","isRuleGroup"],"sources":["../src/utils/transformQuery.ts"],"sourcesContent":["/**\n * Recursively steps through a query object ({@link index!RuleGroupType RuleGroupType} or {@link index!RuleGroupTypeIC RuleGroupTypeIC}),\n * passing each {@link index!RuleType RuleType} object to a provided `ruleProcessor` function and returning a\n * new query object if there were any referential changes.\n *\n * @module transformQuery\n */\n\nimport { produce } from 'immer';\nimport type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isRuleGroup, isRuleGroupType } from './isRuleGroup';\n\nconst remapProperties = (\n // oxlint-disable-next-line typescript/no-explicit-any\n obj: Record<string, any>,\n propertyMap: Record<string, string | false>,\n deleteRemappedProperties: boolean\n) =>\n produce(obj, draft => {\n for (const [k, v] of Object.entries(propertyMap)) {\n if (v === false) {\n delete draft[k];\n } else if (!!v && k !== v && k in draft) {\n draft[v] = draft[k];\n if (deleteRemappedProperties) {\n delete draft[k];\n }\n }\n }\n });\n\n/**\n * Options object for {@link index!transformQuery transformQuery}.\n */\nexport interface TransformQueryOptions<RG extends RuleGroupTypeAny = RuleGroupType> {\n /**\n * When a rule is encountered in the hierarchy, it will be replaced\n * with the result of this function.\n *\n * @defaultValue `r => r`\n */\n // oxlint-disable-next-line typescript/no-explicit-any\n ruleProcessor?: (rule: RuleType) => any;\n /**\n * When a group is encountered in the hierarchy (including the root group, the\n * query itself), it will be replaced with the result of this function.\n *\n * @defaultValue `rg => rg`\n */\n // oxlint-disable-next-line typescript/no-explicit-any\n ruleGroupProcessor?: (ruleGroup: RG) => Record<string, any>;\n /**\n * For each rule and group in the query, any properties matching a key\n * in this object will be renamed to the corresponding value. To retain both\n * the new _and_ the original properties, set `deleteRemappedProperties`\n * to `false`.\n *\n * If a key has a value of `false`, the corresponding property will be removed\n * without being copied to a new property name. (Warning: `{ rules: false }`\n * will prevent recursion and only return the processed root group.)\n *\n * @defaultValue `{}`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', not: true, rules: [] },\n * { propertyMap: { combinator: 'AndOr', not: false } }\n * )\n * // Returns: { AndOr: 'and', rules: [] }\n * ```\n */\n propertyMap?: Record<string, string | false>;\n /**\n * Any combinator values (including independent combinators) will be translated\n * from the key in this object to the value.\n *\n * @defaultValue `{}`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', rules: [] },\n * { combinatorMap: { and: '&&', or: '||' } }\n * )\n * // Returns: { combinator: '&&', rules: [] }\n * ```\n */\n combinatorMap?: Record<string, string>;\n /**\n * Any operator values will be translated from the key in this object to the value.\n *\n * @defaultValue `{}`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', rules: [{ field: 'name', operator: '=', value: 'Steve Vai' }] },\n * { operatorMap: { '=': 'is' } }\n * )\n * // Returns:\n * // {\n * // combinator: 'and',\n * // rules: [{ field: 'name', operator: 'is', value: 'Steve Vai' }]\n * // }\n * ```\n */\n operatorMap?: Record<string, string>;\n /**\n * Prevents the `path` property (see {@link index!Path Path}) from being added to each\n * rule and group in the hierarchy.\n *\n * @defaultValue `false`\n */\n omitPath?: boolean;\n /**\n * Original properties remapped according to the `propertyMap` option will be removed.\n *\n * @defaultValue `true`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', rules: [] },\n * { propertyMap: { combinator: 'AndOr' }, deleteRemappedProperties: false }\n * )\n * // Returns: { combinator: 'and', AndOr: 'and', rules: [] }\n * ```\n */\n deleteRemappedProperties?: boolean;\n}\n\n/**\n * Recursively process a query heirarchy using this versatile utility function.\n *\n * [Documentation](https://react-querybuilder.js.org/docs/utils/misc#transformquery)\n */\nexport function transformQuery(\n query: RuleGroupType,\n options?: TransformQueryOptions\n // oxlint-disable-next-line typescript/no-explicit-any\n): any;\n/**\n * Recursively process a query heirarchy with independent combinators using this\n * versatile utility function.\n *\n * [Documentation](https://react-querybuilder.js.org/docs/utils/misc#transformquery)\n */\nexport function transformQuery(\n query: RuleGroupTypeIC,\n options?: TransformQueryOptions<RuleGroupTypeIC>\n // oxlint-disable-next-line typescript/no-explicit-any\n): any;\nexport function transformQuery<RG extends RuleGroupTypeAny>(\n query: RG,\n options: TransformQueryOptions<RG> = {}\n) {\n const {\n ruleProcessor = r => r,\n ruleGroupProcessor = rg => rg,\n propertyMap = {},\n combinatorMap = {},\n operatorMap = {},\n omitPath = false,\n deleteRemappedProperties = true,\n } = options;\n\n // oxlint-disable-next-line typescript/no-explicit-any\n const processGroup = (rg: RuleGroupTypeAny): any => ({\n ...ruleGroupProcessor(\n remapProperties(\n {\n ...rg,\n ...(isRuleGroupType(rg)\n ? { combinator: combinatorMap[rg.combinator] ?? rg.combinator }\n : {}),\n },\n propertyMap,\n deleteRemappedProperties\n ) as RG\n ),\n ...(propertyMap['rules'] === false\n ? null\n : {\n // oxlint-disable-next-line typescript/no-explicit-any\n [propertyMap['rules'] ?? 'rules']: rg.rules.map((r: any, idx) => {\n const pathObject = omitPath ? null : { path: [...rg.path!, idx] };\n if (typeof r === 'string') {\n // independent combinators\n return combinatorMap[r] ?? r;\n } else if (isRuleGroup(r)) {\n // sub-groups\n return processGroup({ ...r, ...pathObject });\n }\n // rules\n return ruleProcessor(\n remapProperties(\n {\n ...r,\n ...pathObject,\n ...('operator' in r ? { operator: operatorMap[r.operator] ?? r.operator } : {}),\n },\n propertyMap,\n deleteRemappedProperties\n ) as RuleType\n );\n }),\n }),\n });\n\n return processGroup({ ...query, ...(omitPath ? null : { path: [] }) });\n}\n"],"mappings":";;;;;AAYA,MAAM,mBAEJ,KACA,aACA,gDAEQ,MAAK,UAAS;AACpB,MAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,YAAY,CAC9C,KAAI,MAAM,MACR,QAAO,MAAM;UACJ,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,OAAO;AACvC,QAAM,KAAK,MAAM;AACjB,MAAI,yBACF,QAAO,MAAM;;EAInB;AA4HJ,SAAgB,eACd,OACA,UAAqC,EAAE,EACvC;CACA,MAAM,EACJ,iBAAgB,MAAK,GACrB,sBAAqB,OAAM,IAC3B,cAAc,EAAE,EAChB,gBAAgB,EAAE,EAClB,cAAc,EAAE,EAChB,WAAW,OACX,2BAA2B,SACzB;CAGJ,MAAM,gBAAgB,QAA+B;EACnD,GAAG,mBACD,gBACE;GACE,GAAG;GACH,GAAIA,oCAAgB,GAAG,GACnB,EAAE,YAAY,cAAc,GAAG,eAAe,GAAG,YAAY,GAC7D,EAAE;GACP,EACD,aACA,yBACD,CACF;EACD,GAAI,YAAY,aAAa,QACzB,OACA,GAEG,YAAY,YAAY,UAAU,GAAG,MAAM,KAAK,GAAQ,QAAQ;GAC/D,MAAM,aAAa,WAAW,OAAO,EAAE,MAAM,CAAC,GAAG,GAAG,MAAO,IAAI,EAAE;AACjE,OAAI,OAAO,MAAM,SAEf,QAAO,cAAc,MAAM;YAClBC,gCAAY,EAAE,CAEvB,QAAO,aAAa;IAAE,GAAG;IAAG,GAAG;IAAY,CAAC;AAG9C,UAAO,cACL,gBACE;IACE,GAAG;IACH,GAAG;IACH,GAAI,cAAc,IAAI,EAAE,UAAU,YAAY,EAAE,aAAa,EAAE,UAAU,GAAG,EAAE;IAC/E,EACD,aACA,yBACD,CACF;IACD,EACH;EACN;AAED,QAAO,aAAa;EAAE,GAAG;EAAO,GAAI,WAAW,OAAO,EAAE,MAAM,EAAE,EAAE;EAAG,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { isRuleGroup, isRuleGroupType } from "./isRuleGroup-CGe_rb2w.mjs";
|
|
2
|
+
import { produce } from "immer";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/transformQuery.ts
|
|
5
|
+
const remapProperties = (obj, propertyMap, deleteRemappedProperties) => produce(obj, (draft) => {
|
|
6
|
+
for (const [k, v] of Object.entries(propertyMap)) if (v === false) delete draft[k];
|
|
7
|
+
else if (!!v && k !== v && k in draft) {
|
|
8
|
+
draft[v] = draft[k];
|
|
9
|
+
if (deleteRemappedProperties) delete draft[k];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
function transformQuery(query, options = {}) {
|
|
13
|
+
const { ruleProcessor = (r) => r, ruleGroupProcessor = (rg) => rg, propertyMap = {}, combinatorMap = {}, operatorMap = {}, omitPath = false, deleteRemappedProperties = true } = options;
|
|
14
|
+
const processGroup = (rg) => ({
|
|
15
|
+
...ruleGroupProcessor(remapProperties({
|
|
16
|
+
...rg,
|
|
17
|
+
...isRuleGroupType(rg) ? { combinator: combinatorMap[rg.combinator] ?? rg.combinator } : {}
|
|
18
|
+
}, propertyMap, deleteRemappedProperties)),
|
|
19
|
+
...propertyMap["rules"] === false ? null : { [propertyMap["rules"] ?? "rules"]: rg.rules.map((r, idx) => {
|
|
20
|
+
const pathObject = omitPath ? null : { path: [...rg.path, idx] };
|
|
21
|
+
if (typeof r === "string") return combinatorMap[r] ?? r;
|
|
22
|
+
else if (isRuleGroup(r)) return processGroup({
|
|
23
|
+
...r,
|
|
24
|
+
...pathObject
|
|
25
|
+
});
|
|
26
|
+
return ruleProcessor(remapProperties({
|
|
27
|
+
...r,
|
|
28
|
+
...pathObject,
|
|
29
|
+
..."operator" in r ? { operator: operatorMap[r.operator] ?? r.operator } : {}
|
|
30
|
+
}, propertyMap, deleteRemappedProperties));
|
|
31
|
+
}) }
|
|
32
|
+
});
|
|
33
|
+
return processGroup({
|
|
34
|
+
...query,
|
|
35
|
+
...omitPath ? null : { path: [] }
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { transformQuery };
|
|
41
|
+
//# sourceMappingURL=transformQuery-DHvtgDgZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformQuery-DHvtgDgZ.mjs","names":[],"sources":["../src/utils/transformQuery.ts"],"sourcesContent":["/**\n * Recursively steps through a query object ({@link index!RuleGroupType RuleGroupType} or {@link index!RuleGroupTypeIC RuleGroupTypeIC}),\n * passing each {@link index!RuleType RuleType} object to a provided `ruleProcessor` function and returning a\n * new query object if there were any referential changes.\n *\n * @module transformQuery\n */\n\nimport { produce } from 'immer';\nimport type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isRuleGroup, isRuleGroupType } from './isRuleGroup';\n\nconst remapProperties = (\n // oxlint-disable-next-line typescript/no-explicit-any\n obj: Record<string, any>,\n propertyMap: Record<string, string | false>,\n deleteRemappedProperties: boolean\n) =>\n produce(obj, draft => {\n for (const [k, v] of Object.entries(propertyMap)) {\n if (v === false) {\n delete draft[k];\n } else if (!!v && k !== v && k in draft) {\n draft[v] = draft[k];\n if (deleteRemappedProperties) {\n delete draft[k];\n }\n }\n }\n });\n\n/**\n * Options object for {@link index!transformQuery transformQuery}.\n */\nexport interface TransformQueryOptions<RG extends RuleGroupTypeAny = RuleGroupType> {\n /**\n * When a rule is encountered in the hierarchy, it will be replaced\n * with the result of this function.\n *\n * @defaultValue `r => r`\n */\n // oxlint-disable-next-line typescript/no-explicit-any\n ruleProcessor?: (rule: RuleType) => any;\n /**\n * When a group is encountered in the hierarchy (including the root group, the\n * query itself), it will be replaced with the result of this function.\n *\n * @defaultValue `rg => rg`\n */\n // oxlint-disable-next-line typescript/no-explicit-any\n ruleGroupProcessor?: (ruleGroup: RG) => Record<string, any>;\n /**\n * For each rule and group in the query, any properties matching a key\n * in this object will be renamed to the corresponding value. To retain both\n * the new _and_ the original properties, set `deleteRemappedProperties`\n * to `false`.\n *\n * If a key has a value of `false`, the corresponding property will be removed\n * without being copied to a new property name. (Warning: `{ rules: false }`\n * will prevent recursion and only return the processed root group.)\n *\n * @defaultValue `{}`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', not: true, rules: [] },\n * { propertyMap: { combinator: 'AndOr', not: false } }\n * )\n * // Returns: { AndOr: 'and', rules: [] }\n * ```\n */\n propertyMap?: Record<string, string | false>;\n /**\n * Any combinator values (including independent combinators) will be translated\n * from the key in this object to the value.\n *\n * @defaultValue `{}`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', rules: [] },\n * { combinatorMap: { and: '&&', or: '||' } }\n * )\n * // Returns: { combinator: '&&', rules: [] }\n * ```\n */\n combinatorMap?: Record<string, string>;\n /**\n * Any operator values will be translated from the key in this object to the value.\n *\n * @defaultValue `{}`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', rules: [{ field: 'name', operator: '=', value: 'Steve Vai' }] },\n * { operatorMap: { '=': 'is' } }\n * )\n * // Returns:\n * // {\n * // combinator: 'and',\n * // rules: [{ field: 'name', operator: 'is', value: 'Steve Vai' }]\n * // }\n * ```\n */\n operatorMap?: Record<string, string>;\n /**\n * Prevents the `path` property (see {@link index!Path Path}) from being added to each\n * rule and group in the hierarchy.\n *\n * @defaultValue `false`\n */\n omitPath?: boolean;\n /**\n * Original properties remapped according to the `propertyMap` option will be removed.\n *\n * @defaultValue `true`\n *\n * @example\n * ```\n * transformQuery(\n * { combinator: 'and', rules: [] },\n * { propertyMap: { combinator: 'AndOr' }, deleteRemappedProperties: false }\n * )\n * // Returns: { combinator: 'and', AndOr: 'and', rules: [] }\n * ```\n */\n deleteRemappedProperties?: boolean;\n}\n\n/**\n * Recursively process a query heirarchy using this versatile utility function.\n *\n * [Documentation](https://react-querybuilder.js.org/docs/utils/misc#transformquery)\n */\nexport function transformQuery(\n query: RuleGroupType,\n options?: TransformQueryOptions\n // oxlint-disable-next-line typescript/no-explicit-any\n): any;\n/**\n * Recursively process a query heirarchy with independent combinators using this\n * versatile utility function.\n *\n * [Documentation](https://react-querybuilder.js.org/docs/utils/misc#transformquery)\n */\nexport function transformQuery(\n query: RuleGroupTypeIC,\n options?: TransformQueryOptions<RuleGroupTypeIC>\n // oxlint-disable-next-line typescript/no-explicit-any\n): any;\nexport function transformQuery<RG extends RuleGroupTypeAny>(\n query: RG,\n options: TransformQueryOptions<RG> = {}\n) {\n const {\n ruleProcessor = r => r,\n ruleGroupProcessor = rg => rg,\n propertyMap = {},\n combinatorMap = {},\n operatorMap = {},\n omitPath = false,\n deleteRemappedProperties = true,\n } = options;\n\n // oxlint-disable-next-line typescript/no-explicit-any\n const processGroup = (rg: RuleGroupTypeAny): any => ({\n ...ruleGroupProcessor(\n remapProperties(\n {\n ...rg,\n ...(isRuleGroupType(rg)\n ? { combinator: combinatorMap[rg.combinator] ?? rg.combinator }\n : {}),\n },\n propertyMap,\n deleteRemappedProperties\n ) as RG\n ),\n ...(propertyMap['rules'] === false\n ? null\n : {\n // oxlint-disable-next-line typescript/no-explicit-any\n [propertyMap['rules'] ?? 'rules']: rg.rules.map((r: any, idx) => {\n const pathObject = omitPath ? null : { path: [...rg.path!, idx] };\n if (typeof r === 'string') {\n // independent combinators\n return combinatorMap[r] ?? r;\n } else if (isRuleGroup(r)) {\n // sub-groups\n return processGroup({ ...r, ...pathObject });\n }\n // rules\n return ruleProcessor(\n remapProperties(\n {\n ...r,\n ...pathObject,\n ...('operator' in r ? { operator: operatorMap[r.operator] ?? r.operator } : {}),\n },\n propertyMap,\n deleteRemappedProperties\n ) as RuleType\n );\n }),\n }),\n });\n\n return processGroup({ ...query, ...(omitPath ? null : { path: [] }) });\n}\n"],"mappings":";;;;AAYA,MAAM,mBAEJ,KACA,aACA,6BAEA,QAAQ,MAAK,UAAS;AACpB,MAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,YAAY,CAC9C,KAAI,MAAM,MACR,QAAO,MAAM;UACJ,CAAC,CAAC,KAAK,MAAM,KAAK,KAAK,OAAO;AACvC,QAAM,KAAK,MAAM;AACjB,MAAI,yBACF,QAAO,MAAM;;EAInB;AA4HJ,SAAgB,eACd,OACA,UAAqC,EAAE,EACvC;CACA,MAAM,EACJ,iBAAgB,MAAK,GACrB,sBAAqB,OAAM,IAC3B,cAAc,EAAE,EAChB,gBAAgB,EAAE,EAClB,cAAc,EAAE,EAChB,WAAW,OACX,2BAA2B,SACzB;CAGJ,MAAM,gBAAgB,QAA+B;EACnD,GAAG,mBACD,gBACE;GACE,GAAG;GACH,GAAI,gBAAgB,GAAG,GACnB,EAAE,YAAY,cAAc,GAAG,eAAe,GAAG,YAAY,GAC7D,EAAE;GACP,EACD,aACA,yBACD,CACF;EACD,GAAI,YAAY,aAAa,QACzB,OACA,GAEG,YAAY,YAAY,UAAU,GAAG,MAAM,KAAK,GAAQ,QAAQ;GAC/D,MAAM,aAAa,WAAW,OAAO,EAAE,MAAM,CAAC,GAAG,GAAG,MAAO,IAAI,EAAE;AACjE,OAAI,OAAO,MAAM,SAEf,QAAO,cAAc,MAAM;YAClB,YAAY,EAAE,CAEvB,QAAO,aAAa;IAAE,GAAG;IAAG,GAAG;IAAY,CAAC;AAG9C,UAAO,cACL,gBACE;IACE,GAAG;IACH,GAAG;IACH,GAAI,cAAc,IAAI,EAAE,UAAU,YAAY,EAAE,aAAa,EAAE,UAAU,GAAG,EAAE;IAC/E,EACD,aACA,yBACD,CACF;IACD,EACH;EACN;AAED,QAAO,aAAa;EAAE,GAAG;EAAO,GAAI,WAAW,OAAO,EAAE,MAAM,EAAE,EAAE;EAAG,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from "./basic-BmpEwexQ.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/transformQuery.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Options object for {@link index!transformQuery transformQuery}.
|
|
7
|
+
*/
|
|
8
|
+
interface TransformQueryOptions<RG extends RuleGroupTypeAny = RuleGroupType> {
|
|
9
|
+
/**
|
|
10
|
+
* When a rule is encountered in the hierarchy, it will be replaced
|
|
11
|
+
* with the result of this function.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue `r => r`
|
|
14
|
+
*/
|
|
15
|
+
ruleProcessor?: (rule: RuleType) => any;
|
|
16
|
+
/**
|
|
17
|
+
* When a group is encountered in the hierarchy (including the root group, the
|
|
18
|
+
* query itself), it will be replaced with the result of this function.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue `rg => rg`
|
|
21
|
+
*/
|
|
22
|
+
ruleGroupProcessor?: (ruleGroup: RG) => Record<string, any>;
|
|
23
|
+
/**
|
|
24
|
+
* For each rule and group in the query, any properties matching a key
|
|
25
|
+
* in this object will be renamed to the corresponding value. To retain both
|
|
26
|
+
* the new _and_ the original properties, set `deleteRemappedProperties`
|
|
27
|
+
* to `false`.
|
|
28
|
+
*
|
|
29
|
+
* If a key has a value of `false`, the corresponding property will be removed
|
|
30
|
+
* without being copied to a new property name. (Warning: `{ rules: false }`
|
|
31
|
+
* will prevent recursion and only return the processed root group.)
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue `{}`
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```
|
|
37
|
+
* transformQuery(
|
|
38
|
+
* { combinator: 'and', not: true, rules: [] },
|
|
39
|
+
* { propertyMap: { combinator: 'AndOr', not: false } }
|
|
40
|
+
* )
|
|
41
|
+
* // Returns: { AndOr: 'and', rules: [] }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
propertyMap?: Record<string, string | false>;
|
|
45
|
+
/**
|
|
46
|
+
* Any combinator values (including independent combinators) will be translated
|
|
47
|
+
* from the key in this object to the value.
|
|
48
|
+
*
|
|
49
|
+
* @defaultValue `{}`
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```
|
|
53
|
+
* transformQuery(
|
|
54
|
+
* { combinator: 'and', rules: [] },
|
|
55
|
+
* { combinatorMap: { and: '&&', or: '||' } }
|
|
56
|
+
* )
|
|
57
|
+
* // Returns: { combinator: '&&', rules: [] }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
combinatorMap?: Record<string, string>;
|
|
61
|
+
/**
|
|
62
|
+
* Any operator values will be translated from the key in this object to the value.
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue `{}`
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```
|
|
68
|
+
* transformQuery(
|
|
69
|
+
* { combinator: 'and', rules: [{ field: 'name', operator: '=', value: 'Steve Vai' }] },
|
|
70
|
+
* { operatorMap: { '=': 'is' } }
|
|
71
|
+
* )
|
|
72
|
+
* // Returns:
|
|
73
|
+
* // {
|
|
74
|
+
* // combinator: 'and',
|
|
75
|
+
* // rules: [{ field: 'name', operator: 'is', value: 'Steve Vai' }]
|
|
76
|
+
* // }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
operatorMap?: Record<string, string>;
|
|
80
|
+
/**
|
|
81
|
+
* Prevents the `path` property (see {@link index!Path Path}) from being added to each
|
|
82
|
+
* rule and group in the hierarchy.
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue `false`
|
|
85
|
+
*/
|
|
86
|
+
omitPath?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Original properties remapped according to the `propertyMap` option will be removed.
|
|
89
|
+
*
|
|
90
|
+
* @defaultValue `true`
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```
|
|
94
|
+
* transformQuery(
|
|
95
|
+
* { combinator: 'and', rules: [] },
|
|
96
|
+
* { propertyMap: { combinator: 'AndOr' }, deleteRemappedProperties: false }
|
|
97
|
+
* )
|
|
98
|
+
* // Returns: { combinator: 'and', AndOr: 'and', rules: [] }
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
deleteRemappedProperties?: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Recursively process a query heirarchy using this versatile utility function.
|
|
105
|
+
*
|
|
106
|
+
* [Documentation](https://react-querybuilder.js.org/docs/utils/misc#transformquery)
|
|
107
|
+
*/
|
|
108
|
+
declare function transformQuery(query: RuleGroupType, options?: TransformQueryOptions): any;
|
|
109
|
+
/**
|
|
110
|
+
* Recursively process a query heirarchy with independent combinators using this
|
|
111
|
+
* versatile utility function.
|
|
112
|
+
*
|
|
113
|
+
* [Documentation](https://react-querybuilder.js.org/docs/utils/misc#transformquery)
|
|
114
|
+
*/
|
|
115
|
+
declare function transformQuery(query: RuleGroupTypeIC, options?: TransformQueryOptions<RuleGroupTypeIC>): any;
|
|
116
|
+
//#endregion
|
|
117
|
+
export { TransformQueryOptions, transformQuery };
|
|
118
|
+
//# sourceMappingURL=transformQuery.d.mts.map
|
package/dist/transformQuery.d.ts
CHANGED
package/dist/transformQuery.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-querybuilder/core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"description": "React Query Builder component for constructing queries and filters, with utilities for executing them in various database and evaluation contexts",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,36 +21,84 @@
|
|
|
21
21
|
},
|
|
22
22
|
"./dist/*": "./dist/*",
|
|
23
23
|
"./formatQuery": {
|
|
24
|
-
"
|
|
25
|
-
|
|
24
|
+
"import": {
|
|
25
|
+
"types": "./dist/formatQuery.d.mts",
|
|
26
|
+
"import": "./dist/formatQuery.mjs"
|
|
27
|
+
},
|
|
28
|
+
"require": {
|
|
29
|
+
"types": "./dist/formatQuery.d.ts",
|
|
30
|
+
"default": "./dist/formatQuery.js"
|
|
31
|
+
}
|
|
26
32
|
},
|
|
27
33
|
"./parseCEL": {
|
|
28
|
-
"
|
|
29
|
-
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./dist/parseCEL.d.mts",
|
|
36
|
+
"import": "./dist/parseCEL.mjs"
|
|
37
|
+
},
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/parseCEL.d.ts",
|
|
40
|
+
"default": "./dist/parseCEL.js"
|
|
41
|
+
}
|
|
30
42
|
},
|
|
31
43
|
"./parseJSONata": {
|
|
32
|
-
"
|
|
33
|
-
|
|
44
|
+
"import": {
|
|
45
|
+
"types": "./dist/parseJSONata.d.mts",
|
|
46
|
+
"import": "./dist/parseJSONata.mjs"
|
|
47
|
+
},
|
|
48
|
+
"require": {
|
|
49
|
+
"types": "./dist/parseJSONata.d.ts",
|
|
50
|
+
"default": "./dist/parseJSONata.js"
|
|
51
|
+
}
|
|
34
52
|
},
|
|
35
53
|
"./parseJsonLogic": {
|
|
36
|
-
"
|
|
37
|
-
|
|
54
|
+
"import": {
|
|
55
|
+
"types": "./dist/parseJsonLogic.d.mts",
|
|
56
|
+
"import": "./dist/parseJsonLogic.mjs"
|
|
57
|
+
},
|
|
58
|
+
"require": {
|
|
59
|
+
"types": "./dist/parseJsonLogic.d.ts",
|
|
60
|
+
"default": "./dist/parseJsonLogic.js"
|
|
61
|
+
}
|
|
38
62
|
},
|
|
39
63
|
"./parseMongoDB": {
|
|
40
|
-
"
|
|
41
|
-
|
|
64
|
+
"import": {
|
|
65
|
+
"types": "./dist/parseMongoDB.d.mts",
|
|
66
|
+
"import": "./dist/parseMongoDB.mjs"
|
|
67
|
+
},
|
|
68
|
+
"require": {
|
|
69
|
+
"types": "./dist/parseMongoDB.d.ts",
|
|
70
|
+
"default": "./dist/parseMongoDB.js"
|
|
71
|
+
}
|
|
42
72
|
},
|
|
43
73
|
"./parseSpEL": {
|
|
44
|
-
"
|
|
45
|
-
|
|
74
|
+
"import": {
|
|
75
|
+
"types": "./dist/parseSpEL.d.mts",
|
|
76
|
+
"import": "./dist/parseSpEL.mjs"
|
|
77
|
+
},
|
|
78
|
+
"require": {
|
|
79
|
+
"types": "./dist/parseSpEL.d.ts",
|
|
80
|
+
"default": "./dist/parseSpEL.js"
|
|
81
|
+
}
|
|
46
82
|
},
|
|
47
83
|
"./parseSQL": {
|
|
48
|
-
"
|
|
49
|
-
|
|
84
|
+
"import": {
|
|
85
|
+
"types": "./dist/parseSQL.d.mts",
|
|
86
|
+
"import": "./dist/parseSQL.mjs"
|
|
87
|
+
},
|
|
88
|
+
"require": {
|
|
89
|
+
"types": "./dist/parseSQL.d.ts",
|
|
90
|
+
"default": "./dist/parseSQL.js"
|
|
91
|
+
}
|
|
50
92
|
},
|
|
51
93
|
"./transformQuery": {
|
|
52
|
-
"
|
|
53
|
-
|
|
94
|
+
"import": {
|
|
95
|
+
"types": "./dist/transformQuery.d.mts",
|
|
96
|
+
"import": "./dist/transformQuery.mjs"
|
|
97
|
+
},
|
|
98
|
+
"require": {
|
|
99
|
+
"types": "./dist/transformQuery.d.ts",
|
|
100
|
+
"default": "./dist/transformQuery.js"
|
|
101
|
+
}
|
|
54
102
|
}
|
|
55
103
|
},
|
|
56
104
|
"react-native": "dist/react-querybuilder_core.mjs",
|
|
@@ -96,24 +144,26 @@
|
|
|
96
144
|
"@babel/core": "^7.28.4",
|
|
97
145
|
"@babel/preset-env": "^7.28.3",
|
|
98
146
|
"@babel/preset-typescript": "^7.27.1",
|
|
99
|
-
"@electric-sql/pglite": "^0.3.
|
|
147
|
+
"@electric-sql/pglite": "^0.3.10",
|
|
100
148
|
"@types/json-logic-js": "^2.0.8",
|
|
101
|
-
"@types/node": "^24.
|
|
149
|
+
"@types/node": "^24.7.1",
|
|
102
150
|
"babel-plugin-istanbul": "^7.0.1",
|
|
103
|
-
"drizzle-orm": "^0.44.
|
|
151
|
+
"drizzle-orm": "^0.44.6",
|
|
104
152
|
"json-logic-js": "^2.0.5",
|
|
105
153
|
"jsonata": "^2.1.0",
|
|
106
|
-
"mongodb-memory-server-core": "^10.2.
|
|
107
|
-
"mongoose": "^8.
|
|
154
|
+
"mongodb-memory-server-core": "^10.2.3",
|
|
155
|
+
"mongoose": "^8.19.1",
|
|
108
156
|
"pglite-prisma-adapter": "^0.6.1",
|
|
109
|
-
"prisma": "~6.
|
|
157
|
+
"prisma": "~6.17.0",
|
|
110
158
|
"query-string": "^9.3.1",
|
|
111
159
|
"regenerator-runtime": "^0.14.1",
|
|
112
|
-
"rollup-plugin-visualizer": "^6.0.
|
|
113
|
-
"sass": "^1.
|
|
160
|
+
"rollup-plugin-visualizer": "^6.0.4",
|
|
161
|
+
"sass": "^1.93.2",
|
|
114
162
|
"sequelize": "^6.37.7",
|
|
115
|
-
"spel2js": "^0.2.
|
|
116
|
-
"
|
|
163
|
+
"spel2js": "^0.2.9",
|
|
164
|
+
"type-fest": "^4.41.0",
|
|
165
|
+
"typescript": "^5.9.3",
|
|
166
|
+
"vite": "^7.1.9"
|
|
117
167
|
},
|
|
118
168
|
"dependencies": {
|
|
119
169
|
"immer": "^10.1.3",
|
|
@@ -143,5 +193,5 @@
|
|
|
143
193
|
"typecheck": "tsc --noEmit",
|
|
144
194
|
"typecheck:watch": "tsc --noEmit --watch"
|
|
145
195
|
},
|
|
146
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "fc383fac6b7deefae34f004c6fe60b924ddd3b20"
|
|
147
197
|
}
|