mitre-form-component 0.1.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +151 -19
- package/dist/index.cjs +582 -190
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -5
- package/dist/index.d.ts +48 -5
- package/dist/index.js +566 -175
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -30,12 +30,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
-
MitreFormComponent: () => Form_default
|
|
33
|
+
MitreFormComponent: () => Form_default,
|
|
34
|
+
PreferenciaContato: () => PreferenciaContato
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(index_exports);
|
|
36
37
|
|
|
37
38
|
// src/components/Form/index.tsx
|
|
38
|
-
var
|
|
39
|
+
var import_react8 = __toESM(require("react"), 1);
|
|
39
40
|
|
|
40
41
|
// src/components/hooks/useError.ts
|
|
41
42
|
var import_react = require("react");
|
|
@@ -336,6 +337,92 @@ var Subtitle = import_styled_components.default.p`
|
|
|
336
337
|
color: ${(props) => props.$textColor || theme.colors.black};
|
|
337
338
|
`;
|
|
338
339
|
|
|
340
|
+
// src/components/ProductSelect/styles.ts
|
|
341
|
+
var import_styled_components2 = __toESM(require("styled-components"), 1);
|
|
342
|
+
var FormLabel = import_styled_components2.default.label`
|
|
343
|
+
font-family: ${theme.fonts.primary};
|
|
344
|
+
font-style: normal;
|
|
345
|
+
font-weight: 500;
|
|
346
|
+
font-size: 1rem;
|
|
347
|
+
color: ${(props) => props.$textColor || theme.colors.black};
|
|
348
|
+
display: block;
|
|
349
|
+
margin-bottom: 0.5rem;
|
|
350
|
+
text-align: left;
|
|
351
|
+
`;
|
|
352
|
+
var Select = import_styled_components2.default.select`
|
|
353
|
+
font-family: ${theme.fonts.primary};
|
|
354
|
+
font-style: normal;
|
|
355
|
+
font-weight: 500;
|
|
356
|
+
font-size: 1rem;
|
|
357
|
+
line-height: 1.5rem;
|
|
358
|
+
background: ${(props) => props.$backgroundColor || theme.colors.white};
|
|
359
|
+
color: ${(props) => props.$textColor || theme.colors.black};
|
|
360
|
+
padding: 0.5rem 3rem 0.5rem 0.5rem; /* Aumentado padding-right para 3rem */
|
|
361
|
+
border-radius: 0.125rem;
|
|
362
|
+
border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};
|
|
363
|
+
display: block;
|
|
364
|
+
height: 3.125rem;
|
|
365
|
+
width: 100%;
|
|
366
|
+
cursor: pointer;
|
|
367
|
+
|
|
368
|
+
/* Remover a seta padrão do navegador */
|
|
369
|
+
-webkit-appearance: none;
|
|
370
|
+
-moz-appearance: none;
|
|
371
|
+
appearance: none;
|
|
372
|
+
|
|
373
|
+
/* Adicionar seta personalizada maior */
|
|
374
|
+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
|
|
375
|
+
background-repeat: no-repeat;
|
|
376
|
+
background-position: right 1rem center; /* Posicionado a 1rem da direita */
|
|
377
|
+
background-size: 1.25rem; /* Tamanho da seta aumentado para 1.25rem */
|
|
378
|
+
|
|
379
|
+
&:focus {
|
|
380
|
+
border-radius: 0.125rem;
|
|
381
|
+
border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};
|
|
382
|
+
outline: none;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/* Estilo para option disabled (placeholder) */
|
|
386
|
+
option:disabled {
|
|
387
|
+
color: ${theme.colors.gray100};
|
|
388
|
+
font-weight: 800;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* Estilo para options normais */
|
|
392
|
+
option:not(:disabled) {
|
|
393
|
+
color: ${(props) => props.$textColor || theme.colors.black};
|
|
394
|
+
font-weight: 500;
|
|
395
|
+
}
|
|
396
|
+
`;
|
|
397
|
+
var FormErrorMessage = import_styled_components2.default.small`
|
|
398
|
+
font-size: 0.75rem;
|
|
399
|
+
line-height: 1.125rem;
|
|
400
|
+
color: ${theme.colors.red};
|
|
401
|
+
margin-top: 0.25rem;
|
|
402
|
+
display: block;
|
|
403
|
+
`;
|
|
404
|
+
var FormControl = import_styled_components2.default.div.withConfig({
|
|
405
|
+
shouldForwardProp: (prop) => !["isInvalid"].includes(prop)
|
|
406
|
+
})`
|
|
407
|
+
${FormLabel} {
|
|
408
|
+
${(props) => props.isInvalid && import_styled_components2.css`
|
|
409
|
+
color: ${theme.colors.red};
|
|
410
|
+
`};
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
${Select} {
|
|
414
|
+
${(props) => props.isInvalid && import_styled_components2.css`
|
|
415
|
+
border: 1px solid ${theme.colors.red};
|
|
416
|
+
`};
|
|
417
|
+
|
|
418
|
+
&:focus {
|
|
419
|
+
${(props) => props.isInvalid && import_styled_components2.css`
|
|
420
|
+
border: 1px solid ${theme.colors.red};
|
|
421
|
+
`};
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
`;
|
|
425
|
+
|
|
339
426
|
// src/components/styles/FontLoader.tsx
|
|
340
427
|
var import_react2 = require("react");
|
|
341
428
|
var useMontserratFont = () => {
|
|
@@ -402,8 +489,8 @@ function date(e) {
|
|
|
402
489
|
}
|
|
403
490
|
|
|
404
491
|
// src/components/Input/styles.ts
|
|
405
|
-
var
|
|
406
|
-
var
|
|
492
|
+
var import_styled_components3 = __toESM(require("styled-components"), 1);
|
|
493
|
+
var FormLabel2 = import_styled_components3.default.label`
|
|
407
494
|
font-family: ${theme.fonts.primary};
|
|
408
495
|
font-style: normal;
|
|
409
496
|
font-weight: 500;
|
|
@@ -413,7 +500,7 @@ var FormLabel = import_styled_components2.default.label`
|
|
|
413
500
|
margin-bottom: 0.5rem;
|
|
414
501
|
text-align: left;
|
|
415
502
|
`;
|
|
416
|
-
var Input =
|
|
503
|
+
var Input = import_styled_components3.default.input`
|
|
417
504
|
font-family: ${theme.fonts.primary};
|
|
418
505
|
font-style: normal;
|
|
419
506
|
font-weight: 500;
|
|
@@ -455,24 +542,24 @@ var Input = import_styled_components2.default.input`
|
|
|
455
542
|
font-weight: 500;
|
|
456
543
|
}
|
|
457
544
|
`;
|
|
458
|
-
var
|
|
545
|
+
var FormErrorMessage2 = import_styled_components3.default.small`
|
|
459
546
|
font-size: 0.75rem;
|
|
460
547
|
line-height: 1.125rem;
|
|
461
548
|
color: ${theme.colors.red};
|
|
462
549
|
margin-top: 0.25rem;
|
|
463
550
|
display: block;
|
|
464
551
|
`;
|
|
465
|
-
var
|
|
552
|
+
var FormControl2 = import_styled_components3.default.div.withConfig({
|
|
466
553
|
shouldForwardProp: (prop) => !["isInvalid"].includes(prop)
|
|
467
554
|
})`
|
|
468
|
-
${
|
|
469
|
-
${(props) => props.isInvalid &&
|
|
555
|
+
${FormLabel2} {
|
|
556
|
+
${(props) => props.isInvalid && import_styled_components3.css`
|
|
470
557
|
color: ${theme.colors.red};
|
|
471
558
|
`};
|
|
472
559
|
}
|
|
473
560
|
|
|
474
561
|
${Input} {
|
|
475
|
-
${(props) => props.isInvalid &&
|
|
562
|
+
${(props) => props.isInvalid && import_styled_components3.css`
|
|
476
563
|
border: 1px solid ${theme.colors.red};
|
|
477
564
|
|
|
478
565
|
&:not(:focus)::placeholder {
|
|
@@ -482,7 +569,7 @@ var FormControl = import_styled_components2.default.div.withConfig({
|
|
|
482
569
|
`};
|
|
483
570
|
|
|
484
571
|
&:focus {
|
|
485
|
-
${(props) => props.isInvalid &&
|
|
572
|
+
${(props) => props.isInvalid && import_styled_components3.css`
|
|
486
573
|
border: 1px solid ${theme.colors.red};
|
|
487
574
|
`};
|
|
488
575
|
}
|
|
@@ -515,8 +602,8 @@ var InputBase = ({
|
|
|
515
602
|
},
|
|
516
603
|
[mask]
|
|
517
604
|
);
|
|
518
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
519
|
-
!!label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormControl2, { isInvalid: !!error, children: [
|
|
606
|
+
!!label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormLabel2, { htmlFor: id, $textColor: labelTextColor, children: label }),
|
|
520
607
|
!mask ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
521
608
|
Input,
|
|
522
609
|
{
|
|
@@ -549,15 +636,15 @@ var InputBase = ({
|
|
|
549
636
|
...rest
|
|
550
637
|
}
|
|
551
638
|
),
|
|
552
|
-
!!error && showErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
639
|
+
!!error && showErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormErrorMessage2, { "data-testid": "error-message", children: typeof error === "string" ? error : error.message })
|
|
553
640
|
] });
|
|
554
641
|
};
|
|
555
642
|
var Input2 = (0, import_react3.forwardRef)(InputBase);
|
|
556
643
|
|
|
557
644
|
// src/components/Button/styles.ts
|
|
558
645
|
var import_polished = require("polished");
|
|
559
|
-
var
|
|
560
|
-
var Icon =
|
|
646
|
+
var import_styled_components4 = __toESM(require("styled-components"), 1);
|
|
647
|
+
var Icon = import_styled_components4.default.span`
|
|
561
648
|
font-size: 0;
|
|
562
649
|
line-height: 0;
|
|
563
650
|
transition: all 0.25s ease;
|
|
@@ -567,7 +654,7 @@ var Icon = import_styled_components3.default.span`
|
|
|
567
654
|
opacity: 0;
|
|
568
655
|
margin-right: 0.625rem;
|
|
569
656
|
`;
|
|
570
|
-
var Text =
|
|
657
|
+
var Text = import_styled_components4.default.span`
|
|
571
658
|
font-family: ${theme.fonts.primary};
|
|
572
659
|
font-size: 1rem;
|
|
573
660
|
line-height: 1.5rem;
|
|
@@ -575,14 +662,14 @@ var Text = import_styled_components3.default.span`
|
|
|
575
662
|
|
|
576
663
|
transition: all 0.25s ease;
|
|
577
664
|
`;
|
|
578
|
-
var TextSubmitting =
|
|
665
|
+
var TextSubmitting = import_styled_components4.default.span`
|
|
579
666
|
font-family: ${theme.fonts.primary};
|
|
580
667
|
font-weight: 400;
|
|
581
668
|
font-size: 1rem;
|
|
582
669
|
|
|
583
670
|
transition: all 0.25s ease;
|
|
584
671
|
`;
|
|
585
|
-
var LoadingIcon =
|
|
672
|
+
var LoadingIcon = import_styled_components4.default.span.withConfig({
|
|
586
673
|
shouldForwardProp: (prop) => prop !== "hasText"
|
|
587
674
|
})`
|
|
588
675
|
display: block;
|
|
@@ -605,7 +692,7 @@ var LoadingIcon = import_styled_components3.default.span.withConfig({
|
|
|
605
692
|
}
|
|
606
693
|
}
|
|
607
694
|
`;
|
|
608
|
-
var Button =
|
|
695
|
+
var Button = import_styled_components4.default.button.withConfig({
|
|
609
696
|
shouldForwardProp: (prop) => ![
|
|
610
697
|
"hasIcon",
|
|
611
698
|
"isSubmitting",
|
|
@@ -662,14 +749,14 @@ var Button = import_styled_components3.default.button.withConfig({
|
|
|
662
749
|
}
|
|
663
750
|
|
|
664
751
|
${Text} {
|
|
665
|
-
${(props) => props.isSubmitting && !props.hasSubmittingMessage &&
|
|
752
|
+
${(props) => props.isSubmitting && !props.hasSubmittingMessage && import_styled_components4.css`
|
|
666
753
|
transform: unset;
|
|
667
754
|
opacity: 0;
|
|
668
755
|
`}
|
|
669
756
|
}
|
|
670
757
|
|
|
671
758
|
${LoadingIcon} {
|
|
672
|
-
${(props) => props.isSubmitting && !props.hasSubmittingMessage &&
|
|
759
|
+
${(props) => props.isSubmitting && !props.hasSubmittingMessage && import_styled_components4.css`
|
|
673
760
|
display: flex;
|
|
674
761
|
-webkit-box-align: center;
|
|
675
762
|
align-items: center;
|
|
@@ -713,17 +800,17 @@ function Button2({
|
|
|
713
800
|
var import_react4 = require("react");
|
|
714
801
|
|
|
715
802
|
// src/components/Alert/styles.ts
|
|
716
|
-
var
|
|
717
|
-
var fadeIn =
|
|
803
|
+
var import_styled_components5 = __toESM(require("styled-components"), 1);
|
|
804
|
+
var fadeIn = import_styled_components5.keyframes`
|
|
718
805
|
from { opacity: 0; transform: translateY(-10px); }
|
|
719
806
|
to { opacity: 1; transform: translateY(0); }
|
|
720
807
|
`;
|
|
721
|
-
var fadeOut =
|
|
808
|
+
var fadeOut = import_styled_components5.keyframes`
|
|
722
809
|
from { opacity: 1; transform: translateY(0); }
|
|
723
810
|
to { opacity: 0; transform: translateY(-10px); }
|
|
724
811
|
`;
|
|
725
812
|
var typeStyles = {
|
|
726
|
-
error:
|
|
813
|
+
error: import_styled_components5.css`
|
|
727
814
|
background-color: ${theme.colors.red};
|
|
728
815
|
border: 1px solid ${theme.colors.red};
|
|
729
816
|
color: ${theme.colors.white};
|
|
@@ -731,7 +818,7 @@ var typeStyles = {
|
|
|
731
818
|
color: ${theme.colors.white};
|
|
732
819
|
}
|
|
733
820
|
`,
|
|
734
|
-
warning:
|
|
821
|
+
warning: import_styled_components5.css`
|
|
735
822
|
background-color: ${theme.colors.yellow500};
|
|
736
823
|
border: 1px solid ${theme.colors.yellow400};
|
|
737
824
|
color: ${theme.colors.black};
|
|
@@ -739,7 +826,7 @@ var typeStyles = {
|
|
|
739
826
|
color: ${theme.colors.black};
|
|
740
827
|
}
|
|
741
828
|
`,
|
|
742
|
-
info:
|
|
829
|
+
info: import_styled_components5.css`
|
|
743
830
|
background-color: ${theme.colors.blue};
|
|
744
831
|
border: 1px solid ${theme.colors.blue};
|
|
745
832
|
color: ${theme.colors.white};
|
|
@@ -747,7 +834,7 @@ var typeStyles = {
|
|
|
747
834
|
color: ${theme.colors.white};
|
|
748
835
|
}
|
|
749
836
|
`,
|
|
750
|
-
success:
|
|
837
|
+
success: import_styled_components5.css`
|
|
751
838
|
background-color: ${theme.colors.green};
|
|
752
839
|
border: 1px solid ${theme.colors.green2};
|
|
753
840
|
color: ${theme.colors.white};
|
|
@@ -756,7 +843,7 @@ var typeStyles = {
|
|
|
756
843
|
}
|
|
757
844
|
`
|
|
758
845
|
};
|
|
759
|
-
var AlertContainer =
|
|
846
|
+
var AlertContainer = import_styled_components5.default.div`
|
|
760
847
|
position: fixed;
|
|
761
848
|
width: 500px;
|
|
762
849
|
top: 15px;
|
|
@@ -776,7 +863,7 @@ var AlertContainer = import_styled_components4.default.div`
|
|
|
776
863
|
|
|
777
864
|
${({ $type }) => typeStyles[$type]}
|
|
778
865
|
`;
|
|
779
|
-
var DismissButton =
|
|
866
|
+
var DismissButton = import_styled_components5.default.button`
|
|
780
867
|
position: absolute;
|
|
781
868
|
background: transparent;
|
|
782
869
|
right: 10px;
|
|
@@ -841,14 +928,181 @@ var Alert = ({
|
|
|
841
928
|
);
|
|
842
929
|
};
|
|
843
930
|
|
|
844
|
-
// src/components/
|
|
931
|
+
// src/components/Modal/index.tsx
|
|
845
932
|
var import_react5 = require("react");
|
|
933
|
+
var import_hi2 = require("react-icons/hi");
|
|
934
|
+
|
|
935
|
+
// src/components/Modal/styles.ts
|
|
936
|
+
var import_styled_components6 = __toESM(require("styled-components"), 1);
|
|
937
|
+
var fadeIn2 = import_styled_components6.keyframes`
|
|
938
|
+
from { opacity: 0; }
|
|
939
|
+
to { opacity: 1; }
|
|
940
|
+
`;
|
|
941
|
+
var slideIn = import_styled_components6.keyframes`
|
|
942
|
+
from { opacity: 0; transform: translateY(-20px) scale(0.96); }
|
|
943
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
944
|
+
`;
|
|
945
|
+
var Overlay = import_styled_components6.default.div`
|
|
946
|
+
position: fixed;
|
|
947
|
+
inset: 0;
|
|
948
|
+
background: rgba(0, 0, 0, 0.55);
|
|
949
|
+
display: flex;
|
|
950
|
+
align-items: center;
|
|
951
|
+
justify-content: center;
|
|
952
|
+
z-index: 9999;
|
|
953
|
+
padding: 1rem;
|
|
954
|
+
animation: ${fadeIn2} 0.18s ease-out;
|
|
955
|
+
`;
|
|
956
|
+
var accentStyles = {
|
|
957
|
+
success: import_styled_components6.css`
|
|
958
|
+
color: ${theme.colors.green2};
|
|
959
|
+
`,
|
|
960
|
+
error: import_styled_components6.css`
|
|
961
|
+
color: ${theme.colors.red};
|
|
962
|
+
`
|
|
963
|
+
};
|
|
964
|
+
var Container = import_styled_components6.default.div`
|
|
965
|
+
position: relative;
|
|
966
|
+
background: ${theme.colors.white};
|
|
967
|
+
border-radius: 0.75rem;
|
|
968
|
+
box-shadow: ${theme.shadows.shadow500};
|
|
969
|
+
max-width: 420px;
|
|
970
|
+
width: 100%;
|
|
971
|
+
padding: 1.75rem 1.5rem 1.25rem;
|
|
972
|
+
font-family: ${theme.fonts.primary};
|
|
973
|
+
animation: ${slideIn} 0.22s ease-out;
|
|
974
|
+
|
|
975
|
+
&::before {
|
|
976
|
+
content: "";
|
|
977
|
+
display: block;
|
|
978
|
+
width: 56px;
|
|
979
|
+
height: 4px;
|
|
980
|
+
border-radius: 999px;
|
|
981
|
+
margin: 0 auto 1rem;
|
|
982
|
+
background: ${({ $type }) => $type === "success" ? theme.colors.green2 : theme.colors.red};
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
h2 {
|
|
986
|
+
margin: 0 0 0.5rem;
|
|
987
|
+
font-size: 1.25rem;
|
|
988
|
+
font-weight: 700;
|
|
989
|
+
text-align: center;
|
|
990
|
+
${({ $type }) => accentStyles[$type]}
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
p {
|
|
994
|
+
margin: 0 0 1.5rem;
|
|
995
|
+
font-size: 0.95rem;
|
|
996
|
+
line-height: 1.45;
|
|
997
|
+
text-align: center;
|
|
998
|
+
color: ${theme.colors.black};
|
|
999
|
+
}
|
|
1000
|
+
`;
|
|
1001
|
+
var CloseButton = import_styled_components6.default.button`
|
|
1002
|
+
position: absolute;
|
|
1003
|
+
top: 0.5rem;
|
|
1004
|
+
right: 0.5rem;
|
|
1005
|
+
background: transparent;
|
|
1006
|
+
border: none;
|
|
1007
|
+
cursor: pointer;
|
|
1008
|
+
color: ${theme.colors.gray550};
|
|
1009
|
+
padding: 0.25rem;
|
|
1010
|
+
display: inline-flex;
|
|
1011
|
+
align-items: center;
|
|
1012
|
+
justify-content: center;
|
|
1013
|
+
border-radius: 999px;
|
|
1014
|
+
transition: background 0.15s, color 0.15s;
|
|
1015
|
+
|
|
1016
|
+
&:hover {
|
|
1017
|
+
background: ${theme.colors.gray300};
|
|
1018
|
+
color: ${theme.colors.black};
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
svg {
|
|
1022
|
+
width: 1.1rem;
|
|
1023
|
+
height: 1.1rem;
|
|
1024
|
+
}
|
|
1025
|
+
`;
|
|
1026
|
+
var PrimaryButton = import_styled_components6.default.button`
|
|
1027
|
+
display: block;
|
|
1028
|
+
width: 100%;
|
|
1029
|
+
padding: 0.75rem 1rem;
|
|
1030
|
+
border: none;
|
|
1031
|
+
border-radius: 0.5rem;
|
|
1032
|
+
background: ${({ $bgColor }) => $bgColor || theme.colors.yellow500};
|
|
1033
|
+
color: ${({ $textColor }) => $textColor || theme.colors.black};
|
|
1034
|
+
font-family: ${theme.fonts.primary};
|
|
1035
|
+
font-size: 1rem;
|
|
1036
|
+
font-weight: 700;
|
|
1037
|
+
cursor: pointer;
|
|
1038
|
+
transition: filter 0.15s;
|
|
1039
|
+
|
|
1040
|
+
&:hover {
|
|
1041
|
+
filter: brightness(0.95);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
&:focus-visible {
|
|
1045
|
+
outline: 2px solid ${theme.colors.yellow400};
|
|
1046
|
+
outline-offset: 2px;
|
|
1047
|
+
}
|
|
1048
|
+
`;
|
|
1049
|
+
|
|
1050
|
+
// src/components/Modal/index.tsx
|
|
1051
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1052
|
+
var Modal = ({
|
|
1053
|
+
type,
|
|
1054
|
+
title,
|
|
1055
|
+
message,
|
|
1056
|
+
primaryButtonText,
|
|
1057
|
+
onPrimaryAction,
|
|
1058
|
+
onClose,
|
|
1059
|
+
primaryButtonBgColor,
|
|
1060
|
+
primaryButtonTextColor
|
|
1061
|
+
}) => {
|
|
1062
|
+
const primaryButtonRef = (0, import_react5.useRef)(null);
|
|
1063
|
+
(0, import_react5.useEffect)(() => {
|
|
1064
|
+
primaryButtonRef.current?.focus();
|
|
1065
|
+
}, []);
|
|
1066
|
+
(0, import_react5.useEffect)(() => {
|
|
1067
|
+
const handleKey = (event) => {
|
|
1068
|
+
if (event.key === "Escape") {
|
|
1069
|
+
onClose();
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
document.addEventListener("keydown", handleKey);
|
|
1073
|
+
return () => document.removeEventListener("keydown", handleKey);
|
|
1074
|
+
}, [onClose]);
|
|
1075
|
+
const handleOverlayClick = (event) => {
|
|
1076
|
+
if (event.target === event.currentTarget) {
|
|
1077
|
+
onClose();
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Overlay, { onClick: handleOverlayClick, role: "dialog", "aria-modal": "true", "aria-label": title, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Container, { $type: type, children: [
|
|
1081
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CloseButton, { onClick: onClose, "aria-label": "Fechar", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_hi2.HiX, {}) }),
|
|
1082
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { children: title }),
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: message }),
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1085
|
+
PrimaryButton,
|
|
1086
|
+
{
|
|
1087
|
+
ref: primaryButtonRef,
|
|
1088
|
+
onClick: onPrimaryAction,
|
|
1089
|
+
$bgColor: primaryButtonBgColor,
|
|
1090
|
+
$textColor: primaryButtonTextColor,
|
|
1091
|
+
type: "button",
|
|
1092
|
+
children: primaryButtonText
|
|
1093
|
+
}
|
|
1094
|
+
)
|
|
1095
|
+
] }) });
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
// src/components/PhoneInput/index.tsx
|
|
1099
|
+
var import_react6 = require("react");
|
|
846
1100
|
|
|
847
1101
|
// src/components/PhoneInput/styles.ts
|
|
848
|
-
var
|
|
1102
|
+
var import_styled_components7 = __toESM(require("styled-components"), 1);
|
|
849
1103
|
var import_react_international_phone = require("react-international-phone");
|
|
850
1104
|
var import_style = require("react-international-phone/style.css");
|
|
851
|
-
var
|
|
1105
|
+
var FormLabel3 = import_styled_components7.default.label`
|
|
852
1106
|
font-family: ${theme.fonts.primary};
|
|
853
1107
|
font-style: normal;
|
|
854
1108
|
font-weight: 500;
|
|
@@ -858,7 +1112,7 @@ var FormLabel2 = import_styled_components5.default.label`
|
|
|
858
1112
|
margin-bottom: 0.5rem;
|
|
859
1113
|
text-align: left;
|
|
860
1114
|
`;
|
|
861
|
-
var StyledPhoneInput = (0,
|
|
1115
|
+
var StyledPhoneInput = (0, import_styled_components7.default)(import_react_international_phone.PhoneInput)`
|
|
862
1116
|
width: 100%;
|
|
863
1117
|
height: 3.125rem;
|
|
864
1118
|
background: ${(props) => props.$backgroundColor || theme.colors.white};
|
|
@@ -972,24 +1226,24 @@ var StyledPhoneInput = (0, import_styled_components5.default)(import_react_inter
|
|
|
972
1226
|
}
|
|
973
1227
|
}
|
|
974
1228
|
`;
|
|
975
|
-
var
|
|
1229
|
+
var FormErrorMessage3 = import_styled_components7.default.small`
|
|
976
1230
|
font-size: 0.75rem;
|
|
977
1231
|
line-height: 1.125rem;
|
|
978
1232
|
color: ${theme.colors.red};
|
|
979
1233
|
margin-top: 0.25rem;
|
|
980
1234
|
display: block;
|
|
981
1235
|
`;
|
|
982
|
-
var
|
|
1236
|
+
var FormControl3 = import_styled_components7.default.div.withConfig({
|
|
983
1237
|
shouldForwardProp: (prop) => !["isInvalid"].includes(prop)
|
|
984
1238
|
})`
|
|
985
|
-
${
|
|
986
|
-
${(props) => props.isInvalid &&
|
|
1239
|
+
${FormLabel3} {
|
|
1240
|
+
${(props) => props.isInvalid && import_styled_components7.css`
|
|
987
1241
|
color: ${theme.colors.red};
|
|
988
1242
|
`};
|
|
989
1243
|
}
|
|
990
1244
|
|
|
991
1245
|
${StyledPhoneInput} {
|
|
992
|
-
${(props) => props.isInvalid &&
|
|
1246
|
+
${(props) => props.isInvalid && import_styled_components7.css`
|
|
993
1247
|
border: 1px solid ${theme.colors.red};
|
|
994
1248
|
|
|
995
1249
|
&:not(:focus)::placeholder {
|
|
@@ -999,7 +1253,7 @@ var FormControl2 = import_styled_components5.default.div.withConfig({
|
|
|
999
1253
|
`};
|
|
1000
1254
|
|
|
1001
1255
|
.react-international-phone-input-container {
|
|
1002
|
-
${(props) => props.isInvalid &&
|
|
1256
|
+
${(props) => props.isInvalid && import_styled_components7.css`
|
|
1003
1257
|
border: 1px solid ${theme.colors.red};
|
|
1004
1258
|
|
|
1005
1259
|
&:not(:focus)::placeholder {
|
|
@@ -1010,7 +1264,7 @@ var FormControl2 = import_styled_components5.default.div.withConfig({
|
|
|
1010
1264
|
}
|
|
1011
1265
|
|
|
1012
1266
|
.react-international-phone-country-selector-button {
|
|
1013
|
-
${(props) => props.isInvalid &&
|
|
1267
|
+
${(props) => props.isInvalid && import_styled_components7.css`
|
|
1014
1268
|
border-right: 1px solid ${theme.colors.red};
|
|
1015
1269
|
`};
|
|
1016
1270
|
}
|
|
@@ -1018,7 +1272,7 @@ var FormControl2 = import_styled_components5.default.div.withConfig({
|
|
|
1018
1272
|
`;
|
|
1019
1273
|
|
|
1020
1274
|
// src/components/PhoneInput/index.tsx
|
|
1021
|
-
var
|
|
1275
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1022
1276
|
var PhoneInputBase = ({
|
|
1023
1277
|
id,
|
|
1024
1278
|
label,
|
|
@@ -1033,9 +1287,9 @@ var PhoneInputBase = ({
|
|
|
1033
1287
|
value,
|
|
1034
1288
|
...rest
|
|
1035
1289
|
}, ref) => {
|
|
1036
|
-
return /* @__PURE__ */ (0,
|
|
1037
|
-
!!label && /* @__PURE__ */ (0,
|
|
1038
|
-
/* @__PURE__ */ (0,
|
|
1290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(FormControl3, { isInvalid: !!error, children: [
|
|
1291
|
+
!!label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FormLabel3, { htmlFor: id, $textColor: labelTextColor, children: label }),
|
|
1292
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1039
1293
|
StyledPhoneInput,
|
|
1040
1294
|
{
|
|
1041
1295
|
ref,
|
|
@@ -1069,102 +1323,14 @@ var PhoneInputBase = ({
|
|
|
1069
1323
|
$textColor: inputTextColor
|
|
1070
1324
|
}
|
|
1071
1325
|
),
|
|
1072
|
-
!!error && showErrorMessage && /* @__PURE__ */ (0,
|
|
1326
|
+
!!error && showErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FormErrorMessage3, { "data-testid": "error-message", children: typeof error === "string" ? error : error?.message })
|
|
1073
1327
|
] });
|
|
1074
1328
|
};
|
|
1075
|
-
var PhoneInput2 = (0,
|
|
1329
|
+
var PhoneInput2 = (0, import_react6.forwardRef)(PhoneInputBase);
|
|
1076
1330
|
|
|
1077
1331
|
// src/components/ProductSelect/index.tsx
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1080
|
-
// src/components/ProductSelect/styles.ts
|
|
1081
|
-
var import_styled_components6 = __toESM(require("styled-components"), 1);
|
|
1082
|
-
var FormLabel3 = import_styled_components6.default.label`
|
|
1083
|
-
font-family: ${theme.fonts.primary};
|
|
1084
|
-
font-style: normal;
|
|
1085
|
-
font-weight: 500;
|
|
1086
|
-
font-size: 1rem;
|
|
1087
|
-
color: ${(props) => props.$textColor || theme.colors.black};
|
|
1088
|
-
display: block;
|
|
1089
|
-
margin-bottom: 0.5rem;
|
|
1090
|
-
text-align: left;
|
|
1091
|
-
`;
|
|
1092
|
-
var Select = import_styled_components6.default.select`
|
|
1093
|
-
font-family: ${theme.fonts.primary};
|
|
1094
|
-
font-style: normal;
|
|
1095
|
-
font-weight: 500;
|
|
1096
|
-
font-size: 1rem;
|
|
1097
|
-
line-height: 1.5rem;
|
|
1098
|
-
background: ${(props) => props.$backgroundColor || theme.colors.white};
|
|
1099
|
-
color: ${(props) => props.$textColor || theme.colors.black};
|
|
1100
|
-
padding: 0.5rem 3rem 0.5rem 0.5rem; /* Aumentado padding-right para 3rem */
|
|
1101
|
-
border-radius: 0.125rem;
|
|
1102
|
-
border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};
|
|
1103
|
-
display: block;
|
|
1104
|
-
height: 3.125rem;
|
|
1105
|
-
width: 100%;
|
|
1106
|
-
cursor: pointer;
|
|
1107
|
-
|
|
1108
|
-
/* Remover a seta padrão do navegador */
|
|
1109
|
-
-webkit-appearance: none;
|
|
1110
|
-
-moz-appearance: none;
|
|
1111
|
-
appearance: none;
|
|
1112
|
-
|
|
1113
|
-
/* Adicionar seta personalizada maior */
|
|
1114
|
-
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
|
|
1115
|
-
background-repeat: no-repeat;
|
|
1116
|
-
background-position: right 1rem center; /* Posicionado a 1rem da direita */
|
|
1117
|
-
background-size: 1.25rem; /* Tamanho da seta aumentado para 1.25rem */
|
|
1118
|
-
|
|
1119
|
-
&:focus {
|
|
1120
|
-
border-radius: 0.125rem;
|
|
1121
|
-
border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};
|
|
1122
|
-
outline: none;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
/* Estilo para option disabled (placeholder) */
|
|
1126
|
-
option:disabled {
|
|
1127
|
-
color: ${theme.colors.gray100};
|
|
1128
|
-
font-weight: 800;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
/* Estilo para options normais */
|
|
1132
|
-
option:not(:disabled) {
|
|
1133
|
-
color: ${(props) => props.$textColor || theme.colors.black};
|
|
1134
|
-
font-weight: 500;
|
|
1135
|
-
}
|
|
1136
|
-
`;
|
|
1137
|
-
var FormErrorMessage3 = import_styled_components6.default.small`
|
|
1138
|
-
font-size: 0.75rem;
|
|
1139
|
-
line-height: 1.125rem;
|
|
1140
|
-
color: ${theme.colors.red};
|
|
1141
|
-
margin-top: 0.25rem;
|
|
1142
|
-
display: block;
|
|
1143
|
-
`;
|
|
1144
|
-
var FormControl3 = import_styled_components6.default.div.withConfig({
|
|
1145
|
-
shouldForwardProp: (prop) => !["isInvalid"].includes(prop)
|
|
1146
|
-
})`
|
|
1147
|
-
${FormLabel3} {
|
|
1148
|
-
${(props) => props.isInvalid && import_styled_components6.css`
|
|
1149
|
-
color: ${theme.colors.red};
|
|
1150
|
-
`};
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
${Select} {
|
|
1154
|
-
${(props) => props.isInvalid && import_styled_components6.css`
|
|
1155
|
-
border: 1px solid ${theme.colors.red};
|
|
1156
|
-
`};
|
|
1157
|
-
|
|
1158
|
-
&:focus {
|
|
1159
|
-
${(props) => props.isInvalid && import_styled_components6.css`
|
|
1160
|
-
border: 1px solid ${theme.colors.red};
|
|
1161
|
-
`};
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
`;
|
|
1165
|
-
|
|
1166
|
-
// src/components/ProductSelect/index.tsx
|
|
1167
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1332
|
+
var import_react7 = require("react");
|
|
1333
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1168
1334
|
var ProductSelectBase = ({
|
|
1169
1335
|
id,
|
|
1170
1336
|
label,
|
|
@@ -1179,9 +1345,9 @@ var ProductSelectBase = ({
|
|
|
1179
1345
|
placeholder = "Selecione um produto",
|
|
1180
1346
|
...rest
|
|
1181
1347
|
}, ref) => {
|
|
1182
|
-
return /* @__PURE__ */ (0,
|
|
1183
|
-
!!label && /* @__PURE__ */ (0,
|
|
1184
|
-
/* @__PURE__ */ (0,
|
|
1348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(FormControl, { isInvalid: !!error, children: [
|
|
1349
|
+
!!label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormLabel, { htmlFor: id, $textColor: labelTextColor, children: label }),
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1185
1351
|
Select,
|
|
1186
1352
|
{
|
|
1187
1353
|
id,
|
|
@@ -1193,19 +1359,78 @@ var ProductSelectBase = ({
|
|
|
1193
1359
|
$textColor: textColor,
|
|
1194
1360
|
...rest,
|
|
1195
1361
|
children: [
|
|
1196
|
-
/* @__PURE__ */ (0,
|
|
1197
|
-
products.map((product) => /* @__PURE__ */ (0,
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "", disabled: true, children: placeholder }),
|
|
1363
|
+
products.map((product) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: product.id, children: product.name }, product.id))
|
|
1198
1364
|
]
|
|
1199
1365
|
}
|
|
1200
1366
|
),
|
|
1201
|
-
!!error && showErrorMessage && /* @__PURE__ */ (0,
|
|
1367
|
+
!!error && showErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormErrorMessage, { "data-testid": "error-message", children: typeof error === "string" ? error : error.message })
|
|
1202
1368
|
] });
|
|
1203
1369
|
};
|
|
1204
|
-
var ProductSelect = (0,
|
|
1370
|
+
var ProductSelect = (0, import_react7.forwardRef)(ProductSelectBase);
|
|
1371
|
+
|
|
1372
|
+
// src/config/environments.ts
|
|
1373
|
+
var ENVIRONMENTS = {
|
|
1374
|
+
homol: {
|
|
1375
|
+
apiUrl: "https://leads-hml.mitrerealty.com.br/api-leads",
|
|
1376
|
+
apiToken: "TEFORElOR19NSVRSRTptZlFXZnhvUHdNbWVZY0FidkF0QWJ3Q2RFYWtKckJBOXg5cGNsOTBvS1V0N2ZsU0d4TEtNdEZZd3k0NFlEc0c3",
|
|
1377
|
+
whatsappPhone: "551148100601",
|
|
1378
|
+
chatUrl: "https://crm-hml.mitrerealty.com.br/wcc/UserLoginSubmit.do"
|
|
1379
|
+
},
|
|
1380
|
+
prod: {
|
|
1381
|
+
apiUrl: "https://leads.mitrerealty.com.br/api-leads",
|
|
1382
|
+
apiToken: "TEFORElOR19NSVRSRTptZlFXZnhvUHdNbWVZY0FidkF0QWJ3Q2RFYWtKckJBOXg5cGNsOTBvS1V0N2ZsU0d4TEtNdEZZd3k0NFlEc0c3",
|
|
1383
|
+
whatsappPhone: "551148100601",
|
|
1384
|
+
chatUrl: "https://crm.mitrerealty.com.br/wcc/UserLoginSubmit.do"
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
var resolveEnvironment = (ambiente = "homol") => {
|
|
1388
|
+
return ENVIRONMENTS[ambiente] ?? null;
|
|
1389
|
+
};
|
|
1205
1390
|
|
|
1206
1391
|
// src/components/Form/index.tsx
|
|
1207
|
-
var
|
|
1392
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1208
1393
|
var phoneUtil = import_google_libphonenumber.PhoneNumberUtil.getInstance();
|
|
1394
|
+
var PreferenciaContato = /* @__PURE__ */ ((PreferenciaContato2) => {
|
|
1395
|
+
PreferenciaContato2["Whatsapp"] = "Whatsapp";
|
|
1396
|
+
PreferenciaContato2["Email"] = "Email";
|
|
1397
|
+
PreferenciaContato2["Ligacao"] = "Liga\xE7\xE3o";
|
|
1398
|
+
return PreferenciaContato2;
|
|
1399
|
+
})(PreferenciaContato || {});
|
|
1400
|
+
var WHATSAPP_MESSAGE = "Ol\xE1! Tenho interesse e gostaria de mais informa\xE7\xF5es.";
|
|
1401
|
+
var WHATSAPP_TITLE = "Fale com um corretor por WhatsApp";
|
|
1402
|
+
var WHATSAPP_SUBTITLE = "Informe seus dados para contato.";
|
|
1403
|
+
var WHATSAPP_BUTTON_TEXT = "Entrar";
|
|
1404
|
+
var CHAT_TITLE = "Fale com um corretor por chat";
|
|
1405
|
+
var CHAT_SUBTITLE = "Informe seus dados para contato.";
|
|
1406
|
+
var CHAT_BUTTON_TEXT = "Entrar";
|
|
1407
|
+
var MODAL_ERROR_TITLE = "N\xE3o foi poss\xEDvel completar seu contato";
|
|
1408
|
+
var MODAL_ERROR_MESSAGE = "Por favor, tente novamente em alguns instantes.";
|
|
1409
|
+
var MODAL_ERROR_BUTTON_TEXT = "OK";
|
|
1410
|
+
var MODAL_SUCCESS_TITLE = "Cadastro realizado!";
|
|
1411
|
+
var MODAL_SUCCESS_MESSAGE_WHATSAPP = "Clique abaixo para continuar pelo WhatsApp.";
|
|
1412
|
+
var MODAL_SUCCESS_BUTTON_WHATSAPP = "Abrir WhatsApp";
|
|
1413
|
+
var MODAL_SUCCESS_MESSAGE_CHAT = "Clique abaixo para iniciar o atendimento.";
|
|
1414
|
+
var MODAL_SUCCESS_BUTTON_CHAT = "Iniciar atendimento";
|
|
1415
|
+
function buildWhatsappUrl(phone) {
|
|
1416
|
+
const digits = phone.replace(/\D/g, "");
|
|
1417
|
+
const text = encodeURIComponent(WHATSAPP_MESSAGE);
|
|
1418
|
+
return `https://api.whatsapp.com/send?phone=${digits}&text=${text}`;
|
|
1419
|
+
}
|
|
1420
|
+
function submitChatInNewTab(chatUrl, virtualObj) {
|
|
1421
|
+
const form = document.createElement("form");
|
|
1422
|
+
form.method = "POST";
|
|
1423
|
+
form.action = chatUrl;
|
|
1424
|
+
form.target = "_blank";
|
|
1425
|
+
const input = document.createElement("input");
|
|
1426
|
+
input.type = "hidden";
|
|
1427
|
+
input.name = "virtual_obj";
|
|
1428
|
+
input.value = JSON.stringify(virtualObj);
|
|
1429
|
+
form.appendChild(input);
|
|
1430
|
+
document.body.appendChild(form);
|
|
1431
|
+
form.submit();
|
|
1432
|
+
document.body.removeChild(form);
|
|
1433
|
+
}
|
|
1209
1434
|
var isPhoneValid = (phone) => {
|
|
1210
1435
|
try {
|
|
1211
1436
|
return phoneUtil.isValidNumber(phoneUtil.parseAndKeepRawInput(phone));
|
|
@@ -1235,10 +1460,10 @@ var schemaWithProduct = yup.object().shape({
|
|
|
1235
1460
|
productId: yup.string().required("Produto \xE9 obrigat\xF3rio")
|
|
1236
1461
|
});
|
|
1237
1462
|
var schema = yup.object().shape(baseSchema);
|
|
1238
|
-
var MitreFormComponent =
|
|
1463
|
+
var MitreFormComponent = import_react8.default.forwardRef(({
|
|
1239
1464
|
products,
|
|
1240
|
-
|
|
1241
|
-
|
|
1465
|
+
ambiente = "homol",
|
|
1466
|
+
canal = "form",
|
|
1242
1467
|
showHeader = true,
|
|
1243
1468
|
title = "Atendimento por mensagem",
|
|
1244
1469
|
subtitle = "Informe seus dados e retornaremos a mensagem.",
|
|
@@ -1252,15 +1477,18 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1252
1477
|
inputFocusBorderColor = theme.colors.yellow500,
|
|
1253
1478
|
inputPlaceholderColor = theme.colors.gray100,
|
|
1254
1479
|
inputTextColor = theme.colors.black,
|
|
1255
|
-
|
|
1256
|
-
|
|
1480
|
+
showPreferenciaContato = false,
|
|
1481
|
+
idProdutoTerceiro,
|
|
1482
|
+
idEmpreendimento,
|
|
1483
|
+
naoCriarEvento
|
|
1257
1484
|
}, ref) => {
|
|
1258
1485
|
useMontserratFont();
|
|
1259
|
-
const [loading, setIsLoading] = (0,
|
|
1486
|
+
const [loading, setIsLoading] = (0, import_react8.useState)(false);
|
|
1260
1487
|
const { error, handleError, clearError } = useError();
|
|
1261
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
1262
|
-
const [formKey, setFormKey] = (0,
|
|
1263
|
-
const [selectedProductId, setSelectedProductId] = (0,
|
|
1488
|
+
const [successMessage, setSuccessMessage] = (0, import_react8.useState)("");
|
|
1489
|
+
const [formKey, setFormKey] = (0, import_react8.useState)(0);
|
|
1490
|
+
const [selectedProductId, setSelectedProductId] = (0, import_react8.useState)(null);
|
|
1491
|
+
const [actionModal, setActionModal] = (0, import_react8.useState)(null);
|
|
1264
1492
|
const validateProducts = () => {
|
|
1265
1493
|
if (!products) {
|
|
1266
1494
|
return "Lista de produtos n\xE3o foi fornecida";
|
|
@@ -1285,14 +1513,60 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1285
1513
|
}
|
|
1286
1514
|
return null;
|
|
1287
1515
|
};
|
|
1516
|
+
const env = resolveEnvironment(ambiente);
|
|
1517
|
+
const validateAmbienteConfig = () => {
|
|
1518
|
+
if (!env) {
|
|
1519
|
+
return `ambiente='${ambiente}' n\xE3o \xE9 reconhecido. Use 'homol' ou 'prod'.`;
|
|
1520
|
+
}
|
|
1521
|
+
if (!env.apiUrl || !env.apiToken) {
|
|
1522
|
+
return `Configura\xE7\xE3o interna do ambiente '${ambiente}' est\xE1 incompleta (apiUrl/apiToken).`;
|
|
1523
|
+
}
|
|
1524
|
+
return null;
|
|
1525
|
+
};
|
|
1526
|
+
const validateWhatsappConfig = () => {
|
|
1527
|
+
if (canal !== "whatsapp") return null;
|
|
1528
|
+
if (!env) return null;
|
|
1529
|
+
const raw = env.whatsappPhone?.trim() ?? "";
|
|
1530
|
+
if (!raw) {
|
|
1531
|
+
return `canal='whatsapp' exige whatsappPhone no ambiente '${ambiente}'.`;
|
|
1532
|
+
}
|
|
1533
|
+
const normalized = raw.startsWith("+") ? raw : `+${raw}`;
|
|
1534
|
+
if (!isPhoneValid(normalized)) {
|
|
1535
|
+
return `whatsappPhone do ambiente '${ambiente}' \xE9 inv\xE1lido (${JSON.stringify(env.whatsappPhone)}).`;
|
|
1536
|
+
}
|
|
1537
|
+
return null;
|
|
1538
|
+
};
|
|
1539
|
+
const validateChatConfig = () => {
|
|
1540
|
+
if (canal !== "chat") return null;
|
|
1541
|
+
if (!env) return null;
|
|
1542
|
+
const raw = env.chatUrl?.trim() ?? "";
|
|
1543
|
+
if (!raw) {
|
|
1544
|
+
return `canal='chat' exige chatUrl no ambiente '${ambiente}'.`;
|
|
1545
|
+
}
|
|
1546
|
+
try {
|
|
1547
|
+
const parsed = new URL(raw);
|
|
1548
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
1549
|
+
return `chatUrl do ambiente '${ambiente}' precisa ter protocolo http(s) (recebido: ${JSON.stringify(env.chatUrl)}).`;
|
|
1550
|
+
}
|
|
1551
|
+
} catch {
|
|
1552
|
+
return `chatUrl do ambiente '${ambiente}' n\xE3o \xE9 URL absoluta v\xE1lida (recebido: ${JSON.stringify(env.chatUrl)}).`;
|
|
1553
|
+
}
|
|
1554
|
+
return null;
|
|
1555
|
+
};
|
|
1288
1556
|
const productsValidationError = validateProducts();
|
|
1289
|
-
const
|
|
1557
|
+
const ambienteConfigError = validateAmbienteConfig();
|
|
1558
|
+
const whatsappConfigError = validateWhatsappConfig();
|
|
1559
|
+
const chatConfigError = validateChatConfig();
|
|
1560
|
+
const effectiveShowPreferenciaContato = canal === "whatsapp" || canal === "chat" ? false : showPreferenciaContato;
|
|
1561
|
+
const effectiveTitle = canal === "whatsapp" ? WHATSAPP_TITLE : canal === "chat" ? CHAT_TITLE : title;
|
|
1562
|
+
const effectiveSubtitle = canal === "whatsapp" ? WHATSAPP_SUBTITLE : canal === "chat" ? CHAT_SUBTITLE : subtitle;
|
|
1563
|
+
const [utm, setUtm] = (0, import_react8.useState)({ utm_source: "direto", createdAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
1290
1564
|
const formSchema = products && products.length > 1 ? schemaWithProduct : schema;
|
|
1291
1565
|
const { control, register, handleSubmit, formState: { errors }, reset, clearErrors } = (0, import_react_hook_form.useForm)({
|
|
1292
1566
|
resolver: (0, import_yup.yupResolver)(formSchema),
|
|
1293
1567
|
mode: "onSubmit"
|
|
1294
1568
|
});
|
|
1295
|
-
|
|
1569
|
+
import_react8.default.useEffect(() => {
|
|
1296
1570
|
if (!isBrowser()) return;
|
|
1297
1571
|
const { data } = resolveUtmWithPriority(/* @__PURE__ */ new Date());
|
|
1298
1572
|
setUtm(data);
|
|
@@ -1320,13 +1594,17 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1320
1594
|
setFormKey((k) => k + 1);
|
|
1321
1595
|
};
|
|
1322
1596
|
const sendMessage = async (data) => {
|
|
1323
|
-
const { name, email, phone, productId } = data;
|
|
1597
|
+
const { name, email, phone, productId, preferencia_contato } = data;
|
|
1324
1598
|
const phoneValue = phone.inputValue;
|
|
1325
1599
|
const phoneDigitsOnly = phoneValue?.replace(/\D/g, "") || "";
|
|
1326
1600
|
const message = "Gostaria de mais informa\xE7\xF5es sobre o produto";
|
|
1601
|
+
setActionModal(null);
|
|
1327
1602
|
try {
|
|
1328
1603
|
setIsLoading(true);
|
|
1329
|
-
if (!
|
|
1604
|
+
if (!env) {
|
|
1605
|
+
throw new Error("Ambiente n\xE3o resolvido");
|
|
1606
|
+
}
|
|
1607
|
+
if (!products || products.length === 0) {
|
|
1330
1608
|
throw new Error("Par\xE2metros obrigat\xF3rios n\xE3o informados");
|
|
1331
1609
|
}
|
|
1332
1610
|
let selectedProduct;
|
|
@@ -1342,6 +1620,8 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1342
1620
|
}
|
|
1343
1621
|
selectedProduct = foundProduct;
|
|
1344
1622
|
}
|
|
1623
|
+
const paginaAtual = typeof window !== "undefined" ? window.location.href : void 0;
|
|
1624
|
+
const naoCriarEventoEfetivo = canal !== "form" && (naoCriarEvento ?? true);
|
|
1345
1625
|
const requestBody = {
|
|
1346
1626
|
name,
|
|
1347
1627
|
email,
|
|
@@ -1351,13 +1631,24 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1351
1631
|
utm_source: utm.utm_source,
|
|
1352
1632
|
utm_campaign: utm.utm_campaign,
|
|
1353
1633
|
utm_medium: utm.utm_medium,
|
|
1354
|
-
utm_term: utm.utm_term
|
|
1634
|
+
utm_term: utm.utm_term,
|
|
1635
|
+
...canal === "whatsapp" ? { preferencia_contato: "Whatsapp" /* Whatsapp */ } : effectiveShowPreferenciaContato && preferencia_contato ? { preferencia_contato } : {},
|
|
1636
|
+
...canal !== "form" ? {
|
|
1637
|
+
canal,
|
|
1638
|
+
...paginaAtual ? { pagina: paginaAtual } : {},
|
|
1639
|
+
// Paridade com atendimento.html legado: o mesmo <form id="chat-form">
|
|
1640
|
+
// era usado para chat e whatsapp, portanto is_chat=true ia em ambos.
|
|
1641
|
+
is_chat: true,
|
|
1642
|
+
...idProdutoTerceiro !== void 0 ? { idProdutoTerceiro } : {},
|
|
1643
|
+
...idEmpreendimento !== void 0 ? { idEmpreendimento } : {},
|
|
1644
|
+
...naoCriarEventoEfetivo ? { naoCriarEvento: true } : {}
|
|
1645
|
+
} : {}
|
|
1355
1646
|
};
|
|
1356
|
-
const response = await fetch(`${apiUrl}/leads`, {
|
|
1647
|
+
const response = await fetch(`${env.apiUrl}/leads`, {
|
|
1357
1648
|
method: "POST",
|
|
1358
1649
|
headers: {
|
|
1359
1650
|
"Content-Type": "application/json",
|
|
1360
|
-
Authorization: `Basic ${apiToken}`
|
|
1651
|
+
Authorization: `Basic ${env.apiToken}`
|
|
1361
1652
|
},
|
|
1362
1653
|
body: JSON.stringify(requestBody)
|
|
1363
1654
|
});
|
|
@@ -1366,26 +1657,61 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1366
1657
|
}
|
|
1367
1658
|
const responseData = await response.json();
|
|
1368
1659
|
const leadId = responseData.leadId || responseData.id || "";
|
|
1369
|
-
setSuccessMessage("Mensagem enviada com sucesso!");
|
|
1370
1660
|
resetForm();
|
|
1371
|
-
|
|
1661
|
+
if (canal === "whatsapp") {
|
|
1662
|
+
setActionModal({
|
|
1663
|
+
kind: "success",
|
|
1664
|
+
canal: "whatsapp",
|
|
1665
|
+
targetUrl: buildWhatsappUrl(env.whatsappPhone)
|
|
1666
|
+
});
|
|
1667
|
+
} else if (canal === "chat") {
|
|
1668
|
+
const virtualObj = {
|
|
1669
|
+
...requestBody,
|
|
1670
|
+
externalOriginId: leadId,
|
|
1671
|
+
...paginaAtual ? { pagina: paginaAtual } : {},
|
|
1672
|
+
...idProdutoTerceiro !== void 0 ? { idProdutoTerceiro } : {},
|
|
1673
|
+
...idEmpreendimento !== void 0 ? { idEmpreendimento } : {},
|
|
1674
|
+
...naoCriarEventoEfetivo ? { naoCriarEvento: true } : {}
|
|
1675
|
+
};
|
|
1676
|
+
setActionModal({
|
|
1677
|
+
kind: "success",
|
|
1678
|
+
canal: "chat",
|
|
1679
|
+
chatUrl: env.chatUrl,
|
|
1680
|
+
virtualObj
|
|
1681
|
+
});
|
|
1682
|
+
} else {
|
|
1683
|
+
setSuccessMessage("Mensagem enviada com sucesso!");
|
|
1684
|
+
}
|
|
1372
1685
|
} catch (err) {
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1686
|
+
if (canal === "whatsapp" || canal === "chat") {
|
|
1687
|
+
setActionModal({ kind: "error" });
|
|
1688
|
+
} else {
|
|
1689
|
+
handleError(err);
|
|
1690
|
+
}
|
|
1376
1691
|
} finally {
|
|
1377
1692
|
setIsLoading(false);
|
|
1378
1693
|
}
|
|
1379
1694
|
};
|
|
1380
|
-
if (productsValidationError) {
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1695
|
+
if (productsValidationError || ambienteConfigError || whatsappConfigError || chatConfigError) {
|
|
1696
|
+
if (productsValidationError) {
|
|
1697
|
+
console.error("Erro na valida\xE7\xE3o dos produtos:", productsValidationError);
|
|
1698
|
+
}
|
|
1699
|
+
if (ambienteConfigError) {
|
|
1700
|
+
console.error("Erro na valida\xE7\xE3o do ambiente:", ambienteConfigError);
|
|
1701
|
+
}
|
|
1702
|
+
if (whatsappConfigError) {
|
|
1703
|
+
console.error("Erro na valida\xE7\xE3o do canal whatsapp:", whatsappConfigError);
|
|
1704
|
+
}
|
|
1705
|
+
if (chatConfigError) {
|
|
1706
|
+
console.error("Erro na valida\xE7\xE3o do canal chat:", chatConfigError);
|
|
1707
|
+
}
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FormContainer, { $backgroundColor: backgroundColor, $innerPadding: innerPadding, ref, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(HeaderContainer, { children: [
|
|
1709
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Title, { $textColor: textColor, children: "Erro no carregamento do formul\xE1rio!" }),
|
|
1710
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Subtitle, { $textColor: textColor, children: "N\xE3o foi poss\xEDvel carregar o formul\xE1rio. Tente novamente mais tarde." })
|
|
1385
1711
|
] }) });
|
|
1386
1712
|
}
|
|
1387
|
-
return /* @__PURE__ */ (0,
|
|
1388
|
-
error && /* @__PURE__ */ (0,
|
|
1713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1714
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1389
1715
|
Alert,
|
|
1390
1716
|
{
|
|
1391
1717
|
type: "error",
|
|
@@ -1395,7 +1721,7 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1395
1721
|
children: error.message
|
|
1396
1722
|
}
|
|
1397
1723
|
),
|
|
1398
|
-
successMessage && /* @__PURE__ */ (0,
|
|
1724
|
+
successMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1399
1725
|
Alert,
|
|
1400
1726
|
{
|
|
1401
1727
|
type: "success",
|
|
@@ -1405,13 +1731,58 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1405
1731
|
children: successMessage
|
|
1406
1732
|
}
|
|
1407
1733
|
),
|
|
1408
|
-
/* @__PURE__ */ (0,
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1734
|
+
actionModal?.kind === "error" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1735
|
+
Modal,
|
|
1736
|
+
{
|
|
1737
|
+
type: "error",
|
|
1738
|
+
title: MODAL_ERROR_TITLE,
|
|
1739
|
+
message: MODAL_ERROR_MESSAGE,
|
|
1740
|
+
primaryButtonText: MODAL_ERROR_BUTTON_TEXT,
|
|
1741
|
+
onPrimaryAction: () => setActionModal(null),
|
|
1742
|
+
onClose: () => setActionModal(null),
|
|
1743
|
+
primaryButtonBgColor: buttonBackgroundColor,
|
|
1744
|
+
primaryButtonTextColor: buttonTextColor
|
|
1745
|
+
}
|
|
1746
|
+
),
|
|
1747
|
+
actionModal?.kind === "success" && actionModal.canal === "whatsapp" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1748
|
+
Modal,
|
|
1749
|
+
{
|
|
1750
|
+
type: "success",
|
|
1751
|
+
title: MODAL_SUCCESS_TITLE,
|
|
1752
|
+
message: MODAL_SUCCESS_MESSAGE_WHATSAPP,
|
|
1753
|
+
primaryButtonText: MODAL_SUCCESS_BUTTON_WHATSAPP,
|
|
1754
|
+
onPrimaryAction: () => {
|
|
1755
|
+
window.open(actionModal.targetUrl, "_blank", "noopener,noreferrer");
|
|
1756
|
+
setActionModal(null);
|
|
1757
|
+
},
|
|
1758
|
+
onClose: () => setActionModal(null),
|
|
1759
|
+
primaryButtonBgColor: buttonBackgroundColor,
|
|
1760
|
+
primaryButtonTextColor: buttonTextColor
|
|
1761
|
+
}
|
|
1762
|
+
),
|
|
1763
|
+
actionModal?.kind === "success" && actionModal.canal === "chat" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1764
|
+
Modal,
|
|
1765
|
+
{
|
|
1766
|
+
type: "success",
|
|
1767
|
+
title: MODAL_SUCCESS_TITLE,
|
|
1768
|
+
message: MODAL_SUCCESS_MESSAGE_CHAT,
|
|
1769
|
+
primaryButtonText: MODAL_SUCCESS_BUTTON_CHAT,
|
|
1770
|
+
onPrimaryAction: () => {
|
|
1771
|
+
submitChatInNewTab(actionModal.chatUrl, actionModal.virtualObj);
|
|
1772
|
+
setActionModal(null);
|
|
1773
|
+
},
|
|
1774
|
+
onClose: () => setActionModal(null),
|
|
1775
|
+
primaryButtonBgColor: buttonBackgroundColor,
|
|
1776
|
+
primaryButtonTextColor: buttonTextColor
|
|
1777
|
+
}
|
|
1778
|
+
),
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(FormContainer, { $backgroundColor: backgroundColor, $innerPadding: innerPadding, ref, children: [
|
|
1780
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(HeaderContainer, { children: [
|
|
1781
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Title, { $textColor: textColor, children: effectiveTitle }),
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Subtitle, { $textColor: textColor, children: effectiveSubtitle })
|
|
1412
1783
|
] }),
|
|
1413
|
-
/* @__PURE__ */ (0,
|
|
1414
|
-
products.length > 1 && /* @__PURE__ */ (0,
|
|
1784
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Form, { $textColor: textColor, onSubmit: handleSubmit(sendMessage), noValidate: true, children: [
|
|
1785
|
+
products.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1415
1786
|
ProductSelect,
|
|
1416
1787
|
{
|
|
1417
1788
|
id: "productId",
|
|
@@ -1428,7 +1799,7 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1428
1799
|
textColor: inputTextColor
|
|
1429
1800
|
}
|
|
1430
1801
|
),
|
|
1431
|
-
/* @__PURE__ */ (0,
|
|
1802
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1432
1803
|
Input2,
|
|
1433
1804
|
{
|
|
1434
1805
|
id: "name",
|
|
@@ -1446,7 +1817,7 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1446
1817
|
inputTextColor
|
|
1447
1818
|
}
|
|
1448
1819
|
),
|
|
1449
|
-
/* @__PURE__ */ (0,
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1450
1821
|
Input2,
|
|
1451
1822
|
{
|
|
1452
1823
|
id: "email",
|
|
@@ -1465,7 +1836,7 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1465
1836
|
inputTextColor
|
|
1466
1837
|
}
|
|
1467
1838
|
),
|
|
1468
|
-
/* @__PURE__ */ (0,
|
|
1839
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1469
1840
|
import_react_hook_form.Controller,
|
|
1470
1841
|
{
|
|
1471
1842
|
name: "phone",
|
|
@@ -1474,7 +1845,7 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1474
1845
|
shouldUnregister: true,
|
|
1475
1846
|
render: ({ field }) => {
|
|
1476
1847
|
const errorMsg = errors.phone?.inputValue?.message || errors.phone?.phone?.message || errors.phone?.message;
|
|
1477
|
-
return /* @__PURE__ */ (0,
|
|
1848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1478
1849
|
PhoneInput2,
|
|
1479
1850
|
{
|
|
1480
1851
|
id: "phone",
|
|
@@ -1497,12 +1868,32 @@ var MitreFormComponent = import_react7.default.forwardRef(({
|
|
|
1497
1868
|
},
|
|
1498
1869
|
formKey
|
|
1499
1870
|
),
|
|
1500
|
-
/* @__PURE__ */ (0,
|
|
1501
|
-
|
|
1502
|
-
|
|
1871
|
+
effectiveShowPreferenciaContato && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(FormControl, { isInvalid: !!errors.preferencia_contato, children: [
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FormLabel, { htmlFor: "preferencia_contato", $textColor: textColor, children: "Prefer\xEAncia de Contato" }),
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1874
|
+
Select,
|
|
1875
|
+
{
|
|
1876
|
+
id: "preferencia_contato",
|
|
1877
|
+
...register("preferencia_contato"),
|
|
1878
|
+
defaultValue: "",
|
|
1879
|
+
$backgroundColor: inputBackgroundColor,
|
|
1880
|
+
$borderColor: inputBorderColor,
|
|
1881
|
+
$focusBorderColor: inputFocusBorderColor,
|
|
1882
|
+
$textColor: inputTextColor,
|
|
1883
|
+
children: [
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: "", disabled: true, children: "Selecione uma op\xE7\xE3o" }),
|
|
1885
|
+
Object.values(PreferenciaContato).map((op) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("option", { value: op, children: op }, op))
|
|
1886
|
+
]
|
|
1887
|
+
}
|
|
1888
|
+
),
|
|
1889
|
+
errors.preferencia_contato && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FormErrorMessage, { children: errors.preferencia_contato.message })
|
|
1890
|
+
] }),
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h6", { children: "* Campos de preenchimento obrigat\xF3rio." }),
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ButtonContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button2, { bgColor: buttonBackgroundColor, color: buttonTextColor, type: "submit", isSubmitting: loading, children: canal === "whatsapp" ? WHATSAPP_BUTTON_TEXT : canal === "chat" ? CHAT_BUTTON_TEXT : "Enviar mensagem" }) }),
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { children: [
|
|
1503
1894
|
"A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contat\xE1-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa",
|
|
1504
1895
|
" ",
|
|
1505
|
-
/* @__PURE__ */ (0,
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1506
1897
|
"a",
|
|
1507
1898
|
{
|
|
1508
1899
|
href: "https://www.mitrerealty.com.br/politica-de-privacidade",
|
|
@@ -1525,6 +1916,7 @@ MitreFormComponent.displayName = "MitreFormComponent";
|
|
|
1525
1916
|
var Form_default = MitreFormComponent;
|
|
1526
1917
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1527
1918
|
0 && (module.exports = {
|
|
1528
|
-
MitreFormComponent
|
|
1919
|
+
MitreFormComponent,
|
|
1920
|
+
PreferenciaContato
|
|
1529
1921
|
});
|
|
1530
1922
|
//# sourceMappingURL=index.cjs.map
|