@elliemae/ds-query-builder 1.60.0 → 2.0.0-alpha.12
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 +58 -151
- package/cjs/components/AndOrController/AndOrController.js +126 -162
- package/cjs/components/ConditionController/ConditionController.js +40 -60
- package/cjs/components/DisplayOutput/DisplayOutput.js +62 -83
- package/cjs/components/DragContainerController/DragContainerController.js +20 -21
- package/cjs/components/DragControllerRow/DragControllerRow.js +33 -23
- package/cjs/components/FieldControllerRow/FieldControllerRow.js +14 -19
- package/cjs/components/Nestable/Nestable.js +243 -283
- package/cjs/components/Nestable/NestableItem.js +61 -52
- package/cjs/components/Nestable/actions/events.js +53 -35
- package/cjs/components/Nestable/actions/getItemOptions.js +14 -12
- package/cjs/components/Nestable/actions/getPaths.js +46 -38
- package/cjs/components/Nestable/actions/index.js +21 -26
- package/cjs/components/Nestable/actions/moveItem.js +26 -16
- package/cjs/components/Nestable/actions/paths.js +48 -40
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js +12 -12
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js +14 -14
- package/cjs/components/Nestable/index.js +2 -25
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js +1 -2
- package/cjs/components/QueryBuilderImpl.js +216 -283
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js +59 -77
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +154 -174
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js +16 -11
- package/cjs/components/format/format.js +27 -39
- package/cjs/components/format/sqlFormat.js +35 -32
- package/cjs/components/format/sqlSafeFormat.js +38 -35
- package/cjs/components/format/xmlFormat.js +35 -32
- package/cjs/components/helpers/actions.js +108 -93
- package/cjs/components/helpers/constants.js +3 -4
- package/cjs/components/helpers/dependencies.js +36 -26
- package/cjs/components/helpers/selectors.js +18 -19
- package/cjs/components/helpers/store.js +87 -109
- package/cjs/components/helpers/types.js +9 -10
- package/cjs/index.js +19 -76
- package/cjs/propTypes.js +4 -5
- package/esm/DSQueryBuilder.js +37 -130
- package/esm/components/AndOrController/AndOrController.js +120 -152
- package/esm/components/ConditionController/ConditionController.js +37 -57
- package/esm/components/DisplayOutput/DisplayOutput.js +61 -76
- package/esm/components/DragContainerController/DragContainerController.js +20 -21
- package/esm/components/DragControllerRow/DragControllerRow.js +27 -17
- package/esm/components/FieldControllerRow/FieldControllerRow.js +13 -18
- package/esm/components/Nestable/Nestable.js +235 -268
- package/esm/components/Nestable/NestableItem.js +58 -48
- package/esm/components/Nestable/actions/events.js +52 -34
- package/esm/components/Nestable/actions/getItemOptions.js +14 -12
- package/esm/components/Nestable/actions/getPaths.js +46 -33
- package/esm/components/Nestable/actions/index.js +0 -5
- package/esm/components/Nestable/actions/moveItem.js +23 -13
- package/esm/components/Nestable/actions/paths.js +48 -35
- package/esm/components/Nestable/actions/tryDecreaseDepth.js +12 -12
- package/esm/components/Nestable/actions/tryIncreaseDepth.js +14 -14
- package/esm/components/Nestable/index.js +0 -23
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js +1 -2
- package/esm/components/QueryBuilderImpl.js +204 -265
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js +52 -70
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js +149 -164
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js +16 -10
- package/esm/components/format/format.js +19 -27
- package/esm/components/format/sqlFormat.js +34 -31
- package/esm/components/format/sqlSafeFormat.js +37 -34
- package/esm/components/format/xmlFormat.js +34 -31
- package/esm/components/helpers/actions.js +100 -85
- package/esm/components/helpers/constants.js +3 -4
- package/esm/components/helpers/dependencies.js +33 -21
- package/esm/components/helpers/selectors.js +5 -6
- package/esm/components/helpers/store.js +84 -104
- package/esm/components/helpers/types.js +9 -10
- package/esm/index.js +0 -57
- package/esm/propTypes.js +1 -2
- package/package.json +173 -15
- package/types/DSQueryBuilder.d.ts +211 -0
- package/types/components/AndOrController/AndOrController.d.ts +38 -0
- package/types/components/ConditionController/ConditionController.d.ts +16 -0
- package/types/components/DisplayOutput/DisplayOutput.d.ts +7 -0
- package/types/components/DragContainerController/DragContainerController.d.ts +9 -0
- package/types/components/DragControllerRow/DragControllerRow.d.ts +9 -0
- package/types/components/FieldControllerRow/FieldControllerRow.d.ts +9 -0
- package/types/components/Nestable/Nestable.d.ts +51 -0
- package/types/components/Nestable/NestableItem.d.ts +12 -0
- package/types/components/Nestable/actions/events.d.ts +6 -0
- package/types/components/Nestable/actions/getItemOptions.d.ts +11 -0
- package/types/components/Nestable/actions/getPaths.d.ts +5 -0
- package/types/components/Nestable/actions/index.d.ts +6 -0
- package/types/components/Nestable/actions/moveItem.d.ts +5 -0
- package/types/components/Nestable/actions/paths.d.ts +5 -0
- package/types/components/Nestable/actions/tryDecreaseDepth.d.ts +1 -0
- package/types/components/Nestable/actions/tryIncreaseDepth.d.ts +1 -0
- package/types/components/Nestable/index.d.ts +2 -0
- package/types/components/QueryBuilderContext/QueryBuilderContext.d.ts +2 -0
- package/types/components/QueryBuilderImpl.d.ts +49 -0
- package/types/components/QueryBuilderItem/QueryBuilderItem.d.ts +5 -0
- package/types/components/QueryBuilderRow/QueryBuilderRow.d.ts +12 -0
- package/types/components/ToolBarAnimation/ToolBarAnimation.d.ts +3 -0
- package/types/components/format/format.d.ts +26 -0
- package/types/components/format/sqlFormat.d.ts +5 -0
- package/types/components/format/sqlSafeFormat.d.ts +6 -0
- package/types/components/format/xmlFormat.d.ts +5 -0
- package/types/components/helpers/actions.d.ts +63 -0
- package/types/components/helpers/constants.d.ts +3 -0
- package/types/components/helpers/dependencies.d.ts +1 -0
- package/types/components/helpers/selectors.d.ts +20 -0
- package/types/components/helpers/store.d.ts +144 -0
- package/types/components/helpers/types.d.ts +50 -0
- package/types/index.d.ts +2 -0
- package/types/propTypes.d.ts +156 -0
- package/DSQueryBuilder/package.json +0 -10
- package/cjs/DSQueryBuilder.js.map +0 -1
- package/cjs/components/AndOrController/AndOrController.js.map +0 -1
- package/cjs/components/ConditionController/ConditionController.js.map +0 -1
- package/cjs/components/DisplayOutput/DisplayOutput.js.map +0 -1
- package/cjs/components/DragContainerController/DragContainerController.js.map +0 -1
- package/cjs/components/DragControllerRow/DragControllerRow.js.map +0 -1
- package/cjs/components/FieldControllerRow/FieldControllerRow.js.map +0 -1
- package/cjs/components/Nestable/Nestable.js.map +0 -1
- package/cjs/components/Nestable/NestableItem.js.map +0 -1
- package/cjs/components/Nestable/actions/events.js.map +0 -1
- package/cjs/components/Nestable/actions/getItemOptions.js.map +0 -1
- package/cjs/components/Nestable/actions/getPaths.js.map +0 -1
- package/cjs/components/Nestable/actions/index.js.map +0 -1
- package/cjs/components/Nestable/actions/moveItem.js.map +0 -1
- package/cjs/components/Nestable/actions/paths.js.map +0 -1
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js.map +0 -1
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js.map +0 -1
- package/cjs/components/Nestable/index.js.map +0 -1
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js.map +0 -1
- package/cjs/components/QueryBuilderImpl.js.map +0 -1
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js.map +0 -1
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js.map +0 -1
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js.map +0 -1
- package/cjs/components/format/format.js.map +0 -1
- package/cjs/components/format/sqlFormat.js.map +0 -1
- package/cjs/components/format/sqlSafeFormat.js.map +0 -1
- package/cjs/components/format/xmlFormat.js.map +0 -1
- package/cjs/components/helpers/actions.js.map +0 -1
- package/cjs/components/helpers/constants.js.map +0 -1
- package/cjs/components/helpers/dependencies.js.map +0 -1
- package/cjs/components/helpers/selectors.js.map +0 -1
- package/cjs/components/helpers/store.js.map +0 -1
- package/cjs/components/helpers/types.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/propTypes.js.map +0 -1
- package/components/AndOrController/AndOrController/package.json +0 -10
- package/components/ConditionController/ConditionController/package.json +0 -10
- package/components/DisplayOutput/DisplayOutput/package.json +0 -10
- package/components/DragContainerController/DragContainerController/package.json +0 -10
- package/components/DragControllerRow/DragControllerRow/package.json +0 -10
- package/components/FieldControllerRow/FieldControllerRow/package.json +0 -10
- package/components/Nestable/Nestable/package.json +0 -10
- package/components/Nestable/NestableItem/package.json +0 -10
- package/components/Nestable/actions/events/package.json +0 -10
- package/components/Nestable/actions/getItemOptions/package.json +0 -10
- package/components/Nestable/actions/getPaths/package.json +0 -10
- package/components/Nestable/actions/moveItem/package.json +0 -10
- package/components/Nestable/actions/package.json +0 -10
- package/components/Nestable/actions/paths/package.json +0 -10
- package/components/Nestable/actions/tryDecreaseDepth/package.json +0 -10
- package/components/Nestable/actions/tryIncreaseDepth/package.json +0 -10
- package/components/Nestable/package.json +0 -10
- package/components/QueryBuilderContext/QueryBuilderContext/package.json +0 -10
- package/components/QueryBuilderImpl/package.json +0 -10
- package/components/QueryBuilderItem/QueryBuilderItem/package.json +0 -10
- package/components/QueryBuilderRow/QueryBuilderRow/package.json +0 -10
- package/components/ToolBarAnimation/ToolBarAnimation/package.json +0 -10
- package/components/format/format/package.json +0 -10
- package/components/format/sqlFormat/package.json +0 -10
- package/components/format/sqlSafeFormat/package.json +0 -10
- package/components/format/xmlFormat/package.json +0 -10
- package/components/helpers/actions/package.json +0 -10
- package/components/helpers/constants/package.json +0 -10
- package/components/helpers/dependencies/package.json +0 -10
- package/components/helpers/selectors/package.json +0 -10
- package/components/helpers/store/package.json +0 -10
- package/components/helpers/types/package.json +0 -10
- package/esm/DSQueryBuilder.js.map +0 -1
- package/esm/components/AndOrController/AndOrController.js.map +0 -1
- package/esm/components/ConditionController/ConditionController.js.map +0 -1
- package/esm/components/DisplayOutput/DisplayOutput.js.map +0 -1
- package/esm/components/DragContainerController/DragContainerController.js.map +0 -1
- package/esm/components/DragControllerRow/DragControllerRow.js.map +0 -1
- package/esm/components/FieldControllerRow/FieldControllerRow.js.map +0 -1
- package/esm/components/Nestable/Nestable.js.map +0 -1
- package/esm/components/Nestable/NestableItem.js.map +0 -1
- package/esm/components/Nestable/actions/events.js.map +0 -1
- package/esm/components/Nestable/actions/getItemOptions.js.map +0 -1
- package/esm/components/Nestable/actions/getPaths.js.map +0 -1
- package/esm/components/Nestable/actions/index.js.map +0 -1
- package/esm/components/Nestable/actions/moveItem.js.map +0 -1
- package/esm/components/Nestable/actions/paths.js.map +0 -1
- package/esm/components/Nestable/actions/tryDecreaseDepth.js.map +0 -1
- package/esm/components/Nestable/actions/tryIncreaseDepth.js.map +0 -1
- package/esm/components/Nestable/index.js.map +0 -1
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js.map +0 -1
- package/esm/components/QueryBuilderImpl.js.map +0 -1
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js.map +0 -1
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js.map +0 -1
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js.map +0 -1
- package/esm/components/format/format.js.map +0 -1
- package/esm/components/format/sqlFormat.js.map +0 -1
- package/esm/components/format/sqlSafeFormat.js.map +0 -1
- package/esm/components/format/xmlFormat.js.map +0 -1
- package/esm/components/helpers/actions.js.map +0 -1
- package/esm/components/helpers/constants.js.map +0 -1
- package/esm/components/helpers/dependencies.js.map +0 -1
- package/esm/components/helpers/selectors.js.map +0 -1
- package/esm/components/helpers/store.js.map +0 -1
- package/esm/components/helpers/types.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/propTypes.js.map +0 -1
- package/propTypes/package.json +0 -10
|
@@ -2,23 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.every.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.every.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
12
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
12
13
|
|
|
13
14
|
function getRealNextPath(prevPath, nextPath) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const {
|
|
16
|
+
childrenProp
|
|
17
|
+
} = this.props;
|
|
18
|
+
const ppLastIndex = prevPath.length - 1;
|
|
19
|
+
const npLastIndex = nextPath.length - 1;
|
|
17
20
|
|
|
18
21
|
if (prevPath.length < nextPath.length) {
|
|
19
22
|
// move into deep
|
|
20
|
-
|
|
21
|
-
return nextPath.map(
|
|
23
|
+
let wasShifted = false;
|
|
24
|
+
return nextPath.map((nextIndex, i) => {
|
|
22
25
|
if (wasShifted) {
|
|
23
26
|
return i === npLastIndex ? nextIndex + 1 : nextIndex;
|
|
24
27
|
}
|
|
@@ -39,7 +42,7 @@ function getRealNextPath(prevPath, nextPath) {
|
|
|
39
42
|
if (prevPath.length === nextPath.length) {
|
|
40
43
|
// if move bottom + move to item with children => make it a first child instead of swap
|
|
41
44
|
if (nextPath[npLastIndex] > prevPath[npLastIndex]) {
|
|
42
|
-
|
|
45
|
+
const target = this.getItemByPath(nextPath);
|
|
43
46
|
|
|
44
47
|
if (target[childrenProp] && target[childrenProp].length && !this.isCollapsed(target)) {
|
|
45
48
|
return nextPath.slice(0, -1).concat(nextPath[npLastIndex] - 1).concat(0);
|
|
@@ -50,16 +53,16 @@ function getRealNextPath(prevPath, nextPath) {
|
|
|
50
53
|
return nextPath;
|
|
51
54
|
}
|
|
52
55
|
function getPathById(id) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
items.every(
|
|
56
|
+
let items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getDefaultItems();
|
|
57
|
+
const {
|
|
58
|
+
childrenProp
|
|
59
|
+
} = this.props;
|
|
60
|
+
let path = [];
|
|
61
|
+
items.every((item, i) => {
|
|
59
62
|
if (item.id === id) {
|
|
60
63
|
path.push(i);
|
|
61
64
|
} else if (item[childrenProp]) {
|
|
62
|
-
|
|
65
|
+
const childrenPath = this.getPathById(id, item[childrenProp]);
|
|
63
66
|
|
|
64
67
|
if (childrenPath.length) {
|
|
65
68
|
path = path.concat(i).concat(childrenPath);
|
|
@@ -71,39 +74,45 @@ function getPathById(id) {
|
|
|
71
74
|
return path;
|
|
72
75
|
}
|
|
73
76
|
function getItemByPath(path) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
let items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getDefaultItems();
|
|
78
|
+
const {
|
|
79
|
+
childrenProp
|
|
80
|
+
} = this.props;
|
|
81
|
+
let item = null;
|
|
82
|
+
path.forEach(index => {
|
|
83
|
+
const list = item ? item[childrenProp] : items;
|
|
79
84
|
item = list[index];
|
|
80
85
|
});
|
|
81
86
|
return item;
|
|
82
87
|
}
|
|
83
88
|
function getItemDepth(item) {
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
const {
|
|
90
|
+
childrenProp
|
|
91
|
+
} = this.props;
|
|
92
|
+
let level = 1;
|
|
86
93
|
|
|
87
94
|
if (item[childrenProp].length > 0) {
|
|
88
|
-
|
|
89
|
-
level += Math.max
|
|
95
|
+
const childrenDepths = item[childrenProp].map(this.getItemDepth);
|
|
96
|
+
level += Math.max(...childrenDepths);
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
return level;
|
|
93
100
|
}
|
|
94
101
|
function getSplicePath(path) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
path.forEach(
|
|
102
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
103
|
+
const splicePath = {};
|
|
104
|
+
const numToRemove = options.numToRemove || 0;
|
|
105
|
+
const itemsToInsert = options.itemsToInsert || [];
|
|
106
|
+
const lastIndex = path.length - 1;
|
|
107
|
+
let currentPath = splicePath;
|
|
108
|
+
path.forEach((index, i) => {
|
|
102
109
|
if (i === lastIndex) {
|
|
103
|
-
currentPath.$splice = [[index, numToRemove]
|
|
110
|
+
currentPath.$splice = [[index, numToRemove, ...itemsToInsert]];
|
|
104
111
|
} else {
|
|
105
|
-
|
|
106
|
-
currentPath[index] =
|
|
112
|
+
const nextPath = {};
|
|
113
|
+
currentPath[index] = {
|
|
114
|
+
[options.childrenProp]: nextPath
|
|
115
|
+
};
|
|
107
116
|
currentPath = nextPath;
|
|
108
117
|
}
|
|
109
118
|
});
|
|
@@ -115,4 +124,3 @@ exports.getItemDepth = getItemDepth;
|
|
|
115
124
|
exports.getPathById = getPathById;
|
|
116
125
|
exports.getRealNextPath = getRealNextPath;
|
|
117
126
|
exports.getSplicePath = getSplicePath;
|
|
118
|
-
//# sourceMappingURL=paths.js.map
|
|
@@ -3,33 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function tryDecreaseDepth(dragItem) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const {
|
|
7
|
+
childrenProp,
|
|
8
|
+
collapsed
|
|
9
|
+
} = this.props;
|
|
10
|
+
const pathFrom = this.getPathById(dragItem.id);
|
|
11
|
+
const itemIndex = pathFrom[pathFrom.length - 1]; // has parent
|
|
11
12
|
|
|
12
13
|
if (pathFrom.length > 1) {
|
|
13
|
-
|
|
14
|
+
const parent = this.getItemByPath(pathFrom.slice(0, -1)); // is last (by order) item in array
|
|
14
15
|
|
|
15
16
|
if (itemIndex + 1 === parent[childrenProp].length) {
|
|
16
|
-
|
|
17
|
+
const pathTo = pathFrom.slice(0, -1);
|
|
17
18
|
pathTo[pathTo.length - 1] += 1; // if collapsed by default and is last (by count) item in array remove this node from list of open nodes
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
let collapseProps = {};
|
|
20
21
|
|
|
21
22
|
if (collapsed && parent[childrenProp].length === 1) {
|
|
22
23
|
collapseProps = this.onToggleCollapse(parent, true);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
this.moveItem({
|
|
26
|
-
dragItem
|
|
27
|
-
pathFrom
|
|
28
|
-
pathTo
|
|
27
|
+
dragItem,
|
|
28
|
+
pathFrom,
|
|
29
|
+
pathTo
|
|
29
30
|
}, collapseProps);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
exports.tryDecreaseDepth = tryDecreaseDepth;
|
|
35
|
-
//# sourceMappingURL=tryDecreaseDepth.js.map
|
|
@@ -3,36 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function tryIncreaseDepth(dragItem) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
const {
|
|
7
|
+
maxDepth,
|
|
8
|
+
childrenProp,
|
|
9
|
+
collapsed
|
|
10
|
+
} = this.props;
|
|
11
|
+
const pathFrom = this.getPathById(dragItem.id);
|
|
12
|
+
const itemIndex = pathFrom[pathFrom.length - 1];
|
|
13
|
+
const newDepth = pathFrom.length + this.getItemDepth(dragItem); // has previous sibling and isn't at max depth
|
|
13
14
|
|
|
14
15
|
if (itemIndex > 0 && newDepth <= maxDepth) {
|
|
15
|
-
|
|
16
|
+
const prevSibling = this.getItemByPath(pathFrom.slice(0, -1).concat(itemIndex - 1)); // previous sibling is not collapsed
|
|
16
17
|
|
|
17
18
|
if (!prevSibling[childrenProp].length || !this.isCollapsed(prevSibling)) {
|
|
18
|
-
|
|
19
|
+
const pathTo = pathFrom.slice(0, -1).concat(itemIndex - 1).concat(prevSibling[childrenProp].length); // if collapsed by default
|
|
19
20
|
// and was no children here
|
|
20
21
|
// open this node
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
let collapseProps = {};
|
|
23
24
|
|
|
24
25
|
if (collapsed && !prevSibling[childrenProp].length) {
|
|
25
26
|
collapseProps = this.onToggleCollapse(prevSibling, true);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
this.moveItem({
|
|
29
|
-
dragItem
|
|
30
|
-
pathFrom
|
|
31
|
-
pathTo
|
|
30
|
+
dragItem,
|
|
31
|
+
pathFrom,
|
|
32
|
+
pathTo
|
|
32
33
|
}, collapseProps);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
exports.tryIncreaseDepth = tryIncreaseDepth;
|
|
38
|
-
//# sourceMappingURL=tryIncreaseDepth.js.map
|
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
5
|
-
require('@babel/runtime/helpers/classCallCheck');
|
|
6
|
-
require('@babel/runtime/helpers/createClass');
|
|
7
|
-
require('@babel/runtime/helpers/assertThisInitialized');
|
|
8
|
-
require('@babel/runtime/helpers/inherits');
|
|
9
|
-
require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
10
|
-
require('@babel/runtime/helpers/getPrototypeOf');
|
|
11
|
-
require('react');
|
|
12
|
-
require('prop-types');
|
|
13
|
-
require('classnames');
|
|
14
|
-
require('@elliemae/ds-shared/utils');
|
|
15
|
-
require('@elliemae/ds-utilities');
|
|
16
|
-
require('./actions/tryIncreaseDepth.js');
|
|
17
|
-
require('./actions/tryDecreaseDepth.js');
|
|
18
|
-
require('./actions/moveItem.js');
|
|
19
|
-
require('react-addons-update');
|
|
20
|
-
require('./actions/paths.js');
|
|
21
|
-
require('@babel/runtime/helpers/toConsumableArray');
|
|
22
|
-
require('./actions/events.js');
|
|
23
|
-
require('./actions/getItemOptions.js');
|
|
24
|
-
require('./NestableItem.js');
|
|
25
|
-
require('@babel/runtime/helpers/extends');
|
|
3
|
+
var Nestable = require('./Nestable.js');
|
|
26
4
|
|
|
27
5
|
|
|
28
6
|
|
|
29
|
-
module.exports =
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
7
|
+
module.exports = Nestable;
|
|
@@ -8,7 +8,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const QueryBuilderContext = /*#__PURE__*/React__default["default"].createContext({});
|
|
12
12
|
|
|
13
13
|
exports.QueryBuilderContext = QueryBuilderContext;
|
|
14
|
-
//# sourceMappingURL=QueryBuilderContext.js.map
|