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.cjs
CHANGED
@@ -4684,9 +4684,7 @@ var CollectionPage = function CollectionPage(props) {
|
|
4684
4684
|
};
|
4685
4685
|
|
4686
4686
|
var site = React.useContext(SiteContext);
|
4687
|
-
var _props$
|
4688
|
-
version = _props$version === void 0 ? 0 : _props$version,
|
4689
|
-
_props$id = props.id,
|
4687
|
+
var _props$id = props.id,
|
4690
4688
|
id = _props$id === void 0 ? "collection" : _props$id,
|
4691
4689
|
icon = props.icon,
|
4692
4690
|
title = props.title,
|
@@ -4722,9 +4720,6 @@ var CollectionPage = function CollectionPage(props) {
|
|
4722
4720
|
return Promise.reject(e);
|
4723
4721
|
}
|
4724
4722
|
}, []);
|
4725
|
-
React.useEffect(function () {
|
4726
|
-
if (version > 0) reload();
|
4727
|
-
}, [version]);
|
4728
4723
|
|
4729
4724
|
function add() {
|
4730
4725
|
var onOK = function onOK(form) {
|
@@ -5677,7 +5672,8 @@ var TableRowEditor = function TableRowEditor(props) {
|
|
5677
5672
|
|
5678
5673
|
|
5679
5674
|
var TableSelector = function TableSelector(props) {
|
5680
|
-
var
|
5675
|
+
var schema = props.schema,
|
5676
|
+
_props$actions2 = props.actions,
|
5681
5677
|
actions = _props$actions2 === void 0 ? [] : _props$actions2;
|
5682
5678
|
|
5683
5679
|
var _useContext2 = React.useContext(PageContext),
|
@@ -5687,17 +5683,28 @@ var TableSelector = function TableSelector(props) {
|
|
5687
5683
|
var all = pageContext.all,
|
5688
5684
|
checked = pageContext.checked;
|
5689
5685
|
var count = checked.size + "/" + all.length;
|
5686
|
+
var columns = Object.keys(schema).filter(function (key) {
|
5687
|
+
return schema[key].selectorColumn === true;
|
5688
|
+
}).map(function (field) {
|
5689
|
+
return {
|
5690
|
+
id: field.id,
|
5691
|
+
label: field.label
|
5692
|
+
};
|
5693
|
+
});
|
5694
|
+
console.log("TableSelector ", columns, schema);
|
5690
5695
|
var rows = all.filter(function (item) {
|
5691
5696
|
return checked.has(item.id);
|
5692
5697
|
});
|
5693
5698
|
var table = {
|
5694
|
-
columns:
|
5695
|
-
|
5696
|
-
|
5697
|
-
|
5698
|
-
|
5699
|
-
|
5700
|
-
|
5699
|
+
columns: columns,
|
5700
|
+
|
5701
|
+
/*
|
5702
|
+
columns: [
|
5703
|
+
{ id: "id", label: "ID" },
|
5704
|
+
{ id: "idMatricula", label: "ID Matricula" },
|
5705
|
+
{ id: "flow", "Circuito"},
|
5706
|
+
],
|
5707
|
+
*/
|
5701
5708
|
rows: rows || []
|
5702
5709
|
};
|
5703
5710
|
var buttons = actions.map(function (_ref) {
|