@licklist/design 0.44.486-dev.78 → 0.44.486-dev.8
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.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/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 +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/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/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 +3 -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.stories.tsx +1 -0
- 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/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 +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 +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 -73
- package/src/product-set/control/ProductSetControl.stories.tsx +2 -0
- package/src/product-set/control/ProductSetControl.tsx +10 -44
- 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/components/ResultCard.tsx +3 -24
- 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
|
@@ -47,6 +47,7 @@ const contextValue = {
|
|
|
47
47
|
name: "Example",
|
|
48
48
|
type: "sale",
|
|
49
49
|
termsAndConditions: "",
|
|
50
|
+
isDefault: true,
|
|
50
51
|
operationalCost: OPERATIONAL_COST_CUSTOMER,
|
|
51
52
|
steps: [
|
|
52
53
|
{
|
|
@@ -59,6 +60,7 @@ const contextValue = {
|
|
|
59
60
|
minSubItems: 1,
|
|
60
61
|
maxSubItems: 10,
|
|
61
62
|
quantityType: "constant",
|
|
63
|
+
isRelyOnPeople: false,
|
|
62
64
|
isTimeRelated: false,
|
|
63
65
|
hasTicket: false,
|
|
64
66
|
allowDeposits: false,
|
|
@@ -124,6 +126,7 @@ const contextValue = {
|
|
|
124
126
|
minSubItems: 0,
|
|
125
127
|
maxSubItems: 0,
|
|
126
128
|
quantityType: "recharging",
|
|
129
|
+
isRelyOnPeople: false,
|
|
127
130
|
isTimeRelated: false,
|
|
128
131
|
hasTicket: false,
|
|
129
132
|
allowDeposits: false,
|
|
@@ -141,6 +144,7 @@ const contextValue = {
|
|
|
141
144
|
minSubItems: 0,
|
|
142
145
|
maxSubItems: 0,
|
|
143
146
|
quantityType: "recharging",
|
|
147
|
+
isRelyOnPeople: false,
|
|
144
148
|
isTimeRelated: false,
|
|
145
149
|
hasTicket: false,
|
|
146
150
|
allowDeposits: false,
|
|
@@ -686,6 +690,7 @@ const defaultProductSets = [
|
|
|
686
690
|
name: "Example",
|
|
687
691
|
type: PRODUCT_SET_TYPES[0],
|
|
688
692
|
termsAndConditions: "",
|
|
693
|
+
isDefault: true,
|
|
689
694
|
operationalCost: OPERATIONAL_COST_TYPES[0],
|
|
690
695
|
fieldSet: {
|
|
691
696
|
id: 1,
|
|
@@ -708,6 +713,7 @@ const defaultProductSets = [
|
|
|
708
713
|
minSubItems: 1,
|
|
709
714
|
maxSubItems: 10,
|
|
710
715
|
quantityType: "constant",
|
|
716
|
+
isRelyOnPeople: false,
|
|
711
717
|
isTimeRelated: false,
|
|
712
718
|
hasTicket: false,
|
|
713
719
|
allowDeposits: false,
|
|
@@ -773,6 +779,7 @@ const defaultProductSets = [
|
|
|
773
779
|
minSubItems: 0,
|
|
774
780
|
maxSubItems: 0,
|
|
775
781
|
quantityType: "recharging",
|
|
782
|
+
isRelyOnPeople: false,
|
|
776
783
|
isTimeRelated: false,
|
|
777
784
|
hasTicket: false,
|
|
778
785
|
allowDeposits: false,
|
|
@@ -790,6 +797,7 @@ const defaultProductSets = [
|
|
|
790
797
|
minSubItems: 0,
|
|
791
798
|
maxSubItems: 0,
|
|
792
799
|
quantityType: "recharging",
|
|
800
|
+
isRelyOnPeople: false,
|
|
793
801
|
isTimeRelated: false,
|
|
794
802
|
hasTicket: false,
|
|
795
803
|
allowDeposits: false,
|
|
@@ -875,6 +883,7 @@ const defaultProductSets = [
|
|
|
875
883
|
name: "Example 2",
|
|
876
884
|
type: PRODUCT_SET_TYPES[1],
|
|
877
885
|
termsAndConditions: "",
|
|
886
|
+
isDefault: true,
|
|
878
887
|
operationalCost: OPERATIONAL_COST_TYPES[1],
|
|
879
888
|
fieldSet: {
|
|
880
889
|
id: 2,
|
|
@@ -897,6 +906,7 @@ const defaultProductSets = [
|
|
|
897
906
|
minSubItems: 1,
|
|
898
907
|
maxSubItems: 10,
|
|
899
908
|
quantityType: "constant",
|
|
909
|
+
isRelyOnPeople: false,
|
|
900
910
|
isTimeRelated: false,
|
|
901
911
|
hasTicket: false,
|
|
902
912
|
allowDeposits: false,
|
|
@@ -962,6 +972,7 @@ const defaultProductSets = [
|
|
|
962
972
|
minSubItems: 0,
|
|
963
973
|
maxSubItems: 0,
|
|
964
974
|
quantityType: "recharging",
|
|
975
|
+
isRelyOnPeople: false,
|
|
965
976
|
isTimeRelated: false,
|
|
966
977
|
hasTicket: false,
|
|
967
978
|
allowDeposits: false,
|
|
@@ -979,6 +990,7 @@ const defaultProductSets = [
|
|
|
979
990
|
minSubItems: 0,
|
|
980
991
|
maxSubItems: 0,
|
|
981
992
|
quantityType: "recharging",
|
|
993
|
+
isRelyOnPeople: false,
|
|
982
994
|
isTimeRelated: false,
|
|
983
995
|
hasTicket: false,
|
|
984
996
|
allowDeposits: false,
|
|
@@ -266,7 +266,7 @@ export const EditEventForm = ({
|
|
|
266
266
|
</Form.Group>
|
|
267
267
|
{/* key is used as a hack to make sure rrule is rendered correctly */}
|
|
268
268
|
<IntervalInput
|
|
269
|
-
key={watch("
|
|
269
|
+
key={watch("rrule")}
|
|
270
270
|
disabled={disabled}
|
|
271
271
|
productSetId={productSetId}
|
|
272
272
|
productSets={productSets}
|
|
@@ -15,8 +15,8 @@ export const getDefaultValues = (
|
|
|
15
15
|
type: productSet?.type ?? DEFAULT_PRODUCT_SET_TYPE,
|
|
16
16
|
termsAndConditions: productSet?.termsAndConditions ?? "",
|
|
17
17
|
operationalCost: productSet?.operationalCost ?? DEFAULT_OPERATIONAL_COST_TYPE,
|
|
18
|
-
relyOnPeopleType: productSet?.relyOnPeopleType ?? null,
|
|
19
18
|
thankYouPageUrl: productSet?.thankYouPageUrl ?? "",
|
|
19
|
+
isDefault: productSet?.isDefault ?? false,
|
|
20
20
|
fieldSetId: productSet?.fieldSetId,
|
|
21
21
|
emailTemplates:
|
|
22
22
|
productSet?.mailTemplates && productSet?.mailTemplates?.length > 0
|
|
@@ -24,7 +24,7 @@ export const getDefaultValues = (
|
|
|
24
24
|
: undefined,
|
|
25
25
|
smsTemplates:
|
|
26
26
|
productSet?.smsTemplates && productSet?.smsTemplates?.length > 0
|
|
27
|
-
? getFilteredTemplates(productSet?.
|
|
27
|
+
? getFilteredTemplates(productSet?.mailTemplates)
|
|
28
28
|
: undefined,
|
|
29
29
|
steps:
|
|
30
30
|
productSet?.steps?.map(({ productCategories, ...step }) => ({
|
|
@@ -9,11 +9,7 @@ import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventSta
|
|
|
9
9
|
import Icon from "../../static/Icon";
|
|
10
10
|
import { Sale } from "../../types/bookings";
|
|
11
11
|
import { TipTapEditor } from "../../tiptap-editor/TipTapEditor";
|
|
12
|
-
import {
|
|
13
|
-
EVENT_DESCRIPTION_SIZE,
|
|
14
|
-
formatContentWithoutTags,
|
|
15
|
-
getStatisticInfo,
|
|
16
|
-
} from "./utils";
|
|
12
|
+
import { formatContent, getStatisticInfo } from "./utils";
|
|
17
13
|
import { ReactComponent as ChartBarIcon } from "../../assets/dashboard/chartBar.svg";
|
|
18
14
|
|
|
19
15
|
export interface EventCardProps extends HasPermissionProp {
|
|
@@ -52,7 +48,7 @@ export function EventCard({
|
|
|
52
48
|
const { formatNumber, formatDate } = useIntl();
|
|
53
49
|
const { totalViews, ...statistics } = getStatisticInfo(eventStatistic, date);
|
|
54
50
|
const memoedContent = useMemo(
|
|
55
|
-
() =>
|
|
51
|
+
() => formatContent(description, 300),
|
|
56
52
|
[description]
|
|
57
53
|
);
|
|
58
54
|
|
|
@@ -8,107 +8,34 @@ export function formatContent(content, maxSymbols) {
|
|
|
8
8
|
return content;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export const getStatisticInfo = (
|
|
12
|
+
eventStatistic: EventStatistic | null,
|
|
13
|
+
date: string
|
|
14
14
|
) => {
|
|
15
|
-
|
|
16
|
-
if (content < maxLength) return content;
|
|
17
|
-
const text = content.replace(/<[^>]*>/g, "");
|
|
18
|
-
const trimmedText = text
|
|
19
|
-
.trim()
|
|
20
|
-
.replace(/ |[^a-zA-Z0-9\s]/g, "")
|
|
21
|
-
.replace(/\s\s+/g, " ");
|
|
22
|
-
|
|
23
|
-
const words = trimmedText.slice(0, maxLength).split(" ");
|
|
24
|
-
const index = String(content).indexOf(words[words.length - 2]);
|
|
25
|
-
return content.slice(0, index).concat("...");
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const EVENT_DESCRIPTION_SIZE = 300;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Calculate the total number of views from the given dates and event statistic.
|
|
32
|
-
*
|
|
33
|
-
* @param {string[]} dates - An array of dates.
|
|
34
|
-
* @param {EventStatistic} eventStatistic - The event statistic object.
|
|
35
|
-
* @returns {number} - The total number of views.
|
|
36
|
-
*/
|
|
37
|
-
export const calculateTotalViews = (
|
|
38
|
-
dates: string[],
|
|
39
|
-
eventStatistic: EventStatistic
|
|
40
|
-
): number => {
|
|
41
|
-
return dates.reduce(
|
|
42
|
-
(rootAcc, date) =>
|
|
43
|
-
rootAcc +
|
|
44
|
-
Object.values(eventStatistic.views[date] ?? {}).reduce(
|
|
45
|
-
(acc, view) => acc + (view.pageViews || 0),
|
|
46
|
-
0
|
|
47
|
-
),
|
|
48
|
-
0
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Calculates the total number of products sold and the total amount sold
|
|
54
|
-
* based on the provided dates and event statistics.
|
|
55
|
-
*
|
|
56
|
-
* @param {string[]} dates - An array of dates.
|
|
57
|
-
* @param {EventStatistic} eventStatistic - Object containing event statistics.
|
|
58
|
-
* @returns {number[]} An array representing the total number of products sold and total amount sold.
|
|
59
|
-
*/
|
|
60
|
-
export const calculateTotalSoldAndAmount = (
|
|
61
|
-
dates: string[],
|
|
62
|
-
eventStatistic: EventStatistic
|
|
63
|
-
): [number, number] => {
|
|
15
|
+
let totalViews = 0;
|
|
64
16
|
let totalSold = 0;
|
|
65
17
|
let totalAmount = 0;
|
|
66
|
-
dates.forEach((date) =>
|
|
67
|
-
Object.values(eventStatistic.productCategorySummary[date] ?? {}).forEach(
|
|
68
|
-
({ totalPerCategory, productsSummary }) => {
|
|
69
|
-
totalAmount += totalPerCategory || 0;
|
|
70
|
-
totalSold +=
|
|
71
|
-
productsSummary?.reduce((acc, curr) => acc + curr.productsSold, 0) ??
|
|
72
|
-
0;
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
);
|
|
76
18
|
|
|
77
|
-
return
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Get statistic information for a given event and date.
|
|
82
|
-
* @param {EventStatistic | null} eventStatistic - The event statistic object.
|
|
83
|
-
* @param {string} date - The date in ISO format.
|
|
84
|
-
* @returns {{
|
|
85
|
-
* totalViews: number;
|
|
86
|
-
* totalSold: number;
|
|
87
|
-
* totalAmount: number;
|
|
88
|
-
* }} The statistic information object.
|
|
89
|
-
*/
|
|
90
|
-
export const getStatisticInfo = (
|
|
91
|
-
eventStatistic: EventStatistic | null,
|
|
92
|
-
date: string
|
|
93
|
-
): {
|
|
94
|
-
totalViews: number;
|
|
95
|
-
totalSold: number;
|
|
96
|
-
totalAmount: number;
|
|
97
|
-
} => {
|
|
98
|
-
const defaultValues = { totalViews: 0, totalSold: 0, totalAmount: 0 };
|
|
99
|
-
if (!eventStatistic) return defaultValues;
|
|
19
|
+
if (!eventStatistic) return { totalViews: 0, totalSold: 0, totalAmount: 0 };
|
|
100
20
|
|
|
101
21
|
const viewsFormattedDate = DateTime.fromISO(date)
|
|
102
22
|
.toUTC()
|
|
103
23
|
.toFormat(DATE_FORMAT);
|
|
24
|
+
|
|
25
|
+
totalViews = eventStatistic.views[viewsFormattedDate]?.pageViews || 0;
|
|
26
|
+
|
|
104
27
|
const summaryFormattedDate = DateTime.fromISO(date)
|
|
105
28
|
.toUTC()
|
|
106
29
|
.toFormat(DATE_TIME_FULL_FORMAT);
|
|
107
30
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
31
|
+
eventStatistic?.productCategorySummary?.[summaryFormattedDate]?.forEach(
|
|
32
|
+
({ totalPerCategory, productsSummary = [] }) => {
|
|
33
|
+
totalAmount += totalPerCategory || 0;
|
|
34
|
+
|
|
35
|
+
productsSummary?.forEach(({ productsSold }) => {
|
|
36
|
+
totalSold += productsSold;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
112
39
|
);
|
|
113
40
|
|
|
114
41
|
return { totalViews, totalSold, totalAmount };
|
|
@@ -2,7 +2,6 @@ import React from "react";
|
|
|
2
2
|
import { Modal, Button } from "react-bootstrap";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper";
|
|
5
|
-
import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
|
|
6
5
|
import Icon from "../../static/Icon";
|
|
7
6
|
import { StaticTable } from "../../table";
|
|
8
7
|
import { useTableData } from "./hooks/useTableData";
|
|
@@ -10,7 +9,6 @@ import { useTableData } from "./hooks/useTableData";
|
|
|
10
9
|
export type EventStatisticModalProps = {
|
|
11
10
|
isOpen: boolean;
|
|
12
11
|
setIsOpen: (value: boolean) => void;
|
|
13
|
-
date?: Event["startAt"] | null;
|
|
14
12
|
eventStatistic?: EventStatistic | null;
|
|
15
13
|
title?: string;
|
|
16
14
|
};
|
|
@@ -18,13 +16,11 @@ export type EventStatisticModalProps = {
|
|
|
18
16
|
export const EventStatisticModal = ({
|
|
19
17
|
isOpen,
|
|
20
18
|
setIsOpen,
|
|
21
|
-
date,
|
|
22
19
|
eventStatistic,
|
|
23
20
|
title,
|
|
24
21
|
}: EventStatisticModalProps) => {
|
|
25
22
|
const { t } = useTranslation("Design");
|
|
26
|
-
|
|
27
|
-
const data = useTableData(date, eventStatistic);
|
|
23
|
+
const data = useTableData(eventStatistic);
|
|
28
24
|
const handleClose = () => {
|
|
29
25
|
setIsOpen(false);
|
|
30
26
|
};
|
|
@@ -4,14 +4,10 @@ import { useIntl } from "react-intl";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import * as Config from "@licklist/core/dist/Config";
|
|
6
6
|
import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper";
|
|
7
|
-
import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
|
|
8
7
|
import { convertEventStatisticToTableData, TRANSLATION_KEYS } from "../utils";
|
|
9
8
|
import { StaticTableData } from "../../../table";
|
|
10
9
|
|
|
11
|
-
export const useTableData = (
|
|
12
|
-
date: Event["startAt"] | null,
|
|
13
|
-
eventStatistic: EventStatistic | null
|
|
14
|
-
) => {
|
|
10
|
+
export const useTableData = (eventStatistic: EventStatistic | null) => {
|
|
15
11
|
const { t } = useTranslation("Design");
|
|
16
12
|
const { formatNumber } = useIntl();
|
|
17
13
|
const [tableRows, setTableRows] = useState<StaticTableData[]>([]);
|
|
@@ -32,17 +28,14 @@ export const useTableData = (
|
|
|
32
28
|
return t(key);
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
const transformStatisticToTableRows = (
|
|
36
|
-
date: Event["startAt"],
|
|
37
|
-
statistic: EventStatistic | null
|
|
38
|
-
) => {
|
|
31
|
+
const transformStatisticToTableRows = (statistic: EventStatistic | null) => {
|
|
39
32
|
if (!statistic) {
|
|
40
33
|
return [];
|
|
41
34
|
}
|
|
42
35
|
|
|
43
36
|
const tableDataRows: StaticTableData[] = [];
|
|
44
37
|
|
|
45
|
-
convertEventStatisticToTableData(
|
|
38
|
+
convertEventStatisticToTableData(statistic).forEach(
|
|
46
39
|
({ name, quantity, total, isBold, isHeader, key }) => {
|
|
47
40
|
const formattedTotal = !Object.keys(TRANSLATION_KEYS).includes(
|
|
48
41
|
String(total)
|
|
@@ -84,9 +77,9 @@ export const useTableData = (
|
|
|
84
77
|
};
|
|
85
78
|
|
|
86
79
|
useEffect(() => {
|
|
87
|
-
setTableRows(transformStatisticToTableRows(
|
|
80
|
+
setTableRows(transformStatisticToTableRows(eventStatistic));
|
|
88
81
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
|
-
}, [
|
|
82
|
+
}, [eventStatistic]);
|
|
90
83
|
|
|
91
84
|
return tableRows;
|
|
92
85
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper";
|
|
2
|
-
import { DateTime } from "luxon";
|
|
3
|
-
import { DATE_TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
|
|
4
2
|
|
|
5
3
|
export const TRANSLATION_KEYS = {
|
|
6
4
|
shortQuantity: "shortQuantity",
|
|
@@ -9,7 +7,6 @@ export const TRANSLATION_KEYS = {
|
|
|
9
7
|
};
|
|
10
8
|
|
|
11
9
|
export const convertEventStatisticToTableData = (
|
|
12
|
-
date: string,
|
|
13
10
|
eventStatistic: EventStatistic
|
|
14
11
|
) => {
|
|
15
12
|
let totalAmount = 0;
|
|
@@ -28,51 +25,49 @@ export const convertEventStatisticToTableData = (
|
|
|
28
25
|
total: string | number;
|
|
29
26
|
}[] = [];
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
Object.values(eventStatistic?.productCategorySummary)?.forEach(
|
|
29
|
+
(categories) => {
|
|
30
|
+
categories?.forEach(
|
|
31
|
+
({ totalPerCategory, productsSummary = [], categoryName, eventId }) => {
|
|
32
|
+
let quantity = 0;
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
eventStatistic?.productCategorySummary[summaryFormattedDate] ?? {}
|
|
37
|
-
)?.forEach(
|
|
38
|
-
({ totalPerCategory, productsSummary = [], categoryName, eventId }) => {
|
|
39
|
-
let quantity = 0;
|
|
34
|
+
totalAmount += totalPerCategory || 0;
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
tableDataArray.push({
|
|
37
|
+
name: categoryName,
|
|
38
|
+
key: `${eventId}.${categoryName}`,
|
|
39
|
+
isBold: true,
|
|
40
|
+
isHeader: true,
|
|
41
|
+
quantity: TRANSLATION_KEYS.shortQuantity,
|
|
42
|
+
total: TRANSLATION_KEYS.total,
|
|
43
|
+
});
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
isBold: true,
|
|
47
|
-
isHeader: true,
|
|
48
|
-
quantity: TRANSLATION_KEYS.shortQuantity,
|
|
49
|
-
total: TRANSLATION_KEYS.total,
|
|
50
|
-
});
|
|
45
|
+
productsSummary?.forEach(
|
|
46
|
+
({ productsSold, name, totalQuantity, total }) => {
|
|
47
|
+
quantity += productsSold;
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
tableDataArray.push({
|
|
50
|
+
name,
|
|
51
|
+
key: `${eventId}.${categoryName}.${name}`,
|
|
52
|
+
quantity: totalQuantity
|
|
53
|
+
? `${productsSold} / ${totalQuantity}`
|
|
54
|
+
: String(productsSold),
|
|
55
|
+
total: String(total),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
);
|
|
55
59
|
|
|
56
60
|
tableDataArray.push({
|
|
57
|
-
name,
|
|
58
|
-
key: `${eventId}.${categoryName}.${
|
|
59
|
-
quantity
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
total: String(total),
|
|
61
|
+
name: TRANSLATION_KEYS.totalPerCategory,
|
|
62
|
+
key: `${eventId}.${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`,
|
|
63
|
+
quantity,
|
|
64
|
+
total: totalPerCategory,
|
|
65
|
+
isBold: true,
|
|
63
66
|
});
|
|
67
|
+
|
|
68
|
+
totalQuantity += quantity;
|
|
64
69
|
}
|
|
65
70
|
);
|
|
66
|
-
|
|
67
|
-
tableDataArray.push({
|
|
68
|
-
name: TRANSLATION_KEYS.totalPerCategory,
|
|
69
|
-
key: `${eventId}.${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`,
|
|
70
|
-
quantity,
|
|
71
|
-
total: totalPerCategory,
|
|
72
|
-
isBold: true,
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
totalQuantity += quantity;
|
|
76
71
|
}
|
|
77
72
|
);
|
|
78
73
|
|
|
@@ -12,30 +12,21 @@ export const useImage = (
|
|
|
12
12
|
height: 0,
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
const setImageEventHandler = function setImageEventHandler(
|
|
16
|
-
this: HTMLImageElement
|
|
17
|
-
) {
|
|
18
|
-
imageRef.current = this;
|
|
19
|
-
|
|
20
|
-
setImageAttributes({
|
|
21
|
-
width: this.naturalWidth,
|
|
22
|
-
height: this.naturalHeight,
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
15
|
const loadImage = useCallback((imageUrl?: string) => {
|
|
27
16
|
imageRef.current = new window.Image();
|
|
28
17
|
imageRef.current.src = imageUrl;
|
|
29
|
-
imageRef.current.addEventListener("load",
|
|
18
|
+
imageRef.current.addEventListener("load", function () {
|
|
19
|
+
imageRef.current = this;
|
|
20
|
+
|
|
21
|
+
setImageAttributes({
|
|
22
|
+
width: this.naturalWidth,
|
|
23
|
+
height: this.naturalHeight,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
30
26
|
}, []);
|
|
31
27
|
|
|
32
28
|
useEffect(() => {
|
|
33
29
|
loadImage(url);
|
|
34
|
-
|
|
35
|
-
return () => {
|
|
36
|
-
imageRef.current.removeEventListener("load", setImageEventHandler);
|
|
37
|
-
imageRef.current = undefined;
|
|
38
|
-
};
|
|
39
30
|
}, [url, loadImage]);
|
|
40
31
|
|
|
41
32
|
const memoizedImageAttributes = useMemo(() => {
|
|
@@ -175,9 +175,7 @@ export const useFileUpload = ({
|
|
|
175
175
|
const filesArray = Array.from(uploadedFiles);
|
|
176
176
|
filesArray.forEach((file) => {
|
|
177
177
|
const fileExtension = file.name.split(".").pop();
|
|
178
|
-
const extensionIndex = allowedExtensions.indexOf(
|
|
179
|
-
fileExtension.toLowerCase()
|
|
180
|
-
);
|
|
178
|
+
const extensionIndex = allowedExtensions.indexOf(fileExtension);
|
|
181
179
|
const isExtensionValid = extensionIndex !== -1;
|
|
182
180
|
|
|
183
181
|
if (isExtensionValid) {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import { ActivityCard, ActivityCardProps } from "./ActivityCard";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Iframe/ActivityCard",
|
|
7
|
+
component: ActivityCard,
|
|
8
|
+
} as Meta;
|
|
9
|
+
|
|
10
|
+
export const Default: Story<ActivityCardProps> = (props) => {
|
|
11
|
+
return <ActivityCard {...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<ActivityCardProps> = (props) => {
|
|
33
|
+
return <ActivityCard {...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,38 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
4
|
+
|
|
5
|
+
export interface ActivityCardProps {
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
duration: ReactNode;
|
|
8
|
+
price: ReactNode;
|
|
9
|
+
image?: Image | null;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
isSelected: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ActivityCard = ({
|
|
15
|
+
title,
|
|
16
|
+
duration,
|
|
17
|
+
price,
|
|
18
|
+
image,
|
|
19
|
+
onSelect,
|
|
20
|
+
isSelected,
|
|
21
|
+
}: ActivityCardProps) => {
|
|
22
|
+
return (
|
|
23
|
+
<button
|
|
24
|
+
type="button"
|
|
25
|
+
className={clsx("activity-card", isSelected && "active")}
|
|
26
|
+
onClick={onSelect}
|
|
27
|
+
>
|
|
28
|
+
{image && <img className="activity-card-image" alt="" src={image.url} />}
|
|
29
|
+
<div className={clsx("d-flex", "flex-column", !image && "no-image")}>
|
|
30
|
+
<div className="activity-card-title">{title}</div>
|
|
31
|
+
|
|
32
|
+
{duration && <div>{duration}</div>}
|
|
33
|
+
|
|
34
|
+
{price && <div>{price}</div>}
|
|
35
|
+
</div>
|
|
36
|
+
</button>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
@@ -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
|
+
};
|