@licklist/design 0.44.486-dev.7 → 0.44.486-dev.71
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 +21 -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 +7 -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-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 -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/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 +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 -1
- 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 +5 -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 +59 -0
- package/src/availability-indicator/index.ts +1 -0
- package/src/calendar/Calendar.stories.tsx +33 -0
- package/src/calendar/Calendar.tsx +46 -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 +19 -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 +93 -16
- 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 -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 +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.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 -1
- 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 +5 -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.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
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import { EventDetails } from "./EventDetails";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Iframe/Event/EventDetails",
|
|
7
|
-
component: EventDetails,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
const productCategories = [
|
|
11
|
-
{
|
|
12
|
-
id: 1,
|
|
13
|
-
name: "Early Bird General Admission",
|
|
14
|
-
products: [
|
|
15
|
-
{
|
|
16
|
-
id: 7,
|
|
17
|
-
name: "Beer",
|
|
18
|
-
description: `Ticket <em>is</em> valid for students and non students.
|
|
19
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
20
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
21
|
-
minQuantity: 1,
|
|
22
|
-
maxQuantity: 10,
|
|
23
|
-
price: 1,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 8,
|
|
27
|
-
name: "Wine",
|
|
28
|
-
description: `Ticket is valid for students and non students.
|
|
29
|
-
You do not need <strong>student ID</strong> for this event but do require regular age ID e.g. driving licence or passport.
|
|
30
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
31
|
-
minQuantity: 1,
|
|
32
|
-
maxQuantity: 10,
|
|
33
|
-
price: 1,
|
|
34
|
-
isRequired: true,
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: 2,
|
|
40
|
-
name: "Nice",
|
|
41
|
-
products: [
|
|
42
|
-
{
|
|
43
|
-
id: 3,
|
|
44
|
-
name: "Beer",
|
|
45
|
-
description: `Ticket is valid for students and non students.
|
|
46
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
47
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
48
|
-
minQuantity: 1,
|
|
49
|
-
maxQuantity: 10,
|
|
50
|
-
price: 1,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: 5,
|
|
54
|
-
name: "Wine",
|
|
55
|
-
description: `Ticket is valid for students and non students.
|
|
56
|
-
You do not need <strong>student ID</strong> for this event but do require regular age ID e.g. driving licence or passport.
|
|
57
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
58
|
-
minQuantity: 1,
|
|
59
|
-
maxQuantity: 10,
|
|
60
|
-
price: 1,
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
|
|
66
|
-
const productCategories2 = [
|
|
67
|
-
{
|
|
68
|
-
id: 1,
|
|
69
|
-
name: "fine",
|
|
70
|
-
products: [
|
|
71
|
-
{
|
|
72
|
-
id: 9,
|
|
73
|
-
name: "Beer",
|
|
74
|
-
description: `Ticket is valid for students and non students.
|
|
75
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
76
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
77
|
-
minQuantity: 1,
|
|
78
|
-
maxQuantity: 10,
|
|
79
|
-
price: 1,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 10,
|
|
83
|
-
name: "Wine",
|
|
84
|
-
description: `Ticket is valid for students and non students.
|
|
85
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
86
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
87
|
-
minQuantity: 1,
|
|
88
|
-
maxQuantity: 10,
|
|
89
|
-
price: 1,
|
|
90
|
-
isRequired: true,
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: 2,
|
|
96
|
-
name: "Nice",
|
|
97
|
-
products: [
|
|
98
|
-
{
|
|
99
|
-
id: 11,
|
|
100
|
-
name: "Beer",
|
|
101
|
-
description: `Ticket is valid for students and non students.
|
|
102
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
103
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
104
|
-
minQuantity: 1,
|
|
105
|
-
maxQuantity: 10,
|
|
106
|
-
price: 1,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: 12,
|
|
110
|
-
name: "Wine",
|
|
111
|
-
description: `Ticket is valid for students and non students.
|
|
112
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
113
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
114
|
-
minQuantity: 1,
|
|
115
|
-
maxQuantity: 10,
|
|
116
|
-
price: 1,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
];
|
|
121
|
-
|
|
122
|
-
const menus = [
|
|
123
|
-
{
|
|
124
|
-
id: 1,
|
|
125
|
-
name: "Menu 1",
|
|
126
|
-
menuSteps: [
|
|
127
|
-
{
|
|
128
|
-
id: 1,
|
|
129
|
-
name: "Burger",
|
|
130
|
-
productCategories: productCategories,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
id: 2,
|
|
134
|
-
name: "Cheese",
|
|
135
|
-
productCategories: productCategories2,
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
},
|
|
139
|
-
];
|
|
140
|
-
|
|
141
|
-
const defaultValues = {
|
|
142
|
-
"8": {
|
|
143
|
-
id: 8,
|
|
144
|
-
name: "Wine",
|
|
145
|
-
price: 1,
|
|
146
|
-
productsCategoryId: 1,
|
|
147
|
-
quantity: 1,
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
export function Default() {
|
|
152
|
-
const [_order, setOrder] = useState({});
|
|
153
|
-
|
|
154
|
-
const onSubmit = (values: any) => {
|
|
155
|
-
setOrder(values);
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
return (
|
|
159
|
-
<div>
|
|
160
|
-
<EventDetails
|
|
161
|
-
menus={menus}
|
|
162
|
-
description="On the other hand, we denounce with righteous indignation and dislike
|
|
163
|
-
men who are so beguiled and demoralized by the charms of pleasure of
|
|
164
|
-
the moment, so blinded by desire, that they cannot foresee the pain
|
|
165
|
-
and trouble that are bound to ensue; and equal blame belongs to those
|
|
166
|
-
who fail in their duty through weakness of will, which is the same as
|
|
167
|
-
saying through shrinking from toil and pain. These cases are perfectly
|
|
168
|
-
simple and easy to distinguish. In a free hour, when our power of
|
|
169
|
-
choice is untrammelled and when nothing prevents our being able to do
|
|
170
|
-
what we like best, every pleasure is to be welcomed and every pain
|
|
171
|
-
avoided. But in certain circumstances and owing to the claims of duty
|
|
172
|
-
or the obligations of business it will frequently occur that pleasures
|
|
173
|
-
have to be repudiated and annoyances accepted. The wise man therefore
|
|
174
|
-
always holds in these matters to this principle of selection: he
|
|
175
|
-
rejects pleasures to secure other greater pleasures, or else he
|
|
176
|
-
endures pains to avoid worse pains."
|
|
177
|
-
cost={6}
|
|
178
|
-
title="Glitterbomb Bucks / Baga Chipz"
|
|
179
|
-
date="Sat 2nd May"
|
|
180
|
-
// eslint-disable-next-line max-len
|
|
181
|
-
imageSrc="https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80 387w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80 687w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80 774w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=987&q=80 987w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80 1287w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1374&q=80 1374w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1587&q=80 1587w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1887&q=80 1887w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1974&q=80 1974w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2187&q=80 2187w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2487&q=80 2487w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2574&q=80 2574w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2787&q=80 2787w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3087&q=80 3087w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3174&q=80 3174w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3387&q=80 3387w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3687&q=80 3687w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80 3774w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3987&q=80 3987w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=4000&q=80 4000w"
|
|
182
|
-
onSubmit={onSubmit}
|
|
183
|
-
defaultValues={defaultValues}
|
|
184
|
-
/>
|
|
185
|
-
</div>
|
|
186
|
-
);
|
|
187
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import React, { useState, useMemo } from "react";
|
|
2
|
-
import { MemoryRouter, Route } from "react-router-dom";
|
|
3
|
-
import {
|
|
4
|
-
EventDetailsForm,
|
|
5
|
-
EventDetailsFormProps,
|
|
6
|
-
} from "./components/event-details-form";
|
|
7
|
-
import { WizardFormValues } from "../../../types";
|
|
8
|
-
import { routesByStepsCount } from "./utils";
|
|
9
|
-
|
|
10
|
-
type EventDetailsProps = EventDetailsFormProps & {
|
|
11
|
-
onSubmit: (values: WizardFormValues) => void;
|
|
12
|
-
defaultValues?: WizardFormValues;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function EventDetails({
|
|
16
|
-
onSubmit,
|
|
17
|
-
menus,
|
|
18
|
-
defaultValues = {},
|
|
19
|
-
...restProps
|
|
20
|
-
}: EventDetailsProps) {
|
|
21
|
-
const [stepFormValues, setStepFormValues] =
|
|
22
|
-
useState<WizardFormValues>(defaultValues);
|
|
23
|
-
|
|
24
|
-
const menu = menus && menus?.length !== 0 ? menus[0] : null;
|
|
25
|
-
const numberOfSteps = menu?.menuSteps?.length || 0;
|
|
26
|
-
|
|
27
|
-
const routes = useMemo(
|
|
28
|
-
() => routesByStepsCount(numberOfSteps),
|
|
29
|
-
[numberOfSteps]
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
const submitFormsValues = (values: WizardFormValues) => {
|
|
33
|
-
if (!onSubmit) return;
|
|
34
|
-
|
|
35
|
-
onSubmit(values);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const saveFormValues = ({
|
|
39
|
-
values,
|
|
40
|
-
pathname,
|
|
41
|
-
isBackAction = false,
|
|
42
|
-
}: {
|
|
43
|
-
values: WizardFormValues;
|
|
44
|
-
pathname?: string;
|
|
45
|
-
isBackAction?: boolean;
|
|
46
|
-
}) => {
|
|
47
|
-
const nextValues = { ...stepFormValues, ...values };
|
|
48
|
-
setStepFormValues(nextValues);
|
|
49
|
-
|
|
50
|
-
if (!pathname || (routes[routes.length - 1] === pathname && !isBackAction))
|
|
51
|
-
return submitFormsValues(nextValues);
|
|
52
|
-
|
|
53
|
-
return undefined;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
if (routes.length) {
|
|
57
|
-
return (
|
|
58
|
-
<MemoryRouter initialEntries={routes} initialIndex={0}>
|
|
59
|
-
{routes.map((route: string) => {
|
|
60
|
-
return (
|
|
61
|
-
<Route
|
|
62
|
-
path={route}
|
|
63
|
-
exact
|
|
64
|
-
key={route}
|
|
65
|
-
render={() => (
|
|
66
|
-
<EventDetailsForm
|
|
67
|
-
{...restProps}
|
|
68
|
-
menu={menu}
|
|
69
|
-
onFormSubmit={saveFormValues}
|
|
70
|
-
routes={routes}
|
|
71
|
-
numberOfSteps={numberOfSteps}
|
|
72
|
-
defaultValues={stepFormValues}
|
|
73
|
-
/>
|
|
74
|
-
)}
|
|
75
|
-
/>
|
|
76
|
-
);
|
|
77
|
-
})}
|
|
78
|
-
</MemoryRouter>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<EventDetailsForm
|
|
84
|
-
{...restProps}
|
|
85
|
-
menu={menu}
|
|
86
|
-
onFormSubmit={saveFormValues}
|
|
87
|
-
routes={routes}
|
|
88
|
-
numberOfSteps={numberOfSteps}
|
|
89
|
-
defaultValues={stepFormValues}
|
|
90
|
-
/>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
-
import { EventDetails } from "./EventDetails";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Iframe/Event/EventDetailsOneStepForm",
|
|
8
|
-
component: EventDetails,
|
|
9
|
-
} as Meta;
|
|
10
|
-
|
|
11
|
-
const productCategories = [
|
|
12
|
-
{
|
|
13
|
-
id: 1,
|
|
14
|
-
name: "Early Bird General Admission",
|
|
15
|
-
products: [
|
|
16
|
-
{
|
|
17
|
-
id: 7,
|
|
18
|
-
name: "Beer",
|
|
19
|
-
description: `Ticket is valid for students and non students.
|
|
20
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
21
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
22
|
-
minQuantity: 1,
|
|
23
|
-
maxQuantity: 10,
|
|
24
|
-
price: 1,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 8,
|
|
28
|
-
name: "Wine",
|
|
29
|
-
description: `Ticket is valid for students and non students.
|
|
30
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
31
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
32
|
-
minQuantity: 1,
|
|
33
|
-
maxQuantity: 10,
|
|
34
|
-
price: 1,
|
|
35
|
-
isRequired: true,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: 2,
|
|
41
|
-
name: "Nice",
|
|
42
|
-
products: [
|
|
43
|
-
{
|
|
44
|
-
id: 3,
|
|
45
|
-
name: "Beer",
|
|
46
|
-
description: `Ticket is valid for students and non students.
|
|
47
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
48
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
49
|
-
minQuantity: 1,
|
|
50
|
-
maxQuantity: 10,
|
|
51
|
-
price: 1,
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: 5,
|
|
55
|
-
name: "Wine",
|
|
56
|
-
description: `Ticket is valid for students and non students.
|
|
57
|
-
You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
|
|
58
|
-
Ticket valid for entry before 11.30pm for 12.30am showtime.`,
|
|
59
|
-
minQuantity: 1,
|
|
60
|
-
maxQuantity: 10,
|
|
61
|
-
price: 1,
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
];
|
|
66
|
-
|
|
67
|
-
const menus = [
|
|
68
|
-
{
|
|
69
|
-
id: 1,
|
|
70
|
-
name: "Menu 1",
|
|
71
|
-
menuSteps: [
|
|
72
|
-
{
|
|
73
|
-
id: 1,
|
|
74
|
-
name: "Burger",
|
|
75
|
-
productCategories: productCategories,
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
export function Default() {
|
|
82
|
-
const [_order, setOrder] = useState({});
|
|
83
|
-
|
|
84
|
-
const onSubmit = (values: any) => {
|
|
85
|
-
setOrder(values);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
const showImage = boolean("showImage", true);
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
<div>
|
|
92
|
-
<EventDetails
|
|
93
|
-
menus={menus}
|
|
94
|
-
description="On the other hand, we denounce with righteous indignation and dislike
|
|
95
|
-
men who are so beguiled and demoralized by the charms of pleasure of
|
|
96
|
-
the moment, so blinded by desire, that they cannot foresee the pain
|
|
97
|
-
and trouble that are bound to ensue; and equal blame belongs to those
|
|
98
|
-
who fail in their duty through weakness of will, which is the same as
|
|
99
|
-
saying through shrinking from toil and pain. These cases are perfectly
|
|
100
|
-
simple and easy to distinguish. In a free hour, when our power of
|
|
101
|
-
choice is untrammelled and when nothing prevents our being able to do
|
|
102
|
-
what we like best, every pleasure is to be welcomed and every pain
|
|
103
|
-
avoided. But in certain circumstances and owing to the claims of duty
|
|
104
|
-
or the obligations of business it will frequently occur that pleasures
|
|
105
|
-
have to be repudiated and annoyances accepted. The wise man therefore
|
|
106
|
-
always holds in these matters to this principle of selection: he
|
|
107
|
-
rejects pleasures to secure other greater pleasures, or else he
|
|
108
|
-
endures pains to avoid worse pains."
|
|
109
|
-
cost={6}
|
|
110
|
-
title="Glitterbomb Bucks / Baga Chipz"
|
|
111
|
-
date="Sat 2nd May"
|
|
112
|
-
imageSrc={
|
|
113
|
-
// eslint-disable-next-line max-len
|
|
114
|
-
showImage
|
|
115
|
-
? "https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80 387w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80 687w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80 774w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=987&q=80 987w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80 1287w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1374&q=80 1374w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1587&q=80 1587w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1887&q=80 1887w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1974&q=80 1974w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2187&q=80 2187w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2487&q=80 2487w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2574&q=80 2574w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2787&q=80 2787w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3087&q=80 3087w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3174&q=80 3174w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3387&q=80 3387w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3687&q=80 3687w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80 3774w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3987&q=80 3987w, https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=4000&q=80 4000w"
|
|
116
|
-
: null
|
|
117
|
-
}
|
|
118
|
-
onSubmit={onSubmit}
|
|
119
|
-
relyOnPeopleCategoryIds={[1]}
|
|
120
|
-
/>
|
|
121
|
-
</div>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useIntl } from "react-intl";
|
|
3
|
-
import { useFormContext, Controller } from "react-hook-form";
|
|
4
|
-
import clsx from "clsx";
|
|
5
|
-
import { useTranslation, Trans } from "react-i18next";
|
|
6
|
-
import { TicketDescription } from "../../../ticket-description";
|
|
7
|
-
import { NumberInput } from "../../../../../static";
|
|
8
|
-
import { ProductCategory, Product } from "../../../../../types";
|
|
9
|
-
|
|
10
|
-
interface CategoryProductProps {
|
|
11
|
-
product: Product;
|
|
12
|
-
category: ProductCategory;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const CategoryProduct = ({
|
|
16
|
-
product,
|
|
17
|
-
category,
|
|
18
|
-
}: CategoryProductProps) => {
|
|
19
|
-
const { formatNumber } = useIntl();
|
|
20
|
-
const { t } = useTranslation("Design");
|
|
21
|
-
const { control, clearErrors } = useFormContext();
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<Controller
|
|
25
|
-
control={control}
|
|
26
|
-
name={`${product.id}` as const}
|
|
27
|
-
rules={{
|
|
28
|
-
required: product.isRequired,
|
|
29
|
-
validate: product.isRequired
|
|
30
|
-
? (product) => product?.quantity > 0
|
|
31
|
-
: undefined,
|
|
32
|
-
}}
|
|
33
|
-
render={({
|
|
34
|
-
field: { onChange, value: productInfo = {} },
|
|
35
|
-
fieldState: { invalid },
|
|
36
|
-
}) => {
|
|
37
|
-
return (
|
|
38
|
-
<div id={String(product.id)}>
|
|
39
|
-
<div className={clsx("iframe-event__product", invalid && "error")}>
|
|
40
|
-
<TicketDescription
|
|
41
|
-
title={product.name}
|
|
42
|
-
description={product.description}
|
|
43
|
-
className="iframe-event__product-description"
|
|
44
|
-
images={product.images}
|
|
45
|
-
/>
|
|
46
|
-
|
|
47
|
-
<NumberInput
|
|
48
|
-
onChange={(val) => {
|
|
49
|
-
onChange({
|
|
50
|
-
id: product.id,
|
|
51
|
-
quantity: val,
|
|
52
|
-
name: product.name,
|
|
53
|
-
price: product.price,
|
|
54
|
-
productsCategoryId: category.id,
|
|
55
|
-
});
|
|
56
|
-
clearErrors(`${product.id}` as const);
|
|
57
|
-
}}
|
|
58
|
-
onArrowDown={() => {
|
|
59
|
-
onChange({
|
|
60
|
-
id: product.id,
|
|
61
|
-
quantity: productInfo?.quantity - 1 || 0,
|
|
62
|
-
name: product.name,
|
|
63
|
-
price: product.price,
|
|
64
|
-
productsCategoryId: category.id,
|
|
65
|
-
});
|
|
66
|
-
clearErrors(`${product.id}` as const);
|
|
67
|
-
}}
|
|
68
|
-
onArrowUp={() => {
|
|
69
|
-
onChange({
|
|
70
|
-
id: product.id,
|
|
71
|
-
quantity: (productInfo?.quantity ?? 0) + 1,
|
|
72
|
-
name: product.name,
|
|
73
|
-
price: product.price,
|
|
74
|
-
productsCategoryId: category.id,
|
|
75
|
-
});
|
|
76
|
-
clearErrors(`${product.id}` as const);
|
|
77
|
-
}}
|
|
78
|
-
min={0}
|
|
79
|
-
value={productInfo?.quantity || 0}
|
|
80
|
-
className={clsx(
|
|
81
|
-
"iframe-event__product-count",
|
|
82
|
-
invalid && "error"
|
|
83
|
-
)}
|
|
84
|
-
/>
|
|
85
|
-
<span className="iframe-event__product-price-multiplier">X</span>
|
|
86
|
-
<span className="iframe-event__product-price">
|
|
87
|
-
{formatNumber(product.price * (productInfo?.quantity || 1), {
|
|
88
|
-
style: "currency",
|
|
89
|
-
currency: "GBP",
|
|
90
|
-
})}
|
|
91
|
-
</span>
|
|
92
|
-
</div>
|
|
93
|
-
{invalid && (
|
|
94
|
-
<div className="d-flex mt-3 ml-5 mr-5 w-100">
|
|
95
|
-
<p className="iframe-event__message-error">
|
|
96
|
-
<Trans
|
|
97
|
-
t={t}
|
|
98
|
-
i18nKey="pleaseSelectAtLeastFrom"
|
|
99
|
-
values={{ min: 1, type: "item", from: "this category" }}
|
|
100
|
-
/>
|
|
101
|
-
</p>
|
|
102
|
-
</div>
|
|
103
|
-
)}
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
}}
|
|
107
|
-
/>
|
|
108
|
-
);
|
|
109
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CategoryProduct } from "./CategoryProduct";
|