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.umd.js CHANGED
@@ -4679,9 +4679,7 @@
4679
4679
  };
4680
4680
 
4681
4681
  var site = React.useContext(SiteContext);
4682
- var _props$version = props.version,
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 _props$actions2 = props.actions,
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,27 @@
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
+ });
5685
5689
  var rows = all.filter(function (item) {
5686
5690
  return checked.has(item.id);
5687
5691
  });
5688
5692
  var table = {
5689
- columns: [{
5690
- id: "id",
5691
- label: "ID"
5692
- }, {
5693
- id: "idMatricula",
5694
- label: "ID Matricula"
5695
- }],
5693
+ columns: columns,
5694
+
5695
+ /*
5696
+ columns: [
5697
+ { id: "id", label: "ID" },
5698
+ { id: "idMatricula", label: "ID Matricula" },
5699
+ { id: "flow", "Circuito"},
5700
+ ],
5701
+ */
5696
5702
  rows: rows || []
5697
5703
  };
5698
5704
  var buttons = actions.map(function (_ref) {