schummar-table 0.44.0 → 0.45.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/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,
@@ -129,12 +130,12 @@ var react = function equal(a, b) {
129
130
  if (a && b && typeof a == "object" && typeof b == "object") {
130
131
  if (a.constructor !== b.constructor)
131
132
  return false;
132
- var length2, i, keys;
133
+ var length3, i, keys;
133
134
  if (Array.isArray(a)) {
134
- length2 = a.length;
135
- if (length2 != b.length)
135
+ length3 = a.length;
136
+ if (length3 != b.length)
136
137
  return false;
137
- for (i = length2; i-- !== 0; )
138
+ for (i = length3; i-- !== 0; )
138
139
  if (!equal(a[i], b[i]))
139
140
  return false;
140
141
  return true;
@@ -159,10 +160,10 @@ var react = function equal(a, b) {
159
160
  return true;
160
161
  }
161
162
  if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
162
- length2 = a.length;
163
- if (length2 != b.length)
163
+ length3 = a.length;
164
+ if (length3 != b.length)
164
165
  return false;
165
- for (i = length2; i-- !== 0; )
166
+ for (i = length3; i-- !== 0; )
166
167
  if (a[i] !== b[i])
167
168
  return false;
168
169
  return true;
@@ -174,13 +175,13 @@ var react = function equal(a, b) {
174
175
  if (a.toString !== Object.prototype.toString)
175
176
  return a.toString() === b.toString();
176
177
  keys = Object.keys(a);
177
- length2 = keys.length;
178
- if (length2 !== Object.keys(b).length)
178
+ length3 = keys.length;
179
+ if (length3 !== Object.keys(b).length)
179
180
  return false;
180
- for (i = length2; i-- !== 0; )
181
+ for (i = length3; i-- !== 0; )
181
182
  if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
182
183
  return false;
183
- for (i = length2; i-- !== 0; ) {
184
+ for (i = length3; i-- !== 0; ) {
184
185
  var key = keys[i];
185
186
  if (key === "_owner" && a.$$typeof) {
186
187
  continue;
@@ -610,11 +611,11 @@ var defaultColors = {
610
611
  // src/components/spinnner.tsx
611
612
  var import_react3 = require("@emotion/react");
612
613
  var import_jsx_runtime = require("@emotion/react/jsx-runtime");
613
- function Spinner({ className: className2 }) {
614
+ function Spinner({ className: className3 }) {
614
615
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
615
616
  "div",
616
617
  {
617
- className: className2,
618
+ className: className3,
618
619
  css: import_react3.css`
619
620
  display: inline-block;
620
621
  position: relative;
@@ -776,7 +777,7 @@ var Button = (_a) => {
776
777
  // src/theme/defaultTheme/checkbox.tsx
777
778
  var import_jsx_runtime4 = require("@emotion/react/jsx-runtime");
778
779
  var Checkbox = (_a) => {
779
- var _b = _a, { className: className2 } = _b, props = __objRest(_b, ["className"]);
780
+ var _b = _a, { className: className3 } = _b, props = __objRest(_b, ["className"]);
780
781
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
781
782
  "label",
782
783
  {
@@ -793,7 +794,7 @@ var Checkbox = (_a) => {
793
794
  },
794
795
  props.disabled && { color: "rgba(0, 0, 0, 0.26)" }
795
796
  ],
796
- className: className2,
797
+ className: className3,
797
798
  children: [
798
799
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("input", __spreadValues({ type: "checkbox" }, props)),
799
800
  props.checked ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -949,7 +950,7 @@ var Popover = ({
949
950
  hidden,
950
951
  onClose,
951
952
  children,
952
- className: className2,
953
+ className: className3,
953
954
  backdropClassName,
954
955
  align
955
956
  }) => {
@@ -1048,7 +1049,7 @@ var Popover = ({
1048
1049
  "div",
1049
1050
  {
1050
1051
  ref: popper,
1051
- className: className2,
1052
+ className: className3,
1052
1053
  css: [
1053
1054
  defaultClasses.card,
1054
1055
  __spreadProps(__spreadValues({
@@ -1079,7 +1080,7 @@ var TextField = (_a) => {
1079
1080
  var _b = _a, {
1080
1081
  startIcon,
1081
1082
  endIcon,
1082
- className: className2,
1083
+ className: className3,
1083
1084
  inputRef,
1084
1085
  onBlur
1085
1086
  } = _b, props = __objRest(_b, [
@@ -1094,7 +1095,7 @@ var TextField = (_a) => {
1094
1095
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1095
1096
  "div",
1096
1097
  {
1097
- className: className2,
1098
+ className: className3,
1098
1099
  css: [
1099
1100
  {
1100
1101
  flex: 1,
@@ -1657,7 +1658,7 @@ var castArray = (a) => Array.isArray(a) ? a : [a];
1657
1658
  var cx = (...classNames) => classNames.flatMap((entry) => {
1658
1659
  if (!entry) return [];
1659
1660
  if (typeof entry === "string") return [entry];
1660
- return Object.entries(entry).filter(([, predicate]) => predicate).map(([className2]) => className2);
1661
+ return Object.entries(entry).filter(([, predicate]) => predicate).map(([className3]) => className3);
1661
1662
  }).join(" ");
1662
1663
  function isTruthy(x) {
1663
1664
  return !!x;
@@ -1921,9 +1922,86 @@ 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
- var import_react18 = require("react");
2004
+ var import_react19 = require("react");
1927
2005
 
1928
2006
  // src/misc/defaults.ts
1929
2007
  function defaults(first, ...more) {
@@ -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 import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
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";
@@ -1962,11 +2040,7 @@ var tabNext = (event) => {
1962
2040
  next.focus();
1963
2041
  }
1964
2042
  };
1965
- function DateInput({
1966
- value,
1967
- onChange,
1968
- locale
1969
- }) {
2043
+ function DateInput({ value, onChange, locale }) {
1970
2044
  const [override, setOverride] = (0, import_react17.useState)();
1971
2045
  const commit = () => {
1972
2046
  if (!override) {
@@ -2007,14 +2081,14 @@ function DateInput({
2007
2081
  );
2008
2082
  const parts = format.formatToParts(value != null ? value : defaultDate);
2009
2083
  const isEmpty = !value;
2010
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2084
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2011
2085
  "div",
2012
2086
  {
2013
2087
  css: {
2014
2088
  display: "flex",
2015
2089
  alignItems: "baseline"
2016
2090
  },
2017
- children: parts.map(({ type, value: value2 }, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react17.Fragment, { children: isIncludedType(type) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2091
+ 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
2092
  "input",
2019
2093
  {
2020
2094
  className,
@@ -2049,29 +2123,142 @@ function DateInput({
2049
2123
  onFocus: (event) => event.target.select(),
2050
2124
  onBlur: commit
2051
2125
  }
2052
- ) : type === "literal" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: value2 }) : null }, index))
2126
+ ) : type === "literal" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: value2 }) : null }, index))
2053
2127
  }
2054
2128
  );
2055
2129
  }
2056
2130
 
2057
2131
  // src/components/text.tsx
2058
- var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
2132
+ var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
2059
2133
  function Text({ id }) {
2060
2134
  const text = useTheme((t2) => t2.text[id]);
2061
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: text });
2135
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: text });
2136
+ }
2137
+
2138
+ // src/components/timeInput.tsx
2139
+ var import_react18 = require("react");
2140
+ var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
2141
+ var className2 = "schummar-table-time-input";
2142
+ var defaultDate2 = new Date(1970, 0, 1);
2143
+ var isIncludedType2 = (type) => type === "hour" || type === "minute" || type === "second";
2144
+ var defaultLengths2 = {
2145
+ hour: 2,
2146
+ minute: 2,
2147
+ second: 2
2148
+ };
2149
+ var maxLengths2 = {
2150
+ hour: 2,
2151
+ minute: 2,
2152
+ second: 2
2153
+ };
2154
+ var length2 = (type, value) => Math.max(value.length, defaultLengths2[type]);
2155
+ var tabNext2 = (event) => {
2156
+ const all = Array.from(document.querySelectorAll(`.${className2}`));
2157
+ const index = all.indexOf(event);
2158
+ const next = all[(index + 1) % all.length];
2159
+ if (next instanceof HTMLElement) {
2160
+ next.focus();
2161
+ }
2162
+ };
2163
+ function TimeInput({ value, onChange, locale, showSeconds = true }) {
2164
+ const [override, setOverride] = (0, import_react18.useState)();
2165
+ const commit = () => {
2166
+ if (!override) {
2167
+ return;
2168
+ }
2169
+ setOverride(void 0);
2170
+ if (!override.value) {
2171
+ onChange(null);
2172
+ return;
2173
+ }
2174
+ const newValue = value ? new Date(value) : /* @__PURE__ */ new Date();
2175
+ switch (override.type) {
2176
+ case "hour": {
2177
+ newValue.setHours(Number(override.value));
2178
+ break;
2179
+ }
2180
+ case "minute": {
2181
+ newValue.setMinutes(Number(override.value));
2182
+ break;
2183
+ }
2184
+ case "second": {
2185
+ newValue.setSeconds(Number(override.value));
2186
+ break;
2187
+ }
2188
+ default: {
2189
+ break;
2190
+ }
2191
+ }
2192
+ onChange(newValue);
2193
+ };
2194
+ const format = (0, import_react18.useMemo)(
2195
+ () => new Intl.DateTimeFormat(locale, {
2196
+ hour: "2-digit",
2197
+ minute: "2-digit",
2198
+ second: showSeconds ? "2-digit" : void 0
2199
+ }),
2200
+ [locale]
2201
+ );
2202
+ const parts = format.formatToParts(value != null ? value : defaultDate2);
2203
+ const isEmpty = !value;
2204
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2205
+ "div",
2206
+ {
2207
+ css: {
2208
+ display: "flex",
2209
+ alignItems: "baseline"
2210
+ },
2211
+ children: parts.map(({ type, value: value2 }, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react18.Fragment, { children: isIncludedType2(type) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2212
+ "input",
2213
+ {
2214
+ className: className2,
2215
+ css: {
2216
+ boxSizing: "content-box",
2217
+ overflow: "visible",
2218
+ border: "none",
2219
+ borderBottom: "2px solid transparent",
2220
+ outline: "none",
2221
+ fontSize: "inherit",
2222
+ backgroundColor: "inherit",
2223
+ color: "inherit",
2224
+ "::placeholder": {
2225
+ color: "inherit",
2226
+ opacity: 0.5
2227
+ },
2228
+ "&:focus": {
2229
+ borderBottom: "2px solid var(--primaryMain)"
2230
+ }
2231
+ },
2232
+ style: {
2233
+ width: `${length2(type, value2)}ch`
2234
+ },
2235
+ placeholder: "".padEnd(length2(type, value2), "0"),
2236
+ value: (override == null ? void 0 : override.type) === type ? override.value : !isEmpty ? value2 : "",
2237
+ onChange: (event) => {
2238
+ setOverride({ type, value: event.target.value });
2239
+ if (event.target.value.length >= maxLengths2[type]) {
2240
+ setTimeout(() => tabNext2(event.target));
2241
+ }
2242
+ },
2243
+ onFocus: (event) => event.target.select(),
2244
+ onBlur: commit
2245
+ }
2246
+ ) : type === "literal" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: value2 }) : null }, index))
2247
+ }
2248
+ );
2062
2249
  }
2063
2250
 
2064
2251
  // src/components/datePicker.tsx
2065
- var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
2066
- var DatePickerContext = (0, import_react18.createContext)({});
2252
+ var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
2253
+ var DatePickerContext = (0, import_react19.createContext)({});
2067
2254
  function DatePickerProvider(_a) {
2068
2255
  var _b = _a, {
2069
2256
  children
2070
2257
  } = _b, props = __objRest(_b, [
2071
2258
  "children"
2072
2259
  ]);
2073
- const value = (0, import_react18.useMemo)(() => props, [JSON.stringify(props)]);
2074
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DatePickerContext.Provider, { value, children });
2260
+ const value = (0, import_react19.useMemo)(() => props, [JSON.stringify(props)]);
2261
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DatePickerContext.Provider, { value, children });
2075
2262
  }
2076
2263
  var weekDays = [0, 1, 2, 3, 4, 5, 6];
2077
2264
  var startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
@@ -2149,12 +2336,12 @@ var getCalendarWeek = (date) => {
2149
2336
  return weekOfYear;
2150
2337
  };
2151
2338
  var commonQuickOptions = {
2152
- today: { label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "today" }), value: today },
2153
- thisWeek: { label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "thisWeek" }), value: (props) => thisWeek(0, props.firstDayOfWeek) },
2154
- thisMonth: { label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "thisMonth" }), value: () => thisMonth() },
2155
- thisYear: { label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "thisYear" }), value: () => thisYear() },
2156
- lastSevenDays: { label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "lastSevenDays" }), value: () => lastDays(7) },
2157
- lastThirtyDays: { label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "lastThirtyDays" }), value: () => lastDays(30) }
2339
+ today: { label: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "today" }), value: today },
2340
+ thisWeek: { label: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "thisWeek" }), value: (props) => thisWeek(0, props.firstDayOfWeek) },
2341
+ thisMonth: { label: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "thisMonth" }), value: () => thisMonth() },
2342
+ thisYear: { label: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "thisYear" }), value: () => thisYear() },
2343
+ lastSevenDays: { label: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "lastSevenDays" }), value: () => lastDays(7) },
2344
+ lastThirtyDays: { label: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "lastThirtyDays" }), value: () => lastDays(30) }
2158
2345
  };
2159
2346
  function dateIntersect(a, b) {
2160
2347
  if (a instanceof Date) {
@@ -2189,7 +2376,7 @@ function getValueForComparison(value) {
2189
2376
  }
2190
2377
  function DatePicker(props) {
2191
2378
  var _a;
2192
- const context = (0, import_react18.useContext)(DatePickerContext);
2379
+ const context = (0, import_react19.useContext)(DatePickerContext);
2193
2380
  const {
2194
2381
  value,
2195
2382
  rangeSelect,
@@ -2201,7 +2388,8 @@ function DatePicker(props) {
2201
2388
  minDate,
2202
2389
  maxDate,
2203
2390
  showCalendarWeek,
2204
- blockedRanges = []
2391
+ blockedRanges = [],
2392
+ showTime
2205
2393
  } = defaults(props, context);
2206
2394
  function onChange(value2, source) {
2207
2395
  if (value2 instanceof Date) {
@@ -2269,10 +2457,10 @@ function DatePicker(props) {
2269
2457
  }
2270
2458
  ];
2271
2459
  }
2272
- const mountTime = (0, import_react18.useMemo)(() => /* @__PURE__ */ new Date(), []);
2273
- const [dirty, setDirty] = (0, import_react18.useState)();
2274
- const [hovered, setHovered] = (0, import_react18.useState)();
2275
- const [dateInViewLocal, setDateInViewLocal] = (0, import_react18.useState)(defaultDateInView != null ? defaultDateInView : mountTime);
2460
+ const mountTime = (0, import_react19.useMemo)(() => /* @__PURE__ */ new Date(), []);
2461
+ const [dirty, setDirty] = (0, import_react19.useState)();
2462
+ const [hovered, setHovered] = (0, import_react19.useState)();
2463
+ const [dateInViewLocal, setDateInViewLocal] = (0, import_react19.useState)(defaultDateInView != null ? defaultDateInView : mountTime);
2276
2464
  const dateInView = (_a = props.dateInView) != null ? _a : dateInViewLocal;
2277
2465
  function setDateInView(date) {
2278
2466
  var _a2;
@@ -2283,7 +2471,7 @@ function DatePicker(props) {
2283
2471
  const max = dirty ? dirty.max : value instanceof Date ? value : value == null ? void 0 : value.max;
2284
2472
  const resolvedQuickOptions = [
2285
2473
  ...quickOptions,
2286
- ...noReset ? [] : [{ label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "reset" }), value: null }]
2474
+ ...noReset ? [] : [{ label: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "reset" }), value: null }]
2287
2475
  ].map((option, index) => {
2288
2476
  if (option instanceof Function) {
2289
2477
  return option((value3) => {
@@ -2292,7 +2480,7 @@ function DatePicker(props) {
2292
2480
  });
2293
2481
  }
2294
2482
  const { label, value: value2 } = typeof option === "string" ? commonQuickOptions[option] : option;
2295
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2483
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2296
2484
  Button2,
2297
2485
  {
2298
2486
  variant: "text",
@@ -2323,18 +2511,18 @@ function DatePicker(props) {
2323
2511
  minDate,
2324
2512
  maxDate
2325
2513
  });
2326
- const now = (0, import_react18.useMemo)(() => startOfDay(/* @__PURE__ */ new Date()), []);
2327
- const formatWeekday = (0, import_react18.useMemo)(() => {
2514
+ const now = (0, import_react19.useMemo)(() => startOfDay(/* @__PURE__ */ new Date()), []);
2515
+ const formatWeekday = (0, import_react19.useMemo)(() => {
2328
2516
  const { format } = new Intl.DateTimeFormat(locale, { weekday: "short" });
2329
2517
  return (weekDay) => format(new Date(Date.UTC(2021, 7, (weekDay + firstDayOfWeek) % 7 + 1)));
2330
2518
  }, [locale, firstDayOfWeek]);
2331
- (0, import_react18.useEffect)(
2519
+ (0, import_react19.useEffect)(
2332
2520
  () => setDateInView(
2333
2521
  value === null ? defaultDateInView != null ? defaultDateInView : mountTime : value instanceof Date ? value : value.max
2334
2522
  ),
2335
2523
  [getValueForComparison(value), getValueForComparison(defaultDateInView), mountTime]
2336
2524
  );
2337
- (0, import_react18.useEffect)(() => {
2525
+ (0, import_react19.useEffect)(() => {
2338
2526
  if (!rangeSelect) {
2339
2527
  setDirty(void 0);
2340
2528
  }
@@ -2360,15 +2548,15 @@ function DatePicker(props) {
2360
2548
  setDirty({ min: min2, max: max2 });
2361
2549
  }
2362
2550
  }
2363
- const formatMonth = (0, import_react18.useMemo)(() => {
2551
+ const formatMonth = (0, import_react19.useMemo)(() => {
2364
2552
  const { format } = new Intl.DateTimeFormat(locale, { month: "long" });
2365
2553
  return (month) => format(new Date(2021, month));
2366
2554
  }, [locale]);
2367
- const formatYear = (0, import_react18.useMemo)(() => {
2555
+ const formatYear = (0, import_react19.useMemo)(() => {
2368
2556
  const { format } = new Intl.DateTimeFormat(locale, { year: "numeric" });
2369
2557
  return (year) => format(new Date(year, 0, 1));
2370
2558
  }, [locale]);
2371
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2559
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2372
2560
  "div",
2373
2561
  {
2374
2562
  css: [
@@ -2378,41 +2566,68 @@ function DatePicker(props) {
2378
2566
  }
2379
2567
  ],
2380
2568
  children: [
2381
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2569
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2382
2570
  "div",
2383
2571
  {
2384
2572
  css: {
2385
2573
  display: "grid",
2386
2574
  gridAutoFlow: "column",
2387
2575
  justifyContent: "center",
2388
- alignItems: "baseline",
2389
- gap: "var(--spacing)"
2576
+ alignItems: "center",
2577
+ gap: "calc(var(--spacing) * 4)",
2578
+ "& > div": {
2579
+ display: "flex",
2580
+ flexDirection: "column",
2581
+ alignItems: "center"
2582
+ }
2390
2583
  },
2391
2584
  children: [
2392
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2393
- DateInput,
2394
- {
2395
- value: min != null ? min : null,
2396
- onChange: (date) => set("input", date != null ? date : void 0, max, "min"),
2397
- locale
2398
- }
2399
- ),
2400
- rangeSelect && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
2401
- " - ",
2402
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2585
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
2586
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2403
2587
  DateInput,
2404
2588
  {
2405
- value: max != null ? max : null,
2406
- onChange: (date) => set("input", min, date != null ? date : void 0, "max"),
2589
+ value: min != null ? min : null,
2590
+ onChange: (date) => set("input", date != null ? date : void 0, max, "min"),
2407
2591
  locale
2408
2592
  }
2593
+ ),
2594
+ showTime && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2595
+ TimeInput,
2596
+ {
2597
+ value: min != null ? min : null,
2598
+ onChange: (date) => set("input", date != null ? date : void 0, max, "min"),
2599
+ locale,
2600
+ showSeconds: typeof showTime === "boolean" ? true : showTime.showSeconds
2601
+ }
2409
2602
  )
2603
+ ] }),
2604
+ rangeSelect && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2605
+ " - ",
2606
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
2607
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2608
+ DateInput,
2609
+ {
2610
+ value: max != null ? max : null,
2611
+ onChange: (date) => set("input", min, date != null ? date : void 0, "max"),
2612
+ locale
2613
+ }
2614
+ ),
2615
+ showTime && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2616
+ TimeInput,
2617
+ {
2618
+ value: max != null ? max : null,
2619
+ onChange: (date) => set("input", min, date != null ? date : void 0, "max"),
2620
+ locale,
2621
+ showSeconds: typeof showTime === "boolean" ? true : showTime.showSeconds
2622
+ }
2623
+ )
2624
+ ] })
2410
2625
  ] })
2411
2626
  ]
2412
2627
  }
2413
2628
  ),
2414
- calendars.map(({ month, year, weeks }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { css: { display: "grid" }, children: [
2415
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2629
+ calendars.map(({ month, year, weeks }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { css: { display: "grid" }, children: [
2630
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2416
2631
  "div",
2417
2632
  {
2418
2633
  css: {
@@ -2423,17 +2638,17 @@ function DatePicker(props) {
2423
2638
  alignItems: "center"
2424
2639
  },
2425
2640
  children: [
2426
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getBackProps({ calendars })), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRight2, { css: { transform: "rotate3d(0, 0, 1, 180deg)" } }) })),
2427
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { css: { display: "flex" }, children: [
2641
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getBackProps({ calendars })), { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronRight2, { css: { transform: "rotate3d(0, 0, 1, 180deg)" } }) })),
2642
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { css: { display: "flex" }, children: [
2428
2643
  formatMonth(month),
2429
2644
  " ",
2430
2645
  formatYear(year)
2431
2646
  ] }),
2432
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getForwardProps({ calendars })), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRight2, {}) }))
2647
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton2, __spreadProps(__spreadValues({ type: "button" }, getForwardProps({ calendars })), { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronRight2, {}) }))
2433
2648
  ]
2434
2649
  }
2435
2650
  ),
2436
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2651
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2437
2652
  "div",
2438
2653
  {
2439
2654
  css: {
@@ -2442,7 +2657,7 @@ function DatePicker(props) {
2442
2657
  gridTemplateColumns: "repeat(8, max-content)"
2443
2658
  },
2444
2659
  children: [
2445
- showCalendarWeek ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2660
+ showCalendarWeek ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2446
2661
  "div",
2447
2662
  {
2448
2663
  css: {
@@ -2450,10 +2665,10 @@ function DatePicker(props) {
2450
2665
  padding: 10,
2451
2666
  borderRight: "1px solid var(--date-picker-separator, var(--table-border, #bdbdbd))"
2452
2667
  },
2453
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "calendarWeek" })
2668
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { id: "calendarWeek" })
2454
2669
  }
2455
- ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", {}),
2456
- weekDays.map((_v, weekDay) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2670
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {}),
2671
+ weekDays.map((_v, weekDay) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2457
2672
  "div",
2458
2673
  {
2459
2674
  css: {
@@ -2468,8 +2683,8 @@ function DatePicker(props) {
2468
2683
  const weekStart = week[0];
2469
2684
  const weekEnd = week[6];
2470
2685
  const weekDisabled = !rangeSelect || minDate && weekEnd.date < minDate || maxDate && weekStart.date > maxDate;
2471
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react18.Fragment, { children: [
2472
- showCalendarWeek ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2686
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react19.Fragment, { children: [
2687
+ showCalendarWeek ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2473
2688
  "button",
2474
2689
  {
2475
2690
  type: "button",
@@ -2494,10 +2709,10 @@ function DatePicker(props) {
2494
2709
  onPointerOut: () => !weekDisabled && setHovered(void 0),
2495
2710
  children: getCalendarWeek(weekEnd.date)
2496
2711
  }
2497
- ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", {}),
2712
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {}),
2498
2713
  week.map((dateObject, dayIndex) => {
2499
2714
  if (!dateObject) {
2500
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", {}, dayIndex);
2715
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {}, dayIndex);
2501
2716
  }
2502
2717
  const { prevMonth, nextMonth, date } = dateObject;
2503
2718
  const today2 = startOfDay(date).getTime() === now.getTime();
@@ -2508,7 +2723,7 @@ function DatePicker(props) {
2508
2723
  min <= hovered.min ? { min, max: hovered.min } : { min: hovered.max, max: min }
2509
2724
  ));
2510
2725
  const blocked = blockedRanges.some((range) => dateIntersect(date, range));
2511
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2726
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2512
2727
  "button",
2513
2728
  __spreadProps(__spreadValues({
2514
2729
  type: "button",
@@ -2544,7 +2759,7 @@ function DatePicker(props) {
2544
2759
  }
2545
2760
  )
2546
2761
  ] }, `${month}${year}`)),
2547
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2762
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2548
2763
  "div",
2549
2764
  {
2550
2765
  css: {
@@ -2562,7 +2777,7 @@ function DatePicker(props) {
2562
2777
  }
2563
2778
 
2564
2779
  // src/components/dateFilter.tsx
2565
- var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
2780
+ var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
2566
2781
  function convertDate(x) {
2567
2782
  if (x instanceof Date) return x;
2568
2783
  if (typeof x === "number" || typeof x === "string") return new Date(x);
@@ -2614,14 +2829,14 @@ function DateFilter(_a) {
2614
2829
  return dateIntersect(filterValue, value2);
2615
2830
  }
2616
2831
  }));
2617
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2832
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2618
2833
  "div",
2619
2834
  {
2620
2835
  css: {
2621
2836
  padding: "calc(var(--spacing) * 2)",
2622
2837
  display: "grid"
2623
2838
  },
2624
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2839
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2625
2840
  DatePicker,
2626
2841
  {
2627
2842
  rangeSelect: !singleSelect,
@@ -2641,8 +2856,8 @@ function DateFilter(_a) {
2641
2856
  }
2642
2857
 
2643
2858
  // src/components/numberField.tsx
2644
- var import_react19 = require("react");
2645
- var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
2859
+ var import_react20 = require("react");
2860
+ var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
2646
2861
  var Pattern = /^-?\d*(?:[.,]\d*)?$/;
2647
2862
  var printNumber = (value, locale) => {
2648
2863
  if (value === null) {
@@ -2667,8 +2882,8 @@ function NumberField(_a) {
2667
2882
  ]);
2668
2883
  const locale = useTheme((t2) => t2.locale);
2669
2884
  const TextField2 = useTheme((t2) => t2.components.TextField);
2670
- const [value = printNumber(commitedValue, locale), setValue] = (0, import_react19.useState)();
2671
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2885
+ const [value = printNumber(commitedValue, locale), setValue] = (0, import_react20.useState)();
2886
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2672
2887
  TextField2,
2673
2888
  __spreadProps(__spreadValues({
2674
2889
  value,
@@ -2693,7 +2908,7 @@ function NumberField(_a) {
2693
2908
  }
2694
2909
 
2695
2910
  // src/components/rangeFilter.tsx
2696
- var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
2911
+ var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
2697
2912
  function RangeFilter(_a) {
2698
2913
  var _b = _a, {
2699
2914
  min,
@@ -2747,7 +2962,7 @@ function RangeFilter(_a) {
2747
2962
  return value2 !== null && value2 >= min2 && value2 <= max2;
2748
2963
  }
2749
2964
  }));
2750
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2965
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2751
2966
  "div",
2752
2967
  {
2753
2968
  css: {
@@ -2755,7 +2970,7 @@ function RangeFilter(_a) {
2755
2970
  display: "grid",
2756
2971
  gap: "1em"
2757
2972
  },
2758
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2973
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2759
2974
  "div",
2760
2975
  {
2761
2976
  css: {
@@ -2767,12 +2982,12 @@ function RangeFilter(_a) {
2767
2982
  }
2768
2983
  },
2769
2984
  children: [
2770
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2985
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2771
2986
  NumberField,
2772
2987
  {
2773
2988
  value: value == null ? void 0 : value[0],
2774
2989
  onChange: (newMin) => onChange(normalize(newMin, value == null ? void 0 : value[1], "min", { min, max })),
2775
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { css: { margin: "0 calc(var(--spacing) * 2)" }, children: rangeMinText }),
2990
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { css: { margin: "0 calc(var(--spacing) * 2)" }, children: rangeMinText }),
2776
2991
  placeholder: String(minValue != null ? minValue : ""),
2777
2992
  css: {
2778
2993
  alignItems: "baseline"
@@ -2780,12 +2995,12 @@ function RangeFilter(_a) {
2780
2995
  }
2781
2996
  ),
2782
2997
  "-",
2783
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2998
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2784
2999
  NumberField,
2785
3000
  {
2786
3001
  value: value == null ? void 0 : value[1],
2787
3002
  onChange: (newMax) => onChange(normalize(value == null ? void 0 : value[0], newMax, "max", { min, max })),
2788
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { css: { margin: "0 calc(var(--spacing) * 2)" }, children: rangeMaxText }),
3003
+ startIcon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { css: { margin: "0 calc(var(--spacing) * 2)" }, children: rangeMaxText }),
2789
3004
  placeholder: String(maxValue != null ? maxValue : ""),
2790
3005
  css: {
2791
3006
  alignItems: "baseline"
@@ -2815,16 +3030,16 @@ function clamp(value, min = Number.NEGATIVE_INFINITY, max = Number.POSITIVE_INFI
2815
3030
  }
2816
3031
 
2817
3032
  // src/components/selectFilter.tsx
2818
- var import_react21 = require("react");
3033
+ var import_react22 = require("react");
2819
3034
 
2820
3035
  // src/components/formControlLabel.tsx
2821
- var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
3036
+ var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
2822
3037
  function FormControlLabel({
2823
3038
  control,
2824
3039
  label,
2825
3040
  disabled
2826
3041
  }) {
2827
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3042
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2828
3043
  "label",
2829
3044
  {
2830
3045
  css: [
@@ -2841,14 +3056,14 @@ function FormControlLabel({
2841
3056
  ],
2842
3057
  children: [
2843
3058
  control,
2844
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { css: { marginLeft: "var(--spacing)" }, children: label })
3059
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { css: { marginLeft: "var(--spacing)" }, children: label })
2845
3060
  ]
2846
3061
  }
2847
3062
  );
2848
3063
  }
2849
3064
 
2850
3065
  // src/components/virtualList.tsx
2851
- var import_react20 = require("react");
3066
+ var import_react21 = require("react");
2852
3067
 
2853
3068
  // src/misc/throttle.ts
2854
3069
  function throttle2(function_, ms) {
@@ -2889,7 +3104,7 @@ function throttle2(function_, ms) {
2889
3104
  }
2890
3105
 
2891
3106
  // src/components/virtualList.tsx
2892
- var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
3107
+ var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
2893
3108
  function VirtualList(_a) {
2894
3109
  var _b = _a, {
2895
3110
  virtual = true,
@@ -2901,11 +3116,11 @@ function VirtualList(_a) {
2901
3116
  "children"
2902
3117
  ]);
2903
3118
  var _a2, _b2, _c, _d, _e;
2904
- const container = (0, import_react20.useRef)(null);
2905
- const [, setId] = (0, import_react20.useState)({});
3119
+ const container = (0, import_react21.useRef)(null);
3120
+ const [, setId] = (0, import_react21.useState)({});
2906
3121
  const throttleScroll = (_b2 = (_a2 = typeof virtual === "boolean" ? void 0 : virtual) == null ? void 0 : _a2.throttleScroll) != null ? _b2 : 16;
2907
- const update = (0, import_react20.useMemo)(() => throttle2(() => setId({}), throttleScroll), [throttleScroll]);
2908
- (0, import_react20.useEffect)(() => {
3122
+ const update = (0, import_react21.useMemo)(() => throttle2(() => setId({}), throttleScroll), [throttleScroll]);
3123
+ (0, import_react21.useEffect)(() => {
2909
3124
  if (!virtual) return;
2910
3125
  const ro = new ResizeObserver(update);
2911
3126
  if (container.current) {
@@ -2919,7 +3134,7 @@ function VirtualList(_a) {
2919
3134
  };
2920
3135
  }, [update, virtual, throttleScroll]);
2921
3136
  if (!virtual) {
2922
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3137
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2923
3138
  "div",
2924
3139
  __spreadProps(__spreadValues({}, props), {
2925
3140
  css: {
@@ -2950,7 +3165,7 @@ function VirtualList(_a) {
2950
3165
  ) : 1;
2951
3166
  const before = from * itemHeight;
2952
3167
  const after = (items.length - to) * itemHeight;
2953
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3168
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2954
3169
  "div",
2955
3170
  __spreadProps(__spreadValues({}, props), {
2956
3171
  onScroll: (event) => {
@@ -2964,9 +3179,9 @@ function VirtualList(_a) {
2964
3179
  display: "grid"
2965
3180
  },
2966
3181
  children: [
2967
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "data-virtual-before": true, style: { height: before } }),
3182
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "data-virtual-before": true, style: { height: before } }),
2968
3183
  items.slice(from, to).map((item, index) => children(item, index + from)),
2969
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { "data-virtual-after": true, style: { height: after } })
3184
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "data-virtual-after": true, style: { height: after } })
2970
3185
  ]
2971
3186
  })
2972
3187
  );
@@ -2980,7 +3195,7 @@ function averageItemHeight(container) {
2980
3195
  }
2981
3196
 
2982
3197
  // src/components/selectFilter.tsx
2983
- var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
3198
+ var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
2984
3199
  function toggle(set, value, singleSelect) {
2985
3200
  const newSet = new Set(singleSelect ? [] : set);
2986
3201
  if (set.has(value)) {
@@ -3038,17 +3253,17 @@ function SelectFilter(_a) {
3038
3253
  )
3039
3254
  );
3040
3255
  });
3041
- const [query, setQuery] = (0, import_react21.useState)("");
3256
+ const [query, setQuery] = (0, import_react22.useState)("");
3042
3257
  const filtered = options.filter(
3043
3258
  (option) => !query || stringValue(option).toLowerCase().includes(query.toLowerCase())
3044
3259
  );
3045
- const delayedValue = (0, import_react21.useMemo)(() => value, [isActive]);
3260
+ const delayedValue = (0, import_react22.useMemo)(() => value, [isActive]);
3046
3261
  const ordered = filtered.filter((option) => delayedValue.has(option)).concat(filtered.filter((option) => !delayedValue.has(option)));
3047
3262
  const Button2 = useTheme((t2) => t2.components.Button);
3048
- (0, import_react21.useEffect)(() => {
3263
+ (0, import_react22.useEffect)(() => {
3049
3264
  setQuery("");
3050
3265
  }, [isActive]);
3051
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3266
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3052
3267
  "div",
3053
3268
  {
3054
3269
  css: {
@@ -3058,16 +3273,16 @@ function SelectFilter(_a) {
3058
3273
  gap: "var(--spacing)"
3059
3274
  },
3060
3275
  children: [
3061
- !hideSearchField && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3276
+ !hideSearchField && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3062
3277
  AutoFocusTextField,
3063
3278
  {
3064
3279
  value: query,
3065
3280
  onChange: (event) => setQuery(event.target.value),
3066
- endIcon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconButton2, { onClick: () => setQuery(""), children: !query ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Search2, {}) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Clear2, {}) }),
3281
+ endIcon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconButton2, { onClick: () => setQuery(""), children: !query ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Search2, {}) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Clear2, {}) }),
3067
3282
  css: { marginBottom: "var(--spacing)" }
3068
3283
  }
3069
3284
  ),
3070
- !hideResetButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3285
+ !hideResetButton && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3071
3286
  Button2,
3072
3287
  {
3073
3288
  disabled: value.size === 0,
@@ -3082,7 +3297,7 @@ function SelectFilter(_a) {
3082
3297
  children: deselectAll
3083
3298
  }
3084
3299
  ),
3085
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3300
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3086
3301
  VirtualList,
3087
3302
  {
3088
3303
  items: ordered,
@@ -3094,10 +3309,10 @@ function SelectFilter(_a) {
3094
3309
  display: "grid",
3095
3310
  gridTemplateColumns: "minmax(0, 1fr)"
3096
3311
  },
3097
- children: (option, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3312
+ children: (option, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3098
3313
  FormControlLabel,
3099
3314
  {
3100
- control: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3315
+ control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3101
3316
  Checkbox2,
3102
3317
  {
3103
3318
  checked: value.has(option),
@@ -3110,17 +3325,17 @@ function SelectFilter(_a) {
3110
3325
  )
3111
3326
  }
3112
3327
  ),
3113
- ordered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { css: { textAlign: "center" }, children: noResults })
3328
+ ordered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { css: { textAlign: "center" }, children: noResults })
3114
3329
  ]
3115
3330
  }
3116
3331
  );
3117
3332
  }
3118
3333
 
3119
3334
  // src/components/table.tsx
3120
- var import_react41 = require("react");
3335
+ var import_react42 = require("react");
3121
3336
 
3122
3337
  // src/internalState/tableStateStorage.ts
3123
- var import_react22 = require("react");
3338
+ var import_react23 = require("react");
3124
3339
 
3125
3340
  // src/misc/queue.ts
3126
3341
  var Queue = class {
@@ -3204,9 +3419,9 @@ function parse(value) {
3204
3419
  });
3205
3420
  }
3206
3421
  function useTableStateStorage(table) {
3207
- const [isHydrated, setIsHydrated] = (0, import_react22.useState)(false);
3208
- const [q2] = (0, import_react22.useState)(() => new Queue());
3209
- (0, import_react22.useEffect)(() => {
3422
+ const [isHydrated, setIsHydrated] = (0, import_react23.useState)(false);
3423
+ const [q2] = (0, import_react23.useState)(() => new Queue());
3424
+ (0, import_react23.useEffect)(() => {
3210
3425
  const { persist } = table.getState().props;
3211
3426
  if (!persist) {
3212
3427
  setIsHydrated(true);
@@ -3266,7 +3481,7 @@ function useTableStateStorage(table) {
3266
3481
  isCanceled = true;
3267
3482
  };
3268
3483
  }, [table]);
3269
- (0, import_react22.useEffect)(() => {
3484
+ (0, import_react23.useEffect)(() => {
3270
3485
  if (!isHydrated) return;
3271
3486
  return table.subscribe(
3272
3487
  (state) => {
@@ -3327,13 +3542,13 @@ function useTableStateStorage(table) {
3327
3542
 
3328
3543
  // src/internalState/useTableState.ts
3329
3544
  var import_immer6 = require("immer");
3330
- var import_react30 = require("react");
3545
+ var import_react31 = require("react");
3331
3546
 
3332
3547
  // src/internalState/calcItems.ts
3333
3548
  var import_immer4 = require("immer");
3334
- var import_react23 = require("react");
3549
+ var import_react24 = require("react");
3335
3550
  function calcItems(state) {
3336
- (0, import_react23.useEffect)(
3551
+ (0, import_react24.useEffect)(
3337
3552
  () => state.addReaction(
3338
3553
  (state2) => [
3339
3554
  state2.props.items,
@@ -3452,7 +3667,7 @@ function calcItems(state) {
3452
3667
  }
3453
3668
 
3454
3669
  // src/internalState/calcProps.ts
3455
- var import_react24 = require("react");
3670
+ var import_react25 = require("react");
3456
3671
 
3457
3672
  // src/exporters/serializer.ts
3458
3673
  function defaultSerializer(x) {
@@ -3501,7 +3716,7 @@ var defaultProps = {
3501
3716
  };
3502
3717
  function calcProps(props) {
3503
3718
  const cache = useTableMemo();
3504
- return (0, import_react24.useMemo)(
3719
+ return (0, import_react25.useMemo)(
3505
3720
  () => overrides(defaultProps, calc(props, cache)),
3506
3721
  [props]
3507
3722
  );
@@ -3609,9 +3824,9 @@ function calc(props, cache) {
3609
3824
  }
3610
3825
 
3611
3826
  // src/internalState/cleanupState.ts
3612
- var import_react25 = require("react");
3827
+ var import_react26 = require("react");
3613
3828
  function cleanupState(state) {
3614
- (0, import_react25.useEffect)(
3829
+ (0, import_react26.useEffect)(
3615
3830
  () => state.addReaction(
3616
3831
  (state2) => [
3617
3832
  state2.props.columns,
@@ -3671,9 +3886,9 @@ function cleanupState(state) {
3671
3886
  }
3672
3887
 
3673
3888
  // src/internalState/filterColumns.ts
3674
- var import_react26 = require("react");
3889
+ var import_react27 = require("react");
3675
3890
  function filterColumns(state) {
3676
- (0, import_react26.useEffect)(
3891
+ (0, import_react27.useEffect)(
3677
3892
  () => state.addReaction(
3678
3893
  (state2) => [
3679
3894
  state2.props.columns,
@@ -3701,9 +3916,9 @@ function filterColumns(state) {
3701
3916
  }
3702
3917
 
3703
3918
  // src/internalState/normalizeExpanded.ts
3704
- var import_react27 = require("react");
3919
+ var import_react28 = require("react");
3705
3920
  function normalizeExpanded(table) {
3706
- (0, import_react27.useEffect)(
3921
+ (0, import_react28.useEffect)(
3707
3922
  () => table.addReaction(
3708
3923
  (state) => [state.props.expandOnlyOne, state.expanded, state.itemsById],
3709
3924
  ([expandOnlyOne, , itemsById], state) => {
@@ -3747,9 +3962,9 @@ function normalizeExpanded(table) {
3747
3962
  }
3748
3963
 
3749
3964
  // src/internalState/syncSelections.ts
3750
- var import_react28 = require("react");
3965
+ var import_react29 = require("react");
3751
3966
  function syncSelections(table) {
3752
- (0, import_react28.useEffect)(
3967
+ (0, import_react29.useEffect)(
3753
3968
  () => table.addReaction(
3754
3969
  (state) => [state.props.selectSyncChildren, state.selection, state.activeItems],
3755
3970
  ([selectSyncChildren, selection, activeItems], state) => {
@@ -3776,13 +3991,13 @@ function syncSelections(table) {
3776
3991
 
3777
3992
  // src/internalState/watchDisplaySize.ts
3778
3993
  var import_immer5 = require("immer");
3779
- var import_react29 = require("react");
3994
+ var import_react30 = require("react");
3780
3995
  var DEFAULT_DISPLAY_SIZES = {
3781
3996
  mobile: 400,
3782
3997
  desktop: Infinity
3783
3998
  };
3784
3999
  function watchDisplaySize(state) {
3785
- (0, import_react29.useEffect)(
4000
+ (0, import_react30.useEffect)(
3786
4001
  () => state.addReaction(
3787
4002
  (state2) => ({
3788
4003
  displaySizePx: state2.displaySizePx,
@@ -3804,7 +4019,7 @@ function watchDisplaySize(state) {
3804
4019
  ),
3805
4020
  [state]
3806
4021
  );
3807
- (0, import_react29.useEffect)(
4022
+ (0, import_react30.useEffect)(
3808
4023
  () => state.addReaction(
3809
4024
  (state2) => ({
3810
4025
  props: state2.normalizedProps,
@@ -3823,7 +4038,7 @@ function watchDisplaySize(state) {
3823
4038
 
3824
4039
  // src/internalState/useTableState.ts
3825
4040
  function useTableState(_props) {
3826
- const [key, setKey] = (0, import_react30.useState)({});
4041
+ const [key, setKey] = (0, import_react31.useState)({});
3827
4042
  const props = calcProps(_props);
3828
4043
  function reset() {
3829
4044
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
@@ -3842,7 +4057,7 @@ function useTableState(_props) {
3842
4057
  }
3843
4058
  (_i = props.onReset) == null ? void 0 : _i.call(props, "table");
3844
4059
  }
3845
- const state = (0, import_react30.useMemo)(
4060
+ const state = (0, import_react31.useMemo)(
3846
4061
  () => {
3847
4062
  var _a, _b, _c, _d;
3848
4063
  return new Store2({
@@ -3878,7 +4093,7 @@ function useTableState(_props) {
3878
4093
  syncSelections(state);
3879
4094
  cleanupState(state);
3880
4095
  watchDisplaySize(state);
3881
- (0, import_react30.useEffect)(() => {
4096
+ (0, import_react31.useEffect)(() => {
3882
4097
  state.update((state2) => {
3883
4098
  state2.normalizedProps = (0, import_immer6.castDraft)(props);
3884
4099
  if (props.sort) state2.sort = props.sort;
@@ -3897,12 +4112,12 @@ function useTableState(_props) {
3897
4112
  }
3898
4113
 
3899
4114
  // src/components/clearFiltersButton.tsx
3900
- var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
4115
+ var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
3901
4116
  function ClearFiltersButton() {
3902
4117
  const Button2 = useTheme((t2) => t2.components.Button);
3903
4118
  const textClearFilters = useTheme((t2) => t2.text.clearFilters);
3904
4119
  const table = useTableContext();
3905
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { css: defaultClasses.clearFiltersButton, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4120
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { css: defaultClasses.clearFiltersButton, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3906
4121
  Button2,
3907
4122
  {
3908
4123
  variant: "outlined",
@@ -3921,7 +4136,7 @@ function ClearFiltersButton() {
3921
4136
  }
3922
4137
 
3923
4138
  // src/components/columnFooter.tsx
3924
- var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
4139
+ var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
3925
4140
  function ColumnFooter() {
3926
4141
  const table = useTableContext();
3927
4142
  const columnId = useColumnContext();
@@ -3953,7 +4168,7 @@ function ColumnFooter() {
3953
4168
  const column = state.activeColumns.find((column2) => column2.id === columnId);
3954
4169
  return column == null ? void 0 : column.footer;
3955
4170
  });
3956
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4171
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3957
4172
  "div",
3958
4173
  {
3959
4174
  className: cx(classes, columnClasses),
@@ -3972,10 +4187,10 @@ function ColumnFooter() {
3972
4187
 
3973
4188
  // src/components/columnHeader.tsx
3974
4189
  var import_immer7 = require("immer");
3975
- var import_react32 = require("react");
4190
+ var import_react33 = require("react");
3976
4191
 
3977
4192
  // src/components/resizeHandle.tsx
3978
- var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
4193
+ var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
3979
4194
  function ResizeHandle() {
3980
4195
  const table = useTableContext();
3981
4196
  const columnId = useColumnContext();
@@ -4012,7 +4227,7 @@ function ResizeHandle() {
4012
4227
  if (!enabled) {
4013
4228
  return null;
4014
4229
  }
4015
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4230
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4016
4231
  ResizeHandleView,
4017
4232
  {
4018
4233
  enabled,
@@ -4029,7 +4244,7 @@ function ResizeHandleView(_a) {
4029
4244
  } = _b, props = __objRest(_b, [
4030
4245
  "enabled"
4031
4246
  ]);
4032
- const className2 = useTheme((theme) => {
4247
+ const className3 = useTheme((theme) => {
4033
4248
  var _a2;
4034
4249
  return (_a2 = theme.classes) == null ? void 0 : _a2.columnDivider;
4035
4250
  });
@@ -4037,10 +4252,10 @@ function ResizeHandleView(_a) {
4037
4252
  var _a2;
4038
4253
  return (_a2 = theme.styles) == null ? void 0 : _a2.columnDivider;
4039
4254
  });
4040
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4255
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4041
4256
  "div",
4042
4257
  __spreadValues({
4043
- className: className2,
4258
+ className: className3,
4044
4259
  css: [
4045
4260
  {
4046
4261
  alignSelf: "stretch",
@@ -4066,7 +4281,7 @@ function ResizeHandleView(_a) {
4066
4281
  }
4067
4282
 
4068
4283
  // src/components/sortComponent.tsx
4069
- var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
4284
+ var import_jsx_runtime27 = require("@emotion/react/jsx-runtime");
4070
4285
  function SortComponent({ children }) {
4071
4286
  const table = useTableContext();
4072
4287
  const columnId = useColumnContext();
@@ -4106,7 +4321,7 @@ function SortComponent({ children }) {
4106
4321
  event.preventDefault();
4107
4322
  return false;
4108
4323
  }
4109
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
4324
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4110
4325
  "div",
4111
4326
  {
4112
4327
  css: {
@@ -4123,8 +4338,8 @@ function SortComponent({ children }) {
4123
4338
  onClick: (event) => toggle2(event),
4124
4339
  onContextMenu: (event) => toggle2(event, true),
4125
4340
  children: [
4126
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children }),
4127
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Badge2, { badgeContent: sortDisabled ? 0 : index, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4341
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children }),
4342
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Badge2, { badgeContent: sortDisabled ? 0 : index, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4128
4343
  "span",
4129
4344
  {
4130
4345
  css: [
@@ -4132,7 +4347,7 @@ function SortComponent({ children }) {
4132
4347
  !direction && { opacity: 0 },
4133
4348
  direction === "desc" && { transform: "rotate3d(0, 0, 1, 180deg)" }
4134
4349
  ],
4135
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArrowUpward2, {})
4350
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArrowUpward2, {})
4136
4351
  }
4137
4352
  ) })
4138
4353
  ]
@@ -4141,12 +4356,12 @@ function SortComponent({ children }) {
4141
4356
  }
4142
4357
 
4143
4358
  // src/components/columnHeader.tsx
4144
- var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
4359
+ var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
4145
4360
  var ColumnHeaderContext = new StoreScope({
4146
4361
  items: /* @__PURE__ */ new Map()
4147
4362
  });
4148
4363
  function ColumnHeader() {
4149
- const ref = (0, import_react32.useRef)(null);
4364
+ const ref = (0, import_react33.useRef)(null);
4150
4365
  const columnId = useColumnContext();
4151
4366
  const table = useTableContext();
4152
4367
  const enabled = table.useState((state) => state.props.enableColumnReorder);
@@ -4172,9 +4387,9 @@ function ColumnHeader() {
4172
4387
  };
4173
4388
  });
4174
4389
  const store = ColumnHeaderContext.useStore();
4175
- const draggingStart = (0, import_react32.useRef)();
4176
- const clone = (0, import_react32.useRef)();
4177
- (0, import_react32.useEffect)(() => {
4390
+ const draggingStart = (0, import_react33.useRef)();
4391
+ const clone = (0, import_react33.useRef)();
4392
+ (0, import_react33.useEffect)(() => {
4178
4393
  const div = ref.current;
4179
4394
  if (!div) return;
4180
4395
  store.update((state) => {
@@ -4283,7 +4498,7 @@ function ColumnHeader() {
4283
4498
  clone.current = void 0;
4284
4499
  });
4285
4500
  }
4286
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4501
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4287
4502
  "div",
4288
4503
  {
4289
4504
  ref,
@@ -4304,18 +4519,18 @@ function ColumnHeader() {
4304
4519
  onPointerMove: enabled ? onPointerMove : void 0,
4305
4520
  onPointerUp: enabled ? onPointerUp : void 0,
4306
4521
  children: [
4307
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SortComponent, { children: header }),
4308
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { css: { flex: 1 } }),
4309
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FilterControl, {}),
4310
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ResizeHandle, {})
4522
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SortComponent, { children: header }),
4523
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { css: { flex: 1 } }),
4524
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FilterControl, {}),
4525
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ResizeHandle, {})
4311
4526
  ]
4312
4527
  }
4313
4528
  );
4314
4529
  }
4315
4530
 
4316
4531
  // src/components/columnSelection.tsx
4317
- var import_react34 = require("react");
4318
- var import_jsx_runtime27 = require("@emotion/react/jsx-runtime");
4532
+ var import_react35 = require("react");
4533
+ var import_jsx_runtime29 = require("@emotion/react/jsx-runtime");
4319
4534
  function ColumnSelection() {
4320
4535
  const IconButton2 = useTheme((t2) => t2.components.IconButton);
4321
4536
  const Popover2 = useTheme((t2) => t2.components.Popover);
@@ -4329,10 +4544,10 @@ function ColumnSelection() {
4329
4544
  const classes = useTheme((t2) => t2.classes);
4330
4545
  const cssVariables = useCssVariables();
4331
4546
  const table = useTableContext();
4332
- const reset = (0, import_react34.useContext)(TableResetContext);
4547
+ const reset = (0, import_react35.useContext)(TableResetContext);
4333
4548
  const columns = table.useState((state) => state.props.columns);
4334
4549
  const hiddenColumns = table.useState((state) => state.hiddenColumns);
4335
- const [anchorElement, setAnchorElement] = (0, import_react34.useState)(null);
4550
+ const [anchorElement, setAnchorElement] = (0, import_react35.useState)(null);
4336
4551
  const toggle2 = (column, state) => {
4337
4552
  const {
4338
4553
  props: { hiddenColumns: controlledHiddenColumns, onHiddenColumnsChange }
@@ -4353,9 +4568,9 @@ function ColumnSelection() {
4353
4568
  onHiddenColumnsChange == null ? void 0 : onHiddenColumnsChange(newValue);
4354
4569
  };
4355
4570
  const allVisible = columns.every((column) => !hiddenColumns.has(column.id));
4356
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
4357
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton2, { onClick: (event) => setAnchorElement(anchorElement ? null : event.currentTarget), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Settings2, {}) }),
4358
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4571
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
4572
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconButton2, { onClick: (event) => setAnchorElement(anchorElement ? null : event.currentTarget), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Settings2, {}) }),
4573
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4359
4574
  Popover2,
4360
4575
  {
4361
4576
  anchorEl: anchorElement,
@@ -4364,18 +4579,18 @@ function ColumnSelection() {
4364
4579
  css: cssVariables,
4365
4580
  className: classes == null ? void 0 : classes.popover,
4366
4581
  backdropClassName: classes == null ? void 0 : classes.popoverBackdrop,
4367
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { css: { padding: `calc(var(--spacing) * 2)`, display: "grid" }, children: [
4368
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { css: { marginBottom: "var(--spacing)" }, children: selectColumns }),
4369
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { css: { margin: "0.5em 0", display: "flex", gap: "0.5em" }, children: [
4370
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button2, { variant: "outlined", onClick: () => toggle2(void 0, !allVisible), children: allVisible ? hideAll : showAll }),
4371
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button2, { variant: "outlined", onClick: reset, children: resetAll })
4582
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { css: { padding: `calc(var(--spacing) * 2)`, display: "grid" }, children: [
4583
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { css: { marginBottom: "var(--spacing)" }, children: selectColumns }),
4584
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { css: { margin: "0.5em 0", display: "flex", gap: "0.5em" }, children: [
4585
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button2, { variant: "outlined", onClick: () => toggle2(void 0, !allVisible), children: allVisible ? hideAll : showAll }),
4586
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button2, { variant: "outlined", onClick: reset, children: resetAll })
4372
4587
  ] }),
4373
4588
  columns.map((column) => {
4374
4589
  var _a;
4375
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4590
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4376
4591
  FormControlLabel,
4377
4592
  {
4378
- control: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4593
+ control: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4379
4594
  Checkbox2,
4380
4595
  {
4381
4596
  checked: !((_a = column.hidden) != null ? _a : hiddenColumns.has(column.id)),
@@ -4395,10 +4610,10 @@ function ColumnSelection() {
4395
4610
  }
4396
4611
 
4397
4612
  // src/components/export.tsx
4398
- var import_react35 = require("react");
4399
- var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
4613
+ var import_react36 = require("react");
4614
+ var import_jsx_runtime30 = require("@emotion/react/jsx-runtime");
4400
4615
  function Export2() {
4401
- const { exporters: contextExporters } = (0, import_react35.useContext)(TableSettingsContext);
4616
+ const { exporters: contextExporters } = (0, import_react36.useContext)(TableSettingsContext);
4402
4617
  const table = useTableContext();
4403
4618
  const Button2 = useTheme((t2) => t2.components.Button);
4404
4619
  const IconButton2 = useTheme((t2) => t2.components.IconButton);
@@ -4419,7 +4634,7 @@ function Export2() {
4419
4634
  }
4420
4635
  return state.props.enableExport;
4421
4636
  });
4422
- const [anchor, setAnchor] = (0, import_react35.useState)(null);
4637
+ const [anchor, setAnchor] = (0, import_react36.useState)(null);
4423
4638
  function execute({ action, exporter }) {
4424
4639
  const { activeColumns, activeItems, items } = table.getState();
4425
4640
  const columns = activeColumns.map((column) => column.exportHeader);
@@ -4441,9 +4656,9 @@ function Export2() {
4441
4656
  URL.revokeObjectURL(url);
4442
4657
  }
4443
4658
  }
4444
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
4445
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton2, { onClick: (event) => setAnchor(anchor ? null : event.currentTarget), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ExportIcon, { css: !!anchor && { color: "var(--primaryMain)" } }) }),
4446
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4659
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
4660
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconButton2, { onClick: (event) => setAnchor(anchor ? null : event.currentTarget), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ExportIcon, { css: !!anchor && { color: "var(--primaryMain)" } }) }),
4661
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4447
4662
  Popover2,
4448
4663
  {
4449
4664
  open: !!anchor,
@@ -4452,7 +4667,7 @@ function Export2() {
4452
4667
  css: cssVariables,
4453
4668
  className: classes == null ? void 0 : classes.popover,
4454
4669
  backdropClassName: classes == null ? void 0 : classes.popoverBackdrop,
4455
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4670
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4456
4671
  "div",
4457
4672
  {
4458
4673
  css: {
@@ -4465,11 +4680,11 @@ function Export2() {
4465
4680
  }
4466
4681
  },
4467
4682
  children: [
4468
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { css: { marginBottom: "var(--spacing)" }, children: exportTitle }),
4469
- exporters.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4683
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { css: { marginBottom: "var(--spacing)" }, children: exportTitle }),
4684
+ exporters.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4470
4685
  Button2,
4471
4686
  {
4472
- startIcon: entry.action === "copy" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Clipboard2, {}) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ExportIcon, {}),
4687
+ startIcon: entry.action === "copy" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Clipboard2, {}) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ExportIcon, {}),
4473
4688
  onClick: () => execute(entry),
4474
4689
  children: [
4475
4690
  entry.action === "copy" ? exportCopy : exportDownload,
@@ -4489,8 +4704,8 @@ function Export2() {
4489
4704
  }
4490
4705
 
4491
4706
  // src/components/row.tsx
4492
- var import_react38 = require("@emotion/react");
4493
- var import_react39 = require("react");
4707
+ var import_react39 = require("@emotion/react");
4708
+ var import_react40 = require("react");
4494
4709
 
4495
4710
  // src/misc/calcClassNames.ts
4496
4711
  function calcClassNames(classes, item, index) {
@@ -4509,15 +4724,15 @@ function calcCss(styles, item, index) {
4509
4724
  }
4510
4725
 
4511
4726
  // src/components/cell.tsx
4512
- var import_react36 = require("react");
4513
- var import_jsx_runtime29 = require("@emotion/react/jsx-runtime");
4727
+ var import_react37 = require("react");
4728
+ var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
4514
4729
  var defaultWrapCell = (content) => {
4515
4730
  if (typeof content === "string") {
4516
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { css: defaultClasses.text, title: content, children: content });
4731
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { css: defaultClasses.text, title: content, children: content });
4517
4732
  }
4518
4733
  return content;
4519
4734
  };
4520
- var Cell = (0, import_react36.memo)(function Cell2({ itemId, rowIndex }) {
4735
+ var Cell = (0, import_react37.memo)(function Cell2({ itemId, rowIndex }) {
4521
4736
  var _a;
4522
4737
  const table = useTableContext();
4523
4738
  const columnId = useColumnContext();
@@ -4533,25 +4748,25 @@ var Cell = (0, import_react36.memo)(function Cell2({ itemId, rowIndex }) {
4533
4748
  const columnStyleOverride = table.useState((state) => state.columnStyleOverride.get(columnId), {
4534
4749
  throttle: 16
4535
4750
  });
4536
- (0, import_react36.useLayoutEffect)(() => {
4751
+ (0, import_react37.useLayoutEffect)(() => {
4537
4752
  var _a2, _b;
4538
4753
  return (_b = (_a2 = table.getState().props).debugRender) == null ? void 0 : _b.call(_a2, "render cell", itemId, columnId);
4539
4754
  });
4540
- const className2 = useTheme((t2) => cx(...calcClassNames(t2.classes, item == null ? void 0 : item.value, rowIndex)));
4755
+ const className3 = useTheme((t2) => cx(...calcClassNames(t2.classes, item == null ? void 0 : item.value, rowIndex)));
4541
4756
  const styles = useTheme((t2) => calcCss(t2.styles, item == null ? void 0 : item.value, rowIndex));
4542
4757
  if (!column || !item) return null;
4543
4758
  const content = column.renderCell(column.value(item.value), item.value);
4544
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: className2, css: [defaultClasses.cell, styles], style: columnStyleOverride, children: wrapCell(content, column.value(item.value), item.value, rowIndex) });
4759
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: className3, css: [defaultClasses.cell, styles], style: columnStyleOverride, children: wrapCell(content, column.value(item.value), item.value, rowIndex) });
4545
4760
  });
4546
4761
 
4547
4762
  // src/components/details.tsx
4548
- var import_react37 = require("react");
4549
- var import_jsx_runtime30 = require("@emotion/react/jsx-runtime");
4550
- var Details = (0, import_react37.forwardRef)(function Details2({ itemId, rowIndex }, ref) {
4763
+ var import_react38 = require("react");
4764
+ var import_jsx_runtime32 = require("@emotion/react/jsx-runtime");
4765
+ var Details = (0, import_react38.forwardRef)(function Details2({ itemId, rowIndex }, ref) {
4551
4766
  const table = useTableContext();
4552
4767
  const classes = useTheme((t2) => t2.classes);
4553
4768
  const styles = useTheme((t2) => t2.styles);
4554
- const { details, className: className2, css: css4 } = table.useState((state) => {
4769
+ const { details, className: className3, css: css4 } = table.useState((state) => {
4555
4770
  const item = state.activeItemsById.get(itemId);
4556
4771
  return {
4557
4772
  details: state.expanded.has(itemId) ? state.props.rowDetails instanceof Function ? item ? state.props.rowDetails(item.value, rowIndex) : null : state.props.rowDetails : void 0,
@@ -4559,11 +4774,11 @@ var Details = (0, import_react37.forwardRef)(function Details2({ itemId, rowInde
4559
4774
  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
4775
  };
4561
4776
  });
4562
- return details ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: className2, css: [defaultClasses.details, css4], children: details }) : null;
4777
+ return details ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref, className: className3, css: [defaultClasses.details, css4], children: details }) : null;
4563
4778
  });
4564
4779
 
4565
4780
  // src/components/expandControl.tsx
4566
- var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
4781
+ var import_jsx_runtime33 = require("@emotion/react/jsx-runtime");
4567
4782
  function ExpandControl({
4568
4783
  itemId,
4569
4784
  hasDeferredChildren
@@ -4610,9 +4825,9 @@ function ExpandControl({
4610
4825
  }
4611
4826
  }
4612
4827
  if (isExpanded && hasDeferredChildren && !hasChildren) {
4613
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Spinner2, { css: { margin: "0 var(--spacing)" } });
4828
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Spinner2, { css: { margin: "0 var(--spacing)" } });
4614
4829
  }
4615
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconButton2, { onClick: toggle2, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4830
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconButton2, { onClick: toggle2, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4616
4831
  "span",
4617
4832
  {
4618
4833
  css: {
@@ -4620,13 +4835,13 @@ function ExpandControl({
4620
4835
  transition: "all 300ms",
4621
4836
  transform: isExpanded ? "rotate3d(0, 0, 1, 90deg)" : "rotate3d(0, 0, 1, 0deg)"
4622
4837
  },
4623
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronRight2, {})
4838
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ChevronRight2, {})
4624
4839
  }
4625
4840
  ) });
4626
4841
  }
4627
4842
 
4628
4843
  // src/components/selectComponent.tsx
4629
- var import_jsx_runtime32 = require("@emotion/react/jsx-runtime");
4844
+ var import_jsx_runtime34 = require("@emotion/react/jsx-runtime");
4630
4845
  function SelectComponent({ itemId }) {
4631
4846
  const table = useTableContext();
4632
4847
  const Checkbox2 = useTheme((t2) => t2.components.Checkbox);
@@ -4675,7 +4890,7 @@ function SelectComponent({ itemId }) {
4675
4890
  state.lastSelectedId = itemId;
4676
4891
  });
4677
4892
  }
4678
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4893
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4679
4894
  Checkbox2,
4680
4895
  {
4681
4896
  css: {
@@ -4689,19 +4904,19 @@ function SelectComponent({ itemId }) {
4689
4904
  }
4690
4905
 
4691
4906
  // src/components/row.tsx
4692
- var import_jsx_runtime33 = require("@emotion/react/jsx-runtime");
4693
- var Row = (0, import_react39.memo)(function Row2({
4907
+ var import_jsx_runtime35 = require("@emotion/react/jsx-runtime");
4908
+ var Row = (0, import_react40.memo)(function Row2({
4694
4909
  itemId,
4695
4910
  rowIndex
4696
4911
  }) {
4697
4912
  var _a;
4698
4913
  const table = useTableContext();
4699
- const divRef = (0, import_react39.useRef)(null);
4700
- const detailsDivRef = (0, import_react39.useRef)(null);
4914
+ const divRef = (0, import_react40.useRef)(null);
4915
+ const detailsDivRef = (0, import_react40.useRef)(null);
4701
4916
  const classes = useTheme((t2) => t2.classes);
4702
4917
  const styles = useTheme((t2) => t2.styles);
4703
4918
  const item = table.useState((state) => state.activeItemsById.get(itemId));
4704
- const wrapRow = (_a = table.useState((state) => state.props.wrapRow)) != null ? _a : (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", __spreadValues({}, props));
4919
+ const wrapRow = (_a = table.useState((state) => state.props.wrapRow)) != null ? _a : (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", __spreadValues({}, props));
4705
4920
  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
4921
  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
4922
  const subgrid = table.useState((state) => state.props.subgrid);
@@ -4730,7 +4945,7 @@ var Row = (0, import_react39.memo)(function Row2({
4730
4945
  hasDetails: state.props.rowDetails instanceof Function ? item2 ? !!state.props.rowDetails(item2.value, rowIndex) : null : !!state.props.rowDetails
4731
4946
  };
4732
4947
  });
4733
- (0, import_react39.useLayoutEffect)(() => {
4948
+ (0, import_react40.useLayoutEffect)(() => {
4734
4949
  function update() {
4735
4950
  table.update((state) => {
4736
4951
  if (!divRef.current) {
@@ -4751,14 +4966,14 @@ var Row = (0, import_react39.memo)(function Row2({
4751
4966
  handles.forEach((h2) => h2());
4752
4967
  };
4753
4968
  }, [table, itemId, divRef.current, detailsDivRef.current]);
4754
- (0, import_react39.useLayoutEffect)(() => {
4969
+ (0, import_react40.useLayoutEffect)(() => {
4755
4970
  var _a2, _b;
4756
4971
  return (_b = (_a2 = table.getState().props).debugRender) == null ? void 0 : _b.call(_a2, "render row", itemId);
4757
4972
  });
4758
4973
  if (!item) {
4759
4974
  return null;
4760
4975
  }
4761
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react38.ClassNames, { children: ({ css: css4 }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: wrapRow(
4976
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react39.ClassNames, { children: ({ css: css4 }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: wrapRow(
4762
4977
  {
4763
4978
  className: css4([
4764
4979
  subgrid ? {
@@ -4771,8 +4986,8 @@ var Row = (0, import_react39.memo)(function Row2({
4771
4986
  rowClassName,
4772
4987
  rowStyles
4773
4988
  ]),
4774
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
4775
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4989
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4990
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4776
4991
  "div",
4777
4992
  {
4778
4993
  className: cellClassName,
@@ -4780,22 +4995,22 @@ var Row = (0, import_react39.memo)(function Row2({
4780
4995
  ref: divRef
4781
4996
  }
4782
4997
  ),
4783
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4998
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4784
4999
  "div",
4785
5000
  {
4786
5001
  className: cellClassName,
4787
5002
  css: [defaultClasses.cell, defaultClasses.firstCell, css_],
4788
5003
  children: [
4789
- indent > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { css: { width: indent * 20 } }),
4790
- enableSelection && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectComponent, { itemId }),
4791
- (hasChildren || hasDeferredChildren || hasDetails) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ExpandControl, { itemId, hasDeferredChildren }),
5004
+ indent > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { css: { width: indent * 20 } }),
5005
+ enableSelection && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectComponent, { itemId }),
5006
+ (hasChildren || hasDeferredChildren || hasDetails) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ExpandControl, { itemId, hasDeferredChildren }),
4792
5007
  rowAction
4793
5008
  ]
4794
5009
  }
4795
5010
  ),
4796
- columnIds.map((columnId) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ColumnContext.Provider, { value: columnId, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Cell, { itemId, rowIndex }) }, columnId)),
4797
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cellClassName, css: [defaultClasses.cellFill, css_] }),
4798
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Details, { ref: detailsDivRef, itemId, rowIndex })
5011
+ columnIds.map((columnId) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ColumnContext.Provider, { value: columnId, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Cell, { itemId, rowIndex }) }, columnId)),
5012
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cellClassName, css: [defaultClasses.cellFill, css_] }),
5013
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Details, { ref: detailsDivRef, itemId, rowIndex })
4799
5014
  ] })
4800
5015
  },
4801
5016
  item.value,
@@ -4804,8 +5019,8 @@ var Row = (0, import_react39.memo)(function Row2({
4804
5019
  });
4805
5020
 
4806
5021
  // src/components/virtualized.tsx
4807
- var import_react40 = require("react");
4808
- var import_jsx_runtime34 = require("@emotion/react/jsx-runtime");
5022
+ var import_react41 = require("react");
5023
+ var import_jsx_runtime36 = require("@emotion/react/jsx-runtime");
4809
5024
  var findScrollRoot = (x) => {
4810
5025
  const parent = x.parentElement;
4811
5026
  if (!parent) return document.documentElement;
@@ -4831,8 +5046,8 @@ function Virtualized(_a) {
4831
5046
  var _a2, _b2;
4832
5047
  const table = useTableContext();
4833
5048
  const virtual = table.useState((state) => state.props.virtual);
4834
- const probeRef = (0, import_react40.useRef)(null);
4835
- const [, setId] = (0, import_react40.useState)({});
5049
+ const probeRef = (0, import_react41.useRef)(null);
5050
+ const [, setId] = (0, import_react41.useState)({});
4836
5051
  const {
4837
5052
  itemIds = [],
4838
5053
  from = 0,
@@ -4884,8 +5099,8 @@ function Virtualized(_a) {
4884
5099
  { throttle: 16 }
4885
5100
  );
4886
5101
  const throttleScroll = (_b2 = (_a2 = typeof virtual === "boolean" ? void 0 : virtual) == null ? void 0 : _a2.throttleScroll) != null ? _b2 : 16;
4887
- const update = (0, import_react40.useMemo)(() => throttle2(() => setId({}), throttleScroll), [throttleScroll]);
4888
- (0, import_react40.useEffect)(() => {
5102
+ const update = (0, import_react41.useMemo)(() => throttle2(() => setId({}), throttleScroll), [throttleScroll]);
5103
+ (0, import_react41.useEffect)(() => {
4889
5104
  var _a3;
4890
5105
  const tableElem = (_a3 = probeRef.current) == null ? void 0 : _a3.parentElement;
4891
5106
  if (!tableElem) return;
@@ -4902,7 +5117,7 @@ function Virtualized(_a) {
4902
5117
  window.removeEventListener("resize", update2, true);
4903
5118
  };
4904
5119
  }, [table, probeRef.current]);
4905
- (0, import_react40.useEffect)(() => {
5120
+ (0, import_react41.useEffect)(() => {
4906
5121
  if (!virtual || !probeRef.current) return;
4907
5122
  window.addEventListener("scroll", update, true);
4908
5123
  window.addEventListener("resize", update, true);
@@ -4911,24 +5126,24 @@ function Virtualized(_a) {
4911
5126
  window.removeEventListener("resize", update, true);
4912
5127
  };
4913
5128
  }, [update, virtual]);
4914
- (0, import_react40.useEffect)(() => update.cancel, [update]);
4915
- (0, import_react40.useLayoutEffect)(
5129
+ (0, import_react41.useEffect)(() => update.cancel, [update]);
5130
+ (0, import_react41.useLayoutEffect)(
4916
5131
  () => {
4917
5132
  var _a3, _b3;
4918
5133
  return (_b3 = (_a3 = table.getState().props).debugRender) == null ? void 0 : _b3.call(_a3, `Virtualalized render ${from} to ${to}`);
4919
5134
  }
4920
5135
  );
4921
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", __spreadProps(__spreadValues({}, props), { children: [
5136
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", __spreadProps(__spreadValues({}, props), { children: [
4922
5137
  header,
4923
- virtual && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { gridColumn: "1 / -1", height: before }, ref: probeRef }),
5138
+ virtual && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { gridColumn: "1 / -1", height: before }, ref: probeRef }),
4924
5139
  children(itemIds, from),
4925
- virtual && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { gridColumn: "1 / -1", height: after } }),
5140
+ virtual && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { gridColumn: "1 / -1", height: after } }),
4926
5141
  footer
4927
5142
  ] }));
4928
5143
  }
4929
5144
 
4930
5145
  // src/components/table.tsx
4931
- var import_jsx_runtime35 = require("@emotion/react/jsx-runtime");
5146
+ var import_jsx_runtime37 = require("@emotion/react/jsx-runtime");
4932
5147
  function Table(props) {
4933
5148
  const [table, resetState] = useTableState(props);
4934
5149
  const [isHydrated, clearStorage] = useTableStateStorage(table);
@@ -4938,25 +5153,25 @@ function Table(props) {
4938
5153
  resetState();
4939
5154
  });
4940
5155
  }
4941
- (0, import_react41.useLayoutEffect)(() => {
5156
+ (0, import_react42.useLayoutEffect)(() => {
4942
5157
  var _a, _b;
4943
5158
  return (_b = (_a = table.getState().props).debugRender) == null ? void 0 : _b.call(_a, "render table");
4944
5159
  });
4945
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableContext.Provider, { value: table, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableResetContext.Provider, { value: reset, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableMemoContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableLoadingState, { isHydrated }) }) }) });
5160
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableContext.Provider, { value: table, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableResetContext.Provider, { value: reset, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableMemoContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableLoadingState, { isHydrated }) }) }) });
4946
5161
  }
4947
5162
  function TableLoadingState({ isHydrated }) {
4948
5163
  const loadingText = useTheme((t2) => t2.text.loading);
4949
- const [showLoading, setShowLoading] = (0, import_react41.useState)(false);
4950
- (0, import_react41.useEffect)(() => {
5164
+ const [showLoading, setShowLoading] = (0, import_react42.useState)(false);
5165
+ (0, import_react42.useEffect)(() => {
4951
5166
  const handle = setTimeout(() => setShowLoading(true), 500);
4952
5167
  return () => clearTimeout(handle);
4953
5168
  });
4954
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
4955
- !isHydrated && showLoading && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: loadingText }),
4956
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableInner, { hidden: !isHydrated })
5169
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
5170
+ !isHydrated && showLoading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: loadingText }),
5171
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableInner, { hidden: !isHydrated })
4957
5172
  ] });
4958
5173
  }
4959
- var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5174
+ var TableInner = (0, import_react42.memo)(function TableInner2({ hidden }) {
4960
5175
  const table = useTableContext();
4961
5176
  const fullWidth = table.useState((state) => state.props.fullWidth);
4962
5177
  const visibleColumns = table.useState(
@@ -4990,11 +5205,11 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
4990
5205
  );
4991
5206
  const cssVariables = useCssVariables();
4992
5207
  const enableClearFiltersButton = table.useState((state) => state.props.enableClearFiltersButton);
4993
- (0, import_react41.useLayoutEffect)(() => {
5208
+ (0, import_react42.useLayoutEffect)(() => {
4994
5209
  var _a, _b;
4995
5210
  return (_b = (_a = table.getState().props).debugRender) == null ? void 0 : _b.call(_a, "render table inner");
4996
5211
  });
4997
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5212
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4998
5213
  Virtualized,
4999
5214
  {
5000
5215
  className: classes == null ? void 0 : classes.table,
@@ -5013,8 +5228,8 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5013
5228
  fullWidth === "left" || fullWidth === true ? "auto" : "0"
5014
5229
  ].join(" ")
5015
5230
  },
5016
- header: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
5017
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5231
+ header: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
5232
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5018
5233
  "div",
5019
5234
  {
5020
5235
  className: classes == null ? void 0 : classes.headerCell,
@@ -5027,7 +5242,7 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5027
5242
  ]
5028
5243
  }
5029
5244
  ),
5030
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
5245
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
5031
5246
  "div",
5032
5247
  {
5033
5248
  className: classes == null ? void 0 : classes.headerCell,
@@ -5039,18 +5254,18 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5039
5254
  styles == null ? void 0 : styles.headerCell
5040
5255
  ],
5041
5256
  children: [
5042
- enableSelection && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectComponent, {}),
5043
- enableColumnSelection && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ColumnSelection, {}),
5044
- enableExport && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Export2, {}),
5045
- (enableSelection || enableColumnSelection || enableExport) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
5046
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { css: { flex: 1 } }),
5047
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ResizeHandleView, {})
5257
+ enableSelection && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectComponent, {}),
5258
+ enableColumnSelection && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ColumnSelection, {}),
5259
+ enableExport && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Export2, {}),
5260
+ (enableSelection || enableColumnSelection || enableExport) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
5261
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { css: { flex: 1 } }),
5262
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ResizeHandleView, {})
5048
5263
  ] })
5049
5264
  ]
5050
5265
  }
5051
5266
  ),
5052
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ColumnHeaderContext.Provider, { children: visibleColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ColumnContext.Provider, { value: column.id, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ColumnHeader, {}) }, column.id)) }),
5053
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5267
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ColumnHeaderContext.Provider, { children: visibleColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ColumnContext.Provider, { value: column.id, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ColumnHeader, {}) }, column.id)) }),
5268
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5054
5269
  "div",
5055
5270
  {
5056
5271
  className: classes == null ? void 0 : classes.headerCell,
@@ -5063,10 +5278,10 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5063
5278
  }
5064
5279
  )
5065
5280
  ] }),
5066
- footer: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
5067
- enableClearFiltersButton && hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ClearFiltersButton, {}),
5068
- hasFooter && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
5069
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5281
+ footer: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
5282
+ enableClearFiltersButton && hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ClearFiltersButton, {}),
5283
+ hasFooter && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
5284
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5070
5285
  "div",
5071
5286
  {
5072
5287
  className: classes == null ? void 0 : classes.footerCell,
@@ -5079,7 +5294,7 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5079
5294
  ]
5080
5295
  }
5081
5296
  ),
5082
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5297
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5083
5298
  "div",
5084
5299
  {
5085
5300
  className: classes == null ? void 0 : classes.footerCell,
@@ -5091,8 +5306,8 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5091
5306
  ]
5092
5307
  }
5093
5308
  ),
5094
- visibleColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ColumnContext.Provider, { value: column.id, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ColumnFooter, {}) }, column.id)),
5095
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5309
+ visibleColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ColumnContext.Provider, { value: column.id, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ColumnFooter, {}) }, column.id)),
5310
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5096
5311
  "div",
5097
5312
  {
5098
5313
  className: classes == null ? void 0 : classes.footerCell,
@@ -5106,7 +5321,7 @@ var TableInner = (0, import_react41.memo)(function TableInner2({ hidden }) {
5106
5321
  )
5107
5322
  ] })
5108
5323
  ] }),
5109
- children: (itemIds, startIndex) => itemIds.map((itemId, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Row, { itemId, rowIndex: startIndex + index }, itemId))
5324
+ children: (itemIds, startIndex) => itemIds.map((itemId, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Row, { itemId, rowIndex: startIndex + index }, itemId))
5110
5325
  }
5111
5326
  );
5112
5327
  });
@@ -5132,7 +5347,7 @@ var termMatch = (text, query) => {
5132
5347
  };
5133
5348
 
5134
5349
  // src/components/textFilter.tsx
5135
- var import_jsx_runtime36 = require("@emotion/react/jsx-runtime");
5350
+ var import_jsx_runtime38 = require("@emotion/react/jsx-runtime");
5136
5351
  function TextFilter(_a) {
5137
5352
  var _b = _a, {
5138
5353
  compare = textMatch,
@@ -5156,19 +5371,19 @@ function TextFilter(_a) {
5156
5371
  return compare(value2, filterValue);
5157
5372
  }
5158
5373
  }));
5159
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5374
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5160
5375
  "div",
5161
5376
  {
5162
5377
  css: {
5163
5378
  padding: `calc(var(--spacing) * 2)`,
5164
5379
  display: "grid"
5165
5380
  },
5166
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5381
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5167
5382
  AutoFocusTextField,
5168
5383
  {
5169
5384
  value,
5170
5385
  onChange: (event) => onChange(event.target.value),
5171
- endIcon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(IconButton2, { onClick: () => onChange(""), children: !value ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Search2, {}) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Clear2, {}) }),
5386
+ endIcon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(IconButton2, { onClick: () => onChange(""), children: !value ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Search2, {}) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Clear2, {}) }),
5172
5387
  placeholder
5173
5388
  }
5174
5389
  )
@@ -5179,6 +5394,7 @@ function TextFilter(_a) {
5179
5394
  0 && (module.exports = {
5180
5395
  AutoFocusTextField,
5181
5396
  ColumnContext,
5397
+ CombinedFilter,
5182
5398
  DateFilter,
5183
5399
  DatePicker,
5184
5400
  DatePickerProvider,