@react-querybuilder/core 8.9.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.
Files changed (80) hide show
  1. package/README.md +84 -0
  2. package/dist/arrayUtils-D5EoIsKP.js +164 -0
  3. package/dist/arrayUtils-D5EoIsKP.js.map +1 -0
  4. package/dist/basic-C8xXKHIA.d.ts +1235 -0
  5. package/dist/cjs/index.d.ts +1 -0
  6. package/dist/cjs/index.js +6 -0
  7. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +4786 -0
  8. package/dist/cjs/react-querybuilder_core.cjs.development.js +4033 -0
  9. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -0
  10. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +4786 -0
  11. package/dist/cjs/react-querybuilder_core.cjs.production.js +2 -0
  12. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -0
  13. package/dist/convertQuery-DAqoID3O.js +87 -0
  14. package/dist/convertQuery-DAqoID3O.js.map +1 -0
  15. package/dist/export-DyrnTh6K.d.ts +452 -0
  16. package/dist/formatQuery.d.ts +667 -0
  17. package/dist/formatQuery.js +2428 -0
  18. package/dist/formatQuery.js.map +1 -0
  19. package/dist/import-Cksobmln.d.ts +28 -0
  20. package/dist/isRuleGroup-DqAs2x4E.js +120 -0
  21. package/dist/isRuleGroup-DqAs2x4E.js.map +1 -0
  22. package/dist/objectUtils-BBZSfZJz.js +17 -0
  23. package/dist/objectUtils-BBZSfZJz.js.map +1 -0
  24. package/dist/optGroupUtils-CXLgyg2i.js +138 -0
  25. package/dist/optGroupUtils-CXLgyg2i.js.map +1 -0
  26. package/dist/parseCEL.d.ts +34 -0
  27. package/dist/parseCEL.js +2593 -0
  28. package/dist/parseCEL.js.map +1 -0
  29. package/dist/parseJSONata.d.ts +36 -0
  30. package/dist/parseJSONata.js +5884 -0
  31. package/dist/parseJSONata.js.map +1 -0
  32. package/dist/parseJsonLogic.d.ts +36 -0
  33. package/dist/parseJsonLogic.js +191 -0
  34. package/dist/parseJsonLogic.js.map +1 -0
  35. package/dist/parseMongoDB.d.ts +79 -0
  36. package/dist/parseMongoDB.js +267 -0
  37. package/dist/parseMongoDB.js.map +1 -0
  38. package/dist/parseNumber-Bcys1kOH.js +31 -0
  39. package/dist/parseNumber-Bcys1kOH.js.map +1 -0
  40. package/dist/parseSQL.d.ts +37 -0
  41. package/dist/parseSQL.js +6626 -0
  42. package/dist/parseSQL.js.map +1 -0
  43. package/dist/parseSpEL.d.ts +34 -0
  44. package/dist/parseSpEL.js +2911 -0
  45. package/dist/parseSpEL.js.map +1 -0
  46. package/dist/prepareQueryObjects-BqFEs4eV.js +172 -0
  47. package/dist/prepareQueryObjects-BqFEs4eV.js.map +1 -0
  48. package/dist/query-builder-layout.css +1 -0
  49. package/dist/query-builder-layout.css.map +1 -0
  50. package/dist/query-builder-layout.scss +4 -0
  51. package/dist/query-builder.css +1 -0
  52. package/dist/query-builder.css.map +1 -0
  53. package/dist/query-builder.scss +2 -0
  54. package/dist/react-querybuilder_core.d.mts +4786 -0
  55. package/dist/react-querybuilder_core.legacy-esm.d.ts +4786 -0
  56. package/dist/react-querybuilder_core.legacy-esm.js +3916 -0
  57. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -0
  58. package/dist/react-querybuilder_core.mjs +3852 -0
  59. package/dist/react-querybuilder_core.mjs.map +1 -0
  60. package/dist/react-querybuilder_core.production.d.mts +4786 -0
  61. package/dist/react-querybuilder_core.production.mjs +2 -0
  62. package/dist/react-querybuilder_core.production.mjs.map +1 -0
  63. package/dist/styles/_functions.scss +14 -0
  64. package/dist/styles/_layout.scss +201 -0
  65. package/dist/styles/_main.scss +114 -0
  66. package/dist/styles/_root.scss +66 -0
  67. package/dist/styles/_variables.scss +66 -0
  68. package/dist/transformQuery-FL_nlpp5.js +47 -0
  69. package/dist/transformQuery-FL_nlpp5.js.map +1 -0
  70. package/dist/transformQuery.d.ts +118 -0
  71. package/dist/transformQuery.js +4 -0
  72. package/formatQuery/package.json +4 -0
  73. package/package.json +146 -0
  74. package/parseCEL/package.json +4 -0
  75. package/parseJSONata/package.json +4 -0
  76. package/parseJsonLogic/package.json +4 -0
  77. package/parseMongoDB/package.json +4 -0
  78. package/parseSQL/package.json +4 -0
  79. package/parseSpEL/package.json +4 -0
  80. package/transformQuery/package.json +4 -0
@@ -0,0 +1,172 @@
1
+ const require_isRuleGroup = require('./isRuleGroup-DqAs2x4E.js');
2
+ const require_optGroupUtils = require('./optGroupUtils-CXLgyg2i.js');
3
+ let immer = require("immer");
4
+ immer = require_isRuleGroup.__toESM(immer);
5
+
6
+ //#region src/utils/filterFieldsByComparator.ts
7
+ const filterByComparator = (field, operator, fieldToCompare) => {
8
+ const fullField = require_optGroupUtils.toFullOption(field);
9
+ const fullFieldToCompare = require_optGroupUtils.toFullOption(fieldToCompare);
10
+ if (fullField.value === fullFieldToCompare.value) return false;
11
+ if (typeof fullField.comparator === "string") return fullField[fullField.comparator] === fullFieldToCompare[fullField.comparator];
12
+ return fullField.comparator?.(fullFieldToCompare, operator) ?? false;
13
+ };
14
+ /**
15
+ * For a given {@link FullField}, returns the `fields` list filtered for
16
+ * other fields that match by `comparator`. Only fields *other than the
17
+ * one in question* will ever be included, even if `comparator` is `null`
18
+ * or `undefined`. If `comparator` is a string, fields with the same value
19
+ * for that property will be included. If `comparator` is a function, each
20
+ * field will be passed to the function along with the `operator` and fields
21
+ * for which the function returns `true` will be included.
22
+ *
23
+ * @group Option Lists
24
+ */
25
+ const filterFieldsByComparator = (field, fields, operator) => {
26
+ if (!field.comparator) {
27
+ const filterOutSameField = (f) => (f.value ?? f.name) !== (field.value ?? field.name);
28
+ if (require_optGroupUtils.isFlexibleOptionGroupArray(fields)) return fields.map((og) => ({
29
+ ...og,
30
+ options: og.options.filter((v) => filterOutSameField(v))
31
+ }));
32
+ return fields.filter((v) => filterOutSameField(v));
33
+ }
34
+ if (require_optGroupUtils.isFlexibleOptionGroupArray(fields)) return fields.map((og) => ({
35
+ ...og,
36
+ options: og.options.filter((f) => filterByComparator(field, operator, f))
37
+ })).filter((og) => og.options.length > 0);
38
+ return fields.filter((f) => filterByComparator(field, operator, f));
39
+ };
40
+
41
+ //#endregion
42
+ //#region src/utils/getValueSourcesUtil.ts
43
+ const defaultValueSourcesArray = [{
44
+ name: "value",
45
+ value: "value",
46
+ label: "value"
47
+ }];
48
+ const dummyFD = {
49
+ name: "name",
50
+ value: "name",
51
+ valueSources: null,
52
+ label: "label"
53
+ };
54
+ /**
55
+ * Utility function to get the value sources array for the given
56
+ * field and operator. If the field definition does not define a
57
+ * `valueSources` property, the `getValueSources` prop is used.
58
+ * Returns `[FullOption<"value">]` by default.
59
+ */
60
+ const getValueSourcesUtil = (fieldData, operator, getValueSources) => {
61
+ const fd = fieldData ? require_optGroupUtils.toFullOption(fieldData) : dummyFD;
62
+ let valueSourcesNEW = fd.valueSources ?? false;
63
+ if (typeof valueSourcesNEW === "function") valueSourcesNEW = valueSourcesNEW(operator);
64
+ if (!valueSourcesNEW && getValueSources) valueSourcesNEW = getValueSources(fd.value, operator, { fieldData: fd });
65
+ if (!valueSourcesNEW) return defaultValueSourcesArray;
66
+ if (require_optGroupUtils.isFlexibleOptionArray(valueSourcesNEW)) return require_optGroupUtils.toFullOptionList(valueSourcesNEW);
67
+ return valueSourcesNEW.map((vs) => defaultValueSourcesArray.find((dmm) => dmm.value === require_isRuleGroup.lc(vs)) ?? {
68
+ name: vs,
69
+ value: vs,
70
+ label: vs
71
+ });
72
+ };
73
+
74
+ //#endregion
75
+ //#region src/utils/parserUtils.ts
76
+ const getFieldsArray = (fields) => {
77
+ const fieldsArray = fields ? Array.isArray(fields) ? fields : Object.keys(fields).map((fld) => ({
78
+ ...fields[fld],
79
+ name: fld
80
+ })).sort((a, b) => a.label.localeCompare(b.label)) : [];
81
+ return require_optGroupUtils.toFlatOptionArray(fieldsArray);
82
+ };
83
+ function fieldIsValidUtil(params) {
84
+ const { fieldsFlat, fieldName, operator, subordinateFieldName, getValueSources } = params;
85
+ const vsIncludes = (vs) => {
86
+ const vss = getValueSourcesUtil(primaryField, operator, getValueSources);
87
+ return require_optGroupUtils.isFlexibleOptionArray(vss) && vss.some((vso) => vso.value === vs || vso.name === vs);
88
+ };
89
+ if (fieldsFlat.length === 0) return true;
90
+ let valid = false;
91
+ const primaryField = require_optGroupUtils.toFullOption(fieldsFlat.find((ff) => ff.name === fieldName));
92
+ if (primaryField) {
93
+ valid = !(!subordinateFieldName && operator !== "notNull" && operator !== "null" && !vsIncludes("value"));
94
+ if (valid && !!subordinateFieldName) if (vsIncludes("field") && fieldName !== subordinateFieldName) {
95
+ if (!filterFieldsByComparator(primaryField, fieldsFlat, operator).some((vsf) => vsf.name === subordinateFieldName)) valid = false;
96
+ } else valid = false;
97
+ }
98
+ return valid;
99
+ }
100
+
101
+ //#endregion
102
+ //#region src/utils/generateID.ts
103
+ const cryptoModule = globalThis.crypto;
104
+ /**
105
+ * Default `id` generator. Generates a valid v4 UUID. Uses `crypto.randomUUID()`
106
+ * when available, otherwise uses an alternate method based on `getRandomValues`.
107
+ * The returned string is guaranteed to match this regex:
108
+ * ```
109
+ * /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
110
+ * ```
111
+ * @returns Valid v4 UUID
112
+ */
113
+ // istanbul ignore next
114
+ let generateID = () => "00-0-4-2-000".replaceAll(/[^-]/g, (s) => ((Math.random() + Math.trunc(s)) * 65536 >> Number.parseInt(s)).toString(16).padStart(4, "0"));
115
+ // istanbul ignore else
116
+ if (cryptoModule) {
117
+ // istanbul ignore else
118
+ if (typeof cryptoModule.randomUUID === "function") generateID = () => cryptoModule.randomUUID();
119
+ else if (typeof cryptoModule.getRandomValues === "function") {
120
+ const position19vals = "89ab";
121
+ const container = new Uint32Array(32);
122
+ generateID = () => {
123
+ cryptoModule.getRandomValues(container);
124
+ let id = (container[0] % 16).toString(16);
125
+ for (let i = 1; i < 32; i++) {
126
+ if (i === 12) id = `${id}4`;
127
+ else if (i === 16) id = `${id}${position19vals[container[17] % 4]}`;
128
+ else id = `${id}${(container[i] % 16).toString(16)}`;
129
+ if (i === 7 || i === 11 || i === 15 || i === 19) id = `${id}-`;
130
+ }
131
+ return id;
132
+ };
133
+ }
134
+ }
135
+
136
+ //#endregion
137
+ //#region src/utils/prepareQueryObjects.ts
138
+ /**
139
+ * Ensures that a rule is valid by adding an `id` property if it does not already exist.
140
+ */
141
+ const prepareRule = (rule, { idGenerator = generateID } = {}) => (0, immer.produce)(rule, (draft) => {
142
+ if (!draft.id) draft.id = idGenerator();
143
+ });
144
+ /**
145
+ * Ensures that a rule group is valid by recursively adding an `id` property to the group itself
146
+ * and all its rules and subgroups where one does not already exist.
147
+ */
148
+ const prepareRuleGroup = (queryObject, { idGenerator = generateID } = {}) => (0, immer.produce)(queryObject, (draft) => {
149
+ if (!draft.id) draft.id = idGenerator();
150
+ draft.rules = draft.rules.map((r) => typeof r === "string" ? r : require_isRuleGroup.isRuleGroup(r) ? prepareRuleGroup(r, { idGenerator }) : prepareRule(r, { idGenerator }));
151
+ });
152
+
153
+ //#endregion
154
+ Object.defineProperty(exports, 'fieldIsValidUtil', {
155
+ enumerable: true,
156
+ get: function () {
157
+ return fieldIsValidUtil;
158
+ }
159
+ });
160
+ Object.defineProperty(exports, 'getFieldsArray', {
161
+ enumerable: true,
162
+ get: function () {
163
+ return getFieldsArray;
164
+ }
165
+ });
166
+ Object.defineProperty(exports, 'prepareRuleGroup', {
167
+ enumerable: true,
168
+ get: function () {
169
+ return prepareRuleGroup;
170
+ }
171
+ });
172
+ //# sourceMappingURL=prepareQueryObjects-BqFEs4eV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareQueryObjects-BqFEs4eV.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 .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":"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"}
@@ -0,0 +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 */
@@ -0,0 +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,2BAOF,uCACE,6CAGF,0EAEE,kBAEA,kLAEE,WACA,+BACA,mEAGA,gBACA,kBAGF,0FACE,gCACA,sCACA,iEAGF,wFACE,QACA,WACA,2CAGF,8GACE,aAMF,0MAEE,6FASF,sGACE,4DACA,gEAGF,oGACE,2CAIJ,qCACE,kBAEA,6CACE,WACA,+BACA,mEAGA,gBACA,kBACA,gCACA,uCACA,2CAsBF,6lKAQE,4BAMF,+GACE","file":"query-builder-layout.css"}
@@ -0,0 +1,4 @@
1
+ @forward './styles/functions';
2
+ @forward './styles/variables';
3
+ @forward './styles/root';
4
+ @forward './styles/layout';
@@ -0,0 +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 */
@@ -0,0 +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,2BAOF,uCACE,6CAGF,0EAEE,kBAEA,kLAEE,WACA,+BACA,mEAGA,gBACA,kBAGF,0FACE,gCACA,sCACA,iEAGF,wFACE,QACA,WACA,2CAGF,8GACE,aAMF,0MAEE,6FASF,sGACE,4DACA,gEAGF,oGACE,2CAIJ,qCACE,kBAEA,6CACE,WACA,+BACA,mEAGA,gBACA,kBACA,gCACA,uCACA,2CAsBF,6lKAQE,4BAMF,+GACE,4BC1LN,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,YASA,kLAEE,qCACA,qCAGF,gHACE,mDAIJ,qCACE,kBAEA,6CACE,qCACA","file":"query-builder.css"}
@@ -0,0 +1,2 @@
1
+ @forward './query-builder-layout';
2
+ @forward './styles/main';