@elliemae/ds-query-builder 2.2.0 → 2.3.0-alpha.3
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/cjs/DSQueryBuilder.js +117 -97
- package/cjs/DSQueryBuilder.js.map +7 -0
- package/cjs/components/AndOrController/AndOrController.js +148 -162
- package/cjs/components/AndOrController/AndOrController.js.map +7 -0
- package/cjs/components/ConditionController/ConditionController.js +88 -72
- package/cjs/components/ConditionController/ConditionController.js.map +7 -0
- package/cjs/components/DisplayOutput/DisplayOutput.js +67 -64
- package/cjs/components/DisplayOutput/DisplayOutput.js.map +7 -0
- package/cjs/components/DragContainerController/DragContainerController.js +61 -41
- package/cjs/components/DragContainerController/DragContainerController.js.map +7 -0
- package/cjs/components/DragControllerRow/DragControllerRow.js +50 -46
- package/cjs/components/DragControllerRow/DragControllerRow.js.map +7 -0
- package/cjs/components/FieldControllerRow/FieldControllerRow.js +54 -32
- package/cjs/components/FieldControllerRow/FieldControllerRow.js.map +7 -0
- package/cjs/components/Nestable/Nestable.js +143 -209
- package/cjs/components/Nestable/Nestable.js.map +7 -0
- package/cjs/components/Nestable/NestableItem.js +98 -90
- package/cjs/components/Nestable/NestableItem.js.map +7 -0
- package/cjs/components/Nestable/actions/events.js +72 -95
- package/cjs/components/Nestable/actions/events.js.map +7 -0
- package/cjs/components/Nestable/actions/getItemOptions.js +36 -15
- package/cjs/components/Nestable/actions/getItemOptions.js.map +7 -0
- package/cjs/components/Nestable/actions/getPaths.js +46 -51
- package/cjs/components/Nestable/actions/getPaths.js.map +7 -0
- package/cjs/components/Nestable/actions/index.js +42 -28
- package/cjs/components/Nestable/actions/index.js.map +7 -0
- package/cjs/components/Nestable/actions/moveItem.js +44 -42
- package/cjs/components/Nestable/actions/moveItem.js.map +7 -0
- package/cjs/components/Nestable/actions/paths.js +48 -55
- package/cjs/components/Nestable/actions/paths.js.map +7 -0
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js +39 -23
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js.map +7 -0
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js +39 -26
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js.map +7 -0
- package/cjs/components/Nestable/index.js +36 -7
- package/cjs/components/Nestable/index.js.map +7 -0
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js +36 -13
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js.map +7 -0
- package/cjs/components/QueryBuilderImpl.js +118 -202
- package/cjs/components/QueryBuilderImpl.js.map +7 -0
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js +80 -78
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js.map +7 -0
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +154 -211
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js.map +7 -0
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js +39 -26
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js.map +7 -0
- package/cjs/components/format/format.js +48 -22
- package/cjs/components/format/format.js.map +7 -0
- package/cjs/components/format/sqlFormat.js +69 -48
- package/cjs/components/format/sqlFormat.js.map +7 -0
- package/cjs/components/format/sqlSafeFormat.js +72 -55
- package/cjs/components/format/sqlSafeFormat.js.map +7 -0
- package/cjs/components/format/xmlFormat.js +71 -50
- package/cjs/components/format/xmlFormat.js.map +7 -0
- package/cjs/components/helpers/actions.js +151 -186
- package/cjs/components/helpers/actions.js.map +7 -0
- package/cjs/components/helpers/constants.js +36 -8
- package/cjs/components/helpers/constants.js.map +7 -0
- package/cjs/components/helpers/dependencies.js +49 -64
- package/cjs/components/helpers/dependencies.js.map +7 -0
- package/cjs/components/helpers/selectors.js +161 -101
- package/cjs/components/helpers/selectors.js.map +7 -0
- package/cjs/components/helpers/store.js +86 -104
- package/cjs/components/helpers/store.js.map +7 -0
- package/cjs/components/helpers/types.js +72 -44
- package/cjs/components/helpers/types.js.map +7 -0
- package/cjs/index.js +36 -29
- package/cjs/index.js.map +7 -0
- package/cjs/propTypes.js +102 -94
- package/cjs/propTypes.js.map +7 -0
- package/esm/DSQueryBuilder.js +103 -72
- package/esm/DSQueryBuilder.js.map +7 -0
- package/esm/components/AndOrController/AndOrController.js +113 -147
- package/esm/components/AndOrController/AndOrController.js.map +7 -0
- package/esm/components/ConditionController/ConditionController.js +57 -62
- package/esm/components/ConditionController/ConditionController.js.map +7 -0
- package/esm/components/DisplayOutput/DisplayOutput.js +35 -55
- package/esm/components/DisplayOutput/DisplayOutput.js.map +7 -0
- package/esm/components/DragContainerController/DragContainerController.js +32 -35
- package/esm/components/DragContainerController/DragContainerController.js.map +7 -0
- package/esm/components/DragControllerRow/DragControllerRow.js +21 -38
- package/esm/components/DragControllerRow/DragControllerRow.js.map +7 -0
- package/esm/components/FieldControllerRow/FieldControllerRow.js +25 -26
- package/esm/components/FieldControllerRow/FieldControllerRow.js.map +7 -0
- package/esm/components/Nestable/Nestable.js +115 -186
- package/esm/components/Nestable/Nestable.js.map +7 -0
- package/esm/components/Nestable/NestableItem.js +69 -82
- package/esm/components/Nestable/NestableItem.js.map +7 -0
- package/esm/components/Nestable/actions/events.js +45 -79
- package/esm/components/Nestable/actions/events.js.map +7 -0
- package/esm/components/Nestable/actions/getItemOptions.js +7 -11
- package/esm/components/Nestable/actions/getItemOptions.js.map +7 -0
- package/esm/components/Nestable/actions/getPaths.js +17 -43
- package/esm/components/Nestable/actions/getPaths.js.map +7 -0
- package/esm/components/Nestable/actions/index.js +13 -6
- package/esm/components/Nestable/actions/index.js.map +7 -0
- package/esm/components/Nestable/actions/moveItem.js +13 -31
- package/esm/components/Nestable/actions/moveItem.js.map +7 -0
- package/esm/components/Nestable/actions/paths.js +19 -47
- package/esm/components/Nestable/actions/paths.js.map +7 -0
- package/esm/components/Nestable/actions/tryDecreaseDepth.js +10 -19
- package/esm/components/Nestable/actions/tryDecreaseDepth.js.map +7 -0
- package/esm/components/Nestable/actions/tryIncreaseDepth.js +10 -22
- package/esm/components/Nestable/actions/tryIncreaseDepth.js.map +7 -0
- package/esm/components/Nestable/index.js +7 -2
- package/esm/components/Nestable/index.js.map +7 -0
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js +7 -5
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js.map +7 -0
- package/esm/components/QueryBuilderImpl.js +82 -187
- package/esm/components/QueryBuilderImpl.js.map +7 -0
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js +50 -70
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js.map +7 -0
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js +123 -201
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js.map +7 -0
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js +10 -17
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js.map +7 -0
- package/esm/components/format/format.js +16 -17
- package/esm/components/format/format.js.map +7 -0
- package/esm/components/format/sqlFormat.js +39 -43
- package/esm/components/format/sqlFormat.js.map +7 -0
- package/esm/components/format/sqlSafeFormat.js +43 -50
- package/esm/components/format/sqlSafeFormat.js.map +7 -0
- package/esm/components/format/xmlFormat.js +41 -45
- package/esm/components/format/xmlFormat.js.map +7 -0
- package/esm/components/helpers/actions.js +123 -160
- package/esm/components/helpers/actions.js.map +7 -0
- package/esm/components/helpers/constants.js +7 -2
- package/esm/components/helpers/constants.js.map +7 -0
- package/esm/components/helpers/dependencies.js +19 -39
- package/esm/components/helpers/dependencies.js.map +7 -0
- package/esm/components/helpers/selectors.js +132 -93
- package/esm/components/helpers/selectors.js.map +7 -0
- package/esm/components/helpers/store.js +54 -82
- package/esm/components/helpers/store.js.map +7 -0
- package/esm/components/helpers/types.js +44 -33
- package/esm/components/helpers/types.js.map +7 -0
- package/esm/index.js +7 -4
- package/esm/index.js.map +7 -0
- package/esm/propTypes.js +55 -72
- package/esm/propTypes.js.map +7 -0
- package/package.json +12 -12
|
@@ -1,31 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
function tryDecreaseDepth(dragItem) {
|
|
2
|
-
const {
|
|
3
|
-
childrenProp,
|
|
4
|
-
collapsed
|
|
5
|
-
} = this.props;
|
|
3
|
+
const { childrenProp, collapsed } = this.props;
|
|
6
4
|
const pathFrom = this.getPathById(dragItem.id);
|
|
7
|
-
const itemIndex = pathFrom[pathFrom.length - 1];
|
|
8
|
-
|
|
5
|
+
const itemIndex = pathFrom[pathFrom.length - 1];
|
|
9
6
|
if (pathFrom.length > 1) {
|
|
10
|
-
const parent = this.getItemByPath(pathFrom.slice(0, -1));
|
|
11
|
-
|
|
7
|
+
const parent = this.getItemByPath(pathFrom.slice(0, -1));
|
|
12
8
|
if (itemIndex + 1 === parent[childrenProp].length) {
|
|
13
9
|
const pathTo = pathFrom.slice(0, -1);
|
|
14
|
-
pathTo[pathTo.length - 1] += 1;
|
|
15
|
-
|
|
10
|
+
pathTo[pathTo.length - 1] += 1;
|
|
16
11
|
let collapseProps = {};
|
|
17
|
-
|
|
18
12
|
if (collapsed && parent[childrenProp].length === 1) {
|
|
19
13
|
collapseProps = this.onToggleCollapse(parent, true);
|
|
20
14
|
}
|
|
21
|
-
|
|
22
|
-
this.moveItem({
|
|
23
|
-
dragItem,
|
|
24
|
-
pathFrom,
|
|
25
|
-
pathTo
|
|
26
|
-
}, collapseProps);
|
|
15
|
+
this.moveItem({ dragItem, pathFrom, pathTo }, collapseProps);
|
|
27
16
|
}
|
|
28
17
|
}
|
|
29
18
|
}
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
export {
|
|
20
|
+
tryDecreaseDepth
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=tryDecreaseDepth.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/components/Nestable/actions/tryDecreaseDepth.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export function tryDecreaseDepth(dragItem) {\n const { childrenProp, collapsed } = this.props;\n const pathFrom = this.getPathById(dragItem.id);\n const itemIndex = pathFrom[pathFrom.length - 1];\n // has parent\n if (pathFrom.length > 1) {\n const parent = this.getItemByPath(pathFrom.slice(0, -1));\n // is last (by order) item in array\n if (itemIndex + 1 === parent[childrenProp].length) {\n const pathTo = pathFrom.slice(0, -1);\n pathTo[pathTo.length - 1] += 1;\n // if collapsed by default and is last (by count) item in array remove this node from list of open nodes\n let collapseProps = {};\n if (collapsed && parent[childrenProp].length === 1) {\n collapseProps = this.onToggleCollapse(parent, true);\n }\n\n this.moveItem({ dragItem, pathFrom, pathTo }, collapseProps);\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,0BAA0B,UAAU;AACzC,QAAM,EAAE,cAAc,cAAc,KAAK;AACzC,QAAM,WAAW,KAAK,YAAY,SAAS;AAC3C,QAAM,YAAY,SAAS,SAAS,SAAS;AAE7C,MAAI,SAAS,SAAS,GAAG;AACvB,UAAM,SAAS,KAAK,cAAc,SAAS,MAAM,GAAG;AAEpD,QAAI,YAAY,MAAM,OAAO,cAAc,QAAQ;AACjD,YAAM,SAAS,SAAS,MAAM,GAAG;AACjC,aAAO,OAAO,SAAS,MAAM;AAE7B,UAAI,gBAAgB;AACpB,UAAI,aAAa,OAAO,cAAc,WAAW,GAAG;AAClD,wBAAgB,KAAK,iBAAiB,QAAQ;AAAA;AAGhD,WAAK,SAAS,EAAE,UAAU,UAAU,UAAU;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,34 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
function tryIncreaseDepth(dragItem) {
|
|
2
|
-
const {
|
|
3
|
-
maxDepth,
|
|
4
|
-
childrenProp,
|
|
5
|
-
collapsed
|
|
6
|
-
} = this.props;
|
|
3
|
+
const { maxDepth, childrenProp, collapsed } = this.props;
|
|
7
4
|
const pathFrom = this.getPathById(dragItem.id);
|
|
8
5
|
const itemIndex = pathFrom[pathFrom.length - 1];
|
|
9
|
-
const newDepth = pathFrom.length + this.getItemDepth(dragItem);
|
|
10
|
-
|
|
6
|
+
const newDepth = pathFrom.length + this.getItemDepth(dragItem);
|
|
11
7
|
if (itemIndex > 0 && newDepth <= maxDepth) {
|
|
12
|
-
const prevSibling = this.getItemByPath(pathFrom.slice(0, -1).concat(itemIndex - 1));
|
|
13
|
-
|
|
8
|
+
const prevSibling = this.getItemByPath(pathFrom.slice(0, -1).concat(itemIndex - 1));
|
|
14
9
|
if (!prevSibling[childrenProp].length || !this.isCollapsed(prevSibling)) {
|
|
15
|
-
const pathTo = pathFrom.slice(0, -1).concat(itemIndex - 1).concat(prevSibling[childrenProp].length);
|
|
16
|
-
// and was no children here
|
|
17
|
-
// open this node
|
|
18
|
-
|
|
10
|
+
const pathTo = pathFrom.slice(0, -1).concat(itemIndex - 1).concat(prevSibling[childrenProp].length);
|
|
19
11
|
let collapseProps = {};
|
|
20
|
-
|
|
21
12
|
if (collapsed && !prevSibling[childrenProp].length) {
|
|
22
13
|
collapseProps = this.onToggleCollapse(prevSibling, true);
|
|
23
14
|
}
|
|
24
|
-
|
|
25
|
-
this.moveItem({
|
|
26
|
-
dragItem,
|
|
27
|
-
pathFrom,
|
|
28
|
-
pathTo
|
|
29
|
-
}, collapseProps);
|
|
15
|
+
this.moveItem({ dragItem, pathFrom, pathTo }, collapseProps);
|
|
30
16
|
}
|
|
31
17
|
}
|
|
32
18
|
}
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
export {
|
|
20
|
+
tryIncreaseDepth
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=tryIncreaseDepth.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/components/Nestable/actions/tryIncreaseDepth.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export function tryIncreaseDepth(dragItem) {\n const { maxDepth, childrenProp, collapsed } = this.props;\n const pathFrom = this.getPathById(dragItem.id);\n const itemIndex = pathFrom[pathFrom.length - 1];\n const newDepth = pathFrom.length + this.getItemDepth(dragItem);\n\n // has previous sibling and isn't at max depth\n if (itemIndex > 0 && newDepth <= maxDepth) {\n const prevSibling = this.getItemByPath(\n pathFrom.slice(0, -1).concat(itemIndex - 1),\n );\n // previous sibling is not collapsed\n if (!prevSibling[childrenProp].length || !this.isCollapsed(prevSibling)) {\n const pathTo = pathFrom\n .slice(0, -1)\n .concat(itemIndex - 1)\n .concat(prevSibling[childrenProp].length);\n\n // if collapsed by default\n // and was no children here\n // open this node\n let collapseProps = {};\n if (collapsed && !prevSibling[childrenProp].length) {\n collapseProps = this.onToggleCollapse(prevSibling, true);\n }\n\n this.moveItem({ dragItem, pathFrom, pathTo }, collapseProps);\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,0BAA0B,UAAU;AACzC,QAAM,EAAE,UAAU,cAAc,cAAc,KAAK;AACnD,QAAM,WAAW,KAAK,YAAY,SAAS;AAC3C,QAAM,YAAY,SAAS,SAAS,SAAS;AAC7C,QAAM,WAAW,SAAS,SAAS,KAAK,aAAa;AAGrD,MAAI,YAAY,KAAK,YAAY,UAAU;AACzC,UAAM,cAAc,KAAK,cACvB,SAAS,MAAM,GAAG,IAAI,OAAO,YAAY;AAG3C,QAAI,CAAC,YAAY,cAAc,UAAU,CAAC,KAAK,YAAY,cAAc;AACvE,YAAM,SAAS,SACZ,MAAM,GAAG,IACT,OAAO,YAAY,GACnB,OAAO,YAAY,cAAc;AAKpC,UAAI,gBAAgB;AACpB,UAAI,aAAa,CAAC,YAAY,cAAc,QAAQ;AAClD,wBAAgB,KAAK,iBAAiB,aAAa;AAAA;AAGrD,WAAK,SAAS,EAAE,UAAU,UAAU,UAAU;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Nestable from "./Nestable";
|
|
3
|
+
var Nestable_default = Nestable;
|
|
4
|
+
export {
|
|
5
|
+
Nestable_default as default
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Nestable/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import Nestable from './Nestable';\n\nexport default Nestable;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA,IAAO,mBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
3
|
-
const QueryBuilderContext =
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
const QueryBuilderContext = React2.createContext({});
|
|
4
|
+
export {
|
|
5
|
+
QueryBuilderContext
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=QueryBuilderContext.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/QueryBuilderContext/QueryBuilderContext.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\n\nexport const QueryBuilderContext = React.createContext({});\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEO,MAAM,sBAAsB,OAAM,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,231 +1,127 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import Nestable from './Nestable/Nestable.js';
|
|
11
|
-
import { QueryBuilderContext } from './QueryBuilderContext/QueryBuilderContext.js';
|
|
12
|
-
import { QB_ADD_FILTER_METHOD_TYPES, QB_GROUP_FILTER_METHOD_TYPES, QB_DRAG_TYPES } from './helpers/types.js';
|
|
13
|
-
import QueryBuilderStore from './helpers/store.js';
|
|
14
|
-
import AndOrController from './AndOrController/AndOrController.js';
|
|
15
|
-
import QueryBuilderItem from './QueryBuilderItem/QueryBuilderItem.js';
|
|
16
|
-
import DisplayOutput from './DisplayOutput/DisplayOutput.js';
|
|
17
|
-
import { jsxs } from 'react/jsx-runtime';
|
|
18
|
-
|
|
19
|
-
const _excluded = ["format"];
|
|
20
|
-
|
|
21
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
-
|
|
23
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2, { Component } from "react";
|
|
3
|
+
import Nestable from "./Nestable";
|
|
4
|
+
import { QueryBuilderContext } from "./QueryBuilderContext/QueryBuilderContext";
|
|
5
|
+
import { QB_DRAG_TYPES, QB_ADD_FILTER_METHOD_TYPES, QB_GROUP_FILTER_METHOD_TYPES } from "./helpers/types";
|
|
6
|
+
import QueryBuilderStore from "./helpers/store";
|
|
7
|
+
import AndOrController from "./AndOrController/AndOrController";
|
|
8
|
+
import QueryBuilderItem from "./QueryBuilderItem/QueryBuilderItem";
|
|
9
|
+
import DisplayOutput from "./DisplayOutput/DisplayOutput";
|
|
25
10
|
class QueryBuilderImpl extends Component {
|
|
26
11
|
constructor(props) {
|
|
27
12
|
super(props);
|
|
28
13
|
this.isDraggableItem = true;
|
|
29
|
-
|
|
30
14
|
this.onOrderDragAndDrop = (items, item) => {
|
|
31
15
|
const newFilters = this.store.onOrderDragAndDrop(items, item);
|
|
32
|
-
this.sendCall(
|
|
33
|
-
items
|
|
34
|
-
});
|
|
16
|
+
this.sendCall("reOrderOnDragAndDrop", { items });
|
|
35
17
|
this.sendChange(newFilters);
|
|
36
18
|
};
|
|
37
|
-
|
|
38
|
-
this.onAddFilterToGroup = idGroup => {
|
|
19
|
+
this.onAddFilterToGroup = (idGroup) => {
|
|
39
20
|
const newFilters = this.store.addFilter(idGroup);
|
|
40
|
-
this.sendCall(
|
|
41
|
-
idGroup
|
|
42
|
-
});
|
|
21
|
+
this.sendCall("onAddFilterToGroup", { idGroup });
|
|
43
22
|
this.sendChange(newFilters);
|
|
44
23
|
};
|
|
45
|
-
|
|
46
24
|
this.onAddFilter = (idGroup, idFilter) => {
|
|
47
|
-
const {
|
|
48
|
-
addFilterMethod
|
|
49
|
-
} = this.props;
|
|
25
|
+
const { addFilterMethod } = this.props;
|
|
50
26
|
const newFilters = addFilterMethod === QB_ADD_FILTER_METHOD_TYPES.IN_PLACE ? this.store.addFilterNextToFilterId(idGroup, idFilter) : this.onAddFilterToGroup(idGroup);
|
|
51
|
-
this.sendCall(
|
|
52
|
-
idGroup,
|
|
53
|
-
idFilter
|
|
54
|
-
});
|
|
27
|
+
this.sendCall("onAddFilter", { idGroup, idFilter });
|
|
55
28
|
this.sendChange(newFilters);
|
|
56
29
|
};
|
|
57
|
-
|
|
58
30
|
this.onAddRuleContainer = (idGroup, idFilter) => {
|
|
59
|
-
const {
|
|
60
|
-
groupFilterMethod
|
|
61
|
-
} = this.props;
|
|
31
|
+
const { groupFilterMethod } = this.props;
|
|
62
32
|
const newFilters = groupFilterMethod === QB_GROUP_FILTER_METHOD_TYPES.IN_PLACE ? this.store.addRuleContainerInPlace(idGroup, idFilter) : this.store.addRuleContainer(idGroup, idFilter);
|
|
63
|
-
this.sendCall(
|
|
64
|
-
idGroup,
|
|
65
|
-
idFilter
|
|
66
|
-
});
|
|
33
|
+
this.sendCall("onAddRuleContainer", { idGroup, idFilter });
|
|
67
34
|
this.sendChange(newFilters);
|
|
68
35
|
};
|
|
69
|
-
|
|
70
|
-
this.onRemoveFilter = idFilter => {
|
|
36
|
+
this.onRemoveFilter = (idFilter) => {
|
|
71
37
|
const newFilters = this.store.onRemoveFilter(idFilter);
|
|
72
|
-
this.sendCall(
|
|
73
|
-
idFilter
|
|
74
|
-
});
|
|
38
|
+
this.sendCall("onRemoveFilter", { idFilter });
|
|
75
39
|
this.sendChange(newFilters);
|
|
76
40
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const {
|
|
80
|
-
|
|
81
|
-
} = this.props;
|
|
82
|
-
const newFilters = this.store.changeFilter(_objectSpread(_objectSpread({}, data), {}, {
|
|
41
|
+
this.handleFieldChange = (data) => {
|
|
42
|
+
const { fieldsSharedActions } = this.props;
|
|
43
|
+
const newFilters = this.store.changeFilter({
|
|
44
|
+
...data,
|
|
83
45
|
fieldsSharedActions
|
|
84
|
-
}));
|
|
85
|
-
this.sendCall('handleFieldChange', {
|
|
86
|
-
data
|
|
87
46
|
});
|
|
47
|
+
this.sendCall("handleFieldChange", { data });
|
|
88
48
|
this.sendChange(newFilters);
|
|
89
49
|
};
|
|
90
|
-
|
|
91
50
|
this.handleRuleContainerOperator = (idGroup, value) => {
|
|
92
51
|
const newFilters = this.store.changeGroupOperator(idGroup, value);
|
|
93
|
-
this.sendCall(
|
|
94
|
-
idGroup,
|
|
95
|
-
value
|
|
96
|
-
});
|
|
52
|
+
this.sendCall("handleRuleContainerOperator", { idGroup, value });
|
|
97
53
|
this.sendChange(newFilters);
|
|
98
54
|
};
|
|
99
|
-
|
|
100
|
-
this.handleRuleContainerUnGroup = idGroup => {
|
|
55
|
+
this.handleRuleContainerUnGroup = (idGroup) => {
|
|
101
56
|
const newFilters = this.store.unGroup(idGroup);
|
|
102
|
-
this.sendCall(
|
|
103
|
-
idGroup
|
|
104
|
-
});
|
|
57
|
+
this.sendCall("handleRuleContainerUnGroup", { idGroup });
|
|
105
58
|
this.sendChange(newFilters);
|
|
106
59
|
};
|
|
107
|
-
|
|
108
60
|
this.handleDropFilter = (filter, dragTo) => {
|
|
109
|
-
const {
|
|
110
|
-
|
|
111
|
-
idGroup,
|
|
112
|
-
idFilter
|
|
113
|
-
} = filter;
|
|
114
|
-
const {
|
|
115
|
-
position: newPosition,
|
|
116
|
-
targetIdGroup
|
|
117
|
-
} = dragTo;
|
|
61
|
+
const { position: oldPosition, idGroup, idFilter } = filter;
|
|
62
|
+
const { position: newPosition, targetIdGroup } = dragTo;
|
|
118
63
|
const newFilters = this.store.reOrderFilter(idFilter, idGroup, oldPosition, newPosition, targetIdGroup);
|
|
119
|
-
this.sendCall(
|
|
120
|
-
filter,
|
|
121
|
-
dragTo
|
|
122
|
-
});
|
|
64
|
+
this.sendCall("handleDropFilter", { filter, dragTo });
|
|
123
65
|
this.sendChange(newFilters);
|
|
124
66
|
};
|
|
125
|
-
|
|
126
67
|
this.handleDropGroup = (group, dragTo) => {
|
|
127
|
-
const {
|
|
128
|
-
|
|
129
|
-
idFilter,
|
|
130
|
-
idGroup
|
|
131
|
-
} = group;
|
|
132
|
-
const {
|
|
133
|
-
position: newPosition,
|
|
134
|
-
targetIdGroup
|
|
135
|
-
} = dragTo;
|
|
68
|
+
const { position: oldPosition, idFilter, idGroup } = group;
|
|
69
|
+
const { position: newPosition, targetIdGroup } = dragTo;
|
|
136
70
|
const newFilters = this.store.reOrderFilter(idFilter, idGroup, oldPosition, newPosition, targetIdGroup);
|
|
137
|
-
this.sendCall(
|
|
138
|
-
group,
|
|
139
|
-
dragTo
|
|
140
|
-
});
|
|
71
|
+
this.sendCall("handleDropGroup", { group, dragTo });
|
|
141
72
|
this.sendChange(newFilters);
|
|
142
73
|
};
|
|
143
|
-
|
|
144
74
|
this.handleDrop = (dragElement, dragTo) => {
|
|
145
|
-
const {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (type === QB_DRAG_TYPES.FILTER) return this.handleDropFilter(dragElement, dragTo);
|
|
75
|
+
const { type } = dragElement;
|
|
76
|
+
if (type === QB_DRAG_TYPES.FILTER)
|
|
77
|
+
return this.handleDropFilter(dragElement, dragTo);
|
|
149
78
|
return this.handleDropGroup(dragElement, dragTo);
|
|
150
79
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
format
|
|
155
|
-
} = _ref,
|
|
156
|
-
newFilters = _objectWithoutProperties(_ref, _excluded);
|
|
157
|
-
|
|
158
|
-
this.setState(_objectSpread({
|
|
159
|
-
format
|
|
160
|
-
}, newFilters));
|
|
161
|
-
const {
|
|
162
|
-
onChange
|
|
163
|
-
} = this.props;
|
|
80
|
+
this.sendChange = ({ format, ...newFilters }) => {
|
|
81
|
+
this.setState({ format, ...newFilters });
|
|
82
|
+
const { onChange } = this.props;
|
|
164
83
|
onChange(format, newFilters);
|
|
165
84
|
};
|
|
166
|
-
|
|
167
85
|
this.sendCall = (action, data) => {
|
|
168
|
-
const {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (callback) callback(data);
|
|
86
|
+
const { [action]: callback } = this.props;
|
|
87
|
+
if (callback)
|
|
88
|
+
callback(data);
|
|
172
89
|
};
|
|
173
|
-
|
|
174
|
-
this.setDraggableItems = drag => {
|
|
90
|
+
this.setDraggableItems = (drag) => {
|
|
175
91
|
this.isDraggableItem = true;
|
|
176
|
-
|
|
177
92
|
try {
|
|
178
93
|
const ua = window.navigator.userAgent;
|
|
179
|
-
const msie = ua.indexOf(
|
|
180
|
-
|
|
94
|
+
const msie = ua.indexOf("MSIE ");
|
|
181
95
|
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
|
|
182
|
-
const {
|
|
183
|
-
isDraggableItem
|
|
184
|
-
} = this.state;
|
|
185
|
-
|
|
96
|
+
const { isDraggableItem } = this.state;
|
|
186
97
|
if (drag !== isDraggableItem) {
|
|
187
|
-
this.setState({
|
|
188
|
-
isDraggableItem: drag
|
|
189
|
-
});
|
|
98
|
+
this.setState({ isDraggableItem: drag });
|
|
190
99
|
}
|
|
191
|
-
|
|
192
100
|
this.isDraggableItem = drag;
|
|
193
101
|
}
|
|
194
102
|
} catch (error) {
|
|
195
103
|
this.isDraggableItem = true;
|
|
196
104
|
}
|
|
197
105
|
};
|
|
198
|
-
|
|
199
106
|
this.store = new QueryBuilderStore(props.init, props.format);
|
|
200
107
|
this.state = this.store.getInitialState();
|
|
201
108
|
}
|
|
202
|
-
|
|
203
109
|
static getDerivedStateFromProps(props, state) {
|
|
204
|
-
if (props.init && props.init.step !==
|
|
110
|
+
if (props.init && props.init.step !== void 0 && Number.isInteger(props.init.step) && props.init.step !== state.step) {
|
|
205
111
|
const store = new QueryBuilderStore(props.init, props.format);
|
|
206
112
|
QueryBuilderImpl.recalculateStore = store;
|
|
207
113
|
return store.getInitialState();
|
|
208
114
|
}
|
|
209
|
-
|
|
210
115
|
return null;
|
|
211
116
|
}
|
|
212
|
-
|
|
213
117
|
componentDidUpdate() {
|
|
214
118
|
if (QueryBuilderImpl.recalculateStore) {
|
|
215
119
|
this.store = QueryBuilderImpl.recalculateStore;
|
|
216
120
|
QueryBuilderImpl.recalculateStore = null;
|
|
217
121
|
}
|
|
218
122
|
}
|
|
219
|
-
|
|
220
123
|
render() {
|
|
221
|
-
const {
|
|
222
|
-
mapGroups,
|
|
223
|
-
main,
|
|
224
|
-
mapFilters,
|
|
225
|
-
step,
|
|
226
|
-
items,
|
|
227
|
-
format
|
|
228
|
-
} = this.state;
|
|
124
|
+
const { mapGroups, main, mapFilters, step, items, format } = this.state;
|
|
229
125
|
const {
|
|
230
126
|
containerProps,
|
|
231
127
|
ruleContainerClassName,
|
|
@@ -235,12 +131,9 @@ class QueryBuilderImpl extends Component {
|
|
|
235
131
|
displayOutputLabel,
|
|
236
132
|
singleRow,
|
|
237
133
|
toolTipZIndex
|
|
238
|
-
} = this.props;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
condition
|
|
242
|
-
} = mapGroups[main];
|
|
243
|
-
return /*#__PURE__*/_jsx(QueryBuilderContext.Provider, {
|
|
134
|
+
} = this.props;
|
|
135
|
+
const { condition } = mapGroups[main];
|
|
136
|
+
return /* @__PURE__ */ React2.createElement(QueryBuilderContext.Provider, {
|
|
244
137
|
value: {
|
|
245
138
|
toolTipZIndex,
|
|
246
139
|
fields,
|
|
@@ -263,39 +156,41 @@ class QueryBuilderImpl extends Component {
|
|
|
263
156
|
setDraggableItems: this.setDraggableItems,
|
|
264
157
|
singleRow
|
|
265
158
|
}
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
})), (displayOutput || displayFixedOutput) &&
|
|
292
|
-
displayFixedOutput
|
|
159
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
160
|
+
...containerProps,
|
|
161
|
+
className: `nested-main-group ${condition !== true ? "is-or-group" : "is-and-groupL"} ${singleRow ? "query-main-single-row" : "query-main-multiple-row"}`
|
|
162
|
+
}, /* @__PURE__ */ React2.createElement(Nestable, {
|
|
163
|
+
isAndItem: condition === true,
|
|
164
|
+
isDraggableItem: this.isDraggableItem,
|
|
165
|
+
isOrItem: condition !== true,
|
|
166
|
+
items,
|
|
167
|
+
onChange: this.onOrderDragAndDrop,
|
|
168
|
+
renderItem: QueryBuilderItem,
|
|
169
|
+
setDraggableItems: this.setDraggableItems,
|
|
170
|
+
step,
|
|
171
|
+
singleRow
|
|
172
|
+
}), !singleRow && /* @__PURE__ */ React2.createElement("div", {
|
|
173
|
+
className: "rule-container-options"
|
|
174
|
+
}, /* @__PURE__ */ React2.createElement(AndOrController, {
|
|
175
|
+
allowUnGroup: false,
|
|
176
|
+
condition,
|
|
177
|
+
handleRuleContainerOperator: (value) => this.handleRuleContainerOperator(main, value),
|
|
178
|
+
handleRuleContainerUnGroup: () => this.handleRuleContainerUnGroup(main),
|
|
179
|
+
isMain: true,
|
|
180
|
+
onAddFilter: () => this.onAddFilterToGroup(main),
|
|
181
|
+
showDragController: false,
|
|
182
|
+
step,
|
|
183
|
+
toolTipZIndex
|
|
184
|
+
}))), (displayOutput || displayFixedOutput) && /* @__PURE__ */ React2.createElement(DisplayOutput, {
|
|
185
|
+
displayFixedOutput,
|
|
293
186
|
hideLabel: displayOutputLabel.hide,
|
|
294
187
|
showLabel: displayOutputLabel.show,
|
|
295
188
|
show: displayOutputLabel.open
|
|
296
189
|
}));
|
|
297
190
|
}
|
|
298
|
-
|
|
299
191
|
}
|
|
300
|
-
|
|
301
|
-
export {
|
|
192
|
+
var QueryBuilderImpl_default = QueryBuilderImpl;
|
|
193
|
+
export {
|
|
194
|
+
QueryBuilderImpl_default as default
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=QueryBuilderImpl.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/QueryBuilderImpl.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport Nestable from './Nestable';\n\nimport { QueryBuilderContext } from './QueryBuilderContext/QueryBuilderContext';\nimport { QB_DRAG_TYPES, QB_ADD_FILTER_METHOD_TYPES, QB_GROUP_FILTER_METHOD_TYPES } from './helpers/types';\nimport QueryBuilderStore from './helpers/store';\nimport AndOrController from './AndOrController/AndOrController';\n\nimport QueryBuilderItem from './QueryBuilderItem/QueryBuilderItem';\nimport DisplayOutput from './DisplayOutput/DisplayOutput';\n\nclass QueryBuilderImpl extends Component {\n isDraggableItem = true;\n\n constructor(props) {\n super(props);\n\n this.store = new QueryBuilderStore(props.init, props.format);\n this.state = this.store.getInitialState();\n }\n\n onOrderDragAndDrop = (items, item) => {\n const newFilters = this.store.onOrderDragAndDrop(items, item);\n this.sendCall('reOrderOnDragAndDrop', { items });\n this.sendChange(newFilters);\n };\n\n onAddFilterToGroup = (idGroup) => {\n const newFilters = this.store.addFilter(idGroup);\n this.sendCall('onAddFilterToGroup', { idGroup });\n this.sendChange(newFilters);\n };\n\n onAddFilter = (idGroup, idFilter) => {\n const { addFilterMethod } = this.props;\n const newFilters =\n addFilterMethod === QB_ADD_FILTER_METHOD_TYPES.IN_PLACE\n ? this.store.addFilterNextToFilterId(idGroup, idFilter)\n : this.onAddFilterToGroup(idGroup);\n this.sendCall('onAddFilter', { idGroup, idFilter });\n this.sendChange(newFilters);\n };\n\n onAddRuleContainer = (idGroup, idFilter) => {\n const { groupFilterMethod } = this.props;\n const newFilters =\n groupFilterMethod === QB_GROUP_FILTER_METHOD_TYPES.IN_PLACE\n ? this.store.addRuleContainerInPlace(idGroup, idFilter)\n : this.store.addRuleContainer(idGroup, idFilter);\n this.sendCall('onAddRuleContainer', { idGroup, idFilter });\n this.sendChange(newFilters);\n };\n\n onRemoveFilter = (idFilter) => {\n const newFilters = this.store.onRemoveFilter(idFilter);\n this.sendCall('onRemoveFilter', { idFilter });\n this.sendChange(newFilters);\n };\n\n static getDerivedStateFromProps(props, state) {\n if (\n props.init &&\n props.init.step !== undefined &&\n Number.isInteger(props.init.step) &&\n props.init.step !== state.step\n ) {\n const store = new QueryBuilderStore(props.init, props.format);\n QueryBuilderImpl.recalculateStore = store;\n return store.getInitialState();\n }\n return null;\n }\n\n componentDidUpdate() {\n if (QueryBuilderImpl.recalculateStore) {\n this.store = QueryBuilderImpl.recalculateStore;\n QueryBuilderImpl.recalculateStore = null;\n }\n }\n\n handleFieldChange = (data) => {\n const { fieldsSharedActions } = this.props;\n const newFilters = this.store.changeFilter({\n ...data,\n fieldsSharedActions,\n });\n this.sendCall('handleFieldChange', { data });\n this.sendChange(newFilters);\n };\n\n handleRuleContainerOperator = (idGroup, value) => {\n const newFilters = this.store.changeGroupOperator(idGroup, value);\n this.sendCall('handleRuleContainerOperator', { idGroup, value });\n this.sendChange(newFilters);\n };\n\n handleRuleContainerUnGroup = (idGroup) => {\n const newFilters = this.store.unGroup(idGroup);\n this.sendCall('handleRuleContainerUnGroup', { idGroup });\n this.sendChange(newFilters);\n };\n\n /**\n * handleFieldChange and handleDropFilter\n * are equals right now, but they maybe\n * will have diferents logic\n *\n * @param filter\n * @param dragTo\n */\n handleDropFilter = (filter, dragTo) => {\n const { position: oldPosition, idGroup, idFilter } = filter;\n const { position: newPosition, targetIdGroup } = dragTo;\n const newFilters = this.store.reOrderFilter(idFilter, idGroup, oldPosition, newPosition, targetIdGroup);\n this.sendCall('handleDropFilter', { filter, dragTo });\n this.sendChange(newFilters);\n };\n\n /**\n * handleFieldChange and handleDropFilter\n * are equals right now, but they maybe\n * will have diferents logic\n *\n * @param group\n * @param dragTo\n */\n handleDropGroup = (group, dragTo) => {\n const { position: oldPosition, idFilter, idGroup } = group;\n const { position: newPosition, targetIdGroup } = dragTo;\n const newFilters = this.store.reOrderFilter(idFilter, idGroup, oldPosition, newPosition, targetIdGroup);\n this.sendCall('handleDropGroup', { group, dragTo });\n this.sendChange(newFilters);\n };\n\n handleDrop = (dragElement, dragTo) => {\n const { type } = dragElement;\n if (type === QB_DRAG_TYPES.FILTER) return this.handleDropFilter(dragElement, dragTo);\n return this.handleDropGroup(dragElement, dragTo);\n };\n\n sendChange = ({ format, ...newFilters }) => {\n this.setState({ format, ...newFilters });\n const { onChange } = this.props;\n onChange(format, newFilters);\n };\n\n sendCall = (action, data) => {\n const { [action]: callback } = this.props;\n if (callback) callback(data);\n };\n\n setDraggableItems = (drag) => {\n this.isDraggableItem = true;\n try {\n const ua = window.navigator.userAgent;\n const msie = ua.indexOf('MSIE ');\n // eslint-disable-next-line no-useless-escape\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\n const { isDraggableItem } = this.state;\n if (drag !== isDraggableItem) {\n this.setState({ isDraggableItem: drag });\n }\n this.isDraggableItem = drag;\n }\n } catch (error) {\n this.isDraggableItem = true;\n }\n };\n\n render() {\n const { mapGroups, main, mapFilters, step, items, format } = this.state;\n const {\n containerProps,\n ruleContainerClassName,\n fields,\n displayFixedOutput,\n displayOutput,\n displayOutputLabel,\n singleRow,\n toolTipZIndex,\n } = this.props;\n // const { children } = items[0]\n const { condition } = mapGroups[main];\n\n return (\n <QueryBuilderContext.Provider\n value={{\n toolTipZIndex,\n fields,\n handleDrop: this.handleDrop,\n handleFieldChange: this.handleFieldChange,\n handleRuleContainerOperator: this.handleRuleContainerOperator,\n handleRuleContainerUnGroup: this.handleRuleContainerUnGroup,\n mapFilters,\n mapGroups,\n onAddFilter: this.onAddFilter,\n onAddFilterToGroup: this.onAddFilterToGroup,\n onAddRuleContainer: this.onAddRuleContainer,\n onRemoveFilter: this.onRemoveFilter,\n ruleContainerClassName,\n showDragController: false,\n format,\n step,\n items,\n isDraggableItem: this.isDraggableItem,\n setDraggableItems: this.setDraggableItems,\n singleRow,\n }}\n >\n <div\n {...containerProps}\n className={`nested-main-group ${condition !== true ? 'is-or-group' : 'is-and-groupL'} ${\n singleRow ? 'query-main-single-row' : 'query-main-multiple-row'\n }`}\n >\n <Nestable\n isAndItem={condition === true}\n isDraggableItem={this.isDraggableItem}\n isOrItem={condition !== true}\n items={items}\n onChange={this.onOrderDragAndDrop}\n renderItem={QueryBuilderItem}\n setDraggableItems={this.setDraggableItems}\n step={step}\n singleRow={singleRow}\n />\n {!singleRow && (\n <div className=\"rule-container-options\">\n <AndOrController\n allowUnGroup={false}\n condition={condition}\n handleRuleContainerOperator={(value) => this.handleRuleContainerOperator(main, value)}\n handleRuleContainerUnGroup={() => this.handleRuleContainerUnGroup(main)}\n isMain\n onAddFilter={() => this.onAddFilterToGroup(main)}\n showDragController={false}\n step={step}\n toolTipZIndex={toolTipZIndex}\n />\n </div>\n )}\n </div>\n {(displayOutput || displayFixedOutput) && (\n <DisplayOutput\n displayFixedOutput={displayFixedOutput}\n hideLabel={displayOutputLabel.hide}\n showLabel={displayOutputLabel.show}\n show={displayOutputLabel.open}\n />\n )}\n </QueryBuilderContext.Provider>\n );\n }\n}\n\nexport default QueryBuilderImpl;\n"],
|
|
5
|
+
"mappings": "AAAA;ACEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA,+BAA+B,UAAU;AAAA,EAGvC,YAAY,OAAO;AACjB,UAAM;AAHR,2BAAkB;AASlB,8BAAqB,CAAC,OAAO,SAAS;AACpC,YAAM,aAAa,KAAK,MAAM,mBAAmB,OAAO;AACxD,WAAK,SAAS,wBAAwB,EAAE;AACxC,WAAK,WAAW;AAAA;AAGlB,8BAAqB,CAAC,YAAY;AAChC,YAAM,aAAa,KAAK,MAAM,UAAU;AACxC,WAAK,SAAS,sBAAsB,EAAE;AACtC,WAAK,WAAW;AAAA;AAGlB,uBAAc,CAAC,SAAS,aAAa;AACnC,YAAM,EAAE,oBAAoB,KAAK;AACjC,YAAM,aACJ,oBAAoB,2BAA2B,WAC3C,KAAK,MAAM,wBAAwB,SAAS,YAC5C,KAAK,mBAAmB;AAC9B,WAAK,SAAS,eAAe,EAAE,SAAS;AACxC,WAAK,WAAW;AAAA;AAGlB,8BAAqB,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