@servicetitan/anvil2 1.32.0 → 1.32.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/CHANGELOG.md +13 -0
- package/dist/{Calendar-BzyPkdAu.js → Calendar-DFbt6fWP.js} +2 -2
- package/dist/{Calendar-BzyPkdAu.js.map → Calendar-DFbt6fWP.js.map} +1 -1
- package/dist/{Calendar-Zfsv8y4j-Vja4BE7W.js → Calendar-ch54N6OS-0vxeSJFt.js} +17 -15
- package/dist/{Calendar-Zfsv8y4j-Vja4BE7W.js.map → Calendar-ch54N6OS-0vxeSJFt.js.map} +1 -1
- package/dist/Calendar.js +1 -1
- package/dist/{Combobox-wrmxS_0C.js → Combobox-DZp6NgeF.js} +3 -3
- package/dist/{Combobox-wrmxS_0C.js.map → Combobox-DZp6NgeF.js.map} +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DateField-Bef-bUUm.js → DateField-BuCxeZbi.js} +6 -6
- package/dist/{DateField-Bef-bUUm.js.map → DateField-BuCxeZbi.js.map} +1 -1
- package/dist/DateField.js +1 -1
- package/dist/{DaysOfTheWeek-DmdZW53u.js → DaysOfTheWeek-BL27GHpA.js} +2 -2
- package/dist/{DaysOfTheWeek-DmdZW53u.js.map → DaysOfTheWeek-BL27GHpA.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-DJUMOPjL.js → Dialog-CWhCRYT8.js} +2 -2
- package/dist/{Dialog-DJUMOPjL.js.map → Dialog-CWhCRYT8.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-BEIt_Ylz.js → Drawer-R27M51bR.js} +2 -2
- package/dist/{Drawer-BEIt_Ylz.js.map → Drawer-R27M51bR.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/{InputMask-BSchnaNh-BiWbAA0e.js → InputMask-C8Yx-RsH-PbALaG2H.js} +2 -2
- package/dist/{InputMask-BSchnaNh-BiWbAA0e.js.map → InputMask-C8Yx-RsH-PbALaG2H.js.map} +1 -1
- package/dist/{InputMask-CQUSkhJk.js → InputMask-Dfdl3HR_.js} +2 -2
- package/dist/{InputMask-CQUSkhJk.js.map → InputMask-Dfdl3HR_.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-BQ98sGH5.js → ListView-D3u27ODE.js} +6 -2
- package/dist/ListView-D3u27ODE.js.map +1 -0
- package/dist/ListView.js +1 -1
- package/dist/{Menu-COy3N3q2.js → Menu-DY1JLQrj.js} +5 -4
- package/dist/Menu-DY1JLQrj.js.map +1 -0
- package/dist/Menu.js +1 -1
- package/dist/{Page-DsRpGk2z.js → Page-DWih1Hby.js} +5 -5
- package/dist/{Page-DsRpGk2z.js.map → Page-DWih1Hby.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Popover-Dy82-soT.js → Popover-CV-xrb9G.js} +2 -2
- package/dist/{Popover-Dy82-soT.js.map → Popover-CV-xrb9G.js.map} +1 -1
- package/dist/{Popover-xQT2l-O--3ITnWB47.js → Popover-DX4P8WCW-BgQrtbWH.js} +3 -3
- package/dist/{Popover-xQT2l-O--3ITnWB47.js.map → Popover-DX4P8WCW-BgQrtbWH.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-DiozEP49.js → ProgressBar-BBEzuQ2S.js} +2 -2
- package/dist/{ProgressBar-DiozEP49.js.map → ProgressBar-BBEzuQ2S.js.map} +1 -1
- package/dist/{ProgressBar-CXUHzFT7-Chfc-aG4.js → ProgressBar-CgpalFK8-DxfzF8hg.js} +10 -6
- package/dist/ProgressBar-CgpalFK8-DxfzF8hg.js.map +1 -0
- package/dist/ProgressBar.js +1 -1
- package/dist/{TextField-Ca8YUPjX-BS4ojPnU.js → TextField-69svqHPM-Box5JvkC.js} +2 -2
- package/dist/{TextField-Ca8YUPjX-BS4ojPnU.js.map → TextField-69svqHPM-Box5JvkC.js.map} +1 -1
- package/dist/{TextField-LtQFLlk6.js → TextField-CgkazfKE.js} +2 -2
- package/dist/{TextField-LtQFLlk6.js.map → TextField-CgkazfKE.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-DgspneHG.js → Textarea-Dv67XBNL.js} +2 -2
- package/dist/{Textarea-DgspneHG.js.map → Textarea-Dv67XBNL.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/Toast.js +1 -1
- package/dist/{Toolbar-5E1u00Tg.js → Toolbar-gsDzLpRl.js} +3 -3
- package/dist/{Toolbar-5E1u00Tg.js.map → Toolbar-gsDzLpRl.js.map} +1 -1
- package/dist/Toolbar.js +1 -1
- package/dist/{Tooltip-D38RQJQI.js → Tooltip-B8v6z3nj.js} +2 -2
- package/dist/{Tooltip-D38RQJQI.js.map → Tooltip-B8v6z3nj.js.map} +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/getActiveElements-CqR6e_P--CqR6e_P-.js +16 -0
- package/dist/getActiveElements-CqR6e_P--CqR6e_P-.js.map +1 -0
- package/dist/index.js +17 -17
- package/dist/{toast-DULP2LM1.js → toast-C-F09cHz.js} +2 -2
- package/dist/{toast-DULP2LM1.js.map → toast-C-F09cHz.js.map} +1 -1
- package/package.json +2 -2
- package/dist/ListView-BQ98sGH5.js.map +0 -1
- package/dist/Menu-COy3N3q2.js.map +0 -1
- package/dist/ProgressBar-CXUHzFT7-Chfc-aG4.js.map +0 -1
- /package/dist/{Calendar-Zfsv8y4j.css → Calendar-ch54N6OS.css} +0 -0
- /package/dist/{Popover-xQT2l-O-.css → Popover-DX4P8WCW.css} +0 -0
- /package/dist/{ProgressBar-CXUHzFT7.css → ProgressBar-CgpalFK8.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @servicetitan/anvil2
|
|
2
2
|
|
|
3
|
+
## 1.32.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1223](https://github.com/servicetitan/hammer/pull/1223) [`5a5dcfa`](https://github.com/servicetitan/hammer/commit/5a5dcfa2cc1afcb9fadf3dbb7a72dd360dc0fa7f) Thanks [@pbuckingham-st](https://github.com/pbuckingham-st)! - [Combobox, DateField, Dialog, Drawer, Menu] Focus no longer unexpectedly jumps when used in the shadow DOM
|
|
8
|
+
|
|
9
|
+
- [#1226](https://github.com/servicetitan/hammer/pull/1226) [`36a2ed6`](https://github.com/servicetitan/hammer/commit/36a2ed6c2e083c091e8ecf283069bdd5c3b2a544) Thanks [@pbuckingham-st](https://github.com/pbuckingham-st)! - [Tooltip] Reference to child Trigger is preserved
|
|
10
|
+
|
|
11
|
+
- [#1230](https://github.com/servicetitan/hammer/pull/1230) [`425d247`](https://github.com/servicetitan/hammer/commit/425d2478cb24fda008038e8392cc54b9cea8154b) Thanks [@pbuckingham-st](https://github.com/pbuckingham-st)! - [Calendar, DateField] Calendar no longer resets focus unexpectedly
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`5a5dcfa`](https://github.com/servicetitan/hammer/commit/5a5dcfa2cc1afcb9fadf3dbb7a72dd360dc0fa7f), [`36a2ed6`](https://github.com/servicetitan/hammer/commit/36a2ed6c2e083c091e8ecf283069bdd5c3b2a544), [`425d247`](https://github.com/servicetitan/hammer/commit/425d2478cb24fda008038e8392cc54b9cea8154b)]:
|
|
14
|
+
- @servicetitan/hammer-react@1.33.1
|
|
15
|
+
|
|
3
16
|
## 1.32.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import { C as CalendarNow$1, a as CalendarMonth$1, b as CalendarNext$1, c as CalendarPrev$1, d as Calendar$1 } from './Calendar-
|
|
3
|
+
import { C as CalendarNow$1, a as CalendarMonth$1, b as CalendarNext$1, c as CalendarPrev$1, d as Calendar$1 } from './Calendar-ch54N6OS-0vxeSJFt.js';
|
|
4
4
|
|
|
5
5
|
const CalendarElement = forwardRef(
|
|
6
6
|
(props, ref) => {
|
|
@@ -35,4 +35,4 @@ const Calendar = Object.assign(CalendarElement, {
|
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
export { Calendar as C, CalendarNow as a, CalendarMonth as b, CalendarNext as c, CalendarPrev as d };
|
|
38
|
-
//# sourceMappingURL=Calendar-
|
|
38
|
+
//# sourceMappingURL=Calendar-DFbt6fWP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar-
|
|
1
|
+
{"version":3,"file":"Calendar-DFbt6fWP.js","sources":["../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as CoreCalendar,\n CalendarNow as CoreCalendarNow,\n CalendarMonth as CoreCalendarMonth,\n CalendarNext as CoreCalendarNext,\n CalendarPrev as CoreCalendarPrev,\n CalendarProps as CoreCalendarProps,\n CalendarContextProps as CoreCalendarContextProps,\n CalendarNowProps as CoreCalendarNowProps,\n CalendarMonthProps as CoreCalendarMonthProps,\n CalendarNextProps as CoreCalendarNextProps,\n CalendarPrevProps as CoreCalendarPrevProps,\n} from \"@servicetitan/hammer-react\";\nimport { Ref, forwardRef } from \"react\";\n\nexport type CalendarProps = CoreCalendarProps;\nexport type CalendarContextProps = CoreCalendarContextProps;\nexport type CalendarNowProps = CoreCalendarNowProps;\nexport type CalendarMonthProps = CoreCalendarMonthProps;\nexport type CalendarNextProps = CoreCalendarNextProps;\nexport type CalendarPrevProps = CoreCalendarPrevProps;\n\nconst CalendarElement = forwardRef(\n (props: CalendarProps, ref: Ref<HTMLDivElement>) => {\n return <CoreCalendar ref={ref} {...props} />;\n },\n);\nexport const CalendarNow = forwardRef(\n (props: CalendarNowProps, ref: Ref<HTMLButtonElement>) => {\n return <CoreCalendarNow ref={ref} {...props} />;\n },\n);\nexport const CalendarMonth = forwardRef(\n (props: CalendarMonthProps, ref: Ref<HTMLTableElement>) => {\n return <CoreCalendarMonth ref={ref} {...props} />;\n },\n);\nexport const CalendarNext = forwardRef(\n (props: CalendarNextProps, ref: Ref<HTMLButtonElement>) => {\n return <CoreCalendarNext ref={ref} {...props} />;\n },\n);\nexport const CalendarPrev = forwardRef(\n (props: CalendarPrevProps, ref: Ref<HTMLButtonElement>) => {\n return <CoreCalendarPrev ref={ref} {...props} />;\n },\n);\n\n// export const useCalendar = useCoreCalendar;\n\nexport const Calendar = Object.assign(CalendarElement, {\n Now: CalendarNow,\n Month: CalendarMonth,\n Next: CalendarNext,\n Prev: CalendarPrev,\n});\n"],"names":["CoreCalendar","CoreCalendarNow","CoreCalendarMonth","CoreCalendarNext","CoreCalendarPrev"],"mappings":";;;;AAsBA,MAAM,eAAkB,GAAA,UAAA;AAAA,EACtB,CAAC,OAAsB,GAA6B,KAAA;AAClD,IAAA,uBAAQ,GAAA,CAAAA,UAAA,EAAA,EAAa,GAAW,EAAA,GAAG,KAAO,EAAA,CAAA;AAAA;AAE9C,CAAA;AACO,MAAM,WAAc,GAAA,UAAA;AAAA,EACzB,CAAC,OAAyB,GAAgC,KAAA;AACxD,IAAA,uBAAQ,GAAA,CAAAC,aAAA,EAAA,EAAgB,GAAW,EAAA,GAAG,KAAO,EAAA,CAAA;AAAA;AAEjD;AACO,MAAM,aAAgB,GAAA,UAAA;AAAA,EAC3B,CAAC,OAA2B,GAA+B,KAAA;AACzD,IAAA,uBAAQ,GAAA,CAAAC,eAAA,EAAA,EAAkB,GAAW,EAAA,GAAG,KAAO,EAAA,CAAA;AAAA;AAEnD;AACO,MAAM,YAAe,GAAA,UAAA;AAAA,EAC1B,CAAC,OAA0B,GAAgC,KAAA;AACzD,IAAA,uBAAQ,GAAA,CAAAC,cAAA,EAAA,EAAiB,GAAW,EAAA,GAAG,KAAO,EAAA,CAAA;AAAA;AAElD;AACO,MAAM,YAAe,GAAA,UAAA;AAAA,EAC1B,CAAC,OAA0B,GAAgC,KAAA;AACzD,IAAA,uBAAQ,GAAA,CAAAC,cAAA,EAAA,EAAiB,GAAW,EAAA,GAAG,KAAO,EAAA,CAAA;AAAA;AAElD;AAIa,MAAA,QAAA,GAAW,MAAO,CAAA,MAAA,CAAO,eAAiB,EAAA;AAAA,EACrD,GAAK,EAAA,WAAA;AAAA,EACL,KAAO,EAAA,aAAA;AAAA,EACP,IAAM,EAAA,YAAA;AAAA,EACN,IAAM,EAAA;AACR,CAAC;;;;"}
|
|
@@ -7,7 +7,7 @@ import { S as SrOnly } from './SrOnly-BXm1DGl3-BJVodjQp.js';
|
|
|
7
7
|
import { u as useSwipe } from './useSwipe-DIUHs7T5-DIUHs7T5.js';
|
|
8
8
|
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-3B2XYWSr-5ZanZ8Ew.js';
|
|
9
9
|
|
|
10
|
-
import './Calendar-
|
|
10
|
+
import './Calendar-ch54N6OS.css';// these aren't really private, but nor are they really useful to document
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @private
|
|
@@ -8393,16 +8393,18 @@ const CalendarDay = forwardRef(
|
|
|
8393
8393
|
};
|
|
8394
8394
|
const onMouseEnterHandler = (d) => {
|
|
8395
8395
|
setHoveredDate(d);
|
|
8396
|
-
setFocusedDate(d);
|
|
8397
8396
|
};
|
|
8398
8397
|
useEffect(() => {
|
|
8399
|
-
if (!initialized.current)
|
|
8400
|
-
|
|
8401
|
-
|
|
8398
|
+
if (!initialized.current) {
|
|
8399
|
+
initialized.current = true;
|
|
8400
|
+
return;
|
|
8401
|
+
}
|
|
8402
|
+
requestAnimationFrame(() => {
|
|
8403
|
+
const targetElement = document.getElementById(`${uid}-${focusedDate.toISODate()}`) || document.activeElement?.shadowRoot?.getElementById(
|
|
8402
8404
|
`${uid}-${focusedDate.toISODate()}`
|
|
8403
8405
|
);
|
|
8404
8406
|
targetElement?.focus();
|
|
8405
|
-
}
|
|
8407
|
+
});
|
|
8406
8408
|
}, [focusedDate, uid]);
|
|
8407
8409
|
useEffect(() => {
|
|
8408
8410
|
if (!isUnavailableDate(
|
|
@@ -8848,6 +8850,7 @@ const Calendar = forwardRef(
|
|
|
8848
8850
|
...style,
|
|
8849
8851
|
...layoutStyles
|
|
8850
8852
|
};
|
|
8853
|
+
const lastIValue = useRef(iValue);
|
|
8851
8854
|
const nDate = iValue ? typeof iValue === "string" ? normalizeDate(iValue, defaultTimeZone) : {
|
|
8852
8855
|
start: iValue.start ? normalizeDate(iValue.start, defaultTimeZone) : null,
|
|
8853
8856
|
end: iValue.end ? normalizeDate(iValue.end, defaultTimeZone) : null
|
|
@@ -8874,24 +8877,23 @@ const Calendar = forwardRef(
|
|
|
8874
8877
|
focusProp && setFocusedDate(normalizeDate(focusProp, defaultTimeZone));
|
|
8875
8878
|
}, [focusProp]);
|
|
8876
8879
|
useEffect(() => {
|
|
8877
|
-
if (!iValue)
|
|
8880
|
+
if (!iValue) {
|
|
8881
|
+
lastIValue.current = iValue;
|
|
8882
|
+
return;
|
|
8883
|
+
}
|
|
8878
8884
|
if (typeof iValue === "string") {
|
|
8879
8885
|
setValue(normalizeDate(iValue, defaultTimeZone));
|
|
8880
8886
|
setFocusedDate(normalizeDate(iValue, defaultTimeZone));
|
|
8881
|
-
|
|
8882
|
-
}
|
|
8883
|
-
if (iValue.end) {
|
|
8887
|
+
} else if (iValue.end && (typeof lastIValue.current !== "object" || lastIValue?.current?.end !== iValue.end)) {
|
|
8884
8888
|
setValue({
|
|
8885
8889
|
start: iValue.start ? normalizeDate(iValue.start, defaultTimeZone) : null,
|
|
8886
8890
|
end: iValue.end ? normalizeDate(iValue.end, defaultTimeZone) : null
|
|
8887
8891
|
});
|
|
8888
8892
|
setFocusedDate(normalizeDate(iValue.end, defaultTimeZone));
|
|
8889
|
-
|
|
8890
|
-
}
|
|
8891
|
-
if (iValue.start) {
|
|
8893
|
+
} else if (iValue.start && (typeof lastIValue.current !== "object" || lastIValue?.current?.start !== iValue.start)) {
|
|
8892
8894
|
setFocusedDate(normalizeDate(iValue.start, defaultTimeZone));
|
|
8893
|
-
return;
|
|
8894
8895
|
}
|
|
8896
|
+
lastIValue.current = iValue;
|
|
8895
8897
|
}, [iValue]);
|
|
8896
8898
|
const providerValue = useMemo(() => {
|
|
8897
8899
|
const format = {
|
|
@@ -9010,4 +9012,4 @@ function useCalendar() {
|
|
|
9010
9012
|
Calendar.displayName = "Calendar";
|
|
9011
9013
|
|
|
9012
9014
|
export { CalendarNow as C, DateTime as D, CalendarMonth as a, CalendarNext as b, CalendarPrev as c, Calendar as d, isValidDate as i, toDateString as t };
|
|
9013
|
-
//# sourceMappingURL=Calendar-
|
|
9015
|
+
//# sourceMappingURL=Calendar-ch54N6OS-0vxeSJFt.js.map
|