@medusajs/dashboard 3.0.0-snapshot-20251104011621 → 3.0.0-snapshot-20251106181920
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-7EWRE2HD.mjs → adjust-inventory-MEJEPP4Y.mjs} +1 -1
- package/dist/{api-key-management-create-SPLD3JMO.mjs → api-key-management-create-4OZWVOSF.mjs} +3 -3
- package/dist/{api-key-management-detail-MFQTHUN6.mjs → api-key-management-detail-K3A3T6ET.mjs} +13 -13
- package/dist/{api-key-management-edit-2VPL7PHB.mjs → api-key-management-edit-FYLVVQOA.mjs} +3 -3
- package/dist/{api-key-management-list-22GXXJUC.mjs → api-key-management-list-6YG52LWY.mjs} +3 -3
- package/dist/{api-key-management-sales-channels-MV6FMA4C.mjs → api-key-management-sales-channels-S5IFH7LP.mjs} +4 -4
- package/dist/app.css +3 -3
- package/dist/app.js +16852 -15621
- package/dist/app.mjs +12 -12
- package/dist/{campaign-create-GD2D45NX.mjs → campaign-create-NEKUWDGF.mjs} +2 -2
- package/dist/{campaign-detail-IKHUALTL.mjs → campaign-detail-2H2W4W5B.mjs} +10 -10
- package/dist/{categories-metadata-2HM7G27P.mjs → categories-metadata-ZEYU33GV.mjs} +10 -10
- package/dist/{category-create-BC2VUVKO.mjs → category-create-N7PP3GWU.mjs} +5 -5
- package/dist/{category-detail-D4PYJJGJ.mjs → category-detail-DKY37LPO.mjs} +14 -14
- package/dist/{category-edit-U5Y5KJ2Y.mjs → category-edit-IFDQP7EZ.mjs} +2 -2
- package/dist/{category-list-MLLB5U6K.mjs → category-list-2M4BCRAL.mjs} +5 -5
- package/dist/{category-organize-4NXFDN2I.mjs → category-organize-76I7PO24.mjs} +2 -2
- package/dist/{category-products-K5INZSSV.mjs → category-products-VVRGW25X.mjs} +13 -13
- package/dist/{chunk-XXROCJ7D.mjs → chunk-227DWSFF.mjs} +15 -15
- package/dist/{chunk-IKXQEHLS.mjs → chunk-3G33PZVQ.mjs} +1 -1
- package/dist/{chunk-ULQ3V4CC.mjs → chunk-3MPO56OL.mjs} +2 -2
- package/dist/{chunk-MQALAB34.mjs → chunk-7PWZ5GMG.mjs} +1 -1
- package/dist/{chunk-PYIPIUAY.mjs → chunk-ET6EGRW3.mjs} +332 -241
- package/dist/{chunk-6IXLTZ2H.mjs → chunk-FA5QNPXE.mjs} +2 -2
- package/dist/{chunk-IXZVR3HG.mjs → chunk-GBKLLUUX.mjs} +1 -1
- package/dist/{chunk-ALKTJGWS.mjs → chunk-GI6XX5VU.mjs} +2 -2
- package/dist/{chunk-4BGVSXZZ.mjs → chunk-GVPJPLE2.mjs} +15 -48
- package/dist/{chunk-6XWHQ6ON.mjs → chunk-GVVAVAXG.mjs} +1 -1
- package/dist/{chunk-3DO2JGVG.mjs → chunk-HGFZAXHD.mjs} +1 -1
- package/dist/{chunk-3C6WQ7NH.mjs → chunk-IBSMG7AF.mjs} +37 -3
- package/dist/{chunk-EQKJ5FSL.mjs → chunk-JAXWGF4M.mjs} +1 -1
- package/dist/{chunk-LEKWKUIS.mjs → chunk-JC75WAC7.mjs} +3 -3
- package/dist/{chunk-ZUUKLYH4.mjs → chunk-JDA2MYND.mjs} +1 -1
- package/dist/{chunk-LOAL44PP.mjs → chunk-JDEH6Z4M.mjs} +1 -1
- package/dist/{chunk-2O43G3RH.mjs → chunk-LYTIMAIZ.mjs} +1 -1
- package/dist/{chunk-OGAZYXOV.mjs → chunk-NGR5XU3K.mjs} +1 -1
- package/dist/{chunk-3JJBLFYN.mjs → chunk-OI4W5AEL.mjs} +6 -2
- package/dist/{chunk-XYHXWLTJ.mjs → chunk-P5RVJWPK.mjs} +1 -1
- package/dist/{chunk-WTK7SR6S.mjs → chunk-SBFWPL42.mjs} +2 -2
- package/dist/{chunk-NDXL7ZT5.mjs → chunk-TNMXAPPT.mjs} +1 -1
- package/dist/{chunk-TUCPFNIY.mjs → chunk-UTVAHVAY.mjs} +5 -5
- package/dist/{chunk-KXRW6JRE.mjs → chunk-WOFUOGLO.mjs} +123 -33
- package/dist/{chunk-N4N4KGET.mjs → chunk-WWQZD7WM.mjs} +1 -1
- package/dist/{chunk-R2QF6AQX.mjs → chunk-Y6ZQFV7H.mjs} +1 -1
- package/dist/{chunk-VLOA5XAC.mjs → chunk-YCDDT44O.mjs} +8 -4
- package/dist/{chunk-YL4UEHO3.mjs → chunk-YSQG2JDM.mjs} +1 -1
- package/dist/chunk-ZHH3W7CN.mjs +171 -0
- package/dist/{collection-add-products-TWIDVZMU.mjs → collection-add-products-QCSFXELK.mjs} +14 -14
- package/dist/{collection-create-CUZFWEOB.mjs → collection-create-45RYGDW7.mjs} +2 -2
- package/dist/{collection-detail-B33WPVIW.mjs → collection-detail-OLC6DMBZ.mjs} +14 -14
- package/dist/{collection-edit-22I7EEJG.mjs → collection-edit-YBPBHLLZ.mjs} +2 -2
- package/dist/{collection-list-DAW7WOX5.mjs → collection-list-6UJNE2QB.mjs} +24 -23
- package/dist/{collection-metadata-ZUFYY4OU.mjs → collection-metadata-QG55V5ZM.mjs} +11 -11
- package/dist/{customer-detail-ATJGSJTH.mjs → customer-detail-XOCZDUJL.mjs} +14 -14
- package/dist/{customer-group-detail-OVZIWNPP.mjs → customer-group-detail-EWSDTVTQ.mjs} +13 -13
- package/dist/{customer-group-list-SADXXHAE.mjs → customer-group-list-NFXAELFY.mjs} +13 -13
- package/dist/{customers-add-customer-group-XNPZ47LK.mjs → customers-add-customer-group-EYZMFVBS.mjs} +13 -13
- package/dist/{edit-inventory-item-5RPZHCM7.mjs → edit-inventory-item-TFJL5H5X.mjs} +1 -1
- package/dist/{edit-inventory-item-attributes-R73ZTBYG.mjs → edit-inventory-item-attributes-O3K7OB56.mjs} +1 -1
- package/dist/{edit-reservation-WMLAFMYU.mjs → edit-reservation-Z5TFZERY.mjs} +2 -2
- package/dist/{edit-rules-KV43O773.mjs → edit-rules-IE77WUXD.mjs} +10 -10
- package/dist/en.json +51 -4
- package/dist/{inventory-create-NW5WSPBV.mjs → inventory-create-HQ5XLKOJ.mjs} +10 -10
- package/dist/{inventory-detail-I2CNJC6Y.mjs → inventory-detail-DAINM7WP.mjs} +10 -10
- package/dist/{inventory-list-I7IXI4KC.mjs → inventory-list-5ROSUTXF.mjs} +1 -1
- package/dist/{inventory-metadata-7XR4ON7G.mjs → inventory-metadata-HUL56OD2.mjs} +10 -10
- package/dist/{inventory-stock-VTIDGTOY.mjs → inventory-stock-5VIUWKTQ.mjs} +10 -10
- package/dist/{location-detail-WZM4EXFM.mjs → location-detail-QMLCFID5.mjs} +15 -15
- package/dist/{location-fulfillment-providers-F7MMM5KC.mjs → location-fulfillment-providers-NAFFMP3P.mjs} +15 -14
- package/dist/{location-sales-channels-J3V26P3Q.mjs → location-sales-channels-D37LXTKQ.mjs} +3 -3
- package/dist/{location-service-zone-shipping-option-create-F3EQW67U.mjs → location-service-zone-shipping-option-create-VM4TEJHY.mjs} +10 -10
- package/dist/{login-VZALGB6R.mjs → login-MTGOV7KC.mjs} +10 -10
- package/dist/{manage-locations-ZRCDYW5V.mjs → manage-locations-OHDFBORX.mjs} +2 -2
- package/dist/{order-allocate-items-MZ7Y4FU4.mjs → order-allocate-items-NU65ZXHE.mjs} +3 -3
- package/dist/{order-create-claim-VFFKHCI6.mjs → order-create-claim-LTE2E75R.mjs} +16 -16
- package/dist/{order-create-edit-7TFUOMST.mjs → order-create-edit-TPU3CKUU.mjs} +11 -11
- package/dist/{order-create-exchange-CXQ5ZM3Q.mjs → order-create-exchange-FVSBZI7P.mjs} +22 -22
- package/dist/{order-create-fulfillment-VTICR6OE.mjs → order-create-fulfillment-NFGPDCBV.mjs} +13 -13
- package/dist/{order-create-refund-RWDVIXPV.mjs → order-create-refund-DC7C3R4Y.mjs} +15 -15
- package/dist/{order-create-return-AYWH3WMR.mjs → order-create-return-RLXYVZLO.mjs} +4 -4
- package/dist/{order-create-shipment-2KNYEHSU.mjs → order-create-shipment-RDYWCG3A.mjs} +10 -10
- package/dist/{order-detail-IFXJNVTV.mjs → order-detail-VVOZ6E2R.mjs} +31 -31
- package/dist/{order-edit-billing-address-T6BIIRAX.mjs → order-edit-billing-address-LV7453CS.mjs} +10 -10
- package/dist/{order-edit-email-SLUOGWRO.mjs → order-edit-email-4U5C6UKX.mjs} +10 -10
- package/dist/{order-edit-shipping-address-YUES5K5Q.mjs → order-edit-shipping-address-6IQC2CVP.mjs} +10 -10
- package/dist/{order-list-4N3OV2PU.mjs → order-list-INSYF52F.mjs} +5 -5
- package/dist/{order-metadata-HS33MC6S.mjs → order-metadata-EEV4IWOM.mjs} +10 -10
- package/dist/{order-receive-return-E6BGSZVL.mjs → order-receive-return-IWHR3EBF.mjs} +11 -11
- package/dist/{order-request-transfer-7IIDQ37I.mjs → order-request-transfer-65R4A7HS.mjs} +10 -10
- package/dist/{price-list-configuration-4XY4JW4I.mjs → price-list-configuration-L5XYCVP2.mjs} +4 -4
- package/dist/{price-list-create-VFQVCUWV.mjs → price-list-create-5GIMBRG2.mjs} +17 -17
- package/dist/{price-list-detail-32UKOWNW.mjs → price-list-detail-7AL2EBRL.mjs} +17 -17
- package/dist/{price-list-edit-GXDLVOU4.mjs → price-list-edit-DHG5STG4.mjs} +2 -2
- package/dist/{price-list-list-TKXSU27S.mjs → price-list-list-QQKZEFSU.mjs} +3 -3
- package/dist/{price-list-prices-add-AY75YZ7D.mjs → price-list-prices-add-2OO4QEZB.mjs} +13 -13
- package/dist/{price-list-prices-edit-J7HCNDTO.mjs → price-list-prices-edit-2FB25KWU.mjs} +2 -2
- package/dist/{product-attributes-3GCAY7KW.mjs → product-attributes-CCQ6WAOD.mjs} +13 -13
- package/dist/{product-create-4TD7FQC7.mjs → product-create-AIRCVZAE.mjs} +343 -549
- package/dist/{product-create-variant-ZWY57BX7.mjs → product-create-variant-7BD5KQHQ.mjs} +10 -10
- package/dist/{product-detail-J7T7MNUY.mjs → product-detail-IYMXYAPH.mjs} +27 -54
- package/dist/{product-edit-MJ7VAIVY.mjs → product-edit-PDGQHCQ2.mjs} +13 -13
- package/dist/{product-export-X64NQWTS.mjs → product-export-5EINLQDF.mjs} +23 -22
- package/dist/{product-image-variants-edit-J6A5G4AC.mjs → product-image-variants-edit-DDSEBG5H.mjs} +10 -10
- package/dist/{product-import-HDNC36SM.mjs → product-import-IQJWHNYN.mjs} +16 -16
- package/dist/{product-list-E7HS4SBG.mjs → product-list-PUQEGU75.mjs} +17 -17
- package/dist/{product-media-Z3NNTB7H.mjs → product-media-Q5XFYZRS.mjs} +2 -2
- package/dist/{product-metadata-LMDEXR3V.mjs → product-metadata-WCKNOZXX.mjs} +10 -10
- package/dist/product-option-create-MWFWB2SU.mjs +336 -0
- package/dist/product-option-detail-UKKEZPG7.mjs +323 -0
- package/dist/product-option-edit-NHAF7B4P.mjs +324 -0
- package/dist/product-option-list-C6ZR2WIX.mjs +266 -0
- package/dist/product-option-metadata-OWSGHNDC.mjs +71 -0
- package/dist/product-options-manage-N73G5IXY.mjs +206 -0
- package/dist/{product-organization-263TICCI.mjs → product-organization-HHME5F2C.mjs} +14 -14
- package/dist/{product-prices-MCZYVPQW.mjs → product-prices-GVEPABHQ.mjs} +1 -1
- package/dist/{product-sales-channels-RHZQXWAY.mjs → product-sales-channels-ZC5ONPG7.mjs} +3 -3
- package/dist/{product-shipping-profile-GVTR3MHD.mjs → product-shipping-profile-KXSBDGRD.mjs} +13 -13
- package/dist/{product-stock-O2BH5R45.mjs → product-stock-LXRLD7FA.mjs} +10 -10
- package/dist/{product-tag-create-GOJTE5XA.mjs → product-tag-create-RAJEWM5O.mjs} +10 -10
- package/dist/{product-tag-detail-CK5F4DU3.mjs → product-tag-detail-EOW2GMOL.mjs} +28 -27
- package/dist/{product-tag-edit-IT4GHLSO.mjs → product-tag-edit-ZOO56XMF.mjs} +10 -10
- package/dist/{product-tag-list-VNROS2W3.mjs → product-tag-list-B2UX2OHB.mjs} +26 -25
- package/dist/{product-tag-metadata-QV2BOGP2.mjs → product-tag-metadata-OZB7SVDN.mjs} +10 -10
- package/dist/{product-type-detail-7K5RLART.mjs → product-type-detail-4YZUC6ZS.mjs} +13 -13
- package/dist/{product-type-metadata-5TDBJGNQ.mjs → product-type-metadata-6QT47ZSR.mjs} +10 -10
- package/dist/{product-variant-detail-3SO2MX22.mjs → product-variant-detail-HOOYZSS2.mjs} +10 -10
- package/dist/{product-variant-edit-DW27AYBX.mjs → product-variant-edit-J2MTJA75.mjs} +10 -10
- package/dist/{product-variant-manage-inventory-items-T5OB3YX3.mjs → product-variant-manage-inventory-items-P4QUORRH.mjs} +1 -1
- package/dist/{product-variant-media-PHRCKUDK.mjs → product-variant-media-U5RG7AOW.mjs} +1 -1
- package/dist/{product-variant-metadata-4KJE6B2R.mjs → product-variant-metadata-ZRSZO2D4.mjs} +10 -10
- package/dist/{promotion-create-F27AOTVZ.mjs → promotion-create-2E4EF4SP.mjs} +15 -15
- package/dist/{promotion-detail-ZDINJASC.mjs → promotion-detail-P2BHIQDG.mjs} +10 -10
- package/dist/{refund-reason-create-5ATQ2IPU.mjs → refund-reason-create-I3BIJFJH.mjs} +10 -10
- package/dist/{refund-reason-edit-F7AMOTG3.mjs → refund-reason-edit-2BEZASQH.mjs} +10 -10
- package/dist/{refund-reason-list-SFTHVSPC.mjs → refund-reason-list-NIJHHOXJ.mjs} +13 -13
- package/dist/{region-metadata-CRAHVHOC.mjs → region-metadata-RLZSQNGW.mjs} +10 -10
- package/dist/{reservation-create-YZMZ6HSS.mjs → reservation-create-4R2XEEZU.mjs} +2 -2
- package/dist/{reservation-detail-6MCBQZAE.mjs → reservation-detail-7OYGNK4L.mjs} +10 -10
- package/dist/{reservation-list-IEUC3KXK.mjs → reservation-list-VY44QEH6.mjs} +2 -2
- package/dist/{reservation-metadata-IQNJPNAX.mjs → reservation-metadata-VJIAGIMF.mjs} +10 -10
- package/dist/{sales-channel-add-products-7RKUDBXN.mjs → sales-channel-add-products-KAUMNKMD.mjs} +13 -13
- package/dist/{sales-channel-create-7ISLGNGC.mjs → sales-channel-create-I6ME6QBM.mjs} +2 -2
- package/dist/{sales-channel-detail-TKVVIAS5.mjs → sales-channel-detail-5SXDKP6P.mjs} +13 -13
- package/dist/{sales-channel-edit-2PEHGAWF.mjs → sales-channel-edit-O7GM2B6O.mjs} +2 -2
- package/dist/{sales-channel-list-SI7JVBOI.mjs → sales-channel-list-JKZ6TIY7.mjs} +11 -11
- package/dist/{sales-channel-metadata-ZOCPAIGM.mjs → sales-channel-metadata-33P5SKDI.mjs} +10 -10
- package/dist/{shipping-option-type-create-YR2QV2OG.mjs → shipping-option-type-create-KVYNWD2Q.mjs} +10 -10
- package/dist/{shipping-option-type-detail-TYHGCV2X.mjs → shipping-option-type-detail-YX3HMXNI.mjs} +11 -11
- package/dist/{shipping-option-type-edit-6KL3MHVT.mjs → shipping-option-type-edit-ODXQMHYJ.mjs} +10 -10
- package/dist/{shipping-option-type-list-YPCCUVFZ.mjs → shipping-option-type-list-XCQNWDDA.mjs} +11 -11
- package/dist/{shipping-profile-metadata-A33XKBQN.mjs → shipping-profile-metadata-K34DAKGY.mjs} +10 -10
- package/dist/{store-detail-3ZV7FCPV.mjs → store-detail-3Z3BK2BH.mjs} +10 -10
- package/dist/{store-metadata-LMRFCZ3J.mjs → store-metadata-FESGAO7E.mjs} +10 -10
- package/dist/{tax-region-create-5Y6EA7XE.mjs → tax-region-create-EVFVC6HN.mjs} +10 -10
- package/dist/{tax-region-detail-TTYUBJ3V.mjs → tax-region-detail-ULHK52CD.mjs} +29 -28
- package/dist/{tax-region-edit-IKEWHRUK.mjs → tax-region-edit-CXEPD2F2.mjs} +10 -10
- package/dist/{tax-region-province-detail-YCY56CRL.mjs → tax-region-province-detail-VUY4PDGN.mjs} +29 -28
- package/dist/{tax-region-tax-override-create-R3PNDP43.mjs → tax-region-tax-override-create-WWZZVAG5.mjs} +28 -27
- package/dist/{tax-region-tax-override-edit-QLD7MIQY.mjs → tax-region-tax-override-edit-HVZRD44G.mjs} +27 -26
- package/dist/{user-detail-DFZPKHG2.mjs → user-detail-YTVBPRH5.mjs} +1 -1
- package/dist/{user-metadata-BQKW4WAU.mjs → user-metadata-33W3JSHN.mjs} +10 -10
- package/dist/{workflow-execution-detail-D5QUZFTV.mjs → workflow-execution-detail-SHEXD5OL.mjs} +10 -10
- package/package.json +9 -9
- package/src/components/common/infinite-list/infinite-list.tsx +9 -4
- package/src/components/layout/main-layout/main-layout.tsx +7 -4
- package/src/dashboard-app/dashboard-app.tsx +10 -2
- package/src/dashboard-app/routes/get-route.map.tsx +64 -12
- package/src/dashboard-app/routes/utils.ts +14 -6
- package/src/hooks/api/index.ts +1 -0
- package/src/hooks/api/product-options.tsx +151 -0
- package/src/hooks/api/products.tsx +23 -63
- package/src/hooks/table/columns/use-product-option-table-columns.tsx +43 -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 +176 -5
- package/src/i18n/translations/en.json +51 -4
- 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 +131 -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-variant-section/product-create-details-variant-section.tsx +214 -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 +1 -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 +7 -38
- package/src/routes/products/product-import/helpers/import-template.ts +6 -6
- 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 +147 -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-D2636LJL.mjs +0 -145
- package/dist/product-edit-option-DYAFZIT2.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-ELPHCFRW.mjs → chunk-MK4E5XQX.mjs} +3 -3
- package/dist/{chunk-VWXNC2B5.mjs → chunk-SMDWWXCD.mjs} +3 -3
- package/dist/{customer-group-add-customers-57THRZ6D.mjs → customer-group-add-customers-TQAH4IPM.mjs} +3 -3
- package/dist/{customer-list-TE7VNBX6.mjs → customer-list-TXAB4URJ.mjs} +3 -3
- package/dist/{location-list-W6EHBBE5.mjs → location-list-MVIK73QC.mjs} +1 -1
- package/dist/{location-service-zone-shipping-option-edit-27MYKN7R.mjs → location-service-zone-shipping-option-edit-WN4MTZSB.mjs} +3 -3
- package/dist/{product-type-list-2ZQ2NE3R.mjs → product-type-list-J2WDYTZK.mjs} +3 -3
- package/dist/{region-list-W55C3CTH.mjs → region-list-KE5HCKOR.mjs} +3 -3
- package/dist/{return-reason-list-CBOVMQZF.mjs → return-reason-list-6UKR2BLW.mjs} +3 -3
- package/dist/{user-list-6EVTLPJE.mjs → user-list-73SJSKYT.mjs} +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ordersQueryKeys
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SBFWPL42.mjs";
|
|
4
4
|
import {
|
|
5
5
|
queryClient
|
|
6
6
|
} from "./chunk-FXYH54JP.mjs";
|
|
@@ -24,14 +24,97 @@ var usePlugins = (options) => {
|
|
|
24
24
|
return { ...data, ...rest };
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
// src/hooks/api/product-options.tsx
|
|
28
|
+
import {
|
|
29
|
+
useMutation,
|
|
30
|
+
useQuery as useQuery2
|
|
31
|
+
} from "@tanstack/react-query";
|
|
32
|
+
var PRODUCT_OPTIONS_QUERY_KEY = "product_options";
|
|
33
|
+
var productOptionsQueryKeys = queryKeysFactory(
|
|
34
|
+
PRODUCT_OPTIONS_QUERY_KEY
|
|
35
|
+
);
|
|
36
|
+
var useProductOption = (id, query, options) => {
|
|
37
|
+
const { data, ...rest } = useQuery2({
|
|
38
|
+
queryKey: productOptionsQueryKeys.detail(id, query),
|
|
39
|
+
queryFn: () => sdk.admin.productOption.retrieve(id, query),
|
|
40
|
+
...options
|
|
41
|
+
});
|
|
42
|
+
return { ...data, ...rest };
|
|
43
|
+
};
|
|
44
|
+
var useProductOptions = (query, options) => {
|
|
45
|
+
const { data, ...rest } = useQuery2({
|
|
46
|
+
queryFn: () => sdk.admin.productOption.list(query),
|
|
47
|
+
queryKey: productOptionsQueryKeys.list(query),
|
|
48
|
+
...options
|
|
49
|
+
});
|
|
50
|
+
return { ...data, ...rest };
|
|
51
|
+
};
|
|
52
|
+
var useCreateProductOption = (options) => {
|
|
53
|
+
return useMutation({
|
|
54
|
+
mutationFn: (payload) => sdk.admin.productOption.create(payload),
|
|
55
|
+
onSuccess: (data, variables, context) => {
|
|
56
|
+
queryClient.invalidateQueries({
|
|
57
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
58
|
+
});
|
|
59
|
+
options?.onSuccess?.(data, variables, context);
|
|
60
|
+
},
|
|
61
|
+
...options
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var useUpdateProductOption = (id, options) => {
|
|
65
|
+
return useMutation({
|
|
66
|
+
mutationFn: (payload) => sdk.admin.productOption.update(id, payload),
|
|
67
|
+
onSuccess: (data, variables, context) => {
|
|
68
|
+
queryClient.invalidateQueries({
|
|
69
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
70
|
+
});
|
|
71
|
+
queryClient.invalidateQueries({
|
|
72
|
+
queryKey: productOptionsQueryKeys.detail(id)
|
|
73
|
+
});
|
|
74
|
+
options?.onSuccess?.(data, variables, context);
|
|
75
|
+
},
|
|
76
|
+
...options
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
var useDeleteProductOption = (id, options) => {
|
|
80
|
+
return useMutation({
|
|
81
|
+
mutationFn: () => sdk.admin.productOption.delete(id),
|
|
82
|
+
onSuccess: (data, variables, context) => {
|
|
83
|
+
queryClient.invalidateQueries({
|
|
84
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
85
|
+
});
|
|
86
|
+
queryClient.invalidateQueries({
|
|
87
|
+
queryKey: productOptionsQueryKeys.detail(id)
|
|
88
|
+
});
|
|
89
|
+
options?.onSuccess?.(data, variables, context);
|
|
90
|
+
},
|
|
91
|
+
...options
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
var useDeleteProductOptionLazy = (options) => {
|
|
95
|
+
return useMutation({
|
|
96
|
+
mutationFn: (id) => sdk.admin.productOption.delete(id),
|
|
97
|
+
onSuccess: (data, variables, context) => {
|
|
98
|
+
queryClient.invalidateQueries({
|
|
99
|
+
queryKey: productOptionsQueryKeys.lists()
|
|
100
|
+
});
|
|
101
|
+
queryClient.invalidateQueries({
|
|
102
|
+
queryKey: productOptionsQueryKeys.details()
|
|
103
|
+
});
|
|
104
|
+
options?.onSuccess?.(data, variables, context);
|
|
105
|
+
},
|
|
106
|
+
...options
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
|
|
27
110
|
// src/hooks/api/product-variants.tsx
|
|
28
|
-
import { useQuery as
|
|
111
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
29
112
|
var PRODUCT_VARIANT_QUERY_KEY = "product_variant";
|
|
30
113
|
var productVariantQueryKeys = queryKeysFactory(
|
|
31
114
|
PRODUCT_VARIANT_QUERY_KEY
|
|
32
115
|
);
|
|
33
116
|
var useVariants = (query, options) => {
|
|
34
|
-
const { data, ...rest } =
|
|
117
|
+
const { data, ...rest } = useQuery3({
|
|
35
118
|
queryFn: () => sdk.admin.productVariant.list(query),
|
|
36
119
|
queryKey: productVariantQueryKeys.list(query),
|
|
37
120
|
...options
|
|
@@ -41,13 +124,13 @@ var useVariants = (query, options) => {
|
|
|
41
124
|
|
|
42
125
|
// src/hooks/api/refund-reasons.tsx
|
|
43
126
|
import {
|
|
44
|
-
useMutation,
|
|
45
|
-
useQuery as
|
|
127
|
+
useMutation as useMutation2,
|
|
128
|
+
useQuery as useQuery4
|
|
46
129
|
} from "@tanstack/react-query";
|
|
47
130
|
var REFUND_REASONS_QUERY_KEY = "refund_reasons";
|
|
48
131
|
var refundReasonsQueryKeys = queryKeysFactory(REFUND_REASONS_QUERY_KEY);
|
|
49
132
|
var useRefundReasons = (query, options) => {
|
|
50
|
-
const { data, ...rest } =
|
|
133
|
+
const { data, ...rest } = useQuery4({
|
|
51
134
|
queryFn: () => sdk.admin.refundReason.list(query),
|
|
52
135
|
queryKey: refundReasonsQueryKeys.list(query),
|
|
53
136
|
...options
|
|
@@ -55,7 +138,7 @@ var useRefundReasons = (query, options) => {
|
|
|
55
138
|
return { ...data, ...rest };
|
|
56
139
|
};
|
|
57
140
|
var useRefundReason = (id, query, options) => {
|
|
58
|
-
const { data, ...rest } =
|
|
141
|
+
const { data, ...rest } = useQuery4({
|
|
59
142
|
queryFn: () => sdk.admin.refundReason.retrieve(id, query),
|
|
60
143
|
queryKey: refundReasonsQueryKeys.detail(id),
|
|
61
144
|
...options
|
|
@@ -63,7 +146,7 @@ var useRefundReason = (id, query, options) => {
|
|
|
63
146
|
return { ...data, ...rest };
|
|
64
147
|
};
|
|
65
148
|
var useCreateRefundReason = (query, options) => {
|
|
66
|
-
return
|
|
149
|
+
return useMutation2({
|
|
67
150
|
mutationFn: async (data) => sdk.admin.refundReason.create(data, query),
|
|
68
151
|
onSuccess: (data, variables, context) => {
|
|
69
152
|
queryClient.invalidateQueries({
|
|
@@ -75,7 +158,7 @@ var useCreateRefundReason = (query, options) => {
|
|
|
75
158
|
});
|
|
76
159
|
};
|
|
77
160
|
var useUpdateRefundReason = (id, options) => {
|
|
78
|
-
return
|
|
161
|
+
return useMutation2({
|
|
79
162
|
mutationFn: async (data) => sdk.admin.refundReason.update(id, data),
|
|
80
163
|
onSuccess: (data, variables, context) => {
|
|
81
164
|
queryClient.invalidateQueries({
|
|
@@ -90,7 +173,7 @@ var useUpdateRefundReason = (id, options) => {
|
|
|
90
173
|
});
|
|
91
174
|
};
|
|
92
175
|
var useDeleteRefundReasonLazy = (options) => {
|
|
93
|
-
return
|
|
176
|
+
return useMutation2({
|
|
94
177
|
mutationFn: (id) => sdk.admin.refundReason.delete(id),
|
|
95
178
|
onSuccess: (data, variables, context) => {
|
|
96
179
|
queryClient.invalidateQueries({
|
|
@@ -107,15 +190,15 @@ var useDeleteRefundReasonLazy = (options) => {
|
|
|
107
190
|
|
|
108
191
|
// src/hooks/api/shipping-option-types.tsx
|
|
109
192
|
import {
|
|
110
|
-
useMutation as
|
|
111
|
-
useQuery as
|
|
193
|
+
useMutation as useMutation3,
|
|
194
|
+
useQuery as useQuery5
|
|
112
195
|
} from "@tanstack/react-query";
|
|
113
196
|
var SHIPPING_OPTION_TYPES_QUERY_KEY = "shipping_option_types";
|
|
114
197
|
var shippingOptionTypesQueryKeys = queryKeysFactory(
|
|
115
198
|
SHIPPING_OPTION_TYPES_QUERY_KEY
|
|
116
199
|
);
|
|
117
200
|
var useShippingOptionType = (id, query, options) => {
|
|
118
|
-
const { data, ...rest } =
|
|
201
|
+
const { data, ...rest } = useQuery5({
|
|
119
202
|
queryFn: () => sdk.admin.shippingOptionType.retrieve(id, query),
|
|
120
203
|
queryKey: shippingOptionTypesQueryKeys.detail(id),
|
|
121
204
|
...options
|
|
@@ -123,7 +206,7 @@ var useShippingOptionType = (id, query, options) => {
|
|
|
123
206
|
return { ...data, ...rest };
|
|
124
207
|
};
|
|
125
208
|
var useShippingOptionTypes = (query, options) => {
|
|
126
|
-
const { data, ...rest } =
|
|
209
|
+
const { data, ...rest } = useQuery5({
|
|
127
210
|
queryFn: () => sdk.admin.shippingOptionType.list(query),
|
|
128
211
|
queryKey: shippingOptionTypesQueryKeys.list(query),
|
|
129
212
|
...options
|
|
@@ -131,7 +214,7 @@ var useShippingOptionTypes = (query, options) => {
|
|
|
131
214
|
return { ...data, ...rest };
|
|
132
215
|
};
|
|
133
216
|
var useCreateShippingOptionType = (options) => {
|
|
134
|
-
return
|
|
217
|
+
return useMutation3({
|
|
135
218
|
mutationFn: (payload) => sdk.admin.shippingOptionType.create(payload),
|
|
136
219
|
onSuccess: (data, variables, context) => {
|
|
137
220
|
queryClient.invalidateQueries({
|
|
@@ -143,7 +226,7 @@ var useCreateShippingOptionType = (options) => {
|
|
|
143
226
|
});
|
|
144
227
|
};
|
|
145
228
|
var useUpdateShippingOptionType = (id, options) => {
|
|
146
|
-
return
|
|
229
|
+
return useMutation3({
|
|
147
230
|
mutationFn: (payload) => sdk.admin.shippingOptionType.update(id, payload),
|
|
148
231
|
onSuccess: (data, variables, context) => {
|
|
149
232
|
queryClient.invalidateQueries({
|
|
@@ -158,7 +241,7 @@ var useUpdateShippingOptionType = (id, options) => {
|
|
|
158
241
|
});
|
|
159
242
|
};
|
|
160
243
|
var useDeleteShippingOptionType = (id, options) => {
|
|
161
|
-
return
|
|
244
|
+
return useMutation3({
|
|
162
245
|
mutationFn: () => sdk.admin.shippingOptionType.delete(id),
|
|
163
246
|
onSuccess: (data, variables, context) => {
|
|
164
247
|
queryClient.invalidateQueries({
|
|
@@ -175,13 +258,13 @@ var useDeleteShippingOptionType = (id, options) => {
|
|
|
175
258
|
|
|
176
259
|
// src/hooks/api/tags.tsx
|
|
177
260
|
import {
|
|
178
|
-
useMutation as
|
|
179
|
-
useQuery as
|
|
261
|
+
useMutation as useMutation4,
|
|
262
|
+
useQuery as useQuery6
|
|
180
263
|
} from "@tanstack/react-query";
|
|
181
264
|
var TAGS_QUERY_KEY = "tags";
|
|
182
265
|
var productTagsQueryKeys = queryKeysFactory(TAGS_QUERY_KEY);
|
|
183
266
|
var useProductTag = (id, query, options) => {
|
|
184
|
-
const { data, ...rest } =
|
|
267
|
+
const { data, ...rest } = useQuery6({
|
|
185
268
|
queryKey: productTagsQueryKeys.detail(id, query),
|
|
186
269
|
queryFn: async () => sdk.admin.productTag.retrieve(id),
|
|
187
270
|
...options
|
|
@@ -189,7 +272,7 @@ var useProductTag = (id, query, options) => {
|
|
|
189
272
|
return { ...data, ...rest };
|
|
190
273
|
};
|
|
191
274
|
var useProductTags = (query, options) => {
|
|
192
|
-
const { data, ...rest } =
|
|
275
|
+
const { data, ...rest } = useQuery6({
|
|
193
276
|
queryKey: productTagsQueryKeys.list(query),
|
|
194
277
|
queryFn: async () => sdk.admin.productTag.list(query),
|
|
195
278
|
...options
|
|
@@ -197,7 +280,7 @@ var useProductTags = (query, options) => {
|
|
|
197
280
|
return { ...data, ...rest };
|
|
198
281
|
};
|
|
199
282
|
var useCreateProductTag = (query, options) => {
|
|
200
|
-
return
|
|
283
|
+
return useMutation4({
|
|
201
284
|
mutationFn: async (data) => sdk.admin.productTag.create(data, query),
|
|
202
285
|
onSuccess: (data, variables, context) => {
|
|
203
286
|
queryClient.invalidateQueries({
|
|
@@ -209,7 +292,7 @@ var useCreateProductTag = (query, options) => {
|
|
|
209
292
|
});
|
|
210
293
|
};
|
|
211
294
|
var useUpdateProductTag = (id, query, options) => {
|
|
212
|
-
return
|
|
295
|
+
return useMutation4({
|
|
213
296
|
mutationFn: async (data) => sdk.admin.productTag.update(id, data, query),
|
|
214
297
|
onSuccess: (data, variables, context) => {
|
|
215
298
|
queryClient.invalidateQueries({
|
|
@@ -224,7 +307,7 @@ var useUpdateProductTag = (id, query, options) => {
|
|
|
224
307
|
});
|
|
225
308
|
};
|
|
226
309
|
var useDeleteProductTag = (id, options) => {
|
|
227
|
-
return
|
|
310
|
+
return useMutation4({
|
|
228
311
|
mutationFn: async () => sdk.admin.productTag.delete(id),
|
|
229
312
|
onSuccess: (data, variables, context) => {
|
|
230
313
|
queryClient.invalidateQueries({
|
|
@@ -240,16 +323,16 @@ var useDeleteProductTag = (id, options) => {
|
|
|
240
323
|
};
|
|
241
324
|
|
|
242
325
|
// src/hooks/api/fulfillment.tsx
|
|
243
|
-
import { useMutation as
|
|
326
|
+
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
244
327
|
var FULFILLMENTS_QUERY_KEY = "fulfillments";
|
|
245
328
|
var fulfillmentsQueryKeys = queryKeysFactory(FULFILLMENTS_QUERY_KEY);
|
|
246
329
|
|
|
247
330
|
// src/hooks/api/notification.tsx
|
|
248
|
-
import { useQuery as
|
|
331
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
249
332
|
var NOTIFICATION_QUERY_KEY = "notification";
|
|
250
333
|
var notificationQueryKeys = queryKeysFactory(NOTIFICATION_QUERY_KEY);
|
|
251
334
|
var useNotifications = (query, options) => {
|
|
252
|
-
const { data, ...rest } =
|
|
335
|
+
const { data, ...rest } = useQuery7({
|
|
253
336
|
queryFn: () => sdk.admin.notification.list(query),
|
|
254
337
|
queryKey: notificationQueryKeys.list(query),
|
|
255
338
|
...options
|
|
@@ -258,13 +341,13 @@ var useNotifications = (query, options) => {
|
|
|
258
341
|
};
|
|
259
342
|
|
|
260
343
|
// src/hooks/api/payment-collections.tsx
|
|
261
|
-
import { useMutation as
|
|
344
|
+
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
262
345
|
var PAYMENT_COLLECTION_QUERY_KEY = "payment-collection";
|
|
263
346
|
var paymentCollectionQueryKeys = queryKeysFactory(
|
|
264
347
|
PAYMENT_COLLECTION_QUERY_KEY
|
|
265
348
|
);
|
|
266
349
|
var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) => {
|
|
267
|
-
return
|
|
350
|
+
return useMutation6({
|
|
268
351
|
mutationFn: (payload) => sdk.admin.paymentCollection.markAsPaid(paymentCollectionId, payload),
|
|
269
352
|
onSuccess: (data, variables, context) => {
|
|
270
353
|
queryClient.invalidateQueries({
|
|
@@ -284,8 +367,8 @@ var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) =>
|
|
|
284
367
|
|
|
285
368
|
// src/hooks/api/payments.tsx
|
|
286
369
|
import {
|
|
287
|
-
useMutation as
|
|
288
|
-
useQuery as
|
|
370
|
+
useMutation as useMutation7,
|
|
371
|
+
useQuery as useQuery8
|
|
289
372
|
} from "@tanstack/react-query";
|
|
290
373
|
var PAYMENT_QUERY_KEY = "payment";
|
|
291
374
|
var paymentQueryKeys = queryKeysFactory(PAYMENT_QUERY_KEY);
|
|
@@ -294,7 +377,7 @@ var paymentProvidersQueryKeys = queryKeysFactory(
|
|
|
294
377
|
PAYMENT_PROVIDERS_QUERY_KEY
|
|
295
378
|
);
|
|
296
379
|
var useCapturePayment = (orderId, paymentId, options) => {
|
|
297
|
-
return
|
|
380
|
+
return useMutation7({
|
|
298
381
|
mutationFn: (payload) => sdk.admin.payment.capture(paymentId, payload),
|
|
299
382
|
onSuccess: (data, variables, context) => {
|
|
300
383
|
queryClient.invalidateQueries({
|
|
@@ -309,7 +392,7 @@ var useCapturePayment = (orderId, paymentId, options) => {
|
|
|
309
392
|
});
|
|
310
393
|
};
|
|
311
394
|
var useRefundPayment = (orderId, paymentId, options) => {
|
|
312
|
-
return
|
|
395
|
+
return useMutation7({
|
|
313
396
|
mutationFn: (payload) => sdk.admin.payment.refund(paymentId, payload),
|
|
314
397
|
onSuccess: (data, variables, context) => {
|
|
315
398
|
queryClient.invalidateQueries({
|
|
@@ -331,6 +414,13 @@ export {
|
|
|
331
414
|
useCapturePayment,
|
|
332
415
|
useRefundPayment,
|
|
333
416
|
usePlugins,
|
|
417
|
+
productOptionsQueryKeys,
|
|
418
|
+
useProductOption,
|
|
419
|
+
useProductOptions,
|
|
420
|
+
useCreateProductOption,
|
|
421
|
+
useUpdateProductOption,
|
|
422
|
+
useDeleteProductOption,
|
|
423
|
+
useDeleteProductOptionLazy,
|
|
334
424
|
productVariantQueryKeys,
|
|
335
425
|
useVariants,
|
|
336
426
|
refundReasonsQueryKeys,
|
|
@@ -48,6 +48,12 @@ var InfiniteList = ({
|
|
|
48
48
|
const parentRef = useRef(null);
|
|
49
49
|
const startObserver = useRef();
|
|
50
50
|
const endObserver = useRef();
|
|
51
|
+
const fetchNextPageRef = useRef(fetchNextPage);
|
|
52
|
+
const fetchPreviousPageRef = useRef(fetchPreviousPage);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
fetchNextPageRef.current = fetchNextPage;
|
|
55
|
+
fetchPreviousPageRef.current = fetchPreviousPage;
|
|
56
|
+
}, [fetchNextPage, fetchPreviousPage]);
|
|
51
57
|
useEffect(() => {
|
|
52
58
|
if (isPending) {
|
|
53
59
|
return;
|
|
@@ -57,7 +63,7 @@ var InfiniteList = ({
|
|
|
57
63
|
(entries) => {
|
|
58
64
|
if (entries[0].isIntersecting && hasPreviousPage) {
|
|
59
65
|
startObserver.current?.disconnect();
|
|
60
|
-
|
|
66
|
+
fetchPreviousPageRef.current();
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
{
|
|
@@ -68,7 +74,7 @@ var InfiniteList = ({
|
|
|
68
74
|
(entries) => {
|
|
69
75
|
if (entries[0].isIntersecting && hasNextPage) {
|
|
70
76
|
endObserver.current?.disconnect();
|
|
71
|
-
|
|
77
|
+
fetchNextPageRef.current();
|
|
72
78
|
}
|
|
73
79
|
},
|
|
74
80
|
{
|
|
@@ -87,8 +93,6 @@ var InfiniteList = ({
|
|
|
87
93
|
endObserver.current?.disconnect();
|
|
88
94
|
};
|
|
89
95
|
}, [
|
|
90
|
-
fetchNextPage,
|
|
91
|
-
fetchPreviousPage,
|
|
92
96
|
hasNextPage,
|
|
93
97
|
hasPreviousPage,
|
|
94
98
|
isFetching,
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// src/components/common/sortable-list/sortable-list.tsx
|
|
2
|
+
import {
|
|
3
|
+
DndContext,
|
|
4
|
+
DragOverlay,
|
|
5
|
+
KeyboardSensor,
|
|
6
|
+
PointerSensor,
|
|
7
|
+
defaultDropAnimationSideEffects,
|
|
8
|
+
useSensor,
|
|
9
|
+
useSensors
|
|
10
|
+
} from "@dnd-kit/core";
|
|
11
|
+
import {
|
|
12
|
+
SortableContext,
|
|
13
|
+
arrayMove,
|
|
14
|
+
sortableKeyboardCoordinates,
|
|
15
|
+
useSortable
|
|
16
|
+
} from "@dnd-kit/sortable";
|
|
17
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
18
|
+
import { DotsSix } from "@medusajs/icons";
|
|
19
|
+
import { IconButton, clx } from "@medusajs/ui";
|
|
20
|
+
import {
|
|
21
|
+
Fragment,
|
|
22
|
+
createContext,
|
|
23
|
+
useContext,
|
|
24
|
+
useMemo,
|
|
25
|
+
useState
|
|
26
|
+
} from "react";
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
var List = ({
|
|
29
|
+
items,
|
|
30
|
+
onChange,
|
|
31
|
+
renderItem
|
|
32
|
+
}) => {
|
|
33
|
+
const [active, setActive] = useState(null);
|
|
34
|
+
const [activeItem, activeIndex] = useMemo(() => {
|
|
35
|
+
if (active === null) {
|
|
36
|
+
return [null, null];
|
|
37
|
+
}
|
|
38
|
+
const index = items.findIndex(({ id }) => id === active.id);
|
|
39
|
+
return [items[index], index];
|
|
40
|
+
}, [active, items]);
|
|
41
|
+
const sensors = useSensors(
|
|
42
|
+
useSensor(PointerSensor),
|
|
43
|
+
useSensor(KeyboardSensor, {
|
|
44
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
const handleDragStart = ({ active: active2 }) => {
|
|
48
|
+
setActive(active2);
|
|
49
|
+
};
|
|
50
|
+
const handleDragEnd = ({ active: active2, over }) => {
|
|
51
|
+
if (over && active2.id !== over.id) {
|
|
52
|
+
const activeIndex2 = items.findIndex(({ id }) => id === active2.id);
|
|
53
|
+
const overIndex = items.findIndex(({ id }) => id === over.id);
|
|
54
|
+
onChange(arrayMove(items, activeIndex2, overIndex));
|
|
55
|
+
}
|
|
56
|
+
setActive(null);
|
|
57
|
+
};
|
|
58
|
+
const handleDragCancel = () => {
|
|
59
|
+
setActive(null);
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ jsxs(
|
|
62
|
+
DndContext,
|
|
63
|
+
{
|
|
64
|
+
sensors,
|
|
65
|
+
onDragStart: handleDragStart,
|
|
66
|
+
onDragEnd: handleDragEnd,
|
|
67
|
+
onDragCancel: handleDragCancel,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Overlay, { children: activeItem && activeIndex !== null ? renderItem(activeItem, activeIndex) : null }),
|
|
70
|
+
/* @__PURE__ */ jsx(SortableContext, { items, children: /* @__PURE__ */ jsx(
|
|
71
|
+
"ul",
|
|
72
|
+
{
|
|
73
|
+
role: "application",
|
|
74
|
+
className: "flex list-inside list-none list-image-none flex-col p-0",
|
|
75
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx(Fragment, { children: renderItem(item, index) }, item.id))
|
|
76
|
+
}
|
|
77
|
+
) })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
var dropAnimationConfig = {
|
|
83
|
+
sideEffects: defaultDropAnimationSideEffects({
|
|
84
|
+
styles: {
|
|
85
|
+
active: {
|
|
86
|
+
opacity: "0.4"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
var Overlay = ({ children }) => {
|
|
92
|
+
return /* @__PURE__ */ jsx(
|
|
93
|
+
DragOverlay,
|
|
94
|
+
{
|
|
95
|
+
className: "shadow-elevation-card-hover overflow-hidden rounded-md [&>li]:border-b-0",
|
|
96
|
+
dropAnimation: dropAnimationConfig,
|
|
97
|
+
children
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
var SortableItemContext = createContext(null);
|
|
102
|
+
var useSortableItemContext = () => {
|
|
103
|
+
const context = useContext(SortableItemContext);
|
|
104
|
+
if (!context) {
|
|
105
|
+
throw new Error(
|
|
106
|
+
"useSortableItemContext must be used within a SortableItemContext"
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return context;
|
|
110
|
+
};
|
|
111
|
+
var Item = ({
|
|
112
|
+
id,
|
|
113
|
+
className,
|
|
114
|
+
children
|
|
115
|
+
}) => {
|
|
116
|
+
const {
|
|
117
|
+
attributes,
|
|
118
|
+
isDragging,
|
|
119
|
+
listeners,
|
|
120
|
+
setNodeRef,
|
|
121
|
+
setActivatorNodeRef,
|
|
122
|
+
transform,
|
|
123
|
+
transition
|
|
124
|
+
} = useSortable({ id });
|
|
125
|
+
const context = useMemo(
|
|
126
|
+
() => ({
|
|
127
|
+
attributes,
|
|
128
|
+
listeners,
|
|
129
|
+
ref: setActivatorNodeRef,
|
|
130
|
+
isDragging
|
|
131
|
+
}),
|
|
132
|
+
[attributes, listeners, setActivatorNodeRef, isDragging]
|
|
133
|
+
);
|
|
134
|
+
const style = {
|
|
135
|
+
opacity: isDragging ? 0.4 : void 0,
|
|
136
|
+
transform: CSS.Translate.toString(transform),
|
|
137
|
+
transition
|
|
138
|
+
};
|
|
139
|
+
return /* @__PURE__ */ jsx(SortableItemContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
140
|
+
"li",
|
|
141
|
+
{
|
|
142
|
+
className: clx("transition-fg flex flex-1 list-none", className),
|
|
143
|
+
ref: setNodeRef,
|
|
144
|
+
style,
|
|
145
|
+
children
|
|
146
|
+
}
|
|
147
|
+
) });
|
|
148
|
+
};
|
|
149
|
+
var DragHandle = () => {
|
|
150
|
+
const { attributes, listeners, ref } = useSortableItemContext();
|
|
151
|
+
return /* @__PURE__ */ jsx(
|
|
152
|
+
IconButton,
|
|
153
|
+
{
|
|
154
|
+
variant: "transparent",
|
|
155
|
+
size: "small",
|
|
156
|
+
...attributes,
|
|
157
|
+
...listeners,
|
|
158
|
+
ref,
|
|
159
|
+
className: "cursor-grab touch-none active:cursor-grabbing",
|
|
160
|
+
children: /* @__PURE__ */ jsx(DotsSix, { className: "text-ui-fg-muted" })
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
var SortableList = Object.assign(List, {
|
|
165
|
+
Item,
|
|
166
|
+
DragHandle
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export {
|
|
170
|
+
SortableList
|
|
171
|
+
};
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
} from "./chunk-PJ5EUKOB.mjs";
|
|
12
12
|
import "./chunk-HQKGZADC.mjs";
|
|
13
13
|
import "./chunk-EMIHDNB7.mjs";
|
|
14
|
+
import {
|
|
15
|
+
useProductTableFilters
|
|
16
|
+
} from "./chunk-FA5QNPXE.mjs";
|
|
14
17
|
import {
|
|
15
18
|
useProductTableQuery
|
|
16
19
|
} from "./chunk-PCFUZKDS.mjs";
|
|
17
|
-
import {
|
|
18
|
-
useProductTableFilters
|
|
19
|
-
} from "./chunk-6IXLTZ2H.mjs";
|
|
20
20
|
import "./chunk-FKIOYL3D.mjs";
|
|
21
21
|
import "./chunk-C76H5USB.mjs";
|
|
22
22
|
import "./chunk-PFKKVLZX.mjs";
|
|
@@ -32,38 +32,38 @@ import "./chunk-LPEUYMRK.mjs";
|
|
|
32
32
|
import "./chunk-S4DMV3ZT.mjs";
|
|
33
33
|
import "./chunk-67ORSRVT.mjs";
|
|
34
34
|
import "./chunk-OBQI23QM.mjs";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-WOFUOGLO.mjs";
|
|
36
36
|
import "./chunk-KOSCMAIC.mjs";
|
|
37
|
+
import "./chunk-WWQZD7WM.mjs";
|
|
37
38
|
import "./chunk-X6DSNTTX.mjs";
|
|
38
39
|
import "./chunk-I6E6CALJ.mjs";
|
|
39
|
-
import "./chunk-B4GODIOW.mjs";
|
|
40
|
-
import "./chunk-N4N4KGET.mjs";
|
|
41
40
|
import "./chunk-QTCZFYFH.mjs";
|
|
41
|
+
import "./chunk-B4GODIOW.mjs";
|
|
42
42
|
import "./chunk-ENV6YVOM.mjs";
|
|
43
43
|
import "./chunk-PIR2H25N.mjs";
|
|
44
44
|
import "./chunk-C5LYZZZ5.mjs";
|
|
45
45
|
import "./chunk-RLY2SL5E.mjs";
|
|
46
46
|
import "./chunk-2ZKVRTBW.mjs";
|
|
47
|
-
import "./chunk-XYHXWLTJ.mjs";
|
|
48
|
-
import "./chunk-F6PXCY3N.mjs";
|
|
49
47
|
import {
|
|
50
48
|
useCollection,
|
|
51
49
|
useUpdateCollectionProducts
|
|
52
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-GBKLLUUX.mjs";
|
|
51
|
+
import "./chunk-P5RVJWPK.mjs";
|
|
52
|
+
import "./chunk-F6PXCY3N.mjs";
|
|
53
53
|
import "./chunk-R2G2B47Y.mjs";
|
|
54
54
|
import "./chunk-GRT22PE5.mjs";
|
|
55
55
|
import "./chunk-32IQRUVY.mjs";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-SBFWPL42.mjs";
|
|
57
|
+
import "./chunk-GVVAVAXG.mjs";
|
|
58
|
+
import "./chunk-7PWZ5GMG.mjs";
|
|
59
|
+
import "./chunk-NGR5XU3K.mjs";
|
|
60
60
|
import "./chunk-KX4P5L3R.mjs";
|
|
61
61
|
import "./chunk-V2LANK5S.mjs";
|
|
62
62
|
import "./chunk-QZ6PT4QV.mjs";
|
|
63
63
|
import "./chunk-QL4XKIVL.mjs";
|
|
64
64
|
import {
|
|
65
65
|
useProducts
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GVPJPLE2.mjs";
|
|
67
67
|
import "./chunk-FXYH54JP.mjs";
|
|
68
68
|
import "./chunk-774WSTCC.mjs";
|
|
69
69
|
import "./chunk-DEQUVHHE.mjs";
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
} from "./chunk-OBQI23QM.mjs";
|
|
15
15
|
import {
|
|
16
16
|
useCreateCollection
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-GBKLLUUX.mjs";
|
|
18
|
+
import "./chunk-GVPJPLE2.mjs";
|
|
19
19
|
import "./chunk-FXYH54JP.mjs";
|
|
20
20
|
import "./chunk-774WSTCC.mjs";
|
|
21
21
|
import "./chunk-DEQUVHHE.mjs";
|