@mercurjs/admin 2.0.0-canary.34 → 2.0.0-canary.36

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 (250) hide show
  1. package/dist/{add-campaign-promotions-UVEH25GZ.js → add-campaign-promotions-ZUXBF5G3.js} +10 -10
  2. package/dist/{adjust-inventory-6Q53EEFB.js → adjust-inventory-HZCWL6SC.js} +10 -10
  3. package/dist/api-key-management-detail-SKJNAZ5L.js +87 -0
  4. package/dist/api-key-management-list-2D4WKI6Y.js +33 -0
  5. package/dist/{campaign-create-2IIU3WTS.js → campaign-create-B7XM2FZM.js} +4 -4
  6. package/dist/campaign-detail-7U4CQHU5.js +105 -0
  7. package/dist/campaign-list-SC7FLTRM.js +31 -0
  8. package/dist/{categories-metadata-G7JDGW6O.js → categories-metadata-LPSJNCME.js} +12 -12
  9. package/dist/category-detail-HGHR3R2R.js +105 -0
  10. package/dist/category-list-QBBFGHQM.js +32 -0
  11. package/dist/{category-products-FH4RIZKA.js → category-products-XLCG2JR7.js} +14 -14
  12. package/dist/{chunk-36WVODFU.js → chunk-23663A2W.js} +1 -1
  13. package/dist/chunk-2IGCU3KP.js +170 -0
  14. package/dist/chunk-33FUPXJL.js +102 -0
  15. package/dist/{chunk-O5HZRJPB.js → chunk-3B6MTW5G.js} +9 -0
  16. package/dist/{shipping-profiles-list-FUW4FXLC.js → chunk-3H74EI2D.js} +11 -19
  17. package/dist/{shipping-profile-detail-WHKHB2OQ.js → chunk-3IYIS5UZ.js} +15 -61
  18. package/dist/{return-reason-list-MRYG7ZK7.js → chunk-3SAH3NUS.js} +12 -80
  19. package/dist/chunk-4GVHNYZR.js +294 -0
  20. package/dist/chunk-4WYBW3HK.js +209 -0
  21. package/dist/chunk-5GG65TKV.js +335 -0
  22. package/dist/{customer-group-detail-CPONLZRF.js → chunk-5VEYNZSW.js} +33 -119
  23. package/dist/{customer-group-list-V2CGT3FT.js → chunk-62ZRA6BZ.js} +2 -37
  24. package/dist/{category-list-YPRENMVF.js → chunk-66IHH2HG.js} +105 -89
  25. package/dist/chunk-6L2LSIPR.js +223 -0
  26. package/dist/{region-list-PGWUOULN.js → chunk-6PNMR6XP.js} +18 -32
  27. package/dist/{product-type-list-T5KO5J3W.js → chunk-7COSFMM7.js} +17 -30
  28. package/dist/{api-key-management-detail-RQW5RC5F.js → chunk-7TLEUIAL.js} +22 -80
  29. package/dist/{product-tag-list-I6M6TAYM.js → chunk-A2KURGQO.js} +16 -131
  30. package/dist/{chunk-GFZ7GOEU.js → chunk-A6Z2Q7D5.js} +2 -2
  31. package/dist/{customer-detail-YS265DZS.js → chunk-AOVEX4EM.js} +74 -158
  32. package/dist/{inventory-detail-42GK24BA.js → chunk-AOVJTW7M.js} +130 -196
  33. package/dist/{payout-list-GE7E637R.js → chunk-BHID7W3U.js} +12 -22
  34. package/dist/{price-list-list-VFHHTBLR.js → chunk-CR4E2DCR.js} +98 -78
  35. package/dist/{chunk-UZVYM65V.js → chunk-D44T5KAE.js} +6 -6
  36. package/dist/{chunk-BFCAJKRG.js → chunk-DBYUB2YI.js} +28 -56
  37. package/dist/{user-detail-Q7ST2YKP.js → chunk-DK3U2SRA.js} +17 -62
  38. package/dist/{refund-reason-list-ECQKWA2M.js → chunk-DP5U3GQU.js} +54 -105
  39. package/dist/chunk-E2AAYIHS.js +250 -0
  40. package/dist/{commission-rate-detail-ANI37QHI.js → chunk-EDQBUWY7.js} +46 -106
  41. package/dist/{region-detail-DIEFHHOM.js → chunk-ENMRRG4N.js} +48 -94
  42. package/dist/{chunk-UZJ2NQSN.js → chunk-FRRQW7BG.js} +4 -4
  43. package/dist/{order-detail-V2O5C4CX.js → chunk-FXU7SL6M.js} +413 -423
  44. package/dist/{product-type-detail-JI4DF7WR.js → chunk-FYB5MS4F.js} +29 -110
  45. package/dist/{chunk-QNGHZSK3.js → chunk-G644AXKV.js} +1 -1
  46. package/dist/chunk-GJTIHFXG.js +115 -0
  47. package/dist/{sales-channel-list-2ZUNUM2T.js → chunk-HHNJNKCB.js} +16 -54
  48. package/dist/{campaign-list-EAGDQZO3.js → chunk-HZKW7HRU.js} +14 -32
  49. package/dist/chunk-IXGP2EEN.js +425 -0
  50. package/dist/{profile-detail-AWZ4EZ6R.js → chunk-J7SR4GW5.js} +10 -15
  51. package/dist/{product-variant-detail-DXTUM4R7.js → chunk-JA2XIIIZ.js} +96 -178
  52. package/dist/{price-list-detail-324FZRK5.js → chunk-JRWB7VWP.js} +59 -130
  53. package/dist/{category-detail-2U65E3CX.js → chunk-KUDLPUWR.js} +70 -146
  54. package/dist/{collection-detail-Y4GGSHXX.js → chunk-KXPCEVFB.js} +44 -121
  55. package/dist/{location-list-KVFFPEIV.js → chunk-KYUXTS2L.js} +61 -86
  56. package/dist/{chunk-M3I52H3M.js → chunk-LU72QEQC.js} +4 -4
  57. package/dist/{location-detail-XO4RRCAU.js → chunk-LYT3RI4O.js} +90 -155
  58. package/dist/chunk-NOWUEJ74.js +44 -0
  59. package/dist/{product-detail-3UWUMNHC.js → chunk-NQPAEBSZ.js} +145 -195
  60. package/dist/{api-key-management-list-VYQ4AVSX.js → chunk-O6O22BN4.js} +9 -29
  61. package/dist/{tax-region-province-detail-PB7RFWJ4.js → chunk-OFRQZHVQ.js} +15 -99
  62. package/dist/{reservation-detail-J4M2EXRY.js → chunk-OSHCUDYY.js} +27 -93
  63. package/dist/{campaign-detail-4DO3S5UZ.js → chunk-Q6XCCONH.js} +118 -193
  64. package/dist/{payout-detail-PRYOQSGQ.js → chunk-QBOXELB5.js} +7 -41
  65. package/dist/chunk-QD6KYDYH.js +169 -0
  66. package/dist/{commission-rate-list-FCQ3HXC7.js → chunk-QP6XXG6A.js} +11 -20
  67. package/dist/{promotion-list-SJYMXQXT.js → chunk-RIMR3ULR.js} +14 -51
  68. package/dist/{shipping-option-type-list-4A7FT4P5.js → chunk-SFG7JTBH.js} +14 -51
  69. package/dist/{sales-channel-detail-RMU5QW3N.js → chunk-T25UE7SS.js} +39 -120
  70. package/dist/{tax-region-detail-L3EB6JSF.js → chunk-TE5VQBCL.js} +19 -60
  71. package/dist/{reservation-list-X33SIPG3.js → chunk-TKGZBTOS.js} +11 -20
  72. package/dist/{chunk-LQSLDDPT.js → chunk-TZSOL34K.js} +40 -1
  73. package/dist/{chunk-F5PEK3DA.js → chunk-U3SFHLUA.js} +1 -1
  74. package/dist/{chunk-IZ5RG5XI.js → chunk-UXD3VNBO.js} +1 -20
  75. package/dist/{chunk-XE6KSRKQ.js → chunk-V2DXJ75C.js} +1 -1
  76. package/dist/{marketplace-detail-OVWHCK5W.js → chunk-VBAAYYCS.js} +114 -172
  77. package/dist/{chunk-5POS4GBN.js → chunk-WZADCDDE.js} +4 -4
  78. package/dist/{chunk-HOZHWCST.js → chunk-XDVS4B7W.js} +1 -1
  79. package/dist/{promotion-detail-IO7V5CXR.js → chunk-XVKRTPVM.js} +147 -162
  80. package/dist/{inventory-list-UJNDJFJS.js → chunk-YH4VQBAA.js} +11 -19
  81. package/dist/{collection-add-products-RLTEE27D.js → collection-add-products-IQ7M63BA.js} +13 -13
  82. package/dist/collection-detail-YJ3FV2C6.js +96 -0
  83. package/dist/collection-list-WDQOBHQN.js +78 -0
  84. package/dist/{collection-metadata-CQWEZ4EQ.js → collection-metadata-UZ3VN625.js} +10 -10
  85. package/dist/{commission-rate-create-YK6GCP2R.js → commission-rate-create-VC72GTV4.js} +34 -34
  86. package/dist/commission-rate-detail-UQDIIMIK.js +82 -0
  87. package/dist/{commission-rate-edit-5MPI53CE.js → commission-rate-edit-AXJKJNFY.js} +34 -34
  88. package/dist/commission-rate-list-WTDZLKUR.js +27 -0
  89. package/dist/customer-detail-N7CS4IJU.js +106 -0
  90. package/dist/{customer-group-add-customers-FTRCJHE7.js → customer-group-add-customers-LCNDTLXR.js} +6 -6
  91. package/dist/customer-group-detail-UCTY4FF7.js +105 -0
  92. package/dist/customer-group-list-XOQ64CVR.js +48 -0
  93. package/dist/{customer-group-metadata-BITZXXFX.js → customer-group-metadata-FMAZBXIK.js} +11 -11
  94. package/dist/customer-list-BUUO6OF7.js +32 -0
  95. package/dist/{customer-metadata-6DDHIGDD.js → customer-metadata-7GW4JRZR.js} +11 -11
  96. package/dist/{customers-add-customer-group-SD3KK6JE.js → customers-add-customer-group-BKEV24N2.js} +15 -15
  97. package/dist/{edit-inventory-item-5PZZ3IAH.js → edit-inventory-item-RECBP7OX.js} +7 -7
  98. package/dist/{edit-inventory-item-attributes-7PJQCUXL.js → edit-inventory-item-attributes-2P3BMQJ5.js} +8 -8
  99. package/dist/{edit-rules-E2564ZQB.js → edit-rules-DPHJ7PQQ.js} +9 -9
  100. package/dist/index.d.ts +5 -0
  101. package/dist/index.js +564 -757
  102. package/dist/{inventory-create-LYXHQR7Y.js → inventory-create-QLEIHESO.js} +20 -20
  103. package/dist/inventory-detail-BJT5WEV5.js +106 -0
  104. package/dist/inventory-list-3LWBPWVK.js +29 -0
  105. package/dist/{inventory-metadata-OLR5ZMMN.js → inventory-metadata-ZNHZQEMX.js} +11 -11
  106. package/dist/{inventory-stock-ZOM2ANKJ.js → inventory-stock-G3GP4FZX.js} +17 -17
  107. package/dist/location-detail-N7J6PEAP.js +99 -0
  108. package/dist/{location-fulfillment-providers-6T27UNF7.js → location-fulfillment-providers-BHCY2MYC.js} +18 -18
  109. package/dist/location-list-UG6B47NP.js +52 -0
  110. package/dist/{location-service-zone-create-IYKQNCNO.js → location-service-zone-create-AIVG7HTM.js} +8 -8
  111. package/dist/{location-service-zone-manage-areas-L7BQTR7S.js → location-service-zone-manage-areas-EZSV25CP.js} +10 -10
  112. package/dist/{location-service-zone-shipping-option-create-PSPX634E.js → location-service-zone-shipping-option-create-GYPW6SSN.js} +18 -18
  113. package/dist/{location-service-zone-shipping-option-pricing-HC7Z4BVU.js → location-service-zone-shipping-option-pricing-7VMPXDWX.js} +8 -8
  114. package/dist/{login-U5WERLJC.js → login-2HSCF4ZB.js} +16 -10
  115. package/dist/{marketplace-add-currencies-XQPZT237.js → marketplace-add-currencies-CIGOPBO6.js} +7 -7
  116. package/dist/marketplace-detail-7KJMXXAJ.js +74 -0
  117. package/dist/{marketplace-metadata-GIYATM54.js → marketplace-metadata-PHZ4PUWM.js} +11 -11
  118. package/dist/{order-create-claim-UWNZUBL7.js → order-create-claim-7WW6MXTT.js} +34 -34
  119. package/dist/{order-create-edit-JD4UZ5GW.js → order-create-edit-KAH6ZPLX.js} +20 -20
  120. package/dist/{order-create-exchange-OTIDP47E.js → order-create-exchange-ELLWF3IY.js} +31 -31
  121. package/dist/{order-create-fulfillment-7OP64TNJ.js → order-create-fulfillment-E3J7ILOJ.js} +13 -13
  122. package/dist/{order-create-refund-U4UK5IZB.js → order-create-refund-5QZBOSCA.js} +13 -13
  123. package/dist/{order-create-return-LH4LW5BZ.js → order-create-return-L6DEDPJK.js} +17 -17
  124. package/dist/{order-create-shipment-URYCUNU6.js → order-create-shipment-NBQ226NM.js} +7 -7
  125. package/dist/order-detail-C25NQSZN.js +122 -0
  126. package/dist/{order-edit-billing-address-XRUEKX33.js → order-edit-billing-address-NVRMPZEU.js} +14 -14
  127. package/dist/{order-edit-email-CJ3MEZB6.js → order-edit-email-5FA7X52X.js} +7 -7
  128. package/dist/{order-edit-shipping-address-SV4UVNBQ.js → order-edit-shipping-address-BPU7OL2N.js} +11 -11
  129. package/dist/order-list-7NH7LROU.js +48 -0
  130. package/dist/{order-metadata-HIOSALZT.js → order-metadata-47FUKENZ.js} +10 -10
  131. package/dist/{order-receive-return-4SRRRBW6.js → order-receive-return-FW5QZJBM.js} +8 -8
  132. package/dist/{order-request-transfer-5AGKGFVY.js → order-request-transfer-WD327YGL.js} +7 -7
  133. package/dist/pages/index.d.ts +638 -0
  134. package/dist/pages/index.js +359 -0
  135. package/dist/payout-detail-MDD5SRK5.js +51 -0
  136. package/dist/payout-list-XY2A5KYS.js +28 -0
  137. package/dist/{price-list-configuration-GK4MA3BE.js → price-list-configuration-XK3IZLLX.js} +8 -8
  138. package/dist/{price-list-create-3NNWUS6L.js → price-list-create-OK7YYLAB.js} +22 -22
  139. package/dist/price-list-detail-IGFSM77P.js +102 -0
  140. package/dist/price-list-list-TBXQ5DOS.js +35 -0
  141. package/dist/{price-list-prices-add-IBSLTMNK.js → price-list-prices-add-7PGUONDK.js} +18 -18
  142. package/dist/{price-list-prices-edit-AAVPX34P.js → price-list-prices-edit-QVGBT6AI.js} +14 -14
  143. package/dist/{product-create-C4GHUEM5.js → product-create-NVBKO426.js} +218 -383
  144. package/dist/{product-create-variant-5MVBT5ST.js → product-create-variant-CJPECBV4.js} +68 -230
  145. package/dist/product-detail-ZC37BGPC.js +100 -0
  146. package/dist/{product-export-XTS7P5AD.js → product-export-ULTY2SNJ.js} +14 -14
  147. package/dist/{product-import-ZEZE2JE6.js → product-import-Q2CPHVNJ.js} +10 -10
  148. package/dist/product-list-635ZXM2D.js +85 -0
  149. package/dist/{product-media-Z2DCRZSU.js → product-media-ZMDAVPGI.js} +4 -4
  150. package/dist/{product-metadata-NBB5SRDN.js → product-metadata-36JNWKCJ.js} +10 -10
  151. package/dist/{product-stock-ZXNZZBJI.js → product-stock-HF42WRSC.js} +18 -18
  152. package/dist/{product-tag-create-LL35OFZM.js → product-tag-create-VCRDLR27.js} +7 -7
  153. package/dist/product-tag-detail-OJLYO3Q5.js +135 -0
  154. package/dist/{product-tag-edit-6XBZCCED.js → product-tag-edit-BYE7UP54.js} +7 -7
  155. package/dist/product-tag-list-XFHGJBRF.js +129 -0
  156. package/dist/{product-tag-metadata-UGO4RUFU.js → product-tag-metadata-ADHNZA2H.js} +10 -10
  157. package/dist/product-type-detail-J4UA4AEM.js +97 -0
  158. package/dist/product-type-list-H5EQHCXS.js +34 -0
  159. package/dist/{product-type-metadata-ZKOZNZE3.js → product-type-metadata-UY22KDAN.js} +10 -10
  160. package/dist/product-variant-detail-5WKYURFA.js +111 -0
  161. package/dist/{product-variant-edit-KGLW5GXD.js → product-variant-edit-66ZUIIMP.js} +10 -10
  162. package/dist/{product-variant-metadata-H7J7SZNU.js → product-variant-metadata-7N5F7DM5.js} +10 -10
  163. package/dist/profile-detail-EYNXOHGZ.js +17 -0
  164. package/dist/{promotion-add-campaign-OEMV62HF.js → promotion-add-campaign-B5SF72KC.js} +4 -4
  165. package/dist/{promotion-create-P2WR5RPH.js → promotion-create-D77SANLX.js} +17 -17
  166. package/dist/promotion-detail-MVFOMS4E.js +87 -0
  167. package/dist/promotion-list-IN4VWEQN.js +57 -0
  168. package/dist/{refund-reason-create-PTHFUT2D.js → refund-reason-create-BHI5XXZC.js} +7 -7
  169. package/dist/{refund-reason-edit-WEEQQGYO.js → refund-reason-edit-UWWYC4OB.js} +7 -7
  170. package/dist/refund-reason-list-DJZZC7KK.js +101 -0
  171. package/dist/{region-add-countries-GVOTB5YX.js → region-add-countries-YOGU74UR.js} +9 -9
  172. package/dist/{region-create-3BCYTIDB.js → region-create-UMJK3VGL.js} +14 -14
  173. package/dist/region-detail-OFZHX57G.js +73 -0
  174. package/dist/region-list-L4FKHVJJ.js +34 -0
  175. package/dist/{region-metadata-IYIHJCTK.js → region-metadata-JLHWQGTC.js} +11 -11
  176. package/dist/reservation-detail-LZYEM5NW.js +82 -0
  177. package/dist/reservation-list-OGPDB7WG.js +30 -0
  178. package/dist/{reservation-metadata-MMHE4TPO.js → reservation-metadata-WB42HSMD.js} +11 -11
  179. package/dist/{reset-password-WNANNJDX.js → reset-password-Q7Y4FWRE.js} +2 -2
  180. package/dist/return-reason-list-6ICMSVKF.js +80 -0
  181. package/dist/{sales-channel-add-products-GP7TMMKB.js → sales-channel-add-products-EOWFSO35.js} +14 -14
  182. package/dist/sales-channel-detail-RRJG7U7R.js +97 -0
  183. package/dist/sales-channel-list-LUZ4ZXCY.js +50 -0
  184. package/dist/{sales-channel-metadata-QF5KEN7C.js → sales-channel-metadata-5CLXRNQF.js} +12 -12
  185. package/dist/{seller-details-EUCYPH4Z.js → seller-details-KROISMQC.js} +48 -48
  186. package/dist/seller-list-664H4SI5.js +79 -0
  187. package/dist/{shipping-option-type-create-KBQMPNIW.js → shipping-option-type-create-42URKECR.js} +7 -7
  188. package/dist/shipping-option-type-detail-2RY3NHRO.js +81 -0
  189. package/dist/{shipping-option-type-edit-S3R6JBFV.js → shipping-option-type-edit-VLFV2AR4.js} +7 -7
  190. package/dist/shipping-option-type-list-IOSOE33S.js +59 -0
  191. package/dist/shipping-profile-detail-RIIAX7VE.js +56 -0
  192. package/dist/{shipping-profile-metadata-BJFUYS5L.js → shipping-profile-metadata-7WDHFEEH.js} +10 -10
  193. package/dist/shipping-profiles-list-AL4EJSJY.js +26 -0
  194. package/dist/{tax-region-create-KTFZNQCZ.js → tax-region-create-UOTLTCOP.js} +14 -14
  195. package/dist/tax-region-detail-CA2W5W6A.js +67 -0
  196. package/dist/{tax-region-edit-H2ORQVEW.js → tax-region-edit-7O2Z3EYC.js} +7 -7
  197. package/dist/tax-region-list-JTZ7KZCX.js +26 -0
  198. package/dist/{tax-region-metadata-2PYZ5ECB.js → tax-region-metadata-VQ57FSEM.js} +11 -11
  199. package/dist/tax-region-province-detail-ZHLX4FF4.js +98 -0
  200. package/dist/{tax-region-tax-override-create-IDGG732M.js → tax-region-tax-override-create-WIWUNXW6.js} +31 -31
  201. package/dist/{tax-region-tax-override-edit-NSBZBBZA.js → tax-region-tax-override-edit-SWROFQTP.js} +31 -31
  202. package/dist/user-detail-YNPBC5MN.js +54 -0
  203. package/dist/{user-invite-ATAF42EH.js → user-invite-OT73USBI.js} +10 -10
  204. package/dist/user-list-LNTZNT3D.js +27 -0
  205. package/dist/{user-metadata-QFVK2VJX.js → user-metadata-ZGTN4FRU.js} +11 -11
  206. package/package.json +3 -3
  207. package/dist/chunk-RW35OPIA.js +0 -45
  208. package/dist/collection-list-WUPG6AU2.js +0 -233
  209. package/dist/customer-list-DYQHKNJV.js +0 -153
  210. package/dist/order-list-ASHM44MM.js +0 -317
  211. package/dist/product-list-7WK2AWI2.js +0 -323
  212. package/dist/product-tag-detail-E7VYBISE.js +0 -288
  213. package/dist/seller-list-W76S2T27.js +0 -237
  214. package/dist/shipping-option-type-detail-CFGKF7NV.js +0 -173
  215. package/dist/tax-region-list-D7HWEZUR.js +0 -92
  216. package/dist/user-list-S6BMNMKL.js +0 -342
  217. package/dist/{api-key-management-sales-channels-RDE5YSYK.js → api-key-management-sales-channels-C7EWPHC2.js} +9 -9
  218. package/dist/{campaign-budget-edit-722ECPRI.js → campaign-budget-edit-AIXCDGG3.js} +3 -3
  219. package/dist/{category-create-VSH7BLNC.js → category-create-UWBJGIED.js} +7 -7
  220. package/dist/{category-edit-CCHWEQER.js → category-edit-ZDTTOXKZ.js} +3 -3
  221. package/dist/{chunk-JISYRXUS.js → chunk-B44E3LJT.js} +7 -7
  222. package/dist/{chunk-L22DLGNI.js → chunk-DEKJJ7NG.js} +3 -3
  223. package/dist/{chunk-2PZGY332.js → chunk-LQAAVRET.js} +3 -3
  224. package/dist/{chunk-GEVYE225.js → chunk-RA4UMZRP.js} +3 -3
  225. package/dist/{chunk-NIRWGTM3.js → chunk-RV6NZTNP.js} +3 -3
  226. package/dist/{chunk-SXC5ZMLI.js → chunk-TKEAOWBZ.js} +24 -24
  227. package/dist/{chunk-FLCYR7E5.js → chunk-ULJ3OMWU.js} +3 -3
  228. package/dist/{chunk-XDEVXAGC.js → chunk-VBBBIEVH.js} +3 -3
  229. package/dist/{chunk-FMOQNZFZ.js → chunk-YMKZS2HK.js} +12 -12
  230. package/dist/{customer-create-address-2LLOW6NZ.js → customer-create-address-GKWNPTZS.js} +1 -1
  231. package/dist/{customer-edit-F5UBFJIZ.js → customer-edit-WDRZ6YUO.js} +3 -3
  232. package/dist/{edit-reservation-SAKSTZTE.js → edit-reservation-7UOWKFMF.js} +3 -3
  233. package/dist/{invite-CSXH7VAO.js → invite-AXGDIENO.js} +1 -1
  234. package/dist/{location-create-HHOJPTDK.js → location-create-FQT3BJGV.js} +1 -1
  235. package/dist/{location-edit-2NAOR4DV.js → location-edit-RTPPP4KP.js} +1 -1
  236. package/dist/{location-sales-channels-BJUJNBQQ.js → location-sales-channels-3IGHCJEN.js} +9 -9
  237. package/dist/{location-service-zone-shipping-option-edit-SSMGORBF.js → location-service-zone-shipping-option-edit-E3GN4ZF5.js} +3 -3
  238. package/dist/{marketplace-edit-WPOSY2WN.js → marketplace-edit-GH2GQF3O.js} +3 -3
  239. package/dist/{order-allocate-items-DLVOSAC2.js → order-allocate-items-VEEANPH7.js} +3 -3
  240. package/dist/{price-list-edit-UU2XBKT3.js → price-list-edit-KK7SHR7O.js} +3 -3
  241. package/dist/{product-attributes-HNF4J53T.js → product-attributes-NG4OSBIV.js} +1 -1
  242. package/dist/{product-edit-6EL6US22.js → product-edit-LQJDUUVX.js} +4 -4
  243. package/dist/{product-organization-NWS3NMD6.js → product-organization-AFCELJ62.js} +1 -1
  244. package/dist/{product-prices-V63CFHI3.js → product-prices-WMRIC7WM.js} +7 -7
  245. package/dist/{product-sales-channels-WU3MSCV5.js → product-sales-channels-LSN5DVWZ.js} +5 -5
  246. package/dist/{product-variant-manage-inventory-items-C77QHYRT.js → product-variant-manage-inventory-items-CV2CC2PV.js} +3 -3
  247. package/dist/{profile-edit-3GIVUYUM.js → profile-edit-4HXBRWJ5.js} +6 -6
  248. package/dist/{promotion-edit-details-7Y2A5PPJ.js → promotion-edit-details-YKS24GBD.js} +6 -6
  249. package/dist/{region-edit-7XER3THY.js → region-edit-ODVSNJHM.js} +5 -5
  250. package/dist/{tax-region-province-create-7BMYABJ6.js → tax-region-province-create-RFYCUDER.js} +3 -3
@@ -7,15 +7,14 @@ import {
7
7
  import {
8
8
  ChipInput
9
9
  } from "./chunk-NCYTM57J.js";
10
+ import {
11
+ DataGrid,
12
+ createDataGridHelper,
13
+ createDataGridPriceColumns
14
+ } from "./chunk-KUWNYCGL.js";
10
15
  import {
11
16
  SwitchBox
12
17
  } from "./chunk-YVCBMOJG.js";
13
- import {
14
- useSalesChannelTableColumns,
15
- useSalesChannelTableEmptyState,
16
- useSalesChannelTableFilters,
17
- useSalesChannelTableQuery
18
- } from "./chunk-G4QMLQF2.js";
19
18
  import {
20
19
  CategoryCombobox
21
20
  } from "./chunk-P7G4RY2J.js";
@@ -31,74 +30,71 @@ import {
31
30
  UploadMediaFormItem,
32
31
  decorateVariantsWithDefaultValues,
33
32
  normalizeProductFormValues
34
- } from "./chunk-GFZ7GOEU.js";
35
- import "./chunk-IZ5RG5XI.js";
33
+ } from "./chunk-A6Z2Q7D5.js";
34
+ import "./chunk-UXD3VNBO.js";
36
35
  import {
37
- DataGrid,
38
- createDataGridHelper,
39
- createDataGridPriceColumns
40
- } from "./chunk-KUWNYCGL.js";
41
- import "./chunk-IQPN4PZJ.js";
42
- import "./chunk-SMQT3ZNO.js";
43
- import "./chunk-F5PEK3DA.js";
36
+ TabbedForm,
37
+ defineTabMeta,
38
+ useTabbedForm
39
+ } from "./chunk-5GG65TKV.js";
44
40
  import "./chunk-TKGWSUEI.js";
41
+ import "./chunk-U2ZFCAPX.js";
42
+ import "./chunk-IQPN4PZJ.js";
45
43
  import {
46
- KeyboundForm
47
- } from "./chunk-U2ZFCAPX.js";
48
- import "./chunk-TN4TIT7O.js";
49
- import {
50
- RouteFocusModal,
51
- StackedFocusModal,
52
- useRouteModal,
53
- useStackedModal
54
- } from "./chunk-MWOKFNRO.js";
55
- import {
56
- Form
57
- } from "./chunk-3QSRE5LS.js";
44
+ useSalesChannelTableColumns,
45
+ useSalesChannelTableEmptyState,
46
+ useSalesChannelTableFilters,
47
+ useSalesChannelTableQuery
48
+ } from "./chunk-G4QMLQF2.js";
58
49
  import "./chunk-UKLRBS4W.js";
59
50
  import "./chunk-DGCPYCHU.js";
60
51
  import {
61
52
  DataTable
62
53
  } from "./chunk-UQITHKTH.js";
54
+ import "./chunk-SMQT3ZNO.js";
55
+ import "./chunk-U3SFHLUA.js";
63
56
  import "./chunk-INNFZYX2.js";
57
+ import "./chunk-TN4TIT7O.js";
64
58
  import {
65
59
  ActionMenu
66
60
  } from "./chunk-BDGZ4EQO.js";
67
61
  import "./chunk-LAVHRER2.js";
68
- import {
69
- useDocumentDirection
70
- } from "./chunk-Y7QKP6QU.js";
62
+ import "./chunk-Y7QKP6QU.js";
71
63
  import "./chunk-THHRRYRS.js";
72
64
  import "./chunk-UZWFZMOX.js";
73
65
  import "./chunk-XQNVC4Q7.js";
66
+ import {
67
+ RouteFocusModal,
68
+ StackedFocusModal,
69
+ useRouteModal,
70
+ useStackedModal
71
+ } from "./chunk-MWOKFNRO.js";
72
+ import {
73
+ Form
74
+ } from "./chunk-3QSRE5LS.js";
74
75
  import "./chunk-XM6GCWNF.js";
75
76
  import "./chunk-ODBDAABQ.js";
76
77
  import "./chunk-CDQJKJMX.js";
77
78
  import "./chunk-JLATVDLM.js";
78
- import "./chunk-GPRBBA7S.js";
79
79
  import "./chunk-E7ZBQO6E.js";
80
+ import "./chunk-GPRBBA7S.js";
80
81
  import "./chunk-XGHM75N2.js";
81
82
  import "./chunk-U2GCSKW3.js";
83
+ import "./chunk-A4X5VP3G.js";
82
84
  import "./chunk-RTAIDSDS.js";
83
85
  import "./chunk-LW3UWYZU.js";
84
- import "./chunk-A4X5VP3G.js";
85
86
  import "./chunk-NNZP4PYP.js";
86
- import "./chunk-GF4QHVX3.js";
87
87
  import "./chunk-JOQ3RTF5.js";
88
88
  import "./chunk-V534K7G4.js";
89
- import "./chunk-A5XOYSDC.js";
90
89
  import "./chunk-TQI3DOQ5.js";
91
90
  import "./chunk-5PB7KCTF.js";
91
+ import "./chunk-LU72QEQC.js";
92
+ import "./chunk-GF4QHVX3.js";
93
+ import "./chunk-A5XOYSDC.js";
92
94
  import "./chunk-YOIARITB.js";
93
95
  import "./chunk-W7G64ULL.js";
94
96
  import "./chunk-6C7TCU42.js";
95
97
  import "./chunk-4YF3GAKE.js";
96
- import "./chunk-M3I52H3M.js";
97
- import {
98
- useSalesChannel,
99
- useSalesChannels
100
- } from "./chunk-LORVU5II.js";
101
- import "./chunk-36ORDF7W.js";
102
98
  import {
103
99
  useRegions
104
100
  } from "./chunk-QSM56ZOP.js";
@@ -108,6 +104,11 @@ import {
108
104
  import {
109
105
  usePricePreferences
110
106
  } from "./chunk-3VZV6SJQ.js";
107
+ import {
108
+ useSalesChannel,
109
+ useSalesChannels
110
+ } from "./chunk-LORVU5II.js";
111
+ import "./chunk-36ORDF7W.js";
111
112
  import {
112
113
  useCreateProduct
113
114
  } from "./chunk-K357FGGP.js";
@@ -122,8 +123,8 @@ import "./chunk-NBMM2TZK.js";
122
123
  import { useTranslation as useTranslation10 } from "react-i18next";
123
124
 
124
125
  // src/pages/products/product-create/components/product-create-form/product-create-form.tsx
125
- import { Button as Button5, ProgressTabs, toast } from "@medusajs/ui";
126
- import { useEffect as useEffect2, useMemo as useMemo4, useState as useState4 } from "react";
126
+ import { Button as Button5, toast } from "@medusajs/ui";
127
+ import { Children, useCallback, useMemo as useMemo4 } from "react";
127
128
  import { useForm, useWatch as useWatch4 } from "react-hook-form";
128
129
  import { useTranslation as useTranslation9 } from "react-i18next";
129
130
 
@@ -135,9 +136,8 @@ import { useTranslation as useTranslation4 } from "react-i18next";
135
136
  import { Input, Textarea } from "@medusajs/ui";
136
137
  import { useTranslation } from "react-i18next";
137
138
  import { jsx, jsxs } from "react/jsx-runtime";
138
- var ProductCreateGeneralSection = ({
139
- form
140
- }) => {
139
+ var ProductCreateGeneralSection = () => {
140
+ const form = useTabbedForm();
141
141
  const { t } = useTranslation();
142
142
  return /* @__PURE__ */ jsxs("div", { id: "general", className: "flex flex-col gap-y-6", "data-testid": "product-create-general-section", children: [
143
143
  /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-y-2", "data-testid": "product-create-general-section-fields", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", "data-testid": "product-create-general-section-title-fields", children: [
@@ -243,9 +243,8 @@ var dropAnimationConfig = {
243
243
  }
244
244
  })
245
245
  };
246
- var ProductCreateMediaSection = ({
247
- form
248
- }) => {
246
+ var ProductCreateMediaSection = () => {
247
+ const form = useTabbedForm();
249
248
  const { fields, append, remove } = useFieldArray({
250
249
  name: "media",
251
250
  control: form.control,
@@ -713,9 +712,8 @@ var getPermutations = (data) => {
713
712
  var getVariantName = (options) => {
714
713
  return Object.values(options).join(" / ");
715
714
  };
716
- var ProductCreateVariantsSection = ({
717
- form
718
- }) => {
715
+ var ProductCreateVariantsSection = () => {
716
+ const form = useTabbedForm();
719
717
  const { t } = useTranslation3();
720
718
  const options = useFieldArray2({
721
719
  control: form.control,
@@ -1124,7 +1122,7 @@ var ProductCreateVariantsSection = ({
1124
1122
 
1125
1123
  // src/pages/products/product-create/components/product-create-details-form/product-create-details-form.tsx
1126
1124
  import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1127
- var ProductCreateDetailsForm = ({ form }) => {
1125
+ var Root = () => {
1128
1126
  return /* @__PURE__ */ jsx5(
1129
1127
  "div",
1130
1128
  {
@@ -1143,19 +1141,25 @@ var ProductCreateDetailsForm = ({ form }) => {
1143
1141
  className: "flex flex-col gap-y-6",
1144
1142
  "data-testid": "product-create-details-form-sections",
1145
1143
  children: [
1146
- /* @__PURE__ */ jsx5(ProductCreateGeneralSection, { form }),
1147
- /* @__PURE__ */ jsx5(ProductCreateMediaSection, { form })
1144
+ /* @__PURE__ */ jsx5(ProductCreateGeneralSection, {}),
1145
+ /* @__PURE__ */ jsx5(ProductCreateMediaSection, {})
1148
1146
  ]
1149
1147
  }
1150
1148
  ),
1151
1149
  /* @__PURE__ */ jsx5(Divider, { "data-testid": "product-create-details-form-divider" }),
1152
- /* @__PURE__ */ jsx5(ProductCreateVariantsSection, { form })
1150
+ /* @__PURE__ */ jsx5(ProductCreateVariantsSection, {})
1153
1151
  ]
1154
1152
  }
1155
1153
  )
1156
1154
  }
1157
1155
  );
1158
1156
  };
1157
+ Root._tabMeta = defineTabMeta({
1158
+ id: "details",
1159
+ labelKey: "products.create.tabs.details",
1160
+ validationFields: ["title", "handle", "description", "media", "options", "variants"]
1161
+ });
1162
+ var ProductCreateDetailsForm = Root;
1159
1163
  var Header = () => {
1160
1164
  const { t } = useTranslation4();
1161
1165
  return /* @__PURE__ */ jsx5(
@@ -1175,13 +1179,13 @@ import { XMarkMini as XMarkMini2 } from "@medusajs/icons";
1175
1179
  import { useTranslation as useTranslation5 } from "react-i18next";
1176
1180
  import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1177
1181
  function InventoryItemRow({
1178
- form,
1179
1182
  variantIndex,
1180
1183
  inventoryIndex,
1181
1184
  inventoryItem,
1182
1185
  isItemOptionDisabled,
1183
1186
  onRemove
1184
1187
  }) {
1188
+ const form = useTabbedForm();
1185
1189
  const { t } = useTranslation5();
1186
1190
  const selectedInventoryItemId = useWatch2({
1187
1191
  control: form.control,
@@ -1298,7 +1302,8 @@ function InventoryItemRow({
1298
1302
  inventoryItem.id
1299
1303
  );
1300
1304
  }
1301
- function VariantSection({ form, variant, index }) {
1305
+ function VariantSection({ variant, index }) {
1306
+ const form = useTabbedForm();
1302
1307
  const { t } = useTranslation5();
1303
1308
  const inventory = useFieldArray3({
1304
1309
  control: form.control,
@@ -1338,7 +1343,6 @@ function VariantSection({ form, variant, index }) {
1338
1343
  inventory.fields.map((inventoryItem, inventoryIndex) => /* @__PURE__ */ jsx6(
1339
1344
  InventoryItemRow,
1340
1345
  {
1341
- form,
1342
1346
  variantIndex: index,
1343
1347
  inventoryIndex,
1344
1348
  inventoryItem,
@@ -1349,9 +1353,8 @@ function VariantSection({ form, variant, index }) {
1349
1353
  ))
1350
1354
  ] });
1351
1355
  }
1352
- var ProductCreateInventoryKitSection = ({
1353
- form
1354
- }) => {
1356
+ var ProductCreateInventoryKitSection = () => {
1357
+ const form = useTabbedForm();
1355
1358
  const { t } = useTranslation5();
1356
1359
  const variants = useFieldArray3({
1357
1360
  control: form.control,
@@ -1362,7 +1365,6 @@ var ProductCreateInventoryKitSection = ({
1362
1365
  variants.fields.filter((v) => v.inventory_kit).map((variant, variantIndex) => /* @__PURE__ */ jsx6(
1363
1366
  VariantSection,
1364
1367
  {
1365
- form,
1366
1368
  variant,
1367
1369
  index: variantIndex
1368
1370
  },
@@ -1373,20 +1375,23 @@ var ProductCreateInventoryKitSection = ({
1373
1375
 
1374
1376
  // src/pages/products/product-create/components/product-create-inventory-kit-form/product-create-inventory-kit-form.tsx
1375
1377
  import { jsx as jsx7 } from "react/jsx-runtime";
1376
- var ProductCreateInventoryKitForm = ({
1377
- form
1378
- }) => {
1379
- return /* @__PURE__ */ jsx7("div", { className: "flex flex-col items-center p-16", "data-testid": "product-create-inventory-kit-form", children: /* @__PURE__ */ jsx7("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", "data-testid": "product-create-inventory-kit-form-content", children: /* @__PURE__ */ jsx7(ProductCreateInventoryKitSection, { form }) }) });
1378
+ var Root2 = () => {
1379
+ return /* @__PURE__ */ jsx7("div", { className: "flex flex-col items-center p-16", "data-testid": "product-create-inventory-kit-form", children: /* @__PURE__ */ jsx7("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", "data-testid": "product-create-inventory-kit-form-content", children: /* @__PURE__ */ jsx7(ProductCreateInventoryKitSection, {}) }) });
1380
1380
  };
1381
+ Root2._tabMeta = defineTabMeta({
1382
+ id: "inventory",
1383
+ labelKey: "products.create.tabs.inventory",
1384
+ validationFields: ["variants"]
1385
+ });
1386
+ var ProductCreateInventoryKitForm = Root2;
1381
1387
 
1382
1388
  // src/pages/products/product-create/components/product-create-organize-form/components/product-create-organize-section/product-create-details-organize-section.tsx
1383
1389
  import { Button as Button3, Heading as Heading4 } from "@medusajs/ui";
1384
1390
  import { useFieldArray as useFieldArray4 } from "react-hook-form";
1385
1391
  import { Trans, useTranslation as useTranslation6 } from "react-i18next";
1386
1392
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1387
- var ProductCreateOrganizationSection = ({
1388
- form
1389
- }) => {
1393
+ var ProductCreateOrganizationSection = () => {
1394
+ const form = useTabbedForm();
1390
1395
  const { t } = useTranslation6();
1391
1396
  const sellers = useComboboxData({
1392
1397
  queryKey: ["sellers"],
@@ -1635,9 +1640,8 @@ var SC_STACKED_MODAL_ID = "sc";
1635
1640
  // src/pages/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx
1636
1641
  import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1637
1642
  var PAGE_SIZE = 20;
1638
- var ProductCreateSalesChannelStackedModal = ({
1639
- form
1640
- }) => {
1643
+ var ProductCreateSalesChannelStackedModal = () => {
1644
+ const form = useTabbedForm();
1641
1645
  const { t } = useTranslation7();
1642
1646
  const { getValues, setValue } = form;
1643
1647
  const { setIsOpen, getIsOpen } = useStackedModal();
@@ -1742,7 +1746,7 @@ var useColumns = () => {
1742
1746
 
1743
1747
  // src/pages/products/product-create/components/product-create-organize-form/product-create-organize-form.tsx
1744
1748
  import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1745
- var ProductCreateOrganizeForm = ({ form }) => {
1749
+ var Root3 = () => {
1746
1750
  return /* @__PURE__ */ jsxs9(StackedFocusModal, { id: SC_STACKED_MODAL_ID, children: [
1747
1751
  /* @__PURE__ */ jsx10(
1748
1752
  "div",
@@ -1754,27 +1758,51 @@ var ProductCreateOrganizeForm = ({ form }) => {
1754
1758
  {
1755
1759
  className: "flex w-full max-w-[720px] flex-col gap-y-8",
1756
1760
  "data-testid": "product-create-organize-form-content",
1757
- children: /* @__PURE__ */ jsx10(ProductCreateOrganizationSection, { form })
1761
+ children: /* @__PURE__ */ jsx10(ProductCreateOrganizationSection, {})
1758
1762
  }
1759
1763
  )
1760
1764
  }
1761
1765
  ),
1762
- /* @__PURE__ */ jsx10(ProductCreateSalesChannelStackedModal, { form })
1766
+ /* @__PURE__ */ jsx10(ProductCreateSalesChannelStackedModal, {})
1763
1767
  ] });
1764
1768
  };
1769
+ Root3._tabMeta = defineTabMeta({
1770
+ id: "organize",
1771
+ labelKey: "products.create.tabs.organize",
1772
+ validationFields: [
1773
+ "type_id",
1774
+ "collection_id",
1775
+ "categories",
1776
+ "tags",
1777
+ "sales_channels",
1778
+ "shipping_profile_id",
1779
+ "origin_country",
1780
+ "material",
1781
+ "width",
1782
+ "length",
1783
+ "height",
1784
+ "weight",
1785
+ "mid_code",
1786
+ "hs_code"
1787
+ ]
1788
+ });
1789
+ var ProductCreateOrganizeForm = Root3;
1765
1790
 
1766
1791
  // src/pages/products/product-create/components/product-create-variants-form/product-create-variants-form.tsx
1767
1792
  import { useMemo as useMemo3 } from "react";
1768
1793
  import { useWatch as useWatch3 } from "react-hook-form";
1769
1794
  import { useTranslation as useTranslation8 } from "react-i18next";
1770
1795
  import { jsx as jsx11 } from "react/jsx-runtime";
1771
- var ProductCreateVariantsForm = ({
1772
- form,
1773
- regions,
1774
- store,
1775
- pricePreferences
1776
- }) => {
1796
+ var Root4 = () => {
1797
+ const form = useTabbedForm();
1777
1798
  const { setCloseOnEscape } = useRouteModal();
1799
+ const { store } = useStore({
1800
+ fields: "+default_sales_channel"
1801
+ });
1802
+ const { regions } = useRegions({ limit: 9999 });
1803
+ const { price_preferences: pricePreferences } = usePricePreferences({
1804
+ limit: 9999
1805
+ });
1778
1806
  const currencyCodes = useMemo3(
1779
1807
  () => store?.supported_currencies?.map((c) => c.currency_code) || [],
1780
1808
  [store]
@@ -1792,8 +1820,8 @@ var ProductCreateVariantsForm = ({
1792
1820
  const columns = useColumns2({
1793
1821
  options,
1794
1822
  currencies: currencyCodes,
1795
- regions,
1796
- pricePreferences
1823
+ regions: regions ?? [],
1824
+ pricePreferences: pricePreferences ?? []
1797
1825
  });
1798
1826
  const variantData = useMemo3(() => {
1799
1827
  const ret = [];
@@ -1814,6 +1842,12 @@ var ProductCreateVariantsForm = ({
1814
1842
  }
1815
1843
  ) }) });
1816
1844
  };
1845
+ Root4._tabMeta = defineTabMeta({
1846
+ id: "variants",
1847
+ labelKey: "products.create.tabs.variants",
1848
+ validationFields: ["variants"]
1849
+ });
1850
+ var ProductCreateVariantsForm = Root4;
1817
1851
  var columnHelper2 = createDataGridHelper();
1818
1852
  var useColumns2 = ({
1819
1853
  options,
@@ -1911,20 +1945,10 @@ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1911
1945
  var SAVE_DRAFT_BUTTON = "save-draft-button";
1912
1946
  var ProductCreateForm = ({
1913
1947
  defaultChannel,
1914
- regions,
1915
- store,
1916
- pricePreferences
1948
+ children
1917
1949
  }) => {
1918
- const [tab, setTab] = useState4("details" /* DETAILS */);
1919
- const [tabState, setTabState] = useState4({
1920
- ["details" /* DETAILS */]: "in-progress",
1921
- ["organize" /* ORGANIZE */]: "not-started",
1922
- ["variants" /* VARIANTS */]: "not-started",
1923
- ["inventory" /* INVENTORY */]: "not-started"
1924
- });
1925
1950
  const { t } = useTranslation9();
1926
1951
  const { handleSuccess } = useRouteModal();
1927
- const direction = useDocumentDirection();
1928
1952
  const form = useForm({
1929
1953
  defaultValues: {
1930
1954
  ...PRODUCT_CREATE_FORM_DEFAULTS,
@@ -1933,6 +1957,15 @@ var ProductCreateForm = ({
1933
1957
  resolver: zodResolver(ProductCreateSchema)
1934
1958
  });
1935
1959
  const { mutateAsync, isPending } = useCreateProduct();
1960
+ const {
1961
+ regions,
1962
+ isPending: isRegionsPending,
1963
+ isError: isRegionsError,
1964
+ error: regionsError
1965
+ } = useRegions({ limit: 9999 });
1966
+ if (isRegionsError) {
1967
+ throw regionsError;
1968
+ }
1936
1969
  const regionsCurrencyMap = useMemo4(() => {
1937
1970
  if (!regions?.length) {
1938
1971
  return {};
@@ -1949,11 +1982,10 @@ var ProductCreateForm = ({
1949
1982
  control: form.control,
1950
1983
  name: "variants"
1951
1984
  });
1952
- const showInventoryTab = useMemo4(
1953
- () => watchedVariants.some((v) => v.manage_inventory && v.inventory_kit),
1954
- [watchedVariants]
1955
- );
1956
1985
  const handleSubmit = form.handleSubmit(async (values, e) => {
1986
+ if (isRegionsPending) {
1987
+ return;
1988
+ }
1957
1989
  let isDraftSubmission = false;
1958
1990
  if (e?.nativeEvent instanceof SubmitEvent) {
1959
1991
  const submitter = e?.nativeEvent?.submitter;
@@ -2008,270 +2040,96 @@ var ProductCreateForm = ({
2008
2040
  }
2009
2041
  );
2010
2042
  });
2011
- const onNext = async (currentTab) => {
2012
- const valid = await form.trigger();
2013
- if (!valid) {
2014
- return;
2015
- }
2016
- if (currentTab === "details" /* DETAILS */) {
2017
- setTab("organize" /* ORGANIZE */);
2018
- }
2019
- if (currentTab === "organize" /* ORGANIZE */) {
2020
- setTab("variants" /* VARIANTS */);
2021
- }
2022
- if (currentTab === "variants" /* VARIANTS */) {
2023
- setTab("inventory" /* INVENTORY */);
2024
- }
2025
- };
2026
- useEffect2(() => {
2027
- const currentState = { ...tabState };
2028
- if (tab === "details" /* DETAILS */) {
2029
- currentState["details" /* DETAILS */] = "in-progress";
2030
- }
2031
- if (tab === "organize" /* ORGANIZE */) {
2032
- currentState["details" /* DETAILS */] = "completed";
2033
- currentState["organize" /* ORGANIZE */] = "in-progress";
2034
- }
2035
- if (tab === "variants" /* VARIANTS */) {
2036
- currentState["details" /* DETAILS */] = "completed";
2037
- currentState["organize" /* ORGANIZE */] = "completed";
2038
- currentState["variants" /* VARIANTS */] = "in-progress";
2039
- }
2040
- if (tab === "inventory" /* INVENTORY */) {
2041
- currentState["details" /* DETAILS */] = "completed";
2042
- currentState["organize" /* ORGANIZE */] = "completed";
2043
- currentState["variants" /* VARIANTS */] = "completed";
2044
- currentState["inventory" /* INVENTORY */] = "in-progress";
2045
- }
2046
- setTabState({ ...currentState });
2047
- }, [tab]);
2048
- return /* @__PURE__ */ jsx12(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs10(
2049
- KeyboundForm,
2050
- {
2051
- "data-testid": "product-create-form",
2052
- onKeyDown: (e) => {
2053
- if (e.key === "Enter") {
2054
- if (e.target instanceof HTMLTextAreaElement && !(e.metaKey || e.ctrlKey)) {
2055
- return;
2056
- }
2057
- e.preventDefault();
2058
- if (e.metaKey || e.ctrlKey) {
2059
- if (tab !== "variants" /* VARIANTS */) {
2060
- e.preventDefault();
2061
- e.stopPropagation();
2062
- onNext(tab);
2063
- return;
2064
- }
2065
- handleSubmit();
2066
- }
2043
+ const transformTabs = useCallback(
2044
+ (tabs) => {
2045
+ const showInventoryTab = watchedVariants?.some(
2046
+ (v) => v.manage_inventory && v.inventory_kit
2047
+ ) ?? false;
2048
+ return tabs.map((tab) => {
2049
+ if (tab.id === "inventory") {
2050
+ return {
2051
+ ...tab,
2052
+ isVisible: () => showInventoryTab
2053
+ };
2067
2054
  }
2068
- },
2055
+ return tab;
2056
+ });
2057
+ },
2058
+ [watchedVariants]
2059
+ );
2060
+ const defaultTabs = useMemo4(
2061
+ () => [
2062
+ /* @__PURE__ */ jsx12(ProductCreateDetailsForm, {}, "details"),
2063
+ /* @__PURE__ */ jsx12(ProductCreateOrganizeForm, {}, "organize"),
2064
+ /* @__PURE__ */ jsx12(ProductCreateVariantsForm, {}, "variants"),
2065
+ /* @__PURE__ */ jsx12(ProductCreateInventoryKitForm, {}, "inventory")
2066
+ ],
2067
+ []
2068
+ );
2069
+ const hasCustomChildren = Children.count(children) > 0;
2070
+ return /* @__PURE__ */ jsx12(
2071
+ TabbedForm,
2072
+ {
2073
+ form,
2069
2074
  onSubmit: handleSubmit,
2070
- className: "flex h-full flex-col",
2071
- children: [
2072
- /* @__PURE__ */ jsxs10(
2073
- ProgressTabs,
2074
- {
2075
- dir: direction,
2076
- value: tab,
2077
- onValueChange: async (tab2) => {
2078
- const valid = await form.trigger();
2079
- if (!valid) {
2080
- return;
2075
+ isLoading: isPending || isRegionsPending,
2076
+ transformTabs,
2077
+ footer: ({ isLastTab, onNext, isLoading }) => /* @__PURE__ */ jsxs10(
2078
+ "div",
2079
+ {
2080
+ className: "flex items-center justify-end gap-x-2",
2081
+ "data-testid": "product-create-form-footer-actions",
2082
+ children: [
2083
+ /* @__PURE__ */ jsx12(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx12(
2084
+ Button5,
2085
+ {
2086
+ variant: "secondary",
2087
+ size: "small",
2088
+ "data-testid": "product-create-form-cancel-button",
2089
+ children: t("actions.cancel")
2081
2090
  }
2082
- setTab(tab2);
2083
- },
2084
- className: "flex h-full flex-col overflow-hidden",
2085
- "data-testid": "product-create-form-tabs",
2086
- children: [
2087
- /* @__PURE__ */ jsx12(RouteFocusModal.Header, { children: /* @__PURE__ */ jsx12(
2088
- "div",
2089
- {
2090
- className: "-my-2 w-full border-l",
2091
- "data-testid": "product-create-form-tabs-header",
2092
- children: /* @__PURE__ */ jsxs10(
2093
- ProgressTabs.List,
2094
- {
2095
- className: "justify-start-start flex w-full items-center",
2096
- "data-testid": "product-create-form-tabs-list",
2097
- children: [
2098
- /* @__PURE__ */ jsx12(
2099
- ProgressTabs.Trigger,
2100
- {
2101
- status: tabState["details" /* DETAILS */],
2102
- value: "details" /* DETAILS */,
2103
- className: "max-w-[200px] truncate",
2104
- "data-testid": "product-create-form-tab-details",
2105
- children: t("products.create.tabs.details")
2106
- }
2107
- ),
2108
- /* @__PURE__ */ jsx12(
2109
- ProgressTabs.Trigger,
2110
- {
2111
- status: tabState["organize" /* ORGANIZE */],
2112
- value: "organize" /* ORGANIZE */,
2113
- className: "max-w-[200px] truncate",
2114
- "data-testid": "product-create-form-tab-organize",
2115
- children: t("products.create.tabs.organize")
2116
- }
2117
- ),
2118
- /* @__PURE__ */ jsx12(
2119
- ProgressTabs.Trigger,
2120
- {
2121
- status: tabState["variants" /* VARIANTS */],
2122
- value: "variants" /* VARIANTS */,
2123
- className: "max-w-[200px] truncate",
2124
- "data-testid": "product-create-form-tab-variants",
2125
- children: t("products.create.tabs.variants")
2126
- }
2127
- ),
2128
- showInventoryTab && /* @__PURE__ */ jsx12(
2129
- ProgressTabs.Trigger,
2130
- {
2131
- status: tabState["inventory" /* INVENTORY */],
2132
- value: "inventory" /* INVENTORY */,
2133
- className: "max-w-[200px] truncate",
2134
- "data-testid": "product-create-form-tab-inventory",
2135
- children: t("products.create.tabs.inventory")
2136
- }
2137
- )
2138
- ]
2139
- }
2140
- )
2141
- }
2142
- ) }),
2143
- /* @__PURE__ */ jsxs10(
2144
- RouteFocusModal.Body,
2145
- {
2146
- className: "size-full overflow-hidden",
2147
- "data-testid": "product-create-form-body",
2148
- children: [
2149
- /* @__PURE__ */ jsx12(
2150
- ProgressTabs.Content,
2151
- {
2152
- className: "size-full overflow-y-auto",
2153
- value: "details" /* DETAILS */,
2154
- "data-testid": "product-create-form-tab-content-details",
2155
- children: /* @__PURE__ */ jsx12(ProductCreateDetailsForm, { form })
2156
- }
2157
- ),
2158
- /* @__PURE__ */ jsx12(
2159
- ProgressTabs.Content,
2160
- {
2161
- className: "size-full overflow-y-auto",
2162
- value: "organize" /* ORGANIZE */,
2163
- "data-testid": "product-create-form-tab-content-organize",
2164
- children: /* @__PURE__ */ jsx12(ProductCreateOrganizeForm, { form })
2165
- }
2166
- ),
2167
- /* @__PURE__ */ jsx12(
2168
- ProgressTabs.Content,
2169
- {
2170
- className: "size-full overflow-y-auto",
2171
- value: "variants" /* VARIANTS */,
2172
- "data-testid": "product-create-form-tab-content-variants",
2173
- children: /* @__PURE__ */ jsx12(
2174
- ProductCreateVariantsForm,
2175
- {
2176
- form,
2177
- store,
2178
- regions,
2179
- pricePreferences
2180
- }
2181
- )
2182
- }
2183
- ),
2184
- showInventoryTab && /* @__PURE__ */ jsx12(
2185
- ProgressTabs.Content,
2186
- {
2187
- className: "size-full overflow-y-auto",
2188
- value: "inventory" /* INVENTORY */,
2189
- "data-testid": "product-create-form-tab-content-inventory",
2190
- children: /* @__PURE__ */ jsx12(ProductCreateInventoryKitForm, { form })
2191
- }
2192
- )
2193
- ]
2194
- }
2195
- )
2196
- ]
2197
- }
2198
- ),
2199
- /* @__PURE__ */ jsx12(RouteFocusModal.Footer, { "data-testid": "product-create-form-footer", children: /* @__PURE__ */ jsxs10(
2200
- "div",
2201
- {
2202
- className: "flex items-center justify-end gap-x-2",
2203
- "data-testid": "product-create-form-footer-actions",
2204
- children: [
2205
- /* @__PURE__ */ jsx12(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx12(
2206
- Button5,
2207
- {
2208
- variant: "secondary",
2209
- size: "small",
2210
- "data-testid": "product-create-form-cancel-button",
2211
- children: t("actions.cancel")
2212
- }
2213
- ) }),
2214
- /* @__PURE__ */ jsx12(
2215
- Button5,
2216
- {
2217
- "data-name": SAVE_DRAFT_BUTTON,
2218
- size: "small",
2219
- type: "submit",
2220
- isLoading: isPending,
2221
- className: "whitespace-nowrap",
2222
- "data-testid": "product-create-form-save-draft-button",
2223
- children: t("actions.saveAsDraft")
2224
- }
2225
- ),
2226
- /* @__PURE__ */ jsx12(
2227
- PrimaryButton,
2228
- {
2229
- tab,
2230
- next: onNext,
2231
- isLoading: isPending,
2232
- showInventoryTab
2233
- }
2234
- )
2235
- ]
2236
- }
2237
- ) })
2238
- ]
2091
+ ) }),
2092
+ /* @__PURE__ */ jsx12(
2093
+ Button5,
2094
+ {
2095
+ "data-name": SAVE_DRAFT_BUTTON,
2096
+ size: "small",
2097
+ type: "submit",
2098
+ isLoading,
2099
+ className: "whitespace-nowrap",
2100
+ "data-testid": "product-create-form-save-draft-button",
2101
+ children: t("actions.saveAsDraft")
2102
+ }
2103
+ ),
2104
+ isLastTab ? /* @__PURE__ */ jsx12(
2105
+ Button5,
2106
+ {
2107
+ "data-name": "publish-button",
2108
+ type: "submit",
2109
+ variant: "primary",
2110
+ size: "small",
2111
+ isLoading,
2112
+ "data-testid": "product-create-form-publish-button",
2113
+ children: t("actions.publish")
2114
+ },
2115
+ "submit-button"
2116
+ ) : /* @__PURE__ */ jsx12(
2117
+ Button5,
2118
+ {
2119
+ type: "button",
2120
+ variant: "primary",
2121
+ size: "small",
2122
+ onClick: () => onNext(),
2123
+ "data-testid": "product-create-form-continue-button",
2124
+ children: t("actions.continue")
2125
+ },
2126
+ "next-button"
2127
+ )
2128
+ ]
2129
+ }
2130
+ ),
2131
+ children: hasCustomChildren ? children : defaultTabs
2239
2132
  }
2240
- ) });
2241
- };
2242
- var PrimaryButton = ({
2243
- tab,
2244
- next,
2245
- isLoading,
2246
- showInventoryTab
2247
- }) => {
2248
- const { t } = useTranslation9();
2249
- if (tab === "variants" /* VARIANTS */ && !showInventoryTab || tab === "inventory" /* INVENTORY */ && showInventoryTab) {
2250
- return /* @__PURE__ */ jsx12(
2251
- Button5,
2252
- {
2253
- "data-name": "publish-button",
2254
- type: "submit",
2255
- variant: "primary",
2256
- size: "small",
2257
- isLoading,
2258
- "data-testid": "product-create-form-publish-button",
2259
- children: t("actions.publish")
2260
- },
2261
- "submit-button"
2262
- );
2263
- }
2264
- return /* @__PURE__ */ jsx12(
2265
- Button5,
2266
- {
2267
- type: "button",
2268
- variant: "primary",
2269
- size: "small",
2270
- onClick: () => next(tab),
2271
- "data-testid": "product-create-form-continue-button",
2272
- children: t("actions.continue")
2273
- },
2274
- "next-button"
2275
2133
  );
2276
2134
  };
2277
2135
 
@@ -2295,43 +2153,20 @@ var ProductCreate = () => {
2295
2153
  } = useSalesChannel(store?.default_sales_channel_id, {
2296
2154
  enabled: !!store?.default_sales_channel_id
2297
2155
  });
2298
- const {
2299
- regions,
2300
- isPending: isRegionsPending,
2301
- isError: isRegionsError,
2302
- error: regionsError
2303
- } = useRegions({ limit: 9999 });
2304
- const {
2305
- price_preferences,
2306
- isPending: isPricePreferencesPending,
2307
- isError: isPricePreferencesError,
2308
- error: pricePreferencesError
2309
- } = usePricePreferences({
2310
- limit: 9999
2311
- });
2312
- const ready = !!store && !isStorePending && !!regions && !isRegionsPending && !!sales_channel && !isSalesChannelPending && !!price_preferences && !isPricePreferencesPending;
2156
+ const ready = !!store && !isStorePending && !!sales_channel && !isSalesChannelPending;
2313
2157
  if (isStoreError) {
2314
2158
  throw storeError;
2315
2159
  }
2316
- if (isRegionsError) {
2317
- throw regionsError;
2318
- }
2319
2160
  if (isSalesChannelError) {
2320
2161
  throw salesChannelError;
2321
2162
  }
2322
- if (isPricePreferencesError) {
2323
- throw pricePreferencesError;
2324
- }
2325
2163
  return /* @__PURE__ */ jsxs11(RouteFocusModal, { children: [
2326
2164
  /* @__PURE__ */ jsx13(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx13("span", { className: "sr-only", children: t("products.create.title") }) }),
2327
2165
  /* @__PURE__ */ jsx13(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsx13("span", { className: "sr-only", children: t("products.create.description") }) }),
2328
2166
  ready && /* @__PURE__ */ jsx13(
2329
2167
  ProductCreateForm,
2330
2168
  {
2331
- defaultChannel: sales_channel,
2332
- store,
2333
- pricePreferences: price_preferences,
2334
- regions
2169
+ defaultChannel: sales_channel
2335
2170
  }
2336
2171
  )
2337
2172
  ] });