ywana-core8 0.0.459 → 0.0.460

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 CHANGED
@@ -4684,9 +4684,7 @@ var CollectionPage = function CollectionPage(props) {
4684
4684
  };
4685
4685
 
4686
4686
  var site = React.useContext(SiteContext);
4687
- var _props$version = props.version,
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 _props$actions2 = props.actions,
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,27 @@ 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
+ });
5690
5694
  var rows = all.filter(function (item) {
5691
5695
  return checked.has(item.id);
5692
5696
  });
5693
5697
  var table = {
5694
- columns: [{
5695
- id: "id",
5696
- label: "ID"
5697
- }, {
5698
- id: "idMatricula",
5699
- label: "ID Matricula"
5700
- }],
5698
+ columns: columns,
5699
+
5700
+ /*
5701
+ columns: [
5702
+ { id: "id", label: "ID" },
5703
+ { id: "idMatricula", label: "ID Matricula" },
5704
+ { id: "flow", "Circuito"},
5705
+ ],
5706
+ */
5701
5707
  rows: rows || []
5702
5708
  };
5703
5709
  var buttons = actions.map(function (_ref) {