@licklist/design 0.44.486-dev.82 → 0.44.486-dev.9

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 (461) 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.js +1 -1
  108. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  109. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -1
  110. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  111. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  112. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  113. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  114. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  115. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  116. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -4
  117. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  118. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  119. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +1 -2
  120. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  121. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  122. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  123. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  124. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  125. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +2 -2
  126. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  127. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  128. package/dist/iframe/order-process/constants.d.ts +0 -1
  129. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  130. package/dist/iframe/order-process/constants.js +1 -1
  131. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  132. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  133. package/dist/index.d.ts +0 -3
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +1 -1
  136. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  137. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  138. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -5
  139. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  140. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  141. package/dist/product-set/control/ProductSetControl.d.ts +3 -6
  142. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  143. package/dist/product-set/control/ProductSetControl.js +1 -1
  144. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts +1 -2
  145. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  146. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  147. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  148. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  149. package/dist/product-set/form/ProductSetForm.d.ts +1 -3
  150. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  151. package/dist/product-set/form/ProductSetForm.js +1 -1
  152. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  153. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  154. package/dist/product-set/form/ProductsControl.js +1 -1
  155. package/dist/product-set/product/ProductControl.d.ts +1 -2
  156. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  157. package/dist/product-set/product/ProductControl.js +1 -1
  158. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  159. package/dist/product-set/product-category/ProductCategoryControl.d.ts +1 -0
  160. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  161. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  162. package/dist/product-set/utils/index.d.ts +0 -10
  163. package/dist/product-set/utils/index.d.ts.map +1 -1
  164. package/dist/product-set/utils/index.js +1 -1
  165. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  166. package/dist/provider/location-input/LocationInput.js +1 -1
  167. package/dist/provider/location-input/index.d.ts +0 -1
  168. package/dist/provider/location-input/index.d.ts.map +1 -1
  169. package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
  170. package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
  171. package/dist/provider/provider-form/ProviderForm.js +1 -1
  172. package/dist/provider/venue-form/VenueForm.d.ts +1 -3
  173. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  174. package/dist/provider/venue-form/VenueForm.js +1 -1
  175. package/dist/recurrence-input/RecurrenceEndInput.d.ts +1 -8
  176. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  177. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  178. package/dist/recurrence-input/RecurrenceInput.d.ts +1 -2
  179. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  180. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  181. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -4
  182. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  183. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  184. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -1
  185. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  186. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  187. package/dist/report/form/ReportForm.d.ts.map +1 -1
  188. package/dist/sales/booking/results/BookingResults.d.ts +1 -3
  189. package/dist/sales/booking/results/BookingResults.d.ts.map +1 -1
  190. package/dist/sales/booking/results/BookingResults.js +1 -1
  191. package/dist/sales/booking/results/components/ResultCard.d.ts +1 -3
  192. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  193. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  194. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  195. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  196. package/dist/sales/filters/SaleFilters.d.ts +0 -1
  197. package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
  198. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -3
  199. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  200. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  201. package/dist/sales/payment-form/SalePaymentForm.js +1 -1
  202. package/dist/sales/source-of-sales/SourceOfSalesChart.d.ts.map +1 -1
  203. package/dist/sales/source-of-sales/SourceOfSalesChart.js +1 -1
  204. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  205. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  206. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  207. package/dist/static/form-number-input/FormNumberInput.d.ts +1 -2
  208. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  209. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  210. package/dist/styles/events/EventCard.scss +5 -12
  211. package/dist/styles/form/CustomCheckbox.scss +0 -6
  212. package/dist/styles/header/Header.scss +4 -0
  213. package/{src/styles/activity-card/GridActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
  214. package/dist/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  215. package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  216. package/dist/styles/iframe-customers-journey/_index.scss +3 -0
  217. package/dist/styles/iframe-events/Card.scss +0 -1
  218. package/dist/styles/notification/Notification.scss +0 -4
  219. package/dist/styles/packages.scss +1 -3
  220. package/dist/styles/resources-blocking/_index.scss +0 -16
  221. package/dist/styles/sales/BookingResults.scss +6 -14
  222. package/dist/styles/themes/bookedit/_index.scss +0 -1
  223. package/dist/styles/zones/ZoneForm.scss +0 -3
  224. package/dist/types/iframe.d.ts +0 -1
  225. package/dist/types/iframe.d.ts.map +1 -1
  226. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  227. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  228. package/dist/zone/form/ZoneForm.d.ts +1 -1
  229. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  230. package/dist/zone/form/ZoneForm.js +1 -1
  231. package/dist/zone/form/components/AvailableTimesControl.d.ts +0 -2
  232. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  233. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  234. package/dist/zone/form/components/ZoneControl.d.ts +1 -1
  235. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  236. package/dist/zone/form/components/ZoneControl.js +1 -1
  237. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +1 -1
  238. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  239. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  240. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  241. package/dist/zone/form/utils/dates.js +1 -1
  242. package/package.json +3 -3
  243. package/src/assets/logo/bookedit.svg +11 -9
  244. package/src/assets/logo/licklist.svg +2 -0
  245. package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
  246. package/src/date-time-button/DateTimeButton.tsx +22 -24
  247. package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
  248. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +12 -0
  249. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -1
  250. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -2
  251. package/src/events/event-card/EventCard.tsx +2 -6
  252. package/src/events/event-card/utils.ts +16 -89
  253. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -5
  254. package/src/events/event-statistic-modal/hooks/useTableData.tsx +5 -12
  255. package/src/events/event-statistic-modal/utils/index.ts +34 -39
  256. package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
  257. package/src/file-upload/FileUpload.tsx +1 -3
  258. package/src/iframe/activity-cards/activity-card/ActivityCard.stories.tsx +52 -0
  259. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
  260. package/src/iframe/activity-cards/index.ts +2 -0
  261. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
  262. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
  263. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +36 -0
  264. package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
  265. package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
  266. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
  267. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
  268. package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -24
  269. package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  270. package/src/iframe/event/event-calendar/index.ts +6 -0
  271. package/src/iframe/event/event-calendar/types/index.ts +6 -0
  272. package/src/iframe/event/event-calendar/utils/index.ts +11 -0
  273. package/src/iframe/event/event-details/EventDetails.stories.tsx +187 -0
  274. package/src/iframe/event/event-details/EventDetails.tsx +92 -0
  275. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +123 -0
  276. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +109 -0
  277. package/src/iframe/event/event-details/components/category-product/index.ts +1 -0
  278. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +250 -0
  279. package/src/iframe/event/event-details/components/event-details-form/index.ts +5 -0
  280. package/src/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  281. package/src/{number-of-people-input/components → iframe/event/event-details/components/number-of-people-input/component}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  282. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +1 -0
  283. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +1 -0
  284. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +34 -0
  285. package/src/iframe/event/event-details/components/product-category-view/index.ts +1 -0
  286. package/src/iframe/event/event-details/index.ts +1 -0
  287. package/src/iframe/event/event-details/utils/index.ts +1 -0
  288. package/src/iframe/event/event-details/utils/routes.ts +6 -0
  289. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +2 -1
  290. package/src/iframe/event/index.ts +7 -0
  291. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +2 -8
  292. package/src/iframe/event/ticket-description/TicketDescription.tsx +2 -7
  293. package/src/iframe/index.ts +3 -1
  294. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -2
  295. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -1
  296. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
  297. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +1 -0
  298. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +7 -16
  299. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
  300. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +29 -15
  301. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
  302. package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
  303. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +5 -36
  304. package/src/iframe/order-process/constants.ts +0 -1
  305. package/src/iframe/page/Page.stories.tsx +2 -2
  306. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -13
  307. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  308. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  309. package/src/index.ts +0 -3
  310. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
  311. package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -75
  312. package/src/product-set/control/ProductSetControl.stories.tsx +2 -0
  313. package/src/product-set/control/ProductSetControl.tsx +10 -66
  314. package/src/product-set/control/ProductSetRecurrenceControl.tsx +5 -14
  315. package/src/product-set/form/ProductCategoriesControl.tsx +1 -2
  316. package/src/product-set/form/ProductSetForm.stories.tsx +12 -9
  317. package/src/product-set/form/ProductSetForm.tsx +3 -19
  318. package/src/product-set/form/ProductsControl.tsx +0 -10
  319. package/src/product-set/product/ProductControl.tsx +1 -28
  320. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  321. package/src/product-set/product-category/ProductCategory.stories.tsx +1 -0
  322. package/src/product-set/product-category/ProductCategoryControl.tsx +30 -1
  323. package/src/product-set/utils/index.ts +0 -38
  324. package/src/provider/location-input/LocationInput.tsx +20 -21
  325. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  326. package/src/provider/location-input/index.ts +1 -1
  327. package/src/provider/provider-details-input/ProviderDetailsInput.tsx +13 -5
  328. package/src/provider/venue-form/VenueForm.stories.tsx +0 -24
  329. package/src/provider/venue-form/VenueForm.tsx +4 -55
  330. package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
  331. package/src/recurrence-input/RecurrenceInput.tsx +2 -12
  332. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +11 -21
  333. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
  334. package/src/report/form/ReportForm.tsx +1 -1
  335. package/src/sales/booking/results/BookingResults.stories.tsx +7 -12
  336. package/src/sales/booking/results/BookingResults.tsx +0 -7
  337. package/src/sales/booking/results/components/ResultCard.tsx +5 -50
  338. package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
  339. package/src/sales/filters/SaleFilters.tsx +0 -1
  340. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +7 -0
  341. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +5 -20
  342. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +28 -31
  343. package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
  344. package/src/static/RestrictedAccess.tsx +1 -1
  345. package/src/static/form-number-input/FormNumberInput.tsx +1 -8
  346. package/src/styles/events/EventCard.scss +5 -12
  347. package/src/styles/form/CustomCheckbox.scss +0 -6
  348. package/src/styles/header/Header.scss +4 -0
  349. package/{dist/styles/activity-card/GridActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesCard.scss} +9 -1
  350. package/src/styles/{activity-card/ListActivitiesCard.scss → iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  351. package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  352. package/src/styles/iframe-customers-journey/_index.scss +3 -0
  353. package/src/styles/iframe-events/Card.scss +0 -1
  354. package/src/styles/notification/Notification.scss +0 -4
  355. package/src/styles/packages.scss +1 -3
  356. package/src/styles/resources-blocking/_index.scss +0 -16
  357. package/src/styles/sales/BookingResults.scss +6 -14
  358. package/src/styles/themes/bookedit/_index.scss +0 -1
  359. package/src/styles/zones/ZoneForm.scss +0 -3
  360. package/src/types/iframe.ts +0 -1
  361. package/src/typings.d.ts +0 -11
  362. package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
  363. package/src/zone/form/ZoneForm.tsx +2 -1
  364. package/src/zone/form/components/AvailableTimesControl.tsx +88 -89
  365. package/src/zone/form/components/ZoneControl.tsx +5 -4
  366. package/src/zone/form/components/ZoneRecurrencesControl.tsx +59 -3
  367. package/src/zone/form/utils/dates.ts +36 -29
  368. package/dist/assets/iframe/available.svg.js +0 -1
  369. package/dist/assets/iframe/limited.svg.js +0 -1
  370. package/dist/assets/iframe/soldOut.svg.js +0 -1
  371. package/dist/assets/logo/favicon.svg +0 -12
  372. package/dist/availability-indicator/AvailabilityIndicator.d.ts +0 -10
  373. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
  374. package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
  375. package/dist/availability-indicator/index.d.ts +0 -2
  376. package/dist/availability-indicator/index.d.ts.map +0 -1
  377. package/dist/calendar/Calendar.d.ts +0 -19
  378. package/dist/calendar/Calendar.d.ts.map +0 -1
  379. package/dist/calendar/Calendar.js +0 -1
  380. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  381. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  382. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  383. package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
  384. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
  385. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  386. package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
  387. package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
  388. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  389. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  390. package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
  391. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  392. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  393. package/dist/calendar/index.d.ts +0 -4
  394. package/dist/calendar/index.d.ts.map +0 -1
  395. package/dist/calendar/utils/index.d.ts +0 -5
  396. package/dist/calendar/utils/index.d.ts.map +0 -1
  397. package/dist/calendar/utils/index.js +0 -1
  398. package/dist/iframe/activity-card/ActivityCard.d.ts +0 -15
  399. package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
  400. package/dist/iframe/activity-card/ActivityCard.js +0 -1
  401. package/dist/iframe/activity-card/index.d.ts +0 -2
  402. package/dist/iframe/activity-card/index.d.ts.map +0 -1
  403. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  404. package/dist/number-of-people-input/NumberOfPeopleInput.js +0 -1
  405. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  406. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +0 -1
  407. package/dist/number-of-people-input/components/index.d.ts +0 -2
  408. package/dist/number-of-people-input/components/index.d.ts.map +0 -1
  409. package/dist/number-of-people-input/index.d.ts +0 -3
  410. package/dist/number-of-people-input/index.d.ts.map +0 -1
  411. package/dist/provider/location-input/components/FormGroupControll.d.ts +0 -7
  412. package/dist/provider/location-input/components/FormGroupControll.d.ts.map +0 -1
  413. package/dist/provider/location-input/components/FormGroupControll.js +0 -1
  414. package/dist/provider/location-input/components/index.d.ts +0 -2
  415. package/dist/provider/location-input/components/index.d.ts.map +0 -1
  416. package/dist/styles/activity-card/_index.scss +0 -2
  417. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  418. package/dist/styles/availability-indicator/_index.scss +0 -1
  419. package/dist/styles/date-time-button/_index.scss +0 -1
  420. package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
  421. package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
  422. package/dist/zone/form/components/GameDurationControl.js +0 -1
  423. package/src/assets/logo/favicon.svg +0 -12
  424. package/src/availability-indicator/AvailabilityIndicator.tsx +0 -67
  425. package/src/availability-indicator/index.ts +0 -1
  426. package/src/calendar/Calendar.stories.tsx +0 -33
  427. package/src/calendar/Calendar.tsx +0 -45
  428. package/src/calendar/index.ts +0 -3
  429. package/src/calendar/utils/index.ts +0 -28
  430. package/src/iframe/activity-card/ActivityCard.stories.tsx +0 -51
  431. package/src/iframe/activity-card/ActivityCard.tsx +0 -66
  432. package/src/iframe/activity-card/index.ts +0 -1
  433. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +0 -92
  434. package/src/number-of-people-input/components/index.ts +0 -1
  435. package/src/number-of-people-input/index.ts +0 -2
  436. package/src/provider/location-input/components/FormGroupControll.tsx +0 -16
  437. package/src/provider/location-input/components/index.ts +0 -1
  438. package/src/styles/activity-card/_index.scss +0 -2
  439. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  440. package/src/styles/availability-indicator/_index.scss +0 -1
  441. package/src/styles/date-time-button/_index.scss +0 -1
  442. package/src/zone/form/components/GameDurationControl.tsx +0 -46
  443. /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  444. /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  445. /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  446. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
  447. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
  448. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  449. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
  450. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  451. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  452. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  453. /package/dist/{number-of-people-input → iframe/event/event-details/components/number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
  454. /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  455. /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  456. /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  457. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
  458. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
  459. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
  460. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  461. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -1,15 +1,6 @@
1
1
  import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper";
2
2
  import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper";
3
- import { TFunction } from "i18next";
4
- import { UseFormSetError } from "react-hook-form";
5
3
  import { TemplateItem } from "../control/ProductSetControl";
6
- import { ProductSetFormValues } from "../form/ProductSetForm";
7
-
8
- interface CheckAvailableTimesErrors {
9
- values: ProductSetFormValues;
10
- setError: UseFormSetError<ProductSetFormValues>;
11
- t: TFunction;
12
- }
13
4
 
14
5
  export const moveArrayElements = <T>(
15
6
  array: T[],
@@ -51,32 +42,3 @@ export const getFilteredTemplates = (
51
42
  label: template?.notification?.name,
52
43
  }));
53
44
  };
54
-
55
- export const checkAvailableTimesErrors = ({
56
- values,
57
- setError,
58
- t,
59
- }: CheckAvailableTimesErrors) => {
60
- let hasError = false;
61
-
62
- const hasCategoryWithZone = values?.steps?.some(
63
- (step) => !!step?.productCategories.some((category) => !!category?.zoneId)
64
- );
65
- if (!hasCategoryWithZone) {
66
- return hasError;
67
- }
68
-
69
- values?.menuRecurrences?.forEach((recurrence, index: number) => {
70
- if (!recurrence?.availableTimes?.length) {
71
- hasError = true;
72
- setError(`menuRecurrences.${index}.availableTimes` as const, {
73
- type: "validate",
74
- message: t("Validation:fieldMinNumber", {
75
- attribute: t("startTimes"),
76
- min: 1,
77
- }),
78
- });
79
- }
80
- });
81
- return hasError;
82
- };
@@ -5,7 +5,6 @@ import { useFormContext } from "react-hook-form";
5
5
  import { useTranslation } from "react-i18next";
6
6
  import CountryCodeSelect from "../../static/CountryCodeSelect";
7
7
  import { LocationInputValues } from ".";
8
- import { FormGroupControll } from "./components";
9
8
 
10
9
  export function LocationInput() {
11
10
  const {
@@ -14,32 +13,32 @@ export function LocationInput() {
14
13
  } = useFormContext<LocationInputValues>();
15
14
  const { t } = useTranslation("Design");
16
15
 
16
+ const addressId = useId();
17
+ const cityId = useId();
18
+ const stateId = useId();
19
+ const postcodeId = useId();
17
20
  const countryId = useId();
18
21
 
19
22
  return (
20
23
  <>
21
24
  <input {...register("location.latitude")} type="hidden" />
22
25
  <input {...register("location.longitude")} type="hidden" />
23
- <FormGroupControll
24
- error={errors?.location?.street}
25
- name="location.street"
26
- label={t("locationStreet")}
27
- />
28
- <FormGroupControll
29
- error={errors?.location?.city}
30
- name="location.city"
31
- label={t("locationCity")}
32
- />
33
- <FormGroupControll
34
- error={errors?.location?.state}
35
- name="location.state"
36
- label={t("locationState")}
37
- />
38
- <FormGroupControll
39
- error={errors?.location?.postcode}
40
- name="location.postcode"
41
- label={t("locationPostcode")}
42
- />
26
+ <Form.Group controlId={addressId}>
27
+ <Form.Label>{t("locationStreet")}</Form.Label>
28
+ <Form.Control {...register("location.street")} />
29
+ </Form.Group>
30
+ <Form.Group controlId={cityId}>
31
+ <Form.Label>{t("locationCity")}</Form.Label>
32
+ <Form.Control {...register("location.city")} />
33
+ </Form.Group>
34
+ <Form.Group controlId={stateId}>
35
+ <Form.Label>{t("locationState")}</Form.Label>
36
+ <Form.Control {...register("location.state")} />
37
+ </Form.Group>
38
+ <Form.Group controlId={postcodeId}>
39
+ <Form.Label>{t("locationPostcode")}</Form.Label>
40
+ <Form.Control {...register("location.postcode")} />
41
+ </Form.Group>
43
42
  <Form.Group controlId={countryId}>
44
43
  <Form.Label>{t("locationCountry")}</Form.Label>
45
44
  <CountryCodeSelect
@@ -1,4 +1,4 @@
1
- import React, { ReactElement } from "react";
1
+ import React from "react";
2
2
  import { useFormContext } from "react-hook-form";
3
3
  import en from "react-phone-number-input/locale/en.json";
4
4
  import { LocationInputValues } from ".";
@@ -13,7 +13,7 @@ export function LocationInputDescription() {
13
13
  "postcode",
14
14
  "country",
15
15
  ] as const;
16
- const fields = fieldNames.reduce<ReactElement[]>((acc, field) => {
16
+ const fields = fieldNames.reduce<JSX.Element[]>((acc, field) => {
17
17
  const value = values?.[field];
18
18
  if (!value) return acc;
19
19
 
@@ -1,6 +1,6 @@
1
1
  export * from "./LocationInput";
2
2
  export * from "./LocationInputDescription";
3
- export * from "./components";
3
+
4
4
  export type LocationInputValues = {
5
5
  location: {
6
6
  street: string;
@@ -4,6 +4,7 @@ import { useFormContext } from "react-hook-form";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { useId } from "@react-aria/utils";
6
6
  import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
7
+ import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
7
8
  import { Typeahead, TypeaheadOptions } from "../../typeahead";
8
9
  import { MAX_DESCRIPTION_CHARACTERS_LENGTH } from "../constants";
9
10
  import {
@@ -69,7 +70,8 @@ export function ProviderDetailsInput({
69
70
  isInvalid={Boolean(errors.name)}
70
71
  />
71
72
  <Form.Control.Feedback type="invalid">
72
- {errors.name?.message}
73
+ {HookFormService.hasError(errors.name, "required") &&
74
+ errors.name?.message}
73
75
  </Form.Control.Feedback>
74
76
  </Form.Group>
75
77
 
@@ -93,7 +95,8 @@ export function ProviderDetailsInput({
93
95
  isInvalid={Boolean(errors.description)}
94
96
  />
95
97
  <Form.Control.Feedback type="invalid">
96
- {errors.description?.message}
98
+ {HookFormService.hasError(errors.description, "validate") &&
99
+ errors.description?.message}
97
100
  </Form.Control.Feedback>
98
101
  </Form.Group>
99
102
 
@@ -117,7 +120,10 @@ export function ProviderDetailsInput({
117
120
  isInvalid={Boolean(errors.email)}
118
121
  />
119
122
  <Form.Control.Feedback type="invalid">
120
- {errors.email?.message}
123
+ {HookFormService.hasError(errors.email, "required") &&
124
+ errors.email?.message}
125
+ {HookFormService.hasError(errors.email, "pattern") &&
126
+ errors.email?.message}
121
127
  </Form.Control.Feedback>
122
128
  </Form.Group>
123
129
 
@@ -135,7 +141,8 @@ export function ProviderDetailsInput({
135
141
  isInvalid={Boolean(errors.phone)}
136
142
  />
137
143
  <Form.Control.Feedback type="invalid">
138
- {errors.phone?.message}
144
+ {HookFormService.hasError(errors.phone, "required") &&
145
+ errors.phone?.message}
139
146
  </Form.Control.Feedback>
140
147
  </Form.Group>
141
148
 
@@ -156,7 +163,8 @@ export function ProviderDetailsInput({
156
163
  isInvalid={Boolean(errors.website)}
157
164
  />
158
165
  <Form.Control.Feedback type="invalid">
159
- {errors.website?.message}
166
+ {HookFormService.hasError(errors.website, "pattern") &&
167
+ errors.website?.message}
160
168
  </Form.Control.Feedback>
161
169
  </Form.Group>
162
170
  {/* If admin has only 1 company - he dont need to set up it */}
@@ -11,29 +11,6 @@ const categories = Array.from({ length: 6 }, (_, i) => ({
11
11
  }),
12
12
  }));
13
13
 
14
- const errorResponse = {
15
- name: ["The name field is required."],
16
- email: ["The email field is required."],
17
- phone: ["The phone field is required."],
18
- website: ["The website must be a string."],
19
- description: ["The description must be a string."],
20
- "location.street": ["The location.street must be a string."],
21
- "location.city": ["The location.city must be a string."],
22
- "location.state": ["The location.state must be a string."],
23
- "location.country": [
24
- "The location.country must be a string.",
25
- "Invalid ISO3166-A2 country code.",
26
- ],
27
- "categories.0": [
28
- "The categories.0 must be an integer.",
29
- "The categories.0 must be between 0 and 20 digits.",
30
- ],
31
- "categories.1": [
32
- "The categories.1 must be an integer.",
33
- "The categories.1 must be between 0 and 20 digits.",
34
- ],
35
- };
36
-
37
14
  const defaultValues: VenueFormValues = {
38
15
  name: "Sample provider",
39
16
  description: "Description",
@@ -81,5 +58,4 @@ WithDefaultValues.args = {
81
58
  defaultValues,
82
59
  categories,
83
60
  linkTypes,
84
- errorResponse,
85
61
  };
@@ -10,7 +10,6 @@ import {
10
10
  } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
11
11
  import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
12
12
  import { useMultipleImages } from "@licklist/plugins/dist/hooks/Media/useMultipleImages";
13
- import { parseServerErrorForFormValidation } from "@licklist/plugins/dist/utils/parseError";
14
13
  import { CollapsibleInputGroup } from "../../collapsible-input-group";
15
14
  import {
16
15
  CategoriesInput,
@@ -48,8 +47,6 @@ export interface VenueFormProps extends HasPermissionProp {
48
47
  companiesOptions?: TypeaheadOptions[];
49
48
  onSubmit: (values: VenueFormValues) => void;
50
49
  intent?: "create" | "update";
51
- isLoading?: boolean;
52
- errorResponse?: unknown;
53
50
  }
54
51
 
55
52
  const providerImageTypes = {
@@ -65,8 +62,6 @@ export function VenueForm({
65
62
  onSubmit,
66
63
  intent = "update",
67
64
  hasPermission = true,
68
- isLoading,
69
- errorResponse,
70
65
  }: VenueFormProps) {
71
66
  const form = useForm<VenueFormValues>({ defaultValues, mode: "onChange" });
72
67
  const {
@@ -74,7 +69,6 @@ export function VenueForm({
74
69
  handleSubmit,
75
70
  formState: { isSubmitting, errors },
76
71
  getValues,
77
- setError,
78
72
  } = form;
79
73
  const { t } = useTranslation("Design");
80
74
  const [initialImages, setInitialImages] = useState<Image[] | null>(null);
@@ -98,27 +92,6 @@ export function VenueForm({
98
92
  }
99
93
  }, [images, setValue]);
100
94
 
101
- useEffect(() => {
102
- if (!errorResponse) {
103
- return;
104
- }
105
- const errorEntriesArray = parseServerErrorForFormValidation({
106
- values: getValues(),
107
- error: errorResponse,
108
- });
109
- if (!errorEntriesArray.length) {
110
- return;
111
- }
112
- errorEntriesArray.forEach((errorEntriesArray) => {
113
- const [key, value] = errorEntriesArray;
114
- setError(key as keyof VenueFormValues, {
115
- message: value,
116
- type: "validate",
117
- });
118
- });
119
- // eslint-disable-next-line react-hooks/exhaustive-deps
120
- }, [errorResponse]);
121
-
122
95
  return (
123
96
  <FormProvider {...form}>
124
97
  <Form
@@ -135,13 +108,7 @@ export function VenueForm({
135
108
  eventKey="location"
136
109
  label={t("location")}
137
110
  description={<LocationInputDescription />}
138
- error={
139
- errors?.location?.message ||
140
- (errors?.location &&
141
- t("Validation:isNotValidField", {
142
- attribute: "The location data",
143
- }))
144
- }
111
+ error={errors?.location?.country?.message}
145
112
  >
146
113
  <LocationInput />
147
114
  </CollapsibleInputGroup>
@@ -149,13 +116,7 @@ export function VenueForm({
149
116
  eventKey="workingHours"
150
117
  label={t("workingHours")}
151
118
  description={<WorkingHoursInputDescription />}
152
- error={
153
- errors?.workingHours?.message ||
154
- (errors?.workingHours &&
155
- t("Validation:isNotValidField", {
156
- attribute: "The Working hours data",
157
- }))
158
- }
119
+ error={errors.workingHours?.message}
159
120
  >
160
121
  <WorkingHoursInput />
161
122
  </CollapsibleInputGroup>
@@ -163,13 +124,6 @@ export function VenueForm({
163
124
  <CollapsibleInputGroup
164
125
  eventKey="categories"
165
126
  label={t("categories")}
166
- error={
167
- errors?.categories?.message ||
168
- (errors?.categories &&
169
- t("Validation:isNotValidField", {
170
- attribute: "The Categories data",
171
- }))
172
- }
173
127
  description={
174
128
  <CategoriesInputDescription categories={categories} />
175
129
  }
@@ -207,15 +161,10 @@ export function VenueForm({
207
161
  {hasPermission && (
208
162
  <Button
209
163
  type="submit"
210
- disabled={
211
- isLoading ||
212
- isSubmitting ||
213
- isImagesLoading ||
214
- isCoverImagesLoading
215
- }
164
+ disabled={isSubmitting || isImagesLoading || isCoverImagesLoading}
216
165
  className="d-flex align-items-center align-self-end"
217
166
  >
218
- {(isSubmitting || isLoading) && (
167
+ {isSubmitting && (
219
168
  <Spinner
220
169
  animation="border"
221
170
  size="sm"
@@ -1,19 +1,17 @@
1
- import React, { useEffect, useRef } from "react";
1
+ import React, { useRef } from "react";
2
2
  import { useId } from "@react-aria/utils";
3
3
  import { DateTime, DurationUnit } from "luxon";
4
4
  import { Col, Form, InputGroup, Row } from "react-bootstrap";
5
5
  import RRule from "rrule";
6
- import { DATE_FORMAT } from "@licklist/core/dist/Config";
7
- import { useTranslation } from "react-i18next";
6
+
8
7
  import { SupportedFrequency } from "./utils";
9
8
  import HTMLInputDateElement from "../types/static/HTMLInputDateElement";
10
9
 
11
10
  interface Props {
12
11
  disabled?: boolean;
13
- date: string; // yyyy-mm-ddThh:mm
14
- minDate?: string; // should be in yyyy-mm-dd format
12
+ date: string;
15
13
  frequency: SupportedFrequency;
16
- until?: string; // yyyy-mm-dd
14
+ until?: string;
17
15
  count?: number;
18
16
  onChange: (values: { until?: string; count?: number }) => void;
19
17
  }
@@ -25,31 +23,16 @@ function RecurrenceEndInput({
25
23
  until,
26
24
  count,
27
25
  onChange,
28
- minDate,
29
26
  }: Props) {
30
- const { t } = useTranslation("Design");
31
27
  // unique ids for radios
32
28
  const neverId = useId();
33
29
  const onId = useId();
34
30
  const afterId = useId();
35
31
  const dateInput = useRef<HTMLInputDateElement | null>(null);
36
32
 
37
- useEffect(() => {
38
- const untilDatetime = DateTime.fromFormat(
39
- until ?? getUntil({ date, frequency }),
40
- DATE_FORMAT
41
- );
42
-
43
- const minDatetime = DateTime.fromFormat(minDate, DATE_FORMAT);
44
-
45
- if (minDatetime > untilDatetime) {
46
- onChange({ until: minDate });
47
- }
48
- }, [minDate, onChange, until, date, frequency]);
49
-
50
33
  return (
51
34
  <Form.Group>
52
- <Form.Label>{t("ends")}</Form.Label>
35
+ <Form.Label>Ends</Form.Label>
53
36
 
54
37
  <Form.Check type="radio" id={neverId} custom className="mt-3">
55
38
  <Form.Check.Input
@@ -58,7 +41,7 @@ function RecurrenceEndInput({
58
41
  onChange={() => onChange({ count: 500 })}
59
42
  disabled={disabled}
60
43
  />
61
- <Form.Check.Label>{t("never")}</Form.Check.Label>
44
+ <Form.Check.Label>Never</Form.Check.Label>
62
45
  </Form.Check>
63
46
 
64
47
  <Form.Check type="radio" id={onId} custom className="mt-3">
@@ -72,12 +55,11 @@ function RecurrenceEndInput({
72
55
  }
73
56
  disabled={disabled}
74
57
  />
75
- <Form.Check.Label>{t("on")}</Form.Check.Label>
58
+ <Form.Check.Label>On</Form.Check.Label>
76
59
  </Col>
77
60
  <Col>
78
61
  <Form.Control
79
62
  type="date"
80
- min={minDate}
81
63
  disabled={disabled || !until}
82
64
  aria-label="Date on which the recurrence ends"
83
65
  value={until ?? getUntil({ date, frequency })}
@@ -101,7 +83,7 @@ function RecurrenceEndInput({
101
83
  }
102
84
  disabled={disabled}
103
85
  />
104
- <Form.Check.Label>{t("after")}</Form.Check.Label>
86
+ <Form.Check.Label>After</Form.Check.Label>
105
87
  </Col>
106
88
  <Col>
107
89
  <InputGroup>
@@ -117,7 +99,7 @@ function RecurrenceEndInput({
117
99
  }
118
100
  />
119
101
  <InputGroup.Append>
120
- <InputGroup.Text>{t("occurences")}</InputGroup.Text>
102
+ <InputGroup.Text>occurrences</InputGroup.Text>
121
103
  </InputGroup.Append>
122
104
  </InputGroup>
123
105
  </Col>
@@ -127,7 +109,7 @@ function RecurrenceEndInput({
127
109
  );
128
110
  }
129
111
 
130
- export const defaultOccurrences = {
112
+ const defaultOccurrences = {
131
113
  [RRule.DAILY]: 30,
132
114
  [RRule.WEEKLY]: 13,
133
115
  [RRule.MONTHLY]: 12,
@@ -3,7 +3,7 @@
3
3
  import { DateTime } from "luxon";
4
4
  import React, { useEffect, useReducer } from "react";
5
5
  import RRule, { Frequency, Weekday } from "rrule";
6
- import RecurrenceEndInput, { defaultOccurrences } from "./RecurrenceEndInput";
6
+ import RecurrenceEndInput from "./RecurrenceEndInput";
7
7
  import RecurrenceIntervalAndFrequencyInput from "./RecurrenceIntervalAndFrequencyInput";
8
8
  import RecurrenceMonthlyRepeatByInput from "./RecurrenceMonthlyRepeatByInput";
9
9
  import RecurrenceWeekdaysInput from "./RecurrenceWeekdaysInput";
@@ -16,7 +16,6 @@ import {
16
16
  export interface RecurrenceInputProps {
17
17
  disabled?: boolean;
18
18
  date: string;
19
- minDate?: string;
20
19
  value?: string;
21
20
  onChange: (value: string) => void;
22
21
  initialFrequency?: Frequency;
@@ -25,7 +24,6 @@ export interface RecurrenceInputProps {
25
24
  export function RecurrenceInput({
26
25
  disabled = false,
27
26
  date,
28
- minDate,
29
27
  value,
30
28
  onChange,
31
29
  initialFrequency = Frequency.WEEKLY,
@@ -84,7 +82,6 @@ export function RecurrenceInput({
84
82
  )}
85
83
  <RecurrenceEndInput
86
84
  date={date}
87
- minDate={minDate}
88
85
  frequency={state.freq}
89
86
  until={state.until && DateTime.fromJSDate(state.until).toISODate()}
90
87
  count={state.count}
@@ -133,12 +130,5 @@ const getInitialState = ({
133
130
  byweekday = options.byweekday[0];
134
131
  }
135
132
 
136
- return {
137
- ...options,
138
- count:
139
- options?.count || options.until
140
- ? options.count
141
- : defaultOccurrences[options.freq],
142
- byweekday,
143
- };
133
+ return { ...options, byweekday };
144
134
  };
@@ -2,7 +2,7 @@ import React, { useEffect } from "react";
2
2
  import { DateTime } from "luxon";
3
3
  import { Col, Form, Row } from "react-bootstrap";
4
4
  import { useTranslation } from "react-i18next";
5
- import { RegisterOptions, useFormContext } from "react-hook-form";
5
+ import { useFormContext } from "react-hook-form";
6
6
  import { DATE_FORMAT } from "@licklist/core/dist/Config";
7
7
  import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
8
8
 
@@ -13,14 +13,6 @@ interface RecurrenceIntervalAndFrequencyInputProps {
13
13
  startTimeLabel?: string;
14
14
  endDateLabel?: string;
15
15
  endTimeLabel?: string;
16
- startTimeRules?: Pick<
17
- RegisterOptions,
18
- "max" | "min" | "validate" | "required" | "pattern"
19
- >;
20
- endTimeRules?: Pick<
21
- RegisterOptions,
22
- "max" | "min" | "validate" | "required" | "pattern"
23
- >;
24
16
  }
25
17
 
26
18
  function RecurrenceIntervalAndFrequencyInput({
@@ -30,8 +22,6 @@ function RecurrenceIntervalAndFrequencyInput({
30
22
  startTimeLabel,
31
23
  endDateLabel,
32
24
  endTimeLabel,
33
- startTimeRules,
34
- endTimeRules,
35
25
  }: RecurrenceIntervalAndFrequencyInputProps) {
36
26
  const { t } = useTranslation(["Design", "Notification", "App"]);
37
27
 
@@ -40,6 +30,7 @@ function RecurrenceIntervalAndFrequencyInput({
40
30
  formState: { errors },
41
31
  register,
42
32
  trigger,
33
+ setValue,
43
34
  } = useFormContext<RecurringDatePickerInputValues>();
44
35
 
45
36
  const startDate = getValues("startDate");
@@ -56,9 +47,6 @@ function RecurrenceIntervalAndFrequencyInput({
56
47
  }, [startDate]);
57
48
 
58
49
  useEffect(() => {
59
- if (!startTime || !endTime) {
60
- return;
61
- }
62
50
  trigger("endTime");
63
51
  // eslint-disable-next-line react-hooks/exhaustive-deps
64
52
  }, [startTime]);
@@ -130,15 +118,15 @@ function RecurrenceIntervalAndFrequencyInput({
130
118
  </Form.Label>
131
119
  <Form.Control
132
120
  type="time"
133
- {...register("startTime", { required: false, ...startTimeRules })}
121
+ {...register("startTime", { required: false })}
122
+ onChange={({ target: { value } }) => {
123
+ setValue("startTime", `${value}:00`);
124
+ }}
134
125
  placeholder="hh:mm"
135
126
  defaultValue={startTime}
136
127
  disabled={disabled}
137
128
  isInvalid={Boolean(errors.startTime)}
138
129
  />
139
- <Form.Control.Feedback type="invalid">
140
- {errors.startTime?.message}
141
- </Form.Control.Feedback>
142
130
  </Form.Group>
143
131
  </Col>
144
132
 
@@ -156,16 +144,18 @@ function RecurrenceIntervalAndFrequencyInput({
156
144
  const currentStartTime = DateTime.fromISO(startTime);
157
145
  const currentEndTime = DateTime.fromISO(time);
158
146
 
159
- return currentEndTime?.diff(currentStartTime, ["minutes"])
160
- ?.minutes >= 0
147
+ return currentEndTime?.diff(currentStartTime, ["seconds"])
148
+ ?.seconds > 0
161
149
  ? true
162
150
  : `${t(`Validation:fieldLaterDate`, {
163
151
  attribute: t("Design:endTimeSmall"),
164
152
  min: t("Design:startTimeSmall"),
165
153
  })}`;
166
154
  },
167
- ...endTimeRules,
168
155
  })}
156
+ onChange={({ target: { value } }) => {
157
+ setValue("endTime", `${value}:59`, { shouldValidate: true });
158
+ }}
169
159
  placeholder="hh:mm"
170
160
  defaultValue={endTime}
171
161
  disabled={disabled}
@@ -7,7 +7,6 @@ import { useIntl } from "react-intl";
7
7
  import {
8
8
  DATE_TIME_FORMAT,
9
9
  DATE_TIME_FULL_FORMAT,
10
- TIME_FULL_FORMAT,
11
10
  } from "@licklist/core/dist/Config/Date";
12
11
  import { usePreviousValue } from "@licklist/plugins/dist/hooks/Value/usePreviousValue";
13
12
  import { FormProvider, useForm } from "react-hook-form";
@@ -39,7 +38,6 @@ export interface RecurringDatePickerInputValues {
39
38
  byweekday?: Weekday[];
40
39
  until?: Date;
41
40
  count?: number;
42
- withOutEndDate?: boolean;
43
41
  }
44
42
 
45
43
  export function RecurringDatePickerInput({
@@ -103,11 +101,6 @@ export function RecurringDatePickerInput({
103
101
  })
104
102
  : nextState.byweekday;
105
103
 
106
- const endTimeNextState = nextState?.endTime
107
- ? DateTime.fromISO(nextState?.endTime).toFormat(TIME_FULL_FORMAT)
108
- : "";
109
- const endDateNextState = nextState?.endDate ?? "";
110
-
111
104
  const rrule = RRule.optionsToString({
112
105
  // @TODO: investigate if we need these fields
113
106
  // dtstart: getDateTimeObject(startDate, startTime).toJSDate(),
@@ -122,8 +115,6 @@ export function RecurringDatePickerInput({
122
115
 
123
116
  onChange({
124
117
  ...nextState,
125
- endDate: endDateNextState,
126
- endTime: endTimeNextState,
127
118
  rrule,
128
119
  });
129
120
  };
@@ -15,7 +15,7 @@ export function ReportForm({
15
15
  onSubmit,
16
16
  onHide,
17
17
  hasPermission,
18
- }: ReportFormProps) {
18
+ }: ReportFormProps): JSX.Element {
19
19
  const { t } = useTranslation(["App"]);
20
20
  const fromDateInput = useRef<HTMLInputDateElement | null>(null);
21
21
  const toDateInput = useRef<HTMLInputDateElement | null>(null);