@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,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
var react_1 = __importStar(require("react"));
|
|
23
|
-
var DataTable_1 = __importStar(require("./DataTable"));
|
|
24
|
-
var Data_1 = require("./Data");
|
|
25
|
-
var material_1 = require("@mui/material");
|
|
26
|
-
function DataTable() {
|
|
27
|
-
var data = (0, react_1.useMemo)(function () { return Data_1.Data; }, []);
|
|
28
|
-
var columns = (0, react_1.useMemo)(function () { return Data_1.Columns; }, []);
|
|
29
|
-
var options = {
|
|
30
|
-
rowExpanding: {
|
|
31
|
-
enabled: true,
|
|
32
|
-
mode: 'multi',
|
|
33
|
-
},
|
|
34
|
-
filters: {
|
|
35
|
-
enabled: true,
|
|
36
|
-
},
|
|
37
|
-
globalSearch: {
|
|
38
|
-
enabled: true,
|
|
39
|
-
},
|
|
40
|
-
columnHiding: {
|
|
41
|
-
enabled: true,
|
|
42
|
-
},
|
|
43
|
-
columnResizing: {
|
|
44
|
-
enabled: true,
|
|
45
|
-
},
|
|
46
|
-
pagination: {
|
|
47
|
-
enabled: false,
|
|
48
|
-
rowsPerPageOptions: [5, 10, 20],
|
|
49
|
-
pageSize: 10,
|
|
50
|
-
},
|
|
51
|
-
virtualize: {
|
|
52
|
-
enabled: false,
|
|
53
|
-
},
|
|
54
|
-
rowSelect: {
|
|
55
|
-
enabled: true,
|
|
56
|
-
mode: 'multi',
|
|
57
|
-
},
|
|
58
|
-
sorting: {
|
|
59
|
-
enabled: true,
|
|
60
|
-
},
|
|
61
|
-
table: {
|
|
62
|
-
flexLayoutEnabled: true,
|
|
63
|
-
getRowId: function (person) { return person.id; },
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
var instance = (0, DataTable_1.useDefaultTableInstance)({
|
|
67
|
-
columns: columns,
|
|
68
|
-
data: data,
|
|
69
|
-
options: options,
|
|
70
|
-
defaultColumn: { minWidth: 50, width: 150 },
|
|
71
|
-
});
|
|
72
|
-
return (react_1.default.createElement(material_1.ThemeProvider, { theme: (0, material_1.createTheme)() },
|
|
73
|
-
react_1.default.createElement("div", { style: { height: '700px', width: '640px' } },
|
|
74
|
-
react_1.default.createElement(DataTable_1.default, { title: "People", columns: columns, instance: instance, options: options, renderActions: function () { return react_1.default.createElement(material_1.Button, { onClick: function () { return alert('Thanks!'); } }, "Click Me"); }, renderRowSelectActions: function () { return react_1.default.createElement(material_1.Button, { onClick: function () { return alert('Thanks!'); } }, "Click Me"); }, ExpandedRow: function () { return react_1.default.createElement("div", null, "Hello"); } }))));
|
|
75
|
-
}
|
|
76
|
-
exports.default = DataTable;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
38
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39
|
-
if (ar || !(i in from)) {
|
|
40
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
41
|
-
ar[i] = from[i];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45
|
-
};
|
|
46
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
var react_1 = __importStar(require("react"));
|
|
51
|
-
var InputSearchDropdown_1 = __importDefault(require("../../../InputSearchDropdown"));
|
|
52
|
-
function MultiSelectFilter(_a) {
|
|
53
|
-
var column = _a.column, _b = _a.column, filterValue = _b.filterValue, preFilteredRows = _b.preFilteredRows, setFilter = _b.setFilter;
|
|
54
|
-
var options = (0, react_1.useMemo)(function () {
|
|
55
|
-
var options = new Set();
|
|
56
|
-
preFilteredRows.forEach(function (row) {
|
|
57
|
-
options.add(row.values[column.id]);
|
|
58
|
-
});
|
|
59
|
-
return __spreadArray([], __read(options.values()), false);
|
|
60
|
-
}, [column.id, preFilteredRows]);
|
|
61
|
-
return (react_1.default.createElement(InputSearchDropdown_1.default, { label: "Filter Value", size: "small", fullWidth: true, value: filterValue || [], onChange: function (evt) { return setFilter(evt.target.value); }, getOptionLabel: function (option) { return option === null || option === void 0 ? void 0 : option.toString(); }, options: options, disableCloseOnSelect: true, multiple: true }));
|
|
62
|
-
}
|
|
63
|
-
exports.default = MultiSelectFilter;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
var react_1 = __importStar(require("react"));
|
|
39
|
-
var react_table_1 = require("react-table");
|
|
40
|
-
var material_1 = require("@mui/material");
|
|
41
|
-
function RangeFilter(_a) {
|
|
42
|
-
var _b = _a.column, id = _b.id, filterValue = _b.filterValue, preFilteredRows = _b.preFilteredRows, setFilter = _b.setFilter;
|
|
43
|
-
var _c = __read((0, react_1.useMemo)(function () {
|
|
44
|
-
var min = preFilteredRows.length ? preFilteredRows[0].values[id] : 0;
|
|
45
|
-
var max = preFilteredRows.length ? preFilteredRows[0].values[id] : 0;
|
|
46
|
-
preFilteredRows.forEach(function (row) {
|
|
47
|
-
min = Math.min(row.values[id], min);
|
|
48
|
-
max = Math.max(row.values[id], max);
|
|
49
|
-
});
|
|
50
|
-
return [min, max];
|
|
51
|
-
}, [id, preFilteredRows]), 2), min = _c[0], max = _c[1];
|
|
52
|
-
var _d = __read((0, react_1.useState)(filterValue || [min, max]), 2), value = _d[0], setValue = _d[1];
|
|
53
|
-
var onChange = (0, react_table_1.useAsyncDebounce)(function (value) {
|
|
54
|
-
setFilter(value);
|
|
55
|
-
}, 300);
|
|
56
|
-
return (react_1.default.createElement("div", null,
|
|
57
|
-
react_1.default.createElement(material_1.TextField, { label: "Min", fullWidth: true, size: "small", type: "number", value: value[0], onChange: function (evt) {
|
|
58
|
-
var parsedValue = parseInt(evt.target.value);
|
|
59
|
-
var newMin = !Number.isNaN(parsedValue) ? parsedValue : min;
|
|
60
|
-
var newValue = newMin < value[1] ? [newMin, value[1]] : [value[1], newMin];
|
|
61
|
-
setValue(newValue);
|
|
62
|
-
onChange(newValue);
|
|
63
|
-
} }),
|
|
64
|
-
react_1.default.createElement(material_1.Slider, { size: "small", min: min, max: max, value: value, onChange: function (evt, newValue) {
|
|
65
|
-
setValue(newValue);
|
|
66
|
-
onChange(newValue);
|
|
67
|
-
} }),
|
|
68
|
-
react_1.default.createElement(material_1.TextField, { label: "Max", fullWidth: true, size: "small", type: "number", value: value[1], onChange: function (evt) {
|
|
69
|
-
var parsedValue = parseInt(evt.target.value);
|
|
70
|
-
var newMax = !Number.isNaN(parsedValue) ? parsedValue : max;
|
|
71
|
-
var newValue = newMax > value[0] ? [value[0], newMax] : [newMax, value[0]];
|
|
72
|
-
setValue(newValue);
|
|
73
|
-
onChange(newValue);
|
|
74
|
-
} })));
|
|
75
|
-
}
|
|
76
|
-
exports.default = RangeFilter;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
38
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39
|
-
if (ar || !(i in from)) {
|
|
40
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
41
|
-
ar[i] = from[i];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45
|
-
};
|
|
46
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.BLANK_VALUE_LABEL = void 0;
|
|
51
|
-
var react_1 = __importStar(require("react"));
|
|
52
|
-
var InputSearchDropdown_1 = __importDefault(require("../../../InputSearchDropdown"));
|
|
53
|
-
exports.BLANK_VALUE_LABEL = '<Blank>';
|
|
54
|
-
function SingleSelectFilter(_a) {
|
|
55
|
-
var column = _a.column, _b = _a.column, filterValue = _b.filterValue, preFilteredRows = _b.preFilteredRows, setFilter = _b.setFilter;
|
|
56
|
-
var options = (0, react_1.useMemo)(function () {
|
|
57
|
-
var options = new Set();
|
|
58
|
-
preFilteredRows.forEach(function (row) {
|
|
59
|
-
var value = row.values[column.id];
|
|
60
|
-
options.add(value === '' ? exports.BLANK_VALUE_LABEL : value);
|
|
61
|
-
});
|
|
62
|
-
return __spreadArray([], __read(options.values()), false);
|
|
63
|
-
}, [column.id, preFilteredRows]);
|
|
64
|
-
return (react_1.default.createElement(InputSearchDropdown_1.default, { label: "Filter Value", size: "small", fullWidth: true, value: filterValue || null, onChange: function (_a) {
|
|
65
|
-
var value = _a.target.value;
|
|
66
|
-
return setFilter(value === exports.BLANK_VALUE_LABEL ? '' : value);
|
|
67
|
-
}, getOptionLabel: function (option) { return option === null || option === void 0 ? void 0 : option.toString(); }, options: options }));
|
|
68
|
-
}
|
|
69
|
-
exports.default = SingleSelectFilter;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
var react_1 = __importStar(require("react"));
|
|
39
|
-
var react_table_1 = require("react-table");
|
|
40
|
-
var material_1 = require("@mui/material");
|
|
41
|
-
function TextFilter(_a) {
|
|
42
|
-
var _b = _a.column, filterValue = _b.filterValue, setFilter = _b.setFilter;
|
|
43
|
-
var _c = __read((0, react_1.useState)(filterValue || ''), 2), value = _c[0], setValue = _c[1];
|
|
44
|
-
var onChange = (0, react_table_1.useAsyncDebounce)(function (value) {
|
|
45
|
-
setFilter(value || undefined);
|
|
46
|
-
}, 300);
|
|
47
|
-
return (react_1.default.createElement(material_1.TextField, { fullWidth: true, size: "small", label: "Filter Value", value: value, onChange: function (evt) {
|
|
48
|
-
setValue(evt.target.value);
|
|
49
|
-
onChange(evt.target.value);
|
|
50
|
-
} }));
|
|
51
|
-
}
|
|
52
|
-
exports.default = TextFilter;
|
|
@@ -1,78 +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 react_2 = require("react");
|
|
30
|
-
var material_1 = require("@mui/material");
|
|
31
|
-
var icons_material_1 = require("@mui/icons-material");
|
|
32
|
-
var nanoid_1 = require("nanoid");
|
|
33
|
-
var InputSearchDropdown_1 = __importDefault(require("../../InputSearchDropdown"));
|
|
34
|
-
function FilterTool(_a) {
|
|
35
|
-
var allColumns = _a.allColumns, columnNameById = _a.columnNameById, setAllFilters = _a.setAllFilters;
|
|
36
|
-
var popoverId = (0, react_2.useMemo)(function () { return (0, nanoid_1.nanoid)(); }, []);
|
|
37
|
-
var _b = __read((0, react_2.useState)(null), 2), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
38
|
-
var _c = __read((0, react_2.useState)(null), 2), filter = _c[0], setFilter = _c[1];
|
|
39
|
-
var open = !!anchorEl;
|
|
40
|
-
var _d = (0, react_2.useMemo)(function () {
|
|
41
|
-
var columnById = {};
|
|
42
|
-
var options = [];
|
|
43
|
-
allColumns.forEach(function (col) {
|
|
44
|
-
if (col.canFilter) {
|
|
45
|
-
columnById[col.id] = col;
|
|
46
|
-
options.push(col.id);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
return { columnById: columnById, options: options };
|
|
50
|
-
}, [allColumns]), columnById = _d.columnById, options = _d.options;
|
|
51
|
-
function handleClick(evt) {
|
|
52
|
-
setAnchorEl(evt.currentTarget);
|
|
53
|
-
}
|
|
54
|
-
function handleClose() {
|
|
55
|
-
setAnchorEl(null);
|
|
56
|
-
setFilter(null);
|
|
57
|
-
}
|
|
58
|
-
return ((0, react_1.jsx)(react_2.Fragment, null,
|
|
59
|
-
(0, react_1.jsx)(material_1.Tooltip, { title: "Filter Table" },
|
|
60
|
-
(0, react_1.jsx)(material_1.IconButton, { "aria-describedby": popoverId, onClick: handleClick },
|
|
61
|
-
(0, react_1.jsx)(icons_material_1.FilterList, null))),
|
|
62
|
-
(0, react_1.jsx)(material_1.Popover, { id: popoverId, open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'center' } },
|
|
63
|
-
(0, react_1.jsx)(material_1.Grid, { container: true, spacing: 1, css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 1rem;\n width: 15rem;\n "], ["\n padding: 1rem;\n width: 15rem;\n "]))) },
|
|
64
|
-
(0, react_1.jsx)(material_1.Grid, { css: (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.5rem;\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.5rem;\n "]))), item: true, sm: 12 },
|
|
65
|
-
(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 "]))) }, "Filters"),
|
|
66
|
-
(0, react_1.jsx)("div", null,
|
|
67
|
-
(0, react_1.jsx)(material_1.Tooltip, { title: "Clear All Filters" },
|
|
68
|
-
(0, react_1.jsx)(material_1.IconButton, { onClick: function () { return setAllFilters([]); } },
|
|
69
|
-
(0, react_1.jsx)(icons_material_1.ClearAll, null))),
|
|
70
|
-
(0, react_1.jsx)(material_1.Tooltip, { title: "Close" },
|
|
71
|
-
(0, react_1.jsx)(material_1.IconButton, { onClick: handleClose },
|
|
72
|
-
(0, react_1.jsx)(icons_material_1.Close, null))))),
|
|
73
|
-
(0, react_1.jsx)(material_1.Grid, { css: (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: 1rem;\n "], ["\n margin-bottom: 1rem;\n "]))), item: true, sm: 12 },
|
|
74
|
-
(0, react_1.jsx)(InputSearchDropdown_1.default, { label: "Column", size: "small", fullWidth: true, value: filter, onChange: function (evt) { return setFilter(evt.target.value); }, options: options, getOptionLabel: function (option) { return columnNameById[option]; } })),
|
|
75
|
-
filter && columnById[filter].canFilter && ((0, react_1.jsx)(material_1.Grid, { item: true, sm: 12 }, columnById[filter].render('Filter')))))));
|
|
76
|
-
}
|
|
77
|
-
exports.default = FilterTool;
|
|
78
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
interface Props {
|
|
5
|
-
setShowSearch: (value: boolean) => void;
|
|
6
|
-
globalFilter: string;
|
|
7
|
-
setGlobalFilter: (filterValue: any) => void;
|
|
8
|
-
}
|
|
9
|
-
export default function GlobalSearchFilter({ globalFilter, setGlobalFilter, setShowSearch }: Props): jsx.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -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,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,10 +0,0 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
interface Props {
|
|
5
|
-
canSort?: boolean;
|
|
6
|
-
isSorted?: boolean;
|
|
7
|
-
isSortedDesc?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export default function SortIndicator({ canSort, isSorted, isSortedDesc }: Props): jsx.JSX.Element | null;
|
|
10
|
-
export {};
|
|
@@ -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,26 +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 material_1 = require("@mui/material");
|
|
11
|
-
var SingleSelectFilter_1 = require("../FilterTool/Filters/SingleSelectFilter");
|
|
12
|
-
var PADDING = 24;
|
|
13
|
-
function AppliedFilters(_a) {
|
|
14
|
-
var columnNameById = _a.columnNameById, filters = _a.filters, setFilter = _a.setFilter;
|
|
15
|
-
if (!filters.length) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
return ((0, react_1.jsx)(material_1.Stack, { direction: "row", overflow: "none", css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: calc(100% - ", "px);\n padding: 8px ", "px;\n flex-wrap: wrap;\n gap: 0.25rem 0.25rem;\n "], ["\n width: calc(100% - ", "px);\n padding: 8px ", "px;\n flex-wrap: wrap;\n gap: 0.25rem 0.25rem;\n "])), PADDING * 2, PADDING) }, filters
|
|
19
|
-
.filter(function (filter) {
|
|
20
|
-
return (Array.isArray(filter.value) && !!filter.value.length) ||
|
|
21
|
-
(!Array.isArray(filter.value) && filter.value != null);
|
|
22
|
-
})
|
|
23
|
-
.map(function (filter) { return ((0, react_1.jsx)(material_1.Chip, { key: filter.id, label: columnNameById[filter.id] + ": " + (filter.value === '' ? SingleSelectFilter_1.BLANK_VALUE_LABEL : filter.value), onDelete: function () { return setFilter(filter.id, null); } })); })));
|
|
24
|
-
}
|
|
25
|
-
exports.default = AppliedFilters;
|
|
26
|
-
var templateObject_1;
|