@medusajs/dashboard 3.0.0-snapshot-20251216135612 → 3.0.0-snapshot-20260102125810

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 (291) hide show
  1. package/dist/add-locales-2OZXZCT5.mjs +81 -0
  2. package/dist/{adjust-inventory-26YXAXQL.mjs → adjust-inventory-47KGDWME.mjs} +2 -2
  3. package/dist/{api-key-management-create-EMP32G2D.mjs → api-key-management-create-EFPPZPZ7.mjs} +4 -4
  4. package/dist/{api-key-management-detail-6RCDH73M.mjs → api-key-management-detail-4IFED7SF.mjs} +15 -15
  5. package/dist/{api-key-management-edit-IBM3ZXHK.mjs → api-key-management-edit-QGVBNLUL.mjs} +4 -4
  6. package/dist/{api-key-management-list-KC5GOWAU.mjs → api-key-management-list-ROIJIIPQ.mjs} +4 -4
  7. package/dist/{api-key-management-sales-channels-LUB5G6RC.mjs → api-key-management-sales-channels-7P5L45AT.mjs} +6 -6
  8. package/dist/app.css +39 -3
  9. package/dist/app.js +18590 -16625
  10. package/dist/app.mjs +13 -13
  11. package/dist/{campaign-create-FJOECKGT.mjs → campaign-create-EZGZ4SBQ.mjs} +3 -3
  12. package/dist/{campaign-detail-5Q4BYCPX.mjs → campaign-detail-NFKLFPY4.mjs} +12 -12
  13. package/dist/{categories-metadata-J7M3XWI7.mjs → categories-metadata-G7BACZ26.mjs} +12 -12
  14. package/dist/{category-create-KHJZSC7G.mjs → category-create-7MV25HYX.mjs} +6 -6
  15. package/dist/{category-detail-S5IPXMHX.mjs → category-detail-XJQQ7UU4.mjs} +14 -14
  16. package/dist/{category-edit-CTA2EPDG.mjs → category-edit-LV7EARAB.mjs} +3 -3
  17. package/dist/{category-list-QBYJ4T3R.mjs → category-list-NIVLV5S3.mjs} +6 -6
  18. package/dist/{category-organize-SXP33XET.mjs → category-organize-SCRGWKDG.mjs} +3 -3
  19. package/dist/{category-products-KPW6BA5J.mjs → category-products-FXFSMCR6.mjs} +13 -13
  20. package/dist/{chunk-OXPE5TAY.mjs → chunk-24C2YVFU.mjs} +1 -1
  21. package/dist/{chunk-4JQR6QNW.mjs → chunk-333HK6Y6.mjs} +2 -2
  22. package/dist/{chunk-DODQ3KJT.mjs → chunk-3RRA56WC.mjs} +8 -3
  23. package/dist/{chunk-5LGRZSEH.mjs → chunk-3YPZ3R4U.mjs} +1 -1
  24. package/dist/{chunk-2DULKOPN.mjs → chunk-5ISRTMYH.mjs} +1 -1
  25. package/dist/{chunk-PHLCT2HA.mjs → chunk-5ZPKY5XP.mjs} +1 -1
  26. package/dist/{chunk-U6G4M5LP.mjs → chunk-6EXKKRZY.mjs} +1 -1
  27. package/dist/{chunk-GRZSG4EP.mjs → chunk-74WPAWMW.mjs} +127 -226
  28. package/dist/chunk-7AXHHXCX.mjs +4 -0
  29. package/dist/{chunk-YKYVCQRS.mjs → chunk-BJ44US4R.mjs} +382 -242
  30. package/dist/{chunk-BMS2QLJY.mjs → chunk-BMJ5RYIO.mjs} +1 -1
  31. package/dist/{chunk-Y2YVTIJI.mjs → chunk-CW5PQUJ6.mjs} +1 -1
  32. package/dist/{chunk-IAV7IKJ6.mjs → chunk-DN5BRKVN.mjs} +1 -1
  33. package/dist/{chunk-RS7DWLEP.mjs → chunk-DQUXK4WW.mjs} +1 -1
  34. package/dist/{chunk-2XTBDCGE.mjs → chunk-DWH2OQFK.mjs} +1 -1
  35. package/dist/{chunk-CCQD65EY.mjs → chunk-FKNW5MLZ.mjs} +360 -288
  36. package/dist/{chunk-HTCYX4VD.mjs → chunk-G35UUG2P.mjs} +1 -1
  37. package/dist/{chunk-QKALAT7P.mjs → chunk-GGONMC2N.mjs} +1 -1
  38. package/dist/{chunk-FYWHE3W5.mjs → chunk-GJN5SXGZ.mjs} +1 -1
  39. package/dist/{chunk-CVHJAKLQ.mjs → chunk-HDO2UCKF.mjs} +1 -1
  40. package/dist/{chunk-3C6WQ7NH.mjs → chunk-IWNNQ6HA.mjs} +37 -3
  41. package/dist/{chunk-OL24RDYM.mjs → chunk-KHJL6MUQ.mjs} +8 -8
  42. package/dist/{chunk-6P4Q4AAP.mjs → chunk-KPI4WFJU.mjs} +3 -3
  43. package/dist/{chunk-AHZLMCZF.mjs → chunk-KSDXSKJ7.mjs} +1 -1
  44. package/dist/{chunk-BZKI5J2M.mjs → chunk-L7A2JIQY.mjs} +3 -3
  45. package/dist/{chunk-XY7A7GZJ.mjs → chunk-LEAMWI5H.mjs} +1 -1
  46. package/dist/{chunk-A4XYK3MY.mjs → chunk-LG5B2BVB.mjs} +2 -2
  47. package/dist/{chunk-23GTCEOV.mjs → chunk-ML7BA2NY.mjs} +1 -1
  48. package/dist/{chunk-OFN7DIZA.mjs → chunk-OYHFHBNL.mjs} +94 -7
  49. package/dist/{chunk-OSHH5GAS.mjs → chunk-Q34TRFIW.mjs} +1 -13
  50. package/dist/{chunk-UJ2TMPV4.mjs → chunk-QBIQEVTU.mjs} +0 -12
  51. package/dist/{chunk-YYOPBKME.mjs → chunk-QHRAWZGA.mjs} +3 -3
  52. package/dist/{chunk-A2WBKOXJ.mjs → chunk-SO2DE6MM.mjs} +2 -2
  53. package/dist/chunk-T6DDBLGY.mjs +13 -0
  54. package/dist/{chunk-EHU67PIM.mjs → chunk-TOCMU7UV.mjs} +7 -3
  55. package/dist/{chunk-YIOBBZUB.mjs → chunk-U7KANQ5A.mjs} +2 -2
  56. package/dist/{chunk-Z6BFNHEO.mjs → chunk-UCYUWNJL.mjs} +109 -62
  57. package/dist/{chunk-WYATCUOM.mjs → chunk-V2RGYIAG.mjs} +10 -10
  58. package/dist/{chunk-UWY5ZV66.mjs → chunk-VQ73B7ZZ.mjs} +1 -13
  59. package/dist/chunk-XD72PXRS.mjs +329 -0
  60. package/dist/{store-add-locales-VJ4RJ7UI.mjs → chunk-YFXI6CWD.mjs} +2 -67
  61. package/dist/{chunk-AWRCV3ME.mjs → chunk-YM4XGCHB.mjs} +1 -1
  62. package/dist/{chunk-ZMG5B4FG.mjs → chunk-ZGV5NOTE.mjs} +1 -1
  63. package/dist/{collection-add-products-FU2BS3D3.mjs → collection-add-products-YDMBU2JY.mjs} +13 -13
  64. package/dist/{collection-create-GWKWVT7B.mjs → collection-create-RXHEXU6T.mjs} +3 -3
  65. package/dist/{collection-detail-VJE7XHLV.mjs → collection-detail-75XPGVOX.mjs} +13 -13
  66. package/dist/{collection-edit-EZIO2BR5.mjs → collection-edit-CGF47VIN.mjs} +3 -3
  67. package/dist/{collection-list-IGA6SCNF.mjs → collection-list-75N5NYXQ.mjs} +18 -17
  68. package/dist/{collection-metadata-QK7MI3D2.mjs → collection-metadata-TGGC6HM2.mjs} +12 -12
  69. package/dist/{customer-detail-MOV2T3LF.mjs → customer-detail-KDLZ23B3.mjs} +17 -16
  70. package/dist/{customer-group-detail-6T7OXGQD.mjs → customer-group-detail-ZIAVMOYS.mjs} +12 -12
  71. package/dist/{customer-group-list-AJEAF5D2.mjs → customer-group-list-BDDC5VVZ.mjs} +15 -15
  72. package/dist/{customers-add-customer-group-QVTVSQYM.mjs → customers-add-customer-group-B3ASQGP6.mjs} +12 -12
  73. package/dist/{edit-inventory-item-H7DAZWIT.mjs → edit-inventory-item-OKAXQRJ5.mjs} +2 -2
  74. package/dist/{edit-inventory-item-attributes-7HTXXPGZ.mjs → edit-inventory-item-attributes-FVWDV6O5.mjs} +2 -2
  75. package/dist/{edit-reservation-OVTRZHJR.mjs → edit-reservation-3PU6YSNJ.mjs} +3 -3
  76. package/dist/{edit-rules-SMVRTCUP.mjs → edit-rules-LOJ3P4YB.mjs} +14 -14
  77. package/dist/en.json +85 -5
  78. package/dist/{inventory-create-ANYUM4P5.mjs → inventory-create-C2WWS7QR.mjs} +13 -13
  79. package/dist/{inventory-detail-ZPSEMYI2.mjs → inventory-detail-AKOZ4T3Z.mjs} +12 -12
  80. package/dist/{inventory-list-RXJPSVZE.mjs → inventory-list-DRFJIU2O.mjs} +2 -2
  81. package/dist/{inventory-metadata-FNEJ3RAT.mjs → inventory-metadata-N6CJZEWD.mjs} +12 -12
  82. package/dist/{inventory-stock-FD4ZM4BB.mjs → inventory-stock-IJ2N7LKC.mjs} +14 -14
  83. package/dist/{location-detail-N3GUZSY7.mjs → location-detail-PL4Y43RS.mjs} +16 -16
  84. package/dist/{location-fulfillment-providers-7ZUJAGNY.mjs → location-fulfillment-providers-2PLOVSXC.mjs} +17 -16
  85. package/dist/{location-sales-channels-P3QJTFDT.mjs → location-sales-channels-SZARSLWT.mjs} +5 -5
  86. package/dist/{location-service-zone-shipping-option-create-ZJ4GIBTJ.mjs → location-service-zone-shipping-option-create-CUNSAP24.mjs} +15 -15
  87. package/dist/{location-service-zone-shipping-option-edit-4CGPQ3VT.mjs → location-service-zone-shipping-option-edit-OJ462SVM.mjs} +1 -1
  88. package/dist/{location-service-zone-shipping-option-pricing-CR4BVYG3.mjs → location-service-zone-shipping-option-pricing-5HN2Z5RB.mjs} +2 -2
  89. package/dist/login-VBUNWZHI.mjs +301 -0
  90. package/dist/{manage-locations-7HH6R4UP.mjs → manage-locations-JPCSBA5D.mjs} +2 -2
  91. package/dist/{order-allocate-items-HZGGYJ42.mjs → order-allocate-items-6QHQASQJ.mjs} +4 -4
  92. package/dist/{order-create-claim-SCDJGM46.mjs → order-create-claim-ECVSH5GC.mjs} +22 -22
  93. package/dist/{order-create-edit-JIE3HDHP.mjs → order-create-edit-EVIOJIXE.mjs} +14 -13
  94. package/dist/{order-create-exchange-LQU4YN7F.mjs → order-create-exchange-ZVYYOGI3.mjs} +22 -22
  95. package/dist/{order-create-fulfillment-OWUVTZXW.mjs → order-create-fulfillment-FDIFEV6X.mjs} +16 -16
  96. package/dist/{order-create-refund-Q6HQY42R.mjs → order-create-refund-TNPGKR5P.mjs} +17 -17
  97. package/dist/{order-create-return-52GHGW5Z.mjs → order-create-return-NR6XQLDD.mjs} +9 -9
  98. package/dist/{order-create-shipment-WAGGEPRW.mjs → order-create-shipment-UP3WGRWB.mjs} +12 -12
  99. package/dist/{order-detail-PVPGEWGY.mjs → order-detail-F6D5DV74.mjs} +28 -28
  100. package/dist/{order-edit-billing-address-UM76J4KX.mjs → order-edit-billing-address-D4AJ6Z5Q.mjs} +44 -12
  101. package/dist/{order-edit-email-CL3KNOCM.mjs → order-edit-email-MXYA5BII.mjs} +12 -12
  102. package/dist/{order-edit-shipping-address-PIESTGVL.mjs → order-edit-shipping-address-GKW2ZPGR.mjs} +42 -12
  103. package/dist/{order-export-LE363ZLB.mjs → order-export-KQUI2TK7.mjs} +14 -14
  104. package/dist/{order-list-GRLQWN4L.mjs → order-list-7A5UKGXR.mjs} +11 -11
  105. package/dist/{order-metadata-FHBB7MTG.mjs → order-metadata-2IXELA7C.mjs} +12 -12
  106. package/dist/{order-receive-return-PRVKP6J2.mjs → order-receive-return-XXHOXGDC.mjs} +13 -13
  107. package/dist/{order-request-transfer-XSAGRUMT.mjs → order-request-transfer-2ENR64VR.mjs} +13 -13
  108. package/dist/{price-list-configuration-6S3MLNXQ.mjs → price-list-configuration-BZ3ZH5FY.mjs} +3 -3
  109. package/dist/{price-list-create-MFRUQADC.mjs → price-list-create-GFGNP6OS.mjs} +16 -16
  110. package/dist/{price-list-detail-Q5VG5VGW.mjs → price-list-detail-SNNOR5N7.mjs} +17 -17
  111. package/dist/{price-list-edit-53UW35L3.mjs → price-list-edit-YW5BXBF2.mjs} +3 -3
  112. package/dist/{price-list-list-DG5YEZ44.mjs → price-list-list-OF562HME.mjs} +4 -4
  113. package/dist/{price-list-prices-add-SDU5YZAT.mjs → price-list-prices-add-F7A2EV7L.mjs} +15 -15
  114. package/dist/{price-list-prices-edit-5USQR4D4.mjs → price-list-prices-edit-PQ26MOJE.mjs} +5 -5
  115. package/dist/{product-attributes-EFIRUBRO.mjs → product-attributes-JTPGHUXZ.mjs} +13 -13
  116. package/dist/{product-create-K6EWZHIT.mjs → product-create-VFLLQWVX.mjs} +485 -561
  117. package/dist/{product-create-variant-ERKHTEJZ.mjs → product-create-variant-PLZ5Q2R6.mjs} +14 -14
  118. package/dist/{product-detail-DKPZDEIY.mjs → product-detail-ISHFZV7X.mjs} +45 -66
  119. package/dist/{product-edit-55YXTIGO.mjs → product-edit-6EDDNIM6.mjs} +13 -13
  120. package/dist/{product-export-5AD7NELI.mjs → product-export-UMMROQ7T.mjs} +18 -17
  121. package/dist/{product-image-variants-edit-M6QF2RLE.mjs → product-image-variants-edit-VRG3AJID.mjs} +12 -12
  122. package/dist/{product-import-V3KQN4TV.mjs → product-import-EPS4KDID.mjs} +12 -12
  123. package/dist/{product-list-EUWZIFTM.mjs → product-list-37O7VB2L.mjs} +20 -20
  124. package/dist/{product-media-3VJ7KENL.mjs → product-media-IV5NUSLW.mjs} +3 -3
  125. package/dist/{product-metadata-GL2MVPDI.mjs → product-metadata-KTVRI7B3.mjs} +12 -12
  126. package/dist/product-option-create-JUGLFR2K.mjs +336 -0
  127. package/dist/product-option-detail-VVK3YBCE.mjs +331 -0
  128. package/dist/product-option-edit-7FQSKI2R.mjs +325 -0
  129. package/dist/product-option-list-YHGRI7OJ.mjs +268 -0
  130. package/dist/product-option-metadata-P2DHDGYR.mjs +73 -0
  131. package/dist/product-options-manage-4SZDF5H5.mjs +325 -0
  132. package/dist/{product-organization-N3VBRXF4.mjs → product-organization-OEUSIWNQ.mjs} +15 -15
  133. package/dist/{product-prices-4C36AG4R.mjs → product-prices-GUO3KM2U.mjs} +3 -3
  134. package/dist/{product-sales-channels-PPXUG4KT.mjs → product-sales-channels-BOZD3AC3.mjs} +5 -5
  135. package/dist/{product-shipping-profile-ETQFZ7DC.mjs → product-shipping-profile-FNFRDY47.mjs} +3 -3
  136. package/dist/{product-stock-VEGE6SUZ.mjs → product-stock-2DNYG73L.mjs} +14 -14
  137. package/dist/{product-tag-create-PQMDDKWH.mjs → product-tag-create-CW7GUCZW.mjs} +12 -12
  138. package/dist/{product-tag-detail-I3MBZX7U.mjs → product-tag-detail-IB5VIZ3K.mjs} +26 -25
  139. package/dist/{product-tag-edit-K3BBQLJR.mjs → product-tag-edit-ZSXD3DOC.mjs} +12 -12
  140. package/dist/{product-tag-list-JUWSOMB7.mjs → product-tag-list-MJO5PURP.mjs} +24 -23
  141. package/dist/{product-tag-metadata-MJH5LH7E.mjs → product-tag-metadata-DAKCXWZF.mjs} +12 -12
  142. package/dist/{product-type-create-DRFXTL5O.mjs → product-type-create-NRLNMABQ.mjs} +2 -2
  143. package/dist/{product-type-detail-RKHT5NBL.mjs → product-type-detail-J2IMAZW6.mjs} +14 -14
  144. package/dist/{product-type-edit-SRHCZDK7.mjs → product-type-edit-BHTPMMVI.mjs} +2 -2
  145. package/dist/{product-type-list-QQKAHBJ3.mjs → product-type-list-MQ2PW2IE.mjs} +3 -3
  146. package/dist/{product-type-metadata-CDJDFFGQ.mjs → product-type-metadata-BCZMUG3K.mjs} +12 -12
  147. package/dist/{product-variant-detail-XAYG5CKE.mjs → product-variant-detail-4L6DHT3K.mjs} +12 -12
  148. package/dist/{product-variant-edit-DEZEY2H2.mjs → product-variant-edit-PZU4P65H.mjs} +13 -13
  149. package/dist/{product-variant-manage-inventory-items-Y2VEOHP7.mjs → product-variant-manage-inventory-items-E3GPBPEZ.mjs} +3 -3
  150. package/dist/{product-variant-media-2WLVNGI4.mjs → product-variant-media-BSNCO642.mjs} +2 -2
  151. package/dist/{product-variant-metadata-VTZDNWUT.mjs → product-variant-metadata-FHGGZGPV.mjs} +12 -12
  152. package/dist/{promotion-add-campaign-DO67QK6M.mjs → promotion-add-campaign-NQSIFI33.mjs} +3 -3
  153. package/dist/{promotion-create-HWFNUQXG.mjs → promotion-create-GBZWJVAI.mjs} +24 -21
  154. package/dist/{promotion-detail-QC36KXB3.mjs → promotion-detail-W2OGUESO.mjs} +12 -12
  155. package/dist/{refund-reason-create-YHCDEHGQ.mjs → refund-reason-create-DLVRT5OU.mjs} +12 -12
  156. package/dist/{refund-reason-edit-CZ5QZ2SZ.mjs → refund-reason-edit-XCSU7RMH.mjs} +12 -12
  157. package/dist/{refund-reason-list-OJYYEYJE.mjs → refund-reason-list-G6UNVGPG.mjs} +18 -18
  158. package/dist/{region-create-NA7Y2LN4.mjs → region-create-2CRTF7HJ.mjs} +1 -1
  159. package/dist/{region-edit-WAU347DP.mjs → region-edit-IB3PJE7V.mjs} +1 -1
  160. package/dist/{region-metadata-H6XXUQ4S.mjs → region-metadata-WBEUKOI6.mjs} +12 -12
  161. package/dist/{reservation-create-ZCIYM6JI.mjs → reservation-create-ERFJUBME.mjs} +4 -4
  162. package/dist/{reservation-detail-LZAQL4XA.mjs → reservation-detail-Y6UZRZXY.mjs} +12 -12
  163. package/dist/{reservation-list-B47DXTA7.mjs → reservation-list-LEDZB7KL.mjs} +3 -3
  164. package/dist/{reservation-metadata-5HZSDDOK.mjs → reservation-metadata-7KH4EXMN.mjs} +12 -12
  165. package/dist/{return-reason-list-SCBGTOEI.mjs → return-reason-list-UUQAL464.mjs} +6 -6
  166. package/dist/{sales-channel-add-products-F7YV4MO5.mjs → sales-channel-add-products-GSPG7OTK.mjs} +14 -14
  167. package/dist/{sales-channel-create-MI7HHZYE.mjs → sales-channel-create-MM237EBQ.mjs} +3 -3
  168. package/dist/{sales-channel-detail-MXIPZCGA.mjs → sales-channel-detail-65ZFV2OI.mjs} +14 -14
  169. package/dist/{sales-channel-edit-VSHOIR37.mjs → sales-channel-edit-AC2J4N3M.mjs} +3 -3
  170. package/dist/{sales-channel-list-RLGL7FM3.mjs → sales-channel-list-LXLW7X3U.mjs} +14 -14
  171. package/dist/{sales-channel-metadata-M364R4RJ.mjs → sales-channel-metadata-QUAL2RH6.mjs} +13 -13
  172. package/dist/{shipping-option-type-create-C5WUWON7.mjs → shipping-option-type-create-EU75JC2Q.mjs} +12 -12
  173. package/dist/{shipping-option-type-detail-PENS2K73.mjs → shipping-option-type-detail-5GYEWATD.mjs} +13 -13
  174. package/dist/{shipping-option-type-edit-CIU5EHRP.mjs → shipping-option-type-edit-YR4JXT5M.mjs} +12 -12
  175. package/dist/{shipping-option-type-list-DIOX7VG7.mjs → shipping-option-type-list-BLC4Z5QW.mjs} +13 -13
  176. package/dist/{shipping-profile-metadata-75G2NNMA.mjs → shipping-profile-metadata-64YRWPDA.mjs} +12 -12
  177. package/dist/store-add-locales-TSMLNFZP.mjs +81 -0
  178. package/dist/{store-detail-JSNPOB2F.mjs → store-detail-3SS53LZR.mjs} +13 -13
  179. package/dist/{store-edit-5ZS562ZO.mjs → store-edit-SMEWFETF.mjs} +1 -1
  180. package/dist/{store-metadata-CYXTVJUE.mjs → store-metadata-IJGVDDA6.mjs} +12 -12
  181. package/dist/{tax-region-create-DWGL4EUT.mjs → tax-region-create-XLYIS5XX.mjs} +13 -13
  182. package/dist/{tax-region-detail-2AE2EFI3.mjs → tax-region-detail-66FKEGFB.mjs} +29 -28
  183. package/dist/{tax-region-edit-EEVEEU2Q.mjs → tax-region-edit-GBR4EDW7.mjs} +13 -13
  184. package/dist/{tax-region-province-detail-4ERSEQFF.mjs → tax-region-province-detail-OBA7Q7MQ.mjs} +29 -28
  185. package/dist/{tax-region-tax-override-create-PHCGEF7V.mjs → tax-region-tax-override-create-34WYD2QZ.mjs} +28 -27
  186. package/dist/{tax-region-tax-override-edit-SMRPSILC.mjs → tax-region-tax-override-edit-6WJVOGWA.mjs} +27 -26
  187. package/dist/translation-list-J65VNNAX.mjs +527 -0
  188. package/dist/{translations-edit-HUNKY7CO.mjs → translations-edit-6P3KC4MO.mjs} +285 -320
  189. package/dist/{user-detail-BJUXLZZQ.mjs → user-detail-VMOJFHIJ.mjs} +2 -2
  190. package/dist/{user-metadata-2WPJOEJA.mjs → user-metadata-UOPVFX2L.mjs} +12 -12
  191. package/dist/{workflow-execution-detail-H2AKEZJX.mjs → workflow-execution-detail-WAQ7IG4T.mjs} +12 -12
  192. package/package.json +9 -9
  193. package/src/components/data-grid/components/data-grid-cell-container.tsx +7 -10
  194. package/src/components/data-grid/components/data-grid-multiline-cell.tsx +103 -0
  195. package/src/components/data-grid/components/data-grid-readonly-cell.tsx +1 -4
  196. package/src/components/data-grid/components/data-grid-root.tsx +68 -51
  197. package/src/components/data-grid/components/data-grid-text-cell.tsx +6 -76
  198. package/src/components/data-grid/components/index.ts +1 -0
  199. package/src/components/data-grid/data-grid.tsx +2 -0
  200. package/src/components/data-grid/hooks/use-data-grid-cell.tsx +12 -0
  201. package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +1 -0
  202. package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +65 -7
  203. package/src/components/data-grid/types.ts +1 -0
  204. package/src/components/inputs/combobox/combobox.tsx +185 -95
  205. package/src/components/layout/main-layout/main-layout.tsx +7 -4
  206. package/src/components/table/table-cells/order/country-cell/country-cell.tsx +5 -1
  207. package/src/dashboard-app/routes/get-route.map.tsx +68 -12
  208. package/src/hooks/api/cloud.tsx +41 -0
  209. package/src/hooks/api/index.ts +3 -1
  210. package/src/hooks/api/product-options.tsx +151 -0
  211. package/src/hooks/api/products.tsx +26 -66
  212. package/src/hooks/api/translations.tsx +103 -191
  213. package/src/hooks/table/columns/use-order-table-columns.tsx +5 -3
  214. package/src/hooks/table/columns/use-product-option-table-columns.tsx +44 -0
  215. package/src/hooks/table/filters/index.ts +1 -0
  216. package/src/hooks/table/filters/use-product-option-table-filters.tsx +33 -0
  217. package/src/hooks/table/query/use-product-option-table-query.tsx +34 -0
  218. package/src/i18n/translations/$schema.json +304 -12
  219. package/src/i18n/translations/en.json +85 -5
  220. package/src/i18n/translations/es.json +21 -1
  221. package/src/routes/customers/customer-detail/components/customer-order-section/customer-order-section.tsx +1 -1
  222. package/src/routes/login/components/cloud-auth-login.tsx +114 -0
  223. package/src/routes/login/login.tsx +9 -1
  224. package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx +1 -0
  225. package/src/routes/orders/order-edit-billing-address/components/edit-order-billing-address-form/edit-order-billing-address-form.tsx +34 -0
  226. package/src/routes/orders/order-edit-shipping-address/components/edit-order-shipping-address-form/edit-order-shipping-address-form.tsx +32 -0
  227. package/src/routes/product-options/common/hooks/use-delete-product-option-action.tsx +41 -0
  228. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-details.tsx +71 -0
  229. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-form.tsx +192 -0
  230. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-organize.tsx +77 -0
  231. package/src/routes/product-options/product-option-create/components/create-product-option-form/index.ts +1 -0
  232. package/src/routes/product-options/product-option-create/components/create-product-option-form/schema.ts +15 -0
  233. package/src/routes/product-options/product-option-create/index.ts +1 -0
  234. package/src/routes/product-options/product-option-create/product-option-create.tsx +10 -0
  235. package/src/routes/product-options/product-option-detail/breadcrumb.tsx +14 -0
  236. package/src/routes/product-options/product-option-detail/components/product-option-general-section/index.ts +1 -0
  237. package/src/routes/product-options/product-option-detail/components/product-option-general-section/product-option-general-section.tsx +84 -0
  238. package/src/routes/product-options/product-option-detail/components/product-option-product-section/index.ts +1 -0
  239. package/src/routes/product-options/product-option-detail/components/product-option-product-section/product-option-product-section.tsx +82 -0
  240. package/src/routes/product-options/product-option-detail/index.ts +3 -0
  241. package/src/routes/product-options/product-option-detail/loader.ts +18 -0
  242. package/src/routes/product-options/product-option-detail/product-option-detail.tsx +50 -0
  243. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-details.tsx +94 -0
  244. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-form.tsx +116 -0
  245. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-organize.tsx +77 -0
  246. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/index.ts +1 -0
  247. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/schema.ts +13 -0
  248. package/src/routes/product-options/product-option-edit/index.ts +1 -0
  249. package/src/routes/product-options/product-option-edit/product-option-edit.tsx +34 -0
  250. package/src/routes/product-options/product-option-list/components/product-option-list-table/index.ts +1 -0
  251. package/src/routes/product-options/product-option-list/components/product-option-list-table/product-option-list-table.tsx +140 -0
  252. package/src/routes/product-options/product-option-list/index.ts +1 -0
  253. package/src/routes/product-options/product-option-list/product-option-list.tsx +19 -0
  254. package/src/routes/product-options/product-option-metadata/index.ts +1 -0
  255. package/src/routes/product-options/product-option-metadata/product-option-metadata.tsx +27 -0
  256. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +16 -4
  257. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +327 -194
  258. package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +4 -7
  259. package/src/routes/products/product-create/constants.ts +2 -0
  260. package/src/routes/products/product-create/utils.ts +6 -1
  261. package/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx +33 -51
  262. package/src/routes/products/product-options-manage/components/product-options-manage-form/index.ts +1 -0
  263. package/src/routes/products/product-options-manage/components/product-options-manage-form/product-options-manage-form.tsx +296 -0
  264. package/src/routes/products/product-options-manage/index.ts +1 -0
  265. package/src/routes/products/product-options-manage/product-options-manage.tsx +35 -0
  266. package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +6 -0
  267. package/src/routes/translations/add-locales/add-locales.tsx +29 -0
  268. package/src/routes/translations/add-locales/index.tsx +1 -0
  269. package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +42 -17
  270. package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +5 -1
  271. package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +253 -41
  272. package/src/routes/translations/translation-list/translation-list.tsx +8 -2
  273. package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +337 -380
  274. package/src/routes/translations/translations-edit/translations-edit.tsx +8 -13
  275. package/dist/chunk-HGRIOEAR.mjs +0 -32
  276. package/dist/chunk-XDJ7OMBR.mjs +0 -160
  277. package/dist/login-VNOLI5YG.mjs +0 -201
  278. package/dist/product-create-option-7AOXAA4S.mjs +0 -151
  279. package/dist/product-edit-option-LWJT3CYJ.mjs +0 -156
  280. package/dist/translation-list-S5Z6PG2R.mjs +0 -295
  281. package/src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx +0 -122
  282. package/src/routes/products/product-create-option/components/create-product-option-form/index.ts +0 -1
  283. package/src/routes/products/product-create-option/index.ts +0 -1
  284. package/src/routes/products/product-create-option/product-create-option.tsx +0 -30
  285. package/src/routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx +0 -123
  286. package/src/routes/products/product-edit-option/components/edit-product-option-form/index.ts +0 -1
  287. package/src/routes/products/product-edit-option/index.ts +0 -1
  288. package/src/routes/products/product-edit-option/product-edit-option.tsx +0 -35
  289. package/dist/{chunk-FBYTX6K7.mjs → chunk-ORWRXJJT.mjs} +4 -4
  290. package/dist/{location-list-KVBA6J47.mjs → location-list-3WP65J3E.mjs} +1 -1
  291. package/dist/{user-list-YTZQNYSO.mjs → user-list-3EAKK4XC.mjs} +3 -3
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  ChipGroup
3
3
  } from "./chunk-X5VECN6S.mjs";
4
+ import {
5
+ ChipInput,
6
+ SortableList
7
+ } from "./chunk-XD72PXRS.mjs";
4
8
  import {
5
9
  HandleInput
6
10
  } from "./chunk-7OYLCEKK.mjs";
7
- import {
8
- ChipInput
9
- } from "./chunk-XDJ7OMBR.mjs";
10
11
  import {
11
12
  useSalesChannelTableColumns,
12
13
  useSalesChannelTableEmptyState,
@@ -16,32 +17,32 @@ import {
16
17
  import "./chunk-BTYBTKWK.mjs";
17
18
  import {
18
19
  CategoryCombobox
19
- } from "./chunk-Y2YVTIJI.mjs";
20
+ } from "./chunk-CW5PQUJ6.mjs";
20
21
  import {
21
22
  useComboboxData
22
23
  } from "./chunk-3TZOFKX2.mjs";
23
24
  import {
24
25
  Combobox
25
- } from "./chunk-OFN7DIZA.mjs";
26
+ } from "./chunk-OYHFHBNL.mjs";
26
27
  import {
27
28
  PRODUCT_CREATE_FORM_DEFAULTS,
28
29
  ProductCreateSchema,
29
30
  UploadMediaFormItem,
30
31
  decorateVariantsWithDefaultValues,
31
32
  normalizeProductFormValues
32
- } from "./chunk-DODQ3KJT.mjs";
33
+ } from "./chunk-3RRA56WC.mjs";
33
34
  import "./chunk-ZQRKUG6J.mjs";
34
35
  import {
35
36
  DataGrid,
36
37
  createDataGridHelper,
37
38
  createDataGridPriceColumns
38
- } from "./chunk-CCQD65EY.mjs";
39
+ } from "./chunk-FKNW5MLZ.mjs";
39
40
  import "./chunk-DK4WIVY6.mjs";
40
41
  import "./chunk-BYOPZAGX.mjs";
41
- import "./chunk-R4ZOO4ON.mjs";
42
42
  import {
43
43
  DataTable
44
44
  } from "./chunk-KCWP7RF5.mjs";
45
+ import "./chunk-R4ZOO4ON.mjs";
45
46
  import "./chunk-C76H5USB.mjs";
46
47
  import "./chunk-DFFLVEZ5.mjs";
47
48
  import {
@@ -63,7 +64,7 @@ import {
63
64
  import {
64
65
  FormExtensionZone,
65
66
  useExtendableForm
66
- } from "./chunk-YKYVCQRS.mjs";
67
+ } from "./chunk-BJ44US4R.mjs";
67
68
  import "./chunk-2SSUH2HJ.mjs";
68
69
  import "./chunk-ONB3JEHR.mjs";
69
70
  import "./chunk-YCDDT44O.mjs";
@@ -90,32 +91,32 @@ import "./chunk-535OVBXR.mjs";
90
91
  import {
91
92
  Form
92
93
  } from "./chunk-OBQI23QM.mjs";
93
- import "./chunk-GRZSG4EP.mjs";
94
+ import "./chunk-74WPAWMW.mjs";
94
95
  import "./chunk-I4OBEAOJ.mjs";
95
96
  import "./chunk-HI6URQ7H.mjs";
96
97
  import "./chunk-6CLQKVAU.mjs";
98
+ import "./chunk-ML7BA2NY.mjs";
97
99
  import "./chunk-KI7TOXBR.mjs";
98
- import "./chunk-UJ2TMPV4.mjs";
99
- import "./chunk-23GTCEOV.mjs";
100
+ import "./chunk-QBIQEVTU.mjs";
100
101
  import "./chunk-WAXMT4IY.mjs";
101
102
  import "./chunk-DYDGGABK.mjs";
102
- import "./chunk-LGNTHZ5Y.mjs";
103
103
  import "./chunk-CN7JXSGW.mjs";
104
+ import "./chunk-LGNTHZ5Y.mjs";
104
105
  import "./chunk-5BQQRHQS.mjs";
105
- import "./chunk-HTCYX4VD.mjs";
106
+ import "./chunk-G35UUG2P.mjs";
106
107
  import "./chunk-5AFMB7XQ.mjs";
107
- import "./chunk-UWY5ZV66.mjs";
108
+ import "./chunk-VQ73B7ZZ.mjs";
108
109
  import "./chunk-A63RZVX6.mjs";
109
110
  import "./chunk-HBXV7ENS.mjs";
110
111
  import "./chunk-CDORR33H.mjs";
111
- import "./chunk-4JQR6QNW.mjs";
112
- import "./chunk-FYWHE3W5.mjs";
113
- import "./chunk-OSHH5GAS.mjs";
112
+ import "./chunk-333HK6Y6.mjs";
113
+ import "./chunk-GJN5SXGZ.mjs";
114
+ import "./chunk-Q34TRFIW.mjs";
115
+ import "./chunk-3BF5SC66.mjs";
114
116
  import {
115
117
  useSalesChannel,
116
118
  useSalesChannels
117
- } from "./chunk-2XTBDCGE.mjs";
118
- import "./chunk-3BF5SC66.mjs";
119
+ } from "./chunk-DWH2OQFK.mjs";
119
120
  import {
120
121
  useStore
121
122
  } from "./chunk-VCSSQVPD.mjs";
@@ -126,9 +127,10 @@ import {
126
127
  usePricePreferences
127
128
  } from "./chunk-SQDIZZDW.mjs";
128
129
  import {
129
- useCreateProduct
130
- } from "./chunk-Z6BFNHEO.mjs";
131
- import "./chunk-HGRIOEAR.mjs";
130
+ useCreateProduct,
131
+ useProductOptions
132
+ } from "./chunk-UCYUWNJL.mjs";
133
+ import "./chunk-7AXHHXCX.mjs";
132
134
  import "./chunk-FXYH54JP.mjs";
133
135
  import "./chunk-774WSTCC.mjs";
134
136
  import {
@@ -140,8 +142,8 @@ import "./chunk-QZ7TP4HQ.mjs";
140
142
  import { useTranslation as useTranslation10 } from "react-i18next";
141
143
 
142
144
  // src/routes/products/product-create/components/product-create-form/product-create-form.tsx
143
- import { Button as Button5, ProgressTabs, toast } from "@medusajs/ui";
144
- import { useEffect as useEffect2, useMemo as useMemo4, useState as useState4 } from "react";
145
+ import { Button as Button4, ProgressTabs, toast } from "@medusajs/ui";
146
+ import { useEffect as useEffect2, useMemo as useMemo4, useState as useState3 } from "react";
145
147
  import { useWatch as useWatch4 } from "react-hook-form";
146
148
  import { useTranslation as useTranslation9 } from "react-i18next";
147
149
 
@@ -167,7 +169,13 @@ var ProductCreateGeneralSection = ({
167
169
  render: ({ field }) => {
168
170
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
169
171
  /* @__PURE__ */ jsx(Form.Label, { children: t("products.fields.title.label") }),
170
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { ...field, placeholder: t("products.fields.title.placeholder") }) })
172
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
173
+ Input,
174
+ {
175
+ ...field,
176
+ placeholder: t("products.fields.title.placeholder")
177
+ }
178
+ ) })
171
179
  ] });
172
180
  }
173
181
  }
@@ -180,7 +188,13 @@ var ProductCreateGeneralSection = ({
180
188
  render: ({ field }) => {
181
189
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
182
190
  /* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.subtitle.label") }),
183
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { ...field, placeholder: t("products.fields.subtitle.placeholder") }) })
191
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
192
+ Input,
193
+ {
194
+ ...field,
195
+ placeholder: t("products.fields.subtitle.placeholder")
196
+ }
197
+ ) })
184
198
  ] });
185
199
  }
186
200
  }
@@ -200,7 +214,13 @@ var ProductCreateGeneralSection = ({
200
214
  children: t("fields.handle")
201
215
  }
202
216
  ),
203
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(HandleInput, { ...field, placeholder: t("products.fields.handle.placeholder") }) })
217
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
218
+ HandleInput,
219
+ {
220
+ ...field,
221
+ placeholder: t("products.fields.handle.placeholder")
222
+ }
223
+ ) })
204
224
  ] });
205
225
  }
206
226
  }
@@ -214,7 +234,13 @@ var ProductCreateGeneralSection = ({
214
234
  render: ({ field }) => {
215
235
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
216
236
  /* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.description.label") }),
217
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Textarea, { ...field, placeholder: t("products.fields.description.placeholder") }) })
237
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
238
+ Textarea,
239
+ {
240
+ ...field,
241
+ placeholder: t("products.fields.description.placeholder")
242
+ }
243
+ ) })
218
244
  ] });
219
245
  }
220
246
  }
@@ -515,197 +541,23 @@ function formatFileSize(bytes, decimalPlaces = 2) {
515
541
  }
516
542
 
517
543
  // src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx
518
- import { XMarkMini } from "@medusajs/icons";
519
544
  import {
520
545
  Alert,
521
- Button,
522
546
  Checkbox,
523
- clx as clx2,
547
+ clx,
524
548
  Heading,
525
549
  Hint,
526
- IconButton as IconButton3,
527
550
  InlineTip,
528
- Input as Input2,
529
551
  Label,
530
552
  Text as Text2
531
553
  } from "@medusajs/ui";
532
554
  import {
533
- Controller,
534
555
  useFieldArray as useFieldArray2,
535
556
  useWatch
536
557
  } from "react-hook-form";
537
558
  import { useTranslation as useTranslation3 } from "react-i18next";
538
-
539
- // src/components/common/sortable-list/sortable-list.tsx
540
- import {
541
- DndContext as DndContext2,
542
- DragOverlay as DragOverlay2,
543
- KeyboardSensor as KeyboardSensor2,
544
- PointerSensor as PointerSensor2,
545
- defaultDropAnimationSideEffects as defaultDropAnimationSideEffects2,
546
- useSensor as useSensor2,
547
- useSensors as useSensors2
548
- } from "@dnd-kit/core";
549
- import {
550
- SortableContext as SortableContext2,
551
- arrayMove as arrayMove2,
552
- sortableKeyboardCoordinates as sortableKeyboardCoordinates2,
553
- useSortable as useSortable2
554
- } from "@dnd-kit/sortable";
555
- import { CSS as CSS2 } from "@dnd-kit/utilities";
556
- import { DotsSix as DotsSix2 } from "@medusajs/icons";
557
- import { IconButton as IconButton2, clx } from "@medusajs/ui";
558
- import {
559
- Fragment,
560
- createContext,
561
- useContext,
562
- useMemo,
563
- useState as useState2
564
- } from "react";
565
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
566
- var List = ({
567
- items,
568
- onChange,
569
- renderItem
570
- }) => {
571
- const [active, setActive] = useState2(null);
572
- const [activeItem, activeIndex] = useMemo(() => {
573
- if (active === null) {
574
- return [null, null];
575
- }
576
- const index = items.findIndex(({ id }) => id === active.id);
577
- return [items[index], index];
578
- }, [active, items]);
579
- const sensors = useSensors2(
580
- useSensor2(PointerSensor2),
581
- useSensor2(KeyboardSensor2, {
582
- coordinateGetter: sortableKeyboardCoordinates2
583
- })
584
- );
585
- const handleDragStart = ({ active: active2 }) => {
586
- setActive(active2);
587
- };
588
- const handleDragEnd = ({ active: active2, over }) => {
589
- if (over && active2.id !== over.id) {
590
- const activeIndex2 = items.findIndex(({ id }) => id === active2.id);
591
- const overIndex = items.findIndex(({ id }) => id === over.id);
592
- onChange(arrayMove2(items, activeIndex2, overIndex));
593
- }
594
- setActive(null);
595
- };
596
- const handleDragCancel = () => {
597
- setActive(null);
598
- };
599
- return /* @__PURE__ */ jsxs3(
600
- DndContext2,
601
- {
602
- sensors,
603
- onDragStart: handleDragStart,
604
- onDragEnd: handleDragEnd,
605
- onDragCancel: handleDragCancel,
606
- children: [
607
- /* @__PURE__ */ jsx3(Overlay, { children: activeItem && activeIndex !== null ? renderItem(activeItem, activeIndex) : null }),
608
- /* @__PURE__ */ jsx3(SortableContext2, { items, children: /* @__PURE__ */ jsx3(
609
- "ul",
610
- {
611
- role: "application",
612
- className: "flex list-inside list-none list-image-none flex-col p-0",
613
- children: items.map((item, index) => /* @__PURE__ */ jsx3(Fragment, { children: renderItem(item, index) }, item.id))
614
- }
615
- ) })
616
- ]
617
- }
618
- );
619
- };
620
- var dropAnimationConfig2 = {
621
- sideEffects: defaultDropAnimationSideEffects2({
622
- styles: {
623
- active: {
624
- opacity: "0.4"
625
- }
626
- }
627
- })
628
- };
629
- var Overlay = ({ children }) => {
630
- return /* @__PURE__ */ jsx3(
631
- DragOverlay2,
632
- {
633
- className: "shadow-elevation-card-hover overflow-hidden rounded-md [&>li]:border-b-0",
634
- dropAnimation: dropAnimationConfig2,
635
- children
636
- }
637
- );
638
- };
639
- var SortableItemContext = createContext(null);
640
- var useSortableItemContext = () => {
641
- const context = useContext(SortableItemContext);
642
- if (!context) {
643
- throw new Error(
644
- "useSortableItemContext must be used within a SortableItemContext"
645
- );
646
- }
647
- return context;
648
- };
649
- var Item = ({
650
- id,
651
- className,
652
- children
653
- }) => {
654
- const {
655
- attributes,
656
- isDragging,
657
- listeners,
658
- setNodeRef,
659
- setActivatorNodeRef,
660
- transform,
661
- transition
662
- } = useSortable2({ id });
663
- const context = useMemo(
664
- () => ({
665
- attributes,
666
- listeners,
667
- ref: setActivatorNodeRef,
668
- isDragging
669
- }),
670
- [attributes, listeners, setActivatorNodeRef, isDragging]
671
- );
672
- const style = {
673
- opacity: isDragging ? 0.4 : void 0,
674
- transform: CSS2.Translate.toString(transform),
675
- transition
676
- };
677
- return /* @__PURE__ */ jsx3(SortableItemContext.Provider, { value: context, children: /* @__PURE__ */ jsx3(
678
- "li",
679
- {
680
- className: clx("transition-fg flex flex-1 list-none", className),
681
- ref: setNodeRef,
682
- style,
683
- children
684
- }
685
- ) });
686
- };
687
- var DragHandle = () => {
688
- const { attributes, listeners, ref } = useSortableItemContext();
689
- return /* @__PURE__ */ jsx3(
690
- IconButton2,
691
- {
692
- variant: "transparent",
693
- size: "small",
694
- ...attributes,
695
- ...listeners,
696
- ref,
697
- className: "cursor-grab touch-none active:cursor-grabbing",
698
- children: /* @__PURE__ */ jsx3(DotsSix2, { className: "text-ui-fg-muted" })
699
- }
700
- );
701
- };
702
- var SortableList = Object.assign(List, {
703
- Item,
704
- DragHandle
705
- });
706
-
707
- // src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx
708
- import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
559
+ import { useMemo } from "react";
560
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
709
561
  var getPermutations = (data) => {
710
562
  if (data.length === 0) {
711
563
  return [];
@@ -731,10 +583,6 @@ var ProductCreateVariantsSection = ({
731
583
  form
732
584
  }) => {
733
585
  const { t } = useTranslation3();
734
- const options = useFieldArray2({
735
- control: form.control,
736
- name: "options"
737
- });
738
586
  const variants = useFieldArray2({
739
587
  control: form.control,
740
588
  name: "variants"
@@ -756,72 +604,147 @@ var ProductCreateVariantsSection = ({
756
604
  });
757
605
  const showInvalidOptionsMessage = !!form.formState.errors.options?.length;
758
606
  const showInvalidVariantsMessage = form.formState.errors.variants?.root?.message === "invalid_length";
759
- const handleOptionValueUpdate = (index, value) => {
760
- const { isTouched: hasUserSelectedVariants } = form.getFieldState("variants");
761
- const newOptions = [...watchedOptions];
762
- newOptions[index].values = value;
763
- const permutations = getPermutations(
764
- newOptions.filter(({ values }) => values.length)
607
+ const { product_options = [], isLoading } = useProductOptions({
608
+ is_exclusive: false
609
+ });
610
+ const productOptionChoices = useMemo(() => {
611
+ const existingChoices = product_options.map((option) => ({
612
+ value: option.id,
613
+ label: option.title
614
+ }));
615
+ const newChoices = watchedOptions.filter((opt) => !opt.id && opt.title).map((opt) => ({
616
+ value: opt.title,
617
+ label: opt.title
618
+ }));
619
+ return [...existingChoices, ...newChoices];
620
+ }, [product_options, watchedOptions]);
621
+ const selectedOptionValues = useMemo(() => {
622
+ return watchedOptions.map((opt) => opt.id || opt.title);
623
+ }, [watchedOptions]);
624
+ const handleProductOptionSelect = (optionValues) => {
625
+ const existingOptionIds = optionValues.filter(
626
+ (val) => product_options.some((opt) => opt.id === val)
765
627
  );
766
- const oldVariants = [...watchedVariants];
767
- const findMatchingPermutation = (options2) => {
768
- return permutations.find(
769
- (permutation) => Object.keys(options2).every((key) => options2[key] === permutation[key])
770
- );
771
- };
772
- const newVariants = oldVariants.reduce((variants2, variant) => {
773
- const match = findMatchingPermutation(variant.options);
774
- if (match) {
775
- variants2.push({
776
- ...variant,
777
- title: getVariantName(match),
778
- options: match
779
- });
780
- }
781
- return variants2;
782
- }, []);
783
- const usedPermutations = new Set(
784
- newVariants.map((variant) => variant.options)
628
+ const newOptionTitles = optionValues.filter(
629
+ (val) => !product_options.some((opt) => opt.id === val)
785
630
  );
786
- const unusedPermutations = permutations.filter(
787
- (permutation) => !usedPermutations.has(permutation)
631
+ const allSelectedOptions = [];
632
+ const selectedProductOptions = product_options.filter(
633
+ (option) => existingOptionIds.includes(option.id)
788
634
  );
789
- unusedPermutations.forEach((permutation) => {
790
- newVariants.push({
791
- title: getVariantName(permutation),
792
- options: permutation,
793
- should_create: hasUserSelectedVariants ? false : true,
794
- variant_rank: newVariants.length,
795
- // NOTE - prepare inventory array here for now so we prevent rendering issue if we append the items later
796
- inventory: [{ inventory_item_id: "", required_quantity: "" }]
797
- });
635
+ allSelectedOptions.push(...selectedProductOptions);
636
+ const watchedOptions2 = form.getValues("options");
637
+ watchedOptions2.forEach((opt) => {
638
+ if (!opt.id && opt.title && newOptionTitles.includes(opt.title)) {
639
+ allSelectedOptions.push({
640
+ title: opt.title,
641
+ values: opt.values || []
642
+ });
643
+ }
644
+ });
645
+ const newSelectedValues = {};
646
+ allSelectedOptions.forEach((option) => {
647
+ if ("id" in option && option.id) {
648
+ const currentOption = watchedOptions2.find((opt) => opt.id === option.id);
649
+ if (currentOption?.value_ids) {
650
+ newSelectedValues[option.id] = currentOption.value_ids;
651
+ } else {
652
+ newSelectedValues[option.id] = option.values?.map((v) => v.id) || [];
653
+ }
654
+ }
798
655
  });
656
+ updateFormWithSelectedValues(allSelectedOptions, newSelectedValues);
657
+ };
658
+ const generateAndSetVariants = (options) => {
659
+ const permutations = getPermutations(
660
+ options.filter(({ values }) => values && values.length > 0)
661
+ );
662
+ const newVariants = permutations.map((permutation, index) => ({
663
+ title: getVariantName(permutation),
664
+ options: permutation,
665
+ should_create: true,
666
+ variant_rank: index,
667
+ inventory: [{ inventory_item_id: "", required_quantity: "" }]
668
+ }));
799
669
  form.setValue("variants", newVariants);
800
670
  };
801
- const handleRemoveOption = (index) => {
802
- if (index === 0) {
671
+ const handleValueChange = (optionId, valueIds) => {
672
+ if (valueIds.length === 0) {
803
673
  return;
804
674
  }
805
- options.remove(index);
806
- const newOptions = [...watchedOptions];
807
- newOptions.splice(index, 1);
808
- const validOptionTitles = new Set(newOptions.map((option) => option.title));
809
- const permutations = getPermutations(newOptions);
810
- const oldVariants = [...watchedVariants];
811
- const newVariants = permutations.reduce((variants2, permutation) => {
812
- const variant = oldVariants.find(
813
- ({ options: options2 }) => Object.keys(options2).filter((option) => validOptionTitles.has(option)).every((key) => options2[key] === permutation[key])
814
- );
815
- if (variant) {
816
- variants2.push({
817
- ...variant,
818
- title: variant.title,
819
- options: permutation
820
- });
675
+ const currentOption = watchedOptions.find((opt) => opt.id === optionId);
676
+ if (!currentOption) {
677
+ return;
678
+ }
679
+ const productOption = product_options.find((opt) => opt.id === optionId);
680
+ const existingValueIds = new Set(
681
+ productOption?.values?.map((v) => v.id) || []
682
+ );
683
+ const validValueIds = [];
684
+ const newValueNames = [];
685
+ valueIds.forEach((id) => {
686
+ if (existingValueIds.has(id)) {
687
+ validValueIds.push(id);
688
+ } else {
689
+ newValueNames.push(id);
821
690
  }
822
- return variants2;
823
- }, []);
824
- form.setValue("variants", newVariants);
691
+ });
692
+ const updatedOptions = watchedOptions.map((opt) => {
693
+ if (opt.id === optionId) {
694
+ const selectedExistingValues = productOption?.values?.filter((v) => validValueIds.includes(v.id)).map((v) => v.value) || [];
695
+ return {
696
+ ...opt,
697
+ value_ids: valueIds,
698
+ values: [...selectedExistingValues, ...newValueNames]
699
+ };
700
+ }
701
+ return opt;
702
+ });
703
+ form.setValue("options", updatedOptions);
704
+ generateAndSetVariants(updatedOptions);
705
+ };
706
+ const handleNewOptionValueChange = (optionTitle, valueNames) => {
707
+ const updatedOptions = watchedOptions.map((opt) => {
708
+ if (!opt.id && opt.title === optionTitle) {
709
+ return {
710
+ ...opt,
711
+ values: valueNames
712
+ };
713
+ }
714
+ return opt;
715
+ });
716
+ form.setValue("options", updatedOptions);
717
+ generateAndSetVariants(updatedOptions);
718
+ };
719
+ const updateFormWithSelectedValues = (selectedProductOptions, valueSelections) => {
720
+ const newOptions = selectedProductOptions.map(
721
+ (option) => {
722
+ if ("id" in option && option.id !== void 0) {
723
+ const existingOption = option;
724
+ const selectedValueIds = valueSelections[existingOption.id] || [];
725
+ const allValues = option.values || [];
726
+ const selectedValues = allValues.filter((v) => selectedValueIds.includes(v.id)).sort((a, b) => {
727
+ const rankA = a.rank ?? Number.MAX_VALUE;
728
+ const rankB = b.rank ?? Number.MAX_VALUE;
729
+ return rankA - rankB;
730
+ }).map((v) => v.value);
731
+ return {
732
+ id: existingOption.id,
733
+ title: existingOption.title,
734
+ values: selectedValues,
735
+ value_ids: selectedValueIds.length > 0 ? selectedValueIds : void 0
736
+ };
737
+ } else {
738
+ const newOption = option;
739
+ return {
740
+ title: newOption.title,
741
+ values: newOption.values
742
+ };
743
+ }
744
+ }
745
+ );
746
+ form.setValue("options", newOptions);
747
+ generateAndSetVariants(newOptions);
825
748
  };
826
749
  const handleRankChange = (items) => {
827
750
  const update = items.map((item, index) => {
@@ -892,10 +815,10 @@ var ProductCreateVariantsSection = ({
892
815
  ])
893
816
  );
894
817
  };
895
- return /* @__PURE__ */ jsxs4("div", { id: "variants", className: "flex flex-col gap-y-8", children: [
896
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-y-6", children: [
897
- /* @__PURE__ */ jsx4(Heading, { level: "h2", children: t("products.create.variants.header") }),
898
- /* @__PURE__ */ jsx4(
818
+ return /* @__PURE__ */ jsxs3("div", { id: "variants", className: "flex flex-col gap-y-8", children: [
819
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-6", children: [
820
+ /* @__PURE__ */ jsx3(Heading, { level: "h2", children: t("products.create.variants.header") }),
821
+ /* @__PURE__ */ jsx3(
899
822
  SwitchBox,
900
823
  {
901
824
  control: form.control,
@@ -918,137 +841,141 @@ var ProductCreateVariantsSection = ({
918
841
  }
919
842
  )
920
843
  ] }),
921
- watchedAreVariantsEnabled && /* @__PURE__ */ jsxs4(Fragment2, { children: [
922
- /* @__PURE__ */ jsx4("div", { className: "flex flex-col gap-y-6", children: /* @__PURE__ */ jsx4(
923
- Form.Field,
924
- {
925
- control: form.control,
926
- name: "options",
927
- render: () => {
928
- return /* @__PURE__ */ jsx4(Form.Item, { children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-y-6", children: [
929
- /* @__PURE__ */ jsxs4("div", { className: "flex items-start justify-between gap-x-4", children: [
930
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
931
- /* @__PURE__ */ jsx4(Form.Label, { children: t("products.create.variants.productOptions.label") }),
932
- /* @__PURE__ */ jsx4(Form.Hint, { children: t("products.create.variants.productOptions.hint") })
933
- ] }),
934
- /* @__PURE__ */ jsx4(
935
- Button,
936
- {
937
- size: "small",
938
- variant: "secondary",
939
- type: "button",
940
- onClick: () => {
941
- options.append({
942
- title: "",
943
- values: []
944
- });
945
- },
946
- children: t("actions.add")
844
+ watchedAreVariantsEnabled && /* @__PURE__ */ jsxs3(Fragment, { children: [
845
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-6", children: [
846
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col", children: [
847
+ /* @__PURE__ */ jsx3(Label, { weight: "plus", children: t("products.create.variants.productOptions.label") }),
848
+ /* @__PURE__ */ jsx3(Hint, { children: t("products.create.variants.productOptions.hint") })
849
+ ] }),
850
+ showInvalidOptionsMessage && /* @__PURE__ */ jsx3(Alert, { dismissible: true, variant: "error", children: t("products.create.errors.options") }),
851
+ /* @__PURE__ */ jsx3(
852
+ Combobox,
853
+ {
854
+ value: selectedOptionValues,
855
+ onChange: (value) => handleProductOptionSelect(value),
856
+ options: productOptionChoices,
857
+ onCreateOption: async (options) => {
858
+ const optionTitle = options[options.length - 1]?.trim();
859
+ if (!optionTitle) {
860
+ return;
861
+ }
862
+ const allSelectedOptions = [];
863
+ const valueSelections = {};
864
+ watchedOptions.forEach((opt) => {
865
+ if (opt.id) {
866
+ const productOption = product_options.find(
867
+ (p) => p.id === opt.id
868
+ );
869
+ if (productOption) {
870
+ allSelectedOptions.push(productOption);
871
+ if (opt.value_ids) {
872
+ valueSelections[opt.id] = opt.value_ids;
873
+ }
947
874
  }
948
- )
949
- ] }),
950
- showInvalidOptionsMessage && /* @__PURE__ */ jsx4(Alert, { dismissible: true, variant: "error", children: t("products.create.errors.options") }),
951
- /* @__PURE__ */ jsx4("ul", { className: "flex flex-col gap-y-4", children: options.fields.map((option, index) => {
952
- const hasError = !!form.formState.errors.options?.[index];
953
- return /* @__PURE__ */ jsxs4(
954
- "li",
955
- {
956
- className: clx2(
957
- "bg-ui-bg-component shadow-elevation-card-rest grid grid-cols-[1fr_28px] items-center gap-1.5 rounded-xl p-1.5",
958
- {
959
- "border-ui-border-error shadow-borders-error": hasError
960
- }
961
- ),
962
- children: [
963
- /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-[min-content,1fr] items-center gap-1.5", children: [
964
- /* @__PURE__ */ jsx4("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx4(
965
- Label,
966
- {
967
- size: "xsmall",
968
- weight: "plus",
969
- className: "text-ui-fg-subtle",
970
- htmlFor: `options.${index}.title`,
971
- children: t("fields.title")
972
- }
973
- ) }),
974
- /* @__PURE__ */ jsx4(
975
- Input2,
976
- {
977
- className: "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover",
978
- ...form.register(
979
- `options.${index}.title`
980
- ),
981
- placeholder: t(
982
- "products.fields.options.optionTitlePlaceholder"
983
- )
984
- }
985
- ),
986
- /* @__PURE__ */ jsx4("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx4(
987
- Label,
988
- {
989
- size: "xsmall",
990
- weight: "plus",
991
- className: "text-ui-fg-subtle",
992
- htmlFor: `options.${index}.values`,
993
- children: t("fields.values")
994
- }
995
- ) }),
996
- /* @__PURE__ */ jsx4(
997
- Controller,
998
- {
999
- control: form.control,
1000
- name: `options.${index}.values`,
1001
- render: ({
1002
- field: { onChange, ...field }
1003
- }) => {
1004
- const handleValueChange = (value) => {
1005
- handleOptionValueUpdate(index, value);
1006
- onChange(value);
1007
- };
1008
- return /* @__PURE__ */ jsx4(
1009
- ChipInput,
1010
- {
1011
- ...field,
1012
- variant: "contrast",
1013
- onChange: handleValueChange,
1014
- placeholder: t(
1015
- "products.fields.options.variantionsPlaceholder"
1016
- )
1017
- }
1018
- );
1019
- }
1020
- }
1021
- )
1022
- ] }),
1023
- /* @__PURE__ */ jsx4(
1024
- IconButton3,
1025
- {
1026
- type: "button",
1027
- size: "small",
1028
- variant: "transparent",
1029
- className: "text-ui-fg-muted",
1030
- disabled: index === 0,
1031
- onClick: () => handleRemoveOption(index),
1032
- children: /* @__PURE__ */ jsx4(XMarkMini, {})
1033
- }
1034
- )
1035
- ]
875
+ } else {
876
+ allSelectedOptions.push({
877
+ title: opt.title,
878
+ values: opt.values || []
879
+ });
880
+ }
881
+ });
882
+ const newOption = {
883
+ title: optionTitle,
884
+ is_exclusive: true,
885
+ values: []
886
+ };
887
+ allSelectedOptions.push(newOption);
888
+ updateFormWithSelectedValues(
889
+ allSelectedOptions,
890
+ valueSelections
891
+ );
892
+ },
893
+ placeholder: t("products.fields.options.optionTitlePlaceholder"),
894
+ disabled: isLoading,
895
+ displayMode: "chips"
896
+ }
897
+ )
898
+ ] }),
899
+ watchedOptions.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-4", children: [
900
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col", children: [
901
+ /* @__PURE__ */ jsx3(Label, { weight: "plus", children: t("fields.values") }),
902
+ /* @__PURE__ */ jsx3(Hint, { children: t("products.create.variants.selectValuesHint") })
903
+ ] }),
904
+ /* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-y-3", children: watchedOptions.map((opt, index) => {
905
+ if (opt.id) {
906
+ const productOption = product_options.find(
907
+ (p) => p.id === opt.id
908
+ );
909
+ const existingValues = productOption?.values || [];
910
+ const customValueNames = opt.values?.filter(
911
+ (v) => !existingValues.some((ev) => ev.value === v)
912
+ ) || [];
913
+ const existingValueOptions = existingValues.sort((a, b) => {
914
+ const rankA = a.rank ?? Number.MAX_VALUE;
915
+ const rankB = b.rank ?? Number.MAX_VALUE;
916
+ return rankA - rankB;
917
+ }).map((v) => ({
918
+ value: v.id,
919
+ label: v.value
920
+ }));
921
+ const customValueOptions = customValueNames.map((v) => ({
922
+ value: v,
923
+ label: v
924
+ }));
925
+ const valueOptions = [
926
+ ...existingValueOptions,
927
+ ...customValueOptions
928
+ ];
929
+ return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-2", children: [
930
+ /* @__PURE__ */ jsx3(Label, { size: "small", weight: "plus", children: opt.title }),
931
+ /* @__PURE__ */ jsx3(
932
+ Combobox,
933
+ {
934
+ value: opt.value_ids ?? [],
935
+ onChange: (value) => handleValueChange(opt.id, value),
936
+ onCreateOption: async (values) => {
937
+ const newValueName = values[values.length - 1]?.trim();
938
+ if (newValueName && opt.id) {
939
+ const currentValueIds = opt.value_ids || [];
940
+ handleValueChange(opt.id, [
941
+ ...currentValueIds,
942
+ newValueName
943
+ ]);
944
+ }
1036
945
  },
1037
- option.id
1038
- );
1039
- }) })
1040
- ] }) });
946
+ options: valueOptions,
947
+ placeholder: t(
948
+ "products.fields.options.variantionsPlaceholder"
949
+ ),
950
+ displayMode: "chips"
951
+ }
952
+ )
953
+ ] }, opt.id);
954
+ } else {
955
+ return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-2", children: [
956
+ /* @__PURE__ */ jsx3(Label, { size: "small", weight: "plus", children: opt.title }),
957
+ /* @__PURE__ */ jsx3(
958
+ ChipInput,
959
+ {
960
+ value: opt.values ?? [],
961
+ onChange: (value) => handleNewOptionValueChange(opt.title, value),
962
+ placeholder: t(
963
+ "products.fields.options.variantionsPlaceholder"
964
+ )
965
+ }
966
+ )
967
+ ] }, index);
1041
968
  }
1042
- }
1043
- ) }),
1044
- /* @__PURE__ */ jsx4("div", { className: "grid grid-cols-1 gap-x-4 gap-y-8", children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-y-6", children: [
1045
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
1046
- /* @__PURE__ */ jsx4(Label, { weight: "plus", children: t("products.create.variants.productVariants.label") }),
1047
- /* @__PURE__ */ jsx4(Hint, { children: t("products.create.variants.productVariants.hint") })
969
+ }) })
970
+ ] }),
971
+ /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-1 gap-x-4 gap-y-8", children: /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-y-6", children: [
972
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col", children: [
973
+ /* @__PURE__ */ jsx3(Label, { weight: "plus", children: t("products.create.variants.productVariants.label") }),
974
+ /* @__PURE__ */ jsx3(Hint, { children: t("products.create.variants.productVariants.hint") })
1048
975
  ] }),
1049
- !showInvalidOptionsMessage && showInvalidVariantsMessage && /* @__PURE__ */ jsx4(Alert, { dismissible: true, variant: "error", children: t("products.create.errors.variants") }),
1050
- variants.fields.length > 0 ? /* @__PURE__ */ jsxs4("div", { className: "overflow-hidden rounded-xl border", children: [
1051
- /* @__PURE__ */ jsxs4(
976
+ !showInvalidOptionsMessage && showInvalidVariantsMessage && /* @__PURE__ */ jsx3(Alert, { dismissible: true, variant: "error", children: t("products.create.errors.variants") }),
977
+ variants.fields.length > 0 ? /* @__PURE__ */ jsxs3("div", { className: "overflow-hidden rounded-xl border", children: [
978
+ /* @__PURE__ */ jsxs3(
1052
979
  "div",
1053
980
  {
1054
981
  className: "bg-ui-bg-component text-ui-fg-subtle grid items-center gap-3 border-b px-6 py-2.5",
@@ -1056,7 +983,7 @@ var ProductCreateVariantsSection = ({
1056
983
  gridTemplateColumns: `20px 28px repeat(${watchedOptions.length}, 1fr)`
1057
984
  },
1058
985
  children: [
1059
- /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
986
+ /* @__PURE__ */ jsx3("div", { children: /* @__PURE__ */ jsx3(
1060
987
  Checkbox,
1061
988
  {
1062
989
  className: "relative",
@@ -1064,25 +991,25 @@ var ProductCreateVariantsSection = ({
1064
991
  onCheckedChange: onCheckboxChange
1065
992
  }
1066
993
  ) }),
1067
- /* @__PURE__ */ jsx4("div", {}),
1068
- watchedOptions.map((option, index) => /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", weight: "plus", children: option.title }) }, index))
994
+ /* @__PURE__ */ jsx3("div", {}),
995
+ watchedOptions.map((option, index) => /* @__PURE__ */ jsx3("div", { children: /* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: option.title }) }, index))
1069
996
  ]
1070
997
  }
1071
998
  ),
1072
- /* @__PURE__ */ jsx4(
999
+ /* @__PURE__ */ jsx3(
1073
1000
  SortableList,
1074
1001
  {
1075
1002
  items: variants.fields,
1076
1003
  onChange: handleRankChange,
1077
1004
  renderItem: (item, index) => {
1078
- return /* @__PURE__ */ jsx4(
1005
+ return /* @__PURE__ */ jsx3(
1079
1006
  SortableList.Item,
1080
1007
  {
1081
1008
  id: item.id,
1082
- className: clx2("bg-ui-bg-base border-b", {
1009
+ className: clx("bg-ui-bg-base border-b", {
1083
1010
  "border-b-0": index === variants.fields.length - 1
1084
1011
  }),
1085
- children: /* @__PURE__ */ jsxs4(
1012
+ children: /* @__PURE__ */ jsxs3(
1086
1013
  "div",
1087
1014
  {
1088
1015
  className: "text-ui-fg-subtle grid w-full items-center gap-3 px-6 py-2.5",
@@ -1090,7 +1017,7 @@ var ProductCreateVariantsSection = ({
1090
1017
  gridTemplateColumns: `20px 28px repeat(${watchedOptions.length}, 1fr)`
1091
1018
  },
1092
1019
  children: [
1093
- /* @__PURE__ */ jsx4(
1020
+ /* @__PURE__ */ jsx3(
1094
1021
  Form.Field,
1095
1022
  {
1096
1023
  control: form.control,
@@ -1098,7 +1025,7 @@ var ProductCreateVariantsSection = ({
1098
1025
  render: ({
1099
1026
  field: { value, onChange, ...field }
1100
1027
  }) => {
1101
- return /* @__PURE__ */ jsx4(Form.Item, { children: /* @__PURE__ */ jsx4(Form.Control, { children: /* @__PURE__ */ jsx4(
1028
+ return /* @__PURE__ */ jsx3(Form.Item, { children: /* @__PURE__ */ jsx3(Form.Control, { children: /* @__PURE__ */ jsx3(
1102
1029
  Checkbox,
1103
1030
  {
1104
1031
  className: "relative",
@@ -1110,8 +1037,8 @@ var ProductCreateVariantsSection = ({
1110
1037
  }
1111
1038
  }
1112
1039
  ),
1113
- /* @__PURE__ */ jsx4(SortableList.DragHandle, {}),
1114
- Object.values(item.options).map((value, index2) => /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", children: value }, index2))
1040
+ /* @__PURE__ */ jsx3(SortableList.DragHandle, {}),
1041
+ Object.values(item.options).map((value, index2) => /* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", children: value }, index2))
1115
1042
  ]
1116
1043
  }
1117
1044
  )
@@ -1120,40 +1047,40 @@ var ProductCreateVariantsSection = ({
1120
1047
  }
1121
1048
  }
1122
1049
  )
1123
- ] }) : /* @__PURE__ */ jsx4(Alert, { children: t("products.create.variants.productVariants.alert") }),
1124
- variants.fields.length > 0 && /* @__PURE__ */ jsx4(InlineTip, { label: t("general.tip"), children: t("products.create.variants.productVariants.tip") })
1050
+ ] }) : /* @__PURE__ */ jsx3(Alert, { children: t("products.create.variants.productVariants.alert") }),
1051
+ variants.fields.length > 0 && /* @__PURE__ */ jsx3(InlineTip, { label: t("general.tip"), children: t("products.create.variants.productVariants.tip") })
1125
1052
  ] }) })
1126
1053
  ] })
1127
1054
  ] });
1128
1055
  };
1129
1056
 
1130
1057
  // src/routes/products/product-create/components/product-create-details-form/product-create-details-form.tsx
1131
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1058
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1132
1059
  var ProductCreateDetailsForm = ({ form }) => {
1133
1060
  const { getFormFields } = useExtension();
1134
1061
  const fields = getFormFields("product", "create", "general");
1135
- return /* @__PURE__ */ jsx5("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsxs5("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
1136
- /* @__PURE__ */ jsx5(Header, {}),
1137
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-y-6", children: [
1138
- /* @__PURE__ */ jsx5(ProductCreateGeneralSection, { form }),
1139
- /* @__PURE__ */ jsx5(FormExtensionZone, { fields, form }),
1140
- /* @__PURE__ */ jsx5(ProductCreateMediaSection, { form })
1062
+ return /* @__PURE__ */ jsx4("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsxs4("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
1063
+ /* @__PURE__ */ jsx4(Header, {}),
1064
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-y-6", children: [
1065
+ /* @__PURE__ */ jsx4(ProductCreateGeneralSection, { form }),
1066
+ /* @__PURE__ */ jsx4(FormExtensionZone, { fields, form }),
1067
+ /* @__PURE__ */ jsx4(ProductCreateMediaSection, { form })
1141
1068
  ] }),
1142
- /* @__PURE__ */ jsx5(Divider, {}),
1143
- /* @__PURE__ */ jsx5(ProductCreateVariantsSection, { form })
1069
+ /* @__PURE__ */ jsx4(Divider, {}),
1070
+ /* @__PURE__ */ jsx4(ProductCreateVariantsSection, { form })
1144
1071
  ] }) });
1145
1072
  };
1146
1073
  var Header = () => {
1147
1074
  const { t } = useTranslation4();
1148
- return /* @__PURE__ */ jsx5("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx5(Heading2, { children: t("products.create.header") }) });
1075
+ return /* @__PURE__ */ jsx4("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx4(Heading2, { children: t("products.create.header") }) });
1149
1076
  };
1150
1077
 
1151
1078
  // src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx
1152
- import { Button as Button2, Heading as Heading3, IconButton as IconButton4, Input as Input3, Label as Label2 } from "@medusajs/ui";
1079
+ import { Button, Heading as Heading3, IconButton as IconButton2, Input as Input2, Label as Label2 } from "@medusajs/ui";
1153
1080
  import { useFieldArray as useFieldArray3, useWatch as useWatch2 } from "react-hook-form";
1154
- import { XMarkMini as XMarkMini2 } from "@medusajs/icons";
1081
+ import { XMarkMini } from "@medusajs/icons";
1155
1082
  import { useTranslation as useTranslation5 } from "react-i18next";
1156
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1083
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1157
1084
  function InventoryItemRow({
1158
1085
  form,
1159
1086
  variantIndex,
@@ -1177,13 +1104,13 @@ function InventoryItemRow({
1177
1104
  value: item.id
1178
1105
  }))
1179
1106
  });
1180
- return /* @__PURE__ */ jsxs6(
1107
+ return /* @__PURE__ */ jsxs5(
1181
1108
  "li",
1182
1109
  {
1183
1110
  className: "bg-ui-bg-component shadow-elevation-card-rest grid grid-cols-[1fr_28px] items-center gap-1.5 rounded-xl p-1.5",
1184
1111
  children: [
1185
- /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-[min-content,1fr] items-center gap-1.5", children: [
1186
- /* @__PURE__ */ jsx6("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx6(
1112
+ /* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-[min-content,1fr] items-center gap-1.5", children: [
1113
+ /* @__PURE__ */ jsx5("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx5(
1187
1114
  Label2,
1188
1115
  {
1189
1116
  size: "xsmall",
@@ -1193,13 +1120,13 @@ function InventoryItemRow({
1193
1120
  children: t("fields.item")
1194
1121
  }
1195
1122
  ) }),
1196
- /* @__PURE__ */ jsx6(
1123
+ /* @__PURE__ */ jsx5(
1197
1124
  Form.Field,
1198
1125
  {
1199
1126
  control: form.control,
1200
1127
  name: `variants.${variantIndex}.inventory.${inventoryIndex}.inventory_item_id`,
1201
1128
  render: ({ field }) => {
1202
- return /* @__PURE__ */ jsx6(Form.Item, { children: /* @__PURE__ */ jsx6(Form.Control, { children: /* @__PURE__ */ jsx6(
1129
+ return /* @__PURE__ */ jsx5(Form.Item, { children: /* @__PURE__ */ jsx5(Form.Control, { children: /* @__PURE__ */ jsx5(
1203
1130
  Combobox,
1204
1131
  {
1205
1132
  ...field,
@@ -1218,7 +1145,7 @@ function InventoryItemRow({
1218
1145
  }
1219
1146
  }
1220
1147
  ),
1221
- /* @__PURE__ */ jsx6("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx6(
1148
+ /* @__PURE__ */ jsx5("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx5(
1222
1149
  Label2,
1223
1150
  {
1224
1151
  size: "xsmall",
@@ -1228,15 +1155,15 @@ function InventoryItemRow({
1228
1155
  children: t("fields.quantity")
1229
1156
  }
1230
1157
  ) }),
1231
- /* @__PURE__ */ jsx6(
1158
+ /* @__PURE__ */ jsx5(
1232
1159
  Form.Field,
1233
1160
  {
1234
1161
  control: form.control,
1235
1162
  name: `variants.${variantIndex}.inventory.${inventoryIndex}.required_quantity`,
1236
1163
  render: ({ field: { onChange, value, ...field } }) => {
1237
- return /* @__PURE__ */ jsxs6(Form.Item, { children: [
1238
- /* @__PURE__ */ jsx6(Form.Control, { children: /* @__PURE__ */ jsx6(
1239
- Input3,
1164
+ return /* @__PURE__ */ jsxs5(Form.Item, { children: [
1165
+ /* @__PURE__ */ jsx5(Form.Control, { children: /* @__PURE__ */ jsx5(
1166
+ Input2,
1240
1167
  {
1241
1168
  type: "number",
1242
1169
  className: "bg-ui-bg-field-component",
@@ -1256,21 +1183,21 @@ function InventoryItemRow({
1256
1183
  )
1257
1184
  }
1258
1185
  ) }),
1259
- /* @__PURE__ */ jsx6(Form.ErrorMessage, {})
1186
+ /* @__PURE__ */ jsx5(Form.ErrorMessage, {})
1260
1187
  ] });
1261
1188
  }
1262
1189
  }
1263
1190
  )
1264
1191
  ] }),
1265
- /* @__PURE__ */ jsx6(
1266
- IconButton4,
1192
+ /* @__PURE__ */ jsx5(
1193
+ IconButton2,
1267
1194
  {
1268
1195
  type: "button",
1269
1196
  size: "small",
1270
1197
  variant: "transparent",
1271
1198
  className: "text-ui-fg-muted",
1272
1199
  onClick: onRemove,
1273
- children: /* @__PURE__ */ jsx6(XMarkMini2, {})
1200
+ children: /* @__PURE__ */ jsx5(XMarkMini, {})
1274
1201
  }
1275
1202
  )
1276
1203
  ]
@@ -1293,14 +1220,14 @@ function VariantSection({ form, variant, index }) {
1293
1220
  (i, index2) => index2 != inventoryIndex && i.inventory_item_id === option.value
1294
1221
  );
1295
1222
  };
1296
- return /* @__PURE__ */ jsxs6("div", { className: "grid gap-y-4", children: [
1297
- /* @__PURE__ */ jsxs6("div", { className: "flex items-start justify-between gap-x-4", children: [
1298
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col", children: [
1299
- /* @__PURE__ */ jsx6(Form.Label, { children: variant.title }),
1300
- /* @__PURE__ */ jsx6(Form.Hint, { children: t("products.create.inventory.label") })
1223
+ return /* @__PURE__ */ jsxs5("div", { className: "grid gap-y-4", children: [
1224
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-start justify-between gap-x-4", children: [
1225
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col", children: [
1226
+ /* @__PURE__ */ jsx5(Form.Label, { children: variant.title }),
1227
+ /* @__PURE__ */ jsx5(Form.Hint, { children: t("products.create.inventory.label") })
1301
1228
  ] }),
1302
- /* @__PURE__ */ jsx6(
1303
- Button2,
1229
+ /* @__PURE__ */ jsx5(
1230
+ Button,
1304
1231
  {
1305
1232
  size: "small",
1306
1233
  variant: "secondary",
@@ -1315,7 +1242,7 @@ function VariantSection({ form, variant, index }) {
1315
1242
  }
1316
1243
  )
1317
1244
  ] }),
1318
- inventory.fields.map((inventoryItem, inventoryIndex) => /* @__PURE__ */ jsx6(
1245
+ inventory.fields.map((inventoryItem, inventoryIndex) => /* @__PURE__ */ jsx5(
1319
1246
  InventoryItemRow,
1320
1247
  {
1321
1248
  form,
@@ -1337,9 +1264,9 @@ var ProductCreateInventoryKitSection = ({
1337
1264
  control: form.control,
1338
1265
  name: "variants"
1339
1266
  });
1340
- return /* @__PURE__ */ jsxs6("div", { id: "organize", className: "flex flex-col gap-y-8", children: [
1341
- /* @__PURE__ */ jsx6(Heading3, { children: t("products.create.inventory.heading") }),
1342
- variants.fields.filter((v) => v.inventory_kit).map((variant, variantIndex) => /* @__PURE__ */ jsx6(
1267
+ return /* @__PURE__ */ jsxs5("div", { id: "organize", className: "flex flex-col gap-y-8", children: [
1268
+ /* @__PURE__ */ jsx5(Heading3, { children: t("products.create.inventory.heading") }),
1269
+ variants.fields.filter((v) => v.inventory_kit).map((variant, variantIndex) => /* @__PURE__ */ jsx5(
1343
1270
  VariantSection,
1344
1271
  {
1345
1272
  form,
@@ -1352,18 +1279,18 @@ var ProductCreateInventoryKitSection = ({
1352
1279
  };
1353
1280
 
1354
1281
  // src/routes/products/product-create/components/product-create-inventory-kit-form/product-create-inventory-kit-form.tsx
1355
- import { jsx as jsx7 } from "react/jsx-runtime";
1282
+ import { jsx as jsx6 } from "react/jsx-runtime";
1356
1283
  var ProductCreateInventoryKitForm = ({
1357
1284
  form
1358
1285
  }) => {
1359
- return /* @__PURE__ */ jsx7("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsx7("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: /* @__PURE__ */ jsx7(ProductCreateInventoryKitSection, { form }) }) });
1286
+ return /* @__PURE__ */ jsx6("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsx6("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: /* @__PURE__ */ jsx6(ProductCreateInventoryKitSection, { form }) }) });
1360
1287
  };
1361
1288
 
1362
1289
  // src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-section/product-create-details-organize-section.tsx
1363
- import { Button as Button3, Heading as Heading4 } from "@medusajs/ui";
1290
+ import { Button as Button2, Heading as Heading4 } from "@medusajs/ui";
1364
1291
  import { useFieldArray as useFieldArray4 } from "react-hook-form";
1365
1292
  import { Trans, useTranslation as useTranslation6 } from "react-i18next";
1366
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1293
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1367
1294
  var ProductCreateOrganizationSection = ({
1368
1295
  form
1369
1296
  }) => {
@@ -1408,9 +1335,9 @@ var ProductCreateOrganizationSection = ({
1408
1335
  const handleClearAllSalesChannels = () => {
1409
1336
  replace([]);
1410
1337
  };
1411
- return /* @__PURE__ */ jsxs7("div", { id: "organize", className: "flex flex-col gap-y-8", children: [
1412
- /* @__PURE__ */ jsx8(Heading4, { children: t("products.organization.header") }),
1413
- /* @__PURE__ */ jsx8(
1338
+ return /* @__PURE__ */ jsxs6("div", { id: "organize", className: "flex flex-col gap-y-8", children: [
1339
+ /* @__PURE__ */ jsx7(Heading4, { children: t("products.organization.header") }),
1340
+ /* @__PURE__ */ jsx7(
1414
1341
  SwitchBox,
1415
1342
  {
1416
1343
  control: form.control,
@@ -1420,16 +1347,16 @@ var ProductCreateOrganizationSection = ({
1420
1347
  optional: true
1421
1348
  }
1422
1349
  ),
1423
- /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
1424
- /* @__PURE__ */ jsx8(
1350
+ /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
1351
+ /* @__PURE__ */ jsx7(
1425
1352
  Form.Field,
1426
1353
  {
1427
1354
  control: form.control,
1428
1355
  name: "type_id",
1429
1356
  render: ({ field }) => {
1430
- return /* @__PURE__ */ jsxs7(Form.Item, { children: [
1431
- /* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.type.label") }),
1432
- /* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
1357
+ return /* @__PURE__ */ jsxs6(Form.Item, { children: [
1358
+ /* @__PURE__ */ jsx7(Form.Label, { optional: true, children: t("products.fields.type.label") }),
1359
+ /* @__PURE__ */ jsx7(Form.Control, { children: /* @__PURE__ */ jsx7(
1433
1360
  Combobox,
1434
1361
  {
1435
1362
  ...field,
@@ -1439,20 +1366,20 @@ var ProductCreateOrganizationSection = ({
1439
1366
  fetchNextPage: types.fetchNextPage
1440
1367
  }
1441
1368
  ) }),
1442
- /* @__PURE__ */ jsx8(Form.ErrorMessage, {})
1369
+ /* @__PURE__ */ jsx7(Form.ErrorMessage, {})
1443
1370
  ] });
1444
1371
  }
1445
1372
  }
1446
1373
  ),
1447
- /* @__PURE__ */ jsx8(
1374
+ /* @__PURE__ */ jsx7(
1448
1375
  Form.Field,
1449
1376
  {
1450
1377
  control: form.control,
1451
1378
  name: "collection_id",
1452
1379
  render: ({ field }) => {
1453
- return /* @__PURE__ */ jsxs7(Form.Item, { children: [
1454
- /* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.collection.label") }),
1455
- /* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
1380
+ return /* @__PURE__ */ jsxs6(Form.Item, { children: [
1381
+ /* @__PURE__ */ jsx7(Form.Label, { optional: true, children: t("products.fields.collection.label") }),
1382
+ /* @__PURE__ */ jsx7(Form.Control, { children: /* @__PURE__ */ jsx7(
1456
1383
  Combobox,
1457
1384
  {
1458
1385
  ...field,
@@ -1462,36 +1389,36 @@ var ProductCreateOrganizationSection = ({
1462
1389
  fetchNextPage: collections.fetchNextPage
1463
1390
  }
1464
1391
  ) }),
1465
- /* @__PURE__ */ jsx8(Form.ErrorMessage, {})
1392
+ /* @__PURE__ */ jsx7(Form.ErrorMessage, {})
1466
1393
  ] });
1467
1394
  }
1468
1395
  }
1469
1396
  )
1470
1397
  ] }),
1471
- /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
1472
- /* @__PURE__ */ jsx8(
1398
+ /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
1399
+ /* @__PURE__ */ jsx7(
1473
1400
  Form.Field,
1474
1401
  {
1475
1402
  control: form.control,
1476
1403
  name: "categories",
1477
1404
  render: ({ field }) => {
1478
- return /* @__PURE__ */ jsxs7(Form.Item, { children: [
1479
- /* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.categories.label") }),
1480
- /* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(CategoryCombobox, { ...field }) }),
1481
- /* @__PURE__ */ jsx8(Form.ErrorMessage, {})
1405
+ return /* @__PURE__ */ jsxs6(Form.Item, { children: [
1406
+ /* @__PURE__ */ jsx7(Form.Label, { optional: true, children: t("products.fields.categories.label") }),
1407
+ /* @__PURE__ */ jsx7(Form.Control, { children: /* @__PURE__ */ jsx7(CategoryCombobox, { ...field }) }),
1408
+ /* @__PURE__ */ jsx7(Form.ErrorMessage, {})
1482
1409
  ] });
1483
1410
  }
1484
1411
  }
1485
1412
  ),
1486
- /* @__PURE__ */ jsx8(
1413
+ /* @__PURE__ */ jsx7(
1487
1414
  Form.Field,
1488
1415
  {
1489
1416
  control: form.control,
1490
1417
  name: "tags",
1491
1418
  render: ({ field }) => {
1492
- return /* @__PURE__ */ jsxs7(Form.Item, { children: [
1493
- /* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.tags.label") }),
1494
- /* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
1419
+ return /* @__PURE__ */ jsxs6(Form.Item, { children: [
1420
+ /* @__PURE__ */ jsx7(Form.Label, { optional: true, children: t("products.fields.tags.label") }),
1421
+ /* @__PURE__ */ jsx7(Form.Control, { children: /* @__PURE__ */ jsx7(
1495
1422
  Combobox,
1496
1423
  {
1497
1424
  ...field,
@@ -1501,25 +1428,25 @@ var ProductCreateOrganizationSection = ({
1501
1428
  fetchNextPage: tags.fetchNextPage
1502
1429
  }
1503
1430
  ) }),
1504
- /* @__PURE__ */ jsx8(Form.ErrorMessage, {})
1431
+ /* @__PURE__ */ jsx7(Form.ErrorMessage, {})
1505
1432
  ] });
1506
1433
  }
1507
1434
  }
1508
1435
  )
1509
1436
  ] }),
1510
- /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
1511
- /* @__PURE__ */ jsxs7("div", { children: [
1512
- /* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.shipping_profile.label") }),
1513
- /* @__PURE__ */ jsx8(Form.Hint, { children: /* @__PURE__ */ jsx8(Trans, { i18nKey: "products.fields.shipping_profile.hint" }) })
1437
+ /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
1438
+ /* @__PURE__ */ jsxs6("div", { children: [
1439
+ /* @__PURE__ */ jsx7(Form.Label, { optional: true, children: t("products.fields.shipping_profile.label") }),
1440
+ /* @__PURE__ */ jsx7(Form.Hint, { children: /* @__PURE__ */ jsx7(Trans, { i18nKey: "products.fields.shipping_profile.hint" }) })
1514
1441
  ] }),
1515
- /* @__PURE__ */ jsx8(
1442
+ /* @__PURE__ */ jsx7(
1516
1443
  Form.Field,
1517
1444
  {
1518
1445
  control: form.control,
1519
1446
  name: "shipping_profile_id",
1520
1447
  render: ({ field }) => {
1521
- return /* @__PURE__ */ jsxs7(Form.Item, { children: [
1522
- /* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
1448
+ return /* @__PURE__ */ jsxs6(Form.Item, { children: [
1449
+ /* @__PURE__ */ jsx7(Form.Control, { children: /* @__PURE__ */ jsx7(
1523
1450
  Combobox,
1524
1451
  {
1525
1452
  ...field,
@@ -1529,33 +1456,33 @@ var ProductCreateOrganizationSection = ({
1529
1456
  fetchNextPage: shippingProfiles.fetchNextPage
1530
1457
  }
1531
1458
  ) }),
1532
- /* @__PURE__ */ jsx8(Form.ErrorMessage, {})
1459
+ /* @__PURE__ */ jsx7(Form.ErrorMessage, {})
1533
1460
  ] });
1534
1461
  }
1535
1462
  }
1536
1463
  )
1537
1464
  ] }),
1538
- /* @__PURE__ */ jsx8("div", { className: "grid grid-cols-1 gap-y-4", children: /* @__PURE__ */ jsx8(
1465
+ /* @__PURE__ */ jsx7("div", { className: "grid grid-cols-1 gap-y-4", children: /* @__PURE__ */ jsx7(
1539
1466
  Form.Field,
1540
1467
  {
1541
1468
  control: form.control,
1542
1469
  name: "sales_channels",
1543
1470
  render: () => {
1544
- return /* @__PURE__ */ jsxs7(Form.Item, { children: [
1545
- /* @__PURE__ */ jsxs7("div", { className: "flex items-start justify-between gap-x-4", children: [
1546
- /* @__PURE__ */ jsxs7("div", { children: [
1547
- /* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.sales_channels.label") }),
1548
- /* @__PURE__ */ jsx8(Form.Hint, { children: /* @__PURE__ */ jsx8(Trans, { i18nKey: "products.fields.sales_channels.hint" }) })
1471
+ return /* @__PURE__ */ jsxs6(Form.Item, { children: [
1472
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-start justify-between gap-x-4", children: [
1473
+ /* @__PURE__ */ jsxs6("div", { children: [
1474
+ /* @__PURE__ */ jsx7(Form.Label, { optional: true, children: t("products.fields.sales_channels.label") }),
1475
+ /* @__PURE__ */ jsx7(Form.Hint, { children: /* @__PURE__ */ jsx7(Trans, { i18nKey: "products.fields.sales_channels.hint" }) })
1549
1476
  ] }),
1550
- /* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8(Button3, { size: "small", variant: "secondary", type: "button", children: t("actions.add") }) })
1477
+ /* @__PURE__ */ jsx7(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx7(Button2, { size: "small", variant: "secondary", type: "button", children: t("actions.add") }) })
1551
1478
  ] }),
1552
- /* @__PURE__ */ jsx8(Form.Control, { className: "mt-0", children: fields.length > 0 && /* @__PURE__ */ jsx8(
1479
+ /* @__PURE__ */ jsx7(Form.Control, { className: "mt-0", children: fields.length > 0 && /* @__PURE__ */ jsx7(
1553
1480
  ChipGroup,
1554
1481
  {
1555
1482
  onClearAll: handleClearAllSalesChannels,
1556
1483
  onRemove: remove,
1557
1484
  className: "py-4",
1558
- children: fields.map((field, index) => /* @__PURE__ */ jsx8(ChipGroup.Chip, { index, children: field.name }, field.key))
1485
+ children: fields.map((field, index) => /* @__PURE__ */ jsx7(ChipGroup.Chip, { index, children: field.name }, field.key))
1559
1486
  }
1560
1487
  ) })
1561
1488
  ] });
@@ -1567,10 +1494,10 @@ var ProductCreateOrganizationSection = ({
1567
1494
 
1568
1495
  // src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx
1569
1496
  import {
1570
- Button as Button4,
1497
+ Button as Button3,
1571
1498
  createDataTableColumnHelper
1572
1499
  } from "@medusajs/ui";
1573
- import { useEffect, useMemo as useMemo2, useState as useState3 } from "react";
1500
+ import { useEffect, useMemo as useMemo2, useState as useState2 } from "react";
1574
1501
  import { useTranslation as useTranslation7 } from "react-i18next";
1575
1502
  import { keepPreviousData } from "@tanstack/react-query";
1576
1503
 
@@ -1578,7 +1505,7 @@ import { keepPreviousData } from "@tanstack/react-query";
1578
1505
  var SC_STACKED_MODAL_ID = "sc";
1579
1506
 
1580
1507
  // src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx
1581
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1508
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1582
1509
  var PAGE_SIZE = 20;
1583
1510
  var ProductCreateSalesChannelStackedModal = ({
1584
1511
  form
@@ -1586,10 +1513,10 @@ var ProductCreateSalesChannelStackedModal = ({
1586
1513
  const { t } = useTranslation7();
1587
1514
  const { getValues, setValue } = form;
1588
1515
  const { setIsOpen, getIsOpen } = useStackedModal();
1589
- const [rowSelection, setRowSelection] = useState3(
1516
+ const [rowSelection, setRowSelection] = useState2(
1590
1517
  {}
1591
1518
  );
1592
- const [state, setState] = useState3([]);
1519
+ const [state, setState] = useState2([]);
1593
1520
  const searchParams = useSalesChannelTableQuery({
1594
1521
  pageSize: PAGE_SIZE,
1595
1522
  prefix: SC_STACKED_MODAL_ID
@@ -1652,9 +1579,9 @@ var ProductCreateSalesChannelStackedModal = ({
1652
1579
  if (isError) {
1653
1580
  throw error;
1654
1581
  }
1655
- return /* @__PURE__ */ jsxs8(StackedFocusModal.Content, { className: "flex flex-col overflow-hidden", children: [
1656
- /* @__PURE__ */ jsx9(StackedFocusModal.Header, {}),
1657
- /* @__PURE__ */ jsx9(StackedFocusModal.Body, { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx9(
1582
+ return /* @__PURE__ */ jsxs7(StackedFocusModal.Content, { className: "flex flex-col overflow-hidden", children: [
1583
+ /* @__PURE__ */ jsx8(StackedFocusModal.Header, {}),
1584
+ /* @__PURE__ */ jsx8(StackedFocusModal.Body, { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx8(
1658
1585
  DataTable,
1659
1586
  {
1660
1587
  data: sales_channels,
@@ -1673,9 +1600,9 @@ var ProductCreateSalesChannelStackedModal = ({
1673
1600
  prefix: SC_STACKED_MODAL_ID
1674
1601
  }
1675
1602
  ) }),
1676
- /* @__PURE__ */ jsx9(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-end gap-x-2", children: [
1677
- /* @__PURE__ */ jsx9(StackedFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx9(Button4, { size: "small", variant: "secondary", type: "button", children: t("actions.cancel") }) }),
1678
- /* @__PURE__ */ jsx9(Button4, { size: "small", onClick: handleAdd, type: "button", children: t("actions.save") })
1603
+ /* @__PURE__ */ jsx8(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-end gap-x-2", children: [
1604
+ /* @__PURE__ */ jsx8(StackedFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx8(Button3, { size: "small", variant: "secondary", type: "button", children: t("actions.cancel") }) }),
1605
+ /* @__PURE__ */ jsx8(Button3, { size: "small", onClick: handleAdd, type: "button", children: t("actions.save") })
1679
1606
  ] }) })
1680
1607
  ] });
1681
1608
  };
@@ -1686,16 +1613,16 @@ var useColumns = () => {
1686
1613
  };
1687
1614
 
1688
1615
  // src/routes/products/product-create/components/product-create-organize-form/product-create-organize-form.tsx
1689
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1616
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1690
1617
  var ProductCreateOrganizeForm = ({ form }) => {
1691
1618
  const { getFormFields } = useExtension();
1692
1619
  const fields = getFormFields("product", "create", "organize");
1693
- return /* @__PURE__ */ jsxs9(StackedFocusModal, { id: SC_STACKED_MODAL_ID, children: [
1694
- /* @__PURE__ */ jsx10("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsxs9("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
1695
- /* @__PURE__ */ jsx10(ProductCreateOrganizationSection, { form }),
1696
- /* @__PURE__ */ jsx10(FormExtensionZone, { fields, form })
1620
+ return /* @__PURE__ */ jsxs8(StackedFocusModal, { id: SC_STACKED_MODAL_ID, children: [
1621
+ /* @__PURE__ */ jsx9("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsxs8("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
1622
+ /* @__PURE__ */ jsx9(ProductCreateOrganizationSection, { form }),
1623
+ /* @__PURE__ */ jsx9(FormExtensionZone, { fields, form })
1697
1624
  ] }) }),
1698
- /* @__PURE__ */ jsx10(ProductCreateSalesChannelStackedModal, { form })
1625
+ /* @__PURE__ */ jsx9(ProductCreateSalesChannelStackedModal, { form })
1699
1626
  ] });
1700
1627
  };
1701
1628
 
@@ -1703,7 +1630,7 @@ var ProductCreateOrganizeForm = ({ form }) => {
1703
1630
  import { useMemo as useMemo3 } from "react";
1704
1631
  import { useWatch as useWatch3 } from "react-hook-form";
1705
1632
  import { useTranslation as useTranslation8 } from "react-i18next";
1706
- import { jsx as jsx11 } from "react/jsx-runtime";
1633
+ import { jsx as jsx10 } from "react/jsx-runtime";
1707
1634
  var ProductCreateVariantsForm = ({
1708
1635
  form,
1709
1636
  regions,
@@ -1740,7 +1667,7 @@ var ProductCreateVariantsForm = ({
1740
1667
  });
1741
1668
  return ret;
1742
1669
  }, [variants]);
1743
- return /* @__PURE__ */ jsx11("div", { className: "flex size-full flex-col divide-y overflow-hidden", children: /* @__PURE__ */ jsx11(
1670
+ return /* @__PURE__ */ jsx10("div", { className: "flex size-full flex-col divide-y overflow-hidden", children: /* @__PURE__ */ jsx10(
1744
1671
  DataGrid,
1745
1672
  {
1746
1673
  columns,
@@ -1762,9 +1689,9 @@ var useColumns2 = ({
1762
1689
  () => [
1763
1690
  columnHelper2.column({
1764
1691
  id: "options",
1765
- header: () => /* @__PURE__ */ jsx11("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx11("span", { className: "truncate", children: options.map((o) => o.title).join(" / ") }) }),
1692
+ header: () => /* @__PURE__ */ jsx10("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx10("span", { className: "truncate", children: options.map((o) => o.title).join(" / ") }) }),
1766
1693
  cell: (context) => {
1767
- return /* @__PURE__ */ jsx11(DataGrid.ReadonlyCell, { context, children: options.map((o) => context.row.original.options[o.title]).join(" / ") });
1694
+ return /* @__PURE__ */ jsx10(DataGrid.ReadonlyCell, { context, children: options.map((o) => context.row.original.options[o.title]).join(" / ") });
1768
1695
  },
1769
1696
  disableHiding: true
1770
1697
  }),
@@ -1775,7 +1702,7 @@ var useColumns2 = ({
1775
1702
  field: (context) => `variants.${context.row.original.originalIndex}.title`,
1776
1703
  type: "text",
1777
1704
  cell: (context) => {
1778
- return /* @__PURE__ */ jsx11(DataGrid.TextCell, { context });
1705
+ return /* @__PURE__ */ jsx10(DataGrid.TextCell, { context });
1779
1706
  }
1780
1707
  }),
1781
1708
  columnHelper2.column({
@@ -1785,7 +1712,7 @@ var useColumns2 = ({
1785
1712
  field: (context) => `variants.${context.row.original.originalIndex}.sku`,
1786
1713
  type: "text",
1787
1714
  cell: (context) => {
1788
- return /* @__PURE__ */ jsx11(DataGrid.TextCell, { context });
1715
+ return /* @__PURE__ */ jsx10(DataGrid.TextCell, { context });
1789
1716
  }
1790
1717
  }),
1791
1718
  columnHelper2.column({
@@ -1795,7 +1722,7 @@ var useColumns2 = ({
1795
1722
  field: (context) => `variants.${context.row.original.originalIndex}.manage_inventory`,
1796
1723
  type: "boolean",
1797
1724
  cell: (context) => {
1798
- return /* @__PURE__ */ jsx11(DataGrid.BooleanCell, { context });
1725
+ return /* @__PURE__ */ jsx10(DataGrid.BooleanCell, { context });
1799
1726
  }
1800
1727
  }),
1801
1728
  columnHelper2.column({
@@ -1805,7 +1732,7 @@ var useColumns2 = ({
1805
1732
  field: (context) => `variants.${context.row.original.originalIndex}.allow_backorder`,
1806
1733
  type: "boolean",
1807
1734
  cell: (context) => {
1808
- return /* @__PURE__ */ jsx11(DataGrid.BooleanCell, { context });
1735
+ return /* @__PURE__ */ jsx10(DataGrid.BooleanCell, { context });
1809
1736
  }
1810
1737
  }),
1811
1738
  columnHelper2.column({
@@ -1815,7 +1742,7 @@ var useColumns2 = ({
1815
1742
  field: (context) => `variants.${context.row.original.originalIndex}.inventory_kit`,
1816
1743
  type: "boolean",
1817
1744
  cell: (context) => {
1818
- return /* @__PURE__ */ jsx11(
1745
+ return /* @__PURE__ */ jsx10(
1819
1746
  DataGrid.BooleanCell,
1820
1747
  {
1821
1748
  context,
@@ -1842,7 +1769,7 @@ var useColumns2 = ({
1842
1769
  };
1843
1770
 
1844
1771
  // src/routes/products/product-create/components/product-create-form/product-create-form.tsx
1845
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1772
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1846
1773
  var SAVE_DRAFT_BUTTON = "save-draft-button";
1847
1774
  var ProductCreateForm = ({
1848
1775
  defaultChannel,
@@ -1850,8 +1777,8 @@ var ProductCreateForm = ({
1850
1777
  store,
1851
1778
  pricePreferences
1852
1779
  }) => {
1853
- const [tab, setTab] = useState4("details" /* DETAILS */);
1854
- const [tabState, setTabState] = useState4({
1780
+ const [tab, setTab] = useState3("details" /* DETAILS */);
1781
+ const [tabState, setTabState] = useState3({
1855
1782
  ["details" /* DETAILS */]: "in-progress",
1856
1783
  ["organize" /* ORGANIZE */]: "not-started",
1857
1784
  ["variants" /* VARIANTS */]: "not-started",
@@ -1875,13 +1802,10 @@ var ProductCreateForm = ({
1875
1802
  if (!regions?.length) {
1876
1803
  return {};
1877
1804
  }
1878
- return regions.reduce(
1879
- (acc, reg) => {
1880
- acc[reg.id] = reg.currency_code;
1881
- return acc;
1882
- },
1883
- {}
1884
- );
1805
+ return regions.reduce((acc, reg) => {
1806
+ acc[reg.id] = reg.currency_code;
1807
+ return acc;
1808
+ }, {});
1885
1809
  }, [regions]);
1886
1810
  const watchedVariants = useWatch4({
1887
1811
  control: form.control,
@@ -1983,7 +1907,7 @@ var ProductCreateForm = ({
1983
1907
  }
1984
1908
  setTabState({ ...currentState });
1985
1909
  }, [tab]);
1986
- return /* @__PURE__ */ jsx12(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs10(
1910
+ return /* @__PURE__ */ jsx11(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs9(
1987
1911
  KeyboundForm,
1988
1912
  {
1989
1913
  onKeyDown: (e) => {
@@ -2006,7 +1930,7 @@ var ProductCreateForm = ({
2006
1930
  onSubmit: handleSubmit,
2007
1931
  className: "flex h-full flex-col",
2008
1932
  children: [
2009
- /* @__PURE__ */ jsxs10(
1933
+ /* @__PURE__ */ jsxs9(
2010
1934
  ProgressTabs,
2011
1935
  {
2012
1936
  dir: direction,
@@ -2020,8 +1944,8 @@ var ProductCreateForm = ({
2020
1944
  },
2021
1945
  className: "flex h-full flex-col overflow-hidden",
2022
1946
  children: [
2023
- /* @__PURE__ */ jsx12(RouteFocusModal.Header, { children: /* @__PURE__ */ jsx12("div", { className: "-my-2 w-full border-l", children: /* @__PURE__ */ jsxs10(ProgressTabs.List, { className: "justify-start-start flex w-full items-center", children: [
2024
- /* @__PURE__ */ jsx12(
1947
+ /* @__PURE__ */ jsx11(RouteFocusModal.Header, { children: /* @__PURE__ */ jsx11("div", { className: "-my-2 w-full border-l", children: /* @__PURE__ */ jsxs9(ProgressTabs.List, { className: "justify-start-start flex w-full items-center", children: [
1948
+ /* @__PURE__ */ jsx11(
2025
1949
  ProgressTabs.Trigger,
2026
1950
  {
2027
1951
  status: tabState["details" /* DETAILS */],
@@ -2030,7 +1954,7 @@ var ProductCreateForm = ({
2030
1954
  children: t("products.create.tabs.details")
2031
1955
  }
2032
1956
  ),
2033
- /* @__PURE__ */ jsx12(
1957
+ /* @__PURE__ */ jsx11(
2034
1958
  ProgressTabs.Trigger,
2035
1959
  {
2036
1960
  status: tabState["organize" /* ORGANIZE */],
@@ -2039,7 +1963,7 @@ var ProductCreateForm = ({
2039
1963
  children: t("products.create.tabs.organize")
2040
1964
  }
2041
1965
  ),
2042
- /* @__PURE__ */ jsx12(
1966
+ /* @__PURE__ */ jsx11(
2043
1967
  ProgressTabs.Trigger,
2044
1968
  {
2045
1969
  status: tabState["variants" /* VARIANTS */],
@@ -2048,7 +1972,7 @@ var ProductCreateForm = ({
2048
1972
  children: t("products.create.tabs.variants")
2049
1973
  }
2050
1974
  ),
2051
- showInventoryTab && /* @__PURE__ */ jsx12(
1975
+ showInventoryTab && /* @__PURE__ */ jsx11(
2052
1976
  ProgressTabs.Trigger,
2053
1977
  {
2054
1978
  status: tabState["inventory" /* INVENTORY */],
@@ -2058,29 +1982,29 @@ var ProductCreateForm = ({
2058
1982
  }
2059
1983
  )
2060
1984
  ] }) }) }),
2061
- /* @__PURE__ */ jsxs10(RouteFocusModal.Body, { className: "size-full overflow-hidden", children: [
2062
- /* @__PURE__ */ jsx12(
1985
+ /* @__PURE__ */ jsxs9(RouteFocusModal.Body, { className: "size-full overflow-hidden", children: [
1986
+ /* @__PURE__ */ jsx11(
2063
1987
  ProgressTabs.Content,
2064
1988
  {
2065
1989
  className: "size-full overflow-y-auto",
2066
1990
  value: "details" /* DETAILS */,
2067
- children: /* @__PURE__ */ jsx12(ProductCreateDetailsForm, { form })
1991
+ children: /* @__PURE__ */ jsx11(ProductCreateDetailsForm, { form })
2068
1992
  }
2069
1993
  ),
2070
- /* @__PURE__ */ jsx12(
1994
+ /* @__PURE__ */ jsx11(
2071
1995
  ProgressTabs.Content,
2072
1996
  {
2073
1997
  className: "size-full overflow-y-auto",
2074
1998
  value: "organize" /* ORGANIZE */,
2075
- children: /* @__PURE__ */ jsx12(ProductCreateOrganizeForm, { form })
1999
+ children: /* @__PURE__ */ jsx11(ProductCreateOrganizeForm, { form })
2076
2000
  }
2077
2001
  ),
2078
- /* @__PURE__ */ jsx12(
2002
+ /* @__PURE__ */ jsx11(
2079
2003
  ProgressTabs.Content,
2080
2004
  {
2081
2005
  className: "size-full overflow-y-auto",
2082
2006
  value: "variants" /* VARIANTS */,
2083
- children: /* @__PURE__ */ jsx12(
2007
+ children: /* @__PURE__ */ jsx11(
2084
2008
  ProductCreateVariantsForm,
2085
2009
  {
2086
2010
  form,
@@ -2091,22 +2015,22 @@ var ProductCreateForm = ({
2091
2015
  )
2092
2016
  }
2093
2017
  ),
2094
- showInventoryTab && /* @__PURE__ */ jsx12(
2018
+ showInventoryTab && /* @__PURE__ */ jsx11(
2095
2019
  ProgressTabs.Content,
2096
2020
  {
2097
2021
  className: "size-full overflow-y-auto",
2098
2022
  value: "inventory" /* INVENTORY */,
2099
- children: /* @__PURE__ */ jsx12(ProductCreateInventoryKitForm, { form })
2023
+ children: /* @__PURE__ */ jsx11(ProductCreateInventoryKitForm, { form })
2100
2024
  }
2101
2025
  )
2102
2026
  ] })
2103
2027
  ]
2104
2028
  }
2105
2029
  ),
2106
- /* @__PURE__ */ jsx12(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-end gap-x-2", children: [
2107
- /* @__PURE__ */ jsx12(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx12(Button5, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
2108
- /* @__PURE__ */ jsx12(
2109
- Button5,
2030
+ /* @__PURE__ */ jsx11(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-end gap-x-2", children: [
2031
+ /* @__PURE__ */ jsx11(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx11(Button4, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
2032
+ /* @__PURE__ */ jsx11(
2033
+ Button4,
2110
2034
  {
2111
2035
  "data-name": SAVE_DRAFT_BUTTON,
2112
2036
  size: "small",
@@ -2116,7 +2040,7 @@ var ProductCreateForm = ({
2116
2040
  children: t("actions.saveAsDraft")
2117
2041
  }
2118
2042
  ),
2119
- /* @__PURE__ */ jsx12(
2043
+ /* @__PURE__ */ jsx11(
2120
2044
  PrimaryButton,
2121
2045
  {
2122
2046
  tab,
@@ -2138,8 +2062,8 @@ var PrimaryButton = ({
2138
2062
  }) => {
2139
2063
  const { t } = useTranslation9();
2140
2064
  if (tab === "variants" /* VARIANTS */ && !showInventoryTab || tab === "inventory" /* INVENTORY */ && showInventoryTab) {
2141
- return /* @__PURE__ */ jsx12(
2142
- Button5,
2065
+ return /* @__PURE__ */ jsx11(
2066
+ Button4,
2143
2067
  {
2144
2068
  "data-name": "publish-button",
2145
2069
  type: "submit",
@@ -2151,8 +2075,8 @@ var PrimaryButton = ({
2151
2075
  "submit-button"
2152
2076
  );
2153
2077
  }
2154
- return /* @__PURE__ */ jsx12(
2155
- Button5,
2078
+ return /* @__PURE__ */ jsx11(
2079
+ Button4,
2156
2080
  {
2157
2081
  type: "button",
2158
2082
  variant: "primary",
@@ -2165,7 +2089,7 @@ var PrimaryButton = ({
2165
2089
  };
2166
2090
 
2167
2091
  // src/routes/products/product-create/product-create.tsx
2168
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
2092
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
2169
2093
  var ProductCreate = () => {
2170
2094
  const { t } = useTranslation10();
2171
2095
  const {
@@ -2211,10 +2135,10 @@ var ProductCreate = () => {
2211
2135
  if (isPricePreferencesError) {
2212
2136
  throw pricePreferencesError;
2213
2137
  }
2214
- return /* @__PURE__ */ jsxs11(RouteFocusModal, { children: [
2215
- /* @__PURE__ */ jsx13(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx13("span", { className: "sr-only", children: t("products.create.title") }) }),
2216
- /* @__PURE__ */ jsx13(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsx13("span", { className: "sr-only", children: t("products.create.description") }) }),
2217
- ready && /* @__PURE__ */ jsx13(
2138
+ return /* @__PURE__ */ jsxs10(RouteFocusModal, { children: [
2139
+ /* @__PURE__ */ jsx12(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx12("span", { className: "sr-only", children: t("products.create.title") }) }),
2140
+ /* @__PURE__ */ jsx12(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsx12("span", { className: "sr-only", children: t("products.create.description") }) }),
2141
+ ready && /* @__PURE__ */ jsx12(
2218
2142
  ProductCreateForm,
2219
2143
  {
2220
2144
  defaultChannel: sales_channel,