@licklist/design 0.67.2 → 0.67.3-dev.1

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 (283) 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 +1 -1
  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/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +2 -1
  11. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  12. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +5 -3
  13. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
  14. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +5 -3
  15. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -1
  16. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
  17. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +6 -8
  18. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +2 -1
  19. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
  20. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +3 -2
  21. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  22. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
  23. package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -1
  24. package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
  25. package/dist/iframe/event/event-card/IframeEventCard.js +9 -3
  26. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  27. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +2 -0
  28. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  29. package/dist/layout/DropDown.d.ts +2 -1
  30. package/dist/layout/DropDown.d.ts.map +1 -1
  31. package/dist/layout/DropDownToggle.d.ts.map +1 -1
  32. package/dist/layout/DropDownToggle.js +1 -0
  33. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +3 -2
  34. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  35. package/dist/product-set/control/DateAndRecurrenceInput.js +3 -1
  36. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  37. package/dist/product-set/control/DateInput.js +2 -2
  38. package/dist/product-set/control/ProductSetControl.d.ts +3 -2
  39. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  40. package/dist/product-set/control/ProductSetControl.js +4 -2
  41. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  42. package/dist/product-set/form/ProductCategoriesControl.js +48 -2
  43. package/dist/product-set/form/ProductSetForm.d.ts +6 -2
  44. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  45. package/dist/product-set/form/ProductSetForm.js +65 -5
  46. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  47. package/dist/product-set/form/ProductZonesControl.js +0 -2
  48. package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
  49. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  50. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  51. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  52. package/dist/product-set/form/SubProductsControl.js +0 -3
  53. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  54. package/dist/product-set/form/VenueMapsControl.js +0 -3
  55. package/dist/provider/location-input/LocationInput.d.ts +4 -1
  56. package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
  57. package/dist/provider/location-input/LocationInput.js +41 -2
  58. package/dist/provider/location-input/LocationInputDescription.d.ts +4 -1
  59. package/dist/provider/location-input/LocationInputDescription.d.ts.map +1 -1
  60. package/dist/provider/location-input/LocationInputDescription.js +27 -12
  61. package/dist/provider/location-input/index.d.ts +1 -0
  62. package/dist/provider/location-input/index.d.ts.map +1 -1
  63. package/dist/provider/provider-form/ProviderForm.d.ts +3 -1
  64. package/dist/provider/provider-form/ProviderForm.d.ts.map +1 -1
  65. package/dist/provider/provider-form/ProviderForm.js +7 -3
  66. package/dist/provider/venue-form/VenueForm.d.ts +3 -1
  67. package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
  68. package/dist/provider/venue-form/VenueForm.js +7 -3
  69. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  70. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +4 -8
  71. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +2 -1
  72. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
  73. package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +7 -13
  74. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +4 -1
  75. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  76. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +7 -3
  77. package/dist/recurring-date-picker-input/utils.d.ts +5 -0
  78. package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
  79. package/dist/recurring-date-picker-input/utils.js +72 -3
  80. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  81. package/dist/sales/booking/results/components/ResultCard.js +4 -7
  82. package/dist/sales/guest-profile/previous-bookings/PreviousBookings.js +1 -1
  83. package/dist/sales/manual-booking/formatDays.js +3 -3
  84. package/dist/sales/manual-booking/select-event/SelectEvent.d.ts.map +1 -1
  85. package/dist/sales/manual-booking/select-event/SelectEvent.js +3 -3
  86. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  87. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +2 -2
  88. package/dist/sales/notes/NotesTableRow.js +3 -4
  89. package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
  90. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  91. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  92. package/dist/snippet/snippet-template/preview/Preview.js +6 -0
  93. package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
  94. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  95. package/dist/sortable-tree/SortableTreeItem.js +10 -4
  96. package/dist/styles/auth/AccessDenied.scss +1 -1
  97. package/dist/styles/back-button/BackButton.scss +25 -24
  98. package/dist/styles/back-button/_index.scss +1 -1
  99. package/dist/styles/company-user-form/UserForm.scss +4 -7
  100. package/dist/styles/company-user-form/_index.scss +1 -1
  101. package/dist/styles/custom-fields/CreateSortableListItem.scss +2 -1
  102. package/dist/styles/custom-fields/_index.scss +1 -1
  103. package/dist/styles/customers/Filter.scss +5 -5
  104. package/dist/styles/events/EditEventModal.scss +1 -3
  105. package/dist/styles/events/EventVenueMap.scss +7 -7
  106. package/dist/styles/form/Input.scss +1 -1
  107. package/dist/styles/header/Header.scss +1 -1
  108. package/dist/styles/header/elements/CompanySelector.scss +2 -2
  109. package/dist/styles/iframe-events/Calendar.scss +0 -1
  110. package/dist/styles/iframe-events/CalendarSelect.scss +1 -1
  111. package/dist/styles/iframe-events/CategoryStepsForm.scss +6 -7
  112. package/dist/styles/iframe-events/Event.scss +2 -4
  113. package/dist/styles/iframe-events/EventForm.scss +54 -54
  114. package/dist/styles/iframe-events/EventNavigationFooter.scss +1 -0
  115. package/dist/styles/iframe-events/TicketDescription.scss +1 -1
  116. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  117. package/dist/styles/iframe-payments/PaymentForm.scss +1 -1
  118. package/dist/styles/layout/BackgroundVideoContainer.scss +2 -2
  119. package/dist/styles/notification/Notification.scss +1 -1
  120. package/dist/styles/order-items-table/OrderItemsTable.scss +1 -2
  121. package/dist/styles/product-set/CreateProductSetItem.scss +15 -13
  122. package/dist/styles/product-set/DateAndRecurrenceInput.scss +6 -8
  123. package/dist/styles/product-set/EditCategoryModal.scss +4 -4
  124. package/dist/styles/product-set/EditProductModal.scss +3 -3
  125. package/dist/styles/product-set/EditStepModal.scss +4 -4
  126. package/dist/styles/product-set/EditVenueMapSetModal.scss +6 -6
  127. package/dist/styles/product-set/ProductSetForm.scss +25 -2
  128. package/dist/styles/product-set/TutorialGifCard.scss +1 -1
  129. package/dist/styles/product-set/_index.scss +2 -2
  130. package/dist/styles/report/ReportCard.scss +1 -0
  131. package/dist/styles/report/_index.scss +1 -1
  132. package/dist/styles/resources-blocking/_index.scss +4 -0
  133. package/dist/styles/sales/BookingFilter.scss +2 -2
  134. package/dist/styles/sales/BookingResults.scss +1 -1
  135. package/dist/styles/sales/BookingTabs.scss +7 -5
  136. package/dist/styles/sales/Filters.scss +5 -4
  137. package/dist/styles/sales/GuestProfile.scss +170 -175
  138. package/dist/styles/sales/LifeTimeSales.scss +1 -1
  139. package/dist/styles/sales/ManualBooking.scss +4 -2
  140. package/dist/styles/snippet-templates/_snippetVariables.scss +63 -244
  141. package/dist/styles/sortable-field/SortableField.scss +16 -16
  142. package/dist/styles/sortable-field/_index.scss +1 -1
  143. package/dist/styles/sortable-tree/Item.scss +4 -4
  144. package/dist/styles/table/Table.scss +1 -1
  145. package/dist/styles/themes/bookedit/_variables.scss +10 -32
  146. package/dist/styles/themes/licklist/_variables.scss +1 -1
  147. package/dist/styles/tiptap-editor/TiptapEditor.scss +9 -10
  148. package/dist/styles/tiptap-editor/_index.scss +1 -1
  149. package/dist/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
  150. package/dist/styles/virtualized/_index.scss +1 -1
  151. package/dist/styles/zones/ZoneForm.scss +1 -0
  152. package/dist/styles/zones/ZoneRecurrencesControl.scss +6 -8
  153. package/dist/zone/form/ZoneForm.d.ts +3 -2
  154. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  155. package/dist/zone/form/ZoneForm.js +4 -2
  156. package/dist/zone/form/components/ZoneControl.d.ts +3 -2
  157. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  158. package/dist/zone/form/components/ZoneControl.js +5 -2
  159. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +5 -4
  160. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  161. package/dist/zone/form/components/ZoneRecurrencesControl.js +5 -2
  162. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  163. package/package.json +11 -11
  164. package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -1
  165. package/src/auth/Login/LoginComponent.tsx +1 -1
  166. package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -1
  167. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +31 -28
  168. package/src/calendar/utils/index.ts +26 -4
  169. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +3 -0
  170. package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +3 -5
  171. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +3 -4
  172. package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +3 -0
  173. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
  174. package/src/header/elements/Elements.stories.tsx +1 -1
  175. package/src/help/popover/Popover.stories.tsx +1 -1
  176. package/src/iframe/event/event-card/IframeEventCard.tsx +16 -2
  177. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -3
  178. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -0
  179. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
  180. package/src/layout/DropDown.tsx +2 -1
  181. package/src/layout/DropDownToggle.tsx +2 -0
  182. package/src/product-set/card/ProductSetCard.stories.tsx +3 -1
  183. package/src/product-set/control/DateAndRecurrenceInput.tsx +6 -4
  184. package/src/product-set/control/DateInput.tsx +2 -1
  185. package/src/product-set/control/ProductSetControl.tsx +5 -1
  186. package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +2 -2
  187. package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
  188. package/src/product-set/form/ProductSetForm.tsx +25 -3
  189. package/src/product-set/form/ProductZonesControl.tsx +4 -7
  190. package/src/product-set/form/SelectCategoryModal.stories.tsx +1 -1
  191. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  192. package/src/product-set/form/SubProductsControl.tsx +0 -3
  193. package/src/product-set/form/VenueMapsControl.tsx +0 -3
  194. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +5 -5
  195. package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
  196. package/src/product-set/product/quantity/ProductQuantity.stories.tsx +1 -1
  197. package/src/product-set/product-zone/ProductZoneControl.tsx +9 -9
  198. package/src/provider/location-input/LocationInput.tsx +36 -1
  199. package/src/provider/location-input/LocationInputDescription.tsx +23 -11
  200. package/src/provider/location-input/index.ts +1 -0
  201. package/src/provider/provider-form/ProviderForm.tsx +7 -2
  202. package/src/provider/venue-form/VenueForm.tsx +5 -2
  203. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
  204. package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +8 -22
  205. package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +11 -4
  206. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +17 -3
  207. package/src/recurring-date-picker-input/utils.ts +86 -1
  208. package/src/sales/booking/results/components/ResultCard.tsx +4 -10
  209. package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +1 -1
  210. package/src/sales/manual-booking/formatDays.ts +3 -3
  211. package/src/sales/manual-booking/select-event/SelectEvent.tsx +2 -2
  212. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +2 -2
  213. package/src/sales/notes/NotesTableRow.tsx +3 -3
  214. package/src/setting/admin/AdminSetting.stories.tsx +1 -0
  215. package/src/setting/admin/AdminSettingForm.tsx +2 -2
  216. package/src/setting/system/SystemSetting.stories.tsx +1 -1
  217. package/src/snippet/snippet-template/preview/Preview.tsx +6 -0
  218. package/src/sortable-tree/SortableTreeItem.tsx +6 -0
  219. package/src/styles/auth/AccessDenied.scss +1 -1
  220. package/src/styles/back-button/BackButton.scss +25 -24
  221. package/src/styles/back-button/_index.scss +1 -1
  222. package/src/styles/company-user-form/UserForm.scss +4 -7
  223. package/src/styles/company-user-form/_index.scss +1 -1
  224. package/src/styles/custom-fields/CreateSortableListItem.scss +2 -1
  225. package/src/styles/custom-fields/_index.scss +1 -1
  226. package/src/styles/customers/Filter.scss +5 -5
  227. package/src/styles/events/EditEventModal.scss +1 -3
  228. package/src/styles/events/EventVenueMap.scss +7 -7
  229. package/src/styles/form/Input.scss +1 -1
  230. package/src/styles/header/Header.scss +1 -1
  231. package/src/styles/header/elements/CompanySelector.scss +2 -2
  232. package/src/styles/iframe-events/Calendar.scss +0 -1
  233. package/src/styles/iframe-events/CalendarSelect.scss +1 -1
  234. package/src/styles/iframe-events/CategoryStepsForm.scss +6 -7
  235. package/src/styles/iframe-events/Event.scss +2 -4
  236. package/src/styles/iframe-events/EventForm.scss +54 -54
  237. package/src/styles/iframe-events/EventNavigationFooter.scss +1 -0
  238. package/src/styles/iframe-events/TicketDescription.scss +1 -1
  239. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  240. package/src/styles/iframe-payments/PaymentForm.scss +1 -1
  241. package/src/styles/layout/BackgroundVideoContainer.scss +2 -2
  242. package/src/styles/notification/Notification.scss +1 -1
  243. package/src/styles/order-items-table/OrderItemsTable.scss +1 -2
  244. package/src/styles/product-set/CreateProductSetItem.scss +15 -13
  245. package/src/styles/product-set/DateAndRecurrenceInput.scss +6 -8
  246. package/src/styles/product-set/EditCategoryModal.scss +4 -4
  247. package/src/styles/product-set/EditProductModal.scss +3 -3
  248. package/src/styles/product-set/EditStepModal.scss +4 -4
  249. package/src/styles/product-set/EditVenueMapSetModal.scss +6 -6
  250. package/src/styles/product-set/ProductSetForm.scss +25 -2
  251. package/src/styles/product-set/TutorialGifCard.scss +1 -1
  252. package/src/styles/product-set/_index.scss +2 -2
  253. package/src/styles/report/ReportCard.scss +1 -0
  254. package/src/styles/report/_index.scss +1 -1
  255. package/src/styles/resources-blocking/_index.scss +4 -0
  256. package/src/styles/sales/BookingFilter.scss +2 -2
  257. package/src/styles/sales/BookingResults.scss +1 -1
  258. package/src/styles/sales/BookingTabs.scss +7 -5
  259. package/src/styles/sales/Filters.scss +5 -4
  260. package/src/styles/sales/GuestProfile.scss +170 -175
  261. package/src/styles/sales/LifeTimeSales.scss +1 -1
  262. package/src/styles/sales/ManualBooking.scss +4 -2
  263. package/src/styles/snippet-templates/_snippetVariables.scss +63 -244
  264. package/src/styles/sortable-field/SortableField.scss +16 -16
  265. package/src/styles/sortable-field/_index.scss +1 -1
  266. package/src/styles/sortable-tree/Item.scss +4 -4
  267. package/src/styles/table/Table.scss +1 -1
  268. package/src/styles/themes/bookedit/_variables.scss +10 -32
  269. package/src/styles/themes/licklist/_variables.scss +1 -1
  270. package/src/styles/tiptap-editor/TiptapEditor.scss +9 -10
  271. package/src/styles/tiptap-editor/_index.scss +1 -1
  272. package/src/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
  273. package/src/styles/virtualized/_index.scss +1 -1
  274. package/src/styles/zones/ZoneForm.scss +1 -0
  275. package/src/styles/zones/ZoneRecurrencesControl.scss +6 -8
  276. package/src/tiptap-editor/TipTapEditor.stories.tsx +6 -4
  277. package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +5 -2
  278. package/src/zone/form/ZoneForm.tsx +9 -2
  279. package/src/zone/form/components/ZoneControl.tsx +8 -3
  280. package/src/zone/form/components/ZoneRecurrencesControl.tsx +10 -5
  281. package/src/zone/form/utils/dates.ts +9 -10
  282. package/yarn.lock +217 -204
  283. package/dist/assets/iframe/selectArrow.svg.js +0 -17
@@ -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,12 @@ 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
47
  occurrenceStartAtDate?: string;
48
48
  isCreateNewOverrides?: boolean;
49
+ timeZone: string;
49
50
  }
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;
51
+ export declare function ProductSetControl({ companyName, isLoading, fee, fieldSets, emailTemplates, smsTemplates, isEventEditProductSet, isCreateAction, showEmailTemplate, showSmsTemplate, workHours, providerHasBookingManagement, isOverrides, occurrenceStartAtDate, isCreateNewOverrides, timeZone, }: ProductSetControlProps): import("react/jsx-runtime").JSX.Element;
51
52
  //# 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;AAGr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B,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":"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,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AE,OAAO,CAAC;IAC1B,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,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,qBAAqB,EACrB,oBAA4B,EAC5B,QAAQ,GACT,EAAE,sBAAsB,2CAqUxB"}
@@ -76,7 +76,7 @@ var OPERATIONAL_COST_TITLES = (_obj = {}, _define_property(_obj, OPERATIONAL_COS
76
76
  var _obj1;
77
77
  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
78
  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;
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, timeZone = param.timeZone;
80
80
  var _errors_name;
81
81
  var t = useTranslation([
82
82
  "Design",
@@ -103,6 +103,7 @@ function ProductSetControl(param) {
103
103
  var eventStartDate = DateTime.fromISO(occurrenceStartAtDate);
104
104
  var eventStart = eventStartDate.toFormat(DATE_MONTH_LOCALE_FORMAT);
105
105
  setValue("name", "".concat(productSetName, " (").concat(eventStart, ")"));
106
+ // eslint-disable-next-line react-hooks/exhaustive-deps
106
107
  }, [
107
108
  setValue,
108
109
  occurrenceStartAtDate
@@ -163,7 +164,8 @@ function ProductSetControl(param) {
163
164
  isEventEditProductSet: isEventEditProductSet,
164
165
  workHours: isZoneAdded ? workHours : undefined,
165
166
  isLoading: isLoading,
166
- providerHasBookingManagement: providerHasBookingManagement
167
+ providerHasBookingManagement: providerHasBookingManagement,
168
+ timeZone: timeZone
167
169
  })
168
170
  }),
169
171
  /*#__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,
@@ -10,10 +10,13 @@ import { SelectItem } from "../../types/generic/SelectItem";
10
10
  export interface WithIsLoading {
11
11
  isLoading: boolean;
12
12
  }
13
+ export interface WithIdOptional {
14
+ id?: number;
15
+ }
13
16
  export interface WithId {
14
17
  id: number;
15
18
  }
16
- export interface ProductSetFormValues extends FormValues, WithId, ProductSetControlValues {
19
+ export interface ProductSetFormValues extends FormValues, WithIdOptional, ProductSetControlValues {
17
20
  steps: Step[];
18
21
  isOverrides?: boolean;
19
22
  }
@@ -32,6 +35,7 @@ export interface ProductSetFormProps extends WithIsLoading, ProductSetControlSha
32
35
  isOverrides?: boolean;
33
36
  workHours?: WorkHour[];
34
37
  isCreateNewOverrides?: boolean;
38
+ timeZone: string;
35
39
  }
36
- export declare function ProductSetForm({ companyName, isLoading, defaultValues, onSubmitAndRedirect, onSubmitNoRedirect, productGroupList, serverErrors, providerHasMap, venueMapSets, providerHasBookingManagement, zones, isCreateAction, workHours, isOverrides, isCreateNewOverrides, ...shared }: ProductSetFormProps): import("react/jsx-runtime").JSX.Element;
40
+ export declare function ProductSetForm({ companyName, isLoading, defaultValues, onSubmitAndRedirect, onSubmitNoRedirect, productGroupList, serverErrors, providerHasMap, venueMapSets, providerHasBookingManagement, zones, isCreateAction, workHours, isOverrides, isCreateNewOverrides, timeZone, ...shared }: ProductSetFormProps): import("react/jsx-runtime").JSX.Element;
37
41
  //# sourceMappingURL=ProductSetForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAI1F,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAC;AACtI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAG5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,MAAM,EACN,uBAAuB;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CA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AS,EACT,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,mBAAmB,2CA6JrB"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useEffect } from 'react';
2
+ import { useState, useEffect } from 'react';
3
3
  import { Form, Row, Col, Button } from 'react-bootstrap';
4
4
  import { useForm, FormProvider } from 'react-hook-form';
5
5
  import { useTranslation } from 'react-i18next';
@@ -10,7 +10,16 @@ import { useDialogContext } from '../../modals/dialog/DialogContext.js';
10
10
  import { ProductSetControl } from '../control/ProductSetControl.js';
11
11
  import { ProductSetContextProvider, ProductSetLoadingContext } from './context.js';
12
12
  import { getFilteredTemplates, checkAvailableTimesErrors } from '../utils/index.js';
13
+ import { ErrorModal } from '../../iframe/order-process/components/ErrorModal/ErrorModal.js';
13
14
 
15
+ function _array_like_to_array(arr, len) {
16
+ if (len == null || len > arr.length) len = arr.length;
17
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
18
+ return arr2;
19
+ }
20
+ function _array_with_holes(arr) {
21
+ if (Array.isArray(arr)) return arr;
22
+ }
14
23
  function _define_property(obj, key, value) {
15
24
  if (key in obj) {
16
25
  Object.defineProperty(obj, key, {
@@ -24,6 +33,33 @@ function _define_property(obj, key, value) {
24
33
  }
25
34
  return obj;
26
35
  }
36
+ function _iterable_to_array_limit(arr, i) {
37
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
38
+ if (_i == null) return;
39
+ var _arr = [];
40
+ var _n = true;
41
+ var _d = false;
42
+ var _s, _e;
43
+ try {
44
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
45
+ _arr.push(_s.value);
46
+ if (i && _arr.length === i) break;
47
+ }
48
+ } catch (err) {
49
+ _d = true;
50
+ _e = err;
51
+ } finally{
52
+ try {
53
+ if (!_n && _i["return"] != null) _i["return"]();
54
+ } finally{
55
+ if (_d) throw _e;
56
+ }
57
+ }
58
+ return _arr;
59
+ }
60
+ function _non_iterable_rest() {
61
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
+ }
27
63
  function _object_spread(target) {
28
64
  for(var i = 1; i < arguments.length; i++){
29
65
  var source = arguments[i] != null ? arguments[i] : {};
@@ -90,8 +126,19 @@ function _object_without_properties_loose(source, excluded) {
90
126
  }
91
127
  return target;
92
128
  }
129
+ function _sliced_to_array(arr, i) {
130
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
131
+ }
132
+ function _unsupported_iterable_to_array(o, minLen) {
133
+ if (!o) return;
134
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
135
+ var n = Object.prototype.toString.call(o).slice(8, -1);
136
+ if (n === "Object" && o.constructor) n = o.constructor.name;
137
+ if (n === "Map" || n === "Set") return Array.from(n);
138
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
139
+ }
93
140
  function ProductSetForm(_param) {
94
- var companyName = _param.companyName, isLoading = _param.isLoading, defaultValues = _param.defaultValues, onSubmitAndRedirect = _param.onSubmitAndRedirect, onSubmitNoRedirect = _param.onSubmitNoRedirect, productGroupList = _param.productGroupList, serverErrors = _param.serverErrors, _param_providerHasMap = _param.providerHasMap, providerHasMap = _param_providerHasMap === void 0 ? false : _param_providerHasMap, _param_venueMapSets = _param.venueMapSets, venueMapSets = _param_venueMapSets === void 0 ? [] : _param_venueMapSets, providerHasBookingManagement = _param.providerHasBookingManagement, zones = _param.zones, isCreateAction = _param.isCreateAction, workHours = _param.workHours, isOverrides = _param.isOverrides, isCreateNewOverrides = _param.isCreateNewOverrides, shared = _object_without_properties(_param, [
141
+ var companyName = _param.companyName, isLoading = _param.isLoading, defaultValues = _param.defaultValues, onSubmitAndRedirect = _param.onSubmitAndRedirect, onSubmitNoRedirect = _param.onSubmitNoRedirect, productGroupList = _param.productGroupList, serverErrors = _param.serverErrors, _param_providerHasMap = _param.providerHasMap, providerHasMap = _param_providerHasMap === void 0 ? false : _param_providerHasMap, _param_venueMapSets = _param.venueMapSets, venueMapSets = _param_venueMapSets === void 0 ? [] : _param_venueMapSets, providerHasBookingManagement = _param.providerHasBookingManagement, zones = _param.zones, isCreateAction = _param.isCreateAction, workHours = _param.workHours, isOverrides = _param.isOverrides, isCreateNewOverrides = _param.isCreateNewOverrides, timeZone = _param.timeZone, shared = _object_without_properties(_param, [
95
142
  "companyName",
96
143
  "isLoading",
97
144
  "defaultValues",
@@ -106,10 +153,12 @@ function ProductSetForm(_param) {
106
153
  "isCreateAction",
107
154
  "workHours",
108
155
  "isOverrides",
109
- "isCreateNewOverrides"
156
+ "isCreateNewOverrides",
157
+ "timeZone"
110
158
  ]);
111
159
  var t = useTranslation("Design").t;
112
160
  var _useDialogContext = useDialogContext(), isShownDialog = _useDialogContext.isShownDialog, onBeforeUnload = _useDialogContext.onBeforeUnload, onPopState = _useDialogContext.onPopState, onApproveDialog = _useDialogContext.onApproveDialog, onDeclineDialog = _useDialogContext.onDeclineDialog;
161
+ var _useState = _sliced_to_array(useState(""), 2), errorMessage = _useState[0], setErrorMessage = _useState[1];
113
162
  var form = useForm({
114
163
  defaultValues: defaultValues,
115
164
  mode: "onChange"
@@ -141,13 +190,16 @@ function ProductSetForm(_param) {
141
190
  if (!serverErrors) {
142
191
  return;
143
192
  }
193
+ if (Array.isArray(serverErrors) && serverErrors[0]) {
194
+ setErrorMessage(serverErrors[0]);
195
+ }
144
196
  FormErrorService.handleServerErrors(serverErrors, setError);
145
197
  }, [
146
198
  serverErrors,
147
199
  setError
148
200
  ]);
149
201
  useEffect(function() {
150
- window.history.pushState(null, "", window.location.pathname);
202
+ window.history.pushState(null, "", window.location.pathname + window.location.search);
151
203
  window.addEventListener("beforeunload", onBeforeUnload);
152
204
  window.addEventListener("popstate", onPopState);
153
205
  return function() {
@@ -170,6 +222,13 @@ function ProductSetForm(_param) {
170
222
  onApprove: onApproveDialog,
171
223
  onDecline: onDeclineDialog
172
224
  }),
225
+ /*#__PURE__*/ jsx(ErrorModal, {
226
+ message: errorMessage,
227
+ isOpen: !!errorMessage,
228
+ onClose: function() {
229
+ return setErrorMessage("");
230
+ }
231
+ }),
173
232
  /*#__PURE__*/ jsx(FormProvider, _object_spread_props(_object_spread({}, form), {
174
233
  children: /*#__PURE__*/ jsx(Form, {
175
234
  onSubmit: form.handleSubmit(submitHandler(onSubmitAndRedirect)),
@@ -189,7 +248,8 @@ function ProductSetForm(_param) {
189
248
  workHours: workHours,
190
249
  providerHasBookingManagement: providerHasBookingManagement,
191
250
  isOverrides: isOverrides,
192
- isCreateNewOverrides: isCreateNewOverrides
251
+ isCreateNewOverrides: isCreateNewOverrides,
252
+ timeZone: timeZone
193
253
  })),
194
254
  /*#__PURE__*/ jsxs(Row, {
195
255
  children: [
@@ -1 +1 @@
1
- {"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAQtE,UAAU,wBAAwB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAaD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,UAAU,mDAIrD,wBAAwB,CAAC,CAAC,CAAC,4CAqI7B,CAAC"}
1
+ {"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAQtE,UAAU,wBAAwB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAaD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,UAAU,mDAIrD,wBAAwB,CAAC,CAAC,CAAC,4CAqI7B,CAAC"}
@@ -11,8 +11,6 @@ import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
11
11
  import { SortableTree } from '../../sortable-tree/SortableTree.js';
12
12
  import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js';
13
13
 
14
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
- // @ts-nocheck
16
14
  function _array_like_to_array(arr, len) {
17
15
  if (len == null || len > arr.length) len = arr.length;
18
16
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -1,4 +1,16 @@
1
+ import { ReactElement } from "react";
1
2
  import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
3
+ export declare const CATEGORY_TYPES_NAMES: {
4
+ readonly menuItems: "menuItems";
5
+ readonly tickets: "tickets";
6
+ readonly bookings: "bookings";
7
+ readonly game: "game";
8
+ readonly fixedDuration: "fixedDuration";
9
+ };
10
+ export type CategoryConfig = {
11
+ label: string;
12
+ icon: ReactElement;
13
+ };
2
14
  export interface SelectCategoryModalProps {
3
15
  isVisible: boolean;
4
16
  onHide: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAML,YAAY,EACb,MAAM,kEAAkE,CAAC;AAoD1E,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;CACpD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,MAAM,EACN,gBAAgB,GACjB,EAAE,wBAAwB,2CAyH1B"}
1
+ {"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAC;AAG3D,OAAO,EAML,YAAY,EACb,MAAM,kEAAkE,CAAC;AAgB1E,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC;AA4BnE,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;CACpD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,MAAM,EACN,gBAAgB,GACjB,EAAE,wBAAwB,2CAyH1B"}
@@ -242,4 +242,4 @@ function SelectCategoryModal(param) {
242
242
  });
243
243
  }
244
244
 
245
- export { SelectCategoryModal };
245
+ export { CATEGORY_TYPES_NAMES, SelectCategoryModal };
@@ -1 +1 @@
1
- {"version":3,"file":"SubProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SubProductsControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,EAAE,uBAAuB,2CA4DzB"}
1
+ {"version":3,"file":"SubProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SubProductsControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,EAAE,uBAAuB,2CAyDzB"}
@@ -108,9 +108,6 @@ function SubProductsControl(param) {
108
108
  images: (_subProducts_index = subProducts[index]) === null || _subProducts_index === void 0 ? void 0 : _subProducts_index.images
109
109
  });
110
110
  // @ts-expect-error TS2345
111
- // @TODO fix prod type error
112
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
113
- // @ts-ignore
114
111
  append(subProductCopy);
115
112
  }
116
113
  })
@@ -1 +1 @@
1
- {"version":3,"file":"VenueMapsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/VenueMapsControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAG7F,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF,eAAO,MAAM,gBAAgB,mEAK1B,qBAAqB,4CAgEvB,CAAC"}
1
+ {"version":3,"file":"VenueMapsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/VenueMapsControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAG7F,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF,eAAO,MAAM,gBAAgB,mEAK1B,qBAAqB,4CA6DvB,CAAC"}
@@ -35,9 +35,6 @@ var VenueMapsControl = function(param) {
35
35
  url: image.url,
36
36
  name: name,
37
37
  points: points,
38
- // @TODO fix prod type error
39
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
40
- // @ts-ignore
41
38
  products: products,
42
39
  pointProducts: pointProducts,
43
40
  onPointProductsChange: onPointProductsChange
@@ -1,2 +1,5 @@
1
- export declare function LocationInput(): import("react/jsx-runtime").JSX.Element;
1
+ import { TimeZonePath } from "@licklist/plugins";
2
+ export declare function LocationInput({ path }: {
3
+ path: TimeZonePath;
4
+ }): import("react/jsx-runtime").JSX.Element;
2
5
  //# sourceMappingURL=LocationInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationInput.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/LocationInput.tsx"],"names":[],"mappings":"AAQA,wBAAgB,aAAa,4CA2C5B"}
1
+ {"version":3,"file":"LocationInput.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/LocationInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAMjE,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,2CA4E7D"}
@@ -3,8 +3,11 @@ import { useId } from '@react-aria/utils';
3
3
  import { Form } from 'react-bootstrap';
4
4
  import { useFormContext } from 'react-hook-form';
5
5
  import { useTranslation } from 'react-i18next';
6
+ import { useTimeZoneApi } from '@licklist/plugins';
7
+ import '../../static/index.js';
6
8
  import CountryCodeSelect from '../../static/CountryCodeSelect.js';
7
9
  import { FormGroupControll } from './components/FormGroupControll.js';
10
+ import { BlockLoader } from '../../static/loader/BlockLoader.js';
8
11
 
9
12
  function _define_property(obj, key, value) {
10
13
  if (key in obj) {
@@ -58,10 +61,12 @@ function _object_spread_props(target, source) {
58
61
  }
59
62
  return target;
60
63
  }
61
- function LocationInput() {
62
- var _errors_location, _errors_location1, _errors_location2, _errors_location3, _errors_location_country, _errors_location4;
64
+ function LocationInput(param) {
65
+ var path = param.path;
66
+ var _errors_location, _errors_location1, _errors_location2, _errors_location3, _errors_location_country, _errors_location4, _errors_timeZoneId, _errors_timeZoneId1;
63
67
  var _useFormContext = useFormContext(), register = _useFormContext.register, errors = _useFormContext.formState.errors;
64
68
  var t = useTranslation("Design").t;
69
+ var _useTimeZoneApi_useAll = useTimeZoneApi(path).useAll(), data = _useTimeZoneApi_useAll.data, isLoading = _useTimeZoneApi_useAll.isLoading;
65
70
  var countryId = useId();
66
71
  return /*#__PURE__*/ jsxs(Fragment, {
67
72
  children: [
@@ -103,6 +108,40 @@ function LocationInput() {
103
108
  error: errors === null || errors === void 0 ? void 0 : (_errors_location4 = errors.location) === null || _errors_location4 === void 0 ? void 0 : (_errors_location_country = _errors_location4.country) === null || _errors_location_country === void 0 ? void 0 : _errors_location_country.message
104
109
  })
105
110
  ]
111
+ }),
112
+ isLoading ? /*#__PURE__*/ jsx(BlockLoader, {}) : /*#__PURE__*/ jsxs(Form.Group, {
113
+ controlId: "timeZoneId",
114
+ children: [
115
+ /*#__PURE__*/ jsx(Form.Label, {
116
+ children: t("locationTimeZone")
117
+ }),
118
+ /*#__PURE__*/ jsxs(Form.Control, _object_spread_props(_object_spread({}, register("timeZoneId", {
119
+ required: t("Validation:fieldRequired", {
120
+ attribute: t("locationTimeZone")
121
+ })
122
+ })), {
123
+ as: "select",
124
+ custom: true,
125
+ isInvalid: Boolean(errors === null || errors === void 0 ? void 0 : (_errors_timeZoneId = errors.timeZoneId) === null || _errors_timeZoneId === void 0 ? void 0 : _errors_timeZoneId.message),
126
+ children: [
127
+ /*#__PURE__*/ jsx("option", {
128
+ value: "",
129
+ disabled: true,
130
+ children: t("chooseTimeZone")
131
+ }, ""),
132
+ data.map(function(zone) {
133
+ return /*#__PURE__*/ jsx("option", {
134
+ value: zone.id.toString(),
135
+ children: zone.name
136
+ }, zone.id);
137
+ })
138
+ ]
139
+ })),
140
+ /*#__PURE__*/ jsx(Form.Control.Feedback, {
141
+ type: "invalid",
142
+ children: errors === null || errors === void 0 ? void 0 : (_errors_timeZoneId1 = errors.timeZoneId) === null || _errors_timeZoneId1 === void 0 ? void 0 : _errors_timeZoneId1.message
143
+ })
144
+ ]
106
145
  })
107
146
  ]
108
147
  });
@@ -1,2 +1,5 @@
1
- export declare function LocationInputDescription(): import("react/jsx-runtime").JSX.Element;
1
+ import { TimeZonePath } from "@licklist/plugins";
2
+ export declare function LocationInputDescription({ path }: {
3
+ path: TimeZonePath;
4
+ }): import("react/jsx-runtime").JSX.Element;
2
5
  //# sourceMappingURL=LocationInputDescription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationInputDescription.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/LocationInputDescription.tsx"],"names":[],"mappings":"AAKA,wBAAgB,wBAAwB,4CAoBvC"}
1
+ {"version":3,"file":"LocationInputDescription.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/LocationInputDescription.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAKjE,wBAAgB,wBAAwB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,2CA6BxE"}
@@ -1,6 +1,7 @@
1
- import { jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useFormContext } from 'react-hook-form';
3
3
  import en from 'react-phone-number-input/locale/en.json';
4
+ import { useTimeZoneApi } from '@licklist/plugins';
4
5
 
5
6
  function _array_like_to_array(arr, len) {
6
7
  if (len == null || len > arr.length) len = arr.length;
@@ -27,18 +28,21 @@ function _unsupported_iterable_to_array(o, minLen) {
27
28
  if (n === "Map" || n === "Set") return Array.from(n);
28
29
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
29
30
  }
30
- function LocationInputDescription() {
31
+ var fieldNames = [
32
+ "street",
33
+ "city",
34
+ "state",
35
+ "postcode",
36
+ "country"
37
+ ];
38
+ function LocationInputDescription(param) {
39
+ var path = param.path;
40
+ var _data_find;
31
41
  var watch = useFormContext().watch;
32
- var values = watch("location");
33
- var fieldNames = [
34
- "street",
35
- "city",
36
- "state",
37
- "postcode",
38
- "country"
39
- ];
42
+ var location = watch("location");
43
+ var data = useTimeZoneApi(path).useAll().data;
40
44
  var fields = fieldNames.reduce(function(acc, field) {
41
- var value = values === null || values === void 0 ? void 0 : values[field];
45
+ var value = location === null || location === void 0 ? void 0 : location[field];
42
46
  if (!value) return acc;
43
47
  return _to_consumable_array(acc).concat([
44
48
  /*#__PURE__*/ jsx("div", {
@@ -46,8 +50,19 @@ function LocationInputDescription() {
46
50
  }, field)
47
51
  ]);
48
52
  }, []);
53
+ var timeZoneId = watch("timeZoneId");
54
+ var timeZoneName = data === null || data === void 0 ? void 0 : (_data_find = data.find(function(timeZone) {
55
+ return timeZone.id === +timeZoneId;
56
+ })) === null || _data_find === void 0 ? void 0 : _data_find.name;
49
57
  return /*#__PURE__*/ jsx("div", {
50
- children: fields
58
+ children: /*#__PURE__*/ jsxs(Fragment, {
59
+ children: [
60
+ fields,
61
+ timeZoneName && /*#__PURE__*/ jsx("div", {
62
+ children: timeZoneName
63
+ }, "timeZone")
64
+ ]
65
+ })
51
66
  });
52
67
  }
53
68
 
@@ -11,5 +11,6 @@ export type LocationInputValues = {
11
11
  latitude: string;
12
12
  longitude: string;
13
13
  };
14
+ timeZoneId: string;
14
15
  };
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/location-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
2
+ import { TimeZonePath } from "@licklist/plugins";
2
3
  import { CategoriesInputProps, CategoriesInputValues } from "../categories-input";
3
4
  import { LocationInputValues } from "../location-input";
4
5
  import { ProviderDetailsInputProps, ProviderDetailsInputValues } from "../provider-details-input";
@@ -11,6 +12,7 @@ export interface ProviderFormProps extends HasPermissionProp {
11
12
  companiesOptions?: TypeaheadOptions[];
12
13
  onSubmit: (values: ProviderFormValues) => void;
13
14
  intent?: "create" | "update";
15
+ path: TimeZonePath;
14
16
  }
15
- export declare function ProviderForm({ defaultValues, categories, companiesOptions, linkTypes, onSubmit, intent, hasPermission, }: ProviderFormProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ProviderForm({ defaultValues, categories, companiesOptions, linkTypes, onSubmit, intent, hasPermission, path, }: ProviderFormProps): import("react/jsx-runtime").JSX.Element;
16
18
  //# sourceMappingURL=ProviderForm.d.ts.map