@licklist/design 0.67.5-dev.1 → 0.67.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/.storybook/main.cjs +12 -15
  2. package/dist/assets/iframe/selectArrow.svg.js +17 -0
  3. package/dist/auth/Login/LoginComponent.js +1 -2
  4. package/dist/calendar/Calendar.d.ts +2 -2
  5. package/dist/calendar/Calendar.d.ts.map +1 -1
  6. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
  7. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +40 -35
  8. package/dist/calendar/utils/index.d.ts +2 -2
  9. package/dist/calendar/utils/index.d.ts.map +1 -1
  10. package/dist/calendar/utils/index.js +4 -20
  11. package/dist/date-time-button/DateTimeButton.d.ts +2 -1
  12. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  13. package/dist/date-time-button/DateTimeButton.js +3 -2
  14. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -2
  15. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  16. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +4 -4
  17. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -2
  18. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
  19. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +26 -27
  20. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +2 -2
  21. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
  22. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +3 -3
  23. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  24. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
  25. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  26. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +0 -2
  27. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  28. package/dist/index.js +0 -1
  29. package/dist/layout/DropDown.d.ts +1 -2
  30. package/dist/layout/DropDown.d.ts.map +1 -1
  31. package/dist/modals/confirmation/ConfirmModal.d.ts +1 -3
  32. package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
  33. package/dist/modals/confirmation/ConfirmModal.js +8 -172
  34. package/dist/product-set/card/ProductSetCard.d.ts +2 -6
  35. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  36. package/dist/product-set/card/ProductSetCard.js +11 -30
  37. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +2 -3
  38. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  39. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -3
  40. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  41. package/dist/product-set/control/DateInput.js +2 -2
  42. package/dist/product-set/control/ProductSetControl.d.ts +3 -3
  43. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  44. package/dist/product-set/control/ProductSetControl.js +16 -4
  45. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  46. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  47. package/dist/product-set/form/ProductSetForm.d.ts +2 -6
  48. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  49. package/dist/product-set/form/ProductSetForm.js +5 -65
  50. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  51. package/dist/product-set/form/ProductZonesControl.js +2 -0
  52. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  53. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  54. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  55. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  56. package/dist/product-set/form/SubProductsControl.js +3 -0
  57. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  58. package/dist/product-set/form/VenueMapsControl.js +3 -0
  59. package/dist/product-set/form/index.d.ts +0 -1
  60. package/dist/product-set/form/index.d.ts.map +1 -1
  61. package/dist/product-set/utils/index.d.ts +0 -7
  62. package/dist/product-set/utils/index.d.ts.map +1 -1
  63. package/dist/product-set/utils/index.js +1 -10
  64. package/dist/provider/location-input/LocationInput.d.ts +1 -4
  65. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  66. package/dist/provider/location-input/LocationInput.js +2 -41
  67. package/dist/provider/location-input/LocationInputDescription.d.ts +1 -4
  68. package/dist/provider/location-input/LocationInputDescription.d.ts.map +1 -1
  69. package/dist/provider/location-input/LocationInputDescription.js +12 -27
  70. package/dist/provider/location-input/index.d.ts +0 -1
  71. package/dist/provider/location-input/index.d.ts.map +1 -1
  72. package/dist/provider/provider-form/ProviderForm.d.ts +1 -3
  73. package/dist/provider/provider-form/ProviderForm.d.ts.map +1 -1
  74. package/dist/provider/provider-form/ProviderForm.js +3 -7
  75. package/dist/provider/venue-form/VenueForm.d.ts +1 -3
  76. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  77. package/dist/provider/venue-form/VenueForm.js +3 -7
  78. package/dist/provider/working-hours-input/WorkingHoursInput.d.ts.map +1 -1
  79. package/dist/provider/working-hours-input/WorkingHoursInput.js +2 -2
  80. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  81. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +14 -7
  82. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +1 -2
  83. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  84. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +13 -7
  85. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -4
  86. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  87. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +3 -7
  88. package/dist/recurring-date-picker-input/utils.d.ts +0 -5
  89. package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
  90. package/dist/recurring-date-picker-input/utils.js +3 -83
  91. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  92. package/dist/sales/booking/results/components/ResultCard.js +7 -4
  93. package/dist/sales/guest-profile/previous-bookings/PreviousBookings.js +1 -1
  94. package/dist/sales/manual-booking/formatDays.js +3 -3
  95. package/dist/sales/manual-booking/select-event/SelectEvent.d.ts.map +1 -1
  96. package/dist/sales/manual-booking/select-event/SelectEvent.js +3 -3
  97. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  98. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +2 -2
  99. package/dist/sales/notes/NotesTableRow.js +4 -3
  100. package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
  101. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  102. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  103. package/dist/snippet/snippet-template/preview/Preview.js +0 -6
  104. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  105. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  106. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  107. package/dist/styles/auth/AccessDenied.scss +1 -1
  108. package/dist/styles/back-button/BackButton.scss +24 -25
  109. package/dist/styles/back-button/_index.scss +1 -1
  110. package/dist/styles/company-user-form/UserForm.scss +7 -4
  111. package/dist/styles/company-user-form/_index.scss +1 -1
  112. package/dist/styles/custom-fields/CreateSortableListItem.scss +1 -2
  113. package/dist/styles/custom-fields/_index.scss +1 -1
  114. package/dist/styles/customers/Filter.scss +5 -5
  115. package/dist/styles/events/EditEventModal.scss +3 -1
  116. package/dist/styles/events/EventVenueMap.scss +7 -7
  117. package/dist/styles/form/Input.scss +1 -1
  118. package/dist/styles/header/Header.scss +1 -1
  119. package/dist/styles/header/elements/CompanySelector.scss +2 -2
  120. package/dist/styles/iframe-events/Calendar.scss +1 -0
  121. package/dist/styles/iframe-events/CalendarSelect.scss +1 -1
  122. package/dist/styles/iframe-events/CategoryStepsForm.scss +7 -6
  123. package/dist/styles/iframe-events/Event.scss +4 -2
  124. package/dist/styles/iframe-events/EventForm.scss +54 -54
  125. package/dist/styles/iframe-events/EventNavigationFooter.scss +0 -1
  126. package/dist/styles/iframe-events/TicketDescription.scss +1 -1
  127. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  128. package/dist/styles/iframe-payments/PaymentForm.scss +1 -1
  129. package/dist/styles/layout/BackgroundVideoContainer.scss +2 -2
  130. package/dist/styles/notification/Notification.scss +1 -1
  131. package/dist/styles/order-items-table/OrderItemsTable.scss +2 -1
  132. package/dist/styles/product-set/CreateProductSetItem.scss +13 -15
  133. package/dist/styles/product-set/DateAndRecurrenceInput.scss +8 -6
  134. package/dist/styles/product-set/EditCategoryModal.scss +4 -4
  135. package/dist/styles/product-set/EditProductModal.scss +3 -3
  136. package/dist/styles/product-set/EditStepModal.scss +4 -4
  137. package/dist/styles/product-set/EditVenueMapSetModal.scss +6 -6
  138. package/dist/styles/product-set/ProductSetForm.scss +2 -25
  139. package/dist/styles/product-set/TutorialGifCard.scss +1 -1
  140. package/dist/styles/product-set/_index.scss +2 -2
  141. package/dist/styles/report/ReportCard.scss +0 -1
  142. package/dist/styles/report/_index.scss +1 -1
  143. package/dist/styles/resources-blocking/_index.scss +0 -4
  144. package/dist/styles/sales/BookingFilter.scss +2 -2
  145. package/dist/styles/sales/BookingResults.scss +1 -1
  146. package/dist/styles/sales/BookingTabs.scss +5 -7
  147. package/dist/styles/sales/Filters.scss +4 -5
  148. package/dist/styles/sales/GuestProfile.scss +175 -170
  149. package/dist/styles/sales/LifeTimeSales.scss +1 -1
  150. package/dist/styles/sales/ManualBooking.scss +2 -4
  151. package/dist/styles/snippet-templates/_snippetVariables.scss +244 -63
  152. package/dist/styles/sortable-field/SortableField.scss +16 -16
  153. package/dist/styles/sortable-field/_index.scss +1 -1
  154. package/dist/styles/sortable-tree/Item.scss +4 -4
  155. package/dist/styles/table/Table.scss +1 -1
  156. package/dist/styles/themes/bookedit/_variables.scss +32 -10
  157. package/dist/styles/themes/licklist/_variables.scss +1 -1
  158. package/dist/styles/tiptap-editor/TiptapEditor.scss +10 -9
  159. package/dist/styles/tiptap-editor/_index.scss +1 -1
  160. package/dist/styles/venue-map-sets/VenueMapSetForm.scss +4 -5
  161. package/dist/styles/virtualized/_index.scss +1 -1
  162. package/dist/styles/zones/ZoneForm.scss +0 -1
  163. package/dist/styles/zones/ZoneRecurrencesControl.scss +8 -6
  164. package/dist/typeahead/Typeahead.d.ts +1 -5
  165. package/dist/typeahead/Typeahead.d.ts.map +1 -1
  166. package/dist/typeahead/Typeahead.js +2 -9
  167. package/dist/zone/form/ZoneForm.d.ts +2 -3
  168. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  169. package/dist/zone/form/ZoneForm.js +2 -4
  170. package/dist/zone/form/components/ZoneControl.d.ts +2 -3
  171. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  172. package/dist/zone/form/components/ZoneControl.js +2 -5
  173. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -5
  174. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  175. package/dist/zone/form/components/ZoneRecurrencesControl.js +2 -5
  176. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  177. package/package.json +10 -10
  178. package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -1
  179. package/src/auth/Login/LoginComponent.tsx +1 -1
  180. package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -1
  181. package/src/calendar/Calendar.stories.tsx +2 -0
  182. package/src/calendar/Calendar.tsx +4 -1
  183. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +28 -31
  184. package/src/calendar/utils/index.ts +4 -26
  185. package/src/date-time-button/DateTimeButton.stories.tsx +1 -0
  186. package/src/date-time-button/DateTimeButton.tsx +6 -1
  187. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +2 -3
  188. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +37 -35
  189. package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +3 -3
  190. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  191. package/src/header/elements/Elements.stories.tsx +1 -1
  192. package/src/help/popover/Popover.stories.tsx +1 -1
  193. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -3
  194. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -1
  195. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  196. package/src/layout/DropDown.tsx +1 -2
  197. package/src/modals/confirmation/ConfirmModal.tsx +3 -19
  198. package/src/product-set/card/ProductSetCard.stories.tsx +1 -3
  199. package/src/product-set/card/ProductSetCard.tsx +8 -47
  200. package/src/product-set/control/DateAndRecurrenceInput.tsx +4 -6
  201. package/src/product-set/control/DateInput.tsx +1 -2
  202. package/src/product-set/control/ProductSetControl.tsx +15 -4
  203. package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +2 -2
  204. package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
  205. package/src/product-set/form/ProductSetForm.tsx +3 -25
  206. package/src/product-set/form/ProductZonesControl.tsx +7 -4
  207. package/src/product-set/form/SelectCategoryModal.stories.tsx +1 -1
  208. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  209. package/src/product-set/form/SubProductsControl.tsx +3 -0
  210. package/src/product-set/form/VenueMapsControl.tsx +3 -0
  211. package/src/product-set/form/index.ts +0 -1
  212. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +5 -5
  213. package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
  214. package/src/product-set/product/quantity/ProductQuantity.stories.tsx +1 -1
  215. package/src/product-set/product-zone/ProductZoneControl.tsx +9 -9
  216. package/src/product-set/utils/index.ts +0 -11
  217. package/src/provider/location-input/LocationInput.tsx +1 -36
  218. package/src/provider/location-input/LocationInputDescription.tsx +11 -23
  219. package/src/provider/location-input/index.ts +0 -1
  220. package/src/provider/provider-form/ProviderForm.tsx +2 -7
  221. package/src/provider/venue-form/VenueForm.tsx +2 -5
  222. package/src/provider/working-hours-input/WorkingHoursInput.tsx +6 -15
  223. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +30 -11
  224. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +22 -8
  225. package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +4 -11
  226. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +3 -17
  227. package/src/recurring-date-picker-input/utils.ts +1 -97
  228. package/src/sales/booking/results/components/ResultCard.tsx +10 -4
  229. package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +1 -1
  230. package/src/sales/manual-booking/formatDays.ts +3 -3
  231. package/src/sales/manual-booking/select-event/SelectEvent.tsx +2 -2
  232. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +2 -2
  233. package/src/sales/notes/NotesTableRow.tsx +3 -3
  234. package/src/setting/admin/AdminSetting.stories.tsx +0 -1
  235. package/src/setting/admin/AdminSettingForm.tsx +2 -2
  236. package/src/setting/system/SystemSetting.stories.tsx +1 -1
  237. package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
  238. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  239. package/src/styles/auth/AccessDenied.scss +1 -1
  240. package/src/styles/back-button/BackButton.scss +24 -25
  241. package/src/styles/back-button/_index.scss +1 -1
  242. package/src/styles/company-user-form/UserForm.scss +7 -4
  243. package/src/styles/company-user-form/_index.scss +1 -1
  244. package/src/styles/custom-fields/CreateSortableListItem.scss +1 -2
  245. package/src/styles/custom-fields/_index.scss +1 -1
  246. package/src/styles/customers/Filter.scss +5 -5
  247. package/src/styles/events/EditEventModal.scss +3 -1
  248. package/src/styles/events/EventVenueMap.scss +7 -7
  249. package/src/styles/form/Input.scss +1 -1
  250. package/src/styles/header/Header.scss +1 -1
  251. package/src/styles/header/elements/CompanySelector.scss +2 -2
  252. package/src/styles/iframe-events/Calendar.scss +1 -0
  253. package/src/styles/iframe-events/CalendarSelect.scss +1 -1
  254. package/src/styles/iframe-events/CategoryStepsForm.scss +7 -6
  255. package/src/styles/iframe-events/Event.scss +4 -2
  256. package/src/styles/iframe-events/EventForm.scss +54 -54
  257. package/src/styles/iframe-events/EventNavigationFooter.scss +0 -1
  258. package/src/styles/iframe-events/TicketDescription.scss +1 -1
  259. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  260. package/src/styles/iframe-payments/PaymentForm.scss +1 -1
  261. package/src/styles/layout/BackgroundVideoContainer.scss +2 -2
  262. package/src/styles/notification/Notification.scss +1 -1
  263. package/src/styles/order-items-table/OrderItemsTable.scss +2 -1
  264. package/src/styles/product-set/CreateProductSetItem.scss +13 -15
  265. package/src/styles/product-set/DateAndRecurrenceInput.scss +8 -6
  266. package/src/styles/product-set/EditCategoryModal.scss +4 -4
  267. package/src/styles/product-set/EditProductModal.scss +3 -3
  268. package/src/styles/product-set/EditStepModal.scss +4 -4
  269. package/src/styles/product-set/EditVenueMapSetModal.scss +6 -6
  270. package/src/styles/product-set/ProductSetForm.scss +2 -25
  271. package/src/styles/product-set/TutorialGifCard.scss +1 -1
  272. package/src/styles/product-set/_index.scss +2 -2
  273. package/src/styles/report/ReportCard.scss +0 -1
  274. package/src/styles/report/_index.scss +1 -1
  275. package/src/styles/resources-blocking/_index.scss +0 -4
  276. package/src/styles/sales/BookingFilter.scss +2 -2
  277. package/src/styles/sales/BookingResults.scss +1 -1
  278. package/src/styles/sales/BookingTabs.scss +5 -7
  279. package/src/styles/sales/Filters.scss +4 -5
  280. package/src/styles/sales/GuestProfile.scss +175 -170
  281. package/src/styles/sales/LifeTimeSales.scss +1 -1
  282. package/src/styles/sales/ManualBooking.scss +2 -4
  283. package/src/styles/snippet-templates/_snippetVariables.scss +244 -63
  284. package/src/styles/sortable-field/SortableField.scss +16 -16
  285. package/src/styles/sortable-field/_index.scss +1 -1
  286. package/src/styles/sortable-tree/Item.scss +4 -4
  287. package/src/styles/table/Table.scss +1 -1
  288. package/src/styles/themes/bookedit/_variables.scss +32 -10
  289. package/src/styles/themes/licklist/_variables.scss +1 -1
  290. package/src/styles/tiptap-editor/TiptapEditor.scss +10 -9
  291. package/src/styles/tiptap-editor/_index.scss +1 -1
  292. package/src/styles/venue-map-sets/VenueMapSetForm.scss +4 -5
  293. package/src/styles/virtualized/_index.scss +1 -1
  294. package/src/styles/zones/ZoneForm.scss +0 -1
  295. package/src/styles/zones/ZoneRecurrencesControl.scss +8 -6
  296. package/src/tiptap-editor/TipTapEditor.stories.tsx +4 -6
  297. package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +2 -5
  298. package/src/typeahead/Typeahead.tsx +1 -15
  299. package/src/zone/form/ZoneForm.tsx +2 -9
  300. package/src/zone/form/components/ZoneControl.tsx +3 -8
  301. package/src/zone/form/components/ZoneRecurrencesControl.tsx +5 -10
  302. package/src/zone/form/utils/dates.ts +10 -9
  303. package/yarn.lock +832 -810
  304. package/dist/product-set/form/ProductSetNameControl.d.ts +0 -6
  305. package/dist/product-set/form/ProductSetNameControl.d.ts.map +0 -1
  306. package/dist/product-set/form/ProductSetNameControl.js +0 -35
  307. package/src/product-set/form/ProductSetNameControl.tsx +0 -27
@@ -25,7 +25,7 @@ import {
25
25
  } from "react-icons/fa";
26
26
  import { ProductSetLoadingContext } from "./context";
27
27
 
28
- export const CATEGORY_TYPES_NAMES = {
28
+ const CATEGORY_TYPES_NAMES = {
29
29
  menuItems: CATEGORY_TYPE_MENU_ITEMS,
30
30
  tickets: CATEGORY_TYPE_TICKETS,
31
31
  bookings: CATEGORY_TYPE_BOOKINGS,
@@ -33,7 +33,7 @@ export const CATEGORY_TYPES_NAMES = {
33
33
  fixedDuration: CATEGORY_TYPE_FIXED_DURATION,
34
34
  } as const;
35
35
 
36
- export type CategoryConfig = { label: string; icon: ReactElement };
36
+ type CategoryConfig = { label: string; icon: ReactElement };
37
37
 
38
38
  const MAIN_CATEGORIES: Partial<Record<CategoryType, CategoryConfig>> = {
39
39
  [CATEGORY_TYPES_NAMES.tickets]: {
@@ -71,6 +71,9 @@ export function SubProductsControl({
71
71
  images: subProducts[index]?.images as Image[],
72
72
  };
73
73
  // @ts-expect-error TS2345
74
+ // @TODO fix prod type error
75
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
76
+ // @ts-ignore
74
77
  append(subProductCopy);
75
78
  }}
76
79
  />
@@ -47,6 +47,9 @@ export const VenueMapsControl = ({
47
47
  url={image.url}
48
48
  name={name}
49
49
  points={points}
50
+ // @TODO fix prod type error
51
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
52
+ // @ts-ignore
50
53
  products={products}
51
54
  pointProducts={pointProducts}
52
55
  onPointProductsChange={onPointProductsChange}
@@ -1,2 +1 @@
1
1
  export * from "./ProductSetForm";
2
- export * from "./ProductSetNameControl";
@@ -1,4 +1,4 @@
1
- import { useContext } from "react";
1
+ import React, { useContext } from "react";
2
2
  import { Col, Form } from "react-bootstrap";
3
3
  import { Controller, Path, useFormContext } from "react-hook-form";
4
4
  import { HookFormService } from "@licklist/plugins";
@@ -98,7 +98,7 @@ export const AdvancedOptions = <T extends FormValues>({
98
98
  {...register(`${fieldNamePrefix}.productGroupId` as Path<T>)}
99
99
  isInvalid={HookFormService.isInvalid<T>(
100
100
  `${fieldNamePrefix}.productGroupId` as Path<T>,
101
- errors,
101
+ errors
102
102
  )}
103
103
  disabled={isLoading || isOverrides}
104
104
  defaultValue=""
@@ -115,7 +115,7 @@ export const AdvancedOptions = <T extends FormValues>({
115
115
  <Form.Control.Feedback type="invalid">
116
116
  {HookFormService.getErrors<T>(
117
117
  `${fieldNamePrefix}.productGroupId` as Path<T>,
118
- errors,
118
+ errors
119
119
  )}
120
120
  </Form.Control.Feedback>
121
121
  </Form.Group>
@@ -134,7 +134,7 @@ export const AdvancedOptions = <T extends FormValues>({
134
134
  onChange={onChange}
135
135
  isInvalid={HookFormService.isInvalid<T>(
136
136
  `${fieldNamePrefix}.termsAndConditions` as Path<T>,
137
- errors,
137
+ errors
138
138
  )}
139
139
  disabled={isLoading || isOverrides}
140
140
  name={name}
@@ -147,7 +147,7 @@ export const AdvancedOptions = <T extends FormValues>({
147
147
  <Form.Control.Feedback type="invalid">
148
148
  {HookFormService.getErrors<T>(
149
149
  `${fieldNamePrefix}.termsAndConditions` as Path<T>,
150
- errors,
150
+ errors
151
151
  )}
152
152
  </Form.Control.Feedback>
153
153
  </Form.Group>
@@ -12,7 +12,7 @@ export default {
12
12
  } as Meta;
13
13
 
14
14
  export const Default: Story<ProductBookingManagementControlProps<{}>> = (
15
- args
15
+ args,
16
16
  ) => {
17
17
  const form = useForm<ProductBookingManagementControlValues>({
18
18
  mode: "onChange",
@@ -42,7 +42,7 @@ export const Default: Story<ProductQuantityControlProps<{}>> = (args) => {
42
42
  };
43
43
 
44
44
  export const ConstantForm: Story<ProductQuantityConstantControlProps<{}>> = (
45
- args
45
+ args,
46
46
  ) => {
47
47
  const form = useForm<ProductQuantityConstantControlValues>({
48
48
  mode: "onChange",
@@ -1,4 +1,4 @@
1
- import { useContext, useEffect, useMemo } from "react";
1
+ import React, { useContext, useEffect, useMemo } from "react";
2
2
  import { Col, Form, Row } from "react-bootstrap";
3
3
  import {
4
4
  ArrayPath,
@@ -63,7 +63,7 @@ export const ProductZoneControl = <T extends FormValues>({
63
63
  const disabledDuration = capacity === "0" || !capacity;
64
64
 
65
65
  const { providerHasBookingManagement, zones = [] } = useContext(
66
- ProductSetLoadingContext,
66
+ ProductSetLoadingContext
67
67
  );
68
68
 
69
69
  const currentZoneData = zones.find((zone) => zone.id === Number(zoneId));
@@ -75,10 +75,10 @@ export const ProductZoneControl = <T extends FormValues>({
75
75
  !productZones.find(
76
76
  (productZone) =>
77
77
  Number(productZone.zoneId) === zone.id &&
78
- productZone.zoneId !== zoneId,
79
- ),
78
+ productZone.zoneId !== zoneId
79
+ )
80
80
  ),
81
- [zones, productZones, zoneId],
81
+ [zones, productZones, zoneId]
82
82
  );
83
83
 
84
84
  useEffect(() => {
@@ -89,7 +89,7 @@ export const ProductZoneControl = <T extends FormValues>({
89
89
  setValue(
90
90
  `${fieldNamePrefix}.duration` as Path<T>,
91
91
  /* @ts-expect-error 6385 */
92
- 0 as UnpackNestedValue<PathValue<T, Path<T>>>,
92
+ 0 as UnpackNestedValue<PathValue<T, Path<T>>>
93
93
  );
94
94
  clearErrors(`${fieldNamePrefix}.duration` as Path<T>);
95
95
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -104,7 +104,7 @@ export const ProductZoneControl = <T extends FormValues>({
104
104
  /* @ts-expect-error 6385 */
105
105
  (value * currentZoneData?.defaultDuration) as UnpackNestedValue<
106
106
  PathValue<T, Path<T>>
107
- >,
107
+ >
108
108
  );
109
109
  };
110
110
  return (
@@ -123,7 +123,7 @@ export const ProductZoneControl = <T extends FormValues>({
123
123
  disabled={isOverrides}
124
124
  isInvalid={HookFormService.isInvalid(
125
125
  `${fieldNamePrefix}.zoneId`,
126
- errors,
126
+ errors
127
127
  )}
128
128
  {...field}
129
129
  >
@@ -147,7 +147,7 @@ export const ProductZoneControl = <T extends FormValues>({
147
147
  <Form.Control.Feedback type="invalid">
148
148
  {HookFormService.getErrors(
149
149
  `${fieldNamePrefix}.zoneId` as Path<T>,
150
- errors,
150
+ errors
151
151
  )}
152
152
  </Form.Control.Feedback>
153
153
  </Form.Group>
@@ -3,7 +3,6 @@ import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemp
3
3
  import { TFunction } from "react-i18next";
4
4
  import { UseFormSetError } from "react-hook-form";
5
5
  import { checkIfZoneCategory } from "@licklist/plugins";
6
- import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
7
6
  import { TemplateItem } from "../control/ProductSetControl";
8
7
  import { ProductSetFormValues } from "../form/ProductSetForm";
9
8
 
@@ -13,11 +12,6 @@ interface CheckAvailableTimesErrors {
13
12
  t: TFunction;
14
13
  }
15
14
 
16
- export interface MenuTypeheadItem {
17
- id: number;
18
- label: string;
19
- value: number;
20
- }
21
15
  export const moveArrayElements = <T>(
22
16
  array: T[],
23
17
  prevIndex: number,
@@ -90,8 +84,3 @@ export const checkAvailableTimesErrors = ({
90
84
  });
91
85
  return hasError;
92
86
  };
93
-
94
- export const getTypeHeadItemsFromMenus = (
95
- menus?: (ProductSet | ProductSetFormValues)[],
96
- ): MenuTypeheadItem[] =>
97
- menus?.map((menu) => ({ id: menu.id, value: menu.id, label: menu.name }));
@@ -2,21 +2,17 @@ import { useId } from "@react-aria/utils";
2
2
  import { Form } from "react-bootstrap";
3
3
  import { useFormContext } from "react-hook-form";
4
4
  import { useTranslation } from "react-i18next";
5
- import { TimeZonePath, useTimeZoneApi } from "@licklist/plugins";
6
- import { BlockLoader } from "src/static";
7
5
  import CountryCodeSelect from "../../static/CountryCodeSelect";
8
6
  import { LocationInputValues } from ".";
9
7
  import { FormGroupControll } from "./components";
10
8
 
11
- export function LocationInput({ path }: { path: TimeZonePath }) {
9
+ export function LocationInput() {
12
10
  const {
13
11
  register,
14
12
  formState: { errors },
15
13
  } = useFormContext<LocationInputValues>();
16
14
  const { t } = useTranslation("Design");
17
15
 
18
- const { data, isLoading } = useTimeZoneApi(path).useAll();
19
-
20
16
  const countryId = useId();
21
17
 
22
18
  return (
@@ -43,7 +39,6 @@ export function LocationInput({ path }: { path: TimeZonePath }) {
43
39
  name="location.postcode"
44
40
  label={t("locationPostcode")}
45
41
  />
46
-
47
42
  <Form.Group controlId={countryId}>
48
43
  <Form.Label>{t("locationCountry")}</Form.Label>
49
44
  <CountryCodeSelect
@@ -52,36 +47,6 @@ export function LocationInput({ path }: { path: TimeZonePath }) {
52
47
  error={errors?.location?.country?.message}
53
48
  />
54
49
  </Form.Group>
55
-
56
- {isLoading ? (
57
- <BlockLoader />
58
- ) : (
59
- <Form.Group controlId="timeZoneId">
60
- <Form.Label>{t("locationTimeZone")}</Form.Label>
61
- <Form.Control
62
- {...register("timeZoneId", {
63
- required: t("Validation:fieldRequired", {
64
- attribute: t("locationTimeZone"),
65
- }) as string,
66
- })}
67
- as="select"
68
- custom
69
- isInvalid={Boolean(errors?.timeZoneId?.message)}
70
- >
71
- <option key="" value="" disabled>
72
- {t("chooseTimeZone")}
73
- </option>
74
- {data.map((zone) => (
75
- <option key={zone.id} value={zone.id.toString()}>
76
- {zone.name}
77
- </option>
78
- ))}
79
- </Form.Control>
80
- <Form.Control.Feedback type="invalid">
81
- {errors?.timeZoneId?.message}
82
- </Form.Control.Feedback>
83
- </Form.Group>
84
- )}
85
50
  </>
86
51
  );
87
52
  }
@@ -1,19 +1,20 @@
1
1
  import { ReactElement } from "react";
2
2
  import { useFormContext } from "react-hook-form";
3
3
  import en from "react-phone-number-input/locale/en.json";
4
- import { TimeZonePath, useTimeZoneApi } from "@licklist/plugins";
5
4
  import { LocationInputValues } from ".";
6
5
 
7
- const fieldNames = ["street", "city", "state", "postcode", "country"] as const;
8
-
9
- export function LocationInputDescription({ path }: { path: TimeZonePath }) {
6
+ export function LocationInputDescription() {
10
7
  const { watch } = useFormContext<LocationInputValues>();
11
- const location = watch("location");
12
-
13
- const { data } = useTimeZoneApi(path).useAll();
14
-
8
+ const values = watch("location");
9
+ const fieldNames = [
10
+ "street",
11
+ "city",
12
+ "state",
13
+ "postcode",
14
+ "country",
15
+ ] as const;
15
16
  const fields = fieldNames.reduce<ReactElement[]>((acc, field) => {
16
- const value = location?.[field];
17
+ const value = values?.[field];
17
18
  if (!value) return acc;
18
19
 
19
20
  return [
@@ -21,18 +22,5 @@ export function LocationInputDescription({ path }: { path: TimeZonePath }) {
21
22
  <div key={field}>{field === "country" ? en[value] : value}</div>,
22
23
  ];
23
24
  }, []);
24
-
25
- const timeZoneId = watch("timeZoneId");
26
- const timeZoneName = data?.find(
27
- (timeZone) => timeZone.id === +timeZoneId,
28
- )?.name;
29
-
30
- return (
31
- <div>
32
- <>
33
- {fields}
34
- {timeZoneName && <div key="timeZone">{timeZoneName}</div>}
35
- </>
36
- </div>
37
- );
25
+ return <div>{fields}</div>;
38
26
  }
@@ -11,5 +11,4 @@ export type LocationInputValues = {
11
11
  latitude: string;
12
12
  longitude: string;
13
13
  };
14
- timeZoneId: string;
15
14
  };
@@ -10,7 +10,6 @@ import {
10
10
  } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
11
11
  import { useMultipleImages } from "@licklist/plugins/dist/hooks/Media/useMultipleImages";
12
12
  import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
13
- import { TimeZonePath } from "@licklist/plugins";
14
13
  import { CollapsibleInputGroup } from "../../collapsible-input-group";
15
14
  import {
16
15
  CategoriesInput,
@@ -42,7 +41,6 @@ export interface ProviderFormProps extends HasPermissionProp {
42
41
  companiesOptions?: TypeaheadOptions[];
43
42
  onSubmit: (values: ProviderFormValues) => void;
44
43
  intent?: "create" | "update";
45
- path: TimeZonePath;
46
44
  }
47
45
 
48
46
  const providerImageTypes = {
@@ -58,17 +56,14 @@ export function ProviderForm({
58
56
  onSubmit,
59
57
  intent = "update",
60
58
  hasPermission = true,
61
- path,
62
59
  }: ProviderFormProps) {
63
60
  const form = useForm<ProviderFormValues>({ defaultValues });
64
-
65
61
  const {
66
62
  setValue,
67
63
  handleSubmit,
68
64
  formState: { isSubmitting, errors },
69
65
  getValues,
70
66
  } = form;
71
-
72
67
  const { t } = useTranslation("Design");
73
68
  const [initialImages, setInitialImages] = useState<Image[] | null>(null);
74
69
 
@@ -106,10 +101,10 @@ export function ProviderForm({
106
101
  <CollapsibleInputGroup
107
102
  eventKey="location"
108
103
  label={t("location")}
109
- description={<LocationInputDescription path={path} />}
104
+ description={<LocationInputDescription />}
110
105
  error={errors?.location?.country?.message}
111
106
  >
112
- <LocationInput path={path} />
107
+ <LocationInput />
113
108
  </CollapsibleInputGroup>
114
109
  {categories && categories.length > 0 && (
115
110
  <CollapsibleInputGroup
@@ -11,7 +11,6 @@ import {
11
11
  import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
12
12
  import { useMultipleImages } from "@licklist/plugins/dist/hooks/Media/useMultipleImages";
13
13
  import { parseServerErrorForFormValidation } from "@licklist/plugins/dist/utils/parseError";
14
- import { TimeZonePath } from "@licklist/plugins";
15
14
  import { CollapsibleInputGroup } from "../../collapsible-input-group";
16
15
  import {
17
16
  CategoriesInput,
@@ -51,7 +50,6 @@ export interface VenueFormProps extends HasPermissionProp {
51
50
  intent?: "create" | "update";
52
51
  isLoading?: boolean;
53
52
  errorResponse?: unknown;
54
- path: TimeZonePath;
55
53
  }
56
54
 
57
55
  const providerImageTypes = {
@@ -69,7 +67,6 @@ export function VenueForm({
69
67
  hasPermission = true,
70
68
  isLoading,
71
69
  errorResponse,
72
- path,
73
70
  }: VenueFormProps) {
74
71
  const form = useForm<VenueFormValues>({ defaultValues, mode: "onChange" });
75
72
  const {
@@ -137,7 +134,7 @@ export function VenueForm({
137
134
  <CollapsibleInputGroup
138
135
  eventKey="location"
139
136
  label={t("location")}
140
- description={<LocationInputDescription path={path} />}
137
+ description={<LocationInputDescription />}
141
138
  error={
142
139
  errors?.location?.message ||
143
140
  (errors?.location &&
@@ -146,7 +143,7 @@ export function VenueForm({
146
143
  }))
147
144
  }
148
145
  >
149
- <LocationInput path={path} />
146
+ <LocationInput />
150
147
  </CollapsibleInputGroup>
151
148
  <CollapsibleInputGroup
152
149
  eventKey="workingHours"
@@ -24,9 +24,8 @@ export function WorkingHoursInput() {
24
24
  <Col>{t("Design:until")}</Col>
25
25
  <Col>{t("Design:description")}</Col>
26
26
  </Form.Row>
27
-
28
27
  <Form.Control
29
- {...register(`workingHours`, {
28
+ {...register(`workingHours` as const, {
30
29
  validate: (value) => {
31
30
  const oneOfDaysFilled = value?.some(
32
31
  (workingDay) => workingDay.start,
@@ -43,7 +42,6 @@ export function WorkingHoursInput() {
43
42
  })}
44
43
  type="hidden"
45
44
  />
46
-
47
45
  {weekdays.map((name, i) => (
48
46
  /*
49
47
  * The only reason inputs have placeholders here is to fix
@@ -51,19 +49,14 @@ export function WorkingHoursInput() {
51
49
  * which miscalculates alignment for empty inputs.
52
50
  * Otherwise placeholders should not be used.
53
51
  */
54
- <Form.Row key={name} className="align-items-baseline">
55
- <Col
56
- className="h5 text-lg-right text-nowrap mb-4 mb-lg-0"
57
- xs="12"
58
- lg="2"
59
- >
52
+ <Form.Row key={i} className="align-items-baseline">
53
+ <Col className="h5 text-lg-right mb-4 mb-lg-0" xs="12" lg="2">
60
54
  {name}
61
55
  </Col>
62
-
63
56
  <Form.Group as={Col}>
64
57
  <Form.Label className="d-lg-none">{t("Design:from")}</Form.Label>
65
58
  <Form.Control
66
- {...register(`workingHours.${i}.start`, {
59
+ {...register(`workingHours.${i}.start` as const, {
67
60
  validate: (nextStartValue) => {
68
61
  if (nextStartValue) {
69
62
  clearErrors("workingHours");
@@ -76,22 +69,20 @@ export function WorkingHoursInput() {
76
69
  placeholder={t("Design:from")}
77
70
  />
78
71
  </Form.Group>
79
-
80
72
  <Form.Group as={Col}>
81
73
  <Form.Label className="d-lg-none">{t("Design:until")}</Form.Label>
82
74
  <Form.Control
83
- {...register(`workingHours.${i}.end`)}
75
+ {...register(`workingHours.${i}.end` as const)}
84
76
  type="time"
85
77
  placeholder={t("Design:until")}
86
78
  />
87
79
  </Form.Group>
88
-
89
80
  <Form.Group as={Col} xs="12" lg>
90
81
  <Form.Label className="d-lg-none">
91
82
  {t("Design:description")}
92
83
  </Form.Label>
93
84
  <Form.Control
94
- {...register(`workingHours.${i}.description`)}
85
+ {...register(`workingHours.${i}.description` as const)}
95
86
  placeholder={t("Design:description")}
96
87
  />
97
88
  </Form.Group>
@@ -1,6 +1,8 @@
1
+ import { DateTime } from "luxon";
1
2
  import { Col, Row } from "react-bootstrap";
2
3
  import { useFormContext } from "react-hook-form";
3
4
  import { useTranslation } from "react-i18next";
5
+ import { TIME_FORMAT } from "@licklist/core/dist/Config";
4
6
  import { WorkingHoursInputValues } from ".";
5
7
  import { useWeekdays } from "./utils";
6
8
 
@@ -14,17 +16,34 @@ export function WorkingHoursInputDescription() {
14
16
 
15
17
  return (
16
18
  <>
17
- {Array.from({ length: weekdays.length }, (_, i) => i).map((i) => (
18
- <Row key={i}>
19
- <Col xs="auto">{weekdays[i]}:</Col>
20
- <Col>
21
- {t("timeInterval", {
22
- start: values?.[i].start ?? "00:00",
23
- end: values?.[i].end ?? "23:59",
24
- })}
25
- </Col>
26
- </Row>
27
- ))}
19
+ {Array.from({ length: weekdays.length }, (_, i) => i)
20
+ .filter((i) => values?.[i]?.start)
21
+ .map((i) => {
22
+ const weekday = values?.[i];
23
+ return (
24
+ <Row key={i}>
25
+ <Col xs="auto">{weekdays[i]}:</Col>
26
+ <Col>
27
+ {weekday?.end
28
+ ? weekday.start
29
+ ? t("timeInterval", {
30
+ start: DateTime.fromISO(weekday.start).toFormat(
31
+ TIME_FORMAT,
32
+ ),
33
+ end: DateTime.fromISO(weekday.start).toFormat(
34
+ TIME_FORMAT,
35
+ ),
36
+ })
37
+ : t("timeFrom", {
38
+ start: DateTime.fromISO(weekday.start).toFormat(
39
+ TIME_FORMAT,
40
+ ),
41
+ })
42
+ : null}
43
+ </Col>
44
+ </Row>
45
+ );
46
+ })}
28
47
  </>
29
48
  );
30
49
  }
@@ -8,8 +8,12 @@ import {
8
8
  useWatch,
9
9
  Validate,
10
10
  } from "react-hook-form";
11
- import { TIME_FORMAT } from "@licklist/core/dist/Config";
12
- import { fromIso } from "@licklist/core/dist/Services";
11
+ import {
12
+ DATE_FORMAT,
13
+ TIME_FORMAT,
14
+ TIME_FULL_FORMAT,
15
+ } from "@licklist/core/dist/Config";
16
+ import { fromFormat } from "@licklist/plugins/dist/utils/dateTime";
13
17
  import { RecurringDatePickerInputValues } from "./RecurringDatePickerInput";
14
18
 
15
19
  interface RecurrenceIntervalAndFrequencyInputProps {
@@ -27,9 +31,17 @@ interface RecurrenceIntervalAndFrequencyInputProps {
27
31
  RegisterOptions,
28
32
  "max" | "min" | "validate" | "required" | "pattern"
29
33
  >;
30
- timeZone: string;
31
34
  }
32
35
 
36
+ const fromTimeFormat = fromFormat(TIME_FORMAT);
37
+ const fromTimeFullFormat = fromFormat(TIME_FULL_FORMAT);
38
+
39
+ // default values and entered values are in different formats
40
+ const fromTimeFormats = (time: string) =>
41
+ fromTimeFormat(time).isValid
42
+ ? fromTimeFormat(time)
43
+ : fromTimeFullFormat(time);
44
+
33
45
  function RecurrenceIntervalAndFrequencyInput({
34
46
  disabled = false,
35
47
  minDate,
@@ -39,7 +51,6 @@ function RecurrenceIntervalAndFrequencyInput({
39
51
  endTimeLabel,
40
52
  startTimeRules,
41
53
  endTimeRules,
42
- timeZone,
43
54
  }: RecurrenceIntervalAndFrequencyInputProps) {
44
55
  const { t } = useTranslation(["Design", "Notification", "App"]);
45
56
 
@@ -55,10 +66,10 @@ function RecurrenceIntervalAndFrequencyInput({
55
66
 
56
67
  const _startTime = useWatch({ control, name: "startTime" });
57
68
  const startTime =
58
- _startTime && fromIso(_startTime, timeZone).toFormat(TIME_FORMAT);
69
+ _startTime && fromTimeFormats(_startTime).toFormat(TIME_FORMAT);
59
70
 
60
71
  const _endTime = useWatch({ control, name: "endTime" });
61
- const endTime = _endTime && fromIso(_endTime, timeZone).toFormat(TIME_FORMAT);
72
+ const endTime = _endTime && fromTimeFormats(_endTime).toFormat(TIME_FORMAT);
62
73
 
63
74
  useEffect(() => {
64
75
  if (!startDate || !endDate) {
@@ -108,8 +119,11 @@ function RecurrenceIntervalAndFrequencyInput({
108
119
  if (!startDate || !date) {
109
120
  return true;
110
121
  }
111
- const currentStartDate = fromIso(startDate, timeZone);
112
- const currentEndDate = fromIso(date, timeZone);
122
+ const currentStartDate = DateTime.fromFormat(
123
+ startDate,
124
+ DATE_FORMAT,
125
+ );
126
+ const currentEndDate = DateTime.fromFormat(date, DATE_FORMAT);
113
127
  return currentEndDate.diff(currentStartDate, ["days"]).days >=
114
128
  0
115
129
  ? true
@@ -12,7 +12,9 @@ export default {
12
12
  component: RecurringDatePickerInput,
13
13
  } as Meta;
14
14
 
15
- export const Default: Story<RecurringDatePickerInputProps> = (args) => {
15
+ type DefaultRecurringDatePickerInputProps = RecurringDatePickerInputProps;
16
+
17
+ export const Default: Story<DefaultRecurringDatePickerInputProps> = (args) => {
16
18
  return (
17
19
  <Card style={{ maxWidth: "max-content" }}>
18
20
  <Card.Body>
@@ -21,7 +23,7 @@ export const Default: Story<RecurringDatePickerInputProps> = (args) => {
21
23
  </Card>
22
24
  );
23
25
  };
24
- export const Valid: Story<RecurringDatePickerInputProps> = (args) => {
26
+ export const Valid: Story<DefaultRecurringDatePickerInputProps> = (args) => {
25
27
  return (
26
28
  <Card style={{ maxWidth: "max-content" }}>
27
29
  <Card.Body>
@@ -32,15 +34,6 @@ export const Valid: Story<RecurringDatePickerInputProps> = (args) => {
32
34
  };
33
35
  Default.args = {
34
36
  onChange: (data) => console.log("onSubmit", data),
35
- workHours: [
36
- { start: "20:00", end: "04:00", day: 0, description: "" },
37
- { start: "20:00", end: "04:00", day: 1, description: "" },
38
- { start: "20:00", end: "04:00", day: 2, description: "" },
39
- { start: "20:00", end: "12:00", day: 3, description: "" },
40
- { start: "20:00", end: "23:00", day: 4, description: "" },
41
- { start: "08:00", end: "12:00", day: 5, description: "" },
42
- { start: "10:00", end: "16:00", day: 6, description: "" },
43
- ],
44
37
  };
45
38
  Valid.args = {
46
39
  onChange: (data) => console.log("onSubmit", data),