@w6w/ui 0.2.58 → 0.2.59
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 +10 -0
- package/dist/AddConnectionModal.d.ts +6 -0
- package/dist/StepBuilderModal.d.ts +8 -2
- package/dist/WorkflowConnections.d.ts +7 -1
- package/dist/canvas-context-menu.d.ts +8 -3
- package/dist/components/AuthFieldsForm.d.ts +6 -0
- package/dist/components/Combobox.d.ts +9 -1
- package/dist/components/CredentialPicker.d.ts +1 -1
- package/dist/connection-app-meta-CNEwLsL3.cjs +24 -0
- package/dist/connection-app-meta-CNEwLsL3.cjs.map +1 -0
- package/dist/{connection-app-meta-D5hNbJB5.js → connection-app-meta-Cl6mUAMF.js} +5761 -5183
- package/dist/connection-app-meta-Cl6mUAMF.js.map +1 -0
- package/dist/flow.cjs +5 -5
- package/dist/flow.cjs.map +1 -1
- package/dist/flow.mjs +1953 -2192
- package/dist/flow.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +92 -102
- package/dist/index.mjs.map +1 -1
- package/dist/step-settings-controls.d.ts +20 -0
- package/dist/types.d.ts +5 -0
- package/package.json +2 -2
- package/src/styles/_callable-list.scss +5 -4
- package/src/styles/_connections.scss +101 -0
- package/src/styles/_empty-state.scss +16 -0
- package/src/styles/_step-builder.scss +22 -0
- package/src/styles.css +163 -4
- package/dist/connection-app-meta-CKTmUX08.cjs +0 -24
- package/dist/connection-app-meta-CKTmUX08.cjs.map +0 -1
- package/dist/connection-app-meta-D5hNbJB5.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.59
|
|
4
|
+
|
|
5
|
+
- The add-node dialog's Settings tab offers **Write to state** and **Run next nodes**, and a choice lands on the node as soon as it is added.
|
|
6
|
+
- A step whose app needs a connection shows "Connect <App> to choose an action" with a **Connect <App>** button that opens the app's connection form, instead of an action list it can't run.
|
|
7
|
+
- The add-node search covers every tab (built-in nodes, apps, workflows, functions), grouped under headings; clicking a tab narrows it.
|
|
8
|
+
- Connect dialog: an auth's `setup` steps show as a collapsed "Where do I get this?" with a link per step. The credential is named for you (a service-account key by its client email), so there is no Credential name field. A pasted service-account key shows its client email, client ID, project and key ID with only the private key masked, and the scopes come comma-separated with a **Copy** button.
|
|
9
|
+
- Callable lists (workflows, functions, endpoints) draw one frame, and the badge column fits its badges.
|
|
10
|
+
- `Combobox` options can carry a leading icon and extra search keywords.
|
|
11
|
+
- References accept brackets — `messages[0].id`, `user["name"]` — and save in dot form (`@w6w/expr` 0.1.3).
|
|
12
|
+
|
|
3
13
|
## 0.2.58
|
|
4
14
|
|
|
5
15
|
- A trigger tested in the add-step dialog saves its test, so the next step can read its fields (`{{ nodes.<trigger>.output.* }}`) without re-running it from the step editor.
|
|
@@ -22,3 +22,9 @@ export interface AddConnectionModalProps {
|
|
|
22
22
|
* in. Data + IO come from `useW6WApi()`.
|
|
23
23
|
*/
|
|
24
24
|
export declare function AddConnectionModal(props: AddConnectionModalProps): import("react").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* The saved key's label, so nobody has to invent one: the service account's own email when the
|
|
27
|
+
* pasted key carries one (what Google Cloud calls it too), else "<App> key". Connections point at
|
|
28
|
+
* the key by id; the label only tells saved keys apart in the "Use existing" list.
|
|
29
|
+
*/
|
|
30
|
+
export declare function credentialName(source: Record<string, unknown>, appName: string): string;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { NodeConfig } from './NodeConfigForm.tsx';
|
|
2
2
|
import { ExpressionLoopSource, ExpressionStepSource } from './components/ExpressionOptions.tsx';
|
|
3
|
-
import { InternalNodeDef } from './flow-types.ts';
|
|
3
|
+
import { InternalNodeDef, FlowStep } from './flow-types.ts';
|
|
4
4
|
import { StepStartState, W6WApi } from './provider.tsx';
|
|
5
5
|
import { ActionDef, ActionParam, AppSummary, FunctionSummary, ThemeMode, WorkflowSummary } from './types.ts';
|
|
6
6
|
/** The step the builder emits — the editor assigns the final `id` unless `id` carries a
|
|
7
7
|
* name the user chose in the add flow. `NodeConfig` carries the base settings (retry /
|
|
8
8
|
* onError / notes) set on the Config view. */
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* What the add dialog's Settings collect: the node editor's settings (retry, on error, notes) plus
|
|
11
|
+
* "Run next nodes" and "Write to state", so the node is created with them instead of gaining them
|
|
12
|
+
* only once it is reopened.
|
|
13
|
+
*/
|
|
14
|
+
export type DraftConfig = NodeConfig & Pick<FlowStep, "state" | "fanOut">;
|
|
15
|
+
export interface BuiltStep extends DraftConfig {
|
|
10
16
|
/** The node name chosen in the add flow; on `onDraftChange` it renames the minted node. */
|
|
11
17
|
id?: string;
|
|
12
18
|
uses: {
|
|
@@ -15,7 +15,7 @@ export declare function useWorkflowConnections(): {
|
|
|
15
15
|
setConnections: (connections: FlowConnections) => void;
|
|
16
16
|
} | null;
|
|
17
17
|
/** One account menu for both adding and editing workflow nodes. */
|
|
18
|
-
export declare function WorkflowConnectionPicker({ step, conns, failed, readOnly, open, onOpenChange, anchorRef, onChangeConnection, onChangeConnectionRef, onConnectionCreated, }: {
|
|
18
|
+
export declare function WorkflowConnectionPicker({ step, conns, failed, readOnly, open, onOpenChange, anchorRef, onChangeConnection, onChangeConnectionRef, onConnectionCreated, createSignal, }: {
|
|
19
19
|
step: FlowStep;
|
|
20
20
|
conns: ConnectionSummary[] | null;
|
|
21
21
|
failed?: boolean;
|
|
@@ -26,4 +26,10 @@ export declare function WorkflowConnectionPicker({ step, conns, failed, readOnly
|
|
|
26
26
|
onChangeConnection: (id: string) => void;
|
|
27
27
|
onChangeConnectionRef: (ref: string) => void;
|
|
28
28
|
onConnectionCreated: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Open the new-connection dialog straight away, skipping the menu: each INCREASE of this
|
|
31
|
+
* number opens it once (a host's "Connect <app>" button bumps it). The value on mount never
|
|
32
|
+
* opens it.
|
|
33
|
+
*/
|
|
34
|
+
createSignal?: number;
|
|
29
35
|
}): import("react").JSX.Element;
|
|
@@ -8,7 +8,7 @@ export interface CanvasMenuTarget {
|
|
|
8
8
|
/** Node ids Duplicate / Delete act on. Empty on a bare-canvas right-click. */
|
|
9
9
|
nodeIds: string[];
|
|
10
10
|
}
|
|
11
|
-
export type CanvasMenuAction = "duplicate" | "delete" | "add-node" | "add-trigger";
|
|
11
|
+
export type CanvasMenuAction = "duplicate" | "delete" | "replace-trigger" | "add-node" | "add-trigger";
|
|
12
12
|
export interface CanvasMenuItem {
|
|
13
13
|
action: CanvasMenuAction;
|
|
14
14
|
label: string;
|
|
@@ -23,5 +23,10 @@ export interface CanvasMenuItem {
|
|
|
23
23
|
* The bare canvas acts on whatever is selected.
|
|
24
24
|
*/
|
|
25
25
|
export declare function contextMenuTargets(selectedIds: readonly string[], nodeId?: string): string[];
|
|
26
|
-
/**
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Duplicate + Delete when nodes are targeted (plus Replace trigger when the one target is a
|
|
28
|
+
* trigger), then Add node + Add trigger. All greyed when read-only.
|
|
29
|
+
*/
|
|
30
|
+
export declare function canvasMenuItems(nodeIds: readonly string[], readOnly: boolean, opts?: {
|
|
31
|
+
replaceableTrigger?: boolean;
|
|
32
|
+
}): CanvasMenuItem[];
|
|
@@ -37,4 +37,10 @@ export declare function parseJsonFields(fields: AuthField[], values: Record<stri
|
|
|
37
37
|
* comes from the app's manifest so no app-specific knowledge is needed here.
|
|
38
38
|
*/
|
|
39
39
|
export declare function AuthFieldsForm({ fields, values, onChange, enterSubmitProps, mode, }: Props): import("react").JSX.Element;
|
|
40
|
+
export declare function keyFilePreview(raw: string): {
|
|
41
|
+
key: string;
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
secret: boolean;
|
|
45
|
+
}[] | null;
|
|
40
46
|
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface ComboboxOption {
|
|
2
3
|
value: string;
|
|
3
4
|
label: string;
|
|
4
5
|
/** A muted second line under the label (e.g. a value preview); never matched by the filter. */
|
|
5
6
|
detail?: string;
|
|
7
|
+
/**
|
|
8
|
+
* A small leading glyph (e.g. a provider's logo), drawn before the label in the list and
|
|
9
|
+
* inside the input while this option is the selected one. Combobox mode only.
|
|
10
|
+
*/
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Extra text the filter also matches (e.g. a provider name that is not in the label). */
|
|
13
|
+
keywords?: string;
|
|
6
14
|
}
|
|
7
15
|
export interface ComboboxProps {
|
|
8
16
|
options: ComboboxOption[];
|
|
@@ -36,7 +44,7 @@ export interface ComboboxProps {
|
|
|
36
44
|
}
|
|
37
45
|
/** Combobox is chosen when the list would take more than 60% of the viewport. */
|
|
38
46
|
export declare function shouldUseCombobox(count: number, optionHeight: number, viewportHeight: number): boolean;
|
|
39
|
-
/** Case-insensitive substring match on label and
|
|
47
|
+
/** Case-insensitive substring match on label, value and keywords. */
|
|
40
48
|
export declare function filterOptions(options: ComboboxOption[], query: string): ComboboxOption[];
|
|
41
49
|
export declare const DEFAULT_LIST_MAX_HEIGHT = 240;
|
|
42
50
|
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;
|
|
@@ -22,7 +22,7 @@ export interface CredentialPickerProps {
|
|
|
22
22
|
export declare function CredentialPicker({ credentials, mode, onModeChange, selectedId, onSelect, canUseExisting, contract, }: CredentialPickerProps): import("react").JSX.Element;
|
|
23
23
|
/**
|
|
24
24
|
* The binding fields a `serviceAccount` auth asks for on a connection. `delegatedUser` is always
|
|
25
|
-
* labelled "
|
|
25
|
+
* labelled "Workspace user to act as" (the person the credential acts as, never the connection's owner),
|
|
26
26
|
* is absent when impersonation is `"none"` even if declared, and is synthesised when impersonation
|
|
27
27
|
* is allowed but the auth declares no such field.
|
|
28
28
|
*/
|