@mercurjs/vendor 2.2.0-rc.2 → 2.2.0
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/{[id]-MIASQVLP.js → [id]-FOWK6QIJ.js} +1 -1
- package/dist/{[id]-3HIZGJWE.js → [id]-H3YKIFO3.js} +2 -2
- package/dist/{[id]-ONBG5DZJ.js → [id]-WUXFJPPB.js} +3 -3
- package/dist/{add-ZIP3VEAV.js → add-HARVSLKD.js} +4 -3
- package/dist/{add-FDIWOFVE.js → add-IEIH4CBT.js} +2 -1
- package/dist/{add-promotions-3BALABRA.js → add-promotions-7KCUDY3S.js} +3 -3
- package/dist/{allocate-items-5HHGU3XW.js → allocate-items-646J75L2.js} +1 -1
- package/dist/{areas-XQE3AYPZ.js → areas-VO7NUUUL.js} +7 -5
- package/dist/{chunk-UDPMSL6L.js → chunk-53JNB4BP.js} +1 -1
- package/dist/{chunk-XRNDVICA.js → chunk-BNOKKKUU.js} +5 -2
- package/dist/{chunk-ASN3XS2R.js → chunk-D6XR2USM.js} +2 -2
- package/dist/{chunk-VR7P4DAZ.js → chunk-DSNCEHLY.js} +1 -1
- package/dist/{chunk-55TS752B.js → chunk-E73SSHJR.js} +4 -2
- package/dist/{chunk-H3PVTKOP.js → chunk-JDMNEMRJ.js} +2 -2
- package/dist/{chunk-GGXGKMYK.js → chunk-S5KWI3MM.js} +1 -1
- package/dist/{chunk-OATVHDPZ.js → chunk-SCPQYA26.js} +1 -1
- package/dist/{chunk-E5VLRRZR.js → chunk-UWU6VSO4.js} +1 -1
- package/dist/{chunk-DREOA2LP.js → chunk-X6ZQMFCT.js} +1 -1
- package/dist/{chunk-57ZJ6HTU.js → chunk-YXEC5XAV.js} +3 -0
- package/dist/{chunk-ESXMD6CR.js → chunk-ZZ4JC4WE.js} +36393 -2091
- package/dist/{chunk-RZHVUQ7G.js → chunk-ZZ7T7GN5.js} +1 -1
- package/dist/{create-B4VIR7YP.js → create-7VKH255E.js} +7 -5
- package/dist/{create-4ZRQVXT5.js → create-DU2V6X5H.js} +2 -2
- package/dist/{create-XU35U2HL.js → create-G6VJD52A.js} +4 -4
- package/dist/{create-3ZQFAKYR.js → create-Y2FZ4565.js} +14 -13
- package/dist/{create-7Z63KA2P.js → create-Z6ZHEAKU.js} +9 -9
- package/dist/{edit-ISFEI7YX.js → edit-3AM5DZE7.js} +2 -2
- package/dist/{edit-QII5YJ2R.js → edit-3HMTDPZK.js} +3 -3
- package/dist/{edit-5XPDTCB5.js → edit-CKO32TA3.js} +3 -3
- package/dist/{edit-FF2ZWS6U.js → edit-H5FJ45ZT.js} +5 -5
- package/dist/{edit-NTTJKLUI.js → edit-RY35FORN.js} +5 -5
- package/dist/index.js +32 -32
- package/dist/{login-FK6ATIQV.js → login-VMLJYOCF.js} +1 -1
- package/dist/{media-2Z2UIOQU.js → media-ZXUMWWXV.js} +3 -3
- package/dist/{offer-create-page-QAHHXLLJ.js → offer-create-page-VHNJL3UO.js} +1 -1
- package/dist/pages/index.js +10 -10
- package/dist/{price-lists-5CSCTVWN.js → price-lists-5C4MCWWR.js} +2 -2
- package/dist/{pricing-NHI4NSLA.js → pricing-OQ4RKZO5.js} +7 -5
- package/dist/{products-27ASSSVK.js → products-QIGSKI65.js} +4 -4
- package/dist/{promotions-E4Z6APSX.js → promotions-JT5PFYPT.js} +4 -4
- package/dist/{register-IKY5DDUR.js → register-S4EBPL7B.js} +3 -1
- package/dist/{reset-password-RMKCQLBX.js → reset-password-VTYSKEFH.js} +1 -1
- package/dist/{stock-VMND7PJY.js → stock-QOUDJSFO.js} +2 -2
- package/package.json +6 -6
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-BWGPN6XV.js";
|
|
7
7
|
import {
|
|
8
8
|
StatusCell
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S5KWI3MM.js";
|
|
10
10
|
import "./chunk-FMFVTERD.js";
|
|
11
11
|
import "./chunk-DB6ANJBO.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZZ4JC4WE.js";
|
|
13
13
|
import {
|
|
14
14
|
TwoColumnPage
|
|
15
15
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
usePromotionTableColumns,
|
|
9
9
|
usePromotionTableQuery
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-DSNCEHLY.js";
|
|
11
|
+
import "./chunk-S5KWI3MM.js";
|
|
12
12
|
import "./chunk-JHIMVLB2.js";
|
|
13
13
|
import {
|
|
14
14
|
usePromotionTableFilters
|
|
@@ -19,7 +19,7 @@ import "./chunk-PHOCVOZ5.js";
|
|
|
19
19
|
import {
|
|
20
20
|
currencies
|
|
21
21
|
} from "./chunk-IQPN4PZJ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ZZ4JC4WE.js";
|
|
23
23
|
import {
|
|
24
24
|
TwoColumnPage
|
|
25
25
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
PriceListCreateProductsSchema,
|
|
3
3
|
usePriceListCurrencyData,
|
|
4
4
|
usePriceListGridColumns
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-X6ZQMFCT.js";
|
|
6
6
|
import "./chunk-N335VHD3.js";
|
|
7
7
|
import "./chunk-EBZ5VZEO.js";
|
|
8
8
|
import "./chunk-4F5GP7J7.js";
|
|
9
9
|
import {
|
|
10
10
|
exctractPricesFromProducts,
|
|
11
11
|
isProductRow
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BNOKKKUU.js";
|
|
13
13
|
import "./chunk-6IJMSVC6.js";
|
|
14
14
|
import "./chunk-7TIZP4YG.js";
|
|
15
15
|
import "./chunk-GJM5XI3E.js";
|
|
@@ -372,6 +372,7 @@ var useColumns = () => {
|
|
|
372
372
|
};
|
|
373
373
|
|
|
374
374
|
// src/pages/price-lists/[id]/products/add/price-list-prices-add-form/schema.ts
|
|
375
|
+
import i18n from "i18next";
|
|
375
376
|
import { z } from "zod";
|
|
376
377
|
var PriceListPricesAddBaseSchema = z.object({
|
|
377
378
|
product_ids: z.array(z.object({ id: z.string() })).min(1),
|
|
@@ -412,7 +413,7 @@ var PriceListPricesAddSchema = PriceListPricesAddBaseSchema.refine(
|
|
|
412
413
|
return false;
|
|
413
414
|
},
|
|
414
415
|
{
|
|
415
|
-
message: "
|
|
416
|
+
message: i18n.t("validation.atLeastOnePrice"),
|
|
416
417
|
path: ["products"]
|
|
417
418
|
}
|
|
418
419
|
);
|
|
@@ -91,6 +91,7 @@ import { useTranslation } from "react-i18next";
|
|
|
91
91
|
import { useParams } from "react-router-dom";
|
|
92
92
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
93
93
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
94
|
+
import i18n from "i18next";
|
|
94
95
|
import * as zod from "zod";
|
|
95
96
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
96
97
|
var PAGE_SIZE = 20;
|
|
@@ -116,7 +117,7 @@ var AttributeValueSchema = zod.object({
|
|
|
116
117
|
if (Array.isArray(val)) return val.length > 0;
|
|
117
118
|
return val.length > 0;
|
|
118
119
|
},
|
|
119
|
-
{ message: "
|
|
120
|
+
{ message: i18n.t("validation.valueRequired") }
|
|
120
121
|
)
|
|
121
122
|
});
|
|
122
123
|
var AddExistingAttributesSchema = zod.object({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePromotionTableColumns,
|
|
3
3
|
usePromotionTableQuery
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-DSNCEHLY.js";
|
|
5
|
+
import "./chunk-S5KWI3MM.js";
|
|
6
6
|
import "./chunk-JHIMVLB2.js";
|
|
7
7
|
import {
|
|
8
8
|
usePromotionTableFilters
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import "./chunk-FMFVTERD.js";
|
|
11
11
|
import "./chunk-DB6ANJBO.js";
|
|
12
12
|
import "./chunk-PHOCVOZ5.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZZ4JC4WE.js";
|
|
14
14
|
import "./chunk-TKGWSUEI.js";
|
|
15
15
|
import {
|
|
16
16
|
KeyboundForm
|
|
@@ -459,7 +459,7 @@ function OrderAllocateItemsForm({ order }) {
|
|
|
459
459
|
});
|
|
460
460
|
} catch (e) {
|
|
461
461
|
toast.error(t("general.error"), {
|
|
462
|
-
description: e instanceof Error ? e.message : "
|
|
462
|
+
description: e instanceof Error ? e.message : t("general.unknownError")
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GeoZoneForm
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E73SSHJR.js";
|
|
4
4
|
import {
|
|
5
5
|
GEO_ZONE_STACKED_MODAL_ID
|
|
6
6
|
} from "./chunk-BCU3FKP2.js";
|
|
@@ -40,7 +40,7 @@ import "./chunk-DTGEFKK4.js";
|
|
|
40
40
|
import "./chunk-NBMM2TZK.js";
|
|
41
41
|
|
|
42
42
|
// src/pages/settings/locations/[location_id]/fulfillment-set/[fset_id]/service-zone/[zone_id]/areas/index.tsx
|
|
43
|
-
import {
|
|
43
|
+
import { useParams } from "react-router-dom";
|
|
44
44
|
|
|
45
45
|
// src/pages/settings/locations/[location_id]/fulfillment-set/[fset_id]/service-zone/[zone_id]/areas/_components/edit-service-zone-areas-form.tsx
|
|
46
46
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -129,9 +129,11 @@ var LocationServiceZoneManageAreas = () => {
|
|
|
129
129
|
});
|
|
130
130
|
const zone = stock_location?.fulfillment_sets?.find((f) => f.id === fset_id)?.service_zones.find((z2) => z2.id === zone_id);
|
|
131
131
|
if (!isPending && !isFetching && !zone) {
|
|
132
|
-
throw
|
|
133
|
-
{
|
|
134
|
-
|
|
132
|
+
throw new Response(
|
|
133
|
+
JSON.stringify({
|
|
134
|
+
message: `Service zone with ID ${zone_id} was not found`
|
|
135
|
+
}),
|
|
136
|
+
{ status: 404, headers: { "Content-Type": "application/json" } }
|
|
135
137
|
);
|
|
136
138
|
}
|
|
137
139
|
if (isError) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-SMQT3ZNO.js";
|
|
4
4
|
|
|
5
5
|
// src/pages/price-lists/common/utils.ts
|
|
6
|
-
import
|
|
6
|
+
import i18n from "i18next";
|
|
7
7
|
var getValues = (priceList) => {
|
|
8
8
|
const startsAt = priceList.starts_at;
|
|
9
9
|
const endsAt = priceList.ends_at;
|
|
@@ -49,7 +49,10 @@ var extractPricesFromVariants = (variantId, variant, regions) => {
|
|
|
49
49
|
const extractPriceDetails = (price, priceType, id) => {
|
|
50
50
|
const currencyCode = priceType === "currency" ? id : regions.find((r) => r.id === id)?.currency_code;
|
|
51
51
|
if (!currencyCode) {
|
|
52
|
-
throw
|
|
52
|
+
throw new Response(
|
|
53
|
+
JSON.stringify({ message: i18n.t("validation.currencyCodeNotFound") }),
|
|
54
|
+
{ status: 400, headers: { "Content-Type": "application/json" } }
|
|
55
|
+
);
|
|
53
56
|
}
|
|
54
57
|
return {
|
|
55
58
|
amount: castNumber(price.amount),
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
} from "./chunk-OVPAOBZB.js";
|
|
20
20
|
import {
|
|
21
21
|
UploadMediaFormItem
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SCPQYA26.js";
|
|
23
23
|
import {
|
|
24
24
|
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
25
25
|
ProductCreateSchema,
|
|
26
26
|
generateVariantsFromAttributes,
|
|
27
27
|
normalizeProductFormValues
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UWU6VSO4.js";
|
|
29
29
|
import {
|
|
30
30
|
ChipInput
|
|
31
31
|
} from "./chunk-KDE4HKH2.js";
|
|
@@ -111,7 +111,6 @@ var Chip = ({ index, className, children }) => {
|
|
|
111
111
|
var ChipGroup = Object.assign(Group, { Chip });
|
|
112
112
|
|
|
113
113
|
// src/pages/settings/regions/_common/hooks/use-countries.tsx
|
|
114
|
-
import { json } from "react-router-dom";
|
|
115
114
|
var acceptedOrderKeys = ["name", "code"];
|
|
116
115
|
var useCountries = ({
|
|
117
116
|
countries: countries2,
|
|
@@ -126,7 +125,10 @@ var useCountries = ({
|
|
|
126
125
|
const key = order.replace("-", "");
|
|
127
126
|
if (!acceptedOrderKeys.includes(key)) {
|
|
128
127
|
console.log("The key ${key} is not a valid order key");
|
|
129
|
-
throw
|
|
128
|
+
throw new Response(
|
|
129
|
+
JSON.stringify(`The key ${key} is not a valid order key`),
|
|
130
|
+
{ status: 500, headers: { "Content-Type": "application/json" } }
|
|
131
|
+
);
|
|
130
132
|
}
|
|
131
133
|
const sortKey = key === "code" ? "iso_2" : "name";
|
|
132
134
|
data.sort((a, b) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PriceListUpdateProductsSchema,
|
|
3
3
|
usePriceListGridColumns
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X6ZQMFCT.js";
|
|
5
5
|
import {
|
|
6
6
|
isProductRow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BNOKKKUU.js";
|
|
8
8
|
import {
|
|
9
9
|
DataGrid
|
|
10
10
|
} from "./chunk-5FBQOAXU.js";
|
|
@@ -148,11 +148,13 @@ var LoginForm = () => {
|
|
|
148
148
|
] }) });
|
|
149
149
|
};
|
|
150
150
|
var LoginFooter = () => {
|
|
151
|
+
const { t } = useTranslation();
|
|
151
152
|
const { feature_flags } = useFeatureFlags();
|
|
152
153
|
return /* @__PURE__ */ jsxs("div", { className: "mt-auto flex flex-col gap-y-2", children: [
|
|
153
154
|
/* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted txt-small", children: /* @__PURE__ */ jsx(
|
|
154
155
|
Trans,
|
|
155
156
|
{
|
|
157
|
+
t,
|
|
156
158
|
i18nKey: "login.forgotPassword",
|
|
157
159
|
components: [
|
|
158
160
|
/* @__PURE__ */ jsx(
|
|
@@ -169,6 +171,7 @@ var LoginFooter = () => {
|
|
|
169
171
|
feature_flags?.[import_types.MercurFeatureFlags.SELLER_REGISTRATION] && /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted txt-small", children: /* @__PURE__ */ jsx(
|
|
170
172
|
Trans,
|
|
171
173
|
{
|
|
174
|
+
t,
|
|
172
175
|
i18nKey: "login.notSellerYet",
|
|
173
176
|
components: [
|
|
174
177
|
/* @__PURE__ */ jsx(
|