@licklist/design 0.44.486-dev.4 → 0.44.486-dev.41

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 (303) 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 +20 -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 +6 -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/event-venue-map/hooks/useImage.d.ts.map +1 -1
  41. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  42. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  43. package/dist/file-upload/FileUpload.js +1 -1
  44. package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
  45. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
  46. package/dist/iframe/activity-card/ActivityCard.js +1 -0
  47. package/dist/iframe/activity-card/index.d.ts +2 -0
  48. package/dist/iframe/activity-card/index.d.ts.map +1 -0
  49. package/dist/iframe/event/index.d.ts +0 -1
  50. package/dist/iframe/event/index.d.ts.map +1 -1
  51. package/dist/iframe/index.d.ts +2 -2
  52. package/dist/iframe/index.d.ts.map +1 -1
  53. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  54. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  55. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  56. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  57. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -0
  58. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  59. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  60. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  61. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  62. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  63. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  64. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  65. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  66. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +2 -1
  67. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  68. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  69. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  70. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  71. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  72. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +4 -3
  73. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  74. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  75. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  76. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  77. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  78. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  79. package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
  80. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  81. package/dist/iframe/payment/order-items-table/types/index.js +1 -0
  82. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
  83. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
  84. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
  85. package/dist/index.d.ts +2 -0
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +1 -1
  88. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  89. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  90. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  91. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  92. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  93. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  94. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  95. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  96. package/dist/product-set/form/ProductsControl.d.ts +3 -1
  97. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  98. package/dist/product-set/form/ProductsControl.js +1 -1
  99. package/dist/product-set/product/ProductControl.d.ts +2 -1
  100. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  101. package/dist/product-set/product/ProductControl.js +1 -1
  102. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  103. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  104. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  105. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  106. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  107. package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
  108. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  109. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  110. package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
  111. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  112. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  113. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +5 -1
  114. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  115. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  116. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +3 -1
  117. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  118. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  119. package/dist/report/form/ReportForm.d.ts.map +1 -1
  120. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  121. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  122. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  123. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  124. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  125. package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
  126. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  127. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  128. package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  129. package/dist/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
  130. package/dist/styles/activity-card/_index.scss +2 -0
  131. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  132. package/dist/styles/availability-indicator/_index.scss +1 -0
  133. package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  134. package/dist/styles/date-time-button/_index.scss +1 -0
  135. package/dist/styles/form/CustomCheckbox.scss +5 -0
  136. package/dist/styles/header/Header.scss +0 -4
  137. package/dist/styles/iframe-events/Card.scss +1 -0
  138. package/dist/styles/iframe-page/PageBody.scss +3 -2
  139. package/dist/styles/notification/Notification.scss +4 -0
  140. package/dist/styles/packages.scss +3 -1
  141. package/dist/styles/resources-blocking/_index.scss +5 -0
  142. package/dist/styles/themes/bookedit/_index.scss +1 -0
  143. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  144. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  145. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  146. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  147. package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
  148. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
  149. package/dist/zone/form/components/GameDurationControl.js +1 -0
  150. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  151. package/dist/zone/form/components/ZoneControl.js +1 -1
  152. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  153. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  154. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  155. package/dist/zone/form/utils/dates.js +1 -1
  156. package/package.json +2 -2
  157. package/src/assets/logo/bookedit.svg +9 -11
  158. package/src/assets/logo/favicon.svg +12 -0
  159. package/src/assets/logo/licklist.svg +0 -2
  160. package/src/availability-indicator/AvailabilityIndicator.tsx +59 -0
  161. package/src/availability-indicator/index.ts +1 -0
  162. package/src/calendar/Calendar.stories.tsx +33 -0
  163. package/src/calendar/Calendar.tsx +45 -0
  164. package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
  165. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +28 -19
  166. package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  167. package/src/calendar/index.ts +3 -0
  168. package/src/calendar/utils/index.ts +28 -0
  169. package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
  170. package/src/date-time-button/DateTimeButton.tsx +17 -22
  171. package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
  172. package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
  173. package/src/file-upload/FileUpload.tsx +3 -1
  174. package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
  175. package/src/iframe/activity-card/ActivityCard.tsx +77 -0
  176. package/src/iframe/activity-card/index.ts +1 -0
  177. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -1
  178. package/src/iframe/event/index.ts +0 -6
  179. package/src/iframe/index.ts +1 -2
  180. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -0
  181. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -0
  182. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
  183. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +5 -3
  184. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +0 -10
  185. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
  186. package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
  187. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +59 -31
  188. package/src/iframe/page/Page.stories.tsx +2 -2
  189. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
  190. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
  191. package/src/iframe/payment/order-items-table/types/index.ts +18 -1
  192. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
  193. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  194. package/src/index.ts +2 -0
  195. package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
  196. package/src/product-set/control/DateAndRecurrenceInput.tsx +1 -0
  197. package/src/product-set/control/ProductSetRecurrenceControl.tsx +8 -4
  198. package/src/product-set/form/ProductCategoriesControl.tsx +2 -0
  199. package/src/product-set/form/ProductSetForm.stories.tsx +1 -0
  200. package/src/product-set/form/ProductsControl.tsx +10 -0
  201. package/src/product-set/product/ProductControl.tsx +28 -1
  202. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  203. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -7
  204. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  205. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +10 -8
  206. package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
  207. package/src/recurrence-input/RecurrenceInput.tsx +12 -2
  208. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +53 -24
  209. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +12 -0
  210. package/src/report/form/ReportForm.tsx +1 -1
  211. package/src/sales/booking/results/components/ResultCard.tsx +3 -2
  212. package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
  213. package/src/static/RestrictedAccess.tsx +1 -1
  214. package/src/static/form-number-input/FormNumberInput.tsx +8 -1
  215. package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  216. package/src/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
  217. package/src/styles/activity-card/_index.scss +2 -0
  218. package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  219. package/src/styles/availability-indicator/_index.scss +1 -0
  220. package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  221. package/src/styles/date-time-button/_index.scss +1 -0
  222. package/src/styles/form/CustomCheckbox.scss +5 -0
  223. package/src/styles/header/Header.scss +0 -4
  224. package/src/styles/iframe-events/Card.scss +1 -0
  225. package/src/styles/iframe-page/PageBody.scss +3 -2
  226. package/src/styles/notification/Notification.scss +4 -0
  227. package/src/styles/packages.scss +3 -1
  228. package/src/styles/resources-blocking/_index.scss +5 -0
  229. package/src/styles/themes/bookedit/_index.scss +1 -0
  230. package/src/typings.d.ts +11 -0
  231. package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
  232. package/src/zone/form/components/AvailableTimesControl.tsx +4 -9
  233. package/src/zone/form/components/GameDurationControl.tsx +46 -0
  234. package/src/zone/form/components/ZoneControl.tsx +2 -0
  235. package/src/zone/form/components/ZoneRecurrencesControl.tsx +27 -35
  236. package/src/zone/form/utils/dates.ts +29 -36
  237. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
  238. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
  239. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
  240. package/dist/iframe/activity-cards/index.d.ts +0 -3
  241. package/dist/iframe/activity-cards/index.d.ts.map +0 -1
  242. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
  243. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
  244. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
  245. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
  246. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
  247. package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
  248. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  249. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  250. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  251. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
  252. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
  253. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
  254. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
  255. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
  256. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
  257. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
  258. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  259. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
  260. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
  261. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  262. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  263. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
  264. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  265. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  266. package/dist/iframe/event/event-calendar/index.d.ts +0 -4
  267. package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
  268. package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
  269. package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
  270. package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
  271. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
  272. package/dist/iframe/event/event-calendar/utils/index.js +0 -1
  273. package/dist/styles/iframe-customers-journey/_index.scss +0 -3
  274. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
  275. package/src/iframe/activity-cards/index.ts +0 -2
  276. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
  277. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
  278. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
  279. package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
  280. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
  281. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
  282. package/src/iframe/event/event-calendar/index.ts +0 -6
  283. package/src/iframe/event/event-calendar/types/index.ts +0 -6
  284. package/src/iframe/event/event-calendar/utils/index.ts +0 -11
  285. package/src/styles/iframe-customers-journey/_index.scss +0 -3
  286. /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  287. /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  288. /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  289. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
  290. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
  291. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  292. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
  293. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  294. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  295. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  296. /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  297. /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  298. /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  299. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
  300. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
  301. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
  302. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  303. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -10,12 +10,14 @@ import Icon from "../../../../static/Icon";
10
10
  export interface ErrorModalProps {
11
11
  isOpen: boolean;
12
12
  onClose?: () => void;
13
+ message?: string;
13
14
  messageKey?: string;
14
15
  }
15
16
 
16
17
  export const ErrorModal = ({
17
18
  isOpen = false,
18
19
  onClose,
20
+ message,
19
21
  messageKey,
20
22
  }: ErrorModalProps) => {
21
23
  const { t } = useTranslation("Design");
@@ -47,15 +49,16 @@ export const ErrorModal = ({
47
49
  </ModalHeader>
48
50
  <ModalBody className="confirmation-modal-body">
49
51
  <div className="d-flex m-5 justify-content-center manual-form-error">
50
- {messageKey ? (
51
- t(messageKey)
52
- ) : (
53
- <Trans
54
- t={t}
55
- i18nKey="pleaseSelectAtLeastFrom"
56
- values={{ min: 1, type: "item", from: "those categories" }}
57
- />
58
- )}
52
+ {message ||
53
+ (messageKey ? (
54
+ t(messageKey)
55
+ ) : (
56
+ <Trans
57
+ t={t}
58
+ i18nKey="pleaseSelectAtLeastFrom"
59
+ values={{ min: 1, type: "item", from: "those categories" }}
60
+ />
61
+ ))}
59
62
  </div>
60
63
  </ModalBody>
61
64
  </Modal>
@@ -1,10 +1,7 @@
1
- export const fancyTimeFormat = (miliseconds: number) => {
2
- const date = new Date(miliseconds);
3
- const mins = date.getMinutes();
4
- const secs = date.getSeconds();
5
- let timerString = "";
6
-
7
- timerString += `${mins}:${secs < 10 ? "0" : ""}`;
8
- timerString += `${secs}`;
9
- return timerString;
1
+ export const fancyTimeFormat = (milliseconds: number) => {
2
+ const totalSeconds = Math.floor(milliseconds / 1000);
3
+ const minutes = Math.floor(totalSeconds / 60);
4
+ const seconds = totalSeconds % 60;
5
+ const formattedSecs = seconds < 10 ? `0${seconds}` : `${seconds}`;
6
+ return `${minutes}:${formattedSecs}`;
10
7
  };
@@ -1,52 +1,80 @@
1
+ import { ProductCategory } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
2
+ import { Currency } from "@licklist/core/dist/Config";
3
+ import { useIntl } from "react-intl";
1
4
  import { useTranslation } from "react-i18next";
2
- import { MenuStep, Order } from "src/types";
5
+ import { Order } from "src/types";
3
6
 
4
7
  interface CategoryError {
5
8
  message: string;
6
- id: number;
9
+ id?: number;
7
10
  }
8
11
 
9
12
  // TODO it's temporary solution, please remove it later
10
13
  export const useCategoryVerification = () => {
11
14
  const { t } = useTranslation("Validation");
12
-
15
+ const { formatNumber } = useIntl();
13
16
  return (
14
17
  values: Record<Order["id"], Order>,
15
- step: MenuStep
18
+ productCategories?: ProductCategory[]
16
19
  ): CategoryError | void => {
17
- let errorMessage;
20
+ let errorMessage: { id?: number; message: string } | void;
21
+
22
+ const sumOfMinSpends = productCategories.reduce(
23
+ (acc, productCategories) => {
24
+ const { products } = productCategories;
25
+
26
+ const productMinSpends = products.reduce((productAcc, product) => {
27
+ const minSpendValue = !product?.minSpend ? 0 : product.minSpend;
28
+ return productAcc + minSpendValue;
29
+ }, 0);
18
30
 
31
+ return acc + productMinSpends;
32
+ },
33
+ 0
34
+ );
19
35
  const productArray = Object.values(values).filter(
20
36
  (product) => product?.quantity > 0
21
37
  );
38
+ const totalPrice = productArray.reduce(
39
+ (total, product) => total + product.price * product.quantity,
40
+ 0
41
+ );
42
+
43
+ productCategories.forEach(({ minSubItems, maxSubItems, id, name }) => {
44
+ if (!minSubItems && !maxSubItems) return;
22
45
 
23
- step?.productCategories.forEach(
24
- ({ minSubItems, maxSubItems, id, name }) => {
25
- if (!minSubItems && !maxSubItems) return;
26
-
27
- const categoryProductsQuantity = productArray.filter(
28
- (product) => product?.productsCategoryId === id
29
- ).length;
30
-
31
- if (minSubItems && categoryProductsQuantity < minSubItems) {
32
- const message = t("Validation:fieldMinNumber", {
33
- min: minSubItems,
34
- attribute: `number of products in the ${name} category`,
35
- });
36
- errorMessage = { id, message };
37
-
38
- return;
39
- }
40
-
41
- if (maxSubItems && categoryProductsQuantity > maxSubItems) {
42
- const message = t("Validation:fieldMaxNumber", {
43
- max: maxSubItems,
44
- attribute: `number of products in the ${name} category`,
45
- });
46
- errorMessage = { id, message };
47
- }
46
+ const categoryProductsQuantity = productArray.filter(
47
+ (product) => product?.productsCategoryId === id
48
+ ).length;
49
+
50
+ if (minSubItems && categoryProductsQuantity < minSubItems) {
51
+ const message = t("Validation:fieldMinNumber", {
52
+ min: minSubItems,
53
+ attribute: `number of products in the ${name} category`,
54
+ });
55
+ errorMessage = { id, message };
56
+
57
+ return;
48
58
  }
49
- );
59
+
60
+ if (maxSubItems && categoryProductsQuantity > maxSubItems) {
61
+ const message = t("Validation:fieldMaxNumber", {
62
+ max: maxSubItems,
63
+ attribute: `number of products in the ${name} category`,
64
+ });
65
+ errorMessage = { id, message };
66
+ }
67
+ });
68
+
69
+ if (totalPrice < sumOfMinSpends && !errorMessage) {
70
+ const message = t("Design:minimumSpendSumValidation", {
71
+ minSpend: formatNumber(sumOfMinSpends, {
72
+ style: "currency",
73
+ currency: Currency.GBP,
74
+ }),
75
+ }) as string;
76
+ errorMessage = { message };
77
+ }
50
78
 
51
79
  return errorMessage;
52
80
  };
@@ -6,7 +6,7 @@ import { Page } from "./Page";
6
6
  import { PageHeader } from "./components/PageHeader";
7
7
  import { PageBody } from "./components/PageBody";
8
8
  import { IframeEventCard } from "../event/event-card/IframeEventCard";
9
- import { CalendarSelect } from "../event/event-calendar/components/CalendarSelect";
9
+ import { CalendarSelect } from "../../calendar/components/CalendarSelect";
10
10
 
11
11
  export default {
12
12
  title: "Iframe/Page/Page",
@@ -219,7 +219,7 @@ export function Default() {
219
219
  <>
220
220
  <CalendarSelect
221
221
  options={[{ label: "Floor 1", value: "1" }]}
222
- value={"1"}
222
+ value="1"
223
223
  onChange={(chagedId: string) => console.log({ chagedId })}
224
224
  />
225
225
  </>
@@ -26,7 +26,12 @@ export const LeftBlock = ({
26
26
  <div className={clsx("left-block", className)} {...props}>
27
27
  {pageTitle && (
28
28
  <div className="navigation">
29
- <div className="title">{pageTitle}</div>
29
+ {typeof pageTitle === "string" ? (
30
+ <div className="title">{pageTitle}</div>
31
+ ) : (
32
+ pageTitle
33
+ )}
34
+
30
35
  {component}
31
36
  </div>
32
37
  )}
@@ -9,15 +9,9 @@ import {
9
9
  PAYMENT_TYPE_NET_PROFIT,
10
10
  } from "@licklist/core/dist/DataMapper/Order/PaymentDataMapper";
11
11
  import { StaticTableData } from "../../../../table";
12
- import {
13
- getProductQuantityAndPrice,
14
- calculateTotalDiscount,
15
- calculateTotalPrice,
16
- getPaymentValueByType,
17
- getExternalPaymentDetail,
18
- getTotalSumByCategory,
19
- } from "../utils";
12
+ import { getProductQuantityAndPrice, getTotalSumByCategory } from "../utils";
20
13
  import { OrderItemsTableProps, SummaryItem } from "../types";
14
+ import { getOrderSummaryItems } from "../utils/paymentSummary";
21
15
 
22
16
  const CURRENCY_DEFAULT = "GBP";
23
17
  export const PAYMENT_TYPE_TRANSLATE_KEYS = {
@@ -114,9 +108,7 @@ export const useTableData = ({
114
108
  );
115
109
  };
116
110
 
117
- const renderSummaryItems = (
118
- summaryItems: { translateKey: string; price: number }[]
119
- ) => {
111
+ const renderSummaryItems = (summaryItems: SummaryItem[]) => {
120
112
  return summaryItems.map(({ translateKey, price }) => {
121
113
  return {
122
114
  key: uniqueId(`summary-info-${translateKey}`),
@@ -127,93 +119,6 @@ export const useTableData = ({
127
119
  });
128
120
  };
129
121
 
130
- const paymentNotProcessedSummary = () => {
131
- const externalPaymentDetail = paymentDetail
132
- ? getExternalPaymentDetail(paymentDetail)
133
- : undefined;
134
-
135
- const total = calculateTotalPrice(order, externalPaymentDetail);
136
-
137
- const summaryItems: SummaryItem[] = [
138
- {
139
- translateKey: "amountTotal",
140
- price: total,
141
- },
142
- ];
143
-
144
- if (externalDiscount) {
145
- summaryItems.push({
146
- price: externalDiscount,
147
- translateKey: "amountWithDiscount",
148
- });
149
- }
150
-
151
- if (externalPaymentDetail) {
152
- return [...summaryItems, ...getExternalPaymentDetail(paymentDetail)];
153
- }
154
-
155
- return summaryItems;
156
- };
157
-
158
- const processedPaymentSummary = () => {
159
- const externalPaymentDetail =
160
- paymentDetail && !order.payments.length
161
- ? getExternalPaymentDetail(paymentDetail)
162
- : Object.keys(PAYMENT_TYPE_TRANSLATE_KEYS).map((key) => {
163
- return {
164
- translateKey: PAYMENT_TYPE_TRANSLATE_KEYS[key],
165
- price: getPaymentValueByType(order.payments, key),
166
- };
167
- });
168
-
169
- const total = calculateTotalPrice(order, externalPaymentDetail);
170
-
171
- const totalDiscount = calculateTotalDiscount(order.payments);
172
- const totalWithDiscount = total - Number(totalDiscount);
173
- let summaryItems: SummaryItem[] = [
174
- {
175
- translateKey: "amountTotal",
176
- price: total,
177
- },
178
- ];
179
-
180
- if (totalDiscount) {
181
- summaryItems.push({
182
- translateKey: "amountWithDiscount",
183
- price: totalWithDiscount < 0 ? 0 : totalWithDiscount,
184
- });
185
- }
186
-
187
- if (paymentDetail && !order.payments.length) {
188
- return [...summaryItems, ...externalPaymentDetail];
189
- }
190
-
191
- summaryItems.push({
192
- translateKey: "totalPaid",
193
- price: totalWithDiscount <= 0 ? 0 : order.totalAmount,
194
- });
195
- if (totalWithDiscount <= 0) {
196
- return summaryItems;
197
- }
198
- summaryItems = [...summaryItems, ...externalPaymentDetail];
199
-
200
- if (totalWithDiscount > order.totalAmount) {
201
- summaryItems.push({
202
- translateKey: "remainingToPay",
203
- price: totalWithDiscount - order.totalAmount,
204
- });
205
- }
206
- return summaryItems;
207
- };
208
-
209
- const getOrderSummaryItems = () => {
210
- if (!isPaymentProcessed) {
211
- return paymentNotProcessedSummary();
212
- }
213
-
214
- return processedPaymentSummary();
215
- };
216
-
217
122
  const data = useMemo(
218
123
  () => {
219
124
  if (!order) {
@@ -222,7 +127,14 @@ export const useTableData = ({
222
127
 
223
128
  return [
224
129
  ...renderProductsContent(),
225
- ...renderSummaryItems(getOrderSummaryItems()),
130
+ ...renderSummaryItems(
131
+ getOrderSummaryItems({
132
+ order,
133
+ paymentDetail,
134
+ isPaymentProcessed,
135
+ externalDiscount,
136
+ })
137
+ ),
226
138
  ];
227
139
  },
228
140
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1,7 +1,24 @@
1
1
  import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
2
2
  import { PaymentDetail } from "@licklist/core/dist/DataMapper/Order/PaymentDetailDataMapper";
3
3
 
4
- export type SummaryItem = { translateKey: string; price: number };
4
+ export const AMOUNT_TOTAL = "amountTotal";
5
+ export const AMOUNT_WITH_DISCOUNT = "amountWithDiscount";
6
+ export const TOTAL_PAID = "totalPaid";
7
+ export const REMAINING_TO_PAY = "remainingToPay";
8
+
9
+ export const SUMMARY_TRANSLATE_KEYS = [
10
+ AMOUNT_TOTAL,
11
+ AMOUNT_WITH_DISCOUNT,
12
+ TOTAL_PAID,
13
+ REMAINING_TO_PAY,
14
+ ];
15
+
16
+ export type SUMMARY_TRANSLATE_KEY = typeof SUMMARY_TRANSLATE_KEYS[number];
17
+
18
+ export type SummaryItem = {
19
+ translateKey: SUMMARY_TRANSLATE_KEY;
20
+ price: number;
21
+ };
5
22
 
6
23
  export type OrderItemsTableProps = {
7
24
  order?: Order;
@@ -0,0 +1,118 @@
1
+ import { PAYMENT_TYPE_TRANSLATE_KEYS } from "../hooks/useTableData";
2
+ import {
3
+ AMOUNT_TOTAL,
4
+ AMOUNT_WITH_DISCOUNT,
5
+ OrderItemsTableProps,
6
+ REMAINING_TO_PAY,
7
+ SummaryItem,
8
+ TOTAL_PAID,
9
+ } from "../types";
10
+ import {
11
+ calculateTotalDiscount,
12
+ calculateTotalPrice,
13
+ getExternalPaymentDetail,
14
+ getPaymentValueByType,
15
+ } from "./index";
16
+
17
+ const paymentNotProcessedSummary = ({
18
+ order,
19
+ externalDiscount,
20
+ paymentDetail,
21
+ }: OrderItemsTableProps) => {
22
+ const externalPaymentDetail = paymentDetail
23
+ ? getExternalPaymentDetail(paymentDetail)
24
+ : undefined;
25
+
26
+ const total = calculateTotalPrice(order, externalPaymentDetail);
27
+
28
+ const summaryItems: SummaryItem[] = [
29
+ {
30
+ translateKey: AMOUNT_TOTAL,
31
+ price: total,
32
+ },
33
+ ];
34
+
35
+ if (externalDiscount) {
36
+ summaryItems.push({
37
+ price: externalDiscount,
38
+ translateKey: AMOUNT_WITH_DISCOUNT,
39
+ });
40
+ }
41
+
42
+ if (externalPaymentDetail) {
43
+ return [...summaryItems, ...getExternalPaymentDetail(paymentDetail)];
44
+ }
45
+
46
+ return summaryItems;
47
+ };
48
+
49
+ const processedPaymentSummary = ({
50
+ order,
51
+ paymentDetail,
52
+ }: OrderItemsTableProps) => {
53
+ const externalPaymentDetail =
54
+ paymentDetail && !order.payments.length
55
+ ? getExternalPaymentDetail(paymentDetail)
56
+ : Object.keys(PAYMENT_TYPE_TRANSLATE_KEYS).map((key) => {
57
+ return {
58
+ translateKey: PAYMENT_TYPE_TRANSLATE_KEYS[key],
59
+ price: getPaymentValueByType(order.payments, key),
60
+ };
61
+ });
62
+
63
+ const total = calculateTotalPrice(order, externalPaymentDetail);
64
+
65
+ const totalDiscount = calculateTotalDiscount(order.payments);
66
+ const totalWithDiscount = total - Number(totalDiscount);
67
+ let summaryItems: SummaryItem[] = [
68
+ {
69
+ translateKey: AMOUNT_TOTAL,
70
+ price: total,
71
+ },
72
+ ];
73
+
74
+ if (totalDiscount) {
75
+ summaryItems.push({
76
+ translateKey: AMOUNT_WITH_DISCOUNT,
77
+ price: totalWithDiscount < 0 ? 0 : totalWithDiscount,
78
+ });
79
+ }
80
+
81
+ if (paymentDetail && !order.payments.length) {
82
+ return [...summaryItems, ...externalPaymentDetail];
83
+ }
84
+
85
+ summaryItems.push({
86
+ translateKey: TOTAL_PAID,
87
+ price: totalWithDiscount <= 0 ? 0 : order.totalAmount,
88
+ });
89
+ if (totalWithDiscount <= 0) {
90
+ return summaryItems;
91
+ }
92
+ summaryItems = [...summaryItems, ...externalPaymentDetail];
93
+
94
+ if (totalWithDiscount > order.totalAmount) {
95
+ summaryItems.push({
96
+ translateKey: REMAINING_TO_PAY,
97
+ price: totalWithDiscount - order.totalAmount,
98
+ });
99
+ }
100
+ return summaryItems;
101
+ };
102
+
103
+ export const getOrderSummaryItems = ({
104
+ order,
105
+ externalDiscount,
106
+ paymentDetail,
107
+ isPaymentProcessed,
108
+ }: OrderItemsTableProps): SummaryItem[] => {
109
+ if (!isPaymentProcessed) {
110
+ return paymentNotProcessedSummary({
111
+ order,
112
+ externalDiscount,
113
+ paymentDetail,
114
+ });
115
+ }
116
+
117
+ return processedPaymentSummary({ order, paymentDetail });
118
+ };
@@ -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,5 @@ 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";
@@ -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>
@@ -176,6 +176,7 @@ export const DateAndRecurrenceInput = ({
176
176
  defaultValues={editState.values}
177
177
  onChange={handleRecurringDateChange}
178
178
  onDelete={handleDelete}
179
+ isProductSet
179
180
  />
180
181
  </Popover.Content>
181
182
  </Popover>
@@ -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
@@ -72,6 +72,7 @@ export function ProductCategoriesControl({
72
72
  providerHasMap,
73
73
  expandedProductCategories,
74
74
  setExpandedProductCategories,
75
+ zones,
75
76
  } = useContext(ProductSetLoadingContext);
76
77
  const form = useFormContext<ProductSetFormValues>();
77
78
  const [isSelectCategoryVisible, setIsSelectCategoryVisible] = useState(false);
@@ -287,6 +288,7 @@ export function ProductCategoriesControl({
287
288
  quantityType={productCategory.quantityType}
288
289
  hasTicket={productCategory?.hasTicket}
289
290
  stepIndex={stepIndex}
291
+ zones={zones}
290
292
  productCategoryIndex={index}
291
293
  categoryType={productCategory.type}
292
294
  />
@@ -74,6 +74,7 @@ Default.args = {
74
74
  {
75
75
  createdAt: "2023-05-08T15:55:28.000+03:00",
76
76
  deletedAt: null,
77
+ defaultDuration: 30,
77
78
  description: "Zone description 2",
78
79
  id: 2,
79
80
  image: null,
@@ -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)}