@homebound/beam 3.0.6 → 3.1.0-alpha.2

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
@@ -219,6 +219,7 @@ __export(index_exports, {
219
219
  filterTestIdPrefix: () => filterTestIdPrefix,
220
220
  formatDate: () => formatDate,
221
221
  formatDateRange: () => formatDateRange,
222
+ formatPlainDate: () => formatPlainDate,
222
223
  formatValue: () => formatValue,
223
224
  generateColumnId: () => generateColumnId,
224
225
  getAlignment: () => getAlignment,
@@ -5890,24 +5891,47 @@ function useHover2(props) {
5890
5891
  var import_react16 = require("react");
5891
5892
  var import_use_query_params2 = require("use-query-params");
5892
5893
  function usePersistedFilter({ storageKey, filterDefs }) {
5893
- const filterKeys = Object.keys(filterDefs);
5894
+ const filterImpls = (0, import_react16.useMemo)(
5895
+ () => Object.fromEntries(safeEntries(filterDefs).map(([key, def]) => [key, def(key)])),
5896
+ [filterDefs]
5897
+ );
5898
+ const filterKeys = (0, import_react16.useMemo)(() => Object.keys(filterImpls), [filterImpls]);
5894
5899
  const defaultFilter = (0, import_react16.useMemo)(
5895
5900
  () => Object.fromEntries(
5896
- safeEntries(filterDefs).filter(([key, def]) => def(key).defaultValue !== void 0).map(([key, def]) => [key, def(key).defaultValue])
5901
+ safeEntries(filterImpls).filter(([, def]) => def.defaultValue !== void 0).map(([key, def]) => [key, def.defaultValue])
5897
5902
  ),
5898
- [filterDefs]
5903
+ [filterImpls]
5899
5904
  );
5900
5905
  const [{ filter: queryParamsFilter }, setQueryParams] = (0, import_use_query_params2.useQueryParams)({ filter: import_use_query_params2.JsonParam });
5901
- const [storedFilter, setStoredFilter] = useSessionStorage(storageKey, queryParamsFilter ?? defaultFilter);
5906
+ const [storedFilter, setStoredFilter] = useSessionStorage(
5907
+ storageKey,
5908
+ dehydrateFilter(filterImpls, defaultFilter) ?? defaultFilter
5909
+ );
5902
5910
  const isQueryParamFilterValid = hasValidFilterKeys(queryParamsFilter, filterKeys);
5903
- const filter = isQueryParamFilterValid ? queryParamsFilter : storedFilter ?? defaultFilter;
5904
- const setFilter = (filter2) => setQueryParams({ filter: filter2 });
5911
+ const serializedQueryParamsFilter = (0, import_react16.useMemo)(() => JSON.stringify(queryParamsFilter), [queryParamsFilter]);
5912
+ const serializedStoredFilter = (0, import_react16.useMemo)(() => JSON.stringify(storedFilter), [storedFilter]);
5913
+ const queryParamsFilterSnapshot = (0, import_react16.useMemo)(
5914
+ () => parseSerializedValue(serializedQueryParamsFilter),
5915
+ [serializedQueryParamsFilter]
5916
+ );
5917
+ const storedFilterSnapshot = (0, import_react16.useMemo)(() => parseSerializedValue(serializedStoredFilter), [serializedStoredFilter]);
5918
+ const hydratedQueryParamsFilter = (0, import_react16.useMemo)(
5919
+ () => isQueryParamFilterValid ? hydrateFilter(filterImpls, queryParamsFilterSnapshot) : void 0,
5920
+ [filterImpls, isQueryParamFilterValid, queryParamsFilterSnapshot]
5921
+ );
5922
+ const hydratedStoredFilter = (0, import_react16.useMemo)(
5923
+ () => hasValidFilterKeys(storedFilterSnapshot, filterKeys) ? hydrateFilter(filterImpls, storedFilterSnapshot) : void 0,
5924
+ [filterImpls, filterKeys, storedFilterSnapshot]
5925
+ );
5926
+ const rawFilter = hydratedQueryParamsFilter ?? hydratedStoredFilter ?? defaultFilter;
5927
+ const filter = useStableValue(rawFilter);
5928
+ const setFilter = (filter2) => setQueryParams({ filter: dehydrateFilter(filterImpls, filter2) });
5905
5929
  (0, import_react16.useEffect)(
5906
5930
  () => {
5907
5931
  if (queryParamsFilter === void 0) {
5908
5932
  setQueryParams({ filter: storedFilter }, "replaceIn");
5909
5933
  } else if (!isQueryParamFilterValid) {
5910
- setQueryParams({ filter: defaultFilter }, "replaceIn");
5934
+ setQueryParams({ filter: dehydrateFilter(filterImpls, defaultFilter) }, "replaceIn");
5911
5935
  } else if (JSON.stringify(queryParamsFilter) !== JSON.stringify(storedFilter)) {
5912
5936
  setStoredFilter(queryParamsFilter);
5913
5937
  }
@@ -5919,7 +5943,45 @@ function usePersistedFilter({ storageKey, filterDefs }) {
5919
5943
  return { setFilter, filter };
5920
5944
  }
5921
5945
  function hasValidFilterKeys(queryParamsFilter, definedKeys) {
5922
- return queryParamsFilter && safeKeys(queryParamsFilter).every((key) => definedKeys.includes(key));
5946
+ return !!queryParamsFilter && safeKeys(queryParamsFilter).every((key) => definedKeys.includes(key));
5947
+ }
5948
+ function hydrateFilter(filterImpls, value) {
5949
+ if (typeof value !== "object" || value === null) return void 0;
5950
+ const hydratedEntries = [];
5951
+ safeEntries(value).forEach(([key, rawValue]) => {
5952
+ const filter = filterImpls[key];
5953
+ if (!filter) return;
5954
+ const hydratedValue = filter.hydrate ? filter.hydrate(rawValue) : rawValue;
5955
+ if (hydratedValue !== void 0) {
5956
+ hydratedEntries.push([key, hydratedValue]);
5957
+ }
5958
+ });
5959
+ return Object.fromEntries(hydratedEntries);
5960
+ }
5961
+ function dehydrateFilter(filterImpls, value) {
5962
+ if (!value) return value;
5963
+ return Object.fromEntries(
5964
+ safeEntries(value).map(([key, rawValue]) => {
5965
+ const filter = filterImpls[key];
5966
+ return [
5967
+ key,
5968
+ filter?.dehydrate ? filter.dehydrate(rawValue) : rawValue
5969
+ ];
5970
+ })
5971
+ );
5972
+ }
5973
+ function parseSerializedValue(value) {
5974
+ return value === void 0 ? void 0 : JSON.parse(value);
5975
+ }
5976
+ function useStableValue(value) {
5977
+ const stableValue = (0, import_react16.useRef)(value);
5978
+ const stableKey = (0, import_react16.useRef)(JSON.stringify(value));
5979
+ const nextKey = JSON.stringify(value);
5980
+ if (stableKey.current !== nextKey) {
5981
+ stableValue.current = value;
5982
+ stableKey.current = nextKey;
5983
+ }
5984
+ return stableValue.current;
5923
5985
  }
5924
5986
 
5925
5987
  // src/hooks/useSessionStorage.ts
@@ -6349,6 +6411,107 @@ var import_react_stately7 = require("react-stately");
6349
6411
  // src/components/internal/DatePicker/DatePicker.tsx
6350
6412
  var import_react_day_picker3 = require("react-day-picker");
6351
6413
 
6414
+ // src/utils/plainDate.ts
6415
+ var import_temporal_polyfill = require("temporal-polyfill");
6416
+ function jsDateToPlainDate(date) {
6417
+ return new import_temporal_polyfill.Temporal.PlainDate(date.getFullYear(), date.getMonth() + 1, date.getDate());
6418
+ }
6419
+ function formatPlainDate(date, format) {
6420
+ switch (format) {
6421
+ case "shortDate":
6422
+ return date.toLocaleString("en-US", { month: "2-digit", day: "2-digit", year: "2-digit" });
6423
+ case "date":
6424
+ return date.toLocaleString("en-US", { month: "2-digit", day: "2-digit", year: "numeric" });
6425
+ case "shortWeekdayMonthDay":
6426
+ return date.toLocaleString("en-US", { weekday: "short", month: "short", day: "numeric" });
6427
+ case "longWeekdayMonthDayYear":
6428
+ return `${date.toLocaleString("en-US", { weekday: "long" })} ${date.toLocaleString("en-US", { month: "long" })} ${date.day}, ${formatYear(date.year)}`;
6429
+ case "monthYear":
6430
+ return date.toLocaleString("en-US", { month: "long", year: "numeric" });
6431
+ case "shortMonth":
6432
+ return date.toLocaleString("en-US", { month: "short" });
6433
+ case "year":
6434
+ return formatYear(date.year);
6435
+ case "weekdayInitial":
6436
+ return date.toLocaleString("en-US", { weekday: "narrow" });
6437
+ case "weekday":
6438
+ return date.toLocaleString("en-US", { weekday: "long" });
6439
+ default:
6440
+ throw new Error(`Unsupported date format: ${format}`);
6441
+ }
6442
+ }
6443
+ function todayPlainDate() {
6444
+ return import_temporal_polyfill.Temporal.Now.plainDateISO();
6445
+ }
6446
+ function isPlainDate(value) {
6447
+ return value instanceof import_temporal_polyfill.Temporal.PlainDate;
6448
+ }
6449
+ function parsePersistedPlainDate(value) {
6450
+ if (isPlainDate(value)) return value;
6451
+ if (value instanceof Date && !Number.isNaN(value.getTime())) {
6452
+ return jsDateToPlainDate(value);
6453
+ }
6454
+ if (typeof value !== "string") return void 0;
6455
+ try {
6456
+ if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
6457
+ return import_temporal_polyfill.Temporal.PlainDate.from(value);
6458
+ }
6459
+ } catch {
6460
+ return void 0;
6461
+ }
6462
+ const date = new Date(value);
6463
+ return Number.isNaN(date.getTime()) ? void 0 : jsDateToPlainDate(date);
6464
+ }
6465
+ function dehydratePlainDate(value) {
6466
+ return value?.toString();
6467
+ }
6468
+ function padNumber(value, length) {
6469
+ return Math.abs(value).toString().padStart(length, "0");
6470
+ }
6471
+ function formatYear(year) {
6472
+ return `${year < 0 ? "-" : ""}${padNumber(year, 4)}`;
6473
+ }
6474
+
6475
+ // src/components/internal/DatePicker/dates.ts
6476
+ function plainDateToJsDate(date) {
6477
+ return new Date(date.year, date.month - 1, date.day, 12);
6478
+ }
6479
+ function dateRangeToJsDateRange(range) {
6480
+ if (!range) return void 0;
6481
+ return {
6482
+ from: range.from ? plainDateToJsDate(range.from) : void 0,
6483
+ to: range.to ? plainDateToJsDate(range.to) : void 0
6484
+ };
6485
+ }
6486
+ function jsDateRangeToDateRange(range) {
6487
+ if (!range) return void 0;
6488
+ return {
6489
+ from: range.from ? jsDateToPlainDate(range.from) : void 0,
6490
+ to: range.to ? jsDateToPlainDate(range.to) : void 0
6491
+ };
6492
+ }
6493
+ function dateMatcherToDayPickerMatcher(matcher) {
6494
+ if (typeof matcher === "function") {
6495
+ return function dayPickerMatcher(date) {
6496
+ return matcher(jsDateToPlainDate(date));
6497
+ };
6498
+ }
6499
+ if (Array.isArray(matcher)) {
6500
+ return matcher.map(plainDateToJsDate);
6501
+ }
6502
+ if (isPlainDate(matcher)) {
6503
+ return plainDateToJsDate(matcher);
6504
+ }
6505
+ return {
6506
+ from: matcher.from ? plainDateToJsDate(matcher.from) : void 0,
6507
+ to: matcher.to ? plainDateToJsDate(matcher.to) : void 0
6508
+ };
6509
+ }
6510
+ function dateMatchersToDayPickerMatchers(matchers) {
6511
+ if (matchers === void 0) return void 0;
6512
+ return Array.isArray(matchers) ? matchers.map(dateMatcherToDayPickerMatcher) : dateMatcherToDayPickerMatcher(matchers);
6513
+ }
6514
+
6352
6515
  // src/components/internal/DatePicker/Day.tsx
6353
6516
  var import_react21 = require("react");
6354
6517
  var import_react_day_picker = require("react-day-picker");
@@ -6490,11 +6653,12 @@ function Header(props) {
6490
6653
  const {
6491
6654
  displayMonth
6492
6655
  } = props;
6656
+ const displayMonthDate = jsDateToPlainDate(displayMonth);
6493
6657
  const {
6494
6658
  goToMonth
6495
6659
  } = (0, import_react_day_picker2.useNavigation)();
6496
6660
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "df jcsb aic ml_12px mr_2px h_32px", children: [
6497
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "fw4 fz_16px lh_24px", children: (0, import_date_fns.format)(displayMonth, "MMMM yyyy") }),
6661
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "fw4 fz_16px lh_24px", children: formatPlainDate(displayMonthDate, "monthYear") }),
6498
6662
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
6499
6663
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton, { color: "rgba(100, 100, 100, 1)" /* Gray700 */, icon: "chevronLeft", onClick: () => goToMonth((0, import_date_fns.addMonths)(displayMonth, -1)) }),
6500
6664
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton, { color: "rgba(100, 100, 100, 1)" /* Gray700 */, icon: "chevronRight", onClick: () => goToMonth((0, import_date_fns.addMonths)(displayMonth, 1)) })
@@ -6505,36 +6669,41 @@ function YearSkipHeader(props) {
6505
6669
  const {
6506
6670
  displayMonth
6507
6671
  } = props;
6672
+ const displayMonthDate = jsDateToPlainDate(displayMonth);
6508
6673
  const {
6509
6674
  goToMonth
6510
6675
  } = (0, import_react_day_picker2.useNavigation)();
6511
6676
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "df jcsb aic ml_12px mr_12px h_32px", children: [
6512
6677
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "df fdr jcsb", children: [
6513
6678
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton, { color: "rgba(100, 100, 100, 1)" /* Gray700 */, icon: "chevronLeft", onClick: () => goToMonth((0, import_date_fns.addMonths)(displayMonth, -1)) }),
6514
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "fw4 fz_16px lh_24px", children: (0, import_date_fns.format)(displayMonth, "MMM") }),
6679
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "fw4 fz_16px lh_24px", children: formatPlainDate(displayMonthDate, "shortMonth") }),
6515
6680
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton, { color: "rgba(100, 100, 100, 1)" /* Gray700 */, icon: "chevronRight", onClick: () => goToMonth((0, import_date_fns.addMonths)(displayMonth, 1)) })
6516
6681
  ] }),
6517
6682
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "df fdr jcsb", children: [
6518
6683
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton, { color: "rgba(100, 100, 100, 1)" /* Gray700 */, icon: "chevronLeft", onClick: () => goToMonth((0, import_date_fns.addYears)(displayMonth, -1)) }),
6519
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "fw4 fz_16px lh_24px", children: (0, import_date_fns.format)(displayMonth, "yyyy") }),
6684
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "fw4 fz_16px lh_24px", children: formatPlainDate(displayMonthDate, "year") }),
6520
6685
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconButton, { color: "rgba(100, 100, 100, 1)" /* Gray700 */, icon: "chevronRight", onClick: () => goToMonth((0, import_date_fns.addYears)(displayMonth, 1)) })
6521
6686
  ] })
6522
6687
  ] });
6523
6688
  }
6524
6689
 
6525
6690
  // src/components/internal/DatePicker/WeekHeader.tsx
6526
- var import_date_fns2 = require("date-fns");
6527
6691
  var import_jsx_runtime18 = require("react/jsx-runtime");
6528
6692
  function WeekHeader() {
6529
- const start = (0, import_date_fns2.startOfWeek)(/* @__PURE__ */ new Date());
6693
+ const today = todayPlainDate();
6694
+ const start = today.subtract({
6695
+ days: today.dayOfWeek % 7
6696
+ });
6530
6697
  const days = [];
6531
6698
  for (let i = 0; i < 7; i++) {
6532
- days.push((0, import_date_fns2.addDays)(start, i));
6699
+ days.push(start.add({
6700
+ days: i
6701
+ }));
6533
6702
  }
6534
6703
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { className: "rdp-head", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { className: "rdp-head_row", children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("th", { scope: "col", className: "pt1 pb_12px pr1 pl1 fw4 fz_12px lh_16px gray400", children: [
6535
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "aria-hidden": "true", children: (0, import_date_fns2.format)(day, "EEEEE") }),
6536
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "rdp-vhidden", children: (0, import_date_fns2.format)(day, "EEEE") })
6537
- ] }, (0, import_date_fns2.format)(day, "EEEE"))) }) });
6704
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { "aria-hidden": "true", children: formatPlainDate(day, "weekdayInitial") }),
6705
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "rdp-vhidden", children: formatPlainDate(day, "weekday") })
6706
+ ] }, formatPlainDate(day, "weekday"))) }) });
6538
6707
  }
6539
6708
 
6540
6709
  // src/components/internal/DatePicker/DatePicker.tsx
@@ -6556,15 +6725,15 @@ function DatePicker(props) {
6556
6725
  Head: WeekHeader,
6557
6726
  Day
6558
6727
  },
6559
- selected: value ? [value] : [],
6560
- defaultMonth: value ?? /* @__PURE__ */ new Date(),
6728
+ selected: value ? [plainDateToJsDate(value)] : [],
6729
+ defaultMonth: plainDateToJsDate(value ?? todayPlainDate()),
6561
6730
  onDayClick: (day, modifiers) => {
6562
6731
  if (modifiers.disabled) return;
6563
- onSelect(day);
6732
+ onSelect(jsDateToPlainDate(day));
6564
6733
  },
6565
- disabled: disabledDays,
6734
+ disabled: dateMatchersToDayPickerMatchers(disabledDays),
6566
6735
  modifiers: {
6567
- indicatorDot: dottedDays ?? []
6736
+ indicatorDot: dateMatchersToDayPickerMatchers(dottedDays) ?? []
6568
6737
  }
6569
6738
  }
6570
6739
  ) });
@@ -6591,15 +6760,15 @@ function DateRangePicker(props) {
6591
6760
  useYearPicker
6592
6761
  } = props;
6593
6762
  const tid = useTestIds(props, "datePicker");
6594
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "dib bgWhite fw4 fz_12px lh_16px", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_day_picker4.DayPicker, { mode: "range", selected: range, components: {
6763
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "dib bgWhite fw4 fz_12px lh_16px", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_day_picker4.DayPicker, { mode: "range", selected: dateRangeToJsDateRange(range), components: {
6595
6764
  Caption: useYearPicker ? YearSkipHeader : Header,
6596
6765
  Head: WeekHeader,
6597
6766
  Day
6598
- }, defaultMonth: range?.to ?? /* @__PURE__ */ new Date(), onSelect: (selection, day, activeModifiers) => {
6767
+ }, defaultMonth: plainDateToJsDate(range?.to ?? range?.from ?? todayPlainDate()), onSelect: (selection, day, activeModifiers) => {
6599
6768
  if (activeModifiers.disabled) return;
6600
- onSelect(selection);
6601
- }, disabled: disabledDays, modifiers: {
6602
- indicatorDot: dottedDays ?? []
6769
+ onSelect(jsDateRangeToDateRange(selection));
6770
+ }, disabled: dateMatchersToDayPickerMatchers(disabledDays), modifiers: {
6771
+ indicatorDot: dateMatchersToDayPickerMatchers(dottedDays) ?? []
6603
6772
  } }) });
6604
6773
  }
6605
6774
 
@@ -12423,69 +12592,37 @@ function CheckboxGroupItem(props) {
12423
12592
  }
12424
12593
 
12425
12594
  // src/inputs/DateFields/DateField.mock.tsx
12426
- var import_date_fns3 = require("date-fns");
12427
12595
  var import_react50 = require("react");
12428
- var import_jsx_runtime60 = require("react/jsx-runtime");
12429
- function DateFieldMock(props) {
12430
- const { onChange = () => {
12431
- }, errorMsg, onBlur, onFocus } = props;
12432
- const [value, setValue] = (0, import_react50.useState)(props.value ? (0, import_date_fns3.format)(props.value, "MM/dd/yy") : "");
12433
- const tid = useTestIds(props, "date");
12434
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12435
- "input",
12436
- {
12437
- ...tid,
12438
- "data-error": !!errorMsg,
12439
- value,
12440
- onChange: (e) => {
12441
- const { value: value2 } = e.target;
12442
- setValue(value2);
12443
- onChange((0, import_date_fns3.parse)(value2, "MM/dd/yy", /* @__PURE__ */ new Date()));
12444
- },
12445
- onBlur: () => maybeCall(onBlur),
12446
- onFocus: () => maybeCall(onFocus),
12447
- disabled: !!props.disabled,
12448
- readOnly: !!props.readOnly,
12449
- "data-disabled-days": JSON.stringify(props.disabledDays)
12450
- }
12451
- );
12452
- }
12453
-
12454
- // src/inputs/DateFields/DateFieldBase.tsx
12455
- var import_react51 = require("react");
12456
- var import_react_aria31 = require("react-aria");
12457
- var import_react_day_picker5 = require("react-day-picker");
12458
- var import_react_stately10 = require("react-stately");
12459
12596
 
12460
12597
  // src/inputs/DateFields/utils.ts
12461
- var import_date_fns4 = require("date-fns");
12598
+ var import_temporal_polyfill2 = require("temporal-polyfill");
12462
12599
  var dateFormats = {
12463
- short: "MM/dd/yy",
12464
- medium: "EEE, MMM d",
12465
- long: "EEEE LLLL d, uuuu"
12600
+ short: "shortDate",
12601
+ medium: "shortWeekdayMonthDay",
12602
+ long: "longWeekdayMonthDayYear"
12466
12603
  };
12467
- function getDateFormat(format4) {
12468
- return format4 ? dateFormats[format4] : dateFormats.short;
12604
+ function getDateFormat(format) {
12605
+ return format ? dateFormats[format] : dateFormats.short;
12469
12606
  }
12470
- function formatDate(date, format4) {
12607
+ function formatDate(date, format) {
12471
12608
  if (!date) return "";
12472
- return (0, import_date_fns4.format)(date, format4);
12609
+ return formatPlainDate(date, format);
12473
12610
  }
12474
- function formatDateRange(date, format4) {
12611
+ function formatDateRange(date, format) {
12475
12612
  if (!date) return "";
12476
12613
  const { from, to } = date;
12477
- const fromFormatted = from ? (0, import_date_fns4.format)(from, format4) : "";
12478
- const toFormatted = to ? (0, import_date_fns4.format)(to, format4) : "";
12614
+ const fromFormatted = from ? formatPlainDate(from, format) : "";
12615
+ const toFormatted = to ? formatPlainDate(to, format) : "";
12479
12616
  return !fromFormatted && !toFormatted ? void 0 : `${fromFormatted} - ${toFormatted}`;
12480
12617
  }
12481
- function parseDate(str, format4) {
12482
- return parseDateString(str, format4);
12618
+ function parseDate(str, format) {
12619
+ return parseDateString(str, format);
12483
12620
  }
12484
- function parseDateRange(str, format4) {
12621
+ function parseDateRange(str, format) {
12485
12622
  const [from = "", to = ""] = str.split("-");
12486
- const fromDate = parseDateString(from.trim(), format4);
12487
- const toDate = parseDateString(to.trim(), format4);
12488
- if (toDate && fromDate && toDate < fromDate) {
12623
+ const fromDate = parseDateString(from.trim(), format);
12624
+ const toDate = parseDateString(to.trim(), format);
12625
+ if (toDate && fromDate && import_temporal_polyfill2.Temporal.PlainDate.compare(toDate, fromDate) < 0) {
12489
12626
  return { from: toDate, to: fromDate };
12490
12627
  }
12491
12628
  if (toDate === void 0 && fromDate === void 0) {
@@ -12493,31 +12630,81 @@ function parseDateRange(str, format4) {
12493
12630
  }
12494
12631
  return { from: fromDate, to: toDate };
12495
12632
  }
12496
- function parseDateString(str, format4) {
12633
+ function parseDateString(str, format) {
12634
+ if (format !== dateFormats.short && format !== "date") {
12635
+ return void 0;
12636
+ }
12497
12637
  const split = str.split("/");
12498
12638
  if (split.length !== 3) {
12499
12639
  return void 0;
12500
12640
  }
12501
- if (split[2].length !== 2) {
12641
+ const yearLength = format === dateFormats.short ? 2 : 4;
12642
+ if (split[2].length !== yearLength) {
12502
12643
  return void 0;
12503
12644
  }
12504
- const month = parseInt(split[0], 10) - 1;
12645
+ const month = parseInt(split[0], 10);
12505
12646
  const day = parseInt(split[1], 10);
12506
12647
  const year = parseInt(split[2], 10);
12507
- if (isNaN(year) || String(year).length > 4 || isNaN(month) || isNaN(day) || day <= 0 || day > 31 || month < 0 || month >= 12) {
12648
+ if (Number.isNaN(year) || Number.isNaN(month) || Number.isNaN(day) || day <= 0 || day > 31 || month <= 0 || month > 12) {
12508
12649
  return void 0;
12509
12650
  }
12510
- const parsed = (0, import_date_fns4.parse)(str, format4, /* @__PURE__ */ new Date());
12511
- if (!isValidDate(parsed)) {
12651
+ try {
12652
+ return import_temporal_polyfill2.Temporal.PlainDate.from({
12653
+ year: yearLength === 2 ? normalizeTwoDigitYear(year, todayPlainDate().year) : year,
12654
+ month,
12655
+ day
12656
+ });
12657
+ } catch {
12512
12658
  return void 0;
12513
12659
  }
12514
- return parsed;
12515
12660
  }
12516
12661
  function isValidDate(d) {
12517
- return d !== void 0 && (0, import_date_fns4.isDate)(d) && d.toString() !== "Invalid Date";
12662
+ return d !== void 0 && isPlainDate(d);
12663
+ }
12664
+ function normalizeTwoDigitYear(twoDigitYear, currentYear) {
12665
+ const isCommonEra = currentYear > 0;
12666
+ const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;
12667
+ if (absCurrentYear <= 50) {
12668
+ return isCommonEra ? twoDigitYear || 100 : 1 - (twoDigitYear || 100);
12669
+ }
12670
+ const rangeEnd = absCurrentYear + 50;
12671
+ const rangeEndCentury = Math.floor(rangeEnd / 100) * 100;
12672
+ const isPreviousCentury = twoDigitYear >= rangeEnd % 100;
12673
+ const normalizedYear = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);
12674
+ return isCommonEra ? normalizedYear : 1 - normalizedYear;
12675
+ }
12676
+
12677
+ // src/inputs/DateFields/DateField.mock.tsx
12678
+ var import_jsx_runtime60 = require("react/jsx-runtime");
12679
+ function DateFieldMock(props) {
12680
+ const { onChange = () => {
12681
+ }, errorMsg, onBlur, onFocus } = props;
12682
+ const [value, setValue] = (0, import_react50.useState)(formatDate(props.value, dateFormats.short));
12683
+ const tid = useTestIds(props, "date");
12684
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12685
+ "input",
12686
+ {
12687
+ ...tid,
12688
+ "data-error": !!errorMsg,
12689
+ value,
12690
+ onChange: (e) => {
12691
+ const { value: value2 } = e.target;
12692
+ setValue(value2);
12693
+ onChange(parseDate(value2, dateFormats.short));
12694
+ },
12695
+ onBlur: () => maybeCall(onBlur),
12696
+ onFocus: () => maybeCall(onFocus),
12697
+ disabled: !!props.disabled,
12698
+ readOnly: !!props.readOnly,
12699
+ "data-disabled-days": JSON.stringify(props.disabledDays)
12700
+ }
12701
+ );
12518
12702
  }
12519
12703
 
12520
12704
  // src/inputs/DateFields/DateFieldBase.tsx
12705
+ var import_react51 = require("react");
12706
+ var import_react_aria31 = require("react-aria");
12707
+ var import_react_stately10 = require("react-stately");
12521
12708
  var import_runtime43 = require("@homebound/truss/runtime");
12522
12709
  var import_jsx_runtime61 = require("react/jsx-runtime");
12523
12710
  function DateFieldBase(props) {
@@ -12533,7 +12720,7 @@ function DateFieldBase(props) {
12533
12720
  errorMsg,
12534
12721
  helperText,
12535
12722
  readOnly,
12536
- format: format4 = "short",
12723
+ format = "short",
12537
12724
  iconLeft = false,
12538
12725
  hideCalendarIcon = false,
12539
12726
  disabledDays,
@@ -12550,7 +12737,7 @@ function DateFieldBase(props) {
12550
12737
  const buttonRef = (0, import_react51.useRef)(null);
12551
12738
  const overlayRef = (0, import_react51.useRef)(null);
12552
12739
  const isFocused = (0, import_react51.useRef)(false);
12553
- const dateFormat = getDateFormat(format4);
12740
+ const dateFormat = getDateFormat(format);
12554
12741
  const [wipValue, setWipValue] = (0, import_react51.useState)(value);
12555
12742
  const [inputValue, setInputValue] = (0, import_react51.useState)((isRangeMode ? formatDateRange(props.value, dateFormat) : formatDate(props.value, dateFormat)) ?? "");
12556
12743
  const tid = useTestIds(props, defaultTestId(label));
@@ -12639,16 +12826,20 @@ function DateFieldBase(props) {
12639
12826
  (d) => {
12640
12827
  setWipValue(d);
12641
12828
  if (d && isParsedDateValid(d)) {
12642
- if (isRangeMode && (0, import_react_day_picker5.isDateRange)(d)) {
12829
+ if (isRangeMode && isDateRangeValue(d)) {
12643
12830
  props.onChange(d);
12644
12831
  return;
12645
12832
  }
12646
- if (!isRangeMode && !(0, import_react_day_picker5.isDateRange)(d)) {
12833
+ if (!isRangeMode && !isDateRangeValue(d)) {
12647
12834
  props.onChange(d);
12648
12835
  return;
12649
12836
  }
12650
12837
  } else {
12651
- props.onChange(void 0);
12838
+ if (isRangeMode) {
12839
+ props.onChange(void 0);
12840
+ } else {
12841
+ props.onChange(void 0);
12842
+ }
12652
12843
  return;
12653
12844
  }
12654
12845
  },
@@ -12656,7 +12847,7 @@ function DateFieldBase(props) {
12656
12847
  // eslint-disable-next-line react-hooks/exhaustive-deps
12657
12848
  [isRangeMode, props.onChange]
12658
12849
  );
12659
- const inputSize = !isRangeMode ? format4 === "short" ? 8 : format4 === "medium" ? 10 : void 0 : void 0;
12850
+ const inputSize = !isRangeMode ? format === "short" ? 8 : format === "medium" ? 10 : void 0 : void 0;
12660
12851
  const clearButton = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: inputValue !== "" && !state.isOpen && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(IconButton, { icon: "xCircle", color: "rgba(100, 100, 100, 1)" /* Gray700 */, onClick: () => {
12661
12852
  setInputValue("");
12662
12853
  onChange(void 0);
@@ -12718,7 +12909,10 @@ function DateFieldBase(props) {
12718
12909
  ] });
12719
12910
  }
12720
12911
  function isParsedDateValid(d) {
12721
- return d !== void 0 && (!(0, import_react_day_picker5.isDateRange)(d) || (0, import_react_day_picker5.isDateRange)(d) && isValidDate(d.from) && isValidDate(d.to));
12912
+ return d !== void 0 && (!isDateRangeValue(d) || isValidDate(d.from) && isValidDate(d.to));
12913
+ }
12914
+ function isDateRangeValue(value) {
12915
+ return typeof value === "object" && value !== null && ("from" in value || "to" in value);
12722
12916
  }
12723
12917
 
12724
12918
  // src/utils/withTestMock.tsx
@@ -15235,7 +15429,7 @@ function useScrollStorage(tableId, enabled = true) {
15235
15429
  }
15236
15430
 
15237
15431
  // src/components/Table/hooks/useSetupColumnSizes.ts
15238
- var import_utils66 = require("@react-aria/utils");
15432
+ var import_utils67 = require("@react-aria/utils");
15239
15433
  var import_react70 = require("react");
15240
15434
 
15241
15435
  // src/components/Table/hooks/useColumnResizing.ts
@@ -15359,7 +15553,7 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
15359
15553
  // eslint-disable-next-line react-hooks/exhaustive-deps
15360
15554
  [tableWidth, setTableAndColumnWidths, setTableAndColumnWidthsDebounced]
15361
15555
  );
15362
- (0, import_utils66.useResizeObserver)({ ref: resizeRef, onResize });
15556
+ (0, import_utils67.useResizeObserver)({ ref: resizeRef, onResize });
15363
15557
  return { columnSizes, tableWidth, resizedWidths, setResizedWidth, setResizedWidths, resetColumnWidths };
15364
15558
  }
15365
15559
 
@@ -15952,7 +16146,7 @@ function ToggleChips(props) {
15952
16146
  }
15953
16147
 
15954
16148
  // src/components/Accordion.tsx
15955
- var import_utils69 = require("@react-aria/utils");
16149
+ var import_utils70 = require("@react-aria/utils");
15956
16150
  var import_react73 = require("react");
15957
16151
  var import_react_aria40 = require("react-aria");
15958
16152
  var import_runtime54 = require("@homebound/truss/runtime");
@@ -15978,7 +16172,7 @@ function Accordion(props) {
15978
16172
  xss
15979
16173
  } = props;
15980
16174
  const tid = useTestIds(props, "accordion");
15981
- const id = (0, import_utils69.useId)();
16175
+ const id = (0, import_utils70.useId)();
15982
16176
  const [expanded, setExpanded] = (0, import_react73.useState)(defaultExpanded && !disabled);
15983
16177
  const {
15984
16178
  isFocusVisible,
@@ -16000,7 +16194,7 @@ function Accordion(props) {
16000
16194
  setContentHeight(`${contentEl.scrollHeight}px`);
16001
16195
  }
16002
16196
  }, [expanded, contentEl, setContentHeight]);
16003
- (0, import_utils69.useResizeObserver)({
16197
+ (0, import_utils70.useResizeObserver)({
16004
16198
  ref: contentRef,
16005
16199
  onResize
16006
16200
  });
@@ -16291,7 +16485,7 @@ var import_react102 = require("react");
16291
16485
  var import_react_aria46 = require("react-aria");
16292
16486
 
16293
16487
  // src/components/Modal/Modal.tsx
16294
- var import_utils73 = require("@react-aria/utils");
16488
+ var import_utils74 = require("@react-aria/utils");
16295
16489
  var import_react78 = require("react");
16296
16490
  var import_react_aria41 = require("react-aria");
16297
16491
  var import_react_dom3 = require("react-dom");
@@ -16414,7 +16608,7 @@ function Modal(props) {
16414
16608
  };
16415
16609
  }
16416
16610
  const [hasScroll, setHasScroll] = (0, import_react78.useState)(forceScrolling ?? false);
16417
- (0, import_utils73.useResizeObserver)({
16611
+ (0, import_utils74.useResizeObserver)({
16418
16612
  ref: modalBodyRef,
16419
16613
  onResize: (0, import_react78.useCallback)(
16420
16614
  () => {
@@ -18054,7 +18248,7 @@ function FormHeading(props) {
18054
18248
  FormHeading.isFormHeading = true;
18055
18249
 
18056
18250
  // src/forms/StaticField.tsx
18057
- var import_utils101 = require("@react-aria/utils");
18251
+ var import_utils102 = require("@react-aria/utils");
18058
18252
  var import_runtime65 = require("@homebound/truss/runtime");
18059
18253
  var import_jsx_runtime118 = require("react/jsx-runtime");
18060
18254
  function StaticField(props) {
@@ -18068,7 +18262,7 @@ function StaticField(props) {
18068
18262
  children
18069
18263
  } = props;
18070
18264
  const tid = useTestIds(props, typeof label === "string" ? defaultTestId(label) : "staticField");
18071
- const id = (0, import_utils101.useId)();
18265
+ const id = (0, import_utils102.useId)();
18072
18266
  return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { ...(0, import_runtime65.trussProps)({
18073
18267
  ...labelStyle === "left" ? {
18074
18268
  display: "df",
@@ -18752,8 +18946,16 @@ function dateFilter(props) {
18752
18946
  }
18753
18947
  var anyOption = {};
18754
18948
  var DateFilter = class extends BaseFilter {
18949
+ hydrate(value) {
18950
+ if (!isDateFilterValue(value)) return void 0;
18951
+ const hydratedValue = parsePersistedPlainDate(value.value);
18952
+ return hydratedValue ? { op: value.op, value: hydratedValue } : void 0;
18953
+ }
18954
+ dehydrate(value) {
18955
+ return value ? { op: value.op, value: dehydratePlainDate(value.value) } : void 0;
18956
+ }
18755
18957
  render(value, setValue, tid, inModal, vertical) {
18756
- const { label, operations, getOperationValue, getOperationLabel } = this.props;
18958
+ const { label, operations, getOperationValue, getOperationLabel, defaultValue } = this.props;
18757
18959
  return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
18758
18960
  vertical && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Label, { label }),
18759
18961
  /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(CompoundField, { children: [
@@ -18770,8 +18972,8 @@ var DateFilter = class extends BaseFilter {
18770
18972
  getOptionLabel: (o) => o === anyOption ? "Any" : getOperationLabel(o),
18771
18973
  value: value?.op,
18772
18974
  onSelect: (op) => (
18773
- // default the selected date to today if it doesn't exist in the filter's value
18774
- setValue(op ? { op, value: value?.value ? new Date(value.value) : /* @__PURE__ */ new Date() } : void 0)
18975
+ // default the selected date to the filter's default date or today if it doesn't exist in the filter's value
18976
+ setValue(op ? { op, value: value?.value ?? defaultValue?.value ?? todayPlainDate() } : void 0)
18775
18977
  ),
18776
18978
  label: inModal ? `${label} date filter operation` : label,
18777
18979
  labelStyle: !inModal && !vertical ? "inline" : inModal || vertical ? "hidden" : "above",
@@ -18783,9 +18985,13 @@ var DateFilter = class extends BaseFilter {
18783
18985
  DateField,
18784
18986
  {
18785
18987
  labelStyle: "inline",
18786
- value: value?.value ? new Date(value.value) : /* @__PURE__ */ new Date(),
18988
+ value: value?.value ?? defaultValue?.value ?? todayPlainDate(),
18787
18989
  label: "Date",
18788
- onChange: (d) => setValue({ ...value, value: d }),
18990
+ onChange: (d) => {
18991
+ if (d && value) {
18992
+ setValue({ ...value, value: d });
18993
+ }
18994
+ },
18789
18995
  disabled: !value,
18790
18996
  ...tid[`${defaultTestId(this.label)}_dateField`]
18791
18997
  }
@@ -18794,6 +19000,9 @@ var DateFilter = class extends BaseFilter {
18794
19000
  ] });
18795
19001
  }
18796
19002
  };
19003
+ function isDateFilterValue(value) {
19004
+ return typeof value === "object" && value !== null && "op" in value && "value" in value;
19005
+ }
18797
19006
 
18798
19007
  // src/components/Filters/DateRangeFilter.tsx
18799
19008
  var import_jsx_runtime128 = require("react/jsx-runtime");
@@ -18801,6 +19010,17 @@ function dateRangeFilter(props) {
18801
19010
  return (key) => new DateRangeFilter(key, props);
18802
19011
  }
18803
19012
  var DateRangeFilter = class extends BaseFilter {
19013
+ hydrate(value) {
19014
+ if (!isDateRangeFilterValue(value)) return void 0;
19015
+ const hydratedValue = hydrateDateRange(value.value);
19016
+ return hydratedValue ? { op: value.op, value: hydratedValue } : void 0;
19017
+ }
19018
+ dehydrate(value) {
19019
+ return value ? {
19020
+ op: value.op,
19021
+ value: value.value ? { from: dehydratePlainDate(value.value.from), to: dehydratePlainDate(value.value.to) } : void 0
19022
+ } : void 0;
19023
+ }
18804
19024
  render(value, setValue, tid, inModal, vertical) {
18805
19025
  const { label, placeholderText, disabledDays, testFieldLabel, defaultValue } = this.props;
18806
19026
  return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
@@ -18812,8 +19032,17 @@ var DateRangeFilter = class extends BaseFilter {
18812
19032
  isRangeFilterField: true,
18813
19033
  placeholder: placeholderText,
18814
19034
  label: testFieldLabel ?? "Date",
18815
- value: value?.value ? { from: new Date(value.value.from), to: new Date(value.value.to) } : void 0,
18816
- onChange: (d) => d ? setValue({ op: defaultValue?.op, value: d }) : setValue(void 0),
19035
+ value: value?.value,
19036
+ onChange: (d) => {
19037
+ if (!d) {
19038
+ setValue(void 0);
19039
+ return;
19040
+ }
19041
+ const op = value?.op ?? defaultValue?.op;
19042
+ if (op !== void 0) {
19043
+ setValue({ op, value: d });
19044
+ }
19045
+ },
18817
19046
  disabledDays,
18818
19047
  ...tid[`${defaultTestId(this.label)}_dateField`]
18819
19048
  }
@@ -18821,6 +19050,17 @@ var DateRangeFilter = class extends BaseFilter {
18821
19050
  ] });
18822
19051
  }
18823
19052
  };
19053
+ function isDateRangeFilterValue(value) {
19054
+ return typeof value === "object" && value !== null && "op" in value && "value" in value;
19055
+ }
19056
+ function hydrateDateRange(value) {
19057
+ if (typeof value !== "object" || value === null) return void 0;
19058
+ const { from, to } = value;
19059
+ const hydratedFrom = parsePersistedPlainDate(from);
19060
+ const hydratedTo = parsePersistedPlainDate(to);
19061
+ if (hydratedFrom === void 0 && hydratedTo === void 0) return void 0;
19062
+ return { from: hydratedFrom, to: hydratedTo };
19063
+ }
18824
19064
 
18825
19065
  // src/components/Filters/MultiFilter.tsx
18826
19066
  var import_jsx_runtime129 = require("react/jsx-runtime");
@@ -19626,10 +19866,10 @@ function useGridTableLayoutState({
19626
19866
  });
19627
19867
  (0, import_react99.useEffect)(() => {
19628
19868
  if (page.limit !== persistedPageSize) setPersistedPageSize(page.limit);
19629
- setPage((prev) => ({
19869
+ setPage((prev) => prev.offset === 0 ? prev : {
19630
19870
  ...prev,
19631
19871
  offset: 0
19632
- }));
19872
+ });
19633
19873
  }, [page.limit, persistedPageSize, setPersistedPageSize, filter, searchString]);
19634
19874
  return {
19635
19875
  filter,
@@ -20144,7 +20384,7 @@ var import_react106 = require("react");
20144
20384
  var import_react_aria49 = require("react-aria");
20145
20385
 
20146
20386
  // src/components/Tag.tsx
20147
- var import_utils118 = require("@react-aria/utils");
20387
+ var import_utils119 = require("@react-aria/utils");
20148
20388
  var import_react105 = require("react");
20149
20389
  var import_runtime78 = require("@homebound/truss/runtime");
20150
20390
  var import_jsx_runtime152 = require("react/jsx-runtime");
@@ -20160,7 +20400,7 @@ function Tag(props) {
20160
20400
  const tid = useTestIds(otherProps);
20161
20401
  const [showTooltip, setShowTooltip] = (0, import_react105.useState)(false);
20162
20402
  const ref = (0, import_react105.useRef)(null);
20163
- (0, import_utils118.useResizeObserver)({
20403
+ (0, import_utils119.useResizeObserver)({
20164
20404
  ref,
20165
20405
  onResize: () => {
20166
20406
  if (ref.current) {
@@ -20857,7 +21097,7 @@ function HbSpinnerProvider({
20857
21097
  }
20858
21098
 
20859
21099
  // src/components/MaxLines.tsx
20860
- var import_utils126 = require("@react-aria/utils");
21100
+ var import_utils127 = require("@react-aria/utils");
20861
21101
  var import_react115 = require("react");
20862
21102
  var import_runtime85 = require("@homebound/truss/runtime");
20863
21103
  var import_jsx_runtime160 = require("react/jsx-runtime");
@@ -20868,7 +21108,7 @@ function MaxLines({
20868
21108
  const elRef = (0, import_react115.useRef)(null);
20869
21109
  const [hasMore, setHasMore] = (0, import_react115.useState)(false);
20870
21110
  const [expanded, setExpanded] = (0, import_react115.useState)(false);
20871
- (0, import_utils126.useLayoutEffect)(() => {
21111
+ (0, import_utils127.useLayoutEffect)(() => {
20872
21112
  if (!elRef.current) return;
20873
21113
  setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
20874
21114
  }, []);
@@ -20879,7 +21119,7 @@ function MaxLines({
20879
21119
  if (!elRef.current) return;
20880
21120
  !expanded && setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
20881
21121
  }, [expanded]);
20882
- (0, import_utils126.useResizeObserver)({
21122
+ (0, import_utils127.useResizeObserver)({
20883
21123
  ref: elRef,
20884
21124
  onResize
20885
21125
  });
@@ -20900,7 +21140,7 @@ function MaxLines({
20900
21140
  }
20901
21141
 
20902
21142
  // src/components/ScrollShadows.tsx
20903
- var import_utils127 = require("@react-aria/utils");
21143
+ var import_utils128 = require("@react-aria/utils");
20904
21144
  var import_react116 = require("react");
20905
21145
  var import_runtime86 = require("@homebound/truss/runtime");
20906
21146
  var import_jsx_runtime161 = require("react/jsx-runtime");
@@ -20987,7 +21227,7 @@ function ScrollShadows(props) {
20987
21227
  setShowEndShadow(start + boxSize < end);
20988
21228
  }, [horizontal]);
20989
21229
  const onResize = (0, import_react116.useCallback)(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
20990
- (0, import_utils127.useResizeObserver)({
21230
+ (0, import_utils128.useResizeObserver)({
20991
21231
  ref: scrollRef,
20992
21232
  onResize
20993
21233
  });
@@ -22024,6 +22264,7 @@ function useToast() {
22024
22264
  filterTestIdPrefix,
22025
22265
  formatDate,
22026
22266
  formatDateRange,
22267
+ formatPlainDate,
22027
22268
  formatValue,
22028
22269
  generateColumnId,
22029
22270
  getAlignment,