@adatechnology/scheduling-ui 0.1.0-rc.2 → 0.1.0-rc.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1008,8 +1008,9 @@ function AvailabilityExceptionsEditor({ resourceId, timezone }) {
1008
1008
  const { data, isLoading, isError: isLoadError } = useAvailabilityExceptions(resourceId);
1009
1009
  const addException = useAddAvailabilityException();
1010
1010
  const removeException = useRemoveAvailabilityException();
1011
- const [from, setFrom] = useState3(() => formatDateTimeLocalInTimeZone(/* @__PURE__ */ new Date(), timezone));
1012
- const [until, setUntil] = useState3(() => formatDateTimeLocalInTimeZone(/* @__PURE__ */ new Date(), timezone));
1011
+ const emptyValue = () => formatDateTimeLocalInTimeZone(/* @__PURE__ */ new Date(), timezone);
1012
+ const [from, setFrom] = useState3(emptyValue);
1013
+ const [until, setUntil] = useState3(emptyValue);
1013
1014
  const [kind, setKind] = useState3(AVAILABILITY_EXCEPTION_KIND.BLOCK);
1014
1015
  const [reason, setReason] = useState3("");
1015
1016
  async function handleAdd() {
@@ -1024,8 +1025,8 @@ function AvailabilityExceptionsEditor({ resourceId, timezone }) {
1024
1025
  kind,
1025
1026
  ...reason ? { reason } : {}
1026
1027
  });
1027
- setFrom("");
1028
- setUntil("");
1028
+ setFrom(emptyValue());
1029
+ setUntil(emptyValue());
1029
1030
  setReason("");
1030
1031
  } catch {
1031
1032
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adatechnology/scheduling-ui",
3
- "version": "0.1.0-rc.2",
3
+ "version": "0.1.0-rc.4",
4
4
  "license": "MIT",
5
5
  "description": "Scheduling UI — headless hooks + agenda, reservas, recursos, serviços e disponibilidade",
6
6
  "publishConfig": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "clsx": "^2.1.1",
23
23
  "lucide-react": "^1.21.0",
24
- "@adatechnology/scheduling-contracts": "0.1.0-rc.1"
24
+ "@adatechnology/scheduling-contracts": "0.1.0-rc.2"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@tanstack/react-query": "^5",