@popmenu/table 0.125.0 → 0.126.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/_virtual/_commonjsHelpers.js +4 -0
- package/build/esm/_virtual/_commonjsHelpers.js.map +1 -0
- package/build/{components → esm/components}/ColumnFilterChip/ColumnFilterChip.d.ts +9 -9
- package/build/esm/components/ColumnFilterChip/ColumnFilterChip.js +17 -0
- package/build/esm/components/ColumnFilterChip/ColumnFilterChip.js.map +1 -0
- package/build/esm/components/ColumnFilterChip/ColumnFilterChipStyles.d.ts +1 -0
- package/build/esm/components/ColumnFilterChip/ColumnFilterChipStyles.js +14 -0
- package/build/esm/components/ColumnFilterChip/ColumnFilterChipStyles.js.map +1 -0
- package/build/{components → esm/components}/ColumnFilterChip/index.d.ts +1 -1
- package/build/{components → esm/components}/ColumnFilterResetButton/ColumnFilterResetButton.d.ts +3 -3
- package/build/esm/components/ColumnFilterResetButton/ColumnFilterResetButton.js +11 -0
- package/build/esm/components/ColumnFilterResetButton/ColumnFilterResetButton.js.map +1 -0
- package/build/{components → esm/components}/ColumnFilterResetButton/index.d.ts +1 -1
- package/build/{components → esm/components}/FilterPanel/FilterControl/FilterControl.d.ts +3 -3
- package/build/esm/components/FilterPanel/FilterControl/FilterControl.js +24 -0
- package/build/esm/components/FilterPanel/FilterControl/FilterControl.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/FilterControl/SelectFilter/SelectFilter.d.ts +5 -5
- package/build/esm/components/FilterPanel/FilterControl/SelectFilter/SelectFilter.js +97 -0
- package/build/esm/components/FilterPanel/FilterControl/SelectFilter/SelectFilter.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/FilterControl/SelectFilter/SelectFilterStyles.d.ts +1 -1
- package/build/esm/components/FilterPanel/FilterControl/SelectFilter/SelectFilterStyles.js +23 -0
- package/build/esm/components/FilterPanel/FilterControl/SelectFilter/SelectFilterStyles.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/FilterControl/SelectFilter/index.d.ts +1 -1
- package/build/{components → esm/components}/FilterPanel/FilterControl/ToggleFilter/ToggleFilter.d.ts +4 -4
- package/build/esm/components/FilterPanel/FilterControl/ToggleFilter/ToggleFilter.js +20 -0
- package/build/esm/components/FilterPanel/FilterControl/ToggleFilter/ToggleFilter.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/FilterControl/ToggleFilter/index.d.ts +1 -1
- package/build/{components → esm/components}/FilterPanel/FilterControl/index.d.ts +1 -1
- package/build/{components → esm/components}/FilterPanel/FilterPanel.d.ts +2 -2
- package/build/esm/components/FilterPanel/FilterPanel.js +24 -0
- package/build/esm/components/FilterPanel/FilterPanel.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/FilterPanelContext/FilterPanelContext.d.ts +7 -7
- package/build/esm/components/FilterPanel/FilterPanelContext/FilterPanelContext.js +13 -0
- package/build/esm/components/FilterPanel/FilterPanelContext/FilterPanelContext.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/FilterPanelContext/index.d.ts +1 -1
- package/build/{components → esm/components}/FilterPanel/FilterPanelProps.d.ts +11 -11
- package/build/{components → esm/components}/FilterPanel/Panel/Panel.d.ts +7 -7
- package/build/esm/components/FilterPanel/Panel/Panel.js +72 -0
- package/build/esm/components/FilterPanel/Panel/Panel.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/Panel/PanelStyles.d.ts +1 -1
- package/build/esm/components/FilterPanel/Panel/PanelStyles.js +58 -0
- package/build/esm/components/FilterPanel/Panel/PanelStyles.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/Panel/index.d.ts +1 -1
- package/build/{components → esm/components}/FilterPanel/Trigger/Trigger.d.ts +7 -7
- package/build/esm/components/FilterPanel/Trigger/Trigger.js +14 -0
- package/build/esm/components/FilterPanel/Trigger/Trigger.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/Trigger/TriggerStyles.d.ts +1 -1
- package/build/esm/components/FilterPanel/Trigger/TriggerStyles.js +11 -0
- package/build/esm/components/FilterPanel/Trigger/TriggerStyles.js.map +1 -0
- package/build/{components → esm/components}/FilterPanel/Trigger/index.d.ts +1 -1
- package/build/{components → esm/components}/FilterPanel/index.d.ts +1 -1
- package/build/{components → esm/components}/GlobalFilter/GlobalFilter.d.ts +3 -3
- package/build/esm/components/GlobalFilter/GlobalFilter.js +21 -0
- package/build/esm/components/GlobalFilter/GlobalFilter.js.map +1 -0
- package/build/{components → esm/components}/GlobalFilter/GlobalFilterProps.d.ts +7 -7
- package/build/{components → esm/components}/GlobalFilter/GlobalFilterStyles.d.ts +1 -1
- package/build/esm/components/GlobalFilter/GlobalFilterStyles.js +14 -0
- package/build/esm/components/GlobalFilter/GlobalFilterStyles.js.map +1 -0
- package/build/{components → esm/components}/GlobalFilter/index.d.ts +2 -2
- package/build/{components → esm/components}/RowActions/RowActions.d.ts +3 -3
- package/build/esm/components/RowActions/RowActions.js +42 -0
- package/build/esm/components/RowActions/RowActions.js.map +1 -0
- package/build/{components → esm/components}/RowActions/RowActionsProps.d.ts +13 -13
- package/build/{components → esm/components}/RowActions/index.d.ts +2 -2
- package/build/{components → esm/components}/Table/Table.d.ts +21 -21
- package/build/esm/components/Table/Table.js +107 -0
- package/build/esm/components/Table/Table.js.map +1 -0
- package/build/{components → esm/components}/Table/TableProps.d.ts +47 -47
- package/build/{components → esm/components}/Table/TableStyles.d.ts +2 -2
- package/build/esm/components/Table/TableStyles.js +28 -0
- package/build/esm/components/Table/TableStyles.js.map +1 -0
- package/build/{components → esm/components}/Table/index.d.ts +2 -2
- package/build/{components → esm/components}/TableBody/TableBody.d.ts +4 -4
- package/build/esm/components/TableBody/TableBody.js +10 -0
- package/build/esm/components/TableBody/TableBody.js.map +1 -0
- package/build/{components → esm/components}/TableBody/index.d.ts +1 -1
- package/build/{components → esm/components}/TableCell/TableCell.d.ts +4 -4
- package/build/esm/components/TableCell/TableCell.js +12 -0
- package/build/esm/components/TableCell/TableCell.js.map +1 -0
- package/build/{components → esm/components}/TableCell/TableCellStyles.d.ts +1 -1
- package/build/esm/components/TableCell/TableCellStyles.js +11 -0
- package/build/esm/components/TableCell/TableCellStyles.js.map +1 -0
- package/build/{components → esm/components}/TableCell/index.d.ts +1 -1
- package/build/{components → esm/components}/TableContext/index.d.ts +16 -16
- package/build/esm/components/TableContext/index.js +6 -0
- package/build/esm/components/TableContext/index.js.map +1 -0
- package/build/{components → esm/components}/TableControlsContainer/TableControlsContainer.d.ts +3 -3
- package/build/esm/components/TableControlsContainer/TableControlsContainer.js +34 -0
- package/build/esm/components/TableControlsContainer/TableControlsContainer.js.map +1 -0
- package/build/{components → esm/components}/TableControlsContainer/TableControlsContainerProps.d.ts +6 -6
- package/build/{components → esm/components}/TableControlsContainer/index.d.ts +1 -1
- package/build/{components → esm/components}/TableFooter/TableFooter.d.ts +4 -4
- package/build/esm/components/TableFooter/TableFooter.js +9 -0
- package/build/esm/components/TableFooter/TableFooter.js.map +1 -0
- package/build/{components → esm/components}/TableFooter/index.d.ts +1 -1
- package/build/{components → esm/components}/TableHeader/TableHeader.d.ts +4 -4
- package/build/esm/components/TableHeader/TableHeader.js +10 -0
- package/build/esm/components/TableHeader/TableHeader.js.map +1 -0
- package/build/{components → esm/components}/TableHeader/index.d.ts +1 -1
- package/build/{components → esm/components}/TableHeaderCell/TableHeaderCell.d.ts +3 -3
- package/build/esm/components/TableHeaderCell/TableHeaderCell.js +31 -0
- package/build/esm/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
- package/build/{components → esm/components}/TableHeaderCell/TableHeaderCellProps.d.ts +6 -6
- package/build/{components → esm/components}/TableHeaderCell/TableHeaderCellStyles.d.ts +4 -4
- package/build/esm/components/TableHeaderCell/TableHeaderCellStyles.js +41 -0
- package/build/esm/components/TableHeaderCell/TableHeaderCellStyles.js.map +1 -0
- package/build/{components → esm/components}/TableHeaderCell/index.d.ts +2 -2
- package/build/{components → esm/components}/TableHeaderRow/TableHeaderRow.d.ts +4 -4
- package/build/esm/components/TableHeaderRow/TableHeaderRow.js +10 -0
- package/build/esm/components/TableHeaderRow/TableHeaderRow.js.map +1 -0
- package/build/{components → esm/components}/TableHeaderRow/index.d.ts +1 -1
- package/build/{components → esm/components}/TableRow/TableRow.d.ts +4 -4
- package/build/esm/components/TableRow/TableRow.js +12 -0
- package/build/esm/components/TableRow/TableRow.js.map +1 -0
- package/build/{components → esm/components}/TableRow/TableRowStyles.d.ts +1 -1
- package/build/esm/components/TableRow/TableRowStyles.js +12 -0
- package/build/esm/components/TableRow/TableRowStyles.js.map +1 -0
- package/build/{components → esm/components}/TableRow/index.d.ts +1 -1
- package/build/{components → esm/components}/index.d.ts +10 -10
- package/build/{hooks → esm/hooks}/index.d.ts +2 -2
- package/build/{hooks → esm/hooks}/useColumnFilters.d.ts +9 -9
- package/build/esm/hooks/useColumnFilters.js +74 -0
- package/build/esm/hooks/useColumnFilters.js.map +1 -0
- package/build/{hooks → esm/hooks}/useStagedColumnFilters.d.ts +8 -8
- package/build/esm/hooks/useStagedColumnFilters.js +55 -0
- package/build/esm/hooks/useStagedColumnFilters.js.map +1 -0
- package/build/{index.d.ts → esm/index.d.ts} +1 -1
- package/build/esm/index.js +11 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/node_modules/lodash/_Symbol.js +11 -0
- package/build/esm/node_modules/lodash/_Symbol.js.map +1 -0
- package/build/esm/node_modules/lodash/_arrayMap.js +25 -0
- package/build/esm/node_modules/lodash/_arrayMap.js.map +1 -0
- package/build/esm/node_modules/lodash/_arrayReduce.js +30 -0
- package/build/esm/node_modules/lodash/_arrayReduce.js.map +1 -0
- package/build/esm/node_modules/lodash/_asciiWords.js +19 -0
- package/build/esm/node_modules/lodash/_asciiWords.js.map +1 -0
- package/build/esm/node_modules/lodash/_baseGetTag.js +35 -0
- package/build/esm/node_modules/lodash/_baseGetTag.js.map +1 -0
- package/build/esm/node_modules/lodash/_basePropertyOf.js +18 -0
- package/build/esm/node_modules/lodash/_basePropertyOf.js.map +1 -0
- package/build/esm/node_modules/lodash/_baseToString.js +42 -0
- package/build/esm/node_modules/lodash/_baseToString.js.map +1 -0
- package/build/esm/node_modules/lodash/_createCompounder.js +31 -0
- package/build/esm/node_modules/lodash/_createCompounder.js.map +1 -0
- package/build/esm/node_modules/lodash/_deburrLetter.js +76 -0
- package/build/esm/node_modules/lodash/_deburrLetter.js.map +1 -0
- package/build/esm/node_modules/lodash/_freeGlobal.js +10 -0
- package/build/esm/node_modules/lodash/_freeGlobal.js.map +1 -0
- package/build/esm/node_modules/lodash/_getRawTag.js +51 -0
- package/build/esm/node_modules/lodash/_getRawTag.js.map +1 -0
- package/build/esm/node_modules/lodash/_hasUnicodeWord.js +19 -0
- package/build/esm/node_modules/lodash/_hasUnicodeWord.js.map +1 -0
- package/build/esm/node_modules/lodash/_objectToString.js +26 -0
- package/build/esm/node_modules/lodash/_objectToString.js.map +1 -0
- package/build/esm/node_modules/lodash/_root.js +14 -0
- package/build/esm/node_modules/lodash/_root.js.map +1 -0
- package/build/esm/node_modules/lodash/_unicodeWords.js +73 -0
- package/build/esm/node_modules/lodash/_unicodeWords.js.map +1 -0
- package/build/esm/node_modules/lodash/deburr.js +51 -0
- package/build/esm/node_modules/lodash/deburr.js.map +1 -0
- package/build/esm/node_modules/lodash/isArray.js +30 -0
- package/build/esm/node_modules/lodash/isArray.js.map +1 -0
- package/build/esm/node_modules/lodash/isObjectLike.js +33 -0
- package/build/esm/node_modules/lodash/isObjectLike.js.map +1 -0
- package/build/esm/node_modules/lodash/isSymbol.js +35 -0
- package/build/esm/node_modules/lodash/isSymbol.js.map +1 -0
- package/build/esm/node_modules/lodash/kebabCase.js +33 -0
- package/build/esm/node_modules/lodash/kebabCase.js.map +1 -0
- package/build/esm/node_modules/lodash/toString.js +33 -0
- package/build/esm/node_modules/lodash/toString.js.map +1 -0
- package/build/esm/node_modules/lodash/words.js +43 -0
- package/build/esm/node_modules/lodash/words.js.map +1 -0
- package/build/{util → esm/util}/coercedValueIncludesString.d.ts +2 -2
- package/build/esm/util/coercedValueIncludesString.js +9 -0
- package/build/esm/util/coercedValueIncludesString.js.map +1 -0
- package/build/{util → esm/util}/getTableMinHeight.d.ts +2 -2
- package/build/esm/util/getTableMinHeight.js +20 -0
- package/build/esm/util/getTableMinHeight.js.map +1 -0
- package/build/{util → esm/util}/index.d.ts +3 -3
- package/build/{util → esm/util}/tableConstants.d.ts +5 -5
- package/build/esm/util/tableConstants.js +6 -0
- package/build/esm/util/tableConstants.js.map +1 -0
- package/build/{util → esm/util}/validateRowAction.d.ts +2 -2
- package/build/esm/util/validateRowAction.js +12 -0
- package/build/esm/util/validateRowAction.js.map +1 -0
- package/build/index.js +694 -3716
- package/build/index.js.map +1 -1
- package/package.json +8 -4
- package/build/components/ColumnFilterChip/ColumnFilterChipStyles.d.ts +0 -1
- package/build/index.es.js +0 -4407
- package/build/index.es.js.map +0 -1
package/build/index.js
CHANGED
|
@@ -1,3597 +1,578 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var tslib = require('tslib');
|
|
5
4
|
var React = require('react');
|
|
6
5
|
var core = require('@material-ui/core');
|
|
7
6
|
var lab = require('@material-ui/lab');
|
|
7
|
+
var commonUi = require('@popmenu/common-ui');
|
|
8
8
|
var reactTable = require('@tanstack/react-table');
|
|
9
|
-
var
|
|
10
|
-
require('@
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
require('@material-ui/core/CardActionArea');
|
|
19
|
-
var CardActions = require('@material-ui/core/CardActions');
|
|
20
|
-
var CardContent = require('@material-ui/core/CardContent');
|
|
21
|
-
require('@material-ui/core/CardHeader');
|
|
22
|
-
require('@material-ui/core/CardMedia');
|
|
23
|
-
var MuiCheckbox = require('@material-ui/core/Checkbox');
|
|
24
|
-
var FormControlLabel = require('@material-ui/core/FormControlLabel');
|
|
25
|
-
var MuiChip = require('@material-ui/core/Chip');
|
|
26
|
-
require('@material-ui/core/Collapse');
|
|
27
|
-
var Dialog = require('@material-ui/core/Dialog');
|
|
28
|
-
require('@material-ui/core/DialogActions');
|
|
29
|
-
require('@material-ui/core/DialogContent');
|
|
30
|
-
require('@material-ui/core/DialogTitle');
|
|
31
|
-
require('@material-ui/core/Drawer');
|
|
32
|
-
require('@material-ui/core/FormControl');
|
|
33
|
-
require('@material-ui/core/Grid');
|
|
34
|
-
var MuiIconButton = require('@material-ui/core/IconButton');
|
|
35
|
-
require('@material-ui/core/InputAdornment');
|
|
36
|
-
require('@material-ui/core/LinearProgress');
|
|
37
|
-
require('@material-ui/core/List');
|
|
38
|
-
require('@material-ui/core/ListItem');
|
|
39
|
-
require('@material-ui/core/ListItemAvatar');
|
|
40
|
-
require('@material-ui/core/ListItemIcon');
|
|
41
|
-
require('@material-ui/core/ListItemSecondaryAction');
|
|
42
|
-
require('@material-ui/core/ListItemText');
|
|
43
|
-
var Menu = require('@material-ui/core/Menu');
|
|
44
|
-
var MenuItem = require('@material-ui/core/MenuItem');
|
|
45
|
-
require('@material-ui/core/MenuList');
|
|
46
|
-
var MuiRadio = require('@material-ui/core/Radio');
|
|
47
|
-
require('@material-ui/core/TextField');
|
|
48
|
-
var MuiSwitch = require('@material-ui/core/Switch');
|
|
49
|
-
require('@material-ui/core/Tab');
|
|
50
|
-
require('@material-ui/core/Tabs');
|
|
51
|
-
var MuiToggleButton = require('@material-ui/lab/ToggleButton');
|
|
52
|
-
var MuiToggleButtonGroup = require('@material-ui/lab/ToggleButtonGroup');
|
|
53
|
-
var MuiTooltip = require('@material-ui/core/Tooltip');
|
|
54
|
-
require('@material-ui/lab/AlertTitle');
|
|
55
|
-
require('@material-ui/core/Box');
|
|
56
|
-
require('@material-ui/core/Snackbar');
|
|
57
|
-
var createTheme = require('@material-ui/core/styles/createTheme');
|
|
58
|
-
|
|
59
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
60
|
-
|
|
61
|
-
function _interopNamespace(e) {
|
|
62
|
-
if (e && e.__esModule) return e;
|
|
63
|
-
var n = Object.create(null);
|
|
64
|
-
if (e) {
|
|
65
|
-
Object.keys(e).forEach(function (k) {
|
|
66
|
-
if (k !== 'default') {
|
|
67
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
68
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function () {
|
|
71
|
-
return e[k];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
n['default'] = e;
|
|
78
|
-
return Object.freeze(n);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
82
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
83
|
-
var CommonAlert__default = /*#__PURE__*/_interopDefaultLegacy(CommonAlert);
|
|
84
|
-
var MuiAvatar__default = /*#__PURE__*/_interopDefaultLegacy(MuiAvatar);
|
|
85
|
-
var MuiButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiButton);
|
|
86
|
-
var CircularProgress__default = /*#__PURE__*/_interopDefaultLegacy(CircularProgress);
|
|
87
|
-
var CommonButtonGroup__default = /*#__PURE__*/_interopDefaultLegacy(CommonButtonGroup);
|
|
88
|
-
var Card__default = /*#__PURE__*/_interopDefaultLegacy(Card);
|
|
89
|
-
var CardActions__default = /*#__PURE__*/_interopDefaultLegacy(CardActions);
|
|
90
|
-
var CardContent__default = /*#__PURE__*/_interopDefaultLegacy(CardContent);
|
|
91
|
-
var MuiCheckbox__default = /*#__PURE__*/_interopDefaultLegacy(MuiCheckbox);
|
|
92
|
-
var FormControlLabel__default = /*#__PURE__*/_interopDefaultLegacy(FormControlLabel);
|
|
93
|
-
var MuiChip__default = /*#__PURE__*/_interopDefaultLegacy(MuiChip);
|
|
94
|
-
var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
|
|
95
|
-
var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
|
|
96
|
-
var Menu__default = /*#__PURE__*/_interopDefaultLegacy(Menu);
|
|
97
|
-
var MenuItem__default = /*#__PURE__*/_interopDefaultLegacy(MenuItem);
|
|
98
|
-
var MuiRadio__default = /*#__PURE__*/_interopDefaultLegacy(MuiRadio);
|
|
99
|
-
var MuiSwitch__default = /*#__PURE__*/_interopDefaultLegacy(MuiSwitch);
|
|
100
|
-
var MuiToggleButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiToggleButton);
|
|
101
|
-
var MuiToggleButtonGroup__default = /*#__PURE__*/_interopDefaultLegacy(MuiToggleButtonGroup);
|
|
102
|
-
var MuiTooltip__default = /*#__PURE__*/_interopDefaultLegacy(MuiTooltip);
|
|
103
|
-
var createTheme__default = /*#__PURE__*/_interopDefaultLegacy(createTheme);
|
|
104
|
-
|
|
105
|
-
/*! *****************************************************************************
|
|
106
|
-
Copyright (c) Microsoft Corporation.
|
|
107
|
-
|
|
108
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
109
|
-
purpose with or without fee is hereby granted.
|
|
110
|
-
|
|
111
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
112
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
113
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
114
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
115
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
116
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
117
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
118
|
-
***************************************************************************** */
|
|
119
|
-
|
|
120
|
-
var __assign$3 = function() {
|
|
121
|
-
__assign$3 = Object.assign || function __assign(t) {
|
|
122
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
123
|
-
s = arguments[i];
|
|
124
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
125
|
-
}
|
|
126
|
-
return t;
|
|
127
|
-
};
|
|
128
|
-
return __assign$3.apply(this, arguments);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
function __rest$3(s, e) {
|
|
132
|
-
var t = {};
|
|
133
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
134
|
-
t[p] = s[p];
|
|
135
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
136
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
137
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
138
|
-
t[p[i]] = s[p[i]];
|
|
139
|
-
}
|
|
140
|
-
return t;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function __spreadArray(to, from, pack) {
|
|
144
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
145
|
-
if (ar || !(i in from)) {
|
|
146
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
147
|
-
ar[i] = from[i];
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return to.concat(ar || from);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/*! *****************************************************************************
|
|
154
|
-
Copyright (c) Microsoft Corporation.
|
|
155
|
-
|
|
156
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
157
|
-
purpose with or without fee is hereby granted.
|
|
158
|
-
|
|
159
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
160
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
161
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
162
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
163
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
164
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
165
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
166
|
-
***************************************************************************** */
|
|
167
|
-
|
|
168
|
-
var __assign$2 = function() {
|
|
169
|
-
__assign$2 = Object.assign || function __assign(t) {
|
|
170
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
171
|
-
s = arguments[i];
|
|
172
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
173
|
-
}
|
|
174
|
-
return t;
|
|
175
|
-
};
|
|
176
|
-
return __assign$2.apply(this, arguments);
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
function __rest$2(s, e) {
|
|
180
|
-
var t = {};
|
|
181
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
182
|
-
t[p] = s[p];
|
|
183
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
184
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
185
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
186
|
-
t[p[i]] = s[p[i]];
|
|
187
|
-
}
|
|
188
|
-
return t;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
var _g$2C$1;
|
|
192
|
-
|
|
193
|
-
function _extends$4K$1() { _extends$4K$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4K$1.apply(this, arguments); }
|
|
194
|
-
|
|
195
|
-
function SvgCheckCircle$1(props) {
|
|
196
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4K$1({
|
|
197
|
-
viewBox: "0 0 16 16",
|
|
198
|
-
fill: "none",
|
|
199
|
-
strokeLinecap: "round",
|
|
200
|
-
strokeLinejoin: "round",
|
|
201
|
-
width: "1em",
|
|
202
|
-
height: "1em"
|
|
203
|
-
}, props), _g$2C$1 || (_g$2C$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
204
|
-
stroke: "currentColor"
|
|
205
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
206
|
-
d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
|
|
207
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
208
|
-
d: "M14.667 2.667L8 9.34l-2-2"
|
|
209
|
-
}))));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
var _g$2z, _defs$1D;
|
|
213
|
-
|
|
214
|
-
function _extends$4G() { _extends$4G = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4G.apply(this, arguments); }
|
|
215
|
-
|
|
216
|
-
function SvgXCircle(props) {
|
|
217
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4G({
|
|
218
|
-
viewBox: "0 0 16 16",
|
|
219
|
-
fill: "none",
|
|
220
|
-
strokeLinecap: "round",
|
|
221
|
-
strokeLinejoin: "round",
|
|
222
|
-
width: "1em",
|
|
223
|
-
height: "1em"
|
|
224
|
-
}, props), _g$2z || (_g$2z = /*#__PURE__*/React__namespace.createElement("g", {
|
|
225
|
-
clipPath: "url(#x-circle_svg__clip0_8_6136)",
|
|
226
|
-
stroke: "currentColor"
|
|
227
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
228
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM10 6l-4 4m0-4l4 4"
|
|
229
|
-
}))), _defs$1D || (_defs$1D = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
230
|
-
id: "x-circle_svg__clip0_8_6136"
|
|
231
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
232
|
-
fill: "currentColor",
|
|
233
|
-
d: "M0 0h16v16H0z"
|
|
234
|
-
})))));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
var _g$2m$1, _defs$1t$1;
|
|
238
|
-
|
|
239
|
-
function _extends$4m$1() { _extends$4m$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4m$1.apply(this, arguments); }
|
|
240
|
-
|
|
241
|
-
function SvgInfo$1(props) {
|
|
242
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4m$1({
|
|
243
|
-
viewBox: "0 0 16 16",
|
|
244
|
-
fill: "none",
|
|
245
|
-
strokeLinecap: "round",
|
|
246
|
-
strokeLinejoin: "round",
|
|
247
|
-
width: "1em",
|
|
248
|
-
height: "1em"
|
|
249
|
-
}, props), _g$2m$1 || (_g$2m$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
250
|
-
clipPath: "url(#info_svg__clip0_8_5377)",
|
|
251
|
-
stroke: "currentColor"
|
|
252
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
253
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007"
|
|
254
|
-
}))), _defs$1t$1 || (_defs$1t$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
255
|
-
id: "info_svg__clip0_8_5377"
|
|
256
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
257
|
-
fill: "currentColor",
|
|
258
|
-
d: "M0 0h16v16H0z"
|
|
259
|
-
})))));
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
var _path$1D$1;
|
|
263
|
-
|
|
264
|
-
function _extends$3H$1() { _extends$3H$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3H$1.apply(this, arguments); }
|
|
265
|
-
|
|
266
|
-
function SvgUser$1(props) {
|
|
267
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3H$1({
|
|
268
|
-
viewBox: "0 0 16 16",
|
|
269
|
-
fill: "none",
|
|
270
|
-
strokeLinecap: "round",
|
|
271
|
-
strokeLinejoin: "round",
|
|
272
|
-
width: "1em",
|
|
273
|
-
height: "1em"
|
|
274
|
-
}, props), _path$1D$1 || (_path$1D$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
275
|
-
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
|
|
276
|
-
stroke: "currentColor"
|
|
277
|
-
})));
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
var _g$20$1, _defs$1f$1;
|
|
281
|
-
|
|
282
|
-
function _extends$3w$1() { _extends$3w$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3w$1.apply(this, arguments); }
|
|
283
|
-
|
|
284
|
-
function SvgError$1(props) {
|
|
285
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3w$1({
|
|
286
|
-
viewBox: "0 0 16 16",
|
|
287
|
-
fill: "none",
|
|
288
|
-
strokeLinecap: "round",
|
|
289
|
-
strokeLinejoin: "round",
|
|
290
|
-
width: "1em",
|
|
291
|
-
height: "1em"
|
|
292
|
-
}, props), _g$20$1 || (_g$20$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
293
|
-
clipPath: "url(#error_svg__clip0_8_5411)",
|
|
294
|
-
stroke: "currentColor"
|
|
295
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
296
|
-
d: "M5.24 1.333h5.52l3.907 3.907v5.52l-3.907 3.907H5.24L1.333 10.76V5.24L5.24 1.333zm2.76 4V8m0 2.666h.008"
|
|
297
|
-
}))), _defs$1f$1 || (_defs$1f$1 = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
298
|
-
id: "error_svg__clip0_8_5411"
|
|
299
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
300
|
-
fill: "currentColor",
|
|
301
|
-
d: "M0 0h16v16H0z"
|
|
302
|
-
})))));
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
var _path$1u$1;
|
|
306
|
-
|
|
307
|
-
function _extends$3v$1() { _extends$3v$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3v$1.apply(this, arguments); }
|
|
308
|
-
|
|
309
|
-
function SvgWarning$1(props) {
|
|
310
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3v$1({
|
|
311
|
-
viewBox: "0 0 16 16",
|
|
312
|
-
fill: "none",
|
|
313
|
-
strokeLinecap: "round",
|
|
314
|
-
strokeLinejoin: "round",
|
|
315
|
-
width: "1em",
|
|
316
|
-
height: "1em"
|
|
317
|
-
}, props), _path$1u$1 || (_path$1u$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
318
|
-
d: "M6.86 2.573L1.213 12a1.334 1.334 0 001.14 2h11.294a1.332 1.332 0 001.14-2L9.14 2.573a1.333 1.333 0 00-2.28 0v0zM8 6v2.667m0 2.667h.007",
|
|
319
|
-
stroke: "currentColor"
|
|
320
|
-
})));
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
var useIconStyles$1 = core.makeStyles(function (_a) {
|
|
324
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
325
|
-
var getFontSize = function (_a) {
|
|
326
|
-
var size = _a.size;
|
|
327
|
-
var sizes = {
|
|
328
|
-
inherit: 'inherit',
|
|
329
|
-
small: spacing(1.5),
|
|
330
|
-
medium: spacing(2),
|
|
331
|
-
large: spacing(2.5),
|
|
332
|
-
'extra-large': spacing(3),
|
|
333
|
-
};
|
|
334
|
-
return size ? sizes[size] : 'inherit';
|
|
335
|
-
};
|
|
336
|
-
var getColor = function (props) {
|
|
337
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
338
|
-
var value = 'inherit';
|
|
339
|
-
if (props.color) {
|
|
340
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
341
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
342
|
-
// @ts-expect-error - todo.
|
|
343
|
-
value = palette[color][variant];
|
|
344
|
-
}
|
|
345
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
346
|
-
value = props.color;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
return value;
|
|
350
|
-
};
|
|
351
|
-
return {
|
|
352
|
-
root: {
|
|
353
|
-
color: getColor,
|
|
354
|
-
fontSize: getFontSize,
|
|
355
|
-
strokeWidth: '1.3px',
|
|
356
|
-
},
|
|
357
|
-
};
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
var classnames$2 = {exports: {}};
|
|
361
|
-
|
|
362
|
-
/*!
|
|
363
|
-
Copyright (c) 2018 Jed Watson.
|
|
364
|
-
Licensed under the MIT License (MIT), see
|
|
365
|
-
http://jedwatson.github.io/classnames
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
|
-
(function (module) {
|
|
369
|
-
/* global define */
|
|
370
|
-
|
|
371
|
-
(function () {
|
|
372
|
-
|
|
373
|
-
var hasOwn = {}.hasOwnProperty;
|
|
374
|
-
|
|
375
|
-
function classNames() {
|
|
376
|
-
var classes = [];
|
|
377
|
-
|
|
378
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
379
|
-
var arg = arguments[i];
|
|
380
|
-
if (!arg) continue;
|
|
381
|
-
|
|
382
|
-
var argType = typeof arg;
|
|
383
|
-
|
|
384
|
-
if (argType === 'string' || argType === 'number') {
|
|
385
|
-
classes.push(arg);
|
|
386
|
-
} else if (Array.isArray(arg)) {
|
|
387
|
-
if (arg.length) {
|
|
388
|
-
var inner = classNames.apply(null, arg);
|
|
389
|
-
if (inner) {
|
|
390
|
-
classes.push(inner);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
} else if (argType === 'object') {
|
|
394
|
-
if (arg.toString === Object.prototype.toString) {
|
|
395
|
-
for (var key in arg) {
|
|
396
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
397
|
-
classes.push(key);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
} else {
|
|
401
|
-
classes.push(arg.toString());
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
return classes.join(' ');
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
if (module.exports) {
|
|
410
|
-
classNames.default = classNames;
|
|
411
|
-
module.exports = classNames;
|
|
412
|
-
} else {
|
|
413
|
-
window.classNames = classNames;
|
|
414
|
-
}
|
|
415
|
-
}());
|
|
416
|
-
}(classnames$2));
|
|
417
|
-
|
|
418
|
-
var classNames = classnames$2.exports;
|
|
419
|
-
|
|
420
|
-
var iconStaticClassName$1 = 'pop-icon';
|
|
421
|
-
var Icon$1 = function (props) {
|
|
422
|
-
var icon = props.icon, className = props.className, restProps = __rest$2(props, ["icon", "className"]);
|
|
423
|
-
var hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
|
|
424
|
-
if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {
|
|
425
|
-
restProps['aria-hidden'] = true;
|
|
426
|
-
}
|
|
427
|
-
var classes = useIconStyles$1(props);
|
|
428
|
-
var isValid = true;
|
|
429
|
-
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
430
|
-
isValid = false;
|
|
431
|
-
}
|
|
432
|
-
return isValid
|
|
433
|
-
? React.createElement(icon, __assign$2({ className: classNames([classes.root, iconStaticClassName$1, className]) }, restProps))
|
|
434
|
-
: null;
|
|
435
|
-
};
|
|
436
|
-
Icon$1.defaultProps = {
|
|
437
|
-
size: 'inherit',
|
|
438
|
-
color: 'inherit',
|
|
439
|
-
};
|
|
440
|
-
Icon$1.displayName = 'Icon';
|
|
441
|
-
|
|
442
|
-
var LoadingStatus$1;
|
|
443
|
-
(function (LoadingStatus) {
|
|
444
|
-
LoadingStatus["ERROR"] = "ERROR";
|
|
445
|
-
LoadingStatus["LOADED"] = "LOADED";
|
|
446
|
-
LoadingStatus["PENDING"] = "PENDING";
|
|
447
|
-
})(LoadingStatus$1 || (LoadingStatus$1 = {}));
|
|
448
|
-
var useImgProps$1 = function (avatarProps) {
|
|
449
|
-
var _a = React__default['default'].useState(LoadingStatus$1.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
450
|
-
var imgProps = __assign$2(__assign$2({}, avatarProps.imgProps), { onLoad: function (event) {
|
|
451
|
-
var _a, _b;
|
|
452
|
-
setLoaded(LoadingStatus$1.LOADED);
|
|
453
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
454
|
-
} });
|
|
455
|
-
return { imgProps: imgProps, loaded: loaded };
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
var getAvatarDimensions$1 = function (theme, props) {
|
|
459
|
-
var factors = {
|
|
460
|
-
'extra-small': 3,
|
|
461
|
-
small: 4,
|
|
462
|
-
medium: 5,
|
|
463
|
-
large: 6,
|
|
464
|
-
'extra-large': 12.5,
|
|
465
|
-
};
|
|
466
|
-
var sizeFactor = factors[props.size || 'medium'];
|
|
467
|
-
return theme.spacing(sizeFactor);
|
|
468
|
-
};
|
|
469
|
-
var getAvatarFontSize$1 = function (props) {
|
|
470
|
-
var fontSizes = {
|
|
471
|
-
'extra-small': '0.75rem',
|
|
472
|
-
small: '1rem',
|
|
473
|
-
medium: '1rem',
|
|
474
|
-
large: '1.25rem',
|
|
475
|
-
'extra-large': '3.5rem',
|
|
476
|
-
};
|
|
477
|
-
return fontSizes[props.size];
|
|
478
|
-
};
|
|
479
|
-
var useAvatarStyles$1 = styles.makeStyles(function (theme) { return ({
|
|
480
|
-
root: function (props) { return ({
|
|
481
|
-
width: getAvatarDimensions$1(theme, props),
|
|
482
|
-
height: getAvatarDimensions$1(theme, props),
|
|
483
|
-
fontSize: getAvatarFontSize$1(props),
|
|
484
|
-
backgroundColor: props.loaded === LoadingStatus$1.LOADED ? 'transparent' : props.background,
|
|
485
|
-
color: theme.palette.getContrastText(props.background),
|
|
486
|
-
objectFit: props.fit,
|
|
487
|
-
}); },
|
|
488
|
-
fallback: function (props) { return ({
|
|
489
|
-
fontSize: getAvatarDimensions$1(theme, props),
|
|
490
|
-
strokeWidth: 1,
|
|
491
|
-
}); },
|
|
492
|
-
}); });
|
|
493
|
-
|
|
494
|
-
var Avatar$1 = React.forwardRef(function (props, ref) {
|
|
495
|
-
var children = props.children, src = props.src, alt = props.alt, fallback = props.fallback, muiProps = __rest$2(props, ["children", "src", "alt", "fallback"]);
|
|
496
|
-
var _a = useImgProps$1(props), imgProps = _a.imgProps, loaded = _a.loaded;
|
|
497
|
-
var classes = useAvatarStyles$1(__assign$2(__assign$2({}, props), { loaded: loaded }));
|
|
498
|
-
var displayAltTextFallback = src && alt;
|
|
499
|
-
var displayNoFallback = fallback === 'none';
|
|
500
|
-
var displayCustomFallback = fallback !== 'none' && typeof fallback !== 'undefined';
|
|
501
|
-
var Fallback;
|
|
502
|
-
if (displayAltTextFallback) {
|
|
503
|
-
Fallback = null;
|
|
504
|
-
}
|
|
505
|
-
else if (displayNoFallback) {
|
|
506
|
-
Fallback = ' ';
|
|
507
|
-
}
|
|
508
|
-
else if (displayCustomFallback) {
|
|
509
|
-
Fallback = fallback;
|
|
510
|
-
}
|
|
511
|
-
else {
|
|
512
|
-
Fallback = React__default['default'].createElement(Icon$1, { icon: SvgUser$1, className: classes.fallback });
|
|
513
|
-
}
|
|
514
|
-
return (React__default['default'].createElement(MuiAvatar__default['default'], __assign$2({ ref: ref, classes: { root: classes.root }, src: src, alt: alt }, muiProps, { imgProps: imgProps }), children || Fallback));
|
|
515
|
-
});
|
|
516
|
-
Avatar$1.defaultProps = {
|
|
517
|
-
size: 'medium',
|
|
518
|
-
fit: 'cover',
|
|
519
|
-
background: '#E0E0E0',
|
|
520
|
-
};
|
|
521
|
-
Avatar$1.displayName = 'Avatar';
|
|
522
|
-
|
|
523
|
-
styles.makeStyles(function (theme) { return ({
|
|
524
|
-
circle: {
|
|
525
|
-
backgroundColor: theme.palette.grey[300],
|
|
526
|
-
borderRadius: '50%',
|
|
527
|
-
height: theme.spacing(0.65),
|
|
528
|
-
width: theme.spacing(0.65),
|
|
529
|
-
margin: theme.spacing(1) + "px 0 " + theme.spacing(1) + "px " + theme.spacing(1) + "px",
|
|
530
|
-
},
|
|
531
|
-
container: {
|
|
532
|
-
border: "1px solid " + theme.palette.secondary.light,
|
|
533
|
-
borderRadius: theme.spacing(0.5),
|
|
534
|
-
flexGrow: 1,
|
|
535
|
-
},
|
|
536
|
-
titleBar: {
|
|
537
|
-
display: 'flex',
|
|
538
|
-
flexDirection: 'row',
|
|
539
|
-
borderBottom: "1px solid " + theme.palette.secondary.light,
|
|
540
|
-
width: '100%',
|
|
541
|
-
},
|
|
542
|
-
}); });
|
|
543
|
-
|
|
544
|
-
styles.makeStyles(function () { return ({
|
|
545
|
-
root: {
|
|
546
|
-
minWidth: 'unset',
|
|
547
|
-
},
|
|
548
|
-
label: {
|
|
549
|
-
textTransform: function (_a) {
|
|
550
|
-
var textTransform = _a.textTransform;
|
|
551
|
-
return textTransform;
|
|
552
|
-
},
|
|
553
|
-
},
|
|
554
|
-
}); });
|
|
555
|
-
|
|
556
|
-
var Checkbox$1 = React.forwardRef(function (props, ref) {
|
|
557
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest$2(props, ["label", "disabled", "LabelProps"]);
|
|
558
|
-
var control = React__default['default'].createElement(MuiCheckbox__default['default'], __assign$2({ disabled: label ? undefined : disabled }, muiProps));
|
|
559
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign$2({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
560
|
-
});
|
|
561
|
-
Checkbox$1.displayName = 'Checkbox';
|
|
562
|
-
|
|
563
|
-
var getBackground$2 = function (theme) { return function (props) {
|
|
564
|
-
var variant = props.variant, severity = props.severity;
|
|
565
|
-
var background = theme.palette.grey[100];
|
|
566
|
-
var backgrounds = {
|
|
567
|
-
outlined: 'none',
|
|
568
|
-
error: 'error.main',
|
|
569
|
-
warning: 'warning.main',
|
|
570
|
-
info: 'info.light',
|
|
571
|
-
success: 'success.light',
|
|
572
|
-
};
|
|
573
|
-
if (variant === 'outlined') {
|
|
574
|
-
background = backgrounds[variant];
|
|
575
|
-
}
|
|
576
|
-
else if (severity) {
|
|
577
|
-
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
578
|
-
// @ts-expect-error - todo.
|
|
579
|
-
background = theme.palette[color][colorVariant];
|
|
580
|
-
}
|
|
581
|
-
return background;
|
|
582
|
-
}; };
|
|
583
|
-
var getColor$2 = function (theme) { return function (props) {
|
|
584
|
-
var variant = props.variant, severity = props.severity;
|
|
585
|
-
var textColor;
|
|
586
|
-
if (variant === 'outlined' && severity) {
|
|
587
|
-
var textColors = {
|
|
588
|
-
error: theme.palette.error.main,
|
|
589
|
-
info: theme.palette.info.main,
|
|
590
|
-
warning: theme.palette.warning.dark,
|
|
591
|
-
success: theme.palette.success.dark,
|
|
592
|
-
};
|
|
593
|
-
textColor = textColors[severity];
|
|
594
|
-
}
|
|
595
|
-
else if (variant === 'outlined' && !severity) {
|
|
596
|
-
textColor = theme.palette.grey[700];
|
|
597
|
-
}
|
|
598
|
-
else if ((variant === 'default' || variant === undefined) && severity) {
|
|
599
|
-
var textColors = {
|
|
600
|
-
error: theme.palette.common.white,
|
|
601
|
-
info: theme.palette.secondary.main,
|
|
602
|
-
warning: theme.palette.secondary.main,
|
|
603
|
-
success: theme.palette.secondary.main,
|
|
604
|
-
};
|
|
605
|
-
textColor = textColors[severity];
|
|
606
|
-
}
|
|
607
|
-
return textColor;
|
|
608
|
-
}; };
|
|
609
|
-
var getBorder$1 = function (theme) { return function (props) {
|
|
610
|
-
var variant = props.variant, severity = props.severity;
|
|
611
|
-
var borderColor;
|
|
612
|
-
if (variant === 'outlined' && severity) {
|
|
613
|
-
var borderColors = {
|
|
614
|
-
error: theme.palette.error.main,
|
|
615
|
-
info: theme.palette.info.main,
|
|
616
|
-
warning: theme.palette.warning.dark,
|
|
617
|
-
success: theme.palette.success.dark,
|
|
618
|
-
};
|
|
619
|
-
borderColor = borderColors[severity];
|
|
620
|
-
}
|
|
621
|
-
return borderColor;
|
|
622
|
-
}; };
|
|
623
|
-
// using `any` here is a bit of cheating but it doesn't matter since this doesn't depend on
|
|
624
|
-
// any component-specific props
|
|
625
|
-
var useChipStyles = styles.makeStyles(function (theme) { return ({
|
|
626
|
-
root: {
|
|
627
|
-
background: getBackground$2(theme),
|
|
628
|
-
color: getColor$2(theme),
|
|
629
|
-
borderColor: getBorder$1(theme),
|
|
630
|
-
borderRadius: theme.spacing(0.5),
|
|
631
|
-
},
|
|
632
|
-
icon: {
|
|
633
|
-
color: 'inherit',
|
|
634
|
-
height: theme.spacing(2),
|
|
635
|
-
width: theme.spacing(2),
|
|
636
|
-
},
|
|
637
|
-
deleteIcon: {
|
|
638
|
-
color: theme.palette.grey[500],
|
|
639
|
-
},
|
|
640
|
-
}); });
|
|
641
|
-
|
|
642
|
-
var IconDictionary = {
|
|
643
|
-
error: SvgError$1,
|
|
644
|
-
info: SvgInfo$1,
|
|
645
|
-
success: SvgCheckCircle$1,
|
|
646
|
-
warning: SvgWarning$1,
|
|
647
|
-
};
|
|
648
|
-
var Chip = function (props) {
|
|
649
|
-
var severity = props.severity, restProps = __rest$2(props, ["severity"]);
|
|
650
|
-
var classes = useChipStyles(props);
|
|
651
|
-
var icon = severity ? React__default['default'].createElement(IconDictionary[severity]) : undefined;
|
|
652
|
-
var deleteIcon = React__default['default'].createElement(SvgXCircle);
|
|
653
|
-
return React__default['default'].createElement(MuiChip__default['default'], __assign$2({ classes: classes, icon: icon, deleteIcon: deleteIcon }, restProps));
|
|
654
|
-
};
|
|
655
|
-
Chip.displayName = 'Chip';
|
|
656
|
-
|
|
657
|
-
var defaultTypographyProps$1 = {
|
|
658
|
-
variant: 'body1',
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
var weights$1 = {
|
|
662
|
-
regular: 400,
|
|
663
|
-
medium: 500,
|
|
664
|
-
'semi-bold': 600,
|
|
665
|
-
bold: 700,
|
|
666
|
-
};
|
|
667
|
-
var getCustomColor$1 = function (theme, color) {
|
|
668
|
-
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
669
|
-
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
670
|
-
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
671
|
-
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
672
|
-
switch (true) {
|
|
673
|
-
case isCommonColor:
|
|
674
|
-
// @ts-expect-error - todo.
|
|
675
|
-
return theme.palette.common[color];
|
|
676
|
-
case Boolean(isGreyColor):
|
|
677
|
-
var scale = color.split('.')[1];
|
|
678
|
-
// @ts-expect-error - todo.
|
|
679
|
-
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
680
|
-
case Boolean(isSemanticColor):
|
|
681
|
-
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
682
|
-
// @ts-expect-error - todo.
|
|
683
|
-
return theme.palette[paletteKey][variant];
|
|
684
|
-
case isTextColor:
|
|
685
|
-
// @ts-expect-error - todo.
|
|
686
|
-
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
687
|
-
default:
|
|
688
|
-
return undefined;
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
|
-
var useTypographyStyles$1 = styles.makeStyles(function (theme) {
|
|
692
|
-
var _a;
|
|
693
|
-
return ({
|
|
694
|
-
root: (_a = {},
|
|
695
|
-
_a["& ." + iconStaticClassName$1] = {
|
|
696
|
-
position: 'relative',
|
|
697
|
-
top: '0.125em',
|
|
698
|
-
padding: '0 0.125em',
|
|
699
|
-
boxSizing: 'content-box',
|
|
700
|
-
},
|
|
701
|
-
_a.fontFamily = theme.typography.fontFamily,
|
|
702
|
-
_a.fontWeight = function (_a) {
|
|
703
|
-
var variant = _a.variant, weight = _a.weight;
|
|
704
|
-
return (weight ? weights$1[weight] : theme.typography[variant].fontWeight);
|
|
705
|
-
},
|
|
706
|
-
_a.fontSize = function (_a) {
|
|
707
|
-
var variant = _a.variant;
|
|
708
|
-
return theme.typography[variant].fontSize;
|
|
709
|
-
},
|
|
710
|
-
_a.lineHeight = function (_a) {
|
|
711
|
-
var variant = _a.variant;
|
|
712
|
-
return theme.typography[variant].lineHeight;
|
|
713
|
-
},
|
|
714
|
-
_a.textTransform = function (_a) {
|
|
715
|
-
var variant = _a.variant;
|
|
716
|
-
return theme.typography[variant].textTransform;
|
|
717
|
-
},
|
|
718
|
-
_a.color = function (_a) {
|
|
719
|
-
var color = _a.color, variant = _a.variant;
|
|
720
|
-
return (color && getCustomColor$1(theme, color)) || theme.typography[variant].color;
|
|
721
|
-
},
|
|
722
|
-
_a),
|
|
723
|
-
caption: {
|
|
724
|
-
display: 'inline',
|
|
725
|
-
},
|
|
726
|
-
overline: {
|
|
727
|
-
display: 'inline',
|
|
728
|
-
},
|
|
729
|
-
});
|
|
730
|
-
});
|
|
731
|
-
|
|
732
|
-
var Typography$1 = function (props) {
|
|
733
|
-
props.weight; props.color; var TypographyRef = props.TypographyRef, restProps = __rest$2(props, ["weight", "color", "TypographyRef"]);
|
|
734
|
-
var classes = useTypographyStyles$1(__assign$2({}, props));
|
|
735
|
-
var variantMapping = { subtitle1: 'p' };
|
|
736
|
-
return React__default['default'].createElement(core.Typography, __assign$2({ classes: classes, variantMapping: variantMapping, ref: TypographyRef }, restProps));
|
|
737
|
-
};
|
|
738
|
-
Typography$1.displayName = 'Typography';
|
|
739
|
-
Typography$1.defaultProps = defaultTypographyProps$1;
|
|
740
|
-
|
|
741
|
-
var getFadeStop$1 = function (_a, typographyVariant) {
|
|
742
|
-
var typography = _a.typography;
|
|
743
|
-
// @ts-expect-error - todo.
|
|
744
|
-
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
745
|
-
? // @ts-expect-error - todo.
|
|
746
|
-
typography[typographyVariant].lineHeight + "rem"
|
|
747
|
-
: // @ts-expect-error - todo.
|
|
748
|
-
typography[typographyVariant].lineHeight;
|
|
749
|
-
};
|
|
750
|
-
core.makeStyles(function (theme) { return ({
|
|
751
|
-
overlay: {
|
|
752
|
-
position: 'absolute',
|
|
753
|
-
top: 0,
|
|
754
|
-
left: 0,
|
|
755
|
-
height: '100%',
|
|
756
|
-
width: '100%',
|
|
757
|
-
background: function (props) { return "linear-gradient(to top, white, #FFF0 " + getFadeStop$1(theme, props.typographyVariant) + ")"; },
|
|
758
|
-
},
|
|
759
|
-
}); });
|
|
760
|
-
|
|
761
|
-
var SemanticColors$1;
|
|
762
|
-
(function (SemanticColors) {
|
|
763
|
-
SemanticColors["PRIMARY_MAIN"] = "primary.main";
|
|
764
|
-
SemanticColors["PRIMARY_DARK"] = "primary.dark";
|
|
765
|
-
SemanticColors["PRIMARY_LIGHT"] = "primary.light";
|
|
766
|
-
SemanticColors["SECONDARY_MAIN"] = "secondary.main";
|
|
767
|
-
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
768
|
-
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
769
|
-
})(SemanticColors$1 || (SemanticColors$1 = {}));
|
|
770
|
-
core.makeStyles(function (theme) { return ({
|
|
771
|
-
dividerRoot: {
|
|
772
|
-
gap: theme.spacing(2),
|
|
773
|
-
},
|
|
774
|
-
textRoot: {
|
|
775
|
-
color: function (props) {
|
|
776
|
-
var textColor = props.textColor;
|
|
777
|
-
if (Object.values(SemanticColors$1).includes(textColor)) {
|
|
778
|
-
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
779
|
-
// @ts-expect-error - todo.
|
|
780
|
-
return theme.palette[semanticColor][shade];
|
|
781
|
-
}
|
|
782
|
-
else if (textColor) {
|
|
783
|
-
return textColor;
|
|
784
|
-
}
|
|
785
|
-
else {
|
|
786
|
-
return 'black';
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
|
-
textTransform: function (props) { return props.textTransform; },
|
|
790
|
-
},
|
|
791
|
-
dividerLine: {
|
|
792
|
-
backgroundColor: function (props) {
|
|
793
|
-
var dividerColor = props.dividerColor;
|
|
794
|
-
if (Object.values(SemanticColors$1).includes(dividerColor)) {
|
|
795
|
-
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
796
|
-
// @ts-expect-error - todo.
|
|
797
|
-
return theme.palette[semanticColor][shade];
|
|
798
|
-
}
|
|
799
|
-
else if (dividerColor) {
|
|
800
|
-
return dividerColor;
|
|
801
|
-
}
|
|
802
|
-
else {
|
|
803
|
-
return theme.palette.grey[500];
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
},
|
|
807
|
-
}); });
|
|
808
|
-
|
|
809
|
-
var IconButton$1 = React.forwardRef(function (props, ref) {
|
|
810
|
-
return React__default['default'].createElement(MuiIconButton__default['default'], __assign$2({ ref: ref }, props));
|
|
811
|
-
});
|
|
812
|
-
IconButton$1.displayName = 'IconButton';
|
|
813
|
-
IconButton$1.defaultProps = {
|
|
814
|
-
color: 'secondary',
|
|
815
|
-
};
|
|
816
|
-
|
|
817
|
-
var useLinkStyles$1 = styles.makeStyles(function (theme) { return ({
|
|
818
|
-
root: function (props) {
|
|
819
|
-
var _a;
|
|
820
|
-
return (__assign$2(__assign$2({ display: 'flex' }, (props.color === undefined && { color: theme.palette.info.main })), (_a = {}, _a["& ." + iconStaticClassName$1] = {
|
|
821
|
-
alignSelf: 'center',
|
|
822
|
-
}, _a)));
|
|
823
|
-
},
|
|
824
|
-
}); });
|
|
825
|
-
|
|
826
|
-
// eslint-disable-next-line react/display-name -- false positive
|
|
827
|
-
var Link$1 = React.forwardRef(function (props, ref) {
|
|
828
|
-
var children = props.children, muiProps = __rest$2(props, ["children"]);
|
|
829
|
-
var classes = useLinkStyles$1(props);
|
|
830
|
-
return (React__default['default'].createElement(core.Link, __assign$2({ ref: ref, classes: { root: classes.root } }, muiProps), children));
|
|
831
|
-
});
|
|
832
|
-
Link$1.defaultProps = {
|
|
833
|
-
variant: 'body1',
|
|
834
|
-
};
|
|
835
|
-
Link$1.displayName = 'Link';
|
|
836
|
-
|
|
837
|
-
var useStyles$4$2 = core.makeStyles(function (_a) {
|
|
838
|
-
var spacing = _a.spacing;
|
|
839
|
-
return ({
|
|
840
|
-
root: {
|
|
841
|
-
'&:last-child': {
|
|
842
|
-
marginBottom: 0,
|
|
843
|
-
},
|
|
844
|
-
marginBottom: spacing(4),
|
|
845
|
-
padding: spacing(4),
|
|
846
|
-
},
|
|
847
|
-
});
|
|
848
|
-
});
|
|
849
|
-
var Paper$1 = React.forwardRef(function (props, ref) {
|
|
850
|
-
var legacyStyles = props.legacyStyles, restProps = __rest$2(props, ["legacyStyles"]);
|
|
851
|
-
var classes = useStyles$4$2(props);
|
|
852
|
-
return React__default['default'].createElement(core.Paper, __assign$2({}, ref, { classes: __assign$2({}, (legacyStyles && classes)) }, restProps));
|
|
853
|
-
});
|
|
854
|
-
Paper$1.displayName = 'Paper';
|
|
855
|
-
Paper$1.defaultProps = {
|
|
856
|
-
legacyStyles: false,
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
var Radio$1 = React.forwardRef(function (props, ref) {
|
|
860
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest$2(props, ["label", "disabled", "LabelProps"]);
|
|
861
|
-
var control = React__default['default'].createElement(MuiRadio__default['default'], __assign$2({ disabled: label ? undefined : disabled }, muiProps));
|
|
862
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign$2({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
863
|
-
});
|
|
864
|
-
Radio$1.displayName = 'Radio';
|
|
865
|
-
|
|
866
|
-
styles.makeStyles(function () { return ({
|
|
867
|
-
textfield: {
|
|
868
|
-
background: function (props) { return (props.backgroundTransparency ? '#FFFFFF44' : 'none'); },
|
|
869
|
-
borderTopLeftRadius: 4,
|
|
870
|
-
borderBottomLeftRadius: 4,
|
|
871
|
-
'& fieldset': {
|
|
872
|
-
borderRight: 'none',
|
|
873
|
-
borderTopRightRadius: 0,
|
|
874
|
-
borderBottomRightRadius: 0,
|
|
875
|
-
},
|
|
876
|
-
},
|
|
877
|
-
button: {
|
|
878
|
-
borderTopLeftRadius: 0,
|
|
879
|
-
borderBottomLeftRadius: 0,
|
|
880
|
-
alignSelf: 'stretch',
|
|
881
|
-
},
|
|
882
|
-
input: {
|
|
883
|
-
color: function (props) { return props.inputTextColor || 'inherit'; },
|
|
884
|
-
'&$focused fieldset': {
|
|
885
|
-
top: -4,
|
|
886
|
-
},
|
|
887
|
-
},
|
|
888
|
-
focused: {},
|
|
889
|
-
}); });
|
|
890
|
-
|
|
891
|
-
var useSwitchStyles$1 = styles.makeStyles(function (theme) { return ({
|
|
892
|
-
checked: {
|
|
893
|
-
'& $thumb': {
|
|
894
|
-
background: theme.palette.success.main,
|
|
895
|
-
},
|
|
896
|
-
'&& + $track': {
|
|
897
|
-
backgroundColor: theme.palette.success.main,
|
|
898
|
-
},
|
|
899
|
-
},
|
|
900
|
-
thumb: {},
|
|
901
|
-
track: {},
|
|
902
|
-
}); });
|
|
903
|
-
|
|
904
|
-
var Switch$1 = React.forwardRef(function (props, ref) {
|
|
905
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest$2(props, ["label", "disabled", "LabelProps"]);
|
|
906
|
-
var classes = useSwitchStyles$1(props);
|
|
907
|
-
var control = React__default['default'].createElement(MuiSwitch__default['default'], __assign$2({ classes: classes, disabled: label ? undefined : disabled }, muiProps));
|
|
908
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign$2({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
909
|
-
});
|
|
910
|
-
Switch$1.displayName = 'Switch';
|
|
911
|
-
|
|
912
|
-
var useToggleButtonStyles$1 = styles.makeStyles(function (theme) { return ({
|
|
913
|
-
root: {
|
|
914
|
-
color: theme.palette.text.primary,
|
|
915
|
-
},
|
|
916
|
-
selected: {
|
|
917
|
-
'&&': {
|
|
918
|
-
'&:hover': {
|
|
919
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].dark; },
|
|
920
|
-
},
|
|
921
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].main; },
|
|
922
|
-
color: 'white',
|
|
923
|
-
},
|
|
924
|
-
},
|
|
925
|
-
}); });
|
|
926
|
-
|
|
927
|
-
var ToggleButton$1 = React.forwardRef(function (props, ref) {
|
|
928
|
-
var children = props.children, muiProps = __rest$2(props, ["children"]);
|
|
929
|
-
var classes = useToggleButtonStyles$1(props);
|
|
930
|
-
return (React__default['default'].createElement(MuiToggleButton__default['default'], __assign$2({ ref: ref, classes: {
|
|
931
|
-
root: classes.root,
|
|
932
|
-
selected: classes.selected,
|
|
933
|
-
} }, muiProps), children));
|
|
934
|
-
});
|
|
935
|
-
ToggleButton$1.defaultProps = {
|
|
936
|
-
color: 'primary',
|
|
937
|
-
};
|
|
938
|
-
ToggleButton$1.displayName = 'ToggleButton';
|
|
939
|
-
|
|
940
|
-
var useToggleButtonGroupStyles$1 = styles.makeStyles(function (theme) { return ({
|
|
941
|
-
root: {
|
|
942
|
-
'&&': {
|
|
943
|
-
backgroundColor: theme.palette.grey[300],
|
|
944
|
-
},
|
|
945
|
-
},
|
|
946
|
-
}); });
|
|
947
|
-
|
|
948
|
-
var ToggleButtonGroup$1 = React.forwardRef(function (props, ref) {
|
|
949
|
-
var children = props.children, _a = props.color, color = _a === void 0 ? 'primary' : _a, muiProps = __rest$2(props, ["children", "color"]);
|
|
950
|
-
var classes = useToggleButtonGroupStyles$1(props);
|
|
951
|
-
var childrenWithProps = React__default['default'].Children.map(children, function (child) {
|
|
952
|
-
if (!React__default['default'].isValidElement(child)) {
|
|
953
|
-
return null;
|
|
954
|
-
}
|
|
955
|
-
return React__default['default'].cloneElement(child, { color: color });
|
|
956
|
-
});
|
|
957
|
-
return (React__default['default'].createElement(MuiToggleButtonGroup__default['default'], __assign$2({ ref: ref, classes: { root: classes.root } }, muiProps), childrenWithProps));
|
|
958
|
-
});
|
|
959
|
-
ToggleButtonGroup$1.displayName = 'ToggleButtonGroup';
|
|
960
|
-
|
|
961
|
-
var useTooltipStyles$1 = styles.makeStyles(function (_a) {
|
|
962
|
-
var typography = _a.typography;
|
|
963
|
-
return ({
|
|
964
|
-
tooltip: {
|
|
965
|
-
fontSize: typography.pxToRem(16),
|
|
966
|
-
},
|
|
967
|
-
});
|
|
968
|
-
});
|
|
969
|
-
|
|
970
|
-
var Tooltip$1 = React.forwardRef(function (props, ref) {
|
|
971
|
-
var classes = useTooltipStyles$1(props);
|
|
972
|
-
return React__default['default'].createElement(MuiTooltip__default['default'], __assign$2({ ref: ref, classes: classes }, props));
|
|
973
|
-
});
|
|
974
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
975
|
-
|
|
976
|
-
core.makeStyles(function () { return ({
|
|
977
|
-
root: {
|
|
978
|
-
height: 56,
|
|
979
|
-
},
|
|
980
|
-
}); });
|
|
981
|
-
core.makeStyles(function (theme) { return ({
|
|
982
|
-
root: {
|
|
983
|
-
height: '100%',
|
|
984
|
-
width: 'min-content',
|
|
985
|
-
borderRadius: theme.spacing(1),
|
|
986
|
-
},
|
|
987
|
-
input: {
|
|
988
|
-
'&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
989
|
-
display: 'none',
|
|
990
|
-
},
|
|
991
|
-
'-moz-appearance': 'textfield',
|
|
992
|
-
minWidth: 40,
|
|
993
|
-
padding: 0,
|
|
994
|
-
textAlign: 'center',
|
|
995
|
-
},
|
|
996
|
-
adornedStart: {
|
|
997
|
-
padding: 0,
|
|
998
|
-
},
|
|
999
|
-
adornedEnd: {
|
|
1000
|
-
padding: 0,
|
|
1001
|
-
},
|
|
1002
|
-
}); });
|
|
1003
|
-
|
|
1004
|
-
core.makeStyles(function () { return ({
|
|
1005
|
-
root: {
|
|
1006
|
-
display: 'flex',
|
|
1007
|
-
flexDirection: 'column',
|
|
1008
|
-
alignItems: 'center',
|
|
1009
|
-
gridGap: 16,
|
|
1010
|
-
},
|
|
1011
|
-
}); });
|
|
1012
|
-
|
|
1013
|
-
var FollowerAuthenticationDialogContext$1 = React.createContext(null);
|
|
1014
|
-
FollowerAuthenticationDialogContext$1.Provider;
|
|
1015
|
-
|
|
1016
|
-
core.makeStyles(function () { return ({
|
|
1017
|
-
form: {
|
|
1018
|
-
display: 'flex',
|
|
1019
|
-
flexDirection: 'column',
|
|
1020
|
-
alignItems: 'center',
|
|
1021
|
-
width: '100%',
|
|
1022
|
-
gridGap: 16,
|
|
1023
|
-
},
|
|
1024
|
-
}); });
|
|
1025
|
-
|
|
1026
|
-
core.makeStyles(function () { return ({
|
|
1027
|
-
main: {
|
|
1028
|
-
width: '100%',
|
|
1029
|
-
display: 'flex',
|
|
1030
|
-
flexDirection: 'column',
|
|
1031
|
-
gridGap: 16,
|
|
1032
|
-
},
|
|
1033
|
-
}); });
|
|
1034
|
-
|
|
1035
|
-
core.makeStyles(function () { return ({
|
|
1036
|
-
root: {
|
|
1037
|
-
position: 'absolute',
|
|
1038
|
-
top: 0,
|
|
1039
|
-
right: 0,
|
|
1040
|
-
},
|
|
1041
|
-
}); });
|
|
1042
|
-
|
|
1043
|
-
var useTableRowStyles = core.makeStyles(function (theme) { return ({
|
|
1044
|
-
root: function () { return ({
|
|
1045
|
-
'&:nth-child(even)': {
|
|
1046
|
-
backgroundColor: theme.palette.grey[100],
|
|
1047
|
-
},
|
|
1048
|
-
}); },
|
|
9
|
+
var webIcons = require('@popmenu/web-icons');
|
|
10
|
+
var adminUi = require('@popmenu/admin-ui');
|
|
11
|
+
|
|
12
|
+
var useTableRowStyles = core.makeStyles(function (theme) { return ({
|
|
13
|
+
root: function () { return ({
|
|
14
|
+
'&:nth-child(even)': {
|
|
15
|
+
backgroundColor: theme.palette.grey[100],
|
|
16
|
+
},
|
|
17
|
+
}); },
|
|
1049
18
|
}); });
|
|
1050
19
|
|
|
1051
|
-
var TableRow = function (props) {
|
|
1052
|
-
var children = props.children, restProps = __rest
|
|
1053
|
-
var root = useTableRowStyles(props).root;
|
|
1054
|
-
return (
|
|
20
|
+
var TableRow = function (props) {
|
|
21
|
+
var children = props.children, restProps = tslib.__rest(props, ["children"]);
|
|
22
|
+
var root = useTableRowStyles(props).root;
|
|
23
|
+
return (React.createElement("tr", tslib.__assign({ "data-table-element": "body-row", className: root }, restProps), children));
|
|
1055
24
|
};
|
|
1056
25
|
|
|
1057
|
-
var tableConstants = {
|
|
1058
|
-
tableTypography: 'body1',
|
|
1059
|
-
cellPaddingFactor: 2
|
|
1060
|
-
headerBorder: 2,
|
|
1061
|
-
};
|
|
26
|
+
var tableConstants = {
|
|
27
|
+
tableTypography: 'body1',
|
|
28
|
+
cellPaddingFactor: 2};
|
|
1062
29
|
|
|
1063
|
-
var coercedValueIncludesString = function (row, columnId, value) {
|
|
1064
|
-
if (value === '')
|
|
1065
|
-
return true;
|
|
1066
|
-
var cellValue = row.getValue(columnId);
|
|
1067
|
-
return String(cellValue).toLowerCase().includes(value.toLowerCase());
|
|
30
|
+
var coercedValueIncludesString = function (row, columnId, value) {
|
|
31
|
+
if (value === '')
|
|
32
|
+
return true;
|
|
33
|
+
var cellValue = row.getValue(columnId);
|
|
34
|
+
return String(cellValue).toLowerCase().includes(value.toLowerCase());
|
|
1068
35
|
};
|
|
1069
36
|
|
|
1070
|
-
var getTableMinHeight = function (rootRef, pageSize) {
|
|
1071
|
-
var defaultBodyRowHeight = 56;
|
|
1072
|
-
var defaultHeaderRowHeight = 57;
|
|
1073
|
-
var defaultFooterHeight = 88;
|
|
1074
|
-
var minHeight = defaultBodyRowHeight * pageSize + defaultHeaderRowHeight + defaultFooterHeight;
|
|
1075
|
-
if (rootRef === null || rootRef === void 0 ? void 0 : rootRef.current) {
|
|
1076
|
-
var rootTableNode = rootRef.current;
|
|
1077
|
-
var headerRowNode = rootTableNode.querySelector("[data-table-element=\"header-row\"]");
|
|
1078
|
-
var bodyRowNode = rootTableNode.querySelector("[data-table-element=\"body-row\"]");
|
|
1079
|
-
if (headerRowNode && bodyRowNode) {
|
|
1080
|
-
var headerRowHeight = headerRowNode.getBoundingClientRect().height;
|
|
1081
|
-
var bodyRowHeight = bodyRowNode.getBoundingClientRect().height;
|
|
1082
|
-
minHeight = headerRowHeight + bodyRowHeight * pageSize + defaultFooterHeight;
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
return minHeight;
|
|
37
|
+
var getTableMinHeight = function (rootRef, pageSize) {
|
|
38
|
+
var defaultBodyRowHeight = 56;
|
|
39
|
+
var defaultHeaderRowHeight = 57;
|
|
40
|
+
var defaultFooterHeight = 88;
|
|
41
|
+
var minHeight = defaultBodyRowHeight * pageSize + defaultHeaderRowHeight + defaultFooterHeight;
|
|
42
|
+
if (rootRef === null || rootRef === void 0 ? void 0 : rootRef.current) {
|
|
43
|
+
var rootTableNode = rootRef.current;
|
|
44
|
+
var headerRowNode = rootTableNode.querySelector("[data-table-element=\"header-row\"]");
|
|
45
|
+
var bodyRowNode = rootTableNode.querySelector("[data-table-element=\"body-row\"]");
|
|
46
|
+
if (headerRowNode && bodyRowNode) {
|
|
47
|
+
var headerRowHeight = headerRowNode.getBoundingClientRect().height;
|
|
48
|
+
var bodyRowHeight = bodyRowNode.getBoundingClientRect().height;
|
|
49
|
+
minHeight = headerRowHeight + bodyRowHeight * pageSize + defaultFooterHeight;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return minHeight;
|
|
1086
53
|
};
|
|
1087
54
|
|
|
1088
|
-
var useTableCellStyles = core.makeStyles(function (theme) { return ({
|
|
1089
|
-
root: function () { return ({
|
|
1090
|
-
padding: theme.spacing(tableConstants.cellPaddingFactor),
|
|
1091
|
-
}); },
|
|
55
|
+
var useTableCellStyles = core.makeStyles(function (theme) { return ({
|
|
56
|
+
root: function () { return ({
|
|
57
|
+
padding: theme.spacing(tableConstants.cellPaddingFactor),
|
|
58
|
+
}); },
|
|
1092
59
|
}); });
|
|
1093
60
|
|
|
1094
|
-
var TableCell = function (props) {
|
|
1095
|
-
var children = props.children, restProps = __rest
|
|
1096
|
-
var root = useTableCellStyles(props).root;
|
|
1097
|
-
return (
|
|
61
|
+
var TableCell = function (props) {
|
|
62
|
+
var children = props.children, restProps = tslib.__rest(props, ["children"]);
|
|
63
|
+
var root = useTableCellStyles(props).root;
|
|
64
|
+
return (React.createElement("td", tslib.__assign({ className: root }, restProps), children));
|
|
1098
65
|
};
|
|
1099
66
|
|
|
1100
|
-
var TableBody = function (props) {
|
|
1101
|
-
var children = props.children, restProps = __rest
|
|
1102
|
-
return
|
|
67
|
+
var TableBody = function (props) {
|
|
68
|
+
var children = props.children, restProps = tslib.__rest(props, ["children"]);
|
|
69
|
+
return React.createElement("tbody", tslib.__assign({}, restProps), children);
|
|
1103
70
|
};
|
|
1104
71
|
|
|
1105
|
-
var useStyles$6 = core.makeStyles(function (_a) {
|
|
1106
|
-
var typography = _a.typography;
|
|
1107
|
-
return ({
|
|
1108
|
-
root: function (_a) {
|
|
1109
|
-
var fullWidth = _a.fullWidth;
|
|
1110
|
-
return ({
|
|
1111
|
-
display: fullWidth ? 'flex' : 'inline-flex',
|
|
1112
|
-
flexDirection: 'column',
|
|
1113
|
-
});
|
|
1114
|
-
},
|
|
1115
|
-
table: function (_a) {
|
|
1116
|
-
var fullWidth = _a.fullWidth;
|
|
1117
|
-
return (__assign
|
|
1118
|
-
},
|
|
1119
|
-
tableContainer: function () { return ({
|
|
1120
|
-
maxWidth: '100%',
|
|
1121
|
-
overflowX: 'auto',
|
|
1122
|
-
overflowY: 'hidden',
|
|
1123
|
-
}); },
|
|
1124
|
-
});
|
|
72
|
+
var useStyles$6 = core.makeStyles(function (_a) {
|
|
73
|
+
var typography = _a.typography;
|
|
74
|
+
return ({
|
|
75
|
+
root: function (_a) {
|
|
76
|
+
var fullWidth = _a.fullWidth;
|
|
77
|
+
return ({
|
|
78
|
+
display: fullWidth ? 'flex' : 'inline-flex',
|
|
79
|
+
flexDirection: 'column',
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
table: function (_a) {
|
|
83
|
+
var fullWidth = _a.fullWidth;
|
|
84
|
+
return (tslib.__assign(tslib.__assign({ borderCollapse: 'collapse' }, (fullWidth && { width: '100%' })), typography[tableConstants.tableTypography]));
|
|
85
|
+
},
|
|
86
|
+
tableContainer: function () { return ({
|
|
87
|
+
maxWidth: '100%',
|
|
88
|
+
overflowX: 'auto',
|
|
89
|
+
overflowY: 'hidden',
|
|
90
|
+
}); },
|
|
91
|
+
});
|
|
1125
92
|
});
|
|
1126
93
|
|
|
1127
|
-
var TableHeader = function (props) {
|
|
1128
|
-
var children = props.children, restProps = __rest
|
|
1129
|
-
return
|
|
94
|
+
var TableHeader = function (props) {
|
|
95
|
+
var children = props.children, restProps = tslib.__rest(props, ["children"]);
|
|
96
|
+
return React.createElement("thead", tslib.__assign({}, restProps), children);
|
|
1130
97
|
};
|
|
1131
98
|
|
|
1132
|
-
var TableFooter = function (props) {
|
|
1133
|
-
return (
|
|
99
|
+
var TableFooter = function (props) {
|
|
100
|
+
return (React.createElement(commonUi.Box, { display: "flex", justifyContent: "center", alignItems: "end", paddingTop: 3, paddingBottom: 4 }, props.children));
|
|
1134
101
|
};
|
|
1135
102
|
|
|
1136
|
-
var useStyles$5 = core.makeStyles(function (theme) { return ({
|
|
1137
|
-
buttonBox: {
|
|
1138
|
-
'& > :last-child': {
|
|
1139
|
-
marginLeft: theme.spacing(2),
|
|
1140
|
-
},
|
|
1141
|
-
display: 'flex',
|
|
1142
|
-
justifyContent: 'flex-end',
|
|
1143
|
-
padding: "0px " + theme.spacing(3) + "px " + theme.spacing(3) + "px " + theme.spacing(3) + "px",
|
|
1144
|
-
},
|
|
1145
|
-
buttonLabel: {
|
|
1146
|
-
fontWeight: 400,
|
|
1147
|
-
},
|
|
1148
|
-
filterPopoverContents: {
|
|
1149
|
-
backgroundColor: 'white',
|
|
1150
|
-
borderRadius: theme.spacing(1),
|
|
1151
|
-
position: 'relative',
|
|
1152
|
-
margin: '10px',
|
|
1153
|
-
marginTop: theme.spacing(2),
|
|
1154
|
-
width: '323px',
|
|
1155
|
-
'&::before': {
|
|
1156
|
-
backgroundColor: 'white',
|
|
1157
|
-
borderRadius: theme.spacing(0.5),
|
|
1158
|
-
content: '""',
|
|
1159
|
-
display: 'block',
|
|
1160
|
-
filter: 'drop-shadow(4px 4px 3px rgba(0, 0, 0, 0.14)) drop-shadow(0px 1px 5px rgba(0, 0, 0, 0.12))',
|
|
1161
|
-
position: 'absolute',
|
|
1162
|
-
width: theme.spacing(2.5),
|
|
1163
|
-
height: theme.spacing(2.5),
|
|
1164
|
-
top: -7,
|
|
1165
|
-
transform: 'rotate(45deg)',
|
|
1166
|
-
left: 'calc(90% - 12px)',
|
|
1167
|
-
zIndex: 0,
|
|
1168
|
-
},
|
|
1169
|
-
'&::after': {
|
|
1170
|
-
backgroundColor: 'white',
|
|
1171
|
-
content: '""',
|
|
1172
|
-
display: 'block',
|
|
1173
|
-
position: 'absolute',
|
|
1174
|
-
top: 0,
|
|
1175
|
-
left: 'calc(80%)',
|
|
1176
|
-
width: theme.spacing(6),
|
|
1177
|
-
height: theme.spacing(4),
|
|
1178
|
-
},
|
|
1179
|
-
},
|
|
1180
|
-
menuTitle: {
|
|
1181
|
-
fontWeight: 400,
|
|
1182
|
-
fontSize: '20px',
|
|
1183
|
-
paddingBottom: theme.spacing(2),
|
|
1184
|
-
},
|
|
1185
|
-
selectInput: {
|
|
1186
|
-
margin: '8px 0',
|
|
1187
|
-
},
|
|
103
|
+
var useStyles$5 = core.makeStyles(function (theme) { return ({
|
|
104
|
+
buttonBox: {
|
|
105
|
+
'& > :last-child': {
|
|
106
|
+
marginLeft: theme.spacing(2),
|
|
107
|
+
},
|
|
108
|
+
display: 'flex',
|
|
109
|
+
justifyContent: 'flex-end',
|
|
110
|
+
padding: "0px " + theme.spacing(3) + "px " + theme.spacing(3) + "px " + theme.spacing(3) + "px",
|
|
111
|
+
},
|
|
112
|
+
buttonLabel: {
|
|
113
|
+
fontWeight: 400,
|
|
114
|
+
},
|
|
115
|
+
filterPopoverContents: {
|
|
116
|
+
backgroundColor: 'white',
|
|
117
|
+
borderRadius: theme.spacing(1),
|
|
118
|
+
position: 'relative',
|
|
119
|
+
margin: '10px',
|
|
120
|
+
marginTop: theme.spacing(2),
|
|
121
|
+
width: '323px',
|
|
122
|
+
'&::before': {
|
|
123
|
+
backgroundColor: 'white',
|
|
124
|
+
borderRadius: theme.spacing(0.5),
|
|
125
|
+
content: '""',
|
|
126
|
+
display: 'block',
|
|
127
|
+
filter: 'drop-shadow(4px 4px 3px rgba(0, 0, 0, 0.14)) drop-shadow(0px 1px 5px rgba(0, 0, 0, 0.12))',
|
|
128
|
+
position: 'absolute',
|
|
129
|
+
width: theme.spacing(2.5),
|
|
130
|
+
height: theme.spacing(2.5),
|
|
131
|
+
top: -7,
|
|
132
|
+
transform: 'rotate(45deg)',
|
|
133
|
+
left: 'calc(90% - 12px)',
|
|
134
|
+
zIndex: 0,
|
|
135
|
+
},
|
|
136
|
+
'&::after': {
|
|
137
|
+
backgroundColor: 'white',
|
|
138
|
+
content: '""',
|
|
139
|
+
display: 'block',
|
|
140
|
+
position: 'absolute',
|
|
141
|
+
top: 0,
|
|
142
|
+
left: 'calc(80%)',
|
|
143
|
+
width: theme.spacing(6),
|
|
144
|
+
height: theme.spacing(4),
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
menuTitle: {
|
|
148
|
+
fontWeight: 400,
|
|
149
|
+
fontSize: '20px',
|
|
150
|
+
paddingBottom: theme.spacing(2),
|
|
151
|
+
},
|
|
152
|
+
selectInput: {
|
|
153
|
+
margin: '8px 0',
|
|
154
|
+
},
|
|
1188
155
|
}); });
|
|
1189
156
|
|
|
1190
|
-
var
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
var _path$2o;
|
|
1209
|
-
|
|
1210
|
-
function _extends$5p() { _extends$5p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5p.apply(this, arguments); }
|
|
1211
|
-
|
|
1212
|
-
function SvgChevronUp(props) {
|
|
1213
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5p({
|
|
1214
|
-
viewBox: "0 0 16 16",
|
|
1215
|
-
fill: "none",
|
|
1216
|
-
strokeLinecap: "round",
|
|
1217
|
-
strokeLinejoin: "round",
|
|
1218
|
-
width: "1em",
|
|
1219
|
-
height: "1em"
|
|
1220
|
-
}, props), _path$2o || (_path$2o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1221
|
-
d: "M12 10L8 6l-4 4",
|
|
1222
|
-
stroke: "currentColor"
|
|
1223
|
-
})));
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
var _path$2f;
|
|
1227
|
-
|
|
1228
|
-
function _extends$59() { _extends$59 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$59.apply(this, arguments); }
|
|
1229
|
-
|
|
1230
|
-
function SvgSort(props) {
|
|
1231
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$59({
|
|
1232
|
-
viewBox: "0 0 16 16",
|
|
1233
|
-
fill: "none",
|
|
1234
|
-
strokeLinecap: "round",
|
|
1235
|
-
strokeLinejoin: "round",
|
|
1236
|
-
width: "1em",
|
|
1237
|
-
height: "1em"
|
|
1238
|
-
}, props), _path$2f || (_path$2f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1239
|
-
d: "M11.333 6L8 2.667 4.667 6m6.666 4L8 13.334 4.667 10",
|
|
1240
|
-
stroke: "currentColor"
|
|
1241
|
-
})));
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
var _path$22;
|
|
1245
|
-
|
|
1246
|
-
function _extends$4u() { _extends$4u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4u.apply(this, arguments); }
|
|
1247
|
-
|
|
1248
|
-
function SvgFilter(props) {
|
|
1249
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4u({
|
|
1250
|
-
viewBox: "0 0 16 16",
|
|
1251
|
-
fill: "none",
|
|
1252
|
-
strokeLinecap: "round",
|
|
1253
|
-
strokeLinejoin: "round",
|
|
1254
|
-
width: "1em",
|
|
1255
|
-
height: "1em"
|
|
1256
|
-
}, props), _path$22 || (_path$22 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1257
|
-
d: "M14.667 2H1.333l5.334 6.307v4.36L9.333 14V8.307L14.667 2z",
|
|
1258
|
-
stroke: "currentColor"
|
|
1259
|
-
})));
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
var _path$1P;
|
|
1263
|
-
|
|
1264
|
-
function _extends$45() { _extends$45 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$45.apply(this, arguments); }
|
|
1265
|
-
|
|
1266
|
-
function SvgMore(props) {
|
|
1267
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$45({
|
|
1268
|
-
viewBox: "0 0 16 16",
|
|
1269
|
-
fill: "none",
|
|
1270
|
-
strokeLinecap: "round",
|
|
1271
|
-
strokeLinejoin: "round",
|
|
1272
|
-
width: "1em",
|
|
1273
|
-
height: "1em"
|
|
1274
|
-
}, props), _path$1P || (_path$1P = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1275
|
-
d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.334A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z",
|
|
1276
|
-
stroke: "currentColor"
|
|
1277
|
-
})));
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
var _path$1J;
|
|
1281
|
-
|
|
1282
|
-
function _extends$3X() { _extends$3X = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3X.apply(this, arguments); }
|
|
1283
|
-
|
|
1284
|
-
function SvgSearch(props) {
|
|
1285
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3X({
|
|
1286
|
-
viewBox: "0 0 16 16",
|
|
1287
|
-
fill: "none",
|
|
1288
|
-
strokeLinecap: "round",
|
|
1289
|
-
strokeLinejoin: "round",
|
|
1290
|
-
width: "1em",
|
|
1291
|
-
height: "1em"
|
|
1292
|
-
}, props), _path$1J || (_path$1J = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1293
|
-
d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9",
|
|
1294
|
-
stroke: "currentColor"
|
|
1295
|
-
})));
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
var useStyles$4 = core.makeStyles(function (theme) { return ({
|
|
1299
|
-
icon: {
|
|
1300
|
-
marginRight: theme.spacing(1.5),
|
|
1301
|
-
marginTop: theme.spacing(0.5),
|
|
1302
|
-
scale: 1.5,
|
|
1303
|
-
},
|
|
1304
|
-
selectContainer: {
|
|
1305
|
-
padding: '8px 0',
|
|
1306
|
-
},
|
|
1307
|
-
selectRoot: {
|
|
1308
|
-
'&:focus': {
|
|
1309
|
-
backgroundColor: 'transparent',
|
|
1310
|
-
},
|
|
1311
|
-
},
|
|
1312
|
-
hidden: {
|
|
1313
|
-
display: 'none',
|
|
1314
|
-
},
|
|
157
|
+
var useStyles$4 = core.makeStyles(function (theme) { return ({
|
|
158
|
+
icon: {
|
|
159
|
+
marginRight: theme.spacing(1.5),
|
|
160
|
+
marginTop: theme.spacing(0.5),
|
|
161
|
+
scale: 1.5,
|
|
162
|
+
},
|
|
163
|
+
selectContainer: {
|
|
164
|
+
padding: '8px 0',
|
|
165
|
+
},
|
|
166
|
+
selectRoot: {
|
|
167
|
+
'&:focus': {
|
|
168
|
+
backgroundColor: 'transparent',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
hidden: {
|
|
172
|
+
display: 'none',
|
|
173
|
+
},
|
|
1315
174
|
}); });
|
|
1316
175
|
|
|
1317
176
|
var TableContext = React.createContext({});
|
|
1318
177
|
|
|
1319
|
-
var FilterPanelContext = React.createContext(null);
|
|
1320
|
-
var useFilterPanelContext = function () {
|
|
1321
|
-
var context = React.useContext(FilterPanelContext);
|
|
1322
|
-
if (!context) {
|
|
1323
|
-
throw new Error('useFilterPanelContext has to be used within <FilterPanelContext.Provider>');
|
|
1324
|
-
}
|
|
1325
|
-
return context;
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
|
-
var SelectFilter = function (props) {
|
|
1329
|
-
var _a, _b, _c;
|
|
1330
|
-
var options = props.options, columnId = props.columnId, multiple = props.multiple;
|
|
1331
|
-
var classes = useStyles$4();
|
|
1332
|
-
var _d = React.useContext(TableContext), table = _d.table, stagedColumnFilters = _d.stagedColumnFilters, stageFilterSelections = _d.stageFilterSelections;
|
|
1333
|
-
var _e = React.useState(false), open = _e[0], setOpen = _e[1];
|
|
1334
|
-
var _f = useFilterPanelContext().anchorState, setAnchorEl = _f[1];
|
|
1335
|
-
var column = table.getColumn(columnId);
|
|
1336
|
-
var meta = column.columnDef.meta;
|
|
1337
|
-
var filterName = (_a = meta === null || meta === void 0 ? void 0 : meta.filter) === null || _a === void 0 ? void 0 : _a.name;
|
|
1338
|
-
var value = '';
|
|
1339
|
-
if (stageFilterSelections && !!stagedColumnFilters.get(columnId)) {
|
|
1340
|
-
value = stagedColumnFilters.get(columnId);
|
|
1341
|
-
}
|
|
1342
|
-
else {
|
|
1343
|
-
value = column.getFilterValue();
|
|
1344
|
-
}
|
|
1345
|
-
var fallbackValue = multiple ? [] : '';
|
|
1346
|
-
var filteredOptions = options.map(function (option) {
|
|
1347
|
-
if (Array.isArray(value)) {
|
|
1348
|
-
if (value.includes(option.value)) {
|
|
1349
|
-
return __assign$3(__assign$3({}, option), { hide: !stageFilterSelections });
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
1353
|
-
if (value === option.value) {
|
|
1354
|
-
return __assign$3(__assign$3({}, option), { hide: !stageFilterSelections });
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
return __assign$3(__assign$3({}, option), { hide: false });
|
|
1358
|
-
});
|
|
1359
|
-
var filteredOptionsCount = filteredOptions.filter(function (option) { return !(option === null || option === void 0 ? void 0 : option.hide); }).length;
|
|
1360
|
-
var renderedValue = '';
|
|
1361
|
-
if (!stageFilterSelections && value && filteredOptions && filteredOptionsCount > 0) {
|
|
1362
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
1363
|
-
renderedValue = (_c = (_b = filteredOptions.find(function (option) { return option.value === value; })) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : filterName;
|
|
1364
|
-
}
|
|
1365
|
-
else if (Array.isArray(value) && value.length > 0) {
|
|
1366
|
-
renderedValue = value.length + " selected";
|
|
1367
|
-
}
|
|
1368
|
-
else {
|
|
1369
|
-
renderedValue = filterName;
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
var handleChange = function (event) {
|
|
1373
|
-
event.stopPropagation();
|
|
1374
|
-
if (stageFilterSelections) {
|
|
1375
|
-
stagedColumnFilters.update(columnId, event.target.value);
|
|
1376
|
-
}
|
|
1377
|
-
else {
|
|
1378
|
-
column.setFilterValue(event.target.value);
|
|
1379
|
-
setAnchorEl(null);
|
|
1380
|
-
}
|
|
1381
|
-
};
|
|
1382
|
-
var handleItemClick = function () {
|
|
1383
|
-
if (multiple) {
|
|
1384
|
-
if (!stageFilterSelections && filteredOptionsCount === 1) {
|
|
1385
|
-
setOpen(false);
|
|
1386
|
-
}
|
|
1387
|
-
else {
|
|
1388
|
-
setOpen(false);
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
};
|
|
1392
|
-
return (React__default['default'].createElement(core.Box, { className: classes.selectContainer },
|
|
1393
|
-
React__default['default'].createElement(core.FormControl, { variant: "outlined", fullWidth: true },
|
|
1394
|
-
React__default['default'].createElement(core.InputLabel, { id: "select-filter-label-" + filterName }, filterName || 'filter'),
|
|
1395
|
-
React__default['default'].createElement(core.Select, { variant: "outlined", open: open, onOpen: function () { return setOpen(true); }, onClose: function () { return setOpen(false); }, value: value || fallbackValue, displayEmpty: true, multiple: multiple, renderValue: stageFilterSelections ? undefined : function () { return React__default['default'].createElement(Typography$1, null, renderedValue); }, label: filterName || 'filter', labelId: "select-filter-label-" + filterName, disabled: !filteredOptionsCount, IconComponent: SvgChevronDown, onChange: handleChange, fullWidth: true, classes: {
|
|
1396
|
-
root: classes.selectRoot,
|
|
1397
|
-
icon: classes.icon,
|
|
1398
|
-
}, MenuProps: {
|
|
1399
|
-
disablePortal: true,
|
|
1400
|
-
anchorOrigin: {
|
|
1401
|
-
vertical: 'bottom',
|
|
1402
|
-
horizontal: 'left',
|
|
1403
|
-
},
|
|
1404
|
-
transformOrigin: {
|
|
1405
|
-
vertical: 'top',
|
|
1406
|
-
horizontal: 'left',
|
|
1407
|
-
},
|
|
1408
|
-
getContentAnchorEl: null,
|
|
1409
|
-
} }, filteredOptions.map(function (option, index) {
|
|
1410
|
-
return (React__default['default'].createElement(MenuItem__default['default'], { classes: { root: option.hide ? classes.hidden : undefined }, key: "option-" + value + "-" + index, value: option.value, onClick: handleItemClick }, option.label));
|
|
1411
|
-
})))));
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
var ToggleFilter = function (props) {
|
|
1415
|
-
var table = React.useContext(TableContext).table;
|
|
1416
|
-
var columnId = props.columnId;
|
|
1417
|
-
var column = table.getColumn(columnId);
|
|
1418
|
-
var meta = column.columnDef.meta;
|
|
1419
|
-
var filterName = meta.filter.name;
|
|
1420
|
-
var value = column.getFilterValue();
|
|
1421
|
-
var handleChange = function (event, checked) {
|
|
1422
|
-
event.stopPropagation();
|
|
1423
|
-
column.setFilterValue(checked);
|
|
1424
|
-
};
|
|
1425
|
-
return React__default['default'].createElement(core.FormControlLabel, { control: React__default['default'].createElement(core.Switch, { checked: value, onChange: handleChange }), label: filterName });
|
|
1426
|
-
};
|
|
1427
|
-
|
|
1428
|
-
var FilterControl = function (props) {
|
|
1429
|
-
var input = props.input, columnFilter = __rest$3(props, ["input"]);
|
|
1430
|
-
var inputDictionary = {
|
|
1431
|
-
text: core.TextField,
|
|
1432
|
-
select: SelectFilter,
|
|
1433
|
-
'multi-select': SelectFilter,
|
|
1434
|
-
toggle: ToggleFilter,
|
|
1435
|
-
};
|
|
1436
|
-
var propsDictionary = {
|
|
1437
|
-
select: { multiple: false },
|
|
1438
|
-
'multi-select': { multiple: true },
|
|
1439
|
-
};
|
|
1440
|
-
// @ts-expect-error - todo.
|
|
1441
|
-
return React__default['default'].createElement("div", null, React.createElement(inputDictionary[input], __assign$3(__assign$3({}, columnFilter), propsDictionary[input])));
|
|
1442
|
-
};
|
|
1443
|
-
|
|
1444
|
-
var useColumnFilters = function (table) {
|
|
1445
|
-
var selectedColumnFilters = getSelectedColumnFilters(table.getState());
|
|
1446
|
-
var columnFilters = getColumnFilters(table.getAllFlatColumns());
|
|
1447
|
-
var hasColumnFilters = columnFilters.length > 0;
|
|
1448
|
-
var deselectColumnFilter = makeDeselectColumnFilter(table);
|
|
1449
|
-
var formatSelectedFilterText = makeFormatSelectedFilterText(table);
|
|
1450
|
-
var resetColumnFilters = table.resetColumnFilters;
|
|
1451
|
-
return {
|
|
1452
|
-
selectedColumnFilters: selectedColumnFilters,
|
|
1453
|
-
columnFilters: columnFilters,
|
|
1454
|
-
hasColumnFilters: hasColumnFilters,
|
|
1455
|
-
deselectColumnFilter: deselectColumnFilter,
|
|
1456
|
-
formatSelectedFilterText: formatSelectedFilterText,
|
|
1457
|
-
resetColumnFilters: resetColumnFilters,
|
|
1458
|
-
};
|
|
1459
|
-
};
|
|
1460
|
-
function getSelectedColumnFilters(state) {
|
|
1461
|
-
var columnFilters = state.columnFilters;
|
|
1462
|
-
var selectedColumnFilters = columnFilters.reduce(function (acc, columnFilter) {
|
|
1463
|
-
var id = columnFilter.id, value = columnFilter.value;
|
|
1464
|
-
var selections = [];
|
|
1465
|
-
if (value) {
|
|
1466
|
-
if (Array.isArray(value)) {
|
|
1467
|
-
value.forEach(function (innerValue) {
|
|
1468
|
-
selections.push({ id: id, value: innerValue });
|
|
1469
|
-
});
|
|
1470
|
-
}
|
|
1471
|
-
else if (typeof value === 'string' || typeof value === 'number') {
|
|
1472
|
-
selections.push({ id: id, value: value });
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
return __spreadArray(__spreadArray([], acc), selections);
|
|
1476
|
-
}, []);
|
|
1477
|
-
return selectedColumnFilters;
|
|
1478
|
-
}
|
|
1479
|
-
function getColumnFilters(columns) {
|
|
1480
|
-
return columns
|
|
1481
|
-
.map(function (column) {
|
|
1482
|
-
var meta = column.columnDef.meta;
|
|
1483
|
-
if (meta === null || meta === void 0 ? void 0 : meta.filter) {
|
|
1484
|
-
return __assign$3({ columnId: column.id }, meta.filter);
|
|
1485
|
-
}
|
|
1486
|
-
})
|
|
1487
|
-
.filter(Boolean);
|
|
1488
|
-
}
|
|
1489
|
-
function makeDeselectColumnFilter(table) {
|
|
1490
|
-
return function (columnFilter) {
|
|
1491
|
-
var column = table.getColumn(columnFilter.id);
|
|
1492
|
-
column.setFilterValue(function (prev) {
|
|
1493
|
-
if (Array.isArray(prev)) {
|
|
1494
|
-
return prev.filter(function (value) { return value !== columnFilter.value; });
|
|
1495
|
-
}
|
|
1496
|
-
else if (typeof prev === 'string' || typeof prev === 'number') {
|
|
1497
|
-
return null;
|
|
1498
|
-
}
|
|
1499
|
-
return prev;
|
|
1500
|
-
});
|
|
1501
|
-
};
|
|
1502
|
-
}
|
|
1503
|
-
function makeFormatSelectedFilterText(table) {
|
|
1504
|
-
return function (columnFilter) {
|
|
1505
|
-
var column = table.getColumn(columnFilter.id);
|
|
1506
|
-
var meta = column.columnDef.meta;
|
|
1507
|
-
var name = (meta === null || meta === void 0 ? void 0 : meta.filter.name) || '';
|
|
1508
|
-
var optionMatch = meta === null || meta === void 0 ? void 0 : meta.filter.options.find(function (option) { return option.value === columnFilter.value; });
|
|
1509
|
-
var label = optionMatch === null || optionMatch === void 0 ? void 0 : optionMatch.label;
|
|
1510
|
-
return [name, label];
|
|
1511
|
-
};
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
var useStagedColumnFilters = function (selectedColumnFilters) {
|
|
1515
|
-
var _a = React.useState(function () {
|
|
1516
|
-
return selectedColumnFilters.reduce(function (acc, _a) {
|
|
1517
|
-
var id = _a.id, value = _a.value;
|
|
1518
|
-
if (acc.has(id)) {
|
|
1519
|
-
var existingValue = acc.get(id);
|
|
1520
|
-
// If the existing value is a string, convert it to an array and add the new value
|
|
1521
|
-
if (typeof existingValue === 'string') {
|
|
1522
|
-
acc.set(id, [existingValue, value]);
|
|
1523
|
-
}
|
|
1524
|
-
else {
|
|
1525
|
-
existingValue.push(value);
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
else {
|
|
1529
|
-
acc.set(id, value);
|
|
1530
|
-
}
|
|
1531
|
-
return acc;
|
|
1532
|
-
}, new Map());
|
|
1533
|
-
}), columnInputValues = _a[0], setColumnInputValues = _a[1];
|
|
1534
|
-
var filterState = {
|
|
1535
|
-
update: function (columnId, value) {
|
|
1536
|
-
return setColumnInputValues(columnInputValues.set(columnId, value));
|
|
1537
|
-
},
|
|
1538
|
-
get: function (columnId) { return columnInputValues.get(columnId); },
|
|
1539
|
-
clear: function () {
|
|
1540
|
-
columnInputValues.clear();
|
|
1541
|
-
setColumnInputValues(columnInputValues);
|
|
1542
|
-
},
|
|
1543
|
-
delete: function (columnFilter) {
|
|
1544
|
-
var values = columnInputValues.get(columnFilter.id);
|
|
1545
|
-
if (values && Array.isArray(values)) {
|
|
1546
|
-
var valueIndex = values.indexOf(columnFilter.value);
|
|
1547
|
-
values.splice(valueIndex, 1);
|
|
1548
|
-
if (values.length > 0) {
|
|
1549
|
-
columnInputValues.set(columnFilter.id, values);
|
|
1550
|
-
}
|
|
1551
|
-
else {
|
|
1552
|
-
columnInputValues.delete(columnFilter.id);
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
else {
|
|
1556
|
-
columnInputValues.delete(columnFilter.id);
|
|
1557
|
-
}
|
|
1558
|
-
setColumnInputValues(columnInputValues);
|
|
1559
|
-
},
|
|
1560
|
-
exist: function () { return columnInputValues.size > 0; },
|
|
1561
|
-
};
|
|
1562
|
-
return filterState;
|
|
178
|
+
var FilterPanelContext = React.createContext(null);
|
|
179
|
+
var useFilterPanelContext = function () {
|
|
180
|
+
var context = React.useContext(FilterPanelContext);
|
|
181
|
+
if (!context) {
|
|
182
|
+
throw new Error('useFilterPanelContext has to be used within <FilterPanelContext.Provider>');
|
|
183
|
+
}
|
|
184
|
+
return context;
|
|
1563
185
|
};
|
|
1564
186
|
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
strokeLinecap: "round",
|
|
1650
|
-
strokeLinejoin: "round",
|
|
1651
|
-
width: "1em",
|
|
1652
|
-
height: "1em"
|
|
1653
|
-
}, props), _path$1D || (_path$1D = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1654
|
-
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
|
|
1655
|
-
stroke: "currentColor"
|
|
1656
|
-
})));
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
|
-
var useIconStyles = core.makeStyles(function (_a) {
|
|
1660
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
1661
|
-
var getFontSize = function (_a) {
|
|
1662
|
-
var size = _a.size;
|
|
1663
|
-
var sizes = {
|
|
1664
|
-
inherit: 'inherit',
|
|
1665
|
-
small: spacing(1.5),
|
|
1666
|
-
medium: spacing(2),
|
|
1667
|
-
large: spacing(2.5),
|
|
1668
|
-
'extra-large': spacing(3),
|
|
1669
|
-
};
|
|
1670
|
-
return size ? sizes[size] : 'inherit';
|
|
1671
|
-
};
|
|
1672
|
-
var getColor = function (props) {
|
|
1673
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
1674
|
-
var value = 'inherit';
|
|
1675
|
-
if (props.color) {
|
|
1676
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
1677
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
1678
|
-
// @ts-expect-error - todo.
|
|
1679
|
-
value = palette[color][variant];
|
|
1680
|
-
}
|
|
1681
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
1682
|
-
value = props.color;
|
|
1683
|
-
}
|
|
1684
|
-
}
|
|
1685
|
-
return value;
|
|
1686
|
-
};
|
|
1687
|
-
return {
|
|
1688
|
-
root: {
|
|
1689
|
-
color: getColor,
|
|
1690
|
-
fontSize: getFontSize,
|
|
1691
|
-
strokeWidth: '1.3px',
|
|
1692
|
-
},
|
|
1693
|
-
};
|
|
1694
|
-
});
|
|
1695
|
-
|
|
1696
|
-
var classnames$1 = {exports: {}};
|
|
1697
|
-
|
|
1698
|
-
/*!
|
|
1699
|
-
Copyright (c) 2018 Jed Watson.
|
|
1700
|
-
Licensed under the MIT License (MIT), see
|
|
1701
|
-
http://jedwatson.github.io/classnames
|
|
1702
|
-
*/
|
|
1703
|
-
|
|
1704
|
-
(function (module) {
|
|
1705
|
-
/* global define */
|
|
1706
|
-
|
|
1707
|
-
(function () {
|
|
1708
|
-
|
|
1709
|
-
var hasOwn = {}.hasOwnProperty;
|
|
1710
|
-
|
|
1711
|
-
function classNames() {
|
|
1712
|
-
var classes = [];
|
|
1713
|
-
|
|
1714
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
1715
|
-
var arg = arguments[i];
|
|
1716
|
-
if (!arg) continue;
|
|
1717
|
-
|
|
1718
|
-
var argType = typeof arg;
|
|
1719
|
-
|
|
1720
|
-
if (argType === 'string' || argType === 'number') {
|
|
1721
|
-
classes.push(arg);
|
|
1722
|
-
} else if (Array.isArray(arg)) {
|
|
1723
|
-
if (arg.length) {
|
|
1724
|
-
var inner = classNames.apply(null, arg);
|
|
1725
|
-
if (inner) {
|
|
1726
|
-
classes.push(inner);
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
} else if (argType === 'object') {
|
|
1730
|
-
if (arg.toString === Object.prototype.toString) {
|
|
1731
|
-
for (var key in arg) {
|
|
1732
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1733
|
-
classes.push(key);
|
|
1734
|
-
}
|
|
1735
|
-
}
|
|
1736
|
-
} else {
|
|
1737
|
-
classes.push(arg.toString());
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
return classes.join(' ');
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
if (module.exports) {
|
|
1746
|
-
classNames.default = classNames;
|
|
1747
|
-
module.exports = classNames;
|
|
1748
|
-
} else {
|
|
1749
|
-
window.classNames = classNames;
|
|
1750
|
-
}
|
|
1751
|
-
}());
|
|
1752
|
-
}(classnames$1));
|
|
1753
|
-
|
|
1754
|
-
var classNames$1 = classnames$1.exports;
|
|
1755
|
-
|
|
1756
|
-
var iconStaticClassName = 'pop-icon';
|
|
1757
|
-
var Icon = function (props) {
|
|
1758
|
-
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
1759
|
-
var hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
|
|
1760
|
-
if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {
|
|
1761
|
-
restProps['aria-hidden'] = true;
|
|
1762
|
-
}
|
|
1763
|
-
var classes = useIconStyles(props);
|
|
1764
|
-
var isValid = true;
|
|
1765
|
-
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
1766
|
-
isValid = false;
|
|
1767
|
-
}
|
|
1768
|
-
return isValid
|
|
1769
|
-
? React.createElement(icon, __assign({ className: classNames$1([classes.root, iconStaticClassName, className]) }, restProps))
|
|
1770
|
-
: null;
|
|
1771
|
-
};
|
|
1772
|
-
Icon.defaultProps = {
|
|
1773
|
-
size: 'inherit',
|
|
1774
|
-
color: 'inherit',
|
|
1775
|
-
};
|
|
1776
|
-
Icon.displayName = 'Icon';
|
|
1777
|
-
|
|
1778
|
-
var LoadingStatus;
|
|
1779
|
-
(function (LoadingStatus) {
|
|
1780
|
-
LoadingStatus["ERROR"] = "ERROR";
|
|
1781
|
-
LoadingStatus["LOADED"] = "LOADED";
|
|
1782
|
-
LoadingStatus["PENDING"] = "PENDING";
|
|
1783
|
-
})(LoadingStatus || (LoadingStatus = {}));
|
|
1784
|
-
var useImgProps = function (avatarProps) {
|
|
1785
|
-
var _a = React__default['default'].useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
1786
|
-
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onLoad: function (event) {
|
|
1787
|
-
var _a, _b;
|
|
1788
|
-
setLoaded(LoadingStatus.LOADED);
|
|
1789
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
1790
|
-
} });
|
|
1791
|
-
return { imgProps: imgProps, loaded: loaded };
|
|
187
|
+
var SelectFilter = function (props) {
|
|
188
|
+
var _a, _b, _c;
|
|
189
|
+
var options = props.options, columnId = props.columnId, multiple = props.multiple;
|
|
190
|
+
var classes = useStyles$4();
|
|
191
|
+
var _d = React.useContext(TableContext), table = _d.table, stagedColumnFilters = _d.stagedColumnFilters, stageFilterSelections = _d.stageFilterSelections;
|
|
192
|
+
var _e = React.useState(false), open = _e[0], setOpen = _e[1];
|
|
193
|
+
var _f = useFilterPanelContext().anchorState, setAnchorEl = _f[1];
|
|
194
|
+
var column = table.getColumn(columnId);
|
|
195
|
+
var meta = column.columnDef.meta;
|
|
196
|
+
var filterName = (_a = meta === null || meta === void 0 ? void 0 : meta.filter) === null || _a === void 0 ? void 0 : _a.name;
|
|
197
|
+
var value = '';
|
|
198
|
+
if (stageFilterSelections && !!stagedColumnFilters.get(columnId)) {
|
|
199
|
+
value = stagedColumnFilters.get(columnId);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
value = column.getFilterValue();
|
|
203
|
+
}
|
|
204
|
+
var fallbackValue = multiple ? [] : '';
|
|
205
|
+
var filteredOptions = options.map(function (option) {
|
|
206
|
+
if (Array.isArray(value)) {
|
|
207
|
+
if (value.includes(option.value)) {
|
|
208
|
+
return tslib.__assign(tslib.__assign({}, option), { hide: !stageFilterSelections });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
|
212
|
+
if (value === option.value) {
|
|
213
|
+
return tslib.__assign(tslib.__assign({}, option), { hide: !stageFilterSelections });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return tslib.__assign(tslib.__assign({}, option), { hide: false });
|
|
217
|
+
});
|
|
218
|
+
var filteredOptionsCount = filteredOptions.filter(function (option) { return !(option === null || option === void 0 ? void 0 : option.hide); }).length;
|
|
219
|
+
var renderedValue = '';
|
|
220
|
+
if (!stageFilterSelections && value && filteredOptions && filteredOptionsCount > 0) {
|
|
221
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
|
222
|
+
renderedValue = (_c = (_b = filteredOptions.find(function (option) { return option.value === value; })) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : filterName;
|
|
223
|
+
}
|
|
224
|
+
else if (Array.isArray(value) && value.length > 0) {
|
|
225
|
+
renderedValue = value.length + " selected";
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
renderedValue = filterName;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
var handleChange = function (event) {
|
|
232
|
+
event.stopPropagation();
|
|
233
|
+
if (stageFilterSelections) {
|
|
234
|
+
stagedColumnFilters.update(columnId, event.target.value);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
column.setFilterValue(event.target.value);
|
|
238
|
+
setAnchorEl(null);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
var handleItemClick = function () {
|
|
242
|
+
if (multiple) {
|
|
243
|
+
if (!stageFilterSelections && filteredOptionsCount === 1) {
|
|
244
|
+
setOpen(false);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
setOpen(false);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
return (React.createElement(core.Box, { className: classes.selectContainer },
|
|
252
|
+
React.createElement(core.FormControl, { variant: "outlined", fullWidth: true },
|
|
253
|
+
React.createElement(core.InputLabel, { id: "select-filter-label-" + filterName }, filterName || 'filter'),
|
|
254
|
+
React.createElement(core.Select, { variant: "outlined", open: open, onOpen: function () { return setOpen(true); }, onClose: function () { return setOpen(false); }, value: value || fallbackValue, displayEmpty: true, multiple: multiple, renderValue: stageFilterSelections ? undefined : function () { return React.createElement(commonUi.Typography, null, renderedValue); }, label: filterName || 'filter', labelId: "select-filter-label-" + filterName, disabled: !filteredOptionsCount, IconComponent: webIcons.ChevronDown, onChange: handleChange, fullWidth: true, classes: {
|
|
255
|
+
root: classes.selectRoot,
|
|
256
|
+
icon: classes.icon,
|
|
257
|
+
}, MenuProps: {
|
|
258
|
+
disablePortal: true,
|
|
259
|
+
anchorOrigin: {
|
|
260
|
+
vertical: 'bottom',
|
|
261
|
+
horizontal: 'left',
|
|
262
|
+
},
|
|
263
|
+
transformOrigin: {
|
|
264
|
+
vertical: 'top',
|
|
265
|
+
horizontal: 'left',
|
|
266
|
+
},
|
|
267
|
+
getContentAnchorEl: null,
|
|
268
|
+
} }, filteredOptions.map(function (option, index) {
|
|
269
|
+
return (React.createElement(commonUi.MenuItem, { classes: { root: option.hide ? classes.hidden : undefined }, key: "option-" + value + "-" + index, value: option.value, onClick: handleItemClick }, option.label));
|
|
270
|
+
})))));
|
|
1792
271
|
};
|
|
1793
272
|
|
|
1794
|
-
var
|
|
1795
|
-
var
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
};
|
|
1805
|
-
|
|
1806
|
-
var fontSizes = {
|
|
1807
|
-
'extra-small': '0.75rem',
|
|
1808
|
-
small: '1rem',
|
|
1809
|
-
medium: '1rem',
|
|
1810
|
-
large: '1.25rem',
|
|
1811
|
-
'extra-large': '3.5rem',
|
|
1812
|
-
};
|
|
1813
|
-
return fontSizes[props.size];
|
|
1814
|
-
};
|
|
1815
|
-
var useAvatarStyles = styles.makeStyles(function (theme) { return ({
|
|
1816
|
-
root: function (props) { return ({
|
|
1817
|
-
width: getAvatarDimensions(theme, props),
|
|
1818
|
-
height: getAvatarDimensions(theme, props),
|
|
1819
|
-
fontSize: getAvatarFontSize(props),
|
|
1820
|
-
backgroundColor: props.loaded === LoadingStatus.LOADED ? 'transparent' : props.background,
|
|
1821
|
-
color: theme.palette.getContrastText(props.background),
|
|
1822
|
-
objectFit: props.fit,
|
|
1823
|
-
}); },
|
|
1824
|
-
fallback: function (props) { return ({
|
|
1825
|
-
fontSize: getAvatarDimensions(theme, props),
|
|
1826
|
-
strokeWidth: 1,
|
|
1827
|
-
}); },
|
|
1828
|
-
}); });
|
|
1829
|
-
|
|
1830
|
-
var Avatar = React.forwardRef(function (props, ref) {
|
|
1831
|
-
var children = props.children, src = props.src, alt = props.alt, fallback = props.fallback, muiProps = __rest(props, ["children", "src", "alt", "fallback"]);
|
|
1832
|
-
var _a = useImgProps(props), imgProps = _a.imgProps, loaded = _a.loaded;
|
|
1833
|
-
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
1834
|
-
var displayAltTextFallback = src && alt;
|
|
1835
|
-
var displayNoFallback = fallback === 'none';
|
|
1836
|
-
var displayCustomFallback = fallback !== 'none' && typeof fallback !== 'undefined';
|
|
1837
|
-
var Fallback;
|
|
1838
|
-
if (displayAltTextFallback) {
|
|
1839
|
-
Fallback = null;
|
|
1840
|
-
}
|
|
1841
|
-
else if (displayNoFallback) {
|
|
1842
|
-
Fallback = ' ';
|
|
1843
|
-
}
|
|
1844
|
-
else if (displayCustomFallback) {
|
|
1845
|
-
Fallback = fallback;
|
|
1846
|
-
}
|
|
1847
|
-
else {
|
|
1848
|
-
Fallback = React__default['default'].createElement(Icon, { icon: SvgUser, className: classes.fallback });
|
|
1849
|
-
}
|
|
1850
|
-
return (React__default['default'].createElement(MuiAvatar__default['default'], __assign({ ref: ref, classes: { root: classes.root }, src: src, alt: alt }, muiProps, { imgProps: imgProps }), children || Fallback));
|
|
1851
|
-
});
|
|
1852
|
-
Avatar.defaultProps = {
|
|
1853
|
-
size: 'medium',
|
|
1854
|
-
fit: 'cover',
|
|
1855
|
-
background: '#E0E0E0',
|
|
1856
|
-
};
|
|
1857
|
-
Avatar.displayName = 'Avatar';
|
|
1858
|
-
|
|
1859
|
-
styles.makeStyles(function (theme) { return ({
|
|
1860
|
-
circle: {
|
|
1861
|
-
backgroundColor: theme.palette.grey[300],
|
|
1862
|
-
borderRadius: '50%',
|
|
1863
|
-
height: theme.spacing(0.65),
|
|
1864
|
-
width: theme.spacing(0.65),
|
|
1865
|
-
margin: theme.spacing(1) + "px 0 " + theme.spacing(1) + "px " + theme.spacing(1) + "px",
|
|
1866
|
-
},
|
|
1867
|
-
container: {
|
|
1868
|
-
border: "1px solid " + theme.palette.secondary.light,
|
|
1869
|
-
borderRadius: theme.spacing(0.5),
|
|
1870
|
-
flexGrow: 1,
|
|
1871
|
-
},
|
|
1872
|
-
titleBar: {
|
|
1873
|
-
display: 'flex',
|
|
1874
|
-
flexDirection: 'row',
|
|
1875
|
-
borderBottom: "1px solid " + theme.palette.secondary.light,
|
|
1876
|
-
width: '100%',
|
|
1877
|
-
},
|
|
1878
|
-
}); });
|
|
1879
|
-
|
|
1880
|
-
var useButtonStyles$1 = styles.makeStyles(function () { return ({
|
|
1881
|
-
root: {
|
|
1882
|
-
minWidth: 'unset',
|
|
1883
|
-
},
|
|
1884
|
-
label: {
|
|
1885
|
-
textTransform: function (_a) {
|
|
1886
|
-
var textTransform = _a.textTransform;
|
|
1887
|
-
return textTransform;
|
|
1888
|
-
},
|
|
1889
|
-
},
|
|
1890
|
-
}); });
|
|
1891
|
-
|
|
1892
|
-
var Button$1 = function (props) {
|
|
1893
|
-
props.textTransform; var loading = props.loading, classesOverride = props.classes, className = props.className, ButtonRef = props.ButtonRef, muiProps = __rest(props, ["textTransform", "loading", "classes", "className", "ButtonRef"]);
|
|
1894
|
-
props.classes; var styleProps = __rest(props, ["classes"]);
|
|
1895
|
-
var classes = useButtonStyles$1(styleProps);
|
|
1896
|
-
var typography = styles.useTheme().typography;
|
|
1897
|
-
var loadingIndicator = {
|
|
1898
|
-
startIcon: React__default['default'].createElement(CircularProgress__default['default'], { color: "inherit", size: typography.button.fontSize }),
|
|
1899
|
-
disabled: true,
|
|
1900
|
-
};
|
|
1901
|
-
return (React__default['default'].createElement(MuiButton__default['default'], __assign({ ref: ButtonRef, classes: __assign(__assign({}, classes), classesOverride), className: classNames$1([className, 'pm-button']) }, muiProps, (loading && loadingIndicator))));
|
|
1902
|
-
};
|
|
1903
|
-
Button$1.displayName = 'Button';
|
|
1904
|
-
|
|
1905
|
-
var Checkbox = React.forwardRef(function (props, ref) {
|
|
1906
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
1907
|
-
var control = React__default['default'].createElement(MuiCheckbox__default['default'], __assign({ disabled: label ? undefined : disabled }, muiProps));
|
|
1908
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
1909
|
-
});
|
|
1910
|
-
Checkbox.displayName = 'Checkbox';
|
|
1911
|
-
|
|
1912
|
-
var getBackground$1 = function (theme) { return function (props) {
|
|
1913
|
-
var variant = props.variant, severity = props.severity;
|
|
1914
|
-
var background = theme.palette.grey[100];
|
|
1915
|
-
var backgrounds = {
|
|
1916
|
-
outlined: 'none',
|
|
1917
|
-
error: 'error.main',
|
|
1918
|
-
warning: 'warning.main',
|
|
1919
|
-
info: 'info.light',
|
|
1920
|
-
success: 'success.light',
|
|
1921
|
-
};
|
|
1922
|
-
if (variant === 'outlined') {
|
|
1923
|
-
background = backgrounds[variant];
|
|
1924
|
-
}
|
|
1925
|
-
else if (severity) {
|
|
1926
|
-
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
1927
|
-
// @ts-expect-error - todo.
|
|
1928
|
-
background = theme.palette[color][colorVariant];
|
|
1929
|
-
}
|
|
1930
|
-
return background;
|
|
1931
|
-
}; };
|
|
1932
|
-
var getColor$1 = function (theme) { return function (props) {
|
|
1933
|
-
var variant = props.variant, severity = props.severity;
|
|
1934
|
-
var textColor;
|
|
1935
|
-
if (variant === 'outlined' && severity) {
|
|
1936
|
-
var textColors = {
|
|
1937
|
-
error: theme.palette.error.main,
|
|
1938
|
-
info: theme.palette.info.main,
|
|
1939
|
-
warning: theme.palette.warning.dark,
|
|
1940
|
-
success: theme.palette.success.dark,
|
|
1941
|
-
};
|
|
1942
|
-
textColor = textColors[severity];
|
|
1943
|
-
}
|
|
1944
|
-
else if (variant === 'outlined' && !severity) {
|
|
1945
|
-
textColor = theme.palette.grey[700];
|
|
1946
|
-
}
|
|
1947
|
-
else if ((variant === 'default' || variant === undefined) && severity) {
|
|
1948
|
-
var textColors = {
|
|
1949
|
-
error: theme.palette.common.white,
|
|
1950
|
-
info: theme.palette.secondary.main,
|
|
1951
|
-
warning: theme.palette.secondary.main,
|
|
1952
|
-
success: theme.palette.secondary.main,
|
|
1953
|
-
};
|
|
1954
|
-
textColor = textColors[severity];
|
|
1955
|
-
}
|
|
1956
|
-
return textColor;
|
|
1957
|
-
}; };
|
|
1958
|
-
var getBorder = function (theme) { return function (props) {
|
|
1959
|
-
var variant = props.variant, severity = props.severity;
|
|
1960
|
-
var borderColor;
|
|
1961
|
-
if (variant === 'outlined' && severity) {
|
|
1962
|
-
var borderColors = {
|
|
1963
|
-
error: theme.palette.error.main,
|
|
1964
|
-
info: theme.palette.info.main,
|
|
1965
|
-
warning: theme.palette.warning.dark,
|
|
1966
|
-
success: theme.palette.success.dark,
|
|
1967
|
-
};
|
|
1968
|
-
borderColor = borderColors[severity];
|
|
1969
|
-
}
|
|
1970
|
-
return borderColor;
|
|
1971
|
-
}; };
|
|
1972
|
-
// using `any` here is a bit of cheating but it doesn't matter since this doesn't depend on
|
|
1973
|
-
// any component-specific props
|
|
1974
|
-
styles.makeStyles(function (theme) { return ({
|
|
1975
|
-
root: {
|
|
1976
|
-
background: getBackground$1(theme),
|
|
1977
|
-
color: getColor$1(theme),
|
|
1978
|
-
borderColor: getBorder(theme),
|
|
1979
|
-
borderRadius: theme.spacing(0.5),
|
|
1980
|
-
},
|
|
1981
|
-
icon: {
|
|
1982
|
-
color: 'inherit',
|
|
1983
|
-
height: theme.spacing(2),
|
|
1984
|
-
width: theme.spacing(2),
|
|
1985
|
-
},
|
|
1986
|
-
deleteIcon: {
|
|
1987
|
-
color: theme.palette.grey[500],
|
|
1988
|
-
},
|
|
1989
|
-
}); });
|
|
1990
|
-
|
|
1991
|
-
var defaultTypographyProps = {
|
|
1992
|
-
variant: 'body1',
|
|
273
|
+
var ToggleFilter = function (props) {
|
|
274
|
+
var table = React.useContext(TableContext).table;
|
|
275
|
+
var columnId = props.columnId;
|
|
276
|
+
var column = table.getColumn(columnId);
|
|
277
|
+
var meta = column.columnDef.meta;
|
|
278
|
+
var filterName = meta.filter.name;
|
|
279
|
+
var value = column.getFilterValue();
|
|
280
|
+
var handleChange = function (event, checked) {
|
|
281
|
+
event.stopPropagation();
|
|
282
|
+
column.setFilterValue(checked);
|
|
283
|
+
};
|
|
284
|
+
return React.createElement(core.FormControlLabel, { control: React.createElement(core.Switch, { checked: value, onChange: handleChange }), label: filterName });
|
|
1993
285
|
};
|
|
1994
286
|
|
|
1995
|
-
var
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
var
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
return theme.palette.common[color];
|
|
2010
|
-
case Boolean(isGreyColor):
|
|
2011
|
-
var scale = color.split('.')[1];
|
|
2012
|
-
// @ts-expect-error - todo.
|
|
2013
|
-
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
2014
|
-
case Boolean(isSemanticColor):
|
|
2015
|
-
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
2016
|
-
// @ts-expect-error - todo.
|
|
2017
|
-
return theme.palette[paletteKey][variant];
|
|
2018
|
-
case isTextColor:
|
|
2019
|
-
// @ts-expect-error - todo.
|
|
2020
|
-
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
2021
|
-
default:
|
|
2022
|
-
return undefined;
|
|
2023
|
-
}
|
|
2024
|
-
};
|
|
2025
|
-
var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
2026
|
-
var _a;
|
|
2027
|
-
return ({
|
|
2028
|
-
root: (_a = {},
|
|
2029
|
-
_a["& ." + iconStaticClassName] = {
|
|
2030
|
-
position: 'relative',
|
|
2031
|
-
top: '0.125em',
|
|
2032
|
-
padding: '0 0.125em',
|
|
2033
|
-
boxSizing: 'content-box',
|
|
2034
|
-
},
|
|
2035
|
-
_a.fontFamily = theme.typography.fontFamily,
|
|
2036
|
-
_a.fontWeight = function (_a) {
|
|
2037
|
-
var variant = _a.variant, weight = _a.weight;
|
|
2038
|
-
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
2039
|
-
},
|
|
2040
|
-
_a.fontSize = function (_a) {
|
|
2041
|
-
var variant = _a.variant;
|
|
2042
|
-
return theme.typography[variant].fontSize;
|
|
2043
|
-
},
|
|
2044
|
-
_a.lineHeight = function (_a) {
|
|
2045
|
-
var variant = _a.variant;
|
|
2046
|
-
return theme.typography[variant].lineHeight;
|
|
2047
|
-
},
|
|
2048
|
-
_a.textTransform = function (_a) {
|
|
2049
|
-
var variant = _a.variant;
|
|
2050
|
-
return theme.typography[variant].textTransform;
|
|
2051
|
-
},
|
|
2052
|
-
_a.color = function (_a) {
|
|
2053
|
-
var color = _a.color, variant = _a.variant;
|
|
2054
|
-
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
2055
|
-
},
|
|
2056
|
-
_a),
|
|
2057
|
-
caption: {
|
|
2058
|
-
display: 'inline',
|
|
2059
|
-
},
|
|
2060
|
-
overline: {
|
|
2061
|
-
display: 'inline',
|
|
2062
|
-
},
|
|
2063
|
-
});
|
|
2064
|
-
});
|
|
2065
|
-
|
|
2066
|
-
var Typography = function (props) {
|
|
2067
|
-
props.weight; props.color; var TypographyRef = props.TypographyRef, restProps = __rest(props, ["weight", "color", "TypographyRef"]);
|
|
2068
|
-
var classes = useTypographyStyles(__assign({}, props));
|
|
2069
|
-
var variantMapping = { subtitle1: 'p' };
|
|
2070
|
-
return React__default['default'].createElement(core.Typography, __assign({ classes: classes, variantMapping: variantMapping, ref: TypographyRef }, restProps));
|
|
2071
|
-
};
|
|
2072
|
-
Typography.displayName = 'Typography';
|
|
2073
|
-
Typography.defaultProps = defaultTypographyProps;
|
|
2074
|
-
|
|
2075
|
-
var getFadeStop = function (_a, typographyVariant) {
|
|
2076
|
-
var typography = _a.typography;
|
|
2077
|
-
// @ts-expect-error - todo.
|
|
2078
|
-
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
2079
|
-
? // @ts-expect-error - todo.
|
|
2080
|
-
typography[typographyVariant].lineHeight + "rem"
|
|
2081
|
-
: // @ts-expect-error - todo.
|
|
2082
|
-
typography[typographyVariant].lineHeight;
|
|
2083
|
-
};
|
|
2084
|
-
core.makeStyles(function (theme) { return ({
|
|
2085
|
-
overlay: {
|
|
2086
|
-
position: 'absolute',
|
|
2087
|
-
top: 0,
|
|
2088
|
-
left: 0,
|
|
2089
|
-
height: '100%',
|
|
2090
|
-
width: '100%',
|
|
2091
|
-
background: function (props) { return "linear-gradient(to top, white, #FFF0 " + getFadeStop(theme, props.typographyVariant) + ")"; },
|
|
2092
|
-
},
|
|
2093
|
-
}); });
|
|
2094
|
-
|
|
2095
|
-
var SemanticColors;
|
|
2096
|
-
(function (SemanticColors) {
|
|
2097
|
-
SemanticColors["PRIMARY_MAIN"] = "primary.main";
|
|
2098
|
-
SemanticColors["PRIMARY_DARK"] = "primary.dark";
|
|
2099
|
-
SemanticColors["PRIMARY_LIGHT"] = "primary.light";
|
|
2100
|
-
SemanticColors["SECONDARY_MAIN"] = "secondary.main";
|
|
2101
|
-
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
2102
|
-
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
2103
|
-
})(SemanticColors || (SemanticColors = {}));
|
|
2104
|
-
core.makeStyles(function (theme) { return ({
|
|
2105
|
-
dividerRoot: {
|
|
2106
|
-
gap: theme.spacing(2),
|
|
2107
|
-
},
|
|
2108
|
-
textRoot: {
|
|
2109
|
-
color: function (props) {
|
|
2110
|
-
var textColor = props.textColor;
|
|
2111
|
-
if (Object.values(SemanticColors).includes(textColor)) {
|
|
2112
|
-
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
2113
|
-
// @ts-expect-error - todo.
|
|
2114
|
-
return theme.palette[semanticColor][shade];
|
|
2115
|
-
}
|
|
2116
|
-
else if (textColor) {
|
|
2117
|
-
return textColor;
|
|
2118
|
-
}
|
|
2119
|
-
else {
|
|
2120
|
-
return 'black';
|
|
2121
|
-
}
|
|
2122
|
-
},
|
|
2123
|
-
textTransform: function (props) { return props.textTransform; },
|
|
2124
|
-
},
|
|
2125
|
-
dividerLine: {
|
|
2126
|
-
backgroundColor: function (props) {
|
|
2127
|
-
var dividerColor = props.dividerColor;
|
|
2128
|
-
if (Object.values(SemanticColors).includes(dividerColor)) {
|
|
2129
|
-
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
2130
|
-
// @ts-expect-error - todo.
|
|
2131
|
-
return theme.palette[semanticColor][shade];
|
|
2132
|
-
}
|
|
2133
|
-
else if (dividerColor) {
|
|
2134
|
-
return dividerColor;
|
|
2135
|
-
}
|
|
2136
|
-
else {
|
|
2137
|
-
return theme.palette.grey[500];
|
|
2138
|
-
}
|
|
2139
|
-
},
|
|
2140
|
-
},
|
|
2141
|
-
}); });
|
|
2142
|
-
|
|
2143
|
-
var IconButton = React.forwardRef(function (props, ref) {
|
|
2144
|
-
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
2145
|
-
});
|
|
2146
|
-
IconButton.displayName = 'IconButton';
|
|
2147
|
-
IconButton.defaultProps = {
|
|
2148
|
-
color: 'secondary',
|
|
287
|
+
var FilterControl = function (props) {
|
|
288
|
+
var input = props.input, columnFilter = tslib.__rest(props, ["input"]);
|
|
289
|
+
var inputDictionary = {
|
|
290
|
+
text: core.TextField,
|
|
291
|
+
select: SelectFilter,
|
|
292
|
+
'multi-select': SelectFilter,
|
|
293
|
+
toggle: ToggleFilter,
|
|
294
|
+
};
|
|
295
|
+
var propsDictionary = {
|
|
296
|
+
select: { multiple: false },
|
|
297
|
+
'multi-select': { multiple: true },
|
|
298
|
+
};
|
|
299
|
+
// @ts-expect-error - todo.
|
|
300
|
+
return React.createElement("div", null, React.createElement(inputDictionary[input], tslib.__assign(tslib.__assign({}, columnFilter), propsDictionary[input])));
|
|
2149
301
|
};
|
|
2150
302
|
|
|
2151
|
-
var
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
}
|
|
2166
|
-
Link.defaultProps = {
|
|
2167
|
-
variant: 'body1',
|
|
2168
|
-
};
|
|
2169
|
-
Link.displayName = 'Link';
|
|
2170
|
-
|
|
2171
|
-
var useStyles$4$1 = core.makeStyles(function (_a) {
|
|
2172
|
-
var spacing = _a.spacing;
|
|
2173
|
-
return ({
|
|
2174
|
-
root: {
|
|
2175
|
-
'&:last-child': {
|
|
2176
|
-
marginBottom: 0,
|
|
2177
|
-
},
|
|
2178
|
-
marginBottom: spacing(4),
|
|
2179
|
-
padding: spacing(4),
|
|
2180
|
-
},
|
|
2181
|
-
});
|
|
2182
|
-
});
|
|
2183
|
-
var Paper = React.forwardRef(function (props, ref) {
|
|
2184
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
2185
|
-
var classes = useStyles$4$1(props);
|
|
2186
|
-
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
2187
|
-
});
|
|
2188
|
-
Paper.displayName = 'Paper';
|
|
2189
|
-
Paper.defaultProps = {
|
|
2190
|
-
legacyStyles: false,
|
|
303
|
+
var useColumnFilters = function (table) {
|
|
304
|
+
var selectedColumnFilters = getSelectedColumnFilters(table.getState());
|
|
305
|
+
var columnFilters = getColumnFilters(table.getAllFlatColumns());
|
|
306
|
+
var hasColumnFilters = columnFilters.length > 0;
|
|
307
|
+
var deselectColumnFilter = makeDeselectColumnFilter(table);
|
|
308
|
+
var formatSelectedFilterText = makeFormatSelectedFilterText(table);
|
|
309
|
+
var resetColumnFilters = table.resetColumnFilters;
|
|
310
|
+
return {
|
|
311
|
+
selectedColumnFilters: selectedColumnFilters,
|
|
312
|
+
columnFilters: columnFilters,
|
|
313
|
+
hasColumnFilters: hasColumnFilters,
|
|
314
|
+
deselectColumnFilter: deselectColumnFilter,
|
|
315
|
+
formatSelectedFilterText: formatSelectedFilterText,
|
|
316
|
+
resetColumnFilters: resetColumnFilters,
|
|
317
|
+
};
|
|
2191
318
|
};
|
|
2192
|
-
|
|
2193
|
-
var
|
|
2194
|
-
var
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
},
|
|
2211
|
-
button: {
|
|
2212
|
-
borderTopLeftRadius: 0,
|
|
2213
|
-
borderBottomLeftRadius: 0,
|
|
2214
|
-
alignSelf: 'stretch',
|
|
2215
|
-
},
|
|
2216
|
-
input: {
|
|
2217
|
-
color: function (props) { return props.inputTextColor || 'inherit'; },
|
|
2218
|
-
'&$focused fieldset': {
|
|
2219
|
-
top: -4,
|
|
2220
|
-
},
|
|
2221
|
-
},
|
|
2222
|
-
focused: {},
|
|
2223
|
-
}); });
|
|
2224
|
-
|
|
2225
|
-
var useSwitchStyles = styles.makeStyles(function (theme) { return ({
|
|
2226
|
-
checked: {
|
|
2227
|
-
'& $thumb': {
|
|
2228
|
-
background: theme.palette.success.main,
|
|
2229
|
-
},
|
|
2230
|
-
'&& + $track': {
|
|
2231
|
-
backgroundColor: theme.palette.success.main,
|
|
2232
|
-
},
|
|
2233
|
-
},
|
|
2234
|
-
thumb: {},
|
|
2235
|
-
track: {},
|
|
2236
|
-
}); });
|
|
2237
|
-
|
|
2238
|
-
var Switch = React.forwardRef(function (props, ref) {
|
|
2239
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
2240
|
-
var classes = useSwitchStyles(props);
|
|
2241
|
-
var control = React__default['default'].createElement(MuiSwitch__default['default'], __assign({ classes: classes, disabled: label ? undefined : disabled }, muiProps));
|
|
2242
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
2243
|
-
});
|
|
2244
|
-
Switch.displayName = 'Switch';
|
|
2245
|
-
|
|
2246
|
-
var useToggleButtonStyles = styles.makeStyles(function (theme) { return ({
|
|
2247
|
-
root: {
|
|
2248
|
-
color: theme.palette.text.primary,
|
|
2249
|
-
},
|
|
2250
|
-
selected: {
|
|
2251
|
-
'&&': {
|
|
2252
|
-
'&:hover': {
|
|
2253
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].dark; },
|
|
2254
|
-
},
|
|
2255
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].main; },
|
|
2256
|
-
color: 'white',
|
|
2257
|
-
},
|
|
2258
|
-
},
|
|
2259
|
-
}); });
|
|
2260
|
-
|
|
2261
|
-
var ToggleButton = React.forwardRef(function (props, ref) {
|
|
2262
|
-
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
2263
|
-
var classes = useToggleButtonStyles(props);
|
|
2264
|
-
return (React__default['default'].createElement(MuiToggleButton__default['default'], __assign({ ref: ref, classes: {
|
|
2265
|
-
root: classes.root,
|
|
2266
|
-
selected: classes.selected,
|
|
2267
|
-
} }, muiProps), children));
|
|
2268
|
-
});
|
|
2269
|
-
ToggleButton.defaultProps = {
|
|
2270
|
-
color: 'primary',
|
|
2271
|
-
};
|
|
2272
|
-
ToggleButton.displayName = 'ToggleButton';
|
|
2273
|
-
|
|
2274
|
-
var useToggleButtonGroupStyles = styles.makeStyles(function (theme) { return ({
|
|
2275
|
-
root: {
|
|
2276
|
-
'&&': {
|
|
2277
|
-
backgroundColor: theme.palette.grey[300],
|
|
2278
|
-
},
|
|
2279
|
-
},
|
|
2280
|
-
}); });
|
|
2281
|
-
|
|
2282
|
-
var ToggleButtonGroup = React.forwardRef(function (props, ref) {
|
|
2283
|
-
var children = props.children, _a = props.color, color = _a === void 0 ? 'primary' : _a, muiProps = __rest(props, ["children", "color"]);
|
|
2284
|
-
var classes = useToggleButtonGroupStyles(props);
|
|
2285
|
-
var childrenWithProps = React__default['default'].Children.map(children, function (child) {
|
|
2286
|
-
if (!React__default['default'].isValidElement(child)) {
|
|
2287
|
-
return null;
|
|
2288
|
-
}
|
|
2289
|
-
return React__default['default'].cloneElement(child, { color: color });
|
|
2290
|
-
});
|
|
2291
|
-
return (React__default['default'].createElement(MuiToggleButtonGroup__default['default'], __assign({ ref: ref, classes: { root: classes.root } }, muiProps), childrenWithProps));
|
|
2292
|
-
});
|
|
2293
|
-
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
2294
|
-
|
|
2295
|
-
var useTooltipStyles = styles.makeStyles(function (_a) {
|
|
2296
|
-
var typography = _a.typography;
|
|
2297
|
-
return ({
|
|
2298
|
-
tooltip: {
|
|
2299
|
-
fontSize: typography.pxToRem(16),
|
|
2300
|
-
},
|
|
2301
|
-
});
|
|
2302
|
-
});
|
|
2303
|
-
|
|
2304
|
-
var Tooltip = React.forwardRef(function (props, ref) {
|
|
2305
|
-
var classes = useTooltipStyles(props);
|
|
2306
|
-
return React__default['default'].createElement(MuiTooltip__default['default'], __assign({ ref: ref, classes: classes }, props));
|
|
2307
|
-
});
|
|
2308
|
-
Tooltip.displayName = 'Tooltip';
|
|
2309
|
-
|
|
2310
|
-
core.makeStyles(function () { return ({
|
|
2311
|
-
root: {
|
|
2312
|
-
height: 56,
|
|
2313
|
-
},
|
|
2314
|
-
}); });
|
|
2315
|
-
core.makeStyles(function (theme) { return ({
|
|
2316
|
-
root: {
|
|
2317
|
-
height: '100%',
|
|
2318
|
-
width: 'min-content',
|
|
2319
|
-
borderRadius: theme.spacing(1),
|
|
2320
|
-
},
|
|
2321
|
-
input: {
|
|
2322
|
-
'&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
2323
|
-
display: 'none',
|
|
2324
|
-
},
|
|
2325
|
-
'-moz-appearance': 'textfield',
|
|
2326
|
-
minWidth: 40,
|
|
2327
|
-
padding: 0,
|
|
2328
|
-
textAlign: 'center',
|
|
2329
|
-
},
|
|
2330
|
-
adornedStart: {
|
|
2331
|
-
padding: 0,
|
|
2332
|
-
},
|
|
2333
|
-
adornedEnd: {
|
|
2334
|
-
padding: 0,
|
|
2335
|
-
},
|
|
2336
|
-
}); });
|
|
2337
|
-
|
|
2338
|
-
core.makeStyles(function () { return ({
|
|
2339
|
-
root: {
|
|
2340
|
-
display: 'flex',
|
|
2341
|
-
flexDirection: 'column',
|
|
2342
|
-
alignItems: 'center',
|
|
2343
|
-
gridGap: 16,
|
|
2344
|
-
},
|
|
2345
|
-
}); });
|
|
2346
|
-
|
|
2347
|
-
var FollowerAuthenticationDialogContext = React.createContext(null);
|
|
2348
|
-
FollowerAuthenticationDialogContext.Provider;
|
|
2349
|
-
|
|
2350
|
-
core.makeStyles(function () { return ({
|
|
2351
|
-
form: {
|
|
2352
|
-
display: 'flex',
|
|
2353
|
-
flexDirection: 'column',
|
|
2354
|
-
alignItems: 'center',
|
|
2355
|
-
width: '100%',
|
|
2356
|
-
gridGap: 16,
|
|
2357
|
-
},
|
|
2358
|
-
}); });
|
|
2359
|
-
|
|
2360
|
-
core.makeStyles(function () { return ({
|
|
2361
|
-
main: {
|
|
2362
|
-
width: '100%',
|
|
2363
|
-
display: 'flex',
|
|
2364
|
-
flexDirection: 'column',
|
|
2365
|
-
gridGap: 16,
|
|
2366
|
-
},
|
|
2367
|
-
}); });
|
|
2368
|
-
|
|
2369
|
-
core.makeStyles(function () { return ({
|
|
2370
|
-
root: {
|
|
2371
|
-
position: 'absolute',
|
|
2372
|
-
top: 0,
|
|
2373
|
-
right: 0,
|
|
2374
|
-
},
|
|
2375
|
-
}); });
|
|
2376
|
-
|
|
2377
|
-
var _g$2C;
|
|
2378
|
-
|
|
2379
|
-
function _extends$4K() { _extends$4K = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4K.apply(this, arguments); }
|
|
2380
|
-
|
|
2381
|
-
function SvgCheckCircle(props) {
|
|
2382
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4K({
|
|
2383
|
-
viewBox: "0 0 16 16",
|
|
2384
|
-
fill: "none",
|
|
2385
|
-
strokeLinecap: "round",
|
|
2386
|
-
strokeLinejoin: "round",
|
|
2387
|
-
width: "1em",
|
|
2388
|
-
height: "1em"
|
|
2389
|
-
}, props), _g$2C || (_g$2C = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2390
|
-
stroke: "currentColor"
|
|
2391
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2392
|
-
d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
|
|
2393
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
2394
|
-
d: "M14.667 2.667L8 9.34l-2-2"
|
|
2395
|
-
}))));
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
|
-
var _path$26;
|
|
2399
|
-
|
|
2400
|
-
function _extends$4H() { _extends$4H = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4H.apply(this, arguments); }
|
|
2401
|
-
|
|
2402
|
-
function SvgX(props) {
|
|
2403
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4H({
|
|
2404
|
-
viewBox: "0 0 16 16",
|
|
2405
|
-
fill: "none",
|
|
2406
|
-
strokeLinecap: "round",
|
|
2407
|
-
strokeLinejoin: "round",
|
|
2408
|
-
width: "1em",
|
|
2409
|
-
height: "1em"
|
|
2410
|
-
}, props), _path$26 || (_path$26 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2411
|
-
d: "M12 4l-8 8m0-8l8 8",
|
|
2412
|
-
stroke: "currentColor"
|
|
2413
|
-
})));
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
var _g$2p, _defs$1u;
|
|
2417
|
-
|
|
2418
|
-
function _extends$4p() { _extends$4p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4p.apply(this, arguments); }
|
|
2419
|
-
|
|
2420
|
-
function SvgHelp(props) {
|
|
2421
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4p({
|
|
2422
|
-
viewBox: "0 0 16 16",
|
|
2423
|
-
fill: "none",
|
|
2424
|
-
strokeLinecap: "round",
|
|
2425
|
-
strokeLinejoin: "round",
|
|
2426
|
-
width: "1em",
|
|
2427
|
-
height: "1em"
|
|
2428
|
-
}, props), _g$2p || (_g$2p = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2429
|
-
clipPath: "url(#help_svg__clip0_8_5446)",
|
|
2430
|
-
stroke: "currentColor"
|
|
2431
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2432
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
|
|
2433
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
2434
|
-
d: "M6.06 6a2 2 0 013.887.667c0 1.333-2 2-2 2M8 11.334h.007"
|
|
2435
|
-
}))), _defs$1u || (_defs$1u = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
2436
|
-
id: "help_svg__clip0_8_5446"
|
|
2437
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2438
|
-
fill: "currentColor",
|
|
2439
|
-
d: "M0 0h16v16H0z"
|
|
2440
|
-
})))));
|
|
319
|
+
function getSelectedColumnFilters(state) {
|
|
320
|
+
var columnFilters = state.columnFilters;
|
|
321
|
+
var selectedColumnFilters = columnFilters.reduce(function (acc, columnFilter) {
|
|
322
|
+
var id = columnFilter.id, value = columnFilter.value;
|
|
323
|
+
var selections = [];
|
|
324
|
+
if (value) {
|
|
325
|
+
if (Array.isArray(value)) {
|
|
326
|
+
value.forEach(function (innerValue) {
|
|
327
|
+
selections.push({ id: id, value: innerValue });
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
else if (typeof value === 'string' || typeof value === 'number') {
|
|
331
|
+
selections.push({ id: id, value: value });
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return tslib.__spreadArray(tslib.__spreadArray([], acc), selections);
|
|
335
|
+
}, []);
|
|
336
|
+
return selectedColumnFilters;
|
|
2441
337
|
}
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
strokeLinecap: "round",
|
|
2452
|
-
strokeLinejoin: "round",
|
|
2453
|
-
width: "1em",
|
|
2454
|
-
height: "1em"
|
|
2455
|
-
}, props), _g$2m || (_g$2m = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2456
|
-
clipPath: "url(#info_svg__clip0_8_5377)",
|
|
2457
|
-
stroke: "currentColor"
|
|
2458
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2459
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007"
|
|
2460
|
-
}))), _defs$1t || (_defs$1t = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
2461
|
-
id: "info_svg__clip0_8_5377"
|
|
2462
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2463
|
-
fill: "currentColor",
|
|
2464
|
-
d: "M0 0h16v16H0z"
|
|
2465
|
-
})))));
|
|
338
|
+
function getColumnFilters(columns) {
|
|
339
|
+
return columns
|
|
340
|
+
.map(function (column) {
|
|
341
|
+
var meta = column.columnDef.meta;
|
|
342
|
+
if (meta === null || meta === void 0 ? void 0 : meta.filter) {
|
|
343
|
+
return tslib.__assign({ columnId: column.id }, meta.filter);
|
|
344
|
+
}
|
|
345
|
+
})
|
|
346
|
+
.filter(Boolean);
|
|
2466
347
|
}
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
function
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
}, props), _g$20 || (_g$20 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2481
|
-
clipPath: "url(#error_svg__clip0_8_5411)",
|
|
2482
|
-
stroke: "currentColor"
|
|
2483
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2484
|
-
d: "M5.24 1.333h5.52l3.907 3.907v5.52l-3.907 3.907H5.24L1.333 10.76V5.24L5.24 1.333zm2.76 4V8m0 2.666h.008"
|
|
2485
|
-
}))), _defs$1f || (_defs$1f = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
2486
|
-
id: "error_svg__clip0_8_5411"
|
|
2487
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2488
|
-
fill: "currentColor",
|
|
2489
|
-
d: "M0 0h16v16H0z"
|
|
2490
|
-
})))));
|
|
348
|
+
function makeDeselectColumnFilter(table) {
|
|
349
|
+
return function (columnFilter) {
|
|
350
|
+
var column = table.getColumn(columnFilter.id);
|
|
351
|
+
column.setFilterValue(function (prev) {
|
|
352
|
+
if (Array.isArray(prev)) {
|
|
353
|
+
return prev.filter(function (value) { return value !== columnFilter.value; });
|
|
354
|
+
}
|
|
355
|
+
else if (typeof prev === 'string' || typeof prev === 'number') {
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
return prev;
|
|
359
|
+
});
|
|
360
|
+
};
|
|
2491
361
|
}
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
function
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
strokeLinecap: "round",
|
|
2502
|
-
strokeLinejoin: "round",
|
|
2503
|
-
width: "1em",
|
|
2504
|
-
height: "1em"
|
|
2505
|
-
}, props), _path$1u || (_path$1u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2506
|
-
d: "M6.86 2.573L1.213 12a1.334 1.334 0 001.14 2h11.294a1.332 1.332 0 001.14-2L9.14 2.573a1.333 1.333 0 00-2.28 0v0zM8 6v2.667m0 2.667h.007",
|
|
2507
|
-
stroke: "currentColor"
|
|
2508
|
-
})));
|
|
362
|
+
function makeFormatSelectedFilterText(table) {
|
|
363
|
+
return function (columnFilter) {
|
|
364
|
+
var column = table.getColumn(columnFilter.id);
|
|
365
|
+
var meta = column.columnDef.meta;
|
|
366
|
+
var name = (meta === null || meta === void 0 ? void 0 : meta.filter.name) || '';
|
|
367
|
+
var optionMatch = meta === null || meta === void 0 ? void 0 : meta.filter.options.find(function (option) { return option.value === columnFilter.value; });
|
|
368
|
+
var label = optionMatch === null || optionMatch === void 0 ? void 0 : optionMatch.label;
|
|
369
|
+
return [name, label];
|
|
370
|
+
};
|
|
2509
371
|
}
|
|
2510
372
|
|
|
2511
|
-
var
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
var borderWidth = 1;
|
|
2562
|
-
var getColor = function (palette, props) {
|
|
2563
|
-
var variant = props.variant;
|
|
2564
|
-
var color = 'inherit';
|
|
2565
|
-
if (['primary', 'info', 'success', 'warning', 'error'].includes(variant)) {
|
|
2566
|
-
// @ts-expect-error - todo.
|
|
2567
|
-
color = palette[variant].contrastText;
|
|
2568
|
-
}
|
|
2569
|
-
if (variant === 'secondary') {
|
|
2570
|
-
color = palette[variant].main;
|
|
2571
|
-
/**
|
|
2572
|
-
* Temporary fix for dark theme buttons.
|
|
2573
|
-
* Dark theme will be addressed in ch-11596 and the following if block should be removed
|
|
2574
|
-
*/
|
|
2575
|
-
if (palette.type === 'dark') {
|
|
2576
|
-
color = 'black';
|
|
2577
|
-
}
|
|
2578
|
-
}
|
|
2579
|
-
if (variant === 'tertiary') {
|
|
2580
|
-
color = palette.secondary.contrastText;
|
|
2581
|
-
}
|
|
2582
|
-
if (variant === 'text') {
|
|
2583
|
-
color = palette.info.main;
|
|
2584
|
-
}
|
|
2585
|
-
return color;
|
|
2586
|
-
};
|
|
2587
|
-
var getColorHover = function (palette, props) {
|
|
2588
|
-
var color;
|
|
2589
|
-
if (props.variant === 'secondary') {
|
|
2590
|
-
color = palette.secondary.contrastText;
|
|
2591
|
-
}
|
|
2592
|
-
return color;
|
|
2593
|
-
};
|
|
2594
|
-
var getBackground = function (palette, props) {
|
|
2595
|
-
var backgroundColor = 'inherit';
|
|
2596
|
-
if (['info', 'success', 'warning', 'error'].includes(props.variant)) {
|
|
2597
|
-
// @ts-expect-error - todo.
|
|
2598
|
-
backgroundColor = palette[props.variant].main;
|
|
2599
|
-
}
|
|
2600
|
-
if (props.variant === 'primary') {
|
|
2601
|
-
// @ts-expect-error gradient colors are included in the extended palette.
|
|
2602
|
-
backgroundColor = "linear-gradient(97.36deg, " + palette.primary.gradientStart + " 17.03%, " + palette.primary.gradientEnd + " 72.96%)";
|
|
2603
|
-
}
|
|
2604
|
-
if (props.variant === 'secondary') {
|
|
2605
|
-
backgroundColor = 'white';
|
|
2606
|
-
}
|
|
2607
|
-
if (props.variant === 'tertiary') {
|
|
2608
|
-
backgroundColor = palette.secondary.main;
|
|
2609
|
-
}
|
|
2610
|
-
return backgroundColor;
|
|
2611
|
-
};
|
|
2612
|
-
var getBackgroundHover = function (palette, props) {
|
|
2613
|
-
var backgroundHoverColor = 'inherit';
|
|
2614
|
-
if (['primary', 'info', 'success', 'warning', 'error'].includes(props.variant)) {
|
|
2615
|
-
// @ts-expect-error - todo.
|
|
2616
|
-
backgroundHoverColor = palette[props.variant].dark;
|
|
2617
|
-
}
|
|
2618
|
-
if (props.variant === 'secondary') {
|
|
2619
|
-
backgroundHoverColor = palette.secondary.main;
|
|
2620
|
-
}
|
|
2621
|
-
if (props.variant === 'tertiary') {
|
|
2622
|
-
backgroundHoverColor = palette.secondary.light;
|
|
2623
|
-
}
|
|
2624
|
-
if (props.variant === 'text' || props.variant === 'ghost') {
|
|
2625
|
-
backgroundHoverColor = palette.action.hover;
|
|
2626
|
-
}
|
|
2627
|
-
return backgroundHoverColor;
|
|
2628
|
-
};
|
|
2629
|
-
var buttonTypography = {
|
|
2630
|
-
fontWeight: 500,
|
|
2631
|
-
fontSize: '0.875rem',
|
|
2632
|
-
lineHeight: '1.25rem',
|
|
2633
|
-
};
|
|
2634
|
-
var useButtonStyles = core.makeStyles(function (_a) {
|
|
2635
|
-
var palette = _a.palette, spacing = _a.spacing;
|
|
2636
|
-
return ({
|
|
2637
|
-
root: function (props) { return ({
|
|
2638
|
-
minWidth: 'unset',
|
|
2639
|
-
color: getColor(palette, props),
|
|
2640
|
-
background: getBackground(palette, props),
|
|
2641
|
-
backgroundColor: props.variant === 'primary' ? palette.primary.dark : getBackground(palette, props),
|
|
2642
|
-
borderRadius: spacing(6),
|
|
2643
|
-
transition: 'all 200ms ease-in-out',
|
|
2644
|
-
'&:hover': {
|
|
2645
|
-
color: getColorHover(palette, props),
|
|
2646
|
-
background: getBackgroundHover(palette, props),
|
|
2647
|
-
},
|
|
2648
|
-
}); },
|
|
2649
|
-
disabled: {
|
|
2650
|
-
'&$root': {
|
|
2651
|
-
background: palette.action.disabled,
|
|
2652
|
-
},
|
|
2653
|
-
},
|
|
2654
|
-
contained: {
|
|
2655
|
-
padding: spacing(1, 2),
|
|
2656
|
-
},
|
|
2657
|
-
outlined: {
|
|
2658
|
-
padding: "calc(" + spacing(1) + "px - " + borderWidth + "px) calc(" + spacing(2) + "px - " + borderWidth + "px)",
|
|
2659
|
-
'&$sizeSmall': {
|
|
2660
|
-
padding: "calc(" + spacing(0.5) + "px - " + borderWidth + "px) calc(" + spacing(2) + "px - " + borderWidth + "px)",
|
|
2661
|
-
},
|
|
2662
|
-
'&$sizeLarge': {
|
|
2663
|
-
padding: "calc(" + spacing(1.5) + "px - " + borderWidth + "px) calc(" + spacing(2) + "px - " + borderWidth + "px)",
|
|
2664
|
-
},
|
|
2665
|
-
},
|
|
2666
|
-
text: {
|
|
2667
|
-
padding: spacing(1, 2),
|
|
2668
|
-
},
|
|
2669
|
-
label: __assign$1(__assign$1({}, buttonTypography), { textTransform: function (props) { return props.textTransform; } }),
|
|
2670
|
-
sizeSmall: {
|
|
2671
|
-
padding: spacing(0.5, 2),
|
|
2672
|
-
},
|
|
2673
|
-
sizeLarge: {
|
|
2674
|
-
padding: spacing(1.5, 2),
|
|
2675
|
-
},
|
|
2676
|
-
});
|
|
2677
|
-
});
|
|
2678
|
-
|
|
2679
|
-
var deriveButtonProps = function (buttonProps) {
|
|
2680
|
-
var variant = buttonProps.variant;
|
|
2681
|
-
var derived = {};
|
|
2682
|
-
switch (variant) {
|
|
2683
|
-
case 'primary':
|
|
2684
|
-
derived.variant = 'contained';
|
|
2685
|
-
derived.color = 'primary';
|
|
2686
|
-
break;
|
|
2687
|
-
case 'secondary':
|
|
2688
|
-
derived.variant = 'outlined';
|
|
2689
|
-
derived.color = 'secondary';
|
|
2690
|
-
break;
|
|
2691
|
-
case 'tertiary':
|
|
2692
|
-
derived.variant = 'contained';
|
|
2693
|
-
derived.color = 'secondary';
|
|
2694
|
-
break;
|
|
2695
|
-
case 'text':
|
|
2696
|
-
derived.variant = 'text';
|
|
2697
|
-
case 'ghost':
|
|
2698
|
-
derived.variant = 'text';
|
|
2699
|
-
break;
|
|
2700
|
-
case 'success':
|
|
2701
|
-
derived.variant = 'contained';
|
|
2702
|
-
break;
|
|
2703
|
-
case 'info':
|
|
2704
|
-
derived.variant = 'contained';
|
|
2705
|
-
break;
|
|
2706
|
-
case 'warning':
|
|
2707
|
-
derived.variant = 'contained';
|
|
2708
|
-
break;
|
|
2709
|
-
case 'error':
|
|
2710
|
-
derived.variant = 'contained';
|
|
2711
|
-
break;
|
|
2712
|
-
default:
|
|
2713
|
-
derived.variant = variant;
|
|
2714
|
-
break;
|
|
2715
|
-
}
|
|
2716
|
-
return derived;
|
|
2717
|
-
};
|
|
2718
|
-
|
|
2719
|
-
// eslint-disable-next-line react/display-name -- false positive
|
|
2720
|
-
var Button = React.forwardRef(function (props, ref) {
|
|
2721
|
-
var children = props.children; props.variant; var classesOverride = props.classes, commonProps = __rest$1(props, ["children", "variant", "classes"]);
|
|
2722
|
-
var classes = useButtonStyles(props);
|
|
2723
|
-
var derivedProps = deriveButtonProps(props);
|
|
2724
|
-
var mergedProps = __assign$1(__assign$1({}, derivedProps), commonProps);
|
|
2725
|
-
return (React__default['default'].createElement(Button$1, __assign$1({ ref: ref, classes: __assign$1(__assign$1({}, classes), classesOverride), disableElevation: true }, mergedProps), children));
|
|
2726
|
-
});
|
|
2727
|
-
Button.defaultProps = {
|
|
2728
|
-
textTransform: 'uppercase',
|
|
2729
|
-
variant: 'primary',
|
|
2730
|
-
};
|
|
2731
|
-
Button.displayName = 'Button';
|
|
2732
|
-
|
|
2733
|
-
var useAlertDialogStyles = styles.makeStyles(function (theme) { return ({
|
|
2734
|
-
cancelButton: {
|
|
2735
|
-
color: theme.palette.grey[700],
|
|
2736
|
-
},
|
|
2737
|
-
cancelIcon: {
|
|
2738
|
-
position: 'absolute',
|
|
2739
|
-
right: theme.spacing(1),
|
|
2740
|
-
top: theme.spacing(2),
|
|
2741
|
-
},
|
|
2742
|
-
card: {
|
|
2743
|
-
borderRadius: theme.spacing(0.75),
|
|
2744
|
-
borderTop: function (props) { return theme.spacing(1.25) + "px solid " + theme.palette[props.severity || 'info'].main; },
|
|
2745
|
-
},
|
|
2746
|
-
cardActions: {
|
|
2747
|
-
background: theme.palette.grey[100],
|
|
2748
|
-
justifyContent: 'flex-end',
|
|
2749
|
-
},
|
|
2750
|
-
icon: {
|
|
2751
|
-
fontSize: theme.spacing(5),
|
|
2752
|
-
},
|
|
2753
|
-
root: {
|
|
2754
|
-
borderRadius: theme.spacing(0.75),
|
|
2755
|
-
},
|
|
2756
|
-
}); });
|
|
2757
|
-
|
|
2758
|
-
var severityIcons = {
|
|
2759
|
-
info: SvgInfo,
|
|
2760
|
-
error: SvgError,
|
|
2761
|
-
warning: SvgWarning,
|
|
2762
|
-
success: SvgCheckCircle,
|
|
2763
|
-
};
|
|
2764
|
-
var AlertDialog = React.forwardRef(function (props, ref) {
|
|
2765
|
-
var _a = props.cancelButtonText, cancelButtonText = _a === void 0 ? 'cancel' : _a, _b = props.hideCancelButton, hideCancelButton = _b === void 0 ? false : _b, children = props.children, labelId = props.labelId, descriptionId = props.descriptionId, _c = props.severity, severity = _c === void 0 ? 'info' : _c, _d = props.proceedButtonText, proceedButtonText = _d === void 0 ? 'proceed' : _d, _e = props.disabled, disabled = _e === void 0 ? false : _e, onClose = props.onClose, onCancel = props.onCancel, onProceed = props.onProceed, DialogProps = __rest$1(props, ["cancelButtonText", "hideCancelButton", "children", "labelId", "descriptionId", "severity", "proceedButtonText", "disabled", "onClose", "onCancel", "onProceed"]);
|
|
2766
|
-
var classes = useAlertDialogStyles(props);
|
|
2767
|
-
return (React__default['default'].createElement(Dialog__default['default'], __assign$1({ ref: ref, classes: { paper: classes.root }, maxWidth: "sm", fullWidth: true }, DialogProps),
|
|
2768
|
-
React__default['default'].createElement(Card__default['default'], { classes: { root: classes.card }, role: "alertdialog", "aria-modal": "true", "aria-labelledby": labelId, "aria-describedby": descriptionId },
|
|
2769
|
-
React__default['default'].createElement(IconButton, { className: classes.cancelIcon, onClick: onClose, disabled: disabled },
|
|
2770
|
-
React__default['default'].createElement(Icon, { icon: SvgX })),
|
|
2771
|
-
React__default['default'].createElement(CardContent__default['default'], null,
|
|
2772
|
-
React__default['default'].createElement(core.Box, { display: "flex" },
|
|
2773
|
-
React__default['default'].createElement(Icon, { className: classes.icon, color: severity, icon: severityIcons[severity] }),
|
|
2774
|
-
React__default['default'].createElement(core.Box, { pl: 2, pr: 3 }, children))),
|
|
2775
|
-
React__default['default'].createElement(CardActions__default['default'], { classes: { root: classes.cardActions } },
|
|
2776
|
-
!hideCancelButton && (React__default['default'].createElement(Button, { onClick: onCancel, disabled: disabled, variant: "ghost" }, cancelButtonText)),
|
|
2777
|
-
React__default['default'].createElement(Button, { onClick: onProceed, loading: disabled, variant: severity }, proceedButtonText)))));
|
|
2778
|
-
});
|
|
2779
|
-
AlertDialog.displayName = 'AlertDialog';
|
|
2780
|
-
|
|
2781
|
-
var getBorderColor = function (palette, variant) {
|
|
2782
|
-
var borderColor = 'inherit';
|
|
2783
|
-
if (['primary', 'secondary', 'info', 'success', 'warning', 'error'].includes(variant)) {
|
|
2784
|
-
// @ts-expect-error - todo.
|
|
2785
|
-
borderColor = palette[variant].light;
|
|
2786
|
-
}
|
|
2787
|
-
return borderColor;
|
|
2788
|
-
};
|
|
2789
|
-
var useButtonGroupStyles = styles.makeStyles(function (theme) { return ({
|
|
2790
|
-
root: {
|
|
2791
|
-
boxShadow: 'none',
|
|
2792
|
-
},
|
|
2793
|
-
groupedContained: {
|
|
2794
|
-
'&&': {
|
|
2795
|
-
borderColor: function (props) { return getBorderColor(theme.palette, props.variant); },
|
|
2796
|
-
},
|
|
2797
|
-
},
|
|
2798
|
-
groupedText: {
|
|
2799
|
-
'&&': {
|
|
2800
|
-
borderColor: theme.palette.info.main,
|
|
2801
|
-
},
|
|
2802
|
-
},
|
|
2803
|
-
}); });
|
|
2804
|
-
|
|
2805
|
-
var ButtonGroup = React.forwardRef(function (props, ref) {
|
|
2806
|
-
var children = props.children, _a = props.variant, variant = _a === void 0 ? 'primary' : _a, muiProps = __rest$1(props, ["children", "variant"]);
|
|
2807
|
-
var classes = useButtonGroupStyles(props);
|
|
2808
|
-
var derivedProps = deriveButtonProps({ variant: variant });
|
|
2809
|
-
var spacing = styles.useTheme().spacing;
|
|
2810
|
-
var childrenWithProps = React__default['default'].Children.map(children, function (child, i) {
|
|
2811
|
-
var isFirst = i === 0 && props.orientation === 'vertical';
|
|
2812
|
-
var isLast = i === React__default['default'].Children.toArray(children).length - 1 && props.orientation === 'vertical';
|
|
2813
|
-
var firstStyles = { style: { borderTopLeftRadius: spacing(2), borderTopRightRadius: spacing(2) } };
|
|
2814
|
-
var lastStyles = { style: { borderBottomLeftRadius: spacing(2), borderBottomRightRadius: spacing(2) } };
|
|
2815
|
-
if (!React__default['default'].isValidElement(child)) {
|
|
2816
|
-
return null;
|
|
2817
|
-
}
|
|
2818
|
-
return React__default['default'].cloneElement(child, __assign$1(__assign$1({ variant: variant }, (isFirst && firstStyles)), (isLast && lastStyles)));
|
|
2819
|
-
});
|
|
2820
|
-
return (React__default['default'].createElement(CommonButtonGroup__default['default'], __assign$1({ ref: ref, classes: classes }, derivedProps, muiProps), childrenWithProps));
|
|
2821
|
-
});
|
|
2822
|
-
ButtonGroup.displayName = 'ButtonGroup';
|
|
2823
|
-
|
|
2824
|
-
styles.makeStyles(function (_a) {
|
|
2825
|
-
var spacing = _a.spacing;
|
|
2826
|
-
return ({
|
|
2827
|
-
root: {
|
|
2828
|
-
gap: spacing(3),
|
|
2829
|
-
},
|
|
2830
|
-
actions: {
|
|
2831
|
-
gap: spacing(3),
|
|
2832
|
-
},
|
|
2833
|
-
image: {
|
|
2834
|
-
width: '100%',
|
|
2835
|
-
objectFit: 'contain',
|
|
2836
|
-
},
|
|
2837
|
-
});
|
|
2838
|
-
});
|
|
2839
|
-
|
|
2840
|
-
styles.makeStyles(function (theme) { return ({
|
|
2841
|
-
root: {
|
|
2842
|
-
position: 'sticky',
|
|
2843
|
-
background: 'white',
|
|
2844
|
-
bottom: 0,
|
|
2845
|
-
display: 'flex',
|
|
2846
|
-
justifyContent: 'space-between',
|
|
2847
|
-
padding: theme.spacing(1.5) + "px " + theme.spacing(3) + "px",
|
|
2848
|
-
borderTop: theme.spacing(0.5) + "px solid " + theme.palette.grey[100],
|
|
2849
|
-
zIndex: 3,
|
|
2850
|
-
},
|
|
2851
|
-
inlineEndActions: {
|
|
2852
|
-
'& > *': {
|
|
2853
|
-
marginInlineStart: theme.spacing(2),
|
|
2854
|
-
},
|
|
2855
|
-
},
|
|
2856
|
-
inlineStartActions: {
|
|
2857
|
-
display: 'flex',
|
|
2858
|
-
alignItems: 'center',
|
|
2859
|
-
'& > *': {
|
|
2860
|
-
marginInlineEnd: theme.spacing(2),
|
|
2861
|
-
},
|
|
2862
|
-
},
|
|
2863
|
-
}); });
|
|
2864
|
-
|
|
2865
|
-
styles.makeStyles({
|
|
2866
|
-
root: {
|
|
2867
|
-
fontStyle: 'italic',
|
|
2868
|
-
},
|
|
2869
|
-
});
|
|
2870
|
-
|
|
2871
|
-
var getBorderRadius = function (theme, props) {
|
|
2872
|
-
var stepCursor = props.stepCursor, stepCount = props.stepCount;
|
|
2873
|
-
var isFinalStep = stepCursor / stepCount === 1;
|
|
2874
|
-
if (isFinalStep) {
|
|
2875
|
-
return 0;
|
|
2876
|
-
}
|
|
2877
|
-
else {
|
|
2878
|
-
return theme.spacing(0.5);
|
|
2879
|
-
}
|
|
2880
|
-
};
|
|
2881
|
-
styles.makeStyles(function (theme) { return ({
|
|
2882
|
-
progress: {
|
|
2883
|
-
width: function (props) { return (props.stepCursor / props.stepCount) * 100 + "%"; },
|
|
2884
|
-
transition: 'all 500ms',
|
|
2885
|
-
height: theme.spacing(1),
|
|
2886
|
-
// @ts-expect-error: Theme includes extended properties
|
|
2887
|
-
background: "linear-gradient(45deg, " + theme.palette.primary.gradientStart + ", " + theme.palette.primary.gradientEnd + ")",
|
|
2888
|
-
borderEndEndRadius: function (props) { return getBorderRadius(theme, props); },
|
|
2889
|
-
borderStartEndRadius: function (props) { return getBorderRadius(theme, props); },
|
|
2890
|
-
},
|
|
2891
|
-
track: {
|
|
2892
|
-
position: 'absolute',
|
|
2893
|
-
bottom: 0,
|
|
2894
|
-
display: 'flex',
|
|
2895
|
-
alignItems: 'center',
|
|
2896
|
-
width: '100%',
|
|
2897
|
-
height: theme.spacing(0.5),
|
|
2898
|
-
background: theme.palette.grey[100],
|
|
2899
|
-
zIndex: 2,
|
|
2900
|
-
},
|
|
2901
|
-
}); });
|
|
2902
|
-
|
|
2903
|
-
styles.makeStyles(function (_a) {
|
|
2904
|
-
var spacing = _a.spacing;
|
|
2905
|
-
return ({
|
|
2906
|
-
closeButton: {
|
|
2907
|
-
position: 'absolute',
|
|
2908
|
-
right: 0,
|
|
2909
|
-
top: 0,
|
|
2910
|
-
},
|
|
2911
|
-
root: {
|
|
2912
|
-
alignItems: 'center',
|
|
2913
|
-
background: 'white',
|
|
2914
|
-
display: 'flex',
|
|
2915
|
-
flexDirection: 'column',
|
|
2916
|
-
justifyContent: 'center',
|
|
2917
|
-
padding: spacing(1.5, 0),
|
|
2918
|
-
position: 'sticky',
|
|
2919
|
-
top: 0,
|
|
2920
|
-
zIndex: 3,
|
|
2921
|
-
},
|
|
2922
|
-
});
|
|
2923
|
-
});
|
|
2924
|
-
|
|
2925
|
-
React.createContext({});
|
|
2926
|
-
|
|
2927
|
-
styles.makeStyles(function (theme) {
|
|
2928
|
-
var _a = theme.palette, info = _a.info, grey = _a.grey, getContrastText = _a.getContrastText, spacing = theme.spacing;
|
|
2929
|
-
var selectedBackgroundColor = styles.lighten(theme.palette.info.light, 0.9);
|
|
2930
|
-
var backgroundColor = theme.palette.surface.light;
|
|
2931
|
-
return {
|
|
2932
|
-
root: {
|
|
2933
|
-
position: 'relative',
|
|
2934
|
-
border: function (_a) {
|
|
2935
|
-
var selected = _a.selected;
|
|
2936
|
-
return (selected ? "1px solid " + info.light : "1px solid " + grey[700]);
|
|
2937
|
-
},
|
|
2938
|
-
backgroundColor: function (_a) {
|
|
2939
|
-
var selected = _a.selected;
|
|
2940
|
-
return (selected ? selectedBackgroundColor : backgroundColor);
|
|
2941
|
-
},
|
|
2942
|
-
color: function (_a) {
|
|
2943
|
-
var selected = _a.selected;
|
|
2944
|
-
return (selected ? getContrastText(selectedBackgroundColor) : getContrastText(backgroundColor));
|
|
2945
|
-
},
|
|
2946
|
-
transition: 'none',
|
|
2947
|
-
},
|
|
2948
|
-
cardContent: {
|
|
2949
|
-
display: 'flex',
|
|
2950
|
-
flexDirection: 'column',
|
|
2951
|
-
alignItems: 'center',
|
|
2952
|
-
justifyContent: 'center',
|
|
2953
|
-
marginTop: spacing(2.5),
|
|
2954
|
-
},
|
|
2955
|
-
icon: {
|
|
2956
|
-
position: 'absolute',
|
|
2957
|
-
top: spacing(2),
|
|
2958
|
-
left: spacing(2),
|
|
2959
|
-
color: function (_a) {
|
|
2960
|
-
var selected = _a.selected;
|
|
2961
|
-
return (selected ? info.main : grey[700]);
|
|
2962
|
-
},
|
|
2963
|
-
},
|
|
2964
|
-
focusHighlight: {
|
|
2965
|
-
backgroundColor: 'inherit',
|
|
2966
|
-
},
|
|
2967
|
-
};
|
|
2968
|
-
});
|
|
2969
|
-
|
|
2970
|
-
styles.makeStyles(function (theme) { return ({
|
|
2971
|
-
root: {
|
|
2972
|
-
boxSizing: 'border-box',
|
|
2973
|
-
padding: theme.spacing(0, 1.5),
|
|
2974
|
-
/** TODO: design to define responsive width value. */
|
|
2975
|
-
width: '350px',
|
|
2976
|
-
'& > div:first-child': {
|
|
2977
|
-
alignItems: 'center',
|
|
2978
|
-
},
|
|
2979
|
-
},
|
|
2980
|
-
}); });
|
|
2981
|
-
|
|
2982
|
-
core.makeStyles(function (_a) {
|
|
2983
|
-
var palette = _a.palette;
|
|
2984
|
-
return ({
|
|
2985
|
-
root: {
|
|
2986
|
-
background: palette.grey['100'],
|
|
2987
|
-
},
|
|
2988
|
-
});
|
|
2989
|
-
});
|
|
2990
|
-
|
|
2991
|
-
var usePageSectionStyles = core.makeStyles(function (_a) {
|
|
2992
|
-
var spacing = _a.spacing;
|
|
2993
|
-
return ({
|
|
2994
|
-
root: {
|
|
2995
|
-
background: function (_a) {
|
|
2996
|
-
var uncontained = _a.uncontained;
|
|
2997
|
-
return (uncontained ? 'transparent' : undefined);
|
|
2998
|
-
},
|
|
2999
|
-
},
|
|
3000
|
-
cardContent: {
|
|
3001
|
-
padding: spacing(4),
|
|
3002
|
-
},
|
|
3003
|
-
});
|
|
3004
|
-
});
|
|
3005
|
-
|
|
3006
|
-
var PageSection = React.forwardRef(function (props, ref) {
|
|
3007
|
-
var children = props.children; props.uncontained; var restProps = __rest$1(props, ["children", "uncontained"]);
|
|
3008
|
-
var classes = usePageSectionStyles(props);
|
|
3009
|
-
return (React__default['default'].createElement(Card__default['default'], __assign$1({ classes: { root: classes.root }, ref: ref }, restProps),
|
|
3010
|
-
React__default['default'].createElement(CardContent__default['default'], { classes: { root: classes.cardContent } }, children)));
|
|
3011
|
-
});
|
|
3012
|
-
PageSection.displayName = 'PageSection';
|
|
3013
|
-
|
|
3014
|
-
core.makeStyles(function () { return ({
|
|
3015
|
-
gutterBottom: {
|
|
3016
|
-
marginBottom: '1em',
|
|
3017
|
-
},
|
|
3018
|
-
}); });
|
|
3019
|
-
|
|
3020
|
-
var useSettingsIndexCardStyles = styles.makeStyles(function (theme) { return ({
|
|
3021
|
-
cardRoot: {
|
|
3022
|
-
border: "1px solid " + theme.palette.grey[300],
|
|
3023
|
-
alignSelf: 'stretch',
|
|
3024
|
-
flexGrow: 1,
|
|
3025
|
-
'&:hover': {
|
|
3026
|
-
backgroundColor: '#52B7FF1A',
|
|
3027
|
-
},
|
|
3028
|
-
},
|
|
3029
|
-
cardContentRoot: {
|
|
3030
|
-
padding: theme.spacing(4),
|
|
3031
|
-
'&:last-child': {
|
|
3032
|
-
paddingBottom: theme.spacing(4),
|
|
3033
|
-
},
|
|
3034
|
-
},
|
|
3035
|
-
}); });
|
|
3036
|
-
|
|
3037
|
-
// eslint-disable-next-line react/display-name -- false positive
|
|
3038
|
-
var SettingsIndexCard = React.forwardRef(function (props, ref) {
|
|
3039
|
-
var title = props.title, description = props.description, Icon$1 = props.Icon, onClick = props.onClick, statusLabel = props.statusLabel, restProps = __rest$1(props, ["title", "description", "Icon", "onClick", "statusLabel"]);
|
|
3040
|
-
var classes = useSettingsIndexCardStyles(props);
|
|
3041
|
-
var showStatusLabel = (statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.text) && (statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.color);
|
|
3042
|
-
return (React__default['default'].createElement(core.ButtonBase, __assign$1({ onClick: onClick, ref: ref }, restProps),
|
|
3043
|
-
React__default['default'].createElement(Card__default['default'], { classes: { root: classes.cardRoot } },
|
|
3044
|
-
React__default['default'].createElement(CardContent__default['default'], { classes: { root: classes.cardContentRoot } },
|
|
3045
|
-
React__default['default'].createElement(core.Box, { fontSize: "32px", display: "flex", justifyContent: 'space-between', alignItems: "center", paddingBottom: 2 },
|
|
3046
|
-
React__default['default'].createElement(Icon, { icon: Icon$1 || SvgHelp, size: "inherit" }),
|
|
3047
|
-
showStatusLabel && (React__default['default'].createElement(Typography, { weight: "semi-bold", variant: "body2", color: statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.color }, statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.text))),
|
|
3048
|
-
React__default['default'].createElement(Typography, { align: "left", variant: "h6", gutterBottom: true }, title),
|
|
3049
|
-
description && (React__default['default'].createElement(Typography, { align: "left", variant: "body2", color: "grey.700" }, description))))));
|
|
3050
|
-
});
|
|
3051
|
-
SettingsIndexCard.displayName = 'SettingsIndexCard';
|
|
3052
|
-
|
|
3053
|
-
var classnames = {exports: {}};
|
|
3054
|
-
|
|
3055
|
-
/*!
|
|
3056
|
-
Copyright (c) 2018 Jed Watson.
|
|
3057
|
-
Licensed under the MIT License (MIT), see
|
|
3058
|
-
http://jedwatson.github.io/classnames
|
|
3059
|
-
*/
|
|
3060
|
-
|
|
3061
|
-
(function (module) {
|
|
3062
|
-
/* global define */
|
|
3063
|
-
|
|
3064
|
-
(function () {
|
|
3065
|
-
|
|
3066
|
-
var hasOwn = {}.hasOwnProperty;
|
|
3067
|
-
|
|
3068
|
-
function classNames() {
|
|
3069
|
-
var classes = [];
|
|
3070
|
-
|
|
3071
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
3072
|
-
var arg = arguments[i];
|
|
3073
|
-
if (!arg) continue;
|
|
3074
|
-
|
|
3075
|
-
var argType = typeof arg;
|
|
3076
|
-
|
|
3077
|
-
if (argType === 'string' || argType === 'number') {
|
|
3078
|
-
classes.push(arg);
|
|
3079
|
-
} else if (Array.isArray(arg)) {
|
|
3080
|
-
if (arg.length) {
|
|
3081
|
-
var inner = classNames.apply(null, arg);
|
|
3082
|
-
if (inner) {
|
|
3083
|
-
classes.push(inner);
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
} else if (argType === 'object') {
|
|
3087
|
-
if (arg.toString === Object.prototype.toString) {
|
|
3088
|
-
for (var key in arg) {
|
|
3089
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
3090
|
-
classes.push(key);
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
} else {
|
|
3094
|
-
classes.push(arg.toString());
|
|
3095
|
-
}
|
|
3096
|
-
}
|
|
3097
|
-
}
|
|
3098
|
-
|
|
3099
|
-
return classes.join(' ');
|
|
3100
|
-
}
|
|
3101
|
-
|
|
3102
|
-
if (module.exports) {
|
|
3103
|
-
classNames.default = classNames;
|
|
3104
|
-
module.exports = classNames;
|
|
3105
|
-
} else {
|
|
3106
|
-
window.classNames = classNames;
|
|
3107
|
-
}
|
|
3108
|
-
}());
|
|
3109
|
-
}(classnames));
|
|
3110
|
-
|
|
3111
|
-
classnames.exports;
|
|
3112
|
-
|
|
3113
|
-
core.makeStyles(function (theme) { return ({
|
|
3114
|
-
root: {
|
|
3115
|
-
'&$uncontained > li > *:first-child': {
|
|
3116
|
-
background: theme.palette.background.paper,
|
|
3117
|
-
borderRadius: theme.spacing(1),
|
|
3118
|
-
},
|
|
3119
|
-
'& > li > *:first-child': {
|
|
3120
|
-
borderBottom: "1px solid " + theme.palette.grey[300],
|
|
3121
|
-
},
|
|
3122
|
-
'& > li:last-child > *:first-child': {
|
|
3123
|
-
borderBottom: 'none',
|
|
3124
|
-
},
|
|
3125
|
-
},
|
|
3126
|
-
uncontained: {
|
|
3127
|
-
display: 'flex',
|
|
3128
|
-
flexDirection: 'column',
|
|
3129
|
-
gap: 16,
|
|
3130
|
-
},
|
|
3131
|
-
}); });
|
|
3132
|
-
|
|
3133
|
-
core.makeStyles(function (theme) { return ({
|
|
3134
|
-
chipRoot: {
|
|
3135
|
-
marginRight: theme.spacing(4),
|
|
3136
|
-
cursor: 'pointer',
|
|
3137
|
-
},
|
|
3138
|
-
body: {
|
|
3139
|
-
paddingTop: '4px',
|
|
3140
|
-
},
|
|
3141
|
-
listItemText: {
|
|
3142
|
-
marginRight: '32px',
|
|
3143
|
-
},
|
|
3144
|
-
}); });
|
|
3145
|
-
|
|
3146
|
-
var fonts = ['"Poppins"', '"sans-serif"'];
|
|
3147
|
-
var adminThemeTypography = {
|
|
3148
|
-
htmlFontSize: 16,
|
|
3149
|
-
fontFamily: fonts.join(', '),
|
|
3150
|
-
h1: {
|
|
3151
|
-
fontWeight: 400,
|
|
3152
|
-
fontSize: '6rem',
|
|
3153
|
-
lineHeight: '9rem',
|
|
3154
|
-
},
|
|
3155
|
-
h2: {
|
|
3156
|
-
fontWeight: 400,
|
|
3157
|
-
fontSize: '3.75rem',
|
|
3158
|
-
lineHeight: '5.625rem',
|
|
3159
|
-
},
|
|
3160
|
-
h3: {
|
|
3161
|
-
fontWeight: 400,
|
|
3162
|
-
fontSize: '3rem',
|
|
3163
|
-
lineHeight: '4.5rem',
|
|
3164
|
-
},
|
|
3165
|
-
h4: {
|
|
3166
|
-
fontWeight: 400,
|
|
3167
|
-
fontSize: '2.125rem',
|
|
3168
|
-
lineHeight: '3.25rem',
|
|
3169
|
-
},
|
|
3170
|
-
h5: {
|
|
3171
|
-
fontWeight: 500,
|
|
3172
|
-
fontSize: '1.5rem',
|
|
3173
|
-
lineHeight: '2.25rem',
|
|
3174
|
-
},
|
|
3175
|
-
h6: {
|
|
3176
|
-
fontWeight: 500,
|
|
3177
|
-
fontSize: '1.25rem',
|
|
3178
|
-
lineHeight: '1.875rem',
|
|
3179
|
-
},
|
|
3180
|
-
h7: {
|
|
3181
|
-
fontWeight: 400,
|
|
3182
|
-
fontSize: '1.125rem',
|
|
3183
|
-
lineHeight: '1.75rem',
|
|
3184
|
-
},
|
|
3185
|
-
body1: {
|
|
3186
|
-
fontWeight: 400,
|
|
3187
|
-
fontSize: '1rem',
|
|
3188
|
-
lineHeight: '1.5rem',
|
|
3189
|
-
},
|
|
3190
|
-
body2: {
|
|
3191
|
-
fontWeight: 400,
|
|
3192
|
-
fontSize: '0.875rem',
|
|
3193
|
-
lineHeight: '1.25rem',
|
|
3194
|
-
},
|
|
3195
|
-
subtitle1: {
|
|
3196
|
-
fontWeight: 400,
|
|
3197
|
-
fontSize: '0.75rem',
|
|
3198
|
-
lineHeight: '1.125rem',
|
|
3199
|
-
color: '#9E9E9E',
|
|
3200
|
-
},
|
|
3201
|
-
button: {
|
|
3202
|
-
fontWeight: 500,
|
|
3203
|
-
fontSize: '0.875rem',
|
|
3204
|
-
lineHeight: '1.25rem',
|
|
3205
|
-
textTransform: 'capitalize',
|
|
3206
|
-
},
|
|
3207
|
-
};
|
|
3208
|
-
|
|
3209
|
-
var adminThemeBreakpoints = {
|
|
3210
|
-
values: {
|
|
3211
|
-
xs: 0,
|
|
3212
|
-
sm: 768,
|
|
3213
|
-
md: 992,
|
|
3214
|
-
lg: 1200,
|
|
3215
|
-
xl: 1900,
|
|
3216
|
-
},
|
|
3217
|
-
};
|
|
3218
|
-
|
|
3219
|
-
var basePalette = {
|
|
3220
|
-
/** Semantic Colors */
|
|
3221
|
-
primary: {
|
|
3222
|
-
light: '#DA777E',
|
|
3223
|
-
main: '#F04649',
|
|
3224
|
-
dark: '#B3212B',
|
|
3225
|
-
contrastText: '#FFFFFF',
|
|
3226
|
-
gradientStart: '#ED4A67',
|
|
3227
|
-
gradientEnd: '#F04649',
|
|
3228
|
-
},
|
|
3229
|
-
info: {
|
|
3230
|
-
light: '#52B7FF',
|
|
3231
|
-
main: '#0076CB',
|
|
3232
|
-
dark: '#164B54',
|
|
3233
|
-
},
|
|
3234
|
-
success: {
|
|
3235
|
-
light: '#48D3AB',
|
|
3236
|
-
main: '#00B485',
|
|
3237
|
-
dark: '#00663E',
|
|
3238
|
-
contrastText: '#FFFFFF',
|
|
3239
|
-
},
|
|
3240
|
-
error: {
|
|
3241
|
-
light: '#DA777E',
|
|
3242
|
-
main: '#E52021',
|
|
3243
|
-
dark: '#A80005',
|
|
3244
|
-
},
|
|
3245
|
-
warning: {
|
|
3246
|
-
light: '#F0DFBA',
|
|
3247
|
-
main: '#F5C364',
|
|
3248
|
-
dark: '#E57E45',
|
|
3249
|
-
},
|
|
3250
|
-
/** Colors */
|
|
3251
|
-
blue: {
|
|
3252
|
-
light: '#52B7FF',
|
|
3253
|
-
main: '#0076CB',
|
|
3254
|
-
dark: '#164B54',
|
|
3255
|
-
darker: '#002E6C',
|
|
3256
|
-
},
|
|
3257
|
-
green: {
|
|
3258
|
-
light: '#48D3AB',
|
|
3259
|
-
main: '#00B485',
|
|
3260
|
-
dark: '#00663E',
|
|
3261
|
-
},
|
|
3262
|
-
purple: {
|
|
3263
|
-
light: '#7B7FA3',
|
|
3264
|
-
main: '#2E3042',
|
|
3265
|
-
dark: '#1A1D20',
|
|
3266
|
-
},
|
|
3267
|
-
red: {
|
|
3268
|
-
light: '#DA777E',
|
|
3269
|
-
main: '#F04649',
|
|
3270
|
-
dark: '#B3212B',
|
|
3271
|
-
},
|
|
3272
|
-
yellow: {
|
|
3273
|
-
light: '#F0DFBA',
|
|
3274
|
-
main: '#F5C364',
|
|
3275
|
-
dark: '#E57E45',
|
|
3276
|
-
},
|
|
3277
|
-
gray: {
|
|
3278
|
-
light: '#E9E9E9',
|
|
3279
|
-
main: '#D9D9D9',
|
|
3280
|
-
dark: '#9D9D9D',
|
|
3281
|
-
},
|
|
3282
|
-
white: {
|
|
3283
|
-
main: '#FFFFFF',
|
|
3284
|
-
},
|
|
3285
|
-
};
|
|
3286
|
-
var adminLightPalette = {
|
|
3287
|
-
type: 'light',
|
|
3288
|
-
/** Semantic Colors */
|
|
3289
|
-
secondary: {
|
|
3290
|
-
light: '#7B7FA3',
|
|
3291
|
-
main: '#2E3042',
|
|
3292
|
-
dark: '#1A1D20',
|
|
3293
|
-
},
|
|
3294
|
-
surface: {
|
|
3295
|
-
light: '#FEFEFE',
|
|
3296
|
-
main: '#ECF0F1',
|
|
3297
|
-
dark: '#2E3042',
|
|
3298
|
-
},
|
|
3299
|
-
};
|
|
3300
|
-
var adminDarkPalette = {
|
|
3301
|
-
type: 'dark',
|
|
3302
|
-
/** Semantic Colors */
|
|
3303
|
-
secondary: {
|
|
3304
|
-
light: '#7B7FA3',
|
|
3305
|
-
main: '#FFFFFF',
|
|
3306
|
-
},
|
|
3307
|
-
surface: {
|
|
3308
|
-
light: '#141414',
|
|
3309
|
-
main: '#222222',
|
|
3310
|
-
dark: '#333333',
|
|
3311
|
-
},
|
|
3312
|
-
};
|
|
3313
|
-
var dataVizPalette = {
|
|
3314
|
-
data: {
|
|
3315
|
-
blue: {
|
|
3316
|
-
light: '#A5BBFF',
|
|
3317
|
-
main: '#6B82FE',
|
|
3318
|
-
dark: '#5F6FE6',
|
|
3319
|
-
},
|
|
3320
|
-
peach: {
|
|
3321
|
-
light: '#E69999',
|
|
3322
|
-
main: '#FF7061',
|
|
3323
|
-
dark: '#DC5D56',
|
|
3324
|
-
},
|
|
3325
|
-
pink: {
|
|
3326
|
-
light: '#D08CB2',
|
|
3327
|
-
main: '#BC5090',
|
|
3328
|
-
dark: '#A04383',
|
|
3329
|
-
},
|
|
3330
|
-
purple: {
|
|
3331
|
-
light: '#978CCE',
|
|
3332
|
-
main: '#58508D',
|
|
3333
|
-
dark: '#1B1B51',
|
|
3334
|
-
},
|
|
3335
|
-
marigold: {
|
|
3336
|
-
light: '#ECBE70',
|
|
3337
|
-
main: '#ECA33A',
|
|
3338
|
-
dark: '#E28A30',
|
|
3339
|
-
},
|
|
3340
|
-
teal: {
|
|
3341
|
-
light: '#5FCFD2',
|
|
3342
|
-
main: '#1AB0AF',
|
|
3343
|
-
dark: '#1E938F',
|
|
3344
|
-
},
|
|
3345
|
-
},
|
|
3346
|
-
};
|
|
3347
|
-
|
|
3348
|
-
var props = {
|
|
3349
|
-
MuiSwitch: {
|
|
3350
|
-
color: 'default',
|
|
3351
|
-
},
|
|
3352
|
-
MuiTextField: {
|
|
3353
|
-
variant: 'outlined',
|
|
3354
|
-
},
|
|
3355
|
-
};
|
|
3356
|
-
|
|
3357
|
-
/**
|
|
3358
|
-
* These theme properties should be considered legacy. Make efforts to avoid new usage as well as refactor out existing
|
|
3359
|
-
* usage.
|
|
3360
|
-
*/
|
|
3361
|
-
var adminLightPlaceholder = { placeholder: 'rgba(0, 0, 0, 1)' };
|
|
3362
|
-
var adminDarkPlaceholder = { placeholder: 'rgba(255, 255, 255, 0.37)' };
|
|
3363
|
-
var adminThemeStatus = {
|
|
3364
|
-
status: {
|
|
3365
|
-
disabled: {
|
|
3366
|
-
opacity: 0.55,
|
|
3367
|
-
},
|
|
3368
|
-
},
|
|
3369
|
-
};
|
|
3370
|
-
var BASE_Z_INDEX = 1100000;
|
|
3371
|
-
var adminThemeZIndex = {
|
|
3372
|
-
zIndex: {
|
|
3373
|
-
mobileStepper: BASE_Z_INDEX + 1000,
|
|
3374
|
-
appBar: BASE_Z_INDEX + 1100,
|
|
3375
|
-
drawer: BASE_Z_INDEX + 1200,
|
|
3376
|
-
modal: BASE_Z_INDEX + 1300,
|
|
3377
|
-
snackbar: BASE_Z_INDEX + 1400,
|
|
3378
|
-
tooltip: BASE_Z_INDEX + 9100,
|
|
3379
|
-
},
|
|
3380
|
-
};
|
|
3381
|
-
/** The defaults for MuiInputBase and MuiInputLabel can be removed once the BasicForm & 'shared' inputs have either:
|
|
3382
|
-
* 1. been refactored to use secondary color.
|
|
3383
|
-
* 2. been replaced with new common components.
|
|
3384
|
-
*
|
|
3385
|
-
* props as imported from './props' are part updated design system.
|
|
3386
|
-
*/
|
|
3387
|
-
var adminThemeDefaultProps = {
|
|
3388
|
-
props: __assign$1(__assign$1({}, props), {
|
|
3389
|
-
// Legacy below
|
|
3390
|
-
MuiCard: {
|
|
3391
|
-
elevation: 0,
|
|
3392
|
-
}, MuiTooltip: {
|
|
3393
|
-
title: '',
|
|
3394
|
-
placement: 'right',
|
|
3395
|
-
}, MuiPaper: {
|
|
3396
|
-
elevation: 0,
|
|
3397
|
-
}, MuiAppBar: {
|
|
3398
|
-
position: 'static',
|
|
3399
|
-
}, MuiInputBase: {
|
|
3400
|
-
color: 'secondary',
|
|
3401
|
-
}, MuiInputLabel: {
|
|
3402
|
-
color: 'secondary',
|
|
3403
|
-
} }),
|
|
3404
|
-
};
|
|
3405
|
-
|
|
3406
|
-
var overrides = {
|
|
3407
|
-
MuiCssBaseline: {
|
|
3408
|
-
'@global': {
|
|
3409
|
-
'*::-webkit-scrollbar': {
|
|
3410
|
-
width: '12px',
|
|
3411
|
-
},
|
|
3412
|
-
'*::-webkit-scrollbar-thumb': {
|
|
3413
|
-
backgroundColor: 'rgba(167,167,167,1)',
|
|
3414
|
-
border: '2px solid rgba(245, 245, 245, 1)',
|
|
3415
|
-
borderRadius: '8px',
|
|
3416
|
-
},
|
|
3417
|
-
'*::-webkit-scrollbar-track': {
|
|
3418
|
-
backgroundColor: 'rgba(245, 245, 245, 1)',
|
|
3419
|
-
borderRadius: '0px',
|
|
3420
|
-
},
|
|
3421
|
-
},
|
|
3422
|
-
},
|
|
3423
|
-
MuiSwitch: {
|
|
3424
|
-
checked: {},
|
|
3425
|
-
track: {},
|
|
3426
|
-
switchBase: {
|
|
3427
|
-
'&$checked': {
|
|
3428
|
-
color: basePalette.success.main,
|
|
3429
|
-
'& + $track': {
|
|
3430
|
-
background: basePalette.success.light,
|
|
3431
|
-
},
|
|
3432
|
-
},
|
|
3433
|
-
},
|
|
3434
|
-
},
|
|
373
|
+
var useStagedColumnFilters = function (selectedColumnFilters) {
|
|
374
|
+
var _a = React.useState(function () {
|
|
375
|
+
return selectedColumnFilters.reduce(function (acc, _a) {
|
|
376
|
+
var id = _a.id, value = _a.value;
|
|
377
|
+
if (acc.has(id)) {
|
|
378
|
+
var existingValue = acc.get(id);
|
|
379
|
+
// If the existing value is a string, convert it to an array and add the new value
|
|
380
|
+
if (typeof existingValue === 'string') {
|
|
381
|
+
acc.set(id, [existingValue, value]);
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
existingValue.push(value);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
acc.set(id, value);
|
|
389
|
+
}
|
|
390
|
+
return acc;
|
|
391
|
+
}, new Map());
|
|
392
|
+
}), columnInputValues = _a[0], setColumnInputValues = _a[1];
|
|
393
|
+
var filterState = {
|
|
394
|
+
update: function (columnId, value) {
|
|
395
|
+
return setColumnInputValues(columnInputValues.set(columnId, value));
|
|
396
|
+
},
|
|
397
|
+
get: function (columnId) { return columnInputValues.get(columnId); },
|
|
398
|
+
clear: function () {
|
|
399
|
+
columnInputValues.clear();
|
|
400
|
+
setColumnInputValues(columnInputValues);
|
|
401
|
+
},
|
|
402
|
+
delete: function (columnFilter) {
|
|
403
|
+
var values = columnInputValues.get(columnFilter.id);
|
|
404
|
+
if (values && Array.isArray(values)) {
|
|
405
|
+
var valueIndex = values.indexOf(columnFilter.value);
|
|
406
|
+
values.splice(valueIndex, 1);
|
|
407
|
+
if (values.length > 0) {
|
|
408
|
+
columnInputValues.set(columnFilter.id, values);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
columnInputValues.delete(columnFilter.id);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
columnInputValues.delete(columnFilter.id);
|
|
416
|
+
}
|
|
417
|
+
setColumnInputValues(columnInputValues);
|
|
418
|
+
},
|
|
419
|
+
exist: function () { return columnInputValues.size > 0; },
|
|
420
|
+
};
|
|
421
|
+
return filterState;
|
|
3435
422
|
};
|
|
3436
423
|
|
|
3437
|
-
var
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
var
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
var
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
onClose
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
},
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
},
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
React__default['default'].createElement(core.Box, __assign$3({}, { ref: paperRef }, { padding: 3 }),
|
|
3497
|
-
React__default['default'].createElement(Typography$1, { className: classes.menuTitle }, "Filter By"),
|
|
3498
|
-
columnFilters.map(function (columnFilter, i) { return (React__default['default'].createElement(FilterControl, __assign$3({}, columnFilter, { key: i }))); })),
|
|
3499
|
-
stageFilterSelections && (React__default['default'].createElement(core.Box, { className: classes.buttonBox },
|
|
3500
|
-
React__default['default'].createElement(Button, { variant: "secondary", onClick: handleCancelClick }, "Cancel"),
|
|
3501
|
-
React__default['default'].createElement(Button, { onClick: handleApplyClick }, "Apply"))))));
|
|
424
|
+
var Panel = function (props) {
|
|
425
|
+
var anchorEl = props.anchorEl, onClose = props.onClose;
|
|
426
|
+
var classes = useStyles$5();
|
|
427
|
+
var _a = React.useContext(TableContext), table = _a.table, stagedColumnFilters = _a.stagedColumnFilters, stageFilterSelections = _a.stageFilterSelections;
|
|
428
|
+
var paperRef = React.useRef(null);
|
|
429
|
+
var _b = useColumnFilters(table), columnFilters = _b.columnFilters, resetColumnFilters = _b.resetColumnFilters;
|
|
430
|
+
var handleClick = function (e) {
|
|
431
|
+
var _a;
|
|
432
|
+
var rect = (_a = paperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
433
|
+
if (rect) {
|
|
434
|
+
var buffer = 10;
|
|
435
|
+
var mouseX = e.nativeEvent.x;
|
|
436
|
+
var mouseY = e.nativeEvent.y;
|
|
437
|
+
var xHit = rect.x - buffer < mouseX && mouseX < rect.x + rect.width + buffer;
|
|
438
|
+
var yHit = rect.y - buffer < mouseY && mouseY < rect.y + rect.height + buffer;
|
|
439
|
+
if (!xHit || !yHit) {
|
|
440
|
+
onClose();
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
var handleApplyClick = function () {
|
|
445
|
+
if (stagedColumnFilters.exist()) {
|
|
446
|
+
columnFilters.forEach(function (columnFilter) {
|
|
447
|
+
var columnInputValue = stagedColumnFilters.get(columnFilter.columnId);
|
|
448
|
+
if (columnInputValue) {
|
|
449
|
+
var column = table.getColumn(columnFilter.columnId);
|
|
450
|
+
column.setFilterValue(columnInputValue);
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
resetColumnFilters();
|
|
456
|
+
}
|
|
457
|
+
onClose();
|
|
458
|
+
};
|
|
459
|
+
var handleCancelClick = function () {
|
|
460
|
+
onClose();
|
|
461
|
+
};
|
|
462
|
+
var open = Boolean(anchorEl);
|
|
463
|
+
return (React.createElement(commonUi.Popover, { onClick: handleClick, anchorEl: anchorEl, anchorOrigin: {
|
|
464
|
+
vertical: 'bottom',
|
|
465
|
+
horizontal: 'right',
|
|
466
|
+
}, className: classes.filterPopover, onClose: onClose, open: open, PaperProps: {
|
|
467
|
+
style: {
|
|
468
|
+
backgroundColor: 'transparent',
|
|
469
|
+
boxShadow: 'none',
|
|
470
|
+
borderRadius: 0,
|
|
471
|
+
},
|
|
472
|
+
}, transformOrigin: {
|
|
473
|
+
vertical: 'top',
|
|
474
|
+
horizontal: 'right',
|
|
475
|
+
} },
|
|
476
|
+
React.createElement(commonUi.Paper, { className: classes.filterPopoverContents, elevation: 2 },
|
|
477
|
+
React.createElement(commonUi.Box, tslib.__assign({}, { ref: paperRef }, { padding: 3 }),
|
|
478
|
+
React.createElement(commonUi.Typography, { className: classes.menuTitle }, "Filter By"),
|
|
479
|
+
columnFilters.map(function (columnFilter, i) { return (React.createElement(FilterControl, tslib.__assign({}, columnFilter, { key: i }))); })),
|
|
480
|
+
stageFilterSelections && (React.createElement(commonUi.Box, { className: classes.buttonBox },
|
|
481
|
+
React.createElement(adminUi.Button, { variant: "secondary", onClick: handleCancelClick }, "Cancel"),
|
|
482
|
+
React.createElement(adminUi.Button, { onClick: handleApplyClick }, "Apply"))))));
|
|
3502
483
|
};
|
|
3503
484
|
|
|
3504
|
-
var useStyles$3 = core.makeStyles({
|
|
3505
|
-
root: {
|
|
3506
|
-
justifySelf: 'end',
|
|
3507
|
-
gridArea: 'columnFilter',
|
|
3508
|
-
},
|
|
485
|
+
var useStyles$3 = core.makeStyles({
|
|
486
|
+
root: {
|
|
487
|
+
justifySelf: 'end',
|
|
488
|
+
gridArea: 'columnFilter',
|
|
489
|
+
},
|
|
3509
490
|
});
|
|
3510
491
|
|
|
3511
|
-
var Trigger = function (props) {
|
|
3512
|
-
var _a = props.label, label = _a === void 0 ? 'Filter' : _a, onClick = props.onClick;
|
|
3513
|
-
var classes = useStyles$3();
|
|
3514
|
-
return (
|
|
492
|
+
var Trigger = function (props) {
|
|
493
|
+
var _a = props.label, label = _a === void 0 ? 'Filter' : _a, onClick = props.onClick;
|
|
494
|
+
var classes = useStyles$3();
|
|
495
|
+
return (React.createElement(adminUi.Button, { className: classes.root, onClick: onClick, startIcon: React.createElement(commonUi.Icon, { icon: webIcons.Filter }), textTransform: "none", variant: "ghost" }, label));
|
|
3515
496
|
};
|
|
3516
497
|
|
|
3517
|
-
var FilterPanel = function () {
|
|
3518
|
-
var _a = React.useState(null), anchorEl = _a[0], setAnchorEl = _a[1];
|
|
3519
|
-
var _b = React.useContext(TableContext), stageFilterSelections = _b.stageFilterSelections, stagedColumnFilters = _b.stagedColumnFilters;
|
|
3520
|
-
var handleClick = function (event) {
|
|
3521
|
-
setAnchorEl(event.currentTarget);
|
|
3522
|
-
};
|
|
3523
|
-
var handleClose = function () {
|
|
3524
|
-
if (stageFilterSelections)
|
|
3525
|
-
stagedColumnFilters.clear();
|
|
3526
|
-
setAnchorEl(null);
|
|
3527
|
-
};
|
|
3528
|
-
return (
|
|
3529
|
-
|
|
3530
|
-
|
|
498
|
+
var FilterPanel = function () {
|
|
499
|
+
var _a = React.useState(null), anchorEl = _a[0], setAnchorEl = _a[1];
|
|
500
|
+
var _b = React.useContext(TableContext), stageFilterSelections = _b.stageFilterSelections, stagedColumnFilters = _b.stagedColumnFilters;
|
|
501
|
+
var handleClick = function (event) {
|
|
502
|
+
setAnchorEl(event.currentTarget);
|
|
503
|
+
};
|
|
504
|
+
var handleClose = function () {
|
|
505
|
+
if (stageFilterSelections)
|
|
506
|
+
stagedColumnFilters.clear();
|
|
507
|
+
setAnchorEl(null);
|
|
508
|
+
};
|
|
509
|
+
return (React.createElement(FilterPanelContext.Provider, { value: { anchorState: [anchorEl, setAnchorEl] } },
|
|
510
|
+
React.createElement(Trigger, { onClick: handleClick }),
|
|
511
|
+
React.createElement(Panel, { onClose: handleClose, anchorEl: anchorEl })));
|
|
3531
512
|
};
|
|
3532
513
|
|
|
3533
|
-
var useStyles$2 = core.makeStyles({
|
|
3534
|
-
root: {
|
|
3535
|
-
justifySelf: 'start',
|
|
3536
|
-
maxWidth: 300,
|
|
3537
|
-
minWidth: 200,
|
|
3538
|
-
width: '100%',
|
|
3539
|
-
gridArea: 'globalFilter',
|
|
3540
|
-
},
|
|
514
|
+
var useStyles$2 = core.makeStyles({
|
|
515
|
+
root: {
|
|
516
|
+
justifySelf: 'start',
|
|
517
|
+
maxWidth: 300,
|
|
518
|
+
minWidth: 200,
|
|
519
|
+
width: '100%',
|
|
520
|
+
gridArea: 'globalFilter',
|
|
521
|
+
},
|
|
3541
522
|
});
|
|
3542
523
|
|
|
3543
|
-
var GlobalFilter = function (props) {
|
|
3544
|
-
var value = props.value, setValue = props.setValue, restProps = __rest
|
|
3545
|
-
var classes = useStyles$2();
|
|
3546
|
-
var handleChange = function (e) {
|
|
3547
|
-
setValue(e.target.value);
|
|
3548
|
-
};
|
|
3549
|
-
return (
|
|
3550
|
-
startAdornment: (
|
|
3551
|
-
|
|
3552
|
-
} }, restProps)));
|
|
524
|
+
var GlobalFilter = function (props) {
|
|
525
|
+
var value = props.value, setValue = props.setValue, restProps = tslib.__rest(props, ["value", "setValue"]);
|
|
526
|
+
var classes = useStyles$2();
|
|
527
|
+
var handleChange = function (e) {
|
|
528
|
+
setValue(e.target.value);
|
|
529
|
+
};
|
|
530
|
+
return (React.createElement(core.TextField, tslib.__assign({ className: classes.root, variant: "outlined", value: value, onChange: handleChange, InputProps: {
|
|
531
|
+
startAdornment: (React.createElement(core.InputAdornment, { position: "start" },
|
|
532
|
+
React.createElement(commonUi.Icon, { icon: webIcons.Search }))),
|
|
533
|
+
} }, restProps)));
|
|
3553
534
|
};
|
|
3554
535
|
|
|
3555
|
-
var TableHeaderRow = function (props) {
|
|
3556
|
-
var children = props.children, restProps = __rest
|
|
3557
|
-
return (
|
|
536
|
+
var TableHeaderRow = function (props) {
|
|
537
|
+
var children = props.children, restProps = tslib.__rest(props, ["children"]);
|
|
538
|
+
return (React.createElement("tr", tslib.__assign({ "data-table-element": 'header-row' }, restProps), children));
|
|
3558
539
|
};
|
|
3559
540
|
|
|
3560
|
-
// const getWidth = (props: TableHeaderCellProps) => {
|
|
3561
|
-
// const {
|
|
3562
|
-
// column: { isActionColumn },
|
|
3563
|
-
// tableProps: { fullWidth },
|
|
3564
|
-
// } = props
|
|
3565
|
-
// let width
|
|
3566
|
-
// if (fullWidth && isActionColumn) {
|
|
3567
|
-
// width = '0.0000000001%'
|
|
3568
|
-
// }
|
|
3569
|
-
// if (fullWidth && !isActionColumn) {
|
|
3570
|
-
// width = '1%'
|
|
3571
|
-
// }
|
|
3572
|
-
// if (!fullWidth && isActionColumn) {
|
|
3573
|
-
// width = 72
|
|
3574
|
-
// }
|
|
3575
|
-
// if (!fullWidth && !isActionColumn) {
|
|
3576
|
-
// width = undefined
|
|
3577
|
-
// }
|
|
3578
|
-
// return width
|
|
3579
|
-
// }
|
|
3580
|
-
var useStyles$1 = core.makeStyles(function (theme) { return ({
|
|
3581
|
-
root: {
|
|
3582
|
-
borderBottomStyle: 'solid',
|
|
3583
|
-
borderBottomWidth: 2,
|
|
3584
|
-
borderBottomColor: theme.palette.grey[100],
|
|
3585
|
-
padding: theme.spacing(2),
|
|
3586
|
-
textAlign: 'left',
|
|
3587
|
-
fontWeight: 500,
|
|
3588
|
-
},
|
|
3589
|
-
box: {
|
|
3590
|
-
cursor: function (_a) {
|
|
3591
|
-
var sortable = _a.sortable;
|
|
3592
|
-
return (sortable ? 'pointer' : 'default');
|
|
3593
|
-
},
|
|
3594
|
-
},
|
|
541
|
+
// const getWidth = (props: TableHeaderCellProps) => {
|
|
542
|
+
// const {
|
|
543
|
+
// column: { isActionColumn },
|
|
544
|
+
// tableProps: { fullWidth },
|
|
545
|
+
// } = props
|
|
546
|
+
// let width
|
|
547
|
+
// if (fullWidth && isActionColumn) {
|
|
548
|
+
// width = '0.0000000001%'
|
|
549
|
+
// }
|
|
550
|
+
// if (fullWidth && !isActionColumn) {
|
|
551
|
+
// width = '1%'
|
|
552
|
+
// }
|
|
553
|
+
// if (!fullWidth && isActionColumn) {
|
|
554
|
+
// width = 72
|
|
555
|
+
// }
|
|
556
|
+
// if (!fullWidth && !isActionColumn) {
|
|
557
|
+
// width = undefined
|
|
558
|
+
// }
|
|
559
|
+
// return width
|
|
560
|
+
// }
|
|
561
|
+
var useStyles$1 = core.makeStyles(function (theme) { return ({
|
|
562
|
+
root: {
|
|
563
|
+
borderBottomStyle: 'solid',
|
|
564
|
+
borderBottomWidth: 2,
|
|
565
|
+
borderBottomColor: theme.palette.grey[100],
|
|
566
|
+
padding: theme.spacing(2),
|
|
567
|
+
textAlign: 'left',
|
|
568
|
+
fontWeight: 500,
|
|
569
|
+
},
|
|
570
|
+
box: {
|
|
571
|
+
cursor: function (_a) {
|
|
572
|
+
var sortable = _a.sortable;
|
|
573
|
+
return (sortable ? 'pointer' : 'default');
|
|
574
|
+
},
|
|
575
|
+
},
|
|
3595
576
|
}); });
|
|
3596
577
|
|
|
3597
578
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -3952,9 +933,6 @@ var Symbol = _Symbol,
|
|
|
3952
933
|
isArray = isArray_1,
|
|
3953
934
|
isSymbol = isSymbol_1;
|
|
3954
935
|
|
|
3955
|
-
/** Used as references for various `Number` constants. */
|
|
3956
|
-
var INFINITY = 1 / 0;
|
|
3957
|
-
|
|
3958
936
|
/** Used to convert symbols to primitives and strings. */
|
|
3959
937
|
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
3960
938
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
@@ -3980,7 +958,7 @@ function baseToString$1(value) {
|
|
|
3980
958
|
return symbolToString ? symbolToString.call(value) : '';
|
|
3981
959
|
}
|
|
3982
960
|
var result = (value + '');
|
|
3983
|
-
return (result == '0' && (1 / value) == -
|
|
961
|
+
return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
|
|
3984
962
|
}
|
|
3985
963
|
|
|
3986
964
|
var _baseToString = baseToString$1;
|
|
@@ -4255,201 +1233,201 @@ var kebabCase = createCompounder(function(result, word, index) {
|
|
|
4255
1233
|
|
|
4256
1234
|
var kebabCase_1 = kebabCase;
|
|
4257
1235
|
|
|
4258
|
-
var TableHeaderCell = function (props) {
|
|
4259
|
-
var _a;
|
|
4260
|
-
var children = props.children, context = props.context, restProps = __rest
|
|
4261
|
-
var sortable = context.header.column.getCanSort();
|
|
4262
|
-
var sorted = context.header.column.getIsSorted();
|
|
4263
|
-
var handleSort = context.header.column.getToggleSortingHandler();
|
|
4264
|
-
var classes = useStyles$1(__assign
|
|
4265
|
-
var _b = core.useTheme(), spacing = _b.spacing, palette = _b.palette;
|
|
4266
|
-
var sortIndicators = {
|
|
4267
|
-
asc:
|
|
4268
|
-
desc:
|
|
4269
|
-
};
|
|
4270
|
-
var idBase = (_a = context.table.options.meta) === null || _a === void 0 ? void 0 : _a.idBase;
|
|
4271
|
-
var dataTourIdProps = idBase && sortable ? { 'data-tour-id': kebabCase_1("sort " + idBase + " on " + context.header.column.id) } : {};
|
|
4272
|
-
return (
|
|
4273
|
-
|
|
4274
|
-
children,
|
|
4275
|
-
sortable && !sorted &&
|
|
4276
|
-
sortable && sorted &&
|
|
1236
|
+
var TableHeaderCell = function (props) {
|
|
1237
|
+
var _a;
|
|
1238
|
+
var children = props.children, context = props.context, restProps = tslib.__rest(props, ["children", "context"]);
|
|
1239
|
+
var sortable = context.header.column.getCanSort();
|
|
1240
|
+
var sorted = context.header.column.getIsSorted();
|
|
1241
|
+
var handleSort = context.header.column.getToggleSortingHandler();
|
|
1242
|
+
var classes = useStyles$1(tslib.__assign(tslib.__assign({}, props), { sortable: sortable }));
|
|
1243
|
+
var _b = core.useTheme(), spacing = _b.spacing, palette = _b.palette;
|
|
1244
|
+
var sortIndicators = {
|
|
1245
|
+
asc: webIcons.ChevronUp,
|
|
1246
|
+
desc: webIcons.ChevronDown,
|
|
1247
|
+
};
|
|
1248
|
+
var idBase = (_a = context.table.options.meta) === null || _a === void 0 ? void 0 : _a.idBase;
|
|
1249
|
+
var dataTourIdProps = idBase && sortable ? { 'data-tour-id': kebabCase_1("sort " + idBase + " on " + context.header.column.id) } : {};
|
|
1250
|
+
return (React.createElement("th", tslib.__assign({ className: classes.root }, restProps),
|
|
1251
|
+
React.createElement(commonUi.Box, tslib.__assign({ className: classes.box, display: "flex", alignItems: "center", gridGap: spacing(1), onClick: handleSort }, dataTourIdProps),
|
|
1252
|
+
children,
|
|
1253
|
+
sortable && !sorted && React.createElement(commonUi.Icon, { icon: webIcons.Sort, color: palette.grey[500] }),
|
|
1254
|
+
sortable && sorted && React.createElement(commonUi.Icon, { icon: sortIndicators[sorted] }))));
|
|
4277
1255
|
};
|
|
4278
1256
|
|
|
4279
|
-
var useStyles = core.makeStyles({
|
|
4280
|
-
chip: {
|
|
4281
|
-
overflow: 'visible',
|
|
4282
|
-
height: 'auto',
|
|
4283
|
-
},
|
|
4284
|
-
label: {
|
|
4285
|
-
whiteSpace: 'normal',
|
|
4286
|
-
},
|
|
1257
|
+
var useStyles = core.makeStyles({
|
|
1258
|
+
chip: {
|
|
1259
|
+
overflow: 'visible',
|
|
1260
|
+
height: 'auto',
|
|
1261
|
+
},
|
|
1262
|
+
label: {
|
|
1263
|
+
whiteSpace: 'normal',
|
|
1264
|
+
},
|
|
4287
1265
|
});
|
|
4288
1266
|
|
|
4289
|
-
var ColumnFilterChip = function (props) {
|
|
4290
|
-
var columnFilter = props.columnFilter, onClick = props.onClick, label = props.label;
|
|
4291
|
-
var classes = useStyles();
|
|
4292
|
-
return (
|
|
4293
|
-
|
|
4294
|
-
label[0],
|
|
4295
|
-
":"),
|
|
4296
|
-
|
|
1267
|
+
var ColumnFilterChip = function (props) {
|
|
1268
|
+
var columnFilter = props.columnFilter, onClick = props.onClick, label = props.label;
|
|
1269
|
+
var classes = useStyles();
|
|
1270
|
+
return (React.createElement(commonUi.Chip, { className: classes.chip, onDelete: function () { return onClick(columnFilter); }, label: React.createElement(commonUi.Box, { display: "flex", gridGap: 4, flexWrap: "wrap" },
|
|
1271
|
+
React.createElement(commonUi.Typography, null,
|
|
1272
|
+
label[0],
|
|
1273
|
+
":"),
|
|
1274
|
+
React.createElement(commonUi.Typography, tslib.__assign({ className: classes.label, weight: "semi-bold" }, { component: 'span' }), label[1])) }));
|
|
4297
1275
|
};
|
|
4298
1276
|
|
|
4299
|
-
var TableControlsContainer = function (props) {
|
|
4300
|
-
var showTitle = props.showTitle, showGlobalSearch = props.showGlobalSearch, showColumnFilter = props.showColumnFilter;
|
|
4301
|
-
var gridTemplateAreas;
|
|
4302
|
-
switch (true) {
|
|
4303
|
-
case showTitle && showGlobalSearch && showColumnFilter:
|
|
4304
|
-
gridTemplateAreas = "\n \"title .\"\n \"globalFilter columnFilter\"\n ";
|
|
4305
|
-
break;
|
|
4306
|
-
case showTitle && !showGlobalSearch && showColumnFilter:
|
|
4307
|
-
gridTemplateAreas = "\n \"title columnFilter\"\n ";
|
|
4308
|
-
break;
|
|
4309
|
-
case !showTitle && showGlobalSearch && showColumnFilter:
|
|
4310
|
-
gridTemplateAreas = "\n \"globalFilter columnFilter\"\n ";
|
|
4311
|
-
break;
|
|
4312
|
-
case showTitle && !showGlobalSearch && !showColumnFilter:
|
|
4313
|
-
gridTemplateAreas = "\n \"title .\"\n ";
|
|
4314
|
-
break;
|
|
4315
|
-
case !showTitle && !showGlobalSearch && showColumnFilter:
|
|
4316
|
-
gridTemplateAreas = "\n \". columnFilter\"\n ";
|
|
4317
|
-
break;
|
|
4318
|
-
case !showTitle && showGlobalSearch && !showColumnFilter:
|
|
4319
|
-
gridTemplateAreas = "\n \"globalFilter .\"\n ";
|
|
4320
|
-
break;
|
|
4321
|
-
case showTitle && showGlobalSearch && !showColumnFilter:
|
|
4322
|
-
gridTemplateAreas = "\n \"title .\"\n \"globalFilter .\"\n ";
|
|
4323
|
-
break;
|
|
4324
|
-
}
|
|
4325
|
-
return (
|
|
1277
|
+
var TableControlsContainer = function (props) {
|
|
1278
|
+
var showTitle = props.showTitle, showGlobalSearch = props.showGlobalSearch, showColumnFilter = props.showColumnFilter;
|
|
1279
|
+
var gridTemplateAreas;
|
|
1280
|
+
switch (true) {
|
|
1281
|
+
case showTitle && showGlobalSearch && showColumnFilter:
|
|
1282
|
+
gridTemplateAreas = "\n \"title .\"\n \"globalFilter columnFilter\"\n ";
|
|
1283
|
+
break;
|
|
1284
|
+
case showTitle && !showGlobalSearch && showColumnFilter:
|
|
1285
|
+
gridTemplateAreas = "\n \"title columnFilter\"\n ";
|
|
1286
|
+
break;
|
|
1287
|
+
case !showTitle && showGlobalSearch && showColumnFilter:
|
|
1288
|
+
gridTemplateAreas = "\n \"globalFilter columnFilter\"\n ";
|
|
1289
|
+
break;
|
|
1290
|
+
case showTitle && !showGlobalSearch && !showColumnFilter:
|
|
1291
|
+
gridTemplateAreas = "\n \"title .\"\n ";
|
|
1292
|
+
break;
|
|
1293
|
+
case !showTitle && !showGlobalSearch && showColumnFilter:
|
|
1294
|
+
gridTemplateAreas = "\n \". columnFilter\"\n ";
|
|
1295
|
+
break;
|
|
1296
|
+
case !showTitle && showGlobalSearch && !showColumnFilter:
|
|
1297
|
+
gridTemplateAreas = "\n \"globalFilter .\"\n ";
|
|
1298
|
+
break;
|
|
1299
|
+
case showTitle && showGlobalSearch && !showColumnFilter:
|
|
1300
|
+
gridTemplateAreas = "\n \"title .\"\n \"globalFilter .\"\n ";
|
|
1301
|
+
break;
|
|
1302
|
+
}
|
|
1303
|
+
return (React.createElement(core.Box, { display: "grid", gridTemplateColumns: "repeat(2, minmax(150px, 1fr))", gridTemplateAreas: gridTemplateAreas, gridGap: 16, marginBottom: 3 }, props.children));
|
|
4326
1304
|
};
|
|
4327
1305
|
|
|
4328
|
-
var ColumnFilterResetButton = function (props) {
|
|
4329
|
-
var _a = props.children, children = _a === void 0 ? 'Clear All' : _a, restProps = __rest
|
|
4330
|
-
return (
|
|
1306
|
+
var ColumnFilterResetButton = function (props) {
|
|
1307
|
+
var _a = props.children, children = _a === void 0 ? 'Clear All' : _a, restProps = tslib.__rest(props, ["children"]);
|
|
1308
|
+
return (React.createElement(adminUi.Button, tslib.__assign({ variant: "text", textTransform: "none" }, restProps), children));
|
|
4331
1309
|
};
|
|
4332
1310
|
|
|
4333
|
-
var defaultTableProps = {
|
|
4334
|
-
enableSortingRemoval: true,
|
|
4335
|
-
fullWidth: true,
|
|
4336
|
-
paginated: true,
|
|
4337
|
-
sortable: false,
|
|
4338
|
-
searchable: false,
|
|
4339
|
-
};
|
|
4340
|
-
var Table = function (props) {
|
|
4341
|
-
var title = props.title, data = props.data, columns = props.columns, enableSortingRemoval = props.enableSortingRemoval, loading = props.loading, searchable = props.searchable, sortable = props.sortable, externalFilterState = props.filterState, externalGlobalFilterState = props.globalFilterState, externalPaginationState = props.paginationState, externalSortingState = props.sortingState, externalVisibilityState = props.visibilityState, paginated = props.paginated, pageCount = props.pageCount, GlobalFilterProps = props.GlobalFilterProps, Empty = props.Empty, idBase = props.idBase, stageFilterSelections = props.stageFilterSelections;
|
|
4342
|
-
var classes = useStyles$6(props);
|
|
4343
|
-
var rootRef = React.useRef(null);
|
|
4344
|
-
// Prepare Empty State
|
|
4345
|
-
var isEmpty = data.length === 0;
|
|
4346
|
-
var isEmptyComponentValid = Empty && React.isValidElement(React.createElement(Empty));
|
|
4347
|
-
// Prepare Sorting
|
|
4348
|
-
var _a = externalSortingState || [], sorting = _a[0], setSorting = _a[1];
|
|
4349
|
-
var isControlledColumnSort = Boolean(externalSortingState);
|
|
4350
|
-
var controlledColumnSortOptions = { onSortingChange: setSorting, manualSorting: true };
|
|
4351
|
-
// Prepare Global Filtering
|
|
4352
|
-
var _b = externalGlobalFilterState || [], globalFilter = _b[0], setGlobalFilter = _b[1];
|
|
4353
|
-
var isControlledGlobalFilter = Boolean(externalGlobalFilterState);
|
|
4354
|
-
var controlledGlobalFilterOptions = { onGlobalFilterChange: setGlobalFilter, manualFiltering: true };
|
|
4355
|
-
// Prepare ColumnFiltering
|
|
4356
|
-
var _c = externalFilterState || [], columnFilters = _c[0], setColumnFilters = _c[1];
|
|
4357
|
-
var isControlledColumnFilters = Boolean(externalFilterState);
|
|
4358
|
-
var controlledColumnFiltersOptions = { onColumnFiltersChange: setColumnFilters, manualFiltering: true };
|
|
4359
|
-
// Prepare Pagination
|
|
4360
|
-
var _d = externalPaginationState || [], pagination = _d[0], setPagination = _d[1];
|
|
4361
|
-
var isControlledPagination = Boolean(externalPaginationState && pageCount);
|
|
4362
|
-
var controlledPaginationOptions = { manualPagination: true, onPaginationChange: setPagination, pageCount: pageCount };
|
|
4363
|
-
// Prepare Column Visibility
|
|
4364
|
-
var columnVisibility = (externalVisibilityState || [])[0];
|
|
4365
|
-
var isControlledColumnVisibility = Boolean(externalVisibilityState);
|
|
4366
|
-
// Init table instance
|
|
4367
|
-
var table = reactTable.useReactTable(__assign
|
|
4368
|
-
var _f = useColumnFilters(table), selectedColumnFilters = _f.selectedColumnFilters, hasColumnFilters = _f.hasColumnFilters, deselectColumnFilter = _f.deselectColumnFilter, formatSelectedFilterText = _f.formatSelectedFilterText, resetColumnFilters = _f.resetColumnFilters;
|
|
4369
|
-
// stagedColumnFilters is only used when stageFilterSelections is enabled
|
|
4370
|
-
var stagedColumnFilters = useStagedColumnFilters(selectedColumnFilters);
|
|
4371
|
-
var handlePagination = function (_e, pageNumber) {
|
|
4372
|
-
var pageIndex = pageNumber - 1;
|
|
4373
|
-
table.setPageIndex(pageIndex);
|
|
4374
|
-
};
|
|
4375
|
-
var showTitle = Boolean(title);
|
|
4376
|
-
var showGlobalSearch = Boolean(searchable || isControlledGlobalFilter);
|
|
4377
|
-
var showColumnFilter = Boolean(hasColumnFilters);
|
|
4378
|
-
var showControls = Boolean(showTitle || showGlobalSearch || showColumnFilter);
|
|
4379
|
-
return (
|
|
4380
|
-
|
|
4381
|
-
minHeight: getTableMinHeight(rootRef, table.getState().pagination.pageSize),
|
|
4382
|
-
})),
|
|
4383
|
-
showControls && (
|
|
4384
|
-
|
|
4385
|
-
showTitle && (
|
|
4386
|
-
showGlobalSearch && (
|
|
4387
|
-
showColumnFilter &&
|
|
4388
|
-
|
|
4389
|
-
selectedColumnFilters.map(function (selectedColumnFilter, i) { return (
|
|
4390
|
-
if (stageFilterSelections) {
|
|
4391
|
-
stagedColumnFilters.delete(columnFilter);
|
|
4392
|
-
}
|
|
4393
|
-
deselectColumnFilter(columnFilter);
|
|
4394
|
-
} })); }),
|
|
4395
|
-
selectedColumnFilters.length >= 1 && (
|
|
4396
|
-
if (stageFilterSelections) {
|
|
4397
|
-
stagedColumnFilters.clear();
|
|
4398
|
-
}
|
|
4399
|
-
resetColumnFilters();
|
|
4400
|
-
} }))))),
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
!loading && (
|
|
4405
|
-
isEmpty && isEmptyComponentValid && Empty && !loading && (
|
|
4406
|
-
loading && (
|
|
4407
|
-
|
|
4408
|
-
paginated && table.getPageCount() > 1 && (
|
|
4409
|
-
|
|
4410
|
-
};
|
|
1311
|
+
var defaultTableProps = {
|
|
1312
|
+
enableSortingRemoval: true,
|
|
1313
|
+
fullWidth: true,
|
|
1314
|
+
paginated: true,
|
|
1315
|
+
sortable: false,
|
|
1316
|
+
searchable: false,
|
|
1317
|
+
};
|
|
1318
|
+
var Table = function (props) {
|
|
1319
|
+
var title = props.title, data = props.data, columns = props.columns, enableSortingRemoval = props.enableSortingRemoval, loading = props.loading, searchable = props.searchable, sortable = props.sortable, externalFilterState = props.filterState, externalGlobalFilterState = props.globalFilterState, externalPaginationState = props.paginationState, externalSortingState = props.sortingState, externalVisibilityState = props.visibilityState, paginated = props.paginated, pageCount = props.pageCount, GlobalFilterProps = props.GlobalFilterProps, Empty = props.Empty, idBase = props.idBase, stageFilterSelections = props.stageFilterSelections;
|
|
1320
|
+
var classes = useStyles$6(props);
|
|
1321
|
+
var rootRef = React.useRef(null);
|
|
1322
|
+
// Prepare Empty State
|
|
1323
|
+
var isEmpty = data.length === 0;
|
|
1324
|
+
var isEmptyComponentValid = Empty && React.isValidElement(React.createElement(Empty));
|
|
1325
|
+
// Prepare Sorting
|
|
1326
|
+
var _a = externalSortingState || [], sorting = _a[0], setSorting = _a[1];
|
|
1327
|
+
var isControlledColumnSort = Boolean(externalSortingState);
|
|
1328
|
+
var controlledColumnSortOptions = { onSortingChange: setSorting, manualSorting: true };
|
|
1329
|
+
// Prepare Global Filtering
|
|
1330
|
+
var _b = externalGlobalFilterState || [], globalFilter = _b[0], setGlobalFilter = _b[1];
|
|
1331
|
+
var isControlledGlobalFilter = Boolean(externalGlobalFilterState);
|
|
1332
|
+
var controlledGlobalFilterOptions = { onGlobalFilterChange: setGlobalFilter, manualFiltering: true };
|
|
1333
|
+
// Prepare ColumnFiltering
|
|
1334
|
+
var _c = externalFilterState || [], columnFilters = _c[0], setColumnFilters = _c[1];
|
|
1335
|
+
var isControlledColumnFilters = Boolean(externalFilterState);
|
|
1336
|
+
var controlledColumnFiltersOptions = { onColumnFiltersChange: setColumnFilters, manualFiltering: true };
|
|
1337
|
+
// Prepare Pagination
|
|
1338
|
+
var _d = externalPaginationState || [], pagination = _d[0], setPagination = _d[1];
|
|
1339
|
+
var isControlledPagination = Boolean(externalPaginationState && pageCount);
|
|
1340
|
+
var controlledPaginationOptions = { manualPagination: true, onPaginationChange: setPagination, pageCount: pageCount };
|
|
1341
|
+
// Prepare Column Visibility
|
|
1342
|
+
var columnVisibility = (externalVisibilityState || [])[0];
|
|
1343
|
+
var isControlledColumnVisibility = Boolean(externalVisibilityState);
|
|
1344
|
+
// Init table instance
|
|
1345
|
+
var table = reactTable.useReactTable(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({ data: data, columns: columns, state: tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, (isControlledPagination && { pagination: pagination })), (isControlledGlobalFilter && { globalFilter: globalFilter })), (isControlledColumnFilters && { columnFilters: columnFilters })), (isControlledColumnVisibility && { columnVisibility: columnVisibility })), (isControlledColumnSort && { sorting: sorting })), enableSorting: sortable, enableSortingRemoval: enableSortingRemoval, globalFilterFn: coercedValueIncludesString, getCoreRowModel: reactTable.getCoreRowModel(), getSortedRowModel: reactTable.getSortedRowModel(), getFilteredRowModel: reactTable.getFilteredRowModel() }, (paginated && { getPaginationRowModel: reactTable.getPaginationRowModel() })), (isControlledPagination && controlledPaginationOptions)), (isControlledGlobalFilter && controlledGlobalFilterOptions)), (isControlledColumnFilters && controlledColumnFiltersOptions)), (isControlledColumnSort && controlledColumnSortOptions)), { meta: { idBase: idBase } }));
|
|
1346
|
+
var _f = useColumnFilters(table), selectedColumnFilters = _f.selectedColumnFilters, hasColumnFilters = _f.hasColumnFilters, deselectColumnFilter = _f.deselectColumnFilter, formatSelectedFilterText = _f.formatSelectedFilterText, resetColumnFilters = _f.resetColumnFilters;
|
|
1347
|
+
// stagedColumnFilters is only used when stageFilterSelections is enabled
|
|
1348
|
+
var stagedColumnFilters = useStagedColumnFilters(selectedColumnFilters);
|
|
1349
|
+
var handlePagination = function (_e, pageNumber) {
|
|
1350
|
+
var pageIndex = pageNumber - 1;
|
|
1351
|
+
table.setPageIndex(pageIndex);
|
|
1352
|
+
};
|
|
1353
|
+
var showTitle = Boolean(title);
|
|
1354
|
+
var showGlobalSearch = Boolean(searchable || isControlledGlobalFilter);
|
|
1355
|
+
var showColumnFilter = Boolean(hasColumnFilters);
|
|
1356
|
+
var showControls = Boolean(showTitle || showGlobalSearch || showColumnFilter);
|
|
1357
|
+
return (React.createElement(TableContext.Provider, { value: { table: table, stagedColumnFilters: stagedColumnFilters, stageFilterSelections: stageFilterSelections } },
|
|
1358
|
+
React.createElement(commonUi.Box, tslib.__assign({ className: classes.root }, { ref: rootRef }, { "data-table-element": "root" }, (table.getPageCount() > 1 && {
|
|
1359
|
+
minHeight: getTableMinHeight(rootRef, table.getState().pagination.pageSize),
|
|
1360
|
+
})),
|
|
1361
|
+
showControls && (React.createElement(commonUi.Box, null,
|
|
1362
|
+
React.createElement(TableControlsContainer, { showTitle: showTitle, showGlobalSearch: showGlobalSearch, showColumnFilter: showColumnFilter },
|
|
1363
|
+
showTitle && (React.createElement(core.Typography, { style: { gridArea: 'title', alignSelf: 'center', fontSize: '18px', lineHeight: '27px' } }, title)),
|
|
1364
|
+
showGlobalSearch && (React.createElement(GlobalFilter, tslib.__assign({}, GlobalFilterProps, { value: table.getState().globalFilter, setValue: table.setGlobalFilter }))),
|
|
1365
|
+
showColumnFilter && React.createElement(FilterPanel, null)),
|
|
1366
|
+
React.createElement(commonUi.Box, { display: "flex", flexWrap: "wrap", gridGap: 8 },
|
|
1367
|
+
selectedColumnFilters.map(function (selectedColumnFilter, i) { return (React.createElement(ColumnFilterChip, { key: "selected-column-filter-chip-" + i, columnFilter: selectedColumnFilter, label: formatSelectedFilterText(selectedColumnFilter), onClick: function (columnFilter) {
|
|
1368
|
+
if (stageFilterSelections) {
|
|
1369
|
+
stagedColumnFilters.delete(columnFilter);
|
|
1370
|
+
}
|
|
1371
|
+
deselectColumnFilter(columnFilter);
|
|
1372
|
+
} })); }),
|
|
1373
|
+
selectedColumnFilters.length >= 1 && (React.createElement(ColumnFilterResetButton, { onClick: function () {
|
|
1374
|
+
if (stageFilterSelections) {
|
|
1375
|
+
stagedColumnFilters.clear();
|
|
1376
|
+
}
|
|
1377
|
+
resetColumnFilters();
|
|
1378
|
+
} }))))),
|
|
1379
|
+
React.createElement(commonUi.Box, { className: classes.tableContainer, flexGrow: loading || isEmpty ? 0 : 1 },
|
|
1380
|
+
React.createElement("table", { className: classes.table },
|
|
1381
|
+
React.createElement(TableHeader, null, table.getHeaderGroups().map(function (headerGroup) { return (React.createElement(TableHeaderRow, { key: headerGroup.id }, headerGroup.headers.map(function (header) { return (React.createElement(TableHeaderCell, { key: header.id, context: header.getContext() }, reactTable.flexRender(header.column.columnDef.header, header.getContext()))); }))); })),
|
|
1382
|
+
!loading && (React.createElement(TableBody, null, table.getRowModel().rows.map(function (row) { return (React.createElement(TableRow, { key: row.id }, row.getVisibleCells().map(function (cell) { return (React.createElement(TableCell, { key: cell.id }, reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()))); }))); }))))),
|
|
1383
|
+
isEmpty && isEmptyComponentValid && Empty && !loading && (React.createElement(commonUi.Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 }, React.createElement(Empty))),
|
|
1384
|
+
loading && (React.createElement(commonUi.Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 },
|
|
1385
|
+
React.createElement(commonUi.CircularProgress, { size: 80, color: "inherit" }))),
|
|
1386
|
+
paginated && table.getPageCount() > 1 && (React.createElement(TableFooter, null,
|
|
1387
|
+
React.createElement(lab.Pagination, { page: table.getState().pagination.pageIndex + 1, count: table.getPageCount(), onChange: handlePagination, disabled: loading }))))));
|
|
1388
|
+
};
|
|
4411
1389
|
Table.defaultProps = defaultTableProps;
|
|
4412
1390
|
|
|
4413
|
-
var validateAction = function (action) {
|
|
4414
|
-
var icon = action.icon, label = action.label, onClick = action.onClick;
|
|
4415
|
-
var onClickIsValid = typeof onClick === 'function';
|
|
4416
|
-
var labelIsValid = typeof label === 'string';
|
|
4417
|
-
var iconIsValid = icon && React.isValidElement(React.createElement(icon));
|
|
4418
|
-
return onClickIsValid && labelIsValid && iconIsValid;
|
|
1391
|
+
var validateAction = function (action) {
|
|
1392
|
+
var icon = action.icon, label = action.label, onClick = action.onClick;
|
|
1393
|
+
var onClickIsValid = typeof onClick === 'function';
|
|
1394
|
+
var labelIsValid = typeof label === 'string';
|
|
1395
|
+
var iconIsValid = icon && React.isValidElement(React.createElement(icon));
|
|
1396
|
+
return onClickIsValid && labelIsValid && iconIsValid;
|
|
4419
1397
|
};
|
|
4420
1398
|
|
|
4421
|
-
var RowActions = function (props) {
|
|
4422
|
-
var context = props.context, actions = props.actions;
|
|
4423
|
-
var validActions = actions.filter(validateAction);
|
|
4424
|
-
var _a =
|
|
4425
|
-
var openMenu = function (event) {
|
|
4426
|
-
setAnchorEl(event.currentTarget);
|
|
4427
|
-
};
|
|
4428
|
-
var closeMenu = function () {
|
|
4429
|
-
setAnchorEl(null);
|
|
4430
|
-
};
|
|
4431
|
-
var actionsCount = validActions.length;
|
|
4432
|
-
var mainActions;
|
|
4433
|
-
var overflowActions;
|
|
4434
|
-
if (actionsCount <= 3) {
|
|
4435
|
-
mainActions = validActions;
|
|
4436
|
-
}
|
|
4437
|
-
else {
|
|
4438
|
-
var firstAction = validActions[0], secondAction = validActions[1], restActions = validActions.slice(2);
|
|
4439
|
-
mainActions = [firstAction, secondAction];
|
|
4440
|
-
overflowActions = restActions;
|
|
4441
|
-
}
|
|
4442
|
-
return (
|
|
4443
|
-
mainActions.map(function (_a) {
|
|
4444
|
-
var label = _a.label, onClick = _a.onClick, icon = _a.icon, restProps = __rest
|
|
4445
|
-
return (
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
}),
|
|
4449
|
-
overflowActions && (
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
1399
|
+
var RowActions = function (props) {
|
|
1400
|
+
var context = props.context, actions = props.actions;
|
|
1401
|
+
var validActions = actions.filter(validateAction);
|
|
1402
|
+
var _a = React.useState(null), anchorEl = _a[0], setAnchorEl = _a[1];
|
|
1403
|
+
var openMenu = function (event) {
|
|
1404
|
+
setAnchorEl(event.currentTarget);
|
|
1405
|
+
};
|
|
1406
|
+
var closeMenu = function () {
|
|
1407
|
+
setAnchorEl(null);
|
|
1408
|
+
};
|
|
1409
|
+
var actionsCount = validActions.length;
|
|
1410
|
+
var mainActions;
|
|
1411
|
+
var overflowActions;
|
|
1412
|
+
if (actionsCount <= 3) {
|
|
1413
|
+
mainActions = validActions;
|
|
1414
|
+
}
|
|
1415
|
+
else {
|
|
1416
|
+
var firstAction = validActions[0], secondAction = validActions[1], restActions = validActions.slice(2);
|
|
1417
|
+
mainActions = [firstAction, secondAction];
|
|
1418
|
+
overflowActions = restActions;
|
|
1419
|
+
}
|
|
1420
|
+
return (React.createElement(commonUi.Box, { display: "flex" },
|
|
1421
|
+
mainActions.map(function (_a) {
|
|
1422
|
+
var label = _a.label, onClick = _a.onClick, icon = _a.icon, restProps = tslib.__rest(_a, ["label", "onClick", "icon"]);
|
|
1423
|
+
return (React.createElement(commonUi.Tooltip, { title: label, key: label },
|
|
1424
|
+
React.createElement(commonUi.IconButton, tslib.__assign({ size: "small", onClick: function () { return onClick(context); } }, restProps),
|
|
1425
|
+
React.createElement(commonUi.Icon, { icon: icon }))));
|
|
1426
|
+
}),
|
|
1427
|
+
overflowActions && (React.createElement(React.Fragment, null,
|
|
1428
|
+
React.createElement(commonUi.IconButton, { size: "small", onClick: openMenu },
|
|
1429
|
+
React.createElement(commonUi.Icon, { icon: webIcons.More })),
|
|
1430
|
+
React.createElement(commonUi.Menu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: closeMenu }, overflowActions.map(function (action) { return (React.createElement(commonUi.MenuItem, { key: action.label, onClick: function () { return action.onClick(context); } }, action.label)); }))))));
|
|
4453
1431
|
};
|
|
4454
1432
|
|
|
4455
1433
|
exports.GlobalFilter = GlobalFilter;
|