@medusajs/dashboard 3.0.0-snapshot-20251202223100 → 3.0.0-snapshot-20251208164410
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/{adjust-inventory-WZOCLB5V.mjs → adjust-inventory-ZB3AVET7.mjs} +1 -1
- package/dist/{api-key-management-create-W7NL2IYN.mjs → api-key-management-create-U6VGZK7R.mjs} +3 -3
- package/dist/{api-key-management-detail-LDBEO446.mjs → api-key-management-detail-OEAWWV5O.mjs} +13 -13
- package/dist/{api-key-management-edit-TLVLXAVK.mjs → api-key-management-edit-TJM737A7.mjs} +3 -3
- package/dist/{api-key-management-list-FTLC3ELT.mjs → api-key-management-list-ZRYMMTF5.mjs} +3 -3
- package/dist/{api-key-management-sales-channels-NYY3NZOE.mjs → api-key-management-sales-channels-D2RAHI7W.mjs} +4 -4
- package/dist/app.css +3 -3
- package/dist/app.js +17416 -15980
- package/dist/app.mjs +11 -11
- package/dist/{campaign-create-LHL7FKQK.mjs → campaign-create-IXOWJQ4L.mjs} +3 -3
- package/dist/{campaign-detail-T3V6M3XE.mjs → campaign-detail-TFQCDDIN.mjs} +10 -10
- package/dist/{categories-metadata-V6FDXGSN.mjs → categories-metadata-7JFVYYUN.mjs} +10 -10
- package/dist/{category-create-ELMCLH4J.mjs → category-create-BTMZYQ5R.mjs} +5 -5
- package/dist/{category-detail-DNWTF4FV.mjs → category-detail-UUEMLEVJ.mjs} +14 -14
- package/dist/{category-edit-TYKLEYGE.mjs → category-edit-Q3KEELHO.mjs} +2 -2
- package/dist/{category-list-IJ3DLPYQ.mjs → category-list-Z6HS6N75.mjs} +5 -5
- package/dist/{category-organize-PDLC54E2.mjs → category-organize-45NPSRNG.mjs} +2 -2
- package/dist/{category-products-ATK63QHB.mjs → category-products-KW6X3JDW.mjs} +13 -13
- package/dist/{chunk-WPXYFJEP.mjs → chunk-2WLOIS3L.mjs} +1 -1
- package/dist/{chunk-UHIPGDJZ.mjs → chunk-35G7IXTE.mjs} +15 -15
- package/dist/{chunk-DODQ3KJT.mjs → chunk-3RRA56WC.mjs} +8 -3
- package/dist/{chunk-DKIUGYWW.mjs → chunk-3ZJ55SFA.mjs} +2 -2
- package/dist/{chunk-OXPE5TAY.mjs → chunk-42TMWI76.mjs} +1 -1
- package/dist/{chunk-OFN7DIZA.mjs → chunk-5AM254NB.mjs} +83 -3
- package/dist/{chunk-56TDUOXV.mjs → chunk-5N33TBBX.mjs} +1 -1
- package/dist/{chunk-5LGRZSEH.mjs → chunk-67RC6SEX.mjs} +1 -1
- package/dist/{chunk-O4RZ3Y65.mjs → chunk-7H6DB666.mjs} +1 -1
- package/dist/{chunk-5EGFR4EO.mjs → chunk-AGBHQZZT.mjs} +318 -236
- package/dist/{chunk-E3AFVPLW.mjs → chunk-BWU3ZE4W.mjs} +1 -1
- package/dist/{chunk-IKTS7EHT.mjs → chunk-D55WNQYO.mjs} +1 -1
- package/dist/{chunk-XDLBQGST.mjs → chunk-EFRTOOI5.mjs} +1 -1
- package/dist/{chunk-ETOJCN3Q.mjs → chunk-FJHAGJ5G.mjs} +1 -1
- package/dist/{chunk-K5QWNI6V.mjs → chunk-FNQ227BC.mjs} +1 -1
- package/dist/{chunk-A6PWH2CK.mjs → chunk-GHBURGZC.mjs} +1 -1
- package/dist/{chunk-4MG5LND4.mjs → chunk-HEYM67GY.mjs} +1 -1
- package/dist/{chunk-QHRVYT5N.mjs → chunk-HRSO6H4F.mjs} +3 -3
- package/dist/{chunk-REUYEF7L.mjs → chunk-MB7M5THW.mjs} +1 -1
- package/dist/{chunk-KLNRCI3K.mjs → chunk-MOGV3UZD.mjs} +1 -1
- package/dist/{chunk-3C6WQ7NH.mjs → chunk-NFEW5CVI.mjs} +37 -3
- package/dist/{chunk-VGXF4DOW.mjs → chunk-NKGKWMUU.mjs} +5 -5
- package/dist/{chunk-RLDK4LY5.mjs → chunk-NTYLG6Y3.mjs} +1 -1
- package/dist/{chunk-AF7A24XI.mjs → chunk-O5DGX2NZ.mjs} +1 -1
- package/dist/{chunk-T2ANPJ36.mjs → chunk-OMRGW7JS.mjs} +3 -3
- package/dist/{chunk-7V2JZU2B.mjs → chunk-P23S5LDK.mjs} +2 -2
- package/dist/{chunk-OAW7KLET.mjs → chunk-PPRHEG37.mjs} +2 -2
- package/dist/{chunk-AENRV3N7.mjs → chunk-QW4SQVMT.mjs} +109 -50
- package/dist/{chunk-MWBKAP7W.mjs → chunk-RNYL6AXZ.mjs} +2 -2
- package/dist/{chunk-KWP436SM.mjs → chunk-S3MMZPMX.mjs} +2 -2
- package/dist/{chunk-ND5YSIPU.mjs → chunk-SAZHCRHS.mjs} +1 -1
- package/dist/{chunk-M3CKVBZC.mjs → chunk-YGEJFHC3.mjs} +1 -1
- package/dist/chunk-ZHH3W7CN.mjs +171 -0
- package/dist/{collection-add-products-7WSD7YU4.mjs → collection-add-products-YSTEEHMF.mjs} +14 -14
- package/dist/{collection-create-I2A2X4VK.mjs → collection-create-RIGJHEX5.mjs} +2 -2
- package/dist/{collection-detail-NVE55BPK.mjs → collection-detail-P5JWWFHH.mjs} +14 -14
- package/dist/{collection-edit-RGH7NCUE.mjs → collection-edit-WX5G3FHR.mjs} +2 -2
- package/dist/{collection-list-SXHRKTIU.mjs → collection-list-PU6SWYVL.mjs} +24 -23
- package/dist/{collection-metadata-ZREV7BND.mjs → collection-metadata-R55DUZSX.mjs} +11 -11
- package/dist/{customer-detail-O4L55RY6.mjs → customer-detail-HVGU3DRM.mjs} +14 -14
- package/dist/{customer-group-detail-LSZA4ARM.mjs → customer-group-detail-QKFWIFYH.mjs} +13 -13
- package/dist/{customer-group-list-6JTEUJAC.mjs → customer-group-list-WLG2ZMBD.mjs} +13 -13
- package/dist/{customers-add-customer-group-MHJ34FDF.mjs → customers-add-customer-group-KL5UXXOR.mjs} +13 -13
- package/dist/{edit-inventory-item-LMDNUI6M.mjs → edit-inventory-item-O6JLGZE4.mjs} +1 -1
- package/dist/{edit-inventory-item-attributes-DPJIHBP3.mjs → edit-inventory-item-attributes-AUVR3GYY.mjs} +1 -1
- package/dist/{edit-reservation-IOOZBJ2T.mjs → edit-reservation-GQ6R6GVA.mjs} +2 -2
- package/dist/{edit-rules-CEE2IKS6.mjs → edit-rules-PJWEWMM7.mjs} +12 -12
- package/dist/en.json +49 -3
- package/dist/{inventory-create-H62EOWR6.mjs → inventory-create-P3WYAGQZ.mjs} +10 -10
- package/dist/{inventory-detail-ALOIH3H7.mjs → inventory-detail-C2NU7GTA.mjs} +10 -10
- package/dist/{inventory-list-RQBI7UJX.mjs → inventory-list-ADJQDNX5.mjs} +1 -1
- package/dist/{inventory-metadata-ICOCEY75.mjs → inventory-metadata-V2N3HOPG.mjs} +10 -10
- package/dist/{inventory-stock-LDEZTKU4.mjs → inventory-stock-5DCIGKBI.mjs} +10 -10
- package/dist/{location-detail-UNXAQQSZ.mjs → location-detail-2CJWVT5M.mjs} +15 -15
- package/dist/{location-fulfillment-providers-XVFFAB6I.mjs → location-fulfillment-providers-PYPUR74W.mjs} +15 -14
- package/dist/{location-sales-channels-UVYT52SH.mjs → location-sales-channels-JPH5BTUY.mjs} +3 -3
- package/dist/{location-service-zone-shipping-option-create-THNTZX5P.mjs → location-service-zone-shipping-option-create-HLZLP422.mjs} +11 -11
- package/dist/{location-service-zone-shipping-option-edit-TQNTCYII.mjs → location-service-zone-shipping-option-edit-OYTEZGGC.mjs} +4 -4
- package/dist/{login-EMANCYJH.mjs → login-AKO3BIQT.mjs} +10 -10
- package/dist/{manage-locations-2VDQ3ILT.mjs → manage-locations-ATCDVTSR.mjs} +1 -1
- package/dist/{order-allocate-items-FCJTB2IB.mjs → order-allocate-items-2H25GRTK.mjs} +3 -3
- package/dist/{order-create-claim-P5ADYS5P.mjs → order-create-claim-CWGDAFFU.mjs} +17 -17
- package/dist/{order-create-edit-CVPRRPOA.mjs → order-create-edit-KJODOQXN.mjs} +11 -11
- package/dist/{order-create-exchange-IHV6VKO5.mjs → order-create-exchange-TM4FQLKM.mjs} +23 -23
- package/dist/{order-create-fulfillment-SY6UM3NJ.mjs → order-create-fulfillment-2WJZPAWX.mjs} +14 -14
- package/dist/{order-create-refund-AGKPMCF6.mjs → order-create-refund-A6WKCHX7.mjs} +15 -15
- package/dist/{order-create-return-5UH7FN3H.mjs → order-create-return-NDKTI4E5.mjs} +5 -5
- package/dist/{order-create-shipment-J34CYL32.mjs → order-create-shipment-3AVEAGAY.mjs} +10 -10
- package/dist/{order-detail-EVDCA6UP.mjs → order-detail-7HXZEBWJ.mjs} +31 -31
- package/dist/{order-edit-billing-address-JH3XNOCQ.mjs → order-edit-billing-address-DPK7HTLM.mjs} +10 -10
- package/dist/{order-edit-email-KV2IHQRT.mjs → order-edit-email-UJ2OUKHJ.mjs} +10 -10
- package/dist/{order-edit-shipping-address-WMNNU53B.mjs → order-edit-shipping-address-5ZCGHHZE.mjs} +10 -10
- package/dist/{order-list-26YQAIRH.mjs → order-list-5C4TVJRH.mjs} +4 -4
- package/dist/{order-metadata-F4LZ73LR.mjs → order-metadata-UKTGLYWR.mjs} +10 -10
- package/dist/{order-receive-return-LSMD7POH.mjs → order-receive-return-N7VLM2GX.mjs} +11 -11
- package/dist/{order-request-transfer-A3EBBZ5N.mjs → order-request-transfer-5ENT7IOT.mjs} +11 -11
- package/dist/{price-list-configuration-2G3WFC3J.mjs → price-list-configuration-SS2VMD4N.mjs} +4 -4
- package/dist/{price-list-create-RLT7G7KF.mjs → price-list-create-FF4F6M2A.mjs} +17 -17
- package/dist/{price-list-detail-TKRELOK2.mjs → price-list-detail-HQF4ZR2U.mjs} +17 -17
- package/dist/{price-list-edit-6URYI6AK.mjs → price-list-edit-VRI5T4W3.mjs} +2 -2
- package/dist/{price-list-list-FLINOQCK.mjs → price-list-list-S2HWTXKV.mjs} +3 -3
- package/dist/{price-list-prices-add-UPUY72HG.mjs → price-list-prices-add-JYZAHKAQ.mjs} +13 -13
- package/dist/{price-list-prices-edit-ZHAQDPWX.mjs → price-list-prices-edit-TRCLLGU4.mjs} +2 -2
- package/dist/{product-attributes-ZR63AQWA.mjs → product-attributes-NEXVST24.mjs} +12 -12
- package/dist/{product-create-EQ6SN5QT.mjs → product-create-WU4YFCMM.mjs} +377 -554
- package/dist/{product-create-variant-7C5PKKX7.mjs → product-create-variant-RDEE4IX7.mjs} +11 -11
- package/dist/{product-detail-ATPFDPI2.mjs → product-detail-J4JYWH2M.mjs} +38 -54
- package/dist/{product-edit-XPUNYMD7.mjs → product-edit-ZF2WYHPB.mjs} +12 -12
- package/dist/{product-export-GFLEIKIM.mjs → product-export-QDX6343F.mjs} +23 -22
- package/dist/{product-image-variants-edit-TC3M4PGX.mjs → product-image-variants-edit-5L5J32SO.mjs} +10 -10
- package/dist/{product-import-2Z5I7RXI.mjs → product-import-6TEVSKGQ.mjs} +10 -10
- package/dist/{product-list-33ANLONH.mjs → product-list-BHGGJX6B.mjs} +17 -17
- package/dist/{product-media-WCLPCVR3.mjs → product-media-EKXMOSO4.mjs} +2 -2
- package/dist/{product-metadata-GQU7EVZ3.mjs → product-metadata-BCJJNWAC.mjs} +10 -10
- package/dist/product-option-create-3Z73MSHD.mjs +336 -0
- package/dist/product-option-detail-4VRUA7KT.mjs +322 -0
- package/dist/product-option-edit-YIKFL6OY.mjs +324 -0
- package/dist/product-option-list-CR7NCCMH.mjs +267 -0
- package/dist/product-option-metadata-7CSZUQ7M.mjs +71 -0
- package/dist/product-options-manage-QOMXMPGW.mjs +304 -0
- package/dist/{product-organization-T2TQ5EH6.mjs → product-organization-IG54OB75.mjs} +14 -14
- package/dist/{product-prices-MKMKBH6P.mjs → product-prices-UMEIS5AZ.mjs} +1 -1
- package/dist/{product-sales-channels-5YIO22UW.mjs → product-sales-channels-2SALTLTF.mjs} +3 -3
- package/dist/{product-shipping-profile-PL76UMVZ.mjs → product-shipping-profile-VPHZLKDT.mjs} +13 -13
- package/dist/{product-stock-6QHBTDUQ.mjs → product-stock-3ILUPCVN.mjs} +10 -10
- package/dist/{product-tag-create-B6EOKDJT.mjs → product-tag-create-OOUTLHHD.mjs} +10 -10
- package/dist/{product-tag-detail-TQP7ZWSR.mjs → product-tag-detail-YVKJEAKT.mjs} +28 -27
- package/dist/{product-tag-edit-RPLWDG5A.mjs → product-tag-edit-RV5WITSN.mjs} +10 -10
- package/dist/{product-tag-list-PZTGHM7M.mjs → product-tag-list-ZSPFYZIL.mjs} +26 -25
- package/dist/{product-tag-metadata-FKKOT5CD.mjs → product-tag-metadata-S5YL3FUL.mjs} +10 -10
- package/dist/{product-type-detail-DDIBFR7O.mjs → product-type-detail-EFVZRETM.mjs} +13 -13
- package/dist/{product-type-metadata-EXCYTTQG.mjs → product-type-metadata-TNAASDKX.mjs} +10 -10
- package/dist/{product-variant-detail-GCESZH4H.mjs → product-variant-detail-CLP5FJP6.mjs} +10 -10
- package/dist/{product-variant-edit-JHOQJN6U.mjs → product-variant-edit-REMB77V7.mjs} +11 -11
- package/dist/{product-variant-manage-inventory-items-B7TUBSD5.mjs → product-variant-manage-inventory-items-IGDCLZQE.mjs} +2 -2
- package/dist/{product-variant-media-6WWLRINP.mjs → product-variant-media-EKI4BTEV.mjs} +1 -1
- package/dist/{product-variant-metadata-NEZIGTEP.mjs → product-variant-metadata-5JIY5KLN.mjs} +10 -10
- package/dist/{promotion-add-campaign-MKDYE7MW.mjs → promotion-add-campaign-DOALJUKJ.mjs} +3 -3
- package/dist/{promotion-create-CUAQY2NH.mjs → promotion-create-2PTB6NQI.mjs} +18 -18
- package/dist/{promotion-detail-2S7FWTXF.mjs → promotion-detail-RGXCA2XS.mjs} +10 -10
- package/dist/{refund-reason-create-4YAO4325.mjs → refund-reason-create-AGEFXEIZ.mjs} +10 -10
- package/dist/{refund-reason-edit-5J2VIRIL.mjs → refund-reason-edit-DL56EKBY.mjs} +10 -10
- package/dist/{refund-reason-list-453DXONV.mjs → refund-reason-list-RL2ZG7IJ.mjs} +13 -13
- package/dist/{region-create-QLPSK6TX.mjs → region-create-UVJICJRX.mjs} +1 -1
- package/dist/{region-edit-JCJHA6TY.mjs → region-edit-3NVXQECN.mjs} +1 -1
- package/dist/{region-metadata-C7DIBM35.mjs → region-metadata-2HO3SAPM.mjs} +10 -10
- package/dist/{reservation-create-BW4CDTWR.mjs → reservation-create-Z7TWUE2L.mjs} +3 -3
- package/dist/{reservation-detail-GFNWLSI2.mjs → reservation-detail-2AOBK5EY.mjs} +10 -10
- package/dist/{reservation-list-RGL67CIU.mjs → reservation-list-MN22JYAW.mjs} +2 -2
- package/dist/{reservation-metadata-OI2G4BDW.mjs → reservation-metadata-BFPJTXK6.mjs} +10 -10
- package/dist/{sales-channel-add-products-63NGB37Z.mjs → sales-channel-add-products-4LNP2TUM.mjs} +13 -13
- package/dist/{sales-channel-create-TOBEDYFD.mjs → sales-channel-create-UFFXX5HK.mjs} +2 -2
- package/dist/{sales-channel-detail-LJPQAJDT.mjs → sales-channel-detail-UMYMS2JA.mjs} +13 -13
- package/dist/{sales-channel-edit-XUTE5GB5.mjs → sales-channel-edit-SP2HF4E3.mjs} +2 -2
- package/dist/{sales-channel-list-TBAN7UT6.mjs → sales-channel-list-CV4V6R7H.mjs} +11 -11
- package/dist/{sales-channel-metadata-SE4TGSDB.mjs → sales-channel-metadata-REOQHHUT.mjs} +10 -10
- package/dist/{shipping-option-type-create-MB4ENYKV.mjs → shipping-option-type-create-XAWQO66M.mjs} +10 -10
- package/dist/{shipping-option-type-detail-IX4JGSTK.mjs → shipping-option-type-detail-G4WLGIAA.mjs} +11 -11
- package/dist/{shipping-option-type-edit-B5KU5LER.mjs → shipping-option-type-edit-OI6TBKGG.mjs} +10 -10
- package/dist/{shipping-option-type-list-TVR5OE2C.mjs → shipping-option-type-list-6GNCKAFB.mjs} +11 -11
- package/dist/{shipping-profile-metadata-Z35SYLBS.mjs → shipping-profile-metadata-MANQ7ZEI.mjs} +10 -10
- package/dist/{store-detail-VUJSSOKZ.mjs → store-detail-N2CP3MTB.mjs} +10 -10
- package/dist/{store-edit-3XS6IC2Z.mjs → store-edit-Q25HCMCQ.mjs} +1 -1
- package/dist/{store-metadata-TYFTDOEK.mjs → store-metadata-U22TVWK2.mjs} +10 -10
- package/dist/{tax-region-create-ZTCTKE4C.mjs → tax-region-create-JZB7NFIG.mjs} +11 -11
- package/dist/{tax-region-detail-MHM4MAOS.mjs → tax-region-detail-CBZ3ZJN2.mjs} +29 -28
- package/dist/{tax-region-edit-SFJGFTAV.mjs → tax-region-edit-E56XVHW2.mjs} +11 -11
- package/dist/{tax-region-province-detail-VMOV4JPV.mjs → tax-region-province-detail-2DC2U4EN.mjs} +29 -28
- package/dist/{tax-region-tax-override-create-GRXLTURD.mjs → tax-region-tax-override-create-JWGWGYB4.mjs} +28 -27
- package/dist/{tax-region-tax-override-edit-D2YBOBEI.mjs → tax-region-tax-override-edit-7DCU55AS.mjs} +27 -26
- package/dist/{user-detail-N6PT3KRP.mjs → user-detail-K5UMPO2L.mjs} +1 -1
- package/dist/{user-metadata-D5HNZWZY.mjs → user-metadata-EX5WDGCR.mjs} +10 -10
- package/dist/{workflow-execution-detail-GSUDCTN3.mjs → workflow-execution-detail-GBPFVG3O.mjs} +10 -10
- package/package.json +9 -9
- package/src/components/inputs/combobox/combobox.tsx +173 -92
- package/src/components/layout/main-layout/main-layout.tsx +7 -4
- package/src/dashboard-app/routes/get-route.map.tsx +64 -12
- package/src/hooks/api/index.ts +1 -0
- package/src/hooks/api/product-options.tsx +151 -0
- package/src/hooks/api/products.tsx +26 -66
- 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 +171 -4
- package/src/i18n/translations/en.json +49 -3
- 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 +192 -0
- package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-organize.tsx +77 -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 +81 -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 +74 -0
- package/src/routes/product-options/product-option-detail/index.ts +3 -0
- package/src/routes/product-options/product-option-detail/loader.ts +17 -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 +220 -198
- 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 +31 -49
- 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 +284 -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/dist/product-create-option-GAEPSU6J.mjs +0 -145
- package/dist/product-edit-option-VIU3ZICO.mjs +0 -150
- 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 -26
- 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 -32
- package/dist/{chunk-ACJ3PPQJ.mjs → chunk-2QH2TBJ2.mjs} +3 -3
- package/dist/{customer-group-add-customers-QU4Q56SS.mjs → customer-group-add-customers-2Y2GVCDV.mjs} +3 -3
- package/dist/{customer-list-ZXCGIXJC.mjs → customer-list-TG4D4QOT.mjs} +3 -3
- package/dist/{location-list-OYBI7EGV.mjs → location-list-ZJMZZ6T3.mjs} +1 -1
- package/dist/{product-type-list-QX7QC6RI.mjs → product-type-list-7WQ5D2KV.mjs} +3 -3
- package/dist/{region-list-XQRIBDMF.mjs → region-list-JAQXIBYD.mjs} +3 -3
- package/dist/{return-reason-list-VYLLXDG4.mjs → return-reason-list-ATE2XU4H.mjs} +3 -3
- package/dist/{user-list-6KATHOTJ.mjs → user-list-KPI3BTOA.mjs} +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ordersQueryKeys
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3ZJ55SFA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
reservationItemsQueryKeys
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MOGV3UZD.mjs";
|
|
7
7
|
import {
|
|
8
8
|
inventoryItemsQueryKeys
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QW4SQVMT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
queryClient
|
|
12
12
|
} from "./chunk-FXYH54JP.mjs";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDateTableFilters
|
|
3
3
|
} from "./chunk-W7625H47.mjs";
|
|
4
|
+
import {
|
|
5
|
+
useDataTableDateFilters
|
|
6
|
+
} from "./chunk-2GWGNMAA.mjs";
|
|
4
7
|
|
|
5
8
|
// src/hooks/table/filters/use-collection-table-filters.tsx
|
|
6
9
|
var useCollectionTableFilters = () => {
|
|
@@ -8,6 +11,36 @@ var useCollectionTableFilters = () => {
|
|
|
8
11
|
return dateFilters;
|
|
9
12
|
};
|
|
10
13
|
|
|
14
|
+
// src/hooks/table/filters/use-product-option-table-filters.tsx
|
|
15
|
+
import { useTranslation } from "react-i18next";
|
|
16
|
+
import { createDataTableFilterHelper } from "@medusajs/ui";
|
|
17
|
+
import { useMemo } from "react";
|
|
18
|
+
var filterHelper = createDataTableFilterHelper();
|
|
19
|
+
var useProductOptionTableFilters = () => {
|
|
20
|
+
const { t } = useTranslation();
|
|
21
|
+
const dateFilters = useDataTableDateFilters();
|
|
22
|
+
return useMemo(
|
|
23
|
+
() => [
|
|
24
|
+
filterHelper.accessor("is_exclusive", {
|
|
25
|
+
label: t("fields.type"),
|
|
26
|
+
type: "radio",
|
|
27
|
+
options: [
|
|
28
|
+
{
|
|
29
|
+
label: t("general.exclusive"),
|
|
30
|
+
value: "true"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: t("general.global"),
|
|
34
|
+
value: "false"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}),
|
|
38
|
+
...dateFilters
|
|
39
|
+
],
|
|
40
|
+
[dateFilters, t]
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
11
44
|
// src/hooks/table/filters/use-product-tag-table-filters.tsx
|
|
12
45
|
var useProductTagTableFilters = () => {
|
|
13
46
|
const dateFilters = useDateTableFilters();
|
|
@@ -15,9 +48,9 @@ var useProductTagTableFilters = () => {
|
|
|
15
48
|
};
|
|
16
49
|
|
|
17
50
|
// src/hooks/table/filters/use-shipping-option-table-filters.tsx
|
|
18
|
-
import { useTranslation } from "react-i18next";
|
|
51
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
19
52
|
var useShippingOptionTableFilters = (locations) => {
|
|
20
|
-
const { t } =
|
|
53
|
+
const { t } = useTranslation2();
|
|
21
54
|
const locationFilter = {
|
|
22
55
|
key: "stock_location_id",
|
|
23
56
|
label: t("fields.location"),
|
|
@@ -37,10 +70,11 @@ var useShippingOptionTableFilters = (locations) => {
|
|
|
37
70
|
};
|
|
38
71
|
|
|
39
72
|
// src/hooks/table/filters/use-tax-rate-table-filters.tsx
|
|
40
|
-
import { useTranslation as
|
|
73
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
41
74
|
|
|
42
75
|
export {
|
|
43
76
|
useCollectionTableFilters,
|
|
77
|
+
useProductOptionTableFilters,
|
|
44
78
|
useProductTagTableFilters,
|
|
45
79
|
useShippingOptionTableFilters
|
|
46
80
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DISPLAY_OVERRIDE_ITEMS_LIMIT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HEYM67GY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
TaxRateRuleReferenceType
|
|
6
|
+
} from "./chunk-35G7IXTE.mjs";
|
|
4
7
|
import {
|
|
5
8
|
LocalizedTablePagination,
|
|
6
9
|
useDeleteTaxRateAction
|
|
7
10
|
} from "./chunk-UM4OIJZ3.mjs";
|
|
8
|
-
import {
|
|
9
|
-
TaxRateRuleReferenceType
|
|
10
|
-
} from "./chunk-UHIPGDJZ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
formatPercentage
|
|
13
13
|
} from "./chunk-4FM6S5CX.mjs";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-HBXV7ENS.mjs";
|
|
36
36
|
import {
|
|
37
37
|
useProducts
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-QW4SQVMT.mjs";
|
|
39
39
|
|
|
40
40
|
// src/routes/tax-regions/common/components/tax-rate-line/tax-rate-line.tsx
|
|
41
41
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CreateCampaignFormFields
|
|
3
|
+
} from "./chunk-67RC6SEX.mjs";
|
|
1
4
|
import {
|
|
2
5
|
VisuallyHidden
|
|
3
6
|
} from "./chunk-F6ZOHZVB.mjs";
|
|
4
|
-
import {
|
|
5
|
-
CreateCampaignFormFields
|
|
6
|
-
} from "./chunk-5LGRZSEH.mjs";
|
|
7
7
|
import {
|
|
8
8
|
KeyboundForm
|
|
9
9
|
} from "./chunk-6HTZNHPT.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CreateCampaignFormFields
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-67RC6SEX.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useComboboxData
|
|
6
6
|
} from "./chunk-3TZOFKX2.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Combobox
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5AM254NB.mjs";
|
|
10
10
|
import {
|
|
11
11
|
KeyboundForm
|
|
12
12
|
} from "./chunk-6HTZNHPT.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTags
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NTYLG6Y3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useProductTypes
|
|
6
6
|
} from "./chunk-HKIF5HVL.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useSalesChannels
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FNQ227BC.mjs";
|
|
10
10
|
|
|
11
11
|
// src/hooks/table/filters/use-product-table-filters.tsx
|
|
12
12
|
import { useTranslation } from "react-i18next";
|
|
@@ -9,69 +9,107 @@ import {
|
|
|
9
9
|
} from "./chunk-NFEK63OE.mjs";
|
|
10
10
|
|
|
11
11
|
// src/hooks/api/inventory.tsx
|
|
12
|
+
import {
|
|
13
|
+
useMutation as useMutation3,
|
|
14
|
+
useQuery as useQuery3
|
|
15
|
+
} from "@tanstack/react-query";
|
|
16
|
+
|
|
17
|
+
// src/hooks/api/products.tsx
|
|
12
18
|
import {
|
|
13
19
|
useMutation as useMutation2,
|
|
14
20
|
useQuery as useQuery2
|
|
15
21
|
} from "@tanstack/react-query";
|
|
16
22
|
|
|
17
|
-
// src/hooks/api/
|
|
23
|
+
// src/hooks/api/product-options.tsx
|
|
18
24
|
import {
|
|
19
25
|
useMutation,
|
|
20
26
|
useQuery
|
|
21
27
|
} from "@tanstack/react-query";
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
var PRODUCT_OPTIONS_QUERY_KEY = "product_options";
|
|
29
|
+
var productOptionsQueryKeys = queryKeysFactory(
|
|
30
|
+
PRODUCT_OPTIONS_QUERY_KEY
|
|
31
|
+
);
|
|
32
|
+
var useProductOption = (id, query, options) => {
|
|
33
|
+
const { data, ...rest } = useQuery({
|
|
34
|
+
queryKey: productOptionsQueryKeys.detail(id, query),
|
|
35
|
+
queryFn: () => sdk.admin.productOption.retrieve(id, query),
|
|
36
|
+
...options
|
|
37
|
+
});
|
|
38
|
+
return { ...data, ...rest };
|
|
39
|
+
};
|
|
40
|
+
var useProductOptions = (query, options) => {
|
|
41
|
+
const { data, ...rest } = useQuery({
|
|
42
|
+
queryFn: () => sdk.admin.productOption.list(query),
|
|
43
|
+
queryKey: productOptionsQueryKeys.list(query),
|
|
44
|
+
...options
|
|
45
|
+
});
|
|
46
|
+
return { ...data, ...rest };
|
|
47
|
+
};
|
|
48
|
+
var useCreateProductOption = (options) => {
|
|
29
49
|
return useMutation({
|
|
30
|
-
mutationFn: (payload) => sdk.admin.
|
|
50
|
+
mutationFn: (payload) => sdk.admin.productOption.create(payload),
|
|
31
51
|
onSuccess: (data, variables, context) => {
|
|
32
|
-
queryClient.invalidateQueries({ queryKey: optionsQueryKeys.lists() });
|
|
33
52
|
queryClient.invalidateQueries({
|
|
34
|
-
queryKey:
|
|
53
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
35
54
|
});
|
|
36
55
|
options?.onSuccess?.(data, variables, context);
|
|
37
56
|
},
|
|
38
57
|
...options
|
|
39
58
|
});
|
|
40
59
|
};
|
|
41
|
-
var useUpdateProductOption = (
|
|
60
|
+
var useUpdateProductOption = (id, options) => {
|
|
42
61
|
return useMutation({
|
|
43
|
-
mutationFn: (payload) => sdk.admin.
|
|
62
|
+
mutationFn: (payload) => sdk.admin.productOption.update(id, payload),
|
|
44
63
|
onSuccess: (data, variables, context) => {
|
|
45
|
-
queryClient.invalidateQueries({ queryKey: optionsQueryKeys.lists() });
|
|
46
64
|
queryClient.invalidateQueries({
|
|
47
|
-
queryKey:
|
|
65
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
48
66
|
});
|
|
49
67
|
queryClient.invalidateQueries({
|
|
50
|
-
queryKey:
|
|
68
|
+
queryKey: productOptionsQueryKeys.detail(id)
|
|
51
69
|
});
|
|
52
70
|
options?.onSuccess?.(data, variables, context);
|
|
53
71
|
},
|
|
54
72
|
...options
|
|
55
73
|
});
|
|
56
74
|
};
|
|
57
|
-
var useDeleteProductOption = (
|
|
75
|
+
var useDeleteProductOption = (id, options) => {
|
|
58
76
|
return useMutation({
|
|
59
|
-
mutationFn: () => sdk.admin.
|
|
77
|
+
mutationFn: () => sdk.admin.productOption.delete(id),
|
|
60
78
|
onSuccess: (data, variables, context) => {
|
|
61
|
-
queryClient.invalidateQueries({ queryKey: optionsQueryKeys.lists() });
|
|
62
79
|
queryClient.invalidateQueries({
|
|
63
|
-
queryKey:
|
|
80
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
64
81
|
});
|
|
65
82
|
queryClient.invalidateQueries({
|
|
66
|
-
queryKey:
|
|
83
|
+
queryKey: productOptionsQueryKeys.detail(id)
|
|
67
84
|
});
|
|
68
85
|
options?.onSuccess?.(data, variables, context);
|
|
69
86
|
},
|
|
70
87
|
...options
|
|
71
88
|
});
|
|
72
89
|
};
|
|
90
|
+
var useDeleteProductOptionLazy = (options) => {
|
|
91
|
+
return useMutation({
|
|
92
|
+
mutationFn: (id) => sdk.admin.productOption.delete(id),
|
|
93
|
+
onSuccess: (data, variables, context) => {
|
|
94
|
+
queryClient.invalidateQueries({
|
|
95
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
96
|
+
});
|
|
97
|
+
queryClient.invalidateQueries({
|
|
98
|
+
queryKey: productOptionsQueryKeys.details()
|
|
99
|
+
});
|
|
100
|
+
options?.onSuccess?.(data, variables, context);
|
|
101
|
+
},
|
|
102
|
+
...options
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// src/hooks/api/products.tsx
|
|
107
|
+
var PRODUCTS_QUERY_KEY = "products";
|
|
108
|
+
var productsQueryKeys = queryKeysFactory(PRODUCTS_QUERY_KEY);
|
|
109
|
+
var VARIANTS_QUERY_KEY = "product_variants";
|
|
110
|
+
var variantsQueryKeys = queryKeysFactory(VARIANTS_QUERY_KEY);
|
|
73
111
|
var useProductVariant = (productId, variantId, query, options) => {
|
|
74
|
-
const { data, ...rest } =
|
|
112
|
+
const { data, ...rest } = useQuery2({
|
|
75
113
|
queryFn: () => sdk.admin.product.retrieveVariant(productId, variantId, query),
|
|
76
114
|
queryKey: variantsQueryKeys.detail(variantId, query),
|
|
77
115
|
...options
|
|
@@ -79,7 +117,7 @@ var useProductVariant = (productId, variantId, query, options) => {
|
|
|
79
117
|
return { ...data, ...rest };
|
|
80
118
|
};
|
|
81
119
|
var useProductVariants = (productId, query, options) => {
|
|
82
|
-
const { data, ...rest } =
|
|
120
|
+
const { data, ...rest } = useQuery2({
|
|
83
121
|
queryFn: () => sdk.admin.product.listVariants(productId, query),
|
|
84
122
|
queryKey: variantsQueryKeys.list({ productId, ...query }),
|
|
85
123
|
...options
|
|
@@ -87,7 +125,7 @@ var useProductVariants = (productId, query, options) => {
|
|
|
87
125
|
return { ...data, ...rest };
|
|
88
126
|
};
|
|
89
127
|
var useCreateProductVariant = (productId, options) => {
|
|
90
|
-
return
|
|
128
|
+
return useMutation2({
|
|
91
129
|
mutationFn: (payload) => sdk.admin.product.createVariant(productId, payload),
|
|
92
130
|
onSuccess: (data, variables, context) => {
|
|
93
131
|
queryClient.invalidateQueries({ queryKey: variantsQueryKeys.lists() });
|
|
@@ -100,7 +138,7 @@ var useCreateProductVariant = (productId, options) => {
|
|
|
100
138
|
});
|
|
101
139
|
};
|
|
102
140
|
var useUpdateProductVariant = (productId, variantId, options) => {
|
|
103
|
-
return
|
|
141
|
+
return useMutation2({
|
|
104
142
|
mutationFn: (payload) => sdk.admin.product.updateVariant(productId, variantId, payload),
|
|
105
143
|
onSuccess: (data, variables, context) => {
|
|
106
144
|
queryClient.invalidateQueries({ queryKey: variantsQueryKeys.lists() });
|
|
@@ -116,7 +154,7 @@ var useUpdateProductVariant = (productId, variantId, options) => {
|
|
|
116
154
|
});
|
|
117
155
|
};
|
|
118
156
|
var useUpdateProductVariantsBatch = (productId, options) => {
|
|
119
|
-
return
|
|
157
|
+
return useMutation2({
|
|
120
158
|
mutationFn: (payload) => sdk.admin.product.batchVariants(productId, {
|
|
121
159
|
update: payload
|
|
122
160
|
}),
|
|
@@ -132,7 +170,7 @@ var useUpdateProductVariantsBatch = (productId, options) => {
|
|
|
132
170
|
});
|
|
133
171
|
};
|
|
134
172
|
var useProductVariantsInventoryItemsBatch = (productId, options) => {
|
|
135
|
-
return
|
|
173
|
+
return useMutation2({
|
|
136
174
|
mutationFn: (payload) => sdk.admin.product.batchVariantInventoryItems(productId, payload),
|
|
137
175
|
onSuccess: (data, variables, context) => {
|
|
138
176
|
queryClient.invalidateQueries({ queryKey: variantsQueryKeys.lists() });
|
|
@@ -146,7 +184,7 @@ var useProductVariantsInventoryItemsBatch = (productId, options) => {
|
|
|
146
184
|
});
|
|
147
185
|
};
|
|
148
186
|
var useDeleteVariant = (productId, variantId, options) => {
|
|
149
|
-
return
|
|
187
|
+
return useMutation2({
|
|
150
188
|
mutationFn: () => sdk.admin.product.deleteVariant(productId, variantId),
|
|
151
189
|
onSuccess: (data, variables, context) => {
|
|
152
190
|
queryClient.invalidateQueries({ queryKey: variantsQueryKeys.lists() });
|
|
@@ -162,7 +200,7 @@ var useDeleteVariant = (productId, variantId, options) => {
|
|
|
162
200
|
});
|
|
163
201
|
};
|
|
164
202
|
var useDeleteVariantLazy = (productId, options) => {
|
|
165
|
-
return
|
|
203
|
+
return useMutation2({
|
|
166
204
|
mutationFn: ({ variantId }) => sdk.admin.product.deleteVariant(productId, variantId),
|
|
167
205
|
onSuccess: (data, variables, context) => {
|
|
168
206
|
queryClient.invalidateQueries({ queryKey: variantsQueryKeys.lists() });
|
|
@@ -178,7 +216,7 @@ var useDeleteVariantLazy = (productId, options) => {
|
|
|
178
216
|
});
|
|
179
217
|
};
|
|
180
218
|
var useProduct = (id, query, options) => {
|
|
181
|
-
const { data, ...rest } =
|
|
219
|
+
const { data, ...rest } = useQuery2({
|
|
182
220
|
queryFn: () => sdk.admin.product.retrieve(id, query),
|
|
183
221
|
queryKey: productsQueryKeys.detail(id, query),
|
|
184
222
|
...options
|
|
@@ -186,7 +224,7 @@ var useProduct = (id, query, options) => {
|
|
|
186
224
|
return { ...data, ...rest };
|
|
187
225
|
};
|
|
188
226
|
var useProducts = (query, options) => {
|
|
189
|
-
const { data, ...rest } =
|
|
227
|
+
const { data, ...rest } = useQuery2({
|
|
190
228
|
queryFn: () => sdk.admin.product.list(query),
|
|
191
229
|
queryKey: productsQueryKeys.list(query),
|
|
192
230
|
...options
|
|
@@ -194,7 +232,7 @@ var useProducts = (query, options) => {
|
|
|
194
232
|
return { ...data, ...rest };
|
|
195
233
|
};
|
|
196
234
|
var useCreateProduct = (options) => {
|
|
197
|
-
return
|
|
235
|
+
return useMutation2({
|
|
198
236
|
mutationFn: (payload) => sdk.admin.product.create(payload),
|
|
199
237
|
onSuccess: (data, variables, context) => {
|
|
200
238
|
queryClient.invalidateQueries({ queryKey: productsQueryKeys.lists() });
|
|
@@ -207,7 +245,7 @@ var useCreateProduct = (options) => {
|
|
|
207
245
|
});
|
|
208
246
|
};
|
|
209
247
|
var useUpdateProduct = (id, options) => {
|
|
210
|
-
return
|
|
248
|
+
return useMutation2({
|
|
211
249
|
mutationFn: (payload) => sdk.admin.product.update(id, payload),
|
|
212
250
|
onSuccess: async (data, variables, context) => {
|
|
213
251
|
await queryClient.invalidateQueries({
|
|
@@ -222,7 +260,7 @@ var useUpdateProduct = (id, options) => {
|
|
|
222
260
|
});
|
|
223
261
|
};
|
|
224
262
|
var useDeleteProduct = (id, options) => {
|
|
225
|
-
return
|
|
263
|
+
return useMutation2({
|
|
226
264
|
mutationFn: () => sdk.admin.product.delete(id),
|
|
227
265
|
onSuccess: (data, variables, context) => {
|
|
228
266
|
queryClient.invalidateQueries({ queryKey: productsQueryKeys.lists() });
|
|
@@ -232,8 +270,24 @@ var useDeleteProduct = (id, options) => {
|
|
|
232
270
|
...options
|
|
233
271
|
});
|
|
234
272
|
};
|
|
273
|
+
var useLinkProductOptions = (productId, options) => {
|
|
274
|
+
return useMutation2({
|
|
275
|
+
mutationFn: (payload) => sdk.admin.product.linkOptions(productId, payload),
|
|
276
|
+
onSuccess: (data, variables, context) => {
|
|
277
|
+
queryClient.invalidateQueries({ queryKey: productsQueryKeys.lists() });
|
|
278
|
+
queryClient.invalidateQueries({
|
|
279
|
+
queryKey: productsQueryKeys.detail(productId)
|
|
280
|
+
});
|
|
281
|
+
queryClient.invalidateQueries({
|
|
282
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
283
|
+
});
|
|
284
|
+
options?.onSuccess?.(data, variables, context);
|
|
285
|
+
},
|
|
286
|
+
...options
|
|
287
|
+
});
|
|
288
|
+
};
|
|
235
289
|
var useExportProducts = (query, options) => {
|
|
236
|
-
return
|
|
290
|
+
return useMutation2({
|
|
237
291
|
mutationFn: (payload) => sdk.admin.product.export(payload, query),
|
|
238
292
|
onSuccess: (data, variables, context) => {
|
|
239
293
|
options?.onSuccess?.(data, variables, context);
|
|
@@ -242,7 +296,7 @@ var useExportProducts = (query, options) => {
|
|
|
242
296
|
});
|
|
243
297
|
};
|
|
244
298
|
var useImportProducts = (options) => {
|
|
245
|
-
return
|
|
299
|
+
return useMutation2({
|
|
246
300
|
mutationFn: (payload) => sdk.admin.product.createImport(payload),
|
|
247
301
|
onSuccess: (data, variables, context) => {
|
|
248
302
|
options?.onSuccess?.(data, variables, context);
|
|
@@ -251,7 +305,7 @@ var useImportProducts = (options) => {
|
|
|
251
305
|
});
|
|
252
306
|
};
|
|
253
307
|
var useConfirmImportProducts = (options) => {
|
|
254
|
-
return
|
|
308
|
+
return useMutation2({
|
|
255
309
|
mutationFn: (payload) => sdk.admin.product.confirmImport(payload),
|
|
256
310
|
onSuccess: (data, variables, context) => {
|
|
257
311
|
options?.onSuccess?.(data, variables, context);
|
|
@@ -260,7 +314,7 @@ var useConfirmImportProducts = (options) => {
|
|
|
260
314
|
});
|
|
261
315
|
};
|
|
262
316
|
var useBatchImageVariants = (productId, imageId, options) => {
|
|
263
|
-
return
|
|
317
|
+
return useMutation2({
|
|
264
318
|
mutationFn: (payload) => sdk.admin.product.batchImageVariants(productId, imageId, payload),
|
|
265
319
|
onSuccess: (data, variables, context) => {
|
|
266
320
|
queryClient.invalidateQueries({
|
|
@@ -274,7 +328,7 @@ var useBatchImageVariants = (productId, imageId, options) => {
|
|
|
274
328
|
});
|
|
275
329
|
};
|
|
276
330
|
var useBatchVariantImages = (productId, variantId, options) => {
|
|
277
|
-
return
|
|
331
|
+
return useMutation2({
|
|
278
332
|
mutationFn: (payload) => sdk.admin.product.batchVariantImages(productId, variantId, payload),
|
|
279
333
|
onSuccess: (data, variables, context) => {
|
|
280
334
|
queryClient.invalidateQueries({
|
|
@@ -302,7 +356,7 @@ var inventoryItemLevelsQueryKeys = queryKeysFactory(
|
|
|
302
356
|
INVENTORY_ITEM_LEVELS_QUERY_KEY
|
|
303
357
|
);
|
|
304
358
|
var useInventoryItems = (query, options) => {
|
|
305
|
-
const { data, ...rest } =
|
|
359
|
+
const { data, ...rest } = useQuery3({
|
|
306
360
|
queryFn: () => sdk.admin.inventoryItem.list(query),
|
|
307
361
|
queryKey: inventoryItemsQueryKeys.list(query),
|
|
308
362
|
...options
|
|
@@ -310,7 +364,7 @@ var useInventoryItems = (query, options) => {
|
|
|
310
364
|
return { ...data, ...rest };
|
|
311
365
|
};
|
|
312
366
|
var useInventoryItem = (id, query, options) => {
|
|
313
|
-
const { data, ...rest } =
|
|
367
|
+
const { data, ...rest } = useQuery3({
|
|
314
368
|
queryFn: () => sdk.admin.inventoryItem.retrieve(id, query),
|
|
315
369
|
queryKey: inventoryItemsQueryKeys.detail(id),
|
|
316
370
|
...options
|
|
@@ -318,7 +372,7 @@ var useInventoryItem = (id, query, options) => {
|
|
|
318
372
|
return { ...data, ...rest };
|
|
319
373
|
};
|
|
320
374
|
var useCreateInventoryItem = (options) => {
|
|
321
|
-
return
|
|
375
|
+
return useMutation3({
|
|
322
376
|
mutationFn: (payload) => sdk.admin.inventoryItem.create(payload),
|
|
323
377
|
onSuccess: (data, variables, context) => {
|
|
324
378
|
queryClient.invalidateQueries({
|
|
@@ -330,7 +384,7 @@ var useCreateInventoryItem = (options) => {
|
|
|
330
384
|
});
|
|
331
385
|
};
|
|
332
386
|
var useUpdateInventoryItem = (id, options) => {
|
|
333
|
-
return
|
|
387
|
+
return useMutation3({
|
|
334
388
|
mutationFn: (payload) => sdk.admin.inventoryItem.update(id, payload),
|
|
335
389
|
onSuccess: (data, variables, context) => {
|
|
336
390
|
queryClient.invalidateQueries({
|
|
@@ -345,7 +399,7 @@ var useUpdateInventoryItem = (id, options) => {
|
|
|
345
399
|
});
|
|
346
400
|
};
|
|
347
401
|
var useDeleteInventoryItem = (id, options) => {
|
|
348
|
-
return
|
|
402
|
+
return useMutation3({
|
|
349
403
|
mutationFn: () => sdk.admin.inventoryItem.delete(id),
|
|
350
404
|
onSuccess: (data, variables, context) => {
|
|
351
405
|
queryClient.invalidateQueries({
|
|
@@ -360,7 +414,7 @@ var useDeleteInventoryItem = (id, options) => {
|
|
|
360
414
|
});
|
|
361
415
|
};
|
|
362
416
|
var useInventoryItemLevels = (inventoryItemId, query, options) => {
|
|
363
|
-
const { data, ...rest } =
|
|
417
|
+
const { data, ...rest } = useQuery3({
|
|
364
418
|
queryFn: () => sdk.admin.inventoryItem.listLevels(inventoryItemId, query),
|
|
365
419
|
queryKey: inventoryItemLevelsQueryKeys.list({
|
|
366
420
|
...query || {},
|
|
@@ -371,7 +425,7 @@ var useInventoryItemLevels = (inventoryItemId, query, options) => {
|
|
|
371
425
|
return { ...data, ...rest };
|
|
372
426
|
};
|
|
373
427
|
var useUpdateInventoryLevel = (inventoryItemId, locationId, options) => {
|
|
374
|
-
return
|
|
428
|
+
return useMutation3({
|
|
375
429
|
mutationFn: (payload) => sdk.admin.inventoryItem.updateLevel(inventoryItemId, locationId, payload),
|
|
376
430
|
onSuccess: (data, variables, context) => {
|
|
377
431
|
queryClient.invalidateQueries({
|
|
@@ -392,7 +446,7 @@ var useUpdateInventoryLevel = (inventoryItemId, locationId, options) => {
|
|
|
392
446
|
});
|
|
393
447
|
};
|
|
394
448
|
var useBatchInventoryItemLocationLevels = (inventoryItemId, options) => {
|
|
395
|
-
return
|
|
449
|
+
return useMutation3({
|
|
396
450
|
mutationFn: (payload) => sdk.admin.inventoryItem.batchInventoryItemLocationLevels(
|
|
397
451
|
inventoryItemId,
|
|
398
452
|
payload
|
|
@@ -416,7 +470,7 @@ var useBatchInventoryItemLocationLevels = (inventoryItemId, options) => {
|
|
|
416
470
|
});
|
|
417
471
|
};
|
|
418
472
|
var useBatchInventoryItemsLocationLevels = (options) => {
|
|
419
|
-
return
|
|
473
|
+
return useMutation3({
|
|
420
474
|
mutationFn: (payload) => sdk.admin.inventoryItem.batchInventoryItemsLocationLevels(payload),
|
|
421
475
|
onSuccess: (data, variables, context) => {
|
|
422
476
|
queryClient.invalidateQueries({
|
|
@@ -443,11 +497,15 @@ export {
|
|
|
443
497
|
useUpdateInventoryLevel,
|
|
444
498
|
useBatchInventoryItemLocationLevels,
|
|
445
499
|
useBatchInventoryItemsLocationLevels,
|
|
446
|
-
|
|
447
|
-
|
|
500
|
+
productOptionsQueryKeys,
|
|
501
|
+
useProductOption,
|
|
502
|
+
useProductOptions,
|
|
448
503
|
useCreateProductOption,
|
|
449
504
|
useUpdateProductOption,
|
|
450
505
|
useDeleteProductOption,
|
|
506
|
+
useDeleteProductOptionLazy,
|
|
507
|
+
productsQueryKeys,
|
|
508
|
+
variantsQueryKeys,
|
|
451
509
|
useProductVariant,
|
|
452
510
|
useProductVariants,
|
|
453
511
|
useCreateProductVariant,
|
|
@@ -461,6 +519,7 @@ export {
|
|
|
461
519
|
useCreateProduct,
|
|
462
520
|
useUpdateProduct,
|
|
463
521
|
useDeleteProduct,
|
|
522
|
+
useLinkProductOptions,
|
|
464
523
|
useExportProducts,
|
|
465
524
|
useImportProducts,
|
|
466
525
|
useConfirmImportProducts,
|