@sb1/ffe-tables-react 8.0.21 → 8.0.22
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.
|
@@ -55,7 +55,8 @@ var DefaultTable = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
key: "renderTableHeaders",
|
|
56
56
|
value: function renderTableHeaders() {
|
|
57
57
|
var _this$props2 = this.props,
|
|
58
|
-
columns = _this$props2.columns,
|
|
58
|
+
_this$props2$columns = _this$props2.columns,
|
|
59
|
+
columns = _this$props2$columns === void 0 ? [] : _this$props2$columns,
|
|
59
60
|
headerRender = _this$props2.headerRender;
|
|
60
61
|
if (!columns.length) {
|
|
61
62
|
return null;
|
|
@@ -97,9 +98,12 @@ var DefaultTable = /*#__PURE__*/function (_Component) {
|
|
|
97
98
|
key: "getData",
|
|
98
99
|
value: function getData() {
|
|
99
100
|
var _this$props4 = this.props,
|
|
100
|
-
data = _this$props4.data,
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
_this$props4$data = _this$props4.data,
|
|
102
|
+
data = _this$props4$data === void 0 ? [] : _this$props4$data,
|
|
103
|
+
_this$props4$offset = _this$props4.offset,
|
|
104
|
+
offset = _this$props4$offset === void 0 ? 0 : _this$props4$offset,
|
|
105
|
+
_this$props4$limit = _this$props4.limit,
|
|
106
|
+
limit = _this$props4$limit === void 0 ? 0 : _this$props4$limit;
|
|
103
107
|
if (!offset && !limit) {
|
|
104
108
|
return data;
|
|
105
109
|
}
|
|
@@ -200,10 +204,4 @@ DefaultTable.propTypes = {
|
|
|
200
204
|
footerRender: PropTypes.func,
|
|
201
205
|
className: PropTypes.string
|
|
202
206
|
};
|
|
203
|
-
DefaultTable.defaultProps = {
|
|
204
|
-
columns: [],
|
|
205
|
-
data: [],
|
|
206
|
-
offset: 0,
|
|
207
|
-
limit: 0
|
|
208
|
-
};
|
|
209
207
|
export default DefaultTable;
|
|
@@ -28,7 +28,8 @@ var SortableTable = /*#__PURE__*/function (_Component) {
|
|
|
28
28
|
_classCallCheck(this, SortableTable);
|
|
29
29
|
_this = _callSuper(this, SortableTable, [props]);
|
|
30
30
|
_defineProperty(_this, "sort", function (columns, data, sortBy, descending) {
|
|
31
|
-
var onSort = _this.props.onSort
|
|
31
|
+
var _this$props$onSort = _this.props.onSort,
|
|
32
|
+
onSort = _this$props$onSort === void 0 ? function () {} : _this$props$onSort;
|
|
32
33
|
var tableData = sortData(columns, data, sortBy, descending);
|
|
33
34
|
onSort({
|
|
34
35
|
sortBy: sortBy,
|
|
@@ -41,7 +42,8 @@ var SortableTable = /*#__PURE__*/function (_Component) {
|
|
|
41
42
|
return sortBy ? _this.sort(columns, data, sortBy, descending) : data;
|
|
42
43
|
}));
|
|
43
44
|
var _sortBy = props.sortBy,
|
|
44
|
-
|
|
45
|
+
_props$descending = props.descending,
|
|
46
|
+
_descending = _props$descending === void 0 ? false : _props$descending;
|
|
45
47
|
_this.state = {
|
|
46
48
|
sortBy: _sortBy,
|
|
47
49
|
descending: _descending
|
|
@@ -196,8 +198,4 @@ SortableTable.propTypes = {
|
|
|
196
198
|
footerRender: PropTypes.func,
|
|
197
199
|
className: PropTypes.string
|
|
198
200
|
};
|
|
199
|
-
SortableTable.defaultProps = {
|
|
200
|
-
descending: false,
|
|
201
|
-
onSort: function onSort() {}
|
|
202
|
-
};
|
|
203
201
|
export default SortableTable;
|
|
@@ -64,7 +64,8 @@ var DefaultTable = /*#__PURE__*/function (_Component) {
|
|
|
64
64
|
key: "renderTableHeaders",
|
|
65
65
|
value: function renderTableHeaders() {
|
|
66
66
|
var _this$props2 = this.props,
|
|
67
|
-
columns = _this$props2.columns,
|
|
67
|
+
_this$props2$columns = _this$props2.columns,
|
|
68
|
+
columns = _this$props2$columns === void 0 ? [] : _this$props2$columns,
|
|
68
69
|
headerRender = _this$props2.headerRender;
|
|
69
70
|
if (!columns.length) {
|
|
70
71
|
return null;
|
|
@@ -106,9 +107,12 @@ var DefaultTable = /*#__PURE__*/function (_Component) {
|
|
|
106
107
|
key: "getData",
|
|
107
108
|
value: function getData() {
|
|
108
109
|
var _this$props4 = this.props,
|
|
109
|
-
data = _this$props4.data,
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
_this$props4$data = _this$props4.data,
|
|
111
|
+
data = _this$props4$data === void 0 ? [] : _this$props4$data,
|
|
112
|
+
_this$props4$offset = _this$props4.offset,
|
|
113
|
+
offset = _this$props4$offset === void 0 ? 0 : _this$props4$offset,
|
|
114
|
+
_this$props4$limit = _this$props4.limit,
|
|
115
|
+
limit = _this$props4$limit === void 0 ? 0 : _this$props4$limit;
|
|
112
116
|
if (!offset && !limit) {
|
|
113
117
|
return data;
|
|
114
118
|
}
|
|
@@ -209,10 +213,4 @@ DefaultTable.propTypes = {
|
|
|
209
213
|
footerRender: _propTypes.default.func,
|
|
210
214
|
className: _propTypes.default.string
|
|
211
215
|
};
|
|
212
|
-
DefaultTable.defaultProps = {
|
|
213
|
-
columns: [],
|
|
214
|
-
data: [],
|
|
215
|
-
offset: 0,
|
|
216
|
-
limit: 0
|
|
217
|
-
};
|
|
218
216
|
var _default = exports.default = DefaultTable;
|
|
@@ -37,7 +37,8 @@ var SortableTable = /*#__PURE__*/function (_Component) {
|
|
|
37
37
|
_classCallCheck(this, SortableTable);
|
|
38
38
|
_this = _callSuper(this, SortableTable, [props]);
|
|
39
39
|
_defineProperty(_this, "sort", function (columns, data, sortBy, descending) {
|
|
40
|
-
var onSort = _this.props.onSort
|
|
40
|
+
var _this$props$onSort = _this.props.onSort,
|
|
41
|
+
onSort = _this$props$onSort === void 0 ? function () {} : _this$props$onSort;
|
|
41
42
|
var tableData = (0, _sortData.default)(columns, data, sortBy, descending);
|
|
42
43
|
onSort({
|
|
43
44
|
sortBy: sortBy,
|
|
@@ -50,7 +51,8 @@ var SortableTable = /*#__PURE__*/function (_Component) {
|
|
|
50
51
|
return sortBy ? _this.sort(columns, data, sortBy, descending) : data;
|
|
51
52
|
}));
|
|
52
53
|
var _sortBy = props.sortBy,
|
|
53
|
-
|
|
54
|
+
_props$descending = props.descending,
|
|
55
|
+
_descending = _props$descending === void 0 ? false : _props$descending;
|
|
54
56
|
_this.state = {
|
|
55
57
|
sortBy: _sortBy,
|
|
56
58
|
descending: _descending
|
|
@@ -205,8 +207,4 @@ SortableTable.propTypes = {
|
|
|
205
207
|
footerRender: _propTypes.default.func,
|
|
206
208
|
className: _propTypes.default.string
|
|
207
209
|
};
|
|
208
|
-
SortableTable.defaultProps = {
|
|
209
|
-
descending: false,
|
|
210
|
-
onSort: function onSort() {}
|
|
211
|
-
};
|
|
212
210
|
var _default = exports.default = SortableTable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-tables-react",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.22",
|
|
4
4
|
"description": "React implementation of ffe-tables",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"test:watch": "ffe-buildtool jest --watch"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sb1/ffe-icons-react": "^9.0.
|
|
29
|
-
"@sb1/ffe-tables": "^14.0.
|
|
28
|
+
"@sb1/ffe-icons-react": "^9.0.8",
|
|
29
|
+
"@sb1/ffe-tables": "^14.0.12",
|
|
30
30
|
"classnames": "^2.3.1",
|
|
31
31
|
"deep-equal": "^1.0.1",
|
|
32
32
|
"memoize-one": "^5.0.0",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "c291894cefef43c0607f844862e87031452a0d94"
|
|
50
50
|
}
|