@mercurjs/vendor 2.2.0-canary.11 → 2.2.0-canary.13
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]-EKLRGVBA.js → [id]-ET35KT2M.js} +3 -3
- package/dist/{[id]-A55T2ORL.js → [id]-FALIOGXK.js} +3 -4
- package/dist/{[id]-GC3ZYPK4.js → [id]-GY5R652O.js} +5 -6
- package/dist/{[id]-GBT6VB4S.js → [id]-IGQTT3AM.js} +4 -5
- package/dist/{[id]-SHAJTJNZ.js → [id]-IW2AZE77.js} +5 -6
- package/dist/{[id]-FE5GYYVZ.js → [id]-OTK2NOXT.js} +3 -4
- package/dist/{[id]-U5KZEQDR.js → [id]-PEUI67SP.js} +2 -2
- package/dist/{[id]-T5ECVBPF.js → [id]-RFEYRBLI.js} +4 -5
- package/dist/{[id]-B4YZTANM.js → [id]-US6IULL2.js} +205 -484
- package/dist/{[id]-QOEO3JOV.js → [id]-YZSVSJWU.js} +3 -4
- package/dist/{[id]-QQU5HVFU.js → [id]-ZMLS73X5.js} +4 -5
- package/dist/{[province_id]-6GUA4PV5.js → [province_id]-J3OB2LZ4.js} +5 -6
- package/dist/{add-NTRYWOJF.js → add-XEUXK63F.js} +6 -7
- package/dist/{add-customer-groups-U5RZWW4B.js → add-customer-groups-HZNWWRVG.js} +3 -4
- package/dist/{add-products-Q4MMDQKT.js → add-products-E5GULF6B.js} +4 -5
- package/dist/{add-promotions-3AYXQXTP.js → add-promotions-KW5YZHLS.js} +3 -3
- package/dist/{address-77Y3AOQ3.js → address-6T4H6P7O.js} +3 -4
- package/dist/{breadcrumb-EVZIOB2G.js → breadcrumb-5HYIEPCL.js} +3 -4
- package/dist/{breadcrumb-TNJSGX4T.js → breadcrumb-HL7NKNX4.js} +3 -4
- package/dist/{breadcrumb-THJ2HPRB.js → breadcrumb-L3MFH4I2.js} +9 -8
- package/dist/{breadcrumb-5NP23D6X.js → breadcrumb-LKLWHB63.js} +4 -5
- package/dist/breadcrumb-ZMACILH3.js +28 -0
- package/dist/chunk-4WCPN4OA.js +315 -0
- package/dist/{chunk-LDZCCWJB.js → chunk-5YCDZ4AU.js} +1 -1
- package/dist/{chunk-OYKUQXJX.js → chunk-A6QH53CS.js} +21 -10
- package/dist/{chunk-GN6KB75Z.js → chunk-AQTEEQWX.js} +1 -1
- package/dist/{chunk-K6LOZ4S3.js → chunk-DEJIBIQZ.js} +1 -1
- package/dist/{chunk-4LVP635F.js → chunk-DNEPOMOX.js} +125 -125
- package/dist/{chunk-25E4KME5.js → chunk-J7ZU2HZZ.js} +1 -1
- package/dist/{chunk-OZ44ATGE.js → chunk-KJWVLGXG.js} +2 -2
- package/dist/{chunk-LKUW5SV4.js → chunk-LDX23XPT.js} +1 -1
- package/dist/{chunk-XP23ZVQT.js → chunk-MVYAN2RR.js} +4 -4
- package/dist/{chunk-TBYCZRZ7.js → chunk-R5QZO3QY.js} +14 -5
- package/dist/{chunk-UORPTGV2.js → chunk-SIEEMXNZ.js} +10 -14
- package/dist/chunk-SJT6A4AV.js +354 -0
- package/dist/{chunk-FWS4YJ4B.js → chunk-STWHJLVV.js} +1 -1
- package/dist/{chunk-TYESCFYW.js → chunk-UDOBGAP7.js} +1 -1
- package/dist/{chunk-6K6EQOJF.js → chunk-VAOJVT7R.js} +1 -1
- package/dist/{chunk-VCOQ7WQ2.js → chunk-VMFC2UDJ.js} +1 -1
- package/dist/chunk-XQUF3WIS.js +159 -0
- package/dist/{chunk-7IPCLQ5V.js → chunk-YPTJETJQ.js} +2 -2
- package/dist/{chunk-X4GWB6AT.js → chunk-ZBSFGCWY.js} +2 -2
- package/dist/{chunk-YGJCJBPM.js → chunk-ZPH3WXJ6.js} +1 -1
- package/dist/{collections-URH2TCWJ.js → collections-HO2F62RN.js} +4 -5
- package/dist/{create-FKRYB7ZS.js → create-7EVR4N6N.js} +1 -1
- package/dist/{create-JF2OUZQA.js → create-DB4EYPJ5.js} +3 -4
- package/dist/{create-JGYG5SBM.js → create-EFMCNOR5.js} +6 -7
- package/dist/{create-MS6KKFSV.js → create-FBPPNBLQ.js} +3 -4
- package/dist/{create-ODOFJF5N.js → create-J5OLH7OJ.js} +7 -8
- package/dist/{create-O35JRZEF.js → create-QAEOARJO.js} +4 -5
- package/dist/{create-HVZYJ3YC.js → create-QZBCYHHQ.js} +8 -9
- package/dist/{create-A7B3MLJX.js → create-SLJ2BMH7.js} +5 -6
- package/dist/{create-7R6CZU53.js → create-WBZJFMA7.js} +12 -3
- package/dist/{create-GGACODDN.js → create-WQ5TM5IZ.js} +1 -1
- package/dist/{edit-4G5D7TES.js → edit-3O6WVIMM.js} +5 -6
- package/dist/{edit-VVLITC2E.js → edit-G57GESSR.js} +1 -1
- package/dist/edit-PUZ23M7V.js +102 -0
- package/dist/{edit-G2E5SNGU.js → edit-PVJ3S4TW.js} +3 -4
- package/dist/{edit-2R5QCPTB.js → edit-RJE7L3PH.js} +3 -4
- package/dist/{edit-HTLLYECP.js → edit-TIRMXOLT.js} +6 -7
- package/dist/{edit-5CROKEJE.js → edit-W6WKYNOG.js} +5 -6
- package/dist/{edit-OKU6FMHJ.js → edit-WPX2ANVI.js} +3 -4
- package/dist/{edit-3E4ZO7HT.js → edit-YW4RBDPH.js} +6 -7
- package/dist/edit-price-5ICQPJ42.js +196 -0
- package/dist/edit-stock-KS2NFC2Z.js +229 -0
- package/dist/{fulfillment-76IVZ266.js → fulfillment-ZV2R43N2.js} +3 -4
- package/dist/{fulfillment-providers-G2L6LEVO.js → fulfillment-providers-KKCL25KA.js} +4 -5
- package/dist/index.css +6 -6
- package/dist/index.js +142 -106
- package/dist/{offer-inventory-batch-page-BD6PMDLW.js → inventory-5UNDKYDL.js} +12 -12
- package/dist/{invite-2673PU4I.js → invite-KKIJNMER.js} +6 -7
- package/dist/{invite-HRXZ5YBP.js → invite-P7I5BGOJ.js} +3 -4
- package/dist/loader-UZTTBKYF.js +33 -0
- package/dist/loader-WEJZTX5Q.js +34 -0
- package/dist/{login-TWUBU6I6.js → login-A65IAXSI.js} +4 -5
- package/dist/{media-Z4N5MKFG.js → media-EM3K4AWO.js} +6 -7
- package/dist/{metadata-Q74OJWUD.js → metadata-A5XZKPL4.js} +4 -5
- package/dist/{metadata-D6M66NQK.js → metadata-JFLFWXOS.js} +3 -4
- package/dist/{metadata-YVHJPDLD.js → metadata-SFO3J5O5.js} +3 -4
- package/dist/{metadata-NIDIBXJT.js → metadata-USXOQUIX.js} +3 -4
- package/dist/{metadata-REQIFWWH.js → metadata-WJ4CNB6I.js} +3 -4
- package/dist/{offer-create-page-E4FLSDJQ.js → offer-create-page-3PIJXHWZ.js} +169 -173
- package/dist/offer-detail-page-SPHP3XKC.js +580 -0
- package/dist/{offer-detail-page-6SIBQTLP.js → offer-variant-detail-page-KTHKV6WW.js} +144 -215
- package/dist/offers-GWMIEPCM.js +54 -0
- package/dist/{onboarding-MK2RIFD4.js → onboarding-JOGRNDPI.js} +3 -4
- package/dist/{orders-TVQDR4OJ.js → orders-Q2IKEJIM.js} +4 -5
- package/dist/{organization-XO3T2K2X.js → organization-HRYDC66D.js} +3 -4
- package/dist/pages/index.js +25 -27
- package/dist/{payment-details-CFTX3QDL.js → payment-details-YLPIR52N.js} +3 -4
- package/dist/{pricing-ECXV6K7G.js → pricing-ECJH4VXZ.js} +5 -6
- package/dist/{offer-pricing-edit-page-4TINK42V.js → pricing-EPNQ63NT.js} +15 -13
- package/dist/{product-tags-5O7ZG6SA.js → product-tags-WMC7G3C4.js} +5 -6
- package/dist/{product-variant-detail-PUWOMVHQ.js → product-variant-detail-BQL2NGVE.js} +3 -4
- package/dist/{product-variant-edit-WZNO4CQX.js → product-variant-edit-GACQHD46.js} +9 -20
- package/dist/{products-CPTRYL2Z.js → products-LGQMESEZ.js} +10 -11
- package/dist/{products-BM3IIH5P.js → products-PQ3FG5KC.js} +4 -5
- package/dist/{professional-details-ED4HNYXY.js → professional-details-AASVGTUO.js} +3 -4
- package/dist/{profile-6TGCNNUU.js → profile-ZNQEDSDM.js} +3 -4
- package/dist/{promotions-4336KI7E.js → promotions-MFAFFHF3.js} +4 -4
- package/dist/{register-OZ5CRANZ.js → register-3A6G6QNI.js} +5 -6
- package/dist/{reset-password-5UHZU4D3.js → reset-password-FV5762CA.js} +1 -1
- package/dist/{settings-2GCQQTO6.js → settings-OKNGWUKL.js} +12 -13
- package/dist/{shipment-HWQHMX2L.js → shipment-ZF7IRKKS.js} +3 -4
- package/dist/shipping-HWJPX34K.js +113 -0
- package/dist/{shipping-profile-ZP7M6VSS.js → shipping-profile-3QKTQI6L.js} +2 -6
- package/dist/{shipping-profiles-C5WBXWZ2.js → shipping-profiles-FZCKGCBU.js} +3 -4
- package/dist/{stock-MQA7PRO6.js → stock-FI5WXVWN.js} +4 -5
- package/dist/{store-5ZHZR4JI.js → store-VFRKJYMD.js} +3 -4
- package/dist/{store-closure-H5WHV3LA.js → store-closure-WZIWGESD.js} +3 -4
- package/dist/{store-select-PZS556FB.js → store-select-GKRDFGEY.js} +4 -5
- package/dist/{team-CLKJCZNH.js → team-CXEAYN7O.js} +3 -4
- package/package.json +1 -1
- package/dist/chunk-27KRIXMQ.js +0 -71
- package/dist/chunk-CFRWIQIZ.js +0 -43
- package/dist/chunk-RXV7INUV.js +0 -426
- package/dist/chunk-T6LHVNWO.js +0 -27
- package/dist/loader-VDYPD3RI.js +0 -31
- package/dist/offer-edit-page-3MO566RP.js +0 -151
- package/dist/offers-GVN5LCK6.js +0 -32
- package/dist/{chunk-SPOHNK4X.js → chunk-BPVMJN2D.js} +3 -3
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SectionRow
|
|
3
|
+
} from "./chunk-4TLP3TAA.js";
|
|
4
|
+
import {
|
|
5
|
+
ActionMenu
|
|
6
|
+
} from "./chunk-BDGZ4EQO.js";
|
|
7
|
+
import {
|
|
8
|
+
useDeleteProduct,
|
|
9
|
+
useUpdateProduct
|
|
10
|
+
} from "./chunk-JAUZ73XE.js";
|
|
11
|
+
|
|
12
|
+
// src/pages/products/[id]/_components/product-media-section/product-media-section.tsx
|
|
13
|
+
import { useState } from "react";
|
|
14
|
+
import { PencilSquare, ThumbnailBadge } from "@medusajs/icons";
|
|
15
|
+
import {
|
|
16
|
+
Button,
|
|
17
|
+
Checkbox,
|
|
18
|
+
clx,
|
|
19
|
+
CommandBar,
|
|
20
|
+
Container,
|
|
21
|
+
Heading,
|
|
22
|
+
Text,
|
|
23
|
+
Tooltip,
|
|
24
|
+
usePrompt
|
|
25
|
+
} from "@medusajs/ui";
|
|
26
|
+
import { useTranslation } from "react-i18next";
|
|
27
|
+
import { Link } from "react-router-dom";
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
var ProductMediaSection = ({
|
|
30
|
+
product,
|
|
31
|
+
readOnly = false
|
|
32
|
+
}) => {
|
|
33
|
+
const { t } = useTranslation();
|
|
34
|
+
const prompt = usePrompt();
|
|
35
|
+
const [selection, setSelection] = useState({});
|
|
36
|
+
const media = getMedia(product);
|
|
37
|
+
const handleCheckedChange = (id) => {
|
|
38
|
+
setSelection((prev) => {
|
|
39
|
+
if (prev[id]) {
|
|
40
|
+
const { [id]: _, ...rest } = prev;
|
|
41
|
+
return rest;
|
|
42
|
+
} else {
|
|
43
|
+
return { ...prev, [id]: true };
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const { mutateAsync } = useUpdateProduct(product.id);
|
|
48
|
+
const handleDelete = async () => {
|
|
49
|
+
const ids = Object.keys(selection);
|
|
50
|
+
const includingThumbnail = ids.some((id) => media.find((m) => m.id === id)?.isThumbnail);
|
|
51
|
+
const res = await prompt({
|
|
52
|
+
title: t("general.areYouSure"),
|
|
53
|
+
description: includingThumbnail ? t("products.media.deleteWarningWithThumbnail", {
|
|
54
|
+
count: ids.length
|
|
55
|
+
}) : t("products.media.deleteWarning", {
|
|
56
|
+
count: ids.length
|
|
57
|
+
}),
|
|
58
|
+
confirmText: t("actions.delete"),
|
|
59
|
+
cancelText: t("actions.cancel")
|
|
60
|
+
});
|
|
61
|
+
if (!res) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const mediaToKeep = product.images?.filter((i) => !ids.includes(i.id)).map((i) => ({ url: i.url }));
|
|
65
|
+
await mutateAsync(
|
|
66
|
+
{
|
|
67
|
+
images: mediaToKeep,
|
|
68
|
+
thumbnail: includingThumbnail ? "" : void 0
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
onSuccess: () => {
|
|
72
|
+
setSelection({});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Heading, { level: "h2", children: t("products.media.label") }),
|
|
80
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
81
|
+
ActionMenu,
|
|
82
|
+
{
|
|
83
|
+
groups: [
|
|
84
|
+
{
|
|
85
|
+
actions: [
|
|
86
|
+
{
|
|
87
|
+
label: t("actions.edit"),
|
|
88
|
+
to: "media?view=edit",
|
|
89
|
+
icon: /* @__PURE__ */ jsx(PencilSquare, {})
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] }),
|
|
97
|
+
media.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-4 px-6 py-4", children: media.map((i, index) => {
|
|
98
|
+
const isSelected = selection[i.id];
|
|
99
|
+
return /* @__PURE__ */ jsxs(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: clx(
|
|
103
|
+
"group relative aspect-square size-full overflow-hidden rounded-[8px] shadow-elevation-card-rest transition-fg",
|
|
104
|
+
{ "cursor-pointer hover:shadow-elevation-card-hover": !readOnly }
|
|
105
|
+
),
|
|
106
|
+
children: [
|
|
107
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: clx(
|
|
111
|
+
"invisible absolute right-2 top-2 opacity-0 transition-fg group-hover:visible group-hover:opacity-100",
|
|
112
|
+
{
|
|
113
|
+
"visible opacity-100": isSelected
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
children: /* @__PURE__ */ jsx(
|
|
117
|
+
Checkbox,
|
|
118
|
+
{
|
|
119
|
+
checked: selection[i.id] || false,
|
|
120
|
+
onCheckedChange: () => handleCheckedChange(i.id)
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
i.isThumbnail && /* @__PURE__ */ jsx("div", { className: "absolute left-2 top-2", children: /* @__PURE__ */ jsx(Tooltip, { content: t("fields.thumbnail"), children: /* @__PURE__ */ jsx(ThumbnailBadge, {}) }) }),
|
|
126
|
+
readOnly ? /* @__PURE__ */ jsx(
|
|
127
|
+
"img",
|
|
128
|
+
{
|
|
129
|
+
src: i.url,
|
|
130
|
+
alt: product.title,
|
|
131
|
+
className: "size-full object-cover"
|
|
132
|
+
}
|
|
133
|
+
) : /* @__PURE__ */ jsx(Link, { to: `media`, state: { curr: index }, children: /* @__PURE__ */ jsx(
|
|
134
|
+
"img",
|
|
135
|
+
{
|
|
136
|
+
src: i.url,
|
|
137
|
+
alt: product.title,
|
|
138
|
+
className: "size-full object-cover"
|
|
139
|
+
}
|
|
140
|
+
) })
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
i.id
|
|
144
|
+
);
|
|
145
|
+
}) }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-y-4 pb-8 pt-6", children: [
|
|
146
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
Text,
|
|
149
|
+
{
|
|
150
|
+
size: "small",
|
|
151
|
+
leading: "compact",
|
|
152
|
+
weight: "plus",
|
|
153
|
+
className: "text-ui-fg-subtle",
|
|
154
|
+
children: t("products.media.emptyState.header")
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ jsx(
|
|
158
|
+
Text,
|
|
159
|
+
{
|
|
160
|
+
size: "small",
|
|
161
|
+
className: "text-ui-fg-muted",
|
|
162
|
+
children: t("products.media.emptyState.description")
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] }),
|
|
166
|
+
!readOnly && /* @__PURE__ */ jsx(
|
|
167
|
+
Button,
|
|
168
|
+
{
|
|
169
|
+
size: "small",
|
|
170
|
+
variant: "secondary",
|
|
171
|
+
asChild: true,
|
|
172
|
+
children: /* @__PURE__ */ jsx(Link, { to: "media?view=edit", children: t("products.media.emptyState.action") })
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] }),
|
|
176
|
+
!readOnly && /* @__PURE__ */ jsx(CommandBar, { open: !!Object.keys(selection).length, children: /* @__PURE__ */ jsxs(CommandBar.Bar, { children: [
|
|
177
|
+
/* @__PURE__ */ jsx(CommandBar.Value, { children: t("general.countSelected", {
|
|
178
|
+
count: Object.keys(selection).length
|
|
179
|
+
}) }),
|
|
180
|
+
/* @__PURE__ */ jsx(CommandBar.Seperator, {}),
|
|
181
|
+
/* @__PURE__ */ jsx(
|
|
182
|
+
CommandBar.Command,
|
|
183
|
+
{
|
|
184
|
+
action: handleDelete,
|
|
185
|
+
label: t("actions.delete"),
|
|
186
|
+
shortcut: "d"
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
] }) })
|
|
190
|
+
] });
|
|
191
|
+
};
|
|
192
|
+
var getMedia = (product) => {
|
|
193
|
+
const { images = [], thumbnail } = product;
|
|
194
|
+
const media = (images || []).map((image) => ({
|
|
195
|
+
id: image.id,
|
|
196
|
+
url: image.url,
|
|
197
|
+
isThumbnail: image.url === thumbnail
|
|
198
|
+
}));
|
|
199
|
+
if (thumbnail && !media.some((mediaItem) => mediaItem.url === thumbnail)) {
|
|
200
|
+
media.unshift({
|
|
201
|
+
id: "img_thumbnail",
|
|
202
|
+
url: thumbnail,
|
|
203
|
+
isThumbnail: true
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return media;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
// src/pages/products/[id]/_components/product-general-section/product-general-section.tsx
|
|
210
|
+
import { PencilSquare as PencilSquare2, Trash } from "@medusajs/icons";
|
|
211
|
+
import { Container as Container2, Heading as Heading2, StatusBadge, usePrompt as usePrompt2 } from "@medusajs/ui";
|
|
212
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
213
|
+
import { useNavigate } from "react-router-dom";
|
|
214
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
215
|
+
var productStatusColor = (status) => {
|
|
216
|
+
switch (status) {
|
|
217
|
+
case "draft":
|
|
218
|
+
return "grey";
|
|
219
|
+
case "proposed":
|
|
220
|
+
return "orange";
|
|
221
|
+
case "published":
|
|
222
|
+
return "green";
|
|
223
|
+
case "rejected":
|
|
224
|
+
return "red";
|
|
225
|
+
default:
|
|
226
|
+
return "grey";
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
var ProductGeneralSection = ({
|
|
230
|
+
product
|
|
231
|
+
}) => {
|
|
232
|
+
const { t } = useTranslation2();
|
|
233
|
+
const prompt = usePrompt2();
|
|
234
|
+
const navigate = useNavigate();
|
|
235
|
+
const { mutateAsync } = useDeleteProduct(product.id);
|
|
236
|
+
const handleDelete = async () => {
|
|
237
|
+
const res = await prompt({
|
|
238
|
+
title: t("general.areYouSure"),
|
|
239
|
+
description: t("products.deleteWarning", {
|
|
240
|
+
title: product.title
|
|
241
|
+
}),
|
|
242
|
+
confirmText: t("actions.delete"),
|
|
243
|
+
cancelText: t("actions.cancel")
|
|
244
|
+
});
|
|
245
|
+
if (!res) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
await mutateAsync(void 0, {
|
|
249
|
+
onSuccess: () => {
|
|
250
|
+
navigate("..");
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
|
|
255
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
256
|
+
/* @__PURE__ */ jsx2(Heading2, { children: product.title }),
|
|
257
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-4", children: [
|
|
258
|
+
/* @__PURE__ */ jsx2(StatusBadge, { color: productStatusColor(product.status), children: t(`products.productStatus.${product.status}`) }),
|
|
259
|
+
/* @__PURE__ */ jsx2(
|
|
260
|
+
ActionMenu,
|
|
261
|
+
{
|
|
262
|
+
groups: [
|
|
263
|
+
{
|
|
264
|
+
actions: [
|
|
265
|
+
{
|
|
266
|
+
label: t("actions.edit"),
|
|
267
|
+
to: "edit",
|
|
268
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare2, {})
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
actions: [
|
|
274
|
+
{
|
|
275
|
+
label: t("actions.delete"),
|
|
276
|
+
onClick: handleDelete,
|
|
277
|
+
icon: /* @__PURE__ */ jsx2(Trash, {})
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
)
|
|
284
|
+
] })
|
|
285
|
+
] }),
|
|
286
|
+
/* @__PURE__ */ jsx2(
|
|
287
|
+
SectionRow,
|
|
288
|
+
{
|
|
289
|
+
title: t("fields.description"),
|
|
290
|
+
value: product.description || "-"
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
/* @__PURE__ */ jsx2(
|
|
294
|
+
SectionRow,
|
|
295
|
+
{
|
|
296
|
+
title: t("fields.subtitle"),
|
|
297
|
+
value: product.subtitle || "-"
|
|
298
|
+
}
|
|
299
|
+
),
|
|
300
|
+
/* @__PURE__ */ jsx2(SectionRow, { title: t("fields.handle"), value: `/${product.handle}` }),
|
|
301
|
+
/* @__PURE__ */ jsx2(
|
|
302
|
+
SectionRow,
|
|
303
|
+
{
|
|
304
|
+
title: t("fields.discountable"),
|
|
305
|
+
value: product.discountable ? t("general.true") : t("general.false")
|
|
306
|
+
}
|
|
307
|
+
)
|
|
308
|
+
] });
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export {
|
|
312
|
+
productStatusColor,
|
|
313
|
+
ProductGeneralSection,
|
|
314
|
+
ProductMediaSection
|
|
315
|
+
};
|
|
@@ -9258,7 +9258,7 @@ var en_default = {
|
|
|
9258
9258
|
header: "Edit Product",
|
|
9259
9259
|
description: "Edit the product details.",
|
|
9260
9260
|
successToast: "Product {{title}} was successfully updated.",
|
|
9261
|
-
requestSuccessToast: "Product update
|
|
9261
|
+
requestSuccessToast: "Product update was successfully requested. Once confirmed by the Admin, changes will appear on the storefront.",
|
|
9262
9262
|
duplicateRequestErrorToast: "You already have an active request. You can only have one at a time.",
|
|
9263
9263
|
attributes: {
|
|
9264
9264
|
addAttribute: "Add Attribute",
|
|
@@ -9285,7 +9285,7 @@ var en_default = {
|
|
|
9285
9285
|
cancelDescription: "Are you sure you want to cancel this product update request? This action cannot be undone."
|
|
9286
9286
|
},
|
|
9287
9287
|
toast: {
|
|
9288
|
-
canceledSuccessfully: "Product update request canceled"
|
|
9288
|
+
canceledSuccessfully: "Product update request was successfully canceled."
|
|
9289
9289
|
}
|
|
9290
9290
|
},
|
|
9291
9291
|
create: {
|
|
@@ -9634,9 +9634,14 @@ var en_default = {
|
|
|
9634
9634
|
}
|
|
9635
9635
|
},
|
|
9636
9636
|
variant: {
|
|
9637
|
+
validation: {
|
|
9638
|
+
titleRequired: "Please enter a title",
|
|
9639
|
+
optionRequired: "Please select a value"
|
|
9640
|
+
},
|
|
9637
9641
|
edit: {
|
|
9638
9642
|
header: "Edit Variant",
|
|
9639
|
-
success: "Product variant edited successfully"
|
|
9643
|
+
success: "Product variant edited successfully",
|
|
9644
|
+
attributesTooltip: "These are default values used to describe the item. They are not defined by Marketplace."
|
|
9640
9645
|
},
|
|
9641
9646
|
create: {
|
|
9642
9647
|
header: "Variant details"
|
|
@@ -9677,7 +9682,7 @@ var en_default = {
|
|
|
9677
9682
|
edit: {
|
|
9678
9683
|
header: "Shipping Configuration",
|
|
9679
9684
|
toasts: {
|
|
9680
|
-
success: "
|
|
9685
|
+
success: "Shipping configuration was successfully updated."
|
|
9681
9686
|
}
|
|
9682
9687
|
},
|
|
9683
9688
|
create: {
|
|
@@ -9866,20 +9871,24 @@ var en_default = {
|
|
|
9866
9871
|
subtitle: "Manage your catalog listings",
|
|
9867
9872
|
create: {
|
|
9868
9873
|
header: "Create offer",
|
|
9869
|
-
successToast: "Offer
|
|
9874
|
+
successToast: "Offer was successfully published. Only offers with stock levels and prices set will be visible on the storefront.",
|
|
9870
9875
|
publish: "Publish",
|
|
9876
|
+
tipLabel: "Tip:",
|
|
9871
9877
|
tip: "Select all relevant products that match your inventory, then easily create offers for them by simply adding your stock levels and prices.",
|
|
9872
9878
|
addPrice: "Add price",
|
|
9873
9879
|
addInventoryItem: "Add inventory item",
|
|
9874
9880
|
stockLevelsWarning: "Offers created, but some stock levels could not be saved: {{message}}",
|
|
9875
9881
|
tabs: {
|
|
9876
|
-
catalogue: "
|
|
9882
|
+
catalogue: "Products",
|
|
9877
9883
|
stockLevelsAndPrices: "Stock Levels & Prices"
|
|
9878
9884
|
}
|
|
9879
9885
|
},
|
|
9880
9886
|
detail: {
|
|
9881
9887
|
offerLabel: "Offer",
|
|
9882
9888
|
productVariant: "Product Variant",
|
|
9889
|
+
offerVariant: "Offer Variant",
|
|
9890
|
+
associatedProduct: "Associated product",
|
|
9891
|
+
shippingConfiguration: "Shipping Configuration",
|
|
9883
9892
|
inventoryItems: "Inventory items",
|
|
9884
9893
|
manageKit: "Manage inventory kit",
|
|
9885
9894
|
noInventoryItems: "No inventory items attached. Open the inventory drawer to attach one.",
|
|
@@ -9893,18 +9902,18 @@ var en_default = {
|
|
|
9893
9902
|
pricing: {
|
|
9894
9903
|
header: "Manage prices",
|
|
9895
9904
|
description: "Add, change, or remove prices on this offer's ladder.",
|
|
9896
|
-
successToast: "Prices updated",
|
|
9905
|
+
successToast: "Prices were successfully updated.",
|
|
9897
9906
|
empty: "No prices configured"
|
|
9898
9907
|
},
|
|
9899
9908
|
inventory: {
|
|
9900
9909
|
header: "Manage inventory items",
|
|
9901
9910
|
description: "Attach, detach, or change the required quantity per item.",
|
|
9902
|
-
successToast: "
|
|
9911
|
+
successToast: "Stock levels were successfully updated.",
|
|
9903
9912
|
empty: "No inventory items attached"
|
|
9904
9913
|
},
|
|
9905
9914
|
delete: {
|
|
9906
9915
|
description: "You are about to delete offer {{sku}}. This cannot be undone.",
|
|
9907
|
-
successToast: "Offer deleted"
|
|
9916
|
+
successToast: "Offer was successfully deleted."
|
|
9908
9917
|
},
|
|
9909
9918
|
bulkDelete: {
|
|
9910
9919
|
description_one: "You are about to delete {{count}} offer. This cannot be undone.",
|
|
@@ -9917,12 +9926,14 @@ var en_default = {
|
|
|
9917
9926
|
create: "Create",
|
|
9918
9927
|
manage_prices: "Manage prices",
|
|
9919
9928
|
manage_inventory: "Manage inventory",
|
|
9929
|
+
edit_prices: "Edit prices",
|
|
9930
|
+
edit_stock_levels: "Edit stock levels",
|
|
9920
9931
|
bulkDelete: "Delete selected"
|
|
9921
9932
|
},
|
|
9922
9933
|
fields: {
|
|
9923
9934
|
sku: "SKU",
|
|
9924
9935
|
variant: "Master variant",
|
|
9925
|
-
shippingProfile: "Shipping
|
|
9936
|
+
shippingProfile: "Shipping Profile",
|
|
9926
9937
|
ean: "EAN",
|
|
9927
9938
|
upc: "UPC",
|
|
9928
9939
|
requiredQuantity: "Required quantity",
|