@licklist/design 0.44.486-dev.48 → 0.44.486-dev.5
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 -7
- 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/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/index.d.ts +1 -0
- package/dist/iframe/event/index.d.ts.map +1 -1
- package/dist/iframe/index.d.ts +2 -2
- package/dist/iframe/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -2
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
- package/dist/iframe/order-process/components/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 +3 -4
- 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/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts +1 -7
- package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- 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/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/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.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +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/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/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/form/CustomCheckbox.scss +0 -5
- package/dist/styles/header/Header.scss +4 -0
- package/dist/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
- package/{src/styles/activity-card/ListActivitiesCard.scss → dist/styles/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/iframe-page/PageBody.scss +2 -3
- package/dist/styles/notification/Notification.scss +0 -4
- package/dist/styles/packages.scss +1 -3
- package/dist/styles/resources-blocking/_index.scss +0 -5
- package/dist/styles/themes/bookedit/_index.scss +0 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
- 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.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +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 +2 -2
- 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 -19
- package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
- package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
- package/src/file-upload/FileUpload.tsx +1 -3
- package/src/iframe/{activity-card → activity-cards/activity-card}/ActivityCard.stories.tsx +1 -24
- 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-venue-map/IframeEventVenueMap.stories.tsx +1 -1
- package/src/iframe/event/index.ts +6 -0
- package/src/iframe/index.ts +2 -1
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -4
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -2
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +8 -17
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
- 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 +32 -62
- 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 +1 -6
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +99 -11
- package/src/iframe/payment/order-items-table/types/index.ts +1 -18
- 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 -2
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
- package/src/product-set/control/ProductSetRecurrenceControl.tsx +4 -8
- package/src/product-set/form/ProductCategoriesControl.tsx +0 -2
- package/src/product-set/form/ProductSetForm.stories.tsx +0 -1
- 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/ProductCategoryControl.tsx +7 -1
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +6 -9
- package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
- package/src/recurrence-input/RecurrenceInput.tsx +2 -12
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -24
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/sales/booking/results/components/ResultCard.tsx +2 -3
- package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
- 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/form/CustomCheckbox.scss +0 -5
- package/src/styles/header/Header.scss +4 -0
- package/src/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
- package/{dist/styles/activity-card/ListActivitiesCard.scss → src/styles/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/iframe-page/PageBody.scss +2 -3
- package/src/styles/notification/Notification.scss +0 -4
- package/src/styles/packages.scss +1 -3
- package/src/styles/resources-blocking/_index.scss +0 -5
- package/src/styles/themes/bookedit/_index.scss +0 -1
- package/src/typings.d.ts +0 -11
- package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
- package/src/zone/form/components/AvailableTimesControl.tsx +9 -4
- package/src/zone/form/components/ZoneControl.tsx +0 -2
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +35 -27
- 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 -9
- 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 -21
- 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 -17
- 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/iframe/payment/order-items-table/types/index.js +0 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +0 -3
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +0 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +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 -59
- package/src/availability-indicator/index.ts +0 -1
- package/src/calendar/Calendar.stories.tsx +0 -33
- package/src/calendar/Calendar.tsx +0 -46
- package/src/calendar/index.ts +0 -3
- package/src/calendar/utils/index.ts +0 -28
- package/src/iframe/activity-card/ActivityCard.tsx +0 -77
- package/src/iframe/activity-card/index.ts +0 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -118
- 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/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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import { ListActivityCardProps, ListActivityCard } from "./ListActivityCard";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Iframe/ListActivityCard",
|
|
7
|
+
component: ListActivityCard,
|
|
8
|
+
} as Meta;
|
|
9
|
+
|
|
10
|
+
export const Default: Story<ListActivityCardProps> = (props) => {
|
|
11
|
+
return <ListActivityCard {...props} />;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
Default.args = {
|
|
15
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
16
|
+
duration: "60 mins",
|
|
17
|
+
price: "from £20",
|
|
18
|
+
image: {
|
|
19
|
+
hash: "0b37b130e22aa2d3",
|
|
20
|
+
id: 195,
|
|
21
|
+
imageType: "cover",
|
|
22
|
+
imageableId: 25,
|
|
23
|
+
imageableType: "zone",
|
|
24
|
+
path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
25
|
+
// eslint-disable-next-line max-len
|
|
26
|
+
url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
27
|
+
},
|
|
28
|
+
onSelect: () => null,
|
|
29
|
+
isSelected: false,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Selected: Story<ListActivityCardProps> = (props) => {
|
|
33
|
+
return <ListActivityCard {...props} />;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
Selected.args = {
|
|
37
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
38
|
+
duration: "60 mins",
|
|
39
|
+
price: "from £20",
|
|
40
|
+
image: {
|
|
41
|
+
hash: "0b37b130e22aa2d3",
|
|
42
|
+
id: 195,
|
|
43
|
+
imageType: "cover",
|
|
44
|
+
imageableId: 25,
|
|
45
|
+
imageableType: "zone",
|
|
46
|
+
path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
47
|
+
// eslint-disable-next-line max-len
|
|
48
|
+
url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
49
|
+
},
|
|
50
|
+
onSelect: () => null,
|
|
51
|
+
isSelected: true,
|
|
52
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
4
|
+
|
|
5
|
+
export interface ListActivityCardProps {
|
|
6
|
+
title: string;
|
|
7
|
+
duration: string;
|
|
8
|
+
price: string;
|
|
9
|
+
image?: Image | null;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
isSelected: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ListActivityCard = ({
|
|
15
|
+
title,
|
|
16
|
+
duration,
|
|
17
|
+
price,
|
|
18
|
+
image,
|
|
19
|
+
onSelect,
|
|
20
|
+
isSelected,
|
|
21
|
+
}: ListActivityCardProps) => {
|
|
22
|
+
return (
|
|
23
|
+
<div role="button" onClick={onSelect} onKeyPress={onSelect} tabIndex={0}>
|
|
24
|
+
<div
|
|
25
|
+
className={clsx("list-activity-card", {
|
|
26
|
+
active: isSelected,
|
|
27
|
+
})}
|
|
28
|
+
>
|
|
29
|
+
<div className="description">
|
|
30
|
+
<div className="title">{title}</div>
|
|
31
|
+
{duration && (
|
|
32
|
+
<div>
|
|
33
|
+
<p>{duration}</p>
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
36
|
+
|
|
37
|
+
{price && <div>{price}</div>}
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
{image && (
|
|
41
|
+
<div className="image-container">
|
|
42
|
+
<img className="image" src={image.url} alt="" />
|
|
43
|
+
</div>
|
|
44
|
+
)}
|
|
45
|
+
</div>
|
|
46
|
+
<hr className="list-activity-card-hr" />
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DateTime } from "luxon";
|
|
3
|
+
import { Meta, Story } from "@storybook/react";
|
|
4
|
+
import {
|
|
5
|
+
EventCalendarProvider,
|
|
6
|
+
getMonthCalendarDates,
|
|
7
|
+
} from "@licklist/plugins/dist/context/event/EventCalendarContext";
|
|
8
|
+
import { EventCalendar, EventCalendarProps } from "./EventCalendar";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: "Iframe/Event/Calendar",
|
|
12
|
+
component: EventCalendar,
|
|
13
|
+
} as Meta;
|
|
14
|
+
|
|
15
|
+
export const Default: Story<EventCalendarProps> = (args) => {
|
|
16
|
+
return (
|
|
17
|
+
<EventCalendarProvider getCalendarDates={getMonthCalendarDates}>
|
|
18
|
+
<div style={{ backgroundColor: "white" }}>
|
|
19
|
+
<EventCalendar {...args} />
|
|
20
|
+
</div>
|
|
21
|
+
</EventCalendarProvider>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const now = DateTime.now().set({
|
|
26
|
+
hour: 0,
|
|
27
|
+
second: 0,
|
|
28
|
+
millisecond: 0,
|
|
29
|
+
minute: 0,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
Default.args = {
|
|
33
|
+
disabledDates: [now.minus({ day: 2 }), now, now.plus({ day: 2 })],
|
|
34
|
+
isLoading: false,
|
|
35
|
+
fromPrice: "from £10",
|
|
36
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import { CalendarButtons } from "./components/CalendarButtons";
|
|
3
|
+
import { CalendarDates } from "./components/CalendarDates";
|
|
4
|
+
import { CalendarBaseProps } from "./types";
|
|
5
|
+
|
|
6
|
+
export type EventCalendarProps = CalendarBaseProps & {
|
|
7
|
+
fromPrice?: string | ReactElement | null;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const EventCalendar = ({
|
|
11
|
+
disabledDates = [],
|
|
12
|
+
isLoading = false,
|
|
13
|
+
fromPrice,
|
|
14
|
+
}: EventCalendarProps) => {
|
|
15
|
+
return (
|
|
16
|
+
<div className="calendar-wrapper">
|
|
17
|
+
<div className="calendar">
|
|
18
|
+
<CalendarButtons disabledDates={disabledDates} isLoading={isLoading} />
|
|
19
|
+
<CalendarDates
|
|
20
|
+
disabledDates={disabledDates}
|
|
21
|
+
isLoading={isLoading}
|
|
22
|
+
fromPrice={fromPrice}
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx
RENAMED
|
@@ -1,53 +1,36 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useContext, useMemo } from "react";
|
|
2
2
|
import { Button } from "react-bootstrap";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { range } from "lodash";
|
|
5
|
-
import {
|
|
5
|
+
import { EventCalendarContext } from "@licklist/plugins/dist/context/event/EventCalendarContext";
|
|
6
|
+
import { ReactComponent as SelectArrow } from "../../../../../assets/iframe/selectArrow.svg";
|
|
6
7
|
import { CalendarSelect } from "../CalendarSelect";
|
|
8
|
+
import { CalendarBaseProps } from "../../types";
|
|
7
9
|
import { isSelectedDateDisabled } from "../../utils";
|
|
8
|
-
import { CalendarProps } from "../../Calendar";
|
|
9
10
|
|
|
10
|
-
type CalendarButtonsProps =
|
|
11
|
-
CalendarProps,
|
|
12
|
-
| "isLoading"
|
|
13
|
-
| "disabledDates"
|
|
14
|
-
| "initialDate"
|
|
15
|
-
| "currentDate"
|
|
16
|
-
| "setCurrentDate"
|
|
17
|
-
| "setSelectedDate"
|
|
18
|
-
>;
|
|
11
|
+
type CalendarButtonsProps = CalendarBaseProps;
|
|
19
12
|
|
|
20
13
|
export const CalendarButtons = ({
|
|
21
14
|
disabledDates = [],
|
|
22
15
|
isLoading = false,
|
|
23
|
-
initialDate,
|
|
24
|
-
currentDate,
|
|
25
|
-
setCurrentDate,
|
|
26
|
-
setSelectedDate,
|
|
27
16
|
}: CalendarButtonsProps) => {
|
|
17
|
+
const {
|
|
18
|
+
initialDate,
|
|
19
|
+
currentDate,
|
|
20
|
+
canMoveBack,
|
|
21
|
+
onSelectPreviousMonth,
|
|
22
|
+
onSelectNextMonth,
|
|
23
|
+
setCurrentDate,
|
|
24
|
+
setSelectedDate,
|
|
25
|
+
} = useContext(EventCalendarContext);
|
|
28
26
|
const { t } = useTranslation("Design");
|
|
29
27
|
|
|
30
|
-
const onSelectNextMonth = useCallback(() => {
|
|
31
|
-
setCurrentDate((prevDate) => prevDate.plus({ months: 1 }));
|
|
32
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
|
-
}, []);
|
|
34
|
-
|
|
35
|
-
const onSelectPreviousMonth = useCallback(() => {
|
|
36
|
-
setCurrentDate((prevDate) => prevDate.minus({ month: 1 }));
|
|
37
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
-
}, []);
|
|
39
|
-
|
|
40
28
|
const yearOptions = useMemo(() => {
|
|
41
29
|
return range(initialDate.year, initialDate.year + 5, 1).map((year) => {
|
|
42
30
|
return { label: String(year), value: year };
|
|
43
31
|
});
|
|
44
32
|
}, [initialDate]);
|
|
45
33
|
|
|
46
|
-
const canMoveBack = useMemo(
|
|
47
|
-
() => currentDate > initialDate,
|
|
48
|
-
[currentDate, initialDate]
|
|
49
|
-
);
|
|
50
|
-
|
|
51
34
|
const onSelectYear = (value: string) => {
|
|
52
35
|
const selectedYear = Number(value);
|
|
53
36
|
const nextDateTime = currentDate.set({ year: selectedYear });
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import { Button } from "react-bootstrap";
|
|
3
|
+
import { DateTime } from "luxon";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
|
|
6
|
+
export type CalendarDateProps = {
|
|
7
|
+
initialDate: DateTime;
|
|
8
|
+
currentDate: DateTime;
|
|
9
|
+
selectedDate?: DateTime;
|
|
10
|
+
setSelectedDate: (date: DateTime) => void;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
fromPrice?: string | ReactElement | null;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const CalendarDate = ({
|
|
16
|
+
initialDate,
|
|
17
|
+
currentDate,
|
|
18
|
+
selectedDate,
|
|
19
|
+
setSelectedDate,
|
|
20
|
+
isDisabled = false,
|
|
21
|
+
fromPrice,
|
|
22
|
+
}: CalendarDateProps) => {
|
|
23
|
+
const onClick = () => {
|
|
24
|
+
if (isDisabled) return;
|
|
25
|
+
|
|
26
|
+
setSelectedDate(currentDate);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const disabled = currentDate < initialDate || isDisabled;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Button
|
|
33
|
+
variant="link"
|
|
34
|
+
disabled={disabled}
|
|
35
|
+
className={clsx(
|
|
36
|
+
"calendar-date",
|
|
37
|
+
selectedDate?.hasSame(currentDate, "day") && "selected-date",
|
|
38
|
+
disabled && "disabled-date"
|
|
39
|
+
)}
|
|
40
|
+
onClick={onClick}
|
|
41
|
+
>
|
|
42
|
+
<div>{currentDate.day}</div>
|
|
43
|
+
|
|
44
|
+
{typeof fromPrice === "string" ? (
|
|
45
|
+
<div>{fromPrice}</div>
|
|
46
|
+
) : (
|
|
47
|
+
<>{fromPrice}</>
|
|
48
|
+
)}
|
|
49
|
+
</Button>
|
|
50
|
+
);
|
|
51
|
+
};
|
package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx
RENAMED
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
1
|
+
import React, { ReactElement, useContext, useMemo } from "react";
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
|
-
import {
|
|
4
|
-
import { DateTimeButton } from "../../../date-time-button";
|
|
3
|
+
import { EventCalendarContext } from "@licklist/plugins/dist/context/event/EventCalendarContext";
|
|
5
4
|
import { CalendarWeekdays } from "../CalendarWeekdays";
|
|
5
|
+
import { CalendarDate } from "../CalendarDate";
|
|
6
|
+
import { CalendarBaseProps } from "../../types";
|
|
6
7
|
import { isSelectedDateDisabled } from "../../utils";
|
|
7
|
-
import { CalendarProps } from "../../Calendar";
|
|
8
8
|
|
|
9
|
-
export type CalendarDatesProps =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
>;
|
|
9
|
+
export type CalendarDatesProps = CalendarBaseProps & {
|
|
10
|
+
fromPrice?: string | ReactElement | null;
|
|
11
|
+
};
|
|
13
12
|
|
|
14
13
|
export const CalendarDates = ({
|
|
15
14
|
disabledDates = [],
|
|
16
15
|
isLoading = false,
|
|
17
|
-
calendarDates,
|
|
18
|
-
selectedDate,
|
|
19
|
-
setSelectedDate,
|
|
20
16
|
fromPrice,
|
|
21
|
-
getAvailability,
|
|
22
|
-
includeAvailability,
|
|
23
17
|
}: CalendarDatesProps) => {
|
|
18
|
+
const { calendarDates, initialDate, selectedDate, setSelectedDate } =
|
|
19
|
+
useContext(EventCalendarContext);
|
|
20
|
+
|
|
24
21
|
const fillCalendarDates = useMemo(() => {
|
|
25
22
|
let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
|
|
26
23
|
|
|
@@ -43,24 +40,22 @@ export const CalendarDates = ({
|
|
|
43
40
|
<CalendarWeekdays />
|
|
44
41
|
<div className="calendar-dates">
|
|
45
42
|
{fillCalendarDates.map((date: DateTime | null) => {
|
|
46
|
-
if (date === null)
|
|
43
|
+
if (date === null) {
|
|
44
|
+
return <div />;
|
|
45
|
+
}
|
|
47
46
|
|
|
48
47
|
const isDisabled =
|
|
49
48
|
isLoading || isSelectedDateDisabled(date, disabledDates);
|
|
50
49
|
|
|
51
50
|
return (
|
|
52
|
-
<
|
|
51
|
+
<CalendarDate
|
|
53
52
|
key={+date}
|
|
53
|
+
currentDate={date}
|
|
54
|
+
initialDate={initialDate}
|
|
55
|
+
selectedDate={selectedDate}
|
|
56
|
+
setSelectedDate={setSelectedDate}
|
|
54
57
|
isDisabled={isDisabled}
|
|
55
|
-
|
|
56
|
-
selectedDate ? date.hasSame(selectedDate, "day") : undefined
|
|
57
|
-
}
|
|
58
|
-
date={date.toFormat(DAY_NUMBER)}
|
|
59
|
-
onSelect={() => setSelectedDate(date)}
|
|
60
|
-
price={fromPrice}
|
|
61
|
-
resources={getAvailability?.(date)}
|
|
62
|
-
showResources={includeAvailability}
|
|
63
|
-
calendarView
|
|
58
|
+
fromPrice={fromPrice}
|
|
64
59
|
/>
|
|
65
60
|
);
|
|
66
61
|
})}
|
package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
2
|
import { Form } from "react-bootstrap";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { PAGE_CALENDAR_SELECT_WRAPPER } from "
|
|
4
|
+
import { PAGE_CALENDAR_SELECT_WRAPPER } from "../../../../page/components/PageBody/constants";
|
|
5
5
|
|
|
6
6
|
export type CalendarSelectOption = {
|
|
7
7
|
label: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import isEqual from "lodash/isEqual";
|
|
3
|
+
|
|
4
|
+
export const isSelectedDateDisabled = (
|
|
5
|
+
selectedDate: DateTime,
|
|
6
|
+
disabledDates: DateTime[] = []
|
|
7
|
+
) => {
|
|
8
|
+
return !!disabledDates.find((disabledDate) =>
|
|
9
|
+
isEqual(disabledDate.toObject(), selectedDate.toObject())
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -5,7 +5,7 @@ import { IframeEventVenueMap } from "./IframeEventVenueMap";
|
|
|
5
5
|
import { Page, PageBody, PageHeader } from "../../page";
|
|
6
6
|
import { BookingSummaryFooter } from "../../order-process/components/BookingSummaryFooter";
|
|
7
7
|
import { BookingSummary } from "../../order-process/components/BookingSummary";
|
|
8
|
-
import { CalendarSelect } from "
|
|
8
|
+
import { CalendarSelect } from "../event-calendar/components/CalendarSelect";
|
|
9
9
|
import { Product } from "../../../types";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
@@ -13,6 +13,12 @@ export {
|
|
|
13
13
|
} from "./event-order-short-summary";
|
|
14
14
|
export { EventDescription } from "./event-description";
|
|
15
15
|
export { EventProductSets, EventProductSetsProps } from "./event-product-sets";
|
|
16
|
+
export {
|
|
17
|
+
EventCalendar,
|
|
18
|
+
CalendarSelect,
|
|
19
|
+
CalendarSelectProps,
|
|
20
|
+
CalendarSelectOption,
|
|
21
|
+
} from "./event-calendar";
|
|
16
22
|
export {
|
|
17
23
|
EventStepVenueMapZones,
|
|
18
24
|
EventStepVenueMapZonesProps,
|
package/src/iframe/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export {
|
|
|
10
10
|
EventOrderShortSummary,
|
|
11
11
|
SummaryDataType,
|
|
12
12
|
EventDescription,
|
|
13
|
+
EventCalendar,
|
|
13
14
|
EventProductSets,
|
|
14
15
|
EventProductSetsProps,
|
|
15
16
|
IframeEventVenueMap,
|
|
@@ -42,5 +43,5 @@ export {
|
|
|
42
43
|
export { BackButton } from "./back-button";
|
|
43
44
|
export { PoweredBy } from "./powered-by";
|
|
44
45
|
export * from "./page";
|
|
45
|
-
export * from "./activity-
|
|
46
|
+
export * from "./activity-cards";
|
|
46
47
|
export { CustomDateField, CustomDateFieldProps } from "./custom-fields";
|
|
@@ -11,10 +11,9 @@ import { BookingSummaryAccordion } from "./components/BookingSummaryAccordion";
|
|
|
11
11
|
|
|
12
12
|
export const BookingSummary = ({
|
|
13
13
|
date,
|
|
14
|
-
time,
|
|
15
14
|
menuSteps,
|
|
16
15
|
formValues,
|
|
17
|
-
|
|
16
|
+
isNotShownPeopleAmount,
|
|
18
17
|
eventName,
|
|
19
18
|
transactionFee = 0,
|
|
20
19
|
productsWithErrors,
|
|
@@ -48,7 +47,6 @@ export const BookingSummary = ({
|
|
|
48
47
|
<div className="event-info">
|
|
49
48
|
<p className="m-0 title event-name">{eventName}</p>
|
|
50
49
|
<p className="m-0">{date}</p>
|
|
51
|
-
{time && <p className="m-0">{time}</p>}
|
|
52
50
|
</div>
|
|
53
51
|
<hr />
|
|
54
52
|
|
|
@@ -65,7 +63,7 @@ export const BookingSummary = ({
|
|
|
65
63
|
/>
|
|
66
64
|
);
|
|
67
65
|
})}
|
|
68
|
-
{!
|
|
66
|
+
{!isNotShownPeopleAmount && peopleAmount > 0 && (
|
|
69
67
|
<>
|
|
70
68
|
<hr />
|
|
71
69
|
<div className="d-flex justify-content-between mt-3">
|
|
@@ -6,13 +6,12 @@ export const ACCORDION_KEY = "booking-summary";
|
|
|
6
6
|
|
|
7
7
|
export type BookingSummaryProps = {
|
|
8
8
|
date: string;
|
|
9
|
-
time?: string;
|
|
10
9
|
menuSteps?: MenuStep[];
|
|
11
10
|
formValues?: {
|
|
12
11
|
[key: string]: Order;
|
|
13
12
|
};
|
|
14
13
|
totalWithDiscount?: number;
|
|
15
|
-
|
|
14
|
+
isNotShownPeopleAmount?: boolean;
|
|
16
15
|
eventName?: string;
|
|
17
16
|
hasPeopleInput?: boolean;
|
|
18
17
|
transactionFee?: number;
|
|
@@ -5,8 +5,6 @@ export const cartSumByOrderProducts = (orderProducts?: Order[]) => {
|
|
|
5
5
|
return 0;
|
|
6
6
|
}
|
|
7
7
|
return orderProducts.reduce((prevSumValue: number, product) => {
|
|
8
|
-
if (!product) return 0;
|
|
9
|
-
|
|
10
8
|
return (
|
|
11
9
|
prevSumValue + (product?.deposit || product?.price) * product.quantity
|
|
12
10
|
);
|
|
@@ -20,15 +20,15 @@ import { Step } from "@licklist/core/dist/DataMapper/Product/StepDataMapper";
|
|
|
20
20
|
import { useTranslation } from "react-i18next";
|
|
21
21
|
import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
22
22
|
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
23
|
-
import { MenuStep } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
24
23
|
import { Category } from "./components/Category";
|
|
25
|
-
import {
|
|
24
|
+
import { MenuStep } from "../../../../types";
|
|
25
|
+
import { STEP_FORM_ID } from "../../constants";
|
|
26
26
|
import { ErrorModal } from "../ErrorModal/ErrorModal";
|
|
27
27
|
import { PageBody } from "../../../page/components/PageBody";
|
|
28
28
|
import {
|
|
29
29
|
CalendarSelect,
|
|
30
30
|
CalendarSelectOption,
|
|
31
|
-
} from "
|
|
31
|
+
} from "../../../event/event-calendar/components/CalendarSelect";
|
|
32
32
|
import { IframeEventVenueMap } from "../../../event/event-venue-map";
|
|
33
33
|
import { VenueMapRef } from "../../../../events/event-venue-map/components/VenueMap";
|
|
34
34
|
import { useCategoryVerification } from "../utils/useCategoryVerification";
|
|
@@ -117,19 +117,12 @@ export const CalendarStepsForm = forwardRef<
|
|
|
117
117
|
);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
values,
|
|
122
|
-
step.productCategories,
|
|
123
|
-
isLastMenuStep
|
|
124
|
-
);
|
|
120
|
+
const categoryError = verifyCategoryItems(values, step);
|
|
125
121
|
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
:
|
|
130
|
-
setStepFormError(orderError.message);
|
|
131
|
-
setError(categoryId as never, {
|
|
132
|
-
message: orderError.message,
|
|
122
|
+
if (categoryError) {
|
|
123
|
+
setStepFormError(categoryError.message);
|
|
124
|
+
setError(`category_${categoryError.id}`, {
|
|
125
|
+
message: categoryError.message,
|
|
133
126
|
});
|
|
134
127
|
return;
|
|
135
128
|
}
|
|
@@ -370,5 +363,3 @@ export const CalendarStepsForm = forwardRef<
|
|
|
370
363
|
);
|
|
371
364
|
}
|
|
372
365
|
);
|
|
373
|
-
|
|
374
|
-
CalendarStepsForm.displayName = "CalendarStepsForm";
|
|
@@ -84,9 +84,23 @@ export const CategoryProduct = ({
|
|
|
84
84
|
// but didn't click on number input.
|
|
85
85
|
// If it will be required then required check fired firstly.
|
|
86
86
|
|
|
87
|
-
const {
|
|
87
|
+
const {
|
|
88
|
+
isRequired = false,
|
|
89
|
+
maxAmount = 0,
|
|
90
|
+
minAmount = 0,
|
|
91
|
+
minSpend,
|
|
92
|
+
price,
|
|
93
|
+
} = product;
|
|
88
94
|
|
|
89
95
|
const currentQuantity = value?.quantity ?? 0;
|
|
96
|
+
if (minSpend && currentQuantity * price < minSpend) {
|
|
97
|
+
return t("Design:minimumSpendSumValidation", {
|
|
98
|
+
minSpend: formatNumber(minSpend, {
|
|
99
|
+
style: "currency",
|
|
100
|
+
currency: Config.Currency.GBP,
|
|
101
|
+
}),
|
|
102
|
+
}) as string;
|
|
103
|
+
}
|
|
90
104
|
|
|
91
105
|
if (!value) return true;
|
|
92
106
|
|
|
@@ -10,14 +10,12 @@ import Icon from "../../../../static/Icon";
|
|
|
10
10
|
export interface ErrorModalProps {
|
|
11
11
|
isOpen: boolean;
|
|
12
12
|
onClose?: () => void;
|
|
13
|
-
message?: string;
|
|
14
13
|
messageKey?: string;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export const ErrorModal = ({
|
|
18
17
|
isOpen = false,
|
|
19
18
|
onClose,
|
|
20
|
-
message,
|
|
21
19
|
messageKey,
|
|
22
20
|
}: ErrorModalProps) => {
|
|
23
21
|
const { t } = useTranslation("Design");
|
|
@@ -49,16 +47,15 @@ export const ErrorModal = ({
|
|
|
49
47
|
</ModalHeader>
|
|
50
48
|
<ModalBody className="confirmation-modal-body">
|
|
51
49
|
<div className="d-flex m-5 justify-content-center manual-form-error">
|
|
52
|
-
{
|
|
53
|
-
(messageKey
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
))}
|
|
50
|
+
{messageKey ? (
|
|
51
|
+
t(messageKey)
|
|
52
|
+
) : (
|
|
53
|
+
<Trans
|
|
54
|
+
t={t}
|
|
55
|
+
i18nKey="pleaseSelectAtLeastFrom"
|
|
56
|
+
values={{ min: 1, type: "item", from: "those categories" }}
|
|
57
|
+
/>
|
|
58
|
+
)}
|
|
62
59
|
</div>
|
|
63
60
|
</ModalBody>
|
|
64
61
|
</Modal>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export const fancyTimeFormat = (
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export const fancyTimeFormat = (miliseconds: number) => {
|
|
2
|
+
const date = new Date(miliseconds);
|
|
3
|
+
const mins = date.getMinutes();
|
|
4
|
+
const secs = date.getSeconds();
|
|
5
|
+
let timerString = "";
|
|
6
|
+
|
|
7
|
+
timerString += `${mins}:${secs < 10 ? "0" : ""}`;
|
|
8
|
+
timerString += `${secs}`;
|
|
9
|
+
return timerString;
|
|
7
10
|
};
|