@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,14 +1,14 @@
1
+ import { keepPreviousData } from "@tanstack/react-query"
2
+ import { useEffect } from "react"
1
3
  import { useNavigate, useSearchParams } from "react-router-dom"
4
+ import { RouteFocusModal } from "../../../components/modals"
2
5
  import {
3
6
  useReferenceTranslations,
4
7
  useStore,
5
8
  useTranslationSettings,
6
9
  } from "../../../hooks/api"
7
- import { TranslationsEditForm } from "./components/translations-edit-form"
8
- import { useEffect } from "react"
9
- import { RouteFocusModal } from "../../../components/modals"
10
10
  import { useFeatureFlag } from "../../../providers/feature-flag-provider"
11
- import { keepPreviousData } from "@tanstack/react-query"
11
+ import { TranslationsEditForm } from "./components/translations-edit-form"
12
12
 
13
13
  export const TranslationsEdit = () => {
14
14
  const isTranslationsEnabled = useFeatureFlag("translation")
@@ -41,15 +41,10 @@ export const TranslationsEdit = () => {
41
41
  isPending,
42
42
  isError,
43
43
  error,
44
- } = useReferenceTranslations(
45
- reference!,
46
- translatable_fields?.[reference!] ?? [],
47
- referenceIdParam,
48
- {
49
- enabled: !!translatable_fields && !!reference,
50
- placeholderData: keepPreviousData,
51
- }
52
- )
44
+ } = useReferenceTranslations(reference!, referenceIdParam, {
45
+ enabled: !!reference,
46
+ placeholderData: keepPreviousData,
47
+ })
53
48
  const {
54
49
  store,
55
50
  isPending: isStorePending,
@@ -1,32 +0,0 @@
1
- // src/hooks/use-infinite-list.tsx
2
- import {
3
- useInfiniteQuery
4
- } from "@tanstack/react-query";
5
- var useInfiniteList = ({
6
- queryKey,
7
- queryFn,
8
- query,
9
- options
10
- }) => {
11
- const { limit = 50, offset: _, ..._query } = query ?? {};
12
- const resolvedQueryKey = typeof queryKey === "function" ? queryKey(_query) : queryKey;
13
- const infiniteQueryKey = resolvedQueryKey[resolvedQueryKey.length - 1] === "__infinite" ? resolvedQueryKey : [...resolvedQueryKey, "__infinite"];
14
- return useInfiniteQuery({
15
- // Infinite queries must not share the exact same queryKey as non-infinite queries,
16
- // since the cached data shape differs (InfiniteData<T> vs T).
17
- queryKey: infiniteQueryKey,
18
- queryFn: ({ pageParam = 0 }) => {
19
- return queryFn({ ..._query, limit, offset: pageParam });
20
- },
21
- initialPageParam: 0,
22
- getNextPageParam: (lastPage) => {
23
- const moreItemsExist = lastPage.count > lastPage.offset + lastPage.limit;
24
- return moreItemsExist ? lastPage.offset + lastPage.limit : void 0;
25
- },
26
- ...options
27
- });
28
- };
29
-
30
- export {
31
- useInfiniteList
32
- };
@@ -1,160 +0,0 @@
1
- // src/components/inputs/chip-input/chip-input.tsx
2
- import { XMarkMini } from "@medusajs/icons";
3
- import { Badge, clx } from "@medusajs/ui";
4
- import { AnimatePresence, motion } from "motion/react";
5
- import {
6
- forwardRef,
7
- useImperativeHandle,
8
- useRef,
9
- useState
10
- } from "react";
11
- import { jsx, jsxs } from "react/jsx-runtime";
12
- var ChipInput = forwardRef(
13
- ({
14
- value,
15
- onChange,
16
- onBlur,
17
- disabled,
18
- name,
19
- showRemove = true,
20
- variant = "base",
21
- allowDuplicates = false,
22
- placeholder,
23
- className
24
- }, ref) => {
25
- const innerRef = useRef(null);
26
- const isControlledRef = useRef(typeof value !== "undefined");
27
- const isControlled = isControlledRef.current;
28
- const [uncontrolledValue, setUncontrolledValue] = useState([]);
29
- useImperativeHandle(
30
- ref,
31
- () => innerRef.current
32
- );
33
- const [duplicateIndex, setDuplicateIndex] = useState(null);
34
- const chips = isControlled ? value : uncontrolledValue;
35
- const handleAddChip = (chip) => {
36
- const cleanValue = chip.trim();
37
- if (!cleanValue) {
38
- return;
39
- }
40
- if (!allowDuplicates && chips.includes(cleanValue)) {
41
- setDuplicateIndex(chips.indexOf(cleanValue));
42
- setTimeout(() => {
43
- setDuplicateIndex(null);
44
- }, 300);
45
- return;
46
- }
47
- onChange?.([...chips, cleanValue]);
48
- if (!isControlled) {
49
- setUncontrolledValue([...chips, cleanValue]);
50
- }
51
- };
52
- const handleRemoveChip = (chip) => {
53
- onChange?.(chips.filter((v) => v !== chip));
54
- if (!isControlled) {
55
- setUncontrolledValue(chips.filter((v) => v !== chip));
56
- }
57
- };
58
- const handleBlur = (e) => {
59
- onBlur?.();
60
- if (e.target.value) {
61
- handleAddChip(e.target.value);
62
- e.target.value = "";
63
- }
64
- };
65
- const handleKeyDown = (e) => {
66
- if (e.key === "Enter" || e.key === ",") {
67
- e.preventDefault();
68
- if (!innerRef.current?.value) {
69
- return;
70
- }
71
- handleAddChip(innerRef.current?.value ?? "");
72
- innerRef.current.value = "";
73
- innerRef.current?.focus();
74
- }
75
- if (e.key === "Backspace" && innerRef.current?.value === "") {
76
- handleRemoveChip(chips[chips.length - 1]);
77
- }
78
- };
79
- const shake = {
80
- x: [0, -2, 2, -2, 2, 0],
81
- transition: { duration: 0.3 }
82
- };
83
- return /* @__PURE__ */ jsxs(
84
- "div",
85
- {
86
- className: clx(
87
- "shadow-borders-base flex min-h-8 flex-wrap items-center gap-1 rounded-md px-2 py-1.5",
88
- "transition-fg focus-within:shadow-borders-interactive-with-active",
89
- "has-[input:disabled]:bg-ui-bg-disabled has-[input:disabled]:text-ui-fg-disabled has-[input:disabled]:cursor-not-allowed",
90
- {
91
- "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover": variant === "contrast",
92
- "bg-ui-bg-field hover:bg-ui-bg-field-hover": variant === "base"
93
- },
94
- className
95
- ),
96
- tabIndex: -1,
97
- onClick: () => innerRef.current?.focus(),
98
- children: [
99
- chips.map((v, index) => {
100
- return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(
101
- Badge,
102
- {
103
- size: "2xsmall",
104
- className: clx("gap-x-0.5 pl-1.5 pr-1.5", {
105
- "transition-fg pr-1": showRemove,
106
- "shadow-borders-focus": index === duplicateIndex
107
- }),
108
- asChild: true,
109
- children: /* @__PURE__ */ jsxs(
110
- motion.div,
111
- {
112
- animate: index === duplicateIndex ? shake : void 0,
113
- children: [
114
- v,
115
- showRemove && /* @__PURE__ */ jsx(
116
- "button",
117
- {
118
- tabIndex: -1,
119
- type: "button",
120
- onClick: () => handleRemoveChip(v),
121
- className: clx(
122
- "text-ui-fg-subtle transition-fg outline-none"
123
- ),
124
- children: /* @__PURE__ */ jsx(XMarkMini, {})
125
- }
126
- )
127
- ]
128
- }
129
- )
130
- }
131
- ) }, `${v}-${index}`);
132
- }),
133
- /* @__PURE__ */ jsx(
134
- "input",
135
- {
136
- className: clx(
137
- "caret-ui-fg-base text-ui-fg-base txt-compact-small flex-1 appearance-none bg-transparent",
138
- "disabled:text-ui-fg-disabled disabled:cursor-not-allowed",
139
- "focus:outline-none",
140
- "placeholder:text-ui-fg-muted"
141
- ),
142
- onKeyDown: handleKeyDown,
143
- onBlur: handleBlur,
144
- disabled,
145
- name,
146
- ref: innerRef,
147
- placeholder: chips.length === 0 ? placeholder : void 0,
148
- autoComplete: "off"
149
- }
150
- )
151
- ]
152
- }
153
- );
154
- }
155
- );
156
- ChipInput.displayName = "ChipInput";
157
-
158
- export {
159
- ChipInput
160
- };
@@ -1,201 +0,0 @@
1
- import {
2
- AvatarBox
3
- } from "./chunk-O333RR6K.mjs";
4
- import "./chunk-KIIT4BNH.mjs";
5
- import {
6
- isFetchError
7
- } from "./chunk-ONB3JEHR.mjs";
8
- import {
9
- useExtension
10
- } from "./chunk-C5P5PL3E.mjs";
11
- import {
12
- Form
13
- } from "./chunk-OBQI23QM.mjs";
14
- import "./chunk-GRZSG4EP.mjs";
15
- import {
16
- useSignInWithEmailPass
17
- } from "./chunk-I4OBEAOJ.mjs";
18
- import "./chunk-HI6URQ7H.mjs";
19
- import "./chunk-6CLQKVAU.mjs";
20
- import "./chunk-KI7TOXBR.mjs";
21
- import "./chunk-UJ2TMPV4.mjs";
22
- import "./chunk-23GTCEOV.mjs";
23
- import "./chunk-WAXMT4IY.mjs";
24
- import "./chunk-DYDGGABK.mjs";
25
- import "./chunk-LGNTHZ5Y.mjs";
26
- import "./chunk-CN7JXSGW.mjs";
27
- import "./chunk-5BQQRHQS.mjs";
28
- import "./chunk-HTCYX4VD.mjs";
29
- import "./chunk-5AFMB7XQ.mjs";
30
- import "./chunk-UWY5ZV66.mjs";
31
- import "./chunk-A63RZVX6.mjs";
32
- import "./chunk-HBXV7ENS.mjs";
33
- import "./chunk-CDORR33H.mjs";
34
- import "./chunk-4JQR6QNW.mjs";
35
- import "./chunk-FYWHE3W5.mjs";
36
- import "./chunk-OSHH5GAS.mjs";
37
- import "./chunk-2XTBDCGE.mjs";
38
- import "./chunk-3BF5SC66.mjs";
39
- import "./chunk-VCSSQVPD.mjs";
40
- import "./chunk-HP2JH45P.mjs";
41
- import "./chunk-SQDIZZDW.mjs";
42
- import "./chunk-Z6BFNHEO.mjs";
43
- import "./chunk-HGRIOEAR.mjs";
44
- import "./chunk-FXYH54JP.mjs";
45
- import "./chunk-774WSTCC.mjs";
46
- import "./chunk-NFEK63OE.mjs";
47
- import "./chunk-QZ7TP4HQ.mjs";
48
-
49
- // src/routes/login/login.tsx
50
- import { zodResolver } from "@hookform/resolvers/zod";
51
- import { Alert, Button, Heading, Hint, Input, Text } from "@medusajs/ui";
52
- import { useForm } from "react-hook-form";
53
- import { Trans, useTranslation } from "react-i18next";
54
- import { Link, useLocation, useNavigate } from "react-router-dom";
55
- import * as z from "zod";
56
- import { jsx, jsxs } from "react/jsx-runtime";
57
- var LoginSchema = z.object({
58
- email: z.string().email(),
59
- password: z.string()
60
- });
61
- var Login = () => {
62
- const { t } = useTranslation();
63
- const location = useLocation();
64
- const navigate = useNavigate();
65
- const { getWidgets } = useExtension();
66
- const from = location.state?.from?.pathname || "/orders";
67
- const form = useForm({
68
- resolver: zodResolver(LoginSchema),
69
- defaultValues: {
70
- email: "",
71
- password: ""
72
- }
73
- });
74
- const { mutateAsync, isPending } = useSignInWithEmailPass();
75
- const handleSubmit = form.handleSubmit(async ({ email, password }) => {
76
- await mutateAsync(
77
- {
78
- email,
79
- password
80
- },
81
- {
82
- onError: (error) => {
83
- if (isFetchError(error)) {
84
- if (error.status === 401) {
85
- form.setError("email", {
86
- type: "manual",
87
- message: error.message
88
- });
89
- return;
90
- }
91
- }
92
- form.setError("root.serverError", {
93
- type: "manual",
94
- message: error.message
95
- });
96
- },
97
- onSuccess: () => {
98
- navigate(from, { replace: true });
99
- }
100
- }
101
- );
102
- });
103
- const serverError = form.formState.errors?.root?.serverError?.message;
104
- const validationError = form.formState.errors.email?.message || form.formState.errors.password?.message;
105
- return /* @__PURE__ */ jsx("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: [
106
- /* @__PURE__ */ jsx(AvatarBox, {}),
107
- /* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col items-center", children: [
108
- /* @__PURE__ */ jsx(Heading, { children: t("login.title") }),
109
- /* @__PURE__ */ jsx(Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t("login.hint") })
110
- ] }),
111
- /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-y-3", children: [
112
- getWidgets("login.before").map((Component, i) => {
113
- return /* @__PURE__ */ jsx(Component, {}, i);
114
- }),
115
- /* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsxs(
116
- "form",
117
- {
118
- onSubmit: handleSubmit,
119
- className: "flex w-full flex-col gap-y-6",
120
- children: [
121
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-1", children: [
122
- /* @__PURE__ */ jsx(
123
- Form.Field,
124
- {
125
- control: form.control,
126
- name: "email",
127
- render: ({ field }) => {
128
- return /* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
129
- Input,
130
- {
131
- autoComplete: "email",
132
- ...field,
133
- className: "bg-ui-bg-field-component",
134
- placeholder: t("fields.email")
135
- }
136
- ) }) });
137
- }
138
- }
139
- ),
140
- /* @__PURE__ */ jsx(
141
- Form.Field,
142
- {
143
- control: form.control,
144
- name: "password",
145
- render: ({ field }) => {
146
- return /* @__PURE__ */ jsxs(Form.Item, { children: [
147
- /* @__PURE__ */ jsx(Form.Label, {}),
148
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
149
- Input,
150
- {
151
- type: "password",
152
- autoComplete: "current-password",
153
- ...field,
154
- className: "bg-ui-bg-field-component",
155
- placeholder: t("fields.password")
156
- }
157
- ) })
158
- ] });
159
- }
160
- }
161
- )
162
- ] }),
163
- validationError && /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx(Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
164
- serverError && /* @__PURE__ */ jsx(
165
- Alert,
166
- {
167
- className: "bg-ui-bg-base items-center p-2",
168
- dismissible: true,
169
- variant: "error",
170
- children: serverError
171
- }
172
- ),
173
- /* @__PURE__ */ jsx(Button, { className: "w-full", type: "submit", isLoading: isPending, children: t("actions.continueWithEmail") })
174
- ]
175
- }
176
- ) }),
177
- getWidgets("login.after").map((Component, i) => {
178
- return /* @__PURE__ */ jsx(Component, {}, i);
179
- })
180
- ] }),
181
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted txt-small my-6", children: /* @__PURE__ */ jsx(
182
- Trans,
183
- {
184
- i18nKey: "login.forgotPassword",
185
- components: [
186
- /* @__PURE__ */ jsx(
187
- Link,
188
- {
189
- to: "/reset-password",
190
- className: "text-ui-fg-interactive transition-fg hover:text-ui-fg-interactive-hover focus-visible:text-ui-fg-interactive-hover font-medium outline-none"
191
- },
192
- "reset-password-link"
193
- )
194
- ]
195
- }
196
- ) })
197
- ] }) });
198
- };
199
- export {
200
- Login as Component
201
- };
@@ -1,151 +0,0 @@
1
- import {
2
- ChipInput
3
- } from "./chunk-XDJ7OMBR.mjs";
4
- import "./chunk-IUCDCPJU.mjs";
5
- import {
6
- KeyboundForm
7
- } from "./chunk-6HTZNHPT.mjs";
8
- import {
9
- RouteDrawer
10
- } from "./chunk-WVA4O7QS.mjs";
11
- import {
12
- useRouteModal
13
- } from "./chunk-D6UW7URG.mjs";
14
- import {
15
- Form
16
- } from "./chunk-OBQI23QM.mjs";
17
- import {
18
- useCreateProductOption,
19
- useProduct
20
- } from "./chunk-Z6BFNHEO.mjs";
21
- import "./chunk-HGRIOEAR.mjs";
22
- import "./chunk-FXYH54JP.mjs";
23
- import "./chunk-774WSTCC.mjs";
24
- import "./chunk-NFEK63OE.mjs";
25
- import "./chunk-QZ7TP4HQ.mjs";
26
-
27
- // src/routes/products/product-create-option/product-create-option.tsx
28
- import { Heading } from "@medusajs/ui";
29
- import { useTranslation as useTranslation2 } from "react-i18next";
30
- import { useParams } from "react-router-dom";
31
-
32
- // src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx
33
- import { zodResolver } from "@hookform/resolvers/zod";
34
- import { Button, Input, toast } from "@medusajs/ui";
35
- import { useForm } from "react-hook-form";
36
- import { useTranslation } from "react-i18next";
37
- import { z } from "zod";
38
- import { jsx, jsxs } from "react/jsx-runtime";
39
- var CreateProductOptionSchema = z.object({
40
- title: z.string().min(1),
41
- values: z.array(z.string()).optional()
42
- });
43
- var CreateProductOptionForm = ({
44
- product
45
- }) => {
46
- const { t } = useTranslation();
47
- const { handleSuccess } = useRouteModal();
48
- const form = useForm({
49
- defaultValues: {
50
- title: "",
51
- values: []
52
- },
53
- resolver: zodResolver(CreateProductOptionSchema)
54
- });
55
- const { mutateAsync, isPending } = useCreateProductOption(product.id);
56
- const handleSubmit = form.handleSubmit(async (values) => {
57
- mutateAsync(values, {
58
- onSuccess: () => {
59
- toast.success(
60
- t("products.options.create.successToast", {
61
- title: values.title
62
- })
63
- );
64
- handleSuccess();
65
- },
66
- onError: async (err) => {
67
- toast.error(err.message);
68
- }
69
- });
70
- });
71
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
72
- KeyboundForm,
73
- {
74
- onSubmit: handleSubmit,
75
- className: "flex flex-1 flex-col overflow-hidden",
76
- children: [
77
- /* @__PURE__ */ jsxs(RouteDrawer.Body, { className: "flex flex-1 flex-col gap-y-4 overflow-auto", children: [
78
- /* @__PURE__ */ jsx(
79
- Form.Field,
80
- {
81
- control: form.control,
82
- name: "title",
83
- render: ({ field }) => {
84
- return /* @__PURE__ */ jsxs(Form.Item, { children: [
85
- /* @__PURE__ */ jsx(Form.Label, { children: t("products.fields.options.optionTitle") }),
86
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
87
- Input,
88
- {
89
- ...field,
90
- placeholder: t(
91
- "products.fields.options.optionTitlePlaceholder"
92
- )
93
- }
94
- ) }),
95
- /* @__PURE__ */ jsx(Form.ErrorMessage, {})
96
- ] });
97
- }
98
- }
99
- ),
100
- /* @__PURE__ */ jsx(
101
- Form.Field,
102
- {
103
- control: form.control,
104
- name: "values",
105
- render: ({ field }) => {
106
- return /* @__PURE__ */ jsxs(Form.Item, { children: [
107
- /* @__PURE__ */ jsx(Form.Label, { children: t("products.fields.options.variations") }),
108
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
109
- ChipInput,
110
- {
111
- ...field,
112
- placeholder: t(
113
- "products.fields.options.variantionsPlaceholder"
114
- )
115
- }
116
- ) }),
117
- /* @__PURE__ */ jsx(Form.ErrorMessage, {})
118
- ] });
119
- }
120
- }
121
- )
122
- ] }),
123
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
124
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
125
- /* @__PURE__ */ jsx(Button, { type: "submit", size: "small", isLoading: isPending, children: t("actions.save") })
126
- ] }) })
127
- ]
128
- }
129
- ) });
130
- };
131
-
132
- // src/routes/products/product-create-option/product-create-option.tsx
133
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
134
- var ProductCreateOption = () => {
135
- const { id } = useParams();
136
- const { t } = useTranslation2();
137
- const { product, isLoading, isError, error } = useProduct(id, {
138
- // TODO: Remove exclusion once we avoid including unnecessary relations by default in the query config
139
- fields: "-type,-collection,-options,-tags,-images,-variants,-sales_channels"
140
- });
141
- if (isError) {
142
- throw error;
143
- }
144
- return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
145
- /* @__PURE__ */ jsx2(RouteDrawer.Header, { children: /* @__PURE__ */ jsx2(Heading, { children: t("products.options.create.header") }) }),
146
- !isLoading && product && /* @__PURE__ */ jsx2(CreateProductOptionForm, { product })
147
- ] });
148
- };
149
- export {
150
- ProductCreateOption as Component
151
- };