@decaf-ts/ui-decorators 0.20.8 → 0.21.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/ui-decorators.cjs +1 -1
- package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs +19 -0
- package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs.map +1 -1
- package/lib/cjs/graph/catalog/GraphPortManifestElement.cjs +15 -0
- package/lib/cjs/graph/catalog/GraphPortManifestElement.cjs.map +1 -0
- package/lib/cjs/graph/catalog/index.cjs +1 -0
- package/lib/cjs/graph/catalog/index.cjs.map +1 -1
- package/lib/cjs/graph/{nodes/category-styles.cjs → category-styles.cjs} +2 -2
- package/lib/cjs/graph/category-styles.cjs.map +1 -0
- package/lib/cjs/graph/index.cjs +1 -1
- package/lib/cjs/graph/index.cjs.map +1 -1
- package/lib/cjs/graph/reader.cjs +26 -0
- package/lib/cjs/graph/reader.cjs.map +1 -1
- package/lib/cjs/graph/snapshot.cjs +0 -691
- package/lib/cjs/graph/snapshot.cjs.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/esm/graph/catalog/GraphManifestCompiler.js +20 -1
- package/lib/esm/graph/catalog/GraphManifestCompiler.js.map +1 -1
- package/lib/esm/graph/catalog/GraphPortManifest.js.map +1 -1
- package/lib/esm/graph/catalog/GraphPortManifestElement.js +11 -0
- package/lib/esm/graph/catalog/GraphPortManifestElement.js.map +1 -0
- package/lib/esm/graph/catalog/index.js +1 -0
- package/lib/esm/graph/catalog/index.js.map +1 -1
- package/lib/esm/graph/{nodes/category-styles.js → category-styles.js} +2 -2
- package/lib/esm/graph/category-styles.js.map +1 -0
- package/lib/esm/graph/index.js +1 -1
- package/lib/esm/graph/index.js.map +1 -1
- package/lib/esm/graph/reader.js +25 -0
- package/lib/esm/graph/reader.js.map +1 -1
- package/lib/esm/graph/snapshot.js +1 -679
- package/lib/esm/graph/snapshot.js.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/types/graph/catalog/GraphPortManifest.d.cts +2 -0
- package/lib/types/graph/catalog/GraphPortManifest.d.mts +2 -0
- package/lib/types/graph/catalog/GraphPortManifestElement.d.cts +7 -0
- package/lib/types/graph/catalog/GraphPortManifestElement.d.mts +7 -0
- package/lib/types/graph/catalog/index.d.cts +1 -0
- package/lib/types/graph/catalog/index.d.mts +1 -0
- package/lib/types/graph/document/GraphNodeInstance.d.cts +20 -0
- package/lib/types/graph/document/GraphNodeInstance.d.mts +20 -0
- package/lib/types/graph/index.d.cts +1 -1
- package/lib/types/graph/index.d.mts +1 -1
- package/lib/types/graph/reader.d.cts +12 -0
- package/lib/types/graph/reader.d.mts +12 -0
- package/lib/types/graph/snapshot.d.cts +4 -144
- package/lib/types/graph/snapshot.d.mts +4 -144
- package/lib/types/graph/types.d.cts +1 -1
- package/lib/types/graph/types.d.mts +1 -1
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/package.json +1 -1
- package/lib/cjs/graph/nodes/agents/agent.cjs +0 -110
- package/lib/cjs/graph/nodes/agents/agent.cjs.map +0 -1
- package/lib/cjs/graph/nodes/base.cjs +0 -36
- package/lib/cjs/graph/nodes/base.cjs.map +0 -1
- package/lib/cjs/graph/nodes/boundary/input-value.cjs +0 -57
- package/lib/cjs/graph/nodes/boundary/input-value.cjs.map +0 -1
- package/lib/cjs/graph/nodes/category-styles.cjs.map +0 -1
- package/lib/cjs/graph/nodes/flow-control/break.cjs +0 -63
- package/lib/cjs/graph/nodes/flow-control/break.cjs.map +0 -1
- package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs +0 -67
- package/lib/cjs/graph/nodes/flow-control/error-boundary.cjs.map +0 -1
- package/lib/cjs/graph/nodes/flow-control/human-approval.cjs +0 -69
- package/lib/cjs/graph/nodes/flow-control/human-approval.cjs.map +0 -1
- package/lib/cjs/graph/nodes/flow-control/if.cjs +0 -71
- package/lib/cjs/graph/nodes/flow-control/if.cjs.map +0 -1
- package/lib/cjs/graph/nodes/flow-control/parallel.cjs +0 -61
- package/lib/cjs/graph/nodes/flow-control/parallel.cjs.map +0 -1
- package/lib/cjs/graph/nodes/flow-control/switch.cjs +0 -126
- package/lib/cjs/graph/nodes/flow-control/switch.cjs.map +0 -1
- package/lib/cjs/graph/nodes/index.cjs +0 -123
- package/lib/cjs/graph/nodes/index.cjs.map +0 -1
- package/lib/cjs/graph/nodes/loops/foreach.cjs +0 -86
- package/lib/cjs/graph/nodes/loops/foreach.cjs.map +0 -1
- package/lib/cjs/graph/nodes/loops/until.cjs +0 -74
- package/lib/cjs/graph/nodes/loops/until.cjs.map +0 -1
- package/lib/cjs/graph/nodes/loops/while.cjs +0 -74
- package/lib/cjs/graph/nodes/loops/while.cjs.map +0 -1
- package/lib/cjs/graph/nodes/manifests.cjs +0 -342
- package/lib/cjs/graph/nodes/manifests.cjs.map +0 -1
- package/lib/cjs/graph/nodes/triggers/chat.cjs +0 -70
- package/lib/cjs/graph/nodes/triggers/chat.cjs.map +0 -1
- package/lib/cjs/graph/nodes/triggers/event.cjs +0 -58
- package/lib/cjs/graph/nodes/triggers/event.cjs.map +0 -1
- package/lib/cjs/graph/nodes/triggers/form.cjs +0 -59
- package/lib/cjs/graph/nodes/triggers/form.cjs.map +0 -1
- package/lib/cjs/graph/nodes/triggers/manual.cjs +0 -60
- package/lib/cjs/graph/nodes/triggers/manual.cjs.map +0 -1
- package/lib/cjs/graph/nodes/triggers/schedule.cjs +0 -60
- package/lib/cjs/graph/nodes/triggers/schedule.cjs.map +0 -1
- package/lib/cjs/graph/nodes/triggers/webhook.cjs +0 -62
- package/lib/cjs/graph/nodes/triggers/webhook.cjs.map +0 -1
- package/lib/cjs/graph/nodes/utility/code.cjs +0 -99
- package/lib/cjs/graph/nodes/utility/code.cjs.map +0 -1
- package/lib/cjs/graph/nodes/utility/delay.cjs +0 -61
- package/lib/cjs/graph/nodes/utility/delay.cjs.map +0 -1
- package/lib/cjs/graph/nodes/utility/log.cjs +0 -62
- package/lib/cjs/graph/nodes/utility/log.cjs.map +0 -1
- package/lib/cjs/graph/nodes/utility/map.cjs +0 -61
- package/lib/cjs/graph/nodes/utility/map.cjs.map +0 -1
- package/lib/cjs/graph/nodes/utility/merge.cjs +0 -62
- package/lib/cjs/graph/nodes/utility/merge.cjs.map +0 -1
- package/lib/cjs/graph/nodes/utility/return.cjs +0 -61
- package/lib/cjs/graph/nodes/utility/return.cjs.map +0 -1
- package/lib/cjs/graph/nodes/utility/utility-log.cjs +0 -66
- package/lib/cjs/graph/nodes/utility/utility-log.cjs.map +0 -1
- package/lib/esm/graph/nodes/agents/agent.js +0 -101
- package/lib/esm/graph/nodes/agents/agent.js.map +0 -1
- package/lib/esm/graph/nodes/base.js +0 -31
- package/lib/esm/graph/nodes/base.js.map +0 -1
- package/lib/esm/graph/nodes/boundary/input-value.js +0 -48
- package/lib/esm/graph/nodes/boundary/input-value.js.map +0 -1
- package/lib/esm/graph/nodes/category-styles.js.map +0 -1
- package/lib/esm/graph/nodes/flow-control/break.js +0 -54
- package/lib/esm/graph/nodes/flow-control/break.js.map +0 -1
- package/lib/esm/graph/nodes/flow-control/error-boundary.js +0 -58
- package/lib/esm/graph/nodes/flow-control/error-boundary.js.map +0 -1
- package/lib/esm/graph/nodes/flow-control/human-approval.js +0 -60
- package/lib/esm/graph/nodes/flow-control/human-approval.js.map +0 -1
- package/lib/esm/graph/nodes/flow-control/if.js +0 -62
- package/lib/esm/graph/nodes/flow-control/if.js.map +0 -1
- package/lib/esm/graph/nodes/flow-control/parallel.js +0 -52
- package/lib/esm/graph/nodes/flow-control/parallel.js.map +0 -1
- package/lib/esm/graph/nodes/flow-control/switch.js +0 -117
- package/lib/esm/graph/nodes/flow-control/switch.js.map +0 -1
- package/lib/esm/graph/nodes/index.js +0 -105
- package/lib/esm/graph/nodes/index.js.map +0 -1
- package/lib/esm/graph/nodes/loops/foreach.js +0 -77
- package/lib/esm/graph/nodes/loops/foreach.js.map +0 -1
- package/lib/esm/graph/nodes/loops/until.js +0 -65
- package/lib/esm/graph/nodes/loops/until.js.map +0 -1
- package/lib/esm/graph/nodes/loops/while.js +0 -65
- package/lib/esm/graph/nodes/loops/while.js.map +0 -1
- package/lib/esm/graph/nodes/manifests.js +0 -338
- package/lib/esm/graph/nodes/manifests.js.map +0 -1
- package/lib/esm/graph/nodes/triggers/chat.js +0 -61
- package/lib/esm/graph/nodes/triggers/chat.js.map +0 -1
- package/lib/esm/graph/nodes/triggers/event.js +0 -49
- package/lib/esm/graph/nodes/triggers/event.js.map +0 -1
- package/lib/esm/graph/nodes/triggers/form.js +0 -50
- package/lib/esm/graph/nodes/triggers/form.js.map +0 -1
- package/lib/esm/graph/nodes/triggers/manual.js +0 -51
- package/lib/esm/graph/nodes/triggers/manual.js.map +0 -1
- package/lib/esm/graph/nodes/triggers/schedule.js +0 -51
- package/lib/esm/graph/nodes/triggers/schedule.js.map +0 -1
- package/lib/esm/graph/nodes/triggers/webhook.js +0 -53
- package/lib/esm/graph/nodes/triggers/webhook.js.map +0 -1
- package/lib/esm/graph/nodes/utility/code.js +0 -90
- package/lib/esm/graph/nodes/utility/code.js.map +0 -1
- package/lib/esm/graph/nodes/utility/delay.js +0 -52
- package/lib/esm/graph/nodes/utility/delay.js.map +0 -1
- package/lib/esm/graph/nodes/utility/log.js +0 -53
- package/lib/esm/graph/nodes/utility/log.js.map +0 -1
- package/lib/esm/graph/nodes/utility/map.js +0 -52
- package/lib/esm/graph/nodes/utility/map.js.map +0 -1
- package/lib/esm/graph/nodes/utility/merge.js +0 -53
- package/lib/esm/graph/nodes/utility/merge.js.map +0 -1
- package/lib/esm/graph/nodes/utility/return.js +0 -52
- package/lib/esm/graph/nodes/utility/return.js.map +0 -1
- package/lib/esm/graph/nodes/utility/utility-log.js +0 -57
- package/lib/esm/graph/nodes/utility/utility-log.js.map +0 -1
- package/lib/types/graph/nodes/agents/agent.d.cts +0 -44
- package/lib/types/graph/nodes/agents/agent.d.mts +0 -44
- package/lib/types/graph/nodes/base.d.cts +0 -28
- package/lib/types/graph/nodes/base.d.mts +0 -28
- package/lib/types/graph/nodes/boundary/input-value.d.cts +0 -13
- package/lib/types/graph/nodes/boundary/input-value.d.mts +0 -13
- package/lib/types/graph/nodes/flow-control/break.d.cts +0 -15
- package/lib/types/graph/nodes/flow-control/break.d.mts +0 -15
- package/lib/types/graph/nodes/flow-control/error-boundary.d.cts +0 -12
- package/lib/types/graph/nodes/flow-control/error-boundary.d.mts +0 -12
- package/lib/types/graph/nodes/flow-control/human-approval.d.cts +0 -13
- package/lib/types/graph/nodes/flow-control/human-approval.d.mts +0 -13
- package/lib/types/graph/nodes/flow-control/if.d.cts +0 -16
- package/lib/types/graph/nodes/flow-control/if.d.mts +0 -16
- package/lib/types/graph/nodes/flow-control/parallel.d.cts +0 -11
- package/lib/types/graph/nodes/flow-control/parallel.d.mts +0 -11
- package/lib/types/graph/nodes/flow-control/switch.d.cts +0 -21
- package/lib/types/graph/nodes/flow-control/switch.d.mts +0 -21
- package/lib/types/graph/nodes/index.d.cts +0 -79
- package/lib/types/graph/nodes/index.d.mts +0 -79
- package/lib/types/graph/nodes/loops/foreach.d.cts +0 -19
- package/lib/types/graph/nodes/loops/foreach.d.mts +0 -19
- package/lib/types/graph/nodes/loops/until.d.cts +0 -16
- package/lib/types/graph/nodes/loops/until.d.mts +0 -16
- package/lib/types/graph/nodes/loops/while.d.cts +0 -16
- package/lib/types/graph/nodes/loops/while.d.mts +0 -16
- package/lib/types/graph/nodes/manifests.d.cts +0 -62
- package/lib/types/graph/nodes/manifests.d.mts +0 -62
- package/lib/types/graph/nodes/triggers/chat.d.cts +0 -13
- package/lib/types/graph/nodes/triggers/chat.d.mts +0 -13
- package/lib/types/graph/nodes/triggers/event.d.cts +0 -10
- package/lib/types/graph/nodes/triggers/event.d.mts +0 -10
- package/lib/types/graph/nodes/triggers/form.d.cts +0 -11
- package/lib/types/graph/nodes/triggers/form.d.mts +0 -11
- package/lib/types/graph/nodes/triggers/manual.d.cts +0 -12
- package/lib/types/graph/nodes/triggers/manual.d.mts +0 -12
- package/lib/types/graph/nodes/triggers/schedule.d.cts +0 -11
- package/lib/types/graph/nodes/triggers/schedule.d.mts +0 -11
- package/lib/types/graph/nodes/triggers/webhook.d.cts +0 -11
- package/lib/types/graph/nodes/triggers/webhook.d.mts +0 -11
- package/lib/types/graph/nodes/utility/code.d.cts +0 -31
- package/lib/types/graph/nodes/utility/code.d.mts +0 -31
- package/lib/types/graph/nodes/utility/delay.d.cts +0 -11
- package/lib/types/graph/nodes/utility/delay.d.mts +0 -11
- package/lib/types/graph/nodes/utility/log.d.cts +0 -13
- package/lib/types/graph/nodes/utility/log.d.mts +0 -13
- package/lib/types/graph/nodes/utility/map.d.cts +0 -11
- package/lib/types/graph/nodes/utility/map.d.mts +0 -11
- package/lib/types/graph/nodes/utility/merge.d.cts +0 -12
- package/lib/types/graph/nodes/utility/merge.d.mts +0 -12
- package/lib/types/graph/nodes/utility/return.d.cts +0 -11
- package/lib/types/graph/nodes/utility/return.d.mts +0 -11
- package/lib/types/graph/nodes/utility/utility-log.d.cts +0 -15
- package/lib/types/graph/nodes/utility/utility-log.d.mts +0 -15
- /package/lib/types/graph/{nodes/category-styles.d.cts → category-styles.d.cts} +0 -0
- /package/lib/types/graph/{nodes/category-styles.d.mts → category-styles.d.mts} +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @module ui-decorators/graph/nodes/flow-control/switch
|
|
12
|
-
* @summary Switch flow-control node declaration (DECAF-32 §22.2.2).
|
|
13
|
-
* @description Switch — multi-branch. Routes the input to one of the case
|
|
14
|
-
* output ports or `default` based on matching conditions. Each case defines
|
|
15
|
-
* a `SwitchCaseCondition` (graphical or code mode) and a dedicated output
|
|
16
|
-
* port. Cases are stored in `metadata.switch.cases` and the renderer creates
|
|
17
|
-
* dynamic output ports from them (DECAF-32 §22.2.2).
|
|
18
|
-
*
|
|
19
|
-
* The node grows in height as cases are added. Each case gets its own
|
|
20
|
-
* output port on the right side, labeled with the case label.
|
|
21
|
-
*/
|
|
22
|
-
import { model, required } from "@decaf-ts/decorator-validation";
|
|
23
|
-
import { uielement } from "./../../../ui/decorators.js";
|
|
24
|
-
import { input, node, output, } from "./../../decorators.js";
|
|
25
|
-
import { PortDirection, graphNodeSizeOf, } from "./../../constants.js";
|
|
26
|
-
import { graphDefinitionOf } from "./../../reader.js";
|
|
27
|
-
import { GraphNode } from "./../base.js";
|
|
28
|
-
// Ensure category styles are registered (idempotent).
|
|
29
|
-
import "./../category-styles.js";
|
|
30
|
-
let SwitchFlowNode = class SwitchFlowNode extends GraphNode {
|
|
31
|
-
/**
|
|
32
|
-
* Computes the node's ports, size, and data patch from the given switch
|
|
33
|
-
* metadata. Each case gets its own output port on the right side; the
|
|
34
|
-
* `default` port always renders **last** (DECAF-32 §21 port-ordering rule,
|
|
35
|
-
* DECAF-34 §6.2). When `hasDefault` is `false`, the `default` output port
|
|
36
|
-
* is omitted entirely. The node grows in height as cases are added.
|
|
37
|
-
*
|
|
38
|
-
* @param meta - The switch metadata patch (`metadata.switch`), carrying
|
|
39
|
-
* the cases and the optional default-port configuration.
|
|
40
|
-
* @returns The computed {@link NodeMetadataChange}: reordered ports
|
|
41
|
-
* (case outputs inserted before the optional default), the grown size,
|
|
42
|
-
* and the `switchMetadata` data patch.
|
|
43
|
-
*/
|
|
44
|
-
static applyMetadata(meta) {
|
|
45
|
-
const definition = graphDefinitionOf(this);
|
|
46
|
-
const defaultPortName = meta.defaultPort ?? "default";
|
|
47
|
-
const hasDefault = meta.hasDefault === true;
|
|
48
|
-
// Base ports excluding any port that collides with a case output port.
|
|
49
|
-
const basePorts = definition.ports.filter((p) => !meta.cases.some((c) => c.outputPort === p.property));
|
|
50
|
-
// Separate the default output port so it can be placed last (or omitted).
|
|
51
|
-
const nonDefaultPorts = basePorts.filter((p) => p.property !== defaultPortName);
|
|
52
|
-
const defaultPort = basePorts.find((p) => p.property === defaultPortName);
|
|
53
|
-
const casePorts = meta.cases.map((c) => ({
|
|
54
|
-
property: c.outputPort,
|
|
55
|
-
name: c.label,
|
|
56
|
-
direction: PortDirection.OUTPUT,
|
|
57
|
-
label: c.label,
|
|
58
|
-
required: false,
|
|
59
|
-
hidden: false,
|
|
60
|
-
path: c.outputPort,
|
|
61
|
-
}));
|
|
62
|
-
// Port order: inputs/non-default outputs first, case outputs next, default last.
|
|
63
|
-
const ports = [...nonDefaultPorts, ...casePorts];
|
|
64
|
-
if (hasDefault && defaultPort) {
|
|
65
|
-
ports.push(defaultPort);
|
|
66
|
-
}
|
|
67
|
-
const caseCount = meta.cases.length;
|
|
68
|
-
return {
|
|
69
|
-
ports,
|
|
70
|
-
size: graphNodeSizeOf(definition, { cases: caseCount }),
|
|
71
|
-
dataPatch: { switchMetadata: meta },
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
__decorate([
|
|
76
|
-
required(),
|
|
77
|
-
uielement("textarea", { label: "Input value", placeholder: "Value to switch on" }),
|
|
78
|
-
input({ handle: "value" }),
|
|
79
|
-
__metadata("design:type", Object)
|
|
80
|
-
], SwitchFlowNode.prototype, "value", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
required(),
|
|
83
|
-
uielement("input", { label: "Default", placeholder: "Default output when no case matches" }),
|
|
84
|
-
output({ handle: "default" }),
|
|
85
|
-
__metadata("design:type", Object)
|
|
86
|
-
], SwitchFlowNode.prototype, "default", void 0);
|
|
87
|
-
SwitchFlowNode = __decorate([
|
|
88
|
-
node("core.flow.switch", {
|
|
89
|
-
kind: "core.flow.switch",
|
|
90
|
-
category: "Flow Control",
|
|
91
|
-
color: "#f59e0b",
|
|
92
|
-
icon: "ti-arrows-shuffle",
|
|
93
|
-
width: 120,
|
|
94
|
-
height: 140,
|
|
95
|
-
sizeRules: [
|
|
96
|
-
{
|
|
97
|
-
type: "parameterCount",
|
|
98
|
-
parameter: "cases",
|
|
99
|
-
dimension: "height",
|
|
100
|
-
perItem: 24,
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
labels: ["flow", "switch", "multi-branch"],
|
|
104
|
-
metadata: {
|
|
105
|
-
title: "Switch",
|
|
106
|
-
description: "Multi-branch switch. Routes the input to the first matching case output, or the default output.",
|
|
107
|
-
switch: {
|
|
108
|
-
cases: [],
|
|
109
|
-
defaultPort: "default",
|
|
110
|
-
hasDefault: false,
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
}),
|
|
114
|
-
model()
|
|
115
|
-
], SwitchFlowNode);
|
|
116
|
-
export { SwitchFlowNode };
|
|
117
|
-
//# sourceMappingURL=switch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../../../src/graph/nodes/flow-control/switch.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,oCAA+B;AACnD,OAAO,EACL,KAAK,EACL,IAAI,EACJ,MAAM,GACP,8BAAyB;AAC1B,OAAO,EACL,aAAa,EACb,eAAe,GAEhB,6BAAwB;AACzB,O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E,QAAQ;YACf,WAAW,EAAE,iGAAiG;YAC9G,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,SAAS;gBACtB,UAAU,EAAE,KAAK;aAClB;SACF;KACF,CAAC;IACD,KAAK,EAAE;GACK,cAAc,CA8D1B"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module ui-decorators/graph/nodes
|
|
3
|
-
* @summary Shared node kind declarations (DECAF-32 §22.2, DECAF-50 Phase A).
|
|
4
|
-
* @description Canonical `@node`-decorated classes for the ALFRED-5 node kind
|
|
5
|
-
* taxonomy, laid out one node per file under `nodes/<category>/<node>.ts`:
|
|
6
|
-
* triggers (§22.2.1), flow-control and utility nodes (§22.2.2–22.2.3), the
|
|
7
|
-
* Agent node (§21.3), the three loop kinds (`core.loop.foreach/while/until`,
|
|
8
|
-
* §5.9), and the workflow input-value boundary node. Shared non-node support
|
|
9
|
-
* (base class, category styles, manifests) lives in sibling files under the
|
|
10
|
-
* same tree. Consumers (for-angular, ALFRED, etc.) import these declarations
|
|
11
|
-
* to populate node palettes, registries, and reference snapshots.
|
|
12
|
-
*/
|
|
13
|
-
export * from "./base.js";
|
|
14
|
-
export * from "./category-styles.js";
|
|
15
|
-
export * from "./flow-control/break.js";
|
|
16
|
-
export * from "./flow-control/error-boundary.js";
|
|
17
|
-
export * from "./flow-control/human-approval.js";
|
|
18
|
-
export * from "./flow-control/if.js";
|
|
19
|
-
export * from "./flow-control/parallel.js";
|
|
20
|
-
export * from "./flow-control/switch.js";
|
|
21
|
-
export * from "./utility/code.js";
|
|
22
|
-
export * from "./utility/delay.js";
|
|
23
|
-
export * from "./utility/log.js";
|
|
24
|
-
export * from "./utility/map.js";
|
|
25
|
-
export * from "./utility/merge.js";
|
|
26
|
-
export * from "./utility/return.js";
|
|
27
|
-
export * from "./utility/utility-log.js";
|
|
28
|
-
export * from "./triggers/chat.js";
|
|
29
|
-
export * from "./triggers/event.js";
|
|
30
|
-
export * from "./triggers/form.js";
|
|
31
|
-
export * from "./triggers/manual.js";
|
|
32
|
-
export * from "./triggers/schedule.js";
|
|
33
|
-
export * from "./triggers/webhook.js";
|
|
34
|
-
export * from "./agents/agent.js";
|
|
35
|
-
export * from "./loops/foreach.js";
|
|
36
|
-
export * from "./loops/until.js";
|
|
37
|
-
export * from "./loops/while.js";
|
|
38
|
-
export * from "./boundary/input-value.js";
|
|
39
|
-
export * from "./manifests.js";
|
|
40
|
-
import { BreakFlowNode } from "./flow-control/break.js";
|
|
41
|
-
import { ErrorBoundaryFlowNode } from "./flow-control/error-boundary.js";
|
|
42
|
-
import { HumanApprovalFlowNode } from "./flow-control/human-approval.js";
|
|
43
|
-
import { IfFlowNode } from "./flow-control/if.js";
|
|
44
|
-
import { ParallelFlowNode } from "./flow-control/parallel.js";
|
|
45
|
-
import { SwitchFlowNode } from "./flow-control/switch.js";
|
|
46
|
-
import { CodeFlowNode } from "./utility/code.js";
|
|
47
|
-
import { DelayFlowNode } from "./utility/delay.js";
|
|
48
|
-
import { LogFlowNode } from "./utility/log.js";
|
|
49
|
-
import { MapFlowNode } from "./utility/map.js";
|
|
50
|
-
import { MergeFlowNode } from "./utility/merge.js";
|
|
51
|
-
import { ReturnFlowNode } from "./utility/return.js";
|
|
52
|
-
import { UtilityLogNode } from "./utility/utility-log.js";
|
|
53
|
-
import { ChatTriggerNode } from "./triggers/chat.js";
|
|
54
|
-
import { EventTriggerNode } from "./triggers/event.js";
|
|
55
|
-
import { FormTriggerNode } from "./triggers/form.js";
|
|
56
|
-
import { ManualTriggerNode } from "./triggers/manual.js";
|
|
57
|
-
import { ScheduleTriggerNode } from "./triggers/schedule.js";
|
|
58
|
-
import { WebhookTriggerNode } from "./triggers/webhook.js";
|
|
59
|
-
import { GraphForeachLoopNode } from "./loops/foreach.js";
|
|
60
|
-
import { GraphUntilLoopNode } from "./loops/until.js";
|
|
61
|
-
import { GraphWhileLoopNode } from "./loops/while.js";
|
|
62
|
-
import { GraphInputValueNode } from "./boundary/input-value.js";
|
|
63
|
-
/**
|
|
64
|
-
* All built-in trigger node constructors.
|
|
65
|
-
*/
|
|
66
|
-
export const GRAPH_TRIGGER_NODES = [
|
|
67
|
-
ManualTriggerNode,
|
|
68
|
-
WebhookTriggerNode,
|
|
69
|
-
ScheduleTriggerNode,
|
|
70
|
-
EventTriggerNode,
|
|
71
|
-
FormTriggerNode,
|
|
72
|
-
ChatTriggerNode,
|
|
73
|
-
];
|
|
74
|
-
/**
|
|
75
|
-
* All built-in flow-control node constructors.
|
|
76
|
-
*/
|
|
77
|
-
export const GRAPH_FLOW_CONTROL_NODES = [
|
|
78
|
-
IfFlowNode,
|
|
79
|
-
SwitchFlowNode,
|
|
80
|
-
ParallelFlowNode,
|
|
81
|
-
MergeFlowNode,
|
|
82
|
-
MapFlowNode,
|
|
83
|
-
DelayFlowNode,
|
|
84
|
-
ErrorBoundaryFlowNode,
|
|
85
|
-
HumanApprovalFlowNode,
|
|
86
|
-
ReturnFlowNode,
|
|
87
|
-
CodeFlowNode,
|
|
88
|
-
LogFlowNode,
|
|
89
|
-
UtilityLogNode,
|
|
90
|
-
BreakFlowNode,
|
|
91
|
-
];
|
|
92
|
-
/**
|
|
93
|
-
* All built-in loop node constructors (shared declarations of the
|
|
94
|
-
* `core.loop.*` system kinds).
|
|
95
|
-
*/
|
|
96
|
-
export const GRAPH_LOOP_NODES = [
|
|
97
|
-
GraphForeachLoopNode,
|
|
98
|
-
GraphWhileLoopNode,
|
|
99
|
-
GraphUntilLoopNode,
|
|
100
|
-
];
|
|
101
|
-
/**
|
|
102
|
-
* All built-in boundary node constructors.
|
|
103
|
-
*/
|
|
104
|
-
export const GRAPH_BOUNDARY_NODES = [GraphInputValueNode];
|
|
105
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/graph/nodes/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG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AAsB;AACnD,OAAO,EAAE,kBAAkB,EAAE,yBAAsB;AACnD,OAAO,EAAE,mBAAmB,EAAE,kCAA+B;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;IACf,eAAe;CACP,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU;IACV,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,aAAa;IACb,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,YAAY;IACZ,WAAW;IACX,cAAc;IACd,aAAa;CACL,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;CACV,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,mBAAmB,CAAU,CAAC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @module ui-decorators/graph/nodes/loops/foreach
|
|
12
|
-
* @summary Foreach loop node declaration.
|
|
13
|
-
* @description Shared declaration for the `core.loop.foreach` system node
|
|
14
|
-
* kind (decorator id `graph-foreach-loop-node`), ported from the for-angular
|
|
15
|
-
* demo app so the loop kinds become shared canvas nodes. Its executor is
|
|
16
|
-
* built into the integrations engine (`ForeachGraphNodeExecutor`). The
|
|
17
|
-
* loop-body workflow is demo/app-side content and is not part of the shared
|
|
18
|
-
* declaration — the shared class carries the port/metadata shape only.
|
|
19
|
-
*/
|
|
20
|
-
import { Model, model, required } from "@decaf-ts/decorator-validation";
|
|
21
|
-
import { uielement } from "./../../../ui/decorators.js";
|
|
22
|
-
import { connection, input, node, output } from "./../../decorators.js";
|
|
23
|
-
// Ensure category styles are registered (idempotent).
|
|
24
|
-
import "./../category-styles.js";
|
|
25
|
-
let GraphForeachLoopNode = class GraphForeachLoopNode extends Model {
|
|
26
|
-
};
|
|
27
|
-
__decorate([
|
|
28
|
-
required(),
|
|
29
|
-
uielement('textarea', { label: 'Items', placeholder: 'Array to iterate over' }),
|
|
30
|
-
input({ handle: 'items' }),
|
|
31
|
-
__metadata("design:type", Array)
|
|
32
|
-
], GraphForeachLoopNode.prototype, "items", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
required(),
|
|
35
|
-
uielement('input', { label: 'Slice size', placeholder: 'Items per iteration (default 1)' }),
|
|
36
|
-
input({ handle: 'slice' }),
|
|
37
|
-
__metadata("design:type", Number)
|
|
38
|
-
], GraphForeachLoopNode.prototype, "slice", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
required(),
|
|
41
|
-
output({ handle: 'item' }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], GraphForeachLoopNode.prototype, "item", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
required(),
|
|
46
|
-
connection({ handle: 'loop', connectionRules: { allowSelf: true, maxConnections: 1 } }),
|
|
47
|
-
__metadata("design:type", Object)
|
|
48
|
-
], GraphForeachLoopNode.prototype, "loop", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
required(),
|
|
51
|
-
output({ handle: 'completed' }),
|
|
52
|
-
__metadata("design:type", Array)
|
|
53
|
-
], GraphForeachLoopNode.prototype, "completed", void 0);
|
|
54
|
-
GraphForeachLoopNode = __decorate([
|
|
55
|
-
node('graph-foreach-loop-node', {
|
|
56
|
-
kind: 'core.loop.foreach',
|
|
57
|
-
category: 'Loop',
|
|
58
|
-
color: '#eab308',
|
|
59
|
-
icon: 'ti-repeat',
|
|
60
|
-
width: 120,
|
|
61
|
-
height: 140,
|
|
62
|
-
labels: ['loop', 'iteration', 'foreach'],
|
|
63
|
-
metadata: {
|
|
64
|
-
title: 'Foreach loop',
|
|
65
|
-
description: 'Iterates over an array input and executes the body once per item (or per slice of items).',
|
|
66
|
-
loop: {
|
|
67
|
-
maxIterations: 100,
|
|
68
|
-
itemPort: 'item',
|
|
69
|
-
resultPort: 'result',
|
|
70
|
-
slice: 1,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
}),
|
|
74
|
-
model()
|
|
75
|
-
], GraphForeachLoopNode);
|
|
76
|
-
export { GraphForeachLoopNode };
|
|
77
|
-
//# sourceMappingURL=foreach.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"foreach.js","sourceRoot":"","sources":["../../../../../src/graph/nodes/loops/foreach.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,oCAA+B;AACnD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,8BAAyB;AAEnE,sDAAsD;AACtD,iCAA4B;AAsBrB,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,KAAK;CAsB9C,CAAA;AAlBC;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,OAAO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target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @module ui-decorators/graph/nodes/loops/until
|
|
12
|
-
* @summary Until loop node declaration.
|
|
13
|
-
* @description Shared declaration for the `core.loop.until` system node kind
|
|
14
|
-
* (decorator id `graph-until-loop-node`), ported from the for-angular demo
|
|
15
|
-
* app so the loop kinds become shared canvas nodes. Its executor is built
|
|
16
|
-
* into the integrations engine (`UntilGraphNodeExecutor`). The loop-body
|
|
17
|
-
* workflow is demo/app-side content and is not part of the shared
|
|
18
|
-
* declaration — the shared class carries the port/metadata shape only.
|
|
19
|
-
*/
|
|
20
|
-
import { Model, model, required } from "@decaf-ts/decorator-validation";
|
|
21
|
-
import { uielement } from "./../../../ui/decorators.js";
|
|
22
|
-
import { input, node, output } from "./../../decorators.js";
|
|
23
|
-
// Ensure category styles are registered (idempotent).
|
|
24
|
-
import "./../category-styles.js";
|
|
25
|
-
let GraphUntilLoopNode = class GraphUntilLoopNode extends Model {
|
|
26
|
-
};
|
|
27
|
-
__decorate([
|
|
28
|
-
required(),
|
|
29
|
-
uielement('input', { label: 'State', placeholder: 'Initial state' }),
|
|
30
|
-
input({ handle: 'state' }),
|
|
31
|
-
__metadata("design:type", Object)
|
|
32
|
-
], GraphUntilLoopNode.prototype, "state", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
required(),
|
|
35
|
-
uielement('input', { label: 'Final state', placeholder: 'Final state after loop' }),
|
|
36
|
-
output({ handle: 'state' }),
|
|
37
|
-
__metadata("design:type", Object)
|
|
38
|
-
], GraphUntilLoopNode.prototype, "stateOut", void 0);
|
|
39
|
-
GraphUntilLoopNode = __decorate([
|
|
40
|
-
node('graph-until-loop-node', {
|
|
41
|
-
kind: 'core.loop.until',
|
|
42
|
-
category: 'Loop',
|
|
43
|
-
color: '#eab308',
|
|
44
|
-
icon: 'ti-player-stop',
|
|
45
|
-
width: 96,
|
|
46
|
-
height: 96,
|
|
47
|
-
labels: ['loop', 'conditional', 'until'],
|
|
48
|
-
metadata: {
|
|
49
|
-
title: 'Until loop',
|
|
50
|
-
description: 'Repeats the body until the condition is true (post-condition, runs at least once).',
|
|
51
|
-
loop: {
|
|
52
|
-
maxIterations: 50,
|
|
53
|
-
statePort: 'state',
|
|
54
|
-
condition: {
|
|
55
|
-
type: 'greaterThanOrEqual',
|
|
56
|
-
left: 'iteration',
|
|
57
|
-
right: 2,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
model()
|
|
63
|
-
], GraphUntilLoopNode);
|
|
64
|
-
export { GraphUntilLoopNode };
|
|
65
|
-
//# sourceMappingURL=until.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"until.js","sourceRoot":"","sources":["../../../../../src/graph/nodes/loops/until.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,oCAA+B;AACnD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,8BAAyB;AAEvD,sDAAsD;AACtD,iCAA4B;AAyBrB,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,KAAK;CAU5C,CAAA;AANC;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;iDACX;AAKhB;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACnF,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;oDACT;AATR,kBAAkB;IAvB9B,IAAI,CAAC,uBAAuB,EAAE;QAC7B,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC;QACxC,QAAQ,EAAE;YACR,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oFAAoF;YACjG,IAAI,EAAE;gBACJ,aAAa,EAAE,EAAE;gBACjB,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE;oBACT,IAAI,EAAE,oBAA6B;oBACnC,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,CAAC;iBACT;aACF;SACF;KACF,CAAC;IACD,KAAK,EAAE;GACK,kBAAkB,CAU9B"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @module ui-decorators/graph/nodes/loops/while
|
|
12
|
-
* @summary While loop node declaration.
|
|
13
|
-
* @description Shared declaration for the `core.loop.while` system node kind
|
|
14
|
-
* (decorator id `graph-while-loop-node`), ported from the for-angular demo
|
|
15
|
-
* app so the loop kinds become shared canvas nodes. Its executor is built
|
|
16
|
-
* into the integrations engine (`WhileGraphNodeExecutor`). The loop-body
|
|
17
|
-
* workflow is demo/app-side content and is not part of the shared
|
|
18
|
-
* declaration — the shared class carries the port/metadata shape only.
|
|
19
|
-
*/
|
|
20
|
-
import { Model, model, required } from "@decaf-ts/decorator-validation";
|
|
21
|
-
import { uielement } from "./../../../ui/decorators.js";
|
|
22
|
-
import { input, node, output } from "./../../decorators.js";
|
|
23
|
-
// Ensure category styles are registered (idempotent).
|
|
24
|
-
import "./../category-styles.js";
|
|
25
|
-
let GraphWhileLoopNode = class GraphWhileLoopNode extends Model {
|
|
26
|
-
};
|
|
27
|
-
__decorate([
|
|
28
|
-
required(),
|
|
29
|
-
uielement('input', { label: 'State', placeholder: 'Initial state' }),
|
|
30
|
-
input({ handle: 'state' }),
|
|
31
|
-
__metadata("design:type", Object)
|
|
32
|
-
], GraphWhileLoopNode.prototype, "state", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
required(),
|
|
35
|
-
uielement('input', { label: 'Final state', placeholder: 'Final state after loop' }),
|
|
36
|
-
output({ handle: 'state' }),
|
|
37
|
-
__metadata("design:type", Object)
|
|
38
|
-
], GraphWhileLoopNode.prototype, "stateOut", void 0);
|
|
39
|
-
GraphWhileLoopNode = __decorate([
|
|
40
|
-
node('graph-while-loop-node', {
|
|
41
|
-
kind: 'core.loop.while',
|
|
42
|
-
category: 'Loop',
|
|
43
|
-
color: '#eab308',
|
|
44
|
-
icon: 'ti-arrows-loop',
|
|
45
|
-
width: 96,
|
|
46
|
-
height: 96,
|
|
47
|
-
labels: ['loop', 'conditional', 'while'],
|
|
48
|
-
metadata: {
|
|
49
|
-
title: 'While loop',
|
|
50
|
-
description: 'Repeats the body while the condition is true (pre-condition).',
|
|
51
|
-
loop: {
|
|
52
|
-
maxIterations: 50,
|
|
53
|
-
statePort: 'state',
|
|
54
|
-
condition: {
|
|
55
|
-
type: 'lessThan',
|
|
56
|
-
left: 'iteration',
|
|
57
|
-
right: 3,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
model()
|
|
63
|
-
], GraphWhileLoopNode);
|
|
64
|
-
export { GraphWhileLoopNode };
|
|
65
|
-
//# sourceMappingURL=while.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"while.js","sourceRoot":"","sources":["../../../../../src/graph/nodes/loops/while.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,oCAA+B;AACnD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,8BAAyB;AAEvD,sDAAsD;AACtD,iCAA4B;AAyBrB,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,KAAK;CAU5C,CAAA;AANC;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;iDACX;AAKhB;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAA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