@licklist/design 0.44.486-dev.78 → 0.44.486-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/dist/assets/logo/bookedit.svg +11 -9
  2. package/dist/assets/logo/bookedit.svg.js +1 -1
  3. package/dist/assets/logo/licklist.svg +2 -0
  4. package/dist/assets/logo/licklist.svg.js +1 -1
  5. package/dist/date-time-button/DateTimeButton.d.ts +1 -6
  6. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  7. package/dist/date-time-button/DateTimeButton.js +1 -1
  8. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  9. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  10. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  11. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  12. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  13. package/dist/events/event-card/EventCard.js +1 -1
  14. package/dist/events/event-card/utils.d.ts +0 -29
  15. package/dist/events/event-card/utils.d.ts.map +1 -1
  16. package/dist/events/event-card/utils.js +1 -1
  17. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +1 -3
  18. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  19. package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
  20. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -2
  21. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  22. package/dist/events/event-statistic-modal/hooks/useTableData.js +1 -1
  23. package/dist/events/event-statistic-modal/utils/index.d.ts +1 -1
  24. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  25. package/dist/events/event-statistic-modal/utils/index.js +1 -1
  26. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  27. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  28. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  29. package/dist/file-upload/FileUpload.js +1 -1
  30. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +12 -0
  31. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +1 -0
  32. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +1 -0
  33. package/dist/iframe/activity-cards/index.d.ts +3 -0
  34. package/dist/iframe/activity-cards/index.d.ts.map +1 -0
  35. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +12 -0
  36. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +1 -0
  37. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +1 -0
  38. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +7 -0
  39. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -0
  40. package/dist/iframe/event/event-calendar/EventCalendar.js +1 -0
  41. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  42. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  43. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  44. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +1 -0
  45. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +12 -0
  46. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -0
  47. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +1 -0
  48. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +3 -0
  49. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +1 -0
  50. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +7 -0
  51. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  52. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +1 -0
  53. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +1 -0
  54. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  55. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  56. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +1 -0
  57. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  58. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  59. package/dist/iframe/event/event-calendar/index.d.ts +4 -0
  60. package/dist/iframe/event/event-calendar/index.d.ts.map +1 -0
  61. package/dist/iframe/event/event-calendar/types/index.d.ts +6 -0
  62. package/dist/iframe/event/event-calendar/types/index.d.ts.map +1 -0
  63. package/dist/iframe/event/event-calendar/utils/index.d.ts +3 -0
  64. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +1 -0
  65. package/dist/iframe/event/event-calendar/utils/index.js +1 -0
  66. package/dist/iframe/event/event-details/EventDetails.d.ts +10 -0
  67. package/dist/iframe/event/event-details/EventDetails.d.ts.map +1 -0
  68. package/dist/iframe/event/event-details/EventDetails.js +1 -0
  69. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +9 -0
  70. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +1 -0
  71. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +1 -0
  72. package/dist/iframe/event/event-details/components/category-product/index.d.ts +2 -0
  73. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +1 -0
  74. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +26 -0
  75. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +1 -0
  76. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +1 -0
  77. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +2 -0
  78. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +1 -0
  79. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  80. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +1 -0
  81. package/dist/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.d.ts +3 -2
  82. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  83. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +1 -0
  84. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +2 -0
  85. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +1 -0
  86. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +2 -0
  87. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +1 -0
  88. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +8 -0
  89. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +1 -0
  90. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +1 -0
  91. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +2 -0
  92. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +1 -0
  93. package/dist/iframe/event/event-details/index.d.ts +2 -0
  94. package/dist/iframe/event/event-details/index.d.ts.map +1 -0
  95. package/dist/iframe/event/event-details/utils/index.d.ts +2 -0
  96. package/dist/iframe/event/event-details/utils/index.d.ts.map +1 -0
  97. package/dist/iframe/event/event-details/utils/routes.d.ts +2 -0
  98. package/dist/iframe/event/event-details/utils/routes.d.ts.map +1 -0
  99. package/dist/iframe/event/event-details/utils/routes.js +1 -0
  100. package/dist/iframe/event/index.d.ts +2 -0
  101. package/dist/iframe/event/index.d.ts.map +1 -1
  102. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  103. package/dist/iframe/event/ticket-description/TicketDescription.js +1 -1
  104. package/dist/iframe/index.d.ts +2 -2
  105. package/dist/iframe/index.d.ts.map +1 -1
  106. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  107. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  108. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  109. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  110. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -2
  111. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  112. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  113. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  114. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  115. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  116. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  117. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  118. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  119. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -4
  120. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  121. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  122. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +1 -2
  123. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  124. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  125. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  126. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  127. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  128. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +3 -4
  129. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  130. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  131. package/dist/iframe/order-process/constants.d.ts +0 -1
  132. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  133. package/dist/iframe/order-process/constants.js +1 -1
  134. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  135. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  136. package/dist/index.d.ts +0 -3
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +1 -1
  139. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  140. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  141. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -5
  142. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  143. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  144. package/dist/product-set/control/ProductSetControl.d.ts +3 -6
  145. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  146. package/dist/product-set/control/ProductSetControl.js +1 -1
  147. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts +1 -2
  148. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  149. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  150. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  151. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  152. package/dist/product-set/form/ProductSetForm.d.ts +1 -3
  153. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  154. package/dist/product-set/form/ProductSetForm.js +1 -1
  155. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  156. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  157. package/dist/product-set/form/ProductsControl.js +1 -1
  158. package/dist/product-set/product/ProductControl.d.ts +1 -2
  159. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  160. package/dist/product-set/product/ProductControl.js +1 -1
  161. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  162. package/dist/product-set/product-category/ProductCategoryControl.d.ts +1 -0
  163. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  164. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  165. package/dist/product-set/utils/index.d.ts +0 -10
  166. package/dist/product-set/utils/index.d.ts.map +1 -1
  167. package/dist/product-set/utils/index.js +1 -1
  168. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  169. package/dist/provider/location-input/LocationInput.js +1 -1
  170. package/dist/provider/location-input/index.d.ts +0 -1
  171. package/dist/provider/location-input/index.d.ts.map +1 -1
  172. package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
  173. package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
  174. package/dist/provider/provider-form/ProviderForm.js +1 -1
  175. package/dist/provider/venue-form/VenueForm.d.ts +1 -3
  176. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  177. package/dist/provider/venue-form/VenueForm.js +1 -1
  178. package/dist/recurrence-input/RecurrenceEndInput.d.ts +1 -8
  179. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  180. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  181. package/dist/recurrence-input/RecurrenceInput.d.ts +1 -2
  182. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  183. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  184. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -4
  185. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  186. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  187. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -1
  188. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  189. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  190. package/dist/report/form/ReportForm.d.ts.map +1 -1
  191. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  192. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  193. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  194. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  195. package/dist/sales/filters/SaleFilters.d.ts +0 -1
  196. package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
  197. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -3
  198. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  199. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  200. package/dist/sales/payment-form/SalePaymentForm.js +1 -1
  201. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  202. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  203. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  204. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  205. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  206. package/dist/static/form-number-input/FormNumberInput.d.ts +1 -2
  207. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  208. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  209. package/dist/styles/events/EventCard.scss +5 -12
  210. package/dist/styles/form/CustomCheckbox.scss +0 -6
  211. package/dist/styles/header/Header.scss +4 -0
  212. package/{src/styles/activity-card/GridActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
  213. package/dist/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  214. package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  215. package/dist/styles/iframe-customers-journey/_index.scss +3 -0
  216. package/dist/styles/iframe-events/Card.scss +0 -1
  217. package/dist/styles/notification/Notification.scss +0 -4
  218. package/dist/styles/packages.scss +1 -3
  219. package/dist/styles/resources-blocking/_index.scss +0 -16
  220. package/dist/styles/sales/BookingResults.scss +6 -14
  221. package/dist/styles/themes/bookedit/_index.scss +0 -1
  222. package/dist/styles/zones/ZoneForm.scss +0 -3
  223. package/dist/types/iframe.d.ts +0 -1
  224. package/dist/types/iframe.d.ts.map +1 -1
  225. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  226. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  227. package/dist/zone/form/ZoneForm.d.ts +1 -1
  228. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  229. package/dist/zone/form/ZoneForm.js +1 -1
  230. package/dist/zone/form/components/AvailableTimesControl.d.ts +0 -2
  231. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  232. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  233. package/dist/zone/form/components/ZoneControl.d.ts +1 -1
  234. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  235. package/dist/zone/form/components/ZoneControl.js +1 -1
  236. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +1 -1
  237. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  238. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  239. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  240. package/dist/zone/form/utils/dates.js +1 -1
  241. package/package.json +3 -3
  242. package/src/assets/logo/bookedit.svg +11 -9
  243. package/src/assets/logo/licklist.svg +2 -0
  244. package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
  245. package/src/date-time-button/DateTimeButton.tsx +22 -24
  246. package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
  247. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +12 -0
  248. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  249. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
  250. package/src/events/event-card/EventCard.tsx +2 -6
  251. package/src/events/event-card/utils.ts +16 -89
  252. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -5
  253. package/src/events/event-statistic-modal/hooks/useTableData.tsx +5 -12
  254. package/src/events/event-statistic-modal/utils/index.ts +34 -39
  255. package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
  256. package/src/file-upload/FileUpload.tsx +1 -3
  257. package/src/iframe/activity-cards/activity-card/ActivityCard.stories.tsx +52 -0
  258. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
  259. package/src/iframe/activity-cards/index.ts +2 -0
  260. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
  261. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
  262. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +36 -0
  263. package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
  264. package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
  265. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
  266. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
  267. package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -24
  268. package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  269. package/src/iframe/event/event-calendar/index.ts +6 -0
  270. package/src/iframe/event/event-calendar/types/index.ts +6 -0
  271. package/src/iframe/event/event-calendar/utils/index.ts +11 -0
  272. package/src/iframe/event/event-details/EventDetails.stories.tsx +187 -0
  273. package/src/iframe/event/event-details/EventDetails.tsx +92 -0
  274. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +123 -0
  275. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +109 -0
  276. package/src/iframe/event/event-details/components/category-product/index.ts +1 -0
  277. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +250 -0
  278. package/src/iframe/event/event-details/components/event-details-form/index.ts +5 -0
  279. package/src/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  280. package/src/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  281. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +1 -0
  282. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +1 -0
  283. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +34 -0
  284. package/src/iframe/event/event-details/components/product-category-view/index.ts +1 -0
  285. package/src/iframe/event/event-details/index.ts +1 -0
  286. package/src/iframe/event/event-details/utils/index.ts +1 -0
  287. package/src/iframe/event/event-details/utils/routes.ts +6 -0
  288. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +2 -1
  289. package/src/iframe/event/index.ts +7 -0
  290. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +2 -8
  291. package/src/iframe/event/ticket-description/TicketDescription.tsx +2 -7
  292. package/src/iframe/index.ts +3 -1
  293. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +3 -4
  294. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -2
  295. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
  296. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +1 -0
  297. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +8 -17
  298. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
  299. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +29 -15
  300. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
  301. package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
  302. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +32 -62
  303. package/src/iframe/order-process/constants.ts +0 -1
  304. package/src/iframe/page/Page.stories.tsx +2 -2
  305. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -13
  306. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  307. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  308. package/src/index.ts +0 -3
  309. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
  310. package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -73
  311. package/src/product-set/control/ProductSetControl.stories.tsx +2 -0
  312. package/src/product-set/control/ProductSetControl.tsx +10 -44
  313. package/src/product-set/control/ProductSetRecurrenceControl.tsx +5 -14
  314. package/src/product-set/form/ProductCategoriesControl.tsx +1 -2
  315. package/src/product-set/form/ProductSetForm.stories.tsx +12 -9
  316. package/src/product-set/form/ProductSetForm.tsx +3 -19
  317. package/src/product-set/form/ProductsControl.tsx +0 -10
  318. package/src/product-set/product/ProductControl.tsx +1 -28
  319. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  320. package/src/product-set/product-category/ProductCategory.stories.tsx +1 -0
  321. package/src/product-set/product-category/ProductCategoryControl.tsx +30 -1
  322. package/src/product-set/utils/index.ts +0 -38
  323. package/src/provider/location-input/LocationInput.tsx +20 -21
  324. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  325. package/src/provider/location-input/index.ts +1 -1
  326. package/src/provider/provider-details-input/ProviderDetailsInput.tsx +13 -5
  327. package/src/provider/venue-form/VenueForm.stories.tsx +0 -24
  328. package/src/provider/venue-form/VenueForm.tsx +4 -55
  329. package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
  330. package/src/recurrence-input/RecurrenceInput.tsx +2 -12
  331. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +11 -21
  332. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
  333. package/src/report/form/ReportForm.tsx +1 -1
  334. package/src/sales/booking/results/BookingResults.stories.tsx +7 -12
  335. package/src/sales/booking/results/components/ResultCard.tsx +3 -24
  336. package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
  337. package/src/sales/filters/SaleFilters.tsx +0 -1
  338. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +7 -0
  339. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +5 -20
  340. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +28 -31
  341. package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
  342. package/src/static/RestrictedAccess.tsx +1 -1
  343. package/src/static/form-number-input/FormNumberInput.tsx +1 -8
  344. package/src/styles/events/EventCard.scss +5 -12
  345. package/src/styles/form/CustomCheckbox.scss +0 -6
  346. package/src/styles/header/Header.scss +4 -0
  347. package/{dist/styles/activity-card/GridActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
  348. package/src/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  349. package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  350. package/src/styles/iframe-customers-journey/_index.scss +3 -0
  351. package/src/styles/iframe-events/Card.scss +0 -1
  352. package/src/styles/notification/Notification.scss +0 -4
  353. package/src/styles/packages.scss +1 -3
  354. package/src/styles/resources-blocking/_index.scss +0 -16
  355. package/src/styles/sales/BookingResults.scss +6 -14
  356. package/src/styles/themes/bookedit/_index.scss +0 -1
  357. package/src/styles/zones/ZoneForm.scss +0 -3
  358. package/src/types/iframe.ts +0 -1
  359. package/src/typings.d.ts +0 -11
  360. package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
  361. package/src/zone/form/ZoneForm.tsx +2 -1
  362. package/src/zone/form/components/AvailableTimesControl.tsx +88 -89
  363. package/src/zone/form/components/ZoneControl.tsx +5 -4
  364. package/src/zone/form/components/ZoneRecurrencesControl.tsx +59 -3
  365. package/src/zone/form/utils/dates.ts +36 -29
  366. package/dist/assets/iframe/available.svg.js +0 -1
  367. package/dist/assets/iframe/limited.svg.js +0 -1
  368. package/dist/assets/iframe/soldOut.svg.js +0 -1
  369. package/dist/assets/logo/favicon.svg +0 -12
  370. package/dist/availability-indicator/AvailabilityIndicator.d.ts +0 -10
  371. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
  372. package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
  373. package/dist/availability-indicator/index.d.ts +0 -2
  374. package/dist/availability-indicator/index.d.ts.map +0 -1
  375. package/dist/calendar/Calendar.d.ts +0 -19
  376. package/dist/calendar/Calendar.d.ts.map +0 -1
  377. package/dist/calendar/Calendar.js +0 -1
  378. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  379. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  380. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  381. package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
  382. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
  383. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  384. package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
  385. package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
  386. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  387. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  388. package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
  389. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  390. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  391. package/dist/calendar/index.d.ts +0 -4
  392. package/dist/calendar/index.d.ts.map +0 -1
  393. package/dist/calendar/utils/index.d.ts +0 -5
  394. package/dist/calendar/utils/index.d.ts.map +0 -1
  395. package/dist/calendar/utils/index.js +0 -1
  396. package/dist/iframe/activity-card/ActivityCard.d.ts +0 -15
  397. package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
  398. package/dist/iframe/activity-card/ActivityCard.js +0 -1
  399. package/dist/iframe/activity-card/index.d.ts +0 -2
  400. package/dist/iframe/activity-card/index.d.ts.map +0 -1
  401. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  402. package/dist/number-of-people-input/NumberOfPeopleInput.js +0 -1
  403. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  404. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +0 -1
  405. package/dist/number-of-people-input/components/index.d.ts +0 -2
  406. package/dist/number-of-people-input/components/index.d.ts.map +0 -1
  407. package/dist/number-of-people-input/index.d.ts +0 -3
  408. package/dist/number-of-people-input/index.d.ts.map +0 -1
  409. package/dist/provider/location-input/components/FormGroupControll.d.ts +0 -7
  410. package/dist/provider/location-input/components/FormGroupControll.d.ts.map +0 -1
  411. package/dist/provider/location-input/components/FormGroupControll.js +0 -1
  412. package/dist/provider/location-input/components/index.d.ts +0 -2
  413. package/dist/provider/location-input/components/index.d.ts.map +0 -1
  414. package/dist/styles/activity-card/_index.scss +0 -2
  415. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  416. package/dist/styles/availability-indicator/_index.scss +0 -1
  417. package/dist/styles/date-time-button/_index.scss +0 -1
  418. package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
  419. package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
  420. package/dist/zone/form/components/GameDurationControl.js +0 -1
  421. package/src/assets/logo/favicon.svg +0 -12
  422. package/src/availability-indicator/AvailabilityIndicator.tsx +0 -67
  423. package/src/availability-indicator/index.ts +0 -1
  424. package/src/calendar/Calendar.stories.tsx +0 -33
  425. package/src/calendar/Calendar.tsx +0 -45
  426. package/src/calendar/index.ts +0 -3
  427. package/src/calendar/utils/index.ts +0 -28
  428. package/src/iframe/activity-card/ActivityCard.stories.tsx +0 -51
  429. package/src/iframe/activity-card/ActivityCard.tsx +0 -66
  430. package/src/iframe/activity-card/index.ts +0 -1
  431. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +0 -92
  432. package/src/number-of-people-input/components/index.ts +0 -1
  433. package/src/number-of-people-input/index.ts +0 -2
  434. package/src/provider/location-input/components/FormGroupControll.tsx +0 -16
  435. package/src/provider/location-input/components/index.ts +0 -1
  436. package/src/styles/activity-card/_index.scss +0 -2
  437. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  438. package/src/styles/availability-indicator/_index.scss +0 -1
  439. package/src/styles/date-time-button/_index.scss +0 -1
  440. package/src/zone/form/components/GameDurationControl.tsx +0 -46
  441. /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  442. /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  443. /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  444. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
  445. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
  446. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  447. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
  448. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  449. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  450. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  451. /package/dist/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  452. /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  453. /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  454. /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  455. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
  456. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
  457. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
  458. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  459. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -47,6 +47,7 @@ const contextValue = {
47
47
  name: "Example",
48
48
  type: "sale",
49
49
  termsAndConditions: "",
50
+ isDefault: true,
50
51
  operationalCost: OPERATIONAL_COST_CUSTOMER,
51
52
  steps: [
52
53
  {
@@ -59,6 +60,7 @@ const contextValue = {
59
60
  minSubItems: 1,
60
61
  maxSubItems: 10,
61
62
  quantityType: "constant",
63
+ isRelyOnPeople: false,
62
64
  isTimeRelated: false,
63
65
  hasTicket: false,
64
66
  allowDeposits: false,
@@ -124,6 +126,7 @@ const contextValue = {
124
126
  minSubItems: 0,
125
127
  maxSubItems: 0,
126
128
  quantityType: "recharging",
129
+ isRelyOnPeople: false,
127
130
  isTimeRelated: false,
128
131
  hasTicket: false,
129
132
  allowDeposits: false,
@@ -141,6 +144,7 @@ const contextValue = {
141
144
  minSubItems: 0,
142
145
  maxSubItems: 0,
143
146
  quantityType: "recharging",
147
+ isRelyOnPeople: false,
144
148
  isTimeRelated: false,
145
149
  hasTicket: false,
146
150
  allowDeposits: false,
@@ -686,6 +690,7 @@ const defaultProductSets = [
686
690
  name: "Example",
687
691
  type: PRODUCT_SET_TYPES[0],
688
692
  termsAndConditions: "",
693
+ isDefault: true,
689
694
  operationalCost: OPERATIONAL_COST_TYPES[0],
690
695
  fieldSet: {
691
696
  id: 1,
@@ -708,6 +713,7 @@ const defaultProductSets = [
708
713
  minSubItems: 1,
709
714
  maxSubItems: 10,
710
715
  quantityType: "constant",
716
+ isRelyOnPeople: false,
711
717
  isTimeRelated: false,
712
718
  hasTicket: false,
713
719
  allowDeposits: false,
@@ -773,6 +779,7 @@ const defaultProductSets = [
773
779
  minSubItems: 0,
774
780
  maxSubItems: 0,
775
781
  quantityType: "recharging",
782
+ isRelyOnPeople: false,
776
783
  isTimeRelated: false,
777
784
  hasTicket: false,
778
785
  allowDeposits: false,
@@ -790,6 +797,7 @@ const defaultProductSets = [
790
797
  minSubItems: 0,
791
798
  maxSubItems: 0,
792
799
  quantityType: "recharging",
800
+ isRelyOnPeople: false,
793
801
  isTimeRelated: false,
794
802
  hasTicket: false,
795
803
  allowDeposits: false,
@@ -875,6 +883,7 @@ const defaultProductSets = [
875
883
  name: "Example 2",
876
884
  type: PRODUCT_SET_TYPES[1],
877
885
  termsAndConditions: "",
886
+ isDefault: true,
878
887
  operationalCost: OPERATIONAL_COST_TYPES[1],
879
888
  fieldSet: {
880
889
  id: 2,
@@ -897,6 +906,7 @@ const defaultProductSets = [
897
906
  minSubItems: 1,
898
907
  maxSubItems: 10,
899
908
  quantityType: "constant",
909
+ isRelyOnPeople: false,
900
910
  isTimeRelated: false,
901
911
  hasTicket: false,
902
912
  allowDeposits: false,
@@ -962,6 +972,7 @@ const defaultProductSets = [
962
972
  minSubItems: 0,
963
973
  maxSubItems: 0,
964
974
  quantityType: "recharging",
975
+ isRelyOnPeople: false,
965
976
  isTimeRelated: false,
966
977
  hasTicket: false,
967
978
  allowDeposits: false,
@@ -979,6 +990,7 @@ const defaultProductSets = [
979
990
  minSubItems: 0,
980
991
  maxSubItems: 0,
981
992
  quantityType: "recharging",
993
+ isRelyOnPeople: false,
982
994
  isTimeRelated: false,
983
995
  hasTicket: false,
984
996
  allowDeposits: false,
@@ -266,7 +266,7 @@ export const EditEventForm = ({
266
266
  </Form.Group>
267
267
  {/* key is used as a hack to make sure rrule is rendered correctly */}
268
268
  <IntervalInput
269
- key={watch("name")}
269
+ key={watch("rrule")}
270
270
  disabled={disabled}
271
271
  productSetId={productSetId}
272
272
  productSets={productSets}
@@ -15,8 +15,8 @@ export const getDefaultValues = (
15
15
  type: productSet?.type ?? DEFAULT_PRODUCT_SET_TYPE,
16
16
  termsAndConditions: productSet?.termsAndConditions ?? "",
17
17
  operationalCost: productSet?.operationalCost ?? DEFAULT_OPERATIONAL_COST_TYPE,
18
- relyOnPeopleType: productSet?.relyOnPeopleType ?? null,
19
18
  thankYouPageUrl: productSet?.thankYouPageUrl ?? "",
19
+ isDefault: productSet?.isDefault ?? false,
20
20
  fieldSetId: productSet?.fieldSetId,
21
21
  emailTemplates:
22
22
  productSet?.mailTemplates && productSet?.mailTemplates?.length > 0
@@ -24,7 +24,7 @@ export const getDefaultValues = (
24
24
  : undefined,
25
25
  smsTemplates:
26
26
  productSet?.smsTemplates && productSet?.smsTemplates?.length > 0
27
- ? getFilteredTemplates(productSet?.smsTemplates)
27
+ ? getFilteredTemplates(productSet?.mailTemplates)
28
28
  : undefined,
29
29
  steps:
30
30
  productSet?.steps?.map(({ productCategories, ...step }) => ({
@@ -9,11 +9,7 @@ import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventSta
9
9
  import Icon from "../../static/Icon";
10
10
  import { Sale } from "../../types/bookings";
11
11
  import { TipTapEditor } from "../../tiptap-editor/TipTapEditor";
12
- import {
13
- EVENT_DESCRIPTION_SIZE,
14
- formatContentWithoutTags,
15
- getStatisticInfo,
16
- } from "./utils";
12
+ import { formatContent, getStatisticInfo } from "./utils";
17
13
  import { ReactComponent as ChartBarIcon } from "../../assets/dashboard/chartBar.svg";
18
14
 
19
15
  export interface EventCardProps extends HasPermissionProp {
@@ -52,7 +48,7 @@ export function EventCard({
52
48
  const { formatNumber, formatDate } = useIntl();
53
49
  const { totalViews, ...statistics } = getStatisticInfo(eventStatistic, date);
54
50
  const memoedContent = useMemo(
55
- () => formatContentWithoutTags(description, EVENT_DESCRIPTION_SIZE),
51
+ () => formatContent(description, 300),
56
52
  [description]
57
53
  );
58
54
 
@@ -8,107 +8,34 @@ export function formatContent(content, maxSymbols) {
8
8
  return content;
9
9
  }
10
10
 
11
- export const formatContentWithoutTags = (
12
- content,
13
- maxLength = EVENT_DESCRIPTION_SIZE
11
+ export const getStatisticInfo = (
12
+ eventStatistic: EventStatistic | null,
13
+ date: string
14
14
  ) => {
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] => {
15
+ let totalViews = 0;
64
16
  let totalSold = 0;
65
17
  let totalAmount = 0;
66
- dates.forEach((date) =>
67
- Object.values(eventStatistic.productCategorySummary[date] ?? {}).forEach(
68
- ({ totalPerCategory, productsSummary }) => {
69
- totalAmount += totalPerCategory || 0;
70
- totalSold +=
71
- productsSummary?.reduce((acc, curr) => acc + curr.productsSold, 0) ??
72
- 0;
73
- }
74
- )
75
- );
76
18
 
77
- return [totalSold, totalAmount];
78
- };
79
-
80
- /**
81
- * Get statistic information for a given event and date.
82
- * @param {EventStatistic | null} eventStatistic - The event statistic object.
83
- * @param {string} date - The date in ISO format.
84
- * @returns {{
85
- * totalViews: number;
86
- * totalSold: number;
87
- * totalAmount: number;
88
- * }} The statistic information object.
89
- */
90
- export const getStatisticInfo = (
91
- eventStatistic: EventStatistic | null,
92
- date: string
93
- ): {
94
- totalViews: number;
95
- totalSold: number;
96
- totalAmount: number;
97
- } => {
98
- const defaultValues = { totalViews: 0, totalSold: 0, totalAmount: 0 };
99
- if (!eventStatistic) return defaultValues;
19
+ if (!eventStatistic) return { totalViews: 0, totalSold: 0, totalAmount: 0 };
100
20
 
101
21
  const viewsFormattedDate = DateTime.fromISO(date)
102
22
  .toUTC()
103
23
  .toFormat(DATE_FORMAT);
24
+
25
+ totalViews = eventStatistic.views[viewsFormattedDate]?.pageViews || 0;
26
+
104
27
  const summaryFormattedDate = DateTime.fromISO(date)
105
28
  .toUTC()
106
29
  .toFormat(DATE_TIME_FULL_FORMAT);
107
30
 
108
- const totalViews = calculateTotalViews([viewsFormattedDate], eventStatistic);
109
- const [totalSold, totalAmount] = calculateTotalSoldAndAmount(
110
- [summaryFormattedDate],
111
- eventStatistic
31
+ eventStatistic?.productCategorySummary?.[summaryFormattedDate]?.forEach(
32
+ ({ totalPerCategory, productsSummary = [] }) => {
33
+ totalAmount += totalPerCategory || 0;
34
+
35
+ productsSummary?.forEach(({ productsSold }) => {
36
+ totalSold += productsSold;
37
+ });
38
+ }
112
39
  );
113
40
 
114
41
  return { totalViews, totalSold, totalAmount };
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import { Modal, Button } from "react-bootstrap";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper";
5
- import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
6
5
  import Icon from "../../static/Icon";
7
6
  import { StaticTable } from "../../table";
8
7
  import { useTableData } from "./hooks/useTableData";
@@ -10,7 +9,6 @@ import { useTableData } from "./hooks/useTableData";
10
9
  export type EventStatisticModalProps = {
11
10
  isOpen: boolean;
12
11
  setIsOpen: (value: boolean) => void;
13
- date?: Event["startAt"] | null;
14
12
  eventStatistic?: EventStatistic | null;
15
13
  title?: string;
16
14
  };
@@ -18,13 +16,11 @@ export type EventStatisticModalProps = {
18
16
  export const EventStatisticModal = ({
19
17
  isOpen,
20
18
  setIsOpen,
21
- date,
22
19
  eventStatistic,
23
20
  title,
24
21
  }: EventStatisticModalProps) => {
25
22
  const { t } = useTranslation("Design");
26
-
27
- const data = useTableData(date, eventStatistic);
23
+ const data = useTableData(eventStatistic);
28
24
  const handleClose = () => {
29
25
  setIsOpen(false);
30
26
  };
@@ -4,14 +4,10 @@ import { useIntl } from "react-intl";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import * as Config from "@licklist/core/dist/Config";
6
6
  import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper";
7
- import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
8
7
  import { convertEventStatisticToTableData, TRANSLATION_KEYS } from "../utils";
9
8
  import { StaticTableData } from "../../../table";
10
9
 
11
- export const useTableData = (
12
- date: Event["startAt"] | null,
13
- eventStatistic: EventStatistic | null
14
- ) => {
10
+ export const useTableData = (eventStatistic: EventStatistic | null) => {
15
11
  const { t } = useTranslation("Design");
16
12
  const { formatNumber } = useIntl();
17
13
  const [tableRows, setTableRows] = useState<StaticTableData[]>([]);
@@ -32,17 +28,14 @@ export const useTableData = (
32
28
  return t(key);
33
29
  };
34
30
 
35
- const transformStatisticToTableRows = (
36
- date: Event["startAt"],
37
- statistic: EventStatistic | null
38
- ) => {
31
+ const transformStatisticToTableRows = (statistic: EventStatistic | null) => {
39
32
  if (!statistic) {
40
33
  return [];
41
34
  }
42
35
 
43
36
  const tableDataRows: StaticTableData[] = [];
44
37
 
45
- convertEventStatisticToTableData(date, statistic).forEach(
38
+ convertEventStatisticToTableData(statistic).forEach(
46
39
  ({ name, quantity, total, isBold, isHeader, key }) => {
47
40
  const formattedTotal = !Object.keys(TRANSLATION_KEYS).includes(
48
41
  String(total)
@@ -84,9 +77,9 @@ export const useTableData = (
84
77
  };
85
78
 
86
79
  useEffect(() => {
87
- setTableRows(transformStatisticToTableRows(date, eventStatistic));
80
+ setTableRows(transformStatisticToTableRows(eventStatistic));
88
81
  // eslint-disable-next-line react-hooks/exhaustive-deps
89
- }, [date, eventStatistic]);
82
+ }, [eventStatistic]);
90
83
 
91
84
  return tableRows;
92
85
  };
@@ -1,6 +1,4 @@
1
1
  import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper";
2
- import { DateTime } from "luxon";
3
- import { DATE_TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
4
2
 
5
3
  export const TRANSLATION_KEYS = {
6
4
  shortQuantity: "shortQuantity",
@@ -9,7 +7,6 @@ export const TRANSLATION_KEYS = {
9
7
  };
10
8
 
11
9
  export const convertEventStatisticToTableData = (
12
- date: string,
13
10
  eventStatistic: EventStatistic
14
11
  ) => {
15
12
  let totalAmount = 0;
@@ -28,51 +25,49 @@ export const convertEventStatisticToTableData = (
28
25
  total: string | number;
29
26
  }[] = [];
30
27
 
31
- const summaryFormattedDate = DateTime.fromISO(date)
32
- .toUTC()
33
- .toFormat(DATE_TIME_FULL_FORMAT);
28
+ Object.values(eventStatistic?.productCategorySummary)?.forEach(
29
+ (categories) => {
30
+ categories?.forEach(
31
+ ({ totalPerCategory, productsSummary = [], categoryName, eventId }) => {
32
+ let quantity = 0;
34
33
 
35
- Object.values(
36
- eventStatistic?.productCategorySummary[summaryFormattedDate] ?? {}
37
- )?.forEach(
38
- ({ totalPerCategory, productsSummary = [], categoryName, eventId }) => {
39
- let quantity = 0;
34
+ totalAmount += totalPerCategory || 0;
40
35
 
41
- totalAmount += totalPerCategory || 0;
36
+ tableDataArray.push({
37
+ name: categoryName,
38
+ key: `${eventId}.${categoryName}`,
39
+ isBold: true,
40
+ isHeader: true,
41
+ quantity: TRANSLATION_KEYS.shortQuantity,
42
+ total: TRANSLATION_KEYS.total,
43
+ });
42
44
 
43
- tableDataArray.push({
44
- name: categoryName,
45
- key: `${eventId}.${categoryName}`,
46
- isBold: true,
47
- isHeader: true,
48
- quantity: TRANSLATION_KEYS.shortQuantity,
49
- total: TRANSLATION_KEYS.total,
50
- });
45
+ productsSummary?.forEach(
46
+ ({ productsSold, name, totalQuantity, total }) => {
47
+ quantity += productsSold;
51
48
 
52
- productsSummary?.forEach(
53
- ({ productsSold, name, totalQuantity, total }) => {
54
- quantity += productsSold;
49
+ tableDataArray.push({
50
+ name,
51
+ key: `${eventId}.${categoryName}.${name}`,
52
+ quantity: totalQuantity
53
+ ? `${productsSold} / ${totalQuantity}`
54
+ : String(productsSold),
55
+ total: String(total),
56
+ });
57
+ }
58
+ );
55
59
 
56
60
  tableDataArray.push({
57
- name,
58
- key: `${eventId}.${categoryName}.${name}`,
59
- quantity: totalQuantity
60
- ? `${productsSold} / ${totalQuantity}`
61
- : String(productsSold),
62
- total: String(total),
61
+ name: TRANSLATION_KEYS.totalPerCategory,
62
+ key: `${eventId}.${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`,
63
+ quantity,
64
+ total: totalPerCategory,
65
+ isBold: true,
63
66
  });
67
+
68
+ totalQuantity += quantity;
64
69
  }
65
70
  );
66
-
67
- tableDataArray.push({
68
- name: TRANSLATION_KEYS.totalPerCategory,
69
- key: `${eventId}.${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`,
70
- quantity,
71
- total: totalPerCategory,
72
- isBold: true,
73
- });
74
-
75
- totalQuantity += quantity;
76
71
  }
77
72
  );
78
73
 
@@ -12,30 +12,21 @@ export const useImage = (
12
12
  height: 0,
13
13
  });
14
14
 
15
- const setImageEventHandler = function setImageEventHandler(
16
- this: HTMLImageElement
17
- ) {
18
- imageRef.current = this;
19
-
20
- setImageAttributes({
21
- width: this.naturalWidth,
22
- height: this.naturalHeight,
23
- });
24
- };
25
-
26
15
  const loadImage = useCallback((imageUrl?: string) => {
27
16
  imageRef.current = new window.Image();
28
17
  imageRef.current.src = imageUrl;
29
- imageRef.current.addEventListener("load", setImageEventHandler);
18
+ imageRef.current.addEventListener("load", function () {
19
+ imageRef.current = this;
20
+
21
+ setImageAttributes({
22
+ width: this.naturalWidth,
23
+ height: this.naturalHeight,
24
+ });
25
+ });
30
26
  }, []);
31
27
 
32
28
  useEffect(() => {
33
29
  loadImage(url);
34
-
35
- return () => {
36
- imageRef.current.removeEventListener("load", setImageEventHandler);
37
- imageRef.current = undefined;
38
- };
39
30
  }, [url, loadImage]);
40
31
 
41
32
  const memoizedImageAttributes = useMemo(() => {
@@ -175,9 +175,7 @@ export const useFileUpload = ({
175
175
  const filesArray = Array.from(uploadedFiles);
176
176
  filesArray.forEach((file) => {
177
177
  const fileExtension = file.name.split(".").pop();
178
- const extensionIndex = allowedExtensions.indexOf(
179
- fileExtension.toLowerCase()
180
- );
178
+ const extensionIndex = allowedExtensions.indexOf(fileExtension);
181
179
  const isExtensionValid = extensionIndex !== -1;
182
180
 
183
181
  if (isExtensionValid) {
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { Meta, Story } from "@storybook/react";
3
+ import { ActivityCard, ActivityCardProps } from "./ActivityCard";
4
+
5
+ export default {
6
+ title: "Iframe/ActivityCard",
7
+ component: ActivityCard,
8
+ } as Meta;
9
+
10
+ export const Default: Story<ActivityCardProps> = (props) => {
11
+ return <ActivityCard {...props} />;
12
+ };
13
+
14
+ Default.args = {
15
+ title: "Clay Pigeons & Axe Thowing",
16
+ duration: "60 mins",
17
+ price: "from £20",
18
+ image: {
19
+ hash: "0b37b130e22aa2d3",
20
+ id: 195,
21
+ imageType: "cover",
22
+ imageableId: 25,
23
+ imageableType: "zone",
24
+ path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
25
+ // eslint-disable-next-line max-len
26
+ url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
27
+ },
28
+ onSelect: () => null,
29
+ isSelected: false,
30
+ };
31
+
32
+ export const Selected: Story<ActivityCardProps> = (props) => {
33
+ return <ActivityCard {...props} />;
34
+ };
35
+
36
+ Selected.args = {
37
+ title: "Clay Pigeons & Axe Thowing",
38
+ duration: "60 mins",
39
+ price: "from £20",
40
+ image: {
41
+ hash: "0b37b130e22aa2d3",
42
+ id: 195,
43
+ imageType: "cover",
44
+ imageableId: 25,
45
+ imageableType: "zone",
46
+ path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
47
+ // eslint-disable-next-line max-len
48
+ url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
49
+ },
50
+ onSelect: () => null,
51
+ isSelected: true,
52
+ };
@@ -0,0 +1,38 @@
1
+ import React, { ReactNode } from "react";
2
+ import clsx from "clsx";
3
+ import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
4
+
5
+ export interface ActivityCardProps {
6
+ title: ReactNode;
7
+ duration: ReactNode;
8
+ price: ReactNode;
9
+ image?: Image | null;
10
+ onSelect: () => void;
11
+ isSelected: boolean;
12
+ }
13
+
14
+ export const ActivityCard = ({
15
+ title,
16
+ duration,
17
+ price,
18
+ image,
19
+ onSelect,
20
+ isSelected,
21
+ }: ActivityCardProps) => {
22
+ return (
23
+ <button
24
+ type="button"
25
+ className={clsx("activity-card", isSelected && "active")}
26
+ onClick={onSelect}
27
+ >
28
+ {image && <img className="activity-card-image" alt="" src={image.url} />}
29
+ <div className={clsx("d-flex", "flex-column", !image && "no-image")}>
30
+ <div className="activity-card-title">{title}</div>
31
+
32
+ {duration && <div>{duration}</div>}
33
+
34
+ {price && <div>{price}</div>}
35
+ </div>
36
+ </button>
37
+ );
38
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./list-activity-card/ListActivityCard";
2
+ export * from "./activity-card/ActivityCard";
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { Meta, Story } from "@storybook/react";
3
+ import { ListActivityCardProps, ListActivityCard } from "./ListActivityCard";
4
+
5
+ export default {
6
+ title: "Iframe/ListActivityCard",
7
+ component: ListActivityCard,
8
+ } as Meta;
9
+
10
+ export const Default: Story<ListActivityCardProps> = (props) => {
11
+ return <ListActivityCard {...props} />;
12
+ };
13
+
14
+ Default.args = {
15
+ title: "Clay Pigeons & Axe Thowing",
16
+ duration: "60 mins",
17
+ price: "from £20",
18
+ image: {
19
+ hash: "0b37b130e22aa2d3",
20
+ id: 195,
21
+ imageType: "cover",
22
+ imageableId: 25,
23
+ imageableType: "zone",
24
+ path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
25
+ // eslint-disable-next-line max-len
26
+ url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
27
+ },
28
+ onSelect: () => null,
29
+ isSelected: false,
30
+ };
31
+
32
+ export const Selected: Story<ListActivityCardProps> = (props) => {
33
+ return <ListActivityCard {...props} />;
34
+ };
35
+
36
+ Selected.args = {
37
+ title: "Clay Pigeons & Axe Thowing",
38
+ duration: "60 mins",
39
+ price: "from £20",
40
+ image: {
41
+ hash: "0b37b130e22aa2d3",
42
+ id: 195,
43
+ imageType: "cover",
44
+ imageableId: 25,
45
+ imageableType: "zone",
46
+ path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
47
+ // eslint-disable-next-line max-len
48
+ url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
49
+ },
50
+ onSelect: () => null,
51
+ isSelected: true,
52
+ };