@rkmodules/rules 0.0.112 → 0.0.114
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 +17 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +17 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/DataTree/index.d.ts +1 -0
- package/dist/lib/Engine/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -234,6 +234,12 @@ function isTree(value) {
|
|
|
234
234
|
Object.keys(value).length > 0 &&
|
|
235
235
|
Object.values(value).every(function (v) { return Array.isArray(v); }));
|
|
236
236
|
}
|
|
237
|
+
function isEmptyTree(value) {
|
|
238
|
+
return (typeof value === "object" &&
|
|
239
|
+
value !== null &&
|
|
240
|
+
!Array.isArray(value) &&
|
|
241
|
+
Object.keys(value).length === 0);
|
|
242
|
+
}
|
|
237
243
|
function isSingleTon(value) {
|
|
238
244
|
return (Object.keys(value).length === 1 && Object.values(value)[0].length === 1);
|
|
239
245
|
}
|
|
@@ -250,6 +256,9 @@ function broadCast(value) {
|
|
|
250
256
|
if (isTree(value)) {
|
|
251
257
|
return value;
|
|
252
258
|
}
|
|
259
|
+
if (isEmptyTree(value)) {
|
|
260
|
+
return {};
|
|
261
|
+
}
|
|
253
262
|
return { "0": [value] };
|
|
254
263
|
}
|
|
255
264
|
function getBranch(tree, path) {
|
|
@@ -2329,6 +2338,7 @@ var Engine = /** @class */ (function () {
|
|
|
2329
2338
|
startTime_1 = performance.now();
|
|
2330
2339
|
this.fireEvent("functionCall", {
|
|
2331
2340
|
name: name_1,
|
|
2341
|
+
fn: fnCall.name,
|
|
2332
2342
|
inputs: inputs_1,
|
|
2333
2343
|
params: params_1,
|
|
2334
2344
|
executionId: executionId,
|
|
@@ -2346,6 +2356,7 @@ var Engine = /** @class */ (function () {
|
|
|
2346
2356
|
context.scope[name_1] = result_1;
|
|
2347
2357
|
this.fireEvent("functionResult", {
|
|
2348
2358
|
name: name_1,
|
|
2359
|
+
fn: fnCall.name,
|
|
2349
2360
|
inputs: inputs_1,
|
|
2350
2361
|
params: params_1,
|
|
2351
2362
|
executionId: executionId,
|
|
@@ -2364,6 +2375,7 @@ var Engine = /** @class */ (function () {
|
|
|
2364
2375
|
endTime = performance.now();
|
|
2365
2376
|
response = {
|
|
2366
2377
|
name: node.name,
|
|
2378
|
+
fn: "root",
|
|
2367
2379
|
inputs: inputs,
|
|
2368
2380
|
params: params,
|
|
2369
2381
|
executionId: executionId,
|
|
@@ -2522,7 +2534,10 @@ var Engine = /** @class */ (function () {
|
|
|
2522
2534
|
unsub();
|
|
2523
2535
|
}
|
|
2524
2536
|
});
|
|
2525
|
-
_this.run(node, inputs).catch(
|
|
2537
|
+
_this.run(node, inputs).catch(function (e) {
|
|
2538
|
+
unsub();
|
|
2539
|
+
reject(e);
|
|
2540
|
+
});
|
|
2526
2541
|
})];
|
|
2527
2542
|
});
|
|
2528
2543
|
});
|
|
@@ -7567,5 +7582,5 @@ function DDContext(_a) {
|
|
|
7567
7582
|
return React.createElement(DndProvider, { backend: HTML5Backend }, children);
|
|
7568
7583
|
}
|
|
7569
7584
|
|
|
7570
|
-
export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, forEachBranch, forEachItem, getBranch, getBranches, getItem, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizePaths, normalizeVarDef, parseReference, primitives, pushItem, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, treeStats, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable, variableStore };
|
|
7585
|
+
export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, forEachBranch, forEachItem, getBranch, getBranches, getItem, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isEmptyTree, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizePaths, normalizeVarDef, parseReference, primitives, pushItem, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, treeStats, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable, variableStore };
|
|
7571
7586
|
//# sourceMappingURL=index.esm.js.map
|