@licklist/design 0.44.486-dev.5 → 0.44.486-dev.51

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 (321) 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/utils/getDefaultProductSet.d.ts.map +1 -1
  41. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  42. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  43. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  44. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  45. package/dist/file-upload/FileUpload.js +1 -1
  46. package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
  47. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
  48. package/dist/iframe/activity-card/ActivityCard.js +1 -0
  49. package/dist/iframe/activity-card/index.d.ts +2 -0
  50. package/dist/iframe/activity-card/index.d.ts.map +1 -0
  51. package/dist/iframe/event/index.d.ts +0 -1
  52. package/dist/iframe/event/index.d.ts.map +1 -1
  53. package/dist/iframe/index.d.ts +2 -2
  54. package/dist/iframe/index.d.ts.map +1 -1
  55. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  56. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  57. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  58. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  59. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +2 -1
  60. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  61. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  62. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  63. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  64. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  65. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  66. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  67. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  68. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +2 -1
  69. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  70. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  71. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  72. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  73. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  74. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +4 -3
  75. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  76. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  77. package/dist/iframe/order-process/constants.d.ts +1 -0
  78. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  79. package/dist/iframe/order-process/constants.js +1 -1
  80. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  81. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  82. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  83. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  84. package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
  85. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  86. package/dist/iframe/payment/order-items-table/types/index.js +1 -0
  87. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
  88. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
  89. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
  90. package/dist/index.d.ts +2 -0
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +1 -1
  93. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  94. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  95. package/dist/product-set/control/ProductSetControl.d.ts +2 -1
  96. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  97. package/dist/product-set/control/ProductSetControl.js +1 -1
  98. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  99. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  100. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  101. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  102. package/dist/product-set/form/ProductsControl.d.ts +3 -1
  103. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  104. package/dist/product-set/form/ProductsControl.js +1 -1
  105. package/dist/product-set/product/ProductControl.d.ts +2 -1
  106. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  107. package/dist/product-set/product/ProductControl.js +1 -1
  108. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  109. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  110. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  111. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  112. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  113. package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
  114. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  115. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  116. package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
  117. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  118. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  119. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +4 -1
  120. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  121. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  122. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -0
  123. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  124. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  125. package/dist/report/form/ReportForm.d.ts.map +1 -1
  126. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  127. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  128. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  129. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  130. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  131. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  132. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  133. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  134. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  135. package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
  136. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  137. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  138. package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  139. package/dist/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
  140. package/dist/styles/activity-card/_index.scss +2 -0
  141. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  142. package/dist/styles/availability-indicator/_index.scss +1 -0
  143. package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  144. package/dist/styles/date-time-button/_index.scss +1 -0
  145. package/dist/styles/form/CustomCheckbox.scss +5 -0
  146. package/dist/styles/header/Header.scss +0 -4
  147. package/dist/styles/iframe-events/Card.scss +1 -0
  148. package/dist/styles/iframe-page/PageBody.scss +3 -2
  149. package/dist/styles/notification/Notification.scss +4 -0
  150. package/dist/styles/packages.scss +3 -1
  151. package/dist/styles/resources-blocking/_index.scss +5 -0
  152. package/dist/styles/themes/bookedit/_index.scss +1 -0
  153. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  154. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  155. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  156. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  157. package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
  158. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
  159. package/dist/zone/form/components/GameDurationControl.js +1 -0
  160. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  161. package/dist/zone/form/components/ZoneControl.js +1 -1
  162. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  163. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  164. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  165. package/dist/zone/form/utils/dates.js +1 -1
  166. package/package.json +3 -3
  167. package/src/assets/logo/bookedit.svg +9 -11
  168. package/src/assets/logo/favicon.svg +12 -0
  169. package/src/assets/logo/licklist.svg +0 -2
  170. package/src/availability-indicator/AvailabilityIndicator.tsx +59 -0
  171. package/src/availability-indicator/index.ts +1 -0
  172. package/src/calendar/Calendar.stories.tsx +33 -0
  173. package/src/calendar/Calendar.tsx +46 -0
  174. package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
  175. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +24 -19
  176. package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  177. package/src/calendar/index.ts +3 -0
  178. package/src/calendar/utils/index.ts +28 -0
  179. package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
  180. package/src/date-time-button/DateTimeButton.tsx +19 -22
  181. package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
  182. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -9
  183. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +3 -1
  184. package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
  185. package/src/file-upload/FileUpload.tsx +3 -1
  186. package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
  187. package/src/iframe/activity-card/ActivityCard.tsx +77 -0
  188. package/src/iframe/activity-card/index.ts +1 -0
  189. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -2
  190. package/src/iframe/event/index.ts +0 -6
  191. package/src/iframe/index.ts +1 -2
  192. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +4 -2
  193. package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -1
  194. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
  195. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
  196. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +17 -8
  197. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +1 -15
  198. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
  199. package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
  200. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +62 -32
  201. package/src/iframe/order-process/constants.ts +1 -0
  202. package/src/iframe/page/Page.stories.tsx +2 -2
  203. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
  204. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
  205. package/src/iframe/payment/order-items-table/types/index.ts +18 -1
  206. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
  207. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  208. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  209. package/src/index.ts +2 -0
  210. package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
  211. package/src/product-set/control/ProductSetControl.tsx +35 -0
  212. package/src/product-set/control/ProductSetRecurrenceControl.tsx +8 -4
  213. package/src/product-set/form/ProductCategoriesControl.tsx +2 -1
  214. package/src/product-set/form/ProductSetForm.stories.tsx +3 -6
  215. package/src/product-set/form/ProductsControl.tsx +10 -0
  216. package/src/product-set/product/ProductControl.tsx +28 -1
  217. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  218. package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
  219. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -30
  220. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  221. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +9 -6
  222. package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
  223. package/src/recurrence-input/RecurrenceInput.tsx +12 -2
  224. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +24 -21
  225. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +9 -0
  226. package/src/report/form/ReportForm.tsx +1 -1
  227. package/src/sales/booking/results/components/ResultCard.tsx +3 -2
  228. package/src/sales/coupon/control/CouponFormControl.tsx +5 -0
  229. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +7 -3
  230. package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
  231. package/src/static/RestrictedAccess.tsx +1 -1
  232. package/src/static/form-number-input/FormNumberInput.tsx +8 -1
  233. package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  234. package/src/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
  235. package/src/styles/activity-card/_index.scss +2 -0
  236. package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  237. package/src/styles/availability-indicator/_index.scss +1 -0
  238. package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  239. package/src/styles/date-time-button/_index.scss +1 -0
  240. package/src/styles/form/CustomCheckbox.scss +5 -0
  241. package/src/styles/header/Header.scss +0 -4
  242. package/src/styles/iframe-events/Card.scss +1 -0
  243. package/src/styles/iframe-page/PageBody.scss +3 -2
  244. package/src/styles/notification/Notification.scss +4 -0
  245. package/src/styles/packages.scss +3 -1
  246. package/src/styles/resources-blocking/_index.scss +5 -0
  247. package/src/styles/themes/bookedit/_index.scss +1 -0
  248. package/src/typings.d.ts +11 -0
  249. package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
  250. package/src/zone/form/components/AvailableTimesControl.tsx +4 -9
  251. package/src/zone/form/components/GameDurationControl.tsx +46 -0
  252. package/src/zone/form/components/ZoneControl.tsx +2 -0
  253. package/src/zone/form/components/ZoneRecurrencesControl.tsx +27 -35
  254. package/src/zone/form/utils/dates.ts +29 -36
  255. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
  256. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
  257. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
  258. package/dist/iframe/activity-cards/index.d.ts +0 -3
  259. package/dist/iframe/activity-cards/index.d.ts.map +0 -1
  260. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
  261. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
  262. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
  263. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
  264. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
  265. package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
  266. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  267. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  268. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  269. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
  270. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
  271. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
  272. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
  273. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
  274. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
  275. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
  276. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  277. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
  278. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
  279. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  280. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  281. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
  282. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  283. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  284. package/dist/iframe/event/event-calendar/index.d.ts +0 -4
  285. package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
  286. package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
  287. package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
  288. package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
  289. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
  290. package/dist/iframe/event/event-calendar/utils/index.js +0 -1
  291. package/dist/styles/iframe-customers-journey/_index.scss +0 -3
  292. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
  293. package/src/iframe/activity-cards/index.ts +0 -2
  294. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
  295. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
  296. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
  297. package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
  298. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
  299. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
  300. package/src/iframe/event/event-calendar/index.ts +0 -6
  301. package/src/iframe/event/event-calendar/types/index.ts +0 -6
  302. package/src/iframe/event/event-calendar/utils/index.ts +0 -11
  303. package/src/styles/iframe-customers-journey/_index.scss +0 -3
  304. /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  305. /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  306. /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  307. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
  308. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
  309. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  310. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
  311. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  312. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  313. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  314. /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  315. /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  316. /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  317. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
  318. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
  319. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
  320. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  321. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0"?>
2
+ <svg width="200" height="201" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" version="1.1">
3
+ <title>Single Colour - Light Blue Light</title>
4
+ <g class="layer">
5
+ <title>Layer 1</title>
6
+ <g fill="none" fill-rule="evenodd" id="Page-1">
7
+ <g fill="#0E8CE2" fill-rule="nonzero" id="Logo-Export" transform="translate(0 -1835)">
8
+ <path d="m52.59,1861.52c16.49,-16.49 24.18,-20.75 33.43,-23.55c9.25,-2.8 18.71,-2.8 27.95,0c9.25,2.8 16.95,7.06 33.43,23.55l26.95,26.94c16.48,16.49 20.74,24.18 23.54,33.43c2.81,9.25 2.81,18.71 0,27.95c-2.8,9.25 -7.06,16.95 -23.54,33.43l-26.95,26.95c-16.48,16.48 -24.18,20.74 -33.43,23.54c-9.24,2.81 -18.7,2.81 -27.95,0c-9.25,-2.8 -16.94,-7.06 -33.43,-23.54l-26.94,-26.95c-16.49,-16.48 -20.75,-24.18 -23.55,-33.43c-2.8,-9.24 -2.8,-18.7 0,-27.95c2.8,-9.25 7.06,-16.94 23.55,-33.43l26.94,-26.94zm14.82,14.04l-27.33,27.33c-12.85,12.85 -16.37,18.05 -18.45,24.92c-1.63,5.39 -1.63,10.73 0,16.11c2.06,6.8 5.53,11.97 18.06,24.54l27.72,27.71c12.57,12.54 17.73,16 24.53,18.06c5.39,1.64 10.73,1.64 16.11,0c6.87,-2.08 12.07,-5.59 24.92,-18.44l26.95,-26.95c12.85,-12.85 16.36,-18.05 18.44,-24.92c1.64,-5.38 1.64,-10.72 0,-16.11c-2.08,-6.87 -5.59,-12.07 -18.44,-24.92l-26.95,-26.94c-12.85,-12.85 -18.05,-16.37 -24.92,-18.45c-5.38,-1.63 -10.72,-1.63 -16.11,0c-6.8,2.06 -11.96,5.53 -24.53,18.06zm67.18,50.6c5.48,-5.47 14.37,-5.47 19.85,0c5.47,5.48 5.47,14.37 0,19.85l-44.2,44.19c-5.48,5.48 -14.36,5.48 -19.84,0l-6.45,-6.45c-1.21,-1.21 -1.52,-1.77 -1.72,-2.45c-0.21,-0.68 -0.21,-1.37 0,-2.05c0.2,-0.67 0.51,-1.24 1.72,-2.44l50.64,-50.65zm-73.77,24.53c1.32,-1.32 3.11,-2.06 4.97,-2.05l25.82,0.06c1.4,0 2.54,1.15 2.54,2.55c0,0.67 -0.26,1.3 -0.72,1.78l-1.36,1.4l-16.1,15.95c-1.49,1.48 -3.91,1.48 -5.4,-0.01l-9.75,-9.76c-2.74,-2.74 -2.74,-7.18 0,-9.92" id="Single-Colour---Light-Blue-Light"/>
9
+ </g>
10
+ </g>
11
+ </g>
12
+ </svg>
@@ -1,8 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
  <svg
3
3
  xmlns="http://www.w3.org/2000/svg"
4
- width="118"
5
- height="28"
6
4
  viewBox="0 0 118 28"
7
5
  version="1.1"
8
6
  id="svg2">
@@ -0,0 +1,59 @@
1
+ import React, { ReactElement } from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ import { ReactComponent as AvailableIcon } from "../assets/iframe/available.svg";
4
+ import { ReactComponent as LimitedIcon } from "../assets/iframe/limited.svg";
5
+ import { ReactComponent as SoldOutIcon } from "../assets/iframe/soldOut.svg";
6
+
7
+ const LOTS_OF_SPACE_LIMIT = 0.2;
8
+ const LIMITED_LIMIT = 0.8;
9
+
10
+ const getIconsAndLabels = (
11
+ booked: number,
12
+ total: number
13
+ ): { label: string; icon: ReactElement } => {
14
+ if (booked === total) {
15
+ return { label: "soldOut", icon: <SoldOutIcon className="logo" /> };
16
+ }
17
+
18
+ // lots of space if less than 80% booked
19
+ if (booked / total <= LOTS_OF_SPACE_LIMIT) {
20
+ return { label: "lotsOfSpace", icon: <AvailableIcon className="logo" /> };
21
+ }
22
+
23
+ if (booked / total >= LIMITED_LIMIT) {
24
+ return { label: "limited", icon: <LimitedIcon className="logo" /> };
25
+ }
26
+
27
+ return { label: "available", icon: <AvailableIcon className="logo" /> };
28
+ };
29
+
30
+ type AvailabilityIndicatorProps = {
31
+ booked: number;
32
+ total: number;
33
+ notAvailable?: boolean;
34
+ };
35
+
36
+ export const AvailabilityIndicator = ({
37
+ booked,
38
+ total,
39
+ notAvailable,
40
+ }: AvailabilityIndicatorProps) => {
41
+ const { t } = useTranslation("Design");
42
+ const { icon, label } = getIconsAndLabels(booked, total);
43
+
44
+ if (notAvailable) {
45
+ return (
46
+ <div className="availability-indicator">
47
+ <SoldOutIcon className="logo" />
48
+ <div>{t("notAvailable")}</div>
49
+ </div>
50
+ );
51
+ }
52
+
53
+ return (
54
+ <div className="availability-indicator">
55
+ {icon}
56
+ <div>{t(label)}</div>
57
+ </div>
58
+ );
59
+ };
@@ -0,0 +1 @@
1
+ export * from "./AvailabilityIndicator";
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { DateTime } from "luxon";
3
+ import { Meta, Story } from "@storybook/react";
4
+ import { Calendar, CalendarProps } from "./Calendar";
5
+
6
+ export default {
7
+ title: "Iframe/Event/Calendar",
8
+ component: Calendar,
9
+ } as Meta;
10
+
11
+ export const Default: Story<CalendarProps> = (args) => {
12
+ return (
13
+ <div style={{ backgroundColor: "white" }}>
14
+ <Calendar {...args} />
15
+ </div>
16
+ );
17
+ };
18
+
19
+ const now = DateTime.now().set({
20
+ hour: 0,
21
+ second: 0,
22
+ millisecond: 0,
23
+ minute: 0,
24
+ });
25
+
26
+ Default.args = {
27
+ disabledDates: [now.minus({ day: 2 }), now, now.plus({ day: 2 })],
28
+ isLoading: false,
29
+ fromPrice: "from £10",
30
+ selectedDate: null,
31
+ setSelectedDate: () => null,
32
+ calendarDates: [],
33
+ };
@@ -0,0 +1,46 @@
1
+ import React, { Dispatch, ReactElement, SetStateAction } from "react";
2
+ import { DateTime } from "luxon";
3
+ import { CalendarButtons } from "./components/CalendarButtons";
4
+ import { CalendarDates } from "./components/CalendarDates";
5
+
6
+ export const defaultStartDay = DateTime.now().set({
7
+ millisecond: 0,
8
+ second: 0,
9
+ hour: 0,
10
+ minute: 0,
11
+ });
12
+
13
+ export type CalendarProps = {
14
+ currentDate: DateTime;
15
+ setCurrentDate: Dispatch<SetStateAction<DateTime>>;
16
+ calendarDates: DateTime[];
17
+ disabledDates?: DateTime[];
18
+ selectedDate: DateTime | null;
19
+ setSelectedDate: Dispatch<SetStateAction<DateTime | null>>;
20
+ fromPrice?: string | ReactElement | null;
21
+ isLoading?: boolean;
22
+ initialDate?: DateTime;
23
+ getAvailability?: (
24
+ date: DateTime
25
+ ) => { booked: number; total: number } | undefined;
26
+ includeAvailability?: boolean;
27
+ };
28
+
29
+ export const Calendar = ({
30
+ disabledDates = [],
31
+ initialDate = defaultStartDay,
32
+ ...props
33
+ }: CalendarProps) => {
34
+ return (
35
+ <div className="calendar-wrapper">
36
+ <div className="calendar">
37
+ <CalendarButtons
38
+ disabledDates={disabledDates}
39
+ initialDate={initialDate}
40
+ {...props}
41
+ />
42
+ <CalendarDates disabledDates={disabledDates} {...props} />
43
+ </div>
44
+ </div>
45
+ );
46
+ };
@@ -1,36 +1,53 @@
1
- import React, { useContext, useMemo } from "react";
1
+ import React, { useCallback, useMemo } from "react";
2
2
  import { Button } from "react-bootstrap";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { range } from "lodash";
5
- import { EventCalendarContext } from "@licklist/plugins/dist/context/event/EventCalendarContext";
6
- import { ReactComponent as SelectArrow } from "../../../../../assets/iframe/selectArrow.svg";
5
+ import { ReactComponent as SelectArrow } from "../../../assets/iframe/selectArrow.svg";
7
6
  import { CalendarSelect } from "../CalendarSelect";
8
- import { CalendarBaseProps } from "../../types";
9
7
  import { isSelectedDateDisabled } from "../../utils";
8
+ import { CalendarProps } from "../../Calendar";
10
9
 
11
- type CalendarButtonsProps = CalendarBaseProps;
10
+ type CalendarButtonsProps = Pick<
11
+ CalendarProps,
12
+ | "isLoading"
13
+ | "disabledDates"
14
+ | "initialDate"
15
+ | "currentDate"
16
+ | "setCurrentDate"
17
+ | "setSelectedDate"
18
+ >;
12
19
 
13
20
  export const CalendarButtons = ({
14
21
  disabledDates = [],
15
22
  isLoading = false,
23
+ initialDate,
24
+ currentDate,
25
+ setCurrentDate,
26
+ setSelectedDate,
16
27
  }: CalendarButtonsProps) => {
17
- const {
18
- initialDate,
19
- currentDate,
20
- canMoveBack,
21
- onSelectPreviousMonth,
22
- onSelectNextMonth,
23
- setCurrentDate,
24
- setSelectedDate,
25
- } = useContext(EventCalendarContext);
26
28
  const { t } = useTranslation("Design");
27
29
 
30
+ const onSelectNextMonth = useCallback(() => {
31
+ setCurrentDate((prevDate) => prevDate.plus({ months: 1 }));
32
+ // eslint-disable-next-line react-hooks/exhaustive-deps
33
+ }, []);
34
+
35
+ const onSelectPreviousMonth = useCallback(() => {
36
+ setCurrentDate((prevDate) => prevDate.minus({ month: 1 }));
37
+ // eslint-disable-next-line react-hooks/exhaustive-deps
38
+ }, []);
39
+
28
40
  const yearOptions = useMemo(() => {
29
41
  return range(initialDate.year, initialDate.year + 5, 1).map((year) => {
30
42
  return { label: String(year), value: year };
31
43
  });
32
44
  }, [initialDate]);
33
45
 
46
+ const canMoveBack = useMemo(
47
+ () => currentDate > initialDate,
48
+ [currentDate, initialDate]
49
+ );
50
+
34
51
  const onSelectYear = (value: string) => {
35
52
  const selectedYear = Number(value);
36
53
  const nextDateTime = currentDate.set({ year: selectedYear });
@@ -1,23 +1,26 @@
1
- import React, { ReactElement, useContext, useMemo } from "react";
1
+ import React, { useMemo } from "react";
2
2
  import { DateTime } from "luxon";
3
- import { EventCalendarContext } from "@licklist/plugins/dist/context/event/EventCalendarContext";
3
+ import { DAY_NUMBER } from "@licklist/core/dist/Config";
4
+ import { DateTimeButton } from "../../../date-time-button";
4
5
  import { CalendarWeekdays } from "../CalendarWeekdays";
5
- import { CalendarDate } from "../CalendarDate";
6
- import { CalendarBaseProps } from "../../types";
7
6
  import { isSelectedDateDisabled } from "../../utils";
7
+ import { CalendarProps } from "../../Calendar";
8
8
 
9
- export type CalendarDatesProps = CalendarBaseProps & {
10
- fromPrice?: string | ReactElement | null;
11
- };
9
+ export type CalendarDatesProps = Omit<
10
+ CalendarProps,
11
+ "currentDate" | "setCurrentDate" | "initialDate"
12
+ >;
12
13
 
13
14
  export const CalendarDates = ({
14
15
  disabledDates = [],
15
16
  isLoading = false,
17
+ calendarDates,
18
+ selectedDate,
19
+ setSelectedDate,
16
20
  fromPrice,
21
+ getAvailability,
22
+ includeAvailability,
17
23
  }: CalendarDatesProps) => {
18
- const { calendarDates, initialDate, selectedDate, setSelectedDate } =
19
- useContext(EventCalendarContext);
20
-
21
24
  const fillCalendarDates = useMemo(() => {
22
25
  let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
23
26
 
@@ -40,22 +43,24 @@ export const CalendarDates = ({
40
43
  <CalendarWeekdays />
41
44
  <div className="calendar-dates">
42
45
  {fillCalendarDates.map((date: DateTime | null) => {
43
- if (date === null) {
44
- return <div />;
45
- }
46
+ if (date === null) return <div />;
46
47
 
47
48
  const isDisabled =
48
49
  isLoading || isSelectedDateDisabled(date, disabledDates);
49
50
 
50
51
  return (
51
- <CalendarDate
52
+ <DateTimeButton
52
53
  key={+date}
53
- currentDate={date}
54
- initialDate={initialDate}
55
- selectedDate={selectedDate}
56
- setSelectedDate={setSelectedDate}
57
54
  isDisabled={isDisabled}
58
- fromPrice={fromPrice}
55
+ isSelected={
56
+ selectedDate ? date.hasSame(selectedDate, "day") : undefined
57
+ }
58
+ date={date.toFormat(DAY_NUMBER)}
59
+ onSelect={() => setSelectedDate(date)}
60
+ price={fromPrice}
61
+ resources={getAvailability?.(date)}
62
+ showResources={includeAvailability}
63
+ calendarView
59
64
  />
60
65
  );
61
66
  })}
@@ -1,7 +1,7 @@
1
1
  import React, { useRef } from "react";
2
2
  import { Form } from "react-bootstrap";
3
3
  import clsx from "clsx";
4
- import { PAGE_CALENDAR_SELECT_WRAPPER } from "../../../../page/components/PageBody/constants";
4
+ import { PAGE_CALENDAR_SELECT_WRAPPER } from "../../../iframe/page/components/PageBody/constants";
5
5
 
6
6
  export type CalendarSelectOption = {
7
7
  label: string;
@@ -0,0 +1,3 @@
1
+ export * from "./Calendar";
2
+ export * from "./components/CalendarSelect";
3
+ export * from "./utils";
@@ -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
  )}
@@ -60,7 +60,6 @@ const contextValue = {
60
60
  minSubItems: 1,
61
61
  maxSubItems: 10,
62
62
  quantityType: "constant",
63
- isRelyOnPeople: false,
64
63
  isTimeRelated: false,
65
64
  hasTicket: false,
66
65
  allowDeposits: false,
@@ -126,7 +125,6 @@ const contextValue = {
126
125
  minSubItems: 0,
127
126
  maxSubItems: 0,
128
127
  quantityType: "recharging",
129
- isRelyOnPeople: false,
130
128
  isTimeRelated: false,
131
129
  hasTicket: false,
132
130
  allowDeposits: false,
@@ -144,7 +142,6 @@ const contextValue = {
144
142
  minSubItems: 0,
145
143
  maxSubItems: 0,
146
144
  quantityType: "recharging",
147
- isRelyOnPeople: false,
148
145
  isTimeRelated: false,
149
146
  hasTicket: false,
150
147
  allowDeposits: false,
@@ -713,7 +710,6 @@ const defaultProductSets = [
713
710
  minSubItems: 1,
714
711
  maxSubItems: 10,
715
712
  quantityType: "constant",
716
- isRelyOnPeople: false,
717
713
  isTimeRelated: false,
718
714
  hasTicket: false,
719
715
  allowDeposits: false,
@@ -779,7 +775,6 @@ const defaultProductSets = [
779
775
  minSubItems: 0,
780
776
  maxSubItems: 0,
781
777
  quantityType: "recharging",
782
- isRelyOnPeople: false,
783
778
  isTimeRelated: false,
784
779
  hasTicket: false,
785
780
  allowDeposits: false,
@@ -797,7 +792,6 @@ const defaultProductSets = [
797
792
  minSubItems: 0,
798
793
  maxSubItems: 0,
799
794
  quantityType: "recharging",
800
- isRelyOnPeople: false,
801
795
  isTimeRelated: false,
802
796
  hasTicket: false,
803
797
  allowDeposits: false,
@@ -906,7 +900,6 @@ const defaultProductSets = [
906
900
  minSubItems: 1,
907
901
  maxSubItems: 10,
908
902
  quantityType: "constant",
909
- isRelyOnPeople: false,
910
903
  isTimeRelated: false,
911
904
  hasTicket: false,
912
905
  allowDeposits: false,
@@ -972,7 +965,6 @@ const defaultProductSets = [
972
965
  minSubItems: 0,
973
966
  maxSubItems: 0,
974
967
  quantityType: "recharging",
975
- isRelyOnPeople: false,
976
968
  isTimeRelated: false,
977
969
  hasTicket: false,
978
970
  allowDeposits: false,
@@ -990,7 +982,6 @@ const defaultProductSets = [
990
982
  minSubItems: 0,
991
983
  maxSubItems: 0,
992
984
  quantityType: "recharging",
993
- isRelyOnPeople: false,
994
985
  isTimeRelated: false,
995
986
  hasTicket: false,
996
987
  allowDeposits: false,
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  DEFAULT_OPERATIONAL_COST_TYPE,
3
3
  DEFAULT_PRODUCT_SET_TYPE,
4
+ DEFAULT_RELY_ON_PEOPLE_TYPE,
4
5
  ProductSet,
5
6
  } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
6
7
  import { getFilteredTemplates } from "../../../product-set/utils/index";
@@ -15,6 +16,7 @@ export const getDefaultValues = (
15
16
  type: productSet?.type ?? DEFAULT_PRODUCT_SET_TYPE,
16
17
  termsAndConditions: productSet?.termsAndConditions ?? "",
17
18
  operationalCost: productSet?.operationalCost ?? DEFAULT_OPERATIONAL_COST_TYPE,
19
+ relyOnPeopleType: productSet?.relyOnPeopleType ?? DEFAULT_RELY_ON_PEOPLE_TYPE,
18
20
  thankYouPageUrl: productSet?.thankYouPageUrl ?? "",
19
21
  isDefault: productSet?.isDefault ?? false,
20
22
  fieldSetId: productSet?.fieldSetId,
@@ -24,7 +26,7 @@ export const getDefaultValues = (
24
26
  : undefined,
25
27
  smsTemplates:
26
28
  productSet?.smsTemplates && productSet?.smsTemplates?.length > 0
27
- ? getFilteredTemplates(productSet?.mailTemplates)
29
+ ? getFilteredTemplates(productSet?.smsTemplates)
28
30
  : undefined,
29
31
  steps:
30
32
  productSet?.steps?.map(({ productCategories, ...step }) => ({
@@ -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
+ };