schummar-table 0.39.2 → 0.40.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/{chunk-YWWFSINO.js → chunk-E2DUBLYQ.js} +39 -23
- package/dist/chunk-E2DUBLYQ.js.map +1 -0
- package/dist/index.cjs +343 -267
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +237 -185
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.cjs +43 -18
- package/dist/mui4Theme.cjs.map +1 -1
- package/dist/mui4Theme.d.cts +1 -1
- package/dist/mui4Theme.d.ts +1 -1
- package/dist/mui4Theme.js +6 -2
- package/dist/mui4Theme.js.map +1 -1
- package/dist/mui5Theme.cjs +43 -18
- package/dist/mui5Theme.cjs.map +1 -1
- package/dist/mui5Theme.d.cts +1 -1
- package/dist/mui5Theme.d.ts +1 -1
- package/dist/mui5Theme.js +6 -2
- package/dist/mui5Theme.js.map +1 -1
- package/dist/{types-DXWvQ10Y.d.ts → types-3d4ARU6a.d.ts} +4 -0
- package/dist/{types-CBQ-mEqF.d.cts → types-CYMVvUGJ.d.cts} +4 -0
- package/package.json +1 -1
- package/dist/chunk-YWWFSINO.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ComponentType, ReactNode, HTMLProps } from 'react';
|
|
4
|
-
import { T as TableTheme, C as CommonFilterProps, S as SerializableValue, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-
|
|
5
|
-
export { e as Column, f as FunctionWithDeps, g as InternalColumn, h as Sort, i as SortDirection, d as TableStateStorage } from './types-
|
|
4
|
+
import { T as TableTheme, C as CommonFilterProps, S as SerializableValue, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-CYMVvUGJ.cjs';
|
|
5
|
+
export { e as Column, f as FunctionWithDeps, g as InternalColumn, h as Sort, i as SortDirection, d as TableStateStorage } from './types-CYMVvUGJ.cjs';
|
|
6
6
|
import { Store } from 'schummar-state/react';
|
|
7
7
|
import { E as ExporterEntry } from './exporter-u6SatTo6.cjs';
|
|
8
8
|
import '@emotion/react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ComponentType, ReactNode, HTMLProps } from 'react';
|
|
4
|
-
import { T as TableTheme, C as CommonFilterProps, S as SerializableValue, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-
|
|
5
|
-
export { e as Column, f as FunctionWithDeps, g as InternalColumn, h as Sort, i as SortDirection, d as TableStateStorage } from './types-
|
|
4
|
+
import { T as TableTheme, C as CommonFilterProps, S as SerializableValue, a as TableProps, F as FilterImplementation, M as MemoizedTableTheme, I as Id, b as TableItem, c as InternalTableState, P as PartialTableTheme } from './types-3d4ARU6a.js';
|
|
5
|
+
export { e as Column, f as FunctionWithDeps, g as InternalColumn, h as Sort, i as SortDirection, d as TableStateStorage } from './types-3d4ARU6a.js';
|
|
6
6
|
import { Store } from 'schummar-state/react';
|
|
7
7
|
import { E as ExporterEntry } from './exporter-u6SatTo6.js';
|
|
8
8
|
import '@emotion/react';
|
package/dist/index.js
CHANGED
|
@@ -5,13 +5,10 @@ import {
|
|
|
5
5
|
TableSettingsContext,
|
|
6
6
|
TableSettingsProvider,
|
|
7
7
|
configureTableTheme,
|
|
8
|
-
darkGray,
|
|
9
8
|
defaultClasses,
|
|
10
9
|
globalTableTheme,
|
|
11
|
-
gray,
|
|
12
|
-
lightGray,
|
|
13
10
|
mergeThemes
|
|
14
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E2DUBLYQ.js";
|
|
15
12
|
import "./chunk-WFCJ3D3G.js";
|
|
16
13
|
import {
|
|
17
14
|
__async,
|
|
@@ -47,7 +44,11 @@ function useColumnContext() {
|
|
|
47
44
|
var defaultColors = {
|
|
48
45
|
primary: { main: "#1976d2", light: "#42a5f5", contrastText: "#fff" },
|
|
49
46
|
secondary: { main: "#9c27b0", light: "#ba68c8", contrastText: "#fff" },
|
|
50
|
-
blocked: { main: "#f44336", light: "#f26257", contrastText: "#fff" }
|
|
47
|
+
blocked: { main: "#f44336", light: "#f26257", contrastText: "#fff" },
|
|
48
|
+
background: "#ffffff",
|
|
49
|
+
text: "inherit",
|
|
50
|
+
border: "#777",
|
|
51
|
+
borderLight: "#eee"
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
// src/components/spinnner.tsx
|
|
@@ -189,9 +190,9 @@ var Button = (_a) => {
|
|
|
189
190
|
}
|
|
190
191
|
},
|
|
191
192
|
variant === "outlined" && {
|
|
192
|
-
border:
|
|
193
|
+
border: "1px solid var(--table-button-border, var(--table-border, #777777))",
|
|
193
194
|
"&:disabled": {
|
|
194
|
-
borderColor:
|
|
195
|
+
borderColor: "var(--table-button-border-disabled, #eeeeee)"
|
|
195
196
|
}
|
|
196
197
|
},
|
|
197
198
|
variant === "contained" && {
|
|
@@ -319,7 +320,7 @@ var TextField = (_a) => {
|
|
|
319
320
|
flex: 1,
|
|
320
321
|
display: "flex",
|
|
321
322
|
alignItems: "center",
|
|
322
|
-
border:
|
|
323
|
+
border: "1px solid var(--table-textfield-border, var(--table-border, #777777))",
|
|
323
324
|
borderRadius: 4
|
|
324
325
|
},
|
|
325
326
|
focus && { border: "2px solid var(--primaryMain)", margin: -1 }
|
|
@@ -771,7 +772,11 @@ function useCssVariables() {
|
|
|
771
772
|
"--secondaryContrastText": colors.secondary.contrastText,
|
|
772
773
|
"--blockedMain": colors.blocked.main,
|
|
773
774
|
"--blockedLight": colors.blocked.light,
|
|
774
|
-
"--blockedContrastText": colors.blocked.contrastText
|
|
775
|
+
"--blockedContrastText": colors.blocked.contrastText,
|
|
776
|
+
"--table-background-color": colors.background,
|
|
777
|
+
"--table-text-color": colors.text,
|
|
778
|
+
"--table-border-color": colors.border,
|
|
779
|
+
"--table-border-light-color": colors.borderLight
|
|
775
780
|
};
|
|
776
781
|
});
|
|
777
782
|
}
|
|
@@ -887,7 +892,18 @@ function AutoFocusTextField(props) {
|
|
|
887
892
|
ref.current.focus();
|
|
888
893
|
}
|
|
889
894
|
}, [isActive]);
|
|
890
|
-
return /* @__PURE__ */ jsx10(
|
|
895
|
+
return /* @__PURE__ */ jsx10(
|
|
896
|
+
TextField2,
|
|
897
|
+
__spreadProps(__spreadValues({}, props), {
|
|
898
|
+
inputRef: ref,
|
|
899
|
+
css: {
|
|
900
|
+
input: {
|
|
901
|
+
backgroundColor: "inherit",
|
|
902
|
+
color: "inherit"
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
})
|
|
906
|
+
);
|
|
891
907
|
}
|
|
892
908
|
|
|
893
909
|
// src/hooks/useFilter.ts
|
|
@@ -1100,6 +1116,12 @@ function DateInput({
|
|
|
1100
1116
|
borderBottom: "2px solid transparent",
|
|
1101
1117
|
outline: "none",
|
|
1102
1118
|
fontSize: "inherit",
|
|
1119
|
+
backgroundColor: "inherit",
|
|
1120
|
+
color: "inherit",
|
|
1121
|
+
"::placeholder": {
|
|
1122
|
+
color: "inherit",
|
|
1123
|
+
opacity: 0.5
|
|
1124
|
+
},
|
|
1103
1125
|
"&:focus": {
|
|
1104
1126
|
borderBottom: "2px solid var(--primaryMain)"
|
|
1105
1127
|
}
|
|
@@ -1301,10 +1323,11 @@ function DatePicker(props) {
|
|
|
1301
1323
|
border: "none",
|
|
1302
1324
|
background: "transparent",
|
|
1303
1325
|
cursor: disabled ? void 0 : "pointer",
|
|
1304
|
-
font: "inherit"
|
|
1326
|
+
font: "inherit",
|
|
1327
|
+
color: "inherit"
|
|
1305
1328
|
},
|
|
1306
1329
|
(prevMonth || nextMonth) && {
|
|
1307
|
-
color:
|
|
1330
|
+
color: "var(--date-picker-disemphasized, #bdbdbd)"
|
|
1308
1331
|
},
|
|
1309
1332
|
today2 && {
|
|
1310
1333
|
outline: "1px solid var(--secondaryMain)"
|
|
@@ -1362,6 +1385,9 @@ function DatePicker(props) {
|
|
|
1362
1385
|
{
|
|
1363
1386
|
variant: "text",
|
|
1364
1387
|
type: "button",
|
|
1388
|
+
css: {
|
|
1389
|
+
color: "inherit"
|
|
1390
|
+
},
|
|
1365
1391
|
onClick: () => {
|
|
1366
1392
|
setDirty(void 0);
|
|
1367
1393
|
if (value2 instanceof Function) {
|
|
@@ -1431,185 +1457,197 @@ function DatePicker(props) {
|
|
|
1431
1457
|
const { format } = new Intl.DateTimeFormat(locale, { year: "numeric" });
|
|
1432
1458
|
return (year) => format(new Date(year, 0, 1));
|
|
1433
1459
|
}, [locale]);
|
|
1434
|
-
return /* @__PURE__ */ jsxs8(
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1460
|
+
return /* @__PURE__ */ jsxs8(
|
|
1461
|
+
"div",
|
|
1462
|
+
{
|
|
1463
|
+
css: [
|
|
1464
|
+
cssVariables,
|
|
1465
|
+
{
|
|
1466
|
+
color: "var(--table-text-color)"
|
|
1467
|
+
}
|
|
1468
|
+
],
|
|
1469
|
+
children: [
|
|
1470
|
+
/* @__PURE__ */ jsxs8(
|
|
1471
|
+
"div",
|
|
1472
|
+
{
|
|
1473
|
+
css: {
|
|
1474
|
+
display: "grid",
|
|
1475
|
+
gridAutoFlow: "column",
|
|
1476
|
+
justifyContent: "center",
|
|
1477
|
+
alignItems: "baseline",
|
|
1478
|
+
gap: "var(--spacing)"
|
|
1479
|
+
},
|
|
1480
|
+
children: [
|
|
1481
|
+
/* @__PURE__ */ jsx13(
|
|
1482
|
+
DateInput,
|
|
1483
|
+
{
|
|
1484
|
+
value: min != null ? min : null,
|
|
1485
|
+
onChange: (date) => set(date != null ? date : void 0, max, "min"),
|
|
1486
|
+
locale
|
|
1487
|
+
}
|
|
1488
|
+
),
|
|
1489
|
+
rangeSelect && /* @__PURE__ */ jsxs8(Fragment4, { children: [
|
|
1490
|
+
" - ",
|
|
1491
|
+
/* @__PURE__ */ jsx13(
|
|
1492
|
+
DateInput,
|
|
1493
|
+
{
|
|
1494
|
+
value: max != null ? max : null,
|
|
1495
|
+
onChange: (date) => set(min, date != null ? date : void 0, "max"),
|
|
1496
|
+
locale
|
|
1497
|
+
}
|
|
1498
|
+
)
|
|
1499
|
+
] })
|
|
1500
|
+
]
|
|
1501
|
+
}
|
|
1502
|
+
),
|
|
1503
|
+
calendars.map(({ month, year, weeks }) => /* @__PURE__ */ jsxs8("div", { css: { display: "grid" }, children: [
|
|
1504
|
+
/* @__PURE__ */ jsxs8(
|
|
1505
|
+
"div",
|
|
1448
1506
|
{
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1507
|
+
css: {
|
|
1508
|
+
margin: "calc(var(--spacing) * 4) 0",
|
|
1509
|
+
display: "grid",
|
|
1510
|
+
gridAutoFlow: "column",
|
|
1511
|
+
justifyContent: "space-between",
|
|
1512
|
+
alignItems: "center"
|
|
1513
|
+
},
|
|
1514
|
+
children: [
|
|
1515
|
+
/* @__PURE__ */ jsx13(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getBackProps({ calendars })), { children: /* @__PURE__ */ jsx13(ChevronRight2, { css: { transform: "rotate3d(0, 0, 1, 180deg)" } }) })),
|
|
1516
|
+
/* @__PURE__ */ jsxs8("div", { css: { display: "flex" }, children: [
|
|
1517
|
+
formatMonth(month),
|
|
1518
|
+
" ",
|
|
1519
|
+
formatYear(year)
|
|
1520
|
+
] }),
|
|
1521
|
+
/* @__PURE__ */ jsx13(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getForwardProps({ calendars })), { children: /* @__PURE__ */ jsx13(ChevronRight2, {}) }))
|
|
1522
|
+
]
|
|
1452
1523
|
}
|
|
1453
1524
|
),
|
|
1454
|
-
|
|
1455
|
-
"
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
locale
|
|
1462
|
-
}
|
|
1463
|
-
)
|
|
1464
|
-
] })
|
|
1465
|
-
]
|
|
1466
|
-
}
|
|
1467
|
-
),
|
|
1468
|
-
calendars.map(({ month, year, weeks }) => /* @__PURE__ */ jsxs8("div", { css: { display: "grid" }, children: [
|
|
1469
|
-
/* @__PURE__ */ jsxs8(
|
|
1470
|
-
"div",
|
|
1471
|
-
{
|
|
1472
|
-
css: {
|
|
1473
|
-
margin: "calc(var(--spacing) * 4) 0",
|
|
1474
|
-
display: "grid",
|
|
1475
|
-
gridAutoFlow: "column",
|
|
1476
|
-
justifyContent: "space-between",
|
|
1477
|
-
alignItems: "center"
|
|
1478
|
-
},
|
|
1479
|
-
children: [
|
|
1480
|
-
/* @__PURE__ */ jsx13(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getBackProps({ calendars })), { children: /* @__PURE__ */ jsx13(ChevronRight2, { css: { transform: "rotate3d(0, 0, 1, 180deg)" } }) })),
|
|
1481
|
-
/* @__PURE__ */ jsxs8("div", { css: { display: "flex" }, children: [
|
|
1482
|
-
formatMonth(month),
|
|
1483
|
-
" ",
|
|
1484
|
-
formatYear(year)
|
|
1485
|
-
] }),
|
|
1486
|
-
/* @__PURE__ */ jsx13(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getForwardProps({ calendars })), { children: /* @__PURE__ */ jsx13(ChevronRight2, {}) }))
|
|
1487
|
-
]
|
|
1488
|
-
}
|
|
1489
|
-
),
|
|
1490
|
-
/* @__PURE__ */ jsxs8(
|
|
1491
|
-
"div",
|
|
1492
|
-
{
|
|
1493
|
-
css: {
|
|
1494
|
-
justifySelf: "center",
|
|
1495
|
-
display: "grid",
|
|
1496
|
-
gridTemplateColumns: "repeat(8, max-content)"
|
|
1497
|
-
},
|
|
1498
|
-
children: [
|
|
1499
|
-
showCalendarWeek ? /* @__PURE__ */ jsx13(
|
|
1500
|
-
"div",
|
|
1501
|
-
{
|
|
1502
|
-
css: {
|
|
1503
|
-
justifySelf: "center",
|
|
1504
|
-
padding: 10,
|
|
1505
|
-
borderRight: `1px solid ${gray}`
|
|
1506
|
-
},
|
|
1507
|
-
children: /* @__PURE__ */ jsx13(Text, { id: "calendarWeek" })
|
|
1508
|
-
}
|
|
1509
|
-
) : /* @__PURE__ */ jsx13("div", {}),
|
|
1510
|
-
weekDays.map((_v, weekDay) => /* @__PURE__ */ jsx13(
|
|
1511
|
-
"div",
|
|
1512
|
-
{
|
|
1513
|
-
css: {
|
|
1514
|
-
justifySelf: "center",
|
|
1515
|
-
padding: 10
|
|
1516
|
-
},
|
|
1517
|
-
children: formatWeekday(weekDay)
|
|
1525
|
+
/* @__PURE__ */ jsxs8(
|
|
1526
|
+
"div",
|
|
1527
|
+
{
|
|
1528
|
+
css: {
|
|
1529
|
+
justifySelf: "center",
|
|
1530
|
+
display: "grid",
|
|
1531
|
+
gridTemplateColumns: "repeat(8, max-content)"
|
|
1518
1532
|
},
|
|
1519
|
-
|
|
1520
|
-
)),
|
|
1521
|
-
weeks.map((week, index) => {
|
|
1522
|
-
const weekStart = week[0];
|
|
1523
|
-
const weekEnd = week[6];
|
|
1524
|
-
const weekDisabled = !rangeSelect || minDate && weekEnd.date < minDate || maxDate && weekStart.date > maxDate;
|
|
1525
|
-
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
1533
|
+
children: [
|
|
1526
1534
|
showCalendarWeek ? /* @__PURE__ */ jsx13(
|
|
1527
|
-
"
|
|
1535
|
+
"div",
|
|
1528
1536
|
{
|
|
1529
|
-
type: "button",
|
|
1530
1537
|
css: {
|
|
1538
|
+
justifySelf: "center",
|
|
1531
1539
|
padding: 10,
|
|
1532
|
-
|
|
1533
|
-
background: "transparent",
|
|
1534
|
-
cursor: weekDisabled ? void 0 : "pointer",
|
|
1535
|
-
font: "inherit",
|
|
1536
|
-
borderRight: `1px solid ${gray}`
|
|
1537
|
-
},
|
|
1538
|
-
onClick: () => {
|
|
1539
|
-
if (weekDisabled) {
|
|
1540
|
-
return;
|
|
1541
|
-
}
|
|
1542
|
-
const min2 = minDate && weekStart.date < minDate ? minDate : weekStart.date;
|
|
1543
|
-
const max2 = maxDate && weekEnd.date > maxDate ? maxDate : weekEnd.date;
|
|
1544
|
-
set(min2, max2);
|
|
1540
|
+
borderRight: "1px solid var(--date-picker-separator, var(--table-border, #bdbdbd))"
|
|
1545
1541
|
},
|
|
1546
|
-
|
|
1547
|
-
onPointerOut: () => !weekDisabled && setHovered(void 0),
|
|
1548
|
-
children: getCalendarWeek(weekEnd.date)
|
|
1542
|
+
children: /* @__PURE__ */ jsx13(Text, { id: "calendarWeek" })
|
|
1549
1543
|
}
|
|
1550
1544
|
) : /* @__PURE__ */ jsx13("div", {}),
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
const
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1545
|
+
weekDays.map((_v, weekDay) => /* @__PURE__ */ jsx13(
|
|
1546
|
+
"div",
|
|
1547
|
+
{
|
|
1548
|
+
css: {
|
|
1549
|
+
justifySelf: "center",
|
|
1550
|
+
padding: 10
|
|
1551
|
+
},
|
|
1552
|
+
children: formatWeekday(weekDay)
|
|
1553
|
+
},
|
|
1554
|
+
weekDay
|
|
1555
|
+
)),
|
|
1556
|
+
weeks.map((week, index) => {
|
|
1557
|
+
const weekStart = week[0];
|
|
1558
|
+
const weekEnd = week[6];
|
|
1559
|
+
const weekDisabled = !rangeSelect || minDate && weekEnd.date < minDate || maxDate && weekStart.date > maxDate;
|
|
1560
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
1561
|
+
showCalendarWeek ? /* @__PURE__ */ jsx13(
|
|
1562
|
+
"button",
|
|
1563
|
+
{
|
|
1564
|
+
type: "button",
|
|
1565
|
+
css: {
|
|
1566
|
+
padding: 10,
|
|
1567
|
+
border: "none",
|
|
1568
|
+
background: "transparent",
|
|
1569
|
+
cursor: weekDisabled ? void 0 : "pointer",
|
|
1570
|
+
font: "inherit",
|
|
1571
|
+
borderRight: "1px solid var(--date-picker-separator, var(--table-border, #bdbdbd))",
|
|
1572
|
+
color: "inherit"
|
|
1573
|
+
},
|
|
1574
|
+
onClick: () => {
|
|
1575
|
+
if (weekDisabled) {
|
|
1576
|
+
return;
|
|
1577
|
+
}
|
|
1578
|
+
const min2 = minDate && weekStart.date < minDate ? minDate : weekStart.date;
|
|
1579
|
+
const max2 = maxDate && weekEnd.date > maxDate ? maxDate : weekEnd.date;
|
|
1580
|
+
set(min2, max2);
|
|
1581
|
+
},
|
|
1582
|
+
onPointerOver: () => !weekDisabled && setHovered({ min: weekStart.date, max: weekEnd.date }),
|
|
1583
|
+
onPointerOut: () => !weekDisabled && setHovered(void 0),
|
|
1584
|
+
children: getCalendarWeek(weekEnd.date)
|
|
1585
|
+
}
|
|
1586
|
+
) : /* @__PURE__ */ jsx13("div", {}),
|
|
1587
|
+
week.map((dateObject, dayIndex) => {
|
|
1588
|
+
if (!dateObject) {
|
|
1589
|
+
return /* @__PURE__ */ jsx13("div", {}, dayIndex);
|
|
1590
|
+
}
|
|
1591
|
+
const { prevMonth, nextMonth, date } = dateObject;
|
|
1592
|
+
const today2 = startOfDay(date).getTime() === now.getTime();
|
|
1593
|
+
const disabled = minDate && date < minDate || maxDate && date > maxDate;
|
|
1594
|
+
const selected = date.getTime() === (min == null ? void 0 : min.getTime()) || min && max && dateIntersect(date, { min, max });
|
|
1595
|
+
const preSelected = !selected && !disabled && (dateIntersect(date, hovered) || min && !max && hovered && dateIntersect(
|
|
1596
|
+
date,
|
|
1597
|
+
min <= hovered.min ? { min, max: hovered.min } : { min: hovered.max, max: min }
|
|
1598
|
+
));
|
|
1599
|
+
const blocked = blockedRanges.some((range) => dateIntersect(date, range));
|
|
1600
|
+
return /* @__PURE__ */ jsx13(
|
|
1601
|
+
"button",
|
|
1602
|
+
__spreadProps(__spreadValues({
|
|
1603
|
+
type: "button",
|
|
1604
|
+
css: getDayCssStyles({
|
|
1605
|
+
disabled,
|
|
1606
|
+
prevMonth,
|
|
1607
|
+
nextMonth,
|
|
1608
|
+
today: today2,
|
|
1609
|
+
blocked,
|
|
1610
|
+
selected,
|
|
1611
|
+
preSelected
|
|
1612
|
+
})
|
|
1613
|
+
}, getDateProps({ dateObj: dateObject })), {
|
|
1614
|
+
onClick: () => {
|
|
1615
|
+
if (dirty) {
|
|
1616
|
+
if (min) set(min, date);
|
|
1617
|
+
else set(date, max);
|
|
1618
|
+
} else {
|
|
1619
|
+
set(date);
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
onPointerOver: () => setHovered({ min: date, max: date }),
|
|
1623
|
+
onPointerOut: () => setHovered(void 0),
|
|
1624
|
+
disabled,
|
|
1625
|
+
children: date.getDate()
|
|
1626
|
+
}),
|
|
1627
|
+
`${index}-${dayIndex}`
|
|
1628
|
+
);
|
|
1629
|
+
})
|
|
1630
|
+
] }, index);
|
|
1593
1631
|
})
|
|
1594
|
-
]
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1632
|
+
]
|
|
1633
|
+
}
|
|
1634
|
+
)
|
|
1635
|
+
] }, `${month}${year}`)),
|
|
1636
|
+
/* @__PURE__ */ jsx13(
|
|
1637
|
+
"div",
|
|
1638
|
+
{
|
|
1639
|
+
css: {
|
|
1640
|
+
marginTop: "var(--spacing)",
|
|
1641
|
+
display: "grid",
|
|
1642
|
+
gridAutoFlow: "column",
|
|
1643
|
+
justifyContent: "center"
|
|
1644
|
+
},
|
|
1645
|
+
children: resolvedQuickOptions
|
|
1646
|
+
}
|
|
1647
|
+
)
|
|
1648
|
+
]
|
|
1649
|
+
}
|
|
1650
|
+
);
|
|
1613
1651
|
}
|
|
1614
1652
|
|
|
1615
1653
|
// src/components/dateFilter.tsx
|
|
@@ -1721,7 +1759,7 @@ function NumberField(_a) {
|
|
|
1721
1759
|
const [value = printNumber(commitedValue, locale), setValue] = useState6();
|
|
1722
1760
|
return /* @__PURE__ */ jsx15(
|
|
1723
1761
|
TextField2,
|
|
1724
|
-
__spreadValues({
|
|
1762
|
+
__spreadProps(__spreadValues({
|
|
1725
1763
|
value,
|
|
1726
1764
|
onChange: (event) => {
|
|
1727
1765
|
if (Pattern.test(event.target.value)) {
|
|
@@ -1732,7 +1770,14 @@ function NumberField(_a) {
|
|
|
1732
1770
|
onChange == null ? void 0 : onChange(parseNumber(value));
|
|
1733
1771
|
setValue(void 0);
|
|
1734
1772
|
}
|
|
1735
|
-
}, textFieldProps)
|
|
1773
|
+
}, textFieldProps), {
|
|
1774
|
+
css: {
|
|
1775
|
+
input: {
|
|
1776
|
+
backgroundColor: "inherit",
|
|
1777
|
+
color: "inherit"
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
})
|
|
1736
1781
|
);
|
|
1737
1782
|
}
|
|
1738
1783
|
|
|
@@ -2116,7 +2161,12 @@ function SelectFilter(_a) {
|
|
|
2116
2161
|
disabled: value.size === 0,
|
|
2117
2162
|
onClick: () => onChange(/* @__PURE__ */ new Set()),
|
|
2118
2163
|
variant: "outlined",
|
|
2119
|
-
css: {
|
|
2164
|
+
css: {
|
|
2165
|
+
justifyContent: "center",
|
|
2166
|
+
width: "100%",
|
|
2167
|
+
marginBottom: "var(--spacing)",
|
|
2168
|
+
color: "inherit"
|
|
2169
|
+
},
|
|
2120
2170
|
children: deselectAll
|
|
2121
2171
|
}
|
|
2122
2172
|
),
|
|
@@ -3660,7 +3710,7 @@ var Row = memo2(function Row2({
|
|
|
3660
3710
|
return /* @__PURE__ */ jsxs17("div", { css: { display: "contents" }, children: [
|
|
3661
3711
|
/* @__PURE__ */ jsx31("div", { className: className2, css: [defaultClasses.cellFill, css_], ref: divRef }),
|
|
3662
3712
|
/* @__PURE__ */ jsxs17("div", { className: className2, css: [defaultClasses.cell, defaultClasses.firstCell, css_], children: [
|
|
3663
|
-
/* @__PURE__ */ jsx31("div", { css: { width: indent * 20 } }),
|
|
3713
|
+
indent > 0 && /* @__PURE__ */ jsx31("div", { css: { width: indent * 20 } }),
|
|
3664
3714
|
enableSelection && /* @__PURE__ */ jsx31(SelectComponent, { itemId }),
|
|
3665
3715
|
(hasChildren || hasDeferredChildren || hasDetails) && /* @__PURE__ */ jsx31(ExpandControl, { itemId, hasDeferredChildren }),
|
|
3666
3716
|
rowAction
|
|
@@ -3885,8 +3935,10 @@ var TableInner = memo3(function TableInner2({ hidden }) {
|
|
|
3885
3935
|
enableSelection && /* @__PURE__ */ jsx33(SelectComponent, {}),
|
|
3886
3936
|
enableColumnSelection && /* @__PURE__ */ jsx33(ColumnSelection, {}),
|
|
3887
3937
|
enableExport && /* @__PURE__ */ jsx33(Export2, {}),
|
|
3888
|
-
/* @__PURE__ */
|
|
3889
|
-
|
|
3938
|
+
(enableSelection || enableColumnSelection || enableExport) && /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
3939
|
+
/* @__PURE__ */ jsx33("div", { css: { flex: 1 } }),
|
|
3940
|
+
/* @__PURE__ */ jsx33(ResizeHandleView, {})
|
|
3941
|
+
] })
|
|
3890
3942
|
]
|
|
3891
3943
|
}
|
|
3892
3944
|
),
|