|
14 | 14 | { |
15 | 15 | "kind": "field", |
16 | 16 | "name": "retain", |
17 | | - "privacy": "public" |
| 17 | + "type": { "text": "string | null" }, |
| 18 | + "description": "Space-separated list of field names (or ids as fallback) to retain after a successful form submission.", |
| 19 | + "privacy": "public", |
| 20 | + "attribute": "retain" |
18 | 21 | }, |
19 | 22 | { |
20 | 23 | "kind": "field", |
21 | 24 | "name": "retainChoice", |
22 | | - "privacy": "public" |
| 25 | + "type": { "text": "boolean" }, |
| 26 | + "description": "When present, injects an accessible opt-in retention checkbox into the form.", |
| 27 | + "privacy": "public", |
| 28 | + "attribute": "retain-choice" |
23 | 29 | }, |
24 | 30 | { |
25 | 31 | "kind": "field", |
26 | 32 | "name": "retainChoiceLabel", |
27 | | - "privacy": "public" |
| 33 | + "type": { "text": "string | null" }, |
| 34 | + "description": "Plain-text label for the injected retention checkbox.", |
| 35 | + "privacy": "public", |
| 36 | + "attribute": "retain-choice-label" |
28 | 37 | }, |
29 | 38 | { |
30 | 39 | "kind": "field", |
31 | 40 | "name": "retainChoiceContainer", |
32 | | - "privacy": "public" |
| 41 | + "type": { "text": "string | null" }, |
| 42 | + "description": "CSS selector for a container element into which the retention checkbox is appended.", |
| 43 | + "privacy": "public", |
| 44 | + "attribute": "retain-choice-container" |
33 | 45 | }, |
34 | 46 | { |
35 | 47 | "kind": "field", |
36 | 48 | "name": "storageKey", |
37 | | - "privacy": "public" |
| 49 | + "type": { "text": "string | null" }, |
| 50 | + "description": "Optional explicit localStorage key override. When omitted the key is derived from the form's method and resolved action URL.", |
| 51 | + "privacy": "public", |
| 52 | + "attribute": "storage-key" |
38 | 53 | }, |
39 | 54 | { |
40 | 55 | "kind": "method", |
41 | 56 | "name": "saveFormState", |
| 57 | + "description": "Serializes and persists the current form field values to localStorage.", |
42 | 58 | "privacy": "public" |
43 | 59 | }, |
44 | 60 | { |
45 | 61 | "kind": "method", |
46 | 62 | "name": "restoreFormState", |
| 63 | + "description": "Applies previously saved field values to the current form.", |
47 | 64 | "privacy": "public" |
48 | 65 | }, |
49 | 66 | { |
50 | 67 | "kind": "method", |
51 | 68 | "name": "clearSavedData", |
| 69 | + "description": "Removes the saved data for this form from localStorage.", |
52 | 70 | "privacy": "public" |
53 | 71 | } |
54 | 72 | ], |
55 | 73 | "events": [], |
56 | 74 | "attributes": [ |
57 | 75 | { |
58 | | - "name": "retain" |
| 76 | + "name": "retain", |
| 77 | + "type": { "text": "string" }, |
| 78 | + "default": "\"\"", |
| 79 | + "description": "Space-separated list of field names (or ids as fallback) to retain after a successful form submission.", |
| 80 | + "fieldName": "retain" |
59 | 81 | }, |
60 | 82 | { |
61 | | - "name": "retain-my-info" |
| 83 | + "name": "retain-choice", |
| 84 | + "type": { "text": "boolean" }, |
| 85 | + "default": "false", |
| 86 | + "description": "When present, injects an accessible opt-in retention checkbox into the form.", |
| 87 | + "fieldName": "retainChoice" |
62 | 88 | }, |
63 | 89 | { |
64 | | - "name": "retain-my-info-label" |
| 90 | + "name": "retain-choice-label", |
| 91 | + "type": { "text": "string" }, |
| 92 | + "default": "\"Store my contact information for later\"", |
| 93 | + "description": "Plain-text label for the injected retention checkbox.", |
| 94 | + "fieldName": "retainChoiceLabel" |
65 | 95 | }, |
66 | 96 | { |
67 | | - "name": "retain-my-info-selector" |
| 97 | + "name": "retain-choice-container", |
| 98 | + "type": { "text": "string" }, |
| 99 | + "default": "\"\"", |
| 100 | + "description": "CSS selector for a container element into which the retention checkbox is appended. When omitted the checkbox is inserted before the first submit control.", |
| 101 | + "fieldName": "retainChoiceContainer" |
68 | 102 | }, |
69 | 103 | { |
70 | | - "name": "storage-key" |
| 104 | + "name": "storage-key", |
| 105 | + "type": { "text": "string" }, |
| 106 | + "default": "\"form-saver:{method}:{resolvedActionUrl}\"", |
| 107 | + "description": "Optional explicit localStorage key override.", |
| 108 | + "fieldName": "storageKey" |
71 | 109 | } |
72 | 110 | ], |
73 | 111 | "superclass": { |
|
0 commit comments