@licklist/design 0.67.5 → 0.68.0-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 (307) hide show
  1. package/.storybook/main.cjs +15 -12
  2. package/dist/auth/Login/LoginComponent.js +2 -1
  3. package/dist/calendar/Calendar.d.ts +2 -2
  4. package/dist/calendar/Calendar.d.ts.map +1 -1
  5. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
  6. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +35 -40
  7. package/dist/calendar/utils/index.d.ts +2 -2
  8. package/dist/calendar/utils/index.d.ts.map +1 -1
  9. package/dist/calendar/utils/index.js +20 -4
  10. package/dist/date-time-button/DateTimeButton.d.ts +1 -2
  11. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  12. package/dist/date-time-button/DateTimeButton.js +2 -3
  13. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +2 -1
  14. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  15. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +4 -4
  16. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -2
  17. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
  18. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +27 -26
  19. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +2 -2
  20. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
  21. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +3 -3
  22. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  23. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
  24. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  25. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +2 -0
  26. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  27. package/dist/index.js +1 -0
  28. package/dist/layout/DropDown.d.ts +2 -1
  29. package/dist/layout/DropDown.d.ts.map +1 -1
  30. package/dist/modals/confirmation/ConfirmModal.d.ts +3 -1
  31. package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
  32. package/dist/modals/confirmation/ConfirmModal.js +172 -8
  33. package/dist/product-set/card/ProductSetCard.d.ts +6 -2
  34. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  35. package/dist/product-set/card/ProductSetCard.js +30 -11
  36. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +3 -2
  37. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  38. package/dist/product-set/control/DateAndRecurrenceInput.js +3 -1
  39. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  40. package/dist/product-set/control/DateInput.js +2 -2
  41. package/dist/product-set/control/ProductSetControl.d.ts +3 -3
  42. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  43. package/dist/product-set/control/ProductSetControl.js +4 -16
  44. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  45. package/dist/product-set/form/ProductCategoriesControl.js +48 -2
  46. package/dist/product-set/form/ProductSetForm.d.ts +6 -2
  47. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  48. package/dist/product-set/form/ProductSetForm.js +65 -5
  49. package/dist/product-set/form/ProductSetNameControl.d.ts +6 -0
  50. package/dist/product-set/form/ProductSetNameControl.d.ts.map +1 -0
  51. package/dist/product-set/form/ProductSetNameControl.js +35 -0
  52. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  53. package/dist/product-set/form/ProductZonesControl.js +0 -2
  54. package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
  55. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  56. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  57. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  58. package/dist/product-set/form/SubProductsControl.js +0 -3
  59. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  60. package/dist/product-set/form/VenueMapsControl.js +0 -3
  61. package/dist/product-set/form/index.d.ts +1 -0
  62. package/dist/product-set/form/index.d.ts.map +1 -1
  63. package/dist/product-set/utils/index.d.ts +7 -0
  64. package/dist/product-set/utils/index.d.ts.map +1 -1
  65. package/dist/product-set/utils/index.js +10 -1
  66. package/dist/provider/location-input/LocationInput.d.ts +4 -1
  67. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  68. package/dist/provider/location-input/LocationInput.js +41 -2
  69. package/dist/provider/location-input/LocationInputDescription.d.ts +4 -1
  70. package/dist/provider/location-input/LocationInputDescription.d.ts.map +1 -1
  71. package/dist/provider/location-input/LocationInputDescription.js +27 -12
  72. package/dist/provider/location-input/index.d.ts +1 -0
  73. package/dist/provider/location-input/index.d.ts.map +1 -1
  74. package/dist/provider/provider-form/ProviderForm.d.ts +3 -1
  75. package/dist/provider/provider-form/ProviderForm.d.ts.map +1 -1
  76. package/dist/provider/provider-form/ProviderForm.js +7 -3
  77. package/dist/provider/venue-form/VenueForm.d.ts +3 -1
  78. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  79. package/dist/provider/venue-form/VenueForm.js +7 -3
  80. package/dist/provider/working-hours-input/WorkingHoursInput.d.ts.map +1 -1
  81. package/dist/provider/working-hours-input/WorkingHoursInput.js +2 -2
  82. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  83. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +8 -14
  84. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +2 -1
  85. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  86. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +7 -13
  87. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +4 -1
  88. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  89. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +7 -3
  90. package/dist/recurring-date-picker-input/utils.d.ts +5 -0
  91. package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
  92. package/dist/recurring-date-picker-input/utils.js +83 -3
  93. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  94. package/dist/sales/booking/results/components/ResultCard.js +4 -7
  95. package/dist/sales/guest-profile/previous-bookings/PreviousBookings.js +1 -1
  96. package/dist/sales/manual-booking/formatDays.js +3 -3
  97. package/dist/sales/manual-booking/select-event/SelectEvent.d.ts.map +1 -1
  98. package/dist/sales/manual-booking/select-event/SelectEvent.js +3 -3
  99. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  100. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +2 -2
  101. package/dist/sales/notes/NotesTableRow.js +3 -4
  102. package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
  103. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  104. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  105. package/dist/snippet/snippet-template/preview/Preview.js +6 -0
  106. package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
  107. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  108. package/dist/sortable-tree/SortableTreeItem.js +10 -4
  109. package/dist/styles/auth/AccessDenied.scss +1 -1
  110. package/dist/styles/back-button/BackButton.scss +25 -24
  111. package/dist/styles/back-button/_index.scss +1 -1
  112. package/dist/styles/company-user-form/UserForm.scss +4 -7
  113. package/dist/styles/company-user-form/_index.scss +1 -1
  114. package/dist/styles/custom-fields/CreateSortableListItem.scss +2 -1
  115. package/dist/styles/custom-fields/_index.scss +1 -1
  116. package/dist/styles/customers/Filter.scss +5 -5
  117. package/dist/styles/events/EditEventModal.scss +1 -3
  118. package/dist/styles/events/EventVenueMap.scss +7 -7
  119. package/dist/styles/form/Input.scss +1 -1
  120. package/dist/styles/header/Header.scss +1 -1
  121. package/dist/styles/header/elements/CompanySelector.scss +2 -2
  122. package/dist/styles/iframe-events/Calendar.scss +0 -1
  123. package/dist/styles/iframe-events/CalendarSelect.scss +1 -1
  124. package/dist/styles/iframe-events/CategoryStepsForm.scss +6 -7
  125. package/dist/styles/iframe-events/Event.scss +2 -4
  126. package/dist/styles/iframe-events/EventForm.scss +54 -54
  127. package/dist/styles/iframe-events/EventNavigationFooter.scss +1 -0
  128. package/dist/styles/iframe-events/TicketDescription.scss +1 -1
  129. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  130. package/dist/styles/iframe-payments/PaymentForm.scss +1 -1
  131. package/dist/styles/layout/BackgroundVideoContainer.scss +2 -2
  132. package/dist/styles/notification/Notification.scss +1 -1
  133. package/dist/styles/order-items-table/OrderItemsTable.scss +1 -2
  134. package/dist/styles/product-set/CreateProductSetItem.scss +15 -13
  135. package/dist/styles/product-set/DateAndRecurrenceInput.scss +6 -8
  136. package/dist/styles/product-set/EditCategoryModal.scss +4 -4
  137. package/dist/styles/product-set/EditProductModal.scss +3 -3
  138. package/dist/styles/product-set/EditStepModal.scss +4 -4
  139. package/dist/styles/product-set/EditVenueMapSetModal.scss +6 -6
  140. package/dist/styles/product-set/ProductSetForm.scss +25 -2
  141. package/dist/styles/product-set/TutorialGifCard.scss +1 -1
  142. package/dist/styles/product-set/_index.scss +2 -2
  143. package/dist/styles/report/ReportCard.scss +1 -0
  144. package/dist/styles/report/_index.scss +1 -1
  145. package/dist/styles/resources-blocking/_index.scss +4 -0
  146. package/dist/styles/sales/BookingFilter.scss +2 -2
  147. package/dist/styles/sales/BookingResults.scss +1 -1
  148. package/dist/styles/sales/BookingTabs.scss +7 -5
  149. package/dist/styles/sales/Filters.scss +5 -4
  150. package/dist/styles/sales/GuestProfile.scss +170 -175
  151. package/dist/styles/sales/LifeTimeSales.scss +1 -1
  152. package/dist/styles/sales/ManualBooking.scss +4 -2
  153. package/dist/styles/snippet-templates/_snippetVariables.scss +63 -244
  154. package/dist/styles/sortable-field/SortableField.scss +16 -16
  155. package/dist/styles/sortable-field/_index.scss +1 -1
  156. package/dist/styles/sortable-tree/Item.scss +4 -4
  157. package/dist/styles/table/Table.scss +1 -1
  158. package/dist/styles/themes/bookedit/_variables.scss +10 -32
  159. package/dist/styles/themes/licklist/_variables.scss +1 -1
  160. package/dist/styles/tiptap-editor/TiptapEditor.scss +9 -10
  161. package/dist/styles/tiptap-editor/_index.scss +1 -1
  162. package/dist/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
  163. package/dist/styles/virtualized/_index.scss +1 -1
  164. package/dist/styles/zones/ZoneForm.scss +1 -0
  165. package/dist/styles/zones/ZoneRecurrencesControl.scss +6 -8
  166. package/dist/typeahead/Typeahead.d.ts +5 -1
  167. package/dist/typeahead/Typeahead.d.ts.map +1 -1
  168. package/dist/typeahead/Typeahead.js +9 -2
  169. package/dist/zone/form/ZoneForm.d.ts +3 -2
  170. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  171. package/dist/zone/form/ZoneForm.js +4 -2
  172. package/dist/zone/form/components/ZoneControl.d.ts +3 -2
  173. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  174. package/dist/zone/form/components/ZoneControl.js +5 -2
  175. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +5 -4
  176. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  177. package/dist/zone/form/components/ZoneRecurrencesControl.js +5 -2
  178. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  179. package/package.json +10 -10
  180. package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -1
  181. package/src/auth/Login/LoginComponent.tsx +1 -1
  182. package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -1
  183. package/src/calendar/Calendar.stories.tsx +0 -2
  184. package/src/calendar/Calendar.tsx +1 -4
  185. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +31 -28
  186. package/src/calendar/utils/index.ts +26 -4
  187. package/src/date-time-button/DateTimeButton.stories.tsx +0 -1
  188. package/src/date-time-button/DateTimeButton.tsx +1 -6
  189. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +3 -2
  190. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +35 -37
  191. package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +3 -3
  192. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
  193. package/src/header/elements/Elements.stories.tsx +1 -1
  194. package/src/help/popover/Popover.stories.tsx +1 -1
  195. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -3
  196. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -0
  197. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
  198. package/src/layout/DropDown.tsx +2 -1
  199. package/src/modals/confirmation/ConfirmModal.tsx +19 -3
  200. package/src/product-set/card/ProductSetCard.stories.tsx +3 -1
  201. package/src/product-set/card/ProductSetCard.tsx +47 -8
  202. package/src/product-set/control/DateAndRecurrenceInput.tsx +6 -4
  203. package/src/product-set/control/DateInput.tsx +2 -1
  204. package/src/product-set/control/ProductSetControl.tsx +4 -15
  205. package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +2 -2
  206. package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
  207. package/src/product-set/form/ProductSetForm.tsx +25 -3
  208. package/src/product-set/form/ProductSetNameControl.tsx +27 -0
  209. package/src/product-set/form/ProductZonesControl.tsx +4 -7
  210. package/src/product-set/form/SelectCategoryModal.stories.tsx +1 -1
  211. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  212. package/src/product-set/form/SubProductsControl.tsx +0 -3
  213. package/src/product-set/form/VenueMapsControl.tsx +0 -3
  214. package/src/product-set/form/index.ts +1 -0
  215. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +5 -5
  216. package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
  217. package/src/product-set/product/quantity/ProductQuantity.stories.tsx +1 -1
  218. package/src/product-set/product-zone/ProductZoneControl.tsx +9 -9
  219. package/src/product-set/utils/index.ts +11 -0
  220. package/src/provider/location-input/LocationInput.tsx +36 -1
  221. package/src/provider/location-input/LocationInputDescription.tsx +23 -11
  222. package/src/provider/location-input/index.ts +1 -0
  223. package/src/provider/provider-form/ProviderForm.tsx +7 -2
  224. package/src/provider/venue-form/VenueForm.tsx +5 -2
  225. package/src/provider/working-hours-input/WorkingHoursInput.tsx +15 -6
  226. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +11 -30
  227. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +8 -22
  228. package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +11 -4
  229. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +17 -3
  230. package/src/recurring-date-picker-input/utils.ts +97 -1
  231. package/src/sales/booking/results/components/ResultCard.tsx +4 -10
  232. package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +1 -1
  233. package/src/sales/manual-booking/formatDays.ts +3 -3
  234. package/src/sales/manual-booking/select-event/SelectEvent.tsx +2 -2
  235. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +2 -2
  236. package/src/sales/notes/NotesTableRow.tsx +3 -3
  237. package/src/setting/admin/AdminSetting.stories.tsx +1 -0
  238. package/src/setting/admin/AdminSettingForm.tsx +2 -2
  239. package/src/setting/system/SystemSetting.stories.tsx +1 -1
  240. package/src/snippet/snippet-template/preview/Preview.tsx +6 -0
  241. package/src/sortable-tree/SortableTreeItem.tsx +6 -0
  242. package/src/styles/auth/AccessDenied.scss +1 -1
  243. package/src/styles/back-button/BackButton.scss +25 -24
  244. package/src/styles/back-button/_index.scss +1 -1
  245. package/src/styles/company-user-form/UserForm.scss +4 -7
  246. package/src/styles/company-user-form/_index.scss +1 -1
  247. package/src/styles/custom-fields/CreateSortableListItem.scss +2 -1
  248. package/src/styles/custom-fields/_index.scss +1 -1
  249. package/src/styles/customers/Filter.scss +5 -5
  250. package/src/styles/events/EditEventModal.scss +1 -3
  251. package/src/styles/events/EventVenueMap.scss +7 -7
  252. package/src/styles/form/Input.scss +1 -1
  253. package/src/styles/header/Header.scss +1 -1
  254. package/src/styles/header/elements/CompanySelector.scss +2 -2
  255. package/src/styles/iframe-events/Calendar.scss +0 -1
  256. package/src/styles/iframe-events/CalendarSelect.scss +1 -1
  257. package/src/styles/iframe-events/CategoryStepsForm.scss +6 -7
  258. package/src/styles/iframe-events/Event.scss +2 -4
  259. package/src/styles/iframe-events/EventForm.scss +54 -54
  260. package/src/styles/iframe-events/EventNavigationFooter.scss +1 -0
  261. package/src/styles/iframe-events/TicketDescription.scss +1 -1
  262. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  263. package/src/styles/iframe-payments/PaymentForm.scss +1 -1
  264. package/src/styles/layout/BackgroundVideoContainer.scss +2 -2
  265. package/src/styles/notification/Notification.scss +1 -1
  266. package/src/styles/order-items-table/OrderItemsTable.scss +1 -2
  267. package/src/styles/product-set/CreateProductSetItem.scss +15 -13
  268. package/src/styles/product-set/DateAndRecurrenceInput.scss +6 -8
  269. package/src/styles/product-set/EditCategoryModal.scss +4 -4
  270. package/src/styles/product-set/EditProductModal.scss +3 -3
  271. package/src/styles/product-set/EditStepModal.scss +4 -4
  272. package/src/styles/product-set/EditVenueMapSetModal.scss +6 -6
  273. package/src/styles/product-set/ProductSetForm.scss +25 -2
  274. package/src/styles/product-set/TutorialGifCard.scss +1 -1
  275. package/src/styles/product-set/_index.scss +2 -2
  276. package/src/styles/report/ReportCard.scss +1 -0
  277. package/src/styles/report/_index.scss +1 -1
  278. package/src/styles/resources-blocking/_index.scss +4 -0
  279. package/src/styles/sales/BookingFilter.scss +2 -2
  280. package/src/styles/sales/BookingResults.scss +1 -1
  281. package/src/styles/sales/BookingTabs.scss +7 -5
  282. package/src/styles/sales/Filters.scss +5 -4
  283. package/src/styles/sales/GuestProfile.scss +170 -175
  284. package/src/styles/sales/LifeTimeSales.scss +1 -1
  285. package/src/styles/sales/ManualBooking.scss +4 -2
  286. package/src/styles/snippet-templates/_snippetVariables.scss +63 -244
  287. package/src/styles/sortable-field/SortableField.scss +16 -16
  288. package/src/styles/sortable-field/_index.scss +1 -1
  289. package/src/styles/sortable-tree/Item.scss +4 -4
  290. package/src/styles/table/Table.scss +1 -1
  291. package/src/styles/themes/bookedit/_variables.scss +10 -32
  292. package/src/styles/themes/licklist/_variables.scss +1 -1
  293. package/src/styles/tiptap-editor/TiptapEditor.scss +9 -10
  294. package/src/styles/tiptap-editor/_index.scss +1 -1
  295. package/src/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
  296. package/src/styles/virtualized/_index.scss +1 -1
  297. package/src/styles/zones/ZoneForm.scss +1 -0
  298. package/src/styles/zones/ZoneRecurrencesControl.scss +6 -8
  299. package/src/tiptap-editor/TipTapEditor.stories.tsx +6 -4
  300. package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +5 -2
  301. package/src/typeahead/Typeahead.tsx +15 -1
  302. package/src/zone/form/ZoneForm.tsx +9 -2
  303. package/src/zone/form/components/ZoneControl.tsx +8 -3
  304. package/src/zone/form/components/ZoneRecurrencesControl.tsx +10 -5
  305. package/src/zone/form/utils/dates.ts +9 -10
  306. package/yarn.lock +835 -857
  307. package/dist/assets/iframe/selectArrow.svg.js +0 -17
@@ -8,6 +8,8 @@ export type ConfirmModalTypes = (typeof ConfirmModalType)[keyof typeof ConfirmMo
8
8
  export interface ConfirmModalProps {
9
9
  type?: ConfirmModalTypes;
10
10
  children?: (confirm: (action: ConfirmAction) => void) => ReactNode;
11
+ confirmationHandler?: () => Promise<boolean | undefined>;
12
+ disabledButtons?: boolean;
11
13
  title?: string;
12
14
  content?: string | ReactNode;
13
15
  onClose?: () => void;
@@ -16,5 +18,5 @@ export interface ConfirmModalProps {
16
18
  export declare const CONFIRM_MODAL_ACTION_DECLINE = "confirm-modal-decline";
17
19
  export declare const CONFIRM_MODAL_ACTION_CONFIRM = "confirm-modal-confirm";
18
20
  export declare const CONFIRM_MODAL_ACTIONS: readonly string[];
19
- export declare function ConfirmModal({ type, children, onClose, title, content, hideButtons, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function ConfirmModal({ type, children, onClose, confirmationHandler, title, disabledButtons, content, hideButtons, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
20
22
  //# sourceMappingURL=ConfirmModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/modals/confirmation/ConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAUpD,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AACvC,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,KAAK,SAAS,CAAC;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AACpE,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AACpE,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAGlD,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,IAAgB,EAChB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,EACP,WAAmB,GACpB,EAAE,iBAAiB,2CAoGnB"}
1
+ {"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/modals/confirmation/ConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAUpD,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AACvC,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,KAAK,SAAS,CAAC;IAEnE,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AACpE,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AACpE,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAGlD,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,IAAgB,EAChB,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,KAAK,EACL,eAAe,EACf,OAAO,EACP,WAAmB,GACpB,EAAE,iBAAiB,2CA+GnB"}
@@ -17,6 +17,35 @@ function _array_like_to_array(arr, len) {
17
17
  function _array_with_holes(arr) {
18
18
  if (Array.isArray(arr)) return arr;
19
19
  }
20
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
21
+ try {
22
+ var info = gen[key](arg);
23
+ var value = info.value;
24
+ } catch (error) {
25
+ reject(error);
26
+ return;
27
+ }
28
+ if (info.done) {
29
+ resolve(value);
30
+ } else {
31
+ Promise.resolve(value).then(_next, _throw);
32
+ }
33
+ }
34
+ function _async_to_generator(fn) {
35
+ return function() {
36
+ var self = this, args = arguments;
37
+ return new Promise(function(resolve, reject) {
38
+ var gen = fn.apply(self, args);
39
+ function _next(value) {
40
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
41
+ }
42
+ function _throw(err) {
43
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
44
+ }
45
+ _next(undefined);
46
+ });
47
+ };
48
+ }
20
49
  function _iterable_to_array_limit(arr, i) {
21
50
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
22
51
  if (_i == null) return;
@@ -55,6 +84,101 @@ function _unsupported_iterable_to_array(o, minLen) {
55
84
  if (n === "Map" || n === "Set") return Array.from(n);
56
85
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
57
86
  }
87
+ function _ts_generator(thisArg, body) {
88
+ var f, y, t, g, _ = {
89
+ label: 0,
90
+ sent: function() {
91
+ if (t[0] & 1) throw t[1];
92
+ return t[1];
93
+ },
94
+ trys: [],
95
+ ops: []
96
+ };
97
+ return g = {
98
+ next: verb(0),
99
+ "throw": verb(1),
100
+ "return": verb(2)
101
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
102
+ return this;
103
+ }), g;
104
+ function verb(n) {
105
+ return function(v) {
106
+ return step([
107
+ n,
108
+ v
109
+ ]);
110
+ };
111
+ }
112
+ function step(op) {
113
+ if (f) throw new TypeError("Generator is already executing.");
114
+ while(_)try {
115
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
116
+ if (y = 0, t) op = [
117
+ op[0] & 2,
118
+ t.value
119
+ ];
120
+ switch(op[0]){
121
+ case 0:
122
+ case 1:
123
+ t = op;
124
+ break;
125
+ case 4:
126
+ _.label++;
127
+ return {
128
+ value: op[1],
129
+ done: false
130
+ };
131
+ case 5:
132
+ _.label++;
133
+ y = op[1];
134
+ op = [
135
+ 0
136
+ ];
137
+ continue;
138
+ case 7:
139
+ op = _.ops.pop();
140
+ _.trys.pop();
141
+ continue;
142
+ default:
143
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
144
+ _ = 0;
145
+ continue;
146
+ }
147
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
148
+ _.label = op[1];
149
+ break;
150
+ }
151
+ if (op[0] === 6 && _.label < t[1]) {
152
+ _.label = t[1];
153
+ t = op;
154
+ break;
155
+ }
156
+ if (t && _.label < t[2]) {
157
+ _.label = t[2];
158
+ _.ops.push(op);
159
+ break;
160
+ }
161
+ if (t[2]) _.ops.pop();
162
+ _.trys.pop();
163
+ continue;
164
+ }
165
+ op = body.call(thisArg, _);
166
+ } catch (e) {
167
+ op = [
168
+ 6,
169
+ e
170
+ ];
171
+ y = 0;
172
+ } finally{
173
+ f = t = 0;
174
+ }
175
+ if (op[0] & 5) throw op[1];
176
+ return {
177
+ value: op[0] ? op[1] : void 0,
178
+ done: true
179
+ };
180
+ }
181
+ }
58
182
  var ConfirmModalType = {
59
183
  remove: "remove",
60
184
  default: "default"
@@ -66,7 +190,7 @@ var CONFIRM_MODAL_ACTIONS = [
66
190
  CONFIRM_MODAL_ACTION_CONFIRM
67
191
  ];
68
192
  function ConfirmModal(param) {
69
- var _param_type = param.type, type = _param_type === void 0 ? "default" : _param_type, children = param.children, onClose = param.onClose, title = param.title, content = param.content, _param_hideButtons = param.hideButtons, hideButtons = _param_hideButtons === void 0 ? false : _param_hideButtons;
193
+ var _param_type = param.type, type = _param_type === void 0 ? "default" : _param_type, children = param.children, onClose = param.onClose, confirmationHandler = param.confirmationHandler, title = param.title, disabledButtons = param.disabledButtons, content = param.content, _param_hideButtons = param.hideButtons, hideButtons = _param_hideButtons === void 0 ? false : _param_hideButtons;
70
194
  var t = useTranslation("Design").t;
71
195
  var actionRef = useRef();
72
196
  var _useState = _sliced_to_array(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
@@ -76,14 +200,49 @@ function ConfirmModal(param) {
76
200
  return true;
77
201
  });
78
202
  };
79
- var handleConfirmation = function(e) {
80
- e.stopPropagation();
81
- if (!actionRef.current) return;
82
- actionRef.current();
83
- setIsOpen(function() {
84
- return false;
203
+ var handleConfirmation = function() {
204
+ var _ref = _async_to_generator(function(e) {
205
+ var res;
206
+ return _ts_generator(this, function(_state) {
207
+ switch(_state.label){
208
+ case 0:
209
+ e.stopPropagation();
210
+ if (!actionRef.current && !confirmationHandler) return [
211
+ 2
212
+ ];
213
+ if (!confirmationHandler) return [
214
+ 3,
215
+ 2
216
+ ];
217
+ return [
218
+ 4,
219
+ confirmationHandler()
220
+ ];
221
+ case 1:
222
+ res = _state.sent();
223
+ if (res) {
224
+ setIsOpen(function() {
225
+ return false;
226
+ });
227
+ }
228
+ return [
229
+ 2
230
+ ];
231
+ case 2:
232
+ actionRef.current();
233
+ setIsOpen(function() {
234
+ return false;
235
+ });
236
+ return [
237
+ 2
238
+ ];
239
+ }
240
+ });
85
241
  });
86
- };
242
+ return function handleConfirmation(e) {
243
+ return _ref.apply(this, arguments);
244
+ };
245
+ }();
87
246
  var handleClose = function(e) {
88
247
  e.stopPropagation();
89
248
  setIsOpen(function() {
@@ -113,6 +272,7 @@ function ConfirmModal(param) {
113
272
  /*#__PURE__*/ jsx(Button, {
114
273
  variant: "danger",
115
274
  className: "btn-sm rounded",
275
+ disabled: disabledButtons,
116
276
  onClick: handleClose,
117
277
  "data-id": CONFIRM_MODAL_ACTION_DECLINE,
118
278
  children: /*#__PURE__*/ jsx(FaTimes, {
@@ -133,11 +293,13 @@ function ConfirmModal(param) {
133
293
  variant: "outline",
134
294
  className: "cancel-button",
135
295
  onClick: handleClose,
296
+ disabled: disabledButtons,
136
297
  "data-id": CONFIRM_MODAL_ACTION_DECLINE,
137
298
  children: t("cancel")
138
299
  }),
139
300
  /*#__PURE__*/ jsx(Button, {
140
301
  variant: "danger",
302
+ disabled: disabledButtons,
141
303
  onClick: handleConfirmation,
142
304
  "data-id": CONFIRM_MODAL_ACTION_CONFIRM,
143
305
  children: t("remove")
@@ -147,12 +309,14 @@ function ConfirmModal(param) {
147
309
  children: [
148
310
  /*#__PURE__*/ jsx(Button, {
149
311
  variant: "danger",
312
+ disabled: disabledButtons,
150
313
  onClick: handleClose,
151
314
  "data-id": CONFIRM_MODAL_ACTION_DECLINE,
152
315
  children: t("decline")
153
316
  }),
154
317
  /*#__PURE__*/ jsx(Button, {
155
318
  variant: "success",
319
+ disabled: disabledButtons,
156
320
  onClick: handleConfirmation,
157
321
  "data-id": CONFIRM_MODAL_ACTION_CONFIRM,
158
322
  children: t("confirm")
@@ -3,10 +3,14 @@ export interface ProductSetCardProps extends HasPermissionProp {
3
3
  name: string;
4
4
  rrule?: string;
5
5
  href: string;
6
- onCopy: () => void;
6
+ duplicateProductSetName: string;
7
+ onChangeDuplicateProductSetName: (value: string) => void;
8
+ onCopy: () => Promise<boolean | undefined>;
7
9
  onRemove: () => void;
10
+ isLoading?: boolean;
8
11
  className?: string;
9
12
  override?: number;
13
+ duplicateProductSetError?: string;
10
14
  }
11
- export declare function ProductSetCard({ name, rrule, href, onCopy, onRemove, className, hasPermission, override, }: ProductSetCardProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function ProductSetCard({ name, rrule, href, onCopy, onRemove, onChangeDuplicateProductSetName, duplicateProductSetName, duplicateProductSetError, isLoading, className, hasPermission, override, }: ProductSetCardProps): import("react/jsx-runtime").JSX.Element;
12
16
  //# sourceMappingURL=ProductSetCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSetCard.d.ts","sourceRoot":"","sources":["../../../src/product-set/card/ProductSetCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAMvF,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,SAAc,EACd,aAAoB,EACpB,QAAY,GACb,EAAE,mBAAmB,2CAyGrB"}
1
+ {"version":3,"file":"ProductSetCard.d.ts","sourceRoot":"","sources":["../../../src/product-set/card/ProductSetCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAOvF,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB,EAAE,MAAM,CAAC;IAChC,+BAA+B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,+BAA+B,EAC/B,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,SAAc,EACd,aAAoB,EACpB,QAAY,GACb,EAAE,mBAAmB,2CAuIrB"}
@@ -9,6 +9,7 @@ import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
9
9
  import { FaEye, FaTrashAlt, FaEllipsisH } from 'react-icons/fa';
10
10
  import { ConfirmModal } from '../../modals/confirmation/ConfirmModal.js';
11
11
  import { MenuButton } from '../../table/MenuButton.js';
12
+ import { ProductSetNameControl } from '../form/ProductSetNameControl.js';
12
13
 
13
14
  function _array_like_to_array(arr, len) {
14
15
  if (len == null || len > arr.length) len = arr.length;
@@ -57,21 +58,20 @@ function _unsupported_iterable_to_array(o, minLen) {
57
58
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
58
59
  }
59
60
  function ProductSetCard(param) {
60
- var name = param.name, rrule = param.rrule, href = param.href, onCopy = param.onCopy, onRemove = param.onRemove, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, _param_override = param.override, override = _param_override === void 0 ? 0 : _param_override;
61
+ var name = param.name, rrule = param.rrule, href = param.href, onCopy = param.onCopy, onRemove = param.onRemove, onChangeDuplicateProductSetName = param.onChangeDuplicateProductSetName, duplicateProductSetName = param.duplicateProductSetName, duplicateProductSetError = param.duplicateProductSetError, isLoading = param.isLoading, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, _param_override = param.override, override = _param_override === void 0 ? 0 : _param_override;
61
62
  var t = useTranslation("Design").t;
62
63
  var popoverId = useId();
63
64
  var productSetCardClasses = "product-set-card ".concat(className);
64
65
  var _useState = _sliced_to_array(useState(false), 2), isOverlayVisibile = _useState[0], setIsOverlayVisible = _useState[1];
65
- return /*#__PURE__*/ jsx("div", {
66
+ var onCardClick = function() {
67
+ RouteService.redirectTo(href);
68
+ };
69
+ return(// eslint-disable-next-line jsx-a11y/click-events-have-key-events
70
+ /*#__PURE__*/ jsx("div", {
66
71
  role: "button",
67
72
  tabIndex: 0,
68
73
  className: "border-0 product-set-card-wrapper w-100 pb-0",
69
- onClick: function() {
70
- return RouteService.redirectTo(href);
71
- },
72
- onKeyUp: function() {
73
- return RouteService.redirectTo(href);
74
- },
74
+ onClick: onCardClick,
75
75
  children: /*#__PURE__*/ jsxs("div", {
76
76
  className: productSetCardClasses,
77
77
  children: [
@@ -83,7 +83,6 @@ function ProductSetCard(param) {
83
83
  /*#__PURE__*/ jsxs("div", {
84
84
  children: [
85
85
  name,
86
- " ",
87
86
  rrule && "(".concat(RRule.fromString(rrule).toText(), ")")
88
87
  ]
89
88
  }),
@@ -120,12 +119,27 @@ function ProductSetCard(param) {
120
119
  /*#__PURE__*/ jsx(ListGroup.Item, {
121
120
  action: true,
122
121
  as: "div",
122
+ role: "button",
123
+ tabIndex: 0,
124
+ onClick: function(e) {
125
+ return e.stopPropagation();
126
+ },
123
127
  children: Boolean(onCopy) && /*#__PURE__*/ jsx(ConfirmModal, {
128
+ // confirm function memoize the callback function and it leads to bugs
129
+ confirmationHandler: onCopy,
130
+ disabledButtons: isLoading,
131
+ content: /*#__PURE__*/ jsx(ProductSetNameControl, {
132
+ value: duplicateProductSetName,
133
+ onChange: onChangeDuplicateProductSetName,
134
+ error: duplicateProductSetError
135
+ }),
124
136
  children: function(confirm) {
125
137
  return /*#__PURE__*/ jsx(MenuButton, {
126
138
  onClick: function() {
127
139
  setIsOverlayVisible(false);
128
- confirm(onCopy);
140
+ onChangeDuplicateProductSetName(name);
141
+ // confirm function memoize the callback function and it leads to bugs
142
+ confirm(function() {});
129
143
  },
130
144
  name: t("duplicate"),
131
145
  className: "product-set-card-menu-item-text"
@@ -137,6 +151,11 @@ function ProductSetCard(param) {
137
151
  action: true,
138
152
  className: "text-danger",
139
153
  as: "div",
154
+ role: "button",
155
+ tabIndex: 0,
156
+ onClick: function(e) {
157
+ return e.stopPropagation();
158
+ },
140
159
  children: Boolean(onRemove) && /*#__PURE__*/ jsx(ConfirmModal, {
141
160
  children: function(confirm) {
142
161
  return /*#__PURE__*/ jsx(MenuButton, {
@@ -172,7 +191,7 @@ function ProductSetCard(param) {
172
191
  })
173
192
  ]
174
193
  })
175
- });
194
+ }));
176
195
  }
177
196
 
178
197
  export { ProductSetCard };
@@ -6,11 +6,12 @@ export interface DateAndRecurrenceInputValues {
6
6
  }
7
7
  interface DateAndRecurrenceInputProps {
8
8
  isEventEditProductSet?: boolean;
9
- workHours?: WorkHour[];
9
+ workHours: WorkHour[] | undefined;
10
10
  providerHasBookingManagement: boolean;
11
11
  isLoading?: boolean;
12
+ timeZone: string;
12
13
  }
13
- export declare const DateAndRecurrenceInput: ({ isEventEditProductSet, providerHasBookingManagement, workHours, isLoading, }: DateAndRecurrenceInputProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const DateAndRecurrenceInput: ({ isEventEditProductSet, providerHasBookingManagement, workHours, isLoading, timeZone, }: DateAndRecurrenceInputProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export declare const sameWidthPopperModifier: Modifier<"sameWidth", Record<string, unknown>>;
15
16
  export {};
16
17
  //# sourceMappingURL=DateAndRecurrenceInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateAndRecurrenceInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateAndRecurrenceInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAuB7G,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,mFAKhC,2BAA2B,4CA8Q7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
1
+ {"version":3,"file":"DateAndRecurrenceInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateAndRecurrenceInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAqB7G,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,sBAAsB,6FAMhC,2BAA2B,4CAgR7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
@@ -215,7 +215,7 @@ function _ts_generator(thisArg, body) {
215
215
  }
216
216
  }
217
217
  var DateAndRecurrenceInput = function(param) {
218
- var isEventEditProductSet = param.isEventEditProductSet, providerHasBookingManagement = param.providerHasBookingManagement, workHours = param.workHours, isLoading = param.isLoading;
218
+ var isEventEditProductSet = param.isEventEditProductSet, providerHasBookingManagement = param.providerHasBookingManagement, workHours = param.workHours, isLoading = param.isLoading, timeZone = param.timeZone;
219
219
  var _errors_menuRecurrences__availableTimes, _errors_menuRecurrences_, _errors_menuRecurrences, _errors_menuRecurrences1;
220
220
  var _useFormContext = useFormContext(), control = _useFormContext.control, register = _useFormContext.register, errors = _useFormContext.formState.errors, getValues = _useFormContext.getValues, setValue = _useFormContext.setValue, clearErrors = _useFormContext.clearErrors;
221
221
  var _useState = _sliced_to_array(useState([]), 2), availableTimes = _useState[0], setAvailableTimes = _useState[1];
@@ -387,6 +387,8 @@ var DateAndRecurrenceInput = function(param) {
387
387
  defaultValues: editState.values,
388
388
  onChange: handleRecurringDateChange,
389
389
  onDelete: handleDelete,
390
+ workHours: workHours,
391
+ timeZone: timeZone,
390
392
  children: providerHasBookingManagement && /*#__PURE__*/ jsx(AvailableTimesControl, {
391
393
  workHours: workHours,
392
394
  isLoading: isLoading,
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAG7G,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAiBtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,mFAKnB,2BAA2B,4CAsP7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
1
+ {"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAG7G,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAiBtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,mFAKnB,2BAA2B,4CAuP7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
@@ -400,13 +400,13 @@ var DateInput = function(param) {
400
400
  className: "product-set-recurrences",
401
401
  children: [
402
402
  fields.map(function(menuRecurrence, index) {
403
- var _errors_menuRecurrences__availableTimes, _errors_menuRecurrences_, _errors_menuRecurrences;
403
+ var _errors_menuRecurrences__availableTimes, _errors_menuRecurrences_, _errors_menuRecurrences, _errors_menuRecurrences_1, _errors_menuRecurrences1;
404
404
  return /*#__PURE__*/ jsx(ProductSetRecurrenceOverridesControl, {
405
405
  menuRecurrence: menuRecurrence,
406
406
  onEdit: function() {
407
407
  return handleOnEdit(menuRecurrence, index);
408
408
  },
409
- errorMessage: errors === null || errors === void 0 ? void 0 : (_errors_menuRecurrences = errors.menuRecurrences) === null || _errors_menuRecurrences === void 0 ? void 0 : (_errors_menuRecurrences_ = _errors_menuRecurrences["".concat(index)]) === null || _errors_menuRecurrences_ === void 0 ? void 0 : (_errors_menuRecurrences__availableTimes = _errors_menuRecurrences_.availableTimes) === null || _errors_menuRecurrences__availableTimes === void 0 ? void 0 : _errors_menuRecurrences__availableTimes.message
409
+ errorMessage: (errors === null || errors === void 0 ? void 0 : (_errors_menuRecurrences = errors.menuRecurrences) === null || _errors_menuRecurrences === void 0 ? void 0 : (_errors_menuRecurrences_ = _errors_menuRecurrences["".concat(index)]) === null || _errors_menuRecurrences_ === void 0 ? void 0 : (_errors_menuRecurrences__availableTimes = _errors_menuRecurrences_.availableTimes) === null || _errors_menuRecurrences__availableTimes === void 0 ? void 0 : _errors_menuRecurrences__availableTimes.message) || (errors === null || errors === void 0 ? void 0 : (_errors_menuRecurrences1 = errors.menuRecurrences) === null || _errors_menuRecurrences1 === void 0 ? void 0 : (_errors_menuRecurrences_1 = _errors_menuRecurrences1["".concat(index)]) === null || _errors_menuRecurrences_1 === void 0 ? void 0 : _errors_menuRecurrences_1.message)
410
410
  }, menuRecurrence._id);
411
411
  }),
412
412
  fields.length < MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE && /*#__PURE__*/ jsxs("div", {
@@ -41,11 +41,11 @@ export interface ProductSetControlProps {
41
41
  fieldSets?: FieldSet[];
42
42
  showEmailTemplate?: boolean;
43
43
  showSmsTemplate?: boolean;
44
- workHours?: WorkHour[];
44
+ workHours: WorkHour[] | undefined;
45
45
  providerHasBookingManagement?: boolean;
46
46
  isOverrides?: boolean;
47
- occurrenceStartAtDate?: string;
48
47
  isCreateNewOverrides?: boolean;
48
+ timeZone: string;
49
49
  }
50
- export declare function ProductSetControl({ companyName, isLoading, fee, fieldSets, emailTemplates, smsTemplates, isEventEditProductSet, isCreateAction, showEmailTemplate, showSmsTemplate, workHours, providerHasBookingManagement, isOverrides, occurrenceStartAtDate, isCreateNewOverrides, }: ProductSetControlProps): import("react/jsx-runtime").JSX.Element;
50
+ export declare function ProductSetControl({ companyName, isLoading, fee, fieldSets, emailTemplates, smsTemplates, isEventEditProductSet, isCreateAction, showEmailTemplate, showSmsTemplate, workHours, providerHasBookingManagement, isOverrides, isCreateNewOverrides, timeZone, }: ProductSetControlProps): import("react/jsx-runtime").JSX.Element;
51
51
  //# sourceMappingURL=ProductSetControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,4BAAoC,EACpC,WAAmB,EACnB,qBAAqB,EACrB,oBAA4B,GAC7B,EAAE,sBAAsB,2CAmUxB"}
1
+ {"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"AAIA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,4BAAoC,EACpC,WAAmB,EACnB,oBAA4B,EAC5B,QAAQ,GACT,EAAE,sBAAsB,2CA2TxB"}
@@ -1,12 +1,9 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useEffect } from 'react';
3
2
  import { Row, Col, Form } from 'react-bootstrap';
4
3
  import { useFormContext, Controller } from 'react-hook-form';
5
4
  import { useTranslation } from 'react-i18next';
6
5
  import clsx from 'clsx';
7
- import { DateTime } from 'luxon';
8
6
  import { OPERATIONAL_COST_PROVIDER, OPERATIONAL_COST_CUSTOMER, RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY, RELY_ON_PEOPLE_PRODUCT_QUANTITY, RELY_ON_PEOPLE_QUANTITY, OPERATIONAL_COST_TYPES, RELY_ON_PEOPLE_TYPES } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper';
9
- import { DATE_MONTH_LOCALE_FORMAT } from '@licklist/core/dist/Config';
10
7
  import { useId } from '@react-aria/utils';
11
8
  import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
12
9
  import { ruleForUrlWithProtocol } from '@licklist/plugins/dist/validation/Rules/urlRule';
@@ -76,16 +73,15 @@ var OPERATIONAL_COST_TITLES = (_obj = {}, _define_property(_obj, OPERATIONAL_COS
76
73
  var _obj1;
77
74
  var RELY_ON_PEOPLE_TYPE_TITLES = (_obj1 = {}, _define_property(_obj1, RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY, "peopleProductCapacityQuantity"), _define_property(_obj1, RELY_ON_PEOPLE_PRODUCT_QUANTITY, "peopleProductQuantity"), _define_property(_obj1, RELY_ON_PEOPLE_QUANTITY, "peopleQuantity"), _obj1);
78
75
  function ProductSetControl(param) {
79
- var companyName = param.companyName, isLoading = param.isLoading, _param_fee = param.fee, fee = _param_fee === void 0 ? "5%" : _param_fee, _param_fieldSets = param.fieldSets, fieldSets = _param_fieldSets === void 0 ? [] : _param_fieldSets, _param_emailTemplates = param.emailTemplates, emailTemplates = _param_emailTemplates === void 0 ? [] : _param_emailTemplates, _param_smsTemplates = param.smsTemplates, smsTemplates = _param_smsTemplates === void 0 ? [] : _param_smsTemplates, isEventEditProductSet = param.isEventEditProductSet, isCreateAction = param.isCreateAction, showEmailTemplate = param.showEmailTemplate, showSmsTemplate = param.showSmsTemplate, workHours = param.workHours, _param_providerHasBookingManagement = param.providerHasBookingManagement, providerHasBookingManagement = _param_providerHasBookingManagement === void 0 ? false : _param_providerHasBookingManagement, _param_isOverrides = param.isOverrides, isOverrides = _param_isOverrides === void 0 ? false : _param_isOverrides, occurrenceStartAtDate = param.occurrenceStartAtDate, _param_isCreateNewOverrides = param.isCreateNewOverrides, isCreateNewOverrides = _param_isCreateNewOverrides === void 0 ? false : _param_isCreateNewOverrides;
76
+ var companyName = param.companyName, isLoading = param.isLoading, _param_fee = param.fee, fee = _param_fee === void 0 ? "5%" : _param_fee, _param_fieldSets = param.fieldSets, fieldSets = _param_fieldSets === void 0 ? [] : _param_fieldSets, _param_emailTemplates = param.emailTemplates, emailTemplates = _param_emailTemplates === void 0 ? [] : _param_emailTemplates, _param_smsTemplates = param.smsTemplates, smsTemplates = _param_smsTemplates === void 0 ? [] : _param_smsTemplates, isEventEditProductSet = param.isEventEditProductSet, isCreateAction = param.isCreateAction, showEmailTemplate = param.showEmailTemplate, showSmsTemplate = param.showSmsTemplate, workHours = param.workHours, _param_providerHasBookingManagement = param.providerHasBookingManagement, providerHasBookingManagement = _param_providerHasBookingManagement === void 0 ? false : _param_providerHasBookingManagement, _param_isOverrides = param.isOverrides, isOverrides = _param_isOverrides === void 0 ? false : _param_isOverrides, _param_isCreateNewOverrides = param.isCreateNewOverrides, isCreateNewOverrides = _param_isCreateNewOverrides === void 0 ? false : _param_isCreateNewOverrides, timeZone = param.timeZone;
80
77
  var _errors_name;
81
78
  var t = useTranslation([
82
79
  "Design",
83
80
  "Validation",
84
81
  "Notification"
85
82
  ]).t;
86
- var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors, watch = _useFormContext.watch, setError = _useFormContext.setError, setValue = _useFormContext.setValue, clearErrors = _useFormContext.clearErrors;
83
+ var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors, watch = _useFormContext.watch, setError = _useFormContext.setError, clearErrors = _useFormContext.clearErrors;
87
84
  var steps = watch("steps");
88
- var productSetName = watch("name");
89
85
  var nameId = useId();
90
86
  var termsAndConditionsId = useId();
91
87
  var relyOnPeopleTypeId = useId();
@@ -98,15 +94,6 @@ function ProductSetControl(param) {
98
94
  return checkIfZoneCategory(category === null || category === void 0 ? void 0 : category.type);
99
95
  });
100
96
  });
101
- useEffect(function() {
102
- if (!occurrenceStartAtDate) return;
103
- var eventStartDate = DateTime.fromISO(occurrenceStartAtDate);
104
- var eventStart = eventStartDate.toFormat(DATE_MONTH_LOCALE_FORMAT);
105
- setValue("name", "".concat(productSetName, " (").concat(eventStart, ")"));
106
- }, [
107
- setValue,
108
- occurrenceStartAtDate
109
- ]);
110
97
  return /*#__PURE__*/ jsxs(Row, {
111
98
  className: "product-set-form ".concat(isEventEditProductSet && "event-edit-product-set"),
112
99
  children: [
@@ -163,7 +150,8 @@ function ProductSetControl(param) {
163
150
  isEventEditProductSet: isEventEditProductSet,
164
151
  workHours: isZoneAdded ? workHours : undefined,
165
152
  isLoading: isLoading,
166
- providerHasBookingManagement: providerHasBookingManagement
153
+ providerHasBookingManagement: providerHasBookingManagement,
154
+ timeZone: timeZone
167
155
  })
168
156
  }),
169
157
  /*#__PURE__*/ jsx("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"AAYA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAC;AAQ1E,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASvE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AA0BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,6BAA6B,2CAoT/B;AAED,eAAO,MAAM,cAAc,iBACX,YAAY,SACnB,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAczC,CAAC"}
1
+ {"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"AAaA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAC;AAQ1E,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAoCvE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AA0BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,6BAA6B,2CA4T/B;AAED,eAAO,MAAM,cAAc,iBACX,YAAY,SACnB,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAczC,CAAC"}
@@ -1,9 +1,10 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useContext, useState, useEffect } from 'react';
3
3
  import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
4
4
  import { uniqueId } from 'lodash';
5
5
  import { Badge } from 'react-bootstrap';
6
6
  import { useFormContext, useFieldArray, useWatch, Controller } from 'react-hook-form';
7
+ import { FaTicketAlt, FaCalendar, FaBars, FaBowlingBall } from 'react-icons/fa';
7
8
  import { useTranslation } from 'react-i18next';
8
9
  import { useSensor, MouseSensor } from '@dnd-kit/core';
9
10
  import { CATEGORY_TYPE_GAME, CATEGORY_TYPE_FIXED_DURATION, QUANTITY_TYPE_STANDARD, CATEGORY_TYPE_TICKETS } from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
@@ -13,7 +14,7 @@ import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js'
13
14
  import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
14
15
  import { ProductCategoryControl } from '../product-category/ProductCategoryControl.js';
15
16
  import { ProductsControl } from './ProductsControl.js';
16
- import { SelectCategoryModal } from './SelectCategoryModal.js';
17
+ import { CATEGORY_TYPES_NAMES, SelectCategoryModal } from './SelectCategoryModal.js';
17
18
  import { ProductSetLoadingContext } from './context.js';
18
19
  import { VenueMapSetModal } from './VenueMapSetModal.js';
19
20
  import { sortArrayByIndex, moveArrayElements } from '../utils/index.js';
@@ -117,6 +118,40 @@ function _unsupported_iterable_to_array(o, minLen) {
117
118
  if (n === "Map" || n === "Set") return Array.from(n);
118
119
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
119
120
  }
121
+ var _obj;
122
+ // @TODO not for first release
123
+ // import Popover from "./ProductSetFormPopover";
124
+ var CATEGORIES_TYPE = (_obj = {}, _define_property(_obj, CATEGORY_TYPES_NAMES.tickets, {
125
+ label: "tickets",
126
+ icon: /*#__PURE__*/ jsx(FaTicketAlt, {
127
+ color: "#0e8ce2",
128
+ size: 10
129
+ })
130
+ }), _define_property(_obj, CATEGORY_TYPES_NAMES.bookings, {
131
+ label: "bookings",
132
+ icon: /*#__PURE__*/ jsx(FaCalendar, {
133
+ color: "#0e8ce2",
134
+ size: 10
135
+ })
136
+ }), _define_property(_obj, CATEGORY_TYPES_NAMES.menuItems, {
137
+ label: "menuItems",
138
+ icon: /*#__PURE__*/ jsx(FaBars, {
139
+ color: "#0e8ce2",
140
+ size: 10
141
+ })
142
+ }), _define_property(_obj, CATEGORY_TYPES_NAMES.game, {
143
+ label: "game",
144
+ icon: /*#__PURE__*/ jsx(FaBowlingBall, {
145
+ color: "#0e8ce2",
146
+ size: 10
147
+ })
148
+ }), _define_property(_obj, CATEGORY_TYPES_NAMES.fixedDuration, {
149
+ label: "fixedDuration",
150
+ icon: /*#__PURE__*/ jsx(FaCalendar, {
151
+ color: "#0e8ce2",
152
+ size: 10
153
+ })
154
+ }), _obj);
120
155
  var getCategoryDefaultValue = function(categoryType, sort) {
121
156
  return {
122
157
  id: null,
@@ -250,6 +285,7 @@ function ProductCategoriesControl(param) {
250
285
  var onSetIsExpanded = function() {
251
286
  setIsExpanded(productCategoryId);
252
287
  };
288
+ var categoryType = CATEGORIES_TYPE[productCategory.type];
253
289
  return /*#__PURE__*/ jsx(Controller, {
254
290
  name: "".concat(productCategoriesFieldName, ".").concat(index, ".name"),
255
291
  control: control,
@@ -299,6 +335,16 @@ function ProductCategoriesControl(param) {
299
335
  secondaryBadge: getBadgeConfig(productCategory.type, t(productCategory.type)),
300
336
  modalClass: ProductSetModalClasses.category,
301
337
  isNewAdded: showCategoryModal,
338
+ itemButton: /*#__PURE__*/ jsxs("div", {
339
+ className: "btn-outline-primary item-icon sm border border-primary rounded-sm",
340
+ children: [
341
+ categoryType.icon,
342
+ /*#__PURE__*/ jsx("span", {
343
+ className: "ml-2",
344
+ children: t(categoryType.label)
345
+ })
346
+ ]
347
+ }),
302
348
  body: /*#__PURE__*/ jsx(ProductCategoryControl, {
303
349
  isLoading: isLoading,
304
350
  onCategoryNameChange: onChange,