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

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/iframe/available.svg.js +1 -0
  2. package/dist/assets/iframe/limited.svg.js +1 -0
  3. package/dist/assets/iframe/soldOut.svg.js +1 -0
  4. package/dist/assets/logo/bookedit.svg +9 -11
  5. package/dist/assets/logo/bookedit.svg.js +1 -1
  6. package/dist/assets/logo/favicon.svg +12 -0
  7. package/dist/assets/logo/licklist.svg +0 -2
  8. package/dist/assets/logo/licklist.svg.js +1 -1
  9. package/dist/availability-indicator/AvailabilityIndicator.d.ts +9 -0
  10. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -0
  11. package/dist/availability-indicator/AvailabilityIndicator.js +1 -0
  12. package/dist/availability-indicator/index.d.ts +2 -0
  13. package/dist/availability-indicator/index.d.ts.map +1 -0
  14. package/dist/calendar/Calendar.d.ts +21 -0
  15. package/dist/calendar/Calendar.d.ts.map +1 -0
  16. package/dist/calendar/Calendar.js +1 -0
  17. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  18. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  19. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  20. package/dist/calendar/components/CalendarButtons/index.d.ts.map +1 -0
  21. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +5 -0
  22. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  23. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -0
  24. package/dist/calendar/components/CalendarDates/index.d.ts.map +1 -0
  25. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  26. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  27. package/dist/calendar/components/CalendarSelect/index.d.ts.map +1 -0
  28. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  29. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  30. package/dist/calendar/index.d.ts +4 -0
  31. package/dist/calendar/index.d.ts.map +1 -0
  32. package/dist/calendar/utils/index.d.ts +5 -0
  33. package/dist/calendar/utils/index.d.ts.map +1 -0
  34. package/dist/calendar/utils/index.js +1 -0
  35. package/dist/date-time-button/DateTimeButton.d.ts +7 -1
  36. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  37. package/dist/date-time-button/DateTimeButton.js +1 -1
  38. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  39. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  40. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  41. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  42. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  43. package/dist/events/event-card/EventCard.js +1 -1
  44. package/dist/events/event-card/utils.d.ts +2 -0
  45. package/dist/events/event-card/utils.d.ts.map +1 -1
  46. package/dist/events/event-card/utils.js +1 -1
  47. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  48. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  49. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  50. package/dist/file-upload/FileUpload.js +1 -1
  51. package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
  52. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
  53. package/dist/iframe/activity-card/ActivityCard.js +1 -0
  54. package/dist/iframe/activity-card/index.d.ts +2 -0
  55. package/dist/iframe/activity-card/index.d.ts.map +1 -0
  56. package/dist/iframe/event/index.d.ts +0 -2
  57. package/dist/iframe/event/index.d.ts.map +1 -1
  58. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  59. package/dist/iframe/event/ticket-description/TicketDescription.js +1 -1
  60. package/dist/iframe/index.d.ts +2 -2
  61. package/dist/iframe/index.d.ts.map +1 -1
  62. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  63. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  64. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  65. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  66. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +2 -1
  67. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  68. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  69. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  70. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  71. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  72. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  73. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  74. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  75. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -0
  76. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  77. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  78. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +2 -1
  79. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  80. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  81. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  82. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  83. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  84. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +4 -3
  85. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  86. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  87. package/dist/iframe/order-process/constants.d.ts +1 -0
  88. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  89. package/dist/iframe/order-process/constants.js +1 -1
  90. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  91. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  92. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  93. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  94. package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
  95. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  96. package/dist/iframe/payment/order-items-table/types/index.js +1 -0
  97. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
  98. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
  99. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
  100. package/dist/index.d.ts +3 -0
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  104. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  105. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  106. package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
  107. package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
  108. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  109. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
  110. package/dist/number-of-people-input/components/index.d.ts +2 -0
  111. package/dist/number-of-people-input/components/index.d.ts.map +1 -0
  112. package/dist/number-of-people-input/index.d.ts +3 -0
  113. package/dist/number-of-people-input/index.d.ts.map +1 -0
  114. package/dist/product-set/control/ProductSetControl.d.ts +2 -2
  115. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  116. package/dist/product-set/control/ProductSetControl.js +1 -1
  117. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  118. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  119. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  120. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  121. package/dist/product-set/form/ProductsControl.d.ts +3 -1
  122. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  123. package/dist/product-set/form/ProductsControl.js +1 -1
  124. package/dist/product-set/product/ProductControl.d.ts +2 -1
  125. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  126. package/dist/product-set/product/ProductControl.js +1 -1
  127. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  128. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  129. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  130. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  131. package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
  132. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  133. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  134. package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
  135. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  136. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  137. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +4 -1
  138. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  139. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  140. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -0
  141. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  142. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  143. package/dist/report/form/ReportForm.d.ts.map +1 -1
  144. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  145. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  146. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  147. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  148. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
  149. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  150. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  151. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  152. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  153. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  154. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  155. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  156. package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
  157. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  158. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  159. package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  160. package/{src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → dist/styles/activity-card/ListActivitiesCard.scss} +2 -1
  161. package/dist/styles/activity-card/_index.scss +2 -0
  162. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  163. package/dist/styles/availability-indicator/_index.scss +1 -0
  164. package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  165. package/dist/styles/date-time-button/_index.scss +1 -0
  166. package/dist/styles/events/EventCard.scss +10 -3
  167. package/dist/styles/form/CustomCheckbox.scss +5 -0
  168. package/dist/styles/header/Header.scss +0 -4
  169. package/dist/styles/iframe-events/Card.scss +1 -0
  170. package/dist/styles/notification/Notification.scss +4 -0
  171. package/dist/styles/packages.scss +3 -1
  172. package/dist/styles/resources-blocking/_index.scss +5 -0
  173. package/dist/styles/sales/BookingResults.scss +9 -1
  174. package/dist/styles/themes/bookedit/_index.scss +1 -0
  175. package/dist/types/iframe.d.ts +1 -0
  176. package/dist/types/iframe.d.ts.map +1 -1
  177. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  178. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  179. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  180. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  181. package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
  182. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
  183. package/dist/zone/form/components/GameDurationControl.js +1 -0
  184. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  185. package/dist/zone/form/components/ZoneControl.js +1 -1
  186. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  187. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  188. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  189. package/dist/zone/form/utils/dates.js +1 -1
  190. package/package.json +3 -3
  191. package/src/assets/logo/bookedit.svg +9 -11
  192. package/src/assets/logo/favicon.svg +12 -0
  193. package/src/assets/logo/licklist.svg +0 -2
  194. package/src/availability-indicator/AvailabilityIndicator.tsx +59 -0
  195. package/src/availability-indicator/index.ts +1 -0
  196. package/src/calendar/Calendar.stories.tsx +33 -0
  197. package/src/calendar/Calendar.tsx +46 -0
  198. package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
  199. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +24 -19
  200. package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  201. package/src/calendar/index.ts +3 -0
  202. package/src/calendar/utils/index.ts +28 -0
  203. package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
  204. package/src/date-time-button/DateTimeButton.tsx +19 -22
  205. package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
  206. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -12
  207. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  208. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
  209. package/src/events/event-card/EventCard.tsx +6 -2
  210. package/src/events/event-card/utils.ts +13 -0
  211. package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
  212. package/src/file-upload/FileUpload.tsx +3 -1
  213. package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
  214. package/src/iframe/activity-card/ActivityCard.tsx +77 -0
  215. package/src/iframe/activity-card/index.ts +1 -0
  216. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -2
  217. package/src/iframe/event/index.ts +0 -7
  218. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +8 -2
  219. package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -2
  220. package/src/iframe/index.ts +1 -3
  221. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +4 -3
  222. package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -1
  223. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
  224. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
  225. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +17 -8
  226. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +1 -15
  227. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +5 -0
  228. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
  229. package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
  230. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +62 -32
  231. package/src/iframe/order-process/constants.ts +1 -0
  232. package/src/iframe/page/Page.stories.tsx +2 -2
  233. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
  234. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
  235. package/src/iframe/payment/order-items-table/types/index.ts +18 -1
  236. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
  237. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  238. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  239. package/src/index.ts +3 -0
  240. package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
  241. package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  242. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
  243. package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  244. package/src/number-of-people-input/components/index.ts +1 -0
  245. package/src/number-of-people-input/index.ts +2 -0
  246. package/src/product-set/control/ProductSetControl.stories.tsx +0 -2
  247. package/src/product-set/control/ProductSetControl.tsx +36 -10
  248. package/src/product-set/control/ProductSetRecurrenceControl.tsx +8 -4
  249. package/src/product-set/form/ProductCategoriesControl.tsx +2 -1
  250. package/src/product-set/form/ProductSetForm.stories.tsx +3 -10
  251. package/src/product-set/form/ProductsControl.tsx +10 -0
  252. package/src/product-set/product/ProductControl.tsx +28 -1
  253. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  254. package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
  255. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -30
  256. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  257. package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
  258. package/src/recurrence-input/RecurrenceInput.tsx +12 -2
  259. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +24 -21
  260. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +9 -0
  261. package/src/report/form/ReportForm.tsx +1 -1
  262. package/src/sales/booking/results/BookingResults.stories.tsx +0 -7
  263. package/src/sales/booking/results/components/ResultCard.tsx +9 -3
  264. package/src/sales/coupon/control/CouponFormControl.tsx +5 -0
  265. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
  266. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
  267. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +31 -28
  268. package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
  269. package/src/static/RestrictedAccess.tsx +1 -1
  270. package/src/static/form-number-input/FormNumberInput.tsx +8 -1
  271. package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  272. package/{dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → src/styles/activity-card/ListActivitiesCard.scss} +2 -1
  273. package/src/styles/activity-card/_index.scss +2 -0
  274. package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  275. package/src/styles/availability-indicator/_index.scss +1 -0
  276. package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  277. package/src/styles/date-time-button/_index.scss +1 -0
  278. package/src/styles/events/EventCard.scss +10 -3
  279. package/src/styles/form/CustomCheckbox.scss +5 -0
  280. package/src/styles/header/Header.scss +0 -4
  281. package/src/styles/iframe-events/Card.scss +1 -0
  282. package/src/styles/notification/Notification.scss +4 -0
  283. package/src/styles/packages.scss +3 -1
  284. package/src/styles/resources-blocking/_index.scss +5 -0
  285. package/src/styles/sales/BookingResults.scss +9 -1
  286. package/src/styles/themes/bookedit/_index.scss +1 -0
  287. package/src/types/iframe.ts +1 -0
  288. package/src/typings.d.ts +11 -0
  289. package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
  290. package/src/zone/form/components/AvailableTimesControl.tsx +4 -9
  291. package/src/zone/form/components/GameDurationControl.tsx +46 -0
  292. package/src/zone/form/components/ZoneControl.tsx +2 -0
  293. package/src/zone/form/components/ZoneRecurrencesControl.tsx +27 -35
  294. package/src/zone/form/utils/dates.ts +29 -36
  295. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
  296. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
  297. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
  298. package/dist/iframe/activity-cards/index.d.ts +0 -3
  299. package/dist/iframe/activity-cards/index.d.ts.map +0 -1
  300. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
  301. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
  302. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
  303. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
  304. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
  305. package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
  306. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  307. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  308. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  309. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
  310. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
  311. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
  312. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
  313. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
  314. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
  315. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
  316. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  317. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
  318. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
  319. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  320. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  321. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
  322. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  323. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  324. package/dist/iframe/event/event-calendar/index.d.ts +0 -4
  325. package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
  326. package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
  327. package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
  328. package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
  329. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
  330. package/dist/iframe/event/event-calendar/utils/index.js +0 -1
  331. package/dist/iframe/event/event-details/EventDetails.d.ts +0 -10
  332. package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
  333. package/dist/iframe/event/event-details/EventDetails.js +0 -1
  334. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
  335. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
  336. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
  337. package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
  338. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
  339. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
  340. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
  341. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
  342. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
  343. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
  344. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  345. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
  346. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  347. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
  348. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
  349. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
  350. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
  351. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
  352. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
  353. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
  354. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
  355. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
  356. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
  357. package/dist/iframe/event/event-details/index.d.ts +0 -2
  358. package/dist/iframe/event/event-details/index.d.ts.map +0 -1
  359. package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
  360. package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
  361. package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
  362. package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
  363. package/dist/iframe/event/event-details/utils/routes.js +0 -1
  364. package/dist/styles/iframe-customers-journey/_index.scss +0 -3
  365. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
  366. package/src/iframe/activity-cards/index.ts +0 -2
  367. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
  368. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
  369. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
  370. package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
  371. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
  372. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
  373. package/src/iframe/event/event-calendar/index.ts +0 -6
  374. package/src/iframe/event/event-calendar/types/index.ts +0 -6
  375. package/src/iframe/event/event-calendar/utils/index.ts +0 -11
  376. package/src/iframe/event/event-details/EventDetails.stories.tsx +0 -187
  377. package/src/iframe/event/event-details/EventDetails.tsx +0 -92
  378. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
  379. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
  380. package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
  381. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
  382. package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
  383. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
  384. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
  385. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
  386. package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
  387. package/src/iframe/event/event-details/index.ts +0 -1
  388. package/src/iframe/event/event-details/utils/index.ts +0 -1
  389. package/src/iframe/event/event-details/utils/routes.ts +0 -6
  390. package/src/styles/iframe-customers-journey/_index.scss +0 -3
  391. /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  392. /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  393. /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  394. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
  395. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
  396. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  397. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
  398. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  399. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  400. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  401. /package/dist/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  402. /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  403. /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  404. /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  405. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
  406. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
  407. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
  408. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  409. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -100,18 +100,18 @@ export const PaymentPage = ({
100
100
  );
101
101
  }
102
102
 
103
- const orderTotalAmounByFormValues = cartSumByOrderProducts(
103
+ const orderTotalAmountByFormValues = cartSumByOrderProducts(
104
104
  bookingSummaryProps && bookingSummaryProps?.formValues
105
105
  ? Object.values(bookingSummaryProps?.formValues)
106
106
  : undefined
107
107
  );
108
108
 
109
- // User can fill promocode only in iframe appcliation.
109
+ // User can fill promo code only in iframe application.
110
110
  // It didn't possible via payment link. This check will
111
111
  // be applied when there are no metadata and in case when
112
112
  // orderValues sum is greater than amount in order.
113
113
  const isCalculatedAmountGreaterThanOrderAmount =
114
- orderTotalAmounByFormValues > data?.amount;
114
+ orderTotalAmountByFormValues > data?.amount;
115
115
 
116
116
  return (
117
117
  <Page
@@ -164,7 +164,7 @@ export const PaymentPage = ({
164
164
  <SummaryTotalBlock
165
165
  label={t("total")}
166
166
  amount={
167
- orderTotalAmounByFormValues +
167
+ orderTotalAmountByFormValues +
168
168
  (bookingSummaryProps?.transactionFee || 0)
169
169
  }
170
170
  />
package/src/index.ts CHANGED
@@ -39,3 +39,6 @@ export * from "./radio-card";
39
39
  export * from "./image-radio-input";
40
40
  export * from "./sorting-select";
41
41
  export * from "./date-time-button";
42
+ export * from "./calendar";
43
+ export * from "./availability-indicator";
44
+ export * from "./number-of-people-input";
@@ -314,13 +314,38 @@ export const EmailTemplateControl = React.forwardRef(
314
314
  <Row className="mb-4">
315
315
  <Form.Group as={Col}>
316
316
  <Form.Label>{t("Design:emailBody")}</Form.Label>
317
- <div className="email-editor">
317
+
318
+ <div className="alert alert-warning" role="alert">
319
+ Due to the mail services limitations on the length of the email
320
+ body that can be sent or received - maximum length is set to
321
+ 65,535 characters.
322
+ </div>
323
+
324
+ <div className={`email-editor ${errors.body && "is-invalid"}`}>
318
325
  <EmailEditor
319
326
  ref={ref}
320
327
  onReady={onReadyEditor}
321
328
  style={{ height: "50rem" }}
322
329
  />
330
+
331
+ <input
332
+ type="hidden"
333
+ name="body"
334
+ {...register("body", {
335
+ maxLength: {
336
+ value: 65535,
337
+ message: t("Validation:fieldMaxLength", {
338
+ attribute: t("body"),
339
+ max: 65535,
340
+ }) as string,
341
+ },
342
+ })}
343
+ />
323
344
  </div>
345
+
346
+ <Form.Control.Feedback type="invalid">
347
+ {errors.body?.message}
348
+ </Form.Control.Feedback>
324
349
  </Form.Group>
325
350
  </Row>
326
351
  <Row>
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect } from "react";
2
2
  import { useFormContext, Controller } from "react-hook-form";
3
- import { RenderNumberOfPeopleInputComponent } from "./component";
3
+ import { RenderNumberOfPeopleInputComponent } from "./components";
4
4
 
5
5
  const NUMBER_OF_PEOPLE = "numberOfPeople";
6
6
 
@@ -0,0 +1,92 @@
1
+ import React, { useState } from "react";
2
+ import { Meta } from "@storybook/react";
3
+ import { RenderNumberOfPeopleInputComponent } from "./RenderNumberOfPeopleInputComponent";
4
+
5
+ export default {
6
+ title: "NumberOfPeopleInput/RenderNumberOfPeopleInputComponent",
7
+ component: RenderNumberOfPeopleInputComponent,
8
+ } as Meta;
9
+
10
+ const productCategories = [
11
+ {
12
+ id: 1,
13
+ name: "Early Bird General Admission",
14
+ products: [
15
+ {
16
+ id: 7,
17
+ name: "Beer",
18
+ description: `Ticket is valid for students and non students.
19
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
20
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
21
+ minQuantity: 1,
22
+ maxQuantity: 10,
23
+ price: 1,
24
+ },
25
+ {
26
+ id: 8,
27
+ name: "Wine",
28
+ description: `Ticket is valid for students and non students.
29
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
30
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
31
+ minQuantity: 1,
32
+ maxQuantity: 10,
33
+ price: 1,
34
+ isRequired: true,
35
+ },
36
+ ],
37
+ },
38
+ {
39
+ id: 2,
40
+ name: "Nice",
41
+ products: [
42
+ {
43
+ id: 3,
44
+ name: "Beer",
45
+ description: `Ticket is valid for students and non students.
46
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
47
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
48
+ minQuantity: 1,
49
+ maxQuantity: 10,
50
+ price: 1,
51
+ },
52
+ {
53
+ id: 5,
54
+ name: "Wine",
55
+ description: `Ticket is valid for students and non students.
56
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
57
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
58
+ minQuantity: 1,
59
+ maxQuantity: 10,
60
+ price: 1,
61
+ },
62
+ ],
63
+ },
64
+ ];
65
+
66
+ const menus = [
67
+ {
68
+ id: 1,
69
+ name: "Menu 1",
70
+ menuSteps: [
71
+ {
72
+ id: 1,
73
+ name: "Burger",
74
+ productCategories: productCategories,
75
+ },
76
+ ],
77
+ },
78
+ ];
79
+
80
+ export function Default() {
81
+ const [peopleAmount, setPeopleAmount] = useState(0);
82
+
83
+ return (
84
+ <div>
85
+ <RenderNumberOfPeopleInputComponent
86
+ peopleAmount={peopleAmount}
87
+ onChangePeopleAmount={(amount) => setPeopleAmount(amount)}
88
+ peopleAmountError={false}
89
+ />
90
+ </div>
91
+ );
92
+ }
@@ -1,14 +1,14 @@
1
1
  import React from "react";
2
2
  import { useTranslation, Trans } from "react-i18next";
3
3
  import clsx from "clsx";
4
- import { NumberInput } from "../../../../../order-process/components/CategoryProduct/components/NumberInput";
4
+ import { NumberInput } from "../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput";
5
5
 
6
6
  const NUMBER_OF_PEOPLE = "numberOfPeople";
7
7
 
8
- interface RenderNumberOfPeopleInputComponentProps {
8
+ export interface RenderNumberOfPeopleInputComponentProps {
9
9
  onChangePeopleAmount: (value: number) => void;
10
10
  peopleAmount: number;
11
- peopleAmountError: boolean;
11
+ peopleAmountError?: boolean;
12
12
  }
13
13
 
14
14
  export const RenderNumberOfPeopleInputComponent = ({
@@ -0,0 +1 @@
1
+ export * from "./RenderNumberOfPeopleInputComponent";
@@ -0,0 +1,2 @@
1
+ export * from "./NumberOfPeopleInput";
2
+ export * from "./components";
@@ -67,7 +67,6 @@ Empty.args = {
67
67
  type: "sale",
68
68
  termsAndConditions: "",
69
69
  operationalCost: OPERATIONAL_COST_CUSTOMER,
70
- isDefault: false,
71
70
  menuRecurrence: {
72
71
  id: 38,
73
72
  menuId: 257,
@@ -87,7 +86,6 @@ Default.args = {
87
86
  type: "sale",
88
87
  termsAndConditions: "",
89
88
  operationalCost: OPERATIONAL_COST_CUSTOMER,
90
- isDefault: true,
91
89
  menuRecurrence: {
92
90
  id: 38,
93
91
  menuId: 257,
@@ -7,8 +7,13 @@ import {
7
7
  OPERATIONAL_COST_CUSTOMER,
8
8
  OPERATIONAL_COST_PROVIDER,
9
9
  OPERATIONAL_COST_TYPES,
10
+ RELY_ON_PEOPLE_QUANTITY,
11
+ RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY,
12
+ RELY_ON_PEOPLE_PRODUCT_QUANTITY,
10
13
  OperationalCostType,
11
14
  ProductSetType,
15
+ RELY_ON_PEOPLE_TYPES,
16
+ RelyOnPeopleType,
12
17
  } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
13
18
  import { useId } from "@react-aria/utils";
14
19
  import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
@@ -34,6 +39,12 @@ const OPERATIONAL_COST_TITLES = {
34
39
  [OPERATIONAL_COST_CUSTOMER]: "operationalCostCustomer",
35
40
  } as const;
36
41
 
42
+ const RELY_ON_PEOPLE_TYPE_TITLES = {
43
+ [RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY]: "peopleProductCapacityQuantity",
44
+ [RELY_ON_PEOPLE_PRODUCT_QUANTITY]: "peopleProductQuantity",
45
+ [RELY_ON_PEOPLE_QUANTITY]: "peopleQuantity",
46
+ };
47
+
37
48
  export interface TemplateItem {
38
49
  id: string;
39
50
  value: EmailTemplate | SmsTemplate;
@@ -45,9 +56,9 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
45
56
  type: ProductSetType;
46
57
  termsAndConditions: string;
47
58
  thankYouPageUrl: string;
48
- isDefault: boolean;
49
59
  operationalCost: OperationalCostType;
50
60
  productGroups?: SelectItem[];
61
+ relyOnPeopleType?: RelyOnPeopleType | null;
51
62
  fieldSetId?: number;
52
63
  steps?: Step[];
53
64
  emailTemplates?: TemplateItem[];
@@ -100,6 +111,7 @@ export function ProductSetControl({
100
111
 
101
112
  const nameId = useId();
102
113
  const termsAndConditionsId = useId();
114
+ const relyOnPeopleTypeId = useId();
103
115
 
104
116
  return (
105
117
  <Row
@@ -176,15 +188,6 @@ export function ProductSetControl({
176
188
  </Form.Group>
177
189
  )}
178
190
  /> */}
179
- {/* <Form.Check
180
- {...register("isDefault")}
181
- id="isDefaultId"
182
- name="isDefault"
183
- label={t("Design:setAsDraft")}
184
- custom
185
- className="is-default-checkbox"
186
- disabled={isLoading}
187
- /> */}
188
191
 
189
192
  <Form.Group>
190
193
  <Form.Label className="mb-0">
@@ -220,6 +223,29 @@ export function ProductSetControl({
220
223
  </Form.Control>
221
224
  </Form.Group>
222
225
 
226
+ <Form.Group controlId={relyOnPeopleTypeId}>
227
+ <Form.Label>{t("peopleQuantityType")}</Form.Label>
228
+ <Form.Control
229
+ {...register("relyOnPeopleType")}
230
+ as="select"
231
+ defaultValue={null}
232
+ >
233
+ <option value="">{t("notRequired")}</option>
234
+ {Object.keys(RELY_ON_PEOPLE_TYPES).map((relyOnPeopleType) => (
235
+ <option
236
+ value={RELY_ON_PEOPLE_TYPES[relyOnPeopleType]}
237
+ key={RELY_ON_PEOPLE_TYPES[relyOnPeopleType]}
238
+ >
239
+ {t(
240
+ RELY_ON_PEOPLE_TYPE_TITLES[
241
+ RELY_ON_PEOPLE_TYPES[relyOnPeopleType]
242
+ ]
243
+ )}
244
+ </option>
245
+ ))}
246
+ </Form.Control>
247
+ </Form.Group>
248
+
223
249
  <Form.Group controlId={termsAndConditionsId}>
224
250
  <Form.Label>{t("Design:termsAndConditions")}</Form.Label>
225
251
  <Form.Control
@@ -56,10 +56,14 @@ export const ProductSetRecurrenceControl = ({
56
56
  {formatDate(menuRecurrence.startDate, {
57
57
  dateStyle: "medium",
58
58
  })}{" "}
59
- -{" "}
60
- {formatDate(menuRecurrence.endDate, {
61
- dateStyle: "medium",
62
- })}
59
+ {menuRecurrence.endDate && (
60
+ <>
61
+ {"- "}
62
+ {formatDate(menuRecurrence.endDate, {
63
+ dateStyle: "medium",
64
+ })}
65
+ </>
66
+ )}
63
67
  </span>
64
68
 
65
69
  <div
@@ -48,7 +48,6 @@ const getCategoryDefaultValue = (
48
48
  maxSubItems: null,
49
49
  quantityType: QUANTITY_TYPE_STANDARD,
50
50
  type: categoryType,
51
- isRelyOnPeople: categoryType === CATEGORY_TYPE_TICKETS,
52
51
  isTimeRelated: false,
53
52
  collectUserInfo: false,
54
53
  hasTicket: categoryType === CATEGORY_TYPE_TICKETS,
@@ -72,6 +71,7 @@ export function ProductCategoriesControl({
72
71
  providerHasMap,
73
72
  expandedProductCategories,
74
73
  setExpandedProductCategories,
74
+ zones,
75
75
  } = useContext(ProductSetLoadingContext);
76
76
  const form = useFormContext<ProductSetFormValues>();
77
77
  const [isSelectCategoryVisible, setIsSelectCategoryVisible] = useState(false);
@@ -287,6 +287,7 @@ export function ProductCategoriesControl({
287
287
  quantityType={productCategory.quantityType}
288
288
  hasTicket={productCategory?.hasTicket}
289
289
  stepIndex={stepIndex}
290
+ zones={zones}
290
291
  productCategoryIndex={index}
291
292
  categoryType={productCategory.type}
292
293
  />
@@ -11,6 +11,7 @@ import {
11
11
  import {
12
12
  OPERATIONAL_COST_CUSTOMER,
13
13
  OPERATIONAL_COST_PROVIDER,
14
+ RELY_ON_PEOPLE_PRODUCT_QUANTITY,
14
15
  } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
15
16
  import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
16
17
  import { ProductSetForm, ProductSetFormProps } from "./ProductSetForm";
@@ -74,6 +75,7 @@ Default.args = {
74
75
  {
75
76
  createdAt: "2023-05-08T15:55:28.000+03:00",
76
77
  deletedAt: null,
78
+ defaultDuration: 30,
77
79
  description: "Zone description 2",
78
80
  id: 2,
79
81
  image: null,
@@ -101,8 +103,8 @@ Default.args = {
101
103
  name: "Example",
102
104
  type: "sale",
103
105
  termsAndConditions: "",
104
- isDefault: true,
105
106
  operationalCost: OPERATIONAL_COST_CUSTOMER,
107
+ relyOnPeopleType: RELY_ON_PEOPLE_PRODUCT_QUANTITY,
106
108
  steps: [
107
109
  {
108
110
  id: 1,
@@ -114,7 +116,6 @@ Default.args = {
114
116
  minSubItems: 1,
115
117
  maxSubItems: 10,
116
118
  quantityType: "constant",
117
- isRelyOnPeople: false,
118
119
  isTimeRelated: false,
119
120
  hasTicket: false,
120
121
  allowDeposits: false,
@@ -183,7 +184,6 @@ Default.args = {
183
184
  minSubItems: 0,
184
185
  maxSubItems: 0,
185
186
  quantityType: "recharging",
186
- isRelyOnPeople: false,
187
187
  isTimeRelated: false,
188
188
  hasTicket: false,
189
189
  allowDeposits: false,
@@ -202,7 +202,6 @@ Default.args = {
202
202
  minSubItems: 0,
203
203
  maxSubItems: 0,
204
204
  quantityType: "recharging",
205
- isRelyOnPeople: false,
206
205
  isTimeRelated: false,
207
206
  hasTicket: false,
208
207
  allowDeposits: false,
@@ -288,7 +287,6 @@ Default.args = {
288
287
  minSubItems: 0,
289
288
  maxSubItems: null,
290
289
  quantityType: "recharging",
291
- isRelyOnPeople: false,
292
290
  isTimeRelated: false,
293
291
  hasTicket: false,
294
292
  allowDeposits: false,
@@ -849,7 +847,6 @@ Empty.args = {
849
847
  name: "Example",
850
848
  type: "sale",
851
849
  termsAndConditions: "",
852
- isDefault: true,
853
850
  operationalCost: OPERATIONAL_COST_PROVIDER,
854
851
  steps: [],
855
852
  },
@@ -862,7 +859,6 @@ ServerErrors.args = {
862
859
  name: "",
863
860
  type: "sale",
864
861
  termsAndConditions: "",
865
- isDefault: true,
866
862
  operationalCost: OPERATIONAL_COST_PROVIDER,
867
863
  steps: [],
868
864
  },
@@ -876,7 +872,6 @@ Valid.args = {
876
872
  name: "Example",
877
873
  type: "sale",
878
874
  termsAndConditions: "",
879
- isDefault: true,
880
875
  operationalCost: OPERATIONAL_COST_CUSTOMER,
881
876
  menuRecurrences: [
882
877
  {
@@ -897,7 +892,6 @@ Valid.args = {
897
892
  minSubItems: 0,
898
893
  maxSubItems: 0,
899
894
  quantityType: "recharging",
900
- isRelyOnPeople: false,
901
895
  isTimeRelated: false,
902
896
  hasTicket: false,
903
897
  allowDeposits: false,
@@ -1112,7 +1106,6 @@ Valid.args = {
1112
1106
  minSubItems: 0,
1113
1107
  maxSubItems: 0,
1114
1108
  quantityType: "recharging",
1115
- isRelyOnPeople: false,
1116
1109
  isTimeRelated: false,
1117
1110
  hasTicket: false,
1118
1111
  allowDeposits: false,
@@ -14,6 +14,7 @@ import { generateUuid } from "@licklist/core/dist/Services";
14
14
  import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
15
15
 
16
16
  import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
17
+ import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
17
18
  import { ProductControl, ProductControlProps, ProductSetFormValues } from "..";
18
19
  import { SortableTree } from "../../sortable-tree";
19
20
  import { CreateProductSetItem } from "../item/CreateProductSetItem";
@@ -32,6 +33,7 @@ interface ProductsControlProps extends WithIsLoading {
32
33
  productCategoryIndex: number;
33
34
  hasTicket?: boolean;
34
35
  categoryType: CategoryType;
36
+ zones?: Zone[];
35
37
  }
36
38
 
37
39
  const getDefaultProductValue = (sort: number): Product => ({
@@ -74,6 +76,7 @@ export function ProductsControl({
74
76
  productCategoryIndex,
75
77
  hasTicket,
76
78
  categoryType,
79
+ zones,
77
80
  }: ProductsControlProps) {
78
81
  const { t } = useTranslation("Design");
79
82
  const form = useFormContext<ProductSetFormValues>();
@@ -89,6 +92,12 @@ export function ProductsControl({
89
92
  getValues,
90
93
  } = form;
91
94
 
95
+ const zoneId = watch(
96
+ `steps.${stepIndex}.productCategories.${productCategoryIndex}.zoneId`
97
+ );
98
+
99
+ const catergoryZone = zones?.find((zone) => zone.id === Number(zoneId));
100
+
92
101
  const productControlFieldName =
93
102
  `steps.${stepIndex}.productCategories.${productCategoryIndex}.products` as const;
94
103
 
@@ -245,6 +254,7 @@ export function ProductsControl({
245
254
  onProductNameChange={onChange}
246
255
  hasTicket={hasTicket}
247
256
  categoryType={categoryType}
257
+ zoneDuration={catergoryZone?.defaultDuration}
248
258
  />
249
259
  }
250
260
  onDelete={() => onProductRemove(index)}
@@ -113,6 +113,7 @@ export interface ProductControlProps<T>
113
113
  productName: string;
114
114
  hasTicket?: boolean;
115
115
  categoryType?: CategoryType;
116
+ zoneDuration?: number;
116
117
  }
117
118
 
118
119
  export function ProductControl<T extends FormValues>({
@@ -126,6 +127,7 @@ export function ProductControl<T extends FormValues>({
126
127
  productName,
127
128
  hasTicket,
128
129
  categoryType,
130
+ zoneDuration,
129
131
  }: ProductControlProps<T>) {
130
132
  const {
131
133
  register,
@@ -190,6 +192,16 @@ export function ProductControl<T extends FormValues>({
190
192
  [handleImageUploading]
191
193
  );
192
194
 
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
+
193
205
  const onImageRemove = useCallback(
194
206
  (id, path) => {
195
207
  handleImageRemove(String(id), path);
@@ -372,6 +384,14 @@ export function ProductControl<T extends FormValues>({
372
384
  <FormNumberInput
373
385
  fieldName={`${fieldNamePrefix}.capacity`}
374
386
  label={t("capacity")}
387
+ rules={{
388
+ min: {
389
+ value: 1,
390
+ message: t("Validation:fieldRequired", {
391
+ attribute: t("capacity"),
392
+ }) as string,
393
+ },
394
+ }}
375
395
  />
376
396
  </Col>
377
397
  </Row>
@@ -383,7 +403,11 @@ export function ProductControl<T extends FormValues>({
383
403
  <FormNumberInput
384
404
  fieldName={`${fieldNamePrefix}.capacity`}
385
405
  label={t("capacity")}
406
+ onChange={onChangeGameCapacity}
386
407
  rules={{
408
+ required: t("Validation:fieldRequired", {
409
+ attribute: t("capacity"),
410
+ }) as string,
387
411
  min: {
388
412
  value: 1,
389
413
  message: t("Validation:fieldRequired", {
@@ -398,10 +422,13 @@ export function ProductControl<T extends FormValues>({
398
422
  fieldName={`${fieldNamePrefix}.duration`}
399
423
  label={t("durationMinutes")}
400
424
  rules={{
425
+ required: t("Validation:fieldRequired", {
426
+ attribute: t("capacity"),
427
+ }) as string,
401
428
  min: {
402
429
  value: 1,
403
430
  message: t("Validation:fieldRequired", {
404
- attribute: t("duration"),
431
+ attribute: t("capacity"),
405
432
  }) as string,
406
433
  },
407
434
  }}
@@ -66,7 +66,7 @@ export const ProductDurationControl = <T,>({
66
66
  },
67
67
  min: {
68
68
  value: 1,
69
- message: t("Validation:fieldMin", {
69
+ message: t("Validation:fieldMinNumber", {
70
70
  attribute: t("duration"),
71
71
  }),
72
72
  },
@@ -26,7 +26,6 @@ const categoryMock: Partial<ProductCategoryControlValues> = {
26
26
  minSubItems: 0,
27
27
  maxSubItems: 0,
28
28
  quantityType: QUANTITY_TYPE_STANDARD,
29
- isRelyOnPeople: false,
30
29
  isTimeRelated: false,
31
30
  hasTicket: false,
32
31
  allowDeposits: false,
@@ -28,7 +28,6 @@ export interface ProductCategoryControlValues extends FormValues {
28
28
  maxSubItems: number | null;
29
29
  quantityType: QuantityType;
30
30
  type: CategoryType;
31
- isRelyOnPeople: boolean;
32
31
  isTimeRelated: boolean;
33
32
  collectUserInfo: boolean;
34
33
  hasTicket: boolean;
@@ -97,7 +96,6 @@ export function ProductCategoryControl({
97
96
  const minSubItemsId = useId();
98
97
  const maxSubItemsId = useId();
99
98
  const quantityType = useId();
100
- const isRelyOnPeopleId = useId();
101
99
  const isTimeRelatedId = useId();
102
100
  const collectUserInfoId = useId();
103
101
  const hasTicketId = useId();
@@ -332,7 +330,7 @@ export function ProductCategoryControl({
332
330
  <Row>
333
331
  <Col>
334
332
  <Form.Group controlId={zoneId}>
335
- <Form.Label>Zone</Form.Label>
333
+ <Form.Label>{t("Design:zone")}</Form.Label>
336
334
  <Controller
337
335
  control={control}
338
336
  name={`${fieldNamePrefix}.zoneId`}
@@ -360,12 +358,6 @@ export function ProductCategoryControl({
360
358
  attribute: t("zone"),
361
359
  }),
362
360
  },
363
- validate: (value) => {
364
- if (value) return true;
365
- return t("Validation:fieldRequired", {
366
- attribute: t("zone"),
367
- }) as string;
368
- },
369
361
  }}
370
362
  />
371
363
  <Form.Control.Feedback type="invalid">
@@ -470,27 +462,6 @@ export function ProductCategoryControl({
470
462
  </Form.Group>
471
463
  )}
472
464
 
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>
494
465
  {!category.hasTicket && (
495
466
  <Form.Group
496
467
  controlId={isTimeRelatedId}
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { ReactElement } 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<JSX.Element[]>((acc, field) => {
16
+ const fields = fieldNames.reduce<ReactElement[]>((acc, field) => {
17
17
  const value = values?.[field];
18
18
  if (!value) return acc;
19
19