@studiotitta/studio-editori 0.1.3 → 0.1.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/dist/selain/Paneeli.js +8 -3
- package/package.json +1 -1
package/dist/selain/Paneeli.js
CHANGED
|
@@ -48,10 +48,15 @@ function Sisalto({ maaritys, arvo, tunniste, muuta, lataa, kielet, }) {
|
|
|
48
48
|
case "tekstialue":
|
|
49
49
|
return (_jsx("textarea", { id: tunniste, rows: 4, value: typeof arvo === "string" ? arvo : "", onChange: (tapahtuma) => muuta(tapahtuma.target.value) }));
|
|
50
50
|
case "tekstilista":
|
|
51
|
+
/*
|
|
52
|
+
Yksi rivi = yksi kappale, sama sääntö kuin sivulla muokatessa.
|
|
53
|
+
Tyhjät rivit ohitetaan, joten ylimääräinen rivinvaihto ei tuota
|
|
54
|
+
tyhjää kappaletta.
|
|
55
|
+
*/
|
|
51
56
|
return (_jsx("textarea", { id: tunniste, rows: 5, value: Array.isArray(arvo) ? arvo.join("\n\n") : "", onChange: (tapahtuma) => muuta(tapahtuma.target.value
|
|
52
|
-
.split(/\n
|
|
53
|
-
.map((
|
|
54
|
-
.filter((
|
|
57
|
+
.split(/\n+/)
|
|
58
|
+
.map((kappale) => kappale.trim())
|
|
59
|
+
.filter((kappale) => kappale !== "")) }));
|
|
55
60
|
case "kielivalinta": {
|
|
56
61
|
const valitut = Array.isArray(arvo) ? arvo : [];
|
|
57
62
|
return (_jsxs("div", { className: "kielivalinta", children: [kielet.map((kieli) => (_jsxs("label", { className: "kytkin", children: [_jsx("input", { type: "checkbox", checked: valitut.includes(kieli), onChange: (tapahtuma) => muuta(tapahtuma.target.checked
|
package/package.json
CHANGED