@goplasmatic/dataflow-ui 2.0.17 → 2.0.18
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 +6 -5
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -457,12 +457,13 @@ const X = createLucideIcon("X", [
|
|
|
457
457
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
458
458
|
]);
|
|
459
459
|
function isBuiltinFunction(name) {
|
|
460
|
-
return name === "map" || name === "validation";
|
|
460
|
+
return name === "map" || name === "validation" || name === "validate";
|
|
461
461
|
}
|
|
462
462
|
function getFunctionDisplayInfo(name) {
|
|
463
463
|
switch (name) {
|
|
464
464
|
case "map":
|
|
465
465
|
return { label: "Map", colorClass: "df-function-badge-map", Icon: ArrowRightLeft };
|
|
466
|
+
case "validate":
|
|
466
467
|
case "validation":
|
|
467
468
|
return { label: "Validation", colorClass: "df-function-badge-validation", Icon: CircleCheckBig };
|
|
468
469
|
default:
|
|
@@ -31864,7 +31865,7 @@ function getTaskSubtitle(task) {
|
|
|
31864
31865
|
return `${count} mapping${count !== 1 ? "s" : ""}`;
|
|
31865
31866
|
}
|
|
31866
31867
|
}
|
|
31867
|
-
if (fn.name === "validation" && fn.input) {
|
|
31868
|
+
if ((fn.name === "validation" || fn.name === "validate") && fn.input) {
|
|
31868
31869
|
const input = fn.input;
|
|
31869
31870
|
if (input.rules) {
|
|
31870
31871
|
const count = input.rules.length;
|
|
@@ -32503,7 +32504,7 @@ function TaskContent({ selection: selection2 }) {
|
|
|
32503
32504
|
if (step.workflow_id === selection2.workflow.id && step.task_id === task.id && step.result === "executed") {
|
|
32504
32505
|
if (functionName === "map") {
|
|
32505
32506
|
debugData = getMappingContext(step, 0);
|
|
32506
|
-
} else if (functionName === "validation" && step.message) {
|
|
32507
|
+
} else if ((functionName === "validation" || functionName === "validate") && step.message) {
|
|
32507
32508
|
debugData = step.message.context;
|
|
32508
32509
|
}
|
|
32509
32510
|
}
|
|
@@ -32522,7 +32523,7 @@ function TaskContent({ selection: selection2 }) {
|
|
|
32522
32523
|
}
|
|
32523
32524
|
) }) });
|
|
32524
32525
|
}
|
|
32525
|
-
if (functionName === "validation") {
|
|
32526
|
+
if (functionName === "validation" || functionName === "validate") {
|
|
32526
32527
|
const rules = (input == null ? void 0 : input.rules) || [];
|
|
32527
32528
|
const andExpression = {
|
|
32528
32529
|
and: rules.map((rule) => rule.logic)
|
|
@@ -37030,7 +37031,7 @@ function TaskNode({
|
|
|
37030
37031
|
const input = task.function.input;
|
|
37031
37032
|
const hasCondition2 = task.condition !== void 0 && task.condition !== null && task.condition !== true;
|
|
37032
37033
|
const mappings = functionName === "map" ? (input == null ? void 0 : input.mappings) || [] : [];
|
|
37033
|
-
const rules = functionName === "validation" ? (input == null ? void 0 : input.rules) || [] : [];
|
|
37034
|
+
const rules = functionName === "validation" || functionName === "validate" ? (input == null ? void 0 : input.rules) || [] : [];
|
|
37034
37035
|
const hasChildren = hasCondition2 || mappings.length > 0 || rules.length > 0;
|
|
37035
37036
|
const isTaskSelected = selection2.type === "task" && selection2.task.id === task.id && selection2.workflow.id === workflow.id;
|
|
37036
37037
|
const taskDebugState = useTaskDebugState(task, workflow);
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare interface AuditTrail {
|
|
|
26
26
|
/**
|
|
27
27
|
* Built-in function types
|
|
28
28
|
*/
|
|
29
|
-
export declare type BuiltinFunctionType = 'map' | 'validation';
|
|
29
|
+
export declare type BuiltinFunctionType = 'map' | 'validation' | 'validate';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* A single change in the audit trail
|
|
@@ -725,6 +725,8 @@ export declare interface ValidationRule {
|
|
|
725
725
|
logic: JsonLogicValue;
|
|
726
726
|
/** Error message if validation fails */
|
|
727
727
|
message: string;
|
|
728
|
+
/** Optional path for the validation target */
|
|
729
|
+
path?: string;
|
|
728
730
|
}
|
|
729
731
|
|
|
730
732
|
export { WasmEngineAdapter }
|
package/dist/index.js
CHANGED
|
@@ -455,12 +455,13 @@ const X = createLucideIcon("X", [
|
|
|
455
455
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
456
456
|
]);
|
|
457
457
|
function isBuiltinFunction(name) {
|
|
458
|
-
return name === "map" || name === "validation";
|
|
458
|
+
return name === "map" || name === "validation" || name === "validate";
|
|
459
459
|
}
|
|
460
460
|
function getFunctionDisplayInfo(name) {
|
|
461
461
|
switch (name) {
|
|
462
462
|
case "map":
|
|
463
463
|
return { label: "Map", colorClass: "df-function-badge-map", Icon: ArrowRightLeft };
|
|
464
|
+
case "validate":
|
|
464
465
|
case "validation":
|
|
465
466
|
return { label: "Validation", colorClass: "df-function-badge-validation", Icon: CircleCheckBig };
|
|
466
467
|
default:
|
|
@@ -31862,7 +31863,7 @@ function getTaskSubtitle(task) {
|
|
|
31862
31863
|
return `${count} mapping${count !== 1 ? "s" : ""}`;
|
|
31863
31864
|
}
|
|
31864
31865
|
}
|
|
31865
|
-
if (fn.name === "validation" && fn.input) {
|
|
31866
|
+
if ((fn.name === "validation" || fn.name === "validate") && fn.input) {
|
|
31866
31867
|
const input = fn.input;
|
|
31867
31868
|
if (input.rules) {
|
|
31868
31869
|
const count = input.rules.length;
|
|
@@ -32501,7 +32502,7 @@ function TaskContent({ selection: selection2 }) {
|
|
|
32501
32502
|
if (step.workflow_id === selection2.workflow.id && step.task_id === task.id && step.result === "executed") {
|
|
32502
32503
|
if (functionName === "map") {
|
|
32503
32504
|
debugData = getMappingContext(step, 0);
|
|
32504
|
-
} else if (functionName === "validation" && step.message) {
|
|
32505
|
+
} else if ((functionName === "validation" || functionName === "validate") && step.message) {
|
|
32505
32506
|
debugData = step.message.context;
|
|
32506
32507
|
}
|
|
32507
32508
|
}
|
|
@@ -32520,7 +32521,7 @@ function TaskContent({ selection: selection2 }) {
|
|
|
32520
32521
|
}
|
|
32521
32522
|
) }) });
|
|
32522
32523
|
}
|
|
32523
|
-
if (functionName === "validation") {
|
|
32524
|
+
if (functionName === "validation" || functionName === "validate") {
|
|
32524
32525
|
const rules = (input == null ? void 0 : input.rules) || [];
|
|
32525
32526
|
const andExpression = {
|
|
32526
32527
|
and: rules.map((rule) => rule.logic)
|
|
@@ -37028,7 +37029,7 @@ function TaskNode({
|
|
|
37028
37029
|
const input = task.function.input;
|
|
37029
37030
|
const hasCondition2 = task.condition !== void 0 && task.condition !== null && task.condition !== true;
|
|
37030
37031
|
const mappings = functionName === "map" ? (input == null ? void 0 : input.mappings) || [] : [];
|
|
37031
|
-
const rules = functionName === "validation" ? (input == null ? void 0 : input.rules) || [] : [];
|
|
37032
|
+
const rules = functionName === "validation" || functionName === "validate" ? (input == null ? void 0 : input.rules) || [] : [];
|
|
37032
37033
|
const hasChildren = hasCondition2 || mappings.length > 0 || rules.length > 0;
|
|
37033
37034
|
const isTaskSelected = selection2.type === "task" && selection2.task.id === task.id && selection2.workflow.id === workflow.id;
|
|
37034
37035
|
const taskDebugState = useTaskDebugState(task, workflow);
|
package/package.json
CHANGED