@mercurjs/vendor 2.2.0-canary.12 → 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]-Q4HX3TQU.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]-WDBUNEJB.js → [id]-PEUI67SP.js} +2 -2
- package/dist/{[id]-T5ECVBPF.js → [id]-RFEYRBLI.js} +4 -5
- package/dist/{[id]-OWENEUQB.js → [id]-US6IULL2.js} +147 -441
- 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-DH5CD5AT.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-23LX6FBE.js → chunk-5YCDZ4AU.js} +1 -1
- package/dist/{chunk-N77NE6O7.js → chunk-A6QH53CS.js} +8 -2
- package/dist/{chunk-TM76WRG2.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-CBRAKSMA.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-55OUOPNF.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-2UXFGPKI.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-7DBAV3KH.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-XEQZ6CLI.js → create-QZBCYHHQ.js} +8 -9
- package/dist/{create-A7B3MLJX.js → create-SLJ2BMH7.js} +5 -6
- package/dist/{create-GGACODDN.js → create-WQ5TM5IZ.js} +1 -1
- package/dist/{edit-2AAEQJEM.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 -3
- package/dist/index.js +138 -102
- 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-LVQQTWOJ.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/{products-6XWNKRLZ.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-ACIFBWUH.js → promotions-MFAFFHF3.js} +4 -4
- package/dist/{register-4AQP5DC3.js → register-3A6G6QNI.js} +5 -6
- package/dist/{reset-password-VSAY3YQX.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-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
|
+
};
|
|
@@ -9873,18 +9873,22 @@ var en_default = {
|
|
|
9873
9873
|
header: "Create offer",
|
|
9874
9874
|
successToast: "Offer was successfully published. Only offers with stock levels and prices set will be visible on the storefront.",
|
|
9875
9875
|
publish: "Publish",
|
|
9876
|
+
tipLabel: "Tip:",
|
|
9876
9877
|
tip: "Select all relevant products that match your inventory, then easily create offers for them by simply adding your stock levels and prices.",
|
|
9877
9878
|
addPrice: "Add price",
|
|
9878
9879
|
addInventoryItem: "Add inventory item",
|
|
9879
9880
|
stockLevelsWarning: "Offers created, but some stock levels could not be saved: {{message}}",
|
|
9880
9881
|
tabs: {
|
|
9881
|
-
catalogue: "
|
|
9882
|
+
catalogue: "Products",
|
|
9882
9883
|
stockLevelsAndPrices: "Stock Levels & Prices"
|
|
9883
9884
|
}
|
|
9884
9885
|
},
|
|
9885
9886
|
detail: {
|
|
9886
9887
|
offerLabel: "Offer",
|
|
9887
9888
|
productVariant: "Product Variant",
|
|
9889
|
+
offerVariant: "Offer Variant",
|
|
9890
|
+
associatedProduct: "Associated product",
|
|
9891
|
+
shippingConfiguration: "Shipping Configuration",
|
|
9888
9892
|
inventoryItems: "Inventory items",
|
|
9889
9893
|
manageKit: "Manage inventory kit",
|
|
9890
9894
|
noInventoryItems: "No inventory items attached. Open the inventory drawer to attach one.",
|
|
@@ -9922,12 +9926,14 @@ var en_default = {
|
|
|
9922
9926
|
create: "Create",
|
|
9923
9927
|
manage_prices: "Manage prices",
|
|
9924
9928
|
manage_inventory: "Manage inventory",
|
|
9929
|
+
edit_prices: "Edit prices",
|
|
9930
|
+
edit_stock_levels: "Edit stock levels",
|
|
9925
9931
|
bulkDelete: "Delete selected"
|
|
9926
9932
|
},
|
|
9927
9933
|
fields: {
|
|
9928
9934
|
sku: "SKU",
|
|
9929
9935
|
variant: "Master variant",
|
|
9930
|
-
shippingProfile: "Shipping
|
|
9936
|
+
shippingProfile: "Shipping Profile",
|
|
9931
9937
|
ean: "EAN",
|
|
9932
9938
|
upc: "UPC",
|
|
9933
9939
|
requiredQuantity: "Required quantity",
|