@ceed/ads 1.9.0 → 1.10.0
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/dist/components/DataTable/components.d.ts +38 -0
- package/dist/components/DataTable/hooks.d.ts +56 -0
- package/dist/components/DataTable/styled.d.ts +281 -0
- package/dist/components/DataTable/types.d.ts +13 -3
- package/dist/components/DataTable/utils.d.ts +16 -0
- package/dist/index.cjs +1266 -1229
- package/dist/index.js +882 -841
- package/framer/index.js +42 -42
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
stepperClasses,
|
|
148
148
|
Skeleton as Skeleton2,
|
|
149
149
|
skeletonClasses,
|
|
150
|
-
styled as
|
|
150
|
+
styled as styled30
|
|
151
151
|
} from "@mui/joy";
|
|
152
152
|
|
|
153
153
|
// src/components/Accordions/Accordions.tsx
|
|
@@ -1836,117 +1836,301 @@ var CurrencyInput = React15.forwardRef(function CurrencyInput2(inProps, ref) {
|
|
|
1836
1836
|
var CurrencyInput_default = CurrencyInput;
|
|
1837
1837
|
|
|
1838
1838
|
// src/components/DataTable/DataTable.tsx
|
|
1839
|
-
import
|
|
1840
|
-
useCallback as
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
useRef as useRef4,
|
|
1844
|
-
useState as useState6,
|
|
1839
|
+
import React25, {
|
|
1840
|
+
useCallback as useCallback11,
|
|
1841
|
+
useMemo as useMemo10,
|
|
1842
|
+
useRef as useRef6,
|
|
1845
1843
|
useId,
|
|
1846
1844
|
forwardRef as forwardRef7,
|
|
1847
1845
|
useImperativeHandle as useImperativeHandle2,
|
|
1848
|
-
createElement,
|
|
1849
|
-
memo,
|
|
1850
|
-
useLayoutEffect,
|
|
1851
1846
|
Fragment as Fragment2
|
|
1852
1847
|
} from "react";
|
|
1853
1848
|
import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
1854
|
-
import { styled as styled12, LinearProgress, Link, useTheme, buttonClasses, iconButtonClasses } from "@mui/joy";
|
|
1855
|
-
import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
|
|
1856
|
-
|
|
1857
|
-
// src/components/Sheet/Sheet.tsx
|
|
1858
|
-
import { Sheet as JoySheet } from "@mui/joy";
|
|
1859
|
-
import { motion as motion16 } from "framer-motion";
|
|
1860
|
-
var MotionSheet = motion16(JoySheet);
|
|
1861
|
-
var Sheet = MotionSheet;
|
|
1862
|
-
Sheet.displayName = "Sheet";
|
|
1863
|
-
|
|
1864
|
-
// src/components/Sheet/index.ts
|
|
1865
|
-
var Sheet_default = Sheet;
|
|
1866
1849
|
|
|
1867
|
-
// src/components/
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
1881
|
-
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
1882
|
-
} = props;
|
|
1883
|
-
return /* @__PURE__ */ React16.createElement("thead", null, /* @__PURE__ */ React16.createElement("tr", null, showCheckbox && /* @__PURE__ */ React16.createElement(
|
|
1884
|
-
"th",
|
|
1885
|
-
{
|
|
1886
|
-
style: {
|
|
1887
|
-
width: "40px",
|
|
1888
|
-
textAlign: "center"
|
|
1889
|
-
}
|
|
1890
|
-
},
|
|
1891
|
-
/* @__PURE__ */ React16.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
1892
|
-
), headCells.map((headCell) => /* @__PURE__ */ React16.createElement(
|
|
1893
|
-
"th",
|
|
1894
|
-
{
|
|
1895
|
-
key: headCell.label,
|
|
1896
|
-
style: {
|
|
1897
|
-
width: headCell.width,
|
|
1898
|
-
minWidth: headCell.minWidth,
|
|
1899
|
-
maxWidth: headCell.maxWidth,
|
|
1900
|
-
textAlign: headCell.numeric ? "right" : "left"
|
|
1901
|
-
}
|
|
1902
|
-
},
|
|
1903
|
-
headCell.label
|
|
1904
|
-
))));
|
|
1850
|
+
// src/components/DataTable/utils.ts
|
|
1851
|
+
function extractFieldsFromGroupingModel(items) {
|
|
1852
|
+
const fields = /* @__PURE__ */ new Set();
|
|
1853
|
+
for (const item of items) {
|
|
1854
|
+
if ("groupId" in item) {
|
|
1855
|
+
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
1856
|
+
const childFields = extractFieldsFromGroupingModel(children);
|
|
1857
|
+
childFields.forEach((field) => fields.add(field));
|
|
1858
|
+
} else {
|
|
1859
|
+
fields.add(item.field);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
return fields;
|
|
1905
1863
|
}
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
"td",
|
|
1919
|
-
{
|
|
1920
|
-
style: {
|
|
1921
|
-
textAlign: "center"
|
|
1864
|
+
function reorderColumnsByGroupingModel(columns, columnGroupingModel) {
|
|
1865
|
+
const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
|
|
1866
|
+
const orderedFields = [];
|
|
1867
|
+
function collectFieldsInOrder(items) {
|
|
1868
|
+
for (const item of items) {
|
|
1869
|
+
if ("groupId" in item) {
|
|
1870
|
+
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
1871
|
+
collectFieldsInOrder(children);
|
|
1872
|
+
} else {
|
|
1873
|
+
if (!orderedFields.includes(item.field)) {
|
|
1874
|
+
orderedFields.push(item.field);
|
|
1875
|
+
}
|
|
1922
1876
|
}
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
collectFieldsInOrder(columnGroupingModel);
|
|
1880
|
+
const columnMap = new Map(columns.map((col) => [col.field, col]));
|
|
1881
|
+
const reorderedColumns = [];
|
|
1882
|
+
for (const field of orderedFields) {
|
|
1883
|
+
const column = columnMap.get(field);
|
|
1884
|
+
if (column) {
|
|
1885
|
+
reorderedColumns.push(column);
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
for (const column of columns) {
|
|
1889
|
+
if (!fieldsInGroupingModel.has(column.field)) {
|
|
1890
|
+
reorderedColumns.push(column);
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
return reorderedColumns;
|
|
1894
|
+
}
|
|
1895
|
+
function flattenColumnGroups(items, groupPath = [], columnIndex = { current: 0 }) {
|
|
1896
|
+
const result = [];
|
|
1897
|
+
for (const item of items) {
|
|
1898
|
+
if ("groupId" in item) {
|
|
1899
|
+
const newPath = [...groupPath, item.groupId];
|
|
1900
|
+
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
1901
|
+
result.push(...flattenColumnGroups(children, newPath, columnIndex));
|
|
1902
|
+
} else {
|
|
1903
|
+
result.push({
|
|
1904
|
+
...item,
|
|
1905
|
+
groupPath,
|
|
1906
|
+
columnIndex: columnIndex.current++
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
return result;
|
|
1911
|
+
}
|
|
1912
|
+
function calculateColumnGroups(columnGroupingModel, columns) {
|
|
1913
|
+
const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
|
|
1914
|
+
const flattenedColumns = flattenColumnGroups(columnGroupingModel);
|
|
1915
|
+
const columnIndexMap = new Map(flattenedColumns.map((col) => [col.field, col.columnIndex]));
|
|
1916
|
+
const processedGroups = /* @__PURE__ */ new Map();
|
|
1917
|
+
const groupsByLevel = [];
|
|
1918
|
+
let maxLevel = 0;
|
|
1919
|
+
function processGroup(items, level, parentGroupId) {
|
|
1920
|
+
let minIndex = Infinity;
|
|
1921
|
+
let maxIndex = -Infinity;
|
|
1922
|
+
for (const item of items) {
|
|
1923
|
+
if ("groupId" in item) {
|
|
1924
|
+
const groupKey = parentGroupId ? `${parentGroupId}.${item.groupId}` : item.groupId;
|
|
1925
|
+
if (!processedGroups.has(groupKey)) {
|
|
1926
|
+
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
1927
|
+
const { startIndex, colspan } = processGroup(children, level + 1, groupKey);
|
|
1928
|
+
const group = {
|
|
1929
|
+
groupId: item.groupId,
|
|
1930
|
+
headerName: item.headerName,
|
|
1931
|
+
headerClassName: item.headerClassName,
|
|
1932
|
+
colspan,
|
|
1933
|
+
level,
|
|
1934
|
+
startIndex
|
|
1935
|
+
};
|
|
1936
|
+
processedGroups.set(groupKey, group);
|
|
1937
|
+
if (!groupsByLevel[level]) {
|
|
1938
|
+
groupsByLevel[level] = [];
|
|
1939
|
+
}
|
|
1940
|
+
groupsByLevel[level].push(group);
|
|
1941
|
+
maxLevel = Math.max(maxLevel, level);
|
|
1942
|
+
minIndex = Math.min(minIndex, startIndex);
|
|
1943
|
+
maxIndex = Math.max(maxIndex, startIndex + colspan - 1);
|
|
1944
|
+
}
|
|
1945
|
+
} else {
|
|
1946
|
+
const columnIndex = columnIndexMap.get(item.field);
|
|
1947
|
+
if (columnIndex !== void 0) {
|
|
1948
|
+
minIndex = Math.min(minIndex, columnIndex);
|
|
1949
|
+
maxIndex = Math.max(maxIndex, columnIndex);
|
|
1950
|
+
}
|
|
1931
1951
|
}
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
|
|
1952
|
+
}
|
|
1953
|
+
return {
|
|
1954
|
+
startIndex: minIndex === Infinity ? 0 : minIndex,
|
|
1955
|
+
colspan: maxIndex === -Infinity ? 0 : maxIndex - minIndex + 1
|
|
1956
|
+
};
|
|
1957
|
+
}
|
|
1958
|
+
processGroup(columnGroupingModel, 0);
|
|
1959
|
+
groupsByLevel.forEach((level) => {
|
|
1960
|
+
level.sort((a, b) => a.startIndex - b.startIndex);
|
|
1961
|
+
});
|
|
1962
|
+
return { groups: groupsByLevel, maxLevel, fieldsInGroupingModel };
|
|
1935
1963
|
}
|
|
1936
|
-
|
|
1964
|
+
function getTextAlign(props) {
|
|
1965
|
+
return !props.editMode && ["number", "date", "currency"].includes(props.type || "") ? "end" : "start";
|
|
1966
|
+
}
|
|
1967
|
+
var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
|
|
1968
|
+
|
|
1969
|
+
// src/components/DataTable/styled.tsx
|
|
1970
|
+
import React16 from "react";
|
|
1971
|
+
import { styled as styled8, LinearProgress, buttonClasses, iconButtonClasses } from "@mui/joy";
|
|
1972
|
+
import { motion as motion16 } from "framer-motion";
|
|
1973
|
+
import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
|
|
1974
|
+
var EllipsisDiv = styled8("div", {
|
|
1975
|
+
name: "DataTable",
|
|
1976
|
+
slot: "textEllipsis"
|
|
1977
|
+
})({
|
|
1978
|
+
overflow: "hidden",
|
|
1979
|
+
textOverflow: "ellipsis",
|
|
1980
|
+
whiteSpace: "nowrap"
|
|
1981
|
+
});
|
|
1982
|
+
var OverlayWrapper = styled8("tr", {
|
|
1983
|
+
name: "DataTable",
|
|
1984
|
+
slot: "overlayWrapper"
|
|
1985
|
+
})({
|
|
1986
|
+
position: "sticky",
|
|
1987
|
+
top: `calc(var(--unstable_TableCell-height, 32px))`,
|
|
1988
|
+
left: 0,
|
|
1989
|
+
right: 0,
|
|
1990
|
+
zIndex: 1,
|
|
1991
|
+
"& > td": {
|
|
1992
|
+
height: 0,
|
|
1993
|
+
padding: 0,
|
|
1994
|
+
border: "none !important"
|
|
1995
|
+
}
|
|
1996
|
+
});
|
|
1997
|
+
var VirtualizedTableBody = styled8("tbody", {
|
|
1998
|
+
name: "DataTable",
|
|
1999
|
+
slot: "tableBody"
|
|
2000
|
+
})({
|
|
2001
|
+
"&::after": {
|
|
2002
|
+
content: "''",
|
|
2003
|
+
display: "block",
|
|
2004
|
+
height: "0.01em"
|
|
2005
|
+
},
|
|
2006
|
+
[`& .${buttonClasses.root}`]: {
|
|
2007
|
+
"--Button-minHeight": "26px",
|
|
2008
|
+
"--Button-paddingBlock": "0.25rem",
|
|
2009
|
+
lineHeight: 1,
|
|
2010
|
+
marginTop: "-2px",
|
|
2011
|
+
marginBottom: "-2px"
|
|
2012
|
+
},
|
|
2013
|
+
[`& .${iconButtonClasses.root}`]: {
|
|
2014
|
+
"--IconButton-size": "26px",
|
|
2015
|
+
verticalAlign: "middle",
|
|
2016
|
+
marginTop: "-2px",
|
|
2017
|
+
marginBottom: "-2px"
|
|
2018
|
+
}
|
|
2019
|
+
});
|
|
2020
|
+
var StyledTableRow = styled8("tr", {
|
|
2021
|
+
name: "DataTable",
|
|
2022
|
+
slot: "tableRow",
|
|
2023
|
+
shouldForwardProp: (prop) => prop !== "striped"
|
|
2024
|
+
})(({ striped }) => ({
|
|
2025
|
+
...striped && {
|
|
2026
|
+
backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
|
|
2027
|
+
color: "var(--ceed-palette-text-primary)",
|
|
2028
|
+
"& td": {
|
|
2029
|
+
backgroundColor: "background.surface"
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
"&:hover": {
|
|
2033
|
+
backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
|
|
2034
|
+
"& td": {
|
|
2035
|
+
backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
}));
|
|
2039
|
+
var Asterisk = styled8("span", {
|
|
2040
|
+
name: "DataTable",
|
|
2041
|
+
slot: "headCellAsterisk"
|
|
2042
|
+
})(({ theme }) => ({
|
|
2043
|
+
color: "var(--ceed-palette-danger-500)",
|
|
2044
|
+
marginLeft: theme.spacing(0.5)
|
|
2045
|
+
}));
|
|
2046
|
+
var StyledTh = styled8(motion16.th)(({ theme }) => ({
|
|
2047
|
+
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
2048
|
+
}));
|
|
2049
|
+
var StyledTd = styled8("td")(({ theme }) => ({
|
|
2050
|
+
transition: `box-shadow 0.3s`,
|
|
2051
|
+
"&:not(.is-last-left):not(.is-last-right)": {
|
|
2052
|
+
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
2053
|
+
},
|
|
2054
|
+
".ScrollableRight &": {
|
|
2055
|
+
"&.is-last-left": {
|
|
2056
|
+
boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
".ScrollableLeft &": {
|
|
2060
|
+
"&.is-last-right": {
|
|
2061
|
+
boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
}));
|
|
2065
|
+
var MotionSortIcon = motion16(SortIcon);
|
|
2066
|
+
var DefaultLoadingOverlay = () => /* @__PURE__ */ React16.createElement(LinearProgress, { value: 8, variant: "plain" });
|
|
2067
|
+
var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React16.createElement(
|
|
2068
|
+
Box_default,
|
|
2069
|
+
{
|
|
2070
|
+
sx: {
|
|
2071
|
+
position: "absolute",
|
|
2072
|
+
top: 0,
|
|
2073
|
+
right: 0,
|
|
2074
|
+
bottom: 0,
|
|
2075
|
+
width: "4px",
|
|
2076
|
+
cursor: "col-resize"
|
|
2077
|
+
},
|
|
2078
|
+
onClick: (e) => e.stopPropagation(),
|
|
2079
|
+
onMouseDown: (e) => {
|
|
2080
|
+
const initialX = e.clientX;
|
|
2081
|
+
const initialWidth = ref.current?.getBoundingClientRect().width;
|
|
2082
|
+
const onMouseMove = (e2) => {
|
|
2083
|
+
if (initialWidth && initialX) {
|
|
2084
|
+
ref.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
|
|
2085
|
+
targetRef.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
|
|
2086
|
+
}
|
|
2087
|
+
};
|
|
2088
|
+
const onMouseUp = () => {
|
|
2089
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
2090
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
2091
|
+
};
|
|
2092
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
2093
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
);
|
|
2097
|
+
|
|
2098
|
+
// src/components/DataTable/components.tsx
|
|
2099
|
+
import React22, {
|
|
2100
|
+
useRef as useRef4,
|
|
2101
|
+
useState as useState6,
|
|
2102
|
+
useLayoutEffect,
|
|
2103
|
+
useMemo as useMemo8,
|
|
2104
|
+
useCallback as useCallback8,
|
|
2105
|
+
useEffect as useEffect4,
|
|
2106
|
+
memo,
|
|
2107
|
+
createElement
|
|
2108
|
+
} from "react";
|
|
2109
|
+
import { styled as styled12, useTheme } from "@mui/joy";
|
|
2110
|
+
import { AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
1937
2111
|
|
|
1938
2112
|
// src/components/DatePicker/DatePicker.tsx
|
|
1939
2113
|
import React17, { forwardRef as forwardRef6, useCallback as useCallback7, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState5 } from "react";
|
|
1940
2114
|
import { IMaskInput, IMask } from "react-imask";
|
|
1941
2115
|
import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
|
|
1942
|
-
import { styled as
|
|
2116
|
+
import { styled as styled10, useThemeProps as useThemeProps4 } from "@mui/joy";
|
|
1943
2117
|
import { FocusTrap, ClickAwayListener, Popper as Popper2 } from "@mui/base";
|
|
1944
2118
|
|
|
1945
|
-
// src/components/
|
|
1946
|
-
import {
|
|
2119
|
+
// src/components/Sheet/Sheet.tsx
|
|
2120
|
+
import { Sheet as JoySheet } from "@mui/joy";
|
|
1947
2121
|
import { motion as motion17 } from "framer-motion";
|
|
1948
|
-
var
|
|
1949
|
-
var
|
|
2122
|
+
var MotionSheet = motion17(JoySheet);
|
|
2123
|
+
var Sheet = MotionSheet;
|
|
2124
|
+
Sheet.displayName = "Sheet";
|
|
2125
|
+
|
|
2126
|
+
// src/components/Sheet/index.ts
|
|
2127
|
+
var Sheet_default = Sheet;
|
|
2128
|
+
|
|
2129
|
+
// src/components/DialogActions/DialogActions.tsx
|
|
2130
|
+
import { DialogActions as JoyDialogActions, styled as styled9 } from "@mui/joy";
|
|
2131
|
+
import { motion as motion18 } from "framer-motion";
|
|
2132
|
+
var MotionDialogActions = motion18(JoyDialogActions);
|
|
2133
|
+
var StyledDialogActions = styled9(MotionDialogActions)(({ theme }) => ({
|
|
1950
2134
|
padding: theme.spacing(2),
|
|
1951
2135
|
gap: theme.spacing(2),
|
|
1952
2136
|
flexDirection: "row",
|
|
@@ -1959,7 +2143,7 @@ DialogActions.displayName = "DialogActions";
|
|
|
1959
2143
|
var DialogActions_default = DialogActions;
|
|
1960
2144
|
|
|
1961
2145
|
// src/components/DatePicker/DatePicker.tsx
|
|
1962
|
-
var CalendarButton =
|
|
2146
|
+
var CalendarButton = styled10(IconButton_default, {
|
|
1963
2147
|
name: "DatePicker",
|
|
1964
2148
|
slot: "calendarButton"
|
|
1965
2149
|
})(({ theme }) => ({
|
|
@@ -1969,13 +2153,13 @@ var CalendarButton = styled9(IconButton_default, {
|
|
|
1969
2153
|
outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
|
|
1970
2154
|
}
|
|
1971
2155
|
}));
|
|
1972
|
-
var StyledPopper =
|
|
2156
|
+
var StyledPopper = styled10(Popper2, {
|
|
1973
2157
|
name: "DatePicker",
|
|
1974
2158
|
slot: "popper"
|
|
1975
2159
|
})(({ theme }) => ({
|
|
1976
2160
|
zIndex: theme.zIndex.tooltip
|
|
1977
2161
|
}));
|
|
1978
|
-
var CalendarSheet =
|
|
2162
|
+
var CalendarSheet = styled10(Sheet_default, {
|
|
1979
2163
|
name: "DatePicker",
|
|
1980
2164
|
slot: "sheet",
|
|
1981
2165
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -1984,7 +2168,7 @@ var CalendarSheet = styled9(Sheet_default, {
|
|
|
1984
2168
|
boxShadow: theme.shadow.md,
|
|
1985
2169
|
borderRadius: theme.radius.md
|
|
1986
2170
|
}));
|
|
1987
|
-
var DatePickerRoot =
|
|
2171
|
+
var DatePickerRoot = styled10("div", {
|
|
1988
2172
|
name: "DatePicker",
|
|
1989
2173
|
slot: "root",
|
|
1990
2174
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -2301,8 +2485,8 @@ var DatePicker_default = DatePicker;
|
|
|
2301
2485
|
// src/components/Textarea/Textarea.tsx
|
|
2302
2486
|
import React18 from "react";
|
|
2303
2487
|
import { Textarea as JoyTextarea } from "@mui/joy";
|
|
2304
|
-
import { motion as
|
|
2305
|
-
var MotionTextarea =
|
|
2488
|
+
import { motion as motion19 } from "framer-motion";
|
|
2489
|
+
var MotionTextarea = motion19(JoyTextarea);
|
|
2306
2490
|
var Textarea = (props) => {
|
|
2307
2491
|
const {
|
|
2308
2492
|
label,
|
|
@@ -2355,8 +2539,8 @@ var Textarea_default = Textarea;
|
|
|
2355
2539
|
// src/components/Select/Select.tsx
|
|
2356
2540
|
import React19, { useMemo as useMemo7 } from "react";
|
|
2357
2541
|
import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
|
|
2358
|
-
import { motion as
|
|
2359
|
-
var MotionOption =
|
|
2542
|
+
import { motion as motion20 } from "framer-motion";
|
|
2543
|
+
var MotionOption = motion20(JoyOption);
|
|
2360
2544
|
var Option = MotionOption;
|
|
2361
2545
|
Option.displayName = "Option";
|
|
2362
2546
|
function Select(props) {
|
|
@@ -2432,11 +2616,14 @@ Select.displayName = "Select";
|
|
|
2432
2616
|
// src/components/Select/index.ts
|
|
2433
2617
|
var Select_default = Select;
|
|
2434
2618
|
|
|
2619
|
+
// src/components/DataTable/components.tsx
|
|
2620
|
+
import { Link } from "@mui/joy";
|
|
2621
|
+
|
|
2435
2622
|
// src/components/Tooltip/Tooltip.tsx
|
|
2436
2623
|
import React20 from "react";
|
|
2437
2624
|
import { Tooltip as JoyTooltip } from "@mui/joy";
|
|
2438
|
-
import { motion as
|
|
2439
|
-
var MotionTooltip =
|
|
2625
|
+
import { motion as motion21 } from "framer-motion";
|
|
2626
|
+
var MotionTooltip = motion21(JoyTooltip);
|
|
2440
2627
|
var Tooltip = (props) => {
|
|
2441
2628
|
return /* @__PURE__ */ React20.createElement(MotionTooltip, { ...props });
|
|
2442
2629
|
};
|
|
@@ -2445,148 +2632,8 @@ Tooltip.displayName = "Tooltip";
|
|
|
2445
2632
|
// src/components/Tooltip/index.ts
|
|
2446
2633
|
var Tooltip_default = Tooltip;
|
|
2447
2634
|
|
|
2448
|
-
// src/components/DataTable/DataTable.tsx
|
|
2449
|
-
import { motion as motion21, AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
2450
|
-
|
|
2451
|
-
// src/components/Pagination/Pagination.tsx
|
|
2452
|
-
import React21, { useCallback as useCallback8, useEffect as useEffect4 } from "react";
|
|
2453
|
-
import PreviousIcon from "@mui/icons-material/ChevronLeft";
|
|
2454
|
-
import NextIcon from "@mui/icons-material/ChevronRight";
|
|
2455
|
-
import { styled as styled10 } from "@mui/joy";
|
|
2456
|
-
var PaginationButton = styled10(Button_default, {
|
|
2457
|
-
name: "Pagination",
|
|
2458
|
-
slot: "button"
|
|
2459
|
-
})(({ theme, active, size }) => ({
|
|
2460
|
-
"--Button-size": {
|
|
2461
|
-
sm: "32px",
|
|
2462
|
-
md: "40px",
|
|
2463
|
-
lg: "48px"
|
|
2464
|
-
}[size],
|
|
2465
|
-
width: "var(--Button-size)",
|
|
2466
|
-
height: "var(--Button-size)",
|
|
2467
|
-
backgroundColor: active ? theme.vars.palette.primary.softHoverBg : "transparent",
|
|
2468
|
-
color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.plainColor,
|
|
2469
|
-
"&:hover": {
|
|
2470
|
-
color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.softColor,
|
|
2471
|
-
backgroundColor: active ? theme.vars.palette.primary.softActiveBg : theme.vars.palette.neutral.softHoverBg
|
|
2472
|
-
}
|
|
2473
|
-
}));
|
|
2474
|
-
var PaginationIconButton = styled10(IconButton_default, {
|
|
2475
|
-
name: "Pagination",
|
|
2476
|
-
slot: "button"
|
|
2477
|
-
})(({ theme, size }) => ({
|
|
2478
|
-
"--IconButton-size": {
|
|
2479
|
-
sm: "32px",
|
|
2480
|
-
md: "40px",
|
|
2481
|
-
lg: "48px"
|
|
2482
|
-
}[size],
|
|
2483
|
-
"--Icon-fontSize": "20px",
|
|
2484
|
-
width: "var(--IconButton-size)",
|
|
2485
|
-
height: "var(--IconButton-size)",
|
|
2486
|
-
color: theme.vars.palette.neutral.plainColor,
|
|
2487
|
-
"&:hover": {
|
|
2488
|
-
color: theme.vars.palette.neutral.softColor,
|
|
2489
|
-
backgroundColor: theme.vars.palette.neutral.softHoverBg
|
|
2490
|
-
}
|
|
2491
|
-
}));
|
|
2492
|
-
var PaginationRoot = styled10(Stack_default, {
|
|
2493
|
-
name: "Pagination",
|
|
2494
|
-
slot: "root"
|
|
2495
|
-
})({});
|
|
2496
|
-
var PaginationContainer = styled10(Stack_default, {
|
|
2497
|
-
name: "Pagination",
|
|
2498
|
-
slot: "container"
|
|
2499
|
-
})(({ theme, size }) => ({
|
|
2500
|
-
gap: {
|
|
2501
|
-
sm: theme.spacing(1),
|
|
2502
|
-
md: theme.spacing(1.5),
|
|
2503
|
-
lg: theme.spacing(2)
|
|
2504
|
-
}[size]
|
|
2505
|
-
}));
|
|
2506
|
-
function Pagination(props) {
|
|
2507
|
-
const {
|
|
2508
|
-
paginationModel: _paginationModel,
|
|
2509
|
-
defaultPaginationModel = { page: 1, pageSize: 25 },
|
|
2510
|
-
onPageChange,
|
|
2511
|
-
rowCount,
|
|
2512
|
-
size = "md",
|
|
2513
|
-
...innerProps
|
|
2514
|
-
} = props;
|
|
2515
|
-
const [paginationModel, setPaginationModel] = useControlledState(
|
|
2516
|
-
_paginationModel,
|
|
2517
|
-
defaultPaginationModel,
|
|
2518
|
-
useCallback8(
|
|
2519
|
-
(newPage) => {
|
|
2520
|
-
onPageChange(newPage.page);
|
|
2521
|
-
},
|
|
2522
|
-
[onPageChange]
|
|
2523
|
-
)
|
|
2524
|
-
);
|
|
2525
|
-
const handlePageChange = (newPage) => {
|
|
2526
|
-
setPaginationModel({ ...paginationModel, page: newPage });
|
|
2527
|
-
};
|
|
2528
|
-
const firstPage = 1;
|
|
2529
|
-
const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
|
|
2530
|
-
const beforePages = [paginationModel.page - 2, paginationModel.page - 1].filter((p) => p > 1);
|
|
2531
|
-
const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
|
|
2532
|
-
const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
|
|
2533
|
-
const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
|
|
2534
|
-
useEffect4(() => {
|
|
2535
|
-
if (paginationModel.page > lastPage) {
|
|
2536
|
-
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
2537
|
-
}
|
|
2538
|
-
}, [rowCount, paginationModel, lastPage, setPaginationModel]);
|
|
2539
|
-
return /* @__PURE__ */ React21.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React21.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React21.createElement(
|
|
2540
|
-
PaginationIconButton,
|
|
2541
|
-
{
|
|
2542
|
-
size,
|
|
2543
|
-
variant: "plain",
|
|
2544
|
-
color: "neutral",
|
|
2545
|
-
onClick: () => handlePageChange(paginationModel.page - 1),
|
|
2546
|
-
disabled: paginationModel.page === firstPage,
|
|
2547
|
-
"aria-label": "Previous page"
|
|
2548
|
-
},
|
|
2549
|
-
/* @__PURE__ */ React21.createElement(PreviousIcon, null)
|
|
2550
|
-
), paginationModel.page !== firstPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ React21.createElement(
|
|
2551
|
-
PaginationButton,
|
|
2552
|
-
{
|
|
2553
|
-
size,
|
|
2554
|
-
variant: "plain",
|
|
2555
|
-
color: "neutral",
|
|
2556
|
-
onClick: () => handlePageChange(paginationModel.page - 3),
|
|
2557
|
-
"aria-label": "More previous pages"
|
|
2558
|
-
},
|
|
2559
|
-
"..."
|
|
2560
|
-
), beforePages.map((p) => /* @__PURE__ */ React21.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React21.createElement(PaginationButton, { active: "true", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ React21.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), isMoreAfterPages && /* @__PURE__ */ React21.createElement(
|
|
2561
|
-
PaginationButton,
|
|
2562
|
-
{
|
|
2563
|
-
size,
|
|
2564
|
-
variant: "plain",
|
|
2565
|
-
color: "neutral",
|
|
2566
|
-
"aria-label": "More next pages",
|
|
2567
|
-
onClick: () => handlePageChange(paginationModel.page + 3)
|
|
2568
|
-
},
|
|
2569
|
-
"..."
|
|
2570
|
-
), paginationModel.page !== lastPage && /* @__PURE__ */ React21.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ React21.createElement(
|
|
2571
|
-
PaginationIconButton,
|
|
2572
|
-
{
|
|
2573
|
-
size,
|
|
2574
|
-
variant: "plain",
|
|
2575
|
-
color: "neutral",
|
|
2576
|
-
onClick: () => handlePageChange(paginationModel.page + 1),
|
|
2577
|
-
disabled: paginationModel.page === lastPage,
|
|
2578
|
-
"aria-label": "Next page"
|
|
2579
|
-
},
|
|
2580
|
-
/* @__PURE__ */ React21.createElement(NextIcon, null)
|
|
2581
|
-
)));
|
|
2582
|
-
}
|
|
2583
|
-
Pagination.displayName = "Pagination";
|
|
2584
|
-
|
|
2585
|
-
// src/components/Pagination/index.ts
|
|
2586
|
-
var Pagination_default = Pagination;
|
|
2587
|
-
|
|
2588
2635
|
// src/components/InfoSign/InfoSign.tsx
|
|
2589
|
-
import
|
|
2636
|
+
import React21 from "react";
|
|
2590
2637
|
import { styled as styled11, tooltipClasses } from "@mui/joy";
|
|
2591
2638
|
import MuiInfoIcon from "@mui/icons-material/Info";
|
|
2592
2639
|
var InfoIcon = styled11(MuiInfoIcon, {
|
|
@@ -2599,7 +2646,7 @@ var InfoIcon = styled11(MuiInfoIcon, {
|
|
|
2599
2646
|
}));
|
|
2600
2647
|
function InfoSign(props) {
|
|
2601
2648
|
const { message, placement } = props;
|
|
2602
|
-
return /* @__PURE__ */
|
|
2649
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2603
2650
|
Tooltip_default,
|
|
2604
2651
|
{
|
|
2605
2652
|
arrow: true,
|
|
@@ -2609,140 +2656,16 @@ function InfoSign(props) {
|
|
|
2609
2656
|
maxWidth: "320px"
|
|
2610
2657
|
}
|
|
2611
2658
|
},
|
|
2612
|
-
title: message?.split("\n").map((line, i) => /* @__PURE__ */
|
|
2659
|
+
title: message?.split("\n").map((line, i) => /* @__PURE__ */ React21.createElement("div", { key: `info-sign-${i}` }, line))
|
|
2613
2660
|
},
|
|
2614
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ React21.createElement(InfoIcon, null)
|
|
2615
2662
|
);
|
|
2616
2663
|
}
|
|
2617
2664
|
|
|
2618
2665
|
// src/components/InfoSign/index.ts
|
|
2619
2666
|
var InfoSign_default = InfoSign;
|
|
2620
2667
|
|
|
2621
|
-
// src/components/DataTable/
|
|
2622
|
-
function extractFieldsFromGroupingModel(items) {
|
|
2623
|
-
const fields = /* @__PURE__ */ new Set();
|
|
2624
|
-
for (const item of items) {
|
|
2625
|
-
if ("groupId" in item) {
|
|
2626
|
-
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
2627
|
-
const childFields = extractFieldsFromGroupingModel(children);
|
|
2628
|
-
childFields.forEach((field) => fields.add(field));
|
|
2629
|
-
} else {
|
|
2630
|
-
fields.add(item.field);
|
|
2631
|
-
}
|
|
2632
|
-
}
|
|
2633
|
-
return fields;
|
|
2634
|
-
}
|
|
2635
|
-
function reorderColumnsByGroupingModel(columns, columnGroupingModel) {
|
|
2636
|
-
const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
|
|
2637
|
-
const orderedFields = [];
|
|
2638
|
-
function collectFieldsInOrder(items) {
|
|
2639
|
-
for (const item of items) {
|
|
2640
|
-
if ("groupId" in item) {
|
|
2641
|
-
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
2642
|
-
collectFieldsInOrder(children);
|
|
2643
|
-
} else {
|
|
2644
|
-
if (!orderedFields.includes(item.field)) {
|
|
2645
|
-
orderedFields.push(item.field);
|
|
2646
|
-
}
|
|
2647
|
-
}
|
|
2648
|
-
}
|
|
2649
|
-
}
|
|
2650
|
-
collectFieldsInOrder(columnGroupingModel);
|
|
2651
|
-
const columnMap = new Map(columns.map((col) => [col.field, col]));
|
|
2652
|
-
const reorderedColumns = [];
|
|
2653
|
-
for (const field of orderedFields) {
|
|
2654
|
-
const column = columnMap.get(field);
|
|
2655
|
-
if (column) {
|
|
2656
|
-
reorderedColumns.push(column);
|
|
2657
|
-
}
|
|
2658
|
-
}
|
|
2659
|
-
for (const column of columns) {
|
|
2660
|
-
if (!fieldsInGroupingModel.has(column.field)) {
|
|
2661
|
-
reorderedColumns.push(column);
|
|
2662
|
-
}
|
|
2663
|
-
}
|
|
2664
|
-
return reorderedColumns;
|
|
2665
|
-
}
|
|
2666
|
-
function flattenColumnGroups(items, groupPath = [], columnIndex = { current: 0 }) {
|
|
2667
|
-
const result = [];
|
|
2668
|
-
for (const item of items) {
|
|
2669
|
-
if ("groupId" in item) {
|
|
2670
|
-
const newPath = [...groupPath, item.groupId];
|
|
2671
|
-
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
2672
|
-
result.push(...flattenColumnGroups(children, newPath, columnIndex));
|
|
2673
|
-
} else {
|
|
2674
|
-
result.push({
|
|
2675
|
-
...item,
|
|
2676
|
-
groupPath,
|
|
2677
|
-
columnIndex: columnIndex.current++
|
|
2678
|
-
});
|
|
2679
|
-
}
|
|
2680
|
-
}
|
|
2681
|
-
return result;
|
|
2682
|
-
}
|
|
2683
|
-
function calculateColumnGroups(columnGroupingModel, columns) {
|
|
2684
|
-
const fieldsInGroupingModel = extractFieldsFromGroupingModel(columnGroupingModel);
|
|
2685
|
-
const flattenedColumns = flattenColumnGroups(columnGroupingModel);
|
|
2686
|
-
const columnIndexMap = new Map(flattenedColumns.map((col) => [col.field, col.columnIndex]));
|
|
2687
|
-
const processedGroups = /* @__PURE__ */ new Map();
|
|
2688
|
-
const groupsByLevel = [];
|
|
2689
|
-
let maxLevel = 0;
|
|
2690
|
-
function processGroup(items, level, parentGroupId) {
|
|
2691
|
-
let minIndex = Infinity;
|
|
2692
|
-
let maxIndex = -Infinity;
|
|
2693
|
-
for (const item of items) {
|
|
2694
|
-
if ("groupId" in item) {
|
|
2695
|
-
const groupKey = parentGroupId ? `${parentGroupId}.${item.groupId}` : item.groupId;
|
|
2696
|
-
if (!processedGroups.has(groupKey)) {
|
|
2697
|
-
const children = Array.isArray(item.children) ? item.children : [item.children];
|
|
2698
|
-
const { startIndex, colspan } = processGroup(children, level + 1, groupKey);
|
|
2699
|
-
const group = {
|
|
2700
|
-
groupId: item.groupId,
|
|
2701
|
-
headerName: item.headerName,
|
|
2702
|
-
colspan,
|
|
2703
|
-
level,
|
|
2704
|
-
startIndex
|
|
2705
|
-
};
|
|
2706
|
-
processedGroups.set(groupKey, group);
|
|
2707
|
-
if (!groupsByLevel[level]) {
|
|
2708
|
-
groupsByLevel[level] = [];
|
|
2709
|
-
}
|
|
2710
|
-
groupsByLevel[level].push(group);
|
|
2711
|
-
maxLevel = Math.max(maxLevel, level);
|
|
2712
|
-
minIndex = Math.min(minIndex, startIndex);
|
|
2713
|
-
maxIndex = Math.max(maxIndex, startIndex + colspan - 1);
|
|
2714
|
-
}
|
|
2715
|
-
} else {
|
|
2716
|
-
const columnIndex = columnIndexMap.get(item.field);
|
|
2717
|
-
if (columnIndex !== void 0) {
|
|
2718
|
-
minIndex = Math.min(minIndex, columnIndex);
|
|
2719
|
-
maxIndex = Math.max(maxIndex, columnIndex);
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
return {
|
|
2724
|
-
startIndex: minIndex === Infinity ? 0 : minIndex,
|
|
2725
|
-
colspan: maxIndex === -Infinity ? 0 : maxIndex - minIndex + 1
|
|
2726
|
-
};
|
|
2727
|
-
}
|
|
2728
|
-
processGroup(columnGroupingModel, 0);
|
|
2729
|
-
groupsByLevel.forEach((level) => {
|
|
2730
|
-
level.sort((a, b) => a.startIndex - b.startIndex);
|
|
2731
|
-
});
|
|
2732
|
-
return { groups: groupsByLevel, maxLevel, fieldsInGroupingModel };
|
|
2733
|
-
}
|
|
2734
|
-
function getTextAlign(props) {
|
|
2735
|
-
return !props.editMode && ["number", "date", "currency"].includes(props.type || "") ? "end" : "start";
|
|
2736
|
-
}
|
|
2737
|
-
var DefaultLoadingOverlay = () => /* @__PURE__ */ React23.createElement(LinearProgress, { value: 8, variant: "plain" });
|
|
2738
|
-
var EllipsisDiv = styled12("div", {
|
|
2739
|
-
name: "DataTable",
|
|
2740
|
-
slot: "textEllipsis"
|
|
2741
|
-
})({
|
|
2742
|
-
overflow: "hidden",
|
|
2743
|
-
textOverflow: "ellipsis",
|
|
2744
|
-
whiteSpace: "nowrap"
|
|
2745
|
-
});
|
|
2668
|
+
// src/components/DataTable/components.tsx
|
|
2746
2669
|
var TextEllipsis = ({ children }) => {
|
|
2747
2670
|
const textRef = useRef4(null);
|
|
2748
2671
|
const [showTooltip, setShowTooltip] = useState6(false);
|
|
@@ -2753,9 +2676,9 @@ var TextEllipsis = ({ children }) => {
|
|
|
2753
2676
|
setShowTooltip(isTextTruncated);
|
|
2754
2677
|
}
|
|
2755
2678
|
}, [children]);
|
|
2756
|
-
const content = /* @__PURE__ */
|
|
2679
|
+
const content = /* @__PURE__ */ React22.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
2757
2680
|
if (showTooltip) {
|
|
2758
|
-
return /* @__PURE__ */
|
|
2681
|
+
return /* @__PURE__ */ React22.createElement(Tooltip_default, { title: children, placement: "top", onClick: (e) => e.stopPropagation() }, content);
|
|
2759
2682
|
}
|
|
2760
2683
|
return content;
|
|
2761
2684
|
};
|
|
@@ -2769,9 +2692,9 @@ var CellTextEllipsis = ({ children }) => {
|
|
|
2769
2692
|
setShowTooltip(isTextTruncated);
|
|
2770
2693
|
}
|
|
2771
2694
|
}, [children]);
|
|
2772
|
-
const content = /* @__PURE__ */
|
|
2695
|
+
const content = /* @__PURE__ */ React22.createElement(EllipsisDiv, { ref: textRef }, children);
|
|
2773
2696
|
if (showTooltip) {
|
|
2774
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ React22.createElement(
|
|
2775
2698
|
Tooltip_default,
|
|
2776
2699
|
{
|
|
2777
2700
|
title: children,
|
|
@@ -2785,130 +2708,6 @@ var CellTextEllipsis = ({ children }) => {
|
|
|
2785
2708
|
}
|
|
2786
2709
|
return content;
|
|
2787
2710
|
};
|
|
2788
|
-
var OverlayWrapper = styled12("tr", {
|
|
2789
|
-
name: "DataTable",
|
|
2790
|
-
slot: "overlayWrapper"
|
|
2791
|
-
})({
|
|
2792
|
-
position: "sticky",
|
|
2793
|
-
top: `calc(var(--unstable_TableCell-height, 32px))`,
|
|
2794
|
-
left: 0,
|
|
2795
|
-
right: 0,
|
|
2796
|
-
zIndex: 1,
|
|
2797
|
-
"& > td": {
|
|
2798
|
-
height: 0,
|
|
2799
|
-
padding: 0,
|
|
2800
|
-
border: "none !important"
|
|
2801
|
-
}
|
|
2802
|
-
});
|
|
2803
|
-
var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().format(value) : value;
|
|
2804
|
-
var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React23.createElement(
|
|
2805
|
-
Box_default,
|
|
2806
|
-
{
|
|
2807
|
-
sx: {
|
|
2808
|
-
position: "absolute",
|
|
2809
|
-
top: 0,
|
|
2810
|
-
right: 0,
|
|
2811
|
-
bottom: 0,
|
|
2812
|
-
width: "4px",
|
|
2813
|
-
cursor: "col-resize"
|
|
2814
|
-
},
|
|
2815
|
-
onClick: (e) => e.stopPropagation(),
|
|
2816
|
-
onMouseDown: (e) => {
|
|
2817
|
-
const initialX = e.clientX;
|
|
2818
|
-
const initialWidth = ref.current?.getBoundingClientRect().width;
|
|
2819
|
-
const onMouseMove = (e2) => {
|
|
2820
|
-
if (initialWidth && initialX) {
|
|
2821
|
-
ref.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
|
|
2822
|
-
targetRef.current.style.width = `${initialWidth + (e2.clientX - initialX)}px`;
|
|
2823
|
-
}
|
|
2824
|
-
};
|
|
2825
|
-
const onMouseUp = () => {
|
|
2826
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
2827
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
2828
|
-
};
|
|
2829
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
2830
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
2831
|
-
}
|
|
2832
|
-
}
|
|
2833
|
-
);
|
|
2834
|
-
var VirtualizedTableBody = styled12("tbody", {
|
|
2835
|
-
name: "DataTable",
|
|
2836
|
-
slot: "tableBody"
|
|
2837
|
-
})({
|
|
2838
|
-
// HACK: for virtualization: tbody의 height를 렌더링 된 tr의 총 높이 보다 높은 값으로 지정하고도 tr의 size를 유지하기 위한 꼼수
|
|
2839
|
-
"&::after": {
|
|
2840
|
-
content: "''",
|
|
2841
|
-
display: "block",
|
|
2842
|
-
height: "0.01em"
|
|
2843
|
-
},
|
|
2844
|
-
// NOTE: 테이블 안에 버튼을 넣을 때 버튼의 높이가 테이블의 높이를 넘어가지 않도록 설정
|
|
2845
|
-
[`& .${buttonClasses.root}`]: {
|
|
2846
|
-
"--Button-minHeight": "26px",
|
|
2847
|
-
"--Button-paddingBlock": "0.25rem",
|
|
2848
|
-
lineHeight: 1,
|
|
2849
|
-
marginTop: "-2px",
|
|
2850
|
-
marginBottom: "-2px"
|
|
2851
|
-
},
|
|
2852
|
-
[`& .${iconButtonClasses.root}`]: {
|
|
2853
|
-
"--IconButton-size": "26px",
|
|
2854
|
-
verticalAlign: "middle",
|
|
2855
|
-
marginTop: "-2px",
|
|
2856
|
-
marginBottom: "-2px"
|
|
2857
|
-
}
|
|
2858
|
-
});
|
|
2859
|
-
var StyledTableRow = styled12("tr", {
|
|
2860
|
-
name: "DataTable",
|
|
2861
|
-
slot: "tableRow",
|
|
2862
|
-
shouldForwardProp: (prop) => prop !== "striped"
|
|
2863
|
-
})(({ striped }) => ({
|
|
2864
|
-
...striped && {
|
|
2865
|
-
backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
|
|
2866
|
-
color: "var(--ceed-palette-text-primary)",
|
|
2867
|
-
"& td": {
|
|
2868
|
-
backgroundColor: "background.surface"
|
|
2869
|
-
}
|
|
2870
|
-
},
|
|
2871
|
-
"&:hover": {
|
|
2872
|
-
backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
|
|
2873
|
-
"& td": {
|
|
2874
|
-
backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
|
|
2875
|
-
}
|
|
2876
|
-
}
|
|
2877
|
-
}));
|
|
2878
|
-
var VirtualizedTableRow = memo(StyledTableRow, (prevProps, nextProps) => {
|
|
2879
|
-
return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
|
|
2880
|
-
prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
|
|
2881
|
-
prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Include children check to handle isCellEditable changes
|
|
2882
|
-
prevProps.children === nextProps.children;
|
|
2883
|
-
});
|
|
2884
|
-
var Asterisk = styled12("span", {
|
|
2885
|
-
name: "DataTable",
|
|
2886
|
-
slot: "headCellAsterisk"
|
|
2887
|
-
})(({ theme }) => ({
|
|
2888
|
-
color: "var(--ceed-palette-danger-500)",
|
|
2889
|
-
marginLeft: theme.spacing(0.5)
|
|
2890
|
-
}));
|
|
2891
|
-
var StyledTh = styled12(motion21.th)(({ theme }) => ({
|
|
2892
|
-
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
2893
|
-
// border 대신 box-shadow를 사용하여 stickyHeader와 함께 사용할 때 border가 겹치는 문제를 해결
|
|
2894
|
-
}));
|
|
2895
|
-
var StyledTd = styled12("td")(({ theme }) => ({
|
|
2896
|
-
transition: `box-shadow 0.3s`,
|
|
2897
|
-
"&:not(.is-last-left):not(.is-last-right)": {
|
|
2898
|
-
boxShadow: "1px 0 var(--TableCell-borderColor)"
|
|
2899
|
-
},
|
|
2900
|
-
".ScrollableRight &": {
|
|
2901
|
-
"&.is-last-left": {
|
|
2902
|
-
boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
|
|
2903
|
-
}
|
|
2904
|
-
},
|
|
2905
|
-
".ScrollableLeft &": {
|
|
2906
|
-
"&.is-last-right": {
|
|
2907
|
-
boxShadow: `1px 0 var(--TableCell-borderColor), ${theme.shadow.md}`
|
|
2908
|
-
}
|
|
2909
|
-
}
|
|
2910
|
-
}));
|
|
2911
|
-
var MotionSortIcon = motion21(SortIcon);
|
|
2912
2711
|
var HeadCell = (props) => {
|
|
2913
2712
|
const {
|
|
2914
2713
|
width,
|
|
@@ -2931,7 +2730,8 @@ var HeadCell = (props) => {
|
|
|
2931
2730
|
pinnedStartPosition,
|
|
2932
2731
|
pinnedEndPosition,
|
|
2933
2732
|
headerRef,
|
|
2934
|
-
tableColRef
|
|
2733
|
+
tableColRef,
|
|
2734
|
+
headerClassName
|
|
2935
2735
|
} = props;
|
|
2936
2736
|
const theme = useTheme();
|
|
2937
2737
|
const ref = headerRef;
|
|
@@ -2964,7 +2764,7 @@ var HeadCell = (props) => {
|
|
|
2964
2764
|
const sortIcon = useMemo8(() => {
|
|
2965
2765
|
const isSorted = !!sort;
|
|
2966
2766
|
const isVisible = sortable && (isSorted || isHovered);
|
|
2967
|
-
return /* @__PURE__ */
|
|
2767
|
+
return /* @__PURE__ */ React22.createElement(AnimatePresence2, { mode: "wait" }, isVisible && /* @__PURE__ */ React22.createElement(
|
|
2968
2768
|
MotionSortIcon,
|
|
2969
2769
|
{
|
|
2970
2770
|
key: "sort-icon",
|
|
@@ -2993,10 +2793,20 @@ var HeadCell = (props) => {
|
|
|
2993
2793
|
));
|
|
2994
2794
|
}, [headId, initialSort, sort, sortable, isHovered]);
|
|
2995
2795
|
const infoSign = useMemo8(
|
|
2996
|
-
() => description ? /* @__PURE__ */
|
|
2796
|
+
() => description ? /* @__PURE__ */ React22.createElement(InfoSign_default, { message: description, placement: "bottom" }) : null,
|
|
2997
2797
|
[description]
|
|
2998
2798
|
);
|
|
2999
|
-
|
|
2799
|
+
const params = useMemo8(
|
|
2800
|
+
() => ({
|
|
2801
|
+
field
|
|
2802
|
+
}),
|
|
2803
|
+
[field]
|
|
2804
|
+
);
|
|
2805
|
+
const computedHeaderClassName = useMemo8(
|
|
2806
|
+
() => (typeof headerClassName === "function" ? headerClassName(params) : headerClassName) || void 0,
|
|
2807
|
+
[headerClassName, params]
|
|
2808
|
+
);
|
|
2809
|
+
return /* @__PURE__ */ React22.createElement(
|
|
3000
2810
|
StyledTh,
|
|
3001
2811
|
{
|
|
3002
2812
|
id: headId,
|
|
@@ -3005,16 +2815,17 @@ var HeadCell = (props) => {
|
|
|
3005
2815
|
ref,
|
|
3006
2816
|
key: field,
|
|
3007
2817
|
style,
|
|
3008
|
-
onClick:
|
|
2818
|
+
onClick: useCallback8(
|
|
3009
2819
|
(e) => sortable && onSortChange?.({ field, currentSort: sort, multiple: e.shiftKey }),
|
|
3010
2820
|
[field, onSortChange, sort, sortable]
|
|
3011
2821
|
),
|
|
3012
2822
|
onMouseEnter: () => setIsHovered(true),
|
|
3013
2823
|
onMouseLeave: () => setIsHovered(false),
|
|
3014
2824
|
whileHover: "hover",
|
|
3015
|
-
initial: "initial"
|
|
2825
|
+
initial: "initial",
|
|
2826
|
+
className: computedHeaderClassName
|
|
3016
2827
|
},
|
|
3017
|
-
/* @__PURE__ */
|
|
2828
|
+
/* @__PURE__ */ React22.createElement(Stack_default, { gap: 1, direction: "row", justifyContent: textAlign, alignItems: "center" }, textAlign === "end" && sortIcon, textAlign === "end" && infoSign, /* @__PURE__ */ React22.createElement(TextEllipsis, null, headerName ?? field, editMode && required && /* @__PURE__ */ React22.createElement(Asterisk, null, "*")), textAlign === "start" && infoSign, textAlign === "start" && sortIcon),
|
|
3018
2829
|
resizer
|
|
3019
2830
|
);
|
|
3020
2831
|
};
|
|
@@ -3129,18 +2940,18 @@ var BodyCell = (props) => {
|
|
|
3129
2940
|
return createElement(memo(renderEditCell), params);
|
|
3130
2941
|
}
|
|
3131
2942
|
return {
|
|
3132
|
-
date: /* @__PURE__ */
|
|
3133
|
-
currency: /* @__PURE__ */
|
|
2943
|
+
date: /* @__PURE__ */ React22.createElement(DatePicker_default, { value, ...editModeComponentProps }),
|
|
2944
|
+
currency: /* @__PURE__ */ React22.createElement(
|
|
3134
2945
|
CurrencyInput_default,
|
|
3135
2946
|
{
|
|
3136
2947
|
value,
|
|
3137
2948
|
...editModeComponentProps
|
|
3138
2949
|
}
|
|
3139
2950
|
),
|
|
3140
|
-
number: /* @__PURE__ */
|
|
3141
|
-
text: /* @__PURE__ */
|
|
3142
|
-
longText: /* @__PURE__ */
|
|
3143
|
-
autocomplete: /* @__PURE__ */
|
|
2951
|
+
number: /* @__PURE__ */ React22.createElement(Input_default, { value, type: "number", ...editModeComponentProps }),
|
|
2952
|
+
text: /* @__PURE__ */ React22.createElement(Input_default, { value, type: "text", ...editModeComponentProps }),
|
|
2953
|
+
longText: /* @__PURE__ */ React22.createElement(Textarea_default, { value, ...editModeComponentProps }),
|
|
2954
|
+
autocomplete: /* @__PURE__ */ React22.createElement(
|
|
3144
2955
|
Autocomplete_default,
|
|
3145
2956
|
{
|
|
3146
2957
|
value,
|
|
@@ -3148,7 +2959,7 @@ var BodyCell = (props) => {
|
|
|
3148
2959
|
...editModeComponentProps
|
|
3149
2960
|
}
|
|
3150
2961
|
),
|
|
3151
|
-
select: /* @__PURE__ */
|
|
2962
|
+
select: /* @__PURE__ */ React22.createElement(
|
|
3152
2963
|
Select_default,
|
|
3153
2964
|
{
|
|
3154
2965
|
value,
|
|
@@ -3165,7 +2976,7 @@ var BodyCell = (props) => {
|
|
|
3165
2976
|
}
|
|
3166
2977
|
const innerText = value;
|
|
3167
2978
|
const typedComponent = {
|
|
3168
|
-
link:
|
|
2979
|
+
link: React22.createElement(linkComponentFromProps || Link, {
|
|
3169
2980
|
children: innerText,
|
|
3170
2981
|
...componentProps
|
|
3171
2982
|
})
|
|
@@ -3175,7 +2986,7 @@ var BodyCell = (props) => {
|
|
|
3175
2986
|
const getActions = props.getActions;
|
|
3176
2987
|
const CellComponent = useMemo8(() => {
|
|
3177
2988
|
if (type === "actions") {
|
|
3178
|
-
return /* @__PURE__ */
|
|
2989
|
+
return /* @__PURE__ */ React22.createElement(Stack_default, { direction: "row", gap: 1, justifyContent: "center", alignItems: "center" }, getActions?.(params));
|
|
3179
2990
|
}
|
|
3180
2991
|
return editMode && EditModeComponent ? EditModeComponent : ReadModeComponent;
|
|
3181
2992
|
}, [type, getActions, params, editMode, EditModeComponent, ReadModeComponent]);
|
|
@@ -3185,10 +2996,10 @@ var BodyCell = (props) => {
|
|
|
3185
2996
|
() => (typeof cellClassName === "function" ? cellClassName(params) : cellClassName) || "",
|
|
3186
2997
|
[cellClassName, params]
|
|
3187
2998
|
);
|
|
3188
|
-
|
|
2999
|
+
useEffect4(() => {
|
|
3189
3000
|
setValue(row[field]);
|
|
3190
3001
|
}, [row, field]);
|
|
3191
|
-
return /* @__PURE__ */
|
|
3002
|
+
return /* @__PURE__ */ React22.createElement(
|
|
3192
3003
|
StyledTd,
|
|
3193
3004
|
{
|
|
3194
3005
|
ref: cellRef,
|
|
@@ -3206,7 +3017,7 @@ var BodyCell = (props) => {
|
|
|
3206
3017
|
className: [isLastStartPinnedColumn && "is-last-left", isLastEndPinnedColumn && "is-last-right", computedCellClassName].filter(Boolean).join(" ") || ""
|
|
3207
3018
|
},
|
|
3208
3019
|
useMemo8(
|
|
3209
|
-
() => showTooltip ? /* @__PURE__ */
|
|
3020
|
+
() => showTooltip ? /* @__PURE__ */ React22.createElement(CellTextEllipsis, null, CellComponent) : CellComponent,
|
|
3210
3021
|
[CellComponent, showTooltip]
|
|
3211
3022
|
)
|
|
3212
3023
|
);
|
|
@@ -3214,7 +3025,7 @@ var BodyCell = (props) => {
|
|
|
3214
3025
|
var BodyRow = memo(
|
|
3215
3026
|
(props) => {
|
|
3216
3027
|
const { tableId, columns, rowId, editMode, noWrap, row } = props;
|
|
3217
|
-
return /* @__PURE__ */
|
|
3028
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, columns.map((column, i) => /* @__PURE__ */ React22.createElement(
|
|
3218
3029
|
BodyCell,
|
|
3219
3030
|
{
|
|
3220
3031
|
key: `${rowId}_${column.field.toString()}_${i}`,
|
|
@@ -3227,11 +3038,39 @@ var BodyRow = memo(
|
|
|
3227
3038
|
}
|
|
3228
3039
|
)));
|
|
3229
3040
|
}
|
|
3230
|
-
);
|
|
3041
|
+
);
|
|
3042
|
+
var StyledTableRow2 = styled12("tr", {
|
|
3043
|
+
name: "DataTable",
|
|
3044
|
+
slot: "tableRow",
|
|
3045
|
+
shouldForwardProp: (prop) => prop !== "striped"
|
|
3046
|
+
})(({ striped }) => ({
|
|
3047
|
+
...striped && {
|
|
3048
|
+
backgroundColor: "var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",
|
|
3049
|
+
color: "var(--ceed-palette-text-primary)",
|
|
3050
|
+
"& td": {
|
|
3051
|
+
backgroundColor: "background.surface"
|
|
3052
|
+
}
|
|
3053
|
+
},
|
|
3054
|
+
"&:hover": {
|
|
3055
|
+
backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))",
|
|
3056
|
+
"& td": {
|
|
3057
|
+
backgroundColor: "var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"
|
|
3058
|
+
}
|
|
3059
|
+
}
|
|
3060
|
+
}));
|
|
3061
|
+
var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
|
|
3062
|
+
return prevProps.striped === nextProps.striped && prevProps.style?.height === nextProps.style?.height && prevProps.style?.transform === nextProps.style?.transform && // @ts-ignore
|
|
3063
|
+
prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
|
|
3064
|
+
prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Include children check to handle isCellEditable changes
|
|
3065
|
+
prevProps.children === nextProps.children;
|
|
3066
|
+
});
|
|
3067
|
+
|
|
3068
|
+
// src/components/DataTable/hooks.ts
|
|
3069
|
+
import { useState as useState7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useMemo as useMemo9, useCallback as useCallback9, useEffect as useEffect5, createRef } from "react";
|
|
3231
3070
|
function useColumnWidths(columnsByField) {
|
|
3232
|
-
const [widths, setWidths] =
|
|
3233
|
-
const roRef =
|
|
3234
|
-
|
|
3071
|
+
const [widths, setWidths] = useState7({});
|
|
3072
|
+
const roRef = useRef5();
|
|
3073
|
+
useLayoutEffect2(() => {
|
|
3235
3074
|
if (roRef.current) roRef.current.disconnect();
|
|
3236
3075
|
roRef.current = new ResizeObserver((entries) => {
|
|
3237
3076
|
let changed = false;
|
|
@@ -3279,33 +3118,32 @@ function useDataTableRenderer({
|
|
|
3279
3118
|
isTotalSelected: _isTotalSelected,
|
|
3280
3119
|
isRowSelectable,
|
|
3281
3120
|
columnGroupingModel
|
|
3282
|
-
// Add this prop
|
|
3283
3121
|
}) {
|
|
3284
3122
|
if (pinnedColumns && columnGroupingModel) {
|
|
3285
3123
|
throw new Error(
|
|
3286
3124
|
"You cannot use both `pinnedColumns` and `columnGroupingModel` at the same time. Please choose one of them."
|
|
3287
3125
|
);
|
|
3288
3126
|
}
|
|
3289
|
-
const onSelectionModelChangeRef =
|
|
3127
|
+
const onSelectionModelChangeRef = useRef5(onSelectionModelChange);
|
|
3290
3128
|
onSelectionModelChangeRef.current = onSelectionModelChange;
|
|
3291
|
-
const [focusedRowId, setFocusedRowId] =
|
|
3129
|
+
const [focusedRowId, setFocusedRowId] = useState7(null);
|
|
3292
3130
|
const [sortModel, setSortModel] = useControlledState(
|
|
3293
3131
|
controlledSortModel,
|
|
3294
3132
|
initialState?.sorting?.sortModel ?? [],
|
|
3295
3133
|
useCallback9((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
|
|
3296
3134
|
);
|
|
3297
|
-
const reorderedColumns =
|
|
3135
|
+
const reorderedColumns = useMemo9(() => {
|
|
3298
3136
|
if (!columnGroupingModel) return columnsProp;
|
|
3299
3137
|
return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
|
|
3300
3138
|
}, [columnsProp, columnGroupingModel]);
|
|
3301
|
-
const columnsByField =
|
|
3139
|
+
const columnsByField = useMemo9(
|
|
3302
3140
|
() => reorderedColumns.reduce(
|
|
3303
3141
|
(acc, curr) => ({
|
|
3304
3142
|
...acc,
|
|
3305
3143
|
[curr.field]: {
|
|
3306
3144
|
...curr,
|
|
3307
|
-
headerRef:
|
|
3308
|
-
tableColRef:
|
|
3145
|
+
headerRef: createRef(),
|
|
3146
|
+
tableColRef: createRef()
|
|
3309
3147
|
}
|
|
3310
3148
|
}),
|
|
3311
3149
|
{}
|
|
@@ -3340,47 +3178,42 @@ function useDataTableRenderer({
|
|
|
3340
3178
|
},
|
|
3341
3179
|
[sortModel, columnsByField]
|
|
3342
3180
|
);
|
|
3343
|
-
const rows =
|
|
3181
|
+
const rows = useMemo9(
|
|
3344
3182
|
() => sortModel.length ? [..._rows].sort(sortComparator) : _rows,
|
|
3345
3183
|
[_rows, sortModel, sortComparator]
|
|
3346
3184
|
);
|
|
3347
|
-
const sortOrder =
|
|
3348
|
-
// NOTE: default value를 props destructuring에서 할당하면 렌더링 시점에 초기화가 되어버린다.
|
|
3185
|
+
const sortOrder = useMemo9(
|
|
3349
3186
|
() => Array.from(new Set(_sortOrder || ["asc", "desc", null])),
|
|
3350
3187
|
[_sortOrder]
|
|
3351
3188
|
);
|
|
3352
|
-
const [page, setPage] =
|
|
3189
|
+
const [page, setPage] = useState7(paginationModel?.page || 1);
|
|
3353
3190
|
const pageSize = paginationModel?.pageSize || 20;
|
|
3354
3191
|
const getId = useCallback9(
|
|
3355
3192
|
(row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
|
|
3356
3193
|
[_getId, page, pageSize]
|
|
3357
3194
|
);
|
|
3358
|
-
const selectedModelSet =
|
|
3359
|
-
|
|
3360
|
-
() => new Set(selectionModel || []),
|
|
3361
|
-
[selectionModel]
|
|
3362
|
-
);
|
|
3363
|
-
const dataInPage = useMemo8(
|
|
3195
|
+
const selectedModelSet = useMemo9(() => new Set(selectionModel || []), [selectionModel]);
|
|
3196
|
+
const dataInPage = useMemo9(
|
|
3364
3197
|
() => !pagination || paginationMode === "server" ? rows : rows.slice((page - 1) * pageSize, (page - 1) * pageSize + pageSize),
|
|
3365
3198
|
[rows, page, pageSize, paginationMode, pagination]
|
|
3366
3199
|
);
|
|
3367
|
-
const selectableDataInPage =
|
|
3200
|
+
const selectableDataInPage = useMemo9(
|
|
3368
3201
|
() => dataInPage.filter((row, i) => {
|
|
3369
3202
|
if (!isRowSelectable) return true;
|
|
3370
3203
|
return isRowSelectable({ row, id: getId(row, i) });
|
|
3371
3204
|
}),
|
|
3372
3205
|
[dataInPage, isRowSelectable, getId]
|
|
3373
3206
|
);
|
|
3374
|
-
const isAllSelected =
|
|
3207
|
+
const isAllSelected = useMemo9(
|
|
3375
3208
|
() => selectableDataInPage.length > 0 && selectableDataInPage.every((row, i) => selectedModelSet.has(getId(row, i))),
|
|
3376
3209
|
[selectableDataInPage, selectedModelSet, getId]
|
|
3377
3210
|
);
|
|
3378
3211
|
const rowCount = totalRowsProp || rows.length;
|
|
3379
|
-
const selectableRowCount =
|
|
3212
|
+
const selectableRowCount = useMemo9(() => {
|
|
3380
3213
|
if (!isRowSelectable) return rowCount;
|
|
3381
3214
|
return rows.filter((row, i) => isRowSelectable({ row, id: getId(row, i) })).length;
|
|
3382
3215
|
}, [rows, isRowSelectable, getId, rowCount]);
|
|
3383
|
-
const isTotalSelected =
|
|
3216
|
+
const isTotalSelected = useMemo9(
|
|
3384
3217
|
() => _isTotalSelected ?? (selectableRowCount > 0 && (selectionModel?.length || 0) === selectableRowCount),
|
|
3385
3218
|
[_isTotalSelected, selectionModel, selectableRowCount]
|
|
3386
3219
|
);
|
|
@@ -3390,17 +3223,14 @@ function useDataTableRenderer({
|
|
|
3390
3223
|
columnsByField[f].minWidth ?? 0,
|
|
3391
3224
|
[columnWidths, columnsByField]
|
|
3392
3225
|
);
|
|
3393
|
-
const processedColumnGroups =
|
|
3226
|
+
const processedColumnGroups = useMemo9(() => {
|
|
3394
3227
|
if (!columnGroupingModel) return null;
|
|
3395
3228
|
return calculateColumnGroups(columnGroupingModel, reorderedColumns);
|
|
3396
3229
|
}, [columnGroupingModel, reorderedColumns]);
|
|
3397
|
-
const columns =
|
|
3398
|
-
const baseColumns = reorderedColumns.length > 0 ? reorderedColumns : (
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
field: key
|
|
3402
|
-
}))
|
|
3403
|
-
);
|
|
3230
|
+
const columns = useMemo9(() => {
|
|
3231
|
+
const baseColumns = reorderedColumns.length > 0 ? reorderedColumns : Object.keys(rows[0] || {}).map((key) => ({
|
|
3232
|
+
field: key
|
|
3233
|
+
}));
|
|
3404
3234
|
return baseColumns.map((column) => {
|
|
3405
3235
|
const isLeftPinned = pinnedColumns?.left?.includes(column.field);
|
|
3406
3236
|
const isRightPinned = pinnedColumns?.right?.includes(column.field);
|
|
@@ -3415,7 +3245,6 @@ function useDataTableRenderer({
|
|
|
3415
3245
|
isPinned,
|
|
3416
3246
|
isLastStartPinnedColumn: isLeftPinned && [...pinnedColumns?.left || []].pop() === column.field,
|
|
3417
3247
|
isLastEndPinnedColumn: isRightPinned && (pinnedColumns?.right?.[0] ?? null) === column.field,
|
|
3418
|
-
// pinned 관련 계산부
|
|
3419
3248
|
pinnedStartPosition: pinnedColumns?.left?.slice(0, isLeftPinned ? pinnedColumns.left.indexOf(column.field) : pinnedColumns.left.length).reduce((acc, curr) => acc + getWidth(curr), 0),
|
|
3420
3249
|
pinnedEndPosition: pinnedColumns?.right?.slice(isRightPinned ? pinnedColumns.right.indexOf(column.field) + 1 : 0).reduce((acc, curr) => acc + getWidth(curr), 0)
|
|
3421
3250
|
};
|
|
@@ -3487,7 +3316,6 @@ function useDataTableRenderer({
|
|
|
3487
3316
|
dataInPage,
|
|
3488
3317
|
handleSortChange,
|
|
3489
3318
|
isAllSelected,
|
|
3490
|
-
// all rows are selected on this page
|
|
3491
3319
|
isTotalSelected,
|
|
3492
3320
|
isSelectedRow: useCallback9((model) => selectedModelSet.has(model), [selectedModelSet]),
|
|
3493
3321
|
isRowSelectable: useCallback9(
|
|
@@ -3527,6 +3355,216 @@ function useDataTableRenderer({
|
|
|
3527
3355
|
}, [isTotalSelected, rows, onSelectionModelChange, getId, isRowSelectable])
|
|
3528
3356
|
};
|
|
3529
3357
|
}
|
|
3358
|
+
|
|
3359
|
+
// src/components/Table/Table.tsx
|
|
3360
|
+
import React23 from "react";
|
|
3361
|
+
import { Table as JoyTable } from "@mui/joy";
|
|
3362
|
+
var Table = (props) => {
|
|
3363
|
+
const { children, ...inheritProps } = props;
|
|
3364
|
+
return /* @__PURE__ */ React23.createElement(JoyTable, { ...inheritProps }, children);
|
|
3365
|
+
};
|
|
3366
|
+
Table.displayName = "Table";
|
|
3367
|
+
function TableHead(props) {
|
|
3368
|
+
const {
|
|
3369
|
+
headCells,
|
|
3370
|
+
showCheckbox,
|
|
3371
|
+
onCheckboxChange,
|
|
3372
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
3373
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
3374
|
+
} = props;
|
|
3375
|
+
return /* @__PURE__ */ React23.createElement("thead", null, /* @__PURE__ */ React23.createElement("tr", null, showCheckbox && /* @__PURE__ */ React23.createElement(
|
|
3376
|
+
"th",
|
|
3377
|
+
{
|
|
3378
|
+
style: {
|
|
3379
|
+
width: "40px",
|
|
3380
|
+
textAlign: "center"
|
|
3381
|
+
}
|
|
3382
|
+
},
|
|
3383
|
+
/* @__PURE__ */ React23.createElement(RenderCheckbox, { onChange: onCheckboxChange, ...checkboxProps })
|
|
3384
|
+
), headCells.map((headCell) => /* @__PURE__ */ React23.createElement(
|
|
3385
|
+
"th",
|
|
3386
|
+
{
|
|
3387
|
+
key: headCell.label,
|
|
3388
|
+
style: {
|
|
3389
|
+
width: headCell.width,
|
|
3390
|
+
minWidth: headCell.minWidth,
|
|
3391
|
+
maxWidth: headCell.maxWidth,
|
|
3392
|
+
textAlign: headCell.numeric ? "right" : "left"
|
|
3393
|
+
}
|
|
3394
|
+
},
|
|
3395
|
+
headCell.label
|
|
3396
|
+
))));
|
|
3397
|
+
}
|
|
3398
|
+
TableHead.displayName = "TableHead";
|
|
3399
|
+
function TableBody(props) {
|
|
3400
|
+
const {
|
|
3401
|
+
rows,
|
|
3402
|
+
cellOrder,
|
|
3403
|
+
rowOptions,
|
|
3404
|
+
showCheckbox,
|
|
3405
|
+
onCheckboxChange,
|
|
3406
|
+
slots: { checkbox: RenderCheckbox = Checkbox_default } = {},
|
|
3407
|
+
slotProps: { checkbox: checkboxProps = {} } = {}
|
|
3408
|
+
} = props;
|
|
3409
|
+
return /* @__PURE__ */ React23.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React23.createElement("tr", { key: `table-row-${rowIndex}` }, showCheckbox && /* @__PURE__ */ React23.createElement(
|
|
3410
|
+
"td",
|
|
3411
|
+
{
|
|
3412
|
+
style: {
|
|
3413
|
+
textAlign: "center"
|
|
3414
|
+
}
|
|
3415
|
+
},
|
|
3416
|
+
/* @__PURE__ */ React23.createElement(RenderCheckbox, { onChange: (event) => onCheckboxChange?.(event, rowIndex), ...checkboxProps })
|
|
3417
|
+
), cellOrder.map((cellKey) => /* @__PURE__ */ React23.createElement(
|
|
3418
|
+
"td",
|
|
3419
|
+
{
|
|
3420
|
+
key: cellKey,
|
|
3421
|
+
style: {
|
|
3422
|
+
textAlign: rowOptions?.[cellKey]?.numeric ? "right" : "left"
|
|
3423
|
+
}
|
|
3424
|
+
},
|
|
3425
|
+
row[cellKey]
|
|
3426
|
+
)))));
|
|
3427
|
+
}
|
|
3428
|
+
TableBody.displayName = "TableBody";
|
|
3429
|
+
|
|
3430
|
+
// src/components/Pagination/Pagination.tsx
|
|
3431
|
+
import React24, { useCallback as useCallback10, useEffect as useEffect6 } from "react";
|
|
3432
|
+
import PreviousIcon from "@mui/icons-material/ChevronLeft";
|
|
3433
|
+
import NextIcon from "@mui/icons-material/ChevronRight";
|
|
3434
|
+
import { styled as styled13 } from "@mui/joy";
|
|
3435
|
+
var PaginationButton = styled13(Button_default, {
|
|
3436
|
+
name: "Pagination",
|
|
3437
|
+
slot: "button"
|
|
3438
|
+
})(({ theme, active, size }) => ({
|
|
3439
|
+
"--Button-size": {
|
|
3440
|
+
sm: "32px",
|
|
3441
|
+
md: "40px",
|
|
3442
|
+
lg: "48px"
|
|
3443
|
+
}[size],
|
|
3444
|
+
width: "var(--Button-size)",
|
|
3445
|
+
height: "var(--Button-size)",
|
|
3446
|
+
backgroundColor: active ? theme.vars.palette.primary.softHoverBg : "transparent",
|
|
3447
|
+
color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.plainColor,
|
|
3448
|
+
"&:hover": {
|
|
3449
|
+
color: active ? theme.vars.palette.primary.softColor : theme.vars.palette.neutral.softColor,
|
|
3450
|
+
backgroundColor: active ? theme.vars.palette.primary.softActiveBg : theme.vars.palette.neutral.softHoverBg
|
|
3451
|
+
}
|
|
3452
|
+
}));
|
|
3453
|
+
var PaginationIconButton = styled13(IconButton_default, {
|
|
3454
|
+
name: "Pagination",
|
|
3455
|
+
slot: "button"
|
|
3456
|
+
})(({ theme, size }) => ({
|
|
3457
|
+
"--IconButton-size": {
|
|
3458
|
+
sm: "32px",
|
|
3459
|
+
md: "40px",
|
|
3460
|
+
lg: "48px"
|
|
3461
|
+
}[size],
|
|
3462
|
+
"--Icon-fontSize": "20px",
|
|
3463
|
+
width: "var(--IconButton-size)",
|
|
3464
|
+
height: "var(--IconButton-size)",
|
|
3465
|
+
color: theme.vars.palette.neutral.plainColor,
|
|
3466
|
+
"&:hover": {
|
|
3467
|
+
color: theme.vars.palette.neutral.softColor,
|
|
3468
|
+
backgroundColor: theme.vars.palette.neutral.softHoverBg
|
|
3469
|
+
}
|
|
3470
|
+
}));
|
|
3471
|
+
var PaginationRoot = styled13(Stack_default, {
|
|
3472
|
+
name: "Pagination",
|
|
3473
|
+
slot: "root"
|
|
3474
|
+
})({});
|
|
3475
|
+
var PaginationContainer = styled13(Stack_default, {
|
|
3476
|
+
name: "Pagination",
|
|
3477
|
+
slot: "container"
|
|
3478
|
+
})(({ theme, size }) => ({
|
|
3479
|
+
gap: {
|
|
3480
|
+
sm: theme.spacing(1),
|
|
3481
|
+
md: theme.spacing(1.5),
|
|
3482
|
+
lg: theme.spacing(2)
|
|
3483
|
+
}[size]
|
|
3484
|
+
}));
|
|
3485
|
+
function Pagination(props) {
|
|
3486
|
+
const {
|
|
3487
|
+
paginationModel: _paginationModel,
|
|
3488
|
+
defaultPaginationModel = { page: 1, pageSize: 25 },
|
|
3489
|
+
onPageChange,
|
|
3490
|
+
rowCount,
|
|
3491
|
+
size = "md",
|
|
3492
|
+
...innerProps
|
|
3493
|
+
} = props;
|
|
3494
|
+
const [paginationModel, setPaginationModel] = useControlledState(
|
|
3495
|
+
_paginationModel,
|
|
3496
|
+
defaultPaginationModel,
|
|
3497
|
+
useCallback10(
|
|
3498
|
+
(newPage) => {
|
|
3499
|
+
onPageChange(newPage.page);
|
|
3500
|
+
},
|
|
3501
|
+
[onPageChange]
|
|
3502
|
+
)
|
|
3503
|
+
);
|
|
3504
|
+
const handlePageChange = (newPage) => {
|
|
3505
|
+
setPaginationModel({ ...paginationModel, page: newPage });
|
|
3506
|
+
};
|
|
3507
|
+
const firstPage = 1;
|
|
3508
|
+
const lastPage = Math.max(firstPage, Math.ceil(rowCount / paginationModel.pageSize));
|
|
3509
|
+
const beforePages = [paginationModel.page - 2, paginationModel.page - 1].filter((p) => p > 1);
|
|
3510
|
+
const afterPages = [paginationModel.page + 1, paginationModel.page + 2].filter((p) => p <= lastPage - 1);
|
|
3511
|
+
const isMoreAfterPages = lastPage > 1 && paginationModel.page < lastPage - 3;
|
|
3512
|
+
const isMoreBeforePages = lastPage > 1 && paginationModel.page > 4;
|
|
3513
|
+
useEffect6(() => {
|
|
3514
|
+
if (paginationModel.page > lastPage) {
|
|
3515
|
+
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
3516
|
+
}
|
|
3517
|
+
}, [rowCount, paginationModel, lastPage, setPaginationModel]);
|
|
3518
|
+
return /* @__PURE__ */ React24.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React24.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React24.createElement(
|
|
3519
|
+
PaginationIconButton,
|
|
3520
|
+
{
|
|
3521
|
+
size,
|
|
3522
|
+
variant: "plain",
|
|
3523
|
+
color: "neutral",
|
|
3524
|
+
onClick: () => handlePageChange(paginationModel.page - 1),
|
|
3525
|
+
disabled: paginationModel.page === firstPage,
|
|
3526
|
+
"aria-label": "Previous page"
|
|
3527
|
+
},
|
|
3528
|
+
/* @__PURE__ */ React24.createElement(PreviousIcon, null)
|
|
3529
|
+
), paginationModel.page !== firstPage && /* @__PURE__ */ React24.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(firstPage) }, firstPage), isMoreBeforePages && /* @__PURE__ */ React24.createElement(
|
|
3530
|
+
PaginationButton,
|
|
3531
|
+
{
|
|
3532
|
+
size,
|
|
3533
|
+
variant: "plain",
|
|
3534
|
+
color: "neutral",
|
|
3535
|
+
onClick: () => handlePageChange(paginationModel.page - 3),
|
|
3536
|
+
"aria-label": "More previous pages"
|
|
3537
|
+
},
|
|
3538
|
+
"..."
|
|
3539
|
+
), beforePages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React24.createElement(PaginationButton, { active: "true", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), isMoreAfterPages && /* @__PURE__ */ React24.createElement(
|
|
3540
|
+
PaginationButton,
|
|
3541
|
+
{
|
|
3542
|
+
size,
|
|
3543
|
+
variant: "plain",
|
|
3544
|
+
color: "neutral",
|
|
3545
|
+
"aria-label": "More next pages",
|
|
3546
|
+
onClick: () => handlePageChange(paginationModel.page + 3)
|
|
3547
|
+
},
|
|
3548
|
+
"..."
|
|
3549
|
+
), paginationModel.page !== lastPage && /* @__PURE__ */ React24.createElement(PaginationButton, { size, variant: "plain", color: "neutral", onClick: () => handlePageChange(lastPage) }, lastPage), /* @__PURE__ */ React24.createElement(
|
|
3550
|
+
PaginationIconButton,
|
|
3551
|
+
{
|
|
3552
|
+
size,
|
|
3553
|
+
variant: "plain",
|
|
3554
|
+
color: "neutral",
|
|
3555
|
+
onClick: () => handlePageChange(paginationModel.page + 1),
|
|
3556
|
+
disabled: paginationModel.page === lastPage,
|
|
3557
|
+
"aria-label": "Next page"
|
|
3558
|
+
},
|
|
3559
|
+
/* @__PURE__ */ React24.createElement(NextIcon, null)
|
|
3560
|
+
)));
|
|
3561
|
+
}
|
|
3562
|
+
Pagination.displayName = "Pagination";
|
|
3563
|
+
|
|
3564
|
+
// src/components/Pagination/index.ts
|
|
3565
|
+
var Pagination_default = Pagination;
|
|
3566
|
+
|
|
3567
|
+
// src/components/DataTable/DataTable.tsx
|
|
3530
3568
|
function Component(props, apiRef) {
|
|
3531
3569
|
const {
|
|
3532
3570
|
rows,
|
|
@@ -3574,8 +3612,8 @@ function Component(props, apiRef) {
|
|
|
3574
3612
|
...innerProps
|
|
3575
3613
|
} = props;
|
|
3576
3614
|
const tableId = useId();
|
|
3577
|
-
const parentRef =
|
|
3578
|
-
const tableBodyRef =
|
|
3615
|
+
const parentRef = useRef6(null);
|
|
3616
|
+
const tableBodyRef = useRef6(null);
|
|
3579
3617
|
const {
|
|
3580
3618
|
columns,
|
|
3581
3619
|
processedColumnGroups,
|
|
@@ -3606,29 +3644,29 @@ function Component(props, apiRef) {
|
|
|
3606
3644
|
measureElement: (element) => element.clientHeight,
|
|
3607
3645
|
overscan: 10
|
|
3608
3646
|
});
|
|
3609
|
-
const paginationModel =
|
|
3647
|
+
const paginationModel = useMemo10(() => ({ page, pageSize }), [page, pageSize]);
|
|
3610
3648
|
const totalSize = virtualizer.getTotalSize();
|
|
3611
3649
|
const virtualizedItems = virtualizer.getVirtualItems();
|
|
3612
|
-
const getRowClickHandler =
|
|
3650
|
+
const getRowClickHandler = useCallback11(
|
|
3613
3651
|
(row, rowId) => (e) => {
|
|
3614
3652
|
onRowClick?.({ row, rowId }, e);
|
|
3615
3653
|
checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
|
|
3616
3654
|
},
|
|
3617
3655
|
[onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
|
|
3618
3656
|
);
|
|
3619
|
-
const getRowFocusHandler =
|
|
3657
|
+
const getRowFocusHandler = useCallback11(
|
|
3620
3658
|
(rowId) => () => {
|
|
3621
3659
|
onRowFocus(rowId);
|
|
3622
3660
|
},
|
|
3623
3661
|
[onRowFocus]
|
|
3624
3662
|
);
|
|
3625
|
-
const getCheckboxClickHandler =
|
|
3663
|
+
const getCheckboxClickHandler = useCallback11(
|
|
3626
3664
|
() => (e) => {
|
|
3627
3665
|
e.stopPropagation();
|
|
3628
3666
|
},
|
|
3629
3667
|
[]
|
|
3630
3668
|
);
|
|
3631
|
-
const getCheckboxChangeHandler =
|
|
3669
|
+
const getCheckboxChangeHandler = useCallback11(
|
|
3632
3670
|
(rowId, row) => (e) => {
|
|
3633
3671
|
if (isRowSelectableCheck(rowId, row)) {
|
|
3634
3672
|
onCheckboxChange(e, rowId);
|
|
@@ -3652,7 +3690,7 @@ function Component(props, apiRef) {
|
|
|
3652
3690
|
});
|
|
3653
3691
|
}
|
|
3654
3692
|
}));
|
|
3655
|
-
return /* @__PURE__ */
|
|
3693
|
+
return /* @__PURE__ */ React25.createElement(
|
|
3656
3694
|
Box_default,
|
|
3657
3695
|
{
|
|
3658
3696
|
sx: {
|
|
@@ -3662,7 +3700,7 @@ function Component(props, apiRef) {
|
|
|
3662
3700
|
flexDirection: "column"
|
|
3663
3701
|
}
|
|
3664
3702
|
},
|
|
3665
|
-
(!!checkboxSelection || !!Toolbar) && /* @__PURE__ */
|
|
3703
|
+
(!!checkboxSelection || !!Toolbar) && /* @__PURE__ */ React25.createElement(
|
|
3666
3704
|
Stack_default,
|
|
3667
3705
|
{
|
|
3668
3706
|
direction: "row",
|
|
@@ -3672,10 +3710,10 @@ function Component(props, apiRef) {
|
|
|
3672
3710
|
justifyContent: "space-between",
|
|
3673
3711
|
alignItems: "center"
|
|
3674
3712
|
},
|
|
3675
|
-
!!checkboxSelection && /* @__PURE__ */
|
|
3676
|
-
Toolbar && /* @__PURE__ */
|
|
3713
|
+
!!checkboxSelection && /* @__PURE__ */ React25.createElement(Stack_default, { direction: "row", spacing: 1 }, !isAllSelected && /* @__PURE__ */ React25.createElement(Typography_default, { level: "body-xs" }, numberFormatter(selectionModel?.length || 0), " items selected"), isAllSelected && !isTotalSelected && /* @__PURE__ */ React25.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React25.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectionModel?.length || 0), " items on this page are selected."), /* @__PURE__ */ React25.createElement(Button_default, { size: "sm", variant: "plain", onClick: onTotalSelect }, "Select all ", numberFormatter(selectableRowCount), " items")), isTotalSelected && /* @__PURE__ */ React25.createElement(Stack_default, { direction: "row", spacing: 1, alignItems: "center" }, /* @__PURE__ */ React25.createElement(Typography_default, { level: "body-xs" }, "All ", numberFormatter(selectableRowCount), " items are selected."), /* @__PURE__ */ React25.createElement(Button_default, { size: "sm", variant: "plain", color: "danger", onClick: onTotalSelect }, "Cancel"))),
|
|
3714
|
+
Toolbar && /* @__PURE__ */ React25.createElement(Toolbar, { ...toolbarProps || {} })
|
|
3677
3715
|
),
|
|
3678
|
-
/* @__PURE__ */
|
|
3716
|
+
/* @__PURE__ */ React25.createElement(
|
|
3679
3717
|
Sheet_default,
|
|
3680
3718
|
{
|
|
3681
3719
|
variant: "outlined",
|
|
@@ -3696,14 +3734,14 @@ function Component(props, apiRef) {
|
|
|
3696
3734
|
ref: parentRef,
|
|
3697
3735
|
...backgroundProps
|
|
3698
3736
|
},
|
|
3699
|
-
/* @__PURE__ */
|
|
3737
|
+
/* @__PURE__ */ React25.createElement(Table, { ...innerProps }, /* @__PURE__ */ React25.createElement("colgroup", null, checkboxSelection && /* @__PURE__ */ React25.createElement(
|
|
3700
3738
|
"col",
|
|
3701
3739
|
{
|
|
3702
3740
|
style: {
|
|
3703
3741
|
width: "40px"
|
|
3704
3742
|
}
|
|
3705
3743
|
}
|
|
3706
|
-
), columns.map((c) => /* @__PURE__ */
|
|
3744
|
+
), columns.map((c) => /* @__PURE__ */ React25.createElement(
|
|
3707
3745
|
"col",
|
|
3708
3746
|
{
|
|
3709
3747
|
ref: c.tableColRef,
|
|
@@ -3712,7 +3750,7 @@ function Component(props, apiRef) {
|
|
|
3712
3750
|
width: c.width
|
|
3713
3751
|
}
|
|
3714
3752
|
}
|
|
3715
|
-
))), /* @__PURE__ */
|
|
3753
|
+
))), /* @__PURE__ */ React25.createElement("thead", null, processedColumnGroups && processedColumnGroups.groups.map((levelGroups, level) => /* @__PURE__ */ React25.createElement("tr", { key: `group-level-${level}` }, checkboxSelection && level === 0 && /* @__PURE__ */ React25.createElement(
|
|
3716
3754
|
"th",
|
|
3717
3755
|
{
|
|
3718
3756
|
rowSpan: processedColumnGroups.maxLevel + 2,
|
|
@@ -3722,7 +3760,7 @@ function Component(props, apiRef) {
|
|
|
3722
3760
|
verticalAlign: "middle"
|
|
3723
3761
|
}
|
|
3724
3762
|
},
|
|
3725
|
-
/* @__PURE__ */
|
|
3763
|
+
/* @__PURE__ */ React25.createElement(
|
|
3726
3764
|
RenderCheckbox,
|
|
3727
3765
|
{
|
|
3728
3766
|
onChange: onAllCheckboxChange,
|
|
@@ -3732,10 +3770,12 @@ function Component(props, apiRef) {
|
|
|
3732
3770
|
...checkboxProps
|
|
3733
3771
|
}
|
|
3734
3772
|
)
|
|
3735
|
-
), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */
|
|
3773
|
+
), level > 0 && Array.from({ length: levelGroups[0]?.startIndex || 0 }).map((_2, i) => /* @__PURE__ */ React25.createElement("th", { key: `empty-${level}-${i}` })), levelGroups.map((group, groupIndex) => {
|
|
3736
3774
|
const nextGroup = levelGroups[groupIndex + 1];
|
|
3737
3775
|
const emptyCells = nextGroup ? nextGroup.startIndex - (group.startIndex + group.colspan) : columns.length - (group.startIndex + group.colspan);
|
|
3738
|
-
|
|
3776
|
+
const params = { groupId: group.groupId };
|
|
3777
|
+
const computedHeaderClassName = group.headerClassName ? typeof group.headerClassName === "function" ? group.headerClassName(params) : group.headerClassName : void 0;
|
|
3778
|
+
return /* @__PURE__ */ React25.createElement(Fragment2, { key: group.groupId }, /* @__PURE__ */ React25.createElement(
|
|
3739
3779
|
"th",
|
|
3740
3780
|
{
|
|
3741
3781
|
colSpan: group.colspan,
|
|
@@ -3743,11 +3783,12 @@ function Component(props, apiRef) {
|
|
|
3743
3783
|
textAlign: "center",
|
|
3744
3784
|
fontWeight: "bold",
|
|
3745
3785
|
verticalAlign: "middle"
|
|
3746
|
-
}
|
|
3786
|
+
},
|
|
3787
|
+
className: computedHeaderClassName
|
|
3747
3788
|
},
|
|
3748
3789
|
group.headerName ?? group.groupId
|
|
3749
|
-
), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */
|
|
3750
|
-
}))), /* @__PURE__ */
|
|
3790
|
+
), emptyCells > 0 && Array.from({ length: emptyCells }).map((_2, i) => /* @__PURE__ */ React25.createElement("th", { key: `empty-between-${level}-${groupIndex}-${i}`, colSpan: 1 })));
|
|
3791
|
+
}))), /* @__PURE__ */ React25.createElement("tr", null, !processedColumnGroups && checkboxSelection && /* @__PURE__ */ React25.createElement(
|
|
3751
3792
|
"th",
|
|
3752
3793
|
{
|
|
3753
3794
|
style: {
|
|
@@ -3755,7 +3796,7 @@ function Component(props, apiRef) {
|
|
|
3755
3796
|
textAlign: "center"
|
|
3756
3797
|
}
|
|
3757
3798
|
},
|
|
3758
|
-
/* @__PURE__ */
|
|
3799
|
+
/* @__PURE__ */ React25.createElement(
|
|
3759
3800
|
RenderCheckbox,
|
|
3760
3801
|
{
|
|
3761
3802
|
onChange: onAllCheckboxChange,
|
|
@@ -3767,7 +3808,7 @@ function Component(props, apiRef) {
|
|
|
3767
3808
|
)
|
|
3768
3809
|
), columns.map((c, i) => (
|
|
3769
3810
|
// @ts-ignore
|
|
3770
|
-
/* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ React25.createElement(
|
|
3771
3812
|
HeadCell2,
|
|
3772
3813
|
{
|
|
3773
3814
|
tableId,
|
|
@@ -3778,7 +3819,7 @@ function Component(props, apiRef) {
|
|
|
3778
3819
|
...c
|
|
3779
3820
|
}
|
|
3780
3821
|
)
|
|
3781
|
-
)))), /* @__PURE__ */
|
|
3822
|
+
)))), /* @__PURE__ */ React25.createElement(
|
|
3782
3823
|
VirtualizedTableBody,
|
|
3783
3824
|
{
|
|
3784
3825
|
ref: tableBodyRef,
|
|
@@ -3788,7 +3829,7 @@ function Component(props, apiRef) {
|
|
|
3788
3829
|
role: "rowgroup",
|
|
3789
3830
|
"aria-label": "DataTableBody"
|
|
3790
3831
|
},
|
|
3791
|
-
!!loading && /* @__PURE__ */
|
|
3832
|
+
!!loading && /* @__PURE__ */ React25.createElement(OverlayWrapper, null, /* @__PURE__ */ React25.createElement(
|
|
3792
3833
|
"td",
|
|
3793
3834
|
{
|
|
3794
3835
|
style: {
|
|
@@ -3797,7 +3838,7 @@ function Component(props, apiRef) {
|
|
|
3797
3838
|
overflow: "visible"
|
|
3798
3839
|
}
|
|
3799
3840
|
},
|
|
3800
|
-
/* @__PURE__ */
|
|
3841
|
+
/* @__PURE__ */ React25.createElement(
|
|
3801
3842
|
Box_default,
|
|
3802
3843
|
{
|
|
3803
3844
|
sx: {
|
|
@@ -3807,7 +3848,7 @@ function Component(props, apiRef) {
|
|
|
3807
3848
|
right: 0
|
|
3808
3849
|
}
|
|
3809
3850
|
},
|
|
3810
|
-
/* @__PURE__ */
|
|
3851
|
+
/* @__PURE__ */ React25.createElement(LoadingOverlay, null)
|
|
3811
3852
|
)
|
|
3812
3853
|
)),
|
|
3813
3854
|
virtualizedItems.map((virtualizedRow, index) => {
|
|
@@ -3815,7 +3856,7 @@ function Component(props, apiRef) {
|
|
|
3815
3856
|
const row = dataInPage[rowIndex];
|
|
3816
3857
|
const rowId = getId(row, rowIndex);
|
|
3817
3858
|
const striped = stripe && (stripe === "even" && (rowIndex + 1) % 2 === 0 || stripe === "odd" && (rowIndex + 1) % 2 === 1);
|
|
3818
|
-
return /* @__PURE__ */
|
|
3859
|
+
return /* @__PURE__ */ React25.createElement(
|
|
3819
3860
|
VirtualizedTableRow,
|
|
3820
3861
|
{
|
|
3821
3862
|
key: virtualizedRow.key,
|
|
@@ -3833,7 +3874,7 @@ function Component(props, apiRef) {
|
|
|
3833
3874
|
transform: `translateY(${virtualizedRow.start - index * virtualizedRow.size}px)`
|
|
3834
3875
|
}
|
|
3835
3876
|
},
|
|
3836
|
-
checkboxSelection && /* @__PURE__ */
|
|
3877
|
+
checkboxSelection && /* @__PURE__ */ React25.createElement(
|
|
3837
3878
|
"th",
|
|
3838
3879
|
{
|
|
3839
3880
|
scope: "row",
|
|
@@ -3841,7 +3882,7 @@ function Component(props, apiRef) {
|
|
|
3841
3882
|
textAlign: "center"
|
|
3842
3883
|
}
|
|
3843
3884
|
},
|
|
3844
|
-
/* @__PURE__ */
|
|
3885
|
+
/* @__PURE__ */ React25.createElement(
|
|
3845
3886
|
RenderCheckbox,
|
|
3846
3887
|
{
|
|
3847
3888
|
onClick: getCheckboxClickHandler(),
|
|
@@ -3852,7 +3893,7 @@ function Component(props, apiRef) {
|
|
|
3852
3893
|
}
|
|
3853
3894
|
)
|
|
3854
3895
|
),
|
|
3855
|
-
/* @__PURE__ */
|
|
3896
|
+
/* @__PURE__ */ React25.createElement(
|
|
3856
3897
|
BodyRow2,
|
|
3857
3898
|
{
|
|
3858
3899
|
tableId,
|
|
@@ -3865,9 +3906,9 @@ function Component(props, apiRef) {
|
|
|
3865
3906
|
)
|
|
3866
3907
|
);
|
|
3867
3908
|
})
|
|
3868
|
-
), Footer && /* @__PURE__ */
|
|
3909
|
+
), Footer && /* @__PURE__ */ React25.createElement(Footer, null))
|
|
3869
3910
|
),
|
|
3870
|
-
pagination && /* @__PURE__ */
|
|
3911
|
+
pagination && /* @__PURE__ */ React25.createElement(
|
|
3871
3912
|
Pagination_default,
|
|
3872
3913
|
{
|
|
3873
3914
|
pt: 2,
|
|
@@ -3884,12 +3925,12 @@ var DataTable = forwardRef7(Component);
|
|
|
3884
3925
|
DataTable.displayName = "DataTable";
|
|
3885
3926
|
|
|
3886
3927
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
3887
|
-
import
|
|
3928
|
+
import React26, { forwardRef as forwardRef8, useCallback as useCallback12, useEffect as useEffect7, useImperativeHandle as useImperativeHandle3, useMemo as useMemo11, useRef as useRef7, useState as useState8 } from "react";
|
|
3888
3929
|
import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
|
|
3889
3930
|
import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
|
|
3890
|
-
import { styled as
|
|
3931
|
+
import { styled as styled14, useThemeProps as useThemeProps5 } from "@mui/joy";
|
|
3891
3932
|
import { FocusTrap as FocusTrap2, ClickAwayListener as ClickAwayListener2, Popper as Popper3 } from "@mui/base";
|
|
3892
|
-
var CalendarButton2 =
|
|
3933
|
+
var CalendarButton2 = styled14(IconButton_default, {
|
|
3893
3934
|
name: "DateRangePicker",
|
|
3894
3935
|
slot: "calendarButton"
|
|
3895
3936
|
})(({ theme }) => ({
|
|
@@ -3899,13 +3940,13 @@ var CalendarButton2 = styled13(IconButton_default, {
|
|
|
3899
3940
|
outline: `${theme.getCssVar("focus-thickness")} solid ${theme.getCssVar("palette-focusVisible")}`
|
|
3900
3941
|
}
|
|
3901
3942
|
}));
|
|
3902
|
-
var StyledPopper2 =
|
|
3943
|
+
var StyledPopper2 = styled14(Popper3, {
|
|
3903
3944
|
name: "DateRangePicker",
|
|
3904
3945
|
slot: "popper"
|
|
3905
3946
|
})(({ theme }) => ({
|
|
3906
3947
|
zIndex: theme.zIndex.tooltip
|
|
3907
3948
|
}));
|
|
3908
|
-
var CalendarSheet2 =
|
|
3949
|
+
var CalendarSheet2 = styled14(Sheet_default, {
|
|
3909
3950
|
name: "DateRangePicker",
|
|
3910
3951
|
slot: "sheet",
|
|
3911
3952
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -3915,7 +3956,7 @@ var CalendarSheet2 = styled13(Sheet_default, {
|
|
|
3915
3956
|
boxShadow: theme.shadow.md,
|
|
3916
3957
|
borderRadius: theme.radius.md
|
|
3917
3958
|
}));
|
|
3918
|
-
var DateRangePickerRoot =
|
|
3959
|
+
var DateRangePickerRoot = styled14("div", {
|
|
3919
3960
|
name: "DateRangePicker",
|
|
3920
3961
|
slot: "root",
|
|
3921
3962
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -3985,9 +4026,9 @@ var parseDates = (str, format) => {
|
|
|
3985
4026
|
var formatToPattern2 = (format) => {
|
|
3986
4027
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "M").replace(/DD/g, "D").replace(/[^YMD\s]/g, (match) => `${match}\``);
|
|
3987
4028
|
};
|
|
3988
|
-
var TextMaskAdapter5 =
|
|
4029
|
+
var TextMaskAdapter5 = React26.forwardRef(function TextMaskAdapter6(props, ref) {
|
|
3989
4030
|
const { onChange, format, ...other } = props;
|
|
3990
|
-
return /* @__PURE__ */
|
|
4031
|
+
return /* @__PURE__ */ React26.createElement(
|
|
3991
4032
|
IMaskInput2,
|
|
3992
4033
|
{
|
|
3993
4034
|
...other,
|
|
@@ -4045,23 +4086,23 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4045
4086
|
readOnly,
|
|
4046
4087
|
...innerProps
|
|
4047
4088
|
} = props;
|
|
4048
|
-
const innerRef =
|
|
4049
|
-
const buttonRef =
|
|
4089
|
+
const innerRef = useRef7(null);
|
|
4090
|
+
const buttonRef = useRef7(null);
|
|
4050
4091
|
const [value, setValue] = useControlledState(
|
|
4051
4092
|
props.value,
|
|
4052
4093
|
props.defaultValue || "",
|
|
4053
|
-
|
|
4094
|
+
useCallback12((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
4054
4095
|
);
|
|
4055
|
-
const [displayValue, setDisplayValue] =
|
|
4096
|
+
const [displayValue, setDisplayValue] = useState8(
|
|
4056
4097
|
() => value ? formatValueString2(parseDates(value, format), displayFormat) : ""
|
|
4057
4098
|
);
|
|
4058
|
-
const [anchorEl, setAnchorEl] =
|
|
4099
|
+
const [anchorEl, setAnchorEl] = useState8(null);
|
|
4059
4100
|
const open = Boolean(anchorEl);
|
|
4060
|
-
const calendarValue =
|
|
4101
|
+
const calendarValue = useMemo11(
|
|
4061
4102
|
() => value ? parseDates(value, format) : void 0,
|
|
4062
4103
|
[value, format]
|
|
4063
4104
|
);
|
|
4064
|
-
|
|
4105
|
+
useEffect7(() => {
|
|
4065
4106
|
if (value) {
|
|
4066
4107
|
try {
|
|
4067
4108
|
const dates = parseDates(value, format);
|
|
@@ -4073,13 +4114,13 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4073
4114
|
setDisplayValue("");
|
|
4074
4115
|
}
|
|
4075
4116
|
}, [displayFormat, value, format]);
|
|
4076
|
-
|
|
4117
|
+
useEffect7(() => {
|
|
4077
4118
|
if (!anchorEl) {
|
|
4078
4119
|
innerRef.current?.blur();
|
|
4079
4120
|
}
|
|
4080
4121
|
}, [anchorEl, innerRef]);
|
|
4081
4122
|
useImperativeHandle3(ref, () => innerRef.current, [innerRef]);
|
|
4082
|
-
const handleChange =
|
|
4123
|
+
const handleChange = useCallback12(
|
|
4083
4124
|
(event) => {
|
|
4084
4125
|
const value2 = event.target.value;
|
|
4085
4126
|
setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat) : value2);
|
|
@@ -4087,7 +4128,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4087
4128
|
},
|
|
4088
4129
|
[displayFormat, format, setValue]
|
|
4089
4130
|
);
|
|
4090
|
-
const handleDisplayInputChange =
|
|
4131
|
+
const handleDisplayInputChange = useCallback12(
|
|
4091
4132
|
(event) => {
|
|
4092
4133
|
if (event.target.value === "") {
|
|
4093
4134
|
handleChange({
|
|
@@ -4112,14 +4153,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4112
4153
|
},
|
|
4113
4154
|
[displayFormat, format, handleChange, props.name]
|
|
4114
4155
|
);
|
|
4115
|
-
const handleCalendarToggle =
|
|
4156
|
+
const handleCalendarToggle = useCallback12(
|
|
4116
4157
|
(event) => {
|
|
4117
4158
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
4118
4159
|
innerRef.current?.focus();
|
|
4119
4160
|
},
|
|
4120
4161
|
[anchorEl, setAnchorEl, innerRef]
|
|
4121
4162
|
);
|
|
4122
|
-
const handleCalendarChange =
|
|
4163
|
+
const handleCalendarChange = useCallback12(
|
|
4123
4164
|
([date1, date2]) => {
|
|
4124
4165
|
if (!date1 || !date2) return;
|
|
4125
4166
|
const formattedValue = formatValueString2([date1, date2], format);
|
|
@@ -4133,7 +4174,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4133
4174
|
},
|
|
4134
4175
|
[props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat]
|
|
4135
4176
|
);
|
|
4136
|
-
const handleInputMouseDown =
|
|
4177
|
+
const handleInputMouseDown = useCallback12(
|
|
4137
4178
|
(event) => {
|
|
4138
4179
|
if (inputReadOnly) {
|
|
4139
4180
|
event.preventDefault();
|
|
@@ -4142,7 +4183,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4142
4183
|
},
|
|
4143
4184
|
[inputReadOnly, buttonRef]
|
|
4144
4185
|
);
|
|
4145
|
-
return /* @__PURE__ */
|
|
4186
|
+
return /* @__PURE__ */ React26.createElement(DateRangePickerRoot, null, /* @__PURE__ */ React26.createElement(FocusTrap2, { open: true }, /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
|
|
4146
4187
|
Input_default,
|
|
4147
4188
|
{
|
|
4148
4189
|
...innerProps,
|
|
@@ -4170,7 +4211,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4170
4211
|
error,
|
|
4171
4212
|
className,
|
|
4172
4213
|
sx,
|
|
4173
|
-
endDecorator: /* @__PURE__ */
|
|
4214
|
+
endDecorator: /* @__PURE__ */ React26.createElement(
|
|
4174
4215
|
CalendarButton2,
|
|
4175
4216
|
{
|
|
4176
4217
|
ref: buttonRef,
|
|
@@ -4182,13 +4223,13 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4182
4223
|
"aria-expanded": open,
|
|
4183
4224
|
disabled
|
|
4184
4225
|
},
|
|
4185
|
-
/* @__PURE__ */
|
|
4226
|
+
/* @__PURE__ */ React26.createElement(CalendarTodayIcon2, null)
|
|
4186
4227
|
),
|
|
4187
4228
|
label,
|
|
4188
4229
|
helperText,
|
|
4189
4230
|
readOnly: readOnly || inputReadOnly
|
|
4190
4231
|
}
|
|
4191
|
-
), open && /* @__PURE__ */
|
|
4232
|
+
), open && /* @__PURE__ */ React26.createElement(ClickAwayListener2, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React26.createElement(
|
|
4192
4233
|
StyledPopper2,
|
|
4193
4234
|
{
|
|
4194
4235
|
id: "date-range-picker-popper",
|
|
@@ -4207,7 +4248,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4207
4248
|
"aria-label": "Calendar Tooltip",
|
|
4208
4249
|
"aria-expanded": open
|
|
4209
4250
|
},
|
|
4210
|
-
/* @__PURE__ */
|
|
4251
|
+
/* @__PURE__ */ React26.createElement(CalendarSheet2, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React26.createElement(
|
|
4211
4252
|
Calendar_default,
|
|
4212
4253
|
{
|
|
4213
4254
|
rangeSelection: true,
|
|
@@ -4218,14 +4259,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4218
4259
|
disableFuture,
|
|
4219
4260
|
disablePast
|
|
4220
4261
|
}
|
|
4221
|
-
), !hideClearButton && /* @__PURE__ */
|
|
4262
|
+
), !hideClearButton && /* @__PURE__ */ React26.createElement(
|
|
4222
4263
|
DialogActions_default,
|
|
4223
4264
|
{
|
|
4224
4265
|
sx: {
|
|
4225
4266
|
p: 1
|
|
4226
4267
|
}
|
|
4227
4268
|
},
|
|
4228
|
-
/* @__PURE__ */
|
|
4269
|
+
/* @__PURE__ */ React26.createElement(
|
|
4229
4270
|
Button_default,
|
|
4230
4271
|
{
|
|
4231
4272
|
size,
|
|
@@ -4245,10 +4286,10 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
4245
4286
|
DateRangePicker.displayName = "DateRangePicker";
|
|
4246
4287
|
|
|
4247
4288
|
// src/components/DialogContent/DialogContent.tsx
|
|
4248
|
-
import { DialogContent as JoyDialogContent, styled as
|
|
4289
|
+
import { DialogContent as JoyDialogContent, styled as styled15 } from "@mui/joy";
|
|
4249
4290
|
import { motion as motion22 } from "framer-motion";
|
|
4250
4291
|
var MotionDialogContent = motion22(JoyDialogContent);
|
|
4251
|
-
var StyledDialogContent =
|
|
4292
|
+
var StyledDialogContent = styled15(MotionDialogContent)(({ theme }) => ({
|
|
4252
4293
|
padding: theme.spacing(0, 6, 5)
|
|
4253
4294
|
}));
|
|
4254
4295
|
var DialogContent = StyledDialogContent;
|
|
@@ -4258,10 +4299,10 @@ DialogContent.displayName = "DialogContent";
|
|
|
4258
4299
|
var DialogContent_default = DialogContent;
|
|
4259
4300
|
|
|
4260
4301
|
// src/components/DialogTitle/DialogTitle.tsx
|
|
4261
|
-
import { DialogTitle as JoyDialogTitle, styled as
|
|
4302
|
+
import { DialogTitle as JoyDialogTitle, styled as styled16 } from "@mui/joy";
|
|
4262
4303
|
import { motion as motion23 } from "framer-motion";
|
|
4263
4304
|
var MotionDialogTitle = motion23(JoyDialogTitle);
|
|
4264
|
-
var StyledDialogTitle =
|
|
4305
|
+
var StyledDialogTitle = styled16(MotionDialogTitle)(({ theme }) => ({
|
|
4265
4306
|
padding: theme.spacing(4, 6)
|
|
4266
4307
|
}));
|
|
4267
4308
|
var DialogTitle = StyledDialogTitle;
|
|
@@ -4271,22 +4312,22 @@ DialogTitle.displayName = "DialogTitle";
|
|
|
4271
4312
|
var DialogTitle_default = DialogTitle;
|
|
4272
4313
|
|
|
4273
4314
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
4274
|
-
import
|
|
4315
|
+
import React28 from "react";
|
|
4275
4316
|
|
|
4276
4317
|
// src/components/Modal/Modal.tsx
|
|
4277
|
-
import
|
|
4318
|
+
import React27 from "react";
|
|
4278
4319
|
import {
|
|
4279
4320
|
Modal as JoyModal,
|
|
4280
4321
|
ModalDialog as JoyModalDialog,
|
|
4281
4322
|
ModalClose as JoyModalClose,
|
|
4282
4323
|
ModalOverflow as JoyModalOverflow,
|
|
4283
|
-
styled as
|
|
4324
|
+
styled as styled17
|
|
4284
4325
|
} from "@mui/joy";
|
|
4285
4326
|
import { motion as motion24 } from "framer-motion";
|
|
4286
4327
|
var MotionModal = motion24(JoyModal);
|
|
4287
4328
|
var Modal = MotionModal;
|
|
4288
4329
|
Modal.displayName = "Modal";
|
|
4289
|
-
var StyledModalDialog =
|
|
4330
|
+
var StyledModalDialog = styled17(JoyModalDialog)({
|
|
4290
4331
|
padding: 0
|
|
4291
4332
|
});
|
|
4292
4333
|
var ModalDialog = StyledModalDialog;
|
|
@@ -4297,37 +4338,37 @@ var ModalOverflow = MotionModalOverflow;
|
|
|
4297
4338
|
ModalOverflow.displayName = "ModalOverflow";
|
|
4298
4339
|
function ModalFrame(props) {
|
|
4299
4340
|
const { title, children, titleStartDecorator, onClose, ...innerProps } = props;
|
|
4300
|
-
return /* @__PURE__ */
|
|
4341
|
+
return /* @__PURE__ */ React27.createElement(StyledModalDialog, { ...innerProps }, /* @__PURE__ */ React27.createElement(ModalClose, { onClick: onClose }), /* @__PURE__ */ React27.createElement(DialogTitle_default, null, titleStartDecorator, title), /* @__PURE__ */ React27.createElement(DialogContent_default, null, children));
|
|
4301
4342
|
}
|
|
4302
4343
|
ModalFrame.displayName = "ModalFrame";
|
|
4303
4344
|
|
|
4304
4345
|
// src/components/DialogFrame/DialogFrame.tsx
|
|
4305
|
-
import { styled as
|
|
4306
|
-
var StyledDialogFrame =
|
|
4346
|
+
import { styled as styled18 } from "@mui/joy";
|
|
4347
|
+
var StyledDialogFrame = styled18(ModalDialog, {
|
|
4307
4348
|
name: "Dialog",
|
|
4308
4349
|
slot: "Root"
|
|
4309
4350
|
})({
|
|
4310
4351
|
padding: 0
|
|
4311
4352
|
});
|
|
4312
|
-
var DialogFrame =
|
|
4353
|
+
var DialogFrame = React28.forwardRef((props, ref) => {
|
|
4313
4354
|
const { title, children, actions, fullscreen, ...innerProps } = props;
|
|
4314
|
-
return /* @__PURE__ */
|
|
4355
|
+
return /* @__PURE__ */ React28.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...innerProps }, /* @__PURE__ */ React28.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React28.createElement(DialogContent_default, null, children), /* @__PURE__ */ React28.createElement(DialogActions_default, null, actions));
|
|
4315
4356
|
});
|
|
4316
4357
|
DialogFrame.displayName = "DialogFrame";
|
|
4317
4358
|
|
|
4318
4359
|
// src/components/Divider/Divider.tsx
|
|
4319
|
-
import
|
|
4360
|
+
import React29 from "react";
|
|
4320
4361
|
import { Divider as JoyDivider } from "@mui/joy";
|
|
4321
4362
|
import { motion as motion25 } from "framer-motion";
|
|
4322
4363
|
var MotionDivider = motion25(JoyDivider);
|
|
4323
4364
|
var Divider = (props) => {
|
|
4324
|
-
return /* @__PURE__ */
|
|
4365
|
+
return /* @__PURE__ */ React29.createElement(MotionDivider, { ...props });
|
|
4325
4366
|
};
|
|
4326
4367
|
Divider.displayName = "Divider";
|
|
4327
4368
|
|
|
4328
4369
|
// src/components/InsetDrawer/InsetDrawer.tsx
|
|
4329
|
-
import { Drawer as JoyDrawer, styled as
|
|
4330
|
-
var InsetDrawer =
|
|
4370
|
+
import { Drawer as JoyDrawer, styled as styled19, drawerClasses } from "@mui/joy";
|
|
4371
|
+
var InsetDrawer = styled19(JoyDrawer)(({ theme }) => ({
|
|
4331
4372
|
[`& .${drawerClasses.content}`]: {
|
|
4332
4373
|
backgroundColor: "transparent",
|
|
4333
4374
|
boxShadow: "none",
|
|
@@ -4342,16 +4383,16 @@ var InsetDrawer = styled18(JoyDrawer)(({ theme }) => ({
|
|
|
4342
4383
|
}));
|
|
4343
4384
|
|
|
4344
4385
|
// src/components/FilterMenu/FilterMenu.tsx
|
|
4345
|
-
import
|
|
4386
|
+
import React39, { useCallback as useCallback21 } from "react";
|
|
4346
4387
|
import { Button as Button2, Stack as Stack10 } from "@mui/joy";
|
|
4347
4388
|
|
|
4348
4389
|
// src/components/FilterMenu/components/CheckboxGroup.tsx
|
|
4349
|
-
import
|
|
4390
|
+
import React30, { useCallback as useCallback13 } from "react";
|
|
4350
4391
|
import { Stack as Stack2 } from "@mui/joy";
|
|
4351
4392
|
function CheckboxGroup(props) {
|
|
4352
4393
|
const { id, label, options, value, onChange, hidden } = props;
|
|
4353
4394
|
const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
|
|
4354
|
-
const handleCheckboxChange =
|
|
4395
|
+
const handleCheckboxChange = useCallback13(
|
|
4355
4396
|
(optionValue) => (event) => {
|
|
4356
4397
|
const checked = event.target.checked;
|
|
4357
4398
|
let newValue;
|
|
@@ -4367,7 +4408,7 @@ function CheckboxGroup(props) {
|
|
|
4367
4408
|
if (hidden) {
|
|
4368
4409
|
return null;
|
|
4369
4410
|
}
|
|
4370
|
-
return /* @__PURE__ */
|
|
4411
|
+
return /* @__PURE__ */ React30.createElement(Stack2, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React30.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), options.map((option) => /* @__PURE__ */ React30.createElement(
|
|
4371
4412
|
Checkbox_default,
|
|
4372
4413
|
{
|
|
4373
4414
|
key: `${id}-${option.value}`,
|
|
@@ -4380,7 +4421,7 @@ function CheckboxGroup(props) {
|
|
|
4380
4421
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
4381
4422
|
|
|
4382
4423
|
// src/components/FilterMenu/components/RadioGroup.tsx
|
|
4383
|
-
import
|
|
4424
|
+
import React31, { useCallback as useCallback14 } from "react";
|
|
4384
4425
|
|
|
4385
4426
|
// src/components/Radio/Radio.tsx
|
|
4386
4427
|
import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
|
|
@@ -4397,7 +4438,7 @@ import { Stack as Stack3 } from "@mui/joy";
|
|
|
4397
4438
|
function RadioGroup2(props) {
|
|
4398
4439
|
const { id, label, options, value, onChange, hidden } = props;
|
|
4399
4440
|
const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
|
|
4400
|
-
const handleRadioChange =
|
|
4441
|
+
const handleRadioChange = useCallback14(
|
|
4401
4442
|
(event) => {
|
|
4402
4443
|
const newValue = event.target.value;
|
|
4403
4444
|
const option = options.find((opt) => opt.value.toString() === newValue);
|
|
@@ -4409,12 +4450,12 @@ function RadioGroup2(props) {
|
|
|
4409
4450
|
if (hidden) {
|
|
4410
4451
|
return null;
|
|
4411
4452
|
}
|
|
4412
|
-
return /* @__PURE__ */
|
|
4453
|
+
return /* @__PURE__ */ React31.createElement(Stack3, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React31.createElement(Stack3, { spacing: 1 }, /* @__PURE__ */ React31.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label)), /* @__PURE__ */ React31.createElement(RadioGroup, { name: id, value: internalValue?.toString(), onChange: handleRadioChange }, options.map((option) => /* @__PURE__ */ React31.createElement(Radio, { key: `${id}-${option.value}`, value: option.value.toString(), label: option.label }))));
|
|
4413
4454
|
}
|
|
4414
4455
|
RadioGroup2.displayName = "RadioGroup";
|
|
4415
4456
|
|
|
4416
4457
|
// src/components/FilterMenu/components/DateRange.tsx
|
|
4417
|
-
import
|
|
4458
|
+
import React32, { useCallback as useCallback15, useMemo as useMemo12, useState as useState9, useEffect as useEffect8 } from "react";
|
|
4418
4459
|
import { Stack as Stack4 } from "@mui/joy";
|
|
4419
4460
|
function DateRange(props) {
|
|
4420
4461
|
const {
|
|
@@ -4433,8 +4474,8 @@ function DateRange(props) {
|
|
|
4433
4474
|
hideClearButton
|
|
4434
4475
|
} = props;
|
|
4435
4476
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
4436
|
-
const [selectedOption, setSelectedOption] =
|
|
4437
|
-
const dateRangeOptions =
|
|
4477
|
+
const [selectedOption, setSelectedOption] = useState9("all-time");
|
|
4478
|
+
const dateRangeOptions = useMemo12(
|
|
4438
4479
|
() => [
|
|
4439
4480
|
{ label: "All Time", value: "all-time" },
|
|
4440
4481
|
{ label: "This Month", value: "this-month" },
|
|
@@ -4444,7 +4485,7 @@ function DateRange(props) {
|
|
|
4444
4485
|
],
|
|
4445
4486
|
[]
|
|
4446
4487
|
);
|
|
4447
|
-
const getDateRangeForOption =
|
|
4488
|
+
const getDateRangeForOption = useCallback15(
|
|
4448
4489
|
(option) => {
|
|
4449
4490
|
const now = /* @__PURE__ */ new Date();
|
|
4450
4491
|
const currentYear = now.getFullYear();
|
|
@@ -4483,7 +4524,7 @@ function DateRange(props) {
|
|
|
4483
4524
|
},
|
|
4484
4525
|
[internalValue]
|
|
4485
4526
|
);
|
|
4486
|
-
const determineOptionFromValue =
|
|
4527
|
+
const determineOptionFromValue = useCallback15(
|
|
4487
4528
|
(value2) => {
|
|
4488
4529
|
if (!value2) {
|
|
4489
4530
|
return "all-time";
|
|
@@ -4499,17 +4540,17 @@ function DateRange(props) {
|
|
|
4499
4540
|
},
|
|
4500
4541
|
[getDateRangeForOption]
|
|
4501
4542
|
);
|
|
4502
|
-
const customDateRangeValue =
|
|
4543
|
+
const customDateRangeValue = useMemo12(() => {
|
|
4503
4544
|
if (selectedOption === "custom" && internalValue) {
|
|
4504
4545
|
return `${internalValue[0]} - ${internalValue[1]}`;
|
|
4505
4546
|
}
|
|
4506
4547
|
return "";
|
|
4507
4548
|
}, [selectedOption, internalValue]);
|
|
4508
|
-
|
|
4549
|
+
useEffect8(() => {
|
|
4509
4550
|
const newOption = determineOptionFromValue(internalValue);
|
|
4510
4551
|
setSelectedOption(newOption);
|
|
4511
4552
|
}, [internalValue, determineOptionFromValue]);
|
|
4512
|
-
const handleOptionChange =
|
|
4553
|
+
const handleOptionChange = useCallback15(
|
|
4513
4554
|
(event) => {
|
|
4514
4555
|
const newOption = event.target.value;
|
|
4515
4556
|
setSelectedOption(newOption);
|
|
@@ -4518,7 +4559,7 @@ function DateRange(props) {
|
|
|
4518
4559
|
},
|
|
4519
4560
|
[getDateRangeForOption, setInternalValue]
|
|
4520
4561
|
);
|
|
4521
|
-
const handleCustomDateChange =
|
|
4562
|
+
const handleCustomDateChange = useCallback15(
|
|
4522
4563
|
(event) => {
|
|
4523
4564
|
const dateRangeString = event.target.value;
|
|
4524
4565
|
if (dateRangeString && dateRangeString.includes(" - ")) {
|
|
@@ -4536,7 +4577,7 @@ function DateRange(props) {
|
|
|
4536
4577
|
if (hidden) {
|
|
4537
4578
|
return null;
|
|
4538
4579
|
}
|
|
4539
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ React32.createElement(Stack4, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React32.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React32.createElement(RadioGroup, { name: `${id}-options`, value: selectedOption, onChange: handleOptionChange }, dateRangeOptions.map((option) => /* @__PURE__ */ React32.createElement(Radio, { key: `${id}-${option.value}`, value: option.value, label: option.label }))), selectedOption === "custom" && /* @__PURE__ */ React32.createElement(
|
|
4540
4581
|
DateRangePicker,
|
|
4541
4582
|
{
|
|
4542
4583
|
value: customDateRangeValue,
|
|
@@ -4555,12 +4596,12 @@ function DateRange(props) {
|
|
|
4555
4596
|
DateRange.displayName = "DateRange";
|
|
4556
4597
|
|
|
4557
4598
|
// src/components/FilterMenu/components/CurrencyInput.tsx
|
|
4558
|
-
import
|
|
4599
|
+
import React33, { useCallback as useCallback16 } from "react";
|
|
4559
4600
|
import { Stack as Stack5 } from "@mui/joy";
|
|
4560
4601
|
function CurrencyInput3(props) {
|
|
4561
4602
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
4562
4603
|
const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
|
|
4563
|
-
const handleCurrencyChange =
|
|
4604
|
+
const handleCurrencyChange = useCallback16(
|
|
4564
4605
|
(event) => {
|
|
4565
4606
|
const newValue = event.target.value;
|
|
4566
4607
|
setInternalValue(newValue);
|
|
@@ -4570,7 +4611,7 @@ function CurrencyInput3(props) {
|
|
|
4570
4611
|
if (hidden) {
|
|
4571
4612
|
return null;
|
|
4572
4613
|
}
|
|
4573
|
-
return /* @__PURE__ */
|
|
4614
|
+
return /* @__PURE__ */ React33.createElement(Stack5, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React33.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React33.createElement(
|
|
4574
4615
|
CurrencyInput,
|
|
4575
4616
|
{
|
|
4576
4617
|
value: internalValue,
|
|
@@ -4586,14 +4627,14 @@ function CurrencyInput3(props) {
|
|
|
4586
4627
|
CurrencyInput3.displayName = "CurrencyInput";
|
|
4587
4628
|
|
|
4588
4629
|
// src/components/FilterMenu/components/CurrencyRange.tsx
|
|
4589
|
-
import
|
|
4630
|
+
import React34, { useCallback as useCallback17 } from "react";
|
|
4590
4631
|
import { Stack as Stack6 } from "@mui/joy";
|
|
4591
4632
|
function CurrencyRange(props) {
|
|
4592
4633
|
const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
|
|
4593
4634
|
const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
|
|
4594
4635
|
const minValue = internalValue?.[0];
|
|
4595
4636
|
const maxValue = internalValue?.[1];
|
|
4596
|
-
const handleMinChange =
|
|
4637
|
+
const handleMinChange = useCallback17(
|
|
4597
4638
|
(event) => {
|
|
4598
4639
|
const newMinValue = event.target.value;
|
|
4599
4640
|
const currentMaxValue = maxValue;
|
|
@@ -4607,7 +4648,7 @@ function CurrencyRange(props) {
|
|
|
4607
4648
|
},
|
|
4608
4649
|
[maxValue, setInternalValue]
|
|
4609
4650
|
);
|
|
4610
|
-
const handleMaxChange =
|
|
4651
|
+
const handleMaxChange = useCallback17(
|
|
4611
4652
|
(event) => {
|
|
4612
4653
|
const newMaxValue = event.target.value;
|
|
4613
4654
|
const currentMinValue = minValue;
|
|
@@ -4624,7 +4665,7 @@ function CurrencyRange(props) {
|
|
|
4624
4665
|
if (hidden) {
|
|
4625
4666
|
return null;
|
|
4626
4667
|
}
|
|
4627
|
-
return /* @__PURE__ */
|
|
4668
|
+
return /* @__PURE__ */ React34.createElement(Stack6, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React34.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React34.createElement(Stack6, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React34.createElement(
|
|
4628
4669
|
CurrencyInput,
|
|
4629
4670
|
{
|
|
4630
4671
|
label: "Minimum",
|
|
@@ -4637,7 +4678,7 @@ function CurrencyRange(props) {
|
|
|
4637
4678
|
"aria-labelledby": label ? id : void 0,
|
|
4638
4679
|
"aria-label": "Minimum amount"
|
|
4639
4680
|
}
|
|
4640
|
-
), /* @__PURE__ */
|
|
4681
|
+
), /* @__PURE__ */ React34.createElement(
|
|
4641
4682
|
CurrencyInput,
|
|
4642
4683
|
{
|
|
4643
4684
|
label: "Maximum",
|
|
@@ -4655,20 +4696,20 @@ function CurrencyRange(props) {
|
|
|
4655
4696
|
CurrencyRange.displayName = "CurrencyRange";
|
|
4656
4697
|
|
|
4657
4698
|
// src/components/FilterMenu/components/PercentageInput.tsx
|
|
4658
|
-
import
|
|
4699
|
+
import React36 from "react";
|
|
4659
4700
|
import { Stack as Stack7, Typography as Typography2 } from "@mui/joy";
|
|
4660
4701
|
|
|
4661
4702
|
// src/components/PercentageInput/PercentageInput.tsx
|
|
4662
|
-
import
|
|
4703
|
+
import React35, { useCallback as useCallback18, useMemo as useMemo13, useState as useState10 } from "react";
|
|
4663
4704
|
import { NumericFormat as NumericFormat2 } from "react-number-format";
|
|
4664
|
-
import { styled as
|
|
4705
|
+
import { styled as styled20, useThemeProps as useThemeProps6 } from "@mui/joy";
|
|
4665
4706
|
var padDecimal = (value, decimalScale) => {
|
|
4666
4707
|
const [integer, decimal = ""] = `${value}`.split(".");
|
|
4667
4708
|
return Number(`${integer}${decimal.padEnd(decimalScale, "0")}`);
|
|
4668
4709
|
};
|
|
4669
|
-
var TextMaskAdapter7 =
|
|
4710
|
+
var TextMaskAdapter7 = React35.forwardRef(function TextMaskAdapter8(props, ref) {
|
|
4670
4711
|
const { onChange, min, max, ...innerProps } = props;
|
|
4671
|
-
return /* @__PURE__ */
|
|
4712
|
+
return /* @__PURE__ */ React35.createElement(
|
|
4672
4713
|
NumericFormat2,
|
|
4673
4714
|
{
|
|
4674
4715
|
...innerProps,
|
|
@@ -4688,12 +4729,12 @@ var TextMaskAdapter7 = React33.forwardRef(function TextMaskAdapter8(props, ref)
|
|
|
4688
4729
|
}
|
|
4689
4730
|
);
|
|
4690
4731
|
});
|
|
4691
|
-
var PercentageInputRoot =
|
|
4732
|
+
var PercentageInputRoot = styled20(Input_default, {
|
|
4692
4733
|
name: "PercentageInput",
|
|
4693
4734
|
slot: "Root",
|
|
4694
4735
|
overridesResolver: (props, styles) => styles.root
|
|
4695
4736
|
})({});
|
|
4696
|
-
var PercentageInput =
|
|
4737
|
+
var PercentageInput = React35.forwardRef(
|
|
4697
4738
|
function PercentageInput2(inProps, ref) {
|
|
4698
4739
|
const props = useThemeProps6({ props: inProps, name: "PercentageInput" });
|
|
4699
4740
|
const {
|
|
@@ -4716,18 +4757,18 @@ var PercentageInput = React33.forwardRef(
|
|
|
4716
4757
|
const [_value, setValue] = useControlledState(
|
|
4717
4758
|
props.value,
|
|
4718
4759
|
props.defaultValue,
|
|
4719
|
-
|
|
4760
|
+
useCallback18((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
|
|
4720
4761
|
);
|
|
4721
|
-
const [internalError, setInternalError] =
|
|
4762
|
+
const [internalError, setInternalError] = useState10(
|
|
4722
4763
|
max && _value && _value > max || min && _value && _value < min
|
|
4723
4764
|
);
|
|
4724
|
-
const value =
|
|
4765
|
+
const value = useMemo13(() => {
|
|
4725
4766
|
if (_value && useMinorUnit) {
|
|
4726
4767
|
return _value / Math.pow(10, maxDecimalScale);
|
|
4727
4768
|
}
|
|
4728
4769
|
return _value;
|
|
4729
4770
|
}, [_value, useMinorUnit, maxDecimalScale]);
|
|
4730
|
-
const handleChange =
|
|
4771
|
+
const handleChange = useCallback18(
|
|
4731
4772
|
(event) => {
|
|
4732
4773
|
if (event.target.value === "") {
|
|
4733
4774
|
setValue(void 0);
|
|
@@ -4744,7 +4785,7 @@ var PercentageInput = React33.forwardRef(
|
|
|
4744
4785
|
},
|
|
4745
4786
|
[setValue, useMinorUnit, maxDecimalScale, min, max]
|
|
4746
4787
|
);
|
|
4747
|
-
return /* @__PURE__ */
|
|
4788
|
+
return /* @__PURE__ */ React35.createElement(
|
|
4748
4789
|
PercentageInputRoot,
|
|
4749
4790
|
{
|
|
4750
4791
|
...innerProps,
|
|
@@ -4791,7 +4832,7 @@ var PercentageInput3 = ({
|
|
|
4791
4832
|
if (hidden) {
|
|
4792
4833
|
return null;
|
|
4793
4834
|
}
|
|
4794
|
-
return /* @__PURE__ */
|
|
4835
|
+
return /* @__PURE__ */ React36.createElement(Stack7, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React36.createElement(Typography2, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React36.createElement(
|
|
4795
4836
|
PercentageInput,
|
|
4796
4837
|
{
|
|
4797
4838
|
value: _value,
|
|
@@ -4806,7 +4847,7 @@ var PercentageInput3 = ({
|
|
|
4806
4847
|
};
|
|
4807
4848
|
|
|
4808
4849
|
// src/components/FilterMenu/components/PercentageRange.tsx
|
|
4809
|
-
import
|
|
4850
|
+
import React37, { useCallback as useCallback19 } from "react";
|
|
4810
4851
|
import { Stack as Stack8 } from "@mui/joy";
|
|
4811
4852
|
function PercentageRange(props) {
|
|
4812
4853
|
const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
|
|
@@ -4817,7 +4858,7 @@ function PercentageRange(props) {
|
|
|
4817
4858
|
);
|
|
4818
4859
|
const minValue = internalValue?.[0];
|
|
4819
4860
|
const maxValue = internalValue?.[1];
|
|
4820
|
-
const handleMinChange =
|
|
4861
|
+
const handleMinChange = useCallback19(
|
|
4821
4862
|
(event) => {
|
|
4822
4863
|
const newMinValue = event.target.value;
|
|
4823
4864
|
const currentMaxValue = maxValue;
|
|
@@ -4829,7 +4870,7 @@ function PercentageRange(props) {
|
|
|
4829
4870
|
},
|
|
4830
4871
|
[maxValue, setInternalValue]
|
|
4831
4872
|
);
|
|
4832
|
-
const handleMaxChange =
|
|
4873
|
+
const handleMaxChange = useCallback19(
|
|
4833
4874
|
(event) => {
|
|
4834
4875
|
const newMaxValue = event.target.value;
|
|
4835
4876
|
const currentMinValue = minValue;
|
|
@@ -4844,7 +4885,7 @@ function PercentageRange(props) {
|
|
|
4844
4885
|
if (hidden) {
|
|
4845
4886
|
return null;
|
|
4846
4887
|
}
|
|
4847
|
-
return /* @__PURE__ */
|
|
4888
|
+
return /* @__PURE__ */ React37.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React37.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React37.createElement(Stack8, { direction: "row", spacing: 2, alignItems: "flex-end" }, /* @__PURE__ */ React37.createElement(
|
|
4848
4889
|
PercentageInput,
|
|
4849
4890
|
{
|
|
4850
4891
|
label: "Minimum",
|
|
@@ -4858,7 +4899,7 @@ function PercentageRange(props) {
|
|
|
4858
4899
|
"aria-label": "Minimum percentage",
|
|
4859
4900
|
placeholder: "0%"
|
|
4860
4901
|
}
|
|
4861
|
-
), /* @__PURE__ */
|
|
4902
|
+
), /* @__PURE__ */ React37.createElement(
|
|
4862
4903
|
PercentageInput,
|
|
4863
4904
|
{
|
|
4864
4905
|
label: "Maximum",
|
|
@@ -4877,13 +4918,13 @@ function PercentageRange(props) {
|
|
|
4877
4918
|
PercentageRange.displayName = "PercentageRange";
|
|
4878
4919
|
|
|
4879
4920
|
// src/components/FilterMenu/components/Autocomplete.tsx
|
|
4880
|
-
import
|
|
4921
|
+
import React38, { useCallback as useCallback20 } from "react";
|
|
4881
4922
|
import { Stack as Stack9 } from "@mui/joy";
|
|
4882
4923
|
function Autocomplete2(props) {
|
|
4883
4924
|
const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
|
|
4884
4925
|
const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
|
|
4885
4926
|
const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
|
|
4886
|
-
const handleChange =
|
|
4927
|
+
const handleChange = useCallback20(
|
|
4887
4928
|
(event) => {
|
|
4888
4929
|
const val = event.target.value;
|
|
4889
4930
|
if (val) {
|
|
@@ -4898,7 +4939,7 @@ function Autocomplete2(props) {
|
|
|
4898
4939
|
if (hidden) {
|
|
4899
4940
|
return null;
|
|
4900
4941
|
}
|
|
4901
|
-
return /* @__PURE__ */
|
|
4942
|
+
return /* @__PURE__ */ React38.createElement(Stack9, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React38.createElement(Typography_default, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React38.createElement(
|
|
4902
4943
|
Autocomplete,
|
|
4903
4944
|
{
|
|
4904
4945
|
value: autocompleteValue,
|
|
@@ -4931,7 +4972,7 @@ function FilterMenu(props) {
|
|
|
4931
4972
|
void 0
|
|
4932
4973
|
// onChange는 Apply 버튼에서만 호출
|
|
4933
4974
|
);
|
|
4934
|
-
const handleFilterChange =
|
|
4975
|
+
const handleFilterChange = useCallback21(
|
|
4935
4976
|
(filterId, value) => {
|
|
4936
4977
|
setInternalValues((prev) => ({
|
|
4937
4978
|
...prev,
|
|
@@ -4940,17 +4981,17 @@ function FilterMenu(props) {
|
|
|
4940
4981
|
},
|
|
4941
4982
|
[setInternalValues]
|
|
4942
4983
|
);
|
|
4943
|
-
const handleApply =
|
|
4984
|
+
const handleApply = useCallback21(() => {
|
|
4944
4985
|
onChange?.(internalValues);
|
|
4945
4986
|
onClose?.();
|
|
4946
4987
|
}, [onChange, onClose, internalValues]);
|
|
4947
|
-
const handleClear =
|
|
4988
|
+
const handleClear = useCallback21(() => {
|
|
4948
4989
|
const clearedValues = resetValues || {};
|
|
4949
4990
|
setInternalValues(clearedValues);
|
|
4950
4991
|
onChange?.(clearedValues);
|
|
4951
4992
|
onClose?.();
|
|
4952
4993
|
}, [resetValues, setInternalValues, onChange, onClose]);
|
|
4953
|
-
return /* @__PURE__ */
|
|
4994
|
+
return /* @__PURE__ */ React39.createElement(
|
|
4954
4995
|
ModalDialog,
|
|
4955
4996
|
{
|
|
4956
4997
|
sx: {
|
|
@@ -4960,9 +5001,9 @@ function FilterMenu(props) {
|
|
|
4960
5001
|
top: "initial"
|
|
4961
5002
|
}
|
|
4962
5003
|
},
|
|
4963
|
-
/* @__PURE__ */
|
|
5004
|
+
/* @__PURE__ */ React39.createElement(DialogContent, { sx: { paddingTop: 5 } }, /* @__PURE__ */ React39.createElement(Stack10, { spacing: 6 }, filters?.map((filter) => {
|
|
4964
5005
|
const FilterComponent = componentMap[filter.type];
|
|
4965
|
-
return FilterComponent ? /* @__PURE__ */
|
|
5006
|
+
return FilterComponent ? /* @__PURE__ */ React39.createElement(
|
|
4966
5007
|
FilterComponent,
|
|
4967
5008
|
{
|
|
4968
5009
|
key: filter.id,
|
|
@@ -4974,14 +5015,14 @@ function FilterMenu(props) {
|
|
|
4974
5015
|
}
|
|
4975
5016
|
) : null;
|
|
4976
5017
|
}))),
|
|
4977
|
-
/* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ React39.createElement(DialogActions, { sx: { justifyContent: "space-between" } }, useClear && filters?.length === 1 && /* @__PURE__ */ React39.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Clear"), useReset && !useClear && /* @__PURE__ */ React39.createElement(Button2, { variant: "plain", color: "neutral", size: "md", onClick: handleClear }, "Reset"), /* @__PURE__ */ React39.createElement(Button2, { variant: "solid", color: "primary", size: "md", onClick: handleApply }, "Apply"))
|
|
4978
5019
|
);
|
|
4979
5020
|
}
|
|
4980
5021
|
FilterMenu.displayName = "FilterMenu";
|
|
4981
5022
|
|
|
4982
5023
|
// src/components/Uploader/Uploader.tsx
|
|
4983
|
-
import
|
|
4984
|
-
import { styled as
|
|
5024
|
+
import React40, { useCallback as useCallback22, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef8, useState as useState11 } from "react";
|
|
5025
|
+
import { styled as styled21, Input as Input2 } from "@mui/joy";
|
|
4985
5026
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
4986
5027
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
4987
5028
|
import MuiClearIcon from "@mui/icons-material/ClearRounded";
|
|
@@ -5003,7 +5044,7 @@ var esmFiles = {
|
|
|
5003
5044
|
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js"
|
|
5004
5045
|
)
|
|
5005
5046
|
};
|
|
5006
|
-
var VisuallyHiddenInput =
|
|
5047
|
+
var VisuallyHiddenInput = styled21(Input2)({
|
|
5007
5048
|
width: "1px",
|
|
5008
5049
|
height: "1px",
|
|
5009
5050
|
overflow: "hidden",
|
|
@@ -5012,18 +5053,18 @@ var VisuallyHiddenInput = styled20(Input2)({
|
|
|
5012
5053
|
clipPath: "inset(50%)",
|
|
5013
5054
|
position: "absolute"
|
|
5014
5055
|
});
|
|
5015
|
-
var PreviewRoot =
|
|
5056
|
+
var PreviewRoot = styled21(Stack_default, {
|
|
5016
5057
|
name: "Uploader",
|
|
5017
5058
|
slot: "PreviewRoot"
|
|
5018
5059
|
})({});
|
|
5019
|
-
var UploadCard =
|
|
5060
|
+
var UploadCard = styled21(Card, {
|
|
5020
5061
|
name: "Uploader",
|
|
5021
5062
|
slot: "UploadCard"
|
|
5022
5063
|
})(({ theme }) => ({
|
|
5023
5064
|
padding: theme.spacing(2.5),
|
|
5024
5065
|
border: `1px solid ${theme.palette.neutral.outlinedBorder}`
|
|
5025
5066
|
}));
|
|
5026
|
-
var UploadFileIcon =
|
|
5067
|
+
var UploadFileIcon = styled21(MuiUploadFileIcon, {
|
|
5027
5068
|
name: "Uploader",
|
|
5028
5069
|
slot: "UploadFileIcon"
|
|
5029
5070
|
})(({ theme }) => ({
|
|
@@ -5031,7 +5072,7 @@ var UploadFileIcon = styled20(MuiUploadFileIcon, {
|
|
|
5031
5072
|
width: "32px",
|
|
5032
5073
|
height: "32px"
|
|
5033
5074
|
}));
|
|
5034
|
-
var ClearIcon2 =
|
|
5075
|
+
var ClearIcon2 = styled21(MuiClearIcon, {
|
|
5035
5076
|
name: "Uploader",
|
|
5036
5077
|
slot: "ClearIcon"
|
|
5037
5078
|
})(({ theme }) => ({
|
|
@@ -5057,15 +5098,15 @@ var getFileSize = (n) => {
|
|
|
5057
5098
|
};
|
|
5058
5099
|
var Preview = (props) => {
|
|
5059
5100
|
const { files, uploaded, onDelete } = props;
|
|
5060
|
-
return /* @__PURE__ */
|
|
5101
|
+
return /* @__PURE__ */ React40.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React40.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React40.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React40.createElement(UploadFileIcon, null), /* @__PURE__ */ React40.createElement(Stack_default, { flex: "1" }, /* @__PURE__ */ React40.createElement(Typography_default, { level: "body-sm", textColor: "common.black" }, file.name), !!file.size && /* @__PURE__ */ React40.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React40.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React40.createElement(ClearIcon2, null))))));
|
|
5061
5102
|
};
|
|
5062
|
-
var UploaderRoot =
|
|
5103
|
+
var UploaderRoot = styled21(Stack_default, {
|
|
5063
5104
|
name: "Uploader",
|
|
5064
5105
|
slot: "root"
|
|
5065
5106
|
})(({ theme }) => ({
|
|
5066
5107
|
gap: theme.spacing(2)
|
|
5067
5108
|
}));
|
|
5068
|
-
var FileDropZone =
|
|
5109
|
+
var FileDropZone = styled21(Sheet_default, {
|
|
5069
5110
|
name: "Uploader",
|
|
5070
5111
|
slot: "dropZone",
|
|
5071
5112
|
shouldForwardProp: (prop) => prop !== "error"
|
|
@@ -5081,7 +5122,7 @@ var FileDropZone = styled20(Sheet_default, {
|
|
|
5081
5122
|
backgroundColor: theme.palette.background.surface,
|
|
5082
5123
|
border: error ? `1px solid ${theme.palette.danger.outlinedBorder}` : state === "idle" ? `1px solid ${theme.palette.neutral.outlinedBorder}` : `1px solid ${theme.palette.primary.outlinedBorder}`
|
|
5083
5124
|
}));
|
|
5084
|
-
var UploaderIcon =
|
|
5125
|
+
var UploaderIcon = styled21(MuiFileUploadIcon, {
|
|
5085
5126
|
name: "Uploader",
|
|
5086
5127
|
slot: "iconContainer",
|
|
5087
5128
|
shouldForwardProp: (prop) => prop !== "error"
|
|
@@ -5090,7 +5131,7 @@ var UploaderIcon = styled20(MuiFileUploadIcon, {
|
|
|
5090
5131
|
width: "32px",
|
|
5091
5132
|
height: "32px"
|
|
5092
5133
|
}));
|
|
5093
|
-
var Uploader =
|
|
5134
|
+
var Uploader = React40.memo(
|
|
5094
5135
|
(props) => {
|
|
5095
5136
|
const {
|
|
5096
5137
|
accept,
|
|
@@ -5105,14 +5146,14 @@ var Uploader = React38.memo(
|
|
|
5105
5146
|
disabled,
|
|
5106
5147
|
onDelete
|
|
5107
5148
|
} = props;
|
|
5108
|
-
const dropZoneRef =
|
|
5109
|
-
const inputRef =
|
|
5110
|
-
const [errorText, setErrorText] =
|
|
5111
|
-
const [files, setFiles] =
|
|
5112
|
-
const [uploaded, setUploaded] =
|
|
5113
|
-
const [previewState, setPreviewState] =
|
|
5114
|
-
const accepts =
|
|
5115
|
-
const parsedAccepts =
|
|
5149
|
+
const dropZoneRef = useRef8(null);
|
|
5150
|
+
const inputRef = useRef8(null);
|
|
5151
|
+
const [errorText, setErrorText] = useState11();
|
|
5152
|
+
const [files, setFiles] = useState11([]);
|
|
5153
|
+
const [uploaded, setUploaded] = useState11(props.uploaded || []);
|
|
5154
|
+
const [previewState, setPreviewState] = useState11("idle");
|
|
5155
|
+
const accepts = useMemo14(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
5156
|
+
const parsedAccepts = useMemo14(
|
|
5116
5157
|
() => accepts.flatMap((type) => {
|
|
5117
5158
|
if (["image/*", "video/*", "audio/*"].includes(type)) {
|
|
5118
5159
|
return ALL_EXTENSIONS_BY_TYPE[type];
|
|
@@ -5121,7 +5162,7 @@ var Uploader = React38.memo(
|
|
|
5121
5162
|
}),
|
|
5122
5163
|
[accepts]
|
|
5123
5164
|
);
|
|
5124
|
-
const helperText =
|
|
5165
|
+
const helperText = useMemo14(() => {
|
|
5125
5166
|
const [allAcceptedTypes, acceptedTypes] = [
|
|
5126
5167
|
accepts.filter((accept2) => ["image/*", "video/*", "audio/*"].includes(accept2)).map((accept2) => {
|
|
5127
5168
|
const [type] = accept2.split("/");
|
|
@@ -5148,12 +5189,12 @@ var Uploader = React38.memo(
|
|
|
5148
5189
|
}
|
|
5149
5190
|
return helperTexts.join(", ");
|
|
5150
5191
|
}, [accepts, maxFileTotalSize, maxCount]);
|
|
5151
|
-
const error =
|
|
5152
|
-
const showDropZone =
|
|
5192
|
+
const error = useMemo14(() => !!errorText || props.error, [props.error, errorText]);
|
|
5193
|
+
const showDropZone = useMemo14(
|
|
5153
5194
|
() => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
|
|
5154
5195
|
[files, maxCount, uploaded]
|
|
5155
5196
|
);
|
|
5156
|
-
const addFiles =
|
|
5197
|
+
const addFiles = useCallback22(
|
|
5157
5198
|
(uploads) => {
|
|
5158
5199
|
try {
|
|
5159
5200
|
const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
|
|
@@ -5198,7 +5239,7 @@ var Uploader = React38.memo(
|
|
|
5198
5239
|
},
|
|
5199
5240
|
[files, uploaded, maxCount, parsedAccepts, maxFileSize, maxFileTotalSize, name, onChange]
|
|
5200
5241
|
);
|
|
5201
|
-
|
|
5242
|
+
useEffect9(() => {
|
|
5202
5243
|
if (!dropZoneRef.current || disabled) {
|
|
5203
5244
|
return;
|
|
5204
5245
|
}
|
|
@@ -5236,7 +5277,7 @@ var Uploader = React38.memo(
|
|
|
5236
5277
|
);
|
|
5237
5278
|
return () => cleanup?.();
|
|
5238
5279
|
}, [disabled, addFiles]);
|
|
5239
|
-
|
|
5280
|
+
useEffect9(() => {
|
|
5240
5281
|
if (inputRef.current && minCount) {
|
|
5241
5282
|
if (files.length < minCount) {
|
|
5242
5283
|
inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
|
|
@@ -5245,14 +5286,14 @@ var Uploader = React38.memo(
|
|
|
5245
5286
|
}
|
|
5246
5287
|
}
|
|
5247
5288
|
}, [inputRef, files, minCount]);
|
|
5248
|
-
const handleFileChanged =
|
|
5289
|
+
const handleFileChanged = useCallback22(
|
|
5249
5290
|
(event) => {
|
|
5250
5291
|
const files2 = Array.from(event.target.files || []);
|
|
5251
5292
|
addFiles(files2);
|
|
5252
5293
|
},
|
|
5253
5294
|
[addFiles]
|
|
5254
5295
|
);
|
|
5255
|
-
const handleDeleteFile =
|
|
5296
|
+
const handleDeleteFile = useCallback22(
|
|
5256
5297
|
(deletedFile) => {
|
|
5257
5298
|
if (deletedFile instanceof File) {
|
|
5258
5299
|
setFiles((current) => {
|
|
@@ -5272,10 +5313,10 @@ var Uploader = React38.memo(
|
|
|
5272
5313
|
},
|
|
5273
5314
|
[name, onChange, onDelete]
|
|
5274
5315
|
);
|
|
5275
|
-
const handleUploaderButtonClick =
|
|
5316
|
+
const handleUploaderButtonClick = useCallback22(() => {
|
|
5276
5317
|
inputRef.current?.click();
|
|
5277
5318
|
}, []);
|
|
5278
|
-
const uploader = /* @__PURE__ */
|
|
5319
|
+
const uploader = /* @__PURE__ */ React40.createElement(
|
|
5279
5320
|
FileDropZone,
|
|
5280
5321
|
{
|
|
5281
5322
|
state: previewState,
|
|
@@ -5283,8 +5324,8 @@ var Uploader = React38.memo(
|
|
|
5283
5324
|
ref: dropZoneRef,
|
|
5284
5325
|
onClick: handleUploaderButtonClick
|
|
5285
5326
|
},
|
|
5286
|
-
/* @__PURE__ */
|
|
5287
|
-
/* @__PURE__ */
|
|
5327
|
+
/* @__PURE__ */ React40.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React40.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText) })),
|
|
5328
|
+
/* @__PURE__ */ React40.createElement(
|
|
5288
5329
|
VisuallyHiddenInput,
|
|
5289
5330
|
{
|
|
5290
5331
|
disabled,
|
|
@@ -5307,7 +5348,7 @@ var Uploader = React38.memo(
|
|
|
5307
5348
|
}
|
|
5308
5349
|
)
|
|
5309
5350
|
);
|
|
5310
|
-
return /* @__PURE__ */
|
|
5351
|
+
return /* @__PURE__ */ React40.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React40.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React40.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React40.createElement(FormHelperText_default, null, /* @__PURE__ */ React40.createElement(Stack_default, null, errorText && /* @__PURE__ */ React40.createElement("div", null, errorText), /* @__PURE__ */ React40.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React40.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
|
|
5311
5352
|
}
|
|
5312
5353
|
);
|
|
5313
5354
|
Uploader.displayName = "Uploader";
|
|
@@ -5316,7 +5357,7 @@ Uploader.displayName = "Uploader";
|
|
|
5316
5357
|
import { Grid } from "@mui/joy";
|
|
5317
5358
|
|
|
5318
5359
|
// src/components/IconMenuButton/IconMenuButton.tsx
|
|
5319
|
-
import
|
|
5360
|
+
import React41 from "react";
|
|
5320
5361
|
import { MenuButton as JoyMenuButton2, IconButton as JoyIconButton2 } from "@mui/joy";
|
|
5321
5362
|
function IconMenuButton(props) {
|
|
5322
5363
|
const {
|
|
@@ -5330,7 +5371,7 @@ function IconMenuButton(props) {
|
|
|
5330
5371
|
placement = "bottom"
|
|
5331
5372
|
} = props;
|
|
5332
5373
|
if (!items.length) {
|
|
5333
|
-
return /* @__PURE__ */
|
|
5374
|
+
return /* @__PURE__ */ React41.createElement(
|
|
5334
5375
|
JoyIconButton2,
|
|
5335
5376
|
{
|
|
5336
5377
|
component: props.buttonComponent ?? "button",
|
|
@@ -5344,7 +5385,7 @@ function IconMenuButton(props) {
|
|
|
5344
5385
|
icon
|
|
5345
5386
|
);
|
|
5346
5387
|
}
|
|
5347
|
-
return /* @__PURE__ */
|
|
5388
|
+
return /* @__PURE__ */ React41.createElement(Dropdown_default, null, /* @__PURE__ */ React41.createElement(
|
|
5348
5389
|
JoyMenuButton2,
|
|
5349
5390
|
{
|
|
5350
5391
|
slots: { root: JoyIconButton2 },
|
|
@@ -5361,19 +5402,19 @@ function IconMenuButton(props) {
|
|
|
5361
5402
|
}
|
|
5362
5403
|
},
|
|
5363
5404
|
icon
|
|
5364
|
-
), /* @__PURE__ */
|
|
5405
|
+
), /* @__PURE__ */ React41.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React41.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
5365
5406
|
}
|
|
5366
5407
|
IconMenuButton.displayName = "IconMenuButton";
|
|
5367
5408
|
|
|
5368
5409
|
// src/components/Markdown/Markdown.tsx
|
|
5369
|
-
import
|
|
5410
|
+
import React42, { lazy, Suspense, useEffect as useEffect10, useState as useState12 } from "react";
|
|
5370
5411
|
import { Skeleton } from "@mui/joy";
|
|
5371
5412
|
import { Link as Link2 } from "@mui/joy";
|
|
5372
5413
|
import remarkGfm from "remark-gfm";
|
|
5373
5414
|
var LazyReactMarkdown = lazy(() => import("react-markdown"));
|
|
5374
5415
|
var Markdown = (props) => {
|
|
5375
|
-
const [rehypeAccent2, setRehypeAccent] =
|
|
5376
|
-
|
|
5416
|
+
const [rehypeAccent2, setRehypeAccent] = useState12(null);
|
|
5417
|
+
useEffect10(() => {
|
|
5377
5418
|
const loadRehypeAccent = async () => {
|
|
5378
5419
|
const module = await Promise.resolve().then(() => (init_rehype_accent(), rehype_accent_exports));
|
|
5379
5420
|
setRehypeAccent(() => module.rehypeAccent);
|
|
@@ -5395,12 +5436,12 @@ var Markdown = (props) => {
|
|
|
5395
5436
|
if (!rehypeAccent2) {
|
|
5396
5437
|
return null;
|
|
5397
5438
|
}
|
|
5398
|
-
return /* @__PURE__ */
|
|
5439
|
+
return /* @__PURE__ */ React42.createElement(Typography, { component: "div", color, textColor, level: defaultLevel, ...innerProps }, /* @__PURE__ */ React42.createElement(
|
|
5399
5440
|
Suspense,
|
|
5400
5441
|
{
|
|
5401
|
-
fallback: fallback || /* @__PURE__ */
|
|
5442
|
+
fallback: fallback || /* @__PURE__ */ React42.createElement(Typography, null, /* @__PURE__ */ React42.createElement(Skeleton, null, content || ""))
|
|
5402
5443
|
},
|
|
5403
|
-
/* @__PURE__ */
|
|
5444
|
+
/* @__PURE__ */ React42.createElement(
|
|
5404
5445
|
LazyReactMarkdown,
|
|
5405
5446
|
{
|
|
5406
5447
|
...markdownOptions,
|
|
@@ -5408,15 +5449,15 @@ var Markdown = (props) => {
|
|
|
5408
5449
|
rehypePlugins: [[rehypeAccent2, { accentColor }]],
|
|
5409
5450
|
remarkPlugins: [remarkGfm],
|
|
5410
5451
|
components: {
|
|
5411
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
5412
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
5413
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
5414
|
-
h4: ({ children }) => /* @__PURE__ */
|
|
5415
|
-
p: ({ children, node }) => /* @__PURE__ */
|
|
5416
|
-
a: ({ children, href }) => /* @__PURE__ */
|
|
5417
|
-
hr: () => /* @__PURE__ */
|
|
5418
|
-
b: ({ children }) => /* @__PURE__ */
|
|
5419
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
5452
|
+
h1: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h1" }, children),
|
|
5453
|
+
h2: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h2" }, children),
|
|
5454
|
+
h3: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h3" }, children),
|
|
5455
|
+
h4: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: "h4" }, children),
|
|
5456
|
+
p: ({ children, node }) => /* @__PURE__ */ React42.createElement(Typography, { color, textColor, level: defaultLevel, ...node?.properties }, children),
|
|
5457
|
+
a: ({ children, href }) => /* @__PURE__ */ React42.createElement(Link2, { href, target: defaultLinkAction }, children),
|
|
5458
|
+
hr: () => /* @__PURE__ */ React42.createElement(Divider, null),
|
|
5459
|
+
b: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
5460
|
+
strong: ({ children }) => /* @__PURE__ */ React42.createElement(Typography, { fontWeight: boldFontWeight }, children),
|
|
5420
5461
|
...markdownOptions?.components
|
|
5421
5462
|
}
|
|
5422
5463
|
}
|
|
@@ -5426,7 +5467,7 @@ var Markdown = (props) => {
|
|
|
5426
5467
|
Markdown.displayName = "Markdown";
|
|
5427
5468
|
|
|
5428
5469
|
// src/components/MenuButton/MenuButton.tsx
|
|
5429
|
-
import
|
|
5470
|
+
import React43 from "react";
|
|
5430
5471
|
import { MenuButton as JoyMenuButton3, Button as JoyButton2 } from "@mui/joy";
|
|
5431
5472
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
5432
5473
|
function MenuButton(props) {
|
|
@@ -5444,7 +5485,7 @@ function MenuButton(props) {
|
|
|
5444
5485
|
placement = "bottom"
|
|
5445
5486
|
} = props;
|
|
5446
5487
|
if (!items.length) {
|
|
5447
|
-
return /* @__PURE__ */
|
|
5488
|
+
return /* @__PURE__ */ React43.createElement(
|
|
5448
5489
|
JoyButton2,
|
|
5449
5490
|
{
|
|
5450
5491
|
component: props.buttonComponent ?? "button",
|
|
@@ -5455,12 +5496,12 @@ function MenuButton(props) {
|
|
|
5455
5496
|
loading,
|
|
5456
5497
|
startDecorator,
|
|
5457
5498
|
...props.buttonComponentProps ?? {},
|
|
5458
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
5499
|
+
endDecorator: showIcon ? /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator, /* @__PURE__ */ React43.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator)
|
|
5459
5500
|
},
|
|
5460
5501
|
buttonText
|
|
5461
5502
|
);
|
|
5462
5503
|
}
|
|
5463
|
-
return /* @__PURE__ */
|
|
5504
|
+
return /* @__PURE__ */ React43.createElement(Dropdown_default, null, /* @__PURE__ */ React43.createElement(
|
|
5464
5505
|
JoyMenuButton3,
|
|
5465
5506
|
{
|
|
5466
5507
|
component: props.buttonComponent ?? "button",
|
|
@@ -5471,25 +5512,25 @@ function MenuButton(props) {
|
|
|
5471
5512
|
loading,
|
|
5472
5513
|
startDecorator,
|
|
5473
5514
|
...props.buttonComponentProps ?? {},
|
|
5474
|
-
endDecorator: showIcon ? /* @__PURE__ */
|
|
5515
|
+
endDecorator: showIcon ? /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator, /* @__PURE__ */ React43.createElement(ExpandMoreIcon, null)) : /* @__PURE__ */ React43.createElement(React43.Fragment, null, endDecorator)
|
|
5475
5516
|
},
|
|
5476
5517
|
buttonText
|
|
5477
|
-
), /* @__PURE__ */
|
|
5518
|
+
), /* @__PURE__ */ React43.createElement(Menu, { placement, size }, items.map((i) => /* @__PURE__ */ React43.createElement(MenuItem, { key: i.text, component: i.component, ...i.componentProps ?? {} }, i.text))));
|
|
5478
5519
|
}
|
|
5479
5520
|
MenuButton.displayName = "MenuButton";
|
|
5480
5521
|
|
|
5481
5522
|
// src/components/MonthPicker/MonthPicker.tsx
|
|
5482
|
-
import
|
|
5523
|
+
import React44, { forwardRef as forwardRef9, useCallback as useCallback23, useEffect as useEffect11, useImperativeHandle as useImperativeHandle4, useRef as useRef9, useState as useState13 } from "react";
|
|
5483
5524
|
import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
|
|
5484
|
-
import { styled as
|
|
5525
|
+
import { styled as styled22, useThemeProps as useThemeProps7 } from "@mui/joy";
|
|
5485
5526
|
import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper4 } from "@mui/base";
|
|
5486
|
-
var StyledPopper3 =
|
|
5527
|
+
var StyledPopper3 = styled22(Popper4, {
|
|
5487
5528
|
name: "MonthPicker",
|
|
5488
5529
|
slot: "popper"
|
|
5489
5530
|
})(({ theme }) => ({
|
|
5490
5531
|
zIndex: theme.zIndex.tooltip
|
|
5491
5532
|
}));
|
|
5492
|
-
var CalendarSheet3 =
|
|
5533
|
+
var CalendarSheet3 = styled22(Sheet_default, {
|
|
5493
5534
|
name: "MonthPicker",
|
|
5494
5535
|
slot: "sheet",
|
|
5495
5536
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5498,7 +5539,7 @@ var CalendarSheet3 = styled21(Sheet_default, {
|
|
|
5498
5539
|
boxShadow: theme.shadow.md,
|
|
5499
5540
|
borderRadius: theme.radius.md
|
|
5500
5541
|
}));
|
|
5501
|
-
var MonthPickerRoot =
|
|
5542
|
+
var MonthPickerRoot = styled22("div", {
|
|
5502
5543
|
name: "MonthPicker",
|
|
5503
5544
|
slot: "root",
|
|
5504
5545
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5561,14 +5602,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5561
5602
|
locale,
|
|
5562
5603
|
...innerProps
|
|
5563
5604
|
} = props;
|
|
5564
|
-
const innerRef =
|
|
5565
|
-
const buttonRef =
|
|
5605
|
+
const innerRef = useRef9(null);
|
|
5606
|
+
const buttonRef = useRef9(null);
|
|
5566
5607
|
const [value, setValue, isControlled] = useControlledState(
|
|
5567
5608
|
props.value,
|
|
5568
5609
|
props.defaultValue || "",
|
|
5569
|
-
|
|
5610
|
+
useCallback23((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
5570
5611
|
);
|
|
5571
|
-
const getFormattedDisplayValue =
|
|
5612
|
+
const getFormattedDisplayValue = useCallback23(
|
|
5572
5613
|
(inputValue) => {
|
|
5573
5614
|
if (!inputValue) return "";
|
|
5574
5615
|
try {
|
|
@@ -5579,19 +5620,19 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5579
5620
|
},
|
|
5580
5621
|
[format, displayFormat, locale]
|
|
5581
5622
|
);
|
|
5582
|
-
const [displayValue, setDisplayValue] =
|
|
5583
|
-
const [anchorEl, setAnchorEl] =
|
|
5623
|
+
const [displayValue, setDisplayValue] = useState13(() => getFormattedDisplayValue(value));
|
|
5624
|
+
const [anchorEl, setAnchorEl] = useState13(null);
|
|
5584
5625
|
const open = Boolean(anchorEl);
|
|
5585
|
-
|
|
5626
|
+
useEffect11(() => {
|
|
5586
5627
|
if (!anchorEl) {
|
|
5587
5628
|
innerRef.current?.blur();
|
|
5588
5629
|
}
|
|
5589
5630
|
}, [anchorEl, innerRef]);
|
|
5590
5631
|
useImperativeHandle4(ref, () => innerRef.current, [innerRef]);
|
|
5591
|
-
|
|
5632
|
+
useEffect11(() => {
|
|
5592
5633
|
setDisplayValue(getFormattedDisplayValue(value));
|
|
5593
5634
|
}, [value, getFormattedDisplayValue]);
|
|
5594
|
-
const handleChange =
|
|
5635
|
+
const handleChange = useCallback23(
|
|
5595
5636
|
(event) => {
|
|
5596
5637
|
const newValue = event.target.value;
|
|
5597
5638
|
setValue(newValue);
|
|
@@ -5601,21 +5642,21 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5601
5642
|
},
|
|
5602
5643
|
[setValue, getFormattedDisplayValue, isControlled]
|
|
5603
5644
|
);
|
|
5604
|
-
const handleCalendarToggle =
|
|
5645
|
+
const handleCalendarToggle = useCallback23(
|
|
5605
5646
|
(event) => {
|
|
5606
5647
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5607
5648
|
innerRef.current?.focus();
|
|
5608
5649
|
},
|
|
5609
5650
|
[anchorEl, setAnchorEl, innerRef]
|
|
5610
5651
|
);
|
|
5611
|
-
const handleInputMouseDown =
|
|
5652
|
+
const handleInputMouseDown = useCallback23(
|
|
5612
5653
|
(event) => {
|
|
5613
5654
|
event.preventDefault();
|
|
5614
5655
|
buttonRef.current?.focus();
|
|
5615
5656
|
},
|
|
5616
5657
|
[buttonRef]
|
|
5617
5658
|
);
|
|
5618
|
-
return /* @__PURE__ */
|
|
5659
|
+
return /* @__PURE__ */ React44.createElement(MonthPickerRoot, null, /* @__PURE__ */ React44.createElement(FocusTrap3, { open: true }, /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(
|
|
5619
5660
|
Input_default,
|
|
5620
5661
|
{
|
|
5621
5662
|
...innerProps,
|
|
@@ -5645,7 +5686,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5645
5686
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
5646
5687
|
fontFamily: "monospace"
|
|
5647
5688
|
},
|
|
5648
|
-
endDecorator: /* @__PURE__ */
|
|
5689
|
+
endDecorator: /* @__PURE__ */ React44.createElement(
|
|
5649
5690
|
IconButton_default,
|
|
5650
5691
|
{
|
|
5651
5692
|
ref: buttonRef,
|
|
@@ -5657,12 +5698,12 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5657
5698
|
"aria-expanded": open,
|
|
5658
5699
|
disabled
|
|
5659
5700
|
},
|
|
5660
|
-
/* @__PURE__ */
|
|
5701
|
+
/* @__PURE__ */ React44.createElement(CalendarTodayIcon3, null)
|
|
5661
5702
|
),
|
|
5662
5703
|
label,
|
|
5663
5704
|
helperText
|
|
5664
5705
|
}
|
|
5665
|
-
), open && /* @__PURE__ */
|
|
5706
|
+
), open && /* @__PURE__ */ React44.createElement(ClickAwayListener3, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React44.createElement(
|
|
5666
5707
|
StyledPopper3,
|
|
5667
5708
|
{
|
|
5668
5709
|
id: "month-picker-popper",
|
|
@@ -5681,7 +5722,7 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5681
5722
|
"aria-label": "Calendar Tooltip",
|
|
5682
5723
|
"aria-expanded": open
|
|
5683
5724
|
},
|
|
5684
|
-
/* @__PURE__ */
|
|
5725
|
+
/* @__PURE__ */ React44.createElement(CalendarSheet3, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React44.createElement(
|
|
5685
5726
|
Calendar_default,
|
|
5686
5727
|
{
|
|
5687
5728
|
view: "month",
|
|
@@ -5702,14 +5743,14 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5702
5743
|
disablePast,
|
|
5703
5744
|
locale
|
|
5704
5745
|
}
|
|
5705
|
-
), /* @__PURE__ */
|
|
5746
|
+
), /* @__PURE__ */ React44.createElement(
|
|
5706
5747
|
DialogActions_default,
|
|
5707
5748
|
{
|
|
5708
5749
|
sx: {
|
|
5709
5750
|
p: 1
|
|
5710
5751
|
}
|
|
5711
5752
|
},
|
|
5712
|
-
/* @__PURE__ */
|
|
5753
|
+
/* @__PURE__ */ React44.createElement(
|
|
5713
5754
|
Button_default,
|
|
5714
5755
|
{
|
|
5715
5756
|
size,
|
|
@@ -5732,18 +5773,18 @@ var MonthPicker = forwardRef9((inProps, ref) => {
|
|
|
5732
5773
|
});
|
|
5733
5774
|
|
|
5734
5775
|
// src/components/MonthRangePicker/MonthRangePicker.tsx
|
|
5735
|
-
import
|
|
5776
|
+
import React45, { forwardRef as forwardRef10, useCallback as useCallback24, useEffect as useEffect12, useImperativeHandle as useImperativeHandle5, useMemo as useMemo15, useRef as useRef10, useState as useState14 } from "react";
|
|
5736
5777
|
import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
|
|
5737
5778
|
import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
|
|
5738
|
-
import { styled as
|
|
5779
|
+
import { styled as styled23, useThemeProps as useThemeProps8 } from "@mui/joy";
|
|
5739
5780
|
import { FocusTrap as FocusTrap4, ClickAwayListener as ClickAwayListener4, Popper as Popper5 } from "@mui/base";
|
|
5740
|
-
var StyledPopper4 =
|
|
5781
|
+
var StyledPopper4 = styled23(Popper5, {
|
|
5741
5782
|
name: "MonthRangePicker",
|
|
5742
5783
|
slot: "popper"
|
|
5743
5784
|
})(({ theme }) => ({
|
|
5744
5785
|
zIndex: theme.zIndex.tooltip
|
|
5745
5786
|
}));
|
|
5746
|
-
var CalendarSheet4 =
|
|
5787
|
+
var CalendarSheet4 = styled23(Sheet_default, {
|
|
5747
5788
|
name: "MonthRangePicker",
|
|
5748
5789
|
slot: "sheet",
|
|
5749
5790
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5753,7 +5794,7 @@ var CalendarSheet4 = styled22(Sheet_default, {
|
|
|
5753
5794
|
boxShadow: theme.shadow.md,
|
|
5754
5795
|
borderRadius: theme.radius.md
|
|
5755
5796
|
}));
|
|
5756
|
-
var MonthRangePickerRoot =
|
|
5797
|
+
var MonthRangePickerRoot = styled23("div", {
|
|
5757
5798
|
name: "MonthRangePicker",
|
|
5758
5799
|
slot: "root",
|
|
5759
5800
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -5790,9 +5831,9 @@ var parseDates2 = (str) => {
|
|
|
5790
5831
|
var formatToPattern3 = (format) => {
|
|
5791
5832
|
return `${format} - ${format}`.replace(/YYYY/g, "Y").replace(/MM/g, "m").replace(/[^YMm\s]/g, (match) => `${match}\``);
|
|
5792
5833
|
};
|
|
5793
|
-
var TextMaskAdapter9 =
|
|
5834
|
+
var TextMaskAdapter9 = React45.forwardRef(function TextMaskAdapter10(props, ref) {
|
|
5794
5835
|
const { onChange, format, ...other } = props;
|
|
5795
|
-
return /* @__PURE__ */
|
|
5836
|
+
return /* @__PURE__ */ React45.createElement(
|
|
5796
5837
|
IMaskInput3,
|
|
5797
5838
|
{
|
|
5798
5839
|
...other,
|
|
@@ -5840,35 +5881,35 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5840
5881
|
size,
|
|
5841
5882
|
...innerProps
|
|
5842
5883
|
} = props;
|
|
5843
|
-
const innerRef =
|
|
5884
|
+
const innerRef = useRef10(null);
|
|
5844
5885
|
const [value, setValue] = useControlledState(
|
|
5845
5886
|
props.value,
|
|
5846
5887
|
props.defaultValue || "",
|
|
5847
|
-
|
|
5888
|
+
useCallback24((value2) => onChange?.({ target: { name: props.name, value: value2 } }), [props.name, onChange])
|
|
5848
5889
|
);
|
|
5849
|
-
const [anchorEl, setAnchorEl] =
|
|
5890
|
+
const [anchorEl, setAnchorEl] = useState14(null);
|
|
5850
5891
|
const open = Boolean(anchorEl);
|
|
5851
|
-
const calendarValue =
|
|
5852
|
-
|
|
5892
|
+
const calendarValue = useMemo15(() => value ? parseDates2(value) : void 0, [value]);
|
|
5893
|
+
useEffect12(() => {
|
|
5853
5894
|
if (!anchorEl) {
|
|
5854
5895
|
innerRef.current?.blur();
|
|
5855
5896
|
}
|
|
5856
5897
|
}, [anchorEl, innerRef]);
|
|
5857
5898
|
useImperativeHandle5(ref, () => innerRef.current, [innerRef]);
|
|
5858
|
-
const handleChange =
|
|
5899
|
+
const handleChange = useCallback24(
|
|
5859
5900
|
(event) => {
|
|
5860
5901
|
setValue(event.target.value);
|
|
5861
5902
|
},
|
|
5862
5903
|
[setValue]
|
|
5863
5904
|
);
|
|
5864
|
-
const handleCalendarToggle =
|
|
5905
|
+
const handleCalendarToggle = useCallback24(
|
|
5865
5906
|
(event) => {
|
|
5866
5907
|
setAnchorEl(anchorEl ? null : event.currentTarget);
|
|
5867
5908
|
innerRef.current?.focus();
|
|
5868
5909
|
},
|
|
5869
5910
|
[anchorEl, setAnchorEl, innerRef]
|
|
5870
5911
|
);
|
|
5871
|
-
const handleCalendarChange =
|
|
5912
|
+
const handleCalendarChange = useCallback24(
|
|
5872
5913
|
([date1, date2]) => {
|
|
5873
5914
|
if (!date1 || !date2) return;
|
|
5874
5915
|
setValue(formatValueString4([date1, date2], format));
|
|
@@ -5876,7 +5917,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5876
5917
|
},
|
|
5877
5918
|
[setValue, setAnchorEl, format]
|
|
5878
5919
|
);
|
|
5879
|
-
return /* @__PURE__ */
|
|
5920
|
+
return /* @__PURE__ */ React45.createElement(MonthRangePickerRoot, null, /* @__PURE__ */ React45.createElement(FocusTrap4, { open: true }, /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(
|
|
5880
5921
|
Input_default,
|
|
5881
5922
|
{
|
|
5882
5923
|
...innerProps,
|
|
@@ -5898,7 +5939,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5898
5939
|
// NOTE: placeholder char 를 텍스트로 표시하므로 동일한 너비를 가지는 mono font 를 사용해야 이질감이 없다.
|
|
5899
5940
|
fontFamily: "monospace"
|
|
5900
5941
|
},
|
|
5901
|
-
endDecorator: /* @__PURE__ */
|
|
5942
|
+
endDecorator: /* @__PURE__ */ React45.createElement(
|
|
5902
5943
|
IconButton_default,
|
|
5903
5944
|
{
|
|
5904
5945
|
variant: "plain",
|
|
@@ -5908,12 +5949,12 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5908
5949
|
"aria-haspopup": "dialog",
|
|
5909
5950
|
"aria-expanded": open
|
|
5910
5951
|
},
|
|
5911
|
-
/* @__PURE__ */
|
|
5952
|
+
/* @__PURE__ */ React45.createElement(CalendarTodayIcon4, null)
|
|
5912
5953
|
),
|
|
5913
5954
|
label,
|
|
5914
5955
|
helperText
|
|
5915
5956
|
}
|
|
5916
|
-
), open && /* @__PURE__ */
|
|
5957
|
+
), open && /* @__PURE__ */ React45.createElement(ClickAwayListener4, { onClickAway: () => setAnchorEl(null) }, /* @__PURE__ */ React45.createElement(
|
|
5917
5958
|
StyledPopper4,
|
|
5918
5959
|
{
|
|
5919
5960
|
id: "month-range-picker-popper",
|
|
@@ -5932,7 +5973,7 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5932
5973
|
"aria-label": "Calendar Tooltip",
|
|
5933
5974
|
"aria-expanded": open
|
|
5934
5975
|
},
|
|
5935
|
-
/* @__PURE__ */
|
|
5976
|
+
/* @__PURE__ */ React45.createElement(CalendarSheet4, { tabIndex: -1, role: "presentation" }, /* @__PURE__ */ React45.createElement(
|
|
5936
5977
|
Calendar_default,
|
|
5937
5978
|
{
|
|
5938
5979
|
view: "month",
|
|
@@ -5945,14 +5986,14 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5945
5986
|
disableFuture,
|
|
5946
5987
|
disablePast
|
|
5947
5988
|
}
|
|
5948
|
-
), /* @__PURE__ */
|
|
5989
|
+
), /* @__PURE__ */ React45.createElement(
|
|
5949
5990
|
DialogActions_default,
|
|
5950
5991
|
{
|
|
5951
5992
|
sx: {
|
|
5952
5993
|
p: 1
|
|
5953
5994
|
}
|
|
5954
5995
|
},
|
|
5955
|
-
/* @__PURE__ */
|
|
5996
|
+
/* @__PURE__ */ React45.createElement(
|
|
5956
5997
|
Button_default,
|
|
5957
5998
|
{
|
|
5958
5999
|
size,
|
|
@@ -5971,16 +6012,16 @@ var MonthRangePicker = forwardRef10((inProps, ref) => {
|
|
|
5971
6012
|
MonthRangePicker.displayName = "MonthRangePicker";
|
|
5972
6013
|
|
|
5973
6014
|
// src/components/NavigationGroup/NavigationGroup.tsx
|
|
5974
|
-
import
|
|
6015
|
+
import React46 from "react";
|
|
5975
6016
|
import {
|
|
5976
6017
|
Accordion as JoyAccordion2,
|
|
5977
6018
|
AccordionSummary as JoyAccordionSummary2,
|
|
5978
6019
|
AccordionDetails as JoyAccordionDetails2,
|
|
5979
|
-
styled as
|
|
6020
|
+
styled as styled24,
|
|
5980
6021
|
accordionSummaryClasses,
|
|
5981
6022
|
Stack as Stack11
|
|
5982
6023
|
} from "@mui/joy";
|
|
5983
|
-
var AccordionSummary2 =
|
|
6024
|
+
var AccordionSummary2 = styled24(JoyAccordionSummary2, {
|
|
5984
6025
|
name: "NavigationGroup",
|
|
5985
6026
|
slot: "Summary",
|
|
5986
6027
|
shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
|
|
@@ -5993,7 +6034,7 @@ var AccordionSummary2 = styled23(JoyAccordionSummary2, {
|
|
|
5993
6034
|
}
|
|
5994
6035
|
}
|
|
5995
6036
|
}));
|
|
5996
|
-
var AccordionDetails2 =
|
|
6037
|
+
var AccordionDetails2 = styled24(JoyAccordionDetails2, {
|
|
5997
6038
|
name: "NavigationGroup",
|
|
5998
6039
|
slot: "Details"
|
|
5999
6040
|
})(({ theme }) => ({
|
|
@@ -6002,19 +6043,19 @@ var AccordionDetails2 = styled23(JoyAccordionDetails2, {
|
|
|
6002
6043
|
}));
|
|
6003
6044
|
function NavigationGroup(props) {
|
|
6004
6045
|
const { title, children, startDecorator, level, ...rest } = props;
|
|
6005
|
-
return /* @__PURE__ */
|
|
6046
|
+
return /* @__PURE__ */ React46.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React46.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React46.createElement(Stack11, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ React46.createElement(AccordionDetails2, null, children));
|
|
6006
6047
|
}
|
|
6007
6048
|
|
|
6008
6049
|
// src/components/NavigationItem/NavigationItem.tsx
|
|
6009
|
-
import
|
|
6050
|
+
import React47 from "react";
|
|
6010
6051
|
import {
|
|
6011
6052
|
ListItem as JoyListItem,
|
|
6012
6053
|
ListItemButton as JoyListItemButton,
|
|
6013
6054
|
ListItemDecorator as JoyListItemDecorator,
|
|
6014
|
-
styled as
|
|
6055
|
+
styled as styled25,
|
|
6015
6056
|
listItemButtonClasses
|
|
6016
6057
|
} from "@mui/joy";
|
|
6017
|
-
var ListItemButton =
|
|
6058
|
+
var ListItemButton = styled25(JoyListItemButton, {
|
|
6018
6059
|
name: "NavigationItem",
|
|
6019
6060
|
slot: "Button",
|
|
6020
6061
|
shouldForwardProp: (prop) => prop !== "useIcon" && prop !== "level"
|
|
@@ -6041,7 +6082,7 @@ function NavigationItem(props) {
|
|
|
6041
6082
|
const handleClick = () => {
|
|
6042
6083
|
onClick?.(id);
|
|
6043
6084
|
};
|
|
6044
|
-
return /* @__PURE__ */
|
|
6085
|
+
return /* @__PURE__ */ React47.createElement(JoyListItem, { ...rest }, /* @__PURE__ */ React47.createElement(
|
|
6045
6086
|
ListItemButton,
|
|
6046
6087
|
{
|
|
6047
6088
|
level,
|
|
@@ -6050,21 +6091,21 @@ function NavigationItem(props) {
|
|
|
6050
6091
|
"aria-current": selected,
|
|
6051
6092
|
onClick: handleClick
|
|
6052
6093
|
},
|
|
6053
|
-
startDecorator && /* @__PURE__ */
|
|
6094
|
+
startDecorator && /* @__PURE__ */ React47.createElement(JoyListItemDecorator, null, startDecorator),
|
|
6054
6095
|
children
|
|
6055
6096
|
));
|
|
6056
6097
|
}
|
|
6057
6098
|
|
|
6058
6099
|
// src/components/Navigator/Navigator.tsx
|
|
6059
|
-
import
|
|
6100
|
+
import React48 from "react";
|
|
6060
6101
|
function Navigator(props) {
|
|
6061
6102
|
const { items, level = 0, onSelect } = props;
|
|
6062
6103
|
const handleItemClick = (id) => {
|
|
6063
6104
|
onSelect?.(id);
|
|
6064
6105
|
};
|
|
6065
|
-
return /* @__PURE__ */
|
|
6106
|
+
return /* @__PURE__ */ React48.createElement("div", null, items.map((item, index) => {
|
|
6066
6107
|
if (item.type === "item") {
|
|
6067
|
-
return /* @__PURE__ */
|
|
6108
|
+
return /* @__PURE__ */ React48.createElement(
|
|
6068
6109
|
NavigationItem,
|
|
6069
6110
|
{
|
|
6070
6111
|
key: item.id,
|
|
@@ -6077,7 +6118,7 @@ function Navigator(props) {
|
|
|
6077
6118
|
item.title
|
|
6078
6119
|
);
|
|
6079
6120
|
} else if (item.type === "group") {
|
|
6080
|
-
return /* @__PURE__ */
|
|
6121
|
+
return /* @__PURE__ */ React48.createElement(
|
|
6081
6122
|
NavigationGroup,
|
|
6082
6123
|
{
|
|
6083
6124
|
key: `${item.title}-${index}`,
|
|
@@ -6095,22 +6136,22 @@ function Navigator(props) {
|
|
|
6095
6136
|
Navigator.displayName = "Navigator";
|
|
6096
6137
|
|
|
6097
6138
|
// src/components/ProfileMenu/ProfileMenu.tsx
|
|
6098
|
-
import
|
|
6099
|
-
import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as
|
|
6139
|
+
import React49, { useCallback as useCallback25, useMemo as useMemo16 } from "react";
|
|
6140
|
+
import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as styled26, MenuButton as MenuButton2 } from "@mui/joy";
|
|
6100
6141
|
import { ClickAwayListener as ClickAwayListener5 } from "@mui/base";
|
|
6101
6142
|
import DropdownIcon from "@mui/icons-material/ArrowDropDown";
|
|
6102
|
-
var StyledProfileCard =
|
|
6143
|
+
var StyledProfileCard = styled26(Stack, {
|
|
6103
6144
|
name: "ProfileMenu",
|
|
6104
6145
|
slot: "item"
|
|
6105
6146
|
})({});
|
|
6106
6147
|
function ProfileCard(props) {
|
|
6107
6148
|
const { children, chip, caption, size } = props;
|
|
6108
|
-
const captionLevel =
|
|
6109
|
-
const nameLevel =
|
|
6110
|
-
return /* @__PURE__ */
|
|
6149
|
+
const captionLevel = useMemo16(() => size === "sm" ? "body-xs" : "body-sm", [size]);
|
|
6150
|
+
const nameLevel = useMemo16(() => size === "sm" ? "body-sm" : "body-md", [size]);
|
|
6151
|
+
return /* @__PURE__ */ React49.createElement(StyledProfileCard, { px: 4, py: 2 }, /* @__PURE__ */ React49.createElement(Stack, { direction: "row", gap: 2 }, /* @__PURE__ */ React49.createElement(Typography, { level: nameLevel, fontWeight: "bold", textColor: "text.primary" }, children), chip && /* @__PURE__ */ React49.createElement(Chip, { size, color: "neutral", variant: "outlined" }, chip)), caption && /* @__PURE__ */ React49.createElement(Typography, { level: captionLevel, textColor: "text.tertiary" }, caption));
|
|
6111
6152
|
}
|
|
6112
6153
|
ProfileCard.displayName = "ProfileCard";
|
|
6113
|
-
var StyledProfileMenuButton =
|
|
6154
|
+
var StyledProfileMenuButton = styled26(MenuButton2, {
|
|
6114
6155
|
name: "ProfileMenu",
|
|
6115
6156
|
slot: "button"
|
|
6116
6157
|
})(({ theme }) => ({
|
|
@@ -6119,20 +6160,20 @@ var StyledProfileMenuButton = styled25(MenuButton2, {
|
|
|
6119
6160
|
}));
|
|
6120
6161
|
function ProfileMenuButton(props) {
|
|
6121
6162
|
const { size = "md", src, alt, children, getInitial, ...innerProps } = props;
|
|
6122
|
-
return /* @__PURE__ */
|
|
6163
|
+
return /* @__PURE__ */ React49.createElement(
|
|
6123
6164
|
StyledProfileMenuButton,
|
|
6124
6165
|
{
|
|
6125
6166
|
variant: "plain",
|
|
6126
6167
|
color: "neutral",
|
|
6127
6168
|
size,
|
|
6128
|
-
endDecorator: /* @__PURE__ */
|
|
6169
|
+
endDecorator: /* @__PURE__ */ React49.createElement(DropdownIcon, null),
|
|
6129
6170
|
...innerProps
|
|
6130
6171
|
},
|
|
6131
|
-
/* @__PURE__ */
|
|
6172
|
+
/* @__PURE__ */ React49.createElement(Avatar, { variant: "soft", color: "primary", size, src, alt, getInitial }, children)
|
|
6132
6173
|
);
|
|
6133
6174
|
}
|
|
6134
6175
|
ProfileMenuButton.displayName = "ProfileMenuButton";
|
|
6135
|
-
var ProfileMenuRoot =
|
|
6176
|
+
var ProfileMenuRoot = styled26(Menu, {
|
|
6136
6177
|
name: "ProfileMenu",
|
|
6137
6178
|
slot: "root"
|
|
6138
6179
|
})(({ theme }) => ({
|
|
@@ -6147,9 +6188,9 @@ function ProfileMenu(props) {
|
|
|
6147
6188
|
const [open, setOpen] = useControlledState(
|
|
6148
6189
|
_open,
|
|
6149
6190
|
defaultOpen ?? false,
|
|
6150
|
-
|
|
6191
|
+
useCallback25((value) => onOpenChange?.(value), [onOpenChange])
|
|
6151
6192
|
);
|
|
6152
|
-
return /* @__PURE__ */
|
|
6193
|
+
return /* @__PURE__ */ React49.createElement(ClickAwayListener5, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement(Dropdown2, { open }, /* @__PURE__ */ React49.createElement(
|
|
6153
6194
|
ProfileMenuButton,
|
|
6154
6195
|
{
|
|
6155
6196
|
size,
|
|
@@ -6159,7 +6200,7 @@ function ProfileMenu(props) {
|
|
|
6159
6200
|
getInitial
|
|
6160
6201
|
},
|
|
6161
6202
|
profile.name
|
|
6162
|
-
), /* @__PURE__ */
|
|
6203
|
+
), /* @__PURE__ */ React49.createElement(ProfileMenuRoot, { size, placement: "bottom-end", ...innerProps, onClose: () => setOpen(false) }, /* @__PURE__ */ React49.createElement(ProfileCard, { size, caption: profile.caption, chip: profile.chip }, profile.name), !!menuItems.length && /* @__PURE__ */ React49.createElement(ListDivider, null), menuItems.map(({ label, ...menuProps }) => /* @__PURE__ */ React49.createElement(
|
|
6163
6204
|
MenuItem,
|
|
6164
6205
|
{
|
|
6165
6206
|
key: label,
|
|
@@ -6175,30 +6216,30 @@ function ProfileMenu(props) {
|
|
|
6175
6216
|
ProfileMenu.displayName = "ProfileMenu";
|
|
6176
6217
|
|
|
6177
6218
|
// src/components/RadioList/RadioList.tsx
|
|
6178
|
-
import
|
|
6219
|
+
import React50 from "react";
|
|
6179
6220
|
function RadioList(props) {
|
|
6180
6221
|
const { items, ...innerProps } = props;
|
|
6181
|
-
return /* @__PURE__ */
|
|
6222
|
+
return /* @__PURE__ */ React50.createElement(RadioGroup, { ...innerProps }, items.map((item) => /* @__PURE__ */ React50.createElement(Radio, { key: `${item.value}`, value: item.value, label: item.label })));
|
|
6182
6223
|
}
|
|
6183
6224
|
RadioList.displayName = "RadioList";
|
|
6184
6225
|
|
|
6185
6226
|
// src/components/Stepper/Stepper.tsx
|
|
6186
|
-
import
|
|
6227
|
+
import React51 from "react";
|
|
6187
6228
|
import {
|
|
6188
6229
|
Stepper as JoyStepper,
|
|
6189
6230
|
Step as JoyStep,
|
|
6190
6231
|
StepIndicator as JoyStepIndicator,
|
|
6191
6232
|
stepClasses,
|
|
6192
6233
|
stepIndicatorClasses,
|
|
6193
|
-
styled as
|
|
6234
|
+
styled as styled27
|
|
6194
6235
|
} from "@mui/joy";
|
|
6195
6236
|
import CheckIcon from "@mui/icons-material/Check";
|
|
6196
6237
|
import { motion as motion27 } from "framer-motion";
|
|
6197
|
-
var Step =
|
|
6238
|
+
var Step = styled27(JoyStep)({});
|
|
6198
6239
|
Step.displayName = "Step";
|
|
6199
|
-
var StepIndicator =
|
|
6240
|
+
var StepIndicator = styled27(JoyStepIndicator)({});
|
|
6200
6241
|
StepIndicator.displayName = "StepIndicator";
|
|
6201
|
-
var StyledStepper =
|
|
6242
|
+
var StyledStepper = styled27(JoyStepper)(({ theme }) => ({
|
|
6202
6243
|
"--StepIndicator-size": "24px",
|
|
6203
6244
|
"--Step-gap": theme.spacing(2),
|
|
6204
6245
|
"--joy-palette-success-solidBg": "var(--joy-palette-success-400)",
|
|
@@ -6216,7 +6257,7 @@ function Stepper(props) {
|
|
|
6216
6257
|
inactiveLineColor = "neutral.300",
|
|
6217
6258
|
activeStep
|
|
6218
6259
|
} = props;
|
|
6219
|
-
return /* @__PURE__ */
|
|
6260
|
+
return /* @__PURE__ */ React51.createElement(
|
|
6220
6261
|
MotionStepper,
|
|
6221
6262
|
{
|
|
6222
6263
|
sx: (theme) => ({
|
|
@@ -6250,16 +6291,16 @@ function Stepper(props) {
|
|
|
6250
6291
|
const completed = activeStep > i + 1;
|
|
6251
6292
|
const disabled = activeStep < i + 1;
|
|
6252
6293
|
const hasContent = step.label || step.extraContent;
|
|
6253
|
-
return /* @__PURE__ */
|
|
6294
|
+
return /* @__PURE__ */ React51.createElement(
|
|
6254
6295
|
Step,
|
|
6255
6296
|
{
|
|
6256
6297
|
key: `step-${i}`,
|
|
6257
|
-
indicator: /* @__PURE__ */
|
|
6298
|
+
indicator: /* @__PURE__ */ React51.createElement(StepIndicator, { variant: "solid", color: "primary" }, completed ? /* @__PURE__ */ React51.createElement(CheckIcon, null) : step.indicatorContent),
|
|
6258
6299
|
active,
|
|
6259
6300
|
completed,
|
|
6260
6301
|
disabled
|
|
6261
6302
|
},
|
|
6262
|
-
hasContent && /* @__PURE__ */
|
|
6303
|
+
hasContent && /* @__PURE__ */ React51.createElement(Stack_default, null, step.label && /* @__PURE__ */ React51.createElement(Typography_default, { level: "title-sm" }, step.label), step.extraContent && /* @__PURE__ */ React51.createElement(Typography_default, { level: "body-xs" }, step.extraContent))
|
|
6263
6304
|
);
|
|
6264
6305
|
})
|
|
6265
6306
|
);
|
|
@@ -6267,11 +6308,11 @@ function Stepper(props) {
|
|
|
6267
6308
|
Stepper.displayName = "Stepper";
|
|
6268
6309
|
|
|
6269
6310
|
// src/components/Switch/Switch.tsx
|
|
6270
|
-
import
|
|
6271
|
-
import { Switch as JoySwitch, styled as
|
|
6311
|
+
import React52 from "react";
|
|
6312
|
+
import { Switch as JoySwitch, styled as styled28, switchClasses } from "@mui/joy";
|
|
6272
6313
|
import { motion as motion28 } from "framer-motion";
|
|
6273
6314
|
var MotionSwitch = motion28(JoySwitch);
|
|
6274
|
-
var StyledThumb =
|
|
6315
|
+
var StyledThumb = styled28(motion28.div)({
|
|
6275
6316
|
"--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
|
|
6276
6317
|
display: "inline-flex",
|
|
6277
6318
|
justifyContent: "center",
|
|
@@ -6289,14 +6330,14 @@ var StyledThumb = styled27(motion28.div)({
|
|
|
6289
6330
|
right: "var(--Switch-thumbOffset)"
|
|
6290
6331
|
}
|
|
6291
6332
|
});
|
|
6292
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
6333
|
+
var Thumb = (props) => /* @__PURE__ */ React52.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
6293
6334
|
var spring = {
|
|
6294
6335
|
type: "spring",
|
|
6295
6336
|
stiffness: 700,
|
|
6296
6337
|
damping: 30
|
|
6297
6338
|
};
|
|
6298
6339
|
var Switch = (props) => {
|
|
6299
|
-
return /* @__PURE__ */
|
|
6340
|
+
return /* @__PURE__ */ React52.createElement(
|
|
6300
6341
|
MotionSwitch,
|
|
6301
6342
|
{
|
|
6302
6343
|
...props,
|
|
@@ -6310,21 +6351,21 @@ var Switch = (props) => {
|
|
|
6310
6351
|
Switch.displayName = "Switch";
|
|
6311
6352
|
|
|
6312
6353
|
// src/components/Tabs/Tabs.tsx
|
|
6313
|
-
import
|
|
6354
|
+
import React53, { forwardRef as forwardRef11 } from "react";
|
|
6314
6355
|
import {
|
|
6315
6356
|
Tabs as JoyTabs,
|
|
6316
6357
|
Tab as JoyTab,
|
|
6317
6358
|
TabList as JoyTabList,
|
|
6318
6359
|
TabPanel as JoyTabPanel,
|
|
6319
|
-
styled as
|
|
6360
|
+
styled as styled29,
|
|
6320
6361
|
tabClasses
|
|
6321
6362
|
} from "@mui/joy";
|
|
6322
|
-
var StyledTabs =
|
|
6363
|
+
var StyledTabs = styled29(JoyTabs)(({ theme }) => ({
|
|
6323
6364
|
backgroundColor: theme.palette.background.body
|
|
6324
6365
|
}));
|
|
6325
6366
|
var Tabs = StyledTabs;
|
|
6326
6367
|
Tabs.displayName = "Tabs";
|
|
6327
|
-
var StyledTab =
|
|
6368
|
+
var StyledTab = styled29(JoyTab)(({ theme }) => ({
|
|
6328
6369
|
gap: theme.spacing(2),
|
|
6329
6370
|
[`&:not(.${tabClasses.selected})`]: {
|
|
6330
6371
|
color: theme.palette.neutral[700]
|
|
@@ -6334,14 +6375,14 @@ var StyledTab = styled28(JoyTab)(({ theme }) => ({
|
|
|
6334
6375
|
}
|
|
6335
6376
|
}));
|
|
6336
6377
|
var Tab = forwardRef11(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
|
|
6337
|
-
return /* @__PURE__ */
|
|
6378
|
+
return /* @__PURE__ */ React53.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
|
|
6338
6379
|
});
|
|
6339
6380
|
Tab.displayName = "Tab";
|
|
6340
6381
|
var TabList = JoyTabList;
|
|
6341
6382
|
var TabPanel = JoyTabPanel;
|
|
6342
6383
|
|
|
6343
6384
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
6344
|
-
import
|
|
6385
|
+
import React54 from "react";
|
|
6345
6386
|
import { CssBaseline, CssVarsProvider, checkboxClasses, extendTheme, inputClasses } from "@mui/joy";
|
|
6346
6387
|
var colorScheme = {
|
|
6347
6388
|
palette: {
|
|
@@ -6620,7 +6661,7 @@ var defaultTheme = extendTheme({
|
|
|
6620
6661
|
});
|
|
6621
6662
|
function ThemeProvider(props) {
|
|
6622
6663
|
const theme = props.theme || defaultTheme;
|
|
6623
|
-
return /* @__PURE__ */
|
|
6664
|
+
return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(CssVarsProvider, { theme }, /* @__PURE__ */ React54.createElement(CssBaseline, null), props.children));
|
|
6624
6665
|
}
|
|
6625
6666
|
ThemeProvider.displayName = "ThemeProvider";
|
|
6626
6667
|
export {
|
|
@@ -6786,7 +6827,7 @@ export {
|
|
|
6786
6827
|
stepButtonClasses,
|
|
6787
6828
|
stepClasses2 as stepClasses,
|
|
6788
6829
|
stepperClasses,
|
|
6789
|
-
|
|
6830
|
+
styled30 as styled,
|
|
6790
6831
|
switchClasses2 as switchClasses,
|
|
6791
6832
|
tabListClasses,
|
|
6792
6833
|
tabPanelClasses,
|