@propeller-commerce/propeller-v2-react-ui 0.15.11 → 0.18.0
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/CHANGELOG.md +107 -0
- package/README.md +17 -5
- package/dist/index.cjs +149 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -5
- package/dist/index.d.ts +78 -5
- package/dist/index.js +149 -114
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +24 -19
- package/dist/pure.cjs.map +1 -1
- package/dist/pure.d.cts +10 -0
- package/dist/pure.d.ts +10 -0
- package/dist/pure.js +25 -20
- package/dist/pure.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5,6 +5,8 @@ var propellerV2CoreUi = require('@propeller-commerce/propeller-v2-core-ui');
|
|
|
5
5
|
var React6 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var propellerSdkV2 = require('@propeller-commerce/propeller-sdk-v2');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
10
|
var lucideReact = require('lucide-react');
|
|
9
11
|
|
|
10
12
|
function _interopNamespace(e) {
|
|
@@ -738,7 +740,8 @@ function useCart(options) {
|
|
|
738
740
|
const { graphqlClient, user, companyId, configuration, onCartCreated } = options;
|
|
739
741
|
const language = options.language || configuration?.language || "NL";
|
|
740
742
|
const [cart, setCart] = React6.useState(null);
|
|
741
|
-
const [
|
|
743
|
+
const [createdCartId, setCreatedCartId] = React6.useState("");
|
|
744
|
+
const cartId = options.cartId || createdCartId;
|
|
742
745
|
const [loading, setLoading] = React6.useState(false);
|
|
743
746
|
const [error, setError] = React6.useState(null);
|
|
744
747
|
const notesTimers = React6.useRef({});
|
|
@@ -774,13 +777,13 @@ function useCart(options) {
|
|
|
774
777
|
imageVariantFilters: configuration?.imageVariantFiltersSmall,
|
|
775
778
|
onCartCreated: (c) => {
|
|
776
779
|
setCart(c);
|
|
777
|
-
|
|
780
|
+
setCreatedCartId(c.cartId);
|
|
778
781
|
onCartCreated?.(c);
|
|
779
782
|
}
|
|
780
783
|
};
|
|
781
784
|
const resolved = await initCart(config);
|
|
782
785
|
setCart(resolved);
|
|
783
|
-
|
|
786
|
+
setCreatedCartId(resolved.cartId);
|
|
784
787
|
return resolved;
|
|
785
788
|
}, [graphqlClient, user, companyId, language, configuration, onCartCreated]);
|
|
786
789
|
const addItem = React6.useCallback(async (opts) => {
|
|
@@ -795,7 +798,7 @@ function useCart(options) {
|
|
|
795
798
|
if (opts.onAddToCart) {
|
|
796
799
|
const resultCart2 = opts.onAddToCart(opts.product, opts.cluster?.clusterId, opts.quantity, childItemInputs, opts.notes, opts.price);
|
|
797
800
|
setCart(resultCart2);
|
|
798
|
-
|
|
801
|
+
setCreatedCartId(resultCart2.cartId);
|
|
799
802
|
const addedItem2 = resultCart2.items?.find((i) => i.productId === opts.product.productId) ?? null;
|
|
800
803
|
opts.afterAddToCart?.(resultCart2, addedItem2);
|
|
801
804
|
return propellerV2CoreUi.ok({ cart: resultCart2, item: addedItem2 });
|
|
@@ -816,7 +819,7 @@ function useCart(options) {
|
|
|
816
819
|
imageVariantFilters: configuration?.imageVariantFiltersSmall
|
|
817
820
|
});
|
|
818
821
|
setCart(resultCart);
|
|
819
|
-
|
|
822
|
+
setCreatedCartId(resultCart.cartId);
|
|
820
823
|
const addedItem = resultCart.items?.find((i) => i.productId === opts.product.productId) ?? null;
|
|
821
824
|
opts.afterAddToCart?.(resultCart, addedItem);
|
|
822
825
|
return propellerV2CoreUi.ok({ cart: resultCart, item: addedItem });
|
|
@@ -1409,7 +1412,7 @@ function useFavorites(options) {
|
|
|
1409
1412
|
if (onEdit) {
|
|
1410
1413
|
onEdit(listId, data);
|
|
1411
1414
|
cancelEdit();
|
|
1412
|
-
onListChanged?.();
|
|
1415
|
+
onListChanged?.({ action: "updated", listId, ...data });
|
|
1413
1416
|
return;
|
|
1414
1417
|
}
|
|
1415
1418
|
setSaving(true);
|
|
@@ -1424,7 +1427,7 @@ function useFavorites(options) {
|
|
|
1424
1427
|
const updated = await service.updateFavoriteList(listId, { name: data.name, isDefault: data.isDefault });
|
|
1425
1428
|
setLists((prev) => prev.map((l) => String(l.id) === listId ? updated : l));
|
|
1426
1429
|
cancelEdit();
|
|
1427
|
-
onListChanged?.();
|
|
1430
|
+
onListChanged?.({ action: "updated", listId, name: data.name, isDefault: data.isDefault });
|
|
1428
1431
|
} catch (e) {
|
|
1429
1432
|
setError(e instanceof Error ? e.message : "Failed to update list");
|
|
1430
1433
|
} finally {
|
|
@@ -1441,7 +1444,7 @@ function useFavorites(options) {
|
|
|
1441
1444
|
if (onDelete) {
|
|
1442
1445
|
onDelete(listId);
|
|
1443
1446
|
setListToDelete(null);
|
|
1444
|
-
onListChanged?.();
|
|
1447
|
+
onListChanged?.({ action: "deleted", listId, name: list.name });
|
|
1445
1448
|
return;
|
|
1446
1449
|
}
|
|
1447
1450
|
setSaving(true);
|
|
@@ -1450,7 +1453,7 @@ function useFavorites(options) {
|
|
|
1450
1453
|
try {
|
|
1451
1454
|
const service = propellerV2CoreUi.createServices(graphqlClient).favoriteList;
|
|
1452
1455
|
await service.deleteFavoriteList(listId);
|
|
1453
|
-
onListChanged?.();
|
|
1456
|
+
onListChanged?.({ action: "deleted", listId, name: list.name });
|
|
1454
1457
|
} catch (e) {
|
|
1455
1458
|
setError(e instanceof Error ? e.message : "Failed to delete list");
|
|
1456
1459
|
setLists((prev) => [...prev, list]);
|
|
@@ -1463,7 +1466,7 @@ function useFavorites(options) {
|
|
|
1463
1466
|
const data = { name, isDefault };
|
|
1464
1467
|
if (onCreate) {
|
|
1465
1468
|
onCreate(data);
|
|
1466
|
-
onListChanged?.();
|
|
1469
|
+
onListChanged?.({ action: "created", name, isDefault });
|
|
1467
1470
|
return;
|
|
1468
1471
|
}
|
|
1469
1472
|
setSaving(true);
|
|
@@ -1480,7 +1483,7 @@ function useFavorites(options) {
|
|
|
1480
1483
|
if (propellerV2CoreUi.isCustomer(user)) createInput.customerId = user.customerId;
|
|
1481
1484
|
const created = await service.createFavoriteList(createInput);
|
|
1482
1485
|
setLists((prev) => [...prev, created]);
|
|
1483
|
-
onListChanged?.();
|
|
1486
|
+
onListChanged?.({ action: "created", listId: created?.id, name, isDefault });
|
|
1484
1487
|
} catch (e) {
|
|
1485
1488
|
setError(e instanceof Error ? e.message : "Failed to create list");
|
|
1486
1489
|
} finally {
|
|
@@ -2202,6 +2205,15 @@ function useProductInfo(options) {
|
|
|
2202
2205
|
clusterImageUrl
|
|
2203
2206
|
};
|
|
2204
2207
|
}
|
|
2208
|
+
|
|
2209
|
+
// src/composables/shared/utils/listingUserId.ts
|
|
2210
|
+
function resolveListingUserId(user, configuration) {
|
|
2211
|
+
if (user && "contactId" in user) return user.contactId;
|
|
2212
|
+
if (user && "customerId" in user) return user.customerId;
|
|
2213
|
+
return configuration?.anonymousUserId;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
// src/composables/react/useProductSearch.ts
|
|
2205
2217
|
var inflightFetches2 = /* @__PURE__ */ new Set();
|
|
2206
2218
|
function buildAttributeInput(names) {
|
|
2207
2219
|
if (!names || names.length === 0) return void 0;
|
|
@@ -2306,7 +2318,7 @@ function useProductSearch(options) {
|
|
|
2306
2318
|
] : [];
|
|
2307
2319
|
const priceFilter = options.priceFilterMin !== void 0 || options.priceFilterMax !== void 0 ? { from: options.priceFilterMin ?? 0, to: options.priceFilterMax ?? 999999 } : void 0;
|
|
2308
2320
|
const inventoryFilter = propellerV2CoreUi.buildInventoryFilter(options.availability, options.minStock);
|
|
2309
|
-
const userId = options.user
|
|
2321
|
+
const userId = resolveListingUserId(options.user, configuration);
|
|
2310
2322
|
const contactId = options.user && "contactId" in options.user ? options.user.contactId : void 0;
|
|
2311
2323
|
const customerId = options.user && "customerId" in options.user ? options.user.customerId : void 0;
|
|
2312
2324
|
const orderlistScope = options.orderlistIds && options.orderlistIds.length > 0 ? {
|
|
@@ -2443,7 +2455,7 @@ function useProductSearch(options) {
|
|
|
2443
2455
|
applyOrderlists: options.applyOrderlists !== false,
|
|
2444
2456
|
orderlistIds: options.orderlistIds
|
|
2445
2457
|
} : { applyOrderlists: false };
|
|
2446
|
-
const userId = options.user
|
|
2458
|
+
const userId = resolveListingUserId(options.user, configuration);
|
|
2447
2459
|
const contactId = options.user && "contactId" in options.user ? options.user.contactId : void 0;
|
|
2448
2460
|
const customerId = options.user && "customerId" in options.user ? options.user.customerId : void 0;
|
|
2449
2461
|
const inventoryFilter = propellerV2CoreUi.buildInventoryFilter(options.availability, options.minStock);
|
|
@@ -2609,7 +2621,7 @@ function useQuickOrder(options) {
|
|
|
2609
2621
|
try {
|
|
2610
2622
|
const service = propellerV2CoreUi.createServices(graphqlClient).category;
|
|
2611
2623
|
const orderlistScope = orderlistIds && orderlistIds.length > 0 ? { applyOrderlists: applyOrderlists !== false, orderlistIds } : { applyOrderlists: false };
|
|
2612
|
-
const userId = user
|
|
2624
|
+
const userId = resolveListingUserId(user, configuration);
|
|
2613
2625
|
const contactId = user && "contactId" in user ? user.contactId : void 0;
|
|
2614
2626
|
const customerId = user && "customerId" in user ? user.customerId : void 0;
|
|
2615
2627
|
const input = {
|
|
@@ -2751,7 +2763,7 @@ function useSpareParts(options) {
|
|
|
2751
2763
|
[isControlled, options.parts, internalParts]
|
|
2752
2764
|
);
|
|
2753
2765
|
const isLoading = !isControlled && internalLoading;
|
|
2754
|
-
const userId = options.user
|
|
2766
|
+
const userId = resolveListingUserId(options.user, options.configuration);
|
|
2755
2767
|
const contactId = options.user && "contactId" in options.user ? options.user.contactId : void 0;
|
|
2756
2768
|
const customerId = options.user && "customerId" in options.user ? options.user.customerId : void 0;
|
|
2757
2769
|
const userKey = `${contactId ?? ""}:${customerId ?? ""}`;
|
|
@@ -3054,9 +3066,7 @@ function useProductSlider(options) {
|
|
|
3054
3066
|
}
|
|
3055
3067
|
}
|
|
3056
3068
|
function resolveUserId() {
|
|
3057
|
-
|
|
3058
|
-
if (options.user && "customerId" in options.user) return options.user.customerId;
|
|
3059
|
-
return void 0;
|
|
3069
|
+
return resolveListingUserId(options.user, options.configuration);
|
|
3060
3070
|
}
|
|
3061
3071
|
const fetchCrossupsells = React6.useCallback(async (input) => {
|
|
3062
3072
|
setLoading(true);
|
|
@@ -4043,6 +4053,9 @@ LoginFormExport.RegisterLink = LoginFormRegisterLink;
|
|
|
4043
4053
|
LoginFormExport.GuestCheckoutButton = LoginFormGuestCheckoutButton;
|
|
4044
4054
|
LoginFormExport.ErrorMessage = LoginFormErrorMessage;
|
|
4045
4055
|
var LoginForm_default = LoginFormExport;
|
|
4056
|
+
function cn(...inputs) {
|
|
4057
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
4058
|
+
}
|
|
4046
4059
|
function AccountIconAndMenu(rawProps) {
|
|
4047
4060
|
const props = useInfraProps(rawProps);
|
|
4048
4061
|
const LoginFormImpl = props.loginFormComponent ?? LoginForm_default;
|
|
@@ -4191,7 +4204,7 @@ function AccountIconAndMenu(rawProps) {
|
|
|
4191
4204
|
onClick: (event) => handleIconClick(),
|
|
4192
4205
|
"aria-label": propellerV2CoreUi.getLabel(props.labels, "accountLabel", "Account"),
|
|
4193
4206
|
"data-open": menuOpen ? "true" : "false",
|
|
4194
|
-
className: `propeller-account-menu__trigger inline-flex items-center gap-2 px-3 py-2 rounded-control text-sm font-medium transition-colors text-white hover:bg-white/10${props.iconClassName ? " " + props.iconClassName : ""}
|
|
4207
|
+
className: cn(`propeller-account-menu__trigger inline-flex items-center gap-2 px-3 py-2 rounded-control text-sm font-medium transition-colors text-white hover:bg-white/10${props.iconClassName ? " " + props.iconClassName : ""}`),
|
|
4195
4208
|
children: [
|
|
4196
4209
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4197
4210
|
"svg",
|
|
@@ -4219,7 +4232,7 @@ function AccountIconAndMenu(rawProps) {
|
|
|
4219
4232
|
menuOpen ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4220
4233
|
"div",
|
|
4221
4234
|
{
|
|
4222
|
-
className: `propeller-account-menu__popover absolute right-0 mt-2 w-80 bg-popover text-foreground rounded-container shadow-lg border border-border py-4 px-5 z-50${props.menuClassName ? " " + props.menuClassName : ""}
|
|
4235
|
+
className: cn(`propeller-account-menu__popover absolute right-0 mt-2 w-80 bg-popover text-foreground rounded-container shadow-lg border border-border py-4 px-5 z-50${props.menuClassName ? " " + props.menuClassName : ""}`),
|
|
4223
4236
|
children: [
|
|
4224
4237
|
!!props.user ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4225
4238
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-account-menu__user pb-3 mb-3 border-b border-border", children: [
|
|
@@ -4580,7 +4593,7 @@ function AddToCart(rawProps) {
|
|
|
4580
4593
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4581
4594
|
"div",
|
|
4582
4595
|
{
|
|
4583
|
-
className: `propeller-add-to-cart ${props.className || ""}
|
|
4596
|
+
className: cn(`propeller-add-to-cart ${props.className || ""}`),
|
|
4584
4597
|
"data-loading": loading ? "true" : "false",
|
|
4585
4598
|
children: [
|
|
4586
4599
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-add-to-cart__controls flex flex-wrap items-center gap-2 w-full md:flex-nowrap", children: [
|
|
@@ -4950,7 +4963,14 @@ function AddToFavorite(rawProps) {
|
|
|
4950
4963
|
setMemberListIds(newMemberIds);
|
|
4951
4964
|
setSelectedListId("");
|
|
4952
4965
|
setIsOpen(false);
|
|
4953
|
-
if (props.onFavoriteChanged)
|
|
4966
|
+
if (props.onFavoriteChanged) {
|
|
4967
|
+
props.onFavoriteChanged({
|
|
4968
|
+
action: "added",
|
|
4969
|
+
listId: selectedListId,
|
|
4970
|
+
productId: props.productId,
|
|
4971
|
+
clusterId: props.clusterId
|
|
4972
|
+
});
|
|
4973
|
+
}
|
|
4954
4974
|
} catch (error) {
|
|
4955
4975
|
console.error("Error adding to favorite list:", error);
|
|
4956
4976
|
} finally {
|
|
@@ -4967,7 +4987,14 @@ function AddToFavorite(rawProps) {
|
|
|
4967
4987
|
setMemberListIds(newMemberIds);
|
|
4968
4988
|
setSelectedListId("");
|
|
4969
4989
|
setIsOpen(false);
|
|
4970
|
-
if (props.onFavoriteChanged)
|
|
4990
|
+
if (props.onFavoriteChanged) {
|
|
4991
|
+
props.onFavoriteChanged({
|
|
4992
|
+
action: "removed",
|
|
4993
|
+
listId,
|
|
4994
|
+
productId: props.productId,
|
|
4995
|
+
clusterId: props.clusterId
|
|
4996
|
+
});
|
|
4997
|
+
}
|
|
4971
4998
|
} catch (error) {
|
|
4972
4999
|
console.error("Error removing from favorite list:", error);
|
|
4973
5000
|
} finally {
|
|
@@ -5007,7 +5034,7 @@ function AddToFavorite(rawProps) {
|
|
|
5007
5034
|
type: "button",
|
|
5008
5035
|
onClick: (event) => toggleModal(),
|
|
5009
5036
|
title: isFavorited() ? propellerV2CoreUi.getLabel(props.labels, "removeFromFavorites", "Remove from favorites") : propellerV2CoreUi.getLabel(props.labels, "addToFavorites", "Add to favorites"),
|
|
5010
|
-
className: `propeller-add-to-favorite__btn inline-flex items-center justify-center rounded-control border p-2.5 transition-colors ${isFavorited() ? "border-primary/30 bg-primary/5 text-primary hover:bg-primary/10" : "border-border bg-card text-foreground-subtle hover:text-primary hover:border-primary/30 hover:bg-primary/5"} ${props.className || ""}
|
|
5037
|
+
className: cn(`propeller-add-to-favorite__btn inline-flex items-center justify-center rounded-control border p-2.5 transition-colors ${isFavorited() ? "border-primary/30 bg-primary/5 text-primary hover:bg-primary/10" : "border-border bg-card text-foreground-subtle hover:text-primary hover:border-primary/30 hover:bg-primary/5"} ${props.className || ""}`),
|
|
5011
5038
|
children: [
|
|
5012
5039
|
isFavorited() ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5013
5040
|
"svg",
|
|
@@ -6156,7 +6183,7 @@ function AddressSelector(props) {
|
|
|
6156
6183
|
setIsLoading(false);
|
|
6157
6184
|
}
|
|
6158
6185
|
}
|
|
6159
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-address-selector ${props.className || ""}
|
|
6186
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-address-selector ${props.className || ""}`), children: [
|
|
6160
6187
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6161
6188
|
"button",
|
|
6162
6189
|
{
|
|
@@ -6299,7 +6326,7 @@ function Breadcrumbs(props) {
|
|
|
6299
6326
|
return index === displayItems.length - 1;
|
|
6300
6327
|
}
|
|
6301
6328
|
const showSeparatorBefore = (index) => props.showHome !== false || index > 0;
|
|
6302
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": propellerV2CoreUi.getLabel(props.labels, "breadcrumbAriaLabel", "Breadcrumb"), className: `propeller-breadcrumbs ${props.className || ""}
|
|
6329
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": propellerV2CoreUi.getLabel(props.labels, "breadcrumbAriaLabel", "Breadcrumb"), className: cn(`propeller-breadcrumbs ${props.className || ""}`), children: /* @__PURE__ */ jsxRuntime.jsxs("ol", { className: "propeller-breadcrumbs__list flex flex-wrap items-center text-sm text-muted-foreground", children: [
|
|
6303
6330
|
props.showHome !== false ? /* @__PURE__ */ jsxRuntime.jsx("li", { className: "propeller-breadcrumbs__item flex items-center", "data-home": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6304
6331
|
"a",
|
|
6305
6332
|
{
|
|
@@ -6377,7 +6404,7 @@ function CartBonusItems(rawProps) {
|
|
|
6377
6404
|
const money = (value) => propellerV2CoreUi.formatPrice(value, { symbol: currency });
|
|
6378
6405
|
const productName = (item) => propellerV2CoreUi.getLocalizedValue(item.product?.names, props.language, "Product");
|
|
6379
6406
|
const productImage = (item) => item.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
|
|
6380
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-cart-bonus-items ${props.className || "mt-2"}
|
|
6407
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-cart-bonus-items ${props.className || "mt-2"}`), children: [
|
|
6381
6408
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-cart-bonus-items__title text-lg font-semibold mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Bonus items") }),
|
|
6382
6409
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cart-bonus-items__list space-y-4", children: items.map((item) => {
|
|
6383
6410
|
const img = productImage(item);
|
|
@@ -6524,7 +6551,7 @@ function ItemStock(props) {
|
|
|
6524
6551
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: hasInventory() ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6525
6552
|
"div",
|
|
6526
6553
|
{
|
|
6527
|
-
className: `propeller-item-stock flex flex-wrap items-center gap-1.5 ${props.className || ""}
|
|
6554
|
+
className: cn(`propeller-item-stock flex flex-wrap items-center gap-1.5 ${props.className || ""}`),
|
|
6528
6555
|
"data-available": isAvailable() ? "true" : "false",
|
|
6529
6556
|
"data-stock": getStockStatusData(),
|
|
6530
6557
|
children: [
|
|
@@ -6853,7 +6880,7 @@ function CartItem(rawProps) {
|
|
|
6853
6880
|
return /* @__PURE__ */ jsxRuntime.jsx(CartItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6854
6881
|
"div",
|
|
6855
6882
|
{
|
|
6856
|
-
className: `propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}
|
|
6883
|
+
className: cn(`propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}`),
|
|
6857
6884
|
"data-bundle": isBundleItem() ? "true" : "false",
|
|
6858
6885
|
"data-loading": loading ? "true" : "false",
|
|
6859
6886
|
children: rawProps.children
|
|
@@ -6863,7 +6890,7 @@ function CartItem(rawProps) {
|
|
|
6863
6890
|
return /* @__PURE__ */ jsxRuntime.jsx(CartItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6864
6891
|
"div",
|
|
6865
6892
|
{
|
|
6866
|
-
className: `propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}
|
|
6893
|
+
className: cn(`propeller-cart-item flex flex-wrap md:flex-nowrap items-start gap-4 ${props.cardFrame === false ? "" : "bg-card p-4 rounded-container shadow-sm border border-border"} ${props.className || ""}`),
|
|
6867
6894
|
"data-bundle": isBundleItem() ? "true" : "false",
|
|
6868
6895
|
"data-loading": loading ? "true" : "false",
|
|
6869
6896
|
children: [
|
|
@@ -7335,7 +7362,7 @@ function CartIconAndSidebar(rawProps) {
|
|
|
7335
7362
|
type: "button",
|
|
7336
7363
|
onClick: () => handleIconClick(),
|
|
7337
7364
|
"aria-label": propellerV2CoreUi.getLabel(props.labels, "cartIconLabel", "Shopping cart"),
|
|
7338
|
-
className: `propeller-cart-icon__trigger relative inline-flex items-center justify-center p-2 rounded-control transition-colors text-foreground${props.iconClassName ? " " + props.iconClassName : ""}
|
|
7365
|
+
className: cn(`propeller-cart-icon__trigger relative inline-flex items-center justify-center p-2 rounded-control transition-colors text-foreground${props.iconClassName ? " " + props.iconClassName : ""}`),
|
|
7339
7366
|
children: [
|
|
7340
7367
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7341
7368
|
"svg",
|
|
@@ -7387,7 +7414,7 @@ function CartIconAndSidebar(rawProps) {
|
|
|
7387
7414
|
"aria-modal": "true",
|
|
7388
7415
|
"aria-label": sidebarTitle,
|
|
7389
7416
|
"data-open": sidebarOpen ? "true" : "false",
|
|
7390
|
-
className: `propeller-cart-icon__sidebar fixed inset-y-0 right-0 z-[70] w-full max-w-md bg-card shadow-2xl transform transition-transform duration-300 ease-in-out border-l border-border${sidebarOpen ? " translate-x-0" : " translate-x-full"}${props.sidebarClassName ? " " + props.sidebarClassName : ""}
|
|
7417
|
+
className: cn(`propeller-cart-icon__sidebar fixed inset-y-0 right-0 z-[70] w-full max-w-md bg-card shadow-2xl transform transition-transform duration-300 ease-in-out border-l border-border${sidebarOpen ? " translate-x-0" : " translate-x-full"}${props.sidebarClassName ? " " + props.sidebarClassName : ""}`),
|
|
7391
7418
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col h-full", children: isMounted ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7392
7419
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-icon__sidebar-header flex items-center justify-between px-5 py-4 border-b border-border", children: [
|
|
7393
7420
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -8019,7 +8046,7 @@ function CategoryDescription(props) {
|
|
|
8019
8046
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8020
8047
|
"div",
|
|
8021
8048
|
{
|
|
8022
|
-
className: `propeller-category-description mb-6 ${props.className || ""}
|
|
8049
|
+
className: cn(`propeller-category-description mb-6 ${props.className || ""}`),
|
|
8023
8050
|
"data-expanded": expanded ? "true" : "false",
|
|
8024
8051
|
"data-truncatable": shouldTruncate ? "true" : "false",
|
|
8025
8052
|
children: [
|
|
@@ -8049,7 +8076,7 @@ function CategoryShortDescription(props) {
|
|
|
8049
8076
|
(d) => d.language === props.language
|
|
8050
8077
|
);
|
|
8051
8078
|
const html = match?.value || "";
|
|
8052
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-category-short-description mb-6 ${props.className || ""}
|
|
8079
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-category-short-description mb-6 ${props.className || ""}`), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8053
8080
|
"div",
|
|
8054
8081
|
{
|
|
8055
8082
|
className: "propeller-category-short-description__content prose prose-slate max-w-none text-muted-foreground",
|
|
@@ -8184,7 +8211,7 @@ function ClusterCard(rawProps) {
|
|
|
8184
8211
|
return /* @__PURE__ */ jsxRuntime.jsx(ClusterCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8185
8212
|
"div",
|
|
8186
8213
|
{
|
|
8187
|
-
className: `propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className ?? ""}
|
|
8214
|
+
className: cn(`propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className ?? ""}`),
|
|
8188
8215
|
"data-cluster-id": cluster.clusterId,
|
|
8189
8216
|
"data-layout": isRow ? "row" : "grid",
|
|
8190
8217
|
children: rawProps.children
|
|
@@ -8194,7 +8221,7 @@ function ClusterCard(rawProps) {
|
|
|
8194
8221
|
return /* @__PURE__ */ jsxRuntime.jsx(ClusterCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8195
8222
|
"div",
|
|
8196
8223
|
{
|
|
8197
|
-
className: `propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}
|
|
8224
|
+
className: cn(`propeller-cluster-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`),
|
|
8198
8225
|
"data-layout": isRow ? "row" : "grid",
|
|
8199
8226
|
children: [
|
|
8200
8227
|
props.showImage !== false ? /* @__PURE__ */ jsxRuntime.jsx(ClusterCardImage, {}) : null,
|
|
@@ -8486,7 +8513,7 @@ function MachineCard(props) {
|
|
|
8486
8513
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8487
8514
|
"div",
|
|
8488
8515
|
{
|
|
8489
|
-
className: `propeller-machine-card group relative flex h-full flex-col overflow-hidden rounded-lg border border-border bg-background ${props.className ?? ""}
|
|
8516
|
+
className: cn(`propeller-machine-card group relative flex h-full flex-col overflow-hidden rounded-lg border border-border bg-background ${props.className ?? ""}`),
|
|
8490
8517
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8491
8518
|
"a",
|
|
8492
8519
|
{
|
|
@@ -8547,7 +8574,7 @@ function LoginToOrderButton(props) {
|
|
|
8547
8574
|
"button",
|
|
8548
8575
|
{
|
|
8549
8576
|
type: "button",
|
|
8550
|
-
className: `propeller-login-to-order inline-flex items-center justify-center gap-2 h-10 px-4 w-full rounded-control bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity ${props.className || ""}
|
|
8577
|
+
className: cn(`propeller-login-to-order inline-flex items-center justify-center gap-2 h-10 px-4 w-full rounded-control bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity ${props.className || ""}`),
|
|
8551
8578
|
onClick: () => {
|
|
8552
8579
|
if (props.onLoginClick) props.onLoginClick();
|
|
8553
8580
|
},
|
|
@@ -8608,7 +8635,7 @@ function ProductPriceDisplay(props) {
|
|
|
8608
8635
|
function getSecondaryTaxLabel() {
|
|
8609
8636
|
return props.includeTax ? propellerV2CoreUi.getLabel(props.labels, "exclTax", "excl. VAT") : propellerV2CoreUi.getLabel(props.labels, "inclTax", "incl. VAT");
|
|
8610
8637
|
}
|
|
8611
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-price ${props.className || ""}
|
|
8638
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-price ${props.className || ""}`), "data-hidden": isHidden2() ? "true" : "false", children: [
|
|
8612
8639
|
isHidden2() && props.showLoginPrompt !== false ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-product-price__login-prompt text-sm text-muted-foreground italic", children: propellerV2CoreUi.getLabel(props.labels, "loginToSeePrices", "Log in to see prices") }) : null,
|
|
8613
8640
|
!isHidden2() && !!getLeadingPrice() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__content flex flex-col gap-0.5", children: [
|
|
8614
8641
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-price__primary flex items-baseline gap-2", children: [
|
|
@@ -8755,7 +8782,7 @@ function ProductCardRoot(rawProps) {
|
|
|
8755
8782
|
return /* @__PURE__ */ jsxRuntime.jsx(ProductCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8756
8783
|
"div",
|
|
8757
8784
|
{
|
|
8758
|
-
className: `propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}
|
|
8785
|
+
className: cn(`propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`),
|
|
8759
8786
|
"data-layout": isRow ? "row" : "grid",
|
|
8760
8787
|
children: rawProps.children
|
|
8761
8788
|
}
|
|
@@ -8764,7 +8791,7 @@ function ProductCardRoot(rawProps) {
|
|
|
8764
8791
|
return /* @__PURE__ */ jsxRuntime.jsx(ProductCardContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8765
8792
|
"div",
|
|
8766
8793
|
{
|
|
8767
|
-
className: `propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}
|
|
8794
|
+
className: cn(`propeller-product-card group relative flex h-full overflow-hidden rounded-container border border-border bg-card shadow-sm transition-all duration-200 hover:shadow-md hover:border-secondary/20 ${isRow ? "flex-row flex-wrap md:flex-nowrap items-center" : "flex-col"} ${props.className || ""}`),
|
|
8768
8795
|
"data-layout": isRow ? "row" : "grid",
|
|
8769
8796
|
children: [
|
|
8770
8797
|
props.showImage !== false ? /* @__PURE__ */ jsxRuntime.jsx(ProductCardImage, {}) : null,
|
|
@@ -9211,7 +9238,7 @@ function ProductGrid(rawProps) {
|
|
|
9211
9238
|
return /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: gridConfig, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridSearchContext.Provider, { value: compoundCtx, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9212
9239
|
"div",
|
|
9213
9240
|
{
|
|
9214
|
-
className: `propeller-product-grid w-full ${props.className || ""}
|
|
9241
|
+
className: cn(`propeller-product-grid w-full ${props.className || ""}`),
|
|
9215
9242
|
"data-loading": getIsLoading() ? "true" : "false",
|
|
9216
9243
|
"data-mode": "compound",
|
|
9217
9244
|
children: rawProps.children
|
|
@@ -9221,7 +9248,7 @@ function ProductGrid(rawProps) {
|
|
|
9221
9248
|
return /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: gridConfig, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9222
9249
|
"div",
|
|
9223
9250
|
{
|
|
9224
|
-
className: `propeller-product-grid w-full ${props.className || ""}
|
|
9251
|
+
className: cn(`propeller-product-grid w-full ${props.className || ""}`),
|
|
9225
9252
|
"data-loading": getIsLoading() ? "true" : "false",
|
|
9226
9253
|
children: [
|
|
9227
9254
|
getIsLoading() ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-product-grid__skeleton-grid ${getGridColsClass()}`, children: getSkeletonItems()?.map((_, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9324,7 +9351,7 @@ function ProductGridItems(props) {
|
|
|
9324
9351
|
const gridClass = cols === 1 ? "flex flex-col gap-4" : cols === 2 ? "grid grid-cols-2 gap-3 sm:gap-6 auto-rows-fr" : cols === 4 ? "grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-6 auto-rows-fr" : cols === 5 ? "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-6 auto-rows-fr" : cols === 6 ? "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 sm:gap-6 auto-rows-fr" : "grid grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-6 auto-rows-fr";
|
|
9325
9352
|
if (isLoading) {
|
|
9326
9353
|
const skeletonCount = cols === 2 ? 4 : cols === 4 ? 8 : cols === 5 ? 10 : cols === 6 ? 12 : 6;
|
|
9327
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-product-grid__skeleton-grid ${gridClass} ${props.className ?? ""}
|
|
9354
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-product-grid__skeleton-grid ${gridClass} ${props.className ?? ""}`), children: Array.from({ length: skeletonCount }).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9328
9355
|
"div",
|
|
9329
9356
|
{
|
|
9330
9357
|
className: "propeller-product-grid__skeleton-card flex flex-col overflow-hidden rounded-container border border-border bg-card shadow-sm",
|
|
@@ -9346,7 +9373,7 @@ function ProductGridItems(props) {
|
|
|
9346
9373
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-product-grid__empty-message mt-1 text-sm text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "noProductsHelp", "Try adjusting your filters or search term.") })
|
|
9347
9374
|
] }) });
|
|
9348
9375
|
}
|
|
9349
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-product-grid__grid ${gridClass} ${props.className ?? ""}
|
|
9376
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-product-grid__grid ${gridClass} ${props.className ?? ""}`), children: items.map((item, idx) => {
|
|
9350
9377
|
const isCluster = "clusterId" in item && !!item.clusterId;
|
|
9351
9378
|
const key = item.productId || item.clusterId || idx;
|
|
9352
9379
|
return /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
@@ -9607,7 +9634,7 @@ function GridFilters(rawProps) {
|
|
|
9607
9634
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9608
9635
|
"div",
|
|
9609
9636
|
{
|
|
9610
|
-
className: `propeller-grid-filters space-y-4 ${props.isMobile ? "pb-8" : "sticky top-24"} ${isPending ? "opacity-50 pointer-events-none" : ""} ${props.className || ""}
|
|
9637
|
+
className: cn(`propeller-grid-filters space-y-4 ${props.isMobile ? "pb-8" : "sticky top-24"} ${isPending ? "opacity-50 pointer-events-none" : ""} ${props.className || ""}`),
|
|
9611
9638
|
"data-mobile": props.isMobile ? "true" : "false",
|
|
9612
9639
|
"data-pending": isPending ? "true" : "false",
|
|
9613
9640
|
children: [
|
|
@@ -10031,7 +10058,7 @@ function GridToolbar(rawProps) {
|
|
|
10031
10058
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10032
10059
|
"div",
|
|
10033
10060
|
{
|
|
10034
|
-
className: `propeller-grid-toolbar ${props.className || ""}
|
|
10061
|
+
className: cn(`propeller-grid-toolbar ${props.className || ""}`),
|
|
10035
10062
|
"data-view-mode": currentViewMode,
|
|
10036
10063
|
children: [
|
|
10037
10064
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-toolbar__bar flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-4", children: [
|
|
@@ -10270,7 +10297,7 @@ function GridPagination(props) {
|
|
|
10270
10297
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10271
10298
|
"div",
|
|
10272
10299
|
{
|
|
10273
|
-
className: `propeller-grid-pagination ${props.className || ""}
|
|
10300
|
+
className: cn(`propeller-grid-pagination ${props.className || ""}`),
|
|
10274
10301
|
"data-variant": variant,
|
|
10275
10302
|
children: showPagination ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10276
10303
|
variant === "compact" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-pagination__compact flex justify-center items-center gap-2", children: [
|
|
@@ -10648,7 +10675,7 @@ function ClusterConfigurator(props) {
|
|
|
10648
10675
|
initFromProduct(props.defaultProduct);
|
|
10649
10676
|
}
|
|
10650
10677
|
}, []);
|
|
10651
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-cluster-configurator ${props.className || ""}
|
|
10678
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-cluster-configurator ${props.className || ""}`), children: !!props.config?.settings?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-configurator__content flex flex-col gap-6", children: settingsWithValues?.map((setting) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10652
10679
|
"div",
|
|
10653
10680
|
{
|
|
10654
10681
|
className: "propeller-cluster-configurator__group",
|
|
@@ -10797,7 +10824,7 @@ function ClusterInfo(rawProps) {
|
|
|
10797
10824
|
props.onClusterLoaded(fetchedCluster);
|
|
10798
10825
|
}
|
|
10799
10826
|
}, [fetchedCluster]);
|
|
10800
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-cluster-info ${props.className || ""}
|
|
10827
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-cluster-info ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
|
|
10801
10828
|
loading && !props.cluster ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cluster-info__skeleton animate-pulse space-y-3", children: [
|
|
10802
10829
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-info__skeleton-line h-4 bg-surface-hover rounded w-1/4" }),
|
|
10803
10830
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-info__skeleton-line h-8 bg-surface-hover rounded w-3/4" })
|
|
@@ -10815,8 +10842,8 @@ var ClusterInfo_default = ClusterInfo;
|
|
|
10815
10842
|
function formatPrice9(price, currency) {
|
|
10816
10843
|
return propellerV2CoreUi.formatPrice(price, { symbol: currency });
|
|
10817
10844
|
}
|
|
10818
|
-
function getProductName2(product) {
|
|
10819
|
-
return product.names
|
|
10845
|
+
function getProductName2(product, language) {
|
|
10846
|
+
return propellerV2CoreUi.getLocalizedValue(product.names, language, `Product ${product.productId}`);
|
|
10820
10847
|
}
|
|
10821
10848
|
function getProductImageUrl4(product) {
|
|
10822
10849
|
const media = product.media;
|
|
@@ -10826,9 +10853,11 @@ function getProductImageUrl4(product) {
|
|
|
10826
10853
|
}
|
|
10827
10854
|
return "";
|
|
10828
10855
|
}
|
|
10829
|
-
function ClusterOptions(
|
|
10856
|
+
function ClusterOptions(rawProps) {
|
|
10857
|
+
const props = useInfraProps(rawProps);
|
|
10830
10858
|
const [selectedProductIds, setSelectedProductIds] = React6.useState({});
|
|
10831
10859
|
function getOptionsForRender() {
|
|
10860
|
+
const language = props.language;
|
|
10832
10861
|
const options = props.options || [];
|
|
10833
10862
|
const sel = selectedProductIds;
|
|
10834
10863
|
const hidePrices = propellerV2CoreUi.isContentHidden(props.portalMode, props.user);
|
|
@@ -10838,7 +10867,7 @@ function ClusterOptions(props) {
|
|
|
10838
10867
|
const products = (option.products || []).map((p) => ({
|
|
10839
10868
|
productId: p.productId,
|
|
10840
10869
|
productIdStr: p.productId.toString(),
|
|
10841
|
-
label: hidePrices ? getProductName2(p) : `${getProductName2(p)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC")}`
|
|
10870
|
+
label: hidePrices ? getProductName2(p, language) : `${getProductName2(p, language)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC")}`
|
|
10842
10871
|
}));
|
|
10843
10872
|
let previewImageUrl = "";
|
|
10844
10873
|
let previewName = "";
|
|
@@ -10849,7 +10878,7 @@ function ClusterOptions(props) {
|
|
|
10849
10878
|
);
|
|
10850
10879
|
if (selectedProduct) {
|
|
10851
10880
|
previewImageUrl = getProductImageUrl4(selectedProduct);
|
|
10852
|
-
previewName = getProductName2(selectedProduct);
|
|
10881
|
+
previewName = getProductName2(selectedProduct, language);
|
|
10853
10882
|
previewPrice = hidePrices ? "" : formatPrice9(selectedProduct.price?.gross || 0, props.currency ?? "\u20AC");
|
|
10854
10883
|
}
|
|
10855
10884
|
}
|
|
@@ -10857,7 +10886,7 @@ function ClusterOptions(props) {
|
|
|
10857
10886
|
return {
|
|
10858
10887
|
id: option.id,
|
|
10859
10888
|
idStr,
|
|
10860
|
-
name: option.names
|
|
10889
|
+
name: propellerV2CoreUi.getLocalizedValue(option.names, language, `Option ${option.id}`),
|
|
10861
10890
|
isRequired,
|
|
10862
10891
|
selectedProductId,
|
|
10863
10892
|
hasSelection: !!selectedProductId,
|
|
@@ -10886,7 +10915,7 @@ function ClusterOptions(props) {
|
|
|
10886
10915
|
}
|
|
10887
10916
|
}
|
|
10888
10917
|
const renderedOptions = getOptionsForRender();
|
|
10889
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-cluster-options ${props.className || ""}
|
|
10918
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-cluster-options ${props.className || ""}`), children: renderedOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-cluster-options__content flex flex-col gap-6", children: renderedOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10890
10919
|
"div",
|
|
10891
10920
|
{
|
|
10892
10921
|
className: "propeller-cluster-options__group",
|
|
@@ -11325,7 +11354,8 @@ function FavoriteListItem(rawProps) {
|
|
|
11325
11354
|
const isProduct = "productId" in props.item;
|
|
11326
11355
|
const product = props.item;
|
|
11327
11356
|
const cluster = props.item;
|
|
11328
|
-
const
|
|
11357
|
+
const nameLanguage = props.language;
|
|
11358
|
+
const name = isProduct ? propellerV2CoreUi.getLocalizedValue(product?.names, nameLanguage, "Product") : propellerV2CoreUi.getLocalizedValue(cluster?.names, nameLanguage, "") || propellerV2CoreUi.getLocalizedValue(cluster?.defaultProduct?.names, nameLanguage, "Cluster");
|
|
11329
11359
|
const sku = isProduct ? product?.sku || "" : cluster?.sku || cluster?.defaultProduct?.sku || "";
|
|
11330
11360
|
const imageUrl = isProduct ? product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "" : cluster?.defaultProduct?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
|
|
11331
11361
|
const itemUrl = isProduct ? props.configuration?.urls?.getProductUrl?.(props.item) || "" : props.configuration?.urls?.getClusterUrl?.(props.item) || "";
|
|
@@ -11378,7 +11408,7 @@ function FavoriteListItem(rawProps) {
|
|
|
11378
11408
|
{
|
|
11379
11409
|
onClick: (e) => handleItemClick(e),
|
|
11380
11410
|
"data-type": isProduct ? "product" : "cluster",
|
|
11381
|
-
className: `propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}
|
|
11411
|
+
className: cn(`propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}`),
|
|
11382
11412
|
children: rawProps.children
|
|
11383
11413
|
}
|
|
11384
11414
|
) });
|
|
@@ -11388,7 +11418,7 @@ function FavoriteListItem(rawProps) {
|
|
|
11388
11418
|
{
|
|
11389
11419
|
onClick: (e) => handleItemClick(e),
|
|
11390
11420
|
"data-type": isProduct ? "product" : "cluster",
|
|
11391
|
-
className: `propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}
|
|
11421
|
+
className: cn(`propeller-favorite-list-item flex flex-row items-center gap-4 rounded-container border border-border bg-card p-4 transition-colors hover:border-secondary/20 hover:shadow-sm cursor-pointer ${props.className || ""}`),
|
|
11392
11422
|
children: [
|
|
11393
11423
|
/* @__PURE__ */ jsxRuntime.jsx(FavoriteListItemImage, {}),
|
|
11394
11424
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-favorite-list-item__body flex flex-col gap-0.5 min-w-0 flex-1", children: [
|
|
@@ -11759,9 +11789,10 @@ function FavoriteListDetails(rawProps) {
|
|
|
11759
11789
|
}
|
|
11760
11790
|
}
|
|
11761
11791
|
function getSearchItemName(item) {
|
|
11762
|
-
|
|
11792
|
+
const language = props.language;
|
|
11793
|
+
if ("productId" in item) return propellerV2CoreUi.getLocalizedValue(item.names, language, "Product");
|
|
11763
11794
|
const cluster = item;
|
|
11764
|
-
return cluster.names
|
|
11795
|
+
return propellerV2CoreUi.getLocalizedValue(cluster.names, language, "") || propellerV2CoreUi.getLocalizedValue(cluster.defaultProduct?.names, language, "Cluster");
|
|
11765
11796
|
}
|
|
11766
11797
|
function getSearchItemSku(item) {
|
|
11767
11798
|
if ("productId" in item) return item.sku || "";
|
|
@@ -11901,7 +11932,7 @@ function FavoriteListDetails(rawProps) {
|
|
|
11901
11932
|
fetchList();
|
|
11902
11933
|
}
|
|
11903
11934
|
}, [props.favoriteListId]);
|
|
11904
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-favorite-list-details ${props.className || ""}
|
|
11935
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-favorite-list-details ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
|
|
11905
11936
|
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-favorite-list-details__skeleton space-y-4", children: [1, 2, 3]?.map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11906
11937
|
"div",
|
|
11907
11938
|
{
|
|
@@ -12004,7 +12035,7 @@ function FavoriteListDetails(rawProps) {
|
|
|
12004
12035
|
type: "button",
|
|
12005
12036
|
className: "propeller-favorite-list-details__add-btn inline-flex items-center justify-center rounded-control bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground transition-colors hover:bg-secondary/90",
|
|
12006
12037
|
onClick: () => setShowAddModal(true),
|
|
12007
|
-
children: propellerV2CoreUi.getLabel(props.labels, "addProductDirectly", "Add product
|
|
12038
|
+
children: propellerV2CoreUi.getLabel(props.labels, "addProductDirectly", "Add product to favorite list")
|
|
12008
12039
|
}
|
|
12009
12040
|
) }),
|
|
12010
12041
|
allItems.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-favorite-list-details__empty border border-border rounded-container p-12 text-center space-y-4", children: [
|
|
@@ -12346,7 +12377,7 @@ function FavoriteLists(rawProps) {
|
|
|
12346
12377
|
setNewSetAsDefault(false);
|
|
12347
12378
|
closeCreateModal();
|
|
12348
12379
|
}
|
|
12349
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-favorite-lists ${props.className || ""}
|
|
12380
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-favorite-lists ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
|
|
12350
12381
|
props.allowFavoriteListCreate !== false && !loading && displayedLists.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-favorite-lists__toolbar flex justify-end mb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12351
12382
|
"button",
|
|
12352
12383
|
{
|
|
@@ -12869,7 +12900,7 @@ function ForgotPassword(rawProps) {
|
|
|
12869
12900
|
}
|
|
12870
12901
|
var ForgotPassword_default = ForgotPassword;
|
|
12871
12902
|
function GridTitle(props) {
|
|
12872
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-grid-title mb-8 ${props.className || ""}
|
|
12903
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-grid-title mb-8 ${props.className || ""}`), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-grid-title__row flex items-baseline gap-3 mb-3", children: [
|
|
12873
12904
|
props.headingLevel === "h2" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-grid-title__heading text-3xl sm:text-4xl font-bold tracking-tight", children: props.title }) : null,
|
|
12874
12905
|
props.headingLevel !== "h2" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "propeller-grid-title__heading text-3xl sm:text-4xl font-bold tracking-tight", children: props.title }) : null
|
|
12875
12906
|
] }) });
|
|
@@ -12880,8 +12911,8 @@ function GridTitleWithProvider(rawProps) {
|
|
|
12880
12911
|
return /* @__PURE__ */ jsxRuntime.jsx(GridTitle_default, { ...props });
|
|
12881
12912
|
}
|
|
12882
12913
|
var GridTitleWithProvider_default = GridTitleWithProvider;
|
|
12883
|
-
function getItemName(item) {
|
|
12884
|
-
return item.product?.names
|
|
12914
|
+
function getItemName(item, language) {
|
|
12915
|
+
return propellerV2CoreUi.getLocalizedValue(item.product?.names, language, "Product");
|
|
12885
12916
|
}
|
|
12886
12917
|
function getItemImageUrl(item) {
|
|
12887
12918
|
const url = item.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url;
|
|
@@ -12902,6 +12933,7 @@ function getBundleNonLeaders(item) {
|
|
|
12902
12933
|
}
|
|
12903
12934
|
function ItemsOverview(rawProps) {
|
|
12904
12935
|
const props = useInfraProps(rawProps);
|
|
12936
|
+
const language = props.language;
|
|
12905
12937
|
const useTax = !!props.includeTax;
|
|
12906
12938
|
const containerClass = props.itemsOverviewContainerClass || "cart-items-overview";
|
|
12907
12939
|
const itemNameClickable = props.itemNameClickable !== void 0 ? props.itemNameClickable : true;
|
|
@@ -12963,7 +12995,7 @@ function ItemsOverview(rawProps) {
|
|
|
12963
12995
|
{
|
|
12964
12996
|
className: "propeller-items-overview__item-image w-full h-full object-contain p-1.5",
|
|
12965
12997
|
src: getItemImageUrl(item),
|
|
12966
|
-
alt: getItemName(item)
|
|
12998
|
+
alt: getItemName(item, language)
|
|
12967
12999
|
}
|
|
12968
13000
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12969
13001
|
"svg",
|
|
@@ -12991,7 +13023,7 @@ function ItemsOverview(rawProps) {
|
|
|
12991
13023
|
] }),
|
|
12992
13024
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-items-overview__item-bundle mt-1.5 space-y-1 border-l-2 border-secondary/10 pl-2", children: [
|
|
12993
13025
|
leader ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-items-overview__item-bundle-leader flex justify-between items-center text-xs", children: [
|
|
12994
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: leader.product.names
|
|
13026
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: propellerV2CoreUi.getLocalizedValue(leader.product.names, language, "Product") }),
|
|
12995
13027
|
money(bundlePrice(leader.price)) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground whitespace-nowrap ml-2", children: money(bundlePrice(leader.price)) }) : null
|
|
12996
13028
|
] }) : null,
|
|
12997
13029
|
getBundleNonLeaders(item).map((bundleItem, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -12999,7 +13031,7 @@ function ItemsOverview(rawProps) {
|
|
|
12999
13031
|
{
|
|
13000
13032
|
className: "propeller-items-overview__item-bundle-item flex justify-between items-center text-xs text-muted-foreground",
|
|
13001
13033
|
children: [
|
|
13002
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: bundleItem.product?.names
|
|
13034
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: propellerV2CoreUi.getLocalizedValue(bundleItem.product?.names, language, "Product") }),
|
|
13003
13035
|
money(bundlePrice(bundleItem.price)) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: money(bundlePrice(bundleItem.price)) }) : null
|
|
13004
13036
|
]
|
|
13005
13037
|
},
|
|
@@ -13020,9 +13052,9 @@ function ItemsOverview(rawProps) {
|
|
|
13020
13052
|
{
|
|
13021
13053
|
className: "propeller-items-overview__item-title font-medium text-sm leading-tight cursor-pointer hover:text-secondary transition-colors line-clamp-2",
|
|
13022
13054
|
onClick: () => handleItemNameClick(item),
|
|
13023
|
-
children: getItemName(item)
|
|
13055
|
+
children: getItemName(item, language)
|
|
13024
13056
|
}
|
|
13025
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-items-overview__item-title font-medium text-sm leading-tight line-clamp-2", children: getItemName(item) }),
|
|
13057
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-items-overview__item-title font-medium text-sm leading-tight line-clamp-2", children: getItemName(item, language) }),
|
|
13026
13058
|
showPrice ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-items-overview__item-price font-semibold text-sm text-foreground whitespace-nowrap", children: formatItemPrice(lineTotal(item)) }) : null
|
|
13027
13059
|
] }),
|
|
13028
13060
|
showSku && itemSku ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "propeller-items-overview__item-sku text-xs text-muted-foreground mt-0.5", children: [
|
|
@@ -13038,7 +13070,7 @@ function ItemsOverview(rawProps) {
|
|
|
13038
13070
|
{
|
|
13039
13071
|
className: "propeller-items-overview__item-option flex justify-between items-center text-xs text-muted-foreground",
|
|
13040
13072
|
children: [
|
|
13041
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: child.product?.names
|
|
13073
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: propellerV2CoreUi.getLocalizedValue(child.product?.names, language, "Option") }),
|
|
13042
13074
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: formatItemPrice(lineTotal(child)) })
|
|
13043
13075
|
]
|
|
13044
13076
|
},
|
|
@@ -13275,7 +13307,7 @@ function Menu(rawProps) {
|
|
|
13275
13307
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13276
13308
|
"div",
|
|
13277
13309
|
{
|
|
13278
|
-
className: `propeller-menu ${props.className || ""}
|
|
13310
|
+
className: cn(`propeller-menu ${props.className || ""}`),
|
|
13279
13311
|
"data-variant": props.menuStyle || "custom",
|
|
13280
13312
|
"data-loading": isLoading ? "true" : "false",
|
|
13281
13313
|
children: customMenu
|
|
@@ -13285,7 +13317,7 @@ function Menu(rawProps) {
|
|
|
13285
13317
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13286
13318
|
"div",
|
|
13287
13319
|
{
|
|
13288
|
-
className: `propeller-menu ${props.className || ""}
|
|
13320
|
+
className: cn(`propeller-menu ${props.className || ""}`),
|
|
13289
13321
|
"data-variant": getMenuStyle(),
|
|
13290
13322
|
"data-loading": isLoading ? "true" : "false",
|
|
13291
13323
|
children: [
|
|
@@ -13431,7 +13463,7 @@ function OrderActions(rawProps) {
|
|
|
13431
13463
|
// (the bug screenshot showed "Order / confirmation / (PDF)" on three lines).
|
|
13432
13464
|
// `whitespace-nowrap` on the buttons is the belt-and-braces guarantee that
|
|
13433
13465
|
// text never wraps even in narrow containers without flex sizing.
|
|
13434
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-order-actions flex-shrink-0 ${props.className || ""}
|
|
13466
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-order-actions flex-shrink-0 ${props.className || ""}`), children: [
|
|
13435
13467
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-order-actions__actions flex flex-row items-center gap-3 flex-shrink-0", children: [
|
|
13436
13468
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13437
13469
|
"button",
|
|
@@ -13516,22 +13548,22 @@ function OrderActions(rawProps) {
|
|
|
13516
13548
|
);
|
|
13517
13549
|
}
|
|
13518
13550
|
var OrderActions_default = OrderActions;
|
|
13519
|
-
function getProductName3(orderItem) {
|
|
13520
|
-
return orderItem?.product?.names
|
|
13551
|
+
function getProductName3(orderItem, language) {
|
|
13552
|
+
return propellerV2CoreUi.getLocalizedValue(orderItem?.product?.names, language, "") || orderItem?.name || "Unknown Product";
|
|
13521
13553
|
}
|
|
13522
|
-
function getClusterUrl(orderItem) {
|
|
13554
|
+
function getClusterUrl(orderItem, language) {
|
|
13523
13555
|
const cluster = orderItem?.product?.cluster;
|
|
13524
13556
|
if (!cluster) return "";
|
|
13525
13557
|
const id = cluster.clusterId;
|
|
13526
|
-
const slug = cluster.slugs
|
|
13558
|
+
const slug = propellerV2CoreUi.getLocalizedValue(cluster.slugs, language, "");
|
|
13527
13559
|
if (!id || !slug) return "";
|
|
13528
13560
|
return `/cluster/${id}/${slug}`;
|
|
13529
13561
|
}
|
|
13530
|
-
function getProductUrl(orderItem) {
|
|
13531
|
-
const cu = getClusterUrl(orderItem);
|
|
13562
|
+
function getProductUrl(orderItem, language) {
|
|
13563
|
+
const cu = getClusterUrl(orderItem, language);
|
|
13532
13564
|
if (cu) return cu;
|
|
13533
13565
|
const id = orderItem?.product?.productId;
|
|
13534
|
-
const slug = orderItem?.product?.slugs
|
|
13566
|
+
const slug = propellerV2CoreUi.getLocalizedValue(orderItem?.product?.slugs, language, "");
|
|
13535
13567
|
if (id && slug) return `/product/${id}/${slug}`;
|
|
13536
13568
|
return "";
|
|
13537
13569
|
}
|
|
@@ -13546,10 +13578,10 @@ function OrderItemCard(props) {
|
|
|
13546
13578
|
const showDiscount = props.showDiscount !== void 0 ? props.showDiscount : false;
|
|
13547
13579
|
const showStockComponent = props.showStockComponent !== void 0 ? props.showStockComponent : false;
|
|
13548
13580
|
const showItemNotes = props.showItemNotes !== void 0 ? props.showItemNotes : false;
|
|
13549
|
-
const productName = getProductName3(item);
|
|
13581
|
+
const productName = getProductName3(item, props.language);
|
|
13550
13582
|
const productSku = item?.product?.sku || item?.sku || "";
|
|
13551
13583
|
const productImage = item?.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
|
|
13552
|
-
const productUrl = getProductUrl(item);
|
|
13584
|
+
const productUrl = getProductUrl(item, props.language);
|
|
13553
13585
|
const quantity = item?.quantity || 0;
|
|
13554
13586
|
const priceTotal = item?.priceTotal || 0;
|
|
13555
13587
|
const discount = item?.discount || 0;
|
|
@@ -13664,7 +13696,7 @@ function OrderItemCard(props) {
|
|
|
13664
13696
|
className: "propeller-order-item-card__child-row border-0",
|
|
13665
13697
|
"data-child": "true",
|
|
13666
13698
|
children: [
|
|
13667
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--product px-6 py-2 pl-28", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-order-item-card__child-title text-sm text-muted-foreground", children: child.product?.names
|
|
13699
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--product px-6 py-2 pl-28", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-order-item-card__child-title text-sm text-muted-foreground", children: propellerV2CoreUi.getLocalizedValue(child.product?.names, props.language, "") || child.name || "Unknown" }) }),
|
|
13668
13700
|
showQuantity ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--quantity px-6 py-2 text-center text-sm text-muted-foreground", children: child.quantity || 0 }) : null,
|
|
13669
13701
|
showDiscount ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--discount px-6 py-2 text-right text-sm text-muted-foreground" }) : null,
|
|
13670
13702
|
showPrice ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--price px-6 py-2 text-right whitespace-nowrap text-sm text-muted-foreground", children: formatItemPrice(child.priceTotal || 0) }) : null
|
|
@@ -13681,14 +13713,15 @@ function OrderBonusItems(rawProps) {
|
|
|
13681
13713
|
const bonusItems = propellerV2CoreUi.getNettedBonusItems(allItems);
|
|
13682
13714
|
if (bonusItems.length === 0) return null;
|
|
13683
13715
|
const OrderItemCardImpl = props.orderItemCardComponent ?? OrderItemCard_default;
|
|
13684
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-order-bonus-items ${props.className || "mb-8"}
|
|
13716
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-order-bonus-items ${props.className || "mb-8"}`), children: [
|
|
13685
13717
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-order-bonus-items__title text-lg font-bold mb-3 text-foreground", children: propellerV2CoreUi.getLabel(props.labels, "title", "Bonus items") }),
|
|
13686
13718
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-order-bonus-items__table bg-card rounded-container shadow overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full", children: bonusItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13687
13719
|
OrderItemCardImpl,
|
|
13688
13720
|
{
|
|
13689
13721
|
orderItem: item,
|
|
13690
13722
|
titleLinkable: false,
|
|
13691
|
-
currency: props.currency
|
|
13723
|
+
currency: props.currency,
|
|
13724
|
+
language: props.language
|
|
13692
13725
|
},
|
|
13693
13726
|
item.id
|
|
13694
13727
|
)) }) })
|
|
@@ -13770,7 +13803,7 @@ function OrderList(rawProps) {
|
|
|
13770
13803
|
}
|
|
13771
13804
|
return fields;
|
|
13772
13805
|
}
|
|
13773
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-order-list ${props.className || ""}
|
|
13806
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-order-list ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
|
|
13774
13807
|
props.enableSearch && searchFields().length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-order-list__filters mb-6 bg-card p-4 rounded-container shadow space-y-4", children: [
|
|
13775
13808
|
searchFields().includes("term") ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-order-list__search-field w-full", children: [
|
|
13776
13809
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "propeller-order-list__filter-label block text-sm font-medium text-muted-foreground capitalize mb-1", children: getColumnLabel("term") }),
|
|
@@ -14360,6 +14393,7 @@ function QuickOrderInner(props) {
|
|
|
14360
14393
|
target: "_blank",
|
|
14361
14394
|
rel: "noopener nofollow",
|
|
14362
14395
|
className: "text-primary hover:underline text-sm inline-block mb-4",
|
|
14396
|
+
onClick: () => props.onTemplateDownload?.(),
|
|
14363
14397
|
children: L("downloadTemplate", "Download XLSX template")
|
|
14364
14398
|
}
|
|
14365
14399
|
) : null,
|
|
@@ -14523,7 +14557,7 @@ function OrderShipments(props) {
|
|
|
14523
14557
|
const code = tat.code || "";
|
|
14524
14558
|
return `${baseUrl}${code}`;
|
|
14525
14559
|
}
|
|
14526
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `order-shipments ${props.className || ""}
|
|
14560
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`order-shipments ${props.className || ""}`), children: [
|
|
14527
14561
|
shipments.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
14528
14562
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold", children: propellerV2CoreUi.getLabel(props.labels, "title", "Shipping details") }),
|
|
14529
14563
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto rounded-lg border border-border bg-card shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-sm", children: [
|
|
@@ -14924,7 +14958,7 @@ function PriceToggle(props) {
|
|
|
14924
14958
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14925
14959
|
"div",
|
|
14926
14960
|
{
|
|
14927
|
-
className: `propeller-price-toggle flex items-center gap-2 ${props.className || ""}
|
|
14961
|
+
className: cn(`propeller-price-toggle flex items-center gap-2 ${props.className || ""}`),
|
|
14928
14962
|
"data-state": isOn ? "on" : "off",
|
|
14929
14963
|
children: [
|
|
14930
14964
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-price-toggle__label hidden sm:inline text-xs", children: label }),
|
|
@@ -15016,7 +15050,7 @@ function ProductBulkPrices(props) {
|
|
|
15016
15050
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isHidden2 && hasItems ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15017
15051
|
"div",
|
|
15018
15052
|
{
|
|
15019
|
-
className: `propeller-product-bulk-prices ${props.className || ""}
|
|
15053
|
+
className: cn(`propeller-product-bulk-prices ${props.className || ""}`),
|
|
15020
15054
|
"data-include-tax": includeTax ? "true" : "false",
|
|
15021
15055
|
children: [
|
|
15022
15056
|
propellerV2CoreUi.getLabel(props.labels, "title", "Volume pricing") ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-bulk-prices__title text-base font-semibold text-foreground mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Volume pricing") }) : null,
|
|
@@ -15059,11 +15093,12 @@ function getItemPrice(item, includeTax) {
|
|
|
15059
15093
|
function getProductImage(product) {
|
|
15060
15094
|
return product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
|
|
15061
15095
|
}
|
|
15062
|
-
function getProductName4(product) {
|
|
15063
|
-
return product?.names
|
|
15096
|
+
function getProductName4(product, language) {
|
|
15097
|
+
return propellerV2CoreUi.getLocalizedValue(product?.names, language, "");
|
|
15064
15098
|
}
|
|
15065
15099
|
function ProductBundles(rawProps) {
|
|
15066
15100
|
const props = useInfraProps(rawProps);
|
|
15101
|
+
const language = props.language;
|
|
15067
15102
|
const currencySymbol = props.currency ?? "\u20AC";
|
|
15068
15103
|
const money = (value) => propellerV2CoreUi.formatPrice(value, { symbol: currencySymbol });
|
|
15069
15104
|
const [isMounted, setIsMounted] = React6.useState(false);
|
|
@@ -15162,7 +15197,7 @@ function ProductBundles(rawProps) {
|
|
|
15162
15197
|
React6.useEffect(() => {
|
|
15163
15198
|
fetchBundles(props.productId);
|
|
15164
15199
|
}, [props.productId]);
|
|
15165
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: isMounted && !isLoading && bundles.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-bundles ${props.className || "mb-12"}
|
|
15200
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: isMounted && !isLoading && bundles.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-bundles ${props.className || "mb-12"}`), children: [
|
|
15166
15201
|
bundles.map((bundle, bundleIdx) => {
|
|
15167
15202
|
const bundlePrice = getBundlePrice(bundle, includeTax);
|
|
15168
15203
|
const originalPrice = getOriginalPrice(bundle, includeTax);
|
|
@@ -15202,10 +15237,10 @@ function ProductBundles(rawProps) {
|
|
|
15202
15237
|
{
|
|
15203
15238
|
className: "propeller-product-bundles__item-image w-full h-full object-contain p-2",
|
|
15204
15239
|
src: getProductImage(item.product),
|
|
15205
|
-
alt: getProductName4(item.product)
|
|
15240
|
+
alt: getProductName4(item.product, language)
|
|
15206
15241
|
}
|
|
15207
15242
|
) : null }),
|
|
15208
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-bundles__item-name text-sm font-medium text-muted-foreground leading-tight mb-1", children: getProductName4(item.product) || "Product " + item.productId }),
|
|
15243
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-bundles__item-name text-sm font-medium text-muted-foreground leading-tight mb-1", children: getProductName4(item.product, language) || "Product " + item.productId }),
|
|
15209
15244
|
!hidePrices && item.price ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-bundles__item-price text-sm font-semibold text-foreground", children: [
|
|
15210
15245
|
money(getItemPrice(item, includeTax)),
|
|
15211
15246
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground ml-1", children: includeTax ? propellerV2CoreUi.getLabel(props.labels, "inclTax", "incl. VAT") : propellerV2CoreUi.getLabel(props.labels, "exclTax", "excl. VAT") })
|
|
@@ -15405,7 +15440,7 @@ function ProductBundles(rawProps) {
|
|
|
15405
15440
|
{
|
|
15406
15441
|
className: "propeller-product-bundles__modal-child flex justify-between items-center text-xs text-muted-foreground",
|
|
15407
15442
|
children: [
|
|
15408
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: getProductName4(item.product) || "Product" }),
|
|
15443
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: getProductName4(item.product, language) || "Product" }),
|
|
15409
15444
|
!hidePrices && item.price ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: money(getItemPrice(item, includeTax)) }) : null
|
|
15410
15445
|
]
|
|
15411
15446
|
},
|
|
@@ -15461,7 +15496,7 @@ function ProductDescription(props) {
|
|
|
15461
15496
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!html ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15462
15497
|
"div",
|
|
15463
15498
|
{
|
|
15464
|
-
className: `propeller-product-description ${props.className || ""}
|
|
15499
|
+
className: cn(`propeller-product-description ${props.className || ""}`),
|
|
15465
15500
|
"data-expanded": expanded ? "true" : "false",
|
|
15466
15501
|
"data-truncatable": shouldTruncate ? "true" : "false",
|
|
15467
15502
|
children: [
|
|
@@ -15500,7 +15535,7 @@ function ProductDownloads(props) {
|
|
|
15500
15535
|
const match = alts.find((a) => a.language === lang);
|
|
15501
15536
|
return match?.value || alts?.[0]?.value || "Download";
|
|
15502
15537
|
}
|
|
15503
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-downloads ${props.className || ""}
|
|
15538
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-downloads ${props.className || ""}`), children: [
|
|
15504
15539
|
hasItems ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-downloads__title text-base font-semibold text-foreground mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Downloads") }) : null,
|
|
15505
15540
|
hasItems ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "propeller-product-downloads__list space-y-2", children: items.map((doc, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "propeller-product-downloads__item", children: !!getDocumentUrl(doc) ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15506
15541
|
"a",
|
|
@@ -15571,7 +15606,7 @@ function ProductGallery(props) {
|
|
|
15571
15606
|
if (images.length === 0) return;
|
|
15572
15607
|
setSelectedIndex((idx) => (idx + 1) % images.length);
|
|
15573
15608
|
}
|
|
15574
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-gallery ${props.className || ""}
|
|
15609
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-gallery ${props.className || ""}`), children: [
|
|
15575
15610
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-gallery__stage relative aspect-square bg-card overflow-hidden", children: [
|
|
15576
15611
|
images.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-gallery__empty flex h-full w-full items-center justify-center bg-surface-hover", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15577
15612
|
"svg",
|
|
@@ -15906,13 +15941,13 @@ function ProductInfo(rawProps) {
|
|
|
15906
15941
|
}
|
|
15907
15942
|
};
|
|
15908
15943
|
if (rawProps.children !== void 0) {
|
|
15909
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-info ${props.className || ""}
|
|
15944
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-info ${props.className || ""}`), children: [
|
|
15910
15945
|
props.beforeContent ? props.beforeContent(product) : null,
|
|
15911
15946
|
rawProps.children,
|
|
15912
15947
|
props.afterContent ? props.afterContent(product) : null
|
|
15913
15948
|
] }) }) });
|
|
15914
15949
|
}
|
|
15915
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-info ${props.className || ""}
|
|
15950
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ProductInfoContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(ProductGridConfigProvider, { value: pdpConfig, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-info ${props.className || ""}`), children: [
|
|
15916
15951
|
props.beforeContent ? props.beforeContent(product) : null,
|
|
15917
15952
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
15918
15953
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-info__media relative", children: [
|
|
@@ -15934,7 +15969,7 @@ function ProductInfo(rawProps) {
|
|
|
15934
15969
|
props.afterContent ? props.afterContent(product) : null
|
|
15935
15970
|
] }) }) });
|
|
15936
15971
|
}
|
|
15937
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-info ${props.className || ""}
|
|
15972
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-info ${props.className || ""}`), "data-loading": loading ? "true" : "false", children: [
|
|
15938
15973
|
loading && !props.product ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-info__skeleton animate-pulse space-y-3", children: [
|
|
15939
15974
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-info__skeleton-line h-4 bg-surface-hover rounded w-1/4" }),
|
|
15940
15975
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-info__skeleton-line h-8 bg-surface-hover rounded w-3/4" })
|
|
@@ -16210,7 +16245,7 @@ function ProductShortDescription(props) {
|
|
|
16210
16245
|
"div",
|
|
16211
16246
|
{
|
|
16212
16247
|
dangerouslySetInnerHTML: { __html: html },
|
|
16213
|
-
className: `propeller-product-short-description prose prose-slate max-w-none text-muted-foreground ${props.className || ""}`
|
|
16248
|
+
className: cn(`propeller-product-short-description prose prose-slate max-w-none text-muted-foreground ${props.className || ""}`)
|
|
16214
16249
|
}
|
|
16215
16250
|
) : null });
|
|
16216
16251
|
}
|
|
@@ -16377,7 +16412,7 @@ function ProductSlider(rawProps) {
|
|
|
16377
16412
|
}, [sliderId, items().length]);
|
|
16378
16413
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16379
16414
|
" ",
|
|
16380
|
-
!(isCrossUpsellMode() && !isLoading && items().length === 0) ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-slider ${props.containerClassName || "mb-12"}
|
|
16415
|
+
!(isCrossUpsellMode() && !isLoading && items().length === 0) ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-slider ${props.containerClassName || "mb-12"}`), "data-loading": isLoading ? "true" : "false", children: [
|
|
16381
16416
|
sliderTitle() || items().length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-slider__header flex items-center justify-between mb-6", children: [
|
|
16382
16417
|
sliderTitle() ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-product-slider__title text-2xl font-bold", children: sliderTitle() }) : null,
|
|
16383
16418
|
items().length > desktopCount() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-slider__nav flex gap-2", children: [
|
|
@@ -16565,7 +16600,7 @@ function ProductSpecifications(rawProps) {
|
|
|
16565
16600
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !loading && (hasPublicAttributes() || props.packageDescription || hasSlotContent) ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16566
16601
|
"div",
|
|
16567
16602
|
{
|
|
16568
|
-
className: `propeller-product-specifications ${props.className || ""}
|
|
16603
|
+
className: cn(`propeller-product-specifications ${props.className || ""}`),
|
|
16569
16604
|
"data-layout": props.layout === "list" ? "list" : "table",
|
|
16570
16605
|
"data-grouped": props.grouping ? "true" : "false",
|
|
16571
16606
|
children: [
|
|
@@ -16646,7 +16681,7 @@ function ProductVideos(props) {
|
|
|
16646
16681
|
}
|
|
16647
16682
|
return uri;
|
|
16648
16683
|
}
|
|
16649
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-product-videos ${props.className || ""}
|
|
16684
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(`propeller-product-videos ${props.className || ""}`), children: [
|
|
16650
16685
|
hasItems ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "propeller-product-videos__title text-base font-semibold text-foreground mb-3", children: propellerV2CoreUi.getLabel(props.labels, "title", "Videos") }) : null,
|
|
16651
16686
|
hasItems ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "propeller-product-videos__list space-y-4", children: items.map((video, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16652
16687
|
"div",
|
|
@@ -16744,7 +16779,7 @@ function ProductTabs(rawProps) {
|
|
|
16744
16779
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.product ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16745
16780
|
"div",
|
|
16746
16781
|
{
|
|
16747
|
-
className: `propeller-product-tabs ${props.className || ""}
|
|
16782
|
+
className: cn(`propeller-product-tabs ${props.className || ""}`),
|
|
16748
16783
|
"data-active-tab": activeTab,
|
|
16749
16784
|
children: [
|
|
16750
16785
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-product-tabs__desktop hidden md:block", children: [
|
|
@@ -17050,7 +17085,7 @@ function PurchaseAuthorizationConfigurator(rawProps) {
|
|
|
17050
17085
|
onPurchaseAuthorizationDelete: props.onPurchaseAuthorizationDelete,
|
|
17051
17086
|
afterPurchaseAuthorizationDelete: props.afterPurchaseAuthorizationDelete
|
|
17052
17087
|
});
|
|
17053
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-purchase-authorization-configurator ${props.className || ""}
|
|
17088
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-purchase-authorization-configurator ${props.className || ""}`), children: isAuthManager ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17054
17089
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
17055
17090
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
17056
17091
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold", children: propellerV2CoreUi.getLabel(props.labels, "title", "Purchase Authorization Settings") }),
|
|
@@ -17417,7 +17452,7 @@ function PurchaseAuthorizationRequests(rawProps) {
|
|
|
17417
17452
|
if (fromBundle) return fromBundle;
|
|
17418
17453
|
return item?.product?.sku || "";
|
|
17419
17454
|
}
|
|
17420
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `propeller-purchase-authorization-requests ${props.className || ""}
|
|
17455
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(`propeller-purchase-authorization-requests ${props.className || ""}`), children: isAuthManager ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-purchase-authorization-requests__content space-y-4", children: [
|
|
17421
17456
|
!props.hideTitle ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "propeller-purchase-authorization-requests__title text-xl font-semibold", children: propellerV2CoreUi.getLabel(props.labels, "title", "Authorization Requests") }) : null,
|
|
17422
17457
|
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin" }) }) : null,
|
|
17423
17458
|
!loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -18620,7 +18655,7 @@ function mapToSearchBarResult(item, language) {
|
|
|
18620
18655
|
const isCluster = "clusterId" in item;
|
|
18621
18656
|
const displayItem = isCluster ? item.defaultProduct : item;
|
|
18622
18657
|
const id = isCluster ? item.clusterId : item.productId;
|
|
18623
|
-
const slug = item.slugs
|
|
18658
|
+
const slug = propellerV2CoreUi.getLocalizedValue(item.slugs, language, "");
|
|
18624
18659
|
const url = isCluster ? "/cluster/" + id + "/" + slug : "/product/" + id + "/" + slug;
|
|
18625
18660
|
const priceNet = displayItem?.price?.net || 0;
|
|
18626
18661
|
const priceGross = displayItem?.price?.gross || 0;
|
|
@@ -18737,7 +18772,7 @@ function SearchBar(rawProps) {
|
|
|
18737
18772
|
{
|
|
18738
18773
|
ref: containerRef,
|
|
18739
18774
|
"data-search-bar": true,
|
|
18740
|
-
className: `propeller-search-bar ${props.containerClassName || "relative flex-1 max-w-2xl mx-8"}
|
|
18775
|
+
className: cn(`propeller-search-bar ${props.containerClassName || "relative flex-1 max-w-2xl mx-8"}`),
|
|
18741
18776
|
"data-open": showDropdown ? "true" : "false",
|
|
18742
18777
|
children: [
|
|
18743
18778
|
/* @__PURE__ */ jsxRuntime.jsx("form", { className: "propeller-search-bar__form", onSubmit: (e) => handleSubmit(e), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-search-bar__input-wrapper relative", children: [
|