@react-querybuilder/core 8.9.2 → 8.11.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-A_OXU9W1.mjs} +3 -75
- package/dist/arrayUtils-A_OXU9W1.mjs.map +1 -0
- package/dist/arrayUtils-QxZOZTf6.js +73 -0
- package/dist/arrayUtils-QxZOZTf6.js.map +1 -0
- package/dist/basic-DEc65Kng.d.mts +363 -0
- package/dist/basic-Dd_M2f3M.d.ts +363 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +806 -1366
- package/dist/cjs/react-querybuilder_core.cjs.development.js +455 -116
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +806 -1366
- 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-CqX3rPvj.mjs} +3 -3
- package/dist/{convertQuery-H7RhQiIc.mjs.map → convertQuery-CqX3rPvj.mjs.map} +1 -1
- package/dist/{export-DyrnTh6K.d.ts → export-Dy4FckB-.d.ts} +7 -6
- package/dist/{export-r-V7bU31.d.mts → export-t1V2N8pz.d.mts} +7 -6
- 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-Cz8canKo.d.mts} +3 -3
- package/dist/{import-BwbbP4oU.d.mts → import-DtS9Ocx5.d.ts} +3 -3
- package/dist/{isRuleGroup-CnhYpLOM.mjs → isRuleGroup-CYcfPgbg.mjs} +2 -2
- package/dist/{isRuleGroup-CnhYpLOM.mjs.map → isRuleGroup-CYcfPgbg.mjs.map} +1 -1
- package/dist/lexer-C53tqS2p.js +406 -0
- package/dist/lexer-C53tqS2p.js.map +1 -0
- 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-VeZ3k7-1.mjs} +86 -3
- package/dist/optGroupUtils-VeZ3k7-1.mjs.map +1 -0
- package/dist/parseCEL.d.mts +292 -11
- package/dist/parseCEL.d.ts +292 -11
- package/dist/parseCEL.js +874 -1125
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +828 -1126
- 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-CXdMVNFx.mjs} +2 -2
- package/dist/{parseNumber-BtGKa58z.mjs.map → parseNumber-CXdMVNFx.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 +2691 -3036
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +2691 -3037
- 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-DPCC-iHp.mjs} +6 -7
- package/dist/prepareQueryObjects-DPCC-iHp.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 +806 -1366
- package/dist/react-querybuilder_core.legacy-esm.d.ts +806 -1366
- package/dist/react-querybuilder_core.legacy-esm.js +455 -114
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +448 -117
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +806 -1366
- 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 +22 -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-DCCpjtyq.mjs} +3 -3
- package/dist/{transformQuery-DdMvmrCh.mjs.map → transformQuery-DCCpjtyq.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
package/dist/parseSpEL.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import { fieldIsValidUtil, getFieldsArray, prepareRuleGroup } from "./prepareQueryObjects-
|
|
1
|
+
import "./optGroupUtils-VeZ3k7-1.mjs";
|
|
2
|
+
import { t as joinWith } from "./arrayUtils-A_OXU9W1.mjs";
|
|
3
|
+
import { t as isRuleGroup } from "./isRuleGroup-CYcfPgbg.mjs";
|
|
4
|
+
import { n as fieldIsValidUtil, r as getFieldsArray, t as prepareRuleGroup } from "./prepareQueryObjects-DPCC-iHp.mjs";
|
|
5
5
|
import { SpelExpressionEvaluator } from "spel2js";
|
|
6
6
|
|
|
7
7
|
//#region src/utils/parseSpEL/utils.ts
|
|
@@ -256,8 +256,7 @@ function parseSpEL(spel, options = {}) {
|
|
|
256
256
|
} catch {
|
|
257
257
|
return prepare(emptyQuery);
|
|
258
258
|
}
|
|
259
|
-
const
|
|
260
|
-
const result = parseProcessedSpEL(processedSpEL);
|
|
259
|
+
const result = parseProcessedSpEL(processCompiledExpression(compiledSpEL));
|
|
261
260
|
if (result) {
|
|
262
261
|
if (isRuleGroup(result)) return prepare(result);
|
|
263
262
|
return prepare({
|
package/dist/parseSpEL.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseSpEL.mjs","names":["returnArray: (\n | DefaultCombinatorName\n | SpELProcessedExpression\n | ('and' | SpELProcessedExpression)[]\n )[]","emptyQuery: DefaultRuleGroupTypeAny","rules","field: string","regex: string","valueSource: ValueSource | undefined","values: [any, any]","field: string | null","value: any","compiledSpEL: SpELExpressionNode"],"sources":["../src/utils/parseSpEL/utils.ts","../src/utils/parseSpEL/parseSpEL.ts"],"sourcesContent":["import type { DefaultCombinatorName, DefaultOperatorName } from '../../types';\nimport type {\n SpELBaseNode,\n SpELBetweenFields,\n SpELBetweenValues,\n SpELBooleanLiteral,\n SpELCompoundNode,\n SpELExpressionNode,\n SpELIdentifier,\n SpELListNode,\n SpELNodeType,\n SpELNullLiteral,\n SpELNumericLiteral,\n SpELOpAnd,\n SpELOpMatches,\n SpELOpOr,\n SpELPrimitive,\n SpELProcessedExpression,\n SpELPropertyNode,\n SpELRelOpType,\n SpELRelation as SpELRelationOp,\n SpELStringLiteral,\n} from './types';\n\nexport const isSpELPropertyNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELPropertyNode => {\n return expr.getType() === 'property' || expr.getType() === 'variable';\n};\nexport const isSpELCompoundNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELCompoundNode => {\n return expr.getType() === 'compound' && expr.getChildren().every(c => isSpELPropertyNode(c));\n};\nexport const isSpELListNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELListNode => {\n return expr.getType() === 'list';\n};\n\nexport const isSpELOpAnd = (expr: SpELProcessedExpression): expr is SpELOpAnd =>\n expr.type === 'op-and';\nexport const isSpELOpOr = (expr: SpELProcessedExpression): expr is SpELOpOr =>\n expr.type === 'op-or';\nexport const isSpELOpMatches = (expr: SpELProcessedExpression): expr is SpELOpMatches =>\n expr.type === 'matches' &&\n ((isSpELIdentifier(expr.children[0]) && isSpELStringLiteral(expr.children[1])) ||\n (isSpELIdentifier(expr.children[1]) && isSpELStringLiteral(expr.children[0])) ||\n (isSpELIdentifier(expr.children[0]) && isSpELIdentifier(expr.children[1])));\nexport const isSpELIdentifier = (expr: SpELProcessedExpression): expr is SpELIdentifier =>\n expr.type === 'property' || expr.type === 'variable' || expr.type === 'compound';\nexport const isSpELStringLiteral = (expr: SpELProcessedExpression): expr is SpELStringLiteral =>\n expr.type === 'string';\nexport const isSpELNumericLiteral = (expr: SpELProcessedExpression): expr is SpELNumericLiteral =>\n expr.type === 'number';\nexport const isSpELBooleanLiteral = (expr: SpELProcessedExpression): expr is SpELBooleanLiteral =>\n expr.type === 'boolean';\nexport const isSpELNullLiteral = (expr: SpELProcessedExpression): expr is SpELNullLiteral =>\n expr.type === 'null';\nexport const isSpELRelationOp = (expr: SpELProcessedExpression): expr is SpELRelationOp =>\n expr.type === 'op-eq' ||\n expr.type === 'op-ne' ||\n expr.type === 'op-gt' ||\n expr.type === 'op-ge' ||\n expr.type === 'op-lt' ||\n expr.type === 'op-le';\nexport const isSpELPrimitive = (expr: SpELProcessedExpression): expr is SpELPrimitive =>\n isSpELNumericLiteral(expr) ||\n isSpELStringLiteral(expr) ||\n isSpELBooleanLiteral(expr) ||\n isSpELNullLiteral(expr);\nexport const isSpELBetweenValues = (expr: SpELProcessedExpression): expr is SpELBetweenValues =>\n expr.type === 'between' &&\n isSpELIdentifier(expr.children[0]) &&\n expr.children[1].type === 'list' &&\n expr.children[1].children.length >= 2 &&\n expr.children[1].children.every(c => isSpELPrimitive(c));\nexport const isSpELBetweenFields = (expr: SpELProcessedExpression): expr is SpELBetweenFields =>\n expr.type === 'between' &&\n isSpELIdentifier(expr.children[0]) &&\n expr.children[1].type === 'list' &&\n expr.children[1].children.length >= 2 &&\n expr.children[1].children.every(c => isSpELIdentifier(c));\n\nexport const processCompiledExpression = (\n ce: SpELPropertyNode | SpELExpressionNode\n): SpELProcessedExpression => {\n const type = ce.getType();\n const identifier = isSpELCompoundNode(ce)\n ? ce\n .getChildren()\n .map(p => (isSpELPropertyNode(p) ? p.getRaw() : /* istanbul ignore next */ ''))\n .join('.')\n : isSpELPropertyNode(ce)\n ? ce.getRaw()\n : null;\n const children =\n type === 'compound'\n ? []\n : (isSpELListNode(ce) ? ce.getRaw : ce.getChildren)().map(c => processCompiledExpression(c));\n const startPosition = ce.getStartPosition();\n const endPosition = ce.getEndPosition();\n const value = ce.getValue.length === 0 ? ce.getValue() : 'N/A';\n\n return {\n type: type === 'compound' && !identifier ? 'invalid' : type,\n children,\n startPosition,\n endPosition,\n value,\n identifier,\n };\n};\n\nexport const normalizeOperator = (opType: SpELRelOpType, flip?: boolean): DefaultOperatorName => {\n if (flip) {\n if (opType === 'op-lt') return '>';\n if (opType === 'op-le') return '>=';\n if (opType === 'op-gt') return '<';\n if (opType === 'op-ge') return '<=';\n }\n return (\n {\n 'op-eq': '=',\n 'op-ge': '>=',\n 'op-gt': '>',\n 'op-le': '<=',\n 'op-lt': '<',\n 'op-ne': '!=',\n } as const\n )[opType];\n};\n\nexport const generateFlatAndOrList = (\n expr: SpELProcessedExpression\n): (DefaultCombinatorName | SpELProcessedExpression)[] => {\n const combinator = expr.type.slice(3) as DefaultCombinatorName;\n const [left, right] = expr.children;\n if (left.type === 'op-and' || left.type === 'op-or') {\n return [...generateFlatAndOrList(left), combinator, right];\n }\n return [left, combinator, right];\n};\n\nexport const generateMixedAndOrList = (\n expr: SpELOpAnd | SpELOpOr\n): (DefaultCombinatorName | SpELProcessedExpression | ('and' | SpELProcessedExpression)[])[] => {\n const arr = generateFlatAndOrList(expr);\n const returnArray: (\n | DefaultCombinatorName\n | SpELProcessedExpression\n | ('and' | SpELProcessedExpression)[]\n )[] = [];\n let startIndex = 0;\n for (let i = 0; i < arr.length; i += 2) {\n if (arr[i + 1] === 'and') {\n startIndex = i;\n let j = 1;\n while (arr[startIndex + j] === 'and') {\n i += 2;\n j += 2;\n }\n const tempAndArray = arr.slice(startIndex, i + 1) as ('and' | SpELProcessedExpression)[];\n returnArray.push(tempAndArray);\n i -= 2;\n } else if (arr[i + 1] === 'or') {\n if (i === 0 || i === arr.length - 3) {\n if (i === 0 || arr[i - 1] === 'or') {\n returnArray.push(arr[i]);\n }\n returnArray.push(arr[i + 1]);\n if (i === arr.length - 3) {\n returnArray.push(arr[i + 2]);\n }\n } else {\n if (arr[i - 1] === 'and') {\n returnArray.push(arr[i + 1]);\n } else {\n returnArray.push(arr[i], arr[i + 1]);\n }\n }\n }\n }\n if (returnArray.length === 1 && Array.isArray(returnArray[0])) {\n // If length is 1, then the only element is an AND array so just return that\n return returnArray[0];\n }\n return returnArray;\n};\n","import { SpelExpressionEvaluator } from 'spel2js';\nimport type {\n DefaultCombinatorName,\n DefaultOperatorName,\n DefaultRuleGroupArray,\n DefaultRuleGroupICArray,\n DefaultRuleGroupType,\n DefaultRuleGroupTypeAny,\n DefaultRuleGroupTypeIC,\n DefaultRuleType,\n Except,\n ValueSource,\n} from '../../types';\nimport type { ParserCommonOptions } from '../../types/import';\nimport { joinWith } from '../arrayUtils';\nimport { isRuleGroup } from '../isRuleGroup';\nimport { fieldIsValidUtil, getFieldsArray } from '../parserUtils';\nimport { prepareRuleGroup } from '../prepareQueryObjects';\nimport type { SpELExpressionNode, SpELProcessedExpression } from './types';\nimport {\n generateFlatAndOrList,\n generateMixedAndOrList,\n isSpELBetweenFields,\n isSpELBetweenValues,\n isSpELIdentifier,\n isSpELOpAnd,\n isSpELOpMatches,\n isSpELOpOr,\n isSpELPrimitive,\n isSpELRelationOp,\n normalizeOperator,\n processCompiledExpression,\n} from './utils';\n\n/**\n * Options object for {@link parseSpEL!parseSpEL}.\n */\nexport interface ParseSpELOptions extends ParserCommonOptions {}\n\n/**\n * Converts a SpEL string expression into a query suitable for the\n * {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props\n * ({@link index!DefaultRuleGroupType DefaultRuleGroupType}).\n */\nfunction parseSpEL(spel: string): DefaultRuleGroupType;\n/**\n * Converts a SpEL string expression into a query suitable for the\n * {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props\n * ({@link index!DefaultRuleGroupType DefaultRuleGroupType}).\n */\nfunction parseSpEL(\n spel: string,\n options: Except<ParseSpELOptions, 'independentCombinators'> & {\n independentCombinators?: false;\n }\n): DefaultRuleGroupType;\n/**\n * Converts a SpEL string expression into a query suitable for the\n * {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props\n * ({@link index!DefaultRuleGroupTypeIC DefaultRuleGroupTypeIC}).\n */\nfunction parseSpEL(\n spel: string,\n options: Except<ParseSpELOptions, 'independentCombinators'> & {\n independentCombinators: true;\n }\n): DefaultRuleGroupTypeIC;\nfunction parseSpEL(spel: string, options: ParseSpELOptions = {}): DefaultRuleGroupTypeAny {\n const { fields, independentCombinators, listsAsArrays } = options;\n const ic = !!independentCombinators;\n const fieldsFlat = getFieldsArray(fields);\n\n const fieldIsValid = (\n fieldName: string,\n operator: DefaultOperatorName,\n subordinateFieldName?: string\n ) =>\n fieldIsValidUtil({\n fieldName,\n fieldsFlat,\n operator,\n subordinateFieldName,\n getValueSources: options?.getValueSources,\n });\n\n const emptyQuery: DefaultRuleGroupTypeAny = {\n rules: [],\n ...(ic ? {} : { combinator: 'and' }),\n };\n\n const parseProcessedSpEL = (\n expr: SpELProcessedExpression,\n processOpts: {\n groupOnlyIfNecessary?: boolean;\n forwardNegation?: boolean;\n } = {}\n ): DefaultRuleType | DefaultRuleGroupTypeAny | null => {\n const { forwardNegation: _forwardedNegation, groupOnlyIfNecessary: _g } = processOpts;\n if (expr.type === 'op-not') {\n const negatedExpr = parseProcessedSpEL(expr.children[0]);\n // istanbul ignore else\n if (negatedExpr) {\n if (\n !isRuleGroup(negatedExpr) &&\n (negatedExpr.operator === 'contains' ||\n negatedExpr.operator === 'beginsWith' ||\n negatedExpr.operator === 'endsWith')\n ) {\n return {\n ...negatedExpr,\n operator: `doesNot${negatedExpr.operator[0].toUpperCase()}${negatedExpr.operator\n .slice(1)\n .replace('s', '')}` as DefaultOperatorName,\n };\n }\n return ic\n ? ({ rules: [negatedExpr], not: true } as DefaultRuleGroupTypeIC)\n : ({\n combinator: 'and',\n rules: [negatedExpr],\n not: true,\n } as DefaultRuleGroupType);\n }\n } else if (isSpELOpAnd(expr) || isSpELOpOr(expr)) {\n if (ic) {\n const andOrList = generateFlatAndOrList(expr);\n const rules = andOrList.map(v => {\n if (typeof v === 'string') {\n return v;\n }\n return parseProcessedSpEL(v);\n });\n // Bail out completely if any rules in the list were invalid\n // so as not to return an incorrect and/or sequence\n if (!rules.every(Boolean)) {\n return null;\n }\n return {\n rules: rules as DefaultRuleGroupICArray,\n };\n }\n const andOrList = generateMixedAndOrList(expr);\n const combinator = andOrList[1] as DefaultCombinatorName;\n const filteredList = andOrList\n .filter(v => Array.isArray(v) || (!!v && typeof v !== 'string' && 'type' in v))\n .map(v =>\n Array.isArray(v) ? v.filter(vf => !!v && typeof vf !== 'string' && 'type' in vf) : v\n ) as (SpELProcessedExpression | SpELProcessedExpression[])[];\n const rules = filteredList\n .map((exp): DefaultRuleGroupType | DefaultRuleType | null => {\n if (Array.isArray(exp)) {\n return {\n combinator: 'and',\n rules: exp.map(e => parseProcessedSpEL(e)).filter(Boolean) as DefaultRuleGroupArray,\n };\n }\n return parseProcessedSpEL(exp) as DefaultRuleType | DefaultRuleGroupType | null;\n })\n .filter(Boolean) as DefaultRuleGroupArray;\n // istanbul ignore else\n if (rules.length > 0) {\n return { combinator, rules };\n }\n } else if (isSpELOpMatches(expr)) {\n const [left, right] = expr.children;\n let field: string = '';\n let regex: string = '';\n let valueSource: ValueSource | undefined = undefined;\n if (isSpELIdentifier(left)) {\n field = left.identifier;\n if (isSpELIdentifier(right)) {\n regex = right.identifier;\n valueSource = 'field';\n } else {\n // istanbul ignore else\n if (isSpELPrimitive(right)) {\n regex = right.value;\n }\n }\n } else {\n // istanbul ignore else\n if (isSpELIdentifier(right) && isSpELPrimitive(left)) {\n field = right.identifier;\n regex = left.value;\n }\n }\n\n if (/^(?!\\^).*?(?<!\\$)$/.test(regex)) {\n // istanbul ignore else\n if (fieldIsValid(field, 'contains')) {\n return {\n field,\n operator: 'contains',\n value: regex,\n ...(valueSource ? { valueSource } : {}),\n };\n }\n } else {\n if (/^\\^.*?(?<!\\$)$/.test(regex)) {\n // istanbul ignore else\n if (fieldIsValid(field, 'beginsWith')) {\n return {\n field,\n operator: 'beginsWith',\n value: regex.replace(/^\\^/, ''),\n };\n }\n } else {\n // istanbul ignore else\n if (/^(?!\\^).*?\\$$/.test(regex)) {\n // istanbul ignore else\n if (fieldIsValid(field, 'endsWith')) {\n return {\n field,\n operator: 'endsWith',\n value: regex.replace(/\\$$/, ''),\n };\n }\n }\n }\n }\n } else if (isSpELBetweenValues(expr) || isSpELBetweenFields(expr)) {\n // oxlint-disable-next-line typescript/no-explicit-any\n let values: [any, any] = [null, null];\n let valueSource: ValueSource | undefined = undefined;\n const [\n { identifier: field },\n {\n children: [left, right],\n },\n ] = expr.children;\n\n if (isSpELBetweenValues(expr)) {\n values = [left.value, right.value];\n } else {\n values = [left.identifier, right.identifier];\n valueSource = 'field';\n }\n // istanbul ignore else\n if (\n field &&\n values.every(v => fieldIsValid(field, 'between', valueSource === 'field' ? v : undefined))\n ) {\n const valueArray =\n values[0] < values[1] || valueSource === 'field' ? values : [values[1], values[0]];\n const value = listsAsArrays ? valueArray : joinWith(valueArray, ',');\n return valueSource\n ? { field, operator: 'between', value, valueSource }\n : { field, operator: 'between', value };\n }\n } else if (isSpELRelationOp(expr)) {\n let field: string | null = null;\n // oxlint-disable-next-line typescript/no-explicit-any\n let value: any = undefined;\n let valueSource: ValueSource | undefined = undefined;\n let flip = false;\n const [left, right] = expr.children;\n\n if (isSpELIdentifier(left)) {\n field = left.identifier;\n if (isSpELIdentifier(right)) {\n value = right.identifier;\n valueSource = 'field';\n } else if (isSpELPrimitive(right)) {\n value = right.value;\n }\n } else {\n // istanbul ignore else\n if (isSpELIdentifier(right) && isSpELPrimitive(left)) {\n flip = true;\n field = right.identifier;\n value = left.value;\n }\n }\n let operator = normalizeOperator(expr.type, flip);\n if (value === null && (operator === '=' || operator === '!=')) {\n operator = operator === '=' ? 'null' : 'notNull';\n }\n if (\n field &&\n fieldIsValid(field, operator, valueSource === 'field' ? value : undefined) &&\n value !== undefined\n ) {\n return valueSource ? { field, operator, value, valueSource } : { field, operator, value };\n }\n }\n return null;\n };\n\n const prepare = options.generateIDs ? prepareRuleGroup : <T>(g: T) => g;\n\n let compiledSpEL: SpELExpressionNode;\n try {\n compiledSpEL = SpelExpressionEvaluator.compile(spel)._compiledExpression;\n } catch {\n return prepare(emptyQuery);\n }\n\n const processedSpEL = processCompiledExpression(compiledSpEL);\n\n const result = parseProcessedSpEL(processedSpEL);\n if (result) {\n if (isRuleGroup(result)) {\n return prepare(result);\n }\n return prepare({ rules: [result], ...(ic ? {} : { combinator: 'and' }) });\n }\n\n return prepare(emptyQuery);\n}\n\nexport { parseSpEL };\n"],"mappings":";;;;;;;AAwBA,MAAa,sBAAsB,SAA+D;AAChG,QAAO,KAAK,SAAS,KAAK,cAAc,KAAK,SAAS,KAAK;;AAE7D,MAAa,sBAAsB,SAA+D;AAChG,QAAO,KAAK,SAAS,KAAK,cAAc,KAAK,aAAa,CAAC,OAAM,MAAK,mBAAmB,EAAE,CAAC;;AAE9F,MAAa,kBAAkB,SAA2D;AACxF,QAAO,KAAK,SAAS,KAAK;;AAG5B,MAAa,eAAe,SAC1B,KAAK,SAAS;AAChB,MAAa,cAAc,SACzB,KAAK,SAAS;AAChB,MAAa,mBAAmB,SAC9B,KAAK,SAAS,cACZ,iBAAiB,KAAK,SAAS,GAAG,IAAI,oBAAoB,KAAK,SAAS,GAAG,IAC1E,iBAAiB,KAAK,SAAS,GAAG,IAAI,oBAAoB,KAAK,SAAS,GAAG,IAC3E,iBAAiB,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CAC/B,SAAQ,MAAM;cAIZ,iBAAiB,MAAM,IAAI,gBAAgB,KAAK,EAAE;AACpD,WAAO;AACP,YAAQ,MAAM;AACd,YAAQ,KAAK;;GAGjB,IAAI,WAAW,kBAAkB,KAAK,MAAM,KAAK;AACjD,OAAI,UAAU,SAAS,aAAa,OAAO,aAAa,MACtD,YAAW,aAAa,MAAM,SAAS;AAEzC,OACE,SACA,aAAa,OAAO,UAAU,gBAAgB,UAAU,QAAQ,OAAU,IAC1E,UAAU,OAEV,QAAO,cAAc;IAAE;IAAO;IAAU;IAAO;IAAa,GAAG;IAAE;IAAO;IAAU;IAAO;;AAG7F,SAAO;;CAGT,MAAM,UAAU,QAAQ,cAAc,oBAAuB,MAAS;CAEtE,IAAII;AACJ,KAAI;AACF,iBAAe,wBAAwB,QAAQ,KAAK,CAAC;SAC/C;AACN,SAAO,QAAQ,WAAW;;CAG5B,MAAM,gBAAgB,0BAA0B,aAAa;CAE7D,MAAM,SAAS,mBAAmB,cAAc;AAChD,KAAI,QAAQ;AACV,MAAI,YAAY,OAAO,CACrB,QAAO,QAAQ,OAAO;AAExB,SAAO,QAAQ;GAAE,OAAO,CAAC,OAAO;GAAE,GAAI,KAAK,EAAE,GAAG,EAAE,YAAY,OAAO;GAAG,CAAC;;AAG3E,QAAO,QAAQ,WAAW"}
|
|
1
|
+
{"version":3,"file":"parseSpEL.mjs","names":["returnArray: (\n | DefaultCombinatorName\n | SpELProcessedExpression\n | ('and' | SpELProcessedExpression)[]\n )[]","emptyQuery: DefaultRuleGroupTypeAny","rules","field: string","regex: string","valueSource: ValueSource | undefined","values: [any, any]","field: string | null","value: any","compiledSpEL: SpELExpressionNode"],"sources":["../src/utils/parseSpEL/utils.ts","../src/utils/parseSpEL/parseSpEL.ts"],"sourcesContent":["import type { DefaultCombinatorName, DefaultOperatorName } from '../../types';\nimport type {\n SpELBaseNode,\n SpELBetweenFields,\n SpELBetweenValues,\n SpELBooleanLiteral,\n SpELCompoundNode,\n SpELExpressionNode,\n SpELIdentifier,\n SpELListNode,\n SpELNodeType,\n SpELNullLiteral,\n SpELNumericLiteral,\n SpELOpAnd,\n SpELOpMatches,\n SpELOpOr,\n SpELPrimitive,\n SpELProcessedExpression,\n SpELPropertyNode,\n SpELRelOpType,\n SpELRelation as SpELRelationOp,\n SpELStringLiteral,\n} from './types';\n\nexport const isSpELPropertyNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELPropertyNode => {\n return expr.getType() === 'property' || expr.getType() === 'variable';\n};\nexport const isSpELCompoundNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELCompoundNode => {\n return expr.getType() === 'compound' && expr.getChildren().every(c => isSpELPropertyNode(c));\n};\nexport const isSpELListNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELListNode => {\n return expr.getType() === 'list';\n};\n\nexport const isSpELOpAnd = (expr: SpELProcessedExpression): expr is SpELOpAnd =>\n expr.type === 'op-and';\nexport const isSpELOpOr = (expr: SpELProcessedExpression): expr is SpELOpOr =>\n expr.type === 'op-or';\nexport const isSpELOpMatches = (expr: SpELProcessedExpression): expr is SpELOpMatches =>\n expr.type === 'matches' &&\n ((isSpELIdentifier(expr.children[0]) && isSpELStringLiteral(expr.children[1])) ||\n (isSpELIdentifier(expr.children[1]) && isSpELStringLiteral(expr.children[0])) ||\n (isSpELIdentifier(expr.children[0]) && isSpELIdentifier(expr.children[1])));\nexport const isSpELIdentifier = (expr: SpELProcessedExpression): expr is SpELIdentifier =>\n expr.type === 'property' || expr.type === 'variable' || expr.type === 'compound';\nexport const isSpELStringLiteral = (expr: SpELProcessedExpression): expr is SpELStringLiteral =>\n expr.type === 'string';\nexport const isSpELNumericLiteral = (expr: SpELProcessedExpression): expr is SpELNumericLiteral =>\n expr.type === 'number';\nexport const isSpELBooleanLiteral = (expr: SpELProcessedExpression): expr is SpELBooleanLiteral =>\n expr.type === 'boolean';\nexport const isSpELNullLiteral = (expr: SpELProcessedExpression): expr is SpELNullLiteral =>\n expr.type === 'null';\nexport const isSpELRelationOp = (expr: SpELProcessedExpression): expr is SpELRelationOp =>\n expr.type === 'op-eq' ||\n expr.type === 'op-ne' ||\n expr.type === 'op-gt' ||\n expr.type === 'op-ge' ||\n expr.type === 'op-lt' ||\n expr.type === 'op-le';\nexport const isSpELPrimitive = (expr: SpELProcessedExpression): expr is SpELPrimitive =>\n isSpELNumericLiteral(expr) ||\n isSpELStringLiteral(expr) ||\n isSpELBooleanLiteral(expr) ||\n isSpELNullLiteral(expr);\nexport const isSpELBetweenValues = (expr: SpELProcessedExpression): expr is SpELBetweenValues =>\n expr.type === 'between' &&\n isSpELIdentifier(expr.children[0]) &&\n expr.children[1].type === 'list' &&\n expr.children[1].children.length >= 2 &&\n expr.children[1].children.every(c => isSpELPrimitive(c));\nexport const isSpELBetweenFields = (expr: SpELProcessedExpression): expr is SpELBetweenFields =>\n expr.type === 'between' &&\n isSpELIdentifier(expr.children[0]) &&\n expr.children[1].type === 'list' &&\n expr.children[1].children.length >= 2 &&\n expr.children[1].children.every(c => isSpELIdentifier(c));\n\nexport const processCompiledExpression = (\n ce: SpELPropertyNode | SpELExpressionNode\n): SpELProcessedExpression => {\n const type = ce.getType();\n const identifier = isSpELCompoundNode(ce)\n ? ce\n .getChildren()\n .map(p => (isSpELPropertyNode(p) ? p.getRaw() : /* istanbul ignore next */ ''))\n .join('.')\n : isSpELPropertyNode(ce)\n ? ce.getRaw()\n : null;\n const children =\n type === 'compound'\n ? []\n : (isSpELListNode(ce) ? ce.getRaw : ce.getChildren)().map(c => processCompiledExpression(c));\n const startPosition = ce.getStartPosition();\n const endPosition = ce.getEndPosition();\n const value = ce.getValue.length === 0 ? ce.getValue() : 'N/A';\n\n return {\n type: type === 'compound' && !identifier ? 'invalid' : type,\n children,\n startPosition,\n endPosition,\n value,\n identifier,\n };\n};\n\nexport const normalizeOperator = (opType: SpELRelOpType, flip?: boolean): DefaultOperatorName => {\n if (flip) {\n if (opType === 'op-lt') return '>';\n if (opType === 'op-le') return '>=';\n if (opType === 'op-gt') return '<';\n if (opType === 'op-ge') return '<=';\n }\n return (\n {\n 'op-eq': '=',\n 'op-ge': '>=',\n 'op-gt': '>',\n 'op-le': '<=',\n 'op-lt': '<',\n 'op-ne': '!=',\n } as const\n )[opType];\n};\n\nexport const generateFlatAndOrList = (\n expr: SpELProcessedExpression\n): (DefaultCombinatorName | SpELProcessedExpression)[] => {\n const combinator = expr.type.slice(3) as DefaultCombinatorName;\n const [left, right] = expr.children;\n if (left.type === 'op-and' || left.type === 'op-or') {\n return [...generateFlatAndOrList(left), combinator, right];\n }\n return [left, combinator, right];\n};\n\nexport const generateMixedAndOrList = (\n expr: SpELOpAnd | SpELOpOr\n): (DefaultCombinatorName | SpELProcessedExpression | ('and' | SpELProcessedExpression)[])[] => {\n const arr = generateFlatAndOrList(expr);\n const returnArray: (\n | DefaultCombinatorName\n | SpELProcessedExpression\n | ('and' | SpELProcessedExpression)[]\n )[] = [];\n let startIndex = 0;\n for (let i = 0; i < arr.length; i += 2) {\n if (arr[i + 1] === 'and') {\n startIndex = i;\n let j = 1;\n while (arr[startIndex + j] === 'and') {\n i += 2;\n j += 2;\n }\n const tempAndArray = arr.slice(startIndex, i + 1) as ('and' | SpELProcessedExpression)[];\n returnArray.push(tempAndArray);\n i -= 2;\n } else if (arr[i + 1] === 'or') {\n if (i === 0 || i === arr.length - 3) {\n if (i === 0 || arr[i - 1] === 'or') {\n returnArray.push(arr[i]);\n }\n returnArray.push(arr[i + 1]);\n if (i === arr.length - 3) {\n returnArray.push(arr[i + 2]);\n }\n } else {\n if (arr[i - 1] === 'and') {\n returnArray.push(arr[i + 1]);\n } else {\n returnArray.push(arr[i], arr[i + 1]);\n }\n }\n }\n }\n if (returnArray.length === 1 && Array.isArray(returnArray[0])) {\n // If length is 1, then the only element is an AND array so just return that\n return returnArray[0];\n }\n return returnArray;\n};\n","import { SpelExpressionEvaluator } from 'spel2js';\nimport type { Except } from 'type-fest';\nimport type {\n DefaultCombinatorName,\n DefaultOperatorName,\n DefaultRuleGroupArray,\n DefaultRuleGroupICArray,\n DefaultRuleGroupType,\n DefaultRuleGroupTypeAny,\n DefaultRuleGroupTypeIC,\n DefaultRuleType,\n ValueSource,\n} from '../../types';\nimport type { ParserCommonOptions } from '../../types/import';\nimport { joinWith } from '../arrayUtils';\nimport { isRuleGroup } from '../isRuleGroup';\nimport { fieldIsValidUtil, getFieldsArray } from '../parserUtils';\nimport { prepareRuleGroup } from '../prepareQueryObjects';\nimport type { SpELExpressionNode, SpELProcessedExpression } from './types';\nimport {\n generateFlatAndOrList,\n generateMixedAndOrList,\n isSpELBetweenFields,\n isSpELBetweenValues,\n isSpELIdentifier,\n isSpELOpAnd,\n isSpELOpMatches,\n isSpELOpOr,\n isSpELPrimitive,\n isSpELRelationOp,\n normalizeOperator,\n processCompiledExpression,\n} from './utils';\n\n/**\n * Options object for {@link parseSpEL!parseSpEL}.\n */\nexport interface ParseSpELOptions extends ParserCommonOptions {}\n\n/**\n * Converts a SpEL string expression into a query suitable for the\n * {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props\n * ({@link index!DefaultRuleGroupType DefaultRuleGroupType}).\n */\nfunction parseSpEL(spel: string): DefaultRuleGroupType;\n/**\n * Converts a SpEL string expression into a query suitable for the\n * {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props\n * ({@link index!DefaultRuleGroupType DefaultRuleGroupType}).\n */\nfunction parseSpEL(\n spel: string,\n options: Except<ParseSpELOptions, 'independentCombinators'> & {\n independentCombinators?: false;\n }\n): DefaultRuleGroupType;\n/**\n * Converts a SpEL string expression into a query suitable for the\n * {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props\n * ({@link index!DefaultRuleGroupTypeIC DefaultRuleGroupTypeIC}).\n */\nfunction parseSpEL(\n spel: string,\n options: Except<ParseSpELOptions, 'independentCombinators'> & {\n independentCombinators: true;\n }\n): DefaultRuleGroupTypeIC;\nfunction parseSpEL(spel: string, options: ParseSpELOptions = {}): DefaultRuleGroupTypeAny {\n const { fields, independentCombinators, listsAsArrays } = options;\n const ic = !!independentCombinators;\n const fieldsFlat = getFieldsArray(fields);\n\n const fieldIsValid = (\n fieldName: string,\n operator: DefaultOperatorName,\n subordinateFieldName?: string\n ) =>\n fieldIsValidUtil({\n fieldName,\n fieldsFlat,\n operator,\n subordinateFieldName,\n getValueSources: options?.getValueSources,\n });\n\n const emptyQuery: DefaultRuleGroupTypeAny = {\n rules: [],\n ...(ic ? {} : { combinator: 'and' }),\n };\n\n const parseProcessedSpEL = (\n expr: SpELProcessedExpression,\n processOpts: {\n groupOnlyIfNecessary?: boolean;\n forwardNegation?: boolean;\n } = {}\n ): DefaultRuleType | DefaultRuleGroupTypeAny | null => {\n const { forwardNegation: _forwardedNegation, groupOnlyIfNecessary: _g } = processOpts;\n if (expr.type === 'op-not') {\n const negatedExpr = parseProcessedSpEL(expr.children[0]);\n // istanbul ignore else\n if (negatedExpr) {\n if (\n !isRuleGroup(negatedExpr) &&\n (negatedExpr.operator === 'contains' ||\n negatedExpr.operator === 'beginsWith' ||\n negatedExpr.operator === 'endsWith')\n ) {\n return {\n ...negatedExpr,\n operator: `doesNot${negatedExpr.operator[0].toUpperCase()}${negatedExpr.operator\n .slice(1)\n .replace('s', '')}` as DefaultOperatorName,\n };\n }\n return ic\n ? ({ rules: [negatedExpr], not: true } as DefaultRuleGroupTypeIC)\n : ({\n combinator: 'and',\n rules: [negatedExpr],\n not: true,\n } as DefaultRuleGroupType);\n }\n } else if (isSpELOpAnd(expr) || isSpELOpOr(expr)) {\n if (ic) {\n const andOrList = generateFlatAndOrList(expr);\n const rules = andOrList.map(v => {\n if (typeof v === 'string') {\n return v;\n }\n return parseProcessedSpEL(v);\n });\n // Bail out completely if any rules in the list were invalid\n // so as not to return an incorrect and/or sequence\n if (!rules.every(Boolean)) {\n return null;\n }\n return {\n rules: rules as DefaultRuleGroupICArray,\n };\n }\n const andOrList = generateMixedAndOrList(expr);\n const combinator = andOrList[1] as DefaultCombinatorName;\n const filteredList = andOrList\n .filter(v => Array.isArray(v) || (!!v && typeof v !== 'string' && 'type' in v))\n .map(v =>\n Array.isArray(v) ? v.filter(vf => !!v && typeof vf !== 'string' && 'type' in vf) : v\n ) as (SpELProcessedExpression | SpELProcessedExpression[])[];\n const rules = filteredList\n .map((exp): DefaultRuleGroupType | DefaultRuleType | null => {\n if (Array.isArray(exp)) {\n return {\n combinator: 'and',\n rules: exp.map(e => parseProcessedSpEL(e)).filter(Boolean) as DefaultRuleGroupArray,\n };\n }\n return parseProcessedSpEL(exp) as DefaultRuleType | DefaultRuleGroupType | null;\n })\n .filter(Boolean) as DefaultRuleGroupArray;\n // istanbul ignore else\n if (rules.length > 0) {\n return { combinator, rules };\n }\n } else if (isSpELOpMatches(expr)) {\n const [left, right] = expr.children;\n let field: string = '';\n let regex: string = '';\n let valueSource: ValueSource | undefined = undefined;\n if (isSpELIdentifier(left)) {\n field = left.identifier;\n if (isSpELIdentifier(right)) {\n regex = right.identifier;\n valueSource = 'field';\n } else {\n // istanbul ignore else\n if (isSpELPrimitive(right)) {\n regex = right.value;\n }\n }\n } else {\n // istanbul ignore else\n if (isSpELIdentifier(right) && isSpELPrimitive(left)) {\n field = right.identifier;\n regex = left.value;\n }\n }\n\n if (/^(?!\\^).*?(?<!\\$)$/.test(regex)) {\n // istanbul ignore else\n if (fieldIsValid(field, 'contains')) {\n return {\n field,\n operator: 'contains',\n value: regex,\n ...(valueSource ? { valueSource } : {}),\n };\n }\n } else {\n if (/^\\^.*?(?<!\\$)$/.test(regex)) {\n // istanbul ignore else\n if (fieldIsValid(field, 'beginsWith')) {\n return {\n field,\n operator: 'beginsWith',\n value: regex.replace(/^\\^/, ''),\n };\n }\n } else {\n // istanbul ignore else\n if (/^(?!\\^).*?\\$$/.test(regex)) {\n // istanbul ignore else\n if (fieldIsValid(field, 'endsWith')) {\n return {\n field,\n operator: 'endsWith',\n value: regex.replace(/\\$$/, ''),\n };\n }\n }\n }\n }\n } else if (isSpELBetweenValues(expr) || isSpELBetweenFields(expr)) {\n // oxlint-disable-next-line typescript/no-explicit-any\n let values: [any, any] = [null, null];\n let valueSource: ValueSource | undefined = undefined;\n const [\n { identifier: field },\n {\n children: [left, right],\n },\n ] = expr.children;\n\n if (isSpELBetweenValues(expr)) {\n values = [left.value, right.value];\n } else {\n values = [left.identifier, right.identifier];\n valueSource = 'field';\n }\n // istanbul ignore else\n if (\n field &&\n values.every(v => fieldIsValid(field, 'between', valueSource === 'field' ? v : undefined))\n ) {\n const valueArray =\n values[0] < values[1] || valueSource === 'field' ? values : [values[1], values[0]];\n const value = listsAsArrays ? valueArray : joinWith(valueArray, ',');\n return valueSource\n ? { field, operator: 'between', value, valueSource }\n : { field, operator: 'between', value };\n }\n } else if (isSpELRelationOp(expr)) {\n let field: string | null = null;\n // oxlint-disable-next-line typescript/no-explicit-any\n let value: any = undefined;\n let valueSource: ValueSource | undefined = undefined;\n let flip = false;\n const [left, right] = expr.children;\n\n if (isSpELIdentifier(left)) {\n field = left.identifier;\n if (isSpELIdentifier(right)) {\n value = right.identifier;\n valueSource = 'field';\n } else if (isSpELPrimitive(right)) {\n value = right.value;\n }\n } else {\n // istanbul ignore else\n if (isSpELIdentifier(right) && isSpELPrimitive(left)) {\n flip = true;\n field = right.identifier;\n value = left.value;\n }\n }\n let operator = normalizeOperator(expr.type, flip);\n if (value === null && (operator === '=' || operator === '!=')) {\n operator = operator === '=' ? 'null' : 'notNull';\n }\n if (\n field &&\n fieldIsValid(field, operator, valueSource === 'field' ? value : undefined) &&\n value !== undefined\n ) {\n return valueSource ? { field, operator, value, valueSource } : { field, operator, value };\n }\n }\n return null;\n };\n\n const prepare = options.generateIDs ? prepareRuleGroup : <T>(g: T) => g;\n\n let compiledSpEL: SpELExpressionNode;\n try {\n compiledSpEL = SpelExpressionEvaluator.compile(spel)._compiledExpression;\n } catch {\n return prepare(emptyQuery);\n }\n\n const processedSpEL = processCompiledExpression(compiledSpEL);\n\n const result = parseProcessedSpEL(processedSpEL);\n if (result) {\n if (isRuleGroup(result)) {\n return prepare(result);\n }\n return prepare({ rules: [result], ...(ic ? {} : { combinator: 'and' }) });\n }\n\n return prepare(emptyQuery);\n}\n\nexport { parseSpEL };\n"],"mappings":";;;;;;;AAwBA,MAAa,sBAAsB,SAA+D;AAChG,QAAO,KAAK,SAAS,KAAK,cAAc,KAAK,SAAS,KAAK;;AAE7D,MAAa,sBAAsB,SAA+D;AAChG,QAAO,KAAK,SAAS,KAAK,cAAc,KAAK,aAAa,CAAC,OAAM,MAAK,mBAAmB,EAAE,CAAC;;AAE9F,MAAa,kBAAkB,SAA2D;AACxF,QAAO,KAAK,SAAS,KAAK;;AAG5B,MAAa,eAAe,SAC1B,KAAK,SAAS;AAChB,MAAa,cAAc,SACzB,KAAK,SAAS;AAChB,MAAa,mBAAmB,SAC9B,KAAK,SAAS,cACZ,iBAAiB,KAAK,SAAS,GAAG,IAAI,oBAAoB,KAAK,SAAS,GAAG,IAC1E,iBAAiB,KAAK,SAAS,GAAG,IAAI,oBAAoB,KAAK,SAAS,GAAG,IAC3E,iBAAiB,KAAK,SAAS,GAAG,IAAI,iBAAiB,KAAK,SAAS,GAAG;AAC7E,MAAa,oBAAoB,SAC/B,KAAK,SAAS,cAAc,KAAK,SAAS,cAAc,KAAK,SAAS;AACxE,MAAa,uBAAuB,SAClC,KAAK,SAAS;AAChB,MAAa,wBAAwB,SACnC,KAAK,SAAS;AAChB,MAAa,wBAAwB,SACnC,KAAK,SAAS;AAChB,MAAa,qBAAqB,SAChC,KAAK,SAAS;AAChB,MAAa,oBAAoB,SAC/B,KAAK,SAAS,WACd,KAAK,SAAS,WACd,KAAK,SAAS,WACd,KAAK,SAAS,WACd,KAAK,SAAS,WACd,KAAK,SAAS;AAChB,MAAa,mBAAmB,SAC9B,qBAAqB,KAAK,IAC1B,oBAAoB,KAAK,IACzB,qBAAqB,KAAK,IAC1B,kBAAkB,KAAK;AACzB,MAAa,uBAAuB,SAClC,KAAK,SAAS,aACd,iBAAiB,KAA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,mBAFO,0BAA0B,aAAa,CAEb;AAChD,KAAI,QAAQ;AACV,MAAI,YAAY,OAAO,CACrB,QAAO,QAAQ,OAAO;AAExB,SAAO,QAAQ;GAAE,OAAO,CAAC,OAAO;GAAE,GAAI,KAAK,EAAE,GAAG,EAAE,YAAY,OAAO;GAAG,CAAC;;AAG3E,QAAO,QAAQ,WAAW"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_isRuleGroup = require('./isRuleGroup-DqAs2x4E.js');
|
|
2
|
-
const require_optGroupUtils = require('./optGroupUtils-
|
|
2
|
+
const require_optGroupUtils = require('./optGroupUtils-B0hTpodo.js');
|
|
3
3
|
let immer = require("immer");
|
|
4
4
|
immer = require_isRuleGroup.__toESM(immer);
|
|
5
5
|
|
|
@@ -74,11 +74,10 @@ const getValueSourcesUtil = (fieldData, operator, getValueSources) => {
|
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/utils/parserUtils.ts
|
|
76
76
|
const getFieldsArray = (fields) => {
|
|
77
|
-
|
|
77
|
+
return require_optGroupUtils.toFlatOptionArray(fields ? Array.isArray(fields) ? fields : Object.keys(fields).map((fld) => ({
|
|
78
78
|
...fields[fld],
|
|
79
79
|
name: fld
|
|
80
|
-
})).sort((a, b) => a.label.localeCompare(b.label)) : [];
|
|
81
|
-
return require_optGroupUtils.toFlatOptionArray(fieldsArray);
|
|
80
|
+
})).sort((a, b) => a.label.localeCompare(b.label)) : []);
|
|
82
81
|
};
|
|
83
82
|
function fieldIsValidUtil(params) {
|
|
84
83
|
const { fieldsFlat, fieldName, operator, subordinateFieldName, getValueSources } = params;
|
|
@@ -169,4 +168,4 @@ Object.defineProperty(exports, 'prepareRuleGroup', {
|
|
|
169
168
|
return prepareRuleGroup;
|
|
170
169
|
}
|
|
171
170
|
});
|
|
172
|
-
//# sourceMappingURL=prepareQueryObjects-
|
|
171
|
+
//# sourceMappingURL=prepareQueryObjects-BOUWfel5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareQueryObjects-BOUWfel5.js","names":["toFullOption","isFlexibleOptionGroupArray","defaultValueSourcesArray: ValueSourceFullOptions","toFullOption","valueSourcesNEW:\n | false\n | ValueSources\n | ValueSourceFlexibleOptions\n | ((operator: string) => ValueSources | ValueSourceFlexibleOptions)","isFlexibleOptionArray","toFullOptionList","lc","toFlatOptionArray","isFlexibleOptionArray","toFullOption","isRuleGroup"],"sources":["../src/utils/filterFieldsByComparator.ts","../src/utils/getValueSourcesUtil.ts","../src/utils/parserUtils.ts","../src/utils/generateID.ts","../src/utils/prepareQueryObjects.ts"],"sourcesContent":["import type { FullField, OptionList, WithUnknownIndex } from '../types';\nimport { isFlexibleOptionGroupArray, toFullOption } from './optGroupUtils';\n\nconst filterByComparator = (field: FullField, operator: string, fieldToCompare: FullField) => {\n const fullField = toFullOption(field);\n const fullFieldToCompare = toFullOption(fieldToCompare);\n if (fullField.value === fullFieldToCompare.value) {\n return false;\n }\n if (typeof fullField.comparator === 'string') {\n return fullField[fullField.comparator] === fullFieldToCompare[fullField.comparator];\n }\n return fullField.comparator?.(fullFieldToCompare, operator) ?? /* istanbul ignore next */ false;\n};\n\n/**\n * For a given {@link FullField}, returns the `fields` list filtered for\n * other fields that match by `comparator`. Only fields *other than the\n * one in question* will ever be included, even if `comparator` is `null`\n * or `undefined`. If `comparator` is a string, fields with the same value\n * for that property will be included. If `comparator` is a function, each\n * field will be passed to the function along with the `operator` and fields\n * for which the function returns `true` will be included.\n *\n * @group Option Lists\n */\nexport const filterFieldsByComparator = (\n /** The field in question. */\n field: FullField,\n /** The full {@link FullField} list to be filtered. */\n fields: OptionList<FullField>,\n operator: string\n):\n | FullField[]\n | {\n options: WithUnknownIndex<FullField>[];\n label: string;\n }[] => {\n if (!field.comparator) {\n const filterOutSameField = (f: FullField) =>\n (f.value ?? /* istanbul ignore next */ f.name) !==\n (field.value ?? /* istanbul ignore next */ field.name);\n if (isFlexibleOptionGroupArray(fields)) {\n return fields.map(og => ({\n ...og,\n options: og.options.filter(v => filterOutSameField(v)),\n }));\n }\n return fields.filter(v => filterOutSameField(v));\n }\n\n if (isFlexibleOptionGroupArray(fields)) {\n return fields\n .map(og => ({\n ...og,\n options: og.options.filter(f => filterByComparator(field, operator, f)),\n }))\n .filter(og => og.options.length > 0);\n }\n\n return fields.filter(f => filterByComparator(field, operator, f));\n};\n","import type {\n FullField,\n GetOptionIdentifierType,\n ValueSourceFlexibleOptions,\n ValueSourceFullOptions,\n ValueSources,\n} from '../types';\nimport { lc } from './misc';\nimport { isFlexibleOptionArray, toFullOption, toFullOptionList } from './optGroupUtils';\n\nconst defaultValueSourcesArray: ValueSourceFullOptions = [\n { name: 'value', value: 'value', label: 'value' },\n];\n\nconst dummyFD = {\n name: 'name',\n value: 'name',\n valueSources: null,\n label: 'label',\n};\n\n/**\n * Utility function to get the value sources array for the given\n * field and operator. If the field definition does not define a\n * `valueSources` property, the `getValueSources` prop is used.\n * Returns `[FullOption<\"value\">]` by default.\n */\nexport const getValueSourcesUtil = <F extends FullField, O extends string>(\n fieldData: F,\n operator: string,\n getValueSources?: (\n field: GetOptionIdentifierType<F>,\n operator: O,\n misc: { fieldData: F }\n ) => ValueSources | ValueSourceFlexibleOptions\n): ValueSourceFullOptions => {\n // TypeScript doesn't allow it directly, but in practice\n // `fieldData` can end up being undefined or null. The nullish\n // coalescing assignment below avoids errors like\n // \"TypeError: Cannot read properties of undefined (reading 'name')\"\n const fd = fieldData ? toFullOption(fieldData) : dummyFD;\n\n let valueSourcesNEW:\n | false\n | ValueSources\n | ValueSourceFlexibleOptions\n | ((operator: string) => ValueSources | ValueSourceFlexibleOptions) = fd.valueSources ?? false;\n\n if (typeof valueSourcesNEW === 'function') {\n valueSourcesNEW = valueSourcesNEW(operator as O);\n }\n\n if (!valueSourcesNEW && getValueSources) {\n valueSourcesNEW = getValueSources(fd.value as GetOptionIdentifierType<F>, operator as O, {\n fieldData: fd as F,\n });\n }\n\n if (!valueSourcesNEW) {\n return defaultValueSourcesArray;\n }\n\n if (isFlexibleOptionArray(valueSourcesNEW)) {\n return toFullOptionList(valueSourcesNEW as ValueSourceFullOptions) as ValueSourceFullOptions;\n }\n\n return valueSourcesNEW.map(\n vs =>\n defaultValueSourcesArray.find(dmm => dmm.value === lc(vs)) ?? {\n name: vs,\n value: vs,\n label: vs,\n }\n ) as ValueSourceFullOptions;\n};\n","import type {\n DefaultOperatorName,\n FullField,\n FullOption,\n OptionList,\n ValueSource,\n ValueSourceFlexibleOptions,\n ValueSources,\n} from '../types';\nimport { filterFieldsByComparator } from './filterFieldsByComparator';\nimport { getValueSourcesUtil } from './getValueSourcesUtil';\nimport { isFlexibleOptionArray, toFlatOptionArray, toFullOption } from './optGroupUtils';\n\nexport const getFieldsArray = (\n fields?: OptionList<FullField> | Record<string, FullField>\n): FullOption[] => {\n const fieldsArray = fields\n ? Array.isArray(fields)\n ? fields\n : Object.keys(fields)\n .map(fld => ({ ...fields[fld], name: fld }))\n // oxlint-disable-next-line no-array-sort\n .sort((a, b) => a.label.localeCompare(b.label))\n : [];\n return toFlatOptionArray(fieldsArray);\n};\n\nexport function fieldIsValidUtil(params: {\n fieldsFlat: FullField[];\n getValueSources?: (field: string, operator: string) => ValueSources | ValueSourceFlexibleOptions;\n fieldName: string;\n operator: DefaultOperatorName;\n subordinateFieldName?: string;\n}): boolean {\n const { fieldsFlat, fieldName, operator, subordinateFieldName, getValueSources } = params;\n\n const vsIncludes = (vs: ValueSource) => {\n const vss = getValueSourcesUtil(primaryField, operator, getValueSources);\n return isFlexibleOptionArray(vss) && vss.some(vso => vso.value === vs || vso.name === vs);\n };\n\n // If fields option was an empty array or undefined, then all identifiers\n // are considered valid.\n if (fieldsFlat.length === 0) return true;\n\n let valid = false;\n\n const primaryField = toFullOption(fieldsFlat.find(ff => ff.name === fieldName)!);\n if (primaryField) {\n valid = !(\n !subordinateFieldName &&\n operator !== 'notNull' &&\n operator !== 'null' &&\n !vsIncludes('value')\n );\n\n if (valid && !!subordinateFieldName) {\n if (vsIncludes('field') && fieldName !== subordinateFieldName) {\n const validSubordinateFields = filterFieldsByComparator(\n primaryField,\n fieldsFlat,\n operator\n ) as FullField[];\n if (!validSubordinateFields.some(vsf => vsf.name === subordinateFieldName)) {\n valid = false;\n }\n } else {\n valid = false;\n }\n }\n }\n\n return valid;\n}\n","// import type { UUID } from 'node:crypto';\ntype UUID = `${string}-${string}-${string}-${string}-${string}`;\n\nconst cryptoModule = globalThis.crypto;\n\n/**\n * Default `id` generator. Generates a valid v4 UUID. Uses `crypto.randomUUID()`\n * when available, otherwise uses an alternate method based on `getRandomValues`.\n * The returned string is guaranteed to match this regex:\n * ```\n * /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i\n * ```\n * @returns Valid v4 UUID\n */\n// Default implementation adapted from https://stackoverflow.com/a/68141099/217579\n// istanbul ignore next\nexport let generateID = (): UUID =>\n '00-0-4-2-000'.replaceAll(/[^-]/g, s =>\n (((Math.random() + Math.trunc(s as unknown as number)) * 0x1_00_00) >> Number.parseInt(s))\n .toString(16)\n .padStart(4, '0')\n ) as UUID;\n\n// Improve on the default implementation by using the crypto package if it's available\n// istanbul ignore else\nif (cryptoModule) {\n // istanbul ignore else\n if (typeof cryptoModule.randomUUID === 'function') {\n generateID = () => cryptoModule.randomUUID();\n } else if (typeof cryptoModule.getRandomValues === 'function') {\n // `randomUUID` is much simpler and faster, but it's only guaranteed to be\n // available in secure contexts (server-side, https, etc.). `generateID`\n // doesn't really need to be cryptographically secure, it only needs a\n // fairly low chance of collisions. We fall back to the always-available\n // `getRandomValues` here (while still generating a valid v4 UUID) when\n // `randomUUID` is not available.\n const position19vals = '89ab';\n const container = new Uint32Array(32);\n\n generateID = () => {\n cryptoModule.getRandomValues(container);\n let id = (container[0] % 16).toString(16);\n for (let i = 1; i < 32; i++) {\n if (i === 12) {\n id = `${id}${'4'}`;\n } else if (i === 16) {\n id = `${id}${position19vals[container[17] % 4]}`;\n } else {\n id = `${id}${(container[i] % 16).toString(16)}`;\n }\n\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n id = `${id}${'-'}`;\n }\n }\n return id as UUID;\n };\n }\n}\n","import { produce } from 'immer';\nimport type {\n RuleGroupArray,\n RuleGroupICArray,\n RuleGroupType,\n RuleGroupTypeAny,\n RuleGroupTypeIC,\n RuleType,\n} from '../types';\nimport { generateID } from './generateID';\nimport { isRuleGroup } from './isRuleGroup';\n\n/**\n * Options for {@link prepareRule}/{@link prepareRuleGroup}.\n */\nexport interface PreparerOptions {\n idGenerator?: () => string;\n}\n\n/**\n * Ensures that a rule is valid by adding an `id` property if it does not already exist.\n */\nexport const prepareRule = (\n rule: RuleType,\n { idGenerator = generateID }: PreparerOptions = {}\n): RuleType =>\n produce(rule, draft => {\n if (!draft.id) {\n draft.id = idGenerator();\n }\n });\n\n/**\n * Ensures that a rule group is valid by recursively adding an `id` property to the group itself\n * and all its rules and subgroups where one does not already exist.\n */\nexport const prepareRuleGroup = <RG extends RuleGroupTypeAny>(\n queryObject: RG,\n { idGenerator = generateID }: PreparerOptions = {}\n): RG =>\n produce(queryObject, draft => {\n if (!draft.id) {\n draft.id = idGenerator();\n }\n draft.rules = draft.rules.map(r =>\n typeof r === 'string'\n ? r\n : isRuleGroup(r)\n ? prepareRuleGroup(r, { idGenerator })\n : prepareRule(r, { idGenerator })\n ) as RuleGroupArray | RuleGroupICArray;\n });\n\n/**\n * Ensures that a rule or group is valid. See {@link prepareRule} and {@link prepareRuleGroup}.\n */\nexport const prepareRuleOrGroup = <RG extends RuleGroupTypeAny>(\n rg: RG | RuleType,\n { idGenerator = generateID }: PreparerOptions = {}\n): RuleGroupType | RuleGroupTypeIC | RuleType =>\n isRuleGroup(rg) ? prepareRuleGroup(rg, { idGenerator }) : prepareRule(rg, { idGenerator });\n"],"mappings":";;;;;;AAGA,MAAM,sBAAsB,OAAkB,UAAkB,mBAA8B;CAC5F,MAAM,YAAYA,mCAAa,MAAM;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MAAM,EAAuB,IAAI,SAAc,OAAO,SAAS,EAAE,EACtF,SAAS,GAAG,CACZ,SAAS,GAAG,IAAI,CACpB;;AAIH,IAAI,cAEF;;KAAI,OAAO,aAAa,eAAe,WACrC,oBAAmB,aAAa,YAAY;UACnC,OAAO,aAAa,oBAAoB,YAAY;EAO7D,MAAM,iBAAiB;EACvB,MAAM,YAAY,IAAI,YAAY,GAAG;AAErC,qBAAmB;AACjB,gBAAa,gBAAgB,UAAU;GACvC,IAAI,MAAM,UAAU,KAAK,IAAI,SAAS,GAAG;AACzC,QAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK;AAC3B,QAAI,MAAM,GACR,MAAK,GAAG;aACC,MAAM,GACf,MAAK,GAAG,KAAK,eAAe,UAAU,MAAM;QAE5C,MAAK,GAAG,MAAM,UAAU,KAAK,IAAI,SAAS,GAAG;AAG/C,QAAI,MAAM,KAAK,MAAM,MAAM,MAAM,MAAM,MAAM,GAC3C,MAAK,GAAG;;AAGZ,UAAO;;;;;;;;;;ACjCb,MAAa,eACX,MACA,EAAE,cAAc,eAAgC,EAAE,wBAE1C,OAAM,UAAS;AACrB,KAAI,CAAC,MAAM,GACT,OAAM,KAAK,aAAa;EAE1B;;;;;AAMJ,MAAa,oBACX,aACA,EAAE,cAAc,eAAgC,EAAE,wBAE1C,cAAa,UAAS;AAC5B,KAAI,CAAC,MAAM,GACT,OAAM,KAAK,aAAa;AAE1B,OAAM,QAAQ,MAAM,MAAM,KAAI,MAC5B,OAAO,MAAM,WACT,IACAC,gCAAY,EAAE,GACZ,iBAAiB,GAAG,EAAE,aAAa,CAAC,GACpC,YAAY,GAAG,EAAE,aAAa,CAAC,CACtC;EACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as toFullOption, i as toFlatOptionArray, n as isFlexibleOptionArray, o as toFullOptionList, r as isFlexibleOptionGroupArray } from "./optGroupUtils-VeZ3k7-1.mjs";
|
|
2
|
+
import { a as lc, t as isRuleGroup } from "./isRuleGroup-CYcfPgbg.mjs";
|
|
3
3
|
import { produce } from "immer";
|
|
4
4
|
|
|
5
5
|
//#region src/utils/filterFieldsByComparator.ts
|
|
@@ -73,11 +73,10 @@ const getValueSourcesUtil = (fieldData, operator, getValueSources) => {
|
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/utils/parserUtils.ts
|
|
75
75
|
const getFieldsArray = (fields) => {
|
|
76
|
-
|
|
76
|
+
return toFlatOptionArray(fields ? Array.isArray(fields) ? fields : Object.keys(fields).map((fld) => ({
|
|
77
77
|
...fields[fld],
|
|
78
78
|
name: fld
|
|
79
|
-
})).sort((a, b) => a.label.localeCompare(b.label)) : [];
|
|
80
|
-
return toFlatOptionArray(fieldsArray);
|
|
79
|
+
})).sort((a, b) => a.label.localeCompare(b.label)) : []);
|
|
81
80
|
};
|
|
82
81
|
function fieldIsValidUtil(params) {
|
|
83
82
|
const { fieldsFlat, fieldName, operator, subordinateFieldName, getValueSources } = params;
|
|
@@ -150,5 +149,5 @@ const prepareRuleGroup = (queryObject, { idGenerator = generateID } = {}) => pro
|
|
|
150
149
|
});
|
|
151
150
|
|
|
152
151
|
//#endregion
|
|
153
|
-
export { fieldIsValidUtil, getFieldsArray, prepareRuleGroup };
|
|
154
|
-
//# sourceMappingURL=prepareQueryObjects-
|
|
152
|
+
export { fieldIsValidUtil as n, getFieldsArray as r, prepareRuleGroup as t };
|
|
153
|
+
//# sourceMappingURL=prepareQueryObjects-DPCC-iHp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareQueryObjects-DPCC-iHp.mjs","names":["defaultValueSourcesArray: ValueSourceFullOptions","valueSourcesNEW:\n | false\n | ValueSources\n | ValueSourceFlexibleOptions\n | ((operator: string) => ValueSources | ValueSourceFlexibleOptions)"],"sources":["../src/utils/filterFieldsByComparator.ts","../src/utils/getValueSourcesUtil.ts","../src/utils/parserUtils.ts","../src/utils/generateID.ts","../src/utils/prepareQueryObjects.ts"],"sourcesContent":["import type { FullField, OptionList, WithUnknownIndex } from '../types';\nimport { isFlexibleOptionGroupArray, toFullOption } from './optGroupUtils';\n\nconst filterByComparator = (field: FullField, operator: string, fieldToCompare: FullField) => {\n const fullField = toFullOption(field);\n const fullFieldToCompare = toFullOption(fieldToCompare);\n if (fullField.value === fullFieldToCompare.value) {\n return false;\n }\n if (typeof fullField.comparator === 'string') {\n return fullField[fullField.comparator] === fullFieldToCompare[fullField.comparator];\n }\n return fullField.comparator?.(fullFieldToCompare, operator) ?? /* istanbul ignore next */ false;\n};\n\n/**\n * For a given {@link FullField}, returns the `fields` list filtered for\n * other fields that match by `comparator`. Only fields *other than the\n * one in question* will ever be included, even if `comparator` is `null`\n * or `undefined`. If `comparator` is a string, fields with the same value\n * for that property will be included. If `comparator` is a function, each\n * field will be passed to the function along with the `operator` and fields\n * for which the function returns `true` will be included.\n *\n * @group Option Lists\n */\nexport const filterFieldsByComparator = (\n /** The field in question. */\n field: FullField,\n /** The full {@link FullField} list to be filtered. */\n fields: OptionList<FullField>,\n operator: string\n):\n | FullField[]\n | {\n options: WithUnknownIndex<FullField>[];\n label: string;\n }[] => {\n if (!field.comparator) {\n const filterOutSameField = (f: FullField) =>\n (f.value ?? /* istanbul ignore next */ f.name) !==\n (field.value ?? /* istanbul ignore next */ field.name);\n if (isFlexibleOptionGroupArray(fields)) {\n return fields.map(og => ({\n ...og,\n options: og.options.filter(v => filterOutSameField(v)),\n }));\n }\n return fields.filter(v => filterOutSameField(v));\n }\n\n if (isFlexibleOptionGroupArray(fields)) {\n return fields\n .map(og => ({\n ...og,\n options: og.options.filter(f => filterByComparator(field, operator, f)),\n }))\n .filter(og => og.options.length > 0);\n }\n\n return fields.filter(f => filterByComparator(field, operator, f));\n};\n","import type {\n FullField,\n GetOptionIdentifierType,\n ValueSourceFlexibleOptions,\n ValueSourceFullOptions,\n ValueSources,\n} from '../types';\nimport { lc } from './misc';\nimport { isFlexibleOptionArray, toFullOption, toFullOptionList } from './optGroupUtils';\n\nconst defaultValueSourcesArray: ValueSourceFullOptions = [\n { name: 'value', value: 'value', label: 'value' },\n];\n\nconst dummyFD = {\n name: 'name',\n value: 'name',\n valueSources: null,\n label: 'label',\n};\n\n/**\n * Utility function to get the value sources array for the given\n * field and operator. If the field definition does not define a\n * `valueSources` property, the `getValueSources` prop is used.\n * Returns `[FullOption<\"value\">]` by default.\n */\nexport const getValueSourcesUtil = <F extends FullField, O extends string>(\n fieldData: F,\n operator: string,\n getValueSources?: (\n field: GetOptionIdentifierType<F>,\n operator: O,\n misc: { fieldData: F }\n ) => ValueSources | ValueSourceFlexibleOptions\n): ValueSourceFullOptions => {\n // TypeScript doesn't allow it directly, but in practice\n // `fieldData` can end up being undefined or null. The nullish\n // coalescing assignment below avoids errors like\n // \"TypeError: Cannot read properties of undefined (reading 'name')\"\n const fd = fieldData ? toFullOption(fieldData) : dummyFD;\n\n let valueSourcesNEW:\n | false\n | ValueSources\n | ValueSourceFlexibleOptions\n | ((operator: string) => ValueSources | ValueSourceFlexibleOptions) = fd.valueSources ?? false;\n\n if (typeof valueSourcesNEW === 'function') {\n valueSourcesNEW = valueSourcesNEW(operator as O);\n }\n\n if (!valueSourcesNEW && getValueSources) {\n valueSourcesNEW = getValueSources(fd.value as GetOptionIdentifierType<F>, operator as O, {\n fieldData: fd as F,\n });\n }\n\n if (!valueSourcesNEW) {\n return defaultValueSourcesArray;\n }\n\n if (isFlexibleOptionArray(valueSourcesNEW)) {\n return toFullOptionList(valueSourcesNEW as ValueSourceFullOptions) as ValueSourceFullOptions;\n }\n\n return valueSourcesNEW.map(\n vs =>\n defaultValueSourcesArray.find(dmm => dmm.value === lc(vs)) ?? {\n name: vs,\n value: vs,\n label: vs,\n }\n ) as ValueSourceFullOptions;\n};\n","import type {\n DefaultOperatorName,\n FullField,\n FullOption,\n OptionList,\n ValueSource,\n ValueSourceFlexibleOptions,\n ValueSources,\n} from '../types';\nimport { filterFieldsByComparator } from './filterFieldsByComparator';\nimport { getValueSourcesUtil } from './getValueSourcesUtil';\nimport { isFlexibleOptionArray, toFlatOptionArray, toFullOption } from './optGroupUtils';\n\nexport const getFieldsArray = (\n fields?: OptionList<FullField> | Record<string, FullField>\n): FullOption[] => {\n const fieldsArray = fields\n ? Array.isArray(fields)\n ? fields\n : Object.keys(fields)\n .map(fld => ({ ...fields[fld], name: fld }))\n // oxlint-disable-next-line no-array-sort\n .sort((a, b) => a.label.localeCompare(b.label))\n : [];\n return toFlatOptionArray(fieldsArray);\n};\n\nexport function fieldIsValidUtil(params: {\n fieldsFlat: FullField[];\n getValueSources?: (field: string, operator: string) => ValueSources | ValueSourceFlexibleOptions;\n fieldName: string;\n operator: DefaultOperatorName;\n subordinateFieldName?: string;\n}): boolean {\n const { fieldsFlat, fieldName, operator, subordinateFieldName, getValueSources } = params;\n\n const vsIncludes = (vs: ValueSource) => {\n const vss = getValueSourcesUtil(primaryField, operator, getValueSources);\n return isFlexibleOptionArray(vss) && vss.some(vso => vso.value === vs || vso.name === vs);\n };\n\n // If fields option was an empty array or undefined, then all identifiers\n // are considered valid.\n if (fieldsFlat.length === 0) return true;\n\n let valid = false;\n\n const primaryField = toFullOption(fieldsFlat.find(ff => ff.name === fieldName)!);\n if (primaryField) {\n valid = !(\n !subordinateFieldName &&\n operator !== 'notNull' &&\n operator !== 'null' &&\n !vsIncludes('value')\n );\n\n if (valid && !!subordinateFieldName) {\n if (vsIncludes('field') && fieldName !== subordinateFieldName) {\n const validSubordinateFields = filterFieldsByComparator(\n primaryField,\n fieldsFlat,\n operator\n ) as FullField[];\n if (!validSubordinateFields.some(vsf => vsf.name === subordinateFieldName)) {\n valid = false;\n }\n } else {\n valid = false;\n }\n }\n }\n\n return valid;\n}\n","// import type { UUID } from 'node:crypto';\ntype UUID = `${string}-${string}-${string}-${string}-${string}`;\n\nconst cryptoModule = globalThis.crypto;\n\n/**\n * Default `id` generator. Generates a valid v4 UUID. Uses `crypto.randomUUID()`\n * when available, otherwise uses an alternate method based on `getRandomValues`.\n * The returned string is guaranteed to match this regex:\n * ```\n * /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i\n * ```\n * @returns Valid v4 UUID\n */\n// Default implementation adapted from https://stackoverflow.com/a/68141099/217579\n// istanbul ignore next\nexport let generateID = (): UUID =>\n '00-0-4-2-000'.replaceAll(/[^-]/g, s =>\n (((Math.random() + Math.trunc(s as unknown as number)) * 0x1_00_00) >> Number.parseInt(s))\n .toString(16)\n .padStart(4, '0')\n ) as UUID;\n\n// Improve on the default implementation by using the crypto package if it's available\n// istanbul ignore else\nif (cryptoModule) {\n // istanbul ignore else\n if (typeof cryptoModule.randomUUID === 'function') {\n generateID = () => cryptoModule.randomUUID();\n } else if (typeof cryptoModule.getRandomValues === 'function') {\n // `randomUUID` is much simpler and faster, but it's only guaranteed to be\n // available in secure contexts (server-side, https, etc.). `generateID`\n // doesn't really need to be cryptographically secure, it only needs a\n // fairly low chance of collisions. We fall back to the always-available\n // `getRandomValues` here (while still generating a valid v4 UUID) when\n // `randomUUID` is not available.\n const position19vals = '89ab';\n const container = new Uint32Array(32);\n\n generateID = () => {\n cryptoModule.getRandomValues(container);\n let id = (container[0] % 16).toString(16);\n for (let i = 1; i < 32; i++) {\n if (i === 12) {\n id = `${id}${'4'}`;\n } else if (i === 16) {\n id = `${id}${position19vals[container[17] % 4]}`;\n } else {\n id = `${id}${(container[i] % 16).toString(16)}`;\n }\n\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n id = `${id}${'-'}`;\n }\n }\n return id as UUID;\n };\n }\n}\n","import { produce } from 'immer';\nimport type {\n RuleGroupArray,\n RuleGroupICArray,\n RuleGroupType,\n RuleGroupTypeAny,\n RuleGroupTypeIC,\n RuleType,\n} from '../types';\nimport { generateID } from './generateID';\nimport { isRuleGroup } from './isRuleGroup';\n\n/**\n * Options for {@link prepareRule}/{@link prepareRuleGroup}.\n */\nexport interface PreparerOptions {\n idGenerator?: () => string;\n}\n\n/**\n * Ensures that a rule is valid by adding an `id` property if it does not already exist.\n */\nexport const prepareRule = (\n rule: RuleType,\n { idGenerator = generateID }: PreparerOptions = {}\n): RuleType =>\n produce(rule, draft => {\n if (!draft.id) {\n draft.id = idGenerator();\n }\n });\n\n/**\n * Ensures that a rule group is valid by recursively adding an `id` property to the group itself\n * and all its rules and subgroups where one does not already exist.\n */\nexport const prepareRuleGroup = <RG extends RuleGroupTypeAny>(\n queryObject: RG,\n { idGenerator = generateID }: PreparerOptions = {}\n): RG =>\n produce(queryObject, draft => {\n if (!draft.id) {\n draft.id = idGenerator();\n }\n draft.rules = draft.rules.map(r =>\n typeof r === 'string'\n ? r\n : isRuleGroup(r)\n ? prepareRuleGroup(r, { idGenerator })\n : prepareRule(r, { idGenerator })\n ) as RuleGroupArray | RuleGroupICArray;\n });\n\n/**\n * Ensures that a rule or group is valid. See {@link prepareRule} and {@link prepareRuleGroup}.\n */\nexport const prepareRuleOrGroup = <RG extends RuleGroupTypeAny>(\n rg: RG | RuleType,\n { idGenerator = generateID }: PreparerOptions = {}\n): RuleGroupType | RuleGroupTypeIC | RuleType =>\n isRuleGroup(rg) ? prepareRuleGroup(rg, { idGenerator }) : prepareRule(rg, { idGenerator });\n"],"mappings":";;;;;AAGA,MAAM,sBAAsB,OAAkB,UAAkB,mBAA8B;CAC5F,MAAM,YAAY,aAAa,MAAM;CACrC,MAAM,qBAAqB,aAAa,eAAe;AACvD,KAAI,UAAU,UAAU,mBAAmB,MACzC,QAAO;AAET,KAAI,OAAO,UAAU,eAAe,SAClC,QAAO,UAAU,UAAU,gBAAgB,mBAAmB,UAAU;AAE1E,QAAO,UAAU,aAAa,oBAAoB,SAAS,IAA+B;;;;;;;;;;;;;AAc5F,MAAa,4BAEX,OAEA,QACA,aAMS;AACT,KAAI,CAAC,MAAM,YAAY;EACrB,MAAM,sBAAsB,OACzB,EAAE,SAAoC,EAAE,WACxC,MAAM,SAAoC,MAAM;AACnD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IAAI,IAAI,KAAK;AAC3B,QAAI,MAAM,GACR,MAAK,GAAG;aACC,MAAM,GACf,MAAK,GAAG,KAAK,eAAe,UAAU,MAAM;QAE5C,MAAK,GAAG,MAAM,UAAU,KAAK,IAAI,SAAS,GAAG;AAG/C,QAAI,MAAM,KAAK,MAAM,MAAM,MAAM,MAAM,MAAM,GAC3C,MAAK,GAAG;;AAGZ,UAAO;;;;;;;;;;ACjCb,MAAa,eACX,MACA,EAAE,cAAc,eAAgC,EAAE,KAElD,QAAQ,OAAM,UAAS;AACrB,KAAI,CAAC,MAAM,GACT,OAAM,KAAK,aAAa;EAE1B;;;;;AAMJ,MAAa,oBACX,aACA,EAAE,cAAc,eAAgC,EAAE,KAElD,QAAQ,cAAa,UAAS;AAC5B,KAAI,CAAC,MAAM,GACT,OAAM,KAAK,aAAa;AAE1B,OAAM,QAAQ,MAAM,MAAM,KAAI,MAC5B,OAAO,MAAM,WACT,IACA,YAAY,EAAE,GACZ,iBAAiB,GAAG,EAAE,aAAa,CAAC,GACpC,YAAY,GAAG,EAAE,aAAa,CAAC,CACtC;EACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--rqb-spacing: 0.5rem;--rqb-border-width: 1px;--rqb-branch-indent: var(--rqb-spacing);--rqb-branch-width: var(--rqb-border-width);--rqb-base-color: #004bb8;--rqb-background-color: color-mix(in srgb, transparent, #004bb8 20%);--rqb-border-color: #8081a2;--rqb-border-style: solid;--rqb-border-radius: 0.25rem;--rqb-dnd-drop-indicator-color: rebeccapurple;--rqb-dnd-drop-indicator-style: dashed;--rqb-dnd-drop-indicator-width: 2px;--rqb-dnd-drop-indicator-copy-color: #693;--rqb-dnd-drop-indicator-copy-style: dashed;--rqb-dnd-drop-indicator-copy-width: 2px;--rqb-dnd-drop-indicator-group-color: #369;--rqb-dnd-drop-indicator-group-style: dashed;--rqb-dnd-drop-indicator-group-width: 2px;--rqb-dnd-drop-not-allowed-cursor: not-allowed;--rqb-branch-color: var(--rqb-border-color);--rqb-branch-radius: var(--rqb-border-radius);--rqb-branch-style: var(--rqb-border-style)}.ruleGroup{display:flex;flex-direction:column;gap:var(--rqb-spacing);padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .ruleGroup-body{display:flex;flex-direction:column;gap:var(--rqb-spacing)}.ruleGroup .ruleGroup-body:empty{display:none}.ruleGroup .ruleGroup-header,.ruleGroup .rule{display:flex;gap:var(--rqb-spacing);align-items:center}.ruleGroup .rule .rule-value:has(.rule-value-list-item){display:flex;gap:var(--rqb-spacing);align-items:baseline}.ruleGroup .rule.rule-hasSubQuery{flex-wrap:wrap;padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .rule.rule-hasSubQuery .ruleGroup-body{flex-basis:100%}.ruleGroup .betweenRules{display:flex}.ruleGroup .shiftActions{display:flex;flex-direction:column}.ruleGroup .shiftActions>*{padding:0}.dndOver.rule,.dndOver.ruleGroup-header{padding-bottom:var(--rqb-spacing)}.dndOver.betweenRules{padding-top:var(--rqb-spacing)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(.ruleGroup-header.dndOver){padding:var(--rqb-spacing)}.queryBuilder-branches .ruleGroup-body{margin-left:calc(2*var(--rqb-branch-indent))}.queryBuilder-branches .rule,.queryBuilder-branches .ruleGroup .ruleGroup{position:relative}.queryBuilder-branches .rule::before,.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute}.queryBuilder-branches .rule::before,.queryBuilder-branches .ruleGroup .ruleGroup::before{top:calc(-1*var(--rqb-spacing));height:calc(50% + var(--rqb-spacing));border-width:0 0 var(--rqb-branch-width) var(--rqb-branch-width)}.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::after{top:50%;height:50%;border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-branches .rule:last-child::after,.queryBuilder-branches .ruleGroup .ruleGroup:last-child::after{display:none}.queryBuilder-branches .rule-hasSubQuery::before,.queryBuilder-branches .rule-hasSubQuery::after,.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width) + var(--rqb-border-width)))}.queryBuilder-branches .rule-hasSubQuery::before,.queryBuilder-branches .ruleGroup .ruleGroup::before{top:calc(-1*(var(--rqb-spacing) + var(--rqb-border-width)));height:calc(50% + var(--rqb-spacing) + var(--rqb-border-width))}.queryBuilder-branches .rule-hasSubQuery::after,.queryBuilder-branches .ruleGroup .ruleGroup::after{height:calc(50% + var(--rqb-border-width))}.queryBuilder-branches .betweenRules{position:relative}.queryBuilder-branches .betweenRules::before{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute;top:calc(-1*var(--rqb-spacing));height:calc(100% + var(--rqb-spacing));border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-combinators+.rule-cloneRule,.queryBuilder-justified .ruleGroup-combinators+.rule-lock,.queryBuilder-justified .ruleGroup-combinators+.rule-remove,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified .shiftActions+.ruleGroup-addRule,.queryBuilder-justified .shiftActions+.ruleGroup-addGroup,.queryBuilder-justified .shiftActions+.ruleGroup-cloneGroup,.queryBuilder-justified .shiftActions+.ruleGroup-lock,.queryBuilder-justified .shiftActions+.ruleGroup-remove,.queryBuilder-justified .shiftActions+.rule-cloneRule,.queryBuilder-justified .shiftActions+.rule-lock,.queryBuilder-justified .shiftActions+.rule-remove,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-addRule,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-addGroup,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-cloneGroup,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-lock,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-remove,.queryBuilder-justified .queryBuilder-dragHandle+.rule-cloneRule,.queryBuilder-justified .queryBuilder-dragHandle+.rule-lock,.queryBuilder-justified .queryBuilder-dragHandle+.rule-remove,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified .ruleGroup-header+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-header+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-header+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-header+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-header+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-header+.rule-cloneRule,.queryBuilder-justified .ruleGroup-header+.rule-lock,.queryBuilder-justified .ruleGroup-header+.rule-remove,.queryBuilder-justified .rule-operators+.ruleGroup-addRule,.queryBuilder-justified .rule-operators+.ruleGroup-addGroup,.queryBuilder-justified .rule-operators+.ruleGroup-cloneGroup,.queryBuilder-justified .rule-operators+.ruleGroup-lock,.queryBuilder-justified .rule-operators+.ruleGroup-remove,.queryBuilder-justified .rule-operators+.rule-cloneRule,.queryBuilder-justified .rule-operators+.rule-lock,.queryBuilder-justified .rule-operators+.rule-remove,.queryBuilder-justified .rule-value+.ruleGroup-addRule,.queryBuilder-justified .rule-value+.ruleGroup-addGroup,.queryBuilder-justified .rule-value+.ruleGroup-cloneGroup,.queryBuilder-justified .rule-value+.ruleGroup-lock,.queryBuilder-justified .rule-value+.ruleGroup-remove,.queryBuilder-justified .rule-value+.rule-cloneRule,.queryBuilder-justified .rule-value+.rule-lock,.queryBuilder-justified .rule-value+.rule-remove,.queryBuilder-justified .control+.ruleGroup-addRule,.queryBuilder-justified .control+.ruleGroup-addGroup,.queryBuilder-justified .control+.ruleGroup-cloneGroup,.queryBuilder-justified .control+.ruleGroup-lock,.queryBuilder-justified .control+.ruleGroup-remove,.queryBuilder-justified .control+.rule-cloneRule,.queryBuilder-justified .control+.rule-lock,.queryBuilder-justified .control+.rule-remove,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-addRule,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-addGroup,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-cloneGroup,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-lock,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-remove,.queryBuilder-justified .chakra-select__wrapper+.rule-cloneRule,.queryBuilder-justified .chakra-select__wrapper+.rule-lock,.queryBuilder-justified .chakra-select__wrapper+.rule-remove,.queryBuilder-justified input[type=hidden]+.ruleGroup-addRule,.queryBuilder-justified input[type=hidden]+.ruleGroup-addGroup,.queryBuilder-justified input[type=hidden]+.ruleGroup-cloneGroup,.queryBuilder-justified input[type=hidden]+.ruleGroup-lock,.queryBuilder-justified input[type=hidden]+.ruleGroup-remove,.queryBuilder-justified input[type=hidden]+.rule-cloneRule,.queryBuilder-justified input[type=hidden]+.rule-lock,.queryBuilder-justified input[type=hidden]+.rule-remove{margin-left:auto !important}.queryBuilder-justified .ruleGroup-addRule:first-child,.queryBuilder-justified .ruleGroup-addGroup:first-child{margin-left:auto !important}/*# sourceMappingURL=query-builder-layout.css.map */
|
|
1
|
+
:root{--rqb-spacing: 0.5rem;--rqb-border-width: 1px;--rqb-branch-indent: var(--rqb-spacing);--rqb-branch-width: var(--rqb-border-width);--rqb-base-color: #004bb8;--rqb-background-color: color-mix(in srgb, transparent, #004bb8 20%);--rqb-border-color: #8081a2;--rqb-border-style: solid;--rqb-border-radius: 0.25rem;--rqb-dnd-drop-indicator-color: rebeccapurple;--rqb-dnd-drop-indicator-style: dashed;--rqb-dnd-drop-indicator-width: 2px;--rqb-dnd-drop-indicator-copy-color: #693;--rqb-dnd-drop-indicator-copy-style: dashed;--rqb-dnd-drop-indicator-copy-width: 2px;--rqb-dnd-drop-indicator-group-color: #369;--rqb-dnd-drop-indicator-group-style: dashed;--rqb-dnd-drop-indicator-group-width: 2px;--rqb-dnd-drop-not-allowed-cursor: not-allowed;--rqb-branch-color: var(--rqb-border-color);--rqb-branch-radius: var(--rqb-border-radius);--rqb-branch-style: var(--rqb-border-style)}.ruleGroup{display:flex;flex-direction:column;gap:var(--rqb-spacing);padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .ruleGroup-body{display:flex;flex-direction:column;gap:var(--rqb-spacing)}.ruleGroup .ruleGroup-body:empty{display:none}.ruleGroup .ruleGroup-header,.ruleGroup .rule{display:flex;gap:var(--rqb-spacing);align-items:center}.ruleGroup .rule .rule-value:has(.rule-value-list-item){display:flex;gap:var(--rqb-spacing);align-items:baseline}.ruleGroup .rule.rule-hasSubQuery{flex-wrap:wrap;padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .rule.rule-hasSubQuery .ruleGroup-body{flex-basis:100%}.ruleGroup .betweenRules{display:flex}.ruleGroup .shiftActions{display:flex;flex-direction:column}.ruleGroup .shiftActions>*{padding:0}.dndOver.rule,.dndOver.ruleGroup-header{padding-bottom:var(--rqb-spacing)}.dndOver.betweenRules{padding-top:var(--rqb-spacing)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(.ruleGroup-header.dndOver){padding:var(--rqb-spacing)}.queryBuilder-branches:dir(ltr) .ruleGroup-body{margin-left:calc(2*var(--rqb-branch-indent))}.queryBuilder-branches:dir(ltr) .rule,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup{position:relative}.queryBuilder-branches:dir(ltr) .rule::before,.queryBuilder-branches:dir(ltr) .rule::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute}.queryBuilder-branches:dir(ltr) .rule::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before{top:calc(-1*var(--rqb-spacing));height:calc(50% + var(--rqb-spacing));border-width:0 0 var(--rqb-branch-width) var(--rqb-branch-width)}.queryBuilder-branches:dir(ltr) .rule::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{top:50%;height:50%;border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-branches:dir(ltr) .rule:last-child::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup:last-child::after{display:none}.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::before,.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width) + var(--rqb-border-width)))}.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before{top:calc(-1*(var(--rqb-spacing) + var(--rqb-border-width)));height:calc(50% + var(--rqb-spacing) + var(--rqb-border-width))}.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{height:calc(50% + var(--rqb-border-width))}.queryBuilder-branches:dir(ltr) .betweenRules{position:relative}.queryBuilder-branches:dir(ltr) .betweenRules::before{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute;top:calc(-1*var(--rqb-spacing));height:calc(100% + var(--rqb-spacing));border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-branches:dir(rtl) .ruleGroup-body{margin-right:calc(2*var(--rqb-branch-indent))}.queryBuilder-branches:dir(rtl) .rule,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup{position:relative}.queryBuilder-branches:dir(rtl) .rule::before,.queryBuilder-branches:dir(rtl) .rule::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{content:"";width:var(--rqb-branch-indent);right:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute}.queryBuilder-branches:dir(rtl) .rule::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{top:calc(-1*var(--rqb-spacing));height:calc(50% + var(--rqb-spacing));border-width:0 var(--rqb-branch-width) var(--rqb-branch-width) 0}.queryBuilder-branches:dir(rtl) .rule::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before{top:50%;height:50%;border-width:0 var(--rqb-branch-width) 0 0}.queryBuilder-branches:dir(rtl) .rule:last-child::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup:last-child::before{display:none}.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::before,.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{right:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width) + var(--rqb-border-width)))}.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{top:calc(-1*(var(--rqb-spacing) + var(--rqb-border-width)));height:calc(50% + var(--rqb-spacing) + var(--rqb-border-width))}.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before{height:calc(50% + var(--rqb-border-width))}.queryBuilder-branches:dir(rtl) .betweenRules{position:relative}.queryBuilder-branches:dir(rtl) .betweenRules::after{content:"";width:var(--rqb-branch-indent);right:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute;top:calc(-1*var(--rqb-spacing));height:calc(100% + var(--rqb-spacing));border-width:0 var(--rqb-branch-width) 0 0}.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.rule-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .shiftActions+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .shiftActions+.rule-lock,.queryBuilder-justified:dir(ltr) .shiftActions+.rule-remove,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.rule-lock,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.rule-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.rule-remove,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .rule-operators+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .rule-operators+.rule-lock,.queryBuilder-justified:dir(ltr) .rule-operators+.rule-remove,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .rule-value+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .rule-value+.rule-lock,.queryBuilder-justified:dir(ltr) .rule-value+.rule-remove,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .control+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .control+.rule-lock,.queryBuilder-justified:dir(ltr) .control+.rule-remove,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.rule-lock,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.rule-remove,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) input[type=hidden]+.rule-cloneRule,.queryBuilder-justified:dir(ltr) input[type=hidden]+.rule-lock,.queryBuilder-justified:dir(ltr) input[type=hidden]+.rule-remove{margin-left:auto !important}.queryBuilder-justified:dir(ltr) .ruleGroup-addRule:first-child,.queryBuilder-justified:dir(ltr) .ruleGroup-addGroup:first-child{margin-left:auto !important}.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.rule-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .shiftActions+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .shiftActions+.rule-lock,.queryBuilder-justified:dir(rtl) .shiftActions+.rule-remove,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.rule-lock,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.rule-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.rule-remove,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .rule-operators+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .rule-operators+.rule-lock,.queryBuilder-justified:dir(rtl) .rule-operators+.rule-remove,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .rule-value+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .rule-value+.rule-lock,.queryBuilder-justified:dir(rtl) .rule-value+.rule-remove,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .control+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .control+.rule-lock,.queryBuilder-justified:dir(rtl) .control+.rule-remove,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.rule-lock,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.rule-remove,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) input[type=hidden]+.rule-cloneRule,.queryBuilder-justified:dir(rtl) input[type=hidden]+.rule-lock,.queryBuilder-justified:dir(rtl) input[type=hidden]+.rule-remove{margin-right:auto !important}.queryBuilder-justified:dir(rtl) .ruleGroup-addRule:first-child,.queryBuilder-justified:dir(rtl) .ruleGroup-addGroup:first-child{margin-right:auto !important}/*# sourceMappingURL=query-builder-layout.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["styles/_root.scss","styles/_layout.scss"],"names":[],"mappings":"AA4BA,MAEE,sBACA,wBAIA,wCACA,4CAIA,0BACA,qEACA,4BACA,0BACA,6BAIA,8CACA,uCACA,oCACA,0CACA,4CACA,yCACA,2CACA,6CACA,0CACA,+CAIA,4CACA,8CACA,4CCrDF,WACE,aACA,sBACA,uBACA,2BACA,qCAEA,2BACE,aACA,sBACA,uBAEA,iCACE,aAIJ,8CAEE,aACA,uBACA,mBAIA,wDACE,aACA,uBACA,qBAGF,kCACE,eACA,2BACA,qCAEA,kDACE,gBAKN,yBACE,aAGF,yBACE,aACA,sBAEA,2BACE,UAQJ,wCAEE,kCAEF,sBACE,+BAIF,0EAEE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["styles/_root.scss","styles/_layout.scss"],"names":[],"mappings":"AA4BA,MAEE,sBACA,wBAIA,wCACA,4CAIA,0BACA,qEACA,4BACA,0BACA,6BAIA,8CACA,uCACA,oCACA,0CACA,4CACA,yCACA,2CACA,6CACA,0CACA,+CAIA,4CACA,8CACA,4CCrDF,WACE,aACA,sBACA,uBACA,2BACA,qCAEA,2BACE,aACA,sBACA,uBAEA,iCACE,aAIJ,8CAEE,aACA,uBACA,mBAIA,wDACE,aACA,uBACA,qBAGF,kCACE,eACA,2BACA,qCAEA,kDACE,gBAKN,yBACE,aAGF,yBACE,aACA,sBAEA,2BACE,UAQJ,wCAEE,kCAEF,sBACE,+BAIF,0EAEE,2BAWF,gDACE,6CAGF,4FAEE,kBAEA,sNAEE,WACA,+BACA,mEAGA,gBACA,kBAGF,4GACE,gCACA,sCAOE,iEAOJ,0GACE,QACA,WAIE,2CAIJ,gIACE,aAMF,8OAEE,6FASF,wHACE,4DACA,gEAGF,sHACE,2CAIJ,8CACE,kBAEA,sDACE,WACA,+BACA,mEAGA,gBACA,kBACA,gCACA,uCAIE,2CAzFN,gDACE,8CAGF,4FAEE,kBAEA,sNAEE,WACA,+BACA,oEAGA,gBACA,kBAGF,0GACE,gCACA,sCAEE,iEAYJ,4GACE,QACA,WAEE,2CAMJ,kIACE,aAMF,8OAEE,8FASF,sHACE,4DACA,gEAGF,wHACE,2CAIJ,8CACE,kBAEA,qDACE,WACA,+BACA,oEAGA,gBACA,kBACA,gCACA,uCAEE,2CAqCJ,q3LAQE,4BAMF,iIACE,4BAfF,q3LAQE,6BAMF,iIACE","file":"query-builder-layout.css"}
|
package/dist/query-builder.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--rqb-spacing: 0.5rem;--rqb-border-width: 1px;--rqb-branch-indent: var(--rqb-spacing);--rqb-branch-width: var(--rqb-border-width);--rqb-base-color: #004bb8;--rqb-background-color: color-mix(in srgb, transparent, #004bb8 20%);--rqb-border-color: #8081a2;--rqb-border-style: solid;--rqb-border-radius: 0.25rem;--rqb-dnd-drop-indicator-color: rebeccapurple;--rqb-dnd-drop-indicator-style: dashed;--rqb-dnd-drop-indicator-width: 2px;--rqb-dnd-drop-indicator-copy-color: #693;--rqb-dnd-drop-indicator-copy-style: dashed;--rqb-dnd-drop-indicator-copy-width: 2px;--rqb-dnd-drop-indicator-group-color: #369;--rqb-dnd-drop-indicator-group-style: dashed;--rqb-dnd-drop-indicator-group-width: 2px;--rqb-dnd-drop-not-allowed-cursor: not-allowed;--rqb-branch-color: var(--rqb-border-color);--rqb-branch-radius: var(--rqb-border-radius);--rqb-branch-style: var(--rqb-border-style)}.ruleGroup{display:flex;flex-direction:column;gap:var(--rqb-spacing);padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .ruleGroup-body{display:flex;flex-direction:column;gap:var(--rqb-spacing)}.ruleGroup .ruleGroup-body:empty{display:none}.ruleGroup .ruleGroup-header,.ruleGroup .rule{display:flex;gap:var(--rqb-spacing);align-items:center}.ruleGroup .rule .rule-value:has(.rule-value-list-item){display:flex;gap:var(--rqb-spacing);align-items:baseline}.ruleGroup .rule.rule-hasSubQuery{flex-wrap:wrap;padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .rule.rule-hasSubQuery .ruleGroup-body{flex-basis:100%}.ruleGroup .betweenRules{display:flex}.ruleGroup .shiftActions{display:flex;flex-direction:column}.ruleGroup .shiftActions>*{padding:0}.dndOver.rule,.dndOver.ruleGroup-header{padding-bottom:var(--rqb-spacing)}.dndOver.betweenRules{padding-top:var(--rqb-spacing)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(.ruleGroup-header.dndOver){padding:var(--rqb-spacing)}.queryBuilder-branches .ruleGroup-body{margin-left:calc(2*var(--rqb-branch-indent))}.queryBuilder-branches .rule,.queryBuilder-branches .ruleGroup .ruleGroup{position:relative}.queryBuilder-branches .rule::before,.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute}.queryBuilder-branches .rule::before,.queryBuilder-branches .ruleGroup .ruleGroup::before{top:calc(-1*var(--rqb-spacing));height:calc(50% + var(--rqb-spacing));border-width:0 0 var(--rqb-branch-width) var(--rqb-branch-width)}.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::after{top:50%;height:50%;border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-branches .rule:last-child::after,.queryBuilder-branches .ruleGroup .ruleGroup:last-child::after{display:none}.queryBuilder-branches .rule-hasSubQuery::before,.queryBuilder-branches .rule-hasSubQuery::after,.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width) + var(--rqb-border-width)))}.queryBuilder-branches .rule-hasSubQuery::before,.queryBuilder-branches .ruleGroup .ruleGroup::before{top:calc(-1*(var(--rqb-spacing) + var(--rqb-border-width)));height:calc(50% + var(--rqb-spacing) + var(--rqb-border-width))}.queryBuilder-branches .rule-hasSubQuery::after,.queryBuilder-branches .ruleGroup .ruleGroup::after{height:calc(50% + var(--rqb-border-width))}.queryBuilder-branches .betweenRules{position:relative}.queryBuilder-branches .betweenRules::before{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute;top:calc(-1*var(--rqb-spacing));height:calc(100% + var(--rqb-spacing));border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-combinators+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-combinators+.rule-cloneRule,.queryBuilder-justified .ruleGroup-combinators+.rule-lock,.queryBuilder-justified .ruleGroup-combinators+.rule-remove,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified .shiftActions+.ruleGroup-addRule,.queryBuilder-justified .shiftActions+.ruleGroup-addGroup,.queryBuilder-justified .shiftActions+.ruleGroup-cloneGroup,.queryBuilder-justified .shiftActions+.ruleGroup-lock,.queryBuilder-justified .shiftActions+.ruleGroup-remove,.queryBuilder-justified .shiftActions+.rule-cloneRule,.queryBuilder-justified .shiftActions+.rule-lock,.queryBuilder-justified .shiftActions+.rule-remove,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-addRule,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-addGroup,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-cloneGroup,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-lock,.queryBuilder-justified .queryBuilder-dragHandle+.ruleGroup-remove,.queryBuilder-justified .queryBuilder-dragHandle+.rule-cloneRule,.queryBuilder-justified .queryBuilder-dragHandle+.rule-lock,.queryBuilder-justified .queryBuilder-dragHandle+.rule-remove,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified .ruleGroup-header+.ruleGroup-addRule,.queryBuilder-justified .ruleGroup-header+.ruleGroup-addGroup,.queryBuilder-justified .ruleGroup-header+.ruleGroup-cloneGroup,.queryBuilder-justified .ruleGroup-header+.ruleGroup-lock,.queryBuilder-justified .ruleGroup-header+.ruleGroup-remove,.queryBuilder-justified .ruleGroup-header+.rule-cloneRule,.queryBuilder-justified .ruleGroup-header+.rule-lock,.queryBuilder-justified .ruleGroup-header+.rule-remove,.queryBuilder-justified .rule-operators+.ruleGroup-addRule,.queryBuilder-justified .rule-operators+.ruleGroup-addGroup,.queryBuilder-justified .rule-operators+.ruleGroup-cloneGroup,.queryBuilder-justified .rule-operators+.ruleGroup-lock,.queryBuilder-justified .rule-operators+.ruleGroup-remove,.queryBuilder-justified .rule-operators+.rule-cloneRule,.queryBuilder-justified .rule-operators+.rule-lock,.queryBuilder-justified .rule-operators+.rule-remove,.queryBuilder-justified .rule-value+.ruleGroup-addRule,.queryBuilder-justified .rule-value+.ruleGroup-addGroup,.queryBuilder-justified .rule-value+.ruleGroup-cloneGroup,.queryBuilder-justified .rule-value+.ruleGroup-lock,.queryBuilder-justified .rule-value+.ruleGroup-remove,.queryBuilder-justified .rule-value+.rule-cloneRule,.queryBuilder-justified .rule-value+.rule-lock,.queryBuilder-justified .rule-value+.rule-remove,.queryBuilder-justified .control+.ruleGroup-addRule,.queryBuilder-justified .control+.ruleGroup-addGroup,.queryBuilder-justified .control+.ruleGroup-cloneGroup,.queryBuilder-justified .control+.ruleGroup-lock,.queryBuilder-justified .control+.ruleGroup-remove,.queryBuilder-justified .control+.rule-cloneRule,.queryBuilder-justified .control+.rule-lock,.queryBuilder-justified .control+.rule-remove,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-addRule,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-addGroup,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-cloneGroup,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-lock,.queryBuilder-justified .chakra-select__wrapper+.ruleGroup-remove,.queryBuilder-justified .chakra-select__wrapper+.rule-cloneRule,.queryBuilder-justified .chakra-select__wrapper+.rule-lock,.queryBuilder-justified .chakra-select__wrapper+.rule-remove,.queryBuilder-justified input[type=hidden]+.ruleGroup-addRule,.queryBuilder-justified input[type=hidden]+.ruleGroup-addGroup,.queryBuilder-justified input[type=hidden]+.ruleGroup-cloneGroup,.queryBuilder-justified input[type=hidden]+.ruleGroup-lock,.queryBuilder-justified input[type=hidden]+.ruleGroup-remove,.queryBuilder-justified input[type=hidden]+.rule-cloneRule,.queryBuilder-justified input[type=hidden]+.rule-lock,.queryBuilder-justified input[type=hidden]+.rule-remove{margin-left:auto !important}.queryBuilder-justified .ruleGroup-addRule:first-child,.queryBuilder-justified .ruleGroup-addGroup:first-child{margin-left:auto !important}.ruleGroup,.rule-hasSubQuery{border-color:var(--rqb-border-color);border-style:var(--rqb-border-style);border-radius:var(--rqb-border-radius);background:var(--rqb-background-color)}.ruleGroup .shiftActions>*,.rule-hasSubQuery .shiftActions>*{background-color:rgba(0,0,0,0);border:none;cursor:pointer}.dndOver.rule,.dndOver.ruleGroup-header:not(.dndGroup .ruleGroup-header){border-bottom-width:var(--rqb-dnd-drop-indicator-width);border-bottom-style:var(--rqb-dnd-drop-indicator-style);border-bottom-color:var(--rqb-dnd-drop-indicator-color)}.dndOver.rule.dndCopy,.dndOver.ruleGroup-header:not(.dndGroup .ruleGroup-header).dndCopy{border-bottom-width:var(--rqb-dnd-drop-indicator-copy-width);border-bottom-style:var(--rqb-dnd-drop-indicator-copy-style);border-bottom-color:var(--rqb-dnd-drop-indicator-copy-color)}.dndOver.betweenRules{border-top-width:var(--rqb-dnd-drop-indicator-width);border-top-style:var(--rqb-dnd-drop-indicator-style);border-top-color:var(--rqb-dnd-drop-indicator-color)}.dndOver.betweenRules.dndCopy{border-top-width:var(--rqb-dnd-drop-indicator-copy-width);border-top-style:var(--rqb-dnd-drop-indicator-copy-style);border-top-color:var(--rqb-dnd-drop-indicator-copy-color)}.dndDropNotAllowed{cursor:var(--rqb-dnd-drop-not-allowed-cursor)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(>.ruleGroup-header.dndOver){border-width:var(--rqb-dnd-drop-indicator-group-width);border-style:var(--rqb-dnd-drop-indicator-group-style);border-color:var(--rqb-dnd-drop-indicator-group-color);border-radius:var(--rqb-border-radius)}.dndGroup.rule.dndOver.dndCopy,.dndGroup.ruleGroup:has(>.ruleGroup-header.dndOver).dndCopy{border-color:var(--rqb-dnd-drop-indicator-copy-color);border-width:var(--rqb-dnd-drop-indicator-copy-width);border-style:var(--rqb-dnd-drop-indicator-copy-style)}.ruleGroup.dndDragging,.rule.dndDragging{opacity:.5}.ruleGroup .queryBuilder-dragHandle,.rule .queryBuilder-dragHandle{cursor:move}.queryBuilder-branches .rule::before,.queryBuilder-branches .rule::after,.queryBuilder-branches .ruleGroup .ruleGroup::before,.queryBuilder-branches .ruleGroup .ruleGroup::after{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}.queryBuilder-branches .rule:last-child::before,.queryBuilder-branches .ruleGroup .ruleGroup:last-child::before{border-bottom-left-radius:var(--rqb-branch-radius)}.queryBuilder-branches .betweenRules{position:relative}.queryBuilder-branches .betweenRules::before{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}/*# sourceMappingURL=query-builder.css.map */
|
|
1
|
+
:root{--rqb-spacing: 0.5rem;--rqb-border-width: 1px;--rqb-branch-indent: var(--rqb-spacing);--rqb-branch-width: var(--rqb-border-width);--rqb-base-color: #004bb8;--rqb-background-color: color-mix(in srgb, transparent, #004bb8 20%);--rqb-border-color: #8081a2;--rqb-border-style: solid;--rqb-border-radius: 0.25rem;--rqb-dnd-drop-indicator-color: rebeccapurple;--rqb-dnd-drop-indicator-style: dashed;--rqb-dnd-drop-indicator-width: 2px;--rqb-dnd-drop-indicator-copy-color: #693;--rqb-dnd-drop-indicator-copy-style: dashed;--rqb-dnd-drop-indicator-copy-width: 2px;--rqb-dnd-drop-indicator-group-color: #369;--rqb-dnd-drop-indicator-group-style: dashed;--rqb-dnd-drop-indicator-group-width: 2px;--rqb-dnd-drop-not-allowed-cursor: not-allowed;--rqb-branch-color: var(--rqb-border-color);--rqb-branch-radius: var(--rqb-border-radius);--rqb-branch-style: var(--rqb-border-style)}.ruleGroup{display:flex;flex-direction:column;gap:var(--rqb-spacing);padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .ruleGroup-body{display:flex;flex-direction:column;gap:var(--rqb-spacing)}.ruleGroup .ruleGroup-body:empty{display:none}.ruleGroup .ruleGroup-header,.ruleGroup .rule{display:flex;gap:var(--rqb-spacing);align-items:center}.ruleGroup .rule .rule-value:has(.rule-value-list-item){display:flex;gap:var(--rqb-spacing);align-items:baseline}.ruleGroup .rule.rule-hasSubQuery{flex-wrap:wrap;padding:var(--rqb-spacing);border-width:var(--rqb-border-width)}.ruleGroup .rule.rule-hasSubQuery .ruleGroup-body{flex-basis:100%}.ruleGroup .betweenRules{display:flex}.ruleGroup .shiftActions{display:flex;flex-direction:column}.ruleGroup .shiftActions>*{padding:0}.dndOver.rule,.dndOver.ruleGroup-header{padding-bottom:var(--rqb-spacing)}.dndOver.betweenRules{padding-top:var(--rqb-spacing)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(.ruleGroup-header.dndOver){padding:var(--rqb-spacing)}.queryBuilder-branches:dir(ltr) .ruleGroup-body{margin-left:calc(2*var(--rqb-branch-indent))}.queryBuilder-branches:dir(ltr) .rule,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup{position:relative}.queryBuilder-branches:dir(ltr) .rule::before,.queryBuilder-branches:dir(ltr) .rule::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute}.queryBuilder-branches:dir(ltr) .rule::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before{top:calc(-1*var(--rqb-spacing));height:calc(50% + var(--rqb-spacing));border-width:0 0 var(--rqb-branch-width) var(--rqb-branch-width)}.queryBuilder-branches:dir(ltr) .rule::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{top:50%;height:50%;border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-branches:dir(ltr) .rule:last-child::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup:last-child::after{display:none}.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::before,.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width) + var(--rqb-border-width)))}.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before{top:calc(-1*(var(--rqb-spacing) + var(--rqb-border-width)));height:calc(50% + var(--rqb-spacing) + var(--rqb-border-width))}.queryBuilder-branches:dir(ltr) .rule-hasSubQuery::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{height:calc(50% + var(--rqb-border-width))}.queryBuilder-branches:dir(ltr) .betweenRules{position:relative}.queryBuilder-branches:dir(ltr) .betweenRules::before{content:"";width:var(--rqb-branch-indent);left:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute;top:calc(-1*var(--rqb-spacing));height:calc(100% + var(--rqb-spacing));border-width:0 0 0 var(--rqb-branch-width)}.queryBuilder-branches:dir(rtl) .ruleGroup-body{margin-right:calc(2*var(--rqb-branch-indent))}.queryBuilder-branches:dir(rtl) .rule,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup{position:relative}.queryBuilder-branches:dir(rtl) .rule::before,.queryBuilder-branches:dir(rtl) .rule::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{content:"";width:var(--rqb-branch-indent);right:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute}.queryBuilder-branches:dir(rtl) .rule::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{top:calc(-1*var(--rqb-spacing));height:calc(50% + var(--rqb-spacing));border-width:0 var(--rqb-branch-width) var(--rqb-branch-width) 0}.queryBuilder-branches:dir(rtl) .rule::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before{top:50%;height:50%;border-width:0 var(--rqb-branch-width) 0 0}.queryBuilder-branches:dir(rtl) .rule:last-child::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup:last-child::before{display:none}.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::before,.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{right:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width) + var(--rqb-border-width)))}.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{top:calc(-1*(var(--rqb-spacing) + var(--rqb-border-width)));height:calc(50% + var(--rqb-spacing) + var(--rqb-border-width))}.queryBuilder-branches:dir(rtl) .rule-hasSubQuery::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before{height:calc(50% + var(--rqb-border-width))}.queryBuilder-branches:dir(rtl) .betweenRules{position:relative}.queryBuilder-branches:dir(rtl) .betweenRules::after{content:"";width:var(--rqb-branch-indent);right:calc(-1*(var(--rqb-branch-indent) + var(--rqb-branch-width)));border-radius:0;position:absolute;top:calc(-1*var(--rqb-spacing));height:calc(100% + var(--rqb-spacing));border-width:0 var(--rqb-branch-width) 0 0}.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-combinators+.rule-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .shiftActions+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .shiftActions+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .shiftActions+.rule-lock,.queryBuilder-justified:dir(ltr) .shiftActions+.rule-remove,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.rule-lock,.queryBuilder-justified:dir(ltr) .queryBuilder-dragHandle+.rule-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.rule-lock,.queryBuilder-justified:dir(ltr) .ruleGroup-header+.rule-remove,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .rule-operators+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .rule-operators+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .rule-operators+.rule-lock,.queryBuilder-justified:dir(ltr) .rule-operators+.rule-remove,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .rule-value+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .rule-value+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .rule-value+.rule-lock,.queryBuilder-justified:dir(ltr) .rule-value+.rule-remove,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .control+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .control+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .control+.rule-lock,.queryBuilder-justified:dir(ltr) .control+.rule-remove,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.rule-cloneRule,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.rule-lock,.queryBuilder-justified:dir(ltr) .chakra-select__wrapper+.rule-remove,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-addRule,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-addGroup,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-lock,.queryBuilder-justified:dir(ltr) input[type=hidden]+.ruleGroup-remove,.queryBuilder-justified:dir(ltr) input[type=hidden]+.rule-cloneRule,.queryBuilder-justified:dir(ltr) input[type=hidden]+.rule-lock,.queryBuilder-justified:dir(ltr) input[type=hidden]+.rule-remove{margin-left:auto !important}.queryBuilder-justified:dir(ltr) .ruleGroup-addRule:first-child,.queryBuilder-justified:dir(ltr) .ruleGroup-addGroup:first-child{margin-left:auto !important}.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-combinators+.rule-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .shiftActions+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .shiftActions+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .shiftActions+.rule-lock,.queryBuilder-justified:dir(rtl) .shiftActions+.rule-remove,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.rule-lock,.queryBuilder-justified:dir(rtl) .queryBuilder-dragHandle+.rule-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-notToggle+.rule-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.rule-lock,.queryBuilder-justified:dir(rtl) .ruleGroup-header+.rule-remove,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .rule-operators+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .rule-operators+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .rule-operators+.rule-lock,.queryBuilder-justified:dir(rtl) .rule-operators+.rule-remove,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .rule-value+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .rule-value+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .rule-value+.rule-lock,.queryBuilder-justified:dir(rtl) .rule-value+.rule-remove,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .control+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .control+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .control+.rule-lock,.queryBuilder-justified:dir(rtl) .control+.rule-remove,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.rule-cloneRule,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.rule-lock,.queryBuilder-justified:dir(rtl) .chakra-select__wrapper+.rule-remove,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-addRule,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-addGroup,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-cloneGroup,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-lock,.queryBuilder-justified:dir(rtl) input[type=hidden]+.ruleGroup-remove,.queryBuilder-justified:dir(rtl) input[type=hidden]+.rule-cloneRule,.queryBuilder-justified:dir(rtl) input[type=hidden]+.rule-lock,.queryBuilder-justified:dir(rtl) input[type=hidden]+.rule-remove{margin-right:auto !important}.queryBuilder-justified:dir(rtl) .ruleGroup-addRule:first-child,.queryBuilder-justified:dir(rtl) .ruleGroup-addGroup:first-child{margin-right:auto !important}.ruleGroup,.rule-hasSubQuery{border-color:var(--rqb-border-color);border-style:var(--rqb-border-style);border-radius:var(--rqb-border-radius);background:var(--rqb-background-color)}.ruleGroup .shiftActions>*,.rule-hasSubQuery .shiftActions>*{background-color:rgba(0,0,0,0);border:none;cursor:pointer}.dndOver.rule,.dndOver.ruleGroup-header:not(.dndGroup .ruleGroup-header){border-bottom-width:var(--rqb-dnd-drop-indicator-width);border-bottom-style:var(--rqb-dnd-drop-indicator-style);border-bottom-color:var(--rqb-dnd-drop-indicator-color)}.dndOver.rule.dndCopy,.dndOver.ruleGroup-header:not(.dndGroup .ruleGroup-header).dndCopy{border-bottom-width:var(--rqb-dnd-drop-indicator-copy-width);border-bottom-style:var(--rqb-dnd-drop-indicator-copy-style);border-bottom-color:var(--rqb-dnd-drop-indicator-copy-color)}.dndOver.betweenRules{border-top-width:var(--rqb-dnd-drop-indicator-width);border-top-style:var(--rqb-dnd-drop-indicator-style);border-top-color:var(--rqb-dnd-drop-indicator-color)}.dndOver.betweenRules.dndCopy{border-top-width:var(--rqb-dnd-drop-indicator-copy-width);border-top-style:var(--rqb-dnd-drop-indicator-copy-style);border-top-color:var(--rqb-dnd-drop-indicator-copy-color)}.dndDropNotAllowed{cursor:var(--rqb-dnd-drop-not-allowed-cursor)}.dndGroup.rule.dndOver,.dndGroup.ruleGroup:has(>.ruleGroup-header.dndOver){border-width:var(--rqb-dnd-drop-indicator-group-width);border-style:var(--rqb-dnd-drop-indicator-group-style);border-color:var(--rqb-dnd-drop-indicator-group-color);border-radius:var(--rqb-border-radius)}.dndGroup.rule.dndOver.dndCopy,.dndGroup.ruleGroup:has(>.ruleGroup-header.dndOver).dndCopy{border-color:var(--rqb-dnd-drop-indicator-copy-color);border-width:var(--rqb-dnd-drop-indicator-copy-width);border-style:var(--rqb-dnd-drop-indicator-copy-style)}.ruleGroup.dndDragging,.rule.dndDragging{opacity:.5}.ruleGroup .queryBuilder-dragHandle,.rule .queryBuilder-dragHandle{cursor:move}.ruleGroup.queryBuilder-disabled .queryBuilder-dragHandle,.rule.queryBuilder-disabled .queryBuilder-dragHandle{cursor:not-allowed;opacity:.5}.queryBuilder-branches:dir(ltr) .rule::before,.queryBuilder-branches:dir(ltr) .rule::after,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup::after{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}.queryBuilder-branches:dir(ltr) .rule:last-child::before,.queryBuilder-branches:dir(ltr) .ruleGroup .ruleGroup:last-child::before{border-bottom-left-radius:var(--rqb-branch-radius)}.queryBuilder-branches:dir(ltr) .betweenRules{position:relative}.queryBuilder-branches:dir(ltr) .betweenRules::before{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}.queryBuilder-branches:dir(rtl) .rule::before,.queryBuilder-branches:dir(rtl) .rule::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::before,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup::after{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}.queryBuilder-branches:dir(rtl) .rule:last-child::after,.queryBuilder-branches:dir(rtl) .ruleGroup .ruleGroup:last-child::after{border-bottom-right-radius:var(--rqb-branch-radius)}.queryBuilder-branches:dir(rtl) .betweenRules{position:relative}.queryBuilder-branches:dir(rtl) .betweenRules::after{border-color:var(--rqb-branch-color);border-style:var(--rqb-branch-style)}/*# sourceMappingURL=query-builder.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["styles/_root.scss","styles/_layout.scss","styles/_main.scss"],"names":[],"mappings":"AA4BA,MAEE,sBACA,wBAIA,wCACA,4CAIA,0BACA,qEACA,4BACA,0BACA,6BAIA,8CACA,uCACA,oCACA,0CACA,4CACA,yCACA,2CACA,6CACA,0CACA,+CAIA,4CACA,8CACA,4CCrDF,WACE,aACA,sBACA,uBACA,2BACA,qCAEA,2BACE,aACA,sBACA,uBAEA,iCACE,aAIJ,8CAEE,aACA,uBACA,mBAIA,wDACE,aACA,uBACA,qBAGF,kCACE,eACA,2BACA,qCAEA,kDACE,gBAKN,yBACE,aAGF,yBACE,aACA,sBAEA,2BACE,UAQJ,wCAEE,kCAEF,sBACE,+BAIF,0EAEE,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["styles/_root.scss","styles/_layout.scss","styles/_main.scss"],"names":[],"mappings":"AA4BA,MAEE,sBACA,wBAIA,wCACA,4CAIA,0BACA,qEACA,4BACA,0BACA,6BAIA,8CACA,uCACA,oCACA,0CACA,4CACA,yCACA,2CACA,6CACA,0CACA,+CAIA,4CACA,8CACA,4CCrDF,WACE,aACA,sBACA,uBACA,2BACA,qCAEA,2BACE,aACA,sBACA,uBAEA,iCACE,aAIJ,8CAEE,aACA,uBACA,mBAIA,wDACE,aACA,uBACA,qBAGF,kCACE,eACA,2BACA,qCAEA,kDACE,gBAKN,yBACE,aAGF,yBACE,aACA,sBAEA,2BACE,UAQJ,wCAEE,kCAEF,sBACE,+BAIF,0EAEE,2BAWF,gDACE,6CAGF,4FAEE,kBAEA,sNAEE,WACA,+BACA,mEAGA,gBACA,kBAGF,4GACE,gCACA,sCAOE,iEAOJ,0GACE,QACA,WAIE,2CAIJ,gIACE,aAMF,8OAEE,6FASF,wHACE,4DACA,gEAGF,sHACE,2CAIJ,8CACE,kBAEA,sDACE,WACA,+BACA,mEAGA,gBACA,kBACA,gCACA,uCAIE,2CAzFN,gDACE,8CAGF,4FAEE,kBAEA,sNAEE,WACA,+BACA,oEAGA,gBACA,kBAGF,0GACE,gCACA,sCAEE,iEAYJ,4GACE,QACA,WAEE,2CAMJ,kIACE,aAMF,8OAEE,8FASF,sHACE,4DACA,gEAGF,wHACE,2CAIJ,8CACE,kBAEA,qDACE,WACA,+BACA,oEAGA,gBACA,kBACA,gCACA,uCAEE,2CAqCJ,q3LAQE,4BAMF,iIACE,4BAfF,q3LAQE,6BAMF,iIACE,6BC5NN,6BAEE,qCACA,qCACA,uCACA,uCAGE,6DACE,+BACA,YACA,eAQJ,yEAEE,wDACA,wDACA,wDAEA,yFACE,6DACA,6DACA,6DAIJ,sBACE,qDACA,qDACA,qDAEA,8BACE,0DACA,0DACA,0DAMN,mBACE,8CAIA,2EAEE,uDACA,uDACA,uDACA,uCAEA,2FACE,sDACA,sDACA,sDAQJ,yCACE,WAGF,mEACE,YAGF,+GACE,mBACA,WAYA,sNAEE,qCACA,qCAGF,kIACE,mDAIJ,8CACE,kBAEA,sDACE,qCACA,qCAhBF,sNAEE,qCACA,qCAGF,gIACE,oDAIJ,8CACE,kBAEA,qDACE,qCACA","file":"query-builder.css"}
|