@goplasmatic/datalogic-ui 5.5.0 → 5.6.0
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/components/logic-editor/config/operators/variable.d.ts.map +1 -1
- package/dist/datalogic_wasm-DLPe7qGz.js +1257 -0
- package/dist/datalogic_wasm-cDq50xCD.cjs +1258 -0
- package/dist/index.cjs +19 -17
- package/dist/index.js +19 -17
- package/package.json +2 -2
- package/dist/datalogic_wasm-Bckz7njC.cjs +0 -1258
- package/dist/datalogic_wasm-CPBxmvK8.js +0 -1257
package/dist/index.cjs
CHANGED
|
@@ -2217,18 +2217,17 @@ var variableOperators = {
|
|
|
2217
2217
|
note: "[[1]] jumps out of the map frame to the data holding multiplier"
|
|
2218
2218
|
},
|
|
2219
2219
|
{
|
|
2220
|
-
title: "
|
|
2221
|
-
rule: { map: [{ var: "rows" }, { map: [{ var: "cols" }, { val: [
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
note: "Two nested iterators: [[2]] reaches the root data"
|
|
2220
|
+
title: "Enclosing element from a nested iterator",
|
|
2221
|
+
rule: { map: [{ var: "rows" }, { map: [{ var: "cols" }, { "*": [{ var: "" }, { val: [[2], "rate"] }] }] }] },
|
|
2222
|
+
data: { rows: [{
|
|
2223
|
+
rate: 10,
|
|
2224
|
+
cols: [1, 2]
|
|
2225
|
+
}, {
|
|
2226
|
+
rate: 100,
|
|
2227
|
+
cols: [3]
|
|
2228
|
+
}] },
|
|
2229
|
+
result: [[10, 20], [300]],
|
|
2230
|
+
note: "[[2]] leaves the inner map for the row; [[4]] would reach the root"
|
|
2232
2231
|
},
|
|
2233
2232
|
{
|
|
2234
2233
|
title: "Get iteration index",
|
|
@@ -2268,10 +2267,13 @@ var variableOperators = {
|
|
|
2268
2267
|
],
|
|
2269
2268
|
notes: [
|
|
2270
2269
|
"Path is array of components: [\"a\", \"b\", \"c\"]",
|
|
2271
|
-
"Scope jump: [[
|
|
2270
|
+
"Scope jump: levels come in pairs, so [[1]] and [[2]] both name the frame one iterator out, [[3]] and [[4]] the next",
|
|
2272
2271
|
"Sign is ignored: [1] and [-1] are equivalent",
|
|
2273
|
-
"
|
|
2272
|
+
"A level past the outermost frame returns root data",
|
|
2274
2273
|
"Iteration metadata: {\"val\": [[1], \"index\"]} and {\"val\": [[1], \"key\"]} (the string form {\"val\": \"index\"} looks up a key named \"index\")",
|
|
2274
|
+
"Outer metadata is odd-numbered: [[3], \"index\"] is the enclosing iterator's index; an even level reads a field of that name instead",
|
|
2275
|
+
"A bare {\"val\": [[N]]} is the frame itself, not a lookup of the key \"N\"",
|
|
2276
|
+
"A marker holds exactly one number: {\"val\": [[0, 1]]} is a path chain, not level 0",
|
|
2275
2277
|
"No default argument: use var's second argument or ?? for fallbacks"
|
|
2276
2278
|
],
|
|
2277
2279
|
seeAlso: ["var", "exists"]
|
|
@@ -5435,7 +5437,7 @@ var arrayIterationOperators = {
|
|
|
5435
5437
|
},
|
|
5436
5438
|
help: {
|
|
5437
5439
|
summary: "Apply an expression to each element of an array",
|
|
5438
|
-
details: "Iterates over an array and applies the given expression to each element. Use {\"var\": \"\"} to access the current element, {\"val\": [[1], \"index\"]} for the current index and {\"val\": [[1], \"field\"]} to read a field from the
|
|
5440
|
+
details: "Iterates over an array and applies the given expression to each element. Use {\"var\": \"\"} to access the current element, {\"val\": [[1], \"index\"]} for the current index and {\"val\": [[1], \"field\"]} to read a field from the enclosing scope.",
|
|
5439
5441
|
returnType: "array",
|
|
5440
5442
|
examples: [
|
|
5441
5443
|
{
|
|
@@ -5513,7 +5515,7 @@ var arrayIterationOperators = {
|
|
|
5513
5515
|
"{\"var\": \"\"} = current element",
|
|
5514
5516
|
"{\"val\": [[1], \"index\"]} = current index (0, 1, 2...); {\"val\": [[1], \"key\"]} = current key when mapping an object",
|
|
5515
5517
|
"{\"val\": \"index\"} (plain string) is a normal key lookup and returns null",
|
|
5516
|
-
"{\"val\": [[1], \"field\"]} =
|
|
5518
|
+
"{\"val\": [[1], \"field\"]} = enclosing scope field (the root, from a single iterator; the outer element from a nested one)",
|
|
5517
5519
|
"Returns a new array; original unchanged"
|
|
5518
5520
|
],
|
|
5519
5521
|
seeAlso: [
|
|
@@ -18316,7 +18318,7 @@ function useWasmEvaluator(options = {}) {
|
|
|
18316
18318
|
try {
|
|
18317
18319
|
setLoading(true);
|
|
18318
18320
|
setError(null);
|
|
18319
|
-
const wasm = await Promise.resolve().then(() => require("./datalogic_wasm-
|
|
18321
|
+
const wasm = await Promise.resolve().then(() => require("./datalogic_wasm-cDq50xCD.cjs"));
|
|
18320
18322
|
await wasm.default();
|
|
18321
18323
|
if (!cancelled) {
|
|
18322
18324
|
moduleRef.current = { Engine: wasm.Engine };
|
package/dist/index.js
CHANGED
|
@@ -2193,18 +2193,17 @@ var variableOperators = {
|
|
|
2193
2193
|
note: "[[1]] jumps out of the map frame to the data holding multiplier"
|
|
2194
2194
|
},
|
|
2195
2195
|
{
|
|
2196
|
-
title: "
|
|
2197
|
-
rule: { map: [{ var: "rows" }, { map: [{ var: "cols" }, { val: [
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
note: "Two nested iterators: [[2]] reaches the root data"
|
|
2196
|
+
title: "Enclosing element from a nested iterator",
|
|
2197
|
+
rule: { map: [{ var: "rows" }, { map: [{ var: "cols" }, { "*": [{ var: "" }, { val: [[2], "rate"] }] }] }] },
|
|
2198
|
+
data: { rows: [{
|
|
2199
|
+
rate: 10,
|
|
2200
|
+
cols: [1, 2]
|
|
2201
|
+
}, {
|
|
2202
|
+
rate: 100,
|
|
2203
|
+
cols: [3]
|
|
2204
|
+
}] },
|
|
2205
|
+
result: [[10, 20], [300]],
|
|
2206
|
+
note: "[[2]] leaves the inner map for the row; [[4]] would reach the root"
|
|
2208
2207
|
},
|
|
2209
2208
|
{
|
|
2210
2209
|
title: "Get iteration index",
|
|
@@ -2244,10 +2243,13 @@ var variableOperators = {
|
|
|
2244
2243
|
],
|
|
2245
2244
|
notes: [
|
|
2246
2245
|
"Path is array of components: [\"a\", \"b\", \"c\"]",
|
|
2247
|
-
"Scope jump: [[
|
|
2246
|
+
"Scope jump: levels come in pairs, so [[1]] and [[2]] both name the frame one iterator out, [[3]] and [[4]] the next",
|
|
2248
2247
|
"Sign is ignored: [1] and [-1] are equivalent",
|
|
2249
|
-
"
|
|
2248
|
+
"A level past the outermost frame returns root data",
|
|
2250
2249
|
"Iteration metadata: {\"val\": [[1], \"index\"]} and {\"val\": [[1], \"key\"]} (the string form {\"val\": \"index\"} looks up a key named \"index\")",
|
|
2250
|
+
"Outer metadata is odd-numbered: [[3], \"index\"] is the enclosing iterator's index; an even level reads a field of that name instead",
|
|
2251
|
+
"A bare {\"val\": [[N]]} is the frame itself, not a lookup of the key \"N\"",
|
|
2252
|
+
"A marker holds exactly one number: {\"val\": [[0, 1]]} is a path chain, not level 0",
|
|
2251
2253
|
"No default argument: use var's second argument or ?? for fallbacks"
|
|
2252
2254
|
],
|
|
2253
2255
|
seeAlso: ["var", "exists"]
|
|
@@ -5411,7 +5413,7 @@ var arrayIterationOperators = {
|
|
|
5411
5413
|
},
|
|
5412
5414
|
help: {
|
|
5413
5415
|
summary: "Apply an expression to each element of an array",
|
|
5414
|
-
details: "Iterates over an array and applies the given expression to each element. Use {\"var\": \"\"} to access the current element, {\"val\": [[1], \"index\"]} for the current index and {\"val\": [[1], \"field\"]} to read a field from the
|
|
5416
|
+
details: "Iterates over an array and applies the given expression to each element. Use {\"var\": \"\"} to access the current element, {\"val\": [[1], \"index\"]} for the current index and {\"val\": [[1], \"field\"]} to read a field from the enclosing scope.",
|
|
5415
5417
|
returnType: "array",
|
|
5416
5418
|
examples: [
|
|
5417
5419
|
{
|
|
@@ -5489,7 +5491,7 @@ var arrayIterationOperators = {
|
|
|
5489
5491
|
"{\"var\": \"\"} = current element",
|
|
5490
5492
|
"{\"val\": [[1], \"index\"]} = current index (0, 1, 2...); {\"val\": [[1], \"key\"]} = current key when mapping an object",
|
|
5491
5493
|
"{\"val\": \"index\"} (plain string) is a normal key lookup and returns null",
|
|
5492
|
-
"{\"val\": [[1], \"field\"]} =
|
|
5494
|
+
"{\"val\": [[1], \"field\"]} = enclosing scope field (the root, from a single iterator; the outer element from a nested one)",
|
|
5493
5495
|
"Returns a new array; original unchanged"
|
|
5494
5496
|
],
|
|
5495
5497
|
seeAlso: [
|
|
@@ -18280,7 +18282,7 @@ function useWasmEvaluator(options = {}) {
|
|
|
18280
18282
|
try {
|
|
18281
18283
|
setLoading(true);
|
|
18282
18284
|
setError(null);
|
|
18283
|
-
const wasm = await import("./datalogic_wasm-
|
|
18285
|
+
const wasm = await import("./datalogic_wasm-DLPe7qGz.js");
|
|
18284
18286
|
await wasm.default();
|
|
18285
18287
|
if (!cancelled) {
|
|
18286
18288
|
moduleRef.current = { Engine: wasm.Engine };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goplasmatic/datalogic-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "React rule builder, visual debugger, and editor for JSONLogic (json-logic) — flow-diagram view and live execution tracing, powered by the datalogic-rs WASM engine.",
|
|
7
7
|
"keywords": [
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@eslint/js": "^10.0.1",
|
|
87
87
|
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
88
88
|
"@fontsource/space-grotesk": "^5.3.0",
|
|
89
|
-
"@goplasmatic/datalogic-wasm": "5.
|
|
89
|
+
"@goplasmatic/datalogic-wasm": "5.6.0",
|
|
90
90
|
"@msgpack/msgpack": "^3.1.3",
|
|
91
91
|
"@types/node": "^26.5.1",
|
|
92
92
|
"@types/react": "^19.3.0",
|