Ersetze die Builder-Liste des Formular-Editors durch eine Formularansicht mit Ziehen und Ablegen
CI Feature / test (push) Successful in 4m18s
CI Feature / test (push) Successful in 4m18s
Der Aufbau eines Formulars zeigt Bereiche als Karten, Teilbereiche als eingerahmte Einheit darin und Felder als Zeilen (Frage, Art der Antwort, Pflicht). Hilfetext, Auswahlwerte, Bedingung und weitere Einstellungen öffnen als Pop-up. Bereiche, Teilbereiche und Felder lassen sich ziehen (SortableJS aus Filament) oder per Pfeiltasten und über "Verschieben nach" ordnen; Rückgängig nimmt Änderungen bis zum Speichern zurück. Der Browser führt den Baum und übergibt ihn beim Speichern als Text; FormEditor prüft ihn (validateTree) und überführt ihn über fromTree in dieselbe flache Ansicht wie bisher. Entwurf, Katalog und Engine bleiben unverändert, keine Migration. Tests: Die Livewire-Tests des Editors setzen jetzt den Baumtext (editor_json) statt der Builder-Blöcke; neu sind Baumumwandlung ohne Verlust, Teilbereich mit Feldern, Prüfung und Konfiguration. Das ist bewusst: Der Builder entfällt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
79c4e877ab
commit
380a3013c7
10 files changed
+1860
-225
No files matched your search
@@ -708,4 +708,136 @@
|
||||
.vw-symbolfeld-kacheln { grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr)); }
|
||||
.vw-symbolfeld-panel { max-height: 18rem; }
|
||||
}
|
||||
/* Formularansicht des Aufbaus (Formular-Editor, ADR-62): Bereiche als Karten, Teilbereiche als eingerahmte Einheit darin */
|
||||
.vw-fe { display: grid; gap: 1rem; min-width: 0; }
|
||||
.vw-fe-aussen { display: grid; gap: 0.75rem; min-width: 0; }
|
||||
.vw-fe-fehler { border: 1px solid var(--vw-error); background: var(--vw-error-soft); color: var(--vw-error); padding: 0.75rem 1rem; border-radius: var(--vw-radius); }
|
||||
.vw-fe-fehler ul { margin: 0.35rem 0 0; padding-left: 1.25rem; }
|
||||
.vw-fe-leiste { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; justify-content: space-between; }
|
||||
.vw-fe-hinweis { display: flex; gap: 0.5rem; align-items: flex-start; max-width: 48rem; color: var(--vw-quiet); font-size: var(--vw-small); }
|
||||
.vw-fe-hinweis svg { width: 1.1rem; height: 1.1rem; flex: none; margin-top: 0.15rem; }
|
||||
.vw-fe-leiste-aktionen { display: flex; gap: 0.75rem; align-items: center; margin-left: auto; }
|
||||
.vw-fe-zahl { color: var(--vw-quiet); font-size: var(--vw-small); }
|
||||
.vw-fe-zusatz { color: var(--vw-error); font-weight: 600; font-size: var(--vw-small); }
|
||||
|
||||
.vw-fe-bereiche { container-type: inline-size; container-name: fe; display: grid; gap: 1.5rem; min-width: 0; }
|
||||
.vw-fe-bereich { border: 1px solid var(--vw-line-strong); border-left: 6px solid var(--vw-pine); border-radius: var(--vw-radius); background: var(--vw-surface); box-shadow: 0 2px 6px rgb(3 37 81 / 8%); min-width: 0; }
|
||||
.vw-fe-bereich-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; padding: 0.7rem 0.9rem 0.7rem 0.5rem; background: var(--vw-paper); border-bottom: 1px solid var(--vw-line); border-radius: 0 var(--vw-radius) 0 0; }
|
||||
.vw-fe-nummer { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--vw-pine); color: #fff; font-weight: 700; }
|
||||
.vw-fe-titel { flex: 1 1 12rem; min-width: 0; }
|
||||
.vw-fe-bereich-kopf .vw-fe-titel input { font-size: 1.15rem; font-weight: 700; }
|
||||
.vw-fe-teil-kopf .vw-fe-titel input { font-weight: 650; }
|
||||
|
||||
.vw-fe input[type="text"], .vw-fe input[type="search"], .vw-fe select, .vw-fe textarea {
|
||||
width: 100%; min-height: var(--vw-target); padding: 0.4rem 0.65rem; border: 1px solid var(--vw-line-strong); border-radius: var(--vw-radius-small);
|
||||
background: #fff; color: var(--vw-ink); font: inherit; line-height: 1.35;
|
||||
}
|
||||
.vw-fe textarea { resize: vertical; }
|
||||
.vw-fe select:disabled { background: var(--vw-paper); color: var(--vw-quiet); cursor: not-allowed; }
|
||||
.vw-fe input[readonly] { background: var(--vw-paper); }
|
||||
.vw-fe .is-invalid { border-color: var(--vw-error); background: var(--vw-error-soft); box-shadow: inset 0 0 0 1px var(--vw-error); }
|
||||
|
||||
.vw-fe-griff { display: grid; place-items: center; flex: none; width: 2rem; min-height: 2.25rem; padding: 0; border: 0; border-radius: var(--vw-radius-small); background: transparent; color: var(--vw-muted); cursor: grab; touch-action: none; }
|
||||
.vw-fe-griff:hover { background: var(--vw-paper); color: var(--vw-ink); }
|
||||
.vw-fe-griff:active { cursor: grabbing; }
|
||||
.vw-fe-griff svg { width: 1.15rem; height: 1.15rem; }
|
||||
|
||||
.vw-fe-symbole { display: flex; flex: none; align-items: center; gap: 0.15rem; }
|
||||
.vw-fe-symbol {
|
||||
position: relative; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid transparent; border-radius: var(--vw-radius-small);
|
||||
background: transparent; color: var(--vw-muted); cursor: pointer;
|
||||
}
|
||||
.vw-fe-symbol svg { width: 1.2rem; height: 1.2rem; }
|
||||
.vw-fe-symbol:hover { border-color: var(--vw-line-strong); color: var(--vw-ink); background: #fff; }
|
||||
.vw-fe-symbol:disabled { opacity: 0.35; cursor: not-allowed; }
|
||||
.vw-fe-symbol.is-gesetzt { border-color: #b9d6a3; background: var(--vw-pine-soft); color: var(--vw-pine-dark); }
|
||||
.vw-fe-symbol.is-warnung { border-color: #ecc77a; background: var(--vw-warn-soft); color: var(--vw-warn); }
|
||||
.vw-fe-symbol.is-gefahr:hover { border-color: var(--vw-error); background: var(--vw-error-soft); color: var(--vw-error); }
|
||||
.vw-fe-symbol.is-versteckt { visibility: hidden; }
|
||||
.vw-fe-zaehler { position: absolute; right: -0.15rem; top: -0.3rem; min-width: 1.1rem; padding: 0 0.25rem; border-radius: 999px; background: var(--vw-pine); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.1rem; text-align: center; }
|
||||
.vw-fe-symbol.is-warnung .vw-fe-zaehler { background: var(--vw-warn); }
|
||||
|
||||
.vw-fe-inhalt { position: relative; display: grid; gap: 0.5rem; padding: 0.9rem; min-height: 4.5rem; align-content: start; }
|
||||
.vw-fe-feld { background: #fff; border: 1px solid var(--vw-line); border-radius: var(--vw-radius-small); padding: 0.4rem 0.5rem 0.4rem 0.3rem; }
|
||||
.vw-fe-feld.is-ungueltig { border-color: var(--vw-error); }
|
||||
.vw-fe-zeile {
|
||||
display: grid; gap: 0.4rem 0.6rem; align-items: center;
|
||||
grid-template-columns: auto minmax(0, 1fr) 13rem 5.6rem auto; grid-template-areas: "griff frage typ pflicht symbole";
|
||||
}
|
||||
.vw-fe-zeile > .vw-fe-griff { grid-area: griff; }
|
||||
.vw-fe-frage { grid-area: frage; min-width: 0; }
|
||||
.vw-fe-typ { grid-area: typ; min-width: 0; }
|
||||
.vw-fe-pflicht { grid-area: pflicht; display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-size: var(--vw-small); font-weight: 600; cursor: pointer; }
|
||||
.vw-fe-pflicht input { width: 1.1rem; height: 1.1rem; accent-color: var(--vw-pine); }
|
||||
.vw-fe-zeile > .vw-fe-symbole { grid-area: symbole; }
|
||||
@container fe (max-width: 46rem) {
|
||||
.vw-fe-zeile { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "griff frage frage" ". typ typ" ". pflicht symbole"; }
|
||||
.vw-fe-zeile > .vw-fe-symbole { justify-self: end; }
|
||||
}
|
||||
@container fe (max-width: 30rem) {
|
||||
.vw-fe-zeile { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "griff frage" ". typ" ". pflicht" ". symbole"; }
|
||||
.vw-fe-zeile > .vw-fe-symbole { justify-self: start; }
|
||||
}
|
||||
.vw-fe-bedingung { display: flex; align-items: flex-start; gap: 0.4rem; margin: 0.4rem 0.4rem 0.1rem 2.4rem; padding: 0.3rem 0.6rem; border: 1px solid var(--vw-info-line); border-radius: var(--vw-radius-small); background: var(--vw-info); color: var(--vw-quiet); font-size: var(--vw-small); }
|
||||
.vw-fe-bedingung svg { width: 1rem; height: 1rem; flex: none; margin-top: 0.15rem; color: var(--vw-select-line); }
|
||||
.vw-fe-bedingung.is-info { background: var(--vw-paper); border-color: var(--vw-line); }
|
||||
.vw-fe-bereich > .vw-fe-bedingung { margin: 0.6rem 0.9rem 0 0.9rem; }
|
||||
.vw-fe-teil > .vw-fe-bedingung { margin: 0.1rem 0.7rem 0.3rem 2.6rem; background: #fff; }
|
||||
|
||||
.vw-fe-anliegen .vw-fe-anliegen-text { display: grid; flex: 1 1 auto; min-width: 0; }
|
||||
.vw-fe-anliegen .vw-fe-anliegen-text span { color: var(--vw-quiet); font-size: var(--vw-small); }
|
||||
.vw-fe-anliegen { display: flex; align-items: center; gap: 0.5rem; background: var(--vw-paper); }
|
||||
|
||||
.vw-fe-teil { border: 1px solid #c8dbec; border-left: 5px solid var(--vw-select-line); border-radius: var(--vw-radius); background: #f3f8fc; }
|
||||
.vw-fe-teil-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; padding: 0.5rem 0.6rem 0.4rem 0.3rem; }
|
||||
.vw-fe-art { display: inline-flex; align-items: center; gap: 0.3rem; flex: none; color: var(--vw-select-line); font-size: var(--vw-small); font-weight: 700; }
|
||||
.vw-fe-art svg { width: 1.15rem; height: 1.15rem; }
|
||||
.vw-fe-teil-inhalt { position: relative; display: grid; gap: 0.5rem; padding: 0.2rem 0.7rem 0.7rem 1.4rem; min-height: 4.5rem; align-content: start; }
|
||||
.vw-fe-teil .vw-fe-fuss { border-top: 0; padding: 0 0.7rem 0.7rem 1.4rem; }
|
||||
.vw-fe-notiz { color: var(--vw-quiet); font-size: var(--vw-small); }
|
||||
.vw-fe-teil > .vw-fe-notiz { margin: 0 0.7rem 0.4rem 2.6rem; }
|
||||
.vw-fe-notiz.is-warnung { color: var(--vw-warn); font-weight: 600; }
|
||||
|
||||
.vw-fe-fuss { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.7rem 0.9rem; border-top: 1px dashed var(--vw-line-strong); }
|
||||
.vw-fe-inhalt[data-leer]::before, .vw-fe-teil-inhalt[data-leer]::before {
|
||||
content: attr(data-leer); display: grid; place-items: center; min-height: 3.5rem; padding: 0.5rem; border: 2px dashed var(--vw-line-strong); border-radius: var(--vw-radius-small);
|
||||
color: var(--vw-muted); font-size: var(--vw-small); text-align: center; pointer-events: none;
|
||||
}
|
||||
.vw-fe-leer-bereich { padding: 1.5rem; border: 2px dashed var(--vw-line-strong); border-radius: var(--vw-radius); color: var(--vw-muted); text-align: center; }
|
||||
.vw-fe-ende { display: flex; }
|
||||
|
||||
.vw-fe-geist { background: rgb(252 209 10 / 24%); outline: 2px dashed var(--vw-yellow); outline-offset: 2px; border-radius: var(--vw-radius-small); }
|
||||
.vw-fe-geist > * { opacity: 0.5; }
|
||||
.vw-fe-gezogen { box-shadow: 0 10px 28px rgb(3 37 81 / 22%); background: #fff; }
|
||||
.vw-fe-gegriffen { cursor: grabbing; }
|
||||
|
||||
/* Dialog für Hilfetext, Auswahlwerte, Bedingung, weitere Einstellungen und Katalog */
|
||||
.vw-fe-dialog { margin: auto; width: min(44rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 0.75rem; background: var(--vw-surface); color: var(--vw-ink); box-shadow: 0 24px 60px rgb(3 37 81 / 30%); }
|
||||
.vw-fe-dialog::backdrop { background: rgb(3 37 81 / 42%); }
|
||||
.vw-fe-dialog-karte { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); }
|
||||
.vw-fe-dialog-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem 0.6rem; }
|
||||
.vw-fe-dialog-kopf h2 { font-size: 1.3rem; }
|
||||
.vw-fe-dialog-inhalt { min-height: 0; overflow: auto; padding: 0.4rem 1.25rem 1rem; }
|
||||
.vw-fe-dialog-fuss { display: flex; justify-content: flex-end; padding: 0.75rem 1.25rem 1rem; border-top: 1px solid var(--vw-line); }
|
||||
.vw-fe-formular { display: grid; gap: 0.9rem; }
|
||||
.vw-fe-etikett { display: grid; gap: 0.3rem; font-weight: 650; }
|
||||
.vw-fe-werte { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
|
||||
.vw-fe-wert { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 0.3rem; align-items: center; }
|
||||
.vw-fe-bed { display: grid; gap: 0.6rem; margin: 0; padding: 0.4rem 0.8rem 0.8rem; border: 1px solid var(--vw-line-strong); border-radius: var(--vw-radius-small); }
|
||||
.vw-fe-bed.is-ungueltig { border-color: var(--vw-warn); background: var(--vw-warn-soft); }
|
||||
.vw-fe-bed legend { padding: 0 0.3rem; font-weight: 700; }
|
||||
.vw-fe-bed-zeile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 0.5rem; align-items: end; }
|
||||
.vw-fe-werteliste { display: flex; flex-wrap: wrap; gap: 0.4rem; }
|
||||
.vw-fe-wahl { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.25rem; padding: 0.25rem 0.8rem; border: 1px solid var(--vw-line-strong); border-radius: 999px; background: #fff; cursor: pointer; }
|
||||
.vw-fe-wahl:has(input:checked) { border-color: var(--vw-pine); background: var(--vw-pine-soft); color: var(--vw-pine-dark); font-weight: 650; }
|
||||
.vw-fe-wahl input { accent-color: var(--vw-pine); }
|
||||
.vw-fe-katalog { display: grid; gap: 0.3rem; max-height: 22rem; margin: 0; padding: 0; overflow: auto; list-style: none; }
|
||||
.vw-fe-katalog-eintrag { display: grid; gap: 0.1rem; width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--vw-line); border-radius: var(--vw-radius-small); background: #fff; color: var(--vw-ink); font: inherit; text-align: left; cursor: pointer; }
|
||||
.vw-fe-katalog-eintrag:hover { border-color: var(--vw-pine); background: var(--vw-pine-soft); }
|
||||
.vw-fe-katalog-eintrag span { color: var(--vw-quiet); font-size: var(--vw-small); }
|
||||
@media (max-width: 40rem) {
|
||||
.vw-fe-bed-zeile { grid-template-columns: minmax(0, 1fr) auto; }
|
||||
.vw-fe-bed-zeile > :nth-child(2) { grid-column: 1; }
|
||||
.vw-fe-dialog { width: calc(100vw - 1rem); }
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user