@licklist/design 0.44.486-dev.8 → 0.44.486-dev.81
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 +66 -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
|
@@ -5,6 +5,7 @@ import { useFormContext } from "react-hook-form";
|
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import CountryCodeSelect from "../../static/CountryCodeSelect";
|
|
7
7
|
import { LocationInputValues } from ".";
|
|
8
|
+
import { FormGroupControll } from "./components";
|
|
8
9
|
|
|
9
10
|
export function LocationInput() {
|
|
10
11
|
const {
|
|
@@ -13,32 +14,32 @@ export function LocationInput() {
|
|
|
13
14
|
} = useFormContext<LocationInputValues>();
|
|
14
15
|
const { t } = useTranslation("Design");
|
|
15
16
|
|
|
16
|
-
const addressId = useId();
|
|
17
|
-
const cityId = useId();
|
|
18
|
-
const stateId = useId();
|
|
19
|
-
const postcodeId = useId();
|
|
20
17
|
const countryId = useId();
|
|
21
18
|
|
|
22
19
|
return (
|
|
23
20
|
<>
|
|
24
21
|
<input {...register("location.latitude")} type="hidden" />
|
|
25
22
|
<input {...register("location.longitude")} type="hidden" />
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
23
|
+
<FormGroupControll
|
|
24
|
+
error={errors?.location?.street}
|
|
25
|
+
name="location.street"
|
|
26
|
+
label={t("locationStreet")}
|
|
27
|
+
/>
|
|
28
|
+
<FormGroupControll
|
|
29
|
+
error={errors?.location?.city}
|
|
30
|
+
name="location.city"
|
|
31
|
+
label={t("locationCity")}
|
|
32
|
+
/>
|
|
33
|
+
<FormGroupControll
|
|
34
|
+
error={errors?.location?.state}
|
|
35
|
+
name="location.state"
|
|
36
|
+
label={t("locationState")}
|
|
37
|
+
/>
|
|
38
|
+
<FormGroupControll
|
|
39
|
+
error={errors?.location?.postcode}
|
|
40
|
+
name="location.postcode"
|
|
41
|
+
label={t("locationPostcode")}
|
|
42
|
+
/>
|
|
42
43
|
<Form.Group controlId={countryId}>
|
|
43
44
|
<Form.Label>{t("locationCountry")}</Form.Label>
|
|
44
45
|
<CountryCodeSelect
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
2
|
import { useFormContext } from "react-hook-form";
|
|
3
3
|
import en from "react-phone-number-input/locale/en.json";
|
|
4
4
|
import { LocationInputValues } from ".";
|
|
@@ -13,7 +13,7 @@ export function LocationInputDescription() {
|
|
|
13
13
|
"postcode",
|
|
14
14
|
"country",
|
|
15
15
|
] as const;
|
|
16
|
-
const fields = fieldNames.reduce<
|
|
16
|
+
const fields = fieldNames.reduce<ReactElement[]>((acc, field) => {
|
|
17
17
|
const value = values?.[field];
|
|
18
18
|
if (!value) return acc;
|
|
19
19
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Form } from "react-bootstrap";
|
|
3
|
+
import { useFormContext } from "react-hook-form";
|
|
4
|
+
|
|
5
|
+
export const FormGroupControll = ({ name, label, error }) => {
|
|
6
|
+
const { register } = useFormContext();
|
|
7
|
+
return (
|
|
8
|
+
<Form.Group>
|
|
9
|
+
<Form.Label>{label}</Form.Label>
|
|
10
|
+
<Form.Control {...register(name)} isInvalid={!!error} />
|
|
11
|
+
<Form.Control.Feedback type="invalid">
|
|
12
|
+
{error?.message}
|
|
13
|
+
</Form.Control.Feedback>
|
|
14
|
+
</Form.Group>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FormGroupControll";
|
|
@@ -4,7 +4,6 @@ import { useFormContext } from "react-hook-form";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { useId } from "@react-aria/utils";
|
|
6
6
|
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
7
|
-
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
8
7
|
import { Typeahead, TypeaheadOptions } from "../../typeahead";
|
|
9
8
|
import { MAX_DESCRIPTION_CHARACTERS_LENGTH } from "../constants";
|
|
10
9
|
import {
|
|
@@ -70,8 +69,7 @@ export function ProviderDetailsInput({
|
|
|
70
69
|
isInvalid={Boolean(errors.name)}
|
|
71
70
|
/>
|
|
72
71
|
<Form.Control.Feedback type="invalid">
|
|
73
|
-
{
|
|
74
|
-
errors.name?.message}
|
|
72
|
+
{errors.name?.message}
|
|
75
73
|
</Form.Control.Feedback>
|
|
76
74
|
</Form.Group>
|
|
77
75
|
|
|
@@ -95,8 +93,7 @@ export function ProviderDetailsInput({
|
|
|
95
93
|
isInvalid={Boolean(errors.description)}
|
|
96
94
|
/>
|
|
97
95
|
<Form.Control.Feedback type="invalid">
|
|
98
|
-
{
|
|
99
|
-
errors.description?.message}
|
|
96
|
+
{errors.description?.message}
|
|
100
97
|
</Form.Control.Feedback>
|
|
101
98
|
</Form.Group>
|
|
102
99
|
|
|
@@ -120,10 +117,7 @@ export function ProviderDetailsInput({
|
|
|
120
117
|
isInvalid={Boolean(errors.email)}
|
|
121
118
|
/>
|
|
122
119
|
<Form.Control.Feedback type="invalid">
|
|
123
|
-
{
|
|
124
|
-
errors.email?.message}
|
|
125
|
-
{HookFormService.hasError(errors.email, "pattern") &&
|
|
126
|
-
errors.email?.message}
|
|
120
|
+
{errors.email?.message}
|
|
127
121
|
</Form.Control.Feedback>
|
|
128
122
|
</Form.Group>
|
|
129
123
|
|
|
@@ -141,8 +135,7 @@ export function ProviderDetailsInput({
|
|
|
141
135
|
isInvalid={Boolean(errors.phone)}
|
|
142
136
|
/>
|
|
143
137
|
<Form.Control.Feedback type="invalid">
|
|
144
|
-
{
|
|
145
|
-
errors.phone?.message}
|
|
138
|
+
{errors.phone?.message}
|
|
146
139
|
</Form.Control.Feedback>
|
|
147
140
|
</Form.Group>
|
|
148
141
|
|
|
@@ -163,8 +156,7 @@ export function ProviderDetailsInput({
|
|
|
163
156
|
isInvalid={Boolean(errors.website)}
|
|
164
157
|
/>
|
|
165
158
|
<Form.Control.Feedback type="invalid">
|
|
166
|
-
{
|
|
167
|
-
errors.website?.message}
|
|
159
|
+
{errors.website?.message}
|
|
168
160
|
</Form.Control.Feedback>
|
|
169
161
|
</Form.Group>
|
|
170
162
|
{/* If admin has only 1 company - he dont need to set up it */}
|
|
@@ -11,6 +11,29 @@ const categories = Array.from({ length: 6 }, (_, i) => ({
|
|
|
11
11
|
}),
|
|
12
12
|
}));
|
|
13
13
|
|
|
14
|
+
const errorResponse = {
|
|
15
|
+
name: ["The name field is required."],
|
|
16
|
+
email: ["The email field is required."],
|
|
17
|
+
phone: ["The phone field is required."],
|
|
18
|
+
website: ["The website must be a string."],
|
|
19
|
+
description: ["The description must be a string."],
|
|
20
|
+
"location.street": ["The location.street must be a string."],
|
|
21
|
+
"location.city": ["The location.city must be a string."],
|
|
22
|
+
"location.state": ["The location.state must be a string."],
|
|
23
|
+
"location.country": [
|
|
24
|
+
"The location.country must be a string.",
|
|
25
|
+
"Invalid ISO3166-A2 country code.",
|
|
26
|
+
],
|
|
27
|
+
"categories.0": [
|
|
28
|
+
"The categories.0 must be an integer.",
|
|
29
|
+
"The categories.0 must be between 0 and 20 digits.",
|
|
30
|
+
],
|
|
31
|
+
"categories.1": [
|
|
32
|
+
"The categories.1 must be an integer.",
|
|
33
|
+
"The categories.1 must be between 0 and 20 digits.",
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
|
|
14
37
|
const defaultValues: VenueFormValues = {
|
|
15
38
|
name: "Sample provider",
|
|
16
39
|
description: "Description",
|
|
@@ -58,4 +81,5 @@ WithDefaultValues.args = {
|
|
|
58
81
|
defaultValues,
|
|
59
82
|
categories,
|
|
60
83
|
linkTypes,
|
|
84
|
+
errorResponse,
|
|
61
85
|
};
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
11
11
|
import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
|
|
12
12
|
import { useMultipleImages } from "@licklist/plugins/dist/hooks/Media/useMultipleImages";
|
|
13
|
+
import { parseServerErrorForFormValidation } from "@licklist/plugins/dist/utils/parseError";
|
|
13
14
|
import { CollapsibleInputGroup } from "../../collapsible-input-group";
|
|
14
15
|
import {
|
|
15
16
|
CategoriesInput,
|
|
@@ -47,6 +48,8 @@ export interface VenueFormProps extends HasPermissionProp {
|
|
|
47
48
|
companiesOptions?: TypeaheadOptions[];
|
|
48
49
|
onSubmit: (values: VenueFormValues) => void;
|
|
49
50
|
intent?: "create" | "update";
|
|
51
|
+
isLoading?: boolean;
|
|
52
|
+
errorResponse?: unknown;
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
const providerImageTypes = {
|
|
@@ -62,6 +65,8 @@ export function VenueForm({
|
|
|
62
65
|
onSubmit,
|
|
63
66
|
intent = "update",
|
|
64
67
|
hasPermission = true,
|
|
68
|
+
isLoading,
|
|
69
|
+
errorResponse,
|
|
65
70
|
}: VenueFormProps) {
|
|
66
71
|
const form = useForm<VenueFormValues>({ defaultValues, mode: "onChange" });
|
|
67
72
|
const {
|
|
@@ -69,6 +74,7 @@ export function VenueForm({
|
|
|
69
74
|
handleSubmit,
|
|
70
75
|
formState: { isSubmitting, errors },
|
|
71
76
|
getValues,
|
|
77
|
+
setError,
|
|
72
78
|
} = form;
|
|
73
79
|
const { t } = useTranslation("Design");
|
|
74
80
|
const [initialImages, setInitialImages] = useState<Image[] | null>(null);
|
|
@@ -92,6 +98,27 @@ export function VenueForm({
|
|
|
92
98
|
}
|
|
93
99
|
}, [images, setValue]);
|
|
94
100
|
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (!errorResponse) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const errorEntriesArray = parseServerErrorForFormValidation({
|
|
106
|
+
values: getValues(),
|
|
107
|
+
error: errorResponse,
|
|
108
|
+
});
|
|
109
|
+
if (!errorEntriesArray.length) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
errorEntriesArray.forEach((errorEntriesArray) => {
|
|
113
|
+
const [key, value] = errorEntriesArray;
|
|
114
|
+
setError(key as keyof VenueFormValues, {
|
|
115
|
+
message: value,
|
|
116
|
+
type: "validate",
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
120
|
+
}, [errorResponse]);
|
|
121
|
+
|
|
95
122
|
return (
|
|
96
123
|
<FormProvider {...form}>
|
|
97
124
|
<Form
|
|
@@ -108,7 +135,13 @@ export function VenueForm({
|
|
|
108
135
|
eventKey="location"
|
|
109
136
|
label={t("location")}
|
|
110
137
|
description={<LocationInputDescription />}
|
|
111
|
-
error={
|
|
138
|
+
error={
|
|
139
|
+
errors?.location?.message ||
|
|
140
|
+
(errors?.location &&
|
|
141
|
+
t("Validation:isNotValidField", {
|
|
142
|
+
attribute: "The location data",
|
|
143
|
+
}))
|
|
144
|
+
}
|
|
112
145
|
>
|
|
113
146
|
<LocationInput />
|
|
114
147
|
</CollapsibleInputGroup>
|
|
@@ -116,7 +149,13 @@ export function VenueForm({
|
|
|
116
149
|
eventKey="workingHours"
|
|
117
150
|
label={t("workingHours")}
|
|
118
151
|
description={<WorkingHoursInputDescription />}
|
|
119
|
-
error={
|
|
152
|
+
error={
|
|
153
|
+
errors?.workingHours?.message ||
|
|
154
|
+
(errors?.workingHours &&
|
|
155
|
+
t("Validation:isNotValidField", {
|
|
156
|
+
attribute: "The Working hours data",
|
|
157
|
+
}))
|
|
158
|
+
}
|
|
120
159
|
>
|
|
121
160
|
<WorkingHoursInput />
|
|
122
161
|
</CollapsibleInputGroup>
|
|
@@ -124,6 +163,13 @@ export function VenueForm({
|
|
|
124
163
|
<CollapsibleInputGroup
|
|
125
164
|
eventKey="categories"
|
|
126
165
|
label={t("categories")}
|
|
166
|
+
error={
|
|
167
|
+
errors?.categories?.message ||
|
|
168
|
+
(errors?.categories &&
|
|
169
|
+
t("Validation:isNotValidField", {
|
|
170
|
+
attribute: "The Categories data",
|
|
171
|
+
}))
|
|
172
|
+
}
|
|
127
173
|
description={
|
|
128
174
|
<CategoriesInputDescription categories={categories} />
|
|
129
175
|
}
|
|
@@ -161,10 +207,15 @@ export function VenueForm({
|
|
|
161
207
|
{hasPermission && (
|
|
162
208
|
<Button
|
|
163
209
|
type="submit"
|
|
164
|
-
disabled={
|
|
210
|
+
disabled={
|
|
211
|
+
isLoading ||
|
|
212
|
+
isSubmitting ||
|
|
213
|
+
isImagesLoading ||
|
|
214
|
+
isCoverImagesLoading
|
|
215
|
+
}
|
|
165
216
|
className="d-flex align-items-center align-self-end"
|
|
166
217
|
>
|
|
167
|
-
{isSubmitting && (
|
|
218
|
+
{(isSubmitting || isLoading) && (
|
|
168
219
|
<Spinner
|
|
169
220
|
animation="border"
|
|
170
221
|
size="sm"
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import React, { useRef } from "react";
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
2
|
import { useId } from "@react-aria/utils";
|
|
3
3
|
import { DateTime, DurationUnit } from "luxon";
|
|
4
4
|
import { Col, Form, InputGroup, Row } from "react-bootstrap";
|
|
5
5
|
import RRule from "rrule";
|
|
6
|
-
|
|
6
|
+
import { DATE_FORMAT } from "@licklist/core/dist/Config";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
7
8
|
import { SupportedFrequency } from "./utils";
|
|
8
9
|
import HTMLInputDateElement from "../types/static/HTMLInputDateElement";
|
|
9
10
|
|
|
10
11
|
interface Props {
|
|
11
12
|
disabled?: boolean;
|
|
12
|
-
date: string;
|
|
13
|
+
date: string; // yyyy-mm-ddThh:mm
|
|
14
|
+
minDate?: string; // should be in yyyy-mm-dd format
|
|
13
15
|
frequency: SupportedFrequency;
|
|
14
|
-
until?: string;
|
|
16
|
+
until?: string; // yyyy-mm-dd
|
|
15
17
|
count?: number;
|
|
16
18
|
onChange: (values: { until?: string; count?: number }) => void;
|
|
17
19
|
}
|
|
@@ -23,16 +25,31 @@ function RecurrenceEndInput({
|
|
|
23
25
|
until,
|
|
24
26
|
count,
|
|
25
27
|
onChange,
|
|
28
|
+
minDate,
|
|
26
29
|
}: Props) {
|
|
30
|
+
const { t } = useTranslation("Design");
|
|
27
31
|
// unique ids for radios
|
|
28
32
|
const neverId = useId();
|
|
29
33
|
const onId = useId();
|
|
30
34
|
const afterId = useId();
|
|
31
35
|
const dateInput = useRef<HTMLInputDateElement | null>(null);
|
|
32
36
|
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
const untilDatetime = DateTime.fromFormat(
|
|
39
|
+
until ?? getUntil({ date, frequency }),
|
|
40
|
+
DATE_FORMAT
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const minDatetime = DateTime.fromFormat(minDate, DATE_FORMAT);
|
|
44
|
+
|
|
45
|
+
if (minDatetime > untilDatetime) {
|
|
46
|
+
onChange({ until: minDate });
|
|
47
|
+
}
|
|
48
|
+
}, [minDate, onChange, until, date, frequency]);
|
|
49
|
+
|
|
33
50
|
return (
|
|
34
51
|
<Form.Group>
|
|
35
|
-
<Form.Label>
|
|
52
|
+
<Form.Label>{t("ends")}</Form.Label>
|
|
36
53
|
|
|
37
54
|
<Form.Check type="radio" id={neverId} custom className="mt-3">
|
|
38
55
|
<Form.Check.Input
|
|
@@ -41,7 +58,7 @@ function RecurrenceEndInput({
|
|
|
41
58
|
onChange={() => onChange({ count: 500 })}
|
|
42
59
|
disabled={disabled}
|
|
43
60
|
/>
|
|
44
|
-
<Form.Check.Label>
|
|
61
|
+
<Form.Check.Label>{t("never")}</Form.Check.Label>
|
|
45
62
|
</Form.Check>
|
|
46
63
|
|
|
47
64
|
<Form.Check type="radio" id={onId} custom className="mt-3">
|
|
@@ -55,11 +72,12 @@ function RecurrenceEndInput({
|
|
|
55
72
|
}
|
|
56
73
|
disabled={disabled}
|
|
57
74
|
/>
|
|
58
|
-
<Form.Check.Label>
|
|
75
|
+
<Form.Check.Label>{t("on")}</Form.Check.Label>
|
|
59
76
|
</Col>
|
|
60
77
|
<Col>
|
|
61
78
|
<Form.Control
|
|
62
79
|
type="date"
|
|
80
|
+
min={minDate}
|
|
63
81
|
disabled={disabled || !until}
|
|
64
82
|
aria-label="Date on which the recurrence ends"
|
|
65
83
|
value={until ?? getUntil({ date, frequency })}
|
|
@@ -83,7 +101,7 @@ function RecurrenceEndInput({
|
|
|
83
101
|
}
|
|
84
102
|
disabled={disabled}
|
|
85
103
|
/>
|
|
86
|
-
<Form.Check.Label>
|
|
104
|
+
<Form.Check.Label>{t("after")}</Form.Check.Label>
|
|
87
105
|
</Col>
|
|
88
106
|
<Col>
|
|
89
107
|
<InputGroup>
|
|
@@ -99,7 +117,7 @@ function RecurrenceEndInput({
|
|
|
99
117
|
}
|
|
100
118
|
/>
|
|
101
119
|
<InputGroup.Append>
|
|
102
|
-
<InputGroup.Text>
|
|
120
|
+
<InputGroup.Text>{t("occurences")}</InputGroup.Text>
|
|
103
121
|
</InputGroup.Append>
|
|
104
122
|
</InputGroup>
|
|
105
123
|
</Col>
|
|
@@ -109,7 +127,7 @@ function RecurrenceEndInput({
|
|
|
109
127
|
);
|
|
110
128
|
}
|
|
111
129
|
|
|
112
|
-
const defaultOccurrences = {
|
|
130
|
+
export const defaultOccurrences = {
|
|
113
131
|
[RRule.DAILY]: 30,
|
|
114
132
|
[RRule.WEEKLY]: 13,
|
|
115
133
|
[RRule.MONTHLY]: 12,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import React, { useEffect, useReducer } from "react";
|
|
5
5
|
import RRule, { Frequency, Weekday } from "rrule";
|
|
6
|
-
import RecurrenceEndInput from "./RecurrenceEndInput";
|
|
6
|
+
import RecurrenceEndInput, { defaultOccurrences } from "./RecurrenceEndInput";
|
|
7
7
|
import RecurrenceIntervalAndFrequencyInput from "./RecurrenceIntervalAndFrequencyInput";
|
|
8
8
|
import RecurrenceMonthlyRepeatByInput from "./RecurrenceMonthlyRepeatByInput";
|
|
9
9
|
import RecurrenceWeekdaysInput from "./RecurrenceWeekdaysInput";
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
export interface RecurrenceInputProps {
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
date: string;
|
|
19
|
+
minDate?: string;
|
|
19
20
|
value?: string;
|
|
20
21
|
onChange: (value: string) => void;
|
|
21
22
|
initialFrequency?: Frequency;
|
|
@@ -24,6 +25,7 @@ export interface RecurrenceInputProps {
|
|
|
24
25
|
export function RecurrenceInput({
|
|
25
26
|
disabled = false,
|
|
26
27
|
date,
|
|
28
|
+
minDate,
|
|
27
29
|
value,
|
|
28
30
|
onChange,
|
|
29
31
|
initialFrequency = Frequency.WEEKLY,
|
|
@@ -82,6 +84,7 @@ export function RecurrenceInput({
|
|
|
82
84
|
)}
|
|
83
85
|
<RecurrenceEndInput
|
|
84
86
|
date={date}
|
|
87
|
+
minDate={minDate}
|
|
85
88
|
frequency={state.freq}
|
|
86
89
|
until={state.until && DateTime.fromJSDate(state.until).toISODate()}
|
|
87
90
|
count={state.count}
|
|
@@ -130,5 +133,12 @@ const getInitialState = ({
|
|
|
130
133
|
byweekday = options.byweekday[0];
|
|
131
134
|
}
|
|
132
135
|
|
|
133
|
-
return {
|
|
136
|
+
return {
|
|
137
|
+
...options,
|
|
138
|
+
count:
|
|
139
|
+
options?.count || options.until
|
|
140
|
+
? options.count
|
|
141
|
+
: defaultOccurrences[options.freq],
|
|
142
|
+
byweekday,
|
|
143
|
+
};
|
|
134
144
|
};
|
|
@@ -2,7 +2,7 @@ import React, { useEffect } from "react";
|
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
3
|
import { Col, Form, Row } from "react-bootstrap";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { useFormContext } from "react-hook-form";
|
|
5
|
+
import { RegisterOptions, useFormContext } from "react-hook-form";
|
|
6
6
|
import { DATE_FORMAT } from "@licklist/core/dist/Config";
|
|
7
7
|
import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
|
|
8
8
|
|
|
@@ -13,6 +13,14 @@ interface RecurrenceIntervalAndFrequencyInputProps {
|
|
|
13
13
|
startTimeLabel?: string;
|
|
14
14
|
endDateLabel?: string;
|
|
15
15
|
endTimeLabel?: string;
|
|
16
|
+
startTimeRules?: Pick<
|
|
17
|
+
RegisterOptions,
|
|
18
|
+
"max" | "min" | "validate" | "required" | "pattern"
|
|
19
|
+
>;
|
|
20
|
+
endTimeRules?: Pick<
|
|
21
|
+
RegisterOptions,
|
|
22
|
+
"max" | "min" | "validate" | "required" | "pattern"
|
|
23
|
+
>;
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
function RecurrenceIntervalAndFrequencyInput({
|
|
@@ -22,6 +30,8 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
22
30
|
startTimeLabel,
|
|
23
31
|
endDateLabel,
|
|
24
32
|
endTimeLabel,
|
|
33
|
+
startTimeRules,
|
|
34
|
+
endTimeRules,
|
|
25
35
|
}: RecurrenceIntervalAndFrequencyInputProps) {
|
|
26
36
|
const { t } = useTranslation(["Design", "Notification", "App"]);
|
|
27
37
|
|
|
@@ -30,7 +40,6 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
30
40
|
formState: { errors },
|
|
31
41
|
register,
|
|
32
42
|
trigger,
|
|
33
|
-
setValue,
|
|
34
43
|
} = useFormContext<RecurringDatePickerInputValues>();
|
|
35
44
|
|
|
36
45
|
const startDate = getValues("startDate");
|
|
@@ -47,6 +56,9 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
47
56
|
}, [startDate]);
|
|
48
57
|
|
|
49
58
|
useEffect(() => {
|
|
59
|
+
if (!startTime || !endTime) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
50
62
|
trigger("endTime");
|
|
51
63
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
64
|
}, [startTime]);
|
|
@@ -118,15 +130,15 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
118
130
|
</Form.Label>
|
|
119
131
|
<Form.Control
|
|
120
132
|
type="time"
|
|
121
|
-
{...register("startTime", { required: false })}
|
|
122
|
-
onChange={({ target: { value } }) => {
|
|
123
|
-
setValue("startTime", `${value}:00`);
|
|
124
|
-
}}
|
|
133
|
+
{...register("startTime", { required: false, ...startTimeRules })}
|
|
125
134
|
placeholder="hh:mm"
|
|
126
135
|
defaultValue={startTime}
|
|
127
136
|
disabled={disabled}
|
|
128
137
|
isInvalid={Boolean(errors.startTime)}
|
|
129
138
|
/>
|
|
139
|
+
<Form.Control.Feedback type="invalid">
|
|
140
|
+
{errors.startTime?.message}
|
|
141
|
+
</Form.Control.Feedback>
|
|
130
142
|
</Form.Group>
|
|
131
143
|
</Col>
|
|
132
144
|
|
|
@@ -144,18 +156,16 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
144
156
|
const currentStartTime = DateTime.fromISO(startTime);
|
|
145
157
|
const currentEndTime = DateTime.fromISO(time);
|
|
146
158
|
|
|
147
|
-
return currentEndTime?.diff(currentStartTime, ["
|
|
148
|
-
?.
|
|
159
|
+
return currentEndTime?.diff(currentStartTime, ["minutes"])
|
|
160
|
+
?.minutes >= 0
|
|
149
161
|
? true
|
|
150
162
|
: `${t(`Validation:fieldLaterDate`, {
|
|
151
163
|
attribute: t("Design:endTimeSmall"),
|
|
152
164
|
min: t("Design:startTimeSmall"),
|
|
153
165
|
})}`;
|
|
154
166
|
},
|
|
167
|
+
...endTimeRules,
|
|
155
168
|
})}
|
|
156
|
-
onChange={({ target: { value } }) => {
|
|
157
|
-
setValue("endTime", `${value}:59`, { shouldValidate: true });
|
|
158
|
-
}}
|
|
159
169
|
placeholder="hh:mm"
|
|
160
170
|
defaultValue={endTime}
|
|
161
171
|
disabled={disabled}
|
|
@@ -7,6 +7,7 @@ import { useIntl } from "react-intl";
|
|
|
7
7
|
import {
|
|
8
8
|
DATE_TIME_FORMAT,
|
|
9
9
|
DATE_TIME_FULL_FORMAT,
|
|
10
|
+
TIME_FULL_FORMAT,
|
|
10
11
|
} from "@licklist/core/dist/Config/Date";
|
|
11
12
|
import { usePreviousValue } from "@licklist/plugins/dist/hooks/Value/usePreviousValue";
|
|
12
13
|
import { FormProvider, useForm } from "react-hook-form";
|
|
@@ -38,6 +39,7 @@ export interface RecurringDatePickerInputValues {
|
|
|
38
39
|
byweekday?: Weekday[];
|
|
39
40
|
until?: Date;
|
|
40
41
|
count?: number;
|
|
42
|
+
withOutEndDate?: boolean;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export function RecurringDatePickerInput({
|
|
@@ -101,6 +103,11 @@ export function RecurringDatePickerInput({
|
|
|
101
103
|
})
|
|
102
104
|
: nextState.byweekday;
|
|
103
105
|
|
|
106
|
+
const endTimeNextState = nextState?.endTime
|
|
107
|
+
? DateTime.fromISO(nextState?.endTime).toFormat(TIME_FULL_FORMAT)
|
|
108
|
+
: "";
|
|
109
|
+
const endDateNextState = nextState?.endDate ?? "";
|
|
110
|
+
|
|
104
111
|
const rrule = RRule.optionsToString({
|
|
105
112
|
// @TODO: investigate if we need these fields
|
|
106
113
|
// dtstart: getDateTimeObject(startDate, startTime).toJSDate(),
|
|
@@ -115,6 +122,8 @@ export function RecurringDatePickerInput({
|
|
|
115
122
|
|
|
116
123
|
onChange({
|
|
117
124
|
...nextState,
|
|
125
|
+
endDate: endDateNextState,
|
|
126
|
+
endTime: endTimeNextState,
|
|
118
127
|
rrule,
|
|
119
128
|
});
|
|
120
129
|
};
|
|
@@ -15,7 +15,7 @@ export function ReportForm({
|
|
|
15
15
|
onSubmit,
|
|
16
16
|
onHide,
|
|
17
17
|
hasPermission,
|
|
18
|
-
}: ReportFormProps)
|
|
18
|
+
}: ReportFormProps) {
|
|
19
19
|
const { t } = useTranslation(["App"]);
|
|
20
20
|
const fromDateInput = useRef<HTMLInputDateElement | null>(null);
|
|
21
21
|
const toDateInput = useRef<HTMLInputDateElement | null>(null);
|