@licklist/design 0.44.486-dev.4 → 0.44.486-dev.41
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/assets/iframe/available.svg.js +1 -0
- package/dist/assets/iframe/limited.svg.js +1 -0
- package/dist/assets/iframe/soldOut.svg.js +1 -0
- package/dist/assets/logo/bookedit.svg +9 -11
- package/dist/assets/logo/bookedit.svg.js +1 -1
- package/dist/assets/logo/favicon.svg +12 -0
- package/dist/assets/logo/licklist.svg +0 -2
- package/dist/assets/logo/licklist.svg.js +1 -1
- package/dist/availability-indicator/AvailabilityIndicator.d.ts +9 -0
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -0
- package/dist/availability-indicator/AvailabilityIndicator.js +1 -0
- package/dist/availability-indicator/index.d.ts +2 -0
- package/dist/availability-indicator/index.d.ts.map +1 -0
- package/dist/calendar/Calendar.d.ts +20 -0
- package/dist/calendar/Calendar.d.ts.map +1 -0
- package/dist/calendar/Calendar.js +1 -0
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -0
- package/dist/calendar/components/CalendarButtons/index.d.ts.map +1 -0
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +5 -0
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -0
- package/dist/calendar/components/CalendarDates/index.d.ts.map +1 -0
- package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
- package/dist/calendar/components/CalendarSelect/CalendarSelect.js +1 -0
- package/dist/calendar/components/CalendarSelect/index.d.ts.map +1 -0
- package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
- package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
- package/dist/calendar/index.d.ts +4 -0
- package/dist/calendar/index.d.ts.map +1 -0
- package/dist/calendar/utils/index.d.ts +5 -0
- package/dist/calendar/utils/index.d.ts.map +1 -0
- package/dist/calendar/utils/index.js +1 -0
- package/dist/date-time-button/DateTimeButton.d.ts +6 -1
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +1 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +1 -1
- package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useImage.js +1 -1
- package/dist/file-upload/FileUpload.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.js +1 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-card/ActivityCard.js +1 -0
- package/dist/iframe/activity-card/index.d.ts +2 -0
- package/dist/iframe/activity-card/index.d.ts.map +1 -0
- package/dist/iframe/event/index.d.ts +0 -1
- package/dist/iframe/event/index.d.ts.map +1 -1
- package/dist/iframe/index.d.ts +2 -2
- package/dist/iframe/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -0
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
- package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +2 -1
- package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
- package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
- package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +4 -3
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/types/index.js +1 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
- package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +3 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/product/ProductControl.d.ts +2 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +5 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +3 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/report/form/ReportForm.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/static/RestrictedAccess.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +1 -1
- package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
- package/dist/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
- package/dist/styles/activity-card/_index.scss +2 -0
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
- package/dist/styles/availability-indicator/_index.scss +1 -0
- package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
- package/dist/styles/date-time-button/_index.scss +1 -0
- package/dist/styles/form/CustomCheckbox.scss +5 -0
- package/dist/styles/header/Header.scss +0 -4
- package/dist/styles/iframe-events/Card.scss +1 -0
- package/dist/styles/iframe-page/PageBody.scss +3 -2
- package/dist/styles/notification/Notification.scss +4 -0
- package/dist/styles/packages.scss +3 -1
- package/dist/styles/resources-blocking/_index.scss +5 -0
- package/dist/styles/themes/bookedit/_index.scss +1 -0
- package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
- package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
- package/dist/zone/form/components/AvailableTimesControl.js +1 -1
- package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
- package/dist/zone/form/components/GameDurationControl.js +1 -0
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/dist/zone/form/utils/dates.js +1 -1
- package/package.json +2 -2
- package/src/assets/logo/bookedit.svg +9 -11
- package/src/assets/logo/favicon.svg +12 -0
- package/src/assets/logo/licklist.svg +0 -2
- package/src/availability-indicator/AvailabilityIndicator.tsx +59 -0
- package/src/availability-indicator/index.ts +1 -0
- package/src/calendar/Calendar.stories.tsx +33 -0
- package/src/calendar/Calendar.tsx +45 -0
- package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
- package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +28 -19
- package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
- package/src/calendar/index.ts +3 -0
- package/src/calendar/utils/index.ts +28 -0
- package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
- package/src/date-time-button/DateTimeButton.tsx +17 -22
- package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
- package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
- package/src/file-upload/FileUpload.tsx +3 -1
- package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
- package/src/iframe/activity-card/ActivityCard.tsx +77 -0
- package/src/iframe/activity-card/index.ts +1 -0
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -1
- package/src/iframe/event/index.ts +0 -6
- package/src/iframe/index.ts +1 -2
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -0
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -0
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +5 -3
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +0 -10
- package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
- package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +59 -31
- package/src/iframe/page/Page.stories.tsx +2 -2
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
- package/src/iframe/payment/order-items-table/types/index.ts +18 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
- package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
- package/src/index.ts +2 -0
- package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
- package/src/product-set/control/DateAndRecurrenceInput.tsx +1 -0
- package/src/product-set/control/ProductSetRecurrenceControl.tsx +8 -4
- package/src/product-set/form/ProductCategoriesControl.tsx +2 -0
- package/src/product-set/form/ProductSetForm.stories.tsx +1 -0
- package/src/product-set/form/ProductsControl.tsx +10 -0
- package/src/product-set/product/ProductControl.tsx +28 -1
- package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +1 -7
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +10 -8
- package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
- package/src/recurrence-input/RecurrenceInput.tsx +12 -2
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +53 -24
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +12 -0
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/sales/booking/results/components/ResultCard.tsx +3 -2
- package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
- package/src/static/RestrictedAccess.tsx +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +8 -1
- package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
- package/src/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
- package/src/styles/activity-card/_index.scss +2 -0
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
- package/src/styles/availability-indicator/_index.scss +1 -0
- package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
- package/src/styles/date-time-button/_index.scss +1 -0
- package/src/styles/form/CustomCheckbox.scss +5 -0
- package/src/styles/header/Header.scss +0 -4
- package/src/styles/iframe-events/Card.scss +1 -0
- package/src/styles/iframe-page/PageBody.scss +3 -2
- package/src/styles/notification/Notification.scss +4 -0
- package/src/styles/packages.scss +3 -1
- package/src/styles/resources-blocking/_index.scss +5 -0
- package/src/styles/themes/bookedit/_index.scss +1 -0
- package/src/typings.d.ts +11 -0
- package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
- package/src/zone/form/components/AvailableTimesControl.tsx +4 -9
- package/src/zone/form/components/GameDurationControl.tsx +46 -0
- package/src/zone/form/components/ZoneControl.tsx +2 -0
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +27 -35
- package/src/zone/form/utils/dates.ts +29 -36
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
- package/dist/iframe/activity-cards/index.d.ts +0 -3
- package/dist/iframe/activity-cards/index.d.ts.map +0 -1
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
- package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/index.d.ts +0 -4
- package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
- package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
- package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
- package/dist/iframe/event/event-calendar/utils/index.js +0 -1
- package/dist/styles/iframe-customers-journey/_index.scss +0 -3
- package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
- package/src/iframe/activity-cards/index.ts +0 -2
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
- package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
- package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
- package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
- package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
- package/src/iframe/event/event-calendar/index.ts +0 -6
- package/src/iframe/event/event-calendar/types/index.ts +0 -6
- package/src/iframe/event/event-calendar/utils/index.ts +0 -11
- package/src/styles/iframe-customers-journey/_index.scss +0 -3
- /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
- /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
- /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
- /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
- /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
- /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
- /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
- /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { Dispatch, ReactElement, SetStateAction } from "react";
|
|
2
|
+
import { DateTime } from "luxon";
|
|
3
|
+
import { CalendarButtons } from "./components/CalendarButtons";
|
|
4
|
+
import { CalendarDates } from "./components/CalendarDates";
|
|
5
|
+
|
|
6
|
+
export const defaultStartDay = DateTime.now().set({
|
|
7
|
+
millisecond: 0,
|
|
8
|
+
second: 0,
|
|
9
|
+
hour: 0,
|
|
10
|
+
minute: 0,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type CalendarProps = {
|
|
14
|
+
currentDate: DateTime;
|
|
15
|
+
setCurrentDate: Dispatch<SetStateAction<DateTime>>;
|
|
16
|
+
calendarDates: DateTime[];
|
|
17
|
+
disabledDates?: DateTime[];
|
|
18
|
+
selectedDate: DateTime | null;
|
|
19
|
+
setSelectedDate: Dispatch<SetStateAction<DateTime | null>>;
|
|
20
|
+
fromPrice?: string | ReactElement | null;
|
|
21
|
+
isLoading?: boolean;
|
|
22
|
+
initialDate?: DateTime;
|
|
23
|
+
getAvailability?: (
|
|
24
|
+
date: DateTime
|
|
25
|
+
) => { booked: number; total: number } | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Calendar = ({
|
|
29
|
+
disabledDates = [],
|
|
30
|
+
initialDate = defaultStartDay,
|
|
31
|
+
...props
|
|
32
|
+
}: CalendarProps) => {
|
|
33
|
+
return (
|
|
34
|
+
<div className="calendar-wrapper">
|
|
35
|
+
<div className="calendar">
|
|
36
|
+
<CalendarButtons
|
|
37
|
+
disabledDates={disabledDates}
|
|
38
|
+
initialDate={initialDate}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
<CalendarDates disabledDates={disabledDates} {...props} />
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx
RENAMED
|
@@ -1,36 +1,53 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { Button } from "react-bootstrap";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { range } from "lodash";
|
|
5
|
-
import {
|
|
6
|
-
import { ReactComponent as SelectArrow } from "../../../../../assets/iframe/selectArrow.svg";
|
|
5
|
+
import { ReactComponent as SelectArrow } from "../../../assets/iframe/selectArrow.svg";
|
|
7
6
|
import { CalendarSelect } from "../CalendarSelect";
|
|
8
|
-
import { CalendarBaseProps } from "../../types";
|
|
9
7
|
import { isSelectedDateDisabled } from "../../utils";
|
|
8
|
+
import { CalendarProps } from "../../Calendar";
|
|
10
9
|
|
|
11
|
-
type CalendarButtonsProps =
|
|
10
|
+
type CalendarButtonsProps = Pick<
|
|
11
|
+
CalendarProps,
|
|
12
|
+
| "isLoading"
|
|
13
|
+
| "disabledDates"
|
|
14
|
+
| "initialDate"
|
|
15
|
+
| "currentDate"
|
|
16
|
+
| "setCurrentDate"
|
|
17
|
+
| "setSelectedDate"
|
|
18
|
+
>;
|
|
12
19
|
|
|
13
20
|
export const CalendarButtons = ({
|
|
14
21
|
disabledDates = [],
|
|
15
22
|
isLoading = false,
|
|
23
|
+
initialDate,
|
|
24
|
+
currentDate,
|
|
25
|
+
setCurrentDate,
|
|
26
|
+
setSelectedDate,
|
|
16
27
|
}: CalendarButtonsProps) => {
|
|
17
|
-
const {
|
|
18
|
-
initialDate,
|
|
19
|
-
currentDate,
|
|
20
|
-
canMoveBack,
|
|
21
|
-
onSelectPreviousMonth,
|
|
22
|
-
onSelectNextMonth,
|
|
23
|
-
setCurrentDate,
|
|
24
|
-
setSelectedDate,
|
|
25
|
-
} = useContext(EventCalendarContext);
|
|
26
28
|
const { t } = useTranslation("Design");
|
|
27
29
|
|
|
30
|
+
const onSelectNextMonth = useCallback(() => {
|
|
31
|
+
setCurrentDate((prevDate) => prevDate.plus({ months: 1 }));
|
|
32
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
|
+
}, []);
|
|
34
|
+
|
|
35
|
+
const onSelectPreviousMonth = useCallback(() => {
|
|
36
|
+
setCurrentDate((prevDate) => prevDate.minus({ month: 1 }));
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
}, []);
|
|
39
|
+
|
|
28
40
|
const yearOptions = useMemo(() => {
|
|
29
41
|
return range(initialDate.year, initialDate.year + 5, 1).map((year) => {
|
|
30
42
|
return { label: String(year), value: year };
|
|
31
43
|
});
|
|
32
44
|
}, [initialDate]);
|
|
33
45
|
|
|
46
|
+
const canMoveBack = useMemo(
|
|
47
|
+
() => currentDate > initialDate,
|
|
48
|
+
[currentDate, initialDate]
|
|
49
|
+
);
|
|
50
|
+
|
|
34
51
|
const onSelectYear = (value: string) => {
|
|
35
52
|
const selectedYear = Number(value);
|
|
36
53
|
const nextDateTime = currentDate.set({ year: selectedYear });
|
package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx
RENAMED
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
|
-
import {
|
|
3
|
+
import { DAY_NUMBER } from "@licklist/core/dist/Config";
|
|
4
|
+
import { DateTimeButton } from "../../../date-time-button";
|
|
4
5
|
import { CalendarWeekdays } from "../CalendarWeekdays";
|
|
5
|
-
import { CalendarDate } from "../CalendarDate";
|
|
6
|
-
import { CalendarBaseProps } from "../../types";
|
|
7
6
|
import { isSelectedDateDisabled } from "../../utils";
|
|
7
|
+
import { CalendarProps } from "../../Calendar";
|
|
8
8
|
|
|
9
|
-
export type CalendarDatesProps =
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export type CalendarDatesProps = Pick<
|
|
10
|
+
CalendarProps,
|
|
11
|
+
| "calendarDates"
|
|
12
|
+
| "fromPrice"
|
|
13
|
+
| "isLoading"
|
|
14
|
+
| "disabledDates"
|
|
15
|
+
| "selectedDate"
|
|
16
|
+
| "setSelectedDate"
|
|
17
|
+
| "getAvailability"
|
|
18
|
+
>;
|
|
12
19
|
|
|
13
20
|
export const CalendarDates = ({
|
|
14
21
|
disabledDates = [],
|
|
15
22
|
isLoading = false,
|
|
23
|
+
calendarDates,
|
|
24
|
+
selectedDate,
|
|
25
|
+
setSelectedDate,
|
|
16
26
|
fromPrice,
|
|
27
|
+
getAvailability,
|
|
17
28
|
}: CalendarDatesProps) => {
|
|
18
|
-
const { calendarDates, initialDate, selectedDate, setSelectedDate } =
|
|
19
|
-
useContext(EventCalendarContext);
|
|
20
|
-
|
|
21
29
|
const fillCalendarDates = useMemo(() => {
|
|
22
30
|
let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
|
|
23
31
|
|
|
@@ -40,22 +48,23 @@ export const CalendarDates = ({
|
|
|
40
48
|
<CalendarWeekdays />
|
|
41
49
|
<div className="calendar-dates">
|
|
42
50
|
{fillCalendarDates.map((date: DateTime | null) => {
|
|
43
|
-
if (date === null)
|
|
44
|
-
return <div />;
|
|
45
|
-
}
|
|
51
|
+
if (date === null) return <div />;
|
|
46
52
|
|
|
47
53
|
const isDisabled =
|
|
48
54
|
isLoading || isSelectedDateDisabled(date, disabledDates);
|
|
49
55
|
|
|
50
56
|
return (
|
|
51
|
-
<
|
|
57
|
+
<DateTimeButton
|
|
52
58
|
key={+date}
|
|
53
|
-
currentDate={date}
|
|
54
|
-
initialDate={initialDate}
|
|
55
|
-
selectedDate={selectedDate}
|
|
56
|
-
setSelectedDate={setSelectedDate}
|
|
57
59
|
isDisabled={isDisabled}
|
|
58
|
-
|
|
60
|
+
isSelected={
|
|
61
|
+
selectedDate ? date.hasSame(selectedDate, "day") : undefined
|
|
62
|
+
}
|
|
63
|
+
date={date.toFormat(DAY_NUMBER)}
|
|
64
|
+
onSelect={() => setSelectedDate(date)}
|
|
65
|
+
price={fromPrice}
|
|
66
|
+
resources={getAvailability?.(date)}
|
|
67
|
+
calendarView
|
|
59
68
|
/>
|
|
60
69
|
);
|
|
61
70
|
})}
|
package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
2
|
import { Form } from "react-bootstrap";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { PAGE_CALENDAR_SELECT_WRAPPER } from "
|
|
4
|
+
import { PAGE_CALENDAR_SELECT_WRAPPER } from "../../../iframe/page/components/PageBody/constants";
|
|
5
5
|
|
|
6
6
|
export type CalendarSelectOption = {
|
|
7
7
|
label: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DateTime, Interval } from "luxon";
|
|
2
|
+
import isEqual from "lodash/isEqual";
|
|
3
|
+
|
|
4
|
+
export const isSelectedDateDisabled = (
|
|
5
|
+
selectedDate: DateTime,
|
|
6
|
+
disabledDates: DateTime[] = []
|
|
7
|
+
) => {
|
|
8
|
+
return !!disabledDates.find((disabledDate) =>
|
|
9
|
+
isEqual(disabledDate.toObject(), selectedDate.toObject())
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const getMonthCalendarDates = (initialDate: DateTime): DateTime[] => {
|
|
14
|
+
const startOfMonth = initialDate.startOf("month");
|
|
15
|
+
const endOfMonth = initialDate.endOf("month");
|
|
16
|
+
|
|
17
|
+
return Interval.fromDateTimes(startOfMonth, endOfMonth)
|
|
18
|
+
.splitBy({ day: 1 })
|
|
19
|
+
.map((d) => d.start);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const getWeekCalendarDates = (initialDate: DateTime): DateTime[] => {
|
|
23
|
+
const lastDay = initialDate.plus({ days: 7 });
|
|
24
|
+
|
|
25
|
+
return Interval.fromDateTimes(initialDate, lastDay)
|
|
26
|
+
.splitBy({ day: 1 })
|
|
27
|
+
.map((d) => d.start);
|
|
28
|
+
};
|
|
@@ -78,3 +78,20 @@ WithPrice.args = {
|
|
|
78
78
|
isOnlyTimeContainer: false,
|
|
79
79
|
price: "from $8000",
|
|
80
80
|
};
|
|
81
|
+
|
|
82
|
+
export const WithAvailability: Story<DateTimeButtonProps> = (args) => {
|
|
83
|
+
return <DateTimeButton {...args} />;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
WithAvailability.args = {
|
|
87
|
+
date,
|
|
88
|
+
isSelected: false,
|
|
89
|
+
isDisabled: false,
|
|
90
|
+
onSelect: () => null,
|
|
91
|
+
isOnlyTimeContainer: false,
|
|
92
|
+
price: "from $8000",
|
|
93
|
+
resources: {
|
|
94
|
+
booked: 1,
|
|
95
|
+
total: 3,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactElement } from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
|
+
import { AvailabilityIndicator } from "../availability-indicator";
|
|
4
5
|
import { DateContent } from "./DateContent";
|
|
5
6
|
|
|
6
7
|
export type DateTimeButtonProps<T = DateTime | string> = {
|
|
@@ -10,31 +11,28 @@ export type DateTimeButtonProps<T = DateTime | string> = {
|
|
|
10
11
|
onSelect: (date: T) => void;
|
|
11
12
|
isOnlyTimeContainer?: boolean;
|
|
12
13
|
price?: string | number | ReactElement | null;
|
|
14
|
+
resources?: {
|
|
15
|
+
booked: number;
|
|
16
|
+
total: number;
|
|
17
|
+
};
|
|
18
|
+
calendarView?: boolean;
|
|
13
19
|
};
|
|
14
20
|
|
|
15
21
|
export const DateTimeButton = <T extends DateTime | string>({
|
|
16
22
|
date,
|
|
17
|
-
isDisabled,
|
|
23
|
+
isDisabled: _isDisabled,
|
|
18
24
|
isSelected,
|
|
19
25
|
onSelect,
|
|
20
26
|
isOnlyTimeContainer,
|
|
21
27
|
price,
|
|
28
|
+
resources,
|
|
29
|
+
calendarView,
|
|
22
30
|
}: DateTimeButtonProps<T>) => {
|
|
23
|
-
// const infoLogo = useMemo(() => {
|
|
24
|
-
// if (info?.logo === infoLogoType.LIMIT) {
|
|
25
|
-
// return <LimitedSvg />;
|
|
26
|
-
// }
|
|
27
|
-
// if (info?.logo === infoLogoType.AVAILABLE) {
|
|
28
|
-
// return <AvailableSvg />;
|
|
29
|
-
// }
|
|
30
|
-
// if (info?.logo === infoLogoType.SOLD_OUT) {
|
|
31
|
-
// return <SoldOutSvg />;
|
|
32
|
-
// }
|
|
33
|
-
// return null;
|
|
34
|
-
// }, [info]);
|
|
35
|
-
|
|
36
31
|
const isTimeVariant = typeof date === "string";
|
|
37
32
|
|
|
33
|
+
const isDisabled =
|
|
34
|
+
_isDisabled || (resources && resources.booked === resources.total);
|
|
35
|
+
|
|
38
36
|
return (
|
|
39
37
|
<button
|
|
40
38
|
type="button"
|
|
@@ -46,7 +44,8 @@ export const DateTimeButton = <T extends DateTime | string>({
|
|
|
46
44
|
isSelected && "selected",
|
|
47
45
|
isTimeVariant && "time-button",
|
|
48
46
|
isOnlyTimeContainer && "only-time-container",
|
|
49
|
-
!isTimeVariant && "today"
|
|
47
|
+
!isTimeVariant && "today",
|
|
48
|
+
calendarView && "calendar-view"
|
|
50
49
|
)}
|
|
51
50
|
>
|
|
52
51
|
{isTimeVariant ? (
|
|
@@ -61,13 +60,9 @@ export const DateTimeButton = <T extends DateTime | string>({
|
|
|
61
60
|
|
|
62
61
|
{price && !isDisabled && <div className="price">{price}</div>}
|
|
63
62
|
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{info.logo && <Logo className="logo" logo={infoLogo} />}
|
|
68
|
-
<div>{info.description}</div>
|
|
69
|
-
</div>
|
|
70
|
-
)} */}
|
|
63
|
+
{resources && (
|
|
64
|
+
<AvailabilityIndicator {...resources} notAvailable={_isDisabled} />
|
|
65
|
+
)}
|
|
71
66
|
</button>
|
|
72
67
|
);
|
|
73
68
|
};
|
|
@@ -12,21 +12,30 @@ export const useImage = (
|
|
|
12
12
|
height: 0,
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
+
const setImageEventHandler = function setImageEventHandler(
|
|
16
|
+
this: HTMLImageElement
|
|
17
|
+
) {
|
|
18
|
+
imageRef.current = this;
|
|
19
|
+
|
|
20
|
+
setImageAttributes({
|
|
21
|
+
width: this.naturalWidth,
|
|
22
|
+
height: this.naturalHeight,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
15
26
|
const loadImage = useCallback((imageUrl?: string) => {
|
|
16
27
|
imageRef.current = new window.Image();
|
|
17
28
|
imageRef.current.src = imageUrl;
|
|
18
|
-
imageRef.current.addEventListener("load",
|
|
19
|
-
imageRef.current = this;
|
|
20
|
-
|
|
21
|
-
setImageAttributes({
|
|
22
|
-
width: this.naturalWidth,
|
|
23
|
-
height: this.naturalHeight,
|
|
24
|
-
});
|
|
25
|
-
});
|
|
29
|
+
imageRef.current.addEventListener("load", setImageEventHandler);
|
|
26
30
|
}, []);
|
|
27
31
|
|
|
28
32
|
useEffect(() => {
|
|
29
33
|
loadImage(url);
|
|
34
|
+
|
|
35
|
+
return () => {
|
|
36
|
+
imageRef.current.removeEventListener("load", setImageEventHandler);
|
|
37
|
+
imageRef.current = undefined;
|
|
38
|
+
};
|
|
30
39
|
}, [url, loadImage]);
|
|
31
40
|
|
|
32
41
|
const memoizedImageAttributes = useMemo(() => {
|
|
@@ -175,7 +175,9 @@ export const useFileUpload = ({
|
|
|
175
175
|
const filesArray = Array.from(uploadedFiles);
|
|
176
176
|
filesArray.forEach((file) => {
|
|
177
177
|
const fileExtension = file.name.split(".").pop();
|
|
178
|
-
const extensionIndex = allowedExtensions.indexOf(
|
|
178
|
+
const extensionIndex = allowedExtensions.indexOf(
|
|
179
|
+
fileExtension.toLowerCase()
|
|
180
|
+
);
|
|
179
181
|
const isExtensionValid = extensionIndex !== -1;
|
|
180
182
|
|
|
181
183
|
if (isExtensionValid) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { ActivityCard, ActivityCardProps } from "./ActivityCard";
|
|
3
|
+
import { ActivityCard, ActivityCardProps, LAYOUT_LIST } from "./ActivityCard";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: "Iframe/ActivityCard",
|
|
@@ -50,3 +50,26 @@ Selected.args = {
|
|
|
50
50
|
onSelect: () => null,
|
|
51
51
|
isSelected: true,
|
|
52
52
|
};
|
|
53
|
+
|
|
54
|
+
export const ListView: Story<ActivityCardProps> = (props) => {
|
|
55
|
+
return <ActivityCard {...props} />;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
Default.args = {
|
|
59
|
+
layout: LAYOUT_LIST,
|
|
60
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
61
|
+
duration: "60 mins",
|
|
62
|
+
price: "from £20",
|
|
63
|
+
image: {
|
|
64
|
+
hash: "0b37b130e22aa2d3",
|
|
65
|
+
id: 195,
|
|
66
|
+
imageType: "cover",
|
|
67
|
+
imageableId: 25,
|
|
68
|
+
imageableType: "zone",
|
|
69
|
+
path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
70
|
+
// eslint-disable-next-line max-len
|
|
71
|
+
url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
72
|
+
},
|
|
73
|
+
onSelect: () => null,
|
|
74
|
+
isSelected: false,
|
|
75
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
4
|
+
|
|
5
|
+
export const LAYOUT_GRID = "grid";
|
|
6
|
+
export const LAYOUT_LIST = "list";
|
|
7
|
+
|
|
8
|
+
type Layout = typeof LAYOUT_GRID | typeof LAYOUT_LIST;
|
|
9
|
+
|
|
10
|
+
export type ActivityCardProps = {
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
duration: ReactNode;
|
|
13
|
+
price: ReactNode;
|
|
14
|
+
image?: Image | null;
|
|
15
|
+
onSelect: () => void;
|
|
16
|
+
isSelected: boolean;
|
|
17
|
+
layout?: Layout;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const ActivityCard = ({
|
|
21
|
+
title,
|
|
22
|
+
duration,
|
|
23
|
+
price,
|
|
24
|
+
image,
|
|
25
|
+
onSelect,
|
|
26
|
+
isSelected,
|
|
27
|
+
layout = LAYOUT_GRID,
|
|
28
|
+
}: ActivityCardProps) => {
|
|
29
|
+
if (layout === LAYOUT_GRID) {
|
|
30
|
+
return (
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
className={clsx("activity-card", isSelected && "active")}
|
|
34
|
+
onClick={onSelect}
|
|
35
|
+
>
|
|
36
|
+
{image && (
|
|
37
|
+
<img className="activity-card-image" alt="" src={image.url} />
|
|
38
|
+
)}
|
|
39
|
+
<div className={clsx("d-flex", "flex-column", !image && "no-image")}>
|
|
40
|
+
<div className="activity-card-title">{title}</div>
|
|
41
|
+
|
|
42
|
+
{duration && <div>{duration}</div>}
|
|
43
|
+
|
|
44
|
+
{price && <div>{price}</div>}
|
|
45
|
+
</div>
|
|
46
|
+
</button>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div role="button" onClick={onSelect} onKeyPress={onSelect} tabIndex={0}>
|
|
52
|
+
<div
|
|
53
|
+
className={clsx("list-activity-card", {
|
|
54
|
+
active: isSelected,
|
|
55
|
+
})}
|
|
56
|
+
>
|
|
57
|
+
<div className="description">
|
|
58
|
+
<div className="title">{title}</div>
|
|
59
|
+
{duration && (
|
|
60
|
+
<div>
|
|
61
|
+
<p>{duration}</p>
|
|
62
|
+
</div>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{price && <div>{price}</div>}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
{image && (
|
|
69
|
+
<div className="image-container">
|
|
70
|
+
<img className="image" src={image.url} alt="" />
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
</div>
|
|
74
|
+
<hr className="list-activity-card-hr" />
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ActivityCard";
|
|
@@ -5,7 +5,7 @@ import { IframeEventVenueMap } from "./IframeEventVenueMap";
|
|
|
5
5
|
import { Page, PageBody, PageHeader } from "../../page";
|
|
6
6
|
import { BookingSummaryFooter } from "../../order-process/components/BookingSummaryFooter";
|
|
7
7
|
import { BookingSummary } from "../../order-process/components/BookingSummary";
|
|
8
|
-
import { CalendarSelect } from "
|
|
8
|
+
import { CalendarSelect } from "../../../calendar/components/CalendarSelect";
|
|
9
9
|
import { Product } from "../../../types";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
@@ -13,12 +13,6 @@ export {
|
|
|
13
13
|
} from "./event-order-short-summary";
|
|
14
14
|
export { EventDescription } from "./event-description";
|
|
15
15
|
export { EventProductSets, EventProductSetsProps } from "./event-product-sets";
|
|
16
|
-
export {
|
|
17
|
-
EventCalendar,
|
|
18
|
-
CalendarSelect,
|
|
19
|
-
CalendarSelectProps,
|
|
20
|
-
CalendarSelectOption,
|
|
21
|
-
} from "./event-calendar";
|
|
22
16
|
export {
|
|
23
17
|
EventStepVenueMapZones,
|
|
24
18
|
EventStepVenueMapZonesProps,
|
package/src/iframe/index.ts
CHANGED
|
@@ -10,7 +10,6 @@ export {
|
|
|
10
10
|
EventOrderShortSummary,
|
|
11
11
|
SummaryDataType,
|
|
12
12
|
EventDescription,
|
|
13
|
-
EventCalendar,
|
|
14
13
|
EventProductSets,
|
|
15
14
|
EventProductSetsProps,
|
|
16
15
|
IframeEventVenueMap,
|
|
@@ -43,5 +42,5 @@ export {
|
|
|
43
42
|
export { BackButton } from "./back-button";
|
|
44
43
|
export { PoweredBy } from "./powered-by";
|
|
45
44
|
export * from "./page";
|
|
46
|
-
export * from "./activity-
|
|
45
|
+
export * from "./activity-card";
|
|
47
46
|
export { CustomDateField, CustomDateFieldProps } from "./custom-fields";
|
|
@@ -11,6 +11,7 @@ import { BookingSummaryAccordion } from "./components/BookingSummaryAccordion";
|
|
|
11
11
|
|
|
12
12
|
export const BookingSummary = ({
|
|
13
13
|
date,
|
|
14
|
+
time,
|
|
14
15
|
menuSteps,
|
|
15
16
|
formValues,
|
|
16
17
|
isNotShownPeopleAmount,
|
|
@@ -47,6 +48,7 @@ export const BookingSummary = ({
|
|
|
47
48
|
<div className="event-info">
|
|
48
49
|
<p className="m-0 title event-name">{eventName}</p>
|
|
49
50
|
<p className="m-0">{date}</p>
|
|
51
|
+
{time && <p className="m-0">{time}</p>}
|
|
50
52
|
</div>
|
|
51
53
|
<hr />
|
|
52
54
|
|
|
@@ -5,6 +5,8 @@ export const cartSumByOrderProducts = (orderProducts?: Order[]) => {
|
|
|
5
5
|
return 0;
|
|
6
6
|
}
|
|
7
7
|
return orderProducts.reduce((prevSumValue: number, product) => {
|
|
8
|
+
if (!product) return 0;
|
|
9
|
+
|
|
8
10
|
return (
|
|
9
11
|
prevSumValue + (product?.deposit || product?.price) * product.quantity
|
|
10
12
|
);
|
|
@@ -20,15 +20,15 @@ import { Step } from "@licklist/core/dist/DataMapper/Product/StepDataMapper";
|
|
|
20
20
|
import { useTranslation } from "react-i18next";
|
|
21
21
|
import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
22
22
|
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
23
|
+
import { MenuStep } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
23
24
|
import { Category } from "./components/Category";
|
|
24
|
-
import { MenuStep } from "../../../../types";
|
|
25
25
|
import { STEP_FORM_ID } from "../../constants";
|
|
26
26
|
import { ErrorModal } from "../ErrorModal/ErrorModal";
|
|
27
27
|
import { PageBody } from "../../../page/components/PageBody";
|
|
28
28
|
import {
|
|
29
29
|
CalendarSelect,
|
|
30
30
|
CalendarSelectOption,
|
|
31
|
-
} from "
|
|
31
|
+
} from "../../../../calendar/components/CalendarSelect";
|
|
32
32
|
import { IframeEventVenueMap } from "../../../event/event-venue-map";
|
|
33
33
|
import { VenueMapRef } from "../../../../events/event-venue-map/components/VenueMap";
|
|
34
34
|
import { useCategoryVerification } from "../utils/useCategoryVerification";
|
|
@@ -117,7 +117,7 @@ export const CalendarStepsForm = forwardRef<
|
|
|
117
117
|
);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
const categoryError = verifyCategoryItems(values, step);
|
|
120
|
+
const categoryError = verifyCategoryItems(values, step.productCategories);
|
|
121
121
|
|
|
122
122
|
if (categoryError) {
|
|
123
123
|
setStepFormError(categoryError.message);
|
|
@@ -363,3 +363,5 @@ export const CalendarStepsForm = forwardRef<
|
|
|
363
363
|
);
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
|
+
|
|
367
|
+
CalendarStepsForm.displayName = "CalendarStepsForm";
|
|
@@ -88,19 +88,9 @@ export const CategoryProduct = ({
|
|
|
88
88
|
isRequired = false,
|
|
89
89
|
maxAmount = 0,
|
|
90
90
|
minAmount = 0,
|
|
91
|
-
minSpend,
|
|
92
|
-
price,
|
|
93
91
|
} = product;
|
|
94
92
|
|
|
95
93
|
const currentQuantity = value?.quantity ?? 0;
|
|
96
|
-
if (minSpend && currentQuantity * price < minSpend) {
|
|
97
|
-
return t("Design:minimumSpendSumValidation", {
|
|
98
|
-
minSpend: formatNumber(minSpend, {
|
|
99
|
-
style: "currency",
|
|
100
|
-
currency: Config.Currency.GBP,
|
|
101
|
-
}),
|
|
102
|
-
}) as string;
|
|
103
|
-
}
|
|
104
94
|
|
|
105
95
|
if (!value) return true;
|
|
106
96
|
|