@json-eval-rs/bundler 0.0.46 → 0.0.48
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/package.json +1 -1
- package/pkg/json_eval_rs.d.ts +52 -52
- package/pkg/json_eval_rs_bg.js +11 -11
- package/pkg/json_eval_rs_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/json_eval_rs.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export class JSONEvalWasm {
|
|
|
20
20
|
[Symbol.dispose](): void;
|
|
21
21
|
/**
|
|
22
22
|
* Evaluate and return as JsValue for direct JavaScript object access
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* @param data - JSON data string
|
|
25
25
|
* @param context - Optional context data JSON string
|
|
26
26
|
* @returns Evaluated schema as JavaScript object
|
|
@@ -34,7 +34,7 @@ export class JSONEvalWasm {
|
|
|
34
34
|
compileLogic(logic_str: string): number;
|
|
35
35
|
/**
|
|
36
36
|
* Evaluate dependents when a field changes (returns array of changes as JSON string)
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* @param changedPath - Path of the field that changed
|
|
39
39
|
* @param data - Optional updated JSON data string
|
|
40
40
|
* @param context - Optional context data JSON string
|
|
@@ -51,7 +51,7 @@ export class JSONEvalWasm {
|
|
|
51
51
|
compileAndRunLogic(logic_str: string, data?: string | null, context?: string | null): any;
|
|
52
52
|
/**
|
|
53
53
|
* Evaluate dependents and return as JavaScript object
|
|
54
|
-
*
|
|
54
|
+
*
|
|
55
55
|
* @param changedPathsJson - JSON array of field paths that changed
|
|
56
56
|
* @param data - Optional updated JSON data string
|
|
57
57
|
* @param context - Optional context data JSON string
|
|
@@ -61,7 +61,7 @@ export class JSONEvalWasm {
|
|
|
61
61
|
evaluateDependentsJS(changed_paths_json: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): any;
|
|
62
62
|
/**
|
|
63
63
|
* Evaluate schema with provided data (does not return schema - use getEvaluatedSchema() for that)
|
|
64
|
-
*
|
|
64
|
+
*
|
|
65
65
|
* @param data - JSON data string
|
|
66
66
|
* @param context - Optional context data JSON string
|
|
67
67
|
* @throws Error if evaluation fails
|
|
@@ -77,7 +77,7 @@ export class JSONEvalWasm {
|
|
|
77
77
|
runLogic(logic_id: number, data?: string | null, context?: string | null): any;
|
|
78
78
|
/**
|
|
79
79
|
* Validate data and return as plain JavaScript object (Worker-safe)
|
|
80
|
-
*
|
|
80
|
+
*
|
|
81
81
|
* @param data - JSON data string
|
|
82
82
|
* @param context - Optional context data JSON string
|
|
83
83
|
* @returns Plain JavaScript object with validation result
|
|
@@ -85,7 +85,7 @@ export class JSONEvalWasm {
|
|
|
85
85
|
validateJS(data: string, context?: string | null): any;
|
|
86
86
|
/**
|
|
87
87
|
* Validate data against schema rules with optional path filtering
|
|
88
|
-
*
|
|
88
|
+
*
|
|
89
89
|
* @param data - JSON data string
|
|
90
90
|
* @param context - Optional context data JSON string
|
|
91
91
|
* @param paths - Optional array of paths to validate (null for all)
|
|
@@ -94,7 +94,7 @@ export class JSONEvalWasm {
|
|
|
94
94
|
validatePaths(data: string, context?: string | null, paths?: string[] | null): ValidationResult;
|
|
95
95
|
/**
|
|
96
96
|
* Validate with path filtering and return as plain JavaScript object (Worker-safe)
|
|
97
|
-
*
|
|
97
|
+
*
|
|
98
98
|
* @param data - JSON data string
|
|
99
99
|
* @param context - Optional context data JSON string
|
|
100
100
|
* @param paths - Optional array of paths to validate (null for all)
|
|
@@ -103,7 +103,7 @@ export class JSONEvalWasm {
|
|
|
103
103
|
validatePathsJS(data: string, context?: string | null, paths?: string[] | null): any;
|
|
104
104
|
/**
|
|
105
105
|
* Validate data against schema rules
|
|
106
|
-
*
|
|
106
|
+
*
|
|
107
107
|
* @param data - JSON data string
|
|
108
108
|
* @param context - Optional context data JSON string
|
|
109
109
|
* @returns ValidationResult
|
|
@@ -111,7 +111,7 @@ export class JSONEvalWasm {
|
|
|
111
111
|
validate(data: string, context?: string | null): ValidationResult;
|
|
112
112
|
/**
|
|
113
113
|
* Create a new JSONEval instance from a cached ParsedSchema
|
|
114
|
-
*
|
|
114
|
+
*
|
|
115
115
|
* @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
|
|
116
116
|
* @param context - Optional context data JSON string
|
|
117
117
|
* @param data - Optional initial data JSON string
|
|
@@ -119,7 +119,7 @@ export class JSONEvalWasm {
|
|
|
119
119
|
static newFromCache(cache_key: string, context?: string | null, data?: string | null): JSONEvalWasm;
|
|
120
120
|
/**
|
|
121
121
|
* Create a new JSONEval instance from MessagePack-encoded schema
|
|
122
|
-
*
|
|
122
|
+
*
|
|
123
123
|
* @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
|
|
124
124
|
* @param context - Optional context data JSON string
|
|
125
125
|
* @param data - Optional initial data JSON string
|
|
@@ -127,14 +127,14 @@ export class JSONEvalWasm {
|
|
|
127
127
|
static newFromMsgpack(schema_msgpack: Uint8Array, context?: string | null, data?: string | null): JSONEvalWasm;
|
|
128
128
|
/**
|
|
129
129
|
* Set timezone offset for datetime operations (TODAY, NOW)
|
|
130
|
-
*
|
|
130
|
+
*
|
|
131
131
|
* @param offsetMinutes - Timezone offset in minutes from UTC (e.g., 420 for UTC+7, -300 for UTC-5)
|
|
132
132
|
* Pass null or undefined to reset to UTC
|
|
133
133
|
*/
|
|
134
134
|
setTimezoneOffset(offset_minutes?: number | null): void;
|
|
135
135
|
/**
|
|
136
136
|
* Create a new JSONEval instance
|
|
137
|
-
*
|
|
137
|
+
*
|
|
138
138
|
* @param schema - JSON schema string
|
|
139
139
|
* @param context - Optional context data JSON string
|
|
140
140
|
* @param data - Optional initial data JSON string
|
|
@@ -142,7 +142,7 @@ export class JSONEvalWasm {
|
|
|
142
142
|
constructor(schema: string, context?: string | null, data?: string | null);
|
|
143
143
|
/**
|
|
144
144
|
* Get cache statistics
|
|
145
|
-
*
|
|
145
|
+
*
|
|
146
146
|
* @returns Cache statistics as JavaScript object with hits, misses, and entries
|
|
147
147
|
*/
|
|
148
148
|
cacheStats(): any;
|
|
@@ -163,26 +163,26 @@ export class JSONEvalWasm {
|
|
|
163
163
|
disableCache(): void;
|
|
164
164
|
/**
|
|
165
165
|
* Check if evaluation caching is enabled
|
|
166
|
-
*
|
|
166
|
+
*
|
|
167
167
|
* @returns true if caching is enabled, false otherwise
|
|
168
168
|
*/
|
|
169
169
|
isCacheEnabled(): boolean;
|
|
170
170
|
/**
|
|
171
171
|
* Get the number of cached entries
|
|
172
|
-
*
|
|
172
|
+
*
|
|
173
173
|
* @returns Number of cached entries
|
|
174
174
|
*/
|
|
175
175
|
cacheLen(): number;
|
|
176
176
|
/**
|
|
177
177
|
* Resolve layout with optional evaluation
|
|
178
|
-
*
|
|
178
|
+
*
|
|
179
179
|
* @param evaluate - If true, runs evaluation before resolving layout
|
|
180
180
|
* @throws Error if resolve fails
|
|
181
181
|
*/
|
|
182
182
|
resolveLayout(evaluate: boolean): void;
|
|
183
183
|
/**
|
|
184
184
|
* Reload schema with new data
|
|
185
|
-
*
|
|
185
|
+
*
|
|
186
186
|
* @param schema - New JSON schema string
|
|
187
187
|
* @param context - Optional context data JSON string
|
|
188
188
|
* @param data - Optional initial data JSON string
|
|
@@ -191,13 +191,13 @@ export class JSONEvalWasm {
|
|
|
191
191
|
/**
|
|
192
192
|
* Get all schema values (evaluations ending with .value)
|
|
193
193
|
* Mutates internal data by overriding with values from value evaluations
|
|
194
|
-
*
|
|
194
|
+
*
|
|
195
195
|
* @returns Modified data as JavaScript object
|
|
196
196
|
*/
|
|
197
197
|
getSchemaValue(): any;
|
|
198
198
|
/**
|
|
199
199
|
* Get a value from the schema using dotted path notation
|
|
200
|
-
*
|
|
200
|
+
*
|
|
201
201
|
* @param path - Dotted path to the value (e.g., "properties.field.value")
|
|
202
202
|
* @returns Value as JSON string or null if not found
|
|
203
203
|
*/
|
|
@@ -211,21 +211,21 @@ export class JSONEvalWasm {
|
|
|
211
211
|
getSchemaByPaths(paths_json: string, format: number): string;
|
|
212
212
|
/**
|
|
213
213
|
* Get the evaluated schema with optional layout resolution
|
|
214
|
-
*
|
|
214
|
+
*
|
|
215
215
|
* @param skipLayout - Whether to skip layout resolution
|
|
216
216
|
* @returns Evaluated schema as JSON string
|
|
217
217
|
*/
|
|
218
218
|
getEvaluatedSchema(skip_layout: boolean): string;
|
|
219
219
|
/**
|
|
220
220
|
* Get a value from the schema using dotted path notation as JavaScript object
|
|
221
|
-
*
|
|
221
|
+
*
|
|
222
222
|
* @param path - Dotted path to the value (e.g., "properties.field.value")
|
|
223
223
|
* @returns Value as JavaScript object or null if not found
|
|
224
224
|
*/
|
|
225
225
|
getSchemaByPathJS(path: string): any;
|
|
226
226
|
/**
|
|
227
227
|
* Reload schema from MessagePack-encoded bytes
|
|
228
|
-
*
|
|
228
|
+
*
|
|
229
229
|
* @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
|
|
230
230
|
* @param context - Optional context data JSON string
|
|
231
231
|
* @param data - Optional initial data JSON string
|
|
@@ -240,14 +240,14 @@ export class JSONEvalWasm {
|
|
|
240
240
|
getSchemaByPathsJS(paths_json: string, format: number): any;
|
|
241
241
|
/**
|
|
242
242
|
* Get the evaluated schema as JavaScript object
|
|
243
|
-
*
|
|
243
|
+
*
|
|
244
244
|
* @param skipLayout - Whether to skip layout resolution
|
|
245
245
|
* @returns Evaluated schema as JavaScript object
|
|
246
246
|
*/
|
|
247
247
|
getEvaluatedSchemaJS(skip_layout: boolean): any;
|
|
248
248
|
/**
|
|
249
249
|
* Reload schema from ParsedSchemaCache using a cache key
|
|
250
|
-
*
|
|
250
|
+
*
|
|
251
251
|
* @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
|
|
252
252
|
* @param context - Optional context data JSON string
|
|
253
253
|
* @param data - Optional initial data JSON string
|
|
@@ -255,7 +255,7 @@ export class JSONEvalWasm {
|
|
|
255
255
|
reloadSchemaFromCache(cache_key: string, context?: string | null, data?: string | null): void;
|
|
256
256
|
/**
|
|
257
257
|
* Get a value from the evaluated schema using dotted path notation
|
|
258
|
-
*
|
|
258
|
+
*
|
|
259
259
|
* @param path - Dotted path to the value (e.g., "properties.field.value")
|
|
260
260
|
* @param skipLayout - Whether to skip layout resolution
|
|
261
261
|
* @returns Value as JSON string or null if not found
|
|
@@ -263,17 +263,17 @@ export class JSONEvalWasm {
|
|
|
263
263
|
getEvaluatedSchemaByPath(path: string, skip_layout: boolean): string | undefined;
|
|
264
264
|
/**
|
|
265
265
|
* Get the evaluated schema in MessagePack format
|
|
266
|
-
*
|
|
266
|
+
*
|
|
267
267
|
* @param skipLayout - Whether to skip layout resolution
|
|
268
268
|
* @returns Evaluated schema as MessagePack bytes (Uint8Array)
|
|
269
|
-
*
|
|
269
|
+
*
|
|
270
270
|
* # Zero-Copy Optimization
|
|
271
|
-
*
|
|
271
|
+
*
|
|
272
272
|
* This method returns MessagePack binary data with minimal copying:
|
|
273
273
|
* 1. Serializes schema to Vec<u8> in Rust (unavoidable)
|
|
274
274
|
* 2. wasm-bindgen transfers Vec<u8> to JS as Uint8Array (optimized)
|
|
275
275
|
* 3. Result is a Uint8Array view (minimal overhead)
|
|
276
|
-
*
|
|
276
|
+
*
|
|
277
277
|
* MessagePack format is 20-50% smaller than JSON, ideal for web/WASM.
|
|
278
278
|
*/
|
|
279
279
|
getEvaluatedSchemaMsgpack(skip_layout: boolean): Uint8Array;
|
|
@@ -287,7 +287,7 @@ export class JSONEvalWasm {
|
|
|
287
287
|
getEvaluatedSchemaByPaths(paths_json: string, skip_layout: boolean, format: number): string;
|
|
288
288
|
/**
|
|
289
289
|
* Get a value from the evaluated schema using dotted path notation as JavaScript object
|
|
290
|
-
*
|
|
290
|
+
*
|
|
291
291
|
* @param path - Dotted path to the value (e.g., "properties.field.value")
|
|
292
292
|
* @param skipLayout - Whether to skip layout resolution
|
|
293
293
|
* @returns Value as JavaScript object or null if not found
|
|
@@ -303,28 +303,28 @@ export class JSONEvalWasm {
|
|
|
303
303
|
getEvaluatedSchemaByPathsJS(paths_json: string, skip_layout: boolean, format: number): any;
|
|
304
304
|
/**
|
|
305
305
|
* Get the evaluated schema without $params field
|
|
306
|
-
*
|
|
306
|
+
*
|
|
307
307
|
* @param skipLayout - Whether to skip layout resolution
|
|
308
308
|
* @returns Evaluated schema as JSON string
|
|
309
309
|
*/
|
|
310
310
|
getEvaluatedSchemaWithoutParams(skip_layout: boolean): string;
|
|
311
311
|
/**
|
|
312
312
|
* Get the evaluated schema without $params as JavaScript object
|
|
313
|
-
*
|
|
313
|
+
*
|
|
314
314
|
* @param skipLayout - Whether to skip layout resolution
|
|
315
315
|
* @returns Evaluated schema as JavaScript object
|
|
316
316
|
*/
|
|
317
317
|
getEvaluatedSchemaWithoutParamsJS(skip_layout: boolean): any;
|
|
318
318
|
/**
|
|
319
319
|
* Check if a subform exists at the given path
|
|
320
|
-
*
|
|
320
|
+
*
|
|
321
321
|
* @param subformPath - Path to check
|
|
322
322
|
* @returns True if subform exists, false otherwise
|
|
323
323
|
*/
|
|
324
324
|
hasSubform(subform_path: string): boolean;
|
|
325
325
|
/**
|
|
326
326
|
* Evaluate a subform with data
|
|
327
|
-
*
|
|
327
|
+
*
|
|
328
328
|
* @param subformPath - Path to the subform (e.g., "#/riders")
|
|
329
329
|
* @param data - JSON data string for the subform
|
|
330
330
|
* @param context - Optional context data JSON string
|
|
@@ -334,7 +334,7 @@ export class JSONEvalWasm {
|
|
|
334
334
|
evaluateSubform(subform_path: string, data: string, context?: string | null, paths?: string[] | null): void;
|
|
335
335
|
/**
|
|
336
336
|
* Validate subform data against its schema rules
|
|
337
|
-
*
|
|
337
|
+
*
|
|
338
338
|
* @param subformPath - Path to the subform
|
|
339
339
|
* @param data - JSON data string for the subform
|
|
340
340
|
* @param context - Optional context data JSON string
|
|
@@ -343,13 +343,13 @@ export class JSONEvalWasm {
|
|
|
343
343
|
validateSubform(subform_path: string, data: string, context?: string | null): ValidationResult;
|
|
344
344
|
/**
|
|
345
345
|
* Get list of available subform paths
|
|
346
|
-
*
|
|
346
|
+
*
|
|
347
347
|
* @returns Array of subform paths
|
|
348
348
|
*/
|
|
349
349
|
getSubformPaths(): string[];
|
|
350
350
|
/**
|
|
351
351
|
* Resolve layout for subform
|
|
352
|
-
*
|
|
352
|
+
*
|
|
353
353
|
* @param subformPath - Path to the subform
|
|
354
354
|
* @param evaluate - If true, runs evaluation before resolving layout
|
|
355
355
|
* @throws Error if resolve fails
|
|
@@ -357,7 +357,7 @@ export class JSONEvalWasm {
|
|
|
357
357
|
resolveLayoutSubform(subform_path: string, evaluate: boolean): void;
|
|
358
358
|
/**
|
|
359
359
|
* Get schema value from subform (all .value fields)
|
|
360
|
-
*
|
|
360
|
+
*
|
|
361
361
|
* @param subformPath - Path to the subform
|
|
362
362
|
* @returns Modified data as JavaScript object
|
|
363
363
|
*/
|
|
@@ -370,15 +370,15 @@ export class JSONEvalWasm {
|
|
|
370
370
|
*/
|
|
371
371
|
getSchemaByPathSubform(subform_path: string, schema_path: string): string | undefined;
|
|
372
372
|
/**
|
|
373
|
-
* Evaluate dependents in subform when
|
|
374
|
-
*
|
|
373
|
+
* Evaluate dependents in subform when fields change
|
|
374
|
+
*
|
|
375
375
|
* @param subformPath - Path to the subform
|
|
376
|
-
* @param
|
|
376
|
+
* @param changedPaths - JSON array of paths that changed
|
|
377
377
|
* @param data - Optional updated JSON data string
|
|
378
378
|
* @param context - Optional context data JSON string
|
|
379
379
|
* @returns Array of dependent change objects as JSON string
|
|
380
380
|
*/
|
|
381
|
-
evaluateDependentsSubform(subform_path: string,
|
|
381
|
+
evaluateDependentsSubform(subform_path: string, changed_paths_json: string, data?: string | null, context?: string | null): string;
|
|
382
382
|
/**
|
|
383
383
|
* Get schema by multiple paths from subform
|
|
384
384
|
* @param subformPath - Path to the subform
|
|
@@ -389,7 +389,7 @@ export class JSONEvalWasm {
|
|
|
389
389
|
getSchemaByPathsSubform(subform_path: string, paths_json: string, format: number): string;
|
|
390
390
|
/**
|
|
391
391
|
* Get evaluated schema from subform
|
|
392
|
-
*
|
|
392
|
+
*
|
|
393
393
|
* @param subformPath - Path to the subform
|
|
394
394
|
* @param resolveLayout - Whether to resolve layout
|
|
395
395
|
* @returns Evaluated schema as JSON string
|
|
@@ -404,25 +404,25 @@ export class JSONEvalWasm {
|
|
|
404
404
|
getSchemaByPathSubformJS(subform_path: string, schema_path: string): any;
|
|
405
405
|
/**
|
|
406
406
|
* Evaluate dependents in subform and return as JavaScript object
|
|
407
|
-
*
|
|
407
|
+
*
|
|
408
408
|
* @param subformPath - Path to the subform
|
|
409
409
|
* @param changedPath - Path of the field that changed
|
|
410
410
|
* @param data - Optional updated JSON data string
|
|
411
411
|
* @param context - Optional context data JSON string
|
|
412
412
|
* @returns Array of dependent change objects as JavaScript object
|
|
413
413
|
*/
|
|
414
|
-
evaluateDependentsSubformJS(subform_path: string,
|
|
414
|
+
evaluateDependentsSubformJS(subform_path: string, changed_paths_json: string, data?: string | null, context?: string | null): any;
|
|
415
415
|
/**
|
|
416
416
|
* Get schema by multiple paths from subform (JS object)
|
|
417
417
|
* @param subformPath - Path to the subform
|
|
418
|
-
* @param
|
|
418
|
+
* @param paths - Array of dotted paths
|
|
419
419
|
* @param format - Return format (0=Nested, 1=Flat, 2=Array)
|
|
420
420
|
* @returns Data in specified format as JavaScript object
|
|
421
421
|
*/
|
|
422
422
|
getSchemaByPathsSubformJS(subform_path: string, paths_json: string, format: number): any;
|
|
423
423
|
/**
|
|
424
424
|
* Get evaluated schema from subform as JavaScript object
|
|
425
|
-
*
|
|
425
|
+
*
|
|
426
426
|
* @param subformPath - Path to the subform
|
|
427
427
|
* @param resolveLayout - Whether to resolve layout
|
|
428
428
|
* @returns Evaluated schema as JavaScript object
|
|
@@ -430,7 +430,7 @@ export class JSONEvalWasm {
|
|
|
430
430
|
getEvaluatedSchemaSubformJS(subform_path: string, resolve_layout: boolean): any;
|
|
431
431
|
/**
|
|
432
432
|
* Get evaluated schema by specific path from subform
|
|
433
|
-
*
|
|
433
|
+
*
|
|
434
434
|
* @param subformPath - Path to the subform
|
|
435
435
|
* @param schemaPath - Dotted path to the value within the subform
|
|
436
436
|
* @param skipLayout - Whether to skip layout resolution
|
|
@@ -448,7 +448,7 @@ export class JSONEvalWasm {
|
|
|
448
448
|
getEvaluatedSchemaByPathsSubform(subform_path: string, paths_json: string, skip_layout: boolean, format: number): string;
|
|
449
449
|
/**
|
|
450
450
|
* Get evaluated schema by specific path from subform as JavaScript object
|
|
451
|
-
*
|
|
451
|
+
*
|
|
452
452
|
* @param subformPath - Path to the subform
|
|
453
453
|
* @param schemaPath - Dotted path to the value within the subform
|
|
454
454
|
* @param skipLayout - Whether to skip layout resolution
|
|
@@ -458,7 +458,7 @@ export class JSONEvalWasm {
|
|
|
458
458
|
/**
|
|
459
459
|
* Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
|
|
460
460
|
* @param subformPath - Path to the subform
|
|
461
|
-
* @param
|
|
461
|
+
* @param paths - Array of dotted paths
|
|
462
462
|
* @param skipLayout - Whether to skip layout resolution
|
|
463
463
|
* @param format - Return format (0=Nested, 1=Flat, 2=Array)
|
|
464
464
|
* @returns Data in specified format as JavaScript object
|
|
@@ -466,7 +466,7 @@ export class JSONEvalWasm {
|
|
|
466
466
|
getEvaluatedSchemaByPathsSubformJS(subform_path: string, paths_json: string, skip_layout: boolean, format: number): any;
|
|
467
467
|
/**
|
|
468
468
|
* Get evaluated schema without $params from subform
|
|
469
|
-
*
|
|
469
|
+
*
|
|
470
470
|
* @param subformPath - Path to the subform
|
|
471
471
|
* @param resolveLayout - Whether to resolve layout
|
|
472
472
|
* @returns Evaluated schema as JSON string
|
|
@@ -474,7 +474,7 @@ export class JSONEvalWasm {
|
|
|
474
474
|
getEvaluatedSchemaWithoutParamsSubform(subform_path: string, resolve_layout: boolean): string;
|
|
475
475
|
/**
|
|
476
476
|
* Get evaluated schema without $params from subform as JavaScript object
|
|
477
|
-
*
|
|
477
|
+
*
|
|
478
478
|
* @param subformPath - Path to the subform
|
|
479
479
|
* @param resolveLayout - Whether to resolve layout
|
|
480
480
|
* @returns Evaluated schema as JavaScript object
|
package/pkg/json_eval_rs_bg.js
CHANGED
|
@@ -1496,27 +1496,27 @@ export class JSONEvalWasm {
|
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
/**
|
|
1499
|
-
* Evaluate dependents in subform when
|
|
1499
|
+
* Evaluate dependents in subform when fields change
|
|
1500
1500
|
*
|
|
1501
1501
|
* @param subformPath - Path to the subform
|
|
1502
|
-
* @param
|
|
1502
|
+
* @param changedPaths - JSON array of paths that changed
|
|
1503
1503
|
* @param data - Optional updated JSON data string
|
|
1504
1504
|
* @param context - Optional context data JSON string
|
|
1505
1505
|
* @returns Array of dependent change objects as JSON string
|
|
1506
1506
|
* @param {string} subform_path
|
|
1507
|
-
* @param {string}
|
|
1507
|
+
* @param {string} changed_paths_json
|
|
1508
1508
|
* @param {string | null} [data]
|
|
1509
1509
|
* @param {string | null} [context]
|
|
1510
1510
|
* @returns {string}
|
|
1511
1511
|
*/
|
|
1512
|
-
evaluateDependentsSubform(subform_path,
|
|
1512
|
+
evaluateDependentsSubform(subform_path, changed_paths_json, data, context) {
|
|
1513
1513
|
let deferred6_0;
|
|
1514
1514
|
let deferred6_1;
|
|
1515
1515
|
try {
|
|
1516
1516
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1517
1517
|
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1518
1518
|
const len0 = WASM_VECTOR_LEN;
|
|
1519
|
-
const ptr1 = passStringToWasm0(
|
|
1519
|
+
const ptr1 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1520
1520
|
const len1 = WASM_VECTOR_LEN;
|
|
1521
1521
|
var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1522
1522
|
var len2 = WASM_VECTOR_LEN;
|
|
@@ -1645,17 +1645,17 @@ export class JSONEvalWasm {
|
|
|
1645
1645
|
* @param context - Optional context data JSON string
|
|
1646
1646
|
* @returns Array of dependent change objects as JavaScript object
|
|
1647
1647
|
* @param {string} subform_path
|
|
1648
|
-
* @param {string}
|
|
1648
|
+
* @param {string} changed_paths_json
|
|
1649
1649
|
* @param {string | null} [data]
|
|
1650
1650
|
* @param {string | null} [context]
|
|
1651
1651
|
* @returns {any}
|
|
1652
1652
|
*/
|
|
1653
|
-
evaluateDependentsSubformJS(subform_path,
|
|
1653
|
+
evaluateDependentsSubformJS(subform_path, changed_paths_json, data, context) {
|
|
1654
1654
|
try {
|
|
1655
1655
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1656
1656
|
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1657
1657
|
const len0 = WASM_VECTOR_LEN;
|
|
1658
|
-
const ptr1 = passStringToWasm0(
|
|
1658
|
+
const ptr1 = passStringToWasm0(changed_paths_json, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1659
1659
|
const len1 = WASM_VECTOR_LEN;
|
|
1660
1660
|
var ptr2 = isLikeNone(data) ? 0 : passStringToWasm0(data, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1661
1661
|
var len2 = WASM_VECTOR_LEN;
|
|
@@ -1676,7 +1676,7 @@ export class JSONEvalWasm {
|
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Get schema by multiple paths from subform (JS object)
|
|
1678
1678
|
* @param subformPath - Path to the subform
|
|
1679
|
-
* @param
|
|
1679
|
+
* @param paths - Array of dotted paths
|
|
1680
1680
|
* @param format - Return format (0=Nested, 1=Flat, 2=Array)
|
|
1681
1681
|
* @returns Data in specified format as JavaScript object
|
|
1682
1682
|
* @param {string} subform_path
|
|
@@ -1837,7 +1837,7 @@ export class JSONEvalWasm {
|
|
|
1837
1837
|
/**
|
|
1838
1838
|
* Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
|
|
1839
1839
|
* @param subformPath - Path to the subform
|
|
1840
|
-
* @param
|
|
1840
|
+
* @param paths - Array of dotted paths
|
|
1841
1841
|
* @param skipLayout - Whether to skip layout resolution
|
|
1842
1842
|
* @param format - Return format (0=Nested, 1=Flat, 2=Array)
|
|
1843
1843
|
* @returns Data in specified format as JavaScript object
|
|
@@ -2180,7 +2180,7 @@ export function __wbg_getTime_6bb3f64e0f18f817(arg0) {
|
|
|
2180
2180
|
return ret;
|
|
2181
2181
|
};
|
|
2182
2182
|
|
|
2183
|
-
export function
|
|
2183
|
+
export function __wbg_log_335f2dafcd729af1(arg0, arg1) {
|
|
2184
2184
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
2185
2185
|
};
|
|
2186
2186
|
|
package/pkg/json_eval_rs_bg.wasm
CHANGED
|
Binary file
|