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.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,
@@ -4716,7 +4714,7 @@
4716
4714
  } catch (e) {
4717
4715
  return Promise.reject(e);
4718
4716
  }
4719
- }, [version]);
4717
+ }, []);
4720
4718
 
4721
4719
  function add() {
4722
4720
  var onOK = function onOK(form) {
@@ -5669,7 +5667,8 @@
5669
5667
 
5670
5668
 
5671
5669
  var TableSelector = function TableSelector(props) {
5672
- var _props$actions2 = props.actions,
5670
+ var schema = props.schema,
5671
+ _props$actions2 = props.actions,
5673
5672
  actions = _props$actions2 === void 0 ? [] : _props$actions2;
5674
5673
 
5675
5674
  var _useContext2 = React.useContext(PageContext),
@@ -5679,17 +5678,27 @@
5679
5678
  var all = pageContext.all,
5680
5679
  checked = pageContext.checked;
5681
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
+ });
5682
5689
  var rows = all.filter(function (item) {
5683
5690
  return checked.has(item.id);
5684
5691
  });
5685
5692
  var table = {
5686
- columns: [{
5687
- id: "id",
5688
- label: "ID"
5689
- }, {
5690
- id: "idMatricula",
5691
- label: "ID Matricula"
5692
- }],
5693
+ columns: columns,
5694
+
5695
+ /*
5696
+ columns: [
5697
+ { id: "id", label: "ID" },
5698
+ { id: "idMatricula", label: "ID Matricula" },
5699
+ { id: "flow", "Circuito"},
5700
+ ],
5701
+ */
5693
5702
  rows: rows || []
5694
5703
  };
5695
5704
  var buttons = actions.map(function (_ref) {