@licklist/design 0.68.5-dev.0 → 0.68.6-dev.0

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 (382) hide show
  1. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  2. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +3 -1
  3. package/dist/iframe/activity-card/ActivityCard.d.ts +5 -4
  4. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  5. package/dist/iframe/activity-card/ActivityCard.js +52 -40
  6. package/dist/product-set/control/ProductSetControl.d.ts +4 -0
  7. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  8. package/dist/product-set/control/ProductSetControl.js +23 -3
  9. package/dist/product-set/control/ProductSetImageControl.d.ts +2 -0
  10. package/dist/product-set/control/ProductSetImageControl.d.ts.map +1 -0
  11. package/dist/product-set/control/ProductSetImageControl.js +279 -0
  12. package/dist/styles/activity-card/{GridActivitiesCard.scss → ActivitiesCard.scss} +19 -5
  13. package/dist/styles/activity-card/ListActivitiesCard.scss +12 -42
  14. package/dist/styles/activity-card/_index.scss +1 -1
  15. package/package.json +1 -1
  16. package/src/affiliate/card/AffiliateCard.tsx +15 -15
  17. package/src/affiliate/form/AffiliateControl.tsx +8 -8
  18. package/src/affiliate/form/AffiliateForm.tsx +5 -5
  19. package/src/auth/AccessDenied/AccessDenied.tsx +8 -8
  20. package/src/auth/ChangePassword/ChangePasswordComponent.tsx +4 -4
  21. package/src/auth/ChangePassword/ChangePasswordFormComponent.tsx +14 -14
  22. package/src/auth/Layout/AuthNavComponent.tsx +6 -6
  23. package/src/auth/Layout/UserNavComponent.tsx +2 -2
  24. package/src/auth/Layout/UserNavDropDown.tsx +1 -1
  25. package/src/auth/Layout/UserNavDropDownToggle.tsx +3 -3
  26. package/src/auth/Login/LoginComponent.tsx +8 -8
  27. package/src/auth/Login/LoginFormComponent.tsx +15 -15
  28. package/src/auth/Logout/Logout.stories.tsx +2 -2
  29. package/src/auth/Register/BirthDateFormComponent.tsx +17 -17
  30. package/src/auth/Register/RegisterComponent.tsx +7 -7
  31. package/src/auth/Register/RegisterFormComponent.tsx +56 -56
  32. package/src/auth/ResetPassword/ResetPasswordComponent.tsx +3 -3
  33. package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +13 -13
  34. package/src/auth/Social/SocialCallbackComponent.tsx +3 -3
  35. package/src/auth/Social/SocialFormComponent.tsx +4 -4
  36. package/src/availability-indicator/AvailabilityIndicator.tsx +1 -1
  37. package/src/calendar/Calendar.tsx +2 -2
  38. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +9 -9
  39. package/src/calendar/components/CalendarDates/CalendarDates.tsx +2 -2
  40. package/src/calendar/components/CalendarSelect/CalendarSelect.tsx +2 -2
  41. package/src/calendar/components/CalendarWeekdays/CalendarWeekdays.tsx +2 -2
  42. package/src/collapsible-input-group/CollapsibleInputGroup.tsx +6 -6
  43. package/src/custom-fields/CustomFields.stories.tsx +1 -1
  44. package/src/custom-fields/field/FieldItem.tsx +1 -1
  45. package/src/custom-fields/field/SelectFieldModal.tsx +4 -4
  46. package/src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx +8 -8
  47. package/src/custom-fields/forms/DropdownForm.tsx +16 -16
  48. package/src/custom-fields/forms/TextInputForm.tsx +6 -6
  49. package/src/customers/components/filter/CustomerFilter.tsx +3 -3
  50. package/src/date-time-button/DateContent.tsx +1 -1
  51. package/src/date-time-button/DateTimeButton.tsx +2 -2
  52. package/src/error/ErrorFallback.tsx +1 -1
  53. package/src/events/edit-event-modal/IntervalInput.tsx +11 -11
  54. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +2 -2
  55. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +24 -24
  56. package/src/events/edit-event-modal/component/ProductSetShortForm/ProductSetShortForm.tsx +3 -3
  57. package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +11 -11
  58. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +15 -15
  59. package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +5 -5
  60. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -0
  61. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.stories.tsx +1 -1
  62. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +16 -16
  63. package/src/events/event-card/EventCard.stories.tsx +5 -5
  64. package/src/events/event-card/EventCard.tsx +30 -30
  65. package/src/events/event-card/EventCardSkeleton.tsx +10 -10
  66. package/src/events/event-statistic-modal/EventStatisticModal.stories.tsx +1 -1
  67. package/src/events/event-statistic-modal/EventStatisticModal.tsx +8 -8
  68. package/src/events/event-venue-map/components/Dropdown/Dropdown.tsx +1 -1
  69. package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +3 -3
  70. package/src/events/event-venue-map/components/Dropdown/components/ProductsControl/ProductsControl.tsx +5 -5
  71. package/src/events/event-venue-map/components/Dropdown/components/SelectControl/SelectControl.tsx +10 -10
  72. package/src/events/event-venue-map/components/MapPoint/components/DeleteIcon/DeleteIcon.tsx +1 -1
  73. package/src/events/event-venue-map/components/MapPoint/components/EditIcon/EditIcon.tsx +1 -1
  74. package/src/events/event-venue-map/components/MapPoint/components/PointIcon/PointIcon.tsx +2 -2
  75. package/src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx +1 -1
  76. package/src/events/event-venue-map/components/Scrollbars/Scrollbars.tsx +5 -5
  77. package/src/events/event-venue-map/components/VenueMap/VenueMap.tsx +3 -3
  78. package/src/events/event-venue-map/components/ZoomButtons/ZoomButtons.tsx +4 -4
  79. package/src/file-upload/FilePreview.tsx +8 -8
  80. package/src/file-upload/FileUpload.tsx +8 -8
  81. package/src/header/BookeditHeader.tsx +1 -1
  82. package/src/header/Header.stories.tsx +16 -16
  83. package/src/header/Header.tsx +11 -11
  84. package/src/header/LicklistHeader.tsx +1 -1
  85. package/src/header/elements/CompanySelector.tsx +6 -6
  86. package/src/help/example/Example.tsx +12 -12
  87. package/src/help/popover/HelpPopover.tsx +5 -5
  88. package/src/iframe/activity-card/ActivityCard.tsx +38 -27
  89. package/src/iframe/back-button/BackButton.tsx +3 -3
  90. package/src/iframe/custom-fields/components/CustomDateField.stories.tsx +1 -1
  91. package/src/iframe/custom-fields/components/CustomDateField.tsx +7 -7
  92. package/src/iframe/event/event-booking-form/EventBookingForm.tsx +14 -14
  93. package/src/iframe/event/event-booking-products/EventBookingProducts.tsx +3 -3
  94. package/src/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.tsx +10 -10
  95. package/src/iframe/event/event-booking-view/EventBookingView.tsx +1 -1
  96. package/src/iframe/event/event-card/IframeEventCard.stories.tsx +6 -6
  97. package/src/iframe/event/event-card/IframeEventCardSkeleton.tsx +20 -20
  98. package/src/iframe/event/event-card/IframeEventCards.stories.tsx +2 -2
  99. package/src/iframe/event/event-description/EventDescription.stories.tsx +3 -3
  100. package/src/iframe/event/event-description/EventDescription.tsx +10 -10
  101. package/src/iframe/event/event-navigation-footer/EventNavigationFooter.tsx +6 -6
  102. package/src/iframe/event/event-order-short-summary/EventOrderShortSummary.tsx +2 -2
  103. package/src/iframe/event/event-order-short-summary/components/Summary/Summary.tsx +4 -4
  104. package/src/iframe/event/event-order-summary/EventOrderSummary.stories.tsx +1 -1
  105. package/src/iframe/event/event-order-summary/EventOrderSummary.tsx +5 -5
  106. package/src/iframe/event/event-product-sets/EventProductSets.stories.tsx +1 -1
  107. package/src/iframe/event/event-product-sets/EventProductSets.tsx +1 -1
  108. package/src/iframe/event/event-product-sets/components/EventProductSet.tsx +1 -1
  109. package/src/iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.tsx +1 -1
  110. package/src/iframe/event/event-step-venue-map-zones/components/EventStepVenueMapZone.tsx +3 -3
  111. package/src/iframe/event/event-tables/EventTables.stories.tsx +1 -1
  112. package/src/iframe/event/event-tables/EventTables.tsx +5 -5
  113. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +4 -4
  114. package/src/iframe/event/event-venue-map/IframeEventVenueMap.tsx +1 -1
  115. package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +6 -6
  116. package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -7
  117. package/src/iframe/external-modal/ExternalModal.tsx +7 -7
  118. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +8 -8
  119. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +23 -23
  120. package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +1 -1
  121. package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +6 -6
  122. package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +3 -3
  123. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +1 -1
  124. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +2 -2
  125. package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +9 -9
  126. package/src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx +3 -3
  127. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +5 -5
  128. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +3 -3
  129. package/src/iframe/order-process/components/CalendarStepsForm/components/Category.tsx +1 -1
  130. package/src/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.tsx +3 -3
  131. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +7 -7
  132. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.stories.tsx +1 -1
  133. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +4 -4
  134. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +2 -2
  135. package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +8 -8
  136. package/src/iframe/order-process/components/NavigationFooter/NavigationFooter.tsx +4 -4
  137. package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.stories.tsx +1 -1
  138. package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.tsx +6 -6
  139. package/src/iframe/order-process/components/PaymentCard/PaymentCard.stories.tsx +2 -2
  140. package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +9 -9
  141. package/src/iframe/order-process/components/Timer/Timer.stories.tsx +2 -2
  142. package/src/iframe/order-process/components/Timer/Timer.tsx +6 -6
  143. package/src/iframe/page/Page.stories.tsx +4 -4
  144. package/src/iframe/page/Page.tsx +1 -1
  145. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +2 -2
  146. package/src/iframe/page/components/PageBody/components/RightBlock/RightBlock.tsx +2 -2
  147. package/src/iframe/page/components/PageHeader/PageHeader.tsx +6 -6
  148. package/src/iframe/payment/order-items-table/OrderItemsTable.stories.tsx +2 -2
  149. package/src/iframe/payment/order-items-table/OrderItemsTable.tsx +2 -2
  150. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +3 -3
  151. package/src/iframe/payment/payment-form/PaymentForm.stories.tsx +5 -5
  152. package/src/iframe/payment/payment-form/PaymentForm.tsx +12 -12
  153. package/src/iframe/payment/payment-page/PaymentPage.tsx +5 -5
  154. package/src/iframe/payment/payment-status-header/PaymentStatusHeader.stories.tsx +2 -2
  155. package/src/iframe/payment/payment-status-header/PaymentStatusHeader.tsx +2 -2
  156. package/src/iframe/payment/payment-status-page/PaymentStatusComponent.stories.tsx +2 -2
  157. package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +2 -2
  158. package/src/iframe/payment/status-body/StatusBody.tsx +3 -3
  159. package/src/iframe/powered-by/PoweredBy.tsx +4 -4
  160. package/src/iframe/ryft/RyftPaymentForm.tsx +12 -12
  161. package/src/image-radio-input/ImageRadioInput.tsx +5 -5
  162. package/src/layout/BackgroundVideoContainer.tsx +2 -2
  163. package/src/layout/Container.tsx +1 -1
  164. package/src/layout/DropDownToggle.tsx +1 -1
  165. package/src/layout/Layout.stories.tsx +5 -5
  166. package/src/logo/Logo.tsx +2 -2
  167. package/src/modals/confirmation/ConfirmModal.tsx +13 -13
  168. package/src/modals/dialog/Dialog.tsx +10 -10
  169. package/src/modals/fullscreen/FullscreenModal.tsx +10 -10
  170. package/src/modals/fullscreen/FulscreenModal.stories.tsx +2 -2
  171. package/src/notification/components/NotificationPlaceholders.tsx +5 -5
  172. package/src/notification/email-template/card/EmailTemplateCard.tsx +10 -10
  173. package/src/notification/email-template/control/EmailTemplateControl.tsx +29 -29
  174. package/src/notification/email-template/form/EmailTemplateForm.tsx +3 -3
  175. package/src/notification/send-email-template/SendEmailTemplateForm.tsx +11 -11
  176. package/src/notification/sms-template/card/SmsTemplateCard.tsx +9 -9
  177. package/src/notification/sms-template/control/SmsTemplateControl.tsx +15 -15
  178. package/src/notification/sms-template/form/SmsTemplateForm.tsx +1 -1
  179. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.tsx +6 -6
  180. package/src/product-set/card/ProductSetCard.tsx +21 -21
  181. package/src/product-set/control/DateAndRecurrenceInput.tsx +10 -10
  182. package/src/product-set/control/DateInput.tsx +10 -10
  183. package/src/product-set/control/ProductSetControl.stories.tsx +2 -2
  184. package/src/product-set/control/ProductSetControl.tsx +64 -72
  185. package/src/product-set/control/ProductSetImageControl.tsx +97 -0
  186. package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +1 -1
  187. package/src/product-set/control/ProductSetRecurrenceControl.tsx +10 -10
  188. package/src/product-set/control/ProductSetRecurrenceOverridesControl.tsx +9 -9
  189. package/src/product-set/control/TutorialGifCard.tsx +10 -10
  190. package/src/product-set/deposit-paid/ProductSetDepositPaid.stories.tsx +2 -2
  191. package/src/product-set/deposit-paid/ProductSetDepositPaidControl.tsx +9 -9
  192. package/src/product-set/elements/DeleteFieldButton.tsx +3 -3
  193. package/src/product-set/form/MobileFooter.tsx +2 -2
  194. package/src/product-set/form/ProductCategoriesControl.tsx +13 -13
  195. package/src/product-set/form/ProductSetForm.tsx +4 -4
  196. package/src/product-set/form/ProductSetFormPopover.tsx +4 -4
  197. package/src/product-set/form/ProductSetNameControl.tsx +1 -1
  198. package/src/product-set/form/ProductZonesControl.tsx +4 -4
  199. package/src/product-set/form/ProductsControl.tsx +4 -4
  200. package/src/product-set/form/SelectCategoryModal.tsx +22 -22
  201. package/src/product-set/form/StepsControl.tsx +5 -5
  202. package/src/product-set/form/SubProductsControl.tsx +1 -1
  203. package/src/product-set/form/VenueMapSetModal.tsx +16 -16
  204. package/src/product-set/form/VenueMapsControl.tsx +9 -9
  205. package/src/product-set/item/CreateProductSetItem.tsx +2 -2
  206. package/src/product-set/popover/ProductSetPopover.stories.tsx +7 -7
  207. package/src/product-set/popover/ProductSetPopover.tsx +5 -5
  208. package/src/product-set/product/Product.stories.tsx +4 -4
  209. package/src/product-set/product/ProductControl.tsx +19 -19
  210. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +10 -10
  211. package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
  212. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +9 -9
  213. package/src/product-set/product/deposit/ProductDeposit.stories.tsx +1 -1
  214. package/src/product-set/product/deposit/ProductDepositControl.tsx +4 -4
  215. package/src/product-set/product/duration/ProductDurationControl.stories.tsx +1 -1
  216. package/src/product-set/product/duration/ProductDurationControl.tsx +10 -10
  217. package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +1 -1
  218. package/src/product-set/product/price/ProductPrice.stories.tsx +1 -1
  219. package/src/product-set/product/price/ProductPriceControl.tsx +4 -4
  220. package/src/product-set/product/quantity/ProductQuantity.stories.tsx +3 -3
  221. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +10 -10
  222. package/src/product-set/product/quantity/ProductQuantityControl.tsx +8 -8
  223. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +3 -3
  224. package/src/product-set/product-category/ProductCategory.stories.tsx +4 -4
  225. package/src/product-set/product-category/ProductCategoryControl.tsx +27 -27
  226. package/src/product-set/product-zone/ProductZoneControl.tsx +6 -6
  227. package/src/product-set/step/Step.stories.tsx +1 -1
  228. package/src/product-set/step/StepControl.tsx +5 -5
  229. package/src/product-set/tabs/ProductSetTabs.stories.tsx +3 -3
  230. package/src/product-set/tabs/ProductSetTabs.tsx +1 -1
  231. package/src/provider/categories-input/CategoriesInput.tsx +9 -9
  232. package/src/provider/categories-input/CategoriesInputDescription.tsx +4 -4
  233. package/src/provider/company/user-form/UserForm.tsx +9 -9
  234. package/src/provider/location-input/LocationInput.tsx +11 -11
  235. package/src/provider/location-input/LocationInputDescription.tsx +1 -1
  236. package/src/provider/location-input/components/FormGroupControll.tsx +1 -1
  237. package/src/provider/provider-details-input/ProviderDetailsInput.tsx +18 -18
  238. package/src/provider/provider-form/ProviderForm.tsx +11 -11
  239. package/src/provider/provider-links-input/ProviderLinksInput.tsx +4 -4
  240. package/src/provider/venue-form/VenueForm.tsx +12 -12
  241. package/src/provider/working-hours-input/WorkingHoursInput.tsx +13 -13
  242. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +1 -1
  243. package/src/radio-card/RadioCard.tsx +3 -3
  244. package/src/recurrence-input/RecurrenceEndInput.tsx +12 -12
  245. package/src/recurrence-input/RecurrenceIntervalAndFrequencyInput.tsx +6 -6
  246. package/src/recurrence-input/RecurrenceMonthlyRepeatByInput.tsx +4 -4
  247. package/src/recurrence-input/RecurrenceWeekdaysInput.tsx +4 -4
  248. package/src/recurring-date-picker-input/DatePickerInput.tsx +3 -3
  249. package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +8 -8
  250. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +12 -12
  251. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +10 -10
  252. package/src/recurring-date-picker-input/RecurrenceMonthlyRepeatByInput.tsx +4 -4
  253. package/src/recurring-date-picker-input/RecurrenceWeekdaysInput.tsx +6 -6
  254. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +4 -4
  255. package/src/report/DataFieldsSelector/DataFieldsSelector.tsx +6 -6
  256. package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +23 -23
  257. package/src/report/ReportTypeSelect/ReportTypeSelect.tsx +9 -9
  258. package/src/report/card/ReportCard.tsx +3 -3
  259. package/src/report/form/ReportForm.tsx +9 -9
  260. package/src/resource/form/ResourceForm.tsx +4 -4
  261. package/src/resource/form/components/CapacityControl.tsx +2 -2
  262. package/src/resource/form/components/NameControl.tsx +1 -1
  263. package/src/resource/form/components/SortControl.tsx +2 -2
  264. package/src/resource/form/components/ZoneControl.tsx +3 -3
  265. package/src/sales/booking/results/BookingResults.tsx +2 -2
  266. package/src/sales/booking/results/components/ResultCard.tsx +8 -8
  267. package/src/sales/coupon/control/CouponFormControl.tsx +24 -24
  268. package/src/sales/coupon/form/CouponFrom.tsx +3 -3
  269. package/src/sales/filters/SaleFilters.tsx +3 -3
  270. package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +12 -12
  271. package/src/sales/guest-profile/profile/Profile.tsx +6 -6
  272. package/src/sales/guest-profile/profile/components/ImageHolder/ImageHolder.tsx +1 -1
  273. package/src/sales/guest-profile/user-metrics/UserMetrics.tsx +34 -34
  274. package/src/sales/guest-profile/visited-providers/VisitedProviders.tsx +10 -10
  275. package/src/sales/life-time-sales/LifeTimeSalesChart.tsx +8 -8
  276. package/src/sales/manual-booking/number-input-horizontal/NumberInputHorizontal.stories.tsx +1 -1
  277. package/src/sales/manual-booking/number-input-horizontal/NumberInputHorizontal.tsx +3 -3
  278. package/src/sales/manual-booking/search-user/SearchUser.tsx +8 -8
  279. package/src/sales/manual-booking/select-date-type-control/SelectDateTypeControl.tsx +10 -10
  280. package/src/sales/manual-booking/select-event/SelectEvent.tsx +13 -13
  281. package/src/sales/manual-booking/select-menu/SelectMenu.tsx +5 -5
  282. package/src/sales/manual-booking/select-menu/components/MenuButton.tsx +2 -2
  283. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +11 -11
  284. package/src/sales/modals/payment-modal/PaymentModal.tsx +10 -10
  285. package/src/sales/modals/refund-modal/RefundModal.stories.tsx +1 -1
  286. package/src/sales/modals/refund-modal/RefundModal.tsx +11 -11
  287. package/src/sales/notes/NotesTable.tsx +5 -5
  288. package/src/sales/notes/NotesTableRow.tsx +13 -13
  289. package/src/sales/notes/note-form/NoteForm.tsx +11 -11
  290. package/src/sales/payment-form/SalePaymentForm.tsx +5 -5
  291. package/src/sales/payment-form/components/RyftPayment/RyftPayment.tsx +9 -9
  292. package/src/sales/sales-and-views/SalesAndViewsChart.tsx +19 -19
  293. package/src/sales/source-of-sales/SourceOfSalesChart.tsx +9 -9
  294. package/src/sales/statistics-chart/StatisticsChart.tsx +4 -4
  295. package/src/setting/admin/AdminSettingForm.tsx +14 -14
  296. package/src/setting/admin/PaymentFeeForm.tsx +28 -28
  297. package/src/setting/dashboard/DashboardSettingForm.tsx +16 -16
  298. package/src/setting/dashboard/EventSettingForm.tsx +3 -3
  299. package/src/setting/dashboard/FinancialDataForm.tsx +5 -5
  300. package/src/setting/dashboard/OtherSettingForm.tsx +29 -29
  301. package/src/setting/dashboard/ProviderSettingForm.tsx +3 -3
  302. package/src/setting/dashboard/components/IpInput.tsx +10 -10
  303. package/src/setting/dashboard/payments/payments-form/PaymentsForm.tsx +8 -8
  304. package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +4 -4
  305. package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +8 -8
  306. package/src/setting/dashboard/snippets/card/SnippetCard.tsx +16 -16
  307. package/src/setting/system/SystemSettingForm.tsx +8 -8
  308. package/src/sidebar/elements/Elements.stories.tsx +1 -1
  309. package/src/sidebar/elements/ReturnBack.tsx +3 -3
  310. package/src/slide-curtain/SlideCurtain.stories.tsx +1 -1
  311. package/src/slide-curtain/SlideCurtain.tsx +4 -4
  312. package/src/snippet/snippet-template/SnippetTemplate.tsx +3 -3
  313. package/src/snippet/snippet-template/context/snippetTemplate.tsx +2 -2
  314. package/src/snippet/snippet-template/control/PropertyControl.tsx +8 -8
  315. package/src/snippet/snippet-template/form/SnippetTemplateForm.tsx +7 -7
  316. package/src/snippet/snippet-template/preview/Preview.tsx +66 -66
  317. package/src/snippet/snippet-template/settings/SettingButton.tsx +2 -2
  318. package/src/sortable-fields/SortableFieldItem.tsx +2 -2
  319. package/src/sortable-list/CreateSortableListItem.tsx +3 -3
  320. package/src/sortable-tree/SortableTreeItem.stories.tsx +2 -2
  321. package/src/sortable-tree/SortableTreeItem.tsx +41 -41
  322. package/src/sorting-select/SortingSelect.tsx +4 -4
  323. package/src/static/CountryCodeSelect.tsx +4 -4
  324. package/src/static/CountrySelect.tsx +5 -5
  325. package/src/static/CurrencyNumberInput.tsx +5 -5
  326. package/src/static/RestrictedAccess.tsx +6 -6
  327. package/src/static/SocialButton.tsx +1 -1
  328. package/src/static/Static.stories.tsx +24 -24
  329. package/src/static/UserBadge.tsx +7 -7
  330. package/src/static/WarningMessage.tsx +2 -2
  331. package/src/static/date-range-input/DateRangeInput.stories.tsx +1 -1
  332. package/src/static/date-range-input/DateRangeInput.tsx +12 -12
  333. package/src/static/form-number-input/FormNumberInput.stories.tsx +1 -1
  334. package/src/static/form-number-input/FormNumberInput.tsx +4 -4
  335. package/src/static/images/Images.stories.tsx +1 -1
  336. package/src/static/loader/BlockLoader.tsx +2 -2
  337. package/src/static/loader/ButtonLoader.tsx +1 -1
  338. package/src/static/loader/Loader.stories.tsx +2 -2
  339. package/src/static/loader/PaymentLoader.tsx +4 -4
  340. package/src/static/loader/SnippetLoader.tsx +2 -2
  341. package/src/static/manual-date-picker/ManualDatePicker.tsx +9 -9
  342. package/src/static/number-input/NumberInput.tsx +6 -6
  343. package/src/static/switch/Switch.stories.tsx +3 -3
  344. package/src/static/switch/Switch.tsx +4 -4
  345. package/src/static/tabs/Tabs.tsx +1 -1
  346. package/src/static/text-expand/TextExpand.tsx +3 -3
  347. package/src/striped-static-table/StripedStaticTable.tsx +2 -2
  348. package/src/styles/activity-card/{GridActivitiesCard.scss → ActivitiesCard.scss} +19 -5
  349. package/src/styles/activity-card/ListActivitiesCard.scss +12 -42
  350. package/src/styles/activity-card/_index.scss +1 -1
  351. package/src/table/FilterHelperComponent.tsx +10 -10
  352. package/src/table/MenuButton.tsx +1 -1
  353. package/src/table/PaginationHelperComponent.tsx +7 -7
  354. package/src/table/PerPageHelperComponent.tsx +5 -5
  355. package/src/table/ReactTableHelperComponent.tsx +1 -1
  356. package/src/table/TableHelperComponent.tsx +1 -1
  357. package/src/theme/Theme.stories.tsx +36 -36
  358. package/src/tiptap-editor/TipTapEditor.tsx +1 -1
  359. package/src/tiptap-editor/TipTapMenu/TipTapMenu.tsx +21 -21
  360. package/src/tiptap-editor/TipTapMenu/components/TipTapMenuItem.tsx +2 -2
  361. package/src/typeahead/Typeahead.stories.tsx +3 -3
  362. package/src/typeahead-helper/TypeaheadHelperComponent.tsx +4 -4
  363. package/src/venue-map-sets/card/VenueMapSetCard.tsx +14 -14
  364. package/src/venue-map-sets/form/VenueMapSetForm.tsx +3 -3
  365. package/src/venue-map-sets/form/components/NameControl.tsx +1 -1
  366. package/src/venue-map-sets/form/components/VenueMapControl.tsx +8 -8
  367. package/src/venue-map-sets/form/components/VenueMapImageControl.tsx +5 -5
  368. package/src/venue-map-sets/form/components/VenueMapModal.tsx +16 -16
  369. package/src/venue-map-sets/form/components/VenueMapsControl.tsx +1 -1
  370. package/src/virtualized/components/VirtualizedGrid.tsx +1 -1
  371. package/src/zone/card/ZoneCard.tsx +14 -14
  372. package/src/zone/form/ZoneForm.tsx +3 -3
  373. package/src/zone/form/components/AvailableTimesControl.tsx +4 -4
  374. package/src/zone/form/components/DescriptionControl.tsx +2 -2
  375. package/src/zone/form/components/GameDurationControl.tsx +2 -2
  376. package/src/zone/form/components/NameControl.tsx +1 -1
  377. package/src/zone/form/components/SortControl.tsx +2 -2
  378. package/src/zone/form/components/ZoneControl.tsx +1 -1
  379. package/src/zone/form/components/ZoneImageControl.tsx +3 -3
  380. package/src/zone/form/components/ZoneRecurrenceControl.tsx +10 -10
  381. package/src/zone/form/components/ZoneRecurrencesControl.tsx +10 -10
  382. package/src/zone/form/components/ZoneTypeControl.tsx +2 -2
@@ -50,32 +50,32 @@ export function ProductSetCard({
50
50
  return (
51
51
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
52
52
  <div
53
- role="button"
53
+ role='button'
54
54
  tabIndex={0}
55
- className="border-0 product-set-card-wrapper w-100 pb-0"
55
+ className='border-0 product-set-card-wrapper w-100 pb-0'
56
56
  onClick={onCardClick}
57
57
  >
58
58
  <div className={productSetCardClasses}>
59
- <div className="product-set-card-link">
60
- <div className="d-flex flex-column">
59
+ <div className='product-set-card-link'>
60
+ <div className='d-flex flex-column'>
61
61
  <div>
62
62
  {name}
63
63
  {rrule && `(${RRule.fromString(rrule).toText()})`}
64
64
  </div>
65
65
  {!!override && (
66
- <div className="h6 bold ml-1">
66
+ <div className='h6 bold ml-1'>
67
67
  {`${override} ${t(override > 1 ? 'overrides' : 'override')}`}
68
68
  </div>
69
69
  )}
70
70
  </div>
71
71
  </div>
72
- <div className="d-flex">
73
- <div className="product-set-card-menu-eye-container">
74
- <FaEye color="#0E8CE2" size={20} />
72
+ <div className='d-flex'>
73
+ <div className='product-set-card-menu-eye-container'>
74
+ <FaEye color='#0E8CE2' size={20} />
75
75
  </div>
76
76
  <OverlayTrigger
77
- trigger="click"
78
- placement="bottom"
77
+ trigger='click'
78
+ placement='bottom'
79
79
  rootClose
80
80
  overlay={
81
81
  <Popover
@@ -87,15 +87,15 @@ export function ProductSetCard({
87
87
  >
88
88
  <Popover.Content
89
89
  as={ListGroup}
90
- className="product-set-card-menu"
91
- variant="flush"
90
+ className='product-set-card-menu'
91
+ variant='flush'
92
92
  >
93
93
  {hasPermission && (
94
94
  <>
95
95
  <ListGroup.Item
96
96
  action
97
- as="div"
98
- role="button"
97
+ as='div'
98
+ role='button'
99
99
  tabIndex={0}
100
100
  onClick={(e) => e.stopPropagation()}
101
101
  >
@@ -121,7 +121,7 @@ export function ProductSetCard({
121
121
  confirm(() => {})
122
122
  }}
123
123
  name={t('duplicate')}
124
- className="product-set-card-menu-item-text"
124
+ className='product-set-card-menu-item-text'
125
125
  />
126
126
  )}
127
127
  </ConfirmModal>
@@ -129,9 +129,9 @@ export function ProductSetCard({
129
129
  </ListGroup.Item>
130
130
  <ListGroup.Item
131
131
  action
132
- className="text-danger"
133
- as="div"
134
- role="button"
132
+ className='text-danger'
133
+ as='div'
134
+ role='button'
135
135
  tabIndex={0}
136
136
  onClick={(e) => e.stopPropagation()}
137
137
  >
@@ -145,7 +145,7 @@ export function ProductSetCard({
145
145
  }}
146
146
  name={t('remove')}
147
147
  icon={<FaTrashAlt size={12} />}
148
- className="product-set-card-menu-item-text d-flex w-100 align-items-center"
148
+ className='product-set-card-menu-item-text d-flex w-100 align-items-center'
149
149
  rightIcon
150
150
  />
151
151
  )}
@@ -159,8 +159,8 @@ export function ProductSetCard({
159
159
  }
160
160
  >
161
161
  <button
162
- type="button"
163
- className="product-set-card-menu-button"
162
+ type='button'
163
+ className='product-set-card-menu-button'
164
164
  onClick={(e) => {
165
165
  e.stopPropagation()
166
166
  setIsOverlayVisible(true)
@@ -217,8 +217,8 @@ export const DateAndRecurrenceInput = ({
217
217
  <OverlayTrigger
218
218
  show={isDatePopoverVisible}
219
219
  overlay={
220
- <Popover id={popoverId} className="rounded">
221
- <Popover.Content className="shadow-lg rounded" ref={popoverRef}>
220
+ <Popover id={popoverId} className='rounded'>
221
+ <Popover.Content className='shadow-lg rounded' ref={popoverRef}>
222
222
  <RecurringDatePickerInput
223
223
  defaultValues={editState.values}
224
224
  onChange={handleRecurringDateChange}
@@ -247,11 +247,11 @@ export const DateAndRecurrenceInput = ({
247
247
  </Popover.Content>
248
248
  </Popover>
249
249
  }
250
- trigger="click"
251
- placement="bottom"
250
+ trigger='click'
251
+ placement='bottom'
252
252
  popperConfig={{ modifiers: [sameWidthPopperModifier] }}
253
253
  >
254
- <div className="product-set-recurrences">
254
+ <div className='product-set-recurrences'>
255
255
  <DndContext
256
256
  onDragEnd={handleOnDragEnd}
257
257
  modifiers={[restrictToVerticalAxis]}
@@ -279,22 +279,22 @@ export const DateAndRecurrenceInput = ({
279
279
 
280
280
  {(!isEventEditProductSet || fields?.length < 1) && (
281
281
  <div
282
- className="product-set-recurrence-icon-wrapper"
283
- role="button"
282
+ className='product-set-recurrence-icon-wrapper'
283
+ role='button'
284
284
  tabIndex={0}
285
285
  onClick={handleOnAdd}
286
286
  onKeyDown={handleOnAdd}
287
287
  >
288
288
  <FaPlusCircle
289
289
  size={16}
290
- className="product-set-recurrence-icon-add mr-2"
290
+ className='product-set-recurrence-icon-add mr-2'
291
291
  />
292
292
  {t('addDates')}
293
293
  </div>
294
294
  )}
295
295
 
296
296
  <Form.Control
297
- type="hidden"
297
+ type='hidden'
298
298
  {...register('menuRecurrences', {
299
299
  required: {
300
300
  value: true,
@@ -306,7 +306,7 @@ export const DateAndRecurrenceInput = ({
306
306
  })}
307
307
  />
308
308
 
309
- <div className="manual-form-error">
309
+ <div className='manual-form-error'>
310
310
  {errors.menuRecurrences?.message}
311
311
  </div>
312
312
  </div>
@@ -208,8 +208,8 @@ export const DateInput = ({
208
208
  <OverlayTrigger
209
209
  show={isDatePopoverVisible}
210
210
  overlay={
211
- <Popover id={popoverId} className="rounded">
212
- <Popover.Content className="shadow-lg rounded" ref={popoverRef}>
211
+ <Popover id={popoverId} className='rounded'>
212
+ <Popover.Content className='shadow-lg rounded' ref={popoverRef}>
213
213
  <DatePickerInput
214
214
  defaultValues={editState.values}
215
215
  onChange={handleRecurringDateChange}
@@ -236,11 +236,11 @@ export const DateInput = ({
236
236
  </Popover.Content>
237
237
  </Popover>
238
238
  }
239
- trigger="click"
240
- placement="bottom"
239
+ trigger='click'
240
+ placement='bottom'
241
241
  popperConfig={{ modifiers: [sameWidthPopperModifier] }}
242
242
  >
243
- <div className="product-set-recurrences">
243
+ <div className='product-set-recurrences'>
244
244
  {fields.map((menuRecurrence, index) => (
245
245
  <ProductSetRecurrenceOverridesControl
246
246
  key={menuRecurrence._id}
@@ -254,15 +254,15 @@ export const DateInput = ({
254
254
  ))}
255
255
  {fields.length < MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE && (
256
256
  <div
257
- className="product-set-recurrence-icon-wrapper"
258
- role="button"
257
+ className='product-set-recurrence-icon-wrapper'
258
+ role='button'
259
259
  tabIndex={0}
260
260
  onClick={handleOnAdd}
261
261
  onKeyDown={handleOnAdd}
262
262
  >
263
263
  <FaPlusCircle
264
264
  size={16}
265
- className="product-set-recurrence-icon-add mr-2"
265
+ className='product-set-recurrence-icon-add mr-2'
266
266
  />
267
267
 
268
268
  {t('addDates')}
@@ -270,7 +270,7 @@ export const DateInput = ({
270
270
  )}
271
271
 
272
272
  <Form.Control
273
- type="hidden"
273
+ type='hidden'
274
274
  {...register('menuRecurrences', {
275
275
  required: {
276
276
  value: true,
@@ -282,7 +282,7 @@ export const DateInput = ({
282
282
  })}
283
283
  />
284
284
 
285
- <div className="manual-form-error">
285
+ <div className='manual-form-error'>
286
286
  {errors.menuRecurrences?.message}
287
287
  </div>
288
288
  </div>
@@ -28,7 +28,7 @@ export const Default: Story<DefaultProductSetControl> = (args) => {
28
28
  return (
29
29
  <FormProvider {...form}>
30
30
  <Form
31
- className="d-flex flex-column"
31
+ className='d-flex flex-column'
32
32
  noValidate
33
33
  onSubmit={form.handleSubmit(onSubmit)}
34
34
  >
@@ -49,7 +49,7 @@ export const Empty: Story<DefaultProductSetControl> = (args) => {
49
49
  return (
50
50
  <FormProvider {...form}>
51
51
  <Form
52
- className="d-flex flex-column"
52
+ className='d-flex flex-column'
53
53
  noValidate
54
54
  onSubmit={form.handleSubmit(onSubmit)}
55
55
  >
@@ -22,12 +22,11 @@ import HookFormService from '@licklist/plugins/dist/services/Form/HookFormServic
22
22
  import { ruleForUrlWithProtocol } from '@licklist/plugins/dist/validation/Rules/urlRule'
23
23
  import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
24
24
  import { checkIfZoneCategory } from '@licklist/plugins'
25
+ import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
25
26
  import { WarningMessage } from '../../static'
26
27
  import { SelectItem } from '../../types/generic/SelectItem'
27
28
  import {
28
29
  DateAndRecurrenceInput,
29
- // TODO: Show Date Component, when reccurent date bugs are fixed
30
- // DateAndRecurrenceInput,
31
30
  DateAndRecurrenceInputValues,
32
31
  } from './DateAndRecurrenceInput'
33
32
  import TutorialGifCard from './TutorialGifCard'
@@ -35,6 +34,7 @@ import { Step } from '../types'
35
34
  import { StepsControl } from '../form/StepsControl'
36
35
  import { Typeahead } from '../../typeahead'
37
36
  import { DateInput } from './DateInput'
37
+ import { ProductSetImageControl } from './ProductSetImageControl'
38
38
 
39
39
  const OPERATIONAL_COST_TITLES = {
40
40
  [OPERATIONAL_COST_PROVIDER]: 'operationalCostProvider',
@@ -55,6 +55,8 @@ export interface TemplateItem {
55
55
 
56
56
  export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
57
57
  name: string
58
+ description?: string
59
+ image?: Image
58
60
  type: ProductSetType
59
61
  termsAndConditions: string
60
62
  thankYouPageUrl: string
@@ -65,6 +67,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
65
67
  steps: Step[]
66
68
  emailTemplates?: TemplateItem[]
67
69
  smsTemplates?: TemplateItem[]
70
+ localImageBlobURL?: string
68
71
  }
69
72
 
70
73
  export interface ProductSetControlShared {
@@ -122,6 +125,7 @@ export function ProductSetControl({
122
125
  const steps = watch('steps')
123
126
 
124
127
  const nameId = useId()
128
+ const descriptionId = useId()
125
129
  const termsAndConditionsId = useId()
126
130
  const relyOnPeopleTypeId = useId()
127
131
 
@@ -139,7 +143,7 @@ export function ProductSetControl({
139
143
  isEventEditProductSet && 'event-edit-product-set'
140
144
  }`}
141
145
  >
142
- <Col md={6} sm={12} className="pr-5">
146
+ <Col md={6} sm={12} className='pr-5'>
143
147
  <Form.Group controlId={nameId}>
144
148
  <Form.Label>{t('Design:name')}*</Form.Label>
145
149
  <Form.Control
@@ -169,11 +173,27 @@ export function ProductSetControl({
169
173
  placeholder={t('Design:placeholderProductSetName')}
170
174
  isInvalid={Boolean(errors.name)}
171
175
  />
172
- <Form.Control.Feedback type="invalid">
176
+ <Form.Control.Feedback type='invalid'>
173
177
  {errors.name?.message}
174
178
  </Form.Control.Feedback>
175
179
  </Form.Group>
176
180
 
181
+ <Form.Group controlId={descriptionId}>
182
+ <Form.Label>{t('Design:description')}</Form.Label>
183
+ <Form.Control
184
+ {...register('description', {
185
+ maxLength: 25_000,
186
+ })}
187
+ as='textarea'
188
+ isInvalid={Boolean(errors.description)}
189
+ />
190
+ <Form.Control.Feedback type='invalid'>
191
+ {errors.description?.message}
192
+ </Form.Control.Feedback>
193
+ </Form.Group>
194
+
195
+ <ProductSetImageControl />
196
+
177
197
  {showDateSelector ? (
178
198
  <DateInput
179
199
  workHours={isZoneAdded ? workHours : undefined}
@@ -194,7 +214,7 @@ export function ProductSetControl({
194
214
  </>
195
215
  )}
196
216
 
197
- <div className="divider" />
217
+ <div className='divider' />
198
218
 
199
219
  <TutorialGifCard isOverrides={isOverrides} />
200
220
 
@@ -206,34 +226,13 @@ export function ProductSetControl({
206
226
  />
207
227
  </Col>
208
228
  <Col md={6} sm={12}>
209
- <div className="second-column">
210
- {/* <Controller
211
- control={control}
212
- name="type"
213
- render={({ field }) => (
214
- <Form.Group className="d-flex flex-column flex-grow-1 align-items-start">
215
- <Form.Label>{t("Design:checkoutType")}</Form.Label>
216
- <Switch
217
- name={field.name}
218
- options={PRODUCT_SET_TYPES.map((type) => ({
219
- key: type,
220
- id: type,
221
- value: t(type),
222
- }))}
223
- value={field.value}
224
- onChange={field.onChange}
225
- disabled={isLoading}
226
- />
227
- </Form.Group>
228
- )}
229
- /> */}
230
-
229
+ <div className='second-column'>
231
230
  <Form.Group>
232
- <Form.Label className="mb-0">
231
+ <Form.Label className='mb-0'>
233
232
  {t('Design:operationalCost')}
234
233
  </Form.Label>
235
- <div className="d-flex">
236
- <span className="booking-fee-text">
234
+ <div className='d-flex'>
235
+ <span className='booking-fee-text'>
237
236
  {t('bookingFeePaid', {
238
237
  fee,
239
238
  })}
@@ -241,7 +240,7 @@ export function ProductSetControl({
241
240
  </div>
242
241
  <Form.Control
243
242
  {...register('operationalCost', { required: true })}
244
- as="select"
243
+ as='select'
245
244
  defaultValue={OPERATIONAL_COST_PROVIDER}
246
245
  disabled={isOverrides}
247
246
  isInvalid={HookFormService.isInvalid('operationalCost', errors)}
@@ -262,7 +261,7 @@ export function ProductSetControl({
262
261
  </option>
263
262
  ))}
264
263
  </Form.Control>
265
- <Form.Control.Feedback type="invalid">
264
+ <Form.Control.Feedback type='invalid'>
266
265
  {HookFormService.getErrors('operationalCost', errors)}
267
266
  </Form.Control.Feedback>
268
267
  </Form.Group>
@@ -271,12 +270,12 @@ export function ProductSetControl({
271
270
  <Form.Label>{t('peopleQuantityType')}</Form.Label>
272
271
  <Form.Control
273
272
  {...register('relyOnPeopleType')}
274
- as="select"
273
+ as='select'
275
274
  defaultValue={null}
276
275
  disabled={isOverrides}
277
276
  isInvalid={HookFormService.isInvalid('relyOnPeopleType', errors)}
278
277
  >
279
- <option value="">{t('notRequired')} </option>
278
+ <option value=''>{t('notRequired')} </option>
280
279
  {Object.keys(RELY_ON_PEOPLE_TYPES).map((relyOnPeopleType) => (
281
280
  <option
282
281
  value={RELY_ON_PEOPLE_TYPES[relyOnPeopleType]}
@@ -290,7 +289,7 @@ export function ProductSetControl({
290
289
  </option>
291
290
  ))}
292
291
  </Form.Control>
293
- <Form.Control.Feedback type="invalid">
292
+ <Form.Control.Feedback type='invalid'>
294
293
  {HookFormService.getErrors('relyOnPeopleType', errors)}
295
294
  </Form.Control.Feedback>
296
295
  </Form.Group>
@@ -299,7 +298,7 @@ export function ProductSetControl({
299
298
  <Form.Label>{t('Design:termsAndConditions')}</Form.Label>
300
299
  <Form.Control
301
300
  {...register('termsAndConditions')}
302
- as="textarea"
301
+ as='textarea'
303
302
  rows={2}
304
303
  disabled={isLoading || isOverrides}
305
304
  isInvalid={HookFormService.isInvalid(
@@ -307,19 +306,19 @@ export function ProductSetControl({
307
306
  errors,
308
307
  )}
309
308
  />
310
- <Form.Control.Feedback type="invalid">
309
+ <Form.Control.Feedback type='invalid'>
311
310
  {HookFormService.getErrors('termsAndConditions', errors)}
312
311
  </Form.Control.Feedback>
313
312
  </Form.Group>
314
313
 
315
314
  <Form.Group>
316
- <Form.Label className="mt-4">
315
+ <Form.Label className='mt-4'>
317
316
  {t('Design:emailTemplate')}
318
317
  </Form.Label>
319
318
  <>
320
319
  {showEmailTemplateSelector ? (
321
320
  <Typeahead
322
- name="emailTemplates"
321
+ name='emailTemplates'
323
322
  options={emailTemplates}
324
323
  isMultipleChoise
325
324
  placeholder={t('Design:choose')}
@@ -343,7 +342,7 @@ export function ProductSetControl({
343
342
  </Form.Label>
344
343
  {showSmsTemplateSelector ? (
345
344
  <Typeahead
346
- name="smsTemplates"
345
+ name='smsTemplates'
347
346
  options={smsTemplates}
348
347
  isMultipleChoise
349
348
  placeholder={t('Design:choose')}
@@ -363,40 +362,33 @@ export function ProductSetControl({
363
362
  <Form.Group>
364
363
  <Controller
365
364
  control={control}
366
- name="fieldSetId"
367
- render={({ field }) => {
368
- const fieldValue = Number(field.value)
369
-
370
- return (
371
- <>
372
- <Form.Label>{t('Design:customFields')}</Form.Label>
373
- <Form.Control
374
- onChange={field.onChange}
375
- value={fieldValue}
376
- as="select"
377
- disabled={isOverrides}
378
- isInvalid={HookFormService.isInvalid(
379
- 'fieldSetId',
380
- errors,
381
- )}
382
- >
383
- <option value="">{t('Design:choose')}</option>
384
- {fieldSets?.map((fieldSet) => (
385
- <option value={fieldSet.id} key={fieldSet.id}>
386
- {fieldSet.name}
387
- </option>
388
- ))}
389
- </Form.Control>
390
- <Form.Control.Feedback type="invalid">
391
- {HookFormService.getErrors('fieldSetId', errors)}
392
- </Form.Control.Feedback>
393
- </>
394
- )
395
- }}
365
+ name='fieldSetId'
366
+ render={({ field }) => (
367
+ <>
368
+ <Form.Label>{t('Design:customFields')}</Form.Label>
369
+ <Form.Control
370
+ onChange={field.onChange}
371
+ value={Number(field.value)}
372
+ as='select'
373
+ disabled={isOverrides}
374
+ isInvalid={HookFormService.isInvalid('fieldSetId', errors)}
375
+ >
376
+ <option value=''>{t('Design:choose')}</option>
377
+ {fieldSets?.map((fieldSet) => (
378
+ <option value={fieldSet.id} key={fieldSet.id}>
379
+ {fieldSet.name}
380
+ </option>
381
+ ))}
382
+ </Form.Control>
383
+ <Form.Control.Feedback type='invalid'>
384
+ {HookFormService.getErrors('fieldSetId', errors)}
385
+ </Form.Control.Feedback>
386
+ </>
387
+ )}
396
388
  />
397
389
  </Form.Group>
398
390
 
399
- <Form.Group controlId="thankYouPageUrlId">
391
+ <Form.Group controlId='thankYouPageUrlId'>
400
392
  <Form.Label>{t('thankYouPageUrl')}</Form.Label>
401
393
 
402
394
  <Form.Control
@@ -413,7 +405,7 @@ export function ProductSetControl({
413
405
  isInvalid={HookFormService.isInvalid('thankYouPageUrl', errors)}
414
406
  />
415
407
 
416
- <Form.Control.Feedback type="invalid">
408
+ <Form.Control.Feedback type='invalid'>
417
409
  {HookFormService.getErrors('thankYouPageUrl', errors)}
418
410
  </Form.Control.Feedback>
419
411
  </Form.Group>
@@ -0,0 +1,97 @@
1
+ import { useFormContext } from 'react-hook-form'
2
+ import { HookFormService, useImages } from '@licklist/plugins'
3
+ import { IMAGE_TYPE_IMAGE } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
4
+ import { useCallback, useEffect } from 'react'
5
+ import { Form } from 'react-bootstrap'
6
+ import { FileUpload } from 'src/file-upload'
7
+ import { useTranslation } from 'react-i18next'
8
+ import { isEqual } from 'lodash'
9
+ import { ProductSetControlValues } from '..'
10
+
11
+ export const ProductSetImageControl = () => {
12
+ const { t } = useTranslation('Design')
13
+
14
+ const {
15
+ formState: { errors },
16
+ setValue,
17
+ watch,
18
+ clearErrors,
19
+ } = useFormContext<ProductSetControlValues>()
20
+ const currentProductSet: ProductSetControlValues = watch()
21
+
22
+ const {
23
+ images,
24
+ handleImageRemove,
25
+ handleImageUploading,
26
+ isLoading: isImageUploading,
27
+ setImages,
28
+ } = useImages(null)
29
+
30
+ const onFilesChange = useCallback(
31
+ async (files: File[]) => {
32
+ const uploadedFiles = await handleImageUploading(files, IMAGE_TYPE_IMAGE)
33
+
34
+ if (!uploadedFiles) return
35
+
36
+ setValue('localImageBlobURL', URL.createObjectURL(files[0]) as never)
37
+ },
38
+ // eslint-disable-next-line react-hooks/exhaustive-deps
39
+ [handleImageUploading],
40
+ )
41
+
42
+ const onImageRemove = useCallback(
43
+ (id, path) => {
44
+ handleImageRemove(id, path)
45
+ setValue('localImageBlobURL', undefined as never)
46
+ },
47
+ // eslint-disable-next-line react-hooks/exhaustive-deps
48
+ [handleImageRemove],
49
+ )
50
+
51
+ useEffect(() => {
52
+ if (!currentProductSet || !currentProductSet.image) return
53
+
54
+ setImages([
55
+ {
56
+ ...currentProductSet.image,
57
+ url:
58
+ currentProductSet.image.url || currentProductSet?.localImageBlobURL,
59
+ },
60
+ ])
61
+ // eslint-disable-next-line react-hooks/exhaustive-deps
62
+ }, [currentProductSet?.image])
63
+
64
+ useEffect(() => {
65
+ if (isEqual(images[0], currentProductSet?.image)) return
66
+
67
+ setValue('image', (images[0] || null) as never)
68
+
69
+ if (images[0]) {
70
+ clearErrors('image')
71
+ }
72
+ // eslint-disable-next-line react-hooks/exhaustive-deps
73
+ }, [images])
74
+
75
+ return (
76
+ <Form.Group controlId='name'>
77
+ <Form.Control
78
+ isInvalid={HookFormService.isInvalid('image', errors)}
79
+ hidden
80
+ />
81
+ <FileUpload
82
+ onFilesChange={onFilesChange}
83
+ allowedExtensions={['jpeg', 'jpg', 'png']}
84
+ subTitle='.jpeg .jpg .png'
85
+ enablePreview
86
+ onFileRemove={onImageRemove}
87
+ defaultFiles={images}
88
+ isLoading={isImageUploading}
89
+ withIcon
90
+ title={t('Design:addImage')}
91
+ />
92
+ <Form.Control.Feedback type='invalid'>
93
+ {HookFormService.getErrors('image', errors)}
94
+ </Form.Control.Feedback>
95
+ </Form.Group>
96
+ )
97
+ }
@@ -38,7 +38,7 @@ export const Default: Story<ProductSetRecurrences> = (args) => {
38
38
  }
39
39
 
40
40
  return (
41
- <div className="product-set-recurrences">
41
+ <div className='product-set-recurrences'>
42
42
  <DndContext onDragEnd={onDragEnd}>
43
43
  <SortableContext
44
44
  items={items.map((menuRecurrence) => ({