@nextblock-cms/ecom 0.13.10 → 0.13.12
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 +98 -97
- package/lib/CurrencyProvider.cjs.js +1 -1
- package/lib/CurrencyProvider.es.js +23 -23
- package/lib/components/AccountNavigationMenu.cjs.js +1 -1
- package/lib/components/AccountNavigationMenu.es.js +25 -25
- package/lib/components/AddToCartButton.cjs.js +1 -1
- package/lib/components/AddToCartButton.es.js +40 -40
- package/lib/components/Cart.cjs.js +1 -1
- package/lib/components/Cart.es.js +133 -133
- package/lib/components/CartDrawer.cjs.js +1 -1
- package/lib/components/CartDrawer.es.js +83 -83
- package/lib/components/CartIcon.cjs.js +1 -1
- package/lib/components/CartIcon.es.js +17 -17
- package/lib/components/Checkout.cjs.js +1 -1
- package/lib/components/Checkout.es.js +547 -547
- package/lib/components/CouponForm.cjs.js +1 -1
- package/lib/components/CouponForm.es.js +75 -75
- package/lib/components/CurrencySwitcher.cjs.js +1 -1
- package/lib/components/CurrencySwitcher.es.js +16 -16
- package/lib/components/CustomerProfileForm.cjs.js +1 -1
- package/lib/components/CustomerProfileForm.es.js +238 -238
- package/lib/components/FeaturedProduct.cjs.js +1 -1
- package/lib/components/FeaturedProduct.es.js +34 -34
- package/lib/components/FreemiusLicensePanel.cjs.js +1 -1
- package/lib/components/FreemiusLicensePanel.es.js +44 -44
- package/lib/components/InvoiceDocument.cjs.js +1 -1
- package/lib/components/InvoiceDocument.es.js +141 -141
- package/lib/components/InvoiceViewerShell.cjs.js +2 -2
- package/lib/components/InvoiceViewerShell.es.js +49 -49
- package/lib/components/ProductCard.cjs.js +1 -1
- package/lib/components/ProductCard.es.js +76 -76
- package/lib/components/ProductDetailsLayout.cjs.js +1 -1
- package/lib/components/ProductDetailsLayout.es.js +308 -308
- package/lib/components/ProductGallery.cjs.js +1 -1
- package/lib/components/ProductGallery.es.js +22 -22
- package/lib/components/ProductGrid.cjs.js +1 -1
- package/lib/components/ProductGrid.es.js +9 -9
- package/lib/components/ShippingEstimator.cjs.js +1 -1
- package/lib/components/ShippingEstimator.es.js +76 -76
- package/lib/components/SimpleTiptapRenderer.cjs.js +1 -1
- package/lib/components/SimpleTiptapRenderer.d.ts +9 -0
- package/lib/components/SimpleTiptapRenderer.es.js +161 -146
- package/lib/components/SubscriptionSelector.cjs.js +1 -1
- package/lib/components/SubscriptionSelector.es.js +77 -77
- package/lib/pages/cms/coupons/CouponEditorForm.cjs.js +1 -1
- package/lib/pages/cms/coupons/CouponEditorForm.es.js +108 -108
- package/lib/pages/cms/coupons/CouponsPage.cjs.js +2 -2
- package/lib/pages/cms/coupons/CouponsPage.es.js +102 -102
- package/lib/pages/cms/coupons/CreateCouponDialog.cjs.js +1 -1
- package/lib/pages/cms/coupons/CreateCouponDialog.es.js +21 -21
- package/lib/pages/cms/coupons/EditCouponPage.cjs.js +1 -1
- package/lib/pages/cms/coupons/EditCouponPage.es.js +21 -21
- package/lib/pages/cms/coupons/ProductScopePicker.cjs.js +1 -1
- package/lib/pages/cms/coupons/ProductScopePicker.es.js +56 -56
- package/lib/pages/cms/orders/ExportReportsDialog.cjs.js +1 -1
- package/lib/pages/cms/orders/ExportReportsDialog.es.js +67 -67
- package/lib/pages/cms/orders/OrderDetailPage.cjs.js +1 -1
- package/lib/pages/cms/orders/OrderDetailPage.es.js +55 -55
- package/lib/pages/cms/orders/OrderPrintButton.cjs.js +1 -1
- package/lib/pages/cms/orders/OrderPrintButton.es.js +4 -4
- package/lib/pages/cms/orders/OrderStatusForm.cjs.js +1 -1
- package/lib/pages/cms/orders/OrderStatusForm.es.js +28 -28
- package/lib/pages/cms/orders/OrdersPage.cjs.js +1 -1
- package/lib/pages/cms/orders/OrdersPage.es.js +52 -52
- package/lib/pages/cms/payments/PaymentsClient.cjs.js +1 -1
- package/lib/pages/cms/payments/PaymentsClient.es.js +164 -164
- package/lib/pages/cms/payments/PaymentsPage.cjs.js +1 -1
- package/lib/pages/cms/payments/PaymentsPage.es.js +9 -9
- package/lib/pages/cms/products/ProductsPage.cjs.js +1 -1
- package/lib/pages/cms/products/ProductsPage.es.js +25 -25
- package/lib/pages/cms/products/_id_/edit/EditProductPage.cjs.js +1 -1
- package/lib/pages/cms/products/_id_/edit/EditProductPage.es.js +48 -48
- package/lib/pages/cms/products/attributes/AttributeManagementPage.cjs.js +1 -1
- package/lib/pages/cms/products/attributes/AttributeManagementPage.es.js +24 -24
- package/lib/pages/cms/products/attributes/components/AttributeManager.cjs.js +1 -1
- package/lib/pages/cms/products/attributes/components/AttributeManager.es.js +118 -118
- package/lib/pages/cms/products/categories/CategoryManagementPage.cjs.js +1 -1
- package/lib/pages/cms/products/categories/CategoryManagementPage.es.js +18 -18
- package/lib/pages/cms/products/categories/components/CategoryManager.cjs.js +1 -1
- package/lib/pages/cms/products/categories/components/CategoryManager.es.js +136 -136
- package/lib/pages/cms/products/components/CopyProductFromLanguage.cjs.js +1 -1
- package/lib/pages/cms/products/components/CopyProductFromLanguage.es.js +77 -77
- package/lib/pages/cms/products/components/CurrencyPriceFields.cjs.js +1 -1
- package/lib/pages/cms/products/components/CurrencyPriceFields.es.js +77 -77
- package/lib/pages/cms/products/components/DeleteProductButton.cjs.js +1 -1
- package/lib/pages/cms/products/components/DeleteProductButton.es.js +10 -10
- package/lib/pages/cms/products/components/FreemiusPricingDashboard.cjs.js +1 -1
- package/lib/pages/cms/products/components/FreemiusPricingDashboard.es.js +60 -60
- package/lib/pages/cms/products/components/ProductCategorySelector.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductCategorySelector.es.js +80 -80
- package/lib/pages/cms/products/components/ProductForm.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductForm.es.js +493 -493
- package/lib/pages/cms/products/components/ProductMediaManager.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductMediaManager.es.js +50 -50
- package/lib/pages/cms/products/components/ProductsBulkTable.cjs.js +1 -1
- package/lib/pages/cms/products/components/ProductsBulkTable.es.js +145 -145
- package/lib/pages/cms/products/components/SaleScheduleFields.cjs.js +1 -1
- package/lib/pages/cms/products/components/SaleScheduleFields.es.js +60 -60
- package/lib/pages/cms/products/components/SyncFreemiusButton.cjs.js +1 -1
- package/lib/pages/cms/products/components/SyncFreemiusButton.es.js +8 -8
- package/lib/pages/cms/products/components/SyncFreemiusPricingButton.cjs.js +2 -2
- package/lib/pages/cms/products/components/SyncFreemiusPricingButton.es.js +8 -8
- package/lib/pages/cms/products/components/VariationsEditor.cjs.js +1 -1
- package/lib/pages/cms/products/components/VariationsEditor.es.js +228 -228
- package/lib/pages/cms/products/inventory/InventoryPage.cjs.js +1 -1
- package/lib/pages/cms/products/inventory/InventoryPage.es.js +9 -9
- package/lib/pages/cms/products/inventory/InventoryTableClient.cjs.js +2 -2
- package/lib/pages/cms/products/inventory/InventoryTableClient.es.js +135 -135
- package/lib/pages/cms/products/new/NewProductPage.cjs.js +1 -1
- package/lib/pages/cms/products/new/NewProductPage.es.js +24 -24
- package/lib/pages/cms/shipping/ShippingPage.cjs.js +2 -2
- package/lib/pages/cms/shipping/ShippingPage.es.js +162 -162
- package/lib/pages/cms/shipping/components/RateForm.cjs.js +1 -1
- package/lib/pages/cms/shipping/components/RateForm.es.js +296 -296
- package/lib/pages/cms/shipping/components/ZoneForm.cjs.js +1 -1
- package/lib/pages/cms/shipping/components/ZoneForm.es.js +130 -130
- package/lib/pages/cms/taxes/TaxesPage.cjs.js +1 -1
- package/lib/pages/cms/taxes/TaxesPage.es.js +126 -126
- package/lib/pages/cms/taxes/components/TaxRateForm.cjs.js +1 -1
- package/lib/pages/cms/taxes/components/TaxRateForm.es.js +54 -54
- package/lib/product-context.cjs.js +1 -1
- package/lib/product-context.es.js +8 -8
- package/package.json +4 -4
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxDEV as e, Fragment as Q } from "react/jsx-dev-runtime";
|
|
3
|
-
import Y, { useState as
|
|
4
|
-
import { Download as Z, Package as ee, ShieldCheck as
|
|
5
|
-
import { Badge as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Label as
|
|
8
|
-
import { Separator as
|
|
9
|
-
import { useTranslations as
|
|
10
|
-
import { useProduct as
|
|
11
|
-
import { ProductGallery as
|
|
3
|
+
import Y, { useState as j, useEffect as C, useMemo as E } from "react";
|
|
4
|
+
import { Download as Z, Package as ee, ShieldCheck as te } from "lucide-react";
|
|
5
|
+
import { Badge as R } from "@nextblock-cms/ui/badge";
|
|
6
|
+
import { Button as se } from "@nextblock-cms/ui/button";
|
|
7
|
+
import { Label as oe } from "@nextblock-cms/ui/label";
|
|
8
|
+
import { Separator as ie } from "@nextblock-cms/ui/separator";
|
|
9
|
+
import { useTranslations as ne, cn as le, formatPrice as $ } from "@nextblock-cms/utils";
|
|
10
|
+
import { useProduct as ce } from "../product-context.es.js";
|
|
11
|
+
import { ProductGallery as re } from "./ProductGallery.es.js";
|
|
12
12
|
import { AddToCartButton as ae } from "./AddToCartButton.es.js";
|
|
13
|
-
import { SubscriptionSelector as
|
|
14
|
-
import { SimpleTiptapRenderer as
|
|
15
|
-
import { chooseInitialVariantSelections as
|
|
16
|
-
import { useCurrency as
|
|
17
|
-
import { resolveEffectivePriceForCurrency as
|
|
13
|
+
import { SubscriptionSelector as me } from "./SubscriptionSelector.es.js";
|
|
14
|
+
import { toNoCookieEmbedSrc as de, SimpleTiptapRenderer as ue } from "./SimpleTiptapRenderer.es.js";
|
|
15
|
+
import { chooseInitialVariantSelections as B, normalizeSelectionsToAvailableVariants as F, findMatchingVariant as be, resolveTranslatedText as xe, getAvailableTermIdsForAttribute as fe } from "../variation-utils.es.js";
|
|
16
|
+
import { useCurrency as pe } from "../CurrencyProvider.es.js";
|
|
17
|
+
import { resolveEffectivePriceForCurrency as M } from "../currency.es.js";
|
|
18
18
|
import { isDigitalProduct as Ne } from "../types.es.js";
|
|
19
|
-
import { getTrialSummary as
|
|
20
|
-
function
|
|
21
|
-
const
|
|
19
|
+
import { getTrialSummary as ve } from "../trials.es.js";
|
|
20
|
+
function T(a, f, y, t) {
|
|
21
|
+
const l = {
|
|
22
22
|
kind: "product-field",
|
|
23
23
|
field: f,
|
|
24
|
-
input:
|
|
25
|
-
label:
|
|
24
|
+
input: y,
|
|
25
|
+
label: t
|
|
26
26
|
}, L = typeof window < "u" ? window.location.origin : process.env.NEXT_PUBLIC_URL || process.env.TARGET_URL || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "") || "http://localhost:3000";
|
|
27
|
-
let
|
|
27
|
+
let d = (typeof window < "u" ? window.location.origin : process.env.NEXT_PUBLIC_URL || process.env.TARGET_URL || (process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "") || "http://localhost:3000").replace(/\/+$/, "");
|
|
28
28
|
try {
|
|
29
|
-
(
|
|
29
|
+
(d.startsWith("http://") || d.startsWith("https://")) && (d = new URL(d).hostname);
|
|
30
30
|
} catch {
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
origin:
|
|
32
|
+
const k = process.env.NEXTBLOCK_VERCEL_PROJECT_ID || process.env.VERCEL_PROJECT_ID, P = process.env.NEXTBLOCK_VERCEL_WORKSPACE_ID || process.env.VERCEL_ORG_ID, v = {
|
|
33
|
+
origin: d,
|
|
34
34
|
editUrl: `${L}/cms/products/${a.id}/edit`,
|
|
35
35
|
data: {
|
|
36
36
|
parentType: "product",
|
|
@@ -38,65 +38,53 @@ function R(a, f, g, s) {
|
|
|
38
38
|
slug: a.slug,
|
|
39
39
|
languageId: a.language_id,
|
|
40
40
|
draftId: null,
|
|
41
|
-
target:
|
|
41
|
+
target: l
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
return
|
|
45
|
-
"data-vercel-edit-info": JSON.stringify(
|
|
46
|
-
"data-vercel-edit-target": JSON.stringify(
|
|
44
|
+
return k && (v.projectId = k), P && (v.workspaceId = P), {
|
|
45
|
+
"data-vercel-edit-info": JSON.stringify(v),
|
|
46
|
+
"data-vercel-edit-target": JSON.stringify(l),
|
|
47
47
|
"data-nextblock-visual-edit": `product:${f}`
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const Oe = ({
|
|
51
51
|
visualEditingEnabled: a = !1,
|
|
52
52
|
descriptionNode: f,
|
|
53
|
-
reviewsNode:
|
|
53
|
+
reviewsNode: y
|
|
54
54
|
}) => {
|
|
55
|
-
const
|
|
56
|
-
|
|
55
|
+
const t = ce(), { t: l, lang: L } = ne(), { activeCurrencyCode: u, currencies: d } = pe(), k = a ? T(
|
|
56
|
+
t,
|
|
57
57
|
"title",
|
|
58
58
|
"plain-text",
|
|
59
59
|
"Product title"
|
|
60
|
-
) : void 0, P = a ?
|
|
61
|
-
|
|
60
|
+
) : void 0, P = a ? T(
|
|
61
|
+
t,
|
|
62
62
|
"short_description",
|
|
63
63
|
"plain-text",
|
|
64
64
|
"Short description"
|
|
65
|
-
) : void 0,
|
|
66
|
-
|
|
65
|
+
) : void 0, v = a ? T(
|
|
66
|
+
t,
|
|
67
67
|
"description_json",
|
|
68
68
|
"tiptap",
|
|
69
69
|
"Product description"
|
|
70
|
-
) : void 0,
|
|
71
|
-
const
|
|
72
|
-
return
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
}, [b,
|
|
79
|
-
const
|
|
70
|
+
) : void 0, p = (o, r, n) => {
|
|
71
|
+
const U = l(o, n);
|
|
72
|
+
return U === o ? r : U;
|
|
73
|
+
}, W = t.images && t.images.length > 0 ? t.images : t.image_url ? [{ url: t.image_url, alt: t.title }] : [], N = t.custom_props?.provider === "freemius" || Ne(t), I = ve(t), i = !N && !!(t.has_variants && t.attributes?.length && t.variants?.length), b = t.attributes || [], m = t.variants || [], [D, w] = j(() => B(b, m)), [_, S] = j(1);
|
|
74
|
+
C(() => {
|
|
75
|
+
S(1);
|
|
76
|
+
}, [t.id]), C(() => {
|
|
77
|
+
i && w(B(b, m));
|
|
78
|
+
}, [b, i, t.id, m]);
|
|
79
|
+
const x = E(() => i ? F(
|
|
80
80
|
b,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
) :
|
|
84
|
-
|
|
85
|
-
JSON.stringify(
|
|
86
|
-
}, [
|
|
87
|
-
const
|
|
88
|
-
prices: s.prices,
|
|
89
|
-
salePrices: s.sale_prices,
|
|
90
|
-
fallbackPrice: s.price,
|
|
91
|
-
fallbackSalePrice: s.sale_price,
|
|
92
|
-
saleStartAt: s.sale_start_at,
|
|
93
|
-
saleEndAt: s.sale_end_at,
|
|
94
|
-
scheduledPrice: s.scheduled_price,
|
|
95
|
-
scheduledPrices: s.scheduled_prices,
|
|
96
|
-
scheduledPriceAt: s.scheduled_price_at,
|
|
97
|
-
currencyCode: u,
|
|
98
|
-
currencies: m
|
|
99
|
-
}), A = n && t ? J({
|
|
81
|
+
m,
|
|
82
|
+
D
|
|
83
|
+
) : D, [b, i, D, m]);
|
|
84
|
+
C(() => {
|
|
85
|
+
JSON.stringify(x) !== JSON.stringify(D) && w(x);
|
|
86
|
+
}, [x, D]);
|
|
87
|
+
const s = E(() => i ? be(m, x) : null, [i, x, m]), A = M({
|
|
100
88
|
prices: t.prices,
|
|
101
89
|
salePrices: t.sale_prices,
|
|
102
90
|
fallbackPrice: t.price,
|
|
@@ -107,64 +95,76 @@ const Ae = ({
|
|
|
107
95
|
scheduledPrices: t.scheduled_prices,
|
|
108
96
|
scheduledPriceAt: t.scheduled_price_at,
|
|
109
97
|
currencyCode: u,
|
|
110
|
-
currencies:
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
98
|
+
currencies: d
|
|
99
|
+
}), V = i && s ? M({
|
|
100
|
+
prices: s.prices,
|
|
101
|
+
salePrices: s.sale_prices,
|
|
102
|
+
fallbackPrice: s.price,
|
|
103
|
+
fallbackSalePrice: s.sale_price,
|
|
104
|
+
saleStartAt: s.sale_start_at,
|
|
105
|
+
saleEndAt: s.sale_end_at,
|
|
106
|
+
scheduledPrice: s.scheduled_price,
|
|
107
|
+
scheduledPrices: s.scheduled_prices,
|
|
108
|
+
scheduledPriceAt: s.scheduled_price_at,
|
|
109
|
+
currencyCode: u,
|
|
110
|
+
currencies: d
|
|
111
|
+
}) : null, h = V?.price ?? A.price, g = V?.sale_price ?? A.sale_price, c = i ? s?.stock_quantity ?? 0 : t.stock ?? 0, J = E(() => {
|
|
112
|
+
if (!s?.image_url)
|
|
113
|
+
return W;
|
|
114
|
+
const o = {
|
|
115
|
+
url: s.image_url,
|
|
116
|
+
alt: `${t.title} ${s.label}`
|
|
117
|
+
}, r = W.filter(
|
|
118
|
+
(n) => n.url !== s.image_url
|
|
119
119
|
);
|
|
120
|
-
return [
|
|
121
|
-
}, [
|
|
122
|
-
(
|
|
123
|
-
) : 0,
|
|
124
|
-
...
|
|
125
|
-
sku:
|
|
126
|
-
price:
|
|
127
|
-
prices:
|
|
128
|
-
sale_price: typeof
|
|
129
|
-
sale_prices:
|
|
130
|
-
image_url:
|
|
131
|
-
stock:
|
|
132
|
-
variant_id:
|
|
133
|
-
variant_label:
|
|
134
|
-
selected_options:
|
|
120
|
+
return [o, ...r];
|
|
121
|
+
}, [W, t.title, s]), G = typeof g == "number" && h > 0 ? Math.round(
|
|
122
|
+
(h - g) / h * 100
|
|
123
|
+
) : 0, K = i && s ? {
|
|
124
|
+
...t,
|
|
125
|
+
sku: s.sku,
|
|
126
|
+
price: s.price,
|
|
127
|
+
prices: s.prices,
|
|
128
|
+
sale_price: typeof s.sale_price == "number" ? s.sale_price : null,
|
|
129
|
+
sale_prices: s.sale_prices,
|
|
130
|
+
image_url: s.image_url || t.image_url,
|
|
131
|
+
stock: s.stock_quantity,
|
|
132
|
+
variant_id: s.id,
|
|
133
|
+
variant_label: s.label,
|
|
134
|
+
selected_options: s.selected_options,
|
|
135
135
|
currency_code: u
|
|
136
136
|
} : {
|
|
137
|
-
...
|
|
137
|
+
...t,
|
|
138
138
|
currency_code: u
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
(
|
|
142
|
-
...
|
|
143
|
-
[
|
|
139
|
+
}, X = (o, r) => {
|
|
140
|
+
w(
|
|
141
|
+
(n) => F(b, m, {
|
|
142
|
+
...n,
|
|
143
|
+
[o]: r
|
|
144
144
|
})
|
|
145
145
|
);
|
|
146
|
-
},
|
|
146
|
+
}, q = p(
|
|
147
147
|
"ecommerce.in_stock",
|
|
148
|
-
`${
|
|
149
|
-
{ count: String(
|
|
150
|
-
),
|
|
148
|
+
`${c} in stock`,
|
|
149
|
+
{ count: String(c) }
|
|
150
|
+
), O = p(
|
|
151
151
|
"ecommerce.out_of_stock",
|
|
152
152
|
"Out of stock"
|
|
153
|
-
),
|
|
153
|
+
), z = p(
|
|
154
154
|
"ecommerce.select_options",
|
|
155
155
|
"Select Options"
|
|
156
|
-
), H =
|
|
156
|
+
), H = p(
|
|
157
157
|
"ecommerce.variant_selection_required",
|
|
158
158
|
"Select one term from every dropdown to resolve a variation."
|
|
159
159
|
);
|
|
160
160
|
return /* @__PURE__ */ e("div", { className: "w-full animate-in fade-in slide-in-from-bottom-4 duration-700 ease-out", children: [
|
|
161
161
|
/* @__PURE__ */ e("div", { className: "container mx-auto px-4 md:px-6 py-12", children: /* @__PURE__ */ e("div", { className: "grid gap-12 lg:grid-cols-[2fr_3fr] items-start", children: [
|
|
162
|
-
/* @__PURE__ */ e("div", { className: "w-full max-w-2xl mx-auto lg:max-w-none", children: /* @__PURE__ */ e(
|
|
163
|
-
fileName: "
|
|
162
|
+
/* @__PURE__ */ e("div", { className: "w-full max-w-2xl mx-auto lg:max-w-none", children: /* @__PURE__ */ e(re, { images: J, className: "w-full" }, void 0, !1, {
|
|
163
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
164
164
|
lineNumber: 333,
|
|
165
165
|
columnNumber: 13
|
|
166
166
|
}, void 0) }, void 0, !1, {
|
|
167
|
-
fileName: "
|
|
167
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
168
168
|
lineNumber: 332,
|
|
169
169
|
columnNumber: 11
|
|
170
170
|
}, void 0),
|
|
@@ -174,13 +174,13 @@ const Ae = ({
|
|
|
174
174
|
"h1",
|
|
175
175
|
{
|
|
176
176
|
className: "text-3xl sm:text-4xl lg:text-5xl font-extrabold tracking-tight text-foreground leading-[1.1] lg:mt-0",
|
|
177
|
-
...
|
|
178
|
-
children:
|
|
177
|
+
...k,
|
|
178
|
+
children: t.title
|
|
179
179
|
},
|
|
180
180
|
void 0,
|
|
181
181
|
!1,
|
|
182
182
|
{
|
|
183
|
-
fileName: "
|
|
183
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
184
184
|
lineNumber: 341,
|
|
185
185
|
columnNumber: 17
|
|
186
186
|
},
|
|
@@ -192,55 +192,55 @@ const Ae = ({
|
|
|
192
192
|
href: "#reviews-section",
|
|
193
193
|
className: "flex items-center gap-1.5 group hover:opacity-85 transition-opacity",
|
|
194
194
|
children: [
|
|
195
|
-
/* @__PURE__ */ e("div", { className: "flex items-center text-amber-500", children: Array.from({ length: 5 }).map((
|
|
195
|
+
/* @__PURE__ */ e("div", { className: "flex items-center text-amber-500", children: Array.from({ length: 5 }).map((o, r) => /* @__PURE__ */ e(
|
|
196
196
|
"svg",
|
|
197
197
|
{
|
|
198
|
-
className:
|
|
198
|
+
className: le(
|
|
199
199
|
"h-4 w-4 fill-current",
|
|
200
|
-
|
|
200
|
+
r < Math.round(t.average_rating || 0) ? "text-amber-500" : "text-slate-300 dark:text-slate-700"
|
|
201
201
|
),
|
|
202
202
|
viewBox: "0 0 20 20",
|
|
203
203
|
fill: "currentColor",
|
|
204
204
|
children: /* @__PURE__ */ e("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }, void 0, !1, {
|
|
205
|
-
fileName: "
|
|
205
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
206
206
|
lineNumber: 367,
|
|
207
207
|
columnNumber: 27
|
|
208
208
|
}, void 0)
|
|
209
209
|
},
|
|
210
|
-
|
|
210
|
+
r,
|
|
211
211
|
!1,
|
|
212
212
|
{
|
|
213
|
-
fileName: "
|
|
213
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
214
214
|
lineNumber: 356,
|
|
215
215
|
columnNumber: 25
|
|
216
216
|
},
|
|
217
217
|
void 0
|
|
218
218
|
)) }, void 0, !1, {
|
|
219
|
-
fileName: "
|
|
219
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
220
220
|
lineNumber: 354,
|
|
221
221
|
columnNumber: 21
|
|
222
222
|
}, void 0),
|
|
223
|
-
|
|
224
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children:
|
|
225
|
-
fileName: "
|
|
223
|
+
t.total_reviews && t.total_reviews > 0 ? /* @__PURE__ */ e(Q, { children: [
|
|
224
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-slate-700 dark:text-slate-300", children: t.average_rating?.toFixed(1) }, void 0, !1, {
|
|
225
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
226
226
|
lineNumber: 373,
|
|
227
227
|
columnNumber: 25
|
|
228
228
|
}, void 0),
|
|
229
229
|
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground underline decoration-dotted group-hover:text-primary", children: [
|
|
230
230
|
"(",
|
|
231
|
-
|
|
231
|
+
t.total_reviews === 1 ? l("reviews.review_count_one", { count: t.total_reviews }) : l("reviews.review_count_other", { count: t.total_reviews }),
|
|
232
232
|
")"
|
|
233
233
|
] }, void 0, !0, {
|
|
234
|
-
fileName: "
|
|
234
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
235
235
|
lineNumber: 376,
|
|
236
236
|
columnNumber: 25
|
|
237
237
|
}, void 0)
|
|
238
238
|
] }, void 0, !0, {
|
|
239
|
-
fileName: "
|
|
239
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
240
240
|
lineNumber: 372,
|
|
241
241
|
columnNumber: 23
|
|
242
|
-
}, void 0) : /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground group-hover:text-primary underline decoration-dotted", children:
|
|
243
|
-
fileName: "
|
|
242
|
+
}, void 0) : /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground group-hover:text-primary underline decoration-dotted", children: l("reviews.be_the_first") }, void 0, !1, {
|
|
243
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
244
244
|
lineNumber: 383,
|
|
245
245
|
columnNumber: 23
|
|
246
246
|
}, void 0)
|
|
@@ -249,40 +249,40 @@ const Ae = ({
|
|
|
249
249
|
void 0,
|
|
250
250
|
!0,
|
|
251
251
|
{
|
|
252
|
-
fileName: "
|
|
252
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
253
253
|
lineNumber: 350,
|
|
254
254
|
columnNumber: 19
|
|
255
255
|
},
|
|
256
256
|
void 0
|
|
257
257
|
) }, void 0, !1, {
|
|
258
|
-
fileName: "
|
|
258
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
259
259
|
lineNumber: 349,
|
|
260
260
|
columnNumber: 17
|
|
261
261
|
}, void 0),
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
t.categories && t.categories.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1.5 text-xs font-bold uppercase tracking-widest text-amber-600 dark:text-amber-400", children: t.categories.map((o, r) => {
|
|
263
|
+
const n = xe(
|
|
264
|
+
o.name,
|
|
265
|
+
o.name_translations,
|
|
266
266
|
L
|
|
267
267
|
);
|
|
268
268
|
return /* @__PURE__ */ e(Y.Fragment, { children: [
|
|
269
|
-
|
|
270
|
-
fileName: "
|
|
269
|
+
r > 0 && /* @__PURE__ */ e("span", { className: "text-muted-foreground/30", children: "•" }, void 0, !1, {
|
|
270
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
271
271
|
lineNumber: 401,
|
|
272
272
|
columnNumber: 29
|
|
273
273
|
}, void 0),
|
|
274
|
-
/* @__PURE__ */ e("span", { children:
|
|
275
|
-
fileName: "
|
|
274
|
+
/* @__PURE__ */ e("span", { children: n }, void 0, !1, {
|
|
275
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
276
276
|
lineNumber: 403,
|
|
277
277
|
columnNumber: 27
|
|
278
278
|
}, void 0)
|
|
279
|
-
] },
|
|
280
|
-
fileName: "
|
|
279
|
+
] }, o.id, !0, {
|
|
280
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
281
281
|
lineNumber: 399,
|
|
282
282
|
columnNumber: 25
|
|
283
283
|
}, void 0);
|
|
284
284
|
}) }, void 0, !1, {
|
|
285
|
-
fileName: "
|
|
285
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
286
286
|
lineNumber: 391,
|
|
287
287
|
columnNumber: 19
|
|
288
288
|
}, void 0),
|
|
@@ -291,228 +291,228 @@ const Ae = ({
|
|
|
291
291
|
{
|
|
292
292
|
className: "prose prose-neutral dark:prose-invert max-w-none text-muted-foreground leading-relaxed text-left",
|
|
293
293
|
...P,
|
|
294
|
-
children:
|
|
294
|
+
children: t.short_description ? /* @__PURE__ */ e(
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
297
|
className: "text-lg mb-4 leading-relaxed",
|
|
298
298
|
dangerouslySetInnerHTML: {
|
|
299
|
-
__html:
|
|
299
|
+
__html: de(t.short_description) ?? t.short_description
|
|
300
300
|
}
|
|
301
301
|
},
|
|
302
302
|
void 0,
|
|
303
303
|
!1,
|
|
304
304
|
{
|
|
305
|
-
fileName: "
|
|
305
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
306
306
|
lineNumber: 415,
|
|
307
307
|
columnNumber: 21
|
|
308
308
|
},
|
|
309
309
|
void 0
|
|
310
310
|
) : a ? /* @__PURE__ */ e("p", { className: "text-lg mb-4 italic text-muted-foreground", children: "Add a short product description." }, void 0, !1, {
|
|
311
|
-
fileName: "
|
|
312
|
-
lineNumber:
|
|
311
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
312
|
+
lineNumber: 424,
|
|
313
313
|
columnNumber: 21
|
|
314
314
|
}, void 0) : null
|
|
315
315
|
},
|
|
316
316
|
void 0,
|
|
317
317
|
!1,
|
|
318
318
|
{
|
|
319
|
-
fileName: "
|
|
319
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
320
320
|
lineNumber: 410,
|
|
321
321
|
columnNumber: 17
|
|
322
322
|
},
|
|
323
323
|
void 0
|
|
324
324
|
),
|
|
325
325
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: [
|
|
326
|
-
typeof
|
|
327
|
-
|
|
326
|
+
typeof g == "number" && /* @__PURE__ */ e(
|
|
327
|
+
R,
|
|
328
328
|
{
|
|
329
329
|
variant: "destructive",
|
|
330
330
|
className: "px-2.5 py-1 text-xs font-bold uppercase tracking-wide animate-pulse shadow-sm",
|
|
331
|
-
children:
|
|
332
|
-
percent: String(
|
|
331
|
+
children: l("ecommerce.sale_badge", {
|
|
332
|
+
percent: String(G)
|
|
333
333
|
})
|
|
334
334
|
},
|
|
335
335
|
void 0,
|
|
336
336
|
!1,
|
|
337
337
|
{
|
|
338
|
-
fileName: "
|
|
339
|
-
lineNumber:
|
|
338
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
339
|
+
lineNumber: 432,
|
|
340
340
|
columnNumber: 21
|
|
341
341
|
},
|
|
342
342
|
void 0
|
|
343
343
|
),
|
|
344
|
-
!
|
|
345
|
-
|
|
344
|
+
!N && c > 0 && c < 10 && /* @__PURE__ */ e(
|
|
345
|
+
R,
|
|
346
346
|
{
|
|
347
347
|
variant: "outline",
|
|
348
348
|
className: "text-amber-600 border-amber-200 bg-amber-50",
|
|
349
|
-
children:
|
|
350
|
-
count: String(
|
|
349
|
+
children: l("ecommerce.low_stock", {
|
|
350
|
+
count: String(c)
|
|
351
351
|
})
|
|
352
352
|
},
|
|
353
353
|
void 0,
|
|
354
354
|
!1,
|
|
355
355
|
{
|
|
356
|
-
fileName: "
|
|
357
|
-
lineNumber:
|
|
356
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
357
|
+
lineNumber: 442,
|
|
358
358
|
columnNumber: 21
|
|
359
359
|
},
|
|
360
360
|
void 0
|
|
361
361
|
),
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
I && /* @__PURE__ */ e(
|
|
363
|
+
R,
|
|
364
364
|
{
|
|
365
365
|
variant: "secondary",
|
|
366
366
|
className: "border border-emerald-200 bg-emerald-50 text-emerald-800",
|
|
367
|
-
children:
|
|
367
|
+
children: I.label
|
|
368
368
|
},
|
|
369
369
|
void 0,
|
|
370
370
|
!1,
|
|
371
371
|
{
|
|
372
|
-
fileName: "
|
|
373
|
-
lineNumber:
|
|
372
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
373
|
+
lineNumber: 452,
|
|
374
374
|
columnNumber: 21
|
|
375
375
|
},
|
|
376
376
|
void 0
|
|
377
377
|
)
|
|
378
378
|
] }, void 0, !0, {
|
|
379
|
-
fileName: "
|
|
380
|
-
lineNumber:
|
|
379
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
380
|
+
lineNumber: 430,
|
|
381
381
|
columnNumber: 17
|
|
382
382
|
}, void 0)
|
|
383
383
|
] }, void 0, !0, {
|
|
384
|
-
fileName: "
|
|
384
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
385
385
|
lineNumber: 338,
|
|
386
386
|
columnNumber: 15
|
|
387
387
|
}, void 0) }, void 0, !1, {
|
|
388
|
-
fileName: "
|
|
388
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
389
389
|
lineNumber: 337,
|
|
390
390
|
columnNumber: 13
|
|
391
391
|
}, void 0),
|
|
392
392
|
/* @__PURE__ */ e("div", { className: "p-5 rounded-2xl bg-card/60 border border-border/80 shadow-md backdrop-blur-md space-y-4", children: [
|
|
393
|
-
|
|
394
|
-
fileName: "
|
|
395
|
-
lineNumber:
|
|
393
|
+
N ? /* @__PURE__ */ e(me, { product: t }, void 0, !1, {
|
|
394
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
395
|
+
lineNumber: 466,
|
|
396
396
|
columnNumber: 17
|
|
397
397
|
}, void 0) : /* @__PURE__ */ e("div", { className: "space-y-3.5", children: [
|
|
398
398
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-4", children: [
|
|
399
399
|
/* @__PURE__ */ e("div", { className: "space-y-1", children: [
|
|
400
|
-
/* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-widest", children:
|
|
401
|
-
fileName: "
|
|
402
|
-
lineNumber:
|
|
400
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-widest", children: p("ecommerce.price", "Price") }, void 0, !1, {
|
|
401
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
402
|
+
lineNumber: 472,
|
|
403
403
|
columnNumber: 23
|
|
404
404
|
}, void 0),
|
|
405
405
|
/* @__PURE__ */ e("div", { className: "flex items-baseline gap-2.5", children: [
|
|
406
|
-
/* @__PURE__ */ e("span", { className: "text-3xl font-extrabold text-foreground", children:
|
|
407
|
-
|
|
406
|
+
/* @__PURE__ */ e("span", { className: "text-3xl font-extrabold text-foreground", children: $(
|
|
407
|
+
g ?? h,
|
|
408
408
|
u
|
|
409
409
|
) }, void 0, !1, {
|
|
410
|
-
fileName: "
|
|
411
|
-
lineNumber:
|
|
410
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
411
|
+
lineNumber: 476,
|
|
412
412
|
columnNumber: 25
|
|
413
413
|
}, void 0),
|
|
414
|
-
typeof
|
|
415
|
-
fileName: "
|
|
416
|
-
lineNumber:
|
|
414
|
+
typeof g == "number" && /* @__PURE__ */ e("span", { className: "text-lg text-muted-foreground line-through decoration-destructive/20 decoration-1", children: $(h, u) }, void 0, !1, {
|
|
415
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
416
|
+
lineNumber: 483,
|
|
417
417
|
columnNumber: 27
|
|
418
418
|
}, void 0)
|
|
419
419
|
] }, void 0, !0, {
|
|
420
|
-
fileName: "
|
|
421
|
-
lineNumber:
|
|
420
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
421
|
+
lineNumber: 475,
|
|
422
422
|
columnNumber: 23
|
|
423
423
|
}, void 0)
|
|
424
424
|
] }, void 0, !0, {
|
|
425
|
-
fileName: "
|
|
426
|
-
lineNumber:
|
|
425
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
426
|
+
lineNumber: 471,
|
|
427
427
|
columnNumber: 21
|
|
428
428
|
}, void 0),
|
|
429
|
-
!
|
|
429
|
+
!N && (s || !i) && /* @__PURE__ */ e("div", { className: "text-right space-y-1", children: [
|
|
430
430
|
/* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-widest block", children: [
|
|
431
|
-
!
|
|
431
|
+
!i && t.sku && /* @__PURE__ */ e("span", { className: "mr-2 font-normal lowercase normal-case text-muted-foreground/70", children: [
|
|
432
432
|
"SKU: ",
|
|
433
|
-
|
|
433
|
+
t.sku
|
|
434
434
|
] }, void 0, !0, {
|
|
435
|
-
fileName: "
|
|
436
|
-
lineNumber:
|
|
435
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
436
|
+
lineNumber: 494,
|
|
437
437
|
columnNumber: 29
|
|
438
438
|
}, void 0),
|
|
439
|
-
|
|
439
|
+
p("ecommerce.status", "Status")
|
|
440
440
|
] }, void 0, !0, {
|
|
441
|
-
fileName: "
|
|
442
|
-
lineNumber:
|
|
441
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
442
|
+
lineNumber: 492,
|
|
443
443
|
columnNumber: 25
|
|
444
444
|
}, void 0),
|
|
445
|
-
/* @__PURE__ */ e("div", { className: (
|
|
446
|
-
fileName: "
|
|
447
|
-
lineNumber:
|
|
445
|
+
/* @__PURE__ */ e("div", { className: (c ?? 0) > 0 ? "text-emerald-600 dark:text-emerald-400 font-semibold text-sm" : "text-destructive font-semibold text-sm", children: (c ?? 0) > 0 ? q : O }, void 0, !1, {
|
|
446
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
447
|
+
lineNumber: 500,
|
|
448
448
|
columnNumber: 25
|
|
449
449
|
}, void 0)
|
|
450
450
|
] }, void 0, !0, {
|
|
451
|
-
fileName: "
|
|
452
|
-
lineNumber:
|
|
451
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
452
|
+
lineNumber: 491,
|
|
453
453
|
columnNumber: 23
|
|
454
454
|
}, void 0)
|
|
455
455
|
] }, void 0, !0, {
|
|
456
|
-
fileName: "
|
|
457
|
-
lineNumber:
|
|
456
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
457
|
+
lineNumber: 470,
|
|
458
458
|
columnNumber: 19
|
|
459
459
|
}, void 0),
|
|
460
|
-
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
460
|
+
i && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "grid gap-3 sm:grid-cols-2", children: b.map((o) => {
|
|
461
|
+
const r = fe(
|
|
462
|
+
m,
|
|
463
|
+
o.id,
|
|
464
|
+
x
|
|
465
465
|
);
|
|
466
466
|
return /* @__PURE__ */ e("div", { className: "space-y-1", children: [
|
|
467
467
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: [
|
|
468
468
|
/* @__PURE__ */ e(
|
|
469
|
-
|
|
469
|
+
oe,
|
|
470
470
|
{
|
|
471
|
-
htmlFor: `attribute-${
|
|
471
|
+
htmlFor: `attribute-${o.id}`,
|
|
472
472
|
className: "text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",
|
|
473
|
-
children:
|
|
473
|
+
children: o.name
|
|
474
474
|
},
|
|
475
475
|
void 0,
|
|
476
476
|
!1,
|
|
477
477
|
{
|
|
478
|
-
fileName: "
|
|
479
|
-
lineNumber:
|
|
478
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
479
|
+
lineNumber: 522,
|
|
480
480
|
columnNumber: 33
|
|
481
481
|
},
|
|
482
482
|
void 0
|
|
483
483
|
),
|
|
484
|
-
|
|
485
|
-
fileName: "
|
|
486
|
-
lineNumber:
|
|
484
|
+
s?.sku && /* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground font-mono", children: s.sku }, void 0, !1, {
|
|
485
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
486
|
+
lineNumber: 529,
|
|
487
487
|
columnNumber: 35
|
|
488
488
|
}, void 0)
|
|
489
489
|
] }, void 0, !0, {
|
|
490
|
-
fileName: "
|
|
491
|
-
lineNumber:
|
|
490
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
491
|
+
lineNumber: 521,
|
|
492
492
|
columnNumber: 31
|
|
493
493
|
}, void 0),
|
|
494
494
|
/* @__PURE__ */ e(
|
|
495
495
|
"select",
|
|
496
496
|
{
|
|
497
|
-
id: `attribute-${
|
|
497
|
+
id: `attribute-${o.id}`,
|
|
498
498
|
className: "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
499
|
-
value:
|
|
500
|
-
onChange: (
|
|
501
|
-
|
|
502
|
-
|
|
499
|
+
value: x[o.id] || "",
|
|
500
|
+
onChange: (n) => X(
|
|
501
|
+
o.id,
|
|
502
|
+
n.target.value
|
|
503
503
|
),
|
|
504
|
-
children:
|
|
504
|
+
children: o.terms.map((n) => /* @__PURE__ */ e(
|
|
505
505
|
"option",
|
|
506
506
|
{
|
|
507
|
-
value:
|
|
508
|
-
disabled: !
|
|
509
|
-
children:
|
|
507
|
+
value: n.id,
|
|
508
|
+
disabled: !r.has(n.id),
|
|
509
|
+
children: n.value
|
|
510
510
|
},
|
|
511
|
-
|
|
511
|
+
n.id,
|
|
512
512
|
!1,
|
|
513
513
|
{
|
|
514
|
-
fileName: "
|
|
515
|
-
lineNumber:
|
|
514
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
515
|
+
lineNumber: 546,
|
|
516
516
|
columnNumber: 35
|
|
517
517
|
},
|
|
518
518
|
void 0
|
|
@@ -521,227 +521,227 @@ const Ae = ({
|
|
|
521
521
|
void 0,
|
|
522
522
|
!1,
|
|
523
523
|
{
|
|
524
|
-
fileName: "
|
|
525
|
-
lineNumber:
|
|
524
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
525
|
+
lineNumber: 534,
|
|
526
526
|
columnNumber: 31
|
|
527
527
|
},
|
|
528
528
|
void 0
|
|
529
529
|
)
|
|
530
|
-
] },
|
|
531
|
-
fileName: "
|
|
532
|
-
lineNumber:
|
|
530
|
+
] }, o.id, !0, {
|
|
531
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
532
|
+
lineNumber: 520,
|
|
533
533
|
columnNumber: 29
|
|
534
534
|
}, void 0);
|
|
535
535
|
}) }, void 0, !1, {
|
|
536
|
-
fileName: "
|
|
537
|
-
lineNumber:
|
|
536
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
537
|
+
lineNumber: 510,
|
|
538
538
|
columnNumber: 23
|
|
539
539
|
}, void 0) }, void 0, !1, {
|
|
540
|
-
fileName: "
|
|
541
|
-
lineNumber:
|
|
540
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
541
|
+
lineNumber: 509,
|
|
542
542
|
columnNumber: 21
|
|
543
543
|
}, void 0),
|
|
544
|
-
|
|
545
|
-
fileName: "
|
|
546
|
-
lineNumber:
|
|
544
|
+
i && !s && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground italic pt-1", children: H }, void 0, !1, {
|
|
545
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
546
|
+
lineNumber: 563,
|
|
547
547
|
columnNumber: 21
|
|
548
548
|
}, void 0),
|
|
549
549
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-3 pt-1", children: [
|
|
550
|
-
!
|
|
550
|
+
!N && (c ?? 0) > 0 && /* @__PURE__ */ e("div", { className: "flex items-center border rounded-lg h-12 bg-background border-input select-none", children: [
|
|
551
551
|
/* @__PURE__ */ e(
|
|
552
552
|
"button",
|
|
553
553
|
{
|
|
554
554
|
type: "button",
|
|
555
|
-
onClick: () =>
|
|
555
|
+
onClick: () => S((o) => Math.max(1, o - 1)),
|
|
556
556
|
className: "px-3 h-full flex items-center justify-center text-muted-foreground hover:text-foreground active:scale-95 transition-all text-lg font-medium",
|
|
557
|
-
disabled:
|
|
557
|
+
disabled: _ <= 1,
|
|
558
558
|
children: "-"
|
|
559
559
|
},
|
|
560
560
|
void 0,
|
|
561
561
|
!1,
|
|
562
562
|
{
|
|
563
|
-
fileName: "
|
|
564
|
-
lineNumber:
|
|
563
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
564
|
+
lineNumber: 572,
|
|
565
565
|
columnNumber: 25
|
|
566
566
|
},
|
|
567
567
|
void 0
|
|
568
568
|
),
|
|
569
|
-
/* @__PURE__ */ e("span", { className: "w-8 text-center text-sm font-semibold", children:
|
|
570
|
-
fileName: "
|
|
571
|
-
lineNumber:
|
|
569
|
+
/* @__PURE__ */ e("span", { className: "w-8 text-center text-sm font-semibold", children: _ }, void 0, !1, {
|
|
570
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
571
|
+
lineNumber: 580,
|
|
572
572
|
columnNumber: 25
|
|
573
573
|
}, void 0),
|
|
574
574
|
/* @__PURE__ */ e(
|
|
575
575
|
"button",
|
|
576
576
|
{
|
|
577
577
|
type: "button",
|
|
578
|
-
onClick: () =>
|
|
579
|
-
(
|
|
578
|
+
onClick: () => S(
|
|
579
|
+
(o) => c !== null && o >= c ? o : o + 1
|
|
580
580
|
),
|
|
581
581
|
className: "px-3 h-full flex items-center justify-center text-muted-foreground hover:text-foreground active:scale-95 transition-all text-lg font-medium",
|
|
582
|
-
disabled:
|
|
582
|
+
disabled: c !== null && _ >= c,
|
|
583
583
|
children: "+"
|
|
584
584
|
},
|
|
585
585
|
void 0,
|
|
586
586
|
!1,
|
|
587
587
|
{
|
|
588
|
-
fileName: "
|
|
589
|
-
lineNumber:
|
|
588
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
589
|
+
lineNumber: 583,
|
|
590
590
|
columnNumber: 25
|
|
591
591
|
},
|
|
592
592
|
void 0
|
|
593
593
|
)
|
|
594
594
|
] }, void 0, !0, {
|
|
595
|
-
fileName: "
|
|
596
|
-
lineNumber:
|
|
595
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
596
|
+
lineNumber: 571,
|
|
597
597
|
columnNumber: 23
|
|
598
598
|
}, void 0),
|
|
599
|
-
|
|
600
|
-
|
|
599
|
+
i && (!s || (c ?? 0) <= 0) ? /* @__PURE__ */ e(
|
|
600
|
+
se,
|
|
601
601
|
{
|
|
602
602
|
disabled: !0,
|
|
603
603
|
className: "flex-1 h-12 text-md font-bold shadow-md",
|
|
604
|
-
children:
|
|
604
|
+
children: s ? O : z
|
|
605
605
|
},
|
|
606
606
|
void 0,
|
|
607
607
|
!1,
|
|
608
608
|
{
|
|
609
|
-
fileName: "
|
|
610
|
-
lineNumber:
|
|
609
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
610
|
+
lineNumber: 604,
|
|
611
611
|
columnNumber: 23
|
|
612
612
|
},
|
|
613
613
|
void 0
|
|
614
614
|
) : /* @__PURE__ */ e(
|
|
615
615
|
ae,
|
|
616
616
|
{
|
|
617
|
-
product:
|
|
618
|
-
quantity:
|
|
617
|
+
product: K,
|
|
618
|
+
quantity: _,
|
|
619
619
|
className: "flex-1 h-12 text-md font-bold shadow-md transition-all hover:shadow-lg active:scale-[0.98]"
|
|
620
620
|
},
|
|
621
621
|
void 0,
|
|
622
622
|
!1,
|
|
623
623
|
{
|
|
624
|
-
fileName: "
|
|
625
|
-
lineNumber:
|
|
624
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
625
|
+
lineNumber: 611,
|
|
626
626
|
columnNumber: 23
|
|
627
627
|
},
|
|
628
628
|
void 0
|
|
629
629
|
)
|
|
630
630
|
] }, void 0, !0, {
|
|
631
|
-
fileName: "
|
|
632
|
-
lineNumber:
|
|
631
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
632
|
+
lineNumber: 569,
|
|
633
633
|
columnNumber: 19
|
|
634
634
|
}, void 0)
|
|
635
635
|
] }, void 0, !0, {
|
|
636
|
-
fileName: "
|
|
637
|
-
lineNumber:
|
|
636
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
637
|
+
lineNumber: 468,
|
|
638
638
|
columnNumber: 17
|
|
639
639
|
}, void 0),
|
|
640
|
-
/* @__PURE__ */ e(
|
|
641
|
-
fileName: "
|
|
642
|
-
lineNumber:
|
|
640
|
+
/* @__PURE__ */ e(ie, { className: "opacity-60 my-0.5" }, void 0, !1, {
|
|
641
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
642
|
+
lineNumber: 621,
|
|
643
643
|
columnNumber: 15
|
|
644
644
|
}, void 0),
|
|
645
645
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-4 text-center text-[11px] font-medium text-muted-foreground pt-1", children: [
|
|
646
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2", children:
|
|
646
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2", children: N ? /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
647
647
|
/* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5" }, void 0, !1, {
|
|
648
|
-
fileName: "
|
|
649
|
-
lineNumber:
|
|
648
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
649
|
+
lineNumber: 627,
|
|
650
650
|
columnNumber: 23
|
|
651
651
|
}, void 0),
|
|
652
|
-
|
|
652
|
+
l("ecommerce.instant_digital_delivery")
|
|
653
653
|
] }, void 0, !0, {
|
|
654
|
-
fileName: "
|
|
655
|
-
lineNumber:
|
|
654
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
655
|
+
lineNumber: 626,
|
|
656
656
|
columnNumber: 21
|
|
657
657
|
}, void 0) : /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
658
658
|
/* @__PURE__ */ e(ee, { className: "h-3.5 w-3.5" }, void 0, !1, {
|
|
659
|
-
fileName: "
|
|
660
|
-
lineNumber:
|
|
659
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
660
|
+
lineNumber: 632,
|
|
661
661
|
columnNumber: 23
|
|
662
662
|
}, void 0),
|
|
663
|
-
|
|
663
|
+
l("ecommerce.free_shipping")
|
|
664
664
|
] }, void 0, !0, {
|
|
665
|
-
fileName: "
|
|
666
|
-
lineNumber:
|
|
665
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
666
|
+
lineNumber: 631,
|
|
667
667
|
columnNumber: 21
|
|
668
668
|
}, void 0) }, void 0, !1, {
|
|
669
|
-
fileName: "
|
|
670
|
-
lineNumber:
|
|
669
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
670
|
+
lineNumber: 624,
|
|
671
671
|
columnNumber: 17
|
|
672
672
|
}, void 0),
|
|
673
673
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2", children: /* @__PURE__ */ e("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
674
|
-
/* @__PURE__ */ e(
|
|
675
|
-
fileName: "
|
|
676
|
-
lineNumber:
|
|
674
|
+
/* @__PURE__ */ e(te, { className: "h-3.5 w-3.5" }, void 0, !1, {
|
|
675
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
676
|
+
lineNumber: 639,
|
|
677
677
|
columnNumber: 21
|
|
678
678
|
}, void 0),
|
|
679
|
-
|
|
679
|
+
l("ecommerce.secure_checkout")
|
|
680
680
|
] }, void 0, !0, {
|
|
681
|
-
fileName: "
|
|
682
|
-
lineNumber:
|
|
681
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
682
|
+
lineNumber: 638,
|
|
683
683
|
columnNumber: 19
|
|
684
684
|
}, void 0) }, void 0, !1, {
|
|
685
|
-
fileName: "
|
|
686
|
-
lineNumber:
|
|
685
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
686
|
+
lineNumber: 637,
|
|
687
687
|
columnNumber: 17
|
|
688
688
|
}, void 0)
|
|
689
689
|
] }, void 0, !0, {
|
|
690
|
-
fileName: "
|
|
691
|
-
lineNumber:
|
|
690
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
691
|
+
lineNumber: 623,
|
|
692
692
|
columnNumber: 15
|
|
693
693
|
}, void 0)
|
|
694
694
|
] }, void 0, !0, {
|
|
695
|
-
fileName: "
|
|
696
|
-
lineNumber:
|
|
695
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
696
|
+
lineNumber: 464,
|
|
697
697
|
columnNumber: 13
|
|
698
698
|
}, void 0)
|
|
699
699
|
] }, void 0, !0, {
|
|
700
|
-
fileName: "
|
|
700
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
701
701
|
lineNumber: 336,
|
|
702
702
|
columnNumber: 11
|
|
703
703
|
}, void 0)
|
|
704
704
|
] }, void 0, !0, {
|
|
705
|
-
fileName: "
|
|
705
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
706
706
|
lineNumber: 331,
|
|
707
707
|
columnNumber: 9
|
|
708
708
|
}, void 0) }, void 0, !1, {
|
|
709
|
-
fileName: "
|
|
709
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
710
710
|
lineNumber: 330,
|
|
711
711
|
columnNumber: 7
|
|
712
712
|
}, void 0),
|
|
713
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 w-full", ...f ? void 0 :
|
|
714
|
-
fileName: "
|
|
715
|
-
lineNumber:
|
|
713
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 w-full", ...f ? void 0 : v, children: f || (t.description_json ? /* @__PURE__ */ e("div", { className: "container mx-auto px-4 md:px-6 pb-12 prose prose-neutral dark:prose-invert max-w-none leading-relaxed", children: /* @__PURE__ */ e(ue, { content: t.description_json }, void 0, !1, {
|
|
714
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
715
|
+
lineNumber: 654,
|
|
716
716
|
columnNumber: 13
|
|
717
717
|
}, void 0) }, void 0, !1, {
|
|
718
|
-
fileName: "
|
|
719
|
-
lineNumber:
|
|
718
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
719
|
+
lineNumber: 653,
|
|
720
720
|
columnNumber: 11
|
|
721
|
-
}, void 0) : /* @__PURE__ */ e("div", { className: "container mx-auto px-4 md:px-6 pb-12", children: /* @__PURE__ */ e("p", { className: "italic text-sm text-muted-foreground", children:
|
|
722
|
-
fileName: "
|
|
723
|
-
lineNumber:
|
|
721
|
+
}, void 0) : /* @__PURE__ */ e("div", { className: "container mx-auto px-4 md:px-6 pb-12", children: /* @__PURE__ */ e("p", { className: "italic text-sm text-muted-foreground", children: l("ecommerce.no_description") }, void 0, !1, {
|
|
722
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
723
|
+
lineNumber: 658,
|
|
724
724
|
columnNumber: 13
|
|
725
725
|
}, void 0) }, void 0, !1, {
|
|
726
|
-
fileName: "
|
|
727
|
-
lineNumber:
|
|
726
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
727
|
+
lineNumber: 657,
|
|
728
728
|
columnNumber: 11
|
|
729
729
|
}, void 0)) }, void 0, !1, {
|
|
730
|
-
fileName: "
|
|
731
|
-
lineNumber:
|
|
730
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
731
|
+
lineNumber: 649,
|
|
732
732
|
columnNumber: 7
|
|
733
733
|
}, void 0),
|
|
734
|
-
|
|
735
|
-
fileName: "
|
|
736
|
-
lineNumber:
|
|
734
|
+
y && /* @__PURE__ */ e("div", { id: "reviews-section", className: "border-t border-border mt-12 pt-12", children: y }, void 0, !1, {
|
|
735
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
736
|
+
lineNumber: 667,
|
|
737
737
|
columnNumber: 9
|
|
738
738
|
}, void 0)
|
|
739
739
|
] }, void 0, !0, {
|
|
740
|
-
fileName: "
|
|
740
|
+
fileName: "D:/Websites/nextblock-sandbox/libs/ecommerce/src/lib/components/ProductDetailsLayout.tsx",
|
|
741
741
|
lineNumber: 329,
|
|
742
742
|
columnNumber: 5
|
|
743
743
|
}, void 0);
|
|
744
744
|
};
|
|
745
745
|
export {
|
|
746
|
-
|
|
746
|
+
Oe as ProductDetailsLayout
|
|
747
747
|
};
|