@servicetitan/anvil2 2.0.3 → 2.0.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @servicetitan/anvil2
2
2
 
3
+ ## 2.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1971](https://github.com/servicetitan/hammer/pull/1971) [`c1546dc`](https://github.com/servicetitan/hammer/commit/c1546dc569207a73b610719fe027fb4e187b42e4) Thanks [@AdamLantz](https://github.com/AdamLantz)! - [DateFieldSingle, DateFieldRange] Fix typed date shifting by a day in non-UTC timezones
8
+
9
+ - [#1973](https://github.com/servicetitan/hammer/pull/1973) [`860d2c7`](https://github.com/servicetitan/hammer/commit/860d2c737d93cff96f1a93f4b16b2457e613dc6f) Thanks [@AdamLantz](https://github.com/AdamLantz)! - [Calendar] Fix month and year dropdown selecting wrong month/year when `defaultTimeZone` is west of the user's local timezone
10
+
3
11
  ## 2.0.3
4
12
 
5
13
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { C as CalendarBetaPropsContext, a as Calendar$1 } from './Calendar-DUGQQkga.js';
2
+ import { C as CalendarBetaPropsContext, a as Calendar$1 } from './Calendar-jO-0jbbt.js';
3
3
 
4
4
  const Calendar = (props) => {
5
5
  const { dateMetadata, onMonthView, ...stableProps } = props;
@@ -7,4 +7,4 @@ const Calendar = (props) => {
7
7
  };
8
8
 
9
9
  export { Calendar as C };
10
- //# sourceMappingURL=Calendar-BTr5I3t-.js.map
10
+ //# sourceMappingURL=Calendar-DxLrWESu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar-BTr5I3t-.js","sources":["../src/beta/components/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as StableCalendar,\n CalendarProps as StableCalendarProps,\n} from \"../../../components\";\nimport { CalendarBetaPropsContext } from \"./CalendarBetaPropsContext\";\n\nexport interface CalendarBetaProps {\n dateMetadata?: {\n date: string;\n context: string;\n }[];\n onMonthView?: ({ month, year }: { month: number; year: number }) => void;\n}\n\nexport const Calendar = (props: CalendarBetaProps & StableCalendarProps) => {\n const { dateMetadata, onMonthView, ...stableProps } = props;\n return (\n <CalendarBetaPropsContext.Provider value={{ dateMetadata, onMonthView }}>\n <StableCalendar {...stableProps} />\n </CalendarBetaPropsContext.Provider>\n );\n};\n"],"names":["StableCalendar"],"mappings":";;;AAcO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAmD;AAC1E,EAAA,MAAM,EAAE,YAAA,EAAc,WAAA,EAAa,GAAG,aAAY,GAAI,KAAA;AACtD,EAAA,uBACE,GAAA,CAAC,wBAAA,CAAyB,QAAA,EAAzB,EAAkC,KAAA,EAAO,EAAE,YAAA,EAAc,WAAA,EAAY,EACpE,QAAA,kBAAA,GAAA,CAACA,UAAA,EAAA,EAAgB,GAAG,aAAa,CAAA,EACnC,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Calendar-DxLrWESu.js","sources":["../src/beta/components/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as StableCalendar,\n CalendarProps as StableCalendarProps,\n} from \"../../../components\";\nimport { CalendarBetaPropsContext } from \"./CalendarBetaPropsContext\";\n\nexport interface CalendarBetaProps {\n dateMetadata?: {\n date: string;\n context: string;\n }[];\n onMonthView?: ({ month, year }: { month: number; year: number }) => void;\n}\n\nexport const Calendar = (props: CalendarBetaProps & StableCalendarProps) => {\n const { dateMetadata, onMonthView, ...stableProps } = props;\n return (\n <CalendarBetaPropsContext.Provider value={{ dateMetadata, onMonthView }}>\n <StableCalendar {...stableProps} />\n </CalendarBetaPropsContext.Provider>\n );\n};\n"],"names":["StableCalendar"],"mappings":";;;AAcO,MAAM,QAAA,GAAW,CAAC,KAAA,KAAmD;AAC1E,EAAA,MAAM,EAAE,YAAA,EAAc,WAAA,EAAa,GAAG,aAAY,GAAI,KAAA;AACtD,EAAA,uBACE,GAAA,CAAC,wBAAA,CAAyB,QAAA,EAAzB,EAAkC,KAAA,EAAO,EAAE,YAAA,EAAc,WAAA,EAAY,EACpE,QAAA,kBAAA,GAAA,CAACA,UAAA,EAAA,EAAgB,GAAG,aAAa,CAAA,EACnC,CAAA;AAEJ;;;;"}
@@ -2418,11 +2418,14 @@ const CalendarElement = forwardRef(
2418
2418
  setToolbarFocus(toolbarFocusStates[0]);
2419
2419
  setSelectedMonth(month);
2420
2420
  setFocusedDate(
2421
- DateTime.fromObject({
2422
- year: focusedDate?.year ?? 1,
2423
- month,
2424
- day: 1
2425
- }).setZone(defaultTimeZone).startOf("day")
2421
+ DateTime.fromObject(
2422
+ {
2423
+ year: focusedDate?.year ?? 1,
2424
+ month,
2425
+ day: 1
2426
+ },
2427
+ { zone: defaultTimeZone }
2428
+ ).startOf("day")
2426
2429
  );
2427
2430
  setCalendarSelectionState("day");
2428
2431
  },
@@ -2436,11 +2439,14 @@ const CalendarElement = forwardRef(
2436
2439
  setToolbarFocus(toolbarFocusStates[1]);
2437
2440
  setSelectedYear(year);
2438
2441
  setFocusedDate(
2439
- DateTime.fromObject({
2440
- year,
2441
- month: focusedDate?.month ?? 1,
2442
- day: 1
2443
- }).setZone(defaultTimeZone).startOf("day")
2442
+ DateTime.fromObject(
2443
+ {
2444
+ year,
2445
+ month: focusedDate?.month ?? 1,
2446
+ day: 1
2447
+ },
2448
+ { zone: defaultTimeZone }
2449
+ ).startOf("day")
2444
2450
  );
2445
2451
  setCalendarSelectionState("day");
2446
2452
  },
@@ -2632,4 +2638,4 @@ const Calendar = Object.assign(CalendarElement, {
2632
2638
  });
2633
2639
 
2634
2640
  export { CalendarBetaPropsContext as C, Calendar as a, CalendarNow as b, CalendarYearButton as c, CalendarPrev as d, CalendarNext as e, CalendarMonthButton as f, CalendarMonth as g, useCalendarBetaProps as u };
2635
- //# sourceMappingURL=Calendar-DUGQQkga.js.map
2641
+ //# sourceMappingURL=Calendar-jO-0jbbt.js.map