@licklist/design 0.44.486-dev.59 → 0.44.486-dev.6

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 (409) 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 -7
  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.d.ts.map +1 -1
  12. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  13. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  14. package/dist/events/event-card/EventCard.js +1 -1
  15. package/dist/events/event-card/utils.d.ts +0 -2
  16. package/dist/events/event-card/utils.d.ts.map +1 -1
  17. package/dist/events/event-card/utils.js +1 -1
  18. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  19. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  20. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  21. package/dist/file-upload/FileUpload.js +1 -1
  22. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +12 -0
  23. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +1 -0
  24. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +1 -0
  25. package/dist/iframe/activity-cards/index.d.ts +3 -0
  26. package/dist/iframe/activity-cards/index.d.ts.map +1 -0
  27. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +12 -0
  28. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +1 -0
  29. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +1 -0
  30. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +7 -0
  31. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -0
  32. package/dist/iframe/event/event-calendar/EventCalendar.js +1 -0
  33. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  34. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  35. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  36. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +1 -0
  37. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +12 -0
  38. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -0
  39. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +1 -0
  40. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +3 -0
  41. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +1 -0
  42. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +7 -0
  43. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  44. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +1 -0
  45. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +1 -0
  46. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  47. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  48. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +1 -0
  49. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  50. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  51. package/dist/iframe/event/event-calendar/index.d.ts +4 -0
  52. package/dist/iframe/event/event-calendar/index.d.ts.map +1 -0
  53. package/dist/iframe/event/event-calendar/types/index.d.ts +6 -0
  54. package/dist/iframe/event/event-calendar/types/index.d.ts.map +1 -0
  55. package/dist/iframe/event/event-calendar/utils/index.d.ts +3 -0
  56. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +1 -0
  57. package/dist/iframe/event/event-calendar/utils/index.js +1 -0
  58. package/dist/iframe/event/event-details/EventDetails.d.ts +10 -0
  59. package/dist/iframe/event/event-details/EventDetails.d.ts.map +1 -0
  60. package/dist/iframe/event/event-details/EventDetails.js +1 -0
  61. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +9 -0
  62. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +1 -0
  63. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +1 -0
  64. package/dist/iframe/event/event-details/components/category-product/index.d.ts +2 -0
  65. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +1 -0
  66. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +26 -0
  67. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +1 -0
  68. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +1 -0
  69. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +2 -0
  70. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +1 -0
  71. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  72. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +1 -0
  73. package/dist/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.d.ts +3 -2
  74. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  75. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +1 -0
  76. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +2 -0
  77. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +1 -0
  78. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +2 -0
  79. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +1 -0
  80. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +8 -0
  81. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +1 -0
  82. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +1 -0
  83. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +2 -0
  84. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +1 -0
  85. package/dist/iframe/event/event-details/index.d.ts +2 -0
  86. package/dist/iframe/event/event-details/index.d.ts.map +1 -0
  87. package/dist/iframe/event/event-details/utils/index.d.ts +2 -0
  88. package/dist/iframe/event/event-details/utils/index.d.ts.map +1 -0
  89. package/dist/iframe/event/event-details/utils/routes.d.ts +2 -0
  90. package/dist/iframe/event/event-details/utils/routes.d.ts.map +1 -0
  91. package/dist/iframe/event/event-details/utils/routes.js +1 -0
  92. package/dist/iframe/event/index.d.ts +2 -0
  93. package/dist/iframe/event/index.d.ts.map +1 -1
  94. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  95. package/dist/iframe/event/ticket-description/TicketDescription.js +1 -1
  96. package/dist/iframe/index.d.ts +2 -2
  97. package/dist/iframe/index.d.ts.map +1 -1
  98. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  99. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  100. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  101. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  102. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -2
  103. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  104. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  105. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  106. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  107. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  108. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  109. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  110. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  111. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +0 -1
  112. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  113. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  114. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +1 -2
  115. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  116. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  117. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  118. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  119. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  120. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +3 -4
  121. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  122. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  123. package/dist/iframe/order-process/constants.d.ts +0 -1
  124. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  125. package/dist/iframe/order-process/constants.js +1 -1
  126. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  127. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  128. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  129. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  130. package/dist/iframe/payment/order-items-table/types/index.d.ts +1 -7
  131. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  132. package/dist/index.d.ts +0 -3
  133. package/dist/index.d.ts.map +1 -1
  134. package/dist/index.js +1 -1
  135. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  136. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  137. package/dist/product-set/control/ProductSetControl.d.ts +1 -2
  138. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  139. package/dist/product-set/control/ProductSetControl.js +1 -1
  140. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  141. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  142. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  143. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  144. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  145. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  146. package/dist/product-set/form/ProductsControl.js +1 -1
  147. package/dist/product-set/product/ProductControl.d.ts +1 -2
  148. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  149. package/dist/product-set/product/ProductControl.js +1 -1
  150. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  151. package/dist/product-set/product-category/ProductCategoryControl.d.ts +1 -0
  152. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  153. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  154. package/dist/recurrence-input/RecurrenceEndInput.d.ts +1 -8
  155. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  156. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  157. package/dist/recurrence-input/RecurrenceInput.d.ts +1 -2
  158. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  159. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  160. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -4
  161. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  162. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  163. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -1
  164. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  165. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  166. package/dist/report/form/ReportForm.d.ts.map +1 -1
  167. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  168. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  169. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  170. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  171. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -3
  172. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  173. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  174. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  175. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  176. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  177. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  178. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  179. package/dist/static/form-number-input/FormNumberInput.d.ts +1 -2
  180. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  181. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  182. package/dist/styles/events/EventCard.scss +3 -10
  183. package/dist/styles/form/CustomCheckbox.scss +0 -5
  184. package/dist/styles/header/Header.scss +4 -0
  185. package/dist/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
  186. package/{src/styles/activity-card/ListActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  187. package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  188. package/dist/styles/iframe-customers-journey/_index.scss +3 -0
  189. package/dist/styles/iframe-events/Card.scss +0 -1
  190. package/dist/styles/notification/Notification.scss +0 -4
  191. package/dist/styles/packages.scss +1 -3
  192. package/dist/styles/resources-blocking/_index.scss +0 -5
  193. package/dist/styles/sales/BookingResults.scss +1 -9
  194. package/dist/styles/themes/bookedit/_index.scss +0 -1
  195. package/dist/types/iframe.d.ts +0 -1
  196. package/dist/types/iframe.d.ts.map +1 -1
  197. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  198. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  199. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  200. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  201. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  202. package/dist/zone/form/components/ZoneControl.js +1 -1
  203. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  204. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  205. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  206. package/dist/zone/form/utils/dates.js +1 -1
  207. package/package.json +3 -3
  208. package/src/assets/logo/bookedit.svg +11 -9
  209. package/src/assets/logo/licklist.svg +2 -0
  210. package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
  211. package/src/date-time-button/DateTimeButton.tsx +22 -19
  212. package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
  213. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +9 -0
  214. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  215. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -2
  216. package/src/events/event-card/EventCard.tsx +2 -6
  217. package/src/events/event-card/utils.ts +0 -13
  218. package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
  219. package/src/file-upload/FileUpload.tsx +1 -3
  220. package/src/iframe/{activity-card → activity-cards/activity-card}/ActivityCard.stories.tsx +1 -24
  221. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
  222. package/src/iframe/activity-cards/index.ts +2 -0
  223. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
  224. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
  225. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +36 -0
  226. package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
  227. package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
  228. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
  229. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
  230. package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -24
  231. package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  232. package/src/iframe/event/event-calendar/index.ts +6 -0
  233. package/src/iframe/event/event-calendar/types/index.ts +6 -0
  234. package/src/iframe/event/event-calendar/utils/index.ts +11 -0
  235. package/src/iframe/event/event-details/EventDetails.stories.tsx +187 -0
  236. package/src/iframe/event/event-details/EventDetails.tsx +92 -0
  237. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +123 -0
  238. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +109 -0
  239. package/src/iframe/event/event-details/components/category-product/index.ts +1 -0
  240. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +250 -0
  241. package/src/iframe/event/event-details/components/event-details-form/index.ts +5 -0
  242. package/src/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  243. package/src/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  244. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +1 -0
  245. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +1 -0
  246. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +34 -0
  247. package/src/iframe/event/event-details/components/product-category-view/index.ts +1 -0
  248. package/src/iframe/event/event-details/index.ts +1 -0
  249. package/src/iframe/event/event-details/utils/index.ts +1 -0
  250. package/src/iframe/event/event-details/utils/routes.ts +6 -0
  251. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +2 -1
  252. package/src/iframe/event/index.ts +7 -0
  253. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +2 -8
  254. package/src/iframe/event/ticket-description/TicketDescription.tsx +2 -7
  255. package/src/iframe/index.ts +3 -1
  256. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +3 -4
  257. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -2
  258. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
  259. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +1 -0
  260. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +8 -17
  261. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
  262. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -5
  263. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
  264. package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
  265. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +32 -62
  266. package/src/iframe/order-process/constants.ts +0 -1
  267. package/src/iframe/page/Page.stories.tsx +2 -2
  268. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -6
  269. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +99 -11
  270. package/src/iframe/payment/order-items-table/types/index.ts +1 -18
  271. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  272. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  273. package/src/index.ts +0 -3
  274. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
  275. package/src/product-set/control/ProductSetControl.tsx +0 -36
  276. package/src/product-set/control/ProductSetRecurrenceControl.tsx +4 -8
  277. package/src/product-set/form/ProductCategoriesControl.tsx +1 -2
  278. package/src/product-set/form/ProductSetForm.stories.tsx +6 -3
  279. package/src/product-set/form/ProductsControl.tsx +0 -10
  280. package/src/product-set/product/ProductControl.tsx +1 -28
  281. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  282. package/src/product-set/product-category/ProductCategory.stories.tsx +1 -0
  283. package/src/product-set/product-category/ProductCategoryControl.tsx +30 -1
  284. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  285. package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
  286. package/src/recurrence-input/RecurrenceInput.tsx +2 -12
  287. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -24
  288. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
  289. package/src/report/form/ReportForm.tsx +1 -1
  290. package/src/sales/booking/results/BookingResults.stories.tsx +7 -0
  291. package/src/sales/booking/results/components/ResultCard.tsx +3 -9
  292. package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
  293. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +7 -0
  294. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +5 -20
  295. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +28 -31
  296. package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
  297. package/src/static/RestrictedAccess.tsx +1 -1
  298. package/src/static/form-number-input/FormNumberInput.tsx +1 -8
  299. package/src/styles/events/EventCard.scss +3 -10
  300. package/src/styles/form/CustomCheckbox.scss +0 -5
  301. package/src/styles/header/Header.scss +4 -0
  302. package/src/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
  303. package/{dist/styles/activity-card/ListActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  304. package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  305. package/src/styles/iframe-customers-journey/_index.scss +3 -0
  306. package/src/styles/iframe-events/Card.scss +0 -1
  307. package/src/styles/notification/Notification.scss +0 -4
  308. package/src/styles/packages.scss +1 -3
  309. package/src/styles/resources-blocking/_index.scss +0 -5
  310. package/src/styles/sales/BookingResults.scss +1 -9
  311. package/src/styles/themes/bookedit/_index.scss +0 -1
  312. package/src/types/iframe.ts +0 -1
  313. package/src/typings.d.ts +0 -11
  314. package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
  315. package/src/zone/form/components/AvailableTimesControl.tsx +9 -4
  316. package/src/zone/form/components/ZoneControl.tsx +0 -2
  317. package/src/zone/form/components/ZoneRecurrencesControl.tsx +35 -27
  318. package/src/zone/form/utils/dates.ts +36 -29
  319. package/dist/assets/iframe/available.svg.js +0 -1
  320. package/dist/assets/iframe/limited.svg.js +0 -1
  321. package/dist/assets/iframe/soldOut.svg.js +0 -1
  322. package/dist/assets/logo/favicon.svg +0 -12
  323. package/dist/availability-indicator/AvailabilityIndicator.d.ts +0 -9
  324. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
  325. package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
  326. package/dist/availability-indicator/index.d.ts +0 -2
  327. package/dist/availability-indicator/index.d.ts.map +0 -1
  328. package/dist/calendar/Calendar.d.ts +0 -21
  329. package/dist/calendar/Calendar.d.ts.map +0 -1
  330. package/dist/calendar/Calendar.js +0 -1
  331. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  332. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  333. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  334. package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
  335. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
  336. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  337. package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
  338. package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
  339. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  340. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  341. package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
  342. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  343. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  344. package/dist/calendar/index.d.ts +0 -4
  345. package/dist/calendar/index.d.ts.map +0 -1
  346. package/dist/calendar/utils/index.d.ts +0 -5
  347. package/dist/calendar/utils/index.d.ts.map +0 -1
  348. package/dist/calendar/utils/index.js +0 -1
  349. package/dist/iframe/activity-card/ActivityCard.d.ts +0 -17
  350. package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
  351. package/dist/iframe/activity-card/ActivityCard.js +0 -1
  352. package/dist/iframe/activity-card/index.d.ts +0 -2
  353. package/dist/iframe/activity-card/index.d.ts.map +0 -1
  354. package/dist/iframe/payment/order-items-table/types/index.js +0 -1
  355. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +0 -3
  356. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +0 -1
  357. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +0 -1
  358. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  359. package/dist/number-of-people-input/NumberOfPeopleInput.js +0 -1
  360. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  361. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +0 -1
  362. package/dist/number-of-people-input/components/index.d.ts +0 -2
  363. package/dist/number-of-people-input/components/index.d.ts.map +0 -1
  364. package/dist/number-of-people-input/index.d.ts +0 -3
  365. package/dist/number-of-people-input/index.d.ts.map +0 -1
  366. package/dist/styles/activity-card/_index.scss +0 -2
  367. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  368. package/dist/styles/availability-indicator/_index.scss +0 -1
  369. package/dist/styles/date-time-button/_index.scss +0 -1
  370. package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
  371. package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
  372. package/dist/zone/form/components/GameDurationControl.js +0 -1
  373. package/src/assets/logo/favicon.svg +0 -12
  374. package/src/availability-indicator/AvailabilityIndicator.tsx +0 -59
  375. package/src/availability-indicator/index.ts +0 -1
  376. package/src/calendar/Calendar.stories.tsx +0 -33
  377. package/src/calendar/Calendar.tsx +0 -46
  378. package/src/calendar/index.ts +0 -3
  379. package/src/calendar/utils/index.ts +0 -28
  380. package/src/iframe/activity-card/ActivityCard.tsx +0 -77
  381. package/src/iframe/activity-card/index.ts +0 -1
  382. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -118
  383. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +0 -92
  384. package/src/number-of-people-input/components/index.ts +0 -1
  385. package/src/number-of-people-input/index.ts +0 -2
  386. package/src/styles/activity-card/_index.scss +0 -2
  387. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  388. package/src/styles/availability-indicator/_index.scss +0 -1
  389. package/src/styles/date-time-button/_index.scss +0 -1
  390. package/src/zone/form/components/GameDurationControl.tsx +0 -46
  391. /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  392. /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  393. /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  394. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
  395. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
  396. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  397. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
  398. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  399. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  400. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  401. /package/dist/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  402. /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  403. /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  404. /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  405. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
  406. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
  407. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
  408. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  409. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -113,7 +113,6 @@ export interface ProductControlProps<T>
113
113
  productName: string;
114
114
  hasTicket?: boolean;
115
115
  categoryType?: CategoryType;
116
- zoneDuration?: number;
117
116
  }
118
117
 
119
118
  export function ProductControl<T extends FormValues>({
@@ -127,7 +126,6 @@ export function ProductControl<T extends FormValues>({
127
126
  productName,
128
127
  hasTicket,
129
128
  categoryType,
130
- zoneDuration,
131
129
  }: ProductControlProps<T>) {
132
130
  const {
133
131
  register,
@@ -192,16 +190,6 @@ export function ProductControl<T extends FormValues>({
192
190
  [handleImageUploading]
193
191
  );
194
192
 
195
- const onChangeGameCapacity = (value: number) => {
196
- if (!zoneDuration) {
197
- return;
198
- }
199
- setValue(
200
- `${fieldNamePrefix}.duration` as Path<T>,
201
- (value * zoneDuration) as UnpackNestedValue<PathValue<T, Path<T>>>
202
- );
203
- };
204
-
205
193
  const onImageRemove = useCallback(
206
194
  (id, path) => {
207
195
  handleImageRemove(String(id), path);
@@ -384,14 +372,6 @@ export function ProductControl<T extends FormValues>({
384
372
  <FormNumberInput
385
373
  fieldName={`${fieldNamePrefix}.capacity`}
386
374
  label={t("capacity")}
387
- rules={{
388
- min: {
389
- value: 1,
390
- message: t("Validation:fieldRequired", {
391
- attribute: t("capacity"),
392
- }) as string,
393
- },
394
- }}
395
375
  />
396
376
  </Col>
397
377
  </Row>
@@ -403,11 +383,7 @@ export function ProductControl<T extends FormValues>({
403
383
  <FormNumberInput
404
384
  fieldName={`${fieldNamePrefix}.capacity`}
405
385
  label={t("capacity")}
406
- onChange={onChangeGameCapacity}
407
386
  rules={{
408
- required: t("Validation:fieldRequired", {
409
- attribute: t("capacity"),
410
- }) as string,
411
387
  min: {
412
388
  value: 1,
413
389
  message: t("Validation:fieldRequired", {
@@ -422,13 +398,10 @@ export function ProductControl<T extends FormValues>({
422
398
  fieldName={`${fieldNamePrefix}.duration`}
423
399
  label={t("durationMinutes")}
424
400
  rules={{
425
- required: t("Validation:fieldRequired", {
426
- attribute: t("capacity"),
427
- }) as string,
428
401
  min: {
429
402
  value: 1,
430
403
  message: t("Validation:fieldRequired", {
431
- attribute: t("capacity"),
404
+ attribute: t("duration"),
432
405
  }) as string,
433
406
  },
434
407
  }}
@@ -66,7 +66,7 @@ export const ProductDurationControl = <T,>({
66
66
  },
67
67
  min: {
68
68
  value: 1,
69
- message: t("Validation:fieldMinNumber", {
69
+ message: t("Validation:fieldMin", {
70
70
  attribute: t("duration"),
71
71
  }),
72
72
  },
@@ -26,6 +26,7 @@ const categoryMock: Partial<ProductCategoryControlValues> = {
26
26
  minSubItems: 0,
27
27
  maxSubItems: 0,
28
28
  quantityType: QUANTITY_TYPE_STANDARD,
29
+ isRelyOnPeople: false,
29
30
  isTimeRelated: false,
30
31
  hasTicket: false,
31
32
  allowDeposits: false,
@@ -28,6 +28,7 @@ export interface ProductCategoryControlValues extends FormValues {
28
28
  maxSubItems: number | null;
29
29
  quantityType: QuantityType;
30
30
  type: CategoryType;
31
+ isRelyOnPeople: boolean;
31
32
  isTimeRelated: boolean;
32
33
  collectUserInfo: boolean;
33
34
  hasTicket: boolean;
@@ -96,6 +97,7 @@ export function ProductCategoryControl({
96
97
  const minSubItemsId = useId();
97
98
  const maxSubItemsId = useId();
98
99
  const quantityType = useId();
100
+ const isRelyOnPeopleId = useId();
99
101
  const isTimeRelatedId = useId();
100
102
  const collectUserInfoId = useId();
101
103
  const hasTicketId = useId();
@@ -330,7 +332,7 @@ export function ProductCategoryControl({
330
332
  <Row>
331
333
  <Col>
332
334
  <Form.Group controlId={zoneId}>
333
- <Form.Label>{t("Design:zone")}</Form.Label>
335
+ <Form.Label>Zone</Form.Label>
334
336
  <Controller
335
337
  control={control}
336
338
  name={`${fieldNamePrefix}.zoneId`}
@@ -358,6 +360,12 @@ export function ProductCategoryControl({
358
360
  attribute: t("zone"),
359
361
  }),
360
362
  },
363
+ validate: (value) => {
364
+ if (value) return true;
365
+ return t("Validation:fieldRequired", {
366
+ attribute: t("zone"),
367
+ }) as string;
368
+ },
361
369
  }}
362
370
  />
363
371
  <Form.Control.Feedback type="invalid">
@@ -462,6 +470,27 @@ export function ProductCategoryControl({
462
470
  </Form.Group>
463
471
  )}
464
472
 
473
+ <Form.Group
474
+ controlId={isRelyOnPeopleId}
475
+ className="advanced-switch-container"
476
+ >
477
+ <Form.Label>{t("isRelyOnPeople")}</Form.Label>
478
+
479
+ <div>
480
+ <Controller
481
+ render={({ field: { name, value, onChange } }) => (
482
+ <BooleanSwitch
483
+ name={name}
484
+ value={Boolean(value)}
485
+ onChange={onChange}
486
+ disabled={isLoading || category.hasTicket}
487
+ />
488
+ )}
489
+ control={control}
490
+ name={`${fieldNamePrefix}.isRelyOnPeople` as const}
491
+ />
492
+ </div>
493
+ </Form.Group>
465
494
  {!category.hasTicket && (
466
495
  <Form.Group
467
496
  controlId={isTimeRelatedId}
@@ -1,4 +1,4 @@
1
- import React, { ReactElement } from "react";
1
+ import React from "react";
2
2
  import { useFormContext } from "react-hook-form";
3
3
  import en from "react-phone-number-input/locale/en.json";
4
4
  import { LocationInputValues } from ".";
@@ -13,7 +13,7 @@ export function LocationInputDescription() {
13
13
  "postcode",
14
14
  "country",
15
15
  ] as const;
16
- const fields = fieldNames.reduce<ReactElement[]>((acc, field) => {
16
+ const fields = fieldNames.reduce<JSX.Element[]>((acc, field) => {
17
17
  const value = values?.[field];
18
18
  if (!value) return acc;
19
19
 
@@ -1,19 +1,17 @@
1
- import React, { useEffect, useRef } from "react";
1
+ import React, { useRef } from "react";
2
2
  import { useId } from "@react-aria/utils";
3
3
  import { DateTime, DurationUnit } from "luxon";
4
4
  import { Col, Form, InputGroup, Row } from "react-bootstrap";
5
5
  import RRule from "rrule";
6
- import { DATE_FORMAT } from "@licklist/core/dist/Config";
7
- import { useTranslation } from "react-i18next";
6
+
8
7
  import { SupportedFrequency } from "./utils";
9
8
  import HTMLInputDateElement from "../types/static/HTMLInputDateElement";
10
9
 
11
10
  interface Props {
12
11
  disabled?: boolean;
13
- date: string; // yyyy-mm-ddThh:mm
14
- minDate?: string; // should be in yyyy-mm-dd format
12
+ date: string;
15
13
  frequency: SupportedFrequency;
16
- until?: string; // yyyy-mm-dd
14
+ until?: string;
17
15
  count?: number;
18
16
  onChange: (values: { until?: string; count?: number }) => void;
19
17
  }
@@ -25,31 +23,16 @@ function RecurrenceEndInput({
25
23
  until,
26
24
  count,
27
25
  onChange,
28
- minDate,
29
26
  }: Props) {
30
- const { t } = useTranslation("Design");
31
27
  // unique ids for radios
32
28
  const neverId = useId();
33
29
  const onId = useId();
34
30
  const afterId = useId();
35
31
  const dateInput = useRef<HTMLInputDateElement | null>(null);
36
32
 
37
- useEffect(() => {
38
- const untilDatetime = DateTime.fromFormat(
39
- until ?? getUntil({ date, frequency }),
40
- DATE_FORMAT
41
- );
42
-
43
- const minDatetime = DateTime.fromFormat(minDate, DATE_FORMAT);
44
-
45
- if (minDatetime > untilDatetime) {
46
- onChange({ until: minDate });
47
- }
48
- }, [minDate, onChange, until, date, frequency]);
49
-
50
33
  return (
51
34
  <Form.Group>
52
- <Form.Label>{t("ends")}</Form.Label>
35
+ <Form.Label>Ends</Form.Label>
53
36
 
54
37
  <Form.Check type="radio" id={neverId} custom className="mt-3">
55
38
  <Form.Check.Input
@@ -58,7 +41,7 @@ function RecurrenceEndInput({
58
41
  onChange={() => onChange({ count: 500 })}
59
42
  disabled={disabled}
60
43
  />
61
- <Form.Check.Label>{t("never")}</Form.Check.Label>
44
+ <Form.Check.Label>Never</Form.Check.Label>
62
45
  </Form.Check>
63
46
 
64
47
  <Form.Check type="radio" id={onId} custom className="mt-3">
@@ -72,12 +55,11 @@ function RecurrenceEndInput({
72
55
  }
73
56
  disabled={disabled}
74
57
  />
75
- <Form.Check.Label>{t("on")}</Form.Check.Label>
58
+ <Form.Check.Label>On</Form.Check.Label>
76
59
  </Col>
77
60
  <Col>
78
61
  <Form.Control
79
62
  type="date"
80
- min={minDate}
81
63
  disabled={disabled || !until}
82
64
  aria-label="Date on which the recurrence ends"
83
65
  value={until ?? getUntil({ date, frequency })}
@@ -101,7 +83,7 @@ function RecurrenceEndInput({
101
83
  }
102
84
  disabled={disabled}
103
85
  />
104
- <Form.Check.Label>{t("after")}</Form.Check.Label>
86
+ <Form.Check.Label>After</Form.Check.Label>
105
87
  </Col>
106
88
  <Col>
107
89
  <InputGroup>
@@ -117,7 +99,7 @@ function RecurrenceEndInput({
117
99
  }
118
100
  />
119
101
  <InputGroup.Append>
120
- <InputGroup.Text>{t("occurences")}</InputGroup.Text>
102
+ <InputGroup.Text>occurrences</InputGroup.Text>
121
103
  </InputGroup.Append>
122
104
  </InputGroup>
123
105
  </Col>
@@ -127,7 +109,7 @@ function RecurrenceEndInput({
127
109
  );
128
110
  }
129
111
 
130
- export const defaultOccurrences = {
112
+ const defaultOccurrences = {
131
113
  [RRule.DAILY]: 30,
132
114
  [RRule.WEEKLY]: 13,
133
115
  [RRule.MONTHLY]: 12,
@@ -3,7 +3,7 @@
3
3
  import { DateTime } from "luxon";
4
4
  import React, { useEffect, useReducer } from "react";
5
5
  import RRule, { Frequency, Weekday } from "rrule";
6
- import RecurrenceEndInput, { defaultOccurrences } from "./RecurrenceEndInput";
6
+ import RecurrenceEndInput from "./RecurrenceEndInput";
7
7
  import RecurrenceIntervalAndFrequencyInput from "./RecurrenceIntervalAndFrequencyInput";
8
8
  import RecurrenceMonthlyRepeatByInput from "./RecurrenceMonthlyRepeatByInput";
9
9
  import RecurrenceWeekdaysInput from "./RecurrenceWeekdaysInput";
@@ -16,7 +16,6 @@ import {
16
16
  export interface RecurrenceInputProps {
17
17
  disabled?: boolean;
18
18
  date: string;
19
- minDate?: string;
20
19
  value?: string;
21
20
  onChange: (value: string) => void;
22
21
  initialFrequency?: Frequency;
@@ -25,7 +24,6 @@ export interface RecurrenceInputProps {
25
24
  export function RecurrenceInput({
26
25
  disabled = false,
27
26
  date,
28
- minDate,
29
27
  value,
30
28
  onChange,
31
29
  initialFrequency = Frequency.WEEKLY,
@@ -84,7 +82,6 @@ export function RecurrenceInput({
84
82
  )}
85
83
  <RecurrenceEndInput
86
84
  date={date}
87
- minDate={minDate}
88
85
  frequency={state.freq}
89
86
  until={state.until && DateTime.fromJSDate(state.until).toISODate()}
90
87
  count={state.count}
@@ -133,12 +130,5 @@ const getInitialState = ({
133
130
  byweekday = options.byweekday[0];
134
131
  }
135
132
 
136
- return {
137
- ...options,
138
- count:
139
- options?.count || options.until
140
- ? options.count
141
- : defaultOccurrences[options.freq],
142
- byweekday,
143
- };
133
+ return { ...options, byweekday };
144
134
  };
@@ -2,8 +2,8 @@ import React, { useEffect } from "react";
2
2
  import { DateTime } from "luxon";
3
3
  import { Col, Form, Row } from "react-bootstrap";
4
4
  import { useTranslation } from "react-i18next";
5
- import { RegisterOptions, useFormContext } from "react-hook-form";
6
- import { DATE_FORMAT } from "@licklist/core/dist/Config";
5
+ import { useFormContext } from "react-hook-form";
6
+ import { DATE_FORMAT, TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
7
7
  import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
8
8
 
9
9
  interface RecurrenceIntervalAndFrequencyInputProps {
@@ -13,14 +13,6 @@ interface RecurrenceIntervalAndFrequencyInputProps {
13
13
  startTimeLabel?: string;
14
14
  endDateLabel?: string;
15
15
  endTimeLabel?: string;
16
- startTimeRules?: Pick<
17
- RegisterOptions,
18
- "max" | "min" | "validate" | "required" | "pattern"
19
- >;
20
- endTimeRules?: Pick<
21
- RegisterOptions,
22
- "max" | "min" | "validate" | "required" | "pattern"
23
- >;
24
16
  }
25
17
 
26
18
  function RecurrenceIntervalAndFrequencyInput({
@@ -30,8 +22,6 @@ function RecurrenceIntervalAndFrequencyInput({
30
22
  startTimeLabel,
31
23
  endDateLabel,
32
24
  endTimeLabel,
33
- startTimeRules,
34
- endTimeRules,
35
25
  }: RecurrenceIntervalAndFrequencyInputProps) {
36
26
  const { t } = useTranslation(["Design", "Notification", "App"]);
37
27
 
@@ -40,6 +30,7 @@ function RecurrenceIntervalAndFrequencyInput({
40
30
  formState: { errors },
41
31
  register,
42
32
  trigger,
33
+ setValue,
43
34
  } = useFormContext<RecurringDatePickerInputValues>();
44
35
 
45
36
  const startDate = getValues("startDate");
@@ -56,9 +47,6 @@ function RecurrenceIntervalAndFrequencyInput({
56
47
  }, [startDate]);
57
48
 
58
49
  useEffect(() => {
59
- if (!startTime || !endTime) {
60
- return;
61
- }
62
50
  trigger("endTime");
63
51
  // eslint-disable-next-line react-hooks/exhaustive-deps
64
52
  }, [startTime]);
@@ -130,15 +118,15 @@ function RecurrenceIntervalAndFrequencyInput({
130
118
  </Form.Label>
131
119
  <Form.Control
132
120
  type="time"
133
- {...register("startTime", { required: false, ...startTimeRules })}
121
+ {...register("startTime", { required: false })}
122
+ onChange={({ target: { value } }) => {
123
+ setValue("startTime", `${value}:00`);
124
+ }}
134
125
  placeholder="hh:mm"
135
126
  defaultValue={startTime}
136
127
  disabled={disabled}
137
128
  isInvalid={Boolean(errors.startTime)}
138
129
  />
139
- <Form.Control.Feedback type="invalid">
140
- {errors.startTime?.message}
141
- </Form.Control.Feedback>
142
130
  </Form.Group>
143
131
  </Col>
144
132
 
@@ -153,19 +141,28 @@ function RecurrenceIntervalAndFrequencyInput({
153
141
  if (!startTime || !time) {
154
142
  return true;
155
143
  }
156
- const currentStartTime = DateTime.fromISO(startTime);
157
- const currentEndTime = DateTime.fromISO(time);
144
+ const currentStartTime = DateTime.fromFormat(
145
+ startTime,
146
+ TIME_FULL_FORMAT
147
+ );
148
+
149
+ const currentEndTime = DateTime.fromFormat(
150
+ time,
151
+ TIME_FULL_FORMAT
152
+ );
158
153
 
159
- return currentEndTime?.diff(currentStartTime, ["minutes"])
160
- ?.minutes >= 0
154
+ return currentEndTime?.diff(currentStartTime, ["seconds"])
155
+ ?.seconds > 0
161
156
  ? true
162
157
  : `${t(`Validation:fieldLaterDate`, {
163
158
  attribute: t("Design:endTimeSmall"),
164
159
  min: t("Design:startTimeSmall"),
165
160
  })}`;
166
161
  },
167
- ...endTimeRules,
168
162
  })}
163
+ onChange={({ target: { value } }) => {
164
+ setValue("endTime", `${value}:59`, { shouldValidate: true });
165
+ }}
169
166
  placeholder="hh:mm"
170
167
  defaultValue={endTime}
171
168
  disabled={disabled}
@@ -7,7 +7,6 @@ import { useIntl } from "react-intl";
7
7
  import {
8
8
  DATE_TIME_FORMAT,
9
9
  DATE_TIME_FULL_FORMAT,
10
- TIME_FULL_FORMAT,
11
10
  } from "@licklist/core/dist/Config/Date";
12
11
  import { usePreviousValue } from "@licklist/plugins/dist/hooks/Value/usePreviousValue";
13
12
  import { FormProvider, useForm } from "react-hook-form";
@@ -39,7 +38,6 @@ export interface RecurringDatePickerInputValues {
39
38
  byweekday?: Weekday[];
40
39
  until?: Date;
41
40
  count?: number;
42
- withOutEndDate?: boolean;
43
41
  }
44
42
 
45
43
  export function RecurringDatePickerInput({
@@ -103,11 +101,6 @@ export function RecurringDatePickerInput({
103
101
  })
104
102
  : nextState.byweekday;
105
103
 
106
- const endTimeNextState = nextState?.endTime
107
- ? DateTime.fromISO(nextState?.endTime).toFormat(TIME_FULL_FORMAT)
108
- : "";
109
- const endDateNextState = nextState?.endDate ?? "";
110
-
111
104
  const rrule = RRule.optionsToString({
112
105
  // @TODO: investigate if we need these fields
113
106
  // dtstart: getDateTimeObject(startDate, startTime).toJSDate(),
@@ -122,8 +115,6 @@ export function RecurringDatePickerInput({
122
115
 
123
116
  onChange({
124
117
  ...nextState,
125
- endDate: endDateNextState,
126
- endTime: endTimeNextState,
127
118
  rrule,
128
119
  });
129
120
  };
@@ -15,7 +15,7 @@ export function ReportForm({
15
15
  onSubmit,
16
16
  onHide,
17
17
  hasPermission,
18
- }: ReportFormProps) {
18
+ }: ReportFormProps): JSX.Element {
19
19
  const { t } = useTranslation(["App"]);
20
20
  const fromDateInput = useRef<HTMLInputDateElement | null>(null);
21
21
  const toDateInput = useRef<HTMLInputDateElement | null>(null);
@@ -42,6 +42,7 @@ Default.args = {
42
42
  createdAt: "2022-05-20 18:28:56",
43
43
  updatedAt: "2022-05-20 18:28:56",
44
44
  status: "cart",
45
+ tickets: [],
45
46
  event: {
46
47
  id: 1,
47
48
  name: "testEvent1",
@@ -81,6 +82,7 @@ Default.args = {
81
82
  createdAt: "2022-05-20 18:28:56",
82
83
  updatedAt: "2022-05-20 18:28:56",
83
84
  status: "cart",
85
+ tickets: [],
84
86
  event: {
85
87
  id: 2,
86
88
  name: "testEvent2",
@@ -133,6 +135,7 @@ Default.args = {
133
135
  createdAt: "2022-05-20 18:28:56",
134
136
  updatedAt: "2022-05-20 18:28:56",
135
137
  status: "cart",
138
+ tickets: [],
136
139
  event: {
137
140
  id: 3,
138
141
  name: "testEvent3",
@@ -163,6 +166,7 @@ Default.args = {
163
166
  createdAt: "2022-05-20 18:28:56",
164
167
  updatedAt: "2022-05-20 18:28:56",
165
168
  status: "cart",
169
+ tickets: [],
166
170
  event: {
167
171
  id: 3,
168
172
  name: "testEvent3",
@@ -194,6 +198,7 @@ Default.args = {
194
198
  createdAt: "2022-05-20 18:28:56",
195
199
  updatedAt: "2022-05-20 18:28:56",
196
200
  status: "cart",
201
+ tickets: [],
197
202
  event: {
198
203
  id: 3,
199
204
  name: "testEvent3",
@@ -221,6 +226,7 @@ Default.args = {
221
226
  createdAt: "2022-05-20 18:28:56",
222
227
  updatedAt: "2022-05-20 18:28:56",
223
228
  status: "cart",
229
+ tickets: [],
224
230
  event: {
225
231
  id: 3,
226
232
  name: "testEvent3",
@@ -247,6 +253,7 @@ Default.args = {
247
253
  createdAt: "2022-05-20 18:28:56",
248
254
  updatedAt: "2022-05-20 18:28:56",
249
255
  status: "cart",
256
+ tickets: [],
250
257
  event: {
251
258
  id: 3,
252
259
  name: "testEvent3",
@@ -3,7 +3,6 @@ import clsx from "clsx";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { DateTime } from "luxon";
5
5
  import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
6
- import { TIME_FORMAT } from "@licklist/core/dist/Config";
7
6
  import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
8
7
  import Icon from "../../../../static/Icon";
9
8
 
@@ -21,9 +20,7 @@ export const ResultCard = ({
21
20
  onCardClick,
22
21
  }: ResultCardProps) => {
23
22
  const { t } = useTranslation("Design");
24
- const { id, people, user, status, startDate, products } = order;
25
-
26
- const productList = products.map((product) => product.name)?.join(", ") || "";
23
+ const { id, people, user, status, startDate } = order;
27
24
 
28
25
  const onClick = () => {
29
26
  if (!onCardClick) return;
@@ -58,13 +55,10 @@ export const ResultCard = ({
58
55
  {t("status")}: {t(status)}
59
56
  </p>
60
57
  <p>
61
- {t("date")}: {formatDateStringForEvent(startDate, false)}
58
+ {t("date")}: {formatDateStringForEvent(startDate)}
62
59
  </p>
63
60
  <p>
64
- {t("time")}: {DateTime.fromISO(startDate).toFormat(TIME_FORMAT)}
65
- </p>
66
- <p className="products" title={productList}>
67
- {t("products")}: {productList}
61
+ {t("time")}: {DateTime.fromISO(startDate).toFormat("hh:MM")}
68
62
  </p>
69
63
  </div>
70
64
  </div>
@@ -14,7 +14,6 @@ import { DateTime } from "luxon";
14
14
  import { Col, Form, Row } from "react-bootstrap";
15
15
  import { useFormContext } from "react-hook-form";
16
16
  import { useTranslation } from "react-i18next";
17
- import couponCodeRules from "@licklist/plugins/dist/validation/Rules/couponCodeRules";
18
17
  /* TODO: Show Recurrent date, when reccurent date bugs are fixed */
19
18
  // import { Frequency } from "rrule";
20
19
  // import { RecurrenceInput } from "../../../recurrence-input";
@@ -133,10 +132,6 @@ export const CouponFormControl = ({
133
132
  required: t("Validation:fieldRequired", {
134
133
  attribute: t("Design:code"),
135
134
  }) as string,
136
- pattern: {
137
- message: `${t("Validation:fieldCouponCode")}`,
138
- value: couponCodeRules,
139
- },
140
135
  })}
141
136
  disabled={isLoading}
142
137
  />
@@ -58,6 +58,7 @@ Default.args = {
58
58
  createdAt: "2022-05-20 18:28:56",
59
59
  updatedAt: "2022-05-20 18:28:56",
60
60
  status: "cart",
61
+ tickets: [],
61
62
  orderableType: "event",
62
63
  orderableId: 1,
63
64
  event: {
@@ -95,6 +96,7 @@ Default.args = {
95
96
  createdAt: "2022-05-20 18:28:56",
96
97
  updatedAt: "2022-05-20 18:28:56",
97
98
  status: "cart",
99
+ tickets: [],
98
100
  orderableType: "event",
99
101
  orderableId: 2,
100
102
  event: {
@@ -145,6 +147,7 @@ Default.args = {
145
147
  createdAt: "2022-05-20 18:28:56",
146
148
  updatedAt: "2022-05-20 18:28:56",
147
149
  status: "cart",
150
+ tickets: [],
148
151
  orderableType: "event",
149
152
  orderableId: 3,
150
153
  event: {
@@ -174,6 +177,7 @@ Default.args = {
174
177
  createdAt: "2022-05-20 18:28:56",
175
178
  updatedAt: "2022-05-20 18:28:56",
176
179
  status: "cart",
180
+ tickets: [],
177
181
  orderableType: "event",
178
182
  orderableId: 3,
179
183
  event: {
@@ -203,6 +207,7 @@ Default.args = {
203
207
  createdAt: "2022-05-20 18:28:56",
204
208
  updatedAt: "2022-05-20 18:28:56",
205
209
  status: "cart",
210
+ tickets: [],
206
211
  orderableType: "event",
207
212
  orderableId: 3,
208
213
  event: {
@@ -232,6 +237,7 @@ Default.args = {
232
237
  createdAt: "2022-05-20 18:28:56",
233
238
  updatedAt: "2022-05-20 18:28:56",
234
239
  status: "cart",
240
+ tickets: [],
235
241
  orderableType: "event",
236
242
  orderableId: 3,
237
243
  event: {
@@ -260,6 +266,7 @@ Default.args = {
260
266
  createdAt: "2022-05-20 18:28:56",
261
267
  updatedAt: "2022-05-20 18:28:56",
262
268
  status: "cart",
269
+ tickets: [],
263
270
  orderableType: "event",
264
271
  orderableId: 3,
265
272
  event: {