@mercurjs/vendor 2.0.2 → 2.1.0-canary.5
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]-DCCF7277.js → [id]-57VYN5YF.js} +2 -3
- package/dist/{[id]-UAOAQVEM.js → [id]-FWI6NCSF.js} +3 -4
- package/dist/{[id]-6WYSWXWC.js → [id]-IQNYVYZU.js} +1 -2
- package/dist/{[id]-LZPT5Y55.js → [id]-KCUHMQWF.js} +1 -2
- package/dist/{[id]-ENTJSLN2.js → [id]-KMRB5RAW.js} +3 -3
- package/dist/{[id]-PHS2WYFX.js → [id]-LCMQBEOS.js} +2 -3
- package/dist/{[id]-OGHRZ2VY.js → [id]-LJJPLKJ6.js} +5 -4
- package/dist/{[id]-VKG2WEIR.js → [id]-M3PNP527.js} +1 -2
- package/dist/{[id]-EJAHMOOE.js → [id]-MZOT4GAO.js} +2 -3
- package/dist/{[id]-TLZZ53G7.js → [id]-WYIWRY5O.js} +2 -2
- package/dist/{[province_id]-XGA44S7P.js → [province_id]-2MRNXHKU.js} +1 -2
- package/dist/{add-7ZTE42IE.js → add-RDOKD6CX.js} +2 -2
- package/dist/{add-AKC7LTK3.js → add-W7ATBCKS.js} +2 -3
- package/dist/{add-customer-groups-BRC3DKQ2.js → add-customer-groups-ZZVSJJH3.js} +1 -2
- package/dist/{add-products-ZSULNZVI.js → add-products-PINICUAZ.js} +2 -3
- package/dist/{add-promotions-TNFVT5ST.js → add-promotions-W57766OG.js} +3 -3
- package/dist/{address-3DSJESKM.js → address-MQS4I2N6.js} +58 -71
- package/dist/{breadcrumb-ZMVHXCOX.js → breadcrumb-A3XUO3R2.js} +2 -3
- package/dist/{breadcrumb-UH7FAYU2.js → breadcrumb-MPXARU5F.js} +1 -2
- package/dist/{breadcrumb-D6QNYOAO.js → breadcrumb-Q5KJBAPD.js} +1 -2
- package/dist/{chunk-CUMY2VZ5.js → chunk-5LKZCG77.js} +1 -96
- package/dist/{chunk-7XC7ZRG7.js → chunk-5VBEGZ5W.js} +1 -1
- package/dist/{chunk-573EQEW2.js → chunk-6HPF5UZA.js} +1 -1
- package/dist/{chunk-RV5UTYBG.js → chunk-EQQ3BLQ3.js} +2 -2
- package/dist/{chunk-LA6XSPQG.js → chunk-FI2RBY7M.js} +287 -309
- package/dist/{chunk-RMBCBXWD.js → chunk-GQFNE5VL.js} +1 -1
- package/dist/chunk-HFRHHT36.js +98 -0
- package/dist/{chunk-O7E4KQAK.js → chunk-I4F7UYZE.js} +1 -1
- package/dist/chunk-JWB2HSCJ.js +30 -0
- package/dist/{chunk-FNG7ZA7N.js → chunk-NCQBAHWT.js} +1 -1
- package/dist/{chunk-T7LEJIIM.js → chunk-PT3UQCSN.js} +1 -1
- package/dist/chunk-TLE6YHGH.js +26 -0
- package/dist/{chunk-JRT2U4UI.js → chunk-TRKJKAM6.js} +130 -33
- package/dist/{chunk-ASEVHHCT.js → chunk-UDG47AEE.js} +1 -1
- package/dist/{chunk-XZG2HZYW.js → chunk-WFE6CT6M.js} +1 -1
- package/dist/{chunk-N2WKLVUX.js → chunk-XF3W2U3Q.js} +1 -1
- package/dist/{chunk-JKKRKFCS.js → chunk-YPSJN3XT.js} +29 -32
- package/dist/{chunk-NYRRRCJS.js → chunk-ZCJ737TR.js} +66 -21
- package/dist/{collections-2M4RFH4P.js → collections-NNFGWUTW.js} +2 -3
- package/dist/{create-D4F457BD.js → create-GCSVAMEH.js} +1 -2
- package/dist/{create-2TUWGQ2D.js → create-N3WNCW7U.js} +1 -2
- package/dist/{create-QK2SSLZK.js → create-T73PSKIV.js} +3 -4
- package/dist/{create-OF2OZ7EI.js → create-TXBY6W3X.js} +1 -2
- package/dist/{create-6IRE6AMF.js → create-V3TFI4BJ.js} +8 -7
- package/dist/{create-IFMEEHN4.js → create-VPG7P53M.js} +2 -3
- package/dist/{create-YITFTHMA.js → create-WY4KXB66.js} +1 -2
- package/dist/{create-3WUTLUJO.js → create-YCOR6HY3.js} +1 -2
- package/dist/{edit-SGEECDCR.js → edit-2QUFOE5S.js} +1 -2
- package/dist/{edit-UQAQVEUI.js → edit-62WJ7SBJ.js} +27 -10
- package/dist/{edit-QRJIWTU2.js → edit-B245OLC7.js} +1 -2
- package/dist/{edit-PIE7Y73J.js → edit-CPVFMQEI.js} +3 -4
- package/dist/{edit-ONSN756P.js → edit-F4F6EQDZ.js} +1 -1
- package/dist/{edit-Z7EZRPUP.js → edit-JGBH64CC.js} +1 -1
- package/dist/{edit-J5SC7GHQ.js → edit-KWSXWWOA.js} +1 -2
- package/dist/{edit-ZEIL7EQW.js → edit-QYKH2ZZA.js} +1 -2
- package/dist/{edit-stocks-and-prices-543AYFDJ.js → edit-stocks-and-prices-Y233WVZ3.js} +1 -2
- package/dist/{fulfillment-5LNFBSBS.js → fulfillment-FBF3MITY.js} +1 -2
- package/dist/{fulfillment-providers-U7Z7QMOQ.js → fulfillment-providers-Y2YOREHX.js} +2 -3
- package/dist/index.css +35 -29
- package/dist/index.js +86 -87
- package/dist/invite-G7WOO5RZ.js +368 -0
- package/dist/{invite-SI2KIPWI.js → invite-Y2TACGCW.js} +3 -5
- package/dist/{login-QDS5UXKV.js → login-3U4XGDAD.js} +3 -3
- package/dist/{media-RDXCLPKQ.js → media-O2GIGGFG.js} +2 -2
- package/dist/{metadata-7JKDCVYY.js → metadata-7RA6MXW7.js} +1 -2
- package/dist/{metadata-ZV5RYLKR.js → metadata-GSBDSRNM.js} +1 -2
- package/dist/{metadata-X4UIPNL6.js → metadata-JXRXW6UQ.js} +1 -2
- package/dist/{metadata-W5XIPFVU.js → metadata-QM4UGMX5.js} +1 -2
- package/dist/{metadata-UKBRUFH2.js → metadata-RODKLIDO.js} +1 -2
- package/dist/onboarding-7XHOLSKH.js +943 -0
- package/dist/{orders-IAL3JNPU.js → orders-HKUVFCTQ.js} +2 -3
- package/dist/pages/index.d.ts +140 -140
- package/dist/pages/index.js +16 -14
- package/dist/{payment-details-ATUYMVJX.js → payment-details-VWR2S32W.js} +1 -2
- package/dist/{pricing-RBESFX5P.js → pricing-6UZ6SXIE.js} +1 -2
- package/dist/{product-tags-W4BL6RWV.js → product-tags-YXVFIPGQ.js} +3 -4
- package/dist/{product-variant-detail-KU5OCL7E.js → product-variant-detail-O2NOUFFC.js} +1 -2
- package/dist/{products-3VVYJUH7.js → products-3NIIOQBB.js} +2 -3
- package/dist/{products-YYLVCOOY.js → products-T2EMLRXQ.js} +10 -9
- package/dist/{professional-details-6Y5K6GBL.js → professional-details-SJ4AF5TM.js} +1 -2
- package/dist/{promotions-NBJTFP6N.js → promotions-ZEH4RHL3.js} +4 -4
- package/dist/register-4SX23YPM.js +210 -0
- package/dist/{reset-password-PLCDLFL4.js → reset-password-4LWDUVMH.js} +1 -1
- package/dist/{sales-channels-UIDLFCX6.js → sales-channels-2OVI6RTV.js} +3 -2
- package/dist/{sales-channels-UWPEFKAO.js → sales-channels-BKOYQXVC.js} +3 -2
- package/dist/{settings-5MNWE5CR.js → settings-F6KJREHK.js} +3 -4
- package/dist/{shipping-profiles-O7XB2DTE.js → shipping-profiles-AQMJSXDB.js} +1 -2
- package/dist/{stock-VJAAYYW5.js → stock-4G4WQIR7.js} +1 -2
- package/dist/{stock-2CGEFBXO.js → stock-NJADHNRP.js} +1 -2
- package/dist/{store-ZBSMNWFT.js → store-E4JEK2CQ.js} +220 -118
- package/dist/{store-closure-43FK32AQ.js → store-closure-QPK4LBBZ.js} +35 -19
- package/dist/{store-select-Q2HE572R.js → store-select-XPC6NIV5.js} +31 -22
- package/dist/{team-ZLZJJWIY.js → team-DZ5CV3LG.js} +1 -2
- package/package.json +5 -5
- package/dist/chunk-STBCWNZQ.js +0 -57
- package/dist/invite-P6HTOEIV.js +0 -301
- package/dist/onboarding-DLIBZRKE.js +0 -873
- package/dist/register-ZLE6MNPF.js +0 -223
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_dist
|
|
3
|
-
} from "./chunk-ZZO3INVE.js";
|
|
4
|
-
import {
|
|
5
|
-
AvatarBox
|
|
6
|
-
} from "./chunk-CP5IL4P6.js";
|
|
7
|
-
import "./chunk-FMFVTERD.js";
|
|
8
|
-
import {
|
|
9
|
-
i18n
|
|
10
|
-
} from "./chunk-JRT2U4UI.js";
|
|
11
|
-
import {
|
|
12
|
-
Form
|
|
13
|
-
} from "./chunk-3QSRE5LS.js";
|
|
14
|
-
import "./chunk-U2EI2ZLM.js";
|
|
15
|
-
import {
|
|
16
|
-
useFeatureFlags
|
|
17
|
-
} from "./chunk-NYRRRCJS.js";
|
|
18
|
-
import "./chunk-STBCWNZQ.js";
|
|
19
|
-
import {
|
|
20
|
-
useSignUpWithEmailPass
|
|
21
|
-
} from "./chunk-F4OJN2F2.js";
|
|
22
|
-
import "./chunk-LRARA622.js";
|
|
23
|
-
import "./chunk-M6N4ISXL.js";
|
|
24
|
-
import "./chunk-S7EKBD2C.js";
|
|
25
|
-
import "./chunk-VXMOPVRH.js";
|
|
26
|
-
import "./chunk-IQWK723D.js";
|
|
27
|
-
import "./chunk-VV6IKGCN.js";
|
|
28
|
-
import "./chunk-PCMNEUMV.js";
|
|
29
|
-
import "./chunk-BOZJOOGW.js";
|
|
30
|
-
import "./chunk-RL7SFZOF.js";
|
|
31
|
-
import "./chunk-LWJF63JW.js";
|
|
32
|
-
import "./chunk-NBPMNUKZ.js";
|
|
33
|
-
import "./chunk-GCSQEJMD.js";
|
|
34
|
-
import "./chunk-VXWN37PT.js";
|
|
35
|
-
import "./chunk-UL4O5M4S.js";
|
|
36
|
-
import "./chunk-FX4V5JCF.js";
|
|
37
|
-
import "./chunk-3B34B2M2.js";
|
|
38
|
-
import "./chunk-RUE5BPC2.js";
|
|
39
|
-
import "./chunk-ZEVYT6IX.js";
|
|
40
|
-
import "./chunk-A5DJIOHN.js";
|
|
41
|
-
import "./chunk-RHKRREUU.js";
|
|
42
|
-
import "./chunk-ZA2KFUFR.js";
|
|
43
|
-
import "./chunk-RIN4CBRB.js";
|
|
44
|
-
import {
|
|
45
|
-
__toESM
|
|
46
|
-
} from "./chunk-NBMM2TZK.js";
|
|
47
|
-
|
|
48
|
-
// src/pages/register/register.tsx
|
|
49
|
-
var import_types = __toESM(require_dist(), 1);
|
|
50
|
-
import { Children, useState } from "react";
|
|
51
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
52
|
-
import { Spinner } from "@medusajs/icons";
|
|
53
|
-
import { Button, Heading, Hint, Input, Text } from "@medusajs/ui";
|
|
54
|
-
import { useForm } from "react-hook-form";
|
|
55
|
-
import { Trans, useTranslation } from "react-i18next";
|
|
56
|
-
import { Link, Navigate, useNavigate } from "react-router-dom";
|
|
57
|
-
import config from "virtual:mercur/config";
|
|
58
|
-
|
|
59
|
-
// src/pages/register/register-schema.ts
|
|
60
|
-
import * as z from "zod";
|
|
61
|
-
var RegisterSchema = z.object({
|
|
62
|
-
email: z.string().email(i18n.t("register.validation.emailInvalid")),
|
|
63
|
-
password: z.string().min(1).refine((val) => val.trim().length > 0),
|
|
64
|
-
confirmPassword: z.string().min(1)
|
|
65
|
-
}).superRefine(({ password, confirmPassword }, ctx) => {
|
|
66
|
-
if (password !== confirmPassword) {
|
|
67
|
-
ctx.addIssue({
|
|
68
|
-
code: z.ZodIssueCode.custom,
|
|
69
|
-
message: i18n.t("register.passwordMismatch"),
|
|
70
|
-
path: ["confirmPassword"]
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
// src/pages/register/register.tsx
|
|
76
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
77
|
-
var RegisterLogo = () => {
|
|
78
|
-
return /* @__PURE__ */ jsx(AvatarBox, {});
|
|
79
|
-
};
|
|
80
|
-
var RegisterHeader = () => {
|
|
81
|
-
const { t } = useTranslation();
|
|
82
|
-
return /* @__PURE__ */ jsxs("div", { className: "mb-4 flex flex-col items-center", children: [
|
|
83
|
-
/* @__PURE__ */ jsx(Heading, { children: t("register.title", { name: config.name ?? "Mercur" }) }),
|
|
84
|
-
/* @__PURE__ */ jsx(Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t("register.hint") })
|
|
85
|
-
] });
|
|
86
|
-
};
|
|
87
|
-
var RegisterForm = () => {
|
|
88
|
-
const { t } = useTranslation();
|
|
89
|
-
const navigate = useNavigate();
|
|
90
|
-
const [serverError, setServerError] = useState(null);
|
|
91
|
-
const form = useForm({
|
|
92
|
-
resolver: zodResolver(RegisterSchema),
|
|
93
|
-
defaultValues: {
|
|
94
|
-
email: "",
|
|
95
|
-
password: "",
|
|
96
|
-
confirmPassword: ""
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
const { mutateAsync: signUp, isPending } = useSignUpWithEmailPass();
|
|
100
|
-
const handleSubmit = form.handleSubmit(async ({ email, password }) => {
|
|
101
|
-
setServerError(null);
|
|
102
|
-
try {
|
|
103
|
-
await signUp({ email, password });
|
|
104
|
-
navigate("/onboarding", { state: { email } });
|
|
105
|
-
} catch (error) {
|
|
106
|
-
setServerError(
|
|
107
|
-
error?.message || t("register.error")
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
const validationError = form.formState.errors.email?.message || form.formState.errors.password?.message || form.formState.errors.confirmPassword?.message;
|
|
112
|
-
const displayError = validationError || serverError;
|
|
113
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-center", children: [
|
|
114
|
-
/* @__PURE__ */ jsx(Form, { ...form, children: /* @__PURE__ */ jsxs(
|
|
115
|
-
"form",
|
|
116
|
-
{
|
|
117
|
-
onSubmit: handleSubmit,
|
|
118
|
-
className: "flex w-full flex-col gap-y-6",
|
|
119
|
-
children: [
|
|
120
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-2", children: [
|
|
121
|
-
/* @__PURE__ */ jsx(
|
|
122
|
-
Form.Field,
|
|
123
|
-
{
|
|
124
|
-
control: form.control,
|
|
125
|
-
name: "email",
|
|
126
|
-
render: ({ field }) => /* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
127
|
-
Input,
|
|
128
|
-
{
|
|
129
|
-
autoComplete: "email",
|
|
130
|
-
...field,
|
|
131
|
-
className: "bg-ui-bg-field-component",
|
|
132
|
-
placeholder: t("fields.email")
|
|
133
|
-
}
|
|
134
|
-
) }) })
|
|
135
|
-
}
|
|
136
|
-
),
|
|
137
|
-
/* @__PURE__ */ jsx(
|
|
138
|
-
Form.Field,
|
|
139
|
-
{
|
|
140
|
-
control: form.control,
|
|
141
|
-
name: "password",
|
|
142
|
-
render: ({ field }) => /* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
143
|
-
Input,
|
|
144
|
-
{
|
|
145
|
-
type: "password",
|
|
146
|
-
autoComplete: "new-password",
|
|
147
|
-
...field,
|
|
148
|
-
className: "bg-ui-bg-field-component",
|
|
149
|
-
placeholder: t("fields.password")
|
|
150
|
-
}
|
|
151
|
-
) }) })
|
|
152
|
-
}
|
|
153
|
-
),
|
|
154
|
-
/* @__PURE__ */ jsx(
|
|
155
|
-
Form.Field,
|
|
156
|
-
{
|
|
157
|
-
control: form.control,
|
|
158
|
-
name: "confirmPassword",
|
|
159
|
-
render: ({ field }) => /* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
160
|
-
Input,
|
|
161
|
-
{
|
|
162
|
-
type: "password",
|
|
163
|
-
autoComplete: "new-password",
|
|
164
|
-
...field,
|
|
165
|
-
className: "bg-ui-bg-field-component",
|
|
166
|
-
placeholder: t("register.confirmPassword")
|
|
167
|
-
}
|
|
168
|
-
) }) })
|
|
169
|
-
}
|
|
170
|
-
),
|
|
171
|
-
displayError && /* @__PURE__ */ jsx("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsx(Hint, { className: "inline-flex", variant: "error", children: displayError }) })
|
|
172
|
-
] }),
|
|
173
|
-
/* @__PURE__ */ jsx(Button, { className: "w-full", type: "submit", isLoading: isPending, children: t("actions.continue") })
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
) }),
|
|
177
|
-
/* @__PURE__ */ jsx(RegisterFooter, {})
|
|
178
|
-
] });
|
|
179
|
-
};
|
|
180
|
-
var RegisterFooter = () => {
|
|
181
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-center", children: [
|
|
182
|
-
/* @__PURE__ */ jsx("div", { className: "my-6 h-px w-full border-b border-dotted" }),
|
|
183
|
-
/* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted txt-small", children: /* @__PURE__ */ jsx(
|
|
184
|
-
Trans,
|
|
185
|
-
{
|
|
186
|
-
i18nKey: "register.alreadySeller",
|
|
187
|
-
components: [
|
|
188
|
-
/* @__PURE__ */ jsx(
|
|
189
|
-
Link,
|
|
190
|
-
{
|
|
191
|
-
to: "/login",
|
|
192
|
-
className: "txt-small text-ui-fg-base transition-fg hover:text-ui-fg-base-hover focus-visible:text-ui-fg-base-hover font-medium outline-none"
|
|
193
|
-
},
|
|
194
|
-
"login-link"
|
|
195
|
-
)
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
) })
|
|
199
|
-
] });
|
|
200
|
-
};
|
|
201
|
-
var Root = ({ children }) => {
|
|
202
|
-
const { feature_flags, isLoading } = useFeatureFlags();
|
|
203
|
-
if (isLoading) {
|
|
204
|
-
return /* @__PURE__ */ jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsx(Spinner, { className: "text-ui-fg-interactive animate-spin" }) });
|
|
205
|
-
}
|
|
206
|
-
if (!feature_flags?.[import_types.MercurFeatureFlags.SELLER_REGISTRATION]) {
|
|
207
|
-
return /* @__PURE__ */ jsx(Navigate, { to: "/login", replace: true });
|
|
208
|
-
}
|
|
209
|
-
return /* @__PURE__ */ jsx("div", { className: "bg-ui-bg-subtle relative flex min-h-dvh w-dvw items-center justify-center p-4", children: /* @__PURE__ */ jsx("div", { className: "flex w-full max-w-[360px] flex-col items-center", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
210
|
-
/* @__PURE__ */ jsx(RegisterLogo, {}),
|
|
211
|
-
/* @__PURE__ */ jsx(RegisterHeader, {}),
|
|
212
|
-
/* @__PURE__ */ jsx(RegisterForm, {})
|
|
213
|
-
] }) }) });
|
|
214
|
-
};
|
|
215
|
-
var RegisterPage = Object.assign(Root, {
|
|
216
|
-
Logo: RegisterLogo,
|
|
217
|
-
Header: RegisterHeader,
|
|
218
|
-
Form: RegisterForm,
|
|
219
|
-
Footer: RegisterFooter
|
|
220
|
-
});
|
|
221
|
-
export {
|
|
222
|
-
RegisterPage
|
|
223
|
-
};
|