@panneau/core 1.0.3-alpha.10 → 1.0.3-alpha.12

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/es/utils.js CHANGED
@@ -79,7 +79,7 @@ var getComponent = function getComponent(component) {
79
79
  };
80
80
  };
81
81
 
82
- var _excluded = ["field"];
82
+ var _excluded = ["id", "field"];
83
83
  var getColumnFromField = function getColumnFromField(field) {
84
84
  if (field === null) {
85
85
  return null;
@@ -110,12 +110,17 @@ var getColumnsWithFields = function getColumnsWithFields(resource, columns) {
110
110
  var _ref = isString(column) ? {
111
111
  field: column
112
112
  } : column,
113
+ _ref$id = _ref.id,
114
+ colId = _ref$id === void 0 ? null : _ref$id,
113
115
  _ref$field = _ref.field,
114
- fieldName = _ref$field === void 0 ? null : _ref$field,
116
+ colField = _ref$field === void 0 ? null : _ref$field,
115
117
  otherProps = _objectWithoutProperties(_ref, _excluded);
116
- return _objectSpread(_objectSpread({}, fieldName !== null ? getColumnFromField(fields.find(function (it) {
118
+ var fieldName = colField || colId;
119
+ return _objectSpread(_objectSpread(_objectSpread({}, fieldName !== null ? getColumnFromField(fields.find(function (it) {
117
120
  return it.name === fieldName;
118
- }) || null) : null), otherProps);
121
+ }) || null) : null), otherProps), {}, {
122
+ id: colId
123
+ });
119
124
  }).filter(function (it) {
120
125
  return it !== null;
121
126
  }) : [];
package/lib/utils.js CHANGED
@@ -98,7 +98,7 @@ var getComponent = function getComponent(component) {
98
98
  };
99
99
  };
100
100
 
101
- var _excluded = ["field"];
101
+ var _excluded = ["id", "field"];
102
102
  var getColumnFromField = function getColumnFromField(field) {
103
103
  if (field === null) {
104
104
  return null;
@@ -129,12 +129,17 @@ var getColumnsWithFields = function getColumnsWithFields(resource, columns) {
129
129
  var _ref = isString__default["default"](column) ? {
130
130
  field: column
131
131
  } : column,
132
+ _ref$id = _ref.id,
133
+ colId = _ref$id === void 0 ? null : _ref$id,
132
134
  _ref$field = _ref.field,
133
- fieldName = _ref$field === void 0 ? null : _ref$field,
135
+ colField = _ref$field === void 0 ? null : _ref$field,
134
136
  otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
135
- return _objectSpread__default["default"](_objectSpread__default["default"]({}, fieldName !== null ? getColumnFromField(fields.find(function (it) {
137
+ var fieldName = colField || colId;
138
+ return _objectSpread__default["default"](_objectSpread__default["default"](_objectSpread__default["default"]({}, fieldName !== null ? getColumnFromField(fields.find(function (it) {
136
139
  return it.name === fieldName;
137
- }) || null) : null), otherProps);
140
+ }) || null) : null), otherProps), {}, {
141
+ id: colId
142
+ });
138
143
  }).filter(function (it) {
139
144
  return it !== null;
140
145
  }) : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/core",
3
- "version": "1.0.3-alpha.10",
3
+ "version": "1.0.3-alpha.12",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -114,5 +114,5 @@
114
114
  "publishConfig": {
115
115
  "access": "public"
116
116
  },
117
- "gitHead": "04abb6a702a77fd3f7370847c5e2bd366c56c62d"
117
+ "gitHead": "51252762b26926f5c830268a83eb6939aa507c96"
118
118
  }