@licklist/design 0.44.486-dev.8 → 0.44.486-dev.80
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 +10 -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 +19 -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/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-card/utils.d.ts +29 -0
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-card/utils.js +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +3 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +2 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.js +1 -1
- package/dist/events/event-statistic-modal/utils/index.d.ts +1 -1
- package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/utils/index.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 +15 -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 -2
- package/dist/iframe/event/index.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.js +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 +2 -1
- 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/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +4 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.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/order-process/constants.d.ts +1 -0
- package/dist/iframe/order-process/constants.d.ts.map +1 -1
- package/dist/iframe/order-process/constants.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/index.d.ts +3 -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/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
- package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
- package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
- package/dist/number-of-people-input/components/index.d.ts +2 -0
- package/dist/number-of-people-input/components/index.d.ts.map +1 -0
- package/dist/number-of-people-input/index.d.ts +3 -0
- package/dist/number-of-people-input/index.d.ts.map +1 -0
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +5 -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/ProductSetControl.d.ts +6 -3
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/dist/product-set/control/ProductSetRecurrenceControl.d.ts +2 -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/ProductSetForm.d.ts +3 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.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 +0 -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/product-set/utils/index.d.ts +10 -0
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +1 -1
- package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
- package/dist/provider/location-input/LocationInput.js +1 -1
- package/dist/provider/location-input/components/FormGroupControll.d.ts +7 -0
- package/dist/provider/location-input/components/FormGroupControll.d.ts.map +1 -0
- package/dist/provider/location-input/components/FormGroupControll.js +1 -0
- package/dist/provider/location-input/components/index.d.ts +2 -0
- package/dist/provider/location-input/components/index.d.ts.map +1 -0
- package/dist/provider/location-input/index.d.ts +1 -0
- package/dist/provider/location-input/index.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/provider/provider-form/ProviderForm.js +1 -1
- package/dist/provider/venue-form/VenueForm.d.ts +3 -1
- package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
- package/dist/provider/venue-form/VenueForm.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 +4 -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 +1 -0
- 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/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +1 -1
- package/dist/sales/filters/SaleFilters.d.ts +1 -0
- package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
- package/dist/sales/payment-form/SalePaymentForm.js +1 -1
- package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
- package/dist/sales/source-of-sales/SourceOfSalesChart.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 -9
- package/{src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → dist/styles/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/events/EventCard.scss +12 -5
- package/dist/styles/form/CustomCheckbox.scss +6 -0
- package/dist/styles/header/Header.scss +0 -4
- package/dist/styles/iframe-events/Card.scss +1 -0
- package/dist/styles/notification/Notification.scss +4 -0
- package/dist/styles/packages.scss +3 -1
- package/dist/styles/resources-blocking/_index.scss +16 -0
- package/dist/styles/sales/BookingResults.scss +14 -6
- package/dist/styles/themes/bookedit/_index.scss +1 -0
- package/dist/styles/zones/ZoneForm.scss +3 -0
- package/dist/types/iframe.d.ts +1 -0
- package/dist/types/iframe.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
- package/dist/zone/form/ZoneForm.d.ts +1 -1
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +1 -1
- package/dist/zone/form/components/AvailableTimesControl.d.ts +2 -0
- 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 +1 -1
- 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 +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 +3 -3
- 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 +67 -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 +24 -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 +24 -22
- package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -12
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
- package/src/events/event-card/EventCard.tsx +6 -2
- package/src/events/event-card/utils.ts +89 -16
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +5 -1
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +12 -5
- package/src/events/event-statistic-modal/utils/index.ts +39 -34
- package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
- package/src/file-upload/FileUpload.tsx +3 -1
- package/src/iframe/activity-card/ActivityCard.stories.tsx +51 -0
- package/src/iframe/activity-card/ActivityCard.tsx +66 -0
- package/src/iframe/activity-card/index.ts +1 -0
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -2
- package/src/iframe/event/index.ts +0 -7
- package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +8 -2
- package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -2
- package/src/iframe/index.ts +1 -3
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +4 -3
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -1
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +17 -8
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +1 -15
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +15 -29
- 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 +62 -32
- package/src/iframe/order-process/constants.ts +1 -0
- package/src/iframe/page/Page.stories.tsx +2 -2
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +13 -6
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
- package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
- package/src/index.ts +3 -0
- package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
- package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
- package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
- package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
- package/src/number-of-people-input/components/index.ts +1 -0
- package/src/number-of-people-input/index.ts +2 -0
- package/src/product-set/control/DateAndRecurrenceInput.tsx +75 -2
- package/src/product-set/control/ProductSetControl.stories.tsx +0 -2
- package/src/product-set/control/ProductSetControl.tsx +44 -10
- package/src/product-set/control/ProductSetRecurrenceControl.tsx +14 -5
- package/src/product-set/form/ProductCategoriesControl.tsx +2 -1
- package/src/product-set/form/ProductSetForm.stories.tsx +9 -12
- package/src/product-set/form/ProductSetForm.tsx +19 -3
- 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/ProductCategory.stories.tsx +0 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +1 -30
- package/src/product-set/utils/index.ts +38 -0
- package/src/provider/location-input/LocationInput.tsx +21 -20
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/location-input/components/FormGroupControll.tsx +16 -0
- package/src/provider/location-input/components/index.ts +1 -0
- package/src/provider/location-input/index.ts +1 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +5 -13
- package/src/provider/venue-form/VenueForm.stories.tsx +24 -0
- package/src/provider/venue-form/VenueForm.tsx +55 -4
- package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
- package/src/recurrence-input/RecurrenceInput.tsx +12 -2
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -11
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +9 -0
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/sales/booking/results/BookingResults.stories.tsx +12 -7
- package/src/sales/booking/results/components/ResultCard.tsx +24 -3
- package/src/sales/coupon/control/CouponFormControl.tsx +5 -0
- package/src/sales/filters/SaleFilters.tsx +1 -0
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
- package/src/sales/source-of-sales/SourceOfSalesChart.tsx +31 -28
- 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 -9
- package/{dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → src/styles/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/events/EventCard.scss +12 -5
- package/src/styles/form/CustomCheckbox.scss +6 -0
- package/src/styles/header/Header.scss +0 -4
- package/src/styles/iframe-events/Card.scss +1 -0
- package/src/styles/notification/Notification.scss +4 -0
- package/src/styles/packages.scss +3 -1
- package/src/styles/resources-blocking/_index.scss +16 -0
- package/src/styles/sales/BookingResults.scss +14 -6
- package/src/styles/themes/bookedit/_index.scss +1 -0
- package/src/styles/zones/ZoneForm.scss +3 -0
- package/src/types/iframe.ts +1 -0
- package/src/typings.d.ts +11 -0
- package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
- package/src/zone/form/ZoneForm.tsx +1 -2
- package/src/zone/form/components/AvailableTimesControl.tsx +89 -88
- package/src/zone/form/components/GameDurationControl.tsx +46 -0
- package/src/zone/form/components/ZoneControl.tsx +4 -5
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +3 -59
- 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/iframe/event/event-details/EventDetails.d.ts +0 -10
- package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
- package/dist/iframe/event/event-details/EventDetails.js +0 -1
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
- package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/index.d.ts +0 -2
- package/dist/iframe/event/event-details/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
- package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
- package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/routes.js +0 -1
- package/dist/styles/iframe-customers-journey/_index.scss +0 -3
- package/src/iframe/activity-cards/activity-card/ActivityCard.stories.tsx +0 -52
- 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/iframe/event/event-details/EventDetails.stories.tsx +0 -187
- package/src/iframe/event/event-details/EventDetails.tsx +0 -92
- package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
- package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
- package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
- package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
- package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
- package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
- package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
- package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
- package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
- package/src/iframe/event/event-details/index.ts +0 -1
- package/src/iframe/event/event-details/utils/index.ts +0 -1
- package/src/iframe/event/event-details/utils/routes.ts +0 -6
- 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/dist/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.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
|
@@ -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) {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import {
|
|
4
|
+
ActivityCard,
|
|
5
|
+
ActivityCardProps,
|
|
6
|
+
LAYOUT_GRID,
|
|
7
|
+
LAYOUT_LIST,
|
|
8
|
+
} from "./ActivityCard";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: "Iframe/ActivityCard",
|
|
12
|
+
component: ActivityCard,
|
|
13
|
+
} as Meta;
|
|
14
|
+
|
|
15
|
+
export const GridView: Story<ActivityCardProps> = (props) => {
|
|
16
|
+
const [isSelected, setIsSelected] = React.useState(false);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<ActivityCard
|
|
20
|
+
{...props}
|
|
21
|
+
isSelected={isSelected}
|
|
22
|
+
onSelect={() => setIsSelected(true)}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
GridView.args = {
|
|
28
|
+
layout: LAYOUT_GRID,
|
|
29
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
30
|
+
duration: "60 mins",
|
|
31
|
+
price: "from £20",
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const ListView: Story<ActivityCardProps> = (props) => {
|
|
35
|
+
const [isSelected, setIsSelected] = React.useState(false);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<ActivityCard
|
|
39
|
+
{...props}
|
|
40
|
+
isSelected={isSelected}
|
|
41
|
+
onSelect={() => setIsSelected(true)}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
ListView.args = {
|
|
47
|
+
layout: LAYOUT_LIST,
|
|
48
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
49
|
+
duration: "60 mins",
|
|
50
|
+
price: "from £20",
|
|
51
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
|
|
4
|
+
export const LAYOUT_GRID = "grid";
|
|
5
|
+
export const LAYOUT_LIST = "list";
|
|
6
|
+
|
|
7
|
+
type Layout = typeof LAYOUT_GRID | typeof LAYOUT_LIST;
|
|
8
|
+
|
|
9
|
+
export type ActivityCardProps = {
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
duration: ReactNode;
|
|
12
|
+
price: ReactNode;
|
|
13
|
+
onSelect: () => void;
|
|
14
|
+
isSelected: boolean;
|
|
15
|
+
layout?: Layout;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const ActivityCard = ({
|
|
19
|
+
title,
|
|
20
|
+
duration,
|
|
21
|
+
price,
|
|
22
|
+
// image,
|
|
23
|
+
onSelect,
|
|
24
|
+
isSelected,
|
|
25
|
+
layout = LAYOUT_GRID,
|
|
26
|
+
}: ActivityCardProps) => {
|
|
27
|
+
if (layout === LAYOUT_GRID) {
|
|
28
|
+
return (
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
className={clsx("activity-card", isSelected && "active")}
|
|
32
|
+
onClick={onSelect}
|
|
33
|
+
>
|
|
34
|
+
<div className={clsx("d-flex", "flex-column")}>
|
|
35
|
+
<div className="activity-card-title">{title}</div>
|
|
36
|
+
|
|
37
|
+
{duration && <div>{duration}</div>}
|
|
38
|
+
|
|
39
|
+
{price && <div>{price}</div>}
|
|
40
|
+
</div>
|
|
41
|
+
</button>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div role="button" onClick={onSelect} onKeyPress={onSelect} tabIndex={0}>
|
|
47
|
+
<div
|
|
48
|
+
className={clsx("list-activity-card", {
|
|
49
|
+
active: isSelected,
|
|
50
|
+
})}
|
|
51
|
+
>
|
|
52
|
+
<div className="description">
|
|
53
|
+
<div className="title">{title}</div>
|
|
54
|
+
{duration && (
|
|
55
|
+
<div>
|
|
56
|
+
<p>{duration}</p>
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
59
|
+
|
|
60
|
+
{price && <div>{price}</div>}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<hr className="list-activity-card-hr" />
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
@@ -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 {
|
|
@@ -26,7 +26,6 @@ const MENU_STEPS = [
|
|
|
26
26
|
maxSubItems: 1,
|
|
27
27
|
quantityType: "constant",
|
|
28
28
|
type: "menuItems",
|
|
29
|
-
isRelyOnPeople: false,
|
|
30
29
|
collectUserInfo: false,
|
|
31
30
|
isTimeRelated: false,
|
|
32
31
|
hasTicket: false,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { EventBookingForm } from "./event-booking-form";
|
|
2
2
|
export { EventBookingView } from "./event-booking-view";
|
|
3
3
|
export { IframeEventCard, IframeEventCardSkeleton } from "./event-card";
|
|
4
|
-
export { EventDetails } from "./event-details";
|
|
5
4
|
export { TicketDescription } from "./ticket-description";
|
|
6
5
|
export { EventTables } from "./event-tables";
|
|
7
6
|
export { EventOrderSummary } from "./event-order-summary";
|
|
@@ -13,12 +12,6 @@ export {
|
|
|
13
12
|
} from "./event-order-short-summary";
|
|
14
13
|
export { EventDescription } from "./event-description";
|
|
15
14
|
export { EventProductSets, EventProductSetsProps } from "./event-product-sets";
|
|
16
|
-
export {
|
|
17
|
-
EventCalendar,
|
|
18
|
-
CalendarSelect,
|
|
19
|
-
CalendarSelectProps,
|
|
20
|
-
CalendarSelectOption,
|
|
21
|
-
} from "./event-calendar";
|
|
22
15
|
export {
|
|
23
16
|
EventStepVenueMapZones,
|
|
24
17
|
EventStepVenueMapZonesProps,
|
|
@@ -19,7 +19,10 @@ export const Default: Story = () => {
|
|
|
19
19
|
If you are a student at Bucks University you do not need to buy a ticket,
|
|
20
20
|
your general admission is included as part of the Big Deal packages."
|
|
21
21
|
images={[
|
|
22
|
-
{
|
|
22
|
+
{
|
|
23
|
+
id: 1,
|
|
24
|
+
url: "https://cdn.lickli.st/ZH4SRqrufMqcC8S1TWR3ELz9FU45he1t/images/original/000/000/000/000/481-b7e137ca90c91e24.jpeg",
|
|
25
|
+
} as Image,
|
|
23
26
|
]}
|
|
24
27
|
/>
|
|
25
28
|
</div>
|
|
@@ -38,7 +41,10 @@ export const Highlighted: Story = () => {
|
|
|
38
41
|
If you are a student at Bucks University you do not need to buy a ticket,
|
|
39
42
|
your general admission is included as part of the Big Deal packages."
|
|
40
43
|
images={[
|
|
41
|
-
{
|
|
44
|
+
{
|
|
45
|
+
id: 1,
|
|
46
|
+
url: "https://cdn.lickli.st/ZH4SRqrufMqcC8S1TWR3ELz9FU45he1t/images/original/000/000/000/000/481-b7e137ca90c91e24.jpeg",
|
|
47
|
+
} as Image,
|
|
42
48
|
]}
|
|
43
49
|
/>
|
|
44
50
|
</div>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode, useState } from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Image,
|
|
5
|
+
THUMBNAIL_IMAGE_SIZE,
|
|
6
|
+
} from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
4
7
|
import MediaService from "@licklist/plugins/dist/services/Media/MediaService";
|
|
5
8
|
import { TextExpand } from "../../../static/text-expand";
|
|
6
9
|
import { TipTapEditor } from "../../../tiptap-editor/TipTapEditor";
|
|
@@ -31,7 +34,9 @@ export function TicketDescription({
|
|
|
31
34
|
|
|
32
35
|
const wrapperClasses = clsx("ticket-description", className);
|
|
33
36
|
|
|
34
|
-
const imageSrc = images
|
|
37
|
+
const imageSrc = images
|
|
38
|
+
? MediaService.getImageSrc(images, THUMBNAIL_IMAGE_SIZE)
|
|
39
|
+
: null;
|
|
35
40
|
|
|
36
41
|
const descriptionWrapperStyle = {
|
|
37
42
|
"--description-wrapper-height": "inherit",
|
package/src/iframe/index.ts
CHANGED
|
@@ -3,14 +3,12 @@ export {
|
|
|
3
3
|
EventBookingView,
|
|
4
4
|
EventOrderSummary,
|
|
5
5
|
EventTables,
|
|
6
|
-
EventDetails,
|
|
7
6
|
IframeEventCard,
|
|
8
7
|
TicketDescription,
|
|
9
8
|
EventBookingProducts,
|
|
10
9
|
EventOrderShortSummary,
|
|
11
10
|
SummaryDataType,
|
|
12
11
|
EventDescription,
|
|
13
|
-
EventCalendar,
|
|
14
12
|
EventProductSets,
|
|
15
13
|
EventProductSetsProps,
|
|
16
14
|
IframeEventVenueMap,
|
|
@@ -43,5 +41,5 @@ export {
|
|
|
43
41
|
export { BackButton } from "./back-button";
|
|
44
42
|
export { PoweredBy } from "./powered-by";
|
|
45
43
|
export * from "./page";
|
|
46
|
-
export * from "./activity-
|
|
44
|
+
export * from "./activity-card";
|
|
47
45
|
export { CustomDateField, CustomDateFieldProps } from "./custom-fields";
|
|
@@ -11,9 +11,10 @@ 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
|
+
shouldHidePeopleAmount,
|
|
17
18
|
eventName,
|
|
18
19
|
transactionFee = 0,
|
|
19
20
|
productsWithErrors,
|
|
@@ -47,7 +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>
|
|
50
|
-
{
|
|
51
|
+
{time && <p className="m-0">{time}</p>}
|
|
51
52
|
</div>
|
|
52
53
|
<hr />
|
|
53
54
|
|
|
@@ -64,7 +65,7 @@ export const BookingSummary = ({
|
|
|
64
65
|
/>
|
|
65
66
|
);
|
|
66
67
|
})}
|
|
67
|
-
{!
|
|
68
|
+
{!shouldHidePeopleAmount && peopleAmount > 0 && (
|
|
68
69
|
<>
|
|
69
70
|
<hr />
|
|
70
71
|
<div className="d-flex justify-content-between mt-3">
|
|
@@ -6,12 +6,13 @@ export const ACCORDION_KEY = "booking-summary";
|
|
|
6
6
|
|
|
7
7
|
export type BookingSummaryProps = {
|
|
8
8
|
date: string;
|
|
9
|
+
time?: string;
|
|
9
10
|
menuSteps?: MenuStep[];
|
|
10
11
|
formValues?: {
|
|
11
12
|
[key: string]: Order;
|
|
12
13
|
};
|
|
13
14
|
totalWithDiscount?: number;
|
|
14
|
-
|
|
15
|
+
shouldHidePeopleAmount?: boolean;
|
|
15
16
|
eventName?: string;
|
|
16
17
|
hasPeopleInput?: boolean;
|
|
17
18
|
transactionFee?: number;
|
|
@@ -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 {
|
|
25
|
-
import { STEP_FORM_ID } from "../../constants";
|
|
25
|
+
import { MIN_SPEND_ERROR, 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,12 +117,19 @@ export const CalendarStepsForm = forwardRef<
|
|
|
117
117
|
);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const orderError = verifyCategoryItems(
|
|
121
|
+
values,
|
|
122
|
+
step.productCategories,
|
|
123
|
+
isLastMenuStep
|
|
124
|
+
);
|
|
121
125
|
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
if (orderError) {
|
|
127
|
+
const categoryId = orderError.id
|
|
128
|
+
? `category_${orderError.id}`
|
|
129
|
+
: MIN_SPEND_ERROR;
|
|
130
|
+
setStepFormError(orderError.message);
|
|
131
|
+
setError(categoryId as never, {
|
|
132
|
+
message: orderError.message,
|
|
126
133
|
});
|
|
127
134
|
return;
|
|
128
135
|
}
|
|
@@ -363,3 +370,5 @@ export const CalendarStepsForm = forwardRef<
|
|
|
363
370
|
);
|
|
364
371
|
}
|
|
365
372
|
);
|
|
373
|
+
|
|
374
|
+
CalendarStepsForm.displayName = "CalendarStepsForm";
|
|
@@ -84,23 +84,9 @@ export const CategoryProduct = ({
|
|
|
84
84
|
// but didn't click on number input.
|
|
85
85
|
// If it will be required then required check fired firstly.
|
|
86
86
|
|
|
87
|
-
const {
|
|
88
|
-
isRequired = false,
|
|
89
|
-
maxAmount = 0,
|
|
90
|
-
minAmount = 0,
|
|
91
|
-
minSpend,
|
|
92
|
-
price,
|
|
93
|
-
} = product;
|
|
87
|
+
const { isRequired = false, maxAmount = 0, minAmount = 0 } = product;
|
|
94
88
|
|
|
95
89
|
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
90
|
|
|
105
91
|
if (!value) return true;
|
|
106
92
|
|
|
@@ -3,6 +3,7 @@ import clsx from "clsx";
|
|
|
3
3
|
import { Button } from "react-bootstrap";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { FieldValues, RefCallBack, UseFormClearErrors } from "react-hook-form";
|
|
6
|
+
import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
|
|
6
7
|
import { NumberInput } from "../NumberInput";
|
|
7
8
|
import { Product, ProductCategory } from "../../../../../../types";
|
|
8
9
|
|
|
@@ -11,8 +12,10 @@ interface FormOrderItem {
|
|
|
11
12
|
name: string;
|
|
12
13
|
price: number;
|
|
13
14
|
productsCategoryId: number;
|
|
15
|
+
zoneId?: Zone["id"];
|
|
14
16
|
deposit?: number | null;
|
|
15
17
|
quantity: number;
|
|
18
|
+
capacity?: number | null;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
interface ProductQuantityInputProps {
|
|
@@ -29,7 +32,7 @@ interface ProductQuantityInputProps {
|
|
|
29
32
|
export const ProductQuantityInput = ({
|
|
30
33
|
product,
|
|
31
34
|
category,
|
|
32
|
-
onChange,
|
|
35
|
+
onChange: _onChange,
|
|
33
36
|
clearErrors,
|
|
34
37
|
refCallback,
|
|
35
38
|
productInfo,
|
|
@@ -38,14 +41,16 @@ export const ProductQuantityInput = ({
|
|
|
38
41
|
}: ProductQuantityInputProps) => {
|
|
39
42
|
const { t } = useTranslation("Design");
|
|
40
43
|
|
|
41
|
-
const
|
|
42
|
-
|
|
44
|
+
const onChange = (quantity: number | null) => {
|
|
45
|
+
_onChange({
|
|
43
46
|
id: product.id,
|
|
44
47
|
name: product.name,
|
|
45
48
|
deposit,
|
|
46
49
|
price: product.price,
|
|
47
50
|
productsCategoryId: category.id,
|
|
48
|
-
|
|
51
|
+
zoneId: category.zone?.id,
|
|
52
|
+
quantity,
|
|
53
|
+
capacity: product?.capacity,
|
|
49
54
|
});
|
|
50
55
|
};
|
|
51
56
|
|
|
@@ -56,6 +61,7 @@ export const ProductQuantityInput = ({
|
|
|
56
61
|
</div>
|
|
57
62
|
);
|
|
58
63
|
}
|
|
64
|
+
|
|
59
65
|
if (product?.maxAmount === 1) {
|
|
60
66
|
return (
|
|
61
67
|
<Button
|
|
@@ -67,46 +73,26 @@ export const ProductQuantityInput = ({
|
|
|
67
73
|
}`,
|
|
68
74
|
invalid && "error"
|
|
69
75
|
)}
|
|
70
|
-
onClick={
|
|
76
|
+
onClick={() => onChange(productInfo?.quantity ? 0 : 1)}
|
|
71
77
|
>
|
|
72
78
|
{t(`Design:${productInfo?.quantity ? "unselect" : "select"}`)}
|
|
73
79
|
</Button>
|
|
74
80
|
);
|
|
75
81
|
}
|
|
82
|
+
|
|
76
83
|
return (
|
|
77
84
|
<NumberInput
|
|
78
85
|
ref={refCallback}
|
|
79
86
|
onChange={(val) => {
|
|
80
|
-
onChange(
|
|
81
|
-
id: product.id,
|
|
82
|
-
name: product.name,
|
|
83
|
-
deposit,
|
|
84
|
-
price: product.price,
|
|
85
|
-
productsCategoryId: category.id,
|
|
86
|
-
quantity: val || null,
|
|
87
|
-
});
|
|
87
|
+
onChange(val || null);
|
|
88
88
|
clearErrors(`${product.id}` as const);
|
|
89
89
|
}}
|
|
90
90
|
onArrowDown={() => {
|
|
91
|
-
onChange(
|
|
92
|
-
id: product.id,
|
|
93
|
-
name: product.name,
|
|
94
|
-
deposit,
|
|
95
|
-
price: product.price,
|
|
96
|
-
productsCategoryId: category.id,
|
|
97
|
-
quantity: productInfo?.quantity - 1 || 0,
|
|
98
|
-
});
|
|
91
|
+
onChange(productInfo?.quantity - 1 || 0);
|
|
99
92
|
clearErrors(`${product.id}` as const);
|
|
100
93
|
}}
|
|
101
94
|
onArrowUp={() => {
|
|
102
|
-
onChange(
|
|
103
|
-
id: product.id,
|
|
104
|
-
name: product.name,
|
|
105
|
-
deposit,
|
|
106
|
-
price: product.price,
|
|
107
|
-
productsCategoryId: category.id,
|
|
108
|
-
quantity: (productInfo?.quantity ?? 0) + 1,
|
|
109
|
-
});
|
|
95
|
+
onChange((productInfo?.quantity ?? 0) + 1);
|
|
110
96
|
clearErrors(`${product.id}` as const);
|
|
111
97
|
}}
|
|
112
98
|
min={0}
|
|
@@ -10,12 +10,14 @@ import Icon from "../../../../static/Icon";
|
|
|
10
10
|
export interface ErrorModalProps {
|
|
11
11
|
isOpen: boolean;
|
|
12
12
|
onClose?: () => void;
|
|
13
|
+
message?: string;
|
|
13
14
|
messageKey?: string;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export const ErrorModal = ({
|
|
17
18
|
isOpen = false,
|
|
18
19
|
onClose,
|
|
20
|
+
message,
|
|
19
21
|
messageKey,
|
|
20
22
|
}: ErrorModalProps) => {
|
|
21
23
|
const { t } = useTranslation("Design");
|
|
@@ -47,15 +49,16 @@ export const ErrorModal = ({
|
|
|
47
49
|
</ModalHeader>
|
|
48
50
|
<ModalBody className="confirmation-modal-body">
|
|
49
51
|
<div className="d-flex m-5 justify-content-center manual-form-error">
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
{message ||
|
|
53
|
+
(messageKey ? (
|
|
54
|
+
t(messageKey)
|
|
55
|
+
) : (
|
|
56
|
+
<Trans
|
|
57
|
+
t={t}
|
|
58
|
+
i18nKey="pleaseSelectAtLeastFrom"
|
|
59
|
+
values={{ min: 1, type: "item", from: "those categories" }}
|
|
60
|
+
/>
|
|
61
|
+
))}
|
|
59
62
|
</div>
|
|
60
63
|
</ModalBody>
|
|
61
64
|
</Modal>
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
export const fancyTimeFormat = (
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
timerString += `${mins}:${secs < 10 ? "0" : ""}`;
|
|
8
|
-
timerString += `${secs}`;
|
|
9
|
-
return timerString;
|
|
1
|
+
export const fancyTimeFormat = (milliseconds: number) => {
|
|
2
|
+
const totalSeconds = Math.floor(milliseconds / 1000);
|
|
3
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
4
|
+
const seconds = totalSeconds % 60;
|
|
5
|
+
const formattedSecs = seconds < 10 ? `0${seconds}` : `${seconds}`;
|
|
6
|
+
return `${minutes}:${formattedSecs}`;
|
|
10
7
|
};
|