@mercurjs/admin 2.3.6-canary.1 → 2.3.6-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-campaign-promotions-PBGDZSCD.js → add-campaign-promotions-VFRAB2NN.js} +3 -3
- package/dist/{adjust-inventory-BBAU3NMM.js → adjust-inventory-TWESAGKE.js} +1 -1
- package/dist/{api-key-management-detail-ZGGQBQAM.js → api-key-management-detail-ZFA3YPJ6.js} +1 -1
- package/dist/{attribute-create-C435ZHB2.js → attribute-create-OHAZ4X75.js} +1 -1
- package/dist/{attribute-detail-SPYDB3I5.js → attribute-detail-YJ4ZZYCL.js} +1 -1
- package/dist/{attribute-list-SCFBKH4L.js → attribute-list-MEXPF4TG.js} +1 -1
- package/dist/{campaign-detail-BHRCOKL3.js → campaign-detail-3HKWD7UR.js} +5 -5
- package/dist/{categories-metadata-MJAYSCTW.js → categories-metadata-6LMZAUOF.js} +1 -1
- package/dist/{category-detail-GVEDFNM7.js → category-detail-RWLX5N2M.js} +3 -3
- package/dist/{category-products-VVF5NXCE.js → category-products-HS4FHYZM.js} +2 -2
- package/dist/{chunk-PAG3PYAQ.js → chunk-2RVWPHH7.js} +1 -1
- package/dist/{chunk-RW3NEG36.js → chunk-6CD2A2OS.js} +2 -2
- package/dist/{chunk-HFM6N7R3.js → chunk-AYT2CZ4A.js} +1 -1
- package/dist/{chunk-B7QLJF77.js → chunk-BDXJOPLO.js} +1 -1
- package/dist/{chunk-Q6M2TNLO.js → chunk-BEBP26XV.js} +0 -290
- package/dist/{chunk-BQZ5P3IA.js → chunk-BVAVPYHI.js} +1 -1
- package/dist/{chunk-VWPX7GLC.js → chunk-DBGBLXBS.js} +1 -1
- package/dist/{chunk-6UYV7B42.js → chunk-EACE4252.js} +2 -2
- package/dist/{chunk-5TIADRZ7.js → chunk-FPIFYOMN.js} +1 -1
- package/dist/{chunk-Q732RWRD.js → chunk-FS4E6GS6.js} +2 -2
- package/dist/{chunk-R2ODJ3D3.js → chunk-GD7FWYHP.js} +1 -1
- package/dist/{chunk-G2KWNZV6.js → chunk-HEGUG6HH.js} +1 -1
- package/dist/{chunk-NQEXDESI.js → chunk-IAJ5F227.js} +1 -1
- package/dist/{chunk-P2KYQNXQ.js → chunk-JNZPAM34.js} +1 -1
- package/dist/{chunk-6P7HBAUM.js → chunk-KRCHKYDN.js} +1 -1
- package/dist/{chunk-VE5FQQTG.js → chunk-N2733YCW.js} +1 -1
- package/dist/{chunk-B6KT5U7W.js → chunk-NHDNRGKP.js} +1 -1
- package/dist/{chunk-7YBZ2PEZ.js → chunk-NYMDLCWP.js} +1 -1
- package/dist/{chunk-EJGGX3ON.js → chunk-OUXIGGB5.js} +3 -3
- package/dist/{chunk-5ENOJFDI.js → chunk-OVVFJY7I.js} +1 -1
- package/dist/{chunk-ESNSDIEC.js → chunk-PDPCFFFH.js} +1 -1
- package/dist/{chunk-JBT2FR4K.js → chunk-QQNSPKSH.js} +1 -1
- package/dist/{chunk-M336ZIRO.js → chunk-R2DDRU77.js} +1 -1
- package/dist/{chunk-7I7G5ZJE.js → chunk-RJYASAQO.js} +1 -1
- package/dist/{chunk-NCDKLTDP.js → chunk-T3T6OYAT.js} +1 -1
- package/dist/{chunk-XMIDY45X.js → chunk-TDLIW2TU.js} +1 -1
- package/dist/{chunk-ENKVW7JW.js → chunk-TUDKRZ6P.js} +1 -1
- package/dist/{chunk-MXM5ZD4Y.js → chunk-W5U6NPSN.js} +10 -25
- package/dist/{chunk-5SNW2DCY.js → chunk-YTQY4EOW.js} +1 -1
- package/dist/{collection-add-products-HCY2YT3W.js → collection-add-products-FFYCZINV.js} +2 -2
- package/dist/{collection-detail-QAEPOJZX.js → collection-detail-JT4DSP7V.js} +3 -3
- package/dist/{collection-list-AWLZYMWL.js → collection-list-3DODRV34.js} +2 -2
- package/dist/{collection-metadata-XM2EBCWF.js → collection-metadata-7XMJPJCT.js} +1 -1
- package/dist/{customer-detail-XO7RBVUC.js → customer-detail-AMGUVNTH.js} +1 -1
- package/dist/{customer-group-detail-4G53UKOS.js → customer-group-detail-PDA3JCAZ.js} +1 -1
- package/dist/{customer-group-list-5VA7HGD5.js → customer-group-list-2NP5GAKQ.js} +1 -1
- package/dist/{customer-group-metadata-FUJFFWCO.js → customer-group-metadata-B7LBRM5F.js} +1 -1
- package/dist/{customer-metadata-GWZC456X.js → customer-metadata-WL5W5JSC.js} +1 -1
- package/dist/{customers-add-customer-group-MYC76YGW.js → customers-add-customer-group-GNDYPKUO.js} +1 -1
- package/dist/{edit-inventory-item-ZSV4WF6G.js → edit-inventory-item-QNTKH7KR.js} +1 -1
- package/dist/{edit-inventory-item-attributes-NWSAQMKX.js → edit-inventory-item-attributes-KB4GVOGP.js} +1 -1
- package/dist/{edit-rules-RJC3AYJN.js → edit-rules-HIC7UOV5.js} +1 -1
- package/dist/extension-targets.d.ts +2 -0
- package/dist/index.css +0 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +476 -888
- package/dist/{inventory-detail-7HB5QEL4.js → inventory-detail-OLBIFY6Y.js} +1 -1
- package/dist/{inventory-metadata-FGHOW3YG.js → inventory-metadata-2QNV2PF7.js} +1 -1
- package/dist/{inventory-stock-PZ2ENOGF.js → inventory-stock-M5YSKXC4.js} +1 -1
- package/dist/{location-detail-B2BWLVAD.js → location-detail-FFKVKFUX.js} +1 -1
- package/dist/{location-fulfillment-providers-XIYMIEFN.js → location-fulfillment-providers-YY2TKMLH.js} +2 -2
- package/dist/{location-list-VIAP63HV.js → location-list-R3OABFPG.js} +1 -1
- package/dist/{location-service-zone-shipping-option-create-6O2JXV6I.js → location-service-zone-shipping-option-create-EMPXW67L.js} +1 -1
- package/dist/{login-TZHRVYA5.js → login-ZCAW7Z7Q.js} +1 -1
- package/dist/{manage-locations-ZFIRHMNH.js → manage-locations-TCMY6A4J.js} +145 -34
- package/dist/{marketplace-detail-4IP5HIEW.js → marketplace-detail-BIQF75Y7.js} +1 -1
- package/dist/{marketplace-metadata-EGDXYKCE.js → marketplace-metadata-U6LXZNTN.js} +1 -1
- package/dist/{offers-VG334CFD.js → offers-KJTLBFTM.js} +2 -2
- package/dist/{order-create-exchange-CC7CQECO.js → order-create-exchange-TSGTAOEF.js} +1 -1
- package/dist/{order-create-refund-FJLL4CUD.js → order-create-refund-KYTIPPQK.js} +1 -1
- package/dist/{order-detail-3ODC5NOT.js → order-detail-P7R4U4YU.js} +2 -2
- package/dist/{order-edit-billing-address-SBVWRA25.js → order-edit-billing-address-6ALJ7U6O.js} +2 -2
- package/dist/{order-edit-email-BREEW246.js → order-edit-email-CYCFGHE4.js} +1 -1
- package/dist/{order-edit-shipping-address-XUG74AFY.js → order-edit-shipping-address-XJUKP3JP.js} +1 -1
- package/dist/{order-metadata-VIG5MGYV.js → order-metadata-PQKBD7ZT.js} +1 -1
- package/dist/{order-request-transfer-RYVK4WYW.js → order-request-transfer-R3FCUU7R.js} +1 -1
- package/dist/pages/index.js +28 -28
- package/dist/{price-list-create-JFXLTNOJ.js → price-list-create-PHJFJOQA.js} +3 -3
- package/dist/{price-list-detail-5YTX66KF.js → price-list-detail-CGZ5DS6T.js} +3 -3
- package/dist/{price-list-prices-add-HVTEQOWQ.js → price-list-prices-add-O5JDIJ3O.js} +3 -3
- package/dist/{price-list-prices-edit-OVHIDATP.js → price-list-prices-edit-ITO6ZTGD.js} +1 -1
- package/dist/{product-add-existing-attributes-2UFTXE2N.js → product-add-existing-attributes-5XGJZSIY.js} +1 -1
- package/dist/{product-create-SHIGHLQN.js → product-create-P7F2RZPS.js} +4 -4
- package/dist/{product-detail-UGSTCK7J.js → product-detail-G6HRH4ND.js} +1 -1
- package/dist/{product-list-XDJB3HX7.js → product-list-O35LY6T7.js} +3 -3
- package/dist/{product-media-CO3F57JT.js → product-media-3ERT2APJ.js} +2 -2
- package/dist/{product-metadata-5CRGB7TR.js → product-metadata-2QQGBVV5.js} +1 -1
- package/dist/{product-organization-TNS7GBKN.js → product-organization-VXTSCBHU.js} +1 -1
- package/dist/{product-tag-create-QORH6X2D.js → product-tag-create-4CDCZZNR.js} +1 -1
- package/dist/{product-tag-detail-CDSYBTAM.js → product-tag-detail-5YX4ET5N.js} +4 -4
- package/dist/{product-tag-edit-JWYVCPCC.js → product-tag-edit-UBXKLVUN.js} +1 -1
- package/dist/{product-tag-list-RKLCU3UE.js → product-tag-list-GNGDIW54.js} +4 -4
- package/dist/{product-tag-metadata-BCUPIIJ5.js → product-tag-metadata-CDXKXZPM.js} +1 -1
- package/dist/{product-type-detail-IY7TWXUQ.js → product-type-detail-A3MUWNM4.js} +3 -3
- package/dist/{product-type-metadata-DKBBQB6R.js → product-type-metadata-IISED7XQ.js} +1 -1
- package/dist/{product-variant-detail-XHMS2UT5.js → product-variant-detail-TIULIJ3X.js} +1 -1
- package/dist/{product-variant-edit-4DPXTYPT.js → product-variant-edit-Y4BJFQTK.js} +1 -1
- package/dist/{product-variant-metadata-ETVJBXSW.js → product-variant-metadata-7SKGOEEA.js} +1 -1
- package/dist/{promotion-create-7ZUJ4W2J.js → promotion-create-D6PTGIAY.js} +1 -1
- package/dist/{promotion-detail-SWO4PZDC.js → promotion-detail-4VYJAJ2N.js} +4 -4
- package/dist/{promotion-list-S4B6SVD6.js → promotion-list-6OBFAIOU.js} +4 -4
- package/dist/{refund-reason-create-P5FUFEGK.js → refund-reason-create-DAOTHCMY.js} +1 -1
- package/dist/{refund-reason-edit-AKOTWXCE.js → refund-reason-edit-M3AKWJZR.js} +1 -1
- package/dist/{refund-reason-list-ABRFC3OQ.js → refund-reason-list-WGRCZWXL.js} +2 -2
- package/dist/{region-metadata-Q6HEMCHD.js → region-metadata-IK6ZPUJW.js} +1 -1
- package/dist/{reservation-detail-5GYGVM3M.js → reservation-detail-7PLHNOS4.js} +1 -1
- package/dist/{reservation-metadata-P4G3JEDW.js → reservation-metadata-L42C7DPK.js} +1 -1
- package/dist/{reset-password-VJY5CXJU.js → reset-password-EUAOKJDU.js} +1 -1
- package/dist/{sales-channel-add-products-MPJ7UCEJ.js → sales-channel-add-products-EHFMW73I.js} +2 -2
- package/dist/{sales-channel-detail-F37LBP6R.js → sales-channel-detail-5CL3LMRD.js} +3 -3
- package/dist/{sales-channel-list-XAWN5OKC.js → sales-channel-list-ZEERNIJZ.js} +1 -1
- package/dist/{sales-channel-metadata-NBWFH4QX.js → sales-channel-metadata-OFHAFCOM.js} +1 -1
- package/dist/{shipping-option-type-create-M23CI42D.js → shipping-option-type-create-4TZVLPFU.js} +1 -1
- package/dist/{shipping-option-type-detail-QIJZQ5WW.js → shipping-option-type-detail-TPG7NKCT.js} +3 -3
- package/dist/{shipping-option-type-edit-WXTEQM32.js → shipping-option-type-edit-BIWXDVMF.js} +1 -1
- package/dist/{shipping-option-type-list-PRXZQSPR.js → shipping-option-type-list-5DOYVCD6.js} +3 -3
- package/dist/{shipping-profile-metadata-S7Z3IC6I.js → shipping-profile-metadata-SQFRUAIH.js} +1 -1
- package/dist/{store-create-J4SL6SY3.js → store-create-RYYOB2FV.js} +1 -1
- package/dist/{store-details-ITYKAZSI.js → store-details-A2L6YQDB.js} +3 -3
- package/dist/{store-edit-NZMI7PNS.js → store-edit-BORBEPWF.js} +2 -2
- package/dist/{store-list-RXPN3VVO.js → store-list-JADJQPSK.js} +2 -2
- package/dist/{tax-region-create-PIDKQEWT.js → tax-region-create-Q2QYTIHC.js} +2 -2
- package/dist/{tax-region-detail-7RNNZ4UE.js → tax-region-detail-AJ2O7YKC.js} +1 -1
- package/dist/{tax-region-edit-I27QZZPB.js → tax-region-edit-A6C4VTTZ.js} +1 -1
- package/dist/{tax-region-metadata-6YIZSRLO.js → tax-region-metadata-6QI4VPCV.js} +1 -1
- package/dist/{tax-region-province-detail-AHS5SRP5.js → tax-region-province-detail-SZAUBE23.js} +1 -1
- package/dist/{tax-region-tax-override-create-Z6S43XQ6.js → tax-region-tax-override-create-IPHOMPVG.js} +3 -3
- package/dist/{tax-region-tax-override-edit-4EOURL2M.js → tax-region-tax-override-edit-IV57DNYU.js} +3 -3
- package/dist/{user-metadata-2PEU2IJE.js → user-metadata-M72ZGLGH.js} +1 -1
- package/package.json +6 -6
- package/dist/chunk-WMA3WTCM.js +0 -117
|
@@ -21,7 +21,7 @@ import "./chunk-ZAOEFQ6K.js";
|
|
|
21
21
|
import "./chunk-IKAUNMRC.js";
|
|
22
22
|
import "./chunk-EIWPJWKF.js";
|
|
23
23
|
import "./chunk-46WEBDVJ.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-W5U6NPSN.js";
|
|
25
25
|
import "./chunk-DSQRFZCO.js";
|
|
26
26
|
import "./chunk-LHE6LM6S.js";
|
|
27
27
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -13,7 +13,7 @@ import "./chunk-JRTZWK77.js";
|
|
|
13
13
|
import "./chunk-E74OUNA3.js";
|
|
14
14
|
import "./chunk-H6MYB7GB.js";
|
|
15
15
|
import "./chunk-IKAUNMRC.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-W5U6NPSN.js";
|
|
17
17
|
import "./chunk-DSQRFZCO.js";
|
|
18
18
|
import "./chunk-LHE6LM6S.js";
|
|
19
19
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
TextCell,
|
|
16
16
|
TextHeader
|
|
17
17
|
} from "./chunk-JHIMVLB2.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-FPIFYOMN.js";
|
|
19
19
|
import "./chunk-PHOCVOZ5.js";
|
|
20
20
|
import "./chunk-RT6L7JXU.js";
|
|
21
21
|
import "./chunk-TKGWSUEI.js";
|
|
@@ -41,7 +41,7 @@ import "./chunk-ZAOEFQ6K.js";
|
|
|
41
41
|
import "./chunk-IKAUNMRC.js";
|
|
42
42
|
import "./chunk-EIWPJWKF.js";
|
|
43
43
|
import "./chunk-46WEBDVJ.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-W5U6NPSN.js";
|
|
45
45
|
import "./chunk-DSQRFZCO.js";
|
|
46
46
|
import "./chunk-LHE6LM6S.js";
|
|
47
47
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -12,7 +12,7 @@ import "./chunk-PHOCVOZ5.js";
|
|
|
12
12
|
import "./chunk-E74OUNA3.js";
|
|
13
13
|
import "./chunk-H6MYB7GB.js";
|
|
14
14
|
import "./chunk-THHRRYRS.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-W5U6NPSN.js";
|
|
16
16
|
import "./chunk-DSQRFZCO.js";
|
|
17
17
|
import "./chunk-LHE6LM6S.js";
|
|
18
18
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -17,7 +17,7 @@ import "./chunk-TKGWSUEI.js";
|
|
|
17
17
|
import "./chunk-SITRHMZZ.js";
|
|
18
18
|
import "./chunk-FWJLS7XD.js";
|
|
19
19
|
import "./chunk-3QSRE5LS.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-W5U6NPSN.js";
|
|
21
21
|
import "./chunk-DSQRFZCO.js";
|
|
22
22
|
import "./chunk-LHE6LM6S.js";
|
|
23
23
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InfiniteList
|
|
3
|
-
} from "./chunk-WMA3WTCM.js";
|
|
4
1
|
import {
|
|
5
2
|
RouteDrawer,
|
|
6
3
|
useRouteModal
|
|
@@ -26,9 +23,9 @@ import { useTranslation as useTranslation3 } from "react-i18next";
|
|
|
26
23
|
import { useParams } from "react-router-dom";
|
|
27
24
|
|
|
28
25
|
// src/pages/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx
|
|
29
|
-
import { Button, Text as Text2, toast } from "@medusajs/ui";
|
|
26
|
+
import { Button, Text as Text2, toast as toast2 } from "@medusajs/ui";
|
|
30
27
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
31
|
-
import { useMemo, useState as useState2 } from "react";
|
|
28
|
+
import { useMemo as useMemo2, useState as useState2 } from "react";
|
|
32
29
|
|
|
33
30
|
// src/pages/inventory/inventory-detail/components/manage-locations/components/location-item.tsx
|
|
34
31
|
import { Checkbox, Text, clx } from "@medusajs/ui";
|
|
@@ -107,13 +104,127 @@ var LocationSearchInput = ({
|
|
|
107
104
|
) });
|
|
108
105
|
};
|
|
109
106
|
|
|
110
|
-
// src/
|
|
107
|
+
// src/components/common/infinite-list/infinite-list.tsx
|
|
108
|
+
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
109
|
+
import { useEffect as useEffect2, useMemo, useRef } from "react";
|
|
110
|
+
import { toast } from "@medusajs/ui";
|
|
111
|
+
import { Spinner } from "@medusajs/icons";
|
|
111
112
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
113
|
+
var InfiniteList = ({
|
|
114
|
+
queryKey,
|
|
115
|
+
queryFn,
|
|
116
|
+
queryOptions,
|
|
117
|
+
renderItem,
|
|
118
|
+
renderEmpty,
|
|
119
|
+
responseKey,
|
|
120
|
+
pageSize = 20
|
|
121
|
+
}) => {
|
|
122
|
+
const {
|
|
123
|
+
data,
|
|
124
|
+
error,
|
|
125
|
+
fetchNextPage,
|
|
126
|
+
fetchPreviousPage,
|
|
127
|
+
hasPreviousPage,
|
|
128
|
+
hasNextPage,
|
|
129
|
+
isFetching,
|
|
130
|
+
isPending
|
|
131
|
+
} = useInfiniteQuery({
|
|
132
|
+
queryKey,
|
|
133
|
+
queryFn: async ({ pageParam = 0 }) => {
|
|
134
|
+
return await queryFn({
|
|
135
|
+
limit: pageSize,
|
|
136
|
+
offset: pageParam
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
initialPageParam: 0,
|
|
140
|
+
maxPages: 5,
|
|
141
|
+
getNextPageParam: (lastPage) => {
|
|
142
|
+
const moreItemsExist = lastPage.count > lastPage.offset + lastPage.limit;
|
|
143
|
+
return moreItemsExist ? lastPage.offset + lastPage.limit : void 0;
|
|
144
|
+
},
|
|
145
|
+
getPreviousPageParam: (firstPage) => {
|
|
146
|
+
const moreItemsExist = firstPage.offset !== 0;
|
|
147
|
+
return moreItemsExist ? Math.max(firstPage.offset - firstPage.limit, 0) : void 0;
|
|
148
|
+
},
|
|
149
|
+
...queryOptions
|
|
150
|
+
});
|
|
151
|
+
const items = useMemo(() => {
|
|
152
|
+
return data?.pages.flatMap((p) => p[responseKey]) ?? [];
|
|
153
|
+
}, [data, responseKey]);
|
|
154
|
+
const parentRef = useRef(null);
|
|
155
|
+
const startObserver = useRef();
|
|
156
|
+
const endObserver = useRef();
|
|
157
|
+
const fetchNextPageRef = useRef(fetchNextPage);
|
|
158
|
+
const fetchPreviousPageRef = useRef(fetchPreviousPage);
|
|
159
|
+
useEffect2(() => {
|
|
160
|
+
fetchNextPageRef.current = fetchNextPage;
|
|
161
|
+
fetchPreviousPageRef.current = fetchPreviousPage;
|
|
162
|
+
}, [fetchNextPage, fetchPreviousPage]);
|
|
163
|
+
useEffect2(() => {
|
|
164
|
+
if (isPending) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (!isFetching) {
|
|
168
|
+
startObserver.current = new IntersectionObserver(
|
|
169
|
+
(entries) => {
|
|
170
|
+
if (entries[0].isIntersecting && hasPreviousPage) {
|
|
171
|
+
startObserver.current?.disconnect();
|
|
172
|
+
fetchPreviousPageRef.current();
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
threshold: 0.5
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
endObserver.current = new IntersectionObserver(
|
|
180
|
+
(entries) => {
|
|
181
|
+
if (entries[0].isIntersecting && hasNextPage) {
|
|
182
|
+
endObserver.current?.disconnect();
|
|
183
|
+
fetchNextPageRef.current();
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
threshold: 0.5
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
if (parentRef.current?.firstChild) {
|
|
191
|
+
startObserver.current?.observe(parentRef.current.firstChild);
|
|
192
|
+
}
|
|
193
|
+
if (parentRef.current?.lastChild) {
|
|
194
|
+
endObserver.current?.observe(parentRef.current.lastChild);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return () => {
|
|
198
|
+
startObserver.current?.disconnect();
|
|
199
|
+
endObserver.current?.disconnect();
|
|
200
|
+
};
|
|
201
|
+
}, [
|
|
202
|
+
hasNextPage,
|
|
203
|
+
hasPreviousPage,
|
|
204
|
+
isFetching,
|
|
205
|
+
isPending
|
|
206
|
+
]);
|
|
207
|
+
useEffect2(() => {
|
|
208
|
+
if (error) {
|
|
209
|
+
toast.error(error.message);
|
|
210
|
+
}
|
|
211
|
+
}, [error]);
|
|
212
|
+
if (isPending) {
|
|
213
|
+
return /* @__PURE__ */ jsx3("div", { className: "flex h-full flex-col items-center justify-center", children: /* @__PURE__ */ jsx3(Spinner, { className: "animate-spin" }) });
|
|
214
|
+
}
|
|
215
|
+
return /* @__PURE__ */ jsxs2("div", { ref: parentRef, className: "h-full", children: [
|
|
216
|
+
items?.length ? items.map((item) => /* @__PURE__ */ jsx3("div", { children: renderItem(item) }, item.id)) : renderEmpty(),
|
|
217
|
+
isFetching && /* @__PURE__ */ jsx3("div", { className: "flex flex-col items-center justify-center py-4", children: /* @__PURE__ */ jsx3(Spinner, { className: "animate-spin" }) })
|
|
218
|
+
] });
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// src/pages/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx
|
|
222
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
112
223
|
var ManageLocationsForm = ({
|
|
113
224
|
item,
|
|
114
225
|
sellerId
|
|
115
226
|
}) => {
|
|
116
|
-
const existingLocationLevels =
|
|
227
|
+
const existingLocationLevels = useMemo2(
|
|
117
228
|
() => new Set(item.location_levels?.map((l) => l.location_id) ?? []),
|
|
118
229
|
[item.location_levels]
|
|
119
230
|
);
|
|
@@ -153,32 +264,32 @@ var ManageLocationsForm = ({
|
|
|
153
264
|
},
|
|
154
265
|
{
|
|
155
266
|
onSuccess: () => {
|
|
156
|
-
|
|
267
|
+
toast2.success(t("inventory.toast.updateLocations"));
|
|
157
268
|
handleSuccess();
|
|
158
269
|
},
|
|
159
270
|
onError: (e) => {
|
|
160
|
-
|
|
271
|
+
toast2.error(e.message);
|
|
161
272
|
}
|
|
162
273
|
}
|
|
163
274
|
);
|
|
164
275
|
};
|
|
165
|
-
return /* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col overflow-hidden", "data-testid": "inventory-manage-locations-form", children: [
|
|
277
|
+
/* @__PURE__ */ jsxs3(RouteDrawer.Body, { className: "flex flex-1 flex-col gap-y-4 overflow-auto", "data-testid": "inventory-manage-locations-form-body", children: [
|
|
278
|
+
/* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle shadow-elevation-card-rest grid grid-rows-2 divide-y rounded-lg border", "data-testid": "inventory-manage-locations-form-item-info", children: [
|
|
279
|
+
/* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-2 divide-x", "data-testid": "inventory-manage-locations-form-item-title-row", children: [
|
|
280
|
+
/* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-title-label", children: t("fields.title") }),
|
|
281
|
+
/* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-title-value", children: item.title ?? "-" })
|
|
171
282
|
] }),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-2 divide-x", "data-testid": "inventory-manage-locations-form-item-sku-row", children: [
|
|
284
|
+
/* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-sku-label", children: t("fields.sku") }),
|
|
285
|
+
/* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-sku-value", children: item.sku })
|
|
175
286
|
] })
|
|
176
287
|
] }),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col", "data-testid": "inventory-manage-locations-form-header", children: [
|
|
289
|
+
/* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", "data-testid": "inventory-manage-locations-form-header-title", children: t("locations.domain") }),
|
|
290
|
+
/* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle flex w-full justify-between", "data-testid": "inventory-manage-locations-form-header-info", children: [
|
|
291
|
+
/* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-header-label", children: t("locations.selectLocations") }),
|
|
292
|
+
/* @__PURE__ */ jsxs3(Text2, { size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-header-count", children: [
|
|
182
293
|
"(",
|
|
183
294
|
t("general.countOfTotalSelected", {
|
|
184
295
|
count: selectedLocationIds.size,
|
|
@@ -188,14 +299,14 @@ var ManageLocationsForm = ({
|
|
|
188
299
|
] })
|
|
189
300
|
] })
|
|
190
301
|
] }),
|
|
191
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ jsx4("div", { "data-testid": "inventory-manage-locations-form-search-wrapper", children: /* @__PURE__ */ jsx4(
|
|
192
303
|
LocationSearchInput,
|
|
193
304
|
{
|
|
194
305
|
onSearchChange: setSearchQuery,
|
|
195
306
|
placeholder: t("general.search")
|
|
196
307
|
}
|
|
197
308
|
) }),
|
|
198
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ jsx4("div", { className: "min-h-0 flex-1", "data-testid": "inventory-manage-locations-form-locations-list", children: /* @__PURE__ */ jsx4(
|
|
199
310
|
InfiniteList,
|
|
200
311
|
{
|
|
201
312
|
queryKey: ["stock-locations", searchQuery, sellerId ?? "all"],
|
|
@@ -209,7 +320,7 @@ var ManageLocationsForm = ({
|
|
|
209
320
|
return response;
|
|
210
321
|
},
|
|
211
322
|
responseKey: "stock_locations",
|
|
212
|
-
renderItem: (location) => /* @__PURE__ */
|
|
323
|
+
renderItem: (location) => /* @__PURE__ */ jsx4("div", { className: "pb-2 last:pb-0", children: /* @__PURE__ */ jsx4(
|
|
213
324
|
LocationItem,
|
|
214
325
|
{
|
|
215
326
|
selected: selectedLocationIds.has(location.id),
|
|
@@ -217,20 +328,20 @@ var ManageLocationsForm = ({
|
|
|
217
328
|
onSelect: (selected) => handleLocationSelect(location.id, selected)
|
|
218
329
|
}
|
|
219
330
|
) }),
|
|
220
|
-
renderEmpty: () => /* @__PURE__ */
|
|
331
|
+
renderEmpty: () => /* @__PURE__ */ jsx4("div", { className: "flex items-center justify-center py-8", "data-testid": "inventory-manage-locations-form-empty-state", children: /* @__PURE__ */ jsx4(Text2, { size: "small", className: "text-ui-fg-subtle", "data-testid": "inventory-manage-locations-form-empty-state-text", children: searchQuery ? t("locations.noLocationsFound") : t("locations.noLocationsFound") }) }),
|
|
221
332
|
pageSize: 20
|
|
222
333
|
}
|
|
223
334
|
) })
|
|
224
335
|
] }),
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ jsx4(RouteDrawer.Footer, { "data-testid": "inventory-manage-locations-form-footer", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-x-2", "data-testid": "inventory-manage-locations-form-footer-actions", children: [
|
|
337
|
+
/* @__PURE__ */ jsx4(RouteDrawer.Close, { asChild: true, "data-testid": "inventory-manage-locations-form-cancel-button-wrapper", children: /* @__PURE__ */ jsx4(Button, { variant: "secondary", size: "small", "data-testid": "inventory-manage-locations-form-cancel-button", children: t("actions.cancel") }) }),
|
|
338
|
+
/* @__PURE__ */ jsx4(Button, { onClick: handleSubmit, size: "small", isLoading: false, "data-testid": "inventory-manage-locations-form-save-button", children: t("actions.save") })
|
|
228
339
|
] }) })
|
|
229
340
|
] });
|
|
230
341
|
};
|
|
231
342
|
|
|
232
343
|
// src/pages/inventory/inventory-detail/components/manage-locations/manage-locations-drawer.tsx
|
|
233
|
-
import { jsx as
|
|
344
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
234
345
|
var ManageLocationsDrawer = () => {
|
|
235
346
|
const { id } = useParams();
|
|
236
347
|
const { t } = useTranslation3();
|
|
@@ -248,9 +359,9 @@ var ManageLocationsDrawer = () => {
|
|
|
248
359
|
throw error;
|
|
249
360
|
}
|
|
250
361
|
const sellerId = inventoryItem?.offers?.[0]?.seller_id;
|
|
251
|
-
return /* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
ready && /* @__PURE__ */
|
|
362
|
+
return /* @__PURE__ */ jsxs4(RouteDrawer, { "data-testid": "inventory-manage-locations-drawer", children: [
|
|
363
|
+
/* @__PURE__ */ jsx5(RouteDrawer.Header, { "data-testid": "inventory-manage-locations-drawer-header", children: /* @__PURE__ */ jsx5(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx5(Heading, { "data-testid": "inventory-manage-locations-drawer-title", children: t("inventory.manageLocations") }) }) }),
|
|
364
|
+
ready && /* @__PURE__ */ jsx5(
|
|
254
365
|
ManageLocationsForm,
|
|
255
366
|
{
|
|
256
367
|
item: inventoryItem,
|
|
@@ -15,7 +15,7 @@ import "./chunk-ZAOEFQ6K.js";
|
|
|
15
15
|
import "./chunk-IKAUNMRC.js";
|
|
16
16
|
import "./chunk-EIWPJWKF.js";
|
|
17
17
|
import "./chunk-46WEBDVJ.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-W5U6NPSN.js";
|
|
19
19
|
import "./chunk-DSQRFZCO.js";
|
|
20
20
|
import "./chunk-LHE6LM6S.js";
|
|
21
21
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useOfferTableColumns,
|
|
9
9
|
useOfferTableFilters,
|
|
10
10
|
useOfferTableQuery
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IAJ5F227.js";
|
|
12
12
|
import {
|
|
13
13
|
useOffers
|
|
14
14
|
} from "./chunk-GNNOFJAK.js";
|
|
@@ -33,7 +33,7 @@ import "./chunk-ZAOEFQ6K.js";
|
|
|
33
33
|
import "./chunk-IKAUNMRC.js";
|
|
34
34
|
import "./chunk-EIWPJWKF.js";
|
|
35
35
|
import "./chunk-46WEBDVJ.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-W5U6NPSN.js";
|
|
37
37
|
import "./chunk-DSQRFZCO.js";
|
|
38
38
|
import "./chunk-LHE6LM6S.js";
|
|
39
39
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -88,7 +88,7 @@ import "./chunk-ZAOEFQ6K.js";
|
|
|
88
88
|
import "./chunk-IKAUNMRC.js";
|
|
89
89
|
import "./chunk-EIWPJWKF.js";
|
|
90
90
|
import "./chunk-46WEBDVJ.js";
|
|
91
|
-
import "./chunk-
|
|
91
|
+
import "./chunk-W5U6NPSN.js";
|
|
92
92
|
import "./chunk-DSQRFZCO.js";
|
|
93
93
|
import "./chunk-LHE6LM6S.js";
|
|
94
94
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OrderDetailPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JNZPAM34.js";
|
|
4
4
|
import "./chunk-6ASLWQB3.js";
|
|
5
5
|
import "./chunk-LXSBG6LK.js";
|
|
6
6
|
import "./chunk-W6Y3PPU5.js";
|
|
@@ -35,7 +35,7 @@ import "./chunk-ZAOEFQ6K.js";
|
|
|
35
35
|
import "./chunk-IKAUNMRC.js";
|
|
36
36
|
import "./chunk-EIWPJWKF.js";
|
|
37
37
|
import "./chunk-46WEBDVJ.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-W5U6NPSN.js";
|
|
39
39
|
import "./chunk-DSQRFZCO.js";
|
|
40
40
|
import "./chunk-LHE6LM6S.js";
|
|
41
41
|
import "./chunk-BOPIWKTU.js";
|
package/dist/{order-edit-billing-address-SBVWRA25.js → order-edit-billing-address-6ALJ7U6O.js}
RENAMED
|
@@ -9,7 +9,7 @@ import "./chunk-FMFVTERD.js";
|
|
|
9
9
|
import "./chunk-JRTZWK77.js";
|
|
10
10
|
import {
|
|
11
11
|
i18n
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BEBP26XV.js";
|
|
13
13
|
import "./chunk-TKGWSUEI.js";
|
|
14
14
|
import {
|
|
15
15
|
KeyboundForm
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
Form
|
|
23
23
|
} from "./chunk-3QSRE5LS.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-W5U6NPSN.js";
|
|
25
25
|
import "./chunk-DSQRFZCO.js";
|
|
26
26
|
import "./chunk-LHE6LM6S.js";
|
|
27
27
|
import "./chunk-BOPIWKTU.js";
|
|
@@ -5,7 +5,7 @@ import "./chunk-TKGWSUEI.js";
|
|
|
5
5
|
import "./chunk-SITRHMZZ.js";
|
|
6
6
|
import "./chunk-FWJLS7XD.js";
|
|
7
7
|
import "./chunk-3QSRE5LS.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-W5U6NPSN.js";
|
|
9
9
|
import "./chunk-DSQRFZCO.js";
|
|
10
10
|
import "./chunk-LHE6LM6S.js";
|
|
11
11
|
import "./chunk-BOPIWKTU.js";
|