@acmekit/dashboard 2.13.1
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/README.md +30 -0
- package/dist/Inter-Medium-RUQTUVA3.ttf +0 -0
- package/dist/Inter-Regular-CKBOXRQ3.ttf +0 -0
- package/dist/RobotoMono-Medium-LUNBMOOH.ttf +0 -0
- package/dist/RobotoMono-Regular-27MA6W2G.ttf +0 -0
- package/dist/add-campaign-promotions-GV3D3N2X.mjs +263 -0
- package/dist/add-locales-WQDGU5A2.mjs +82 -0
- package/dist/adjust-inventory-CSOFODJL.mjs +217 -0
- package/dist/api-key-management-create-JUXDTSXT.mjs +176 -0
- package/dist/api-key-management-detail-7TKDKAYS.mjs +493 -0
- package/dist/api-key-management-edit-ZWOCXPXV.mjs +110 -0
- package/dist/api-key-management-list-C6BVUVSI.mjs +356 -0
- package/dist/api-key-management-sales-channels-B2HCUBX7.mjs +206 -0
- package/dist/app.css +5330 -0
- package/dist/app.js +195968 -0
- package/dist/app.mjs +81 -0
- package/dist/campaign-budget-edit-OHOU27NN.mjs +147 -0
- package/dist/campaign-configuration-MZHTGODE.mjs +154 -0
- package/dist/campaign-create-VAJXI544.mjs +31 -0
- package/dist/campaign-detail-MWRQ5LSR.mjs +677 -0
- package/dist/campaign-edit-Z2KT7NZD.mjs +206 -0
- package/dist/campaign-list-HOAE6MXC.mjs +192 -0
- package/dist/categories-metadata-OESX2QXC.mjs +74 -0
- package/dist/category-create-AIVN7H3A.mjs +423 -0
- package/dist/category-detail-PDRC4NHH.mjs +579 -0
- package/dist/category-edit-7OLII5PI.mjs +224 -0
- package/dist/category-list-SYODXAV7.mjs +309 -0
- package/dist/category-organize-C3IUWW33.mjs +113 -0
- package/dist/category-products-GA4KP7EC.mjs +284 -0
- package/dist/chunk-22YYMH6M.mjs +382 -0
- package/dist/chunk-2PCPX3L2.mjs +92 -0
- package/dist/chunk-2V4DS7AE.mjs +49 -0
- package/dist/chunk-3C6WQ7NH.mjs +46 -0
- package/dist/chunk-3ISBJK7K.mjs +45 -0
- package/dist/chunk-3TAD7FW4.mjs +431 -0
- package/dist/chunk-3TZOFKX2.mjs +110 -0
- package/dist/chunk-3VXYG7KG.mjs +64 -0
- package/dist/chunk-3WPRVYF6.mjs +122 -0
- package/dist/chunk-452UKZW6.mjs +471 -0
- package/dist/chunk-4DFGIDVN.mjs +117 -0
- package/dist/chunk-4FM6S5CX.mjs +17 -0
- package/dist/chunk-4GQOUCX6.mjs +0 -0
- package/dist/chunk-4UTXEJBF.mjs +128 -0
- package/dist/chunk-4XSXVVYD.mjs +18 -0
- package/dist/chunk-535OVBXR.mjs +226 -0
- package/dist/chunk-54IEHX46.mjs +116 -0
- package/dist/chunk-5DXB7NNX.mjs +221 -0
- package/dist/chunk-5Q74GF5H.mjs +94 -0
- package/dist/chunk-5SAFO54D.mjs +56 -0
- package/dist/chunk-6GU6IDUA.mjs +8 -0
- package/dist/chunk-6HTZNHPT.mjs +34 -0
- package/dist/chunk-6T6CP246.mjs +340 -0
- package/dist/chunk-774WSTCC.mjs +19 -0
- package/dist/chunk-7AXHHXCX.mjs +4 -0
- package/dist/chunk-7M2A645H.mjs +63 -0
- package/dist/chunk-7PCPPVXC.mjs +175 -0
- package/dist/chunk-AM2BU2RH.mjs +6 -0
- package/dist/chunk-B2FDWFGX.mjs +171 -0
- package/dist/chunk-B4QEDA23.mjs +97 -0
- package/dist/chunk-B6ZOPCPA.mjs +73 -0
- package/dist/chunk-BALV2UTZ.mjs +24 -0
- package/dist/chunk-BBP7EYBG.mjs +260 -0
- package/dist/chunk-BCEWAWGA.mjs +39 -0
- package/dist/chunk-BD3XDAG5.mjs +401 -0
- package/dist/chunk-BGATYAVC.mjs +47 -0
- package/dist/chunk-BZ3BUDOK.mjs +4113 -0
- package/dist/chunk-C5P5PL3E.mjs +31 -0
- package/dist/chunk-C76H5USB.mjs +16 -0
- package/dist/chunk-C7F7MMXS.mjs +68 -0
- package/dist/chunk-CABJXU6D.mjs +302 -0
- package/dist/chunk-CBSCX7RE.mjs +13 -0
- package/dist/chunk-CG3YNOEK.mjs +144 -0
- package/dist/chunk-CNZM6RE7.mjs +610 -0
- package/dist/chunk-CQWBG33R.mjs +30 -0
- package/dist/chunk-CRBKNYSH.mjs +275 -0
- package/dist/chunk-D3YQN7HV.mjs +30 -0
- package/dist/chunk-DFFLVEZ5.mjs +40 -0
- package/dist/chunk-DG7J63J2.mjs +1764 -0
- package/dist/chunk-DHF3B6D2.mjs +9 -0
- package/dist/chunk-DK4WIVY6.mjs +749 -0
- package/dist/chunk-DKOD27V5.mjs +175 -0
- package/dist/chunk-DLZWPHHO.mjs +20 -0
- package/dist/chunk-DTY37DDZ.mjs +20 -0
- package/dist/chunk-DXWAKJTM.mjs +108 -0
- package/dist/chunk-EAZDQKZL.mjs +259 -0
- package/dist/chunk-EFEGJQI5.mjs +34 -0
- package/dist/chunk-EG5MMCD4.mjs +50 -0
- package/dist/chunk-EHAU7SOS.mjs +1280 -0
- package/dist/chunk-EKFF2W4G.mjs +124 -0
- package/dist/chunk-EN5J6OFE.mjs +41 -0
- package/dist/chunk-EO7CNFE6.mjs +265 -0
- package/dist/chunk-EVPLJRXF.mjs +123 -0
- package/dist/chunk-EVY7AHQA.mjs +50 -0
- package/dist/chunk-EZGBAGIR.mjs +310 -0
- package/dist/chunk-F57Z263P.mjs +36 -0
- package/dist/chunk-F6ZOHZVB.mjs +9 -0
- package/dist/chunk-FA2DYBNX.mjs +6 -0
- package/dist/chunk-FHSC5X62.mjs +31 -0
- package/dist/chunk-FUDIA3GL.mjs +39 -0
- package/dist/chunk-FVMHCXYX.mjs +106 -0
- package/dist/chunk-FX5GXN2P.mjs +164 -0
- package/dist/chunk-FXYH54JP.mjs +16 -0
- package/dist/chunk-G22WWLPG.mjs +44 -0
- package/dist/chunk-G2GBTFKW.mjs +522 -0
- package/dist/chunk-G2J2T2QU.mjs +85 -0
- package/dist/chunk-G2VJOHHV.mjs +32 -0
- package/dist/chunk-G4M37GFI.mjs +98061 -0
- package/dist/chunk-G57B6U6Y.mjs +41 -0
- package/dist/chunk-GBFVWROS.mjs +58 -0
- package/dist/chunk-GF7N2AY2.mjs +79 -0
- package/dist/chunk-GGTFPFCV.mjs +1150 -0
- package/dist/chunk-HE77DA46.mjs +108 -0
- package/dist/chunk-HKYVPRUA.mjs +182 -0
- package/dist/chunk-HVQIZLNB.mjs +108 -0
- package/dist/chunk-I2GUUJVE.mjs +127 -0
- package/dist/chunk-IR5DHEKS.mjs +9 -0
- package/dist/chunk-IU262EDH.mjs +495 -0
- package/dist/chunk-IUCDCPJU.mjs +0 -0
- package/dist/chunk-IW4TACOD.mjs +55 -0
- package/dist/chunk-IXXG72CP.mjs +422 -0
- package/dist/chunk-JHATTPS3.mjs +6 -0
- package/dist/chunk-JO7JAVWB.mjs +170 -0
- package/dist/chunk-JQ67EF5F.mjs +101 -0
- package/dist/chunk-K5DSJBZS.mjs +556 -0
- package/dist/chunk-KA4KBTUN.mjs +29 -0
- package/dist/chunk-KIASDQKH.mjs +51 -0
- package/dist/chunk-KPLL3ATX.mjs +97 -0
- package/dist/chunk-L7YA4D55.mjs +61 -0
- package/dist/chunk-LEYWBRRG.mjs +225 -0
- package/dist/chunk-LKWTBYYC.mjs +35 -0
- package/dist/chunk-LLJB2TFN.mjs +50 -0
- package/dist/chunk-LQTHYS2Z.mjs +0 -0
- package/dist/chunk-LSEYENCI.mjs +14 -0
- package/dist/chunk-LT4MVCA7.mjs +19 -0
- package/dist/chunk-LWUDSTVZ.mjs +128 -0
- package/dist/chunk-LXIJHOSW.mjs +43 -0
- package/dist/chunk-LZX5TJ65.mjs +42 -0
- package/dist/chunk-MFALVTRQ.mjs +181 -0
- package/dist/chunk-MKJPYPAH.mjs +516 -0
- package/dist/chunk-MOSRJHJ3.mjs +31 -0
- package/dist/chunk-N7BIDSR6.mjs +45 -0
- package/dist/chunk-ND3ODI36.mjs +161 -0
- package/dist/chunk-NOAFLTPV.mjs +99 -0
- package/dist/chunk-NPOS27VN.mjs +29 -0
- package/dist/chunk-NQMO3WSW.mjs +98 -0
- package/dist/chunk-NSKLCNSB.mjs +1106 -0
- package/dist/chunk-NTEWUH4C.mjs +65 -0
- package/dist/chunk-NUHHTFNL.mjs +1144 -0
- package/dist/chunk-OAHCJFG3.mjs +17 -0
- package/dist/chunk-OK4NIKP5.mjs +84 -0
- package/dist/chunk-OMC5JCQH.mjs +31 -0
- package/dist/chunk-OWHSIJ2H.mjs +37 -0
- package/dist/chunk-P3DRE4IY.mjs +39 -0
- package/dist/chunk-P3UUX2T6.mjs +9 -0
- package/dist/chunk-P3VJXF6S.mjs +345 -0
- package/dist/chunk-PB5SVVN2.mjs +117 -0
- package/dist/chunk-PEZUM4LH.mjs +174 -0
- package/dist/chunk-PMA2D6IL.mjs +49 -0
- package/dist/chunk-PQGZLPCG.mjs +61 -0
- package/dist/chunk-PXZ7QYKX.mjs +14 -0
- package/dist/chunk-PYIO3TDQ.mjs +18 -0
- package/dist/chunk-QAFVGV7P.mjs +47 -0
- package/dist/chunk-QDRW4DAC.mjs +363 -0
- package/dist/chunk-QJ6SBVJ2.mjs +17 -0
- package/dist/chunk-QKARRHBY.mjs +146 -0
- package/dist/chunk-QNGB3OCG.mjs +391 -0
- package/dist/chunk-QVJ6Q4XS.mjs +157 -0
- package/dist/chunk-QZ5QAA5L.mjs +89 -0
- package/dist/chunk-QZ7TP4HQ.mjs +7 -0
- package/dist/chunk-R65S6ZZV.mjs +70 -0
- package/dist/chunk-RIV7FKGN.mjs +31 -0
- package/dist/chunk-RPAL6FHW.mjs +73 -0
- package/dist/chunk-RREPQMYC.mjs +116 -0
- package/dist/chunk-S3REQHPQ.mjs +86 -0
- package/dist/chunk-S4DMV3ZT.mjs +35 -0
- package/dist/chunk-SC6BSTC7.mjs +38 -0
- package/dist/chunk-SLYFSTN7.mjs +824 -0
- package/dist/chunk-SZXVOG6N.mjs +42 -0
- package/dist/chunk-T7THKDM2.mjs +132 -0
- package/dist/chunk-TCNCAWYD.mjs +9 -0
- package/dist/chunk-TDK3JDOB.mjs +31 -0
- package/dist/chunk-TNJMHOGZ.mjs +34 -0
- package/dist/chunk-TU3OVBKQ.mjs +87 -0
- package/dist/chunk-TXO6ZWHH.mjs +79 -0
- package/dist/chunk-U7I66IFZ.mjs +88 -0
- package/dist/chunk-UC26CCHZ.mjs +45 -0
- package/dist/chunk-UCZNM66J.mjs +22 -0
- package/dist/chunk-ULSPL3DR.mjs +126 -0
- package/dist/chunk-UVPCTLA2.mjs +79 -0
- package/dist/chunk-V7OUZM56.mjs +83 -0
- package/dist/chunk-VAO4P4YN.mjs +44 -0
- package/dist/chunk-W4OT76ZB.mjs +23 -0
- package/dist/chunk-W7625H47.mjs +18 -0
- package/dist/chunk-WATKBUHQ.mjs +12 -0
- package/dist/chunk-WILMJYUB.mjs +35 -0
- package/dist/chunk-WJ4YB5O4.mjs +87 -0
- package/dist/chunk-WKOPGFW5.mjs +8 -0
- package/dist/chunk-WMOGMKQN.mjs +0 -0
- package/dist/chunk-WRSGHGAT.mjs +41 -0
- package/dist/chunk-X4LMDPH5.mjs +52 -0
- package/dist/chunk-X6BAAGCL.mjs +48 -0
- package/dist/chunk-XIM7X4FB.mjs +83 -0
- package/dist/chunk-XIWUBH6W.mjs +37 -0
- package/dist/chunk-XJYL2XTV.mjs +280 -0
- package/dist/chunk-XP4VHZBM.mjs +162 -0
- package/dist/chunk-XR4GEMGR.mjs +31 -0
- package/dist/chunk-XRTVFYCW.mjs +0 -0
- package/dist/chunk-XU4GD2XM.mjs +360 -0
- package/dist/chunk-XUQVQCAO.mjs +16 -0
- package/dist/chunk-YF6NQZGM.mjs +78 -0
- package/dist/chunk-YOYOJU5D.mjs +0 -0
- package/dist/chunk-YVPTNVHA.mjs +792 -0
- package/dist/chunk-YWU55M6Z.mjs +183 -0
- package/dist/chunk-Z5LP57ST.mjs +160 -0
- package/dist/chunk-ZFCG2354.mjs +98 -0
- package/dist/chunk-ZGI57SVH.mjs +49 -0
- package/dist/chunk-ZNSZ45XP.mjs +193 -0
- package/dist/chunk-ZQRKUG6J.mjs +72 -0
- package/dist/collection-add-products-IY6FQ72Q.mjs +287 -0
- package/dist/collection-create-HT3M5GN2.mjs +134 -0
- package/dist/collection-detail-B2ITEYFM.mjs +469 -0
- package/dist/collection-edit-XFZ2MCJM.mjs +125 -0
- package/dist/collection-list-XOQQ2LT2.mjs +257 -0
- package/dist/collection-metadata-3EZ5FMJI.mjs +73 -0
- package/dist/customer-create-PGX4DCTL.mjs +183 -0
- package/dist/customer-create-address-QOU74N6J.mjs +293 -0
- package/dist/customer-detail-HUXNR3Y5.mjs +706 -0
- package/dist/customer-edit-T4TG2APF.mjs +194 -0
- package/dist/customer-group-add-customers-62EAFEKD.mjs +244 -0
- package/dist/customer-group-create-QE5D76WG.mjs +113 -0
- package/dist/customer-group-detail-PE3DCMPC.mjs +437 -0
- package/dist/customer-group-edit-O3TX6KF5.mjs +110 -0
- package/dist/customer-group-list-IXQNLETU.mjs +268 -0
- package/dist/customer-group-metadata-FKKGWCL3.mjs +44 -0
- package/dist/customer-list-M7XWLNDQ.mjs +163 -0
- package/dist/customer-metadata-72M7HMZU.mjs +44 -0
- package/dist/customers-add-customer-group-B6KORLWA.mjs +279 -0
- package/dist/edit-inventory-item-44J2OXJL.mjs +130 -0
- package/dist/edit-inventory-item-attributes-S3HC6QLQ.mjs +297 -0
- package/dist/edit-reservation-LOB3RJ7B.mjs +249 -0
- package/dist/edit-rules-HUMVN4MD.mjs +272 -0
- package/dist/en.json +3311 -0
- package/dist/home-KFQGXKRT.mjs +16 -0
- package/dist/index.d.ts +10 -0
- package/dist/inventory-create-ZPUOJP7S.mjs +599 -0
- package/dist/inventory-detail-IBGA6OJ5.mjs +751 -0
- package/dist/inventory-list-4C5Z7CC5.mjs +413 -0
- package/dist/inventory-metadata-774S7FV4.mjs +74 -0
- package/dist/inventory-stock-RBIJMUBV.mjs +293 -0
- package/dist/invite-3KUCHUTF.mjs +362 -0
- package/dist/location-create-YRQYKOVU.mjs +240 -0
- package/dist/location-detail-F6MVSFSE.mjs +823 -0
- package/dist/location-edit-RZAKOXKH.mjs +256 -0
- package/dist/location-fulfillment-providers-3ODKOKQV.mjs +291 -0
- package/dist/location-list-C4EDJMIE.mjs +323 -0
- package/dist/location-sales-channels-NFDU7PBR.mjs +189 -0
- package/dist/location-service-zone-create-KFEG2FP7.mjs +174 -0
- package/dist/location-service-zone-edit-RWWWYJ7O.mjs +137 -0
- package/dist/location-service-zone-manage-areas-GPWFFIBT.mjs +155 -0
- package/dist/location-service-zone-shipping-option-create-PB4OXW3T.mjs +796 -0
- package/dist/location-service-zone-shipping-option-edit-7ME3GVRL.mjs +368 -0
- package/dist/location-service-zone-shipping-option-pricing-E24IAV36.mjs +357 -0
- package/dist/login-WSXW2XIW.mjs +325 -0
- package/dist/manage-locations-4DGVNLYL.mjs +250 -0
- package/dist/no-match-4YRQTKJD.mjs +33 -0
- package/dist/order-allocate-items-LSVBTKPE.mjs +558 -0
- package/dist/order-create-claim-BS7QRFZT.mjs +2143 -0
- package/dist/order-create-edit-BNIKKD6R.mjs +772 -0
- package/dist/order-create-exchange-LZZOJKHY.mjs +2144 -0
- package/dist/order-create-fulfillment-YWEDORGR.mjs +610 -0
- package/dist/order-create-refund-J5FTOWGJ.mjs +690 -0
- package/dist/order-create-return-SI4UJIK5.mjs +1288 -0
- package/dist/order-create-shipment-M2TDSJP6.mjs +284 -0
- package/dist/order-detail-WTAGF6K5.mjs +3553 -0
- package/dist/order-edit-billing-address-RYPXALHJ.mjs +300 -0
- package/dist/order-edit-email-Y5YD24FI.mjs +148 -0
- package/dist/order-edit-shipping-address-5G5S5JG2.mjs +297 -0
- package/dist/order-export-HCIPFZXG.mjs +131 -0
- package/dist/order-list-4JYZ5PVV.mjs +330 -0
- package/dist/order-metadata-IG4BXARU.mjs +73 -0
- package/dist/order-receive-return-I6LBDB3Q.mjs +554 -0
- package/dist/order-request-transfer-EMUBP52T.mjs +575 -0
- package/dist/price-list-configuration-HAVZ2V7E.mjs +355 -0
- package/dist/price-list-create-RAZUHESH.mjs +960 -0
- package/dist/price-list-detail-TNP75PRJ.mjs +559 -0
- package/dist/price-list-edit-7SW7BUF4.mjs +227 -0
- package/dist/price-list-list-5N5HJPM3.mjs +251 -0
- package/dist/price-list-prices-add-7IEBI6VR.mjs +615 -0
- package/dist/price-list-prices-edit-JHHVHIK3.mjs +313 -0
- package/dist/product-attributes-FZN5FBTN.mjs +340 -0
- package/dist/product-create-KOARKVLW.mjs +2231 -0
- package/dist/product-create-option-NPEDGHZE.mjs +151 -0
- package/dist/product-create-variant-43Y5RF3E.mjs +823 -0
- package/dist/product-detail-IN2O5DEF.mjs +1256 -0
- package/dist/product-edit-RLW4J3UB.mjs +313 -0
- package/dist/product-edit-option-66YVWG6O.mjs +157 -0
- package/dist/product-export-YAB56R6E.mjs +131 -0
- package/dist/product-image-variants-edit-LUKL275V.mjs +334 -0
- package/dist/product-import-AX6Q42LM.mjs +268 -0
- package/dist/product-list-TF24QRNG.mjs +459 -0
- package/dist/product-media-3DQ2LIUB.mjs +701 -0
- package/dist/product-metadata-7SAZ35AT.mjs +74 -0
- package/dist/product-organization-YN7YXIWS.mjs +281 -0
- package/dist/product-prices-LOUY77V4.mjs +227 -0
- package/dist/product-sales-channels-S2OD4436.mjs +165 -0
- package/dist/product-shipping-profile-WD6LOI4M.mjs +145 -0
- package/dist/product-stock-HZRHSEDF.mjs +545 -0
- package/dist/product-tag-create-UUM4ZE2M.mjs +127 -0
- package/dist/product-tag-detail-W6M2LEQR.mjs +304 -0
- package/dist/product-tag-edit-674OSZZH.mjs +140 -0
- package/dist/product-tag-list-RXZFET7E.mjs +282 -0
- package/dist/product-tag-metadata-GRLX3C2Q.mjs +73 -0
- package/dist/product-type-create-XY5BE533.mjs +103 -0
- package/dist/product-type-detail-22ZHL6DS.mjs +265 -0
- package/dist/product-type-edit-M2U7YUJD.mjs +117 -0
- package/dist/product-type-list-3JY7CTAA.mjs +201 -0
- package/dist/product-type-metadata-PSRCZKDV.mjs +73 -0
- package/dist/product-variant-detail-4F6IX6MM.mjs +571 -0
- package/dist/product-variant-edit-IRUNIAYG.mjs +539 -0
- package/dist/product-variant-manage-inventory-items-ET6YPQP3.mjs +343 -0
- package/dist/product-variant-media-DRT5DE5P.mjs +376 -0
- package/dist/product-variant-metadata-HRVK7DEZ.mjs +77 -0
- package/dist/profile-detail-VNUJILTO.mjs +96 -0
- package/dist/profile-edit-TFV42P22.mjs +177 -0
- package/dist/promotion-add-campaign-HB2IHPPX.mjs +45 -0
- package/dist/promotion-create-S6FP2NTH.mjs +1227 -0
- package/dist/promotion-detail-AECYBJWT.mjs +509 -0
- package/dist/promotion-edit-details-2UNVLLBP.mjs +498 -0
- package/dist/promotion-list-PYMKNPW3.mjs +216 -0
- package/dist/refund-reason-create-75WFVL5X.mjs +195 -0
- package/dist/refund-reason-edit-JLIAOA54.mjs +196 -0
- package/dist/refund-reason-list-EWXWKRUP.mjs +246 -0
- package/dist/region-add-countries-FH7WTMU5.mjs +223 -0
- package/dist/region-create-2T4MWC4Z.mjs +497 -0
- package/dist/region-detail-B3GUB37B.mjs +494 -0
- package/dist/region-edit-2FSEVLOP.mjs +310 -0
- package/dist/region-list-QEADKLOY.mjs +215 -0
- package/dist/region-metadata-NFYAHB2F.mjs +74 -0
- package/dist/reservation-create-ND6DSNKT.mjs +312 -0
- package/dist/reservation-detail-YBOFICEP.mjs +235 -0
- package/dist/reservation-list-K44BOK7R.mjs +302 -0
- package/dist/reservation-metadata-PDKWSVYX.mjs +74 -0
- package/dist/reset-password-E7TYBPPE.mjs +381 -0
- package/dist/return-reason-create-MGNM7VYN.mjs +163 -0
- package/dist/return-reason-edit-OM3Y5MMI.mjs +168 -0
- package/dist/return-reason-list-7SNQPIIW.mjs +245 -0
- package/dist/sales-channel-add-products-ZHJ3AGRH.mjs +274 -0
- package/dist/sales-channel-create-XG3PEX3G.mjs +156 -0
- package/dist/sales-channel-detail-XFSOLMFO.mjs +442 -0
- package/dist/sales-channel-edit-DG27YNYG.mjs +166 -0
- package/dist/sales-channel-list-AJ6P4KAT.mjs +207 -0
- package/dist/sales-channel-metadata-BA3SFE2P.mjs +79 -0
- package/dist/settings-FKUZ6EYT.mjs +19 -0
- package/dist/settings-KJGPXBDJ.mjs +549 -0
- package/dist/shipping-option-type-create-HDNTVL56.mjs +198 -0
- package/dist/shipping-option-type-detail-RLTKAAQK.mjs +180 -0
- package/dist/shipping-option-type-edit-KEDMAP7J.mjs +197 -0
- package/dist/shipping-option-type-list-L5PZ7ZFM.mjs +279 -0
- package/dist/shipping-profile-create-Z7XRDHU3.mjs +125 -0
- package/dist/shipping-profile-detail-AYYBFPSQ.mjs +165 -0
- package/dist/shipping-profile-metadata-35WEIPZB.mjs +75 -0
- package/dist/shipping-profiles-list-YSYM46QD.mjs +251 -0
- package/dist/store-add-currencies-QGLOAIJO.mjs +300 -0
- package/dist/store-add-locales-72674T3W.mjs +82 -0
- package/dist/store-detail-VKOWH3SL.mjs +781 -0
- package/dist/store-edit-XCBTEI35.mjs +247 -0
- package/dist/store-metadata-V4SGUYKY.mjs +72 -0
- package/dist/tax-region-create-G3BOD6C5.mjs +301 -0
- package/dist/tax-region-detail-FS6ZNEAI.mjs +388 -0
- package/dist/tax-region-edit-INVOVYED.mjs +167 -0
- package/dist/tax-region-list-KQP4Q3E5.mjs +100 -0
- package/dist/tax-region-province-create-OFPOZSXU.mjs +312 -0
- package/dist/tax-region-province-detail-RN64NGAZ.mjs +280 -0
- package/dist/tax-region-tax-override-create-3Q56UJRX.mjs +681 -0
- package/dist/tax-region-tax-override-edit-LJ7AI3XV.mjs +273 -0
- package/dist/tax-region-tax-rate-create-VXJ3UZTT.mjs +195 -0
- package/dist/tax-region-tax-rate-edit-PBFVAWDZ.mjs +195 -0
- package/dist/translation-list-77WQA3S6.mjs +582 -0
- package/dist/translations-edit-2ASRTZ77.mjs +674 -0
- package/dist/user-detail-PHL64WWP.mjs +172 -0
- package/dist/user-edit-33WO64ER.mjs +118 -0
- package/dist/user-invite-F5D5RCWB.mjs +343 -0
- package/dist/user-list-IL65REDJ.mjs +165 -0
- package/dist/user-metadata-OUQI74YV.mjs +74 -0
- package/dist/workflow-execution-detail-7U67F575.mjs +840 -0
- package/dist/workflow-execution-list-54WC7PFS.mjs +179 -0
- package/package.json +89 -0
- package/src/app.tsx +34 -0
- package/src/assets/fonts/Inter-Medium.ttf +0 -0
- package/src/assets/fonts/Inter-Regular.ttf +0 -0
- package/src/assets/fonts/RobotoMono-Medium.ttf +0 -0
- package/src/assets/fonts/RobotoMono-Regular.ttf +0 -0
- package/src/components/authentication/protected-route/index.ts +1 -0
- package/src/components/authentication/protected-route/protected-route.tsx +30 -0
- package/src/components/common/action-menu/action-menu.tsx +125 -0
- package/src/components/common/action-menu/index.ts +1 -0
- package/src/components/common/badge-list-summary/badge-list-summary.tsx +81 -0
- package/src/components/common/badge-list-summary/index.ts +1 -0
- package/src/components/common/chip-group/chip-group.tsx +111 -0
- package/src/components/common/chip-group/index.ts +1 -0
- package/src/components/common/conditional-tooltip/conditional-tooltip.tsx +20 -0
- package/src/components/common/conditional-tooltip/index.ts +1 -0
- package/src/components/common/customer-info/customer-info.tsx +202 -0
- package/src/components/common/customer-info/index.ts +1 -0
- package/src/components/common/date-range-display/date-range-display.tsx +73 -0
- package/src/components/common/date-range-display/index.ts +1 -0
- package/src/components/common/display-id/display-id.tsx +30 -0
- package/src/components/common/display-id/index.ts +1 -0
- package/src/components/common/empty-table-content/empty-table-content.tsx +106 -0
- package/src/components/common/empty-table-content/index.ts +1 -0
- package/src/components/common/file-preview/file-preview.tsx +130 -0
- package/src/components/common/file-preview/index.ts +1 -0
- package/src/components/common/file-upload/file-upload.tsx +156 -0
- package/src/components/common/file-upload/index.ts +1 -0
- package/src/components/common/form/form.tsx +222 -0
- package/src/components/common/form/index.ts +1 -0
- package/src/components/common/icon-avatar/icon-avatar.tsx +42 -0
- package/src/components/common/icon-avatar/index.ts +1 -0
- package/src/components/common/infinite-list/index.ts +1 -0
- package/src/components/common/infinite-list/infinite-list.tsx +156 -0
- package/src/components/common/json-view-section/index.ts +1 -0
- package/src/components/common/json-view-section/json-view-section.tsx +201 -0
- package/src/components/common/link-button/index.ts +1 -0
- package/src/components/common/link-button/link-button.tsx +29 -0
- package/src/components/common/list-summary/index.ts +1 -0
- package/src/components/common/list-summary/list-summary.tsx +70 -0
- package/src/components/common/listicle/index.ts +1 -0
- package/src/components/common/listicle/listicle.tsx +34 -0
- package/src/components/common/logo-box/avatar-box.tsx +87 -0
- package/src/components/common/logo-box/index.ts +2 -0
- package/src/components/common/logo-box/logo-box.tsx +74 -0
- package/src/components/common/metadata-section/index.ts +1 -0
- package/src/components/common/metadata-section/metadata-section.tsx +49 -0
- package/src/components/common/progress-bar/index.ts +1 -0
- package/src/components/common/progress-bar/progress-bar.tsx +33 -0
- package/src/components/common/section/index.ts +1 -0
- package/src/components/common/section/section-row.tsx +41 -0
- package/src/components/common/segmented-control/index.ts +2 -0
- package/src/components/common/segmented-control/segmented-control.tsx +53 -0
- package/src/components/common/sidebar-link/indext.ts +1 -0
- package/src/components/common/sidebar-link/sidebar-link.tsx +47 -0
- package/src/components/common/skeleton/index.ts +1 -0
- package/src/components/common/skeleton/skeleton.tsx +327 -0
- package/src/components/common/sortable-list/index.ts +1 -0
- package/src/components/common/sortable-list/sortable-list.tsx +228 -0
- package/src/components/common/sortable-tree/index.ts +1 -0
- package/src/components/common/sortable-tree/keyboard-coordinates.ts +156 -0
- package/src/components/common/sortable-tree/sortable-tree-item.tsx +62 -0
- package/src/components/common/sortable-tree/sortable-tree.tsx +379 -0
- package/src/components/common/sortable-tree/tree-item.tsx +207 -0
- package/src/components/common/sortable-tree/types.ts +23 -0
- package/src/components/common/sortable-tree/utils.ts +299 -0
- package/src/components/common/switch-box/index.ts +1 -0
- package/src/components/common/switch-box/switch-box.tsx +76 -0
- package/src/components/common/tax-badge/tax-badge.tsx +30 -0
- package/src/components/common/thumbnail/index.ts +1 -0
- package/src/components/common/thumbnail/thumbnail.tsx +32 -0
- package/src/components/common/user-link/index.ts +1 -0
- package/src/components/common/user-link/user-link.tsx +45 -0
- package/src/components/data-grid/components/data-grid-boolean-cell.tsx +71 -0
- package/src/components/data-grid/components/data-grid-cell-container.tsx +97 -0
- package/src/components/data-grid/components/data-grid-country-select-cell.tsx +149 -0
- package/src/components/data-grid/components/data-grid-currency-cell.tsx +140 -0
- package/src/components/data-grid/components/data-grid-duplicate-cell.tsx +21 -0
- package/src/components/data-grid/components/data-grid-keyboard-shortcut-modal.tsx +245 -0
- package/src/components/data-grid/components/data-grid-multiline-cell.tsx +103 -0
- package/src/components/data-grid/components/data-grid-number-cell.tsx +94 -0
- package/src/components/data-grid/components/data-grid-readonly-cell.tsx +43 -0
- package/src/components/data-grid/components/data-grid-root.tsx +1156 -0
- package/src/components/data-grid/components/data-grid-row-error-indicator.tsx +55 -0
- package/src/components/data-grid/components/data-grid-select-cell.tsx +55 -0
- package/src/components/data-grid/components/data-grid-skeleton.tsx +63 -0
- package/src/components/data-grid/components/data-grid-text-cell.tsx +75 -0
- package/src/components/data-grid/components/data-grid-textarea-modal-cell.tsx +233 -0
- package/src/components/data-grid/components/data-grid-toggleable-number-cell.tsx +206 -0
- package/src/components/data-grid/components/index.ts +9 -0
- package/src/components/data-grid/context/data-grid-context.tsx +45 -0
- package/src/components/data-grid/context/index.ts +2 -0
- package/src/components/data-grid/context/use-data-grid-context.tsx +14 -0
- package/src/components/data-grid/data-grid.tsx +56 -0
- package/src/components/data-grid/helpers/create-data-grid-column-helper.ts +93 -0
- package/src/components/data-grid/helpers/create-data-grid-price-columns.tsx +136 -0
- package/src/components/data-grid/helpers/index.ts +2 -0
- package/src/components/data-grid/hooks/index.ts +14 -0
- package/src/components/data-grid/hooks/use-data-grid-cell-error.tsx +78 -0
- package/src/components/data-grid/hooks/use-data-grid-cell-handlers.tsx +162 -0
- package/src/components/data-grid/hooks/use-data-grid-cell-metadata.tsx +75 -0
- package/src/components/data-grid/hooks/use-data-grid-cell-snapshot.tsx +75 -0
- package/src/components/data-grid/hooks/use-data-grid-cell.tsx +257 -0
- package/src/components/data-grid/hooks/use-data-grid-clipboard-events.tsx +105 -0
- package/src/components/data-grid/hooks/use-data-grid-column-visibility.tsx +68 -0
- package/src/components/data-grid/hooks/use-data-grid-duplicate-cell.tsx +18 -0
- package/src/components/data-grid/hooks/use-data-grid-error-highlighting.tsx +133 -0
- package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +237 -0
- package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +732 -0
- package/src/components/data-grid/hooks/use-data-grid-mouse-up-event.tsx +96 -0
- package/src/components/data-grid/hooks/use-data-grid-navigation.tsx +113 -0
- package/src/components/data-grid/hooks/use-data-grid-query-tool.tsx +15 -0
- package/src/components/data-grid/index.ts +2 -0
- package/src/components/data-grid/models/data-grid-bulk-update-command.ts +38 -0
- package/src/components/data-grid/models/data-grid-matrix.ts +421 -0
- package/src/components/data-grid/models/data-grid-query-tool.ts +74 -0
- package/src/components/data-grid/models/data-grid-update-command.ts +33 -0
- package/src/components/data-grid/models/index.ts +5 -0
- package/src/components/data-grid/types.ts +173 -0
- package/src/components/data-grid/utils.ts +28 -0
- package/src/components/data-table/components/data-table-status-cell/data-table-status-cell.tsx +35 -0
- package/src/components/data-table/data-table.tsx +545 -0
- package/src/components/data-table/helpers/general/use-data-table-date-columns.tsx +61 -0
- package/src/components/data-table/helpers/general/use-data-table-date-filters.tsx +95 -0
- package/src/components/data-table/helpers/sales-channels/index.ts +4 -0
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-columns.tsx +61 -0
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-empty-state.tsx +22 -0
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-filters.tsx +33 -0
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-query.tsx +30 -0
- package/src/components/data-table/index.ts +1 -0
- package/src/components/filtering/filter-group/filter-group.tsx +58 -0
- package/src/components/filtering/filter-group/index.ts +1 -0
- package/src/components/filtering/order-by/index.ts +1 -0
- package/src/components/filtering/order-by/order-by.tsx +151 -0
- package/src/components/filtering/query/index.ts +1 -0
- package/src/components/filtering/query/query.tsx +57 -0
- package/src/components/forms/address-form/address-form.tsx +228 -0
- package/src/components/forms/address-form/index.ts +1 -0
- package/src/components/forms/email-form/email-form.tsx +42 -0
- package/src/components/forms/email-form/index.ts +1 -0
- package/src/components/forms/metadata-form/index.ts +1 -0
- package/src/components/forms/metadata-form/metadata-form.tsx +438 -0
- package/src/components/inputs/chip-input/chip-input.tsx +191 -0
- package/src/components/inputs/chip-input/index.ts +1 -0
- package/src/components/inputs/combobox/combobox.tsx +422 -0
- package/src/components/inputs/combobox/index.ts +1 -0
- package/src/components/inputs/country-select/country-select.tsx +53 -0
- package/src/components/inputs/country-select/index.ts +1 -0
- package/src/components/inputs/handle-input/handle-input.tsx +24 -0
- package/src/components/inputs/handle-input/index.ts +1 -0
- package/src/components/inputs/percentage-input/index.ts +1 -0
- package/src/components/inputs/percentage-input/percentage-input.tsx +105 -0
- package/src/components/inputs/province-select/index.ts +1 -0
- package/src/components/inputs/province-select/province-select.tsx +91 -0
- package/src/components/layout/main-layout/index.ts +1 -0
- package/src/components/layout/main-layout/main-layout.tsx +389 -0
- package/src/components/layout/nav-item/index.ts +1 -0
- package/src/components/layout/nav-item/nav-item.tsx +254 -0
- package/src/components/layout/notifications/index.ts +1 -0
- package/src/components/layout/notifications/notifications.tsx +232 -0
- package/src/components/layout/pages/index.ts +2 -0
- package/src/components/layout/pages/single-column-page/index.ts +1 -0
- package/src/components/layout/pages/single-column-page/single-column-page.tsx +63 -0
- package/src/components/layout/pages/two-column-page/index.ts +1 -0
- package/src/components/layout/pages/two-column-page/two-column-page.tsx +141 -0
- package/src/components/layout/pages/types.ts +15 -0
- package/src/components/layout/public-layout/index.ts +1 -0
- package/src/components/layout/public-layout/public-layout.tsx +5 -0
- package/src/components/layout/settings-layout/index.ts +1 -0
- package/src/components/layout/settings-layout/settings-layout.tsx +266 -0
- package/src/components/layout/shell/index.ts +1 -0
- package/src/components/layout/shell/shell.tsx +263 -0
- package/src/components/layout/user-menu/index.ts +1 -0
- package/src/components/layout/user-menu/user-menu.tsx +344 -0
- package/src/components/localization/localized-table-pagination/index.ts +1 -0
- package/src/components/localization/localized-table-pagination/localized-table-pagination.tsx +26 -0
- package/src/components/modals/hooks/use-state-aware-to.tsx +32 -0
- package/src/components/modals/index.ts +7 -0
- package/src/components/modals/route-drawer/index.ts +1 -0
- package/src/components/modals/route-drawer/route-drawer.tsx +82 -0
- package/src/components/modals/route-focus-modal/index.ts +1 -0
- package/src/components/modals/route-focus-modal/route-focus-modal.tsx +109 -0
- package/src/components/modals/route-modal-form/index.ts +1 -0
- package/src/components/modals/route-modal-form/route-modal-form.tsx +93 -0
- package/src/components/modals/route-modal-provider/index.ts +2 -0
- package/src/components/modals/route-modal-provider/route-modal-context.tsx +12 -0
- package/src/components/modals/route-modal-provider/route-provider.tsx +51 -0
- package/src/components/modals/route-modal-provider/use-route-modal.tsx +12 -0
- package/src/components/modals/stacked-drawer/index.ts +1 -0
- package/src/components/modals/stacked-drawer/stacked-drawer.tsx +85 -0
- package/src/components/modals/stacked-focus-modal/index.ts +1 -0
- package/src/components/modals/stacked-focus-modal/stacked-focus-modal.tsx +98 -0
- package/src/components/modals/stacked-modal-provider/index.ts +2 -0
- package/src/components/modals/stacked-modal-provider/stacked-modal-context.tsx +10 -0
- package/src/components/modals/stacked-modal-provider/stacked-modal-provider.tsx +54 -0
- package/src/components/modals/stacked-modal-provider/use-stacked-modal.ts +14 -0
- package/src/components/search/constants.ts +30 -0
- package/src/components/search/index.ts +1 -0
- package/src/components/search/search.tsx +576 -0
- package/src/components/search/types.ts +20 -0
- package/src/components/search/use-search-results.tsx +752 -0
- package/src/components/table/configurable-data-table/configurable-data-table.tsx +240 -0
- package/src/components/table/configurable-data-table/index.ts +3 -0
- package/src/components/table/configurable-data-table/save-view-dropdown.tsx +87 -0
- package/src/components/table/data-table/data-table-filter/context.tsx +19 -0
- package/src/components/table/data-table/data-table-filter/data-table-filter.tsx +296 -0
- package/src/components/table/data-table/data-table-filter/date-filter.tsx +328 -0
- package/src/components/table/data-table/data-table-filter/filter-chip.tsx +97 -0
- package/src/components/table/data-table/data-table-filter/index.ts +1 -0
- package/src/components/table/data-table/data-table-filter/number-filter.tsx +316 -0
- package/src/components/table/data-table/data-table-filter/select-filter.tsx +201 -0
- package/src/components/table/data-table/data-table-filter/string-filter.tsx +125 -0
- package/src/components/table/data-table/data-table-filter/types.ts +9 -0
- package/src/components/table/data-table/data-table-order-by/data-table-order-by.tsx +153 -0
- package/src/components/table/data-table/data-table-order-by/index.ts +1 -0
- package/src/components/table/data-table/data-table-query/data-table-query.tsx +39 -0
- package/src/components/table/data-table/data-table-query/index.ts +1 -0
- package/src/components/table/data-table/data-table-root/data-table-root.tsx +382 -0
- package/src/components/table/data-table/data-table-root/index.ts +1 -0
- package/src/components/table/data-table/data-table-search/data-table-search.tsx +61 -0
- package/src/components/table/data-table/data-table-search/index.ts +1 -0
- package/src/components/table/data-table/data-table.tsx +96 -0
- package/src/components/table/data-table/hooks.tsx +73 -0
- package/src/components/table/data-table/index.ts +2 -0
- package/src/components/table/save-view-dialog/index.ts +1 -0
- package/src/components/table/save-view-dialog/save-view-dialog.tsx +163 -0
- package/src/components/table/save-view-dropdown/index.ts +1 -0
- package/src/components/table/save-view-dropdown/save-view-dropdown.tsx +88 -0
- package/src/components/table/table-cells/common/code-cell/code-cell.tsx +27 -0
- package/src/components/table/table-cells/common/code-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/created-at-cell/created-at-cell.tsx +44 -0
- package/src/components/table/table-cells/common/created-at-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/date-cell/date-cell.tsx +44 -0
- package/src/components/table/table-cells/common/date-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/email-cell/email-cell.tsx +28 -0
- package/src/components/table/table-cells/common/email-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/money-amount-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/money-amount-cell/money-amount-cell.tsx +38 -0
- package/src/components/table/table-cells/common/name-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/name-cell/name-cell.tsx +31 -0
- package/src/components/table/table-cells/common/placeholder-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/placeholder-cell/placeholder-cell.tsx +7 -0
- package/src/components/table/table-cells/common/status-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/status-cell/status-cell.tsx +35 -0
- package/src/components/table/table-cells/common/text-cell/index.ts +1 -0
- package/src/components/table/table-cells/common/text-cell/text-cell.tsx +49 -0
- package/src/components/table/table-cells/customer/account-cell/account-cell.tsx +27 -0
- package/src/components/table/table-cells/customer/first-seen-cell/first-seen-cell.tsx +25 -0
- package/src/components/table/table-cells/customer/first-seen-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/country-cell/country-cell.tsx +36 -0
- package/src/components/table/table-cells/order/country-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/customer-cell/customer-cell.tsx +31 -0
- package/src/components/table/table-cells/order/customer-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/display-id-cell/display-id-cell.tsx +24 -0
- package/src/components/table/table-cells/order/display-id-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/fulfillment-status-cell/fulfillment-status-cell.tsx +35 -0
- package/src/components/table/table-cells/order/fulfillment-status-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/payment-status-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/payment-status-cell/payment-status-cell.tsx +26 -0
- package/src/components/table/table-cells/order/sales-channel-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/sales-channel-cell/sales-channel-cell.tsx +30 -0
- package/src/components/table/table-cells/order/total-cell/index.ts +1 -0
- package/src/components/table/table-cells/order/total-cell/total-cell.tsx +29 -0
- package/src/components/table/table-cells/product/collection-cell/collection-cell.tsx +30 -0
- package/src/components/table/table-cells/product/collection-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/product-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/product-cell/product-cell.tsx +31 -0
- package/src/components/table/table-cells/product/product-status-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/product-status-cell/product-status-cell.tsx +31 -0
- package/src/components/table/table-cells/product/sales-channels-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/sales-channels-cell/sales-channels-cell.tsx +67 -0
- package/src/components/table/table-cells/product/variant-cell/index.ts +1 -0
- package/src/components/table/table-cells/product/variant-cell/variant-cell.tsx +34 -0
- package/src/components/table/table-cells/promotion/status-cell/index.ts +1 -0
- package/src/components/table/table-cells/promotion/status-cell/status-cell.tsx +13 -0
- package/src/components/table/table-cells/region/countries-cell/countries-cell.tsx +39 -0
- package/src/components/table/table-cells/region/countries-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/fulfillment-providers-cell/fulfillment-providers-cell.tsx +49 -0
- package/src/components/table/table-cells/region/fulfillment-providers-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/payment-providers-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/payment-providers-cell/payment-providers-cell.tsx +36 -0
- package/src/components/table/table-cells/region/region-cell/index.ts +1 -0
- package/src/components/table/table-cells/region/region-cell/region-cell.tsx +23 -0
- package/src/components/table/table-cells/sales-channel/description-cell/description-cell.tsx +28 -0
- package/src/components/table/table-cells/sales-channel/description-cell/index.ts +1 -0
- package/src/components/table/table-cells/sales-channel/name-cell/index.ts +1 -0
- package/src/components/table/table-cells/sales-channel/name-cell/name-cell.tsx +28 -0
- package/src/components/table/table-cells/shipping-option/admin-only-cell/admin-only-cell.tsx +25 -0
- package/src/components/table/table-cells/shipping-option/admin-only-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/is-return-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/is-return-cell/is-return-cell.tsx +27 -0
- package/src/components/table/table-cells/shipping-option/price-type-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/price-type-cell/price-type-cell.tsx +34 -0
- package/src/components/table/table-cells/shipping-option/shipping-option-cell/index.ts +1 -0
- package/src/components/table/table-cells/shipping-option/shipping-option-cell/shipping-option-cell.tsx +28 -0
- package/src/components/table/table-cells/shipping-option/shipping-price-cell/shipping-price-cell.tsx +31 -0
- package/src/components/table/table-cells/taxes/type-cell/index.ts +1 -0
- package/src/components/table/table-cells/taxes/type-cell/type-cell.tsx +33 -0
- package/src/components/table/view-selector/index.ts +2 -0
- package/src/components/table/view-selector/view-pills.tsx +265 -0
- package/src/components/table/view-selector/view-selector.tsx +253 -0
- package/src/components/utilities/error-boundary/error-boundary.tsx +75 -0
- package/src/components/utilities/error-boundary/index.ts +1 -0
- package/src/components/utilities/generic-forward-ref/generic-forward-ref.tsx +7 -0
- package/src/components/utilities/generic-forward-ref/index.ts +1 -0
- package/src/components/utilities/i18n/i18n.tsx +33 -0
- package/src/components/utilities/i18n/index.ts +1 -0
- package/src/components/utilities/keybound-form/index.ts +1 -0
- package/src/components/utilities/keybound-form/keybound-form.tsx +42 -0
- package/src/components/utilities/visually-hidden/index.ts +1 -0
- package/src/components/utilities/visually-hidden/visually-hidden.tsx +5 -0
- package/src/dashboard-app/__tests__/sort-menu-items-by-rank.spec.ts +169 -0
- package/src/dashboard-app/dashboard-app.tsx +499 -0
- package/src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx +116 -0
- package/src/dashboard-app/forms/form-extension-zone/index.ts +1 -0
- package/src/dashboard-app/forms/form-extension-zone/types.ts +1 -0
- package/src/dashboard-app/forms/form-extension-zone/utils.ts +66 -0
- package/src/dashboard-app/forms/hooks.tsx +86 -0
- package/src/dashboard-app/forms/index.ts +2 -0
- package/src/dashboard-app/index.ts +12 -0
- package/src/dashboard-app/links/utils.ts +20 -0
- package/src/dashboard-app/routes/get-route.map.tsx +1904 -0
- package/src/dashboard-app/routes/utils.ts +229 -0
- package/src/dashboard-app/types.ts +143 -0
- package/src/dashboard-app/utils/sort-menu-items-by-rank.ts +43 -0
- package/src/hooks/api/api-keys.tsx +179 -0
- package/src/hooks/api/auth.tsx +75 -0
- package/src/hooks/api/campaigns.tsx +138 -0
- package/src/hooks/api/categories.tsx +186 -0
- package/src/hooks/api/claims.tsx +593 -0
- package/src/hooks/api/cloud.tsx +41 -0
- package/src/hooks/api/collections.tsx +180 -0
- package/src/hooks/api/currencies.tsx +52 -0
- package/src/hooks/api/customer-groups.tsx +207 -0
- package/src/hooks/api/customers.tsx +263 -0
- package/src/hooks/api/exchanges.tsx +475 -0
- package/src/hooks/api/feature-flags.tsx +26 -0
- package/src/hooks/api/fulfillment-providers.tsx +59 -0
- package/src/hooks/api/fulfillment-sets.tsx +180 -0
- package/src/hooks/api/fulfillment.tsx +66 -0
- package/src/hooks/api/index.ts +41 -0
- package/src/hooks/api/inventory.tsx +274 -0
- package/src/hooks/api/invites.tsx +135 -0
- package/src/hooks/api/locales.tsx +52 -0
- package/src/hooks/api/notification.tsx +52 -0
- package/src/hooks/api/order-edits.tsx +242 -0
- package/src/hooks/api/orders.tsx +457 -0
- package/src/hooks/api/payment-collections.tsx +104 -0
- package/src/hooks/api/payments.tsx +116 -0
- package/src/hooks/api/plugins.tsx +28 -0
- package/src/hooks/api/price-lists.tsx +199 -0
- package/src/hooks/api/price-preferences.tsx +113 -0
- package/src/hooks/api/product-types.tsx +152 -0
- package/src/hooks/api/product-variants.tsx +69 -0
- package/src/hooks/api/products.tsx +508 -0
- package/src/hooks/api/promotions.tsx +286 -0
- package/src/hooks/api/refund-reasons.tsx +124 -0
- package/src/hooks/api/regions.tsx +131 -0
- package/src/hooks/api/reservations.tsx +149 -0
- package/src/hooks/api/return-reasons.tsx +132 -0
- package/src/hooks/api/returns.tsx +651 -0
- package/src/hooks/api/sales-channels.tsx +236 -0
- package/src/hooks/api/shipping-option-types.tsx +128 -0
- package/src/hooks/api/shipping-options.tsx +128 -0
- package/src/hooks/api/shipping-profiles.tsx +131 -0
- package/src/hooks/api/stock-locations.tsx +202 -0
- package/src/hooks/api/store.tsx +83 -0
- package/src/hooks/api/tags.tsx +160 -0
- package/src/hooks/api/tax-rates.tsx +127 -0
- package/src/hooks/api/tax-regions.tsx +124 -0
- package/src/hooks/api/translations.tsx +241 -0
- package/src/hooks/api/users.tsx +150 -0
- package/src/hooks/api/views.tsx +244 -0
- package/src/hooks/api/workflow-executions.tsx +52 -0
- package/src/hooks/table/columns/index.ts +12 -0
- package/src/hooks/table/columns/use-campaign-table-columns.tsx +73 -0
- package/src/hooks/table/columns/use-collection-table-columns.tsx +33 -0
- package/src/hooks/table/columns/use-column-state.ts +209 -0
- package/src/hooks/table/columns/use-configurable-table-columns.tsx +109 -0
- package/src/hooks/table/columns/use-customer-group-table-columns.tsx +33 -0
- package/src/hooks/table/columns/use-customer-table-columns.tsx +51 -0
- package/src/hooks/table/columns/use-fulfillment-provider-table-columns.tsx +25 -0
- package/src/hooks/table/columns/use-order-data-table-columns.tsx +234 -0
- package/src/hooks/table/columns/use-order-table-columns.tsx +162 -0
- package/src/hooks/table/columns/use-product-table-columns.tsx +59 -0
- package/src/hooks/table/columns/use-product-tag-table-columns.tsx +35 -0
- package/src/hooks/table/columns/use-product-type-table-columns.tsx +36 -0
- package/src/hooks/table/columns/use-promotion-table-columns.tsx +49 -0
- package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +39 -0
- package/src/hooks/table/columns/use-region-table-columns.tsx +40 -0
- package/src/hooks/table/columns/use-return-reason-table-columns.tsx +32 -0
- package/src/hooks/table/columns/use-shipping-option-table-columns.tsx +89 -0
- package/src/hooks/table/columns/use-shipping-option-type-table-columns.tsx +44 -0
- package/src/hooks/table/columns/use-tax-rates-table-columns.tsx +55 -0
- package/src/hooks/table/filters/index.ts +12 -0
- package/src/hooks/table/filters/use-collection-table-filters.tsx +7 -0
- package/src/hooks/table/filters/use-customer-group-table-filters.tsx +21 -0
- package/src/hooks/table/filters/use-customer-table-filters.tsx +68 -0
- package/src/hooks/table/filters/use-date-table-filters.tsx +17 -0
- package/src/hooks/table/filters/use-order-table-filters.tsx +158 -0
- package/src/hooks/table/filters/use-product-table-filters.tsx +212 -0
- package/src/hooks/table/filters/use-product-tag-table-filters.tsx +7 -0
- package/src/hooks/table/filters/use-product-type-table-filters.tsx +7 -0
- package/src/hooks/table/filters/use-promotion-table-filters.tsx +13 -0
- package/src/hooks/table/filters/use-region-table-filters.tsx +19 -0
- package/src/hooks/table/filters/use-shipping-option-table-filters.tsx +30 -0
- package/src/hooks/table/filters/use-shipping-option-type-table-filters.tsx +5 -0
- package/src/hooks/table/filters/use-tax-rate-table-filters.tsx +19 -0
- package/src/hooks/table/query/index.ts +15 -0
- package/src/hooks/table/query/use-campaign-table-query.tsx +31 -0
- package/src/hooks/table/query/use-collection-table-query.tsx +33 -0
- package/src/hooks/table/query/use-customer-group-table-query.tsx +33 -0
- package/src/hooks/table/query/use-customer-table-query.tsx +44 -0
- package/src/hooks/table/query/use-fulfillment-providers-table-query.tsx +31 -0
- package/src/hooks/table/query/use-order-table-query.tsx +57 -0
- package/src/hooks/table/query/use-product-table-query.tsx +72 -0
- package/src/hooks/table/query/use-product-tag-table-query.tsx +32 -0
- package/src/hooks/table/query/use-product-type-table-query.tsx +32 -0
- package/src/hooks/table/query/use-product-variant-table-query.tsx +32 -0
- package/src/hooks/table/query/use-promotion-table-query.tsx +33 -0
- package/src/hooks/table/query/use-refund-reason-table-query.tsx +32 -0
- package/src/hooks/table/query/use-region-table-query.tsx +33 -0
- package/src/hooks/table/query/use-return-reason-table-query.tsx +32 -0
- package/src/hooks/table/query/use-shipping-option-table-query.tsx +61 -0
- package/src/hooks/table/query/use-shipping-option-type-table-query.tsx +32 -0
- package/src/hooks/table/query/use-tax-rate-table-query.tsx +33 -0
- package/src/hooks/table/query/use-tax-region-table-query.tsx +32 -0
- package/src/hooks/table/query/use-user-invite-table-query.tsx +32 -0
- package/src/hooks/table/use-table-configuration.tsx +287 -0
- package/src/hooks/use-combined-refs.tsx +19 -0
- package/src/hooks/use-combobox-data.tsx +123 -0
- package/src/hooks/use-command-history.tsx +67 -0
- package/src/hooks/use-data-table.tsx +132 -0
- package/src/hooks/use-date.tsx +48 -0
- package/src/hooks/use-debounced-search.tsx +29 -0
- package/src/hooks/use-document-direction.tsx +54 -0
- package/src/hooks/use-handle-table-scroll.tsx +24 -0
- package/src/hooks/use-infinite-list.tsx +92 -0
- package/src/hooks/use-media-query.tsx +14 -0
- package/src/hooks/use-query-params.tsx +24 -0
- package/src/hooks/use-view-configurations.tsx +102 -0
- package/src/i18n/config.ts +16 -0
- package/src/i18n/languages.ts +223 -0
- package/src/i18n/translations/$schema.json +12399 -0
- package/src/i18n/translations/__tests__/validate-translations.spec.ts +67 -0
- package/src/i18n/translations/ar.json +2956 -0
- package/src/i18n/translations/bg.json +2987 -0
- package/src/i18n/translations/bs.json +3016 -0
- package/src/i18n/translations/cs.json +3050 -0
- package/src/i18n/translations/de.json +2792 -0
- package/src/i18n/translations/el.json +2960 -0
- package/src/i18n/translations/en.json +3311 -0
- package/src/i18n/translations/es.json +3167 -0
- package/src/i18n/translations/fa.json +2932 -0
- package/src/i18n/translations/fr.json +2791 -0
- package/src/i18n/translations/he.json +3017 -0
- package/src/i18n/translations/hu.json +3005 -0
- package/src/i18n/translations/id.json +3020 -0
- package/src/i18n/translations/index.ts +126 -0
- package/src/i18n/translations/it.json +2805 -0
- package/src/i18n/translations/ja.json +2821 -0
- package/src/i18n/translations/ko.json +3026 -0
- package/src/i18n/translations/lt.json +3007 -0
- package/src/i18n/translations/mk.json +2925 -0
- package/src/i18n/translations/mn.json +2922 -0
- package/src/i18n/translations/nl.json +3005 -0
- package/src/i18n/translations/pl.json +3227 -0
- package/src/i18n/translations/ptBR.json +2789 -0
- package/src/i18n/translations/ptPT.json +3219 -0
- package/src/i18n/translations/ro.json +2935 -0
- package/src/i18n/translations/ru.json +2936 -0
- package/src/i18n/translations/th.json +2792 -0
- package/src/i18n/translations/tr.json +2961 -0
- package/src/i18n/translations/uk.json +2856 -0
- package/src/i18n/translations/vi.json +3051 -0
- package/src/i18n/translations/zhCN.json +3017 -0
- package/src/i18n/translations/zhTW.json +3249 -0
- package/src/i18n/types.ts +15 -0
- package/src/i18next.d.ts +7 -0
- package/src/index.css +48 -0
- package/src/index.ts +2 -0
- package/src/lib/addresses.ts +97 -0
- package/src/lib/cast-number.ts +6 -0
- package/src/lib/client/client.ts +18 -0
- package/src/lib/client/index.ts +1 -0
- package/src/lib/common.ts +45 -0
- package/src/lib/credit-line.ts +8 -0
- package/src/lib/data/countries.ts +1767 -0
- package/src/lib/data/country-states.ts +1311 -0
- package/src/lib/data/currencies.ts +752 -0
- package/src/lib/form-helpers.ts +69 -0
- package/src/lib/format-currency.ts +7 -0
- package/src/lib/format-provider.ts +18 -0
- package/src/lib/is-fetch-error.ts +5 -0
- package/src/lib/money-amount-helpers.ts +75 -0
- package/src/lib/number-helper.ts +19 -0
- package/src/lib/order-helpers.ts +74 -0
- package/src/lib/order-item.ts +5 -0
- package/src/lib/orders.ts +23 -0
- package/src/lib/payment.ts +23 -0
- package/src/lib/percentage-helpers.ts +28 -0
- package/src/lib/plugins.ts +7 -0
- package/src/lib/promotions.ts +51 -0
- package/src/lib/query-client.ts +13 -0
- package/src/lib/query-key-factory.ts +53 -0
- package/src/lib/rma.ts +17 -0
- package/src/lib/schemas.ts +36 -0
- package/src/lib/shipping-options.ts +62 -0
- package/src/lib/storefront.ts +2 -0
- package/src/lib/table/cell-renderers.tsx +332 -0
- package/src/lib/table/entity-adapters.tsx +138 -0
- package/src/lib/table/entity-defaults.ts +73 -0
- package/src/lib/table/field-utils.ts +75 -0
- package/src/lib/table/table-adapters.ts +94 -0
- package/src/lib/table-display-utils.tsx +372 -0
- package/src/lib/validation.ts +101 -0
- package/src/main.tsx +9 -0
- package/src/module.d.ts +41 -0
- package/src/providers/extension-provider/extension-context.tsx +8 -0
- package/src/providers/extension-provider/extension-provider.tsx +18 -0
- package/src/providers/extension-provider/index.ts +2 -0
- package/src/providers/extension-provider/use-extension.tsx +10 -0
- package/src/providers/feature-flag-provider/index.tsx +46 -0
- package/src/providers/i18n-provider/i18n-provider.tsx +25 -0
- package/src/providers/i18n-provider/index.ts +1 -0
- package/src/providers/index.ts +1 -0
- package/src/providers/keybind-provider/hooks.tsx +319 -0
- package/src/providers/keybind-provider/index.ts +3 -0
- package/src/providers/keybind-provider/keybind-context.tsx +4 -0
- package/src/providers/keybind-provider/keybind-provider.tsx +64 -0
- package/src/providers/keybind-provider/types.ts +28 -0
- package/src/providers/keybind-provider/utils.ts +92 -0
- package/src/providers/providers.tsx +34 -0
- package/src/providers/search-provider/index.ts +2 -0
- package/src/providers/search-provider/search-context.tsx +9 -0
- package/src/providers/search-provider/search-provider.tsx +50 -0
- package/src/providers/search-provider/use-search.tsx +10 -0
- package/src/providers/sidebar-provider/index.ts +2 -0
- package/src/providers/sidebar-provider/sidebar-context.tsx +9 -0
- package/src/providers/sidebar-provider/sidebar-provider.tsx +31 -0
- package/src/providers/sidebar-provider/use-sidebar.tsx +12 -0
- package/src/providers/theme-provider/index.ts +3 -0
- package/src/providers/theme-provider/theme-context.tsx +11 -0
- package/src/providers/theme-provider/theme-provider.tsx +84 -0
- package/src/providers/theme-provider/use-theme.tsx +10 -0
- package/src/routes/api-key-management/api-key-management-create/api-key-management-create.tsx +15 -0
- package/src/routes/api-key-management/api-key-management-create/components/api-key-create-form/api-key-create-form.tsx +205 -0
- package/src/routes/api-key-management/api-key-management-create/components/api-key-create-form/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-create/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-detail/api-key-management-detail.tsx +48 -0
- package/src/routes/api-key-management/api-key-management-detail/breadcrumb.tsx +24 -0
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-general-section/api-key-general-section.tsx +249 -0
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-general-section/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +206 -0
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-detail/index.ts +3 -0
- package/src/routes/api-key-management/api-key-management-detail/loader.ts +17 -0
- package/src/routes/api-key-management/api-key-management-edit/api-key-management-edit.tsx +34 -0
- package/src/routes/api-key-management/api-key-management-edit/components/edit-api-key-form/edit-api-key-form.tsx +87 -0
- package/src/routes/api-key-management/api-key-management-edit/components/edit-api-key-form/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-edit/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-list/api-key-management-list.tsx +25 -0
- package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/api-key-management-list-table.tsx +93 -0
- package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/api-key-row-actions.tsx +123 -0
- package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-columns.tsx +80 -0
- package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-filters.tsx +18 -0
- package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-query.tsx +34 -0
- package/src/routes/api-key-management/api-key-management-list/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-sales-channels/api-key-management-sales-channels.tsx +32 -0
- package/src/routes/api-key-management/api-key-management-sales-channels/components/api-key-sales-channels-form/api-key-sales-channels-form.tsx +202 -0
- package/src/routes/api-key-management/api-key-management-sales-channels/components/api-key-sales-channels-form/index.ts +1 -0
- package/src/routes/api-key-management/api-key-management-sales-channels/index.ts +1 -0
- package/src/routes/api-key-management/common/constants.ts +4 -0
- package/src/routes/api-key-management/common/utils.ts +62 -0
- package/src/routes/campaigns/add-campaign-promotions/add-campaign-promotions.tsx +19 -0
- package/src/routes/campaigns/add-campaign-promotions/components/add-campaign-promotions-form.tsx +260 -0
- package/src/routes/campaigns/add-campaign-promotions/components/index.ts +1 -0
- package/src/routes/campaigns/add-campaign-promotions/index.ts +1 -0
- package/src/routes/campaigns/campaign-budget-edit/campaign-budget-edit.tsx +29 -0
- package/src/routes/campaigns/campaign-budget-edit/components/edit-campaign-budget-form/edit-campaign-budget-form.tsx +138 -0
- package/src/routes/campaigns/campaign-budget-edit/components/edit-campaign-budget-form/index.ts +1 -0
- package/src/routes/campaigns/campaign-budget-edit/index.ts +1 -0
- package/src/routes/campaigns/campaign-configuration/campaign-configuration.tsx +33 -0
- package/src/routes/campaigns/campaign-configuration/components/campaign-configuration-form/campaign-configuration-form.tsx +134 -0
- package/src/routes/campaigns/campaign-configuration/components/campaign-configuration-form/index.ts +1 -0
- package/src/routes/campaigns/campaign-configuration/index.ts +1 -0
- package/src/routes/campaigns/campaign-create/campaign-create.tsx +10 -0
- package/src/routes/campaigns/campaign-create/components/create-campaign-form/create-campaign-form.tsx +113 -0
- package/src/routes/campaigns/campaign-create/components/create-campaign-form/index.ts +1 -0
- package/src/routes/campaigns/campaign-create/index.ts +1 -0
- package/src/routes/campaigns/campaign-detail/breadcrumb.tsx +29 -0
- package/src/routes/campaigns/campaign-detail/campaign-detail.tsx +69 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +88 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-budget/index.ts +1 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-configuration-section/campaign-configuration-section.tsx +43 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-configuration-section/index.ts +1 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-general-section/campaign-general-section.tsx +137 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-general-section/index.ts +1 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-promotion-section/campaign-promotion-section.tsx +237 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-promotion-section/index.ts +1 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-spend/campaign-spend.tsx +61 -0
- package/src/routes/campaigns/campaign-detail/components/campaign-spend/index.ts +1 -0
- package/src/routes/campaigns/campaign-detail/constants.ts +1 -0
- package/src/routes/campaigns/campaign-detail/index.ts +3 -0
- package/src/routes/campaigns/campaign-detail/loader.ts +21 -0
- package/src/routes/campaigns/campaign-edit/campaign-edit.tsx +33 -0
- package/src/routes/campaigns/campaign-edit/components/edit-campaign-form/edit-campaign-form.tsx +194 -0
- package/src/routes/campaigns/campaign-edit/components/edit-campaign-form/index.ts +1 -0
- package/src/routes/campaigns/campaign-edit/index.ts +1 -0
- package/src/routes/campaigns/campaign-list/campaign-list.tsx +19 -0
- package/src/routes/campaigns/campaign-list/components/campaign-list-table.tsx +157 -0
- package/src/routes/campaigns/campaign-list/components/index.ts +1 -0
- package/src/routes/campaigns/campaign-list/index.ts +1 -0
- package/src/routes/campaigns/common/components/create-campaign-form-fields/create-campaign-form-fields.tsx +402 -0
- package/src/routes/campaigns/common/components/create-campaign-form-fields/index.ts +1 -0
- package/src/routes/campaigns/common/constants.ts +15 -0
- package/src/routes/campaigns/common/utils/campaign-status.ts +31 -0
- package/src/routes/categories/categories-metadata/categories-metadata.tsx +30 -0
- package/src/routes/categories/categories-metadata/index.ts +1 -0
- package/src/routes/categories/category-create/category-create.tsx +16 -0
- package/src/routes/categories/category-create/components/create-category-form/create-category-details.tsx +144 -0
- package/src/routes/categories/category-create/components/create-category-form/create-category-form.tsx +209 -0
- package/src/routes/categories/category-create/components/create-category-form/create-category-nesting.tsx +114 -0
- package/src/routes/categories/category-create/components/create-category-form/index.ts +1 -0
- package/src/routes/categories/category-create/components/create-category-form/schema.ts +17 -0
- package/src/routes/categories/category-create/index.ts +1 -0
- package/src/routes/categories/category-detail/breadcrumb.tsx +29 -0
- package/src/routes/categories/category-detail/category-detail.tsx +65 -0
- package/src/routes/categories/category-detail/components/category-general-section/category-general-section.tsx +93 -0
- package/src/routes/categories/category-detail/components/category-general-section/index.ts +1 -0
- package/src/routes/categories/category-detail/components/category-organize-section/category-organize-section.tsx +216 -0
- package/src/routes/categories/category-detail/components/category-organize-section/index.ts +1 -0
- package/src/routes/categories/category-detail/components/category-product-section/category-product-section.tsx +204 -0
- package/src/routes/categories/category-detail/components/category-product-section/index.ts +1 -0
- package/src/routes/categories/category-detail/index.ts +3 -0
- package/src/routes/categories/category-detail/loader.ts +17 -0
- package/src/routes/categories/category-edit/category-edit.tsx +36 -0
- package/src/routes/categories/category-edit/components/edit-category-form/edit-category-form.tsx +204 -0
- package/src/routes/categories/category-edit/components/edit-category-form/index.ts +1 -0
- package/src/routes/categories/category-edit/index.ts +1 -0
- package/src/routes/categories/category-list/category-list.tsx +19 -0
- package/src/routes/categories/category-list/components/category-list-table/category-list-table.tsx +169 -0
- package/src/routes/categories/category-list/components/category-list-table/index.ts +1 -0
- package/src/routes/categories/category-list/components/category-list-table/use-category-table-columns.tsx +116 -0
- package/src/routes/categories/category-list/components/category-list-table/use-category-table-query.tsx +23 -0
- package/src/routes/categories/category-list/index.ts +1 -0
- package/src/routes/categories/category-organize/category-organize.tsx +10 -0
- package/src/routes/categories/category-organize/components/organize-category-form/index.ts +1 -0
- package/src/routes/categories/category-organize/components/organize-category-form/organize-category-form.tsx +131 -0
- package/src/routes/categories/category-organize/index.ts +1 -0
- package/src/routes/categories/category-products/category-products.tsx +30 -0
- package/src/routes/categories/category-products/components/edit-category-products-form/edit-category-products-form.tsx +245 -0
- package/src/routes/categories/category-products/components/edit-category-products-form/index.ts +1 -0
- package/src/routes/categories/category-products/index.ts +1 -0
- package/src/routes/categories/common/components/category-tree/category-tree.tsx +55 -0
- package/src/routes/categories/common/components/category-tree/index.ts +1 -0
- package/src/routes/categories/common/hooks/use-delete-product-category-action.tsx +49 -0
- package/src/routes/categories/common/types.ts +7 -0
- package/src/routes/categories/common/utils.ts +157 -0
- package/src/routes/collections/collection-add-products/collection-add-products.tsx +22 -0
- package/src/routes/collections/collection-add-products/components/add-products-to-collection-form/add-products-to-collection-form.tsx +259 -0
- package/src/routes/collections/collection-add-products/components/add-products-to-collection-form/index.ts +1 -0
- package/src/routes/collections/collection-add-products/index.ts +1 -0
- package/src/routes/collections/collection-create/collection-create.tsx +10 -0
- package/src/routes/collections/collection-create/components/create-collection-form/create-collection-form.tsx +120 -0
- package/src/routes/collections/collection-create/components/create-collection-form/index.ts +1 -0
- package/src/routes/collections/collection-create/index.ts +1 -0
- package/src/routes/collections/collection-detail/breadcrumb.tsx +23 -0
- package/src/routes/collections/collection-detail/collection-detail.tsx +45 -0
- package/src/routes/collections/collection-detail/components/collection-general-section/collection-general-section.tsx +91 -0
- package/src/routes/collections/collection-detail/components/collection-general-section/index.ts +1 -0
- package/src/routes/collections/collection-detail/components/collection-product-section/collection-product-section.tsx +272 -0
- package/src/routes/collections/collection-detail/components/collection-product-section/index.ts +1 -0
- package/src/routes/collections/collection-detail/index.ts +3 -0
- package/src/routes/collections/collection-detail/loader.ts +17 -0
- package/src/routes/collections/collection-edit/collection-edit.tsx +27 -0
- package/src/routes/collections/collection-edit/components/edit-collection-form/edit-collection-form.tsx +110 -0
- package/src/routes/collections/collection-edit/components/edit-collection-form/index.ts +1 -0
- package/src/routes/collections/collection-edit/index.ts +1 -0
- package/src/routes/collections/collection-list/collection-list.tsx +18 -0
- package/src/routes/collections/collection-list/components/collection-list-table/collection-list-table.tsx +99 -0
- package/src/routes/collections/collection-list/components/collection-list-table/collection-row-actions.tsx +78 -0
- package/src/routes/collections/collection-list/components/collection-list-table/index.ts +1 -0
- package/src/routes/collections/collection-list/index.ts +1 -0
- package/src/routes/collections/collection-metadata/collection-metadata.tsx +26 -0
- package/src/routes/collections/collection-metadata/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-add-customers/components/add-customers-form/add-customers-form.tsx +245 -0
- package/src/routes/customer-groups/customer-group-add-customers/components/add-customers-form/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-add-customers/customer-group-add-customers.tsx +13 -0
- package/src/routes/customer-groups/customer-group-add-customers/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-create/components/create-customer-group-form/create-customer-group-form.tsx +110 -0
- package/src/routes/customer-groups/customer-group-create/components/create-customer-group-form/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-create/customer-group-create.tsx +10 -0
- package/src/routes/customer-groups/customer-group-create/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-detail/breadcrumb.tsx +31 -0
- package/src/routes/customer-groups/customer-group-detail/components/customer-group-customer-section/customer-group-customer-section.tsx +243 -0
- package/src/routes/customer-groups/customer-group-detail/components/customer-group-customer-section/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-detail/components/customer-group-general-section/customer-group-general-section.tsx +90 -0
- package/src/routes/customer-groups/customer-group-detail/components/customer-group-general-section/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-detail/constants.ts +1 -0
- package/src/routes/customer-groups/customer-group-detail/customer-group-detail.tsx +51 -0
- package/src/routes/customer-groups/customer-group-detail/index.ts +3 -0
- package/src/routes/customer-groups/customer-group-detail/loader.ts +20 -0
- package/src/routes/customer-groups/customer-group-edit/components/edit-customer-group-form/edit-customer-group-form.tsx +90 -0
- package/src/routes/customer-groups/customer-group-edit/components/edit-customer-group-form/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-edit/customer-group-edit.tsx +28 -0
- package/src/routes/customer-groups/customer-group-edit/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-list/components/customer-group-list-table/customer-group-list-table.tsx +223 -0
- package/src/routes/customer-groups/customer-group-list/components/customer-group-list-table/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-list/customer-group-list.tsx +18 -0
- package/src/routes/customer-groups/customer-group-list/index.ts +1 -0
- package/src/routes/customer-groups/customer-group-metadata/customer-metadata.tsx +26 -0
- package/src/routes/customer-groups/customer-group-metadata/index.ts +1 -0
- package/src/routes/customers/customer-create/components/create-customer-form/create-customer-form.tsx +179 -0
- package/src/routes/customers/customer-create/components/create-customer-form/index.ts +1 -0
- package/src/routes/customers/customer-create/customer-create.tsx +10 -0
- package/src/routes/customers/customer-create/index.ts +1 -0
- package/src/routes/customers/customer-create-address/components/create-customer-address-form/create-customer-address-form.tsx +282 -0
- package/src/routes/customers/customer-create-address/components/create-customer-address-form/index.ts +1 -0
- package/src/routes/customers/customer-create-address/customer-create-address.tsx +10 -0
- package/src/routes/customers/customer-create-address/index.ts +1 -0
- package/src/routes/customers/customer-detail/breadcrumb.tsx +29 -0
- package/src/routes/customers/customer-detail/components/customer-address-section/customer-address-section.tsx +104 -0
- package/src/routes/customers/customer-detail/components/customer-address-section/index.ts +1 -0
- package/src/routes/customers/customer-detail/components/customer-general-section/customer-general-section.tsx +127 -0
- package/src/routes/customers/customer-detail/components/customer-general-section/index.ts +1 -0
- package/src/routes/customers/customer-detail/components/customer-group-section/customer-group-section.tsx +269 -0
- package/src/routes/customers/customer-detail/components/customer-group-section/index.ts +1 -0
- package/src/routes/customers/customer-detail/components/customer-order-section/customer-order-section.tsx +130 -0
- package/src/routes/customers/customer-detail/components/customer-order-section/index.ts +1 -0
- package/src/routes/customers/customer-detail/customer-detail.tsx +58 -0
- package/src/routes/customers/customer-detail/index.ts +3 -0
- package/src/routes/customers/customer-detail/loader.ts +19 -0
- package/src/routes/customers/customer-edit/components/edit-customer-form/edit-customer-form.tsx +178 -0
- package/src/routes/customers/customer-edit/components/edit-customer-form/index.ts +1 -0
- package/src/routes/customers/customer-edit/customer-edit.tsx +26 -0
- package/src/routes/customers/customer-edit/index.ts +1 -0
- package/src/routes/customers/customer-list/components/customer-list-table/customer-list-table.tsx +124 -0
- package/src/routes/customers/customer-list/components/customer-list-table/index.ts +1 -0
- package/src/routes/customers/customer-list/customer-list.tsx +18 -0
- package/src/routes/customers/customer-list/index.ts +1 -0
- package/src/routes/customers/customer-metadata/customer-metadata.tsx +23 -0
- package/src/routes/customers/customer-metadata/index.ts +1 -0
- package/src/routes/customers/customers-add-customer-group/components/add-customers-form/add-customer-groups-form.tsx +257 -0
- package/src/routes/customers/customers-add-customer-group/components/add-customers-form/index.ts +1 -0
- package/src/routes/customers/customers-add-customer-group/customer-add-customer-groups.tsx +13 -0
- package/src/routes/customers/customers-add-customer-group/index.ts +1 -0
- package/src/routes/home/home.tsx +12 -0
- package/src/routes/home/index.ts +1 -0
- package/src/routes/inventory/common/constants.ts +1 -0
- package/src/routes/inventory/inventory-create/components/inventory-create-form/index.ts +1 -0
- package/src/routes/inventory/inventory-create/components/inventory-create-form/inventory-availability-form.tsx +78 -0
- package/src/routes/inventory/inventory-create/components/inventory-create-form/inventory-create-form.tsx +517 -0
- package/src/routes/inventory/inventory-create/components/inventory-create-form/schema.ts +23 -0
- package/src/routes/inventory/inventory-create/index.ts +1 -0
- package/src/routes/inventory/inventory-create/inventory-create.tsx +21 -0
- package/src/routes/inventory/inventory-detail/breadcrumb.tsx +31 -0
- package/src/routes/inventory/inventory-detail/components/adjust-inventory/adjust-inventory-drawer.tsx +55 -0
- package/src/routes/inventory/inventory-detail/components/adjust-inventory/components/adjust-inventory-form.tsx +178 -0
- package/src/routes/inventory/inventory-detail/components/adjust-inventory/index.ts +1 -0
- package/src/routes/inventory/inventory-detail/components/edit-inventory-item/components/edit-item-form.tsx +105 -0
- package/src/routes/inventory/inventory-detail/components/edit-inventory-item/edit-item-drawer.tsx +33 -0
- package/src/routes/inventory/inventory-detail/components/edit-inventory-item/index.ts +1 -0
- package/src/routes/inventory/inventory-detail/components/edit-inventory-item-attributes/components/edit-item-attributes-form.tsx +270 -0
- package/src/routes/inventory/inventory-detail/components/edit-inventory-item-attributes/edit-item-attributes-drawer.tsx +33 -0
- package/src/routes/inventory/inventory-detail/components/edit-inventory-item-attributes/index.ts +1 -0
- package/src/routes/inventory/inventory-detail/components/inventory-item-attributes/attributes-section.tsx +50 -0
- package/src/routes/inventory/inventory-detail/components/inventory-item-general-section.tsx +65 -0
- package/src/routes/inventory/inventory-detail/components/inventory-item-location-levels.tsx +26 -0
- package/src/routes/inventory/inventory-detail/components/inventory-item-reservations.tsx +28 -0
- package/src/routes/inventory/inventory-detail/components/inventory-item-variants/variants-section.tsx +72 -0
- package/src/routes/inventory/inventory-detail/components/location-levels-table/location-list-table.tsx +49 -0
- package/src/routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-columns.tsx +170 -0
- package/src/routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-query.tsx +32 -0
- package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-item.tsx +51 -0
- package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-search-input.tsx +34 -0
- package/src/routes/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx +183 -0
- package/src/routes/inventory/inventory-detail/components/manage-locations/index.ts +1 -0
- package/src/routes/inventory/inventory-detail/components/manage-locations/manage-locations-drawer.tsx +40 -0
- package/src/routes/inventory/inventory-detail/components/reservations-table/reservation-actions.tsx +64 -0
- package/src/routes/inventory/inventory-detail/components/reservations-table/reservation-list-table.tsx +70 -0
- package/src/routes/inventory/inventory-detail/components/reservations-table/use-reservation-list-table-columns.tsx +93 -0
- package/src/routes/inventory/inventory-detail/components/reservations-table/use-reservation-list-table-query.tsx +35 -0
- package/src/routes/inventory/inventory-detail/constants.ts +2 -0
- package/src/routes/inventory/inventory-detail/index.ts +3 -0
- package/src/routes/inventory/inventory-detail/inventory-detail.tsx +80 -0
- package/src/routes/inventory/inventory-detail/loader.ts +21 -0
- package/src/routes/inventory/inventory-list/components/inventory-actions.tsx +53 -0
- package/src/routes/inventory/inventory-list/components/inventory-list-table.tsx +105 -0
- package/src/routes/inventory/inventory-list/components/use-inventory-table-columns.tsx +125 -0
- package/src/routes/inventory/inventory-list/components/use-inventory-table-filters.tsx +82 -0
- package/src/routes/inventory/inventory-list/components/use-inventory-table-query.tsx +70 -0
- package/src/routes/inventory/inventory-list/index.ts +1 -0
- package/src/routes/inventory/inventory-list/inventory-list.tsx +18 -0
- package/src/routes/inventory/inventory-metadata/index.ts +1 -0
- package/src/routes/inventory/inventory-metadata/inventory-metadata.tsx +27 -0
- package/src/routes/inventory/inventory-stock/components/inventory-stock-form/index.ts +1 -0
- package/src/routes/inventory/inventory-stock/components/inventory-stock-form/inventory-stock-form.tsx +163 -0
- package/src/routes/inventory/inventory-stock/hooks/use-inventory-stock-columns.tsx +76 -0
- package/src/routes/inventory/inventory-stock/index.ts +1 -0
- package/src/routes/inventory/inventory-stock/inventory-stock.tsx +58 -0
- package/src/routes/inventory/inventory-stock/schema.ts +22 -0
- package/src/routes/invite/index.ts +1 -0
- package/src/routes/invite/invite.tsx +416 -0
- package/src/routes/locations/common/components/conditional-price-form/conditional-price-form.tsx +713 -0
- package/src/routes/locations/common/components/conditional-price-form/index.ts +1 -0
- package/src/routes/locations/common/components/geo-zone-form/geo-zone-form.tsx +327 -0
- package/src/routes/locations/common/components/geo-zone-form/index.ts +1 -0
- package/src/routes/locations/common/components/shipping-option-price-cell/index.ts +1 -0
- package/src/routes/locations/common/components/shipping-option-price-cell/shipping-option-price-cell.tsx +261 -0
- package/src/routes/locations/common/components/shipping-option-price-provider/index.ts +2 -0
- package/src/routes/locations/common/components/shipping-option-price-provider/shipping-option-price-context.tsx +10 -0
- package/src/routes/locations/common/components/shipping-option-price-provider/shipping-option-price-provider.tsx +23 -0
- package/src/routes/locations/common/components/shipping-option-price-provider/use-shipping-option-price.tsx +14 -0
- package/src/routes/locations/common/constants.ts +16 -0
- package/src/routes/locations/common/hooks/use-shipping-option-price-columns.tsx +174 -0
- package/src/routes/locations/common/schema.ts +192 -0
- package/src/routes/locations/common/types.ts +12 -0
- package/src/routes/locations/common/utils/get-custom-shipping-option-price-field-info.ts +19 -0
- package/src/routes/locations/common/utils/price-rule-helpers.ts +41 -0
- package/src/routes/locations/location-create/components/create-location-form/create-location-form.tsx +248 -0
- package/src/routes/locations/location-create/components/create-location-form/index.ts +1 -0
- package/src/routes/locations/location-create/index.ts +1 -0
- package/src/routes/locations/location-create/location-create.tsx +10 -0
- package/src/routes/locations/location-detail/breadcrumb.tsx +31 -0
- package/src/routes/locations/location-detail/components/location-fulfillment-providers-section/index.ts +1 -0
- package/src/routes/locations/location-detail/components/location-fulfillment-providers-section/location-fulfillment-providers-section.tsx +81 -0
- package/src/routes/locations/location-detail/components/location-general-section/index.ts +1 -0
- package/src/routes/locations/location-detail/components/location-general-section/location-general-section.tsx +661 -0
- package/src/routes/locations/location-detail/components/location-sales-channels-section/index.ts +1 -0
- package/src/routes/locations/location-detail/components/location-sales-channels-section/locations-sales-channels-section.tsx +76 -0
- package/src/routes/locations/location-detail/constants.ts +2 -0
- package/src/routes/locations/location-detail/index.ts +3 -0
- package/src/routes/locations/location-detail/loader.ts +23 -0
- package/src/routes/locations/location-detail/location-detail.tsx +64 -0
- package/src/routes/locations/location-edit/components/edit-location-form/edit-location-form.tsx +234 -0
- package/src/routes/locations/location-edit/components/edit-location-form/index.ts +1 -0
- package/src/routes/locations/location-edit/index.ts +1 -0
- package/src/routes/locations/location-edit/location-edit.tsx +33 -0
- package/src/routes/locations/location-fulfillment-providers/components/edit-fulfillment-providers-form/edit-fulfillment-providers-form.tsx +207 -0
- package/src/routes/locations/location-fulfillment-providers/components/edit-fulfillment-providers-form/index.ts +1 -0
- package/src/routes/locations/location-fulfillment-providers/index.ts +1 -0
- package/src/routes/locations/location-fulfillment-providers/location-fulfillment-providers.tsx +27 -0
- package/src/routes/locations/location-list/components/location-list-item/index.ts +1 -0
- package/src/routes/locations/location-list/components/location-list-item/location-list-item.tsx +186 -0
- package/src/routes/locations/location-list/constants.ts +3 -0
- package/src/routes/locations/location-list/index.ts +1 -0
- package/src/routes/locations/location-list/location-list.tsx +128 -0
- package/src/routes/locations/location-list/use-location-list-table-columns.tsx +185 -0
- package/src/routes/locations/location-list/use-location-list-table-query.tsx +22 -0
- package/src/routes/locations/location-sales-channels/components/edit-sales-channels-form/edit-sales-channels-form.tsx +177 -0
- package/src/routes/locations/location-sales-channels/components/edit-sales-channels-form/index.ts +1 -0
- package/src/routes/locations/location-sales-channels/index.ts +1 -0
- package/src/routes/locations/location-sales-channels/location-sales-channels.tsx +27 -0
- package/src/routes/locations/location-service-zone-create/components/create-service-zone-form/create-service-zone-form.tsx +146 -0
- package/src/routes/locations/location-service-zone-create/components/create-service-zone-form/index.ts +1 -0
- package/src/routes/locations/location-service-zone-create/index.ts +1 -0
- package/src/routes/locations/location-service-zone-create/location-service-zone-create.tsx +47 -0
- package/src/routes/locations/location-service-zone-edit/components/edit-region-form/edit-service-zone-form.tsx +105 -0
- package/src/routes/locations/location-service-zone-edit/components/edit-region-form/index.ts +1 -0
- package/src/routes/locations/location-service-zone-edit/index.ts +1 -0
- package/src/routes/locations/location-service-zone-edit/location-service-zone-edit.tsx +47 -0
- package/src/routes/locations/location-service-zone-manage-areas/components/edit-region-areas-form/edit-service-zone-areas-form.tsx +120 -0
- package/src/routes/locations/location-service-zone-manage-areas/components/edit-region-areas-form/index.ts +1 -0
- package/src/routes/locations/location-service-zone-manage-areas/index.ts +1 -0
- package/src/routes/locations/location-service-zone-manage-areas/location-service-zone-manage-areas.tsx +41 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-option-details-form.tsx +297 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-form.tsx +359 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-prices-form.tsx +145 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/index.ts +1 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/schema.ts +44 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/constants.ts +2 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/index.ts +1 -0
- package/src/routes/locations/location-service-zone-shipping-option-create/location-service-zone-shipping-option-create.tsx +55 -0
- package/src/routes/locations/location-service-zone-shipping-option-edit/components/edit-region-form/edit-shipping-option-form.tsx +314 -0
- package/src/routes/locations/location-service-zone-shipping-option-edit/components/edit-region-form/index.ts +1 -0
- package/src/routes/locations/location-service-zone-shipping-option-edit/index.ts +1 -0
- package/src/routes/locations/location-service-zone-shipping-option-edit/location-service-zone-shipping-option-edit.tsx +59 -0
- package/src/routes/locations/location-service-zone-shipping-option-pricing/components/create-shipping-options-form/edit-shipping-options-pricing-form.tsx +384 -0
- package/src/routes/locations/location-service-zone-shipping-option-pricing/components/create-shipping-options-form/index.ts +1 -0
- package/src/routes/locations/location-service-zone-shipping-option-pricing/index.ts +1 -0
- package/src/routes/locations/location-service-zone-shipping-option-pricing/location-service-zone-shipping-option-pricing.tsx +36 -0
- package/src/routes/login/components/cloud-auth-login.tsx +166 -0
- package/src/routes/login/index.ts +1 -0
- package/src/routes/login/login.tsx +175 -0
- package/src/routes/no-match/index.ts +1 -0
- package/src/routes/no-match/no-match.tsx +36 -0
- package/src/routes/orders/common/placeholders.tsx +48 -0
- package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/constants.ts +6 -0
- package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/index.ts +1 -0
- package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-form.tsx +349 -0
- package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-item.tsx +346 -0
- package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/utils.ts +28 -0
- package/src/routes/orders/order-allocate-items/index.ts +1 -0
- package/src/routes/orders/order-allocate-items/order-allocate-items.tsx +26 -0
- package/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/index.ts +1 -0
- package/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx +396 -0
- package/src/routes/orders/order-balance-settlement/index.ts +1 -0
- package/src/routes/orders/order-create-claim/claim-create.tsx +84 -0
- package/src/routes/orders/order-create-claim/components/add-claim-items-table/add-claim-items-table.tsx +283 -0
- package/src/routes/orders/order-create-claim/components/add-claim-items-table/index.ts +1 -0
- package/src/routes/orders/order-create-claim/components/add-claim-items-table/use-claim-item-table-columns.tsx +103 -0
- package/src/routes/orders/order-create-claim/components/add-claim-items-table/use-claim-item-table-filters.tsx +32 -0
- package/src/routes/orders/order-create-claim/components/add-claim-items-table/use-claim-item-table-query.tsx +61 -0
- package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/add-claim-outbound-items-table.tsx +94 -0
- package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/index.ts +1 -0
- package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/use-claim-outbound-item-table-columns.tsx +68 -0
- package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/use-claim-outbound-item-table-filters.tsx +22 -0
- package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/use-claim-outbound-item-table-query.tsx +40 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-create-form.tsx +1092 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-inbound-item.tsx +244 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-outbound-item.tsx +121 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/claim-outbound-section.tsx +442 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/index.ts +1 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/item-placeholder.tsx +11 -0
- package/src/routes/orders/order-create-claim/components/claim-create-form/schema.ts +24 -0
- package/src/routes/orders/order-create-claim/index.ts +1 -0
- package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/add-order-edit-items-table.tsx +87 -0
- package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/index.ts +1 -0
- package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/use-order-edit-item-table-columns.tsx +68 -0
- package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/use-order-edit-item-table-filters.tsx +22 -0
- package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/use-order-edit-item-table-query.tsx +26 -0
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/index.ts +1 -0
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-create-form.tsx +231 -0
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx +257 -0
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-items-section.tsx +145 -0
- package/src/routes/orders/order-create-edit/components/order-edit-create-form/schema.ts +8 -0
- package/src/routes/orders/order-create-edit/index.ts +1 -0
- package/src/routes/orders/order-create-edit/order-edit-create.tsx +65 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/add-exchange-inbound-items-table.tsx +193 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/index.ts +1 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/use-exchange-item-table-columns.tsx +103 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/use-exchange-item-table-filters.tsx +22 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/use-exchange-item-table-query.tsx +26 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/add-exchange-outbound-items-table.tsx +94 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/index.ts +1 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/use-exchange-outbound-item-table-columns.tsx +68 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/use-exchange-outbound-item-table-filters.tsx +22 -0
- package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/use-exchange-outbound-item-table-query.tsx +26 -0
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-create-form.tsx +652 -0
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-inbound-item.tsx +269 -0
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-inbound-section.tsx +546 -0
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-item.tsx +140 -0
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-section.tsx +450 -0
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/index.ts +1 -0
- package/src/routes/orders/order-create-exchange/components/exchange-create-form/schema.ts +25 -0
- package/src/routes/orders/order-create-exchange/exchange-create.tsx +84 -0
- package/src/routes/orders/order-create-exchange/index.ts +1 -0
- package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/constants.ts +8 -0
- package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/index.ts +1 -0
- package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-form.tsx +437 -0
- package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-item.tsx +250 -0
- package/src/routes/orders/order-create-fulfillment/index.ts +1 -0
- package/src/routes/orders/order-create-fulfillment/order-create-fulfillments.tsx +33 -0
- package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +306 -0
- package/src/routes/orders/order-create-refund/components/create-refund-form/index.ts +1 -0
- package/src/routes/orders/order-create-refund/index.ts +1 -0
- package/src/routes/orders/order-create-refund/order-create-refund.tsx +31 -0
- package/src/routes/orders/order-create-return/components/add-return-items-table/add-return-items-table.tsx +284 -0
- package/src/routes/orders/order-create-return/components/add-return-items-table/index.ts +1 -0
- package/src/routes/orders/order-create-return/components/add-return-items-table/use-return-item-table-columns.tsx +103 -0
- package/src/routes/orders/order-create-return/components/add-return-items-table/use-return-item-table-filters.tsx +32 -0
- package/src/routes/orders/order-create-return/components/add-return-items-table/use-return-item-table-query.tsx +61 -0
- package/src/routes/orders/order-create-return/components/return-create-form/index.ts +1 -0
- package/src/routes/orders/order-create-return/components/return-create-form/return-create-form.tsx +785 -0
- package/src/routes/orders/order-create-return/components/return-create-form/return-item.tsx +246 -0
- package/src/routes/orders/order-create-return/components/return-create-form/schema.ts +19 -0
- package/src/routes/orders/order-create-return/index.ts +1 -0
- package/src/routes/orders/order-create-return/return-create.tsx +80 -0
- package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/constants.ts +13 -0
- package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/index.ts +1 -0
- package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/order-create-shipment-form.tsx +234 -0
- package/src/routes/orders/order-create-shipment/index.ts +1 -0
- package/src/routes/orders/order-create-shipment/order-create-shipment.tsx +30 -0
- package/src/routes/orders/order-detail/breadcrumb.tsx +27 -0
- package/src/routes/orders/order-detail/components/active-order-claim-section/active-order-claim-section.tsx +79 -0
- package/src/routes/orders/order-detail/components/active-order-claim-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/active-order-exchange-section/active-order-exchange-section.tsx +83 -0
- package/src/routes/orders/order-detail/components/active-order-exchange-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/active-order-return-section/active-order-return-section.tsx +82 -0
- package/src/routes/orders/order-detail/components/active-order-return-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/copy-payment-link/copy-payment-link.tsx +80 -0
- package/src/routes/orders/order-detail/components/copy-payment-link/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-active-edit-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-active-edit-section/order-active-edit-section.tsx +199 -0
- package/src/routes/orders/order-detail/components/order-activity-section/activity-items.tsx +125 -0
- package/src/routes/orders/order-detail/components/order-activity-section/change-details-tooltip.tsx +74 -0
- package/src/routes/orders/order-detail/components/order-activity-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-activity-section.tsx +25 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-note-form.tsx +112 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +1121 -0
- package/src/routes/orders/order-detail/components/order-customer-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-customer-section/order-customer-section.tsx +68 -0
- package/src/routes/orders/order-detail/components/order-fulfillment-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx +489 -0
- package/src/routes/orders/order-detail/components/order-general-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-general-section/order-general-section.tsx +136 -0
- package/src/routes/orders/order-detail/components/order-payment-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-payment-section/order-payment-section.tsx +465 -0
- package/src/routes/orders/order-detail/components/order-summary-section/index.ts +1 -0
- package/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +1270 -0
- package/src/routes/orders/order-detail/components/order-summary-section/return-info-popover.tsx +90 -0
- package/src/routes/orders/order-detail/components/order-summary-section/shipping-info-popover.tsx +48 -0
- package/src/routes/orders/order-detail/constants.ts +64 -0
- package/src/routes/orders/order-detail/index.ts +3 -0
- package/src/routes/orders/order-detail/loader.ts +21 -0
- package/src/routes/orders/order-detail/order-detail.tsx +96 -0
- package/src/routes/orders/order-edit-billing-address/components/edit-order-billing-address-form/edit-order-billing-address-form.tsx +250 -0
- package/src/routes/orders/order-edit-billing-address/components/edit-order-billing-address-form/index.ts +1 -0
- package/src/routes/orders/order-edit-billing-address/index.ts +1 -0
- package/src/routes/orders/order-edit-billing-address/order-edit-billing-address.tsx +31 -0
- package/src/routes/orders/order-edit-email/components/edit-order-email-form/edit-order-email-form.tsx +95 -0
- package/src/routes/orders/order-edit-email/components/edit-order-email-form/index.ts +1 -0
- package/src/routes/orders/order-edit-email/index.ts +1 -0
- package/src/routes/orders/order-edit-email/order-edit-email.tsx +31 -0
- package/src/routes/orders/order-edit-shipping-address/components/edit-order-shipping-address-form/edit-order-shipping-address-form.tsx +247 -0
- package/src/routes/orders/order-edit-shipping-address/components/edit-order-shipping-address-form/index.ts +1 -0
- package/src/routes/orders/order-edit-shipping-address/index.ts +1 -0
- package/src/routes/orders/order-edit-shipping-address/order-edit-shipping-address.tsx +31 -0
- package/src/routes/orders/order-export/components/export-filters.tsx +22 -0
- package/src/routes/orders/order-export/index.ts +1 -0
- package/src/routes/orders/order-export/order-export.tsx +66 -0
- package/src/routes/orders/order-list/components/order-list-table/components/save-view-dropdown.tsx +81 -0
- package/src/routes/orders/order-list/components/order-list-table/configurable-order-list-table.tsx +24 -0
- package/src/routes/orders/order-list/components/order-list-table/constants.ts +14 -0
- package/src/routes/orders/order-list/components/order-list-table/hooks/use-order-data-table-columns.tsx +153 -0
- package/src/routes/orders/order-list/components/order-list-table/index.ts +1 -0
- package/src/routes/orders/order-list/components/order-list-table/order-list-table.tsx +89 -0
- package/src/routes/orders/order-list/components/order-list-table/order-table-adapter.tsx +133 -0
- package/src/routes/orders/order-list/const.ts +18 -0
- package/src/routes/orders/order-list/index.ts +1 -0
- package/src/routes/orders/order-list/order-list.tsx +20 -0
- package/src/routes/orders/order-metadata/index.ts +1 -0
- package/src/routes/orders/order-metadata/order-metadata.tsx +26 -0
- package/src/routes/orders/order-receive-return/components/order-receive-return-form/constants.ts +12 -0
- package/src/routes/orders/order-receive-return/components/order-receive-return-form/dismissed-quantity.tsx +167 -0
- package/src/routes/orders/order-receive-return/components/order-receive-return-form/index.ts +1 -0
- package/src/routes/orders/order-receive-return/components/order-receive-return-form/order-receive-return-form.tsx +386 -0
- package/src/routes/orders/order-receive-return/index.ts +1 -0
- package/src/routes/orders/order-receive-return/order-receive-return.tsx +96 -0
- package/src/routes/orders/order-request-transfer/components/create-order-transfer-form/create-order-transfer-form.tsx +152 -0
- package/src/routes/orders/order-request-transfer/components/create-order-transfer-form/index.ts +1 -0
- package/src/routes/orders/order-request-transfer/components/create-order-transfer-form/transfer-header.tsx +299 -0
- package/src/routes/orders/order-request-transfer/index.ts +1 -0
- package/src/routes/orders/order-request-transfer/order-request-transfer.tsx +34 -0
- package/src/routes/price-lists/common/components/price-list-customer-group-rule-form/index.ts +1 -0
- package/src/routes/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx +194 -0
- package/src/routes/price-lists/common/constants.ts +20 -0
- package/src/routes/price-lists/common/hooks/use-delete-price-list-action.tsx +50 -0
- package/src/routes/price-lists/common/hooks/use-price-list-currency-data.tsx +79 -0
- package/src/routes/price-lists/common/hooks/use-price-list-grid-columns.tsx +91 -0
- package/src/routes/price-lists/common/schemas.ts +96 -0
- package/src/routes/price-lists/common/utils.ts +123 -0
- package/src/routes/price-lists/price-list-configuration/components/price-list-configuration-form/index.ts +1 -0
- package/src/routes/price-lists/price-list-configuration/components/price-list-configuration-form/price-list-configuration-form.tsx +311 -0
- package/src/routes/price-lists/price-list-configuration/index.ts +1 -0
- package/src/routes/price-lists/price-list-configuration/price-list-configuration.tsx +68 -0
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/index.ts +1 -0
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-create-form.tsx +364 -0
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-details-form.tsx +331 -0
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-prices-form.tsx +96 -0
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-products-form.tsx +187 -0
- package/src/routes/price-lists/price-list-create/components/price-list-create-form/schema.ts +59 -0
- package/src/routes/price-lists/price-list-create/index.ts +1 -0
- package/src/routes/price-lists/price-list-create/price-list-create.tsx +20 -0
- package/src/routes/price-lists/price-list-detail/breadcrumb.tsx +23 -0
- package/src/routes/price-lists/price-list-detail/components/price-list-configuration-section/index.ts +1 -0
- package/src/routes/price-lists/price-list-detail/components/price-list-configuration-section/price-list-configuration-section.tsx +96 -0
- package/src/routes/price-lists/price-list-detail/components/price-list-general-section/index.ts +1 -0
- package/src/routes/price-lists/price-list-detail/components/price-list-general-section/price-list-general-section.tsx +94 -0
- package/src/routes/price-lists/price-list-detail/components/price-list-product-section/index.ts +1 -0
- package/src/routes/price-lists/price-list-detail/components/price-list-product-section/price-list-product-section.tsx +285 -0
- package/src/routes/price-lists/price-list-detail/index.ts +3 -0
- package/src/routes/price-lists/price-list-detail/loader.ts +16 -0
- package/src/routes/price-lists/price-list-detail/price-list-detail.tsx +48 -0
- package/src/routes/price-lists/price-list-edit/components/price-list-edit-form/edit-price-list-form.tsx +193 -0
- package/src/routes/price-lists/price-list-edit/components/price-list-edit-form/index.ts +1 -0
- package/src/routes/price-lists/price-list-edit/index.ts +1 -0
- package/src/routes/price-lists/price-list-edit/price-list-edit.tsx +28 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/index.ts +1 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-count-cell.tsx +19 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-list-list-table-actions.tsx +42 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-list-list-table.tsx +76 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-columns.tsx +45 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-filters.tsx +7 -0
- package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-query.tsx +25 -0
- package/src/routes/price-lists/price-list-list/index.ts +1 -0
- package/src/routes/price-lists/price-list-list/price-list-list.tsx +18 -0
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/index.ts +1 -0
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-form.tsx +305 -0
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-prices-form.tsx +97 -0
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-product-ids-form.tsx +231 -0
- package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/schema.ts +27 -0
- package/src/routes/price-lists/price-list-prices-add/index.ts +1 -0
- package/src/routes/price-lists/price-list-prices-add/price-list-prices-add.tsx +35 -0
- package/src/routes/price-lists/price-list-prices-edit/components/price-list-prices-edit-form/index.ts +1 -0
- package/src/routes/price-lists/price-list-prices-edit/components/price-list-prices-edit-form/price-list-prices-edit-form.tsx +313 -0
- package/src/routes/price-lists/price-list-prices-edit/index.ts +1 -0
- package/src/routes/price-lists/price-list-prices-edit/price-list-prices-edit.tsx +65 -0
- package/src/routes/product-tags/common/hooks/use-delete-product-tag-action.tsx +52 -0
- package/src/routes/product-tags/product-tag-create/components/product-tag-create-form/index.ts +1 -0
- package/src/routes/product-tags/product-tag-create/components/product-tag-create-form/product-tag-create-form.tsx +100 -0
- package/src/routes/product-tags/product-tag-create/index.ts +1 -0
- package/src/routes/product-tags/product-tag-create/product-tag-create.tsx +10 -0
- package/src/routes/product-tags/product-tag-detail/breadcrumb.tsx +23 -0
- package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/index.ts +1 -0
- package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/product-tag-general-section.tsx +63 -0
- package/src/routes/product-tags/product-tag-detail/components/product-tag-product-section/index.ts +1 -0
- package/src/routes/product-tags/product-tag-detail/components/product-tag-product-section/product-tag-product-section.tsx +74 -0
- package/src/routes/product-tags/product-tag-detail/index.ts +3 -0
- package/src/routes/product-tags/product-tag-detail/loader.ts +17 -0
- package/src/routes/product-tags/product-tag-detail/product-tag-detail.tsx +50 -0
- package/src/routes/product-tags/product-tag-edit/components/product-tag-edit-form/index.ts +1 -0
- package/src/routes/product-tags/product-tag-edit/components/product-tag-edit-form/product-tag-edit-form.tsx +88 -0
- package/src/routes/product-tags/product-tag-edit/index.ts +1 -0
- package/src/routes/product-tags/product-tag-edit/product-tag-edit.tsx +33 -0
- package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/index.ts +1 -0
- package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/product-tag-list-table.tsx +148 -0
- package/src/routes/product-tags/product-tag-list/index.ts +2 -0
- package/src/routes/product-tags/product-tag-list/loader.ts +34 -0
- package/src/routes/product-tags/product-tag-list/product-tag-list.tsx +21 -0
- package/src/routes/product-tags/product-tag-metadata/index.ts +1 -0
- package/src/routes/product-tags/product-tag-metadata/product-tag-metadata.tsx +26 -0
- package/src/routes/product-types/common/hooks/use-delete-product-type-action.tsx +38 -0
- package/src/routes/product-types/product-type-create/components/create-product-type-form/create-product-type-form.tsx +100 -0
- package/src/routes/product-types/product-type-create/components/create-product-type-form/index.ts +1 -0
- package/src/routes/product-types/product-type-create/index.ts +1 -0
- package/src/routes/product-types/product-type-create/product-type-create.tsx +10 -0
- package/src/routes/product-types/product-type-detail/breadcrumb.tsx +24 -0
- package/src/routes/product-types/product-type-detail/components/product-type-general-section/index.ts +1 -0
- package/src/routes/product-types/product-type-detail/components/product-type-general-section/product-type-general-section.tsx +63 -0
- package/src/routes/product-types/product-type-detail/components/product-type-product-section/index.ts +1 -0
- package/src/routes/product-types/product-type-detail/components/product-type-product-section/product-type-product-section.tsx +70 -0
- package/src/routes/product-types/product-type-detail/index.ts +3 -0
- package/src/routes/product-types/product-type-detail/loader.ts +17 -0
- package/src/routes/product-types/product-type-detail/product-type-detail.tsx +49 -0
- package/src/routes/product-types/product-type-edit/components/edit-product-type-form/edit-product-type-form.tsx +94 -0
- package/src/routes/product-types/product-type-edit/components/edit-product-type-form/index.ts +1 -0
- package/src/routes/product-types/product-type-edit/index.ts +1 -0
- package/src/routes/product-types/product-type-edit/product-type-edit.tsx +28 -0
- package/src/routes/product-types/product-type-list/components/product-type-list-table/index.ts +1 -0
- package/src/routes/product-types/product-type-list/components/product-type-list-table/product-table-row-actions.tsx +59 -0
- package/src/routes/product-types/product-type-list/components/product-type-list-table/product-type-list-table.tsx +98 -0
- package/src/routes/product-types/product-type-list/index.ts +1 -0
- package/src/routes/product-types/product-type-list/product-type-list.tsx +18 -0
- package/src/routes/product-types/product-type-metadata/index.ts +1 -0
- package/src/routes/product-types/product-type-metadata/product-type-metadata.tsx +26 -0
- package/src/routes/product-variants/product-variant-detail/breadcrumb.tsx +31 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-general-section/index.ts +1 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx +112 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/index.ts +1 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/inventory-actions.tsx +26 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/use-inventory-table-columns.tsx +104 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/variant-inventory-section.tsx +94 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-media-section/index.ts +1 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-media-section/variant-media-section.tsx +77 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-prices-section/index.ts +1 -0
- package/src/routes/product-variants/product-variant-detail/components/variant-prices-section/variant-prices-section.tsx +82 -0
- package/src/routes/product-variants/product-variant-detail/constants.ts +2 -0
- package/src/routes/product-variants/product-variant-detail/index.ts +3 -0
- package/src/routes/product-variants/product-variant-detail/loader.ts +25 -0
- package/src/routes/product-variants/product-variant-detail/product-variant-detail.tsx +85 -0
- package/src/routes/product-variants/product-variant-edit/components/product-edit-variant-form/index.ts +1 -0
- package/src/routes/product-variants/product-variant-edit/components/product-edit-variant-form/product-edit-variant-form.tsx +447 -0
- package/src/routes/product-variants/product-variant-edit/index.ts +2 -0
- package/src/routes/product-variants/product-variant-edit/loader.ts +33 -0
- package/src/routes/product-variants/product-variant-edit/product-variant-edit.tsx +62 -0
- package/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/index.ts +1 -0
- package/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/manage-variant-inventory-items-form.tsx +376 -0
- package/src/routes/product-variants/product-variant-manage-inventory-items/index.ts +1 -0
- package/src/routes/product-variants/product-variant-manage-inventory-items/product-variant-manage-inventory-items.tsx +31 -0
- package/src/routes/product-variants/product-variant-media/components/edit-product-variant-media-form/edit-product-variant-media-form.tsx +434 -0
- package/src/routes/product-variants/product-variant-media/components/edit-product-variant-media-form/index.ts +1 -0
- package/src/routes/product-variants/product-variant-media/index.ts +1 -0
- package/src/routes/product-variants/product-variant-media/product-variant-media.tsx +38 -0
- package/src/routes/product-variants/product-variant-metadata/index.ts +1 -0
- package/src/routes/product-variants/product-variant-metadata/product-variant-metadata.tsx +30 -0
- package/src/routes/products/common/components/category-combobox/category-combobox.tsx +499 -0
- package/src/routes/products/common/components/category-combobox/index.ts +1 -0
- package/src/routes/products/common/components/upload-media-form-item/index.ts +1 -0
- package/src/routes/products/common/components/upload-media-form-item/upload-media-form-item.tsx +134 -0
- package/src/routes/products/common/constants.ts +1 -0
- package/src/routes/products/common/variant-pricing-form.tsx +99 -0
- package/src/routes/products/product-attributes/components/product-attributes-form/index.ts +1 -0
- package/src/routes/products/product-attributes/components/product-attributes-form/product-attributes-form.tsx +277 -0
- package/src/routes/products/product-attributes/index.ts +1 -0
- package/src/routes/products/product-attributes/product-attributes.tsx +33 -0
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +91 -0
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-media-section/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-media-section/product-create-details-media-section.tsx +338 -0
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +528 -0
- package/src/routes/products/product-create/components/product-create-details-form/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-details-form/product-create-details-form.tsx +44 -0
- package/src/routes/products/product-create/components/product-create-form/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +404 -0
- package/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx +248 -0
- package/src/routes/products/product-create/components/product-create-inventory-kit-form/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-inventory-kit-form/product-create-inventory-kit-form.tsx +20 -0
- package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-attribute-section/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-attribute-section/product-create-details-attribute-section.tsx +155 -0
- package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-section/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-section/product-create-details-organize-section.tsx +248 -0
- package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx +160 -0
- package/src/routes/products/product-create/components/product-create-organize-form/constants.ts +1 -0
- package/src/routes/products/product-create/components/product-create-organize-form/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-organize-form/product-create-organize-form.tsx +33 -0
- package/src/routes/products/product-create/components/product-create-variants-form/index.ts +1 -0
- package/src/routes/products/product-create/components/product-create-variants-form/product-create-variants-form.tsx +204 -0
- package/src/routes/products/product-create/constants.ts +163 -0
- package/src/routes/products/product-create/index.ts +1 -0
- package/src/routes/products/product-create/product-create.tsx +90 -0
- package/src/routes/products/product-create/types.ts +6 -0
- package/src/routes/products/product-create/utils.ts +118 -0
- package/src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx +122 -0
- package/src/routes/products/product-create-option/components/create-product-option-form/index.ts +1 -0
- package/src/routes/products/product-create-option/index.ts +1 -0
- package/src/routes/products/product-create-option/product-create-option.tsx +30 -0
- package/src/routes/products/product-create-variant/components/create-product-variant-form/constants.ts +44 -0
- package/src/routes/products/product-create-variant/components/create-product-variant-form/create-product-variant-form.tsx +387 -0
- package/src/routes/products/product-create-variant/components/create-product-variant-form/details-tab.tsx +193 -0
- package/src/routes/products/product-create-variant/components/create-product-variant-form/index.ts +1 -0
- package/src/routes/products/product-create-variant/components/create-product-variant-form/inventory-kit-tab.tsx +188 -0
- package/src/routes/products/product-create-variant/components/create-product-variant-form/pricing-tab.tsx +100 -0
- package/src/routes/products/product-create-variant/index.ts +1 -0
- package/src/routes/products/product-create-variant/product-create-variant.tsx +23 -0
- package/src/routes/products/product-detail/breadcrumb.tsx +30 -0
- package/src/routes/products/product-detail/components/product-attribute-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-attribute-section/product-attribute-section.tsx +53 -0
- package/src/routes/products/product-detail/components/product-general-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +130 -0
- package/src/routes/products/product-detail/components/product-media-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-media-section/product-media-section.tsx +220 -0
- package/src/routes/products/product-detail/components/product-option-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx +113 -0
- package/src/routes/products/product-detail/components/product-organization-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-organization-section/product-organization-section.tsx +107 -0
- package/src/routes/products/product-detail/components/product-sales-channel-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-sales-channel-section/product-sales-channel-section.tsx +106 -0
- package/src/routes/products/product-detail/components/product-shipping-profile-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-shipping-profile-section/product-shipping-profile-section.tsx +51 -0
- package/src/routes/products/product-detail/components/product-variant-section/index.ts +1 -0
- package/src/routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +468 -0
- package/src/routes/products/product-detail/constants.ts +6 -0
- package/src/routes/products/product-detail/index.ts +3 -0
- package/src/routes/products/product-detail/loader.ts +24 -0
- package/src/routes/products/product-detail/product-detail.tsx +81 -0
- package/src/routes/products/product-edit/components/edit-product-form/edit-product-form.tsx +246 -0
- package/src/routes/products/product-edit/components/edit-product-form/index.ts +1 -0
- package/src/routes/products/product-edit/index.ts +1 -0
- package/src/routes/products/product-edit/product-edit.tsx +36 -0
- package/src/routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx +125 -0
- package/src/routes/products/product-edit-option/components/edit-product-option-form/index.ts +1 -0
- package/src/routes/products/product-edit-option/index.ts +1 -0
- package/src/routes/products/product-edit-option/product-edit-option.tsx +35 -0
- package/src/routes/products/product-export/components/export-filters.tsx +22 -0
- package/src/routes/products/product-export/index.ts +1 -0
- package/src/routes/products/product-export/product-export.tsx +67 -0
- package/src/routes/products/product-image-variants-edit/components/variants-table-form/index.ts +1 -0
- package/src/routes/products/product-image-variants-edit/components/variants-table-form/variants-table-form.tsx +264 -0
- package/src/routes/products/product-image-variants-edit/index.ts +1 -0
- package/src/routes/products/product-image-variants-edit/product-image-variants-edit.tsx +65 -0
- package/src/routes/products/product-import/components/import-summary.tsx +50 -0
- package/src/routes/products/product-import/components/upload-import.tsx +61 -0
- package/src/routes/products/product-import/helpers/import-template.ts +12 -0
- package/src/routes/products/product-import/index.ts +1 -0
- package/src/routes/products/product-import/product-import.tsx +143 -0
- package/src/routes/products/product-list/components/product-list-table/configurable-product-list-table.tsx +26 -0
- package/src/routes/products/product-list/components/product-list-table/index.ts +1 -0
- package/src/routes/products/product-list/components/product-list-table/product-list-table.tsx +203 -0
- package/src/routes/products/product-list/components/product-list-table/product-table-adapter.tsx +51 -0
- package/src/routes/products/product-list/components/product-list-table/use-product-table-filters.tsx +104 -0
- package/src/routes/products/product-list/index.ts +2 -0
- package/src/routes/products/product-list/loader.ts +28 -0
- package/src/routes/products/product-list/product-list.tsx +18 -0
- package/src/routes/products/product-media/components/edit-product-media-form/edit-product-media-form.tsx +457 -0
- package/src/routes/products/product-media/components/edit-product-media-form/index.ts +1 -0
- package/src/routes/products/product-media/components/product-media-gallery/index.ts +1 -0
- package/src/routes/products/product-media/components/product-media-gallery/product-media-gallery.tsx +327 -0
- package/src/routes/products/product-media/components/product-media-view/index.ts +1 -0
- package/src/routes/products/product-media/components/product-media-view/product-media-view-context.tsx +9 -0
- package/src/routes/products/product-media/components/product-media-view/product-media-view.tsx +54 -0
- package/src/routes/products/product-media/components/product-media-view/use-product-media-view.tsx +14 -0
- package/src/routes/products/product-media/index.ts +1 -0
- package/src/routes/products/product-media/product-media.tsx +33 -0
- package/src/routes/products/product-metadata/index.ts +1 -0
- package/src/routes/products/product-metadata/product-metadata.tsx +28 -0
- package/src/routes/products/product-organization/components/product-organization-form/index.ts +1 -0
- package/src/routes/products/product-organization/components/product-organization-form/product-organization-form.tsx +218 -0
- package/src/routes/products/product-organization/index.ts +1 -0
- package/src/routes/products/product-organization/product-organization.tsx +32 -0
- package/src/routes/products/product-prices/index.ts +1 -0
- package/src/routes/products/product-prices/pricing-edit.tsx +149 -0
- package/src/routes/products/product-prices/product-prices.tsx +26 -0
- package/src/routes/products/product-sales-channels/components/edit-sales-channels-form/edit-sales-channels-form.tsx +155 -0
- package/src/routes/products/product-sales-channels/components/edit-sales-channels-form/index.ts +1 -0
- package/src/routes/products/product-sales-channels/index.ts +1 -0
- package/src/routes/products/product-sales-channels/product-sales-channels.tsx +23 -0
- package/src/routes/products/product-shipping-profile/components/product-organization-form/index.ts +1 -0
- package/src/routes/products/product-shipping-profile/components/product-organization-form/product-shipping-profile-form.tsx +133 -0
- package/src/routes/products/product-shipping-profile/index.ts +1 -0
- package/src/routes/products/product-shipping-profile/product-shipping-profile.tsx +35 -0
- package/src/routes/products/product-stock/components/product-stock-form/index.ts +1 -0
- package/src/routes/products/product-stock/components/product-stock-form/product-stock-form.tsx +220 -0
- package/src/routes/products/product-stock/hooks/use-product-stock-columns.tsx +227 -0
- package/src/routes/products/product-stock/index.ts +2 -0
- package/src/routes/products/product-stock/loader.ts +55 -0
- package/src/routes/products/product-stock/product-stock.tsx +106 -0
- package/src/routes/products/product-stock/schema.ts +33 -0
- package/src/routes/products/product-stock/utils.ts +53 -0
- package/src/routes/profile/profile-detail/components/profile-general-section/index.ts +1 -0
- package/src/routes/profile/profile-detail/components/profile-general-section/profile-general-section.tsx +76 -0
- package/src/routes/profile/profile-detail/index.ts +1 -0
- package/src/routes/profile/profile-detail/profile-detail.tsx +30 -0
- package/src/routes/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx +205 -0
- package/src/routes/profile/profile-edit/index.ts +1 -0
- package/src/routes/profile/profile-edit/profile-edit.tsx +26 -0
- package/src/routes/promotions/common/edit-rules/components/edit-rules-form/edit-rules-form.tsx +76 -0
- package/src/routes/promotions/common/edit-rules/components/edit-rules-form/form-schema.ts +32 -0
- package/src/routes/promotions/common/edit-rules/components/edit-rules-form/index.ts +1 -0
- package/src/routes/promotions/common/edit-rules/components/edit-rules-form/utils.ts +17 -0
- package/src/routes/promotions/common/edit-rules/components/edit-rules-wrapper/edit-rules-wrapper.tsx +123 -0
- package/src/routes/promotions/common/edit-rules/components/edit-rules-wrapper/index.ts +1 -0
- package/src/routes/promotions/common/edit-rules/components/edit-rules-wrapper/utils.ts +9 -0
- package/src/routes/promotions/common/edit-rules/components/rule-value-form-field/index.ts +1 -0
- package/src/routes/promotions/common/edit-rules/components/rule-value-form-field/rule-value-form-field.tsx +168 -0
- package/src/routes/promotions/common/edit-rules/components/rules-form-field/constants.ts +11 -0
- package/src/routes/promotions/common/edit-rules/components/rules-form-field/index.ts +1 -0
- package/src/routes/promotions/common/edit-rules/components/rules-form-field/rules-form-field.tsx +450 -0
- package/src/routes/promotions/common/edit-rules/edit-rules.tsx +63 -0
- package/src/routes/promotions/common/edit-rules/index.ts +1 -0
- package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/add-campaign-promotion-form.tsx +244 -0
- package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/campaign-details.tsx +145 -0
- package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/index.ts +1 -0
- package/src/routes/promotions/promotion-add-campaign/index.ts +1 -0
- package/src/routes/promotions/promotion-add-campaign/promotion-add-campaign.tsx +29 -0
- package/src/routes/promotions/promotion-create/components/create-promotion-form/constants.ts +11 -0
- package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +1086 -0
- package/src/routes/promotions/promotion-create/components/create-promotion-form/form-schema.ts +62 -0
- package/src/routes/promotions/promotion-create/components/create-promotion-form/index.ts +1 -0
- package/src/routes/promotions/promotion-create/components/create-promotion-form/templates.ts +140 -0
- package/src/routes/promotions/promotion-create/index.ts +1 -0
- package/src/routes/promotions/promotion-create/promotion-create.tsx +10 -0
- package/src/routes/promotions/promotion-detail/breadcrumb.tsx +22 -0
- package/src/routes/promotions/promotion-detail/components/campaign-section/campaign-section.tsx +92 -0
- package/src/routes/promotions/promotion-detail/components/campaign-section/index.ts +1 -0
- package/src/routes/promotions/promotion-detail/components/promotion-conditions-section/index.ts +1 -0
- package/src/routes/promotions/promotion-detail/components/promotion-conditions-section/promotion-conditions-section.tsx +105 -0
- package/src/routes/promotions/promotion-detail/components/promotion-general-section/index.ts +1 -0
- package/src/routes/promotions/promotion-detail/components/promotion-general-section/promotion-general-section.tsx +215 -0
- package/src/routes/promotions/promotion-detail/index.ts +3 -0
- package/src/routes/promotions/promotion-detail/loader.ts +16 -0
- package/src/routes/promotions/promotion-detail/promotion-detail.tsx +72 -0
- package/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/edit-promotion-details-form.tsx +455 -0
- package/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/index.ts +1 -0
- package/src/routes/promotions/promotion-edit-details/index.ts +1 -0
- package/src/routes/promotions/promotion-edit-details/promotion-edit-details.tsx +30 -0
- package/src/routes/promotions/promotion-list/components/promotion-list-table/index.ts +1 -0
- package/src/routes/promotions/promotion-list/components/promotion-list-table/promotion-list-table.tsx +158 -0
- package/src/routes/promotions/promotion-list/index.ts +2 -0
- package/src/routes/promotions/promotion-list/loader.ts +27 -0
- package/src/routes/promotions/promotion-list/promotions-list.tsx +18 -0
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/refund-reason-create-form.tsx +177 -0
- package/src/routes/refund-reasons/refund-reason-create/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-create/refund-reason-create.tsx +10 -0
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/refund-reason-edit-form.tsx +141 -0
- package/src/routes/refund-reasons/refund-reason-edit/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-edit/refund-reason-edit.tsx +33 -0
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/index.ts +1 -0
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +138 -0
- package/src/routes/refund-reasons/refund-reason-list/index.ts +2 -0
- package/src/routes/refund-reasons/refund-reason-list/loader.ts +16 -0
- package/src/routes/refund-reasons/refund-reason-list/refund-reason-list.tsx +21 -0
- package/src/routes/regions/common/constants.ts +4 -0
- package/src/routes/regions/common/hooks/use-countries.tsx +68 -0
- package/src/routes/regions/common/hooks/use-country-table-columns.tsx +25 -0
- package/src/routes/regions/common/hooks/use-country-table-query.tsx +25 -0
- package/src/routes/regions/region-add-countries/components/add-countries-form/add-countries-form.tsx +208 -0
- package/src/routes/regions/region-add-countries/components/add-countries-form/index.ts +1 -0
- package/src/routes/regions/region-add-countries/index.ts +1 -0
- package/src/routes/regions/region-add-countries/region-add-countries.tsx +27 -0
- package/src/routes/regions/region-create/components/create-region-form/create-region-form.tsx +523 -0
- package/src/routes/regions/region-create/components/create-region-form/index.ts +1 -0
- package/src/routes/regions/region-create/index.ts +1 -0
- package/src/routes/regions/region-create/region-create.tsx +22 -0
- package/src/routes/regions/region-detail/breadcrumb.tsx +27 -0
- package/src/routes/regions/region-detail/components/region-country-section/index.ts +1 -0
- package/src/routes/regions/region-detail/components/region-country-section/region-country-section.tsx +255 -0
- package/src/routes/regions/region-detail/components/region-general-section/index.ts +1 -0
- package/src/routes/regions/region-detail/components/region-general-section/region-general-section.tsx +138 -0
- package/src/routes/regions/region-detail/constants.ts +2 -0
- package/src/routes/regions/region-detail/index.ts +3 -0
- package/src/routes/regions/region-detail/loader.ts +25 -0
- package/src/routes/regions/region-detail/region-detail.tsx +77 -0
- package/src/routes/regions/region-edit/components/edit-region-form/edit-region-form.tsx +251 -0
- package/src/routes/regions/region-edit/components/edit-region-form/index.ts +1 -0
- package/src/routes/regions/region-edit/index.ts +1 -0
- package/src/routes/regions/region-edit/region-edit.tsx +78 -0
- package/src/routes/regions/region-list/components/region-list-table/index.ts +1 -0
- package/src/routes/regions/region-list/components/region-list-table/region-list-table.tsx +178 -0
- package/src/routes/regions/region-list/index.ts +1 -0
- package/src/routes/regions/region-list/region-list.tsx +18 -0
- package/src/routes/regions/region-metadata/index.ts +1 -0
- package/src/routes/regions/region-metadata/region-metadata.tsx +27 -0
- package/src/routes/reservations/reservation-create/components/reservation-create-from/index.ts +1 -0
- package/src/routes/reservations/reservation-create/components/reservation-create-from/reservation-create-from.tsx +311 -0
- package/src/routes/reservations/reservation-create/index.ts +2 -0
- package/src/routes/reservations/reservation-create/reservation-create.tsx +16 -0
- package/src/routes/reservations/reservation-detail/breadcrumb.tsx +29 -0
- package/src/routes/reservations/reservation-detail/components/edit-reservation/components/edit-reservation-form.tsx +215 -0
- package/src/routes/reservations/reservation-detail/components/edit-reservation/components/index.tsx +1 -0
- package/src/routes/reservations/reservation-detail/components/edit-reservation/edit-reservation-modal.tsx +53 -0
- package/src/routes/reservations/reservation-detail/components/edit-reservation/index.ts +1 -0
- package/src/routes/reservations/reservation-detail/components/reservation-general-section/index.ts +1 -0
- package/src/routes/reservations/reservation-detail/components/reservation-general-section/reservation-general-section.tsx +90 -0
- package/src/routes/reservations/reservation-detail/index.ts +3 -0
- package/src/routes/reservations/reservation-detail/loader.ts +16 -0
- package/src/routes/reservations/reservation-detail/reservation-detail.tsx +73 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/index.ts +1 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/reservation-actions.tsx +57 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/reservation-list-table.tsx +67 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-columns.tsx +107 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-filters.tsx +35 -0
- package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-query.tsx +32 -0
- package/src/routes/reservations/reservation-list/constants.ts +1 -0
- package/src/routes/reservations/reservation-list/index.ts +1 -0
- package/src/routes/reservations/reservation-list/reservation-list.tsx +18 -0
- package/src/routes/reservations/reservation-metadata/index.ts +1 -0
- package/src/routes/reservations/reservation-metadata/reservation-metadata.tsx +30 -0
- package/src/routes/reset-password/index.ts +2 -0
- package/src/routes/reset-password/reset-password.tsx +341 -0
- package/src/routes/return-reasons/common/hooks/use-delete-return-reason-action.tsx +40 -0
- package/src/routes/return-reasons/return-reason-create/components/return-reason-create-form/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-create/components/return-reason-create-form/return-reason-create-form.tsx +157 -0
- package/src/routes/return-reasons/return-reason-create/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-create/return-reason-create.tsx +10 -0
- package/src/routes/return-reasons/return-reason-edit/components/return-reason-edit-form/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-edit/components/return-reason-edit-form/return-reason-edit-form.tsx +141 -0
- package/src/routes/return-reasons/return-reason-edit/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-edit/return-reason-edit.tsx +33 -0
- package/src/routes/return-reasons/return-reason-list/components/return-reason-list-table/index.ts +1 -0
- package/src/routes/return-reasons/return-reason-list/components/return-reason-list-table/return-reason-list-table.tsx +128 -0
- package/src/routes/return-reasons/return-reason-list/index.ts +2 -0
- package/src/routes/return-reasons/return-reason-list/loader.ts +21 -0
- package/src/routes/return-reasons/return-reason-list/return-reason-list.tsx +21 -0
- package/src/routes/sales-channels/sales-channel-add-products/components/add-products-to-sales-channel-form.tsx +240 -0
- package/src/routes/sales-channels/sales-channel-add-products/components/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-add-products/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-add-products/sales-channel-add-products.tsx +26 -0
- package/src/routes/sales-channels/sales-channel-create/components/create-sales-channel-form/create-sales-channel-form.tsx +154 -0
- package/src/routes/sales-channels/sales-channel-create/components/create-sales-channel-form/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-create/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-create/sales-channel-create.tsx +10 -0
- package/src/routes/sales-channels/sales-channel-detail/breadcrumb.tsx +23 -0
- package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-general-section/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-general-section/sales-channel-general-section.tsx +99 -0
- package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-product-section/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-product-section/sales-channel-product-section.tsx +255 -0
- package/src/routes/sales-channels/sales-channel-detail/index.ts +3 -0
- package/src/routes/sales-channels/sales-channel-detail/loader.ts +17 -0
- package/src/routes/sales-channels/sales-channel-detail/sales-channel-detail.tsx +41 -0
- package/src/routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/edit-sales-channel-form.tsx +136 -0
- package/src/routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-edit/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-edit/sales-channel-edit.tsx +36 -0
- package/src/routes/sales-channels/sales-channel-list/components/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-list/components/sales-channel-list-table.tsx +158 -0
- package/src/routes/sales-channels/sales-channel-list/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-list/sales-channel-list.tsx +20 -0
- package/src/routes/sales-channels/sales-channel-metadata/index.ts +1 -0
- package/src/routes/sales-channels/sales-channel-metadata/sales-channel-metadata.tsx +32 -0
- package/src/routes/settings/index.ts +1 -0
- package/src/routes/settings/settings.tsx +15 -0
- package/src/routes/shipping-option-types/common/hooks/use-delete-shipping-option-type-action.tsx +43 -0
- package/src/routes/shipping-option-types/shipping-option-type-create/components/create-shipping-option-type-form/create-shipping-option-type-form.tsx +168 -0
- package/src/routes/shipping-option-types/shipping-option-type-create/components/create-shipping-option-type-form/index.ts +1 -0
- package/src/routes/shipping-option-types/shipping-option-type-create/index.ts +1 -0
- package/src/routes/shipping-option-types/shipping-option-type-create/shipping-option-type-create.tsx +10 -0
- package/src/routes/shipping-option-types/shipping-option-type-detail/breadcrumb.tsx +24 -0
- package/src/routes/shipping-option-types/shipping-option-type-detail/components/shipping-option-type-general-section/index.ts +1 -0
- package/src/routes/shipping-option-types/shipping-option-type-detail/components/shipping-option-type-general-section/shipping-option-type-general-section.tsx +66 -0
- package/src/routes/shipping-option-types/shipping-option-type-detail/index.ts +3 -0
- package/src/routes/shipping-option-types/shipping-option-type-detail/loader.ts +19 -0
- package/src/routes/shipping-option-types/shipping-option-type-detail/shipping-option-type-detail.tsx +46 -0
- package/src/routes/shipping-option-types/shipping-option-type-edit/components/edit-shipping-option-type-form/edit-shipping-option-type-form.tsx +145 -0
- package/src/routes/shipping-option-types/shipping-option-type-edit/components/edit-shipping-option-type-form/index.ts +1 -0
- package/src/routes/shipping-option-types/shipping-option-type-edit/index.ts +1 -0
- package/src/routes/shipping-option-types/shipping-option-type-edit/shipping-option-type-edit.tsx +31 -0
- package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/index.ts +1 -0
- package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/shipping-option-type-list-table.tsx +99 -0
- package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/shipping-option-type-table-row-actions.tsx +44 -0
- package/src/routes/shipping-option-types/shipping-option-type-list/index.ts +1 -0
- package/src/routes/shipping-option-types/shipping-option-type-list/shipping-option-type-list.tsx +18 -0
- package/src/routes/shipping-profiles/shipping-profile-create/components/create-shipping-profile-form/create-shipping-profile-form.tsx +129 -0
- package/src/routes/shipping-profiles/shipping-profile-create/components/create-shipping-profile-form/index.ts +1 -0
- package/src/routes/shipping-profiles/shipping-profile-create/index.ts +1 -0
- package/src/routes/shipping-profiles/shipping-profile-create/shipping-profile-create.tsx +10 -0
- package/src/routes/shipping-profiles/shipping-profile-detail/breadcrumb.tsx +27 -0
- package/src/routes/shipping-profiles/shipping-profile-detail/components/shipping-profile-general-section/index.ts +1 -0
- package/src/routes/shipping-profiles/shipping-profile-detail/components/shipping-profile-general-section/shipping-profile-general-section.tsx +76 -0
- package/src/routes/shipping-profiles/shipping-profile-detail/index.ts +3 -0
- package/src/routes/shipping-profiles/shipping-profile-detail/loader.ts +17 -0
- package/src/routes/shipping-profiles/shipping-profile-detail/shipping-profile-detail.tsx +47 -0
- package/src/routes/shipping-profiles/shipping-profile-metadata/index.ts +1 -0
- package/src/routes/shipping-profiles/shipping-profile-metadata/shipping-profile-metadata.tsx +31 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/index.ts +1 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/shipping-options-row-actions.tsx +64 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/shipping-profile-list-table.tsx +78 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-columns.tsx +31 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-filters.tsx +33 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-query.tsx +30 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/index.ts +1 -0
- package/src/routes/shipping-profiles/shipping-profiles-list/shipping-profile-list.tsx +18 -0
- package/src/routes/store/common/hooks/use-currencies-table-columns.tsx +29 -0
- package/src/routes/store/common/hooks/use-currencies-table-query.tsx +21 -0
- package/src/routes/store/common/hooks/use-locales-table-columns.tsx +29 -0
- package/src/routes/store/common/hooks/use-locales-table-query.tsx +21 -0
- package/src/routes/store/store-add-currencies/components/add-currencies-form/add-currencies-form.tsx +308 -0
- package/src/routes/store/store-add-currencies/index.ts +1 -0
- package/src/routes/store/store-add-currencies/store-add-currencies.tsx +42 -0
- package/src/routes/store/store-add-locales/components/add-locales-form/add-locales-form.tsx +231 -0
- package/src/routes/store/store-add-locales/index.ts +1 -0
- package/src/routes/store/store-add-locales/store-add-locales.tsx +29 -0
- package/src/routes/store/store-detail/components/store-currency-section/index.ts +1 -0
- package/src/routes/store/store-detail/components/store-currency-section/store-currency-section.tsx +387 -0
- package/src/routes/store/store-detail/components/store-general-section/index.ts +1 -0
- package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +142 -0
- package/src/routes/store/store-detail/components/store-locale-section/index.ts +1 -0
- package/src/routes/store/store-detail/components/store-locale-section/store-locale-section.tsx +282 -0
- package/src/routes/store/store-detail/index.ts +2 -0
- package/src/routes/store/store-detail/loader.ts +18 -0
- package/src/routes/store/store-detail/store-detail.tsx +48 -0
- package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +232 -0
- package/src/routes/store/store-edit/index.ts +1 -0
- package/src/routes/store/store-edit/store-edit.tsx +25 -0
- package/src/routes/store/store-metadata/index.ts +1 -0
- package/src/routes/store/store-metadata/store-metadata.tsx +24 -0
- package/src/routes/tax-regions/common/components/target-form/index.ts +1 -0
- package/src/routes/tax-regions/common/components/target-form/target-form.tsx +970 -0
- package/src/routes/tax-regions/common/components/target-item/index.ts +1 -0
- package/src/routes/tax-regions/common/components/target-item/target-item.tsx +43 -0
- package/src/routes/tax-regions/common/components/tax-override-card/index.ts +1 -0
- package/src/routes/tax-regions/common/components/tax-override-card/tax-override-card.tsx +404 -0
- package/src/routes/tax-regions/common/components/tax-override-table/index.ts +1 -0
- package/src/routes/tax-regions/common/components/tax-override-table/tax-override-table.tsx +119 -0
- package/src/routes/tax-regions/common/components/tax-rate-line/index.ts +1 -0
- package/src/routes/tax-regions/common/components/tax-rate-line/tax-rate-line.tsx +82 -0
- package/src/routes/tax-regions/common/components/tax-region-card/index.ts +1 -0
- package/src/routes/tax-regions/common/components/tax-region-card/tax-region-card.tsx +218 -0
- package/src/routes/tax-regions/common/components/tax-region-table/index.ts +1 -0
- package/src/routes/tax-regions/common/components/tax-region-table/tax-region-table.tsx +122 -0
- package/src/routes/tax-regions/common/constants.ts +8 -0
- package/src/routes/tax-regions/common/hooks/use-tax-override-table.tsx +92 -0
- package/src/routes/tax-regions/common/hooks/use-tax-region-table.tsx +92 -0
- package/src/routes/tax-regions/common/hooks.ts +79 -0
- package/src/routes/tax-regions/common/schemas.ts +16 -0
- package/src/routes/tax-regions/common/utils.ts +12 -0
- package/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/tax-region-create-form.tsx +276 -0
- package/src/routes/tax-regions/tax-region-create/index.ts +3 -0
- package/src/routes/tax-regions/tax-region-create/tax-region-create.tsx +10 -0
- package/src/routes/tax-regions/tax-region-detail/breadcrumb.tsx +29 -0
- package/src/routes/tax-regions/tax-region-detail/components/index.ts +2 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-detail-section/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-detail-section/tax-region-detail-section.tsx +41 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-override-section/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-override-section/tax-region-override-section.tsx +66 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-province-section/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-province-section/tax-region-province-section.tsx +72 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-sublevel-alert/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-detail/components/tax-region-sublevel-alert/tax-region-sublevel-alert.tsx +62 -0
- package/src/routes/tax-regions/tax-region-detail/index.ts +5 -0
- package/src/routes/tax-regions/tax-region-detail/loader.ts +16 -0
- package/src/routes/tax-regions/tax-region-detail/tax-region-detail.tsx +65 -0
- package/src/routes/tax-regions/tax-region-detail/tax-region-provider-section/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-detail/tax-region-provider-section/tax-region-provider-section.tsx +28 -0
- package/src/routes/tax-regions/tax-region-edit/components/tax-region-edit/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-edit/components/tax-region-edit/tax-region-edit-form.tsx +109 -0
- package/src/routes/tax-regions/tax-region-edit/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-edit/tax-region-edit.tsx +33 -0
- package/src/routes/tax-regions/tax-region-list/components/tax-region-list-view/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-list/components/tax-region-list-view/tax-region-list-view.tsx +58 -0
- package/src/routes/tax-regions/tax-region-list/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-list/tax-region-list.tsx +19 -0
- package/src/routes/tax-regions/tax-region-metadata/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-metadata/tax-region-metadata.tsx +31 -0
- package/src/routes/tax-regions/tax-region-province-create/components/tax-region-province-create-form/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-province-create/components/tax-region-province-create-form/tax-region-province-create-form.tsx +249 -0
- package/src/routes/tax-regions/tax-region-province-create/index.ts +3 -0
- package/src/routes/tax-regions/tax-region-province-create/tax-region-province-create.tsx +22 -0
- package/src/routes/tax-regions/tax-region-province-detail/breadcrumb.tsx +32 -0
- package/src/routes/tax-regions/tax-region-province-detail/components/index.ts +2 -0
- package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-detail-section/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-detail-section/tax-region-detail-section.tsx +42 -0
- package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-override-section/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-override-section/tax-region-province-override-section.tsx +65 -0
- package/src/routes/tax-regions/tax-region-province-detail/index.ts +5 -0
- package/src/routes/tax-regions/tax-region-province-detail/loader.ts +16 -0
- package/src/routes/tax-regions/tax-region-province-detail/tax-region-detail.tsx +49 -0
- package/src/routes/tax-regions/tax-region-tax-override-create/components/tax-region-override-create-form/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-override-create/components/tax-region-override-create-form/tax-region-tax-override-create.tsx +675 -0
- package/src/routes/tax-regions/tax-region-tax-override-create/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-override-create/tax-region-tax-override-create.tsx +24 -0
- package/src/routes/tax-regions/tax-region-tax-override-edit/components/tax-region-tax-override-edit-form/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-override-edit/components/tax-region-tax-override-edit-form/tax-region-tax-override-edit-form.tsx +652 -0
- package/src/routes/tax-regions/tax-region-tax-override-edit/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-override-edit/tax-region-tax-override-edit.tsx +211 -0
- package/src/routes/tax-regions/tax-region-tax-override-edit/types.ts +11 -0
- package/src/routes/tax-regions/tax-region-tax-rate-create/components/tax-region-tax-rate-create-form/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-rate-create/components/tax-region-tax-rate-create-form/tax-region-tax-rate-create-form.tsx +180 -0
- package/src/routes/tax-regions/tax-region-tax-rate-create/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-rate-create/tax-region-tax-rate-create.tsx +29 -0
- package/src/routes/tax-regions/tax-region-tax-rate-edit/components/tax-region-tax-rate-edit-form/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-rate-edit/components/tax-region-tax-rate-edit-form/tax-region-tax-rate-edit-form.tsx +159 -0
- package/src/routes/tax-regions/tax-region-tax-rate-edit/index.ts +1 -0
- package/src/routes/tax-regions/tax-region-tax-rate-edit/tax-region-edit.tsx +38 -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/settings/components/batch-translation-settings-form/batch-translation-settings-form.tsx +246 -0
- package/src/routes/translations/settings/components/entity-selector-tree/entity-selector-tree.tsx +288 -0
- package/src/routes/translations/settings/components/selector-tree-filter/selector-tree-filter.tsx +88 -0
- package/src/routes/translations/settings/index.tsx +2 -0
- package/src/routes/translations/settings/settings.tsx +35 -0
- package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +85 -0
- package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +48 -0
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +285 -0
- package/src/routes/translations/translation-list/index.tsx +1 -0
- package/src/routes/translations/translation-list/translation-list.tsx +188 -0
- package/src/routes/translations/translations-edit/components/translations-edit-form/index.ts +1 -0
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +747 -0
- package/src/routes/translations/translations-edit/index.ts +1 -0
- package/src/routes/translations/translations-edit/translations-edit.tsx +85 -0
- package/src/routes/users/user-detail/breadcrumb.tsx +24 -0
- package/src/routes/users/user-detail/components/user-general-section/index.ts +1 -0
- package/src/routes/users/user-detail/components/user-general-section/user-general-section.tsx +86 -0
- package/src/routes/users/user-detail/index.ts +3 -0
- package/src/routes/users/user-detail/loader.ts +17 -0
- package/src/routes/users/user-detail/user-detail.tsx +47 -0
- package/src/routes/users/user-edit/components/edit-user-form/edit-user-form.tsx +97 -0
- package/src/routes/users/user-edit/components/edit-user-form/index.ts +1 -0
- package/src/routes/users/user-edit/index.ts +1 -0
- package/src/routes/users/user-edit/user-edit.tsx +25 -0
- package/src/routes/users/user-invite/components/invite-user-form/invite-user-form.tsx +345 -0
- package/src/routes/users/user-invite/index.ts +1 -0
- package/src/routes/users/user-invite/user-invite.tsx +10 -0
- package/src/routes/users/user-list/components/user-list-table/index.ts +1 -0
- package/src/routes/users/user-list/components/user-list-table/user-list-table.tsx +131 -0
- package/src/routes/users/user-list/index.ts +1 -0
- package/src/routes/users/user-list/user-list.tsx +18 -0
- package/src/routes/users/user-metadata/index.ts +1 -0
- package/src/routes/users/user-metadata/user-metadata.tsx +27 -0
- package/src/routes/workflow-executions/constants.ts +38 -0
- package/src/routes/workflow-executions/types.ts +28 -0
- package/src/routes/workflow-executions/utils.ts +103 -0
- package/src/routes/workflow-executions/workflow-execution-detail/breadcrumb.tsx +26 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/index.ts +1 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/workflow-execution-general-section.tsx +120 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/index.ts +1 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/workflow-execution-history-section.tsx +334 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/index.ts +1 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/workflow-execution-payload-section.tsx +24 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/index.ts +1 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +446 -0
- package/src/routes/workflow-executions/workflow-execution-detail/index.ts +3 -0
- package/src/routes/workflow-executions/workflow-execution-detail/loader.ts +19 -0
- package/src/routes/workflow-executions/workflow-execution-detail/workflow-detail.tsx +43 -0
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/index.ts +1 -0
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx +72 -0
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx +25 -0
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx +69 -0
- package/src/routes/workflow-executions/workflow-execution-list/index.ts +1 -0
- package/src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx +20 -0
- package/src/utils/column-utils.ts +71 -0
- package/src/vite-env.d.ts +20 -0
|
@@ -0,0 +1,2231 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChipGroup
|
|
3
|
+
} from "./chunk-OK4NIKP5.mjs";
|
|
4
|
+
import {
|
|
5
|
+
HandleInput
|
|
6
|
+
} from "./chunk-BALV2UTZ.mjs";
|
|
7
|
+
import {
|
|
8
|
+
ChipInput
|
|
9
|
+
} from "./chunk-Z5LP57ST.mjs";
|
|
10
|
+
import {
|
|
11
|
+
useSalesChannelTableColumns,
|
|
12
|
+
useSalesChannelTableEmptyState,
|
|
13
|
+
useSalesChannelTableFilters,
|
|
14
|
+
useSalesChannelTableQuery
|
|
15
|
+
} from "./chunk-B2FDWFGX.mjs";
|
|
16
|
+
import "./chunk-L7YA4D55.mjs";
|
|
17
|
+
import {
|
|
18
|
+
CategoryCombobox
|
|
19
|
+
} from "./chunk-IXXG72CP.mjs";
|
|
20
|
+
import {
|
|
21
|
+
useComboboxData
|
|
22
|
+
} from "./chunk-3TZOFKX2.mjs";
|
|
23
|
+
import {
|
|
24
|
+
Combobox
|
|
25
|
+
} from "./chunk-QDRW4DAC.mjs";
|
|
26
|
+
import {
|
|
27
|
+
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
28
|
+
ProductCreateSchema,
|
|
29
|
+
UploadMediaFormItem,
|
|
30
|
+
decorateVariantsWithDefaultValues,
|
|
31
|
+
normalizeProductFormValues
|
|
32
|
+
} from "./chunk-P3VJXF6S.mjs";
|
|
33
|
+
import "./chunk-ZQRKUG6J.mjs";
|
|
34
|
+
import {
|
|
35
|
+
DataGrid,
|
|
36
|
+
createDataGridHelper,
|
|
37
|
+
createDataGridPriceColumns
|
|
38
|
+
} from "./chunk-BZ3BUDOK.mjs";
|
|
39
|
+
import "./chunk-DK4WIVY6.mjs";
|
|
40
|
+
import "./chunk-EKFF2W4G.mjs";
|
|
41
|
+
import "./chunk-NQMO3WSW.mjs";
|
|
42
|
+
import {
|
|
43
|
+
DataTable
|
|
44
|
+
} from "./chunk-SLYFSTN7.mjs";
|
|
45
|
+
import "./chunk-C76H5USB.mjs";
|
|
46
|
+
import "./chunk-DFFLVEZ5.mjs";
|
|
47
|
+
import {
|
|
48
|
+
SwitchBox
|
|
49
|
+
} from "./chunk-LLJB2TFN.mjs";
|
|
50
|
+
import "./chunk-6GU6IDUA.mjs";
|
|
51
|
+
import "./chunk-IUCDCPJU.mjs";
|
|
52
|
+
import {
|
|
53
|
+
KeyboundForm
|
|
54
|
+
} from "./chunk-6HTZNHPT.mjs";
|
|
55
|
+
import {
|
|
56
|
+
StackedFocusModal
|
|
57
|
+
} from "./chunk-HKYVPRUA.mjs";
|
|
58
|
+
import {
|
|
59
|
+
RouteFocusModal,
|
|
60
|
+
useRouteModal,
|
|
61
|
+
useStackedModal
|
|
62
|
+
} from "./chunk-CRBKNYSH.mjs";
|
|
63
|
+
import {
|
|
64
|
+
FormExtensionZone,
|
|
65
|
+
useExtendableForm
|
|
66
|
+
} from "./chunk-G4M37GFI.mjs";
|
|
67
|
+
import "./chunk-LXIJHOSW.mjs";
|
|
68
|
+
import "./chunk-TCNCAWYD.mjs";
|
|
69
|
+
import "./chunk-4DFGIDVN.mjs";
|
|
70
|
+
import "./chunk-4GQOUCX6.mjs";
|
|
71
|
+
import "./chunk-TU3OVBKQ.mjs";
|
|
72
|
+
import "./chunk-D3YQN7HV.mjs";
|
|
73
|
+
import "./chunk-PMA2D6IL.mjs";
|
|
74
|
+
import "./chunk-CQWBG33R.mjs";
|
|
75
|
+
import "./chunk-DG7J63J2.mjs";
|
|
76
|
+
import "./chunk-KIASDQKH.mjs";
|
|
77
|
+
import {
|
|
78
|
+
useExtension
|
|
79
|
+
} from "./chunk-C5P5PL3E.mjs";
|
|
80
|
+
import "./chunk-YWU55M6Z.mjs";
|
|
81
|
+
import "./chunk-CG3YNOEK.mjs";
|
|
82
|
+
import {
|
|
83
|
+
ActionMenu
|
|
84
|
+
} from "./chunk-S3REQHPQ.mjs";
|
|
85
|
+
import "./chunk-OAHCJFG3.mjs";
|
|
86
|
+
import {
|
|
87
|
+
useDocumentDirection
|
|
88
|
+
} from "./chunk-S4DMV3ZT.mjs";
|
|
89
|
+
import "./chunk-535OVBXR.mjs";
|
|
90
|
+
import {
|
|
91
|
+
Form
|
|
92
|
+
} from "./chunk-ND3ODI36.mjs";
|
|
93
|
+
import "./chunk-BD3XDAG5.mjs";
|
|
94
|
+
import "./chunk-GBFVWROS.mjs";
|
|
95
|
+
import "./chunk-ULSPL3DR.mjs";
|
|
96
|
+
import "./chunk-V7OUZM56.mjs";
|
|
97
|
+
import "./chunk-GF7N2AY2.mjs";
|
|
98
|
+
import "./chunk-LKWTBYYC.mjs";
|
|
99
|
+
import "./chunk-YF6NQZGM.mjs";
|
|
100
|
+
import "./chunk-PB5SVVN2.mjs";
|
|
101
|
+
import "./chunk-HVQIZLNB.mjs";
|
|
102
|
+
import "./chunk-WJ4YB5O4.mjs";
|
|
103
|
+
import "./chunk-W4OT76ZB.mjs";
|
|
104
|
+
import "./chunk-XIM7X4FB.mjs";
|
|
105
|
+
import "./chunk-UVPCTLA2.mjs";
|
|
106
|
+
import "./chunk-4UTXEJBF.mjs";
|
|
107
|
+
import "./chunk-BBP7EYBG.mjs";
|
|
108
|
+
import "./chunk-ZFCG2354.mjs";
|
|
109
|
+
import "./chunk-LEYWBRRG.mjs";
|
|
110
|
+
import "./chunk-2PCPX3L2.mjs";
|
|
111
|
+
import "./chunk-XJYL2XTV.mjs";
|
|
112
|
+
import "./chunk-DXWAKJTM.mjs";
|
|
113
|
+
import "./chunk-XP4VHZBM.mjs";
|
|
114
|
+
import "./chunk-JQ67EF5F.mjs";
|
|
115
|
+
import {
|
|
116
|
+
useSalesChannel,
|
|
117
|
+
useSalesChannels
|
|
118
|
+
} from "./chunk-QVJ6Q4XS.mjs";
|
|
119
|
+
import "./chunk-I2GUUJVE.mjs";
|
|
120
|
+
import {
|
|
121
|
+
useRegions
|
|
122
|
+
} from "./chunk-QZ5QAA5L.mjs";
|
|
123
|
+
import {
|
|
124
|
+
useStore
|
|
125
|
+
} from "./chunk-7M2A645H.mjs";
|
|
126
|
+
import {
|
|
127
|
+
usePricePreferences
|
|
128
|
+
} from "./chunk-NPOS27VN.mjs";
|
|
129
|
+
import {
|
|
130
|
+
useCreateProduct
|
|
131
|
+
} from "./chunk-452UKZW6.mjs";
|
|
132
|
+
import "./chunk-7AXHHXCX.mjs";
|
|
133
|
+
import "./chunk-FXYH54JP.mjs";
|
|
134
|
+
import "./chunk-774WSTCC.mjs";
|
|
135
|
+
import {
|
|
136
|
+
sdk
|
|
137
|
+
} from "./chunk-DTY37DDZ.mjs";
|
|
138
|
+
import "./chunk-QZ7TP4HQ.mjs";
|
|
139
|
+
|
|
140
|
+
// src/routes/products/product-create/product-create.tsx
|
|
141
|
+
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
142
|
+
|
|
143
|
+
// src/routes/products/product-create/components/product-create-form/product-create-form.tsx
|
|
144
|
+
import { Button as Button5, ProgressTabs, toast } from "@acmekit/ui";
|
|
145
|
+
import { useEffect as useEffect2, useMemo as useMemo4, useState as useState4 } from "react";
|
|
146
|
+
import { useWatch as useWatch4 } from "react-hook-form";
|
|
147
|
+
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
148
|
+
|
|
149
|
+
// src/routes/products/product-create/components/product-create-details-form/product-create-details-form.tsx
|
|
150
|
+
import { Divider, Heading as Heading2 } from "@acmekit/ui";
|
|
151
|
+
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
152
|
+
|
|
153
|
+
// src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx
|
|
154
|
+
import { Input, Textarea } from "@acmekit/ui";
|
|
155
|
+
import { useTranslation } from "react-i18next";
|
|
156
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
157
|
+
var ProductCreateGeneralSection = ({
|
|
158
|
+
form
|
|
159
|
+
}) => {
|
|
160
|
+
const { t } = useTranslation();
|
|
161
|
+
return /* @__PURE__ */ jsxs("div", { id: "general", className: "flex flex-col gap-y-6", children: [
|
|
162
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-y-2", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [
|
|
163
|
+
/* @__PURE__ */ jsx(
|
|
164
|
+
Form.Field,
|
|
165
|
+
{
|
|
166
|
+
control: form.control,
|
|
167
|
+
name: "title",
|
|
168
|
+
render: ({ field }) => {
|
|
169
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
170
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("products.fields.title.label") }),
|
|
171
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { ...field, placeholder: t("products.fields.title.placeholder") }) })
|
|
172
|
+
] });
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ jsx(
|
|
177
|
+
Form.Field,
|
|
178
|
+
{
|
|
179
|
+
control: form.control,
|
|
180
|
+
name: "subtitle",
|
|
181
|
+
render: ({ field }) => {
|
|
182
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
183
|
+
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.subtitle.label") }),
|
|
184
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { ...field, placeholder: t("products.fields.subtitle.placeholder") }) })
|
|
185
|
+
] });
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ jsx(
|
|
190
|
+
Form.Field,
|
|
191
|
+
{
|
|
192
|
+
control: form.control,
|
|
193
|
+
name: "handle",
|
|
194
|
+
render: ({ field }) => {
|
|
195
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
196
|
+
/* @__PURE__ */ jsx(
|
|
197
|
+
Form.Label,
|
|
198
|
+
{
|
|
199
|
+
tooltip: t("products.fields.handle.tooltip"),
|
|
200
|
+
optional: true,
|
|
201
|
+
children: t("fields.handle")
|
|
202
|
+
}
|
|
203
|
+
),
|
|
204
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(HandleInput, { ...field, placeholder: t("products.fields.handle.placeholder") }) })
|
|
205
|
+
] });
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
] }) }),
|
|
210
|
+
/* @__PURE__ */ jsx(
|
|
211
|
+
Form.Field,
|
|
212
|
+
{
|
|
213
|
+
control: form.control,
|
|
214
|
+
name: "description",
|
|
215
|
+
render: ({ field }) => {
|
|
216
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
217
|
+
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("products.fields.description.label") }),
|
|
218
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Textarea, { ...field, placeholder: t("products.fields.description.placeholder") }) })
|
|
219
|
+
] });
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] });
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// src/routes/products/product-create/components/product-create-details-form/components/product-create-details-media-section/product-create-details-media-section.tsx
|
|
227
|
+
import {
|
|
228
|
+
defaultDropAnimationSideEffects,
|
|
229
|
+
DndContext,
|
|
230
|
+
DragOverlay,
|
|
231
|
+
KeyboardSensor,
|
|
232
|
+
PointerSensor,
|
|
233
|
+
useSensor,
|
|
234
|
+
useSensors
|
|
235
|
+
} from "@dnd-kit/core";
|
|
236
|
+
import {
|
|
237
|
+
arrayMove,
|
|
238
|
+
SortableContext,
|
|
239
|
+
sortableKeyboardCoordinates,
|
|
240
|
+
useSortable
|
|
241
|
+
} from "@dnd-kit/sortable";
|
|
242
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
243
|
+
import {
|
|
244
|
+
DotsSix,
|
|
245
|
+
StackPerspective,
|
|
246
|
+
ThumbnailBadge,
|
|
247
|
+
Trash,
|
|
248
|
+
XMark
|
|
249
|
+
} from "@acmekit/icons";
|
|
250
|
+
import { IconButton, Text } from "@acmekit/ui";
|
|
251
|
+
import { useState } from "react";
|
|
252
|
+
import { useFieldArray } from "react-hook-form";
|
|
253
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
254
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
255
|
+
var dropAnimationConfig = {
|
|
256
|
+
sideEffects: defaultDropAnimationSideEffects({
|
|
257
|
+
styles: {
|
|
258
|
+
active: {
|
|
259
|
+
opacity: "0.4"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
})
|
|
263
|
+
};
|
|
264
|
+
var ProductCreateMediaSection = ({
|
|
265
|
+
form
|
|
266
|
+
}) => {
|
|
267
|
+
const { fields, append, remove } = useFieldArray({
|
|
268
|
+
name: "media",
|
|
269
|
+
control: form.control,
|
|
270
|
+
keyName: "field_id"
|
|
271
|
+
});
|
|
272
|
+
const [activeId, setActiveId] = useState(null);
|
|
273
|
+
const sensors = useSensors(
|
|
274
|
+
useSensor(PointerSensor),
|
|
275
|
+
useSensor(KeyboardSensor, {
|
|
276
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
277
|
+
})
|
|
278
|
+
);
|
|
279
|
+
const handleDragStart = (event) => {
|
|
280
|
+
setActiveId(event.active.id);
|
|
281
|
+
};
|
|
282
|
+
const handleDragEnd = (event) => {
|
|
283
|
+
setActiveId(null);
|
|
284
|
+
const { active, over } = event;
|
|
285
|
+
if (active.id !== over?.id) {
|
|
286
|
+
const oldIndex = fields.findIndex((item) => item.field_id === active.id);
|
|
287
|
+
const newIndex = fields.findIndex((item) => item.field_id === over?.id);
|
|
288
|
+
form.setValue("media", arrayMove(fields, oldIndex, newIndex), {
|
|
289
|
+
shouldDirty: true,
|
|
290
|
+
shouldTouch: true
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
const handleDragCancel = () => {
|
|
295
|
+
setActiveId(null);
|
|
296
|
+
};
|
|
297
|
+
const getOnDelete = (index) => {
|
|
298
|
+
return () => {
|
|
299
|
+
remove(index);
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
const getMakeThumbnail = (index) => {
|
|
303
|
+
return () => {
|
|
304
|
+
const newFields = fields.map((field, i) => {
|
|
305
|
+
return {
|
|
306
|
+
...field,
|
|
307
|
+
isThumbnail: i === index
|
|
308
|
+
};
|
|
309
|
+
});
|
|
310
|
+
form.setValue("media", newFields, {
|
|
311
|
+
shouldDirty: true,
|
|
312
|
+
shouldTouch: true
|
|
313
|
+
});
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
const getItemHandlers = (index) => {
|
|
317
|
+
return {
|
|
318
|
+
onDelete: getOnDelete(index),
|
|
319
|
+
onMakeThumbnail: getMakeThumbnail(index)
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
return /* @__PURE__ */ jsxs2("div", { id: "media", className: "flex flex-col gap-y-2", children: [
|
|
323
|
+
/* @__PURE__ */ jsx2(UploadMediaFormItem, { form, append, showHint: false }),
|
|
324
|
+
/* @__PURE__ */ jsxs2(
|
|
325
|
+
DndContext,
|
|
326
|
+
{
|
|
327
|
+
sensors,
|
|
328
|
+
onDragEnd: handleDragEnd,
|
|
329
|
+
onDragStart: handleDragStart,
|
|
330
|
+
onDragCancel: handleDragCancel,
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ jsx2(DragOverlay, { dropAnimation: dropAnimationConfig, children: activeId ? /* @__PURE__ */ jsx2(
|
|
333
|
+
MediaGridItemOverlay,
|
|
334
|
+
{
|
|
335
|
+
field: fields.find((m) => m.field_id === activeId)
|
|
336
|
+
}
|
|
337
|
+
) : null }),
|
|
338
|
+
/* @__PURE__ */ jsx2("ul", { className: "flex flex-col gap-y-2", children: /* @__PURE__ */ jsx2(SortableContext, { items: fields.map((field) => field.field_id), children: fields.map((field, index) => {
|
|
339
|
+
const { onDelete, onMakeThumbnail } = getItemHandlers(index);
|
|
340
|
+
return /* @__PURE__ */ jsx2(
|
|
341
|
+
MediaItem,
|
|
342
|
+
{
|
|
343
|
+
field,
|
|
344
|
+
onDelete,
|
|
345
|
+
onMakeThumbnail
|
|
346
|
+
},
|
|
347
|
+
field.field_id
|
|
348
|
+
);
|
|
349
|
+
}) }) })
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
] });
|
|
354
|
+
};
|
|
355
|
+
var MediaItem = ({ field, onDelete, onMakeThumbnail }) => {
|
|
356
|
+
const { t } = useTranslation2();
|
|
357
|
+
const {
|
|
358
|
+
attributes,
|
|
359
|
+
listeners,
|
|
360
|
+
setNodeRef,
|
|
361
|
+
setActivatorNodeRef,
|
|
362
|
+
transform,
|
|
363
|
+
transition,
|
|
364
|
+
isDragging
|
|
365
|
+
} = useSortable({ id: field.field_id });
|
|
366
|
+
const style = {
|
|
367
|
+
opacity: isDragging ? 0.4 : void 0,
|
|
368
|
+
transform: CSS.Translate.toString(transform),
|
|
369
|
+
transition
|
|
370
|
+
};
|
|
371
|
+
if (!field.file) {
|
|
372
|
+
return null;
|
|
373
|
+
}
|
|
374
|
+
return /* @__PURE__ */ jsxs2(
|
|
375
|
+
"li",
|
|
376
|
+
{
|
|
377
|
+
className: "bg-ui-bg-component shadow-elevation-card-rest flex items-center justify-between rounded-lg px-3 py-2",
|
|
378
|
+
ref: setNodeRef,
|
|
379
|
+
style,
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
|
|
382
|
+
/* @__PURE__ */ jsx2(
|
|
383
|
+
IconButton,
|
|
384
|
+
{
|
|
385
|
+
variant: "transparent",
|
|
386
|
+
type: "button",
|
|
387
|
+
size: "small",
|
|
388
|
+
...attributes,
|
|
389
|
+
...listeners,
|
|
390
|
+
ref: setActivatorNodeRef,
|
|
391
|
+
className: "cursor-grab touch-none active:cursor-grabbing",
|
|
392
|
+
children: /* @__PURE__ */ jsx2(DotsSix, { className: "text-ui-fg-muted" })
|
|
393
|
+
}
|
|
394
|
+
),
|
|
395
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-3", children: [
|
|
396
|
+
/* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-base h-10 w-[30px] overflow-hidden rounded-md", children: /* @__PURE__ */ jsx2(ThumbnailPreview, { url: field.url }) }),
|
|
397
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
|
|
398
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: field.file.name }),
|
|
399
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-1", children: [
|
|
400
|
+
field.isThumbnail && /* @__PURE__ */ jsx2(ThumbnailBadge, {}),
|
|
401
|
+
/* @__PURE__ */ jsx2(
|
|
402
|
+
Text,
|
|
403
|
+
{
|
|
404
|
+
size: "xsmall",
|
|
405
|
+
leading: "compact",
|
|
406
|
+
className: "text-ui-fg-subtle",
|
|
407
|
+
children: formatFileSize(field.file.size)
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
] })
|
|
411
|
+
] })
|
|
412
|
+
] })
|
|
413
|
+
] }),
|
|
414
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-1", children: [
|
|
415
|
+
/* @__PURE__ */ jsx2(
|
|
416
|
+
ActionMenu,
|
|
417
|
+
{
|
|
418
|
+
groups: [
|
|
419
|
+
{
|
|
420
|
+
actions: [
|
|
421
|
+
{
|
|
422
|
+
label: t("products.media.makeThumbnail"),
|
|
423
|
+
icon: /* @__PURE__ */ jsx2(StackPerspective, {}),
|
|
424
|
+
onClick: onMakeThumbnail
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
actions: [
|
|
430
|
+
{
|
|
431
|
+
icon: /* @__PURE__ */ jsx2(Trash, {}),
|
|
432
|
+
label: t("actions.delete"),
|
|
433
|
+
onClick: onDelete
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
),
|
|
440
|
+
/* @__PURE__ */ jsx2(
|
|
441
|
+
IconButton,
|
|
442
|
+
{
|
|
443
|
+
type: "button",
|
|
444
|
+
size: "small",
|
|
445
|
+
variant: "transparent",
|
|
446
|
+
onClick: onDelete,
|
|
447
|
+
children: /* @__PURE__ */ jsx2(XMark, {})
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
] })
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
);
|
|
454
|
+
};
|
|
455
|
+
var MediaGridItemOverlay = ({ field }) => {
|
|
456
|
+
return /* @__PURE__ */ jsxs2("li", { className: "bg-ui-bg-component shadow-elevation-card-rest flex items-center justify-between rounded-lg px-3 py-2", children: [
|
|
457
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
|
|
458
|
+
/* @__PURE__ */ jsx2(
|
|
459
|
+
IconButton,
|
|
460
|
+
{
|
|
461
|
+
variant: "transparent",
|
|
462
|
+
size: "small",
|
|
463
|
+
className: "cursor-grab touch-none active:cursor-grabbing",
|
|
464
|
+
children: /* @__PURE__ */ jsx2(DotsSix, { className: "text-ui-fg-muted" })
|
|
465
|
+
}
|
|
466
|
+
),
|
|
467
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-3", children: [
|
|
468
|
+
/* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-base h-10 w-[30px] overflow-hidden rounded-md", children: /* @__PURE__ */ jsx2(ThumbnailPreview, { url: field.url }) }),
|
|
469
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
|
|
470
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: field.file?.name }),
|
|
471
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-1", children: [
|
|
472
|
+
field.isThumbnail && /* @__PURE__ */ jsx2(ThumbnailBadge, {}),
|
|
473
|
+
/* @__PURE__ */ jsx2(
|
|
474
|
+
Text,
|
|
475
|
+
{
|
|
476
|
+
size: "xsmall",
|
|
477
|
+
leading: "compact",
|
|
478
|
+
className: "text-ui-fg-subtle",
|
|
479
|
+
children: formatFileSize(field.file?.size ?? 0)
|
|
480
|
+
}
|
|
481
|
+
)
|
|
482
|
+
] })
|
|
483
|
+
] })
|
|
484
|
+
] })
|
|
485
|
+
] }),
|
|
486
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-1", children: [
|
|
487
|
+
/* @__PURE__ */ jsx2(ActionMenu, { groups: [] }),
|
|
488
|
+
/* @__PURE__ */ jsx2(
|
|
489
|
+
IconButton,
|
|
490
|
+
{
|
|
491
|
+
type: "button",
|
|
492
|
+
size: "small",
|
|
493
|
+
variant: "transparent",
|
|
494
|
+
onClick: () => {
|
|
495
|
+
},
|
|
496
|
+
children: /* @__PURE__ */ jsx2(XMark, {})
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
] })
|
|
500
|
+
] });
|
|
501
|
+
};
|
|
502
|
+
var ThumbnailPreview = ({ url }) => {
|
|
503
|
+
if (!url) {
|
|
504
|
+
return null;
|
|
505
|
+
}
|
|
506
|
+
return /* @__PURE__ */ jsx2("img", { src: url, alt: "", className: "size-full object-cover object-center" });
|
|
507
|
+
};
|
|
508
|
+
function formatFileSize(bytes, decimalPlaces = 2) {
|
|
509
|
+
if (bytes === 0) {
|
|
510
|
+
return "0 Bytes";
|
|
511
|
+
}
|
|
512
|
+
const k = 1024;
|
|
513
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
514
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
515
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimalPlaces)) + " " + sizes[i];
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx
|
|
519
|
+
import { XMarkMini } from "@acmekit/icons";
|
|
520
|
+
import {
|
|
521
|
+
Alert,
|
|
522
|
+
Button,
|
|
523
|
+
Checkbox,
|
|
524
|
+
clx as clx2,
|
|
525
|
+
Heading,
|
|
526
|
+
Hint,
|
|
527
|
+
IconButton as IconButton3,
|
|
528
|
+
InlineTip,
|
|
529
|
+
Input as Input2,
|
|
530
|
+
Label,
|
|
531
|
+
Text as Text2
|
|
532
|
+
} from "@acmekit/ui";
|
|
533
|
+
import {
|
|
534
|
+
Controller,
|
|
535
|
+
useFieldArray as useFieldArray2,
|
|
536
|
+
useWatch
|
|
537
|
+
} from "react-hook-form";
|
|
538
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
539
|
+
|
|
540
|
+
// src/components/common/sortable-list/sortable-list.tsx
|
|
541
|
+
import {
|
|
542
|
+
DndContext as DndContext2,
|
|
543
|
+
DragOverlay as DragOverlay2,
|
|
544
|
+
KeyboardSensor as KeyboardSensor2,
|
|
545
|
+
PointerSensor as PointerSensor2,
|
|
546
|
+
defaultDropAnimationSideEffects as defaultDropAnimationSideEffects2,
|
|
547
|
+
useSensor as useSensor2,
|
|
548
|
+
useSensors as useSensors2
|
|
549
|
+
} from "@dnd-kit/core";
|
|
550
|
+
import {
|
|
551
|
+
SortableContext as SortableContext2,
|
|
552
|
+
arrayMove as arrayMove2,
|
|
553
|
+
sortableKeyboardCoordinates as sortableKeyboardCoordinates2,
|
|
554
|
+
useSortable as useSortable2
|
|
555
|
+
} from "@dnd-kit/sortable";
|
|
556
|
+
import { CSS as CSS2 } from "@dnd-kit/utilities";
|
|
557
|
+
import { DotsSix as DotsSix2 } from "@acmekit/icons";
|
|
558
|
+
import { IconButton as IconButton2, clx } from "@acmekit/ui";
|
|
559
|
+
import {
|
|
560
|
+
Fragment,
|
|
561
|
+
createContext,
|
|
562
|
+
useContext,
|
|
563
|
+
useMemo,
|
|
564
|
+
useState as useState2
|
|
565
|
+
} from "react";
|
|
566
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
567
|
+
var List = ({
|
|
568
|
+
items,
|
|
569
|
+
onChange,
|
|
570
|
+
renderItem
|
|
571
|
+
}) => {
|
|
572
|
+
const [active, setActive] = useState2(null);
|
|
573
|
+
const [activeItem, activeIndex] = useMemo(() => {
|
|
574
|
+
if (active === null) {
|
|
575
|
+
return [null, null];
|
|
576
|
+
}
|
|
577
|
+
const index = items.findIndex(({ id }) => id === active.id);
|
|
578
|
+
return [items[index], index];
|
|
579
|
+
}, [active, items]);
|
|
580
|
+
const sensors = useSensors2(
|
|
581
|
+
useSensor2(PointerSensor2),
|
|
582
|
+
useSensor2(KeyboardSensor2, {
|
|
583
|
+
coordinateGetter: sortableKeyboardCoordinates2
|
|
584
|
+
})
|
|
585
|
+
);
|
|
586
|
+
const handleDragStart = ({ active: active2 }) => {
|
|
587
|
+
setActive(active2);
|
|
588
|
+
};
|
|
589
|
+
const handleDragEnd = ({ active: active2, over }) => {
|
|
590
|
+
if (over && active2.id !== over.id) {
|
|
591
|
+
const activeIndex2 = items.findIndex(({ id }) => id === active2.id);
|
|
592
|
+
const overIndex = items.findIndex(({ id }) => id === over.id);
|
|
593
|
+
onChange(arrayMove2(items, activeIndex2, overIndex));
|
|
594
|
+
}
|
|
595
|
+
setActive(null);
|
|
596
|
+
};
|
|
597
|
+
const handleDragCancel = () => {
|
|
598
|
+
setActive(null);
|
|
599
|
+
};
|
|
600
|
+
return /* @__PURE__ */ jsxs3(
|
|
601
|
+
DndContext2,
|
|
602
|
+
{
|
|
603
|
+
sensors,
|
|
604
|
+
onDragStart: handleDragStart,
|
|
605
|
+
onDragEnd: handleDragEnd,
|
|
606
|
+
onDragCancel: handleDragCancel,
|
|
607
|
+
children: [
|
|
608
|
+
/* @__PURE__ */ jsx3(Overlay, { children: activeItem && activeIndex !== null ? renderItem(activeItem, activeIndex) : null }),
|
|
609
|
+
/* @__PURE__ */ jsx3(SortableContext2, { items, children: /* @__PURE__ */ jsx3(
|
|
610
|
+
"ul",
|
|
611
|
+
{
|
|
612
|
+
role: "application",
|
|
613
|
+
className: "flex list-inside list-none list-image-none flex-col p-0",
|
|
614
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx3(Fragment, { children: renderItem(item, index) }, item.id))
|
|
615
|
+
}
|
|
616
|
+
) })
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
};
|
|
621
|
+
var dropAnimationConfig2 = {
|
|
622
|
+
sideEffects: defaultDropAnimationSideEffects2({
|
|
623
|
+
styles: {
|
|
624
|
+
active: {
|
|
625
|
+
opacity: "0.4"
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
})
|
|
629
|
+
};
|
|
630
|
+
var Overlay = ({ children }) => {
|
|
631
|
+
return /* @__PURE__ */ jsx3(
|
|
632
|
+
DragOverlay2,
|
|
633
|
+
{
|
|
634
|
+
className: "shadow-elevation-card-hover overflow-hidden rounded-md [&>li]:border-b-0",
|
|
635
|
+
dropAnimation: dropAnimationConfig2,
|
|
636
|
+
children
|
|
637
|
+
}
|
|
638
|
+
);
|
|
639
|
+
};
|
|
640
|
+
var SortableItemContext = createContext(null);
|
|
641
|
+
var useSortableItemContext = () => {
|
|
642
|
+
const context = useContext(SortableItemContext);
|
|
643
|
+
if (!context) {
|
|
644
|
+
throw new Error(
|
|
645
|
+
"useSortableItemContext must be used within a SortableItemContext"
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
return context;
|
|
649
|
+
};
|
|
650
|
+
var Item = ({
|
|
651
|
+
id,
|
|
652
|
+
className,
|
|
653
|
+
children
|
|
654
|
+
}) => {
|
|
655
|
+
const {
|
|
656
|
+
attributes,
|
|
657
|
+
isDragging,
|
|
658
|
+
listeners,
|
|
659
|
+
setNodeRef,
|
|
660
|
+
setActivatorNodeRef,
|
|
661
|
+
transform,
|
|
662
|
+
transition
|
|
663
|
+
} = useSortable2({ id });
|
|
664
|
+
const context = useMemo(
|
|
665
|
+
() => ({
|
|
666
|
+
attributes,
|
|
667
|
+
listeners,
|
|
668
|
+
ref: setActivatorNodeRef,
|
|
669
|
+
isDragging
|
|
670
|
+
}),
|
|
671
|
+
[attributes, listeners, setActivatorNodeRef, isDragging]
|
|
672
|
+
);
|
|
673
|
+
const style = {
|
|
674
|
+
opacity: isDragging ? 0.4 : void 0,
|
|
675
|
+
transform: CSS2.Translate.toString(transform),
|
|
676
|
+
transition
|
|
677
|
+
};
|
|
678
|
+
return /* @__PURE__ */ jsx3(SortableItemContext.Provider, { value: context, children: /* @__PURE__ */ jsx3(
|
|
679
|
+
"li",
|
|
680
|
+
{
|
|
681
|
+
className: clx("transition-fg flex flex-1 list-none", className),
|
|
682
|
+
ref: setNodeRef,
|
|
683
|
+
style,
|
|
684
|
+
children
|
|
685
|
+
}
|
|
686
|
+
) });
|
|
687
|
+
};
|
|
688
|
+
var DragHandle = () => {
|
|
689
|
+
const { attributes, listeners, ref } = useSortableItemContext();
|
|
690
|
+
return /* @__PURE__ */ jsx3(
|
|
691
|
+
IconButton2,
|
|
692
|
+
{
|
|
693
|
+
variant: "transparent",
|
|
694
|
+
size: "small",
|
|
695
|
+
...attributes,
|
|
696
|
+
...listeners,
|
|
697
|
+
ref,
|
|
698
|
+
className: "cursor-grab touch-none active:cursor-grabbing",
|
|
699
|
+
children: /* @__PURE__ */ jsx3(DotsSix2, { className: "text-ui-fg-muted" })
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
};
|
|
703
|
+
var SortableList = Object.assign(List, {
|
|
704
|
+
Item,
|
|
705
|
+
DragHandle
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
// src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx
|
|
709
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
710
|
+
var getPermutations = (data) => {
|
|
711
|
+
if (data.length === 0) {
|
|
712
|
+
return [];
|
|
713
|
+
}
|
|
714
|
+
if (data.length === 1) {
|
|
715
|
+
return data[0].values.map((value) => ({ [data[0].title]: value }));
|
|
716
|
+
}
|
|
717
|
+
const toProcess = data[0];
|
|
718
|
+
const rest = data.slice(1);
|
|
719
|
+
return toProcess.values.flatMap((value) => {
|
|
720
|
+
return getPermutations(rest).map((permutation) => {
|
|
721
|
+
return {
|
|
722
|
+
[toProcess.title]: value,
|
|
723
|
+
...permutation
|
|
724
|
+
};
|
|
725
|
+
});
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
var getVariantName = (options) => {
|
|
729
|
+
return Object.values(options).join(" / ");
|
|
730
|
+
};
|
|
731
|
+
var ProductCreateVariantsSection = ({
|
|
732
|
+
form
|
|
733
|
+
}) => {
|
|
734
|
+
const { t } = useTranslation3();
|
|
735
|
+
const options = useFieldArray2({
|
|
736
|
+
control: form.control,
|
|
737
|
+
name: "options"
|
|
738
|
+
});
|
|
739
|
+
const variants = useFieldArray2({
|
|
740
|
+
control: form.control,
|
|
741
|
+
name: "variants"
|
|
742
|
+
});
|
|
743
|
+
const watchedAreVariantsEnabled = useWatch({
|
|
744
|
+
control: form.control,
|
|
745
|
+
name: "enable_variants",
|
|
746
|
+
defaultValue: false
|
|
747
|
+
});
|
|
748
|
+
const watchedOptions = useWatch({
|
|
749
|
+
control: form.control,
|
|
750
|
+
name: "options",
|
|
751
|
+
defaultValue: []
|
|
752
|
+
});
|
|
753
|
+
const watchedVariants = useWatch({
|
|
754
|
+
control: form.control,
|
|
755
|
+
name: "variants",
|
|
756
|
+
defaultValue: []
|
|
757
|
+
});
|
|
758
|
+
const showInvalidOptionsMessage = !!form.formState.errors.options?.length;
|
|
759
|
+
const showInvalidVariantsMessage = form.formState.errors.variants?.root?.message === "invalid_length";
|
|
760
|
+
const handleOptionValueUpdate = (index, value) => {
|
|
761
|
+
const { isTouched: hasUserSelectedVariants } = form.getFieldState("variants");
|
|
762
|
+
const newOptions = [...watchedOptions];
|
|
763
|
+
newOptions[index].values = value;
|
|
764
|
+
const permutations = getPermutations(
|
|
765
|
+
newOptions.filter(({ values }) => values.length)
|
|
766
|
+
);
|
|
767
|
+
const oldVariants = [...watchedVariants];
|
|
768
|
+
const findMatchingPermutation = (options2) => {
|
|
769
|
+
return permutations.find(
|
|
770
|
+
(permutation) => Object.keys(options2).every((key) => options2[key] === permutation[key])
|
|
771
|
+
);
|
|
772
|
+
};
|
|
773
|
+
const newVariants = oldVariants.reduce((variants2, variant) => {
|
|
774
|
+
const match = findMatchingPermutation(variant.options);
|
|
775
|
+
if (match) {
|
|
776
|
+
variants2.push({
|
|
777
|
+
...variant,
|
|
778
|
+
title: getVariantName(match),
|
|
779
|
+
options: match
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
return variants2;
|
|
783
|
+
}, []);
|
|
784
|
+
const usedPermutations = new Set(
|
|
785
|
+
newVariants.map((variant) => variant.options)
|
|
786
|
+
);
|
|
787
|
+
const unusedPermutations = permutations.filter(
|
|
788
|
+
(permutation) => !usedPermutations.has(permutation)
|
|
789
|
+
);
|
|
790
|
+
unusedPermutations.forEach((permutation) => {
|
|
791
|
+
newVariants.push({
|
|
792
|
+
title: getVariantName(permutation),
|
|
793
|
+
options: permutation,
|
|
794
|
+
should_create: hasUserSelectedVariants ? false : true,
|
|
795
|
+
variant_rank: newVariants.length,
|
|
796
|
+
// NOTE - prepare inventory array here for now so we prevent rendering issue if we append the items later
|
|
797
|
+
inventory: [{ inventory_item_id: "", required_quantity: "" }]
|
|
798
|
+
});
|
|
799
|
+
});
|
|
800
|
+
form.setValue("variants", newVariants);
|
|
801
|
+
};
|
|
802
|
+
const handleRemoveOption = (index) => {
|
|
803
|
+
if (index === 0) {
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
options.remove(index);
|
|
807
|
+
const newOptions = [...watchedOptions];
|
|
808
|
+
newOptions.splice(index, 1);
|
|
809
|
+
const validOptionTitles = new Set(newOptions.map((option) => option.title));
|
|
810
|
+
const permutations = getPermutations(newOptions);
|
|
811
|
+
const oldVariants = [...watchedVariants];
|
|
812
|
+
const newVariants = permutations.reduce((variants2, permutation) => {
|
|
813
|
+
const variant = oldVariants.find(
|
|
814
|
+
({ options: options2 }) => Object.keys(options2).filter((option) => validOptionTitles.has(option)).every((key) => options2[key] === permutation[key])
|
|
815
|
+
);
|
|
816
|
+
if (variant) {
|
|
817
|
+
variants2.push({
|
|
818
|
+
...variant,
|
|
819
|
+
title: variant.title,
|
|
820
|
+
options: permutation
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
return variants2;
|
|
824
|
+
}, []);
|
|
825
|
+
form.setValue("variants", newVariants);
|
|
826
|
+
};
|
|
827
|
+
const handleRankChange = (items) => {
|
|
828
|
+
const update = items.map((item, index) => {
|
|
829
|
+
const variant = watchedVariants.find((v) => v.title === item.title);
|
|
830
|
+
return {
|
|
831
|
+
id: item.id,
|
|
832
|
+
...variant || item,
|
|
833
|
+
variant_rank: index
|
|
834
|
+
};
|
|
835
|
+
});
|
|
836
|
+
variants.replace(update);
|
|
837
|
+
};
|
|
838
|
+
const getCheckboxState = (variants2) => {
|
|
839
|
+
if (variants2.every((variant) => variant.should_create)) {
|
|
840
|
+
return true;
|
|
841
|
+
}
|
|
842
|
+
if (variants2.some((variant) => variant.should_create)) {
|
|
843
|
+
return "indeterminate";
|
|
844
|
+
}
|
|
845
|
+
return false;
|
|
846
|
+
};
|
|
847
|
+
const onCheckboxChange = (value) => {
|
|
848
|
+
switch (value) {
|
|
849
|
+
case true: {
|
|
850
|
+
const update = watchedVariants.map((variant) => {
|
|
851
|
+
return {
|
|
852
|
+
...variant,
|
|
853
|
+
should_create: true
|
|
854
|
+
};
|
|
855
|
+
});
|
|
856
|
+
form.setValue("variants", update);
|
|
857
|
+
break;
|
|
858
|
+
}
|
|
859
|
+
case false: {
|
|
860
|
+
const update = watchedVariants.map((variant) => {
|
|
861
|
+
return {
|
|
862
|
+
...variant,
|
|
863
|
+
should_create: false
|
|
864
|
+
};
|
|
865
|
+
});
|
|
866
|
+
form.setValue("variants", decorateVariantsWithDefaultValues(update));
|
|
867
|
+
break;
|
|
868
|
+
}
|
|
869
|
+
case "indeterminate":
|
|
870
|
+
break;
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
const createDefaultOptionAndVariant = () => {
|
|
874
|
+
form.setValue("options", [
|
|
875
|
+
{
|
|
876
|
+
title: "Default option",
|
|
877
|
+
values: ["Default option value"]
|
|
878
|
+
}
|
|
879
|
+
]);
|
|
880
|
+
form.setValue(
|
|
881
|
+
"variants",
|
|
882
|
+
decorateVariantsWithDefaultValues([
|
|
883
|
+
{
|
|
884
|
+
title: "Default variant",
|
|
885
|
+
should_create: true,
|
|
886
|
+
variant_rank: 0,
|
|
887
|
+
options: {
|
|
888
|
+
"Default option": "Default option value"
|
|
889
|
+
},
|
|
890
|
+
inventory: [{ inventory_item_id: "", required_quantity: "" }],
|
|
891
|
+
is_default: true
|
|
892
|
+
}
|
|
893
|
+
])
|
|
894
|
+
);
|
|
895
|
+
};
|
|
896
|
+
return /* @__PURE__ */ jsxs4("div", { id: "variants", className: "flex flex-col gap-y-8", children: [
|
|
897
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-y-6", children: [
|
|
898
|
+
/* @__PURE__ */ jsx4(Heading, { level: "h2", children: t("products.create.variants.header") }),
|
|
899
|
+
/* @__PURE__ */ jsx4(
|
|
900
|
+
SwitchBox,
|
|
901
|
+
{
|
|
902
|
+
control: form.control,
|
|
903
|
+
name: "enable_variants",
|
|
904
|
+
label: t("products.create.variants.subHeadingTitle"),
|
|
905
|
+
description: t("products.create.variants.subHeadingDescription"),
|
|
906
|
+
onCheckedChange: (checked) => {
|
|
907
|
+
if (checked) {
|
|
908
|
+
form.setValue("options", [
|
|
909
|
+
{
|
|
910
|
+
title: "",
|
|
911
|
+
values: []
|
|
912
|
+
}
|
|
913
|
+
]);
|
|
914
|
+
form.setValue("variants", []);
|
|
915
|
+
} else {
|
|
916
|
+
createDefaultOptionAndVariant();
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
)
|
|
921
|
+
] }),
|
|
922
|
+
watchedAreVariantsEnabled && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
923
|
+
/* @__PURE__ */ jsx4("div", { className: "flex flex-col gap-y-6", children: /* @__PURE__ */ jsx4(
|
|
924
|
+
Form.Field,
|
|
925
|
+
{
|
|
926
|
+
control: form.control,
|
|
927
|
+
name: "options",
|
|
928
|
+
render: () => {
|
|
929
|
+
return /* @__PURE__ */ jsx4(Form.Item, { children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-y-6", children: [
|
|
930
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-start justify-between gap-x-4", children: [
|
|
931
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
|
|
932
|
+
/* @__PURE__ */ jsx4(Form.Label, { children: t("products.create.variants.productOptions.label") }),
|
|
933
|
+
/* @__PURE__ */ jsx4(Form.Hint, { children: t("products.create.variants.productOptions.hint") })
|
|
934
|
+
] }),
|
|
935
|
+
/* @__PURE__ */ jsx4(
|
|
936
|
+
Button,
|
|
937
|
+
{
|
|
938
|
+
size: "small",
|
|
939
|
+
variant: "secondary",
|
|
940
|
+
type: "button",
|
|
941
|
+
onClick: () => {
|
|
942
|
+
options.append({
|
|
943
|
+
title: "",
|
|
944
|
+
values: []
|
|
945
|
+
});
|
|
946
|
+
},
|
|
947
|
+
children: t("actions.add")
|
|
948
|
+
}
|
|
949
|
+
)
|
|
950
|
+
] }),
|
|
951
|
+
showInvalidOptionsMessage && /* @__PURE__ */ jsx4(Alert, { dismissible: true, variant: "error", children: t("products.create.errors.options") }),
|
|
952
|
+
/* @__PURE__ */ jsx4("ul", { className: "flex flex-col gap-y-4", children: options.fields.map((option, index) => {
|
|
953
|
+
const hasError = !!form.formState.errors.options?.[index];
|
|
954
|
+
return /* @__PURE__ */ jsxs4(
|
|
955
|
+
"li",
|
|
956
|
+
{
|
|
957
|
+
className: clx2(
|
|
958
|
+
"bg-ui-bg-component shadow-elevation-card-rest grid grid-cols-[1fr_28px] items-center gap-1.5 rounded-xl p-1.5",
|
|
959
|
+
{
|
|
960
|
+
"border-ui-border-error shadow-borders-error": hasError
|
|
961
|
+
}
|
|
962
|
+
),
|
|
963
|
+
children: [
|
|
964
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-[min-content,1fr] items-center gap-1.5", children: [
|
|
965
|
+
/* @__PURE__ */ jsx4("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx4(
|
|
966
|
+
Label,
|
|
967
|
+
{
|
|
968
|
+
size: "xsmall",
|
|
969
|
+
weight: "plus",
|
|
970
|
+
className: "text-ui-fg-subtle",
|
|
971
|
+
htmlFor: `options.${index}.title`,
|
|
972
|
+
children: t("fields.title")
|
|
973
|
+
}
|
|
974
|
+
) }),
|
|
975
|
+
/* @__PURE__ */ jsx4(
|
|
976
|
+
Input2,
|
|
977
|
+
{
|
|
978
|
+
className: "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover",
|
|
979
|
+
...form.register(
|
|
980
|
+
`options.${index}.title`
|
|
981
|
+
),
|
|
982
|
+
placeholder: t(
|
|
983
|
+
"products.fields.options.optionTitlePlaceholder"
|
|
984
|
+
)
|
|
985
|
+
}
|
|
986
|
+
),
|
|
987
|
+
/* @__PURE__ */ jsx4("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx4(
|
|
988
|
+
Label,
|
|
989
|
+
{
|
|
990
|
+
size: "xsmall",
|
|
991
|
+
weight: "plus",
|
|
992
|
+
className: "text-ui-fg-subtle",
|
|
993
|
+
htmlFor: `options.${index}.values`,
|
|
994
|
+
children: t("fields.values")
|
|
995
|
+
}
|
|
996
|
+
) }),
|
|
997
|
+
/* @__PURE__ */ jsx4(
|
|
998
|
+
Controller,
|
|
999
|
+
{
|
|
1000
|
+
control: form.control,
|
|
1001
|
+
name: `options.${index}.values`,
|
|
1002
|
+
render: ({
|
|
1003
|
+
field: { onChange, ...field }
|
|
1004
|
+
}) => {
|
|
1005
|
+
const handleValueChange = (value) => {
|
|
1006
|
+
handleOptionValueUpdate(index, value);
|
|
1007
|
+
onChange(value);
|
|
1008
|
+
};
|
|
1009
|
+
return /* @__PURE__ */ jsx4(
|
|
1010
|
+
ChipInput,
|
|
1011
|
+
{
|
|
1012
|
+
...field,
|
|
1013
|
+
variant: "contrast",
|
|
1014
|
+
onChange: handleValueChange,
|
|
1015
|
+
placeholder: t(
|
|
1016
|
+
"products.fields.options.variantionsPlaceholder"
|
|
1017
|
+
)
|
|
1018
|
+
}
|
|
1019
|
+
);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
)
|
|
1023
|
+
] }),
|
|
1024
|
+
/* @__PURE__ */ jsx4(
|
|
1025
|
+
IconButton3,
|
|
1026
|
+
{
|
|
1027
|
+
type: "button",
|
|
1028
|
+
size: "small",
|
|
1029
|
+
variant: "transparent",
|
|
1030
|
+
className: "text-ui-fg-muted",
|
|
1031
|
+
disabled: index === 0,
|
|
1032
|
+
onClick: () => handleRemoveOption(index),
|
|
1033
|
+
children: /* @__PURE__ */ jsx4(XMarkMini, {})
|
|
1034
|
+
}
|
|
1035
|
+
)
|
|
1036
|
+
]
|
|
1037
|
+
},
|
|
1038
|
+
option.id
|
|
1039
|
+
);
|
|
1040
|
+
}) })
|
|
1041
|
+
] }) });
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
) }),
|
|
1045
|
+
/* @__PURE__ */ jsx4("div", { className: "grid grid-cols-1 gap-x-4 gap-y-8", children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-y-6", children: [
|
|
1046
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
|
|
1047
|
+
/* @__PURE__ */ jsx4(Label, { weight: "plus", children: t("products.create.variants.productVariants.label") }),
|
|
1048
|
+
/* @__PURE__ */ jsx4(Hint, { children: t("products.create.variants.productVariants.hint") })
|
|
1049
|
+
] }),
|
|
1050
|
+
!showInvalidOptionsMessage && showInvalidVariantsMessage && /* @__PURE__ */ jsx4(Alert, { dismissible: true, variant: "error", children: t("products.create.errors.variants") }),
|
|
1051
|
+
variants.fields.length > 0 ? /* @__PURE__ */ jsxs4("div", { className: "overflow-hidden rounded-xl border", children: [
|
|
1052
|
+
/* @__PURE__ */ jsxs4(
|
|
1053
|
+
"div",
|
|
1054
|
+
{
|
|
1055
|
+
className: "bg-ui-bg-component text-ui-fg-subtle grid items-center gap-3 border-b px-6 py-2.5",
|
|
1056
|
+
style: {
|
|
1057
|
+
gridTemplateColumns: `20px 28px repeat(${watchedOptions.length}, 1fr)`
|
|
1058
|
+
},
|
|
1059
|
+
children: [
|
|
1060
|
+
/* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
|
|
1061
|
+
Checkbox,
|
|
1062
|
+
{
|
|
1063
|
+
className: "relative",
|
|
1064
|
+
checked: getCheckboxState(watchedVariants),
|
|
1065
|
+
onCheckedChange: onCheckboxChange
|
|
1066
|
+
}
|
|
1067
|
+
) }),
|
|
1068
|
+
/* @__PURE__ */ jsx4("div", {}),
|
|
1069
|
+
watchedOptions.map((option, index) => /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", weight: "plus", children: option.title }) }, index))
|
|
1070
|
+
]
|
|
1071
|
+
}
|
|
1072
|
+
),
|
|
1073
|
+
/* @__PURE__ */ jsx4(
|
|
1074
|
+
SortableList,
|
|
1075
|
+
{
|
|
1076
|
+
items: variants.fields,
|
|
1077
|
+
onChange: handleRankChange,
|
|
1078
|
+
renderItem: (item, index) => {
|
|
1079
|
+
return /* @__PURE__ */ jsx4(
|
|
1080
|
+
SortableList.Item,
|
|
1081
|
+
{
|
|
1082
|
+
id: item.id,
|
|
1083
|
+
className: clx2("bg-ui-bg-base border-b", {
|
|
1084
|
+
"border-b-0": index === variants.fields.length - 1
|
|
1085
|
+
}),
|
|
1086
|
+
children: /* @__PURE__ */ jsxs4(
|
|
1087
|
+
"div",
|
|
1088
|
+
{
|
|
1089
|
+
className: "text-ui-fg-subtle grid w-full items-center gap-3 px-6 py-2.5",
|
|
1090
|
+
style: {
|
|
1091
|
+
gridTemplateColumns: `20px 28px repeat(${watchedOptions.length}, 1fr)`
|
|
1092
|
+
},
|
|
1093
|
+
children: [
|
|
1094
|
+
/* @__PURE__ */ jsx4(
|
|
1095
|
+
Form.Field,
|
|
1096
|
+
{
|
|
1097
|
+
control: form.control,
|
|
1098
|
+
name: `variants.${index}.should_create`,
|
|
1099
|
+
render: ({
|
|
1100
|
+
field: { value, onChange, ...field }
|
|
1101
|
+
}) => {
|
|
1102
|
+
return /* @__PURE__ */ jsx4(Form.Item, { children: /* @__PURE__ */ jsx4(Form.Control, { children: /* @__PURE__ */ jsx4(
|
|
1103
|
+
Checkbox,
|
|
1104
|
+
{
|
|
1105
|
+
className: "relative",
|
|
1106
|
+
...field,
|
|
1107
|
+
checked: value,
|
|
1108
|
+
onCheckedChange: onChange
|
|
1109
|
+
}
|
|
1110
|
+
) }) });
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
),
|
|
1114
|
+
/* @__PURE__ */ jsx4(SortableList.DragHandle, {}),
|
|
1115
|
+
Object.values(item.options).map((value, index2) => /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", children: value }, index2))
|
|
1116
|
+
]
|
|
1117
|
+
}
|
|
1118
|
+
)
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
)
|
|
1124
|
+
] }) : /* @__PURE__ */ jsx4(Alert, { children: t("products.create.variants.productVariants.alert") }),
|
|
1125
|
+
variants.fields.length > 0 && /* @__PURE__ */ jsx4(InlineTip, { label: t("general.tip"), children: t("products.create.variants.productVariants.tip") })
|
|
1126
|
+
] }) })
|
|
1127
|
+
] })
|
|
1128
|
+
] });
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
// src/routes/products/product-create/components/product-create-details-form/product-create-details-form.tsx
|
|
1132
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1133
|
+
var ProductCreateDetailsForm = ({ form }) => {
|
|
1134
|
+
const { getFormFields } = useExtension();
|
|
1135
|
+
const fields = getFormFields("product", "create", "general");
|
|
1136
|
+
return /* @__PURE__ */ jsx5("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsxs5("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
|
|
1137
|
+
/* @__PURE__ */ jsx5(Header, {}),
|
|
1138
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-y-6", children: [
|
|
1139
|
+
/* @__PURE__ */ jsx5(ProductCreateGeneralSection, { form }),
|
|
1140
|
+
/* @__PURE__ */ jsx5(FormExtensionZone, { fields, form }),
|
|
1141
|
+
/* @__PURE__ */ jsx5(ProductCreateMediaSection, { form })
|
|
1142
|
+
] }),
|
|
1143
|
+
/* @__PURE__ */ jsx5(Divider, {}),
|
|
1144
|
+
/* @__PURE__ */ jsx5(ProductCreateVariantsSection, { form })
|
|
1145
|
+
] }) });
|
|
1146
|
+
};
|
|
1147
|
+
var Header = () => {
|
|
1148
|
+
const { t } = useTranslation4();
|
|
1149
|
+
return /* @__PURE__ */ jsx5("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx5(Heading2, { children: t("products.create.header") }) });
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
// src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx
|
|
1153
|
+
import { Button as Button2, Heading as Heading3, IconButton as IconButton4, Input as Input3, Label as Label2 } from "@acmekit/ui";
|
|
1154
|
+
import { useFieldArray as useFieldArray3, useWatch as useWatch2 } from "react-hook-form";
|
|
1155
|
+
import { XMarkMini as XMarkMini2 } from "@acmekit/icons";
|
|
1156
|
+
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
1157
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1158
|
+
function InventoryItemRow({
|
|
1159
|
+
form,
|
|
1160
|
+
variantIndex,
|
|
1161
|
+
inventoryIndex,
|
|
1162
|
+
inventoryItem,
|
|
1163
|
+
isItemOptionDisabled,
|
|
1164
|
+
onRemove
|
|
1165
|
+
}) {
|
|
1166
|
+
const { t } = useTranslation5();
|
|
1167
|
+
const selectedInventoryItemId = useWatch2({
|
|
1168
|
+
control: form.control,
|
|
1169
|
+
name: `variants.${variantIndex}.inventory.${inventoryIndex}.inventory_item_id`
|
|
1170
|
+
});
|
|
1171
|
+
const items = useComboboxData({
|
|
1172
|
+
queryKey: ["inventory_items"],
|
|
1173
|
+
defaultValueKey: "id",
|
|
1174
|
+
selectedValue: selectedInventoryItemId,
|
|
1175
|
+
queryFn: (params) => sdk.admin.inventoryItem.list(params),
|
|
1176
|
+
getOptions: (data) => data.inventory_items.map((item) => ({
|
|
1177
|
+
label: `${item.title} ${item.sku ? `(${item.sku})` : ""}`,
|
|
1178
|
+
value: item.id
|
|
1179
|
+
}))
|
|
1180
|
+
});
|
|
1181
|
+
return /* @__PURE__ */ jsxs6(
|
|
1182
|
+
"li",
|
|
1183
|
+
{
|
|
1184
|
+
className: "bg-ui-bg-component shadow-elevation-card-rest grid grid-cols-[1fr_28px] items-center gap-1.5 rounded-xl p-1.5",
|
|
1185
|
+
children: [
|
|
1186
|
+
/* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-[min-content,1fr] items-center gap-1.5", children: [
|
|
1187
|
+
/* @__PURE__ */ jsx6("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx6(
|
|
1188
|
+
Label2,
|
|
1189
|
+
{
|
|
1190
|
+
size: "xsmall",
|
|
1191
|
+
weight: "plus",
|
|
1192
|
+
className: "text-ui-fg-subtle",
|
|
1193
|
+
htmlFor: `variants.${variantIndex}.inventory.${inventoryIndex}.inventory_item_id`,
|
|
1194
|
+
children: t("fields.item")
|
|
1195
|
+
}
|
|
1196
|
+
) }),
|
|
1197
|
+
/* @__PURE__ */ jsx6(
|
|
1198
|
+
Form.Field,
|
|
1199
|
+
{
|
|
1200
|
+
control: form.control,
|
|
1201
|
+
name: `variants.${variantIndex}.inventory.${inventoryIndex}.inventory_item_id`,
|
|
1202
|
+
render: ({ field }) => {
|
|
1203
|
+
return /* @__PURE__ */ jsx6(Form.Item, { children: /* @__PURE__ */ jsx6(Form.Control, { children: /* @__PURE__ */ jsx6(
|
|
1204
|
+
Combobox,
|
|
1205
|
+
{
|
|
1206
|
+
...field,
|
|
1207
|
+
options: items.options.map((o) => ({
|
|
1208
|
+
...o,
|
|
1209
|
+
disabled: isItemOptionDisabled(o, inventoryIndex)
|
|
1210
|
+
})),
|
|
1211
|
+
searchValue: items.searchValue,
|
|
1212
|
+
onBlur: () => items.onSearchValueChange(""),
|
|
1213
|
+
onSearchValueChange: items.onSearchValueChange,
|
|
1214
|
+
fetchNextPage: items.fetchNextPage,
|
|
1215
|
+
className: "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover",
|
|
1216
|
+
placeholder: t("products.create.inventory.itemPlaceholder")
|
|
1217
|
+
}
|
|
1218
|
+
) }) });
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
),
|
|
1222
|
+
/* @__PURE__ */ jsx6("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx6(
|
|
1223
|
+
Label2,
|
|
1224
|
+
{
|
|
1225
|
+
size: "xsmall",
|
|
1226
|
+
weight: "plus",
|
|
1227
|
+
className: "text-ui-fg-subtle",
|
|
1228
|
+
htmlFor: `variants.${variantIndex}.inventory.${inventoryIndex}.required_quantity`,
|
|
1229
|
+
children: t("fields.quantity")
|
|
1230
|
+
}
|
|
1231
|
+
) }),
|
|
1232
|
+
/* @__PURE__ */ jsx6(
|
|
1233
|
+
Form.Field,
|
|
1234
|
+
{
|
|
1235
|
+
control: form.control,
|
|
1236
|
+
name: `variants.${variantIndex}.inventory.${inventoryIndex}.required_quantity`,
|
|
1237
|
+
render: ({ field: { onChange, value, ...field } }) => {
|
|
1238
|
+
return /* @__PURE__ */ jsxs6(Form.Item, { children: [
|
|
1239
|
+
/* @__PURE__ */ jsx6(Form.Control, { children: /* @__PURE__ */ jsx6(
|
|
1240
|
+
Input3,
|
|
1241
|
+
{
|
|
1242
|
+
type: "number",
|
|
1243
|
+
className: "bg-ui-bg-field-component",
|
|
1244
|
+
min: 0,
|
|
1245
|
+
value,
|
|
1246
|
+
onChange: (e) => {
|
|
1247
|
+
const value2 = e.target.value;
|
|
1248
|
+
if (value2 === "") {
|
|
1249
|
+
onChange(null);
|
|
1250
|
+
} else {
|
|
1251
|
+
onChange(Number(value2));
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
...field,
|
|
1255
|
+
placeholder: t(
|
|
1256
|
+
"products.create.inventory.quantityPlaceholder"
|
|
1257
|
+
)
|
|
1258
|
+
}
|
|
1259
|
+
) }),
|
|
1260
|
+
/* @__PURE__ */ jsx6(Form.ErrorMessage, {})
|
|
1261
|
+
] });
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
)
|
|
1265
|
+
] }),
|
|
1266
|
+
/* @__PURE__ */ jsx6(
|
|
1267
|
+
IconButton4,
|
|
1268
|
+
{
|
|
1269
|
+
type: "button",
|
|
1270
|
+
size: "small",
|
|
1271
|
+
variant: "transparent",
|
|
1272
|
+
className: "text-ui-fg-muted",
|
|
1273
|
+
onClick: onRemove,
|
|
1274
|
+
children: /* @__PURE__ */ jsx6(XMarkMini2, {})
|
|
1275
|
+
}
|
|
1276
|
+
)
|
|
1277
|
+
]
|
|
1278
|
+
},
|
|
1279
|
+
inventoryItem.id
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
function VariantSection({ form, variant, index }) {
|
|
1283
|
+
const { t } = useTranslation5();
|
|
1284
|
+
const inventory = useFieldArray3({
|
|
1285
|
+
control: form.control,
|
|
1286
|
+
name: `variants.${index}.inventory`
|
|
1287
|
+
});
|
|
1288
|
+
const inventoryFormData = useWatch2({
|
|
1289
|
+
control: form.control,
|
|
1290
|
+
name: `variants.${index}.inventory`
|
|
1291
|
+
});
|
|
1292
|
+
const isItemOptionDisabled = (option, inventoryIndex) => {
|
|
1293
|
+
return !!inventoryFormData?.some(
|
|
1294
|
+
(i, index2) => index2 != inventoryIndex && i.inventory_item_id === option.value
|
|
1295
|
+
);
|
|
1296
|
+
};
|
|
1297
|
+
return /* @__PURE__ */ jsxs6("div", { className: "grid gap-y-4", children: [
|
|
1298
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-start justify-between gap-x-4", children: [
|
|
1299
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col", children: [
|
|
1300
|
+
/* @__PURE__ */ jsx6(Form.Label, { children: variant.title }),
|
|
1301
|
+
/* @__PURE__ */ jsx6(Form.Hint, { children: t("products.create.inventory.label") })
|
|
1302
|
+
] }),
|
|
1303
|
+
/* @__PURE__ */ jsx6(
|
|
1304
|
+
Button2,
|
|
1305
|
+
{
|
|
1306
|
+
size: "small",
|
|
1307
|
+
variant: "secondary",
|
|
1308
|
+
type: "button",
|
|
1309
|
+
onClick: () => {
|
|
1310
|
+
inventory.append({
|
|
1311
|
+
inventory_item_id: "",
|
|
1312
|
+
required_quantity: ""
|
|
1313
|
+
});
|
|
1314
|
+
},
|
|
1315
|
+
children: t("actions.add")
|
|
1316
|
+
}
|
|
1317
|
+
)
|
|
1318
|
+
] }),
|
|
1319
|
+
inventory.fields.map((inventoryItem, inventoryIndex) => /* @__PURE__ */ jsx6(
|
|
1320
|
+
InventoryItemRow,
|
|
1321
|
+
{
|
|
1322
|
+
form,
|
|
1323
|
+
variantIndex: index,
|
|
1324
|
+
inventoryIndex,
|
|
1325
|
+
inventoryItem,
|
|
1326
|
+
isItemOptionDisabled,
|
|
1327
|
+
onRemove: () => inventory.remove(inventoryIndex)
|
|
1328
|
+
},
|
|
1329
|
+
inventoryItem.id
|
|
1330
|
+
))
|
|
1331
|
+
] });
|
|
1332
|
+
}
|
|
1333
|
+
var ProductCreateInventoryKitSection = ({
|
|
1334
|
+
form
|
|
1335
|
+
}) => {
|
|
1336
|
+
const { t } = useTranslation5();
|
|
1337
|
+
const variants = useFieldArray3({
|
|
1338
|
+
control: form.control,
|
|
1339
|
+
name: "variants"
|
|
1340
|
+
});
|
|
1341
|
+
return /* @__PURE__ */ jsxs6("div", { id: "organize", className: "flex flex-col gap-y-8", children: [
|
|
1342
|
+
/* @__PURE__ */ jsx6(Heading3, { children: t("products.create.inventory.heading") }),
|
|
1343
|
+
variants.fields.filter((v) => v.inventory_kit).map((variant, variantIndex) => /* @__PURE__ */ jsx6(
|
|
1344
|
+
VariantSection,
|
|
1345
|
+
{
|
|
1346
|
+
form,
|
|
1347
|
+
variant,
|
|
1348
|
+
index: variantIndex
|
|
1349
|
+
},
|
|
1350
|
+
variant.id
|
|
1351
|
+
))
|
|
1352
|
+
] });
|
|
1353
|
+
};
|
|
1354
|
+
|
|
1355
|
+
// src/routes/products/product-create/components/product-create-inventory-kit-form/product-create-inventory-kit-form.tsx
|
|
1356
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1357
|
+
var ProductCreateInventoryKitForm = ({
|
|
1358
|
+
form
|
|
1359
|
+
}) => {
|
|
1360
|
+
return /* @__PURE__ */ jsx7("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsx7("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: /* @__PURE__ */ jsx7(ProductCreateInventoryKitSection, { form }) }) });
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
// src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-section/product-create-details-organize-section.tsx
|
|
1364
|
+
import { Button as Button3, Heading as Heading4 } from "@acmekit/ui";
|
|
1365
|
+
import { useFieldArray as useFieldArray4 } from "react-hook-form";
|
|
1366
|
+
import { Trans, useTranslation as useTranslation6 } from "react-i18next";
|
|
1367
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1368
|
+
var ProductCreateOrganizationSection = ({
|
|
1369
|
+
form
|
|
1370
|
+
}) => {
|
|
1371
|
+
const { t } = useTranslation6();
|
|
1372
|
+
const collections = useComboboxData({
|
|
1373
|
+
queryKey: ["product_collections"],
|
|
1374
|
+
queryFn: (params) => sdk.admin.productCollection.list(params),
|
|
1375
|
+
getOptions: (data) => data.collections.map((collection) => ({
|
|
1376
|
+
label: collection.title,
|
|
1377
|
+
value: collection.id
|
|
1378
|
+
}))
|
|
1379
|
+
});
|
|
1380
|
+
const types = useComboboxData({
|
|
1381
|
+
queryKey: ["product_types"],
|
|
1382
|
+
queryFn: (params) => sdk.admin.productType.list(params),
|
|
1383
|
+
getOptions: (data) => data.product_types.map((type) => ({
|
|
1384
|
+
label: type.value,
|
|
1385
|
+
value: type.id
|
|
1386
|
+
}))
|
|
1387
|
+
});
|
|
1388
|
+
const tags = useComboboxData({
|
|
1389
|
+
queryKey: ["product_tags"],
|
|
1390
|
+
queryFn: (params) => sdk.admin.productTag.list(params),
|
|
1391
|
+
getOptions: (data) => data.product_tags.map((tag) => ({
|
|
1392
|
+
label: tag.value,
|
|
1393
|
+
value: tag.id
|
|
1394
|
+
}))
|
|
1395
|
+
});
|
|
1396
|
+
const shippingProfiles = useComboboxData({
|
|
1397
|
+
queryKey: ["shipping_profiles"],
|
|
1398
|
+
queryFn: (params) => sdk.admin.shippingProfile.list(params),
|
|
1399
|
+
getOptions: (data) => data.shipping_profiles.map((shippingProfile) => ({
|
|
1400
|
+
label: shippingProfile.name,
|
|
1401
|
+
value: shippingProfile.id
|
|
1402
|
+
}))
|
|
1403
|
+
});
|
|
1404
|
+
const { fields, remove, replace } = useFieldArray4({
|
|
1405
|
+
control: form.control,
|
|
1406
|
+
name: "sales_channels",
|
|
1407
|
+
keyName: "key"
|
|
1408
|
+
});
|
|
1409
|
+
const handleClearAllSalesChannels = () => {
|
|
1410
|
+
replace([]);
|
|
1411
|
+
};
|
|
1412
|
+
return /* @__PURE__ */ jsxs7("div", { id: "organize", className: "flex flex-col gap-y-8", children: [
|
|
1413
|
+
/* @__PURE__ */ jsx8(Heading4, { children: t("products.organization.header") }),
|
|
1414
|
+
/* @__PURE__ */ jsx8(
|
|
1415
|
+
SwitchBox,
|
|
1416
|
+
{
|
|
1417
|
+
control: form.control,
|
|
1418
|
+
name: "discountable",
|
|
1419
|
+
label: t("products.fields.discountable.label"),
|
|
1420
|
+
description: t("products.fields.discountable.hint"),
|
|
1421
|
+
optional: true
|
|
1422
|
+
}
|
|
1423
|
+
),
|
|
1424
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1425
|
+
/* @__PURE__ */ jsx8(
|
|
1426
|
+
Form.Field,
|
|
1427
|
+
{
|
|
1428
|
+
control: form.control,
|
|
1429
|
+
name: "type_id",
|
|
1430
|
+
render: ({ field }) => {
|
|
1431
|
+
return /* @__PURE__ */ jsxs7(Form.Item, { children: [
|
|
1432
|
+
/* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.type.label") }),
|
|
1433
|
+
/* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
|
|
1434
|
+
Combobox,
|
|
1435
|
+
{
|
|
1436
|
+
...field,
|
|
1437
|
+
options: types.options,
|
|
1438
|
+
searchValue: types.searchValue,
|
|
1439
|
+
onSearchValueChange: types.onSearchValueChange,
|
|
1440
|
+
fetchNextPage: types.fetchNextPage
|
|
1441
|
+
}
|
|
1442
|
+
) }),
|
|
1443
|
+
/* @__PURE__ */ jsx8(Form.ErrorMessage, {})
|
|
1444
|
+
] });
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
),
|
|
1448
|
+
/* @__PURE__ */ jsx8(
|
|
1449
|
+
Form.Field,
|
|
1450
|
+
{
|
|
1451
|
+
control: form.control,
|
|
1452
|
+
name: "collection_id",
|
|
1453
|
+
render: ({ field }) => {
|
|
1454
|
+
return /* @__PURE__ */ jsxs7(Form.Item, { children: [
|
|
1455
|
+
/* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.collection.label") }),
|
|
1456
|
+
/* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
|
|
1457
|
+
Combobox,
|
|
1458
|
+
{
|
|
1459
|
+
...field,
|
|
1460
|
+
options: collections.options,
|
|
1461
|
+
searchValue: collections.searchValue,
|
|
1462
|
+
onSearchValueChange: collections.onSearchValueChange,
|
|
1463
|
+
fetchNextPage: collections.fetchNextPage
|
|
1464
|
+
}
|
|
1465
|
+
) }),
|
|
1466
|
+
/* @__PURE__ */ jsx8(Form.ErrorMessage, {})
|
|
1467
|
+
] });
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
)
|
|
1471
|
+
] }),
|
|
1472
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1473
|
+
/* @__PURE__ */ jsx8(
|
|
1474
|
+
Form.Field,
|
|
1475
|
+
{
|
|
1476
|
+
control: form.control,
|
|
1477
|
+
name: "categories",
|
|
1478
|
+
render: ({ field }) => {
|
|
1479
|
+
return /* @__PURE__ */ jsxs7(Form.Item, { children: [
|
|
1480
|
+
/* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.categories.label") }),
|
|
1481
|
+
/* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(CategoryCombobox, { ...field }) }),
|
|
1482
|
+
/* @__PURE__ */ jsx8(Form.ErrorMessage, {})
|
|
1483
|
+
] });
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
),
|
|
1487
|
+
/* @__PURE__ */ jsx8(
|
|
1488
|
+
Form.Field,
|
|
1489
|
+
{
|
|
1490
|
+
control: form.control,
|
|
1491
|
+
name: "tags",
|
|
1492
|
+
render: ({ field }) => {
|
|
1493
|
+
return /* @__PURE__ */ jsxs7(Form.Item, { children: [
|
|
1494
|
+
/* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.tags.label") }),
|
|
1495
|
+
/* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
|
|
1496
|
+
Combobox,
|
|
1497
|
+
{
|
|
1498
|
+
...field,
|
|
1499
|
+
options: tags.options,
|
|
1500
|
+
searchValue: tags.searchValue,
|
|
1501
|
+
onSearchValueChange: tags.onSearchValueChange,
|
|
1502
|
+
fetchNextPage: tags.fetchNextPage
|
|
1503
|
+
}
|
|
1504
|
+
) }),
|
|
1505
|
+
/* @__PURE__ */ jsx8(Form.ErrorMessage, {})
|
|
1506
|
+
] });
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
)
|
|
1510
|
+
] }),
|
|
1511
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1512
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
1513
|
+
/* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.shipping_profile.label") }),
|
|
1514
|
+
/* @__PURE__ */ jsx8(Form.Hint, { children: /* @__PURE__ */ jsx8(Trans, { i18nKey: "products.fields.shipping_profile.hint" }) })
|
|
1515
|
+
] }),
|
|
1516
|
+
/* @__PURE__ */ jsx8(
|
|
1517
|
+
Form.Field,
|
|
1518
|
+
{
|
|
1519
|
+
control: form.control,
|
|
1520
|
+
name: "shipping_profile_id",
|
|
1521
|
+
render: ({ field }) => {
|
|
1522
|
+
return /* @__PURE__ */ jsxs7(Form.Item, { children: [
|
|
1523
|
+
/* @__PURE__ */ jsx8(Form.Control, { children: /* @__PURE__ */ jsx8(
|
|
1524
|
+
Combobox,
|
|
1525
|
+
{
|
|
1526
|
+
...field,
|
|
1527
|
+
options: shippingProfiles.options,
|
|
1528
|
+
searchValue: shippingProfiles.searchValue,
|
|
1529
|
+
onSearchValueChange: shippingProfiles.onSearchValueChange,
|
|
1530
|
+
fetchNextPage: shippingProfiles.fetchNextPage
|
|
1531
|
+
}
|
|
1532
|
+
) }),
|
|
1533
|
+
/* @__PURE__ */ jsx8(Form.ErrorMessage, {})
|
|
1534
|
+
] });
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
)
|
|
1538
|
+
] }),
|
|
1539
|
+
/* @__PURE__ */ jsx8("div", { className: "grid grid-cols-1 gap-y-4", children: /* @__PURE__ */ jsx8(
|
|
1540
|
+
Form.Field,
|
|
1541
|
+
{
|
|
1542
|
+
control: form.control,
|
|
1543
|
+
name: "sales_channels",
|
|
1544
|
+
render: () => {
|
|
1545
|
+
return /* @__PURE__ */ jsxs7(Form.Item, { children: [
|
|
1546
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-start justify-between gap-x-4", children: [
|
|
1547
|
+
/* @__PURE__ */ jsxs7("div", { children: [
|
|
1548
|
+
/* @__PURE__ */ jsx8(Form.Label, { optional: true, children: t("products.fields.sales_channels.label") }),
|
|
1549
|
+
/* @__PURE__ */ jsx8(Form.Hint, { children: /* @__PURE__ */ jsx8(Trans, { i18nKey: "products.fields.sales_channels.hint" }) })
|
|
1550
|
+
] }),
|
|
1551
|
+
/* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8(Button3, { size: "small", variant: "secondary", type: "button", children: t("actions.add") }) })
|
|
1552
|
+
] }),
|
|
1553
|
+
/* @__PURE__ */ jsx8(Form.Control, { className: "mt-0", children: fields.length > 0 && /* @__PURE__ */ jsx8(
|
|
1554
|
+
ChipGroup,
|
|
1555
|
+
{
|
|
1556
|
+
onClearAll: handleClearAllSalesChannels,
|
|
1557
|
+
onRemove: remove,
|
|
1558
|
+
className: "py-4",
|
|
1559
|
+
children: fields.map((field, index) => /* @__PURE__ */ jsx8(ChipGroup.Chip, { index, children: field.name }, field.key))
|
|
1560
|
+
}
|
|
1561
|
+
) })
|
|
1562
|
+
] });
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
) })
|
|
1566
|
+
] });
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1569
|
+
// src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx
|
|
1570
|
+
import {
|
|
1571
|
+
Button as Button4,
|
|
1572
|
+
createDataTableColumnHelper
|
|
1573
|
+
} from "@acmekit/ui";
|
|
1574
|
+
import { useEffect, useMemo as useMemo2, useState as useState3 } from "react";
|
|
1575
|
+
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
1576
|
+
import { keepPreviousData } from "@tanstack/react-query";
|
|
1577
|
+
|
|
1578
|
+
// src/routes/products/product-create/components/product-create-organize-form/constants.ts
|
|
1579
|
+
var SC_STACKED_MODAL_ID = "sc";
|
|
1580
|
+
|
|
1581
|
+
// src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx
|
|
1582
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1583
|
+
var PAGE_SIZE = 20;
|
|
1584
|
+
var ProductCreateSalesChannelStackedModal = ({
|
|
1585
|
+
form
|
|
1586
|
+
}) => {
|
|
1587
|
+
const { t } = useTranslation7();
|
|
1588
|
+
const { getValues, setValue } = form;
|
|
1589
|
+
const { setIsOpen, getIsOpen } = useStackedModal();
|
|
1590
|
+
const [rowSelection, setRowSelection] = useState3(
|
|
1591
|
+
{}
|
|
1592
|
+
);
|
|
1593
|
+
const [state, setState] = useState3([]);
|
|
1594
|
+
const searchParams = useSalesChannelTableQuery({
|
|
1595
|
+
pageSize: PAGE_SIZE,
|
|
1596
|
+
prefix: SC_STACKED_MODAL_ID
|
|
1597
|
+
});
|
|
1598
|
+
const { sales_channels, count, isLoading, isError, error } = useSalesChannels(
|
|
1599
|
+
searchParams,
|
|
1600
|
+
{
|
|
1601
|
+
placeholderData: keepPreviousData
|
|
1602
|
+
}
|
|
1603
|
+
);
|
|
1604
|
+
const open = getIsOpen(SC_STACKED_MODAL_ID);
|
|
1605
|
+
useEffect(() => {
|
|
1606
|
+
if (!open) {
|
|
1607
|
+
return;
|
|
1608
|
+
}
|
|
1609
|
+
const salesChannels = getValues("sales_channels");
|
|
1610
|
+
if (salesChannels) {
|
|
1611
|
+
setState(
|
|
1612
|
+
salesChannels.map((channel) => ({
|
|
1613
|
+
id: channel.id,
|
|
1614
|
+
name: channel.name
|
|
1615
|
+
}))
|
|
1616
|
+
);
|
|
1617
|
+
setRowSelection(
|
|
1618
|
+
salesChannels.reduce(
|
|
1619
|
+
(acc, channel) => ({
|
|
1620
|
+
...acc,
|
|
1621
|
+
[channel.id]: true
|
|
1622
|
+
}),
|
|
1623
|
+
{}
|
|
1624
|
+
)
|
|
1625
|
+
);
|
|
1626
|
+
}
|
|
1627
|
+
}, [open, getValues]);
|
|
1628
|
+
const onRowSelectionChange = (state2) => {
|
|
1629
|
+
const ids = Object.keys(state2);
|
|
1630
|
+
const addedIdsSet = new Set(
|
|
1631
|
+
ids.filter((id) => state2[id] && !rowSelection[id])
|
|
1632
|
+
);
|
|
1633
|
+
let addedSalesChannels = [];
|
|
1634
|
+
if (addedIdsSet.size > 0) {
|
|
1635
|
+
addedSalesChannels = sales_channels?.filter((channel) => addedIdsSet.has(channel.id)) ?? [];
|
|
1636
|
+
}
|
|
1637
|
+
setState((prev) => {
|
|
1638
|
+
const filteredPrev = prev.filter((channel) => state2[channel.id]);
|
|
1639
|
+
return Array.from(/* @__PURE__ */ new Set([...filteredPrev, ...addedSalesChannels]));
|
|
1640
|
+
});
|
|
1641
|
+
setRowSelection(state2);
|
|
1642
|
+
};
|
|
1643
|
+
const handleAdd = () => {
|
|
1644
|
+
setValue("sales_channels", state, {
|
|
1645
|
+
shouldDirty: true,
|
|
1646
|
+
shouldTouch: true
|
|
1647
|
+
});
|
|
1648
|
+
setIsOpen(SC_STACKED_MODAL_ID, false);
|
|
1649
|
+
};
|
|
1650
|
+
const filters = useSalesChannelTableFilters();
|
|
1651
|
+
const columns = useColumns();
|
|
1652
|
+
const emptyState = useSalesChannelTableEmptyState();
|
|
1653
|
+
if (isError) {
|
|
1654
|
+
throw error;
|
|
1655
|
+
}
|
|
1656
|
+
return /* @__PURE__ */ jsxs8(StackedFocusModal.Content, { className: "flex flex-col overflow-hidden", children: [
|
|
1657
|
+
/* @__PURE__ */ jsx9(StackedFocusModal.Header, {}),
|
|
1658
|
+
/* @__PURE__ */ jsx9(StackedFocusModal.Body, { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx9(
|
|
1659
|
+
DataTable,
|
|
1660
|
+
{
|
|
1661
|
+
data: sales_channels,
|
|
1662
|
+
columns,
|
|
1663
|
+
filters,
|
|
1664
|
+
emptyState,
|
|
1665
|
+
rowCount: count,
|
|
1666
|
+
pageSize: PAGE_SIZE,
|
|
1667
|
+
getRowId: (row) => row.id,
|
|
1668
|
+
rowSelection: {
|
|
1669
|
+
state: rowSelection,
|
|
1670
|
+
onRowSelectionChange
|
|
1671
|
+
},
|
|
1672
|
+
isLoading,
|
|
1673
|
+
layout: "fill",
|
|
1674
|
+
prefix: SC_STACKED_MODAL_ID
|
|
1675
|
+
}
|
|
1676
|
+
) }),
|
|
1677
|
+
/* @__PURE__ */ jsx9(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
1678
|
+
/* @__PURE__ */ jsx9(StackedFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx9(Button4, { size: "small", variant: "secondary", type: "button", children: t("actions.cancel") }) }),
|
|
1679
|
+
/* @__PURE__ */ jsx9(Button4, { size: "small", onClick: handleAdd, type: "button", children: t("actions.save") })
|
|
1680
|
+
] }) })
|
|
1681
|
+
] });
|
|
1682
|
+
};
|
|
1683
|
+
var columnHelper = createDataTableColumnHelper();
|
|
1684
|
+
var useColumns = () => {
|
|
1685
|
+
const base = useSalesChannelTableColumns();
|
|
1686
|
+
return useMemo2(() => [columnHelper.select(), ...base], [base]);
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1689
|
+
// src/routes/products/product-create/components/product-create-organize-form/product-create-organize-form.tsx
|
|
1690
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1691
|
+
var ProductCreateOrganizeForm = ({ form }) => {
|
|
1692
|
+
const { getFormFields } = useExtension();
|
|
1693
|
+
const fields = getFormFields("product", "create", "organize");
|
|
1694
|
+
return /* @__PURE__ */ jsxs9(StackedFocusModal, { id: SC_STACKED_MODAL_ID, children: [
|
|
1695
|
+
/* @__PURE__ */ jsx10("div", { className: "flex flex-col items-center p-16", children: /* @__PURE__ */ jsxs9("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8", children: [
|
|
1696
|
+
/* @__PURE__ */ jsx10(ProductCreateOrganizationSection, { form }),
|
|
1697
|
+
/* @__PURE__ */ jsx10(FormExtensionZone, { fields, form })
|
|
1698
|
+
] }) }),
|
|
1699
|
+
/* @__PURE__ */ jsx10(ProductCreateSalesChannelStackedModal, { form })
|
|
1700
|
+
] });
|
|
1701
|
+
};
|
|
1702
|
+
|
|
1703
|
+
// src/routes/products/product-create/components/product-create-variants-form/product-create-variants-form.tsx
|
|
1704
|
+
import { useMemo as useMemo3 } from "react";
|
|
1705
|
+
import { useWatch as useWatch3 } from "react-hook-form";
|
|
1706
|
+
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
1707
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1708
|
+
var ProductCreateVariantsForm = ({
|
|
1709
|
+
form,
|
|
1710
|
+
regions,
|
|
1711
|
+
store,
|
|
1712
|
+
pricePreferences
|
|
1713
|
+
}) => {
|
|
1714
|
+
const { setCloseOnEscape } = useRouteModal();
|
|
1715
|
+
const currencyCodes = useMemo3(
|
|
1716
|
+
() => store?.supported_currencies?.map((c) => c.currency_code) || [],
|
|
1717
|
+
[store]
|
|
1718
|
+
);
|
|
1719
|
+
const variants = useWatch3({
|
|
1720
|
+
control: form.control,
|
|
1721
|
+
name: "variants",
|
|
1722
|
+
defaultValue: []
|
|
1723
|
+
});
|
|
1724
|
+
const options = useWatch3({
|
|
1725
|
+
control: form.control,
|
|
1726
|
+
name: "options",
|
|
1727
|
+
defaultValue: []
|
|
1728
|
+
});
|
|
1729
|
+
const columns = useColumns2({
|
|
1730
|
+
options,
|
|
1731
|
+
currencies: currencyCodes,
|
|
1732
|
+
regions,
|
|
1733
|
+
pricePreferences
|
|
1734
|
+
});
|
|
1735
|
+
const variantData = useMemo3(() => {
|
|
1736
|
+
const ret = [];
|
|
1737
|
+
variants.forEach((v, i) => {
|
|
1738
|
+
if (v.should_create) {
|
|
1739
|
+
ret.push({ ...v, originalIndex: i });
|
|
1740
|
+
}
|
|
1741
|
+
});
|
|
1742
|
+
return ret;
|
|
1743
|
+
}, [variants]);
|
|
1744
|
+
return /* @__PURE__ */ jsx11("div", { className: "flex size-full flex-col divide-y overflow-hidden", children: /* @__PURE__ */ jsx11(
|
|
1745
|
+
DataGrid,
|
|
1746
|
+
{
|
|
1747
|
+
columns,
|
|
1748
|
+
data: variantData,
|
|
1749
|
+
state: form,
|
|
1750
|
+
onEditingChange: (editing) => setCloseOnEscape(!editing)
|
|
1751
|
+
}
|
|
1752
|
+
) });
|
|
1753
|
+
};
|
|
1754
|
+
var columnHelper2 = createDataGridHelper();
|
|
1755
|
+
var useColumns2 = ({
|
|
1756
|
+
options,
|
|
1757
|
+
currencies = [],
|
|
1758
|
+
regions = [],
|
|
1759
|
+
pricePreferences = []
|
|
1760
|
+
}) => {
|
|
1761
|
+
const { t } = useTranslation8();
|
|
1762
|
+
return useMemo3(
|
|
1763
|
+
() => [
|
|
1764
|
+
columnHelper2.column({
|
|
1765
|
+
id: "options",
|
|
1766
|
+
header: () => /* @__PURE__ */ jsx11("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx11("span", { className: "truncate", children: options.map((o) => o.title).join(" / ") }) }),
|
|
1767
|
+
cell: (context) => {
|
|
1768
|
+
return /* @__PURE__ */ jsx11(DataGrid.ReadonlyCell, { context, children: options.map((o) => context.row.original.options[o.title]).join(" / ") });
|
|
1769
|
+
},
|
|
1770
|
+
disableHiding: true
|
|
1771
|
+
}),
|
|
1772
|
+
columnHelper2.column({
|
|
1773
|
+
id: "title",
|
|
1774
|
+
name: t("fields.title"),
|
|
1775
|
+
header: t("fields.title"),
|
|
1776
|
+
field: (context) => `variants.${context.row.original.originalIndex}.title`,
|
|
1777
|
+
type: "text",
|
|
1778
|
+
cell: (context) => {
|
|
1779
|
+
return /* @__PURE__ */ jsx11(DataGrid.TextCell, { context });
|
|
1780
|
+
}
|
|
1781
|
+
}),
|
|
1782
|
+
columnHelper2.column({
|
|
1783
|
+
id: "sku",
|
|
1784
|
+
name: t("fields.sku"),
|
|
1785
|
+
header: t("fields.sku"),
|
|
1786
|
+
field: (context) => `variants.${context.row.original.originalIndex}.sku`,
|
|
1787
|
+
type: "text",
|
|
1788
|
+
cell: (context) => {
|
|
1789
|
+
return /* @__PURE__ */ jsx11(DataGrid.TextCell, { context });
|
|
1790
|
+
}
|
|
1791
|
+
}),
|
|
1792
|
+
columnHelper2.column({
|
|
1793
|
+
id: "manage_inventory",
|
|
1794
|
+
name: t("fields.managedInventory"),
|
|
1795
|
+
header: t("fields.managedInventory"),
|
|
1796
|
+
field: (context) => `variants.${context.row.original.originalIndex}.manage_inventory`,
|
|
1797
|
+
type: "boolean",
|
|
1798
|
+
cell: (context) => {
|
|
1799
|
+
return /* @__PURE__ */ jsx11(DataGrid.BooleanCell, { context });
|
|
1800
|
+
}
|
|
1801
|
+
}),
|
|
1802
|
+
columnHelper2.column({
|
|
1803
|
+
id: "allow_backorder",
|
|
1804
|
+
name: t("fields.allowBackorder"),
|
|
1805
|
+
header: t("fields.allowBackorder"),
|
|
1806
|
+
field: (context) => `variants.${context.row.original.originalIndex}.allow_backorder`,
|
|
1807
|
+
type: "boolean",
|
|
1808
|
+
cell: (context) => {
|
|
1809
|
+
return /* @__PURE__ */ jsx11(DataGrid.BooleanCell, { context });
|
|
1810
|
+
}
|
|
1811
|
+
}),
|
|
1812
|
+
columnHelper2.column({
|
|
1813
|
+
id: "inventory_kit",
|
|
1814
|
+
name: t("fields.inventoryKit"),
|
|
1815
|
+
header: t("fields.inventoryKit"),
|
|
1816
|
+
field: (context) => `variants.${context.row.original.originalIndex}.inventory_kit`,
|
|
1817
|
+
type: "boolean",
|
|
1818
|
+
cell: (context) => {
|
|
1819
|
+
return /* @__PURE__ */ jsx11(
|
|
1820
|
+
DataGrid.BooleanCell,
|
|
1821
|
+
{
|
|
1822
|
+
context,
|
|
1823
|
+
disabled: !context.row.original.manage_inventory
|
|
1824
|
+
}
|
|
1825
|
+
);
|
|
1826
|
+
}
|
|
1827
|
+
}),
|
|
1828
|
+
...createDataGridPriceColumns({
|
|
1829
|
+
currencies,
|
|
1830
|
+
regions,
|
|
1831
|
+
pricePreferences,
|
|
1832
|
+
getFieldName: (context, value) => {
|
|
1833
|
+
if (context.column.id?.startsWith("currency_prices")) {
|
|
1834
|
+
return `variants.${context.row.original.originalIndex}.prices.${value}`;
|
|
1835
|
+
}
|
|
1836
|
+
return `variants.${context.row.original.originalIndex}.prices.${value}`;
|
|
1837
|
+
},
|
|
1838
|
+
t
|
|
1839
|
+
})
|
|
1840
|
+
],
|
|
1841
|
+
[currencies, regions, options, pricePreferences, t]
|
|
1842
|
+
);
|
|
1843
|
+
};
|
|
1844
|
+
|
|
1845
|
+
// src/routes/products/product-create/components/product-create-form/product-create-form.tsx
|
|
1846
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1847
|
+
var SAVE_DRAFT_BUTTON = "save-draft-button";
|
|
1848
|
+
var ProductCreateForm = ({
|
|
1849
|
+
defaultChannel,
|
|
1850
|
+
regions,
|
|
1851
|
+
store,
|
|
1852
|
+
pricePreferences
|
|
1853
|
+
}) => {
|
|
1854
|
+
const [tab, setTab] = useState4("details" /* DETAILS */);
|
|
1855
|
+
const [tabState, setTabState] = useState4({
|
|
1856
|
+
["details" /* DETAILS */]: "in-progress",
|
|
1857
|
+
["organize" /* ORGANIZE */]: "not-started",
|
|
1858
|
+
["variants" /* VARIANTS */]: "not-started",
|
|
1859
|
+
["inventory" /* INVENTORY */]: "not-started"
|
|
1860
|
+
});
|
|
1861
|
+
const { t } = useTranslation9();
|
|
1862
|
+
const { handleSuccess } = useRouteModal();
|
|
1863
|
+
const { getFormConfigs } = useExtension();
|
|
1864
|
+
const configs = getFormConfigs("product", "create");
|
|
1865
|
+
const direction = useDocumentDirection();
|
|
1866
|
+
const form = useExtendableForm({
|
|
1867
|
+
defaultValues: {
|
|
1868
|
+
...PRODUCT_CREATE_FORM_DEFAULTS,
|
|
1869
|
+
sales_channels: defaultChannel ? [{ id: defaultChannel.id, name: defaultChannel.name }] : []
|
|
1870
|
+
},
|
|
1871
|
+
schema: ProductCreateSchema,
|
|
1872
|
+
configs
|
|
1873
|
+
});
|
|
1874
|
+
const { mutateAsync, isPending } = useCreateProduct();
|
|
1875
|
+
const regionsCurrencyMap = useMemo4(() => {
|
|
1876
|
+
if (!regions?.length) {
|
|
1877
|
+
return {};
|
|
1878
|
+
}
|
|
1879
|
+
return regions.reduce(
|
|
1880
|
+
(acc, reg) => {
|
|
1881
|
+
acc[reg.id] = reg.currency_code;
|
|
1882
|
+
return acc;
|
|
1883
|
+
},
|
|
1884
|
+
{}
|
|
1885
|
+
);
|
|
1886
|
+
}, [regions]);
|
|
1887
|
+
const watchedVariants = useWatch4({
|
|
1888
|
+
control: form.control,
|
|
1889
|
+
name: "variants"
|
|
1890
|
+
});
|
|
1891
|
+
const showInventoryTab = useMemo4(
|
|
1892
|
+
() => watchedVariants.some((v) => v.manage_inventory && v.inventory_kit),
|
|
1893
|
+
[watchedVariants]
|
|
1894
|
+
);
|
|
1895
|
+
const handleSubmit = form.handleSubmit(async (values, e) => {
|
|
1896
|
+
let isDraftSubmission = false;
|
|
1897
|
+
if (e?.nativeEvent instanceof SubmitEvent) {
|
|
1898
|
+
const submitter = e?.nativeEvent?.submitter;
|
|
1899
|
+
isDraftSubmission = submitter.dataset.name === SAVE_DRAFT_BUTTON;
|
|
1900
|
+
}
|
|
1901
|
+
const media = values.media || [];
|
|
1902
|
+
const payload = { ...values, media: void 0 };
|
|
1903
|
+
let uploadedMedia = [];
|
|
1904
|
+
try {
|
|
1905
|
+
if (media.length) {
|
|
1906
|
+
const thumbnailReq = media.find((m) => m.isThumbnail);
|
|
1907
|
+
const otherMediaReq = media.filter((m) => !m.isThumbnail);
|
|
1908
|
+
const fileReqs = [];
|
|
1909
|
+
if (thumbnailReq) {
|
|
1910
|
+
fileReqs.push(
|
|
1911
|
+
sdk.admin.upload.create({ files: [thumbnailReq.file] }).then((r) => r.files.map((f) => ({ ...f, isThumbnail: true })))
|
|
1912
|
+
);
|
|
1913
|
+
}
|
|
1914
|
+
if (otherMediaReq?.length) {
|
|
1915
|
+
fileReqs.push(
|
|
1916
|
+
sdk.admin.upload.create({
|
|
1917
|
+
files: otherMediaReq.map((m) => m.file)
|
|
1918
|
+
}).then((r) => r.files.map((f) => ({ ...f, isThumbnail: false })))
|
|
1919
|
+
);
|
|
1920
|
+
}
|
|
1921
|
+
uploadedMedia = (await Promise.all(fileReqs)).flat();
|
|
1922
|
+
}
|
|
1923
|
+
} catch (error) {
|
|
1924
|
+
if (error instanceof Error) {
|
|
1925
|
+
toast.error(error.message);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
await mutateAsync(
|
|
1929
|
+
normalizeProductFormValues({
|
|
1930
|
+
...payload,
|
|
1931
|
+
media: uploadedMedia,
|
|
1932
|
+
status: isDraftSubmission ? "draft" : "published",
|
|
1933
|
+
regionsCurrencyMap
|
|
1934
|
+
}),
|
|
1935
|
+
{
|
|
1936
|
+
onSuccess: (data) => {
|
|
1937
|
+
toast.success(
|
|
1938
|
+
t("products.create.successToast", {
|
|
1939
|
+
title: data.product.title
|
|
1940
|
+
})
|
|
1941
|
+
);
|
|
1942
|
+
handleSuccess(`../${data.product.id}`);
|
|
1943
|
+
},
|
|
1944
|
+
onError: (error) => {
|
|
1945
|
+
toast.error(error.message);
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
);
|
|
1949
|
+
});
|
|
1950
|
+
const onNext = async (currentTab) => {
|
|
1951
|
+
const valid = await form.trigger();
|
|
1952
|
+
if (!valid) {
|
|
1953
|
+
return;
|
|
1954
|
+
}
|
|
1955
|
+
if (currentTab === "details" /* DETAILS */) {
|
|
1956
|
+
setTab("organize" /* ORGANIZE */);
|
|
1957
|
+
}
|
|
1958
|
+
if (currentTab === "organize" /* ORGANIZE */) {
|
|
1959
|
+
setTab("variants" /* VARIANTS */);
|
|
1960
|
+
}
|
|
1961
|
+
if (currentTab === "variants" /* VARIANTS */) {
|
|
1962
|
+
setTab("inventory" /* INVENTORY */);
|
|
1963
|
+
}
|
|
1964
|
+
};
|
|
1965
|
+
useEffect2(() => {
|
|
1966
|
+
const currentState = { ...tabState };
|
|
1967
|
+
if (tab === "details" /* DETAILS */) {
|
|
1968
|
+
currentState["details" /* DETAILS */] = "in-progress";
|
|
1969
|
+
}
|
|
1970
|
+
if (tab === "organize" /* ORGANIZE */) {
|
|
1971
|
+
currentState["details" /* DETAILS */] = "completed";
|
|
1972
|
+
currentState["organize" /* ORGANIZE */] = "in-progress";
|
|
1973
|
+
}
|
|
1974
|
+
if (tab === "variants" /* VARIANTS */) {
|
|
1975
|
+
currentState["details" /* DETAILS */] = "completed";
|
|
1976
|
+
currentState["organize" /* ORGANIZE */] = "completed";
|
|
1977
|
+
currentState["variants" /* VARIANTS */] = "in-progress";
|
|
1978
|
+
}
|
|
1979
|
+
if (tab === "inventory" /* INVENTORY */) {
|
|
1980
|
+
currentState["details" /* DETAILS */] = "completed";
|
|
1981
|
+
currentState["organize" /* ORGANIZE */] = "completed";
|
|
1982
|
+
currentState["variants" /* VARIANTS */] = "completed";
|
|
1983
|
+
currentState["inventory" /* INVENTORY */] = "in-progress";
|
|
1984
|
+
}
|
|
1985
|
+
setTabState({ ...currentState });
|
|
1986
|
+
}, [tab]);
|
|
1987
|
+
return /* @__PURE__ */ jsx12(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs10(
|
|
1988
|
+
KeyboundForm,
|
|
1989
|
+
{
|
|
1990
|
+
onKeyDown: (e) => {
|
|
1991
|
+
if (e.key === "Enter") {
|
|
1992
|
+
if (e.target instanceof HTMLTextAreaElement && !(e.metaKey || e.ctrlKey)) {
|
|
1993
|
+
return;
|
|
1994
|
+
}
|
|
1995
|
+
e.preventDefault();
|
|
1996
|
+
if (e.metaKey || e.ctrlKey) {
|
|
1997
|
+
if (tab !== "variants" /* VARIANTS */) {
|
|
1998
|
+
e.preventDefault();
|
|
1999
|
+
e.stopPropagation();
|
|
2000
|
+
onNext(tab);
|
|
2001
|
+
return;
|
|
2002
|
+
}
|
|
2003
|
+
handleSubmit();
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
},
|
|
2007
|
+
onSubmit: handleSubmit,
|
|
2008
|
+
className: "flex h-full flex-col",
|
|
2009
|
+
children: [
|
|
2010
|
+
/* @__PURE__ */ jsxs10(
|
|
2011
|
+
ProgressTabs,
|
|
2012
|
+
{
|
|
2013
|
+
dir: direction,
|
|
2014
|
+
value: tab,
|
|
2015
|
+
onValueChange: async (tab2) => {
|
|
2016
|
+
const valid = await form.trigger();
|
|
2017
|
+
if (!valid) {
|
|
2018
|
+
return;
|
|
2019
|
+
}
|
|
2020
|
+
setTab(tab2);
|
|
2021
|
+
},
|
|
2022
|
+
className: "flex h-full flex-col overflow-hidden",
|
|
2023
|
+
children: [
|
|
2024
|
+
/* @__PURE__ */ jsx12(RouteFocusModal.Header, { children: /* @__PURE__ */ jsx12("div", { className: "-my-2 w-full border-l", children: /* @__PURE__ */ jsxs10(ProgressTabs.List, { className: "justify-start-start flex w-full items-center", children: [
|
|
2025
|
+
/* @__PURE__ */ jsx12(
|
|
2026
|
+
ProgressTabs.Trigger,
|
|
2027
|
+
{
|
|
2028
|
+
status: tabState["details" /* DETAILS */],
|
|
2029
|
+
value: "details" /* DETAILS */,
|
|
2030
|
+
className: "max-w-[200px] truncate",
|
|
2031
|
+
children: t("products.create.tabs.details")
|
|
2032
|
+
}
|
|
2033
|
+
),
|
|
2034
|
+
/* @__PURE__ */ jsx12(
|
|
2035
|
+
ProgressTabs.Trigger,
|
|
2036
|
+
{
|
|
2037
|
+
status: tabState["organize" /* ORGANIZE */],
|
|
2038
|
+
value: "organize" /* ORGANIZE */,
|
|
2039
|
+
className: "max-w-[200px] truncate",
|
|
2040
|
+
children: t("products.create.tabs.organize")
|
|
2041
|
+
}
|
|
2042
|
+
),
|
|
2043
|
+
/* @__PURE__ */ jsx12(
|
|
2044
|
+
ProgressTabs.Trigger,
|
|
2045
|
+
{
|
|
2046
|
+
status: tabState["variants" /* VARIANTS */],
|
|
2047
|
+
value: "variants" /* VARIANTS */,
|
|
2048
|
+
className: "max-w-[200px] truncate",
|
|
2049
|
+
children: t("products.create.tabs.variants")
|
|
2050
|
+
}
|
|
2051
|
+
),
|
|
2052
|
+
showInventoryTab && /* @__PURE__ */ jsx12(
|
|
2053
|
+
ProgressTabs.Trigger,
|
|
2054
|
+
{
|
|
2055
|
+
status: tabState["inventory" /* INVENTORY */],
|
|
2056
|
+
value: "inventory" /* INVENTORY */,
|
|
2057
|
+
className: "max-w-[200px] truncate",
|
|
2058
|
+
children: t("products.create.tabs.inventory")
|
|
2059
|
+
}
|
|
2060
|
+
)
|
|
2061
|
+
] }) }) }),
|
|
2062
|
+
/* @__PURE__ */ jsxs10(RouteFocusModal.Body, { className: "size-full overflow-hidden", children: [
|
|
2063
|
+
/* @__PURE__ */ jsx12(
|
|
2064
|
+
ProgressTabs.Content,
|
|
2065
|
+
{
|
|
2066
|
+
className: "size-full overflow-y-auto",
|
|
2067
|
+
value: "details" /* DETAILS */,
|
|
2068
|
+
children: /* @__PURE__ */ jsx12(ProductCreateDetailsForm, { form })
|
|
2069
|
+
}
|
|
2070
|
+
),
|
|
2071
|
+
/* @__PURE__ */ jsx12(
|
|
2072
|
+
ProgressTabs.Content,
|
|
2073
|
+
{
|
|
2074
|
+
className: "size-full overflow-y-auto",
|
|
2075
|
+
value: "organize" /* ORGANIZE */,
|
|
2076
|
+
children: /* @__PURE__ */ jsx12(ProductCreateOrganizeForm, { form })
|
|
2077
|
+
}
|
|
2078
|
+
),
|
|
2079
|
+
/* @__PURE__ */ jsx12(
|
|
2080
|
+
ProgressTabs.Content,
|
|
2081
|
+
{
|
|
2082
|
+
className: "size-full overflow-y-auto",
|
|
2083
|
+
value: "variants" /* VARIANTS */,
|
|
2084
|
+
children: /* @__PURE__ */ jsx12(
|
|
2085
|
+
ProductCreateVariantsForm,
|
|
2086
|
+
{
|
|
2087
|
+
form,
|
|
2088
|
+
store,
|
|
2089
|
+
regions,
|
|
2090
|
+
pricePreferences
|
|
2091
|
+
}
|
|
2092
|
+
)
|
|
2093
|
+
}
|
|
2094
|
+
),
|
|
2095
|
+
showInventoryTab && /* @__PURE__ */ jsx12(
|
|
2096
|
+
ProgressTabs.Content,
|
|
2097
|
+
{
|
|
2098
|
+
className: "size-full overflow-y-auto",
|
|
2099
|
+
value: "inventory" /* INVENTORY */,
|
|
2100
|
+
children: /* @__PURE__ */ jsx12(ProductCreateInventoryKitForm, { form })
|
|
2101
|
+
}
|
|
2102
|
+
)
|
|
2103
|
+
] })
|
|
2104
|
+
]
|
|
2105
|
+
}
|
|
2106
|
+
),
|
|
2107
|
+
/* @__PURE__ */ jsx12(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
2108
|
+
/* @__PURE__ */ jsx12(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx12(Button5, { variant: "secondary", size: "small", children: t("actions.cancel") }) }),
|
|
2109
|
+
/* @__PURE__ */ jsx12(
|
|
2110
|
+
Button5,
|
|
2111
|
+
{
|
|
2112
|
+
"data-name": SAVE_DRAFT_BUTTON,
|
|
2113
|
+
size: "small",
|
|
2114
|
+
type: "submit",
|
|
2115
|
+
isLoading: isPending,
|
|
2116
|
+
className: "whitespace-nowrap",
|
|
2117
|
+
children: t("actions.saveAsDraft")
|
|
2118
|
+
}
|
|
2119
|
+
),
|
|
2120
|
+
/* @__PURE__ */ jsx12(
|
|
2121
|
+
PrimaryButton,
|
|
2122
|
+
{
|
|
2123
|
+
tab,
|
|
2124
|
+
next: onNext,
|
|
2125
|
+
isLoading: isPending,
|
|
2126
|
+
showInventoryTab
|
|
2127
|
+
}
|
|
2128
|
+
)
|
|
2129
|
+
] }) })
|
|
2130
|
+
]
|
|
2131
|
+
}
|
|
2132
|
+
) });
|
|
2133
|
+
};
|
|
2134
|
+
var PrimaryButton = ({
|
|
2135
|
+
tab,
|
|
2136
|
+
next,
|
|
2137
|
+
isLoading,
|
|
2138
|
+
showInventoryTab
|
|
2139
|
+
}) => {
|
|
2140
|
+
const { t } = useTranslation9();
|
|
2141
|
+
if (tab === "variants" /* VARIANTS */ && !showInventoryTab || tab === "inventory" /* INVENTORY */ && showInventoryTab) {
|
|
2142
|
+
return /* @__PURE__ */ jsx12(
|
|
2143
|
+
Button5,
|
|
2144
|
+
{
|
|
2145
|
+
"data-name": "publish-button",
|
|
2146
|
+
type: "submit",
|
|
2147
|
+
variant: "primary",
|
|
2148
|
+
size: "small",
|
|
2149
|
+
isLoading,
|
|
2150
|
+
children: t("actions.publish")
|
|
2151
|
+
},
|
|
2152
|
+
"submit-button"
|
|
2153
|
+
);
|
|
2154
|
+
}
|
|
2155
|
+
return /* @__PURE__ */ jsx12(
|
|
2156
|
+
Button5,
|
|
2157
|
+
{
|
|
2158
|
+
type: "button",
|
|
2159
|
+
variant: "primary",
|
|
2160
|
+
size: "small",
|
|
2161
|
+
onClick: () => next(tab),
|
|
2162
|
+
children: t("actions.continue")
|
|
2163
|
+
},
|
|
2164
|
+
"next-button"
|
|
2165
|
+
);
|
|
2166
|
+
};
|
|
2167
|
+
|
|
2168
|
+
// src/routes/products/product-create/product-create.tsx
|
|
2169
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2170
|
+
var ProductCreate = () => {
|
|
2171
|
+
const { t } = useTranslation10();
|
|
2172
|
+
const {
|
|
2173
|
+
store,
|
|
2174
|
+
isPending: isStorePending,
|
|
2175
|
+
isError: isStoreError,
|
|
2176
|
+
error: storeError
|
|
2177
|
+
} = useStore({
|
|
2178
|
+
fields: "+default_sales_channel"
|
|
2179
|
+
});
|
|
2180
|
+
const {
|
|
2181
|
+
sales_channel,
|
|
2182
|
+
isPending: isSalesChannelPending,
|
|
2183
|
+
isError: isSalesChannelError,
|
|
2184
|
+
error: salesChannelError
|
|
2185
|
+
} = useSalesChannel(store?.default_sales_channel_id, {
|
|
2186
|
+
enabled: !!store?.default_sales_channel_id
|
|
2187
|
+
});
|
|
2188
|
+
const {
|
|
2189
|
+
regions,
|
|
2190
|
+
isPending: isRegionsPending,
|
|
2191
|
+
isError: isRegionsError,
|
|
2192
|
+
error: regionsError
|
|
2193
|
+
} = useRegions({ limit: 9999 });
|
|
2194
|
+
const {
|
|
2195
|
+
price_preferences,
|
|
2196
|
+
isPending: isPricePreferencesPending,
|
|
2197
|
+
isError: isPricePreferencesError,
|
|
2198
|
+
error: pricePreferencesError
|
|
2199
|
+
} = usePricePreferences({
|
|
2200
|
+
limit: 9999
|
|
2201
|
+
});
|
|
2202
|
+
const ready = !!store && !isStorePending && !!regions && !isRegionsPending && !!sales_channel && !isSalesChannelPending && !!price_preferences && !isPricePreferencesPending;
|
|
2203
|
+
if (isStoreError) {
|
|
2204
|
+
throw storeError;
|
|
2205
|
+
}
|
|
2206
|
+
if (isRegionsError) {
|
|
2207
|
+
throw regionsError;
|
|
2208
|
+
}
|
|
2209
|
+
if (isSalesChannelError) {
|
|
2210
|
+
throw salesChannelError;
|
|
2211
|
+
}
|
|
2212
|
+
if (isPricePreferencesError) {
|
|
2213
|
+
throw pricePreferencesError;
|
|
2214
|
+
}
|
|
2215
|
+
return /* @__PURE__ */ jsxs11(RouteFocusModal, { children: [
|
|
2216
|
+
/* @__PURE__ */ jsx13(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx13("span", { className: "sr-only", children: t("products.create.title") }) }),
|
|
2217
|
+
/* @__PURE__ */ jsx13(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsx13("span", { className: "sr-only", children: t("products.create.description") }) }),
|
|
2218
|
+
ready && /* @__PURE__ */ jsx13(
|
|
2219
|
+
ProductCreateForm,
|
|
2220
|
+
{
|
|
2221
|
+
defaultChannel: sales_channel,
|
|
2222
|
+
store,
|
|
2223
|
+
pricePreferences: price_preferences,
|
|
2224
|
+
regions
|
|
2225
|
+
}
|
|
2226
|
+
)
|
|
2227
|
+
] });
|
|
2228
|
+
};
|
|
2229
|
+
export {
|
|
2230
|
+
ProductCreate as Component
|
|
2231
|
+
};
|