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

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/logo/bookedit.svg +11 -9
  2. package/dist/assets/logo/bookedit.svg.js +1 -1
  3. package/dist/assets/logo/licklist.svg +2 -0
  4. package/dist/assets/logo/licklist.svg.js +1 -1
  5. package/dist/date-time-button/DateTimeButton.d.ts +1 -6
  6. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  7. package/dist/date-time-button/DateTimeButton.js +1 -1
  8. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  9. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  10. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  11. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  12. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  13. package/dist/events/event-card/EventCard.js +1 -1
  14. package/dist/events/event-card/utils.d.ts +0 -29
  15. package/dist/events/event-card/utils.d.ts.map +1 -1
  16. package/dist/events/event-card/utils.js +1 -1
  17. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +1 -3
  18. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  19. package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
  20. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -2
  21. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  22. package/dist/events/event-statistic-modal/hooks/useTableData.js +1 -1
  23. package/dist/events/event-statistic-modal/utils/index.d.ts +1 -1
  24. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  25. package/dist/events/event-statistic-modal/utils/index.js +1 -1
  26. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  27. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  28. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  29. package/dist/file-upload/FileUpload.js +1 -1
  30. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +12 -0
  31. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +1 -0
  32. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +1 -0
  33. package/dist/iframe/activity-cards/index.d.ts +3 -0
  34. package/dist/iframe/activity-cards/index.d.ts.map +1 -0
  35. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +12 -0
  36. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +1 -0
  37. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +1 -0
  38. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +7 -0
  39. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -0
  40. package/dist/iframe/event/event-calendar/EventCalendar.js +1 -0
  41. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  42. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  43. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  44. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +1 -0
  45. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +12 -0
  46. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -0
  47. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +1 -0
  48. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +3 -0
  49. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +1 -0
  50. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +7 -0
  51. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  52. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +1 -0
  53. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +1 -0
  54. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  55. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  56. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +1 -0
  57. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  58. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  59. package/dist/iframe/event/event-calendar/index.d.ts +4 -0
  60. package/dist/iframe/event/event-calendar/index.d.ts.map +1 -0
  61. package/dist/iframe/event/event-calendar/types/index.d.ts +6 -0
  62. package/dist/iframe/event/event-calendar/types/index.d.ts.map +1 -0
  63. package/dist/iframe/event/event-calendar/utils/index.d.ts +3 -0
  64. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +1 -0
  65. package/dist/iframe/event/event-calendar/utils/index.js +1 -0
  66. package/dist/iframe/event/event-details/EventDetails.d.ts +10 -0
  67. package/dist/iframe/event/event-details/EventDetails.d.ts.map +1 -0
  68. package/dist/iframe/event/event-details/EventDetails.js +1 -0
  69. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +9 -0
  70. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +1 -0
  71. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +1 -0
  72. package/dist/iframe/event/event-details/components/category-product/index.d.ts +2 -0
  73. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +1 -0
  74. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +26 -0
  75. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +1 -0
  76. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +1 -0
  77. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +2 -0
  78. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +1 -0
  79. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  80. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +1 -0
  81. package/dist/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.d.ts +3 -2
  82. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  83. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +1 -0
  84. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +2 -0
  85. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +1 -0
  86. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +2 -0
  87. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +1 -0
  88. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +8 -0
  89. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +1 -0
  90. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +1 -0
  91. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +2 -0
  92. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +1 -0
  93. package/dist/iframe/event/event-details/index.d.ts +2 -0
  94. package/dist/iframe/event/event-details/index.d.ts.map +1 -0
  95. package/dist/iframe/event/event-details/utils/index.d.ts +2 -0
  96. package/dist/iframe/event/event-details/utils/index.d.ts.map +1 -0
  97. package/dist/iframe/event/event-details/utils/routes.d.ts +2 -0
  98. package/dist/iframe/event/event-details/utils/routes.d.ts.map +1 -0
  99. package/dist/iframe/event/event-details/utils/routes.js +1 -0
  100. package/dist/iframe/event/index.d.ts +2 -0
  101. package/dist/iframe/event/index.d.ts.map +1 -1
  102. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  103. package/dist/iframe/event/ticket-description/TicketDescription.js +1 -1
  104. package/dist/iframe/index.d.ts +2 -2
  105. package/dist/iframe/index.d.ts.map +1 -1
  106. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  107. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  108. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  109. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  110. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -2
  111. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  112. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  113. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  114. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  115. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  116. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  117. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  118. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  119. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -4
  120. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  121. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  122. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +1 -2
  123. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  124. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  125. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  126. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  127. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  128. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +3 -4
  129. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  130. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  131. package/dist/iframe/order-process/constants.d.ts +0 -1
  132. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  133. package/dist/iframe/order-process/constants.js +1 -1
  134. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  135. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  136. package/dist/index.d.ts +0 -3
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +1 -1
  139. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  140. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  141. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -5
  142. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  143. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  144. package/dist/product-set/control/ProductSetControl.d.ts +3 -6
  145. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  146. package/dist/product-set/control/ProductSetControl.js +1 -1
  147. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts +1 -2
  148. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  149. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  150. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  151. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  152. package/dist/product-set/form/ProductSetForm.d.ts +1 -3
  153. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  154. package/dist/product-set/form/ProductSetForm.js +1 -1
  155. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  156. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  157. package/dist/product-set/form/ProductsControl.js +1 -1
  158. package/dist/product-set/product/ProductControl.d.ts +1 -2
  159. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  160. package/dist/product-set/product/ProductControl.js +1 -1
  161. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  162. package/dist/product-set/product-category/ProductCategoryControl.d.ts +1 -0
  163. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  164. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  165. package/dist/product-set/utils/index.d.ts +0 -10
  166. package/dist/product-set/utils/index.d.ts.map +1 -1
  167. package/dist/product-set/utils/index.js +1 -1
  168. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  169. package/dist/provider/location-input/LocationInput.js +1 -1
  170. package/dist/provider/location-input/index.d.ts +0 -1
  171. package/dist/provider/location-input/index.d.ts.map +1 -1
  172. package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
  173. package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
  174. package/dist/provider/provider-form/ProviderForm.js +1 -1
  175. package/dist/provider/venue-form/VenueForm.d.ts +1 -3
  176. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  177. package/dist/provider/venue-form/VenueForm.js +1 -1
  178. package/dist/recurrence-input/RecurrenceEndInput.d.ts +1 -8
  179. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  180. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  181. package/dist/recurrence-input/RecurrenceInput.d.ts +1 -2
  182. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  183. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  184. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -4
  185. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  186. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  187. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -1
  188. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  189. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  190. package/dist/report/form/ReportForm.d.ts.map +1 -1
  191. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  192. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  193. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  194. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  195. package/dist/sales/filters/SaleFilters.d.ts +0 -1
  196. package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
  197. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -3
  198. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  199. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  200. package/dist/sales/payment-form/SalePaymentForm.js +1 -1
  201. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  202. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  203. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  204. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  205. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  206. package/dist/static/form-number-input/FormNumberInput.d.ts +1 -2
  207. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  208. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  209. package/dist/styles/events/EventCard.scss +5 -12
  210. package/dist/styles/form/CustomCheckbox.scss +0 -6
  211. package/dist/styles/header/Header.scss +4 -0
  212. package/{src/styles/activity-card/GridActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
  213. package/dist/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  214. package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  215. package/dist/styles/iframe-customers-journey/_index.scss +3 -0
  216. package/dist/styles/iframe-events/Card.scss +0 -1
  217. package/dist/styles/notification/Notification.scss +0 -4
  218. package/dist/styles/packages.scss +1 -3
  219. package/dist/styles/resources-blocking/_index.scss +0 -16
  220. package/dist/styles/sales/BookingResults.scss +6 -14
  221. package/dist/styles/themes/bookedit/_index.scss +0 -1
  222. package/dist/styles/zones/ZoneForm.scss +0 -3
  223. package/dist/types/iframe.d.ts +0 -1
  224. package/dist/types/iframe.d.ts.map +1 -1
  225. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  226. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  227. package/dist/zone/form/ZoneForm.d.ts +1 -1
  228. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  229. package/dist/zone/form/ZoneForm.js +1 -1
  230. package/dist/zone/form/components/AvailableTimesControl.d.ts +0 -2
  231. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  232. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  233. package/dist/zone/form/components/ZoneControl.d.ts +1 -1
  234. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  235. package/dist/zone/form/components/ZoneControl.js +1 -1
  236. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +1 -1
  237. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  238. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  239. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  240. package/dist/zone/form/utils/dates.js +1 -1
  241. package/package.json +3 -3
  242. package/src/assets/logo/bookedit.svg +11 -9
  243. package/src/assets/logo/licklist.svg +2 -0
  244. package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
  245. package/src/date-time-button/DateTimeButton.tsx +22 -24
  246. package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
  247. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +12 -0
  248. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  249. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
  250. package/src/events/event-card/EventCard.tsx +2 -6
  251. package/src/events/event-card/utils.ts +16 -89
  252. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -5
  253. package/src/events/event-statistic-modal/hooks/useTableData.tsx +5 -12
  254. package/src/events/event-statistic-modal/utils/index.ts +34 -39
  255. package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
  256. package/src/file-upload/FileUpload.tsx +1 -3
  257. package/src/iframe/activity-cards/activity-card/ActivityCard.stories.tsx +52 -0
  258. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
  259. package/src/iframe/activity-cards/index.ts +2 -0
  260. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
  261. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
  262. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +36 -0
  263. package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
  264. package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
  265. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
  266. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
  267. package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -24
  268. package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  269. package/src/iframe/event/event-calendar/index.ts +6 -0
  270. package/src/iframe/event/event-calendar/types/index.ts +6 -0
  271. package/src/iframe/event/event-calendar/utils/index.ts +11 -0
  272. package/src/iframe/event/event-details/EventDetails.stories.tsx +187 -0
  273. package/src/iframe/event/event-details/EventDetails.tsx +92 -0
  274. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +123 -0
  275. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +109 -0
  276. package/src/iframe/event/event-details/components/category-product/index.ts +1 -0
  277. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +250 -0
  278. package/src/iframe/event/event-details/components/event-details-form/index.ts +5 -0
  279. package/src/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  280. package/src/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  281. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +1 -0
  282. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +1 -0
  283. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +34 -0
  284. package/src/iframe/event/event-details/components/product-category-view/index.ts +1 -0
  285. package/src/iframe/event/event-details/index.ts +1 -0
  286. package/src/iframe/event/event-details/utils/index.ts +1 -0
  287. package/src/iframe/event/event-details/utils/routes.ts +6 -0
  288. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +2 -1
  289. package/src/iframe/event/index.ts +7 -0
  290. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +2 -8
  291. package/src/iframe/event/ticket-description/TicketDescription.tsx +2 -7
  292. package/src/iframe/index.ts +3 -1
  293. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +3 -4
  294. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -2
  295. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
  296. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +1 -0
  297. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +8 -17
  298. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
  299. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +29 -15
  300. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
  301. package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
  302. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +32 -62
  303. package/src/iframe/order-process/constants.ts +0 -1
  304. package/src/iframe/page/Page.stories.tsx +2 -2
  305. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -13
  306. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  307. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  308. package/src/index.ts +0 -3
  309. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
  310. package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -73
  311. package/src/product-set/control/ProductSetControl.stories.tsx +2 -0
  312. package/src/product-set/control/ProductSetControl.tsx +10 -44
  313. package/src/product-set/control/ProductSetRecurrenceControl.tsx +5 -14
  314. package/src/product-set/form/ProductCategoriesControl.tsx +1 -2
  315. package/src/product-set/form/ProductSetForm.stories.tsx +12 -9
  316. package/src/product-set/form/ProductSetForm.tsx +3 -19
  317. package/src/product-set/form/ProductsControl.tsx +0 -10
  318. package/src/product-set/product/ProductControl.tsx +1 -28
  319. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  320. package/src/product-set/product-category/ProductCategory.stories.tsx +1 -0
  321. package/src/product-set/product-category/ProductCategoryControl.tsx +30 -1
  322. package/src/product-set/utils/index.ts +0 -38
  323. package/src/provider/location-input/LocationInput.tsx +20 -21
  324. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  325. package/src/provider/location-input/index.ts +1 -1
  326. package/src/provider/provider-details-input/ProviderDetailsInput.tsx +13 -5
  327. package/src/provider/venue-form/VenueForm.stories.tsx +0 -24
  328. package/src/provider/venue-form/VenueForm.tsx +4 -55
  329. package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
  330. package/src/recurrence-input/RecurrenceInput.tsx +2 -12
  331. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +11 -21
  332. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
  333. package/src/report/form/ReportForm.tsx +1 -1
  334. package/src/sales/booking/results/BookingResults.stories.tsx +7 -12
  335. package/src/sales/booking/results/components/ResultCard.tsx +3 -24
  336. package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
  337. package/src/sales/filters/SaleFilters.tsx +0 -1
  338. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +7 -0
  339. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +5 -20
  340. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +28 -31
  341. package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
  342. package/src/static/RestrictedAccess.tsx +1 -1
  343. package/src/static/form-number-input/FormNumberInput.tsx +1 -8
  344. package/src/styles/events/EventCard.scss +5 -12
  345. package/src/styles/form/CustomCheckbox.scss +0 -6
  346. package/src/styles/header/Header.scss +4 -0
  347. package/{dist/styles/activity-card/GridActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
  348. package/src/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  349. package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  350. package/src/styles/iframe-customers-journey/_index.scss +3 -0
  351. package/src/styles/iframe-events/Card.scss +0 -1
  352. package/src/styles/notification/Notification.scss +0 -4
  353. package/src/styles/packages.scss +1 -3
  354. package/src/styles/resources-blocking/_index.scss +0 -16
  355. package/src/styles/sales/BookingResults.scss +6 -14
  356. package/src/styles/themes/bookedit/_index.scss +0 -1
  357. package/src/styles/zones/ZoneForm.scss +0 -3
  358. package/src/types/iframe.ts +0 -1
  359. package/src/typings.d.ts +0 -11
  360. package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
  361. package/src/zone/form/ZoneForm.tsx +2 -1
  362. package/src/zone/form/components/AvailableTimesControl.tsx +88 -89
  363. package/src/zone/form/components/ZoneControl.tsx +5 -4
  364. package/src/zone/form/components/ZoneRecurrencesControl.tsx +59 -3
  365. package/src/zone/form/utils/dates.ts +36 -29
  366. package/dist/assets/iframe/available.svg.js +0 -1
  367. package/dist/assets/iframe/limited.svg.js +0 -1
  368. package/dist/assets/iframe/soldOut.svg.js +0 -1
  369. package/dist/assets/logo/favicon.svg +0 -12
  370. package/dist/availability-indicator/AvailabilityIndicator.d.ts +0 -10
  371. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
  372. package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
  373. package/dist/availability-indicator/index.d.ts +0 -2
  374. package/dist/availability-indicator/index.d.ts.map +0 -1
  375. package/dist/calendar/Calendar.d.ts +0 -19
  376. package/dist/calendar/Calendar.d.ts.map +0 -1
  377. package/dist/calendar/Calendar.js +0 -1
  378. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  379. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  380. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  381. package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
  382. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
  383. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  384. package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
  385. package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
  386. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  387. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  388. package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
  389. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  390. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  391. package/dist/calendar/index.d.ts +0 -4
  392. package/dist/calendar/index.d.ts.map +0 -1
  393. package/dist/calendar/utils/index.d.ts +0 -5
  394. package/dist/calendar/utils/index.d.ts.map +0 -1
  395. package/dist/calendar/utils/index.js +0 -1
  396. package/dist/iframe/activity-card/ActivityCard.d.ts +0 -15
  397. package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
  398. package/dist/iframe/activity-card/ActivityCard.js +0 -1
  399. package/dist/iframe/activity-card/index.d.ts +0 -2
  400. package/dist/iframe/activity-card/index.d.ts.map +0 -1
  401. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  402. package/dist/number-of-people-input/NumberOfPeopleInput.js +0 -1
  403. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  404. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +0 -1
  405. package/dist/number-of-people-input/components/index.d.ts +0 -2
  406. package/dist/number-of-people-input/components/index.d.ts.map +0 -1
  407. package/dist/number-of-people-input/index.d.ts +0 -3
  408. package/dist/number-of-people-input/index.d.ts.map +0 -1
  409. package/dist/provider/location-input/components/FormGroupControll.d.ts +0 -7
  410. package/dist/provider/location-input/components/FormGroupControll.d.ts.map +0 -1
  411. package/dist/provider/location-input/components/FormGroupControll.js +0 -1
  412. package/dist/provider/location-input/components/index.d.ts +0 -2
  413. package/dist/provider/location-input/components/index.d.ts.map +0 -1
  414. package/dist/styles/activity-card/_index.scss +0 -2
  415. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  416. package/dist/styles/availability-indicator/_index.scss +0 -1
  417. package/dist/styles/date-time-button/_index.scss +0 -1
  418. package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
  419. package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
  420. package/dist/zone/form/components/GameDurationControl.js +0 -1
  421. package/src/assets/logo/favicon.svg +0 -12
  422. package/src/availability-indicator/AvailabilityIndicator.tsx +0 -67
  423. package/src/availability-indicator/index.ts +0 -1
  424. package/src/calendar/Calendar.stories.tsx +0 -33
  425. package/src/calendar/Calendar.tsx +0 -45
  426. package/src/calendar/index.ts +0 -3
  427. package/src/calendar/utils/index.ts +0 -28
  428. package/src/iframe/activity-card/ActivityCard.stories.tsx +0 -51
  429. package/src/iframe/activity-card/ActivityCard.tsx +0 -66
  430. package/src/iframe/activity-card/index.ts +0 -1
  431. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +0 -92
  432. package/src/number-of-people-input/components/index.ts +0 -1
  433. package/src/number-of-people-input/index.ts +0 -2
  434. package/src/provider/location-input/components/FormGroupControll.tsx +0 -16
  435. package/src/provider/location-input/components/index.ts +0 -1
  436. package/src/styles/activity-card/_index.scss +0 -2
  437. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  438. package/src/styles/availability-indicator/_index.scss +0 -1
  439. package/src/styles/date-time-button/_index.scss +0 -1
  440. package/src/zone/form/components/GameDurationControl.tsx +0 -46
  441. /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  442. /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  443. /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  444. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
  445. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
  446. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  447. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
  448. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  449. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  450. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  451. /package/dist/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  452. /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  453. /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  454. /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  455. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
  456. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
  457. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
  458. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  459. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -142,7 +142,6 @@
142
142
  .card-body {
143
143
  padding: 0;
144
144
  margin: 0 0 auto;
145
- margin-top: 1rem;
146
145
  }
147
146
  }
148
147
 
@@ -15,10 +15,6 @@
15
15
  display: none !important;
16
16
  }
17
17
  }
18
-
19
- &.is-invalid {
20
- border-color: theme-color("danger");
21
- }
22
18
  }
23
19
 
24
20
  .placeholder-row {
@@ -13,6 +13,7 @@
13
13
  @import "./static";
14
14
  @import "./table";
15
15
  @import "./back-button";
16
+ @import "./iframe-customers-journey";
16
17
  @import "./custom-fields";
17
18
  @import "./file-upload";
18
19
  @import "./iframe-events";
@@ -40,6 +41,3 @@
40
41
  @import "./striped-static-table/";
41
42
  @import "./image-radio-input/";
42
43
  @import "./radio-card/";
43
- @import "./activity-card/";
44
- @import "./date-time-button/";
45
- @import "./availability-indicator/";
@@ -7,16 +7,6 @@
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
-
20
10
  .reccurrence-interval-container {
21
11
  .form-group {
22
12
  margin-bottom: 0.5rem;
@@ -76,7 +66,6 @@
76
66
  display: flex;
77
67
  flex-direction: column;
78
68
  gap: 1rem;
79
-
80
69
  }
81
70
 
82
71
  .custom-checkbox {
@@ -143,10 +132,6 @@
143
132
  }
144
133
  }
145
134
 
146
- .footer-with-short-notes {
147
- min-width: 18rem;
148
- }
149
-
150
135
  footer {
151
136
  display: flex;
152
137
  gap: 1.25rem;
@@ -163,4 +148,3 @@
163
148
  }
164
149
  }
165
150
  }
166
-
@@ -5,14 +5,14 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 13.825rem;
8
+ height: 11.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);
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,19 +62,11 @@
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
- }
73
65
  }
74
66
 
75
67
  &:hover {
76
68
  box-shadow: 0px 0px 0.5rem 0px rgb(0 0 0 / 20%);
77
- cursor: pointer;
69
+ cursor: pointer;
78
70
  }
79
71
  }
80
72
 
@@ -93,4 +85,4 @@
93
85
  }
94
86
  }
95
87
  }
96
- }
88
+ }
@@ -46,7 +46,6 @@
46
46
  .header {
47
47
  background-color: color("white");
48
48
  padding: 0 2.5rem;
49
- z-index: 2;
50
49
  min-height: 4rem;
51
50
  border-bottom: 1px solid #f0f0f0;
52
51
  }
@@ -3,8 +3,5 @@
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%;
9
6
  overflow: scroll;
10
7
  }
@@ -15,7 +15,6 @@ export interface Product {
15
15
  isRequired?: boolean;
16
16
  isUnlimited?: boolean;
17
17
  images: CoreProduct["images"];
18
- capacity?: number | null;
19
18
  uuid: string;
20
19
  }
21
20
 
package/src/typings.d.ts CHANGED
@@ -28,14 +28,3 @@ 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,8 +39,7 @@ const WrappedVirtualizedWindowScroller = ({
39
39
  if (!onDataUpdate) return;
40
40
 
41
41
  onDataUpdate();
42
- // eslint-disable-next-line react-hooks/exhaustive-deps
43
- }, [windowDimensions]);
42
+ }, [windowDimensions, scrollElement, gridRef, onDataUpdate]);
44
43
 
45
44
  return (
46
45
  <WindowScroller scrollElement={scrollElement}>
@@ -25,6 +25,7 @@ export const ZoneForm = ({
25
25
  onSubmit,
26
26
  serverErrors,
27
27
  isLoading = false,
28
+ workHours = [],
28
29
  }: ZoneFormProps) => {
29
30
  const { t } = useTranslation("Design");
30
31
  const form = useForm<ZoneFormValues>({
@@ -54,7 +55,7 @@ export const ZoneForm = ({
54
55
  return (
55
56
  <FormProvider {...form}>
56
57
  <Form onSubmit={handleSubmit(onFormSubmit)}>
57
- <ZoneControl isLoading={isLoading} />
58
+ <ZoneControl isLoading={isLoading} workHours={workHours} />
58
59
  <Row>
59
60
  <Col md={6} sm={12} />
60
61
  <Col
@@ -9,6 +9,7 @@ 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";
12
13
  import { getCheckboxesByWorkHours } from "../utils/dates";
13
14
 
14
15
  export type AvailableTimesControlRef = {
@@ -23,8 +24,6 @@ type AvailableTimesControlProps = {
23
24
  defaultValues?: string[];
24
25
  startTime?: string;
25
26
  endTime?: string;
26
- errorMessage?: string;
27
- clearErrorMessage: () => void;
28
27
  };
29
28
 
30
29
  type AvailableTimesForm = { availableTimes: string[] };
@@ -32,95 +31,95 @@ type AvailableTimesForm = { availableTimes: string[] };
32
31
  export const AvailableTimesControl = forwardRef<
33
32
  AvailableTimesControlRef,
34
33
  AvailableTimesControlProps
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,
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 {
53
58
  trigger,
54
59
  getValues,
55
- setValue,
56
- watch,
57
60
  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]);
90
61
  };
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>
91
109
 
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
- );
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
+ });
@@ -7,25 +7,26 @@ 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";
11
10
 
12
11
  export type ZoneControlProps = {
13
12
  isLoading: boolean;
14
13
  workHours?: WorkHour[];
15
14
  };
16
15
 
17
- export const ZoneControl = ({ isLoading }: ZoneControlProps) => {
16
+ export const ZoneControl = ({
17
+ isLoading,
18
+ workHours = [],
19
+ }: ZoneControlProps) => {
18
20
  return (
19
21
  <Row>
20
22
  <Col md={6} sm={12} className="pr-5">
21
23
  <NameControl isLoading={isLoading} />
22
- <ZoneRecurrencesControl />
24
+ <ZoneRecurrencesControl workHours={workHours} isLoading={isLoading} />
23
25
  <hr />
24
26
  <Row>
25
27
  <Col md={6} sm={6}>
26
28
  <ZoneTypeControl isLoading={isLoading} />
27
29
  <SortControl isLoading={isLoading} />
28
- <GameDurationControl isLoading={isLoading} />
29
30
  </Col>
30
31
  <Col md={6} sm={6}>
31
32
  <ZoneImageControl isLoading={isLoading} />
@@ -11,7 +11,12 @@ 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
-
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";
15
20
  import { CONFIRM_MODAL_ACTIONS } from "../../../modals/confirmation/ConfirmModal";
16
21
  import { Icon } from "../../../static";
17
22
  import {
@@ -19,6 +24,10 @@ import {
19
24
  RecurringDatePickerInputValues,
20
25
  } from "../../../recurring-date-picker-input/RecurringDatePickerInput";
21
26
  import { ZoneRecurrenceControl } from "./ZoneRecurrenceControl";
27
+ import {
28
+ AvailableTimesControl,
29
+ AvailableTimesControlRef,
30
+ } from "./AvailableTimesControl";
22
31
  import { sameWidthPopperModifier } from "../../../product-set/control/DateAndRecurrenceInput";
23
32
 
24
33
  export interface DateAndRecurrenceInputValues {
@@ -30,7 +39,10 @@ export type ZoneRecurrenceControlProps = {
30
39
  isLoading?: boolean;
31
40
  };
32
41
 
33
- export const ZoneRecurrencesControl = () => {
42
+ export const ZoneRecurrencesControl = ({
43
+ workHours,
44
+ isLoading = false,
45
+ }: ZoneRecurrenceControlProps) => {
34
46
  const {
35
47
  control,
36
48
  register,
@@ -54,7 +66,10 @@ export const ZoneRecurrencesControl = () => {
54
66
  values: null,
55
67
  });
56
68
  const clearEditState = () => setEditState({ index: null, values: null });
69
+ const [availableTimes, setAvailableTimes] = useState<string[]>([]);
70
+
57
71
  const popoverRef = useRef<HTMLDivElement>();
72
+ const availableTimesFormRef = useRef<AvailableTimesControlRef>();
58
73
 
59
74
  useClickAway(popoverRef, (event) => {
60
75
  const isModal = CONFIRM_MODAL_ACTIONS.includes(
@@ -77,12 +92,45 @@ export const ZoneRecurrencesControl = () => {
77
92
  const handleRecurringDateChange = async (
78
93
  next: RecurringDatePickerInputValues
79
94
  ) => {
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
+ }
80
127
  const values = {
81
128
  rrule: next.rrule,
82
129
  startDate: next.startDate,
83
130
  endDate: next.endDate,
84
131
  startTime: next.startTime,
85
132
  endTime: next.endTime,
133
+ ...availableTimesFormRef.current.getValues(),
86
134
  } as Partial<ZoneRecurrence>;
87
135
 
88
136
  if (editState.values?.id) {
@@ -103,6 +151,7 @@ export const ZoneRecurrencesControl = () => {
103
151
  clearEditState();
104
152
 
105
153
  setEditState({ index, values: next });
154
+ setAvailableTimes(next.availableTimes || []);
106
155
  setIsDatePopoverVisible(() => true);
107
156
  };
108
157
 
@@ -166,7 +215,14 @@ export const ZoneRecurrencesControl = () => {
166
215
  onChange={handleRecurringDateChange}
167
216
  onDelete={handleDelete}
168
217
  setInitialStartDateAfterSelect
169
- />
218
+ >
219
+ <AvailableTimesControl
220
+ workHours={workHours}
221
+ isLoading={isLoading}
222
+ defaultValues={availableTimes}
223
+ ref={availableTimesFormRef}
224
+ />
225
+ </RecurringDatePickerInput>
170
226
  </Popover.Content>
171
227
  </Popover>
172
228
  }
@@ -1,7 +1,5 @@
1
- import { TIME_SEPARATOR } from "@licklist/core/dist/Services/Date";
1
+ import { datetime, 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";
5
3
 
6
4
  const DEFAULT_START_DAY_TIME = "00:00";
7
5
  const DEFAULT_END_DAY_TIME = "23:59";
@@ -15,37 +13,46 @@ export const getTimeCheckboxRanges = (
15
13
  const [startHour, startMinutes] = startTime.split(TIME_SEPARATOR);
16
14
  const [endHour, endMinutes] = endTime.split(TIME_SEPARATOR);
17
15
 
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)];
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
+ };
41
35
  let count = 0;
42
36
 
43
- while (endDate.diff(startDate, ["minutes"]).minutes >= range) {
44
- startDate = startDate.plus({ minutes: range });
37
+ while (endDate >= startDate) {
38
+ startDate = new Date(startDate.getTime() + range * 60 * 1000);
45
39
  count += 1;
46
- checkboxes[count] = startDate.toFormat(TIME_FORMAT);
40
+ dateSlices[count] = startDate;
47
41
  }
48
42
 
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
+
49
56
  return checkboxes;
50
57
  };
51
58
 
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r,n,i=require("react");(e=i)&&"object"==typeof e&&"default"in e&&e.default;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}exports.ReactComponent=function(e){return i.createElement("svg",f({width:7,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=i.createElement("rect",{x:.944,y:1.037,width:5.252,height:3.049,rx:1.5,fill:"#4CF973",stroke:"#fff"})),r||(r=i.createElement("rect",{x:.944,y:4.11,width:5.252,height:3.049,rx:1.5,fill:"#4CF973",stroke:"#fff"})),n||(n=i.createElement("rect",{x:.944,y:7.183,width:5.252,height:3.049,rx:1.5,fill:"#4CF973",stroke:"#fff"})))};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r,n,i=require("react");(e=i)&&"object"==typeof e&&"default"in e&&e.default;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}exports.ReactComponent=function(e){return i.createElement("svg",f({width:7,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=i.createElement("rect",{x:1.241,y:1.037,width:5.252,height:3.049,rx:1.5,fill:"#E4E4E4",stroke:"#fff"})),r||(r=i.createElement("rect",{x:1.241,y:4.11,width:5.252,height:3.049,rx:1.5,fill:"#FDD054",stroke:"#fff"})),n||(n=i.createElement("rect",{x:1.241,y:7.183,width:5.252,height:3.049,rx:1.5,fill:"#FDD054",stroke:"#fff"})))};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,r,n,f,i=require("react");(e=i)&&"object"==typeof e&&"default"in e&&e.default;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}exports.ReactComponent=function(e){return i.createElement("svg",l({width:7,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=i.createElement("path",{fill:"#fff",d:"M.497 0h5.94v10H.497z"})),r||(r=i.createElement("rect",{x:.591,y:.5,width:5.752,height:3,rx:1.5,fill:"#E4E4E4",stroke:"#fff"})),n||(n=i.createElement("rect",{x:.591,y:3.5,width:5.752,height:3,rx:1.5,fill:"#E4E4E4",stroke:"#fff"})),f||(f=i.createElement("rect",{x:.591,y:6.5,width:5.752,height:3,rx:1.5,fill:"#E4E4E4",stroke:"#fff"})))};
@@ -1,12 +0,0 @@
1
- <?xml version="1.0"?>
2
- <svg width="200" height="201" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" version="1.1">
3
- <title>Single Colour - Light Blue Light</title>
4
- <g class="layer">
5
- <title>Layer 1</title>
6
- <g fill="none" fill-rule="evenodd" id="Page-1">
7
- <g fill="#0E8CE2" fill-rule="nonzero" id="Logo-Export" transform="translate(0 -1835)">
8
- <path d="m52.59,1861.52c16.49,-16.49 24.18,-20.75 33.43,-23.55c9.25,-2.8 18.71,-2.8 27.95,0c9.25,2.8 16.95,7.06 33.43,23.55l26.95,26.94c16.48,16.49 20.74,24.18 23.54,33.43c2.81,9.25 2.81,18.71 0,27.95c-2.8,9.25 -7.06,16.95 -23.54,33.43l-26.95,26.95c-16.48,16.48 -24.18,20.74 -33.43,23.54c-9.24,2.81 -18.7,2.81 -27.95,0c-9.25,-2.8 -16.94,-7.06 -33.43,-23.54l-26.94,-26.95c-16.49,-16.48 -20.75,-24.18 -23.55,-33.43c-2.8,-9.24 -2.8,-18.7 0,-27.95c2.8,-9.25 7.06,-16.94 23.55,-33.43l26.94,-26.94zm14.82,14.04l-27.33,27.33c-12.85,12.85 -16.37,18.05 -18.45,24.92c-1.63,5.39 -1.63,10.73 0,16.11c2.06,6.8 5.53,11.97 18.06,24.54l27.72,27.71c12.57,12.54 17.73,16 24.53,18.06c5.39,1.64 10.73,1.64 16.11,0c6.87,-2.08 12.07,-5.59 24.92,-18.44l26.95,-26.95c12.85,-12.85 16.36,-18.05 18.44,-24.92c1.64,-5.38 1.64,-10.72 0,-16.11c-2.08,-6.87 -5.59,-12.07 -18.44,-24.92l-26.95,-26.94c-12.85,-12.85 -18.05,-16.37 -24.92,-18.45c-5.38,-1.63 -10.72,-1.63 -16.11,0c-6.8,2.06 -11.96,5.53 -24.53,18.06zm67.18,50.6c5.48,-5.47 14.37,-5.47 19.85,0c5.47,5.48 5.47,14.37 0,19.85l-44.2,44.19c-5.48,5.48 -14.36,5.48 -19.84,0l-6.45,-6.45c-1.21,-1.21 -1.52,-1.77 -1.72,-2.45c-0.21,-0.68 -0.21,-1.37 0,-2.05c0.2,-0.67 0.51,-1.24 1.72,-2.44l50.64,-50.65zm-73.77,24.53c1.32,-1.32 3.11,-2.06 4.97,-2.05l25.82,0.06c1.4,0 2.54,1.15 2.54,2.55c0,0.67 -0.26,1.3 -0.72,1.78l-1.36,1.4l-16.1,15.95c-1.49,1.48 -3.91,1.48 -5.4,-0.01l-9.75,-9.76c-2.74,-2.74 -2.74,-7.18 0,-9.92" id="Single-Colour---Light-Blue-Light"/>
9
- </g>
10
- </g>
11
- </g>
12
- </svg>