@insticc/react-datagrid-2 1.1.21 → 1.1.23
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/build/wrapper/ActionButton.js +67 -58
- package/build/wrapper/ColumnFilter.js +112 -86
- package/build/wrapper/ExportActions.js +35 -27
- package/build/wrapper/index.js +275 -244
- package/build/wrapper/utils/DefaultCellTypes.js +56 -38
- package/build/wrapper/utils/GridHelper.js +15 -6
- package/build/wrapper/utils/filters.js +17 -6
- package/package.json +1 -1
|
@@ -9,17 +9,21 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _semanticUiReact = require("semantic-ui-react");
|
|
11
11
|
var _material = require("@mui/material");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
-
function
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
21
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
17
22
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
23
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
19
24
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20
25
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
21
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
22
|
-
/**
|
|
26
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /**
|
|
23
27
|
* Renders the action button icon.
|
|
24
28
|
* If `icon` is a string, it will render it as an image.
|
|
25
29
|
* Otherwise, it will render the provided React element.
|
|
@@ -27,7 +31,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
27
31
|
*/
|
|
28
32
|
var renderIcon = exports.renderIcon = function renderIcon(icon, name) {
|
|
29
33
|
if (typeof icon === 'string') {
|
|
30
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
31
35
|
src: icon,
|
|
32
36
|
alt: name,
|
|
33
37
|
height: 15,
|
|
@@ -128,60 +132,65 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
128
132
|
});
|
|
129
133
|
}
|
|
130
134
|
};
|
|
131
|
-
return /*#__PURE__*/
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
size: "
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
135
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react["default"].Fragment, {
|
|
136
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
137
|
+
title: tooltip || name,
|
|
138
|
+
arrow: true,
|
|
139
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
140
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, _objectSpread(_objectSpread({
|
|
141
|
+
toggle: toggle,
|
|
142
|
+
active: active,
|
|
143
|
+
disabled: disabled || shouldDisableActionButton(table),
|
|
144
|
+
onClick: function onClick() {
|
|
145
|
+
return hasConfirmMessage ? setEnableConfirmMessage(true) : handleConfirm();
|
|
146
|
+
},
|
|
147
|
+
icon: renderIcon(icon, name)
|
|
148
|
+
}, name ? {
|
|
149
|
+
content: name
|
|
150
|
+
} : {}), {}, {
|
|
151
|
+
basic: !active,
|
|
152
|
+
color: color,
|
|
153
|
+
style: {
|
|
154
|
+
display: 'flex',
|
|
155
|
+
height: '40px',
|
|
156
|
+
alignItems: 'center',
|
|
157
|
+
justifyContent: 'center'
|
|
158
|
+
}
|
|
159
|
+
}))
|
|
160
|
+
})
|
|
161
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Confirm, {
|
|
162
|
+
style: {
|
|
163
|
+
height: 'fit-content',
|
|
164
|
+
textAlign: 'center',
|
|
165
|
+
top: 'auto',
|
|
166
|
+
right: 'auto',
|
|
167
|
+
left: 'auto',
|
|
168
|
+
bottom: 'auto',
|
|
169
|
+
fontSize: '14px'
|
|
170
|
+
},
|
|
171
|
+
open: enableConfirmMessage,
|
|
172
|
+
size: "mini",
|
|
173
|
+
content: confirmMessage,
|
|
174
|
+
cancelButton: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
175
|
+
content: "No",
|
|
176
|
+
size: "small",
|
|
177
|
+
color: "red",
|
|
178
|
+
icon: "cancel"
|
|
179
|
+
}),
|
|
180
|
+
confirmButton: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
181
|
+
content: "Yes",
|
|
182
|
+
size: "small",
|
|
183
|
+
color: "green",
|
|
184
|
+
icon: "check"
|
|
185
|
+
}),
|
|
186
|
+
onCancel: function onCancel() {
|
|
187
|
+
return setEnableConfirmMessage(false);
|
|
188
|
+
},
|
|
189
|
+
onConfirm: function onConfirm() {
|
|
190
|
+
return handleConfirm();
|
|
191
|
+
}
|
|
192
|
+
})]
|
|
193
|
+
});
|
|
185
194
|
};
|
|
186
195
|
ActionButton.propTypes = {
|
|
187
196
|
table: _propTypes["default"].object.isRequired,
|
|
@@ -9,97 +9,123 @@ var _material = require("@mui/material");
|
|
|
9
9
|
var _semanticUiReact = require("semantic-ui-react");
|
|
10
10
|
var _reactBootstrap = require("react-bootstrap");
|
|
11
11
|
var _filters = require("./utils/filters");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
14
|
var ColumnFilter = function ColumnFilter(props) {
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
-
|
|
16
|
-
onClick: function onClick() {
|
|
17
|
-
return props.onSelectFilterMode('regex');
|
|
18
|
-
}
|
|
19
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
|
-
style: {
|
|
21
|
-
display: 'flex',
|
|
22
|
-
justifyContent: 'space-between',
|
|
23
|
-
width: '100%'
|
|
24
|
-
}
|
|
25
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
|
-
style: {
|
|
27
|
-
display: 'flex',
|
|
28
|
-
gap: '5px'
|
|
29
|
-
}
|
|
30
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
31
|
-
style: {
|
|
32
|
-
minWidth: '36px'
|
|
33
|
-
}
|
|
34
|
-
}, /*#__PURE__*/_react["default"].createElement("b", null, "(.*)")), /*#__PURE__*/_react["default"].createElement("span", null, "Regex")), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.OverlayTrigger, {
|
|
35
|
-
placement: "right-start",
|
|
36
|
-
key: "regex-tooltip",
|
|
37
|
-
overlay: /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Tooltip, {
|
|
38
|
-
id: "tooltip-regex",
|
|
39
|
-
style: {
|
|
40
|
-
zIndex: 99999
|
|
41
|
-
}
|
|
42
|
-
}, _filters.regexFilterTooltip)
|
|
43
|
-
}, /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Icon, {
|
|
44
|
-
name: "info circle",
|
|
45
|
-
fitted: true
|
|
46
|
-
})))), /*#__PURE__*/_react["default"].createElement(_material.MenuItem, {
|
|
47
|
-
key: "logical",
|
|
48
|
-
onClick: function onClick() {
|
|
49
|
-
return props.onSelectFilterMode('logical');
|
|
50
|
-
}
|
|
51
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
|
-
style: {
|
|
53
|
-
display: 'flex',
|
|
54
|
-
justifyContent: 'space-between',
|
|
55
|
-
width: '100%'
|
|
56
|
-
}
|
|
57
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
|
-
style: {
|
|
59
|
-
display: 'flex',
|
|
60
|
-
gap: '5px'
|
|
61
|
-
}
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
63
|
-
style: {
|
|
64
|
-
minWidth: '36px'
|
|
65
|
-
}
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement("b", null, "\u03A8")), /*#__PURE__*/_react["default"].createElement("span", null, "Logical")), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.OverlayTrigger, {
|
|
67
|
-
placement: "right-start",
|
|
68
|
-
key: "logical-tooltip",
|
|
69
|
-
overlay: /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Tooltip, {
|
|
70
|
-
id: "tooltip-logical",
|
|
71
|
-
style: {
|
|
72
|
-
zIndex: 99999
|
|
73
|
-
}
|
|
74
|
-
}, _filters.logicalFilterTooltip)
|
|
75
|
-
}, /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Icon, {
|
|
76
|
-
name: "info circle",
|
|
77
|
-
fitted: true
|
|
78
|
-
})))), /*#__PURE__*/_react["default"].createElement(_material.Divider, {
|
|
79
|
-
style: {
|
|
80
|
-
borderColor: 'rgba(0, 0, 0, 0.51)'
|
|
81
|
-
}
|
|
82
|
-
}), props.filterOptions.map(function (filter, index) {
|
|
83
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
-
key: filter.option
|
|
85
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.MenuItem, {
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
16
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
86
17
|
onClick: function onClick() {
|
|
87
|
-
return props.onSelectFilterMode(
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
18
|
+
return props.onSelectFilterMode('regex');
|
|
19
|
+
},
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
+
style: {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
justifyContent: 'space-between',
|
|
24
|
+
width: '100%'
|
|
25
|
+
},
|
|
26
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
27
|
+
style: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
gap: '5px'
|
|
30
|
+
},
|
|
31
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
32
|
+
style: {
|
|
33
|
+
minWidth: '36px'
|
|
34
|
+
},
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
|
|
36
|
+
children: "(.*)"
|
|
37
|
+
})
|
|
38
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
39
|
+
children: "Regex"
|
|
40
|
+
})]
|
|
41
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.OverlayTrigger, {
|
|
42
|
+
placement: "right-start",
|
|
43
|
+
overlay: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Tooltip, {
|
|
44
|
+
id: "tooltip-regex",
|
|
45
|
+
style: {
|
|
46
|
+
zIndex: 99999
|
|
47
|
+
},
|
|
48
|
+
children: _filters.regexFilterTooltip
|
|
49
|
+
}),
|
|
50
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
51
|
+
name: "info circle",
|
|
52
|
+
fitted: true
|
|
53
|
+
})
|
|
54
|
+
}, 'regex-tooltip')]
|
|
55
|
+
})
|
|
56
|
+
}, "regex"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
57
|
+
onClick: function onClick() {
|
|
58
|
+
return props.onSelectFilterMode('logical');
|
|
59
|
+
},
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
61
|
+
style: {
|
|
62
|
+
display: 'flex',
|
|
63
|
+
justifyContent: 'space-between',
|
|
64
|
+
width: '100%'
|
|
65
|
+
},
|
|
66
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
67
|
+
style: {
|
|
68
|
+
display: 'flex',
|
|
69
|
+
gap: '5px'
|
|
70
|
+
},
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
|
+
style: {
|
|
73
|
+
minWidth: '36px'
|
|
74
|
+
},
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
|
|
76
|
+
children: "\u03A8"
|
|
77
|
+
})
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
79
|
+
children: "Logical"
|
|
80
|
+
})]
|
|
81
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.OverlayTrigger, {
|
|
82
|
+
placement: "right-start",
|
|
83
|
+
overlay: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Tooltip, {
|
|
84
|
+
id: "tooltip-logical",
|
|
85
|
+
style: {
|
|
86
|
+
zIndex: 99999
|
|
87
|
+
},
|
|
88
|
+
children: _filters.logicalFilterTooltip
|
|
89
|
+
}),
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
91
|
+
name: "info circle",
|
|
92
|
+
fitted: true
|
|
93
|
+
})
|
|
94
|
+
}, 'logical-tooltip')]
|
|
95
|
+
})
|
|
96
|
+
}, "logical"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Divider, {
|
|
99
97
|
style: {
|
|
100
98
|
borderColor: 'rgba(0, 0, 0, 0.51)'
|
|
101
99
|
}
|
|
102
|
-
}))
|
|
103
|
-
|
|
100
|
+
}), props.filterOptions.map(function (filter, index) {
|
|
101
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
102
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
return props.onSelectFilterMode(filter.option);
|
|
105
|
+
},
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
107
|
+
style: {
|
|
108
|
+
display: 'flex',
|
|
109
|
+
gap: '5px'
|
|
110
|
+
},
|
|
111
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
112
|
+
style: {
|
|
113
|
+
minWidth: '36px'
|
|
114
|
+
},
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
|
|
116
|
+
children: filter.symbol
|
|
117
|
+
})
|
|
118
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
119
|
+
children: filter.label
|
|
120
|
+
})]
|
|
121
|
+
})
|
|
122
|
+
}), filter.divider && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Divider, {
|
|
123
|
+
style: {
|
|
124
|
+
borderColor: 'rgba(0, 0, 0, 0.51)'
|
|
125
|
+
}
|
|
126
|
+
})]
|
|
127
|
+
}, filter.option);
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
104
130
|
};
|
|
105
131
|
var _default = exports["default"] = ColumnFilter;
|
|
@@ -11,6 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var XLSX = _interopRequireWildcard(require("xlsx"));
|
|
12
12
|
var _jspdf = require("jspdf");
|
|
13
13
|
var _jspdfAutotable = _interopRequireDefault(require("jspdf-autotable"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -68,37 +69,44 @@ var ExportActions = function ExportActions(props) {
|
|
|
68
69
|
});
|
|
69
70
|
doc.save("".concat(fileName, ".pdf"));
|
|
70
71
|
};
|
|
71
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72
73
|
style: {
|
|
73
74
|
display: 'flex',
|
|
74
75
|
flexDirection: 'row',
|
|
75
76
|
gap: '.5em'
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
77
|
+
},
|
|
78
|
+
children: [props.hasExcelExport && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
79
|
+
title: "Export All Data to Excel",
|
|
80
|
+
arrow: true,
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
82
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
83
|
+
circular: true,
|
|
84
|
+
onClick: handleExcelExportData,
|
|
85
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
86
|
+
name: "file excel"
|
|
87
|
+
}),
|
|
88
|
+
content: "Export All Data",
|
|
89
|
+
inverted: true,
|
|
90
|
+
color: "green"
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
}), props.hasPdfExport && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
94
|
+
title: "Export All Data to PDF",
|
|
95
|
+
arrow: true,
|
|
96
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
97
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
98
|
+
circular: true,
|
|
99
|
+
onClick: handlePdfExportData,
|
|
100
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
101
|
+
name: "file pdf"
|
|
102
|
+
}),
|
|
103
|
+
content: "Export All Data",
|
|
104
|
+
inverted: true,
|
|
105
|
+
color: "red"
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
102
110
|
};
|
|
103
111
|
ExportActions.propTypes = {
|
|
104
112
|
hasExcelExport: _propTypes["default"].bool.isRequired,
|
package/build/wrapper/index.js
CHANGED
|
@@ -22,10 +22,10 @@ require("bootstrap/dist/css/bootstrap.min.css");
|
|
|
22
22
|
require("semantic-ui-css/semantic.min.css");
|
|
23
23
|
require("./styles/styles.css");
|
|
24
24
|
var _DefaultCellTypes = require("./utils/DefaultCellTypes");
|
|
25
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
26
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
28
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
29
29
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -259,12 +259,13 @@ var DataGrid = function DataGrid(_ref) {
|
|
|
259
259
|
var typeFn = type ? _DefaultCellTypes.DEFAULT_CELL_TYPES[type] : null;
|
|
260
260
|
var typeValue = typeof typeFn === "function" ? typeFn(props) : null;
|
|
261
261
|
if (typeValue) content = typeValue;
|
|
262
|
-
if (CustomCell) content = /*#__PURE__*/
|
|
262
|
+
if (CustomCell) content = /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomCell, _objectSpread(_objectSpread({}, props), {}, {
|
|
263
263
|
typeValue: typeValue
|
|
264
264
|
}));
|
|
265
|
-
if (cellClass) content = /*#__PURE__*/
|
|
266
|
-
className: cellClass
|
|
267
|
-
|
|
265
|
+
if (cellClass) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
266
|
+
className: cellClass,
|
|
267
|
+
children: content
|
|
268
|
+
});
|
|
268
269
|
return content;
|
|
269
270
|
}
|
|
270
271
|
});
|
|
@@ -273,173 +274,194 @@ var DataGrid = function DataGrid(_ref) {
|
|
|
273
274
|
var renderTopToolbarCustomActions = function renderTopToolbarCustomActions(_ref2) {
|
|
274
275
|
var table = _ref2.table;
|
|
275
276
|
var selectedRows = table.getSelectedRowModel().flatRows;
|
|
276
|
-
return /*#__PURE__*/
|
|
277
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
277
278
|
style: {
|
|
278
279
|
display: 'flex',
|
|
279
280
|
flexDirection: 'column',
|
|
280
281
|
gap: '.5em',
|
|
281
282
|
width: '100%'
|
|
282
|
-
}
|
|
283
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
284
|
-
style: {
|
|
285
|
-
display: 'flex',
|
|
286
|
-
justifyContent: 'space-between'
|
|
287
|
-
}
|
|
288
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
289
|
-
style: {
|
|
290
|
-
display: 'flex',
|
|
291
|
-
flexDirection: 'row',
|
|
292
|
-
gap: '.5em',
|
|
293
|
-
flexWrap: 'wrap'
|
|
294
|
-
}
|
|
295
|
-
}, (actions === null || actions === void 0 ? void 0 : actions.length) > 0 && actions.map(function (e) {
|
|
296
|
-
var isVisible = e.visible !== undefined ? e.visible : true;
|
|
297
|
-
if (isVisible) {
|
|
298
|
-
return /*#__PURE__*/_react["default"].createElement(_ActionButton["default"], {
|
|
299
|
-
table: table,
|
|
300
|
-
key: e.key || e.name,
|
|
301
|
-
toggle: e.toggle,
|
|
302
|
-
active: e.active,
|
|
303
|
-
name: e.name,
|
|
304
|
-
tooltip: e.tooltip,
|
|
305
|
-
onClick: e["function"],
|
|
306
|
-
icon: e.icon,
|
|
307
|
-
color: e.color,
|
|
308
|
-
selectionMode: e.selectionMode,
|
|
309
|
-
confirmMessage: e.confirmMessage,
|
|
310
|
-
hasConfirmMessage: e.hasConfirmMessage,
|
|
311
|
-
disabled: e.disabled
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
})), !disableSideActions && /*#__PURE__*/_react["default"].createElement("div", {
|
|
315
|
-
style: {
|
|
316
|
-
display: 'flex',
|
|
317
|
-
alignSelf: 'flex-end',
|
|
318
|
-
justifyContent: 'end',
|
|
319
|
-
flexDirection: 'row',
|
|
320
|
-
flexWrap: 'wrap',
|
|
321
|
-
gap: 3
|
|
322
|
-
}
|
|
323
|
-
}, (extraActions === null || extraActions === void 0 ? void 0 : extraActions.length) > 0 && extraActions.map(function (a, idx) {
|
|
324
|
-
var _ref3 = a || {},
|
|
325
|
-
fnc = _ref3["function"],
|
|
326
|
-
content = _ref3.content,
|
|
327
|
-
_ref3$tooltip = _ref3.tooltip,
|
|
328
|
-
tooltip = _ref3$tooltip === void 0 ? '' : _ref3$tooltip,
|
|
329
|
-
icon = _ref3.icon,
|
|
330
|
-
_ref3$style = _ref3.style,
|
|
331
|
-
style = _ref3$style === void 0 ? {} : _ref3$style,
|
|
332
|
-
propsButton = _ref3.propsButton;
|
|
333
|
-
var defaultStyle = {
|
|
334
|
-
display: 'flex',
|
|
335
|
-
height: '36px',
|
|
336
|
-
alignItems: 'center',
|
|
337
|
-
justifyContent: 'center'
|
|
338
|
-
};
|
|
339
|
-
return /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
|
|
340
|
-
key: "extraActions" + idx,
|
|
341
|
-
title: tooltip || content,
|
|
342
|
-
arrow: true
|
|
343
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Button, _extends({
|
|
344
|
-
circular: true,
|
|
345
|
-
onClick: function onClick() {
|
|
346
|
-
return fnc ? fnc() : {};
|
|
347
|
-
},
|
|
348
|
-
content: content,
|
|
349
|
-
icon: (0, _ActionButton.renderIcon)(icon, tooltip || content),
|
|
350
|
-
style: _objectSpread(_objectSpread({}, defaultStyle), style)
|
|
351
|
-
}, propsButton))));
|
|
352
|
-
}), /*#__PURE__*/_react["default"].createElement(_ExportActions["default"], {
|
|
353
|
-
table: table,
|
|
354
|
-
data: createRows,
|
|
355
|
-
columns: columns,
|
|
356
|
-
hasExcelExport: hasExcelExport,
|
|
357
|
-
hasPdfExport: hasPdfExport
|
|
358
|
-
}), updateCache && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
|
|
359
|
-
title: cacheUpdateText,
|
|
360
|
-
arrow: true
|
|
361
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Button, {
|
|
362
|
-
circular: true,
|
|
363
|
-
disabled: cacheUpdating,
|
|
364
|
-
onClick: function onClick() {
|
|
365
|
-
return updateCache();
|
|
366
|
-
},
|
|
367
|
-
content: /*#__PURE__*/_react["default"].createElement("img", {
|
|
368
|
-
src: cacheUpdating ? require('./images/cacheloading.png') : require('./images/cache.png'),
|
|
369
|
-
alt: "cache",
|
|
370
|
-
style: {
|
|
371
|
-
width: "60px"
|
|
372
|
-
}
|
|
373
|
-
}),
|
|
374
|
-
primary: true,
|
|
375
|
-
inverted: true,
|
|
376
|
-
style: {
|
|
377
|
-
display: 'flex',
|
|
378
|
-
height: '36px',
|
|
379
|
-
alignItems: 'center',
|
|
380
|
-
justifyContent: 'center'
|
|
381
|
-
}
|
|
382
|
-
}))), hasClearSelectionBtn && (!disableSelect || disableRows.length > 0) && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
|
|
383
|
-
title: "Clear all rows selected",
|
|
384
|
-
arrow: true
|
|
385
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Button, {
|
|
386
|
-
circular: true,
|
|
387
|
-
disabled: selectedRows.length < 1,
|
|
388
|
-
onClick: function onClick() {
|
|
389
|
-
return table.resetRowSelection();
|
|
390
283
|
},
|
|
391
|
-
|
|
392
|
-
style: {
|
|
393
|
-
margin: 0,
|
|
394
|
-
color: 'inherit'
|
|
395
|
-
},
|
|
396
|
-
name: "square outline"
|
|
397
|
-
}), /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Icon, {
|
|
398
|
-
style: {
|
|
399
|
-
margin: 0,
|
|
400
|
-
color: 'inherit'
|
|
401
|
-
},
|
|
402
|
-
name: "close"
|
|
403
|
-
})),
|
|
404
|
-
primary: true,
|
|
405
|
-
basic: true
|
|
406
|
-
// style={{ display: 'flex', height: '40px', alignItems: 'center', justifyContent: 'center' }}
|
|
407
|
-
}))), hasClearFiltersBtn && /*#__PURE__*/_react["default"].createElement(_material.Tooltip, {
|
|
408
|
-
title: "Clear Filters",
|
|
409
|
-
arrow: true
|
|
410
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Button, {
|
|
411
|
-
circular: true,
|
|
412
|
-
onClick: function onClick() {
|
|
413
|
-
return table.resetColumnFilters();
|
|
414
|
-
},
|
|
415
|
-
content: /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Icon, {
|
|
416
|
-
style: {
|
|
417
|
-
margin: 0,
|
|
418
|
-
color: 'inherit'
|
|
419
|
-
},
|
|
420
|
-
name: "filter"
|
|
421
|
-
}), /*#__PURE__*/_react["default"].createElement(_semanticUiReact.Icon, {
|
|
284
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
422
285
|
style: {
|
|
423
|
-
|
|
424
|
-
|
|
286
|
+
display: 'flex',
|
|
287
|
+
justifyContent: 'space-between'
|
|
425
288
|
},
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
289
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
290
|
+
style: {
|
|
291
|
+
display: 'flex',
|
|
292
|
+
flexDirection: 'row',
|
|
293
|
+
gap: '.5em',
|
|
294
|
+
flexWrap: 'wrap'
|
|
295
|
+
},
|
|
296
|
+
children: (actions === null || actions === void 0 ? void 0 : actions.length) > 0 && actions.map(function (e) {
|
|
297
|
+
var isVisible = e.visible !== undefined ? e.visible : true;
|
|
298
|
+
if (isVisible) {
|
|
299
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionButton["default"], {
|
|
300
|
+
table: table,
|
|
301
|
+
toggle: e.toggle,
|
|
302
|
+
active: e.active,
|
|
303
|
+
name: e.name,
|
|
304
|
+
tooltip: e.tooltip,
|
|
305
|
+
onClick: e["function"],
|
|
306
|
+
icon: e.icon,
|
|
307
|
+
color: e.color,
|
|
308
|
+
selectionMode: e.selectionMode,
|
|
309
|
+
confirmMessage: e.confirmMessage,
|
|
310
|
+
hasConfirmMessage: e.hasConfirmMessage,
|
|
311
|
+
disabled: e.disabled
|
|
312
|
+
}, e.key || e.name);
|
|
313
|
+
}
|
|
314
|
+
})
|
|
315
|
+
}), !disableSideActions && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
316
|
+
style: {
|
|
317
|
+
display: 'flex',
|
|
318
|
+
alignSelf: 'flex-end',
|
|
319
|
+
justifyContent: 'end',
|
|
320
|
+
flexDirection: 'row',
|
|
321
|
+
flexWrap: 'wrap',
|
|
322
|
+
gap: 3
|
|
323
|
+
},
|
|
324
|
+
children: [(extraActions === null || extraActions === void 0 ? void 0 : extraActions.length) > 0 && extraActions.map(function (a, idx) {
|
|
325
|
+
var _ref3 = a || {},
|
|
326
|
+
fnc = _ref3["function"],
|
|
327
|
+
content = _ref3.content,
|
|
328
|
+
_ref3$tooltip = _ref3.tooltip,
|
|
329
|
+
tooltip = _ref3$tooltip === void 0 ? '' : _ref3$tooltip,
|
|
330
|
+
icon = _ref3.icon,
|
|
331
|
+
_ref3$style = _ref3.style,
|
|
332
|
+
style = _ref3$style === void 0 ? {} : _ref3$style,
|
|
333
|
+
propsButton = _ref3.propsButton;
|
|
334
|
+
var defaultStyle = {
|
|
335
|
+
display: 'flex',
|
|
336
|
+
height: '36px',
|
|
337
|
+
alignItems: 'center',
|
|
338
|
+
justifyContent: 'center'
|
|
339
|
+
};
|
|
340
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
341
|
+
title: tooltip || content,
|
|
342
|
+
arrow: true,
|
|
343
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
344
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, _objectSpread({
|
|
345
|
+
circular: true,
|
|
346
|
+
onClick: function onClick() {
|
|
347
|
+
return fnc ? fnc() : {};
|
|
348
|
+
},
|
|
349
|
+
content: content,
|
|
350
|
+
icon: (0, _ActionButton.renderIcon)(icon, tooltip || content),
|
|
351
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), style)
|
|
352
|
+
}, propsButton))
|
|
353
|
+
})
|
|
354
|
+
}, "extraActions" + idx);
|
|
355
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExportActions["default"], {
|
|
356
|
+
table: table,
|
|
357
|
+
data: createRows,
|
|
358
|
+
columns: columns,
|
|
359
|
+
hasExcelExport: hasExcelExport,
|
|
360
|
+
hasPdfExport: hasPdfExport
|
|
361
|
+
}), updateCache && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
362
|
+
title: cacheUpdateText,
|
|
363
|
+
arrow: true,
|
|
364
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
365
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
366
|
+
circular: true,
|
|
367
|
+
disabled: cacheUpdating,
|
|
368
|
+
onClick: function onClick() {
|
|
369
|
+
return updateCache();
|
|
370
|
+
},
|
|
371
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
372
|
+
src: cacheUpdating ? require('./images/cacheloading.png') : require('./images/cache.png'),
|
|
373
|
+
alt: "cache",
|
|
374
|
+
style: {
|
|
375
|
+
width: "60px"
|
|
376
|
+
}
|
|
377
|
+
}),
|
|
378
|
+
primary: true,
|
|
379
|
+
inverted: true,
|
|
380
|
+
style: {
|
|
381
|
+
display: 'flex',
|
|
382
|
+
height: '36px',
|
|
383
|
+
alignItems: 'center',
|
|
384
|
+
justifyContent: 'center'
|
|
385
|
+
}
|
|
386
|
+
})
|
|
387
|
+
})
|
|
388
|
+
}), hasClearSelectionBtn && (!disableSelect || disableRows.length > 0) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
389
|
+
title: "Clear all rows selected",
|
|
390
|
+
arrow: true,
|
|
391
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
392
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
393
|
+
circular: true,
|
|
394
|
+
disabled: selectedRows.length < 1,
|
|
395
|
+
onClick: function onClick() {
|
|
396
|
+
return table.resetRowSelection();
|
|
397
|
+
},
|
|
398
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
399
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
400
|
+
style: {
|
|
401
|
+
margin: 0,
|
|
402
|
+
color: 'inherit'
|
|
403
|
+
},
|
|
404
|
+
name: "square outline"
|
|
405
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
406
|
+
style: {
|
|
407
|
+
margin: 0,
|
|
408
|
+
color: 'inherit'
|
|
409
|
+
},
|
|
410
|
+
name: "close"
|
|
411
|
+
})]
|
|
412
|
+
}),
|
|
413
|
+
primary: true,
|
|
414
|
+
basic: true
|
|
415
|
+
// style={{ display: 'flex', height: '40px', alignItems: 'center', justifyContent: 'center' }}
|
|
416
|
+
})
|
|
417
|
+
})
|
|
418
|
+
}), hasClearFiltersBtn && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
419
|
+
title: "Clear Filters",
|
|
420
|
+
arrow: true,
|
|
421
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
422
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
423
|
+
circular: true,
|
|
424
|
+
onClick: function onClick() {
|
|
425
|
+
return table.resetColumnFilters();
|
|
426
|
+
},
|
|
427
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
428
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
429
|
+
style: {
|
|
430
|
+
margin: 0,
|
|
431
|
+
color: 'inherit'
|
|
432
|
+
},
|
|
433
|
+
name: "filter"
|
|
434
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Icon, {
|
|
435
|
+
style: {
|
|
436
|
+
margin: 0,
|
|
437
|
+
color: 'inherit'
|
|
438
|
+
},
|
|
439
|
+
name: "close"
|
|
440
|
+
})]
|
|
441
|
+
}),
|
|
442
|
+
inverted: true,
|
|
443
|
+
color: "orange"
|
|
444
|
+
// style={{ display: 'flex', height: '40px', alignItems: 'center', justifyContent: 'center' }}
|
|
445
|
+
})
|
|
446
|
+
})
|
|
447
|
+
}), gridHelper && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
448
|
+
title: "Grid Help",
|
|
449
|
+
arrow: true,
|
|
450
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
451
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
452
|
+
circular: true,
|
|
453
|
+
onClick: function onClick() {
|
|
454
|
+
return setOpen(true);
|
|
455
|
+
},
|
|
456
|
+
icon: "help",
|
|
457
|
+
color: "blue"
|
|
458
|
+
// style={{ display: 'flex', height: '40px', alignItems: 'center', justifyContent: 'center' }}
|
|
459
|
+
})
|
|
460
|
+
})
|
|
461
|
+
})]
|
|
462
|
+
})]
|
|
463
|
+
})
|
|
464
|
+
});
|
|
443
465
|
};
|
|
444
466
|
|
|
445
467
|
/**
|
|
@@ -523,11 +545,10 @@ var DataGrid = function DataGrid(_ref) {
|
|
|
523
545
|
renderColumnFilterModeMenuItems: function renderColumnFilterModeMenuItems(_ref4) {
|
|
524
546
|
var internalFilterOptions = _ref4.internalFilterOptions,
|
|
525
547
|
onSelectFilterMode = _ref4.onSelectFilterMode;
|
|
526
|
-
return [/*#__PURE__*/
|
|
527
|
-
key: "filters",
|
|
548
|
+
return [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ColumnFilter["default"], {
|
|
528
549
|
filterOptions: internalFilterOptions,
|
|
529
550
|
onSelectFilterMode: onSelectFilterMode
|
|
530
|
-
})];
|
|
551
|
+
}, "filters")];
|
|
531
552
|
},
|
|
532
553
|
renderTopToolbar: function renderTopToolbar(_ref5) {
|
|
533
554
|
var table = _ref5.table;
|
|
@@ -536,77 +557,85 @@ var DataGrid = function DataGrid(_ref) {
|
|
|
536
557
|
pageIndex = _table$getState$pagin.pageIndex,
|
|
537
558
|
pageSize = _table$getState$pagin.pageSize;
|
|
538
559
|
var filteredRowCount = table.getFilteredRowModel().rows.length;
|
|
539
|
-
return /*#__PURE__*/
|
|
560
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
540
561
|
style: {
|
|
541
562
|
display: 'flex',
|
|
542
563
|
flexDirection: 'column',
|
|
543
564
|
padding: '8px',
|
|
544
565
|
gap: '8px'
|
|
545
566
|
},
|
|
546
|
-
className: "grid-sticky-actions"
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}
|
|
551
|
-
}, renderTopToolbarCustomActions({
|
|
552
|
-
table: table
|
|
553
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
554
|
-
style: {
|
|
555
|
-
display: 'flex',
|
|
556
|
-
alignItems: 'center',
|
|
557
|
-
gap: '8px',
|
|
558
|
-
alignSelf: 'flex-end'
|
|
559
|
-
}
|
|
560
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.Stack, {
|
|
561
|
-
direction: "row",
|
|
562
|
-
alignItems: "center",
|
|
563
|
-
justifyContent: "space-between"
|
|
564
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.TablePagination, {
|
|
565
|
-
component: "div",
|
|
566
|
-
count: filteredRowCount,
|
|
567
|
-
page: 0,
|
|
568
|
-
onPageChange: function onPageChange() {},
|
|
569
|
-
rowsPerPage: pageSize,
|
|
570
|
-
onRowsPerPageChange: function onRowsPerPageChange(e) {
|
|
571
|
-
return table.setPageSize(Number(e.target.value));
|
|
572
|
-
},
|
|
573
|
-
rowsPerPageOptions: itemsPerPage,
|
|
574
|
-
labelDisplayedRows: function labelDisplayedRows() {
|
|
575
|
-
return "";
|
|
576
|
-
},
|
|
577
|
-
showFirstButton: false,
|
|
578
|
-
showLastButton: false,
|
|
579
|
-
sx: {
|
|
580
|
-
'& .MuiTablePagination-toolbar': {
|
|
581
|
-
padding: 0,
|
|
582
|
-
margin: 0,
|
|
583
|
-
gap: '4px'
|
|
567
|
+
className: "grid-sticky-actions",
|
|
568
|
+
children: [!disableAllActions && renderTopToolbarCustomActions && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
569
|
+
style: {
|
|
570
|
+
width: '100%'
|
|
584
571
|
},
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
572
|
+
children: renderTopToolbarCustomActions({
|
|
573
|
+
table: table
|
|
574
|
+
})
|
|
575
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
576
|
+
style: {
|
|
577
|
+
display: 'flex',
|
|
578
|
+
alignItems: 'center',
|
|
579
|
+
gap: '8px',
|
|
580
|
+
alignSelf: 'flex-end'
|
|
588
581
|
},
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
582
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
583
|
+
direction: "row",
|
|
584
|
+
alignItems: "center",
|
|
585
|
+
justifyContent: "space-between",
|
|
586
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TablePagination, {
|
|
587
|
+
component: "div",
|
|
588
|
+
count: filteredRowCount,
|
|
589
|
+
page: 0,
|
|
590
|
+
onPageChange: function onPageChange() {},
|
|
591
|
+
rowsPerPage: pageSize,
|
|
592
|
+
onRowsPerPageChange: function onRowsPerPageChange(e) {
|
|
593
|
+
return table.setPageSize(Number(e.target.value));
|
|
594
|
+
},
|
|
595
|
+
rowsPerPageOptions: itemsPerPage,
|
|
596
|
+
labelDisplayedRows: function labelDisplayedRows() {
|
|
597
|
+
return "";
|
|
598
|
+
},
|
|
599
|
+
showFirstButton: false,
|
|
600
|
+
showLastButton: false,
|
|
601
|
+
sx: {
|
|
602
|
+
'& .MuiTablePagination-toolbar': {
|
|
603
|
+
padding: 0,
|
|
604
|
+
margin: 0,
|
|
605
|
+
gap: '4px'
|
|
606
|
+
},
|
|
607
|
+
'& *': {
|
|
608
|
+
margin: 0,
|
|
609
|
+
fontSize: '14px'
|
|
610
|
+
},
|
|
611
|
+
"& .MuiTablePagination-actions": {
|
|
612
|
+
display: "none"
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Pagination, {
|
|
616
|
+
count: Math.ceil(filteredRowCount / pageSize),
|
|
617
|
+
page: pageIndex + 1,
|
|
618
|
+
onChange: function onChange(_, value) {
|
|
619
|
+
return table.setPageIndex(value - 1);
|
|
620
|
+
},
|
|
621
|
+
showFirstButton: true,
|
|
622
|
+
showLastButton: true
|
|
623
|
+
})]
|
|
624
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
625
|
+
style: {
|
|
626
|
+
marginRight: '5px',
|
|
627
|
+
fontSize: '14px'
|
|
628
|
+
},
|
|
629
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
630
|
+
title: "Selected/Filtered/Total",
|
|
631
|
+
arrow: true,
|
|
632
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
633
|
+
children: [!disableSelect && "".concat(selectedRows.length, "/"), filteredRowCount, "/", createRows.length]
|
|
634
|
+
})
|
|
635
|
+
})
|
|
636
|
+
})]
|
|
637
|
+
})]
|
|
638
|
+
});
|
|
610
639
|
},
|
|
611
640
|
muiTableHeadProps: {
|
|
612
641
|
className: 'grid-sticky-header'
|
|
@@ -797,20 +826,22 @@ var DataGrid = function DataGrid(_ref) {
|
|
|
797
826
|
(0, _react.useEffect)(function () {
|
|
798
827
|
return enableFixedHeader && (0, _gridFixedHeader["default"])('fixed-header', enableFixedActions);
|
|
799
828
|
}, []);
|
|
800
|
-
return /*#__PURE__*/
|
|
801
|
-
dateAdapter: _AdapterDateFns.AdapterDateFns
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
829
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDatePickers.LocalizationProvider, {
|
|
830
|
+
dateAdapter: _AdapterDateFns.AdapterDateFns,
|
|
831
|
+
children: [open && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHelper["default"], {
|
|
832
|
+
onClose: function onClose() {
|
|
833
|
+
return setOpen(false);
|
|
834
|
+
},
|
|
835
|
+
open: open,
|
|
836
|
+
title: gridHelper.title,
|
|
837
|
+
content: gridHelper.content
|
|
838
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
839
|
+
id: "fixed-header",
|
|
840
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_materialReactTable.MaterialReactTable, {
|
|
841
|
+
table: table
|
|
842
|
+
})
|
|
843
|
+
})]
|
|
844
|
+
});
|
|
814
845
|
};
|
|
815
846
|
DataGrid.propTypes = {
|
|
816
847
|
columns: _propTypes["default"].array.isRequired,
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.DEFAULT_CELL_TYPES = void 0;
|
|
7
7
|
var _FormatDate = _interopRequireDefault(require("./FormatDate"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
10
|
/**
|
|
10
11
|
* @file DefaultCellTypes.js
|
|
@@ -61,19 +62,24 @@ var DEFAULT_CELL_TYPES = exports.DEFAULT_CELL_TYPES = {
|
|
|
61
62
|
},
|
|
62
63
|
textTitle: function textTitle(_ref2) {
|
|
63
64
|
var cell = _ref2.cell;
|
|
64
|
-
return /*#__PURE__*/
|
|
65
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
66
|
+
children: cell.getValue()
|
|
67
|
+
});
|
|
65
68
|
},
|
|
66
69
|
textDescription: function textDescription(_ref3) {
|
|
67
70
|
var cell = _ref3.cell;
|
|
68
|
-
return /*#__PURE__*/
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
69
72
|
style: {
|
|
70
73
|
color: '#666'
|
|
71
|
-
}
|
|
72
|
-
|
|
74
|
+
},
|
|
75
|
+
children: cell.getValue()
|
|
76
|
+
});
|
|
73
77
|
},
|
|
74
78
|
textSmall: function textSmall(_ref4) {
|
|
75
79
|
var cell = _ref4.cell;
|
|
76
|
-
return /*#__PURE__*/
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("small", {
|
|
81
|
+
children: cell.getValue()
|
|
82
|
+
});
|
|
77
83
|
},
|
|
78
84
|
date: function date(_ref5) {
|
|
79
85
|
var cell = _ref5.cell,
|
|
@@ -114,41 +120,49 @@ var DEFAULT_CELL_TYPES = exports.DEFAULT_CELL_TYPES = {
|
|
|
114
120
|
},
|
|
115
121
|
email: function email(_ref11) {
|
|
116
122
|
var cell = _ref11.cell;
|
|
117
|
-
return /*#__PURE__*/
|
|
118
|
-
href: "mailto:".concat(cell.getValue())
|
|
119
|
-
|
|
123
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
124
|
+
href: "mailto:".concat(cell.getValue()),
|
|
125
|
+
children: cell.getValue()
|
|
126
|
+
});
|
|
120
127
|
},
|
|
121
128
|
phone: function phone(_ref12) {
|
|
122
129
|
var cell = _ref12.cell;
|
|
123
|
-
return /*#__PURE__*/
|
|
124
|
-
href: "tel:".concat(cell.getValue())
|
|
125
|
-
|
|
130
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
131
|
+
href: "tel:".concat(cell.getValue()),
|
|
132
|
+
children: cell.getValue()
|
|
133
|
+
});
|
|
126
134
|
},
|
|
127
135
|
link: function link(_ref13) {
|
|
128
136
|
var cell = _ref13.cell;
|
|
129
137
|
var value = cell.getValue();
|
|
130
|
-
return /*#__PURE__*/
|
|
131
|
-
title: value
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
139
|
+
title: value,
|
|
140
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
141
|
+
href: value,
|
|
142
|
+
target: "_blank",
|
|
143
|
+
rel: "noopener noreferrer",
|
|
144
|
+
children: value
|
|
145
|
+
})
|
|
146
|
+
});
|
|
137
147
|
},
|
|
138
148
|
array: function array(_ref14) {
|
|
139
149
|
var cell = _ref14.cell;
|
|
140
150
|
var value = cell.getValue();
|
|
141
151
|
var arr = Array.isArray(value) ? value : [];
|
|
142
|
-
return /*#__PURE__*/
|
|
143
|
-
title: arr.join(', ')
|
|
144
|
-
|
|
152
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
153
|
+
title: arr.join(', '),
|
|
154
|
+
children: arr.join(', ')
|
|
155
|
+
});
|
|
145
156
|
},
|
|
146
157
|
json: function json(_ref15) {
|
|
147
158
|
var cell = _ref15.cell;
|
|
148
159
|
var value = cell.getValue();
|
|
149
|
-
return /*#__PURE__*/
|
|
150
|
-
title: JSON.stringify(value)
|
|
151
|
-
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
161
|
+
title: JSON.stringify(value),
|
|
162
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("pre", {
|
|
163
|
+
children: JSON.stringify(value, null, 2)
|
|
164
|
+
})
|
|
165
|
+
});
|
|
152
166
|
},
|
|
153
167
|
countryFlag: function countryFlag(_ref16) {
|
|
154
168
|
var cell = _ref16.cell,
|
|
@@ -156,21 +170,24 @@ var DEFAULT_CELL_TYPES = exports.DEFAULT_CELL_TYPES = {
|
|
|
156
170
|
var v = cell.getValue();
|
|
157
171
|
if (!v) return "";
|
|
158
172
|
var iso2 = String(v).toUpperCase();
|
|
159
|
-
return /*#__PURE__*/
|
|
173
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
160
174
|
style: {
|
|
161
175
|
display: "flex",
|
|
162
176
|
alignItems: "center",
|
|
163
177
|
gap: 8
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
178
|
+
},
|
|
179
|
+
children: [(column === null || column === void 0 ? void 0 : column.onlyFlag) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
180
|
+
children: iso2
|
|
181
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
182
|
+
src: "https://flagcdn.com/24x18/".concat(iso2.toLowerCase(), ".png"),
|
|
183
|
+
alt: iso2,
|
|
184
|
+
style: {
|
|
185
|
+
width: 24,
|
|
186
|
+
height: 18,
|
|
187
|
+
borderRadius: 2
|
|
188
|
+
}
|
|
189
|
+
})]
|
|
190
|
+
});
|
|
174
191
|
},
|
|
175
192
|
persons: function persons(_ref17) {
|
|
176
193
|
var cell = _ref17.cell,
|
|
@@ -193,8 +210,9 @@ var DEFAULT_CELL_TYPES = exports.DEFAULT_CELL_TYPES = {
|
|
|
193
210
|
var first = arr[0];
|
|
194
211
|
var text = first ? "".concat(first).concat(arr.length > 1 ? ' et al.' : '') : 'N/A';
|
|
195
212
|
var tooltip = "".concat(column.columnDef.header, ":\n\u2022 ").concat(arr.join('\n• ') || 'N/A');
|
|
196
|
-
return /*#__PURE__*/
|
|
197
|
-
title: tooltip
|
|
198
|
-
|
|
213
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
214
|
+
title: tooltip,
|
|
215
|
+
children: text
|
|
216
|
+
});
|
|
199
217
|
}
|
|
200
218
|
};
|
|
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _semanticUiReact = require("semantic-ui-react");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
var GridHelper = function GridHelper(_ref) {
|
|
11
12
|
var open = _ref.open,
|
|
12
13
|
content = _ref.content,
|
|
13
14
|
onClose = _ref.onClose,
|
|
14
15
|
title = _ref.title;
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_semanticUiReact.Modal, {
|
|
16
17
|
open: open,
|
|
17
18
|
centered: true,
|
|
18
19
|
style: {
|
|
@@ -21,10 +22,18 @@ var GridHelper = function GridHelper(_ref) {
|
|
|
21
22
|
left: 'auto',
|
|
22
23
|
bottom: 'auto',
|
|
23
24
|
height: 'fit-content'
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
},
|
|
26
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Modal.Header, {
|
|
27
|
+
children: title
|
|
28
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Modal.Content, {
|
|
29
|
+
children: content
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Modal.Actions, {
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_semanticUiReact.Button, {
|
|
32
|
+
primary: true,
|
|
33
|
+
onClick: onClose,
|
|
34
|
+
children: "Close"
|
|
35
|
+
})
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
29
38
|
};
|
|
30
39
|
var _default = exports["default"] = GridHelper;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.regexFilterTooltip = exports.logicalFilterTooltip = exports.logicalFilter = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _semanticUiReact = require("semantic-ui-react");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
var logicalFilter = exports.logicalFilter = function logicalFilter(row, id, filterValue) {
|
|
11
12
|
var rowValue = row.getValue(id).toLowerCase();
|
|
@@ -47,17 +48,27 @@ var logicalFilter = exports.logicalFilter = function logicalFilter(row, id, filt
|
|
|
47
48
|
if (!parts) return false;
|
|
48
49
|
return analyseParts(parts);
|
|
49
50
|
};
|
|
50
|
-
var logicalFilterTooltip = exports.logicalFilterTooltip = /*#__PURE__*/
|
|
51
|
+
var logicalFilterTooltip = exports.logicalFilterTooltip = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
51
52
|
style: {
|
|
52
53
|
display: 'flex',
|
|
53
54
|
flexDirection: 'column',
|
|
54
55
|
textAlign: 'start'
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
},
|
|
57
|
+
children: ["This filter admits logical operators such as:", /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
|
|
58
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
59
|
+
children: "'&&' (AND) "
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
61
|
+
children: "'||' (OR) "
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
63
|
+
children: "'~' (NOT) "
|
|
64
|
+
})]
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "These operators can be combined.", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "For example, 'John Doe && Smith || James' will return rows that have both 'John Doe' and 'Smith', or 'James'."]
|
|
66
|
+
});
|
|
67
|
+
var regexFilterTooltip = exports.regexFilterTooltip = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58
68
|
style: {
|
|
59
69
|
display: 'flex',
|
|
60
70
|
flexDirection: 'column',
|
|
61
71
|
textAlign: 'start'
|
|
62
|
-
}
|
|
63
|
-
|
|
72
|
+
},
|
|
73
|
+
children: ["This filter enables the use of regular expression to search for patterns in the row data.", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "For example, '^[A-Z]' will find entries that start with a capital letter."]
|
|
74
|
+
});
|