@mercurjs/admin 2.0.0-canary.99 → 2.0.1

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 (362) hide show
  1. package/dist/{add-campaign-promotions-CQDZBX3V.js → add-campaign-promotions-TA7QC32P.js} +6 -6
  2. package/dist/{adjust-inventory-3GPDYI3V.js → adjust-inventory-W4H5F2JA.js} +32 -31
  3. package/dist/{api-key-management-create-GUNLFGNT.js → api-key-management-create-FPBZMDBI.js} +5 -5
  4. package/dist/{api-key-management-detail-4IL3BQJW.js → api-key-management-detail-LMKKDTRJ.js} +33 -32
  5. package/dist/{api-key-management-edit-SIXXFLNP.js → api-key-management-edit-5EM4NJIM.js} +5 -5
  6. package/dist/{api-key-management-list-XLRD4ASE.js → api-key-management-list-MRKJVQMI.js} +5 -5
  7. package/dist/{api-key-management-sales-channels-GCUMV6YA.js → api-key-management-sales-channels-AETOWQYM.js} +5 -5
  8. package/dist/attribute-create-IRJTPQCF.js +996 -0
  9. package/dist/attribute-create-possible-value-RG4VA2DG.js +437 -0
  10. package/dist/attribute-detail-7FLCTP3I.js +457 -0
  11. package/dist/attribute-edit-6YNHG3QV.js +281 -0
  12. package/dist/attribute-edit-possible-value-IBJA53MJ.js +264 -0
  13. package/dist/attribute-edit-ranking-BLMESGR5.js +174 -0
  14. package/dist/attribute-list-C5NS26AD.js +63 -0
  15. package/dist/{campaign-budget-edit-GAP5KUI3.js → campaign-budget-edit-PL7DTWCM.js} +3 -3
  16. package/dist/{campaign-configuration-LTHPZGYC.js → campaign-configuration-D6ROERRH.js} +3 -3
  17. package/dist/{campaign-create-TRNE6L26.js → campaign-create-LABYKFMI.js} +7 -7
  18. package/dist/{campaign-detail-GYMMDRUV.js → campaign-detail-E37P67AC.js} +35 -34
  19. package/dist/{campaign-edit-CRQCVEFT.js → campaign-edit-PMJMUUDW.js} +3 -3
  20. package/dist/{campaign-list-WEKSY62X.js → campaign-list-B42U6XNF.js} +3 -3
  21. package/dist/{categories-metadata-GESU3DEU.js → categories-metadata-34L5C2TK.js} +33 -32
  22. package/dist/{category-create-PSAN6SA2.js → category-create-AMHFSXJI.js} +6 -6
  23. package/dist/{category-detail-67ZTYE5M.js → category-detail-B23F726Q.js} +35 -35
  24. package/dist/{category-edit-QYKE3GAC.js → category-edit-VZL6ROLF.js} +4 -4
  25. package/dist/{category-list-ZRDWHPEI.js → category-list-R66T472I.js} +5 -5
  26. package/dist/{category-organize-D26G234L.js → category-organize-CLCNXQSJ.js} +4 -4
  27. package/dist/{category-products-XMIZ2KRR.js → category-products-2LKOHEWO.js} +34 -34
  28. package/dist/{chunk-I5LLMPI2.js → chunk-22XJUSMM.js} +2 -2
  29. package/dist/{chunk-7OSCNHHQ.js → chunk-25YTS3TI.js} +2 -2
  30. package/dist/{chunk-P52JGPUG.js → chunk-34VX7KOL.js} +4 -4
  31. package/dist/{chunk-X6HEEFUW.js → chunk-3FNX54TD.js} +1 -1
  32. package/dist/{chunk-YAMNPEPW.js → chunk-3MDRW5MA.js} +28 -9
  33. package/dist/{chunk-5N24A4CX.js → chunk-4ESVWDQK.js} +2 -2
  34. package/dist/{chunk-HDUVTTOW.js → chunk-4G5FEKRO.js} +1 -1
  35. package/dist/{chunk-RF7BE47J.js → chunk-4QX7QEWY.js} +9 -9
  36. package/dist/chunk-4ZTZTIIM.js +69 -0
  37. package/dist/{chunk-XFKRBJLK.js → chunk-52BRBQMY.js} +2 -2
  38. package/dist/{chunk-LZO7MWH7.js → chunk-5N6S5K57.js} +2 -2
  39. package/dist/{chunk-EWFOFSF7.js → chunk-5PUHROK4.js} +1 -1
  40. package/dist/{chunk-QUNCQMFH.js → chunk-5VBNFLG2.js} +1 -1
  41. package/dist/{chunk-7ITJ4725.js → chunk-5VMJCLUP.js} +4 -4
  42. package/dist/{chunk-G4MIA23Y.js → chunk-5WTGRSBC.js} +1 -1
  43. package/dist/{chunk-64B6RWZI.js → chunk-5XWE6QZ3.js} +3 -3
  44. package/dist/{chunk-TKSKCH3S.js → chunk-6D5BKKSQ.js} +1 -1
  45. package/dist/{chunk-OT5X3VOQ.js → chunk-6NVEUQSL.js} +1 -1
  46. package/dist/{chunk-7JZMCLD3.js → chunk-6OTK5LAS.js} +5 -5
  47. package/dist/{chunk-ZGEMSYN7.js → chunk-6TFS6ET5.js} +1 -1
  48. package/dist/{chunk-G2N27VIE.js → chunk-76FXHSMH.js} +2 -2
  49. package/dist/{chunk-DPH3FG5H.js → chunk-7IPA3CRG.js} +4 -4
  50. package/dist/{chunk-GYRTURN7.js → chunk-7SJC6BWZ.js} +1 -1
  51. package/dist/{chunk-BYKTBURG.js → chunk-7STT4ZVP.js} +1 -1
  52. package/dist/{chunk-6ERRELWD.js → chunk-A2TQNJZP.js} +11 -11
  53. package/dist/{chunk-QDIPFZLV.js → chunk-AG4ORND4.js} +2 -2
  54. package/dist/{chunk-BBZ6YISG.js → chunk-AVXOG7CE.js} +4 -4
  55. package/dist/{chunk-WBNGBRBK.js → chunk-BA2HXHTW.js} +1 -1
  56. package/dist/{chunk-AJQ6EVLE.js → chunk-BBANQAF4.js} +2 -2
  57. package/dist/{chunk-YMKZS2HK.js → chunk-BE5QWX5N.js} +25 -6
  58. package/dist/{chunk-PJTR2MBS.js → chunk-BMC2HG53.js} +2 -2
  59. package/dist/{chunk-7H2I3TA2.js → chunk-BUI5NC7I.js} +2 -2
  60. package/dist/chunk-C3WE6EFO.js +33 -0
  61. package/dist/{chunk-ZJO4DDOP.js → chunk-CA4XLTI7.js} +2 -2
  62. package/dist/{chunk-J54BZXZX.js → chunk-CBHNHLUZ.js} +2 -2
  63. package/dist/{chunk-KWW4RDRS.js → chunk-CGVHXNWH.js} +2 -2
  64. package/dist/{chunk-7SQW55FI.js → chunk-CMX37MSO.js} +6 -6
  65. package/dist/{chunk-CARSKIPW.js → chunk-DF3OGJAK.js} +1 -1
  66. package/dist/{chunk-4ZIQGDNH.js → chunk-DKA6GR53.js} +1 -1
  67. package/dist/{chunk-6HJINLUB.js → chunk-DOZ3NXES.js} +1 -1
  68. package/dist/{chunk-I6GNV6QA.js → chunk-DTUPDNN3.js} +3 -3
  69. package/dist/{chunk-R55Q5LAH.js → chunk-DYFB2ZZD.js} +1 -1
  70. package/dist/{chunk-TK3XKN2P.js → chunk-EG2Y5Z2K.js} +3 -3
  71. package/dist/{chunk-25DQRKFS.js → chunk-EHQESDH2.js} +1 -1
  72. package/dist/{chunk-PWMB7ITO.js → chunk-EI6JBJYB.js} +3 -3
  73. package/dist/{chunk-4JYZU65L.js → chunk-EVGVH6CU.js} +13 -11
  74. package/dist/{chunk-IUB4C2WJ.js → chunk-F7VTQIU7.js} +7 -7
  75. package/dist/{chunk-VRGXUUPH.js → chunk-FB4JUZFB.js} +4 -4
  76. package/dist/{chunk-L74EVHCU.js → chunk-FMGXDDBU.js} +2 -2
  77. package/dist/{chunk-MO7TNIVQ.js → chunk-FNBKEF54.js} +1 -1
  78. package/dist/{chunk-OSI3M4M2.js → chunk-G4LGZF5F.js} +5 -5
  79. package/dist/{chunk-MZCJZRR6.js → chunk-G5WS77NL.js} +4 -4
  80. package/dist/{chunk-BLHFWBK3.js → chunk-GYKVLGU4.js} +2 -2
  81. package/dist/{chunk-GCEOEV6P.js → chunk-HAFZQK53.js} +1 -1
  82. package/dist/{chunk-JJ4XUGHZ.js → chunk-HAZURA7S.js} +2 -2
  83. package/dist/{chunk-GVXAFQDF.js → chunk-HHEQZTPC.js} +2 -2
  84. package/dist/{chunk-U5QDMLTR.js → chunk-HS322YUO.js} +3 -3
  85. package/dist/{chunk-XBFWFGZH.js → chunk-HVLPRHZS.js} +2 -2
  86. package/dist/{chunk-LGVVX4I6.js → chunk-IAT6UDKU.js} +1 -1
  87. package/dist/{chunk-PYF5EER5.js → chunk-IJWG755C.js} +1 -1
  88. package/dist/chunk-J24SOKSP.js +457 -0
  89. package/dist/{chunk-HGHJRKUC.js → chunk-J555HFHV.js} +2 -2
  90. package/dist/{chunk-O4LSCHTC.js → chunk-JSBQOQXC.js} +1 -1
  91. package/dist/{chunk-EEOEIXDA.js → chunk-K4BGK3CO.js} +3 -3
  92. package/dist/{chunk-XSEF6KRY.js → chunk-KA3VYXNA.js} +1 -1
  93. package/dist/{chunk-EF47ASFU.js → chunk-KERA6OZN.js} +1 -1
  94. package/dist/{chunk-7KMDLRLG.js → chunk-KMK4YAS2.js} +1 -1
  95. package/dist/{chunk-EJY35WBK.js → chunk-LC6TM5OT.js} +2 -2
  96. package/dist/chunk-LO7XX5M7.js +6 -0
  97. package/dist/{chunk-O5ZOACVV.js → chunk-LW57KBYK.js} +2 -2
  98. package/dist/chunk-M3YP3NX4.js +259 -0
  99. package/dist/{chunk-AZVAL5E5.js → chunk-M4VLYKT5.js} +2 -2
  100. package/dist/{chunk-VEW7PQ3X.js → chunk-MCEEC3VH.js} +3 -3
  101. package/dist/{chunk-R325CPYC.js → chunk-MFL2TZ3W.js} +1 -1
  102. package/dist/{chunk-WW7VLWKJ.js → chunk-MMTCBVUV.js} +4 -4
  103. package/dist/{chunk-RHYS2TFP.js → chunk-MRFW7VTW.js} +2 -2
  104. package/dist/{chunk-QUTZUW55.js → chunk-N4JU7GWK.js} +2 -2
  105. package/dist/{chunk-MMDRMNPE.js → chunk-N7QGYSFB.js} +4 -4
  106. package/dist/{chunk-S3L6CIN2.js → chunk-NDPTTHBH.js} +2 -2
  107. package/dist/{chunk-NQ2RDSI3.js → chunk-NJKJAYV2.js} +2 -2
  108. package/dist/{chunk-TKEAOWBZ.js → chunk-NNI6QKKZ.js} +29 -3
  109. package/dist/chunk-NRKVFULI.js +886 -0
  110. package/dist/{chunk-J5SOBS7K.js → chunk-NYWECWZJ.js} +5 -5
  111. package/dist/{chunk-Q6GUA5VE.js → chunk-O4STPJR2.js} +2 -2
  112. package/dist/{chunk-YDAJI7WF.js → chunk-O7UECTZO.js} +1 -1
  113. package/dist/{chunk-VXW3BCN2.js → chunk-OFKUNYQJ.js} +1 -1
  114. package/dist/{chunk-V6LO4BXB.js → chunk-OV7R2AH5.js} +58 -58
  115. package/dist/{chunk-CJQRZEZU.js → chunk-OW6XTJ33.js} +3 -3
  116. package/dist/{chunk-JAJMMPOF.js → chunk-PBMB2LY5.js} +3 -3
  117. package/dist/{chunk-THYWJQI4.js → chunk-PLDGQ5PO.js} +3 -3
  118. package/dist/{chunk-SJQ4QAFK.js → chunk-PQGIRNRF.js} +6 -6
  119. package/dist/{chunk-5HZT54X7.js → chunk-QG3EYUDB.js} +3 -3
  120. package/dist/{chunk-SDNGZDNK.js → chunk-QIZUNM6F.js} +5 -5
  121. package/dist/{chunk-3GCRM6UM.js → chunk-QLJKQS6P.js} +6 -6
  122. package/dist/{chunk-KHXRL3BH.js → chunk-R2KXIBCX.js} +1 -1
  123. package/dist/{chunk-QVLL4MKH.js → chunk-R74OHYTB.js} +3 -3
  124. package/dist/{chunk-ZNA2XOGX.js → chunk-RIC6PMBR.js} +7 -7
  125. package/dist/{chunk-LXZXXOJ3.js → chunk-RIN4CBRB.js} +17 -1
  126. package/dist/{chunk-2TDFXWGC.js → chunk-RRAIAUBR.js} +8 -8
  127. package/dist/chunk-RT6L7JXU.js +33 -0
  128. package/dist/{chunk-7NNA33IY.js → chunk-RVAVU222.js} +9 -9
  129. package/dist/{chunk-TN4TIT7O.js → chunk-S2Q7PO7I.js} +68 -7
  130. package/dist/{chunk-WEVK4TBV.js → chunk-SDPR7PGR.js} +1 -1
  131. package/dist/{chunk-SBH4E5NY.js → chunk-SDQ6V2QY.js} +3 -3
  132. package/dist/{chunk-5LI2P5VT.js → chunk-SKV7U4GW.js} +5 -5
  133. package/dist/{chunk-XR2UEF6U.js → chunk-SZVIRQZ2.js} +4 -4
  134. package/dist/{chunk-RQQ53CQJ.js → chunk-T7MQFDTF.js} +1 -1
  135. package/dist/{chunk-TKFMOTJK.js → chunk-TBREETGZ.js} +4 -4
  136. package/dist/{chunk-TP7M43SI.js → chunk-TCA3ZYNO.js} +2 -2
  137. package/dist/{chunk-PUQSQBZW.js → chunk-TIMWFAPD.js} +1 -1
  138. package/dist/{chunk-HLL6GLZO.js → chunk-TPPONKYW.js} +3 -3
  139. package/dist/{chunk-77R2QD4O.js → chunk-UBS6VEGB.js} +3 -92
  140. package/dist/{chunk-OZMCKYJL.js → chunk-UBTAADSY.js} +4 -4
  141. package/dist/{chunk-STSW4GDV.js → chunk-UI2KUK3F.js} +2 -2
  142. package/dist/{chunk-FIVW6L2I.js → chunk-UU2RQMXS.js} +1 -1
  143. package/dist/{chunk-N3WRPCPT.js → chunk-UYKWOC5A.js} +1 -1
  144. package/dist/{chunk-JI7HMGMO.js → chunk-VME3CJER.js} +1 -1
  145. package/dist/{chunk-TOUMBTYI.js → chunk-VXPWOEUS.js} +1 -1
  146. package/dist/{chunk-VHCDSNXF.js → chunk-W5UPPL3W.js} +2 -2
  147. package/dist/{chunk-C6OVKRMH.js → chunk-WDASBBB5.js} +1 -1
  148. package/dist/{chunk-FD7OJEGQ.js → chunk-WHLVH4RN.js} +2 -2
  149. package/dist/{chunk-6S72GJRI.js → chunk-WSR2ZXAJ.js} +5 -5
  150. package/dist/{chunk-L7DIEO5B.js → chunk-XDZGOUCR.js} +1 -1
  151. package/dist/{chunk-QLTN2DIY.js → chunk-XIHVSZ6I.js} +1 -1
  152. package/dist/{chunk-A2F5MDPU.js → chunk-XKVXLDSJ.js} +1 -1
  153. package/dist/chunk-XMVTX2EN.js +120 -0
  154. package/dist/{chunk-R4O667NT.js → chunk-XRDP2SYY.js} +1 -1
  155. package/dist/chunk-XZQV2OLD.js +93 -0
  156. package/dist/{chunk-VZEMURY7.js → chunk-YJNCEGX4.js} +2 -2
  157. package/dist/{chunk-YQYGAFCS.js → chunk-YNIIYGL4.js} +2 -2
  158. package/dist/{chunk-OJI3SRZ3.js → chunk-YTPCWCA3.js} +1 -1
  159. package/dist/{chunk-OEDISQ2O.js → chunk-YYTI5JIC.js} +2 -2
  160. package/dist/{chunk-3CKTAFTR.js → chunk-Z5I2Z6L3.js} +50 -33
  161. package/dist/{chunk-V7Y7WBGF.js → chunk-ZCLF2O6X.js} +1 -1
  162. package/dist/{chunk-K6RZE3F7.js → chunk-ZDZYRCVH.js} +1 -1
  163. package/dist/chunk-ZFEGVWHT.js +324 -0
  164. package/dist/{chunk-FIYO3KTR.js → chunk-ZJNRM77Y.js} +4 -4
  165. package/dist/{chunk-JOX3ZSRT.js → chunk-ZLBTDKSI.js} +1 -1
  166. package/dist/{chunk-NYWESQ6J.js → chunk-ZMDE5HEV.js} +221 -18
  167. package/dist/{chunk-BPTVQM72.js → chunk-ZZO3INVE.js} +1440 -1305
  168. package/dist/{collection-add-products-4TTEF6QV.js → collection-add-products-RHIQZ37R.js} +34 -34
  169. package/dist/{collection-create-SD4GKHFC.js → collection-create-EBAELCA2.js} +4 -4
  170. package/dist/{collection-detail-64YVMLBU.js → collection-detail-SJ4ZZLWY.js} +34 -34
  171. package/dist/{collection-edit-Z474HXCJ.js → collection-edit-TGXPOOSX.js} +4 -4
  172. package/dist/{collection-list-OTSGOEBC.js → collection-list-OFZGXVJA.js} +39 -36
  173. package/dist/{collection-metadata-FFHA6CQ3.js → collection-metadata-3CDRKSCP.js} +33 -32
  174. package/dist/{commission-rate-create-7BBUGS2I.js → commission-rate-create-OOVFRTYM.js} +41 -39
  175. package/dist/{commission-rate-detail-FORKXXJY.js → commission-rate-detail-5XFV6XH2.js} +32 -31
  176. package/dist/{commission-rate-edit-SAX2DAND.js → commission-rate-edit-6B4P2GOV.js} +41 -39
  177. package/dist/{commission-rate-list-EESTCCRP.js → commission-rate-list-OLAGFQNJ.js} +3 -3
  178. package/dist/{customer-create-WA4GYGVD.js → customer-create-DT6MYVMQ.js} +3 -3
  179. package/dist/{customer-create-address-YBI4KWWH.js → customer-create-address-VIG65ALU.js} +3 -3
  180. package/dist/{customer-detail-SDE4TDZD.js → customer-detail-Q4K56AZ4.js} +33 -32
  181. package/dist/{customer-edit-TFR6PVJJ.js → customer-edit-MHNLUNUL.js} +3 -3
  182. package/dist/{customer-group-add-customers-77BVWLTN.js → customer-group-add-customers-SI5TTT4S.js} +4 -4
  183. package/dist/{customer-group-create-32UIUO46.js → customer-group-create-W3FV4OEH.js} +3 -3
  184. package/dist/{customer-group-detail-QRY6BHGI.js → customer-group-detail-NSEFUNCF.js} +33 -32
  185. package/dist/{customer-group-edit-HFL7LZZZ.js → customer-group-edit-ZANHQ7RS.js} +3 -3
  186. package/dist/customer-group-list-GCEKCBUE.js +58 -0
  187. package/dist/{customer-group-metadata-FXI3J6DB.js → customer-group-metadata-LXJK3IMS.js} +33 -32
  188. package/dist/{customer-list-CXTUBLCK.js → customer-list-CHRZJTNK.js} +4 -4
  189. package/dist/{customer-metadata-BV4CHHWI.js → customer-metadata-ZZSCYFHY.js} +33 -32
  190. package/dist/{customers-add-customer-group-SUE2KKJR.js → customers-add-customer-group-TIBDJPYF.js} +32 -31
  191. package/dist/{edit-inventory-item-DDRUGVSK.js → edit-inventory-item-Y3CIG6L5.js} +32 -31
  192. package/dist/{edit-inventory-item-attributes-MDL7FSLR.js → edit-inventory-item-attributes-CZNIVWXY.js} +32 -31
  193. package/dist/{edit-reservation-JWABBNJ6.js → edit-reservation-OQCAZUIS.js} +5 -5
  194. package/dist/{edit-rules-ECNFIPUC.js → edit-rules-G7GRUQL6.js} +33 -32
  195. package/dist/index.d.ts +4 -1
  196. package/dist/index.js +347 -263
  197. package/dist/inventory-create-MFCGCJFB.js +57 -0
  198. package/dist/{inventory-detail-OIKNOS5A.js → inventory-detail-6V43ZQDK.js} +32 -31
  199. package/dist/{inventory-list-XSHWCPO4.js → inventory-list-TAJ4T5JG.js} +4 -4
  200. package/dist/{inventory-metadata-MHGDNLXT.js → inventory-metadata-PFXMJTSB.js} +33 -32
  201. package/dist/{inventory-stock-JG5CZWZA.js → inventory-stock-B4FYZAQB.js} +32 -31
  202. package/dist/{invite-25CGHT4W.js → invite-YRARW3RW.js} +3 -3
  203. package/dist/{location-create-G3MNWQWB.js → location-create-GXPH4WZI.js} +3 -3
  204. package/dist/{location-detail-5CGAZMBR.js → location-detail-NOUHQA4M.js} +32 -31
  205. package/dist/{location-edit-UI6AWCZS.js → location-edit-GNKQAXJG.js} +3 -3
  206. package/dist/{location-fulfillment-providers-BA2VMZHX.js → location-fulfillment-providers-A27CQMJN.js} +37 -35
  207. package/dist/location-list-AVCPUKBH.js +54 -0
  208. package/dist/{location-sales-channels-WXBK4EJO.js → location-sales-channels-U3MVWUAT.js} +5 -5
  209. package/dist/{location-service-zone-create-647O67PU.js → location-service-zone-create-E4LW45D7.js} +6 -6
  210. package/dist/{location-service-zone-edit-BUY6HNZM.js → location-service-zone-edit-UIVVQVMW.js} +5 -5
  211. package/dist/{location-service-zone-manage-areas-X2ZGRHHA.js → location-service-zone-manage-areas-F3SOZGVW.js} +6 -6
  212. package/dist/location-service-zone-shipping-option-create-DREWJ7SR.js +58 -0
  213. package/dist/{location-service-zone-shipping-option-edit-IJDU5PTW.js → location-service-zone-shipping-option-edit-3KNW7UBD.js} +4 -4
  214. package/dist/{location-service-zone-shipping-option-pricing-3T7HLKJC.js → location-service-zone-shipping-option-pricing-35SMJ6XP.js} +8 -8
  215. package/dist/{login-WU5VB5LW.js → login-QCYKZCZP.js} +31 -30
  216. package/dist/{manage-locations-IJIPCYAY.js → manage-locations-VIWHIN7B.js} +4 -4
  217. package/dist/{marketplace-add-currencies-RXLEQ6MZ.js → marketplace-add-currencies-Q4EJAXDN.js} +5 -5
  218. package/dist/{marketplace-detail-23KSAJVI.js → marketplace-detail-CYMZCRWM.js} +32 -31
  219. package/dist/{marketplace-edit-XPIEDQYD.js → marketplace-edit-AMRUND2Q.js} +4 -4
  220. package/dist/{marketplace-metadata-5GEWGH2M.js → marketplace-metadata-LYNL3W6L.js} +33 -32
  221. package/dist/{order-allocate-items-GYGER65Z.js → order-allocate-items-AZ3FDELU.js} +6 -6
  222. package/dist/{order-create-claim-RNUFU2MP.js → order-create-claim-HWZI4OEK.js} +35 -34
  223. package/dist/{order-create-edit-DLH76B2Q.js → order-create-edit-VIIAC2AA.js} +33 -32
  224. package/dist/{order-create-exchange-FA27FZU7.js → order-create-exchange-KRGBFSCC.js} +35 -34
  225. package/dist/{order-create-fulfillment-4F5JAUOX.js → order-create-fulfillment-K4LB6U6E.js} +32 -31
  226. package/dist/{order-create-refund-3LCTQXFD.js → order-create-refund-2OCPOAJS.js} +32 -31
  227. package/dist/{order-create-return-EO2C5RAA.js → order-create-return-4PREWHB7.js} +9 -9
  228. package/dist/{order-create-shipment-PIQ43ZSG.js → order-create-shipment-BD3DKSJX.js} +32 -31
  229. package/dist/{order-detail-2U26JNU2.js → order-detail-GETGE7YJ.js} +37 -36
  230. package/dist/{order-edit-billing-address-PRXCLUNR.js → order-edit-billing-address-3GN3QU4Y.js} +33 -32
  231. package/dist/{order-edit-email-GVKVQESG.js → order-edit-email-D6KSNSY4.js} +32 -31
  232. package/dist/{order-edit-shipping-address-UDNHXO2V.js → order-edit-shipping-address-Z7RP4UBB.js} +32 -31
  233. package/dist/{order-list-U2HL7VBX.js → order-list-727TI7BS.js} +9 -8
  234. package/dist/{order-metadata-HPXIR6KI.js → order-metadata-UCAS6KEK.js} +33 -32
  235. package/dist/{order-receive-return-FMM74XYM.js → order-receive-return-YZGUVELT.js} +33 -32
  236. package/dist/{order-request-transfer-SI5PSOKA.js → order-request-transfer-DBXAIXEG.js} +32 -31
  237. package/dist/pages/index.d.ts +65 -20
  238. package/dist/pages/index.js +168 -159
  239. package/dist/{payout-detail-L4VYAP53.js → payout-detail-SQKDY2F6.js} +3 -3
  240. package/dist/{payout-list-4S6MAU4R.js → payout-list-HPMP3CJH.js} +3 -3
  241. package/dist/{price-list-configuration-F2BZC6QX.js → price-list-configuration-XGX6HV4Q.js} +6 -6
  242. package/dist/price-list-create-SJBCYSRX.js +76 -0
  243. package/dist/{price-list-detail-IUJXNM6Y.js → price-list-detail-VA4F6JQJ.js} +35 -35
  244. package/dist/{price-list-edit-CERYYMC5.js → price-list-edit-OYRI7KZD.js} +5 -5
  245. package/dist/{price-list-list-RBD2MEZ5.js → price-list-list-27QDRHNY.js} +6 -6
  246. package/dist/price-list-prices-add-BLORGT25.js +71 -0
  247. package/dist/{price-list-prices-edit-2NYN6WVJ.js → price-list-prices-edit-7WHKIZHY.js} +33 -32
  248. package/dist/{product-attributes-EUDG25XA.js → product-attributes-BM54QUBZ.js} +3 -3
  249. package/dist/product-create-KEJB3U44.js +70 -0
  250. package/dist/{product-create-option-BG2ZKSFN.js → product-create-option-53CW7HXH.js} +3 -3
  251. package/dist/product-create-variant-YZODW67L.js +55 -0
  252. package/dist/{product-detail-F67SLUIA.js → product-detail-Y24FRUWA.js} +33 -32
  253. package/dist/{product-edit-HFWSBQQI.js → product-edit-AY2UVE3V.js} +3 -3
  254. package/dist/{product-edit-option-Y46SNVHN.js → product-edit-option-ULBJKDOE.js} +3 -3
  255. package/dist/{product-export-ABNA6ZTY.js → product-export-4G44DDXA.js} +39 -36
  256. package/dist/{product-import-SQSXBPK5.js → product-import-TIPIYEJJ.js} +33 -32
  257. package/dist/{product-list-NWHRQHVJ.js → product-list-BLFQWHIA.js} +34 -34
  258. package/dist/{product-media-YIQCVDCC.js → product-media-IKMGI2QA.js} +9 -7
  259. package/dist/{product-metadata-2Z5DIXJH.js → product-metadata-SKNZWKWO.js} +33 -32
  260. package/dist/{product-organization-L666C2EQ.js → product-organization-KHZQIBDK.js} +5 -5
  261. package/dist/{product-prices-DPGO4KHT.js → product-prices-XCC26S77.js} +6 -6
  262. package/dist/{product-sales-channels-6IS6T3EC.js → product-sales-channels-G22VD3VU.js} +4 -4
  263. package/dist/{product-shipping-profile-LMLRMJ36.js → product-shipping-profile-OPOM33SD.js} +3 -3
  264. package/dist/{product-stock-AQKD6EQO.js → product-stock-WIPVYJUH.js} +32 -31
  265. package/dist/{product-tag-create-5CF7JLN5.js → product-tag-create-3QK7MKMI.js} +32 -31
  266. package/dist/{product-tag-detail-2RJNUUT7.js → product-tag-detail-LSMLNJW6.js} +41 -39
  267. package/dist/{product-tag-edit-KGT54WP5.js → product-tag-edit-NHRQ55DX.js} +32 -31
  268. package/dist/{product-tag-list-PJG7ICZE.js → product-tag-list-UHBM6KBT.js} +41 -39
  269. package/dist/{product-tag-metadata-WU7DVJUM.js → product-tag-metadata-DGH7UF4L.js} +33 -32
  270. package/dist/{product-type-create-WHYGTCYX.js → product-type-create-X6NFMD2J.js} +3 -3
  271. package/dist/{product-type-detail-MZ3MAV2B.js → product-type-detail-GNRN4KTB.js} +35 -35
  272. package/dist/{product-type-edit-A4IE6BSF.js → product-type-edit-K5WDDPEY.js} +3 -3
  273. package/dist/{product-type-list-ND2IIR6O.js → product-type-list-6CTXFZBZ.js} +4 -4
  274. package/dist/{product-type-metadata-KX4ETP3Y.js → product-type-metadata-NFMNORIB.js} +33 -32
  275. package/dist/{product-variant-detail-USZXPSVX.js → product-variant-detail-TGSUSOEB.js} +33 -32
  276. package/dist/{product-variant-edit-5L2GWAHB.js → product-variant-edit-6OJRQWC6.js} +32 -31
  277. package/dist/{product-variant-manage-inventory-items-54V2HTA6.js → product-variant-manage-inventory-items-RFKTIM5A.js} +3 -3
  278. package/dist/{product-variant-metadata-SBYZTEIH.js → product-variant-metadata-4MWJAXYI.js} +33 -32
  279. package/dist/{profile-detail-OAQD5VJC.js → profile-detail-C5BGWHSQ.js} +3 -3
  280. package/dist/{profile-edit-DSZCGRY7.js → profile-edit-RXXHWORE.js} +3 -3
  281. package/dist/{promotion-add-campaign-JC4B53LS.js → promotion-add-campaign-TWE6G4R7.js} +7 -7
  282. package/dist/promotion-create-CPRWDBDW.js +55 -0
  283. package/dist/{promotion-detail-XOQTYXTV.js → promotion-detail-KGIX6TA2.js} +34 -33
  284. package/dist/{promotion-edit-details-KFZ2VVVQ.js → promotion-edit-details-J2JWFT2L.js} +3 -3
  285. package/dist/{promotion-list-EH7CW4JZ.js → promotion-list-U7PXQLZT.js} +6 -6
  286. package/dist/{refund-reason-create-EMGCAW5S.js → refund-reason-create-KYM2BCJ2.js} +32 -31
  287. package/dist/{refund-reason-edit-3D25LGKM.js → refund-reason-edit-JIG7FL7D.js} +32 -31
  288. package/dist/{refund-reason-list-V7HDVFS2.js → refund-reason-list-IO4INIKF.js} +35 -34
  289. package/dist/{region-add-countries-ZAQBBXIL.js → region-add-countries-OBJOMTGC.js} +4 -4
  290. package/dist/{region-create-IMSMEASB.js → region-create-BFA7ATKB.js} +5 -5
  291. package/dist/{region-detail-RASFBR5O.js → region-detail-TR3IRW6L.js} +4 -4
  292. package/dist/{region-edit-HGSLB3RU.js → region-edit-75ZVOJ3U.js} +5 -5
  293. package/dist/{region-list-WEILXVMS.js → region-list-D4VLAQXD.js} +4 -4
  294. package/dist/{region-metadata-4COKDRZH.js → region-metadata-NJUXGJJZ.js} +33 -32
  295. package/dist/{reservation-create-CIYW3ZKU.js → reservation-create-3PQ56FKT.js} +5 -5
  296. package/dist/{reservation-detail-2ARWTBE6.js → reservation-detail-TKILHE26.js} +32 -31
  297. package/dist/{reservation-list-W6IOXQZK.js → reservation-list-56EFZDRI.js} +5 -5
  298. package/dist/{reservation-metadata-3ZJ2C5BM.js → reservation-metadata-V7BLDGSJ.js} +33 -32
  299. package/dist/{reset-password-YQ6HMFFZ.js → reset-password-SXAC55FW.js} +3 -3
  300. package/dist/{return-reason-create-HHZ3EMCC.js → return-reason-create-2HPI654O.js} +3 -3
  301. package/dist/{return-reason-edit-5P43JRYC.js → return-reason-edit-NJSTWTP3.js} +3 -3
  302. package/dist/{return-reason-list-32MCIQMK.js → return-reason-list-RYRELICQ.js} +6 -6
  303. package/dist/{sales-channel-add-products-U2UTBUKE.js → sales-channel-add-products-27YLUPZP.js} +34 -34
  304. package/dist/{sales-channel-create-TMRTMLIX.js → sales-channel-create-QJTXOKAM.js} +4 -4
  305. package/dist/{sales-channel-detail-FRBKGP4X.js → sales-channel-detail-EW2YN7VL.js} +34 -34
  306. package/dist/{sales-channel-edit-4LE2N6EV.js → sales-channel-edit-CDOQ5WR3.js} +4 -4
  307. package/dist/sales-channel-list-JOSLAWUO.js +51 -0
  308. package/dist/{sales-channel-metadata-OKKVLC7G.js → sales-channel-metadata-YABMFKT3.js} +33 -32
  309. package/dist/{shipping-option-type-create-ZHRADP5E.js → shipping-option-type-create-KXRPACLG.js} +32 -31
  310. package/dist/{shipping-option-type-detail-ZDEEU3P5.js → shipping-option-type-detail-KHX2BRFP.js} +33 -32
  311. package/dist/{shipping-option-type-edit-2FCNVHNE.js → shipping-option-type-edit-N3L4TPUK.js} +32 -31
  312. package/dist/shipping-option-type-list-5A676BZT.js +61 -0
  313. package/dist/{shipping-profile-create-WLHDFQ4Q.js → shipping-profile-create-T5WADNL2.js} +3 -3
  314. package/dist/{shipping-profile-detail-AUWRGYYL.js → shipping-profile-detail-3II2GLOC.js} +3 -3
  315. package/dist/{shipping-profile-metadata-W7CND3IQ.js → shipping-profile-metadata-WDM4Y653.js} +33 -32
  316. package/dist/{shipping-profiles-list-RZT6HIZV.js → shipping-profiles-list-DY4G7Z3K.js} +3 -3
  317. package/dist/store-address-edit-7BBZSSIP.js +231 -0
  318. package/dist/store-closure-edit-CN5JR4F5.js +152 -0
  319. package/dist/store-create-FUYTHJL5.js +278 -0
  320. package/dist/store-details-65JQK3M3.js +125 -0
  321. package/dist/store-edit-IQAVLFU5.js +372 -0
  322. package/dist/store-list-DWFAFCKV.js +83 -0
  323. package/dist/store-member-invite-GAWCXSWL.js +338 -0
  324. package/dist/store-payment-details-edit-Z3GLY4TO.js +218 -0
  325. package/dist/store-professional-details-edit-7KWQOK46.js +147 -0
  326. package/dist/{tax-region-create-U5JWJUX4.js → tax-region-create-6VHCIPP7.js} +33 -32
  327. package/dist/tax-region-detail-AZVNX4QN.js +69 -0
  328. package/dist/{tax-region-edit-5DOYTPEF.js → tax-region-edit-7A6MZBXC.js} +32 -31
  329. package/dist/{tax-region-list-MRQ63BL3.js → tax-region-list-52PPICIL.js} +6 -6
  330. package/dist/{tax-region-metadata-WN3XSWGA.js → tax-region-metadata-UZYHKPTE.js} +33 -32
  331. package/dist/{tax-region-province-create-3GZUYVBY.js → tax-region-province-create-PU53RZPV.js} +3 -3
  332. package/dist/{tax-region-province-detail-QTBP47GV.js → tax-region-province-detail-7ERAOT3Y.js} +34 -33
  333. package/dist/{tax-region-tax-override-create-PRZ3DEZE.js → tax-region-tax-override-create-TIPPPVTR.js} +41 -39
  334. package/dist/{tax-region-tax-override-edit-YAA6TB6A.js → tax-region-tax-override-edit-HDQ4NS5I.js} +41 -39
  335. package/dist/{tax-region-tax-rate-create-KHNADBCN.js → tax-region-tax-rate-create-4MTXOD2Z.js} +4 -4
  336. package/dist/{tax-region-tax-rate-edit-JR5262VW.js → tax-region-tax-rate-edit-VUIEX4DT.js} +4 -4
  337. package/dist/{user-detail-I66RREWP.js → user-detail-C7ZG3JWC.js} +4 -4
  338. package/dist/{user-edit-LBJOZ4LG.js → user-edit-LSWGYWV3.js} +3 -3
  339. package/dist/{user-invite-EUNVBT5W.js → user-invite-XYAU2UIS.js} +3 -3
  340. package/dist/{user-list-BDJJI33F.js → user-list-YXRP4JU5.js} +3 -3
  341. package/dist/{user-metadata-4RXAMVDT.js → user-metadata-JGCXU4OO.js} +33 -32
  342. package/package.json +6 -6
  343. package/dist/chunk-G5OVX555.js +0 -26
  344. package/dist/chunk-HPQG3PEA.js +0 -67
  345. package/dist/chunk-N5XVXV47.js +0 -530
  346. package/dist/chunk-NHGR2OFE.js +0 -292
  347. package/dist/customer-group-list-Q3T72VH2.js +0 -57
  348. package/dist/inventory-create-S6CB4JYN.js +0 -56
  349. package/dist/location-list-656DEW7L.js +0 -53
  350. package/dist/location-service-zone-shipping-option-create-IASFWJ2Z.js +0 -57
  351. package/dist/price-list-create-ZJTDGJSS.js +0 -76
  352. package/dist/price-list-prices-add-AJJ76VMY.js +0 -71
  353. package/dist/product-create-XA7UOISW.js +0 -68
  354. package/dist/product-create-variant-4Z6HSHRE.js +0 -54
  355. package/dist/promotion-create-A6FMNECA.js +0 -54
  356. package/dist/sales-channel-list-36UHU63C.js +0 -50
  357. package/dist/seller-address-edit-VH4X5OIO.js +0 -223
  358. package/dist/seller-details-52PG56BK.js +0 -104
  359. package/dist/seller-edit-TU72D5QS.js +0 -331
  360. package/dist/seller-list-CYNCPXYT.js +0 -80
  361. package/dist/shipping-option-type-list-OCCZ4DNS.js +0 -60
  362. package/dist/tax-region-detail-UNGDO64V.js +0 -68
@@ -0,0 +1,886 @@
1
+ import {
2
+ require_dist
3
+ } from "./chunk-ZZO3INVE.js";
4
+ import {
5
+ DateRangeDisplay
6
+ } from "./chunk-RK5N3XIX.js";
7
+ import {
8
+ DateCell
9
+ } from "./chunk-25LYVP3C.js";
10
+ import {
11
+ getStylizedAmount
12
+ } from "./chunk-PXYDR7WQ.js";
13
+ import {
14
+ IconAvatar
15
+ } from "./chunk-U2EI2ZLM.js";
16
+ import {
17
+ TwoColumnPage
18
+ } from "./chunk-V5J73NPW.js";
19
+ import {
20
+ _DataTable,
21
+ useDataTable
22
+ } from "./chunk-ULJ3OMWU.js";
23
+ import {
24
+ currencies
25
+ } from "./chunk-IQPN4PZJ.js";
26
+ import {
27
+ TwoColumnPageSkeleton
28
+ } from "./chunk-INNFZYX2.js";
29
+ import {
30
+ ActionMenu
31
+ } from "./chunk-BDGZ4EQO.js";
32
+ import {
33
+ useMemberTableQuery
34
+ } from "./chunk-NNI6QKKZ.js";
35
+ import {
36
+ useSubscriptionPlans
37
+ } from "./chunk-3MDRW5MA.js";
38
+ import {
39
+ useApproveSeller,
40
+ useRemoveSellerMember,
41
+ useSeller,
42
+ useSellerMembers,
43
+ useSuspendSeller,
44
+ useTerminateSeller,
45
+ useUnsuspendSeller,
46
+ useUnterminateSeller
47
+ } from "./chunk-M3YP3NX4.js";
48
+ import {
49
+ __toESM
50
+ } from "./chunk-NBMM2TZK.js";
51
+
52
+ // src/pages/stores/store-details/components/store-details.tsx
53
+ import { Children as Children3, useState as useState2 } from "react";
54
+ import { useParams } from "react-router-dom";
55
+ var import_types3 = __toESM(require_dist(), 1);
56
+
57
+ // src/pages/stores/store-details/components/store-general-section.tsx
58
+ import { Children as Children2 } from "react";
59
+ import { Photo } from "@medusajs/icons";
60
+ import { Badge, Container, Text } from "@medusajs/ui";
61
+ import { useTranslation as useTranslation2 } from "react-i18next";
62
+
63
+ // src/pages/stores/store-details/components/store-detail-header.tsx
64
+ import { Children } from "react";
65
+ import {
66
+ CheckCircleSolid,
67
+ PencilSquare,
68
+ XCircleSolid,
69
+ XMarkMini,
70
+ ArrowUturnLeft
71
+ } from "@medusajs/icons";
72
+ import { Avatar, Heading, StatusBadge, toast, usePrompt } from "@medusajs/ui";
73
+ import { useTranslation } from "react-i18next";
74
+ var import_types = __toESM(require_dist(), 1);
75
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
76
+ var getStatusColor = (status) => {
77
+ switch (status) {
78
+ case import_types.SellerStatus.OPEN:
79
+ return "green";
80
+ case import_types.SellerStatus.PENDING_APPROVAL:
81
+ return "orange";
82
+ case import_types.SellerStatus.SUSPENDED:
83
+ case import_types.SellerStatus.TERMINATED:
84
+ return "red";
85
+ default:
86
+ return "grey";
87
+ }
88
+ };
89
+ var getStatusLabel = (status, t) => {
90
+ switch (status) {
91
+ case import_types.SellerStatus.OPEN:
92
+ return t("stores.status.open");
93
+ case import_types.SellerStatus.PENDING_APPROVAL:
94
+ return t("stores.status.pending_approval");
95
+ case import_types.SellerStatus.SUSPENDED:
96
+ return t("stores.status.suspended");
97
+ case import_types.SellerStatus.TERMINATED:
98
+ return t("stores.status.terminated");
99
+ default:
100
+ return status;
101
+ }
102
+ };
103
+ var StoreDetailTitle = ({ seller }) => {
104
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-4", children: [
105
+ /* @__PURE__ */ jsx(
106
+ Avatar,
107
+ {
108
+ variant: "squared",
109
+ size: "large",
110
+ src: seller.logo || void 0,
111
+ fallback: seller.name.charAt(0).toUpperCase()
112
+ }
113
+ ),
114
+ /* @__PURE__ */ jsx(Heading, { children: seller.name })
115
+ ] });
116
+ };
117
+ var StoreDetailEditButton = ({ seller }) => {
118
+ const { t } = useTranslation();
119
+ return /* @__PURE__ */ jsx(
120
+ ActionMenu,
121
+ {
122
+ groups: [
123
+ {
124
+ actions: [
125
+ {
126
+ icon: /* @__PURE__ */ jsx(PencilSquare, {}),
127
+ label: t("actions.edit"),
128
+ to: `/stores/${seller.id}/edit`
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
134
+ );
135
+ };
136
+ var StoreDetailActions = ({
137
+ seller,
138
+ children
139
+ }) => {
140
+ const { t } = useTranslation();
141
+ const prompt = usePrompt();
142
+ const { mutateAsync: approveSeller } = useApproveSeller(seller.id);
143
+ const { mutateAsync: suspendSeller } = useSuspendSeller(seller.id);
144
+ const { mutateAsync: unsuspendSeller } = useUnsuspendSeller(seller.id);
145
+ const { mutateAsync: terminateSeller } = useTerminateSeller(seller.id);
146
+ const { mutateAsync: unterminateSeller } = useUnterminateSeller(seller.id);
147
+ const handleAction = async (action, label) => {
148
+ const res = await prompt({
149
+ title: label.title,
150
+ description: label.description,
151
+ verificationText: seller.email || seller.name || "",
152
+ confirmText: t("actions.confirm"),
153
+ cancelText: t("actions.cancel")
154
+ });
155
+ if (!res) return;
156
+ await action().then(
157
+ () => toast.success(label.success),
158
+ (error) => toast.error(error.message)
159
+ );
160
+ };
161
+ const statusActions = (() => {
162
+ switch (seller.status) {
163
+ case import_types.SellerStatus.PENDING_APPROVAL:
164
+ return [
165
+ {
166
+ label: t("stores.actions.approve.label"),
167
+ onClick: () => handleAction(() => approveSeller(), {
168
+ title: t("stores.actions.approve.title"),
169
+ description: t("stores.actions.approve.description"),
170
+ success: t("stores.actions.approve.success")
171
+ }),
172
+ icon: /* @__PURE__ */ jsx(CheckCircleSolid, {})
173
+ },
174
+ {
175
+ label: t("stores.actions.terminate.label"),
176
+ onClick: () => handleAction(() => terminateSeller(), {
177
+ title: t("stores.actions.terminate.title"),
178
+ description: t("stores.actions.terminate.description"),
179
+ success: t("stores.actions.terminate.success")
180
+ }),
181
+ icon: /* @__PURE__ */ jsx(XCircleSolid, {})
182
+ }
183
+ ];
184
+ case import_types.SellerStatus.OPEN:
185
+ return [
186
+ {
187
+ label: t("stores.actions.suspend.label"),
188
+ onClick: () => handleAction(() => suspendSeller(), {
189
+ title: t("stores.actions.suspend.title"),
190
+ description: t("stores.actions.suspend.description"),
191
+ success: t("stores.actions.suspend.success")
192
+ }),
193
+ icon: /* @__PURE__ */ jsx(XMarkMini, {})
194
+ }
195
+ ];
196
+ case import_types.SellerStatus.SUSPENDED:
197
+ return [
198
+ {
199
+ label: t("stores.actions.unsuspend.label"),
200
+ onClick: () => handleAction(() => unsuspendSeller(), {
201
+ title: t("stores.actions.unsuspend.title"),
202
+ description: t("stores.actions.unsuspend.description"),
203
+ success: t("stores.actions.unsuspend.success")
204
+ }),
205
+ icon: /* @__PURE__ */ jsx(ArrowUturnLeft, {})
206
+ },
207
+ {
208
+ label: t("stores.actions.terminate.label"),
209
+ onClick: () => handleAction(() => terminateSeller(), {
210
+ title: t("stores.actions.terminate.title"),
211
+ description: t("stores.actions.terminate.description"),
212
+ success: t("stores.actions.terminate.success")
213
+ }),
214
+ icon: /* @__PURE__ */ jsx(XCircleSolid, {})
215
+ }
216
+ ];
217
+ case import_types.SellerStatus.TERMINATED:
218
+ return [
219
+ {
220
+ label: t("stores.actions.unterminate.label"),
221
+ onClick: () => handleAction(() => unterminateSeller(), {
222
+ title: t("stores.actions.unterminate.title"),
223
+ description: t("stores.actions.unterminate.description"),
224
+ success: t("stores.actions.unterminate.success")
225
+ }),
226
+ icon: /* @__PURE__ */ jsx(ArrowUturnLeft, {})
227
+ }
228
+ ];
229
+ default:
230
+ return [];
231
+ }
232
+ })();
233
+ return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-x-2", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
234
+ /* @__PURE__ */ jsx(StatusBadge, { color: getStatusColor(seller.status), children: getStatusLabel(seller.status, t) }),
235
+ /* @__PURE__ */ jsx(
236
+ ActionMenu,
237
+ {
238
+ groups: [
239
+ {
240
+ actions: [
241
+ {
242
+ icon: /* @__PURE__ */ jsx(PencilSquare, {}),
243
+ label: t("actions.edit"),
244
+ to: `/stores/${seller.id}/edit`
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ actions: statusActions
250
+ }
251
+ ]
252
+ }
253
+ )
254
+ ] }) });
255
+ };
256
+ var StoreDetailHeader = ({
257
+ seller,
258
+ children
259
+ }) => {
260
+ return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-6 py-4", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
261
+ /* @__PURE__ */ jsx(StoreDetailTitle, { seller }),
262
+ /* @__PURE__ */ jsx(StoreDetailActions, { seller })
263
+ ] }) });
264
+ };
265
+
266
+ // src/pages/stores/store-details/components/store-general-section.tsx
267
+ import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
268
+ var StoreGeneralSection = ({
269
+ seller,
270
+ children
271
+ }) => {
272
+ const { t } = useTranslation2();
273
+ return /* @__PURE__ */ jsx2(Container, { className: "divide-y p-0", children: Children2.count(children) > 0 ? children : /* @__PURE__ */ jsxs2(Fragment2, { children: [
274
+ /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-subtle relative h-32 w-full overflow-hidden rounded-t-lg", children: seller.banner ? /* @__PURE__ */ jsx2(
275
+ "img",
276
+ {
277
+ src: seller.banner,
278
+ alt: seller.name,
279
+ className: "h-full w-full object-cover"
280
+ }
281
+ ) : /* @__PURE__ */ jsx2("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx2(Photo, { className: "text-ui-fg-muted" }) }) }),
282
+ /* @__PURE__ */ jsx2(StoreDetailHeader, { seller }),
283
+ /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
284
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.description") }),
285
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.description || "-" })
286
+ ] }),
287
+ /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
288
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.handle") }),
289
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.handle ? `/${seller.handle}` : "-" })
290
+ ] }),
291
+ /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
292
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.email") }),
293
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.email || "-" })
294
+ ] }),
295
+ /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
296
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.website") }),
297
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.website_url || "-" })
298
+ ] }),
299
+ /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
300
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.currency") }),
301
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
302
+ /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", children: seller.currency_code?.toUpperCase() }),
303
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: currencies[seller.currency_code.toUpperCase()].name })
304
+ ] })
305
+ ] }),
306
+ /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
307
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.premium") }),
308
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.is_premium ? t("general.yes") : t("general.no") })
309
+ ] }),
310
+ /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
311
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.createdAt") }),
312
+ /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: new Date(seller.created_at).toLocaleDateString(void 0, {
313
+ year: "numeric",
314
+ month: "long",
315
+ day: "numeric"
316
+ }) })
317
+ ] })
318
+ ] }) });
319
+ };
320
+
321
+ // src/pages/stores/store-details/components/store-payment-details-section.tsx
322
+ import { CreditCard, PencilSquare as PencilSquare2 } from "@medusajs/icons";
323
+ import { Container as Container2, Heading as Heading2, Text as Text2 } from "@medusajs/ui";
324
+ import { useTranslation as useTranslation3 } from "react-i18next";
325
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
326
+ var StorePaymentDetailsSection = ({
327
+ seller
328
+ }) => {
329
+ const { t } = useTranslation3();
330
+ const details = seller.payment_details;
331
+ const isABA = details?.country_code === "us";
332
+ const accountIdentifier = isABA ? details?.account_number : details?.iban;
333
+ const subtitle = [details?.bank_name, accountIdentifier].filter(Boolean).join(" \u2022 ");
334
+ return /* @__PURE__ */ jsxs3(Container2, { className: "p-0", children: [
335
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
336
+ /* @__PURE__ */ jsx3(Heading2, { level: "h2", children: t("store.paymentDetails.header") }),
337
+ /* @__PURE__ */ jsx3(
338
+ ActionMenu,
339
+ {
340
+ groups: [
341
+ {
342
+ actions: [
343
+ {
344
+ label: t("actions.edit"),
345
+ icon: /* @__PURE__ */ jsx3(PencilSquare2, {}),
346
+ to: `/stores/${seller.id}/payment-details`
347
+ }
348
+ ]
349
+ }
350
+ ]
351
+ }
352
+ )
353
+ ] }),
354
+ /* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx3("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-4", children: [
355
+ /* @__PURE__ */ jsx3(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx3(CreditCard, {}) }),
356
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col", children: [
357
+ /* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", children: details?.holder_name || "-" }),
358
+ /* @__PURE__ */ jsx3(
359
+ Text2,
360
+ {
361
+ size: "small",
362
+ leading: "compact",
363
+ className: "text-ui-fg-subtle",
364
+ children: subtitle || "-"
365
+ }
366
+ )
367
+ ] })
368
+ ] }) }) })
369
+ ] });
370
+ };
371
+
372
+ // src/pages/stores/store-details/components/store-company-details-section.tsx
373
+ import { Buildings, PencilSquare as PencilSquare3 } from "@medusajs/icons";
374
+ import { Container as Container3, Heading as Heading3, Text as Text3 } from "@medusajs/ui";
375
+ import { useTranslation as useTranslation4 } from "react-i18next";
376
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
377
+ var StoreCompanyDetailsSection = ({
378
+ seller
379
+ }) => {
380
+ const { t } = useTranslation4();
381
+ const details = seller.professional_details;
382
+ return /* @__PURE__ */ jsxs4(Container3, { className: "p-0", children: [
383
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", children: [
384
+ /* @__PURE__ */ jsx4(Heading3, { level: "h2", children: t("store.professionalDetails.header") }),
385
+ /* @__PURE__ */ jsx4(
386
+ ActionMenu,
387
+ {
388
+ groups: [
389
+ {
390
+ actions: [
391
+ {
392
+ label: t("actions.edit"),
393
+ icon: /* @__PURE__ */ jsx4(PencilSquare3, {}),
394
+ to: `/stores/${seller.id}/professional-details`
395
+ }
396
+ ]
397
+ }
398
+ ]
399
+ }
400
+ )
401
+ ] }),
402
+ /* @__PURE__ */ jsx4("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx4("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-4", children: [
403
+ /* @__PURE__ */ jsx4(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx4(Buildings, {}) }),
404
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col", children: [
405
+ /* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: details?.corporate_name || "-" }),
406
+ /* @__PURE__ */ jsx4(
407
+ Text3,
408
+ {
409
+ size: "small",
410
+ leading: "compact",
411
+ className: "text-ui-fg-subtle",
412
+ children: [details?.registration_number, details?.tax_id].filter(Boolean).join(" \xB7 ") || "-"
413
+ }
414
+ )
415
+ ] })
416
+ ] }) }) })
417
+ ] });
418
+ };
419
+
420
+ // src/pages/stores/store-details/components/store-configuration-section.tsx
421
+ import { PencilSquare as PencilSquare4 } from "@medusajs/icons";
422
+ import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
423
+ import { useTranslation as useTranslation5 } from "react-i18next";
424
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
425
+ var StoreConfigurationSection = ({
426
+ seller
427
+ }) => {
428
+ const { t } = useTranslation5();
429
+ return /* @__PURE__ */ jsxs5(Container4, { className: "flex flex-col gap-y-4", children: [
430
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between", children: [
431
+ /* @__PURE__ */ jsx5(Heading4, { level: "h2", children: t("store.scheduledClosure.header") }),
432
+ /* @__PURE__ */ jsx5(
433
+ ActionMenu,
434
+ {
435
+ groups: [
436
+ {
437
+ actions: [
438
+ {
439
+ label: t("actions.edit"),
440
+ icon: /* @__PURE__ */ jsx5(PencilSquare4, {}),
441
+ to: `/stores/${seller.id}/store-closure`
442
+ }
443
+ ]
444
+ }
445
+ ]
446
+ }
447
+ )
448
+ ] }),
449
+ /* @__PURE__ */ jsx5(
450
+ DateRangeDisplay,
451
+ {
452
+ startsAt: seller.closed_from,
453
+ endsAt: seller.closed_to,
454
+ showTime: true
455
+ }
456
+ )
457
+ ] });
458
+ };
459
+
460
+ // src/pages/stores/store-details/components/store-address-section.tsx
461
+ import { BuildingStorefront, PencilSquare as PencilSquare5 } from "@medusajs/icons";
462
+ import { Container as Container5, Heading as Heading5, Text as Text4 } from "@medusajs/ui";
463
+ import { useTranslation as useTranslation6 } from "react-i18next";
464
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
465
+ var StoreAddressSection = ({ seller }) => {
466
+ const { t } = useTranslation6();
467
+ const address = seller.address;
468
+ const formatAddress = () => {
469
+ const parts = [
470
+ address?.address_1,
471
+ address?.city,
472
+ address?.postal_code,
473
+ address?.country_code?.toUpperCase()
474
+ ].filter(Boolean);
475
+ return parts.length > 0 ? parts.join(", ") : null;
476
+ };
477
+ const formattedAddress = formatAddress();
478
+ return /* @__PURE__ */ jsxs6(Container5, { className: "p-0", children: [
479
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between px-6 py-4", children: [
480
+ /* @__PURE__ */ jsx6(Heading5, { level: "h2", children: t("store.address.header") }),
481
+ /* @__PURE__ */ jsx6(
482
+ ActionMenu,
483
+ {
484
+ groups: [
485
+ {
486
+ actions: [
487
+ {
488
+ label: t("actions.edit"),
489
+ icon: /* @__PURE__ */ jsx6(PencilSquare5, {}),
490
+ to: `/stores/${seller.id}/edit-address`
491
+ }
492
+ ]
493
+ }
494
+ ]
495
+ }
496
+ )
497
+ ] }),
498
+ /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx6("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-4", children: [
499
+ /* @__PURE__ */ jsx6(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx6(BuildingStorefront, {}) }),
500
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 flex-col", children: [
501
+ /* @__PURE__ */ jsx6(Text4, { size: "small", leading: "compact", weight: "plus", children: [address?.first_name, address?.last_name].filter(Boolean).join(" ") || "-" }),
502
+ /* @__PURE__ */ jsx6(
503
+ Text4,
504
+ {
505
+ size: "small",
506
+ leading: "compact",
507
+ className: "text-ui-fg-subtle",
508
+ children: formattedAddress || "-"
509
+ }
510
+ )
511
+ ] })
512
+ ] }) }) })
513
+ ] });
514
+ };
515
+
516
+ // src/pages/stores/store-details/components/store-subscription-section.tsx
517
+ import { CurrencyDollar, TriangleRightMini } from "@medusajs/icons";
518
+ import { Container as Container6, Heading as Heading6, Text as Text5 } from "@medusajs/ui";
519
+ import { useTranslation as useTranslation7 } from "react-i18next";
520
+ import { Link } from "react-router-dom";
521
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
522
+ var StoreSubscriptionSection = ({
523
+ seller
524
+ }) => {
525
+ const { t } = useTranslation7();
526
+ const { subscription_plans } = useSubscriptionPlans({
527
+ currency_code: seller.currency_code,
528
+ limit: 100,
529
+ offset: 0
530
+ });
531
+ const plan = subscription_plans?.find(
532
+ (p) => p.currency_code === seller.currency_code
533
+ );
534
+ if (!plan) {
535
+ return null;
536
+ }
537
+ const override = plan.overrides?.find(
538
+ (o) => o.reference === "seller" && o.reference_id === seller.id
539
+ );
540
+ const effectiveAmount = override?.monthly_amount ?? plan.monthly_amount;
541
+ return /* @__PURE__ */ jsxs7(Container6, { className: "p-0", children: [
542
+ /* @__PURE__ */ jsx7("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx7(Heading6, { level: "h2", children: t("store.subscription.header") }) }),
543
+ /* @__PURE__ */ jsx7("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx7(
544
+ Link,
545
+ {
546
+ to: `/subscription-plans/${plan.id}`,
547
+ className: "group outline-none rounded-md focus-within:shadow-borders-interactive-with-focus [&:hover>div]:bg-ui-bg-component-hover",
548
+ children: /* @__PURE__ */ jsx7("div", { className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-4", children: [
549
+ /* @__PURE__ */ jsx7(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx7(CurrencyDollar, {}) }),
550
+ /* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col", children: [
551
+ /* @__PURE__ */ jsx7(Text5, { size: "small", leading: "compact", weight: "plus", children: plan.currency_code.toUpperCase() }),
552
+ /* @__PURE__ */ jsxs7(
553
+ Text5,
554
+ {
555
+ size: "small",
556
+ leading: "compact",
557
+ className: "text-ui-fg-subtle",
558
+ children: [
559
+ getStylizedAmount(effectiveAmount, plan.currency_code),
560
+ "/",
561
+ t("store.subscription.month")
562
+ ]
563
+ }
564
+ )
565
+ ] }),
566
+ /* @__PURE__ */ jsx7("div", { className: "flex size-7 items-center justify-center", children: /* @__PURE__ */ jsx7(TriangleRightMini, { className: "text-ui-fg-muted" }) })
567
+ ] }) })
568
+ }
569
+ ) })
570
+ ] });
571
+ };
572
+
573
+ // src/pages/stores/store-details/components/store-members-section/store-members-section.tsx
574
+ import { Button, Container as Container7, Heading as Heading7 } from "@medusajs/ui";
575
+ import { useTranslation as useTranslation9 } from "react-i18next";
576
+ import { Link as Link2 } from "react-router-dom";
577
+
578
+ // src/pages/stores/store-details/components/store-members-section/store-members-data-table.tsx
579
+ import { useMemo } from "react";
580
+ import { Trash } from "@medusajs/icons";
581
+ import { toast as toast2 } from "@medusajs/ui";
582
+ import { keepPreviousData } from "@tanstack/react-query";
583
+ import { createColumnHelper } from "@tanstack/react-table";
584
+ import { useTranslation as useTranslation8 } from "react-i18next";
585
+ var import_types2 = __toESM(require_dist(), 1);
586
+ import { jsx as jsx8 } from "react/jsx-runtime";
587
+ var PAGE_SIZE = 20;
588
+ var ROLE_TRANSLATION_MAP = {
589
+ [import_types2.SellerRole.SELLER_ADMINISTRATION]: "users.roles.administration",
590
+ [import_types2.SellerRole.INVENTORY_MANAGEMENT]: "users.roles.inventoryManagement",
591
+ [import_types2.SellerRole.ORDER_MANAGEMENT]: "users.roles.orderManagement",
592
+ [import_types2.SellerRole.ACCOUNTING]: "users.roles.accounting",
593
+ [import_types2.SellerRole.SUPPORT]: "users.roles.support"
594
+ };
595
+ var StoreMembersDataTable = ({
596
+ sellerId
597
+ }) => {
598
+ const { t } = useTranslation8();
599
+ const { searchParams, raw } = useMemberTableQuery({ pageSize: PAGE_SIZE });
600
+ const { seller_members, count, isPending, isError, error } = useSellerMembers(sellerId, searchParams, {
601
+ placeholderData: keepPreviousData
602
+ });
603
+ const columns = useColumns(sellerId);
604
+ const { table } = useDataTable({
605
+ data: seller_members ?? [],
606
+ columns,
607
+ enablePagination: true,
608
+ count,
609
+ pageSize: PAGE_SIZE,
610
+ getRowId: (row) => row.id
611
+ });
612
+ if (isError) {
613
+ throw error;
614
+ }
615
+ return /* @__PURE__ */ jsx8(
616
+ _DataTable,
617
+ {
618
+ table,
619
+ columns,
620
+ count,
621
+ pageSize: PAGE_SIZE,
622
+ pagination: true,
623
+ isLoading: isPending,
624
+ queryObject: raw,
625
+ orderBy: [
626
+ { key: "created_at", label: t("fields.createdAt") },
627
+ { key: "updated_at", label: t("fields.updatedAt") }
628
+ ],
629
+ noRecords: {
630
+ message: t("users.list.empty.description")
631
+ }
632
+ }
633
+ );
634
+ };
635
+ var columnHelper = createColumnHelper();
636
+ var useColumns = (sellerId) => {
637
+ const { t } = useTranslation8();
638
+ return useMemo(
639
+ () => [
640
+ columnHelper.accessor("member.email", {
641
+ header: () => /* @__PURE__ */ jsx8("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx8("span", { children: t("fields.email") }) }),
642
+ cell: ({ row }) => {
643
+ return /* @__PURE__ */ jsx8("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx8("span", { className: "truncate", children: row.original.member?.email }) });
644
+ }
645
+ }),
646
+ columnHelper.accessor("role_id", {
647
+ header: () => /* @__PURE__ */ jsx8("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx8("span", { children: t("fields.role") }) }),
648
+ cell: ({ row }) => {
649
+ const roleId = row.original.role_id;
650
+ const translationKey = ROLE_TRANSLATION_MAP[roleId];
651
+ const label = translationKey ? t(translationKey) : "-";
652
+ return /* @__PURE__ */ jsx8("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx8("span", { className: "truncate", children: label }) });
653
+ }
654
+ }),
655
+ columnHelper.accessor("created_at", {
656
+ header: () => /* @__PURE__ */ jsx8("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx8("span", { children: t("fields.createdAt") }) }),
657
+ cell: ({ getValue }) => {
658
+ const date = getValue();
659
+ return /* @__PURE__ */ jsx8(DateCell, { date: date ? new Date(date) : null });
660
+ }
661
+ }),
662
+ columnHelper.display({
663
+ id: "actions",
664
+ cell: ({ row }) => {
665
+ return /* @__PURE__ */ jsx8(MemberActions, { member: row.original, sellerId });
666
+ }
667
+ })
668
+ ],
669
+ [t, sellerId]
670
+ );
671
+ };
672
+ var MemberActions = ({
673
+ member,
674
+ sellerId
675
+ }) => {
676
+ const { t } = useTranslation8();
677
+ const { mutateAsync: removeMember } = useRemoveSellerMember(
678
+ sellerId,
679
+ member.id
680
+ );
681
+ const handleRemove = async () => {
682
+ try {
683
+ await removeMember();
684
+ toast2.success(
685
+ t("users.deleteUserSuccess", {
686
+ name: member.member?.email
687
+ })
688
+ );
689
+ } catch (e) {
690
+ toast2.error(e.message);
691
+ }
692
+ };
693
+ return /* @__PURE__ */ jsx8(
694
+ ActionMenu,
695
+ {
696
+ groups: [
697
+ {
698
+ actions: [
699
+ {
700
+ icon: /* @__PURE__ */ jsx8(Trash, {}),
701
+ label: t("actions.remove"),
702
+ onClick: handleRemove
703
+ }
704
+ ]
705
+ }
706
+ ]
707
+ }
708
+ );
709
+ };
710
+
711
+ // src/pages/stores/store-details/components/store-members-section/store-members-section.tsx
712
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
713
+ var StoreMembersSection = ({ sellerId }) => {
714
+ const { t } = useTranslation9();
715
+ return /* @__PURE__ */ jsxs8(Container7, { className: "divide-y p-0", children: [
716
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between px-6 py-4", children: [
717
+ /* @__PURE__ */ jsx9(Heading7, { level: "h2", children: t("users.domain", "Users") }),
718
+ /* @__PURE__ */ jsx9(Link2, { to: "invite", children: /* @__PURE__ */ jsx9(Button, { size: "small", variant: "secondary", children: t("users.invite", "Invite") }) })
719
+ ] }),
720
+ /* @__PURE__ */ jsx9(StoreMembersDataTable, { sellerId })
721
+ ] });
722
+ };
723
+
724
+ // src/pages/stores/store-details/components/store-request-section.tsx
725
+ import { useState } from "react";
726
+ import { ExclamationCircleSolid } from "@medusajs/icons";
727
+ import {
728
+ Button as Button2,
729
+ Container as Container8,
730
+ Heading as Heading8,
731
+ Text as Text6,
732
+ Textarea,
733
+ toast as toast3
734
+ } from "@medusajs/ui";
735
+ import { useTranslation as useTranslation10 } from "react-i18next";
736
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
737
+ var StoreRequestSection = ({ seller }) => {
738
+ const { t } = useTranslation10();
739
+ const [reason, setReason] = useState("");
740
+ const { mutateAsync: approveSeller, isPending: isApproving } = useApproveSeller(seller.id);
741
+ const { mutateAsync: suspendSeller, isPending: isSuspending } = useSuspendSeller(seller.id);
742
+ const handleConfirm = async () => {
743
+ try {
744
+ await approveSeller();
745
+ toast3.success(
746
+ t("stores.approve.successToast", "Store approved successfully")
747
+ );
748
+ } catch (error) {
749
+ toast3.error(error.message);
750
+ }
751
+ };
752
+ const handleReject = async () => {
753
+ try {
754
+ await suspendSeller({ reason: reason || void 0 });
755
+ toast3.success(
756
+ t("stores.suspend.successToast", "Store suspended successfully")
757
+ );
758
+ } catch (error) {
759
+ toast3.error(error.message);
760
+ }
761
+ };
762
+ return /* @__PURE__ */ jsx10(
763
+ "div",
764
+ {
765
+ style: {
766
+ background: "repeating-linear-gradient(-45deg, rgb(212, 212, 216, 0.15), rgb(212, 212, 216,.15) 10px, transparent 10px, transparent 20px)"
767
+ },
768
+ className: "-m-4 mb-1 border-b border-l p-4",
769
+ children: /* @__PURE__ */ jsx10(Container8, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs9("div", { className: "flex w-full flex-col divide-y divide-dashed", children: [
770
+ /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2 px-6 py-4", children: [
771
+ /* @__PURE__ */ jsx10(ExclamationCircleSolid, { className: "text-orange-500" }),
772
+ /* @__PURE__ */ jsx10(Heading8, { level: "h2", children: t("stores.request.title", "Store request") })
773
+ ] }),
774
+ /* @__PURE__ */ jsx10("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsx10(Text6, { className: "text-ui-fg-subtle", children: t(
775
+ "stores.request.description",
776
+ "A new store request has been submitted. Review the details, make any necessary updates, and choose whether to confirm and publish the store or suspend the request."
777
+ ) }) }),
778
+ /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-y-2 px-6 py-4", children: [
779
+ /* @__PURE__ */ jsx10(Text6, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: t("stores.request.reasonLabel", "Suspend reason") }),
780
+ /* @__PURE__ */ jsx10(
781
+ Textarea,
782
+ {
783
+ placeholder: t(
784
+ "stores.request.reasonPlaceholder",
785
+ "Optional reason for suspending this store..."
786
+ ),
787
+ value: reason,
788
+ onChange: (e) => setReason(e.target.value)
789
+ }
790
+ )
791
+ ] }),
792
+ /* @__PURE__ */ jsxs9("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
793
+ /* @__PURE__ */ jsx10(
794
+ Button2,
795
+ {
796
+ size: "small",
797
+ variant: "secondary",
798
+ onClick: handleConfirm,
799
+ isLoading: isApproving,
800
+ children: t("stores.request.confirm", "Confirm")
801
+ }
802
+ ),
803
+ /* @__PURE__ */ jsx10(
804
+ Button2,
805
+ {
806
+ size: "small",
807
+ variant: "secondary",
808
+ onClick: handleReject,
809
+ isLoading: isSuspending,
810
+ children: t("stores.request.suspend", "Suspend")
811
+ }
812
+ )
813
+ ] })
814
+ ] }) })
815
+ }
816
+ );
817
+ };
818
+
819
+ // src/pages/stores/store-details/components/store-details.tsx
820
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
821
+ var TABS = [{ value: "users", label: "Users" }];
822
+ var TabBar = ({
823
+ activeTab,
824
+ onTabChange
825
+ }) => {
826
+ return /* @__PURE__ */ jsx11("div", { className: "flex items-center gap-x-3 py-2", children: TABS.map((tab) => {
827
+ const isActive = activeTab === tab.value;
828
+ return /* @__PURE__ */ jsx11(
829
+ "button",
830
+ {
831
+ onClick: () => onTabChange(tab.value),
832
+ className: `txt-compact-medium-plus rounded-full px-4 py-1.5 transition-colors ${isActive ? "border-ui-border-base bg-ui-bg-base shadow-borders-base text-ui-fg-base" : "text-ui-fg-subtle hover:text-ui-fg-base"}`,
833
+ children: tab.label
834
+ },
835
+ tab.value
836
+ );
837
+ }) });
838
+ };
839
+ var Root = ({ children }) => {
840
+ const { id } = useParams();
841
+ const [activeTab, setActiveTab] = useState2("users");
842
+ const { seller, isLoading, isError, error } = useSeller(id);
843
+ if (isLoading || !seller) {
844
+ return /* @__PURE__ */ jsx11(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 3 });
845
+ }
846
+ if (isError) {
847
+ throw error;
848
+ }
849
+ if (Children3.count(children) > 0) {
850
+ return /* @__PURE__ */ jsx11(TwoColumnPage, { data: seller, hasOutlet: true, "data-testid": "store-detail-page", children });
851
+ }
852
+ return /* @__PURE__ */ jsxs10(TwoColumnPage, { data: seller, hasOutlet: true, "data-testid": "store-detail-page", children: [
853
+ /* @__PURE__ */ jsxs10(TwoColumnPage.Main, { children: [
854
+ seller.status === import_types3.SellerStatus.PENDING_APPROVAL && /* @__PURE__ */ jsx11(StoreRequestSection, { seller }),
855
+ /* @__PURE__ */ jsx11(StoreGeneralSection, { seller }),
856
+ /* @__PURE__ */ jsx11(TabBar, { activeTab, onTabChange: setActiveTab }),
857
+ activeTab === "users" && /* @__PURE__ */ jsx11(StoreMembersSection, { sellerId: seller.id })
858
+ ] }),
859
+ /* @__PURE__ */ jsxs10(TwoColumnPage.Sidebar, { children: [
860
+ /* @__PURE__ */ jsx11(StoreConfigurationSection, { seller }),
861
+ /* @__PURE__ */ jsx11(StoreAddressSection, { seller }),
862
+ /* @__PURE__ */ jsx11(StoreCompanyDetailsSection, { seller }),
863
+ /* @__PURE__ */ jsx11(StorePaymentDetailsSection, { seller }),
864
+ /* @__PURE__ */ jsx11(StoreSubscriptionSection, { seller })
865
+ ] })
866
+ ] });
867
+ };
868
+ var StoreDetailPage = Object.assign(Root, {
869
+ Main: TwoColumnPage.Main,
870
+ Sidebar: TwoColumnPage.Sidebar,
871
+ MainGeneralSection: StoreGeneralSection,
872
+ MainPaymentDetailsSection: StorePaymentDetailsSection,
873
+ MainCompanyDetailsSection: StoreCompanyDetailsSection,
874
+ SidebarConfigurationSection: StoreConfigurationSection,
875
+ SidebarAddressSection: StoreAddressSection,
876
+ SidebarSubscriptionSection: StoreSubscriptionSection,
877
+ SidebarMembersSection: StoreMembersSection,
878
+ Header: StoreDetailHeader,
879
+ HeaderTitle: StoreDetailTitle,
880
+ HeaderActions: StoreDetailActions,
881
+ HeaderEditButton: StoreDetailEditButton
882
+ });
883
+
884
+ export {
885
+ StoreDetailPage
886
+ };