ywana-core8 0.0.629 → 0.0.630
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/index.cjs +34 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +34 -46
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +34 -46
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +0 -24
- package/src/domain/ContentType.js +32 -27
package/dist/index.modern.js
CHANGED
@@ -1192,40 +1192,42 @@ var ContentType = /*#__PURE__*/function () {
|
|
1192
1192
|
optional = field.optional;
|
1193
1193
|
var entryData = data ? data[name] : null;
|
1194
1194
|
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1195
|
+
if (outsider === true) ; else {
|
1196
|
+
switch (type) {
|
1197
|
+
case TYPES.STRING:
|
1198
|
+
next[name] = entryData || field["default"];
|
1199
|
+
break;
|
1200
|
+
|
1201
|
+
case TYPES.NUMBER:
|
1202
|
+
next[name] = entryData || field["default"];
|
1203
|
+
break;
|
1204
|
+
|
1205
|
+
case TYPES.BOOLEAN:
|
1206
|
+
next[name] = entryData || field["default"];
|
1207
|
+
break;
|
1208
|
+
|
1209
|
+
case TYPES.ENTITY:
|
1210
|
+
if (optional === true && !entryData) break;
|
1211
|
+
var child1 = new ContentType(item);
|
1212
|
+
next[name] = child1.value(entryData);
|
1213
|
+
break;
|
1214
|
+
|
1215
|
+
case TYPES.ARRAY:
|
1216
|
+
if (item === TYPES.STRING) {
|
1217
|
+
next[name] = entryData ? entryData : [];
|
1218
|
+
} else {
|
1219
|
+
var child2 = new ContentType(item);
|
1220
|
+
next[name] = entryData ? entryData.map(function (data2) {
|
1221
|
+
return child2.value(data2);
|
1222
|
+
}) : [];
|
1223
|
+
}
|
1223
1224
|
|
1224
|
-
|
1225
|
+
break;
|
1225
1226
|
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1227
|
+
default:
|
1228
|
+
next[name] = field;
|
1229
|
+
break;
|
1230
|
+
}
|
1229
1231
|
}
|
1230
1232
|
|
1231
1233
|
return next;
|
@@ -4919,20 +4921,6 @@ var CollectionEditor$1 = function CollectionEditor(_ref11) {
|
|
4919
4921
|
function reload() {
|
4920
4922
|
if (onReload) onReload();
|
4921
4923
|
}
|
4922
|
-
/* const columns = Object.values(item)
|
4923
|
-
.filter(field => field.column === true)
|
4924
|
-
.map((item) => ({ ...item, onChange: change }))
|
4925
|
-
columns.push({ id: 'actions', label: 'Actions' })
|
4926
|
-
const rows = value.map((item, index) => ({
|
4927
|
-
...item,
|
4928
|
-
id: index,
|
4929
|
-
actions: [
|
4930
|
-
<Icon icon='delete' clickable action={() => remove(index)} size="small" />
|
4931
|
-
]
|
4932
|
-
}))
|
4933
|
-
const table = { columns, rows }
|
4934
|
-
*/
|
4935
|
-
|
4936
4924
|
|
4937
4925
|
return /*#__PURE__*/React.createElement("div", {
|
4938
4926
|
className: "collection-editor"
|