@licklist/design 0.44.486-dev.7 → 0.44.486-dev.71

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