@w6w/ui 0.2.67 → 0.2.68

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{CodeBlock-C1IC5_6O.cjs → CodeBlock-85y9qvE3.cjs} +4 -4
  3. package/dist/{CodeBlock-C1IC5_6O.cjs.map → CodeBlock-85y9qvE3.cjs.map} +1 -1
  4. package/dist/{CodeBlock-CsdRXzb0.js → CodeBlock-a5QVaIGk.js} +158 -131
  5. package/dist/{CodeBlock-CsdRXzb0.js.map → CodeBlock-a5QVaIGk.js.map} +1 -1
  6. package/dist/NodeConfigForm.d.ts +8 -2
  7. package/dist/StepBuilderModal.d.ts +2 -0
  8. package/dist/code.cjs +1 -1
  9. package/dist/code.mjs +1 -1
  10. package/dist/components/ExecutionLogDock.d.ts +44 -0
  11. package/dist/components/ExecutionLogPanel.d.ts +66 -0
  12. package/dist/components/ExecutionLogView.d.ts +30 -0
  13. package/dist/components/icons.d.ts +1 -1
  14. package/dist/connection-app-meta-DID4zDg-.cjs +29 -0
  15. package/dist/connection-app-meta-DID4zDg-.cjs.map +1 -0
  16. package/dist/{connection-app-meta-DEC0n4PA.js → connection-app-meta-mmyKM3H9.js} +4606 -3725
  17. package/dist/connection-app-meta-mmyKM3H9.js.map +1 -0
  18. package/dist/flow-types.d.ts +25 -1
  19. package/dist/flow.cjs +7 -5
  20. package/dist/flow.cjs.map +1 -1
  21. package/dist/flow.mjs +1119 -980
  22. package/dist/flow.mjs.map +1 -1
  23. package/dist/form-schema.d.ts +34 -0
  24. package/dist/index.cjs +3 -2
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.mjs +1683 -1313
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/provider.d.ts +2 -0
  30. package/package.json +2 -2
  31. package/src/styles/_execution-log-view.scss +322 -0
  32. package/src/styles/_form-builder.scss +13 -0
  33. package/src/styles.css +335 -0
  34. package/src/styles.scss +1 -0
  35. package/dist/connection-app-meta-DEC0n4PA.js.map +0 -1
  36. package/dist/connection-app-meta-Dk6F3KEH.cjs +0 -29
  37. package/dist/connection-app-meta-Dk6F3KEH.cjs.map +0 -1
@@ -83,6 +83,31 @@ export interface FormField {
83
83
  width?: "full" | "half";
84
84
  /** Show (and require, and record) this field only when the condition holds. */
85
85
  showIf?: FieldCondition;
86
+ /**
87
+ * `select`, `radio`, `checkboxes`: take the choices from data instead of the fixed `options` —
88
+ * typically the output of a step wired INTO the form trigger, which runs each time the page opens
89
+ * (a "pre-form step"). Once resolved, the list replaces `options`, so the server checks every
90
+ * answer against it exactly as against a fixed list.
91
+ */
92
+ optionsFrom?: FormDataSource;
93
+ /** `text`: values offered as the submitter types (autocomplete). Free text is still accepted. */
94
+ suggestions?: string[];
95
+ /** `text`: take the autocomplete values from data, as {@link optionsFrom} does for choices. */
96
+ suggestionsFrom?: FormDataSource;
97
+ }
98
+ /**
99
+ * A list of choices read from data: the `{{ }}` expression in `items` names it (usually the output
100
+ * of a pre-form step, e.g. `{{ nodes.get_products.output.items }}`). The host resolves it before
101
+ * the form is read, so the parser sees the list itself; while it is still an expression (the
102
+ * builder, a form with no pre-form steps) the field falls back to its fixed `options`.
103
+ */
104
+ export interface FormDataSource {
105
+ /** The list: an expression that resolves to an array (of strings, numbers or objects). */
106
+ items: unknown;
107
+ /** For objects: the dotted path of each item's label. Default: `label`, `name`, `title`, then the value. */
108
+ label?: string;
109
+ /** For objects: the dotted path of each item's recorded value. Default: `value`, `id`, then the label. */
110
+ value?: string;
86
111
  }
87
112
  /** What the submitter sees after a successful submission. */
88
113
  export interface FormCompletion {
@@ -135,6 +160,8 @@ export declare const FORM_FILES_MAX_TOTAL_BYTES: number;
135
160
  export declare const FORM_MAX_FIELDS = 200;
136
161
  /** Longest free-text answer accepted when a field sets no `maxLength` of its own. */
137
162
  export declare const FORM_TEXT_MAX_CHARS = 20000;
163
+ /** Most choices (or autocomplete values) one field takes from data; the rest are dropped. */
164
+ export declare const FORM_MAX_DATA_OPTIONS = 1000;
138
165
  /** A field `name`: a letter or `_` first, then letters, digits or `_`, at most 64 characters. */
139
166
  export declare const FIELD_NAME_RE: RegExp;
140
167
  /** The value of the hidden honeypot input; a filled one marks a bot. */
@@ -184,6 +211,13 @@ export declare function parseFormDefinition(raw: unknown): {
184
211
  form: FormDefinition;
185
212
  problems: FormProblem[];
186
213
  } | null;
214
+ /**
215
+ * A resolved data list as choices: a scalar item is its own label and value; an object item reads
216
+ * its label and value through the source's paths (or the usual keys). Items with no label are
217
+ * skipped, a repeated value keeps its first item, and at most {@link FORM_MAX_DATA_OPTIONS} come
218
+ * through.
219
+ */
220
+ export declare function dataOptions(items: readonly unknown[], from?: Pick<FormDataSource, "label" | "value">): FormOption[];
187
221
  /** Split the fields at each `pageBreak`. A form always has at least one page. */
188
222
  export declare function formPages(fields: readonly FormField[]): {
189
223
  title?: string;