ywana-core8 0.1.71 → 0.1.73
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 +24 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +24 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +24 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +17 -5
- package/src/domain/ContentEditor.test.js +10 -1
- package/src/domain/ContentType.js +10 -1
package/dist/index.umd.js
CHANGED
@@ -1290,6 +1290,13 @@
|
|
1290
1290
|
}) : [];
|
1291
1291
|
}
|
1292
1292
|
break;
|
1293
|
+
case "Image":
|
1294
|
+
if (entryData) {
|
1295
|
+
next[name] = entryData;
|
1296
|
+
} else {
|
1297
|
+
next[name] = field["default"];
|
1298
|
+
}
|
1299
|
+
break;
|
1293
1300
|
default:
|
1294
1301
|
next[name] = field;
|
1295
1302
|
break;
|
@@ -7659,6 +7666,11 @@
|
|
7659
7666
|
onChange(id, next);
|
7660
7667
|
}
|
7661
7668
|
}
|
7669
|
+
function changeItem(index, fieldID, newValue) {
|
7670
|
+
var next = value.slice();
|
7671
|
+
next[index][fieldID] = newValue;
|
7672
|
+
onChange(id, next);
|
7673
|
+
}
|
7662
7674
|
function reload() {
|
7663
7675
|
if (onReload) onReload();
|
7664
7676
|
}
|
@@ -7679,7 +7691,8 @@
|
|
7679
7691
|
schema: item,
|
7680
7692
|
groupBy: groupBy,
|
7681
7693
|
canDelete: true,
|
7682
|
-
remove: remove
|
7694
|
+
remove: remove,
|
7695
|
+
onChange: changeItem
|
7683
7696
|
}), /*#__PURE__*/React__default["default"].createElement("footer", null, Feeder ? /*#__PURE__*/React__default["default"].createElement(Feeder, {
|
7684
7697
|
onAdd: add,
|
7685
7698
|
onReload: reload
|
@@ -7774,10 +7787,14 @@
|
|
7774
7787
|
remove = props.remove,
|
7775
7788
|
filter = props.filter,
|
7776
7789
|
actions = props.actions,
|
7777
|
-
className = props.className
|
7790
|
+
className = props.className,
|
7791
|
+
onChange = props.onChange;
|
7778
7792
|
var _useState5 = React.useState(props.groupBy),
|
7779
7793
|
groupBy = _useState5[0],
|
7780
7794
|
setGroupBy = _useState5[1];
|
7795
|
+
function change(rowID, fieldID, value) {
|
7796
|
+
if (onChange) onChange(rowID, fieldID, value);
|
7797
|
+
}
|
7781
7798
|
function changeGroup(id, value) {
|
7782
7799
|
setGroupBy(value);
|
7783
7800
|
}
|
@@ -7833,7 +7850,9 @@
|
|
7833
7850
|
};
|
7834
7851
|
}),
|
7835
7852
|
rows: groups[groupName].map(function (item, index) {
|
7836
|
-
|
7853
|
+
var row = Object.assign({}, item);
|
7854
|
+
if (!row.id) row.id = index;
|
7855
|
+
row.actions = actions ? actions.map(function (_action) {
|
7837
7856
|
return _action.filter ? _action.filter(item) ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
7838
7857
|
icon: _action.icon,
|
7839
7858
|
clickable: true,
|
@@ -7850,7 +7869,7 @@
|
|
7850
7869
|
}
|
7851
7870
|
});
|
7852
7871
|
}) : [];
|
7853
|
-
if (canDelete)
|
7872
|
+
if (canDelete) row.actions.push(/*#__PURE__*/React__default["default"].createElement(Icon, {
|
7854
7873
|
icon: "delete",
|
7855
7874
|
size: "small",
|
7856
7875
|
clickable: true,
|
@@ -7858,7 +7877,7 @@
|
|
7858
7877
|
return remove(index);
|
7859
7878
|
}
|
7860
7879
|
}));
|
7861
|
-
return
|
7880
|
+
return row;
|
7862
7881
|
})
|
7863
7882
|
};
|
7864
7883
|
table.columns.push({
|