@mercurjs/admin 2.2.0-canary.14 → 2.2.0-canary.16
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.
- package/dist/{add-campaign-promotions-KOGSYV2W.js → add-campaign-promotions-RUUZFQVO.js} +3 -3
- package/dist/{adjust-inventory-3IQ657W2.js → adjust-inventory-INVLBRJB.js} +11 -11
- package/dist/{api-key-management-create-UD5V7TOU.js → api-key-management-create-JWXWNGWI.js} +3 -3
- package/dist/{api-key-management-detail-V22TYNOF.js → api-key-management-detail-ZRLG6YRB.js} +17 -16
- package/dist/{api-key-management-edit-4TLKJSAE.js → api-key-management-edit-C2LDCO4Q.js} +3 -3
- package/dist/{api-key-management-list-SZUSD6UI.js → api-key-management-list-FVOOICQR.js} +4 -4
- package/dist/{api-key-management-sales-channels-SKKS5BCC.js → api-key-management-sales-channels-E245THAC.js} +6 -5
- package/dist/{attribute-create-IKTP5XRS.js → attribute-create-UAFKYP5S.js} +12 -12
- package/dist/{attribute-detail-V4QI34FV.js → attribute-detail-AKA6OHN5.js} +11 -11
- package/dist/{attribute-list-EMPHZ32M.js → attribute-list-DRVOY6FY.js} +11 -11
- package/dist/breadcrumb-CO5DVI72.js +26 -0
- package/dist/breadcrumb-RYIHOYZE.js +27 -0
- package/dist/{campaign-detail-QY3AALUR.js → campaign-detail-A7ZM4Q7M.js} +15 -15
- package/dist/{categories-metadata-Z5JAWPAK.js → categories-metadata-CBWDAGCZ.js} +11 -11
- package/dist/{category-create-GMCJABRW.js → category-create-Q6IPW7UC.js} +3 -3
- package/dist/{category-detail-IP5EPIUR.js → category-detail-CIEHVR4M.js} +14 -14
- package/dist/{category-edit-GLE4NTFG.js → category-edit-TBMN4JAH.js} +2 -2
- package/dist/{category-list-SNVOQ64L.js → category-list-4YSI36HW.js} +4 -4
- package/dist/{category-organize-UY4M4N7S.js → category-organize-U6UO35Y3.js} +2 -2
- package/dist/{category-products-HWXJR7KR.js → category-products-U7CRTTJQ.js} +12 -12
- package/dist/{chunk-5UPOHLBD.js → chunk-22V5D3VA.js} +1 -1
- package/dist/{chunk-ABWW3JHS.js → chunk-3DMUKRIX.js} +4 -4
- package/dist/{chunk-M572YFDA.js → chunk-3EUF5GRT.js} +2 -2
- package/dist/{chunk-SUVFPJ4J.js → chunk-3KCXKGHX.js} +2 -2
- package/dist/{chunk-KWFKMS4M.js → chunk-3XSMZOVD.js} +4 -4
- package/dist/{chunk-O2XHQTBX.js → chunk-47W2JHOE.js} +3 -3
- package/dist/chunk-4FHHNYIV.js +280 -0
- package/dist/{chunk-NGDOLGBQ.js → chunk-4Q5JHL4V.js} +1 -1
- package/dist/{chunk-3HY4I76Q.js → chunk-5BF5JDWT.js} +2 -2
- package/dist/{chunk-ZXBCWDVM.js → chunk-5T45PYWI.js} +3 -3
- package/dist/{chunk-5FFZQPTT.js → chunk-6PTZK4CH.js} +1 -1
- package/dist/{chunk-HDOWEXDH.js → chunk-A2GVK4VZ.js} +2 -2
- package/dist/{chunk-ZO7A6VYP.js → chunk-AIG4MQL4.js} +3 -3
- package/dist/chunk-AWLDIHXR.js +204 -0
- package/dist/{chunk-D2VXOF46.js → chunk-B4K7H6DH.js} +2 -2
- package/dist/{chunk-EMQP2CNF.js → chunk-D77BYNTQ.js} +1 -1
- package/dist/{chunk-54RTJBYO.js → chunk-DGCPYCHU.js} +8 -63
- package/dist/{chunk-QLEGHL2Q.js → chunk-EB6ZFOTO.js} +2 -2
- package/dist/{chunk-W3FDZPPF.js → chunk-EOLSQKPV.js} +2 -2
- package/dist/{chunk-BPCU5QJE.js → chunk-FBD7WJPO.js} +1 -1
- package/dist/{chunk-NJP3DEE5.js → chunk-FJHAAROU.js} +1 -1
- package/dist/{chunk-N4GJRJF5.js → chunk-FJRNNDZS.js} +1 -1
- package/dist/{chunk-PASEZJC7.js → chunk-FYCIGKVG.js} +1 -1
- package/dist/{chunk-LGL4QSGB.js → chunk-GC5VN6RD.js} +1 -1
- package/dist/{chunk-4GFS57XI.js → chunk-HLJ24XVH.js} +1 -1
- package/dist/{chunk-72PLRAWM.js → chunk-IBX52HBP.js} +1 -1
- package/dist/{chunk-2OF7GB7J.js → chunk-IC3ZLUKY.js} +1 -1
- package/dist/{chunk-KK67WP4G.js → chunk-IEPH6A2W.js} +71 -247
- package/dist/{chunk-3XSC3NEG.js → chunk-J3AMUGGZ.js} +1 -1
- package/dist/{chunk-HQWN3A5L.js → chunk-JRLDKKCM.js} +2 -2
- package/dist/{chunk-R7ESTJHN.js → chunk-K2C42QAV.js} +2 -2
- package/dist/{chunk-DN2K5EAH.js → chunk-KYFWVLWO.js} +1 -1
- package/dist/{chunk-CKNQJPAG.js → chunk-LEHS6RED.js} +4 -2
- package/dist/{chunk-CYGCCNIC.js → chunk-LKW2KWJ4.js} +2 -2
- package/dist/{chunk-H3MAUKL7.js → chunk-M2E3PKA4.js} +183 -183
- package/dist/{chunk-SJGIQGEC.js → chunk-MHVZVF6O.js} +1 -1
- package/dist/{chunk-K4WU4PVL.js → chunk-NZOB3LPA.js} +1 -1
- package/dist/{chunk-QUPUWR42.js → chunk-OAQJNQYL.js} +1 -1
- package/dist/{chunk-6FHQCLHQ.js → chunk-OKWGPKVK.js} +1 -1
- package/dist/{chunk-3AO6X4CE.js → chunk-PE6JFXWU.js} +1 -1
- package/dist/{chunk-A62MTLPR.js → chunk-Q5WTOVZZ.js} +12 -2
- package/dist/{chunk-Z5T5EPLF.js → chunk-QKJGSZI2.js} +1 -1
- package/dist/{chunk-DJWOIRLV.js → chunk-RUSMGNQ6.js} +1 -1
- package/dist/{chunk-MVDPDVMI.js → chunk-RWRL4AXD.js} +4 -4
- package/dist/{chunk-JSH7JEKY.js → chunk-RZ5SFALB.js} +2 -2
- package/dist/chunk-S6A4FVM2.js +170 -0
- package/dist/{chunk-7KZ5X5SU.js → chunk-SEQJOCTT.js} +3 -3
- package/dist/{chunk-W6V2L2FX.js → chunk-SNCZQATG.js} +2 -2
- package/dist/{chunk-EBYWGIOR.js → chunk-T4GL73RP.js} +1 -1
- package/dist/{chunk-N7OVIX55.js → chunk-TH6W26RC.js} +1 -1
- package/dist/{chunk-4PU6GDCE.js → chunk-TWCYZF6X.js} +1 -1
- package/dist/chunk-UKLRBS4W.js +61 -0
- package/dist/{chunk-WTK4MLMF.js → chunk-UVYWKQJF.js} +1 -1
- package/dist/{chunk-PXKDYD3M.js → chunk-VZ7GNMGX.js} +1 -1
- package/dist/{chunk-VY7PT4SI.js → chunk-W6J4SJ3Y.js} +1 -1
- package/dist/{chunk-TE4IF3MM.js → chunk-WJGABDWC.js} +1 -1
- package/dist/{chunk-VT5E7OMM.js → chunk-WUGV75DM.js} +1 -1
- package/dist/{chunk-P5XVG4PY.js → chunk-XGUUM3S6.js} +1 -1
- package/dist/{chunk-7MMLCMV3.js → chunk-XVSJKCCQ.js} +1 -1
- package/dist/{chunk-BQ6ZDY6L.js → chunk-YM523XTD.js} +3 -3
- package/dist/{chunk-453BC56K.js → chunk-Z2UBJXTU.js} +1 -1
- package/dist/{chunk-EGTH3PUK.js → chunk-ZB4TESPP.js} +2 -2
- package/dist/{collection-add-products-ABWXUOFD.js → collection-add-products-G6BQPBXA.js} +12 -12
- package/dist/{collection-create-BRMP6SIZ.js → collection-create-O3RG3BFE.js} +2 -2
- package/dist/{collection-detail-AMGR2B5N.js → collection-detail-TR7TDQZG.js} +13 -13
- package/dist/{collection-edit-YLWUEU4C.js → collection-edit-EKPMNFCK.js} +2 -2
- package/dist/{collection-list-6HZE43AC.js → collection-list-FOWSOTS7.js} +14 -14
- package/dist/{collection-metadata-JS5QP3GD.js → collection-metadata-UEXKSJRF.js} +11 -11
- package/dist/{commission-rate-create-PSPSJZR5.js → commission-rate-create-UX3IFSPP.js} +14 -14
- package/dist/{commission-rate-detail-U72E4ZIO.js → commission-rate-detail-VGYTGWLH.js} +12 -12
- package/dist/{commission-rate-edit-7NJPABVA.js → commission-rate-edit-FTBBWE7F.js} +14 -14
- package/dist/{customer-detail-2RWBN6C4.js → customer-detail-5XGZ2K3H.js} +13 -13
- package/dist/{customer-group-detail-ED66F7JM.js → customer-group-detail-JX3BEYFG.js} +11 -11
- package/dist/{customer-group-list-6YUFKBHH.js → customer-group-list-F5TFLDVH.js} +11 -11
- package/dist/{customer-group-metadata-VQUOWR3P.js → customer-group-metadata-MVD7V6DA.js} +11 -11
- package/dist/{customer-metadata-47AVJXRI.js → customer-metadata-LW6GL25F.js} +11 -11
- package/dist/{customers-add-customer-group-HI7J7YKN.js → customers-add-customer-group-NGPLFWCL.js} +11 -11
- package/dist/{edit-inventory-item-MBPSBJL4.js → edit-inventory-item-6Q2TVHKC.js} +11 -11
- package/dist/{edit-inventory-item-attributes-RVYWOFAC.js → edit-inventory-item-attributes-SZZ65XJ5.js} +11 -11
- package/dist/{edit-reservation-7BLGYXCJ.js → edit-reservation-TUCZRTBN.js} +2 -2
- package/dist/{edit-rules-ZWDKM5M3.js → edit-rules-WJEEV2XB.js} +11 -11
- package/dist/index.js +211 -179
- package/dist/{inventory-create-Q4VBPXSG.js → inventory-create-ZJDSLZ5R.js} +12 -12
- package/dist/{inventory-detail-6CKO3A3Y.js → inventory-detail-LSAJ3ZB5.js} +12 -12
- package/dist/{inventory-list-2JGX6BRI.js → inventory-list-SCRYOBZV.js} +2 -2
- package/dist/{inventory-metadata-COGGE5ZR.js → inventory-metadata-HDLZ6SNH.js} +11 -11
- package/dist/{inventory-stock-2QIKS7LE.js → inventory-stock-EHZJMHOY.js} +11 -11
- package/dist/loader-S77URTQS.js +32 -0
- package/dist/loader-XPJWDZU3.js +32 -0
- package/dist/{location-detail-HOCNTQ7K.js → location-detail-PBCP7BBV.js} +12 -12
- package/dist/{location-fulfillment-providers-YQ2XFPAJ.js → location-fulfillment-providers-NVVLRKJT.js} +13 -13
- package/dist/{location-list-KQQRH4MT.js → location-list-DM4WU57J.js} +11 -11
- package/dist/{location-sales-channels-DRIS6AUX.js → location-sales-channels-T7ZUQ3PA.js} +5 -4
- package/dist/{location-service-zone-shipping-option-create-6GYLJHEC.js → location-service-zone-shipping-option-create-VVD2GMM3.js} +11 -11
- package/dist/{login-N7CVSQNG.js → login-LTASZXSR.js} +11 -11
- package/dist/{manage-locations-TKLOHP3D.js → manage-locations-WW35SVOX.js} +1 -1
- package/dist/{marketplace-detail-K52ALYGT.js → marketplace-detail-GSPPUVR7.js} +12 -12
- package/dist/{marketplace-metadata-ZSX3IQF4.js → marketplace-metadata-35DDUX2Z.js} +11 -11
- package/dist/offer-detail-page-2DG3W7VG.js +572 -0
- package/dist/offer-variant-detail-page-U4LDYFE3.js +143 -0
- package/dist/{offers-UBD6NICA.js → offers-D2QQQD2F.js} +284 -123
- package/dist/{order-create-edit-HEOYCYZO.js → order-create-edit-QBVSHRFO.js} +3 -3
- package/dist/{order-create-exchange-L56VKQBL.js → order-create-exchange-67R63776.js} +11 -11
- package/dist/{order-create-refund-UTJKJ3AJ.js → order-create-refund-4CDCQGXT.js} +11 -11
- package/dist/{order-detail-KAB4MV7X.js → order-detail-A2WC2OZU.js} +13 -13
- package/dist/{order-edit-billing-address-RUURVISC.js → order-edit-billing-address-WFUOLHWY.js} +12 -12
- package/dist/{order-edit-email-OO7AMRHC.js → order-edit-email-CPIRJACP.js} +11 -11
- package/dist/{order-edit-shipping-address-BRRXUE76.js → order-edit-shipping-address-FCEL2URJ.js} +11 -11
- package/dist/{order-list-S3AJC6L5.js → order-list-QR3ZVI4U.js} +3 -3
- package/dist/{order-metadata-OHK6TPAO.js → order-metadata-NFTVCHFD.js} +11 -11
- package/dist/{order-request-transfer-YLMXC7NL.js → order-request-transfer-I6VIJK4L.js} +11 -11
- package/dist/pages/index.d.ts +2 -1
- package/dist/pages/index.js +90 -88
- package/dist/{price-list-configuration-Q5H22ZE2.js → price-list-configuration-I45NPXOI.js} +2 -2
- package/dist/{price-list-create-OYAVGRM5.js → price-list-create-QAEE6CAK.js} +13 -13
- package/dist/{price-list-detail-Q4GFFUFG.js → price-list-detail-77FAEXXO.js} +14 -14
- package/dist/{price-list-edit-YY4SXEI3.js → price-list-edit-A3SLXCYW.js} +2 -2
- package/dist/{price-list-list-OIOY43TF.js → price-list-list-AX7ZW6LL.js} +4 -4
- package/dist/{price-list-prices-add-KONZVSVQ.js → price-list-prices-add-TCW6S4Z3.js} +13 -13
- package/dist/{price-list-prices-edit-SMUKU7Q6.js → price-list-prices-edit-IGHGQ7DO.js} +11 -11
- package/dist/{product-add-existing-attributes-KOPVWK5Q.js → product-add-existing-attributes-BWEKWIWW.js} +11 -11
- package/dist/{product-attributes-C3KHQF2I.js → product-attributes-3VQAHGYZ.js} +1 -1
- package/dist/{product-bulk-edit-J3CMBZN2.js → product-bulk-edit-PLNZZO3C.js} +1 -1
- package/dist/{product-create-KTIQ3UAQ.js → product-create-AGSEC63C.js} +15 -15
- package/dist/{product-create-attribute-XARMC6FJ.js → product-create-attribute-PFIEDJNX.js} +1 -1
- package/dist/{product-create-variant-6VUKYLWE.js → product-create-variant-PP6PQF4T.js} +2 -2
- package/dist/{product-detail-UB3EZRDE.js → product-detail-CNVETME5.js} +15 -13
- package/dist/{product-edit-F4CKOIUO.js → product-edit-LBKIDCQM.js} +1 -1
- package/dist/{product-edit-attribute-LG2ZM6HQ.js → product-edit-attribute-RVNIUPIO.js} +1 -1
- package/dist/{product-list-2BWYAATR.js → product-list-KM37QJ6F.js} +13 -13
- package/dist/{product-media-EUDMCJ75.js → product-media-UWEOWTJT.js} +3 -3
- package/dist/{product-metadata-5WVNFCRL.js → product-metadata-6E6AZTHQ.js} +11 -11
- package/dist/{product-organization-BFWDCHP4.js → product-organization-2ZNTDHWP.js} +3 -3
- package/dist/{product-sales-channels-2J5Q65JS.js → product-sales-channels-7QCAABL4.js} +5 -4
- package/dist/{product-shipping-profile-WDLKA2SN.js → product-shipping-profile-UOQWHIO2.js} +1 -1
- package/dist/{product-tag-create-KQSVCWMC.js → product-tag-create-RDJNNVKB.js} +11 -11
- package/dist/{product-tag-detail-CWDAY7F3.js → product-tag-detail-R6UFJDCW.js} +14 -14
- package/dist/{product-tag-edit-B4SIZCUK.js → product-tag-edit-NQPOV5FR.js} +11 -11
- package/dist/{product-tag-list-2OK3OCMZ.js → product-tag-list-NFPQVVMO.js} +13 -13
- package/dist/{product-tag-metadata-MASTMIKE.js → product-tag-metadata-MYCCUFNT.js} +11 -11
- package/dist/{product-type-detail-3X7ZTZJN.js → product-type-detail-XJPSQDL2.js} +13 -13
- package/dist/{product-type-metadata-6BKTQHQC.js → product-type-metadata-IMMCIWOD.js} +11 -11
- package/dist/{product-variant-detail-PQ4RKPZT.js → product-variant-detail-VCMC4BZP.js} +12 -12
- package/dist/{product-variant-edit-TLF475SH.js → product-variant-edit-OXNWRFST.js} +11 -11
- package/dist/{product-variant-metadata-3M72B3PM.js → product-variant-metadata-ZIJG2HNS.js} +11 -11
- package/dist/{promotion-create-OKZBUSJD.js → promotion-create-CBOD7FVH.js} +11 -11
- package/dist/{promotion-detail-MMNEDRXD.js → promotion-detail-NSOGXQAY.js} +14 -14
- package/dist/{promotion-list-DHWW7FTI.js → promotion-list-7C3SQCSO.js} +4 -4
- package/dist/{refund-reason-create-N4DZ4UHS.js → refund-reason-create-V52L4U5V.js} +11 -11
- package/dist/{refund-reason-edit-OAHRDKXW.js → refund-reason-edit-3U6REVYW.js} +11 -11
- package/dist/{refund-reason-list-3BTQCIYE.js → refund-reason-list-SWU4B2ED.js} +11 -11
- package/dist/{region-metadata-BJSTTZFL.js → region-metadata-5YVOM47I.js} +11 -11
- package/dist/{reservation-create-TXYAY3KF.js → reservation-create-TNZQP7XW.js} +2 -2
- package/dist/{reservation-detail-CEENG76D.js → reservation-detail-BLPISKPA.js} +12 -12
- package/dist/{reservation-list-SORWYHI4.js → reservation-list-3OKWSHWH.js} +3 -3
- package/dist/{reservation-metadata-G3QBZF4K.js → reservation-metadata-VXWNURF4.js} +11 -11
- package/dist/{reset-password-QGQ4GAHK.js → reset-password-6CAYNSJ6.js} +1 -1
- package/dist/{sales-channel-add-products-3VZ5SLLP.js → sales-channel-add-products-LUKSBD5K.js} +12 -12
- package/dist/{sales-channel-create-XBR3QESI.js → sales-channel-create-O5KGQ6DU.js} +2 -2
- package/dist/{sales-channel-detail-PHRSKCNM.js → sales-channel-detail-6JPHP4FZ.js} +13 -13
- package/dist/{sales-channel-edit-ILBZBQP4.js → sales-channel-edit-CG3YUSYW.js} +2 -2
- package/dist/{sales-channel-list-E647FXSZ.js → sales-channel-list-D673ONK2.js} +15 -14
- package/dist/{sales-channel-metadata-HVPGS756.js → sales-channel-metadata-CHYCJOLY.js} +11 -11
- package/dist/{shipping-option-type-create-3ZKT7WAC.js → shipping-option-type-create-P2BCCARC.js} +11 -11
- package/dist/{shipping-option-type-detail-IYXWAK7F.js → shipping-option-type-detail-NVSXILP4.js} +11 -11
- package/dist/{shipping-option-type-edit-QRXYNNRW.js → shipping-option-type-edit-Z4ZLUANO.js} +11 -11
- package/dist/{shipping-option-type-list-MLIDCA3L.js → shipping-option-type-list-OUKJZJ6R.js} +11 -11
- package/dist/{shipping-profile-metadata-T4HPNTLH.js → shipping-profile-metadata-HS7TYNEX.js} +13 -13
- package/dist/{store-create-KFLNOD73.js → store-create-PHLTX6J3.js} +11 -11
- package/dist/{store-details-E347PHAN.js → store-details-V3NMV665.js} +14 -14
- package/dist/{store-edit-Y6NLBIOP.js → store-edit-CUVQLEFL.js} +2 -2
- package/dist/{store-list-S2L44OLB.js → store-list-WV6XHGLU.js} +13 -13
- package/dist/{tax-region-create-MIDQXQS4.js → tax-region-create-7UCI2QDJ.js} +12 -12
- package/dist/{tax-region-detail-AC7B3G57.js → tax-region-detail-OKEK6WNJ.js} +13 -13
- package/dist/{tax-region-edit-5CORTHTC.js → tax-region-edit-7O33SWZQ.js} +11 -11
- package/dist/{tax-region-metadata-QQZIQPAD.js → tax-region-metadata-6LMVFCFW.js} +11 -11
- package/dist/{tax-region-province-detail-2MGX7LEO.js → tax-region-province-detail-WHO3RLUX.js} +13 -13
- package/dist/{tax-region-tax-override-create-IONGD4TG.js → tax-region-tax-override-create-3FBV7DND.js} +14 -14
- package/dist/{tax-region-tax-override-edit-RIT6YRVK.js → tax-region-tax-override-edit-RZPP66BY.js} +14 -14
- package/dist/{user-detail-MMVBN3AE.js → user-detail-6CCQQPFR.js} +1 -1
- package/dist/{user-metadata-OZLU3Y2X.js → user-metadata-OYX24QL7.js} +11 -11
- package/package.json +1 -1
- package/dist/[id]-BAPEFPAO.js +0 -505
- package/dist/chunk-PT5PLV3N.js +0 -78
- package/dist/loader-OU7SKXOD.js +0 -28
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OFFERS_PAGE_SIZE,
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
OFFER_PRODUCT_LIST_FIELDS
|
|
4
|
+
} from "./chunk-S6A4FVM2.js";
|
|
5
5
|
import {
|
|
6
|
-
useBulkDeleteOffers
|
|
7
|
-
useOffers
|
|
6
|
+
useBulkDeleteOffers
|
|
8
7
|
} from "./chunk-UIVWOKWT.js";
|
|
9
8
|
import {
|
|
10
9
|
CategoryCell,
|
|
@@ -12,6 +11,10 @@ import {
|
|
|
12
11
|
ProductStatusCell,
|
|
13
12
|
ProductStatusHeader
|
|
14
13
|
} from "./chunk-WPVDACTL.js";
|
|
14
|
+
import {
|
|
15
|
+
ProductCell,
|
|
16
|
+
ProductHeader
|
|
17
|
+
} from "./chunk-FWPGOIFA.js";
|
|
15
18
|
import "./chunk-DB6ANJBO.js";
|
|
16
19
|
import {
|
|
17
20
|
PlaceholderCell
|
|
@@ -25,9 +28,7 @@ import "./chunk-YN3FGNJM.js";
|
|
|
25
28
|
import "./chunk-KAZ5BYTQ.js";
|
|
26
29
|
import "./chunk-634XVU3D.js";
|
|
27
30
|
import "./chunk-E74OUNA3.js";
|
|
28
|
-
import
|
|
29
|
-
Thumbnail
|
|
30
|
-
} from "./chunk-WIYFXWRI.js";
|
|
31
|
+
import "./chunk-WIYFXWRI.js";
|
|
31
32
|
import {
|
|
32
33
|
SingleColumnPage
|
|
33
34
|
} from "./chunk-H6MYB7GB.js";
|
|
@@ -36,23 +37,64 @@ import "./chunk-XQNVC4Q7.js";
|
|
|
36
37
|
import {
|
|
37
38
|
useQueryParams
|
|
38
39
|
} from "./chunk-THHRRYRS.js";
|
|
39
|
-
import "./chunk-UCYSCKZV.js";
|
|
40
40
|
import {
|
|
41
|
-
|
|
42
|
-
} from "./chunk-
|
|
41
|
+
require_dist
|
|
42
|
+
} from "./chunk-UCYSCKZV.js";
|
|
43
|
+
import {
|
|
44
|
+
useProductTags
|
|
45
|
+
} from "./chunk-LJDGVBOQ.js";
|
|
46
|
+
import "./chunk-OH4AABUT.js";
|
|
47
|
+
import "./chunk-FJHAAROU.js";
|
|
48
|
+
import "./chunk-AEMDNTW5.js";
|
|
49
|
+
import "./chunk-LYD3C73Z.js";
|
|
50
|
+
import "./chunk-533GMKEG.js";
|
|
51
|
+
import {
|
|
52
|
+
useProductTypes
|
|
53
|
+
} from "./chunk-46M463BR.js";
|
|
54
|
+
import "./chunk-YFRC6GEN.js";
|
|
55
|
+
import "./chunk-N6SI4IIT.js";
|
|
56
|
+
import "./chunk-JPNPTILP.js";
|
|
57
|
+
import "./chunk-DAXXLQKB.js";
|
|
58
|
+
import "./chunk-OHOWEMHO.js";
|
|
59
|
+
import "./chunk-GKGLVDDV.js";
|
|
60
|
+
import "./chunk-ESPLVOFC.js";
|
|
61
|
+
import "./chunk-WJJXUXSO.js";
|
|
62
|
+
import "./chunk-LAPEZATU.js";
|
|
63
|
+
import "./chunk-Z2UBJXTU.js";
|
|
64
|
+
import {
|
|
65
|
+
useCollections
|
|
66
|
+
} from "./chunk-QKJGSZI2.js";
|
|
67
|
+
import "./chunk-FXWKGNRV.js";
|
|
68
|
+
import "./chunk-VDKOJ5WD.js";
|
|
69
|
+
import "./chunk-ZN7LWXVC.js";
|
|
70
|
+
import "./chunk-XGUUM3S6.js";
|
|
71
|
+
import "./chunk-VYMODH6P.js";
|
|
43
72
|
import {
|
|
44
73
|
useSellers
|
|
45
74
|
} from "./chunk-LEG67A2R.js";
|
|
75
|
+
import "./chunk-PRBE5CM3.js";
|
|
76
|
+
import "./chunk-5TRY5IMZ.js";
|
|
77
|
+
import "./chunk-EPHVGD5Z.js";
|
|
78
|
+
import "./chunk-VT6QIVZW.js";
|
|
46
79
|
import {
|
|
47
80
|
ActionMenu
|
|
48
81
|
} from "./chunk-BDGZ4EQO.js";
|
|
82
|
+
import "./chunk-OKWGPKVK.js";
|
|
83
|
+
import {
|
|
84
|
+
useProductCategories
|
|
85
|
+
} from "./chunk-KYFWVLWO.js";
|
|
49
86
|
import "./chunk-LAVHRER2.js";
|
|
50
87
|
import "./chunk-Y7QKP6QU.js";
|
|
51
88
|
import "./chunk-INNFZYX2.js";
|
|
89
|
+
import {
|
|
90
|
+
useProducts
|
|
91
|
+
} from "./chunk-M2E3PKA4.js";
|
|
52
92
|
import "./chunk-RHKRREUU.js";
|
|
53
93
|
import "./chunk-ZA2KFUFR.js";
|
|
54
94
|
import "./chunk-ZBWL72TB.js";
|
|
55
|
-
import
|
|
95
|
+
import {
|
|
96
|
+
__toESM
|
|
97
|
+
} from "./chunk-NBMM2TZK.js";
|
|
56
98
|
|
|
57
99
|
// src/pages/offers/offer-list-page.tsx
|
|
58
100
|
import { Children as Children2 } from "react";
|
|
@@ -63,7 +105,7 @@ import { Children } from "react";
|
|
|
63
105
|
import { Outlet } from "react-router-dom";
|
|
64
106
|
|
|
65
107
|
// src/pages/offers/_components/offer-list-data-table.tsx
|
|
66
|
-
import { toast, usePrompt } from "@medusajs/ui";
|
|
108
|
+
import { toast as toast2, usePrompt as usePrompt2 } from "@medusajs/ui";
|
|
67
109
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
68
110
|
import { useState } from "react";
|
|
69
111
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
@@ -75,35 +117,85 @@ import { useMemo } from "react";
|
|
|
75
117
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
76
118
|
|
|
77
119
|
// src/pages/offers/_components/offer-actions.tsx
|
|
78
|
-
import { BuildingStorefront } from "@medusajs/icons";
|
|
120
|
+
import { BuildingStorefront, Trash } from "@medusajs/icons";
|
|
121
|
+
import { toast, usePrompt } from "@medusajs/ui";
|
|
79
122
|
import { useTranslation } from "react-i18next";
|
|
80
123
|
import { jsx } from "react/jsx-runtime";
|
|
81
|
-
var OfferActions = ({
|
|
124
|
+
var OfferActions = ({ product }) => {
|
|
82
125
|
const { t } = useTranslation();
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
126
|
+
const prompt = usePrompt();
|
|
127
|
+
const { mutateAsync: bulkDelete } = useBulkDeleteOffers();
|
|
128
|
+
const handleDelete = async () => {
|
|
129
|
+
if (!product.offerIds.length) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const confirmed = await prompt({
|
|
133
|
+
title: t("general.areYouSure"),
|
|
134
|
+
description: t("offers.bulkDelete.description", {
|
|
135
|
+
count: product.offerIds.length
|
|
136
|
+
}),
|
|
137
|
+
confirmText: t("actions.delete"),
|
|
138
|
+
cancelText: t("actions.cancel"),
|
|
139
|
+
variant: "danger"
|
|
140
|
+
});
|
|
141
|
+
if (!confirmed) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const result = await bulkDelete(product.offerIds);
|
|
145
|
+
if (result.failed.length === 0) {
|
|
146
|
+
toast.success(
|
|
147
|
+
t("offers.bulkDelete.successToast", { count: result.succeeded.length })
|
|
148
|
+
);
|
|
149
|
+
} else {
|
|
150
|
+
toast.warning(
|
|
151
|
+
t("offers.bulkDelete.errorToast", {
|
|
152
|
+
message: `${result.succeeded.length}/${product.offerIds.length} succeeded`
|
|
153
|
+
})
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
const groups = [];
|
|
158
|
+
if (product.sellerId) {
|
|
159
|
+
groups.push({
|
|
160
|
+
actions: [
|
|
90
161
|
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
label: t("offers.actions.openStore"),
|
|
95
|
-
to: `/stores/${offer.sellerId}`
|
|
96
|
-
}
|
|
97
|
-
]
|
|
162
|
+
icon: /* @__PURE__ */ jsx(BuildingStorefront, {}),
|
|
163
|
+
label: t("offers.actions.openStore"),
|
|
164
|
+
to: `/stores/${product.sellerId}`
|
|
98
165
|
}
|
|
99
166
|
]
|
|
100
|
-
}
|
|
101
|
-
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
groups.push({
|
|
170
|
+
actions: [
|
|
171
|
+
{
|
|
172
|
+
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
173
|
+
label: t("actions.delete"),
|
|
174
|
+
onClick: handleDelete,
|
|
175
|
+
disabled: product.offerIds.length === 0
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
});
|
|
179
|
+
return /* @__PURE__ */ jsx(ActionMenu, { groups });
|
|
102
180
|
};
|
|
103
181
|
|
|
104
182
|
// src/pages/offers/_components/use-offer-table-columns.tsx
|
|
105
|
-
import { jsx as jsx2
|
|
183
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
106
184
|
var columnHelper = createColumnHelper();
|
|
185
|
+
var countOfferedVariants = (row) => (row.variants ?? []).filter((v) => (v.offers?.length ?? 0) > 0).length;
|
|
186
|
+
var collectOfferIds = (row) => (row.variants ?? []).flatMap((v) => (v.offers ?? []).map((o) => o.id));
|
|
187
|
+
var collectOfferSellers = (row) => {
|
|
188
|
+
const seen = /* @__PURE__ */ new Map();
|
|
189
|
+
for (const variant of row.variants ?? []) {
|
|
190
|
+
for (const offer of variant.offers ?? []) {
|
|
191
|
+
const seller = offer.seller;
|
|
192
|
+
if (seller?.id && !seen.has(seller.id)) {
|
|
193
|
+
seen.set(seller.id, seller);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return Array.from(seen.values());
|
|
198
|
+
};
|
|
107
199
|
var useOfferTableColumns = () => {
|
|
108
200
|
const { t } = useTranslation2();
|
|
109
201
|
return useMemo(
|
|
@@ -127,19 +219,17 @@ var useOfferTableColumns = () => {
|
|
|
127
219
|
)
|
|
128
220
|
}),
|
|
129
221
|
columnHelper.display({
|
|
130
|
-
id: "
|
|
131
|
-
header:
|
|
132
|
-
cell: ({ row }) =>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
222
|
+
id: "product",
|
|
223
|
+
header: () => /* @__PURE__ */ jsx2(ProductHeader, {}),
|
|
224
|
+
cell: ({ row }) => /* @__PURE__ */ jsx2(
|
|
225
|
+
ProductCell,
|
|
226
|
+
{
|
|
227
|
+
product: {
|
|
228
|
+
title: row.original.title ?? "",
|
|
229
|
+
thumbnail: row.original.thumbnail ?? null
|
|
230
|
+
}
|
|
137
231
|
}
|
|
138
|
-
|
|
139
|
-
/* @__PURE__ */ jsx2("div", { className: "w-fit flex-shrink-0", children: /* @__PURE__ */ jsx2(Thumbnail, { src: variant?.product?.thumbnail }) }),
|
|
140
|
-
/* @__PURE__ */ jsx2("span", { title: variant?.product?.title ?? "", className: "truncate", children: variant?.title })
|
|
141
|
-
] });
|
|
142
|
-
}
|
|
232
|
+
)
|
|
143
233
|
}),
|
|
144
234
|
columnHelper.display({
|
|
145
235
|
id: "categories",
|
|
@@ -147,47 +237,50 @@ var useOfferTableColumns = () => {
|
|
|
147
237
|
cell: ({ row }) => /* @__PURE__ */ jsx2(
|
|
148
238
|
CategoryCell,
|
|
149
239
|
{
|
|
150
|
-
categories: row.original.
|
|
240
|
+
categories: row.original.categories ?? void 0
|
|
151
241
|
}
|
|
152
242
|
)
|
|
153
243
|
}),
|
|
154
|
-
columnHelper.accessor("sku", {
|
|
155
|
-
header: t("offers.fields.sku"),
|
|
156
|
-
cell: ({ getValue }) => {
|
|
157
|
-
const sku = getValue();
|
|
158
|
-
if (!sku) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
|
|
159
|
-
return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "truncate", children: sku });
|
|
160
|
-
}
|
|
161
|
-
}),
|
|
162
244
|
columnHelper.display({
|
|
163
|
-
id: "
|
|
164
|
-
header: t("
|
|
245
|
+
id: "collection",
|
|
246
|
+
header: t("fields.collection"),
|
|
165
247
|
cell: ({ row }) => {
|
|
166
|
-
const
|
|
167
|
-
if (!
|
|
168
|
-
return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "truncate", children:
|
|
248
|
+
const collection = row.original.collection;
|
|
249
|
+
if (!collection?.title) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
|
|
250
|
+
return /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "truncate", children: collection.title });
|
|
169
251
|
}
|
|
170
252
|
}),
|
|
253
|
+
columnHelper.display({
|
|
254
|
+
id: "variants",
|
|
255
|
+
header: t("offers.fields.variants"),
|
|
256
|
+
cell: ({ row }) => /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "truncate", children: t("offers.fields.variantsCount", {
|
|
257
|
+
count: countOfferedVariants(row.original)
|
|
258
|
+
}) })
|
|
259
|
+
}),
|
|
171
260
|
columnHelper.display({
|
|
172
261
|
id: "status",
|
|
173
262
|
header: () => /* @__PURE__ */ jsx2(ProductStatusHeader, {}),
|
|
174
263
|
cell: ({ row }) => {
|
|
175
|
-
const status = row.original.
|
|
264
|
+
const status = row.original.status;
|
|
176
265
|
if (!status) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
|
|
177
266
|
return /* @__PURE__ */ jsx2(ProductStatusCell, { status });
|
|
178
267
|
}
|
|
179
268
|
}),
|
|
180
269
|
columnHelper.display({
|
|
181
270
|
id: "actions",
|
|
182
|
-
cell: ({ row }) =>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
271
|
+
cell: ({ row }) => {
|
|
272
|
+
const sellers = collectOfferSellers(row.original);
|
|
273
|
+
return /* @__PURE__ */ jsx2(
|
|
274
|
+
OfferActions,
|
|
275
|
+
{
|
|
276
|
+
product: {
|
|
277
|
+
id: row.original.id,
|
|
278
|
+
offerIds: collectOfferIds(row.original),
|
|
279
|
+
sellerId: sellers.length === 1 ? sellers[0].id ?? null : null
|
|
280
|
+
}
|
|
188
281
|
}
|
|
189
|
-
|
|
190
|
-
|
|
282
|
+
);
|
|
283
|
+
}
|
|
191
284
|
})
|
|
192
285
|
],
|
|
193
286
|
[t]
|
|
@@ -195,11 +288,18 @@ var useOfferTableColumns = () => {
|
|
|
195
288
|
};
|
|
196
289
|
|
|
197
290
|
// src/pages/offers/_components/use-offer-table-filters.tsx
|
|
291
|
+
var import_types = __toESM(require_dist(), 1);
|
|
198
292
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
199
293
|
var useOfferTableFilters = () => {
|
|
200
294
|
const { t } = useTranslation3();
|
|
201
295
|
const { sellers } = useSellers({ limit: 1e3 });
|
|
202
|
-
const {
|
|
296
|
+
const { product_categories } = useProductCategories({
|
|
297
|
+
limit: 1e3,
|
|
298
|
+
fields: "id,name"
|
|
299
|
+
});
|
|
300
|
+
const { collections } = useCollections({ limit: 1e3 });
|
|
301
|
+
const { product_types } = useProductTypes({ limit: 1e3 });
|
|
302
|
+
const { product_tags } = useProductTags({ limit: 1e3 });
|
|
203
303
|
const filters = [];
|
|
204
304
|
if (sellers && sellers.length > 0) {
|
|
205
305
|
filters.push({
|
|
@@ -214,25 +314,86 @@ var useOfferTableFilters = () => {
|
|
|
214
314
|
}))
|
|
215
315
|
});
|
|
216
316
|
}
|
|
217
|
-
if (
|
|
317
|
+
if (product_categories && product_categories.length > 0) {
|
|
318
|
+
filters.push({
|
|
319
|
+
type: "select",
|
|
320
|
+
key: "category_id",
|
|
321
|
+
label: t("fields.category"),
|
|
322
|
+
multiple: true,
|
|
323
|
+
searchable: true,
|
|
324
|
+
options: product_categories.map(
|
|
325
|
+
(c) => ({
|
|
326
|
+
label: c.name ?? c.id,
|
|
327
|
+
value: c.id
|
|
328
|
+
})
|
|
329
|
+
)
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
if (collections && collections.length > 0) {
|
|
218
333
|
filters.push({
|
|
219
334
|
type: "select",
|
|
220
|
-
key: "
|
|
221
|
-
label: t("
|
|
335
|
+
key: "collection_id",
|
|
336
|
+
label: t("fields.collection"),
|
|
222
337
|
multiple: true,
|
|
223
338
|
searchable: true,
|
|
224
|
-
options:
|
|
225
|
-
(
|
|
226
|
-
label:
|
|
227
|
-
value:
|
|
339
|
+
options: collections.map(
|
|
340
|
+
(c) => ({
|
|
341
|
+
label: c.title ?? c.id,
|
|
342
|
+
value: c.id
|
|
343
|
+
})
|
|
344
|
+
)
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
if (product_types && product_types.length > 0) {
|
|
348
|
+
filters.push({
|
|
349
|
+
type: "select",
|
|
350
|
+
key: "type_id",
|
|
351
|
+
label: t("fields.type"),
|
|
352
|
+
multiple: true,
|
|
353
|
+
searchable: true,
|
|
354
|
+
options: product_types.map(
|
|
355
|
+
(pt) => ({
|
|
356
|
+
label: pt.value ?? pt.id,
|
|
357
|
+
value: pt.id
|
|
358
|
+
})
|
|
359
|
+
)
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
if (product_tags && product_tags.length > 0) {
|
|
363
|
+
filters.push({
|
|
364
|
+
type: "select",
|
|
365
|
+
key: "tag_id",
|
|
366
|
+
label: t("fields.tag"),
|
|
367
|
+
multiple: true,
|
|
368
|
+
searchable: true,
|
|
369
|
+
options: product_tags.map(
|
|
370
|
+
(pt) => ({
|
|
371
|
+
label: pt.value ?? pt.id,
|
|
372
|
+
value: pt.id
|
|
228
373
|
})
|
|
229
374
|
)
|
|
230
375
|
});
|
|
231
376
|
}
|
|
232
377
|
filters.push({
|
|
233
|
-
type: "
|
|
234
|
-
key: "
|
|
235
|
-
label: t("
|
|
378
|
+
type: "select",
|
|
379
|
+
key: "status",
|
|
380
|
+
label: t("fields.status"),
|
|
381
|
+
multiple: true,
|
|
382
|
+
options: [
|
|
383
|
+
{ label: t("products.productStatus.draft"), value: import_types.ProductStatus.DRAFT },
|
|
384
|
+
{
|
|
385
|
+
label: t("products.productStatus.proposed"),
|
|
386
|
+
value: import_types.ProductStatus.PROPOSED
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
label: t("products.productStatus.published"),
|
|
390
|
+
value: import_types.ProductStatus.PUBLISHED
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
label: t("products.productStatus.rejected"),
|
|
394
|
+
value: import_types.ProductStatus.REJECTED
|
|
395
|
+
}
|
|
396
|
+
]
|
|
236
397
|
});
|
|
237
398
|
filters.push({
|
|
238
399
|
type: "date",
|
|
@@ -249,7 +410,7 @@ var useOfferTableFilters = () => {
|
|
|
249
410
|
|
|
250
411
|
// src/pages/offers/_components/use-offer-table-query.tsx
|
|
251
412
|
var useOfferTableQuery = ({
|
|
252
|
-
pageSize =
|
|
413
|
+
pageSize = 10,
|
|
253
414
|
prefix
|
|
254
415
|
}) => {
|
|
255
416
|
const raw = useQueryParams(
|
|
@@ -257,12 +418,14 @@ var useOfferTableQuery = ({
|
|
|
257
418
|
"q",
|
|
258
419
|
"order",
|
|
259
420
|
"offset",
|
|
260
|
-
"sku",
|
|
261
|
-
"shipping_profile_id",
|
|
262
|
-
"seller_id",
|
|
263
|
-
"variant_id",
|
|
264
421
|
"created_at",
|
|
265
|
-
"updated_at"
|
|
422
|
+
"updated_at",
|
|
423
|
+
"category_id",
|
|
424
|
+
"collection_id",
|
|
425
|
+
"type_id",
|
|
426
|
+
"tag_id",
|
|
427
|
+
"status",
|
|
428
|
+
"seller_id"
|
|
266
429
|
],
|
|
267
430
|
prefix
|
|
268
431
|
);
|
|
@@ -270,22 +433,30 @@ var useOfferTableQuery = ({
|
|
|
270
433
|
offset,
|
|
271
434
|
created_at,
|
|
272
435
|
updated_at,
|
|
273
|
-
|
|
436
|
+
category_id,
|
|
437
|
+
collection_id,
|
|
438
|
+
type_id,
|
|
439
|
+
tag_id,
|
|
440
|
+
status,
|
|
274
441
|
seller_id,
|
|
275
|
-
|
|
276
|
-
|
|
442
|
+
order,
|
|
443
|
+
q
|
|
277
444
|
} = raw;
|
|
278
445
|
const searchParams = {
|
|
279
446
|
limit: pageSize,
|
|
280
|
-
offset: offset ? parseInt(offset, 10) :
|
|
281
|
-
order:
|
|
282
|
-
q
|
|
283
|
-
|
|
284
|
-
|
|
447
|
+
offset: offset ? parseInt(offset, 10) : 0,
|
|
448
|
+
order: order || "title",
|
|
449
|
+
q,
|
|
450
|
+
category_id: category_id ? category_id.split(",") : void 0,
|
|
451
|
+
collection_id: collection_id ? collection_id.split(",") : void 0,
|
|
452
|
+
type_id: type_id ? type_id.split(",") : void 0,
|
|
453
|
+
tag_id: tag_id ? tag_id.split(",") : void 0,
|
|
454
|
+
status: status ? status.split(",") : void 0,
|
|
285
455
|
seller_id: seller_id ? seller_id.split(",") : void 0,
|
|
286
|
-
variant_id: variant_id ? variant_id.split(",") : void 0,
|
|
287
456
|
created_at: created_at ? JSON.parse(created_at) : void 0,
|
|
288
|
-
updated_at: updated_at ? JSON.parse(updated_at) : void 0
|
|
457
|
+
updated_at: updated_at ? JSON.parse(updated_at) : void 0,
|
|
458
|
+
has_offer: "true",
|
|
459
|
+
fields: OFFER_PRODUCT_LIST_FIELDS
|
|
289
460
|
};
|
|
290
461
|
return {
|
|
291
462
|
searchParams,
|
|
@@ -297,22 +468,16 @@ var useOfferTableQuery = ({
|
|
|
297
468
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
298
469
|
var OfferListDataTable = () => {
|
|
299
470
|
const { t } = useTranslation4();
|
|
300
|
-
const prompt =
|
|
471
|
+
const prompt = usePrompt2();
|
|
301
472
|
const [selection, setSelection] = useState({});
|
|
302
473
|
const { raw, searchParams } = useOfferTableQuery({
|
|
303
474
|
pageSize: OFFERS_PAGE_SIZE
|
|
304
475
|
});
|
|
305
|
-
const {
|
|
306
|
-
|
|
307
|
-
count,
|
|
308
|
-
isPending: isLoading,
|
|
309
|
-
isError,
|
|
310
|
-
error
|
|
311
|
-
} = useOffers(
|
|
312
|
-
{ ...searchParams, fields: OFFER_LIST_FIELDS },
|
|
476
|
+
const { products, count, isLoading, isError, error } = useProducts(
|
|
477
|
+
searchParams,
|
|
313
478
|
{ placeholderData: keepPreviousData }
|
|
314
479
|
);
|
|
315
|
-
const rows =
|
|
480
|
+
const rows = products ?? [];
|
|
316
481
|
const filters = useOfferTableFilters();
|
|
317
482
|
const columns = useOfferTableColumns();
|
|
318
483
|
const { mutateAsync: bulkDelete } = useBulkDeleteOffers();
|
|
@@ -349,6 +514,7 @@ var OfferListDataTable = () => {
|
|
|
349
514
|
{ key: "created_at", label: t("fields.createdAt") },
|
|
350
515
|
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
351
516
|
],
|
|
517
|
+
defaultOrderBy: "title",
|
|
352
518
|
navigateTo: (row) => `${row.id}`,
|
|
353
519
|
noRecords: {
|
|
354
520
|
title: t("offers.empty.heading"),
|
|
@@ -359,40 +525,35 @@ var OfferListDataTable = () => {
|
|
|
359
525
|
label: t("offers.actions.bulkDelete"),
|
|
360
526
|
shortcut: "d",
|
|
361
527
|
action: async (currentSelection) => {
|
|
362
|
-
const
|
|
363
|
-
if (
|
|
528
|
+
const productIds = Object.keys(currentSelection);
|
|
529
|
+
if (productIds.length === 0) return;
|
|
530
|
+
const selectedRows = rows.filter((r) => productIds.includes(r.id));
|
|
531
|
+
const offerIds = selectedRows.flatMap((r) => collectOfferIds(r));
|
|
532
|
+
if (offerIds.length === 0) return;
|
|
364
533
|
const confirmed = await prompt({
|
|
365
534
|
title: t("general.areYouSure"),
|
|
366
535
|
description: t("offers.bulkDelete.description", {
|
|
367
|
-
count:
|
|
536
|
+
count: offerIds.length
|
|
368
537
|
}),
|
|
369
538
|
confirmText: t("actions.delete"),
|
|
370
539
|
cancelText: t("actions.cancel"),
|
|
371
540
|
variant: "danger"
|
|
372
541
|
});
|
|
373
542
|
if (!confirmed) return;
|
|
374
|
-
const result = await bulkDelete(
|
|
543
|
+
const result = await bulkDelete(offerIds);
|
|
375
544
|
const succeededCount = result.succeeded.length;
|
|
376
545
|
const failedCount = result.failed.length;
|
|
377
546
|
if (failedCount === 0) {
|
|
378
|
-
|
|
547
|
+
toast2.success(
|
|
379
548
|
t("offers.bulkDelete.successToast", { count: succeededCount })
|
|
380
549
|
);
|
|
381
550
|
setSelection({});
|
|
382
551
|
} else {
|
|
383
|
-
|
|
552
|
+
toast2.warning(
|
|
384
553
|
t("offers.bulkDelete.errorToast", {
|
|
385
|
-
message: `${succeededCount}/${
|
|
554
|
+
message: `${succeededCount}/${offerIds.length} succeeded`
|
|
386
555
|
})
|
|
387
556
|
);
|
|
388
|
-
const failedIds = new Set(result.failed.map((f) => f.id));
|
|
389
|
-
setSelection((prev) => {
|
|
390
|
-
const next = {};
|
|
391
|
-
for (const id of Object.keys(prev)) {
|
|
392
|
-
if (failedIds.has(id)) next[id] = true;
|
|
393
|
-
}
|
|
394
|
-
return next;
|
|
395
|
-
});
|
|
396
557
|
}
|
|
397
558
|
}
|
|
398
559
|
}
|
|
@@ -404,21 +565,21 @@ var OfferListDataTable = () => {
|
|
|
404
565
|
// src/pages/offers/_components/offer-list-header.tsx
|
|
405
566
|
import { Heading } from "@medusajs/ui";
|
|
406
567
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
407
|
-
import { jsx as jsx4, jsxs
|
|
568
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
408
569
|
var OfferListTitle = () => {
|
|
409
570
|
const { t } = useTranslation5();
|
|
410
571
|
return /* @__PURE__ */ jsx4(Heading, { children: t("offers.domain") });
|
|
411
572
|
};
|
|
412
573
|
var OfferListActions = () => null;
|
|
413
|
-
var OfferListHeader = () => /* @__PURE__ */
|
|
574
|
+
var OfferListHeader = () => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
414
575
|
/* @__PURE__ */ jsx4(OfferListTitle, {}),
|
|
415
576
|
/* @__PURE__ */ jsx4(OfferListActions, {})
|
|
416
577
|
] });
|
|
417
578
|
|
|
418
579
|
// src/pages/offers/_components/offer-list-table.tsx
|
|
419
|
-
import { Fragment, jsx as jsx5, jsxs as
|
|
420
|
-
var OfferListTable = ({ children }) => /* @__PURE__ */
|
|
421
|
-
Children.count(children) > 0 ? children : /* @__PURE__ */
|
|
580
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
581
|
+
var OfferListTable = ({ children }) => /* @__PURE__ */ jsxs2(Container, { className: "divide-y p-0", "data-testid": "offer-list-table", children: [
|
|
582
|
+
Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
422
583
|
/* @__PURE__ */ jsx5(OfferListHeader, {}),
|
|
423
584
|
/* @__PURE__ */ jsx5(OfferListDataTable, {})
|
|
424
585
|
] }),
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
useRequestOrderEdit,
|
|
10
10
|
useUpdateOrderEditAddedItem,
|
|
11
11
|
useUpdateOrderEditOriginalItem
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B4K7H6DH.js";
|
|
13
13
|
import {
|
|
14
14
|
MoneyAmountCell
|
|
15
15
|
} from "./chunk-2Y3WMGN6.js";
|
|
@@ -52,7 +52,7 @@ import "./chunk-XQNVC4Q7.js";
|
|
|
52
52
|
import {
|
|
53
53
|
useQueryParams
|
|
54
54
|
} from "./chunk-THHRRYRS.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-XGUUM3S6.js";
|
|
56
56
|
import {
|
|
57
57
|
useOrder,
|
|
58
58
|
useOrderPreview
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
import "./chunk-LAVHRER2.js";
|
|
64
64
|
import "./chunk-Y7QKP6QU.js";
|
|
65
65
|
import "./chunk-INNFZYX2.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-M2E3PKA4.js";
|
|
67
67
|
import "./chunk-RHKRREUU.js";
|
|
68
68
|
import "./chunk-ZA2KFUFR.js";
|
|
69
69
|
import "./chunk-ZBWL72TB.js";
|