@plurix/ecom-components 0.0.2-beta.2 → 0.0.2-beta.4
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/assets/svgs/ArrowIcon.d.ts +9 -0
- package/dist/assets/svgs/ArrowIcon.js +37 -0
- package/dist/assets/svgs/CartEmptyCoupon.d.ts +1 -0
- package/dist/assets/svgs/CartEmptyCoupon.js +937 -0
- package/dist/assets/svgs/CloseIcon.d.ts +7 -1
- package/dist/assets/svgs/CloseIcon.js +13 -9
- package/dist/assets/svgs/CouponIcon.d.ts +4 -0
- package/dist/assets/svgs/CouponIcon.js +22 -0
- package/dist/assets/svgs/DeliveryExpressIcon.d.ts +1 -0
- package/dist/assets/svgs/DeliveryExpressIcon.js +21 -0
- package/dist/assets/svgs/DeliveryIcon.d.ts +1 -0
- package/dist/assets/svgs/DeliveryIcon.js +21 -0
- package/dist/assets/svgs/ErrorIcon.d.ts +5 -0
- package/dist/assets/svgs/ErrorIcon.js +29 -0
- package/dist/assets/svgs/GlassIcon.d.ts +1 -0
- package/dist/assets/svgs/GlassIcon.js +23 -0
- package/dist/assets/svgs/InfoIcon.d.ts +6 -0
- package/dist/assets/svgs/InfoIcon.js +47 -0
- package/dist/assets/svgs/NoCouponIcon.d.ts +1 -0
- package/dist/assets/svgs/NoCouponIcon.js +107 -0
- package/dist/assets/svgs/ShoppingBagsIcon.d.ts +1 -0
- package/dist/assets/svgs/ShoppingBagsIcon.js +30 -0
- package/dist/assets/svgs/ShoppingIcon.d.ts +1 -0
- package/dist/assets/svgs/ShoppingIcon.js +21 -0
- package/dist/assets/svgs/SuccessIcon.d.ts +6 -0
- package/dist/assets/svgs/SuccessIcon.js +38 -0
- package/dist/assets/svgs/WarningIcon.d.ts +1 -0
- package/dist/assets/svgs/WarningIcon.js +25 -0
- package/dist/main.d.ts +5 -0
- package/dist/main.js +11 -3
- package/dist/packages/Carousel/Carousel.d.ts +24 -0
- package/dist/packages/Carousel/Carousel.js +128 -0
- package/dist/packages/Carousel/components/Arrows.d.ts +8 -0
- package/dist/packages/Carousel/components/Arrows.js +43 -0
- package/dist/packages/Carousel/components/Bullets.d.ts +7 -0
- package/dist/packages/Carousel/components/Bullets.js +5 -0
- package/dist/packages/Carousel/test/Carrousel.test.js +80 -0
- package/dist/packages/Carousel/utils/defaultProps.d.ts +19 -0
- package/dist/packages/Carousel/utils/defaultProps.js +22 -0
- package/dist/packages/Coupons/Coupons.d.ts +14 -0
- package/dist/packages/Coupons/Coupons.js +100 -0
- package/dist/packages/Coupons/api/addCoupon.d.ts +3 -0
- package/dist/packages/Coupons/api/addCoupon.js +14 -0
- package/dist/packages/Coupons/api/getCoupons.d.ts +3 -0
- package/dist/packages/Coupons/api/getCoupons.js +15 -0
- package/dist/packages/Coupons/api/removeCoupon.d.ts +3 -0
- package/dist/packages/Coupons/api/removeCoupon.js +13 -0
- package/dist/packages/Coupons/components/Alert.d.ts +6 -0
- package/dist/packages/Coupons/components/Alert.js +13 -0
- package/dist/packages/Coupons/components/Breadcrumb.d.ts +6 -0
- package/dist/packages/Coupons/components/Breadcrumb.js +33 -0
- package/dist/packages/Coupons/components/CouponCard.d.ts +25 -0
- package/dist/packages/Coupons/components/CouponCard.js +132 -0
- package/dist/packages/Coupons/components/Modal.d.ts +8 -0
- package/dist/packages/Coupons/components/Modal.js +34 -0
- package/dist/packages/Coupons/components/ModalFooter.d.ts +8 -0
- package/dist/packages/Coupons/components/ModalFooter.js +14 -0
- package/dist/packages/Coupons/components/ModalHeader.d.ts +6 -0
- package/dist/packages/Coupons/components/ModalHeader.js +25 -0
- package/dist/packages/Coupons/components/NoCoupons.d.ts +1 -0
- package/dist/packages/Coupons/components/NoCoupons.js +10 -0
- package/dist/packages/Coupons/test/Alert.test.js +18 -0
- package/dist/packages/Coupons/test/Breadcrumb.test.js +41 -0
- package/dist/packages/Coupons/test/ModalFooter.test.js +32 -0
- package/dist/packages/Coupons/test/ModalHeader.test.js +23 -0
- package/dist/packages/Coupons/test/NoCoupons.test.js +17 -0
- package/dist/packages/Coupons/types/CouponType.d.ts +8 -0
- package/dist/packages/Coupons/types/CouponType.js +1 -0
- package/dist/packages/Coupons/types/SetOrderFormCouponResponse.d.ts +10 -0
- package/dist/packages/Coupons/types/SetOrderFormCouponResponse.js +1 -0
- package/dist/packages/Coupons/types/Views.d.ts +1 -0
- package/dist/packages/Coupons/types/Views.js +1 -0
- package/dist/packages/Coupons/views/CouponsView.d.ts +13 -0
- package/dist/packages/Coupons/views/CouponsView.js +122 -0
- package/dist/packages/Coupons/views/EmptyCartView.d.ts +6 -0
- package/dist/packages/Coupons/views/EmptyCartView.js +37 -0
- package/dist/packages/Coupons/views/LoadingView.d.ts +7 -0
- package/dist/packages/Coupons/views/LoadingView.js +39 -0
- package/dist/packages/Coupons/views/OverwriteView.d.ts +14 -0
- package/dist/packages/Coupons/views/OverwriteView.js +58 -0
- package/dist/packages/Coupons/views/RulesView.d.ts +13 -0
- package/dist/packages/Coupons/views/RulesView.js +49 -0
- package/dist/packages/Coupons/views/index.d.ts +5 -0
- package/dist/packages/Coupons/views/index.js +12 -0
- package/dist/packages/Regionalization/Regionalization.d.ts +3 -0
- package/dist/packages/Regionalization/Regionalization.js +93 -0
- package/dist/packages/Regionalization/components/Delivery.d.ts +24 -0
- package/dist/packages/Regionalization/components/Delivery.js +48 -0
- package/dist/packages/Regionalization/components/DeliveryExpress.d.ts +9 -0
- package/dist/packages/Regionalization/components/DeliveryExpress.js +25 -0
- package/dist/packages/Regionalization/components/InfoPrices.d.ts +9 -0
- package/dist/packages/Regionalization/components/InfoPrices.js +15 -0
- package/dist/packages/Regionalization/components/Navigation.d.ts +6 -0
- package/dist/packages/Regionalization/components/Navigation.js +59 -0
- package/dist/packages/Regionalization/components/NormalDelivery.d.ts +7 -0
- package/dist/packages/Regionalization/components/NormalDelivery.js +23 -0
- package/dist/packages/Regionalization/components/PickupPoint.d.ts +7 -0
- package/dist/packages/Regionalization/components/PickupPoint.js +32 -0
- package/dist/packages/Regionalization/components/Price.d.ts +7 -0
- package/dist/packages/Regionalization/components/Price.js +10 -0
- package/dist/packages/Regionalization/components/SetViewButton.d.ts +11 -0
- package/dist/packages/Regionalization/components/SetViewButton.js +24 -0
- package/dist/packages/Regionalization/components/Title.d.ts +8 -0
- package/dist/packages/Regionalization/components/Title.js +21 -0
- package/dist/packages/Regionalization/context/RegionalizationContext.d.ts +4 -0
- package/dist/packages/Regionalization/context/RegionalizationContext.js +113 -0
- package/dist/packages/Regionalization/types/Address.d.ts +13 -0
- package/dist/packages/Regionalization/types/Address.js +1 -0
- package/dist/packages/Regionalization/types/ContextProps.d.ts +29 -0
- package/dist/packages/Regionalization/types/ContextProps.js +1 -0
- package/dist/packages/Regionalization/types/PikcupPointType.d.ts +22 -0
- package/dist/packages/Regionalization/types/PikcupPointType.js +1 -0
- package/dist/packages/Regionalization/types/PricesAndHours.d.ts +13 -0
- package/dist/packages/Regionalization/types/PricesAndHours.js +1 -0
- package/dist/packages/Regionalization/types/RegionalizationProps.d.ts +87 -0
- package/dist/packages/Regionalization/types/RegionalizationProps.js +1 -0
- package/dist/packages/Regionalization/types/index.d.ts +5 -0
- package/dist/packages/Regionalization/types/index.js +1 -0
- package/dist/packages/Regionalization/utils/constants.d.ts +1 -0
- package/dist/packages/Regionalization/utils/constants.js +4 -0
- package/dist/packages/Regionalization/utils/deliverySetData.d.ts +3 -0
- package/dist/packages/Regionalization/utils/deliverySetData.js +13 -0
- package/dist/packages/Regionalization/utils/formatPrice.d.ts +1 -0
- package/dist/packages/Regionalization/utils/formatPrice.js +8 -0
- package/dist/packages/Regionalization/utils/localStorage.d.ts +9 -0
- package/dist/packages/Regionalization/utils/localStorage.js +23 -0
- package/dist/packages/Regionalization/utils/pickupSetData.d.ts +3 -0
- package/dist/packages/Regionalization/utils/pickupSetData.js +11 -0
- package/dist/packages/Regionalization/utils/postalCode.d.ts +2 -0
- package/dist/packages/Regionalization/utils/postalCode.js +9 -0
- package/dist/packages/Regionalization/views/AllStoresScreen.d.ts +1 -0
- package/dist/packages/Regionalization/views/AllStoresScreen.js +73 -0
- package/dist/packages/Regionalization/views/ConfirmScreen.d.ts +1 -0
- package/dist/packages/Regionalization/views/ConfirmScreen.js +60 -0
- package/dist/packages/Regionalization/views/InitialView.d.ts +1 -0
- package/dist/packages/Regionalization/views/InitialView.js +49 -0
- package/dist/packages/Regionalization/views/MoreInfosScreen.d.ts +1 -0
- package/dist/packages/Regionalization/views/MoreInfosScreen.js +42 -0
- package/dist/packages/Regionalization/views/PickupPointInfoScreen.d.ts +1 -0
- package/dist/packages/Regionalization/views/PickupPointInfoScreen.js +42 -0
- package/dist/packages/Regionalization/views/PostalCodeInputScreen.d.ts +1 -0
- package/dist/packages/Regionalization/views/PostalCodeInputScreen.js +87 -0
- package/dist/packages/Regionalization/views/ViewsContainer.d.ts +1 -0
- package/dist/packages/Regionalization/views/ViewsContainer.js +22 -0
- package/dist/packages/Tour/Tour.d.ts +10 -0
- package/dist/packages/Tour/Tour.js +68 -0
- package/dist/packages/Tour/components/TooltipFooter.d.ts +11 -0
- package/dist/packages/Tour/components/TooltipFooter.js +14 -0
- package/dist/packages/Tour/components/TooltipHeader.d.ts +8 -0
- package/dist/packages/Tour/components/TooltipHeader.js +13 -0
- package/dist/packages/Tour/components/TourOverlay.d.ts +7 -0
- package/dist/packages/Tour/components/TourOverlay.js +12 -0
- package/dist/packages/Tour/components/TourTooltip.d.ts +17 -0
- package/dist/packages/Tour/components/TourTooltip.js +42 -0
- package/dist/packages/Tour/test/TooltipFooter.test.js +68 -0
- package/dist/packages/Tour/test/TooltipHeader.test.js +18 -0
- package/dist/packages/Tour/test/Tour.test.js +49 -0
- package/dist/packages/Tour/test/TourOverlay.test.js +18 -0
- package/dist/packages/Tour/test/TourTooltip.test.js +40 -0
- package/dist/packages/Tour/types/TourStep.d.ts +4 -0
- package/dist/packages/Tour/types/TourStep.js +1 -0
- package/dist/styles/carousel.global.css +1 -0
- package/dist/styles/coupons.global.css +1 -0
- package/dist/styles/regionalization.global.css +1 -0
- package/dist/styles/tour.global.css +1 -0
- package/package.json +5 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { View } from '../types/Views';
|
|
2
|
+
|
|
3
|
+
interface OverwriteViewProps {
|
|
4
|
+
firstCouponName: string;
|
|
5
|
+
secondCouponName: string;
|
|
6
|
+
setView: (view: View) => void;
|
|
7
|
+
setReplaceCoupon: (replaceCoupon: boolean) => void;
|
|
8
|
+
setSecondCouponName: (secondCouponName: string) => void;
|
|
9
|
+
isIO?: boolean;
|
|
10
|
+
closeIOModal?: () => void;
|
|
11
|
+
genericTaggingEvent?: (name: string, params: object) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const OverwriteView: ({ firstCouponName, secondCouponName, setView, setReplaceCoupon, setSecondCouponName, isIO, closeIOModal, genericTaggingEvent }: OverwriteViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as n } from "react";
|
|
3
|
+
import { Modal as C } from "../components/Modal.js";
|
|
4
|
+
import { InfoIcon as M } from "../../../assets/svgs/InfoIcon.js";
|
|
5
|
+
const S = ({
|
|
6
|
+
firstCouponName: d,
|
|
7
|
+
secondCouponName: s,
|
|
8
|
+
setView: u,
|
|
9
|
+
setReplaceCoupon: i,
|
|
10
|
+
setSecondCouponName: c,
|
|
11
|
+
isIO: r,
|
|
12
|
+
closeIOModal: l,
|
|
13
|
+
genericTaggingEvent: o
|
|
14
|
+
}) => {
|
|
15
|
+
const [p, a] = h(!0), f = () => {
|
|
16
|
+
a(!1), u("coupons-view");
|
|
17
|
+
}, b = () => {
|
|
18
|
+
o == null || o("discount_coupon", {
|
|
19
|
+
name: "Modal de troca de cupom - botão de substituir cupom",
|
|
20
|
+
cupomName: s
|
|
21
|
+
}), i(!0), u("coupons-view");
|
|
22
|
+
}, e = () => {
|
|
23
|
+
o == null || o("discount_coupon", {
|
|
24
|
+
name: "Modal de troca de cupom - botão de sair"
|
|
25
|
+
}), c(""), u("coupons-view");
|
|
26
|
+
};
|
|
27
|
+
return n(() => {
|
|
28
|
+
p || c("");
|
|
29
|
+
}, [p]), /* @__PURE__ */ t(
|
|
30
|
+
C,
|
|
31
|
+
{
|
|
32
|
+
isIO: r,
|
|
33
|
+
closeModal: r && l ? l : f,
|
|
34
|
+
genericTaggingEvent: o,
|
|
35
|
+
title: "Substituir Cupom",
|
|
36
|
+
confirmButtonAction: b,
|
|
37
|
+
confirmButtonText: "Substituir Cupom",
|
|
38
|
+
cancelButtonAction: e,
|
|
39
|
+
cancelButtonText: "Voltar para Meus Cupons",
|
|
40
|
+
children: /* @__PURE__ */ m("p", { children: [
|
|
41
|
+
/* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(M, {}) }),
|
|
42
|
+
/* @__PURE__ */ m("span", { children: [
|
|
43
|
+
/* @__PURE__ */ t("b", { children: "Não é possível adicionar 2 cupons ao mesmo tempo." }),
|
|
44
|
+
/* @__PURE__ */ t("br", {}),
|
|
45
|
+
'Ao clicar em "Substituir Cupom" você irá substituir o cupom',
|
|
46
|
+
" ",
|
|
47
|
+
/* @__PURE__ */ t("b", { children: d }),
|
|
48
|
+
" pelo cupom ",
|
|
49
|
+
/* @__PURE__ */ t("b", { children: s }),
|
|
50
|
+
"."
|
|
51
|
+
] })
|
|
52
|
+
] })
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
S as OverwriteView
|
|
58
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CouponType } from '../types/CouponType';
|
|
2
|
+
import { View } from '../types/Views';
|
|
3
|
+
|
|
4
|
+
interface RulesViewProps {
|
|
5
|
+
dataItem: CouponType | undefined;
|
|
6
|
+
setActiveRule: (activeRule: boolean) => void;
|
|
7
|
+
setView: (view: View) => void;
|
|
8
|
+
isIO?: boolean;
|
|
9
|
+
closeIOModal?: () => void;
|
|
10
|
+
genericTaggingEvent?: (name: string, params: object) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const RulesView: ({ dataItem, setActiveRule, setView, isIO, closeIOModal, genericTaggingEvent }: RulesViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as u, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as h } from "../components/Modal.js";
|
|
3
|
+
import { InfoIcon as f } from "../../../assets/svgs/InfoIcon.js";
|
|
4
|
+
const m = ({
|
|
5
|
+
dataItem: l,
|
|
6
|
+
setActiveRule: d,
|
|
7
|
+
setView: i,
|
|
8
|
+
isIO: r,
|
|
9
|
+
closeIOModal: s,
|
|
10
|
+
genericTaggingEvent: o
|
|
11
|
+
}) => {
|
|
12
|
+
const c = () => {
|
|
13
|
+
d(!1), i("coupons-view");
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ u(
|
|
16
|
+
h,
|
|
17
|
+
{
|
|
18
|
+
isIO: r,
|
|
19
|
+
closeModal: r && s ? s : c,
|
|
20
|
+
genericTaggingEvent: o,
|
|
21
|
+
title: "Regra de Utilização",
|
|
22
|
+
confirmButtonAction: () => {
|
|
23
|
+
o == null || o("discount_coupon", {
|
|
24
|
+
name: "Modal regra de utilização - botão Ok, entendi"
|
|
25
|
+
}), c();
|
|
26
|
+
},
|
|
27
|
+
confirmButtonText: "Ok, Entendi",
|
|
28
|
+
cancelButtonAction: () => {
|
|
29
|
+
o == null || o("discount_coupon", {
|
|
30
|
+
name: "Modal regra de utilização - botão sair"
|
|
31
|
+
}), c();
|
|
32
|
+
},
|
|
33
|
+
cancelButtonText: "Voltar para Meus Cupons",
|
|
34
|
+
children: /* @__PURE__ */ n("p", { children: [
|
|
35
|
+
/* @__PURE__ */ u("span", { children: /* @__PURE__ */ u(f, {}) }),
|
|
36
|
+
/* @__PURE__ */ n("ul", { children: [
|
|
37
|
+
l == null ? void 0 : l.couponRules.map((p) => /* @__PURE__ */ u("li", { children: p }, p)),
|
|
38
|
+
/* @__PURE__ */ n("li", { children: [
|
|
39
|
+
"Válido até ",
|
|
40
|
+
l == null ? void 0 : l.couponExpirationDate
|
|
41
|
+
] })
|
|
42
|
+
] })
|
|
43
|
+
] })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
m as RulesView
|
|
49
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LoadingView as r } from "./LoadingView.js";
|
|
2
|
+
import { CouponsView as i } from "./CouponsView.js";
|
|
3
|
+
import { RulesView as m } from "./RulesView.js";
|
|
4
|
+
import { OverwriteView as f } from "./OverwriteView.js";
|
|
5
|
+
import { EmptyCartView as V } from "./EmptyCartView.js";
|
|
6
|
+
export {
|
|
7
|
+
i as CouponsView,
|
|
8
|
+
V as EmptyCartView,
|
|
9
|
+
r as LoadingView,
|
|
10
|
+
f as OverwriteView,
|
|
11
|
+
m as RulesView
|
|
12
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { RegionalizationProps } from './types/RegionalizationProps';
|
|
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 }: RegionalizationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { RegionalizationContextProvider as C } from "./context/RegionalizationContext.js";
|
|
3
|
+
import { ViewsContainer as S } from "./views/ViewsContainer.js";
|
|
4
|
+
/* empty css */const z = ({
|
|
5
|
+
setMethod: r,
|
|
6
|
+
setPickupName: a,
|
|
7
|
+
setCity: o,
|
|
8
|
+
deliveryPrice: t,
|
|
9
|
+
setUf: i,
|
|
10
|
+
setPickupTimes: n,
|
|
11
|
+
pricesAndHours: s,
|
|
12
|
+
setModalOpen: l,
|
|
13
|
+
inputPostalCode: d,
|
|
14
|
+
setInputPostalCode: c,
|
|
15
|
+
sendPostalCode: m,
|
|
16
|
+
status: p,
|
|
17
|
+
setStatus: u,
|
|
18
|
+
pickupPoints: g,
|
|
19
|
+
pickupConfirmScreenText: b,
|
|
20
|
+
regionalizeCatalog: h,
|
|
21
|
+
titleText: j = "Como deseja receber sua compra?",
|
|
22
|
+
priceStockInformation: x = " Preços e estoque podem variar de acordo com a loja que irá te atender",
|
|
23
|
+
moreInfosText: E = "Horários de atendimento e entrega",
|
|
24
|
+
textBackButton: R = "Voltar",
|
|
25
|
+
confirmButton: v = "Ok, Entendi",
|
|
26
|
+
editAddress: P = "Alterar",
|
|
27
|
+
delivery: f = {
|
|
28
|
+
title: "Receber em Casa",
|
|
29
|
+
normalDelivery: "Entrega Agendada",
|
|
30
|
+
expressDelivery: "Entrega Express",
|
|
31
|
+
labelPrice: "A partir de",
|
|
32
|
+
price: 12.99,
|
|
33
|
+
expressPrice: 15,
|
|
34
|
+
labelScheduling: "Previsão de Entrega:",
|
|
35
|
+
normalScheduling: "Entrega agendada, com base nas datas e horários disponíveis",
|
|
36
|
+
expressScheduling: "A entrega acontecerá no prazo de até $Q após a confirmação da compra",
|
|
37
|
+
expressMessage: "Limite de até $Q itens | Pagamento por Cartão de Crédito",
|
|
38
|
+
scheduling: "Você pode receber no mesmo dia, ou agendar",
|
|
39
|
+
searchButton: "Buscar",
|
|
40
|
+
linkHref: "https://buscacepinter.correios.com.br/app/endereco/index.php",
|
|
41
|
+
linkText: "Não sei meu CEP",
|
|
42
|
+
titleOk: "Receber em casa",
|
|
43
|
+
labelAddress: "Entregar em:",
|
|
44
|
+
confirmButton: "Receber em casa"
|
|
45
|
+
},
|
|
46
|
+
pickup: A = {
|
|
47
|
+
title: "Retirar na Loja",
|
|
48
|
+
labelPrice: "Retirada",
|
|
49
|
+
price: 0,
|
|
50
|
+
labelScheduling: "Agendamento a partir de:",
|
|
51
|
+
scheduling: "Hoje ou em até 4 dias úteis",
|
|
52
|
+
buttonOpenStores: "Escolher loja",
|
|
53
|
+
labelFilter: "Em qual loja você deseja retirar?",
|
|
54
|
+
labelStores: "Escolha uma loja abaixo:",
|
|
55
|
+
divider: "ou",
|
|
56
|
+
chooseStore: "Retirar nessa",
|
|
57
|
+
titleOk: "Retirar na Loja",
|
|
58
|
+
labelAddress: "Retirar em:",
|
|
59
|
+
confirmButton: "Retirar na loja"
|
|
60
|
+
}
|
|
61
|
+
}) => /* @__PURE__ */ e(
|
|
62
|
+
C,
|
|
63
|
+
{
|
|
64
|
+
priceStockInformation: x,
|
|
65
|
+
setMethod: r,
|
|
66
|
+
setPickupName: a,
|
|
67
|
+
setCity: o,
|
|
68
|
+
setUf: i,
|
|
69
|
+
setPickupTimes: n,
|
|
70
|
+
pricesAndHours: s,
|
|
71
|
+
setModalOpen: l,
|
|
72
|
+
inputPostalCode: d,
|
|
73
|
+
setInputPostalCode: c,
|
|
74
|
+
sendPostalCode: m,
|
|
75
|
+
pickupPoints: g,
|
|
76
|
+
titleText: j,
|
|
77
|
+
moreInfosText: E,
|
|
78
|
+
textBackButton: R,
|
|
79
|
+
editAddress: P,
|
|
80
|
+
deliveryPrice: t,
|
|
81
|
+
confirmButton: v,
|
|
82
|
+
pickupConfirmScreenText: b,
|
|
83
|
+
delivery: f,
|
|
84
|
+
pickup: A,
|
|
85
|
+
setStatus: u,
|
|
86
|
+
status: p,
|
|
87
|
+
regionalizeCatalog: h,
|
|
88
|
+
children: /* @__PURE__ */ e(S, {})
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
export {
|
|
92
|
+
z as Regionalization
|
|
93
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface DeliveryProps {
|
|
2
|
+
containerClassName?: string;
|
|
3
|
+
delivery?: {
|
|
4
|
+
title?: string;
|
|
5
|
+
normalDelivery?: string;
|
|
6
|
+
expressDelivery?: string;
|
|
7
|
+
labelPrice?: string;
|
|
8
|
+
price?: number;
|
|
9
|
+
expressPrice?: number;
|
|
10
|
+
labelScheduling?: string;
|
|
11
|
+
scheduling?: string;
|
|
12
|
+
normalScheduling?: string;
|
|
13
|
+
expressScheduling?: string;
|
|
14
|
+
expressMessage?: string;
|
|
15
|
+
searchButton?: string;
|
|
16
|
+
linkHref?: string;
|
|
17
|
+
linkText?: string;
|
|
18
|
+
titleOk?: string;
|
|
19
|
+
labelAddress?: string;
|
|
20
|
+
confirmButton?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const Delivery: ({ containerClassName, delivery }: DeliveryProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as x, Fragment as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { NormalDelivery as P } from "./NormalDelivery.js";
|
|
3
|
+
import { DeliveryExpress as S } from "./DeliveryExpress.js";
|
|
4
|
+
import { useRegionalizationContext as f } from "../context/RegionalizationContext.js";
|
|
5
|
+
const C = ({ containerClassName: g, delivery: e }) => {
|
|
6
|
+
var o, i, p, c, m;
|
|
7
|
+
const { customShippingData: l } = f(), { shippingList: s, isExpressEligible: D, expressShippingCmsQuantity: a } = l ?? {}, n = {
|
|
8
|
+
normalDeliveryPrice: (o = s == null ? void 0 : s.find(
|
|
9
|
+
(r) => r.id === "Entrega Padrão"
|
|
10
|
+
)) == null ? void 0 : o.listPrice,
|
|
11
|
+
expressDeliveryPrice: (i = s == null ? void 0 : s.find(
|
|
12
|
+
(r) => r.id === "Entrega Express"
|
|
13
|
+
)) == null ? void 0 : i.listPrice,
|
|
14
|
+
shippingEstimate: ((p = s == null ? void 0 : s.find((r) => r.id === "Entrega Express")) == null ? void 0 : p.shippingEstimate) ?? "",
|
|
15
|
+
expressShippingQuantity: a || ""
|
|
16
|
+
}, E = (c = e == null ? void 0 : e.expressMessage) == null ? void 0 : c.replace(
|
|
17
|
+
"$Q",
|
|
18
|
+
n.expressShippingQuantity.toString()
|
|
19
|
+
), h = (m = e == null ? void 0 : e.expressScheduling) == null ? void 0 : m.replace(
|
|
20
|
+
"$Q",
|
|
21
|
+
n.shippingEstimate
|
|
22
|
+
);
|
|
23
|
+
return /* @__PURE__ */ x(u, { children: [
|
|
24
|
+
/* @__PURE__ */ t("h1", { className: "delivery-types", children: "Tipos de Entrega" }),
|
|
25
|
+
/* @__PURE__ */ x("div", { className: g, children: [
|
|
26
|
+
/* @__PURE__ */ t(
|
|
27
|
+
P,
|
|
28
|
+
{
|
|
29
|
+
normalDeliveryPrice: n.normalDeliveryPrice,
|
|
30
|
+
normalDelivery: e == null ? void 0 : e.normalDelivery,
|
|
31
|
+
normalScheduling: e == null ? void 0 : e.normalScheduling
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
D ? /* @__PURE__ */ t(
|
|
35
|
+
S,
|
|
36
|
+
{
|
|
37
|
+
expressDeliveryPrice: n.expressDeliveryPrice,
|
|
38
|
+
expressDelivery: e == null ? void 0 : e.expressDelivery,
|
|
39
|
+
expressMessageFormated: E,
|
|
40
|
+
expressSchedulingFormated: h
|
|
41
|
+
}
|
|
42
|
+
) : ""
|
|
43
|
+
] })
|
|
44
|
+
] });
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
C as Delivery
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface DeliveryExpressProps {
|
|
2
|
+
expressDeliveryPrice?: number;
|
|
3
|
+
expressDelivery?: string;
|
|
4
|
+
expressSchedulingFormated?: string;
|
|
5
|
+
expressShippingCmsQuantity?: number;
|
|
6
|
+
expressMessageFormated?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DeliveryExpress: ({ expressDeliveryPrice, expressDelivery, expressSchedulingFormated, expressMessageFormated }: DeliveryExpressProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as e, Fragment as n, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { Price as a } from "./Price.js";
|
|
3
|
+
import { DeliveryExpressIcon as p } from "../../../assets/svgs/DeliveryExpressIcon.js";
|
|
4
|
+
const v = ({
|
|
5
|
+
expressDeliveryPrice: s,
|
|
6
|
+
expressDelivery: i,
|
|
7
|
+
expressSchedulingFormated: l,
|
|
8
|
+
expressMessageFormated: c
|
|
9
|
+
}) => {
|
|
10
|
+
const d = s && s / 100;
|
|
11
|
+
return /* @__PURE__ */ e(n, { children: /* @__PURE__ */ r("div", { className: "delivery-subcontainer", children: [
|
|
12
|
+
/* @__PURE__ */ r("div", { className: "express-delivery-container", children: [
|
|
13
|
+
/* @__PURE__ */ r("div", { className: "express-delivery-title-container", children: [
|
|
14
|
+
/* @__PURE__ */ e(p, {}),
|
|
15
|
+
/* @__PURE__ */ e("p", { className: "express-delivery-title", children: i })
|
|
16
|
+
] }),
|
|
17
|
+
/* @__PURE__ */ e("div", { className: "express-delivery-price", children: /* @__PURE__ */ e(a, { price: d }) })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ e("div", { className: "express-delivery-scheduling", children: /* @__PURE__ */ e("p", { children: l }) }),
|
|
20
|
+
/* @__PURE__ */ e("div", { className: "express-delivery-message-container", children: /* @__PURE__ */ e("p", { children: c }) })
|
|
21
|
+
] }) });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
v as DeliveryExpress
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface InfoPricesProps {
|
|
2
|
+
containerClassName?: string;
|
|
3
|
+
priceClassName?: string;
|
|
4
|
+
labelPrice?: string;
|
|
5
|
+
price?: number;
|
|
6
|
+
scheduling?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const InfoPrices: ({ containerClassName, priceClassName, labelPrice, price, scheduling }: InfoPricesProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Price as m } from "./Price.js";
|
|
3
|
+
const l = ({
|
|
4
|
+
containerClassName: s,
|
|
5
|
+
priceClassName: c,
|
|
6
|
+
labelPrice: i,
|
|
7
|
+
price: o,
|
|
8
|
+
scheduling: e
|
|
9
|
+
}) => /* @__PURE__ */ t("div", { className: s, children: [
|
|
10
|
+
/* @__PURE__ */ r(m, { text: i, price: o, className: c }),
|
|
11
|
+
!!e && /* @__PURE__ */ r("p", { children: /* @__PURE__ */ r("b", { children: e }) })
|
|
12
|
+
] });
|
|
13
|
+
export {
|
|
14
|
+
l as InfoPrices
|
|
15
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as x, jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { SetViewButton as d } from "./SetViewButton.js";
|
|
3
|
+
import { ArrowIcon as C } from "../../../assets/svgs/ArrowIcon.js";
|
|
4
|
+
import { useRegionalizationContext as N } from "../context/RegionalizationContext.js";
|
|
5
|
+
import { deliverySetData as V } from "../utils/deliverySetData.js";
|
|
6
|
+
import { pickupSetData as j } from "../utils/pickupSetData.js";
|
|
7
|
+
const F = ({
|
|
8
|
+
moreInfosScreen: i,
|
|
9
|
+
pickuConfirmScreem: h
|
|
10
|
+
}) => {
|
|
11
|
+
const {
|
|
12
|
+
confirmButton: I,
|
|
13
|
+
textBackButton: S,
|
|
14
|
+
delivery: e,
|
|
15
|
+
pickup: a,
|
|
16
|
+
pickupAddress: t,
|
|
17
|
+
internalMethod: l,
|
|
18
|
+
regionalizeCatalog: n,
|
|
19
|
+
address: o,
|
|
20
|
+
deliveryRequestInfos: b,
|
|
21
|
+
postalCode: w,
|
|
22
|
+
setMethod: r,
|
|
23
|
+
setCity: m,
|
|
24
|
+
setUf: c,
|
|
25
|
+
setPickupName: f,
|
|
26
|
+
setPickupTimes: u,
|
|
27
|
+
pickupTimes: B,
|
|
28
|
+
setInputPostalCode: p
|
|
29
|
+
} = N();
|
|
30
|
+
return /* @__PURE__ */ x("div", { className: "container-navigation", children: [
|
|
31
|
+
/* @__PURE__ */ x(
|
|
32
|
+
d,
|
|
33
|
+
{
|
|
34
|
+
view: i ? "InitialView" : h ? "AllStoresScreen" : "PostalCodeInputScreen",
|
|
35
|
+
className: "back-button",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ v("span", { children: /* @__PURE__ */ v(C, {}) }),
|
|
38
|
+
S
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ v(
|
|
43
|
+
d,
|
|
44
|
+
{
|
|
45
|
+
view: "InitialView",
|
|
46
|
+
closeModal: !i,
|
|
47
|
+
className: "continue-button",
|
|
48
|
+
onClick: () => {
|
|
49
|
+
var s;
|
|
50
|
+
r == null || r(l), l === "delivery" ? (V(o, b, w), m == null || m(o == null ? void 0 : o.localidade), c == null || c(o == null ? void 0 : o.uf), n == null || n(w)) : (p(((s = t == null ? void 0 : t.address) == null ? void 0 : s.postalCode) || ""), j(t, B), f == null || f(t == null ? void 0 : t.name), u == null || u(B), n == null || n(t == null ? void 0 : t.address.postalCode));
|
|
51
|
+
},
|
|
52
|
+
children: i ? I : l === "delivery" ? e == null ? void 0 : e.confirmButton : a == null ? void 0 : a.confirmButton
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
F as Navigation
|
|
59
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface NormalDeliveryProps {
|
|
2
|
+
normalDelivery?: string;
|
|
3
|
+
normalScheduling?: string;
|
|
4
|
+
normalDeliveryPrice?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const NormalDelivery: ({ normalDelivery, normalScheduling, normalDeliveryPrice }: NormalDeliveryProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as e, Fragment as a, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { Price as d } from "./Price.js";
|
|
3
|
+
import { DeliveryIcon as m } from "../../../assets/svgs/DeliveryIcon.js";
|
|
4
|
+
const v = ({
|
|
5
|
+
normalDelivery: l,
|
|
6
|
+
normalScheduling: n,
|
|
7
|
+
normalDeliveryPrice: i
|
|
8
|
+
}) => {
|
|
9
|
+
const c = i && i / 100;
|
|
10
|
+
return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ r("div", { className: "delivery-subcontainer", children: [
|
|
11
|
+
/* @__PURE__ */ r("div", { className: "normal-delivery-container", children: [
|
|
12
|
+
/* @__PURE__ */ r("div", { className: "normal-delivery-title-container", children: [
|
|
13
|
+
/* @__PURE__ */ e(m, {}),
|
|
14
|
+
/* @__PURE__ */ e("p", { className: "normal-delivery-title", children: l })
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "normal-delivery-price", children: /* @__PURE__ */ e(d, { price: c }) })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ e("div", { className: "normal-delivery-scheduling", children: /* @__PURE__ */ e("p", { children: n }) })
|
|
19
|
+
] }) });
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
v as NormalDelivery
|
|
23
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { SetViewButton as h } from "./SetViewButton.js";
|
|
3
|
+
import { useRegionalizationContext as u } from "../context/RegionalizationContext.js";
|
|
4
|
+
const x = ({ pickupPointInfos: c }) => {
|
|
5
|
+
const { pickup: i, setPickupAddress: n, setInternalMethod: e } = u(), { isActive: m, name: l, address: o } = c;
|
|
6
|
+
return m ? /* @__PURE__ */ r("div", { className: "store-container", children: [
|
|
7
|
+
/* @__PURE__ */ t("h3", { children: l }),
|
|
8
|
+
/* @__PURE__ */ r("div", { children: [
|
|
9
|
+
/* @__PURE__ */ r("p", { children: [
|
|
10
|
+
o == null ? void 0 : o.street,
|
|
11
|
+
", ",
|
|
12
|
+
o == null ? void 0 : o.number,
|
|
13
|
+
/* @__PURE__ */ t("br", {}),
|
|
14
|
+
o == null ? void 0 : o.neighborhood
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ t(
|
|
17
|
+
h,
|
|
18
|
+
{
|
|
19
|
+
view: "ConfirmScreen",
|
|
20
|
+
className: "choose-store",
|
|
21
|
+
onClick: () => {
|
|
22
|
+
e == null || e("pickup-in-point"), n == null || n(c);
|
|
23
|
+
},
|
|
24
|
+
children: i == null ? void 0 : i.chooseStore
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
] })
|
|
28
|
+
] }) : null;
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
x as PickupPoint
|
|
32
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { formatPrice as m } from "../utils/formatPrice.js";
|
|
3
|
+
const d = ({ text: o, price: r, className: s }) => /* @__PURE__ */ e("p", { className: s, children: [
|
|
4
|
+
o,
|
|
5
|
+
" ",
|
|
6
|
+
r !== void 0 && /* @__PURE__ */ i("span", { className: r <= 0 ? "badge" : void 0, children: m(r) })
|
|
7
|
+
] });
|
|
8
|
+
export {
|
|
9
|
+
d as Price
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { View } from '../types/ContextProps';
|
|
2
|
+
|
|
3
|
+
interface SetViewButtonProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
view: View;
|
|
6
|
+
closeModal?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const SetViewButton: ({ children, view, closeModal, className, onClick }: SetViewButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRegionalizationContext as m } from "../context/RegionalizationContext.js";
|
|
3
|
+
const u = ({
|
|
4
|
+
children: e,
|
|
5
|
+
view: n,
|
|
6
|
+
closeModal: r,
|
|
7
|
+
className: a,
|
|
8
|
+
onClick: o
|
|
9
|
+
}) => {
|
|
10
|
+
const { setModalOpen: f, setView: t } = m();
|
|
11
|
+
return /* @__PURE__ */ i(
|
|
12
|
+
"button",
|
|
13
|
+
{
|
|
14
|
+
onClick: () => {
|
|
15
|
+
o == null || o(), r ? (t == null || t("InitialView"), f(!1)) : t == null || t(n);
|
|
16
|
+
},
|
|
17
|
+
className: a,
|
|
18
|
+
children: e
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
u as SetViewButton
|
|
24
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { CloseIcon as l } from "../../../assets/svgs/CloseIcon.js";
|
|
3
|
+
import { useRegionalizationContext as s } from "../context/RegionalizationContext.js";
|
|
4
|
+
const d = ({ title: n, view: i }) => {
|
|
5
|
+
const { setModalOpen: e, setView: o } = s();
|
|
6
|
+
return /* @__PURE__ */ r("div", { className: "title-container", children: [
|
|
7
|
+
/* @__PURE__ */ t("h1", { children: n }),
|
|
8
|
+
/* @__PURE__ */ t(
|
|
9
|
+
"button",
|
|
10
|
+
{
|
|
11
|
+
onClick: () => {
|
|
12
|
+
o == null || o(i ?? "InitialView"), i || e(!1);
|
|
13
|
+
},
|
|
14
|
+
children: /* @__PURE__ */ t(l, {})
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
] });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
d as Title
|
|
21
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RegionalizationProps, ContextProps } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const RegionalizationContextProvider: ({ setMethod, setPickupName, setCity, setUf, setPickupTimes, pricesAndHours, setModalOpen, inputPostalCode, setInputPostalCode, sendPostalCode, status, setStatus, priceStockInformation, pickupPoints, titleText, moreInfosText, textBackButton, confirmButton, editAddress, delivery, deliveryPrice, pickup, regionalizeCatalog, pickupConfirmScreenText, children }: RegionalizationProps & ContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const useRegionalizationContext: () => RegionalizationProps & ContextProps;
|