New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-querybuilder

Package Overview
Dependencies
Maintainers
2
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-querybuilder - npm Package Compare versions

Comparing version 7.0.0-rc.1 to 7.0.0

dist/basic-Br_qTqqQ.d.ts

5

dist/formatQuery.d.ts

@@ -1,3 +0,4 @@

import { R as RuleProcessor, V as ValueProcessorByRule, a as ValueProcessorOptions, F as FormatQueryOptions, P as ParameterizedSQL, b as ParameterizedNamedSQL, c as RQBJsonLogic, E as ExportFormat, d as ValueProcessorLegacy } from './importExport-BiuquFpC.js';
import { R as RuleType, a as RuleGroupTypeAny } from './basic-9Evemz5d.js';
import { R as RuleProcessor, V as ValueProcessorByRule, a as ValueProcessorOptions, F as FormatQueryOptions, P as ParameterizedSQL, b as ParameterizedNamedSQL, c as RQBJsonLogic, E as ExportFormat, d as ValueProcessorLegacy } from './importExport-B0N1b3jD.js';
import { R as RuleType, a as RuleGroupTypeAny } from './basic-Br_qTqqQ.js';
import 'json-logic-js';
import 'type-fest';

@@ -4,0 +5,0 @@

50

dist/formatQuery.js

@@ -905,6 +905,9 @@ "use strict";

if (format === "sql") {
const processRuleGroup = (rg, outermost) => {
const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? /* istanbul ignore next */
""])) {
return outermost ? fallbackExpression : "";
return outermostOrLonelyInGroup ? fallbackExpression : (
/* istanbul ignore next */
""
);
}

@@ -916,3 +919,3 @@ const processedRules = rg.rules.map((rule) => {

if (isRuleGroup(rule)) {
return processRuleGroup(rule);
return processRuleGroup(rule, rg.rules.length === 1);
}

@@ -930,3 +933,4 @@ const [validationResult, fieldValidator] = validateRule(rule);

quoteFieldNamesWith,
fieldData
fieldData,
format
});

@@ -939,3 +943,4 @@ }

quoteFieldNamesWith,
fieldData
fieldData,
format
});

@@ -965,3 +970,8 @@ });

const fieldData = getOption(fields, rule.field);
const value = valueProcessorInternal(rule, { parseNumbers, quoteFieldNamesWith, fieldData });
const value = valueProcessorInternal(rule, {
parseNumbers,
quoteFieldNamesWith,
fieldData,
format
});
const operator = mapSQLOperator(rule.operator);

@@ -1039,6 +1049,9 @@ if ((rule.valueSource ?? "value") === "value") {

};
const processRuleGroup = (rg, outermost) => {
const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? /* istanbul ignore next */
""])) {
return outermost ? fallbackExpression : "";
return outermostOrLonelyInGroup ? fallbackExpression : (
/* istanbul ignore next */
""
);
}

@@ -1050,3 +1063,3 @@ const processedRules = rg.rules.map((rule) => {

if (isRuleGroup(rule)) {
return processRuleGroup(rule);
return processRuleGroup(rule, rg.rules.length === 1);
}

@@ -1089,3 +1102,4 @@ return processRule(rule);

parseNumbers,
fieldData
fieldData,
format
});

@@ -1120,3 +1134,4 @@ }).filter(Boolean);

escapeQuotes: (rule.valueSource ?? "value") === "value",
fieldData
fieldData,
format
});

@@ -1152,3 +1167,4 @@ }).filter(Boolean).join(

escapeQuotes: (rule.valueSource ?? "value") === "value",
fieldData
fieldData,
format
});

@@ -1163,3 +1179,3 @@ }).filter(Boolean).join(isRuleGroupType(rg) ? ` ${rg.combinator} ` : " ");

const query = isRuleGroupType(ruleGroup) ? ruleGroup : convertFromIC(ruleGroup);
const processRuleGroup = (rg, { outermost } = { outermost: false }) => {
const processRuleGroup = (rg, outermost) => {
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? /* istanbul ignore next */

@@ -1180,3 +1196,4 @@ ""])) {

parseNumbers,
fieldData
fieldData,
format
});

@@ -1192,3 +1209,3 @@ }).filter(Boolean);

};
return processRuleGroup(query, { outermost: true });
return processRuleGroup(query, true);
}

@@ -1213,3 +1230,4 @@ if (format === "elasticsearch") {

parseNumbers,
fieldData
fieldData,
format
});

@@ -1216,0 +1234,0 @@ }).filter(Boolean);

@@ -1,4 +0,5 @@

import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-9Evemz5d.js';
import { e as ParseCELOptions } from './importExport-BiuquFpC.js';
import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-Br_qTqqQ.js';
import { e as ParseCELOptions } from './importExport-B0N1b3jD.js';
import 'type-fest';
import 'json-logic-js';

@@ -5,0 +6,0 @@ /**

@@ -1135,7 +1135,7 @@ "use strict";

combinator: "and",
rules: exp.map((e) => processCELExpression(e)).filter((r) => !!r)
rules: exp.map((e) => processCELExpression(e)).filter(Boolean)
};
}
return processCELExpression(exp);
}).filter((r) => !!r);
}).filter(Boolean);
if (rules.length > 0) {

@@ -1142,0 +1142,0 @@ return { combinator, rules };

@@ -1,4 +0,5 @@

import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-9Evemz5d.js';
import { c as RQBJsonLogic, f as ParseJsonLogicOptions } from './importExport-BiuquFpC.js';
import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-Br_qTqqQ.js';
import { c as RQBJsonLogic, f as ParseJsonLogicOptions } from './importExport-B0N1b3jD.js';
import 'type-fest';
import 'json-logic-js';

@@ -5,0 +6,0 @@ /**

@@ -1,4 +0,5 @@

import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-9Evemz5d.js';
import { g as ParseMongoDbOptions } from './importExport-BiuquFpC.js';
import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-Br_qTqqQ.js';
import { g as ParseMongoDbOptions } from './importExport-B0N1b3jD.js';
import 'type-fest';
import 'json-logic-js';

@@ -5,0 +6,0 @@ /**

@@ -1,4 +0,5 @@

import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-9Evemz5d.js';
import { h as ParseSQLOptions } from './importExport-BiuquFpC.js';
import { D as DefaultRuleGroupType, b as DefaultRuleGroupTypeIC } from './basic-Br_qTqqQ.js';
import { i as ParseSQLOptions } from './importExport-B0N1b3jD.js';
import 'type-fest';
import 'json-logic-js';

@@ -5,0 +6,0 @@ /**

@@ -1,2 +0,2 @@

import { a as RuleGroupTypeAny, d as RuleGroupType, R as RuleType, f as RuleGroupTypeIC } from './basic-9Evemz5d.js';
import { a as RuleGroupTypeAny, d as RuleGroupType, R as RuleType, f as RuleGroupTypeIC } from './basic-Br_qTqqQ.js';
import 'type-fest';

@@ -3,0 +3,0 @@

{
"name": "react-querybuilder",
"version": "7.0.0-rc.1",
"version": "7.0.0",
"description": "The React <QueryBuilder /> component for constructing queries",

@@ -38,2 +38,6 @@ "main": "./dist/cjs/index.js",

},
"./parseSpEL": {
"types": "./dist/parseSpEL.d.ts",
"default": "./dist/parseSpEL.js"
},
"./parseSQL": {

@@ -82,6 +86,7 @@ "types": "./dist/parseSQL.d.ts",

"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@electric-sql/pglite": "^0.0.2",
"@testing-library/react": "^14.2.1",

@@ -91,5 +96,6 @@ "@testing-library/user-event": "^14.5.2",

"@types/jscodeshift": "^0.11.11",
"@types/node": "^20.11.19",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/json-logic-js": "^2.0.6",
"@types/node": "^20.11.24",
"@types/react": "^18.2.63",
"@types/react-dom": "^18.2.20",
"@vitejs/plugin-react-swc": "^3.6.0",

@@ -99,4 +105,5 @@ "babel-plugin-istanbul": "^6.1.1",

"copyfiles": "^2.4.1",
"jscodeshift": "^0.15.1",
"query-string": "^8.2.0",
"jscodeshift": "^0.15.2",
"json-logic-js": "^2.0.2",
"query-string": "^9.0.0",
"react": "^18.2.0",

@@ -106,6 +113,7 @@ "react-dom": "^18.2.0",

"rollup-plugin-visualizer": "^5.12.0",
"sass": "1.71.0",
"type-fest": "^4.10.2",
"sass": "1.71.1",
"spel2js": "^0.2.8",
"type-fest": "^4.11.1",
"typescript": "^5.3.3",
"vite": "^5.1.3"
"vite": "^5.1.5"
},

@@ -134,3 +142,3 @@ "dependencies": {

},
"gitHead": "eb7197269a2993c50c9449fed55ed51c91f3b7ae"
"gitHead": "ba25484716b48e6901c16359215b69c376d303c2"
}

@@ -95,3 +95,3 @@ # react-querybuilder

To [import queries](https://react-querybuilder.js.org/docs/utils/import) use `parseSQL`, `parseCEL`, `parseJsonLogic`, or `parseMongoDB` depending on the source.
To [import queries](https://react-querybuilder.js.org/docs/utils/import) use `parseSQL`, `parseMongoDB`, `parseJsonLogic`, `parseCEL`, or `parseSpEL` depending on the source.

@@ -133,2 +133,3 @@ **Tip:** `parseSQL` will accept a full `SELECT` statement or the `WHERE` clause by itself (everything but the expressions in the `WHERE` clause will be ignored). Trailing semicolon is optional.

import { parseMongoDB } from 'react-querybuilder/parseMongoDB';
import { parseSpEL } from 'react-querybuilder/parseSpEL';
import { parseSQL } from 'react-querybuilder/parseSQL';

@@ -135,0 +136,0 @@ import { transformQuery } from 'react-querybuilder/transformQuery';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc