schummar-table 0.44.0 → 0.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +238 -159
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +208 -130
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -81,6 +81,7 @@ var src_exports = {};
|
|
|
81
81
|
__export(src_exports, {
|
|
82
82
|
AutoFocusTextField: () => AutoFocusTextField,
|
|
83
83
|
ColumnContext: () => ColumnContext,
|
|
84
|
+
CombinedFilter: () => CombinedFilter,
|
|
84
85
|
DateFilter: () => DateFilter,
|
|
85
86
|
DatePicker: () => DatePicker,
|
|
86
87
|
DatePickerProvider: () => DatePickerProvider,
|
|
@@ -1921,6 +1922,83 @@ function useFilter(impl) {
|
|
|
1921
1922
|
}, context);
|
|
1922
1923
|
}
|
|
1923
1924
|
|
|
1925
|
+
// src/components/combinedFilter.tsx
|
|
1926
|
+
var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
|
|
1927
|
+
function CombinedFilter(_a) {
|
|
1928
|
+
var _b = _a, {
|
|
1929
|
+
columnIds: inputColumnIds
|
|
1930
|
+
} = _b, props = __objRest(_b, [
|
|
1931
|
+
"columnIds"
|
|
1932
|
+
]);
|
|
1933
|
+
const table = useTableContext();
|
|
1934
|
+
const columnIds = table.useState((state) => {
|
|
1935
|
+
return inputColumnIds != null ? inputColumnIds : state.activeColumns.filter(
|
|
1936
|
+
(column) => column.filter !== void 0 && !state.visibleColumns.some((c) => c.id === column.id)
|
|
1937
|
+
).map((column) => column.id);
|
|
1938
|
+
});
|
|
1939
|
+
const isActive = table.useState((state) => {
|
|
1940
|
+
return columnIds.some((columnId) => {
|
|
1941
|
+
const filter = state.filters.get(columnId);
|
|
1942
|
+
const filterValue = state.filterValues.get(columnId);
|
|
1943
|
+
return filter !== void 0 && filterValue !== void 0 && filter.isActive(filterValue);
|
|
1944
|
+
});
|
|
1945
|
+
});
|
|
1946
|
+
useFilter(__spreadProps(__spreadValues({}, props), {
|
|
1947
|
+
id: "combinedFilter",
|
|
1948
|
+
value: isActive,
|
|
1949
|
+
isActive(filterValue) {
|
|
1950
|
+
return filterValue;
|
|
1951
|
+
},
|
|
1952
|
+
test() {
|
|
1953
|
+
return true;
|
|
1954
|
+
},
|
|
1955
|
+
onChange(value) {
|
|
1956
|
+
var _a2;
|
|
1957
|
+
if (value === void 0) {
|
|
1958
|
+
for (const columnId of columnIds) {
|
|
1959
|
+
const impl = table.getState().filters.get(columnId);
|
|
1960
|
+
(_a2 = impl == null ? void 0 : impl.onChange) == null ? void 0 : _a2.call(impl, void 0);
|
|
1961
|
+
if ((impl == null ? void 0 : impl.value) === void 0) {
|
|
1962
|
+
table.update((state) => {
|
|
1963
|
+
state.filterValues.delete(columnId);
|
|
1964
|
+
});
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
}));
|
|
1970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: columnIds.map((columnId) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ColumnContext.Provider, { value: columnId, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FilterControl, { component: Filter }) }, columnId)) });
|
|
1971
|
+
}
|
|
1972
|
+
function Filter(_a) {
|
|
1973
|
+
var _b = _a, { isActive } = _b, props = __objRest(_b, ["isActive"]);
|
|
1974
|
+
const table = useTableContext();
|
|
1975
|
+
const columnId = useColumnContext();
|
|
1976
|
+
const FilterList2 = useTheme((t2) => t2.icons.FilterList);
|
|
1977
|
+
const label = table.useState((state) => {
|
|
1978
|
+
var _a2, _b2;
|
|
1979
|
+
return (_b2 = (_a2 = state.activeColumns.find((column) => column.id === columnId)) == null ? void 0 : _a2.header) != null ? _b2 : null;
|
|
1980
|
+
});
|
|
1981
|
+
const Button2 = useTheme((t2) => t2.components.Button);
|
|
1982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1983
|
+
Button2,
|
|
1984
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1985
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1986
|
+
FilterList2,
|
|
1987
|
+
{
|
|
1988
|
+
css: {
|
|
1989
|
+
color: isActive ? "var(--primaryMain)" : "#b0bac9"
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
),
|
|
1993
|
+
css: {
|
|
1994
|
+
width: "100%",
|
|
1995
|
+
color: isActive ? "var(--primaryMain)" : "var(--color-text)"
|
|
1996
|
+
},
|
|
1997
|
+
children: label
|
|
1998
|
+
})
|
|
1999
|
+
);
|
|
2000
|
+
}
|
|
2001
|
+
|
|
1924
2002
|
// src/components/datePicker.tsx
|
|
1925
2003
|
var import_dayzed = require("dayzed");
|
|
1926
2004
|
var import_react18 = require("react");
|
|
@@ -1939,7 +2017,7 @@ function defaults(first, ...more) {
|
|
|
1939
2017
|
|
|
1940
2018
|
// src/components/dateInput.tsx
|
|
1941
2019
|
var import_react17 = require("react");
|
|
1942
|
-
var
|
|
2020
|
+
var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
|
|
1943
2021
|
var className = "schummar-table-date-input";
|
|
1944
2022
|
var defaultDate = new Date(1970, 0, 1);
|
|
1945
2023
|
var isIncludedType = (type) => type === "day" || type === "month" || type === "year";
|
|
@@ -2007,14 +2085,14 @@ function DateInput({
|
|
|
2007
2085
|
);
|
|
2008
2086
|
const parts = format.formatToParts(value != null ? value : defaultDate);
|
|
2009
2087
|
const isEmpty = !value;
|
|
2010
|
-
return /* @__PURE__ */ (0,
|
|
2088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2011
2089
|
"div",
|
|
2012
2090
|
{
|
|
2013
2091
|
css: {
|
|
2014
2092
|
display: "flex",
|
|
2015
2093
|
alignItems: "baseline"
|
|
2016
2094
|
},
|
|
2017
|
-
children: parts.map(({ type, value: value2 }, index) => /* @__PURE__ */ (0,
|
|
2095
|
+
children: parts.map(({ type, value: value2 }, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react17.Fragment, { children: isIncludedType(type) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2018
2096
|
"input",
|
|
2019
2097
|
{
|
|
2020
2098
|
className,
|
|
@@ -2049,20 +2127,20 @@ function DateInput({
|
|
|
2049
2127
|
onFocus: (event) => event.target.select(),
|
|
2050
2128
|
onBlur: commit
|
|
2051
2129
|
}
|
|
2052
|
-
) : type === "literal" ? /* @__PURE__ */ (0,
|
|
2130
|
+
) : type === "literal" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: value2 }) : null }, index))
|
|
2053
2131
|
}
|
|
2054
2132
|
);
|
|
2055
2133
|
}
|
|
2056
2134
|
|
|
2057
2135
|
// src/components/text.tsx
|
|
2058
|
-
var
|
|
2136
|
+
var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
|
|
2059
2137
|
function Text({ id }) {
|
|
2060
2138
|
const text = useTheme((t2) => t2.text[id]);
|
|
2061
|
-
return /* @__PURE__ */ (0,
|
|
2139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: text });
|
|
2062
2140
|
}
|
|
2063
2141
|
|
|
2064
2142
|
// src/components/datePicker.tsx
|
|
2065
|
-
var
|
|
2143
|
+
var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
|
|
2066
2144
|
var DatePickerContext = (0, import_react18.createContext)({});
|
|
2067
2145
|
function DatePickerProvider(_a) {
|
|
2068
2146
|
var _b = _a, {
|
|
@@ -2071,7 +2149,7 @@ function DatePickerProvider(_a) {
|
|
|
2071
2149
|
"children"
|
|
2072
2150
|
]);
|
|
2073
2151
|
const value = (0, import_react18.useMemo)(() => props, [JSON.stringify(props)]);
|
|
2074
|
-
return /* @__PURE__ */ (0,
|
|
2152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DatePickerContext.Provider, { value, children });
|
|
2075
2153
|
}
|
|
2076
2154
|
var weekDays = [0, 1, 2, 3, 4, 5, 6];
|
|
2077
2155
|
var startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
@@ -2149,12 +2227,12 @@ var getCalendarWeek = (date) => {
|
|
|
2149
2227
|
return weekOfYear;
|
|
2150
2228
|
};
|
|
2151
2229
|
var commonQuickOptions = {
|
|
2152
|
-
today: { label: /* @__PURE__ */ (0,
|
|
2153
|
-
thisWeek: { label: /* @__PURE__ */ (0,
|
|
2154
|
-
thisMonth: { label: /* @__PURE__ */ (0,
|
|
2155
|
-
thisYear: { label: /* @__PURE__ */ (0,
|
|
2156
|
-
lastSevenDays: { label: /* @__PURE__ */ (0,
|
|
2157
|
-
lastThirtyDays: { label: /* @__PURE__ */ (0,
|
|
2230
|
+
today: { label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "today" }), value: today },
|
|
2231
|
+
thisWeek: { label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "thisWeek" }), value: (props) => thisWeek(0, props.firstDayOfWeek) },
|
|
2232
|
+
thisMonth: { label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "thisMonth" }), value: () => thisMonth() },
|
|
2233
|
+
thisYear: { label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "thisYear" }), value: () => thisYear() },
|
|
2234
|
+
lastSevenDays: { label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "lastSevenDays" }), value: () => lastDays(7) },
|
|
2235
|
+
lastThirtyDays: { label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "lastThirtyDays" }), value: () => lastDays(30) }
|
|
2158
2236
|
};
|
|
2159
2237
|
function dateIntersect(a, b) {
|
|
2160
2238
|
if (a instanceof Date) {
|
|
@@ -2283,7 +2361,7 @@ function DatePicker(props) {
|
|
|
2283
2361
|
const max = dirty ? dirty.max : value instanceof Date ? value : value == null ? void 0 : value.max;
|
|
2284
2362
|
const resolvedQuickOptions = [
|
|
2285
2363
|
...quickOptions,
|
|
2286
|
-
...noReset ? [] : [{ label: /* @__PURE__ */ (0,
|
|
2364
|
+
...noReset ? [] : [{ label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "reset" }), value: null }]
|
|
2287
2365
|
].map((option, index) => {
|
|
2288
2366
|
if (option instanceof Function) {
|
|
2289
2367
|
return option((value3) => {
|
|
@@ -2292,7 +2370,7 @@ function DatePicker(props) {
|
|
|
2292
2370
|
});
|
|
2293
2371
|
}
|
|
2294
2372
|
const { label, value: value2 } = typeof option === "string" ? commonQuickOptions[option] : option;
|
|
2295
|
-
return /* @__PURE__ */ (0,
|
|
2373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2296
2374
|
Button2,
|
|
2297
2375
|
{
|
|
2298
2376
|
variant: "text",
|
|
@@ -2368,7 +2446,7 @@ function DatePicker(props) {
|
|
|
2368
2446
|
const { format } = new Intl.DateTimeFormat(locale, { year: "numeric" });
|
|
2369
2447
|
return (year) => format(new Date(year, 0, 1));
|
|
2370
2448
|
}, [locale]);
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2372
2450
|
"div",
|
|
2373
2451
|
{
|
|
2374
2452
|
css: [
|
|
@@ -2378,7 +2456,7 @@ function DatePicker(props) {
|
|
|
2378
2456
|
}
|
|
2379
2457
|
],
|
|
2380
2458
|
children: [
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2382
2460
|
"div",
|
|
2383
2461
|
{
|
|
2384
2462
|
css: {
|
|
@@ -2389,7 +2467,7 @@ function DatePicker(props) {
|
|
|
2389
2467
|
gap: "var(--spacing)"
|
|
2390
2468
|
},
|
|
2391
2469
|
children: [
|
|
2392
|
-
/* @__PURE__ */ (0,
|
|
2470
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2393
2471
|
DateInput,
|
|
2394
2472
|
{
|
|
2395
2473
|
value: min != null ? min : null,
|
|
@@ -2397,9 +2475,9 @@ function DatePicker(props) {
|
|
|
2397
2475
|
locale
|
|
2398
2476
|
}
|
|
2399
2477
|
),
|
|
2400
|
-
rangeSelect && /* @__PURE__ */ (0,
|
|
2478
|
+
rangeSelect && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
2401
2479
|
" - ",
|
|
2402
|
-
/* @__PURE__ */ (0,
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2403
2481
|
DateInput,
|
|
2404
2482
|
{
|
|
2405
2483
|
value: max != null ? max : null,
|
|
@@ -2411,8 +2489,8 @@ function DatePicker(props) {
|
|
|
2411
2489
|
]
|
|
2412
2490
|
}
|
|
2413
2491
|
),
|
|
2414
|
-
calendars.map(({ month, year, weeks }) => /* @__PURE__ */ (0,
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2492
|
+
calendars.map(({ month, year, weeks }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { css: { display: "grid" }, children: [
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2416
2494
|
"div",
|
|
2417
2495
|
{
|
|
2418
2496
|
css: {
|
|
@@ -2423,17 +2501,17 @@ function DatePicker(props) {
|
|
|
2423
2501
|
alignItems: "center"
|
|
2424
2502
|
},
|
|
2425
2503
|
children: [
|
|
2426
|
-
/* @__PURE__ */ (0,
|
|
2427
|
-
/* @__PURE__ */ (0,
|
|
2504
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getBackProps({ calendars })), { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronRight2, { css: { transform: "rotate3d(0, 0, 1, 180deg)" } }) })),
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { css: { display: "flex" }, children: [
|
|
2428
2506
|
formatMonth(month),
|
|
2429
2507
|
" ",
|
|
2430
2508
|
formatYear(year)
|
|
2431
2509
|
] }),
|
|
2432
|
-
/* @__PURE__ */ (0,
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getForwardProps({ calendars })), { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronRight2, {}) }))
|
|
2433
2511
|
]
|
|
2434
2512
|
}
|
|
2435
2513
|
),
|
|
2436
|
-
/* @__PURE__ */ (0,
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2437
2515
|
"div",
|
|
2438
2516
|
{
|
|
2439
2517
|
css: {
|
|
@@ -2442,7 +2520,7 @@ function DatePicker(props) {
|
|
|
2442
2520
|
gridTemplateColumns: "repeat(8, max-content)"
|
|
2443
2521
|
},
|
|
2444
2522
|
children: [
|
|
2445
|
-
showCalendarWeek ? /* @__PURE__ */ (0,
|
|
2523
|
+
showCalendarWeek ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2446
2524
|
"div",
|
|
2447
2525
|
{
|
|
2448
2526
|
css: {
|
|
@@ -2450,10 +2528,10 @@ function DatePicker(props) {
|
|
|
2450
2528
|
padding: 10,
|
|
2451
2529
|
borderRight: "1px solid var(--date-picker-separator, var(--table-border, #bdbdbd))"
|
|
2452
2530
|
},
|
|
2453
|
-
children: /* @__PURE__ */ (0,
|
|
2531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { id: "calendarWeek" })
|
|
2454
2532
|
}
|
|
2455
|
-
) : /* @__PURE__ */ (0,
|
|
2456
|
-
weekDays.map((_v, weekDay) => /* @__PURE__ */ (0,
|
|
2533
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {}),
|
|
2534
|
+
weekDays.map((_v, weekDay) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2457
2535
|
"div",
|
|
2458
2536
|
{
|
|
2459
2537
|
css: {
|
|
@@ -2468,8 +2546,8 @@ function DatePicker(props) {
|
|
|
2468
2546
|
const weekStart = week[0];
|
|
2469
2547
|
const weekEnd = week[6];
|
|
2470
2548
|
const weekDisabled = !rangeSelect || minDate && weekEnd.date < minDate || maxDate && weekStart.date > maxDate;
|
|
2471
|
-
return /* @__PURE__ */ (0,
|
|
2472
|
-
showCalendarWeek ? /* @__PURE__ */ (0,
|
|
2549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react18.Fragment, { children: [
|
|
2550
|
+
showCalendarWeek ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2473
2551
|
"button",
|
|
2474
2552
|
{
|
|
2475
2553
|
type: "button",
|
|
@@ -2494,10 +2572,10 @@ function DatePicker(props) {
|
|
|
2494
2572
|
onPointerOut: () => !weekDisabled && setHovered(void 0),
|
|
2495
2573
|
children: getCalendarWeek(weekEnd.date)
|
|
2496
2574
|
}
|
|
2497
|
-
) : /* @__PURE__ */ (0,
|
|
2575
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {}),
|
|
2498
2576
|
week.map((dateObject, dayIndex) => {
|
|
2499
2577
|
if (!dateObject) {
|
|
2500
|
-
return /* @__PURE__ */ (0,
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {}, dayIndex);
|
|
2501
2579
|
}
|
|
2502
2580
|
const { prevMonth, nextMonth, date } = dateObject;
|
|
2503
2581
|
const today2 = startOfDay(date).getTime() === now.getTime();
|
|
@@ -2508,7 +2586,7 @@ function DatePicker(props) {
|
|
|
2508
2586
|
min <= hovered.min ? { min, max: hovered.min } : { min: hovered.max, max: min }
|
|
2509
2587
|
));
|
|
2510
2588
|
const blocked = blockedRanges.some((range) => dateIntersect(date, range));
|
|
2511
|
-
return /* @__PURE__ */ (0,
|
|
2589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2512
2590
|
"button",
|
|
2513
2591
|
__spreadProps(__spreadValues({
|
|
2514
2592
|
type: "button",
|
|
@@ -2544,7 +2622,7 @@ function DatePicker(props) {
|
|
|
2544
2622
|
}
|
|
2545
2623
|
)
|
|
2546
2624
|
] }, `${month}${year}`)),
|
|
2547
|
-
/* @__PURE__ */ (0,
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2548
2626
|
"div",
|
|
2549
2627
|
{
|
|
2550
2628
|
css: {
|
|
@@ -2562,7 +2640,7 @@ function DatePicker(props) {
|
|
|
2562
2640
|
}
|
|
2563
2641
|
|
|
2564
2642
|
// src/components/dateFilter.tsx
|
|
2565
|
-
var
|
|
2643
|
+
var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
|
|
2566
2644
|
function convertDate(x) {
|
|
2567
2645
|
if (x instanceof Date) return x;
|
|
2568
2646
|
if (typeof x === "number" || typeof x === "string") return new Date(x);
|
|
@@ -2614,14 +2692,14 @@ function DateFilter(_a) {
|
|
|
2614
2692
|
return dateIntersect(filterValue, value2);
|
|
2615
2693
|
}
|
|
2616
2694
|
}));
|
|
2617
|
-
return /* @__PURE__ */ (0,
|
|
2695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2618
2696
|
"div",
|
|
2619
2697
|
{
|
|
2620
2698
|
css: {
|
|
2621
2699
|
padding: "calc(var(--spacing) * 2)",
|
|
2622
2700
|
display: "grid"
|
|
2623
2701
|
},
|
|
2624
|
-
children: /* @__PURE__ */ (0,
|
|
2702
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2625
2703
|
DatePicker,
|
|
2626
2704
|
{
|
|
2627
2705
|
rangeSelect: !singleSelect,
|
|
@@ -2642,7 +2720,7 @@ function DateFilter(_a) {
|
|
|
2642
2720
|
|
|
2643
2721
|
// src/components/numberField.tsx
|
|
2644
2722
|
var import_react19 = require("react");
|
|
2645
|
-
var
|
|
2723
|
+
var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
|
|
2646
2724
|
var Pattern = /^-?\d*(?:[.,]\d*)?$/;
|
|
2647
2725
|
var printNumber = (value, locale) => {
|
|
2648
2726
|
if (value === null) {
|
|
@@ -2668,7 +2746,7 @@ function NumberField(_a) {
|
|
|
2668
2746
|
const locale = useTheme((t2) => t2.locale);
|
|
2669
2747
|
const TextField2 = useTheme((t2) => t2.components.TextField);
|
|
2670
2748
|
const [value = printNumber(commitedValue, locale), setValue] = (0, import_react19.useState)();
|
|
2671
|
-
return /* @__PURE__ */ (0,
|
|
2749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2672
2750
|
TextField2,
|
|
2673
2751
|
__spreadProps(__spreadValues({
|
|
2674
2752
|
value,
|
|
@@ -2693,7 +2771,7 @@ function NumberField(_a) {
|
|
|
2693
2771
|
}
|
|
2694
2772
|
|
|
2695
2773
|
// src/components/rangeFilter.tsx
|
|
2696
|
-
var
|
|
2774
|
+
var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
|
|
2697
2775
|
function RangeFilter(_a) {
|
|
2698
2776
|
var _b = _a, {
|
|
2699
2777
|
min,
|
|
@@ -2747,7 +2825,7 @@ function RangeFilter(_a) {
|
|
|
2747
2825
|
return value2 !== null && value2 >= min2 && value2 <= max2;
|
|
2748
2826
|
}
|
|
2749
2827
|
}));
|
|
2750
|
-
return /* @__PURE__ */ (0,
|
|
2828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2751
2829
|
"div",
|
|
2752
2830
|
{
|
|
2753
2831
|
css: {
|
|
@@ -2755,7 +2833,7 @@ function RangeFilter(_a) {
|
|
|
2755
2833
|
display: "grid",
|
|
2756
2834
|
gap: "1em"
|
|
2757
2835
|
},
|
|
2758
|
-
children: /* @__PURE__ */ (0,
|
|
2836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2759
2837
|
"div",
|
|
2760
2838
|
{
|
|
2761
2839
|
css: {
|
|
@@ -2767,12 +2845,12 @@ function RangeFilter(_a) {
|
|
|
2767
2845
|
}
|
|
2768
2846
|
},
|
|
2769
2847
|
children: [
|
|
2770
|
-
/* @__PURE__ */ (0,
|
|
2848
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2771
2849
|
NumberField,
|
|
2772
2850
|
{
|
|
2773
2851
|
value: value == null ? void 0 : value[0],
|
|
2774
2852
|
onChange: (newMin) => onChange(normalize(newMin, value == null ? void 0 : value[1], "min", { min, max })),
|
|
2775
|
-
startIcon: /* @__PURE__ */ (0,
|
|
2853
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { css: { margin: "0 calc(var(--spacing) * 2)" }, children: rangeMinText }),
|
|
2776
2854
|
placeholder: String(minValue != null ? minValue : ""),
|
|
2777
2855
|
css: {
|
|
2778
2856
|
alignItems: "baseline"
|
|
@@ -2780,12 +2858,12 @@ function RangeFilter(_a) {
|
|
|
2780
2858
|
}
|
|
2781
2859
|
),
|
|
2782
2860
|
"-",
|
|
2783
|
-
/* @__PURE__ */ (0,
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2784
2862
|
NumberField,
|
|
2785
2863
|
{
|
|
2786
2864
|
value: value == null ? void 0 : value[1],
|
|
2787
2865
|
onChange: (newMax) => onChange(normalize(value == null ? void 0 : value[0], newMax, "max", { min, max })),
|
|
2788
|
-
startIcon: /* @__PURE__ */ (0,
|
|
2866
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { css: { margin: "0 calc(var(--spacing) * 2)" }, children: rangeMaxText }),
|
|
2789
2867
|
placeholder: String(maxValue != null ? maxValue : ""),
|
|
2790
2868
|
css: {
|
|
2791
2869
|
alignItems: "baseline"
|
|
@@ -2818,13 +2896,13 @@ function clamp(value, min = Number.NEGATIVE_INFINITY, max = Number.POSITIVE_INFI
|
|
|
2818
2896
|
var import_react21 = require("react");
|
|
2819
2897
|
|
|
2820
2898
|
// src/components/formControlLabel.tsx
|
|
2821
|
-
var
|
|
2899
|
+
var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
|
|
2822
2900
|
function FormControlLabel({
|
|
2823
2901
|
control,
|
|
2824
2902
|
label,
|
|
2825
2903
|
disabled
|
|
2826
2904
|
}) {
|
|
2827
|
-
return /* @__PURE__ */ (0,
|
|
2905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2828
2906
|
"label",
|
|
2829
2907
|
{
|
|
2830
2908
|
css: [
|
|
@@ -2841,7 +2919,7 @@ function FormControlLabel({
|
|
|
2841
2919
|
],
|
|
2842
2920
|
children: [
|
|
2843
2921
|
control,
|
|
2844
|
-
/* @__PURE__ */ (0,
|
|
2922
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { css: { marginLeft: "var(--spacing)" }, children: label })
|
|
2845
2923
|
]
|
|
2846
2924
|
}
|
|
2847
2925
|
);
|
|
@@ -2889,7 +2967,7 @@ function throttle2(function_, ms) {
|
|
|
2889
2967
|
}
|
|
2890
2968
|
|
|
2891
2969
|
// src/components/virtualList.tsx
|
|
2892
|
-
var
|
|
2970
|
+
var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
|
|
2893
2971
|
function VirtualList(_a) {
|
|
2894
2972
|
var _b = _a, {
|
|
2895
2973
|
virtual = true,
|
|
@@ -2919,7 +2997,7 @@ function VirtualList(_a) {
|
|
|
2919
2997
|
};
|
|
2920
2998
|
}, [update, virtual, throttleScroll]);
|
|
2921
2999
|
if (!virtual) {
|
|
2922
|
-
return /* @__PURE__ */ (0,
|
|
3000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2923
3001
|
"div",
|
|
2924
3002
|
__spreadProps(__spreadValues({}, props), {
|
|
2925
3003
|
css: {
|
|
@@ -2950,7 +3028,7 @@ function VirtualList(_a) {
|
|
|
2950
3028
|
) : 1;
|
|
2951
3029
|
const before = from * itemHeight;
|
|
2952
3030
|
const after = (items.length - to) * itemHeight;
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
3031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2954
3032
|
"div",
|
|
2955
3033
|
__spreadProps(__spreadValues({}, props), {
|
|
2956
3034
|
onScroll: (event) => {
|
|
@@ -2964,9 +3042,9 @@ function VirtualList(_a) {
|
|
|
2964
3042
|
display: "grid"
|
|
2965
3043
|
},
|
|
2966
3044
|
children: [
|
|
2967
|
-
/* @__PURE__ */ (0,
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-virtual-before": true, style: { height: before } }),
|
|
2968
3046
|
items.slice(from, to).map((item, index) => children(item, index + from)),
|
|
2969
|
-
/* @__PURE__ */ (0,
|
|
3047
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-virtual-after": true, style: { height: after } })
|
|
2970
3048
|
]
|
|
2971
3049
|
})
|
|
2972
3050
|
);
|
|
@@ -2980,7 +3058,7 @@ function averageItemHeight(container) {
|
|
|
2980
3058
|
}
|
|
2981
3059
|
|
|
2982
3060
|
// src/components/selectFilter.tsx
|
|
2983
|
-
var
|
|
3061
|
+
var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
|
|
2984
3062
|
function toggle(set, value, singleSelect) {
|
|
2985
3063
|
const newSet = new Set(singleSelect ? [] : set);
|
|
2986
3064
|
if (set.has(value)) {
|
|
@@ -3048,7 +3126,7 @@ function SelectFilter(_a) {
|
|
|
3048
3126
|
(0, import_react21.useEffect)(() => {
|
|
3049
3127
|
setQuery("");
|
|
3050
3128
|
}, [isActive]);
|
|
3051
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3052
3130
|
"div",
|
|
3053
3131
|
{
|
|
3054
3132
|
css: {
|
|
@@ -3058,16 +3136,16 @@ function SelectFilter(_a) {
|
|
|
3058
3136
|
gap: "var(--spacing)"
|
|
3059
3137
|
},
|
|
3060
3138
|
children: [
|
|
3061
|
-
!hideSearchField && /* @__PURE__ */ (0,
|
|
3139
|
+
!hideSearchField && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3062
3140
|
AutoFocusTextField,
|
|
3063
3141
|
{
|
|
3064
3142
|
value: query,
|
|
3065
3143
|
onChange: (event) => setQuery(event.target.value),
|
|
3066
|
-
endIcon: /* @__PURE__ */ (0,
|
|
3144
|
+
endIcon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconButton2, { onClick: () => setQuery(""), children: !query ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Search2, {}) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Clear2, {}) }),
|
|
3067
3145
|
css: { marginBottom: "var(--spacing)" }
|
|
3068
3146
|
}
|
|
3069
3147
|
),
|
|
3070
|
-
!hideResetButton && /* @__PURE__ */ (0,
|
|
3148
|
+
!hideResetButton && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3071
3149
|
Button2,
|
|
3072
3150
|
{
|
|
3073
3151
|
disabled: value.size === 0,
|
|
@@ -3082,7 +3160,7 @@ function SelectFilter(_a) {
|
|
|
3082
3160
|
children: deselectAll
|
|
3083
3161
|
}
|
|
3084
3162
|
),
|
|
3085
|
-
/* @__PURE__ */ (0,
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3086
3164
|
VirtualList,
|
|
3087
3165
|
{
|
|
3088
3166
|
items: ordered,
|
|
@@ -3094,10 +3172,10 @@ function SelectFilter(_a) {
|
|
|
3094
3172
|
display: "grid",
|
|
3095
3173
|
gridTemplateColumns: "minmax(0, 1fr)"
|
|
3096
3174
|
},
|
|
3097
|
-
children: (option, index) => /* @__PURE__ */ (0,
|
|
3175
|
+
children: (option, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3098
3176
|
FormControlLabel,
|
|
3099
3177
|
{
|
|
3100
|
-
control: /* @__PURE__ */ (0,
|
|
3178
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3101
3179
|
Checkbox2,
|
|
3102
3180
|
{
|
|
3103
3181
|
checked: value.has(option),
|
|
@@ -3110,7 +3188,7 @@ function SelectFilter(_a) {
|
|
|
3110
3188
|
)
|
|
3111
3189
|
}
|
|
3112
3190
|
),
|
|
3113
|
-
ordered.length === 0 && /* @__PURE__ */ (0,
|
|
3191
|
+
ordered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { css: { textAlign: "center" }, children: noResults })
|
|
3114
3192
|
]
|
|
3115
3193
|
}
|
|
3116
3194
|
);
|
|
@@ -3897,12 +3975,12 @@ function useTableState(_props) {
|
|
|
3897
3975
|
}
|
|
3898
3976
|
|
|
3899
3977
|
// src/components/clearFiltersButton.tsx
|
|
3900
|
-
var
|
|
3978
|
+
var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
|
|
3901
3979
|
function ClearFiltersButton() {
|
|
3902
3980
|
const Button2 = useTheme((t2) => t2.components.Button);
|
|
3903
3981
|
const textClearFilters = useTheme((t2) => t2.text.clearFilters);
|
|
3904
3982
|
const table = useTableContext();
|
|
3905
|
-
return /* @__PURE__ */ (0,
|
|
3983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { css: defaultClasses.clearFiltersButton, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3906
3984
|
Button2,
|
|
3907
3985
|
{
|
|
3908
3986
|
variant: "outlined",
|
|
@@ -3921,7 +3999,7 @@ function ClearFiltersButton() {
|
|
|
3921
3999
|
}
|
|
3922
4000
|
|
|
3923
4001
|
// src/components/columnFooter.tsx
|
|
3924
|
-
var
|
|
4002
|
+
var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
|
|
3925
4003
|
function ColumnFooter() {
|
|
3926
4004
|
const table = useTableContext();
|
|
3927
4005
|
const columnId = useColumnContext();
|
|
@@ -3953,7 +4031,7 @@ function ColumnFooter() {
|
|
|
3953
4031
|
const column = state.activeColumns.find((column2) => column2.id === columnId);
|
|
3954
4032
|
return column == null ? void 0 : column.footer;
|
|
3955
4033
|
});
|
|
3956
|
-
return /* @__PURE__ */ (0,
|
|
4034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3957
4035
|
"div",
|
|
3958
4036
|
{
|
|
3959
4037
|
className: cx(classes, columnClasses),
|
|
@@ -3975,7 +4053,7 @@ var import_immer7 = require("immer");
|
|
|
3975
4053
|
var import_react32 = require("react");
|
|
3976
4054
|
|
|
3977
4055
|
// src/components/resizeHandle.tsx
|
|
3978
|
-
var
|
|
4056
|
+
var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
|
|
3979
4057
|
function ResizeHandle() {
|
|
3980
4058
|
const table = useTableContext();
|
|
3981
4059
|
const columnId = useColumnContext();
|
|
@@ -4012,7 +4090,7 @@ function ResizeHandle() {
|
|
|
4012
4090
|
if (!enabled) {
|
|
4013
4091
|
return null;
|
|
4014
4092
|
}
|
|
4015
|
-
return /* @__PURE__ */ (0,
|
|
4093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4016
4094
|
ResizeHandleView,
|
|
4017
4095
|
{
|
|
4018
4096
|
enabled,
|
|
@@ -4037,7 +4115,7 @@ function ResizeHandleView(_a) {
|
|
|
4037
4115
|
var _a2;
|
|
4038
4116
|
return (_a2 = theme.styles) == null ? void 0 : _a2.columnDivider;
|
|
4039
4117
|
});
|
|
4040
|
-
return /* @__PURE__ */ (0,
|
|
4118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4041
4119
|
"div",
|
|
4042
4120
|
__spreadValues({
|
|
4043
4121
|
className: className2,
|
|
@@ -4066,7 +4144,7 @@ function ResizeHandleView(_a) {
|
|
|
4066
4144
|
}
|
|
4067
4145
|
|
|
4068
4146
|
// src/components/sortComponent.tsx
|
|
4069
|
-
var
|
|
4147
|
+
var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
|
|
4070
4148
|
function SortComponent({ children }) {
|
|
4071
4149
|
const table = useTableContext();
|
|
4072
4150
|
const columnId = useColumnContext();
|
|
@@ -4106,7 +4184,7 @@ function SortComponent({ children }) {
|
|
|
4106
4184
|
event.preventDefault();
|
|
4107
4185
|
return false;
|
|
4108
4186
|
}
|
|
4109
|
-
return /* @__PURE__ */ (0,
|
|
4187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4110
4188
|
"div",
|
|
4111
4189
|
{
|
|
4112
4190
|
css: {
|
|
@@ -4123,8 +4201,8 @@ function SortComponent({ children }) {
|
|
|
4123
4201
|
onClick: (event) => toggle2(event),
|
|
4124
4202
|
onContextMenu: (event) => toggle2(event, true),
|
|
4125
4203
|
children: [
|
|
4126
|
-
/* @__PURE__ */ (0,
|
|
4127
|
-
/* @__PURE__ */ (0,
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { children }),
|
|
4205
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge2, { badgeContent: sortDisabled ? 0 : index, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4128
4206
|
"span",
|
|
4129
4207
|
{
|
|
4130
4208
|
css: [
|
|
@@ -4132,7 +4210,7 @@ function SortComponent({ children }) {
|
|
|
4132
4210
|
!direction && { opacity: 0 },
|
|
4133
4211
|
direction === "desc" && { transform: "rotate3d(0, 0, 1, 180deg)" }
|
|
4134
4212
|
],
|
|
4135
|
-
children: /* @__PURE__ */ (0,
|
|
4213
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ArrowUpward2, {})
|
|
4136
4214
|
}
|
|
4137
4215
|
) })
|
|
4138
4216
|
]
|
|
@@ -4141,7 +4219,7 @@ function SortComponent({ children }) {
|
|
|
4141
4219
|
}
|
|
4142
4220
|
|
|
4143
4221
|
// src/components/columnHeader.tsx
|
|
4144
|
-
var
|
|
4222
|
+
var import_jsx_runtime27 = require("@emotion/react/jsx-runtime");
|
|
4145
4223
|
var ColumnHeaderContext = new StoreScope({
|
|
4146
4224
|
items: /* @__PURE__ */ new Map()
|
|
4147
4225
|
});
|
|
@@ -4283,7 +4361,7 @@ function ColumnHeader() {
|
|
|
4283
4361
|
clone.current = void 0;
|
|
4284
4362
|
});
|
|
4285
4363
|
}
|
|
4286
|
-
return /* @__PURE__ */ (0,
|
|
4364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4287
4365
|
"div",
|
|
4288
4366
|
{
|
|
4289
4367
|
ref,
|
|
@@ -4304,10 +4382,10 @@ function ColumnHeader() {
|
|
|
4304
4382
|
onPointerMove: enabled ? onPointerMove : void 0,
|
|
4305
4383
|
onPointerUp: enabled ? onPointerUp : void 0,
|
|
4306
4384
|
children: [
|
|
4307
|
-
/* @__PURE__ */ (0,
|
|
4308
|
-
/* @__PURE__ */ (0,
|
|
4309
|
-
/* @__PURE__ */ (0,
|
|
4310
|
-
/* @__PURE__ */ (0,
|
|
4385
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SortComponent, { children: header }),
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { css: { flex: 1 } }),
|
|
4387
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FilterControl, {}),
|
|
4388
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ResizeHandle, {})
|
|
4311
4389
|
]
|
|
4312
4390
|
}
|
|
4313
4391
|
);
|
|
@@ -4315,7 +4393,7 @@ function ColumnHeader() {
|
|
|
4315
4393
|
|
|
4316
4394
|
// src/components/columnSelection.tsx
|
|
4317
4395
|
var import_react34 = require("react");
|
|
4318
|
-
var
|
|
4396
|
+
var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
|
|
4319
4397
|
function ColumnSelection() {
|
|
4320
4398
|
const IconButton2 = useTheme((t2) => t2.components.IconButton);
|
|
4321
4399
|
const Popover2 = useTheme((t2) => t2.components.Popover);
|
|
@@ -4353,9 +4431,9 @@ function ColumnSelection() {
|
|
|
4353
4431
|
onHiddenColumnsChange == null ? void 0 : onHiddenColumnsChange(newValue);
|
|
4354
4432
|
};
|
|
4355
4433
|
const allVisible = columns.every((column) => !hiddenColumns.has(column.id));
|
|
4356
|
-
return /* @__PURE__ */ (0,
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4358
|
-
/* @__PURE__ */ (0,
|
|
4434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton2, { onClick: (event) => setAnchorElement(anchorElement ? null : event.currentTarget), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Settings2, {}) }),
|
|
4436
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4359
4437
|
Popover2,
|
|
4360
4438
|
{
|
|
4361
4439
|
anchorEl: anchorElement,
|
|
@@ -4364,18 +4442,18 @@ function ColumnSelection() {
|
|
|
4364
4442
|
css: cssVariables,
|
|
4365
4443
|
className: classes == null ? void 0 : classes.popover,
|
|
4366
4444
|
backdropClassName: classes == null ? void 0 : classes.popoverBackdrop,
|
|
4367
|
-
children: /* @__PURE__ */ (0,
|
|
4368
|
-
/* @__PURE__ */ (0,
|
|
4369
|
-
/* @__PURE__ */ (0,
|
|
4370
|
-
/* @__PURE__ */ (0,
|
|
4371
|
-
/* @__PURE__ */ (0,
|
|
4445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { css: { padding: `calc(var(--spacing) * 2)`, display: "grid" }, children: [
|
|
4446
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { css: { marginBottom: "var(--spacing)" }, children: selectColumns }),
|
|
4447
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { css: { margin: "0.5em 0", display: "flex", gap: "0.5em" }, children: [
|
|
4448
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button2, { variant: "outlined", onClick: () => toggle2(void 0, !allVisible), children: allVisible ? hideAll : showAll }),
|
|
4449
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button2, { variant: "outlined", onClick: reset, children: resetAll })
|
|
4372
4450
|
] }),
|
|
4373
4451
|
columns.map((column) => {
|
|
4374
4452
|
var _a;
|
|
4375
|
-
return /* @__PURE__ */ (0,
|
|
4453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4376
4454
|
FormControlLabel,
|
|
4377
4455
|
{
|
|
4378
|
-
control: /* @__PURE__ */ (0,
|
|
4456
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4379
4457
|
Checkbox2,
|
|
4380
4458
|
{
|
|
4381
4459
|
checked: !((_a = column.hidden) != null ? _a : hiddenColumns.has(column.id)),
|
|
@@ -4396,7 +4474,7 @@ function ColumnSelection() {
|
|
|
4396
4474
|
|
|
4397
4475
|
// src/components/export.tsx
|
|
4398
4476
|
var import_react35 = require("react");
|
|
4399
|
-
var
|
|
4477
|
+
var import_jsx_runtime29 = require("@emotion/react/jsx-runtime");
|
|
4400
4478
|
function Export2() {
|
|
4401
4479
|
const { exporters: contextExporters } = (0, import_react35.useContext)(TableSettingsContext);
|
|
4402
4480
|
const table = useTableContext();
|
|
@@ -4441,9 +4519,9 @@ function Export2() {
|
|
|
4441
4519
|
URL.revokeObjectURL(url);
|
|
4442
4520
|
}
|
|
4443
4521
|
}
|
|
4444
|
-
return /* @__PURE__ */ (0,
|
|
4445
|
-
/* @__PURE__ */ (0,
|
|
4446
|
-
/* @__PURE__ */ (0,
|
|
4522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
4523
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconButton2, { onClick: (event) => setAnchor(anchor ? null : event.currentTarget), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ExportIcon, { css: !!anchor && { color: "var(--primaryMain)" } }) }),
|
|
4524
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4447
4525
|
Popover2,
|
|
4448
4526
|
{
|
|
4449
4527
|
open: !!anchor,
|
|
@@ -4452,7 +4530,7 @@ function Export2() {
|
|
|
4452
4530
|
css: cssVariables,
|
|
4453
4531
|
className: classes == null ? void 0 : classes.popover,
|
|
4454
4532
|
backdropClassName: classes == null ? void 0 : classes.popoverBackdrop,
|
|
4455
|
-
children: /* @__PURE__ */ (0,
|
|
4533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4456
4534
|
"div",
|
|
4457
4535
|
{
|
|
4458
4536
|
css: {
|
|
@@ -4465,11 +4543,11 @@ function Export2() {
|
|
|
4465
4543
|
}
|
|
4466
4544
|
},
|
|
4467
4545
|
children: [
|
|
4468
|
-
/* @__PURE__ */ (0,
|
|
4469
|
-
exporters.map((entry, index) => /* @__PURE__ */ (0,
|
|
4546
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { css: { marginBottom: "var(--spacing)" }, children: exportTitle }),
|
|
4547
|
+
exporters.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4470
4548
|
Button2,
|
|
4471
4549
|
{
|
|
4472
|
-
startIcon: entry.action === "copy" ? /* @__PURE__ */ (0,
|
|
4550
|
+
startIcon: entry.action === "copy" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Clipboard2, {}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ExportIcon, {}),
|
|
4473
4551
|
onClick: () => execute(entry),
|
|
4474
4552
|
children: [
|
|
4475
4553
|
entry.action === "copy" ? exportCopy : exportDownload,
|
|
@@ -4510,10 +4588,10 @@ function calcCss(styles, item, index) {
|
|
|
4510
4588
|
|
|
4511
4589
|
// src/components/cell.tsx
|
|
4512
4590
|
var import_react36 = require("react");
|
|
4513
|
-
var
|
|
4591
|
+
var import_jsx_runtime30 = require("@emotion/react/jsx-runtime");
|
|
4514
4592
|
var defaultWrapCell = (content) => {
|
|
4515
4593
|
if (typeof content === "string") {
|
|
4516
|
-
return /* @__PURE__ */ (0,
|
|
4594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { css: defaultClasses.text, title: content, children: content });
|
|
4517
4595
|
}
|
|
4518
4596
|
return content;
|
|
4519
4597
|
};
|
|
@@ -4541,12 +4619,12 @@ var Cell = (0, import_react36.memo)(function Cell2({ itemId, rowIndex }) {
|
|
|
4541
4619
|
const styles = useTheme((t2) => calcCss(t2.styles, item == null ? void 0 : item.value, rowIndex));
|
|
4542
4620
|
if (!column || !item) return null;
|
|
4543
4621
|
const content = column.renderCell(column.value(item.value), item.value);
|
|
4544
|
-
return /* @__PURE__ */ (0,
|
|
4622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: className2, css: [defaultClasses.cell, styles], style: columnStyleOverride, children: wrapCell(content, column.value(item.value), item.value, rowIndex) });
|
|
4545
4623
|
});
|
|
4546
4624
|
|
|
4547
4625
|
// src/components/details.tsx
|
|
4548
4626
|
var import_react37 = require("react");
|
|
4549
|
-
var
|
|
4627
|
+
var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
|
|
4550
4628
|
var Details = (0, import_react37.forwardRef)(function Details2({ itemId, rowIndex }, ref) {
|
|
4551
4629
|
const table = useTableContext();
|
|
4552
4630
|
const classes = useTheme((t2) => t2.classes);
|
|
@@ -4559,11 +4637,11 @@ var Details = (0, import_react37.forwardRef)(function Details2({ itemId, rowInde
|
|
|
4559
4637
|
css: (styles == null ? void 0 : styles.details) instanceof Function ? styles.details(item == null ? void 0 : item.value, rowIndex) : styles == null ? void 0 : styles.details
|
|
4560
4638
|
};
|
|
4561
4639
|
});
|
|
4562
|
-
return details ? /* @__PURE__ */ (0,
|
|
4640
|
+
return details ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ref, className: className2, css: [defaultClasses.details, css4], children: details }) : null;
|
|
4563
4641
|
});
|
|
4564
4642
|
|
|
4565
4643
|
// src/components/expandControl.tsx
|
|
4566
|
-
var
|
|
4644
|
+
var import_jsx_runtime32 = require("@emotion/react/jsx-runtime");
|
|
4567
4645
|
function ExpandControl({
|
|
4568
4646
|
itemId,
|
|
4569
4647
|
hasDeferredChildren
|
|
@@ -4610,9 +4688,9 @@ function ExpandControl({
|
|
|
4610
4688
|
}
|
|
4611
4689
|
}
|
|
4612
4690
|
if (isExpanded && hasDeferredChildren && !hasChildren) {
|
|
4613
|
-
return /* @__PURE__ */ (0,
|
|
4691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Spinner2, { css: { margin: "0 var(--spacing)" } });
|
|
4614
4692
|
}
|
|
4615
|
-
return /* @__PURE__ */ (0,
|
|
4693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconButton2, { onClick: toggle2, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4616
4694
|
"span",
|
|
4617
4695
|
{
|
|
4618
4696
|
css: {
|
|
@@ -4620,13 +4698,13 @@ function ExpandControl({
|
|
|
4620
4698
|
transition: "all 300ms",
|
|
4621
4699
|
transform: isExpanded ? "rotate3d(0, 0, 1, 90deg)" : "rotate3d(0, 0, 1, 0deg)"
|
|
4622
4700
|
},
|
|
4623
|
-
children: /* @__PURE__ */ (0,
|
|
4701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChevronRight2, {})
|
|
4624
4702
|
}
|
|
4625
4703
|
) });
|
|
4626
4704
|
}
|
|
4627
4705
|
|
|
4628
4706
|
// src/components/selectComponent.tsx
|
|
4629
|
-
var
|
|
4707
|
+
var import_jsx_runtime33 = require("@emotion/react/jsx-runtime");
|
|
4630
4708
|
function SelectComponent({ itemId }) {
|
|
4631
4709
|
const table = useTableContext();
|
|
4632
4710
|
const Checkbox2 = useTheme((t2) => t2.components.Checkbox);
|
|
@@ -4675,7 +4753,7 @@ function SelectComponent({ itemId }) {
|
|
|
4675
4753
|
state.lastSelectedId = itemId;
|
|
4676
4754
|
});
|
|
4677
4755
|
}
|
|
4678
|
-
return /* @__PURE__ */ (0,
|
|
4756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4679
4757
|
Checkbox2,
|
|
4680
4758
|
{
|
|
4681
4759
|
css: {
|
|
@@ -4689,7 +4767,7 @@ function SelectComponent({ itemId }) {
|
|
|
4689
4767
|
}
|
|
4690
4768
|
|
|
4691
4769
|
// src/components/row.tsx
|
|
4692
|
-
var
|
|
4770
|
+
var import_jsx_runtime34 = require("@emotion/react/jsx-runtime");
|
|
4693
4771
|
var Row = (0, import_react39.memo)(function Row2({
|
|
4694
4772
|
itemId,
|
|
4695
4773
|
rowIndex
|
|
@@ -4701,7 +4779,7 @@ var Row = (0, import_react39.memo)(function Row2({
|
|
|
4701
4779
|
const classes = useTheme((t2) => t2.classes);
|
|
4702
4780
|
const styles = useTheme((t2) => t2.styles);
|
|
4703
4781
|
const item = table.useState((state) => state.activeItemsById.get(itemId));
|
|
4704
|
-
const wrapRow = (_a = table.useState((state) => state.props.wrapRow)) != null ? _a : (props) => /* @__PURE__ */ (0,
|
|
4782
|
+
const wrapRow = (_a = table.useState((state) => state.props.wrapRow)) != null ? _a : (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", __spreadValues({}, props));
|
|
4705
4783
|
const rowClassName = (classes == null ? void 0 : classes.row) instanceof Function ? classes.row(item == null ? void 0 : item.value, rowIndex) : classes == null ? void 0 : classes.row;
|
|
4706
4784
|
const rowStyles = (styles == null ? void 0 : styles.row) instanceof Function ? styles.row(item == null ? void 0 : item.value, rowIndex) : styles == null ? void 0 : styles.row;
|
|
4707
4785
|
const subgrid = table.useState((state) => state.props.subgrid);
|
|
@@ -4758,7 +4836,7 @@ var Row = (0, import_react39.memo)(function Row2({
|
|
|
4758
4836
|
if (!item) {
|
|
4759
4837
|
return null;
|
|
4760
4838
|
}
|
|
4761
|
-
return /* @__PURE__ */ (0,
|
|
4839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react38.ClassNames, { children: ({ css: css4 }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: wrapRow(
|
|
4762
4840
|
{
|
|
4763
4841
|
className: css4([
|
|
4764
4842
|
subgrid ? {
|
|
@@ -4771,8 +4849,8 @@ var Row = (0, import_react39.memo)(function Row2({
|
|
|
4771
4849
|
rowClassName,
|
|
4772
4850
|
rowStyles
|
|
4773
4851
|
]),
|
|
4774
|
-
children: /* @__PURE__ */ (0,
|
|
4775
|
-
/* @__PURE__ */ (0,
|
|
4852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
4853
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4776
4854
|
"div",
|
|
4777
4855
|
{
|
|
4778
4856
|
className: cellClassName,
|
|
@@ -4780,22 +4858,22 @@ var Row = (0, import_react39.memo)(function Row2({
|
|
|
4780
4858
|
ref: divRef
|
|
4781
4859
|
}
|
|
4782
4860
|
),
|
|
4783
|
-
/* @__PURE__ */ (0,
|
|
4861
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
4784
4862
|
"div",
|
|
4785
4863
|
{
|
|
4786
4864
|
className: cellClassName,
|
|
4787
4865
|
css: [defaultClasses.cell, defaultClasses.firstCell, css_],
|
|
4788
4866
|
children: [
|
|
4789
|
-
indent > 0 && /* @__PURE__ */ (0,
|
|
4790
|
-
enableSelection && /* @__PURE__ */ (0,
|
|
4791
|
-
(hasChildren || hasDeferredChildren || hasDetails) && /* @__PURE__ */ (0,
|
|
4867
|
+
indent > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { css: { width: indent * 20 } }),
|
|
4868
|
+
enableSelection && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectComponent, { itemId }),
|
|
4869
|
+
(hasChildren || hasDeferredChildren || hasDetails) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ExpandControl, { itemId, hasDeferredChildren }),
|
|
4792
4870
|
rowAction
|
|
4793
4871
|
]
|
|
4794
4872
|
}
|
|
4795
4873
|
),
|
|
4796
|
-
columnIds.map((columnId) => /* @__PURE__ */ (0,
|
|
4797
|
-
/* @__PURE__ */ (0,
|
|
4798
|
-
/* @__PURE__ */ (0,
|
|
4874
|
+
columnIds.map((columnId) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ColumnContext.Provider, { value: columnId, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Cell, { itemId, rowIndex }) }, columnId)),
|
|
4875
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cellClassName, css: [defaultClasses.cellFill, css_] }),
|
|
4876
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Details, { ref: detailsDivRef, itemId, rowIndex })
|
|
4799
4877
|
] })
|
|
4800
4878
|
},
|
|
4801
4879
|
item.value,
|
|
@@ -4805,7 +4883,7 @@ var Row = (0, import_react39.memo)(function Row2({
|
|
|
4805
4883
|
|
|
4806
4884
|
// src/components/virtualized.tsx
|
|
4807
4885
|
var import_react40 = require("react");
|
|
4808
|
-
var
|
|
4886
|
+
var import_jsx_runtime35 = require("@emotion/react/jsx-runtime");
|
|
4809
4887
|
var findScrollRoot = (x) => {
|
|
4810
4888
|
const parent = x.parentElement;
|
|
4811
4889
|
if (!parent) return document.documentElement;
|
|
@@ -4918,17 +4996,17 @@ function Virtualized(_a) {
|
|
|
4918
4996
|
return (_b3 = (_a3 = table.getState().props).debugRender) == null ? void 0 : _b3.call(_a3, `Virtualalized render ${from} to ${to}`);
|
|
4919
4997
|
}
|
|
4920
4998
|
);
|
|
4921
|
-
return /* @__PURE__ */ (0,
|
|
4999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", __spreadProps(__spreadValues({}, props), { children: [
|
|
4922
5000
|
header,
|
|
4923
|
-
virtual && /* @__PURE__ */ (0,
|
|
5001
|
+
virtual && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { gridColumn: "1 / -1", height: before }, ref: probeRef }),
|
|
4924
5002
|
children(itemIds, from),
|
|
4925
|
-
virtual && /* @__PURE__ */ (0,
|
|
5003
|
+
virtual && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { gridColumn: "1 / -1", height: after } }),
|
|
4926
5004
|
footer
|
|
4927
5005
|
] }));
|
|
4928
5006
|
}
|
|
4929
5007
|
|
|
4930
5008
|
// src/components/table.tsx
|
|
4931
|
-
var
|
|
5009
|
+
var import_jsx_runtime36 = require("@emotion/react/jsx-runtime");
|
|
4932
5010
|
function Table(props) {
|
|
4933
5011
|
const [table, resetState] = useTableState(props);
|
|
4934
5012
|
const [isHydrated, clearStorage] = useTableStateStorage(table);
|
|
@@ -4942,7 +5020,7 @@ function Table(props) {
|
|
|
4942
5020
|
var _a, _b;
|
|
4943
5021
|
return (_b = (_a = table.getState().props).debugRender) == null ? void 0 : _b.call(_a, "render table");
|
|
4944
5022
|
});
|
|
4945
|
-
return /* @__PURE__ */ (0,
|
|
5023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TableContext.Provider, { value: table, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TableResetContext.Provider, { value: reset, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TableMemoContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TableLoadingState, { isHydrated }) }) }) });
|
|
4946
5024
|
}
|
|
4947
5025
|
function TableLoadingState({ isHydrated }) {
|
|
4948
5026
|
const loadingText = useTheme((t2) => t2.text.loading);
|
|
@@ -4951,9 +5029,9 @@ function TableLoadingState({ isHydrated }) {
|
|
|
4951
5029
|
const handle = setTimeout(() => setShowLoading(true), 500);
|
|
4952
5030
|
return () => clearTimeout(handle);
|
|
4953
5031
|
});
|
|
4954
|
-
return /* @__PURE__ */ (0,
|
|
4955
|
-
!isHydrated && showLoading && /* @__PURE__ */ (0,
|
|
4956
|
-
/* @__PURE__ */ (0,
|
|
5032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5033
|
+
!isHydrated && showLoading && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: loadingText }),
|
|
5034
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TableInner, { hidden: !isHydrated })
|
|
4957
5035
|
] });
|
|
4958
5036
|
}
|
|
4959
5037
|
var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
@@ -4994,7 +5072,7 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
4994
5072
|
var _a, _b;
|
|
4995
5073
|
return (_b = (_a = table.getState().props).debugRender) == null ? void 0 : _b.call(_a, "render table inner");
|
|
4996
5074
|
});
|
|
4997
|
-
return /* @__PURE__ */ (0,
|
|
5075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4998
5076
|
Virtualized,
|
|
4999
5077
|
{
|
|
5000
5078
|
className: classes == null ? void 0 : classes.table,
|
|
@@ -5013,8 +5091,8 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
5013
5091
|
fullWidth === "left" || fullWidth === true ? "auto" : "0"
|
|
5014
5092
|
].join(" ")
|
|
5015
5093
|
},
|
|
5016
|
-
header: /* @__PURE__ */ (0,
|
|
5017
|
-
/* @__PURE__ */ (0,
|
|
5094
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5095
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5018
5096
|
"div",
|
|
5019
5097
|
{
|
|
5020
5098
|
className: classes == null ? void 0 : classes.headerCell,
|
|
@@ -5027,7 +5105,7 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
5027
5105
|
]
|
|
5028
5106
|
}
|
|
5029
5107
|
),
|
|
5030
|
-
/* @__PURE__ */ (0,
|
|
5108
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
5031
5109
|
"div",
|
|
5032
5110
|
{
|
|
5033
5111
|
className: classes == null ? void 0 : classes.headerCell,
|
|
@@ -5039,18 +5117,18 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
5039
5117
|
styles == null ? void 0 : styles.headerCell
|
|
5040
5118
|
],
|
|
5041
5119
|
children: [
|
|
5042
|
-
enableSelection && /* @__PURE__ */ (0,
|
|
5043
|
-
enableColumnSelection && /* @__PURE__ */ (0,
|
|
5044
|
-
enableExport && /* @__PURE__ */ (0,
|
|
5045
|
-
(enableSelection || enableColumnSelection || enableExport) && /* @__PURE__ */ (0,
|
|
5046
|
-
/* @__PURE__ */ (0,
|
|
5047
|
-
/* @__PURE__ */ (0,
|
|
5120
|
+
enableSelection && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectComponent, {}),
|
|
5121
|
+
enableColumnSelection && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColumnSelection, {}),
|
|
5122
|
+
enableExport && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Export2, {}),
|
|
5123
|
+
(enableSelection || enableColumnSelection || enableExport) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5124
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { css: { flex: 1 } }),
|
|
5125
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ResizeHandleView, {})
|
|
5048
5126
|
] })
|
|
5049
5127
|
]
|
|
5050
5128
|
}
|
|
5051
5129
|
),
|
|
5052
|
-
/* @__PURE__ */ (0,
|
|
5053
|
-
/* @__PURE__ */ (0,
|
|
5130
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColumnHeaderContext.Provider, { children: visibleColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColumnContext.Provider, { value: column.id, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColumnHeader, {}) }, column.id)) }),
|
|
5131
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5054
5132
|
"div",
|
|
5055
5133
|
{
|
|
5056
5134
|
className: classes == null ? void 0 : classes.headerCell,
|
|
@@ -5063,10 +5141,10 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
5063
5141
|
}
|
|
5064
5142
|
)
|
|
5065
5143
|
] }),
|
|
5066
|
-
footer: /* @__PURE__ */ (0,
|
|
5067
|
-
enableClearFiltersButton && hasActiveFilters && /* @__PURE__ */ (0,
|
|
5068
|
-
hasFooter && /* @__PURE__ */ (0,
|
|
5069
|
-
/* @__PURE__ */ (0,
|
|
5144
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5145
|
+
enableClearFiltersButton && hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ClearFiltersButton, {}),
|
|
5146
|
+
hasFooter && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5147
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5070
5148
|
"div",
|
|
5071
5149
|
{
|
|
5072
5150
|
className: classes == null ? void 0 : classes.footerCell,
|
|
@@ -5079,7 +5157,7 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
5079
5157
|
]
|
|
5080
5158
|
}
|
|
5081
5159
|
),
|
|
5082
|
-
/* @__PURE__ */ (0,
|
|
5160
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5083
5161
|
"div",
|
|
5084
5162
|
{
|
|
5085
5163
|
className: classes == null ? void 0 : classes.footerCell,
|
|
@@ -5091,8 +5169,8 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
5091
5169
|
]
|
|
5092
5170
|
}
|
|
5093
5171
|
),
|
|
5094
|
-
visibleColumns.map((column) => /* @__PURE__ */ (0,
|
|
5095
|
-
/* @__PURE__ */ (0,
|
|
5172
|
+
visibleColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColumnContext.Provider, { value: column.id, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColumnFooter, {}) }, column.id)),
|
|
5173
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5096
5174
|
"div",
|
|
5097
5175
|
{
|
|
5098
5176
|
className: classes == null ? void 0 : classes.footerCell,
|
|
@@ -5106,7 +5184,7 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
|
|
|
5106
5184
|
)
|
|
5107
5185
|
] })
|
|
5108
5186
|
] }),
|
|
5109
|
-
children: (itemIds, startIndex) => itemIds.map((itemId, index) => /* @__PURE__ */ (0,
|
|
5187
|
+
children: (itemIds, startIndex) => itemIds.map((itemId, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Row, { itemId, rowIndex: startIndex + index }, itemId))
|
|
5110
5188
|
}
|
|
5111
5189
|
);
|
|
5112
5190
|
});
|
|
@@ -5132,7 +5210,7 @@ var termMatch = (text, query) => {
|
|
|
5132
5210
|
};
|
|
5133
5211
|
|
|
5134
5212
|
// src/components/textFilter.tsx
|
|
5135
|
-
var
|
|
5213
|
+
var import_jsx_runtime37 = require("@emotion/react/jsx-runtime");
|
|
5136
5214
|
function TextFilter(_a) {
|
|
5137
5215
|
var _b = _a, {
|
|
5138
5216
|
compare = textMatch,
|
|
@@ -5156,19 +5234,19 @@ function TextFilter(_a) {
|
|
|
5156
5234
|
return compare(value2, filterValue);
|
|
5157
5235
|
}
|
|
5158
5236
|
}));
|
|
5159
|
-
return /* @__PURE__ */ (0,
|
|
5237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5160
5238
|
"div",
|
|
5161
5239
|
{
|
|
5162
5240
|
css: {
|
|
5163
5241
|
padding: `calc(var(--spacing) * 2)`,
|
|
5164
5242
|
display: "grid"
|
|
5165
5243
|
},
|
|
5166
|
-
children: /* @__PURE__ */ (0,
|
|
5244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5167
5245
|
AutoFocusTextField,
|
|
5168
5246
|
{
|
|
5169
5247
|
value,
|
|
5170
5248
|
onChange: (event) => onChange(event.target.value),
|
|
5171
|
-
endIcon: /* @__PURE__ */ (0,
|
|
5249
|
+
endIcon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconButton2, { onClick: () => onChange(""), children: !value ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Search2, {}) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Clear2, {}) }),
|
|
5172
5250
|
placeholder
|
|
5173
5251
|
}
|
|
5174
5252
|
)
|
|
@@ -5179,6 +5257,7 @@ function TextFilter(_a) {
|
|
|
5179
5257
|
0 && (module.exports = {
|
|
5180
5258
|
AutoFocusTextField,
|
|
5181
5259
|
ColumnContext,
|
|
5260
|
+
CombinedFilter,
|
|
5182
5261
|
DateFilter,
|
|
5183
5262
|
DatePicker,
|
|
5184
5263
|
DatePickerProvider,
|