@gpa-gemstone/react-table 1.2.3 → 1.2.10
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/lib/SelectTable.js +10 -6
- package/lib/index.d.ts +2 -2
- package/package.json +5 -5
package/lib/SelectTable.js
CHANGED
|
@@ -32,10 +32,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
32
32
|
};
|
|
33
33
|
return __assign.apply(this, arguments);
|
|
34
34
|
};
|
|
35
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
36
|
-
for (var i = 0,
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
36
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
37
|
+
if (ar || !(i in from)) {
|
|
38
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
39
|
+
ar[i] = from[i];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
39
43
|
};
|
|
40
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
45
|
exports.SelectTable = void 0;
|
|
@@ -74,7 +78,7 @@ function SelectTable(props) {
|
|
|
74
78
|
function handleClick(d, event) {
|
|
75
79
|
var sIndex = selected.findIndex(function (item) { return item === d.row[props.KeyField]; });
|
|
76
80
|
if (sIndex === -1)
|
|
77
|
-
setSelected(function (od) { return __spreadArray(__spreadArray([], od), [d.row[props.KeyField]]); });
|
|
81
|
+
setSelected(function (od) { return __spreadArray(__spreadArray([], od, true), [d.row[props.KeyField]], false); });
|
|
78
82
|
else
|
|
79
83
|
setSelected(function (od) { return od.filter(function (item) { return item !== d.row[props.KeyField]; }); });
|
|
80
84
|
}
|
|
@@ -99,7 +103,7 @@ function SelectTable(props) {
|
|
|
99
103
|
React.createElement("i", { className: "fa fa-check-square-o fa-3x" }));
|
|
100
104
|
return null;
|
|
101
105
|
} }
|
|
102
|
-
], props.cols),
|
|
106
|
+
], props.cols, true),
|
|
103
107
|
data: data,
|
|
104
108
|
onClick: handleClick,
|
|
105
109
|
sortKey: sortKey,
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Table, { TableProps, Rows } from './Table';
|
|
1
|
+
import Table, { TableProps, Rows, Column } from './Table';
|
|
2
2
|
import { SelectTable, ISelectTableProps } from './SelectTable';
|
|
3
3
|
import { SearchableTable } from './SearchableTable';
|
|
4
4
|
import { DynamicTableProps, DynamicTable } from './DynamicTable';
|
|
5
|
-
export { TableProps, SelectTable, ISelectTableProps, SearchableTable, DynamicTable, DynamicTableProps, Rows };
|
|
5
|
+
export { TableProps, SelectTable, ISelectTableProps, SearchableTable, DynamicTable, DynamicTableProps, Rows, Column };
|
|
6
6
|
export default Table;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gpa-gemstone/react-table",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"description": "Table for GPA web applications",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/GridProtectionAlliance/gpa-gemstone#readme",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/jest": "^
|
|
39
|
+
"@types/jest": "^27.0.0",
|
|
40
40
|
"jest": "^27.0.6",
|
|
41
41
|
"prettier": "^2.3.2",
|
|
42
|
-
"ts-jest": "^27.0.
|
|
42
|
+
"ts-jest": "^27.0.4",
|
|
43
43
|
"tslint": "^6.1.3",
|
|
44
44
|
"tslint-config-prettier": "^1.18.0",
|
|
45
|
-
"typescript": "4.
|
|
45
|
+
"typescript": "4.4.4"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@gpa-gemstone/helper-functions": "0.0.
|
|
48
|
+
"@gpa-gemstone/helper-functions": "0.0.14",
|
|
49
49
|
"@types/lodash": "^4.14.171",
|
|
50
50
|
"@types/react": "^17.0.14",
|
|
51
51
|
"lodash": "^4.17.21",
|