@licklist/design 0.44.486-dev.82 → 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 +5 -50
- 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
|
@@ -86,12 +86,6 @@
|
|
|
86
86
|
max-width: 5.3rem;
|
|
87
87
|
min-height: 2.75rem;
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
&.calendar-view {
|
|
91
|
-
min-width: auto;
|
|
92
|
-
max-width: none;
|
|
93
|
-
min-height: auto;
|
|
94
|
-
}
|
|
95
89
|
}
|
|
96
90
|
|
|
97
91
|
.time {
|
|
@@ -105,3 +99,15 @@
|
|
|
105
99
|
font-weight: 300;
|
|
106
100
|
color: $snippet-calendar-button-font-color;
|
|
107
101
|
}
|
|
102
|
+
|
|
103
|
+
.info {
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
font-weight: 300;
|
|
107
|
+
flex-direction: row;
|
|
108
|
+
|
|
109
|
+
.logo {
|
|
110
|
+
width: 0.5rem;
|
|
111
|
+
margin-right: 0.5rem;
|
|
112
|
+
}
|
|
113
|
+
}
|
package/src/styles/packages.scss
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@import "./static";
|
|
14
14
|
@import "./table";
|
|
15
15
|
@import "./back-button";
|
|
16
|
+
@import "./iframe-customers-journey";
|
|
16
17
|
@import "./custom-fields";
|
|
17
18
|
@import "./file-upload";
|
|
18
19
|
@import "./iframe-events";
|
|
@@ -40,6 +41,3 @@
|
|
|
40
41
|
@import "./striped-static-table/";
|
|
41
42
|
@import "./image-radio-input/";
|
|
42
43
|
@import "./radio-card/";
|
|
43
|
-
@import "./activity-card/";
|
|
44
|
-
@import "./date-time-button/";
|
|
45
|
-
@import "./availability-indicator/";
|
|
@@ -7,16 +7,6 @@
|
|
|
7
7
|
overflow: auto;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
.modal-form-content {
|
|
12
|
-
max-height: 21rem;
|
|
13
|
-
overflow-x: hidden;
|
|
14
|
-
|
|
15
|
-
.error-content {
|
|
16
|
-
min-width: 25rem;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
10
|
.reccurrence-interval-container {
|
|
21
11
|
.form-group {
|
|
22
12
|
margin-bottom: 0.5rem;
|
|
@@ -76,7 +66,6 @@
|
|
|
76
66
|
display: flex;
|
|
77
67
|
flex-direction: column;
|
|
78
68
|
gap: 1rem;
|
|
79
|
-
|
|
80
69
|
}
|
|
81
70
|
|
|
82
71
|
.custom-checkbox {
|
|
@@ -143,10 +132,6 @@
|
|
|
143
132
|
}
|
|
144
133
|
}
|
|
145
134
|
|
|
146
|
-
.footer-with-short-notes {
|
|
147
|
-
min-width: 18rem;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
135
|
footer {
|
|
151
136
|
display: flex;
|
|
152
137
|
gap: 1.25rem;
|
|
@@ -163,4 +148,3 @@
|
|
|
163
148
|
}
|
|
164
149
|
}
|
|
165
150
|
}
|
|
166
|
-
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
|
|
7
7
|
.result-card {
|
|
8
|
-
height:
|
|
8
|
+
height: 11.125rem;
|
|
9
9
|
border: 1px solid $gray-400;
|
|
10
10
|
max-width: calc(50% - 0.75rem);
|
|
11
11
|
flex: 0 0 calc(50% - 0.75rem);
|
|
12
12
|
transition: ease-in 0.25s;
|
|
13
13
|
border-radius: 0.25rem;
|
|
14
14
|
box-shadow: 0px 0px 0.125rem 0px rgb(0 0 0 / 20%);
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
.card-content {
|
|
17
17
|
width: 100%;
|
|
18
18
|
height: 100%;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
position: absolute;
|
|
29
29
|
left: 0.5rem;
|
|
30
30
|
top: 0.125rem;
|
|
31
|
-
font-weight: 600;
|
|
31
|
+
font-weight: 600;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.order-people {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
height: 1.75rem;
|
|
44
44
|
font-size: 0.625rem;
|
|
45
45
|
line-height: 0.625rem;
|
|
46
|
-
color: #
|
|
46
|
+
color: #6D6D6D;
|
|
47
47
|
font-weight: 600;
|
|
48
48
|
|
|
49
49
|
svg {
|
|
@@ -62,19 +62,11 @@
|
|
|
62
62
|
font-size: 0.6875rem;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
.products {
|
|
67
|
-
display: block;
|
|
68
|
-
width: 80%;
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
text-overflow: ellipsis;
|
|
72
|
-
}
|
|
73
65
|
}
|
|
74
66
|
|
|
75
67
|
&:hover {
|
|
76
68
|
box-shadow: 0px 0px 0.5rem 0px rgb(0 0 0 / 20%);
|
|
77
|
-
cursor: pointer;
|
|
69
|
+
cursor: pointer;
|
|
78
70
|
}
|
|
79
71
|
}
|
|
80
72
|
|
|
@@ -93,4 +85,4 @@
|
|
|
93
85
|
}
|
|
94
86
|
}
|
|
95
87
|
}
|
|
96
|
-
}
|
|
88
|
+
}
|
package/src/types/iframe.ts
CHANGED
package/src/typings.d.ts
CHANGED
|
@@ -28,14 +28,3 @@ declare module "*.json" {
|
|
|
28
28
|
|
|
29
29
|
declare module "react-phone-number-input/input";
|
|
30
30
|
declare module "react-phone-number-input/commonjs/Flag";
|
|
31
|
-
|
|
32
|
-
// @TODO: this is a hofix for the following issue:
|
|
33
|
-
// licklist_workspace_frontend/packages/design/src/product-set/hooks/useSortableTreeFunctions.ts(17,34):
|
|
34
|
-
// semantic error TS2304: Cannot find name 'structuredClone'.
|
|
35
|
-
interface WindowOrWorkerGlobalScope {
|
|
36
|
-
structuredClone(value: any, options?: StructuredSerializeOptions): any;
|
|
37
|
-
}
|
|
38
|
-
declare function structuredClone(
|
|
39
|
-
value: any,
|
|
40
|
-
options?: StructuredSerializeOptions
|
|
41
|
-
): any;
|
|
@@ -39,8 +39,7 @@ const WrappedVirtualizedWindowScroller = ({
|
|
|
39
39
|
if (!onDataUpdate) return;
|
|
40
40
|
|
|
41
41
|
onDataUpdate();
|
|
42
|
-
|
|
43
|
-
}, [windowDimensions]);
|
|
42
|
+
}, [windowDimensions, scrollElement, gridRef, onDataUpdate]);
|
|
44
43
|
|
|
45
44
|
return (
|
|
46
45
|
<WindowScroller scrollElement={scrollElement}>
|
|
@@ -25,6 +25,7 @@ export const ZoneForm = ({
|
|
|
25
25
|
onSubmit,
|
|
26
26
|
serverErrors,
|
|
27
27
|
isLoading = false,
|
|
28
|
+
workHours = [],
|
|
28
29
|
}: ZoneFormProps) => {
|
|
29
30
|
const { t } = useTranslation("Design");
|
|
30
31
|
const form = useForm<ZoneFormValues>({
|
|
@@ -54,7 +55,7 @@ export const ZoneForm = ({
|
|
|
54
55
|
return (
|
|
55
56
|
<FormProvider {...form}>
|
|
56
57
|
<Form onSubmit={handleSubmit(onFormSubmit)}>
|
|
57
|
-
<ZoneControl isLoading={isLoading} />
|
|
58
|
+
<ZoneControl isLoading={isLoading} workHours={workHours} />
|
|
58
59
|
<Row>
|
|
59
60
|
<Col md={6} sm={12} />
|
|
60
61
|
<Col
|
|
@@ -9,6 +9,7 @@ import { Form } from "react-bootstrap";
|
|
|
9
9
|
import { UseFormSetError, useForm } from "react-hook-form";
|
|
10
10
|
import { useId } from "@react-aria/utils";
|
|
11
11
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
12
|
+
import { calculateTimeWithOffset } from "@licklist/plugins/dist/utils/time";
|
|
12
13
|
import { getCheckboxesByWorkHours } from "../utils/dates";
|
|
13
14
|
|
|
14
15
|
export type AvailableTimesControlRef = {
|
|
@@ -23,8 +24,6 @@ type AvailableTimesControlProps = {
|
|
|
23
24
|
defaultValues?: string[];
|
|
24
25
|
startTime?: string;
|
|
25
26
|
endTime?: string;
|
|
26
|
-
errorMessage?: string;
|
|
27
|
-
clearErrorMessage: () => void;
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
type AvailableTimesForm = { availableTimes: string[] };
|
|
@@ -32,95 +31,95 @@ type AvailableTimesForm = { availableTimes: string[] };
|
|
|
32
31
|
export const AvailableTimesControl = forwardRef<
|
|
33
32
|
AvailableTimesControlRef,
|
|
34
33
|
AvailableTimesControlProps
|
|
35
|
-
>(
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
34
|
+
>(({ isLoading, workHours, defaultValues = [] }, ref) => {
|
|
35
|
+
const nameId = useId();
|
|
36
|
+
const { t } = useTranslation(["Design", "Validation"]);
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
register,
|
|
40
|
+
formState: { errors },
|
|
41
|
+
reset,
|
|
42
|
+
trigger,
|
|
43
|
+
getValues,
|
|
44
|
+
setValue,
|
|
45
|
+
watch,
|
|
46
|
+
setError,
|
|
47
|
+
} = useForm<AvailableTimesForm>({ mode: "onChange" });
|
|
48
|
+
|
|
49
|
+
const availableTimes = watch("availableTimes") || [];
|
|
50
|
+
|
|
51
|
+
const checkboxes = useMemo(
|
|
52
|
+
() => getCheckboxesByWorkHours(workHours),
|
|
53
|
+
[workHours]
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
useImperativeHandle(ref, () => {
|
|
57
|
+
return {
|
|
53
58
|
trigger,
|
|
54
59
|
getValues,
|
|
55
|
-
setValue,
|
|
56
|
-
watch,
|
|
57
60
|
setError,
|
|
58
|
-
} = useForm<AvailableTimesForm>({ mode: "onChange" });
|
|
59
|
-
|
|
60
|
-
const availableTimes = watch("availableTimes") || [];
|
|
61
|
-
|
|
62
|
-
const checkboxes = useMemo(
|
|
63
|
-
() => getCheckboxesByWorkHours(workHours),
|
|
64
|
-
[workHours]
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
useImperativeHandle(ref, () => {
|
|
68
|
-
return {
|
|
69
|
-
trigger,
|
|
70
|
-
getValues,
|
|
71
|
-
setError,
|
|
72
|
-
};
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const onChange = (option: string) => {
|
|
76
|
-
const isAlreadyChecked = availableTimes.includes(option);
|
|
77
|
-
if (errorMessage) {
|
|
78
|
-
clearErrorMessage();
|
|
79
|
-
}
|
|
80
|
-
if (isAlreadyChecked) {
|
|
81
|
-
setValue(
|
|
82
|
-
"availableTimes",
|
|
83
|
-
availableTimes.filter((value) => value !== option)
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
setValue("availableTimes", [...availableTimes, option]);
|
|
90
61
|
};
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const onChange = (option: string) => {
|
|
65
|
+
const timeWithOffset = calculateTimeWithOffset(option);
|
|
66
|
+
|
|
67
|
+
const isAlreadyChecked = availableTimes.includes(timeWithOffset);
|
|
68
|
+
|
|
69
|
+
if (isAlreadyChecked) {
|
|
70
|
+
setValue(
|
|
71
|
+
"availableTimes",
|
|
72
|
+
availableTimes.filter((value) => value !== timeWithOffset)
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
setValue("availableTimes", [...availableTimes, timeWithOffset]);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (!defaultValues) return;
|
|
83
|
+
|
|
84
|
+
reset({ availableTimes: defaultValues });
|
|
85
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
|
+
}, [defaultValues]);
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<Form.Group controlId={nameId}>
|
|
90
|
+
<Form.Label>{t("Design:startTimes")}</Form.Label>
|
|
91
|
+
<div className="zone-available-times">
|
|
92
|
+
{checkboxes.map((option) => {
|
|
93
|
+
return (
|
|
94
|
+
<Form.Check key={option} inline custom id={option}>
|
|
95
|
+
<Form.Check.Input
|
|
96
|
+
type="checkbox"
|
|
97
|
+
value={option}
|
|
98
|
+
checked={availableTimes.includes(
|
|
99
|
+
calculateTimeWithOffset(option)
|
|
100
|
+
)}
|
|
101
|
+
onChange={() => onChange(option)}
|
|
102
|
+
disabled={isLoading}
|
|
103
|
+
/>
|
|
104
|
+
<Form.Check.Label>{option}</Form.Check.Label>
|
|
105
|
+
</Form.Check>
|
|
106
|
+
);
|
|
107
|
+
})}
|
|
108
|
+
</div>
|
|
91
109
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
value={option}
|
|
109
|
-
checked={availableTimes.includes(option)}
|
|
110
|
-
onChange={() => onChange(option)}
|
|
111
|
-
disabled={isLoading}
|
|
112
|
-
/>
|
|
113
|
-
<Form.Check.Label>{option}</Form.Check.Label>
|
|
114
|
-
</Form.Check>
|
|
115
|
-
);
|
|
116
|
-
})}
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<Form.Control type="hidden" {...register("availableTimes")} />
|
|
120
|
-
<div className="manual-form-error">
|
|
121
|
-
{errors.availableTimes?.message || errorMessage}
|
|
122
|
-
</div>
|
|
123
|
-
</Form.Group>
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
);
|
|
110
|
+
<Form.Control
|
|
111
|
+
type="hidden"
|
|
112
|
+
{...register("availableTimes", {
|
|
113
|
+
required: {
|
|
114
|
+
value: true,
|
|
115
|
+
message: t("Validation:fieldMinNumber", {
|
|
116
|
+
attribute: t("startTimes"),
|
|
117
|
+
min: 1,
|
|
118
|
+
}),
|
|
119
|
+
},
|
|
120
|
+
})}
|
|
121
|
+
/>
|
|
122
|
+
<div className="manual-form-error">{errors.availableTimes?.message}</div>
|
|
123
|
+
</Form.Group>
|
|
124
|
+
);
|
|
125
|
+
});
|
|
@@ -7,25 +7,26 @@ import { SortControl } from "./SortControl";
|
|
|
7
7
|
import { ZoneRecurrencesControl } from "./ZoneRecurrencesControl";
|
|
8
8
|
import { DescriptionControl } from "./DescriptionControl";
|
|
9
9
|
import { ZoneImageControl } from "./ZoneImageControl";
|
|
10
|
-
import { GameDurationControl } from "./GameDurationControl";
|
|
11
10
|
|
|
12
11
|
export type ZoneControlProps = {
|
|
13
12
|
isLoading: boolean;
|
|
14
13
|
workHours?: WorkHour[];
|
|
15
14
|
};
|
|
16
15
|
|
|
17
|
-
export const ZoneControl = ({
|
|
16
|
+
export const ZoneControl = ({
|
|
17
|
+
isLoading,
|
|
18
|
+
workHours = [],
|
|
19
|
+
}: ZoneControlProps) => {
|
|
18
20
|
return (
|
|
19
21
|
<Row>
|
|
20
22
|
<Col md={6} sm={12} className="pr-5">
|
|
21
23
|
<NameControl isLoading={isLoading} />
|
|
22
|
-
<ZoneRecurrencesControl />
|
|
24
|
+
<ZoneRecurrencesControl workHours={workHours} isLoading={isLoading} />
|
|
23
25
|
<hr />
|
|
24
26
|
<Row>
|
|
25
27
|
<Col md={6} sm={6}>
|
|
26
28
|
<ZoneTypeControl isLoading={isLoading} />
|
|
27
29
|
<SortControl isLoading={isLoading} />
|
|
28
|
-
<GameDurationControl isLoading={isLoading} />
|
|
29
30
|
</Col>
|
|
30
31
|
<Col md={6} sm={6}>
|
|
31
32
|
<ZoneImageControl isLoading={isLoading} />
|
|
@@ -11,7 +11,12 @@ import {
|
|
|
11
11
|
} from "@dnd-kit/sortable";
|
|
12
12
|
import { DndContext } from "@dnd-kit/core";
|
|
13
13
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
14
|
-
|
|
14
|
+
import { DateTime } from "luxon";
|
|
15
|
+
import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
16
|
+
import {
|
|
17
|
+
calculateTimeWithOffset,
|
|
18
|
+
DIRECTION_TO_LOCAL,
|
|
19
|
+
} from "@licklist/plugins/dist/utils/time";
|
|
15
20
|
import { CONFIRM_MODAL_ACTIONS } from "../../../modals/confirmation/ConfirmModal";
|
|
16
21
|
import { Icon } from "../../../static";
|
|
17
22
|
import {
|
|
@@ -19,6 +24,10 @@ import {
|
|
|
19
24
|
RecurringDatePickerInputValues,
|
|
20
25
|
} from "../../../recurring-date-picker-input/RecurringDatePickerInput";
|
|
21
26
|
import { ZoneRecurrenceControl } from "./ZoneRecurrenceControl";
|
|
27
|
+
import {
|
|
28
|
+
AvailableTimesControl,
|
|
29
|
+
AvailableTimesControlRef,
|
|
30
|
+
} from "./AvailableTimesControl";
|
|
22
31
|
import { sameWidthPopperModifier } from "../../../product-set/control/DateAndRecurrenceInput";
|
|
23
32
|
|
|
24
33
|
export interface DateAndRecurrenceInputValues {
|
|
@@ -30,7 +39,10 @@ export type ZoneRecurrenceControlProps = {
|
|
|
30
39
|
isLoading?: boolean;
|
|
31
40
|
};
|
|
32
41
|
|
|
33
|
-
export const ZoneRecurrencesControl = (
|
|
42
|
+
export const ZoneRecurrencesControl = ({
|
|
43
|
+
workHours,
|
|
44
|
+
isLoading = false,
|
|
45
|
+
}: ZoneRecurrenceControlProps) => {
|
|
34
46
|
const {
|
|
35
47
|
control,
|
|
36
48
|
register,
|
|
@@ -54,7 +66,10 @@ export const ZoneRecurrencesControl = () => {
|
|
|
54
66
|
values: null,
|
|
55
67
|
});
|
|
56
68
|
const clearEditState = () => setEditState({ index: null, values: null });
|
|
69
|
+
const [availableTimes, setAvailableTimes] = useState<string[]>([]);
|
|
70
|
+
|
|
57
71
|
const popoverRef = useRef<HTMLDivElement>();
|
|
72
|
+
const availableTimesFormRef = useRef<AvailableTimesControlRef>();
|
|
58
73
|
|
|
59
74
|
useClickAway(popoverRef, (event) => {
|
|
60
75
|
const isModal = CONFIRM_MODAL_ACTIONS.includes(
|
|
@@ -77,12 +92,45 @@ export const ZoneRecurrencesControl = () => {
|
|
|
77
92
|
const handleRecurringDateChange = async (
|
|
78
93
|
next: RecurringDatePickerInputValues
|
|
79
94
|
) => {
|
|
95
|
+
const isAvailableTimesFormValid =
|
|
96
|
+
await availableTimesFormRef.current?.trigger();
|
|
97
|
+
if (!isAvailableTimesFormValid) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (next?.startTime && next?.endTime) {
|
|
101
|
+
const startTime = DateTime.fromISO(next.startTime);
|
|
102
|
+
const endTime = DateTime.fromISO(next.endTime);
|
|
103
|
+
const { availableTimes } = availableTimesFormRef.current.getValues();
|
|
104
|
+
const validAvalilableTimes = availableTimes.every((time) => {
|
|
105
|
+
const currentAvailableTime = DateTime.fromFormat(
|
|
106
|
+
calculateTimeWithOffset(time, DIRECTION_TO_LOCAL),
|
|
107
|
+
TIME_FORMAT
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
|
|
112
|
+
currentAvailableTime.diff(endTime, "minutes").minutes <= 0
|
|
113
|
+
);
|
|
114
|
+
});
|
|
115
|
+
if (!validAvalilableTimes) {
|
|
116
|
+
availableTimesFormRef.current.setError("availableTimes", {
|
|
117
|
+
message: t("Validation:fieldTimeBetween", {
|
|
118
|
+
attribute: t("Design:startTimesSmall"),
|
|
119
|
+
min: startTime.toFormat(TIME_FORMAT),
|
|
120
|
+
max: endTime.toFormat(TIME_FORMAT),
|
|
121
|
+
}),
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
80
127
|
const values = {
|
|
81
128
|
rrule: next.rrule,
|
|
82
129
|
startDate: next.startDate,
|
|
83
130
|
endDate: next.endDate,
|
|
84
131
|
startTime: next.startTime,
|
|
85
132
|
endTime: next.endTime,
|
|
133
|
+
...availableTimesFormRef.current.getValues(),
|
|
86
134
|
} as Partial<ZoneRecurrence>;
|
|
87
135
|
|
|
88
136
|
if (editState.values?.id) {
|
|
@@ -103,6 +151,7 @@ export const ZoneRecurrencesControl = () => {
|
|
|
103
151
|
clearEditState();
|
|
104
152
|
|
|
105
153
|
setEditState({ index, values: next });
|
|
154
|
+
setAvailableTimes(next.availableTimes || []);
|
|
106
155
|
setIsDatePopoverVisible(() => true);
|
|
107
156
|
};
|
|
108
157
|
|
|
@@ -166,7 +215,14 @@ export const ZoneRecurrencesControl = () => {
|
|
|
166
215
|
onChange={handleRecurringDateChange}
|
|
167
216
|
onDelete={handleDelete}
|
|
168
217
|
setInitialStartDateAfterSelect
|
|
169
|
-
|
|
218
|
+
>
|
|
219
|
+
<AvailableTimesControl
|
|
220
|
+
workHours={workHours}
|
|
221
|
+
isLoading={isLoading}
|
|
222
|
+
defaultValues={availableTimes}
|
|
223
|
+
ref={availableTimesFormRef}
|
|
224
|
+
/>
|
|
225
|
+
</RecurringDatePickerInput>
|
|
170
226
|
</Popover.Content>
|
|
171
227
|
</Popover>
|
|
172
228
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { TIME_SEPARATOR } from "@licklist/core/dist/Services/Date";
|
|
1
|
+
import { datetime, TIME_SEPARATOR } from "@licklist/core/dist/Services/Date";
|
|
2
2
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
3
|
-
import { DateTime } from "luxon";
|
|
4
|
-
import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
5
3
|
|
|
6
4
|
const DEFAULT_START_DAY_TIME = "00:00";
|
|
7
5
|
const DEFAULT_END_DAY_TIME = "23:59";
|
|
@@ -15,37 +13,46 @@ export const getTimeCheckboxRanges = (
|
|
|
15
13
|
const [startHour, startMinutes] = startTime.split(TIME_SEPARATOR);
|
|
16
14
|
const [endHour, endMinutes] = endTime.split(TIME_SEPARATOR);
|
|
17
15
|
|
|
18
|
-
let startDate =
|
|
19
|
-
.
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
second: 0,
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const checkboxes: string[] = [startDate.toFormat(TIME_FORMAT)];
|
|
16
|
+
let startDate = datetime(
|
|
17
|
+
today.getFullYear(),
|
|
18
|
+
today.getMonth() + 1,
|
|
19
|
+
today.getDate(),
|
|
20
|
+
Number(startHour),
|
|
21
|
+
Number(startMinutes)
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const endDate = datetime(
|
|
25
|
+
today.getFullYear(),
|
|
26
|
+
today.getMonth() + 1,
|
|
27
|
+
today.getDate(),
|
|
28
|
+
Number(endHour),
|
|
29
|
+
Number(endMinutes)
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const dateSlices: { [key: string]: Date } = {
|
|
33
|
+
0: startDate,
|
|
34
|
+
};
|
|
41
35
|
let count = 0;
|
|
42
36
|
|
|
43
|
-
while (endDate
|
|
44
|
-
startDate = startDate.
|
|
37
|
+
while (endDate >= startDate) {
|
|
38
|
+
startDate = new Date(startDate.getTime() + range * 60 * 1000);
|
|
45
39
|
count += 1;
|
|
46
|
-
|
|
40
|
+
dateSlices[count] = startDate;
|
|
47
41
|
}
|
|
48
42
|
|
|
43
|
+
const checkboxes = Object.keys(dateSlices)
|
|
44
|
+
.map((key) => {
|
|
45
|
+
const date = dateSlices[key];
|
|
46
|
+
if (date < endDate) {
|
|
47
|
+
const [, time] = date.toISOString().split("T");
|
|
48
|
+
const [selectedHours, selectedMinutes] = time.split(TIME_SEPARATOR);
|
|
49
|
+
|
|
50
|
+
return [selectedHours, selectedMinutes].join(TIME_SEPARATOR);
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
})
|
|
54
|
+
.filter(Boolean);
|
|
55
|
+
|
|
49
56
|
return checkboxes;
|
|
50
57
|
};
|
|
51
58
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r,n,i=require("react");(e=i)&&"object"==typeof e&&"default"in e&&e.default;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}exports.ReactComponent=function(e){return i.createElement("svg",f({width:7,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=i.createElement("rect",{x:.944,y:1.037,width:5.252,height:3.049,rx:1.5,fill:"#4CF973",stroke:"#fff"})),r||(r=i.createElement("rect",{x:.944,y:4.11,width:5.252,height:3.049,rx:1.5,fill:"#4CF973",stroke:"#fff"})),n||(n=i.createElement("rect",{x:.944,y:7.183,width:5.252,height:3.049,rx:1.5,fill:"#4CF973",stroke:"#fff"})))};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r,n,i=require("react");(e=i)&&"object"==typeof e&&"default"in e&&e.default;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}exports.ReactComponent=function(e){return i.createElement("svg",f({width:7,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=i.createElement("rect",{x:1.241,y:1.037,width:5.252,height:3.049,rx:1.5,fill:"#E4E4E4",stroke:"#fff"})),r||(r=i.createElement("rect",{x:1.241,y:4.11,width:5.252,height:3.049,rx:1.5,fill:"#FDD054",stroke:"#fff"})),n||(n=i.createElement("rect",{x:1.241,y:7.183,width:5.252,height:3.049,rx:1.5,fill:"#FDD054",stroke:"#fff"})))};
|