@rkmodules/rules 0.0.150 → 0.0.151
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.cjs.js
CHANGED
|
@@ -711,6 +711,9 @@ var getValue = {
|
|
|
711
711
|
tree: "any",
|
|
712
712
|
path: "string",
|
|
713
713
|
},
|
|
714
|
+
params: {
|
|
715
|
+
removeEmpty: { type: "boolean", default: false, label: "remove empty" },
|
|
716
|
+
},
|
|
714
717
|
outputs: {
|
|
715
718
|
tree: "any",
|
|
716
719
|
},
|
|
@@ -719,7 +722,11 @@ var getValue = {
|
|
|
719
722
|
var _c = _b.tree, tree = _c === void 0 ? {} : _c, _d = _b.path, path = _d === void 0 ? {} : _d;
|
|
720
723
|
return __generator(this, function (_e) {
|
|
721
724
|
result = binaryOnTree(tree, path, function (value, path) {
|
|
722
|
-
|
|
725
|
+
var val = getValue$1(value, path);
|
|
726
|
+
if ((val === undefined || val === null) && params.removeEmpty) {
|
|
727
|
+
return DISCARD;
|
|
728
|
+
}
|
|
729
|
+
return val;
|
|
723
730
|
}, true);
|
|
724
731
|
return [2 /*return*/, { tree: result }];
|
|
725
732
|
});
|
|
@@ -1548,7 +1555,7 @@ var filterList = {
|
|
|
1548
1555
|
keep: "boolean",
|
|
1549
1556
|
},
|
|
1550
1557
|
params: {
|
|
1551
|
-
removeEmpty: { type: "boolean", default: false },
|
|
1558
|
+
removeEmpty: { type: "boolean", default: false, label: "remove empty" },
|
|
1552
1559
|
},
|
|
1553
1560
|
outputs: {
|
|
1554
1561
|
list: "any",
|
|
@@ -8480,6 +8487,7 @@ function DDContext(_a) {
|
|
|
8480
8487
|
return React.createElement(DndProvider, { backend: HTML5Backend }, children);
|
|
8481
8488
|
}
|
|
8482
8489
|
|
|
8490
|
+
exports.Control = Control;
|
|
8483
8491
|
exports.DDContext = DDContext;
|
|
8484
8492
|
exports.DISCARD = DISCARD;
|
|
8485
8493
|
exports.Engine = Engine;
|