@licklist/design 0.44.486-dev.48 → 0.44.486-dev.5

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 (307) 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 -7
  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 +1 -2
  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/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  66. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  67. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts +1 -2
  68. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.d.ts.map +1 -1
  69. package/dist/iframe/order-process/components/ErrorModal/ErrorModal.js +1 -1
  70. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  71. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  72. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  73. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +3 -4
  74. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  75. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  76. package/dist/iframe/order-process/constants.d.ts +0 -1
  77. package/dist/iframe/order-process/constants.d.ts.map +1 -1
  78. package/dist/iframe/order-process/constants.js +1 -1
  79. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  80. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  81. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  82. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  83. package/dist/iframe/payment/order-items-table/types/index.d.ts +1 -7
  84. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  85. package/dist/index.d.ts +0 -2
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +1 -1
  88. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  89. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  90. package/dist/product-set/control/ProductSetRecurrenceControl.d.ts.map +1 -1
  91. package/dist/product-set/control/ProductSetRecurrenceControl.js +1 -1
  92. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  93. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  94. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  95. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  96. package/dist/product-set/form/ProductsControl.js +1 -1
  97. package/dist/product-set/product/ProductControl.d.ts +1 -2
  98. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  99. package/dist/product-set/product/ProductControl.js +1 -1
  100. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  101. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  102. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  103. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  104. package/dist/recurrence-input/RecurrenceEndInput.d.ts +1 -8
  105. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  106. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  107. package/dist/recurrence-input/RecurrenceInput.d.ts +1 -2
  108. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  109. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  110. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -4
  111. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  112. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  113. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +0 -1
  114. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  115. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  116. package/dist/report/form/ReportForm.d.ts.map +1 -1
  117. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  118. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  119. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  120. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  121. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  122. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  123. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  124. package/dist/static/form-number-input/FormNumberInput.d.ts +1 -2
  125. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  126. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  127. package/dist/styles/form/CustomCheckbox.scss +0 -5
  128. package/dist/styles/header/Header.scss +4 -0
  129. package/dist/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
  130. package/{src/styles/activity-card/ListActivitiesCard.scss → dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  131. package/dist/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  132. package/dist/styles/iframe-customers-journey/_index.scss +3 -0
  133. package/dist/styles/iframe-events/Card.scss +0 -1
  134. package/dist/styles/iframe-page/PageBody.scss +2 -3
  135. package/dist/styles/notification/Notification.scss +0 -4
  136. package/dist/styles/packages.scss +1 -3
  137. package/dist/styles/resources-blocking/_index.scss +0 -5
  138. package/dist/styles/themes/bookedit/_index.scss +0 -1
  139. package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
  140. package/dist/virtualized/components/VirtualizedWindowScroller.js +1 -1
  141. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  142. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  143. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  144. package/dist/zone/form/components/ZoneControl.js +1 -1
  145. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  146. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  147. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  148. package/dist/zone/form/utils/dates.js +1 -1
  149. package/package.json +2 -2
  150. package/src/assets/logo/bookedit.svg +11 -9
  151. package/src/assets/logo/licklist.svg +2 -0
  152. package/src/date-time-button/DateTimeButton.stories.tsx +0 -17
  153. package/src/date-time-button/DateTimeButton.tsx +22 -19
  154. package/src/events/edit-event-modal/IntervalInput.tsx +0 -3
  155. package/src/events/event-venue-map/hooks/useImage.tsx +8 -17
  156. package/src/file-upload/FileUpload.tsx +1 -3
  157. package/src/iframe/{activity-card → activity-cards/activity-card}/ActivityCard.stories.tsx +1 -24
  158. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
  159. package/src/iframe/activity-cards/index.ts +2 -0
  160. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
  161. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
  162. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +36 -0
  163. package/src/iframe/event/event-calendar/EventCalendar.tsx +27 -0
  164. package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/CalendarButtons.tsx +14 -31
  165. package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +51 -0
  166. package/src/iframe/event/event-calendar/components/CalendarDate/index.ts +2 -0
  167. package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/CalendarDates.tsx +19 -24
  168. package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  169. package/src/iframe/event/event-calendar/index.ts +6 -0
  170. package/src/iframe/event/event-calendar/types/index.ts +6 -0
  171. package/src/iframe/event/event-calendar/utils/index.ts +11 -0
  172. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -1
  173. package/src/iframe/event/index.ts +6 -0
  174. package/src/iframe/index.ts +2 -1
  175. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -4
  176. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -2
  177. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +0 -2
  178. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +8 -17
  179. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +15 -1
  180. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +9 -12
  181. package/src/iframe/order-process/components/Timer/utils/index.ts +9 -6
  182. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +32 -62
  183. package/src/iframe/order-process/constants.ts +0 -1
  184. package/src/iframe/page/Page.stories.tsx +2 -2
  185. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -6
  186. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +99 -11
  187. package/src/iframe/payment/order-items-table/types/index.ts +1 -18
  188. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  189. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  190. package/src/index.ts +0 -2
  191. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -26
  192. package/src/product-set/control/ProductSetRecurrenceControl.tsx +4 -8
  193. package/src/product-set/form/ProductCategoriesControl.tsx +0 -2
  194. package/src/product-set/form/ProductSetForm.stories.tsx +0 -1
  195. package/src/product-set/form/ProductsControl.tsx +0 -10
  196. package/src/product-set/product/ProductControl.tsx +1 -28
  197. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  198. package/src/product-set/product-category/ProductCategoryControl.tsx +7 -1
  199. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  200. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +6 -9
  201. package/src/recurrence-input/RecurrenceEndInput.tsx +10 -28
  202. package/src/recurrence-input/RecurrenceInput.tsx +2 -12
  203. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +21 -24
  204. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +0 -9
  205. package/src/report/form/ReportForm.tsx +1 -1
  206. package/src/sales/booking/results/components/ResultCard.tsx +2 -3
  207. package/src/sales/coupon/control/CouponFormControl.tsx +0 -5
  208. package/src/snippet/snippet-template/preview/Preview.tsx +2 -14
  209. package/src/static/RestrictedAccess.tsx +1 -1
  210. package/src/static/form-number-input/FormNumberInput.tsx +1 -8
  211. package/src/styles/form/CustomCheckbox.scss +0 -5
  212. package/src/styles/header/Header.scss +4 -0
  213. package/src/styles/{activity-card/GridActivitiesCard.scss → iframe-customers-journey/ActivitiesCard.scss} +1 -1
  214. package/{dist/styles/activity-card/ListActivitiesCard.scss → src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss} +1 -2
  215. package/src/styles/{date-time-button → iframe-customers-journey}/DateTimeButton.scss +12 -6
  216. package/src/styles/iframe-customers-journey/_index.scss +3 -0
  217. package/src/styles/iframe-events/Card.scss +0 -1
  218. package/src/styles/iframe-page/PageBody.scss +2 -3
  219. package/src/styles/notification/Notification.scss +0 -4
  220. package/src/styles/packages.scss +1 -3
  221. package/src/styles/resources-blocking/_index.scss +0 -5
  222. package/src/styles/themes/bookedit/_index.scss +0 -1
  223. package/src/typings.d.ts +0 -11
  224. package/src/virtualized/components/VirtualizedWindowScroller.tsx +1 -2
  225. package/src/zone/form/components/AvailableTimesControl.tsx +9 -4
  226. package/src/zone/form/components/ZoneControl.tsx +0 -2
  227. package/src/zone/form/components/ZoneRecurrencesControl.tsx +35 -27
  228. package/src/zone/form/utils/dates.ts +36 -29
  229. package/dist/assets/iframe/available.svg.js +0 -1
  230. package/dist/assets/iframe/limited.svg.js +0 -1
  231. package/dist/assets/iframe/soldOut.svg.js +0 -1
  232. package/dist/assets/logo/favicon.svg +0 -12
  233. package/dist/availability-indicator/AvailabilityIndicator.d.ts +0 -9
  234. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +0 -1
  235. package/dist/availability-indicator/AvailabilityIndicator.js +0 -1
  236. package/dist/availability-indicator/index.d.ts +0 -2
  237. package/dist/availability-indicator/index.d.ts.map +0 -1
  238. package/dist/calendar/Calendar.d.ts +0 -21
  239. package/dist/calendar/Calendar.d.ts.map +0 -1
  240. package/dist/calendar/Calendar.js +0 -1
  241. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  242. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  243. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  244. package/dist/calendar/components/CalendarButtons/index.d.ts.map +0 -1
  245. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
  246. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  247. package/dist/calendar/components/CalendarDates/CalendarDates.js +0 -1
  248. package/dist/calendar/components/CalendarDates/index.d.ts.map +0 -1
  249. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  250. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  251. package/dist/calendar/components/CalendarSelect/index.d.ts.map +0 -1
  252. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  253. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  254. package/dist/calendar/index.d.ts +0 -4
  255. package/dist/calendar/index.d.ts.map +0 -1
  256. package/dist/calendar/utils/index.d.ts +0 -5
  257. package/dist/calendar/utils/index.d.ts.map +0 -1
  258. package/dist/calendar/utils/index.js +0 -1
  259. package/dist/iframe/activity-card/ActivityCard.d.ts +0 -17
  260. package/dist/iframe/activity-card/ActivityCard.d.ts.map +0 -1
  261. package/dist/iframe/activity-card/ActivityCard.js +0 -1
  262. package/dist/iframe/activity-card/index.d.ts +0 -2
  263. package/dist/iframe/activity-card/index.d.ts.map +0 -1
  264. package/dist/iframe/payment/order-items-table/types/index.js +0 -1
  265. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +0 -3
  266. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +0 -1
  267. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +0 -1
  268. package/dist/styles/activity-card/_index.scss +0 -2
  269. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  270. package/dist/styles/availability-indicator/_index.scss +0 -1
  271. package/dist/styles/date-time-button/_index.scss +0 -1
  272. package/dist/zone/form/components/GameDurationControl.d.ts +0 -7
  273. package/dist/zone/form/components/GameDurationControl.d.ts.map +0 -1
  274. package/dist/zone/form/components/GameDurationControl.js +0 -1
  275. package/src/assets/logo/favicon.svg +0 -12
  276. package/src/availability-indicator/AvailabilityIndicator.tsx +0 -59
  277. package/src/availability-indicator/index.ts +0 -1
  278. package/src/calendar/Calendar.stories.tsx +0 -33
  279. package/src/calendar/Calendar.tsx +0 -46
  280. package/src/calendar/index.ts +0 -3
  281. package/src/calendar/utils/index.ts +0 -28
  282. package/src/iframe/activity-card/ActivityCard.tsx +0 -77
  283. package/src/iframe/activity-card/index.ts +0 -1
  284. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -118
  285. package/src/styles/activity-card/_index.scss +0 -2
  286. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -7
  287. package/src/styles/availability-indicator/_index.scss +0 -1
  288. package/src/styles/date-time-button/_index.scss +0 -1
  289. package/src/zone/form/components/GameDurationControl.tsx +0 -46
  290. /package/dist/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  291. /package/dist/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  292. /package/dist/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  293. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.d.ts +0 -0
  294. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.d.ts +0 -0
  295. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  296. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.d.ts +0 -0
  297. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  298. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  299. /package/dist/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  300. /package/src/assets/iframe/{available.svg → dateInfo/available.svg} +0 -0
  301. /package/src/assets/iframe/{limited.svg → dateInfo/limited.svg} +0 -0
  302. /package/src/assets/iframe/{soldOut.svg → dateInfo/soldOut.svg} +0 -0
  303. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarButtons/index.ts +0 -0
  304. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarDates/index.ts +0 -0
  305. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarSelect/index.ts +0 -0
  306. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  307. /package/src/{calendar → iframe/event/event-calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { Meta, Story } from "@storybook/react";
3
+ import { ListActivityCardProps, ListActivityCard } from "./ListActivityCard";
4
+
5
+ export default {
6
+ title: "Iframe/ListActivityCard",
7
+ component: ListActivityCard,
8
+ } as Meta;
9
+
10
+ export const Default: Story<ListActivityCardProps> = (props) => {
11
+ return <ListActivityCard {...props} />;
12
+ };
13
+
14
+ Default.args = {
15
+ title: "Clay Pigeons & Axe Thowing",
16
+ duration: "60 mins",
17
+ price: "from £20",
18
+ image: {
19
+ hash: "0b37b130e22aa2d3",
20
+ id: 195,
21
+ imageType: "cover",
22
+ imageableId: 25,
23
+ imageableType: "zone",
24
+ path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
25
+ // eslint-disable-next-line max-len
26
+ url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
27
+ },
28
+ onSelect: () => null,
29
+ isSelected: false,
30
+ };
31
+
32
+ export const Selected: Story<ListActivityCardProps> = (props) => {
33
+ return <ListActivityCard {...props} />;
34
+ };
35
+
36
+ Selected.args = {
37
+ title: "Clay Pigeons & Axe Thowing",
38
+ duration: "60 mins",
39
+ price: "from £20",
40
+ image: {
41
+ hash: "0b37b130e22aa2d3",
42
+ id: 195,
43
+ imageType: "cover",
44
+ imageableId: 25,
45
+ imageableType: "zone",
46
+ path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
47
+ // eslint-disable-next-line max-len
48
+ url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
49
+ },
50
+ onSelect: () => null,
51
+ isSelected: true,
52
+ };
@@ -0,0 +1,49 @@
1
+ import React from "react";
2
+ import clsx from "clsx";
3
+ import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
4
+
5
+ export interface ListActivityCardProps {
6
+ title: string;
7
+ duration: string;
8
+ price: string;
9
+ image?: Image | null;
10
+ onSelect: () => void;
11
+ isSelected: boolean;
12
+ }
13
+
14
+ export const ListActivityCard = ({
15
+ title,
16
+ duration,
17
+ price,
18
+ image,
19
+ onSelect,
20
+ isSelected,
21
+ }: ListActivityCardProps) => {
22
+ return (
23
+ <div role="button" onClick={onSelect} onKeyPress={onSelect} tabIndex={0}>
24
+ <div
25
+ className={clsx("list-activity-card", {
26
+ active: isSelected,
27
+ })}
28
+ >
29
+ <div className="description">
30
+ <div className="title">{title}</div>
31
+ {duration && (
32
+ <div>
33
+ <p>{duration}</p>
34
+ </div>
35
+ )}
36
+
37
+ {price && <div>{price}</div>}
38
+ </div>
39
+
40
+ {image && (
41
+ <div className="image-container">
42
+ <img className="image" src={image.url} alt="" />
43
+ </div>
44
+ )}
45
+ </div>
46
+ <hr className="list-activity-card-hr" />
47
+ </div>
48
+ );
49
+ };
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import { DateTime } from "luxon";
3
+ import { Meta, Story } from "@storybook/react";
4
+ import {
5
+ EventCalendarProvider,
6
+ getMonthCalendarDates,
7
+ } from "@licklist/plugins/dist/context/event/EventCalendarContext";
8
+ import { EventCalendar, EventCalendarProps } from "./EventCalendar";
9
+
10
+ export default {
11
+ title: "Iframe/Event/Calendar",
12
+ component: EventCalendar,
13
+ } as Meta;
14
+
15
+ export const Default: Story<EventCalendarProps> = (args) => {
16
+ return (
17
+ <EventCalendarProvider getCalendarDates={getMonthCalendarDates}>
18
+ <div style={{ backgroundColor: "white" }}>
19
+ <EventCalendar {...args} />
20
+ </div>
21
+ </EventCalendarProvider>
22
+ );
23
+ };
24
+
25
+ const now = DateTime.now().set({
26
+ hour: 0,
27
+ second: 0,
28
+ millisecond: 0,
29
+ minute: 0,
30
+ });
31
+
32
+ Default.args = {
33
+ disabledDates: [now.minus({ day: 2 }), now, now.plus({ day: 2 })],
34
+ isLoading: false,
35
+ fromPrice: "from £10",
36
+ };
@@ -0,0 +1,27 @@
1
+ import React, { ReactElement } from "react";
2
+ import { CalendarButtons } from "./components/CalendarButtons";
3
+ import { CalendarDates } from "./components/CalendarDates";
4
+ import { CalendarBaseProps } from "./types";
5
+
6
+ export type EventCalendarProps = CalendarBaseProps & {
7
+ fromPrice?: string | ReactElement | null;
8
+ };
9
+
10
+ export const EventCalendar = ({
11
+ disabledDates = [],
12
+ isLoading = false,
13
+ fromPrice,
14
+ }: EventCalendarProps) => {
15
+ return (
16
+ <div className="calendar-wrapper">
17
+ <div className="calendar">
18
+ <CalendarButtons disabledDates={disabledDates} isLoading={isLoading} />
19
+ <CalendarDates
20
+ disabledDates={disabledDates}
21
+ isLoading={isLoading}
22
+ fromPrice={fromPrice}
23
+ />
24
+ </div>
25
+ </div>
26
+ );
27
+ };
@@ -1,53 +1,36 @@
1
- import React, { useCallback, useMemo } from "react";
1
+ import React, { useContext, useMemo } from "react";
2
2
  import { Button } from "react-bootstrap";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { range } from "lodash";
5
- import { ReactComponent as SelectArrow } from "../../../assets/iframe/selectArrow.svg";
5
+ import { EventCalendarContext } from "@licklist/plugins/dist/context/event/EventCalendarContext";
6
+ import { ReactComponent as SelectArrow } from "../../../../../assets/iframe/selectArrow.svg";
6
7
  import { CalendarSelect } from "../CalendarSelect";
8
+ import { CalendarBaseProps } from "../../types";
7
9
  import { isSelectedDateDisabled } from "../../utils";
8
- import { CalendarProps } from "../../Calendar";
9
10
 
10
- type CalendarButtonsProps = Pick<
11
- CalendarProps,
12
- | "isLoading"
13
- | "disabledDates"
14
- | "initialDate"
15
- | "currentDate"
16
- | "setCurrentDate"
17
- | "setSelectedDate"
18
- >;
11
+ type CalendarButtonsProps = CalendarBaseProps;
19
12
 
20
13
  export const CalendarButtons = ({
21
14
  disabledDates = [],
22
15
  isLoading = false,
23
- initialDate,
24
- currentDate,
25
- setCurrentDate,
26
- setSelectedDate,
27
16
  }: CalendarButtonsProps) => {
17
+ const {
18
+ initialDate,
19
+ currentDate,
20
+ canMoveBack,
21
+ onSelectPreviousMonth,
22
+ onSelectNextMonth,
23
+ setCurrentDate,
24
+ setSelectedDate,
25
+ } = useContext(EventCalendarContext);
28
26
  const { t } = useTranslation("Design");
29
27
 
30
- const onSelectNextMonth = useCallback(() => {
31
- setCurrentDate((prevDate) => prevDate.plus({ months: 1 }));
32
- // eslint-disable-next-line react-hooks/exhaustive-deps
33
- }, []);
34
-
35
- const onSelectPreviousMonth = useCallback(() => {
36
- setCurrentDate((prevDate) => prevDate.minus({ month: 1 }));
37
- // eslint-disable-next-line react-hooks/exhaustive-deps
38
- }, []);
39
-
40
28
  const yearOptions = useMemo(() => {
41
29
  return range(initialDate.year, initialDate.year + 5, 1).map((year) => {
42
30
  return { label: String(year), value: year };
43
31
  });
44
32
  }, [initialDate]);
45
33
 
46
- const canMoveBack = useMemo(
47
- () => currentDate > initialDate,
48
- [currentDate, initialDate]
49
- );
50
-
51
34
  const onSelectYear = (value: string) => {
52
35
  const selectedYear = Number(value);
53
36
  const nextDateTime = currentDate.set({ year: selectedYear });
@@ -0,0 +1,51 @@
1
+ import React, { ReactElement } from "react";
2
+ import { Button } from "react-bootstrap";
3
+ import { DateTime } from "luxon";
4
+ import clsx from "clsx";
5
+
6
+ export type CalendarDateProps = {
7
+ initialDate: DateTime;
8
+ currentDate: DateTime;
9
+ selectedDate?: DateTime;
10
+ setSelectedDate: (date: DateTime) => void;
11
+ isDisabled?: boolean;
12
+ fromPrice?: string | ReactElement | null;
13
+ };
14
+
15
+ export const CalendarDate = ({
16
+ initialDate,
17
+ currentDate,
18
+ selectedDate,
19
+ setSelectedDate,
20
+ isDisabled = false,
21
+ fromPrice,
22
+ }: CalendarDateProps) => {
23
+ const onClick = () => {
24
+ if (isDisabled) return;
25
+
26
+ setSelectedDate(currentDate);
27
+ };
28
+
29
+ const disabled = currentDate < initialDate || isDisabled;
30
+
31
+ return (
32
+ <Button
33
+ variant="link"
34
+ disabled={disabled}
35
+ className={clsx(
36
+ "calendar-date",
37
+ selectedDate?.hasSame(currentDate, "day") && "selected-date",
38
+ disabled && "disabled-date"
39
+ )}
40
+ onClick={onClick}
41
+ >
42
+ <div>{currentDate.day}</div>
43
+
44
+ {typeof fromPrice === "string" ? (
45
+ <div>{fromPrice}</div>
46
+ ) : (
47
+ <>{fromPrice}</>
48
+ )}
49
+ </Button>
50
+ );
51
+ };
@@ -0,0 +1,2 @@
1
+ export { CalendarDate } from "./CalendarDate";
2
+ export type { CalendarDateProps } from "./CalendarDate";
@@ -1,26 +1,23 @@
1
- import React, { useMemo } from "react";
1
+ import React, { ReactElement, useContext, useMemo } from "react";
2
2
  import { DateTime } from "luxon";
3
- import { DAY_NUMBER } from "@licklist/core/dist/Config";
4
- import { DateTimeButton } from "../../../date-time-button";
3
+ import { EventCalendarContext } from "@licklist/plugins/dist/context/event/EventCalendarContext";
5
4
  import { CalendarWeekdays } from "../CalendarWeekdays";
5
+ import { CalendarDate } from "../CalendarDate";
6
+ import { CalendarBaseProps } from "../../types";
6
7
  import { isSelectedDateDisabled } from "../../utils";
7
- import { CalendarProps } from "../../Calendar";
8
8
 
9
- export type CalendarDatesProps = Omit<
10
- CalendarProps,
11
- "currentDate" | "setCurrentDate" | "initialDate"
12
- >;
9
+ export type CalendarDatesProps = CalendarBaseProps & {
10
+ fromPrice?: string | ReactElement | null;
11
+ };
13
12
 
14
13
  export const CalendarDates = ({
15
14
  disabledDates = [],
16
15
  isLoading = false,
17
- calendarDates,
18
- selectedDate,
19
- setSelectedDate,
20
16
  fromPrice,
21
- getAvailability,
22
- includeAvailability,
23
17
  }: CalendarDatesProps) => {
18
+ const { calendarDates, initialDate, selectedDate, setSelectedDate } =
19
+ useContext(EventCalendarContext);
20
+
24
21
  const fillCalendarDates = useMemo(() => {
25
22
  let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
26
23
 
@@ -43,24 +40,22 @@ export const CalendarDates = ({
43
40
  <CalendarWeekdays />
44
41
  <div className="calendar-dates">
45
42
  {fillCalendarDates.map((date: DateTime | null) => {
46
- if (date === null) return <div />;
43
+ if (date === null) {
44
+ return <div />;
45
+ }
47
46
 
48
47
  const isDisabled =
49
48
  isLoading || isSelectedDateDisabled(date, disabledDates);
50
49
 
51
50
  return (
52
- <DateTimeButton
51
+ <CalendarDate
53
52
  key={+date}
53
+ currentDate={date}
54
+ initialDate={initialDate}
55
+ selectedDate={selectedDate}
56
+ setSelectedDate={setSelectedDate}
54
57
  isDisabled={isDisabled}
55
- isSelected={
56
- selectedDate ? date.hasSame(selectedDate, "day") : undefined
57
- }
58
- date={date.toFormat(DAY_NUMBER)}
59
- onSelect={() => setSelectedDate(date)}
60
- price={fromPrice}
61
- resources={getAvailability?.(date)}
62
- showResources={includeAvailability}
63
- calendarView
58
+ fromPrice={fromPrice}
64
59
  />
65
60
  );
66
61
  })}
@@ -1,7 +1,7 @@
1
1
  import React, { useRef } from "react";
2
2
  import { Form } from "react-bootstrap";
3
3
  import clsx from "clsx";
4
- import { PAGE_CALENDAR_SELECT_WRAPPER } from "../../../iframe/page/components/PageBody/constants";
4
+ import { PAGE_CALENDAR_SELECT_WRAPPER } from "../../../../page/components/PageBody/constants";
5
5
 
6
6
  export type CalendarSelectOption = {
7
7
  label: string;
@@ -0,0 +1,6 @@
1
+ export { EventCalendar } from "./EventCalendar";
2
+ export { CalendarSelect } from "./components/CalendarSelect";
3
+ export type {
4
+ CalendarSelectProps,
5
+ CalendarSelectOption,
6
+ } from "./components/CalendarSelect";
@@ -0,0 +1,6 @@
1
+ import { DateTime } from "luxon";
2
+
3
+ export type CalendarBaseProps = {
4
+ disabledDates?: DateTime[];
5
+ isLoading?: boolean;
6
+ };
@@ -0,0 +1,11 @@
1
+ import { DateTime } from "luxon";
2
+ import isEqual from "lodash/isEqual";
3
+
4
+ export const isSelectedDateDisabled = (
5
+ selectedDate: DateTime,
6
+ disabledDates: DateTime[] = []
7
+ ) => {
8
+ return !!disabledDates.find((disabledDate) =>
9
+ isEqual(disabledDate.toObject(), selectedDate.toObject())
10
+ );
11
+ };
@@ -5,7 +5,7 @@ import { IframeEventVenueMap } from "./IframeEventVenueMap";
5
5
  import { Page, PageBody, PageHeader } from "../../page";
6
6
  import { BookingSummaryFooter } from "../../order-process/components/BookingSummaryFooter";
7
7
  import { BookingSummary } from "../../order-process/components/BookingSummary";
8
- import { CalendarSelect } from "../../../calendar/components/CalendarSelect";
8
+ import { CalendarSelect } from "../event-calendar/components/CalendarSelect";
9
9
  import { Product } from "../../../types";
10
10
 
11
11
  export default {
@@ -13,6 +13,12 @@ export {
13
13
  } from "./event-order-short-summary";
14
14
  export { EventDescription } from "./event-description";
15
15
  export { EventProductSets, EventProductSetsProps } from "./event-product-sets";
16
+ export {
17
+ EventCalendar,
18
+ CalendarSelect,
19
+ CalendarSelectProps,
20
+ CalendarSelectOption,
21
+ } from "./event-calendar";
16
22
  export {
17
23
  EventStepVenueMapZones,
18
24
  EventStepVenueMapZonesProps,
@@ -10,6 +10,7 @@ export {
10
10
  EventOrderShortSummary,
11
11
  SummaryDataType,
12
12
  EventDescription,
13
+ EventCalendar,
13
14
  EventProductSets,
14
15
  EventProductSetsProps,
15
16
  IframeEventVenueMap,
@@ -42,5 +43,5 @@ export {
42
43
  export { BackButton } from "./back-button";
43
44
  export { PoweredBy } from "./powered-by";
44
45
  export * from "./page";
45
- export * from "./activity-card";
46
+ export * from "./activity-cards";
46
47
  export { CustomDateField, CustomDateFieldProps } from "./custom-fields";
@@ -11,10 +11,9 @@ import { BookingSummaryAccordion } from "./components/BookingSummaryAccordion";
11
11
 
12
12
  export const BookingSummary = ({
13
13
  date,
14
- time,
15
14
  menuSteps,
16
15
  formValues,
17
- shouldHidePeopleAmount,
16
+ isNotShownPeopleAmount,
18
17
  eventName,
19
18
  transactionFee = 0,
20
19
  productsWithErrors,
@@ -48,7 +47,6 @@ export const BookingSummary = ({
48
47
  <div className="event-info">
49
48
  <p className="m-0 title event-name">{eventName}</p>
50
49
  <p className="m-0">{date}</p>
51
- {time && <p className="m-0">{time}</p>}
52
50
  </div>
53
51
  <hr />
54
52
 
@@ -65,7 +63,7 @@ export const BookingSummary = ({
65
63
  />
66
64
  );
67
65
  })}
68
- {!shouldHidePeopleAmount && peopleAmount > 0 && (
66
+ {!isNotShownPeopleAmount && peopleAmount > 0 && (
69
67
  <>
70
68
  <hr />
71
69
  <div className="d-flex justify-content-between mt-3">
@@ -6,13 +6,12 @@ export const ACCORDION_KEY = "booking-summary";
6
6
 
7
7
  export type BookingSummaryProps = {
8
8
  date: string;
9
- time?: string;
10
9
  menuSteps?: MenuStep[];
11
10
  formValues?: {
12
11
  [key: string]: Order;
13
12
  };
14
13
  totalWithDiscount?: number;
15
- shouldHidePeopleAmount?: boolean;
14
+ isNotShownPeopleAmount?: boolean;
16
15
  eventName?: string;
17
16
  hasPeopleInput?: boolean;
18
17
  transactionFee?: number;
@@ -5,8 +5,6 @@ export const cartSumByOrderProducts = (orderProducts?: Order[]) => {
5
5
  return 0;
6
6
  }
7
7
  return orderProducts.reduce((prevSumValue: number, product) => {
8
- if (!product) return 0;
9
-
10
8
  return (
11
9
  prevSumValue + (product?.deposit || product?.price) * product.quantity
12
10
  );
@@ -20,15 +20,15 @@ import { Step } from "@licklist/core/dist/DataMapper/Product/StepDataMapper";
20
20
  import { useTranslation } from "react-i18next";
21
21
  import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
22
22
  import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
23
- import { MenuStep } from "@licklist/plugins/dist/types/context/sale/menuSteps";
24
23
  import { Category } from "./components/Category";
25
- import { MIN_SPEND_ERROR, STEP_FORM_ID } from "../../constants";
24
+ import { MenuStep } from "../../../../types";
25
+ import { STEP_FORM_ID } from "../../constants";
26
26
  import { ErrorModal } from "../ErrorModal/ErrorModal";
27
27
  import { PageBody } from "../../../page/components/PageBody";
28
28
  import {
29
29
  CalendarSelect,
30
30
  CalendarSelectOption,
31
- } from "../../../../calendar/components/CalendarSelect";
31
+ } from "../../../event/event-calendar/components/CalendarSelect";
32
32
  import { IframeEventVenueMap } from "../../../event/event-venue-map";
33
33
  import { VenueMapRef } from "../../../../events/event-venue-map/components/VenueMap";
34
34
  import { useCategoryVerification } from "../utils/useCategoryVerification";
@@ -117,19 +117,12 @@ export const CalendarStepsForm = forwardRef<
117
117
  );
118
118
  return;
119
119
  }
120
- const orderError = verifyCategoryItems(
121
- values,
122
- step.productCategories,
123
- isLastMenuStep
124
- );
120
+ const categoryError = verifyCategoryItems(values, step);
125
121
 
126
- if (orderError) {
127
- const categoryId = orderError.id
128
- ? `category_${orderError.id}`
129
- : MIN_SPEND_ERROR;
130
- setStepFormError(orderError.message);
131
- setError(categoryId as never, {
132
- message: orderError.message,
122
+ if (categoryError) {
123
+ setStepFormError(categoryError.message);
124
+ setError(`category_${categoryError.id}`, {
125
+ message: categoryError.message,
133
126
  });
134
127
  return;
135
128
  }
@@ -370,5 +363,3 @@ export const CalendarStepsForm = forwardRef<
370
363
  );
371
364
  }
372
365
  );
373
-
374
- CalendarStepsForm.displayName = "CalendarStepsForm";
@@ -84,9 +84,23 @@ export const CategoryProduct = ({
84
84
  // but didn't click on number input.
85
85
  // If it will be required then required check fired firstly.
86
86
 
87
- const { isRequired = false, maxAmount = 0, minAmount = 0 } = product;
87
+ const {
88
+ isRequired = false,
89
+ maxAmount = 0,
90
+ minAmount = 0,
91
+ minSpend,
92
+ price,
93
+ } = product;
88
94
 
89
95
  const currentQuantity = value?.quantity ?? 0;
96
+ if (minSpend && currentQuantity * price < minSpend) {
97
+ return t("Design:minimumSpendSumValidation", {
98
+ minSpend: formatNumber(minSpend, {
99
+ style: "currency",
100
+ currency: Config.Currency.GBP,
101
+ }),
102
+ }) as string;
103
+ }
90
104
 
91
105
  if (!value) return true;
92
106
 
@@ -10,14 +10,12 @@ import Icon from "../../../../static/Icon";
10
10
  export interface ErrorModalProps {
11
11
  isOpen: boolean;
12
12
  onClose?: () => void;
13
- message?: string;
14
13
  messageKey?: string;
15
14
  }
16
15
 
17
16
  export const ErrorModal = ({
18
17
  isOpen = false,
19
18
  onClose,
20
- message,
21
19
  messageKey,
22
20
  }: ErrorModalProps) => {
23
21
  const { t } = useTranslation("Design");
@@ -49,16 +47,15 @@ export const ErrorModal = ({
49
47
  </ModalHeader>
50
48
  <ModalBody className="confirmation-modal-body">
51
49
  <div className="d-flex m-5 justify-content-center manual-form-error">
52
- {message ||
53
- (messageKey ? (
54
- t(messageKey)
55
- ) : (
56
- <Trans
57
- t={t}
58
- i18nKey="pleaseSelectAtLeastFrom"
59
- values={{ min: 1, type: "item", from: "those categories" }}
60
- />
61
- ))}
50
+ {messageKey ? (
51
+ t(messageKey)
52
+ ) : (
53
+ <Trans
54
+ t={t}
55
+ i18nKey="pleaseSelectAtLeastFrom"
56
+ values={{ min: 1, type: "item", from: "those categories" }}
57
+ />
58
+ )}
62
59
  </div>
63
60
  </ModalBody>
64
61
  </Modal>
@@ -1,7 +1,10 @@
1
- export const fancyTimeFormat = (milliseconds: number) => {
2
- const totalSeconds = Math.floor(milliseconds / 1000);
3
- const minutes = Math.floor(totalSeconds / 60);
4
- const seconds = totalSeconds % 60;
5
- const formattedSecs = seconds < 10 ? `0${seconds}` : `${seconds}`;
6
- return `${minutes}:${formattedSecs}`;
1
+ export const fancyTimeFormat = (miliseconds: number) => {
2
+ const date = new Date(miliseconds);
3
+ const mins = date.getMinutes();
4
+ const secs = date.getSeconds();
5
+ let timerString = "";
6
+
7
+ timerString += `${mins}:${secs < 10 ? "0" : ""}`;
8
+ timerString += `${secs}`;
9
+ return timerString;
7
10
  };