@plurix/ecom-components 1.14.1-COM-1442.2 → 1.14.1-bugfix-1891.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/dist/node_modules/@faststore/components/dist/esm/atoms/Button/Button.js +45 -0
- package/dist/node_modules/@faststore/components/dist/esm/atoms/Loader/Loader.js +34 -0
- package/dist/node_modules/@faststore/components/dist/esm/molecules/IconButton/IconButton.js +29 -0
- package/dist/packages/Carousel/Carousel.js +1 -1
- package/dist/packages/CartClubAlert/CartClubAlert.js +1 -1
- package/dist/packages/ChangeOrderModal/ChangeOrderModal.d.ts +1 -12
- package/dist/packages/ChangeOrderModal/ChangeOrderModal.js +67 -78
- package/dist/packages/ChangeOrderModal/api/getOrderForm.js +15 -6
- package/dist/packages/ChangeOrderModal/api/getProductsSimilars.d.ts +4 -7
- package/dist/packages/ChangeOrderModal/api/getProductsSimilars.js +21 -22
- package/dist/packages/ChangeOrderModal/api/postChangeOrder.d.ts +1 -6
- package/dist/packages/ChangeOrderModal/api/postChangeOrder.js +17 -11
- package/dist/packages/Coupons/Coupons.d.ts +1 -4
- package/dist/packages/Coupons/Coupons.js +57 -67
- package/dist/packages/Coupons/components/CouponCard.d.ts +1 -3
- package/dist/packages/Coupons/components/CouponCard.js +83 -94
- package/dist/packages/Coupons/views/CouponsView.d.ts +1 -3
- package/dist/packages/Coupons/views/CouponsView.js +78 -87
- package/dist/packages/Coupons/views/LoadingView.js +6 -6
- package/dist/packages/Modal/Modal.js +1 -1
- package/dist/packages/Onboarding/Onboarding.js +1 -1
- package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.js +10 -13
- package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.d.ts +2 -3
- package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.js +31 -15
- package/dist/packages/ProductCard/ProductCardButton/AddToCartButton.js +1 -1
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.d.ts +2 -17
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.js +1 -1
- package/dist/packages/ProductCard/ProductCardButton/QuantitySelector.js +6 -6
- package/dist/packages/ProductCard/ProductCardHorizontal/index.js +30 -31
- package/dist/packages/ProductCard/ProductCardPrice/index.d.ts +1 -8
- package/dist/packages/ProductCard/ProductCardPrice/index.js +31 -27
- package/dist/packages/ProductCard/ProductCardVertical/index.js +15 -16
- package/dist/packages/ProductCard/index.js +1 -1
- package/dist/packages/ProductCardSeeMore/ProductCardSeeMore.js +1 -1
- package/dist/packages/Regionalization/Regionalization.d.ts +1 -1
- package/dist/packages/Regionalization/Regionalization.js +13 -15
- package/dist/packages/Regionalization/context/RegionalizationContext.d.ts +1 -1
- package/dist/packages/Regionalization/context/RegionalizationContext.js +29 -31
- package/dist/packages/Regionalization/types/RegionalizationProps.d.ts +0 -1
- package/dist/packages/Regionalization/views/AllStoresScreen.js +21 -21
- package/dist/packages/Regionalization/views/InitialView.js +26 -24
- package/dist/packages/Tour/Tour.js +1 -1
- package/dist/styles/product-card.global.css +1 -1
- package/dist/styles/regionalization.global.css +1 -1
- package/dist/types/ProductCard.d.ts +12 -13
- package/dist/utils/changerOrderModal.js +16 -13
- package/package.json +71 -69
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Button.d.ts +0 -18
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Button.js +0 -80
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/IconButton.d.ts +0 -10
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/IconButton.js +0 -61
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Loader.d.ts +0 -8
- package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/Loader.js +0 -44
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as a, Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Skeleton as i } from "@acctglobal/skeleton";
|
|
3
|
+
import { ModalHeader as m } from "../components/ModalHeader.js";
|
|
4
|
+
import { ModalFooter as u } from "../components/ModalFooter.js";
|
|
5
5
|
const f = ({
|
|
6
6
|
isIO: t = !1,
|
|
7
7
|
closeIOModal: o,
|
|
8
8
|
genericTaggingEvent: e
|
|
9
9
|
}) => /* @__PURE__ */ a(n, { children: [
|
|
10
10
|
t && o && /* @__PURE__ */ r(
|
|
11
|
-
|
|
11
|
+
m,
|
|
12
12
|
{
|
|
13
13
|
closeModal: o,
|
|
14
14
|
title: "Meus Cupons",
|
|
@@ -16,7 +16,7 @@ const f = ({
|
|
|
16
16
|
}
|
|
17
17
|
),
|
|
18
18
|
/* @__PURE__ */ r(
|
|
19
|
-
|
|
19
|
+
i,
|
|
20
20
|
{
|
|
21
21
|
width: t ? "100%" : "90%",
|
|
22
22
|
height: t ? 600 : 425,
|
|
@@ -26,7 +26,7 @@ const f = ({
|
|
|
26
26
|
}
|
|
27
27
|
),
|
|
28
28
|
t && o && /* @__PURE__ */ r(
|
|
29
|
-
|
|
29
|
+
u,
|
|
30
30
|
{
|
|
31
31
|
isFloating: !0,
|
|
32
32
|
cancelButtonAction: o,
|
|
@@ -3,7 +3,7 @@ import { useRef as s, useEffect as p } from "react";
|
|
|
3
3
|
import { ArrowIcon as g } from "../../assets/svgs/ArrowIcon.js";
|
|
4
4
|
import { CloseIcon as k } from "../../assets/svgs/CloseIcon.js";
|
|
5
5
|
import { HAS_WINDOW as v } from "../../constants/index.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */const R = (w) => {
|
|
7
7
|
const {
|
|
8
8
|
isOpen: r,
|
|
9
9
|
setIsOpen: C,
|
|
@@ -4,7 +4,7 @@ import { Header as x } from "./components/Header.js";
|
|
|
4
4
|
import { Content as S } from "./components/Content.js";
|
|
5
5
|
import { Footer as c } from "./components/Footer.js";
|
|
6
6
|
import { TIPS_LENGTH as h } from "./constants/tips.js";
|
|
7
|
-
/* empty css
|
|
7
|
+
/* empty css */const w = ({
|
|
8
8
|
socialMediaLinks: a,
|
|
9
9
|
handleCloseAction: r,
|
|
10
10
|
handleFinishAction: n,
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
c !== "un" && (d < 1 || d >= 1) && r(!0);
|
|
9
|
-
}, [c, d, r]), c === "un" ? null : d < 1 ? /* @__PURE__ */ a("div", { className: "product-card-badge", children: /* @__PURE__ */ g("p", { className: "product-card-badge-kg", children: [
|
|
10
|
-
d * 1e3,
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
const g = ({
|
|
3
|
+
measurementUnit: e,
|
|
4
|
+
setIsShowProductBadge: d,
|
|
5
|
+
unitMultiplier: r
|
|
6
|
+
}) => e === "un" ? null : r < 1 ? (d(!0), /* @__PURE__ */ a("div", { className: "product-card-badge", children: /* @__PURE__ */ c("p", { className: "product-card-badge-kg", children: [
|
|
7
|
+
r * 1e3,
|
|
11
8
|
"g"
|
|
12
|
-
] }) }) : /* @__PURE__ */ a("div", { className: "product-card-badge", children: /* @__PURE__ */
|
|
13
|
-
|
|
9
|
+
] }) })) : (r >= 1 && d(!0), /* @__PURE__ */ a("div", { className: "product-card-badge", children: /* @__PURE__ */ c("p", { className: "product-card-badge-kg", children: [
|
|
10
|
+
r,
|
|
14
11
|
"kg"
|
|
15
12
|
] }) }));
|
|
16
13
|
export {
|
|
17
|
-
|
|
14
|
+
g as ProductCardBadgeKg
|
|
18
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SkuSpecificationsProps, ProductCardProps
|
|
1
|
+
import { SkuSpecificationsProps, ProductCardProps } from '../../../types/ProductCard';
|
|
2
2
|
|
|
3
3
|
interface ProductCardDiscountBadge {
|
|
4
4
|
skuSpecifications: SkuSpecificationsProps[];
|
|
@@ -8,7 +8,6 @@ interface ProductCardDiscountBadge {
|
|
|
8
8
|
hasPromotionalPrice: ProductCardProps['hasPromotionalPrice'];
|
|
9
9
|
defaultScListPrice?: number;
|
|
10
10
|
setIsShowProductBadge: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
-
offers: offers;
|
|
12
11
|
}
|
|
13
|
-
export declare const ProductCardDiscountBadge: ({
|
|
12
|
+
export declare const ProductCardDiscountBadge: ({ nativeListPrice, nativeSpotPrice, skuSpecifications, unitMultiplier, hasPromotionalPrice, defaultScListPrice, setIsShowProductBadge }: ProductCardDiscountBadge) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
13
|
export {};
|
|
@@ -1,26 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as l, useEffect as D } from "react";
|
|
3
|
+
const E = ({
|
|
4
|
+
nativeListPrice: c,
|
|
5
|
+
nativeSpotPrice: s,
|
|
6
|
+
skuSpecifications: n,
|
|
7
|
+
unitMultiplier: a,
|
|
8
|
+
hasPromotionalPrice: i,
|
|
9
|
+
defaultScListPrice: P,
|
|
10
|
+
setIsShowProductBadge: d
|
|
6
11
|
}) => {
|
|
7
|
-
const { listPrice: u,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
const { listPrice: u, spotPrice: o } = i || {}, f = (r, e) => l(() => {
|
|
13
|
+
const g = (r - e) * 100 / r;
|
|
14
|
+
return Math.round(g);
|
|
15
|
+
}, [e, r]), { listPriceCustom: m, spotPriceCustom: p } = l(() => u && o && o !== s ? {
|
|
16
|
+
listPriceCustom: u,
|
|
17
|
+
spotPriceCustom: o
|
|
18
|
+
} : {
|
|
19
|
+
listPriceCustom: c,
|
|
20
|
+
spotPriceCustom: s
|
|
21
|
+
}, [
|
|
22
|
+
u,
|
|
23
|
+
o,
|
|
24
|
+
s,
|
|
25
|
+
c
|
|
26
|
+
]), C = "Venda por unidade", N = n == null ? void 0 : n.some((r) => r.field.originalName === C && r.values.some((e) => e.originalName === "true")), h = P || (N ? m : ((r) => Number(r.toString().match(/^\d+(?:\.\d{0,2})?/)))(m * a)), t = Math.round(
|
|
27
|
+
Number(f(h, p))
|
|
12
28
|
);
|
|
13
|
-
return
|
|
29
|
+
return D(() => {
|
|
14
30
|
if (!t || t <= 0) {
|
|
15
|
-
|
|
31
|
+
d(!1);
|
|
16
32
|
return;
|
|
17
33
|
}
|
|
18
|
-
|
|
19
|
-
}, [t]), !t || t <= 0 ? null : /* @__PURE__ */
|
|
34
|
+
d(!0);
|
|
35
|
+
}, [t]), !t || t <= 0 ? null : /* @__PURE__ */ b("div", { className: "product-card-discount-badge", children: /* @__PURE__ */ x("p", { className: "product-card-discount-badge-value", children: [
|
|
20
36
|
t,
|
|
21
37
|
"%"
|
|
22
38
|
] }) });
|
|
23
39
|
};
|
|
24
40
|
export {
|
|
25
|
-
|
|
41
|
+
E as ProductCardDiscountBadge
|
|
26
42
|
};
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconButtonProps } from '@faststore/ui';
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
3
|
|
|
3
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
testId?: string;
|
|
5
|
-
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
6
|
-
size?: 'small' | 'regular';
|
|
7
|
-
inverse?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
loadingLabel?: string;
|
|
12
|
-
iconPosition?: 'left' | 'right';
|
|
13
|
-
}
|
|
14
|
-
export interface IconButtonProps extends Omit<ButtonProps, 'aria-label'> {
|
|
15
|
-
testId?: string;
|
|
16
|
-
icon: ReactNode;
|
|
17
|
-
'aria-label': AriaAttributes['aria-label'];
|
|
18
|
-
}
|
|
19
4
|
export interface QuantitySelectorProps extends InputHTMLAttributes<HTMLDivElement> {
|
|
20
5
|
quantity: number | string;
|
|
21
6
|
leftButtonProps: Omit<IconButtonProps, 'aria-label'>;
|
|
@@ -21,7 +21,7 @@ var m = (t, a) => {
|
|
|
21
21
|
};
|
|
22
22
|
import { jsxs as q, jsx as n } from "react/jsx-runtime";
|
|
23
23
|
import { forwardRef as Q } from "react";
|
|
24
|
-
import p from "
|
|
24
|
+
import p from "../../../../node_modules/@faststore/components/dist/esm/molecules/IconButton/IconButton.js";
|
|
25
25
|
const A = Q(function(j, h) {
|
|
26
26
|
var s = j, {
|
|
27
27
|
quantity: a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as d, Fragment as c } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import h from "
|
|
4
|
-
import
|
|
2
|
+
import { Skeleton as s } from "@acctglobal/skeleton";
|
|
3
|
+
import { memo as h } from "react";
|
|
4
|
+
import m from "./CustomQuantitySelector/index.js";
|
|
5
5
|
const p = ({
|
|
6
6
|
hasUndQtd: i,
|
|
7
7
|
decrease: r,
|
|
@@ -13,7 +13,7 @@ const p = ({
|
|
|
13
13
|
}) => /* @__PURE__ */ t("div", { className: "input-add", "data-testid": "quantity-selector-container", children: o ? /* @__PURE__ */ d(c, { children: [
|
|
14
14
|
!a && /* @__PURE__ */ t("div", { className: "product-add-text", children: /* @__PURE__ */ t("p", { children: "Produto adicionado" }) }),
|
|
15
15
|
/* @__PURE__ */ t(
|
|
16
|
-
|
|
16
|
+
m,
|
|
17
17
|
{
|
|
18
18
|
measureUnit: o,
|
|
19
19
|
quantity: i,
|
|
@@ -62,13 +62,13 @@ const p = ({
|
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
] }) : /* @__PURE__ */ t(
|
|
65
|
-
|
|
65
|
+
s,
|
|
66
66
|
{
|
|
67
67
|
width: 100,
|
|
68
68
|
height: 40,
|
|
69
69
|
backgroundColor: "var(--color-grayScale-faded)"
|
|
70
70
|
}
|
|
71
|
-
) }), v =
|
|
71
|
+
) }), v = h(p);
|
|
72
72
|
export {
|
|
73
73
|
v as default
|
|
74
74
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v } from "react";
|
|
3
3
|
import { ProductCardUnavailable as x } from "../ProducCardUnavailable/index.js";
|
|
4
4
|
import { ProductCardBadgeKg as y } from "../ProductCardBadge/ProductCardBadgeKg.js";
|
|
@@ -7,7 +7,7 @@ import { ProductCardButton as b } from "../ProductCardButton/index.js";
|
|
|
7
7
|
import { ProductCardImage as M } from "../ProductCardImage/index.js";
|
|
8
8
|
import { ProductCardName as N } from "../ProductCardName/index.js";
|
|
9
9
|
import { ProductCardPrice as O } from "../ProductCardPrice/index.js";
|
|
10
|
-
import { ProductCardPromotionFlag as
|
|
10
|
+
import { ProductCardPromotionFlag as p } from "../ProductCardPromotionFlag/index.js";
|
|
11
11
|
const G = ({
|
|
12
12
|
hasPlusFriendBadge: a,
|
|
13
13
|
promotion: i,
|
|
@@ -15,7 +15,7 @@ const G = ({
|
|
|
15
15
|
hasPromotionalPrice: c,
|
|
16
16
|
clubPrice: C,
|
|
17
17
|
outOfStock: o,
|
|
18
|
-
variant:
|
|
18
|
+
variant: s,
|
|
19
19
|
defaultScListPrice: l,
|
|
20
20
|
isClubClient: u,
|
|
21
21
|
addToCartAction: P,
|
|
@@ -23,19 +23,19 @@ const G = ({
|
|
|
23
23
|
productInCart: h,
|
|
24
24
|
openModal: S
|
|
25
25
|
}) => {
|
|
26
|
-
var
|
|
27
|
-
const [k,
|
|
26
|
+
var d, f;
|
|
27
|
+
const [k, m] = v(!1);
|
|
28
28
|
if (o)
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ t(
|
|
30
30
|
x,
|
|
31
31
|
{
|
|
32
|
-
image: (
|
|
32
|
+
image: (d = e.image) == null ? void 0 : d[0],
|
|
33
33
|
name: e.name,
|
|
34
34
|
variant: "horizontal"
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */
|
|
37
|
+
const n = u && e.hasClubPrice;
|
|
38
|
+
return /* @__PURE__ */ r(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
41
|
className: "product-card-horizontal",
|
|
@@ -43,68 +43,67 @@ const G = ({
|
|
|
43
43
|
backgroundColor: o ? "var(--color-grayScale-faded" : "#fff"
|
|
44
44
|
},
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ r(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
49
|
onClick: S,
|
|
50
50
|
className: "product-card-section-product-horizontal",
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ t(
|
|
53
53
|
M,
|
|
54
54
|
{
|
|
55
|
-
isProductClubAndClient:
|
|
56
|
-
variant:
|
|
55
|
+
isProductClubAndClient: n,
|
|
56
|
+
variant: s,
|
|
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__ */ r(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
className: "product-card-horizontal-description",
|
|
66
66
|
style: {
|
|
67
|
-
backgroundColor:
|
|
67
|
+
backgroundColor: n ? "#FDF3DE" : "var(--color-grayScale-faded)"
|
|
68
68
|
},
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ r("div", { className: "product-card-section-name", children: [
|
|
71
|
+
/* @__PURE__ */ t(N, { name: e.name }),
|
|
72
|
+
/* @__PURE__ */ r(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
75
|
className: "product-card-section-badge-horizontal",
|
|
76
76
|
style: { display: k ? "" : "none" },
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ t(
|
|
79
79
|
y,
|
|
80
80
|
{
|
|
81
81
|
unitMultiplier: e.unitMultiplier,
|
|
82
82
|
skuSpecifications: e.skuSpecifications,
|
|
83
83
|
measurementUnit: e.measurementUnit,
|
|
84
|
-
setIsShowProductBadge:
|
|
84
|
+
setIsShowProductBadge: m
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ t(
|
|
88
88
|
z,
|
|
89
89
|
{
|
|
90
|
-
offers: e.offers,
|
|
91
90
|
defaultScListPrice: l,
|
|
92
91
|
nativeListPrice: e.customOffers.listPriceCustom,
|
|
93
92
|
nativeSpotPrice: e.customOffers.spotPriceCustom,
|
|
94
93
|
skuSpecifications: e.skuSpecifications,
|
|
95
94
|
unitMultiplier: e.unitMultiplier,
|
|
96
95
|
hasPromotionalPrice: c,
|
|
97
|
-
setIsShowProductBadge:
|
|
96
|
+
setIsShowProductBadge: m
|
|
98
97
|
}
|
|
99
98
|
)
|
|
100
99
|
]
|
|
101
100
|
}
|
|
102
101
|
)
|
|
103
102
|
] }),
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
s === "horizontal" && /* @__PURE__ */ t(
|
|
104
|
+
p,
|
|
106
105
|
{
|
|
107
|
-
variant:
|
|
106
|
+
variant: s,
|
|
108
107
|
productSectionBadge: {
|
|
109
108
|
text: i == null ? void 0 : i.flagText,
|
|
110
109
|
color: {
|
|
@@ -114,7 +113,7 @@ const G = ({
|
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ t(
|
|
118
117
|
O,
|
|
119
118
|
{
|
|
120
119
|
isClubClient: u,
|
|
@@ -126,7 +125,7 @@ const G = ({
|
|
|
126
125
|
listPriceCustom: e.customOffers.listPriceCustom,
|
|
127
126
|
hasDiscount: e.customOffers.hasDiscount,
|
|
128
127
|
spotPriceCustom: e.customOffers.spotPriceCustom,
|
|
129
|
-
spotPriceKg: e.customOffers.
|
|
128
|
+
spotPriceKg: e.customOffers.spotPriceCustom
|
|
130
129
|
},
|
|
131
130
|
defaultScListPrice: l,
|
|
132
131
|
clubPrice: C,
|
|
@@ -139,13 +138,13 @@ const G = ({
|
|
|
139
138
|
]
|
|
140
139
|
}
|
|
141
140
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ t(
|
|
143
142
|
b,
|
|
144
143
|
{
|
|
145
144
|
addToCartAction: P,
|
|
146
145
|
quantitySelectorAction: g,
|
|
147
146
|
productInCart: h,
|
|
148
|
-
layout:
|
|
147
|
+
layout: s
|
|
149
148
|
}
|
|
150
149
|
)
|
|
151
150
|
]
|
|
@@ -20,12 +20,5 @@ interface ProductCardPricesProps {
|
|
|
20
20
|
unitMultiplier: number;
|
|
21
21
|
hasPlusFriendBadge?: boolean;
|
|
22
22
|
}
|
|
23
|
-
export declare const ProductCardPrice: ({ clubPrice, unitMultiplier, customOffers, measurementUnit, isClubClient, hasPlusFriendBadge }: ProductCardPricesProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
interface getPriceToShowParams {
|
|
25
|
-
spotPriceKg: number | undefined | null;
|
|
26
|
-
unitMultiplier: number;
|
|
27
|
-
measurementUnit?: string;
|
|
28
|
-
spotPriceCustom: number;
|
|
29
|
-
}
|
|
30
|
-
export declare const getPriceToShow: ({ spotPriceKg, unitMultiplier, measurementUnit, spotPriceCustom }: getPriceToShowParams) => number | null | undefined;
|
|
23
|
+
export declare const ProductCardPrice: ({ skuSpecifications, hasPromotionalPrice, clubPrice, unitMultiplier, defaultScListPrice, customOffers, measurementUnit, isClubClient, hasPlusFriendBadge }: ProductCardPricesProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
24
|
export {};
|
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx as e, Fragment as j, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as I } from "react";
|
|
3
|
+
const U = ({
|
|
4
|
+
skuSpecifications: t,
|
|
5
|
+
hasPromotionalPrice: C,
|
|
6
|
+
clubPrice: i,
|
|
7
|
+
unitMultiplier: h,
|
|
8
|
+
defaultScListPrice: n,
|
|
5
9
|
customOffers: r,
|
|
6
|
-
measurementUnit:
|
|
7
|
-
isClubClient:
|
|
8
|
-
hasPlusFriendBadge:
|
|
10
|
+
measurementUnit: N,
|
|
11
|
+
isClubClient: g,
|
|
12
|
+
hasPlusFriendBadge: v
|
|
9
13
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
spotPriceCustom:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const { listPrice: s, spotPrice: c } = C || {}, { listPriceCustom: m, spotPriceCustom: P } = I(() => s && c && c !== r.spotPriceCustom ? {
|
|
15
|
+
listPriceCustom: s,
|
|
16
|
+
spotPriceCustom: c
|
|
17
|
+
} : {
|
|
18
|
+
listPriceCustom: r.listPriceCustom,
|
|
19
|
+
spotPriceCustom: r.spotPriceCustom
|
|
20
|
+
}, [
|
|
21
|
+
s,
|
|
22
|
+
c,
|
|
23
|
+
r.spotPriceCustom,
|
|
24
|
+
r.listPriceCustom
|
|
25
|
+
]), b = !!(i && i !== r.spotPriceCustom), B = !!(n && n !== P), l = (o) => o.toLocaleString("pt-br", { style: "currency", currency: "BRL" }), w = "Venda por unidade", u = t == null ? void 0 : t.some((o) => o.field.originalName === w && o.values.some((F) => F.originalName === "true")), x = N !== "un", a = n || (u ? m : ((o) => Number(o.toString().match(/^\d+(?:\.\d{0,2})?/)))(m * h)), y = v ? "no + Amigo" : "no clube", d = x && r.spotPriceKg && u ? r.spotPriceKg : P, D = (a > d || B) && a && d;
|
|
26
|
+
return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ p("div", { className: "product-card-price", children: [
|
|
27
|
+
!g && b && /* @__PURE__ */ e("div", { className: "product-card-club-price-container", children: /* @__PURE__ */ e("p", { className: "product-card-club-price", children: `${l(i || 0)} ${y}` }) }),
|
|
28
|
+
/* @__PURE__ */ p("div", { className: "product-card-price-container", children: [
|
|
29
|
+
D && /* @__PURE__ */ e("p", { className: "product-card-old-price", children: /* @__PURE__ */ p("span", { children: [
|
|
20
30
|
" ",
|
|
21
|
-
|
|
31
|
+
l(a)
|
|
22
32
|
] }) }),
|
|
23
|
-
/* @__PURE__ */ e("p", { className: "product-card-new-price", children:
|
|
33
|
+
/* @__PURE__ */ e("p", { className: "product-card-new-price", children: l(d) })
|
|
24
34
|
] })
|
|
25
35
|
] }) });
|
|
26
|
-
}
|
|
27
|
-
spotPriceKg: c,
|
|
28
|
-
unitMultiplier: t,
|
|
29
|
-
measurementUnit: r,
|
|
30
|
-
spotPriceCustom: n
|
|
31
|
-
}) => r === "kg" && t < 1 ? n : r === "kg" ? c : n;
|
|
36
|
+
};
|
|
32
37
|
export {
|
|
33
|
-
|
|
34
|
-
h as getPriceToShow
|
|
38
|
+
U as ProductCardPrice
|
|
35
39
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v } from "react";
|
|
3
3
|
import { ProductCardUnavailable as O } from "../ProducCardUnavailable/index.js";
|
|
4
4
|
import { ProductCardBadgeKg as M } from "../ProductCardBadge/ProductCardBadgeKg.js";
|
|
@@ -9,12 +9,12 @@ import { ProductCardName as U } from "../ProductCardName/index.js";
|
|
|
9
9
|
import { ProductCardPrice as b } from "../ProductCardPrice/index.js";
|
|
10
10
|
const V = ({
|
|
11
11
|
hasPlusFriendBadge: r,
|
|
12
|
-
promotion:
|
|
12
|
+
promotion: d,
|
|
13
13
|
product: i,
|
|
14
14
|
hasPromotionalPrice: o,
|
|
15
|
-
clubPrice:
|
|
15
|
+
clubPrice: f,
|
|
16
16
|
outOfStock: P,
|
|
17
|
-
variant:
|
|
17
|
+
variant: s,
|
|
18
18
|
defaultScListPrice: a,
|
|
19
19
|
isClubClient: c,
|
|
20
20
|
hasClub: p,
|
|
@@ -31,23 +31,23 @@ const V = ({
|
|
|
31
31
|
{
|
|
32
32
|
image: (u = i.image) == null ? void 0 : u[0],
|
|
33
33
|
name: i.name,
|
|
34
|
-
variant:
|
|
34
|
+
variant: s
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
const n = c && i.hasClubPrice;
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */ e("div", { className: "product-card", children: /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ t("div", { id: "product-card", children: [
|
|
39
|
+
/* @__PURE__ */ e("div", { className: "product-card", children: /* @__PURE__ */ t("div", { className: "product-card-container", onClick: C, children: [
|
|
40
40
|
/* @__PURE__ */ e(
|
|
41
41
|
D,
|
|
42
42
|
{
|
|
43
43
|
isProductClubAndClient: n,
|
|
44
|
-
variant:
|
|
44
|
+
variant: s,
|
|
45
45
|
hasPlusFriendBadge: r,
|
|
46
|
-
promotion:
|
|
46
|
+
promotion: d,
|
|
47
47
|
image: (l = i.image) == null ? void 0 : l[0]
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ t(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
53
|
className: "product-card-description",
|
|
@@ -55,9 +55,9 @@ const V = ({
|
|
|
55
55
|
backgroundColor: n ? "#FDF3DE" : "var(--color-grayScale-faded)"
|
|
56
56
|
},
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ t("div", { className: "product-card-section-name", children: [
|
|
59
59
|
/* @__PURE__ */ e(U, { name: i.name }),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
className: "product-card-section-badge",
|
|
@@ -75,7 +75,6 @@ const V = ({
|
|
|
75
75
|
/* @__PURE__ */ e(
|
|
76
76
|
N,
|
|
77
77
|
{
|
|
78
|
-
offers: i.offers,
|
|
79
78
|
defaultScListPrice: a,
|
|
80
79
|
nativeListPrice: i.customOffers.listPriceCustom,
|
|
81
80
|
nativeSpotPrice: i.customOffers.spotPriceCustom,
|
|
@@ -102,10 +101,10 @@ const V = ({
|
|
|
102
101
|
listPriceCustom: i.customOffers.listPriceCustom,
|
|
103
102
|
hasDiscount: i.customOffers.hasDiscount,
|
|
104
103
|
spotPriceCustom: i.customOffers.spotPriceCustom,
|
|
105
|
-
spotPriceKg: i.customOffers.
|
|
104
|
+
spotPriceKg: i.customOffers.spotPriceCustom
|
|
106
105
|
},
|
|
107
106
|
defaultScListPrice: a,
|
|
108
|
-
clubPrice:
|
|
107
|
+
clubPrice: f,
|
|
109
108
|
hasPlusFriendBadge: r
|
|
110
109
|
}
|
|
111
110
|
)
|
|
@@ -119,7 +118,7 @@ const V = ({
|
|
|
119
118
|
addToCartAction: g,
|
|
120
119
|
quantitySelectorAction: S,
|
|
121
120
|
productInCart: h,
|
|
122
|
-
layout:
|
|
121
|
+
layout: s
|
|
123
122
|
}
|
|
124
123
|
)
|
|
125
124
|
] });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { ProductCardHorizontal as b } from "./ProductCardHorizontal/index.js";
|
|
3
3
|
import { ProductCardVertical as g } from "./ProductCardVertical/index.js";
|
|
4
|
-
/* empty css
|
|
4
|
+
/* empty css */const E = ({
|
|
5
5
|
product: l,
|
|
6
6
|
variant: r,
|
|
7
7
|
hasPlusFriendBadge: C = !1,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RegionalizationProps } from './types/RegionalizationProps';
|
|
2
2
|
|
|
3
|
-
export declare const Regionalization: ({ setMethod, setPickupName, setCity, deliveryPrice, setUf, setPickupTimes, pricesAndHours, setModalOpen, inputPostalCode, setInputPostalCode, sendPostalCode, status, setStatus, pickupPoints, pickupConfirmScreenText, regionalizeCatalog, titleText, priceStockInformation, moreInfosText, textBackButton, confirmButton, editAddress, delivery, pickup
|
|
3
|
+
export declare const Regionalization: ({ setMethod, setPickupName, setCity, deliveryPrice, setUf, setPickupTimes, pricesAndHours, setModalOpen, inputPostalCode, setInputPostalCode, sendPostalCode, status, setStatus, pickupPoints, pickupConfirmScreenText, regionalizeCatalog, titleText, priceStockInformation, moreInfosText, textBackButton, confirmButton, editAddress, delivery, pickup }: RegionalizationProps) => import("react/jsx-runtime").JSX.Element;
|