ywana-core8 0.0.457 → 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,
@@ -4721,7 +4719,7 @@ var CollectionPage = function CollectionPage(props) {
4721
4719
  } catch (e) {
4722
4720
  return Promise.reject(e);
4723
4721
  }
4724
- }, [version]);
4722
+ }, []);
4725
4723
 
4726
4724
  function add() {
4727
4725
  var onOK = function onOK(form) {
@@ -5674,7 +5672,8 @@ var TableRowEditor = function TableRowEditor(props) {
5674
5672
 
5675
5673
 
5676
5674
  var TableSelector = function TableSelector(props) {
5677
- var _props$actions2 = props.actions,
5675
+ var schema = props.schema,
5676
+ _props$actions2 = props.actions,
5678
5677
  actions = _props$actions2 === void 0 ? [] : _props$actions2;
5679
5678
 
5680
5679
  var _useContext2 = React.useContext(PageContext),
@@ -5684,17 +5683,27 @@ var TableSelector = function TableSelector(props) {
5684
5683
  var all = pageContext.all,
5685
5684
  checked = pageContext.checked;
5686
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
+ });
5687
5694
  var rows = all.filter(function (item) {
5688
5695
  return checked.has(item.id);
5689
5696
  });
5690
5697
  var table = {
5691
- columns: [{
5692
- id: "id",
5693
- label: "ID"
5694
- }, {
5695
- id: "idMatricula",
5696
- label: "ID Matricula"
5697
- }],
5698
+ columns: columns,
5699
+
5700
+ /*
5701
+ columns: [
5702
+ { id: "id", label: "ID" },
5703
+ { id: "idMatricula", label: "ID Matricula" },
5704
+ { id: "flow", "Circuito"},
5705
+ ],
5706
+ */
5698
5707
  rows: rows || []
5699
5708
  };
5700
5709
  var buttons = actions.map(function (_ref) {