@wix/headless-bookings 0.0.91 → 0.0.93
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/cjs/dist/react/booking/Book.d.ts +1 -1
- package/cjs/dist/react/booking/Book.js +9 -6
- package/cjs/dist/react/booking/Booking.d.ts +2 -15
- package/cjs/dist/react/booking/Booking.js +2 -19
- package/cjs/dist/react/booking/BookingItem.d.ts +1 -2
- package/cjs/dist/react/booking/BookingItem.js +2 -2
- package/cjs/dist/react/booking-form/BookingForm.js +3 -3
- package/cjs/dist/react/location/Location.d.ts +2 -4
- package/cjs/dist/react/location/Location.js +14 -14
- package/cjs/dist/react/location/LocationList.d.ts +1 -2
- package/cjs/dist/react/location/LocationList.js +6 -5
- package/cjs/dist/react/payment/Payment.d.ts +8 -16
- package/cjs/dist/react/payment/Payment.js +14 -14
- package/cjs/dist/react/service/Service.d.ts +8 -16
- package/cjs/dist/react/service/Service.js +29 -29
- package/cjs/dist/react/staff-member/StaffMember.d.ts +1 -2
- package/cjs/dist/react/staff-member/StaffMember.js +5 -5
- package/cjs/dist/react/staff-member/StaffMemberList.d.ts +3 -3
- package/cjs/dist/react/staff-member/StaffMemberList.js +6 -5
- package/cjs/dist/react/time-slot-list/TimeSlot.d.ts +4 -8
- package/cjs/dist/react/time-slot-list/TimeSlot.js +19 -19
- package/cjs/dist/react/time-slot-list/TimeSlotList.d.ts +1 -3
- package/cjs/dist/react/time-slot-list/TimeSlotList.js +9 -8
- package/dist/react/booking/Book.d.ts +1 -1
- package/dist/react/booking/Book.js +9 -6
- package/dist/react/booking/Booking.d.ts +2 -15
- package/dist/react/booking/Booking.js +2 -19
- package/dist/react/booking/BookingItem.d.ts +1 -2
- package/dist/react/booking/BookingItem.js +2 -2
- package/dist/react/booking-form/BookingForm.js +3 -3
- package/dist/react/location/Location.d.ts +2 -4
- package/dist/react/location/Location.js +14 -14
- package/dist/react/location/LocationList.d.ts +1 -2
- package/dist/react/location/LocationList.js +6 -5
- package/dist/react/payment/Payment.d.ts +8 -16
- package/dist/react/payment/Payment.js +14 -14
- package/dist/react/service/Service.d.ts +8 -16
- package/dist/react/service/Service.js +29 -29
- package/dist/react/staff-member/StaffMember.d.ts +1 -2
- package/dist/react/staff-member/StaffMember.js +5 -5
- package/dist/react/staff-member/StaffMemberList.d.ts +3 -3
- package/dist/react/staff-member/StaffMemberList.js +6 -5
- package/dist/react/time-slot-list/TimeSlot.d.ts +4 -8
- package/dist/react/time-slot-list/TimeSlot.js +19 -19
- package/dist/react/time-slot-list/TimeSlotList.d.ts +1 -3
- package/dist/react/time-slot-list/TimeSlotList.js +9 -8
- package/package.json +2 -2
|
@@ -182,7 +182,7 @@ export const Actions = {
|
|
|
182
182
|
* Uses the core DateRange component to access service data.
|
|
183
183
|
* Both dates are set together and trigger a single fetch.
|
|
184
184
|
*
|
|
185
|
-
* Default rendering provides
|
|
185
|
+
* Default rendering provides a native date input.
|
|
186
186
|
*
|
|
187
187
|
* @component
|
|
188
188
|
* @example
|
|
@@ -203,18 +203,19 @@ export const Actions = {
|
|
|
203
203
|
* ```
|
|
204
204
|
*/
|
|
205
205
|
const DateRangeInput = React.forwardRef((props, ref) => {
|
|
206
|
-
const { asChild, children, className, ...
|
|
206
|
+
const { asChild, children, className, onChange, ...rest } = props;
|
|
207
207
|
return (_jsx(CoreTimeSlotList.DateRange, { children: ({ startDate, endDate, setDateRange, timezone }) => {
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
const handleChange = (e) => {
|
|
209
|
+
const date = parse(e.target.value, 'yyyy-MM-dd', new Date());
|
|
210
|
+
setDateRange(startOfDay(date), endOfDay(date));
|
|
211
|
+
onChange?.(e);
|
|
212
|
+
};
|
|
213
|
+
return (_jsx(AsChildSlot, { ref: ref, asChild: asChild, ...rest, className: className, onChange: handleChange, "data-testid": TestIds.timeSlotListDateRangeInput, customElement: children, customElementProps: {
|
|
213
214
|
startDate,
|
|
214
215
|
endDate,
|
|
215
216
|
onChange: setDateRange,
|
|
216
217
|
timezone,
|
|
217
|
-
},
|
|
218
|
+
}, children: _jsx("input", { ref: ref, type: "date", value: toISODateString(startDate, timezone) }) }));
|
|
218
219
|
} }));
|
|
219
220
|
});
|
|
220
221
|
DateRangeInput.displayName = 'TimeSlotList.DateRange.Input';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-bookings",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.93",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"groupId": "com.wixpress.headless-components"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
"falconPackageHash": "
|
|
75
|
+
"falconPackageHash": "d8683a086a43f24ffeaae5e129663db278cce49f41577a8e4e4946f9"
|
|
76
76
|
}
|