@reeve-iot/workflow-mui 0.0.0-stage → 1.1.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/LICENSE +21 -0
- package/README.md +68 -2
- package/dist/canvas/BlockNode.d.ts +30 -0
- package/dist/canvas/BlockNode.js +211 -0
- package/dist/canvas/Connection.d.ts +10 -0
- package/dist/canvas/Connection.js +22 -0
- package/dist/canvas/WorkflowCanvas.d.ts +16 -0
- package/dist/canvas/WorkflowCanvas.js +258 -0
- package/dist/canvas/analysedPortTerm.d.ts +6 -0
- package/dist/canvas/analysedPortTerm.js +17 -0
- package/dist/canvas/geometry.d.ts +14 -0
- package/dist/canvas/geometry.js +16 -0
- package/dist/canvas/graphTopology.d.ts +12 -0
- package/dist/canvas/graphTopology.js +32 -0
- package/dist/canvas/highlights.d.ts +12 -0
- package/dist/canvas/highlights.js +1 -0
- package/dist/canvas/nodePorts.d.ts +19 -0
- package/dist/canvas/nodePorts.js +28 -0
- package/dist/canvas/portCustomization.d.ts +21 -0
- package/dist/canvas/portCustomization.js +6 -0
- package/dist/canvas/portGeometry.d.ts +3 -0
- package/dist/canvas/portGeometry.js +3 -0
- package/dist/canvas/portLabelLayout.d.ts +9 -0
- package/dist/canvas/portLabelLayout.js +47 -0
- package/dist/canvas/unavailableBlock.d.ts +15 -0
- package/dist/canvas/unavailableBlock.js +9 -0
- package/dist/config/ErrorHandlingSection.d.ts +12 -0
- package/dist/config/ErrorHandlingSection.js +55 -0
- package/dist/config/NodeConfigPanel.d.ts +19 -0
- package/dist/config/NodeConfigPanel.js +246 -0
- package/dist/config/PassthroughSection.d.ts +18 -0
- package/dist/config/PassthroughSection.js +37 -0
- package/dist/config/ResiliencySection.d.ts +17 -0
- package/dist/config/ResiliencySection.js +156 -0
- package/dist/config/TypeArgumentPicker.d.ts +6 -0
- package/dist/config/TypeArgumentPicker.js +31 -0
- package/dist/config/nodeConfigCustomization.d.ts +100 -0
- package/dist/config/nodeConfigCustomization.js +6 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +26 -0
- package/dist/mapping/MappingDialog.d.ts +10 -0
- package/dist/mapping/MappingDialog.js +282 -0
- package/dist/mapping/mappingCustomization.d.ts +50 -0
- package/dist/mapping/mappingCustomization.js +8 -0
- package/dist/mapping/wireSourceOutputs.d.ts +29 -0
- package/dist/mapping/wireSourceOutputs.js +67 -0
- package/dist/nameDraft.d.ts +23 -0
- package/dist/nameDraft.js +19 -0
- package/dist/navigation/SubCanvasBreadcrumb.d.ts +7 -0
- package/dist/navigation/SubCanvasBreadcrumb.js +30 -0
- package/dist/palette/BlockPalette.d.ts +17 -0
- package/dist/palette/BlockPalette.js +55 -0
- package/dist/ports/KeyValueRowsField.d.ts +34 -0
- package/dist/ports/KeyValueRowsField.js +111 -0
- package/dist/ports/PortDeclarationTable.d.ts +18 -0
- package/dist/ports/PortDeclarationTable.js +111 -0
- package/dist/ports/PortValueEditor.d.ts +69 -0
- package/dist/ports/PortValueEditor.js +168 -0
- package/dist/ports/collectionComposer.d.ts +26 -0
- package/dist/ports/collectionComposer.js +37 -0
- package/dist/ports/refusedLiteral.d.ts +9 -0
- package/dist/ports/refusedLiteral.js +10 -0
- package/dist/ports/writeTerm.d.ts +5 -0
- package/dist/ports/writeTerm.js +10 -0
- package/dist/settings/ConcurrencySection.d.ts +8 -0
- package/dist/settings/ConcurrencySection.js +31 -0
- package/dist/settings/ParameterDeclarationDialog.d.ts +35 -0
- package/dist/settings/ParameterDeclarationDialog.js +81 -0
- package/dist/settings/WorkflowExecutionSection.d.ts +14 -0
- package/dist/settings/WorkflowExecutionSection.js +222 -0
- package/dist/theme/editorColors.d.ts +29 -0
- package/dist/theme/editorColors.js +30 -0
- package/dist/validation/ValidationFindings.d.ts +27 -0
- package/dist/validation/ValidationFindings.js +39 -0
- package/package.json +55 -4
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Box, Switch, TextField, ToggleButton, ToggleButtonGroup, Typography } from '@mui/material';
|
|
4
|
+
import { describeRepeatedMember, findRepeatedMember, isMapTerm, isStringMapTerm } from '@reeve-iot/workflow-core';
|
|
5
|
+
import { KeyValueRowsField, readKeyValueRows } from './KeyValueRowsField.js';
|
|
6
|
+
import { RefusedLiteral } from './refusedLiteral.js';
|
|
7
|
+
/** Turns typed text into what the port expects: a number for a `Number` or `Int`, the text as typed for anything else. */
|
|
8
|
+
export function coercePortValue(raw, fieldType) {
|
|
9
|
+
if (fieldType === 'Number') {
|
|
10
|
+
const parsed = Number(raw);
|
|
11
|
+
return raw.trim() !== '' && Number.isFinite(parsed) ? parsed : raw;
|
|
12
|
+
}
|
|
13
|
+
if (fieldType === 'Int') {
|
|
14
|
+
const parsed = Number(raw);
|
|
15
|
+
return raw.trim() !== '' && Number.isInteger(parsed) ? parsed : raw;
|
|
16
|
+
}
|
|
17
|
+
return raw;
|
|
18
|
+
}
|
|
19
|
+
/** The number a field's text is, or undefined when it is not one: an `Int` takes a whole number's value, a
|
|
20
|
+
* `Number` any finite one, and neither is repaired from text that does not parse (`7.5` into an `Int`). */
|
|
21
|
+
export function readExactNumber(raw, fieldType) {
|
|
22
|
+
if (raw === '' || raw.trim() !== raw)
|
|
23
|
+
return undefined;
|
|
24
|
+
const parsed = Number(raw);
|
|
25
|
+
if (!Number.isFinite(parsed))
|
|
26
|
+
return undefined;
|
|
27
|
+
if (fieldType === 'Int' && !Number.isInteger(parsed))
|
|
28
|
+
return undefined;
|
|
29
|
+
return fieldType === 'Number' || fieldType === 'Int' ? parsed : undefined;
|
|
30
|
+
}
|
|
31
|
+
function enumStoredOutside(raw, names) {
|
|
32
|
+
if (raw === undefined || raw === null || raw === '')
|
|
33
|
+
return undefined;
|
|
34
|
+
if (typeof raw === 'string' && names.includes(raw))
|
|
35
|
+
return undefined;
|
|
36
|
+
return typeof raw === 'string' ? raw : JSON.stringify(raw);
|
|
37
|
+
}
|
|
38
|
+
const enumShown = (raw, names) => enumStoredOutside(raw, names) ?? (typeof raw === 'string' ? raw : '');
|
|
39
|
+
const JSON_ERROR = 'Must be valid JSON';
|
|
40
|
+
const JSON_NULL_ERROR = 'null is not a literal value; use an expression instead';
|
|
41
|
+
const isTrueBooleanValue = (value) => value === true;
|
|
42
|
+
const kindOfName = (name) => name === 'Number' ? 'Number' : name === 'Int' ? 'Int' : name === 'Boolean' ? 'Boolean' : name === 'Json' ? 'Json' : undefined;
|
|
43
|
+
function readJsonValue(text) {
|
|
44
|
+
let parsed;
|
|
45
|
+
try {
|
|
46
|
+
parsed = JSON.parse(text);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return { error: JSON_ERROR };
|
|
50
|
+
}
|
|
51
|
+
if (parsed === null)
|
|
52
|
+
return { error: JSON_NULL_ERROR };
|
|
53
|
+
const repeat = findRepeatedMember(text);
|
|
54
|
+
return repeat === undefined ? { value: parsed } : { error: `Ambiguous JSON: ${describeRepeatedMember(repeat)}` };
|
|
55
|
+
}
|
|
56
|
+
function JsonObjectField({ fieldName, label, rawValue, description, placeholder, onChange, onObjectChange, onClear }) {
|
|
57
|
+
const [text, setText] = useState(null);
|
|
58
|
+
const [error, setError] = useState('');
|
|
59
|
+
const shown = text ?? (rawValue === undefined || rawValue === null || rawValue === '' ? '' : JSON.stringify(rawValue, null, 2));
|
|
60
|
+
const change = (next) => {
|
|
61
|
+
setText(next);
|
|
62
|
+
if (next.trim() === '') {
|
|
63
|
+
setError('');
|
|
64
|
+
if (onClear)
|
|
65
|
+
onClear();
|
|
66
|
+
else
|
|
67
|
+
onChange('');
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const read = readJsonValue(next);
|
|
71
|
+
if ('error' in read) {
|
|
72
|
+
setError(read.error);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
setError('');
|
|
76
|
+
onObjectChange(read.value);
|
|
77
|
+
};
|
|
78
|
+
return (_jsx(TextField, { fullWidth: true, size: "small", multiline: true, minRows: 3, maxRows: 8, value: shown, placeholder: placeholder ?? '{"key": "value"}', error: error !== '', helperText: error || description || undefined, slotProps: {
|
|
79
|
+
htmlInput: {
|
|
80
|
+
'data-testid': `port-value-input-${fieldName}`,
|
|
81
|
+
'aria-label': label,
|
|
82
|
+
style: { fontFamily: 'monospace', fontSize: 11 },
|
|
83
|
+
},
|
|
84
|
+
}, onChange: (event) => { change(event.target.value); } }));
|
|
85
|
+
}
|
|
86
|
+
/** Three-mode port editor: a literal, an expression, or driven by a wire. The Connection mode cannot be
|
|
87
|
+
* chosen here — leaving it means removing the wire on the canvas. */
|
|
88
|
+
export function PortValueEditor({ fieldName, label, rawValue, fieldType, literalForm, description, required = false, placeholder, onChange, allowedValues, onClear, hasConnection, renderTypeEditor, renderExpressionEditor, onObjectChange, expressionPrefix = 'expr:', secretValues = false, canProtectSecrets = false, storedValueRefusal, valueTerm, }) {
|
|
89
|
+
const isExpression = typeof rawValue === 'string' && rawValue.startsWith(expressionPrefix);
|
|
90
|
+
const blank = rawValue === undefined || rawValue === null || rawValue === '';
|
|
91
|
+
const opensAsExpression = isExpression
|
|
92
|
+
|| (blank && renderExpressionEditor !== undefined && (placeholder ?? '').startsWith(expressionPrefix));
|
|
93
|
+
const [mode, setMode] = useState(hasConnection ? 'connection' : opensAsExpression ? 'expression' : 'value');
|
|
94
|
+
const [numberDraft, setNumberDraft] = useState(null);
|
|
95
|
+
const writtenTerm = valueTerm ?? fieldType;
|
|
96
|
+
const [written, setWritten] = useState(null);
|
|
97
|
+
const own = (value) => { setWritten({ term: writtenTerm, json: JSON.stringify(value) }); };
|
|
98
|
+
const write = (value) => {
|
|
99
|
+
own(value);
|
|
100
|
+
onChange(value);
|
|
101
|
+
};
|
|
102
|
+
const writeObject = onObjectChange === undefined ? undefined : (value) => {
|
|
103
|
+
own(value);
|
|
104
|
+
onObjectChange(value);
|
|
105
|
+
};
|
|
106
|
+
const context = {
|
|
107
|
+
fieldName, label, rawValue, fieldType, literalForm, required, description, placeholder, onChange: write, allowedValues,
|
|
108
|
+
};
|
|
109
|
+
const kind = literalForm === undefined ? kindOfName(fieldType) : (literalForm?.gradedAs ?? null);
|
|
110
|
+
const isNumeric = kind === 'Number' || kind === 'Int';
|
|
111
|
+
const isBoolean = kind === 'Boolean';
|
|
112
|
+
const isMap = fieldType !== undefined && isMapTerm(fieldType);
|
|
113
|
+
const isStringMap = fieldType !== undefined && isStringMapTerm(fieldType);
|
|
114
|
+
const stringMapRows = isStringMap ? readKeyValueRows(rawValue) : undefined;
|
|
115
|
+
const expressionBody = isExpression ? rawValue.slice(expressionPrefix.length) : '';
|
|
116
|
+
const changeMode = (next) => {
|
|
117
|
+
if (!next || next === mode || next === 'connection')
|
|
118
|
+
return;
|
|
119
|
+
setMode(next);
|
|
120
|
+
if (next === 'value') {
|
|
121
|
+
if (isExpression) {
|
|
122
|
+
const body = rawValue.slice(expressionPrefix.length);
|
|
123
|
+
if (isMap && body === '' && onClear)
|
|
124
|
+
onClear();
|
|
125
|
+
else
|
|
126
|
+
write(isBoolean ? body.trim() === 'true' : body);
|
|
127
|
+
}
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (isBoolean || (rawValue !== null && typeof rawValue === 'object')) {
|
|
131
|
+
write(expressionPrefix);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (typeof rawValue === 'string' && !isExpression)
|
|
135
|
+
write(`${expressionPrefix}${rawValue}`);
|
|
136
|
+
else if (rawValue === null || rawValue === undefined || rawValue === '')
|
|
137
|
+
write(expressionPrefix);
|
|
138
|
+
else
|
|
139
|
+
write(`${expressionPrefix}${String(rawValue)}`);
|
|
140
|
+
};
|
|
141
|
+
const ownsStored = written !== null && written.term === writtenTerm && written.json === JSON.stringify(rawValue);
|
|
142
|
+
const refused = mode === 'value' && storedValueRefusal !== undefined && !isExpression && !ownsStored;
|
|
143
|
+
const replace = () => {
|
|
144
|
+
setNumberDraft(null);
|
|
145
|
+
if (isBoolean)
|
|
146
|
+
write(false);
|
|
147
|
+
else if (onClear)
|
|
148
|
+
onClear();
|
|
149
|
+
else
|
|
150
|
+
write('');
|
|
151
|
+
};
|
|
152
|
+
const hostEditor = mode === 'value' && !refused ? (renderTypeEditor?.(context) ?? null) : null;
|
|
153
|
+
const textValue = rawValue === undefined || rawValue === null ? '' : String(rawValue);
|
|
154
|
+
const numberInvalid = isNumeric && numberDraft !== null && numberDraft !== '' && readExactNumber(numberDraft, kind ?? undefined) === undefined;
|
|
155
|
+
return (_jsxs(Box, { "data-testid": `port-value-editor-${fieldName}`, sx: { display: 'flex', flexDirection: 'column', gap: 0.5 }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', justifyContent: 'space-between' }, children: [_jsxs(Typography, { variant: "caption", children: [label, required ? ' *' : ''] }), _jsxs(ToggleButtonGroup, { size: "small", exclusive: true, value: mode, onChange: (_, next) => changeMode(next), "aria-label": `${fieldName} input mode`, "data-testid": `port-value-editor-mode-${fieldName}`, children: [_jsx(ToggleButton, { value: "value", "data-testid": `mode-value-${fieldName}`, children: "Value" }), renderExpressionEditor && (_jsx(ToggleButton, { value: "expression", "data-testid": `mode-expression-${fieldName}`, children: "Expression" })), _jsx(ToggleButton, { value: "connection", disabled: !hasConnection, "data-testid": `mode-connection-${fieldName}`, children: "Connection" })] })] }), mode === 'connection' ? (_jsx(Typography, { variant: "caption", color: "text.secondary", children: "Driven by an incoming connection. Disconnect the wire to edit a value." })) : mode === 'expression' && renderExpressionEditor ? (renderExpressionEditor({ ...context, expressionBody })) : refused ? (_jsx(RefusedLiteral, { testId: `port-value-refused-${fieldName}`, value: rawValue, expected: storedValueRefusal ?? '', onReplace: replace })) : hostEditor ? (hostEditor) : isStringMap && stringMapRows !== undefined && writeObject !== undefined ? (_jsx(KeyValueRowsField, { fieldName: fieldName, label: label, rawValue: rawValue, description: description, onObjectChange: writeObject, onClear: onClear ?? (() => { write(''); }), secretValues: secretValues, canProtect: canProtectSecrets })) : (kind === 'Json' || isMap) && writeObject !== undefined ? (_jsx(JsonObjectField, { fieldName: fieldName, label: label, rawValue: rawValue, description: description, placeholder: placeholder, onChange: write, onObjectChange: writeObject, onClear: isMap ? onClear : undefined })) : fieldType === 'Enum' && allowedValues ? (_jsxs(TextField, { select: true, fullWidth: true, size: "small", value: enumShown(rawValue, allowedValues), helperText: description ?? undefined, slotProps: { select: { native: true }, htmlInput: { 'data-testid': `port-value-input-${fieldName}`, 'aria-label': label } }, onChange: (event) => {
|
|
156
|
+
if (event.target.value !== '')
|
|
157
|
+
write(event.target.value);
|
|
158
|
+
else if (onClear)
|
|
159
|
+
onClear();
|
|
160
|
+
else
|
|
161
|
+
write('');
|
|
162
|
+
}, children: [_jsx("option", { value: "" }), enumStoredOutside(rawValue, allowedValues) !== undefined && (_jsxs("option", { value: enumStoredOutside(rawValue, allowedValues), disabled: true, children: [enumStoredOutside(rawValue, allowedValues), " (not allowed)"] })), allowedValues.map((name) => _jsx("option", { value: name, children: name }, name))] })) : isBoolean ? (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [_jsx(Switch, { size: "small", checked: isTrueBooleanValue(rawValue), "data-testid": `port-value-input-${fieldName}`, slotProps: { input: { 'aria-label': label } }, onChange: (event) => { write(event.target.checked); } }), description && _jsx(Typography, { variant: "caption", color: "text.secondary", children: description })] })) : isNumeric ? (_jsx(TextField, { fullWidth: true, size: "small", type: "text", value: numberDraft ?? textValue, placeholder: placeholder, error: numberInvalid, helperText: numberInvalid ? (_jsxs("span", { "data-testid": `port-value-error-${fieldName}`, "data-rule-id": "literal-port-value-invalid", children: ["This value cannot be read as ", kind, "."] })) : (description ?? undefined), slotProps: { htmlInput: { inputMode: 'decimal', 'data-testid': `port-value-input-${fieldName}` } }, onChange: (event) => {
|
|
163
|
+
setNumberDraft(event.target.value);
|
|
164
|
+
const number = readExactNumber(event.target.value, kind ?? undefined);
|
|
165
|
+
if (number !== undefined)
|
|
166
|
+
write(number);
|
|
167
|
+
} })) : kind === null ? (_jsx(Typography, { variant: "caption", color: "text.secondary", "data-testid": `port-value-none-${fieldName}`, children: "This type takes no literal value. Connect a wire or write an expression." })) : (_jsx(TextField, { fullWidth: true, size: "small", value: textValue, type: "text", placeholder: placeholder, helperText: description ?? undefined, slotProps: { htmlInput: { 'data-testid': `port-value-input-${fieldName}` } }, onChange: (event) => write(event.target.value) }))] }));
|
|
168
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PortTypeRegistry } from '@reeve-iot/workflow-core';
|
|
2
|
+
/** One more `Collection<…>` level around the picker's type, in the registry's canonical spelling, so the
|
|
3
|
+
* value a write stores is one the compiler reads and never a spelling only this control produced. */
|
|
4
|
+
export declare function wrapInCollection(type: string, portTypes: PortTypeRegistry): string;
|
|
5
|
+
/** Whether the type names something a Select can show, whether or not the grammar parses it: a name it
|
|
6
|
+
* refuses is still text that was written, while nothing at all is nothing to show. */
|
|
7
|
+
export declare function namesAnElement(type: string | null | undefined): boolean;
|
|
8
|
+
/** Whether one more collection level may be built on the picker's type: a name the grammar parses that the registry
|
|
9
|
+
* holds under its canonical spelling. */
|
|
10
|
+
export declare function canWrapInCollection(type: string | null | undefined, portTypes: PortTypeRegistry): boolean;
|
|
11
|
+
/** The registry's names plus the current type where the registry does not list it, so a type composed by the
|
|
12
|
+
* button or read from a document shows in the Select instead of blank. Nothing to show is never appended. */
|
|
13
|
+
export declare function typesWithCurrent(names: readonly string[], current: string | null | undefined): string[];
|
|
14
|
+
export interface CollectionComposerProps {
|
|
15
|
+
/** The picker's current type, exactly as the picker holds it. */
|
|
16
|
+
type: string | null | undefined;
|
|
17
|
+
/** The vocabulary the type must be a known, canonically spelled name of. */
|
|
18
|
+
portTypes: PortTypeRegistry;
|
|
19
|
+
/** The control's accessible name, which names the row it belongs to. */
|
|
20
|
+
ariaLabel: string;
|
|
21
|
+
/** Receives the type as the next write should store it: this type in one more collection. */
|
|
22
|
+
onWrap: (wrapped: string) => void;
|
|
23
|
+
}
|
|
24
|
+
/** One more collection level around a picker's current type, beside the type Select. Rendered even when it
|
|
25
|
+
* refuses, so the control is discoverable; a disabled control offers nothing. */
|
|
26
|
+
export declare function CollectionComposer({ type, portTypes, ariaLabel, onWrap }: CollectionComposerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@mui/material';
|
|
3
|
+
import { parsePortTypeName } from '@reeve-iot/workflow-core';
|
|
4
|
+
/** One more `Collection<…>` level around the picker's type, in the registry's canonical spelling, so the
|
|
5
|
+
* value a write stores is one the compiler reads and never a spelling only this control produced. */
|
|
6
|
+
export function wrapInCollection(type, portTypes) {
|
|
7
|
+
return `Collection<${portTypes.normalize(type)}>`;
|
|
8
|
+
}
|
|
9
|
+
/** Whether the type names something a Select can show, whether or not the grammar parses it: a name it
|
|
10
|
+
* refuses is still text that was written, while nothing at all is nothing to show. */
|
|
11
|
+
export function namesAnElement(type) {
|
|
12
|
+
return type !== null && type !== undefined && type !== '';
|
|
13
|
+
}
|
|
14
|
+
/** Whether one more collection level may be built on the picker's type: a name the grammar parses that the registry
|
|
15
|
+
* holds under its canonical spelling. */
|
|
16
|
+
export function canWrapInCollection(type, portTypes) {
|
|
17
|
+
if (type === null || type === undefined || type === '')
|
|
18
|
+
return false;
|
|
19
|
+
const parsed = parsePortTypeName(type);
|
|
20
|
+
if (!parsed.ok)
|
|
21
|
+
return false;
|
|
22
|
+
return portTypes.normalize(type) === type && portTypes.has(type);
|
|
23
|
+
}
|
|
24
|
+
/** The registry's names plus the current type where the registry does not list it, so a type composed by the
|
|
25
|
+
* button or read from a document shows in the Select instead of blank. Nothing to show is never appended. */
|
|
26
|
+
export function typesWithCurrent(names, current) {
|
|
27
|
+
if (current === null || current === undefined || names.includes(current))
|
|
28
|
+
return [...names];
|
|
29
|
+
return namesAnElement(current) ? [...names, current] : [...names];
|
|
30
|
+
}
|
|
31
|
+
/** One more collection level around a picker's current type, beside the type Select. Rendered even when it
|
|
32
|
+
* refuses, so the control is discoverable; a disabled control offers nothing. */
|
|
33
|
+
export function CollectionComposer({ type, portTypes, ariaLabel, onWrap }) {
|
|
34
|
+
const wrapped = canWrapInCollection(type, portTypes) ? wrapInCollection(type ?? '', portTypes) : null;
|
|
35
|
+
return (_jsx(Button, { size: "small", variant: "outlined", disabled: wrapped === null, "aria-label": ariaLabel, onClick: () => { if (wrapped !== null)
|
|
36
|
+
onWrap(wrapped); }, children: "Collection" }));
|
|
37
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The stored value as an invalid literal shows it: text in quotes, anything else as JSON. */
|
|
2
|
+
export declare function describeStoredLiteral(value: unknown): string;
|
|
3
|
+
/** A stored literal that cannot be read as `expected`, shown as it is, with the action that replaces it. */
|
|
4
|
+
export declare function RefusedLiteral({ testId, value, expected, onReplace }: {
|
|
5
|
+
testId: string;
|
|
6
|
+
value: unknown;
|
|
7
|
+
expected: string;
|
|
8
|
+
onReplace: () => void;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Alert, Button } from '@mui/material';
|
|
3
|
+
/** The stored value as an invalid literal shows it: text in quotes, anything else as JSON. */
|
|
4
|
+
export function describeStoredLiteral(value) {
|
|
5
|
+
return typeof value === 'string' ? `"${value}"` : String(JSON.stringify(value));
|
|
6
|
+
}
|
|
7
|
+
/** A stored literal that cannot be read as `expected`, shown as it is, with the action that replaces it. */
|
|
8
|
+
export function RefusedLiteral({ testId, value, expected, onReplace }) {
|
|
9
|
+
return (_jsxs(Alert, { severity: "error", "data-testid": testId, "data-rule-id": "literal-port-value-invalid", action: _jsx(Button, { color: "inherit", size: "small", onClick: onReplace, children: "Replace" }), children: ["The stored value ", describeStoredLiteral(value), " cannot be read as ", expected, "."] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CanvasPathSegment, DraftAnalysisIndex, WorkflowNode } from '@reeve-iot/workflow-core';
|
|
2
|
+
/** The closed term a literal of `node`'s input `inputName`, declared `declared`, is written in: the node's own type
|
|
3
|
+
* arguments first, so a control follows an argument the moment it is set; then those arguments with the last analysis
|
|
4
|
+
* answer filling the parameters they leave open; then the analysis port. */
|
|
5
|
+
export declare function inputWriteTerm(declared: string, node: WorkflowNode, inputName: string, analysis: DraftAnalysisIndex, canvasPath: readonly CanvasPathSegment[]): string | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { literalWriteTerm } from '@reeve-iot/workflow-core';
|
|
2
|
+
/** The closed term a literal of `node`'s input `inputName`, declared `declared`, is written in: the node's own type
|
|
3
|
+
* arguments first, so a control follows an argument the moment it is set; then those arguments with the last analysis
|
|
4
|
+
* answer filling the parameters they leave open; then the analysis port. */
|
|
5
|
+
export function inputWriteTerm(declared, node, inputName, analysis, canvasPath) {
|
|
6
|
+
const own = node.typeArguments ?? {};
|
|
7
|
+
return literalWriteTerm(declared, undefined, own)
|
|
8
|
+
?? literalWriteTerm(declared, undefined, { ...analysis.node(canvasPath, node.id)?.typeArguments, ...own })
|
|
9
|
+
?? literalWriteTerm(declared, analysis.port(canvasPath, node.id, 'inputs', inputName), undefined);
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WorkflowConcurrency } from '@reeve-iot/workflow-core';
|
|
2
|
+
export interface ConcurrencySectionProps {
|
|
3
|
+
value: WorkflowConcurrency;
|
|
4
|
+
onChange: (next: WorkflowConcurrency) => void;
|
|
5
|
+
}
|
|
6
|
+
/** Concurrency settings. The fields that cannot apply to the chosen mode are hidden rather than disabled,
|
|
7
|
+
* so the form never shows a number the engine would ignore. */
|
|
8
|
+
export declare function ConcurrencySection({ value, onChange }: ConcurrencySectionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, FormControl, FormHelperText, InputLabel, MenuItem, Select, Stack, TextField, Typography } from '@mui/material';
|
|
3
|
+
const MODE_OPTIONS = [
|
|
4
|
+
{ value: 'Single', label: 'Single', description: 'Drop new triggers while a run is in progress.' },
|
|
5
|
+
{ value: 'Restart', label: 'Restart', description: 'Cancel the running run and start the new one.' },
|
|
6
|
+
{ value: 'Queued', label: 'Queued', description: 'Queue new triggers up to the configured limit; apply overflow behaviour once full.' },
|
|
7
|
+
{ value: 'Parallel', label: 'Parallel', description: 'Run multiple triggers concurrently up to the configured maximum.' },
|
|
8
|
+
];
|
|
9
|
+
const OVERFLOW_OPTIONS = [
|
|
10
|
+
{ value: 'Drop', label: 'Drop', description: 'Silently discard overflow triggers.' },
|
|
11
|
+
{ value: 'Log', label: 'Log', description: 'Discard overflow triggers and log a warning.' },
|
|
12
|
+
{ value: 'Error', label: 'Error', description: 'Throw an error so the trigger fails loudly.' },
|
|
13
|
+
];
|
|
14
|
+
/** Concurrency settings. The fields that cannot apply to the chosen mode are hidden rather than disabled,
|
|
15
|
+
* so the form never shows a number the engine would ignore. */
|
|
16
|
+
export function ConcurrencySection({ value, onChange }) {
|
|
17
|
+
const changeMode = (event) => {
|
|
18
|
+
const mode = event.target.value;
|
|
19
|
+
onChange({ ...value, mode, maxConcurrentRuns: mode === 'Single' ? 1 : value.maxConcurrentRuns });
|
|
20
|
+
};
|
|
21
|
+
const changeNumber = (field, min) => (event) => {
|
|
22
|
+
const parsed = parseInt(event.target.value, 10);
|
|
23
|
+
if (Number.isNaN(parsed) || parsed < min)
|
|
24
|
+
return;
|
|
25
|
+
onChange({ ...value, [field]: parsed });
|
|
26
|
+
};
|
|
27
|
+
const showMaxConcurrent = value.mode !== 'Single';
|
|
28
|
+
const showMaxQueued = value.mode === 'Queued';
|
|
29
|
+
const showOverflow = value.mode === 'Queued' || value.mode === 'Parallel';
|
|
30
|
+
return (_jsxs(Box, { "data-testid": "concurrency-section", sx: { mt: 2 }, children: [_jsx(Typography, { variant: "subtitle1", sx: { fontWeight: 600 }, children: "Concurrency" }), _jsx(Typography, { variant: "caption", color: "text.secondary", sx: { display: 'block', mb: 2 }, children: "Controls how multiple trigger fires for this workflow are coordinated." }), _jsxs(Stack, { spacing: 2, children: [_jsxs(FormControl, { fullWidth: true, "data-testid": "concurrency-mode-select", children: [_jsx(InputLabel, { children: "Mode" }), _jsx(Select, { label: "Mode", value: value.mode, onChange: changeMode, slotProps: { input: { 'aria-label': 'Concurrency mode' } }, children: MODE_OPTIONS.map((option) => _jsx(MenuItem, { value: option.value, children: option.label }, option.value)) }), _jsx(FormHelperText, { children: MODE_OPTIONS.find((m) => m.value === value.mode)?.description ?? '' })] }), showMaxConcurrent && (_jsx(TextField, { type: "number", label: "Max concurrent runs", fullWidth: true, value: value.maxConcurrentRuns, onChange: changeNumber('maxConcurrentRuns', 1), slotProps: { htmlInput: { min: 1, 'data-testid': 'concurrency-max-concurrent-input' } }, helperText: "Number of runs allowed to execute at the same time. Must be >= 1." })), showMaxQueued && (_jsx(TextField, { type: "number", label: "Max queued runs", fullWidth: true, value: value.maxQueuedRuns, onChange: changeNumber('maxQueuedRuns', 0), slotProps: { htmlInput: { min: 0, 'data-testid': 'concurrency-max-queued-input' } }, helperText: "Capacity of the wait queue. Triggers beyond this apply the overflow behaviour. Must be >= 0." })), showOverflow && (_jsxs(FormControl, { fullWidth: true, "data-testid": "concurrency-overflow-select", children: [_jsx(InputLabel, { id: "concurrency-overflow-label", children: "Overflow behavior" }), _jsx(Select, { labelId: "concurrency-overflow-label", label: "Overflow behavior", value: value.overflowBehavior, onChange: (event) => onChange({ ...value, overflowBehavior: event.target.value }), slotProps: { input: { 'aria-label': 'Overflow behavior' } }, children: OVERFLOW_OPTIONS.map((option) => _jsx(MenuItem, { value: option.value, children: option.label }, option.value)) }), _jsx(FormHelperText, { children: OVERFLOW_OPTIONS.find((o) => o.value === value.overflowBehavior)?.description ?? '' })] }))] })] }));
|
|
31
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { PortTypeName, WorkflowConcurrency, WorkflowParameter } from '@reeve-iot/workflow-core';
|
|
3
|
+
import type { WorkflowExecutionSectionProps } from './WorkflowExecutionSection.js';
|
|
4
|
+
export type ParameterSide = 'input' | 'output';
|
|
5
|
+
export interface ParameterDeclarationDialogProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
inputParameters: WorkflowParameter[];
|
|
9
|
+
onInputParametersChange: (params: WorkflowParameter[]) => void;
|
|
10
|
+
outputParameters: WorkflowParameter[];
|
|
11
|
+
onOutputParametersChange: (params: WorkflowParameter[]) => void;
|
|
12
|
+
name: string;
|
|
13
|
+
onNameChange: (name: string) => void;
|
|
14
|
+
description: string | null;
|
|
15
|
+
onDescriptionChange: (description: string | null) => void;
|
|
16
|
+
/** Omit both to drop the Concurrency tab, for a host whose engine does not offer the choice. */
|
|
17
|
+
concurrency?: WorkflowConcurrency;
|
|
18
|
+
onConcurrencyChange?: (next: WorkflowConcurrency) => void;
|
|
19
|
+
/** The workflow row's own engine settings, in the same tab as ConcurrencySection. Each control is rendered
|
|
20
|
+
* only where its own change callback is passed, and the tab itself only where one of the three is. */
|
|
21
|
+
executionTimeoutSeconds?: WorkflowExecutionSectionProps['executionTimeoutSeconds'];
|
|
22
|
+
onExecutionTimeoutSecondsChange?: WorkflowExecutionSectionProps['onExecutionTimeoutSecondsChange'];
|
|
23
|
+
retryPolicyJson?: WorkflowExecutionSectionProps['retryPolicyJson'];
|
|
24
|
+
onRetryPolicyJsonChange?: WorkflowExecutionSectionProps['onRetryPolicyJsonChange'];
|
|
25
|
+
checkpointPolicyJson?: WorkflowExecutionSectionProps['checkpointPolicyJson'];
|
|
26
|
+
onCheckpointPolicyJsonChange?: WorkflowExecutionSectionProps['onCheckpointPolicyJsonChange'];
|
|
27
|
+
/** Narrows what the type picker offers. Defaults to every registered type except the bare collection,
|
|
28
|
+
* which has no element type to carry. */
|
|
29
|
+
parameterTypes?: PortTypeName[];
|
|
30
|
+
/** Rendered at the foot of the General tab — where a host puts the fields only it knows about, such as
|
|
31
|
+
* a folder picker or its own tags. */
|
|
32
|
+
generalSlot?: ReactNode;
|
|
33
|
+
title?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function ParameterDeclarationDialog({ open, onClose, inputParameters, onInputParametersChange, outputParameters, onOutputParametersChange, name, onNameChange, description, onDescriptionChange, concurrency, onConcurrencyChange, executionTimeoutSeconds, onExecutionTimeoutSecondsChange, retryPolicyJson, onRetryPolicyJsonChange, checkpointPolicyJson, onCheckpointPolicyJsonChange, parameterTypes, generalSlot, title, }: ParameterDeclarationDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
|
+
import { Box, Button, Checkbox, Dialog, DialogActions, DialogContent, DialogTitle, FormControl, IconButton, MenuItem, Paper, Select, Stack, Tab, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tabs, TextField, Typography, } from '@mui/material';
|
|
4
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
5
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
6
|
+
import { usePortTypes } from '@reeve-iot/workflow-core';
|
|
7
|
+
import { BLANK_NAME_REFUSED, draftInScope, nameFault } from '../nameDraft.js';
|
|
8
|
+
import { CollectionComposer, typesWithCurrent } from '../ports/collectionComposer.js';
|
|
9
|
+
import { ConcurrencySection } from './ConcurrencySection.js';
|
|
10
|
+
import { WorkflowExecutionSection } from './WorkflowExecutionSection.js';
|
|
11
|
+
function nextParameterName(existing) {
|
|
12
|
+
const taken = new Set(existing.map((p) => p.name));
|
|
13
|
+
for (let i = 0;; i++) {
|
|
14
|
+
if (!taken.has(`param${String(i)}`))
|
|
15
|
+
return { name: `param${String(i)}`, index: i };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function ParameterDeclarationDialog({ open, onClose, inputParameters, onInputParametersChange, outputParameters, onOutputParametersChange, name, onNameChange, description, onDescriptionChange, concurrency, onConcurrencyChange, executionTimeoutSeconds, onExecutionTimeoutSecondsChange, retryPolicyJson, onRetryPolicyJsonChange, checkpointPolicyJson, onCheckpointPolicyJsonChange, parameterTypes, generalSlot, title = 'Workflow Parameters', }) {
|
|
19
|
+
const portTypes = usePortTypes();
|
|
20
|
+
const [activeTab, setActiveTab] = useState(0);
|
|
21
|
+
const [nameDrafts, setNameDrafts] = useState({});
|
|
22
|
+
const typeOptions = useMemo(() => parameterTypes?.map((t) => ({ name: t, label: t })) ??
|
|
23
|
+
portTypes.list().map((t) => ({ name: t.name, label: t.displayName ?? t.name })), [parameterTypes, portTypes]);
|
|
24
|
+
const showConcurrency = concurrency !== undefined && onConcurrencyChange !== undefined;
|
|
25
|
+
const showExecution = onExecutionTimeoutSecondsChange !== undefined
|
|
26
|
+
|| onRetryPolicyJsonChange !== undefined
|
|
27
|
+
|| onCheckpointPolicyJsonChange !== undefined;
|
|
28
|
+
const rowTab = showConcurrency ? 'Concurrency' : 'Execution';
|
|
29
|
+
const tabs = [
|
|
30
|
+
'General', 'Inputs', 'Outputs',
|
|
31
|
+
...(showConcurrency || showExecution ? [rowTab] : []),
|
|
32
|
+
];
|
|
33
|
+
const current = tabs[activeTab] ?? 'General';
|
|
34
|
+
const listFor = (side) => (side === 'input' ? inputParameters : outputParameters);
|
|
35
|
+
const emit = (side, params) => {
|
|
36
|
+
if (side === 'input')
|
|
37
|
+
onInputParametersChange(params);
|
|
38
|
+
else
|
|
39
|
+
onOutputParametersChange(params);
|
|
40
|
+
};
|
|
41
|
+
const scope = JSON.stringify([inputParameters, outputParameters]);
|
|
42
|
+
const changeName = (side, index, text) => {
|
|
43
|
+
const key = `${side}:${String(index)}`;
|
|
44
|
+
if (nameFault(text, BLANK_NAME_REFUSED) !== null) {
|
|
45
|
+
setNameDrafts((drafts) => ({ ...drafts, [key]: { scope, text } }));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const next = listFor(side).map((p, i) => (i === index ? { ...p, name: text } : p));
|
|
49
|
+
const produced = JSON.stringify(side === 'input' ? [next, outputParameters] : [inputParameters, next]);
|
|
50
|
+
setNameDrafts((drafts) => ({ ...drafts, [key]: { scope: produced, text } }));
|
|
51
|
+
emit(side, next);
|
|
52
|
+
};
|
|
53
|
+
const addParam = (side) => {
|
|
54
|
+
const params = listFor(side);
|
|
55
|
+
const { name: paramName, index } = nextParameterName(params);
|
|
56
|
+
emit(side, [
|
|
57
|
+
...params,
|
|
58
|
+
{ name: paramName, displayName: `Parameter ${String(index)}`, type: 'String', isRequired: false },
|
|
59
|
+
]);
|
|
60
|
+
};
|
|
61
|
+
const removeParam = (side, index) => {
|
|
62
|
+
emit(side, listFor(side).filter((_, i) => i !== index));
|
|
63
|
+
};
|
|
64
|
+
const changeParam = (side, index, field, value) => {
|
|
65
|
+
emit(side, listFor(side).map((p, i) => (i === index ? { ...p, [field]: value } : p)));
|
|
66
|
+
};
|
|
67
|
+
const renderTable = (side) => {
|
|
68
|
+
const params = listFor(side);
|
|
69
|
+
const columns = 5;
|
|
70
|
+
return (_jsxs(Box, { sx: { mt: 2 }, children: [_jsxs(Box, { sx: { mb: 2, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [_jsx(Typography, { variant: "subtitle1", children: side === 'input' ? 'Input Parameters' : 'Output Parameters' }), _jsx(Button, { startIcon: _jsx(AddIcon, {}), variant: "outlined", size: "small", onClick: () => { addParam(side); }, children: "Add Parameter" })] }), _jsx(TableContainer, { component: Paper, variant: "outlined", children: _jsxs(Table, { size: "small", children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Name (ID)" }), _jsx(TableCell, { children: "Display Name" }), _jsx(TableCell, { children: "Type" }), _jsx(TableCell, { children: "Required" }), _jsx(TableCell, { width: 50 })] }) }), _jsx(TableBody, { children: params.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: columns, align: "center", sx: { py: 3 }, children: "No parameters defined" }) })) : (params.map((param, index) => {
|
|
71
|
+
const storedName = param.name ?? '';
|
|
72
|
+
const nameText = draftInScope(nameDrafts[`${side}:${String(index)}`], scope)?.text ?? storedName;
|
|
73
|
+
const nameFaultText = nameFault(nameText, BLANK_NAME_REFUSED);
|
|
74
|
+
const currentType = portTypes.normalize(param.type);
|
|
75
|
+
const options = typesWithCurrent(typeOptions.map((t) => t.name), currentType)
|
|
76
|
+
.map((listed) => typeOptions.find((t) => t.name === listed) ?? { name: listed, label: listed });
|
|
77
|
+
return (_jsxs(TableRow, { children: [_jsx(TableCell, { children: _jsx(TextField, { fullWidth: true, size: "small", value: nameText, error: nameFaultText !== null, helperText: nameFaultText ?? undefined, slotProps: { htmlInput: { 'aria-label': `${side} ${String(index)} name` } }, onChange: (e) => { changeName(side, index, e.target.value); } }) }), _jsx(TableCell, { children: _jsx(TextField, { fullWidth: true, size: "small", value: param.displayName, slotProps: { htmlInput: { 'aria-label': `${side} ${String(index)} display name` } }, onChange: (e) => { changeParam(side, index, 'displayName', e.target.value); } }) }), _jsx(TableCell, { children: _jsxs(Box, { sx: { display: 'flex', gap: 0.5, alignItems: 'center' }, children: [_jsx(FormControl, { fullWidth: true, size: "small", children: _jsx(Select, { value: currentType, inputProps: { 'aria-label': `${side} ${String(index)} type` }, onChange: (e) => { changeParam(side, index, 'type', e.target.value); }, children: options.map((t) => _jsx(MenuItem, { value: t.name, children: t.label }, t.name)) }) }), _jsx(CollectionComposer, { type: currentType, portTypes: portTypes, ariaLabel: `${side} ${String(index)} type wrapped in a collection`, onWrap: (wrapped) => { changeParam(side, index, 'type', wrapped); } })] }) }), _jsx(TableCell, { children: _jsx(Checkbox, { checked: param.isRequired, slotProps: { input: { 'aria-label': `${side} ${String(index)} required` } }, onChange: (e) => { changeParam(side, index, 'isRequired', e.target.checked); } }) }), _jsx(TableCell, { children: _jsx(IconButton, { size: "small", color: "error", "aria-label": `Remove ${side} ${String(index)}`, onClick: () => { removeParam(side, index); }, children: _jsx(DeleteIcon, { fontSize: "small" }) }) })] }, index));
|
|
78
|
+
})) })] }) })] }));
|
|
79
|
+
};
|
|
80
|
+
return (_jsxs(Dialog, { open: open, onClose: onClose, maxWidth: "md", fullWidth: true, children: [_jsx(DialogTitle, { children: title }), _jsxs(DialogContent, { dividers: true, children: [_jsx(Tabs, { value: activeTab, onChange: (_, val) => { setActiveTab(val); }, children: tabs.map((label) => _jsx(Tab, { label: label }, label)) }), current === 'General' && (_jsxs(Stack, { spacing: 3, sx: { mt: 2 }, children: [_jsx(TextField, { label: "Workflow Name", fullWidth: true, value: name, slotProps: { htmlInput: { 'aria-label': 'Workflow Name' } }, onChange: (e) => { onNameChange(e.target.value); } }), _jsx(TextField, { label: "Description", fullWidth: true, multiline: true, rows: 3, value: description ?? '', slotProps: { htmlInput: { 'aria-label': 'Description' } }, onChange: (e) => { onDescriptionChange(e.target.value || null); } }), generalSlot] })), current === 'Inputs' && renderTable('input'), current === 'Outputs' && renderTable('output'), current === rowTab && showConcurrency && concurrency !== undefined && onConcurrencyChange !== undefined && (_jsx(ConcurrencySection, { value: concurrency, onChange: onConcurrencyChange })), current === rowTab && showExecution && (_jsx(WorkflowExecutionSection, { executionTimeoutSeconds: executionTimeoutSeconds, onExecutionTimeoutSecondsChange: onExecutionTimeoutSecondsChange, retryPolicyJson: retryPolicyJson, onRetryPolicyJsonChange: onRetryPolicyJsonChange, checkpointPolicyJson: checkpointPolicyJson, onCheckpointPolicyJsonChange: onCheckpointPolicyJsonChange }))] }), _jsx(DialogActions, { children: _jsx(Button, { variant: "contained", color: "primary", onClick: onClose, children: "Done" }) })] }));
|
|
81
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface WorkflowExecutionSectionProps {
|
|
2
|
+
/** The workflow row's own deadline in seconds, as a create and an update take it; `null` is none. */
|
|
3
|
+
executionTimeoutSeconds?: number | null;
|
|
4
|
+
onExecutionTimeoutSecondsChange?: (next: number | null) => void;
|
|
5
|
+
/** The row's retry policy, the JSON text of the column; `null` is no policy. */
|
|
6
|
+
retryPolicyJson?: string | null;
|
|
7
|
+
onRetryPolicyJsonChange?: (next: string | null) => void;
|
|
8
|
+
/** The row's checkpoint policy, the JSON text of the column; `null` is no policy. */
|
|
9
|
+
checkpointPolicyJson?: string | null;
|
|
10
|
+
onCheckpointPolicyJsonChange?: (next: string | null) => void;
|
|
11
|
+
}
|
|
12
|
+
/** The workflow row's own three engine settings: the deadline a whole run gets, and the retry and checkpoint
|
|
13
|
+
* policies it names. Each control is rendered only where the host supplies that control's own callback. */
|
|
14
|
+
export declare function WorkflowExecutionSection({ executionTimeoutSeconds, onExecutionTimeoutSecondsChange, retryPolicyJson, onRetryPolicyJsonChange, checkpointPolicyJson, onCheckpointPolicyJsonChange, }: WorkflowExecutionSectionProps): import("react").JSX.Element | null;
|