@eventlook/sdk 1.5.0-beta.1 → 1.5.0-beta.3

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 (422) hide show
  1. package/.prettierrc +1 -14
  2. package/README.md +5 -25
  3. package/dist/cjs/index.js +49195 -2
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/cjs/mui-tel-input.es-Bjml407E.js +3856 -0
  6. package/dist/cjs/mui-tel-input.es-Bjml407E.js.map +1 -0
  7. package/dist/esm/index.js +49194 -1
  8. package/dist/esm/index.js.map +1 -1
  9. package/dist/esm/mui-tel-input.es-Bt2rE3An.js +3851 -0
  10. package/dist/esm/mui-tel-input.es-Bt2rE3An.js.map +1 -0
  11. package/dist/types/components/Label.d.ts +1 -1
  12. package/dist/types/components/TextIconLabel.d.ts +1 -2
  13. package/dist/types/form/PaymentSuccess.d.ts +1 -1
  14. package/dist/types/form/TicketSelectionMap.d.ts +1 -1
  15. package/dist/types/modules/shopping-cart.d.ts +2 -2
  16. package/dist/types/utils/types/event.type.d.ts +0 -5
  17. package/dist/types/utils/types/global.type.d.ts +1 -1
  18. package/dist/types/utils/types/user.type.d.ts +1 -1
  19. package/eslint.config.mjs +103 -27
  20. package/package.json +14 -19
  21. package/rollup.config.mjs +40 -21
  22. package/src/@types/index.d.ts +3 -3
  23. package/src/components/TextIconLabel.tsx +1 -2
  24. package/src/components/animate/IconButtonAnimate.tsx +1 -2
  25. package/src/components/animate/MotionLazyContainer.tsx +1 -1
  26. package/src/components/hook-form/RHFCodes.tsx +1 -2
  27. package/src/components/hook-form/RHFSelect.tsx +1 -1
  28. package/src/form/PaymentSuccess.tsx +2 -2
  29. package/src/form/ScriptLoader.tsx +1 -2
  30. package/src/form/Shipping.tsx +75 -77
  31. package/src/form/TicketForm.tsx +3 -3
  32. package/src/locales/en.tsx +1 -1
  33. package/src/utils/types/event.type.ts +0 -6
  34. package/tsconfig.build.json +1 -0
  35. package/dist/cjs/components/ClientOnly.js +0 -19
  36. package/dist/cjs/components/ClientOnly.js.map +0 -1
  37. package/dist/cjs/components/CustomSkeleton.js +0 -15
  38. package/dist/cjs/components/CustomSkeleton.js.map +0 -1
  39. package/dist/cjs/components/Image.js +0 -71
  40. package/dist/cjs/components/Image.js.map +0 -1
  41. package/dist/cjs/components/Label.js +0 -65
  42. package/dist/cjs/components/Label.js.map +0 -1
  43. package/dist/cjs/components/TextIconLabel.js +0 -19
  44. package/dist/cjs/components/TextIconLabel.js.map +0 -1
  45. package/dist/cjs/components/TicketFormSkeleton.js +0 -55
  46. package/dist/cjs/components/TicketFormSkeleton.js.map +0 -1
  47. package/dist/cjs/components/Trans.js +0 -87
  48. package/dist/cjs/components/Trans.js.map +0 -1
  49. package/dist/cjs/components/animate/IconButtonAnimate.js +0 -29
  50. package/dist/cjs/components/animate/IconButtonAnimate.js.map +0 -1
  51. package/dist/cjs/components/animate/MotionContainer.js +0 -18
  52. package/dist/cjs/components/animate/MotionContainer.js.map +0 -1
  53. package/dist/cjs/components/animate/variants/bounce.js +0 -98
  54. package/dist/cjs/components/animate/variants/bounce.js.map +0 -1
  55. package/dist/cjs/components/animate/variants/container.js +0 -25
  56. package/dist/cjs/components/animate/variants/container.js.map +0 -1
  57. package/dist/cjs/components/animate/variants/transition.js +0 -17
  58. package/dist/cjs/components/animate/variants/transition.js.map +0 -1
  59. package/dist/cjs/components/confirm-dialog/ConfirmDialog.js +0 -24
  60. package/dist/cjs/components/confirm-dialog/ConfirmDialog.js.map +0 -1
  61. package/dist/cjs/components/hook-form/FormProvider.js +0 -14
  62. package/dist/cjs/components/hook-form/FormProvider.js.map +0 -1
  63. package/dist/cjs/components/hook-form/RHFCheckbox.js +0 -15
  64. package/dist/cjs/components/hook-form/RHFCheckbox.js.map +0 -1
  65. package/dist/cjs/components/hook-form/RHFDatePicker.js +0 -22
  66. package/dist/cjs/components/hook-form/RHFDatePicker.js.map +0 -1
  67. package/dist/cjs/components/hook-form/RHFPhone.js +0 -24
  68. package/dist/cjs/components/hook-form/RHFPhone.js.map +0 -1
  69. package/dist/cjs/components/hook-form/RHFRadioGroup.js +0 -29
  70. package/dist/cjs/components/hook-form/RHFRadioGroup.js.map +0 -1
  71. package/dist/cjs/components/hook-form/RHFSelect.js +0 -34
  72. package/dist/cjs/components/hook-form/RHFSelect.js.map +0 -1
  73. package/dist/cjs/components/hook-form/RHFTextField.js +0 -15
  74. package/dist/cjs/components/hook-form/RHFTextField.js.map +0 -1
  75. package/dist/cjs/components/iconify/Iconify.js +0 -14
  76. package/dist/cjs/components/iconify/Iconify.js.map +0 -1
  77. package/dist/cjs/context/GlobalContext.js +0 -65
  78. package/dist/cjs/context/GlobalContext.js.map +0 -1
  79. package/dist/cjs/form/ChildEventCard.js +0 -60
  80. package/dist/cjs/form/ChildEventCard.js.map +0 -1
  81. package/dist/cjs/form/ChildEventDialog.js +0 -30
  82. package/dist/cjs/form/ChildEventDialog.js.map +0 -1
  83. package/dist/cjs/form/ChildEvents.js +0 -17
  84. package/dist/cjs/form/ChildEvents.js.map +0 -1
  85. package/dist/cjs/form/ContactPerson.js +0 -40
  86. package/dist/cjs/form/ContactPerson.js.map +0 -1
  87. package/dist/cjs/form/EmailConfirmation.js +0 -27
  88. package/dist/cjs/form/EmailConfirmation.js.map +0 -1
  89. package/dist/cjs/form/MerchandiseSelection.js +0 -17
  90. package/dist/cjs/form/MerchandiseSelection.js.map +0 -1
  91. package/dist/cjs/form/OrderSuccess.js +0 -57
  92. package/dist/cjs/form/OrderSuccess.js.map +0 -1
  93. package/dist/cjs/form/Payment.js +0 -214
  94. package/dist/cjs/form/Payment.js.map +0 -1
  95. package/dist/cjs/form/PaymentOverviewBox.js +0 -412
  96. package/dist/cjs/form/PaymentOverviewBox.js.map +0 -1
  97. package/dist/cjs/form/PaymentPending.js +0 -26
  98. package/dist/cjs/form/PaymentPending.js.map +0 -1
  99. package/dist/cjs/form/PaymentSuccess.js +0 -203
  100. package/dist/cjs/form/PaymentSuccess.js.map +0 -1
  101. package/dist/cjs/form/ReleaseCountdown.js +0 -34
  102. package/dist/cjs/form/ReleaseCountdown.js.map +0 -1
  103. package/dist/cjs/form/ReleaseWithMerchandise.js +0 -130
  104. package/dist/cjs/form/ReleaseWithMerchandise.js.map +0 -1
  105. package/dist/cjs/form/ScriptLoader.js +0 -21
  106. package/dist/cjs/form/ScriptLoader.js.map +0 -1
  107. package/dist/cjs/form/Shipping.js +0 -119
  108. package/dist/cjs/form/Shipping.js.map +0 -1
  109. package/dist/cjs/form/TicketForm.js +0 -470
  110. package/dist/cjs/form/TicketForm.js.map +0 -1
  111. package/dist/cjs/form/TicketSelection.js +0 -177
  112. package/dist/cjs/form/TicketSelection.js.map +0 -1
  113. package/dist/cjs/form/TicketSelectionMap.js +0 -67
  114. package/dist/cjs/form/TicketSelectionMap.js.map +0 -1
  115. package/dist/cjs/form/TicketWithMerchandiseSelection.js +0 -121
  116. package/dist/cjs/form/TicketWithMerchandiseSelection.js.map +0 -1
  117. package/dist/cjs/form/TimeslotSelection.js +0 -68
  118. package/dist/cjs/form/TimeslotSelection.js.map +0 -1
  119. package/dist/cjs/form/extra-field/ExtraField.js +0 -20
  120. package/dist/cjs/form/extra-field/ExtraField.js.map +0 -1
  121. package/dist/cjs/form/extra-field/ReleaseExtraFields.js +0 -60
  122. package/dist/cjs/form/extra-field/ReleaseExtraFields.js.map +0 -1
  123. package/dist/cjs/form/index.js +0 -69
  124. package/dist/cjs/form/index.js.map +0 -1
  125. package/dist/cjs/form/payment/FeeBox.js +0 -42
  126. package/dist/cjs/form/payment/FeeBox.js.map +0 -1
  127. package/dist/cjs/form/payment/PaymentOverviewCheckbox.js +0 -47
  128. package/dist/cjs/form/payment/PaymentOverviewCheckbox.js.map +0 -1
  129. package/dist/cjs/form/payment/PaymentSkeleton.js +0 -14
  130. package/dist/cjs/form/payment/PaymentSkeleton.js.map +0 -1
  131. package/dist/cjs/form/product/ProductCard.js +0 -61
  132. package/dist/cjs/form/product/ProductCard.js.map +0 -1
  133. package/dist/cjs/form/product/ProductVariantsDialog.js +0 -173
  134. package/dist/cjs/form/product/ProductVariantsDialog.js.map +0 -1
  135. package/dist/cjs/form/shipping/ShippingSkeleton.js +0 -14
  136. package/dist/cjs/form/shipping/ShippingSkeleton.js.map +0 -1
  137. package/dist/cjs/form/style.js +0 -50
  138. package/dist/cjs/form/style.js.map +0 -1
  139. package/dist/cjs/form/timeslot/TimeslotCalendar.js +0 -57
  140. package/dist/cjs/form/timeslot/TimeslotCalendar.js.map +0 -1
  141. package/dist/cjs/hooks/data/useActiveEventProducts.js +0 -22
  142. package/dist/cjs/hooks/data/useActiveEventProducts.js.map +0 -1
  143. package/dist/cjs/hooks/data/useAllowedPaymentMethods.js +0 -22
  144. package/dist/cjs/hooks/data/useAllowedPaymentMethods.js.map +0 -1
  145. package/dist/cjs/hooks/data/useEvent.js +0 -22
  146. package/dist/cjs/hooks/data/useEvent.js.map +0 -1
  147. package/dist/cjs/hooks/data/useEventActiveReleases.js +0 -26
  148. package/dist/cjs/hooks/data/useEventActiveReleases.js.map +0 -1
  149. package/dist/cjs/hooks/data/useEventShippingMethods.js +0 -22
  150. package/dist/cjs/hooks/data/useEventShippingMethods.js.map +0 -1
  151. package/dist/cjs/hooks/data/useEventTimeslots.js +0 -23
  152. package/dist/cjs/hooks/data/useEventTimeslots.js.map +0 -1
  153. package/dist/cjs/hooks/useCountdown.js +0 -40
  154. package/dist/cjs/hooks/useCountdown.js.map +0 -1
  155. package/dist/cjs/hooks/useDebounce.js +0 -17
  156. package/dist/cjs/hooks/useDebounce.js.map +0 -1
  157. package/dist/cjs/hooks/useErrors.js +0 -28
  158. package/dist/cjs/hooks/useErrors.js.map +0 -1
  159. package/dist/cjs/hooks/useGlobal.js +0 -11
  160. package/dist/cjs/hooks/useGlobal.js.map +0 -1
  161. package/dist/cjs/hooks/useResponsive.js +0 -29
  162. package/dist/cjs/hooks/useResponsive.js.map +0 -1
  163. package/dist/cjs/locales/cs.js +0 -163
  164. package/dist/cjs/locales/cs.js.map +0 -1
  165. package/dist/cjs/locales/en.js +0 -164
  166. package/dist/cjs/locales/en.js.map +0 -1
  167. package/dist/cjs/locales/es.js +0 -164
  168. package/dist/cjs/locales/es.js.map +0 -1
  169. package/dist/cjs/locales/index.js +0 -18
  170. package/dist/cjs/locales/index.js.map +0 -1
  171. package/dist/cjs/locales/pl.js +0 -164
  172. package/dist/cjs/locales/pl.js.map +0 -1
  173. package/dist/cjs/locales/sk.js +0 -164
  174. package/dist/cjs/locales/sk.js.map +0 -1
  175. package/dist/cjs/locales/uk.js +0 -164
  176. package/dist/cjs/locales/uk.js.map +0 -1
  177. package/dist/cjs/modules/event-timeslot.js +0 -12
  178. package/dist/cjs/modules/event-timeslot.js.map +0 -1
  179. package/dist/cjs/modules/event.js +0 -24
  180. package/dist/cjs/modules/event.js.map +0 -1
  181. package/dist/cjs/modules/order.js +0 -14
  182. package/dist/cjs/modules/order.js.map +0 -1
  183. package/dist/cjs/modules/promo-code.js +0 -13
  184. package/dist/cjs/modules/promo-code.js.map +0 -1
  185. package/dist/cjs/modules/shopping-cart.js +0 -16
  186. package/dist/cjs/modules/shopping-cart.js.map +0 -1
  187. package/dist/cjs/utils/axios.js +0 -20
  188. package/dist/cjs/utils/axios.js.map +0 -1
  189. package/dist/cjs/utils/data/cookie.js +0 -6
  190. package/dist/cjs/utils/data/cookie.js.map +0 -1
  191. package/dist/cjs/utils/data/currency.js +0 -9
  192. package/dist/cjs/utils/data/currency.js.map +0 -1
  193. package/dist/cjs/utils/data/event.js +0 -8
  194. package/dist/cjs/utils/data/event.js.map +0 -1
  195. package/dist/cjs/utils/data/extra-field.js +0 -16
  196. package/dist/cjs/utils/data/extra-field.js.map +0 -1
  197. package/dist/cjs/utils/data/gender.js +0 -9
  198. package/dist/cjs/utils/data/gender.js.map +0 -1
  199. package/dist/cjs/utils/data/global.js +0 -6
  200. package/dist/cjs/utils/data/global.js.map +0 -1
  201. package/dist/cjs/utils/data/gopay.js +0 -14
  202. package/dist/cjs/utils/data/gopay.js.map +0 -1
  203. package/dist/cjs/utils/data/language.js +0 -14
  204. package/dist/cjs/utils/data/language.js.map +0 -1
  205. package/dist/cjs/utils/data/lottie/bank-transfer.json.js +0 -20
  206. package/dist/cjs/utils/data/lottie/bank-transfer.json.js.map +0 -1
  207. package/dist/cjs/utils/data/promo-code.js +0 -8
  208. package/dist/cjs/utils/data/promo-code.js.map +0 -1
  209. package/dist/cjs/utils/data/shipping-method.js +0 -8
  210. package/dist/cjs/utils/data/shipping-method.js.map +0 -1
  211. package/dist/cjs/utils/formatNumber.js +0 -19
  212. package/dist/cjs/utils/formatNumber.js.map +0 -1
  213. package/dist/cjs/utils/global.js +0 -26
  214. package/dist/cjs/utils/global.js.map +0 -1
  215. package/dist/cjs/utils/gtm.js +0 -125
  216. package/dist/cjs/utils/gtm.js.map +0 -1
  217. package/dist/cjs/utils/isBrowser.js +0 -6
  218. package/dist/cjs/utils/isBrowser.js.map +0 -1
  219. package/dist/cjs/utils/place.js +0 -6
  220. package/dist/cjs/utils/place.js.map +0 -1
  221. package/dist/cjs/utils/price.js +0 -15
  222. package/dist/cjs/utils/price.js.map +0 -1
  223. package/dist/cjs/utils/product.js +0 -29
  224. package/dist/cjs/utils/product.js.map +0 -1
  225. package/dist/cjs/utils/translation.js +0 -6
  226. package/dist/cjs/utils/translation.js.map +0 -1
  227. package/dist/cjs/utils/url.js +0 -18
  228. package/dist/cjs/utils/url.js.map +0 -1
  229. package/dist/esm/components/ClientOnly.js +0 -15
  230. package/dist/esm/components/ClientOnly.js.map +0 -1
  231. package/dist/esm/components/CustomSkeleton.js +0 -11
  232. package/dist/esm/components/CustomSkeleton.js.map +0 -1
  233. package/dist/esm/components/Image.js +0 -67
  234. package/dist/esm/components/Image.js.map +0 -1
  235. package/dist/esm/components/Label.js +0 -61
  236. package/dist/esm/components/Label.js.map +0 -1
  237. package/dist/esm/components/TextIconLabel.js +0 -15
  238. package/dist/esm/components/TextIconLabel.js.map +0 -1
  239. package/dist/esm/components/TicketFormSkeleton.js +0 -51
  240. package/dist/esm/components/TicketFormSkeleton.js.map +0 -1
  241. package/dist/esm/components/Trans.js +0 -85
  242. package/dist/esm/components/Trans.js.map +0 -1
  243. package/dist/esm/components/animate/IconButtonAnimate.js +0 -27
  244. package/dist/esm/components/animate/IconButtonAnimate.js.map +0 -1
  245. package/dist/esm/components/animate/MotionContainer.js +0 -14
  246. package/dist/esm/components/animate/MotionContainer.js.map +0 -1
  247. package/dist/esm/components/animate/variants/bounce.js +0 -96
  248. package/dist/esm/components/animate/variants/bounce.js.map +0 -1
  249. package/dist/esm/components/animate/variants/container.js +0 -23
  250. package/dist/esm/components/animate/variants/container.js.map +0 -1
  251. package/dist/esm/components/animate/variants/transition.js +0 -14
  252. package/dist/esm/components/animate/variants/transition.js.map +0 -1
  253. package/dist/esm/components/confirm-dialog/ConfirmDialog.js +0 -20
  254. package/dist/esm/components/confirm-dialog/ConfirmDialog.js.map +0 -1
  255. package/dist/esm/components/hook-form/FormProvider.js +0 -10
  256. package/dist/esm/components/hook-form/FormProvider.js.map +0 -1
  257. package/dist/esm/components/hook-form/RHFCheckbox.js +0 -13
  258. package/dist/esm/components/hook-form/RHFCheckbox.js.map +0 -1
  259. package/dist/esm/components/hook-form/RHFDatePicker.js +0 -18
  260. package/dist/esm/components/hook-form/RHFDatePicker.js.map +0 -1
  261. package/dist/esm/components/hook-form/RHFPhone.js +0 -20
  262. package/dist/esm/components/hook-form/RHFPhone.js.map +0 -1
  263. package/dist/esm/components/hook-form/RHFRadioGroup.js +0 -25
  264. package/dist/esm/components/hook-form/RHFRadioGroup.js.map +0 -1
  265. package/dist/esm/components/hook-form/RHFSelect.js +0 -32
  266. package/dist/esm/components/hook-form/RHFSelect.js.map +0 -1
  267. package/dist/esm/components/hook-form/RHFTextField.js +0 -11
  268. package/dist/esm/components/hook-form/RHFTextField.js.map +0 -1
  269. package/dist/esm/components/iconify/Iconify.js +0 -10
  270. package/dist/esm/components/iconify/Iconify.js.map +0 -1
  271. package/dist/esm/context/GlobalContext.js +0 -62
  272. package/dist/esm/context/GlobalContext.js.map +0 -1
  273. package/dist/esm/form/ChildEventCard.js +0 -56
  274. package/dist/esm/form/ChildEventCard.js.map +0 -1
  275. package/dist/esm/form/ChildEventDialog.js +0 -26
  276. package/dist/esm/form/ChildEventDialog.js.map +0 -1
  277. package/dist/esm/form/ChildEvents.js +0 -13
  278. package/dist/esm/form/ChildEvents.js.map +0 -1
  279. package/dist/esm/form/ContactPerson.js +0 -36
  280. package/dist/esm/form/ContactPerson.js.map +0 -1
  281. package/dist/esm/form/EmailConfirmation.js +0 -23
  282. package/dist/esm/form/EmailConfirmation.js.map +0 -1
  283. package/dist/esm/form/MerchandiseSelection.js +0 -13
  284. package/dist/esm/form/MerchandiseSelection.js.map +0 -1
  285. package/dist/esm/form/OrderSuccess.js +0 -53
  286. package/dist/esm/form/OrderSuccess.js.map +0 -1
  287. package/dist/esm/form/Payment.js +0 -210
  288. package/dist/esm/form/Payment.js.map +0 -1
  289. package/dist/esm/form/PaymentOverviewBox.js +0 -408
  290. package/dist/esm/form/PaymentOverviewBox.js.map +0 -1
  291. package/dist/esm/form/PaymentPending.js +0 -22
  292. package/dist/esm/form/PaymentPending.js.map +0 -1
  293. package/dist/esm/form/PaymentSuccess.js +0 -199
  294. package/dist/esm/form/PaymentSuccess.js.map +0 -1
  295. package/dist/esm/form/ReleaseCountdown.js +0 -30
  296. package/dist/esm/form/ReleaseCountdown.js.map +0 -1
  297. package/dist/esm/form/ReleaseWithMerchandise.js +0 -126
  298. package/dist/esm/form/ReleaseWithMerchandise.js.map +0 -1
  299. package/dist/esm/form/ScriptLoader.js +0 -17
  300. package/dist/esm/form/ScriptLoader.js.map +0 -1
  301. package/dist/esm/form/Shipping.js +0 -115
  302. package/dist/esm/form/Shipping.js.map +0 -1
  303. package/dist/esm/form/TicketForm.js +0 -447
  304. package/dist/esm/form/TicketForm.js.map +0 -1
  305. package/dist/esm/form/TicketSelection.js +0 -173
  306. package/dist/esm/form/TicketSelection.js.map +0 -1
  307. package/dist/esm/form/TicketSelectionMap.js +0 -63
  308. package/dist/esm/form/TicketSelectionMap.js.map +0 -1
  309. package/dist/esm/form/TicketWithMerchandiseSelection.js +0 -117
  310. package/dist/esm/form/TicketWithMerchandiseSelection.js.map +0 -1
  311. package/dist/esm/form/TimeslotSelection.js +0 -64
  312. package/dist/esm/form/TimeslotSelection.js.map +0 -1
  313. package/dist/esm/form/extra-field/ExtraField.js +0 -16
  314. package/dist/esm/form/extra-field/ExtraField.js.map +0 -1
  315. package/dist/esm/form/extra-field/ReleaseExtraFields.js +0 -56
  316. package/dist/esm/form/extra-field/ReleaseExtraFields.js.map +0 -1
  317. package/dist/esm/form/index.js +0 -65
  318. package/dist/esm/form/index.js.map +0 -1
  319. package/dist/esm/form/payment/FeeBox.js +0 -38
  320. package/dist/esm/form/payment/FeeBox.js.map +0 -1
  321. package/dist/esm/form/payment/PaymentOverviewCheckbox.js +0 -43
  322. package/dist/esm/form/payment/PaymentOverviewCheckbox.js.map +0 -1
  323. package/dist/esm/form/payment/PaymentSkeleton.js +0 -10
  324. package/dist/esm/form/payment/PaymentSkeleton.js.map +0 -1
  325. package/dist/esm/form/product/ProductCard.js +0 -57
  326. package/dist/esm/form/product/ProductCard.js.map +0 -1
  327. package/dist/esm/form/product/ProductVariantsDialog.js +0 -169
  328. package/dist/esm/form/product/ProductVariantsDialog.js.map +0 -1
  329. package/dist/esm/form/shipping/ShippingSkeleton.js +0 -10
  330. package/dist/esm/form/shipping/ShippingSkeleton.js.map +0 -1
  331. package/dist/esm/form/style.js +0 -44
  332. package/dist/esm/form/style.js.map +0 -1
  333. package/dist/esm/form/timeslot/TimeslotCalendar.js +0 -53
  334. package/dist/esm/form/timeslot/TimeslotCalendar.js.map +0 -1
  335. package/dist/esm/hooks/data/useActiveEventProducts.js +0 -18
  336. package/dist/esm/hooks/data/useActiveEventProducts.js.map +0 -1
  337. package/dist/esm/hooks/data/useAllowedPaymentMethods.js +0 -18
  338. package/dist/esm/hooks/data/useAllowedPaymentMethods.js.map +0 -1
  339. package/dist/esm/hooks/data/useEvent.js +0 -18
  340. package/dist/esm/hooks/data/useEvent.js.map +0 -1
  341. package/dist/esm/hooks/data/useEventActiveReleases.js +0 -22
  342. package/dist/esm/hooks/data/useEventActiveReleases.js.map +0 -1
  343. package/dist/esm/hooks/data/useEventShippingMethods.js +0 -18
  344. package/dist/esm/hooks/data/useEventShippingMethods.js.map +0 -1
  345. package/dist/esm/hooks/data/useEventTimeslots.js +0 -19
  346. package/dist/esm/hooks/data/useEventTimeslots.js.map +0 -1
  347. package/dist/esm/hooks/useCountdown.js +0 -36
  348. package/dist/esm/hooks/useCountdown.js.map +0 -1
  349. package/dist/esm/hooks/useDebounce.js +0 -13
  350. package/dist/esm/hooks/useDebounce.js.map +0 -1
  351. package/dist/esm/hooks/useErrors.js +0 -24
  352. package/dist/esm/hooks/useErrors.js.map +0 -1
  353. package/dist/esm/hooks/useGlobal.js +0 -7
  354. package/dist/esm/hooks/useGlobal.js.map +0 -1
  355. package/dist/esm/hooks/useResponsive.js +0 -25
  356. package/dist/esm/hooks/useResponsive.js.map +0 -1
  357. package/dist/esm/locales/cs.js +0 -159
  358. package/dist/esm/locales/cs.js.map +0 -1
  359. package/dist/esm/locales/en.js +0 -160
  360. package/dist/esm/locales/en.js.map +0 -1
  361. package/dist/esm/locales/es.js +0 -160
  362. package/dist/esm/locales/es.js.map +0 -1
  363. package/dist/esm/locales/index.js +0 -7
  364. package/dist/esm/locales/index.js.map +0 -1
  365. package/dist/esm/locales/pl.js +0 -160
  366. package/dist/esm/locales/pl.js.map +0 -1
  367. package/dist/esm/locales/sk.js +0 -160
  368. package/dist/esm/locales/sk.js.map +0 -1
  369. package/dist/esm/locales/uk.js +0 -160
  370. package/dist/esm/locales/uk.js.map +0 -1
  371. package/dist/esm/modules/event-timeslot.js +0 -10
  372. package/dist/esm/modules/event-timeslot.js.map +0 -1
  373. package/dist/esm/modules/event.js +0 -19
  374. package/dist/esm/modules/event.js.map +0 -1
  375. package/dist/esm/modules/order.js +0 -10
  376. package/dist/esm/modules/order.js.map +0 -1
  377. package/dist/esm/modules/promo-code.js +0 -11
  378. package/dist/esm/modules/promo-code.js.map +0 -1
  379. package/dist/esm/modules/shopping-cart.js +0 -13
  380. package/dist/esm/modules/shopping-cart.js.map +0 -1
  381. package/dist/esm/utils/axios.js +0 -16
  382. package/dist/esm/utils/axios.js.map +0 -1
  383. package/dist/esm/utils/data/cookie.js +0 -4
  384. package/dist/esm/utils/data/cookie.js.map +0 -1
  385. package/dist/esm/utils/data/currency.js +0 -9
  386. package/dist/esm/utils/data/currency.js.map +0 -1
  387. package/dist/esm/utils/data/event.js +0 -8
  388. package/dist/esm/utils/data/event.js.map +0 -1
  389. package/dist/esm/utils/data/extra-field.js +0 -16
  390. package/dist/esm/utils/data/extra-field.js.map +0 -1
  391. package/dist/esm/utils/data/gender.js +0 -9
  392. package/dist/esm/utils/data/gender.js.map +0 -1
  393. package/dist/esm/utils/data/global.js +0 -4
  394. package/dist/esm/utils/data/global.js.map +0 -1
  395. package/dist/esm/utils/data/gopay.js +0 -14
  396. package/dist/esm/utils/data/gopay.js.map +0 -1
  397. package/dist/esm/utils/data/language.js +0 -14
  398. package/dist/esm/utils/data/language.js.map +0 -1
  399. package/dist/esm/utils/data/lottie/bank-transfer.json.js +0 -4
  400. package/dist/esm/utils/data/lottie/bank-transfer.json.js.map +0 -1
  401. package/dist/esm/utils/data/promo-code.js +0 -8
  402. package/dist/esm/utils/data/promo-code.js.map +0 -1
  403. package/dist/esm/utils/data/shipping-method.js +0 -8
  404. package/dist/esm/utils/data/shipping-method.js.map +0 -1
  405. package/dist/esm/utils/formatNumber.js +0 -17
  406. package/dist/esm/utils/formatNumber.js.map +0 -1
  407. package/dist/esm/utils/global.js +0 -21
  408. package/dist/esm/utils/global.js.map +0 -1
  409. package/dist/esm/utils/gtm.js +0 -112
  410. package/dist/esm/utils/gtm.js.map +0 -1
  411. package/dist/esm/utils/isBrowser.js +0 -4
  412. package/dist/esm/utils/isBrowser.js.map +0 -1
  413. package/dist/esm/utils/place.js +0 -4
  414. package/dist/esm/utils/place.js.map +0 -1
  415. package/dist/esm/utils/price.js +0 -12
  416. package/dist/esm/utils/price.js.map +0 -1
  417. package/dist/esm/utils/product.js +0 -27
  418. package/dist/esm/utils/product.js.map +0 -1
  419. package/dist/esm/utils/translation.js +0 -4
  420. package/dist/esm/utils/translation.js.map +0 -1
  421. package/dist/esm/utils/url.js +0 -16
  422. package/dist/esm/utils/url.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BoxProps } from '@mui/material';
3
- import { ColorSchema } from '@utils/types/palette.type.ts';
3
+ import { ColorSchema } from '@utils/types/palette.type';
4
4
  type LabelColor = 'default' | ColorSchema;
5
5
  type LabelVariant = 'filled' | 'outlined' | 'ghost';
6
6
  interface LabelProps extends BoxProps {
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import { ReactElement } from 'react';
1
+ import React, { ReactElement } from 'react';
3
2
  import { StackProps, SxProps } from '@mui/material';
4
3
  interface Props extends StackProps {
5
4
  icon: ReactElement;
@@ -1,5 +1,5 @@
1
1
  import React, { Dispatch, SetStateAction } from 'react';
2
- import { IPixels } from '@utils/types/gtm.type.ts';
2
+ import { IPixels } from '@utils/types/gtm.type';
3
3
  interface Props {
4
4
  setIsPaying: Dispatch<SetStateAction<boolean>>;
5
5
  isIframe?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IEvent } from '@utils/types/event.type.ts';
2
+ import { IEvent } from '@utils/types/event.type';
3
3
  interface Props {
4
4
  event: IEvent;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { IResponse } from '@utils/types/global.type.ts';
2
- import { ICalculateShoppingCartDto, IShoppingCartDto } from '@utils/types/shopping-cart.type.ts';
1
+ import { IResponse } from '@utils/types/global.type';
2
+ import { ICalculateShoppingCartDto, IShoppingCartDto } from '@utils/types/shopping-cart.type';
3
3
  export declare const getCart: (eventId: number, uuid?: string | null) => Promise<IResponse<IShoppingCartDto>>;
4
4
  export declare const calculateCart: (data: ICalculateShoppingCartDto) => Promise<IResponse<IShoppingCartDto>>;
@@ -60,8 +60,3 @@ export interface IEventCategory extends IBase {
60
60
  export interface IEventTag extends IBase {
61
61
  name: string;
62
62
  }
63
- export interface IEventCategory extends IBase {
64
- translation: {
65
- name: string;
66
- } & IBaseLocale;
67
- }
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Languages } from '@utils/data/language';
3
- import { IUser } from '@utils/types/user.type.ts';
3
+ import { IUser } from '@utils/types/user.type';
4
4
  export type PropsWithChildren<P = unknown> = P & {
5
5
  children?: ReactNode | undefined;
6
6
  };
@@ -1,4 +1,4 @@
1
- import { Gender } from '@utils/data/gender.ts';
1
+ import { Gender } from '@utils/data/gender';
2
2
  export interface IUser {
3
3
  email: string;
4
4
  firstName: string;
package/eslint.config.mjs CHANGED
@@ -1,36 +1,112 @@
1
- // eslint.config.js
2
- import js from '@eslint/js';
1
+ import eslint from '@eslint/js';
3
2
  import tseslint from 'typescript-eslint';
4
- import prettier from 'eslint-config-prettier';
5
- import reactPlugin from 'eslint-plugin-react';
3
+ import pluginReact from 'eslint-plugin-react';
4
+ import reactHooks from 'eslint-plugin-react-hooks';
5
+ import jsxA11y from 'eslint-plugin-jsx-a11y';
6
+ import importX from 'eslint-plugin-import-x';
7
+ import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';
8
+ import prettierConfig from 'eslint-config-prettier/flat';
9
+ import prettierPlugin from 'eslint-plugin-prettier';
10
+ import globals from 'globals';
6
11
 
7
- export default [
8
- js.configs.recommended,
9
- ...tseslint.configs.recommended,
12
+ export default tseslint.config(
13
+ // Global ignores
14
+ { ignores: ['**/node_modules/*', 'dist/**', 'eslint.config.mjs'] },
15
+
16
+ // Base configs
17
+ eslint.configs.recommended,
18
+ tseslint.configs.recommended,
19
+
20
+ // React
21
+ pluginReact.configs.flat.recommended,
22
+ pluginReact.configs.flat['jsx-runtime'],
23
+ { settings: { react: { version: 'detect' } } },
24
+
25
+ // JSX a11y
26
+ jsxA11y.flatConfigs.recommended,
27
+
28
+ // Import-x
29
+ importX.flatConfigs.recommended,
30
+ importX.flatConfigs.typescript,
31
+
32
+ // Project-wide settings
10
33
  {
11
- name: 'custom-rules',
34
+ files: ['**/*.{ts,tsx}'],
12
35
  plugins: {
13
- '@typescript-eslint': tseslint.plugin,
14
- react: reactPlugin,
36
+ 'react-hooks': reactHooks,
37
+ prettier: prettierPlugin,
38
+ },
39
+ languageOptions: {
40
+ globals: { ...globals.browser, ...globals.es2021 },
41
+ parserOptions: {
42
+ projectService: true,
43
+ tsconfigRootDir: import.meta.dirname,
44
+ ecmaFeatures: { jsx: true },
45
+ },
46
+ },
47
+ settings: {
48
+ react: { version: 'detect' },
49
+ 'import-x/resolver-next': [
50
+ createTypeScriptImportResolver({ alwaysTryTypes: true }),
51
+ ],
15
52
  },
16
53
  rules: {
17
- '@typescript-eslint/ban-ts-comment': 'off',
18
- '@typescript-eslint/no-empty-function': 'off',
19
- '@typescript-eslint/no-explicit-any': 'off',
20
- 'arrow-body-style': 'warn',
21
- 'react/display-name': 'off',
54
+ // --- Carried over disabled rules ---
55
+ 'no-alert': 'off',
56
+ 'camelcase': 'off',
57
+ 'no-console': 'off',
58
+ 'no-unused-vars': 'off',
59
+ 'no-param-reassign': 'off',
60
+ 'no-underscore-dangle': 'off',
61
+ 'no-restricted-exports': 'off',
62
+ 'no-restricted-syntax': 'off',
63
+ 'no-await-in-loop': 'off',
64
+ 'no-plusplus': 'off',
65
+ 'no-promise-executor-return': 'off',
66
+
67
+ // React
22
68
  'react/no-children-prop': 'off',
23
- 'react/self-closing-comp': 'error',
24
- '@next/next/no-img-element': 'off',
25
- '@typescript-eslint/no-unused-vars': 'warn',
26
- '@typescript-eslint/explicit-module-boundary-types': 'off',
69
+ 'react/react-in-jsx-scope': 'off',
70
+ 'react/no-array-index-key': 'off',
71
+ 'react/require-default-props': 'off',
72
+ 'react/jsx-props-no-spreading': 'off',
73
+ 'react/function-component-definition': 'off',
74
+ 'react/display-name': 'off',
75
+ 'react/jsx-key': 'error',
76
+ 'react-hooks/exhaustive-deps': 'off',
77
+
78
+ // a11y
79
+ 'jsx-a11y/anchor-is-valid': 'off',
80
+ 'jsx-a11y/control-has-associated-label': 'off',
81
+ 'jsx-a11y/no-autofocus': 'off',
82
+
83
+ // Import
84
+ 'import-x/prefer-default-export': 'off',
85
+ 'import-x/no-cycle': 'off',
86
+ 'import-x/no-extraneous-dependencies': ['error', { devDependencies: true }],
87
+ 'import-x/no-named-as-default-member': 'off',
88
+ 'import-x/no-named-as-default': 'off',
89
+ 'import-x/default': 'off',
90
+
91
+ // TypeScript
92
+ '@typescript-eslint/naming-convention': 'off',
93
+ '@typescript-eslint/no-use-before-define': 'off',
94
+ '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
95
+ '@typescript-eslint/no-explicit-any': 'warn',
96
+ '@typescript-eslint/no-empty-object-type': 'warn',
97
+ '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
98
+
99
+ // Warnings
100
+ 'react/jsx-no-useless-fragment': ['warn', { allowExpressions: true }],
101
+ 'prefer-destructuring': ['warn', { object: true, array: false }],
102
+ 'react/no-unstable-nested-components': ['warn', { allowAsProps: true }],
103
+ 'react/jsx-no-duplicate-props': ['warn', { ignoreCase: false }],
104
+
105
+ // Prettier
106
+ 'prettier/prettier': 'error',
27
107
  },
28
108
  },
29
- {
30
- name: 'prettier',
31
- rules: prettier.rules,
32
- },
33
- {
34
- ignores: ['node_modules/**', 'dist/**'],
35
- },
36
- ];
109
+
110
+ // Must be last — disables formatting rules that conflict with Prettier
111
+ prettierConfig,
112
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventlook/sdk",
3
- "version": "1.5.0-beta.1",
3
+ "version": "1.5.0-beta.3",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -23,35 +23,24 @@
23
23
  "dev": "concurrently --kill-others-on-fail --kill-others \"yarn watch:rollup\" \"yarn watch:types\" \"yarn watch:push\"",
24
24
  "dev:simple": "concurrently --kill-others-on-fail \"yarn watch:rollup\" \"yarn watch:types\"",
25
25
  "publish": "npm publish",
26
- "lint:fix": "eslint --fix --ext .ts,.tsx .",
26
+ "lint": "eslint .",
27
+ "lint:fix": "eslint --fix .",
27
28
  "prettier": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",
28
29
  "format": "yarn lint:fix && yarn prettier"
29
30
  },
30
31
  "peerDependencies": {
31
32
  "@emotion/react": "^11.14.0",
32
33
  "@emotion/styled": "^11.14.1",
33
- "@hookform/resolvers": "^5.0.1",
34
- "@iconify/icons-carbon": "^1.2.20",
35
- "@iconify/react": "^6.0.0",
36
34
  "@mui/material": "^7.0.0",
37
35
  "@mui/x-date-pickers": "^8.0.0",
38
- "axios": "^1.9.0",
39
- "dayjs": "^1.11.13",
40
36
  "framer-motion": "^12.12.1",
41
- "js-cookie": "^3.0.5",
42
- "lodash": "^4.17.23",
43
- "lottie-react": "^2.4.1",
44
- "mui-tel-input": "^9.0.1",
45
- "numeral": "^2.0.6",
46
37
  "react": "^18.0.0 || ^19.0.0",
47
- "react-dom": "^18.0.0 || ^19.0.0",
48
- "react-hook-form": "^7.56.4",
49
- "swr": "^2.3.3",
50
- "yup": "^1.6.1"
38
+ "react-dom": "^18.0.0 || ^19.0.0"
51
39
  },
52
40
  "devDependencies": {
53
41
  "@emotion/react": "^11.14.0",
54
42
  "@emotion/styled": "^11.14.1",
43
+ "@eslint/js": "^9",
55
44
  "@hookform/resolvers": "^5.2.2",
56
45
  "@iconify/icons-carbon": "^1.2.20",
57
46
  "@iconify/react": "^6.0.2",
@@ -67,14 +56,20 @@
67
56
  "@types/lodash": "^4.17.24",
68
57
  "@types/numeral": "^2.0.5",
69
58
  "@types/react": "^19.2.14",
70
- "axios": "^1.13.5",
59
+ "axios": "^1.13.6",
71
60
  "chokidar-cli": "^3.0.0",
72
61
  "concurrently": "^9.2.1",
73
62
  "dayjs": "^1.11.19",
74
63
  "eslint": "^9.39.3",
75
64
  "eslint-config-prettier": "^10.1.8",
65
+ "eslint-import-resolver-typescript": "^4.4.4",
66
+ "eslint-plugin-import-x": "^4.16.1",
67
+ "eslint-plugin-jsx-a11y": "^6.10.2",
68
+ "eslint-plugin-prettier": "^5.5.5",
76
69
  "eslint-plugin-react": "^7.37.5",
77
- "framer-motion": "^12.34.3",
70
+ "eslint-plugin-react-hooks": "^5",
71
+ "framer-motion": "^12.34.4",
72
+ "globals": "^17.4.0",
78
73
  "js-cookie": "^3.0.5",
79
74
  "lodash": "^4.17.23",
80
75
  "lottie-react": "^2.4.1",
@@ -86,7 +81,7 @@
86
81
  "react-hook-form": "^7.71.2",
87
82
  "rollup": "^4.59.0",
88
83
  "rollup-plugin-peer-deps-external": "^2.2.4",
89
- "swr": "^2.4.0",
84
+ "swr": "^2.4.1",
90
85
  "tslib": "^2.8.1",
91
86
  "typescript": "^5.9.3",
92
87
  "typescript-eslint": "^8.56.1",
package/rollup.config.mjs CHANGED
@@ -1,10 +1,21 @@
1
1
  import typescript from '@rollup/plugin-typescript';
2
- import peerDepsExternal from 'rollup-plugin-peer-deps-external';
3
2
  import resolve from '@rollup/plugin-node-resolve';
4
3
  import commonjs from '@rollup/plugin-commonjs';
5
4
  import json from '@rollup/plugin-json';
6
5
  import replace from '@rollup/plugin-replace';
7
6
 
7
+ const peerDeps = [
8
+ 'react',
9
+ 'react-dom',
10
+ '@emotion/react',
11
+ '@emotion/styled',
12
+ '@mui/material',
13
+ '@mui/x-date-pickers',
14
+ 'framer-motion',
15
+ ];
16
+
17
+ const nodeBuiltins = ['fs', 'path', 'http', 'https', 'stream', 'os', 'zlib'];
18
+
8
19
  export default {
9
20
  input: './src/index.ts',
10
21
  output: [
@@ -13,21 +24,37 @@ export default {
13
24
  format: 'cjs',
14
25
  sourcemap: true,
15
26
  exports: 'named',
16
- preserveModules: true,
17
- preserveModulesRoot: 'src',
27
+ entryFileNames: 'index.js',
28
+ chunkFileNames: '[name]-[hash].js',
29
+ banner: (chunk) => (chunk.isEntry ? "'use client';" : ''),
18
30
  },
19
31
  {
20
32
  dir: 'dist/esm',
21
33
  format: 'esm',
22
34
  sourcemap: true,
23
35
  exports: 'named',
24
- preserveModules: true,
25
- preserveModulesRoot: 'src',
36
+ entryFileNames: 'index.js',
37
+ chunkFileNames: '[name]-[hash].js',
38
+ banner: (chunk) => (chunk.isEntry ? "'use client';" : ''),
26
39
  },
27
40
  ],
28
41
  preserveEntrySignatures: 'strict',
42
+ onwarn(warning, warn) {
43
+ if (warning.code === 'MODULE_LEVEL_DIRECTIVE') return;
44
+ warn(warning);
45
+ },
29
46
  plugins: [
30
- peerDepsExternal(),
47
+ {
48
+ name: 'lottie-light',
49
+ resolveId(source) {
50
+ if (source === 'lottie-web') {
51
+ return this.resolve('lottie-web/build/player/lottie_light.js', undefined, {
52
+ skipSelf: true,
53
+ });
54
+ }
55
+ return null;
56
+ },
57
+ },
31
58
  json({
32
59
  compact: true,
33
60
  preferConst: true,
@@ -52,19 +79,11 @@ export default {
52
79
  },
53
80
  }),
54
81
  ],
55
- external: [
56
- 'react',
57
- 'react-dom',
58
- 'fs',
59
- 'path',
60
- 'http',
61
- 'https',
62
- 'stream',
63
- 'swr',
64
- 'mui-tel-input',
65
- '@seat-picker/seat-picker-sdk',
66
- '@mui/material',
67
- '@emotion/react',
68
- '@emotion/styled',
69
- ],
82
+ external: (id) => {
83
+ return (
84
+ peerDeps.some((dep) => id === dep || id.startsWith(dep + '/')) ||
85
+ nodeBuiltins.includes(id) ||
86
+ id === '@seat-picker/seat-picker-sdk'
87
+ );
88
+ },
70
89
  };
@@ -1,10 +1,10 @@
1
- import { IGopay } from '@utils/types/gopay.type';
2
-
3
1
  export {};
4
2
  declare global {
5
3
  interface Window {
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
5
  dataLayer: any;
7
- _gopay: IGopay;
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ _gopay: any;
8
8
  Packeta: Packeta;
9
9
  }
10
10
  }
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import { ReactElement } from 'react';
1
+ import React, { ReactElement } from 'react';
3
2
  import { Stack, StackProps, SxProps } from '@mui/material';
4
3
 
5
4
  interface Props extends StackProps {
@@ -1,6 +1,5 @@
1
- import React from 'react';
1
+ import React, { forwardRef, ReactNode } from 'react';
2
2
  import { m } from 'framer-motion';
3
- import { forwardRef, ReactNode } from 'react';
4
3
  import { Box, IconButton, IconButtonProps, SxProps } from '@mui/material';
5
4
 
6
5
  interface Props extends IconButtonProps {
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { LazyMotion } from 'framer-motion';
3
3
 
4
- // @ts-ignore
4
+ // @ts-ignore -- dynamic import of generated features file
5
5
  const loadFeatures = () => import('./features.js').then((res) => res.default);
6
6
 
7
7
  type Props = {
@@ -1,5 +1,4 @@
1
- import React, { RefObject } from 'react';
2
- import { useRef } from 'react';
1
+ import React, { RefObject, useRef } from 'react';
3
2
  // form
4
3
  import { useFormContext, Controller } from 'react-hook-form';
5
4
  // @mui
@@ -143,7 +143,7 @@ export function RHFMultiSelect({
143
143
  displayEmpty={!!placeholder}
144
144
  labelId={name}
145
145
  input={<OutlinedInput fullWidth label={label} error={!!error} />}
146
- // @ts-ignore
146
+ // @ts-ignore -- MUI Select renderValue type mismatch with custom renderer
147
147
  renderValue={renderValues}
148
148
  MenuProps={{
149
149
  PaperProps: {
@@ -50,9 +50,9 @@ const PaymentSuccess: React.FC<Props> = ({ setIsPaying, isIframe, pixels }) => {
50
50
  const { data } = await postOrderPaid({
51
51
  gopayId: Number(paymentId),
52
52
  });
53
- const tickets = data.tickets;
53
+ const { tickets } = data;
54
54
  setTickets(tickets);
55
- const products = data.products;
55
+ const { products } = data;
56
56
  setProducts(products);
57
57
  setState(data.state);
58
58
  setGwUrl(data.gwUrl);
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import { useEffect } from 'react';
1
+ import React, { useEffect } from 'react';
3
2
 
4
3
  const ScriptLoader: React.FC = () => {
5
4
  useEffect(() => {
@@ -136,85 +136,83 @@ const Shipping: React.FC<Props> = ({ event }) => {
136
136
  {t('event.tickets.stepper.5.error')}
137
137
  </Typography>
138
138
  ) : (
139
- <>
140
- <Controller
141
- name="shipping.shippingMethodId"
142
- control={control}
143
- render={({ field, fieldState: { error } }) => (
144
- <FormControl component="fieldset" sx={{ width: '100%' }}>
145
- <RadioGroup {...field}>
146
- {filteredShippingMethods.map((shippingMethod) => (
147
- <ShippingMethodItem
148
- key={shippingMethod.id}
149
- active={Number(shippingMethodId) === shippingMethod.id}
150
- >
151
- <FormControlLabel
152
- value={shippingMethod.id}
153
- control={<Radio />}
154
- label={
155
- <Stack
156
- direction="row"
157
- justifyContent="space-between"
158
- alignItems="center"
159
- width="100%"
160
- >
161
- <Stack direction="row" alignItems="center">
162
- <Box
163
- sx={{
164
- marginRight: 2,
165
- }}
166
- >
167
- <Typography sx={{ lineHeight: 1.2 }}>
168
- {t(`shipping_method.types.${shippingMethod.type}`)}
169
- </Typography>
170
- {displayBranchName &&
171
- shippingMethod.type === ShippingTypes.PACKETA &&
172
- shippingMethod.id === Number(shippingMethodId) && (
173
- <Typography variant="caption" sx={{ lineHeight: 1 }}>
174
- {displayBranchName}
175
- </Typography>
176
- )}
177
- </Box>
178
- {paymentImages[shippingMethod.type]}
179
- </Stack>
180
- {shippingMethod.type === ShippingTypes.PACKETA &&
181
- shippingMethod.id === Number(shippingMethodId) &&
182
- branchId && (
183
- <Box>
184
- <Button
185
- onClick={handleChangeBranch}
186
- variant="outlined"
187
- size="small"
188
- >
189
- {t('change')}
190
- </Button>
191
- </Box>
192
- )}
139
+ <Controller
140
+ name="shipping.shippingMethodId"
141
+ control={control}
142
+ render={({ field, fieldState: { error } }) => (
143
+ <FormControl component="fieldset" sx={{ width: '100%' }}>
144
+ <RadioGroup {...field}>
145
+ {filteredShippingMethods.map((shippingMethod) => (
146
+ <ShippingMethodItem
147
+ key={shippingMethod.id}
148
+ active={Number(shippingMethodId) === shippingMethod.id}
149
+ >
150
+ <FormControlLabel
151
+ value={shippingMethod.id}
152
+ control={<Radio />}
153
+ label={
154
+ <Stack
155
+ direction="row"
156
+ justifyContent="space-between"
157
+ alignItems="center"
158
+ width="100%"
159
+ >
160
+ <Stack direction="row" alignItems="center">
161
+ <Box
162
+ sx={{
163
+ marginRight: 2,
164
+ }}
165
+ >
166
+ <Typography sx={{ lineHeight: 1.2 }}>
167
+ {t(`shipping_method.types.${shippingMethod.type}`)}
168
+ </Typography>
169
+ {displayBranchName &&
170
+ shippingMethod.type === ShippingTypes.PACKETA &&
171
+ shippingMethod.id === Number(shippingMethodId) && (
172
+ <Typography variant="caption" sx={{ lineHeight: 1 }}>
173
+ {displayBranchName}
174
+ </Typography>
175
+ )}
176
+ </Box>
177
+ {paymentImages[shippingMethod.type]}
193
178
  </Stack>
194
- }
195
- sx={{
196
- '&:not(:last-of-type)': {
197
- mb: 0,
198
- },
199
- '& .MuiFormControlLabel-label': {
200
- width: '100%',
201
- mr: 0,
202
- },
203
- }}
204
- />
205
- </ShippingMethodItem>
206
- ))}
207
- </RadioGroup>
179
+ {shippingMethod.type === ShippingTypes.PACKETA &&
180
+ shippingMethod.id === Number(shippingMethodId) &&
181
+ branchId && (
182
+ <Box>
183
+ <Button
184
+ onClick={handleChangeBranch}
185
+ variant="outlined"
186
+ size="small"
187
+ >
188
+ {t('change')}
189
+ </Button>
190
+ </Box>
191
+ )}
192
+ </Stack>
193
+ }
194
+ sx={{
195
+ '&:not(:last-of-type)': {
196
+ mb: 0,
197
+ },
198
+ '& .MuiFormControlLabel-label': {
199
+ width: '100%',
200
+ mr: 0,
201
+ },
202
+ }}
203
+ />
204
+ </ShippingMethodItem>
205
+ ))}
206
+ </RadioGroup>
208
207
 
209
- {!!error && (
210
- <FormHelperText error={!!error} sx={{ mx: 0 }}>
211
- {error?.message}
212
- </FormHelperText>
213
- )}
214
- </FormControl>
215
- )}
216
- />
217
- </>
208
+ {!!error && (
209
+ <FormHelperText error={!!error} sx={{ mx: 0 }}>
210
+ {error?.message}
211
+ </FormHelperText>
212
+ )}
213
+ </FormControl>
214
+ )}
215
+ />
218
216
  )}
219
217
  </>
220
218
  )}