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