@w6w/ui 0.2.11 → 0.2.55
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/CHANGELOG.md +139 -2
- package/README.md +28 -10
- package/dist/AppPicker.d.ts +12 -1
- package/dist/CanvasContextMenu.d.ts +19 -0
- package/dist/{CodeBlock-BqXDA35P.js → CodeBlock-C-oIIYfC.js} +1436 -555
- package/dist/CodeBlock-C-oIIYfC.js.map +1 -0
- package/dist/CodeBlock-CymlfyeA.cjs +15 -0
- package/dist/CodeBlock-CymlfyeA.cjs.map +1 -0
- package/dist/CodeEditor.d.ts +4 -1
- package/dist/ConditionEditor.d.ts +11 -0
- package/dist/JsonEditor.d.ts +12 -0
- package/dist/ParamCustomization.d.ts +5 -0
- package/dist/ParamsForm.d.ts +11 -3
- package/dist/RouterEditor.d.ts +5 -0
- package/dist/StepBuilderModal.d.ts +83 -13
- package/dist/StepNameEditor.d.ts +11 -0
- package/dist/StopEditor.d.ts +5 -0
- package/dist/TriggerFillForm.d.ts +14 -1
- package/dist/WebhookListenPanel.d.ts +28 -0
- package/dist/WorkflowConnections.d.ts +29 -0
- package/dist/WorkflowConnectionsPanel.d.ts +5 -0
- package/dist/WorkflowFlowEditor.d.ts +67 -8
- package/dist/assets/script-completion.worker-DDJKkj5M.js +8290 -0
- package/dist/assets/script-completion.worker-DDJKkj5M.js.map +1 -0
- package/dist/canvas-context-menu.d.ts +27 -0
- package/dist/code.cjs +1 -1
- package/dist/code.mjs +3 -4
- package/dist/code.mjs.map +1 -1
- package/dist/components/AnchoredFlyout.d.ts +7 -0
- package/dist/components/ColumnsEditor.d.ts +27 -0
- package/dist/components/Combobox.d.ts +12 -1
- package/dist/components/ConfirmModal.d.ts +3 -1
- package/dist/components/CsvPanel.d.ts +21 -0
- package/dist/components/DataEntryEditor.d.ts +38 -0
- package/dist/components/DataEntryList.d.ts +33 -0
- package/dist/components/DataStoreList.d.ts +33 -0
- package/dist/components/DataTableGrid.d.ts +46 -0
- package/dist/components/EventbriteTriggerPicker.d.ts +7 -0
- package/dist/components/ExecutionDetail.d.ts +17 -1
- package/dist/components/ExecutionList.d.ts +19 -1
- package/dist/components/ExecutionLogPanel.d.ts +61 -3
- package/dist/components/ExpressionEditorModal.d.ts +33 -10
- package/dist/components/ExpressionOptions.d.ts +101 -15
- package/dist/components/HtmlPreview.d.ts +7 -0
- package/dist/components/JsonTree.d.ts +32 -0
- package/dist/components/ResolvedParams.d.ts +6 -1
- package/dist/components/ResultViewer.d.ts +46 -0
- package/dist/components/ScriptBindingsNotice.d.ts +31 -0
- package/dist/components/ScriptCodeField.d.ts +13 -0
- package/dist/components/StepStatusPill.d.ts +7 -0
- package/dist/components/expression-authoring.d.ts +13 -0
- package/dist/components/expression-dom.d.ts +17 -2
- package/dist/components/expression-template.d.ts +25 -3
- package/dist/components/icons.d.ts +1 -1
- package/dist/components/json-compose.d.ts +53 -0
- package/dist/components/result-format.d.ts +13 -0
- package/dist/condition-editor.d.ts +44 -0
- package/dist/connection-app-meta-BEXlKBgV.cjs +22 -0
- package/dist/connection-app-meta-BEXlKBgV.cjs.map +1 -0
- package/dist/connection-app-meta-ZCPakGjD.js +12422 -0
- package/dist/connection-app-meta-ZCPakGjD.js.map +1 -0
- package/dist/data-stores/data-store-view.d.ts +371 -0
- package/dist/eventbrite-trigger-selection.d.ts +13 -0
- package/dist/flow-connect.d.ts +22 -16
- package/dist/flow-delete.d.ts +16 -0
- package/dist/flow-history.d.ts +75 -0
- package/dist/flow-layout.d.ts +13 -0
- package/dist/flow-loop-colors.d.ts +39 -0
- package/dist/flow-loop.d.ts +98 -0
- package/dist/flow-node-flags.d.ts +14 -0
- package/dist/flow-problems.d.ts +69 -0
- package/dist/flow-state.d.ts +20 -0
- package/dist/flow-types.d.ts +137 -9
- package/dist/flow-utils.d.ts +27 -13
- package/dist/flow.cjs +4 -2
- package/dist/flow.cjs.map +1 -1
- package/dist/flow.d.ts +9 -3
- package/dist/flow.mjs +4028 -1585
- package/dist/flow.mjs.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +30 -4
- package/dist/index.mjs +2559 -1287
- package/dist/index.mjs.map +1 -1
- package/dist/node-samples.d.ts +80 -0
- package/dist/output-shape.d.ts +30 -14
- package/dist/param-customization.d.ts +7 -0
- package/dist/provider.d.ts +119 -7
- package/dist/resolve-params.d.ts +45 -11
- package/dist/run-visuals.d.ts +14 -21
- package/dist/script-bindings.d.ts +63 -0
- package/dist/script-completion-service.d.ts +9 -0
- package/dist/script-completion.worker.d.ts +1 -0
- package/dist/script-completions.d.ts +2 -0
- package/dist/state-shape.d.ts +38 -0
- package/dist/step-preview-state.d.ts +155 -6
- package/dist/step-problems.d.ts +42 -12
- package/dist/test-inputs.d.ts +25 -0
- package/dist/trigger-registration.d.ts +28 -0
- package/dist/types.d.ts +70 -8
- package/dist/use-app-action-defs.d.ts +9 -1
- package/dist/use-test-input.d.ts +18 -0
- package/dist/workflow-connections.d.ts +78 -0
- package/package.json +16 -7
- package/src/code.css +60 -6
- package/src/styles/_canvas.scss +35 -0
- package/src/styles/_code-editor.scss +35 -0
- package/src/styles/_code.scss +6 -5
- package/src/styles/_connections.scss +64 -0
- package/src/styles/_copyable.scss +24 -0
- package/src/styles/_data-stores.scss +138 -0
- package/src/styles/_data-vars.scss +17 -6
- package/src/styles/_execution-history.scss +73 -0
- package/src/styles/_execution-log.scss +145 -1
- package/src/styles/_expression-modal.scss +106 -16
- package/src/styles/_fields.scss +11 -0
- package/src/styles/_flow.scss +166 -0
- package/src/styles/_fx.scss +3 -1
- package/src/styles/_incoming-state.scss +33 -0
- package/src/styles/_modal.scss +12 -0
- package/src/styles/_multiselect.scss +35 -0
- package/src/styles/_sections.scss +36 -0
- package/src/styles/_step-builder.scss +145 -0
- package/src/styles/_tester.scss +56 -0
- package/src/styles/_tokens.scss +27 -1
- package/src/styles.css +1347 -41
- package/src/styles.scss +2 -0
- package/dist/CodeBlock-BqXDA35P.js.map +0 -1
- package/dist/CodeBlock-CulfbnZD.cjs +0 -15
- package/dist/CodeBlock-CulfbnZD.cjs.map +0 -1
- package/dist/ConfirmModal-Ln99S9NT.js +0 -7919
- package/dist/ConfirmModal-Ln99S9NT.js.map +0 -1
- package/dist/ConfirmModal-fjHW5rN-.cjs +0 -14
- package/dist/ConfirmModal-fjHW5rN-.cjs.map +0 -1
- package/dist/Copyable-DA6eiU7w.cjs +0 -2
- package/dist/Copyable-DA6eiU7w.cjs.map +0 -1
- package/dist/Copyable-F4NTaG77.js +0 -847
- package/dist/Copyable-F4NTaG77.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** A right-click's flow-space drop point plus the nodes its node actions apply to. */
|
|
2
|
+
export interface CanvasMenuTarget {
|
|
3
|
+
/** Where an added node lands — the click converted to flow coordinates. */
|
|
4
|
+
flow: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
/** Node ids Duplicate / Delete act on. Empty on a bare-canvas right-click. */
|
|
9
|
+
nodeIds: string[];
|
|
10
|
+
}
|
|
11
|
+
export type CanvasMenuAction = "duplicate" | "delete" | "add-node" | "add-trigger";
|
|
12
|
+
export interface CanvasMenuItem {
|
|
13
|
+
action: CanvasMenuAction;
|
|
14
|
+
label: string;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
danger?: boolean;
|
|
17
|
+
/** A divider is drawn above this item. */
|
|
18
|
+
separated?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The nodes a right-click acts on. A node that is part of the current selection acts on
|
|
22
|
+
* the whole selection; any other node acts on itself alone (and becomes the selection).
|
|
23
|
+
* The bare canvas acts on whatever is selected.
|
|
24
|
+
*/
|
|
25
|
+
export declare function contextMenuTargets(selectedIds: readonly string[], nodeId?: string): string[];
|
|
26
|
+
/** Duplicate + Delete when nodes are targeted, then Add node + Add trigger. All greyed when read-only. */
|
|
27
|
+
export declare function canvasMenuItems(nodeIds: readonly string[], readOnly: boolean): CanvasMenuItem[];
|
package/dist/code.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CodeBlock-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CodeBlock-CymlfyeA.cjs");exports.CodeBlock=e.CodeBlock;exports.Copyable=e.Copyable;
|
|
2
2
|
//# sourceMappingURL=code.cjs.map
|
package/dist/code.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as
|
|
3
|
-
import { C as a } from "./Copyable-F4NTaG77.js";
|
|
2
|
+
import { C as a, a as l } from "./CodeBlock-C-oIIYfC.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
a as CodeBlock,
|
|
5
|
+
l as Copyable
|
|
7
6
|
};
|
|
8
7
|
//# sourceMappingURL=code.mjs.map
|
package/dist/code.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
/** Full-row flyout anchored inside the nearest dialog’s top layer. */
|
|
3
|
+
export declare function AnchoredFlyout({ anchorRef, onClose, children, }: {
|
|
4
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): import('react').ReactPortal | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TableColumn } from '../data-stores/data-store-view.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The `table` kind's column list: a controlled row editor (rows + `onChange(next)`; the column
|
|
4
|
+
* list itself is never copied).
|
|
5
|
+
*
|
|
6
|
+
* The **key column** select is the one piece of the schema a row cannot decide for itself: only a
|
|
7
|
+
* column that is `required` and typed `string` or `integer` may be a row's key, so the select
|
|
8
|
+
* offers only those rows. A column renamed, retyped or un-required out of that set resets the
|
|
9
|
+
* selection to `""` ("generated keys") rather than holding a key the server would reject.
|
|
10
|
+
*
|
|
11
|
+
* `columnErrors` is keyed by column NAME (what the host's error envelope names in
|
|
12
|
+
* `error.column`), so a 400 lands under the row that caused it.
|
|
13
|
+
*
|
|
14
|
+
* Each row also takes a **default**, typed as text and parsed with the column's type: empty or
|
|
15
|
+
* refused text leaves the column with no `default` key at all, a valid one stores the typed value
|
|
16
|
+
* (`7`, `true`), never the text.
|
|
17
|
+
*/
|
|
18
|
+
export interface ColumnsEditorProps {
|
|
19
|
+
columns: TableColumn[];
|
|
20
|
+
onChange: (next: TableColumn[]) => void;
|
|
21
|
+
/** The selected key column's name, or `""` for "generated keys". */
|
|
22
|
+
keyColumn: string;
|
|
23
|
+
onKeyColumnChange: (k: string) => void;
|
|
24
|
+
/** One message per column name, from the server's `error.column`. */
|
|
25
|
+
columnErrors: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
export declare function ColumnsEditor(props: ColumnsEditorProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface ComboboxOption {
|
|
2
2
|
value: string;
|
|
3
3
|
label: string;
|
|
4
|
+
/** A muted second line under the label (e.g. a value preview); never matched by the filter. */
|
|
5
|
+
detail?: string;
|
|
4
6
|
}
|
|
5
7
|
export interface ComboboxProps {
|
|
6
8
|
options: ComboboxOption[];
|
|
@@ -22,10 +24,19 @@ export interface ComboboxProps {
|
|
|
22
24
|
*/
|
|
23
25
|
listMaxHeight?: number;
|
|
24
26
|
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Called with the typed text on every edit — for a host that searches server-side and
|
|
29
|
+
* passes the results back as `options`. The local filter still narrows what is shown.
|
|
30
|
+
*/
|
|
31
|
+
onInputChange?: (text: string) => void;
|
|
32
|
+
/** Shown in the open list when no option matches. Default "No matches". */
|
|
33
|
+
emptyText?: string;
|
|
34
|
+
/** A muted line at the foot of the open list (e.g. "More entries — type to narrow"). */
|
|
35
|
+
footer?: string;
|
|
25
36
|
}
|
|
26
37
|
/** Combobox is chosen when the list would take more than 60% of the viewport. */
|
|
27
38
|
export declare function shouldUseCombobox(count: number, optionHeight: number, viewportHeight: number): boolean;
|
|
28
39
|
/** Case-insensitive substring match on label and value. */
|
|
29
40
|
export declare function filterOptions(options: ComboboxOption[], query: string): ComboboxOption[];
|
|
30
41
|
export declare const DEFAULT_LIST_MAX_HEIGHT = 240;
|
|
31
|
-
export declare function Combobox({ options, value, onChange, placeholder, disabled, "aria-label": ariaLabel, mode, forceSelection, optionHeight, listMaxHeight, className, }: ComboboxProps): import("react").JSX.Element;
|
|
42
|
+
export declare function Combobox({ options, value, onChange, placeholder, disabled, "aria-label": ariaLabel, mode, forceSelection, optionHeight, listMaxHeight, className, onInputChange, emptyText, footer, }: ComboboxProps): import("react").JSX.Element;
|
|
@@ -8,6 +8,8 @@ export interface ConfirmModalProps {
|
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
confirmLabel?: string;
|
|
10
10
|
cancelLabel?: string;
|
|
11
|
+
/** Prevent dismissal and repeated submission while the action is running. */
|
|
12
|
+
pending?: boolean;
|
|
11
13
|
/** Style the confirm button as destructive (default true — this dialog gates dangerous actions). */
|
|
12
14
|
destructive?: boolean;
|
|
13
15
|
/** Extra consequence copy under the message (e.g. a warning line) that a string cannot carry. */
|
|
@@ -30,4 +32,4 @@ export interface ConfirmModalProps {
|
|
|
30
32
|
* Confirmations are `{pending}` state + a rendered sibling modal, never a blocking
|
|
31
33
|
* call: a caller reachable from a keydown handler cannot swap in a boolean.
|
|
32
34
|
*/
|
|
33
|
-
export declare function ConfirmModal({ title, message, onConfirm, onClose, confirmLabel, cancelLabel, destructive, children, }: ConfirmModalProps): import("react").JSX.Element;
|
|
35
|
+
export declare function ConfirmModal({ title, message, onConfirm, onClose, confirmLabel, cancelLabel, destructive, pending, children, }: ConfirmModalProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface CsvPanelProps {
|
|
2
|
+
/** What the panel is telling the operator, and whether it failed. `null` renders nothing. */
|
|
3
|
+
result: {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
message: string;
|
|
6
|
+
} | null;
|
|
7
|
+
/** Disables Export while a request is in flight. */
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
/** A file within {@link CSV_MAX_BYTES}. Reading and sending it are the host's. */
|
|
10
|
+
onImport: (file: File) => void;
|
|
11
|
+
/** A file the panel refused before handing it over (too large). */
|
|
12
|
+
onRefuse: (message: string) => void;
|
|
13
|
+
onExport: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* CSV import and export for one table store: one file input, one Export button, one result line.
|
|
17
|
+
* Props-only. The panel owns the size check (a file over {@link CSV_MAX_BYTES} is refused here and
|
|
18
|
+
* never reaches `onImport`); it never parses the CSV, because the host is the authority on line
|
|
19
|
+
* and column.
|
|
20
|
+
*/
|
|
21
|
+
export declare function CsvPanel({ result, busy, onImport, onRefuse, onExport }: CsvPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface DataEntryEditorProps {
|
|
2
|
+
/** `kv` edits one input; `doc` edits JSON in a {@link JsonEditor}. */
|
|
3
|
+
kind: "kv" | "doc";
|
|
4
|
+
/** True for a not-yet-created entry: opens directly in edit mode with a key input. */
|
|
5
|
+
isNew: boolean;
|
|
6
|
+
/** The entry's key (existing mode heading). */
|
|
7
|
+
entryKey?: string;
|
|
8
|
+
/** The new entry's key (controlled). */
|
|
9
|
+
newKey?: string;
|
|
10
|
+
/** Concurrency token supplied by the host; never presented as document history. */
|
|
11
|
+
version?: number | null;
|
|
12
|
+
/** Existing mode: ISO expiry, shown when set. */
|
|
13
|
+
expiresAt?: string | null;
|
|
14
|
+
/** The value text (controlled). */
|
|
15
|
+
text: string;
|
|
16
|
+
/** A host-supplied value/save error. */
|
|
17
|
+
error?: string | null;
|
|
18
|
+
/** True after a stale `ifVersion`: shows the conflict copy and Reload, and disables Save. */
|
|
19
|
+
conflict?: boolean;
|
|
20
|
+
/** True while a save is in flight: disables Save. */
|
|
21
|
+
saving?: boolean;
|
|
22
|
+
/** Fired per edit of the value, with the new text. */
|
|
23
|
+
onTextChange: (text: string) => void;
|
|
24
|
+
/** Fired per edit of the new-entry key, with the new text. */
|
|
25
|
+
onKeyChange: (key: string) => void;
|
|
26
|
+
/** Opens the host's delete confirmation for an existing entry. */
|
|
27
|
+
onDelete?: () => void;
|
|
28
|
+
onSave: () => void;
|
|
29
|
+
onCancel: () => void;
|
|
30
|
+
/** Fired by the conflict prompt's Reload. */
|
|
31
|
+
onReload: () => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Existing entries open for viewing, then Edit enables changes inside the same modal.
|
|
35
|
+
* New entries start in edit mode. Drafts, `ifVersion` and mutations live in the host.
|
|
36
|
+
* Document validity is derived from the controlled text, including initial values and reloads.
|
|
37
|
+
*/
|
|
38
|
+
export declare function DataEntryEditor({ kind, isNew, entryKey, newKey, expiresAt, text, error, conflict, saving, onTextChange, onKeyChange, onDelete, onSave, onCancel, onReload, }: DataEntryEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** One row of a kv/doc store's entry list, as the host has already prepared it. */
|
|
3
|
+
export interface DataEntryListRow {
|
|
4
|
+
key: string;
|
|
5
|
+
version: number;
|
|
6
|
+
/** The short text shown in the Value column. */
|
|
7
|
+
preview: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DataEntryListProps {
|
|
10
|
+
rows: readonly DataEntryListRow[];
|
|
11
|
+
/** Shown instead of the table when there are no rows and the list is not `loading`. */
|
|
12
|
+
empty?: ReactNode;
|
|
13
|
+
/** When there are no rows, shows the loading text instead of `empty`. */
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
/** Initial text of the key-prefix box. */
|
|
16
|
+
searchValue?: string;
|
|
17
|
+
/** Renders "Load more" when true. */
|
|
18
|
+
hasMore?: boolean;
|
|
19
|
+
/** Fired when a row is opened by mouse or its key button by keyboard. */
|
|
20
|
+
onOpen: (key: string) => void;
|
|
21
|
+
/** Fired with the prefix text when the search form is SUBMITTED (never per keystroke). */
|
|
22
|
+
onSearch: (text: string) => void;
|
|
23
|
+
/** Fired by the "New entry" button. */
|
|
24
|
+
onNew: () => void;
|
|
25
|
+
/** Fired by "Load more". */
|
|
26
|
+
onLoadMore: () => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A presentational list of a kv/doc store's entries: view-model rows in, callbacks out. It owns
|
|
30
|
+
* only the text of the search box; the query, the editor and the delete confirmation are the
|
|
31
|
+
* host's. Rows render through {@link DataTable}.
|
|
32
|
+
*/
|
|
33
|
+
export declare function DataEntryList({ rows, empty, loading, searchValue, hasMore, onOpen, onSearch, onNew, onLoadMore, }: DataEntryListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { DataStore } from '../data-stores/data-store-view.ts';
|
|
3
|
+
export interface DataStoreListProps {
|
|
4
|
+
stores: readonly DataStore[];
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
error?: string | null;
|
|
7
|
+
/** Row click. The event is passed through untouched; the host may `preventDefault`. */
|
|
8
|
+
onOpen?: (id: string, event: MouseEvent<Element>) => void;
|
|
9
|
+
/** When set, each row is a real `<a href>`. */
|
|
10
|
+
getHref?: (id: string) => string;
|
|
11
|
+
/** Renders an Edit button per row. */
|
|
12
|
+
onEdit?: (store: DataStore) => void;
|
|
13
|
+
/** Renders an Archive button per row. Confirmation and the archive call are the host's. */
|
|
14
|
+
onArchive?: (store: DataStore) => void;
|
|
15
|
+
/** Disables every Archive button while an archive is in flight. */
|
|
16
|
+
busy?: boolean;
|
|
17
|
+
/** Size formatter; defaults to the package's `formatBytes` (`2.0 KiB`). */
|
|
18
|
+
formatSize?: (bytes: number) => string;
|
|
19
|
+
slots?: {
|
|
20
|
+
/** Heading block above the rows. */
|
|
21
|
+
header?: ReactNode;
|
|
22
|
+
/** Trailing action(s) next to the header (e.g. a "New store" button). */
|
|
23
|
+
actions?: ReactNode;
|
|
24
|
+
/** Shown when there are no stores and the list is not `loading`. */
|
|
25
|
+
empty?: ReactNode;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A presentational list of Data stores: rows in, callbacks out; it needs no provider. Rows render
|
|
30
|
+
* through {@link DataTable} (name, kind, entry count, size, last update, and an Edit/Archive column
|
|
31
|
+
* that is never a link).
|
|
32
|
+
*/
|
|
33
|
+
export declare function DataStoreList({ stores, loading, error, onOpen, getHref, onEdit, onArchive, busy, formatSize, slots, }: DataStoreListProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TableColumn } from '../data-stores/data-store-view.ts';
|
|
3
|
+
/** One grid row as the host has prepared it. `id` is the entry key; the new row is `isNew`. */
|
|
4
|
+
export interface DataTableGridRow {
|
|
5
|
+
id: string;
|
|
6
|
+
/** True for the unsaved row: its key cell is editable and its `data-row` is `"new"`. */
|
|
7
|
+
isNew?: boolean;
|
|
8
|
+
/** Draft cell text by column name. */
|
|
9
|
+
cells: Record<string, string>;
|
|
10
|
+
/** The version the row was loaded at; `null` for a new row. */
|
|
11
|
+
version: number | null;
|
|
12
|
+
/** True when the draft differs from the loaded entry. */
|
|
13
|
+
dirty: boolean;
|
|
14
|
+
/** True after a stale `ifVersion`: shows the conflict copy and Reload, and disables Save. */
|
|
15
|
+
conflict?: boolean;
|
|
16
|
+
/** Per-cell error messages by column name, shown under their own cell. */
|
|
17
|
+
cellErrors?: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
export interface DataTableGridProps {
|
|
20
|
+
columns: readonly TableColumn[];
|
|
21
|
+
/** The column whose cell is the row key (read-only on an existing row). */
|
|
22
|
+
keyColumn: string;
|
|
23
|
+
rows: readonly DataTableGridRow[];
|
|
24
|
+
/** A grid-level (not cell) error. */
|
|
25
|
+
error?: string | null;
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
empty?: ReactNode;
|
|
28
|
+
/** Initial text of the key-prefix box. */
|
|
29
|
+
searchValue?: string;
|
|
30
|
+
hasMore?: boolean;
|
|
31
|
+
onCellChange: (rowId: string, column: string, text: string) => void;
|
|
32
|
+
onSave: (rowId: string) => void;
|
|
33
|
+
/** Fired immediately; confirmation is the host's. */
|
|
34
|
+
onDelete: (rowId: string) => void;
|
|
35
|
+
onReload: (rowId: string) => void;
|
|
36
|
+
onAddRow: () => void;
|
|
37
|
+
onLoadMore: () => void;
|
|
38
|
+
/** Fired with the prefix text when the search form is SUBMITTED (never per keystroke). */
|
|
39
|
+
onSearch: (text: string) => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A presentational editable grid for a table store: row view-models in, callbacks out. Drafts,
|
|
43
|
+
* dirty tracking, version handling and the delete confirmation are the host's. Rows render through
|
|
44
|
+
* {@link DataTable}.
|
|
45
|
+
*/
|
|
46
|
+
export declare function DataTableGrid({ columns, keyColumn, rows, error, loading, empty, searchValue, hasMore, onCellChange, onSave, onDelete, onReload, onAddRow, onLoadMore, onSearch, }: DataTableGridProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventbriteTriggerChoices } from '../eventbrite-trigger-selection.ts';
|
|
2
|
+
/** The same event list the app's webhook registration uses, saved as activity/actions. */
|
|
3
|
+
export declare function EventbriteTriggerPicker({ choices, onChange, readOnly, }: {
|
|
4
|
+
choices: EventbriteTriggerChoices;
|
|
5
|
+
onChange: (actions: string[]) => void;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -36,6 +36,9 @@ export interface ExecutionDetailValue {
|
|
|
36
36
|
/** A workflow run's steps. `undefined` = not a step-bearing run (no section);
|
|
37
37
|
* `[]` = it ran and no step did (the panel's own empty state). */
|
|
38
38
|
steps?: ExecutionLogStep[];
|
|
39
|
+
/** The execution this one is a re-run of — shown as "Re-run of <id>".
|
|
40
|
+
* `null`/omitted ⇒ an ordinary execution, no line. */
|
|
41
|
+
rerunOf?: string | null;
|
|
39
42
|
}
|
|
40
43
|
export interface ExecutionDetailProps {
|
|
41
44
|
/** The execution to show, or `null` when there is nothing to show yet. */
|
|
@@ -54,6 +57,19 @@ export interface ExecutionDetailProps {
|
|
|
54
57
|
/** Supplied ⇒ the "Open in visual editor" button renders and calls this.
|
|
55
58
|
* Omitted ⇒ no button (a function/endpoint run has no visual editor to open). */
|
|
56
59
|
onOpenInEditor?: () => void;
|
|
60
|
+
/** Supplied ⇒ a "Back" control renders above everything else and calls this
|
|
61
|
+
* — for a host that shows this detail IN PLACE of the list it was opened
|
|
62
|
+
* from. Omitted ⇒ no control. Rendered in every branch, so a view whose
|
|
63
|
+
* fetch failed can still be left. */
|
|
64
|
+
onBack?: () => void;
|
|
65
|
+
/** Supplied ⇒ the "Re-run" button renders and calls this. Omitted ⇒ no button. */
|
|
66
|
+
onRerun?: () => void;
|
|
67
|
+
/** `true` while the host's re-run is in flight — the button is disabled and
|
|
68
|
+
* says so. */
|
|
69
|
+
rerunning?: boolean;
|
|
70
|
+
/** Supplied ⇒ the "Re-run of <id>" id is a link that calls this with that
|
|
71
|
+
* id, to open the original. Omitted ⇒ plain text. */
|
|
72
|
+
onOpenExecution?: (id: string) => void;
|
|
57
73
|
}
|
|
58
74
|
/**
|
|
59
75
|
* Everything known about one past execution: which callable it was and how it
|
|
@@ -67,4 +83,4 @@ export interface ExecutionDetailProps {
|
|
|
67
83
|
*
|
|
68
84
|
* A pure display leaf — no fetching, no polling, no live-ticking timer.
|
|
69
85
|
*/
|
|
70
|
-
export declare function ExecutionDetail({ execution, loading, errorMessage, onClose, onOpenInEditor, }: ExecutionDetailProps): import("react").JSX.Element;
|
|
86
|
+
export declare function ExecutionDetail({ execution, loading, errorMessage, onClose, onOpenInEditor, onBack, onRerun, rerunning, onOpenExecution, }: ExecutionDetailProps): import("react").JSX.Element;
|
|
@@ -19,6 +19,17 @@ export interface ExecutionListItem {
|
|
|
19
19
|
/** Wall-clock duration once the run has finished; `null` while it is still
|
|
20
20
|
* queued/running (rendered as `—`). */
|
|
21
21
|
durationMs: number | null;
|
|
22
|
+
/** The execution this one is a re-run of — the row then carries a "Re-run"
|
|
23
|
+
* tag. `null`/omitted ⇒ an ordinary execution. */
|
|
24
|
+
rerunOf?: string | null;
|
|
25
|
+
/** How the run was started (`manual`, `schedule`, `webhook`, `event`, `replay`, or any other
|
|
26
|
+
* value the host passes through). `null`/omitted ⇒ no trigger segment. */
|
|
27
|
+
trigger?: string | null;
|
|
28
|
+
/** The trigger node the run entered through, shown beside the trigger. */
|
|
29
|
+
triggerNodeId?: string | null;
|
|
30
|
+
/** The start of the run's input as JSON text, shown as a one-line snippet. `null`/omitted ⇒
|
|
31
|
+
* no snippet. */
|
|
32
|
+
inputPreview?: string | null;
|
|
22
33
|
}
|
|
23
34
|
export interface ExecutionListProps {
|
|
24
35
|
/** The page of past executions, rendered in exactly this order — never re-sorted. */
|
|
@@ -47,6 +58,13 @@ export interface ExecutionListProps {
|
|
|
47
58
|
onPrev?: () => void;
|
|
48
59
|
/** Supplied ⇒ the pager renders and `Next` calls this. */
|
|
49
60
|
onNext?: () => void;
|
|
61
|
+
/** Supplied ⇒ every row gets a "Re-run" control beside it that reports the
|
|
62
|
+
* row's id here. Omitted ⇒ no control. */
|
|
63
|
+
onRerun?: (id: string) => void;
|
|
64
|
+
/** The row whose re-run is in flight — its control is disabled. While any
|
|
65
|
+
* re-run is in flight every row's control is disabled, so two can never
|
|
66
|
+
* overlap. `null`/omitted ⇒ none. */
|
|
67
|
+
rerunningId?: string | null;
|
|
50
68
|
}
|
|
51
69
|
/**
|
|
52
70
|
* A paged list of past executions: one row per run, click-to-select, with a
|
|
@@ -57,4 +75,4 @@ export interface ExecutionListProps {
|
|
|
57
75
|
* reports a page request; the host owns which page is loaded and which row is
|
|
58
76
|
* selected.
|
|
59
77
|
*/
|
|
60
|
-
export declare function ExecutionList({ items, selectedId, onSelect, showCallable, loading, emptyLabel, hasPrev, hasNext, onPrev, onNext, }: ExecutionListProps): import("react").JSX.Element;
|
|
78
|
+
export declare function ExecutionList({ items, selectedId, onSelect, showCallable, loading, emptyLabel, hasPrev, hasNext, onPrev, onNext, onRerun, rerunningId, }: ExecutionListProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StepMeta } from '../provider.tsx';
|
|
3
|
-
import { StepStatus } from './StepStatusPill.tsx';
|
|
3
|
+
import { SkipReason, StepStatus } from './StepStatusPill.tsx';
|
|
4
|
+
/** What a step is: the app and action it uses, and whether it is a trigger (`uses.trigger`). */
|
|
5
|
+
export interface ExecutionLogNode {
|
|
6
|
+
app: string;
|
|
7
|
+
action: string;
|
|
8
|
+
trigger?: boolean;
|
|
9
|
+
appName?: string;
|
|
10
|
+
actionName?: string;
|
|
11
|
+
}
|
|
4
12
|
/**
|
|
5
13
|
* A step's or run's failure, already normalised by the HOST from the workflow
|
|
6
14
|
* spec's `StepError` (`code`/`message`/`phase`/`retryable`). The panel never
|
|
@@ -43,6 +51,12 @@ export interface ExecutionLogStep {
|
|
|
43
51
|
/** Human-readable step name. Falls back to `id` when omitted. */
|
|
44
52
|
label?: string;
|
|
45
53
|
status: StepStatus;
|
|
54
|
+
/**
|
|
55
|
+
* Why a `skipped` step did not run (`StepExecution.skipReason`). `not_on_path` rows leave the
|
|
56
|
+
* list for the "other paths" footer; the rest show a short reason beside the Skipped pill.
|
|
57
|
+
* Absent (a run recorded before reasons existed) ⇒ a plain Skipped row, as before.
|
|
58
|
+
*/
|
|
59
|
+
skipReason?: SkipReason;
|
|
46
60
|
/** ISO-8601 timestamp the step started, once it has. */
|
|
47
61
|
startedAt?: string;
|
|
48
62
|
/** ISO-8601 timestamp the step finished, once it has. */
|
|
@@ -51,20 +65,64 @@ export interface ExecutionLogStep {
|
|
|
51
65
|
input?: unknown;
|
|
52
66
|
/** The step's output, once it has one. */
|
|
53
67
|
output?: unknown;
|
|
68
|
+
/** Captured console output (also present when a script throws). */
|
|
69
|
+
logs?: string[];
|
|
54
70
|
/**
|
|
55
71
|
* What ran (`StepExecution.meta`): app, version, action and connection id. Shown as a
|
|
56
72
|
* Metadata block after Output. Absent or `null` ⇒ no block at all (R-12: no filler).
|
|
57
73
|
*/
|
|
58
74
|
meta?: StepMeta | null;
|
|
75
|
+
/**
|
|
76
|
+
* What this step IS, from the workflow definition — shown on the row itself so a run reads as
|
|
77
|
+
* "Trigger · Cohost · Order Placed" rather than a bare node id. `appName`/`actionName` are the
|
|
78
|
+
* host's display names for a registered app; a built-in `@w6w/*` node is named here from its
|
|
79
|
+
* own definition, and anything unnamed falls back to the raw id. Absent ⇒ the row shows its
|
|
80
|
+
* label alone, as before.
|
|
81
|
+
*/
|
|
82
|
+
node?: ExecutionLogNode;
|
|
59
83
|
/**
|
|
60
84
|
* Why the step failed (`StepExecution.error`, "present on failed"). Rendered
|
|
61
85
|
* below the row's box and outside its lazy `<details>` body, so the reason
|
|
62
86
|
* reads without expanding the row.
|
|
63
87
|
*/
|
|
64
88
|
error?: ExecutionLogError;
|
|
89
|
+
/** For each only (I4): the per-iteration body-step records, index ascending. */
|
|
90
|
+
iterations?: ExecutionLogIteration[];
|
|
91
|
+
/** Distinct iteration indices the run recorded (may exceed `iterations.length`). */
|
|
92
|
+
iterationsTotal?: number;
|
|
93
|
+
/** How many of those iterations failed. */
|
|
94
|
+
iterationsFailed?: number;
|
|
95
|
+
/** `true` when `iterations` holds fewer than `iterationsTotal`. */
|
|
96
|
+
iterationsTruncated?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* The step's state writes (`stateWrites`, the run's state log rows for this step), in write
|
|
99
|
+
* order: `state.<path>: old → new`, or a warning when `warning` is set (a `StateWarningCode`).
|
|
100
|
+
* `item` is the For each item a hoisted body write came from. Absent, `null` or `[]` ⇒ no rows.
|
|
101
|
+
*/
|
|
102
|
+
stateWrites?: Array<{
|
|
103
|
+
path: string[];
|
|
104
|
+
item?: number;
|
|
105
|
+
old?: unknown;
|
|
106
|
+
new?: unknown;
|
|
107
|
+
warning?: string;
|
|
108
|
+
}> | null;
|
|
109
|
+
/**
|
|
110
|
+
* The run's state tree after this step, shown as "State after this step" in the State block.
|
|
111
|
+
* Absent or `null` ⇒ not shown; `{}` shows only alongside writes.
|
|
112
|
+
*/
|
|
113
|
+
stateAfter?: Record<string, unknown> | null;
|
|
114
|
+
}
|
|
115
|
+
/** One For each iteration: its status and the body-step records, in execution order. */
|
|
116
|
+
export interface ExecutionLogIteration {
|
|
117
|
+
/** 0-based; the same number as `foreach.index` in that iteration's expressions. */
|
|
118
|
+
index: number;
|
|
119
|
+
status: "succeeded" | "failed" | "running";
|
|
120
|
+
/** The body step that failed, when one did. */
|
|
121
|
+
failedNodeId?: string;
|
|
122
|
+
steps: ExecutionLogStep[];
|
|
65
123
|
}
|
|
66
124
|
export interface ExecutionLogPanelProps {
|
|
67
|
-
/**
|
|
125
|
+
/** Rendered earliest first by start time (finish time as fallback), then untimed steps. */
|
|
68
126
|
steps: ExecutionLogStep[];
|
|
69
127
|
/** Shown instead of the list when `steps` is empty. */
|
|
70
128
|
emptyLabel?: ReactNode;
|
|
@@ -88,7 +146,7 @@ export interface ExecutionLogPanelProps {
|
|
|
88
146
|
stepErrors?: ExecutionLogRecordedError[];
|
|
89
147
|
}
|
|
90
148
|
/**
|
|
91
|
-
* Read-only log of a workflow run's steps, in
|
|
149
|
+
* Read-only log of a workflow run's steps, in ascending execution time: each row is
|
|
92
150
|
* the step's status pill, its timing, and its resolved input/output.
|
|
93
151
|
*
|
|
94
152
|
* A pure display leaf — no data fetching, no polling, no layout media
|
|
@@ -24,19 +24,42 @@ export interface ExpressionEditorModalProps {
|
|
|
24
24
|
options: ExpressionOptions;
|
|
25
25
|
/** Field name shown in the modal title. */
|
|
26
26
|
fieldLabel?: string;
|
|
27
|
-
/** Expression mode's commit. Not used in `mode="json-binding"` (see `
|
|
27
|
+
/** Expression mode's commit. Not used in `mode="json-binding"` (see `onSaveJson`). */
|
|
28
28
|
onSave?: (next: ExprValue | string) => void;
|
|
29
29
|
onClose: () => void;
|
|
30
30
|
/**
|
|
31
|
-
* `"json-binding"`:
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* one
|
|
35
|
-
*
|
|
31
|
+
* `"json-binding"`: the value of a whole `json`/`group` param, composed as JSON. The rail
|
|
32
|
+
* shows Previous steps (each step's "Entire output", its fields and, for an app step, its
|
|
33
|
+
* Metadata), Inputs and Variables — no Secrets or Documents. A click on a source into an empty
|
|
34
|
+
* draft (or one holding only a reference) binds it: `onSaveJson("{{ ref }}")` and close. Into a
|
|
35
|
+
* draft being composed it ADDS the reference (`addRefToDraft`, `json-compose.ts`): at the caret
|
|
36
|
+
* where a value or property fits, else as a new property/element at the end — never replacing
|
|
37
|
+
* the draft. Save calls `onSaveJson` with the parsed JSON.
|
|
38
|
+
* Absent ⇒ expression mode, unchanged.
|
|
36
39
|
*/
|
|
37
40
|
mode?: "json-binding";
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
/** json-binding mode: the field's current value, seeding the compose pane. */
|
|
42
|
+
jsonValue?: unknown;
|
|
43
|
+
/** json-binding mode: Save from the compose pane, with the parsed JSON. */
|
|
44
|
+
onSaveJson?: (next: unknown) => void;
|
|
45
|
+
/**
|
|
46
|
+
* json-binding mode only: the field takes one whole value (`ActionParam.whole`). A source click
|
|
47
|
+
* into an empty draft, or one parsing to exactly `[]` / `{}`, binds the bare ref. Any other
|
|
48
|
+
* draft composes as usual.
|
|
49
|
+
*/
|
|
50
|
+
whole?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* json-binding mode only: a workflow's starting state (`Workflow.initialState`), evaluated once
|
|
53
|
+
* at run start. The rail has no Previous steps or State section (the state is blank then) and
|
|
54
|
+
* no Secrets (a secret never enters state), but does list Documents. A toggle above it picks
|
|
55
|
+
* what a source click inserts: its reference (default), or its current sample value as a
|
|
56
|
+
* literal. A click always composes into the object, never binds the whole field. An empty
|
|
57
|
+
* draft saves `undefined`; Save is refused while `jsonProblem` names a problem.
|
|
58
|
+
*/
|
|
59
|
+
startingState?: boolean;
|
|
60
|
+
/** Starting-state mode: why the draft text cannot be saved (`null` when it can). */
|
|
61
|
+
jsonProblem?: (text: string) => string | null;
|
|
62
|
+
/** The modal's title, in place of "Edit JSON value" / "Edit expression". */
|
|
63
|
+
title?: string;
|
|
41
64
|
}
|
|
42
|
-
export declare function ExpressionEditorModal({ value, masked, multiline, options, fieldLabel, onSave, onClose, mode,
|
|
65
|
+
export declare function ExpressionEditorModal({ value, masked, multiline, options, fieldLabel, onSave, onClose, mode, jsonValue, onSaveJson, whole: wholeField, startingState: startingStateProp, jsonProblem, title, }: ExpressionEditorModalProps): import("react").JSX.Element;
|