@rkmodules/rules 0.0.150 → 0.0.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -709,6 +709,9 @@ var getValue = {
|
|
|
709
709
|
tree: "any",
|
|
710
710
|
path: "string",
|
|
711
711
|
},
|
|
712
|
+
params: {
|
|
713
|
+
removeEmpty: { type: "boolean", default: false, label: "remove empty" },
|
|
714
|
+
},
|
|
712
715
|
outputs: {
|
|
713
716
|
tree: "any",
|
|
714
717
|
},
|
|
@@ -717,7 +720,11 @@ var getValue = {
|
|
|
717
720
|
var _c = _b.tree, tree = _c === void 0 ? {} : _c, _d = _b.path, path = _d === void 0 ? {} : _d;
|
|
718
721
|
return __generator(this, function (_e) {
|
|
719
722
|
result = binaryOnTree(tree, path, function (value, path) {
|
|
720
|
-
|
|
723
|
+
var val = getValue$1(value, path);
|
|
724
|
+
if ((val === undefined || val === null) && params.removeEmpty) {
|
|
725
|
+
return DISCARD;
|
|
726
|
+
}
|
|
727
|
+
return val;
|
|
721
728
|
}, true);
|
|
722
729
|
return [2 /*return*/, { tree: result }];
|
|
723
730
|
});
|
|
@@ -1546,7 +1553,7 @@ var filterList = {
|
|
|
1546
1553
|
keep: "boolean",
|
|
1547
1554
|
},
|
|
1548
1555
|
params: {
|
|
1549
|
-
removeEmpty: { type: "boolean", default: false },
|
|
1556
|
+
removeEmpty: { type: "boolean", default: false, label: "remove empty" },
|
|
1550
1557
|
},
|
|
1551
1558
|
outputs: {
|
|
1552
1559
|
list: "any",
|
|
@@ -8478,5 +8485,5 @@ function DDContext(_a) {
|
|
|
8478
8485
|
return React.createElement(DndProvider, { backend: HTML5Backend }, children);
|
|
8479
8486
|
}
|
|
8480
8487
|
|
|
8481
|
-
export { DDContext, DISCARD, Engine, Flow, FlowContext, GenericNode, Input, Lib, Output, Param, binaryOnTree, binaryOnTreeBranch, broadCast, deRefEdgeHandle, ensureBranch, expandTree, forEachBranch, forEachItem, getBranch, getBranches, getItem, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isEmpty, isEmptyTree, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizePaths, normalizeVarDef, parseReference, primitives, pushItem, safeName, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, treeStats, trimTree, uid$1 as uid, useControls, useDraggableNode, useEngine, useFlow, useFunction, useGraphedFunction, usePositions, usePrompts, useUpdatePositions, useVariable, variableStore };
|
|
8488
|
+
export { DDContext, DISCARD, Engine, Flow, FlowContext, GenericNode, Input, InputBoolean, InputNumber, InputSelect, InputString, InputText, Lib, Output, Param, binaryOnTree, binaryOnTreeBranch, broadCast, deRefEdgeHandle, ensureBranch, expandTree, forEachBranch, forEachItem, getBranch, getBranches, getItem, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isEmpty, isEmptyTree, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizePaths, normalizeVarDef, parseReference, primitives, pushItem, safeName, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, treeStats, trimTree, uid$1 as uid, useControls, useDraggableNode, useEngine, useFlow, useFunction, useGraphedFunction, usePositions, usePrompts, useUpdatePositions, useVariable, variableStore };
|
|
8482
8489
|
//# sourceMappingURL=index.esm.js.map
|