@medusajs/dashboard 2.12.2 → 2.12.3-preview-20251217000306

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 (185) hide show
  1. package/dist/{add-campaign-promotions-JQKPED4U.mjs → add-campaign-promotions-4QLXO46G.mjs} +4 -4
  2. package/dist/{api-key-management-detail-AWFAZIS3.mjs → api-key-management-detail-THD74G7I.mjs} +9 -9
  3. package/dist/{api-key-management-list-RGLZMUCB.mjs → api-key-management-list-66CFOILY.mjs} +5 -5
  4. package/dist/{api-key-management-sales-channels-7FVABESO.mjs → api-key-management-sales-channels-HN3THM5J.mjs} +5 -5
  5. package/dist/app.js +12509 -9129
  6. package/dist/app.mjs +6 -6
  7. package/dist/{campaign-detail-63VVZZRR.mjs → campaign-detail-WR3XHHV2.mjs} +9 -9
  8. package/dist/{campaign-list-OH566KWW.mjs → campaign-list-PEOTTWBA.mjs} +6 -6
  9. package/dist/{categories-metadata-MWCZ2DYL.mjs → categories-metadata-BCZ463KN.mjs} +4 -4
  10. package/dist/{category-detail-XL6NRY6P.mjs → category-detail-4HXJ5Z7N.mjs} +11 -11
  11. package/dist/{category-list-AH2EGTI7.mjs → category-list-OCJY2UJV.mjs} +4 -4
  12. package/dist/{category-products-STYU4DUG.mjs → category-products-2HXLZDHL.mjs} +11 -11
  13. package/dist/{chunk-KF7ZWW4K.mjs → chunk-2NZDHAOE.mjs} +1 -1
  14. package/dist/chunk-35LSPN2U.mjs +66 -0
  15. package/dist/{chunk-SUYYSKCB.mjs → chunk-535OVBXR.mjs} +8 -1
  16. package/dist/{chunk-UKECZ5PA.mjs → chunk-5DUMSVP6.mjs} +1 -1
  17. package/dist/{chunk-CZFLKMYE.mjs → chunk-6W3BKVOC.mjs} +4 -4
  18. package/dist/{chunk-Q6ULXDU6.mjs → chunk-7ZYDO3XO.mjs} +3745 -474
  19. package/dist/{chunk-5IFK2ZTA.mjs → chunk-APGDAT7X.mjs} +2 -2
  20. package/dist/{chunk-EQBVGH3N.mjs → chunk-B3AOQW2B.mjs} +1 -1
  21. package/dist/{chunk-2X25XWOW.mjs → chunk-BTYBTKWK.mjs} +1 -1
  22. package/dist/{chunk-DZWH2RV6.mjs → chunk-DFFLVEZ5.mjs} +1 -1
  23. package/dist/{chunk-YTN73JYH.mjs → chunk-DTZXEQXZ.mjs} +1 -1
  24. package/dist/{chunk-7R743WZ6.mjs → chunk-EHU67PIM.mjs} +1 -1
  25. package/dist/{chunk-4VNR7DND.mjs → chunk-F5NZDW7L.mjs} +2 -2
  26. package/dist/{chunk-JJGE3EV6.mjs → chunk-F63F3FIT.mjs} +2 -2
  27. package/dist/{chunk-EXDBX4YX.mjs → chunk-F65T2X7G.mjs} +3 -3
  28. package/dist/{chunk-VX2HE7O5.mjs → chunk-FBYTX6K7.mjs} +1 -1
  29. package/dist/{chunk-AMOGGDOW.mjs → chunk-HFT7Q5Y5.mjs} +1 -1
  30. package/dist/{chunk-XTQ7UFA3.mjs → chunk-MY6I7UJG.mjs} +1 -1
  31. package/dist/{chunk-HMY4BGRC.mjs → chunk-NT6C7CHT.mjs} +1 -1
  32. package/dist/{chunk-GA3UMQMZ.mjs → chunk-O7JNIATG.mjs} +1 -1
  33. package/dist/{chunk-M4Q5Q4I3.mjs → chunk-PA3T6IWL.mjs} +2 -2
  34. package/dist/{chunk-4G2UHUXX.mjs → chunk-PXJFCRIV.mjs} +11 -11
  35. package/dist/{chunk-NL376WAO.mjs → chunk-QISH26J3.mjs} +1 -1
  36. package/dist/{chunk-PVW6M64S.mjs → chunk-QOCJPBRB.mjs} +1 -1
  37. package/dist/{chunk-JUVGXLY5.mjs → chunk-QPKW37WR.mjs} +1 -1
  38. package/dist/{chunk-2GWGNMAA.mjs → chunk-R4ZOO4ON.mjs} +1 -1
  39. package/dist/{chunk-GN6OCHP4.mjs → chunk-RU4ZS47V.mjs} +11 -1
  40. package/dist/{chunk-ROKB75YP.mjs → chunk-VT2JJ5C2.mjs} +1 -1
  41. package/dist/{chunk-EUF6RSI7.mjs → chunk-Y5UO73CH.mjs} +17 -1
  42. package/dist/{chunk-YV4ANEZF.mjs → chunk-YAPTGHGP.mjs} +1 -1
  43. package/dist/{chunk-CV65NY6Y.mjs → chunk-YFIYCS7F.mjs} +1 -1
  44. package/dist/{chunk-FIFVOKTK.mjs → chunk-Z6NHG5LQ.mjs} +1 -1
  45. package/dist/{chunk-GU5PJRPM.mjs → chunk-ZQJPHZKI.mjs} +1 -1
  46. package/dist/{collection-add-products-ESZEWJ46.mjs → collection-add-products-JWAQ277T.mjs} +11 -11
  47. package/dist/{collection-detail-K6IVWLIL.mjs → collection-detail-F4ON763T.mjs} +11 -11
  48. package/dist/{collection-list-BL7A7SEI.mjs → collection-list-4C5HVO6Y.mjs} +18 -18
  49. package/dist/{collection-metadata-4EYMP7BJ.mjs → collection-metadata-P4A5DXBQ.mjs} +4 -4
  50. package/dist/{customer-detail-KAS23VQF.mjs → customer-detail-X3RQJPXP.mjs} +13 -13
  51. package/dist/{customer-group-add-customers-HUGHHMU6.mjs → customer-group-add-customers-SOXMSWQH.mjs} +9 -9
  52. package/dist/{customer-group-detail-NDATWX3X.mjs → customer-group-detail-NG32WKJT.mjs} +13 -13
  53. package/dist/{customer-group-list-IASP3QHT.mjs → customer-group-list-EBETHKKO.mjs} +7 -7
  54. package/dist/{customer-list-ZXCGIXJC.mjs → customer-list-UI5EQDII.mjs} +9 -9
  55. package/dist/{customers-add-customer-group-UCCFXRXX.mjs → customers-add-customer-group-7FYD54MZ.mjs} +11 -11
  56. package/dist/{edit-rules-P5A2TLLU.mjs → edit-rules-2W3BXEXR.mjs} +4 -4
  57. package/dist/en.json +12 -0
  58. package/dist/{inventory-create-KXFY3TQL.mjs → inventory-create-VQEK7C5T.mjs} +4 -4
  59. package/dist/{inventory-detail-ZAZCDL6E.mjs → inventory-detail-HUHQ6ZNE.mjs} +8 -8
  60. package/dist/{inventory-list-BQPHK3FV.mjs → inventory-list-RUSSPKHE.mjs} +4 -4
  61. package/dist/{inventory-metadata-4HGPMO4B.mjs → inventory-metadata-X52VGHA7.mjs} +4 -4
  62. package/dist/{inventory-stock-KFPSSUND.mjs → inventory-stock-EKTOYN2F.mjs} +4 -4
  63. package/dist/{location-detail-YFDGVGAX.mjs → location-detail-UVWYE6Q2.mjs} +8 -8
  64. package/dist/{location-fulfillment-providers-EGPKJDEL.mjs → location-fulfillment-providers-HZZUHPVL.mjs} +9 -9
  65. package/dist/{location-sales-channels-YMABMECM.mjs → location-sales-channels-XIMOK66B.mjs} +5 -5
  66. package/dist/{location-service-zone-create-NSMZCD5N.mjs → location-service-zone-create-7ZNVLEE3.mjs} +5 -5
  67. package/dist/{location-service-zone-manage-areas-SEC6LKCZ.mjs → location-service-zone-manage-areas-EOULKRYD.mjs} +5 -5
  68. package/dist/{location-service-zone-shipping-option-create-LEPP6ZKF.mjs → location-service-zone-shipping-option-create-M7G4SKNP.mjs} +4 -4
  69. package/dist/{login-IQH2HKVZ.mjs → login-NSCAMAU6.mjs} +4 -4
  70. package/dist/{order-allocate-items-3DDI4V3W.mjs → order-allocate-items-5T57NZOB.mjs} +1 -1
  71. package/dist/{order-create-claim-WHQYED4S.mjs → order-create-claim-TE56IE7P.mjs} +10 -10
  72. package/dist/{order-create-edit-RAWEHXCU.mjs → order-create-edit-RDFYBVFY.mjs} +10 -9
  73. package/dist/{order-create-exchange-P73XCSR7.mjs → order-create-exchange-B5ZOEQCJ.mjs} +16 -16
  74. package/dist/{order-create-fulfillment-YOL4SA4B.mjs → order-create-fulfillment-SRRP6X64.mjs} +4 -4
  75. package/dist/{order-create-refund-NMP4UN7F.mjs → order-create-refund-PTOM65QK.mjs} +4 -4
  76. package/dist/{order-create-return-QGXWSPMP.mjs → order-create-return-3C2QVNYN.mjs} +6 -6
  77. package/dist/{order-create-shipment-UTNVNIGA.mjs → order-create-shipment-HNILNFXB.mjs} +4 -4
  78. package/dist/{order-detail-4EFWM3R4.mjs → order-detail-3OUZOQ7G.mjs} +14 -14
  79. package/dist/{order-edit-billing-address-WBSP4RAG.mjs → order-edit-billing-address-3IO7GXIK.mjs} +4 -4
  80. package/dist/{order-edit-email-CBAUBHW7.mjs → order-edit-email-QIAEOUBV.mjs} +4 -4
  81. package/dist/{order-edit-shipping-address-2TEO4ZRQ.mjs → order-edit-shipping-address-QGGMHGBC.mjs} +4 -4
  82. package/dist/order-export-JYYFTOWR.mjs +121 -0
  83. package/dist/{order-list-QOYJFYD5.mjs → order-list-RFR3HNDQ.mjs} +45 -89
  84. package/dist/{order-metadata-66OZ5ZMN.mjs → order-metadata-ZBDTMBHZ.mjs} +4 -4
  85. package/dist/{order-receive-return-2LQFBB4G.mjs → order-receive-return-V42FTCFY.mjs} +5 -5
  86. package/dist/{order-request-transfer-IH3PQCCL.mjs → order-request-transfer-A6NNIN2O.mjs} +4 -4
  87. package/dist/{price-list-configuration-OLIGCEN5.mjs → price-list-configuration-RTUEJENE.mjs} +7 -7
  88. package/dist/{price-list-create-3DCACAZ4.mjs → price-list-create-GRT27KOM.mjs} +16 -16
  89. package/dist/{price-list-detail-2IW4SDOL.mjs → price-list-detail-VKIWM7HP.mjs} +23 -16
  90. package/dist/{price-list-edit-B3LQZSW6.mjs → price-list-edit-SW7YIR3Z.mjs} +1 -1
  91. package/dist/{price-list-list-D4UPKCNL.mjs → price-list-list-LF2PL4B5.mjs} +37 -21
  92. package/dist/{price-list-prices-add-B5LQAR7J.mjs → price-list-prices-add-ISLZDQNI.mjs} +14 -12
  93. package/dist/{price-list-prices-edit-MAR2T4LM.mjs → price-list-prices-edit-C6SX2TLJ.mjs} +4 -2
  94. package/dist/{product-attributes-DY4HDYTW.mjs → product-attributes-REJ5NF2D.mjs} +6 -6
  95. package/dist/{product-create-EMK2FPWY.mjs → product-create-4TFE3JHQ.mjs} +10 -10
  96. package/dist/{product-create-variant-UHUBSUIV.mjs → product-create-variant-WI6D5CDG.mjs} +4 -4
  97. package/dist/{product-detail-M3PFNUX7.mjs → product-detail-BEIDGPKY.mjs} +8 -8
  98. package/dist/{product-edit-ULKEZHDA.mjs → product-edit-ZRQUK5OQ.mjs} +6 -6
  99. package/dist/{product-export-X7MNQLBY.mjs → product-export-GIEFG4MA.mjs} +17 -17
  100. package/dist/{product-image-variants-edit-RR5RXMSX.mjs → product-image-variants-edit-AAMRK4KQ.mjs} +8 -8
  101. package/dist/{product-import-OJWU5AHL.mjs → product-import-43UXKCL3.mjs} +4 -4
  102. package/dist/{product-list-FAVJ2A46.mjs → product-list-D4CVUBQQ.mjs} +14 -14
  103. package/dist/{product-metadata-VRLBFMKG.mjs → product-metadata-55CAQTPS.mjs} +4 -4
  104. package/dist/{product-organization-4PH2ZOSM.mjs → product-organization-7J7MUM6F.mjs} +6 -6
  105. package/dist/{product-sales-channels-ZICOOOKY.mjs → product-sales-channels-GIJ7Q57M.mjs} +5 -5
  106. package/dist/{product-stock-EVY7L4ID.mjs → product-stock-22S2HGMM.mjs} +4 -4
  107. package/dist/{product-tag-create-UOQUAMYT.mjs → product-tag-create-7GPE246H.mjs} +4 -4
  108. package/dist/{product-tag-detail-L2J3IXMC.mjs → product-tag-detail-R6C2TTA4.mjs} +26 -26
  109. package/dist/{product-tag-edit-AKATEM3L.mjs → product-tag-edit-WA6FGSIP.mjs} +4 -4
  110. package/dist/{product-tag-list-FUQN7YF5.mjs → product-tag-list-U7PLHMLF.mjs} +26 -26
  111. package/dist/{product-tag-metadata-UEOSDTSK.mjs → product-tag-metadata-EJ7FEXSE.mjs} +4 -4
  112. package/dist/{product-type-detail-2KUITRE3.mjs → product-type-detail-TYQ7MJFE.mjs} +11 -11
  113. package/dist/{product-type-list-QX7QC6RI.mjs → product-type-list-KIKWBPD7.mjs} +9 -9
  114. package/dist/{product-type-metadata-7E66UACZ.mjs → product-type-metadata-Q6W5GL7Z.mjs} +4 -4
  115. package/dist/{product-variant-detail-JHH3ICCS.mjs → product-variant-detail-SPJ7MZTK.mjs} +8 -8
  116. package/dist/{product-variant-edit-IIT3QIHD.mjs → product-variant-edit-BW7QMHC5.mjs} +4 -4
  117. package/dist/{product-variant-metadata-UXHU6PFJ.mjs → product-variant-metadata-GDMVC4MZ.mjs} +4 -4
  118. package/dist/{profile-detail-BMC7IZBY.mjs → profile-detail-FRZ74HAF.mjs} +1 -1
  119. package/dist/{profile-edit-5EEKOEO5.mjs → profile-edit-YBBXXCCK.mjs} +1 -1
  120. package/dist/{promotion-create-KPDZWJWC.mjs → promotion-create-HF6DTKCC.mjs} +10 -10
  121. package/dist/{promotion-detail-SQARSSGK.mjs → promotion-detail-HTM3F2VO.mjs} +7 -7
  122. package/dist/{promotion-list-TMWKPLMJ.mjs → promotion-list-L22GJE3P.mjs} +4 -4
  123. package/dist/{refund-reason-create-IPZKKRQM.mjs → refund-reason-create-RKIH46D6.mjs} +4 -4
  124. package/dist/{refund-reason-edit-LB66UGH7.mjs → refund-reason-edit-V3KC6NMO.mjs} +4 -4
  125. package/dist/{refund-reason-list-GOKBW63P.mjs → refund-reason-list-M5BOHFWU.mjs} +13 -13
  126. package/dist/{region-add-countries-AFWXMQ6W.mjs → region-add-countries-OF5RUSYU.mjs} +4 -4
  127. package/dist/{region-create-YC4VZ4AS.mjs → region-create-BGOWVCTR.mjs} +4 -4
  128. package/dist/{region-detail-D3JBW34A.mjs → region-detail-3BARMXUE.mjs} +4 -4
  129. package/dist/{region-list-XQRIBDMF.mjs → region-list-V4R2REMH.mjs} +7 -7
  130. package/dist/{region-metadata-S7BUDXPD.mjs → region-metadata-5NGUNAXZ.mjs} +4 -4
  131. package/dist/{reservation-detail-ZL4WMT4A.mjs → reservation-detail-JH77TQHN.mjs} +4 -4
  132. package/dist/{reservation-list-SOJRN5RI.mjs → reservation-list-WHBGZSVH.mjs} +5 -5
  133. package/dist/{reservation-metadata-QVEVN2FO.mjs → reservation-metadata-ERCWXYVL.mjs} +4 -4
  134. package/dist/{return-reason-list-IFFIDA5O.mjs → return-reason-list-SCBGTOEI.mjs} +11 -11
  135. package/dist/{sales-channel-add-products-LCB33I6H.mjs → sales-channel-add-products-DTAXWL6H.mjs} +11 -11
  136. package/dist/{sales-channel-detail-RUULD6Q7.mjs → sales-channel-detail-XWHV7J7X.mjs} +11 -11
  137. package/dist/{sales-channel-list-5TFALQQS.mjs → sales-channel-list-7NSEFCXQ.mjs} +9 -9
  138. package/dist/{sales-channel-metadata-6WSCB67B.mjs → sales-channel-metadata-CMZN74K7.mjs} +4 -4
  139. package/dist/{shipping-option-type-create-IMF4RHSO.mjs → shipping-option-type-create-4BN2GBHP.mjs} +4 -4
  140. package/dist/{shipping-option-type-detail-PHIHWW6G.mjs → shipping-option-type-detail-YB3TCED2.mjs} +5 -5
  141. package/dist/{shipping-option-type-edit-SG4JQZGW.mjs → shipping-option-type-edit-MDO7ALAU.mjs} +4 -4
  142. package/dist/{shipping-option-type-list-RB2EKPWN.mjs → shipping-option-type-list-DJAT4RKX.mjs} +10 -10
  143. package/dist/{shipping-profile-metadata-M3DVX5KX.mjs → shipping-profile-metadata-HQI7PCPU.mjs} +4 -4
  144. package/dist/{shipping-profiles-list-H3CBZKRH.mjs → shipping-profiles-list-WRPIJBZZ.mjs} +4 -4
  145. package/dist/{store-add-currencies-3VMLZ6KB.mjs → store-add-currencies-PEWNEWCH.mjs} +4 -4
  146. package/dist/{store-add-locales-WAHERXN3.mjs → store-add-locales-JLRTXG3Q.mjs} +9 -16
  147. package/dist/{store-detail-EY2ZQKZO.mjs → store-detail-MOLAYNQZ.mjs} +13 -26
  148. package/dist/{store-edit-EPAHLLKP.mjs → store-edit-FTLPT55E.mjs} +1 -42
  149. package/dist/{store-metadata-7UPGGK7F.mjs → store-metadata-ZJD23O4D.mjs} +4 -4
  150. package/dist/{tax-region-create-LQZKNYTD.mjs → tax-region-create-NCO2OQ3I.mjs} +4 -4
  151. package/dist/{tax-region-detail-AVG3XLVL.mjs → tax-region-detail-RIABXU7D.mjs} +28 -28
  152. package/dist/{tax-region-edit-XR3ABTNA.mjs → tax-region-edit-YZALLSZY.mjs} +4 -4
  153. package/dist/{tax-region-province-detail-I7FF7NBE.mjs → tax-region-province-detail-UKLRVJS2.mjs} +28 -28
  154. package/dist/{tax-region-tax-override-create-H6LWWOPU.mjs → tax-region-tax-override-create-33XGHH7A.mjs} +25 -25
  155. package/dist/{tax-region-tax-override-edit-SZWBWRCA.mjs → tax-region-tax-override-edit-WOKZSPTY.mjs} +26 -26
  156. package/dist/{user-invite-2OKB7SCF.mjs → user-invite-YH33WUC2.mjs} +4 -4
  157. package/dist/{user-list-YYUOQKQY.mjs → user-list-YTZQNYSO.mjs} +4 -4
  158. package/dist/{user-metadata-X36GKJ47.mjs → user-metadata-4WOICEE7.mjs} +4 -4
  159. package/dist/{workflow-execution-detail-P6H5AUWI.mjs → workflow-execution-detail-OKM6P4SX.mjs} +5 -5
  160. package/dist/{workflow-execution-list-IZVF2XMJ.mjs → workflow-execution-list-C3EJMVSZ.mjs} +4 -4
  161. package/package.json +9 -9
  162. package/src/dashboard-app/routes/get-route.map.tsx +6 -0
  163. package/src/hooks/api/orders.tsx +18 -1
  164. package/src/hooks/api/price-lists.tsx +28 -1
  165. package/src/i18n/languages.ts +7 -0
  166. package/src/i18n/translations/$schema.json +40 -0
  167. package/src/i18n/translations/en.json +12 -0
  168. package/src/i18n/translations/index.ts +4 -0
  169. package/src/i18n/translations/zhTW.json +3249 -0
  170. package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx +1 -0
  171. package/src/routes/orders/order-export/components/export-filters.tsx +22 -0
  172. package/src/routes/orders/order-export/index.ts +1 -0
  173. package/src/routes/orders/order-export/order-export.tsx +66 -0
  174. package/src/routes/orders/order-list/components/order-list-table/configurable-order-list-table.tsx +14 -6
  175. package/src/routes/orders/order-list/components/order-list-table/order-list-table.tsx +8 -2
  176. package/src/routes/price-lists/price-list-detail/components/price-list-general-section/price-list-general-section.tsx +13 -5
  177. package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-count-cell.tsx +19 -0
  178. package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-columns.tsx +5 -6
  179. package/src/routes/price-lists/price-list-prices-add/price-list-prices-add.tsx +4 -1
  180. package/src/routes/price-lists/price-list-prices-edit/price-list-prices-edit.tsx +3 -1
  181. package/src/routes/store/store-add-locales/components/add-locales-form/add-locales-form.tsx +0 -9
  182. package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +0 -24
  183. package/src/routes/store/store-detail/components/store-locale-section/store-locale-section.tsx +1 -9
  184. package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +1 -45
  185. package/dist/{location-service-zone-shipping-option-edit-QS6HTWST.mjs → location-service-zone-shipping-option-edit-M2HJAASG.mjs} +3 -3
@@ -180,6 +180,7 @@ function OrderEditItem({ item, currencyCode, orderId }: OrderEditItemProps) {
180
180
  <Input
181
181
  className="bg-ui-bg-base txt-small w-[67px] rounded-lg [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
182
182
  type="number"
183
+ step="any"
183
184
  disabled={item.detail.fulfilled_quantity === item.quantity}
184
185
  min={item.detail.fulfilled_quantity}
185
186
  defaultValue={item.quantity}
@@ -0,0 +1,22 @@
1
+ import { Heading, Text } from "@medusajs/ui"
2
+ import { useTranslation } from "react-i18next"
3
+ import { DataTableFilter } from "../../../../components/table/data-table/data-table-filter"
4
+ import { useOrderTableFilters } from "../../order-list/components/order-list-table/use-order-table-filters"
5
+
6
+ export const ExportFilters = () => {
7
+ const { t } = useTranslation()
8
+ const filters = useOrderTableFilters()
9
+
10
+ return (
11
+ <div>
12
+ <Heading level="h2">{t("orders.export.filters.title")}</Heading>
13
+ <Text size="small" className="text-ui-fg-subtle">
14
+ {t("orders.export.filters.description")}
15
+ </Text>
16
+
17
+ <div className="mt-4">
18
+ <DataTableFilter filters={filters} readonly />
19
+ </div>
20
+ </div>
21
+ )
22
+ }
@@ -0,0 +1 @@
1
+ export { OrderExport as Component } from "./order-export"
@@ -0,0 +1,66 @@
1
+ import { Button, Heading, toast } from "@medusajs/ui"
2
+ import { useTranslation } from "react-i18next"
3
+ import { RouteDrawer, useRouteModal } from "../../../components/modals"
4
+ import { useExportOrders } from "../../../hooks/api"
5
+ import { useOrderTableQuery } from "../../../hooks/table/query"
6
+ import { ExportFilters } from "./components/export-filters"
7
+
8
+ export const OrderExport = () => {
9
+ const { t } = useTranslation()
10
+
11
+ return (
12
+ <RouteDrawer>
13
+ <RouteDrawer.Header>
14
+ <RouteDrawer.Title asChild>
15
+ <Heading>{t("orders.export.header")}</Heading>
16
+ </RouteDrawer.Title>
17
+ <RouteDrawer.Description className="sr-only">
18
+ {t("orders.export.description")}
19
+ </RouteDrawer.Description>
20
+ </RouteDrawer.Header>
21
+ <OrderExportContent />
22
+ </RouteDrawer>
23
+ )
24
+ }
25
+
26
+ const OrderExportContent = () => {
27
+ const { t } = useTranslation()
28
+ const { searchParams } = useOrderTableQuery({})
29
+
30
+ const { mutateAsync } = useExportOrders(searchParams)
31
+ const { handleSuccess } = useRouteModal()
32
+
33
+ const handleExportRequest = async () => {
34
+ await mutateAsync(searchParams, {
35
+ onSuccess: () => {
36
+ toast.info(t("orders.export.success.title"), {
37
+ description: t("orders.export.success.description"),
38
+ })
39
+ handleSuccess()
40
+ },
41
+ onError: (err) => {
42
+ toast.error(err.message)
43
+ },
44
+ })
45
+ }
46
+
47
+ return (
48
+ <>
49
+ <RouteDrawer.Body>
50
+ <ExportFilters />
51
+ </RouteDrawer.Body>
52
+ <RouteDrawer.Footer>
53
+ <div className="flex items-center gap-x-2">
54
+ <RouteDrawer.Close asChild>
55
+ <Button size="small" variant="secondary">
56
+ {t("actions.cancel")}
57
+ </Button>
58
+ </RouteDrawer.Close>
59
+ <Button onClick={handleExportRequest} size="small">
60
+ {t("actions.export")}
61
+ </Button>
62
+ </div>
63
+ </RouteDrawer.Footer>
64
+ </>
65
+ )
66
+ }
@@ -1,16 +1,24 @@
1
1
  import { useTranslation } from "react-i18next"
2
+ import { Outlet, useLocation } from "react-router-dom"
3
+
2
4
  import { ConfigurableDataTable } from "../../../../../components/table/configurable-data-table"
3
5
  import { useOrderTableAdapter } from "./order-table-adapter"
4
6
 
5
7
  export const ConfigurableOrderListTable = () => {
6
8
  const { t } = useTranslation()
7
- const orderAdapter = useOrderTableAdapter()
9
+ const location = useLocation()
10
+ const adapter = useOrderTableAdapter()
8
11
 
9
12
  return (
10
- <ConfigurableDataTable
11
- adapter={orderAdapter}
12
- heading={t("orders.domain")}
13
- layout="fill"
14
- />
13
+ <>
14
+ <ConfigurableDataTable
15
+ adapter={adapter}
16
+ heading={t("orders.domain")}
17
+ actions={[
18
+ { label: t("actions.export"), to: `export${location.search}` },
19
+ ]}
20
+ />
21
+ <Outlet />
22
+ </>
15
23
  )
16
24
  }
@@ -1,15 +1,16 @@
1
- import { Container, Heading } from "@medusajs/ui"
1
+ import { Button, Container, Heading } from "@medusajs/ui"
2
2
  import { keepPreviousData } from "@tanstack/react-query"
3
3
  import { useTranslation } from "react-i18next"
4
+ import { Link, Outlet, useLocation } from "react-router-dom"
4
5
 
5
6
  import { _DataTable } from "../../../../../components/table/data-table/data-table"
6
7
  import { useOrders } from "../../../../../hooks/api/orders"
7
8
  import { useOrderTableColumns } from "../../../../../hooks/table/columns/use-order-table-columns"
8
- import { useOrderTableFilters } from "./use-order-table-filters"
9
9
  import { useOrderTableQuery } from "../../../../../hooks/table/query/use-order-table-query"
10
10
  import { useDataTable } from "../../../../../hooks/use-data-table"
11
11
  import { useFeatureFlag } from "../../../../../providers/feature-flag-provider"
12
12
  import { ConfigurableOrderListTable } from "./configurable-order-list-table"
13
+ import { useOrderTableFilters } from "./use-order-table-filters"
13
14
 
14
15
  import { DEFAULT_FIELDS } from "../../const"
15
16
 
@@ -17,6 +18,7 @@ const PAGE_SIZE = 20
17
18
 
18
19
  export const OrderListTable = () => {
19
20
  const { t } = useTranslation()
21
+ const location = useLocation()
20
22
  const isViewConfigEnabled = useFeatureFlag("view_configurations")
21
23
 
22
24
  // If feature flag is enabled, use the new configurable table
@@ -57,6 +59,9 @@ export const OrderListTable = () => {
57
59
  <Container className="divide-y p-0">
58
60
  <div className="flex items-center justify-between px-6 py-4">
59
61
  <Heading>{t("orders.domain")}</Heading>
62
+ <Button size="small" variant="secondary" asChild>
63
+ <Link to={`export${location.search}`}>{t("actions.export")}</Link>
64
+ </Button>
60
65
  </div>
61
66
  <_DataTable
62
67
  columns={columns}
@@ -78,6 +83,7 @@ export const OrderListTable = () => {
78
83
  message: t("orders.list.noRecordsMessage"),
79
84
  }}
80
85
  />
86
+ <Outlet />
81
87
  </Container>
82
88
  )
83
89
  }
@@ -6,6 +6,7 @@ import { useTranslation } from "react-i18next"
6
6
  import { ActionMenu } from "../../../../../components/common/action-menu"
7
7
  import { useDeletePriceListAction } from "../../../common/hooks/use-delete-price-list-action"
8
8
  import { getPriceListStatus } from "../../../common/utils"
9
+ import { usePriceListPrices } from "../../../../../hooks/api"
9
10
 
10
11
  type PriceListGeneralSectionProps = {
11
12
  priceList: HttpTypes.AdminPriceList
@@ -15,8 +16,13 @@ export const PriceListGeneralSection = ({
15
16
  priceList,
16
17
  }: PriceListGeneralSectionProps) => {
17
18
  const { t } = useTranslation()
18
-
19
- const overrideCount = priceList.prices?.length || 0
19
+ const {
20
+ count: overrideCount,
21
+ isLoading,
22
+ error,
23
+ } = usePriceListPrices(priceList.id, {
24
+ limit: 1,
25
+ })
20
26
 
21
27
  const { color, text } = getPriceListStatus(t, priceList)
22
28
 
@@ -77,9 +83,11 @@ export const PriceListGeneralSection = ({
77
83
  <Text leading="compact" size="small" weight="plus">
78
84
  {t("priceLists.fields.priceOverrides.label")}
79
85
  </Text>
80
- <Text size="small" className="text-pretty">
81
- {overrideCount || "-"}
82
- </Text>
86
+ {!isLoading && !error && (
87
+ <Text size="small" className="text-pretty">
88
+ {overrideCount || "-"}
89
+ </Text>
90
+ )}
83
91
  </div>
84
92
  </Container>
85
93
  )
@@ -0,0 +1,19 @@
1
+ import { usePriceListPrices } from "../../../../../hooks/api/price-lists"
2
+ import { PlaceholderCell } from "../../../../../components/table/table-cells/common/placeholder-cell"
3
+ import { TextCell } from "../../../../../components/table/table-cells/common/text-cell"
4
+
5
+ type PriceCountCellProps = {
6
+ priceListId: string
7
+ }
8
+
9
+ export const PriceCountCell = ({ priceListId }: PriceCountCellProps) => {
10
+ const { count, isLoading } = usePriceListPrices(priceListId, {
11
+ limit: 1,
12
+ })
13
+
14
+ if (isLoading) {
15
+ return <PlaceholderCell />
16
+ }
17
+
18
+ return <TextCell text={count && count > 0 ? count.toString() : "-"} />
19
+ }
@@ -4,12 +4,10 @@ import { useMemo } from "react"
4
4
  import { useTranslation } from "react-i18next"
5
5
 
6
6
  import { StatusCell } from "../../../../../components/table/table-cells/common/status-cell"
7
- import {
8
- TextCell,
9
- TextHeader,
10
- } from "../../../../../components/table/table-cells/common/text-cell"
7
+ import { TextHeader } from "../../../../../components/table/table-cells/common/text-cell"
11
8
  import { getPriceListStatus } from "../../../common/utils"
12
9
  import { PriceListListTableActions } from "./price-list-list-table-actions"
10
+ import { PriceCountCell } from "./price-count-cell"
13
11
 
14
12
  const columnHelper = createColumnHelper<HttpTypes.AdminPriceList>()
15
13
 
@@ -30,9 +28,10 @@ export const usePricingTableColumns = () => {
30
28
  return <StatusCell color={color}>{text}</StatusCell>
31
29
  },
32
30
  }),
33
- columnHelper.accessor("prices", {
31
+ columnHelper.display({
32
+ id: "price_overrides",
34
33
  header: t("priceLists.fields.priceOverrides.header"),
35
- cell: (info) => <TextCell text={`${info.getValue()?.length || "-"}`} />,
34
+ cell: ({ row }) => <PriceCountCell priceListId={row.original.id} />,
36
35
  }),
37
36
  columnHelper.display({
38
37
  id: "actions",
@@ -7,7 +7,10 @@ import { PriceListPricesAddForm } from "./components/price-list-prices-add-form"
7
7
  export const PriceListProductsAdd = () => {
8
8
  const { id } = useParams<{ id: string }>()
9
9
 
10
- const { price_list, isPending, isError, error } = usePriceList(id!)
10
+ const { price_list, isPending, isError, error } = usePriceList(id!, {
11
+ fields:
12
+ "*prices,prices.price_set.variant.id,prices.price_rules.attribute,prices.price_rules.value",
13
+ })
11
14
  const { currencies, regions, pricePreferences, isReady } =
12
15
  usePriceListCurrencyData()
13
16
 
@@ -10,7 +10,9 @@ export const PriceListPricesEdit = () => {
10
10
  const [searchParams] = useSearchParams()
11
11
  const ids = searchParams.get("ids[]")
12
12
 
13
- const { price_list, isLoading, isError, error } = usePriceList(id!)
13
+ const { price_list, isLoading, isError, error } = usePriceList(id!, {
14
+ fields: "*prices,prices.price_set.variant.id,prices.price_rules.attribute,prices.price_rules.value",
15
+ })
14
16
  const productIds = ids?.split(",")
15
17
 
16
18
  const {
@@ -100,19 +100,10 @@ export const AddLocalesForm = ({ store }: AddLocalesFormProps) => {
100
100
  new Set([...data.locales, ...preSelectedRows])
101
101
  ) as string[]
102
102
 
103
- let defaultLocale = store.supported_locales?.find(
104
- (l) => l.is_default
105
- )?.locale_code
106
-
107
- if (!locales.includes(defaultLocale ?? "")) {
108
- defaultLocale = locales?.[0]
109
- }
110
-
111
103
  await mutateAsync(
112
104
  {
113
105
  supported_locales: locales.map((l) => ({
114
106
  locale_code: l,
115
- is_default: l === defaultLocale,
116
107
  })),
117
108
  },
118
109
  {
@@ -7,7 +7,6 @@ import { Link } from "react-router-dom"
7
7
  import { ActionMenu } from "../../../../../components/common/action-menu"
8
8
  import { useSalesChannel, useStockLocation } from "../../../../../hooks/api"
9
9
  import { useRegion } from "../../../../../hooks/api/regions"
10
- import { useFeatureFlag } from "../../../../../providers/feature-flag-provider"
11
10
 
12
11
  type StoreGeneralSectionProps = {
13
12
  store: AdminStore
@@ -15,14 +14,12 @@ type StoreGeneralSectionProps = {
15
14
 
16
15
  export const StoreGeneralSection = ({ store }: StoreGeneralSectionProps) => {
17
16
  const { t } = useTranslation()
18
- const isTranslationsEnabled = useFeatureFlag("translation")
19
17
 
20
18
  const { region } = useRegion(store.default_region_id!, undefined, {
21
19
  enabled: !!store.default_region_id,
22
20
  })
23
21
 
24
22
  const defaultCurrency = store.supported_currencies?.find((c) => c.is_default)
25
- const defaultLocale = store.supported_locales?.find((l) => l.is_default)
26
23
 
27
24
  const { sales_channel } = useSalesChannel(store.default_sales_channel_id!, {
28
25
  enabled: !!store.default_sales_channel_id,
@@ -88,27 +85,6 @@ export const StoreGeneralSection = ({ store }: StoreGeneralSectionProps) => {
88
85
  </Text>
89
86
  )}
90
87
  </div>
91
- {isTranslationsEnabled && (
92
- <div className="text-ui-fg-subtle grid grid-cols-2 px-6 py-4">
93
- <Text size="small" leading="compact" weight="plus">
94
- {t("store.defaultLocale")}
95
- </Text>
96
- {defaultLocale ? (
97
- <div className="flex items-center gap-x-2">
98
- <Badge size="2xsmall">
99
- {defaultLocale.locale_code?.toUpperCase()}
100
- </Badge>
101
- <Text size="small" leading="compact">
102
- {defaultLocale.locale?.name}
103
- </Text>
104
- </div>
105
- ) : (
106
- <Text size="small" leading="compact">
107
- -
108
- </Text>
109
- )}
110
- </div>
111
- )}
112
88
  <div className="text-ui-fg-subtle grid grid-cols-2 px-6 py-4">
113
89
  <Text size="small" leading="compact" weight="plus">
114
90
  {t("store.defaultRegion")}
@@ -60,8 +60,6 @@ export const StoreLocaleSection = ({ store }: StoreLocaleSectionProps) => {
60
60
  meta: {
61
61
  storeId: store.id,
62
62
  supportedLocales: store.supported_locales,
63
- defaultLocaleCode: store.supported_locales?.find((l) => l.is_default)
64
- ?.locale_code,
65
63
  },
66
64
  })
67
65
 
@@ -165,12 +163,10 @@ const LocaleActions = ({
165
163
  storeId,
166
164
  locale,
167
165
  supportedLocales,
168
- defaultLocaleCode,
169
166
  }: {
170
167
  storeId: string
171
168
  locale: HttpTypes.AdminLocale
172
169
  supportedLocales: HttpTypes.AdminStoreLocale[]
173
- defaultLocaleCode: string
174
170
  }) => {
175
171
  const { mutateAsync } = useUpdateStore(storeId)
176
172
  const { t } = useTranslation()
@@ -218,7 +214,6 @@ const LocaleActions = ({
218
214
  icon: <Trash />,
219
215
  label: t("actions.remove"),
220
216
  onClick: handleRemove,
221
- disabled: locale.code === defaultLocaleCode,
222
217
  },
223
218
  ],
224
219
  },
@@ -267,9 +262,7 @@ const useColumns = () => {
267
262
  columnHelper.display({
268
263
  id: "actions",
269
264
  cell: ({ row, table }) => {
270
- const { supportedLocales, storeId, defaultLocaleCode } = table.options
271
- .meta as {
272
- defaultLocaleCode: string
265
+ const { supportedLocales, storeId } = table.options.meta as {
273
266
  supportedLocales: HttpTypes.AdminStoreLocale[]
274
267
  storeId: string
275
268
  }
@@ -279,7 +272,6 @@ const useColumns = () => {
279
272
  storeId={storeId}
280
273
  locale={row.original}
281
274
  supportedLocales={supportedLocales}
282
- defaultLocaleCode={defaultLocaleCode}
283
275
  />
284
276
  )
285
277
  },
@@ -13,7 +13,6 @@ import { useUpdateStore } from "../../../../../hooks/api/store"
13
13
  import { useComboboxData } from "../../../../../hooks/use-combobox-data"
14
14
  import { sdk } from "../../../../../lib/client"
15
15
  import { useDocumentDirection } from "../../../../../hooks/use-document-direction"
16
- import { useFeatureFlag } from "../../../../../providers/feature-flag-provider"
17
16
 
18
17
  type EditStoreFormProps = {
19
18
  store: HttpTypes.AdminStore
@@ -22,7 +21,6 @@ type EditStoreFormProps = {
22
21
  const EditStoreSchema = z.object({
23
22
  name: z.string().min(1),
24
23
  default_currency_code: z.string().optional(),
25
- default_locale_code: z.string().optional(),
26
24
  default_region_id: z.string().optional(),
27
25
  default_sales_channel_id: z.string().optional(),
28
26
  default_location_id: z.string().optional(),
@@ -30,16 +28,12 @@ const EditStoreSchema = z.object({
30
28
 
31
29
  export const EditStoreForm = ({ store }: EditStoreFormProps) => {
32
30
  const { t } = useTranslation()
33
- const isTranslationsEnabled = useFeatureFlag("translation")
34
31
  const { handleSuccess } = useRouteModal()
35
32
  const direction = useDocumentDirection()
36
33
  const form = useForm<z.infer<typeof EditStoreSchema>>({
37
34
  defaultValues: {
38
35
  name: store.name,
39
36
  default_region_id: store.default_region_id || undefined,
40
- default_locale_code:
41
- store.supported_locales?.find((l) => l.is_default)?.locale_code ||
42
- undefined,
43
37
  default_currency_code:
44
38
  store.supported_currencies?.find((c) => c.is_default)?.currency_code ||
45
39
  undefined,
@@ -79,14 +73,10 @@ export const EditStoreForm = ({ store }: EditStoreFormProps) => {
79
73
  })
80
74
 
81
75
  const handleSubmit = form.handleSubmit(async (values) => {
82
- const { default_currency_code, default_locale_code, ...rest } = values
76
+ const { default_currency_code, ...rest } = values
83
77
 
84
78
  const normalizedMutation: HttpTypes.AdminUpdateStore = {
85
79
  ...rest,
86
- supported_locales: store.supported_locales?.map((l) => ({
87
- ...l,
88
- is_default: l.locale_code === default_locale_code,
89
- })),
90
80
  supported_currencies: store.supported_currencies?.map((c) => ({
91
81
  ...c,
92
82
  is_default: c.currency_code === default_currency_code,
@@ -156,40 +146,6 @@ export const EditStoreForm = ({ store }: EditStoreFormProps) => {
156
146
  )
157
147
  }}
158
148
  />
159
- {isTranslationsEnabled && (
160
- <Form.Field
161
- control={form.control}
162
- name="default_locale_code"
163
- render={({ field: { onChange, ...field } }) => {
164
- return (
165
- <Form.Item>
166
- <Form.Label>{t("store.defaultLocale")}</Form.Label>
167
- <Form.Control>
168
- <Select
169
- dir={direction}
170
- {...field}
171
- onValueChange={onChange}
172
- >
173
- <Select.Trigger ref={field.ref}>
174
- <Select.Value />
175
- </Select.Trigger>
176
- <Select.Content>
177
- {store.supported_locales?.map((locale) => (
178
- <Select.Item
179
- key={locale.locale_code}
180
- value={locale.locale_code}
181
- >
182
- {locale.locale_code}
183
- </Select.Item>
184
- ))}
185
- </Select.Content>
186
- </Select>
187
- </Form.Control>
188
- </Form.Item>
189
- )
190
- }}
191
- />
192
- )}
193
149
  <Form.Field
194
150
  control={form.control}
195
151
  name="default_region_id"
@@ -1,12 +1,12 @@
1
+ import {
2
+ isOptionEnabledInStore
3
+ } from "./chunk-UC26CCHZ.mjs";
1
4
  import {
2
5
  ShippingOptionPriceType
3
6
  } from "./chunk-PYIO3TDQ.mjs";
4
7
  import {
5
8
  formatProvider
6
9
  } from "./chunk-IR5DHEKS.mjs";
7
- import {
8
- isOptionEnabledInStore
9
- } from "./chunk-UC26CCHZ.mjs";
10
10
  import {
11
11
  useComboboxData
12
12
  } from "./chunk-3TZOFKX2.mjs";