@xeplr/cli 0.3.11 → 0.3.13
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/package.json
CHANGED
|
@@ -178,6 +178,7 @@ body { margin: 0; }
|
|
|
178
178
|
cursor: pointer;
|
|
179
179
|
}
|
|
180
180
|
.app-btn:disabled { opacity: 0.55; cursor: default; }
|
|
181
|
+
a.app-btn { display: inline-block; text-decoration: none; line-height: normal; }
|
|
181
182
|
.app-btn-quiet {
|
|
182
183
|
background: transparent;
|
|
183
184
|
border-color: var(--xeplr-border-primary);
|
|
@@ -301,7 +302,8 @@ body { margin: 0; }
|
|
|
301
302
|
.app-forms-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 220px; font-size: 12px; color: var(--xeplr-text-muted); }
|
|
302
303
|
|
|
303
304
|
.app-menu-label,
|
|
304
|
-
.app-forms-new input
|
|
305
|
+
.app-forms-new input,
|
|
306
|
+
.app-forms-new select {
|
|
305
307
|
flex: 1;
|
|
306
308
|
padding: 9px 11px;
|
|
307
309
|
border-radius: 6px;
|
|
@@ -402,7 +404,7 @@ body { margin: 0; }
|
|
|
402
404
|
.app-field-row { flex-direction: column; gap: 0; }
|
|
403
405
|
.app-field input, .app-field textarea, .app-field select { font-size: 16px; min-height: 44px; }
|
|
404
406
|
.app-forms-field { min-width: 0; flex-basis: 100%; }
|
|
405
|
-
.app-menu-label, .app-forms-new input { font-size: 16px; min-height: 44px; box-sizing: border-box; }
|
|
407
|
+
.app-menu-label, .app-forms-new input, .app-forms-new select { font-size: 16px; min-height: 44px; box-sizing: border-box; }
|
|
406
408
|
.app-btn { min-height: 44px; }
|
|
407
409
|
.app-row-actions .app-btn { min-height: 40px; padding: 8px 12px; }
|
|
408
410
|
|
|
@@ -20,6 +20,18 @@ export default function FormDesigner() {
|
|
|
20
20
|
const screenKey = form + (part === 'list' ? '_list' : '_edit')
|
|
21
21
|
const [current, setCurrent] = useState(null) // { key, document, lockedNames }
|
|
22
22
|
const [error, setError] = useState(null)
|
|
23
|
+
// BOTH SCREENS' DOCUMENTS, not just their names. The list's Columns are
|
|
24
|
+
// the FORM's fields, and its "Edit in" opens the form: without the form's
|
|
25
|
+
// document the list can offer only the columns it already has, so a field
|
|
26
|
+
// added to the form could never be shown in its list.
|
|
27
|
+
const [documents, setDocuments] = useState({})
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
let cancelled = false
|
|
31
|
+
Promise.all(PARTS.map((p) => factory.loadDraft(form + p.suffix).then((row) => [p.part, row.document], () => [p.part, null])))
|
|
32
|
+
.then((pairs) => { if (!cancelled) setDocuments(Object.fromEntries(pairs)) })
|
|
33
|
+
return () => { cancelled = true }
|
|
34
|
+
}, [form, part])
|
|
23
35
|
|
|
24
36
|
useEffect(() => {
|
|
25
37
|
let cancelled = false
|
|
@@ -65,7 +77,7 @@ export default function FormDesigner() {
|
|
|
65
77
|
document={current.document}
|
|
66
78
|
lockedNames={current.lockedNames}
|
|
67
79
|
onPublish={publish}
|
|
68
|
-
screens={PARTS.map((p) => ({ id: form + p.suffix, name: p.label }))}
|
|
80
|
+
screens={PARTS.map((p) => ({ id: form + p.suffix, name: p.label, document: documents[p.part] || undefined }))}
|
|
69
81
|
/>
|
|
70
82
|
</div>
|
|
71
83
|
)}
|
|
@@ -101,8 +101,8 @@ export default function Masters() {
|
|
|
101
101
|
<td className="app-row-actions">
|
|
102
102
|
{/* Its records: the list screen is what looking at a master
|
|
103
103
|
means. Its design is where the flag was set. */}
|
|
104
|
-
<Link to={`/forms/${m.key}`}>Open</Link>
|
|
105
|
-
<Link to={`/configure/forms/${m.key}/design/form`}>Design</Link>
|
|
104
|
+
<Link className="app-btn app-btn-quiet" to={`/forms/${m.key}`}>Open</Link>
|
|
105
|
+
<Link className="app-btn app-btn-quiet" to={`/configure/forms/${m.key}/design/form`}>Design</Link>
|
|
106
106
|
</td>
|
|
107
107
|
</tr>
|
|
108
108
|
))}
|