@vendorflow/components 2.1.0 → 3.0.4
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/components/index.d.ts +1 -1
- package/lib/components/material-ui/DataTable/Data.d.ts +1 -1
- package/lib/components/material-ui/DataTable/DataTable.d.ts +9 -76
- package/lib/components/material-ui/DataTable/FilterTool/Filters/MultiSelectFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/Filters/RangeFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/Filters/SingleSelectFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/Filters/TextFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/index.d.ts +2 -2
- package/lib/components/material-ui/DataTable/TablePieces/BodyRow.d.ts +1 -1
- package/lib/components/material-ui/DataTable/TablePieces/HeaderCell.d.ts +1 -1
- package/lib/components/material-ui/DataTable/TablePieces/Toolbar.d.ts +1 -1
- package/lib/components/material-ui/DataTable/index.d.ts +1 -1
- package/lib/index.js +3 -14
- package/lib/index.js.LICENSE.txt +35 -0
- package/lib/index.js.map +1 -0
- package/lib/types/DataTable.types.d.ts +69 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +20 -99
- package/lib/TempHooks.d.ts +0 -9
- package/lib/TempHooks.js +0 -25
- package/lib/components/InfiniteScroll/InfiniteScroll.d.ts +0 -16
- package/lib/components/InfiniteScroll/InfiniteScroll.js +0 -159
- package/lib/components/InfiniteScroll/index.d.ts +0 -1
- package/lib/components/InfiniteScroll/index.js +0 -8
- package/lib/components/blueprint/InputGroup/InputGroup.d.ts +0 -20
- package/lib/components/blueprint/InputGroup/InputGroup.js +0 -13
- package/lib/components/blueprint/InputGroup/InputGroup.story.d.ts +0 -2
- package/lib/components/blueprint/InputGroup/InputGroup.story.js +0 -11
- package/lib/components/blueprint/InputGroup/index.d.ts +0 -1
- package/lib/components/blueprint/InputGroup/index.js +0 -4
- package/lib/components/blueprint/InputSelect/InputSelect.d.ts +0 -51
- package/lib/components/blueprint/InputSelect/InputSelect.js +0 -98
- package/lib/components/blueprint/InputSelect/InputSelect.story.d.ts +0 -3
- package/lib/components/blueprint/InputSelect/InputSelect.story.js +0 -19
- package/lib/components/blueprint/InputSelect/index.d.ts +0 -1
- package/lib/components/blueprint/InputSelect/index.js +0 -4
- package/lib/components/blueprint/InputTime/InputTime.d.ts +0 -24
- package/lib/components/blueprint/InputTime/InputTime.js +0 -28
- package/lib/components/blueprint/InputTime/InputTime.story.d.ts +0 -2
- package/lib/components/blueprint/InputTime/InputTime.story.js +0 -11
- package/lib/components/blueprint/InputTime/index.d.ts +0 -1
- package/lib/components/blueprint/InputTime/index.js +0 -4
- package/lib/components/index.js +0 -32
- package/lib/components/material-ui/AudioPlayer/AudioPlayer.js +0 -111
- package/lib/components/material-ui/AudioPlayer/AudioPlayer.story.js +0 -9
- package/lib/components/material-ui/AudioPlayer/index.js +0 -8
- package/lib/components/material-ui/Button/Button.js +0 -38
- package/lib/components/material-ui/Button/Button.story.js +0 -9
- package/lib/components/material-ui/Button/index.js +0 -8
- package/lib/components/material-ui/ButtonMenu/ButtonMenu.js +0 -115
- package/lib/components/material-ui/ButtonMenu/ButtonMenu.story.js +0 -79
- package/lib/components/material-ui/ButtonMenu/index.js +0 -8
- package/lib/components/material-ui/ChatInterface/ActionsMenu.d.ts +0 -4
- package/lib/components/material-ui/ChatInterface/ActionsMenu.js +0 -37
- package/lib/components/material-ui/ChatInterface/ChatInterface.d.ts +0 -33
- package/lib/components/material-ui/ChatInterface/ChatInterface.js +0 -109
- package/lib/components/material-ui/ChatInterface/ChatInterface.story.d.ts +0 -1
- package/lib/components/material-ui/ChatInterface/ChatInterface.story.js +0 -134
- package/lib/components/material-ui/ChatInterface/MessageInput.d.ts +0 -9
- package/lib/components/material-ui/ChatInterface/MessageInput.js +0 -53
- package/lib/components/material-ui/ChatInterface/MessageItem.d.ts +0 -8
- package/lib/components/material-ui/ChatInterface/MessageItem.js +0 -71
- package/lib/components/material-ui/ChatInterface/MessageThread.d.ts +0 -6
- package/lib/components/material-ui/ChatInterface/MessageThread.js +0 -119
- package/lib/components/material-ui/ChatInterface/index.d.ts +0 -1
- package/lib/components/material-ui/ChatInterface/index.js +0 -8
- package/lib/components/material-ui/ColorPicker/ColorPicker.js +0 -86
- package/lib/components/material-ui/ColorPicker/ColorPicker.story.js +0 -47
- package/lib/components/material-ui/ColorPicker/index.js +0 -8
- package/lib/components/material-ui/ColorPicker/styles.js +0 -24
- package/lib/components/material-ui/DataTable/AppliedFilters.d.ts +0 -12
- package/lib/components/material-ui/DataTable/AppliedFilters.js +0 -26
- package/lib/components/material-ui/DataTable/Data.js +0 -42
- package/lib/components/material-ui/DataTable/DataTable.js +0 -363
- package/lib/components/material-ui/DataTable/DataTable.story.js +0 -76
- package/lib/components/material-ui/DataTable/FilterTool/Filters/MultiSelectFilter.js +0 -63
- package/lib/components/material-ui/DataTable/FilterTool/Filters/RangeFilter.js +0 -76
- package/lib/components/material-ui/DataTable/FilterTool/Filters/SingleSelectFilter.js +0 -69
- package/lib/components/material-ui/DataTable/FilterTool/Filters/TextFilter.js +0 -52
- package/lib/components/material-ui/DataTable/FilterTool/index.js +0 -78
- package/lib/components/material-ui/DataTable/GlobalSearchFilter.d.ts +0 -10
- package/lib/components/material-ui/DataTable/GlobalSearchFilter.js +0 -49
- package/lib/components/material-ui/DataTable/IndeterminateCheckbox.d.ts +0 -4
- package/lib/components/material-ui/DataTable/IndeterminateCheckbox.js +0 -65
- package/lib/components/material-ui/DataTable/SortIndicator.d.ts +0 -10
- package/lib/components/material-ui/DataTable/SortIndicator.js +0 -33
- package/lib/components/material-ui/DataTable/TablePieces/AppliedFilters.js +0 -26
- package/lib/components/material-ui/DataTable/TablePieces/BodyCell.js +0 -50
- package/lib/components/material-ui/DataTable/TablePieces/BodyRow.js +0 -88
- package/lib/components/material-ui/DataTable/TablePieces/GlobalSearchFilter.js +0 -49
- package/lib/components/material-ui/DataTable/TablePieces/HeaderCell.js +0 -57
- package/lib/components/material-ui/DataTable/TablePieces/IndeterminateCheckbox.js +0 -65
- package/lib/components/material-ui/DataTable/TablePieces/SortIndicator.js +0 -33
- package/lib/components/material-ui/DataTable/TablePieces/Table.js +0 -47
- package/lib/components/material-ui/DataTable/TablePieces/TableBodyContent.js +0 -89
- package/lib/components/material-ui/DataTable/TablePieces/Toolbar.js +0 -59
- package/lib/components/material-ui/DataTable/TablePieces/ViewColumnTool.js +0 -77
- package/lib/components/material-ui/DataTable/Toolbar.d.ts +0 -24
- package/lib/components/material-ui/DataTable/Toolbar.js +0 -63
- package/lib/components/material-ui/DataTable/Utils.d.ts +0 -25
- package/lib/components/material-ui/DataTable/Utils.js +0 -119
- package/lib/components/material-ui/DataTable/ViewColumnTool.d.ts +0 -11
- package/lib/components/material-ui/DataTable/ViewColumnTool.js +0 -76
- package/lib/components/material-ui/DataTable/index.js +0 -8
- package/lib/components/material-ui/ErrorBoundary/ErrorBoundary.d.ts +0 -7
- package/lib/components/material-ui/ErrorBoundary/ErrorBoundary.js +0 -20
- package/lib/components/material-ui/ErrorBoundary/index.d.ts +0 -1
- package/lib/components/material-ui/ErrorBoundary/index.js +0 -8
- package/lib/components/material-ui/InputCheckboxGroup/InputCheckboxGroup.js +0 -99
- package/lib/components/material-ui/InputCheckboxGroup/InputCheckboxGroup.story.js +0 -52
- package/lib/components/material-ui/InputCheckboxGroup/index.js +0 -8
- package/lib/components/material-ui/InputDate/InputDate.js +0 -93
- package/lib/components/material-ui/InputDate/InputDate.story.js +0 -53
- package/lib/components/material-ui/InputDate/index.js +0 -8
- package/lib/components/material-ui/InputDateTime/InputDateTime.js +0 -82
- package/lib/components/material-ui/InputDateTime/InputDateTime.story.js +0 -53
- package/lib/components/material-ui/InputDateTime/index.js +0 -8
- package/lib/components/material-ui/InputGroup/InputGroup.js +0 -91
- package/lib/components/material-ui/InputGroup/InputGroup.story.js +0 -50
- package/lib/components/material-ui/InputGroup/index.js +0 -8
- package/lib/components/material-ui/InputRadioGroup/InputRadioGroup.js +0 -82
- package/lib/components/material-ui/InputRadioGroup/InputRadioGroup.story.js +0 -52
- package/lib/components/material-ui/InputRadioGroup/index.js +0 -8
- package/lib/components/material-ui/InputSearchDropdown/InputSearchDropdown.js +0 -146
- package/lib/components/material-ui/InputSearchDropdown/InputSearchDropdown.story.js +0 -66
- package/lib/components/material-ui/InputSearchDropdown/index.js +0 -8
- package/lib/components/material-ui/InputTime/InputTime.js +0 -82
- package/lib/components/material-ui/InputTime/InputTime.story.js +0 -53
- package/lib/components/material-ui/InputTime/index.js +0 -8
- package/lib/components/material-ui/Modal/Modal.js +0 -57
- package/lib/components/material-ui/Modal/Modal.story.js +0 -83
- package/lib/components/material-ui/Modal/index.js +0 -8
- package/lib/services/Select.service.d.ts +0 -5
- package/lib/services/Select.service.js +0 -67
- package/lib/stories/0-Inputs.stories.d.ts +0 -17
- package/lib/stories/0-Inputs.stories.js +0 -38
- package/lib/types/Component.types.js +0 -2
- package/lib/types/Internal.types.js +0 -2
- package/lib/types/index.js +0 -13
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
/** @jsxRuntime classic */
|
|
33
|
-
/** @jsx jsx */
|
|
34
|
-
var react_1 = require("@emotion/react");
|
|
35
|
-
var material_1 = require("@mui/material");
|
|
36
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
37
|
-
var DataTable_1 = require("../DataTable");
|
|
38
|
-
function BodyCell(_a) {
|
|
39
|
-
var cell = _a.cell, cellProps = _a.cellProps;
|
|
40
|
-
var style = cellProps.style, className = cellProps.className, restOfCellProps = __rest(cellProps, ["style", "className"]);
|
|
41
|
-
var isActionColumn = cell.column.id === DataTable_1.ACTION_COLUMN_ID;
|
|
42
|
-
return ((0, react_1.jsx)(react_1.ClassNames, null, function (_a) {
|
|
43
|
-
var css = _a.css, cx = _a.cx;
|
|
44
|
-
return ((0, react_1.jsx)(material_1.TableCell, __assign({ css: cx(
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
css(style), css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n padding: ", "px;\n display: block;\n border-bottom: none;\n ", "\n }\n "], ["\n && {\n padding: ", "px;\n display: block;\n border-bottom: none;\n ", "\n }\n "])), DataTable_1.CELL_PADDING, isActionColumn ? 'flex: none;' : '')), className: (0, classnames_1.default)(className, isActionColumn ? 'cell-ActionColumn' : undefined) }, restOfCellProps, { component: "div", variant: "body" }), cell.render('Cell')));
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
exports.default = BodyCell;
|
|
50
|
-
var templateObject_1;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
29
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
30
|
-
if (!m) return o;
|
|
31
|
-
var i = m.call(o), r, ar = [], e;
|
|
32
|
-
try {
|
|
33
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
34
|
-
}
|
|
35
|
-
catch (error) { e = { error: error }; }
|
|
36
|
-
finally {
|
|
37
|
-
try {
|
|
38
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
39
|
-
}
|
|
40
|
-
finally { if (e) throw e.error; }
|
|
41
|
-
}
|
|
42
|
-
return ar;
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
/** @jsxRuntime classic */
|
|
49
|
-
/** @jsx jsx */
|
|
50
|
-
var react_1 = require("@emotion/react");
|
|
51
|
-
var react_2 = require("react");
|
|
52
|
-
var material_1 = require("@mui/material");
|
|
53
|
-
var BodyCell_1 = __importDefault(require("./BodyCell"));
|
|
54
|
-
var lodash_1 = require("lodash");
|
|
55
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
56
|
-
function BodyRow(_a) {
|
|
57
|
-
var ExpandedComponent = _a.ExpandedComponent, row = _a.row, rowProps = _a.rowProps, innerRef = _a.innerRef, style = _a.style, rootClassName = _a.className, measure = _a.measure, getRowClassName = _a.getRowClassName;
|
|
58
|
-
var _b = __read((0, react_2.useState)(null), 2), element = _b[0], setElement = _b[1];
|
|
59
|
-
var className = rowProps.className, rowPropsStyle = rowProps.style, restOfRowProps = __rest(rowProps, ["className", "style"]);
|
|
60
|
-
var isExpanded = row.isExpanded;
|
|
61
|
-
(0, react_2.useEffect)(function () {
|
|
62
|
-
if (!element)
|
|
63
|
-
return;
|
|
64
|
-
var resizeObserver = new ResizeObserver(measure ? measure : lodash_1.noop);
|
|
65
|
-
resizeObserver.observe(element);
|
|
66
|
-
return function () { return resizeObserver.disconnect(); };
|
|
67
|
-
}, [!!element]);
|
|
68
|
-
return ((0, react_1.jsx)(react_1.ClassNames, null, function (_a) {
|
|
69
|
-
var css = _a.css, cx = _a.cx;
|
|
70
|
-
return ((0, react_1.jsx)("div", { ref: function (node) {
|
|
71
|
-
setElement(node);
|
|
72
|
-
if (innerRef) {
|
|
73
|
-
innerRef(node);
|
|
74
|
-
}
|
|
75
|
-
}, className: rootClassName, css: cx(style && css(style)) },
|
|
76
|
-
(0, react_1.jsx)(material_1.TableRow, __assign({}, restOfRowProps, { component: "div", css: cx(
|
|
77
|
-
// @ts-ignore
|
|
78
|
-
css(rowPropsStyle), css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n box-sizing: border-box;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n }\n "], ["\n && {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n box-sizing: border-box;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n }\n "])))), className: (0, classnames_1.default)(className, getRowClassName && getRowClassName(row.id)) }), row.cells.map(function (cell) {
|
|
79
|
-
var _a = cell.getCellProps(), key = _a.key, restOfCellProps = __rest(_a, ["key"]);
|
|
80
|
-
return (0, react_1.jsx)(BodyCell_1.default, { key: key, cell: cell, cellProps: restOfCellProps });
|
|
81
|
-
})),
|
|
82
|
-
isExpanded && !!ExpandedComponent && ((0, react_1.jsx)(material_1.TableRow, { component: "div", css: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n && {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n box-sizing: border-box;\n min-width: 100%;\n width: 100%;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n }\n "], ["\n && {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n box-sizing: border-box;\n min-width: 100%;\n width: 100%;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n }\n "]))) },
|
|
83
|
-
(0, react_1.jsx)(material_1.TableCell, { component: "div", variant: "body", css: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n && {\n display: block;\n border-bottom: none;\n }\n "], ["\n && {\n display: block;\n border-bottom: none;\n }\n "]))) },
|
|
84
|
-
(0, react_1.jsx)(ExpandedComponent, { data: row.original }))))));
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
exports.default = BodyRow;
|
|
88
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
7
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
8
|
-
if (!m) return o;
|
|
9
|
-
var i = m.call(o), r, ar = [], e;
|
|
10
|
-
try {
|
|
11
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12
|
-
}
|
|
13
|
-
catch (error) { e = { error: error }; }
|
|
14
|
-
finally {
|
|
15
|
-
try {
|
|
16
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17
|
-
}
|
|
18
|
-
finally { if (e) throw e.error; }
|
|
19
|
-
}
|
|
20
|
-
return ar;
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
/** @jsxRuntime classic */
|
|
24
|
-
/** @jsx jsx */
|
|
25
|
-
var react_1 = require("@emotion/react");
|
|
26
|
-
var material_1 = require("@mui/material");
|
|
27
|
-
var icons_material_1 = require("@mui/icons-material");
|
|
28
|
-
var react_table_1 = require("react-table");
|
|
29
|
-
var react_2 = require("react");
|
|
30
|
-
function GlobalSearchFilter(_a) {
|
|
31
|
-
var globalFilter = _a.globalFilter, setGlobalFilter = _a.setGlobalFilter, setShowSearch = _a.setShowSearch;
|
|
32
|
-
var _b = __read((0, react_2.useState)(globalFilter), 2), value = _b[0], setValue = _b[1];
|
|
33
|
-
var onChange = (0, react_table_1.useAsyncDebounce)(function (value) {
|
|
34
|
-
setGlobalFilter(value || undefined);
|
|
35
|
-
}, 300);
|
|
36
|
-
return ((0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: 100%;\n min-width: 20rem;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n "], ["\n max-width: 100%;\n min-width: 20rem;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n "]))), "data-testid": "globalSearchFilter" },
|
|
37
|
-
(0, react_1.jsx)(icons_material_1.Search, null),
|
|
38
|
-
(0, react_1.jsx)(material_1.TextField, { value: value || '', onChange: function (evt) {
|
|
39
|
-
setValue(evt.target.value);
|
|
40
|
-
onChange(evt.target.value);
|
|
41
|
-
}, fullWidth: true, variant: "standard", autoFocus: true }),
|
|
42
|
-
(0, react_1.jsx)(material_1.IconButton, { onClick: function () {
|
|
43
|
-
setGlobalFilter(null);
|
|
44
|
-
setShowSearch(false);
|
|
45
|
-
} },
|
|
46
|
-
(0, react_1.jsx)(icons_material_1.Close, null))));
|
|
47
|
-
}
|
|
48
|
-
exports.default = GlobalSearchFilter;
|
|
49
|
-
var templateObject_1;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
/** @jsxRuntime classic */
|
|
33
|
-
/** @jsx jsx */
|
|
34
|
-
var react_1 = require("@emotion/react");
|
|
35
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
36
|
-
var SortIndicator_1 = __importDefault(require("./SortIndicator"));
|
|
37
|
-
var material_1 = require("@mui/material");
|
|
38
|
-
var icons_material_1 = require("@mui/icons-material");
|
|
39
|
-
var DataTable_1 = require("../DataTable");
|
|
40
|
-
function HeaderCell(_a) {
|
|
41
|
-
var className = _a.className, flexLayoutEnabled = _a.flexLayoutEnabled, header = _a.header, headerProps = _a.headerProps;
|
|
42
|
-
var headerPropsClassName = headerProps.className, style = headerProps.style, restOfProps = __rest(headerProps, ["className", "style"]);
|
|
43
|
-
return ((0, react_1.jsx)(react_1.ClassNames, null, function (_a) {
|
|
44
|
-
var css = _a.css, cx = _a.cx;
|
|
45
|
-
return ((0, react_1.jsx)(material_1.TableCell, __assign({}, restOfProps, { component: "div", variant: "head", css: cx(
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
css(style), css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n display: flex;\n box-sizing: border-box;\n padding: ", "px;\n }\n "], ["\n && {\n display: flex;\n box-sizing: border-box;\n padding: ", "px;\n }\n "])), DataTable_1.CELL_PADDING), !flexLayoutEnabled &&
|
|
48
|
-
header.minWidth !== undefined && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n min-width: ", "px;\n "], ["\n min-width: ", "px;\n "])), header.minWidth), !flexLayoutEnabled &&
|
|
49
|
-
header.maxWidth !== undefined && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n max-width: ", "px;\n "], ["\n max-width: ", "px;\n "])), header.maxWidth), header.id.includes(DataTable_1.ACTION_COLUMN_ID) && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: none;\n "], ["\n flex: none;\n "])))), className: (0, classnames_1.default)(headerPropsClassName, className, "col-" + header.id) }),
|
|
50
|
-
(0, react_1.jsx)("div", { css: cx(css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n "], ["\n position: relative;\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n "])), header.columns != null ? 'center' : 'flex-start')) },
|
|
51
|
-
(0, react_1.jsx)("span", { css: cx(css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-weight: 600;\n flex: none;\n "], ["\n font-weight: 600;\n flex: none;\n "])))) }, header.render('Header')),
|
|
52
|
-
(0, react_1.jsx)(SortIndicator_1.default, { canSort: header.canSort, isSorted: header.isSorted, isSortedDesc: header.isSortedDesc }),
|
|
53
|
-
header.id !== DataTable_1.ACTION_COLUMN_ID && !header.id.includes('_placeholder') && !!header.getResizerProps && ((0, react_1.jsx)(icons_material_1.DragIndicator, __assign({ css: css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 50%;\n transform: translate(-50%, -50%);\n color: #b2b2b2;\n background-color: white;\n "], ["\n position: absolute;\n right: 0;\n top: 50%;\n transform: translate(-50%, -50%);\n color: #b2b2b2;\n background-color: white;\n "]))) }, header.getResizerProps()))))));
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
exports.default = HeaderCell;
|
|
57
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.CHECKBOX_WIDTH = void 0;
|
|
30
|
-
/** @jsxRuntime classic */
|
|
31
|
-
/** @jsx jsx */
|
|
32
|
-
var react_1 = require("@emotion/react");
|
|
33
|
-
var react_2 = require("react");
|
|
34
|
-
var material_1 = require("@mui/material");
|
|
35
|
-
exports.CHECKBOX_WIDTH = 32;
|
|
36
|
-
// eslint-disable-next-line react/display-name
|
|
37
|
-
var IndeterminateCheckbox = (0, react_2.forwardRef)(function (_a, ref) {
|
|
38
|
-
var indeterminate = _a.indeterminate, restOfProps = __rest(_a, ["indeterminate"]);
|
|
39
|
-
var resolvedRef = useForwardedRef(ref);
|
|
40
|
-
(0, react_2.useEffect)(function () {
|
|
41
|
-
if (resolvedRef.current) {
|
|
42
|
-
resolvedRef.current.indeterminate = indeterminate;
|
|
43
|
-
}
|
|
44
|
-
}, [resolvedRef, indeterminate]);
|
|
45
|
-
return ((0, react_1.jsx)(react_2.Fragment, null,
|
|
46
|
-
(0, react_1.jsx)(material_1.Checkbox, __assign({ css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n "], ["\n width: ", "px;\n height: ", "px;\n "])), exports.CHECKBOX_WIDTH, exports.CHECKBOX_WIDTH),
|
|
47
|
-
//@ts-ignore
|
|
48
|
-
ref: resolvedRef }, restOfProps, { indeterminate: indeterminate }))));
|
|
49
|
-
});
|
|
50
|
-
exports.default = IndeterminateCheckbox;
|
|
51
|
-
function useForwardedRef(ref) {
|
|
52
|
-
var innerRef = (0, react_2.useRef)(null);
|
|
53
|
-
(0, react_2.useEffect)(function () {
|
|
54
|
-
if (!ref)
|
|
55
|
-
return;
|
|
56
|
-
if (typeof ref === 'function') {
|
|
57
|
-
ref(innerRef.current);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
ref.current = innerRef.current;
|
|
61
|
-
}
|
|
62
|
-
}, []);
|
|
63
|
-
return innerRef;
|
|
64
|
-
}
|
|
65
|
-
var templateObject_1;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
/** @jsxRuntime classic */
|
|
8
|
-
/** @jsx jsx */
|
|
9
|
-
var react_1 = require("@emotion/react");
|
|
10
|
-
var icons_material_1 = require("@mui/icons-material");
|
|
11
|
-
var iconStyle = (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: 0.25rem;\n color: #b2b2b2;\n line-height: 0;\n\n && {\n font-size: 1rem;\n }\n"], ["\n margin-left: 0.25rem;\n color: #b2b2b2;\n line-height: 0;\n\n && {\n font-size: 1rem;\n }\n"])));
|
|
12
|
-
var smallIconStyle = (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n && {\n font-size: 0.75rem;\n }\n"], ["\n ", ";\n && {\n font-size: 0.75rem;\n }\n"])), iconStyle);
|
|
13
|
-
var wrapperStyle = (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n line-height: 0;\n flex: none;\n"], ["\n line-height: 0;\n flex: none;\n"])));
|
|
14
|
-
var stackedWrapperStyle = (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n flex: none;\n display: inline-flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"], ["\n ", ";\n flex: none;\n display: inline-flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])), wrapperStyle);
|
|
15
|
-
function SortIndicator(_a) {
|
|
16
|
-
var canSort = _a.canSort, isSorted = _a.isSorted, isSortedDesc = _a.isSortedDesc;
|
|
17
|
-
if (!canSort) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
if (!isSorted) {
|
|
21
|
-
return ((0, react_1.jsx)("span", { css: stackedWrapperStyle },
|
|
22
|
-
(0, react_1.jsx)(icons_material_1.ArrowUpward, { css: smallIconStyle }),
|
|
23
|
-
(0, react_1.jsx)(icons_material_1.ArrowDownward, { css: smallIconStyle })));
|
|
24
|
-
}
|
|
25
|
-
if (isSortedDesc) {
|
|
26
|
-
return ((0, react_1.jsx)("span", { css: wrapperStyle },
|
|
27
|
-
(0, react_1.jsx)(icons_material_1.ArrowDownward, { css: iconStyle })));
|
|
28
|
-
}
|
|
29
|
-
return ((0, react_1.jsx)("span", { css: wrapperStyle },
|
|
30
|
-
(0, react_1.jsx)(icons_material_1.ArrowUpward, { css: iconStyle })));
|
|
31
|
-
}
|
|
32
|
-
exports.default = SortIndicator;
|
|
33
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
/** @jsxRuntime classic */
|
|
33
|
-
/** @jsx jsx */
|
|
34
|
-
var react_1 = require("@emotion/react");
|
|
35
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
36
|
-
function Table(_a) {
|
|
37
|
-
var children = _a.children, className = _a.className, getTableProps = _a.getTableProps;
|
|
38
|
-
var _b = getTableProps(), style = _b.style, tablePropsClassName = _b.className, restOfProps = __rest(_b, ["style", "className"]);
|
|
39
|
-
return ((0, react_1.jsx)(react_1.ClassNames, null, function (_a) {
|
|
40
|
-
var css = _a.css, cx = _a.cx;
|
|
41
|
-
return ((0, react_1.jsx)("div", __assign({}, restOfProps, { className: (0, classnames_1.default)(tablePropsClassName, className, 'VfTable'), css: cx(
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
css(style), css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n "], ["\n height: 100%;\n "])))) }), children));
|
|
44
|
-
}));
|
|
45
|
-
}
|
|
46
|
-
exports.default = Table;
|
|
47
|
-
var templateObject_1;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
7
|
-
var t = {};
|
|
8
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
9
|
-
t[p] = s[p];
|
|
10
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
11
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
12
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
13
|
-
t[p[i]] = s[p[i]];
|
|
14
|
-
}
|
|
15
|
-
return t;
|
|
16
|
-
};
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
/** @jsxRuntime classic */
|
|
22
|
-
/** @jsx jsx */
|
|
23
|
-
var react_1 = require("@emotion/react");
|
|
24
|
-
var react_virtualized_1 = require("react-virtualized");
|
|
25
|
-
var BodyRow_1 = __importDefault(require("./BodyRow"));
|
|
26
|
-
var material_1 = require("@mui/material");
|
|
27
|
-
var react_2 = require("react");
|
|
28
|
-
var hooks_1 = require("@vendorflow/common/lib/hooks");
|
|
29
|
-
function TableBodyContent(_a) {
|
|
30
|
-
var defaultRowHeight = _a.defaultRowHeight, ExpandedComponent = _a.ExpandedComponent, flexLayoutEnabled = _a.flexLayoutEnabled, hasScrollbar = _a.hasScrollbar, hasScrollbarRefCallback = _a.hasScrollbarRefCallback, height = _a.height, isVirtualizeEnabled = _a.isVirtualizeEnabled, noMatchLabel = _a.noMatchLabel, prepareRow = _a.prepareRow, scrollbarWidth = _a.scrollbarWidth, scrollContainerRef = _a.scrollContainerRef, setScrollLeft = _a.setScrollLeft, tableBodyRef = _a.tableBodyRef, tableBodyMeasureRefCallback = _a.tableBodyMeasureRefCallback, tableRows = _a.tableRows, totalColumnsWidth = _a.totalColumnsWidth, width = _a.width, getRowClassName = _a.getRowClassName;
|
|
31
|
-
var trueWidth = width ? width - (hasScrollbar.vertical ? scrollbarWidth : 0) : 0;
|
|
32
|
-
var scrollContentWidth = (0, react_2.useMemo)(function () {
|
|
33
|
-
return trueWidth > totalColumnsWidth ? trueWidth : totalColumnsWidth;
|
|
34
|
-
}, [flexLayoutEnabled, totalColumnsWidth, trueWidth, hasScrollbar, scrollbarWidth]);
|
|
35
|
-
var forceUpdate = (0, hooks_1.useForceUpdate)();
|
|
36
|
-
var cache = (0, react_2.useRef)(new react_virtualized_1.CellMeasurerCache({ fixedWidth: true, defaultHeight: defaultRowHeight, defaultWidth: scrollContentWidth }));
|
|
37
|
-
(0, react_2.useEffect)(function () {
|
|
38
|
-
if (isVirtualizeEnabled) {
|
|
39
|
-
cache.current = new react_virtualized_1.CellMeasurerCache({
|
|
40
|
-
fixedWidth: true,
|
|
41
|
-
defaultHeight: defaultRowHeight,
|
|
42
|
-
defaultWidth: scrollContentWidth,
|
|
43
|
-
});
|
|
44
|
-
cache.current.clearAll();
|
|
45
|
-
forceUpdate();
|
|
46
|
-
}
|
|
47
|
-
}, [scrollContentWidth]);
|
|
48
|
-
function renderRow(_a) {
|
|
49
|
-
var columnIndex = _a.columnIndex, rowIndex = _a.rowIndex, key = _a.key, parent = _a.parent, style = _a.style;
|
|
50
|
-
var row = tableRows[rowIndex];
|
|
51
|
-
prepareRow(row);
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
53
|
-
var _b = row.getRowProps(), _ = _b.key, restOfRowProps = __rest(_b, ["key"]);
|
|
54
|
-
return ((0, react_1.jsx)(react_virtualized_1.CellMeasurer, { cache: cache.current, columnIndex: columnIndex, key: key, rowIndex: rowIndex, parent: parent }, function (_a) {
|
|
55
|
-
var measure = _a.measure, registerChild = _a.registerChild;
|
|
56
|
-
return ((0, react_1.jsx)(BodyRow_1.default, { key: key, innerRef: registerChild, ExpandedComponent: ExpandedComponent, row: row, rowProps: restOfRowProps, style: style, measure: measure, getRowClassName: getRowClassName }));
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
return ((0, react_1.jsx)(material_1.TableBody, { ref: function (node) {
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
tableBodyRef.current = node;
|
|
62
|
-
tableBodyMeasureRefCallback(node); // need this to get the height and width
|
|
63
|
-
if (isVirtualizeEnabled) {
|
|
64
|
-
scrollContainerRef.current = (node === null || node === void 0 ? void 0 : node.firstElementChild) || null;
|
|
65
|
-
hasScrollbarRefCallback((node === null || node === void 0 ? void 0 : node.firstElementChild) || null);
|
|
66
|
-
}
|
|
67
|
-
}, component: "div", css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n display: block;\n }\n "], ["\n && {\n display: block;\n }\n "]))), className: "DataTable__TableBody" },
|
|
68
|
-
isVirtualizeEnabled && !!height && !!width && ((0, react_1.jsx)(react_virtualized_1.Grid, { deferredMeasurementCache: cache.current, height: height, width: width, overscanRowCount: 5, columnCount: 1, columnWidth: cache.current.columnWidth, rowCount: tableRows.length, rowHeight: cache.current.rowHeight, estimatedRowSize: defaultRowHeight, cellRenderer: renderRow, onScroll: function (params) {
|
|
69
|
-
var scrollLeft = params.scrollLeft;
|
|
70
|
-
setScrollLeft(scrollLeft);
|
|
71
|
-
} })),
|
|
72
|
-
!isVirtualizeEnabled && !!height && !!width && ((0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", "px;\n width: ", "px;\n overflow: auto;\n "], ["\n height: ", "px;\n width: ", "px;\n overflow: auto;\n "])), height, width), ref: function (node) {
|
|
73
|
-
scrollContainerRef.current = node;
|
|
74
|
-
hasScrollbarRefCallback(node);
|
|
75
|
-
}, onScroll: function (evt) {
|
|
76
|
-
var scrollLeft = evt.target.scrollLeft;
|
|
77
|
-
setScrollLeft(scrollLeft);
|
|
78
|
-
} },
|
|
79
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", "px;\n "], ["\n width: ", "px;\n "])), scrollContentWidth) }, tableRows.length > 0 ? (tableRows.map(function (row) {
|
|
80
|
-
prepareRow(row);
|
|
81
|
-
var _a = row.getRowProps(), key = _a.key, restOfRowProps = __rest(_a, ["key"]);
|
|
82
|
-
return ((0, react_1.jsx)(BodyRow_1.default, { key: key, css: (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), trueWidth > totalColumnsWidth ? '100%' : 'max-content'), ExpandedComponent: ExpandedComponent, row: row, rowProps: restOfRowProps, getRowClassName: getRowClassName }));
|
|
83
|
-
})) : ((0, react_1.jsx)(material_1.TableRow, { component: "div", css: (0, react_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n && {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n box-sizing: border-box;\n min-width: 100%;\n width: 100%;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n }\n\n &&:last-child {\n border-bottom: none;\n }\n "], ["\n && {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n box-sizing: border-box;\n min-width: 100%;\n width: 100%;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n }\n\n &&:last-child {\n border-bottom: none;\n }\n "]))) },
|
|
84
|
-
(0, react_1.jsx)(material_1.TableCell, { component: "div", variant: "body", css: (0, react_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n && {\n display: block;\n border-bottom: none;\n width: 100%;\n }\n "], ["\n && {\n display: block;\n border-bottom: none;\n width: 100%;\n }\n "]))) },
|
|
85
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n text-align: center;\n "], ["\n text-align: center;\n "]))) },
|
|
86
|
-
(0, react_1.jsx)("span", null, noMatchLabel))))))))));
|
|
87
|
-
}
|
|
88
|
-
exports.default = TableBodyContent;
|
|
89
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
7
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
8
|
-
if (!m) return o;
|
|
9
|
-
var i = m.call(o), r, ar = [], e;
|
|
10
|
-
try {
|
|
11
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12
|
-
}
|
|
13
|
-
catch (error) { e = { error: error }; }
|
|
14
|
-
finally {
|
|
15
|
-
try {
|
|
16
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17
|
-
}
|
|
18
|
-
finally { if (e) throw e.error; }
|
|
19
|
-
}
|
|
20
|
-
return ar;
|
|
21
|
-
};
|
|
22
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
/** @jsxRuntime classic */
|
|
27
|
-
/** @jsx jsx */
|
|
28
|
-
var react_1 = require("@emotion/react");
|
|
29
|
-
var material_1 = require("@mui/material");
|
|
30
|
-
var ViewColumnTool_1 = __importDefault(require("./ViewColumnTool"));
|
|
31
|
-
var icons_material_1 = require("@mui/icons-material");
|
|
32
|
-
var react_2 = require("react");
|
|
33
|
-
var GlobalSearchFilter_1 = __importDefault(require("./GlobalSearchFilter"));
|
|
34
|
-
var FilterTool_1 = __importDefault(require("../FilterTool"));
|
|
35
|
-
function Toolbar(_a) {
|
|
36
|
-
var title = _a.title, allColumns = _a.allColumns, columnNameById = _a.columnNameById, enableFilters = _a.enableFilters, enableGlobalSearch = _a.enableGlobalSearch, enableHideColumns = _a.enableHideColumns, hasRowsSelected = _a.hasRowsSelected, numRowsSelected = _a.numRowsSelected, globalFilter = _a.globalFilter, renderActions = _a.renderActions, renderRowSelectActions = _a.renderRowSelectActions, setAllFilters = _a.setAllFilters, setGlobalFilter = _a.setGlobalFilter;
|
|
37
|
-
var _b = __read((0, react_2.useState)(false), 2), showSearch = _b[0], setShowSearch = _b[1];
|
|
38
|
-
return ((0, react_1.jsx)(material_1.Toolbar, { sx: hasRowsSelected ? { backgroundColor: function (theme) { return (0, material_1.lighten)(theme.palette.primary.light, 0.85); } } : undefined },
|
|
39
|
-
(0, react_1.jsx)(material_1.Grid, { container: true, spacing: 2 },
|
|
40
|
-
(0, react_1.jsx)(material_1.Grid, { item: true, sm: 6 },
|
|
41
|
-
(0, react_1.jsx)(material_1.Stack, { direction: "row" }, enableGlobalSearch && showSearch ? ((0, react_1.jsx)(GlobalSearchFilter_1.default, { globalFilter: globalFilter, setGlobalFilter: setGlobalFilter, setShowSearch: setShowSearch })) : hasRowsSelected ? ((0, react_1.jsx)(material_1.Typography, { css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: 1.125rem;\n margin-top: 4px;\n "], ["\n font-size: 1.125rem;\n margin-top: 4px;\n "]))) },
|
|
42
|
-
numRowsSelected,
|
|
43
|
-
" selected")) : ((0, react_1.jsx)(material_1.Typography, { css: (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 1.125rem;\n margin-top: 6px;\n "], ["\n font-size: 1.125rem;\n margin-top: 6px;\n "]))) }, title || '')))),
|
|
44
|
-
(0, react_1.jsx)(material_1.Grid, { item: true, sm: 6 },
|
|
45
|
-
(0, react_1.jsx)(material_1.Stack, { direction: "row", justifyContent: "flex-end", css: (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "]))) },
|
|
46
|
-
enableGlobalSearch && ((0, react_1.jsx)(material_1.Tooltip, { title: "Search" },
|
|
47
|
-
(0, react_1.jsx)(material_1.IconButton, { onClick: function () {
|
|
48
|
-
if (showSearch) {
|
|
49
|
-
setGlobalFilter(null);
|
|
50
|
-
}
|
|
51
|
-
setShowSearch(!showSearch);
|
|
52
|
-
} },
|
|
53
|
-
(0, react_1.jsx)(icons_material_1.Search, null)))),
|
|
54
|
-
enableHideColumns && (0, react_1.jsx)(ViewColumnTool_1.default, { allColumns: allColumns, columnNameById: columnNameById }),
|
|
55
|
-
enableFilters && ((0, react_1.jsx)(FilterTool_1.default, { allColumns: allColumns, columnNameById: columnNameById, setAllFilters: setAllFilters })),
|
|
56
|
-
hasRowsSelected ? renderRowSelectActions && renderRowSelectActions() : renderActions && renderActions())))));
|
|
57
|
-
}
|
|
58
|
-
exports.default = Toolbar;
|
|
59
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
18
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
-
if (!m) return o;
|
|
20
|
-
var i = m.call(o), r, ar = [], e;
|
|
21
|
-
try {
|
|
22
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
-
}
|
|
24
|
-
catch (error) { e = { error: error }; }
|
|
25
|
-
finally {
|
|
26
|
-
try {
|
|
27
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
-
}
|
|
29
|
-
finally { if (e) throw e.error; }
|
|
30
|
-
}
|
|
31
|
-
return ar;
|
|
32
|
-
};
|
|
33
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
/** @jsxRuntime classic */
|
|
38
|
-
/** @jsx jsx */
|
|
39
|
-
var react_1 = require("@emotion/react");
|
|
40
|
-
var react_2 = require("react");
|
|
41
|
-
var material_1 = require("@mui/material");
|
|
42
|
-
var icons_material_1 = require("@mui/icons-material");
|
|
43
|
-
var nanoid_1 = require("nanoid");
|
|
44
|
-
var IndeterminateCheckbox_1 = __importDefault(require("./IndeterminateCheckbox"));
|
|
45
|
-
var DataTable_1 = require("../DataTable");
|
|
46
|
-
function ViewColumnTool(_a) {
|
|
47
|
-
var allColumns = _a.allColumns, columnNameById = _a.columnNameById;
|
|
48
|
-
var id = (0, react_2.useMemo)(function () { return (0, nanoid_1.nanoid)(); }, []);
|
|
49
|
-
var _b = __read((0, react_2.useState)(null), 2), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
50
|
-
var open = !!anchorEl;
|
|
51
|
-
function handleClick(evt) {
|
|
52
|
-
setAnchorEl(evt.currentTarget);
|
|
53
|
-
}
|
|
54
|
-
function handleClose() {
|
|
55
|
-
setAnchorEl(null);
|
|
56
|
-
}
|
|
57
|
-
return ((0, react_1.jsx)(react_2.Fragment, null,
|
|
58
|
-
(0, react_1.jsx)(material_1.Tooltip, { title: "Show Columns" },
|
|
59
|
-
(0, react_1.jsx)(material_1.IconButton, { "aria-describedby": id, onClick: handleClick },
|
|
60
|
-
(0, react_1.jsx)(icons_material_1.ViewColumn, null))),
|
|
61
|
-
(0, react_1.jsx)(material_1.Popover, { id: id, open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'center' } },
|
|
62
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.5rem;\n "], ["\n padding: 0.5rem;\n "]))) },
|
|
63
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n "]))) },
|
|
64
|
-
(0, react_1.jsx)(material_1.Typography, { css: (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 14px;\n color: rgba(0, 0, 0, 0.54);\n "], ["\n font-size: 14px;\n color: rgba(0, 0, 0, 0.54);\n "]))) }, "Show Columns"),
|
|
65
|
-
(0, react_1.jsx)(material_1.Tooltip, { title: "Close" },
|
|
66
|
-
(0, react_1.jsx)(material_1.IconButton, { onClick: handleClose },
|
|
67
|
-
(0, react_1.jsx)(icons_material_1.Close, null)))),
|
|
68
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n "], ["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n "]))) }, allColumns
|
|
69
|
-
.filter(function (column) { return column.id !== DataTable_1.ACTION_COLUMN_ID; })
|
|
70
|
-
.map(function (column) {
|
|
71
|
-
return ((0, react_1.jsx)(material_1.FormControlLabel, { key: column.id, label: columnNameById[column.id],
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
control: (0, react_1.jsx)(IndeterminateCheckbox_1.default, __assign({}, column.getToggleHiddenProps())) }));
|
|
74
|
-
}))))));
|
|
75
|
-
}
|
|
76
|
-
exports.default = ViewColumnTool;
|
|
77
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|