@licklist/design 0.44.486-dev.3 → 0.44.486-dev.31

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 (276) 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/calendar/Calendar.d.ts +16 -0
  10. package/dist/calendar/Calendar.d.ts.map +1 -0
  11. package/dist/calendar/Calendar.js +1 -0
  12. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +6 -0
  13. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -0
  14. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -0
  15. package/dist/calendar/components/CalendarButtons/index.d.ts.map +1 -0
  16. package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDate/CalendarDate.d.ts +3 -2
  17. package/dist/calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -0
  18. package/dist/calendar/components/CalendarDate/CalendarDate.js +1 -0
  19. package/dist/calendar/components/CalendarDate/index.d.ts.map +1 -0
  20. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +8 -0
  21. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -0
  22. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -0
  23. package/dist/calendar/components/CalendarDates/index.d.ts.map +1 -0
  24. package/dist/calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -0
  25. package/dist/calendar/components/CalendarSelect/CalendarSelect.js +1 -0
  26. package/dist/calendar/components/CalendarSelect/index.d.ts.map +1 -0
  27. package/dist/calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +1 -0
  28. package/dist/calendar/components/CalendarWeekdays/index.d.ts.map +1 -0
  29. package/dist/calendar/index.d.ts +4 -0
  30. package/dist/calendar/index.d.ts.map +1 -0
  31. package/dist/calendar/utils/index.d.ts +5 -0
  32. package/dist/calendar/utils/index.d.ts.map +1 -0
  33. package/dist/calendar/utils/index.js +1 -0
  34. package/dist/date-time-button/DateTimeButton.d.ts +5 -1
  35. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  36. package/dist/date-time-button/DateTimeButton.js +1 -1
  37. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  38. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  39. package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
  40. package/dist/events/event-venue-map/hooks/useImage.js +1 -1
  41. package/dist/file-upload/FileUpload.d.ts.map +1 -1
  42. package/dist/file-upload/FileUpload.js +1 -1
  43. package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
  44. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
  45. package/dist/iframe/activity-card/ActivityCard.js +1 -0
  46. package/dist/iframe/activity-card/index.d.ts +2 -0
  47. package/dist/iframe/activity-card/index.d.ts.map +1 -0
  48. package/dist/iframe/event/index.d.ts +0 -1
  49. package/dist/iframe/event/index.d.ts.map +1 -1
  50. package/dist/iframe/index.d.ts +2 -2
  51. package/dist/iframe/index.d.ts.map +1 -1
  52. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  53. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  54. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  55. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  56. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -0
  57. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  58. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  59. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
  60. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
  61. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
  62. package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
  63. package/dist/iframe/order-process/components/Timer/utils/index.d.ts +1 -1
  64. package/dist/iframe/order-process/components/Timer/utils/index.d.ts.map +1 -1
  65. package/dist/iframe/order-process/components/Timer/utils/index.js +1 -1
  66. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +3 -2
  67. package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
  68. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  69. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  70. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  71. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  72. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
  73. package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
  74. package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
  75. package/dist/iframe/payment/order-items-table/types/index.js +1 -0
  76. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
  77. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
  78. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
  79. package/dist/index.d.ts +1 -0
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  83. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  84. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  85. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  86. package/dist/product-set/form/ProductsControl.d.ts +3 -1
  87. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  88. package/dist/product-set/form/ProductsControl.js +1 -1
  89. package/dist/product-set/product/ProductControl.d.ts +2 -1
  90. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  91. package/dist/product-set/product/ProductControl.js +1 -1
  92. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  93. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  94. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  95. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  96. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  97. package/dist/recurrence-input/RecurrenceEndInput.d.ts +8 -1
  98. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  99. package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
  100. package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
  101. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  102. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  103. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +4 -1
  104. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  105. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
  106. package/dist/report/form/ReportForm.d.ts.map +1 -1
  107. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  108. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  109. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  110. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  111. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  112. package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
  113. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  114. package/dist/static/form-number-input/FormNumberInput.js +1 -1
  115. package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  116. package/dist/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
  117. package/dist/styles/activity-card/_index.scss +2 -0
  118. package/{src/styles/iframe-customers-journey → dist/styles/date-time-button}/DateTimeButton.scss +3 -6
  119. package/dist/styles/date-time-button/_index.scss +1 -0
  120. package/dist/styles/header/Header.scss +0 -4
  121. package/dist/styles/iframe-events/Calendar.scss +14 -14
  122. package/dist/styles/iframe-events/Card.scss +1 -0
  123. package/dist/styles/iframe-page/PageBody.scss +3 -2
  124. package/dist/styles/notification/Notification.scss +4 -0
  125. package/dist/styles/packages.scss +2 -1
  126. package/dist/styles/resources-blocking/_index.scss +5 -0
  127. package/dist/styles/themes/bookedit/_index.scss +1 -0
  128. package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
  129. package/dist/zone/form/components/AvailableTimesControl.js +1 -1
  130. package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
  131. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
  132. package/dist/zone/form/components/GameDurationControl.js +1 -0
  133. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  134. package/dist/zone/form/components/ZoneControl.js +1 -1
  135. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  136. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  137. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  138. package/dist/zone/form/utils/dates.js +1 -1
  139. package/package.json +2 -2
  140. package/src/assets/logo/bookedit.svg +9 -11
  141. package/src/assets/logo/favicon.svg +12 -0
  142. package/src/assets/logo/licklist.svg +0 -2
  143. package/src/calendar/Calendar.stories.tsx +33 -0
  144. package/src/calendar/Calendar.tsx +59 -0
  145. package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/CalendarButtons.tsx +31 -14
  146. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDate/CalendarDate.tsx +10 -2
  147. package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/CalendarDates.tsx +17 -13
  148. package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.tsx +1 -1
  149. package/src/calendar/index.ts +3 -0
  150. package/src/calendar/utils/index.ts +28 -0
  151. package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
  152. package/src/date-time-button/DateTimeButton.tsx +42 -20
  153. package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
  154. package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
  155. package/src/file-upload/FileUpload.tsx +3 -1
  156. package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
  157. package/src/iframe/activity-card/ActivityCard.tsx +77 -0
  158. package/src/iframe/activity-card/index.ts +1 -0
  159. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +1 -1
  160. package/src/iframe/event/index.ts +0 -6
  161. package/src/iframe/index.ts +1 -2
  162. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -0
  163. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -0
  164. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
  165. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +5 -3
  166. package/src/iframe/order-process/components/Timer/utils/index.ts +6 -9
  167. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +28 -29
  168. package/src/iframe/page/Page.stories.tsx +2 -2
  169. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
  170. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
  171. package/src/iframe/payment/order-items-table/types/index.ts +18 -1
  172. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
  173. package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
  174. package/src/index.ts +1 -0
  175. package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
  176. package/src/product-set/form/ProductCategoriesControl.tsx +2 -0
  177. package/src/product-set/form/ProductSetForm.stories.tsx +1 -0
  178. package/src/product-set/form/ProductsControl.tsx +10 -0
  179. package/src/product-set/product/ProductControl.tsx +28 -1
  180. package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
  181. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -7
  182. package/src/provider/location-input/LocationInputDescription.tsx +2 -2
  183. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +10 -8
  184. package/src/recurrence-input/RecurrenceEndInput.tsx +28 -10
  185. package/src/recurrence-input/RecurrenceInput.tsx +12 -2
  186. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +24 -21
  187. package/src/report/form/ReportForm.tsx +1 -1
  188. package/src/sales/booking/results/components/ResultCard.tsx +3 -2
  189. package/src/snippet/snippet-template/preview/Preview.tsx +14 -2
  190. package/src/static/CountryCodeSelect.tsx +3 -3
  191. package/src/static/RestrictedAccess.tsx +1 -1
  192. package/src/static/form-number-input/FormNumberInput.tsx +8 -1
  193. package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
  194. package/src/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
  195. package/src/styles/activity-card/_index.scss +2 -0
  196. package/{dist/styles/iframe-customers-journey → src/styles/date-time-button}/DateTimeButton.scss +3 -6
  197. package/src/styles/date-time-button/_index.scss +1 -0
  198. package/src/styles/header/Header.scss +0 -4
  199. package/src/styles/iframe-events/Calendar.scss +14 -14
  200. package/src/styles/iframe-events/Card.scss +1 -0
  201. package/src/styles/iframe-page/PageBody.scss +3 -2
  202. package/src/styles/notification/Notification.scss +4 -0
  203. package/src/styles/packages.scss +2 -1
  204. package/src/styles/resources-blocking/_index.scss +5 -0
  205. package/src/styles/themes/bookedit/_index.scss +1 -0
  206. package/src/typings.d.ts +11 -0
  207. package/src/zone/form/components/AvailableTimesControl.tsx +4 -9
  208. package/src/zone/form/components/GameDurationControl.tsx +46 -0
  209. package/src/zone/form/components/ZoneControl.tsx +2 -0
  210. package/src/zone/form/components/ZoneRecurrencesControl.tsx +27 -35
  211. package/src/zone/form/utils/dates.ts +29 -36
  212. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
  213. package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
  214. package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
  215. package/dist/iframe/activity-cards/index.d.ts +0 -3
  216. package/dist/iframe/activity-cards/index.d.ts.map +0 -1
  217. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
  218. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
  219. package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
  220. package/dist/iframe/event/event-calendar/EventCalendar.d.ts +0 -5
  221. package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +0 -1
  222. package/dist/iframe/event/event-calendar/EventCalendar.js +0 -1
  223. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +0 -6
  224. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +0 -1
  225. package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.js +0 -1
  226. package/dist/iframe/event/event-calendar/components/CalendarButtons/index.d.ts.map +0 -1
  227. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +0 -1
  228. package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +0 -1
  229. package/dist/iframe/event/event-calendar/components/CalendarDate/index.d.ts.map +0 -1
  230. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +0 -5
  231. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +0 -1
  232. package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +0 -1
  233. package/dist/iframe/event/event-calendar/components/CalendarDates/index.d.ts.map +0 -1
  234. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +0 -1
  235. package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js +0 -1
  236. package/dist/iframe/event/event-calendar/components/CalendarSelect/index.d.ts.map +0 -1
  237. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/CalendarWeekdays.d.ts.map +0 -1
  238. package/dist/iframe/event/event-calendar/components/CalendarWeekdays/index.d.ts.map +0 -1
  239. package/dist/iframe/event/event-calendar/index.d.ts +0 -4
  240. package/dist/iframe/event/event-calendar/index.d.ts.map +0 -1
  241. package/dist/iframe/event/event-calendar/types/index.d.ts +0 -6
  242. package/dist/iframe/event/event-calendar/types/index.d.ts.map +0 -1
  243. package/dist/iframe/event/event-calendar/utils/index.d.ts +0 -3
  244. package/dist/iframe/event/event-calendar/utils/index.d.ts.map +0 -1
  245. package/dist/iframe/event/event-calendar/utils/index.js +0 -1
  246. package/dist/styles/iframe-customers-journey/_index.scss +0 -3
  247. package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
  248. package/src/iframe/activity-cards/index.ts +0 -2
  249. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
  250. package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
  251. package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +0 -37
  252. package/src/iframe/event/event-calendar/EventCalendar.tsx +0 -20
  253. package/src/iframe/event/event-calendar/index.ts +0 -6
  254. package/src/iframe/event/event-calendar/types/index.ts +0 -6
  255. package/src/iframe/event/event-calendar/utils/index.ts +0 -11
  256. package/src/styles/iframe-customers-journey/_index.scss +0 -3
  257. /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  258. /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  259. /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  260. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.d.ts +0 -0
  261. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDate/index.d.ts +0 -0
  262. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.d.ts +0 -0
  263. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/CalendarSelect.d.ts +0 -0
  264. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.d.ts +0 -0
  265. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.d.ts +0 -0
  266. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.js +0 -0
  267. /package/dist/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.d.ts +0 -0
  268. /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
  269. /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
  270. /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
  271. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarButtons/index.ts +0 -0
  272. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDate/index.ts +0 -0
  273. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarDates/index.ts +0 -0
  274. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarSelect/index.ts +0 -0
  275. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/CalendarWeekdays.tsx +0 -0
  276. /package/src/{iframe/event/event-calendar → calendar}/components/CalendarWeekdays/index.ts +0 -0
@@ -2,8 +2,8 @@ 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";
6
- import { DATE_FORMAT, TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
5
+ import { RegisterOptions, useFormContext } from "react-hook-form";
6
+ import { DATE_FORMAT } from "@licklist/core/dist/Config";
7
7
  import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
8
8
 
9
9
  interface RecurrenceIntervalAndFrequencyInputProps {
@@ -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
 
@@ -141,28 +153,19 @@ function RecurrenceIntervalAndFrequencyInput({
141
153
  if (!startTime || !time) {
142
154
  return true;
143
155
  }
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
- );
156
+ const currentStartTime = DateTime.fromISO(startTime);
157
+ const currentEndTime = DateTime.fromISO(time);
153
158
 
154
- return currentEndTime?.diff(currentStartTime, ["seconds"])
155
- ?.seconds > 0
159
+ return currentEndTime?.diff(currentStartTime, ["minutes"])
160
+ ?.minutes >= 0
156
161
  ? true
157
162
  : `${t(`Validation:fieldLaterDate`, {
158
163
  attribute: t("Design:endTimeSmall"),
159
164
  min: t("Design:startTimeSmall"),
160
165
  })}`;
161
166
  },
167
+ ...endTimeRules,
162
168
  })}
163
- onChange={({ target: { value } }) => {
164
- setValue("endTime", `${value}:59`, { shouldValidate: true });
165
- }}
166
169
  placeholder="hh:mm"
167
170
  defaultValue={endTime}
168
171
  disabled={disabled}
@@ -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);
@@ -3,6 +3,7 @@ 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";
6
7
  import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
7
8
  import Icon from "../../../../static/Icon";
8
9
 
@@ -55,10 +56,10 @@ export const ResultCard = ({
55
56
  {t("status")}: {t(status)}
56
57
  </p>
57
58
  <p>
58
- {t("date")}: {formatDateStringForEvent(startDate)}
59
+ {t("date")}: {formatDateStringForEvent(startDate, false)}
59
60
  </p>
60
61
  <p>
61
- {t("time")}: {DateTime.fromISO(startDate).toFormat("hh:MM")}
62
+ {t("time")}: {DateTime.fromISO(startDate).toFormat(TIME_FORMAT)}
62
63
  </p>
63
64
  </div>
64
65
  </div>
@@ -7,6 +7,9 @@ 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";
10
13
  import { IframeEventCard } from "../../../iframe/event/event-card";
11
14
  import { SettingButton } from "../settings";
12
15
  import {
@@ -24,7 +27,6 @@ import {
24
27
  } from "../../../iframe";
25
28
  import { NumberInput } from "../../../iframe/order-process/components/CategoryProduct/components/NumberInput";
26
29
  import { SnippetTemplateContext } from "../context/snippetTemplate";
27
- import { EventCalendar } from "../../../iframe/event/event-calendar";
28
30
 
29
31
  const DEFAULT_IMAGE =
30
32
  "https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80";
@@ -52,6 +54,10 @@ export function Preview({
52
54
  onSettingClick();
53
55
  };
54
56
 
57
+ const [currentDate, setCurrentDate] = useState<DateTime>(defaultStartDay);
58
+ const [selectedDate, setSelectedDate] = useState<DateTime | null>(null);
59
+ const calendarDates = getMonthCalendarDates(currentDate);
60
+
55
61
  return (
56
62
  <div className="w-100 h-100 snippet-template-preview">
57
63
  <Page
@@ -196,7 +202,13 @@ export function Preview({
196
202
  className="mt-3 m-0"
197
203
  containerClassName="mt-5 pt-5"
198
204
  >
199
- <EventCalendar />
205
+ <Calendar
206
+ currentDate={currentDate}
207
+ setCurrentDate={setCurrentDate}
208
+ selectedDate={selectedDate}
209
+ setSelectedDate={setSelectedDate}
210
+ calendarDates={calendarDates}
211
+ />
200
212
  </SettingButton>
201
213
  </div>
202
214
  <div className="pt-4">
@@ -52,9 +52,9 @@ function CountryCodeSelect({
52
52
  {t("chooseCountry")}
53
53
  </option>
54
54
  {sortedCountries.map((key: keyof typeof en) => (
55
- <option key={key as string} value={key as string}>
56
- {en[key]}
57
- </option>
55
+ <option key={key as string} value={key as string}>
56
+ {en[key]}
57
+ </option>
58
58
  ))}
59
59
  </Form.Control>
60
60
  <Form.Control.Feedback type="invalid">{error}</Form.Control.Feedback>
@@ -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(): JSX.Element {
7
+ function RestrictedAccess() {
8
8
  const { t } = useTranslation("Design");
9
9
 
10
10
  return (
@@ -15,6 +15,7 @@ interface FormNumberInputProps {
15
15
  label: string;
16
16
  fieldName: string;
17
17
  step?: number;
18
+ onChange?: (value: number) => void;
18
19
  disabled?: boolean;
19
20
  rules?: Pick<
20
21
  RegisterOptions,
@@ -28,6 +29,7 @@ export const FormNumberInput = ({
28
29
  step = 1,
29
30
  rules,
30
31
  disabled,
32
+ onChange,
31
33
  }: FormNumberInputProps) => {
32
34
  const controlId = useId();
33
35
  const { t } = useTranslation("Validation");
@@ -76,7 +78,12 @@ export const FormNumberInput = ({
76
78
  disabled={disabled}
77
79
  isInvalid={HookFormService.isInvalid(fieldName, errors)}
78
80
  {...field}
79
- onChange={(event) => field.onChange(Number(event.target.value))}
81
+ onChange={(event) => {
82
+ if (onChange) {
83
+ onChange(Number(event.target.value));
84
+ }
85
+ field.onChange(Number(event.target.value));
86
+ }}
80
87
  onFocus={onFocus}
81
88
  />
82
89
  )}
@@ -11,7 +11,7 @@
11
11
  word-wrap: break-word;
12
12
  background-color: #fff;
13
13
  font-size: 0.8rem;
14
- color: $snippet-elements-body-color;
14
+ background-color: $snippet-product-set-background-color;
15
15
 
16
16
  div {
17
17
  text-align: left;
@@ -6,8 +6,9 @@
6
6
  align-items: center;
7
7
  cursor: pointer;
8
8
  height: 5rem;
9
+ padding: 0.375rem;
9
10
  border: 2px solid transparent;
10
- border: 2px solid transparent;
11
+ border-radius: 0.5rem;
11
12
  background-color: $snippet-product-set-background-color;
12
13
  color: $snippet-product-set-font-color;
13
14
  transition: $color-transition;
@@ -0,0 +1,2 @@
1
+ @import "./GridActivitiesCard.scss";
2
+ @import "./ListActivitiesCard.scss";
@@ -100,14 +100,11 @@
100
100
  color: $snippet-calendar-button-font-color;
101
101
  }
102
102
 
103
- .info {
103
+ .resources {
104
104
  display: flex;
105
105
  justify-content: center;
106
+ align-items: center;
107
+ gap: 0.5rem;
106
108
  font-weight: 300;
107
109
  flex-direction: row;
108
-
109
- .logo {
110
- width: 0.5rem;
111
- margin-right: 0.5rem;
112
- }
113
110
  }
@@ -0,0 +1 @@
1
+ @import "./DateTimeButton.scss";
@@ -11,10 +11,6 @@
11
11
  }
12
12
  }
13
13
 
14
- svg {
15
- max-height: 1rem;
16
- }
17
-
18
14
  .navbar-nav {
19
15
  line-height: 1;
20
16
  margin-top: 4px;
@@ -1,4 +1,3 @@
1
-
2
1
  .calendar-wrapper {
3
2
  display: flex;
4
3
 
@@ -21,7 +20,7 @@
21
20
  background-color: transparent;
22
21
  }
23
22
 
24
- &:focus{
23
+ &:focus {
25
24
  box-shadow: none;
26
25
  }
27
26
  }
@@ -73,10 +72,9 @@
73
72
  }
74
73
  }
75
74
 
76
-
77
-
78
75
  .calendar-dates-wrapper {
79
- .calendar-weekdays, .calendar-dates {
76
+ .calendar-weekdays,
77
+ .calendar-dates {
80
78
  display: grid;
81
79
  grid-template-columns: repeat(7, auto);
82
80
  grid-gap: 0.5rem 1rem;
@@ -98,17 +96,17 @@
98
96
  margin-top: 0.75rem;
99
97
 
100
98
  .calendar-date {
101
- height: 2rem;
102
99
  display: flex;
100
+ flex-direction: column;
103
101
  align-items: center;
104
102
  justify-content: center;
105
- padding: 0;
103
+ padding: 0.25rem;
106
104
  border-radius: 0.25rem;
107
105
  background-color: $snippet-calendar-button-background-color;
108
106
  color: $snippet-calendar-button-font-color;
109
107
  font-size: 0.875rem;
110
108
  line-height: 1.3125rem;
111
- border: 1px solid $snippet-calendar-button-border-color;;
109
+ border: 1px solid $snippet-calendar-button-border-color;
112
110
 
113
111
  &.selected-date {
114
112
  background-color: $snippet-calendar-active-button-background-color;
@@ -138,7 +136,7 @@
138
136
  &:hover {
139
137
  border-color: $snippet-calendar-active-button-border-color;
140
138
  }
141
-
139
+
142
140
  &:focus {
143
141
  box-shadow: none;
144
142
  }
@@ -167,11 +165,11 @@
167
165
  justify-content: center;
168
166
  width: 3.75rem;
169
167
  height: 2.5rem;
170
- background-color: #F2F2F2;
168
+ background-color: #f2f2f2;
171
169
  color: $black;
172
170
  font-size: 0.75rem;
173
171
  border-radius: 0.25rem;
174
-
172
+
175
173
  &.selected-time {
176
174
  background-color: $blue;
177
175
  color: $white;
@@ -189,14 +187,16 @@
189
187
  flex-direction: column;
190
188
  align-items: center;
191
189
 
192
- .calendar, .start-time-wrapper {
190
+ .calendar,
191
+ .start-time-wrapper {
193
192
  min-width: 20.75rem;
194
193
 
195
194
  .calendar-dates-wrapper {
196
- .calendar-weekdays, .calendar-dates {
195
+ .calendar-weekdays,
196
+ .calendar-dates {
197
197
  grid-gap: 0.5rem;
198
198
  }
199
-
199
+
200
200
  .calendar-dates {
201
201
  .calendar-date {
202
202
  width: 2.5rem;
@@ -142,6 +142,7 @@
142
142
  .card-body {
143
143
  padding: 0;
144
144
  margin: 0 0 auto;
145
+ margin-top: 1rem;
145
146
  }
146
147
  }
147
148
 
@@ -199,7 +199,8 @@
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 $snippet-elements-button-background-color;
202
+ box-shadow: 0 0 0 $input-btn-focus-width
203
+ $snippet-elements-button-background-color;
203
204
  }
204
205
 
205
206
  &:disabled {
@@ -234,7 +235,7 @@
234
235
  font-weight: 500;
235
236
  border-radius: 0.25rem;
236
237
  font-size: 0.875rem;
237
- height: 2.25rem;
238
+ min-height: 2.25rem;
238
239
 
239
240
  &:focus {
240
241
  box-shadow: unset;
@@ -15,6 +15,10 @@
15
15
  display: none !important;
16
16
  }
17
17
  }
18
+
19
+ &.is-invalid {
20
+ border-color: theme-color("danger");
21
+ }
18
22
  }
19
23
 
20
24
  .placeholder-row {
@@ -13,7 +13,6 @@
13
13
  @import "./static";
14
14
  @import "./table";
15
15
  @import "./back-button";
16
- @import "./iframe-customers-journey";
17
16
  @import "./custom-fields";
18
17
  @import "./file-upload";
19
18
  @import "./iframe-events";
@@ -41,3 +40,5 @@
41
40
  @import "./striped-static-table/";
42
41
  @import "./image-radio-input/";
43
42
  @import "./radio-card/";
43
+ @import "./activity-card/";
44
+ @import "./date-time-button/";
@@ -7,6 +7,11 @@
7
7
  overflow: auto;
8
8
  }
9
9
 
10
+ .modal-form-content {
11
+ max-height: 21rem;
12
+ overflow-x: hidden;
13
+ }
14
+
10
15
  .reccurrence-interval-container {
11
16
  .form-group {
12
17
  margin-bottom: 0.5rem;
@@ -46,6 +46,7 @@
46
46
  .header {
47
47
  background-color: color("white");
48
48
  padding: 0 2.5rem;
49
+ z-index: 2;
49
50
  min-height: 4rem;
50
51
  border-bottom: 1px solid #f0f0f0;
51
52
  }
package/src/typings.d.ts CHANGED
@@ -28,3 +28,14 @@ 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,7 +9,6 @@ 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";
13
12
  import { getCheckboxesByWorkHours } from "../utils/dates";
14
13
 
15
14
  export type AvailableTimesControlRef = {
@@ -62,20 +61,18 @@ export const AvailableTimesControl = forwardRef<
62
61
  });
63
62
 
64
63
  const onChange = (option: string) => {
65
- const timeWithOffset = calculateTimeWithOffset(option);
66
-
67
- const isAlreadyChecked = availableTimes.includes(timeWithOffset);
64
+ const isAlreadyChecked = availableTimes.includes(option);
68
65
 
69
66
  if (isAlreadyChecked) {
70
67
  setValue(
71
68
  "availableTimes",
72
- availableTimes.filter((value) => value !== timeWithOffset)
69
+ availableTimes.filter((value) => value !== option)
73
70
  );
74
71
 
75
72
  return;
76
73
  }
77
74
 
78
- setValue("availableTimes", [...availableTimes, timeWithOffset]);
75
+ setValue("availableTimes", [...availableTimes, option]);
79
76
  };
80
77
 
81
78
  useEffect(() => {
@@ -95,9 +92,7 @@ export const AvailableTimesControl = forwardRef<
95
92
  <Form.Check.Input
96
93
  type="checkbox"
97
94
  value={option}
98
- checked={availableTimes.includes(
99
- calculateTimeWithOffset(option)
100
- )}
95
+ checked={availableTimes.includes(option)}
101
96
  onChange={() => onChange(option)}
102
97
  disabled={isLoading}
103
98
  />
@@ -0,0 +1,46 @@
1
+ import React from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ import { Form } from "react-bootstrap";
4
+ import { useFormContext } from "react-hook-form";
5
+ import { useId } from "@react-aria/utils";
6
+ import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
7
+ import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
8
+
9
+ type GameDurationControlProps = {
10
+ isLoading: boolean;
11
+ };
12
+
13
+ export const GameDurationControl = ({
14
+ isLoading,
15
+ }: GameDurationControlProps) => {
16
+ const nameId = useId();
17
+ const { t } = useTranslation(["Design", "Validation"]);
18
+
19
+ const {
20
+ register,
21
+ formState: { errors },
22
+ } = useFormContext<Pick<Zone, "defaultDuration">>();
23
+
24
+ return (
25
+ <Form.Group controlId={nameId}>
26
+ <Form.Label>{t("Design:defaultGameDuration")}</Form.Label>
27
+ <Form.Control
28
+ type="number"
29
+ {...register("defaultDuration", {
30
+ required: false,
31
+ min: 1,
32
+ })}
33
+ placeholder={t("Design:duration")}
34
+ isInvalid={Boolean(errors.defaultDuration)}
35
+ disabled={isLoading}
36
+ />
37
+ <Form.Control.Feedback type="invalid">
38
+ {HookFormService.hasError(errors.defaultDuration, "min") &&
39
+ t("Validation:fieldMinNumber", {
40
+ attribute: t("Design:defaultGameDuration").toLowerCase(),
41
+ min: 1,
42
+ })}
43
+ </Form.Control.Feedback>
44
+ </Form.Group>
45
+ );
46
+ };
@@ -7,6 +7,7 @@ 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";
10
11
 
11
12
  export type ZoneControlProps = {
12
13
  isLoading: boolean;
@@ -27,6 +28,7 @@ export const ZoneControl = ({
27
28
  <Col md={6} sm={6}>
28
29
  <ZoneTypeControl isLoading={isLoading} />
29
30
  <SortControl isLoading={isLoading} />
31
+ <GameDurationControl isLoading={isLoading} />
30
32
  </Col>
31
33
  <Col md={6} sm={6}>
32
34
  <ZoneImageControl isLoading={isLoading} />