@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
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
productTypesQueryKeys,
|
|
3
|
-
useInfiniteProductTypes
|
|
4
|
-
} from "./chunk-UJ2TMPV4.mjs";
|
|
5
|
-
import {
|
|
6
|
-
collectionsQueryKeys,
|
|
7
|
-
useInfiniteCollections
|
|
8
|
-
} from "./chunk-UWY5ZV66.mjs";
|
|
9
1
|
import {
|
|
10
2
|
ordersQueryKeys
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
categoriesQueryKeys,
|
|
14
|
-
useInfiniteCategories
|
|
15
|
-
} from "./chunk-OSHH5GAS.mjs";
|
|
16
|
-
import {
|
|
17
|
-
productsQueryKeys,
|
|
18
|
-
useInfiniteProducts
|
|
19
|
-
} from "./chunk-Z6BFNHEO.mjs";
|
|
20
|
-
import {
|
|
21
|
-
useInfiniteList
|
|
22
|
-
} from "./chunk-HGRIOEAR.mjs";
|
|
3
|
+
} from "./chunk-333HK6Y6.mjs";
|
|
23
4
|
import {
|
|
24
5
|
queryClient
|
|
25
6
|
} from "./chunk-FXYH54JP.mjs";
|
|
@@ -30,12 +11,41 @@ import {
|
|
|
30
11
|
sdk
|
|
31
12
|
} from "./chunk-NFEK63OE.mjs";
|
|
32
13
|
|
|
14
|
+
// src/hooks/api/cloud.tsx
|
|
15
|
+
import {
|
|
16
|
+
useMutation,
|
|
17
|
+
useQuery
|
|
18
|
+
} from "@tanstack/react-query";
|
|
19
|
+
var cloudQueryKeys = {
|
|
20
|
+
all: ["cloud"],
|
|
21
|
+
auth: () => [...cloudQueryKeys.all, "auth"]
|
|
22
|
+
};
|
|
23
|
+
var useCloudAuthEnabled = (options) => {
|
|
24
|
+
return useQuery({
|
|
25
|
+
queryKey: cloudQueryKeys.auth(),
|
|
26
|
+
queryFn: async () => {
|
|
27
|
+
return await sdk.client.fetch("/cloud/auth");
|
|
28
|
+
},
|
|
29
|
+
...options
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
var useCreateCloudAuthUser = (options) => {
|
|
33
|
+
return useMutation({
|
|
34
|
+
mutationFn: async () => {
|
|
35
|
+
await sdk.client.fetch("/cloud/auth/users", {
|
|
36
|
+
method: "POST"
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
...options
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
33
43
|
// src/hooks/api/plugins.tsx
|
|
34
|
-
import { useQuery } from "@tanstack/react-query";
|
|
44
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
35
45
|
var PLUGINS_QUERY_KEY = "plugins";
|
|
36
46
|
var pluginsQueryKeys = queryKeysFactory(PLUGINS_QUERY_KEY);
|
|
37
47
|
var usePlugins = (options) => {
|
|
38
|
-
const { data, ...rest } =
|
|
48
|
+
const { data, ...rest } = useQuery2({
|
|
39
49
|
queryFn: () => sdk.admin.plugin.list(),
|
|
40
50
|
queryKey: pluginsQueryKeys.list(),
|
|
41
51
|
...options
|
|
@@ -45,40 +55,30 @@ var usePlugins = (options) => {
|
|
|
45
55
|
|
|
46
56
|
// src/hooks/api/product-variants.tsx
|
|
47
57
|
import {
|
|
48
|
-
useQuery as
|
|
58
|
+
useQuery as useQuery3
|
|
49
59
|
} from "@tanstack/react-query";
|
|
50
60
|
var PRODUCT_VARIANT_QUERY_KEY = "product_variant";
|
|
51
61
|
var productVariantQueryKeys = queryKeysFactory(
|
|
52
62
|
PRODUCT_VARIANT_QUERY_KEY
|
|
53
63
|
);
|
|
54
64
|
var useVariants = (query, options) => {
|
|
55
|
-
const { data, ...rest } =
|
|
65
|
+
const { data, ...rest } = useQuery3({
|
|
56
66
|
queryFn: () => sdk.admin.productVariant.list(query),
|
|
57
67
|
queryKey: productVariantQueryKeys.list(query),
|
|
58
68
|
...options
|
|
59
69
|
});
|
|
60
70
|
return { ...data, ...rest };
|
|
61
71
|
};
|
|
62
|
-
var useInfiniteVariants = (query, options) => {
|
|
63
|
-
return useInfiniteList({
|
|
64
|
-
queryKey: (params) => productVariantQueryKeys.list(params),
|
|
65
|
-
queryFn: async (params) => {
|
|
66
|
-
return await sdk.admin.productVariant.list(params);
|
|
67
|
-
},
|
|
68
|
-
query,
|
|
69
|
-
options
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
72
|
|
|
73
73
|
// src/hooks/api/refund-reasons.tsx
|
|
74
74
|
import {
|
|
75
|
-
useMutation,
|
|
76
|
-
useQuery as
|
|
75
|
+
useMutation as useMutation2,
|
|
76
|
+
useQuery as useQuery4
|
|
77
77
|
} from "@tanstack/react-query";
|
|
78
78
|
var REFUND_REASONS_QUERY_KEY = "refund_reasons";
|
|
79
79
|
var refundReasonsQueryKeys = queryKeysFactory(REFUND_REASONS_QUERY_KEY);
|
|
80
80
|
var useRefundReasons = (query, options) => {
|
|
81
|
-
const { data, ...rest } =
|
|
81
|
+
const { data, ...rest } = useQuery4({
|
|
82
82
|
queryFn: () => sdk.admin.refundReason.list(query),
|
|
83
83
|
queryKey: refundReasonsQueryKeys.list(query),
|
|
84
84
|
...options
|
|
@@ -86,7 +86,7 @@ var useRefundReasons = (query, options) => {
|
|
|
86
86
|
return { ...data, ...rest };
|
|
87
87
|
};
|
|
88
88
|
var useRefundReason = (id, query, options) => {
|
|
89
|
-
const { data, ...rest } =
|
|
89
|
+
const { data, ...rest } = useQuery4({
|
|
90
90
|
queryFn: () => sdk.admin.refundReason.retrieve(id, query),
|
|
91
91
|
queryKey: refundReasonsQueryKeys.detail(id),
|
|
92
92
|
...options
|
|
@@ -94,7 +94,7 @@ var useRefundReason = (id, query, options) => {
|
|
|
94
94
|
return { ...data, ...rest };
|
|
95
95
|
};
|
|
96
96
|
var useCreateRefundReason = (query, options) => {
|
|
97
|
-
return
|
|
97
|
+
return useMutation2({
|
|
98
98
|
mutationFn: async (data) => sdk.admin.refundReason.create(data, query),
|
|
99
99
|
onSuccess: (data, variables, context) => {
|
|
100
100
|
queryClient.invalidateQueries({
|
|
@@ -106,7 +106,7 @@ var useCreateRefundReason = (query, options) => {
|
|
|
106
106
|
});
|
|
107
107
|
};
|
|
108
108
|
var useUpdateRefundReason = (id, options) => {
|
|
109
|
-
return
|
|
109
|
+
return useMutation2({
|
|
110
110
|
mutationFn: async (data) => sdk.admin.refundReason.update(id, data),
|
|
111
111
|
onSuccess: (data, variables, context) => {
|
|
112
112
|
queryClient.invalidateQueries({
|
|
@@ -121,7 +121,7 @@ var useUpdateRefundReason = (id, options) => {
|
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
123
|
var useDeleteRefundReasonLazy = (options) => {
|
|
124
|
-
return
|
|
124
|
+
return useMutation2({
|
|
125
125
|
mutationFn: (id) => sdk.admin.refundReason.delete(id),
|
|
126
126
|
onSuccess: (data, variables, context) => {
|
|
127
127
|
queryClient.invalidateQueries({
|
|
@@ -138,15 +138,15 @@ var useDeleteRefundReasonLazy = (options) => {
|
|
|
138
138
|
|
|
139
139
|
// src/hooks/api/shipping-option-types.tsx
|
|
140
140
|
import {
|
|
141
|
-
useMutation as
|
|
142
|
-
useQuery as
|
|
141
|
+
useMutation as useMutation3,
|
|
142
|
+
useQuery as useQuery5
|
|
143
143
|
} from "@tanstack/react-query";
|
|
144
144
|
var SHIPPING_OPTION_TYPES_QUERY_KEY = "shipping_option_types";
|
|
145
145
|
var shippingOptionTypesQueryKeys = queryKeysFactory(
|
|
146
146
|
SHIPPING_OPTION_TYPES_QUERY_KEY
|
|
147
147
|
);
|
|
148
148
|
var useShippingOptionType = (id, query, options) => {
|
|
149
|
-
const { data, ...rest } =
|
|
149
|
+
const { data, ...rest } = useQuery5({
|
|
150
150
|
queryFn: () => sdk.admin.shippingOptionType.retrieve(id, query),
|
|
151
151
|
queryKey: shippingOptionTypesQueryKeys.detail(id),
|
|
152
152
|
...options
|
|
@@ -154,7 +154,7 @@ var useShippingOptionType = (id, query, options) => {
|
|
|
154
154
|
return { ...data, ...rest };
|
|
155
155
|
};
|
|
156
156
|
var useShippingOptionTypes = (query, options) => {
|
|
157
|
-
const { data, ...rest } =
|
|
157
|
+
const { data, ...rest } = useQuery5({
|
|
158
158
|
queryFn: () => sdk.admin.shippingOptionType.list(query),
|
|
159
159
|
queryKey: shippingOptionTypesQueryKeys.list(query),
|
|
160
160
|
...options
|
|
@@ -162,7 +162,7 @@ var useShippingOptionTypes = (query, options) => {
|
|
|
162
162
|
return { ...data, ...rest };
|
|
163
163
|
};
|
|
164
164
|
var useCreateShippingOptionType = (options) => {
|
|
165
|
-
return
|
|
165
|
+
return useMutation3({
|
|
166
166
|
mutationFn: (payload) => sdk.admin.shippingOptionType.create(payload),
|
|
167
167
|
onSuccess: (data, variables, context) => {
|
|
168
168
|
queryClient.invalidateQueries({
|
|
@@ -174,7 +174,7 @@ var useCreateShippingOptionType = (options) => {
|
|
|
174
174
|
});
|
|
175
175
|
};
|
|
176
176
|
var useUpdateShippingOptionType = (id, options) => {
|
|
177
|
-
return
|
|
177
|
+
return useMutation3({
|
|
178
178
|
mutationFn: (payload) => sdk.admin.shippingOptionType.update(id, payload),
|
|
179
179
|
onSuccess: (data, variables, context) => {
|
|
180
180
|
queryClient.invalidateQueries({
|
|
@@ -189,7 +189,7 @@ var useUpdateShippingOptionType = (id, options) => {
|
|
|
189
189
|
});
|
|
190
190
|
};
|
|
191
191
|
var useDeleteShippingOptionType = (id, options) => {
|
|
192
|
-
return
|
|
192
|
+
return useMutation3({
|
|
193
193
|
mutationFn: () => sdk.admin.shippingOptionType.delete(id),
|
|
194
194
|
onSuccess: (data, variables, context) => {
|
|
195
195
|
queryClient.invalidateQueries({
|
|
@@ -206,13 +206,13 @@ var useDeleteShippingOptionType = (id, options) => {
|
|
|
206
206
|
|
|
207
207
|
// src/hooks/api/tags.tsx
|
|
208
208
|
import {
|
|
209
|
-
useMutation as
|
|
210
|
-
useQuery as
|
|
209
|
+
useMutation as useMutation4,
|
|
210
|
+
useQuery as useQuery6
|
|
211
211
|
} from "@tanstack/react-query";
|
|
212
212
|
var TAGS_QUERY_KEY = "tags";
|
|
213
213
|
var productTagsQueryKeys = queryKeysFactory(TAGS_QUERY_KEY);
|
|
214
214
|
var useProductTag = (id, query, options) => {
|
|
215
|
-
const { data, ...rest } =
|
|
215
|
+
const { data, ...rest } = useQuery6({
|
|
216
216
|
queryKey: productTagsQueryKeys.detail(id, query),
|
|
217
217
|
queryFn: async () => sdk.admin.productTag.retrieve(id),
|
|
218
218
|
...options
|
|
@@ -220,23 +220,15 @@ var useProductTag = (id, query, options) => {
|
|
|
220
220
|
return { ...data, ...rest };
|
|
221
221
|
};
|
|
222
222
|
var useProductTags = (query, options) => {
|
|
223
|
-
const { data, ...rest } =
|
|
223
|
+
const { data, ...rest } = useQuery6({
|
|
224
224
|
queryKey: productTagsQueryKeys.list(query),
|
|
225
225
|
queryFn: async () => sdk.admin.productTag.list(query),
|
|
226
226
|
...options
|
|
227
227
|
});
|
|
228
228
|
return { ...data, ...rest };
|
|
229
229
|
};
|
|
230
|
-
var useInfiniteProductTags = (query, options) => {
|
|
231
|
-
return useInfiniteList({
|
|
232
|
-
queryKey: (params) => productTagsQueryKeys.list(params),
|
|
233
|
-
queryFn: (params) => sdk.admin.productTag.list(params),
|
|
234
|
-
query,
|
|
235
|
-
options
|
|
236
|
-
});
|
|
237
|
-
};
|
|
238
230
|
var useCreateProductTag = (query, options) => {
|
|
239
|
-
return
|
|
231
|
+
return useMutation4({
|
|
240
232
|
mutationFn: async (data) => sdk.admin.productTag.create(data, query),
|
|
241
233
|
onSuccess: (data, variables, context) => {
|
|
242
234
|
queryClient.invalidateQueries({
|
|
@@ -248,7 +240,7 @@ var useCreateProductTag = (query, options) => {
|
|
|
248
240
|
});
|
|
249
241
|
};
|
|
250
242
|
var useUpdateProductTag = (id, query, options) => {
|
|
251
|
-
return
|
|
243
|
+
return useMutation4({
|
|
252
244
|
mutationFn: async (data) => sdk.admin.productTag.update(id, data, query),
|
|
253
245
|
onSuccess: (data, variables, context) => {
|
|
254
246
|
queryClient.invalidateQueries({
|
|
@@ -263,7 +255,7 @@ var useUpdateProductTag = (id, query, options) => {
|
|
|
263
255
|
});
|
|
264
256
|
};
|
|
265
257
|
var useDeleteProductTag = (id, options) => {
|
|
266
|
-
return
|
|
258
|
+
return useMutation4({
|
|
267
259
|
mutationFn: async () => sdk.admin.productTag.delete(id),
|
|
268
260
|
onSuccess: (data, variables, context) => {
|
|
269
261
|
queryClient.invalidateQueries({
|
|
@@ -280,8 +272,9 @@ var useDeleteProductTag = (id, options) => {
|
|
|
280
272
|
|
|
281
273
|
// src/hooks/api/translations.tsx
|
|
282
274
|
import {
|
|
283
|
-
|
|
284
|
-
|
|
275
|
+
useInfiniteQuery,
|
|
276
|
+
useMutation as useMutation5,
|
|
277
|
+
useQuery as useQuery7
|
|
285
278
|
} from "@tanstack/react-query";
|
|
286
279
|
var TRANSLATIONS_QUERY_KEY = "translations";
|
|
287
280
|
var translationsQueryKeys = queryKeysFactory(TRANSLATIONS_QUERY_KEY);
|
|
@@ -293,163 +286,69 @@ var TRANSLATION_STATISTICS_QUERY_KEY = "translation_statistics";
|
|
|
293
286
|
var translationStatisticsQueryKeys = queryKeysFactory(
|
|
294
287
|
TRANSLATION_STATISTICS_QUERY_KEY
|
|
295
288
|
);
|
|
296
|
-
var
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
],
|
|
337
|
-
[
|
|
338
|
-
"product_category",
|
|
339
|
-
() => {
|
|
340
|
-
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
341
|
-
const { data: data2, ...rest2 } = useInfiniteCategories(
|
|
342
|
-
{ id: referenceId ?? [], fields },
|
|
343
|
-
options
|
|
344
|
-
);
|
|
345
|
-
const categories = data2?.pages.flatMap((page) => page.product_categories) ?? [];
|
|
346
|
-
return {
|
|
347
|
-
...rest2,
|
|
348
|
-
data: {
|
|
349
|
-
translations: categories?.flatMap((category) => category.translations ?? []) ?? [],
|
|
350
|
-
references: categories ?? [],
|
|
351
|
-
translatableFields,
|
|
352
|
-
count: data2?.pages[0]?.count ?? 0
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
[
|
|
358
|
-
"product_collection",
|
|
359
|
-
() => {
|
|
360
|
-
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
361
|
-
const { data: data2, ...rest2 } = useInfiniteCollections(
|
|
362
|
-
{ id: referenceId ?? [], fields },
|
|
363
|
-
options
|
|
364
|
-
);
|
|
365
|
-
const collections = data2?.pages.flatMap((page) => page.collections) ?? [];
|
|
366
|
-
return {
|
|
367
|
-
...rest2,
|
|
368
|
-
data: {
|
|
369
|
-
translations: collections?.flatMap(
|
|
370
|
-
(collection) => collection.translations ?? []
|
|
371
|
-
) ?? [],
|
|
372
|
-
references: collections ?? [],
|
|
373
|
-
translatableFields,
|
|
374
|
-
count: data2?.pages[0]?.count ?? 0
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
],
|
|
379
|
-
[
|
|
380
|
-
"product_type",
|
|
381
|
-
() => {
|
|
382
|
-
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
383
|
-
const { data: data2, ...rest2 } = useInfiniteProductTypes(
|
|
384
|
-
{ id: referenceId ?? [], fields },
|
|
385
|
-
options
|
|
386
|
-
);
|
|
387
|
-
const product_types = data2?.pages.flatMap((page) => page.product_types) ?? [];
|
|
388
|
-
return {
|
|
389
|
-
...rest2,
|
|
390
|
-
data: {
|
|
391
|
-
translations: product_types?.flatMap((type) => type.translations ?? []) ?? [],
|
|
392
|
-
references: product_types ?? [],
|
|
393
|
-
count: data2?.pages[0]?.count ?? 0,
|
|
394
|
-
translatableFields
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
],
|
|
399
|
-
[
|
|
400
|
-
"product_tag",
|
|
401
|
-
() => {
|
|
402
|
-
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
403
|
-
const { data: data2, ...rest2 } = useInfiniteProductTags(
|
|
404
|
-
{ id: referenceId ?? [], fields },
|
|
405
|
-
options
|
|
406
|
-
);
|
|
407
|
-
const product_tags = data2?.pages.flatMap((page) => page.product_tags) ?? [];
|
|
408
|
-
return {
|
|
409
|
-
...rest2,
|
|
410
|
-
data: {
|
|
411
|
-
translations: product_tags?.flatMap((tag) => tag.translations ?? []) ?? [],
|
|
412
|
-
references: product_tags ?? [],
|
|
413
|
-
translatableFields,
|
|
414
|
-
count: data2?.pages[0]?.count ?? 0
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
]
|
|
419
|
-
// TODO: product option and option values
|
|
420
|
-
]);
|
|
421
|
-
const referenceHook = referenceHookMap.get(reference);
|
|
422
|
-
if (!referenceHook) {
|
|
423
|
-
throw new Error(`No hook found for reference type: ${reference}`);
|
|
424
|
-
}
|
|
425
|
-
const { data, ...rest } = referenceHook();
|
|
426
|
-
return { ...data, ...rest };
|
|
289
|
+
var TRANSLATION_ENTITIES_QUERY_KEY = "translation_entities";
|
|
290
|
+
var translationEntitiesQueryKeys = queryKeysFactory(
|
|
291
|
+
TRANSLATION_ENTITIES_QUERY_KEY
|
|
292
|
+
);
|
|
293
|
+
var DEFAULT_PAGE_SIZE = 20;
|
|
294
|
+
var useReferenceTranslations = (reference, referenceId, options) => {
|
|
295
|
+
const { data, ...rest } = useInfiniteQuery({
|
|
296
|
+
queryKey: translationEntitiesQueryKeys.list({
|
|
297
|
+
type: reference,
|
|
298
|
+
id: referenceId
|
|
299
|
+
}),
|
|
300
|
+
queryFn: async ({ pageParam = 0 }) => {
|
|
301
|
+
return sdk.admin.translation.entities({
|
|
302
|
+
type: reference,
|
|
303
|
+
id: referenceId,
|
|
304
|
+
limit: DEFAULT_PAGE_SIZE,
|
|
305
|
+
offset: pageParam
|
|
306
|
+
});
|
|
307
|
+
},
|
|
308
|
+
initialPageParam: 0,
|
|
309
|
+
getNextPageParam: (lastPage) => {
|
|
310
|
+
const nextOffset = lastPage.offset + lastPage.limit;
|
|
311
|
+
return nextOffset < lastPage.count ? nextOffset : void 0;
|
|
312
|
+
},
|
|
313
|
+
...options
|
|
314
|
+
});
|
|
315
|
+
const entitiesWithTranslations = data?.pages.flatMap((page) => page.data) ?? [];
|
|
316
|
+
const translations = entitiesWithTranslations.flatMap(
|
|
317
|
+
(entity) => entity.translations ?? []
|
|
318
|
+
);
|
|
319
|
+
const references = entitiesWithTranslations.map(
|
|
320
|
+
({ translations: _, ...entity }) => entity
|
|
321
|
+
);
|
|
322
|
+
const count = data?.pages[0]?.count ?? 0;
|
|
323
|
+
return {
|
|
324
|
+
references,
|
|
325
|
+
translations,
|
|
326
|
+
count,
|
|
327
|
+
...rest
|
|
328
|
+
};
|
|
427
329
|
};
|
|
428
330
|
var useBatchTranslations = (reference, options) => {
|
|
429
|
-
const
|
|
430
|
-
["product", productsQueryKeys.lists()],
|
|
431
|
-
["product_variant", productVariantQueryKeys.lists()],
|
|
432
|
-
["product_category", categoriesQueryKeys.lists()],
|
|
433
|
-
["product_collection", collectionsQueryKeys.lists()],
|
|
434
|
-
["product_type", productTypesQueryKeys.lists()],
|
|
435
|
-
["product_tag", productTagsQueryKeys.lists()]
|
|
436
|
-
]);
|
|
437
|
-
return useMutation4({
|
|
331
|
+
const mutation = useMutation5({
|
|
438
332
|
mutationFn: (payload) => sdk.admin.translation.batch(payload),
|
|
439
|
-
|
|
333
|
+
...options
|
|
334
|
+
});
|
|
335
|
+
const invalidateQueries = async () => {
|
|
336
|
+
await Promise.all([
|
|
440
337
|
queryClient.invalidateQueries({
|
|
441
|
-
queryKey:
|
|
442
|
-
})
|
|
338
|
+
queryKey: translationEntitiesQueryKeys.list({ type: reference })
|
|
339
|
+
}),
|
|
443
340
|
queryClient.invalidateQueries({
|
|
444
341
|
queryKey: translationStatisticsQueryKeys.lists()
|
|
445
|
-
})
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
342
|
+
})
|
|
343
|
+
]);
|
|
344
|
+
};
|
|
345
|
+
return {
|
|
346
|
+
...mutation,
|
|
347
|
+
invalidateQueries
|
|
348
|
+
};
|
|
450
349
|
};
|
|
451
350
|
var useTranslationSettings = (query, options) => {
|
|
452
|
-
const { data, ...rest } =
|
|
351
|
+
const { data, ...rest } = useQuery7({
|
|
453
352
|
queryKey: translationSettingsQueryKeys.list(query),
|
|
454
353
|
queryFn: () => sdk.admin.translation.settings(query),
|
|
455
354
|
...options
|
|
@@ -457,7 +356,7 @@ var useTranslationSettings = (query, options) => {
|
|
|
457
356
|
return { ...data, ...rest };
|
|
458
357
|
};
|
|
459
358
|
var useTranslationStatistics = (query, options) => {
|
|
460
|
-
const { data, ...rest } =
|
|
359
|
+
const { data, ...rest } = useQuery7({
|
|
461
360
|
queryKey: translationStatisticsQueryKeys.list(query),
|
|
462
361
|
queryFn: () => sdk.admin.translation.statistics(query),
|
|
463
362
|
...options
|
|
@@ -466,16 +365,16 @@ var useTranslationStatistics = (query, options) => {
|
|
|
466
365
|
};
|
|
467
366
|
|
|
468
367
|
// src/hooks/api/fulfillment.tsx
|
|
469
|
-
import { useMutation as
|
|
368
|
+
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
470
369
|
var FULFILLMENTS_QUERY_KEY = "fulfillments";
|
|
471
370
|
var fulfillmentsQueryKeys = queryKeysFactory(FULFILLMENTS_QUERY_KEY);
|
|
472
371
|
|
|
473
372
|
// src/hooks/api/locales.tsx
|
|
474
|
-
import { useQuery as
|
|
373
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
475
374
|
var LOCALES_QUERY_KEY = "locales";
|
|
476
375
|
var localesQueryKeys = queryKeysFactory(LOCALES_QUERY_KEY);
|
|
477
376
|
var useLocales = (query, options) => {
|
|
478
|
-
const { data, ...rest } =
|
|
377
|
+
const { data, ...rest } = useQuery8({
|
|
479
378
|
queryFn: () => sdk.admin.locale.list(query),
|
|
480
379
|
queryKey: localesQueryKeys.list(query),
|
|
481
380
|
...options
|
|
@@ -484,11 +383,11 @@ var useLocales = (query, options) => {
|
|
|
484
383
|
};
|
|
485
384
|
|
|
486
385
|
// src/hooks/api/notification.tsx
|
|
487
|
-
import { useQuery as
|
|
386
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
488
387
|
var NOTIFICATION_QUERY_KEY = "notification";
|
|
489
388
|
var notificationQueryKeys = queryKeysFactory(NOTIFICATION_QUERY_KEY);
|
|
490
389
|
var useNotifications = (query, options) => {
|
|
491
|
-
const { data, ...rest } =
|
|
390
|
+
const { data, ...rest } = useQuery9({
|
|
492
391
|
queryFn: () => sdk.admin.notification.list(query),
|
|
493
392
|
queryKey: notificationQueryKeys.list(query),
|
|
494
393
|
...options
|
|
@@ -497,13 +396,13 @@ var useNotifications = (query, options) => {
|
|
|
497
396
|
};
|
|
498
397
|
|
|
499
398
|
// src/hooks/api/payment-collections.tsx
|
|
500
|
-
import { useMutation as
|
|
399
|
+
import { useMutation as useMutation7 } from "@tanstack/react-query";
|
|
501
400
|
var PAYMENT_COLLECTION_QUERY_KEY = "payment-collection";
|
|
502
401
|
var paymentCollectionQueryKeys = queryKeysFactory(
|
|
503
402
|
PAYMENT_COLLECTION_QUERY_KEY
|
|
504
403
|
);
|
|
505
404
|
var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) => {
|
|
506
|
-
return
|
|
405
|
+
return useMutation7({
|
|
507
406
|
mutationFn: (payload) => sdk.admin.paymentCollection.markAsPaid(paymentCollectionId, payload),
|
|
508
407
|
onSuccess: (data, variables, context) => {
|
|
509
408
|
queryClient.invalidateQueries({
|
|
@@ -523,8 +422,8 @@ var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) =>
|
|
|
523
422
|
|
|
524
423
|
// src/hooks/api/payments.tsx
|
|
525
424
|
import {
|
|
526
|
-
useMutation as
|
|
527
|
-
useQuery as
|
|
425
|
+
useMutation as useMutation8,
|
|
426
|
+
useQuery as useQuery10
|
|
528
427
|
} from "@tanstack/react-query";
|
|
529
428
|
var PAYMENT_QUERY_KEY = "payment";
|
|
530
429
|
var paymentQueryKeys = queryKeysFactory(PAYMENT_QUERY_KEY);
|
|
@@ -533,7 +432,7 @@ var paymentProvidersQueryKeys = queryKeysFactory(
|
|
|
533
432
|
PAYMENT_PROVIDERS_QUERY_KEY
|
|
534
433
|
);
|
|
535
434
|
var useCapturePayment = (orderId, paymentId, options) => {
|
|
536
|
-
return
|
|
435
|
+
return useMutation8({
|
|
537
436
|
mutationFn: (payload) => sdk.admin.payment.capture(paymentId, payload),
|
|
538
437
|
onSuccess: (data, variables, context) => {
|
|
539
438
|
queryClient.invalidateQueries({
|
|
@@ -548,7 +447,7 @@ var useCapturePayment = (orderId, paymentId, options) => {
|
|
|
548
447
|
});
|
|
549
448
|
};
|
|
550
449
|
var useRefundPayment = (orderId, paymentId, options) => {
|
|
551
|
-
return
|
|
450
|
+
return useMutation8({
|
|
552
451
|
mutationFn: (payload) => sdk.admin.payment.refund(paymentId, payload),
|
|
553
452
|
onSuccess: (data, variables, context) => {
|
|
554
453
|
queryClient.invalidateQueries({
|
|
@@ -564,6 +463,8 @@ var useRefundPayment = (orderId, paymentId, options) => {
|
|
|
564
463
|
};
|
|
565
464
|
|
|
566
465
|
export {
|
|
466
|
+
useCloudAuthEnabled,
|
|
467
|
+
useCreateCloudAuthUser,
|
|
567
468
|
useLocales,
|
|
568
469
|
notificationQueryKeys,
|
|
569
470
|
useNotifications,
|