@medusajs/dashboard 3.0.0-snapshot-20251106143524 → 3.0.0-snapshot-20251106181920

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 (267) hide show
  1. package/dist/{add-campaign-promotions-UR3UM3MV.mjs → add-campaign-promotions-ZUJD7HBF.mjs} +4 -4
  2. package/dist/{adjust-inventory-7EWRE2HD.mjs → adjust-inventory-MEJEPP4Y.mjs} +1 -1
  3. package/dist/{api-key-management-create-SPLD3JMO.mjs → api-key-management-create-4OZWVOSF.mjs} +3 -3
  4. package/dist/{api-key-management-detail-Z6V22XWR.mjs → api-key-management-detail-K3A3T6ET.mjs} +17 -17
  5. package/dist/{api-key-management-edit-2VPL7PHB.mjs → api-key-management-edit-FYLVVQOA.mjs} +3 -3
  6. package/dist/{api-key-management-list-TVLEYYQO.mjs → api-key-management-list-6YG52LWY.mjs} +8 -8
  7. package/dist/{api-key-management-sales-channels-Y25FWD5A.mjs → api-key-management-sales-channels-S5IFH7LP.mjs} +8 -8
  8. package/dist/app.css +3 -3
  9. package/dist/app.js +58386 -60410
  10. package/dist/app.mjs +12 -12
  11. package/dist/{campaign-create-GD2D45NX.mjs → campaign-create-NEKUWDGF.mjs} +2 -2
  12. package/dist/{campaign-detail-YDLSCIRO.mjs → campaign-detail-2H2W4W5B.mjs} +15 -15
  13. package/dist/{campaign-list-M2462W5W.mjs → campaign-list-3452F4Y6.mjs} +6 -6
  14. package/dist/{categories-metadata-2HM7G27P.mjs → categories-metadata-ZEYU33GV.mjs} +10 -10
  15. package/dist/{category-create-BC2VUVKO.mjs → category-create-N7PP3GWU.mjs} +5 -5
  16. package/dist/{category-detail-IZ3AWOCP.mjs → category-detail-DKY37LPO.mjs} +18 -18
  17. package/dist/{category-edit-U5Y5KJ2Y.mjs → category-edit-IFDQP7EZ.mjs} +2 -2
  18. package/dist/{category-list-BJLRBYZC.mjs → category-list-2M4BCRAL.mjs} +9 -9
  19. package/dist/{category-organize-4NXFDN2I.mjs → category-organize-76I7PO24.mjs} +2 -2
  20. package/dist/{category-products-55LDLRRQ.mjs → category-products-VVRGW25X.mjs} +17 -17
  21. package/dist/{chunk-VEYZCWO5.mjs → chunk-227DWSFF.mjs} +16 -16
  22. package/dist/{chunk-2X25XWOW.mjs → chunk-2D44OO7A.mjs} +1 -1
  23. package/dist/{chunk-CV65NY6Y.mjs → chunk-2WZUO66T.mjs} +1 -1
  24. package/dist/{chunk-IKXQEHLS.mjs → chunk-3G33PZVQ.mjs} +1 -1
  25. package/dist/{chunk-ULQ3V4CC.mjs → chunk-3MPO56OL.mjs} +2 -2
  26. package/dist/{chunk-SUYYSKCB.mjs → chunk-67ORSRVT.mjs} +16 -23
  27. package/dist/{chunk-MQALAB34.mjs → chunk-7PWZ5GMG.mjs} +1 -1
  28. package/dist/{chunk-5IPYLNMF.mjs → chunk-ET6EGRW3.mjs} +692 -3840
  29. package/dist/{chunk-6IXLTZ2H.mjs → chunk-FA5QNPXE.mjs} +2 -2
  30. package/dist/{chunk-GU5PJRPM.mjs → chunk-FKIOYL3D.mjs} +1 -1
  31. package/dist/{chunk-IXZVR3HG.mjs → chunk-GBKLLUUX.mjs} +1 -1
  32. package/dist/{chunk-ALKTJGWS.mjs → chunk-GI6XX5VU.mjs} +2 -2
  33. package/dist/{chunk-PVW6M64S.mjs → chunk-GLVCH422.mjs} +1 -1
  34. package/dist/{chunk-4BGVSXZZ.mjs → chunk-GVPJPLE2.mjs} +15 -48
  35. package/dist/{chunk-6XWHQ6ON.mjs → chunk-GVVAVAXG.mjs} +1 -1
  36. package/dist/{chunk-3DO2JGVG.mjs → chunk-HGFZAXHD.mjs} +1 -1
  37. package/dist/{chunk-3C6WQ7NH.mjs → chunk-IBSMG7AF.mjs} +37 -3
  38. package/dist/{chunk-GA3UMQMZ.mjs → chunk-IVZ6BMDB.mjs} +1 -1
  39. package/dist/{chunk-EQKJ5FSL.mjs → chunk-JAXWGF4M.mjs} +1 -1
  40. package/dist/{chunk-LEKWKUIS.mjs → chunk-JC75WAC7.mjs} +3 -3
  41. package/dist/{chunk-MBGEZAIM.mjs → chunk-JDA2MYND.mjs} +1 -1
  42. package/dist/{chunk-LOAL44PP.mjs → chunk-JDEH6Z4M.mjs} +1 -1
  43. package/dist/{chunk-2O43G3RH.mjs → chunk-LYTIMAIZ.mjs} +1 -1
  44. package/dist/{chunk-OGAZYXOV.mjs → chunk-NGR5XU3K.mjs} +1 -1
  45. package/dist/{chunk-3JJBLFYN.mjs → chunk-OI4W5AEL.mjs} +6 -2
  46. package/dist/{chunk-T57MRRCF.mjs → chunk-ORMX5RJQ.mjs} +1 -1
  47. package/dist/{chunk-XYHXWLTJ.mjs → chunk-P5RVJWPK.mjs} +1 -1
  48. package/dist/{chunk-DZWH2RV6.mjs → chunk-PFKKVLZX.mjs} +1 -1
  49. package/dist/{chunk-YTN73JYH.mjs → chunk-PJ5EUKOB.mjs} +1 -1
  50. package/dist/{chunk-2GWGNMAA.mjs → chunk-Q33G337Z.mjs} +1 -1
  51. package/dist/{chunk-YGLRZQ4C.mjs → chunk-QXXHLVRQ.mjs} +1 -1
  52. package/dist/{chunk-M4Q5Q4I3.mjs → chunk-S34JJVBQ.mjs} +2 -2
  53. package/dist/{chunk-WTK7SR6S.mjs → chunk-SBFWPL42.mjs} +2 -2
  54. package/dist/{chunk-ROKB75YP.mjs → chunk-SJ3E4T6B.mjs} +1 -1
  55. package/dist/{chunk-3BE5PBQZ.mjs → chunk-SMDWWXCD.mjs} +4 -4
  56. package/dist/{chunk-NDXL7ZT5.mjs → chunk-TNMXAPPT.mjs} +1 -1
  57. package/dist/{chunk-S5GNHYAG.mjs → chunk-UTVAHVAY.mjs} +6 -6
  58. package/dist/{chunk-NL376WAO.mjs → chunk-VAIHVNV6.mjs} +1 -1
  59. package/dist/{chunk-YA5PS6KW.mjs → chunk-W77EPLUD.mjs} +1 -1
  60. package/dist/{chunk-KXRW6JRE.mjs → chunk-WOFUOGLO.mjs} +123 -33
  61. package/dist/{chunk-N4N4KGET.mjs → chunk-WWQZD7WM.mjs} +1 -1
  62. package/dist/{chunk-5IFK2ZTA.mjs → chunk-Y2XQE25L.mjs} +2 -2
  63. package/dist/{chunk-R2QF6AQX.mjs → chunk-Y6ZQFV7H.mjs} +1 -1
  64. package/dist/{chunk-WGIRB6HY.mjs → chunk-YSQG2JDM.mjs} +1 -1
  65. package/dist/chunk-ZHH3W7CN.mjs +171 -0
  66. package/dist/{collection-add-products-7CFVTCLK.mjs → collection-add-products-QCSFXELK.mjs} +18 -18
  67. package/dist/{collection-create-CUZFWEOB.mjs → collection-create-45RYGDW7.mjs} +2 -2
  68. package/dist/{collection-detail-3NMMB3CC.mjs → collection-detail-OLC6DMBZ.mjs} +18 -18
  69. package/dist/{collection-edit-22I7EEJG.mjs → collection-edit-YBPBHLLZ.mjs} +2 -2
  70. package/dist/{collection-list-VNKB3725.mjs → collection-list-6UJNE2QB.mjs} +28 -27
  71. package/dist/{collection-metadata-ZUFYY4OU.mjs → collection-metadata-QG55V5ZM.mjs} +11 -11
  72. package/dist/{customer-detail-PAYUFGP6.mjs → customer-detail-XOCZDUJL.mjs} +20 -20
  73. package/dist/{customer-group-add-customers-MW2XH2F6.mjs → customer-group-add-customers-TQAH4IPM.mjs} +9 -9
  74. package/dist/{customer-group-detail-LJ6YVB2C.mjs → customer-group-detail-EWSDTVTQ.mjs} +19 -19
  75. package/dist/{customer-group-list-M2OOZLIZ.mjs → customer-group-list-NFXAELFY.mjs} +15 -15
  76. package/dist/{customer-list-MZ7ZRERV.mjs → customer-list-TXAB4URJ.mjs} +9 -9
  77. package/dist/{customers-add-customer-group-IAIRRQ2I.mjs → customers-add-customer-group-EYZMFVBS.mjs} +17 -17
  78. package/dist/{edit-inventory-item-5RPZHCM7.mjs → edit-inventory-item-TFJL5H5X.mjs} +1 -1
  79. package/dist/{edit-inventory-item-attributes-R73ZTBYG.mjs → edit-inventory-item-attributes-O3K7OB56.mjs} +1 -1
  80. package/dist/{edit-reservation-WMLAFMYU.mjs → edit-reservation-Z5TFZERY.mjs} +2 -2
  81. package/dist/{edit-rules-KV43O773.mjs → edit-rules-IE77WUXD.mjs} +10 -10
  82. package/dist/en.json +51 -4
  83. package/dist/{inventory-create-NW5WSPBV.mjs → inventory-create-HQ5XLKOJ.mjs} +10 -10
  84. package/dist/{inventory-detail-ZJ5U5FSA.mjs → inventory-detail-DAINM7WP.mjs} +14 -14
  85. package/dist/{inventory-list-HHTQRKQW.mjs → inventory-list-5ROSUTXF.mjs} +5 -5
  86. package/dist/{inventory-metadata-7XR4ON7G.mjs → inventory-metadata-HUL56OD2.mjs} +10 -10
  87. package/dist/{inventory-stock-VTIDGTOY.mjs → inventory-stock-5VIUWKTQ.mjs} +10 -10
  88. package/dist/{location-detail-WZM4EXFM.mjs → location-detail-QMLCFID5.mjs} +15 -15
  89. package/dist/{location-fulfillment-providers-DNIVH7XD.mjs → location-fulfillment-providers-NAFFMP3P.mjs} +19 -18
  90. package/dist/{location-sales-channels-3JAXXM3Q.mjs → location-sales-channels-D37LXTKQ.mjs} +7 -7
  91. package/dist/{location-service-zone-create-D2HXXX63.mjs → location-service-zone-create-27MNMKPQ.mjs} +5 -5
  92. package/dist/{location-service-zone-manage-areas-LVVT6XBE.mjs → location-service-zone-manage-areas-U3EPNWSI.mjs} +5 -5
  93. package/dist/{location-service-zone-shipping-option-create-F3EQW67U.mjs → location-service-zone-shipping-option-create-VM4TEJHY.mjs} +10 -10
  94. package/dist/{login-VZALGB6R.mjs → login-MTGOV7KC.mjs} +10 -10
  95. package/dist/{manage-locations-WMH3RQMR.mjs → manage-locations-OHDFBORX.mjs} +1 -1
  96. package/dist/{order-allocate-items-MZ7Y4FU4.mjs → order-allocate-items-NU65ZXHE.mjs} +3 -3
  97. package/dist/{order-create-claim-2FPE6XP2.mjs → order-create-claim-LTE2E75R.mjs} +20 -20
  98. package/dist/{order-create-edit-PVGKIS6G.mjs → order-create-edit-TPU3CKUU.mjs} +15 -15
  99. package/dist/{order-create-exchange-G4JY4FSX.mjs → order-create-exchange-FVSBZI7P.mjs} +26 -26
  100. package/dist/{order-create-fulfillment-VTICR6OE.mjs → order-create-fulfillment-NFGPDCBV.mjs} +13 -13
  101. package/dist/{order-create-refund-RWDVIXPV.mjs → order-create-refund-DC7C3R4Y.mjs} +15 -15
  102. package/dist/{order-create-return-VEUCH5BA.mjs → order-create-return-RLXYVZLO.mjs} +8 -8
  103. package/dist/{order-create-shipment-2KNYEHSU.mjs → order-create-shipment-RDYWCG3A.mjs} +10 -10
  104. package/dist/{order-detail-2EFNG3UB.mjs → order-detail-VVOZ6E2R.mjs} +33 -33
  105. package/dist/{order-edit-billing-address-T6BIIRAX.mjs → order-edit-billing-address-LV7453CS.mjs} +10 -10
  106. package/dist/{order-edit-email-SLUOGWRO.mjs → order-edit-email-4U5C6UKX.mjs} +10 -10
  107. package/dist/{order-edit-shipping-address-YUES5K5Q.mjs → order-edit-shipping-address-6IQC2CVP.mjs} +10 -10
  108. package/dist/{order-list-EEC3VSLN.mjs → order-list-INSYF52F.mjs} +13 -13
  109. package/dist/{order-metadata-HS33MC6S.mjs → order-metadata-EEV4IWOM.mjs} +10 -10
  110. package/dist/{order-receive-return-E6BGSZVL.mjs → order-receive-return-IWHR3EBF.mjs} +11 -11
  111. package/dist/{order-request-transfer-7IIDQ37I.mjs → order-request-transfer-65R4A7HS.mjs} +10 -10
  112. package/dist/{price-list-configuration-WQEQFG6M.mjs → price-list-configuration-L5XYCVP2.mjs} +8 -8
  113. package/dist/{price-list-create-36BOXETM.mjs → price-list-create-5GIMBRG2.mjs} +21 -21
  114. package/dist/{price-list-detail-6CJ63F65.mjs → price-list-detail-7AL2EBRL.mjs} +22 -22
  115. package/dist/{price-list-edit-GXDLVOU4.mjs → price-list-edit-DHG5STG4.mjs} +2 -2
  116. package/dist/{price-list-list-2HDOJIC6.mjs → price-list-list-QQKZEFSU.mjs} +7 -7
  117. package/dist/{price-list-prices-add-AVPP57TL.mjs → price-list-prices-add-2OO4QEZB.mjs} +17 -17
  118. package/dist/{price-list-prices-edit-J7HCNDTO.mjs → price-list-prices-edit-2FB25KWU.mjs} +2 -2
  119. package/dist/{product-attributes-TWEJQQBK.mjs → product-attributes-CCQ6WAOD.mjs} +13 -13
  120. package/dist/{product-create-GTUUDEAP.mjs → product-create-AIRCVZAE.mjs} +346 -552
  121. package/dist/{product-create-variant-ZWY57BX7.mjs → product-create-variant-7BD5KQHQ.mjs} +10 -10
  122. package/dist/{product-detail-F4MVAHFN.mjs → product-detail-IYMXYAPH.mjs} +28 -55
  123. package/dist/{product-edit-NEIZ3SID.mjs → product-edit-PDGQHCQ2.mjs} +13 -13
  124. package/dist/{product-export-5WBXPUYP.mjs → product-export-5EINLQDF.mjs} +26 -25
  125. package/dist/{product-image-variants-edit-T3STDZJG.mjs → product-image-variants-edit-DDSEBG5H.mjs} +14 -14
  126. package/dist/{product-import-5VLF2ZN4.mjs → product-import-IQJWHNYN.mjs} +10 -10
  127. package/dist/{product-list-BX2QNNQK.mjs → product-list-PUQEGU75.mjs} +23 -23
  128. package/dist/{product-media-Z3NNTB7H.mjs → product-media-Q5XFYZRS.mjs} +2 -2
  129. package/dist/{product-metadata-LMDEXR3V.mjs → product-metadata-WCKNOZXX.mjs} +10 -10
  130. package/dist/product-option-create-MWFWB2SU.mjs +336 -0
  131. package/dist/product-option-detail-UKKEZPG7.mjs +323 -0
  132. package/dist/product-option-edit-NHAF7B4P.mjs +324 -0
  133. package/dist/product-option-list-C6ZR2WIX.mjs +266 -0
  134. package/dist/product-option-metadata-OWSGHNDC.mjs +71 -0
  135. package/dist/product-options-manage-N73G5IXY.mjs +206 -0
  136. package/dist/{product-organization-5N2EIUXB.mjs → product-organization-HHME5F2C.mjs} +14 -14
  137. package/dist/{product-prices-MCZYVPQW.mjs → product-prices-GVEPABHQ.mjs} +1 -1
  138. package/dist/{product-sales-channels-LRMOPHMH.mjs → product-sales-channels-ZC5ONPG7.mjs} +7 -7
  139. package/dist/{product-shipping-profile-AHJE77VR.mjs → product-shipping-profile-KXSBDGRD.mjs} +13 -13
  140. package/dist/{product-stock-O2BH5R45.mjs → product-stock-LXRLD7FA.mjs} +10 -10
  141. package/dist/{product-tag-create-GOJTE5XA.mjs → product-tag-create-RAJEWM5O.mjs} +10 -10
  142. package/dist/{product-tag-detail-LDKRRJWH.mjs → product-tag-detail-EOW2GMOL.mjs} +36 -35
  143. package/dist/{product-tag-edit-IT4GHLSO.mjs → product-tag-edit-ZOO56XMF.mjs} +10 -10
  144. package/dist/{product-tag-list-3ERYK5WE.mjs → product-tag-list-B2UX2OHB.mjs} +35 -34
  145. package/dist/{product-tag-metadata-QV2BOGP2.mjs → product-tag-metadata-OZB7SVDN.mjs} +10 -10
  146. package/dist/{product-type-detail-UJ6QTCGQ.mjs → product-type-detail-4YZUC6ZS.mjs} +17 -17
  147. package/dist/{product-type-list-73DQPW4H.mjs → product-type-list-J2WDYTZK.mjs} +9 -9
  148. package/dist/{product-type-metadata-5TDBJGNQ.mjs → product-type-metadata-6QT47ZSR.mjs} +10 -10
  149. package/dist/{product-variant-detail-JMPD7LEZ.mjs → product-variant-detail-HOOYZSS2.mjs} +14 -14
  150. package/dist/{product-variant-edit-DW27AYBX.mjs → product-variant-edit-J2MTJA75.mjs} +10 -10
  151. package/dist/{product-variant-manage-inventory-items-T5OB3YX3.mjs → product-variant-manage-inventory-items-P4QUORRH.mjs} +1 -1
  152. package/dist/{product-variant-media-PHRCKUDK.mjs → product-variant-media-U5RG7AOW.mjs} +1 -1
  153. package/dist/{product-variant-metadata-4KJE6B2R.mjs → product-variant-metadata-ZRSZO2D4.mjs} +10 -10
  154. package/dist/{profile-detail-MEZKVQAB.mjs → profile-detail-UTJBWZSA.mjs} +1 -1
  155. package/dist/{profile-edit-XAHDV2DG.mjs → profile-edit-OOYMTKX6.mjs} +1 -1
  156. package/dist/{promotion-create-F27AOTVZ.mjs → promotion-create-2E4EF4SP.mjs} +15 -15
  157. package/dist/{promotion-detail-L3FNHH6O.mjs → promotion-detail-P2BHIQDG.mjs} +13 -13
  158. package/dist/{promotion-list-R5JKSO4I.mjs → promotion-list-MN6YJCYA.mjs} +4 -4
  159. package/dist/{refund-reason-create-5ATQ2IPU.mjs → refund-reason-create-I3BIJFJH.mjs} +10 -10
  160. package/dist/{refund-reason-edit-F7AMOTG3.mjs → refund-reason-edit-2BEZASQH.mjs} +10 -10
  161. package/dist/{refund-reason-list-NS4SVHGZ.mjs → refund-reason-list-NIJHHOXJ.mjs} +20 -20
  162. package/dist/{region-add-countries-G5BOUL2E.mjs → region-add-countries-KGFPZSRE.mjs} +4 -4
  163. package/dist/{region-create-MLPUWT5W.mjs → region-create-YJJRTAYO.mjs} +4 -4
  164. package/dist/{region-detail-RICQRZUA.mjs → region-detail-ERE4ZF2I.mjs} +4 -4
  165. package/dist/{region-list-CJYT43SH.mjs → region-list-KE5HCKOR.mjs} +7 -7
  166. package/dist/{region-metadata-CRAHVHOC.mjs → region-metadata-RLZSQNGW.mjs} +10 -10
  167. package/dist/{reservation-create-YZMZ6HSS.mjs → reservation-create-4R2XEEZU.mjs} +2 -2
  168. package/dist/{reservation-detail-6MCBQZAE.mjs → reservation-detail-7OYGNK4L.mjs} +10 -10
  169. package/dist/{reservation-list-XP4YX4TR.mjs → reservation-list-VY44QEH6.mjs} +7 -7
  170. package/dist/{reservation-metadata-IQNJPNAX.mjs → reservation-metadata-VJIAGIMF.mjs} +10 -10
  171. package/dist/{return-reason-list-7MBVORVO.mjs → return-reason-list-6UKR2BLW.mjs} +12 -12
  172. package/dist/{sales-channel-add-products-GQQ7Z3PT.mjs → sales-channel-add-products-KAUMNKMD.mjs} +17 -17
  173. package/dist/{sales-channel-create-7ISLGNGC.mjs → sales-channel-create-I6ME6QBM.mjs} +2 -2
  174. package/dist/{sales-channel-detail-P2HXFYB4.mjs → sales-channel-detail-5SXDKP6P.mjs} +17 -17
  175. package/dist/{sales-channel-edit-2PEHGAWF.mjs → sales-channel-edit-O7GM2B6O.mjs} +2 -2
  176. package/dist/{sales-channel-list-4PJLCQ77.mjs → sales-channel-list-JKZ6TIY7.mjs} +15 -15
  177. package/dist/{sales-channel-metadata-ZOCPAIGM.mjs → sales-channel-metadata-33P5SKDI.mjs} +10 -10
  178. package/dist/{shipping-option-type-create-YR2QV2OG.mjs → shipping-option-type-create-KVYNWD2Q.mjs} +10 -10
  179. package/dist/{shipping-option-type-detail-TYHGCV2X.mjs → shipping-option-type-detail-YX3HMXNI.mjs} +11 -11
  180. package/dist/{shipping-option-type-edit-6KL3MHVT.mjs → shipping-option-type-edit-ODXQMHYJ.mjs} +10 -10
  181. package/dist/{shipping-option-type-list-AWJRR7U5.mjs → shipping-option-type-list-XCQNWDDA.mjs} +16 -16
  182. package/dist/{shipping-profile-metadata-A33XKBQN.mjs → shipping-profile-metadata-K34DAKGY.mjs} +10 -10
  183. package/dist/{shipping-profiles-list-7SVGIP72.mjs → shipping-profiles-list-KYYSHLSZ.mjs} +4 -4
  184. package/dist/{store-add-currencies-V3IBSI45.mjs → store-add-currencies-SNSW7A6O.mjs} +4 -4
  185. package/dist/{store-detail-3WFTRPJW.mjs → store-detail-3Z3BK2BH.mjs} +14 -14
  186. package/dist/{store-metadata-LMRFCZ3J.mjs → store-metadata-FESGAO7E.mjs} +10 -10
  187. package/dist/{tax-region-create-5Y6EA7XE.mjs → tax-region-create-EVFVC6HN.mjs} +10 -10
  188. package/dist/{tax-region-detail-HXVZA2PP.mjs → tax-region-detail-ULHK52CD.mjs} +38 -37
  189. package/dist/{tax-region-edit-IKEWHRUK.mjs → tax-region-edit-CXEPD2F2.mjs} +10 -10
  190. package/dist/{tax-region-province-detail-VT3BUKLS.mjs → tax-region-province-detail-VUY4PDGN.mjs} +38 -37
  191. package/dist/{tax-region-tax-override-create-RZUVOGNR.mjs → tax-region-tax-override-create-WWZZVAG5.mjs} +37 -36
  192. package/dist/{tax-region-tax-override-edit-OEQOEE6I.mjs → tax-region-tax-override-edit-HVZRD44G.mjs} +36 -35
  193. package/dist/{user-detail-DFZPKHG2.mjs → user-detail-YTVBPRH5.mjs} +1 -1
  194. package/dist/{user-invite-QK3ZCSGG.mjs → user-invite-FQNKJKMD.mjs} +4 -4
  195. package/dist/{user-list-RH43CTBN.mjs → user-list-73SJSKYT.mjs} +6 -6
  196. package/dist/{user-metadata-BQKW4WAU.mjs → user-metadata-33W3JSHN.mjs} +10 -10
  197. package/dist/{workflow-execution-detail-D5QUZFTV.mjs → workflow-execution-detail-SHEXD5OL.mjs} +10 -10
  198. package/dist/{workflow-execution-list-6UTBTVX4.mjs → workflow-execution-list-JOVBPL45.mjs} +4 -4
  199. package/package.json +9 -9
  200. package/src/components/layout/main-layout/main-layout.tsx +7 -5
  201. package/src/components/layout/nav-item/nav-item.tsx +4 -14
  202. package/src/dashboard-app/dashboard-app.tsx +0 -1
  203. package/src/dashboard-app/routes/get-route.map.tsx +64 -12
  204. package/src/dashboard-app/types.ts +0 -1
  205. package/src/hooks/api/index.ts +1 -0
  206. package/src/hooks/api/product-options.tsx +151 -0
  207. package/src/hooks/api/products.tsx +23 -63
  208. package/src/hooks/table/columns/use-product-option-table-columns.tsx +43 -0
  209. package/src/hooks/table/filters/index.ts +1 -0
  210. package/src/hooks/table/filters/use-product-option-table-filters.tsx +33 -0
  211. package/src/hooks/table/query/use-product-option-table-query.tsx +34 -0
  212. package/src/i18n/languages.ts +16 -23
  213. package/src/i18n/translations/$schema.json +176 -5
  214. package/src/i18n/translations/en.json +51 -4
  215. package/src/i18n/translations/index.ts +0 -4
  216. package/src/routes/product-options/common/hooks/use-delete-product-option-action.tsx +41 -0
  217. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-details.tsx +71 -0
  218. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-form.tsx +192 -0
  219. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-organize.tsx +77 -0
  220. package/src/routes/product-options/product-option-create/components/create-product-option-form/index.ts +1 -0
  221. package/src/routes/product-options/product-option-create/components/create-product-option-form/schema.ts +15 -0
  222. package/src/routes/product-options/product-option-create/index.ts +1 -0
  223. package/src/routes/product-options/product-option-create/product-option-create.tsx +10 -0
  224. package/src/routes/product-options/product-option-detail/breadcrumb.tsx +14 -0
  225. package/src/routes/product-options/product-option-detail/components/product-option-general-section/index.ts +1 -0
  226. package/src/routes/product-options/product-option-detail/components/product-option-general-section/product-option-general-section.tsx +81 -0
  227. package/src/routes/product-options/product-option-detail/components/product-option-product-section/index.ts +1 -0
  228. package/src/routes/product-options/product-option-detail/components/product-option-product-section/product-option-product-section.tsx +74 -0
  229. package/src/routes/product-options/product-option-detail/index.ts +3 -0
  230. package/src/routes/product-options/product-option-detail/loader.ts +17 -0
  231. package/src/routes/product-options/product-option-detail/product-option-detail.tsx +50 -0
  232. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-details.tsx +94 -0
  233. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-form.tsx +116 -0
  234. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-organize.tsx +77 -0
  235. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/index.ts +1 -0
  236. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/schema.ts +13 -0
  237. package/src/routes/product-options/product-option-edit/index.ts +1 -0
  238. package/src/routes/product-options/product-option-edit/product-option-edit.tsx +34 -0
  239. package/src/routes/product-options/product-option-list/components/product-option-list-table/index.ts +1 -0
  240. package/src/routes/product-options/product-option-list/components/product-option-list-table/product-option-list-table.tsx +131 -0
  241. package/src/routes/product-options/product-option-list/index.ts +1 -0
  242. package/src/routes/product-options/product-option-list/product-option-list.tsx +19 -0
  243. package/src/routes/product-options/product-option-metadata/index.ts +1 -0
  244. package/src/routes/product-options/product-option-metadata/product-option-metadata.tsx +27 -0
  245. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +214 -198
  246. package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +4 -7
  247. package/src/routes/products/product-create/constants.ts +1 -0
  248. package/src/routes/products/product-create/utils.ts +6 -1
  249. package/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx +7 -38
  250. package/src/routes/products/product-options-manage/components/product-options-manage-form/index.ts +1 -0
  251. package/src/routes/products/product-options-manage/components/product-options-manage-form/product-options-manage-form.tsx +147 -0
  252. package/src/routes/products/product-options-manage/index.ts +1 -0
  253. package/src/routes/products/product-options-manage/product-options-manage.tsx +35 -0
  254. package/dist/product-create-option-D2636LJL.mjs +0 -145
  255. package/dist/product-edit-option-DYAFZIT2.mjs +0 -150
  256. package/src/i18n/translations/ptPT.json +0 -3219
  257. package/src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx +0 -122
  258. package/src/routes/products/product-create-option/components/create-product-option-form/index.ts +0 -1
  259. package/src/routes/products/product-create-option/index.ts +0 -1
  260. package/src/routes/products/product-create-option/product-create-option.tsx +0 -26
  261. package/src/routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx +0 -123
  262. package/src/routes/products/product-edit-option/components/edit-product-option-form/index.ts +0 -1
  263. package/src/routes/products/product-edit-option/index.ts +0 -1
  264. package/src/routes/products/product-edit-option/product-edit-option.tsx +0 -32
  265. package/dist/{chunk-ELPHCFRW.mjs → chunk-MK4E5XQX.mjs} +3 -3
  266. package/dist/{location-list-W6EHBBE5.mjs → location-list-MVIK73QC.mjs} +1 -1
  267. package/dist/{location-service-zone-shipping-option-edit-27MYKN7R.mjs → location-service-zone-shipping-option-edit-WN4MTZSB.mjs} +3 -3
@@ -0,0 +1,266 @@
1
+ import {
2
+ TextCell
3
+ } from "./chunk-MSDRGCRR.mjs";
4
+ import "./chunk-P3UUX2T6.mjs";
5
+ import {
6
+ useProductOptionTableFilters
7
+ } from "./chunk-IBSMG7AF.mjs";
8
+ import "./chunk-CBSCX7RE.mjs";
9
+ import "./chunk-LT4MVCA7.mjs";
10
+ import "./chunk-LYTIMAIZ.mjs";
11
+ import "./chunk-DLZWPHHO.mjs";
12
+ import "./chunk-A2UMBW3V.mjs";
13
+ import "./chunk-W7625H47.mjs";
14
+ import "./chunk-LSEYENCI.mjs";
15
+ import "./chunk-FA5QNPXE.mjs";
16
+ import {
17
+ SingleColumnPage
18
+ } from "./chunk-GIZFNLKK.mjs";
19
+ import {
20
+ DataTable
21
+ } from "./chunk-GRNWRTT3.mjs";
22
+ import "./chunk-Q33G337Z.mjs";
23
+ import {
24
+ useQueryParams
25
+ } from "./chunk-C76H5USB.mjs";
26
+ import "./chunk-PFKKVLZX.mjs";
27
+ import "./chunk-RM6NY572.mjs";
28
+ import {
29
+ useExtension
30
+ } from "./chunk-C5P5PL3E.mjs";
31
+ import "./chunk-OZPB6JBL.mjs";
32
+ import "./chunk-OC7BQLYI.mjs";
33
+ import "./chunk-S4DMV3ZT.mjs";
34
+ import "./chunk-67ORSRVT.mjs";
35
+ import {
36
+ useDeleteProductOptionLazy,
37
+ useProductOptions
38
+ } from "./chunk-WOFUOGLO.mjs";
39
+ import "./chunk-KOSCMAIC.mjs";
40
+ import "./chunk-WWQZD7WM.mjs";
41
+ import "./chunk-X6DSNTTX.mjs";
42
+ import "./chunk-I6E6CALJ.mjs";
43
+ import "./chunk-QTCZFYFH.mjs";
44
+ import "./chunk-B4GODIOW.mjs";
45
+ import "./chunk-ENV6YVOM.mjs";
46
+ import "./chunk-PIR2H25N.mjs";
47
+ import "./chunk-C5LYZZZ5.mjs";
48
+ import "./chunk-RLY2SL5E.mjs";
49
+ import "./chunk-2ZKVRTBW.mjs";
50
+ import "./chunk-GBKLLUUX.mjs";
51
+ import "./chunk-P5RVJWPK.mjs";
52
+ import "./chunk-F6PXCY3N.mjs";
53
+ import "./chunk-R2G2B47Y.mjs";
54
+ import "./chunk-GRT22PE5.mjs";
55
+ import "./chunk-32IQRUVY.mjs";
56
+ import "./chunk-SBFWPL42.mjs";
57
+ import "./chunk-GVVAVAXG.mjs";
58
+ import "./chunk-7PWZ5GMG.mjs";
59
+ import "./chunk-NGR5XU3K.mjs";
60
+ import "./chunk-KX4P5L3R.mjs";
61
+ import "./chunk-V2LANK5S.mjs";
62
+ import "./chunk-QZ6PT4QV.mjs";
63
+ import "./chunk-QL4XKIVL.mjs";
64
+ import "./chunk-GVPJPLE2.mjs";
65
+ import "./chunk-FXYH54JP.mjs";
66
+ import "./chunk-774WSTCC.mjs";
67
+ import "./chunk-DEQUVHHE.mjs";
68
+ import "./chunk-QZ7TP4HQ.mjs";
69
+
70
+ // src/routes/product-options/product-option-list/components/product-option-list-table/product-option-list-table.tsx
71
+ import { Container, createDataTableColumnHelper, toast, usePrompt } from "@medusajs/ui";
72
+ import { useTranslation as useTranslation2 } from "react-i18next";
73
+ import { keepPreviousData } from "@tanstack/react-query";
74
+ import { useCallback, useMemo as useMemo2 } from "react";
75
+
76
+ // src/hooks/table/columns/use-product-option-table-columns.tsx
77
+ import { createColumnHelper } from "@tanstack/react-table";
78
+ import { useMemo } from "react";
79
+ import { useTranslation } from "react-i18next";
80
+ import { jsx } from "react/jsx-runtime";
81
+ var columnHelper = createColumnHelper();
82
+ var useProductOptionTableColumns = () => {
83
+ const { t } = useTranslation();
84
+ return useMemo(
85
+ () => [
86
+ columnHelper.accessor("title", {
87
+ header: t("fields.title"),
88
+ cell: ({ getValue }) => /* @__PURE__ */ jsx(TextCell, { text: getValue() })
89
+ }),
90
+ columnHelper.accessor("values", {
91
+ header: t("fields.values"),
92
+ cell: ({ getValue }) => {
93
+ const values = getValue();
94
+ const count = values?.length || 0;
95
+ const displayText = count > 0 ? `${count} ${count === 1 ? "value" : "values"}` : "-";
96
+ return /* @__PURE__ */ jsx(TextCell, { text: displayText });
97
+ }
98
+ }),
99
+ columnHelper.accessor("is_exclusive", {
100
+ header: t("fields.exclusive"),
101
+ cell: ({ getValue }) => {
102
+ const isExclusive = getValue();
103
+ return /* @__PURE__ */ jsx(
104
+ TextCell,
105
+ {
106
+ text: isExclusive ? t("fields.true") : t("fields.false")
107
+ }
108
+ );
109
+ }
110
+ })
111
+ ],
112
+ [t]
113
+ );
114
+ };
115
+
116
+ // src/hooks/table/query/use-product-option-table-query.tsx
117
+ var useProductOptionTableQuery = ({
118
+ prefix,
119
+ pageSize = 20
120
+ }) => {
121
+ const queryObject = useQueryParams(
122
+ ["offset", "q", "order", "created_at", "updated_at", "is_exclusive"],
123
+ prefix
124
+ );
125
+ const { offset, created_at, updated_at, q, order, is_exclusive } = queryObject;
126
+ const searchParams = {
127
+ limit: pageSize,
128
+ offset: offset ? Number(offset) : 0,
129
+ order,
130
+ created_at: created_at ? JSON.parse(created_at) : void 0,
131
+ updated_at: updated_at ? JSON.parse(updated_at) : void 0,
132
+ is_exclusive: is_exclusive === "true" ? true : is_exclusive === "false" ? false : void 0,
133
+ q
134
+ };
135
+ return {
136
+ searchParams,
137
+ raw: queryObject
138
+ };
139
+ };
140
+
141
+ // src/routes/product-options/product-option-list/components/product-option-list-table/product-option-list-table.tsx
142
+ import { useNavigate } from "react-router-dom";
143
+ import { PencilSquare, Trash } from "@medusajs/icons";
144
+ import { jsx as jsx2 } from "react/jsx-runtime";
145
+ var PAGE_SIZE = 20;
146
+ var ProductOptionListTable = () => {
147
+ const { t } = useTranslation2();
148
+ const { searchParams } = useProductOptionTableQuery({
149
+ pageSize: PAGE_SIZE
150
+ });
151
+ const { product_options, count, isError, error, isLoading } = useProductOptions(searchParams, {
152
+ placeholderData: keepPreviousData
153
+ });
154
+ const filters = useProductOptionTableFilters();
155
+ const columns = useColumns();
156
+ if (isError) {
157
+ throw error;
158
+ }
159
+ return /* @__PURE__ */ jsx2(Container, { className: "divide-y p-0", children: /* @__PURE__ */ jsx2(
160
+ DataTable,
161
+ {
162
+ data: product_options,
163
+ columns,
164
+ filters,
165
+ rowCount: count,
166
+ pageSize: PAGE_SIZE,
167
+ getRowId: (row) => row.id,
168
+ heading: t("productOptions.domain"),
169
+ subHeading: t("productOptions.subtitle"),
170
+ emptyState: {
171
+ empty: {
172
+ heading: t("general.noRecordsMessage")
173
+ },
174
+ filtered: {
175
+ heading: t("general.noRecordsMessage"),
176
+ description: t("general.noRecordsMessageFiltered")
177
+ }
178
+ },
179
+ actions: [
180
+ {
181
+ label: t("actions.create"),
182
+ to: "create"
183
+ }
184
+ ],
185
+ isLoading,
186
+ enableSearch: true,
187
+ rowHref: (row) => `/product-options/${row.id}`
188
+ }
189
+ ) });
190
+ };
191
+ var columnHelper2 = createDataTableColumnHelper();
192
+ var useColumns = () => {
193
+ const { t } = useTranslation2();
194
+ const prompt = usePrompt();
195
+ const navigate = useNavigate();
196
+ const base = useProductOptionTableColumns();
197
+ const { mutateAsync } = useDeleteProductOptionLazy();
198
+ const handleDelete = useCallback(
199
+ async (productOption) => {
200
+ const confirm = await prompt({
201
+ title: t("general.areYouSure"),
202
+ description: t("productOptions.delete.confirmation", {
203
+ title: productOption.title
204
+ }),
205
+ confirmText: t("actions.delete"),
206
+ cancelText: t("actions.cancel")
207
+ });
208
+ if (!confirm) {
209
+ return;
210
+ }
211
+ await mutateAsync(productOption.id, {
212
+ onSuccess: () => {
213
+ toast.success(t("productOptions.delete.successToast"));
214
+ },
215
+ onError: (e) => {
216
+ toast.error(e.message);
217
+ }
218
+ });
219
+ },
220
+ [t, prompt, mutateAsync]
221
+ );
222
+ return useMemo2(
223
+ () => [
224
+ ...base,
225
+ columnHelper2.action({
226
+ actions: (ctx) => [
227
+ [
228
+ {
229
+ icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
230
+ label: t("actions.edit"),
231
+ onClick: () => navigate(`/product-options/${ctx.row.original.id}/edit`)
232
+ }
233
+ ],
234
+ [
235
+ {
236
+ icon: /* @__PURE__ */ jsx2(Trash, {}),
237
+ label: t("actions.delete"),
238
+ onClick: () => handleDelete(ctx.row.original)
239
+ }
240
+ ]
241
+ ]
242
+ })
243
+ ],
244
+ [base, handleDelete, navigate, t]
245
+ );
246
+ };
247
+
248
+ // src/routes/product-options/product-option-list/product-option-list.tsx
249
+ import { jsx as jsx3 } from "react/jsx-runtime";
250
+ var ProductOptionList = () => {
251
+ const { getWidgets } = useExtension();
252
+ return /* @__PURE__ */ jsx3(
253
+ SingleColumnPage,
254
+ {
255
+ widgets: {
256
+ after: getWidgets("product_option.list.after"),
257
+ before: getWidgets("product_option.list.before")
258
+ },
259
+ hasOutlet: true,
260
+ children: /* @__PURE__ */ jsx3(ProductOptionListTable, {})
261
+ }
262
+ );
263
+ };
264
+ export {
265
+ ProductOptionList as Component
266
+ };
@@ -0,0 +1,71 @@
1
+ import "./chunk-XRTVFYCW.mjs";
2
+ import {
3
+ MetadataForm
4
+ } from "./chunk-6VRDTPH2.mjs";
5
+ import "./chunk-IUCDCPJU.mjs";
6
+ import "./chunk-6HTZNHPT.mjs";
7
+ import {
8
+ RouteDrawer
9
+ } from "./chunk-AERWK3TJ.mjs";
10
+ import "./chunk-LPEUYMRK.mjs";
11
+ import "./chunk-OC7BQLYI.mjs";
12
+ import "./chunk-S4DMV3ZT.mjs";
13
+ import "./chunk-OBQI23QM.mjs";
14
+ import {
15
+ useProductOption,
16
+ useUpdateProductOption
17
+ } from "./chunk-WOFUOGLO.mjs";
18
+ import "./chunk-KOSCMAIC.mjs";
19
+ import "./chunk-WWQZD7WM.mjs";
20
+ import "./chunk-X6DSNTTX.mjs";
21
+ import "./chunk-I6E6CALJ.mjs";
22
+ import "./chunk-QTCZFYFH.mjs";
23
+ import "./chunk-B4GODIOW.mjs";
24
+ import "./chunk-ENV6YVOM.mjs";
25
+ import "./chunk-PIR2H25N.mjs";
26
+ import "./chunk-C5LYZZZ5.mjs";
27
+ import "./chunk-RLY2SL5E.mjs";
28
+ import "./chunk-2ZKVRTBW.mjs";
29
+ import "./chunk-GBKLLUUX.mjs";
30
+ import "./chunk-P5RVJWPK.mjs";
31
+ import "./chunk-F6PXCY3N.mjs";
32
+ import "./chunk-R2G2B47Y.mjs";
33
+ import "./chunk-GRT22PE5.mjs";
34
+ import "./chunk-32IQRUVY.mjs";
35
+ import "./chunk-SBFWPL42.mjs";
36
+ import "./chunk-GVVAVAXG.mjs";
37
+ import "./chunk-7PWZ5GMG.mjs";
38
+ import "./chunk-NGR5XU3K.mjs";
39
+ import "./chunk-KX4P5L3R.mjs";
40
+ import "./chunk-V2LANK5S.mjs";
41
+ import "./chunk-QZ6PT4QV.mjs";
42
+ import "./chunk-QL4XKIVL.mjs";
43
+ import "./chunk-GVPJPLE2.mjs";
44
+ import "./chunk-FXYH54JP.mjs";
45
+ import "./chunk-774WSTCC.mjs";
46
+ import "./chunk-DEQUVHHE.mjs";
47
+ import "./chunk-QZ7TP4HQ.mjs";
48
+
49
+ // src/routes/product-options/product-option-metadata/product-option-metadata.tsx
50
+ import { useParams } from "react-router-dom";
51
+ import { jsx } from "react/jsx-runtime";
52
+ var ProductOptionMetadata = () => {
53
+ const { id } = useParams();
54
+ const { product_option, isPending, isError, error } = useProductOption(id);
55
+ const { mutateAsync, isPending: isMutating } = useUpdateProductOption(id);
56
+ if (isError) {
57
+ throw error;
58
+ }
59
+ return /* @__PURE__ */ jsx(RouteDrawer, { children: /* @__PURE__ */ jsx(
60
+ MetadataForm,
61
+ {
62
+ isPending,
63
+ isMutating,
64
+ hook: mutateAsync,
65
+ metadata: product_option?.metadata
66
+ }
67
+ ) });
68
+ };
69
+ export {
70
+ ProductOptionMetadata as Component
71
+ };
@@ -0,0 +1,206 @@
1
+ import {
2
+ Combobox
3
+ } from "./chunk-OFN7DIZA.mjs";
4
+ import "./chunk-IUCDCPJU.mjs";
5
+ import {
6
+ KeyboundForm
7
+ } from "./chunk-6HTZNHPT.mjs";
8
+ import {
9
+ RouteDrawer,
10
+ useRouteModal
11
+ } from "./chunk-AERWK3TJ.mjs";
12
+ import {
13
+ PRODUCT_DETAIL_FIELDS
14
+ } from "./chunk-JDA2MYND.mjs";
15
+ import {
16
+ useExtendableForm
17
+ } from "./chunk-ET6EGRW3.mjs";
18
+ import "./chunk-NQIC7ZFS.mjs";
19
+ import "./chunk-ONB3JEHR.mjs";
20
+ import "./chunk-YCDDT44O.mjs";
21
+ import "./chunk-4GQOUCX6.mjs";
22
+ import "./chunk-2VTICXJR.mjs";
23
+ import "./chunk-D3YQN7HV.mjs";
24
+ import "./chunk-PMA2D6IL.mjs";
25
+ import "./chunk-MNXC6Q4F.mjs";
26
+ import "./chunk-DG7J63J2.mjs";
27
+ import "./chunk-RM6NY572.mjs";
28
+ import {
29
+ useExtension
30
+ } from "./chunk-C5P5PL3E.mjs";
31
+ import "./chunk-LPEUYMRK.mjs";
32
+ import "./chunk-ZCARHA6C.mjs";
33
+ import "./chunk-OZPB6JBL.mjs";
34
+ import "./chunk-OC7BQLYI.mjs";
35
+ import "./chunk-S4DMV3ZT.mjs";
36
+ import "./chunk-67ORSRVT.mjs";
37
+ import {
38
+ Form
39
+ } from "./chunk-OBQI23QM.mjs";
40
+ import {
41
+ useProductOptions
42
+ } from "./chunk-WOFUOGLO.mjs";
43
+ import "./chunk-KOSCMAIC.mjs";
44
+ import "./chunk-WWQZD7WM.mjs";
45
+ import "./chunk-X6DSNTTX.mjs";
46
+ import "./chunk-I6E6CALJ.mjs";
47
+ import "./chunk-QTCZFYFH.mjs";
48
+ import "./chunk-B4GODIOW.mjs";
49
+ import "./chunk-ENV6YVOM.mjs";
50
+ import "./chunk-PIR2H25N.mjs";
51
+ import "./chunk-C5LYZZZ5.mjs";
52
+ import "./chunk-RLY2SL5E.mjs";
53
+ import "./chunk-2ZKVRTBW.mjs";
54
+ import "./chunk-GBKLLUUX.mjs";
55
+ import "./chunk-P5RVJWPK.mjs";
56
+ import "./chunk-F6PXCY3N.mjs";
57
+ import "./chunk-R2G2B47Y.mjs";
58
+ import "./chunk-GRT22PE5.mjs";
59
+ import "./chunk-32IQRUVY.mjs";
60
+ import "./chunk-SBFWPL42.mjs";
61
+ import "./chunk-GVVAVAXG.mjs";
62
+ import "./chunk-7PWZ5GMG.mjs";
63
+ import "./chunk-NGR5XU3K.mjs";
64
+ import "./chunk-KX4P5L3R.mjs";
65
+ import "./chunk-V2LANK5S.mjs";
66
+ import "./chunk-QZ6PT4QV.mjs";
67
+ import "./chunk-QL4XKIVL.mjs";
68
+ import {
69
+ useLinkProductOptions,
70
+ useProduct
71
+ } from "./chunk-GVPJPLE2.mjs";
72
+ import "./chunk-FXYH54JP.mjs";
73
+ import "./chunk-774WSTCC.mjs";
74
+ import "./chunk-DEQUVHHE.mjs";
75
+ import "./chunk-QZ7TP4HQ.mjs";
76
+
77
+ // src/routes/products/product-options-manage/product-options-manage.tsx
78
+ import { Heading } from "@medusajs/ui";
79
+ import { useTranslation as useTranslation2 } from "react-i18next";
80
+ import { useParams } from "react-router-dom";
81
+
82
+ // src/routes/products/product-options-manage/components/product-options-manage-form/product-options-manage-form.tsx
83
+ import { Button, toast } from "@medusajs/ui";
84
+ import { useMemo, useState } from "react";
85
+ import { useTranslation } from "react-i18next";
86
+ import * as zod from "zod";
87
+ import { jsx, jsxs } from "react/jsx-runtime";
88
+ var ProductOptionsManageSchema = zod.object({
89
+ option_ids: zod.array(zod.string())
90
+ });
91
+ var ProductOptionsManageForm = ({
92
+ product
93
+ }) => {
94
+ const { t } = useTranslation();
95
+ const { handleSuccess } = useRouteModal();
96
+ const { getFormConfigs } = useExtension();
97
+ const configs = getFormConfigs("product", "edit");
98
+ const { product_options = [], isLoading } = useProductOptions({
99
+ is_exclusive: false
100
+ });
101
+ const productOptionChoices = useMemo(() => {
102
+ return product_options.map((option) => ({
103
+ value: option.id,
104
+ label: option.title
105
+ }));
106
+ }, [product_options]);
107
+ const [selectedOptionIds, setSelectedOptionIds] = useState(
108
+ product.options?.map((opt) => opt.id) || []
109
+ );
110
+ const form = useExtendableForm({
111
+ defaultValues: {
112
+ option_ids: product.options?.map((opt) => opt.id) || []
113
+ },
114
+ schema: ProductOptionsManageSchema,
115
+ configs,
116
+ data: product
117
+ });
118
+ const { mutateAsync, isPending } = useLinkProductOptions(product.id);
119
+ const handleProductOptionSelect = (optionIds) => {
120
+ setSelectedOptionIds(optionIds);
121
+ form.setValue("option_ids", optionIds);
122
+ };
123
+ const handleSubmit = form.handleSubmit(async (data) => {
124
+ const currentOptionIds = product.options?.map((opt) => opt.id) || [];
125
+ const newOptionIds = data.option_ids;
126
+ const optionsToAdd = newOptionIds.filter(
127
+ (id) => !currentOptionIds.includes(id)
128
+ );
129
+ const optionsToRemove = currentOptionIds.filter(
130
+ (id) => !newOptionIds.includes(id)
131
+ );
132
+ await mutateAsync(
133
+ {
134
+ add: optionsToAdd,
135
+ remove: optionsToRemove
136
+ },
137
+ {
138
+ onSuccess: ({ product: product2 }) => {
139
+ toast.success(
140
+ t("products.organization.edit.toasts.success", {
141
+ title: product2.title
142
+ })
143
+ );
144
+ handleSuccess();
145
+ },
146
+ onError: (error) => {
147
+ toast.error(error.message);
148
+ }
149
+ }
150
+ );
151
+ });
152
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { onSubmit: handleSubmit, className: "flex h-full flex-col", children: [
153
+ /* @__PURE__ */ jsx(RouteDrawer.Body, { children: /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col gap-y-4", children: /* @__PURE__ */ jsx(
154
+ Form.Field,
155
+ {
156
+ control: form.control,
157
+ name: "option_ids",
158
+ render: ({ field }) => {
159
+ return /* @__PURE__ */ jsxs(Form.Item, { children: [
160
+ /* @__PURE__ */ jsx(Form.Label, { children: t("products.options.manage.label") }),
161
+ /* @__PURE__ */ jsx(Form.Hint, { children: t("products.options.manage.hint") }),
162
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
163
+ Combobox,
164
+ {
165
+ ...field,
166
+ value: selectedOptionIds,
167
+ onChange: (value) => handleProductOptionSelect(value),
168
+ options: productOptionChoices,
169
+ placeholder: t("products.options.manage.placeholder"),
170
+ disabled: isLoading
171
+ }
172
+ ) }),
173
+ /* @__PURE__ */ jsx(Form.ErrorMessage, {})
174
+ ] });
175
+ }
176
+ }
177
+ ) }) }),
178
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
179
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
180
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: t("actions.save") })
181
+ ] }) })
182
+ ] }) });
183
+ };
184
+
185
+ // src/routes/products/product-options-manage/product-options-manage.tsx
186
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
187
+ var ProductOptionsManage = () => {
188
+ const { id } = useParams();
189
+ const { t } = useTranslation2();
190
+ const { product, isLoading, isError, error } = useProduct(id, {
191
+ fields: PRODUCT_DETAIL_FIELDS
192
+ });
193
+ if (isError) {
194
+ throw error;
195
+ }
196
+ return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
197
+ /* @__PURE__ */ jsxs2(RouteDrawer.Header, { children: [
198
+ /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("products.options.manage.header") }) }),
199
+ /* @__PURE__ */ jsx2(RouteDrawer.Description, { className: "sr-only", children: t("products.options.manage.description") })
200
+ ] }),
201
+ !isLoading && product && /* @__PURE__ */ jsx2(ProductOptionsManageForm, { product })
202
+ ] });
203
+ };
204
+ export {
205
+ ProductOptionsManage as Component
206
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CategoryCombobox
3
- } from "./chunk-NDXL7ZT5.mjs";
3
+ } from "./chunk-TNMXAPPT.mjs";
4
4
  import {
5
5
  useComboboxData
6
6
  } from "./chunk-3TZOFKX2.mjs";
@@ -17,11 +17,11 @@ import {
17
17
  } from "./chunk-AERWK3TJ.mjs";
18
18
  import {
19
19
  PRODUCT_DETAIL_FIELDS
20
- } from "./chunk-MBGEZAIM.mjs";
20
+ } from "./chunk-JDA2MYND.mjs";
21
21
  import {
22
22
  FormExtensionZone,
23
23
  useExtendableForm
24
- } from "./chunk-5IPYLNMF.mjs";
24
+ } from "./chunk-ET6EGRW3.mjs";
25
25
  import "./chunk-NQIC7ZFS.mjs";
26
26
  import "./chunk-ONB3JEHR.mjs";
27
27
  import "./chunk-YCDDT44O.mjs";
@@ -40,32 +40,32 @@ import "./chunk-ZCARHA6C.mjs";
40
40
  import "./chunk-OZPB6JBL.mjs";
41
41
  import "./chunk-OC7BQLYI.mjs";
42
42
  import "./chunk-S4DMV3ZT.mjs";
43
- import "./chunk-SUYYSKCB.mjs";
43
+ import "./chunk-67ORSRVT.mjs";
44
44
  import {
45
45
  Form
46
46
  } from "./chunk-OBQI23QM.mjs";
47
- import "./chunk-KXRW6JRE.mjs";
47
+ import "./chunk-WOFUOGLO.mjs";
48
48
  import "./chunk-KOSCMAIC.mjs";
49
+ import "./chunk-WWQZD7WM.mjs";
49
50
  import "./chunk-X6DSNTTX.mjs";
50
51
  import "./chunk-I6E6CALJ.mjs";
51
- import "./chunk-B4GODIOW.mjs";
52
- import "./chunk-N4N4KGET.mjs";
53
52
  import "./chunk-QTCZFYFH.mjs";
53
+ import "./chunk-B4GODIOW.mjs";
54
54
  import "./chunk-ENV6YVOM.mjs";
55
55
  import "./chunk-PIR2H25N.mjs";
56
56
  import "./chunk-C5LYZZZ5.mjs";
57
57
  import "./chunk-RLY2SL5E.mjs";
58
58
  import "./chunk-2ZKVRTBW.mjs";
59
- import "./chunk-XYHXWLTJ.mjs";
59
+ import "./chunk-GBKLLUUX.mjs";
60
+ import "./chunk-P5RVJWPK.mjs";
60
61
  import "./chunk-F6PXCY3N.mjs";
61
- import "./chunk-IXZVR3HG.mjs";
62
62
  import "./chunk-R2G2B47Y.mjs";
63
63
  import "./chunk-GRT22PE5.mjs";
64
64
  import "./chunk-32IQRUVY.mjs";
65
- import "./chunk-WTK7SR6S.mjs";
66
- import "./chunk-6XWHQ6ON.mjs";
67
- import "./chunk-MQALAB34.mjs";
68
- import "./chunk-OGAZYXOV.mjs";
65
+ import "./chunk-SBFWPL42.mjs";
66
+ import "./chunk-GVVAVAXG.mjs";
67
+ import "./chunk-7PWZ5GMG.mjs";
68
+ import "./chunk-NGR5XU3K.mjs";
69
69
  import "./chunk-KX4P5L3R.mjs";
70
70
  import "./chunk-V2LANK5S.mjs";
71
71
  import "./chunk-QZ6PT4QV.mjs";
@@ -73,7 +73,7 @@ import "./chunk-QL4XKIVL.mjs";
73
73
  import {
74
74
  useProduct,
75
75
  useUpdateProduct
76
- } from "./chunk-4BGVSXZZ.mjs";
76
+ } from "./chunk-GVPJPLE2.mjs";
77
77
  import "./chunk-FXYH54JP.mjs";
78
78
  import "./chunk-774WSTCC.mjs";
79
79
  import {
@@ -31,7 +31,7 @@ import {
31
31
  import {
32
32
  useProduct,
33
33
  useUpdateProductVariantsBatch
34
- } from "./chunk-4BGVSXZZ.mjs";
34
+ } from "./chunk-GVPJPLE2.mjs";
35
35
  import "./chunk-FXYH54JP.mjs";
36
36
  import "./chunk-774WSTCC.mjs";
37
37
  import "./chunk-DEQUVHHE.mjs";
@@ -3,14 +3,14 @@ import {
3
3
  useSalesChannelTableEmptyState,
4
4
  useSalesChannelTableFilters,
5
5
  useSalesChannelTableQuery
6
- } from "./chunk-5IFK2ZTA.mjs";
7
- import "./chunk-2X25XWOW.mjs";
8
- import "./chunk-2GWGNMAA.mjs";
6
+ } from "./chunk-Y2XQE25L.mjs";
7
+ import "./chunk-2D44OO7A.mjs";
9
8
  import {
10
9
  DataTable
11
10
  } from "./chunk-GRNWRTT3.mjs";
11
+ import "./chunk-Q33G337Z.mjs";
12
12
  import "./chunk-C76H5USB.mjs";
13
- import "./chunk-DZWH2RV6.mjs";
13
+ import "./chunk-PFKKVLZX.mjs";
14
14
  import {
15
15
  RouteFocusModal,
16
16
  useRouteModal
@@ -19,16 +19,16 @@ import "./chunk-RM6NY572.mjs";
19
19
  import "./chunk-OZPB6JBL.mjs";
20
20
  import "./chunk-OC7BQLYI.mjs";
21
21
  import "./chunk-S4DMV3ZT.mjs";
22
- import "./chunk-SUYYSKCB.mjs";
22
+ import "./chunk-67ORSRVT.mjs";
23
23
  import "./chunk-OBQI23QM.mjs";
24
24
  import {
25
25
  useSalesChannels
26
- } from "./chunk-OGAZYXOV.mjs";
26
+ } from "./chunk-NGR5XU3K.mjs";
27
27
  import "./chunk-KX4P5L3R.mjs";
28
28
  import {
29
29
  useProduct,
30
30
  useUpdateProduct
31
- } from "./chunk-4BGVSXZZ.mjs";
31
+ } from "./chunk-GVPJPLE2.mjs";
32
32
  import "./chunk-FXYH54JP.mjs";
33
33
  import "./chunk-774WSTCC.mjs";
34
34
  import "./chunk-DEQUVHHE.mjs";