suppa-mcp-2 1.43.3 → 1.43.4
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/README.md +5 -3
- package/dist/server.js +3 -3
- package/dist/toolTable.js +3 -3
- package/dist/tools/formV2.js +22 -6
- package/dist/tools/forms.js +38 -10
- package/package.json +1 -1
- package/skills/suppa-form-v2/SKILL.md +6 -6
- package/skills/suppa-form-v2/SOURCE.json +4 -4
- package/skills/suppa-form-v2/data/component-index.json +5 -0
- package/skills/suppa-form-v2/data/component-props.json +55 -3
- package/skills/suppa-form-v2/references/choosing-elements.md +2 -2
- package/skills/suppa-form-v2/references/publishing.md +1 -1
- package/skills/suppa-form-v2/scripts/form-core.mjs +313 -70
- package/skills/suppa-form-v2/scripts/validate-form-schema.mjs +3 -1
package/README.md
CHANGED
|
@@ -540,9 +540,11 @@ extension table is created outside that check and is not subject to it.
|
|
|
540
540
|
| `suppa_add_field_to_form` | Add a field element to a form (confirm-gated) |
|
|
541
541
|
| `suppa_list_form_field_types` | List form element types |
|
|
542
542
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
543
|
+
Of the seven above, `suppa_get_form` reads both generations: since 1.43.3 a 2.x form comes back as
|
|
544
|
+
the builder reads it (schema, variables, localizations, the Code Form's files). The other six are
|
|
545
|
+
**Suppa 1.0** forms: they read and write `data.formShema` (the platform's misspelling) and the v1
|
|
546
|
+
field types. A **Suppa 2.0** entity-builder form is a different product —
|
|
547
|
+
the `schema` column on the row since 2.1, 57 component types — and is served by the six below plus the bundled
|
|
546
548
|
`skills/suppa-form-v2` skill. The first two touch no tenant: they read files inside the package.
|
|
547
549
|
|
|
548
550
|
| Tool | Description |
|
package/dist/server.js
CHANGED
|
@@ -2461,7 +2461,7 @@ export function buildToolTable() {
|
|
|
2461
2461
|
" suppa_write_form_draft draft. Suppa 1.0: the row's `data` (formShema).",
|
|
2462
2462
|
inputSchema: {
|
|
2463
2463
|
form_id: z.number().int(),
|
|
2464
|
-
version: z.enum(["draft", "published"]).default("draft").describe("2.x: published = what
|
|
2464
|
+
version: z.enum(["draft", "published"]).default("draft").describe("2.x: published = what THIS user sees, read-only."),
|
|
2465
2465
|
include_artifact: z.boolean().default(false).describe("2.x: also the compiled JS of `code`."),
|
|
2466
2466
|
},
|
|
2467
2467
|
annotations: _READ,
|
|
@@ -2472,7 +2472,7 @@ export function buildToolTable() {
|
|
|
2472
2472
|
" (without entity_name it is refused, rather than creating an empty form).\n" +
|
|
2473
2473
|
" Form names are UNIQUE platform-wide — a duplicate name fails; pick a distinct one.\n" +
|
|
2474
2474
|
"\n SUPPA 1.0 FORM. This writes data.formShema and the v1 field types. A Suppa 2.0\n" +
|
|
2475
|
-
" (entity-builder) form is a different product — the `schema` column,
|
|
2475
|
+
" (entity-builder) form is a different product — the `schema` column, 57 types:\n" +
|
|
2476
2476
|
" use suppa_form_kb and suppa_validate_form_schema.",
|
|
2477
2477
|
inputSchema: {
|
|
2478
2478
|
name: z.string(),
|
|
@@ -2651,7 +2651,7 @@ export function buildToolTable() {
|
|
|
2651
2651
|
" kit the look of every record card, create form, window: the card kit's\n" +
|
|
2652
2652
|
" patterns (topic='p_block,…' = their elements); rules: ref card-kit\n" +
|
|
2653
2653
|
" note dynamicComponent = the widget contract (sandbox, formAPI, styles, translations)\n\n" +
|
|
2654
|
-
" No mode returns all
|
|
2654
|
+
" No mode returns all 57 prop tables: they are ~14,200 tokens stripped, and not carrying\n" +
|
|
2655
2655
|
" them is what this skill is for. Full skill: skills/suppa-form-v2/SKILL.md.",
|
|
2656
2656
|
inputSchema: {
|
|
2657
2657
|
mode: z
|
package/dist/toolTable.js
CHANGED
|
@@ -6,9 +6,9 @@ export const PROFILES = {
|
|
|
6
6
|
schema: ["create_entity", "add_field", "update_field", "change_field_type", "update_entity_options", "set_title_field", "create_tabular_part", "list_tabular_parts", "list_field_types", "add_enum_values", "add_custom_field", "add_custom_fields_batch", "remove_custom_field", "restore_custom_field", "resolve_custom_fields", "link_custom_field", "apply_custom_fields", "validate_entity_code", "migrate_entities_from_v1", "read_v1_entities", "read_v1_entity_props", "read_v1_enum"],
|
|
7
7
|
docs: ["create_doc", "get_doc", "list_docs", "update_doc", "delete_doc", "create_page", "get_page", "list_pages", "read_page", "update_page", "delete_page", "create_blocks", "get_blocks", "insert_block", "update_block", "delete_block", "reorder_blocks"],
|
|
8
8
|
// Two form PRODUCTS live in this group, and the split is the thing to know before reading the
|
|
9
|
-
// list.
|
|
10
|
-
// misspelling) and the v1 field types. `form_kb` and `validate_form_schema` serve the 2.0
|
|
11
|
-
// entity-builder canvas — the `schema` COLUMN on the row since 2.1,
|
|
9
|
+
// list. Of the first seven, get_form reads both (a 2.x form as the builder reads it); the other six
|
|
10
|
+
// are Suppa 1.0: they read and write `data.formShema` (the platform's misspelling) and the v1 field types. `form_kb` and `validate_form_schema` serve the 2.0
|
|
11
|
+
// entity-builder canvas — the `schema` COLUMN on the row since 2.1, 57 component
|
|
12
12
|
// types — and share nothing with them.
|
|
13
13
|
forms: ["create_form", "get_form", "list_forms", "update_form", "add_field_to_form", "generate_form_schema", "list_form_field_types", "form_kb", "validate_form_schema",
|
|
14
14
|
"write_form_draft", "create_form_v2", "form_versions", "form_lifecycle"],
|
package/dist/tools/formV2.js
CHANGED
|
@@ -37,10 +37,9 @@ export function skillFile(...parts) {
|
|
|
37
37
|
* exists never looks for it — measured: given "зроби форму для клієнтів", agents with the CLI and
|
|
38
38
|
* agents with all 96 tools both reached for suppa_create_form, which writes the v1 blob.
|
|
39
39
|
*/
|
|
40
|
-
export const FORM_V2_INSTRUCTION_LINE = "FORMS — TWO PRODUCTS:
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"on the user's yes.";
|
|
40
|
+
export const FORM_V2_INSTRUCTION_LINE = "FORMS — TWO PRODUCTS: suppa_create_form/update_form write `data.formShema` (Suppa 1.0). A Suppa 2.x form " +
|
|
41
|
+
"is the `schema` COLUMN, 57 types (pre-2.1: `data.formSchema`): suppa_get_form reads it; suppa_form_kb, " +
|
|
42
|
+
"suppa_validate_form_schema (skills/suppa-form-v2/SKILL.md). Publish only on the user's yes.";
|
|
44
43
|
/**
|
|
45
44
|
* Is the vendored core actually USABLE, not merely present?
|
|
46
45
|
*
|
|
@@ -270,7 +269,7 @@ export async function formKb(mode, types, topic) {
|
|
|
270
269
|
if (!list.length) {
|
|
271
270
|
return jsonResponse({
|
|
272
271
|
error: "types is required for mode='api' — name the element types you are about to author, e.g. ['input','select'].",
|
|
273
|
-
note: `There is deliberately no way to fetch all
|
|
272
|
+
note: `There is deliberately no way to fetch all 57 at once: stripped of prose they are ~14,200 tokens, and the point of this tool is not to carry them. At most ${MAX_API_TYPES} per call.`,
|
|
274
273
|
});
|
|
275
274
|
}
|
|
276
275
|
// The cap is what makes the sentence above TRUE. Without it, listing all 58 in `types` returned
|
|
@@ -279,7 +278,7 @@ export async function formKb(mode, types, topic) {
|
|
|
279
278
|
if (list.length > MAX_API_TYPES) {
|
|
280
279
|
return jsonResponse({
|
|
281
280
|
error: `types names ${list.length} types; the cap is ${MAX_API_TYPES} per call.`,
|
|
282
|
-
note: "Name the types you are about to author — another call is free. Asking for all
|
|
281
|
+
note: "Name the types you are about to author — another call is free. Asking for all 57 is ~16,300 tokens, which is the cost this tool exists to avoid, not a shortcut.",
|
|
283
282
|
cap: MAX_API_TYPES,
|
|
284
283
|
asked: list.length,
|
|
285
284
|
});
|
|
@@ -886,6 +885,17 @@ function staleAnswer(message, id) {
|
|
|
886
885
|
current_revision: current,
|
|
887
886
|
};
|
|
888
887
|
}
|
|
888
|
+
/**
|
|
889
|
+
* A suppa_get_form version='published' answer is what this user sees, not the draft. For a child form it
|
|
890
|
+
* is the MERGED tree with no `parent` (the published read carries none), so writing it as the draft would
|
|
891
|
+
* turn the parent's elements and variables into the child's own layer; for any form it would revert the
|
|
892
|
+
* draft's later edits. It is read-only — the published version comes back through rollback.
|
|
893
|
+
*/
|
|
894
|
+
const isPublishedRead = (v) => Boolean(v && typeof v === "object" && !Array.isArray(v) && v.generation === "2.x" && v.read === "published");
|
|
895
|
+
const PUBLISHED_READ_REFUSAL = "this file is a suppa_get_form version='published' read — the version users see (a child form's MERGED tree, " +
|
|
896
|
+
"without its own layer), not the draft. Saved as the draft it would revert the draft's later edits and turn a " +
|
|
897
|
+
"child's inherited elements into its own. Read the draft (suppa_get_form without version) to edit it; to bring a " +
|
|
898
|
+
"published version back use suppa_form_lifecycle action='rollback'.";
|
|
889
899
|
export async function writeFormDraft(formId, path, confirm = false, normalize = false, expectedRevision = null) {
|
|
890
900
|
const id = Number(formId);
|
|
891
901
|
const target = String(path ?? "").trim();
|
|
@@ -926,6 +936,10 @@ export async function writeFormDraft(formId, path, confirm = false, normalize =
|
|
|
926
936
|
const peek = readJson(target);
|
|
927
937
|
if (peek.error)
|
|
928
938
|
preview = `the draft could not be read yet: ${peek.error}`;
|
|
939
|
+
else if (isPublishedRead(peek.value)) {
|
|
940
|
+
preview = "not a draft: a published read";
|
|
941
|
+
gateLines = [`the confirmed call will REFUSE this file: ${PUBLISHED_READ_REFUSAL}`];
|
|
942
|
+
}
|
|
929
943
|
else {
|
|
930
944
|
draftVars = sentVariables(peek.value);
|
|
931
945
|
const s = skillFile("scripts", "validate-form-schema.mjs");
|
|
@@ -1047,6 +1061,8 @@ export async function writeFormDraft(formId, path, confirm = false, normalize =
|
|
|
1047
1061
|
const read = readJson(target);
|
|
1048
1062
|
if (read.error)
|
|
1049
1063
|
return jsonResponse({ error: `the draft could not be read: ${read.error}` });
|
|
1064
|
+
if (isPublishedRead(read.value))
|
|
1065
|
+
return jsonResponse({ written: false, error: PUBLISHED_READ_REFUSAL });
|
|
1050
1066
|
// 1. NOTHING UNCHECKED IS EVER WRITTEN. The gate runs on the same file, with the same rules, and
|
|
1051
1067
|
// a refusal or any error stops the write. An envelope it cannot read at all is refused before
|
|
1052
1068
|
// the tenant is touched; everything else is judged against the form as the tenant holds it.
|
package/dist/tools/forms.js
CHANGED
|
@@ -392,15 +392,27 @@ export async function listForms(entityName = null, formType = null, limit = 50)
|
|
|
392
392
|
const V2_FORM_TYPES = new Set(["create", "update", "custom", "workspace", "dashboard", "workspaceModule"]);
|
|
393
393
|
const isObj = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
394
394
|
const isEmpty = (v) => v == null || (Array.isArray(v) && v.length === 0);
|
|
395
|
-
|
|
396
|
-
|
|
395
|
+
const nonEmpty = (v) => Array.isArray(v) && v.length > 0;
|
|
396
|
+
/**
|
|
397
|
+
* What only a 2.x form has: elements in the schema column, a Code Form or its build, a mobile layout, the
|
|
398
|
+
* builder's flag, a parent (a child's own layer can be empty — its settings, elements and code inherited),
|
|
399
|
+
* or overrides of a parent's elements, settings, connections or texts.
|
|
400
|
+
*/
|
|
401
|
+
function hasV2Evidence(a) {
|
|
397
402
|
const schema = isObj(a.schema) ? a.schema : {};
|
|
398
|
-
return ((
|
|
399
|
-
(
|
|
403
|
+
return (nonEmpty(schema.components) ||
|
|
404
|
+
nonEmpty(schema.overrides) ||
|
|
405
|
+
nonEmpty(a.code) ||
|
|
406
|
+
a.codeArtifact != null ||
|
|
400
407
|
a.mobileSchema != null ||
|
|
401
408
|
(isObj(a.settings) && a.settings.isFormBuilderV2 === true) ||
|
|
402
|
-
|
|
409
|
+
a.parentForm != null ||
|
|
410
|
+
nonEmpty(a.settingsOverrides) ||
|
|
411
|
+
nonEmpty(a.connectionOverrides) ||
|
|
412
|
+
nonEmpty(a.localizationOverrides));
|
|
403
413
|
}
|
|
414
|
+
/** An FB2 kind alone is weaker evidence: `Forms.type` is free text, and a 1.0 form can carry one. */
|
|
415
|
+
const hasV2Kind = (a) => typeof a.type === "string" && V2_FORM_TYPES.has(a.type);
|
|
404
416
|
/** A compiled bundle by its stamp and size — it is the build of `code`, ~the same size again. */
|
|
405
417
|
function artifactSummary(art) {
|
|
406
418
|
if (!isObj(art))
|
|
@@ -418,9 +430,16 @@ function v2FormAnswer(a, version, includeArtifact) {
|
|
|
418
430
|
const notes = [];
|
|
419
431
|
const parent = isObj(meta.parentForm) ? meta.parentForm : null;
|
|
420
432
|
if (parent && version === "draft") {
|
|
421
|
-
|
|
433
|
+
const pinned = meta.parentVersion != null ? `, pinned to its FormVersions row ${meta.parentVersion}` : "";
|
|
434
|
+
notes.push(`a child form: \`schema\` is its OWN layer over form ${parent.id ?? "?"}${pinned} — ` +
|
|
422
435
|
"`schema.overrides`, settingsOverrides and connectionOverrides — not what renders; " +
|
|
423
|
-
"version='published' is the merged form
|
|
436
|
+
"version='published' is the merged form this user sees.");
|
|
437
|
+
}
|
|
438
|
+
if (version === "published") {
|
|
439
|
+
// The published read leaves the sources out (entity-builder form-publish.service: code, inheritedCode,
|
|
440
|
+
// rawLayer are stripped) and names no parent — so it is neither a Code Form read nor a draft.
|
|
441
|
+
notes.push("a published read: the version THIS user sees, for reading only — suppa_write_form_draft refuses it. " +
|
|
442
|
+
"It carries no Code Form sources (only the compiled codeArtifact) and no parent; read the draft for those.");
|
|
424
443
|
}
|
|
425
444
|
if (!includeArtifact && isObj(codeArtifact)) {
|
|
426
445
|
notes.push("codeArtifact is the compiled build of `code`, summarized — include_artifact=true for its JS.");
|
|
@@ -437,7 +456,8 @@ function v2FormAnswer(a, version, includeArtifact) {
|
|
|
437
456
|
out.variables = variables ?? [];
|
|
438
457
|
if (!isEmpty(localizations))
|
|
439
458
|
out.localizations = localizations;
|
|
440
|
-
|
|
459
|
+
if (version === "draft")
|
|
460
|
+
out.code = code ?? [];
|
|
441
461
|
if (codeArtifact != null)
|
|
442
462
|
out.codeArtifact = includeArtifact ? codeArtifact : artifactSummary(codeArtifact);
|
|
443
463
|
const inherited = Array.isArray(codeArtifacts) ? codeArtifacts.filter((c) => isObj(c) && c.formId !== a.id) : [];
|
|
@@ -469,9 +489,17 @@ export async function getForm(formId, version = "draft", includeArtifact = false
|
|
|
469
489
|
});
|
|
470
490
|
}
|
|
471
491
|
}
|
|
472
|
-
|
|
492
|
+
// A published version exists only for a 2.x form: whatever it holds, it is that form.
|
|
493
|
+
if (assembled && (version === "published" || hasV2Evidence(assembled))) {
|
|
473
494
|
return jsonResponse(v2FormAnswer(assembled, version, includeArtifact));
|
|
474
|
-
|
|
495
|
+
}
|
|
496
|
+
const result = (await selectEntity(ENTITY_FORMS, [makeFilter("id", formId)], FORM_DETAIL_FIELDS));
|
|
497
|
+
// An FB2 kind and nothing else: the row decides — a 1.0 layout in `data.formShema` is a 1.0 form, an
|
|
498
|
+
// empty one a 2.x form nobody has laid out yet.
|
|
499
|
+
const formShema = result && isObj(result.data) ? result.data.formShema : undefined;
|
|
500
|
+
if (assembled && hasV2Kind(assembled) && !nonEmpty(formShema)) {
|
|
501
|
+
return jsonResponse(v2FormAnswer(assembled, version, includeArtifact));
|
|
502
|
+
}
|
|
475
503
|
if (result === null)
|
|
476
504
|
return notFoundAnswer(ENTITY_FORMS, formId, "form");
|
|
477
505
|
return jsonResponse({ generation: "1.0", ...result });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "suppa-mcp-2",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.4",
|
|
4
4
|
"description": "MCP server for the Suppa platform (modern.suppa.me) — Tasks, Docs/Pages, Entities & Schema, Forms, Automations, and file attachments, with multi-tenant Google auth. Node port of PyPI suppa-mcp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: suppa-form-v2
|
|
3
|
-
description: Author a Suppa 2.0/2.1 (entity-builder) FORM — the element canvas with
|
|
3
|
+
description: Author a Suppa 2.0/2.1 (entity-builder) FORM — the element canvas with 57 component types, grid/flex layout, data binding and conditions — and write it to a tenant. Use whenever the user wants to build, edit or lay out a form, a workspace, a dashboard or a record card in Suppa 2.0, or asks about form elements, form layout, binding a field to entity data, or a form's settings. NOT for Suppa 1.0 forms — those are suppa_create_form and the `formShema` blob, a different product. Trigger phrases (English) — "build a form", "create a form", "edit the form", "form layout", "add a field to the form", "record card", "workspace form", "dashboard", "bind this field"; (Ukrainian / Українська) — "зроби форму", "створи форму", "додай поле у форму", "виправ форму", "картка запису", "робочий простір", "дашборд", "прив'яжи поле".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Suppa 2.x forms (the entity-builder canvas)
|
|
7
7
|
|
|
8
|
-
A form is a **flat array of elements**, rendered from
|
|
8
|
+
A form is a **flat array of elements**, rendered from 57 component types. Nesting, geometry and
|
|
9
9
|
every layout decision live inside each element's `layout` map, not in the array's order.
|
|
10
10
|
|
|
11
11
|
**Where it is stored changed in 2.1.** The live form is first-class columns on the `Forms` row —
|
|
@@ -48,14 +48,14 @@ record's card → `flat`. The gate judges it by the form's type.
|
|
|
48
48
|
| 7 | Write it | `suppa write-form-draft --form-id <id> --path <abs>` — see **The write path** |
|
|
49
49
|
| 8 | Look at it | `/form/<id>?version=draft` at 1600, 1366, 1000, 760, 600 and 375 px: every tab and accordion section open, each control hovered and Tab-focused. No sideways scroll, control rows ≥ 8px apart, no clipped focus ring. The gate sees none of this. |
|
|
50
50
|
|
|
51
|
-
Steps 2 and 3 are not optional reading. The catalog is
|
|
51
|
+
Steps 2 and 3 are not optional reading. The catalog is 57 types and the prop tables are ~14,200
|
|
52
52
|
tokens in total — which is exactly why they are fetched per type instead of carried. Skipping them
|
|
53
53
|
produces a form built out of `input` and `html` that passes every check and is the wrong form.
|
|
54
54
|
|
|
55
55
|
**Reading a form.** `suppa_get_form` is the builder's own read of the 2.x draft: schema, settings,
|
|
56
|
-
variables, localizations, the Code Form's `code` and `revision` (`version='published'`: what
|
|
57
|
-
|
|
58
|
-
an unpublished draft. Who has it open is `lockedBy` on `Forms` (`suppa_search_records`).
|
|
56
|
+
variables, localizations, the Code Form's `code` and `revision` (`version='published'`: what this user
|
|
57
|
+
sees, read-only). Save the answer to a file: it is the baseline the gate takes as it is, and the copy to
|
|
58
|
+
restore an unpublished draft. Who has it open is `lockedBy` on `Forms` (`suppa_search_records`).
|
|
59
59
|
|
|
60
60
|
## Rules
|
|
61
61
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": "suppa-ai-agent/packages/formbuilder-agent",
|
|
3
|
-
"sha": "
|
|
4
|
-
"pulledAt": "2026-10-
|
|
5
|
-
"components":
|
|
3
|
+
"sha": "821ee77fd96bb0510913f9c5824f1b14b4c91d2f",
|
|
4
|
+
"pulledAt": "2026-10-21",
|
|
5
|
+
"components": 57,
|
|
6
6
|
"templates": 8,
|
|
7
|
-
"coreBytes":
|
|
7
|
+
"coreBytes": 1259259,
|
|
8
8
|
"why": "Vendored, not depended on. Re-run scripts/sync-formbuilder.mjs after every frontend release: the manifest is a snapshot, and drift in the ACCEPT direction is silent."
|
|
9
9
|
}
|
|
@@ -2261,6 +2261,16 @@
|
|
|
2261
2261
|
"control": "unit",
|
|
2262
2262
|
"group": "style"
|
|
2263
2263
|
},
|
|
2264
|
+
{
|
|
2265
|
+
"path": "sectionStyle",
|
|
2266
|
+
"control": "segmented",
|
|
2267
|
+
"group": "style",
|
|
2268
|
+
"options": [
|
|
2269
|
+
"list",
|
|
2270
|
+
"cards"
|
|
2271
|
+
],
|
|
2272
|
+
"default": "list"
|
|
2273
|
+
},
|
|
2264
2274
|
{
|
|
2265
2275
|
"path": "borderWidth",
|
|
2266
2276
|
"control": "unit",
|
|
@@ -2331,6 +2341,12 @@
|
|
|
2331
2341
|
"path": "filterBy",
|
|
2332
2342
|
"control": "elementSelect",
|
|
2333
2343
|
"group": "state"
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
"path": "hideWhenEmpty",
|
|
2347
|
+
"control": "checkbox",
|
|
2348
|
+
"group": "state",
|
|
2349
|
+
"default": false
|
|
2334
2350
|
}
|
|
2335
2351
|
],
|
|
2336
2352
|
"avatar": [
|
|
@@ -3074,11 +3090,12 @@
|
|
|
3074
3090
|
"control": "segmented",
|
|
3075
3091
|
"group": "data",
|
|
3076
3092
|
"options": [
|
|
3093
|
+
"auto",
|
|
3077
3094
|
"local",
|
|
3078
3095
|
"publish",
|
|
3079
3096
|
"off"
|
|
3080
3097
|
],
|
|
3081
|
-
"default": "
|
|
3098
|
+
"default": "auto"
|
|
3082
3099
|
},
|
|
3083
3100
|
{
|
|
3084
3101
|
"path": "recordForm",
|
|
@@ -3583,6 +3600,41 @@
|
|
|
3583
3600
|
"group": "data"
|
|
3584
3601
|
}
|
|
3585
3602
|
],
|
|
3603
|
+
"customFields": [
|
|
3604
|
+
{
|
|
3605
|
+
"path": "label",
|
|
3606
|
+
"control": "localizedText",
|
|
3607
|
+
"group": "content"
|
|
3608
|
+
},
|
|
3609
|
+
{
|
|
3610
|
+
"path": "showAllFields",
|
|
3611
|
+
"control": "checkbox",
|
|
3612
|
+
"group": "main",
|
|
3613
|
+
"default": true
|
|
3614
|
+
},
|
|
3615
|
+
{
|
|
3616
|
+
"path": "fieldColumns",
|
|
3617
|
+
"control": "segmented",
|
|
3618
|
+
"group": "layout",
|
|
3619
|
+
"options": [
|
|
3620
|
+
1,
|
|
3621
|
+
2,
|
|
3622
|
+
3
|
|
3623
|
+
],
|
|
3624
|
+
"default": 1
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
"path": "filterBy",
|
|
3628
|
+
"control": "elementSelect",
|
|
3629
|
+
"group": "state"
|
|
3630
|
+
},
|
|
3631
|
+
{
|
|
3632
|
+
"path": "hideWhenEmpty",
|
|
3633
|
+
"control": "checkbox",
|
|
3634
|
+
"group": "state",
|
|
3635
|
+
"default": false
|
|
3636
|
+
}
|
|
3637
|
+
],
|
|
3586
3638
|
"approvals": [
|
|
3587
3639
|
{
|
|
3588
3640
|
"path": "label",
|
|
@@ -3995,7 +4047,7 @@
|
|
|
3995
4047
|
"path": "settings.style.outerBorder",
|
|
3996
4048
|
"control": "checkbox",
|
|
3997
4049
|
"group": "style",
|
|
3998
|
-
"default":
|
|
4050
|
+
"default": false
|
|
3999
4051
|
},
|
|
4000
4052
|
{
|
|
4001
4053
|
"path": "settings.style.rounded",
|
|
@@ -4383,7 +4435,7 @@
|
|
|
4383
4435
|
"none",
|
|
4384
4436
|
"zebra"
|
|
4385
4437
|
],
|
|
4386
|
-
"default": "
|
|
4438
|
+
"default": "rows"
|
|
4387
4439
|
},
|
|
4388
4440
|
{
|
|
4389
4441
|
"path": "dataSource.showUnsavedBar",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Choosing between element types that both validate
|
|
2
2
|
|
|
3
|
-
*Open when more than one of the
|
|
3
|
+
*Open when more than one of the 57 types could carry what the user asked for, or before authoring `date`, `code`, `buttonList`, `chips`, `comments`, `history`, `approvals`, `checklist`, or a decomposed workspace.*
|
|
4
4
|
|
|
5
5
|
**`textarea` / `richText` / `html`** — plain multi-line notes → `textarea`; formatted text the *user* edits → `richText` (value is an HTML string, bindable only to a string field); markup *you* author → `html`. `html` interpolates `{{path}}` tokens but is never a home for record data — bind an element instead. `richText.collapseAfterLines` is inert once the element has a definite height (`heightMode` `fixed`/`fill`, or any pinned height): pin the height or collapse, never both.
|
|
6
6
|
|
|
@@ -34,4 +34,4 @@ Four types hold a value and get **no** automatic key: `table` (its edited rows),
|
|
|
34
34
|
|
|
35
35
|
## A type you have not met
|
|
36
36
|
|
|
37
|
-
`suppa form-kb --mode components` lists all
|
|
37
|
+
`suppa form-kb --mode components` lists all 57 with their purpose; `--mode api --types <type> --types <type>` gives the prop tables (a list flag repeats — it takes no JSON array), `--mode note --topic <type>` the behaviour note. Never assemble something out of `input` + `html` because no type came to mind.
|
|
@@ -30,7 +30,7 @@ The live form is first-class columns on the `Forms` row:
|
|
|
30
30
|
**Reading the form** goes through the same server. `suppa_get_form` is the builder's own read (`GET /core/forms/:id/schema`):
|
|
31
31
|
- the draft's `schema`, `mobileSchema`, `settings`, `variables`, `localizations` and the Code Form's files (`code`);
|
|
32
32
|
- `revision` (the `expected_revision` of a write);
|
|
33
|
-
- with `version='published'`, the version
|
|
33
|
+
- with `version='published'`, the version this user sees (for a child form, the merged tree). It is for reading only: it carries no Code Form sources (only the compiled `codeArtifact`) and no parent, and `suppa_write_form_draft` refuses it. A published version comes back through `suppa_form_lifecycle` rollback.
|
|
34
34
|
|
|
35
35
|
The compiled bundle comes only with `include_artifact=true`. The answer is a `{ schema, settings, variables }` draft, so the gate and `suppa_write_form_draft` read it as it is. Who has the form open is `lockedBy` / `lockedAt` on `Forms` (`suppa_search_records`, filtered by `id`).
|
|
36
36
|
|