@mercurjs/admin 2.2.0-canary.7 → 2.2.0-canary.9

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 (231) hide show
  1. package/dist/{add-campaign-promotions-2XFYP6GK.js → add-campaign-promotions-XANY2FIV.js} +3 -3
  2. package/dist/{adjust-inventory-EAAPNIBZ.js → adjust-inventory-DJRDNU2V.js} +9 -10
  3. package/dist/{api-key-management-create-MRLR4WFZ.js → api-key-management-create-UD5V7TOU.js} +3 -3
  4. package/dist/{api-key-management-detail-PIN6NFQF.js → api-key-management-detail-XJVWUU2C.js} +12 -13
  5. package/dist/{api-key-management-edit-EZHFP3RR.js → api-key-management-edit-4TLKJSAE.js} +3 -3
  6. package/dist/{api-key-management-list-OPANEDHB.js → api-key-management-list-SZUSD6UI.js} +4 -4
  7. package/dist/{api-key-management-sales-channels-PBL3V4IS.js → api-key-management-sales-channels-TK6XEGF3.js} +3 -3
  8. package/dist/{attribute-create-WDJSDXKD.js → attribute-create-2COL3PJX.js} +43 -19
  9. package/dist/{attribute-detail-3JGQV7BG.js → attribute-detail-7SK3MWGQ.js} +10 -11
  10. package/dist/{attribute-edit-SSG3XZOJ.js → attribute-edit-LUY66TG3.js} +2 -2
  11. package/dist/{attribute-edit-possible-value-5TBYLJY4.js → attribute-edit-possible-value-IOS3625C.js} +2 -2
  12. package/dist/{attribute-list-URWKNTSJ.js → attribute-list-SK3ZYHDB.js} +9 -10
  13. package/dist/{campaign-detail-336RBLOX.js → campaign-detail-XL3QCW5Y.js} +13 -14
  14. package/dist/{categories-metadata-5GXBBHEH.js → categories-metadata-C6HVQRH2.js} +9 -10
  15. package/dist/{category-create-QPQQGIEN.js → category-create-GMCJABRW.js} +4 -4
  16. package/dist/{category-detail-RIKOZMPK.js → category-detail-R2VZJEAV.js} +15 -16
  17. package/dist/{category-edit-DJP7TK4X.js → category-edit-GLE4NTFG.js} +2 -2
  18. package/dist/{category-list-T5SE63HU.js → category-list-SNVOQ64L.js} +4 -4
  19. package/dist/{category-organize-DQQGAAJY.js → category-organize-UY4M4N7S.js} +2 -2
  20. package/dist/{category-products-255EJFTV.js → category-products-EWBBAXAH.js} +13 -14
  21. package/dist/{chunk-MKBCBAS2.js → chunk-2OF7GB7J.js} +4 -4
  22. package/dist/{chunk-N3BYBEDV.js → chunk-2WHSCEKX.js} +2 -2
  23. package/dist/{chunk-CKPGRDZS.js → chunk-2YE5K2D7.js} +1 -1
  24. package/dist/{chunk-VERWLDVW.js → chunk-37N6S4CU.js} +3 -3
  25. package/dist/{chunk-TNNQPNXY.js → chunk-3B6HI32S.js} +1 -1
  26. package/dist/{chunk-BEJ3IR7B.js → chunk-3VDLE5GA.js} +9 -1
  27. package/dist/{chunk-E5WBU7ZR.js → chunk-453BC56K.js} +1 -1
  28. package/dist/{chunk-TE245WV3.js → chunk-45CPSFTO.js} +4 -4
  29. package/dist/{chunk-7BD24KNM.js → chunk-4AU37UL5.js} +2 -2
  30. package/dist/{chunk-MSESXKMA.js → chunk-4GFS57XI.js} +1 -1
  31. package/dist/{chunk-NMFVQDVF.js → chunk-57RZ7ZOK.js} +4 -4
  32. package/dist/{chunk-K6L5PHHQ.js → chunk-5FFZQPTT.js} +1 -1
  33. package/dist/{chunk-L3E6LES5.js → chunk-5NHDF6SM.js} +3 -3
  34. package/dist/{chunk-LD7NVG2X.js → chunk-5UPOHLBD.js} +3 -3
  35. package/dist/{chunk-FEC24V7X.js → chunk-6FHQCLHQ.js} +1 -1
  36. package/dist/{chunk-2XVH2IJL.js → chunk-6IXCZ3FF.js} +5 -5
  37. package/dist/{chunk-N3334MXP.js → chunk-6PLDJPQ3.js} +65 -31
  38. package/dist/{chunk-LXMGYWPO.js → chunk-7MKIOI7P.js} +3 -3
  39. package/dist/{chunk-P42E3L6Z.js → chunk-7MMLCMV3.js} +1 -1
  40. package/dist/{chunk-R5F52U3C.js → chunk-AWCVVFEY.js} +1 -1
  41. package/dist/{chunk-BKNAX6QQ.js → chunk-BPCU5QJE.js} +1 -1
  42. package/dist/{chunk-ISJOBO5P.js → chunk-BSU6VOKG.js} +6 -3
  43. package/dist/{chunk-6RHAGO5O.js → chunk-CVBPTNG7.js} +2 -2
  44. package/dist/{chunk-CKUIM5ZD.js → chunk-CVFX57MN.js} +5 -5
  45. package/dist/{chunk-2YN2OI3W.js → chunk-CYGCCNIC.js} +2 -2
  46. package/dist/{chunk-GIVLDQXN.js → chunk-D4PQL46N.js} +1 -1
  47. package/dist/{chunk-EB5QHYKL.js → chunk-DN2K5EAH.js} +1 -1
  48. package/dist/{chunk-Q6VW2MR5.js → chunk-EHGCFAN6.js} +1 -1
  49. package/dist/{chunk-IWI34SYT.js → chunk-FDD7TANX.js} +1 -1
  50. package/dist/{chunk-6WBQDJIH.js → chunk-FG4NHVBO.js} +85 -63
  51. package/dist/{chunk-D2NBZVQC.js → chunk-GU52ZMNY.js} +4 -4
  52. package/dist/{chunk-ZRFWXNT3.js → chunk-H3MAUKL7.js} +20 -0
  53. package/dist/{chunk-34OFJ74B.js → chunk-HEGPAGJT.js} +2 -2
  54. package/dist/{chunk-XAIID3PU.js → chunk-IQCUYC42.js} +4 -4
  55. package/dist/{chunk-Q23KHB6V.js → chunk-JM7MSBWD.js} +2 -2
  56. package/dist/{chunk-M5AJSIRN.js → chunk-JSMUFZZN.js} +1 -1
  57. package/dist/{chunk-EFZBEG7O.js → chunk-K4WU4PVL.js} +1 -1
  58. package/dist/{chunk-72SSKT5O.js → chunk-KXHYJGAV.js} +1 -1
  59. package/dist/{chunk-5J2HQOKK.js → chunk-LDQY7K5W.js} +1 -1
  60. package/dist/{chunk-FPV32HVT.js → chunk-LGL4QSGB.js} +1 -1
  61. package/dist/{chunk-46A3QXAL.js → chunk-LOIFUOOA.js} +1 -1
  62. package/dist/{chunk-WRVGLMRW.js → chunk-MR3MLNWV.js} +3 -3
  63. package/dist/{chunk-X3PXBMI3.js → chunk-N7OVIX55.js} +1 -1
  64. package/dist/{chunk-ACDG3RAL.js → chunk-NJ7V6YWI.js} +1 -1
  65. package/dist/{chunk-4RT7P5ZQ.js → chunk-NJP3DEE5.js} +1 -1
  66. package/dist/{chunk-UFGVU7RF.js → chunk-OKDODCIP.js} +1 -1
  67. package/dist/{chunk-6NDM5WGE.js → chunk-OMBP3YSV.js} +1 -1
  68. package/dist/{chunk-ZB4SO44T.js → chunk-P5XVG4PY.js} +1 -1
  69. package/dist/{chunk-LO7NJYHZ.js → chunk-PAJ335VB.js} +2 -2
  70. package/dist/{chunk-GQLVERZW.js → chunk-PASEZJC7.js} +1 -1
  71. package/dist/{chunk-UNOG2S56.js → chunk-PMWLTPYR.js} +6 -6
  72. package/dist/{chunk-EZGIPTIF.js → chunk-PT5G44WJ.js} +2 -2
  73. package/dist/{chunk-HZQGZQTV.js → chunk-QUPUWR42.js} +1 -1
  74. package/dist/{chunk-SS7LB52P.js → chunk-SFSD57M5.js} +5 -5
  75. package/dist/{chunk-PR7Y27BW.js → chunk-SJGIQGEC.js} +1 -1
  76. package/dist/{chunk-2MVNFKL6.js → chunk-SV5YQGFE.js} +4 -4
  77. package/dist/{chunk-J4MAIN7L.js → chunk-SVKQDD7E.js} +1 -1
  78. package/dist/{chunk-TXNRS2JR.js → chunk-TE4IF3MM.js} +1 -1
  79. package/dist/{chunk-Y2M536WR.js → chunk-THZ5Q2UG.js} +1 -0
  80. package/dist/{chunk-MFI5TG54.js → chunk-TLDLOE27.js} +3 -3
  81. package/dist/{chunk-4XFFF2L5.js → chunk-UCX2T4BQ.js} +2 -2
  82. package/dist/{chunk-F5H5JZQZ.js → chunk-UCYSCKZV.js} +0 -9
  83. package/dist/{chunk-GPJ6KVY2.js → chunk-VMEJGGXA.js} +2 -2
  84. package/dist/{chunk-6XTHMAA2.js → chunk-VT5E7OMM.js} +2 -2
  85. package/dist/{chunk-KMZOBR5Q.js → chunk-VY7PT4SI.js} +1 -1
  86. package/dist/{chunk-Y6GMH5KH.js → chunk-W2QNDZTH.js} +1 -1
  87. package/dist/{chunk-SONUZNDT.js → chunk-W6V2L2FX.js} +2 -2
  88. package/dist/{chunk-SFHM7YDA.js → chunk-WM2BRJCJ.js} +5 -5
  89. package/dist/{chunk-UKDC2AQR.js → chunk-WPVDACTL.js} +1 -1
  90. package/dist/{chunk-DWCBB4QM.js → chunk-WTK4MLMF.js} +1 -1
  91. package/dist/{chunk-B66CMFMH.js → chunk-X2T3AU67.js} +2 -2
  92. package/dist/{chunk-KJSCFEXT.js → chunk-X4EKVL5F.js} +2 -2
  93. package/dist/{chunk-FUE374HM.js → chunk-XLE7EDWR.js} +17 -49
  94. package/dist/{chunk-G3GSRFTB.js → chunk-Y6NDT26D.js} +4 -4
  95. package/dist/{chunk-3L7M4E7W.js → chunk-YDBPAHWU.js} +1 -1
  96. package/dist/{chunk-2ZRWLCYP.js → chunk-Z5T5EPLF.js} +1 -1
  97. package/dist/{collection-add-products-4ZTBHENL.js → collection-add-products-6JY2OYKB.js} +13 -14
  98. package/dist/{collection-create-GPBN7KO6.js → collection-create-BRMP6SIZ.js} +2 -2
  99. package/dist/{collection-detail-W7OC2ALM.js → collection-detail-PDR53MV5.js} +14 -15
  100. package/dist/{collection-edit-NVRFKO46.js → collection-edit-YLWUEU4C.js} +2 -2
  101. package/dist/{collection-list-B7LALPSA.js → collection-list-ZAMXJO4H.js} +14 -15
  102. package/dist/{collection-metadata-E4C54MTU.js → collection-metadata-PBSEIVJ6.js} +9 -10
  103. package/dist/{commission-rate-create-7MEIKAXK.js → commission-rate-create-O2TZ56RG.js} +16 -17
  104. package/dist/{commission-rate-detail-XBMB3Y7S.js → commission-rate-detail-Y5NPDWQN.js} +10 -11
  105. package/dist/{commission-rate-edit-XXUAGK5Q.js → commission-rate-edit-X5RJS6XC.js} +16 -17
  106. package/dist/{customer-detail-ONZGPCHW.js → customer-detail-PZ4RLCCE.js} +11 -12
  107. package/dist/{customer-group-detail-XTCDJX7O.js → customer-group-detail-CQ7GI3CJ.js} +9 -10
  108. package/dist/{customer-group-list-63ER7WQH.js → customer-group-list-RGCIS44T.js} +9 -10
  109. package/dist/{customer-group-metadata-N7HGHXNC.js → customer-group-metadata-FBZAMX7J.js} +9 -10
  110. package/dist/{customer-metadata-63OWV4KB.js → customer-metadata-DNCPK22Y.js} +9 -10
  111. package/dist/{customers-add-customer-group-NUXPXNUC.js → customers-add-customer-group-AJJG2XEW.js} +9 -10
  112. package/dist/{edit-inventory-item-YOJTYA7H.js → edit-inventory-item-MXA5NEWW.js} +9 -10
  113. package/dist/{edit-inventory-item-attributes-JGY633F2.js → edit-inventory-item-attributes-M2NUNSM7.js} +9 -10
  114. package/dist/{edit-reservation-ACDUXG33.js → edit-reservation-6KA372WV.js} +2 -2
  115. package/dist/{edit-rules-4VAD5Q3L.js → edit-rules-2GVJU6O7.js} +9 -10
  116. package/dist/index.js +189 -239
  117. package/dist/{inventory-create-3NJZLSFO.js → inventory-create-VIIAVANZ.js} +10 -11
  118. package/dist/{inventory-detail-B3HU2OVR.js → inventory-detail-47UAVORN.js} +10 -11
  119. package/dist/{inventory-list-AE44PEW7.js → inventory-list-2JGX6BRI.js} +2 -2
  120. package/dist/{inventory-metadata-WCFTI7AH.js → inventory-metadata-N2PZACPZ.js} +9 -10
  121. package/dist/{inventory-stock-M65W4GRN.js → inventory-stock-6JUYSL3S.js} +9 -10
  122. package/dist/{location-detail-2NCZD5MO.js → location-detail-OET2D2VX.js} +10 -11
  123. package/dist/{location-fulfillment-providers-3XKOFATD.js → location-fulfillment-providers-K6OKN6AY.js} +12 -13
  124. package/dist/{location-list-VS6V2FXE.js → location-list-YH3X5HHG.js} +9 -10
  125. package/dist/{location-sales-channels-TEUZYDTT.js → location-sales-channels-GKIWX6B2.js} +2 -2
  126. package/dist/{location-service-zone-shipping-option-create-LAM3OHBC.js → location-service-zone-shipping-option-create-FK447EYC.js} +9 -10
  127. package/dist/{login-DJWU5X5L.js → login-LTCJJFDI.js} +9 -10
  128. package/dist/{manage-locations-E2XQPKKE.js → manage-locations-TKLOHP3D.js} +1 -1
  129. package/dist/{marketplace-detail-IQLU7R3J.js → marketplace-detail-VXY6MKJS.js} +10 -11
  130. package/dist/{marketplace-metadata-7DNBHUDD.js → marketplace-metadata-KUUCCF4P.js} +9 -10
  131. package/dist/{offers-UJCSO3RD.js → offers-O4BI5PLZ.js} +2 -2
  132. package/dist/{order-allocate-items-TMVWJUV3.js → order-allocate-items-XSJ65QFV.js} +3 -3
  133. package/dist/{order-create-claim-MPSXY24H.js → order-create-claim-QWSJZUEM.js} +9 -9
  134. package/dist/{order-create-edit-6JLXERBY.js → order-create-edit-M4YFR6U7.js} +5 -5
  135. package/dist/{order-create-exchange-O6COEAGJ.js → order-create-exchange-RD7VOZSB.js} +15 -16
  136. package/dist/{order-create-fulfillment-Y4HQ5YRS.js → order-create-fulfillment-QT3QP5EE.js} +9 -10
  137. package/dist/{order-create-refund-TCNCSOMX.js → order-create-refund-XHQREMTG.js} +13 -14
  138. package/dist/{order-create-return-EVSD6GKE.js → order-create-return-EOKSXD2G.js} +10 -10
  139. package/dist/{order-create-shipment-EWOJJXEM.js → order-create-shipment-664JCOKN.js} +9 -10
  140. package/dist/{order-detail-BOW62X75.js → order-detail-QUPHQYYD.js} +16 -17
  141. package/dist/{order-edit-billing-address-VKJV3V6N.js → order-edit-billing-address-WAG2HYJP.js} +11 -12
  142. package/dist/{order-edit-email-DQJW2SAM.js → order-edit-email-BVINKRKO.js} +10 -11
  143. package/dist/{order-edit-shipping-address-RIML4XFQ.js → order-edit-shipping-address-ZC5HY26W.js} +10 -11
  144. package/dist/{order-list-U5DZYLJK.js → order-list-2PKEFG4L.js} +5 -5
  145. package/dist/{order-metadata-WGZUETFN.js → order-metadata-NI65ZEFX.js} +9 -10
  146. package/dist/{order-receive-return-MDUU4L4X.js → order-receive-return-KJPDZB5H.js} +10 -11
  147. package/dist/{order-request-transfer-QFUMEZPD.js → order-request-transfer-X7D3T6YH.js} +10 -11
  148. package/dist/pages/index.d.ts +1 -28
  149. package/dist/pages/index.js +97 -107
  150. package/dist/{price-list-configuration-O3MR5IUA.js → price-list-configuration-Q5H22ZE2.js} +2 -2
  151. package/dist/{price-list-create-J4AJG42T.js → price-list-create-W2NKRFCV.js} +15 -16
  152. package/dist/{price-list-detail-D2ETNZ5N.js → price-list-detail-6M2QQ63Q.js} +15 -16
  153. package/dist/{price-list-edit-OJAYEUYO.js → price-list-edit-YY4SXEI3.js} +2 -2
  154. package/dist/{price-list-list-ARICU2NA.js → price-list-list-OIOY43TF.js} +4 -4
  155. package/dist/{price-list-prices-add-FQLQ5DPX.js → price-list-prices-add-KGW5H7JL.js} +14 -15
  156. package/dist/{price-list-prices-edit-4HBSUC5W.js → price-list-prices-edit-GS7L2BYX.js} +9 -10
  157. package/dist/{product-add-existing-attributes-IHCIKDIH.js → product-add-existing-attributes-3Q2LGRQO.js} +54 -18
  158. package/dist/{product-attributes-ZURXNZ3J.js → product-attributes-C3KHQF2I.js} +1 -1
  159. package/dist/{product-bulk-edit-LHCPVFUX.js → product-bulk-edit-J3CMBZN2.js} +1 -1
  160. package/dist/{product-create-TRJMKG2C.js → product-create-3WA2FHND.js} +14 -15
  161. package/dist/{product-create-attribute-UBWABT2Q.js → product-create-attribute-XARMC6FJ.js} +72 -44
  162. package/dist/{product-create-variant-MVYZPDO7.js → product-create-variant-6VUKYLWE.js} +4 -4
  163. package/dist/{product-detail-I57XSYLB.js → product-detail-OKHNAVKL.js} +11 -12
  164. package/dist/{product-edit-EDW3D2KW.js → product-edit-F4CKOIUO.js} +1 -1
  165. package/dist/product-edit-attribute-LG2ZM6HQ.js +175 -0
  166. package/dist/{product-list-PR532XII.js → product-list-OEM73MI2.js} +14 -15
  167. package/dist/{product-media-Y2KHDPMI.js → product-media-PKIQO5ZS.js} +3 -3
  168. package/dist/{product-metadata-T2D4GEIP.js → product-metadata-HMRYPUVS.js} +9 -10
  169. package/dist/{product-organization-D6UMZAUE.js → product-organization-BFWDCHP4.js} +3 -46
  170. package/dist/{product-sales-channels-NTT6KMSD.js → product-sales-channels-WKQSYOEX.js} +2 -2
  171. package/dist/{product-shipping-profile-WM7LORFB.js → product-shipping-profile-WDLKA2SN.js} +1 -1
  172. package/dist/{product-tag-create-47G425O2.js → product-tag-create-JPRBCLRG.js} +9 -10
  173. package/dist/{product-tag-detail-VNGOBWYE.js → product-tag-detail-KAVDX34C.js} +17 -18
  174. package/dist/{product-tag-edit-DN7IVL75.js → product-tag-edit-HZSUOL64.js} +9 -10
  175. package/dist/{product-tag-list-ZGRJZT2U.js → product-tag-list-FECZ4YS2.js} +17 -18
  176. package/dist/{product-tag-metadata-YLDBRJMI.js → product-tag-metadata-YP4SOBCH.js} +9 -10
  177. package/dist/{product-type-detail-MPONGCVO.js → product-type-detail-BWAJ2JO5.js} +14 -15
  178. package/dist/{product-type-metadata-TDAER7JD.js → product-type-metadata-EJOBRGZ6.js} +9 -10
  179. package/dist/{product-variant-detail-5BF6JTHV.js → product-variant-detail-VXWES7XS.js} +10 -11
  180. package/dist/{product-variant-edit-2RHFG2CZ.js → product-variant-edit-XH4R6M3D.js} +11 -12
  181. package/dist/{product-variant-metadata-G2LLH7YK.js → product-variant-metadata-Y6SO5UJI.js} +9 -10
  182. package/dist/{promotion-create-G3M4UJX2.js → promotion-create-7HDNJF2T.js} +11 -12
  183. package/dist/{promotion-detail-6D6CP457.js → promotion-detail-KTPZUDXT.js} +12 -13
  184. package/dist/{promotion-list-TCRTBVR6.js → promotion-list-SSWK44YZ.js} +4 -4
  185. package/dist/{refund-reason-create-6RPQHIJI.js → refund-reason-create-XDJFPVZL.js} +9 -10
  186. package/dist/{refund-reason-edit-W2TVZB3N.js → refund-reason-edit-VI5DSC7T.js} +9 -10
  187. package/dist/{refund-reason-list-TS6JWYS4.js → refund-reason-list-3PYLHTJZ.js} +14 -15
  188. package/dist/{region-metadata-TNSJDCBM.js → region-metadata-6RR2SU5H.js} +9 -10
  189. package/dist/{reservation-create-2TDZAX5A.js → reservation-create-LRSOJH6K.js} +2 -2
  190. package/dist/{reservation-detail-KFOVTTFH.js → reservation-detail-L4B27AVM.js} +10 -11
  191. package/dist/{reservation-list-K4RPXJTO.js → reservation-list-YWCTHZUL.js} +3 -3
  192. package/dist/{reservation-metadata-HBFAVVPW.js → reservation-metadata-W6IYXGPB.js} +9 -10
  193. package/dist/{reset-password-7UH4IQ6R.js → reset-password-EBZ65YXV.js} +1 -1
  194. package/dist/{return-reason-list-WBLPUYD4.js → return-reason-list-74IYCLLS.js} +5 -5
  195. package/dist/{sales-channel-add-products-IHGDKRKH.js → sales-channel-add-products-6UPTDZPP.js} +13 -14
  196. package/dist/{sales-channel-create-MPZCRQBT.js → sales-channel-create-XBR3QESI.js} +2 -2
  197. package/dist/{sales-channel-detail-QCFO7VUA.js → sales-channel-detail-H6XNWIK6.js} +14 -15
  198. package/dist/{sales-channel-edit-GILK4QK3.js → sales-channel-edit-ILBZBQP4.js} +2 -2
  199. package/dist/{sales-channel-list-YNHR5EHL.js → sales-channel-list-VA2OASCG.js} +10 -11
  200. package/dist/{sales-channel-metadata-OEQVWJRQ.js → sales-channel-metadata-ILMPQGG3.js} +9 -10
  201. package/dist/{shipping-option-type-create-SMXDCF6I.js → shipping-option-type-create-6JJFI3KO.js} +9 -10
  202. package/dist/{shipping-option-type-detail-MO3YRUVR.js → shipping-option-type-detail-QOQ4EE2K.js} +11 -12
  203. package/dist/{shipping-option-type-edit-KO64TZS6.js → shipping-option-type-edit-OQWZ7PWX.js} +9 -10
  204. package/dist/{shipping-option-type-list-6C26GWDM.js → shipping-option-type-list-YRDWTDMK.js} +11 -12
  205. package/dist/{shipping-profile-metadata-FLTMLAZN.js → shipping-profile-metadata-TFG6BEVX.js} +9 -10
  206. package/dist/{store-bulk-edit-LW6ABDJK.js → store-bulk-edit-BNF3HH5K.js} +1 -1
  207. package/dist/{store-create-STR6YNFJ.js → store-create-MIMJEBST.js} +9 -10
  208. package/dist/{store-details-3U4OEFWC.js → store-details-TGB2GFLX.js} +16 -17
  209. package/dist/{store-edit-KBFFB2DI.js → store-edit-XNZRRLYY.js} +3 -3
  210. package/dist/{store-list-PJ3U254I.js → store-list-BLXUWEG3.js} +14 -15
  211. package/dist/{store-member-invite-AKH3KHMF.js → store-member-invite-J5XSPWMW.js} +1 -1
  212. package/dist/{tax-region-create-I2ZGT2PH.js → tax-region-create-FN4W4SQK.js} +10 -11
  213. package/dist/{tax-region-detail-LVN5XSN5.js → tax-region-detail-XN4P6VR5.js} +11 -12
  214. package/dist/{tax-region-edit-4PJV5F5X.js → tax-region-edit-RCGY5D3G.js} +9 -10
  215. package/dist/{tax-region-metadata-EYRFMJLL.js → tax-region-metadata-NKJXZ4SR.js} +9 -10
  216. package/dist/{tax-region-province-detail-MTHKW7LW.js → tax-region-province-detail-L2TWOQ7H.js} +11 -12
  217. package/dist/{tax-region-tax-override-create-OGW3MPBD.js → tax-region-tax-override-create-767T73RO.js} +16 -17
  218. package/dist/{tax-region-tax-override-edit-LTZCYN4Y.js → tax-region-tax-override-edit-T2BK7ZPA.js} +16 -17
  219. package/dist/{user-detail-2OTVNTCL.js → user-detail-MMVBN3AE.js} +1 -1
  220. package/dist/{user-metadata-GIR3A7WO.js → user-metadata-IZCJT3N5.js} +9 -10
  221. package/package.json +1 -1
  222. package/dist/chunk-DDANJIE7.js +0 -207
  223. package/dist/chunk-J65IXAGI.js +0 -292
  224. package/dist/chunk-V5XHY5LP.js +0 -39
  225. package/dist/chunk-ZZ3XFIEM.js +0 -84
  226. package/dist/product-brand-create-B3ZJGHUQ.js +0 -171
  227. package/dist/product-brand-detail-O7UKYV4H.js +0 -100
  228. package/dist/product-brand-edit-3TQDHZNN.js +0 -179
  229. package/dist/product-brand-list-ZBPBSRQN.js +0 -30
  230. package/dist/product-brand-metadata-N2CJ5K3Z.js +0 -87
  231. package/dist/{chunk-DV7QV3X2.js → chunk-XODBX3LN.js} +3 -3
@@ -8,12 +8,11 @@ import {
8
8
  RouteDrawer
9
9
  } from "./chunk-FWJLS7XD.js";
10
10
  import "./chunk-3QSRE5LS.js";
11
- import "./chunk-46A3QXAL.js";
11
+ import "./chunk-LOIFUOOA.js";
12
12
  import "./chunk-OH4AABUT.js";
13
+ import "./chunk-NJP3DEE5.js";
13
14
  import "./chunk-AEMDNTW5.js";
14
15
  import "./chunk-LYD3C73Z.js";
15
- import "./chunk-ZZ3XFIEM.js";
16
- import "./chunk-4RT7P5ZQ.js";
17
16
  import "./chunk-533GMKEG.js";
18
17
  import "./chunk-46M463BR.js";
19
18
  import "./chunk-YFRC6GEN.js";
@@ -28,24 +27,24 @@ import "./chunk-ESPLVOFC.js";
28
27
  import "./chunk-N6SI4IIT.js";
29
28
  import "./chunk-WJJXUXSO.js";
30
29
  import "./chunk-LAPEZATU.js";
31
- import "./chunk-2ZRWLCYP.js";
32
- import "./chunk-E5WBU7ZR.js";
30
+ import "./chunk-453BC56K.js";
31
+ import "./chunk-Z5T5EPLF.js";
33
32
  import "./chunk-FXWKGNRV.js";
34
33
  import "./chunk-VDKOJ5WD.js";
35
34
  import "./chunk-ZN7LWXVC.js";
36
35
  import "./chunk-5TRY5IMZ.js";
37
36
  import "./chunk-EPHVGD5Z.js";
38
- import "./chunk-N3BYBEDV.js";
39
- import "./chunk-ZB4SO44T.js";
37
+ import "./chunk-2WHSCEKX.js";
38
+ import "./chunk-P5XVG4PY.js";
40
39
  import "./chunk-VYMODH6P.js";
41
40
  import "./chunk-LEG67A2R.js";
42
41
  import "./chunk-PRBE5CM3.js";
43
- import "./chunk-FEC24V7X.js";
44
- import "./chunk-EB5QHYKL.js";
42
+ import "./chunk-6FHQCLHQ.js";
43
+ import "./chunk-DN2K5EAH.js";
45
44
  import "./chunk-LAVHRER2.js";
46
45
  import "./chunk-Y7QKP6QU.js";
47
46
  import "./chunk-INNFZYX2.js";
48
- import "./chunk-ZRFWXNT3.js";
47
+ import "./chunk-H3MAUKL7.js";
49
48
  import "./chunk-RHKRREUU.js";
50
49
  import "./chunk-ZA2KFUFR.js";
51
50
  import "./chunk-ZBWL72TB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercurjs/admin",
3
- "version": "2.2.0-canary.7",
3
+ "version": "2.2.0-canary.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mercurjs/mercur",
@@ -1,207 +0,0 @@
1
- import {
2
- useDeleteProductBrandAction
3
- } from "./chunk-V5XHY5LP.js";
4
- import {
5
- useProductTableColumns
6
- } from "./chunk-6NDM5WGE.js";
7
- import {
8
- useProductTableFilters
9
- } from "./chunk-NMFVQDVF.js";
10
- import {
11
- useProductTableQuery
12
- } from "./chunk-LYZDVZWA.js";
13
- import {
14
- _DataTable,
15
- useDataTable
16
- } from "./chunk-NQEXDLYH.js";
17
- import {
18
- SingleColumnPage
19
- } from "./chunk-H6MYB7GB.js";
20
- import {
21
- useProductBrand
22
- } from "./chunk-ZZ3XFIEM.js";
23
- import {
24
- ActionMenu
25
- } from "./chunk-BDGZ4EQO.js";
26
- import {
27
- SingleColumnPageSkeleton
28
- } from "./chunk-INNFZYX2.js";
29
- import {
30
- useProducts
31
- } from "./chunk-ZRFWXNT3.js";
32
-
33
- // src/pages/product-brands/product-brand-detail/product-brand-detail.tsx
34
- import { Children } from "react";
35
- import { useLoaderData, useParams } from "react-router-dom";
36
-
37
- // src/pages/product-brands/product-brand-detail/components/product-brand-general-section/product-brand-general-section.tsx
38
- import { PencilSquare, Trash } from "@medusajs/icons";
39
- import { Container, Heading, Text } from "@medusajs/ui";
40
- import { useTranslation } from "react-i18next";
41
- import { jsx, jsxs } from "react/jsx-runtime";
42
- var ProductBrandGeneralSection = ({
43
- productBrand
44
- }) => {
45
- const { t } = useTranslation();
46
- const handleDelete = useDeleteProductBrandAction(
47
- productBrand.id,
48
- productBrand.name
49
- );
50
- return /* @__PURE__ */ jsxs(
51
- Container,
52
- {
53
- className: "flex items-center justify-between",
54
- "data-testid": "product-brand-general-section-container",
55
- children: [
56
- /* @__PURE__ */ jsxs("div", { children: [
57
- /* @__PURE__ */ jsx(Heading, { "data-testid": "product-brand-general-section-heading", children: productBrand.name }),
58
- /* @__PURE__ */ jsxs(
59
- Text,
60
- {
61
- size: "small",
62
- className: "text-ui-fg-subtle",
63
- "data-testid": "product-brand-general-section-handle",
64
- children: [
65
- "/",
66
- productBrand.handle
67
- ]
68
- }
69
- )
70
- ] }),
71
- /* @__PURE__ */ jsx(
72
- ActionMenu,
73
- {
74
- groups: [
75
- {
76
- actions: [
77
- {
78
- label: t("actions.edit"),
79
- icon: /* @__PURE__ */ jsx(PencilSquare, {}),
80
- to: "edit"
81
- }
82
- ]
83
- },
84
- {
85
- actions: [
86
- {
87
- label: t("actions.delete"),
88
- icon: /* @__PURE__ */ jsx(Trash, {}),
89
- onClick: handleDelete
90
- }
91
- ]
92
- }
93
- ],
94
- "data-testid": "product-brand-general-section-action-menu"
95
- }
96
- )
97
- ]
98
- }
99
- );
100
- };
101
-
102
- // src/pages/product-brands/product-brand-detail/components/product-brand-product-section/product-brand-product-section.tsx
103
- import { Container as Container2, Heading as Heading2 } from "@medusajs/ui";
104
- import { useTranslation as useTranslation2 } from "react-i18next";
105
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
106
- var PAGE_SIZE = 10;
107
- var ProductBrandProductSection = ({
108
- productBrand
109
- }) => {
110
- const { t } = useTranslation2();
111
- const { searchParams, raw } = useProductTableQuery({
112
- pageSize: PAGE_SIZE
113
- });
114
- const { products, count, isPending, isError, error } = useProducts({
115
- ...searchParams,
116
- brand_id: [productBrand.id]
117
- });
118
- const filters = useProductTableFilters();
119
- const columns = useProductTableColumns();
120
- const { table } = useDataTable({
121
- columns,
122
- data: products,
123
- count: products?.length || 0,
124
- getRowId: (row) => row.id,
125
- pageSize: PAGE_SIZE
126
- });
127
- if (isError) {
128
- throw error;
129
- }
130
- return /* @__PURE__ */ jsxs2(
131
- Container2,
132
- {
133
- className: "divide-y p-0",
134
- "data-testid": "product-brand-product-section-container",
135
- children: [
136
- /* @__PURE__ */ jsx2(
137
- "div",
138
- {
139
- className: "px-6 py-4",
140
- "data-testid": "product-brand-product-section-header",
141
- children: /* @__PURE__ */ jsx2(
142
- Heading2,
143
- {
144
- level: "h2",
145
- "data-testid": "product-brand-product-section-heading",
146
- children: t("products.domain")
147
- }
148
- )
149
- }
150
- ),
151
- /* @__PURE__ */ jsx2(
152
- _DataTable,
153
- {
154
- table,
155
- filters,
156
- isLoading: isPending,
157
- columns,
158
- count,
159
- pageSize: PAGE_SIZE,
160
- navigateTo: ({ original }) => `/products/${original.id}`,
161
- orderBy: [
162
- { key: "title", label: t("fields.title") },
163
- { key: "created_at", label: t("fields.createdAt") },
164
- { key: "updated_at", label: t("fields.updatedAt") }
165
- ],
166
- queryObject: raw,
167
- search: true,
168
- pagination: true,
169
- "data-testid": "product-brand-product-section-table"
170
- }
171
- )
172
- ]
173
- }
174
- );
175
- };
176
-
177
- // src/pages/product-brands/product-brand-detail/product-brand-detail.tsx
178
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
179
- var Root = ({ children }) => {
180
- const { id } = useParams();
181
- const initialData = useLoaderData();
182
- const { product_brand, isPending, isError, error } = useProductBrand(
183
- id,
184
- void 0,
185
- {
186
- initialData
187
- }
188
- );
189
- if (isPending || !product_brand) {
190
- return /* @__PURE__ */ jsx3(SingleColumnPageSkeleton, { sections: 2, showJSON: true, showMetadata: true });
191
- }
192
- if (isError) {
193
- throw error;
194
- }
195
- return Children.count(children) > 0 ? /* @__PURE__ */ jsx3(SingleColumnPage, { showJSON: true, showMetadata: true, data: product_brand, children }) : /* @__PURE__ */ jsxs3(SingleColumnPage, { showJSON: true, showMetadata: true, data: product_brand, children: [
196
- /* @__PURE__ */ jsx3(ProductBrandGeneralSection, { productBrand: product_brand }),
197
- /* @__PURE__ */ jsx3(ProductBrandProductSection, { productBrand: product_brand })
198
- ] });
199
- };
200
- var ProductBrandDetailPage = Object.assign(Root, {
201
- GeneralSection: ProductBrandGeneralSection,
202
- ProductSection: ProductBrandProductSection
203
- });
204
-
205
- export {
206
- ProductBrandDetailPage
207
- };
@@ -1,292 +0,0 @@
1
- import {
2
- useDeleteProductBrandAction
3
- } from "./chunk-V5XHY5LP.js";
4
- import {
5
- useDateTableFilters
6
- } from "./chunk-26OOAKQ6.js";
7
- import {
8
- DateCell
9
- } from "./chunk-25LYVP3C.js";
10
- import {
11
- TextCell
12
- } from "./chunk-JHIMVLB2.js";
13
- import {
14
- _DataTable,
15
- useDataTable
16
- } from "./chunk-NQEXDLYH.js";
17
- import {
18
- SingleColumnPage
19
- } from "./chunk-H6MYB7GB.js";
20
- import {
21
- useQueryParams
22
- } from "./chunk-THHRRYRS.js";
23
- import {
24
- useProductBrands
25
- } from "./chunk-ZZ3XFIEM.js";
26
- import {
27
- ActionMenu
28
- } from "./chunk-BDGZ4EQO.js";
29
-
30
- // src/pages/product-brands/product-brand-list/product-brand-list.tsx
31
- import { Children as Children3 } from "react";
32
-
33
- // src/pages/product-brands/product-brand-list/components/product-brand-list-view/product-brand-list-view.tsx
34
- import { Children as Children2 } from "react";
35
- import { Container } from "@medusajs/ui";
36
-
37
- // src/pages/product-brands/product-brand-list/components/product-brand-list-view/product-brand-list-data-table.tsx
38
- import { keepPreviousData } from "@tanstack/react-query";
39
- import { createColumnHelper as createColumnHelper2 } from "@tanstack/react-table";
40
- import { useMemo as useMemo2 } from "react";
41
- import { useTranslation as useTranslation3 } from "react-i18next";
42
-
43
- // src/hooks/table/columns/use-product-brand-table-columns.tsx
44
- import { createColumnHelper } from "@tanstack/react-table";
45
- import { useMemo } from "react";
46
- import { useTranslation } from "react-i18next";
47
- import { jsx } from "react/jsx-runtime";
48
- var columnHelper = createColumnHelper();
49
- var useProductBrandTableColumns = () => {
50
- const { t } = useTranslation();
51
- return useMemo(
52
- () => [
53
- columnHelper.accessor("name", {
54
- header: () => t("fields.name"),
55
- cell: ({ getValue }) => /* @__PURE__ */ jsx(TextCell, { text: getValue() })
56
- }),
57
- columnHelper.accessor("handle", {
58
- header: () => t("fields.handle"),
59
- cell: ({ getValue }) => /* @__PURE__ */ jsx(TextCell, { text: getValue() })
60
- }),
61
- columnHelper.accessor("created_at", {
62
- header: () => t("fields.createdAt"),
63
- cell: ({ getValue }) => {
64
- return /* @__PURE__ */ jsx(DateCell, { date: getValue() });
65
- }
66
- }),
67
- columnHelper.accessor("updated_at", {
68
- header: () => t("fields.updatedAt"),
69
- cell: ({ getValue }) => {
70
- return /* @__PURE__ */ jsx(DateCell, { date: getValue() });
71
- }
72
- })
73
- ],
74
- [t]
75
- );
76
- };
77
-
78
- // src/hooks/table/filters/use-product-brand-table-filters.tsx
79
- var useProductBrandTableFilters = () => {
80
- const dateFilters = useDateTableFilters();
81
- return dateFilters;
82
- };
83
-
84
- // src/hooks/table/query/use-product-brand-table-query.tsx
85
- var useProductBrandTableQuery = ({
86
- prefix,
87
- pageSize = 20
88
- }) => {
89
- const queryObject = useQueryParams(
90
- ["offset", "q", "order", "created_at", "updated_at"],
91
- prefix
92
- );
93
- const { offset, q, order, created_at, updated_at } = queryObject;
94
- const searchParams = {
95
- limit: pageSize,
96
- offset: offset ? Number(offset) : 0,
97
- order,
98
- created_at: created_at ? JSON.parse(created_at) : void 0,
99
- updated_at: updated_at ? JSON.parse(updated_at) : void 0,
100
- q
101
- };
102
- return {
103
- searchParams,
104
- raw: queryObject
105
- };
106
- };
107
-
108
- // src/pages/product-brands/product-brand-list/components/product-brand-list-table/product-brand-row-actions.tsx
109
- import { PencilSquare, Trash } from "@medusajs/icons";
110
- import { useTranslation as useTranslation2 } from "react-i18next";
111
- import { jsx as jsx2 } from "react/jsx-runtime";
112
- var ProductBrandRowActions = ({
113
- productBrand
114
- }) => {
115
- const { t } = useTranslation2();
116
- const handleDelete = useDeleteProductBrandAction(
117
- productBrand.id,
118
- productBrand.name
119
- );
120
- return /* @__PURE__ */ jsx2(
121
- ActionMenu,
122
- {
123
- groups: [
124
- {
125
- actions: [
126
- {
127
- label: t("actions.edit"),
128
- icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
129
- to: `/settings/product-brands/${productBrand.id}/edit`
130
- }
131
- ]
132
- },
133
- {
134
- actions: [
135
- {
136
- label: t("actions.delete"),
137
- icon: /* @__PURE__ */ jsx2(Trash, {}),
138
- onClick: handleDelete
139
- }
140
- ]
141
- }
142
- ],
143
- "data-testid": `product-brand-list-table-action-menu-${productBrand.id}`
144
- }
145
- );
146
- };
147
-
148
- // src/pages/product-brands/product-brand-list/components/product-brand-list-view/product-brand-list-data-table.tsx
149
- import { jsx as jsx3 } from "react/jsx-runtime";
150
- var PAGE_SIZE = 20;
151
- var ProductBrandListDataTable = () => {
152
- const { t } = useTranslation3();
153
- const { searchParams, raw } = useProductBrandTableQuery({
154
- pageSize: PAGE_SIZE
155
- });
156
- const { product_brands, count, isLoading, isError, error } = useProductBrands(
157
- searchParams,
158
- {
159
- placeholderData: keepPreviousData
160
- }
161
- );
162
- const filters = useProductBrandTableFilters();
163
- const columns = useColumns();
164
- const { table } = useDataTable({
165
- columns,
166
- data: product_brands,
167
- count,
168
- getRowId: (row) => row.id,
169
- pageSize: PAGE_SIZE
170
- });
171
- if (isError) {
172
- throw error;
173
- }
174
- return /* @__PURE__ */ jsx3(
175
- _DataTable,
176
- {
177
- table,
178
- filters,
179
- isLoading,
180
- columns,
181
- pageSize: PAGE_SIZE,
182
- count,
183
- orderBy: [
184
- { key: "name", label: t("fields.name") },
185
- { key: "handle", label: t("fields.handle") },
186
- { key: "created_at", label: t("fields.createdAt") },
187
- { key: "updated_at", label: t("fields.updatedAt") }
188
- ],
189
- navigateTo: ({ original }) => original.id,
190
- queryObject: raw,
191
- pagination: true,
192
- search: true,
193
- "data-testid": "product-brand-list-table"
194
- }
195
- );
196
- };
197
- var columnHelper2 = createColumnHelper2();
198
- var useColumns = () => {
199
- const base = useProductBrandTableColumns();
200
- return useMemo2(
201
- () => [
202
- ...base,
203
- columnHelper2.display({
204
- id: "actions",
205
- cell: ({ row }) => {
206
- return /* @__PURE__ */ jsx3(ProductBrandRowActions, { productBrand: row.original });
207
- }
208
- })
209
- ],
210
- [base]
211
- );
212
- };
213
-
214
- // src/pages/product-brands/product-brand-list/components/product-brand-list-view/product-brand-list-header.tsx
215
- import { Children } from "react";
216
- import { Button, Heading, Text } from "@medusajs/ui";
217
- import { useTranslation as useTranslation4 } from "react-i18next";
218
- import { Link } from "react-router-dom";
219
- import { Fragment, jsx as jsx4, jsxs } from "react/jsx-runtime";
220
- var ProductBrandListTitle = () => {
221
- const { t } = useTranslation4();
222
- return /* @__PURE__ */ jsxs("div", { children: [
223
- /* @__PURE__ */ jsx4(Heading, { "data-testid": "product-brand-list-table-heading", children: t("productBrands.domain") }),
224
- /* @__PURE__ */ jsx4(
225
- Text,
226
- {
227
- className: "text-ui-fg-subtle",
228
- size: "small",
229
- "data-testid": "product-brand-list-table-subtitle",
230
- children: t("productBrands.subtitle")
231
- }
232
- )
233
- ] });
234
- };
235
- var ProductBrandListActions = ({
236
- children
237
- }) => {
238
- const { t } = useTranslation4();
239
- return /* @__PURE__ */ jsx4("div", { className: "flex items-center justify-center gap-x-2", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsx4(
240
- Button,
241
- {
242
- size: "small",
243
- variant: "secondary",
244
- asChild: true,
245
- "data-testid": "product-brand-list-table-create-button",
246
- children: /* @__PURE__ */ jsx4(Link, { to: "create", children: t("actions.create") })
247
- }
248
- ) });
249
- };
250
- var ProductBrandListHeader = ({
251
- children
252
- }) => {
253
- return /* @__PURE__ */ jsx4(
254
- "div",
255
- {
256
- className: "flex items-center justify-between px-6 py-4",
257
- "data-testid": "product-brand-list-table-header",
258
- children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
259
- /* @__PURE__ */ jsx4(ProductBrandListTitle, {}),
260
- /* @__PURE__ */ jsx4(ProductBrandListActions, {})
261
- ] })
262
- }
263
- );
264
- };
265
-
266
- // src/pages/product-brands/product-brand-list/components/product-brand-list-view/product-brand-list-view.tsx
267
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
268
- var ProductBrandListView = ({
269
- children
270
- }) => {
271
- return /* @__PURE__ */ jsx5(Container, { className: "divide-y p-0", children: Children2.count(children) > 0 ? children : /* @__PURE__ */ jsxs2(Fragment2, { children: [
272
- /* @__PURE__ */ jsx5(ProductBrandListHeader, {}),
273
- /* @__PURE__ */ jsx5(ProductBrandListDataTable, {})
274
- ] }) });
275
- };
276
-
277
- // src/pages/product-brands/product-brand-list/product-brand-list.tsx
278
- import { jsx as jsx6 } from "react/jsx-runtime";
279
- var Root = ({ children }) => {
280
- return /* @__PURE__ */ jsx6(SingleColumnPage, { children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx6(ProductBrandListView, {}) });
281
- };
282
- var ProductBrandListPage = Object.assign(Root, {
283
- Table: ProductBrandListView,
284
- Header: ProductBrandListHeader,
285
- HeaderTitle: ProductBrandListTitle,
286
- HeaderActions: ProductBrandListActions,
287
- DataTable: ProductBrandListDataTable
288
- });
289
-
290
- export {
291
- ProductBrandListPage
292
- };
@@ -1,39 +0,0 @@
1
- import {
2
- useDeleteProductBrand
3
- } from "./chunk-ZZ3XFIEM.js";
4
-
5
- // src/pages/product-brands/common/hooks/use-delete-product-brand-action.tsx
6
- import { useNavigate } from "react-router-dom";
7
- import { toast, usePrompt } from "@medusajs/ui";
8
- import { useTranslation } from "react-i18next";
9
- var useDeleteProductBrandAction = (id, name) => {
10
- const { t } = useTranslation();
11
- const prompt = usePrompt();
12
- const navigate = useNavigate();
13
- const { mutateAsync } = useDeleteProductBrand(id);
14
- const handleDelete = async () => {
15
- const result = await prompt({
16
- title: t("general.areYouSure"),
17
- description: t("productBrands.delete.confirmation", { name }),
18
- confirmText: t("actions.delete"),
19
- cancelText: t("actions.cancel")
20
- });
21
- if (!result) {
22
- return;
23
- }
24
- await mutateAsync(void 0, {
25
- onSuccess: () => {
26
- navigate("/settings/product-brands", { replace: true });
27
- toast.success(t("productBrands.delete.successToast", { name }));
28
- },
29
- onError: (e) => {
30
- toast.error(e.message);
31
- }
32
- });
33
- };
34
- return handleDelete;
35
- };
36
-
37
- export {
38
- useDeleteProductBrandAction
39
- };
@@ -1,84 +0,0 @@
1
- import {
2
- queryClient
3
- } from "./chunk-RHKRREUU.js";
4
- import {
5
- queryKeysFactory
6
- } from "./chunk-ZA2KFUFR.js";
7
- import {
8
- sdk
9
- } from "./chunk-ZBWL72TB.js";
10
-
11
- // src/hooks/api/product-brands.tsx
12
- import {
13
- useMutation,
14
- useQuery
15
- } from "@tanstack/react-query";
16
- var PRODUCT_BRANDS_QUERY_KEY = "product_brands";
17
- var productBrandsQueryKeys = queryKeysFactory(PRODUCT_BRANDS_QUERY_KEY);
18
- var useProductBrand = (id, query, options) => {
19
- const { data, ...rest } = useQuery({
20
- queryFn: () => sdk.admin.productBrands.$id.query({ $id: id, ...query }),
21
- queryKey: productBrandsQueryKeys.detail(id),
22
- ...options
23
- });
24
- return { ...data, ...rest };
25
- };
26
- var useProductBrands = (query, options) => {
27
- const { data, ...rest } = useQuery({
28
- queryFn: () => sdk.admin.productBrands.query({ ...query }),
29
- queryKey: productBrandsQueryKeys.list(query),
30
- ...options
31
- });
32
- return { ...data, ...rest };
33
- };
34
- var useCreateProductBrand = (options) => {
35
- return useMutation({
36
- mutationFn: (payload) => sdk.admin.productBrands.mutate(payload),
37
- onSuccess: (data, variables, context) => {
38
- queryClient.invalidateQueries({
39
- queryKey: productBrandsQueryKeys.lists()
40
- });
41
- options?.onSuccess?.(data, variables, context);
42
- },
43
- ...options
44
- });
45
- };
46
- var useUpdateProductBrand = (id, options) => {
47
- return useMutation({
48
- mutationFn: (payload) => sdk.admin.productBrands.$id.mutate({ $id: id, ...payload }),
49
- onSuccess: (data, variables, context) => {
50
- queryClient.invalidateQueries({
51
- queryKey: productBrandsQueryKeys.detail(id)
52
- });
53
- queryClient.invalidateQueries({
54
- queryKey: productBrandsQueryKeys.lists()
55
- });
56
- options?.onSuccess?.(data, variables, context);
57
- },
58
- ...options
59
- });
60
- };
61
- var useDeleteProductBrand = (id, options) => {
62
- return useMutation({
63
- mutationFn: () => sdk.admin.productBrands.$id.delete({ $id: id }),
64
- onSuccess: (data, variables, context) => {
65
- queryClient.invalidateQueries({
66
- queryKey: productBrandsQueryKeys.detail(id)
67
- });
68
- queryClient.invalidateQueries({
69
- queryKey: productBrandsQueryKeys.lists()
70
- });
71
- options?.onSuccess?.(data, variables, context);
72
- },
73
- ...options
74
- });
75
- };
76
-
77
- export {
78
- productBrandsQueryKeys,
79
- useProductBrand,
80
- useProductBrands,
81
- useCreateProductBrand,
82
- useUpdateProductBrand,
83
- useDeleteProductBrand
84
- };