@plurix/ecom-components 0.0.2-beta.0 → 0.0.2-beta.10
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 -0
- package/dist/assets/svgs/CloseIcon.js +41 -0
- 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/DiscountIcon.d.ts +1 -0
- package/dist/assets/svgs/DiscountIcon.js +37 -0
- package/dist/assets/svgs/ErrorIcon.d.ts +5 -0
- package/dist/assets/svgs/ErrorIcon.js +29 -0
- package/dist/assets/svgs/FacebookIcon.d.ts +1 -0
- package/dist/assets/svgs/FacebookIcon.js +22 -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/InstagramIcon.d.ts +1 -0
- package/dist/assets/svgs/InstagramIcon.js +49 -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 +7 -3
- package/dist/main.js +14 -4
- 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/CartClubAlert/CartClubAlert.d.ts +8 -0
- package/dist/packages/CartClubAlert/CartClubAlert.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/Onboarding/Onboarding.d.ts +10 -0
- package/dist/packages/Onboarding/Onboarding.js +47 -0
- package/dist/packages/Onboarding/components/Bullets.d.ts +5 -0
- package/dist/packages/Onboarding/components/Bullets.js +10 -0
- package/dist/packages/Onboarding/components/Content.d.ts +9 -0
- package/dist/packages/Onboarding/components/Content.js +30 -0
- package/dist/packages/Onboarding/components/Footer.d.ts +9 -0
- package/dist/packages/Onboarding/components/Footer.js +15 -0
- package/dist/packages/Onboarding/components/Header.d.ts +6 -0
- package/dist/packages/Onboarding/components/Header.js +11 -0
- package/dist/packages/Onboarding/components/SocialMedia.d.ts +10 -0
- package/dist/packages/Onboarding/components/SocialMedia.js +36 -0
- package/dist/packages/Onboarding/constants/tips.d.ts +11 -0
- package/dist/packages/Onboarding/constants/tips.js +36 -0
- package/dist/packages/Onboarding/test/Bullets.test.js +20 -0
- package/dist/packages/Onboarding/test/Content.test.js +52 -0
- package/dist/packages/Onboarding/test/Footer.test.js +60 -0
- package/dist/packages/Onboarding/test/Header.test.js +30 -0
- package/dist/packages/Onboarding/test/Onboarding.test.js +22 -0
- package/dist/packages/Onboarding/test/SocialMedia.test.js +39 -0
- package/dist/packages/Onboarding/tips/Tip1.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip1.js +2130 -0
- package/dist/packages/Onboarding/tips/Tip2.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip2.js +361 -0
- package/dist/packages/Onboarding/tips/Tip3.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip3.js +350 -0
- package/dist/packages/Onboarding/tips/Tip4.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip4.js +593 -0
- package/dist/packages/Onboarding/tips/Tip5.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip5.js +1571 -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 +3 -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 +45 -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/cart-club-alert.global.css +1 -0
- package/dist/styles/coupons.global.css +1 -0
- package/dist/styles/onboarding.global.css +1 -0
- package/dist/styles/regionalization.global.css +1 -0
- package/dist/styles/tour.global.css +1 -0
- package/dist/types/FixedLengthArray.d.ts +7 -0
- package/dist/types/FixedLengthArray.js +1 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +58 -51
- package/dist/assets/index.css +0 -3
- package/dist/assets/index2.css +0 -3
- package/dist/assets/index3.css +0 -3
- package/dist/components/Button/index.d.ts +0 -4
- package/dist/components/Button/index.js +0 -11
- package/dist/components/Input/index.d.ts +0 -4
- package/dist/components/Input/index.js +0 -11
- package/dist/components/Label/index.d.ts +0 -4
- package/dist/components/Label/index.js +0 -11
|
@@ -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 u } 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: o,
|
|
17
|
+
internalMethod: l,
|
|
18
|
+
regionalizeCatalog: n,
|
|
19
|
+
address: t,
|
|
20
|
+
deliveryRequestInfos: b,
|
|
21
|
+
postalCode: w,
|
|
22
|
+
setMethod: r,
|
|
23
|
+
setCity: m,
|
|
24
|
+
setUf: c,
|
|
25
|
+
setPickupName: f,
|
|
26
|
+
setPickupTimes: v,
|
|
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__ */ u("span", { children: /* @__PURE__ */ u(C, { color: "var(--color-main)" }) }),
|
|
38
|
+
S
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ u(
|
|
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(t, b, w), m == null || m(t == null ? void 0 : t.localidade), c == null || c(t == null ? void 0 : t.uf), n == null || n(w)) : (p(((s = o == null ? void 0 : o.address) == null ? void 0 : s.postalCode) || ""), j(o, B), f == null || f(o == null ? void 0 : o.name), v == null || v(B), n == null || n(o == null ? void 0 : o.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;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as Z } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as _, useState as e, useEffect as M, useContext as ee } from "react";
|
|
3
|
+
import { removeSpecialCharacter as oe } from "../utils/postalCode.js";
|
|
4
|
+
import { getFullLocalStorage as c } from "../utils/localStorage.js";
|
|
5
|
+
const v = _(null), ae = ({
|
|
6
|
+
setMethod: o,
|
|
7
|
+
setPickupName: C,
|
|
8
|
+
setCity: p,
|
|
9
|
+
setUf: x,
|
|
10
|
+
setPickupTimes: y,
|
|
11
|
+
pricesAndHours: R,
|
|
12
|
+
setModalOpen: w,
|
|
13
|
+
inputPostalCode: l,
|
|
14
|
+
setInputPostalCode: D,
|
|
15
|
+
sendPostalCode: d,
|
|
16
|
+
status: I,
|
|
17
|
+
setStatus: i,
|
|
18
|
+
priceStockInformation: T = "",
|
|
19
|
+
pickupPoints: b,
|
|
20
|
+
titleText: z,
|
|
21
|
+
moreInfosText: P,
|
|
22
|
+
textBackButton: S,
|
|
23
|
+
confirmButton: h,
|
|
24
|
+
editAddress: H,
|
|
25
|
+
delivery: V,
|
|
26
|
+
deliveryPrice: k,
|
|
27
|
+
pickup: q,
|
|
28
|
+
regionalizeCatalog: E,
|
|
29
|
+
pickupConfirmScreenText: W,
|
|
30
|
+
children: j
|
|
31
|
+
}) => {
|
|
32
|
+
const [B, u] = e(), [F, g] = e("InitialView"), [L, m] = e(""), [Q, $] = e(), [s, A] = e(), [G, f] = e(), [J, K] = e(), [N, O] = e(!1), U = {
|
|
33
|
+
openingTime: (s == null ? void 0 : s.businessHours.businessHoursWeek.openingTime.slice(0, 2)) || "",
|
|
34
|
+
closingTime: (s == null ? void 0 : s.businessHours.businessHoursWeek.closingTime.slice(0, 2)) || ""
|
|
35
|
+
}, X = async () => {
|
|
36
|
+
i({ loading: !0, message: "Carregando..." });
|
|
37
|
+
const {
|
|
38
|
+
isValid: n,
|
|
39
|
+
address: t,
|
|
40
|
+
deliveryInfos: a,
|
|
41
|
+
customShipping: r
|
|
42
|
+
} = await d();
|
|
43
|
+
n && (i({ loading: !1 }), u("delivery"), $(t), i({}), m(l), f(a), g("ConfirmScreen"), K(r));
|
|
44
|
+
}, Y = () => {
|
|
45
|
+
/\d{8}$/.test(
|
|
46
|
+
oe(l)
|
|
47
|
+
) ? X() : i({
|
|
48
|
+
status: "failed",
|
|
49
|
+
loading: !1,
|
|
50
|
+
message: "Que Pena, ainda não entregamos na sua região."
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
return M(() => {
|
|
54
|
+
var n, t, a, r;
|
|
55
|
+
m((t = (n = c()) == null ? void 0 : n.userAddressInfos) == null ? void 0 : t.postalCode), o == null || o((a = c()) == null ? void 0 : a.regionalized), f((r = c()) == null ? void 0 : r.deliveryInfos);
|
|
56
|
+
}, []), /* @__PURE__ */ Z(
|
|
57
|
+
v.Provider,
|
|
58
|
+
{
|
|
59
|
+
value: {
|
|
60
|
+
backToDelivery: N,
|
|
61
|
+
setBackToDelivery: O,
|
|
62
|
+
setMethod: o,
|
|
63
|
+
priceStockInformation: T,
|
|
64
|
+
setPickupName: C,
|
|
65
|
+
setCity: p,
|
|
66
|
+
setUf: x,
|
|
67
|
+
setPickupTimes: y,
|
|
68
|
+
pickupTimes: U,
|
|
69
|
+
pickupConfirmScreenText: W,
|
|
70
|
+
pricesAndHours: R,
|
|
71
|
+
setModalOpen: w,
|
|
72
|
+
inputPostalCode: l,
|
|
73
|
+
setInputPostalCode: D,
|
|
74
|
+
sendPostalCode: d,
|
|
75
|
+
status: I,
|
|
76
|
+
setStatus: i,
|
|
77
|
+
pickupPoints: b,
|
|
78
|
+
titleText: z,
|
|
79
|
+
moreInfosText: P,
|
|
80
|
+
customShippingData: J,
|
|
81
|
+
textBackButton: S,
|
|
82
|
+
confirmButton: h,
|
|
83
|
+
editAddress: H,
|
|
84
|
+
delivery: V,
|
|
85
|
+
pickup: q,
|
|
86
|
+
view: F,
|
|
87
|
+
setView: g,
|
|
88
|
+
postalCodeValidation: Y,
|
|
89
|
+
address: Q,
|
|
90
|
+
pickupAddress: s,
|
|
91
|
+
setPickupAddress: A,
|
|
92
|
+
deliveryRequestInfos: G,
|
|
93
|
+
postalCode: L,
|
|
94
|
+
internalMethod: B,
|
|
95
|
+
setInternalMethod: u,
|
|
96
|
+
regionalizeCatalog: E,
|
|
97
|
+
deliveryPrice: k
|
|
98
|
+
},
|
|
99
|
+
children: j
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}, re = () => {
|
|
103
|
+
const o = ee(v);
|
|
104
|
+
if (!o)
|
|
105
|
+
throw new Error(
|
|
106
|
+
"useRegionalizationContext must be used within a RegionalizationContextProvider"
|
|
107
|
+
);
|
|
108
|
+
return o;
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
ae as RegionalizationContextProvider,
|
|
112
|
+
re as useRegionalizationContext
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Address } from './Address';
|
|
2
|
+
import { BusinessHours, PikcupPointType } from './PikcupPointType';
|
|
3
|
+
import { CustomShippingProps } from './RegionalizationProps';
|
|
4
|
+
|
|
5
|
+
export interface ContextProps {
|
|
6
|
+
view?: View;
|
|
7
|
+
setView?: (view: View) => void;
|
|
8
|
+
postalCodeValidation?: () => void;
|
|
9
|
+
address?: Address;
|
|
10
|
+
pickupAddress?: PikcupPointType;
|
|
11
|
+
setPickupAddress?: (pickupAddress: PikcupPointType) => void;
|
|
12
|
+
deliveryRequestInfos?: DeliveryProps;
|
|
13
|
+
postalCode?: string;
|
|
14
|
+
internalMethod?: string;
|
|
15
|
+
setInternalMethod?: (method?: string) => void;
|
|
16
|
+
pickupTimes?: BusinessHours;
|
|
17
|
+
customShippingData?: CustomShippingProps;
|
|
18
|
+
}
|
|
19
|
+
export interface DeliveryProps {
|
|
20
|
+
deliveryChannel?: string;
|
|
21
|
+
deliveryName?: string;
|
|
22
|
+
shippingEstimate?: string;
|
|
23
|
+
}
|
|
24
|
+
export type View = 'PickupPointInfoScreen' | 'InitialView' | 'PostalCodeInputScreen' | 'MoreInfosScreen' | 'ConfirmScreen' | 'AllStoresScreen';
|
|
25
|
+
export interface UserAddressProps {
|
|
26
|
+
postalCode?: string;
|
|
27
|
+
city?: string;
|
|
28
|
+
uf?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface PikcupPointType {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
address: {
|
|
5
|
+
postalCode: string;
|
|
6
|
+
city: string;
|
|
7
|
+
state: string;
|
|
8
|
+
neighborhood: string;
|
|
9
|
+
street: string;
|
|
10
|
+
number: string;
|
|
11
|
+
};
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
businessHours: {
|
|
14
|
+
businessHoursWeek: BusinessHours;
|
|
15
|
+
businessHoursWeekend: BusinessHours;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface BusinessHours {
|
|
19
|
+
dayOfWeek?: number;
|
|
20
|
+
openingTime: string;
|
|
21
|
+
closingTime: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|