@licklist/design 0.44.486-dev.39 → 0.44.486-dev.4

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 (297) 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/event-venue-map/hooks/useImage.d.ts.map +1 -1
  11. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  12. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  13. package/dist/file-upload/FileUpload.js +1 -1
  14. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +12 -0
  15. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +1 -0
  16. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +1 -0
  17. package/dist/iframe/activity-cards/index.d.ts +3 -0
  18. package/dist/iframe/activity-cards/index.d.ts.map +1 -0
  19. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +12 -0
  20. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +1 -0
  21. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +1 -0
  22. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +7 -0
  23. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -0
  24. package/dist/iframe/event/event-calendar/EventCalendar.js +1 -0
  25. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  26. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  27. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  28. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +1 -0
  29. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +12 -0
  30. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -0
  31. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +1 -0
  32. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts +3 -0
  33. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +1 -0
  34. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +7 -0
  35. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  36. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +1 -0
  37. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +1 -0
  38. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  39. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  40. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +1 -0
  41. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  42. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  43. package/dist/iframe/event/event-calendar/index.d.ts +4 -0
  44. package/dist/iframe/event/event-calendar/index.d.ts.map +1 -0
  45. package/dist/iframe/event/event-calendar/types/index.d.ts +6 -0
  46. package/dist/iframe/event/event-calendar/types/index.d.ts.map +1 -0
  47. package/dist/iframe/event/event-calendar/utils/index.d.ts +3 -0
  48. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +1 -0
  49. package/dist/iframe/event/event-calendar/utils/index.js +1 -0
  50. package/dist/iframe/event/index.d.ts +1 -0
  51. package/dist/iframe/event/index.d.ts.map +1 -1
  52. package/dist/iframe/index.d.ts +2 -2
  53. package/dist/iframe/index.d.ts.map +1 -1
  54. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  55. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  56. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  57. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  58. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -1
  59. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  60. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  61. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  62. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  63. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  64. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  65. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +1 -2
  66. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  67. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  68. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  69. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  70. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  71. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +2 -3
  72. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  73. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  74. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  75. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  76. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  77. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  78. package/dist/iframe/payment/order-items-table/types/index.d.ts +1 -7
  79. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  80. package/dist/index.d.ts +0 -2
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  84. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  85. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  86. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  87. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  88. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  89. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  90. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  91. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  92. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  93. package/dist/product-set/form/ProductsControl.js +1 -1
  94. package/dist/product-set/product/ProductControl.d.ts +1 -2
  95. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  96. package/dist/product-set/product/ProductControl.js +1 -1
  97. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  98. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  99. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  100. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  101. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  102. package/dist/recurrence-input/RecurrenceEndInput.d.ts +1 -8
  103. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  104. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  105. package/dist/recurrence-input/RecurrenceInput.d.ts +1 -2
  106. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  107. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  108. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -5
  109. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  110. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  111. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -3
  112. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  113. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  114. package/dist/report/form/ReportForm.d.ts.map +1 -1
  115. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  116. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  117. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  118. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  119. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  120. package/dist/static/form-number-input/FormNumberInput.d.ts +1 -2
  121. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  122. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  123. package/dist/styles/form/CustomCheckbox.scss +0 -5
  124. package/dist/styles/header/Header.scss +4 -0
  125. package/dist/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
  126. package/{src/styles/activity-card/ListActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  127. package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  128. package/dist/styles/iframe-customers-journey/_index.scss +3 -0
  129. package/dist/styles/iframe-events/Card.scss +0 -1
  130. package/dist/styles/iframe-page/PageBody.scss +2 -3
  131. package/dist/styles/notification/Notification.scss +0 -4
  132. package/dist/styles/packages.scss +1 -3
  133. package/dist/styles/resources-blocking/_index.scss +0 -5
  134. package/dist/styles/themes/bookedit/_index.scss +0 -1
  135. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  136. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  137. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  138. package/dist/zone/form/components/ZoneControl.js +1 -1
  139. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  140. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  141. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  142. package/dist/zone/form/utils/dates.js +1 -1
  143. package/package.json +2 -2
  144. package/src/assets/logo/bookedit.svg +11 -9
  145. package/src/assets/logo/licklist.svg +2 -0
  146. package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
  147. package/src/date-time-button/DateTimeButton.tsx +22 -17
  148. package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
  149. package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
  150. package/src/file-upload/FileUpload.tsx +1 -3
  151. package/src/iframe/{activity-card → activity-cards/activity-card}/ActivityCard.stories.tsx +1 -24
  152. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
  153. package/src/iframe/activity-cards/index.ts +2 -0
  154. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
  155. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
  156. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +36 -0
  157. package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
  158. package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
  159. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
  160. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
  161. package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -28
  162. package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  163. package/src/iframe/event/event-calendar/index.ts +6 -0
  164. package/src/iframe/event/event-calendar/types/index.ts +6 -0
  165. package/src/iframe/event/event-calendar/utils/index.ts +11 -0
  166. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -1
  167. package/src/iframe/event/index.ts +6 -0
  168. package/src/iframe/index.ts +2 -1
  169. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +0 -2
  170. package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -1
  171. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
  172. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +3 -5
  173. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
  174. package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
  175. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +29 -28
  176. package/src/iframe/page/Page.stories.tsx +2 -2
  177. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -6
  178. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +99 -11
  179. package/src/iframe/payment/order-items-table/types/index.ts +1 -18
  180. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  181. package/src/index.ts +0 -2
  182. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
  183. package/src/product-set/control/DateAndRecurrenceInput.tsx +0 -1
  184. package/src/product-set/control/ProductSetRecurrenceControl.tsx +4 -8
  185. package/src/product-set/form/ProductCategoriesControl.tsx +0 -2
  186. package/src/product-set/form/ProductSetForm.stories.tsx +0 -1
  187. package/src/product-set/form/ProductsControl.tsx +0 -10
  188. package/src/product-set/product/ProductControl.tsx +1 -28
  189. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  190. package/src/product-set/product-category/ProductCategoryControl.tsx +7 -1
  191. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  192. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +8 -10
  193. package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
  194. package/src/recurrence-input/RecurrenceInput.tsx +2 -12
  195. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +24 -53
  196. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -12
  197. package/src/report/form/ReportForm.tsx +1 -1
  198. package/src/sales/booking/results/components/ResultCard.tsx +2 -3
  199. package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
  200. package/src/static/RestrictedAccess.tsx +1 -1
  201. package/src/static/form-number-input/FormNumberInput.tsx +1 -8
  202. package/src/styles/form/CustomCheckbox.scss +0 -5
  203. package/src/styles/header/Header.scss +4 -0
  204. package/src/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
  205. package/{dist/styles/activity-card/ListActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  206. package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  207. package/src/styles/iframe-customers-journey/_index.scss +3 -0
  208. package/src/styles/iframe-events/Card.scss +0 -1
  209. package/src/styles/iframe-page/PageBody.scss +2 -3
  210. package/src/styles/notification/Notification.scss +0 -4
  211. package/src/styles/packages.scss +1 -3
  212. package/src/styles/resources-blocking/_index.scss +0 -5
  213. package/src/styles/themes/bookedit/_index.scss +0 -1
  214. package/src/typings.d.ts +0 -11
  215. package/src/zone/form/components/AvailableTimesControl.tsx +9 -4
  216. package/src/zone/form/components/ZoneControl.tsx +0 -2
  217. package/src/zone/form/components/ZoneRecurrencesControl.tsx +35 -27
  218. package/src/zone/form/utils/dates.ts +36 -29
  219. package/dist/assets/iframe/available.svg.js +0 -1
  220. package/dist/assets/iframe/limited.svg.js +0 -1
  221. package/dist/assets/iframe/soldOut.svg.js +0 -1
  222. package/dist/assets/logo/favicon.svg +0 -12
  223. package/dist/availability-indicator/AvailabilityIndicator.d.ts +0 -9
  224. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
  225. package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
  226. package/dist/availability-indicator/index.d.ts +0 -2
  227. package/dist/availability-indicator/index.d.ts.map +0 -1
  228. package/dist/calendar/Calendar.d.ts +0 -20
  229. package/dist/calendar/Calendar.d.ts.map +0 -1
  230. package/dist/calendar/Calendar.js +0 -1
  231. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  232. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  233. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  234. package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
  235. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
  236. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  237. package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
  238. package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
  239. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  240. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  241. package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
  242. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  243. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  244. package/dist/calendar/index.d.ts +0 -4
  245. package/dist/calendar/index.d.ts.map +0 -1
  246. package/dist/calendar/utils/index.d.ts +0 -5
  247. package/dist/calendar/utils/index.d.ts.map +0 -1
  248. package/dist/calendar/utils/index.js +0 -1
  249. package/dist/iframe/activity-card/ActivityCard.d.ts +0 -17
  250. package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
  251. package/dist/iframe/activity-card/ActivityCard.js +0 -1
  252. package/dist/iframe/activity-card/index.d.ts +0 -2
  253. package/dist/iframe/activity-card/index.d.ts.map +0 -1
  254. package/dist/iframe/payment/order-items-table/types/index.js +0 -1
  255. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +0 -3
  256. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +0 -1
  257. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +0 -1
  258. package/dist/styles/activity-card/_index.scss +0 -2
  259. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  260. package/dist/styles/availability-indicator/_index.scss +0 -1
  261. package/dist/styles/date-time-button/_index.scss +0 -1
  262. package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
  263. package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
  264. package/dist/zone/form/components/GameDurationControl.js +0 -1
  265. package/src/assets/logo/favicon.svg +0 -12
  266. package/src/availability-indicator/AvailabilityIndicator.tsx +0 -59
  267. package/src/availability-indicator/index.ts +0 -1
  268. package/src/calendar/Calendar.stories.tsx +0 -33
  269. package/src/calendar/Calendar.tsx +0 -45
  270. package/src/calendar/index.ts +0 -3
  271. package/src/calendar/utils/index.ts +0 -28
  272. package/src/iframe/activity-card/ActivityCard.tsx +0 -77
  273. package/src/iframe/activity-card/index.ts +0 -1
  274. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -118
  275. package/src/styles/activity-card/_index.scss +0 -2
  276. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  277. package/src/styles/availability-indicator/_index.scss +0 -1
  278. package/src/styles/date-time-button/_index.scss +0 -1
  279. package/src/zone/form/components/GameDurationControl.tsx +0 -46
  280. /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  281. /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  282. /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  283. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
  284. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
  285. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  286. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
  287. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  288. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  289. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  290. /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  291. /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  292. /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  293. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
  294. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
  295. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
  296. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  297. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -1,9 +1,9 @@
1
- import React, { useEffect, useState } from "react";
1
+ 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";
6
- import { DATE_FORMAT } from "@licklist/core/dist/Config";
5
+ import { useFormContext } from "react-hook-form";
6
+ import { DATE_FORMAT, TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
7
7
  import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
8
8
 
9
9
  interface RecurrenceIntervalAndFrequencyInputProps {
@@ -11,17 +11,8 @@ interface RecurrenceIntervalAndFrequencyInputProps {
11
11
  minDate?: string;
12
12
  startDateLabel?: string;
13
13
  startTimeLabel?: string;
14
- isProductSet?: boolean;
15
14
  endDateLabel?: string;
16
15
  endTimeLabel?: string;
17
- startTimeRules?: Pick<
18
- RegisterOptions,
19
- "max" | "min" | "validate" | "required" | "pattern"
20
- >;
21
- endTimeRules?: Pick<
22
- RegisterOptions,
23
- "max" | "min" | "validate" | "required" | "pattern"
24
- >;
25
16
  }
26
17
 
27
18
  function RecurrenceIntervalAndFrequencyInput({
@@ -31,18 +22,15 @@ function RecurrenceIntervalAndFrequencyInput({
31
22
  startTimeLabel,
32
23
  endDateLabel,
33
24
  endTimeLabel,
34
- startTimeRules,
35
- endTimeRules,
36
- isProductSet,
37
25
  }: RecurrenceIntervalAndFrequencyInputProps) {
38
26
  const { t } = useTranslation(["Design", "Notification", "App"]);
39
27
 
40
28
  const {
41
29
  getValues,
42
- setValue,
43
30
  formState: { errors },
44
31
  register,
45
32
  trigger,
33
+ setValue,
46
34
  } = useFormContext<RecurringDatePickerInputValues>();
47
35
 
48
36
  const startDate = getValues("startDate");
@@ -50,14 +38,6 @@ function RecurrenceIntervalAndFrequencyInput({
50
38
  const startTime = getValues("startTime");
51
39
  const endTime = getValues("endTime");
52
40
 
53
- const [withOutEndDate, setWithOutEndDate] = useState<boolean>(!endDate);
54
- const isProductSetWithoutEndDate = isProductSet && withOutEndDate;
55
-
56
- const handleWithoutEndDate = () => {
57
- setValue("endDate", "");
58
- setWithOutEndDate((prevWithOutEndDateValue) => !prevWithOutEndDateValue);
59
- };
60
-
61
41
  useEffect(() => {
62
42
  if (!startDate || !endDate) {
63
43
  return;
@@ -67,9 +47,6 @@ function RecurrenceIntervalAndFrequencyInput({
67
47
  }, [startDate]);
68
48
 
69
49
  useEffect(() => {
70
- if (!startTime || !endTime) {
71
- return;
72
- }
73
50
  trigger("endTime");
74
51
  // eslint-disable-next-line react-hooks/exhaustive-deps
75
52
  }, [startTime]);
@@ -101,7 +78,7 @@ function RecurrenceIntervalAndFrequencyInput({
101
78
  <Form.Control
102
79
  type="date"
103
80
  {...register("endDate", {
104
- required: !isProductSetWithoutEndDate,
81
+ required: true,
105
82
  validate: (date) => {
106
83
  if (!startDate || !date) {
107
84
  return true;
@@ -122,7 +99,7 @@ function RecurrenceIntervalAndFrequencyInput({
122
99
  })}
123
100
  defaultValue={endDate}
124
101
  className={endDate && "date-input-with-value"}
125
- disabled={disabled || isProductSetWithoutEndDate}
102
+ disabled={disabled}
126
103
  min={startDate || undefined}
127
104
  isInvalid={Boolean(errors.endDate)}
128
105
  />
@@ -130,21 +107,6 @@ function RecurrenceIntervalAndFrequencyInput({
130
107
  {errors.endDate?.message}
131
108
  </Form.Control.Feedback>
132
109
  </Form.Group>
133
- {isProductSet && (
134
- <Form.Group className="custom-checkbox">
135
- <Form.Check custom type="checkbox">
136
- <Form.Check.Input
137
- type="checkbox"
138
- className="checkbox-input"
139
- checked={withOutEndDate}
140
- onChange={handleWithoutEndDate}
141
- />
142
- <Form.Check.Label>
143
- {t("Design:infiniteProductSet")}
144
- </Form.Check.Label>
145
- </Form.Check>
146
- </Form.Group>
147
- )}
148
110
  </Col>
149
111
  </Row>
150
112
 
@@ -156,15 +118,15 @@ function RecurrenceIntervalAndFrequencyInput({
156
118
  </Form.Label>
157
119
  <Form.Control
158
120
  type="time"
159
- {...register("startTime", { required: false, ...startTimeRules })}
121
+ {...register("startTime", { required: false })}
122
+ onChange={({ target: { value } }) => {
123
+ setValue("startTime", `${value}:00`);
124
+ }}
160
125
  placeholder="hh:mm"
161
126
  defaultValue={startTime}
162
127
  disabled={disabled}
163
128
  isInvalid={Boolean(errors.startTime)}
164
129
  />
165
- <Form.Control.Feedback type="invalid">
166
- {errors.startTime?.message}
167
- </Form.Control.Feedback>
168
130
  </Form.Group>
169
131
  </Col>
170
132
 
@@ -179,19 +141,28 @@ function RecurrenceIntervalAndFrequencyInput({
179
141
  if (!startTime || !time) {
180
142
  return true;
181
143
  }
182
- const currentStartTime = DateTime.fromISO(startTime);
183
- const currentEndTime = DateTime.fromISO(time);
144
+ const currentStartTime = DateTime.fromFormat(
145
+ startTime,
146
+ TIME_FULL_FORMAT
147
+ );
148
+
149
+ const currentEndTime = DateTime.fromFormat(
150
+ time,
151
+ TIME_FULL_FORMAT
152
+ );
184
153
 
185
- return currentEndTime?.diff(currentStartTime, ["minutes"])
186
- ?.minutes >= 0
154
+ return currentEndTime?.diff(currentStartTime, ["seconds"])
155
+ ?.seconds > 0
187
156
  ? true
188
157
  : `${t(`Validation:fieldLaterDate`, {
189
158
  attribute: t("Design:endTimeSmall"),
190
159
  min: t("Design:startTimeSmall"),
191
160
  })}`;
192
161
  },
193
- ...endTimeRules,
194
162
  })}
163
+ onChange={({ target: { value } }) => {
164
+ setValue("endTime", `${value}:59`, { shouldValidate: true });
165
+ }}
195
166
  placeholder="hh:mm"
196
167
  defaultValue={endTime}
197
168
  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";
@@ -26,7 +25,6 @@ export interface RecurringDatePickerInputProps {
26
25
  initialFrequency?: Frequency;
27
26
  setInitialStartDateAfterSelect?: boolean;
28
27
  minDate?: string;
29
- isProductSet?: boolean;
30
28
  }
31
29
 
32
30
  export interface RecurringDatePickerInputValues {
@@ -40,7 +38,6 @@ export interface RecurringDatePickerInputValues {
40
38
  byweekday?: Weekday[];
41
39
  until?: Date;
42
40
  count?: number;
43
- withOutEndDate?: boolean;
44
41
  }
45
42
 
46
43
  export function RecurringDatePickerInput({
@@ -52,7 +49,6 @@ export function RecurringDatePickerInput({
52
49
  setInitialStartDateAfterSelect = false,
53
50
  children,
54
51
  minDate,
55
- isProductSet,
56
52
  }: PropsWithChildren<RecurringDatePickerInputProps>) {
57
53
  const { t } = useTranslation(["Design"]);
58
54
 
@@ -105,11 +101,6 @@ export function RecurringDatePickerInput({
105
101
  })
106
102
  : nextState.byweekday;
107
103
 
108
- const endTimeNextState = nextState?.endTime
109
- ? DateTime.fromISO(nextState?.endTime).toFormat(TIME_FULL_FORMAT)
110
- : "";
111
- const endDateNextState = nextState?.endDate ?? "";
112
-
113
104
  const rrule = RRule.optionsToString({
114
105
  // @TODO: investigate if we need these fields
115
106
  // dtstart: getDateTimeObject(startDate, startTime).toJSDate(),
@@ -124,8 +115,6 @@ export function RecurringDatePickerInput({
124
115
 
125
116
  onChange({
126
117
  ...nextState,
127
- endDate: endDateNextState,
128
- endTime: endTimeNextState,
129
118
  rrule,
130
119
  });
131
120
  };
@@ -190,7 +179,6 @@ export function RecurringDatePickerInput({
190
179
  <RecurrenceIntervalAndFrequencyInput
191
180
  disabled={disabled}
192
181
  minDate={minDate}
193
- isProductSet={isProductSet}
194
182
  />
195
183
 
196
184
  {children}
@@ -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);
@@ -3,7 +3,6 @@ import clsx from "clsx";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { DateTime } from "luxon";
5
5
  import { Order } from "@licklist/core/dist/DataMapper/Order/OrderDataMapper";
6
- import { TIME_FORMAT } from "@licklist/core/dist/Config";
7
6
  import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
8
7
  import Icon from "../../../../static/Icon";
9
8
 
@@ -56,10 +55,10 @@ export const ResultCard = ({
56
55
  {t("status")}: {t(status)}
57
56
  </p>
58
57
  <p>
59
- {t("date")}: {formatDateStringForEvent(startDate, false)}
58
+ {t("date")}: {formatDateStringForEvent(startDate)}
60
59
  </p>
61
60
  <p>
62
- {t("time")}: {DateTime.fromISO(startDate).toFormat(TIME_FORMAT)}
61
+ {t("time")}: {DateTime.fromISO(startDate).toFormat("hh:MM")}
63
62
  </p>
64
63
  </div>
65
64
  </div>
@@ -7,9 +7,6 @@ import {
7
7
  SNIPPET_TYPE_VENUE_MAP,
8
8
  } from "@licklist/core/dist/DataMapper/Provider/SnippetDataMapper";
9
9
  import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
10
- import { DateTime } from "luxon";
11
- import { Calendar, defaultStartDay } from "../../../calendar";
12
- import { getMonthCalendarDates } from "../../../calendar/utils";
13
10
  import { IframeEventCard } from "../../../iframe/event/event-card";
14
11
  import { SettingButton } from "../settings";
15
12
  import {
@@ -27,6 +24,7 @@ import {
27
24
  } from "../../../iframe";
28
25
  import { NumberInput } from "../../../iframe/order-process/components/CategoryProduct/components/NumberInput";
29
26
  import { SnippetTemplateContext } from "../context/snippetTemplate";
27
+ import { EventCalendar } from "../../../iframe/event/event-calendar";
30
28
 
31
29
  const DEFAULT_IMAGE =
32
30
  "https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80";
@@ -54,10 +52,6 @@ export function Preview({
54
52
  onSettingClick();
55
53
  };
56
54
 
57
- const [currentDate, setCurrentDate] = useState<DateTime>(defaultStartDay);
58
- const [selectedDate, setSelectedDate] = useState<DateTime | null>(null);
59
- const calendarDates = getMonthCalendarDates(currentDate);
60
-
61
55
  return (
62
56
  <div className="w-100 h-100 snippet-template-preview">
63
57
  <Page
@@ -202,13 +196,7 @@ export function Preview({
202
196
  className="mt-3 m-0"
203
197
  containerClassName="mt-5 pt-5"
204
198
  >
205
- <Calendar
206
- currentDate={currentDate}
207
- setCurrentDate={setCurrentDate}
208
- selectedDate={selectedDate}
209
- setSelectedDate={setSelectedDate}
210
- calendarDates={calendarDates}
211
- />
199
+ <EventCalendar />
212
200
  </SettingButton>
213
201
  </div>
214
202
  <div className="pt-4">
@@ -4,7 +4,7 @@ import RouteService from "@licklist/plugins/dist/services/Route/RouteService";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import Icon from "./Icon";
6
6
 
7
- function RestrictedAccess() {
7
+ function RestrictedAccess(): JSX.Element {
8
8
  const { t } = useTranslation("Design");
9
9
 
10
10
  return (
@@ -15,7 +15,6 @@ interface FormNumberInputProps {
15
15
  label: string;
16
16
  fieldName: string;
17
17
  step?: number;
18
- onChange?: (value: number) => void;
19
18
  disabled?: boolean;
20
19
  rules?: Pick<
21
20
  RegisterOptions,
@@ -29,7 +28,6 @@ export const FormNumberInput = ({
29
28
  step = 1,
30
29
  rules,
31
30
  disabled,
32
- onChange,
33
31
  }: FormNumberInputProps) => {
34
32
  const controlId = useId();
35
33
  const { t } = useTranslation("Validation");
@@ -78,12 +76,7 @@ export const FormNumberInput = ({
78
76
  disabled={disabled}
79
77
  isInvalid={HookFormService.isInvalid(fieldName, errors)}
80
78
  {...field}
81
- onChange={(event) => {
82
- if (onChange) {
83
- onChange(Number(event.target.value));
84
- }
85
- field.onChange(Number(event.target.value));
86
- }}
79
+ onChange={(event) => field.onChange(Number(event.target.value))}
87
80
  onFocus={onFocus}
88
81
  />
89
82
  )}
@@ -1,7 +1,6 @@
1
1
  .custom-checkbox {
2
2
  margin-top: 1rem;
3
3
  display: flex;
4
- z-index: 2;
5
4
  align-items: center;
6
5
 
7
6
  .custom-checkbox .custom-control-label::before {
@@ -22,8 +21,4 @@
22
21
  font-weight: 400;
23
22
  font-size: 0.875rem;
24
23
  }
25
-
26
- .checkbox-input {
27
- z-index: 2;
28
- }
29
24
  }
@@ -11,6 +11,10 @@
11
11
  }
12
12
  }
13
13
 
14
+ svg {
15
+ max-height: 1rem;
16
+ }
17
+
14
18
  .navbar-nav {
15
19
  line-height: 1;
16
20
  margin-top: 4px;
@@ -11,7 +11,7 @@
11
11
  word-wrap: break-word;
12
12
  background-color: #fff;
13
13
  font-size: 0.8rem;
14
- background-color: $snippet-product-set-background-color;
14
+ color: $snippet-elements-body-color;
15
15
 
16
16
  div {
17
17
  text-align: left;
@@ -6,9 +6,8 @@
6
6
  align-items: center;
7
7
  cursor: pointer;
8
8
  height: 5rem;
9
- padding: 0.375rem;
10
9
  border: 2px solid transparent;
11
- border-radius: 0.5rem;
10
+ border: 2px solid transparent;
12
11
  background-color: $snippet-product-set-background-color;
13
12
  color: $snippet-product-set-font-color;
14
13
  transition: $color-transition;
@@ -86,12 +86,6 @@
86
86
  max-width: 5.3rem;
87
87
  min-height: 2.75rem;
88
88
  }
89
-
90
- &.calendar-view {
91
- min-width: auto;
92
- max-width: none;
93
- min-height: auto;
94
- }
95
89
  }
96
90
 
97
91
  .time {
@@ -105,3 +99,15 @@
105
99
  font-weight: 300;
106
100
  color: $snippet-calendar-button-font-color;
107
101
  }
102
+
103
+ .info {
104
+ display: flex;
105
+ justify-content: center;
106
+ font-weight: 300;
107
+ flex-direction: row;
108
+
109
+ .logo {
110
+ width: 0.5rem;
111
+ margin-right: 0.5rem;
112
+ }
113
+ }
@@ -0,0 +1,3 @@
1
+ @import "./ActivitiesSelectedCard.scss";
2
+ @import "./ActivitiesCard.scss";
3
+ @import "./DateTimeButton.scss";
@@ -142,7 +142,6 @@
142
142
  .card-body {
143
143
  padding: 0;
144
144
  margin: 0 0 auto;
145
- margin-top: 1rem;
146
145
  }
147
146
  }
148
147
 
@@ -199,8 +199,7 @@
199
199
  color: $snippet-elements-button-color;
200
200
  border: none;
201
201
  background-color: $snippet-elements-button-background-color;
202
- box-shadow: 0 0 0 $input-btn-focus-width
203
- $snippet-elements-button-background-color;
202
+ box-shadow: 0 0 0 $input-btn-focus-width $snippet-elements-button-background-color;
204
203
  }
205
204
 
206
205
  &:disabled {
@@ -235,7 +234,7 @@
235
234
  font-weight: 500;
236
235
  border-radius: 0.25rem;
237
236
  font-size: 0.875rem;
238
- min-height: 2.25rem;
237
+ height: 2.25rem;
239
238
 
240
239
  &:focus {
241
240
  box-shadow: unset;
@@ -15,10 +15,6 @@
15
15
  display: none !important;
16
16
  }
17
17
  }
18
-
19
- &.is-invalid {
20
- border-color: theme-color("danger");
21
- }
22
18
  }
23
19
 
24
20
  .placeholder-row {
@@ -13,6 +13,7 @@
13
13
  @import "./static";
14
14
  @import "./table";
15
15
  @import "./back-button";
16
+ @import "./iframe-customers-journey";
16
17
  @import "./custom-fields";
17
18
  @import "./file-upload";
18
19
  @import "./iframe-events";
@@ -40,6 +41,3 @@
40
41
  @import "./striped-static-table/";
41
42
  @import "./image-radio-input/";
42
43
  @import "./radio-card/";
43
- @import "./activity-card/";
44
- @import "./date-time-button/";
45
- @import "./availability-indicator/";
@@ -7,11 +7,6 @@
7
7
  overflow: auto;
8
8
  }
9
9
 
10
- .modal-form-content {
11
- max-height: 21rem;
12
- overflow-x: hidden;
13
- }
14
-
15
10
  .reccurrence-interval-container {
16
11
  .form-group {
17
12
  margin-bottom: 0.5rem;
@@ -46,7 +46,6 @@
46
46
  .header {
47
47
  background-color: color("white");
48
48
  padding: 0 2.5rem;
49
- z-index: 2;
50
49
  min-height: 4rem;
51
50
  border-bottom: 1px solid #f0f0f0;
52
51
  }
package/src/typings.d.ts CHANGED
@@ -28,14 +28,3 @@ declare module "*.json" {
28
28
 
29
29
  declare module "react-phone-number-input/input";
30
30
  declare module "react-phone-number-input/commonjs/Flag";
31
-
32
- // @TODO: this is a hofix for the following issue:
33
- // licklist_workspace_frontend/packages/design/src/product-set/hooks/useSortableTreeFunctions.ts(17,34):
34
- // semantic error TS2304: Cannot find name 'structuredClone'.
35
- interface WindowOrWorkerGlobalScope {
36
- structuredClone(value: any, options?: StructuredSerializeOptions): any;
37
- }
38
- declare function structuredClone(
39
- value: any,
40
- options?: StructuredSerializeOptions
41
- ): any;
@@ -9,6 +9,7 @@ import { Form } from "react-bootstrap";
9
9
  import { UseFormSetError, useForm } from "react-hook-form";
10
10
  import { useId } from "@react-aria/utils";
11
11
  import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
12
+ import { calculateTimeWithOffset } from "@licklist/plugins/dist/utils/time";
12
13
  import { getCheckboxesByWorkHours } from "../utils/dates";
13
14
 
14
15
  export type AvailableTimesControlRef = {
@@ -61,18 +62,20 @@ export const AvailableTimesControl = forwardRef<
61
62
  });
62
63
 
63
64
  const onChange = (option: string) => {
64
- const isAlreadyChecked = availableTimes.includes(option);
65
+ const timeWithOffset = calculateTimeWithOffset(option);
66
+
67
+ const isAlreadyChecked = availableTimes.includes(timeWithOffset);
65
68
 
66
69
  if (isAlreadyChecked) {
67
70
  setValue(
68
71
  "availableTimes",
69
- availableTimes.filter((value) => value !== option)
72
+ availableTimes.filter((value) => value !== timeWithOffset)
70
73
  );
71
74
 
72
75
  return;
73
76
  }
74
77
 
75
- setValue("availableTimes", [...availableTimes, option]);
78
+ setValue("availableTimes", [...availableTimes, timeWithOffset]);
76
79
  };
77
80
 
78
81
  useEffect(() => {
@@ -92,7 +95,9 @@ export const AvailableTimesControl = forwardRef<
92
95
  <Form.Check.Input
93
96
  type="checkbox"
94
97
  value={option}
95
- checked={availableTimes.includes(option)}
98
+ checked={availableTimes.includes(
99
+ calculateTimeWithOffset(option)
100
+ )}
96
101
  onChange={() => onChange(option)}
97
102
  disabled={isLoading}
98
103
  />
@@ -7,7 +7,6 @@ import { SortControl } from "./SortControl";
7
7
  import { ZoneRecurrencesControl } from "./ZoneRecurrencesControl";
8
8
  import { DescriptionControl } from "./DescriptionControl";
9
9
  import { ZoneImageControl } from "./ZoneImageControl";
10
- import { GameDurationControl } from "./GameDurationControl";
11
10
 
12
11
  export type ZoneControlProps = {
13
12
  isLoading: boolean;
@@ -28,7 +27,6 @@ export const ZoneControl = ({
28
27
  <Col md={6} sm={6}>
29
28
  <ZoneTypeControl isLoading={isLoading} />
30
29
  <SortControl isLoading={isLoading} />
31
- <GameDurationControl isLoading={isLoading} />
32
30
  </Col>
33
31
  <Col md={6} sm={6}>
34
32
  <ZoneImageControl isLoading={isLoading} />
@@ -12,8 +12,11 @@ import {
12
12
  import { DndContext } from "@dnd-kit/core";
13
13
  import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
14
14
  import { DateTime } from "luxon";
15
- import { TIME_FORMAT } from "@licklist/core/dist/Config";
16
-
15
+ import { TIME_FORMAT, TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
16
+ import {
17
+ calculateTimeWithOffset,
18
+ DIRECTION_TO_LOCAL,
19
+ } from "@licklist/plugins/dist/utils/time";
17
20
  import { CONFIRM_MODAL_ACTIONS } from "../../../modals/confirmation/ConfirmModal";
18
21
  import { Icon } from "../../../static";
19
22
  import {
@@ -64,6 +67,7 @@ export const ZoneRecurrencesControl = ({
64
67
  });
65
68
  const clearEditState = () => setEditState({ index: null, values: null });
66
69
  const [availableTimes, setAvailableTimes] = useState<string[]>([]);
70
+
67
71
  const popoverRef = useRef<HTMLDivElement>();
68
72
  const availableTimesFormRef = useRef<AvailableTimesControlRef>();
69
73
 
@@ -93,29 +97,30 @@ export const ZoneRecurrencesControl = ({
93
97
  if (!isAvailableTimesFormValid) {
94
98
  return;
95
99
  }
96
- if (next?.startTime && next?.endTime) {
97
- const startTime = DateTime.fromISO(next.startTime);
98
- const endTime = DateTime.fromISO(next.endTime);
99
- const { availableTimes } = availableTimesFormRef.current.getValues();
100
- const validAvalilableTimes = availableTimes.every((time) => {
101
- const currentAvailableTime = DateTime.fromFormat(time, TIME_FORMAT);
102
-
103
- return (
104
- currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
105
- currentAvailableTime.diff(endTime, "minutes").minutes <= 0
106
- );
100
+ const startTime = DateTime.fromFormat(next.startTime, TIME_FULL_FORMAT);
101
+ const endTime = DateTime.fromFormat(next.endTime, TIME_FULL_FORMAT);
102
+ const { availableTimes } = availableTimesFormRef.current.getValues();
103
+ const validAvalilableTimes = availableTimes.every((time) => {
104
+ const currentAvailableTime = DateTime.fromFormat(
105
+ calculateTimeWithOffset(time, DIRECTION_TO_LOCAL),
106
+ TIME_FORMAT
107
+ );
108
+
109
+ return (
110
+ currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
111
+ currentAvailableTime.diff(endTime, "minutes").minutes <= 0
112
+ );
113
+ });
114
+ if (!validAvalilableTimes) {
115
+ availableTimesFormRef.current.setError("availableTimes", {
116
+ message: t("Validation:fieldTimeBetween", {
117
+ attribute: t("Design:startTimesSmall"),
118
+ min: startTime.toFormat(TIME_FORMAT),
119
+ max: endTime.toFormat(TIME_FORMAT),
120
+ }),
107
121
  });
108
- if (!validAvalilableTimes) {
109
- availableTimesFormRef.current.setError("availableTimes", {
110
- message: t("Validation:fieldTimeBetween", {
111
- attribute: t("Design:startTimesSmall"),
112
- min: startTime.toFormat(TIME_FORMAT),
113
- max: endTime.toFormat(TIME_FORMAT),
114
- }),
115
- });
116
-
117
- return;
118
- }
122
+
123
+ return;
119
124
  }
120
125
  const values = {
121
126
  rrule: next.rrule,
@@ -143,9 +148,12 @@ export const ZoneRecurrencesControl = ({
143
148
  const handleOnEdit = (next: Partial<ZoneRecurrence>, index) => {
144
149
  clearEditState();
145
150
 
146
- setEditState({ index, values: next });
147
- setAvailableTimes(next.availableTimes || []);
148
- setIsDatePopoverVisible(() => true);
151
+ // Hotfix for an issue with Popover close & open actions
152
+ setTimeout(() => {
153
+ setEditState({ index, values: next });
154
+ setAvailableTimes(next.availableTimes || []);
155
+ setIsDatePopoverVisible(() => true);
156
+ }, 100);
149
157
  };
150
158
 
151
159
  const handleOnAdd = () => {