@medusajs/dashboard 3.0.0-snapshot-20251216145629 → 3.0.0-snapshot-20260102134455
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-locales-2OZXZCT5.mjs +81 -0
- package/dist/{adjust-inventory-26YXAXQL.mjs → adjust-inventory-47KGDWME.mjs} +2 -2
- package/dist/{api-key-management-create-EMP32G2D.mjs → api-key-management-create-EFPPZPZ7.mjs} +4 -4
- package/dist/{api-key-management-detail-6RCDH73M.mjs → api-key-management-detail-4IFED7SF.mjs} +15 -15
- package/dist/{api-key-management-edit-IBM3ZXHK.mjs → api-key-management-edit-QGVBNLUL.mjs} +4 -4
- package/dist/{api-key-management-list-KC5GOWAU.mjs → api-key-management-list-ROIJIIPQ.mjs} +4 -4
- package/dist/{api-key-management-sales-channels-LUB5G6RC.mjs → api-key-management-sales-channels-7P5L45AT.mjs} +6 -6
- package/dist/app.css +33 -3
- package/dist/app.js +18467 -16698
- package/dist/app.mjs +13 -13
- package/dist/{campaign-create-FJOECKGT.mjs → campaign-create-EZGZ4SBQ.mjs} +3 -3
- package/dist/{campaign-detail-5Q4BYCPX.mjs → campaign-detail-NFKLFPY4.mjs} +12 -12
- package/dist/{categories-metadata-J7M3XWI7.mjs → categories-metadata-G7BACZ26.mjs} +12 -12
- package/dist/{category-create-KHJZSC7G.mjs → category-create-7MV25HYX.mjs} +6 -6
- package/dist/{category-detail-S5IPXMHX.mjs → category-detail-XJQQ7UU4.mjs} +14 -14
- package/dist/{category-edit-CTA2EPDG.mjs → category-edit-LV7EARAB.mjs} +3 -3
- package/dist/{category-list-QBYJ4T3R.mjs → category-list-NIVLV5S3.mjs} +6 -6
- package/dist/{category-organize-SXP33XET.mjs → category-organize-SCRGWKDG.mjs} +3 -3
- package/dist/{category-products-KPW6BA5J.mjs → category-products-FXFSMCR6.mjs} +13 -13
- package/dist/{chunk-OXPE5TAY.mjs → chunk-24C2YVFU.mjs} +1 -1
- package/dist/{chunk-4JQR6QNW.mjs → chunk-333HK6Y6.mjs} +2 -2
- package/dist/{chunk-DODQ3KJT.mjs → chunk-3RRA56WC.mjs} +8 -3
- package/dist/{chunk-5LGRZSEH.mjs → chunk-3YPZ3R4U.mjs} +1 -1
- package/dist/chunk-5BUFAGKR.mjs +13 -0
- package/dist/{chunk-2DULKOPN.mjs → chunk-5ISRTMYH.mjs} +1 -1
- package/dist/{chunk-PHLCT2HA.mjs → chunk-5ZPKY5XP.mjs} +1 -1
- package/dist/{chunk-U6G4M5LP.mjs → chunk-6EXKKRZY.mjs} +1 -1
- package/dist/{chunk-GRZSG4EP.mjs → chunk-74WPAWMW.mjs} +127 -226
- package/dist/{chunk-UULAOAFM.mjs → chunk-772OR7OQ.mjs} +358 -242
- package/dist/chunk-7AXHHXCX.mjs +4 -0
- package/dist/{chunk-BMS2QLJY.mjs → chunk-BMJ5RYIO.mjs} +1 -1
- package/dist/{chunk-Y2YVTIJI.mjs → chunk-CW5PQUJ6.mjs} +1 -1
- package/dist/{chunk-IAV7IKJ6.mjs → chunk-DN5BRKVN.mjs} +1 -1
- package/dist/{chunk-RS7DWLEP.mjs → chunk-DQUXK4WW.mjs} +1 -1
- package/dist/{chunk-2XTBDCGE.mjs → chunk-DWH2OQFK.mjs} +1 -1
- package/dist/{chunk-CCQD65EY.mjs → chunk-FKNW5MLZ.mjs} +360 -288
- package/dist/{chunk-HTCYX4VD.mjs → chunk-G35UUG2P.mjs} +1 -1
- package/dist/{chunk-QKALAT7P.mjs → chunk-GGONMC2N.mjs} +1 -1
- package/dist/{chunk-FYWHE3W5.mjs → chunk-GJN5SXGZ.mjs} +1 -1
- package/dist/{chunk-CVHJAKLQ.mjs → chunk-HDO2UCKF.mjs} +1 -1
- package/dist/{chunk-3C6WQ7NH.mjs → chunk-IWNNQ6HA.mjs} +37 -3
- package/dist/{chunk-OL24RDYM.mjs → chunk-KHJL6MUQ.mjs} +8 -8
- package/dist/{chunk-6P4Q4AAP.mjs → chunk-KPI4WFJU.mjs} +3 -3
- package/dist/{chunk-AHZLMCZF.mjs → chunk-KSDXSKJ7.mjs} +1 -1
- package/dist/{chunk-BZKI5J2M.mjs → chunk-L7A2JIQY.mjs} +3 -3
- package/dist/{chunk-XY7A7GZJ.mjs → chunk-LEAMWI5H.mjs} +1 -1
- package/dist/{chunk-A4XYK3MY.mjs → chunk-LG5B2BVB.mjs} +2 -2
- package/dist/{chunk-23GTCEOV.mjs → chunk-ML7BA2NY.mjs} +1 -1
- package/dist/{chunk-OFN7DIZA.mjs → chunk-OYHFHBNL.mjs} +94 -7
- package/dist/{chunk-OSHH5GAS.mjs → chunk-Q34TRFIW.mjs} +1 -13
- package/dist/{chunk-UJ2TMPV4.mjs → chunk-QBIQEVTU.mjs} +0 -12
- package/dist/{chunk-YYOPBKME.mjs → chunk-QHRAWZGA.mjs} +3 -3
- package/dist/{chunk-A2WBKOXJ.mjs → chunk-SO2DE6MM.mjs} +2 -2
- package/dist/{chunk-EHU67PIM.mjs → chunk-TOCMU7UV.mjs} +7 -3
- package/dist/{chunk-YIOBBZUB.mjs → chunk-U7KANQ5A.mjs} +2 -2
- package/dist/{chunk-Z6BFNHEO.mjs → chunk-UCYUWNJL.mjs} +109 -62
- package/dist/{chunk-WYATCUOM.mjs → chunk-V2RGYIAG.mjs} +10 -10
- package/dist/{chunk-UWY5ZV66.mjs → chunk-VQ73B7ZZ.mjs} +1 -13
- package/dist/chunk-XD72PXRS.mjs +329 -0
- package/dist/{store-add-locales-VJ4RJ7UI.mjs → chunk-YFXI6CWD.mjs} +2 -67
- package/dist/{chunk-AWRCV3ME.mjs → chunk-YM4XGCHB.mjs} +1 -1
- package/dist/{chunk-ZMG5B4FG.mjs → chunk-ZGV5NOTE.mjs} +1 -1
- package/dist/{collection-add-products-FU2BS3D3.mjs → collection-add-products-YDMBU2JY.mjs} +13 -13
- package/dist/{collection-create-GWKWVT7B.mjs → collection-create-RXHEXU6T.mjs} +3 -3
- package/dist/{collection-detail-VJE7XHLV.mjs → collection-detail-75XPGVOX.mjs} +13 -13
- package/dist/{collection-edit-EZIO2BR5.mjs → collection-edit-CGF47VIN.mjs} +3 -3
- package/dist/{collection-list-IGA6SCNF.mjs → collection-list-75N5NYXQ.mjs} +18 -17
- package/dist/{collection-metadata-QK7MI3D2.mjs → collection-metadata-TGGC6HM2.mjs} +12 -12
- package/dist/{customer-detail-MOV2T3LF.mjs → customer-detail-KDLZ23B3.mjs} +17 -16
- package/dist/{customer-group-detail-6T7OXGQD.mjs → customer-group-detail-ZIAVMOYS.mjs} +12 -12
- package/dist/{customer-group-list-AJEAF5D2.mjs → customer-group-list-BDDC5VVZ.mjs} +15 -15
- package/dist/{customers-add-customer-group-QVTVSQYM.mjs → customers-add-customer-group-B3ASQGP6.mjs} +12 -12
- package/dist/{edit-inventory-item-H7DAZWIT.mjs → edit-inventory-item-OKAXQRJ5.mjs} +2 -2
- package/dist/{edit-inventory-item-attributes-7HTXXPGZ.mjs → edit-inventory-item-attributes-FVWDV6O5.mjs} +2 -2
- package/dist/{edit-reservation-OVTRZHJR.mjs → edit-reservation-3PU6YSNJ.mjs} +3 -3
- package/dist/{edit-rules-SMVRTCUP.mjs → edit-rules-LOJ3P4YB.mjs} +14 -14
- package/dist/en.json +73 -5
- package/dist/{inventory-create-ANYUM4P5.mjs → inventory-create-C2WWS7QR.mjs} +13 -13
- package/dist/{inventory-detail-ZPSEMYI2.mjs → inventory-detail-AKOZ4T3Z.mjs} +12 -12
- package/dist/{inventory-list-RXJPSVZE.mjs → inventory-list-DRFJIU2O.mjs} +2 -2
- package/dist/{inventory-metadata-FNEJ3RAT.mjs → inventory-metadata-N6CJZEWD.mjs} +12 -12
- package/dist/{inventory-stock-FD4ZM4BB.mjs → inventory-stock-IJ2N7LKC.mjs} +14 -14
- package/dist/{location-detail-N3GUZSY7.mjs → location-detail-PL4Y43RS.mjs} +16 -16
- package/dist/{location-fulfillment-providers-7ZUJAGNY.mjs → location-fulfillment-providers-2PLOVSXC.mjs} +17 -16
- package/dist/{location-sales-channels-P3QJTFDT.mjs → location-sales-channels-SZARSLWT.mjs} +5 -5
- package/dist/{location-service-zone-shipping-option-create-ZJ4GIBTJ.mjs → location-service-zone-shipping-option-create-CUNSAP24.mjs} +15 -15
- package/dist/{location-service-zone-shipping-option-edit-4CGPQ3VT.mjs → location-service-zone-shipping-option-edit-OJ462SVM.mjs} +1 -1
- package/dist/{location-service-zone-shipping-option-pricing-CR4BVYG3.mjs → location-service-zone-shipping-option-pricing-5HN2Z5RB.mjs} +2 -2
- package/dist/login-VBUNWZHI.mjs +301 -0
- package/dist/{manage-locations-7HH6R4UP.mjs → manage-locations-JPCSBA5D.mjs} +2 -2
- package/dist/{order-allocate-items-HZGGYJ42.mjs → order-allocate-items-6QHQASQJ.mjs} +4 -4
- package/dist/{order-create-claim-SCDJGM46.mjs → order-create-claim-ECVSH5GC.mjs} +22 -22
- package/dist/{order-create-edit-JIE3HDHP.mjs → order-create-edit-EVIOJIXE.mjs} +14 -13
- package/dist/{order-create-exchange-LQU4YN7F.mjs → order-create-exchange-ZVYYOGI3.mjs} +22 -22
- package/dist/{order-create-fulfillment-OWUVTZXW.mjs → order-create-fulfillment-FDIFEV6X.mjs} +16 -16
- package/dist/{order-create-refund-Q6HQY42R.mjs → order-create-refund-TNPGKR5P.mjs} +17 -17
- package/dist/{order-create-return-52GHGW5Z.mjs → order-create-return-NR6XQLDD.mjs} +9 -9
- package/dist/{order-create-shipment-WAGGEPRW.mjs → order-create-shipment-UP3WGRWB.mjs} +12 -12
- package/dist/{order-detail-PVPGEWGY.mjs → order-detail-F6D5DV74.mjs} +28 -28
- package/dist/{order-edit-billing-address-UM76J4KX.mjs → order-edit-billing-address-D4AJ6Z5Q.mjs} +44 -12
- package/dist/{order-edit-email-CL3KNOCM.mjs → order-edit-email-MXYA5BII.mjs} +12 -12
- package/dist/{order-edit-shipping-address-PIESTGVL.mjs → order-edit-shipping-address-GKW2ZPGR.mjs} +42 -12
- package/dist/{order-export-LE363ZLB.mjs → order-export-KQUI2TK7.mjs} +14 -14
- package/dist/{order-list-GRLQWN4L.mjs → order-list-7A5UKGXR.mjs} +11 -11
- package/dist/{order-metadata-FHBB7MTG.mjs → order-metadata-2IXELA7C.mjs} +12 -12
- package/dist/{order-receive-return-PRVKP6J2.mjs → order-receive-return-XXHOXGDC.mjs} +13 -13
- package/dist/{order-request-transfer-XSAGRUMT.mjs → order-request-transfer-2ENR64VR.mjs} +13 -13
- package/dist/{price-list-configuration-6S3MLNXQ.mjs → price-list-configuration-BZ3ZH5FY.mjs} +3 -3
- package/dist/{price-list-create-MFRUQADC.mjs → price-list-create-GFGNP6OS.mjs} +16 -16
- package/dist/{price-list-detail-Q5VG5VGW.mjs → price-list-detail-SNNOR5N7.mjs} +17 -17
- package/dist/{price-list-edit-53UW35L3.mjs → price-list-edit-YW5BXBF2.mjs} +3 -3
- package/dist/{price-list-list-DG5YEZ44.mjs → price-list-list-OF562HME.mjs} +4 -4
- package/dist/{price-list-prices-add-SDU5YZAT.mjs → price-list-prices-add-F7A2EV7L.mjs} +15 -15
- package/dist/{price-list-prices-edit-5USQR4D4.mjs → price-list-prices-edit-PQ26MOJE.mjs} +5 -5
- package/dist/{product-attributes-K4FGFORS.mjs → product-attributes-HO2B4OHP.mjs} +13 -13
- package/dist/{product-create-7YTRHZQQ.mjs → product-create-UEVW5JO4.mjs} +485 -561
- package/dist/{product-create-variant-ERKHTEJZ.mjs → product-create-variant-PLZ5Q2R6.mjs} +14 -14
- package/dist/{product-detail-32ZXNWOP.mjs → product-detail-Z7K5TGZY.mjs} +45 -66
- package/dist/{product-edit-FBAKONMR.mjs → product-edit-6I6JG4GP.mjs} +13 -13
- package/dist/{product-export-5AD7NELI.mjs → product-export-UMMROQ7T.mjs} +18 -17
- package/dist/{product-image-variants-edit-M6QF2RLE.mjs → product-image-variants-edit-VRG3AJID.mjs} +12 -12
- package/dist/{product-import-V3KQN4TV.mjs → product-import-EPS4KDID.mjs} +12 -12
- package/dist/{product-list-EUWZIFTM.mjs → product-list-37O7VB2L.mjs} +20 -20
- package/dist/{product-media-3VJ7KENL.mjs → product-media-IV5NUSLW.mjs} +3 -3
- package/dist/{product-metadata-GL2MVPDI.mjs → product-metadata-KTVRI7B3.mjs} +12 -12
- package/dist/product-option-create-C5BPN6P6.mjs +268 -0
- package/dist/product-option-detail-VVK3YBCE.mjs +331 -0
- package/dist/product-option-edit-7FQSKI2R.mjs +325 -0
- package/dist/product-option-list-YHGRI7OJ.mjs +268 -0
- package/dist/product-option-metadata-P2DHDGYR.mjs +73 -0
- package/dist/product-options-manage-B4N54NCR.mjs +358 -0
- package/dist/{product-organization-IUSVX22S.mjs → product-organization-L23V4JA7.mjs} +15 -15
- package/dist/{product-prices-4C36AG4R.mjs → product-prices-GUO3KM2U.mjs} +3 -3
- package/dist/{product-sales-channels-PPXUG4KT.mjs → product-sales-channels-BOZD3AC3.mjs} +5 -5
- package/dist/{product-shipping-profile-ETQFZ7DC.mjs → product-shipping-profile-FNFRDY47.mjs} +3 -3
- package/dist/{product-stock-VEGE6SUZ.mjs → product-stock-2DNYG73L.mjs} +14 -14
- package/dist/{product-tag-create-PQMDDKWH.mjs → product-tag-create-CW7GUCZW.mjs} +12 -12
- package/dist/{product-tag-detail-I3MBZX7U.mjs → product-tag-detail-IB5VIZ3K.mjs} +26 -25
- package/dist/{product-tag-edit-K3BBQLJR.mjs → product-tag-edit-ZSXD3DOC.mjs} +12 -12
- package/dist/{product-tag-list-JUWSOMB7.mjs → product-tag-list-MJO5PURP.mjs} +24 -23
- package/dist/{product-tag-metadata-MJH5LH7E.mjs → product-tag-metadata-DAKCXWZF.mjs} +12 -12
- package/dist/{product-type-create-DRFXTL5O.mjs → product-type-create-NRLNMABQ.mjs} +2 -2
- package/dist/{product-type-detail-RKHT5NBL.mjs → product-type-detail-J2IMAZW6.mjs} +14 -14
- package/dist/{product-type-edit-SRHCZDK7.mjs → product-type-edit-BHTPMMVI.mjs} +2 -2
- package/dist/{product-type-list-QQKAHBJ3.mjs → product-type-list-MQ2PW2IE.mjs} +3 -3
- package/dist/{product-type-metadata-CDJDFFGQ.mjs → product-type-metadata-BCZMUG3K.mjs} +12 -12
- package/dist/{product-variant-detail-XAYG5CKE.mjs → product-variant-detail-4L6DHT3K.mjs} +12 -12
- package/dist/{product-variant-edit-DEZEY2H2.mjs → product-variant-edit-PZU4P65H.mjs} +13 -13
- package/dist/{product-variant-manage-inventory-items-Y2VEOHP7.mjs → product-variant-manage-inventory-items-E3GPBPEZ.mjs} +3 -3
- package/dist/{product-variant-media-2WLVNGI4.mjs → product-variant-media-BSNCO642.mjs} +2 -2
- package/dist/{product-variant-metadata-VTZDNWUT.mjs → product-variant-metadata-FHGGZGPV.mjs} +12 -12
- package/dist/{promotion-add-campaign-DO67QK6M.mjs → promotion-add-campaign-NQSIFI33.mjs} +3 -3
- package/dist/{promotion-create-HWFNUQXG.mjs → promotion-create-GBZWJVAI.mjs} +24 -21
- package/dist/{promotion-detail-QC36KXB3.mjs → promotion-detail-W2OGUESO.mjs} +12 -12
- package/dist/{refund-reason-create-YHCDEHGQ.mjs → refund-reason-create-DLVRT5OU.mjs} +12 -12
- package/dist/{refund-reason-edit-CZ5QZ2SZ.mjs → refund-reason-edit-XCSU7RMH.mjs} +12 -12
- package/dist/{refund-reason-list-OJYYEYJE.mjs → refund-reason-list-G6UNVGPG.mjs} +18 -18
- package/dist/{region-create-NA7Y2LN4.mjs → region-create-2CRTF7HJ.mjs} +1 -1
- package/dist/{region-edit-WAU347DP.mjs → region-edit-IB3PJE7V.mjs} +1 -1
- package/dist/{region-metadata-H6XXUQ4S.mjs → region-metadata-WBEUKOI6.mjs} +12 -12
- package/dist/{reservation-create-ZCIYM6JI.mjs → reservation-create-ERFJUBME.mjs} +4 -4
- package/dist/{reservation-detail-LZAQL4XA.mjs → reservation-detail-Y6UZRZXY.mjs} +12 -12
- package/dist/{reservation-list-B47DXTA7.mjs → reservation-list-LEDZB7KL.mjs} +3 -3
- package/dist/{reservation-metadata-5HZSDDOK.mjs → reservation-metadata-7KH4EXMN.mjs} +12 -12
- package/dist/{return-reason-list-SCBGTOEI.mjs → return-reason-list-UUQAL464.mjs} +6 -6
- package/dist/{sales-channel-add-products-F7YV4MO5.mjs → sales-channel-add-products-GSPG7OTK.mjs} +14 -14
- package/dist/{sales-channel-create-MI7HHZYE.mjs → sales-channel-create-MM237EBQ.mjs} +3 -3
- package/dist/{sales-channel-detail-MXIPZCGA.mjs → sales-channel-detail-65ZFV2OI.mjs} +14 -14
- package/dist/{sales-channel-edit-VSHOIR37.mjs → sales-channel-edit-AC2J4N3M.mjs} +3 -3
- package/dist/{sales-channel-list-RLGL7FM3.mjs → sales-channel-list-LXLW7X3U.mjs} +14 -14
- package/dist/{sales-channel-metadata-M364R4RJ.mjs → sales-channel-metadata-QUAL2RH6.mjs} +13 -13
- package/dist/{shipping-option-type-create-C5WUWON7.mjs → shipping-option-type-create-EU75JC2Q.mjs} +12 -12
- package/dist/{shipping-option-type-detail-PENS2K73.mjs → shipping-option-type-detail-5GYEWATD.mjs} +13 -13
- package/dist/{shipping-option-type-edit-CIU5EHRP.mjs → shipping-option-type-edit-YR4JXT5M.mjs} +12 -12
- package/dist/{shipping-option-type-list-DIOX7VG7.mjs → shipping-option-type-list-BLC4Z5QW.mjs} +13 -13
- package/dist/{shipping-profile-metadata-75G2NNMA.mjs → shipping-profile-metadata-64YRWPDA.mjs} +12 -12
- package/dist/store-add-locales-TSMLNFZP.mjs +81 -0
- package/dist/{store-detail-JSNPOB2F.mjs → store-detail-3SS53LZR.mjs} +13 -13
- package/dist/{store-edit-5ZS562ZO.mjs → store-edit-SMEWFETF.mjs} +1 -1
- package/dist/{store-metadata-CYXTVJUE.mjs → store-metadata-IJGVDDA6.mjs} +12 -12
- package/dist/{tax-region-create-DWGL4EUT.mjs → tax-region-create-XLYIS5XX.mjs} +13 -13
- package/dist/{tax-region-detail-2AE2EFI3.mjs → tax-region-detail-66FKEGFB.mjs} +29 -28
- package/dist/{tax-region-edit-EEVEEU2Q.mjs → tax-region-edit-GBR4EDW7.mjs} +13 -13
- package/dist/{tax-region-province-detail-4ERSEQFF.mjs → tax-region-province-detail-OBA7Q7MQ.mjs} +29 -28
- package/dist/{tax-region-tax-override-create-PHCGEF7V.mjs → tax-region-tax-override-create-34WYD2QZ.mjs} +28 -27
- package/dist/{tax-region-tax-override-edit-SMRPSILC.mjs → tax-region-tax-override-edit-6WJVOGWA.mjs} +27 -26
- package/dist/translation-list-J65VNNAX.mjs +527 -0
- package/dist/{translations-edit-KECSHYZY.mjs → translations-edit-6P3KC4MO.mjs} +280 -304
- package/dist/{user-detail-BJUXLZZQ.mjs → user-detail-VMOJFHIJ.mjs} +2 -2
- package/dist/{user-metadata-2WPJOEJA.mjs → user-metadata-UOPVFX2L.mjs} +12 -12
- package/dist/{workflow-execution-detail-H2AKEZJX.mjs → workflow-execution-detail-WAQ7IG4T.mjs} +12 -12
- package/package.json +9 -9
- package/src/components/data-grid/components/data-grid-cell-container.tsx +7 -10
- package/src/components/data-grid/components/data-grid-multiline-cell.tsx +103 -0
- package/src/components/data-grid/components/data-grid-readonly-cell.tsx +1 -4
- package/src/components/data-grid/components/data-grid-root.tsx +68 -51
- package/src/components/data-grid/components/data-grid-text-cell.tsx +6 -76
- package/src/components/data-grid/components/index.ts +1 -0
- package/src/components/data-grid/data-grid.tsx +2 -0
- package/src/components/data-grid/hooks/use-data-grid-cell.tsx +12 -0
- package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +1 -0
- package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +65 -7
- package/src/components/data-grid/types.ts +1 -0
- package/src/components/inputs/combobox/combobox.tsx +185 -95
- package/src/components/layout/main-layout/main-layout.tsx +7 -4
- package/src/components/table/table-cells/order/country-cell/country-cell.tsx +5 -1
- package/src/dashboard-app/routes/get-route.map.tsx +68 -12
- package/src/hooks/api/cloud.tsx +41 -0
- package/src/hooks/api/index.ts +3 -1
- package/src/hooks/api/product-options.tsx +151 -0
- package/src/hooks/api/products.tsx +26 -66
- package/src/hooks/api/translations.tsx +103 -191
- package/src/hooks/table/columns/use-order-table-columns.tsx +5 -3
- package/src/hooks/table/columns/use-product-option-table-columns.tsx +44 -0
- package/src/hooks/table/filters/index.ts +1 -0
- package/src/hooks/table/filters/use-product-option-table-filters.tsx +33 -0
- package/src/hooks/table/query/use-product-option-table-query.tsx +34 -0
- package/src/i18n/translations/$schema.json +290 -32
- package/src/i18n/translations/en.json +73 -5
- package/src/i18n/translations/es.json +9 -1
- package/src/routes/customers/customer-detail/components/customer-order-section/customer-order-section.tsx +1 -1
- package/src/routes/login/components/cloud-auth-login.tsx +114 -0
- package/src/routes/login/login.tsx +9 -1
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx +1 -0
- package/src/routes/orders/order-edit-billing-address/components/edit-order-billing-address-form/edit-order-billing-address-form.tsx +34 -0
- package/src/routes/orders/order-edit-shipping-address/components/edit-order-shipping-address-form/edit-order-shipping-address-form.tsx +32 -0
- package/src/routes/product-options/common/hooks/use-delete-product-option-action.tsx +41 -0
- package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-details.tsx +71 -0
- package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-form.tsx +97 -0
- package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-organize.tsx +92 -0
- package/src/routes/product-options/product-option-create/components/create-product-option-form/index.ts +1 -0
- package/src/routes/product-options/product-option-create/components/create-product-option-form/schema.ts +15 -0
- package/src/routes/product-options/product-option-create/index.ts +1 -0
- package/src/routes/product-options/product-option-create/product-option-create.tsx +10 -0
- package/src/routes/product-options/product-option-detail/breadcrumb.tsx +14 -0
- package/src/routes/product-options/product-option-detail/components/product-option-general-section/index.ts +1 -0
- package/src/routes/product-options/product-option-detail/components/product-option-general-section/product-option-general-section.tsx +84 -0
- package/src/routes/product-options/product-option-detail/components/product-option-product-section/index.ts +1 -0
- package/src/routes/product-options/product-option-detail/components/product-option-product-section/product-option-product-section.tsx +82 -0
- package/src/routes/product-options/product-option-detail/index.ts +3 -0
- package/src/routes/product-options/product-option-detail/loader.ts +18 -0
- package/src/routes/product-options/product-option-detail/product-option-detail.tsx +50 -0
- package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-details.tsx +94 -0
- package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-form.tsx +116 -0
- package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-organize.tsx +77 -0
- package/src/routes/product-options/product-option-edit/components/edit-product-option-form/index.ts +1 -0
- package/src/routes/product-options/product-option-edit/components/edit-product-option-form/schema.ts +13 -0
- package/src/routes/product-options/product-option-edit/index.ts +1 -0
- package/src/routes/product-options/product-option-edit/product-option-edit.tsx +34 -0
- package/src/routes/product-options/product-option-list/components/product-option-list-table/index.ts +1 -0
- package/src/routes/product-options/product-option-list/components/product-option-list-table/product-option-list-table.tsx +140 -0
- package/src/routes/product-options/product-option-list/index.ts +1 -0
- package/src/routes/product-options/product-option-list/product-option-list.tsx +19 -0
- package/src/routes/product-options/product-option-metadata/index.ts +1 -0
- package/src/routes/product-options/product-option-metadata/product-option-metadata.tsx +27 -0
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +16 -4
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +327 -194
- package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +4 -7
- package/src/routes/products/product-create/constants.ts +2 -0
- package/src/routes/products/product-create/utils.ts +6 -1
- package/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx +33 -51
- package/src/routes/products/product-options-manage/components/product-options-manage-form/index.ts +1 -0
- package/src/routes/products/product-options-manage/components/product-options-manage-form/product-options-manage-form.tsx +328 -0
- package/src/routes/products/product-options-manage/index.ts +1 -0
- package/src/routes/products/product-options-manage/product-options-manage.tsx +35 -0
- package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +6 -0
- package/src/routes/translations/add-locales/add-locales.tsx +29 -0
- package/src/routes/translations/add-locales/index.tsx +1 -0
- package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +42 -17
- package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +5 -1
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +182 -121
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +330 -361
- package/src/routes/translations/translations-edit/translations-edit.tsx +8 -13
- package/dist/chunk-HGRIOEAR.mjs +0 -32
- package/dist/chunk-XDJ7OMBR.mjs +0 -160
- package/dist/login-VNOLI5YG.mjs +0 -201
- package/dist/product-create-option-7AOXAA4S.mjs +0 -151
- package/dist/product-edit-option-LWJT3CYJ.mjs +0 -156
- package/dist/translation-list-UF7FLXOW.mjs +0 -441
- package/src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx +0 -122
- package/src/routes/products/product-create-option/components/create-product-option-form/index.ts +0 -1
- package/src/routes/products/product-create-option/index.ts +0 -1
- package/src/routes/products/product-create-option/product-create-option.tsx +0 -30
- package/src/routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx +0 -123
- package/src/routes/products/product-edit-option/components/edit-product-option-form/index.ts +0 -1
- package/src/routes/products/product-edit-option/index.ts +0 -1
- package/src/routes/products/product-edit-option/product-edit-option.tsx +0 -35
- package/dist/{chunk-FBYTX6K7.mjs → chunk-ORWRXJJT.mjs} +4 -4
- package/dist/{location-list-KVBA6J47.mjs → location-list-3WP65J3E.mjs} +1 -1
- package/dist/{user-list-YTZQNYSO.mjs → user-list-3EAKK4XC.mjs} +3 -3
|
@@ -9,37 +9,37 @@ import "./chunk-LPEUYMRK.mjs";
|
|
|
9
9
|
import "./chunk-OC7BQLYI.mjs";
|
|
10
10
|
import "./chunk-S4DMV3ZT.mjs";
|
|
11
11
|
import "./chunk-OBQI23QM.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-74WPAWMW.mjs";
|
|
13
13
|
import "./chunk-I4OBEAOJ.mjs";
|
|
14
14
|
import "./chunk-HI6URQ7H.mjs";
|
|
15
15
|
import "./chunk-6CLQKVAU.mjs";
|
|
16
|
+
import "./chunk-ML7BA2NY.mjs";
|
|
16
17
|
import "./chunk-KI7TOXBR.mjs";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-23GTCEOV.mjs";
|
|
18
|
+
import "./chunk-QBIQEVTU.mjs";
|
|
19
19
|
import "./chunk-WAXMT4IY.mjs";
|
|
20
20
|
import "./chunk-DYDGGABK.mjs";
|
|
21
|
-
import "./chunk-LGNTHZ5Y.mjs";
|
|
22
21
|
import "./chunk-CN7JXSGW.mjs";
|
|
22
|
+
import "./chunk-LGNTHZ5Y.mjs";
|
|
23
23
|
import "./chunk-5BQQRHQS.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-G35UUG2P.mjs";
|
|
25
25
|
import "./chunk-5AFMB7XQ.mjs";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-VQ73B7ZZ.mjs";
|
|
27
27
|
import "./chunk-A63RZVX6.mjs";
|
|
28
28
|
import "./chunk-HBXV7ENS.mjs";
|
|
29
29
|
import "./chunk-CDORR33H.mjs";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-2XTBDCGE.mjs";
|
|
30
|
+
import "./chunk-333HK6Y6.mjs";
|
|
31
|
+
import "./chunk-GJN5SXGZ.mjs";
|
|
32
|
+
import "./chunk-Q34TRFIW.mjs";
|
|
34
33
|
import "./chunk-3BF5SC66.mjs";
|
|
34
|
+
import "./chunk-DWH2OQFK.mjs";
|
|
35
35
|
import "./chunk-VCSSQVPD.mjs";
|
|
36
36
|
import "./chunk-HP2JH45P.mjs";
|
|
37
37
|
import "./chunk-SQDIZZDW.mjs";
|
|
38
38
|
import {
|
|
39
39
|
useProduct,
|
|
40
40
|
useUpdateProduct
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-UCYUWNJL.mjs";
|
|
42
|
+
import "./chunk-7AXHHXCX.mjs";
|
|
43
43
|
import "./chunk-FXYH54JP.mjs";
|
|
44
44
|
import "./chunk-774WSTCC.mjs";
|
|
45
45
|
import "./chunk-NFEK63OE.mjs";
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChipInput,
|
|
3
|
+
SortableList
|
|
4
|
+
} from "./chunk-XD72PXRS.mjs";
|
|
5
|
+
import "./chunk-IUCDCPJU.mjs";
|
|
6
|
+
import {
|
|
7
|
+
KeyboundForm
|
|
8
|
+
} from "./chunk-6HTZNHPT.mjs";
|
|
9
|
+
import "./chunk-WVA4O7QS.mjs";
|
|
10
|
+
import {
|
|
11
|
+
RouteFocusModal,
|
|
12
|
+
useRouteModal
|
|
13
|
+
} from "./chunk-D6UW7URG.mjs";
|
|
14
|
+
import {
|
|
15
|
+
Form
|
|
16
|
+
} from "./chunk-OBQI23QM.mjs";
|
|
17
|
+
import "./chunk-74WPAWMW.mjs";
|
|
18
|
+
import "./chunk-I4OBEAOJ.mjs";
|
|
19
|
+
import "./chunk-HI6URQ7H.mjs";
|
|
20
|
+
import "./chunk-6CLQKVAU.mjs";
|
|
21
|
+
import "./chunk-ML7BA2NY.mjs";
|
|
22
|
+
import "./chunk-KI7TOXBR.mjs";
|
|
23
|
+
import "./chunk-QBIQEVTU.mjs";
|
|
24
|
+
import "./chunk-WAXMT4IY.mjs";
|
|
25
|
+
import "./chunk-DYDGGABK.mjs";
|
|
26
|
+
import "./chunk-CN7JXSGW.mjs";
|
|
27
|
+
import "./chunk-LGNTHZ5Y.mjs";
|
|
28
|
+
import "./chunk-5BQQRHQS.mjs";
|
|
29
|
+
import "./chunk-G35UUG2P.mjs";
|
|
30
|
+
import "./chunk-5AFMB7XQ.mjs";
|
|
31
|
+
import "./chunk-VQ73B7ZZ.mjs";
|
|
32
|
+
import "./chunk-A63RZVX6.mjs";
|
|
33
|
+
import "./chunk-HBXV7ENS.mjs";
|
|
34
|
+
import "./chunk-CDORR33H.mjs";
|
|
35
|
+
import "./chunk-333HK6Y6.mjs";
|
|
36
|
+
import "./chunk-GJN5SXGZ.mjs";
|
|
37
|
+
import "./chunk-Q34TRFIW.mjs";
|
|
38
|
+
import "./chunk-3BF5SC66.mjs";
|
|
39
|
+
import "./chunk-DWH2OQFK.mjs";
|
|
40
|
+
import "./chunk-VCSSQVPD.mjs";
|
|
41
|
+
import "./chunk-HP2JH45P.mjs";
|
|
42
|
+
import "./chunk-SQDIZZDW.mjs";
|
|
43
|
+
import {
|
|
44
|
+
useCreateProductOption
|
|
45
|
+
} from "./chunk-UCYUWNJL.mjs";
|
|
46
|
+
import "./chunk-7AXHHXCX.mjs";
|
|
47
|
+
import "./chunk-FXYH54JP.mjs";
|
|
48
|
+
import "./chunk-774WSTCC.mjs";
|
|
49
|
+
import "./chunk-NFEK63OE.mjs";
|
|
50
|
+
import "./chunk-QZ7TP4HQ.mjs";
|
|
51
|
+
|
|
52
|
+
// src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-form.tsx
|
|
53
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
54
|
+
import { Button, toast } from "@medusajs/ui";
|
|
55
|
+
import { useForm } from "react-hook-form";
|
|
56
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
57
|
+
|
|
58
|
+
// src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-details.tsx
|
|
59
|
+
import { Heading, Input, Text } from "@medusajs/ui";
|
|
60
|
+
import { useTranslation } from "react-i18next";
|
|
61
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
62
|
+
var CreateProductOptionDetails = ({
|
|
63
|
+
form
|
|
64
|
+
}) => {
|
|
65
|
+
const { t } = useTranslation();
|
|
66
|
+
return /* @__PURE__ */ jsx("div", { className: "mt-16 flex flex-col items-center px-16", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Heading, { children: t("productOptions.create.header") }),
|
|
69
|
+
/* @__PURE__ */ jsx(Text, { size: "small", className: "text-ui-fg-subtle", children: t("productOptions.create.hint") })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
Form.Field,
|
|
73
|
+
{
|
|
74
|
+
control: form.control,
|
|
75
|
+
name: "title",
|
|
76
|
+
render: ({ field }) => {
|
|
77
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("productOptions.fields.title.label") }),
|
|
79
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
80
|
+
Input,
|
|
81
|
+
{
|
|
82
|
+
autoComplete: "off",
|
|
83
|
+
...field,
|
|
84
|
+
placeholder: t("productOptions.fields.title.placeholder")
|
|
85
|
+
}
|
|
86
|
+
) }),
|
|
87
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
88
|
+
] });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
Form.Field,
|
|
94
|
+
{
|
|
95
|
+
control: form.control,
|
|
96
|
+
name: "values",
|
|
97
|
+
render: ({ field }) => {
|
|
98
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
99
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("productOptions.fields.values.label") }),
|
|
100
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
101
|
+
ChipInput,
|
|
102
|
+
{
|
|
103
|
+
...field,
|
|
104
|
+
placeholder: t("productOptions.fields.values.placeholder")
|
|
105
|
+
}
|
|
106
|
+
) }),
|
|
107
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
108
|
+
] });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }) });
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-organize.tsx
|
|
116
|
+
import { useMemo } from "react";
|
|
117
|
+
import { useWatch } from "react-hook-form";
|
|
118
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
119
|
+
import { Text as Text2 } from "@medusajs/ui";
|
|
120
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
121
|
+
var CreateProductOptionOrganize = ({
|
|
122
|
+
form
|
|
123
|
+
}) => {
|
|
124
|
+
const { t } = useTranslation2();
|
|
125
|
+
const values = useWatch({
|
|
126
|
+
control: form.control,
|
|
127
|
+
name: "values"
|
|
128
|
+
});
|
|
129
|
+
const valueRanks = useWatch({
|
|
130
|
+
control: form.control,
|
|
131
|
+
name: "value_ranks"
|
|
132
|
+
});
|
|
133
|
+
const items = useMemo(() => {
|
|
134
|
+
if (!values || values.length === 0) {
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
return values.map((value, index) => ({
|
|
138
|
+
id: value,
|
|
139
|
+
value,
|
|
140
|
+
rank: valueRanks?.[value] ?? index
|
|
141
|
+
})).sort((a, b) => a.rank - b.rank);
|
|
142
|
+
}, [values, valueRanks]);
|
|
143
|
+
const handleChange = (newItems) => {
|
|
144
|
+
const newRanks = {};
|
|
145
|
+
newItems.forEach((item, index) => {
|
|
146
|
+
newRanks[item.value] = index;
|
|
147
|
+
});
|
|
148
|
+
form.setValue("value_ranks", newRanks, {
|
|
149
|
+
shouldDirty: true,
|
|
150
|
+
shouldTouch: true
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
if (!values || values.length === 0) {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
return /* @__PURE__ */ jsx2("div", { className: "px-16", children: /* @__PURE__ */ jsx2("div", { className: "mx-auto flex w-full max-w-[720px] flex-col gap-y-8 ", children: /* @__PURE__ */ jsxs2("div", { className: "border-ui-border-base flex flex-col gap-y-2 rounded-xl border", children: [
|
|
157
|
+
/* @__PURE__ */ jsx2("div", { className: "border-b-base bg-ui-bg-component border-b p-2", children: /* @__PURE__ */ jsx2(Text2, { size: "small", leading: "compact", weight: "plus", children: t("productOptions.create.tabs.organize") }) }),
|
|
158
|
+
/* @__PURE__ */ jsx2(
|
|
159
|
+
SortableList,
|
|
160
|
+
{
|
|
161
|
+
items,
|
|
162
|
+
onChange: handleChange,
|
|
163
|
+
renderItem: (item) => /* @__PURE__ */ jsx2(
|
|
164
|
+
SortableList.Item,
|
|
165
|
+
{
|
|
166
|
+
id: item.id,
|
|
167
|
+
className: "border-ui-border-base border-b last:border-b-0",
|
|
168
|
+
children: /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 items-center gap-x-3 px-4 py-3", children: [
|
|
169
|
+
/* @__PURE__ */ jsx2(SortableList.DragHandle, {}),
|
|
170
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", children: item.value })
|
|
171
|
+
] })
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
" "
|
|
177
|
+
] }) }) });
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// src/routes/product-options/product-option-create/components/create-product-option-form/schema.ts
|
|
181
|
+
import { z } from "zod";
|
|
182
|
+
var CreateProductOptionDetailsSchema = z.object({
|
|
183
|
+
title: z.string().min(1),
|
|
184
|
+
values: z.array(z.string()).min(1, "At least one value is required")
|
|
185
|
+
});
|
|
186
|
+
var CreateProductOptionSchema = z.object({
|
|
187
|
+
value_ranks: z.record(z.string(), z.number()).optional()
|
|
188
|
+
}).merge(CreateProductOptionDetailsSchema);
|
|
189
|
+
|
|
190
|
+
// src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-form.tsx
|
|
191
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
192
|
+
var CreateProductOptionForm = () => {
|
|
193
|
+
const { t } = useTranslation3();
|
|
194
|
+
const { handleSuccess } = useRouteModal();
|
|
195
|
+
const form = useForm({
|
|
196
|
+
defaultValues: {
|
|
197
|
+
title: "",
|
|
198
|
+
values: [],
|
|
199
|
+
value_ranks: {}
|
|
200
|
+
},
|
|
201
|
+
resolver: zodResolver(CreateProductOptionSchema)
|
|
202
|
+
});
|
|
203
|
+
const hasValues = (form.watch("values")?.length ?? 0) > 0;
|
|
204
|
+
const { mutateAsync, isPending } = useCreateProductOption();
|
|
205
|
+
const handleSubmit = form.handleSubmit((data) => {
|
|
206
|
+
const { title, values, value_ranks } = data;
|
|
207
|
+
const ranks = value_ranks ?? {};
|
|
208
|
+
if (!Object.keys(ranks).length) {
|
|
209
|
+
values.forEach((value, index) => ranks[value] = index + 1);
|
|
210
|
+
}
|
|
211
|
+
mutateAsync(
|
|
212
|
+
{
|
|
213
|
+
title,
|
|
214
|
+
values,
|
|
215
|
+
ranks
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
onSuccess: ({ product_option }) => {
|
|
219
|
+
toast.success(
|
|
220
|
+
t("productOptions.create.successToast", {
|
|
221
|
+
title: product_option.title
|
|
222
|
+
})
|
|
223
|
+
);
|
|
224
|
+
handleSuccess(`/product-options/${product_option.id}`);
|
|
225
|
+
},
|
|
226
|
+
onError: (error) => {
|
|
227
|
+
toast.error(error.message);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
});
|
|
232
|
+
return /* @__PURE__ */ jsx3(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs3(
|
|
233
|
+
KeyboundForm,
|
|
234
|
+
{
|
|
235
|
+
onSubmit: handleSubmit,
|
|
236
|
+
className: "flex size-full flex-col overflow-hidden",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ jsx3(RouteFocusModal.Header, {}),
|
|
239
|
+
/* @__PURE__ */ jsxs3(RouteFocusModal.Body, { className: "flex size-full flex-col gap-y-16 overflow-auto", children: [
|
|
240
|
+
/* @__PURE__ */ jsx3(CreateProductOptionDetails, { form }),
|
|
241
|
+
hasValues && /* @__PURE__ */ jsx3(CreateProductOptionOrganize, { form })
|
|
242
|
+
] }),
|
|
243
|
+
/* @__PURE__ */ jsx3(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
244
|
+
/* @__PURE__ */ jsx3(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx3(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
|
|
245
|
+
/* @__PURE__ */ jsx3(
|
|
246
|
+
Button,
|
|
247
|
+
{
|
|
248
|
+
size: "small",
|
|
249
|
+
variant: "primary",
|
|
250
|
+
type: "submit",
|
|
251
|
+
isLoading: isPending,
|
|
252
|
+
children: t("actions.save")
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
] }) })
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
) });
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// src/routes/product-options/product-option-create/product-option-create.tsx
|
|
262
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
263
|
+
var ProductOptionCreate = () => {
|
|
264
|
+
return /* @__PURE__ */ jsx4(RouteFocusModal, { children: /* @__PURE__ */ jsx4(CreateProductOptionForm, {}) });
|
|
265
|
+
};
|
|
266
|
+
export {
|
|
267
|
+
ProductOptionCreate as Component
|
|
268
|
+
};
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import "./chunk-PA3T6IWL.mjs";
|
|
2
|
+
import "./chunk-QOCJPBRB.mjs";
|
|
3
|
+
import "./chunk-QMRGIWOP.mjs";
|
|
4
|
+
import "./chunk-I3VB6NM2.mjs";
|
|
5
|
+
import "./chunk-ZJRFL6ZN.mjs";
|
|
6
|
+
import "./chunk-YFIYCS7F.mjs";
|
|
7
|
+
import "./chunk-XWO5BP42.mjs";
|
|
8
|
+
import "./chunk-O7JNIATG.mjs";
|
|
9
|
+
import "./chunk-TOCMU7UV.mjs";
|
|
10
|
+
import "./chunk-IR5DHEKS.mjs";
|
|
11
|
+
import "./chunk-MSDRGCRR.mjs";
|
|
12
|
+
import {
|
|
13
|
+
useProductTableColumns
|
|
14
|
+
} from "./chunk-BW322BVH.mjs";
|
|
15
|
+
import "./chunk-WG7UTTKY.mjs";
|
|
16
|
+
import "./chunk-VT2JJ5C2.mjs";
|
|
17
|
+
import "./chunk-INE2QCSC.mjs";
|
|
18
|
+
import "./chunk-XLDQPLK4.mjs";
|
|
19
|
+
import "./chunk-IQBAUTU5.mjs";
|
|
20
|
+
import "./chunk-NTEWUH4C.mjs";
|
|
21
|
+
import "./chunk-ADOCJB6L.mjs";
|
|
22
|
+
import "./chunk-X6BAAGCL.mjs";
|
|
23
|
+
import "./chunk-P3UUX2T6.mjs";
|
|
24
|
+
import "./chunk-DK4WIVY6.mjs";
|
|
25
|
+
import "./chunk-MFALVTRQ.mjs";
|
|
26
|
+
import "./chunk-RIV7FKGN.mjs";
|
|
27
|
+
import "./chunk-TDK3JDOB.mjs";
|
|
28
|
+
import "./chunk-FHSC5X62.mjs";
|
|
29
|
+
import "./chunk-XR4GEMGR.mjs";
|
|
30
|
+
import "./chunk-MOSRJHJ3.mjs";
|
|
31
|
+
import "./chunk-WRSGHGAT.mjs";
|
|
32
|
+
import "./chunk-OMC5JCQH.mjs";
|
|
33
|
+
import "./chunk-IW4TACOD.mjs";
|
|
34
|
+
import {
|
|
35
|
+
useProductTableQuery
|
|
36
|
+
} from "./chunk-R65S6ZZV.mjs";
|
|
37
|
+
import {
|
|
38
|
+
SingleColumnPage
|
|
39
|
+
} from "./chunk-GIZFNLKK.mjs";
|
|
40
|
+
import {
|
|
41
|
+
DataTable
|
|
42
|
+
} from "./chunk-KCWP7RF5.mjs";
|
|
43
|
+
import "./chunk-C76H5USB.mjs";
|
|
44
|
+
import "./chunk-DFFLVEZ5.mjs";
|
|
45
|
+
import "./chunk-MNXC6Q4F.mjs";
|
|
46
|
+
import "./chunk-DG7J63J2.mjs";
|
|
47
|
+
import "./chunk-G4BWCU5P.mjs";
|
|
48
|
+
import {
|
|
49
|
+
useExtension
|
|
50
|
+
} from "./chunk-C5P5PL3E.mjs";
|
|
51
|
+
import {
|
|
52
|
+
SingleColumnPageSkeleton
|
|
53
|
+
} from "./chunk-LPEUYMRK.mjs";
|
|
54
|
+
import {
|
|
55
|
+
ActionMenu
|
|
56
|
+
} from "./chunk-OZPB6JBL.mjs";
|
|
57
|
+
import "./chunk-OC7BQLYI.mjs";
|
|
58
|
+
import "./chunk-S4DMV3ZT.mjs";
|
|
59
|
+
import "./chunk-535OVBXR.mjs";
|
|
60
|
+
import "./chunk-74WPAWMW.mjs";
|
|
61
|
+
import "./chunk-I4OBEAOJ.mjs";
|
|
62
|
+
import "./chunk-HI6URQ7H.mjs";
|
|
63
|
+
import "./chunk-6CLQKVAU.mjs";
|
|
64
|
+
import "./chunk-ML7BA2NY.mjs";
|
|
65
|
+
import "./chunk-KI7TOXBR.mjs";
|
|
66
|
+
import "./chunk-QBIQEVTU.mjs";
|
|
67
|
+
import "./chunk-WAXMT4IY.mjs";
|
|
68
|
+
import "./chunk-DYDGGABK.mjs";
|
|
69
|
+
import "./chunk-CN7JXSGW.mjs";
|
|
70
|
+
import "./chunk-LGNTHZ5Y.mjs";
|
|
71
|
+
import "./chunk-5BQQRHQS.mjs";
|
|
72
|
+
import "./chunk-G35UUG2P.mjs";
|
|
73
|
+
import "./chunk-5AFMB7XQ.mjs";
|
|
74
|
+
import "./chunk-VQ73B7ZZ.mjs";
|
|
75
|
+
import "./chunk-A63RZVX6.mjs";
|
|
76
|
+
import "./chunk-HBXV7ENS.mjs";
|
|
77
|
+
import "./chunk-CDORR33H.mjs";
|
|
78
|
+
import "./chunk-333HK6Y6.mjs";
|
|
79
|
+
import "./chunk-GJN5SXGZ.mjs";
|
|
80
|
+
import "./chunk-Q34TRFIW.mjs";
|
|
81
|
+
import "./chunk-3BF5SC66.mjs";
|
|
82
|
+
import "./chunk-DWH2OQFK.mjs";
|
|
83
|
+
import "./chunk-VCSSQVPD.mjs";
|
|
84
|
+
import "./chunk-HP2JH45P.mjs";
|
|
85
|
+
import "./chunk-SQDIZZDW.mjs";
|
|
86
|
+
import {
|
|
87
|
+
productOptionsQueryKeys,
|
|
88
|
+
useDeleteProductOption,
|
|
89
|
+
useProductOption,
|
|
90
|
+
useProducts
|
|
91
|
+
} from "./chunk-UCYUWNJL.mjs";
|
|
92
|
+
import "./chunk-7AXHHXCX.mjs";
|
|
93
|
+
import {
|
|
94
|
+
queryClient
|
|
95
|
+
} from "./chunk-FXYH54JP.mjs";
|
|
96
|
+
import "./chunk-774WSTCC.mjs";
|
|
97
|
+
import {
|
|
98
|
+
sdk
|
|
99
|
+
} from "./chunk-NFEK63OE.mjs";
|
|
100
|
+
import "./chunk-QZ7TP4HQ.mjs";
|
|
101
|
+
|
|
102
|
+
// src/routes/product-options/product-option-detail/breadcrumb.tsx
|
|
103
|
+
import { jsx } from "react/jsx-runtime";
|
|
104
|
+
var ProductOptionBreadcrumb = (match) => {
|
|
105
|
+
const productOption = match.data.product_option;
|
|
106
|
+
if (!productOption) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
return /* @__PURE__ */ jsx("span", { children: productOption.title });
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// src/routes/product-options/product-option-detail/product-option-detail.tsx
|
|
113
|
+
import { useLoaderData, useParams } from "react-router-dom";
|
|
114
|
+
|
|
115
|
+
// src/routes/product-options/product-option-detail/components/product-option-general-section/product-option-general-section.tsx
|
|
116
|
+
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
117
|
+
import { Badge, Container, Heading } from "@medusajs/ui";
|
|
118
|
+
import { useMemo } from "react";
|
|
119
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
120
|
+
|
|
121
|
+
// src/routes/product-options/common/hooks/use-delete-product-option-action.tsx
|
|
122
|
+
import { useNavigate } from "react-router-dom";
|
|
123
|
+
import { toast, usePrompt } from "@medusajs/ui";
|
|
124
|
+
import { useTranslation } from "react-i18next";
|
|
125
|
+
var useDeleteProductOptionAction = ({
|
|
126
|
+
id,
|
|
127
|
+
title
|
|
128
|
+
}) => {
|
|
129
|
+
const { t } = useTranslation();
|
|
130
|
+
const prompt = usePrompt();
|
|
131
|
+
const navigate = useNavigate();
|
|
132
|
+
const { mutateAsync } = useDeleteProductOption(id);
|
|
133
|
+
return async () => {
|
|
134
|
+
const result = await prompt({
|
|
135
|
+
title: t("general.areYouSure"),
|
|
136
|
+
description: t("productOptions.delete.confirmation", { title }),
|
|
137
|
+
confirmText: t("actions.delete"),
|
|
138
|
+
cancelText: t("actions.cancel")
|
|
139
|
+
});
|
|
140
|
+
if (!result) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
await mutateAsync(void 0, {
|
|
144
|
+
onSuccess: () => {
|
|
145
|
+
navigate("/product-options", {
|
|
146
|
+
replace: true
|
|
147
|
+
});
|
|
148
|
+
toast.success(t("productOptions.delete.successToast", { title }));
|
|
149
|
+
},
|
|
150
|
+
onError: (e) => {
|
|
151
|
+
toast.error(e.message);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// src/routes/product-options/product-option-detail/components/product-option-general-section/product-option-general-section.tsx
|
|
158
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
159
|
+
var ProductOptionGeneralSection = ({
|
|
160
|
+
productOption
|
|
161
|
+
}) => {
|
|
162
|
+
const { t } = useTranslation2();
|
|
163
|
+
const handleDelete = useDeleteProductOptionAction(productOption);
|
|
164
|
+
const sortedValues = useMemo(() => {
|
|
165
|
+
if (!productOption.values) {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
return [...productOption.values].sort((a, b) => {
|
|
169
|
+
const rankA = a.rank ?? Number.MAX_VALUE;
|
|
170
|
+
const rankB = b.rank ?? Number.MAX_VALUE;
|
|
171
|
+
return rankA - rankB;
|
|
172
|
+
});
|
|
173
|
+
}, [productOption.values]);
|
|
174
|
+
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
175
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
176
|
+
/* @__PURE__ */ jsx2(Heading, { children: productOption.title }),
|
|
177
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
178
|
+
/* @__PURE__ */ jsx2(
|
|
179
|
+
Badge,
|
|
180
|
+
{
|
|
181
|
+
size: "xsmall",
|
|
182
|
+
color: productOption.is_exclusive ? "grey" : "blue",
|
|
183
|
+
children: t(
|
|
184
|
+
`general.${productOption.is_exclusive ? "exclusive" : "global"}`
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ jsx2(
|
|
189
|
+
ActionMenu,
|
|
190
|
+
{
|
|
191
|
+
groups: [
|
|
192
|
+
{
|
|
193
|
+
actions: [
|
|
194
|
+
{
|
|
195
|
+
label: t("actions.edit"),
|
|
196
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
|
|
197
|
+
to: "edit"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
actions: [
|
|
203
|
+
{
|
|
204
|
+
label: t("actions.delete"),
|
|
205
|
+
icon: /* @__PURE__ */ jsx2(Trash, {}),
|
|
206
|
+
onClick: handleDelete
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
] })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ jsx2("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsx2(ValuesDisplay, { values: sortedValues }) })
|
|
216
|
+
] });
|
|
217
|
+
};
|
|
218
|
+
var ValuesDisplay = ({ values }) => {
|
|
219
|
+
return /* @__PURE__ */ jsx2("div", { className: "flex flex-wrap items-center gap-2", children: values.map((value) => /* @__PURE__ */ jsx2(Badge, { size: "xsmall", children: value.value }, value.id)) });
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// src/routes/product-options/product-option-detail/components/product-option-product-section/product-option-product-section.tsx
|
|
223
|
+
import { Container as Container2 } from "@medusajs/ui";
|
|
224
|
+
import { keepPreviousData } from "@tanstack/react-query";
|
|
225
|
+
import { useMemo as useMemo2 } from "react";
|
|
226
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
227
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
228
|
+
var PAGE_SIZE = 10;
|
|
229
|
+
var ProductOptionProductSection = ({
|
|
230
|
+
productOptionId
|
|
231
|
+
}) => {
|
|
232
|
+
const { t } = useTranslation3();
|
|
233
|
+
const { searchParams } = useProductTableQuery({ pageSize: PAGE_SIZE });
|
|
234
|
+
const { products, count, isLoading, isError, error } = useProducts(
|
|
235
|
+
{
|
|
236
|
+
limit: PAGE_SIZE,
|
|
237
|
+
...searchParams,
|
|
238
|
+
fields: "id,title,handle,thumbnail,status,*collection,*sales_channels,*product_options,variants.id",
|
|
239
|
+
option_id: productOptionId
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
placeholderData: keepPreviousData,
|
|
243
|
+
enabled: !!productOptionId
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
const columns = useColumns();
|
|
247
|
+
if (isError) {
|
|
248
|
+
throw error;
|
|
249
|
+
}
|
|
250
|
+
return /* @__PURE__ */ jsx3(Container2, { className: "divide-y p-0", children: /* @__PURE__ */ jsx3(
|
|
251
|
+
DataTable,
|
|
252
|
+
{
|
|
253
|
+
data: products,
|
|
254
|
+
columns,
|
|
255
|
+
rowCount: count,
|
|
256
|
+
pageSize: PAGE_SIZE,
|
|
257
|
+
getRowId: (row) => row.id,
|
|
258
|
+
heading: t("products.domain"),
|
|
259
|
+
emptyState: {
|
|
260
|
+
empty: {
|
|
261
|
+
heading: /* @__PURE__ */ jsx3("span", { className: "text-ui-fg-subtle", children: t("general.noRecordsMessage") }),
|
|
262
|
+
description: /* @__PURE__ */ jsx3("span", { className: "text-ui-fg-muted", children: t("productOptions.products.list.noRecords") })
|
|
263
|
+
},
|
|
264
|
+
filtered: {
|
|
265
|
+
heading: t("general.noRecordsMessage"),
|
|
266
|
+
description: t("general.noRecordsMessageFiltered")
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
isLoading,
|
|
270
|
+
enableSearch: true,
|
|
271
|
+
rowHref: (row) => `/products/${row.id}`
|
|
272
|
+
}
|
|
273
|
+
) });
|
|
274
|
+
};
|
|
275
|
+
var useColumns = () => {
|
|
276
|
+
const columns = useProductTableColumns();
|
|
277
|
+
return useMemo2(() => [...columns], [columns]);
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
// src/routes/product-options/product-option-detail/product-option-detail.tsx
|
|
281
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
282
|
+
var ProductOptionDetail = () => {
|
|
283
|
+
const { id } = useParams();
|
|
284
|
+
const initialData = useLoaderData();
|
|
285
|
+
const { getWidgets } = useExtension();
|
|
286
|
+
const { product_option, isLoading, isError, error } = useProductOption(
|
|
287
|
+
id,
|
|
288
|
+
{ fields: "-products" },
|
|
289
|
+
{
|
|
290
|
+
initialData
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
if (isLoading || !product_option) {
|
|
294
|
+
return /* @__PURE__ */ jsx4(SingleColumnPageSkeleton, { sections: 2, showJSON: true, showMetadata: true });
|
|
295
|
+
}
|
|
296
|
+
if (isError) {
|
|
297
|
+
throw error;
|
|
298
|
+
}
|
|
299
|
+
return /* @__PURE__ */ jsxs2(
|
|
300
|
+
SingleColumnPage,
|
|
301
|
+
{
|
|
302
|
+
widgets: {
|
|
303
|
+
after: getWidgets("product_option.details.after"),
|
|
304
|
+
before: getWidgets("product_option.details.before")
|
|
305
|
+
},
|
|
306
|
+
showJSON: true,
|
|
307
|
+
showMetadata: true,
|
|
308
|
+
data: product_option,
|
|
309
|
+
children: [
|
|
310
|
+
/* @__PURE__ */ jsx4(ProductOptionGeneralSection, { productOption: product_option }),
|
|
311
|
+
/* @__PURE__ */ jsx4(ProductOptionProductSection, { productOptionId: product_option.id })
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// src/routes/product-options/product-option-detail/loader.ts
|
|
318
|
+
var productOptionDetailQuery = (id) => ({
|
|
319
|
+
queryKey: productOptionsQueryKeys.detail(id),
|
|
320
|
+
queryFn: async () => sdk.admin.productOption.retrieve(id, { fields: "-products" })
|
|
321
|
+
});
|
|
322
|
+
var productOptionLoader = async ({ params }) => {
|
|
323
|
+
const id = params.id;
|
|
324
|
+
const query = productOptionDetailQuery(id);
|
|
325
|
+
return queryClient.ensureQueryData(query);
|
|
326
|
+
};
|
|
327
|
+
export {
|
|
328
|
+
ProductOptionBreadcrumb as Breadcrumb,
|
|
329
|
+
ProductOptionDetail as Component,
|
|
330
|
+
productOptionLoader as loader
|
|
331
|
+
};
|