ywana-core8 0.0.458 → 0.0.461
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 +21 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +21 -14
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +21 -14
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +1 -5
- package/src/domain/TablePage.js +15 -4
package/dist/index.umd.js
CHANGED
@@ -4679,9 +4679,7 @@
|
|
4679
4679
|
};
|
4680
4680
|
|
4681
4681
|
var site = React.useContext(SiteContext);
|
4682
|
-
var _props$
|
4683
|
-
version = _props$version === void 0 ? 0 : _props$version,
|
4684
|
-
_props$id = props.id,
|
4682
|
+
var _props$id = props.id,
|
4685
4683
|
id = _props$id === void 0 ? "collection" : _props$id,
|
4686
4684
|
icon = props.icon,
|
4687
4685
|
title = props.title,
|
@@ -4717,9 +4715,6 @@
|
|
4717
4715
|
return Promise.reject(e);
|
4718
4716
|
}
|
4719
4717
|
}, []);
|
4720
|
-
React.useEffect(function () {
|
4721
|
-
if (version > 0) reload();
|
4722
|
-
}, [version]);
|
4723
4718
|
|
4724
4719
|
function add() {
|
4725
4720
|
var onOK = function onOK(form) {
|
@@ -5672,7 +5667,8 @@
|
|
5672
5667
|
|
5673
5668
|
|
5674
5669
|
var TableSelector = function TableSelector(props) {
|
5675
|
-
var
|
5670
|
+
var schema = props.schema,
|
5671
|
+
_props$actions2 = props.actions,
|
5676
5672
|
actions = _props$actions2 === void 0 ? [] : _props$actions2;
|
5677
5673
|
|
5678
5674
|
var _useContext2 = React.useContext(PageContext),
|
@@ -5682,17 +5678,28 @@
|
|
5682
5678
|
var all = pageContext.all,
|
5683
5679
|
checked = pageContext.checked;
|
5684
5680
|
var count = checked.size + "/" + all.length;
|
5681
|
+
var columns = Object.keys(schema).filter(function (key) {
|
5682
|
+
return schema[key].selectorColumn === true;
|
5683
|
+
}).map(function (field) {
|
5684
|
+
return {
|
5685
|
+
id: field.id,
|
5686
|
+
label: field.label
|
5687
|
+
};
|
5688
|
+
});
|
5689
|
+
console.log("TableSelector ", columns, schema);
|
5685
5690
|
var rows = all.filter(function (item) {
|
5686
5691
|
return checked.has(item.id);
|
5687
5692
|
});
|
5688
5693
|
var table = {
|
5689
|
-
columns:
|
5690
|
-
|
5691
|
-
|
5692
|
-
|
5693
|
-
|
5694
|
-
|
5695
|
-
|
5694
|
+
columns: columns,
|
5695
|
+
|
5696
|
+
/*
|
5697
|
+
columns: [
|
5698
|
+
{ id: "id", label: "ID" },
|
5699
|
+
{ id: "idMatricula", label: "ID Matricula" },
|
5700
|
+
{ id: "flow", "Circuito"},
|
5701
|
+
],
|
5702
|
+
*/
|
5696
5703
|
rows: rows || []
|
5697
5704
|
};
|
5698
5705
|
var buttons = actions.map(function (_ref) {
|