wip:milestone 0 fixes
Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped

This commit is contained in:
2026-03-15 12:35:42 +02:00
parent 6708cf28a7
commit cffdf8af86
61266 changed files with 4511646 additions and 1938 deletions

View File

@@ -0,0 +1,441 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.GridVisibilityOffIcon = exports.GridViewStreamIcon = exports.GridViewHeadlineIcon = exports.GridViewColumnIcon = exports.GridTripleDotsVerticalIcon = exports.GridTableRowsIcon = exports.GridSeparatorIcon = exports.GridSearchIcon = exports.GridSaveAltIcon = exports.GridRemoveIcon = exports.GridMoreVertIcon = exports.GridMenuIcon = exports.GridLoadIcon = exports.GridKeyboardArrowRight = exports.GridKeyboardArrowLeft = exports.GridFilterListIcon = exports.GridFilterAltIcon = exports.GridExpandMoreIcon = exports.GridDragIcon = exports.GridDeleteIcon = exports.GridDeleteForeverIcon = exports.GridColumnIcon = exports.GridCloseIcon = exports.GridClearIcon = exports.GridCheckIcon = exports.GridCheckCircleIcon = exports.GridArrowUpwardIcon = exports.GridArrowDownwardIcon = exports.GridAddIcon = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var React = _interopRequireWildcard(require("react"));
var _SvgIcon = _interopRequireDefault(require("@mui/joy/SvgIcon"));
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
var _jsxRuntime = require("react/jsx-runtime");
const _excluded = ["sx", "fontSize"],
_excluded2 = ["sortingOrder"];
/**
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT).
* All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
* provided that the above copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
* FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function createSvgIcon(path, displayName) {
const fontSizeMap = {
small: 'lg',
medium: 'xl',
large: 'xl2',
inherit: undefined
};
// @ts-ignore internal component
function Component(_ref, ref) {
let {
sx,
fontSize
} = _ref,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgIcon.default, (0, _extends2.default)({
"data-testid": `${displayName}Icon`,
ref: ref,
fill: "none",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round",
sx: [{
fill: 'none'
}, ...(Array.isArray(sx) ? sx : [sx])],
fontSize: fontSize ? fontSizeMap[fontSize] : undefined
}, props, {
children: path
}));
}
if (process.env.NODE_ENV !== 'production') {
// Need to set `displayName` on the inner component for React.memo.
// React prior to 16.14 ignores `displayName` on the wrapper.
Component.displayName = `${displayName}Icon`;
}
// @ts-ignore internal component
Component.muiName = _SvgIcon.default.muiName;
// @ts-ignore internal component
return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
}
const GridArrowUpwardIcon = exports.GridArrowUpwardIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "12",
x2: "12",
y1: "19",
y2: "5"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "5 12 12 5 19 12"
})]
}), 'ArrowUpward');
const GridArrowDownwardIcon = exports.GridArrowDownwardIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "12",
x2: "12",
y1: "5",
y2: "19"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "19 12 12 19 5 12"
})]
}), 'ArrowDownward');
const GridKeyboardArrowLeft = exports.GridKeyboardArrowLeft = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "15 18 9 12 15 6"
}), 'KeyboardArrowLeft');
const GridKeyboardArrowRight = exports.GridKeyboardArrowRight = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "9 18 15 12 9 6"
}), 'KeyboardArrowRight');
const GridExpandMoreIcon = exports.GridExpandMoreIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "m7 15 5 5 5-5"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "m7 9 5-5 5 5"
})]
}), 'ExpandMore');
const GridFilterListIcon = exports.GridFilterListIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", {
points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"
}), 'FilterList');
const GridFilterAltIcon = exports.GridFilterAltIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M3 6h18"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M7 12h10"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M10 18h4"
})]
}), 'FilterAlt');
const GridSearchIcon = exports.GridSearchIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "11",
cy: "11",
r: "8"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "21",
x2: "16.65",
y1: "21",
y2: "16.65"
})]
}), 'Search');
const GridMenuIcon = exports.GridMenuIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
width: "18",
height: "18",
x: "3",
y: "3",
rx: "2"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M7 8h10"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M7 12h10"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M7 16h10"
})]
}), 'Menu');
const GridCheckCircleIcon = exports.GridCheckCircleIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M22 11.08V12a10 10 0 1 1-5.93-9.14"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "22 4 12 14.01 9 11.01"
})]
}), 'CheckCircle');
const GridColumnIcon = exports.GridColumnIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
width: "18",
height: "18",
x: "3",
y: "3",
rx: "2",
ry: "2"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "12",
x2: "12",
y1: "3",
y2: "21"
})]
}), 'ColumnIcon');
const GridSeparatorIcon = exports.GridSeparatorIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M11 19V5h2v14z"
}), 'Separator');
const GridViewHeadlineIcon = exports.GridViewHeadlineIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
fill: "none",
stroke: "currentColor",
strokeWidth: "1.5",
d: "M3 12h18M3 12v4.5M3 12V7.5M21 12v4.5m0-4.5V7.5m-18 9v3.9a.6.6 0 0 0 .6.6h16.8a.6.6 0 0 0 .6-.6v-3.9m-18 0h18m0-9V3.6a.6.6 0 0 0-.6-.6H3.6a.6.6 0 0 0-.6.6v3.9m18 0H3"
}), 'ViewHeadline');
const GridTableRowsIcon = exports.GridTableRowsIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
fill: "currentColor",
strokeWidth: "0",
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h14zm0 5v4H5v-4h14zM5 19v-3h14v3H5z"
}), 'TableRows');
const GridViewStreamIcon = exports.GridViewStreamIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm0 6h16"
}), 'ViewStream');
const GridTripleDotsVerticalIcon = exports.GridTripleDotsVerticalIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "12",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "5",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "19",
r: "1"
})]
}), 'TripleDotsVertical');
const GridCloseIcon = exports.GridCloseIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "12",
r: "10"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "15",
x2: "9",
y1: "9",
y2: "15"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "9",
x2: "15",
y1: "9",
y2: "15"
})]
}), 'Close');
const GridAddIcon = exports.GridAddIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "12",
r: "10"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "12",
x2: "12",
y1: "8",
y2: "16"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "8",
x2: "16",
y1: "12",
y2: "12"
})]
}), 'Add');
const GridRemoveIcon = exports.GridRemoveIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "12",
r: "10"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "15",
x2: "9",
y1: "9",
y2: "15"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "9",
x2: "15",
y1: "9",
y2: "15"
})]
}), 'Remove');
const GridLoadIcon = exports.GridLoadIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "7 10 12 15 17 10"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "12",
x2: "12",
y1: "15",
y2: "3"
})]
}), 'Load');
const GridDragIcon = exports.GridDragIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "9",
cy: "12",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "9",
cy: "5",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "9",
cy: "19",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "15",
cy: "12",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "15",
cy: "5",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "15",
cy: "19",
r: "1"
})]
}), 'Drag');
const GridSaveAltIcon = exports.GridSaveAltIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "14 2 14 8 20 8"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 12v6"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "m15 15-3-3-3 3"
})]
}), 'SaveAlt');
const GridCheckIcon = exports.GridCheckIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
points: "20 6 9 17 4 12"
}), 'Check');
const GridMoreVertIcon = exports.GridMoreVertIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "12",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "5",
r: "1"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
cx: "12",
cy: "19",
r: "1"
})]
}), 'MoreVert');
const GridVisibilityOffIcon = exports.GridVisibilityOffIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M9.88 9.88a3 3 0 1 0 4.24 4.24"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "2",
x2: "22",
y1: "2",
y2: "22"
})]
}), 'VisibilityOff');
const GridViewColumnIcon = exports.GridViewColumnIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
width: "6",
height: "20",
x: "4",
y: "2",
rx: "2"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
width: "6",
height: "20",
x: "14",
y: "2",
rx: "2"
})]
}), 'ViewColumn');
const GridClearIcon = exports.GridClearIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M22 21H7"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "m5 11 9 9"
})]
}), 'Clear');
const GridDeleteIcon = exports.GridDeleteIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M3 6h18"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "10",
x2: "10",
y1: "11",
y2: "17"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "14",
x2: "14",
y1: "11",
y2: "17"
})]
}), 'Delete');
const GridDeleteForeverIcon = exports.GridDeleteForeverIcon = createSvgIcon( /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M3 6h18"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "10",
x2: "10",
y1: "11",
y2: "17"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
x1: "14",
x2: "14",
y1: "11",
y2: "17"
})]
}), 'Delete');
const GridColumnUnsortedIcon = /*#__PURE__*/React.memo(function GridColumnHeaderSortIcon(props) {
const {
sortingOrder
} = props,
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
const rootProps = (0, _useGridRootProps.useGridRootProps)();
const [nextSortDirection] = sortingOrder;
const Icon = nextSortDirection === 'asc' ? rootProps.slots.columnSortedAscendingIcon : rootProps.slots.columnSortedDescendingIcon;
return Icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, (0, _extends2.default)({}, other)) : null;
});
const joyIconSlots = {
booleanCellTrueIcon: GridCheckIcon,
booleanCellFalseIcon: GridCloseIcon,
columnMenuIcon: GridTripleDotsVerticalIcon,
openFilterButtonIcon: GridFilterListIcon,
filterPanelDeleteIcon: GridCloseIcon,
columnFilteredIcon: GridFilterAltIcon,
columnSelectorIcon: GridColumnIcon,
columnUnsortedIcon: GridColumnUnsortedIcon,
columnSortedAscendingIcon: GridArrowUpwardIcon,
columnSortedDescendingIcon: GridArrowDownwardIcon,
columnResizeIcon: GridSeparatorIcon,
densityCompactIcon: GridViewHeadlineIcon,
densityStandardIcon: GridTableRowsIcon,
densityComfortableIcon: GridViewStreamIcon,
exportIcon: GridSaveAltIcon,
moreActionsIcon: GridMoreVertIcon,
treeDataCollapseIcon: GridExpandMoreIcon,
treeDataExpandIcon: GridKeyboardArrowRight,
groupingCriteriaCollapseIcon: GridExpandMoreIcon,
groupingCriteriaExpandIcon: GridKeyboardArrowRight,
detailPanelExpandIcon: GridAddIcon,
detailPanelCollapseIcon: GridRemoveIcon,
rowReorderIcon: GridDragIcon,
quickFilterIcon: GridSearchIcon,
quickFilterClearIcon: GridCloseIcon,
columnMenuHideIcon: GridVisibilityOffIcon,
columnMenuSortAscendingIcon: GridArrowUpwardIcon,
columnMenuSortDescendingIcon: GridArrowDownwardIcon,
columnMenuFilterIcon: GridFilterAltIcon,
columnMenuManageColumnsIcon: GridViewColumnIcon,
columnMenuClearIcon: GridClearIcon,
loadIcon: GridLoadIcon,
filterPanelAddIcon: GridAddIcon,
filterPanelRemoveAllIcon: GridDeleteForeverIcon,
columnReorderIcon: GridDragIcon
};
var _default = exports.default = joyIconSlots;

View File

@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "unstable_joySlots", {
enumerable: true,
get: function () {
return _joySlots.default;
}
});
var _joySlots = _interopRequireDefault(require("./joySlots"));

View File

@@ -0,0 +1,414 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var React = _interopRequireWildcard(require("react"));
var _Checkbox = _interopRequireDefault(require("@mui/joy/Checkbox"));
var _Input = _interopRequireDefault(require("@mui/joy/Input"));
var _FormControl = _interopRequireDefault(require("@mui/joy/FormControl"));
var _FormLabel = _interopRequireDefault(require("@mui/joy/FormLabel"));
var _Button = _interopRequireDefault(require("@mui/joy/Button"));
var _IconButton = _interopRequireDefault(require("@mui/joy/IconButton"));
var _Switch = _interopRequireDefault(require("@mui/joy/Switch"));
var _Select = _interopRequireDefault(require("@mui/joy/Select"));
var _Option = _interopRequireDefault(require("@mui/joy/Option"));
var _Box = _interopRequireDefault(require("@mui/joy/Box"));
var _Typography = _interopRequireDefault(require("@mui/joy/Typography"));
var _CircularProgress = _interopRequireDefault(require("@mui/joy/CircularProgress"));
var _Tooltip = _interopRequireDefault(require("@mui/joy/Tooltip"));
var _utils = require("@mui/utils");
var _icons = _interopRequireWildcard(require("./icons"));
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
var _hooks = require("../hooks");
var _GridOverlay = require("../components/containers/GridOverlay");
var _jsxRuntime = require("react/jsx-runtime");
const _excluded = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"],
_excluded2 = ["onChange", "label", "placeholder", "value", "inputRef", "type", "size", "variant"],
_excluded3 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
_excluded4 = ["color", "size", "sx", "touchRippleRef"],
_excluded5 = ["name", "checkedIcon", "color", "disableRipple", "disableFocusRipple", "disableTouchRipple", "edge", "icon", "inputProps", "inputRef", "size", "sx", "onChange", "onClick"],
_excluded6 = ["open", "onOpen", "value", "onChange", "size", "color", "variant", "inputProps", "MenuProps", "inputRef", "error", "native", "fullWidth", "labelId"],
_excluded7 = ["native"],
_excluded8 = ["shrink", "variant", "sx"];
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function convertColor(color) {
if (color === 'secondary') {
return 'primary';
}
if (color === 'error') {
return 'danger';
}
if (color === 'default' || color === 'inherit') {
return 'neutral';
}
return color;
}
function convertSize(size) {
return size ? {
small: 'sm',
medium: 'md',
large: 'lg'
}[size] : size;
}
function convertVariant(variant, defaultVariant = 'plain') {
if (!variant) {
return defaultVariant;
}
return {
standard: 'outlined',
outlined: 'outlined',
contained: 'solid',
text: 'plain',
filled: 'soft'
}[variant] || defaultVariant;
}
const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
let {
inputProps,
onChange,
checked,
inputRef
} = _ref,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, (0, _extends2.default)({}, props, {
slotProps: {
input: (0, _extends2.default)({}, inputProps, {
ref: inputRef
})
},
ref: ref,
checked: checked,
onChange: onChange
}));
});
const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
let {
onChange,
label,
placeholder,
value,
inputRef,
type,
size,
variant
} = _ref2,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded2);
const rootRef = (0, _utils.unstable_useForkRef)(ref, props.InputProps?.ref);
const inputForkRef = (0, _utils.unstable_useForkRef)(inputRef, props?.inputProps?.ref);
const {
startAdornment,
endAdornment
} = props.InputProps || {};
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
ref: rootRef,
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FormLabel.default, {
children: label
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {
type: type,
value: value,
onChange: onChange,
placeholder: placeholder,
variant: convertVariant(variant, 'outlined'),
size: convertSize(size),
slotProps: {
input: (0, _extends2.default)({}, props?.inputProps, {
ref: inputForkRef
})
},
startDecorator: startAdornment,
endDecorator: endAdornment
})]
});
});
const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
let {
startIcon,
color,
endIcon,
size,
sx,
variant
} = _ref3,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded3);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, (0, _extends2.default)({}, props, {
size: convertSize(size),
color: convertColor(color),
variant: convertVariant(variant),
ref: ref,
startDecorator: startIcon,
endDecorator: endIcon,
sx: sx
}));
});
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref4, ref) {
let {
color,
size,
sx
} = _ref4,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref4, _excluded4);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, (0, _extends2.default)({}, props, {
size: convertSize(size),
color: convertColor(color) ?? 'neutral',
variant: "plain",
ref: ref,
sx: sx
}));
});
const Switch = /*#__PURE__*/React.forwardRef(function Switch(_ref5, ref) {
let {
name,
color: colorProp,
edge,
icon,
inputProps,
inputRef,
size,
sx,
onChange,
onClick
} = _ref5,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref5, _excluded5);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, (0, _extends2.default)({}, props, {
onChange: onChange,
size: convertSize(size),
color: convertColor(colorProp),
ref: ref,
slotProps: {
input: (0, _extends2.default)({}, inputProps, {
name,
onClick: onClick,
ref: inputRef
}),
thumb: {
children: icon
}
},
sx: [(0, _extends2.default)({}, edge === 'start' && {
ml: '-8px'
}, edge === 'end' && {
mr: '-8px'
}), ...(Array.isArray(sx) ? sx : [sx])]
}));
});
const Select = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
let {
open,
onOpen,
value,
onChange,
size,
color,
variant,
MenuProps,
inputRef,
labelId
} = _ref6,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref6, _excluded6);
const handleChange = (event, newValue) => {
if (event && onChange) {
// Same as in https://github.com/mui/material-ui/blob/e5558282a8f36856aef1299f3a36f3235e92e770/packages/mui-material/src/Select/SelectInput.js#L288-L300
// Redefine target to allow name and value to be read.
// This allows seamless integration with the most popular form libraries.
// https://github.com/mui/material-ui/issues/13485#issuecomment-676048492
// Clone the event to not override `target` of the original event.
const nativeEvent = event.nativeEvent || event;
// @ts-ignore The nativeEvent is function, not object
const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
Object.defineProperty(clonedEvent, 'target', {
writable: true,
value: {
value: newValue,
name: props.name
}
});
onChange(clonedEvent, null);
}
};
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, (0, _extends2.default)({}, props, {
listboxOpen: open,
onListboxOpenChange: isOpen => {
if (isOpen) {
onOpen?.({});
} else {
MenuProps?.onClose?.({}, undefined);
}
},
size: convertSize(size),
color: convertColor(color),
variant: convertVariant(variant, 'outlined'),
ref: ref,
value: value,
onChange: handleChange,
slotProps: {
button: {
'aria-labelledby': labelId,
ref: inputRef
},
listbox: {
disablePortal: false,
sx: {
zIndex: 1350
}
}
}
}));
});
const Option = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
let props = (0, _objectWithoutPropertiesLoose2.default)(_ref7, _excluded7);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Option.default, (0, _extends2.default)({}, props, {
ref: ref
}));
});
const InputLabel = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
let {
sx
} = _ref8,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref8, _excluded8);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormLabel.default, (0, _extends2.default)({}, props, {
ref: ref,
sx: sx
}));
});
function labelDisplayedRows({
from,
to,
count
}) {
return `${from}${to} of ${count !== -1 ? count : `more than ${to}`}`;
}
const getLabelDisplayedRowsTo = ({
page,
pageSize,
rowCount
}) => {
if (rowCount === -1) {
return (page + 1) * pageSize;
}
return pageSize === -1 ? rowCount : Math.min(rowCount, (page + 1) * pageSize);
};
const Pagination = /*#__PURE__*/React.forwardRef((props, ref) => {
const apiRef = (0, _useGridApiContext.useGridApiContext)();
const rootProps = (0, _useGridRootProps.useGridRootProps)();
const paginationModel = (0, _hooks.gridPaginationModelSelector)(apiRef);
const visibleTopLevelRowCount = (0, _hooks.gridFilteredTopLevelRowCountSelector)(apiRef);
const rowCount = React.useMemo(() => rootProps.rowCount ?? visibleTopLevelRowCount ?? 0, [rootProps.rowCount, visibleTopLevelRowCount]);
const lastPage = React.useMemo(() => Math.floor(rowCount / (paginationModel.pageSize || 1)), [rowCount, paginationModel.pageSize]);
const handlePageChange = React.useCallback(page => {
apiRef.current.setPage(page);
}, [apiRef]);
const page = paginationModel.page <= lastPage ? paginationModel.page : lastPage;
const pageSize = paginationModel.pageSize;
const isPageSizeIncludedInPageSizeOptions = () => {
for (let i = 0; i < rootProps.pageSizeOptions.length; i += 1) {
const option = rootProps.pageSizeOptions[i];
if (typeof option === 'number') {
if (option === pageSize) {
return true;
}
} else if (option.value === pageSize) {
return true;
}
}
return false;
};
const pageSizeOptions = isPageSizeIncludedInPageSizeOptions() ? rootProps.pageSizeOptions : [];
const handleChangeRowsPerPage = (event, newValue) => {
const newPageSize = Number(newValue);
apiRef.current.setPageSize(newPageSize);
};
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
sx: {
display: 'flex',
alignItems: 'center',
gap: 2,
justifyContent: 'flex-end',
px: 2
},
ref: ref,
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
orientation: "horizontal",
size: "sm",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FormLabel.default, {
children: "Rows per page:"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, {
onChange: handleChangeRowsPerPage,
value: pageSize,
children: pageSizeOptions.map(option => {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Option, {
value: typeof option !== 'number' && option.value ? option.value : option,
children: typeof option !== 'number' && option.label ? option.label : `${option}`
}, typeof option !== 'number' && option.label ? option.label : `${option}`);
})
})]
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
textAlign: "center",
fontSize: "xs",
fontWeight: "md",
children: labelDisplayedRows({
from: rowCount === 0 ? 0 : page * pageSize + 1,
to: getLabelDisplayedRowsTo({
page,
pageSize,
rowCount
}),
count: rowCount === -1 ? -1 : rowCount
})
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
sx: {
display: 'flex',
gap: 0.5
},
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
size: "sm",
color: "neutral",
variant: "outlined",
disabled: page === 0,
onClick: () => handlePageChange(page - 1),
sx: {
bgcolor: 'background.surface'
},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.GridKeyboardArrowLeft, {})
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
size: "sm",
color: "neutral",
variant: "outlined",
disabled: rowCount !== -1 ? page >= Math.ceil(rowCount / pageSize) - 1 : false,
onClick: () => handlePageChange(page + 1),
sx: {
bgcolor: 'background.surface'
},
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.GridKeyboardArrowRight, {})
})]
})]
});
});
const LoadingOverlay = /*#__PURE__*/React.forwardRef((props, ref) => {
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridOverlay.GridOverlay, (0, _extends2.default)({}, props, {
ref: ref,
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {})
}));
});
const joySlots = (0, _extends2.default)({}, _icons.default, {
baseCheckbox: Checkbox,
baseTextField: TextField,
baseButton: Button,
baseIconButton: IconButton,
baseSwitch: Switch,
baseSelect: Select,
baseSelectOption: Option,
baseInputLabel: InputLabel,
baseFormControl: _FormControl.default,
baseTooltip: _Tooltip.default,
pagination: Pagination,
loadingOverlay: LoadingOverlay
});
var _default = exports.default = joySlots;