@ceed/ads 1.41.3-next.6 → 1.41.3-next.8

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.js CHANGED
@@ -182,7 +182,7 @@ function Alert(inProps) {
182
182
  Alert.displayName = "Alert";
183
183
 
184
184
  // src/components/Autocomplete/Autocomplete.tsx
185
- import React5, { useCallback as useCallback2, useEffect as useEffect2, useMemo as useMemo2, useRef as useRef2 } from "react";
185
+ import React5, { useCallback as useCallback3, useEffect as useEffect2, useMemo as useMemo2, useRef as useRef3 } from "react";
186
186
  import {
187
187
  Autocomplete as JoyAutocomplete,
188
188
  AutocompleteOption as JoyAutocompleteOption,
@@ -285,7 +285,7 @@ function useControlledState(controlledValue, defaultValue, onChange) {
285
285
  }
286
286
 
287
287
  // src/libs/slot-props.ts
288
- import { useMemo } from "react";
288
+ import { useCallback as useCallback2, useMemo, useRef as useRef2 } from "react";
289
289
  function assignRef(ref, value) {
290
290
  if (typeof ref === "function") ref(value);
291
291
  else if (ref) ref.current = value;
@@ -303,16 +303,25 @@ function useSlotRef(slotProp, ref) {
303
303
  const isFunctionForm = typeof slotProp === "function";
304
304
  const slotRef = isFunctionForm ? void 0 : slotProp?.ref;
305
305
  const mergedRef = useMergedRef(slotRef, ref);
306
+ const latestSlotRef = useRef2(null);
307
+ const stableMergedRef = useCallback2(
308
+ (value) => {
309
+ assignRef(latestSlotRef.current, value);
310
+ assignRef(ref, value);
311
+ },
312
+ [ref]
313
+ );
306
314
  return useMemo(() => {
307
315
  if (isFunctionForm) {
308
316
  return ((ownerState) => {
309
317
  const resolved = slotProp(ownerState) ?? {};
310
- const merged = mergeRefs(resolved.ref, ref);
311
- return merged ? { ...resolved, ref: merged } : { ...resolved };
318
+ const resolvedRef = resolved.ref;
319
+ latestSlotRef.current = resolvedRef ?? null;
320
+ return resolvedRef || ref ? { ...resolved, ref: stableMergedRef } : { ...resolved };
312
321
  });
313
322
  }
314
323
  return mergedRef ? { ...slotProp, ref: mergedRef } : { ...slotProp };
315
- }, [isFunctionForm, slotProp, mergedRef, ref]);
324
+ }, [isFunctionForm, slotProp, mergedRef, ref, stableMergedRef]);
316
325
  }
317
326
 
318
327
  // src/components/Autocomplete/Autocomplete.tsx
@@ -337,7 +346,7 @@ var AutocompleteListBox = React5.forwardRef((props, ref) => {
337
346
  ownerState: { loading, size: fontSize },
338
347
  ...innerProps
339
348
  } = props;
340
- const parentRef = useRef2(null);
349
+ const parentRef = useRef3(null);
341
350
  const isGrouped = children[0].every((child) => child.hasOwnProperty("group"));
342
351
  const itemHeight = useMemo2(() => {
343
352
  const heights = itemHeightMap[fontSize ?? "md"];
@@ -454,7 +463,7 @@ function AutocompleteInner(props, ref) {
454
463
  const [rawValue, setValue] = useControlledState(
455
464
  props.value,
456
465
  props.defaultValue ?? null,
457
- useCallback2(
466
+ useCallback3(
458
467
  (value2) => onChange?.({
459
468
  target: {
460
469
  value: value2,
@@ -497,7 +506,7 @@ function AutocompleteInner(props, ref) {
497
506
  }
498
507
  return optionMap.get(_value);
499
508
  }, [_value, optionMap, props.loading]);
500
- const applySize = useCallback2(
509
+ const applySize = useCallback3(
501
510
  (node) => {
502
511
  return React5.isValidElement(node) && !props.loading ? React5.cloneElement(node, { ...{ size } }) : node;
503
512
  },
@@ -523,7 +532,7 @@ function AutocompleteInner(props, ref) {
523
532
  }),
524
533
  [options, props.slotProps, inputSlotProps]
525
534
  );
526
- const handleChange = useCallback2(
535
+ const handleChange = useCallback3(
527
536
  (event, value2) => {
528
537
  const newValue = value2;
529
538
  const _value2 = Array.isArray(newValue) ? newValue.map((value3) => value3.value) : newValue?.value;
@@ -686,7 +695,7 @@ var MenuItem = JoyMenuItem;
686
695
  var Menu_default = Menu;
687
696
 
688
697
  // src/components/Dropdown/Dropdown.tsx
689
- import React8, { createContext, useCallback as useCallback3, useMemo as useMemo4, useState as useState2 } from "react";
698
+ import React8, { createContext, useCallback as useCallback4, useMemo as useMemo4, useState as useState2 } from "react";
690
699
  import { Dropdown as JoyDropdown } from "@mui/joy";
691
700
  import { MenuButton } from "@mui/joy";
692
701
  import { useMenuButton } from "@mui/base/useMenuButton";
@@ -701,7 +710,7 @@ function Dropdown({ open: openProp, defaultOpen = false, onOpenChange, ...rest }
701
710
  }),
702
711
  []
703
712
  );
704
- const handleOpenChange = useCallback3(
713
+ const handleOpenChange = useCallback4(
705
714
  (event, isOpen) => {
706
715
  if (nestedCount > 0 && !isOpen && event?.type === "blur") {
707
716
  return;
@@ -764,7 +773,7 @@ Button.displayName = "Button";
764
773
  var Button_default = Button;
765
774
 
766
775
  // src/components/Calendar/Calendar.tsx
767
- import React13, { Fragment, forwardRef as forwardRef4, useCallback as useCallback6, useEffect as useEffect3, useMemo as useMemo6, useRef as useRef3, useState as useState5 } from "react";
776
+ import React13, { Fragment, forwardRef as forwardRef4, useCallback as useCallback7, useEffect as useEffect3, useMemo as useMemo6, useRef as useRef4, useState as useState5 } from "react";
768
777
  import { styled as styled5 } from "@mui/joy";
769
778
  import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
770
779
  import ChevronRightIcon from "@mui/icons-material/ChevronRight";
@@ -858,7 +867,7 @@ var isSameMonth = (date1, date2) => {
858
867
  };
859
868
 
860
869
  // src/components/Calendar/hooks/use-calendar-props.ts
861
- import { useCallback as useCallback4, useMemo as useMemo5, useState as useState3 } from "react";
870
+ import { useCallback as useCallback5, useMemo as useMemo5, useState as useState3 } from "react";
862
871
  import { useThemeProps as useThemeProps3 } from "@mui/joy";
863
872
  var resolveView = (view, views) => {
864
873
  return views.includes(view) ? view : views[0];
@@ -888,13 +897,13 @@ var useCalendarProps = (inProps) => {
888
897
  maxDate.setHours(0, 0, 0, 0);
889
898
  return maxDate;
890
899
  }, [inProps.maxDate]);
891
- const paginate = useCallback4(
900
+ const paginate = useCallback5(
892
901
  (newDirection) => {
893
902
  setPage([page + newDirection, newDirection]);
894
903
  },
895
904
  [page]
896
905
  );
897
- const handleViewMonthChange = useCallback4(
906
+ const handleViewMonthChange = useCallback5(
898
907
  (newMonth) => {
899
908
  setViewMonth(newMonth);
900
909
  if (resolvedView === "month") {
@@ -947,7 +956,7 @@ var useCalendarProps = (inProps) => {
947
956
  };
948
957
 
949
958
  // src/components/Calendar/hooks/use-calendar.ts
950
- import { useCallback as useCallback5, useState as useState4 } from "react";
959
+ import { useCallback as useCallback6, useState as useState4 } from "react";
951
960
  var useCalendar = (ownerState) => {
952
961
  const [localHoverDay, setLocalHoverDay] = useState4(null);
953
962
  const [localHoverMonth, setLocalHoverMonth] = useState4(null);
@@ -957,7 +966,7 @@ var useCalendar = (ownerState) => {
957
966
  const setHoverMonth = ownerState.onHoverMonthChange ?? setLocalHoverMonth;
958
967
  return {
959
968
  calendarTitle: ownerState.view === "month" ? getYearName(ownerState.viewMonth, ownerState.locale || "default") : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
960
- onPrev: useCallback5(() => {
969
+ onPrev: useCallback6(() => {
961
970
  if (ownerState.view === "day") {
962
971
  const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
963
972
  const currentYear = currentDate.getFullYear();
@@ -974,7 +983,7 @@ var useCalendar = (ownerState) => {
974
983
  ownerState.onMonthChange?.(prevYear);
975
984
  }
976
985
  }, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
977
- onNext: useCallback5(() => {
986
+ onNext: useCallback6(() => {
978
987
  if (ownerState.view === "day") {
979
988
  const currentDate = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
980
989
  const currentYear = currentDate.getFullYear();
@@ -991,7 +1000,7 @@ var useCalendar = (ownerState) => {
991
1000
  ownerState.onMonthChange?.(nextYear);
992
1001
  }
993
1002
  }, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
994
- getDayCellProps: useCallback5(
1003
+ getDayCellProps: useCallback6(
995
1004
  (day) => {
996
1005
  const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
997
1006
  thisDay.setHours(0, 0, 0, 0);
@@ -1006,7 +1015,7 @@ var useCalendar = (ownerState) => {
1006
1015
  },
1007
1016
  [ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverDay]
1008
1017
  ),
1009
- getMonthCellProps: useCallback5(
1018
+ getMonthCellProps: useCallback6(
1010
1019
  (monthIndex) => {
1011
1020
  const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
1012
1021
  thisMonth.setDate(1);
@@ -1023,7 +1032,7 @@ var useCalendar = (ownerState) => {
1023
1032
  },
1024
1033
  [ownerState.rangeSelection, ownerState.value, ownerState.viewMonth, hoverMonth]
1025
1034
  ),
1026
- getPickerDayProps: useCallback5(
1035
+ getPickerDayProps: useCallback6(
1027
1036
  (day) => {
1028
1037
  const thisDay = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
1029
1038
  thisDay.setHours(0, 0, 0, 0);
@@ -1077,7 +1086,7 @@ var useCalendar = (ownerState) => {
1077
1086
  hoverDay
1078
1087
  ]
1079
1088
  ),
1080
- getPickerMonthProps: useCallback5(
1089
+ getPickerMonthProps: useCallback6(
1081
1090
  (monthIndex) => {
1082
1091
  const thisMonth = new Date(ownerState.viewMonth || /* @__PURE__ */ new Date());
1083
1092
  thisMonth.setDate(1);
@@ -1607,9 +1616,9 @@ var Calendar = forwardRef4((inProps, ref) => {
1607
1616
  } = props;
1608
1617
  const { calendarTitle, onPrev, onNext } = useCalendar(ownerState);
1609
1618
  const [isMonthViewAssistHintOpen, setIsMonthViewAssistHintOpen] = useState5(false);
1610
- const monthNavClickTimestampsRef = useRef3([]);
1611
- const monthViewAssistHintShownInSessionRef = useRef3(false);
1612
- const monthViewAssistHintTimeoutRef = useRef3(null);
1619
+ const monthNavClickTimestampsRef = useRef4([]);
1620
+ const monthViewAssistHintShownInSessionRef = useRef4(false);
1621
+ const monthViewAssistHintTimeoutRef = useRef4(null);
1613
1622
  const [hoverDay, setHoverDay] = useState5(null);
1614
1623
  const [hoverMonth, setHoverMonth] = useState5(null);
1615
1624
  const resolvedNumberOfMonths = numberOfMonths ?? 1;
@@ -1630,14 +1639,14 @@ var Calendar = forwardRef4((inProps, ref) => {
1630
1639
  }
1631
1640
  };
1632
1641
  }, []);
1633
- const closeMonthViewAssistHint = useCallback6(() => {
1642
+ const closeMonthViewAssistHint = useCallback7(() => {
1634
1643
  if (monthViewAssistHintTimeoutRef.current) {
1635
1644
  clearTimeout(monthViewAssistHintTimeoutRef.current);
1636
1645
  monthViewAssistHintTimeoutRef.current = null;
1637
1646
  }
1638
1647
  setIsMonthViewAssistHintOpen(false);
1639
1648
  }, []);
1640
- const showMonthViewAssistHint = useCallback6(() => {
1649
+ const showMonthViewAssistHint = useCallback7(() => {
1641
1650
  const now = Date.now();
1642
1651
  if (monthViewAssistHintShownInSessionRef.current) return;
1643
1652
  if (now - lastMonthViewAssistHintShownAt < MONTH_VIEW_HINT_COOLDOWN_MS) return;
@@ -1652,7 +1661,7 @@ var Calendar = forwardRef4((inProps, ref) => {
1652
1661
  monthViewAssistHintTimeoutRef.current = null;
1653
1662
  }, MONTH_VIEW_HINT_DURATION_MS);
1654
1663
  }, []);
1655
- const trackFastMonthNavigation = useCallback6(() => {
1664
+ const trackFastMonthNavigation = useCallback7(() => {
1656
1665
  if (!isHintEligible) return;
1657
1666
  const now = Date.now();
1658
1667
  monthNavClickTimestampsRef.current = [
@@ -1663,15 +1672,15 @@ var Calendar = forwardRef4((inProps, ref) => {
1663
1672
  showMonthViewAssistHint();
1664
1673
  }
1665
1674
  }, [isHintEligible, showMonthViewAssistHint]);
1666
- const handlePrevClick = useCallback6(() => {
1675
+ const handlePrevClick = useCallback7(() => {
1667
1676
  onPrev();
1668
1677
  trackFastMonthNavigation();
1669
1678
  }, [onPrev, trackFastMonthNavigation]);
1670
- const handleNextClick = useCallback6(() => {
1679
+ const handleNextClick = useCallback7(() => {
1671
1680
  onNext();
1672
1681
  trackFastMonthNavigation();
1673
1682
  }, [onNext, trackFastMonthNavigation]);
1674
- const handleSwitchViewClick = useCallback6(() => {
1683
+ const handleSwitchViewClick = useCallback7(() => {
1675
1684
  closeMonthViewAssistHint();
1676
1685
  onViewChange?.();
1677
1686
  }, [closeMonthViewAssistHint, onViewChange]);
@@ -1841,11 +1850,11 @@ var Container = forwardRef5(function Container2(props, ref) {
1841
1850
  Container.displayName = "Container";
1842
1851
 
1843
1852
  // src/components/CurrencyInput/CurrencyInput.tsx
1844
- import React17, { useCallback as useCallback8, useMemo as useMemo7 } from "react";
1853
+ import React17, { useCallback as useCallback9, useMemo as useMemo7 } from "react";
1845
1854
  import { NumericFormat } from "react-number-format";
1846
1855
 
1847
1856
  // src/components/Input/Input.tsx
1848
- import React16, { useCallback as useCallback7, useState as useState6 } from "react";
1857
+ import React16, { useCallback as useCallback8, useState as useState6 } from "react";
1849
1858
  import { Input as JoyInput } from "@mui/joy";
1850
1859
  import { motion as motion16 } from "framer-motion";
1851
1860
  import ClearIcon from "@mui/icons-material/Close";
@@ -1883,7 +1892,7 @@ var Input = React16.forwardRef((props, ref) => {
1883
1892
  const [value, setValue] = useControlledState(
1884
1893
  valueProp,
1885
1894
  defaultValueProp ?? null,
1886
- useCallback7(
1895
+ useCallback8(
1887
1896
  (value2) => {
1888
1897
  onChange?.({
1889
1898
  /**
@@ -2173,7 +2182,7 @@ var CurrencyInput = React17.forwardRef(function CurrencyInput2(inProps, ref) {
2173
2182
  const [_value, setValue] = useControlledState(
2174
2183
  props.value,
2175
2184
  props.defaultValue ?? null,
2176
- useCallback8((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
2185
+ useCallback9((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
2177
2186
  );
2178
2187
  const value = useMemo7(() => {
2179
2188
  if (_value && useMinorUnit) {
@@ -2188,7 +2197,7 @@ var CurrencyInput = React17.forwardRef(function CurrencyInput2(inProps, ref) {
2188
2197
  return props.max;
2189
2198
  }, [props.max, useMinorUnit, decimalScale]);
2190
2199
  const isOverLimit = useMemo7(() => max != null && value != null && value > max, [max, value]);
2191
- const handleChange = useCallback8(
2200
+ const handleChange = useCallback9(
2192
2201
  (event) => {
2193
2202
  if (event.target.value === "") {
2194
2203
  setValue(null);
@@ -2237,9 +2246,9 @@ var CurrencyInput_default = CurrencyInput;
2237
2246
 
2238
2247
  // src/components/DataTable/DataTable.tsx
2239
2248
  import React26, {
2240
- useCallback as useCallback13,
2249
+ useCallback as useCallback14,
2241
2250
  useMemo as useMemo12,
2242
- useRef as useRef7,
2251
+ useRef as useRef8,
2243
2252
  useId,
2244
2253
  forwardRef as forwardRef7,
2245
2254
  useImperativeHandle as useImperativeHandle2,
@@ -2472,8 +2481,11 @@ function computeAutoFitWidth(params) {
2472
2481
  if (!isNaN(maxPx) && maxPx > 0) finalWidth = Math.min(finalWidth, maxPx);
2473
2482
  return finalWidth;
2474
2483
  }
2475
- function getHeaderCellId(tableId, columnId) {
2476
- return `${tableId}_header_${columnId}`.trim().replace(/\s+/g, "_");
2484
+ function getHeaderCellId(tableId, field) {
2485
+ return `${tableId}_header_${sanitizeColumnId(field)}`;
2486
+ }
2487
+ function sanitizeColumnId(field) {
2488
+ return String(field).trim().replace(/\s+/g, "_");
2477
2489
  }
2478
2490
 
2479
2491
  // src/components/DataTable/styled.tsx
@@ -2663,11 +2675,11 @@ var Resizer = (ref, targetRef = ref, onResizeStateChange, onAutoFit) => /* @__PU
2663
2675
 
2664
2676
  // src/components/DataTable/components.tsx
2665
2677
  import React23, {
2666
- useRef as useRef5,
2678
+ useRef as useRef6,
2667
2679
  useState as useState8,
2668
2680
  useLayoutEffect,
2669
2681
  useMemo as useMemo10,
2670
- useCallback as useCallback10,
2682
+ useCallback as useCallback11,
2671
2683
  useEffect as useEffect5,
2672
2684
  memo,
2673
2685
  createElement
@@ -2676,7 +2688,7 @@ import { styled as styled12, useTheme } from "@mui/joy";
2676
2688
  import { AnimatePresence as AnimatePresence2 } from "framer-motion";
2677
2689
 
2678
2690
  // src/components/DatePicker/DatePicker.tsx
2679
- import React19, { forwardRef as forwardRef6, useCallback as useCallback9, useEffect as useEffect4, useImperativeHandle, useRef as useRef4, useState as useState7 } from "react";
2691
+ import React19, { forwardRef as forwardRef6, useCallback as useCallback10, useEffect as useEffect4, useImperativeHandle, useRef as useRef5, useState as useState7 } from "react";
2680
2692
  import { IMaskInput, IMask } from "react-imask";
2681
2693
  import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
2682
2694
  import { styled as styled10, useThemeProps as useThemeProps5 } from "@mui/joy";
@@ -2893,12 +2905,12 @@ var DatePicker = forwardRef6((inProps, ref) => {
2893
2905
  presets,
2894
2906
  ...innerProps
2895
2907
  } = props;
2896
- const innerRef = useRef4(null);
2897
- const buttonRef = useRef4(null);
2908
+ const innerRef = useRef5(null);
2909
+ const buttonRef = useRef5(null);
2898
2910
  const [rawValue, setValue] = useControlledState(
2899
2911
  props.value,
2900
2912
  props.defaultValue ?? null,
2901
- useCallback9(
2913
+ useCallback10(
2902
2914
  (value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
2903
2915
  [props.name, onChange]
2904
2916
  )
@@ -2926,7 +2938,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
2926
2938
  }
2927
2939
  }, [displayFormat, displayValue, format, locale, value]);
2928
2940
  useImperativeHandle(ref, () => innerRef.current, [innerRef]);
2929
- const handleChange = useCallback9(
2941
+ const handleChange = useCallback10(
2930
2942
  (event) => {
2931
2943
  const value2 = event.target.value;
2932
2944
  setDisplayValue(value2 ? formatValueString(parseDate(value2, format), displayFormat, locale) : value2);
@@ -2934,7 +2946,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
2934
2946
  },
2935
2947
  [displayFormat, format, locale, setValue]
2936
2948
  );
2937
- const handleDisplayInputChange = useCallback9(
2949
+ const handleDisplayInputChange = useCallback10(
2938
2950
  (event) => {
2939
2951
  if (event.target.value === "") {
2940
2952
  handleChange({
@@ -2959,7 +2971,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
2959
2971
  },
2960
2972
  [displayFormat, format, handleChange, props.name]
2961
2973
  );
2962
- const handleCalendarToggle = useCallback9(
2974
+ const handleCalendarToggle = useCallback10(
2963
2975
  (event) => {
2964
2976
  setAnchorEl(anchorEl ? null : event.currentTarget);
2965
2977
  setTimeout(() => {
@@ -2968,7 +2980,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
2968
2980
  },
2969
2981
  [anchorEl, setAnchorEl, innerRef]
2970
2982
  );
2971
- const handleInputMouseDown = useCallback9(
2983
+ const handleInputMouseDown = useCallback10(
2972
2984
  (event) => {
2973
2985
  if (inputReadOnly || isAlphabeticDisplay) {
2974
2986
  event.preventDefault();
@@ -2977,7 +2989,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
2977
2989
  },
2978
2990
  [inputReadOnly, isAlphabeticDisplay, buttonRef]
2979
2991
  );
2980
- const handleInputClick = useCallback9(
2992
+ const handleInputClick = useCallback10(
2981
2993
  (event) => {
2982
2994
  if (inputReadOnly && !readOnly) {
2983
2995
  handleCalendarToggle(event);
@@ -2985,7 +2997,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
2985
2997
  },
2986
2998
  [inputReadOnly, readOnly, handleCalendarToggle]
2987
2999
  );
2988
- const handlePresetClick = useCallback9(
3000
+ const handlePresetClick = useCallback10(
2989
3001
  (presetValue) => {
2990
3002
  handleChange({
2991
3003
  target: {
@@ -2997,7 +3009,7 @@ var DatePicker = forwardRef6((inProps, ref) => {
2997
3009
  },
2998
3010
  [handleChange, props.name]
2999
3011
  );
3000
- const isPresetDisabled = useCallback9(
3012
+ const isPresetDisabled = useCallback10(
3001
3013
  (presetValue) => {
3002
3014
  try {
3003
3015
  const date = parseDate(presetValue, format);
@@ -3365,7 +3377,7 @@ var TextEllipsis = ({
3365
3377
  lineClamp,
3366
3378
  ...rest
3367
3379
  }) => {
3368
- const textRef = useRef5(null);
3380
+ const textRef = useRef6(null);
3369
3381
  const [showTooltip, setShowTooltip] = useState8(false);
3370
3382
  useLayoutEffect(() => {
3371
3383
  const element = textRef.current;
@@ -3382,7 +3394,7 @@ var TextEllipsis = ({
3382
3394
  return /* @__PURE__ */ React23.createElement(Tooltip_default, { title: showTooltip ? children : "", placement: "top" }, /* @__PURE__ */ React23.createElement(EllipsisDiv, { ref: textRef, lineClamp, ...rest }, children));
3383
3395
  };
3384
3396
  var CellTextEllipsis = ({ children }) => {
3385
- const textRef = useRef5(null);
3397
+ const textRef = useRef6(null);
3386
3398
  const [showTooltip, setShowTooltip] = useState8(false);
3387
3399
  useLayoutEffect(() => {
3388
3400
  const element = textRef.current;
@@ -3432,20 +3444,19 @@ var HeadCell = (props) => {
3432
3444
  tableColRef,
3433
3445
  headerClassName,
3434
3446
  headerLineClamp,
3435
- onAutoFit,
3436
- columnId
3447
+ onAutoFit
3437
3448
  } = props;
3438
3449
  const theme = useTheme();
3439
3450
  const ref = headerRef;
3440
3451
  const colRef = tableColRef;
3441
- const localRef = useRef5(null);
3452
+ const localRef = useRef6(null);
3442
3453
  useLayoutEffect(() => {
3443
3454
  ref.current = localRef.current;
3444
3455
  }, [ref]);
3445
3456
  const [isHovered, setIsHovered] = useState8(false);
3446
3457
  const sortable = type === "actions" ? false : _sortable;
3447
- const headId = useMemo10(() => getHeaderCellId(tableId, columnId), [tableId, columnId]);
3448
- const isResizingRef = useRef5(false);
3458
+ const headId = useMemo10(() => getHeaderCellId(tableId, field), [tableId, field]);
3459
+ const isResizingRef = useRef6(false);
3449
3460
  const resizer = useMemo10(
3450
3461
  () => resizable ?? true ? Resizer(
3451
3462
  ref,
@@ -3453,9 +3464,9 @@ var HeadCell = (props) => {
3453
3464
  (isResizing) => {
3454
3465
  isResizingRef.current = isResizing;
3455
3466
  },
3456
- onAutoFit ? () => onAutoFit(columnId) : void 0
3467
+ onAutoFit ? () => onAutoFit(field) : void 0
3457
3468
  ) : null,
3458
- [resizable, ref, colRef, onAutoFit, columnId]
3469
+ [resizable, ref, colRef, onAutoFit, field]
3459
3470
  );
3460
3471
  const style = useMemo10(
3461
3472
  () => ({
@@ -3529,7 +3540,7 @@ var HeadCell = (props) => {
3529
3540
  ref: localRef,
3530
3541
  key: field,
3531
3542
  style,
3532
- onClick: useCallback10(
3543
+ onClick: useCallback11(
3533
3544
  (e) => {
3534
3545
  if (isResizingRef.current) return;
3535
3546
  if (!(e.target instanceof Element) || !e.currentTarget.contains(e.target)) return;
@@ -3569,7 +3580,7 @@ var BodyCell = (props) => {
3569
3580
  } = props;
3570
3581
  const theme = useTheme();
3571
3582
  const [value, setValue] = useState8(row[field]);
3572
- const cellRef = useRef5(null);
3583
+ const cellRef = useRef6(null);
3573
3584
  const params = useMemo10(
3574
3585
  () => ({
3575
3586
  row,
@@ -3725,7 +3736,7 @@ var BodyCell = (props) => {
3725
3736
  {
3726
3737
  ref: cellRef,
3727
3738
  key: field,
3728
- headers: getHeaderCellId(tableId, props.columnId),
3739
+ headers: getHeaderCellId(tableId, field),
3729
3740
  sx: {
3730
3741
  textAlign: getTextAlign({ type }),
3731
3742
  verticalAlign: editMode ? "top" : "middle",
@@ -3790,10 +3801,10 @@ var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
3790
3801
  });
3791
3802
 
3792
3803
  // src/components/DataTable/hooks.ts
3793
- import { useState as useState9, useLayoutEffect as useLayoutEffect2, useRef as useRef6, useMemo as useMemo11, useCallback as useCallback11, useEffect as useEffect6, createRef } from "react";
3794
- function useColumnWidths(columnsById) {
3804
+ import { useState as useState9, useLayoutEffect as useLayoutEffect2, useRef as useRef7, useMemo as useMemo11, useCallback as useCallback12, useEffect as useEffect6, createRef } from "react";
3805
+ function useColumnWidths(columnsByField) {
3795
3806
  const [widths, setWidths] = useState9({});
3796
- const roRef = useRef6();
3807
+ const roRef = useRef7();
3797
3808
  useLayoutEffect2(() => {
3798
3809
  if (roRef.current) roRef.current.disconnect();
3799
3810
  roRef.current = new ResizeObserver((entries) => {
@@ -3801,11 +3812,11 @@ function useColumnWidths(columnsById) {
3801
3812
  let changed = false;
3802
3813
  const next = { ...prev };
3803
3814
  entries.forEach((entry) => {
3804
- const columnId = entry.target.dataset.hdsColumnId;
3815
+ const field = entry.target.dataset.field;
3805
3816
  const w = Math.round(entry.target.getBoundingClientRect().width);
3806
3817
  if (w === 0) return;
3807
- if (next[columnId] !== w) {
3808
- next[columnId] = w;
3818
+ if (next[field] !== w) {
3819
+ next[field] = w;
3809
3820
  changed = true;
3810
3821
  }
3811
3822
  });
@@ -3813,23 +3824,22 @@ function useColumnWidths(columnsById) {
3813
3824
  });
3814
3825
  });
3815
3826
  const measured = {};
3816
- Object.entries(columnsById).forEach(([columnId, def]) => {
3827
+ Object.entries(columnsByField).forEach(([field, def]) => {
3817
3828
  const el = def.headerRef.current;
3818
3829
  if (el) {
3819
- el.dataset.hdsColumnId = columnId;
3820
- el.dataset.field = String(def.field);
3830
+ el.dataset.field = field;
3821
3831
  const w = Math.round(el.getBoundingClientRect().width);
3822
- if (w > 0) measured[columnId] = w;
3832
+ if (w > 0) measured[field] = w;
3823
3833
  roRef.current.observe(el);
3824
3834
  }
3825
3835
  });
3826
3836
  setWidths((prev) => {
3827
3837
  const keys = Object.keys(measured);
3828
- const same = keys.length === Object.keys(prev).length && keys.every((key) => prev[key] === measured[key]);
3829
- return same ? prev : measured;
3838
+ const same = keys.every((key) => prev[key] === measured[key]);
3839
+ return same ? prev : { ...prev, ...measured };
3830
3840
  });
3831
3841
  return () => roRef.current?.disconnect();
3832
- }, [columnsById]);
3842
+ }, [columnsByField]);
3833
3843
  return widths;
3834
3844
  }
3835
3845
  function useDataTableRenderer({
@@ -3861,19 +3871,26 @@ function useDataTableRenderer({
3861
3871
  "You cannot use both `pinnedColumns` and `columnGroupingModel` at the same time. Please choose one of them."
3862
3872
  );
3863
3873
  }
3864
- const onSelectionModelChangeRef = useRef6(onSelectionModelChange);
3874
+ const duplicatedField = useMemo11(() => {
3875
+ const ids = columnsProp.map((column) => sanitizeColumnId(column.field));
3876
+ const index = ids.findIndex((id, i) => ids.indexOf(id) !== i);
3877
+ return index === -1 ? void 0 : columnsProp[index].field;
3878
+ }, [columnsProp]);
3879
+ if (duplicatedField !== void 0)
3880
+ throw new Error(`DataTable: column \`field\` must be unique. Duplicated: "${String(duplicatedField)}"`);
3881
+ const onSelectionModelChangeRef = useRef7(onSelectionModelChange);
3865
3882
  onSelectionModelChangeRef.current = onSelectionModelChange;
3866
3883
  const [focusedRowId, setFocusedRowId] = useState9(null);
3867
3884
  const [selectionAnchor, setSelectionAnchor] = useState9(null);
3868
3885
  const [sortModel, setSortModel] = useControlledState(
3869
3886
  controlledSortModel,
3870
3887
  initialState?.sorting?.sortModel ?? [],
3871
- useCallback11((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
3888
+ useCallback12((sortModel2) => onSortModelChange?.(sortModel2), [onSortModelChange])
3872
3889
  );
3873
3890
  const [visibilityModel] = useControlledState(
3874
3891
  columnVisibilityModel,
3875
3892
  initialState?.columns?.columnVisibilityModel ?? {},
3876
- useCallback11(
3893
+ useCallback12(
3877
3894
  (model) => onColumnVisibilityModelChange?.(model),
3878
3895
  [onColumnVisibilityModelChange]
3879
3896
  )
@@ -3882,16 +3899,9 @@ function useDataTableRenderer({
3882
3899
  if (!columnGroupingModel) return columnsProp;
3883
3900
  return reorderColumnsByGroupingModel(columnsProp, columnGroupingModel);
3884
3901
  }, [columnsProp, columnGroupingModel]);
3885
- const visibleColumnIndexes = useMemo11(
3886
- () => reorderedColumns.reduce((acc, col, index) => {
3887
- if (visibilityModel[col.field] !== false) acc.push(index);
3888
- return acc;
3889
- }, []),
3890
- [reorderedColumns, visibilityModel]
3891
- );
3892
3902
  const visibleColumns = useMemo11(
3893
- () => visibleColumnIndexes.map((index) => reorderedColumns[index]),
3894
- [visibleColumnIndexes, reorderedColumns]
3903
+ () => reorderedColumns.filter((col) => visibilityModel[col.field] !== false),
3904
+ [reorderedColumns, visibilityModel]
3895
3905
  );
3896
3906
  const visibleFieldSet = useMemo11(() => new Set(visibleColumns.map((c) => c.field)), [visibleColumns]);
3897
3907
  const tableMinWidth = useMemo11(() => {
@@ -3912,29 +3922,10 @@ function useDataTableRenderer({
3912
3922
  ),
3913
3923
  [reorderedColumns]
3914
3924
  );
3915
- const allColumnIds = useMemo11(() => {
3916
- const taken = new Set(reorderedColumns.map((column) => String(column.field)));
3917
- const assigned = /* @__PURE__ */ new Set();
3918
- return reorderedColumns.map((column) => {
3919
- const field = String(column.field);
3920
- if (!assigned.has(field)) {
3921
- assigned.add(field);
3922
- return field;
3923
- }
3924
- let n = 2;
3925
- while (taken.has(`${field}__${n}`)) n += 1;
3926
- taken.add(`${field}__${n}`);
3927
- return `${field}__${n}`;
3928
- });
3929
- }, [reorderedColumns]);
3930
- const columnIds = useMemo11(
3931
- () => visibleColumnIndexes.map((index) => allColumnIds[index]),
3932
- [visibleColumnIndexes, allColumnIds]
3933
- );
3934
- const visibleColumnsById = useMemo11(
3925
+ const visibleColumnsByField = useMemo11(
3935
3926
  () => Object.fromEntries(
3936
- visibleColumns.map((column, index) => [
3937
- columnIds[index],
3927
+ visibleColumns.map((column) => [
3928
+ column.field,
3938
3929
  {
3939
3930
  ...column,
3940
3931
  headerRef: createRef(),
@@ -3942,9 +3933,9 @@ function useDataTableRenderer({
3942
3933
  }
3943
3934
  ])
3944
3935
  ),
3945
- [visibleColumns, columnIds]
3936
+ [visibleColumns]
3946
3937
  );
3947
- const sortComparator = useCallback11(
3938
+ const sortComparator = useCallback12(
3948
3939
  (rowA, rowB) => {
3949
3940
  for (const sort of sortModel) {
3950
3941
  const { field, sort: direction } = sort;
@@ -3983,7 +3974,7 @@ function useDataTableRenderer({
3983
3974
  );
3984
3975
  const [page, setPage] = useState9(paginationModel?.page || 1);
3985
3976
  const pageSize = paginationModel?.pageSize || 20;
3986
- const getId = useCallback11(
3977
+ const getId = useCallback12(
3987
3978
  (row, index) => _getId?.(row) ?? row.id ?? `${(index || 0) + (page - 1) * pageSize}`,
3988
3979
  [_getId, page, pageSize]
3989
3980
  );
@@ -3999,7 +3990,7 @@ function useDataTableRenderer({
3999
3990
  }),
4000
3991
  [dataInPage, isRowSelectable, getId]
4001
3992
  );
4002
- const handleRangeSelection = useCallback11(
3993
+ const handleRangeSelection = useCallback12(
4003
3994
  (anchor, targetIndex) => {
4004
3995
  const startIndex = Math.min(anchor.rowIndex, targetIndex);
4005
3996
  const endIndex = Math.max(anchor.rowIndex, targetIndex);
@@ -4035,18 +4026,12 @@ function useDataTableRenderer({
4035
4026
  () => _isTotalSelected ?? (selectableRowCount > 0 && (selectionModel?.length || 0) === selectableRowCount),
4036
4027
  [_isTotalSelected, selectionModel, selectableRowCount]
4037
4028
  );
4038
- const columnWidths = useColumnWidths(visibleColumnsById);
4039
- const measuredWidthByField = useMemo11(
4040
- () => Object.fromEntries(
4041
- Object.entries(visibleColumnsById).map(([columnId, column]) => [column.field, columnWidths[columnId]])
4042
- ),
4043
- [visibleColumnsById, columnWidths]
4044
- );
4045
- const getWidth = useCallback11(
4029
+ const columnWidths = useColumnWidths(visibleColumnsByField);
4030
+ const getWidth = useCallback12(
4046
4031
  // 반환값은 pinned offset으로 더해지므로 반드시 숫자여야 한다. width/minWidth는 '500px' 같은 문자열.
4047
- (f) => measuredWidthByField[f] ?? parsePxValue(allColumnsByField[f]?.width) ?? // Column prop 으로 지정된 width
4032
+ (f) => columnWidths[f] ?? parsePxValue(allColumnsByField[f]?.width) ?? // Column prop 으로 지정된 width
4048
4033
  parsePxValue(allColumnsByField[f]?.minWidth) ?? 0,
4049
- [measuredWidthByField, allColumnsByField]
4034
+ [columnWidths, allColumnsByField]
4050
4035
  );
4051
4036
  const processedColumnGroups = useMemo11(() => {
4052
4037
  if (!columnGroupingModel) return null;
@@ -4066,16 +4051,14 @@ function useDataTableRenderer({
4066
4051
  const baseColumns = visibleColumns.length > 0 ? visibleColumns : reorderedColumns.length > 0 ? [] : inferredFields.map((key) => ({
4067
4052
  field: key
4068
4053
  }));
4069
- return baseColumns.map((column, index) => {
4070
- const columnId = columnIds[index] ?? String(column.field);
4054
+ return baseColumns.map((column) => {
4071
4055
  const isLeftPinned = effectivePinnedLeft?.includes(column.field);
4072
4056
  const isRightPinned = effectivePinnedRight?.includes(column.field);
4073
4057
  const isPinned = isLeftPinned || isRightPinned;
4074
4058
  return {
4075
4059
  ...column,
4076
- columnId,
4077
- headerRef: visibleColumnsById[columnId]?.headerRef,
4078
- tableColRef: visibleColumnsById[columnId]?.tableColRef,
4060
+ headerRef: visibleColumnsByField[column.field]?.headerRef,
4061
+ tableColRef: visibleColumnsByField[column.field]?.tableColRef,
4079
4062
  isCellEditable: editMode && (typeof column.isCellEditable === "function" ? column.isCellEditable : column.isCellEditable ?? true),
4080
4063
  sort: sortModel.find((sort) => sort.field === column.field)?.sort,
4081
4064
  sortOrder: allColumnsByField[column.field]?.sortOrder || sortOrder,
@@ -4092,22 +4075,21 @@ function useDataTableRenderer({
4092
4075
  inferredFields,
4093
4076
  effectivePinnedLeft,
4094
4077
  effectivePinnedRight,
4095
- columnIds,
4096
- visibleColumnsById,
4078
+ visibleColumnsByField,
4097
4079
  allColumnsByField,
4098
4080
  editMode,
4099
4081
  sortModel,
4100
4082
  sortOrder,
4101
4083
  getWidth
4102
4084
  ]);
4103
- const handlePageChange = useCallback11(
4085
+ const handlePageChange = useCallback12(
4104
4086
  (newPage) => {
4105
4087
  setPage(newPage);
4106
4088
  onPaginationModelChange?.({ page: newPage, pageSize });
4107
4089
  },
4108
4090
  [onPaginationModelChange, pageSize]
4109
4091
  );
4110
- const handleSortChange = useCallback11(
4092
+ const handleSortChange = useCallback12(
4111
4093
  (props) => {
4112
4094
  const { field, currentSort, multiple } = props;
4113
4095
  const column = allColumnsByField[field];
@@ -4145,16 +4127,16 @@ function useDataTableRenderer({
4145
4127
  onSelectionModelChangeRef.current?.([]);
4146
4128
  setSelectionAnchor(null);
4147
4129
  }, [page]);
4148
- const prevRowsRef = useRef6(_rows);
4130
+ const prevRowsRef = useRef7(_rows);
4149
4131
  useEffect6(() => {
4150
4132
  if (prevRowsRef.current !== _rows) {
4151
4133
  setSelectionAnchor(null);
4152
4134
  prevRowsRef.current = _rows;
4153
4135
  }
4154
4136
  }, [_rows]);
4155
- const handleAutoFit = useCallback11(
4156
- (columnId) => {
4157
- const colDef = visibleColumnsById[columnId];
4137
+ const handleAutoFit = useCallback12(
4138
+ (field) => {
4139
+ const colDef = visibleColumnsByField[field];
4158
4140
  if (!colDef?.headerRef.current) return;
4159
4141
  const columnType = "type" in colDef ? colDef.type : void 0;
4160
4142
  if (columnType === "actions") return;
@@ -4168,7 +4150,7 @@ function useDataTableRenderer({
4168
4150
  colDef.headerRef.current.style.width = widthPx;
4169
4151
  if (colDef.tableColRef.current) colDef.tableColRef.current.style.width = widthPx;
4170
4152
  },
4171
- [visibleColumnsById, dataInPage]
4153
+ [visibleColumnsByField, dataInPage]
4172
4154
  );
4173
4155
  return {
4174
4156
  rowCount,
@@ -4184,8 +4166,8 @@ function useDataTableRenderer({
4184
4166
  handleAutoFit,
4185
4167
  isAllSelected,
4186
4168
  isTotalSelected,
4187
- isSelectedRow: useCallback11((model) => selectedModelSet.has(model), [selectedModelSet]),
4188
- isRowSelectable: useCallback11(
4169
+ isSelectedRow: useCallback12((model) => selectedModelSet.has(model), [selectedModelSet]),
4170
+ isRowSelectable: useCallback12(
4189
4171
  (rowId, row) => {
4190
4172
  if (!isRowSelectable) return true;
4191
4173
  return isRowSelectable({ row, id: rowId });
@@ -4193,13 +4175,13 @@ function useDataTableRenderer({
4193
4175
  [isRowSelectable]
4194
4176
  ),
4195
4177
  focusedRowId,
4196
- onRowFocus: useCallback11((rowId) => {
4178
+ onRowFocus: useCallback12((rowId) => {
4197
4179
  setFocusedRowId(rowId);
4198
4180
  }, []),
4199
- onAllCheckboxChange: useCallback11(() => {
4181
+ onAllCheckboxChange: useCallback12(() => {
4200
4182
  onSelectionModelChange?.(isAllSelected ? [] : selectableDataInPage.map(getId));
4201
4183
  }, [isAllSelected, selectableDataInPage, onSelectionModelChange, getId]),
4202
- onCheckboxChange: useCallback11(
4184
+ onCheckboxChange: useCallback12(
4203
4185
  (event, selectedModel) => {
4204
4186
  const isShiftClick = "shiftKey" in event && event.shiftKey;
4205
4187
  const rowIndex = dataInPage.findIndex((row, i) => getId(row, i) === selectedModel);
@@ -4233,7 +4215,7 @@ function useDataTableRenderer({
4233
4215
  columns,
4234
4216
  tableMinWidth,
4235
4217
  processedColumnGroups,
4236
- onTotalSelect: useCallback11(() => {
4218
+ onTotalSelect: useCallback12(() => {
4237
4219
  const selectableRows = rows.filter((row, i) => {
4238
4220
  if (!isRowSelectable) return true;
4239
4221
  return isRowSelectable({ row, id: getId(row, i) });
@@ -4318,7 +4300,7 @@ function TableBody(props) {
4318
4300
  TableBody.displayName = "TableBody";
4319
4301
 
4320
4302
  // src/components/Pagination/Pagination.tsx
4321
- import React25, { useCallback as useCallback12, useEffect as useEffect7 } from "react";
4303
+ import React25, { useCallback as useCallback13, useEffect as useEffect7 } from "react";
4322
4304
  import PreviousIcon from "@mui/icons-material/ChevronLeftRounded";
4323
4305
  import NextIcon from "@mui/icons-material/ChevronRightRounded";
4324
4306
  import FirstPageIcon from "@mui/icons-material/FirstPageRounded";
@@ -4388,7 +4370,7 @@ function Pagination(inProps) {
4388
4370
  const [paginationModel, setPaginationModel] = useControlledState(
4389
4371
  _paginationModel,
4390
4372
  defaultPaginationModel,
4391
- useCallback12(
4373
+ useCallback13(
4392
4374
  (newPage) => {
4393
4375
  onPageChange(newPage.page);
4394
4376
  },
@@ -4606,8 +4588,8 @@ function Component(props, apiRef) {
4606
4588
  ...innerProps
4607
4589
  } = props;
4608
4590
  const tableId = useId();
4609
- const parentRef = useRef7(null);
4610
- const tableBodyRef = useRef7(null);
4591
+ const parentRef = useRef8(null);
4592
+ const tableBodyRef = useRef8(null);
4611
4593
  const {
4612
4594
  columns,
4613
4595
  processedColumnGroups,
@@ -4671,20 +4653,20 @@ function Component(props, apiRef) {
4671
4653
  const showNoRowsOverlay = !loading && rowCount === 0;
4672
4654
  const showFillerColumn = columns.length > 0 && columns.every((c) => !!c.width);
4673
4655
  const totalColCount = Math.max(1, columns.length + (checkboxSelection ? 1 : 0) + (showFillerColumn ? 1 : 0));
4674
- const getRowClickHandler = useCallback13(
4656
+ const getRowClickHandler = useCallback14(
4675
4657
  (row, rowId) => (e) => {
4676
4658
  onRowClick?.({ row, rowId }, e);
4677
4659
  checkboxSelection && !disableSelectionOnClick && isRowSelectableCheck(rowId, row) && onCheckboxChange(e, rowId);
4678
4660
  },
4679
4661
  [onRowClick, checkboxSelection, disableSelectionOnClick, onCheckboxChange, isRowSelectableCheck]
4680
4662
  );
4681
- const getRowFocusHandler = useCallback13(
4663
+ const getRowFocusHandler = useCallback14(
4682
4664
  (rowId) => () => {
4683
4665
  onRowFocus(rowId);
4684
4666
  },
4685
4667
  [onRowFocus]
4686
4668
  );
4687
- const getCheckboxClickHandler = useCallback13(
4669
+ const getCheckboxClickHandler = useCallback14(
4688
4670
  (rowId, row) => (e) => {
4689
4671
  e.stopPropagation();
4690
4672
  if (isRowSelectableCheck(rowId, row)) {
@@ -4694,7 +4676,7 @@ function Component(props, apiRef) {
4694
4676
  },
4695
4677
  [onCheckboxChange, isRowSelectableCheck, onRowFocus]
4696
4678
  );
4697
- const handleTableKeyDown = useCallback13(
4679
+ const handleTableKeyDown = useCallback14(
4698
4680
  (e) => {
4699
4681
  const supportedKeys = ["ArrowUp", "ArrowDown", " ", "Home", "End", "PageUp", "PageDown"];
4700
4682
  if (!supportedKeys.includes(e.key)) return;
@@ -4855,7 +4837,7 @@ function Component(props, apiRef) {
4855
4837
  "col",
4856
4838
  {
4857
4839
  ref: c.tableColRef,
4858
- key: c.columnId,
4840
+ key: c.field.toString(),
4859
4841
  style: {
4860
4842
  width: c.width,
4861
4843
  minWidth: c.minWidth ?? "50px"
@@ -4905,13 +4887,13 @@ function Component(props, apiRef) {
4905
4887
  }
4906
4888
  },
4907
4889
  headerCheckboxElement
4908
- ), columns.map((c, i) => (
4890
+ ), columns.map((c) => (
4909
4891
  // @ts-ignore
4910
4892
  /* @__PURE__ */ React26.createElement(
4911
4893
  HeadCell2,
4912
4894
  {
4913
4895
  tableId,
4914
- key: `${c.field.toString()}_${i}`,
4896
+ key: c.field.toString(),
4915
4897
  stickyHeader: props.stickyHeader,
4916
4898
  editMode: !!c.isCellEditable,
4917
4899
  onSortChange: handleSortChange,
@@ -5041,7 +5023,7 @@ var DataTable = forwardRef7(Component);
5041
5023
  DataTable.displayName = "DataTable";
5042
5024
 
5043
5025
  // src/components/DateRangePicker/DateRangePicker.tsx
5044
- import React27, { forwardRef as forwardRef8, useCallback as useCallback14, useEffect as useEffect8, useImperativeHandle as useImperativeHandle3, useMemo as useMemo13, useRef as useRef8, useState as useState10 } from "react";
5026
+ import React27, { forwardRef as forwardRef8, useCallback as useCallback15, useEffect as useEffect8, useImperativeHandle as useImperativeHandle3, useMemo as useMemo13, useRef as useRef9, useState as useState10 } from "react";
5045
5027
  import { IMaskInput as IMaskInput2, IMask as IMask2 } from "react-imask";
5046
5028
  import CalendarTodayIcon2 from "@mui/icons-material/CalendarToday";
5047
5029
  import { styled as styled14, useThemeProps as useThemeProps7 } from "@mui/joy";
@@ -5246,12 +5228,12 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5246
5228
  numberOfMonths,
5247
5229
  ...innerProps
5248
5230
  } = props;
5249
- const innerRef = useRef8(null);
5250
- const buttonRef = useRef8(null);
5231
+ const innerRef = useRef9(null);
5232
+ const buttonRef = useRef9(null);
5251
5233
  const [rawValue, setValue] = useControlledState(
5252
5234
  props.value,
5253
5235
  props.defaultValue ?? null,
5254
- useCallback14(
5236
+ useCallback15(
5255
5237
  (value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
5256
5238
  [props.name, onChange]
5257
5239
  )
@@ -5285,7 +5267,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5285
5267
  }
5286
5268
  }, [anchorEl, innerRef]);
5287
5269
  useImperativeHandle3(ref, () => innerRef.current, [innerRef]);
5288
- const handleChange = useCallback14(
5270
+ const handleChange = useCallback15(
5289
5271
  (event) => {
5290
5272
  const value2 = event.target.value;
5291
5273
  setDisplayValue(value2 ? formatValueString2(parseDates(value2, format), displayFormat, locale) : value2);
@@ -5293,7 +5275,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5293
5275
  },
5294
5276
  [displayFormat, format, locale, setValue]
5295
5277
  );
5296
- const handleDisplayInputChange = useCallback14(
5278
+ const handleDisplayInputChange = useCallback15(
5297
5279
  (event) => {
5298
5280
  if (event.target.value === "") {
5299
5281
  handleChange({
@@ -5318,14 +5300,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5318
5300
  },
5319
5301
  [displayFormat, format, handleChange, props.name]
5320
5302
  );
5321
- const handleCalendarToggle = useCallback14(
5303
+ const handleCalendarToggle = useCallback15(
5322
5304
  (event) => {
5323
5305
  setAnchorEl(anchorEl ? null : event.currentTarget);
5324
5306
  innerRef.current?.focus();
5325
5307
  },
5326
5308
  [anchorEl, setAnchorEl, innerRef]
5327
5309
  );
5328
- const handleCalendarChange = useCallback14(
5310
+ const handleCalendarChange = useCallback15(
5329
5311
  ([date1, date2]) => {
5330
5312
  if (!date1 || !date2) return;
5331
5313
  const formattedValue = formatValueString2([date1, date2], format);
@@ -5339,7 +5321,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5339
5321
  },
5340
5322
  [props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat, locale]
5341
5323
  );
5342
- const handleInputMouseDown = useCallback14(
5324
+ const handleInputMouseDown = useCallback15(
5343
5325
  (event) => {
5344
5326
  if (inputReadOnly || isAlphabeticDisplay) {
5345
5327
  event.preventDefault();
@@ -5348,7 +5330,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5348
5330
  },
5349
5331
  [inputReadOnly, isAlphabeticDisplay, buttonRef]
5350
5332
  );
5351
- const handleInputClick = useCallback14(
5333
+ const handleInputClick = useCallback15(
5352
5334
  (event) => {
5353
5335
  if (inputReadOnly && !readOnly) {
5354
5336
  handleCalendarToggle(event);
@@ -5356,7 +5338,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5356
5338
  },
5357
5339
  [inputReadOnly, readOnly, handleCalendarToggle]
5358
5340
  );
5359
- const handlePresetClick = useCallback14(
5341
+ const handlePresetClick = useCallback15(
5360
5342
  (presetValue) => {
5361
5343
  if (props.value !== void 0) {
5362
5344
  onChange?.({ target: { name: props.name, value: presetValue } });
@@ -5369,7 +5351,7 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
5369
5351
  },
5370
5352
  [props.value, props.name, onChange, setValue, setAnchorEl, format, displayFormat, locale]
5371
5353
  );
5372
- const isPresetDisabled = useCallback14(
5354
+ const isPresetDisabled = useCallback15(
5373
5355
  (presetValue) => {
5374
5356
  try {
5375
5357
  const dates = parseDates(presetValue, format);
@@ -5605,14 +5587,14 @@ var InsetDrawer = styled19(JoyDrawer)(({ theme }) => ({
5605
5587
  }));
5606
5588
 
5607
5589
  // src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
5608
- import React31, { useCallback as useCallback15, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef9, useState as useState11 } from "react";
5590
+ import React31, { useCallback as useCallback16, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef10, useState as useState11 } from "react";
5609
5591
  import SearchIcon from "@mui/icons-material/Search";
5610
5592
  import { useThemeProps as useThemeProps8 } from "@mui/joy";
5611
5593
  import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
5612
5594
  var EMPTY_VALUE = [];
5613
5595
  function LabelWithTooltip(props) {
5614
5596
  const { label, size } = props;
5615
- const labelContentRef = useRef9(null);
5597
+ const labelContentRef = useRef10(null);
5616
5598
  const [isOverflowing, setIsOverflowing] = useState11(false);
5617
5599
  const labelContent = /* @__PURE__ */ React31.createElement(
5618
5600
  "span",
@@ -5660,12 +5642,12 @@ function FilterableCheckboxGroup(inProps) {
5660
5642
  const [rawValue, setInternalValue] = useControlledState(
5661
5643
  value,
5662
5644
  value ?? EMPTY_VALUE,
5663
- useCallback15((newValue) => onChange?.(newValue ?? []), [onChange])
5645
+ useCallback16((newValue) => onChange?.(newValue ?? []), [onChange])
5664
5646
  );
5665
5647
  const internalValue = rawValue ?? EMPTY_VALUE;
5666
- const parentRef = useRef9(null);
5667
- const isInitialSortRef = useRef9(false);
5668
- const prevOptionsRef = useRef9([...options]);
5648
+ const parentRef = useRef10(null);
5649
+ const isInitialSortRef = useRef10(false);
5650
+ const prevOptionsRef = useRef10([...options]);
5669
5651
  const filteredOptions = useMemo14(() => {
5670
5652
  if (!searchTerm) return sortedOptions;
5671
5653
  return sortedOptions.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
@@ -5717,10 +5699,10 @@ function FilterableCheckboxGroup(inProps) {
5717
5699
  useEffect9(() => {
5718
5700
  virtualizer.measure();
5719
5701
  }, [virtualizer, filteredOptions, size]);
5720
- const handleSearchChange = useCallback15((event) => {
5702
+ const handleSearchChange = useCallback16((event) => {
5721
5703
  setSearchTerm(event.target.value);
5722
5704
  }, []);
5723
- const handleCheckboxChange = useCallback15(
5705
+ const handleCheckboxChange = useCallback16(
5724
5706
  (optionValue) => (event) => {
5725
5707
  const checked = event.target.checked;
5726
5708
  const newValue = checked ? [...internalValue, optionValue] : internalValue.filter((v) => v !== optionValue);
@@ -5728,7 +5710,7 @@ function FilterableCheckboxGroup(inProps) {
5728
5710
  },
5729
5711
  [internalValue, setInternalValue]
5730
5712
  );
5731
- const handleSelectAll = useCallback15(
5713
+ const handleSelectAll = useCallback16(
5732
5714
  (event) => {
5733
5715
  const checked = event.target.checked;
5734
5716
  const enabledOptions = filteredOptions.filter((option) => !option.disabled);
@@ -5832,16 +5814,16 @@ function FilterableCheckboxGroup(inProps) {
5832
5814
  FilterableCheckboxGroup.displayName = "FilterableCheckboxGroup";
5833
5815
 
5834
5816
  // src/components/FilterMenu/FilterMenu.tsx
5835
- import React44, { useCallback as useCallback27, useContext, useEffect as useEffect12 } from "react";
5817
+ import React44, { useCallback as useCallback28, useContext, useEffect as useEffect12 } from "react";
5836
5818
  import { Button as Button2, Stack as Stack12 } from "@mui/joy";
5837
5819
 
5838
5820
  // src/components/FilterMenu/components/CheckboxGroup.tsx
5839
- import React32, { useCallback as useCallback16 } from "react";
5821
+ import React32, { useCallback as useCallback17 } from "react";
5840
5822
  import { Stack as Stack2 } from "@mui/joy";
5841
5823
  function CheckboxGroup(props) {
5842
5824
  const { id, label, options, value, onChange, hidden } = props;
5843
5825
  const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
5844
- const handleCheckboxChange = useCallback16(
5826
+ const handleCheckboxChange = useCallback17(
5845
5827
  (optionValue) => (event) => {
5846
5828
  const checked = event.target.checked;
5847
5829
  let newValue;
@@ -5870,12 +5852,12 @@ function CheckboxGroup(props) {
5870
5852
  CheckboxGroup.displayName = "CheckboxGroup";
5871
5853
 
5872
5854
  // src/components/FilterMenu/components/FilterableCheckboxGroup.tsx
5873
- import React33, { useCallback as useCallback17 } from "react";
5855
+ import React33, { useCallback as useCallback18 } from "react";
5874
5856
  import { Stack as Stack3 } from "@mui/joy";
5875
5857
  function FilterableCheckboxGroup2(props) {
5876
5858
  const { id, label, options, value, onChange, hidden, placeholder, maxHeight } = props;
5877
5859
  const [internalValue, setInternalValue] = useControlledState(value, [], onChange);
5878
- const handleChange = useCallback17(
5860
+ const handleChange = useCallback18(
5879
5861
  (newValue) => {
5880
5862
  setInternalValue(newValue);
5881
5863
  },
@@ -5899,7 +5881,7 @@ function FilterableCheckboxGroup2(props) {
5899
5881
  FilterableCheckboxGroup2.displayName = "FilterableCheckboxGroup";
5900
5882
 
5901
5883
  // src/components/FilterMenu/components/RadioGroup.tsx
5902
- import React34, { useCallback as useCallback18 } from "react";
5884
+ import React34, { useCallback as useCallback19 } from "react";
5903
5885
 
5904
5886
  // src/components/Radio/Radio.tsx
5905
5887
  import { Radio as JoyRadio, RadioGroup as JoyRadioGroup } from "@mui/joy";
@@ -5916,7 +5898,7 @@ import { Stack as Stack4 } from "@mui/joy";
5916
5898
  function RadioGroup2(props) {
5917
5899
  const { id, label, options, value, onChange, hidden } = props;
5918
5900
  const [internalValue, setInternalValue] = useControlledState(value, value ?? "", onChange);
5919
- const handleRadioChange = useCallback18(
5901
+ const handleRadioChange = useCallback19(
5920
5902
  (event) => {
5921
5903
  const newValue = event.target.value;
5922
5904
  const option = options.find((opt) => opt.value.toString() === newValue);
@@ -5933,7 +5915,7 @@ function RadioGroup2(props) {
5933
5915
  RadioGroup2.displayName = "RadioGroup";
5934
5916
 
5935
5917
  // src/components/FilterMenu/components/DateRange.tsx
5936
- import React35, { useCallback as useCallback19, useMemo as useMemo15, useState as useState12, useEffect as useEffect10 } from "react";
5918
+ import React35, { useCallback as useCallback20, useMemo as useMemo15, useState as useState12, useEffect as useEffect10 } from "react";
5937
5919
  import { Stack as Stack5 } from "@mui/joy";
5938
5920
  function DateRange(props) {
5939
5921
  const {
@@ -5962,7 +5944,7 @@ function DateRange(props) {
5962
5944
  ],
5963
5945
  []
5964
5946
  );
5965
- const getDateRangeForOption = useCallback19(
5947
+ const getDateRangeForOption = useCallback20(
5966
5948
  (option) => {
5967
5949
  const now = /* @__PURE__ */ new Date();
5968
5950
  const currentYear = now.getFullYear();
@@ -6001,7 +5983,7 @@ function DateRange(props) {
6001
5983
  },
6002
5984
  [internalValue]
6003
5985
  );
6004
- const determineOptionFromValue = useCallback19(
5986
+ const determineOptionFromValue = useCallback20(
6005
5987
  (value2) => {
6006
5988
  if (!value2) {
6007
5989
  return "all-time";
@@ -6027,7 +6009,7 @@ function DateRange(props) {
6027
6009
  const newOption = determineOptionFromValue(internalValue);
6028
6010
  setSelectedOption(newOption);
6029
6011
  }, [internalValue, determineOptionFromValue]);
6030
- const handleOptionChange = useCallback19(
6012
+ const handleOptionChange = useCallback20(
6031
6013
  (event) => {
6032
6014
  const newOption = event.target.value;
6033
6015
  setSelectedOption(newOption);
@@ -6036,7 +6018,7 @@ function DateRange(props) {
6036
6018
  },
6037
6019
  [getDateRangeForOption, setInternalValue]
6038
6020
  );
6039
- const handleCustomDateChange = useCallback19(
6021
+ const handleCustomDateChange = useCallback20(
6040
6022
  (event) => {
6041
6023
  const dateRangeString = event.target.value;
6042
6024
  if (dateRangeString && dateRangeString.includes(" - ")) {
@@ -6076,11 +6058,11 @@ function DateRange(props) {
6076
6058
  DateRange.displayName = "DateRange";
6077
6059
 
6078
6060
  // src/components/FilterMenu/components/MonthRange.tsx
6079
- import React37, { useCallback as useCallback21, useMemo as useMemo17 } from "react";
6061
+ import React37, { useCallback as useCallback22, useMemo as useMemo17 } from "react";
6080
6062
  import { Stack as Stack6 } from "@mui/joy";
6081
6063
 
6082
6064
  // src/components/MonthRangePicker/MonthRangePicker.tsx
6083
- import React36, { forwardRef as forwardRef9, useCallback as useCallback20, useEffect as useEffect11, useImperativeHandle as useImperativeHandle4, useMemo as useMemo16, useRef as useRef10, useState as useState13 } from "react";
6065
+ import React36, { forwardRef as forwardRef9, useCallback as useCallback21, useEffect as useEffect11, useImperativeHandle as useImperativeHandle4, useMemo as useMemo16, useRef as useRef11, useState as useState13 } from "react";
6084
6066
  import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
6085
6067
  import CalendarTodayIcon3 from "@mui/icons-material/CalendarToday";
6086
6068
  import { styled as styled20, useThemeProps as useThemeProps9 } from "@mui/joy";
@@ -6195,12 +6177,12 @@ var MonthRangePicker = forwardRef9((inProps, ref) => {
6195
6177
  } = props;
6196
6178
  const displayFormat = displayFormatProp ?? format;
6197
6179
  const isAlphabeticDisplay = hasAlphabeticMonth3(displayFormat);
6198
- const innerRef = useRef10(null);
6199
- const buttonRef = useRef10(null);
6180
+ const innerRef = useRef11(null);
6181
+ const buttonRef = useRef11(null);
6200
6182
  const [rawValue, setValue] = useControlledState(
6201
6183
  props.value,
6202
6184
  props.defaultValue ?? null,
6203
- useCallback20(
6185
+ useCallback21(
6204
6186
  (value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
6205
6187
  [props.name, onChange]
6206
6188
  )
@@ -6230,7 +6212,7 @@ var MonthRangePicker = forwardRef9((inProps, ref) => {
6230
6212
  }
6231
6213
  }, [anchorEl, innerRef]);
6232
6214
  useImperativeHandle4(ref, () => innerRef.current, [innerRef]);
6233
- const handleChange = useCallback20(
6215
+ const handleChange = useCallback21(
6234
6216
  (event) => {
6235
6217
  setDisplayValue(
6236
6218
  event.target.value ? formatValueString3(parseDates2(event.target.value), displayFormat, locale) : ""
@@ -6239,7 +6221,7 @@ var MonthRangePicker = forwardRef9((inProps, ref) => {
6239
6221
  },
6240
6222
  [displayFormat, locale, setValue]
6241
6223
  );
6242
- const handleInputMouseDown = useCallback20(
6224
+ const handleInputMouseDown = useCallback21(
6243
6225
  (event) => {
6244
6226
  if (isAlphabeticDisplay) {
6245
6227
  event.preventDefault();
@@ -6248,14 +6230,14 @@ var MonthRangePicker = forwardRef9((inProps, ref) => {
6248
6230
  },
6249
6231
  [isAlphabeticDisplay, buttonRef]
6250
6232
  );
6251
- const handleCalendarToggle = useCallback20(
6233
+ const handleCalendarToggle = useCallback21(
6252
6234
  (event) => {
6253
6235
  setAnchorEl(anchorEl ? null : event.currentTarget);
6254
6236
  innerRef.current?.focus();
6255
6237
  },
6256
6238
  [anchorEl, setAnchorEl, innerRef]
6257
6239
  );
6258
- const handleCalendarChange = useCallback20(
6240
+ const handleCalendarChange = useCallback21(
6259
6241
  ([date1, date2]) => {
6260
6242
  if (!date1 || !date2) return;
6261
6243
  const formattedValue = formatValueString3([date1, date2], format);
@@ -6390,7 +6372,7 @@ function MonthRange(props) {
6390
6372
  () => internalValue ? `${internalValue[0]} - ${internalValue[1]}` : "",
6391
6373
  [internalValue]
6392
6374
  );
6393
- const handleChange = useCallback21(
6375
+ const handleChange = useCallback22(
6394
6376
  (event) => {
6395
6377
  const rangeString = event.target.value;
6396
6378
  if (rangeString && rangeString.includes(" - ")) {
@@ -6425,12 +6407,12 @@ function MonthRange(props) {
6425
6407
  MonthRange.displayName = "MonthRange";
6426
6408
 
6427
6409
  // src/components/FilterMenu/components/CurrencyInput.tsx
6428
- import React38, { useCallback as useCallback22 } from "react";
6410
+ import React38, { useCallback as useCallback23 } from "react";
6429
6411
  import { Stack as Stack7 } from "@mui/joy";
6430
6412
  function CurrencyInput3(props) {
6431
6413
  const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
6432
6414
  const [internalValue, setInternalValue] = useControlledState(value, value, onChange);
6433
- const handleCurrencyChange = useCallback22(
6415
+ const handleCurrencyChange = useCallback23(
6434
6416
  (event) => {
6435
6417
  const newValue = event.target.value ?? void 0;
6436
6418
  setInternalValue(newValue);
@@ -6456,14 +6438,14 @@ function CurrencyInput3(props) {
6456
6438
  CurrencyInput3.displayName = "CurrencyInput";
6457
6439
 
6458
6440
  // src/components/FilterMenu/components/CurrencyRange.tsx
6459
- import React39, { useCallback as useCallback23 } from "react";
6441
+ import React39, { useCallback as useCallback24 } from "react";
6460
6442
  import { Stack as Stack8 } from "@mui/joy";
6461
6443
  function CurrencyRange(props) {
6462
6444
  const { id, label, value, onChange, hidden, max, placeholder, useMinorUnit, currency = "USD" } = props;
6463
6445
  const [internalValue, setInternalValue] = useControlledState(value, null, onChange);
6464
6446
  const minValue = internalValue?.[0];
6465
6447
  const maxValue = internalValue?.[1];
6466
- const handleMinChange = useCallback23(
6448
+ const handleMinChange = useCallback24(
6467
6449
  (event) => {
6468
6450
  const newMinValue = event.target.value ?? void 0;
6469
6451
  const currentMaxValue = maxValue;
@@ -6477,7 +6459,7 @@ function CurrencyRange(props) {
6477
6459
  },
6478
6460
  [maxValue, setInternalValue]
6479
6461
  );
6480
- const handleMaxChange = useCallback23(
6462
+ const handleMaxChange = useCallback24(
6481
6463
  (event) => {
6482
6464
  const newMaxValue = event.target.value ?? void 0;
6483
6465
  const currentMinValue = minValue;
@@ -6529,7 +6511,7 @@ import React41 from "react";
6529
6511
  import { Stack as Stack9, Typography as Typography5 } from "@mui/joy";
6530
6512
 
6531
6513
  // src/components/PercentageInput/PercentageInput.tsx
6532
- import React40, { useCallback as useCallback24, useMemo as useMemo18 } from "react";
6514
+ import React40, { useCallback as useCallback25, useMemo as useMemo18 } from "react";
6533
6515
  import { NumericFormat as NumericFormat2 } from "react-number-format";
6534
6516
  import { styled as styled21, useThemeProps as useThemeProps10 } from "@mui/joy";
6535
6517
  var padDecimal = (value, decimalScale) => {
@@ -6586,7 +6568,7 @@ var PercentageInput = React40.forwardRef(
6586
6568
  const [_value, setValue] = useControlledState(
6587
6569
  props.value,
6588
6570
  props.defaultValue ?? null,
6589
- useCallback24((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
6571
+ useCallback25((value2) => onChange?.({ target: { name, value: value2 } }), [onChange, name])
6590
6572
  );
6591
6573
  const value = useMemo18(() => {
6592
6574
  if (_value && useMinorUnit) {
@@ -6598,7 +6580,7 @@ var PercentageInput = React40.forwardRef(
6598
6580
  () => value != null && (max != null && value > max || min != null && value < min),
6599
6581
  [max, min, value]
6600
6582
  );
6601
- const handleChange = useCallback24(
6583
+ const handleChange = useCallback25(
6602
6584
  (event) => {
6603
6585
  if (event.target.value === "") {
6604
6586
  setValue(null);
@@ -6672,7 +6654,7 @@ var PercentageInput3 = ({
6672
6654
  };
6673
6655
 
6674
6656
  // src/components/FilterMenu/components/PercentageRange.tsx
6675
- import React42, { useCallback as useCallback25 } from "react";
6657
+ import React42, { useCallback as useCallback26 } from "react";
6676
6658
  import { Stack as Stack10 } from "@mui/joy";
6677
6659
  function PercentageRange(props) {
6678
6660
  const { id, label, value, onChange, hidden, useMinorUnit, maxDecimalScale, min, max } = props;
@@ -6683,7 +6665,7 @@ function PercentageRange(props) {
6683
6665
  );
6684
6666
  const minValue = internalValue?.[0];
6685
6667
  const maxValue = internalValue?.[1];
6686
- const handleMinChange = useCallback25(
6668
+ const handleMinChange = useCallback26(
6687
6669
  (event) => {
6688
6670
  const newMinValue = event.target.value ?? void 0;
6689
6671
  const currentMaxValue = maxValue;
@@ -6695,7 +6677,7 @@ function PercentageRange(props) {
6695
6677
  },
6696
6678
  [maxValue, setInternalValue]
6697
6679
  );
6698
- const handleMaxChange = useCallback25(
6680
+ const handleMaxChange = useCallback26(
6699
6681
  (event) => {
6700
6682
  const newMaxValue = event.target.value ?? void 0;
6701
6683
  const currentMinValue = minValue;
@@ -6743,13 +6725,13 @@ function PercentageRange(props) {
6743
6725
  PercentageRange.displayName = "PercentageRange";
6744
6726
 
6745
6727
  // src/components/FilterMenu/components/Autocomplete.tsx
6746
- import React43, { useCallback as useCallback26 } from "react";
6728
+ import React43, { useCallback as useCallback27 } from "react";
6747
6729
  import { Stack as Stack11 } from "@mui/joy";
6748
6730
  function Autocomplete2(props) {
6749
6731
  const { id, label, value, onChange, options, multiple, hidden, placeholder } = props;
6750
6732
  const [internalValue, setInternalValue] = useControlledState(value, void 0, onChange);
6751
6733
  const autocompleteValue = typeof internalValue === "string" || typeof internalValue === "number" ? String(internalValue) : void 0;
6752
- const handleChange = useCallback26(
6734
+ const handleChange = useCallback27(
6753
6735
  (event) => {
6754
6736
  const val = event.target.value ?? void 0;
6755
6737
  if (val) {
@@ -6805,7 +6787,7 @@ function FilterMenu(props) {
6805
6787
  dropdownRegistry.register();
6806
6788
  return () => dropdownRegistry.unregister();
6807
6789
  }, [dropdownRegistry]);
6808
- const handleFilterChange = useCallback27(
6790
+ const handleFilterChange = useCallback28(
6809
6791
  (filterId, value) => {
6810
6792
  setInternalValues((prev) => ({
6811
6793
  ...prev,
@@ -6814,11 +6796,11 @@ function FilterMenu(props) {
6814
6796
  },
6815
6797
  [setInternalValues]
6816
6798
  );
6817
- const handleApply = useCallback27(() => {
6799
+ const handleApply = useCallback28(() => {
6818
6800
  onChange?.(internalValues);
6819
6801
  onClose?.();
6820
6802
  }, [onChange, onClose, internalValues]);
6821
- const handleClear = useCallback27(() => {
6803
+ const handleClear = useCallback28(() => {
6822
6804
  const clearedValues = resetValues || {};
6823
6805
  setInternalValues(clearedValues);
6824
6806
  onChange?.(clearedValues);
@@ -6854,7 +6836,7 @@ function FilterMenu(props) {
6854
6836
  FilterMenu.displayName = "FilterMenu";
6855
6837
 
6856
6838
  // src/components/Uploader/Uploader.tsx
6857
- import React45, { useCallback as useCallback28, useEffect as useEffect13, useMemo as useMemo19, useRef as useRef11, useState as useState14 } from "react";
6839
+ import React45, { useCallback as useCallback29, useEffect as useEffect13, useMemo as useMemo19, useRef as useRef12, useState as useState14 } from "react";
6858
6840
  import { styled as styled22, Input as Input2 } from "@mui/joy";
6859
6841
  import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
6860
6842
  import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
@@ -6988,8 +6970,8 @@ var Uploader = React45.memo((props) => {
6988
6970
  error: errorProp,
6989
6971
  helperText: helperTextProp
6990
6972
  } = props;
6991
- const dropZoneRef = useRef11(null);
6992
- const inputRef = useRef11(null);
6973
+ const dropZoneRef = useRef12(null);
6974
+ const inputRef = useRef12(null);
6993
6975
  const [errorText, setErrorText] = useState14();
6994
6976
  const [files, setFiles] = useState14([]);
6995
6977
  const [uploaded, setUploaded] = useState14(props.uploaded || []);
@@ -7039,7 +7021,7 @@ var Uploader = React45.memo((props) => {
7039
7021
  () => !maxCount || maxCount && [...uploaded, ...files].length !== maxCount,
7040
7022
  [files, maxCount, uploaded]
7041
7023
  );
7042
- const addFiles = useCallback28(
7024
+ const addFiles = useCallback29(
7043
7025
  (uploads) => {
7044
7026
  try {
7045
7027
  const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
@@ -7121,14 +7103,14 @@ var Uploader = React45.memo((props) => {
7121
7103
  }
7122
7104
  }
7123
7105
  }, [inputRef, files, minCount]);
7124
- const handleFileChanged = useCallback28(
7106
+ const handleFileChanged = useCallback29(
7125
7107
  (event) => {
7126
7108
  const files2 = Array.from(event.target.files || []);
7127
7109
  addFiles(files2);
7128
7110
  },
7129
7111
  [addFiles]
7130
7112
  );
7131
- const handleDeleteFile = useCallback28(
7113
+ const handleDeleteFile = useCallback29(
7132
7114
  (deletedFile) => {
7133
7115
  if (deletedFile instanceof File) {
7134
7116
  setFiles((current) => {
@@ -7148,7 +7130,7 @@ var Uploader = React45.memo((props) => {
7148
7130
  },
7149
7131
  [name, onChange, onDelete]
7150
7132
  );
7151
- const handleUploaderButtonClick = useCallback28(() => {
7133
+ const handleUploaderButtonClick = useCallback29(() => {
7152
7134
  inputRef.current?.click();
7153
7135
  }, []);
7154
7136
  const uploader = /* @__PURE__ */ React45.createElement(
@@ -7443,7 +7425,7 @@ function MenuButton2(props) {
7443
7425
  MenuButton2.displayName = "MenuButton";
7444
7426
 
7445
7427
  // src/components/MonthPicker/MonthPicker.tsx
7446
- import React49, { forwardRef as forwardRef10, useCallback as useCallback29, useEffect as useEffect15, useImperativeHandle as useImperativeHandle5, useRef as useRef12, useState as useState16 } from "react";
7428
+ import React49, { forwardRef as forwardRef10, useCallback as useCallback30, useEffect as useEffect15, useImperativeHandle as useImperativeHandle5, useRef as useRef13, useState as useState16 } from "react";
7447
7429
  import CalendarTodayIcon4 from "@mui/icons-material/CalendarToday";
7448
7430
  import { styled as styled23, useThemeProps as useThemeProps11 } from "@mui/joy";
7449
7431
  import { FocusTrap as FocusTrap4, ClickAwayListener as ClickAwayListener4, Popper as Popper5 } from "@mui/base";
@@ -7526,18 +7508,18 @@ var MonthPicker = forwardRef10((inProps, ref) => {
7526
7508
  locale,
7527
7509
  ...innerProps
7528
7510
  } = props;
7529
- const innerRef = useRef12(null);
7530
- const buttonRef = useRef12(null);
7511
+ const innerRef = useRef13(null);
7512
+ const buttonRef = useRef13(null);
7531
7513
  const [rawValue, setValue, isControlled] = useControlledState(
7532
7514
  props.value,
7533
7515
  props.defaultValue ?? null,
7534
- useCallback29(
7516
+ useCallback30(
7535
7517
  (value2) => onChange?.({ target: { name: props.name, value: value2 ?? "" } }),
7536
7518
  [props.name, onChange]
7537
7519
  )
7538
7520
  );
7539
7521
  const value = rawValue ?? "";
7540
- const getFormattedDisplayValue = useCallback29(
7522
+ const getFormattedDisplayValue = useCallback30(
7541
7523
  (inputValue) => {
7542
7524
  if (!inputValue) return "";
7543
7525
  try {
@@ -7560,7 +7542,7 @@ var MonthPicker = forwardRef10((inProps, ref) => {
7560
7542
  useEffect15(() => {
7561
7543
  setDisplayValue(getFormattedDisplayValue(value));
7562
7544
  }, [value, getFormattedDisplayValue]);
7563
- const handleChange = useCallback29(
7545
+ const handleChange = useCallback30(
7564
7546
  (event) => {
7565
7547
  const newValue = event.target.value;
7566
7548
  setValue(newValue);
@@ -7570,14 +7552,14 @@ var MonthPicker = forwardRef10((inProps, ref) => {
7570
7552
  },
7571
7553
  [setValue, getFormattedDisplayValue, isControlled]
7572
7554
  );
7573
- const handleCalendarToggle = useCallback29(
7555
+ const handleCalendarToggle = useCallback30(
7574
7556
  (event) => {
7575
7557
  setAnchorEl(anchorEl ? null : event.currentTarget);
7576
7558
  innerRef.current?.focus();
7577
7559
  },
7578
7560
  [anchorEl, setAnchorEl, innerRef]
7579
7561
  );
7580
- const handleInputMouseDown = useCallback29(
7562
+ const handleInputMouseDown = useCallback30(
7581
7563
  (event) => {
7582
7564
  event.preventDefault();
7583
7565
  buttonRef.current?.focus();
@@ -7825,7 +7807,7 @@ function Navigator(props) {
7825
7807
  Navigator.displayName = "Navigator";
7826
7808
 
7827
7809
  // src/components/ProfileMenu/ProfileMenu.tsx
7828
- import React53, { useCallback as useCallback30, useMemo as useMemo20 } from "react";
7810
+ import React53, { useCallback as useCallback31, useMemo as useMemo20 } from "react";
7829
7811
  import { Dropdown as Dropdown2, ListDivider, menuItemClasses, styled as styled26, MenuButton as MenuButton3, useThemeProps as useThemeProps12 } from "@mui/joy";
7830
7812
  import { ClickAwayListener as ClickAwayListener5 } from "@mui/base";
7831
7813
  import DropdownIcon from "@mui/icons-material/ArrowDropDown";
@@ -7878,7 +7860,7 @@ function ProfileMenu(inProps) {
7878
7860
  const [open, setOpen] = useControlledState(
7879
7861
  _open,
7880
7862
  defaultOpen ?? false,
7881
- useCallback30((value) => onOpenChange?.(value), [onOpenChange])
7863
+ useCallback31((value) => onOpenChange?.(value), [onOpenChange])
7882
7864
  );
7883
7865
  return /* @__PURE__ */ React53.createElement(ClickAwayListener5, { onClickAway: () => setOpen(false) }, /* @__PURE__ */ React53.createElement("div", null, /* @__PURE__ */ React53.createElement(Dropdown2, { open }, /* @__PURE__ */ React53.createElement(
7884
7866
  ProfileMenuButton,