@medusajs/dashboard 2.12.2-snapshot-20251209162938 → 2.12.2-snapshot-20251209184934

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 (228) hide show
  1. package/dist/{add-campaign-promotions-JQKPED4U.mjs → add-campaign-promotions-PHAHMGXP.mjs} +2 -2
  2. package/dist/{adjust-inventory-2MFA656V.mjs → adjust-inventory-I5VYMAI4.mjs} +2 -2
  3. package/dist/{api-key-management-create-ZUVF3SLR.mjs → api-key-management-create-CVRFY4PL.mjs} +2 -2
  4. package/dist/{api-key-management-detail-AWFAZIS3.mjs → api-key-management-detail-APCZDVLI.mjs} +4 -4
  5. package/dist/{api-key-management-edit-42HNUSXL.mjs → api-key-management-edit-JMU3WEPX.mjs} +2 -2
  6. package/dist/{api-key-management-sales-channels-7FVABESO.mjs → api-key-management-sales-channels-4OU5VGIG.mjs} +2 -2
  7. package/dist/app.css +4 -0
  8. package/dist/app.js +5729 -4811
  9. package/dist/app.mjs +4 -4
  10. package/dist/{campaign-budget-edit-6DMZGUCI.mjs → campaign-budget-edit-B5MSE26J.mjs} +2 -2
  11. package/dist/{campaign-configuration-UNFRB5HR.mjs → campaign-configuration-QOE3D2BE.mjs} +2 -2
  12. package/dist/{campaign-create-QXG7PD3S.mjs → campaign-create-FJOECKGT.mjs} +3 -3
  13. package/dist/{campaign-detail-63VVZZRR.mjs → campaign-detail-ALXFJ4HV.mjs} +3 -3
  14. package/dist/{campaign-edit-HN4US7DV.mjs → campaign-edit-K2POQH7M.mjs} +2 -2
  15. package/dist/{categories-metadata-MWCZ2DYL.mjs → categories-metadata-JQP6TFX3.mjs} +6 -6
  16. package/dist/{category-create-FFIBWXAH.mjs → category-create-L2KJCHPO.mjs} +2 -2
  17. package/dist/{category-detail-XL6NRY6P.mjs → category-detail-VGMUHRD2.mjs} +22 -6
  18. package/dist/{category-edit-74MZ6TXN.mjs → category-edit-U6SLZSAX.mjs} +2 -2
  19. package/dist/{category-list-AH2EGTI7.mjs → category-list-W7JW4PWA.mjs} +16 -1
  20. package/dist/{category-organize-B6EFBFKB.mjs → category-organize-LLSVAO3U.mjs} +2 -2
  21. package/dist/{category-products-STYU4DUG.mjs → category-products-26UAVYOO.mjs} +6 -6
  22. package/dist/{chunk-JUVGXLY5.mjs → chunk-3ESSTIV2.mjs} +187 -12
  23. package/dist/chunk-4Y2NYEXF.mjs +0 -0
  24. package/dist/{chunk-Q6MSICBU.mjs → chunk-6GLZIACV.mjs} +1 -1
  25. package/dist/{chunk-4G2UHUXX.mjs → chunk-7GJ5T4R3.mjs} +2 -2
  26. package/dist/{chunk-Q6ULXDU6.mjs → chunk-AE6R7KDB.mjs} +230 -180
  27. package/dist/{chunk-YV4ANEZF.mjs → chunk-AFXODJBA.mjs} +1 -1
  28. package/dist/{chunk-4YAPXPLM.mjs → chunk-ATP7TOOL.mjs} +1 -1
  29. package/dist/{chunk-3YPRDSZ6.mjs → chunk-BZKI5J2M.mjs} +1 -1
  30. package/dist/{chunk-UM4OIJZ3.mjs → chunk-CFQNWTZV.mjs} +1 -1
  31. package/dist/{chunk-42OOM4DJ.mjs → chunk-D6UW7URG.mjs} +23 -6
  32. package/dist/{chunk-AMOGGDOW.mjs → chunk-DCYB22MH.mjs} +1 -1
  33. package/dist/{chunk-EQTBJSBZ.mjs → chunk-F5I264Q3.mjs} +3 -0
  34. package/dist/{chunk-CZFLKMYE.mjs → chunk-HPPR6PXK.mjs} +1 -1
  35. package/dist/{chunk-HWKLNKOY.mjs → chunk-I6C52ARQ.mjs} +1 -1
  36. package/dist/chunk-JQBWAJQZ.mjs +0 -0
  37. package/dist/{chunk-LHNU4DYZ.mjs → chunk-K43NZTDO.mjs} +2 -2
  38. package/dist/{chunk-KF7ZWW4K.mjs → chunk-LCEKY54O.mjs} +2 -2
  39. package/dist/{chunk-PNPT4W2F.mjs → chunk-MSBISMBI.mjs} +1 -1
  40. package/dist/{chunk-D4J3CEWH.mjs → chunk-N3SAXQVR.mjs} +2 -2
  41. package/dist/{chunk-UKECZ5PA.mjs → chunk-PS5T2R6J.mjs} +3 -3
  42. package/dist/{chunk-XTQ7UFA3.mjs → chunk-R2EBIESZ.mjs} +1 -1
  43. package/dist/{chunk-25UWYEJX.mjs → chunk-RKUXD6IZ.mjs} +1 -1
  44. package/dist/{chunk-EXDBX4YX.mjs → chunk-UEJOY5PF.mjs} +3 -3
  45. package/dist/{chunk-XXBP2Z5M.mjs → chunk-WVA4O7QS.mjs} +1 -1
  46. package/dist/{chunk-L4NOVTH5.mjs → chunk-YIOBBZUB.mjs} +2 -2
  47. package/dist/{collection-add-products-ESZEWJ46.mjs → collection-add-products-42BUUEGQ.mjs} +6 -6
  48. package/dist/{collection-create-DCRW344Z.mjs → collection-create-4JX4YE47.mjs} +2 -2
  49. package/dist/{collection-detail-K6IVWLIL.mjs → collection-detail-JLSDQPJA.mjs} +20 -5
  50. package/dist/{collection-edit-UNFEW6HT.mjs → collection-edit-MXL35GQQ.mjs} +2 -2
  51. package/dist/{collection-list-BL7A7SEI.mjs → collection-list-CSUDRQPF.mjs} +20 -5
  52. package/dist/{collection-metadata-4EYMP7BJ.mjs → collection-metadata-NHI7Q5PP.mjs} +6 -6
  53. package/dist/{customer-create-XCLZENJS.mjs → customer-create-IA56MXE6.mjs} +2 -2
  54. package/dist/{customer-create-address-4HZUIAM7.mjs → customer-create-address-27M25HTO.mjs} +2 -2
  55. package/dist/{customer-detail-KAS23VQF.mjs → customer-detail-TQBDVGSS.mjs} +3 -3
  56. package/dist/{customer-edit-BW5GVTQI.mjs → customer-edit-XQ5NWIVX.mjs} +2 -2
  57. package/dist/{customer-group-add-customers-HUGHHMU6.mjs → customer-group-add-customers-FRJP6RCY.mjs} +2 -2
  58. package/dist/{customer-group-create-6YV7W6TI.mjs → customer-group-create-RY4FVEIW.mjs} +2 -2
  59. package/dist/{customer-group-detail-NDATWX3X.mjs → customer-group-detail-VZ2LCJTM.mjs} +3 -3
  60. package/dist/{customer-group-edit-7NXU34BQ.mjs → customer-group-edit-MQWARIQZ.mjs} +2 -2
  61. package/dist/{customer-group-list-IASP3QHT.mjs → customer-group-list-TMPPZ5UL.mjs} +3 -3
  62. package/dist/{customer-group-metadata-WK2BGEGO.mjs → customer-group-metadata-JQJRLLXG.mjs} +3 -3
  63. package/dist/{customer-metadata-ZUWCUTM7.mjs → customer-metadata-HN2DYD5I.mjs} +3 -3
  64. package/dist/{customers-add-customer-group-UCCFXRXX.mjs → customers-add-customer-group-U6N2EYQP.mjs} +5 -5
  65. package/dist/{edit-inventory-item-Y5W6VTHJ.mjs → edit-inventory-item-RATTNP2Y.mjs} +2 -2
  66. package/dist/{edit-inventory-item-attributes-NAAZDFEJ.mjs → edit-inventory-item-attributes-JHH5GSNL.mjs} +2 -2
  67. package/dist/{edit-reservation-2UD4RZJX.mjs → edit-reservation-UZCSNLHY.mjs} +2 -2
  68. package/dist/{edit-rules-P5A2TLLU.mjs → edit-rules-7TPOBXFZ.mjs} +5 -5
  69. package/dist/en.json +12 -0
  70. package/dist/{inventory-create-KXFY3TQL.mjs → inventory-create-2Y5QC3OA.mjs} +6 -6
  71. package/dist/{inventory-detail-ZAZCDL6E.mjs → inventory-detail-ZQCVV4RJ.mjs} +3 -3
  72. package/dist/{inventory-metadata-4HGPMO4B.mjs → inventory-metadata-UVG65D5W.mjs} +6 -6
  73. package/dist/{inventory-stock-KFPSSUND.mjs → inventory-stock-2ERQRZLC.mjs} +7 -7
  74. package/dist/{invite-VKHAAF4Z.mjs → invite-WISVECE2.mjs} +3 -2
  75. package/dist/{location-create-RPLEXUZR.mjs → location-create-WZ43K3W7.mjs} +2 -2
  76. package/dist/{location-detail-YFDGVGAX.mjs → location-detail-SFDVGAXL.mjs} +7 -5
  77. package/dist/{location-edit-L4ISEQHX.mjs → location-edit-VCS7GVWQ.mjs} +2 -2
  78. package/dist/{location-fulfillment-providers-EGPKJDEL.mjs → location-fulfillment-providers-P6H2RGA5.mjs} +6 -6
  79. package/dist/{location-list-Z42ZYHUF.mjs → location-list-UK3WRDL5.mjs} +3 -2
  80. package/dist/{location-sales-channels-YMABMECM.mjs → location-sales-channels-NKNM5TQK.mjs} +2 -2
  81. package/dist/{location-service-zone-create-NSMZCD5N.mjs → location-service-zone-create-3FWF3DG5.mjs} +3 -3
  82. package/dist/{location-service-zone-edit-6OUAFEZD.mjs → location-service-zone-edit-KHHMSPXD.mjs} +2 -2
  83. package/dist/{location-service-zone-manage-areas-SEC6LKCZ.mjs → location-service-zone-manage-areas-YFEAZUUN.mjs} +3 -3
  84. package/dist/{location-service-zone-shipping-option-create-LEPP6ZKF.mjs → location-service-zone-shipping-option-create-5DDMRKOC.mjs} +7 -7
  85. package/dist/{location-service-zone-shipping-option-edit-QS6HTWST.mjs → location-service-zone-shipping-option-edit-QCURIIGL.mjs} +2 -2
  86. package/dist/{location-service-zone-shipping-option-pricing-23QLNSBT.mjs → location-service-zone-shipping-option-pricing-UPEPQWLW.mjs} +4 -4
  87. package/dist/{login-IQH2HKVZ.mjs → login-7SC4ZVX5.mjs} +6 -5
  88. package/dist/{manage-locations-JD6FSBOT.mjs → manage-locations-MLNMPQ5I.mjs} +2 -2
  89. package/dist/{order-allocate-items-3DDI4V3W.mjs → order-allocate-items-I5KMPZY5.mjs} +2 -2
  90. package/dist/{order-create-claim-WHQYED4S.mjs → order-create-claim-RNAQKT2N.mjs} +5 -5
  91. package/dist/{order-create-edit-RAWEHXCU.mjs → order-create-edit-SNNGAEC3.mjs} +5 -5
  92. package/dist/{order-create-exchange-P73XCSR7.mjs → order-create-exchange-OGI2AOM3.mjs} +5 -5
  93. package/dist/{order-create-fulfillment-YOL4SA4B.mjs → order-create-fulfillment-O77TLXZZ.mjs} +5 -5
  94. package/dist/{order-create-refund-NMP4UN7F.mjs → order-create-refund-TA6UIOZ2.mjs} +5 -5
  95. package/dist/{order-create-return-QGXWSPMP.mjs → order-create-return-LTGYASZZ.mjs} +2 -2
  96. package/dist/{order-create-shipment-UTNVNIGA.mjs → order-create-shipment-6WZM3GL3.mjs} +5 -5
  97. package/dist/{order-detail-4EFWM3R4.mjs → order-detail-6E3BT4AZ.mjs} +3 -3
  98. package/dist/{order-edit-billing-address-WBSP4RAG.mjs → order-edit-billing-address-6BPGH6UU.mjs} +5 -5
  99. package/dist/{order-edit-email-CBAUBHW7.mjs → order-edit-email-WK6ROFAD.mjs} +5 -5
  100. package/dist/{order-edit-shipping-address-2TEO4ZRQ.mjs → order-edit-shipping-address-4V6MN24B.mjs} +5 -5
  101. package/dist/{order-metadata-66OZ5ZMN.mjs → order-metadata-LEMDXDSV.mjs} +6 -6
  102. package/dist/{order-receive-return-2LQFBB4G.mjs → order-receive-return-Q65ZRAPJ.mjs} +5 -5
  103. package/dist/{order-request-transfer-IH3PQCCL.mjs → order-request-transfer-KODTTNE7.mjs} +5 -5
  104. package/dist/{price-list-configuration-OLIGCEN5.mjs → price-list-configuration-RDE5YPJK.mjs} +3 -3
  105. package/dist/{price-list-create-3DCACAZ4.mjs → price-list-create-GFB6ASPT.mjs} +9 -9
  106. package/dist/{price-list-detail-2IW4SDOL.mjs → price-list-detail-VG7YTBLM.mjs} +4 -4
  107. package/dist/{price-list-edit-B3LQZSW6.mjs → price-list-edit-LDF52VQU.mjs} +2 -2
  108. package/dist/{price-list-prices-add-B5LQAR7J.mjs → price-list-prices-add-4QGLHLRI.mjs} +8 -8
  109. package/dist/{price-list-prices-edit-MAR2T4LM.mjs → price-list-prices-edit-PROYTJF5.mjs} +4 -4
  110. package/dist/{product-attributes-DY4HDYTW.mjs → product-attributes-ADDY3FXA.mjs} +6 -6
  111. package/dist/{product-create-EMK2FPWY.mjs → product-create-FZOWZNUP.mjs} +7 -7
  112. package/dist/{product-create-option-GEGQNSMQ.mjs → product-create-option-UMZKRNTC.mjs} +2 -2
  113. package/dist/{product-create-variant-UHUBSUIV.mjs → product-create-variant-TXLZHYFS.mjs} +6 -6
  114. package/dist/{product-detail-M3PFNUX7.mjs → product-detail-VXKYKOMR.mjs} +52 -10
  115. package/dist/{product-edit-ULKEZHDA.mjs → product-edit-52CPZNCH.mjs} +6 -6
  116. package/dist/{product-edit-option-HBIOBQTS.mjs → product-edit-option-ZMTSLRG5.mjs} +2 -2
  117. package/dist/{product-export-X7MNQLBY.mjs → product-export-ZMWNVJL7.mjs} +6 -6
  118. package/dist/{product-image-variants-edit-RR5RXMSX.mjs → product-image-variants-edit-OB4NVQKS.mjs} +5 -5
  119. package/dist/{product-import-OJWU5AHL.mjs → product-import-X7YB4W4N.mjs} +5 -5
  120. package/dist/{product-list-FAVJ2A46.mjs → product-list-TIVHW3ZJ.mjs} +17 -5
  121. package/dist/{product-media-EGK66SRX.mjs → product-media-ULNJ7JJY.mjs} +2 -2
  122. package/dist/{product-metadata-VRLBFMKG.mjs → product-metadata-DPMEFUWJ.mjs} +6 -6
  123. package/dist/{product-organization-4PH2ZOSM.mjs → product-organization-3RJVV3K2.mjs} +6 -6
  124. package/dist/{product-prices-WQDE4XYT.mjs → product-prices-OO7OYVO6.mjs} +3 -3
  125. package/dist/{product-sales-channels-ZICOOOKY.mjs → product-sales-channels-2PN4L7II.mjs} +2 -2
  126. package/dist/{product-shipping-profile-KIDRTPWA.mjs → product-shipping-profile-45XXB7FM.mjs} +2 -2
  127. package/dist/{product-stock-EVY7L4ID.mjs → product-stock-45QDRJSR.mjs} +7 -7
  128. package/dist/{product-tag-create-UOQUAMYT.mjs → product-tag-create-L4Y3ZJVU.mjs} +5 -5
  129. package/dist/{product-tag-detail-L2J3IXMC.mjs → product-tag-detail-IE3W2UVN.mjs} +21 -6
  130. package/dist/{product-tag-edit-AKATEM3L.mjs → product-tag-edit-OHJGEEDL.mjs} +5 -5
  131. package/dist/{product-tag-list-FUQN7YF5.mjs → product-tag-list-QWNKVQAP.mjs} +21 -6
  132. package/dist/{product-tag-metadata-UEOSDTSK.mjs → product-tag-metadata-PCA3HTLU.mjs} +6 -6
  133. package/dist/{product-type-create-HBDROTGB.mjs → product-type-create-KHSNCQCV.mjs} +2 -2
  134. package/dist/{product-type-detail-2KUITRE3.mjs → product-type-detail-XZH6HETD.mjs} +20 -5
  135. package/dist/{product-type-edit-H3JCMVRV.mjs → product-type-edit-3LRBWZ3S.mjs} +2 -2
  136. package/dist/{product-type-list-QX7QC6RI.mjs → product-type-list-XU6DADMO.mjs} +16 -1
  137. package/dist/{product-type-metadata-7E66UACZ.mjs → product-type-metadata-5BPLWPOK.mjs} +6 -6
  138. package/dist/{product-variant-detail-JHH3ICCS.mjs → product-variant-detail-7MIRJILL.mjs} +21 -5
  139. package/dist/{product-variant-edit-IIT3QIHD.mjs → product-variant-edit-JWKDUIEU.mjs} +5 -5
  140. package/dist/{product-variant-manage-inventory-items-BLHCH6QD.mjs → product-variant-manage-inventory-items-OGM64KYP.mjs} +2 -2
  141. package/dist/{product-variant-media-KLSUISGH.mjs → product-variant-media-C3KCFODU.mjs} +2 -2
  142. package/dist/{product-variant-metadata-UXHU6PFJ.mjs → product-variant-metadata-3CZ67ORB.mjs} +6 -6
  143. package/dist/{profile-edit-5EEKOEO5.mjs → profile-edit-YZCUGEXF.mjs} +2 -2
  144. package/dist/{promotion-add-campaign-JRTM7WBR.mjs → promotion-add-campaign-DO67QK6M.mjs} +3 -3
  145. package/dist/{promotion-create-KPDZWJWC.mjs → promotion-create-MXMWVA5U.mjs} +7 -7
  146. package/dist/{promotion-detail-SQARSSGK.mjs → promotion-detail-TZIERYRJ.mjs} +3 -3
  147. package/dist/{promotion-edit-details-AREFQ6O5.mjs → promotion-edit-details-6BSOOWQN.mjs} +2 -2
  148. package/dist/{refund-reason-create-IPZKKRQM.mjs → refund-reason-create-FUW7HCCF.mjs} +5 -5
  149. package/dist/{refund-reason-edit-LB66UGH7.mjs → refund-reason-edit-N3PKOFRF.mjs} +5 -5
  150. package/dist/{refund-reason-list-GOKBW63P.mjs → refund-reason-list-O5ZXIXE5.mjs} +3 -3
  151. package/dist/{region-add-countries-AFWXMQ6W.mjs → region-add-countries-7U4J5RW6.mjs} +2 -2
  152. package/dist/{region-create-YC4VZ4AS.mjs → region-create-IUGX33M5.mjs} +2 -2
  153. package/dist/{region-edit-5GO25GDF.mjs → region-edit-WAU347DP.mjs} +2 -2
  154. package/dist/{region-metadata-S7BUDXPD.mjs → region-metadata-IADU5YNP.mjs} +6 -6
  155. package/dist/{reservation-create-Z2SUMBGT.mjs → reservation-create-C6HTEF3R.mjs} +2 -2
  156. package/dist/{reservation-detail-ZL4WMT4A.mjs → reservation-detail-RLP2F23R.mjs} +3 -3
  157. package/dist/{reservation-metadata-QVEVN2FO.mjs → reservation-metadata-2PRGO5QF.mjs} +6 -6
  158. package/dist/{reset-password-5TAYQEUV.mjs → reset-password-XKX43KUT.mjs} +3 -2
  159. package/dist/{return-reason-create-NXWDC6AC.mjs → return-reason-create-HM54WRJY.mjs} +2 -2
  160. package/dist/{return-reason-edit-M6IKNNKB.mjs → return-reason-edit-VSIRHVQ6.mjs} +2 -2
  161. package/dist/{sales-channel-add-products-LCB33I6H.mjs → sales-channel-add-products-O6RKQB6J.mjs} +6 -6
  162. package/dist/{sales-channel-create-E7BDTPWD.mjs → sales-channel-create-4XLJDVJO.mjs} +2 -2
  163. package/dist/{sales-channel-detail-RUULD6Q7.mjs → sales-channel-detail-25VU2BIX.mjs} +4 -4
  164. package/dist/{sales-channel-edit-HMPA3Y3L.mjs → sales-channel-edit-UZGSXD5X.mjs} +2 -2
  165. package/dist/{sales-channel-list-5TFALQQS.mjs → sales-channel-list-UV44SKO6.mjs} +3 -3
  166. package/dist/{sales-channel-metadata-6WSCB67B.mjs → sales-channel-metadata-JODUF46V.mjs} +6 -6
  167. package/dist/{shipping-option-type-create-IMF4RHSO.mjs → shipping-option-type-create-SDJBL6L4.mjs} +5 -5
  168. package/dist/{shipping-option-type-detail-PHIHWW6G.mjs → shipping-option-type-detail-ZPUV6VUQ.mjs} +4 -4
  169. package/dist/{shipping-option-type-edit-SG4JQZGW.mjs → shipping-option-type-edit-J2LDCKOC.mjs} +5 -5
  170. package/dist/{shipping-option-type-list-RB2EKPWN.mjs → shipping-option-type-list-DZY43TDW.mjs} +4 -4
  171. package/dist/{shipping-profile-create-752TMBBE.mjs → shipping-profile-create-26R64I3Z.mjs} +2 -2
  172. package/dist/{shipping-profile-metadata-M3DVX5KX.mjs → shipping-profile-metadata-ZWYRX3I7.mjs} +6 -6
  173. package/dist/{store-add-currencies-3VMLZ6KB.mjs → store-add-currencies-ZFS3WZHG.mjs} +2 -2
  174. package/dist/{store-add-locales-WAHERXN3.mjs → store-add-locales-ZUQOMLGE.mjs} +4 -4
  175. package/dist/{store-detail-EY2ZQKZO.mjs → store-detail-ZQW7H3CD.mjs} +3 -3
  176. package/dist/{store-edit-EPAHLLKP.mjs → store-edit-AB5CDUTK.mjs} +2 -2
  177. package/dist/{store-metadata-7UPGGK7F.mjs → store-metadata-VJRBOHHB.mjs} +6 -6
  178. package/dist/{tax-region-create-LQZKNYTD.mjs → tax-region-create-X6TI7GS2.mjs} +5 -5
  179. package/dist/{tax-region-detail-AVG3XLVL.mjs → tax-region-detail-RWVU53ZI.mjs} +13 -12
  180. package/dist/{tax-region-edit-XR3ABTNA.mjs → tax-region-edit-EAS5YZS4.mjs} +5 -5
  181. package/dist/{tax-region-list-BXZBUXRJ.mjs → tax-region-list-4MQMCMKY.mjs} +4 -3
  182. package/dist/{tax-region-province-create-5JP3PVID.mjs → tax-region-province-create-GKJ7WMRS.mjs} +2 -2
  183. package/dist/{tax-region-province-detail-I7FF7NBE.mjs → tax-region-province-detail-QAJFG3C4.mjs} +12 -11
  184. package/dist/{tax-region-tax-override-create-H6LWWOPU.mjs → tax-region-tax-override-create-UNHHY3TK.mjs} +7 -7
  185. package/dist/{tax-region-tax-override-edit-SZWBWRCA.mjs → tax-region-tax-override-edit-EEOWMLFA.mjs} +8 -8
  186. package/dist/{tax-region-tax-rate-create-O2SDSXCH.mjs → tax-region-tax-rate-create-MECFGVPL.mjs} +2 -2
  187. package/dist/{tax-region-tax-rate-edit-W62VEVKT.mjs → tax-region-tax-rate-edit-7DYSPYOD.mjs} +2 -2
  188. package/dist/translation-list-5ZOAGLCT.mjs +146 -0
  189. package/dist/translations-edit-I6R5ZNFX.mjs +374 -0
  190. package/dist/{user-edit-LXQCTDGA.mjs → user-edit-ZBB4RMTP.mjs} +2 -2
  191. package/dist/{user-invite-2OKB7SCF.mjs → user-invite-XB635N26.mjs} +2 -2
  192. package/dist/{user-metadata-X36GKJ47.mjs → user-metadata-EQIFAEGE.mjs} +6 -6
  193. package/dist/{workflow-execution-detail-P6H5AUWI.mjs → workflow-execution-detail-XURIJZJ6.mjs} +3 -3
  194. package/package.json +9 -9
  195. package/src/components/common/icon-avatar/icon-avatar.tsx +4 -0
  196. package/src/components/layout/settings-layout/settings-layout.tsx +11 -1
  197. package/src/components/modals/route-focus-modal/route-focus-modal.tsx +8 -3
  198. package/src/components/modals/route-modal-form/route-modal-form.tsx +6 -1
  199. package/src/components/modals/route-modal-provider/route-provider.tsx +16 -4
  200. package/src/dashboard-app/routes/get-route.map.tsx +20 -0
  201. package/src/hooks/api/index.ts +1 -0
  202. package/src/hooks/api/product-variants.tsx +7 -1
  203. package/src/hooks/api/translations.tsx +254 -0
  204. package/src/i18n/translations/$schema.json +36 -0
  205. package/src/i18n/translations/en.json +12 -0
  206. package/src/i18n/translations/es.json +12 -0
  207. package/src/routes/categories/category-detail/components/category-general-section/category-general-section.tsx +16 -1
  208. package/src/routes/categories/category-list/components/category-list-table/category-list-table.tsx +16 -1
  209. package/src/routes/collections/collection-detail/components/collection-general-section/collection-general-section.tsx +16 -1
  210. package/src/routes/collections/collection-list/components/collection-list-table/collection-row-actions.tsx +16 -1
  211. package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/product-tag-general-section.tsx +16 -1
  212. package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/product-tag-list-table.tsx +16 -1
  213. package/src/routes/product-types/product-type-detail/components/product-type-general-section/product-type-general-section.tsx +16 -1
  214. package/src/routes/product-types/product-type-list/components/product-type-list-table/product-table-row-actions.tsx +16 -1
  215. package/src/routes/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx +16 -1
  216. package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +16 -1
  217. package/src/routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +32 -1
  218. package/src/routes/products/product-list/components/product-list-table/product-list-table.tsx +15 -1
  219. package/src/routes/translations/translation-list/index.tsx +1 -0
  220. package/src/routes/translations/translation-list/translation-list.tsx +131 -0
  221. package/src/routes/translations/translations-edit/components/translations-edit-form/index.ts +1 -0
  222. package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +405 -0
  223. package/src/routes/translations/translations-edit/index.ts +1 -0
  224. package/src/routes/translations/translations-edit/translations-edit.tsx +66 -0
  225. package/src/routes/translations/translations-edit/utils/index.ts +1 -0
  226. package/src/routes/translations/translations-edit/utils/reference-label-map.ts +10 -0
  227. /package/dist/{chunk-6WKBBTKM.mjs → chunk-CTUJXJYA.mjs} +0 -0
  228. /package/dist/{chunk-W7SLPIO2.mjs → chunk-IPG3I3J7.mjs} +0 -0
@@ -0,0 +1,405 @@
1
+ import { zodResolver } from "@hookform/resolvers/zod"
2
+ import { AdminStoreLocale, HttpTypes } from "@medusajs/types"
3
+ import { Button, ProgressTabs, toast } from "@medusajs/ui"
4
+ import { ColumnDef } from "@tanstack/react-table"
5
+ import { useMemo, useRef } from "react"
6
+ import { useForm } from "react-hook-form"
7
+ import { useTranslation } from "react-i18next"
8
+ import { z } from "zod"
9
+
10
+ import {
11
+ createDataGridHelper,
12
+ DataGrid,
13
+ } from "../../../../../components/data-grid"
14
+ import {
15
+ RouteFocusModal,
16
+ useRouteModal,
17
+ } from "../../../../../components/modals"
18
+ import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
19
+ import { useBatchTranslations } from "../../../../../hooks/api/translations"
20
+ import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
21
+ import { REFERENCE_LABEL_MAP } from "../../utils"
22
+
23
+ /**
24
+ * Schema for a single locale translation (subrow in DataGrid).
25
+ */
26
+ const LocaleTranslationSchema = z.object({
27
+ id: z.string().nullish(),
28
+ locale_code: z.string(),
29
+ fields: z.record(z.string().optional()),
30
+ })
31
+ export type LocaleTranslationSchema = z.infer<typeof LocaleTranslationSchema>
32
+
33
+ /**
34
+ * Schema for an entity's translations (parent row in DataGrid).
35
+ * Contains all locale translations for that entity.
36
+ */
37
+ const EntityTranslationsSchema = z.object({
38
+ locales: z.record(LocaleTranslationSchema),
39
+ })
40
+ export type EntityTranslationsSchema = z.infer<typeof EntityTranslationsSchema>
41
+
42
+ /**
43
+ * Form schema
44
+ * Maps each reference_id to their corresponding translations for each locale
45
+ */
46
+ export const TranslationsFormSchema = z.object({
47
+ entities: z.record(EntityTranslationsSchema),
48
+ })
49
+ export type TranslationsFormSchema = z.infer<typeof TranslationsFormSchema>
50
+
51
+ /**
52
+ * Row types for the DataGrid.
53
+ * Parent rows are entities, subrows are locale translations.
54
+ */
55
+ export type TranslationRow = EntityRow | LocaleRow
56
+
57
+ export type EntityRow = {
58
+ _type: "entity"
59
+ reference_id: string
60
+ subRows: LocaleRow[]
61
+ }
62
+
63
+ export type LocaleRow = {
64
+ _type: "locale"
65
+ reference_id: string
66
+ locale_code: string
67
+ locale_name: string
68
+ id?: string
69
+ }
70
+
71
+ export function isEntityRow(row: TranslationRow): row is EntityRow {
72
+ return row._type === "entity"
73
+ }
74
+
75
+ export function isLocaleRow(row: TranslationRow): row is LocaleRow {
76
+ return row._type === "locale"
77
+ }
78
+
79
+ function initTranslationsFormState(
80
+ translations: HttpTypes.AdminTranslation[],
81
+ references: { id: string; [key: string]: string }[],
82
+ availableLocales: AdminStoreLocale[],
83
+ translatableFields: string[]
84
+ ): TranslationsFormSchema {
85
+ const existingMap = new Map<string, HttpTypes.AdminTranslation>()
86
+ for (const t of translations) {
87
+ existingMap.set(`${t.reference_id}:${t.locale_code}`, t)
88
+ }
89
+
90
+ const entitiesTranslationState: Record<string, EntityTranslationsSchema> = {}
91
+
92
+ for (const reference of references) {
93
+ const locales: Record<string, LocaleTranslationSchema> = {}
94
+
95
+ for (const locale of availableLocales) {
96
+ const key = `${reference.id}:${locale.locale_code}`
97
+ const existing = existingMap.get(key)
98
+ const isDefaultLocale = locale.is_default
99
+
100
+ const fields: Record<string, string> = {}
101
+ for (const fieldName of translatableFields) {
102
+ const fieldValue = isDefaultLocale
103
+ ? (existing?.translations?.[fieldName] as string) ??
104
+ reference[fieldName]
105
+ : (existing?.translations?.[fieldName] as string) ?? ""
106
+ fields[fieldName] = fieldValue
107
+ }
108
+
109
+ locales[locale.locale_code] = {
110
+ id: existing?.id ?? null,
111
+ locale_code: locale.locale_code,
112
+ fields,
113
+ }
114
+ }
115
+
116
+ entitiesTranslationState[reference.id] = { locales }
117
+ }
118
+
119
+ return {
120
+ entities: entitiesTranslationState,
121
+ }
122
+ }
123
+
124
+ function buildTranslationRows(
125
+ references: { id: string; [key: string]: string }[],
126
+ availableLocales: AdminStoreLocale[],
127
+ translations: HttpTypes.AdminTranslation[]
128
+ ): TranslationRow[] {
129
+ // Index existing translations by reference_id:locale_code
130
+ const existingMap = new Map<string, HttpTypes.AdminTranslation>()
131
+ for (const t of translations) {
132
+ existingMap.set(`${t.reference_id}:${t.locale_code}`, t)
133
+ }
134
+
135
+ return references.map((reference) => ({
136
+ _type: "entity" as const,
137
+ reference_id: reference.id,
138
+ subRows: availableLocales.map((locale) => {
139
+ const key = `${reference.id}:${locale.locale_code}`
140
+ const existing = existingMap.get(key)
141
+ return {
142
+ _type: "locale" as const,
143
+ reference_id: reference.id,
144
+ locale_code: locale.locale_code,
145
+ locale_name: locale.locale.name,
146
+ id: existing?.id,
147
+ }
148
+ }),
149
+ }))
150
+ }
151
+
152
+ function transformToBatchPayload(
153
+ currentState: TranslationsFormSchema,
154
+ initialState: TranslationsFormSchema,
155
+ entityType: string
156
+ ): Required<HttpTypes.AdminBatchTranslations> {
157
+ const payload: Required<HttpTypes.AdminBatchTranslations> = {
158
+ create: [],
159
+ update: [],
160
+ delete: [],
161
+ }
162
+
163
+ for (const [entityId, entityData] of Object.entries(currentState.entities)) {
164
+ for (const [localeCode, localeTranslations] of Object.entries(
165
+ entityData.locales
166
+ )) {
167
+ const initial = initialState.entities[entityId]?.locales[localeCode]
168
+ const hasContent = Object.values(localeTranslations.fields).some(
169
+ (v) => v !== undefined && v.trim() !== ""
170
+ )
171
+ const hadContent =
172
+ initial &&
173
+ Object.values(initial.fields).some(
174
+ (v) => v !== undefined && v.trim() !== ""
175
+ )
176
+
177
+ if (!localeTranslations.id && hasContent) {
178
+ payload.create.push({
179
+ reference_id: entityId,
180
+ reference: entityType,
181
+ locale_code: localeTranslations.locale_code,
182
+ translations: localeTranslations.fields,
183
+ })
184
+ } else if (localeTranslations.id && hasContent) {
185
+ // UPDATE: Has ID and has content - check if changed
186
+ const hasChanged =
187
+ !initial ||
188
+ JSON.stringify(localeTranslations.fields) !==
189
+ JSON.stringify(initial.fields)
190
+
191
+ if (hasChanged) {
192
+ payload.update.push({
193
+ id: localeTranslations.id,
194
+ translations: localeTranslations.fields,
195
+ })
196
+ }
197
+ } else if (localeTranslations.id && !hasContent && hadContent) {
198
+ payload.delete.push(localeTranslations.id)
199
+ }
200
+ }
201
+ }
202
+
203
+ return payload
204
+ }
205
+
206
+ const columnHelper = createDataGridHelper<
207
+ TranslationRow,
208
+ TranslationsFormSchema
209
+ >()
210
+
211
+ function useTranslationsGridColumns({
212
+ translatableFields,
213
+ }: {
214
+ translatableFields: string[]
215
+ }) {
216
+ const { t } = useTranslation()
217
+
218
+ const columns: ColumnDef<TranslationRow>[] = useMemo(() => {
219
+ return [
220
+ columnHelper.column({
221
+ id: "locale",
222
+ header: t("translations.bulk.mainColumn"),
223
+ cell: (context) => {
224
+ const row = context.row.original
225
+
226
+ if (isEntityRow(row)) {
227
+ return (
228
+ <DataGrid.ReadonlyCell context={context}></DataGrid.ReadonlyCell>
229
+ )
230
+ }
231
+
232
+ return (
233
+ <DataGrid.ReadonlyCell context={context} color="normal">
234
+ <div className="flex h-full w-full items-center gap-x-2 overflow-hidden">
235
+ <span className="truncate">{row.locale_name}</span>
236
+ </div>
237
+ </DataGrid.ReadonlyCell>
238
+ )
239
+ },
240
+ disableHiding: true,
241
+ }),
242
+ ...translatableFields.map((fieldName) =>
243
+ columnHelper.column({
244
+ id: fieldName,
245
+ header: t(`fields.${fieldName}`, { defaultValue: fieldName }),
246
+ cell: (context) => {
247
+ const row = context.row.original
248
+
249
+ if (isEntityRow(row)) {
250
+ return (
251
+ <DataGrid.ReadonlyCell context={context}>
252
+ <span className="text-ui-fg-muted">—</span>
253
+ </DataGrid.ReadonlyCell>
254
+ )
255
+ }
256
+
257
+ return <DataGrid.TextCell context={context} />
258
+ },
259
+ field: (context) => {
260
+ const row = context.row.original
261
+
262
+ if (isEntityRow(row)) {
263
+ return null
264
+ }
265
+
266
+ return `entities.${row.reference_id}.locales.${row.locale_code}.fields.${fieldName}`
267
+ },
268
+ type: "text",
269
+ })
270
+ ),
271
+ ]
272
+ }, [t, translatableFields])
273
+
274
+ return columns
275
+ }
276
+
277
+ type TranslationsEditFormProps = {
278
+ translations: HttpTypes.AdminTranslation[]
279
+ references: { id: string; [key: string]: string }[]
280
+ entityType: string
281
+ availableLocales: AdminStoreLocale[]
282
+ translatableFields: string[]
283
+ }
284
+
285
+ export const TranslationsEditForm = ({
286
+ translations,
287
+ references,
288
+ entityType,
289
+ availableLocales,
290
+ translatableFields,
291
+ }: TranslationsEditFormProps) => {
292
+ const { t } = useTranslation()
293
+ const { handleSuccess, setCloseOnEscape } = useRouteModal()
294
+ const direction = useDocumentDirection()
295
+
296
+ const entities = useMemo(() => references, [references])
297
+
298
+ const initialState = useRef(
299
+ initTranslationsFormState(
300
+ translations,
301
+ entities,
302
+ availableLocales,
303
+ translatableFields
304
+ )
305
+ )
306
+
307
+ const form = useForm<TranslationsFormSchema>({
308
+ resolver: zodResolver(TranslationsFormSchema),
309
+ defaultValues: initialState.current,
310
+ })
311
+
312
+ const rows = useMemo(
313
+ () => buildTranslationRows(entities, availableLocales, translations),
314
+ [entities, availableLocales, translations]
315
+ )
316
+
317
+ const { mutateAsync, isPending } = useBatchTranslations(entityType)
318
+
319
+ const handleSubmit = form.handleSubmit(async (values) => {
320
+ const payload = transformToBatchPayload(
321
+ values,
322
+ initialState.current,
323
+ entityType
324
+ )
325
+
326
+ if (
327
+ payload.create.length === 0 &&
328
+ payload.update.length === 0 &&
329
+ payload.delete.length === 0
330
+ ) {
331
+ toast.info(
332
+ t("translations.noChanges", { defaultValue: "No changes to save" })
333
+ )
334
+ return
335
+ }
336
+
337
+ await mutateAsync(payload, {
338
+ onSuccess: () => {
339
+ toast.success(
340
+ t("translations.edit.successToast", {
341
+ defaultValue: "Translations updated successfully",
342
+ })
343
+ )
344
+ handleSuccess()
345
+ },
346
+ onError: (error) => {
347
+ toast.error(error.message)
348
+ },
349
+ })
350
+ })
351
+
352
+ const columns = useTranslationsGridColumns({ translatableFields })
353
+
354
+ return (
355
+ <RouteFocusModal.Form form={form}>
356
+ <KeyboundForm onSubmit={handleSubmit} className="flex h-full flex-col">
357
+ <ProgressTabs
358
+ dir={direction}
359
+ defaultValue={entityType}
360
+ className="flex h-full flex-col overflow-hidden"
361
+ >
362
+ <RouteFocusModal.Header>
363
+ <div className="-my-2 w-full border-l">
364
+ <ProgressTabs.List className="justify-start-start flex w-full items-center">
365
+ <ProgressTabs.Trigger value={entityType}>
366
+ {REFERENCE_LABEL_MAP[entityType]}
367
+ </ProgressTabs.Trigger>
368
+ </ProgressTabs.List>
369
+ </div>
370
+ </RouteFocusModal.Header>
371
+ <RouteFocusModal.Body className="size-full overflow-hidden">
372
+ <ProgressTabs.Content
373
+ value={entityType}
374
+ className="size-full overflow-y-auto"
375
+ >
376
+ <DataGrid
377
+ columns={columns}
378
+ data={rows}
379
+ getSubRows={(row) => {
380
+ if (isEntityRow(row)) {
381
+ return row.subRows
382
+ }
383
+ }}
384
+ state={form}
385
+ onEditingChange={(editing) => setCloseOnEscape(!editing)}
386
+ />
387
+ </ProgressTabs.Content>
388
+ </RouteFocusModal.Body>
389
+ <RouteFocusModal.Footer>
390
+ <div className="flex items-center justify-end gap-x-2">
391
+ <RouteFocusModal.Close asChild>
392
+ <Button size="small" variant="secondary">
393
+ {t("actions.cancel")}
394
+ </Button>
395
+ </RouteFocusModal.Close>
396
+ <Button size="small" type="submit" isLoading={isPending}>
397
+ {t("actions.save")}
398
+ </Button>
399
+ </div>
400
+ </RouteFocusModal.Footer>
401
+ </ProgressTabs>
402
+ </KeyboundForm>
403
+ </RouteFocusModal.Form>
404
+ )
405
+ }
@@ -0,0 +1 @@
1
+ export { TranslationsEdit as Component } from "./translations-edit"
@@ -0,0 +1,66 @@
1
+ import { useNavigate, useSearchParams } from "react-router-dom"
2
+ import { useReferenceTranslations, useStore } from "../../../hooks/api"
3
+ import { TranslationsEditForm } from "./components/translations-edit-form"
4
+ import { useEffect } from "react"
5
+ import { RouteFocusModal } from "../../../components/modals"
6
+ import { useFeatureFlag } from "../../../providers/feature-flag-provider"
7
+
8
+ export const TranslationsEdit = () => {
9
+ const isTranslationsEnabled = useFeatureFlag("translation")
10
+ const navigate = useNavigate()
11
+ const [searchParams] = useSearchParams()
12
+ const reference = searchParams.get("reference")
13
+ const referenceIdParam = searchParams.getAll("reference_id")
14
+
15
+ useEffect(() => {
16
+ if (!reference || !isTranslationsEnabled) {
17
+ navigate(-1)
18
+ return
19
+ }
20
+ }, [reference, navigate, isTranslationsEnabled])
21
+
22
+ const {
23
+ translations,
24
+ references,
25
+ translatableFields,
26
+ isPending,
27
+ isError,
28
+ error,
29
+ } = useReferenceTranslations(reference!, referenceIdParam, {
30
+ enabled: !!reference,
31
+ })
32
+
33
+ const {
34
+ store,
35
+ isPending: isStorePending,
36
+ isError: isStoreError,
37
+ error: storeError,
38
+ } = useStore()
39
+
40
+ const ready =
41
+ !isPending &&
42
+ !!translations &&
43
+ !!translatableFields &&
44
+ !!references &&
45
+ !isStorePending &&
46
+ !!store
47
+
48
+ if (isError || isStoreError) {
49
+ throw error || storeError
50
+ }
51
+
52
+ return (
53
+ <RouteFocusModal prev={referenceIdParam.length ? -1 : ".."}>
54
+ {ready && (
55
+ <TranslationsEditForm
56
+ translations={translations}
57
+ references={references}
58
+ entityType={reference!}
59
+ availableLocales={store?.supported_locales ?? []}
60
+ // TODO: change this to get it from the entity translation config when we have it
61
+ translatableFields={translatableFields}
62
+ />
63
+ )}
64
+ </RouteFocusModal>
65
+ )
66
+ }
@@ -0,0 +1 @@
1
+ export * from "./reference-label-map"
@@ -0,0 +1,10 @@
1
+ export const REFERENCE_LABEL_MAP: Record<string, string> = {
2
+ product: "Products",
3
+ product_variant: "Product Variants",
4
+ product_category: "Product Categories",
5
+ product_collection: "Product Collections",
6
+ product_type: "Product Types",
7
+ product_tag: "Product Tags",
8
+ product_option: "Product Options",
9
+ product_option_value: "Product Option Values",
10
+ }
File without changes
File without changes