@gpa-gemstone/react-table 1.2.63 → 1.2.65
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.
|
@@ -17,10 +17,6 @@ interface ITableProps<T> extends ReactTableProps.ITable<T> {
|
|
|
17
17
|
* The key used to store columns in local storage
|
|
18
18
|
*/
|
|
19
19
|
LocalStorageKey?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional flag to show helper alert for configuring table columns
|
|
22
|
-
*/
|
|
23
|
-
ShowColumnHelper?: boolean;
|
|
24
20
|
}
|
|
25
21
|
/**
|
|
26
22
|
* Table with modal to show and hide columns
|
|
@@ -35,7 +35,6 @@ const ConfigurableColumn_1 = require("./ConfigurableColumn");
|
|
|
35
35
|
* Table with modal to show and hide columns
|
|
36
36
|
*/
|
|
37
37
|
function ConfigurableTable(props) {
|
|
38
|
-
var _a;
|
|
39
38
|
const getKeyMappings = () => {
|
|
40
39
|
const u = new Map();
|
|
41
40
|
React.Children.forEach(props.children, (element) => {
|
|
@@ -60,7 +59,6 @@ function ConfigurableTable(props) {
|
|
|
60
59
|
const [hover, setHover] = React.useState(false);
|
|
61
60
|
const [guid] = React.useState((0, helper_functions_1.CreateGuid)());
|
|
62
61
|
const [widthDisabledAdd, setWidthDisabledAdd] = React.useState(false);
|
|
63
|
-
const [showHelperAlert, setShowHelperAlert] = React.useState(true);
|
|
64
62
|
const handleReduceWidthCallback = React.useCallback((hiddenKeys) => {
|
|
65
63
|
if (hiddenKeys.length !== 0) {
|
|
66
64
|
setWidthDisabledAdd(true);
|
|
@@ -127,7 +125,6 @@ function ConfigurableTable(props) {
|
|
|
127
125
|
return ((_a = c === null || c === void 0 ? void 0 : c.Default) !== null && _a !== void 0 ? _a : false) || isSort || isLocal;
|
|
128
126
|
}
|
|
129
127
|
return (React.createElement(React.Fragment, null,
|
|
130
|
-
((_a = props.ShowColumnHelper) !== null && _a !== void 0 ? _a : false) ? React.createElement(react_interactive_1.Alert, { AlertColor: "alert-info", Show: showHelperAlert, SetShow: setShowHelperAlert }, "Use the gear at the far right of the header row to choose columns to show or hide.") : null,
|
|
131
128
|
React.createElement(Table_1.Table, Object.assign({}, props, { LastColumn: React.createElement("div", { style: { marginLeft: -5, marginBottom: 12 }, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), id: guid + '-tooltip', onClick: () => setShowSettings(true) },
|
|
132
129
|
React.createElement(gpa_symbols_1.ReactIcons.Settings, null)), ReduceWidthCallback: handleReduceWidthCallback }), React.Children.map(props.children, (element) => {
|
|
133
130
|
var _a, _b;
|
|
@@ -188,5 +185,7 @@ function ColumnSelection(props) {
|
|
|
188
185
|
React.createElement("div", { className: "col-4" }, props.columns.map((c, i) => i % 3 == 2 ? (React.createElement(react_forms_1.CheckBox, { Label: c.Label, Field: 'Enabled', Record: c, Setter: () => props.onChange(c.Key), key: c.Key, Disabled: c.Key == props.sortKey || (props.disableAdd && !c.Enabled), Help: c.Key == props.sortKey
|
|
189
186
|
? 'The Table is currently sorted by this column so it cannot be hidden.'
|
|
190
187
|
: undefined })) : null))),
|
|
191
|
-
props.disableAdd ?
|
|
188
|
+
props.disableAdd ?
|
|
189
|
+
React.createElement(react_interactive_1.Alert, { Color: 'alert-primary', Style: { marginBottom: 0, marginTop: '0.5em' } }, "Additional columns disabled due to table size.")
|
|
190
|
+
: null));
|
|
192
191
|
}
|
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.65",
|
|
4
4
|
"description": "Table for GPA web applications",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"typescript": "5.5.3"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@gpa-gemstone/gpa-symbols": "0.0.
|
|
46
|
+
"@gpa-gemstone/gpa-symbols": "0.0.47",
|
|
47
47
|
"@gpa-gemstone/helper-functions": "0.0.37",
|
|
48
|
-
"@gpa-gemstone/react-interactive": "1.0.
|
|
48
|
+
"@gpa-gemstone/react-interactive": "1.0.143",
|
|
49
49
|
"@types/lodash": "^4.14.171",
|
|
50
50
|
"@types/react": "^17.0.14",
|
|
51
51
|
"lodash": "^4.17.21",
|