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>
39 lines
3.7 KiB
PHP
39 lines
3.7 KiB
PHP
@php
|
|
$paths = [
|
|
'auge' => '<path d="M2 12s3.6-6.5 10-6.5S22 12 22 12s-3.6 6.5-10 6.5S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>',
|
|
'auge-zu' => '<path d="M3 3l18 18M10.6 5.6A10.8 10.8 0 0 1 12 5.5c6.4 0 10 6.5 10 6.5a17.6 17.6 0 0 1-3.1 3.9M6.6 6.6C3.7 8.4 2 12 2 12s3.6 6.5 10 6.5c1.9 0 3.6-.6 5-1.4M9.9 9.9a3 3 0 0 0 4.2 4.2"/>',
|
|
'plus' => '<path d="M12 5v14M5 12h14"/>',
|
|
'tausch' => '<path d="M4 11a8 8 0 0 1 13.7-5.6L20 7.7M20 3.5v4.2h-4.2M20 13a8 8 0 0 1-13.7 5.6L4 16.3M4 20.5v-4.2h4.2"/>',
|
|
'x' => '<path d="M6 6l12 12M18 6L6 18"/>',
|
|
'hoch' => '<path d="M6 15l6-6 6 6"/>',
|
|
'runter' => '<path d="M6 9l6 6 6-6"/>',
|
|
'griff' => '<circle cx="9" cy="6" r="1.3"/><circle cx="15" cy="6" r="1.3"/><circle cx="9" cy="12" r="1.3"/><circle cx="15" cy="12" r="1.3"/><circle cx="9" cy="18" r="1.3"/><circle cx="15" cy="18" r="1.3"/>',
|
|
'mehr' => '<circle cx="5" cy="12" r="1.4"/><circle cx="12" cy="12" r="1.4"/><circle cx="19" cy="12" r="1.4"/>',
|
|
'ok' => '<circle cx="12" cy="12" r="9"/><path d="M8 12.5l2.7 2.7L16.5 9.5"/>',
|
|
'herunter' => '<path d="M12 4v11M7 11l5 5 5-5M5 20h14"/>',
|
|
'achtung' => '<circle cx="12" cy="12" r="9"/><path d="M12 7.5v5.5M12 16.5v.2"/>',
|
|
'zurueck' => '<path d="M19 12H5M11 6l-6 6 6 6"/>',
|
|
'stift' => '<path d="M4 20h4L19 9l-4-4L4 16v4z"/><path d="M13.5 6.5l4 4"/>',
|
|
'info' => '<circle cx="12" cy="12" r="9"/><path d="M12 11v5.5M12 7.6v.2"/>',
|
|
'suche' => '<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4.5 4.5"/>',
|
|
'film' => '<rect x="3" y="5" width="18" height="14" rx="1.5"/><path d="M7 5v14M17 5v14M3 9.5h4M3 14.5h4M17 9.5h4M17 14.5h4"/>',
|
|
'bild' => '<rect x="3" y="5" width="18" height="14" rx="1.5"/><circle cx="9" cy="10" r="1.6"/><path d="M21 16l-5.5-5.5L5 19"/>',
|
|
'dokument' => '<path d="M6 3h8l4 4v14H6z"/><path d="M14 3v4h4M9 12h6M9 16h6"/>',
|
|
'audio' => '<path d="M9 18V6l10-2v12"/><circle cx="6.5" cy="18" r="2.5"/><circle cx="16.5" cy="16" r="2.5"/>',
|
|
'extern' => '<path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>',
|
|
'modul' => '<rect x="2.5" y="4.5" width="19" height="15" rx="1.5"/><path d="M6 16v-6h3.5v6M10.5 16V8H14v8M15 16v-4.5h3.5V16"/>',
|
|
'schluessel' => '<circle cx="8" cy="14" r="4.5"/><path d="M11.3 10.8L20 2.5M16.5 6l2.5 2.5M14 8.5l2 2"/>',
|
|
'etikett' => '<path d="M3 12V4h8l10 10-8 8z"/><circle cx="7.5" cy="8.5" r="1.4"/>',
|
|
'filter' => '<path d="M4 5h16l-6.2 7.4V19l-3.6-1.8v-4.8z"/>',
|
|
'frage' => '<circle cx="12" cy="12" r="9"/><path d="M9.5 9.2a2.6 2.6 0 0 1 5 .9c0 1.7-2.5 2.1-2.5 3.9M12 16.8v.2"/>',
|
|
'liste' => '<path d="M9 6h11M9 12h11M9 18h11"/><circle cx="4.8" cy="6" r="1"/><circle cx="4.8" cy="12" r="1"/><circle cx="4.8" cy="18" r="1"/>',
|
|
'verzweigung' => '<circle cx="6" cy="5.5" r="2"/><circle cx="6" cy="18.5" r="2"/><circle cx="18" cy="9" r="2"/><path d="M6 7.5v9M18 11c0 3.5-4 3-10.5 6.2"/>',
|
|
'papierkorb' => '<path d="M4 7h16M10 11v6M14 11v6M6 7l1 12.5h10L18 7M9 7V4.5h6V7"/>',
|
|
'teilbereich' => '<rect x="3" y="4" width="18" height="16" rx="2" stroke-dasharray="3 2.5"/><path d="M7 9h10M7 13h6"/>',
|
|
'bereich' => '<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 9h18"/>',
|
|
'zuruecksetzen' => '<path d="M4 12a8 8 0 1 0 2.4-5.7L4 8.5M4 4v4.5h4.5"/>',
|
|
];
|
|
$name = $name ?? 'info';
|
|
@endphp
|
|
<svg viewBox="0 0 24 24" fill="{{ in_array($name, ['griff', 'mehr'], true) ? 'currentColor' : 'none' }}" stroke="currentColor" stroke-width="{{ in_array($name, ['griff', 'mehr'], true) ? '0' : '1.8' }}" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">{!! $paths[$name] ?? $paths['info'] !!}</svg>
|