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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/dist/assets/iframe/available.svg.js +1 -0
  2. package/dist/assets/iframe/limited.svg.js +1 -0
  3. package/dist/assets/iframe/soldOut.svg.js +1 -0
  4. package/dist/assets/logo/bookedit.svg +9 -11
  5. package/dist/assets/logo/bookedit.svg.js +1 -1
  6. package/dist/assets/logo/favicon.svg +12 -0
  7. package/dist/assets/logo/licklist.svg +0 -2
  8. package/dist/assets/logo/licklist.svg.js +1 -1
  9. package/dist/availability-indicator/AvailabilityIndicator.d.ts +9 -0
  10. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -0
  11. package/dist/availability-indicator/AvailabilityIndicator.js +1 -0
  12. package/dist/availability-indicator/index.d.ts +2 -0
  13. package/dist/availability-indicator/index.d.ts.map +1 -0
  14. package/dist/calendar/Calendar.d.ts +21 -0
  15. package/dist/calendar/Calendar.d.ts.map +1 -0
  16. package/dist/calendar/Calendar.js +1 -0
  17. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  18. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  19. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  20. package/dist/calendar/components/CalendarButtons/index.d.ts.map +1 -0
  21. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +5 -0
  22. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  23. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -0
  24. package/dist/calendar/components/CalendarDates/index.d.ts.map +1 -0
  25. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  26. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  27. package/dist/calendar/components/CalendarSelect/index.d.ts.map +1 -0
  28. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  29. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  30. package/dist/calendar/index.d.ts +4 -0
  31. package/dist/calendar/index.d.ts.map +1 -0
  32. package/dist/calendar/utils/index.d.ts +5 -0
  33. package/dist/calendar/utils/index.d.ts.map +1 -0
  34. package/dist/calendar/utils/index.js +1 -0
  35. package/dist/date-time-button/DateTimeButton.d.ts +7 -1
  36. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  37. package/dist/date-time-button/DateTimeButton.js +1 -1
  38. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  39. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  40. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  41. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  42. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  43. package/dist/events/event-card/EventCard.js +1 -1
  44. package/dist/events/event-card/utils.d.ts +2 -0
  45. package/dist/events/event-card/utils.d.ts.map +1 -1
  46. package/dist/events/event-card/utils.js +1 -1
  47. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  48. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  49. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  50. package/dist/file-upload/FileUpload.js +1 -1
  51. package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
  52. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
  53. package/dist/iframe/activity-card/ActivityCard.js +1 -0
  54. package/dist/iframe/activity-card/index.d.ts +2 -0
  55. package/dist/iframe/activity-card/index.d.ts.map +1 -0
  56. package/dist/iframe/event/index.d.ts +0 -2
  57. package/dist/iframe/event/index.d.ts.map +1 -1
  58. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  59. package/dist/iframe/event/ticket-description/TicketDescription.js +1 -1
  60. package/dist/iframe/index.d.ts +2 -2
  61. package/dist/iframe/index.d.ts.map +1 -1
  62. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  63. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  64. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  65. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  66. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +2 -1
  67. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  68. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  69. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  70. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  71. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  72. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  73. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  74. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  75. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -0
  76. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  77. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  78. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +2 -1
  79. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  80. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  81. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  82. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  83. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  84. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +4 -3
  85. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  86. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  87. package/dist/iframe/order-process/constants.d.ts +1 -0
  88. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  89. package/dist/iframe/order-process/constants.js +1 -1
  90. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  91. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  92. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  93. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  94. package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
  95. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  96. package/dist/iframe/payment/order-items-table/types/index.js +1 -0
  97. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
  98. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
  99. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
  100. package/dist/index.d.ts +3 -0
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  104. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  105. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  106. package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
  107. package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
  108. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  109. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
  110. package/dist/number-of-people-input/components/index.d.ts +2 -0
  111. package/dist/number-of-people-input/components/index.d.ts.map +1 -0
  112. package/dist/number-of-people-input/index.d.ts +3 -0
  113. package/dist/number-of-people-input/index.d.ts.map +1 -0
  114. package/dist/product-set/control/ProductSetControl.d.ts +2 -2
  115. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  116. package/dist/product-set/control/ProductSetControl.js +1 -1
  117. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  118. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  119. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  120. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  121. package/dist/product-set/form/ProductsControl.d.ts +3 -1
  122. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  123. package/dist/product-set/form/ProductsControl.js +1 -1
  124. package/dist/product-set/product/ProductControl.d.ts +2 -1
  125. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  126. package/dist/product-set/product/ProductControl.js +1 -1
  127. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  128. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  129. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  130. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  131. package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
  132. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  133. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  134. package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
  135. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  136. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  137. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +4 -1
  138. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  139. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  140. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -0
  141. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  142. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  143. package/dist/report/form/ReportForm.d.ts.map +1 -1
  144. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  145. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  146. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  147. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  148. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
  149. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  150. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  151. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  152. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  153. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  154. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  155. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  156. package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
  157. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  158. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  159. package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  160. package/{src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → dist/styles/activity-card/ListActivitiesCard.scss} +2 -1
  161. package/dist/styles/activity-card/_index.scss +2 -0
  162. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  163. package/dist/styles/availability-indicator/_index.scss +1 -0
  164. package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  165. package/dist/styles/date-time-button/_index.scss +1 -0
  166. package/dist/styles/events/EventCard.scss +10 -3
  167. package/dist/styles/form/CustomCheckbox.scss +5 -0
  168. package/dist/styles/header/Header.scss +0 -4
  169. package/dist/styles/iframe-events/Card.scss +1 -0
  170. package/dist/styles/notification/Notification.scss +4 -0
  171. package/dist/styles/packages.scss +3 -1
  172. package/dist/styles/resources-blocking/_index.scss +5 -0
  173. package/dist/styles/sales/BookingResults.scss +9 -1
  174. package/dist/styles/themes/bookedit/_index.scss +1 -0
  175. package/dist/types/iframe.d.ts +1 -0
  176. package/dist/types/iframe.d.ts.map +1 -1
  177. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  178. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  179. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  180. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  181. package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
  182. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
  183. package/dist/zone/form/components/GameDurationControl.js +1 -0
  184. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  185. package/dist/zone/form/components/ZoneControl.js +1 -1
  186. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  187. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  188. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  189. package/dist/zone/form/utils/dates.js +1 -1
  190. package/package.json +3 -3
  191. package/src/assets/logo/bookedit.svg +9 -11
  192. package/src/assets/logo/favicon.svg +12 -0
  193. package/src/assets/logo/licklist.svg +0 -2
  194. package/src/availability-indicator/AvailabilityIndicator.tsx +59 -0
  195. package/src/availability-indicator/index.ts +1 -0
  196. package/src/calendar/Calendar.stories.tsx +33 -0
  197. package/src/calendar/Calendar.tsx +46 -0
  198. package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
  199. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +24 -19
  200. package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  201. package/src/calendar/index.ts +3 -0
  202. package/src/calendar/utils/index.ts +28 -0
  203. package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
  204. package/src/date-time-button/DateTimeButton.tsx +19 -22
  205. package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
  206. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -12
  207. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  208. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
  209. package/src/events/event-card/EventCard.tsx +6 -2
  210. package/src/events/event-card/utils.ts +13 -0
  211. package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
  212. package/src/file-upload/FileUpload.tsx +3 -1
  213. package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
  214. package/src/iframe/activity-card/ActivityCard.tsx +77 -0
  215. package/src/iframe/activity-card/index.ts +1 -0
  216. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -2
  217. package/src/iframe/event/index.ts +0 -7
  218. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +8 -2
  219. package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -2
  220. package/src/iframe/index.ts +1 -3
  221. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +4 -3
  222. package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -1
  223. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
  224. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
  225. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +17 -8
  226. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +1 -15
  227. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +5 -0
  228. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +12 -9
  229. package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
  230. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +62 -32
  231. package/src/iframe/order-process/constants.ts +1 -0
  232. package/src/iframe/page/Page.stories.tsx +2 -2
  233. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
  234. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
  235. package/src/iframe/payment/order-items-table/types/index.ts +18 -1
  236. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
  237. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  238. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  239. package/src/index.ts +3 -0
  240. package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
  241. package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  242. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
  243. package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  244. package/src/number-of-people-input/components/index.ts +1 -0
  245. package/src/number-of-people-input/index.ts +2 -0
  246. package/src/product-set/control/ProductSetControl.stories.tsx +0 -2
  247. package/src/product-set/control/ProductSetControl.tsx +36 -10
  248. package/src/product-set/control/ProductSetRecurrenceControl.tsx +8 -4
  249. package/src/product-set/form/ProductCategoriesControl.tsx +2 -1
  250. package/src/product-set/form/ProductSetForm.stories.tsx +3 -10
  251. package/src/product-set/form/ProductsControl.tsx +10 -0
  252. package/src/product-set/product/ProductControl.tsx +28 -1
  253. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  254. package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
  255. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -30
  256. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  257. package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
  258. package/src/recurrence-input/RecurrenceInput.tsx +12 -2
  259. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +24 -21
  260. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +9 -0
  261. package/src/report/form/ReportForm.tsx +1 -1
  262. package/src/sales/booking/results/BookingResults.stories.tsx +0 -7
  263. package/src/sales/booking/results/components/ResultCard.tsx +9 -3
  264. package/src/sales/coupon/control/CouponFormControl.tsx +5 -0
  265. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
  266. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
  267. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +31 -28
  268. package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
  269. package/src/static/RestrictedAccess.tsx +1 -1
  270. package/src/static/form-number-input/FormNumberInput.tsx +8 -1
  271. package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  272. package/{dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss → src/styles/activity-card/ListActivitiesCard.scss} +2 -1
  273. package/src/styles/activity-card/_index.scss +2 -0
  274. package/src/styles/availability-indicator/AvailabilityIndicator.scss +7 -0
  275. package/src/styles/availability-indicator/_index.scss +1 -0
  276. package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +6 -12
  277. package/src/styles/date-time-button/_index.scss +1 -0
  278. package/src/styles/events/EventCard.scss +10 -3
  279. package/src/styles/form/CustomCheckbox.scss +5 -0
  280. package/src/styles/header/Header.scss +0 -4
  281. package/src/styles/iframe-events/Card.scss +1 -0
  282. package/src/styles/notification/Notification.scss +4 -0
  283. package/src/styles/packages.scss +3 -1
  284. package/src/styles/resources-blocking/_index.scss +5 -0
  285. package/src/styles/sales/BookingResults.scss +9 -1
  286. package/src/styles/themes/bookedit/_index.scss +1 -0
  287. package/src/types/iframe.ts +1 -0
  288. package/src/typings.d.ts +11 -0
  289. package/src/virtualized/components/VirtualizedWindowScroller.tsx +2 -1
  290. package/src/zone/form/components/AvailableTimesControl.tsx +4 -9
  291. package/src/zone/form/components/GameDurationControl.tsx +46 -0
  292. package/src/zone/form/components/ZoneControl.tsx +2 -0
  293. package/src/zone/form/components/ZoneRecurrencesControl.tsx +27 -35
  294. package/src/zone/form/utils/dates.ts +29 -36
  295. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
  296. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
  297. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
  298. package/dist/iframe/activity-cards/index.d.ts +0 -3
  299. package/dist/iframe/activity-cards/index.d.ts.map +0 -1
  300. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
  301. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
  302. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
  303. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -7
  304. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
  305. package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
  306. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  307. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  308. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  309. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
  310. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +0 -12
  311. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
  312. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
  313. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +0 -3
  314. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
  315. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -7
  316. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  317. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
  318. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
  319. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  320. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  321. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
  322. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  323. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  324. package/dist/iframe/event/event-calendar/index.d.ts +0 -4
  325. package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
  326. package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
  327. package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
  328. package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
  329. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
  330. package/dist/iframe/event/event-calendar/utils/index.js +0 -1
  331. package/dist/iframe/event/event-details/EventDetails.d.ts +0 -10
  332. package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
  333. package/dist/iframe/event/event-details/EventDetails.js +0 -1
  334. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
  335. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
  336. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
  337. package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
  338. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
  339. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
  340. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
  341. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
  342. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
  343. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
  344. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  345. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
  346. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  347. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
  348. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
  349. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
  350. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
  351. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
  352. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
  353. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
  354. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
  355. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
  356. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
  357. package/dist/iframe/event/event-details/index.d.ts +0 -2
  358. package/dist/iframe/event/event-details/index.d.ts.map +0 -1
  359. package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
  360. package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
  361. package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
  362. package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
  363. package/dist/iframe/event/event-details/utils/routes.js +0 -1
  364. package/dist/styles/iframe-customers-journey/_index.scss +0 -3
  365. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
  366. package/src/iframe/activity-cards/index.ts +0 -2
  367. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
  368. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
  369. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -36
  370. package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -27
  371. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +0 -51
  372. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +0 -2
  373. package/src/iframe/event/event-calendar/index.ts +0 -6
  374. package/src/iframe/event/event-calendar/types/index.ts +0 -6
  375. package/src/iframe/event/event-calendar/utils/index.ts +0 -11
  376. package/src/iframe/event/event-details/EventDetails.stories.tsx +0 -187
  377. package/src/iframe/event/event-details/EventDetails.tsx +0 -92
  378. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
  379. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
  380. package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
  381. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
  382. package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
  383. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
  384. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
  385. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
  386. package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
  387. package/src/iframe/event/event-details/index.ts +0 -1
  388. package/src/iframe/event/event-details/utils/index.ts +0 -1
  389. package/src/iframe/event/event-details/utils/routes.ts +0 -6
  390. package/src/styles/iframe-customers-journey/_index.scss +0 -3
  391. /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  392. /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  393. /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  394. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
  395. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
  396. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  397. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
  398. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  399. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  400. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  401. /package/dist/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  402. /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  403. /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  404. /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  405. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
  406. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
  407. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
  408. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  409. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -15,6 +15,7 @@ interface FormNumberInputProps {
15
15
  label: string;
16
16
  fieldName: string;
17
17
  step?: number;
18
+ onChange?: (value: number) => void;
18
19
  disabled?: boolean;
19
20
  rules?: Pick<
20
21
  RegisterOptions,
@@ -28,6 +29,7 @@ export const FormNumberInput = ({
28
29
  step = 1,
29
30
  rules,
30
31
  disabled,
32
+ onChange,
31
33
  }: FormNumberInputProps) => {
32
34
  const controlId = useId();
33
35
  const { t } = useTranslation("Validation");
@@ -76,7 +78,12 @@ export const FormNumberInput = ({
76
78
  disabled={disabled}
77
79
  isInvalid={HookFormService.isInvalid(fieldName, errors)}
78
80
  {...field}
79
- onChange={(event) => field.onChange(Number(event.target.value))}
81
+ onChange={(event) => {
82
+ if (onChange) {
83
+ onChange(Number(event.target.value));
84
+ }
85
+ field.onChange(Number(event.target.value));
86
+ }}
80
87
  onFocus={onFocus}
81
88
  />
82
89
  )}
@@ -11,7 +11,7 @@
11
11
  word-wrap: break-word;
12
12
  background-color: #fff;
13
13
  font-size: 0.8rem;
14
- color: $snippet-elements-body-color;
14
+ background-color: $snippet-product-set-background-color;
15
15
 
16
16
  div {
17
17
  text-align: left;
@@ -6,8 +6,9 @@
6
6
  align-items: center;
7
7
  cursor: pointer;
8
8
  height: 5rem;
9
+ padding: 0.375rem;
9
10
  border: 2px solid transparent;
10
- border: 2px solid transparent;
11
+ border-radius: 0.5rem;
11
12
  background-color: $snippet-product-set-background-color;
12
13
  color: $snippet-product-set-font-color;
13
14
  transition: $color-transition;
@@ -0,0 +1,2 @@
1
+ @import "./GridActivitiesCard.scss";
2
+ @import "./ListActivitiesCard.scss";
@@ -0,0 +1,7 @@
1
+ .availability-indicator {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ gap: 0.5rem;
6
+ font-weight: 300;
7
+ }
@@ -0,0 +1 @@
1
+ @import "./AvailabilityIndicator.scss";
@@ -86,6 +86,12 @@
86
86
  max-width: 5.3rem;
87
87
  min-height: 2.75rem;
88
88
  }
89
+
90
+ &.calendar-view {
91
+ min-width: auto;
92
+ max-width: none;
93
+ min-height: auto;
94
+ }
89
95
  }
90
96
 
91
97
  .time {
@@ -99,15 +105,3 @@
99
105
  font-weight: 300;
100
106
  color: $snippet-calendar-button-font-color;
101
107
  }
102
-
103
- .info {
104
- display: flex;
105
- justify-content: center;
106
- font-weight: 300;
107
- flex-direction: row;
108
-
109
- .logo {
110
- width: 0.5rem;
111
- margin-right: 0.5rem;
112
- }
113
- }
@@ -0,0 +1 @@
1
+ @import "./DateTimeButton.scss";
@@ -34,7 +34,7 @@ $event-card-views-gutter: sp(3) !default;
34
34
  transition: ease-in 0.25s;
35
35
  border-radius: $event-card-border-radius;
36
36
 
37
- > * + * {
37
+ >*+* {
38
38
  margin-top: $event-card-contents-gutter;
39
39
  }
40
40
 
@@ -43,9 +43,16 @@ $event-card-views-gutter: sp(3) !default;
43
43
 
44
44
  .event-description {
45
45
  min-height: 8rem;
46
+ max-height: 21rem;
47
+ overflow: hidden;
48
+
49
+ &:last-child {
50
+ text-overflow: ellipsis;
51
+ }
46
52
 
47
53
  &.no-image {
48
54
  min-height: 13.75rem;
55
+ max-height: 22rem;
49
56
  }
50
57
  }
51
58
  }
@@ -75,7 +82,7 @@ $event-card-views-gutter: sp(3) !default;
75
82
  }
76
83
 
77
84
  &:hover {
78
- box-shadow: 0px 0px 1rem 0px rgb(0 0 0 / 20%);
85
+ box-shadow: 0px 0px 1rem 0px rgb(0 0 0 / 20%);
79
86
  }
80
87
  }
81
88
 
@@ -168,4 +175,4 @@ $event-card-views-gutter: sp(3) !default;
168
175
  color: #504f4f;
169
176
  width: 1.7rem;
170
177
  }
171
- }
178
+ }
@@ -1,6 +1,7 @@
1
1
  .custom-checkbox {
2
2
  margin-top: 1rem;
3
3
  display: flex;
4
+ z-index: 2;
4
5
  align-items: center;
5
6
 
6
7
  .custom-checkbox .custom-control-label::before {
@@ -21,4 +22,8 @@
21
22
  font-weight: 400;
22
23
  font-size: 0.875rem;
23
24
  }
25
+
26
+ .checkbox-input {
27
+ z-index: 2;
28
+ }
24
29
  }
@@ -11,10 +11,6 @@
11
11
  }
12
12
  }
13
13
 
14
- svg {
15
- max-height: 1rem;
16
- }
17
-
18
14
  .navbar-nav {
19
15
  line-height: 1;
20
16
  margin-top: 4px;
@@ -142,6 +142,7 @@
142
142
  .card-body {
143
143
  padding: 0;
144
144
  margin: 0 0 auto;
145
+ margin-top: 1rem;
145
146
  }
146
147
  }
147
148
 
@@ -15,6 +15,10 @@
15
15
  display: none !important;
16
16
  }
17
17
  }
18
+
19
+ &.is-invalid {
20
+ border-color: theme-color("danger");
21
+ }
18
22
  }
19
23
 
20
24
  .placeholder-row {
@@ -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,11 @@
7
7
  overflow: auto;
8
8
  }
9
9
 
10
+ .modal-form-content {
11
+ max-height: 21rem;
12
+ overflow-x: hidden;
13
+ }
14
+
10
15
  .reccurrence-interval-container {
11
16
  .form-group {
12
17
  margin-bottom: 0.5rem;
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 11.125rem;
8
+ height: 12.125rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -62,6 +62,14 @@
62
62
  font-size: 0.6875rem;
63
63
  }
64
64
  }
65
+
66
+ .products {
67
+ display: inline-block;
68
+ width: 80%;
69
+ white-space: nowrap;
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ }
65
73
  }
66
74
 
67
75
  &:hover {
@@ -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
  }
@@ -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}>
@@ -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 = {
@@ -62,20 +61,18 @@ export const AvailableTimesControl = forwardRef<
62
61
  });
63
62
 
64
63
  const onChange = (option: string) => {
65
- const timeWithOffset = calculateTimeWithOffset(option);
66
-
67
- const isAlreadyChecked = availableTimes.includes(timeWithOffset);
64
+ const isAlreadyChecked = availableTimes.includes(option);
68
65
 
69
66
  if (isAlreadyChecked) {
70
67
  setValue(
71
68
  "availableTimes",
72
- availableTimes.filter((value) => value !== timeWithOffset)
69
+ availableTimes.filter((value) => value !== option)
73
70
  );
74
71
 
75
72
  return;
76
73
  }
77
74
 
78
- setValue("availableTimes", [...availableTimes, timeWithOffset]);
75
+ setValue("availableTimes", [...availableTimes, option]);
79
76
  };
80
77
 
81
78
  useEffect(() => {
@@ -95,9 +92,7 @@ export const AvailableTimesControl = forwardRef<
95
92
  <Form.Check.Input
96
93
  type="checkbox"
97
94
  value={option}
98
- checked={availableTimes.includes(
99
- calculateTimeWithOffset(option)
100
- )}
95
+ checked={availableTimes.includes(option)}
101
96
  onChange={() => onChange(option)}
102
97
  disabled={isLoading}
103
98
  />
@@ -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,6 +7,7 @@ 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;
@@ -27,6 +28,7 @@ export const ZoneControl = ({
27
28
  <Col md={6} sm={6}>
28
29
  <ZoneTypeControl isLoading={isLoading} />
29
30
  <SortControl isLoading={isLoading} />
31
+ <GameDurationControl isLoading={isLoading} />
30
32
  </Col>
31
33
  <Col md={6} sm={6}>
32
34
  <ZoneImageControl isLoading={isLoading} />
@@ -12,11 +12,8 @@ import {
12
12
  import { DndContext } from "@dnd-kit/core";
13
13
  import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
14
14
  import { DateTime } from "luxon";
15
- import { TIME_FORMAT, TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
16
- import {
17
- calculateTimeWithOffset,
18
- DIRECTION_TO_LOCAL,
19
- } from "@licklist/plugins/dist/utils/time";
15
+ import { TIME_FORMAT } from "@licklist/core/dist/Config";
16
+
20
17
  import { CONFIRM_MODAL_ACTIONS } from "../../../modals/confirmation/ConfirmModal";
21
18
  import { Icon } from "../../../static";
22
19
  import {
@@ -67,7 +64,6 @@ export const ZoneRecurrencesControl = ({
67
64
  });
68
65
  const clearEditState = () => setEditState({ index: null, values: null });
69
66
  const [availableTimes, setAvailableTimes] = useState<string[]>([]);
70
-
71
67
  const popoverRef = useRef<HTMLDivElement>();
72
68
  const availableTimesFormRef = useRef<AvailableTimesControlRef>();
73
69
 
@@ -97,30 +93,29 @@ export const ZoneRecurrencesControl = ({
97
93
  if (!isAvailableTimesFormValid) {
98
94
  return;
99
95
  }
100
- const startTime = DateTime.fromFormat(next.startTime, TIME_FULL_FORMAT);
101
- const endTime = DateTime.fromFormat(next.endTime, TIME_FULL_FORMAT);
102
- const { availableTimes } = availableTimesFormRef.current.getValues();
103
- const validAvalilableTimes = availableTimes.every((time) => {
104
- const currentAvailableTime = DateTime.fromFormat(
105
- calculateTimeWithOffset(time, DIRECTION_TO_LOCAL),
106
- TIME_FORMAT
107
- );
108
-
109
- return (
110
- currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
111
- currentAvailableTime.diff(endTime, "minutes").minutes <= 0
112
- );
113
- });
114
- if (!validAvalilableTimes) {
115
- availableTimesFormRef.current.setError("availableTimes", {
116
- message: t("Validation:fieldTimeBetween", {
117
- attribute: t("Design:startTimesSmall"),
118
- min: startTime.toFormat(TIME_FORMAT),
119
- max: endTime.toFormat(TIME_FORMAT),
120
- }),
96
+ if (next?.startTime && next?.endTime) {
97
+ const startTime = DateTime.fromISO(next.startTime);
98
+ const endTime = DateTime.fromISO(next.endTime);
99
+ const { availableTimes } = availableTimesFormRef.current.getValues();
100
+ const validAvalilableTimes = availableTimes.every((time) => {
101
+ const currentAvailableTime = DateTime.fromFormat(time, TIME_FORMAT);
102
+
103
+ return (
104
+ currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
105
+ currentAvailableTime.diff(endTime, "minutes").minutes <= 0
106
+ );
121
107
  });
122
-
123
- return;
108
+ if (!validAvalilableTimes) {
109
+ availableTimesFormRef.current.setError("availableTimes", {
110
+ message: t("Validation:fieldTimeBetween", {
111
+ attribute: t("Design:startTimesSmall"),
112
+ min: startTime.toFormat(TIME_FORMAT),
113
+ max: endTime.toFormat(TIME_FORMAT),
114
+ }),
115
+ });
116
+
117
+ return;
118
+ }
124
119
  }
125
120
  const values = {
126
121
  rrule: next.rrule,
@@ -148,12 +143,9 @@ export const ZoneRecurrencesControl = ({
148
143
  const handleOnEdit = (next: Partial<ZoneRecurrence>, index) => {
149
144
  clearEditState();
150
145
 
151
- // Hotfix for an issue with Popover close & open actions
152
- setTimeout(() => {
153
- setEditState({ index, values: next });
154
- setAvailableTimes(next.availableTimes || []);
155
- setIsDatePopoverVisible(() => true);
156
- }, 100);
146
+ setEditState({ index, values: next });
147
+ setAvailableTimes(next.availableTimes || []);
148
+ setIsDatePopoverVisible(() => true);
157
149
  };
158
150
 
159
151
  const handleOnAdd = () => {
@@ -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"}
@@ -1 +0,0 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=e(require("clsx"));exports.ActivityCard=function(e){var c=e.title,i=e.duration,r=e.price,l=e.image,n=e.onSelect,u=e.isSelected;return t.createElement("button",{type:"button",className:a("activity-card",u&&"active"),onClick:n},l&&t.createElement("img",{className:"activity-card-image",alt:"",src:l.url}),t.createElement("div",{className:a("d-flex","flex-column",!l&&"no-image")},t.createElement("div",{className:"activity-card-title"},c),i&&t.createElement("div",null,i),r&&t.createElement("div",null,r)))};
@@ -1,3 +0,0 @@
1
- export * from "./list-activity-card/ListActivityCard";
2
- export * from "./activity-card/ActivityCard";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-cards/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC"}
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
3
- export interface ListActivityCardProps {
4
- title: string;
5
- duration: string;
6
- price: string;
7
- image?: Image | null;
8
- onSelect: () => void;
9
- isSelected: boolean;
10
- }
11
- export declare const ListActivityCard: ({ title, duration, price, image, onSelect, isSelected, }: ListActivityCardProps) => JSX.Element;
12
- //# sourceMappingURL=ListActivityCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListActivityCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,6DAO1B,qBAAqB,gBA4BvB,CAAC"}
@@ -1 +0,0 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=e(require("clsx"));exports.ListActivityCard=function(e){var r=e.title,i=e.duration,l=e.price,c=e.image,n=e.onSelect,s=e.isSelected;return t.createElement("div",{role:"button",onClick:n,onKeyPress:n,tabIndex:0},t.createElement("div",{className:a("list-activity-card",{active:s})},t.createElement("div",{className:"description"},t.createElement("div",{className:"title"},r),i&&t.createElement("div",null,t.createElement("p",null,i)),l&&t.createElement("div",null,l)),c&&t.createElement("div",{className:"image-container"},t.createElement("img",{className:"image",src:c.url,alt:""}))),t.createElement("hr",{className:"list-activity-card-hr"}))};
@@ -1,7 +0,0 @@
1
- import { ReactElement } from "react";
2
- import { CalendarBaseProps } from "./types";
3
- export type EventCalendarProps = CalendarBaseProps & {
4
- fromPrice?: string | ReactElement | null;
5
- };
6
- export declare const EventCalendar: ({ disabledDates, isLoading, fromPrice, }: EventCalendarProps) => JSX.Element;
7
- //# sourceMappingURL=EventCalendar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventCalendar.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/event-calendar/EventCalendar.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,aAAa,6CAIvB,kBAAkB,gBAapB,CAAC"}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("react"),t=(e=a)&&"object"==typeof e&&"default"in e?e.default:e,r=require("./components/CalendarButtons/CalendarButtons.js"),n=require("./components/CalendarDates/CalendarDates.js");exports.EventCalendar=function(e){var a=e.disabledDates,s=void 0===a?[]:a,d=e.isLoading,i=void 0!==d&&d,l=e.fromPrice;return t.createElement("div",{className:"calendar-wrapper"},t.createElement("div",{className:"calendar"},t.createElement(r.CalendarButtons,{disabledDates:s,isLoading:i}),t.createElement(n.CalendarDates,{disabledDates:s,isLoading:i,fromPrice:l})))};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { CalendarBaseProps } from "../../types";
3
- type CalendarButtonsProps = CalendarBaseProps;
4
- export declare const CalendarButtons: ({ disabledDates, isLoading, }: CalendarButtonsProps) => JSX.Element;
5
- export {};
6
- //# sourceMappingURL=CalendarButtons.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CalendarButtons.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,KAAK,oBAAoB,GAAG,iBAAiB,CAAC;AAE9C,eAAO,MAAM,eAAe,kCAGzB,oBAAoB,gBAoGtB,CAAC"}