schummar-table 0.51.0 → 0.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -11,6 +11,8 @@ let __emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
11
11
  __emotion_react_jsx_runtime = require_chunk.__toESM(__emotion_react_jsx_runtime);
12
12
  let nanoid = require("nanoid");
13
13
  nanoid = require_chunk.__toESM(nanoid);
14
+ let temporal_polyfill = require("temporal-polyfill");
15
+ temporal_polyfill = require_chunk.__toESM(temporal_polyfill);
14
16
  let date_fns = require("date-fns");
15
17
  date_fns = require_chunk.__toESM(date_fns);
16
18
 
@@ -925,6 +927,16 @@ function CombinedFilter({ columnIds: inputColumnIds,...props }) {
925
927
  }, columnId)) });
926
928
  }
927
929
 
930
+ //#endregion
931
+ //#region src/misc/defaults.ts
932
+ function defaults(first, ...more) {
933
+ return more.reduce((acc, source) => {
934
+ const copy = { ...acc };
935
+ for (const [key, value] of Object.entries(source)) copy[key] ??= value;
936
+ return copy;
937
+ }, first);
938
+ }
939
+
928
940
  //#endregion
929
941
  //#region src/vendor/dayzed/utils.ts
930
942
  /**
@@ -1349,16 +1361,6 @@ function useDayzed({ date = /* @__PURE__ */ new Date(), maxDate, minDate, months
1349
1361
  };
1350
1362
  }
1351
1363
 
1352
- //#endregion
1353
- //#region src/misc/defaults.ts
1354
- function defaults(first, ...more) {
1355
- return more.reduce((acc, source) => {
1356
- const copy = { ...acc };
1357
- for (const [key, value] of Object.entries(source)) copy[key] ??= value;
1358
- return copy;
1359
- }, first);
1360
- }
1361
-
1362
1364
  //#endregion
1363
1365
  //#region src/hooks/useLatestRef.ts
1364
1366
  function useLatestRef(value) {
@@ -1630,15 +1632,9 @@ const thisYear = (delta = 0) => {
1630
1632
  max: endOfDay(max)
1631
1633
  };
1632
1634
  };
1633
- const MS_PER_DAY = 1e3 * 60 * 60 * 24;
1634
1635
  const getCalendarWeek = (date) => {
1635
- const endOfWeek = new Date(date.getFullYear(), date.getMonth(), date.getDate() + (7 - (date.getDay() || 7)));
1636
- const year = endOfWeek.getFullYear();
1637
- const firstDayOfYear = new Date(year, 0, 1);
1638
- const dayOfYear = Math.floor((endOfWeek.getTime() - firstDayOfYear.getTime() + (endOfWeek.getTimezoneOffset() - firstDayOfYear.getTimezoneOffset())) / MS_PER_DAY) + 1;
1639
- const weekOfYear = Math.floor((3 + dayOfYear) / 7);
1640
- if (weekOfYear === 0) return getCalendarWeek(new Date(endOfWeek.getFullYear(), endOfWeek.getMonth(), endOfWeek.getDate() - 7)) + 1;
1641
- return weekOfYear;
1636
+ const tz = temporal_polyfill.Temporal.Now.timeZoneId();
1637
+ return temporal_polyfill.Temporal.Instant.fromEpochMilliseconds(date.getTime()).toZonedDateTimeISO(tz).weekOfYear ?? 0;
1642
1638
  };
1643
1639
  const commonQuickOptions = {
1644
1640
  today: {