mitre-actions-widget 2.1.0 → 2.2.3
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/README.md +8 -8
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -45,24 +45,24 @@ const products = JSON.parse(process.env.VITE_PRODUCT_ID!);
|
|
|
45
45
|
|
|
46
46
|
<MitreActionsWidget
|
|
47
47
|
products={products}
|
|
48
|
-
|
|
48
|
+
environment="prod"
|
|
49
49
|
/>
|
|
50
50
|
|
|
51
51
|
// Com cor personalizada
|
|
52
52
|
<MitreActionsWidget
|
|
53
53
|
products={products}
|
|
54
|
-
|
|
54
|
+
environment="prod"
|
|
55
55
|
backgroundColor="#FF5733"
|
|
56
56
|
/>
|
|
57
57
|
|
|
58
58
|
// Com customização do formulário e callback de sucesso (props opcionais)
|
|
59
59
|
<MitreActionsWidget
|
|
60
60
|
products={products}
|
|
61
|
-
|
|
61
|
+
environment="prod"
|
|
62
62
|
// formShowHeader={true}
|
|
63
63
|
// formTitle="Fale conosco"
|
|
64
64
|
// formSubtitle="Preencha o formulário abaixo"
|
|
65
|
-
//
|
|
65
|
+
// formShowContactPreference={true}
|
|
66
66
|
// onFormSuccess={(body, leadId) => console.log("Lead criado:", leadId)}
|
|
67
67
|
/>
|
|
68
68
|
```
|
|
@@ -124,12 +124,12 @@ Depois de instalar a biblioteca, você pode começar a usá-la diretamente no se
|
|
|
124
124
|
O `MitreActionsWidget` aceita as seguintes props:
|
|
125
125
|
|
|
126
126
|
- **`products`** (Product[]): Array de produtos do empreendimento.
|
|
127
|
-
- **`
|
|
127
|
+
- **`environment`** (`"staging" | "prod"`, opcional): Define de qual config interno do `mitre-form-component` o widget lê `apiUrl`, `apiToken`, `whatsappPhone` e `chatUrl`. Padrão: `"staging"`.
|
|
128
128
|
- **`backgroundColor`** (string, opcional): Cor de fundo personalizada para o botão flutuante. Padrão: `#2DCE68` (verde).
|
|
129
129
|
- **`formShowHeader`** (boolean, opcional): Exibe ou oculta o cabeçalho do formulário.
|
|
130
130
|
- **`formTitle`** (string, opcional): Título exibido no cabeçalho do formulário.
|
|
131
131
|
- **`formSubtitle`** (string, opcional): Subtítulo exibido no cabeçalho do formulário.
|
|
132
|
-
- **`
|
|
132
|
+
- **`formShowContactPreference`** (boolean, opcional): Exibe ou oculta o campo de preferência de contato no formulário.
|
|
133
133
|
- **`onFormSuccess`** ((requestBody, leadId) => void, opcional): Callback chamado após o envio bem-sucedido do formulário. Recebe o corpo da requisição (`RequestBody`) e o ID do lead gerado.
|
|
134
134
|
|
|
135
135
|
---
|
|
@@ -156,12 +156,12 @@ const products = JSON.parse(process.env.NEXT_PUBLIC_PRODUCT_ID!);
|
|
|
156
156
|
<ErrorBoundary fallback={<div>Erro ao carregar o formulário</div>}>
|
|
157
157
|
<MitreActionsWidget
|
|
158
158
|
products={products}
|
|
159
|
-
|
|
159
|
+
environment="prod"
|
|
160
160
|
backgroundColor="#2DCE68" // Opcional: cor personalizada
|
|
161
161
|
// formShowHeader={true}
|
|
162
162
|
// formTitle="Fale conosco"
|
|
163
163
|
// formSubtitle="Preencha o formulário abaixo"
|
|
164
|
-
//
|
|
164
|
+
// formShowContactPreference={true}
|
|
165
165
|
// onFormSuccess={(body, leadId) => console.log("Lead criado:", leadId)}
|
|
166
166
|
/>
|
|
167
167
|
</ErrorBoundary>;
|
package/dist/index.cjs
CHANGED
|
@@ -763,19 +763,19 @@ var import_react_error_boundary = require("react-error-boundary");
|
|
|
763
763
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
764
764
|
var Selector = ({
|
|
765
765
|
products,
|
|
766
|
-
|
|
766
|
+
environment,
|
|
767
767
|
close,
|
|
768
768
|
formShowHeader,
|
|
769
769
|
formTitle,
|
|
770
770
|
formSubtitle,
|
|
771
|
-
|
|
771
|
+
formShowContactPreference,
|
|
772
772
|
onFormSuccess
|
|
773
773
|
}) => {
|
|
774
774
|
const ref = (0, import_react3.useRef)(null);
|
|
775
775
|
const [currentOpen, setCurrentOpen] = (0, import_react3.useState)(0);
|
|
776
|
-
const [
|
|
777
|
-
const openForm = (
|
|
778
|
-
const closeForm = () =>
|
|
776
|
+
const [formChannel, setFormChannel] = (0, import_react3.useState)(null);
|
|
777
|
+
const openForm = (channel) => setFormChannel(channel);
|
|
778
|
+
const closeForm = () => setFormChannel(null);
|
|
779
779
|
useClickOutside_default(ref, close);
|
|
780
780
|
const tabs = [
|
|
781
781
|
TalkWithASeller_default,
|
|
@@ -792,7 +792,7 @@ var Selector = ({
|
|
|
792
792
|
className: "back-icon",
|
|
793
793
|
onClick: closeForm,
|
|
794
794
|
size: 28,
|
|
795
|
-
visibility:
|
|
795
|
+
visibility: formChannel !== null ? "visible" : "hidden",
|
|
796
796
|
color: colors.black
|
|
797
797
|
}
|
|
798
798
|
),
|
|
@@ -806,7 +806,7 @@ var Selector = ({
|
|
|
806
806
|
}
|
|
807
807
|
)
|
|
808
808
|
] }),
|
|
809
|
-
|
|
809
|
+
formChannel !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FormContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_error_boundary.ErrorBoundary, { fallback: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(FormErrorContainer, { children: [
|
|
810
810
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
811
811
|
import_hi.HiOutlineExclamation,
|
|
812
812
|
{
|
|
@@ -819,14 +819,14 @@ var Selector = ({
|
|
|
819
819
|
import_mitre_form_component.MitreFormComponent,
|
|
820
820
|
{
|
|
821
821
|
products,
|
|
822
|
-
|
|
823
|
-
|
|
822
|
+
environment,
|
|
823
|
+
channel: formChannel,
|
|
824
824
|
backgroundColor: "transparent",
|
|
825
825
|
innerPadding: "0",
|
|
826
826
|
showHeader: formShowHeader,
|
|
827
827
|
title: formTitle,
|
|
828
828
|
subtitle: formSubtitle,
|
|
829
|
-
|
|
829
|
+
showContactPreference: formShowContactPreference,
|
|
830
830
|
onSuccess: onFormSuccess
|
|
831
831
|
}
|
|
832
832
|
) }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
@@ -847,12 +847,12 @@ var Selector_default = Selector;
|
|
|
847
847
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
848
848
|
var MitreActionsWidget = import_react4.default.forwardRef(({
|
|
849
849
|
products,
|
|
850
|
-
|
|
850
|
+
environment,
|
|
851
851
|
backgroundColor,
|
|
852
852
|
formShowHeader,
|
|
853
853
|
formTitle,
|
|
854
854
|
formSubtitle,
|
|
855
|
-
|
|
855
|
+
formShowContactPreference,
|
|
856
856
|
onFormSuccess
|
|
857
857
|
}, ref) => {
|
|
858
858
|
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
@@ -866,7 +866,7 @@ var MitreActionsWidget = import_react4.default.forwardRef(({
|
|
|
866
866
|
setOpen(false);
|
|
867
867
|
}
|
|
868
868
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ComponentWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Container, { children: [
|
|
869
|
-
open && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Selector_default, { products,
|
|
869
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Selector_default, { products, environment, close: () => close(), formShowHeader, formTitle, formSubtitle, formShowContactPreference, onFormSuccess }),
|
|
870
870
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonContainer, { ref, open, $backgroundColor: backgroundColor, onClick: () => handleOpen(), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
871
871
|
"img",
|
|
872
872
|
{
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/MitreActionsWidget/index.tsx","../src/components/styles/utils.ts","../src/components/MitreActionsWidget/styles.ts","../src/theme/colors.ts","../src/components/ComponentWrapper/index.tsx","../src/utils/fontLoader.ts","../src/components/Selector/index.tsx","../src/components/hooks/useClickOutside.ts","../src/components/Selector/styles.ts","../src/components/Navbar/styles.ts","../src/assets/icons.ts","../src/components/Navbar/index.tsx","../src/components/styles.ts","../src/components/TalkWithASeller/index.tsx","../src/components/hooks/useDeviceType.ts","../src/components/LeadSupport/index.tsx","../src/components/OtherTopics/index.tsx"],"sourcesContent":["export { default as MitreActionsWidget } from \"./components/MitreActionsWidget\";\nexport type { MitreActionsWidgetProps } from \"./components/MitreActionsWidget\";\n","import React, { useState, useEffect } from \"react\";\nimport { Container, ButtonContainer } from \"./styles\";\nimport { Product } from '../../domain/Product';\nimport { ComponentWrapper } from \"../ComponentWrapper\";\nimport { ensureMontserratFont } from \"../../utils/fontLoader\";\n\nimport Selector from \"../Selector\";\n\nimport { iconMap } from \"../../assets/icons\";\nimport { RequestBody, type Ambiente } from \"mitre-form-component\";\n\nexport interface MitreActionsWidgetProps {\n products: Product[];\n /**\n * Define de qual config interno o `MitreFormComponent` lê `apiUrl`/`apiToken`/`whatsappPhone`/`chatUrl`.\n * Default `\"homol\"`.\n */\n ambiente?: Ambiente;\n /**\n * Cor de fundo personalizada para o botão flutuante.\n * @default \"#2DCE68\" (verde padrão)\n * @example backgroundColor=\"#FF5733\"\n */\n backgroundColor?: string;\n /** Exibe ou oculta o cabeçalho do formulário. */\n formShowHeader?: boolean;\n /** Título exibido no cabeçalho do formulário. */\n formTitle?: string;\n /** Subtítulo exibido no cabeçalho do formulário. */\n formSubtitle?: string;\n /** Exibe ou oculta o campo de preferência de contato no formulário. */\n formShowPreferenciaContato?: boolean;\n /**\n * Callback chamado após o envio bem-sucedido do formulário de lead.\n * Recebe o corpo da requisição e o ID do lead criado.\n * @example onFormSuccess={(body, leadId) => console.log(leadId)}\n */\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst MitreActionsWidget = React.forwardRef<HTMLDivElement, MitreActionsWidgetProps>(({\n products,\n ambiente,\n backgroundColor,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowPreferenciaContato,\n onFormSuccess\n}, ref) => {\n const [open, setOpen] = useState(false);\n\n // Carrega a fonte Montserrat de forma condicional (sem afetar o projeto host)\n useEffect(() => {\n ensureMontserratFont();\n }, []);\n\n function handleOpen() {\n setOpen(true);\n }\n\n function close() {\n setOpen(false);\n }\n\n return (\n <ComponentWrapper>\n <Container>\n {open && <Selector products={products} ambiente={ambiente} close={() => close()} formShowHeader={formShowHeader} formTitle={formTitle} formSubtitle={formSubtitle} formShowPreferenciaContato={formShowPreferenciaContato} onFormSuccess={onFormSuccess} />}\n <ButtonContainer ref={ref} open={open} $backgroundColor={backgroundColor} onClick={() => handleOpen()}>\n <img\n src={iconMap[\"balloon\"]}\n height={32}\n width={32}\n alt=\"Balão com mais opções\"\n draggable={false}\n />\n </ButtonContainer>\n </Container>\n </ComponentWrapper>\n )\n});\n\nMitreActionsWidget.displayName = \"MitreActionsWidget\";\n\nexport default MitreActionsWidget;","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, darkEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n z-index: 9999;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n $backgroundColor?: string;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n background-color: ${(props) => (props.$backgroundColor?.trim() ? props.$backgroundColor : colors.green2)};\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n","export const colors = {\n red: '#e52e4d',\n white: '#FFF',\n black: '#2F2F2F',\n black2: '#1E1E1E',\n black3: '#353535',\n alphaBlack: '#000000',\n \n yellow400: '#FFD789',\n yellow500: '#F6C76B',\n \n gray40: '#F0F0F0',\n gray45: '#767676',\n gray50: '#686A69',\n gray60: '#8F8F8F',\n gray100: '#B6B6B6',\n gray150: '#B9B9B9',\n gray200: '#D2D2D2',\n gray300: '#EBEBEB',\n gray400: '#ECECEC',\n gray500: '#F4F4F4',\n gray550: '#6F6F6F',\n gray600: '#686868',\n gray700: '#535353',\n gray800: '#9D9D9D',\n \n green: '#57C06E',\n green2: '#2DCE68',\n} as const;\n\nexport const shadows = {\n shadow500: '0px 4px 8px rgba(91, 91, 91, 0.2)',\n} as const;\n","import styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const ComponentWrapper = styled.div`\n /* Reset local apenas para elementos dentro do componente */\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n /* Font family aplicada apenas aos elementos do componente */\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n -webkit-font-smoothing: antialiased;\n\n /* Aplicar font aos elementos filhos */\n input, textarea, select, button {\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n font-weight: 400;\n }\n\n h1, h2, h3, h4, h5, h6, strong {\n font-weight: 700;\n }\n\n button {\n cursor: pointer;\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Scrollbar customizada APENAS para elementos internos */\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n background: ${colors.gray500};\n width: 6px;\n height: 10px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ${colors.gray50};\n }\n`;\n","/**\n * Carrega a fonte Montserrat de forma condicional.\n * Verifica se a fonte já está carregada no documento antes de adicionar,\n * evitando duplicação se o projeto host já tiver a fonte.\n */\nexport const ensureMontserratFont = (): void => {\n // Verifica se a fonte já está carregada\n if (document.querySelector('link[href*=\"Montserrat\"]')) {\n return;\n }\n\n const link = document.createElement(\"link\");\n link.href = \"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap\";\n link.rel = \"stylesheet\";\n document.head.appendChild(link);\n};\n","import { useRef, useState } from \"react\";\nimport { colors } from \"../../theme\";\n\nimport useClickOutside from \"../hooks/useClickOutside\";\n\nimport {\n HeaderContainer,\n ContentContainer,\n FormContainer,\n SelectorContainer,\n FooterContainer,\n FormErrorContainer,\n TextError\n} from \"./styles\";\n\nimport { HiX, HiArrowNarrowLeft, HiOutlineExclamation } from 'react-icons/hi';\n\nimport Navbar from \"../Navbar\";\n\nimport TalkWithSeller from \"../TalkWithASeller\";\nimport LeadSupport from \"../LeadSupport\";\nimport OtherTopics from \"../OtherTopics\";\n\nimport { MitreFormComponent, RequestBody, type Ambiente, type Canal } from 'mitre-form-component'\n\nimport { Product } from '../../domain/Product';\n\nimport { ErrorBoundary } from 'react-error-boundary';\n\ntype Props = {\n products: Product[];\n ambiente?: Ambiente;\n close: () => void;\n formShowHeader?: boolean;\n formTitle?: string;\n formSubtitle?: string;\n formShowPreferenciaContato?: boolean;\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst Selector = ({\n products,\n ambiente,\n close,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowPreferenciaContato,\n onFormSuccess\n}: Props) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [currentOpen, setCurrentOpen] = useState(0);\n\n const [formCanal, setFormCanal] = useState<Canal | null>(null);\n const openForm = (canal: Canal) => setFormCanal(canal);\n const closeForm = () => setFormCanal(null);\n\n useClickOutside(ref, close);\n\n const tabs = [\n TalkWithSeller,\n LeadSupport,\n OtherTopics\n ];\n\n const DefaultComponent = () => <></>;\n\n const CurrentComponent = tabs[currentOpen] || DefaultComponent;\n\n return (\n <SelectorContainer ref={ref}>\n\n <HeaderContainer>\n <HiArrowNarrowLeft\n className=\"back-icon\"\n onClick={closeForm}\n size={28}\n visibility={formCanal !== null ? \"visible\" : \"hidden\"}\n color={colors.black}\n />\n\n <HiX\n className=\"close-icon\"\n onClick={close}\n size={28}\n color={colors.black}\n />\n </HeaderContainer>\n\n {formCanal !== null ?\n <>\n <FormContainer>\n <ErrorBoundary fallback={\n <FormErrorContainer>\n <HiOutlineExclamation\n size={28}\n color={colors.red}\n />\n <TextError>Ocorreu um erro ao carregar o formulário!</TextError>\n </FormErrorContainer>\n }>\n <MitreFormComponent\n products={products}\n ambiente={ambiente}\n canal={formCanal}\n backgroundColor=\"transparent\"\n innerPadding=\"0\"\n showHeader={formShowHeader}\n title={formTitle}\n subtitle={formSubtitle}\n showPreferenciaContato={formShowPreferenciaContato}\n onSuccess={onFormSuccess}\n />\n </ErrorBoundary>\n </FormContainer>\n </>\n :\n <>\n <ContentContainer>\n <CurrentComponent openForm={openForm} />\n </ContentContainer>\n\n <FooterContainer>\n <Navbar\n currentOpen={currentOpen}\n setCurrentOpen={setCurrentOpen}\n />\n </FooterContainer>\n </>\n }\n\n </SelectorContainer>\n );\n}\n\nexport default Selector;","import { useEffect } from \"react\";\n\nfunction useClickOutside(\n ref: React.RefObject<HTMLElement | null>,\n methodToRunWhenClickOutside: (e?: MouseEvent) => void,\n exemptedIds: string[] = []\n) {\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n // Explicit null check (TypeScript will now understand ref.current could be null)\n if (!ref.current) return;\n\n const isClickOutside = !ref.current.contains(event.target as Node);\n\n // Check if the clicked element or any of its ancestors have an exempted ID\n const isAnElementAllowedToClose = exemptedIds.some((id) => {\n let element = event.target as HTMLElement | null;\n while (element) {\n if (element.id === id) {\n return true;\n }\n element = element.parentElement;\n }\n return false;\n });\n\n // Only run the method if the click is outside and not exempted\n if (isClickOutside && !isAnElementAllowedToClose) {\n methodToRunWhenClickOutside(event);\n }\n }\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref, methodToRunWhenClickOutside, exemptedIds]);\n}\n\nexport default useClickOutside;\n","import { flex, opacityEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const HeaderContainer = styled.div`\n position: relative;\n width: 100%;\n height: 52px;\n padding-top: 20px;\n padding-bottom: 8px;\n padding-left: 20px;\n padding-right: 20px;\n\n justify-content: space-between;\n align-items: center;\n display: flex;\n\n .close-icon {\n ${opacityEffect}\n color: ${colors.gray100};\n }\n\n .back-icon {\n ${opacityEffect}\n }\n`;\n\nexport const ContentContainer = styled.div`\n flex: 1;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n /* Padding para prevenir conteúdo encostado nas bordas */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n`;\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n overflow-x: hidden;\n overflow-y: auto;\n height: 100%;\n\n /* Padding do container do formulário (igual ao ContentContainer) */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n\n /* Restaurar espaçamentos dos elementos do formulário */\n & > * {\n margin-bottom: 16px;\n }\n\n & label {\n margin-bottom: 8px;\n display: block;\n }\n\n & input,\n & textarea,\n & select {\n padding: 12px;\n margin-bottom: 16px;\n }\n\n /* Restaurar padding para elementos do phone input que foram resetados */\n .react-international-phone-country-selector-button {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-button__button-content {\n padding: 0.25rem !important;\n }\n\n .react-international-phone-country-selector-button__flag-emoji {\n padding: 0 0.25rem !important;\n }\n\n /* Restaurar padding para os itens da lista de países no dropdown */\n .react-international-phone-country-selector-dropdown {\n padding: 0.25rem 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item {\n padding: 0.25rem 1rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-flag-emoji {\n padding: 0 0.5rem 0 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-country-name {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-dial-code {\n padding: 0 0 0 0.5rem !important;\n }\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n`;\n\nexport const SelectorContainer = styled.div`\n display: flex;\n flex-direction: column;\n height: 85vh;\n margin-bottom: 8px;\n max-height: 660px;\n position: relative;\n background: ${colors.gray300};\n border-radius: 8px;\n\n @media (max-width: ${breakpoints.tablet}) {\n height: 100%;\n width: 100%;\n max-height: 100%;\n border-radius: 0px;\n position: fixed;\n bottom: 0;\n right: 0;\n top: 0;\n left: 0;\n margin: 0;\n z-index: 50;\n padding-bottom: env(safe-area-inset-bottom);\n }\n`;\n\nexport const FooterContainer = styled.div`\n height: 90px;\n width: 100%;\n`;\n\nexport const FormErrorContainer = styled.div`\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n\n background: ${colors.white};\n border-radius: 8px;\n border: none;\n`;\n\nexport const TextError = styled.h3`\n color: ${colors.red};\n text-align: center;\n padding-top: 10px;\n`;\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const NavContainer = styled.nav`\n ${flex(\"row\")}\n gap:10px;\n position: absolute;\n left: 15px;\n right: 15px;\n bottom: 10px;\n\n button {\n ${flex(\"column\", \"center\")}\n ${opacityEffect}\n background: black;\n border-radius: 10px;\n border: none;\n color: white;\n font-size: 11px;\n gap: 5px;\n padding: 10px 5px;\n width: 33%;\n\n &.active {\n background: ${colors.yellow500};\n color: black;\n font-weight: 700;\n\n img,\n svg {\n filter: initial;\n }\n }\n\n img,\n svg {\n filter: invert(100%);\n }\n }\n`;\n","import apple_mac from \"./images/apple-mac.svg\";\nimport balloon from \"./images/balloon.svg\";\nimport chat from \"./images/chat.svg\";\nimport google_play_store from \"./images/google-play-store.svg\";\nimport house_with_hand from \"./images/house-with-hand.svg\";\nimport mala from \"./images/mala.svg\";\nimport message from \"./images/message.svg\";\nimport person from \"./images/person.svg\";\nimport question_mark_circle from \"./images/question-mark-circle.svg\";\nimport shake_hands from \"./images/shake-hands.svg\";\nimport star from \"./images/star.svg\";\nimport whatsapp from \"./images/whatsapp.svg\";\n\nexport const iconMap: Record<string, string> = {\n apple_mac,\n balloon,\n chat,\n google_play_store,\n house_with_hand,\n mala,\n message,\n person,\n question_mark_circle,\n shake_hands,\n star,\n whatsapp,\n};\n","import { NavContainer } from \"./styles\";\n\nimport { Dispatch } from \"react\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n currentOpen:number;\n setCurrentOpen:Dispatch<number>;\n}\n\nconst Navbar = ({ setCurrentOpen, currentOpen }:Props) => {\n\n const itens = [\n { name:\"Converse com um corretor\", icon:\"house_with_hand\" },\n { name:\"Atendimento ao cliente\", icon:\"person\" },\n { name:\"Outros assuntos\", icon:\"question_mark_circle\" }\n ]\n\n return (\n <NavContainer>\n \n { itens.map((tab, index) => (\n <button \n className={index === currentOpen ? \"active\" : \"\" } \n key={ tab.name } \n onClick={ () => setCurrentOpen(index) }\n >\n <img\n alt={ tab.name }\n height={ 20 }\n src={iconMap[tab.icon!]}\n width={ 20 }\n />\n { tab.name }\n </button>\n ))}\n\n </NavContainer>\n )\n}\n\nexport default Navbar","import { darkEffect, flex, breakpoints } from \"./styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n\nexport const Title = styled.h2<{ $textColor?: string }>`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const Text = styled.p<{ $textColor?: string }>`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const SelectorOptionsContainer = styled.div`\n ${flex(\"column\")}\n gap: 10px;\n padding: 20px 0;\n\n a {\n text-decoration: none;\n }\n\n button {\n border: none;\n border-radius: 8px;\n background: transparent;\n }\n`;\n\nexport const SelectorOption = styled.div`\n ${flex(\"row\", \"center\", \"space-between\")}\n ${darkEffect}\n background: ${colors.white};\n color: black;\n border-radius: 8px;\n padding: 12px;\n width: 100%;\n\n h3 {\n font-size: 0.81rem;\n font-weight: 700;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-bottom: 10px;\n margin-right: 10px;\n }\n\n p {\n font-size: 0.75rem;\n font-weight: 300;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-right: 10px;\n }\n`;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { type Canal } from \"mitre-form-component\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n openForm: (canal: Canal) => void;\n}\n\nconst TalkWithSeller = ({ openForm }: Props) => {\n const itens = [\n { title: \"Atendimento por Whatsapp\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"whatsapp\"), icon: \"whatsapp\" },\n { title: \"Atendimento por chat\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"chat\"), icon: \"chat\" },\n { title: \"Atendimento por mensagem\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"form\"), icon: \"message\" },\n ];\n\n return (\n <div>\n\n <Title>\n Converse com um corretor\n </Title>\n\n <Text>\n Selecione uma opção de contato a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n {itens.map((value) => (\n <button key={value.title} onClick={value.onClick}>\n <SelectorOption >\n <div>\n <h3>{value.title}</h3>\n <p>{value.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={26}\n src={iconMap[value.icon]}\n width={26}\n />\n </SelectorOption>\n </button>\n ))}\n\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default TalkWithSeller\n","import { useEffect, useState } from \"react\";\n\ntype DeviceType = \"Android\" | \"iPhone\" | \"Unknown\";\n\nexport function useDeviceType(): DeviceType {\n const [deviceType, setDeviceType] = useState<DeviceType>(\"Unknown\");\n\n useEffect(() => {\n const userAgent = navigator.userAgent || navigator.vendor;\n\n if (/android/i.test(userAgent)) {\n setDeviceType(\"Android\");\n } else if (/iPad|iPhone|iPod/.test(userAgent)) {\n setDeviceType(\"iPhone\");\n } else {\n setDeviceType(\"Unknown\");\n }\n }, []);\n\n return deviceType;\n}\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { useDeviceType } from \"../hooks/useDeviceType\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Client = () => {\n const device = useDeviceType()\n const mobileLink = device === \"Android\" ? \"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" : \"https://apps.apple.com/br/app/mitre-experience/id1543244752\";\n const mobileIcon = device === \"Android\" ? \"google-play-store\" : \"apple-mac\";\n const mobileMessage = device === \"Android\" ? \"Encontre nosso app na Google Play Store\" : \"Encontre nosso app na App Store\";\n\n const items = [\n { title:\"Atendimento ao Cliente Mitre\", text:\"Acesso ao portal do cliente\", icon:\"person\", link:\"https://portal.mitrerealty.com.br/Clientes/\", },\n { title:\"Baixe o Aplicativo Mitre Experience\", text:mobileMessage, icon:mobileIcon, link:mobileLink },\n ];\n\n const mobileItems = [\n { title:\"Baixe o Aplicativo Mitre Experience no Android\", text:\"Encontre nosso app na Google Play Store\", icon:\"google_play_store\", link:\"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" },\n { title:\"Baixe o Aplicativo Mitre Experience no IOS\", text:\"Encontre nosso app na App Store\", icon:\"apple_mac\", link:\"https://apps.apple.com/br/app/mitre-experience/id1543244752\" }\n ];\n\n function isInMobileItemButInDesktop(index:number) {\n const itemIndex = 1;\n return index === itemIndex && device === \"Unknown\";\n }\n\n return (\n <div>\n\n <Title>\n Central de Relacionamento\n </Title>\n\n <Text>\n <>\n Já é cliente Mitre Reality? Precisa falar conosco?\n <br/><br/>\n Acesse o Portal do Cliente para enviar sua solicitação à nossa Central de Relacionamento: \n </>\n </Text>\n\n <SelectorOptionsContainer>\n <>\n { items.map((item, index) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n style={isInMobileItemButInDesktop(index) ? { display:\"none\" } : {}}\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))}\n\n { device === \"Unknown\" &&\n mobileItems.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))\n }\n\n </>\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default Client;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Other = () => {\n const itens = [\n { title:\"Trabalhe conosco\", text:\"Canal exclusivo para vagas\", icon:\"mala\", link:`https://mitrerealty.gupy.io/` },\n { title:\"Fornecedores\", text:\"Seja um fornecedor da Mitre\", icon:\"shake_hands\", link:`https://www.mitrerealty.com.br/fornecedores` },\n { title:\"Seja um Parceiro Mitre\", text:\"Seja um corretor ou imobiliária parceira da Mitre.\", icon:\"star\", link:`https://www.mitrerealty.com.br/seja-parceiro-mitre` },\n { title:\"Outros assuntos\", text:\"Entre em contato com a Mitre\", icon:\"question_mark_circle\", link:`https://www.mitrerealty.com.br/contato` }\n ];\n\n return (\n <div>\n\n <Title>\n Outros assuntos\n </Title>\n\n <Text>\n Selecione uma das opções a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n { itens.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption >\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={ iconMap[item.icon] }\n width={ 26 }\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AU,MAAY,kBAAkB,iBAAiB,SAAS,MAAM,WAAW,GAClG;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,QAAQ,SAAS;AAAA,QACtB,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,KAAI;AAAA,QACJ,WAAW;AAAA;AAAA,IACb,GACF;AAAA,KACF,GACF;AAEJ,CAAC;AAED,mBAAmB,cAAc;AAEjC,IAAO,6BAAQ;","names":["import_react","styled","import_styled_components","styled","import_react","import_styled_components","styled","import_styled_components","styled","import_styled_components","Container","styled","ButtonContainer","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/MitreActionsWidget/index.tsx","../src/components/styles/utils.ts","../src/components/MitreActionsWidget/styles.ts","../src/theme/colors.ts","../src/components/ComponentWrapper/index.tsx","../src/utils/fontLoader.ts","../src/components/Selector/index.tsx","../src/components/hooks/useClickOutside.ts","../src/components/Selector/styles.ts","../src/components/Navbar/styles.ts","../src/assets/icons.ts","../src/components/Navbar/index.tsx","../src/components/styles.ts","../src/components/TalkWithASeller/index.tsx","../src/components/hooks/useDeviceType.ts","../src/components/LeadSupport/index.tsx","../src/components/OtherTopics/index.tsx"],"sourcesContent":["export { default as MitreActionsWidget } from \"./components/MitreActionsWidget\";\nexport type { MitreActionsWidgetProps } from \"./components/MitreActionsWidget\";\n","import React, { useState, useEffect } from \"react\";\nimport { Container, ButtonContainer } from \"./styles\";\nimport { Product } from '../../domain/Product';\nimport { ComponentWrapper } from \"../ComponentWrapper\";\nimport { ensureMontserratFont } from \"../../utils/fontLoader\";\n\nimport Selector from \"../Selector\";\n\nimport { iconMap } from \"../../assets/icons\";\nimport { RequestBody, type Environment } from \"mitre-form-component\";\n\nexport interface MitreActionsWidgetProps {\n products: Product[];\n /**\n * Define de qual config interno o `MitreFormComponent` lê `apiUrl`/`apiToken`/`whatsappPhone`/`chatUrl`.\n * Default `\"staging\"`.\n */\n environment?: Environment;\n /**\n * Cor de fundo personalizada para o botão flutuante.\n * @default \"#2DCE68\" (verde padrão)\n * @example backgroundColor=\"#FF5733\"\n */\n backgroundColor?: string;\n /** Exibe ou oculta o cabeçalho do formulário. */\n formShowHeader?: boolean;\n /** Título exibido no cabeçalho do formulário. */\n formTitle?: string;\n /** Subtítulo exibido no cabeçalho do formulário. */\n formSubtitle?: string;\n /** Exibe ou oculta o campo de preferência de contato no formulário. */\n formShowContactPreference?: boolean;\n /**\n * Callback chamado após o envio bem-sucedido do formulário de lead.\n * Recebe o corpo da requisição e o ID do lead criado.\n * @example onFormSuccess={(body, leadId) => console.log(leadId)}\n */\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst MitreActionsWidget = React.forwardRef<HTMLDivElement, MitreActionsWidgetProps>(({\n products,\n environment,\n backgroundColor,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowContactPreference,\n onFormSuccess\n}, ref) => {\n const [open, setOpen] = useState(false);\n\n // Carrega a fonte Montserrat de forma condicional (sem afetar o projeto host)\n useEffect(() => {\n ensureMontserratFont();\n }, []);\n\n function handleOpen() {\n setOpen(true);\n }\n\n function close() {\n setOpen(false);\n }\n\n return (\n <ComponentWrapper>\n <Container>\n {open && <Selector products={products} environment={environment} close={() => close()} formShowHeader={formShowHeader} formTitle={formTitle} formSubtitle={formSubtitle} formShowContactPreference={formShowContactPreference} onFormSuccess={onFormSuccess} />}\n <ButtonContainer ref={ref} open={open} $backgroundColor={backgroundColor} onClick={() => handleOpen()}>\n <img\n src={iconMap[\"balloon\"]}\n height={32}\n width={32}\n alt=\"Balão com mais opções\"\n draggable={false}\n />\n </ButtonContainer>\n </Container>\n </ComponentWrapper>\n )\n});\n\nMitreActionsWidget.displayName = \"MitreActionsWidget\";\n\nexport default MitreActionsWidget;","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, darkEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n z-index: 9999;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n $backgroundColor?: string;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n background-color: ${(props) => (props.$backgroundColor?.trim() ? props.$backgroundColor : colors.green2)};\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n","export const colors = {\n red: '#e52e4d',\n white: '#FFF',\n black: '#2F2F2F',\n black2: '#1E1E1E',\n black3: '#353535',\n alphaBlack: '#000000',\n \n yellow400: '#FFD789',\n yellow500: '#F6C76B',\n \n gray40: '#F0F0F0',\n gray45: '#767676',\n gray50: '#686A69',\n gray60: '#8F8F8F',\n gray100: '#B6B6B6',\n gray150: '#B9B9B9',\n gray200: '#D2D2D2',\n gray300: '#EBEBEB',\n gray400: '#ECECEC',\n gray500: '#F4F4F4',\n gray550: '#6F6F6F',\n gray600: '#686868',\n gray700: '#535353',\n gray800: '#9D9D9D',\n \n green: '#57C06E',\n green2: '#2DCE68',\n} as const;\n\nexport const shadows = {\n shadow500: '0px 4px 8px rgba(91, 91, 91, 0.2)',\n} as const;\n","import styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const ComponentWrapper = styled.div`\n /* Reset local apenas para elementos dentro do componente */\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n /* Font family aplicada apenas aos elementos do componente */\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n -webkit-font-smoothing: antialiased;\n\n /* Aplicar font aos elementos filhos */\n input, textarea, select, button {\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n font-weight: 400;\n }\n\n h1, h2, h3, h4, h5, h6, strong {\n font-weight: 700;\n }\n\n button {\n cursor: pointer;\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Scrollbar customizada APENAS para elementos internos */\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n background: ${colors.gray500};\n width: 6px;\n height: 10px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ${colors.gray50};\n }\n`;\n","/**\n * Carrega a fonte Montserrat de forma condicional.\n * Verifica se a fonte já está carregada no documento antes de adicionar,\n * evitando duplicação se o projeto host já tiver a fonte.\n */\nexport const ensureMontserratFont = (): void => {\n // Verifica se a fonte já está carregada\n if (document.querySelector('link[href*=\"Montserrat\"]')) {\n return;\n }\n\n const link = document.createElement(\"link\");\n link.href = \"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap\";\n link.rel = \"stylesheet\";\n document.head.appendChild(link);\n};\n","import { useRef, useState } from \"react\";\nimport { colors } from \"../../theme\";\n\nimport useClickOutside from \"../hooks/useClickOutside\";\n\nimport {\n HeaderContainer,\n ContentContainer,\n FormContainer,\n SelectorContainer,\n FooterContainer,\n FormErrorContainer,\n TextError\n} from \"./styles\";\n\nimport { HiX, HiArrowNarrowLeft, HiOutlineExclamation } from 'react-icons/hi';\n\nimport Navbar from \"../Navbar\";\n\nimport TalkWithSeller from \"../TalkWithASeller\";\nimport LeadSupport from \"../LeadSupport\";\nimport OtherTopics from \"../OtherTopics\";\n\nimport { MitreFormComponent, RequestBody, type Environment, type Channel } from 'mitre-form-component'\n\nimport { Product } from '../../domain/Product';\n\nimport { ErrorBoundary } from 'react-error-boundary';\n\ntype Props = {\n products: Product[];\n environment?: Environment;\n close: () => void;\n formShowHeader?: boolean;\n formTitle?: string;\n formSubtitle?: string;\n formShowContactPreference?: boolean;\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst Selector = ({\n products,\n environment,\n close,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowContactPreference,\n onFormSuccess\n}: Props) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [currentOpen, setCurrentOpen] = useState(0);\n\n const [formChannel, setFormChannel] = useState<Channel | null>(null);\n const openForm = (channel: Channel) => setFormChannel(channel);\n const closeForm = () => setFormChannel(null);\n\n useClickOutside(ref, close);\n\n const tabs = [\n TalkWithSeller,\n LeadSupport,\n OtherTopics\n ];\n\n const DefaultComponent = () => <></>;\n\n const CurrentComponent = tabs[currentOpen] || DefaultComponent;\n\n return (\n <SelectorContainer ref={ref}>\n\n <HeaderContainer>\n <HiArrowNarrowLeft\n className=\"back-icon\"\n onClick={closeForm}\n size={28}\n visibility={formChannel !== null ? \"visible\" : \"hidden\"}\n color={colors.black}\n />\n\n <HiX\n className=\"close-icon\"\n onClick={close}\n size={28}\n color={colors.black}\n />\n </HeaderContainer>\n\n {formChannel !== null ?\n <>\n <FormContainer>\n <ErrorBoundary fallback={\n <FormErrorContainer>\n <HiOutlineExclamation\n size={28}\n color={colors.red}\n />\n <TextError>Ocorreu um erro ao carregar o formulário!</TextError>\n </FormErrorContainer>\n }>\n <MitreFormComponent\n products={products}\n environment={environment}\n channel={formChannel}\n backgroundColor=\"transparent\"\n innerPadding=\"0\"\n showHeader={formShowHeader}\n title={formTitle}\n subtitle={formSubtitle}\n showContactPreference={formShowContactPreference}\n onSuccess={onFormSuccess}\n />\n </ErrorBoundary>\n </FormContainer>\n </>\n :\n <>\n <ContentContainer>\n <CurrentComponent openForm={openForm} />\n </ContentContainer>\n\n <FooterContainer>\n <Navbar\n currentOpen={currentOpen}\n setCurrentOpen={setCurrentOpen}\n />\n </FooterContainer>\n </>\n }\n\n </SelectorContainer>\n );\n}\n\nexport default Selector;","import { useEffect } from \"react\";\n\nfunction useClickOutside(\n ref: React.RefObject<HTMLElement | null>,\n methodToRunWhenClickOutside: (e?: MouseEvent) => void,\n exemptedIds: string[] = []\n) {\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n // Explicit null check (TypeScript will now understand ref.current could be null)\n if (!ref.current) return;\n\n const isClickOutside = !ref.current.contains(event.target as Node);\n\n // Check if the clicked element or any of its ancestors have an exempted ID\n const isAnElementAllowedToClose = exemptedIds.some((id) => {\n let element = event.target as HTMLElement | null;\n while (element) {\n if (element.id === id) {\n return true;\n }\n element = element.parentElement;\n }\n return false;\n });\n\n // Only run the method if the click is outside and not exempted\n if (isClickOutside && !isAnElementAllowedToClose) {\n methodToRunWhenClickOutside(event);\n }\n }\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref, methodToRunWhenClickOutside, exemptedIds]);\n}\n\nexport default useClickOutside;\n","import { flex, opacityEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const HeaderContainer = styled.div`\n position: relative;\n width: 100%;\n height: 52px;\n padding-top: 20px;\n padding-bottom: 8px;\n padding-left: 20px;\n padding-right: 20px;\n\n justify-content: space-between;\n align-items: center;\n display: flex;\n\n .close-icon {\n ${opacityEffect}\n color: ${colors.gray100};\n }\n\n .back-icon {\n ${opacityEffect}\n }\n`;\n\nexport const ContentContainer = styled.div`\n flex: 1;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n /* Padding para prevenir conteúdo encostado nas bordas */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n`;\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n overflow-x: hidden;\n overflow-y: auto;\n height: 100%;\n\n /* Padding do container do formulário (igual ao ContentContainer) */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n\n /* Restaurar espaçamentos dos elementos do formulário */\n & > * {\n margin-bottom: 16px;\n }\n\n & label {\n margin-bottom: 8px;\n display: block;\n }\n\n & input,\n & textarea,\n & select {\n padding: 12px;\n margin-bottom: 16px;\n }\n\n /* Restaurar padding para elementos do phone input que foram resetados */\n .react-international-phone-country-selector-button {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-button__button-content {\n padding: 0.25rem !important;\n }\n\n .react-international-phone-country-selector-button__flag-emoji {\n padding: 0 0.25rem !important;\n }\n\n /* Restaurar padding para os itens da lista de países no dropdown */\n .react-international-phone-country-selector-dropdown {\n padding: 0.25rem 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item {\n padding: 0.25rem 1rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-flag-emoji {\n padding: 0 0.5rem 0 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-country-name {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-dial-code {\n padding: 0 0 0 0.5rem !important;\n }\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n`;\n\nexport const SelectorContainer = styled.div`\n display: flex;\n flex-direction: column;\n height: 85vh;\n margin-bottom: 8px;\n max-height: 660px;\n position: relative;\n background: ${colors.gray300};\n border-radius: 8px;\n\n @media (max-width: ${breakpoints.tablet}) {\n height: 100%;\n width: 100%;\n max-height: 100%;\n border-radius: 0px;\n position: fixed;\n bottom: 0;\n right: 0;\n top: 0;\n left: 0;\n margin: 0;\n z-index: 50;\n padding-bottom: env(safe-area-inset-bottom);\n }\n`;\n\nexport const FooterContainer = styled.div`\n height: 90px;\n width: 100%;\n`;\n\nexport const FormErrorContainer = styled.div`\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n\n background: ${colors.white};\n border-radius: 8px;\n border: none;\n`;\n\nexport const TextError = styled.h3`\n color: ${colors.red};\n text-align: center;\n padding-top: 10px;\n`;\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const NavContainer = styled.nav`\n ${flex(\"row\")}\n gap:10px;\n position: absolute;\n left: 15px;\n right: 15px;\n bottom: 10px;\n\n button {\n ${flex(\"column\", \"center\")}\n ${opacityEffect}\n background: black;\n border-radius: 10px;\n border: none;\n color: white;\n font-size: 11px;\n gap: 5px;\n padding: 10px 5px;\n width: 33%;\n\n &.active {\n background: ${colors.yellow500};\n color: black;\n font-weight: 700;\n\n img,\n svg {\n filter: initial;\n }\n }\n\n img,\n svg {\n filter: invert(100%);\n }\n }\n`;\n","import apple_mac from \"./images/apple-mac.svg\";\nimport balloon from \"./images/balloon.svg\";\nimport chat from \"./images/chat.svg\";\nimport google_play_store from \"./images/google-play-store.svg\";\nimport house_with_hand from \"./images/house-with-hand.svg\";\nimport mala from \"./images/mala.svg\";\nimport message from \"./images/message.svg\";\nimport person from \"./images/person.svg\";\nimport question_mark_circle from \"./images/question-mark-circle.svg\";\nimport shake_hands from \"./images/shake-hands.svg\";\nimport star from \"./images/star.svg\";\nimport whatsapp from \"./images/whatsapp.svg\";\n\nexport const iconMap: Record<string, string> = {\n apple_mac,\n balloon,\n chat,\n google_play_store,\n house_with_hand,\n mala,\n message,\n person,\n question_mark_circle,\n shake_hands,\n star,\n whatsapp,\n};\n","import { NavContainer } from \"./styles\";\n\nimport { Dispatch } from \"react\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n currentOpen:number;\n setCurrentOpen:Dispatch<number>;\n}\n\nconst Navbar = ({ setCurrentOpen, currentOpen }:Props) => {\n\n const itens = [\n { name:\"Converse com um corretor\", icon:\"house_with_hand\" },\n { name:\"Atendimento ao cliente\", icon:\"person\" },\n { name:\"Outros assuntos\", icon:\"question_mark_circle\" }\n ]\n\n return (\n <NavContainer>\n \n { itens.map((tab, index) => (\n <button \n className={index === currentOpen ? \"active\" : \"\" } \n key={ tab.name } \n onClick={ () => setCurrentOpen(index) }\n >\n <img\n alt={ tab.name }\n height={ 20 }\n src={iconMap[tab.icon!]}\n width={ 20 }\n />\n { tab.name }\n </button>\n ))}\n\n </NavContainer>\n )\n}\n\nexport default Navbar","import { darkEffect, flex, breakpoints } from \"./styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n\nexport const Title = styled.h2<{ $textColor?: string }>`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const Text = styled.p<{ $textColor?: string }>`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const SelectorOptionsContainer = styled.div`\n ${flex(\"column\")}\n gap: 10px;\n padding: 20px 0;\n\n a {\n text-decoration: none;\n }\n\n button {\n border: none;\n border-radius: 8px;\n background: transparent;\n }\n`;\n\nexport const SelectorOption = styled.div`\n ${flex(\"row\", \"center\", \"space-between\")}\n ${darkEffect}\n background: ${colors.white};\n color: black;\n border-radius: 8px;\n padding: 12px;\n width: 100%;\n\n h3 {\n font-size: 0.81rem;\n font-weight: 700;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-bottom: 10px;\n margin-right: 10px;\n }\n\n p {\n font-size: 0.75rem;\n font-weight: 300;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-right: 10px;\n }\n`;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { type Channel } from \"mitre-form-component\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n openForm: (channel: Channel) => void;\n}\n\nconst TalkWithSeller = ({ openForm }: Props) => {\n const itens = [\n { title: \"Atendimento por Whatsapp\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"whatsapp\"), icon: \"whatsapp\" },\n { title: \"Atendimento por chat\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"chat\"), icon: \"chat\" },\n { title: \"Atendimento por mensagem\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"form\"), icon: \"message\" },\n ];\n\n return (\n <div>\n\n <Title>\n Converse com um corretor\n </Title>\n\n <Text>\n Selecione uma opção de contato a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n {itens.map((value) => (\n <button key={value.title} onClick={value.onClick}>\n <SelectorOption >\n <div>\n <h3>{value.title}</h3>\n <p>{value.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={26}\n src={iconMap[value.icon]}\n width={26}\n />\n </SelectorOption>\n </button>\n ))}\n\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default TalkWithSeller\n","import { useEffect, useState } from \"react\";\n\ntype DeviceType = \"Android\" | \"iPhone\" | \"Unknown\";\n\nexport function useDeviceType(): DeviceType {\n const [deviceType, setDeviceType] = useState<DeviceType>(\"Unknown\");\n\n useEffect(() => {\n const userAgent = navigator.userAgent || navigator.vendor;\n\n if (/android/i.test(userAgent)) {\n setDeviceType(\"Android\");\n } else if (/iPad|iPhone|iPod/.test(userAgent)) {\n setDeviceType(\"iPhone\");\n } else {\n setDeviceType(\"Unknown\");\n }\n }, []);\n\n return deviceType;\n}\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { useDeviceType } from \"../hooks/useDeviceType\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Client = () => {\n const device = useDeviceType()\n const mobileLink = device === \"Android\" ? \"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" : \"https://apps.apple.com/br/app/mitre-experience/id1543244752\";\n const mobileIcon = device === \"Android\" ? \"google-play-store\" : \"apple-mac\";\n const mobileMessage = device === \"Android\" ? \"Encontre nosso app na Google Play Store\" : \"Encontre nosso app na App Store\";\n\n const items = [\n { title:\"Atendimento ao Cliente Mitre\", text:\"Acesso ao portal do cliente\", icon:\"person\", link:\"https://portal.mitrerealty.com.br/Clientes/\", },\n { title:\"Baixe o Aplicativo Mitre Experience\", text:mobileMessage, icon:mobileIcon, link:mobileLink },\n ];\n\n const mobileItems = [\n { title:\"Baixe o Aplicativo Mitre Experience no Android\", text:\"Encontre nosso app na Google Play Store\", icon:\"google_play_store\", link:\"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" },\n { title:\"Baixe o Aplicativo Mitre Experience no IOS\", text:\"Encontre nosso app na App Store\", icon:\"apple_mac\", link:\"https://apps.apple.com/br/app/mitre-experience/id1543244752\" }\n ];\n\n function isInMobileItemButInDesktop(index:number) {\n const itemIndex = 1;\n return index === itemIndex && device === \"Unknown\";\n }\n\n return (\n <div>\n\n <Title>\n Central de Relacionamento\n </Title>\n\n <Text>\n <>\n Já é cliente Mitre Reality? Precisa falar conosco?\n <br/><br/>\n Acesse o Portal do Cliente para enviar sua solicitação à nossa Central de Relacionamento: \n </>\n </Text>\n\n <SelectorOptionsContainer>\n <>\n { items.map((item, index) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n style={isInMobileItemButInDesktop(index) ? { display:\"none\" } : {}}\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))}\n\n { device === \"Unknown\" &&\n mobileItems.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))\n }\n\n </>\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default Client;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Other = () => {\n const itens = [\n { title:\"Trabalhe conosco\", text:\"Canal exclusivo para vagas\", icon:\"mala\", link:`https://mitrerealty.gupy.io/` },\n { title:\"Fornecedores\", text:\"Seja um fornecedor da Mitre\", icon:\"shake_hands\", link:`https://www.mitrerealty.com.br/fornecedores` },\n { title:\"Seja um Parceiro Mitre\", text:\"Seja um corretor ou imobiliária parceira da Mitre.\", icon:\"star\", link:`https://www.mitrerealty.com.br/seja-parceiro-mitre` },\n { title:\"Outros assuntos\", text:\"Entre em contato com a Mitre\", icon:\"question_mark_circle\", link:`https://www.mitrerealty.com.br/contato` }\n ];\n\n return (\n <div>\n\n <Title>\n Outros assuntos\n </Title>\n\n <Text>\n Selecione uma das opções a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n { itens.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption >\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={ iconMap[item.icon] }\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))}\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default Other; "],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2C;;;ACKpC,SAAS,KACd,YAA2B,OAC3B,YACA,gBACA;AACA,SAAO;AAAA,kBACS,cAAc,IAAI;AAAA;AAAA,qBAEf,SAAS;AAAA,sBACR,kBAAkB,IAAI;AAAA;AAE5C;AAaO,IAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWnB,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAatB,IAAM,cAAc;AAAA,EACzB,QAAQ;AACV;;;ACtDA,+BAAmB;;;ACDZ,IAAM,SAAS;AAAA,EACpB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,YAAY;AAAA,EAEZ,WAAW;AAAA,EACX,WAAW;AAAA,EAEX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;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d,yBAAqB;AAAA,EACvB,GAAG,CAAC,CAAC;AAEL,WAAS,aAAa;AACpB,YAAQ,IAAI;AAAA,EACd;AAEA,WAAS,QAAQ;AACf,YAAQ,KAAK;AAAA,EACf;AAEA,SACE,6CAAC,oBACC,wDAAC,aACE;AAAA,YAAQ,6CAAC,oBAAS,UAAoB,aAA0B,OAAO,MAAM,MAAM,GAAG,gBAAgC,WAAsB,cAA4B,2BAAsD,eAA8B;AAAA,IAC7P,6CAAC,mBAAgB,KAAU,MAAY,kBAAkB,iBAAiB,SAAS,MAAM,WAAW,GAClG;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,QAAQ,SAAS;AAAA,QACtB,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,KAAI;AAAA,QACJ,WAAW;AAAA;AAAA,IACb,GACF;AAAA,KACF,GACF;AAEJ,CAAC;AAED,mBAAmB,cAAc;AAEjC,IAAO,6BAAQ;","names":["import_react","styled","import_styled_components","styled","import_react","import_styled_components","styled","import_styled_components","styled","import_styled_components","Container","styled","ButtonContainer","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Environment, RequestBody } from 'mitre-form-component';
|
|
3
3
|
|
|
4
4
|
interface Product {
|
|
5
5
|
id: number;
|
|
@@ -10,9 +10,9 @@ interface MitreActionsWidgetProps {
|
|
|
10
10
|
products: Product[];
|
|
11
11
|
/**
|
|
12
12
|
* Define de qual config interno o `MitreFormComponent` lê `apiUrl`/`apiToken`/`whatsappPhone`/`chatUrl`.
|
|
13
|
-
* Default `"
|
|
13
|
+
* Default `"staging"`.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
environment?: Environment;
|
|
16
16
|
/**
|
|
17
17
|
* Cor de fundo personalizada para o botão flutuante.
|
|
18
18
|
* @default "#2DCE68" (verde padrão)
|
|
@@ -26,7 +26,7 @@ interface MitreActionsWidgetProps {
|
|
|
26
26
|
/** Subtítulo exibido no cabeçalho do formulário. */
|
|
27
27
|
formSubtitle?: string;
|
|
28
28
|
/** Exibe ou oculta o campo de preferência de contato no formulário. */
|
|
29
|
-
|
|
29
|
+
formShowContactPreference?: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Callback chamado após o envio bem-sucedido do formulário de lead.
|
|
32
32
|
* Recebe o corpo da requisição e o ID do lead criado.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Environment, RequestBody } from 'mitre-form-component';
|
|
3
3
|
|
|
4
4
|
interface Product {
|
|
5
5
|
id: number;
|
|
@@ -10,9 +10,9 @@ interface MitreActionsWidgetProps {
|
|
|
10
10
|
products: Product[];
|
|
11
11
|
/**
|
|
12
12
|
* Define de qual config interno o `MitreFormComponent` lê `apiUrl`/`apiToken`/`whatsappPhone`/`chatUrl`.
|
|
13
|
-
* Default `"
|
|
13
|
+
* Default `"staging"`.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
environment?: Environment;
|
|
16
16
|
/**
|
|
17
17
|
* Cor de fundo personalizada para o botão flutuante.
|
|
18
18
|
* @default "#2DCE68" (verde padrão)
|
|
@@ -26,7 +26,7 @@ interface MitreActionsWidgetProps {
|
|
|
26
26
|
/** Subtítulo exibido no cabeçalho do formulário. */
|
|
27
27
|
formSubtitle?: string;
|
|
28
28
|
/** Exibe ou oculta o campo de preferência de contato no formulário. */
|
|
29
|
-
|
|
29
|
+
formShowContactPreference?: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Callback chamado após o envio bem-sucedido do formulário de lead.
|
|
32
32
|
* Recebe o corpo da requisição e o ID do lead criado.
|
package/dist/index.js
CHANGED
|
@@ -727,19 +727,19 @@ import { ErrorBoundary } from "react-error-boundary";
|
|
|
727
727
|
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
728
728
|
var Selector = ({
|
|
729
729
|
products,
|
|
730
|
-
|
|
730
|
+
environment,
|
|
731
731
|
close,
|
|
732
732
|
formShowHeader,
|
|
733
733
|
formTitle,
|
|
734
734
|
formSubtitle,
|
|
735
|
-
|
|
735
|
+
formShowContactPreference,
|
|
736
736
|
onFormSuccess
|
|
737
737
|
}) => {
|
|
738
738
|
const ref = useRef(null);
|
|
739
739
|
const [currentOpen, setCurrentOpen] = useState2(0);
|
|
740
|
-
const [
|
|
741
|
-
const openForm = (
|
|
742
|
-
const closeForm = () =>
|
|
740
|
+
const [formChannel, setFormChannel] = useState2(null);
|
|
741
|
+
const openForm = (channel) => setFormChannel(channel);
|
|
742
|
+
const closeForm = () => setFormChannel(null);
|
|
743
743
|
useClickOutside_default(ref, close);
|
|
744
744
|
const tabs = [
|
|
745
745
|
TalkWithASeller_default,
|
|
@@ -756,7 +756,7 @@ var Selector = ({
|
|
|
756
756
|
className: "back-icon",
|
|
757
757
|
onClick: closeForm,
|
|
758
758
|
size: 28,
|
|
759
|
-
visibility:
|
|
759
|
+
visibility: formChannel !== null ? "visible" : "hidden",
|
|
760
760
|
color: colors.black
|
|
761
761
|
}
|
|
762
762
|
),
|
|
@@ -770,7 +770,7 @@ var Selector = ({
|
|
|
770
770
|
}
|
|
771
771
|
)
|
|
772
772
|
] }),
|
|
773
|
-
|
|
773
|
+
formChannel !== null ? /* @__PURE__ */ jsx5(Fragment2, { children: /* @__PURE__ */ jsx5(FormContainer, { children: /* @__PURE__ */ jsx5(ErrorBoundary, { fallback: /* @__PURE__ */ jsxs5(FormErrorContainer, { children: [
|
|
774
774
|
/* @__PURE__ */ jsx5(
|
|
775
775
|
HiOutlineExclamation,
|
|
776
776
|
{
|
|
@@ -783,14 +783,14 @@ var Selector = ({
|
|
|
783
783
|
MitreFormComponent,
|
|
784
784
|
{
|
|
785
785
|
products,
|
|
786
|
-
|
|
787
|
-
|
|
786
|
+
environment,
|
|
787
|
+
channel: formChannel,
|
|
788
788
|
backgroundColor: "transparent",
|
|
789
789
|
innerPadding: "0",
|
|
790
790
|
showHeader: formShowHeader,
|
|
791
791
|
title: formTitle,
|
|
792
792
|
subtitle: formSubtitle,
|
|
793
|
-
|
|
793
|
+
showContactPreference: formShowContactPreference,
|
|
794
794
|
onSuccess: onFormSuccess
|
|
795
795
|
}
|
|
796
796
|
) }) }) }) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
@@ -811,12 +811,12 @@ var Selector_default = Selector;
|
|
|
811
811
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
812
812
|
var MitreActionsWidget = React.forwardRef(({
|
|
813
813
|
products,
|
|
814
|
-
|
|
814
|
+
environment,
|
|
815
815
|
backgroundColor,
|
|
816
816
|
formShowHeader,
|
|
817
817
|
formTitle,
|
|
818
818
|
formSubtitle,
|
|
819
|
-
|
|
819
|
+
formShowContactPreference,
|
|
820
820
|
onFormSuccess
|
|
821
821
|
}, ref) => {
|
|
822
822
|
const [open, setOpen] = useState3(false);
|
|
@@ -830,7 +830,7 @@ var MitreActionsWidget = React.forwardRef(({
|
|
|
830
830
|
setOpen(false);
|
|
831
831
|
}
|
|
832
832
|
return /* @__PURE__ */ jsx6(ComponentWrapper, { children: /* @__PURE__ */ jsxs6(Container, { children: [
|
|
833
|
-
open && /* @__PURE__ */ jsx6(Selector_default, { products,
|
|
833
|
+
open && /* @__PURE__ */ jsx6(Selector_default, { products, environment, close: () => close(), formShowHeader, formTitle, formSubtitle, formShowContactPreference, onFormSuccess }),
|
|
834
834
|
/* @__PURE__ */ jsx6(ButtonContainer, { ref, open, $backgroundColor: backgroundColor, onClick: () => handleOpen(), children: /* @__PURE__ */ jsx6(
|
|
835
835
|
"img",
|
|
836
836
|
{
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MitreActionsWidget/index.tsx","../src/components/styles/utils.ts","../src/components/MitreActionsWidget/styles.ts","../src/theme/colors.ts","../src/components/ComponentWrapper/index.tsx","../src/utils/fontLoader.ts","../src/components/Selector/index.tsx","../src/components/hooks/useClickOutside.ts","../src/components/Selector/styles.ts","../src/components/Navbar/styles.ts","../src/assets/icons.ts","../src/components/Navbar/index.tsx","../src/components/styles.ts","../src/components/TalkWithASeller/index.tsx","../src/components/hooks/useDeviceType.ts","../src/components/LeadSupport/index.tsx","../src/components/OtherTopics/index.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport { Container, ButtonContainer } from \"./styles\";\nimport { Product } from '../../domain/Product';\nimport { ComponentWrapper } from \"../ComponentWrapper\";\nimport { ensureMontserratFont } from \"../../utils/fontLoader\";\n\nimport Selector from \"../Selector\";\n\nimport { iconMap } from \"../../assets/icons\";\nimport { RequestBody, type Ambiente } from \"mitre-form-component\";\n\nexport interface MitreActionsWidgetProps {\n products: Product[];\n /**\n * Define de qual config interno o `MitreFormComponent` lê `apiUrl`/`apiToken`/`whatsappPhone`/`chatUrl`.\n * Default `\"homol\"`.\n */\n ambiente?: Ambiente;\n /**\n * Cor de fundo personalizada para o botão flutuante.\n * @default \"#2DCE68\" (verde padrão)\n * @example backgroundColor=\"#FF5733\"\n */\n backgroundColor?: string;\n /** Exibe ou oculta o cabeçalho do formulário. */\n formShowHeader?: boolean;\n /** Título exibido no cabeçalho do formulário. */\n formTitle?: string;\n /** Subtítulo exibido no cabeçalho do formulário. */\n formSubtitle?: string;\n /** Exibe ou oculta o campo de preferência de contato no formulário. */\n formShowPreferenciaContato?: boolean;\n /**\n * Callback chamado após o envio bem-sucedido do formulário de lead.\n * Recebe o corpo da requisição e o ID do lead criado.\n * @example onFormSuccess={(body, leadId) => console.log(leadId)}\n */\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst MitreActionsWidget = React.forwardRef<HTMLDivElement, MitreActionsWidgetProps>(({\n products,\n ambiente,\n backgroundColor,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowPreferenciaContato,\n onFormSuccess\n}, ref) => {\n const [open, setOpen] = useState(false);\n\n // Carrega a fonte Montserrat de forma condicional (sem afetar o projeto host)\n useEffect(() => {\n ensureMontserratFont();\n }, []);\n\n function handleOpen() {\n setOpen(true);\n }\n\n function close() {\n setOpen(false);\n }\n\n return (\n <ComponentWrapper>\n <Container>\n {open && <Selector products={products} ambiente={ambiente} close={() => close()} formShowHeader={formShowHeader} formTitle={formTitle} formSubtitle={formSubtitle} formShowPreferenciaContato={formShowPreferenciaContato} onFormSuccess={onFormSuccess} />}\n <ButtonContainer ref={ref} open={open} $backgroundColor={backgroundColor} onClick={() => handleOpen()}>\n <img\n src={iconMap[\"balloon\"]}\n height={32}\n width={32}\n alt=\"Balão com mais opções\"\n draggable={false}\n />\n </ButtonContainer>\n </Container>\n </ComponentWrapper>\n )\n});\n\nMitreActionsWidget.displayName = \"MitreActionsWidget\";\n\nexport default MitreActionsWidget;","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, darkEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n z-index: 9999;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n $backgroundColor?: string;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n background-color: ${(props) => (props.$backgroundColor?.trim() ? props.$backgroundColor : colors.green2)};\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n","export const colors = {\n red: '#e52e4d',\n white: '#FFF',\n black: '#2F2F2F',\n black2: '#1E1E1E',\n black3: '#353535',\n alphaBlack: '#000000',\n \n yellow400: '#FFD789',\n yellow500: '#F6C76B',\n \n gray40: '#F0F0F0',\n gray45: '#767676',\n gray50: '#686A69',\n gray60: '#8F8F8F',\n gray100: '#B6B6B6',\n gray150: '#B9B9B9',\n gray200: '#D2D2D2',\n gray300: '#EBEBEB',\n gray400: '#ECECEC',\n gray500: '#F4F4F4',\n gray550: '#6F6F6F',\n gray600: '#686868',\n gray700: '#535353',\n gray800: '#9D9D9D',\n \n green: '#57C06E',\n green2: '#2DCE68',\n} as const;\n\nexport const shadows = {\n shadow500: '0px 4px 8px rgba(91, 91, 91, 0.2)',\n} as const;\n","import styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const ComponentWrapper = styled.div`\n /* Reset local apenas para elementos dentro do componente */\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n /* Font family aplicada apenas aos elementos do componente */\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n -webkit-font-smoothing: antialiased;\n\n /* Aplicar font aos elementos filhos */\n input, textarea, select, button {\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n font-weight: 400;\n }\n\n h1, h2, h3, h4, h5, h6, strong {\n font-weight: 700;\n }\n\n button {\n cursor: pointer;\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Scrollbar customizada APENAS para elementos internos */\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n background: ${colors.gray500};\n width: 6px;\n height: 10px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ${colors.gray50};\n }\n`;\n","/**\n * Carrega a fonte Montserrat de forma condicional.\n * Verifica se a fonte já está carregada no documento antes de adicionar,\n * evitando duplicação se o projeto host já tiver a fonte.\n */\nexport const ensureMontserratFont = (): void => {\n // Verifica se a fonte já está carregada\n if (document.querySelector('link[href*=\"Montserrat\"]')) {\n return;\n }\n\n const link = document.createElement(\"link\");\n link.href = \"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap\";\n link.rel = \"stylesheet\";\n document.head.appendChild(link);\n};\n","import { useRef, useState } from \"react\";\nimport { colors } from \"../../theme\";\n\nimport useClickOutside from \"../hooks/useClickOutside\";\n\nimport {\n HeaderContainer,\n ContentContainer,\n FormContainer,\n SelectorContainer,\n FooterContainer,\n FormErrorContainer,\n TextError\n} from \"./styles\";\n\nimport { HiX, HiArrowNarrowLeft, HiOutlineExclamation } from 'react-icons/hi';\n\nimport Navbar from \"../Navbar\";\n\nimport TalkWithSeller from \"../TalkWithASeller\";\nimport LeadSupport from \"../LeadSupport\";\nimport OtherTopics from \"../OtherTopics\";\n\nimport { MitreFormComponent, RequestBody, type Ambiente, type Canal } from 'mitre-form-component'\n\nimport { Product } from '../../domain/Product';\n\nimport { ErrorBoundary } from 'react-error-boundary';\n\ntype Props = {\n products: Product[];\n ambiente?: Ambiente;\n close: () => void;\n formShowHeader?: boolean;\n formTitle?: string;\n formSubtitle?: string;\n formShowPreferenciaContato?: boolean;\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst Selector = ({\n products,\n ambiente,\n close,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowPreferenciaContato,\n onFormSuccess\n}: Props) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [currentOpen, setCurrentOpen] = useState(0);\n\n const [formCanal, setFormCanal] = useState<Canal | null>(null);\n const openForm = (canal: Canal) => setFormCanal(canal);\n const closeForm = () => setFormCanal(null);\n\n useClickOutside(ref, close);\n\n const tabs = [\n TalkWithSeller,\n LeadSupport,\n OtherTopics\n ];\n\n const DefaultComponent = () => <></>;\n\n const CurrentComponent = tabs[currentOpen] || DefaultComponent;\n\n return (\n <SelectorContainer ref={ref}>\n\n <HeaderContainer>\n <HiArrowNarrowLeft\n className=\"back-icon\"\n onClick={closeForm}\n size={28}\n visibility={formCanal !== null ? \"visible\" : \"hidden\"}\n color={colors.black}\n />\n\n <HiX\n className=\"close-icon\"\n onClick={close}\n size={28}\n color={colors.black}\n />\n </HeaderContainer>\n\n {formCanal !== null ?\n <>\n <FormContainer>\n <ErrorBoundary fallback={\n <FormErrorContainer>\n <HiOutlineExclamation\n size={28}\n color={colors.red}\n />\n <TextError>Ocorreu um erro ao carregar o formulário!</TextError>\n </FormErrorContainer>\n }>\n <MitreFormComponent\n products={products}\n ambiente={ambiente}\n canal={formCanal}\n backgroundColor=\"transparent\"\n innerPadding=\"0\"\n showHeader={formShowHeader}\n title={formTitle}\n subtitle={formSubtitle}\n showPreferenciaContato={formShowPreferenciaContato}\n onSuccess={onFormSuccess}\n />\n </ErrorBoundary>\n </FormContainer>\n </>\n :\n <>\n <ContentContainer>\n <CurrentComponent openForm={openForm} />\n </ContentContainer>\n\n <FooterContainer>\n <Navbar\n currentOpen={currentOpen}\n setCurrentOpen={setCurrentOpen}\n />\n </FooterContainer>\n </>\n }\n\n </SelectorContainer>\n );\n}\n\nexport default Selector;","import { useEffect } from \"react\";\n\nfunction useClickOutside(\n ref: React.RefObject<HTMLElement | null>,\n methodToRunWhenClickOutside: (e?: MouseEvent) => void,\n exemptedIds: string[] = []\n) {\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n // Explicit null check (TypeScript will now understand ref.current could be null)\n if (!ref.current) return;\n\n const isClickOutside = !ref.current.contains(event.target as Node);\n\n // Check if the clicked element or any of its ancestors have an exempted ID\n const isAnElementAllowedToClose = exemptedIds.some((id) => {\n let element = event.target as HTMLElement | null;\n while (element) {\n if (element.id === id) {\n return true;\n }\n element = element.parentElement;\n }\n return false;\n });\n\n // Only run the method if the click is outside and not exempted\n if (isClickOutside && !isAnElementAllowedToClose) {\n methodToRunWhenClickOutside(event);\n }\n }\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref, methodToRunWhenClickOutside, exemptedIds]);\n}\n\nexport default useClickOutside;\n","import { flex, opacityEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const HeaderContainer = styled.div`\n position: relative;\n width: 100%;\n height: 52px;\n padding-top: 20px;\n padding-bottom: 8px;\n padding-left: 20px;\n padding-right: 20px;\n\n justify-content: space-between;\n align-items: center;\n display: flex;\n\n .close-icon {\n ${opacityEffect}\n color: ${colors.gray100};\n }\n\n .back-icon {\n ${opacityEffect}\n }\n`;\n\nexport const ContentContainer = styled.div`\n flex: 1;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n /* Padding para prevenir conteúdo encostado nas bordas */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n`;\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n overflow-x: hidden;\n overflow-y: auto;\n height: 100%;\n\n /* Padding do container do formulário (igual ao ContentContainer) */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n\n /* Restaurar espaçamentos dos elementos do formulário */\n & > * {\n margin-bottom: 16px;\n }\n\n & label {\n margin-bottom: 8px;\n display: block;\n }\n\n & input,\n & textarea,\n & select {\n padding: 12px;\n margin-bottom: 16px;\n }\n\n /* Restaurar padding para elementos do phone input que foram resetados */\n .react-international-phone-country-selector-button {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-button__button-content {\n padding: 0.25rem !important;\n }\n\n .react-international-phone-country-selector-button__flag-emoji {\n padding: 0 0.25rem !important;\n }\n\n /* Restaurar padding para os itens da lista de países no dropdown */\n .react-international-phone-country-selector-dropdown {\n padding: 0.25rem 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item {\n padding: 0.25rem 1rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-flag-emoji {\n padding: 0 0.5rem 0 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-country-name {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-dial-code {\n padding: 0 0 0 0.5rem !important;\n }\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n`;\n\nexport const SelectorContainer = styled.div`\n display: flex;\n flex-direction: column;\n height: 85vh;\n margin-bottom: 8px;\n max-height: 660px;\n position: relative;\n background: ${colors.gray300};\n border-radius: 8px;\n\n @media (max-width: ${breakpoints.tablet}) {\n height: 100%;\n width: 100%;\n max-height: 100%;\n border-radius: 0px;\n position: fixed;\n bottom: 0;\n right: 0;\n top: 0;\n left: 0;\n margin: 0;\n z-index: 50;\n padding-bottom: env(safe-area-inset-bottom);\n }\n`;\n\nexport const FooterContainer = styled.div`\n height: 90px;\n width: 100%;\n`;\n\nexport const FormErrorContainer = styled.div`\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n\n background: ${colors.white};\n border-radius: 8px;\n border: none;\n`;\n\nexport const TextError = styled.h3`\n color: ${colors.red};\n text-align: center;\n padding-top: 10px;\n`;\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const NavContainer = styled.nav`\n ${flex(\"row\")}\n gap:10px;\n position: absolute;\n left: 15px;\n right: 15px;\n bottom: 10px;\n\n button {\n ${flex(\"column\", \"center\")}\n ${opacityEffect}\n background: black;\n border-radius: 10px;\n border: none;\n color: white;\n font-size: 11px;\n gap: 5px;\n padding: 10px 5px;\n width: 33%;\n\n &.active {\n background: ${colors.yellow500};\n color: black;\n font-weight: 700;\n\n img,\n svg {\n filter: initial;\n }\n }\n\n img,\n svg {\n filter: invert(100%);\n }\n }\n`;\n","import apple_mac from \"./images/apple-mac.svg\";\nimport balloon from \"./images/balloon.svg\";\nimport chat from \"./images/chat.svg\";\nimport google_play_store from \"./images/google-play-store.svg\";\nimport house_with_hand from \"./images/house-with-hand.svg\";\nimport mala from \"./images/mala.svg\";\nimport message from \"./images/message.svg\";\nimport person from \"./images/person.svg\";\nimport question_mark_circle from \"./images/question-mark-circle.svg\";\nimport shake_hands from \"./images/shake-hands.svg\";\nimport star from \"./images/star.svg\";\nimport whatsapp from \"./images/whatsapp.svg\";\n\nexport const iconMap: Record<string, string> = {\n apple_mac,\n balloon,\n chat,\n google_play_store,\n house_with_hand,\n mala,\n message,\n person,\n question_mark_circle,\n shake_hands,\n star,\n whatsapp,\n};\n","import { NavContainer } from \"./styles\";\n\nimport { Dispatch } from \"react\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n currentOpen:number;\n setCurrentOpen:Dispatch<number>;\n}\n\nconst Navbar = ({ setCurrentOpen, currentOpen }:Props) => {\n\n const itens = [\n { name:\"Converse com um corretor\", icon:\"house_with_hand\" },\n { name:\"Atendimento ao cliente\", icon:\"person\" },\n { name:\"Outros assuntos\", icon:\"question_mark_circle\" }\n ]\n\n return (\n <NavContainer>\n \n { itens.map((tab, index) => (\n <button \n className={index === currentOpen ? \"active\" : \"\" } \n key={ tab.name } \n onClick={ () => setCurrentOpen(index) }\n >\n <img\n alt={ tab.name }\n height={ 20 }\n src={iconMap[tab.icon!]}\n width={ 20 }\n />\n { tab.name }\n </button>\n ))}\n\n </NavContainer>\n )\n}\n\nexport default Navbar","import { darkEffect, flex, breakpoints } from \"./styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n\nexport const Title = styled.h2<{ $textColor?: string }>`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const Text = styled.p<{ $textColor?: string }>`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const SelectorOptionsContainer = styled.div`\n ${flex(\"column\")}\n gap: 10px;\n padding: 20px 0;\n\n a {\n text-decoration: none;\n }\n\n button {\n border: none;\n border-radius: 8px;\n background: transparent;\n }\n`;\n\nexport const SelectorOption = styled.div`\n ${flex(\"row\", \"center\", \"space-between\")}\n ${darkEffect}\n background: ${colors.white};\n color: black;\n border-radius: 8px;\n padding: 12px;\n width: 100%;\n\n h3 {\n font-size: 0.81rem;\n font-weight: 700;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-bottom: 10px;\n margin-right: 10px;\n }\n\n p {\n font-size: 0.75rem;\n font-weight: 300;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-right: 10px;\n }\n`;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { type Canal } from \"mitre-form-component\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n openForm: (canal: Canal) => void;\n}\n\nconst TalkWithSeller = ({ openForm }: Props) => {\n const itens = [\n { title: \"Atendimento por Whatsapp\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"whatsapp\"), icon: \"whatsapp\" },\n { title: \"Atendimento por chat\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"chat\"), icon: \"chat\" },\n { title: \"Atendimento por mensagem\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"form\"), icon: \"message\" },\n ];\n\n return (\n <div>\n\n <Title>\n Converse com um corretor\n </Title>\n\n <Text>\n Selecione uma opção de contato a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n {itens.map((value) => (\n <button key={value.title} onClick={value.onClick}>\n <SelectorOption >\n <div>\n <h3>{value.title}</h3>\n <p>{value.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={26}\n src={iconMap[value.icon]}\n width={26}\n />\n </SelectorOption>\n </button>\n ))}\n\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default TalkWithSeller\n","import { useEffect, useState } from \"react\";\n\ntype DeviceType = \"Android\" | \"iPhone\" | \"Unknown\";\n\nexport function useDeviceType(): DeviceType {\n const [deviceType, setDeviceType] = useState<DeviceType>(\"Unknown\");\n\n useEffect(() => {\n const userAgent = navigator.userAgent || navigator.vendor;\n\n if (/android/i.test(userAgent)) {\n setDeviceType(\"Android\");\n } else if (/iPad|iPhone|iPod/.test(userAgent)) {\n setDeviceType(\"iPhone\");\n } else {\n setDeviceType(\"Unknown\");\n }\n }, []);\n\n return deviceType;\n}\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { useDeviceType } from \"../hooks/useDeviceType\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Client = () => {\n const device = useDeviceType()\n const mobileLink = device === \"Android\" ? \"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" : \"https://apps.apple.com/br/app/mitre-experience/id1543244752\";\n const mobileIcon = device === \"Android\" ? \"google-play-store\" : \"apple-mac\";\n const mobileMessage = device === \"Android\" ? \"Encontre nosso app na Google Play Store\" : \"Encontre nosso app na App Store\";\n\n const items = [\n { title:\"Atendimento ao Cliente Mitre\", text:\"Acesso ao portal do cliente\", icon:\"person\", link:\"https://portal.mitrerealty.com.br/Clientes/\", },\n { title:\"Baixe o Aplicativo Mitre Experience\", text:mobileMessage, icon:mobileIcon, link:mobileLink },\n ];\n\n const mobileItems = [\n { title:\"Baixe o Aplicativo Mitre Experience no Android\", text:\"Encontre nosso app na Google Play Store\", icon:\"google_play_store\", link:\"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" },\n { title:\"Baixe o Aplicativo Mitre Experience no IOS\", text:\"Encontre nosso app na App Store\", icon:\"apple_mac\", link:\"https://apps.apple.com/br/app/mitre-experience/id1543244752\" }\n ];\n\n function isInMobileItemButInDesktop(index:number) {\n const itemIndex = 1;\n return index === itemIndex && device === \"Unknown\";\n }\n\n return (\n <div>\n\n <Title>\n Central de Relacionamento\n </Title>\n\n <Text>\n <>\n Já é cliente Mitre Reality? Precisa falar conosco?\n <br/><br/>\n Acesse o Portal do Cliente para enviar sua solicitação à nossa Central de Relacionamento: \n </>\n </Text>\n\n <SelectorOptionsContainer>\n <>\n { items.map((item, index) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n style={isInMobileItemButInDesktop(index) ? { display:\"none\" } : {}}\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))}\n\n { device === \"Unknown\" &&\n mobileItems.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))\n }\n\n </>\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default Client;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Other = () => {\n const itens = [\n { title:\"Trabalhe conosco\", text:\"Canal exclusivo para vagas\", icon:\"mala\", link:`https://mitrerealty.gupy.io/` },\n { title:\"Fornecedores\", text:\"Seja um fornecedor da Mitre\", icon:\"shake_hands\", link:`https://www.mitrerealty.com.br/fornecedores` },\n { title:\"Seja um Parceiro Mitre\", text:\"Seja um corretor ou imobiliária parceira da Mitre.\", icon:\"star\", link:`https://www.mitrerealty.com.br/seja-parceiro-mitre` },\n { title:\"Outros assuntos\", text:\"Entre em contato com a Mitre\", icon:\"question_mark_circle\", link:`https://www.mitrerealty.com.br/contato` }\n ];\n\n return (\n <div>\n\n <Title>\n Outros assuntos\n </Title>\n\n <Text>\n Selecione uma das opções a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n { itens.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption >\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={ iconMap[item.icon] }\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))}\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default Other; "],"mappings":";AAAA,OAAO,SAAS,YAAAA,WAAU,aAAAC,kBAAiB;;;ACKpC,SAAS,KACd,YAA2B,OAC3B,YACA,gBACA;AACA,SAAO;AAAA,kBACS,cAAc,IAA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;AAEL,WAAS,aAAa;AACpB,YAAQ,IAAI;AAAA,EACd;AAEA,WAAS,QAAQ;AACf,YAAQ,KAAK;AAAA,EACf;AAEA,SACE,gBAAAH,KAAC,oBACC,0BAAAC,MAAC,aACE;AAAA,YAAQ,gBAAAD,KAAC,oBAAS,UAAoB,UAAoB,OAAO,MAAM,MAAM,GAAG,gBAAgC,WAAsB,cAA4B,4BAAwD,eAA8B;AAAA,IACzP,gBAAAA,KAAC,mBAAgB,KAAU,MAAY,kBAAkB,iBAAiB,SAAS,MAAM,WAAW,GAClG,0BAAAA;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,QAAQ,SAAS;AAAA,QACtB,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,KAAI;AAAA,QACJ,WAAW;AAAA;AAAA,IACb,GACF;AAAA,KACF,GACF;AAEJ,CAAC;AAED,mBAAmB,cAAc;AAEjC,IAAO,6BAAQ;","names":["useState","useEffect","styled","styled","useState","styled","styled","styled","styled","styled","Container","styled","ButtonContainer","jsx","jsxs","useEffect","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs","useState","jsx","jsxs","useState","useEffect"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/MitreActionsWidget/index.tsx","../src/components/styles/utils.ts","../src/components/MitreActionsWidget/styles.ts","../src/theme/colors.ts","../src/components/ComponentWrapper/index.tsx","../src/utils/fontLoader.ts","../src/components/Selector/index.tsx","../src/components/hooks/useClickOutside.ts","../src/components/Selector/styles.ts","../src/components/Navbar/styles.ts","../src/assets/icons.ts","../src/components/Navbar/index.tsx","../src/components/styles.ts","../src/components/TalkWithASeller/index.tsx","../src/components/hooks/useDeviceType.ts","../src/components/LeadSupport/index.tsx","../src/components/OtherTopics/index.tsx"],"sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport { Container, ButtonContainer } from \"./styles\";\nimport { Product } from '../../domain/Product';\nimport { ComponentWrapper } from \"../ComponentWrapper\";\nimport { ensureMontserratFont } from \"../../utils/fontLoader\";\n\nimport Selector from \"../Selector\";\n\nimport { iconMap } from \"../../assets/icons\";\nimport { RequestBody, type Environment } from \"mitre-form-component\";\n\nexport interface MitreActionsWidgetProps {\n products: Product[];\n /**\n * Define de qual config interno o `MitreFormComponent` lê `apiUrl`/`apiToken`/`whatsappPhone`/`chatUrl`.\n * Default `\"staging\"`.\n */\n environment?: Environment;\n /**\n * Cor de fundo personalizada para o botão flutuante.\n * @default \"#2DCE68\" (verde padrão)\n * @example backgroundColor=\"#FF5733\"\n */\n backgroundColor?: string;\n /** Exibe ou oculta o cabeçalho do formulário. */\n formShowHeader?: boolean;\n /** Título exibido no cabeçalho do formulário. */\n formTitle?: string;\n /** Subtítulo exibido no cabeçalho do formulário. */\n formSubtitle?: string;\n /** Exibe ou oculta o campo de preferência de contato no formulário. */\n formShowContactPreference?: boolean;\n /**\n * Callback chamado após o envio bem-sucedido do formulário de lead.\n * Recebe o corpo da requisição e o ID do lead criado.\n * @example onFormSuccess={(body, leadId) => console.log(leadId)}\n */\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst MitreActionsWidget = React.forwardRef<HTMLDivElement, MitreActionsWidgetProps>(({\n products,\n environment,\n backgroundColor,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowContactPreference,\n onFormSuccess\n}, ref) => {\n const [open, setOpen] = useState(false);\n\n // Carrega a fonte Montserrat de forma condicional (sem afetar o projeto host)\n useEffect(() => {\n ensureMontserratFont();\n }, []);\n\n function handleOpen() {\n setOpen(true);\n }\n\n function close() {\n setOpen(false);\n }\n\n return (\n <ComponentWrapper>\n <Container>\n {open && <Selector products={products} environment={environment} close={() => close()} formShowHeader={formShowHeader} formTitle={formTitle} formSubtitle={formSubtitle} formShowContactPreference={formShowContactPreference} onFormSuccess={onFormSuccess} />}\n <ButtonContainer ref={ref} open={open} $backgroundColor={backgroundColor} onClick={() => handleOpen()}>\n <img\n src={iconMap[\"balloon\"]}\n height={32}\n width={32}\n alt=\"Balão com mais opções\"\n draggable={false}\n />\n </ButtonContainer>\n </Container>\n </ComponentWrapper>\n )\n});\n\nMitreActionsWidget.displayName = \"MitreActionsWidget\";\n\nexport default MitreActionsWidget;","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, darkEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n z-index: 9999;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n $backgroundColor?: string;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n background-color: ${(props) => (props.$backgroundColor?.trim() ? props.$backgroundColor : colors.green2)};\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n","export const colors = {\n red: '#e52e4d',\n white: '#FFF',\n black: '#2F2F2F',\n black2: '#1E1E1E',\n black3: '#353535',\n alphaBlack: '#000000',\n \n yellow400: '#FFD789',\n yellow500: '#F6C76B',\n \n gray40: '#F0F0F0',\n gray45: '#767676',\n gray50: '#686A69',\n gray60: '#8F8F8F',\n gray100: '#B6B6B6',\n gray150: '#B9B9B9',\n gray200: '#D2D2D2',\n gray300: '#EBEBEB',\n gray400: '#ECECEC',\n gray500: '#F4F4F4',\n gray550: '#6F6F6F',\n gray600: '#686868',\n gray700: '#535353',\n gray800: '#9D9D9D',\n \n green: '#57C06E',\n green2: '#2DCE68',\n} as const;\n\nexport const shadows = {\n shadow500: '0px 4px 8px rgba(91, 91, 91, 0.2)',\n} as const;\n","import styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const ComponentWrapper = styled.div`\n /* Reset local apenas para elementos dentro do componente */\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n /* Font family aplicada apenas aos elementos do componente */\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n -webkit-font-smoothing: antialiased;\n\n /* Aplicar font aos elementos filhos */\n input, textarea, select, button {\n font-family: \"Montserrat\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n font-weight: 400;\n }\n\n h1, h2, h3, h4, h5, h6, strong {\n font-weight: 700;\n }\n\n button {\n cursor: pointer;\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Scrollbar customizada APENAS para elementos internos */\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n background: ${colors.gray500};\n width: 6px;\n height: 10px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ${colors.gray50};\n }\n`;\n","/**\n * Carrega a fonte Montserrat de forma condicional.\n * Verifica se a fonte já está carregada no documento antes de adicionar,\n * evitando duplicação se o projeto host já tiver a fonte.\n */\nexport const ensureMontserratFont = (): void => {\n // Verifica se a fonte já está carregada\n if (document.querySelector('link[href*=\"Montserrat\"]')) {\n return;\n }\n\n const link = document.createElement(\"link\");\n link.href = \"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap\";\n link.rel = \"stylesheet\";\n document.head.appendChild(link);\n};\n","import { useRef, useState } from \"react\";\nimport { colors } from \"../../theme\";\n\nimport useClickOutside from \"../hooks/useClickOutside\";\n\nimport {\n HeaderContainer,\n ContentContainer,\n FormContainer,\n SelectorContainer,\n FooterContainer,\n FormErrorContainer,\n TextError\n} from \"./styles\";\n\nimport { HiX, HiArrowNarrowLeft, HiOutlineExclamation } from 'react-icons/hi';\n\nimport Navbar from \"../Navbar\";\n\nimport TalkWithSeller from \"../TalkWithASeller\";\nimport LeadSupport from \"../LeadSupport\";\nimport OtherTopics from \"../OtherTopics\";\n\nimport { MitreFormComponent, RequestBody, type Environment, type Channel } from 'mitre-form-component'\n\nimport { Product } from '../../domain/Product';\n\nimport { ErrorBoundary } from 'react-error-boundary';\n\ntype Props = {\n products: Product[];\n environment?: Environment;\n close: () => void;\n formShowHeader?: boolean;\n formTitle?: string;\n formSubtitle?: string;\n formShowContactPreference?: boolean;\n onFormSuccess?: (requestBody: RequestBody, leadId: string) => void;\n}\n\nconst Selector = ({\n products,\n environment,\n close,\n formShowHeader,\n formTitle,\n formSubtitle,\n formShowContactPreference,\n onFormSuccess\n}: Props) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [currentOpen, setCurrentOpen] = useState(0);\n\n const [formChannel, setFormChannel] = useState<Channel | null>(null);\n const openForm = (channel: Channel) => setFormChannel(channel);\n const closeForm = () => setFormChannel(null);\n\n useClickOutside(ref, close);\n\n const tabs = [\n TalkWithSeller,\n LeadSupport,\n OtherTopics\n ];\n\n const DefaultComponent = () => <></>;\n\n const CurrentComponent = tabs[currentOpen] || DefaultComponent;\n\n return (\n <SelectorContainer ref={ref}>\n\n <HeaderContainer>\n <HiArrowNarrowLeft\n className=\"back-icon\"\n onClick={closeForm}\n size={28}\n visibility={formChannel !== null ? \"visible\" : \"hidden\"}\n color={colors.black}\n />\n\n <HiX\n className=\"close-icon\"\n onClick={close}\n size={28}\n color={colors.black}\n />\n </HeaderContainer>\n\n {formChannel !== null ?\n <>\n <FormContainer>\n <ErrorBoundary fallback={\n <FormErrorContainer>\n <HiOutlineExclamation\n size={28}\n color={colors.red}\n />\n <TextError>Ocorreu um erro ao carregar o formulário!</TextError>\n </FormErrorContainer>\n }>\n <MitreFormComponent\n products={products}\n environment={environment}\n channel={formChannel}\n backgroundColor=\"transparent\"\n innerPadding=\"0\"\n showHeader={formShowHeader}\n title={formTitle}\n subtitle={formSubtitle}\n showContactPreference={formShowContactPreference}\n onSuccess={onFormSuccess}\n />\n </ErrorBoundary>\n </FormContainer>\n </>\n :\n <>\n <ContentContainer>\n <CurrentComponent openForm={openForm} />\n </ContentContainer>\n\n <FooterContainer>\n <Navbar\n currentOpen={currentOpen}\n setCurrentOpen={setCurrentOpen}\n />\n </FooterContainer>\n </>\n }\n\n </SelectorContainer>\n );\n}\n\nexport default Selector;","import { useEffect } from \"react\";\n\nfunction useClickOutside(\n ref: React.RefObject<HTMLElement | null>,\n methodToRunWhenClickOutside: (e?: MouseEvent) => void,\n exemptedIds: string[] = []\n) {\n useEffect(() => {\n function handleClickOutside(event: MouseEvent) {\n // Explicit null check (TypeScript will now understand ref.current could be null)\n if (!ref.current) return;\n\n const isClickOutside = !ref.current.contains(event.target as Node);\n\n // Check if the clicked element or any of its ancestors have an exempted ID\n const isAnElementAllowedToClose = exemptedIds.some((id) => {\n let element = event.target as HTMLElement | null;\n while (element) {\n if (element.id === id) {\n return true;\n }\n element = element.parentElement;\n }\n return false;\n });\n\n // Only run the method if the click is outside and not exempted\n if (isClickOutside && !isAnElementAllowedToClose) {\n methodToRunWhenClickOutside(event);\n }\n }\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref, methodToRunWhenClickOutside, exemptedIds]);\n}\n\nexport default useClickOutside;\n","import { flex, opacityEffect, breakpoints } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const HeaderContainer = styled.div`\n position: relative;\n width: 100%;\n height: 52px;\n padding-top: 20px;\n padding-bottom: 8px;\n padding-left: 20px;\n padding-right: 20px;\n\n justify-content: space-between;\n align-items: center;\n display: flex;\n\n .close-icon {\n ${opacityEffect}\n color: ${colors.gray100};\n }\n\n .back-icon {\n ${opacityEffect}\n }\n`;\n\nexport const ContentContainer = styled.div`\n flex: 1;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n /* Padding para prevenir conteúdo encostado nas bordas */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n`;\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n overflow-x: hidden;\n overflow-y: auto;\n height: 100%;\n\n /* Padding do container do formulário (igual ao ContentContainer) */\n padding-left: 20px;\n padding-right: 20px;\n padding-bottom: 10px;\n padding-top: 10px;\n\n /* Restaurar espaçamentos dos elementos do formulário */\n & > * {\n margin-bottom: 16px;\n }\n\n & label {\n margin-bottom: 8px;\n display: block;\n }\n\n & input,\n & textarea,\n & select {\n padding: 12px;\n margin-bottom: 16px;\n }\n\n /* Restaurar padding para elementos do phone input que foram resetados */\n .react-international-phone-country-selector-button {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-button__button-content {\n padding: 0.25rem !important;\n }\n\n .react-international-phone-country-selector-button__flag-emoji {\n padding: 0 0.25rem !important;\n }\n\n /* Restaurar padding para os itens da lista de países no dropdown */\n .react-international-phone-country-selector-dropdown {\n padding: 0.25rem 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item {\n padding: 0.25rem 1rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-flag-emoji {\n padding: 0 0.5rem 0 0 !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-country-name {\n padding: 0 0.5rem !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item-dial-code {\n padding: 0 0 0 0.5rem !important;\n }\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n`;\n\nexport const SelectorContainer = styled.div`\n display: flex;\n flex-direction: column;\n height: 85vh;\n margin-bottom: 8px;\n max-height: 660px;\n position: relative;\n background: ${colors.gray300};\n border-radius: 8px;\n\n @media (max-width: ${breakpoints.tablet}) {\n height: 100%;\n width: 100%;\n max-height: 100%;\n border-radius: 0px;\n position: fixed;\n bottom: 0;\n right: 0;\n top: 0;\n left: 0;\n margin: 0;\n z-index: 50;\n padding-bottom: env(safe-area-inset-bottom);\n }\n`;\n\nexport const FooterContainer = styled.div`\n height: 90px;\n width: 100%;\n`;\n\nexport const FormErrorContainer = styled.div`\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n\n background: ${colors.white};\n border-radius: 8px;\n border: none;\n`;\n\nexport const TextError = styled.h3`\n color: ${colors.red};\n text-align: center;\n padding-top: 10px;\n`;\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../../theme\";\n\nexport const NavContainer = styled.nav`\n ${flex(\"row\")}\n gap:10px;\n position: absolute;\n left: 15px;\n right: 15px;\n bottom: 10px;\n\n button {\n ${flex(\"column\", \"center\")}\n ${opacityEffect}\n background: black;\n border-radius: 10px;\n border: none;\n color: white;\n font-size: 11px;\n gap: 5px;\n padding: 10px 5px;\n width: 33%;\n\n &.active {\n background: ${colors.yellow500};\n color: black;\n font-weight: 700;\n\n img,\n svg {\n filter: initial;\n }\n }\n\n img,\n svg {\n filter: invert(100%);\n }\n }\n`;\n","import apple_mac from \"./images/apple-mac.svg\";\nimport balloon from \"./images/balloon.svg\";\nimport chat from \"./images/chat.svg\";\nimport google_play_store from \"./images/google-play-store.svg\";\nimport house_with_hand from \"./images/house-with-hand.svg\";\nimport mala from \"./images/mala.svg\";\nimport message from \"./images/message.svg\";\nimport person from \"./images/person.svg\";\nimport question_mark_circle from \"./images/question-mark-circle.svg\";\nimport shake_hands from \"./images/shake-hands.svg\";\nimport star from \"./images/star.svg\";\nimport whatsapp from \"./images/whatsapp.svg\";\n\nexport const iconMap: Record<string, string> = {\n apple_mac,\n balloon,\n chat,\n google_play_store,\n house_with_hand,\n mala,\n message,\n person,\n question_mark_circle,\n shake_hands,\n star,\n whatsapp,\n};\n","import { NavContainer } from \"./styles\";\n\nimport { Dispatch } from \"react\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n currentOpen:number;\n setCurrentOpen:Dispatch<number>;\n}\n\nconst Navbar = ({ setCurrentOpen, currentOpen }:Props) => {\n\n const itens = [\n { name:\"Converse com um corretor\", icon:\"house_with_hand\" },\n { name:\"Atendimento ao cliente\", icon:\"person\" },\n { name:\"Outros assuntos\", icon:\"question_mark_circle\" }\n ]\n\n return (\n <NavContainer>\n \n { itens.map((tab, index) => (\n <button \n className={index === currentOpen ? \"active\" : \"\" } \n key={ tab.name } \n onClick={ () => setCurrentOpen(index) }\n >\n <img\n alt={ tab.name }\n height={ 20 }\n src={iconMap[tab.icon!]}\n width={ 20 }\n />\n { tab.name }\n </button>\n ))}\n\n </NavContainer>\n )\n}\n\nexport default Navbar","import { darkEffect, flex, breakpoints } from \"./styles/utils\";\nimport styled from \"styled-components\";\nimport { colors } from \"../theme\";\n\nexport const Container = styled.div`\n ${flex(\"column\")}\n bottom: 1.5rem;\n right: 3rem;\n position: fixed;\n width: 375px;\n\n @media (max-width: ${breakpoints.tablet}) {\n bottom: 1.5rem;\n right: 1.5rem;\n }\n`;\n\ntype Props = {\n open?: boolean;\n};\n\nexport const ButtonContainer = styled.div<Props>`\n ${darkEffect}\n ${flex(\"row\", \"center\", \"center\")}\n align-self:end;\n border-radius: 100px;\n height: 56px;\n width: 56px;\n pointer-events: ${(props) => (props.open ? \"none\" : \"\")};\n`;\n\nexport const Title = styled.h2<{ $textColor?: string }>`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const Text = styled.p<{ $textColor?: string }>`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n color: ${(props) => props.$textColor || colors.black};\n`;\n\nexport const SelectorOptionsContainer = styled.div`\n ${flex(\"column\")}\n gap: 10px;\n padding: 20px 0;\n\n a {\n text-decoration: none;\n }\n\n button {\n border: none;\n border-radius: 8px;\n background: transparent;\n }\n`;\n\nexport const SelectorOption = styled.div`\n ${flex(\"row\", \"center\", \"space-between\")}\n ${darkEffect}\n background: ${colors.white};\n color: black;\n border-radius: 8px;\n padding: 12px;\n width: 100%;\n\n h3 {\n font-size: 0.81rem;\n font-weight: 700;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-bottom: 10px;\n margin-right: 10px;\n }\n\n p {\n font-size: 0.75rem;\n font-weight: 300;\n letter-spacing: 0em;\n text-align: left;\n line-height: 1.4;\n margin-right: 10px;\n }\n`;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { type Channel } from \"mitre-form-component\";\n\nimport { iconMap } from \"../../assets/icons\";\n\ntype Props = {\n openForm: (channel: Channel) => void;\n}\n\nconst TalkWithSeller = ({ openForm }: Props) => {\n const itens = [\n { title: \"Atendimento por Whatsapp\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"whatsapp\"), icon: \"whatsapp\" },\n { title: \"Atendimento por chat\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"chat\"), icon: \"chat\" },\n { title: \"Atendimento por mensagem\", text: \"Canal exclusivo para vendas\", onClick: () => openForm(\"form\"), icon: \"message\" },\n ];\n\n return (\n <div>\n\n <Title>\n Converse com um corretor\n </Title>\n\n <Text>\n Selecione uma opção de contato a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n {itens.map((value) => (\n <button key={value.title} onClick={value.onClick}>\n <SelectorOption >\n <div>\n <h3>{value.title}</h3>\n <p>{value.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={26}\n src={iconMap[value.icon]}\n width={26}\n />\n </SelectorOption>\n </button>\n ))}\n\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default TalkWithSeller\n","import { useEffect, useState } from \"react\";\n\ntype DeviceType = \"Android\" | \"iPhone\" | \"Unknown\";\n\nexport function useDeviceType(): DeviceType {\n const [deviceType, setDeviceType] = useState<DeviceType>(\"Unknown\");\n\n useEffect(() => {\n const userAgent = navigator.userAgent || navigator.vendor;\n\n if (/android/i.test(userAgent)) {\n setDeviceType(\"Android\");\n } else if (/iPad|iPhone|iPod/.test(userAgent)) {\n setDeviceType(\"iPhone\");\n } else {\n setDeviceType(\"Unknown\");\n }\n }, []);\n\n return deviceType;\n}\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\nimport { useDeviceType } from \"../hooks/useDeviceType\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Client = () => {\n const device = useDeviceType()\n const mobileLink = device === \"Android\" ? \"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" : \"https://apps.apple.com/br/app/mitre-experience/id1543244752\";\n const mobileIcon = device === \"Android\" ? \"google-play-store\" : \"apple-mac\";\n const mobileMessage = device === \"Android\" ? \"Encontre nosso app na Google Play Store\" : \"Encontre nosso app na App Store\";\n\n const items = [\n { title:\"Atendimento ao Cliente Mitre\", text:\"Acesso ao portal do cliente\", icon:\"person\", link:\"https://portal.mitrerealty.com.br/Clientes/\", },\n { title:\"Baixe o Aplicativo Mitre Experience\", text:mobileMessage, icon:mobileIcon, link:mobileLink },\n ];\n\n const mobileItems = [\n { title:\"Baixe o Aplicativo Mitre Experience no Android\", text:\"Encontre nosso app na Google Play Store\", icon:\"google_play_store\", link:\"https://play.google.com/store/apps/details?id=com.mitre.experience&pli=1\" },\n { title:\"Baixe o Aplicativo Mitre Experience no IOS\", text:\"Encontre nosso app na App Store\", icon:\"apple_mac\", link:\"https://apps.apple.com/br/app/mitre-experience/id1543244752\" }\n ];\n\n function isInMobileItemButInDesktop(index:number) {\n const itemIndex = 1;\n return index === itemIndex && device === \"Unknown\";\n }\n\n return (\n <div>\n\n <Title>\n Central de Relacionamento\n </Title>\n\n <Text>\n <>\n Já é cliente Mitre Reality? Precisa falar conosco?\n <br/><br/>\n Acesse o Portal do Cliente para enviar sua solicitação à nossa Central de Relacionamento: \n </>\n </Text>\n\n <SelectorOptionsContainer>\n <>\n { items.map((item, index) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n style={isInMobileItemButInDesktop(index) ? { display:\"none\" } : {}}\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))}\n\n { device === \"Unknown\" &&\n mobileItems.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption>\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={iconMap[item.icon]}\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))\n }\n\n </>\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default Client;\n","import { Title, Text, SelectorOptionsContainer, SelectorOption } from \"../styles\";\n\nimport { iconMap } from \"../../assets/icons\";\n\nconst Other = () => {\n const itens = [\n { title:\"Trabalhe conosco\", text:\"Canal exclusivo para vagas\", icon:\"mala\", link:`https://mitrerealty.gupy.io/` },\n { title:\"Fornecedores\", text:\"Seja um fornecedor da Mitre\", icon:\"shake_hands\", link:`https://www.mitrerealty.com.br/fornecedores` },\n { title:\"Seja um Parceiro Mitre\", text:\"Seja um corretor ou imobiliária parceira da Mitre.\", icon:\"star\", link:`https://www.mitrerealty.com.br/seja-parceiro-mitre` },\n { title:\"Outros assuntos\", text:\"Entre em contato com a Mitre\", icon:\"question_mark_circle\", link:`https://www.mitrerealty.com.br/contato` }\n ];\n\n return (\n <div>\n\n <Title>\n Outros assuntos\n </Title>\n\n <Text>\n Selecione uma das opções a seguir:\n </Text>\n\n <SelectorOptionsContainer>\n { itens.map((item) => (\n <a \n key={ item.title } \n href={ item.link }\n target=\"_blank\" rel=\"noreferrer\"\n >\n <SelectorOption >\n <div>\n <h3>{ item.title }</h3>\n <p>{item.text}</p>\n </div>\n\n <img\n alt=\"\"\n aria-hidden=\"true\"\n height={ 26 }\n src={ iconMap[item.icon] }\n width={ 26 }\n />\n </SelectorOption>\n </a>\n ))}\n </SelectorOptionsContainer>\n\n </div>\n )\n}\n\nexport default Other; "],"mappings":";AAAA,OAAO,SAAS,YAAAA,WAAU,aAAAC,kBAAiB;;;ACKpC,SAAS,KACd,YAA2B,OAC3B,YACA,gBACA;AACA,SAAO;AAAA,kBACS,cAAc,IAAI;AAAA;AAAA,qBAEf,SAAS;AAAA,sBACR,kBAAkB,IAAI;AAAA;AAE5C;AAaO,IAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWnB,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAatB,IAAM,cAAc;AAAA,EACzB,QAAQ;AACV;;;ACtDA,OAAO,YAAY;;;ACDZ,IAAM,SAAS;AAAA,EACpB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,YAAY;AAAA,EAEZ,WAAW;AAAA,EACX,WAAW;AAAA,EAEX,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AA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;AAEJ,CAAC;AAED,mBAAmB,cAAc;AAEjC,IAAO,6BAAQ;","names":["useState","useEffect","styled","styled","useState","styled","styled","styled","styled","styled","Container","styled","ButtonContainer","jsx","jsxs","useEffect","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs","useState","jsx","jsxs","useState","useEffect"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mitre-actions-widget",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Componente flutuante de botões com ações de contato para ser usado em projetos da Mitre Realty. Totalmente encapsulado sem conflitos de estilos.",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"axios": "^1.8.4",
|
|
30
|
-
"mitre-form-component": "^2.
|
|
30
|
+
"mitre-form-component": "^2.2.3",
|
|
31
31
|
"react-error-boundary": "^5.0.0",
|
|
32
32
|
"react-icons": "^5.5.0"
|
|
33
33
|
},
|