@licklist/design 0.44.486-dev.7 → 0.44.486-dev.71

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.
Files changed (457) hide show
  1. package/dist/assets/iframe/available.svg.js +1 -0
  2. package/dist/assets/iframe/limited.svg.js +1 -0
  3. package/dist/assets/iframe/soldOut.svg.js +1 -0
  4. package/dist/assets/logo/bookedit.svg +9 -11
  5. package/dist/assets/logo/bookedit.svg.js +1 -1
  6. package/dist/assets/logo/favicon.svg +12 -0
  7. package/dist/assets/logo/licklist.svg +0 -2
  8. package/dist/assets/logo/licklist.svg.js +1 -1
  9. package/dist/availability-indicator/AvailabilityIndicator.d.ts +9 -0
  10. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -0
  11. package/dist/availability-indicator/AvailabilityIndicator.js +1 -0
  12. package/dist/availability-indicator/index.d.ts +2 -0
  13. package/dist/availability-indicator/index.d.ts.map +1 -0
  14. package/dist/calendar/Calendar.d.ts +21 -0
  15. package/dist/calendar/Calendar.d.ts.map +1 -0
  16. package/dist/calendar/Calendar.js +1 -0
  17. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  18. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  19. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  20. package/dist/calendar/components/CalendarButtons/index.d.ts.map +1 -0
  21. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +5 -0
  22. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  23. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -0
  24. package/dist/calendar/components/CalendarDates/index.d.ts.map +1 -0
  25. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  26. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  27. package/dist/calendar/components/CalendarSelect/index.d.ts.map +1 -0
  28. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  29. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  30. package/dist/calendar/index.d.ts +4 -0
  31. package/dist/calendar/index.d.ts.map +1 -0
  32. package/dist/calendar/utils/index.d.ts +5 -0
  33. package/dist/calendar/utils/index.d.ts.map +1 -0
  34. package/dist/calendar/utils/index.js +1 -0
  35. package/dist/date-time-button/DateTimeButton.d.ts +7 -1
  36. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  37. package/dist/date-time-button/DateTimeButton.js +1 -1
  38. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  39. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  40. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  41. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  42. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  43. package/dist/events/event-card/EventCard.js +1 -1
  44. package/dist/events/event-card/utils.d.ts +29 -0
  45. package/dist/events/event-card/utils.d.ts.map +1 -1
  46. package/dist/events/event-card/utils.js +1 -1
  47. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  48. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  49. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  50. package/dist/file-upload/FileUpload.js +1 -1
  51. package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
  52. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
  53. package/dist/iframe/activity-card/ActivityCard.js +1 -0
  54. package/dist/iframe/activity-card/index.d.ts +2 -0
  55. package/dist/iframe/activity-card/index.d.ts.map +1 -0
  56. package/dist/iframe/event/index.d.ts +0 -2
  57. package/dist/iframe/event/index.d.ts.map +1 -1
  58. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  59. package/dist/iframe/event/ticket-description/TicketDescription.js +1 -1
  60. package/dist/iframe/index.d.ts +2 -2
  61. package/dist/iframe/index.d.ts.map +1 -1
  62. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  63. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  64. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  65. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  66. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +2 -1
  67. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  68. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  69. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  70. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  71. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  72. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  73. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  74. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  75. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +4 -1
  76. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  77. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  78. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +2 -1
  79. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  80. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  81. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  82. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  83. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  84. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +4 -3
  85. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  86. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  87. package/dist/iframe/order-process/constants.d.ts +1 -0
  88. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  89. package/dist/iframe/order-process/constants.js +1 -1
  90. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  91. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  92. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  93. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  94. package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
  95. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  96. package/dist/iframe/payment/order-items-table/types/index.js +1 -0
  97. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
  98. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
  99. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
  100. package/dist/index.d.ts +3 -0
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  104. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  105. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  106. package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
  107. package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
  108. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  109. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
  110. package/dist/number-of-people-input/components/index.d.ts +2 -0
  111. package/dist/number-of-people-input/components/index.d.ts.map +1 -0
  112. package/dist/number-of-people-input/index.d.ts +3 -0
  113. package/dist/number-of-people-input/index.d.ts.map +1 -0
  114. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +5 -1
  115. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  116. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  117. package/dist/product-set/control/ProductSetControl.d.ts +6 -3
  118. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  119. package/dist/product-set/control/ProductSetControl.js +1 -1
  120. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts +2 -1
  121. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  122. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  123. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  124. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  125. package/dist/product-set/form/ProductSetForm.d.ts +3 -1
  126. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  127. package/dist/product-set/form/ProductSetForm.js +1 -1
  128. package/dist/product-set/form/ProductsControl.d.ts +3 -1
  129. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  130. package/dist/product-set/form/ProductsControl.js +1 -1
  131. package/dist/product-set/product/ProductControl.d.ts +2 -1
  132. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  133. package/dist/product-set/product/ProductControl.js +1 -1
  134. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  135. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  136. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  137. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  138. package/dist/product-set/utils/index.d.ts +10 -0
  139. package/dist/product-set/utils/index.d.ts.map +1 -1
  140. package/dist/product-set/utils/index.js +1 -1
  141. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  142. package/dist/provider/location-input/LocationInput.js +1 -1
  143. package/dist/provider/location-input/components/FormGroupControll.d.ts +7 -0
  144. package/dist/provider/location-input/components/FormGroupControll.d.ts.map +1 -0
  145. package/dist/provider/location-input/components/FormGroupControll.js +1 -0
  146. package/dist/provider/location-input/components/index.d.ts +2 -0
  147. package/dist/provider/location-input/components/index.d.ts.map +1 -0
  148. package/dist/provider/location-input/index.d.ts +1 -0
  149. package/dist/provider/location-input/index.d.ts.map +1 -1
  150. package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
  151. package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
  152. package/dist/provider/provider-form/ProviderForm.js +1 -1
  153. package/dist/provider/venue-form/VenueForm.d.ts +3 -1
  154. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  155. package/dist/provider/venue-form/VenueForm.js +1 -1
  156. package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
  157. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  158. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  159. package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
  160. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  161. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  162. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +4 -1
  163. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  164. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  165. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -0
  166. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  167. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  168. package/dist/report/form/ReportForm.d.ts.map +1 -1
  169. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  170. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  171. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  172. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  173. package/dist/sales/filters/SaleFilters.d.ts +1 -0
  174. package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
  175. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
  176. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  177. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  178. package/dist/sales/payment-form/SalePaymentForm.js +1 -1
  179. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  180. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  181. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  182. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  183. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  184. package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
  185. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  186. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  187. package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  188. package/{src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → dist/styles/activity-card/ListActivitiesCard.scss} +2 -1
  189. package/dist/styles/activity-card/_index.scss +2 -0
  190. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  191. package/dist/styles/availability-indicator/_index.scss +1 -0
  192. package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  193. package/dist/styles/date-time-button/_index.scss +1 -0
  194. package/dist/styles/events/EventCard.scss +12 -5
  195. package/dist/styles/form/CustomCheckbox.scss +6 -0
  196. package/dist/styles/header/Header.scss +0 -4
  197. package/dist/styles/iframe-events/Card.scss +1 -0
  198. package/dist/styles/notification/Notification.scss +4 -0
  199. package/dist/styles/packages.scss +3 -1
  200. package/dist/styles/resources-blocking/_index.scss +5 -0
  201. package/dist/styles/sales/BookingResults.scss +14 -6
  202. package/dist/styles/themes/bookedit/_index.scss +1 -0
  203. package/dist/styles/zones/ZoneForm.scss +3 -0
  204. package/dist/types/iframe.d.ts +1 -0
  205. package/dist/types/iframe.d.ts.map +1 -1
  206. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  207. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  208. package/dist/zone/form/ZoneForm.d.ts +1 -1
  209. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  210. package/dist/zone/form/ZoneForm.js +1 -1
  211. package/dist/zone/form/components/AvailableTimesControl.d.ts +2 -0
  212. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  213. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  214. package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
  215. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
  216. package/dist/zone/form/components/GameDurationControl.js +1 -0
  217. package/dist/zone/form/components/ZoneControl.d.ts +1 -1
  218. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  219. package/dist/zone/form/components/ZoneControl.js +1 -1
  220. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +1 -1
  221. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  222. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  223. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  224. package/dist/zone/form/utils/dates.js +1 -1
  225. package/package.json +3 -3
  226. package/src/assets/logo/bookedit.svg +9 -11
  227. package/src/assets/logo/favicon.svg +12 -0
  228. package/src/assets/logo/licklist.svg +0 -2
  229. package/src/availability-indicator/AvailabilityIndicator.tsx +59 -0
  230. package/src/availability-indicator/index.ts +1 -0
  231. package/src/calendar/Calendar.stories.tsx +33 -0
  232. package/src/calendar/Calendar.tsx +46 -0
  233. package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
  234. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +24 -19
  235. package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  236. package/src/calendar/index.ts +3 -0
  237. package/src/calendar/utils/index.ts +28 -0
  238. package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
  239. package/src/date-time-button/DateTimeButton.tsx +19 -22
  240. package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
  241. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -12
  242. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  243. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
  244. package/src/events/event-card/EventCard.tsx +6 -2
  245. package/src/events/event-card/utils.ts +93 -16
  246. package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
  247. package/src/file-upload/FileUpload.tsx +3 -1
  248. package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
  249. package/src/iframe/activity-card/ActivityCard.tsx +77 -0
  250. package/src/iframe/activity-card/index.ts +1 -0
  251. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -2
  252. package/src/iframe/event/index.ts +0 -7
  253. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +8 -2
  254. package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -2
  255. package/src/iframe/index.ts +1 -3
  256. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +4 -3
  257. package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -1
  258. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
  259. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
  260. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +17 -8
  261. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +1 -15
  262. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +15 -29
  263. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
  264. package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
  265. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +62 -32
  266. package/src/iframe/order-process/constants.ts +1 -0
  267. package/src/iframe/page/Page.stories.tsx +2 -2
  268. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
  269. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
  270. package/src/iframe/payment/order-items-table/types/index.ts +18 -1
  271. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
  272. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  273. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  274. package/src/index.ts +3 -0
  275. package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
  276. package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  277. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
  278. package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  279. package/src/number-of-people-input/components/index.ts +1 -0
  280. package/src/number-of-people-input/index.ts +2 -0
  281. package/src/product-set/control/DateAndRecurrenceInput.tsx +75 -2
  282. package/src/product-set/control/ProductSetControl.stories.tsx +0 -2
  283. package/src/product-set/control/ProductSetControl.tsx +44 -10
  284. package/src/product-set/control/ProductSetRecurrenceControl.tsx +14 -5
  285. package/src/product-set/form/ProductCategoriesControl.tsx +2 -1
  286. package/src/product-set/form/ProductSetForm.stories.tsx +9 -12
  287. package/src/product-set/form/ProductSetForm.tsx +19 -3
  288. package/src/product-set/form/ProductsControl.tsx +10 -0
  289. package/src/product-set/product/ProductControl.tsx +28 -1
  290. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  291. package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
  292. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -30
  293. package/src/product-set/utils/index.ts +38 -0
  294. package/src/provider/location-input/LocationInput.tsx +21 -20
  295. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  296. package/src/provider/location-input/components/FormGroupControll.tsx +16 -0
  297. package/src/provider/location-input/components/index.ts +1 -0
  298. package/src/provider/location-input/index.ts +1 -1
  299. package/src/provider/provider-details-input/ProviderDetailsInput.tsx +5 -13
  300. package/src/provider/venue-form/VenueForm.stories.tsx +24 -0
  301. package/src/provider/venue-form/VenueForm.tsx +55 -4
  302. package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
  303. package/src/recurrence-input/RecurrenceInput.tsx +12 -2
  304. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -11
  305. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +9 -0
  306. package/src/report/form/ReportForm.tsx +1 -1
  307. package/src/sales/booking/results/BookingResults.stories.tsx +12 -7
  308. package/src/sales/booking/results/components/ResultCard.tsx +24 -3
  309. package/src/sales/coupon/control/CouponFormControl.tsx +5 -0
  310. package/src/sales/filters/SaleFilters.tsx +1 -0
  311. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
  312. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
  313. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +31 -28
  314. package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
  315. package/src/static/RestrictedAccess.tsx +1 -1
  316. package/src/static/form-number-input/FormNumberInput.tsx +8 -1
  317. package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  318. package/{dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → src/styles/activity-card/ListActivitiesCard.scss} +2 -1
  319. package/src/styles/activity-card/_index.scss +2 -0
  320. package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  321. package/src/styles/availability-indicator/_index.scss +1 -0
  322. package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  323. package/src/styles/date-time-button/_index.scss +1 -0
  324. package/src/styles/events/EventCard.scss +12 -5
  325. package/src/styles/form/CustomCheckbox.scss +6 -0
  326. package/src/styles/header/Header.scss +0 -4
  327. package/src/styles/iframe-events/Card.scss +1 -0
  328. package/src/styles/notification/Notification.scss +4 -0
  329. package/src/styles/packages.scss +3 -1
  330. package/src/styles/resources-blocking/_index.scss +5 -0
  331. package/src/styles/sales/BookingResults.scss +14 -6
  332. package/src/styles/themes/bookedit/_index.scss +1 -0
  333. package/src/styles/zones/ZoneForm.scss +3 -0
  334. package/src/types/iframe.ts +1 -0
  335. package/src/typings.d.ts +11 -0
  336. package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
  337. package/src/zone/form/ZoneForm.tsx +1 -2
  338. package/src/zone/form/components/AvailableTimesControl.tsx +89 -88
  339. package/src/zone/form/components/GameDurationControl.tsx +46 -0
  340. package/src/zone/form/components/ZoneControl.tsx +4 -5
  341. package/src/zone/form/components/ZoneRecurrencesControl.tsx +3 -59
  342. package/src/zone/form/utils/dates.ts +29 -36
  343. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
  344. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
  345. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
  346. package/dist/iframe/activity-cards/index.d.ts +0 -3
  347. package/dist/iframe/activity-cards/index.d.ts.map +0 -1
  348. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
  349. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
  350. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
  351. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
  352. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
  353. package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
  354. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  355. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  356. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  357. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
  358. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
  359. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
  360. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
  361. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
  362. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
  363. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
  364. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  365. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
  366. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
  367. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  368. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  369. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
  370. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  371. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  372. package/dist/iframe/event/event-calendar/index.d.ts +0 -4
  373. package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
  374. package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
  375. package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
  376. package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
  377. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
  378. package/dist/iframe/event/event-calendar/utils/index.js +0 -1
  379. package/dist/iframe/event/event-details/EventDetails.d.ts +0 -10
  380. package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
  381. package/dist/iframe/event/event-details/EventDetails.js +0 -1
  382. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
  383. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
  384. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
  385. package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
  386. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
  387. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
  388. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
  389. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
  390. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
  391. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
  392. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  393. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
  394. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  395. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
  396. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
  397. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
  398. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
  399. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
  400. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
  401. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
  402. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
  403. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
  404. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
  405. package/dist/iframe/event/event-details/index.d.ts +0 -2
  406. package/dist/iframe/event/event-details/index.d.ts.map +0 -1
  407. package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
  408. package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
  409. package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
  410. package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
  411. package/dist/iframe/event/event-details/utils/routes.js +0 -1
  412. package/dist/styles/iframe-customers-journey/_index.scss +0 -3
  413. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
  414. package/src/iframe/activity-cards/index.ts +0 -2
  415. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
  416. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
  417. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
  418. package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
  419. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
  420. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
  421. package/src/iframe/event/event-calendar/index.ts +0 -6
  422. package/src/iframe/event/event-calendar/types/index.ts +0 -6
  423. package/src/iframe/event/event-calendar/utils/index.ts +0 -11
  424. package/src/iframe/event/event-details/EventDetails.stories.tsx +0 -187
  425. package/src/iframe/event/event-details/EventDetails.tsx +0 -92
  426. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
  427. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
  428. package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
  429. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
  430. package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
  431. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
  432. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
  433. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
  434. package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
  435. package/src/iframe/event/event-details/index.ts +0 -1
  436. package/src/iframe/event/event-details/utils/index.ts +0 -1
  437. package/src/iframe/event/event-details/utils/routes.ts +0 -6
  438. package/src/styles/iframe-customers-journey/_index.scss +0 -3
  439. /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  440. /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  441. /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  442. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
  443. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
  444. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  445. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
  446. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  447. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  448. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  449. /package/dist/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  450. /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  451. /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  452. /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  453. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
  454. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
  455. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
  456. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  457. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -0,0 +1,28 @@
1
+ import { DateTime, Interval } 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
+ };
12
+
13
+ export const getMonthCalendarDates = (initialDate: DateTime): DateTime[] => {
14
+ const startOfMonth = initialDate.startOf("month");
15
+ const endOfMonth = initialDate.endOf("month");
16
+
17
+ return Interval.fromDateTimes(startOfMonth, endOfMonth)
18
+ .splitBy({ day: 1 })
19
+ .map((d) => d.start);
20
+ };
21
+
22
+ export const getWeekCalendarDates = (initialDate: DateTime): DateTime[] => {
23
+ const lastDay = initialDate.plus({ days: 7 });
24
+
25
+ return Interval.fromDateTimes(initialDate, lastDay)
26
+ .splitBy({ day: 1 })
27
+ .map((d) => d.start);
28
+ };
@@ -78,3 +78,20 @@ WithPrice.args = {
78
78
  isOnlyTimeContainer: false,
79
79
  price: "from $8000",
80
80
  };
81
+
82
+ export const WithAvailability: Story<DateTimeButtonProps> = (args) => {
83
+ return <DateTimeButton {...args} />;
84
+ };
85
+
86
+ WithAvailability.args = {
87
+ date,
88
+ isSelected: false,
89
+ isDisabled: false,
90
+ onSelect: () => null,
91
+ isOnlyTimeContainer: false,
92
+ price: "from $8000",
93
+ resources: {
94
+ booked: 1,
95
+ total: 3,
96
+ },
97
+ };
@@ -1,6 +1,7 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import clsx from "clsx";
3
3
  import { DateTime } from "luxon";
4
+ import { AvailabilityIndicator } from "../availability-indicator";
4
5
  import { DateContent } from "./DateContent";
5
6
 
6
7
  export type DateTimeButtonProps<T = DateTime | string> = {
@@ -10,31 +11,30 @@ export type DateTimeButtonProps<T = DateTime | string> = {
10
11
  onSelect: (date: T) => void;
11
12
  isOnlyTimeContainer?: boolean;
12
13
  price?: string | number | ReactElement | null;
14
+ resources?: {
15
+ booked: number;
16
+ total: number;
17
+ };
18
+ calendarView?: boolean;
19
+ showResources?: boolean;
13
20
  };
14
21
 
15
22
  export const DateTimeButton = <T extends DateTime | string>({
16
23
  date,
17
- isDisabled,
24
+ isDisabled: _isDisabled,
18
25
  isSelected,
19
26
  onSelect,
20
27
  isOnlyTimeContainer,
21
28
  price,
29
+ resources,
30
+ calendarView,
31
+ showResources,
22
32
  }: DateTimeButtonProps<T>) => {
23
- // const infoLogo = useMemo(() => {
24
- // if (info?.logo === infoLogoType.LIMIT) {
25
- // return <LimitedSvg />;
26
- // }
27
- // if (info?.logo === infoLogoType.AVAILABLE) {
28
- // return <AvailableSvg />;
29
- // }
30
- // if (info?.logo === infoLogoType.SOLD_OUT) {
31
- // return <SoldOutSvg />;
32
- // }
33
- // return null;
34
- // }, [info]);
35
-
36
33
  const isTimeVariant = typeof date === "string";
37
34
 
35
+ const isDisabled =
36
+ _isDisabled || (resources && resources.booked === resources.total);
37
+
38
38
  return (
39
39
  <button
40
40
  type="button"
@@ -46,7 +46,8 @@ export const DateTimeButton = <T extends DateTime | string>({
46
46
  isSelected && "selected",
47
47
  isTimeVariant && "time-button",
48
48
  isOnlyTimeContainer && "only-time-container",
49
- !isTimeVariant && "today"
49
+ !isTimeVariant && "today",
50
+ calendarView && "calendar-view"
50
51
  )}
51
52
  >
52
53
  {isTimeVariant ? (
@@ -61,13 +62,9 @@ export const DateTimeButton = <T extends DateTime | string>({
61
62
 
62
63
  {price && !isDisabled && <div className="price">{price}</div>}
63
64
 
64
- {/* TODO uncomment when adding availability */}
65
- {/* {info && (
66
- <div className="info">
67
- {info.logo && <Logo className="logo" logo={infoLogo} />}
68
- <div>{info.description}</div>
69
- </div>
70
- )} */}
65
+ {showResources && resources && (
66
+ <AvailabilityIndicator {...resources} notAvailable={_isDisabled} />
67
+ )}
71
68
  </button>
72
69
  );
73
70
  };
@@ -168,6 +168,9 @@ export function IntervalInput({
168
168
  value={value}
169
169
  onChange={onChange}
170
170
  date={start}
171
+ minDate={DateTime.fromISO(start)
172
+ .plus({ day: 1 })
173
+ .toFormat("yyyy-MM-dd")}
171
174
  disabled={disabled}
172
175
  />
173
176
  )}
@@ -47,7 +47,6 @@ const contextValue = {
47
47
  name: "Example",
48
48
  type: "sale",
49
49
  termsAndConditions: "",
50
- isDefault: true,
51
50
  operationalCost: OPERATIONAL_COST_CUSTOMER,
52
51
  steps: [
53
52
  {
@@ -60,7 +59,6 @@ const contextValue = {
60
59
  minSubItems: 1,
61
60
  maxSubItems: 10,
62
61
  quantityType: "constant",
63
- isRelyOnPeople: false,
64
62
  isTimeRelated: false,
65
63
  hasTicket: false,
66
64
  allowDeposits: false,
@@ -126,7 +124,6 @@ const contextValue = {
126
124
  minSubItems: 0,
127
125
  maxSubItems: 0,
128
126
  quantityType: "recharging",
129
- isRelyOnPeople: false,
130
127
  isTimeRelated: false,
131
128
  hasTicket: false,
132
129
  allowDeposits: false,
@@ -144,7 +141,6 @@ const contextValue = {
144
141
  minSubItems: 0,
145
142
  maxSubItems: 0,
146
143
  quantityType: "recharging",
147
- isRelyOnPeople: false,
148
144
  isTimeRelated: false,
149
145
  hasTicket: false,
150
146
  allowDeposits: false,
@@ -690,7 +686,6 @@ const defaultProductSets = [
690
686
  name: "Example",
691
687
  type: PRODUCT_SET_TYPES[0],
692
688
  termsAndConditions: "",
693
- isDefault: true,
694
689
  operationalCost: OPERATIONAL_COST_TYPES[0],
695
690
  fieldSet: {
696
691
  id: 1,
@@ -713,7 +708,6 @@ const defaultProductSets = [
713
708
  minSubItems: 1,
714
709
  maxSubItems: 10,
715
710
  quantityType: "constant",
716
- isRelyOnPeople: false,
717
711
  isTimeRelated: false,
718
712
  hasTicket: false,
719
713
  allowDeposits: false,
@@ -779,7 +773,6 @@ const defaultProductSets = [
779
773
  minSubItems: 0,
780
774
  maxSubItems: 0,
781
775
  quantityType: "recharging",
782
- isRelyOnPeople: false,
783
776
  isTimeRelated: false,
784
777
  hasTicket: false,
785
778
  allowDeposits: false,
@@ -797,7 +790,6 @@ const defaultProductSets = [
797
790
  minSubItems: 0,
798
791
  maxSubItems: 0,
799
792
  quantityType: "recharging",
800
- isRelyOnPeople: false,
801
793
  isTimeRelated: false,
802
794
  hasTicket: false,
803
795
  allowDeposits: false,
@@ -883,7 +875,6 @@ const defaultProductSets = [
883
875
  name: "Example 2",
884
876
  type: PRODUCT_SET_TYPES[1],
885
877
  termsAndConditions: "",
886
- isDefault: true,
887
878
  operationalCost: OPERATIONAL_COST_TYPES[1],
888
879
  fieldSet: {
889
880
  id: 2,
@@ -906,7 +897,6 @@ const defaultProductSets = [
906
897
  minSubItems: 1,
907
898
  maxSubItems: 10,
908
899
  quantityType: "constant",
909
- isRelyOnPeople: false,
910
900
  isTimeRelated: false,
911
901
  hasTicket: false,
912
902
  allowDeposits: false,
@@ -972,7 +962,6 @@ const defaultProductSets = [
972
962
  minSubItems: 0,
973
963
  maxSubItems: 0,
974
964
  quantityType: "recharging",
975
- isRelyOnPeople: false,
976
965
  isTimeRelated: false,
977
966
  hasTicket: false,
978
967
  allowDeposits: false,
@@ -990,7 +979,6 @@ const defaultProductSets = [
990
979
  minSubItems: 0,
991
980
  maxSubItems: 0,
992
981
  quantityType: "recharging",
993
- isRelyOnPeople: false,
994
982
  isTimeRelated: false,
995
983
  hasTicket: false,
996
984
  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("rrule")}
269
+ key={watch("name")}
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,
18
19
  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?.mailTemplates)
27
+ ? getFilteredTemplates(productSet?.smsTemplates)
28
28
  : undefined,
29
29
  steps:
30
30
  productSet?.steps?.map(({ productCategories, ...step }) => ({
@@ -9,7 +9,11 @@ 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 { formatContent, getStatisticInfo } from "./utils";
12
+ import {
13
+ EVENT_DESCRIPTION_SIZE,
14
+ formatContentWithoutTags,
15
+ getStatisticInfo,
16
+ } from "./utils";
13
17
  import { ReactComponent as ChartBarIcon } from "../../assets/dashboard/chartBar.svg";
14
18
 
15
19
  export interface EventCardProps extends HasPermissionProp {
@@ -48,7 +52,7 @@ export function EventCard({
48
52
  const { formatNumber, formatDate } = useIntl();
49
53
  const { totalViews, ...statistics } = getStatisticInfo(eventStatistic, date);
50
54
  const memoedContent = useMemo(
51
- () => formatContent(description, 300),
55
+ () => formatContentWithoutTags(description, EVENT_DESCRIPTION_SIZE),
52
56
  [description]
53
57
  );
54
58
 
@@ -8,34 +8,111 @@ export function formatContent(content, maxSymbols) {
8
8
  return content;
9
9
  }
10
10
 
11
- export const getStatisticInfo = (
12
- eventStatistic: EventStatistic | null,
13
- date: string
11
+ export const formatContentWithoutTags = (
12
+ content,
13
+ maxLength = EVENT_DESCRIPTION_SIZE
14
14
  ) => {
15
- let totalViews = 0;
15
+ if (!content) return "";
16
+ if (content < maxLength) return content;
17
+ const text = content.replace(/<[^>]*>/g, "");
18
+ const trimmedText = text
19
+ .trim()
20
+ .replace(/&nbsp;|[^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] => {
16
64
  let totalSold = 0;
17
65
  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
+
77
+ return [totalSold, totalAmount];
78
+ };
18
79
 
19
- if (!eventStatistic) return { totalViews: 0, totalSold: 0, totalAmount: 0 };
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;
20
100
 
21
101
  const viewsFormattedDate = DateTime.fromISO(date)
22
102
  .toUTC()
23
103
  .toFormat(DATE_FORMAT);
24
-
25
- totalViews = eventStatistic.views[viewsFormattedDate]?.pageViews || 0;
26
-
27
104
  const summaryFormattedDate = DateTime.fromISO(date)
28
105
  .toUTC()
29
106
  .toFormat(DATE_TIME_FULL_FORMAT);
107
+ const relatedDays = Object.values(eventStatistic.relativeDays ?? {});
30
108
 
31
- eventStatistic?.productCategorySummary?.[summaryFormattedDate]?.forEach(
32
- ({ totalPerCategory, productsSummary = [] }) => {
33
- totalAmount += totalPerCategory || 0;
34
-
35
- productsSummary?.forEach(({ productsSold }) => {
36
- totalSold += productsSold;
37
- });
38
- }
109
+ const totalViews = calculateTotalViews(
110
+ [viewsFormattedDate, ...relatedDays],
111
+ eventStatistic
112
+ );
113
+ const [totalSold, totalAmount] = calculateTotalSoldAndAmount(
114
+ [summaryFormattedDate, ...relatedDays],
115
+ eventStatistic
39
116
  );
40
117
 
41
118
  return { totalViews, totalSold, totalAmount };
@@ -12,21 +12,30 @@ 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
+
15
26
  const loadImage = useCallback((imageUrl?: string) => {
16
27
  imageRef.current = new window.Image();
17
28
  imageRef.current.src = imageUrl;
18
- imageRef.current.addEventListener("load", function () {
19
- imageRef.current = this;
20
-
21
- setImageAttributes({
22
- width: this.naturalWidth,
23
- height: this.naturalHeight,
24
- });
25
- });
29
+ imageRef.current.addEventListener("load", setImageEventHandler);
26
30
  }, []);
27
31
 
28
32
  useEffect(() => {
29
33
  loadImage(url);
34
+
35
+ return () => {
36
+ imageRef.current.removeEventListener("load", setImageEventHandler);
37
+ imageRef.current = undefined;
38
+ };
30
39
  }, [url, loadImage]);
31
40
 
32
41
  const memoizedImageAttributes = useMemo(() => {
@@ -175,7 +175,9 @@ 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(fileExtension);
178
+ const extensionIndex = allowedExtensions.indexOf(
179
+ fileExtension.toLowerCase()
180
+ );
179
181
  const isExtensionValid = extensionIndex !== -1;
180
182
 
181
183
  if (isExtensionValid) {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Meta, Story } from "@storybook/react";
3
- import { ActivityCard, ActivityCardProps } from "./ActivityCard";
3
+ import { ActivityCard, ActivityCardProps, LAYOUT_LIST } from "./ActivityCard";
4
4
 
5
5
  export default {
6
6
  title: "Iframe/ActivityCard",
@@ -50,3 +50,26 @@ Selected.args = {
50
50
  onSelect: () => null,
51
51
  isSelected: true,
52
52
  };
53
+
54
+ export const ListView: Story<ActivityCardProps> = (props) => {
55
+ return <ActivityCard {...props} />;
56
+ };
57
+
58
+ Default.args = {
59
+ layout: LAYOUT_LIST,
60
+ title: "Clay Pigeons & Axe Thowing",
61
+ duration: "60 mins",
62
+ price: "from £20",
63
+ image: {
64
+ hash: "0b37b130e22aa2d3",
65
+ id: 195,
66
+ imageType: "cover",
67
+ imageableId: 25,
68
+ imageableType: "zone",
69
+ path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
70
+ // eslint-disable-next-line max-len
71
+ url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
72
+ },
73
+ onSelect: () => null,
74
+ isSelected: false,
75
+ };
@@ -0,0 +1,77 @@
1
+ import React, { ReactNode } from "react";
2
+ import clsx from "clsx";
3
+ import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
4
+
5
+ export const LAYOUT_GRID = "grid";
6
+ export const LAYOUT_LIST = "list";
7
+
8
+ type Layout = typeof LAYOUT_GRID | typeof LAYOUT_LIST;
9
+
10
+ export type ActivityCardProps = {
11
+ title: ReactNode;
12
+ duration: ReactNode;
13
+ price: ReactNode;
14
+ image?: Image | null;
15
+ onSelect: () => void;
16
+ isSelected: boolean;
17
+ layout?: Layout;
18
+ };
19
+
20
+ export const ActivityCard = ({
21
+ title,
22
+ duration,
23
+ price,
24
+ image,
25
+ onSelect,
26
+ isSelected,
27
+ layout = LAYOUT_GRID,
28
+ }: ActivityCardProps) => {
29
+ if (layout === LAYOUT_GRID) {
30
+ return (
31
+ <button
32
+ type="button"
33
+ className={clsx("activity-card", isSelected && "active")}
34
+ onClick={onSelect}
35
+ >
36
+ {image && (
37
+ <img className="activity-card-image" alt="" src={image.url} />
38
+ )}
39
+ <div className={clsx("d-flex", "flex-column", !image && "no-image")}>
40
+ <div className="activity-card-title">{title}</div>
41
+
42
+ {duration && <div>{duration}</div>}
43
+
44
+ {price && <div>{price}</div>}
45
+ </div>
46
+ </button>
47
+ );
48
+ }
49
+
50
+ return (
51
+ <div role="button" onClick={onSelect} onKeyPress={onSelect} tabIndex={0}>
52
+ <div
53
+ className={clsx("list-activity-card", {
54
+ active: isSelected,
55
+ })}
56
+ >
57
+ <div className="description">
58
+ <div className="title">{title}</div>
59
+ {duration && (
60
+ <div>
61
+ <p>{duration}</p>
62
+ </div>
63
+ )}
64
+
65
+ {price && <div>{price}</div>}
66
+ </div>
67
+
68
+ {image && (
69
+ <div className="image-container">
70
+ <img className="image" src={image.url} alt="" />
71
+ </div>
72
+ )}
73
+ </div>
74
+ <hr className="list-activity-card-hr" />
75
+ </div>
76
+ );
77
+ };
@@ -0,0 +1 @@
1
+ export * from "./ActivityCard";
@@ -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 "../event-calendar/components/CalendarSelect";
8
+ import { CalendarSelect } from "../../../calendar/components/CalendarSelect";
9
9
  import { Product } from "../../../types";
10
10
 
11
11
  export default {
@@ -26,7 +26,6 @@ const MENU_STEPS = [
26
26
  maxSubItems: 1,
27
27
  quantityType: "constant",
28
28
  type: "menuItems",
29
- isRelyOnPeople: false,
30
29
  collectUserInfo: false,
31
30
  isTimeRelated: false,
32
31
  hasTicket: false,
@@ -1,7 +1,6 @@
1
1
  export { EventBookingForm } from "./event-booking-form";
2
2
  export { EventBookingView } from "./event-booking-view";
3
3
  export { IframeEventCard, IframeEventCardSkeleton } from "./event-card";
4
- export { EventDetails } from "./event-details";
5
4
  export { TicketDescription } from "./ticket-description";
6
5
  export { EventTables } from "./event-tables";
7
6
  export { EventOrderSummary } from "./event-order-summary";
@@ -13,12 +12,6 @@ export {
13
12
  } from "./event-order-short-summary";
14
13
  export { EventDescription } from "./event-description";
15
14
  export { EventProductSets, EventProductSetsProps } from "./event-product-sets";
16
- export {
17
- EventCalendar,
18
- CalendarSelect,
19
- CalendarSelectProps,
20
- CalendarSelectOption,
21
- } from "./event-calendar";
22
15
  export {
23
16
  EventStepVenueMapZones,
24
17
  EventStepVenueMapZonesProps,
@@ -19,7 +19,10 @@ export const Default: Story = () => {
19
19
  If you are a student at Bucks University you do not need to buy a ticket,
20
20
  your general admission is included as part of the Big Deal packages."
21
21
  images={[
22
- { id: 1, path: "https://source.unsplash.com/random" } as Image,
22
+ {
23
+ id: 1,
24
+ url: "https://cdn.lickli.st/ZH4SRqrufMqcC8S1TWR3ELz9FU45he1t/images/original/000/000/000/000/481-b7e137ca90c91e24.jpeg",
25
+ } as Image,
23
26
  ]}
24
27
  />
25
28
  </div>
@@ -38,7 +41,10 @@ export const Highlighted: Story = () => {
38
41
  If you are a student at Bucks University you do not need to buy a ticket,
39
42
  your general admission is included as part of the Big Deal packages."
40
43
  images={[
41
- { id: 1, path: "https://source.unsplash.com/random" } as Image,
44
+ {
45
+ id: 1,
46
+ url: "https://cdn.lickli.st/ZH4SRqrufMqcC8S1TWR3ELz9FU45he1t/images/original/000/000/000/000/481-b7e137ca90c91e24.jpeg",
47
+ } as Image,
42
48
  ]}
43
49
  />
44
50
  </div>
@@ -1,6 +1,9 @@
1
1
  import React, { CSSProperties, ReactNode, useState } from "react";
2
2
  import clsx from "clsx";
3
- import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
3
+ import {
4
+ Image,
5
+ THUMBNAIL_IMAGE_SIZE,
6
+ } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
4
7
  import MediaService from "@licklist/plugins/dist/services/Media/MediaService";
5
8
  import { TextExpand } from "../../../static/text-expand";
6
9
  import { TipTapEditor } from "../../../tiptap-editor/TipTapEditor";
@@ -31,7 +34,9 @@ export function TicketDescription({
31
34
 
32
35
  const wrapperClasses = clsx("ticket-description", className);
33
36
 
34
- const imageSrc = images ? MediaService.getImageSrc(images) : null;
37
+ const imageSrc = images
38
+ ? MediaService.getImageSrc(images, THUMBNAIL_IMAGE_SIZE)
39
+ : null;
35
40
 
36
41
  const descriptionWrapperStyle = {
37
42
  "--description-wrapper-height": "inherit",