@licklist/design 0.44.486-dev.83 → 0.44.486-dev.9
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/logo/bookedit.svg +11 -9
- package/dist/assets/logo/bookedit.svg.js +1 -1
- package/dist/assets/logo/licklist.svg +2 -0
- package/dist/assets/logo/licklist.svg.js +1 -1
- package/dist/date-time-button/DateTimeButton.d.ts +1 -6
- 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 +0 -29
- 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 +1 -3
- 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 +1 -2
- 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-cards/activity-card/ActivityCard.d.ts +12 -0
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-cards/activity-card/ActivityCard.js +1 -0
- package/dist/iframe/activity-cards/index.d.ts +3 -0
- package/dist/iframe/activity-cards/index.d.ts.map +1 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +12 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +1 -0
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts +7 -0
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/EventCalendar.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +12 -0
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +3 -0
- package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +7 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/index.d.ts +4 -0
- package/dist/iframe/event/event-calendar/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/types/index.d.ts +6 -0
- package/dist/iframe/event/event-calendar/types/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/utils/index.d.ts +3 -0
- package/dist/iframe/event/event-calendar/utils/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/utils/index.js +1 -0
- package/dist/iframe/event/event-details/EventDetails.d.ts +10 -0
- package/dist/iframe/event/event-details/EventDetails.d.ts.map +1 -0
- package/dist/iframe/event/event-details/EventDetails.js +1 -0
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +9 -0
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +1 -0
- package/dist/iframe/event/event-details/components/category-product/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +26 -0
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +1 -0
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +1 -0
- package/dist/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.d.ts +3 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +8 -0
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +1 -0
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +1 -0
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +2 -0
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/index.d.ts +2 -0
- package/dist/iframe/event/event-details/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/utils/index.d.ts +2 -0
- package/dist/iframe/event/event-details/utils/index.d.ts.map +1 -0
- package/dist/iframe/event/event-details/utils/routes.d.ts +2 -0
- package/dist/iframe/event/event-details/utils/routes.d.ts.map +1 -0
- package/dist/iframe/event/event-details/utils/routes.js +1 -0
- package/dist/iframe/event/index.d.ts +2 -0
- 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.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -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.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 +1 -4
- 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 +1 -2
- 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 +2 -2
- 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 +0 -1
- 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 +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -5
- 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 +3 -6
- 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 +1 -2
- 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 +1 -3
- 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 +1 -3
- 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 +1 -2
- 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 +1 -0
- 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 +0 -10
- 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/index.d.ts +0 -1
- 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 +1 -3
- 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 +1 -8
- 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 +1 -2
- 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 +1 -4
- 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 +0 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/report/form/ReportForm.d.ts.map +1 -1
- package/dist/sales/booking/results/BookingResults.d.ts +1 -3
- package/dist/sales/booking/results/BookingResults.d.ts.map +1 -1
- package/dist/sales/booking/results/BookingResults.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts +1 -3
- 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 +0 -1
- package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -3
- 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 +1 -2
- 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/events/EventCard.scss +5 -12
- package/dist/styles/form/CustomCheckbox.scss +0 -6
- package/dist/styles/header/Header.scss +4 -0
- package/{src/styles/activity-card/GridActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
- package/dist/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
- package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
- package/dist/styles/iframe-customers-journey/_index.scss +3 -0
- package/dist/styles/iframe-events/Card.scss +0 -1
- package/dist/styles/notification/Notification.scss +0 -4
- package/dist/styles/packages.scss +1 -3
- package/dist/styles/resources-blocking/_index.scss +0 -16
- package/dist/styles/sales/BookingResults.scss +6 -14
- package/dist/styles/themes/bookedit/_index.scss +0 -1
- package/dist/styles/zones/ZoneForm.scss +0 -3
- package/dist/types/iframe.d.ts +0 -1
- 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 +0 -2
- 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/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 +11 -9
- package/src/assets/logo/licklist.svg +2 -0
- package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
- package/src/date-time-button/DateTimeButton.tsx +22 -24
- package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +12 -0
- 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 +2 -6
- package/src/events/event-card/utils.ts +16 -89
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -5
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +5 -12
- package/src/events/event-statistic-modal/utils/index.ts +34 -39
- package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
- package/src/file-upload/FileUpload.tsx +1 -3
- package/src/iframe/activity-cards/activity-card/ActivityCard.stories.tsx +52 -0
- package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
- package/src/iframe/activity-cards/index.ts +2 -0
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
- package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +36 -0
- package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
- package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
- package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -24
- package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
- package/src/iframe/event/event-calendar/index.ts +6 -0
- package/src/iframe/event/event-calendar/types/index.ts +6 -0
- package/src/iframe/event/event-calendar/utils/index.ts +11 -0
- package/src/iframe/event/event-details/EventDetails.stories.tsx +187 -0
- package/src/iframe/event/event-details/EventDetails.tsx +92 -0
- package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +123 -0
- package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +109 -0
- package/src/iframe/event/event-details/components/category-product/index.ts +1 -0
- package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +250 -0
- package/src/iframe/event/event-details/components/event-details-form/index.ts +5 -0
- package/src/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
- package/src/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.tsx +3 -3
- package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +1 -0
- package/src/iframe/event/event-details/components/number-of-people-input/index.ts +1 -0
- package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +34 -0
- package/src/iframe/event/event-details/components/product-category-view/index.ts +1 -0
- package/src/iframe/event/event-details/index.ts +1 -0
- package/src/iframe/event/event-details/utils/index.ts +1 -0
- package/src/iframe/event/event-details/utils/routes.ts +6 -0
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +2 -1
- package/src/iframe/event/index.ts +7 -0
- package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +2 -8
- package/src/iframe/event/ticket-description/TicketDescription.tsx +2 -7
- package/src/iframe/index.ts +3 -1
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -2
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -1
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +1 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +7 -16
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +29 -15
- package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
- package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +5 -36
- package/src/iframe/order-process/constants.ts +0 -1
- package/src/iframe/page/Page.stories.tsx +2 -2
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -13
- 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 +0 -3
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
- package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -75
- package/src/product-set/control/ProductSetControl.stories.tsx +2 -0
- package/src/product-set/control/ProductSetControl.tsx +10 -66
- package/src/product-set/control/ProductSetRecurrenceControl.tsx +5 -14
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -2
- package/src/product-set/form/ProductSetForm.stories.tsx +12 -9
- package/src/product-set/form/ProductSetForm.tsx +3 -19
- package/src/product-set/form/ProductsControl.tsx +0 -10
- package/src/product-set/product/ProductControl.tsx +1 -28
- package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
- package/src/product-set/product-category/ProductCategory.stories.tsx +1 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +30 -1
- package/src/product-set/utils/index.ts +0 -38
- package/src/provider/location-input/LocationInput.tsx +20 -21
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/location-input/index.ts +1 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +13 -5
- package/src/provider/venue-form/VenueForm.stories.tsx +0 -24
- package/src/provider/venue-form/VenueForm.tsx +4 -55
- package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
- package/src/recurrence-input/RecurrenceInput.tsx +2 -12
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +11 -21
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/sales/booking/results/BookingResults.stories.tsx +7 -12
- package/src/sales/booking/results/BookingResults.tsx +0 -7
- package/src/sales/booking/results/components/ResultCard.tsx +6 -62
- package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
- package/src/sales/filters/SaleFilters.tsx +0 -1
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +7 -0
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +5 -20
- package/src/sales/source-of-sales/SourceOfSalesChart.tsx +28 -31
- package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
- package/src/static/RestrictedAccess.tsx +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +1 -8
- package/src/styles/events/EventCard.scss +5 -12
- package/src/styles/form/CustomCheckbox.scss +0 -6
- package/src/styles/header/Header.scss +4 -0
- package/{dist/styles/activity-card/GridActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
- package/src/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
- package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
- package/src/styles/iframe-customers-journey/_index.scss +3 -0
- package/src/styles/iframe-events/Card.scss +0 -1
- package/src/styles/notification/Notification.scss +0 -4
- package/src/styles/packages.scss +1 -3
- package/src/styles/resources-blocking/_index.scss +0 -16
- package/src/styles/sales/BookingResults.scss +6 -14
- package/src/styles/themes/bookedit/_index.scss +0 -1
- package/src/styles/zones/ZoneForm.scss +0 -3
- package/src/types/iframe.ts +0 -1
- package/src/typings.d.ts +0 -11
- package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
- package/src/zone/form/ZoneForm.tsx +2 -1
- package/src/zone/form/components/AvailableTimesControl.tsx +88 -89
- package/src/zone/form/components/ZoneControl.tsx +5 -4
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +59 -3
- package/src/zone/form/utils/dates.ts +36 -29
- package/dist/assets/iframe/available.svg.js +0 -1
- package/dist/assets/iframe/limited.svg.js +0 -1
- package/dist/assets/iframe/soldOut.svg.js +0 -1
- package/dist/assets/logo/favicon.svg +0 -12
- package/dist/availability-indicator/AvailabilityIndicator.d.ts +0 -10
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
- package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
- package/dist/availability-indicator/index.d.ts +0 -2
- package/dist/availability-indicator/index.d.ts.map +0 -1
- package/dist/calendar/Calendar.d.ts +0 -19
- package/dist/calendar/Calendar.d.ts.map +0 -1
- package/dist/calendar/Calendar.js +0 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
- package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
- package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
- package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
- package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
- package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
- package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
- package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
- package/dist/calendar/index.d.ts +0 -4
- package/dist/calendar/index.d.ts.map +0 -1
- package/dist/calendar/utils/index.d.ts +0 -5
- package/dist/calendar/utils/index.d.ts.map +0 -1
- package/dist/calendar/utils/index.js +0 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts +0 -15
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-card/ActivityCard.js +0 -1
- package/dist/iframe/activity-card/index.d.ts +0 -2
- package/dist/iframe/activity-card/index.d.ts.map +0 -1
- package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
- package/dist/number-of-people-input/NumberOfPeopleInput.js +0 -1
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +0 -1
- package/dist/number-of-people-input/components/index.d.ts +0 -2
- package/dist/number-of-people-input/components/index.d.ts.map +0 -1
- package/dist/number-of-people-input/index.d.ts +0 -3
- package/dist/number-of-people-input/index.d.ts.map +0 -1
- package/dist/provider/location-input/components/FormGroupControll.d.ts +0 -7
- package/dist/provider/location-input/components/FormGroupControll.d.ts.map +0 -1
- package/dist/provider/location-input/components/FormGroupControll.js +0 -1
- package/dist/provider/location-input/components/index.d.ts +0 -2
- package/dist/provider/location-input/components/index.d.ts.map +0 -1
- package/dist/styles/activity-card/_index.scss +0 -2
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
- package/dist/styles/availability-indicator/_index.scss +0 -1
- package/dist/styles/date-time-button/_index.scss +0 -1
- package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
- package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
- package/dist/zone/form/components/GameDurationControl.js +0 -1
- package/src/assets/logo/favicon.svg +0 -12
- package/src/availability-indicator/AvailabilityIndicator.tsx +0 -67
- package/src/availability-indicator/index.ts +0 -1
- package/src/calendar/Calendar.stories.tsx +0 -33
- package/src/calendar/Calendar.tsx +0 -45
- package/src/calendar/index.ts +0 -3
- package/src/calendar/utils/index.ts +0 -28
- package/src/iframe/activity-card/ActivityCard.stories.tsx +0 -51
- package/src/iframe/activity-card/ActivityCard.tsx +0 -66
- package/src/iframe/activity-card/index.ts +0 -1
- package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +0 -92
- package/src/number-of-people-input/components/index.ts +0 -1
- package/src/number-of-people-input/index.ts +0 -2
- package/src/provider/location-input/components/FormGroupControll.tsx +0 -16
- package/src/provider/location-input/components/index.ts +0 -1
- package/src/styles/activity-card/_index.scss +0 -2
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
- package/src/styles/availability-indicator/_index.scss +0 -1
- package/src/styles/date-time-button/_index.scss +0 -1
- package/src/zone/form/components/GameDurationControl.tsx +0 -46
- /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
- /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
- /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
- /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
- /package/dist/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
- /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
- /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
- /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
- /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper";
|
|
2
2
|
import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper";
|
|
3
|
-
import { TFunction } from "i18next";
|
|
4
|
-
import { UseFormSetError } from "react-hook-form";
|
|
5
3
|
import { TemplateItem } from "../control/ProductSetControl";
|
|
6
|
-
import { ProductSetFormValues } from "../form/ProductSetForm";
|
|
7
|
-
|
|
8
|
-
interface CheckAvailableTimesErrors {
|
|
9
|
-
values: ProductSetFormValues;
|
|
10
|
-
setError: UseFormSetError<ProductSetFormValues>;
|
|
11
|
-
t: TFunction;
|
|
12
|
-
}
|
|
13
4
|
|
|
14
5
|
export const moveArrayElements = <T>(
|
|
15
6
|
array: T[],
|
|
@@ -51,32 +42,3 @@ export const getFilteredTemplates = (
|
|
|
51
42
|
label: template?.notification?.name,
|
|
52
43
|
}));
|
|
53
44
|
};
|
|
54
|
-
|
|
55
|
-
export const checkAvailableTimesErrors = ({
|
|
56
|
-
values,
|
|
57
|
-
setError,
|
|
58
|
-
t,
|
|
59
|
-
}: CheckAvailableTimesErrors) => {
|
|
60
|
-
let hasError = false;
|
|
61
|
-
|
|
62
|
-
const hasCategoryWithZone = values?.steps?.some(
|
|
63
|
-
(step) => !!step?.productCategories.some((category) => !!category?.zoneId)
|
|
64
|
-
);
|
|
65
|
-
if (!hasCategoryWithZone) {
|
|
66
|
-
return hasError;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
values?.menuRecurrences?.forEach((recurrence, index: number) => {
|
|
70
|
-
if (!recurrence?.availableTimes?.length) {
|
|
71
|
-
hasError = true;
|
|
72
|
-
setError(`menuRecurrences.${index}.availableTimes` as const, {
|
|
73
|
-
type: "validate",
|
|
74
|
-
message: t("Validation:fieldMinNumber", {
|
|
75
|
-
attribute: t("startTimes"),
|
|
76
|
-
min: 1,
|
|
77
|
-
}),
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
return hasError;
|
|
82
|
-
};
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
|
|
10
9
|
export function LocationInput() {
|
|
11
10
|
const {
|
|
@@ -14,32 +13,32 @@ export function LocationInput() {
|
|
|
14
13
|
} = useFormContext<LocationInputValues>();
|
|
15
14
|
const { t } = useTranslation("Design");
|
|
16
15
|
|
|
16
|
+
const addressId = useId();
|
|
17
|
+
const cityId = useId();
|
|
18
|
+
const stateId = useId();
|
|
19
|
+
const postcodeId = useId();
|
|
17
20
|
const countryId = useId();
|
|
18
21
|
|
|
19
22
|
return (
|
|
20
23
|
<>
|
|
21
24
|
<input {...register("location.latitude")} type="hidden" />
|
|
22
25
|
<input {...register("location.longitude")} type="hidden" />
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
error={errors?.location?.postcode}
|
|
40
|
-
name="location.postcode"
|
|
41
|
-
label={t("locationPostcode")}
|
|
42
|
-
/>
|
|
26
|
+
<Form.Group controlId={addressId}>
|
|
27
|
+
<Form.Label>{t("locationStreet")}</Form.Label>
|
|
28
|
+
<Form.Control {...register("location.street")} />
|
|
29
|
+
</Form.Group>
|
|
30
|
+
<Form.Group controlId={cityId}>
|
|
31
|
+
<Form.Label>{t("locationCity")}</Form.Label>
|
|
32
|
+
<Form.Control {...register("location.city")} />
|
|
33
|
+
</Form.Group>
|
|
34
|
+
<Form.Group controlId={stateId}>
|
|
35
|
+
<Form.Label>{t("locationState")}</Form.Label>
|
|
36
|
+
<Form.Control {...register("location.state")} />
|
|
37
|
+
</Form.Group>
|
|
38
|
+
<Form.Group controlId={postcodeId}>
|
|
39
|
+
<Form.Label>{t("locationPostcode")}</Form.Label>
|
|
40
|
+
<Form.Control {...register("location.postcode")} />
|
|
41
|
+
</Form.Group>
|
|
43
42
|
<Form.Group controlId={countryId}>
|
|
44
43
|
<Form.Label>{t("locationCountry")}</Form.Label>
|
|
45
44
|
<CountryCodeSelect
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React 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<JSX.Element[]>((acc, field) => {
|
|
17
17
|
const value = values?.[field];
|
|
18
18
|
if (!value) return acc;
|
|
19
19
|
|
|
@@ -4,6 +4,7 @@ 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";
|
|
7
8
|
import { Typeahead, TypeaheadOptions } from "../../typeahead";
|
|
8
9
|
import { MAX_DESCRIPTION_CHARACTERS_LENGTH } from "../constants";
|
|
9
10
|
import {
|
|
@@ -69,7 +70,8 @@ export function ProviderDetailsInput({
|
|
|
69
70
|
isInvalid={Boolean(errors.name)}
|
|
70
71
|
/>
|
|
71
72
|
<Form.Control.Feedback type="invalid">
|
|
72
|
-
{errors.name
|
|
73
|
+
{HookFormService.hasError(errors.name, "required") &&
|
|
74
|
+
errors.name?.message}
|
|
73
75
|
</Form.Control.Feedback>
|
|
74
76
|
</Form.Group>
|
|
75
77
|
|
|
@@ -93,7 +95,8 @@ export function ProviderDetailsInput({
|
|
|
93
95
|
isInvalid={Boolean(errors.description)}
|
|
94
96
|
/>
|
|
95
97
|
<Form.Control.Feedback type="invalid">
|
|
96
|
-
{errors.description
|
|
98
|
+
{HookFormService.hasError(errors.description, "validate") &&
|
|
99
|
+
errors.description?.message}
|
|
97
100
|
</Form.Control.Feedback>
|
|
98
101
|
</Form.Group>
|
|
99
102
|
|
|
@@ -117,7 +120,10 @@ export function ProviderDetailsInput({
|
|
|
117
120
|
isInvalid={Boolean(errors.email)}
|
|
118
121
|
/>
|
|
119
122
|
<Form.Control.Feedback type="invalid">
|
|
120
|
-
{errors.email
|
|
123
|
+
{HookFormService.hasError(errors.email, "required") &&
|
|
124
|
+
errors.email?.message}
|
|
125
|
+
{HookFormService.hasError(errors.email, "pattern") &&
|
|
126
|
+
errors.email?.message}
|
|
121
127
|
</Form.Control.Feedback>
|
|
122
128
|
</Form.Group>
|
|
123
129
|
|
|
@@ -135,7 +141,8 @@ export function ProviderDetailsInput({
|
|
|
135
141
|
isInvalid={Boolean(errors.phone)}
|
|
136
142
|
/>
|
|
137
143
|
<Form.Control.Feedback type="invalid">
|
|
138
|
-
{errors.phone
|
|
144
|
+
{HookFormService.hasError(errors.phone, "required") &&
|
|
145
|
+
errors.phone?.message}
|
|
139
146
|
</Form.Control.Feedback>
|
|
140
147
|
</Form.Group>
|
|
141
148
|
|
|
@@ -156,7 +163,8 @@ export function ProviderDetailsInput({
|
|
|
156
163
|
isInvalid={Boolean(errors.website)}
|
|
157
164
|
/>
|
|
158
165
|
<Form.Control.Feedback type="invalid">
|
|
159
|
-
{errors.website
|
|
166
|
+
{HookFormService.hasError(errors.website, "pattern") &&
|
|
167
|
+
errors.website?.message}
|
|
160
168
|
</Form.Control.Feedback>
|
|
161
169
|
</Form.Group>
|
|
162
170
|
{/* If admin has only 1 company - he dont need to set up it */}
|
|
@@ -11,29 +11,6 @@ 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
|
-
|
|
37
14
|
const defaultValues: VenueFormValues = {
|
|
38
15
|
name: "Sample provider",
|
|
39
16
|
description: "Description",
|
|
@@ -81,5 +58,4 @@ WithDefaultValues.args = {
|
|
|
81
58
|
defaultValues,
|
|
82
59
|
categories,
|
|
83
60
|
linkTypes,
|
|
84
|
-
errorResponse,
|
|
85
61
|
};
|
|
@@ -10,7 +10,6 @@ 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";
|
|
14
13
|
import { CollapsibleInputGroup } from "../../collapsible-input-group";
|
|
15
14
|
import {
|
|
16
15
|
CategoriesInput,
|
|
@@ -48,8 +47,6 @@ export interface VenueFormProps extends HasPermissionProp {
|
|
|
48
47
|
companiesOptions?: TypeaheadOptions[];
|
|
49
48
|
onSubmit: (values: VenueFormValues) => void;
|
|
50
49
|
intent?: "create" | "update";
|
|
51
|
-
isLoading?: boolean;
|
|
52
|
-
errorResponse?: unknown;
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
const providerImageTypes = {
|
|
@@ -65,8 +62,6 @@ export function VenueForm({
|
|
|
65
62
|
onSubmit,
|
|
66
63
|
intent = "update",
|
|
67
64
|
hasPermission = true,
|
|
68
|
-
isLoading,
|
|
69
|
-
errorResponse,
|
|
70
65
|
}: VenueFormProps) {
|
|
71
66
|
const form = useForm<VenueFormValues>({ defaultValues, mode: "onChange" });
|
|
72
67
|
const {
|
|
@@ -74,7 +69,6 @@ export function VenueForm({
|
|
|
74
69
|
handleSubmit,
|
|
75
70
|
formState: { isSubmitting, errors },
|
|
76
71
|
getValues,
|
|
77
|
-
setError,
|
|
78
72
|
} = form;
|
|
79
73
|
const { t } = useTranslation("Design");
|
|
80
74
|
const [initialImages, setInitialImages] = useState<Image[] | null>(null);
|
|
@@ -98,27 +92,6 @@ export function VenueForm({
|
|
|
98
92
|
}
|
|
99
93
|
}, [images, setValue]);
|
|
100
94
|
|
|
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
|
-
|
|
122
95
|
return (
|
|
123
96
|
<FormProvider {...form}>
|
|
124
97
|
<Form
|
|
@@ -135,13 +108,7 @@ export function VenueForm({
|
|
|
135
108
|
eventKey="location"
|
|
136
109
|
label={t("location")}
|
|
137
110
|
description={<LocationInputDescription />}
|
|
138
|
-
error={
|
|
139
|
-
errors?.location?.message ||
|
|
140
|
-
(errors?.location &&
|
|
141
|
-
t("Validation:isNotValidField", {
|
|
142
|
-
attribute: "The location data",
|
|
143
|
-
}))
|
|
144
|
-
}
|
|
111
|
+
error={errors?.location?.country?.message}
|
|
145
112
|
>
|
|
146
113
|
<LocationInput />
|
|
147
114
|
</CollapsibleInputGroup>
|
|
@@ -149,13 +116,7 @@ export function VenueForm({
|
|
|
149
116
|
eventKey="workingHours"
|
|
150
117
|
label={t("workingHours")}
|
|
151
118
|
description={<WorkingHoursInputDescription />}
|
|
152
|
-
error={
|
|
153
|
-
errors?.workingHours?.message ||
|
|
154
|
-
(errors?.workingHours &&
|
|
155
|
-
t("Validation:isNotValidField", {
|
|
156
|
-
attribute: "The Working hours data",
|
|
157
|
-
}))
|
|
158
|
-
}
|
|
119
|
+
error={errors.workingHours?.message}
|
|
159
120
|
>
|
|
160
121
|
<WorkingHoursInput />
|
|
161
122
|
</CollapsibleInputGroup>
|
|
@@ -163,13 +124,6 @@ export function VenueForm({
|
|
|
163
124
|
<CollapsibleInputGroup
|
|
164
125
|
eventKey="categories"
|
|
165
126
|
label={t("categories")}
|
|
166
|
-
error={
|
|
167
|
-
errors?.categories?.message ||
|
|
168
|
-
(errors?.categories &&
|
|
169
|
-
t("Validation:isNotValidField", {
|
|
170
|
-
attribute: "The Categories data",
|
|
171
|
-
}))
|
|
172
|
-
}
|
|
173
127
|
description={
|
|
174
128
|
<CategoriesInputDescription categories={categories} />
|
|
175
129
|
}
|
|
@@ -207,15 +161,10 @@ export function VenueForm({
|
|
|
207
161
|
{hasPermission && (
|
|
208
162
|
<Button
|
|
209
163
|
type="submit"
|
|
210
|
-
disabled={
|
|
211
|
-
isLoading ||
|
|
212
|
-
isSubmitting ||
|
|
213
|
-
isImagesLoading ||
|
|
214
|
-
isCoverImagesLoading
|
|
215
|
-
}
|
|
164
|
+
disabled={isSubmitting || isImagesLoading || isCoverImagesLoading}
|
|
216
165
|
className="d-flex align-items-center align-self-end"
|
|
217
166
|
>
|
|
218
|
-
{
|
|
167
|
+
{isSubmitting && (
|
|
219
168
|
<Spinner
|
|
220
169
|
animation="border"
|
|
221
170
|
size="sm"
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { 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
|
-
|
|
7
|
-
import { useTranslation } from "react-i18next";
|
|
6
|
+
|
|
8
7
|
import { SupportedFrequency } from "./utils";
|
|
9
8
|
import HTMLInputDateElement from "../types/static/HTMLInputDateElement";
|
|
10
9
|
|
|
11
10
|
interface Props {
|
|
12
11
|
disabled?: boolean;
|
|
13
|
-
date: string;
|
|
14
|
-
minDate?: string; // should be in yyyy-mm-dd format
|
|
12
|
+
date: string;
|
|
15
13
|
frequency: SupportedFrequency;
|
|
16
|
-
until?: string;
|
|
14
|
+
until?: string;
|
|
17
15
|
count?: number;
|
|
18
16
|
onChange: (values: { until?: string; count?: number }) => void;
|
|
19
17
|
}
|
|
@@ -25,31 +23,16 @@ function RecurrenceEndInput({
|
|
|
25
23
|
until,
|
|
26
24
|
count,
|
|
27
25
|
onChange,
|
|
28
|
-
minDate,
|
|
29
26
|
}: Props) {
|
|
30
|
-
const { t } = useTranslation("Design");
|
|
31
27
|
// unique ids for radios
|
|
32
28
|
const neverId = useId();
|
|
33
29
|
const onId = useId();
|
|
34
30
|
const afterId = useId();
|
|
35
31
|
const dateInput = useRef<HTMLInputDateElement | null>(null);
|
|
36
32
|
|
|
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
|
-
|
|
50
33
|
return (
|
|
51
34
|
<Form.Group>
|
|
52
|
-
<Form.Label>
|
|
35
|
+
<Form.Label>Ends</Form.Label>
|
|
53
36
|
|
|
54
37
|
<Form.Check type="radio" id={neverId} custom className="mt-3">
|
|
55
38
|
<Form.Check.Input
|
|
@@ -58,7 +41,7 @@ function RecurrenceEndInput({
|
|
|
58
41
|
onChange={() => onChange({ count: 500 })}
|
|
59
42
|
disabled={disabled}
|
|
60
43
|
/>
|
|
61
|
-
<Form.Check.Label>
|
|
44
|
+
<Form.Check.Label>Never</Form.Check.Label>
|
|
62
45
|
</Form.Check>
|
|
63
46
|
|
|
64
47
|
<Form.Check type="radio" id={onId} custom className="mt-3">
|
|
@@ -72,12 +55,11 @@ function RecurrenceEndInput({
|
|
|
72
55
|
}
|
|
73
56
|
disabled={disabled}
|
|
74
57
|
/>
|
|
75
|
-
<Form.Check.Label>
|
|
58
|
+
<Form.Check.Label>On</Form.Check.Label>
|
|
76
59
|
</Col>
|
|
77
60
|
<Col>
|
|
78
61
|
<Form.Control
|
|
79
62
|
type="date"
|
|
80
|
-
min={minDate}
|
|
81
63
|
disabled={disabled || !until}
|
|
82
64
|
aria-label="Date on which the recurrence ends"
|
|
83
65
|
value={until ?? getUntil({ date, frequency })}
|
|
@@ -101,7 +83,7 @@ function RecurrenceEndInput({
|
|
|
101
83
|
}
|
|
102
84
|
disabled={disabled}
|
|
103
85
|
/>
|
|
104
|
-
<Form.Check.Label>
|
|
86
|
+
<Form.Check.Label>After</Form.Check.Label>
|
|
105
87
|
</Col>
|
|
106
88
|
<Col>
|
|
107
89
|
<InputGroup>
|
|
@@ -117,7 +99,7 @@ function RecurrenceEndInput({
|
|
|
117
99
|
}
|
|
118
100
|
/>
|
|
119
101
|
<InputGroup.Append>
|
|
120
|
-
<InputGroup.Text>
|
|
102
|
+
<InputGroup.Text>occurrences</InputGroup.Text>
|
|
121
103
|
</InputGroup.Append>
|
|
122
104
|
</InputGroup>
|
|
123
105
|
</Col>
|
|
@@ -127,7 +109,7 @@ function RecurrenceEndInput({
|
|
|
127
109
|
);
|
|
128
110
|
}
|
|
129
111
|
|
|
130
|
-
|
|
112
|
+
const defaultOccurrences = {
|
|
131
113
|
[RRule.DAILY]: 30,
|
|
132
114
|
[RRule.WEEKLY]: 13,
|
|
133
115
|
[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
|
|
6
|
+
import RecurrenceEndInput from "./RecurrenceEndInput";
|
|
7
7
|
import RecurrenceIntervalAndFrequencyInput from "./RecurrenceIntervalAndFrequencyInput";
|
|
8
8
|
import RecurrenceMonthlyRepeatByInput from "./RecurrenceMonthlyRepeatByInput";
|
|
9
9
|
import RecurrenceWeekdaysInput from "./RecurrenceWeekdaysInput";
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
export interface RecurrenceInputProps {
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
date: string;
|
|
19
|
-
minDate?: string;
|
|
20
19
|
value?: string;
|
|
21
20
|
onChange: (value: string) => void;
|
|
22
21
|
initialFrequency?: Frequency;
|
|
@@ -25,7 +24,6 @@ export interface RecurrenceInputProps {
|
|
|
25
24
|
export function RecurrenceInput({
|
|
26
25
|
disabled = false,
|
|
27
26
|
date,
|
|
28
|
-
minDate,
|
|
29
27
|
value,
|
|
30
28
|
onChange,
|
|
31
29
|
initialFrequency = Frequency.WEEKLY,
|
|
@@ -84,7 +82,6 @@ export function RecurrenceInput({
|
|
|
84
82
|
)}
|
|
85
83
|
<RecurrenceEndInput
|
|
86
84
|
date={date}
|
|
87
|
-
minDate={minDate}
|
|
88
85
|
frequency={state.freq}
|
|
89
86
|
until={state.until && DateTime.fromJSDate(state.until).toISODate()}
|
|
90
87
|
count={state.count}
|
|
@@ -133,12 +130,5 @@ const getInitialState = ({
|
|
|
133
130
|
byweekday = options.byweekday[0];
|
|
134
131
|
}
|
|
135
132
|
|
|
136
|
-
return {
|
|
137
|
-
...options,
|
|
138
|
-
count:
|
|
139
|
-
options?.count || options.until
|
|
140
|
-
? options.count
|
|
141
|
-
: defaultOccurrences[options.freq],
|
|
142
|
-
byweekday,
|
|
143
|
-
};
|
|
133
|
+
return { ...options, byweekday };
|
|
144
134
|
};
|
|
@@ -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 {
|
|
5
|
+
import { useFormContext } from "react-hook-form";
|
|
6
6
|
import { DATE_FORMAT } from "@licklist/core/dist/Config";
|
|
7
7
|
import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
|
|
8
8
|
|
|
@@ -13,14 +13,6 @@ 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
|
-
>;
|
|
24
16
|
}
|
|
25
17
|
|
|
26
18
|
function RecurrenceIntervalAndFrequencyInput({
|
|
@@ -30,8 +22,6 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
30
22
|
startTimeLabel,
|
|
31
23
|
endDateLabel,
|
|
32
24
|
endTimeLabel,
|
|
33
|
-
startTimeRules,
|
|
34
|
-
endTimeRules,
|
|
35
25
|
}: RecurrenceIntervalAndFrequencyInputProps) {
|
|
36
26
|
const { t } = useTranslation(["Design", "Notification", "App"]);
|
|
37
27
|
|
|
@@ -40,6 +30,7 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
40
30
|
formState: { errors },
|
|
41
31
|
register,
|
|
42
32
|
trigger,
|
|
33
|
+
setValue,
|
|
43
34
|
} = useFormContext<RecurringDatePickerInputValues>();
|
|
44
35
|
|
|
45
36
|
const startDate = getValues("startDate");
|
|
@@ -56,9 +47,6 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
56
47
|
}, [startDate]);
|
|
57
48
|
|
|
58
49
|
useEffect(() => {
|
|
59
|
-
if (!startTime || !endTime) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
50
|
trigger("endTime");
|
|
63
51
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
52
|
}, [startTime]);
|
|
@@ -130,15 +118,15 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
130
118
|
</Form.Label>
|
|
131
119
|
<Form.Control
|
|
132
120
|
type="time"
|
|
133
|
-
{...register("startTime", { required: false
|
|
121
|
+
{...register("startTime", { required: false })}
|
|
122
|
+
onChange={({ target: { value } }) => {
|
|
123
|
+
setValue("startTime", `${value}:00`);
|
|
124
|
+
}}
|
|
134
125
|
placeholder="hh:mm"
|
|
135
126
|
defaultValue={startTime}
|
|
136
127
|
disabled={disabled}
|
|
137
128
|
isInvalid={Boolean(errors.startTime)}
|
|
138
129
|
/>
|
|
139
|
-
<Form.Control.Feedback type="invalid">
|
|
140
|
-
{errors.startTime?.message}
|
|
141
|
-
</Form.Control.Feedback>
|
|
142
130
|
</Form.Group>
|
|
143
131
|
</Col>
|
|
144
132
|
|
|
@@ -156,16 +144,18 @@ function RecurrenceIntervalAndFrequencyInput({
|
|
|
156
144
|
const currentStartTime = DateTime.fromISO(startTime);
|
|
157
145
|
const currentEndTime = DateTime.fromISO(time);
|
|
158
146
|
|
|
159
|
-
return currentEndTime?.diff(currentStartTime, ["
|
|
160
|
-
?.
|
|
147
|
+
return currentEndTime?.diff(currentStartTime, ["seconds"])
|
|
148
|
+
?.seconds > 0
|
|
161
149
|
? true
|
|
162
150
|
: `${t(`Validation:fieldLaterDate`, {
|
|
163
151
|
attribute: t("Design:endTimeSmall"),
|
|
164
152
|
min: t("Design:startTimeSmall"),
|
|
165
153
|
})}`;
|
|
166
154
|
},
|
|
167
|
-
...endTimeRules,
|
|
168
155
|
})}
|
|
156
|
+
onChange={({ target: { value } }) => {
|
|
157
|
+
setValue("endTime", `${value}:59`, { shouldValidate: true });
|
|
158
|
+
}}
|
|
169
159
|
placeholder="hh:mm"
|
|
170
160
|
defaultValue={endTime}
|
|
171
161
|
disabled={disabled}
|
|
@@ -7,7 +7,6 @@ import { useIntl } from "react-intl";
|
|
|
7
7
|
import {
|
|
8
8
|
DATE_TIME_FORMAT,
|
|
9
9
|
DATE_TIME_FULL_FORMAT,
|
|
10
|
-
TIME_FULL_FORMAT,
|
|
11
10
|
} from "@licklist/core/dist/Config/Date";
|
|
12
11
|
import { usePreviousValue } from "@licklist/plugins/dist/hooks/Value/usePreviousValue";
|
|
13
12
|
import { FormProvider, useForm } from "react-hook-form";
|
|
@@ -39,7 +38,6 @@ export interface RecurringDatePickerInputValues {
|
|
|
39
38
|
byweekday?: Weekday[];
|
|
40
39
|
until?: Date;
|
|
41
40
|
count?: number;
|
|
42
|
-
withOutEndDate?: boolean;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
export function RecurringDatePickerInput({
|
|
@@ -103,11 +101,6 @@ export function RecurringDatePickerInput({
|
|
|
103
101
|
})
|
|
104
102
|
: nextState.byweekday;
|
|
105
103
|
|
|
106
|
-
const endTimeNextState = nextState?.endTime
|
|
107
|
-
? DateTime.fromISO(nextState?.endTime).toFormat(TIME_FULL_FORMAT)
|
|
108
|
-
: "";
|
|
109
|
-
const endDateNextState = nextState?.endDate ?? "";
|
|
110
|
-
|
|
111
104
|
const rrule = RRule.optionsToString({
|
|
112
105
|
// @TODO: investigate if we need these fields
|
|
113
106
|
// dtstart: getDateTimeObject(startDate, startTime).toJSDate(),
|
|
@@ -122,8 +115,6 @@ export function RecurringDatePickerInput({
|
|
|
122
115
|
|
|
123
116
|
onChange({
|
|
124
117
|
...nextState,
|
|
125
|
-
endDate: endDateNextState,
|
|
126
|
-
endTime: endTimeNextState,
|
|
127
118
|
rrule,
|
|
128
119
|
});
|
|
129
120
|
};
|
|
@@ -15,7 +15,7 @@ export function ReportForm({
|
|
|
15
15
|
onSubmit,
|
|
16
16
|
onHide,
|
|
17
17
|
hasPermission,
|
|
18
|
-
}: ReportFormProps) {
|
|
18
|
+
}: ReportFormProps): JSX.Element {
|
|
19
19
|
const { t } = useTranslation(["App"]);
|
|
20
20
|
const fromDateInput = useRef<HTMLInputDateElement | null>(null);
|
|
21
21
|
const toDateInput = useRef<HTMLInputDateElement | null>(null);
|