@nextblock-cms/ecom 0.16.2 → 0.16.4
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/lib/pages/cms/products/ProductsPage.cjs.js +1 -1
- package/lib/pages/cms/products/ProductsPage.es.js +66 -45
- package/lib/pages/cms/products/actions.d.ts +2 -0
- package/lib/pages/cms/products/components/ProductForm.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductForm.d.ts +7 -1
- package/lib/pages/cms/products/components/ProductForm.es.js +343 -336
- package/lib/pages/cms/products/components/ProductsBulkTable.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductsBulkTable.d.ts +1 -0
- package/lib/pages/cms/products/components/ProductsBulkTable.es.js +346 -194
- package/lib/product-actions.cjs.js +3 -3
- package/lib/product-actions.d.ts +2 -0
- package/lib/product-actions.es.js +1 -1
- package/package.json +4 -4
|
@@ -1,70 +1,70 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxDEV as e, Fragment as
|
|
3
|
-
import
|
|
4
|
-
import { zodResolver as
|
|
5
|
-
import { AlertCircle as
|
|
6
|
-
import { Select as
|
|
7
|
-
import { productSchema as
|
|
8
|
-
import { useForm as
|
|
9
|
-
import { ProductMediaManager as
|
|
10
|
-
import { SyncFreemiusPricingButton as
|
|
11
|
-
import { VariationsEditor as
|
|
12
|
-
import { CurrencyPriceFields as
|
|
13
|
-
import { SaleScheduleFields as
|
|
14
|
-
import { ProductCategorySelector as
|
|
15
|
-
import { getStoreManagedPriceCurrencyCodes as
|
|
16
|
-
import { derivePaymentProviderFromProductType as
|
|
17
|
-
import { convertMinorUnitAmount as
|
|
18
|
-
import { majorUnitAmountToMinor as
|
|
19
|
-
function
|
|
2
|
+
import { jsxDEV as e, Fragment as De } from "react/jsx-dev-runtime";
|
|
3
|
+
import R, { useState as S, useRef as we, useEffect as P, useCallback as B } from "react";
|
|
4
|
+
import { zodResolver as Ge } from "@hookform/resolvers/zod";
|
|
5
|
+
import { AlertCircle as Se, CheckCircle2 as es, Info as ss } from "lucide-react";
|
|
6
|
+
import { Select as os, SelectTrigger as rs, SelectValue as ts, SelectContent as cs, SelectItem as Ce, Badge as E, Label as k, Input as x, Button as Me } from "@nextblock-cms/ui";
|
|
7
|
+
import { productSchema as is } from "../../../../product-schema.es.js";
|
|
8
|
+
import { useForm as ms } from "react-hook-form";
|
|
9
|
+
import { ProductMediaManager as ls } from "./ProductMediaManager.es.js";
|
|
10
|
+
import { SyncFreemiusPricingButton as ns } from "./SyncFreemiusPricingButton.es.js";
|
|
11
|
+
import { VariationsEditor as ds } from "./VariationsEditor.es.js";
|
|
12
|
+
import { CurrencyPriceFields as Ve } from "./CurrencyPriceFields.es.js";
|
|
13
|
+
import { SaleScheduleFields as Te } from "./SaleScheduleFields.es.js";
|
|
14
|
+
import { ProductCategorySelector as us } from "./ProductCategorySelector.es.js";
|
|
15
|
+
import { getStoreManagedPriceCurrencyCodes as as, resolveEditorCurrencyPriceMaps as ps, sanitizeProductFormValuesForStoreManagedCurrencies as Ue } from "../product-price-sync.es.js";
|
|
16
|
+
import { derivePaymentProviderFromProductType as bs } from "../../../../types.es.js";
|
|
17
|
+
import { convertMinorUnitAmount as Ae } from "../../../../currency.es.js";
|
|
18
|
+
import { majorUnitAmountToMinor as Ie, minorUnitAmountToMajor as Re } from "@nextblock-cms/utils";
|
|
19
|
+
function K({ title: s, description: r, action: h, children: u, hideHeader: W }) {
|
|
20
20
|
return /* @__PURE__ */ e("section", { className: "rounded-lg border bg-card p-3 shadow-sm space-y-3", children: [
|
|
21
21
|
!W && /* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-4 flex-wrap border-b border-muted/50 pb-2 mb-1", children: [
|
|
22
22
|
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: [
|
|
23
23
|
/* @__PURE__ */ e("h2", { className: "text-sm font-bold tracking-tight", children: s }, void 0, !1, {
|
|
24
24
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
25
|
-
lineNumber:
|
|
25
|
+
lineNumber: 127,
|
|
26
26
|
columnNumber: 13
|
|
27
27
|
}, this),
|
|
28
28
|
r ? /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground leading-none", children: r }, void 0, !1, {
|
|
29
29
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
30
|
-
lineNumber:
|
|
30
|
+
lineNumber: 129,
|
|
31
31
|
columnNumber: 15
|
|
32
32
|
}, this) : null
|
|
33
33
|
] }, void 0, !0, {
|
|
34
34
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
35
|
-
lineNumber:
|
|
35
|
+
lineNumber: 126,
|
|
36
36
|
columnNumber: 11
|
|
37
37
|
}, this),
|
|
38
38
|
h
|
|
39
39
|
] }, void 0, !0, {
|
|
40
40
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
41
|
-
lineNumber:
|
|
41
|
+
lineNumber: 125,
|
|
42
42
|
columnNumber: 9
|
|
43
43
|
}, this),
|
|
44
44
|
/* @__PURE__ */ e("div", { className: W ? "" : "pt-1", children: u }, void 0, !1, {
|
|
45
45
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
46
|
-
lineNumber:
|
|
46
|
+
lineNumber: 135,
|
|
47
47
|
columnNumber: 7
|
|
48
48
|
}, this)
|
|
49
49
|
] }, void 0, !0, {
|
|
50
50
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
51
|
-
lineNumber:
|
|
51
|
+
lineNumber: 123,
|
|
52
52
|
columnNumber: 5
|
|
53
53
|
}, this);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ns(s, r, h) {
|
|
56
56
|
const u = r ? Number.parseInt(r, 10) : void 0;
|
|
57
57
|
return s?.language_id || (Number.isFinite(u) ? u : void 0) || h.find((W) => W.is_default)?.id || h[0]?.id || 1;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function je(s, r, h, u, W) {
|
|
60
60
|
const C = (u.find((g) => g.is_default) ?? u[0])?.code || "USD", A = s?.prices && Object.keys(s.prices).length > 0 ? s.prices : {
|
|
61
61
|
[C]: typeof s?.price == "number" ? s.price / 100 : 0
|
|
62
|
-
},
|
|
62
|
+
}, j = s?.sale_prices && Object.keys(s.sale_prices).length > 0 ? s.sale_prices : typeof s?.sale_price == "number" ? {
|
|
63
63
|
[C]: s.sale_price / 100
|
|
64
|
-
} : {},
|
|
64
|
+
} : {}, O = s?.product_type || "", M = s?.payment_provider || (s?.product_type ? bs(s.product_type) : "stripe");
|
|
65
65
|
return {
|
|
66
|
-
...
|
|
67
|
-
product_type:
|
|
66
|
+
...Ue({
|
|
67
|
+
product_type: O || "physical",
|
|
68
68
|
payment_provider: M,
|
|
69
69
|
title: s?.title || "",
|
|
70
70
|
slug: s?.slug || "",
|
|
@@ -74,7 +74,7 @@ function Ae(s, r, h, u, W) {
|
|
|
74
74
|
price: typeof s?.price == "number" ? s.price / 100 : 0,
|
|
75
75
|
prices: A,
|
|
76
76
|
sale_price: typeof s?.sale_price == "number" ? s.sale_price / 100 : null,
|
|
77
|
-
sale_prices:
|
|
77
|
+
sale_prices: j,
|
|
78
78
|
stock: s?.stock || 0,
|
|
79
79
|
meta_title: s?.meta_title || "",
|
|
80
80
|
meta_description: s?.meta_description || "",
|
|
@@ -89,7 +89,7 @@ function Ae(s, r, h, u, W) {
|
|
|
89
89
|
trial_period_days: s?.trial_period_days ?? 0,
|
|
90
90
|
trial_requires_payment_method: s?.trial_requires_payment_method ?? !1,
|
|
91
91
|
status: s?.status || "draft",
|
|
92
|
-
language_id:
|
|
92
|
+
language_id: Ns(
|
|
93
93
|
s,
|
|
94
94
|
r,
|
|
95
95
|
h
|
|
@@ -106,11 +106,11 @@ function Ae(s, r, h, u, W) {
|
|
|
106
106
|
sale_prices: g.sale_prices || {}
|
|
107
107
|
})) || []
|
|
108
108
|
}, u),
|
|
109
|
-
product_type:
|
|
109
|
+
product_type: O,
|
|
110
110
|
payment_provider: M
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Oe(s) {
|
|
114
114
|
return s ? s.map((r) => ({
|
|
115
115
|
id: r.id || r.media_id,
|
|
116
116
|
media_id: r.media_id,
|
|
@@ -119,46 +119,47 @@ function Te(s) {
|
|
|
119
119
|
sort_order: r.sort_order ?? 0
|
|
120
120
|
})).sort((r, h) => r.sort_order - h.sort_order) : [];
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function fs(s) {
|
|
123
123
|
return s.map((r) => ({ media_id: r.media_id }));
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function xs(s) {
|
|
126
126
|
return s.map((r) => ({
|
|
127
127
|
media_id: r.media_id,
|
|
128
128
|
file_path: r.file_path,
|
|
129
129
|
alt: r.alt
|
|
130
130
|
}));
|
|
131
131
|
}
|
|
132
|
-
const
|
|
133
|
-
function
|
|
132
|
+
const hs = (s) => s.toString().toLowerCase().trim().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
|
|
133
|
+
function Rs({
|
|
134
134
|
initialData: s,
|
|
135
135
|
isEdit: r = !1,
|
|
136
136
|
mediaPickerNode: h,
|
|
137
137
|
availableLanguagesProp: u,
|
|
138
138
|
globalAttributesProp: W,
|
|
139
|
-
currenciesProp:
|
|
139
|
+
currenciesProp: $,
|
|
140
140
|
translationGroupId: C,
|
|
141
141
|
targetLanguageId: A,
|
|
142
|
-
freemiusDashboardNode:
|
|
143
|
-
enabledProviders:
|
|
142
|
+
freemiusDashboardNode: j,
|
|
143
|
+
enabledProviders: O,
|
|
144
144
|
configStatus: M,
|
|
145
|
-
createAction:
|
|
145
|
+
createAction: H,
|
|
146
146
|
updateAction: g,
|
|
147
|
-
availableCategoriesProp:
|
|
148
|
-
hasOpenDraft:
|
|
147
|
+
availableCategoriesProp: qe = [],
|
|
148
|
+
hasOpenDraft: ze = !1,
|
|
149
|
+
onSeoChange: te
|
|
149
150
|
}) {
|
|
150
|
-
const [
|
|
151
|
-
() =>
|
|
152
|
-
[
|
|
153
|
-
), i =
|
|
151
|
+
const [U, J] = S(!1), [L, X] = S(() => !!s?.variants?.length), n = R.useMemo(
|
|
152
|
+
() => $.filter((o) => o.is_active !== !1).sort((o, c) => o.is_default !== c.is_default ? o.is_default ? -1 : 1 : o.code.localeCompare(c.code)),
|
|
153
|
+
[$]
|
|
154
|
+
), i = R.useMemo(
|
|
154
155
|
() => n.find((o) => o.is_default) ?? n[0],
|
|
155
156
|
[n]
|
|
156
|
-
),
|
|
157
|
-
() =>
|
|
157
|
+
), q = R.useMemo(
|
|
158
|
+
() => as(n),
|
|
158
159
|
[n]
|
|
159
|
-
),
|
|
160
|
-
resolver:
|
|
161
|
-
defaultValues:
|
|
160
|
+
), ce = ms({
|
|
161
|
+
resolver: Ge(is),
|
|
162
|
+
defaultValues: je(
|
|
162
163
|
s,
|
|
163
164
|
A,
|
|
164
165
|
u,
|
|
@@ -167,37 +168,43 @@ function Vs({
|
|
|
167
168
|
)
|
|
168
169
|
}), {
|
|
169
170
|
register: m,
|
|
170
|
-
handleSubmit:
|
|
171
|
+
handleSubmit: Y,
|
|
171
172
|
setValue: t,
|
|
172
|
-
reset:
|
|
173
|
+
reset: ie,
|
|
173
174
|
watch: l,
|
|
174
|
-
setError:
|
|
175
|
-
formState: { errors: a, dirtyFields:
|
|
176
|
-
} =
|
|
177
|
-
|
|
175
|
+
setError: Q,
|
|
176
|
+
formState: { errors: a, dirtyFields: me }
|
|
177
|
+
} = ce, le = we(!0), Z = we(null), [Be, G] = S(!1), [ne, ee] = S(null), [de, Ee] = S(null), V = l(), ue = ce.formState.isDirty, ae = V.title, pe = V.meta_title, be = V.meta_description;
|
|
178
|
+
P(() => {
|
|
179
|
+
te?.({
|
|
180
|
+
title: ae,
|
|
181
|
+
meta_title: pe,
|
|
182
|
+
meta_description: be
|
|
183
|
+
});
|
|
184
|
+
}, [ae, pe, be, te]), P(() => {
|
|
178
185
|
if (!r) return;
|
|
179
|
-
if (
|
|
180
|
-
|
|
186
|
+
if (le.current) {
|
|
187
|
+
le.current = !1, Z.current = JSON.stringify(V);
|
|
181
188
|
return;
|
|
182
189
|
}
|
|
183
|
-
if (!
|
|
184
|
-
const o = JSON.stringify(
|
|
185
|
-
if (o ===
|
|
190
|
+
if (!ue) return;
|
|
191
|
+
const o = JSON.stringify(V);
|
|
192
|
+
if (o === Z.current) return;
|
|
186
193
|
const c = setTimeout(() => {
|
|
187
|
-
|
|
194
|
+
U || (Z.current = o, Y(We)());
|
|
188
195
|
}, 400);
|
|
189
196
|
return () => clearTimeout(c);
|
|
190
|
-
}, [
|
|
191
|
-
const
|
|
192
|
-
() =>
|
|
197
|
+
}, [V, r, ue, U, Y]);
|
|
198
|
+
const Ne = l("title"), I = l("product_type"), p = I === "digital" ? "freemius" : I === "physical" ? "stripe" : void 0, v = I === "physical", fe = I === "digital", xe = p ? O[p] : !1, he = p ? M[p].hasKeys : !1, Ke = !!l("freemius_product_id"), ge = Number(l("trial_period_days") || 0), ve = !!l("trial_requires_payment_method"), $e = l("variants") || [], D = l("price"), T = l("sale_price"), _ = l("prices") || {}, w = l("sale_prices") || {}, F = ($e?.length || 0) > 0, He = l("language_id"), Je = u.find((o) => o.id === He)?.code || u.find((o) => o.is_default)?.code || u[0]?.code, z = R.useMemo(
|
|
199
|
+
() => ps({
|
|
193
200
|
currencies: n,
|
|
194
201
|
prices: _,
|
|
195
|
-
salePrices:
|
|
202
|
+
salePrices: w,
|
|
196
203
|
fallbackPrice: D,
|
|
197
|
-
fallbackSalePrice:
|
|
204
|
+
fallbackSalePrice: T
|
|
198
205
|
}),
|
|
199
|
-
[D,
|
|
200
|
-
),
|
|
206
|
+
[D, T, n, _, w]
|
|
207
|
+
), Le = R.useMemo(
|
|
201
208
|
() => s?.variants?.map((o) => ({
|
|
202
209
|
...o,
|
|
203
210
|
prices: o.prices || {},
|
|
@@ -205,65 +212,65 @@ function Vs({
|
|
|
205
212
|
})),
|
|
206
213
|
[s?.variants]
|
|
207
214
|
);
|
|
208
|
-
|
|
209
|
-
if (
|
|
210
|
-
const o =
|
|
215
|
+
P(() => {
|
|
216
|
+
if (me.title && !r) {
|
|
217
|
+
const o = hs(Ne);
|
|
211
218
|
t("slug", o, { shouldValidate: !0 });
|
|
212
219
|
}
|
|
213
|
-
}, [
|
|
214
|
-
const [se,
|
|
215
|
-
() =>
|
|
216
|
-
), [oe,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
+
}, [Ne, me.title, t, r]);
|
|
221
|
+
const [se, _e] = S(
|
|
222
|
+
() => Oe(s?.product_media)
|
|
223
|
+
), [oe, Pe] = S(/* @__PURE__ */ new Set());
|
|
224
|
+
P(() => {
|
|
225
|
+
ie(
|
|
226
|
+
je(
|
|
220
227
|
s,
|
|
221
228
|
A,
|
|
222
229
|
u,
|
|
223
230
|
n,
|
|
224
231
|
C
|
|
225
232
|
)
|
|
226
|
-
),
|
|
233
|
+
), _e(Oe(s?.product_media)), Pe(/* @__PURE__ */ new Set()), X(!!s?.variants?.length);
|
|
227
234
|
}, [
|
|
228
235
|
u,
|
|
229
236
|
n,
|
|
230
237
|
s,
|
|
231
|
-
|
|
238
|
+
ie,
|
|
232
239
|
A,
|
|
233
240
|
C
|
|
234
241
|
]);
|
|
235
|
-
const
|
|
242
|
+
const Xe = (o) => {
|
|
236
243
|
const c = new Set(o.map((f) => f.id)), d = se.filter((f) => !c.has(f.id)), b = new Set(oe);
|
|
237
244
|
d.forEach((f) => {
|
|
238
245
|
f.media_id && b.add(f.media_id);
|
|
239
|
-
}),
|
|
246
|
+
}), Pe(b), _e(o), t("product_media", fs(o), { shouldDirty: !0 }), t("explicitly_removed_media_ids", Array.from(b), {
|
|
240
247
|
shouldDirty: !0
|
|
241
248
|
});
|
|
242
249
|
};
|
|
243
|
-
|
|
250
|
+
P(() => {
|
|
244
251
|
t("explicitly_removed_media_ids", Array.from(oe));
|
|
245
|
-
}, [oe, t]),
|
|
246
|
-
|
|
247
|
-
}, [
|
|
252
|
+
}, [oe, t]), P(() => {
|
|
253
|
+
F && X(!0);
|
|
254
|
+
}, [F]), P(() => {
|
|
248
255
|
m("is_taxable"), m("price"), m("sale_price"), m("payment_provider"), m("trial_requires_payment_method");
|
|
249
|
-
}, [m]),
|
|
250
|
-
if (!
|
|
256
|
+
}, [m]), P(() => {
|
|
257
|
+
if (!fe) {
|
|
251
258
|
t("trial_period_days", 0, { shouldDirty: !1, shouldValidate: !0 }), t("trial_requires_payment_method", !1, {
|
|
252
259
|
shouldDirty: !1,
|
|
253
260
|
shouldValidate: !0
|
|
254
261
|
});
|
|
255
262
|
return;
|
|
256
263
|
}
|
|
257
|
-
|
|
264
|
+
ge <= 0 && t("trial_requires_payment_method", !1, {
|
|
258
265
|
shouldDirty: !1,
|
|
259
266
|
shouldValidate: !0
|
|
260
267
|
});
|
|
261
|
-
}, [
|
|
268
|
+
}, [fe, t, ge]), P(() => {
|
|
262
269
|
p && t("payment_provider", p, {
|
|
263
270
|
shouldDirty: !1,
|
|
264
271
|
shouldValidate: !0
|
|
265
272
|
});
|
|
266
|
-
}, [p, t]),
|
|
273
|
+
}, [p, t]), P(() => {
|
|
267
274
|
i && _[i.code] === void 0 && t(
|
|
268
275
|
"prices",
|
|
269
276
|
{
|
|
@@ -273,7 +280,7 @@ function Vs({
|
|
|
273
280
|
{ shouldDirty: !1 }
|
|
274
281
|
);
|
|
275
282
|
}, [D, i, _, t]);
|
|
276
|
-
const
|
|
283
|
+
const ke = B(
|
|
277
284
|
(o, c) => {
|
|
278
285
|
const d = {
|
|
279
286
|
..._,
|
|
@@ -282,10 +289,10 @@ function Vs({
|
|
|
282
289
|
t("prices", d, { shouldDirty: !0, shouldValidate: !0 }), o === i?.code && t("price", c, { shouldDirty: !0, shouldValidate: !0 });
|
|
283
290
|
},
|
|
284
291
|
[i?.code, _, t]
|
|
285
|
-
),
|
|
292
|
+
), Fe = B(
|
|
286
293
|
(o, c) => {
|
|
287
294
|
const d = {
|
|
288
|
-
...
|
|
295
|
+
...w,
|
|
289
296
|
[o]: c
|
|
290
297
|
};
|
|
291
298
|
t("sale_prices", d, {
|
|
@@ -293,35 +300,35 @@ function Vs({
|
|
|
293
300
|
shouldValidate: !0
|
|
294
301
|
}), o === i?.code && t("sale_price", c, { shouldDirty: !0, shouldValidate: !0 });
|
|
295
302
|
},
|
|
296
|
-
[i?.code,
|
|
297
|
-
),
|
|
303
|
+
[i?.code, w, t]
|
|
304
|
+
), ye = B(() => {
|
|
298
305
|
if (!i)
|
|
299
306
|
return;
|
|
300
|
-
const o = new Set(
|
|
307
|
+
const o = new Set(q), c = _[i.code] ?? D ?? 0, d = w[i.code] ?? T ?? null, b = n.reduce((y, N) => {
|
|
301
308
|
if (N.code !== i.code && o.has(N.code))
|
|
302
|
-
return
|
|
303
|
-
const re =
|
|
304
|
-
amount:
|
|
309
|
+
return y;
|
|
310
|
+
const re = Ae({
|
|
311
|
+
amount: Ie(c, i.code),
|
|
305
312
|
fromCurrencyCode: i.code,
|
|
306
313
|
toCurrencyCode: N.code,
|
|
307
314
|
currencies: n,
|
|
308
315
|
applyRounding: !0
|
|
309
316
|
});
|
|
310
|
-
return
|
|
317
|
+
return y[N.code] = Re(re, N.code), y;
|
|
311
318
|
}, {}), f = n.reduce(
|
|
312
|
-
(
|
|
319
|
+
(y, N) => {
|
|
313
320
|
if (N.code !== i.code && o.has(N.code))
|
|
314
|
-
return
|
|
321
|
+
return y;
|
|
315
322
|
if (typeof d != "number")
|
|
316
|
-
return (N.code === i.code || !o.has(N.code)) && (
|
|
317
|
-
const re =
|
|
318
|
-
amount:
|
|
323
|
+
return (N.code === i.code || !o.has(N.code)) && (y[N.code] = null), y;
|
|
324
|
+
const re = Ae({
|
|
325
|
+
amount: Ie(d, i.code),
|
|
319
326
|
fromCurrencyCode: i.code,
|
|
320
327
|
toCurrencyCode: N.code,
|
|
321
328
|
currencies: n,
|
|
322
329
|
applyRounding: !0
|
|
323
330
|
});
|
|
324
|
-
return
|
|
331
|
+
return y[N.code] = Re(re, N.code), y;
|
|
325
332
|
},
|
|
326
333
|
{}
|
|
327
334
|
);
|
|
@@ -339,12 +346,12 @@ function Vs({
|
|
|
339
346
|
n,
|
|
340
347
|
i,
|
|
341
348
|
_,
|
|
342
|
-
|
|
349
|
+
w,
|
|
343
350
|
t,
|
|
344
|
-
|
|
351
|
+
q,
|
|
345
352
|
D,
|
|
346
|
-
|
|
347
|
-
]),
|
|
353
|
+
T
|
|
354
|
+
]), Ye = B(
|
|
348
355
|
({
|
|
349
356
|
variationAttributes: o,
|
|
350
357
|
variants: c
|
|
@@ -352,15 +359,15 @@ function Vs({
|
|
|
352
359
|
t("variation_attributes", o, { shouldDirty: !0 }), t("variants", c, { shouldDirty: !0, shouldValidate: !0 });
|
|
353
360
|
},
|
|
354
361
|
[t]
|
|
355
|
-
),
|
|
356
|
-
|
|
362
|
+
), We = async (o) => {
|
|
363
|
+
J(!0), G(!0), ee(null);
|
|
357
364
|
try {
|
|
358
365
|
if (!p) {
|
|
359
366
|
const f = "Select whether this product is physical or digital before saving.";
|
|
360
|
-
|
|
367
|
+
Q("product_type", {
|
|
361
368
|
type: "manual",
|
|
362
369
|
message: f
|
|
363
|
-
}), r ?
|
|
370
|
+
}), r ? ee(f) : alert(f), J(!1), G(!1);
|
|
364
371
|
return;
|
|
365
372
|
}
|
|
366
373
|
const c = v ? 0 : Math.max(0, Number(o.trial_period_days || 0)), d = {
|
|
@@ -375,14 +382,14 @@ function Vs({
|
|
|
375
382
|
is_taxable: v ? o.is_taxable : !1,
|
|
376
383
|
variation_attributes: v ? o.variation_attributes : [],
|
|
377
384
|
variants: v ? o.variants : []
|
|
378
|
-
}, b =
|
|
385
|
+
}, b = Ue(
|
|
379
386
|
d,
|
|
380
387
|
n
|
|
381
388
|
);
|
|
382
389
|
if (r && g)
|
|
383
|
-
await g(b),
|
|
384
|
-
else if (
|
|
385
|
-
await
|
|
390
|
+
await g(b), Ee(/* @__PURE__ */ new Date());
|
|
391
|
+
else if (H)
|
|
392
|
+
await H(b);
|
|
386
393
|
else
|
|
387
394
|
throw new Error("Product form action is not configured.");
|
|
388
395
|
} catch (c) {
|
|
@@ -391,28 +398,28 @@ function Vs({
|
|
|
391
398
|
let d = c.message || "An error occurred while saving.";
|
|
392
399
|
if (c.code === "23505") {
|
|
393
400
|
const b = c.message?.toLowerCase() || "";
|
|
394
|
-
b.includes("products_slug_key") || b.includes("slug") ? (d = "This slug is already in use. Please choose another one.",
|
|
401
|
+
b.includes("products_slug_key") || b.includes("slug") ? (d = "This slug is already in use. Please choose another one.", Q("slug", {
|
|
395
402
|
type: "manual",
|
|
396
403
|
message: d
|
|
397
|
-
})) : (b.includes("products_sku_key") || b.includes("sku")) && (d = "This SKU is already in use.",
|
|
404
|
+
})) : (b.includes("products_sku_key") || b.includes("sku")) && (d = "This SKU is already in use.", Q("sku", {
|
|
398
405
|
type: "manual",
|
|
399
406
|
message: d
|
|
400
407
|
}));
|
|
401
408
|
}
|
|
402
|
-
r ?
|
|
409
|
+
r ? ee(d) : alert(d);
|
|
403
410
|
} finally {
|
|
404
|
-
|
|
411
|
+
J(!1), G(!1);
|
|
405
412
|
}
|
|
406
|
-
},
|
|
407
|
-
return /* @__PURE__ */ e("form", { onSubmit:
|
|
413
|
+
}, Qe = F ? "bg-muted/60 text-muted-foreground opacity-70" : "", Ze = xs(se);
|
|
414
|
+
return /* @__PURE__ */ e("form", { onSubmit: Y(We), className: "space-y-2.5 pb-4", children: [
|
|
408
415
|
/* @__PURE__ */ e("input", { type: "hidden", ...m("translation_group_id") }, void 0, !1, {
|
|
409
416
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
410
|
-
lineNumber:
|
|
417
|
+
lineNumber: 819,
|
|
411
418
|
columnNumber: 7
|
|
412
419
|
}, this),
|
|
413
420
|
/* @__PURE__ */ e("input", { type: "hidden", ...m("payment_provider") }, void 0, !1, {
|
|
414
421
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
415
|
-
lineNumber:
|
|
422
|
+
lineNumber: 820,
|
|
416
423
|
columnNumber: 7
|
|
417
424
|
}, this),
|
|
418
425
|
/* @__PURE__ */ e("div", { className: "space-y-2.5 w-full", children: [
|
|
@@ -421,51 +428,51 @@ function Vs({
|
|
|
421
428
|
/* @__PURE__ */ e("div", { className: "flex h-9 items-center gap-2", children: [
|
|
422
429
|
/* @__PURE__ */ e("span", { className: "text-sm font-bold whitespace-nowrap leading-none pt-0.5", children: "Product Type" }, void 0, !1, {
|
|
423
430
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
424
|
-
lineNumber:
|
|
431
|
+
lineNumber: 826,
|
|
425
432
|
columnNumber: 15
|
|
426
433
|
}, this),
|
|
427
|
-
a.product_type && /* @__PURE__ */ e(
|
|
434
|
+
a.product_type && /* @__PURE__ */ e(Se, { className: "h-4 w-4 text-destructive" }, void 0, !1, {
|
|
428
435
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
429
|
-
lineNumber:
|
|
436
|
+
lineNumber: 828,
|
|
430
437
|
columnNumber: 17
|
|
431
438
|
}, this)
|
|
432
439
|
] }, void 0, !0, {
|
|
433
440
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
434
|
-
lineNumber:
|
|
441
|
+
lineNumber: 825,
|
|
435
442
|
columnNumber: 13
|
|
436
443
|
}, this),
|
|
437
444
|
/* @__PURE__ */ e("div", { className: "flex h-9 items-center", children: /* @__PURE__ */ e(
|
|
438
|
-
|
|
445
|
+
os,
|
|
439
446
|
{
|
|
440
447
|
onValueChange: (o) => t("product_type", o, {
|
|
441
448
|
shouldDirty: !0,
|
|
442
449
|
shouldValidate: !0
|
|
443
450
|
}),
|
|
444
|
-
value:
|
|
451
|
+
value: I || void 0,
|
|
445
452
|
children: [
|
|
446
|
-
/* @__PURE__ */ e(
|
|
453
|
+
/* @__PURE__ */ e(rs, { className: "w-[160px] h-9 text-xs", children: /* @__PURE__ */ e(ts, { placeholder: "Select Type" }, void 0, !1, {
|
|
447
454
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
448
|
-
lineNumber:
|
|
455
|
+
lineNumber: 843,
|
|
449
456
|
columnNumber: 19
|
|
450
457
|
}, this) }, void 0, !1, {
|
|
451
458
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
452
|
-
lineNumber:
|
|
459
|
+
lineNumber: 842,
|
|
453
460
|
columnNumber: 17
|
|
454
461
|
}, this),
|
|
455
|
-
/* @__PURE__ */ e(
|
|
456
|
-
/* @__PURE__ */ e(
|
|
462
|
+
/* @__PURE__ */ e(cs, { children: [
|
|
463
|
+
/* @__PURE__ */ e(Ce, { value: "physical", children: "Physical Product" }, void 0, !1, {
|
|
457
464
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
458
|
-
lineNumber:
|
|
465
|
+
lineNumber: 846,
|
|
459
466
|
columnNumber: 19
|
|
460
467
|
}, this),
|
|
461
|
-
/* @__PURE__ */ e(
|
|
468
|
+
/* @__PURE__ */ e(Ce, { value: "digital", children: "Digital Product" }, void 0, !1, {
|
|
462
469
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
463
|
-
lineNumber:
|
|
470
|
+
lineNumber: 847,
|
|
464
471
|
columnNumber: 19
|
|
465
472
|
}, this)
|
|
466
473
|
] }, void 0, !0, {
|
|
467
474
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
468
|
-
lineNumber:
|
|
475
|
+
lineNumber: 845,
|
|
469
476
|
columnNumber: 17
|
|
470
477
|
}, this)
|
|
471
478
|
]
|
|
@@ -474,73 +481,73 @@ function Vs({
|
|
|
474
481
|
!0,
|
|
475
482
|
{
|
|
476
483
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
477
|
-
lineNumber:
|
|
484
|
+
lineNumber: 833,
|
|
478
485
|
columnNumber: 15
|
|
479
486
|
},
|
|
480
487
|
this
|
|
481
488
|
) }, void 0, !1, {
|
|
482
489
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
483
|
-
lineNumber:
|
|
490
|
+
lineNumber: 832,
|
|
484
491
|
columnNumber: 13
|
|
485
492
|
}, this)
|
|
486
493
|
] }, void 0, !0, {
|
|
487
494
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
488
|
-
lineNumber:
|
|
495
|
+
lineNumber: 824,
|
|
489
496
|
columnNumber: 11
|
|
490
497
|
}, this),
|
|
491
498
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-6", children: [
|
|
492
499
|
/* @__PURE__ */ e("div", { className: "flex h-9 items-center gap-3", children: [
|
|
493
500
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-semibold text-muted-foreground uppercase tracking-wider leading-none", children: "Payment Provider" }, void 0, !1, {
|
|
494
501
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
495
|
-
lineNumber:
|
|
502
|
+
lineNumber: 855,
|
|
496
503
|
columnNumber: 15
|
|
497
504
|
}, this),
|
|
498
|
-
/* @__PURE__ */ e(
|
|
505
|
+
/* @__PURE__ */ e(E, { variant: "outline", className: "text-xs py-1 font-bold bg-muted/30 leading-none", children: p ? p === "stripe" ? "Stripe" : "Freemius" : "—" }, void 0, !1, {
|
|
499
506
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
500
|
-
lineNumber:
|
|
507
|
+
lineNumber: 856,
|
|
501
508
|
columnNumber: 15
|
|
502
509
|
}, this)
|
|
503
510
|
] }, void 0, !0, {
|
|
504
511
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
505
|
-
lineNumber:
|
|
512
|
+
lineNumber: 854,
|
|
506
513
|
columnNumber: 13
|
|
507
514
|
}, this),
|
|
508
|
-
p && /* @__PURE__ */ e("div", { className: "flex h-9 items-center gap-2", children:
|
|
509
|
-
/* @__PURE__ */ e(
|
|
515
|
+
p && /* @__PURE__ */ e("div", { className: "flex h-9 items-center gap-2", children: xe && he ? /* @__PURE__ */ e("span", { className: "flex items-center gap-1.5 text-emerald-600 text-[10px] font-bold bg-emerald-50 px-2 py-1 rounded-full border border-emerald-100 uppercase leading-none", children: [
|
|
516
|
+
/* @__PURE__ */ e(es, { className: "h-3 w-3" }, void 0, !1, {
|
|
510
517
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
511
|
-
lineNumber:
|
|
518
|
+
lineNumber: 869,
|
|
512
519
|
columnNumber: 21
|
|
513
520
|
}, this),
|
|
514
521
|
"Ready"
|
|
515
522
|
] }, void 0, !0, {
|
|
516
523
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
517
|
-
lineNumber:
|
|
524
|
+
lineNumber: 868,
|
|
518
525
|
columnNumber: 19
|
|
519
526
|
}, this) : /* @__PURE__ */ e("span", { className: "flex items-center gap-1.5 text-amber-600 text-[10px] font-bold bg-amber-50 px-2 py-1 rounded-full border border-amber-100 uppercase leading-none", children: [
|
|
520
|
-
/* @__PURE__ */ e(
|
|
527
|
+
/* @__PURE__ */ e(Se, { className: "h-3 w-3" }, void 0, !1, {
|
|
521
528
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
522
|
-
lineNumber:
|
|
529
|
+
lineNumber: 874,
|
|
523
530
|
columnNumber: 21
|
|
524
531
|
}, this),
|
|
525
|
-
|
|
532
|
+
xe ? "Keys Missing" : "Disabled"
|
|
526
533
|
] }, void 0, !0, {
|
|
527
534
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
528
|
-
lineNumber:
|
|
535
|
+
lineNumber: 873,
|
|
529
536
|
columnNumber: 19
|
|
530
537
|
}, this) }, void 0, !1, {
|
|
531
538
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
532
|
-
lineNumber:
|
|
539
|
+
lineNumber: 866,
|
|
533
540
|
columnNumber: 15
|
|
534
541
|
}, this),
|
|
535
|
-
!
|
|
542
|
+
!he && p && M[p].missing.length > 0 && /* @__PURE__ */ e(
|
|
536
543
|
"a",
|
|
537
544
|
{
|
|
538
545
|
href: "/cms/payments",
|
|
539
546
|
className: "hidden xl:flex h-9 items-center gap-1 text-[10px] text-muted-foreground bg-muted/50 px-2 py-1 rounded border border-dashed leading-none hover:text-foreground hover:border-solid",
|
|
540
547
|
children: [
|
|
541
|
-
/* @__PURE__ */ e(
|
|
548
|
+
/* @__PURE__ */ e(ss, { className: "h-3 w-3" }, void 0, !1, {
|
|
542
549
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
543
|
-
lineNumber:
|
|
550
|
+
lineNumber: 886,
|
|
544
551
|
columnNumber: 17
|
|
545
552
|
}, this),
|
|
546
553
|
"Missing: ",
|
|
@@ -552,23 +559,23 @@ function Vs({
|
|
|
552
559
|
!0,
|
|
553
560
|
{
|
|
554
561
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
555
|
-
lineNumber:
|
|
562
|
+
lineNumber: 882,
|
|
556
563
|
columnNumber: 15
|
|
557
564
|
},
|
|
558
565
|
this
|
|
559
566
|
)
|
|
560
567
|
] }, void 0, !0, {
|
|
561
568
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
562
|
-
lineNumber:
|
|
569
|
+
lineNumber: 853,
|
|
563
570
|
columnNumber: 11
|
|
564
571
|
}, this)
|
|
565
572
|
] }, void 0, !0, {
|
|
566
573
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
567
|
-
lineNumber:
|
|
574
|
+
lineNumber: 823,
|
|
568
575
|
columnNumber: 9
|
|
569
576
|
}, this),
|
|
570
577
|
/* @__PURE__ */ e(
|
|
571
|
-
|
|
578
|
+
K,
|
|
572
579
|
{
|
|
573
580
|
title: "Product Information",
|
|
574
581
|
hideHeader: !0,
|
|
@@ -576,200 +583,200 @@ function Vs({
|
|
|
576
583
|
r && /* @__PURE__ */ e("div", { className: "flex items-center justify-between text-xs text-muted-foreground pb-2 border-b border-border/40 mb-2.5", children: [
|
|
577
584
|
/* @__PURE__ */ e("span", { className: "font-semibold text-[11px] uppercase tracking-wider text-muted-foreground/80", children: "Product Settings" }, void 0, !1, {
|
|
578
585
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
579
|
-
lineNumber:
|
|
586
|
+
lineNumber: 899,
|
|
580
587
|
columnNumber: 15
|
|
581
588
|
}, this),
|
|
582
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1.5 min-h-[16px]", children:
|
|
589
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1.5 min-h-[16px]", children: Be ? /* @__PURE__ */ e(De, { children: [
|
|
583
590
|
/* @__PURE__ */ e("div", { className: "relative flex h-2 w-2", children: [
|
|
584
591
|
/* @__PURE__ */ e("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-amber-400 opacity-75" }, void 0, !1, {
|
|
585
592
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
586
|
-
lineNumber:
|
|
593
|
+
lineNumber: 904,
|
|
587
594
|
columnNumber: 23
|
|
588
595
|
}, this),
|
|
589
596
|
/* @__PURE__ */ e("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-amber-500" }, void 0, !1, {
|
|
590
597
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
591
|
-
lineNumber:
|
|
598
|
+
lineNumber: 905,
|
|
592
599
|
columnNumber: 23
|
|
593
600
|
}, this)
|
|
594
601
|
] }, void 0, !0, {
|
|
595
602
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
596
|
-
lineNumber:
|
|
603
|
+
lineNumber: 903,
|
|
597
604
|
columnNumber: 21
|
|
598
605
|
}, this),
|
|
599
606
|
/* @__PURE__ */ e("span", { className: "text-amber-600 dark:text-amber-400 font-medium", children: "Autosaving settings..." }, void 0, !1, {
|
|
600
607
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
601
|
-
lineNumber:
|
|
608
|
+
lineNumber: 907,
|
|
602
609
|
columnNumber: 21
|
|
603
610
|
}, this)
|
|
604
611
|
] }, void 0, !0, {
|
|
605
612
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
606
|
-
lineNumber:
|
|
613
|
+
lineNumber: 902,
|
|
607
614
|
columnNumber: 19
|
|
608
|
-
}, this) :
|
|
615
|
+
}, this) : ne ? /* @__PURE__ */ e("span", { className: "text-red-500 font-medium", children: [
|
|
609
616
|
"Error saving settings: ",
|
|
610
|
-
|
|
617
|
+
ne
|
|
611
618
|
] }, void 0, !0, {
|
|
612
619
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
613
|
-
lineNumber:
|
|
620
|
+
lineNumber: 910,
|
|
614
621
|
columnNumber: 19
|
|
615
|
-
}, this) :
|
|
622
|
+
}, this) : de ? /* @__PURE__ */ e("span", { className: "text-emerald-600 dark:text-emerald-400 font-medium", children: [
|
|
616
623
|
"Settings autosaved at ",
|
|
617
|
-
|
|
624
|
+
de.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit" })
|
|
618
625
|
] }, void 0, !0, {
|
|
619
626
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
620
|
-
lineNumber:
|
|
627
|
+
lineNumber: 912,
|
|
621
628
|
columnNumber: 19
|
|
622
629
|
}, this) : /* @__PURE__ */ e("span", { className: "text-muted-foreground/60", children: "Settings autosave in draft mode" }, void 0, !1, {
|
|
623
630
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
624
|
-
lineNumber:
|
|
631
|
+
lineNumber: 916,
|
|
625
632
|
columnNumber: 19
|
|
626
633
|
}, this) }, void 0, !1, {
|
|
627
634
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
628
|
-
lineNumber:
|
|
635
|
+
lineNumber: 900,
|
|
629
636
|
columnNumber: 15
|
|
630
637
|
}, this)
|
|
631
638
|
] }, void 0, !0, {
|
|
632
639
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
633
|
-
lineNumber:
|
|
640
|
+
lineNumber: 898,
|
|
634
641
|
columnNumber: 13
|
|
635
642
|
}, this),
|
|
636
643
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-2.5", children: [
|
|
637
644
|
/* @__PURE__ */ e("div", { className: "col-span-2 space-y-1", children: [
|
|
638
|
-
/* @__PURE__ */ e(
|
|
645
|
+
/* @__PURE__ */ e(k, { htmlFor: "title", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "Title" }, void 0, !1, {
|
|
639
646
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
640
|
-
lineNumber:
|
|
647
|
+
lineNumber: 923,
|
|
641
648
|
columnNumber: 15
|
|
642
649
|
}, this),
|
|
643
650
|
/* @__PURE__ */ e(x, { id: "title", placeholder: "Product title", ...m("title"), className: "h-8 text-sm" }, void 0, !1, {
|
|
644
651
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
645
|
-
lineNumber:
|
|
652
|
+
lineNumber: 924,
|
|
646
653
|
columnNumber: 15
|
|
647
654
|
}, this),
|
|
648
655
|
a.title && /* @__PURE__ */ e("p", { className: "text-destructive text-[11px] leading-none", children: a.title.message }, void 0, !1, {
|
|
649
656
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
650
|
-
lineNumber:
|
|
657
|
+
lineNumber: 925,
|
|
651
658
|
columnNumber: 32
|
|
652
659
|
}, this)
|
|
653
660
|
] }, void 0, !0, {
|
|
654
661
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
655
|
-
lineNumber:
|
|
662
|
+
lineNumber: 922,
|
|
656
663
|
columnNumber: 13
|
|
657
664
|
}, this),
|
|
658
665
|
/* @__PURE__ */ e("div", { className: "col-span-2 space-y-1", children: [
|
|
659
|
-
/* @__PURE__ */ e(
|
|
666
|
+
/* @__PURE__ */ e(k, { htmlFor: "slug", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "Slug" }, void 0, !1, {
|
|
660
667
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
661
|
-
lineNumber:
|
|
668
|
+
lineNumber: 928,
|
|
662
669
|
columnNumber: 15
|
|
663
670
|
}, this),
|
|
664
671
|
/* @__PURE__ */ e(x, { id: "slug", placeholder: "product-slug", ...m("slug"), className: "h-8 text-sm" }, void 0, !1, {
|
|
665
672
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
666
|
-
lineNumber:
|
|
673
|
+
lineNumber: 929,
|
|
667
674
|
columnNumber: 15
|
|
668
675
|
}, this),
|
|
669
676
|
a.slug && /* @__PURE__ */ e("p", { className: "text-destructive text-[11px] leading-none", children: a.slug.message }, void 0, !1, {
|
|
670
677
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
671
|
-
lineNumber:
|
|
678
|
+
lineNumber: 930,
|
|
672
679
|
columnNumber: 31
|
|
673
680
|
}, this)
|
|
674
681
|
] }, void 0, !0, {
|
|
675
682
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
676
|
-
lineNumber:
|
|
683
|
+
lineNumber: 927,
|
|
677
684
|
columnNumber: 13
|
|
678
685
|
}, this),
|
|
679
686
|
/* @__PURE__ */ e("div", { className: "col-span-1 space-y-1", children: [
|
|
680
|
-
/* @__PURE__ */ e(
|
|
687
|
+
/* @__PURE__ */ e(k, { htmlFor: "sku", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "SKU" }, void 0, !1, {
|
|
681
688
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
682
|
-
lineNumber:
|
|
689
|
+
lineNumber: 933,
|
|
683
690
|
columnNumber: 15
|
|
684
691
|
}, this),
|
|
685
692
|
/* @__PURE__ */ e(x, { id: "sku", placeholder: "SKU", ...m("sku"), className: "h-8 text-sm font-mono" }, void 0, !1, {
|
|
686
693
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
687
|
-
lineNumber:
|
|
694
|
+
lineNumber: 934,
|
|
688
695
|
columnNumber: 15
|
|
689
696
|
}, this),
|
|
690
697
|
a.sku && /* @__PURE__ */ e("p", { className: "text-destructive text-[11px] leading-none", children: a.sku.message }, void 0, !1, {
|
|
691
698
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
692
|
-
lineNumber:
|
|
699
|
+
lineNumber: 935,
|
|
693
700
|
columnNumber: 30
|
|
694
701
|
}, this)
|
|
695
702
|
] }, void 0, !0, {
|
|
696
703
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
697
|
-
lineNumber:
|
|
704
|
+
lineNumber: 932,
|
|
698
705
|
columnNumber: 13
|
|
699
706
|
}, this),
|
|
700
707
|
/* @__PURE__ */ e("div", { className: "col-span-1 space-y-1", children: [
|
|
701
|
-
/* @__PURE__ */ e(
|
|
708
|
+
/* @__PURE__ */ e(k, { htmlFor: "upc_ean", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "UPC / EAN" }, void 0, !1, {
|
|
702
709
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
703
|
-
lineNumber:
|
|
710
|
+
lineNumber: 938,
|
|
704
711
|
columnNumber: 15
|
|
705
712
|
}, this),
|
|
706
|
-
/* @__PURE__ */ e(x, { id: "upc_ean", placeholder: "000000000", ...m("upc"), className: "h-8 text-sm font-mono", readOnly:
|
|
713
|
+
/* @__PURE__ */ e(x, { id: "upc_ean", placeholder: "000000000", ...m("upc"), className: "h-8 text-sm font-mono", readOnly: F }, void 0, !1, {
|
|
707
714
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
708
|
-
lineNumber:
|
|
715
|
+
lineNumber: 939,
|
|
709
716
|
columnNumber: 15
|
|
710
717
|
}, this)
|
|
711
718
|
] }, void 0, !0, {
|
|
712
719
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
713
|
-
lineNumber:
|
|
720
|
+
lineNumber: 937,
|
|
714
721
|
columnNumber: 13
|
|
715
722
|
}, this)
|
|
716
723
|
] }, void 0, !0, {
|
|
717
724
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
718
|
-
lineNumber:
|
|
725
|
+
lineNumber: 921,
|
|
719
726
|
columnNumber: 11
|
|
720
727
|
}, this),
|
|
721
728
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-12 gap-2.5 mt-2", children: [
|
|
722
729
|
/* @__PURE__ */ e("div", { className: `${r ? "lg:col-span-3" : "lg:col-span-4"} col-span-2 space-y-1`, children: [
|
|
723
|
-
/* @__PURE__ */ e(
|
|
730
|
+
/* @__PURE__ */ e(k, { htmlFor: "meta_title", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "Meta Title" }, void 0, !1, {
|
|
724
731
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
725
|
-
lineNumber:
|
|
732
|
+
lineNumber: 944,
|
|
726
733
|
columnNumber: 15
|
|
727
734
|
}, this),
|
|
728
735
|
/* @__PURE__ */ e(x, { id: "meta_title", ...m("meta_title"), placeholder: "SEO page title (50-60 chars)", className: "h-8 text-sm" }, void 0, !1, {
|
|
729
736
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
730
|
-
lineNumber:
|
|
737
|
+
lineNumber: 945,
|
|
731
738
|
columnNumber: 15
|
|
732
739
|
}, this)
|
|
733
740
|
] }, void 0, !0, {
|
|
734
741
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
735
|
-
lineNumber:
|
|
742
|
+
lineNumber: 943,
|
|
736
743
|
columnNumber: 13
|
|
737
744
|
}, this),
|
|
738
745
|
/* @__PURE__ */ e("div", { className: "lg:col-span-4 col-span-2 space-y-1", children: [
|
|
739
|
-
/* @__PURE__ */ e(
|
|
746
|
+
/* @__PURE__ */ e(k, { htmlFor: "meta_description", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "Meta Description" }, void 0, !1, {
|
|
740
747
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
741
|
-
lineNumber:
|
|
748
|
+
lineNumber: 948,
|
|
742
749
|
columnNumber: 15
|
|
743
750
|
}, this),
|
|
744
751
|
/* @__PURE__ */ e(x, { id: "meta_description", ...m("meta_description"), placeholder: "SEO description (150-160 chars)", className: "h-8 text-sm" }, void 0, !1, {
|
|
745
752
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
746
|
-
lineNumber:
|
|
753
|
+
lineNumber: 949,
|
|
747
754
|
columnNumber: 15
|
|
748
755
|
}, this)
|
|
749
756
|
] }, void 0, !0, {
|
|
750
757
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
751
|
-
lineNumber:
|
|
758
|
+
lineNumber: 947,
|
|
752
759
|
columnNumber: 13
|
|
753
760
|
}, this),
|
|
754
761
|
/* @__PURE__ */ e("div", { className: `${r ? "lg:col-span-3" : "lg:col-span-4"} col-span-2 space-y-1`, children: [
|
|
755
|
-
/* @__PURE__ */ e(
|
|
762
|
+
/* @__PURE__ */ e(k, { htmlFor: "custom_canonical", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "Canonical URL (optional)" }, void 0, !1, {
|
|
756
763
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
757
|
-
lineNumber:
|
|
764
|
+
lineNumber: 952,
|
|
758
765
|
columnNumber: 15
|
|
759
766
|
}, this),
|
|
760
767
|
/* @__PURE__ */ e(x, { id: "custom_canonical", ...m("custom_canonical"), placeholder: "Blank = self-referencing. Absolute https://… URL or /relative path to override.", className: "h-8 text-sm" }, void 0, !1, {
|
|
761
768
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
762
|
-
lineNumber:
|
|
769
|
+
lineNumber: 953,
|
|
763
770
|
columnNumber: 15
|
|
764
771
|
}, this)
|
|
765
772
|
] }, void 0, !0, {
|
|
766
773
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
767
|
-
lineNumber:
|
|
774
|
+
lineNumber: 951,
|
|
768
775
|
columnNumber: 13
|
|
769
776
|
}, this)
|
|
770
777
|
] }, void 0, !0, {
|
|
771
778
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
772
|
-
lineNumber:
|
|
779
|
+
lineNumber: 942,
|
|
773
780
|
columnNumber: 11
|
|
774
781
|
}, this)
|
|
775
782
|
]
|
|
@@ -778,20 +785,20 @@ function Vs({
|
|
|
778
785
|
!0,
|
|
779
786
|
{
|
|
780
787
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
781
|
-
lineNumber:
|
|
788
|
+
lineNumber: 893,
|
|
782
789
|
columnNumber: 9
|
|
783
790
|
},
|
|
784
791
|
this
|
|
785
792
|
),
|
|
786
793
|
/* @__PURE__ */ e(
|
|
787
|
-
|
|
794
|
+
K,
|
|
788
795
|
{
|
|
789
796
|
title: "Product Categories",
|
|
790
797
|
description: "Assign this product to one or more categories.",
|
|
791
798
|
children: /* @__PURE__ */ e(
|
|
792
|
-
|
|
799
|
+
us,
|
|
793
800
|
{
|
|
794
|
-
categories:
|
|
801
|
+
categories: qe,
|
|
795
802
|
selectedIds: l("category_ids") || [],
|
|
796
803
|
onChange: (o) => t("category_ids", o, { shouldDirty: !0, shouldValidate: !0 })
|
|
797
804
|
},
|
|
@@ -799,7 +806,7 @@ function Vs({
|
|
|
799
806
|
!1,
|
|
800
807
|
{
|
|
801
808
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
802
|
-
lineNumber:
|
|
809
|
+
lineNumber: 965,
|
|
803
810
|
columnNumber: 11
|
|
804
811
|
},
|
|
805
812
|
this
|
|
@@ -809,7 +816,7 @@ function Vs({
|
|
|
809
816
|
!1,
|
|
810
817
|
{
|
|
811
818
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
812
|
-
lineNumber:
|
|
819
|
+
lineNumber: 961,
|
|
813
820
|
columnNumber: 9
|
|
814
821
|
},
|
|
815
822
|
this
|
|
@@ -819,28 +826,28 @@ function Vs({
|
|
|
819
826
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ e("div", { className: "space-y-0.5", children: [
|
|
820
827
|
/* @__PURE__ */ e("h2", { className: "text-sm font-bold tracking-tight", children: "Pricing & Inventory" }, void 0, !1, {
|
|
821
828
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
822
|
-
lineNumber:
|
|
829
|
+
lineNumber: 977,
|
|
823
830
|
columnNumber: 19
|
|
824
831
|
}, this),
|
|
825
832
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground leading-none", children: "Manage simple or variant pricing." }, void 0, !1, {
|
|
826
833
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
827
|
-
lineNumber:
|
|
834
|
+
lineNumber: 978,
|
|
828
835
|
columnNumber: 19
|
|
829
836
|
}, this)
|
|
830
837
|
] }, void 0, !0, {
|
|
831
838
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
832
|
-
lineNumber:
|
|
839
|
+
lineNumber: 976,
|
|
833
840
|
columnNumber: 17
|
|
834
841
|
}, this) }, void 0, !1, {
|
|
835
842
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
836
|
-
lineNumber:
|
|
843
|
+
lineNumber: 975,
|
|
837
844
|
columnNumber: 15
|
|
838
845
|
}, this),
|
|
839
846
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: [
|
|
840
847
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 bg-muted/40 rounded-md px-2.5 py-1.5", children: [
|
|
841
848
|
/* @__PURE__ */ e("span", { className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "Stock" }, void 0, !1, {
|
|
842
849
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
843
|
-
lineNumber:
|
|
850
|
+
lineNumber: 983,
|
|
844
851
|
columnNumber: 21
|
|
845
852
|
}, this),
|
|
846
853
|
/* @__PURE__ */ e(
|
|
@@ -851,55 +858,55 @@ function Vs({
|
|
|
851
858
|
min: "0",
|
|
852
859
|
...m("stock", { valueAsNumber: !0 }),
|
|
853
860
|
placeholder: "0",
|
|
854
|
-
readOnly:
|
|
855
|
-
className: `${
|
|
861
|
+
readOnly: F,
|
|
862
|
+
className: `${Qe} h-8 w-20 text-sm text-center font-mono bg-background`
|
|
856
863
|
},
|
|
857
864
|
void 0,
|
|
858
865
|
!1,
|
|
859
866
|
{
|
|
860
867
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
861
|
-
lineNumber:
|
|
868
|
+
lineNumber: 984,
|
|
862
869
|
columnNumber: 21
|
|
863
870
|
},
|
|
864
871
|
this
|
|
865
872
|
)
|
|
866
873
|
] }, void 0, !0, {
|
|
867
874
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
868
|
-
lineNumber:
|
|
875
|
+
lineNumber: 982,
|
|
869
876
|
columnNumber: 19
|
|
870
877
|
}, this),
|
|
871
|
-
|
|
878
|
+
F ? /* @__PURE__ */ e(E, { variant: "secondary", className: "text-[11px] py-0 px-2 h-5", children: "Variant pricing" }, void 0, !1, {
|
|
872
879
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
873
|
-
lineNumber:
|
|
880
|
+
lineNumber: 995,
|
|
874
881
|
columnNumber: 19
|
|
875
882
|
}, this) : null
|
|
876
883
|
] }, void 0, !0, {
|
|
877
884
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
878
|
-
lineNumber:
|
|
885
|
+
lineNumber: 981,
|
|
879
886
|
columnNumber: 15
|
|
880
887
|
}, this)
|
|
881
888
|
] }, void 0, !0, {
|
|
882
889
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
883
|
-
lineNumber:
|
|
890
|
+
lineNumber: 974,
|
|
884
891
|
columnNumber: 13
|
|
885
892
|
}, this),
|
|
886
893
|
v ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [
|
|
887
894
|
/* @__PURE__ */ e("div", { className: "w-full", children: [
|
|
888
895
|
/* @__PURE__ */ e(
|
|
889
|
-
|
|
896
|
+
Ve,
|
|
890
897
|
{
|
|
891
898
|
idPrefix: "product",
|
|
892
899
|
currencies: n,
|
|
893
|
-
prices:
|
|
894
|
-
salePrices:
|
|
895
|
-
managedCurrencyCodes:
|
|
896
|
-
onPriceChange:
|
|
897
|
-
onSalePriceChange:
|
|
898
|
-
onAutoFill:
|
|
899
|
-
readOnly:
|
|
900
|
-
helperText:
|
|
900
|
+
prices: z.prices,
|
|
901
|
+
salePrices: z.salePrices,
|
|
902
|
+
managedCurrencyCodes: q,
|
|
903
|
+
onPriceChange: ke,
|
|
904
|
+
onSalePriceChange: Fe,
|
|
905
|
+
onAutoFill: ye,
|
|
906
|
+
readOnly: F,
|
|
907
|
+
helperText: F ? "Parent prices stay as a fallback, but active variants define the live shopper price." : void 0,
|
|
901
908
|
trailing: /* @__PURE__ */ e(
|
|
902
|
-
|
|
909
|
+
Te,
|
|
903
910
|
{
|
|
904
911
|
idPrefix: "product",
|
|
905
912
|
startAt: l("sale_start_at"),
|
|
@@ -912,7 +919,7 @@ function Vs({
|
|
|
912
919
|
!1,
|
|
913
920
|
{
|
|
914
921
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
915
|
-
lineNumber:
|
|
922
|
+
lineNumber: 1019,
|
|
916
923
|
columnNumber: 21
|
|
917
924
|
},
|
|
918
925
|
this
|
|
@@ -922,147 +929,147 @@ function Vs({
|
|
|
922
929
|
!1,
|
|
923
930
|
{
|
|
924
931
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
925
|
-
lineNumber:
|
|
932
|
+
lineNumber: 1003,
|
|
926
933
|
columnNumber: 17
|
|
927
934
|
},
|
|
928
935
|
this
|
|
929
936
|
),
|
|
930
937
|
a.price && /* @__PURE__ */ e("p", { className: "text-destructive text-sm mt-1", children: a.price.message }, void 0, !1, {
|
|
931
938
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
932
|
-
lineNumber:
|
|
939
|
+
lineNumber: 1032,
|
|
933
940
|
columnNumber: 19
|
|
934
941
|
}, this),
|
|
935
942
|
a.sale_price && /* @__PURE__ */ e("p", { className: "text-destructive text-sm mt-1", children: a.sale_price.message }, void 0, !1, {
|
|
936
943
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
937
|
-
lineNumber:
|
|
944
|
+
lineNumber: 1035,
|
|
938
945
|
columnNumber: 19
|
|
939
946
|
}, this),
|
|
940
947
|
a.stock && /* @__PURE__ */ e("p", { className: "text-destructive text-[10px] font-medium leading-none mt-1", children: a.stock.message }, void 0, !1, {
|
|
941
948
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
942
|
-
lineNumber:
|
|
949
|
+
lineNumber: 1038,
|
|
943
950
|
columnNumber: 19
|
|
944
951
|
}, this)
|
|
945
952
|
] }, void 0, !0, {
|
|
946
953
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
947
|
-
lineNumber:
|
|
954
|
+
lineNumber: 1002,
|
|
948
955
|
columnNumber: 15
|
|
949
956
|
}, this),
|
|
950
957
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-3 rounded border border-dashed p-2.5 bg-muted/5", children: [
|
|
951
|
-
/* @__PURE__ */ e("span", { className: "text-xs font-bold uppercase tracking-wider text-muted-foreground", children:
|
|
958
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold uppercase tracking-wider text-muted-foreground", children: F ? "Variations Active" : "Variations" }, void 0, !1, {
|
|
952
959
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
953
|
-
lineNumber:
|
|
960
|
+
lineNumber: 1043,
|
|
954
961
|
columnNumber: 17
|
|
955
962
|
}, this),
|
|
956
963
|
/* @__PURE__ */ e(
|
|
957
|
-
|
|
964
|
+
Me,
|
|
958
965
|
{
|
|
959
966
|
type: "button",
|
|
960
|
-
variant:
|
|
961
|
-
onClick: () =>
|
|
967
|
+
variant: L ? "outline" : "default",
|
|
968
|
+
onClick: () => X((o) => !o),
|
|
962
969
|
size: "sm",
|
|
963
970
|
className: "h-7 text-xs px-3",
|
|
964
|
-
children:
|
|
971
|
+
children: L ? "Hide" : "Manage"
|
|
965
972
|
},
|
|
966
973
|
void 0,
|
|
967
974
|
!1,
|
|
968
975
|
{
|
|
969
976
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
970
|
-
lineNumber:
|
|
977
|
+
lineNumber: 1044,
|
|
971
978
|
columnNumber: 17
|
|
972
979
|
},
|
|
973
980
|
this
|
|
974
981
|
)
|
|
975
982
|
] }, void 0, !0, {
|
|
976
983
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
977
|
-
lineNumber:
|
|
984
|
+
lineNumber: 1042,
|
|
978
985
|
columnNumber: 15
|
|
979
986
|
}, this),
|
|
980
|
-
|
|
981
|
-
|
|
987
|
+
L && /* @__PURE__ */ e("div", { className: "border-t pt-3", children: /* @__PURE__ */ e(
|
|
988
|
+
ds,
|
|
982
989
|
{
|
|
983
990
|
globalAttributes: W,
|
|
984
|
-
currentLanguageCode:
|
|
991
|
+
currentLanguageCode: Je,
|
|
985
992
|
baseSku: l("sku") || "",
|
|
986
993
|
basePrice: D || 0,
|
|
987
994
|
basePrices: _,
|
|
988
|
-
baseSalePrice: typeof
|
|
989
|
-
baseSalePrices:
|
|
995
|
+
baseSalePrice: typeof T == "number" ? T : null,
|
|
996
|
+
baseSalePrices: w,
|
|
990
997
|
currencies: n,
|
|
991
|
-
availableVariantImages:
|
|
998
|
+
availableVariantImages: Ze,
|
|
992
999
|
initialVariationAttributes: s?.variation_attributes,
|
|
993
|
-
initialVariants:
|
|
994
|
-
onChange:
|
|
1000
|
+
initialVariants: Le,
|
|
1001
|
+
onChange: Ye
|
|
995
1002
|
},
|
|
996
1003
|
void 0,
|
|
997
1004
|
!1,
|
|
998
1005
|
{
|
|
999
1006
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1000
|
-
lineNumber:
|
|
1007
|
+
lineNumber: 1057,
|
|
1001
1008
|
columnNumber: 19
|
|
1002
1009
|
},
|
|
1003
1010
|
this
|
|
1004
1011
|
) }, void 0, !1, {
|
|
1005
1012
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1006
|
-
lineNumber:
|
|
1013
|
+
lineNumber: 1056,
|
|
1007
1014
|
columnNumber: 17
|
|
1008
1015
|
}, this)
|
|
1009
1016
|
] }, void 0, !0, {
|
|
1010
1017
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1011
|
-
lineNumber:
|
|
1018
|
+
lineNumber: 1001,
|
|
1012
1019
|
columnNumber: 13
|
|
1013
|
-
}, this) : /* @__PURE__ */ e(
|
|
1020
|
+
}, this) : /* @__PURE__ */ e(De, { children: [
|
|
1014
1021
|
/* @__PURE__ */ e("div", { className: "space-y-4", children: [
|
|
1015
1022
|
/* @__PURE__ */ e("div", { className: "flex items-end gap-4 w-full", children: [
|
|
1016
1023
|
/* @__PURE__ */ e("div", { className: "flex-1", children: [
|
|
1017
|
-
/* @__PURE__ */ e(
|
|
1024
|
+
/* @__PURE__ */ e(k, { htmlFor: "freemius_product_id", className: "text-[11px] uppercase tracking-wider text-muted-foreground font-bold mb-1.5 block", children: "Freemius Product ID" }, void 0, !1, {
|
|
1018
1025
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1019
|
-
lineNumber:
|
|
1026
|
+
lineNumber: 1081,
|
|
1020
1027
|
columnNumber: 19
|
|
1021
1028
|
}, this),
|
|
1022
1029
|
/* @__PURE__ */ e(x, { id: "freemius_product_id", ...m("freemius_product_id"), className: "h-9" }, void 0, !1, {
|
|
1023
1030
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1024
|
-
lineNumber:
|
|
1031
|
+
lineNumber: 1082,
|
|
1025
1032
|
columnNumber: 19
|
|
1026
1033
|
}, this)
|
|
1027
1034
|
] }, void 0, !0, {
|
|
1028
1035
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1029
|
-
lineNumber:
|
|
1036
|
+
lineNumber: 1080,
|
|
1030
1037
|
columnNumber: 17
|
|
1031
1038
|
}, this),
|
|
1032
1039
|
/* @__PURE__ */ e("div", { className: "flex-1", children: [
|
|
1033
|
-
/* @__PURE__ */ e(
|
|
1040
|
+
/* @__PURE__ */ e(k, { htmlFor: "freemius_plan_id", className: "text-[11px] uppercase tracking-wider text-muted-foreground font-bold mb-1.5 block", children: "Freemius Plan ID" }, void 0, !1, {
|
|
1034
1041
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1035
|
-
lineNumber:
|
|
1042
|
+
lineNumber: 1085,
|
|
1036
1043
|
columnNumber: 19
|
|
1037
1044
|
}, this),
|
|
1038
1045
|
/* @__PURE__ */ e(x, { id: "freemius_plan_id", ...m("freemius_plan_id"), className: "h-9" }, void 0, !1, {
|
|
1039
1046
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1040
|
-
lineNumber:
|
|
1047
|
+
lineNumber: 1086,
|
|
1041
1048
|
columnNumber: 19
|
|
1042
1049
|
}, this)
|
|
1043
1050
|
] }, void 0, !0, {
|
|
1044
1051
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1045
|
-
lineNumber:
|
|
1052
|
+
lineNumber: 1084,
|
|
1046
1053
|
columnNumber: 17
|
|
1047
1054
|
}, this),
|
|
1048
|
-
|
|
1049
|
-
|
|
1055
|
+
Ke ? /* @__PURE__ */ e(
|
|
1056
|
+
ns,
|
|
1050
1057
|
{
|
|
1051
1058
|
productId: l("freemius_product_id"),
|
|
1052
|
-
hasOpenDraft:
|
|
1059
|
+
hasOpenDraft: ze
|
|
1053
1060
|
},
|
|
1054
1061
|
void 0,
|
|
1055
1062
|
!1,
|
|
1056
1063
|
{
|
|
1057
1064
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1058
|
-
lineNumber:
|
|
1065
|
+
lineNumber: 1089,
|
|
1059
1066
|
columnNumber: 19
|
|
1060
1067
|
},
|
|
1061
1068
|
this
|
|
1062
1069
|
) : null
|
|
1063
1070
|
] }, void 0, !0, {
|
|
1064
1071
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1065
|
-
lineNumber:
|
|
1072
|
+
lineNumber: 1079,
|
|
1066
1073
|
columnNumber: 15
|
|
1067
1074
|
}, this),
|
|
1068
1075
|
/* @__PURE__ */ e("div", { className: "bg-muted/10 border rounded-md overflow-hidden", children: [
|
|
@@ -1070,68 +1077,68 @@ function Vs({
|
|
|
1070
1077
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
|
|
1071
1078
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-bold uppercase tracking-wider text-muted-foreground", children: "Free Trial" }, void 0, !1, {
|
|
1072
1079
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1073
|
-
lineNumber:
|
|
1080
|
+
lineNumber: 1099,
|
|
1074
1081
|
columnNumber: 21
|
|
1075
1082
|
}, this),
|
|
1076
|
-
/* @__PURE__ */ e(
|
|
1083
|
+
/* @__PURE__ */ e(E, { variant: "outline", className: "font-mono text-xs shadow-sm bg-background", children: [
|
|
1077
1084
|
String(l("trial_period_days") || 0),
|
|
1078
1085
|
" Days"
|
|
1079
1086
|
] }, void 0, !0, {
|
|
1080
1087
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1081
|
-
lineNumber:
|
|
1088
|
+
lineNumber: 1100,
|
|
1082
1089
|
columnNumber: 21
|
|
1083
1090
|
}, this)
|
|
1084
1091
|
] }, void 0, !0, {
|
|
1085
1092
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1086
|
-
lineNumber:
|
|
1093
|
+
lineNumber: 1098,
|
|
1087
1094
|
columnNumber: 19
|
|
1088
1095
|
}, this),
|
|
1089
1096
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
|
|
1090
1097
|
/* @__PURE__ */ e("span", { className: "text-[11px] font-bold uppercase tracking-wider text-muted-foreground", children: "Card Required" }, void 0, !1, {
|
|
1091
1098
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1092
|
-
lineNumber:
|
|
1099
|
+
lineNumber: 1103,
|
|
1093
1100
|
columnNumber: 21
|
|
1094
1101
|
}, this),
|
|
1095
|
-
/* @__PURE__ */ e(
|
|
1102
|
+
/* @__PURE__ */ e(E, { variant: ve ? "default" : "secondary", className: "text-xs shadow-sm", children: ve ? "Yes" : "No" }, void 0, !1, {
|
|
1096
1103
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1097
|
-
lineNumber:
|
|
1104
|
+
lineNumber: 1104,
|
|
1098
1105
|
columnNumber: 21
|
|
1099
1106
|
}, this)
|
|
1100
1107
|
] }, void 0, !0, {
|
|
1101
1108
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1102
|
-
lineNumber:
|
|
1109
|
+
lineNumber: 1102,
|
|
1103
1110
|
columnNumber: 19
|
|
1104
1111
|
}, this),
|
|
1105
1112
|
/* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground ml-auto", children: "Managed in Freemius dashboard" }, void 0, !1, {
|
|
1106
1113
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1107
|
-
lineNumber:
|
|
1114
|
+
lineNumber: 1108,
|
|
1108
1115
|
columnNumber: 19
|
|
1109
1116
|
}, this),
|
|
1110
1117
|
/* @__PURE__ */ e("input", { type: "hidden", ...m("trial_period_days", { valueAsNumber: !0 }) }, void 0, !1, {
|
|
1111
1118
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1112
|
-
lineNumber:
|
|
1119
|
+
lineNumber: 1112,
|
|
1113
1120
|
columnNumber: 19
|
|
1114
1121
|
}, this)
|
|
1115
1122
|
] }, void 0, !0, {
|
|
1116
1123
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1117
|
-
lineNumber:
|
|
1124
|
+
lineNumber: 1097,
|
|
1118
1125
|
columnNumber: 17
|
|
1119
1126
|
}, this),
|
|
1120
1127
|
/* @__PURE__ */ e("div", { className: "w-full p-4 pt-3 space-y-2", children: [
|
|
1121
1128
|
/* @__PURE__ */ e(
|
|
1122
|
-
|
|
1129
|
+
Ve,
|
|
1123
1130
|
{
|
|
1124
1131
|
idPrefix: "product",
|
|
1125
1132
|
currencies: n,
|
|
1126
|
-
prices:
|
|
1127
|
-
salePrices:
|
|
1128
|
-
managedCurrencyCodes:
|
|
1129
|
-
onPriceChange:
|
|
1130
|
-
onSalePriceChange:
|
|
1131
|
-
onAutoFill:
|
|
1133
|
+
prices: z.prices,
|
|
1134
|
+
salePrices: z.salePrices,
|
|
1135
|
+
managedCurrencyCodes: q,
|
|
1136
|
+
onPriceChange: ke,
|
|
1137
|
+
onSalePriceChange: Fe,
|
|
1138
|
+
onAutoFill: ye,
|
|
1132
1139
|
readOnly: !0,
|
|
1133
1140
|
trailing: /* @__PURE__ */ e(
|
|
1134
|
-
|
|
1141
|
+
Te,
|
|
1135
1142
|
{
|
|
1136
1143
|
idPrefix: "product",
|
|
1137
1144
|
startAt: l("sale_start_at"),
|
|
@@ -1144,7 +1151,7 @@ function Vs({
|
|
|
1144
1151
|
!1,
|
|
1145
1152
|
{
|
|
1146
1153
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1147
|
-
lineNumber:
|
|
1154
|
+
lineNumber: 1127,
|
|
1148
1155
|
columnNumber: 23
|
|
1149
1156
|
},
|
|
1150
1157
|
this
|
|
@@ -1154,124 +1161,124 @@ function Vs({
|
|
|
1154
1161
|
!1,
|
|
1155
1162
|
{
|
|
1156
1163
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1157
|
-
lineNumber:
|
|
1164
|
+
lineNumber: 1116,
|
|
1158
1165
|
columnNumber: 19
|
|
1159
1166
|
},
|
|
1160
1167
|
this
|
|
1161
1168
|
),
|
|
1162
1169
|
/* @__PURE__ */ e("p", { className: "text-[10px] leading-snug text-muted-foreground", children: "Scheduling a sale on a Freemius product generates a time-bounded Freemius coupon so the discount is enforced at Freemius checkout." }, void 0, !1, {
|
|
1163
1170
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1164
|
-
lineNumber:
|
|
1171
|
+
lineNumber: 1139,
|
|
1165
1172
|
columnNumber: 19
|
|
1166
1173
|
}, this)
|
|
1167
1174
|
] }, void 0, !0, {
|
|
1168
1175
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1169
|
-
lineNumber:
|
|
1176
|
+
lineNumber: 1115,
|
|
1170
1177
|
columnNumber: 17
|
|
1171
1178
|
}, this)
|
|
1172
1179
|
] }, void 0, !0, {
|
|
1173
1180
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1174
|
-
lineNumber:
|
|
1181
|
+
lineNumber: 1096,
|
|
1175
1182
|
columnNumber: 15
|
|
1176
1183
|
}, this)
|
|
1177
1184
|
] }, void 0, !0, {
|
|
1178
1185
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1179
|
-
lineNumber:
|
|
1186
|
+
lineNumber: 1078,
|
|
1180
1187
|
columnNumber: 15
|
|
1181
1188
|
}, this),
|
|
1182
|
-
|
|
1189
|
+
j && /* @__PURE__ */ e("div", { className: "pt-2 border-t", children: j }, void 0, !1, {
|
|
1183
1190
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1184
|
-
lineNumber:
|
|
1191
|
+
lineNumber: 1147,
|
|
1185
1192
|
columnNumber: 17
|
|
1186
1193
|
}, this)
|
|
1187
1194
|
] }, void 0, !0, {
|
|
1188
1195
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1189
|
-
lineNumber:
|
|
1196
|
+
lineNumber: 1077,
|
|
1190
1197
|
columnNumber: 13
|
|
1191
1198
|
}, this)
|
|
1192
1199
|
] }, void 0, !0, {
|
|
1193
1200
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1194
|
-
lineNumber:
|
|
1201
|
+
lineNumber: 972,
|
|
1195
1202
|
columnNumber: 9
|
|
1196
1203
|
}, this),
|
|
1197
|
-
/* @__PURE__ */ e(
|
|
1198
|
-
/* @__PURE__ */ e(
|
|
1204
|
+
/* @__PURE__ */ e(K, { title: "Product Description", hideHeader: !0, children: /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e("div", { className: "space-y-1", children: [
|
|
1205
|
+
/* @__PURE__ */ e(k, { htmlFor: "short_description", className: "text-xs uppercase font-bold text-muted-foreground tracking-wider leading-none", children: "Short Description" }, void 0, !1, {
|
|
1199
1206
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1200
|
-
lineNumber:
|
|
1207
|
+
lineNumber: 1158,
|
|
1201
1208
|
columnNumber: 15
|
|
1202
1209
|
}, this),
|
|
1203
1210
|
/* @__PURE__ */ e(x, { id: "short_description", ...m("short_description"), placeholder: "Brief summary for product cards...", className: "h-8 text-sm" }, void 0, !1, {
|
|
1204
1211
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1205
|
-
lineNumber:
|
|
1212
|
+
lineNumber: 1159,
|
|
1206
1213
|
columnNumber: 15
|
|
1207
1214
|
}, this)
|
|
1208
1215
|
] }, void 0, !0, {
|
|
1209
1216
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1210
|
-
lineNumber:
|
|
1217
|
+
lineNumber: 1157,
|
|
1211
1218
|
columnNumber: 13
|
|
1212
1219
|
}, this) }, void 0, !1, {
|
|
1213
1220
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1214
|
-
lineNumber:
|
|
1221
|
+
lineNumber: 1156,
|
|
1215
1222
|
columnNumber: 11
|
|
1216
1223
|
}, this) }, void 0, !1, {
|
|
1217
1224
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1218
|
-
lineNumber:
|
|
1225
|
+
lineNumber: 1155,
|
|
1219
1226
|
columnNumber: 9
|
|
1220
1227
|
}, this),
|
|
1221
|
-
/* @__PURE__ */ e(
|
|
1228
|
+
/* @__PURE__ */ e(K, { title: "Media Gallery", description: "Drag to reorder. First image is the hero.", children: [
|
|
1222
1229
|
/* @__PURE__ */ e(
|
|
1223
|
-
|
|
1230
|
+
ls,
|
|
1224
1231
|
{
|
|
1225
1232
|
initialMedia: se,
|
|
1226
|
-
onUpdate:
|
|
1233
|
+
onUpdate: Xe,
|
|
1227
1234
|
mediaPickerNode: h
|
|
1228
1235
|
},
|
|
1229
1236
|
void 0,
|
|
1230
1237
|
!1,
|
|
1231
1238
|
{
|
|
1232
1239
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1233
|
-
lineNumber:
|
|
1240
|
+
lineNumber: 1165,
|
|
1234
1241
|
columnNumber: 11
|
|
1235
1242
|
},
|
|
1236
1243
|
this
|
|
1237
1244
|
),
|
|
1238
1245
|
/* @__PURE__ */ e("input", { type: "hidden", ...m("product_media") }, void 0, !1, {
|
|
1239
1246
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1240
|
-
lineNumber:
|
|
1247
|
+
lineNumber: 1170,
|
|
1241
1248
|
columnNumber: 11
|
|
1242
1249
|
}, this)
|
|
1243
1250
|
] }, void 0, !0, {
|
|
1244
1251
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1245
|
-
lineNumber:
|
|
1252
|
+
lineNumber: 1164,
|
|
1246
1253
|
columnNumber: 9
|
|
1247
1254
|
}, this),
|
|
1248
1255
|
!r && /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-3 px-4 shadow-sm flex items-center justify-between gap-3 flex-wrap", children: [
|
|
1249
1256
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "New products start as a draft. Publish it from the top bar once it's ready." }, void 0, !1, {
|
|
1250
1257
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1251
|
-
lineNumber:
|
|
1258
|
+
lineNumber: 1175,
|
|
1252
1259
|
columnNumber: 13
|
|
1253
1260
|
}, this),
|
|
1254
|
-
/* @__PURE__ */ e(
|
|
1261
|
+
/* @__PURE__ */ e(Me, { disabled: U, type: "submit", size: "sm", className: "h-8 text-sm px-5", children: U ? "Saving..." : "Save Changes" }, void 0, !1, {
|
|
1255
1262
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1256
|
-
lineNumber:
|
|
1263
|
+
lineNumber: 1178,
|
|
1257
1264
|
columnNumber: 13
|
|
1258
1265
|
}, this)
|
|
1259
1266
|
] }, void 0, !0, {
|
|
1260
1267
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1261
|
-
lineNumber:
|
|
1268
|
+
lineNumber: 1174,
|
|
1262
1269
|
columnNumber: 11
|
|
1263
1270
|
}, this)
|
|
1264
1271
|
] }, void 0, !0, {
|
|
1265
1272
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1266
|
-
lineNumber:
|
|
1273
|
+
lineNumber: 822,
|
|
1267
1274
|
columnNumber: 7
|
|
1268
1275
|
}, this)
|
|
1269
1276
|
] }, void 0, !0, {
|
|
1270
1277
|
fileName: "D:/Websites/nextblock-production/libs/ecommerce/src/lib/pages/cms/products/components/ProductForm.tsx",
|
|
1271
|
-
lineNumber:
|
|
1278
|
+
lineNumber: 817,
|
|
1272
1279
|
columnNumber: 5
|
|
1273
1280
|
}, this);
|
|
1274
1281
|
}
|
|
1275
1282
|
export {
|
|
1276
|
-
|
|
1283
|
+
Rs as ProductForm
|
|
1277
1284
|
};
|