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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/dist/assets/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 +10 -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 +19 -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/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 +29 -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-statistic-modal/EventStatisticModal.d.ts +3 -1
  48. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  49. package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
  50. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +2 -1
  51. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  52. package/dist/events/event-statistic-modal/hooks/useTableData.js +1 -1
  53. package/dist/events/event-statistic-modal/utils/index.d.ts +1 -1
  54. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  55. package/dist/events/event-statistic-modal/utils/index.js +1 -1
  56. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  57. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  58. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  59. package/dist/file-upload/FileUpload.js +1 -1
  60. package/dist/iframe/activity-card/ActivityCard.d.ts +15 -0
  61. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
  62. package/dist/iframe/activity-card/ActivityCard.js +1 -0
  63. package/dist/iframe/activity-card/index.d.ts +2 -0
  64. package/dist/iframe/activity-card/index.d.ts.map +1 -0
  65. package/dist/iframe/event/index.d.ts +0 -2
  66. package/dist/iframe/event/index.d.ts.map +1 -1
  67. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  68. package/dist/iframe/event/ticket-description/TicketDescription.js +1 -1
  69. package/dist/iframe/index.d.ts +2 -2
  70. package/dist/iframe/index.d.ts.map +1 -1
  71. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  72. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  73. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  74. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  75. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +2 -1
  76. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  77. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  78. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  79. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  80. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  81. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  82. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  83. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  84. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +4 -1
  85. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  86. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  87. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +2 -1
  88. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  89. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  90. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  91. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  92. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  93. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +4 -3
  94. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  95. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  96. package/dist/iframe/order-process/constants.d.ts +1 -0
  97. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  98. package/dist/iframe/order-process/constants.js +1 -1
  99. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  100. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  101. package/dist/index.d.ts +3 -0
  102. package/dist/index.d.ts.map +1 -1
  103. package/dist/index.js +1 -1
  104. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  105. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  106. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  107. package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
  108. package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
  109. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  110. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
  111. package/dist/number-of-people-input/components/index.d.ts +2 -0
  112. package/dist/number-of-people-input/components/index.d.ts.map +1 -0
  113. package/dist/number-of-people-input/index.d.ts +3 -0
  114. package/dist/number-of-people-input/index.d.ts.map +1 -0
  115. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +5 -1
  116. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  117. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  118. package/dist/product-set/control/ProductSetControl.d.ts +6 -3
  119. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  120. package/dist/product-set/control/ProductSetControl.js +1 -1
  121. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts +2 -1
  122. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  123. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  124. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  125. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  126. package/dist/product-set/form/ProductSetForm.d.ts +3 -1
  127. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  128. package/dist/product-set/form/ProductSetForm.js +1 -1
  129. package/dist/product-set/form/ProductsControl.d.ts +3 -1
  130. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  131. package/dist/product-set/form/ProductsControl.js +1 -1
  132. package/dist/product-set/product/ProductControl.d.ts +2 -1
  133. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  134. package/dist/product-set/product/ProductControl.js +1 -1
  135. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  136. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  137. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  138. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  139. package/dist/product-set/utils/index.d.ts +10 -0
  140. package/dist/product-set/utils/index.d.ts.map +1 -1
  141. package/dist/product-set/utils/index.js +1 -1
  142. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  143. package/dist/provider/location-input/LocationInput.js +1 -1
  144. package/dist/provider/location-input/components/FormGroupControll.d.ts +7 -0
  145. package/dist/provider/location-input/components/FormGroupControll.d.ts.map +1 -0
  146. package/dist/provider/location-input/components/FormGroupControll.js +1 -0
  147. package/dist/provider/location-input/components/index.d.ts +2 -0
  148. package/dist/provider/location-input/components/index.d.ts.map +1 -0
  149. package/dist/provider/location-input/index.d.ts +1 -0
  150. package/dist/provider/location-input/index.d.ts.map +1 -1
  151. package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
  152. package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
  153. package/dist/provider/provider-form/ProviderForm.js +1 -1
  154. package/dist/provider/venue-form/VenueForm.d.ts +3 -1
  155. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  156. package/dist/provider/venue-form/VenueForm.js +1 -1
  157. package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
  158. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  159. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  160. package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
  161. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  162. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  163. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +4 -1
  164. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  165. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  166. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -0
  167. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  168. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  169. package/dist/report/form/ReportForm.d.ts.map +1 -1
  170. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  171. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  172. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  173. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  174. package/dist/sales/filters/SaleFilters.d.ts +1 -0
  175. package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
  176. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
  177. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  178. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  179. package/dist/sales/payment-form/SalePaymentForm.js +1 -1
  180. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  181. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  182. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  183. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  184. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  185. package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
  186. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  187. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  188. package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -9
  189. package/{src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → dist/styles/activity-card/ListActivitiesCard.scss} +2 -1
  190. package/dist/styles/activity-card/_index.scss +2 -0
  191. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  192. package/dist/styles/availability-indicator/_index.scss +1 -0
  193. package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  194. package/dist/styles/date-time-button/_index.scss +1 -0
  195. package/dist/styles/events/EventCard.scss +12 -5
  196. package/dist/styles/form/CustomCheckbox.scss +6 -0
  197. package/dist/styles/header/Header.scss +0 -4
  198. package/dist/styles/iframe-events/Card.scss +1 -0
  199. package/dist/styles/notification/Notification.scss +4 -0
  200. package/dist/styles/packages.scss +3 -1
  201. package/dist/styles/resources-blocking/_index.scss +16 -0
  202. package/dist/styles/sales/BookingResults.scss +14 -6
  203. package/dist/styles/themes/bookedit/_index.scss +1 -0
  204. package/dist/styles/zones/ZoneForm.scss +3 -0
  205. package/dist/types/iframe.d.ts +1 -0
  206. package/dist/types/iframe.d.ts.map +1 -1
  207. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  208. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  209. package/dist/zone/form/ZoneForm.d.ts +1 -1
  210. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  211. package/dist/zone/form/ZoneForm.js +1 -1
  212. package/dist/zone/form/components/AvailableTimesControl.d.ts +2 -0
  213. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  214. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  215. package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
  216. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
  217. package/dist/zone/form/components/GameDurationControl.js +1 -0
  218. package/dist/zone/form/components/ZoneControl.d.ts +1 -1
  219. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  220. package/dist/zone/form/components/ZoneControl.js +1 -1
  221. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +1 -1
  222. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  223. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  224. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  225. package/dist/zone/form/utils/dates.js +1 -1
  226. package/package.json +3 -3
  227. package/src/assets/logo/bookedit.svg +9 -11
  228. package/src/assets/logo/favicon.svg +12 -0
  229. package/src/assets/logo/licklist.svg +0 -2
  230. package/src/availability-indicator/AvailabilityIndicator.tsx +67 -0
  231. package/src/availability-indicator/index.ts +1 -0
  232. package/src/calendar/Calendar.stories.tsx +33 -0
  233. package/src/calendar/Calendar.tsx +45 -0
  234. package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
  235. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +24 -19
  236. package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  237. package/src/calendar/index.ts +3 -0
  238. package/src/calendar/utils/index.ts +28 -0
  239. package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
  240. package/src/date-time-button/DateTimeButton.tsx +24 -22
  241. package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
  242. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -12
  243. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  244. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
  245. package/src/events/event-card/EventCard.tsx +6 -2
  246. package/src/events/event-card/utils.ts +89 -16
  247. package/src/events/event-statistic-modal/EventStatisticModal.tsx +5 -1
  248. package/src/events/event-statistic-modal/hooks/useTableData.tsx +12 -5
  249. package/src/events/event-statistic-modal/utils/index.ts +39 -34
  250. package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
  251. package/src/file-upload/FileUpload.tsx +3 -1
  252. package/src/iframe/activity-card/ActivityCard.stories.tsx +51 -0
  253. package/src/iframe/activity-card/ActivityCard.tsx +66 -0
  254. package/src/iframe/activity-card/index.ts +1 -0
  255. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -2
  256. package/src/iframe/event/index.ts +0 -7
  257. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +8 -2
  258. package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -2
  259. package/src/iframe/index.ts +1 -3
  260. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +4 -3
  261. package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -1
  262. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
  263. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
  264. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +17 -8
  265. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +1 -15
  266. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +15 -29
  267. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
  268. package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
  269. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +62 -32
  270. package/src/iframe/order-process/constants.ts +1 -0
  271. package/src/iframe/page/Page.stories.tsx +2 -2
  272. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +13 -6
  273. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  274. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  275. package/src/index.ts +3 -0
  276. package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
  277. package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  278. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
  279. package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  280. package/src/number-of-people-input/components/index.ts +1 -0
  281. package/src/number-of-people-input/index.ts +2 -0
  282. package/src/product-set/control/DateAndRecurrenceInput.tsx +75 -2
  283. package/src/product-set/control/ProductSetControl.stories.tsx +0 -2
  284. package/src/product-set/control/ProductSetControl.tsx +66 -10
  285. package/src/product-set/control/ProductSetRecurrenceControl.tsx +14 -5
  286. package/src/product-set/form/ProductCategoriesControl.tsx +2 -1
  287. package/src/product-set/form/ProductSetForm.stories.tsx +9 -12
  288. package/src/product-set/form/ProductSetForm.tsx +19 -3
  289. package/src/product-set/form/ProductsControl.tsx +10 -0
  290. package/src/product-set/product/ProductControl.tsx +28 -1
  291. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  292. package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
  293. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -30
  294. package/src/product-set/utils/index.ts +38 -0
  295. package/src/provider/location-input/LocationInput.tsx +21 -20
  296. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  297. package/src/provider/location-input/components/FormGroupControll.tsx +16 -0
  298. package/src/provider/location-input/components/index.ts +1 -0
  299. package/src/provider/location-input/index.ts +1 -1
  300. package/src/provider/provider-details-input/ProviderDetailsInput.tsx +5 -13
  301. package/src/provider/venue-form/VenueForm.stories.tsx +24 -0
  302. package/src/provider/venue-form/VenueForm.tsx +55 -4
  303. package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
  304. package/src/recurrence-input/RecurrenceInput.tsx +12 -2
  305. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -11
  306. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +9 -0
  307. package/src/report/form/ReportForm.tsx +1 -1
  308. package/src/sales/booking/results/BookingResults.stories.tsx +12 -7
  309. package/src/sales/booking/results/components/ResultCard.tsx +24 -3
  310. package/src/sales/coupon/control/CouponFormControl.tsx +5 -0
  311. package/src/sales/filters/SaleFilters.tsx +1 -0
  312. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
  313. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
  314. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +31 -28
  315. package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
  316. package/src/static/RestrictedAccess.tsx +1 -1
  317. package/src/static/form-number-input/FormNumberInput.tsx +8 -1
  318. package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -9
  319. package/{dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → src/styles/activity-card/ListActivitiesCard.scss} +2 -1
  320. package/src/styles/activity-card/_index.scss +2 -0
  321. package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  322. package/src/styles/availability-indicator/_index.scss +1 -0
  323. package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  324. package/src/styles/date-time-button/_index.scss +1 -0
  325. package/src/styles/events/EventCard.scss +12 -5
  326. package/src/styles/form/CustomCheckbox.scss +6 -0
  327. package/src/styles/header/Header.scss +0 -4
  328. package/src/styles/iframe-events/Card.scss +1 -0
  329. package/src/styles/notification/Notification.scss +4 -0
  330. package/src/styles/packages.scss +3 -1
  331. package/src/styles/resources-blocking/_index.scss +16 -0
  332. package/src/styles/sales/BookingResults.scss +14 -6
  333. package/src/styles/themes/bookedit/_index.scss +1 -0
  334. package/src/styles/zones/ZoneForm.scss +3 -0
  335. package/src/types/iframe.ts +1 -0
  336. package/src/typings.d.ts +11 -0
  337. package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
  338. package/src/zone/form/ZoneForm.tsx +1 -2
  339. package/src/zone/form/components/AvailableTimesControl.tsx +89 -88
  340. package/src/zone/form/components/GameDurationControl.tsx +46 -0
  341. package/src/zone/form/components/ZoneControl.tsx +4 -5
  342. package/src/zone/form/components/ZoneRecurrencesControl.tsx +3 -59
  343. package/src/zone/form/utils/dates.ts +29 -36
  344. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
  345. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
  346. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
  347. package/dist/iframe/activity-cards/index.d.ts +0 -3
  348. package/dist/iframe/activity-cards/index.d.ts.map +0 -1
  349. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
  350. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
  351. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
  352. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
  353. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
  354. package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
  355. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  356. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  357. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  358. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
  359. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
  360. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
  361. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
  362. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
  363. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
  364. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
  365. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  366. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
  367. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
  368. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  369. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  370. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
  371. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  372. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  373. package/dist/iframe/event/event-calendar/index.d.ts +0 -4
  374. package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
  375. package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
  376. package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
  377. package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
  378. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
  379. package/dist/iframe/event/event-calendar/utils/index.js +0 -1
  380. package/dist/iframe/event/event-details/EventDetails.d.ts +0 -10
  381. package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
  382. package/dist/iframe/event/event-details/EventDetails.js +0 -1
  383. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
  384. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
  385. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
  386. package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
  387. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
  388. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
  389. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
  390. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
  391. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
  392. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
  393. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  394. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
  395. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  396. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
  397. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
  398. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
  399. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
  400. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
  401. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
  402. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
  403. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
  404. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
  405. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
  406. package/dist/iframe/event/event-details/index.d.ts +0 -2
  407. package/dist/iframe/event/event-details/index.d.ts.map +0 -1
  408. package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
  409. package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
  410. package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
  411. package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
  412. package/dist/iframe/event/event-details/utils/routes.js +0 -1
  413. package/dist/styles/iframe-customers-journey/_index.scss +0 -3
  414. package/src/iframe/activity-cards/activity-card/ActivityCard.stories.tsx +0 -52
  415. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
  416. package/src/iframe/activity-cards/index.ts +0 -2
  417. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
  418. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
  419. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
  420. package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
  421. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
  422. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
  423. package/src/iframe/event/event-calendar/index.ts +0 -6
  424. package/src/iframe/event/event-calendar/types/index.ts +0 -6
  425. package/src/iframe/event/event-calendar/utils/index.ts +0 -11
  426. package/src/iframe/event/event-details/EventDetails.stories.tsx +0 -187
  427. package/src/iframe/event/event-details/EventDetails.tsx +0 -92
  428. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
  429. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
  430. package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
  431. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
  432. package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
  433. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
  434. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
  435. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
  436. package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
  437. package/src/iframe/event/event-details/index.ts +0 -1
  438. package/src/iframe/event/event-details/utils/index.ts +0 -1
  439. package/src/iframe/event/event-details/utils/routes.ts +0 -6
  440. package/src/styles/iframe-customers-journey/_index.scss +0 -3
  441. /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  442. /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  443. /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  444. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
  445. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
  446. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  447. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
  448. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  449. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  450. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  451. /package/dist/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  452. /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  453. /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  454. /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  455. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
  456. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
  457. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
  458. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  459. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -13,7 +13,6 @@
13
13
  @import "./static";
14
14
  @import "./table";
15
15
  @import "./back-button";
16
- @import "./iframe-customers-journey";
17
16
  @import "./custom-fields";
18
17
  @import "./file-upload";
19
18
  @import "./iframe-events";
@@ -41,3 +40,6 @@
41
40
  @import "./striped-static-table/";
42
41
  @import "./image-radio-input/";
43
42
  @import "./radio-card/";
43
+ @import "./activity-card/";
44
+ @import "./date-time-button/";
45
+ @import "./availability-indicator/";
@@ -7,6 +7,16 @@
7
7
  overflow: auto;
8
8
  }
9
9
 
10
+
11
+ .modal-form-content {
12
+ max-height: 21rem;
13
+ overflow-x: hidden;
14
+
15
+ .error-content {
16
+ min-width: 25rem;
17
+ }
18
+ }
19
+
10
20
  .reccurrence-interval-container {
11
21
  .form-group {
12
22
  margin-bottom: 0.5rem;
@@ -66,6 +76,7 @@
66
76
  display: flex;
67
77
  flex-direction: column;
68
78
  gap: 1rem;
79
+
69
80
  }
70
81
 
71
82
  .custom-checkbox {
@@ -132,6 +143,10 @@
132
143
  }
133
144
  }
134
145
 
146
+ .footer-with-short-notes {
147
+ min-width: 18rem;
148
+ }
149
+
135
150
  footer {
136
151
  display: flex;
137
152
  gap: 1.25rem;
@@ -148,3 +163,4 @@
148
163
  }
149
164
  }
150
165
  }
166
+
@@ -5,14 +5,14 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 11.125rem;
8
+ height: 13.825rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
12
12
  transition: ease-in 0.25s;
13
13
  border-radius: 0.25rem;
14
14
  box-shadow: 0px 0px 0.125rem 0px rgb(0 0 0 / 20%);
15
-
15
+
16
16
  .card-content {
17
17
  width: 100%;
18
18
  height: 100%;
@@ -28,7 +28,7 @@
28
28
  position: absolute;
29
29
  left: 0.5rem;
30
30
  top: 0.125rem;
31
- font-weight: 600;
31
+ font-weight: 600;
32
32
  }
33
33
 
34
34
  .order-people {
@@ -43,7 +43,7 @@
43
43
  height: 1.75rem;
44
44
  font-size: 0.625rem;
45
45
  line-height: 0.625rem;
46
- color: #6D6D6D;
46
+ color: #6d6d6d;
47
47
  font-weight: 600;
48
48
 
49
49
  svg {
@@ -62,11 +62,19 @@
62
62
  font-size: 0.6875rem;
63
63
  }
64
64
  }
65
+
66
+ .products {
67
+ display: block;
68
+ width: 80%;
69
+ white-space: nowrap;
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ }
65
73
  }
66
74
 
67
75
  &:hover {
68
76
  box-shadow: 0px 0px 0.5rem 0px rgb(0 0 0 / 20%);
69
- cursor: pointer;
77
+ cursor: pointer;
70
78
  }
71
79
  }
72
80
 
@@ -85,4 +93,4 @@
85
93
  }
86
94
  }
87
95
  }
88
- }
96
+ }
@@ -46,6 +46,7 @@
46
46
  .header {
47
47
  background-color: color("white");
48
48
  padding: 0 2.5rem;
49
+ z-index: 2;
49
50
  min-height: 4rem;
50
51
  border-bottom: 1px solid #f0f0f0;
51
52
  }
@@ -3,5 +3,8 @@
3
3
  flex-wrap: wrap;
4
4
  gap: 1.5rem;
5
5
  height: 8rem;
6
+ padding-left: 1.5rem;
7
+ justify-content: start;
8
+ width: 95%;
6
9
  overflow: scroll;
7
10
  }
@@ -15,6 +15,7 @@ export interface Product {
15
15
  isRequired?: boolean;
16
16
  isUnlimited?: boolean;
17
17
  images: CoreProduct["images"];
18
+ capacity?: number | null;
18
19
  uuid: string;
19
20
  }
20
21
 
package/src/typings.d.ts CHANGED
@@ -28,3 +28,14 @@ declare module "*.json" {
28
28
 
29
29
  declare module "react-phone-number-input/input";
30
30
  declare module "react-phone-number-input/commonjs/Flag";
31
+
32
+ // @TODO: this is a hofix for the following issue:
33
+ // licklist_workspace_frontend/packages/design/src/product-set/hooks/useSortableTreeFunctions.ts(17,34):
34
+ // semantic error TS2304: Cannot find name 'structuredClone'.
35
+ interface WindowOrWorkerGlobalScope {
36
+ structuredClone(value: any, options?: StructuredSerializeOptions): any;
37
+ }
38
+ declare function structuredClone(
39
+ value: any,
40
+ options?: StructuredSerializeOptions
41
+ ): any;
@@ -39,7 +39,8 @@ const WrappedVirtualizedWindowScroller = ({
39
39
  if (!onDataUpdate) return;
40
40
 
41
41
  onDataUpdate();
42
- }, [windowDimensions, scrollElement, gridRef, onDataUpdate]);
42
+ // eslint-disable-next-line react-hooks/exhaustive-deps
43
+ }, [windowDimensions]);
43
44
 
44
45
  return (
45
46
  <WindowScroller scrollElement={scrollElement}>
@@ -25,7 +25,6 @@ export const ZoneForm = ({
25
25
  onSubmit,
26
26
  serverErrors,
27
27
  isLoading = false,
28
- workHours = [],
29
28
  }: ZoneFormProps) => {
30
29
  const { t } = useTranslation("Design");
31
30
  const form = useForm<ZoneFormValues>({
@@ -55,7 +54,7 @@ export const ZoneForm = ({
55
54
  return (
56
55
  <FormProvider {...form}>
57
56
  <Form onSubmit={handleSubmit(onFormSubmit)}>
58
- <ZoneControl isLoading={isLoading} workHours={workHours} />
57
+ <ZoneControl isLoading={isLoading} />
59
58
  <Row>
60
59
  <Col md={6} sm={12} />
61
60
  <Col
@@ -9,7 +9,6 @@ import { Form } from "react-bootstrap";
9
9
  import { UseFormSetError, useForm } from "react-hook-form";
10
10
  import { useId } from "@react-aria/utils";
11
11
  import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
12
- import { calculateTimeWithOffset } from "@licklist/plugins/dist/utils/time";
13
12
  import { getCheckboxesByWorkHours } from "../utils/dates";
14
13
 
15
14
  export type AvailableTimesControlRef = {
@@ -24,6 +23,8 @@ type AvailableTimesControlProps = {
24
23
  defaultValues?: string[];
25
24
  startTime?: string;
26
25
  endTime?: string;
26
+ errorMessage?: string;
27
+ clearErrorMessage: () => void;
27
28
  };
28
29
 
29
30
  type AvailableTimesForm = { availableTimes: string[] };
@@ -31,95 +32,95 @@ type AvailableTimesForm = { availableTimes: string[] };
31
32
  export const AvailableTimesControl = forwardRef<
32
33
  AvailableTimesControlRef,
33
34
  AvailableTimesControlProps
34
- >(({ isLoading, workHours, defaultValues = [] }, ref) => {
35
- const nameId = useId();
36
- const { t } = useTranslation(["Design", "Validation"]);
37
-
38
- const {
39
- register,
40
- formState: { errors },
41
- reset,
42
- trigger,
43
- getValues,
44
- setValue,
45
- watch,
46
- setError,
47
- } = useForm<AvailableTimesForm>({ mode: "onChange" });
48
-
49
- const availableTimes = watch("availableTimes") || [];
50
-
51
- const checkboxes = useMemo(
52
- () => getCheckboxesByWorkHours(workHours),
53
- [workHours]
54
- );
55
-
56
- useImperativeHandle(ref, () => {
57
- return {
35
+ >(
36
+ (
37
+ {
38
+ isLoading,
39
+ workHours,
40
+ defaultValues = [],
41
+ errorMessage,
42
+ clearErrorMessage,
43
+ },
44
+ ref
45
+ ) => {
46
+ const nameId = useId();
47
+ const { t } = useTranslation(["Design", "Validation"]);
48
+
49
+ const {
50
+ register,
51
+ formState: { errors },
52
+ reset,
58
53
  trigger,
59
54
  getValues,
55
+ setValue,
56
+ watch,
60
57
  setError,
58
+ } = useForm<AvailableTimesForm>({ mode: "onChange" });
59
+
60
+ const availableTimes = watch("availableTimes") || [];
61
+
62
+ const checkboxes = useMemo(
63
+ () => getCheckboxesByWorkHours(workHours),
64
+ [workHours]
65
+ );
66
+
67
+ useImperativeHandle(ref, () => {
68
+ return {
69
+ trigger,
70
+ getValues,
71
+ setError,
72
+ };
73
+ });
74
+
75
+ const onChange = (option: string) => {
76
+ const isAlreadyChecked = availableTimes.includes(option);
77
+ if (errorMessage) {
78
+ clearErrorMessage();
79
+ }
80
+ if (isAlreadyChecked) {
81
+ setValue(
82
+ "availableTimes",
83
+ availableTimes.filter((value) => value !== option)
84
+ );
85
+
86
+ return;
87
+ }
88
+
89
+ setValue("availableTimes", [...availableTimes, option]);
61
90
  };
62
- });
63
-
64
- const onChange = (option: string) => {
65
- const timeWithOffset = calculateTimeWithOffset(option);
66
-
67
- const isAlreadyChecked = availableTimes.includes(timeWithOffset);
68
-
69
- if (isAlreadyChecked) {
70
- setValue(
71
- "availableTimes",
72
- availableTimes.filter((value) => value !== timeWithOffset)
73
- );
74
-
75
- return;
76
- }
77
-
78
- setValue("availableTimes", [...availableTimes, timeWithOffset]);
79
- };
80
-
81
- useEffect(() => {
82
- if (!defaultValues) return;
83
-
84
- reset({ availableTimes: defaultValues });
85
- // eslint-disable-next-line react-hooks/exhaustive-deps
86
- }, [defaultValues]);
87
-
88
- return (
89
- <Form.Group controlId={nameId}>
90
- <Form.Label>{t("Design:startTimes")}</Form.Label>
91
- <div className="zone-available-times">
92
- {checkboxes.map((option) => {
93
- return (
94
- <Form.Check key={option} inline custom id={option}>
95
- <Form.Check.Input
96
- type="checkbox"
97
- value={option}
98
- checked={availableTimes.includes(
99
- calculateTimeWithOffset(option)
100
- )}
101
- onChange={() => onChange(option)}
102
- disabled={isLoading}
103
- />
104
- <Form.Check.Label>{option}</Form.Check.Label>
105
- </Form.Check>
106
- );
107
- })}
108
- </div>
109
91
 
110
- <Form.Control
111
- type="hidden"
112
- {...register("availableTimes", {
113
- required: {
114
- value: true,
115
- message: t("Validation:fieldMinNumber", {
116
- attribute: t("startTimes"),
117
- min: 1,
118
- }),
119
- },
120
- })}
121
- />
122
- <div className="manual-form-error">{errors.availableTimes?.message}</div>
123
- </Form.Group>
124
- );
125
- });
92
+ useEffect(() => {
93
+ if (!defaultValues) return;
94
+
95
+ reset({ availableTimes: defaultValues });
96
+ // eslint-disable-next-line react-hooks/exhaustive-deps
97
+ }, [defaultValues]);
98
+
99
+ return (
100
+ <Form.Group controlId={nameId}>
101
+ <Form.Label>{t("Design:startTimes")}</Form.Label>
102
+ <div className="zone-available-times">
103
+ {checkboxes.map((option) => {
104
+ return (
105
+ <Form.Check key={option} inline custom id={option}>
106
+ <Form.Check.Input
107
+ type="checkbox"
108
+ value={option}
109
+ checked={availableTimes.includes(option)}
110
+ onChange={() => onChange(option)}
111
+ disabled={isLoading}
112
+ />
113
+ <Form.Check.Label>{option}</Form.Check.Label>
114
+ </Form.Check>
115
+ );
116
+ })}
117
+ </div>
118
+
119
+ <Form.Control type="hidden" {...register("availableTimes")} />
120
+ <div className="manual-form-error">
121
+ {errors.availableTimes?.message || errorMessage}
122
+ </div>
123
+ </Form.Group>
124
+ );
125
+ }
126
+ );
@@ -0,0 +1,46 @@
1
+ import React from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ import { Form } from "react-bootstrap";
4
+ import { useFormContext } from "react-hook-form";
5
+ import { useId } from "@react-aria/utils";
6
+ import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
7
+ import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
8
+
9
+ type GameDurationControlProps = {
10
+ isLoading: boolean;
11
+ };
12
+
13
+ export const GameDurationControl = ({
14
+ isLoading,
15
+ }: GameDurationControlProps) => {
16
+ const nameId = useId();
17
+ const { t } = useTranslation(["Design", "Validation"]);
18
+
19
+ const {
20
+ register,
21
+ formState: { errors },
22
+ } = useFormContext<Pick<Zone, "defaultDuration">>();
23
+
24
+ return (
25
+ <Form.Group controlId={nameId}>
26
+ <Form.Label>{t("Design:defaultGameDuration")}</Form.Label>
27
+ <Form.Control
28
+ type="number"
29
+ {...register("defaultDuration", {
30
+ required: false,
31
+ min: 1,
32
+ })}
33
+ placeholder={t("Design:duration")}
34
+ isInvalid={Boolean(errors.defaultDuration)}
35
+ disabled={isLoading}
36
+ />
37
+ <Form.Control.Feedback type="invalid">
38
+ {HookFormService.hasError(errors.defaultDuration, "min") &&
39
+ t("Validation:fieldMinNumber", {
40
+ attribute: t("Design:defaultGameDuration").toLowerCase(),
41
+ min: 1,
42
+ })}
43
+ </Form.Control.Feedback>
44
+ </Form.Group>
45
+ );
46
+ };
@@ -7,26 +7,25 @@ import { SortControl } from "./SortControl";
7
7
  import { ZoneRecurrencesControl } from "./ZoneRecurrencesControl";
8
8
  import { DescriptionControl } from "./DescriptionControl";
9
9
  import { ZoneImageControl } from "./ZoneImageControl";
10
+ import { GameDurationControl } from "./GameDurationControl";
10
11
 
11
12
  export type ZoneControlProps = {
12
13
  isLoading: boolean;
13
14
  workHours?: WorkHour[];
14
15
  };
15
16
 
16
- export const ZoneControl = ({
17
- isLoading,
18
- workHours = [],
19
- }: ZoneControlProps) => {
17
+ export const ZoneControl = ({ isLoading }: ZoneControlProps) => {
20
18
  return (
21
19
  <Row>
22
20
  <Col md={6} sm={12} className="pr-5">
23
21
  <NameControl isLoading={isLoading} />
24
- <ZoneRecurrencesControl workHours={workHours} isLoading={isLoading} />
22
+ <ZoneRecurrencesControl />
25
23
  <hr />
26
24
  <Row>
27
25
  <Col md={6} sm={6}>
28
26
  <ZoneTypeControl isLoading={isLoading} />
29
27
  <SortControl isLoading={isLoading} />
28
+ <GameDurationControl isLoading={isLoading} />
30
29
  </Col>
31
30
  <Col md={6} sm={6}>
32
31
  <ZoneImageControl isLoading={isLoading} />
@@ -11,12 +11,7 @@ import {
11
11
  } from "@dnd-kit/sortable";
12
12
  import { DndContext } from "@dnd-kit/core";
13
13
  import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
14
- import { DateTime } from "luxon";
15
- import { TIME_FORMAT } from "@licklist/core/dist/Config";
16
- import {
17
- calculateTimeWithOffset,
18
- DIRECTION_TO_LOCAL,
19
- } from "@licklist/plugins/dist/utils/time";
14
+
20
15
  import { CONFIRM_MODAL_ACTIONS } from "../../../modals/confirmation/ConfirmModal";
21
16
  import { Icon } from "../../../static";
22
17
  import {
@@ -24,10 +19,6 @@ import {
24
19
  RecurringDatePickerInputValues,
25
20
  } from "../../../recurring-date-picker-input/RecurringDatePickerInput";
26
21
  import { ZoneRecurrenceControl } from "./ZoneRecurrenceControl";
27
- import {
28
- AvailableTimesControl,
29
- AvailableTimesControlRef,
30
- } from "./AvailableTimesControl";
31
22
  import { sameWidthPopperModifier } from "../../../product-set/control/DateAndRecurrenceInput";
32
23
 
33
24
  export interface DateAndRecurrenceInputValues {
@@ -39,10 +30,7 @@ export type ZoneRecurrenceControlProps = {
39
30
  isLoading?: boolean;
40
31
  };
41
32
 
42
- export const ZoneRecurrencesControl = ({
43
- workHours,
44
- isLoading = false,
45
- }: ZoneRecurrenceControlProps) => {
33
+ export const ZoneRecurrencesControl = () => {
46
34
  const {
47
35
  control,
48
36
  register,
@@ -66,10 +54,7 @@ export const ZoneRecurrencesControl = ({
66
54
  values: null,
67
55
  });
68
56
  const clearEditState = () => setEditState({ index: null, values: null });
69
- const [availableTimes, setAvailableTimes] = useState<string[]>([]);
70
-
71
57
  const popoverRef = useRef<HTMLDivElement>();
72
- const availableTimesFormRef = useRef<AvailableTimesControlRef>();
73
58
 
74
59
  useClickAway(popoverRef, (event) => {
75
60
  const isModal = CONFIRM_MODAL_ACTIONS.includes(
@@ -92,45 +77,12 @@ export const ZoneRecurrencesControl = ({
92
77
  const handleRecurringDateChange = async (
93
78
  next: RecurringDatePickerInputValues
94
79
  ) => {
95
- const isAvailableTimesFormValid =
96
- await availableTimesFormRef.current?.trigger();
97
- if (!isAvailableTimesFormValid) {
98
- return;
99
- }
100
- if (next?.startTime && next?.endTime) {
101
- const startTime = DateTime.fromISO(next.startTime);
102
- const endTime = DateTime.fromISO(next.endTime);
103
- const { availableTimes } = availableTimesFormRef.current.getValues();
104
- const validAvalilableTimes = availableTimes.every((time) => {
105
- const currentAvailableTime = DateTime.fromFormat(
106
- calculateTimeWithOffset(time, DIRECTION_TO_LOCAL),
107
- TIME_FORMAT
108
- );
109
-
110
- return (
111
- currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
112
- currentAvailableTime.diff(endTime, "minutes").minutes <= 0
113
- );
114
- });
115
- if (!validAvalilableTimes) {
116
- availableTimesFormRef.current.setError("availableTimes", {
117
- message: t("Validation:fieldTimeBetween", {
118
- attribute: t("Design:startTimesSmall"),
119
- min: startTime.toFormat(TIME_FORMAT),
120
- max: endTime.toFormat(TIME_FORMAT),
121
- }),
122
- });
123
-
124
- return;
125
- }
126
- }
127
80
  const values = {
128
81
  rrule: next.rrule,
129
82
  startDate: next.startDate,
130
83
  endDate: next.endDate,
131
84
  startTime: next.startTime,
132
85
  endTime: next.endTime,
133
- ...availableTimesFormRef.current.getValues(),
134
86
  } as Partial<ZoneRecurrence>;
135
87
 
136
88
  if (editState.values?.id) {
@@ -151,7 +103,6 @@ export const ZoneRecurrencesControl = ({
151
103
  clearEditState();
152
104
 
153
105
  setEditState({ index, values: next });
154
- setAvailableTimes(next.availableTimes || []);
155
106
  setIsDatePopoverVisible(() => true);
156
107
  };
157
108
 
@@ -215,14 +166,7 @@ export const ZoneRecurrencesControl = ({
215
166
  onChange={handleRecurringDateChange}
216
167
  onDelete={handleDelete}
217
168
  setInitialStartDateAfterSelect
218
- >
219
- <AvailableTimesControl
220
- workHours={workHours}
221
- isLoading={isLoading}
222
- defaultValues={availableTimes}
223
- ref={availableTimesFormRef}
224
- />
225
- </RecurringDatePickerInput>
169
+ />
226
170
  </Popover.Content>
227
171
  </Popover>
228
172
  }
@@ -1,5 +1,7 @@
1
- import { datetime, TIME_SEPARATOR } from "@licklist/core/dist/Services/Date";
1
+ import { TIME_SEPARATOR } from "@licklist/core/dist/Services/Date";
2
2
  import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
3
+ import { DateTime } from "luxon";
4
+ import { TIME_FORMAT } from "@licklist/core/dist/Config";
3
5
 
4
6
  const DEFAULT_START_DAY_TIME = "00:00";
5
7
  const DEFAULT_END_DAY_TIME = "23:59";
@@ -13,46 +15,37 @@ export const getTimeCheckboxRanges = (
13
15
  const [startHour, startMinutes] = startTime.split(TIME_SEPARATOR);
14
16
  const [endHour, endMinutes] = endTime.split(TIME_SEPARATOR);
15
17
 
16
- let startDate = datetime(
17
- today.getFullYear(),
18
- today.getMonth() + 1,
19
- today.getDate(),
20
- Number(startHour),
21
- Number(startMinutes)
22
- );
23
-
24
- const endDate = datetime(
25
- today.getFullYear(),
26
- today.getMonth() + 1,
27
- today.getDate(),
28
- Number(endHour),
29
- Number(endMinutes)
30
- );
31
-
32
- const dateSlices: { [key: string]: Date } = {
33
- 0: startDate,
34
- };
18
+ let startDate = DateTime.now()
19
+ .setZone("UTC")
20
+ .set({
21
+ year: today.getFullYear(),
22
+ month: today.getMonth() + 1,
23
+ day: today.getDate(),
24
+ hour: Number(startHour),
25
+ minute: Number(startMinutes),
26
+ second: 0,
27
+ });
28
+
29
+ const endDate = DateTime.now()
30
+ .setZone("UTC")
31
+ .set({
32
+ year: today.getFullYear(),
33
+ month: today.getMonth() + 1,
34
+ day: today.getDate(),
35
+ hour: Number(endHour),
36
+ minute: Number(endMinutes),
37
+ second: 0,
38
+ });
39
+
40
+ const checkboxes: string[] = [startDate.toFormat(TIME_FORMAT)];
35
41
  let count = 0;
36
42
 
37
- while (endDate >= startDate) {
38
- startDate = new Date(startDate.getTime() + range * 60 * 1000);
43
+ while (endDate.diff(startDate, ["minutes"]).minutes >= range) {
44
+ startDate = startDate.plus({ minutes: range });
39
45
  count += 1;
40
- dateSlices[count] = startDate;
46
+ checkboxes[count] = startDate.toFormat(TIME_FORMAT);
41
47
  }
42
48
 
43
- const checkboxes = Object.keys(dateSlices)
44
- .map((key) => {
45
- const date = dateSlices[key];
46
- if (date < endDate) {
47
- const [, time] = date.toISOString().split("T");
48
- const [selectedHours, selectedMinutes] = time.split(TIME_SEPARATOR);
49
-
50
- return [selectedHours, selectedMinutes].join(TIME_SEPARATOR);
51
- }
52
- return null;
53
- })
54
- .filter(Boolean);
55
-
56
49
  return checkboxes;
57
50
  };
58
51
 
@@ -1,12 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
3
- export interface ActivityCardProps {
4
- title: ReactNode;
5
- duration: ReactNode;
6
- price: ReactNode;
7
- image?: Image | null;
8
- onSelect: () => void;
9
- isSelected: boolean;
10
- }
11
- export declare const ActivityCard: ({ title, duration, price, image, onSelect, isSelected, }: ActivityCardProps) => JSX.Element;
12
- //# sourceMappingURL=ActivityCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/activity-cards/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAE7E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,6DAOtB,iBAAiB,gBAiBnB,CAAC"}