@plurix/ecom-components 1.16.1-commerce.5 → 1.16.1-commerce.7
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.
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ProductCardUnavailable as
|
|
4
|
-
import { ProductCardBadgeKg as
|
|
5
|
-
import { ProductCardDiscountBadge as
|
|
6
|
-
import { ProductCardButton as
|
|
7
|
-
import { ProductCardImage as
|
|
8
|
-
import { ProductCardName as
|
|
9
|
-
import { ProductCardPrice as
|
|
10
|
-
import { ProductCardPromotionFlag as
|
|
1
|
+
import { jsx as s, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import { ProductCardUnavailable as y } from "../ProducCardUnavailable/index.js";
|
|
4
|
+
import { ProductCardBadgeKg as z } from "../ProductCardBadge/ProductCardBadgeKg.js";
|
|
5
|
+
import { ProductCardDiscountBadge as D } from "../ProductCardBadge/ProductCardDiscountBadge.js";
|
|
6
|
+
import { ProductCardButton as M } from "../ProductCardButton/index.js";
|
|
7
|
+
import { ProductCardImage as N } from "../ProductCardImage/index.js";
|
|
8
|
+
import { ProductCardName as O } from "../ProductCardName/index.js";
|
|
9
|
+
import { ProductCardPrice as B } from "../ProductCardPrice/index.js";
|
|
10
|
+
import { ProductCardPromotionFlag as U } from "../ProductCardPromotionFlag/index.js";
|
|
11
11
|
const G = ({
|
|
12
12
|
hasPlusFriendBadge: a,
|
|
13
13
|
promotion: i,
|
|
14
14
|
product: e,
|
|
15
15
|
hasPromotionalPrice: c,
|
|
16
16
|
clubPrice: C,
|
|
17
|
-
outOfStock:
|
|
18
|
-
variant:
|
|
19
|
-
defaultScListPrice:
|
|
20
|
-
isClubClient:
|
|
21
|
-
addToCartAction:
|
|
22
|
-
quantitySelectorAction:
|
|
17
|
+
outOfStock: l,
|
|
18
|
+
variant: r,
|
|
19
|
+
defaultScListPrice: o,
|
|
20
|
+
isClubClient: n,
|
|
21
|
+
addToCartAction: g,
|
|
22
|
+
quantitySelectorAction: P,
|
|
23
23
|
productInCart: h,
|
|
24
24
|
openModal: S
|
|
25
25
|
}) => {
|
|
26
|
-
var
|
|
27
|
-
const [k,
|
|
28
|
-
if (
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
26
|
+
var m, f;
|
|
27
|
+
const [b, v] = d(!1), [k, x] = d(!1);
|
|
28
|
+
if (l)
|
|
29
|
+
return /* @__PURE__ */ s(
|
|
30
|
+
y,
|
|
31
31
|
{
|
|
32
|
-
image: (
|
|
32
|
+
image: (m = e.image) == null ? void 0 : m[0],
|
|
33
33
|
name: e.name,
|
|
34
34
|
variant: "horizontal"
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */
|
|
37
|
+
const u = n && e.hasClubPrice;
|
|
38
|
+
return /* @__PURE__ */ t(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
41
|
className: "product-card-horizontal",
|
|
42
42
|
style: {
|
|
43
|
-
backgroundColor:
|
|
43
|
+
backgroundColor: l ? "var(--color-grayScale-faded" : "#fff"
|
|
44
44
|
},
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ t(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
49
|
onClick: S,
|
|
50
50
|
className: "product-card-section-product-horizontal",
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
52
|
+
/* @__PURE__ */ s(
|
|
53
|
+
N,
|
|
54
54
|
{
|
|
55
|
-
isProductClubAndClient:
|
|
56
|
-
variant:
|
|
55
|
+
isProductClubAndClient: u,
|
|
56
|
+
variant: r,
|
|
57
57
|
hasPlusFriendBadge: a,
|
|
58
58
|
promotion: i,
|
|
59
|
-
image: (
|
|
59
|
+
image: (f = e.image) == null ? void 0 : f[0]
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ t(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
className: "product-card-horizontal-description",
|
|
66
66
|
style: {
|
|
67
|
-
backgroundColor:
|
|
67
|
+
backgroundColor: u ? "#FDF3DE" : "var(--color-grayScale-faded)"
|
|
68
68
|
},
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ t("div", { className: "product-card-section-name", children: [
|
|
71
|
+
/* @__PURE__ */ s(O, { name: e.name }),
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
75
|
className: "product-card-section-badge-horizontal",
|
|
76
|
-
style: { display: k ? "" : "
|
|
76
|
+
style: { display: !k && !b ? "none" : "" },
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
78
|
+
/* @__PURE__ */ s(
|
|
79
|
+
z,
|
|
80
80
|
{
|
|
81
81
|
unitMultiplier: e.unitMultiplier,
|
|
82
82
|
skuSpecifications: e.skuSpecifications,
|
|
83
83
|
measurementUnit: e.measurementUnit,
|
|
84
|
-
setIsShowProductBadge:
|
|
84
|
+
setIsShowProductBadge: x
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
87
|
+
/* @__PURE__ */ s(
|
|
88
|
+
D,
|
|
89
89
|
{
|
|
90
90
|
offers: e.offers,
|
|
91
|
-
defaultScListPrice:
|
|
91
|
+
defaultScListPrice: o,
|
|
92
92
|
nativeListPrice: e.customOffers.listPriceCustom,
|
|
93
93
|
nativeSpotPrice: e.customOffers.spotPriceCustom,
|
|
94
94
|
skuSpecifications: e.skuSpecifications,
|
|
95
95
|
unitMultiplier: e.unitMultiplier,
|
|
96
96
|
hasPromotionalPrice: c,
|
|
97
|
-
setIsShowProductBadge:
|
|
97
|
+
setIsShowProductBadge: v
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
]
|
|
101
101
|
}
|
|
102
102
|
)
|
|
103
103
|
] }),
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
r === "horizontal" && /* @__PURE__ */ s(
|
|
105
|
+
U,
|
|
106
106
|
{
|
|
107
|
-
variant:
|
|
107
|
+
variant: r,
|
|
108
108
|
productSectionBadge: {
|
|
109
109
|
text: i == null ? void 0 : i.flagText,
|
|
110
110
|
color: {
|
|
@@ -114,10 +114,10 @@ const G = ({
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
117
|
+
/* @__PURE__ */ s(
|
|
118
|
+
B,
|
|
119
119
|
{
|
|
120
|
-
isClubClient:
|
|
120
|
+
isClubClient: n,
|
|
121
121
|
unitMultiplier: e.unitMultiplier,
|
|
122
122
|
hasPromotionalPrice: c,
|
|
123
123
|
measurementUnit: e.measurementUnit,
|
|
@@ -128,7 +128,7 @@ const G = ({
|
|
|
128
128
|
spotPriceCustom: e.customOffers.spotPriceCustom,
|
|
129
129
|
spotPriceKg: e.customOffers.spotPriceKg
|
|
130
130
|
},
|
|
131
|
-
defaultScListPrice:
|
|
131
|
+
defaultScListPrice: o,
|
|
132
132
|
clubPrice: C,
|
|
133
133
|
hasPlusFriendBadge: a
|
|
134
134
|
}
|
|
@@ -139,13 +139,13 @@ const G = ({
|
|
|
139
139
|
]
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
|
|
142
|
+
/* @__PURE__ */ s(
|
|
143
|
+
M,
|
|
144
144
|
{
|
|
145
|
-
addToCartAction:
|
|
146
|
-
quantitySelectorAction:
|
|
145
|
+
addToCartAction: g,
|
|
146
|
+
quantitySelectorAction: P,
|
|
147
147
|
productInCart: h,
|
|
148
|
-
layout:
|
|
148
|
+
layout: r
|
|
149
149
|
}
|
|
150
150
|
)
|
|
151
151
|
]
|