ywana-core8 0.0.459 → 0.0.462

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.
@@ -4676,9 +4676,7 @@ var CollectionPage = function CollectionPage(props) {
4676
4676
  };
4677
4677
 
4678
4678
  var site = useContext(SiteContext);
4679
- var _props$version = props.version,
4680
- version = _props$version === void 0 ? 0 : _props$version,
4681
- _props$id = props.id,
4679
+ var _props$id = props.id,
4682
4680
  id = _props$id === void 0 ? "collection" : _props$id,
4683
4681
  icon = props.icon,
4684
4682
  title = props.title,
@@ -4714,9 +4712,6 @@ var CollectionPage = function CollectionPage(props) {
4714
4712
  return Promise.reject(e);
4715
4713
  }
4716
4714
  }, []);
4717
- useEffect(function () {
4718
- if (version > 0) reload();
4719
- }, [version]);
4720
4715
 
4721
4716
  function add() {
4722
4717
  var onOK = function onOK(form) {
@@ -5669,7 +5664,8 @@ var TableRowEditor = function TableRowEditor(props) {
5669
5664
 
5670
5665
 
5671
5666
  var TableSelector = function TableSelector(props) {
5672
- var _props$actions2 = props.actions,
5667
+ var schema = props.schema,
5668
+ _props$actions2 = props.actions,
5673
5669
  actions = _props$actions2 === void 0 ? [] : _props$actions2;
5674
5670
 
5675
5671
  var _useContext2 = useContext(PageContext),
@@ -5679,17 +5675,21 @@ var TableSelector = function TableSelector(props) {
5679
5675
  var all = pageContext.all,
5680
5676
  checked = pageContext.checked;
5681
5677
  var count = checked.size + "/" + all.length;
5678
+ var columns = Object.keys(schema).filter(function (key) {
5679
+ return schema[key].selectorColumn === true;
5680
+ }).map(function (key) {
5681
+ var field = schema[key];
5682
+ return {
5683
+ id: field.id,
5684
+ label: field.label
5685
+ };
5686
+ });
5687
+ console.log("TableSelector ", columns, schema);
5682
5688
  var rows = all.filter(function (item) {
5683
5689
  return checked.has(item.id);
5684
5690
  });
5685
5691
  var table = {
5686
- columns: [{
5687
- id: "id",
5688
- label: "ID"
5689
- }, {
5690
- id: "idMatricula",
5691
- label: "ID Matricula"
5692
- }],
5692
+ columns: columns,
5693
5693
  rows: rows || []
5694
5694
  };
5695
5695
  var buttons = actions.map(function (_ref) {