@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 r, jsxs as s } from "react/jsx-runtime";
2
- import { useState as v } from "react";
3
- import { ProductCardUnavailable as x } from "../ProducCardUnavailable/index.js";
4
- import { ProductCardBadgeKg as y } from "../ProductCardBadge/ProductCardBadgeKg.js";
5
- import { ProductCardDiscountBadge as z } from "../ProductCardBadge/ProductCardDiscountBadge.js";
6
- import { ProductCardButton as b } from "../ProductCardButton/index.js";
7
- import { ProductCardImage as M } from "../ProductCardImage/index.js";
8
- import { ProductCardName as N } from "../ProductCardName/index.js";
9
- import { ProductCardPrice as O } from "../ProductCardPrice/index.js";
10
- import { ProductCardPromotionFlag as B } from "../ProductCardPromotionFlag/index.js";
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: o,
18
- variant: t,
19
- defaultScListPrice: l,
20
- isClubClient: u,
21
- addToCartAction: P,
22
- quantitySelectorAction: g,
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 f, d;
27
- const [k, n] = v(!1);
28
- if (o)
29
- return /* @__PURE__ */ r(
30
- x,
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: (f = e.image) == null ? void 0 : f[0],
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 m = u && e.hasClubPrice;
38
- return /* @__PURE__ */ s(
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: o ? "var(--color-grayScale-faded" : "#fff"
43
+ backgroundColor: l ? "var(--color-grayScale-faded" : "#fff"
44
44
  },
45
45
  children: [
46
- /* @__PURE__ */ s(
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__ */ r(
53
- M,
52
+ /* @__PURE__ */ s(
53
+ N,
54
54
  {
55
- isProductClubAndClient: m,
56
- variant: t,
55
+ isProductClubAndClient: u,
56
+ variant: r,
57
57
  hasPlusFriendBadge: a,
58
58
  promotion: i,
59
- image: (d = e.image) == null ? void 0 : d[0]
59
+ image: (f = e.image) == null ? void 0 : f[0]
60
60
  }
61
61
  ),
62
- /* @__PURE__ */ s(
62
+ /* @__PURE__ */ t(
63
63
  "div",
64
64
  {
65
65
  className: "product-card-horizontal-description",
66
66
  style: {
67
- backgroundColor: m ? "#FDF3DE" : "var(--color-grayScale-faded)"
67
+ backgroundColor: u ? "#FDF3DE" : "var(--color-grayScale-faded)"
68
68
  },
69
69
  children: [
70
- /* @__PURE__ */ s("div", { className: "product-card-section-name", children: [
71
- /* @__PURE__ */ r(N, { name: e.name }),
72
- /* @__PURE__ */ s(
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 ? "" : "none" },
76
+ style: { display: !k && !b ? "none" : "" },
77
77
  children: [
78
- /* @__PURE__ */ r(
79
- y,
78
+ /* @__PURE__ */ s(
79
+ z,
80
80
  {
81
81
  unitMultiplier: e.unitMultiplier,
82
82
  skuSpecifications: e.skuSpecifications,
83
83
  measurementUnit: e.measurementUnit,
84
- setIsShowProductBadge: n
84
+ setIsShowProductBadge: x
85
85
  }
86
86
  ),
87
- /* @__PURE__ */ r(
88
- z,
87
+ /* @__PURE__ */ s(
88
+ D,
89
89
  {
90
90
  offers: e.offers,
91
- defaultScListPrice: l,
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: n
97
+ setIsShowProductBadge: v
98
98
  }
99
99
  )
100
100
  ]
101
101
  }
102
102
  )
103
103
  ] }),
104
- t === "horizontal" && /* @__PURE__ */ r(
105
- B,
104
+ r === "horizontal" && /* @__PURE__ */ s(
105
+ U,
106
106
  {
107
- variant: t,
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__ */ r(
118
- O,
117
+ /* @__PURE__ */ s(
118
+ B,
119
119
  {
120
- isClubClient: u,
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: l,
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__ */ r(
143
- b,
142
+ /* @__PURE__ */ s(
143
+ M,
144
144
  {
145
- addToCartAction: P,
146
- quantitySelectorAction: g,
145
+ addToCartAction: g,
146
+ quantitySelectorAction: P,
147
147
  productInCart: h,
148
- layout: t
148
+ layout: r
149
149
  }
150
150
  )
151
151
  ]
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@plurix/ecom-components",
3
3
  "author": "Plurix",
4
4
  "private": false,
5
- "version": "1.16.1-commerce.5",
5
+ "version": "1.16.1-commerce.7",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",