@credithub/harlan-components 1.15.0 → 1.16.1
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/lib/cjs/index.js +104 -52
- package/lib/esm/components/chart/chartSystem.js +8 -8
- package/lib/esm/components/common/button.js +2 -2
- package/lib/esm/components/consultaSimplesSection/consultaSimplesSection.js +10 -12
- package/lib/esm/components/contacts/contacts.d.ts +1 -1
- package/lib/esm/components/dossie/companyLogo/companyLogo.js +0 -1
- package/lib/esm/components/dossie/dossie.js +1 -2
- package/lib/esm/components/dossie/summary/cardsAndProducts.d.ts +0 -8
- package/lib/esm/components/dossie/summary/cardsAndProducts.js +1 -1
- package/lib/esm/components/dossie/summary/summary.d.ts +1 -0
- package/lib/esm/components/dossie/summary/summary.js +64 -7
- package/lib/esm/components/dossie/transactionTable/transactionTable.js +3 -3
- package/lib/esm/components/liminar/liminar.js +7 -1
- package/lib/esm/components/partners/partner-rfb-status.js +1 -1
- package/lib/esm/components/processos-juridicos/processosJuridicos.d.ts +1 -1
- package/lib/esm/components/processos-juridicos/processosJuridicosList.d.ts +1 -1
- package/lib/esm/components/processos-juridicos/processosJuridicosList.js +1 -1
- package/lib/esm/components/reclameAqui/reclameAquiCarousel.js +7 -7
- package/lib/esm/components/resultadoDaPesquisa/resultado-da-pesquisa.js +2 -2
- package/lib/esm/consultaSimples.d.ts +2 -2
- package/lib/esm/consultaSimples.js +3 -3
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -13562,8 +13562,8 @@ var __rest$8 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
13562
13562
|
}
|
|
13563
13563
|
return t;
|
|
13564
13564
|
};
|
|
13565
|
-
var StyledButton = styled.button(templateObject_1$j || (templateObject_1$j = __makeTemplateObject$j(["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius:
|
|
13566
|
-
var SmallContent = styled.small(templateObject_2$a || (templateObject_2$a = __makeTemplateObject$j(["\n color: #fdeb35;\n display: block;\n margin-top:
|
|
13565
|
+
var StyledButton = styled.button(templateObject_1$j || (templateObject_1$j = __makeTemplateObject$j(["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius: 60px;\n cursor: pointer;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n \n transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;\n\n &:hover {\n background-color: #0056b3;\n }\n\n width: 100% !important;\n"], ["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius: 60px;\n cursor: pointer;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n \n transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;\n\n &:hover {\n background-color: #0056b3;\n }\n\n width: 100% !important;\n"])), theme.typography.headline14.fontStyle, theme.typography.headline14.fontWeight, theme.typography.headline14.fontSize, theme.typography.headline14.lineHeight, theme.colors.azulCredithub, theme.colors.white);
|
|
13566
|
+
var SmallContent = styled.small(templateObject_2$a || (templateObject_2$a = __makeTemplateObject$j(["\n color: #fdeb35;\n display: block;\n margin-top: 4px;\n"], ["\n color: #fdeb35;\n display: block;\n margin-top: 4px;\n"])));
|
|
13567
13567
|
var Button$1 = function (_a) {
|
|
13568
13568
|
var children = _a.children, className = _a.className, smallContent = _a.smallContent, props = __rest$8(_a, ["children", "className", "smallContent"]);
|
|
13569
13569
|
var buttonClassName = cx(className);
|
|
@@ -13659,12 +13659,6 @@ function formatDatePtBrToDate(date) {
|
|
|
13659
13659
|
var _a, _b;
|
|
13660
13660
|
return new Date((_b = (_a = date === null || date === void 0 ? void 0 : date.split("/")) === null || _a === void 0 ? void 0 : _a.reverse()) === null || _b === void 0 ? void 0 : _b.join("-"));
|
|
13661
13661
|
}
|
|
13662
|
-
function capitalizeFirstLetter(value) {
|
|
13663
|
-
var _a;
|
|
13664
|
-
if (!value)
|
|
13665
|
-
return null;
|
|
13666
|
-
return ((_a = value === null || value === void 0 ? void 0 : value.charAt(0)) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + (value === null || value === void 0 ? void 0 : value.slice(1));
|
|
13667
|
-
}
|
|
13668
13662
|
function addNoValueContent(obj) {
|
|
13669
13663
|
return Object.fromEntries(Object.entries(obj).map(function (_a) {
|
|
13670
13664
|
var key = _a[0], value = _a[1];
|
|
@@ -13678,7 +13672,7 @@ function addNoValueContent(obj) {
|
|
|
13678
13672
|
var PartnerRFBStatus = function (_a) {
|
|
13679
13673
|
var documento = _a.documento;
|
|
13680
13674
|
var _b = useQuery("SELECT FROM 'RFB'.'CERTIDAO'", { documento: documento }), isLoading = _b.isLoading, error = _b.error, response = _b.response;
|
|
13681
|
-
return isLoading ? React.createElement(Loading, null) : error ? '
|
|
13675
|
+
return isLoading ? React.createElement(Loading, null) : error ? '--' : XPathUtils.select('string(//situacao)', response === null || response === void 0 ? void 0 : response.document);
|
|
13682
13676
|
};
|
|
13683
13677
|
|
|
13684
13678
|
var PartnerProtestos = function (_a) {
|
|
@@ -21979,7 +21973,7 @@ var useCardsAndProducts = function (_a) {
|
|
|
21979
21973
|
{
|
|
21980
21974
|
title: "Consultar Imóveis SP Capital",
|
|
21981
21975
|
price: productsPrices === null || productsPrices === void 0 ? void 0 : productsPrices.imoveis,
|
|
21982
|
-
|
|
21976
|
+
onClick: handleOnClick("imoveis"),
|
|
21983
21977
|
hide: !isPF || ((_f = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.imoveis) === null || _f === void 0 ? void 0 : _f.consultaRealizada),
|
|
21984
21978
|
},
|
|
21985
21979
|
],
|
|
@@ -21991,21 +21985,77 @@ var __makeTemplateObject$g = (undefined && undefined.__makeTemplateObject) || fu
|
|
|
21991
21985
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
21992
21986
|
return cooked;
|
|
21993
21987
|
};
|
|
21988
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21989
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21990
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
21991
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21992
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21993
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21994
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21995
|
+
});
|
|
21996
|
+
};
|
|
21997
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
21998
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
21999
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
22000
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
22001
|
+
function step(op) {
|
|
22002
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
22003
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
22004
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
22005
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
22006
|
+
switch (op[0]) {
|
|
22007
|
+
case 0: case 1: t = op; break;
|
|
22008
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22009
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
22010
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
22011
|
+
default:
|
|
22012
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
22013
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
22014
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
22015
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
22016
|
+
if (t[2]) _.ops.pop();
|
|
22017
|
+
_.trys.pop(); continue;
|
|
22018
|
+
}
|
|
22019
|
+
op = body.call(thisArg, _);
|
|
22020
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
22021
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
22022
|
+
}
|
|
22023
|
+
};
|
|
21994
22024
|
var ContainerSummary$1 = styled.div(templateObject_1$g || (templateObject_1$g = __makeTemplateObject$g(["\n display: flex;\n padding: 0 20px;\n width: 100%;\n justify-content: space-between;\n @media (max-width: 768px) {\n padding: 0px;\n }\n\n @media (max-width: 992px) {\n flex-direction: column;\n }\n \n"], ["\n display: flex;\n padding: 0 20px;\n width: 100%;\n justify-content: space-between;\n @media (max-width: 768px) {\n padding: 0px;\n }\n\n @media (max-width: 992px) {\n flex-direction: column;\n }\n \n"])));
|
|
21995
|
-
var ContentSummary = styled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject$g(["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0
|
|
21996
|
-
var FieldSummary = styled.div(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject$g(["\n align-items: center;\n margin-bottom:
|
|
21997
|
-
var ButtonsSummary = styled.div(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject$g(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap:
|
|
22025
|
+
var ContentSummary = styled.div(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject$g(["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0 16px;\n\n @media (max-width: 1280px) {\n grid-template-columns: repeat(3, 1fr);\n justify-content: center;\n align-items: center;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n width: 100%;\n }\n"], ["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0 16px;\n\n @media (max-width: 1280px) {\n grid-template-columns: repeat(3, 1fr);\n justify-content: center;\n align-items: center;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n width: 100%;\n }\n"])));
|
|
22026
|
+
var FieldSummary = styled.div(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject$g(["\n align-items: center;\n margin-bottom: 16px;\n grid-column: ", ";\n"], ["\n align-items: center;\n margin-bottom: 16px;\n grid-column: ", ";\n"])), function (props) { return (props.fullRow ? "1 / 3" : "auto"); });
|
|
22027
|
+
var ButtonsSummary = styled.div(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject$g(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"])));
|
|
21998
22028
|
var ButtonsWrapper = styled.div(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject$g(["\n display: flex; \n gap: 10px; \n flex-direction: column;\n\n @media (max-width: 1000px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n }\n"], ["\n display: flex; \n gap: 10px; \n flex-direction: column;\n\n @media (max-width: 1000px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n }\n"])));
|
|
21999
22029
|
var SummaryButton = styled(Button$1)(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject$g(["\n height: 100%;\n"], ["\n height: 100%;\n"])));
|
|
22000
22030
|
var Summary = function (_a) {
|
|
22001
|
-
var finderResponse = _a.finderResponse, rfbResponse = _a.rfbResponse;
|
|
22031
|
+
var finderResponse = _a.finderResponse, rfbResponse = _a.rfbResponse, document = _a.document;
|
|
22002
22032
|
var _b = useCardsAndProducts({ finderResponse: finderResponse, rfbResponse: rfbResponse }), cards = _b.cards, products = _b.products;
|
|
22003
22033
|
return (React.createElement(React.Fragment, null,
|
|
22004
22034
|
React.createElement(ContainerSummary$1, { className: "credithub-container-summary" },
|
|
22005
22035
|
React.createElement(ContentSummary, { className: "credithub-content-summary" }, cards.map(function (card, index) { return (React.createElement(FieldSummary, { key: index, fullRow: card.header === "Nome" || card.header === "Nome Da Mãe" },
|
|
22006
22036
|
React.createElement(AddItemField, { name: card.header, value: card.title }))); })),
|
|
22007
|
-
React.createElement(ButtonsWrapper, null,
|
|
22008
|
-
React.createElement(
|
|
22037
|
+
React.createElement(ButtonsWrapper, null,
|
|
22038
|
+
products.map(function (product, index) { return (React.createElement(ButtonsSummary, { key: index, style: { display: (product === null || product === void 0 ? void 0 : product.hide) ? 'none' : '', width: '100%' } },
|
|
22039
|
+
React.createElement(SummaryButton, { onClick: function () { return (product === null || product === void 0 ? void 0 : product.onClick) && (product === null || product === void 0 ? void 0 : product.onClick()); }, smallContent: product.price ? formatMoney(product.price) : undefined }, product.title))); }),
|
|
22040
|
+
React.createElement(PrintButton, { document: document })))));
|
|
22041
|
+
};
|
|
22042
|
+
var PrintButton = function (_a) {
|
|
22043
|
+
var document = _a.document;
|
|
22044
|
+
var client = React.useContext(WebService);
|
|
22045
|
+
var url = React.useMemo(function () {
|
|
22046
|
+
var url = new URL("https://pdfnode.credithub.com.br/relatorio/analitico/pdf");
|
|
22047
|
+
url.searchParams.append("apiKey", client.apiKey);
|
|
22048
|
+
url.searchParams.append("documento", document.replace(/\D/g, ''));
|
|
22049
|
+
return url;
|
|
22050
|
+
}, [document, client.apiKey]);
|
|
22051
|
+
var onClick = React.useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
22052
|
+
return __generator(this, function (_a) {
|
|
22053
|
+
window.open(url.toString(), "_blank");
|
|
22054
|
+
return [2 /*return*/];
|
|
22055
|
+
});
|
|
22056
|
+
}); }, [url]);
|
|
22057
|
+
return React.createElement(ButtonsSummary, null,
|
|
22058
|
+
React.createElement(SummaryButton, { onClick: onClick }, "PDF para Impress\u00E3o"));
|
|
22009
22059
|
};
|
|
22010
22060
|
var templateObject_1$g, templateObject_2$9, templateObject_3$4, templateObject_4$3, templateObject_5$2, templateObject_6$2;
|
|
22011
22061
|
|
|
@@ -22023,10 +22073,10 @@ var __makeTemplateObject$f = (undefined && undefined.__makeTemplateObject) || fu
|
|
|
22023
22073
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
22024
22074
|
return cooked;
|
|
22025
22075
|
};
|
|
22026
|
-
var StyledContainer = styled.div(templateObject_1$f || (templateObject_1$f = __makeTemplateObject$f(["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom:
|
|
22027
|
-
var Header = styled.div(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject$f(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding:
|
|
22076
|
+
var StyledContainer = styled.div(templateObject_1$f || (templateObject_1$f = __makeTemplateObject$f(["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"], ["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"])), theme.colors.cinzaClaro);
|
|
22077
|
+
var Header = styled.div(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject$f(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding: 16px;\n margin: 16px;\n row-gap: 20px;\n @media (max-width: 992px) {\n padding: 0 0 16px 0;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding: 16px;\n margin: 16px;\n row-gap: 20px;\n @media (max-width: 992px) {\n padding: 0 0 16px 0;\n }\n"])));
|
|
22028
22078
|
var Title$2 = styled.span(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject$f(["\n font-size: 18px;\n font-weight: bold;\n text-align: center;\n"], ["\n font-size: 18px;\n font-weight: bold;\n text-align: center;\n"])));
|
|
22029
|
-
var TransactionContent = styled.div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject$f(["\n display: flex;\n align-items: center;\n padding:
|
|
22079
|
+
var TransactionContent = styled.div(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject$f(["\n display: flex;\n align-items: center;\n padding: 16px;\n align-items: flex-start;\n"], ["\n display: flex;\n align-items: center;\n padding: 16px;\n align-items: flex-start;\n"])));
|
|
22030
22080
|
var UserField = styled.span(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject$f(["\n flex: 1;\n padding-right: 16px;\n"], ["\n flex: 1;\n padding-right: 16px;\n"])));
|
|
22031
22081
|
var DateField = styled.span(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject$f(["\n flex: 1;\n text-align: right;\n"], ["\n flex: 1;\n text-align: right;\n"])));
|
|
22032
22082
|
var TransactionsTable = function (_a) {
|
|
@@ -22065,7 +22115,6 @@ var CompanyName$1 = styled.span(templateObject_2$7 || (templateObject_2$7 = __ma
|
|
|
22065
22115
|
var DocumentContainer$1 = styled.span(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject$e(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n \n color: ", ";\n background-color: ", ";\n \n text-align: center;\n position: relative;\n padding: 5px 20px;\n border-radius: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n \n color: ", ";\n background-color: ", ";\n \n text-align: center;\n position: relative;\n padding: 5px 20px;\n border-radius: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), theme.typography.body14.fontSize, theme.typography.body14.fontWeight, theme.typography.body14.lineHeight, theme.colors.cinzaEscuro, theme.colors.cinzaClaro);
|
|
22066
22116
|
var Companylogo = function (_a) {
|
|
22067
22117
|
var name = _a.name, document = _a.document;
|
|
22068
|
-
console.log(isDocumentoPF(document), document);
|
|
22069
22118
|
return (React.createElement(React.Fragment, null,
|
|
22070
22119
|
React.createElement(LogoContainer$1, null,
|
|
22071
22120
|
React.createElement(CompanyName$1, null, name),
|
|
@@ -28010,15 +28059,15 @@ var __assign$a = (undefined && undefined.__assign) || function () {
|
|
|
28010
28059
|
};
|
|
28011
28060
|
return __assign$a.apply(this, arguments);
|
|
28012
28061
|
};
|
|
28013
|
-
var ContainerSummary = styled.div(templateObject_1$c || (templateObject_1$c = __makeTemplateObject$c(["\n display: grid;\n gap:
|
|
28062
|
+
var ContainerSummary = styled.div(templateObject_1$c || (templateObject_1$c = __makeTemplateObject$c(["\n display: grid;\n gap: 16px;\n padding: 16px;\n width: 90%;\n"], ["\n display: grid;\n gap: 16px;\n padding: 16px;\n width: 90%;\n"])));
|
|
28014
28063
|
var ReclameAquiStatsContainer = styled.div(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject$c(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
|
|
28015
|
-
var LogoContainer = styled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject$c(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding:
|
|
28016
|
-
var StyledImage = styled.img(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject$c(["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom:
|
|
28017
|
-
var StatsImage = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject$c(["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom:
|
|
28018
|
-
var CompanyName = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject$c(["\n font-size:
|
|
28019
|
-
var DocumentContainer = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject$c(["\n font-size:
|
|
28064
|
+
var LogoContainer = styled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject$c(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 16px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 16px;\n"])));
|
|
28065
|
+
var StyledImage = styled.img(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject$c(["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom: 16px;\n"], ["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom: 16px;\n"])));
|
|
28066
|
+
var StatsImage = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject$c(["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) { return props.src; });
|
|
28067
|
+
var CompanyName = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject$c(["\n font-size: 16px;\n color: ", ";\n text-align: center;\n margin-bottom: 8px;\n line-height: 18px;\n font-weight: bold;\n"], ["\n font-size: 16px;\n color: ", ";\n text-align: center;\n margin-bottom: 8px;\n line-height: 18px;\n font-weight: bold;\n"])), theme.colors.cinzaEscuro);
|
|
28068
|
+
var DocumentContainer = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject$c(["\n font-size: 16px;\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n font-size: 16px;\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), theme.colors.cinzaEscuro, theme.colors.cinzaClaro);
|
|
28020
28069
|
var DocumentPrefix = styled.span(templateObject_8 || (templateObject_8 = __makeTemplateObject$c(["\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
28021
|
-
var ProblemsSolved = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject$c(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding:
|
|
28070
|
+
var ProblemsSolved = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject$c(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 16px 0;\n\n a {\n text-decoration: none;\n color: inherit;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 16px 0;\n\n a {\n text-decoration: none;\n color: inherit;\n }\n"])));
|
|
28022
28071
|
var CarrouselBtn = styled.span(templateObject_10 || (templateObject_10 = __makeTemplateObject$c(["\n cursor: pointer;\n height: fit-content;\n"], ["\n cursor: pointer;\n height: fit-content;\n"])));
|
|
28023
28072
|
var statusMap = {
|
|
28024
28073
|
GREAT: "Ótimo",
|
|
@@ -28100,7 +28149,6 @@ var Dossie = function (_a) {
|
|
|
28100
28149
|
var response = function (_data) {
|
|
28101
28150
|
var data = _data instanceof Error ? undefined : _data;
|
|
28102
28151
|
var isPF = (documento === null || documento === void 0 ? void 0 : documento.length) === 11;
|
|
28103
|
-
console.log('isPF', isPF, documento);
|
|
28104
28152
|
var name = (isPF
|
|
28105
28153
|
? XPathUtils.select("string(//cadastro/nome)", data)
|
|
28106
28154
|
: XPathUtils.select("string(//cadastro/razaoSocial)", data) || rfbResponse && XPathUtils.select("string(//RFB/nome)", rfbResponse));
|
|
@@ -28113,7 +28161,7 @@ var Dossie = function (_a) {
|
|
|
28113
28161
|
return (React.createElement(DossieContainer, null,
|
|
28114
28162
|
React.createElement(DossieContent, null,
|
|
28115
28163
|
React.createElement(DossieCarrousel, null),
|
|
28116
|
-
React.createElement(Summary, { finderResponse: data, rfbResponse: rfbResponse })),
|
|
28164
|
+
React.createElement(Summary, { finderResponse: data, rfbResponse: rfbResponse, document: document })),
|
|
28117
28165
|
React.createElement(TransactionsTable, { events: XPathUtils.select("//historico/consulta", data) || [] })));
|
|
28118
28166
|
};
|
|
28119
28167
|
return (React.createElement(Section, { ctx: finderCtx, hideHeader: true, minimized: false, isError: function (e) { return response(e); }, onSuccess: response }));
|
|
@@ -28187,7 +28235,7 @@ var ProcessosJuridicosList = function (_a) {
|
|
|
28187
28235
|
var processos = _a.processos, onClickConsultarProcessoJuridico = _a.onClickConsultarProcessoJuridico;
|
|
28188
28236
|
return (React.createElement(ResultList, { resultContentStriped: false }, processos.map(function (processo, i) { return (React.createElement("div", { key: i },
|
|
28189
28237
|
React.createElement(ProcessoJuridicoItem, { processo: processo },
|
|
28190
|
-
React.createElement(ConsultarProcessoBtn, { onClick: function () { return onClickConsultarProcessoJuridico(processo.numero_novo); }, smallContent: "R$ 1" }, "Consultar Processo")))); })));
|
|
28238
|
+
React.createElement(ConsultarProcessoBtn, { onClick: onClickConsultarProcessoJuridico ? function () { return onClickConsultarProcessoJuridico(processo.numero_novo); } : undefined, smallContent: "R$ 1" }, "Consultar Processo")))); })));
|
|
28191
28239
|
};
|
|
28192
28240
|
var templateObject_1$9, templateObject_2$3, templateObject_3, templateObject_4;
|
|
28193
28241
|
|
|
@@ -47494,17 +47542,17 @@ var __makeTemplateObject$4 = (undefined && undefined.__makeTemplateObject) || fu
|
|
|
47494
47542
|
};
|
|
47495
47543
|
var Content = styled.div(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject$4(["\n display: ", ";\n"], ["\n display: ", ";\n"])), function (props) { return (props.isOpen ? "block" : "none"); });
|
|
47496
47544
|
var ChartSystem = function (_a) {
|
|
47497
|
-
var _b, _c, _d;
|
|
47545
|
+
var _b, _c, _d, _e, _f;
|
|
47498
47546
|
var documento = _a.documento;
|
|
47499
|
-
var
|
|
47547
|
+
var _g = useChartData(documento), data = _g.data, isLoading = _g.isLoading, error = _g.error;
|
|
47500
47548
|
var errorMessage = typeof error === "string" ? error : error === null || error === void 0 ? void 0 : error.toString();
|
|
47501
|
-
var
|
|
47549
|
+
var _h = useToggle(true), isOpen = _h[0], toggleOpen = _h[1];
|
|
47502
47550
|
var ultimaOcorrenciaCCF = useUltimaOcorrenciaCCF();
|
|
47503
47551
|
var quantidadeProtestos = ((_c = (_b = data === null || data === void 0 ? void 0 : data.protestos) === null || _b === void 0 ? void 0 : _b[(data === null || data === void 0 ? void 0 : data.protestos.length) - 1]) === null || _c === void 0 ? void 0 : _c.quantidade) || 0;
|
|
47504
|
-
var valorTotalProtestos =
|
|
47505
|
-
var
|
|
47506
|
-
var
|
|
47507
|
-
var
|
|
47552
|
+
var valorTotalProtestos = ((_e = (_d = data === null || data === void 0 ? void 0 : data.protestos) === null || _d === void 0 ? void 0 : _d[(data === null || data === void 0 ? void 0 : data.protestos.length) - 1]) === null || _e === void 0 ? void 0 : _e.valorTotal) || 0;
|
|
47553
|
+
var _j = useDividasPublicas(), quantidadeDividas = _j.quantidade, valorTotalDividas = _j.valorTotal;
|
|
47554
|
+
var _k = useCalculation((data === null || data === void 0 ? void 0 : data.serasa) || []), quantidadeSerasa = _k.quantidade, valorTotalSerasa = _k.valorTotal;
|
|
47555
|
+
var _l = useCalculation((data === null || data === void 0 ? void 0 : data.boaVista) || []), quantidadeBoaVista = _l.quantidade, valorTotalBoaVista = _l.valorTotal;
|
|
47508
47556
|
var quantidadeCCFs = useCalculation((data === null || data === void 0 ? void 0 : data.ccfs) || []).quantidade;
|
|
47509
47557
|
var ultimaOcorrenciaProtestos = "";
|
|
47510
47558
|
if ((data === null || data === void 0 ? void 0 : data.protestos) && data.protestos.length > 0) {
|
|
@@ -47515,7 +47563,7 @@ var ChartSystem = function (_a) {
|
|
|
47515
47563
|
React.createElement(Result, null,
|
|
47516
47564
|
React.createElement(Content, { isOpen: isOpen },
|
|
47517
47565
|
data && React.createElement(ChartContent, { dataInput: data }),
|
|
47518
|
-
!isLoading && (React.createElement(QuantidadeResultados, { quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (
|
|
47566
|
+
!isLoading && (React.createElement(QuantidadeResultados, { quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (_f = data === null || data === void 0 ? void 0 : data.pieChartTotalConfig) === null || _f === void 0 ? void 0 : _f.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeSerasa, quantidadeDividasBoaVista: quantidadeBoaVista, quantidadeChequesSemFundos: quantidadeCCFs, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalSerasa, valorTotalDividasBoaVista: valorTotalBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos }))))));
|
|
47519
47567
|
};
|
|
47520
47568
|
var templateObject_1$4;
|
|
47521
47569
|
|
|
@@ -47960,9 +48008,15 @@ var templateObject_1$2;
|
|
|
47960
48008
|
|
|
47961
48009
|
var Liminar = function () {
|
|
47962
48010
|
var ctx = React.useContext(Queries.Liminar);
|
|
48011
|
+
var _a = React.useState(false), hideSection = _a[0], setHideSection = _a[1];
|
|
47963
48012
|
var Section = ctx.Section;
|
|
48013
|
+
if (hideSection)
|
|
48014
|
+
return null;
|
|
47964
48015
|
return (React.createElement(Section, { title: "Liminares para Remo\u00E7\u00E3o de Protesto", subtitle: "Ind\u00EDcios de liminares para oculta\u00E7\u00E3o de registros.", icon: ProtestosIcon, onSuccess: function (document) {
|
|
47965
48016
|
var possuiLiminar = document.totalProtestos === 'NADA CONSTA';
|
|
48017
|
+
if (!possuiLiminar) {
|
|
48018
|
+
setHideSection(true);
|
|
48019
|
+
}
|
|
47966
48020
|
var message = possuiLiminar ? 'Encontrado' : 'Não encontrado';
|
|
47967
48021
|
return {
|
|
47968
48022
|
children: null,
|
|
@@ -48011,16 +48065,12 @@ var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
48011
48065
|
var StatusMessageContainer = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject$1(["\n display: flex;\n gap: 10px;\n\n span {\n width: fit-content;\n }\n\n @media only screen and (max-width: 768px) {\n flex-direction: column;\n }\n"], ["\n display: flex;\n gap: 10px;\n\n span {\n width: fit-content;\n }\n\n @media only screen and (max-width: 768px) {\n flex-direction: column;\n }\n"])));
|
|
48012
48066
|
var getPossuiPendenciaText = function (_a) {
|
|
48013
48067
|
var ccf = _a.ccf, ultimoRegistroCCF = _a.ultimoRegistroCCF, dividasPublicas = _a.dividasPublicas, protestos = _a.protestos, processosJuridicos = _a.processosJuridicos;
|
|
48014
|
-
|
|
48015
|
-
|
|
48016
|
-
|
|
48017
|
-
|
|
48018
|
-
|
|
48019
|
-
|
|
48020
|
-
];
|
|
48021
|
-
return capitalizeFirstLetter(data
|
|
48022
|
-
.filter(function (text) { return text; })
|
|
48023
|
-
.join(', ') + '');
|
|
48068
|
+
return [
|
|
48069
|
+
dividasPublicas ? "".concat(formatMoney(dividasPublicas), " em D\u00EDvidas P\u00FAblicas") : '',
|
|
48070
|
+
ccf ? "".concat(ccf === 1 ? 'Cheque sem Fundo' : "".concat(ccf, " Cheques sem Fundo"), " com \u00DAltima Ocorr\u00EAncia em ").concat(ultimoRegistroCCF) : '',
|
|
48071
|
+
protestos ? (protestos === 1 ? 'Protesto Encontrado' : "Protestos: ".concat(protestos)) : '',
|
|
48072
|
+
processosJuridicos ? (processosJuridicos === 1 ? 'Processo Jurídico' : "".concat(processosJuridicos, " Processos Jur\u00EDdicos")) : '',
|
|
48073
|
+
].filter(function (x) { return !!x; });
|
|
48024
48074
|
};
|
|
48025
48075
|
var ConsultaSimplesSection = function (_a) {
|
|
48026
48076
|
var _b, _c;
|
|
@@ -48041,7 +48091,9 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
48041
48091
|
var statusType = isError ? 'warning' : possuiPendencias ? 'error' : 'success';
|
|
48042
48092
|
return (React.createElement(Section$1, __assign$3({ title: "Consulta Simples", subtitle: "Consulta de informa\u00E7\u00F5es do documento.", description: (React.createElement(StatusMessageContainer, null,
|
|
48043
48093
|
React.createElement(StatusMessage, { type: "found" }, formatDocument(documento)),
|
|
48044
|
-
|
|
48094
|
+
possuiPendenciaText.length ? possuiPendenciaText.map(function (text) {
|
|
48095
|
+
return React.createElement(StatusMessage, { key: text, type: 'error' }, text);
|
|
48096
|
+
}) : React.createElement(StatusMessage, { type: statusType }, isError ? ctx === null || ctx === void 0 ? void 0 : ctx.error.message : 'Nenhum registro encontrado'))), onClose: onClose, icon: ConsultaSimplesIcon, variant: isLoading ? 'loading' : 'default' }, rest), children));
|
|
48045
48097
|
};
|
|
48046
48098
|
function getDataFromRequestContext(ctx) {
|
|
48047
48099
|
if (ctx.type != exports.RequestStatus.Success)
|
|
@@ -48077,9 +48129,10 @@ var ConsultaSimples = function (_a) {
|
|
|
48077
48129
|
React.createElement(Wrapper, null,
|
|
48078
48130
|
React.createElement(ConsultaSimplesSection, { documento: documento, onClose: onClose },
|
|
48079
48131
|
React.createElement(ConsultaRfbProvider, { documento: documento },
|
|
48080
|
-
React.createElement(Dossie, { documento: documento
|
|
48132
|
+
React.createElement(Dossie, { documento: documento }),
|
|
48133
|
+
React.createElement(Liminar, null),
|
|
48081
48134
|
React.createElement(Addresses, { apiKey: apiKey }),
|
|
48082
|
-
React.createElement(Contacts,
|
|
48135
|
+
React.createElement(Contacts, null),
|
|
48083
48136
|
React.createElement(Partners, null)),
|
|
48084
48137
|
React.createElement(Dominios, null),
|
|
48085
48138
|
React.createElement(BankAccounts, null),
|
|
@@ -48091,7 +48144,6 @@ var ConsultaSimples = function (_a) {
|
|
|
48091
48144
|
React.createElement(ConsultaScore, { documento: documento }),
|
|
48092
48145
|
React.createElement(ConsultaImoveis, { documento: documento }),
|
|
48093
48146
|
React.createElement(Veiculos, { documento: documento })),
|
|
48094
|
-
React.createElement(Liminar, null),
|
|
48095
48147
|
React.createElement(Protestos, null),
|
|
48096
48148
|
React.createElement(CCF, null),
|
|
48097
48149
|
React.createElement(ProcessosJuridicos, { onClickConsultarProcessoJuridico: onClickConsultarProcessoJuridico })))))))))))));
|
|
@@ -18,17 +18,17 @@ import { Result } from "../interface/result";
|
|
|
18
18
|
import ResumoDeNegativacoesIcon from "../../assets/icones/resumoNegativacoes";
|
|
19
19
|
var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n"], ["\n display: ", ";\n"])), function (props) { return (props.isOpen ? "block" : "none"); });
|
|
20
20
|
var ChartSystem = function (_a) {
|
|
21
|
-
var _b, _c, _d;
|
|
21
|
+
var _b, _c, _d, _e, _f;
|
|
22
22
|
var documento = _a.documento;
|
|
23
|
-
var
|
|
23
|
+
var _g = useChartData(documento), data = _g.data, isLoading = _g.isLoading, error = _g.error;
|
|
24
24
|
var errorMessage = typeof error === "string" ? error : error === null || error === void 0 ? void 0 : error.toString();
|
|
25
|
-
var
|
|
25
|
+
var _h = useToggle(true), isOpen = _h[0], toggleOpen = _h[1];
|
|
26
26
|
var ultimaOcorrenciaCCF = useUltimaOcorrenciaCCF();
|
|
27
27
|
var quantidadeProtestos = ((_c = (_b = data === null || data === void 0 ? void 0 : data.protestos) === null || _b === void 0 ? void 0 : _b[(data === null || data === void 0 ? void 0 : data.protestos.length) - 1]) === null || _c === void 0 ? void 0 : _c.quantidade) || 0;
|
|
28
|
-
var valorTotalProtestos =
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
28
|
+
var valorTotalProtestos = ((_e = (_d = data === null || data === void 0 ? void 0 : data.protestos) === null || _d === void 0 ? void 0 : _d[(data === null || data === void 0 ? void 0 : data.protestos.length) - 1]) === null || _e === void 0 ? void 0 : _e.valorTotal) || 0;
|
|
29
|
+
var _j = useDividasPublicas(), quantidadeDividas = _j.quantidade, valorTotalDividas = _j.valorTotal;
|
|
30
|
+
var _k = useCalculation((data === null || data === void 0 ? void 0 : data.serasa) || []), quantidadeSerasa = _k.quantidade, valorTotalSerasa = _k.valorTotal;
|
|
31
|
+
var _l = useCalculation((data === null || data === void 0 ? void 0 : data.boaVista) || []), quantidadeBoaVista = _l.quantidade, valorTotalBoaVista = _l.valorTotal;
|
|
32
32
|
var quantidadeCCFs = useCalculation((data === null || data === void 0 ? void 0 : data.ccfs) || []).quantidade;
|
|
33
33
|
var ultimaOcorrenciaProtestos = "";
|
|
34
34
|
if ((data === null || data === void 0 ? void 0 : data.protestos) && data.protestos.length > 0) {
|
|
@@ -39,7 +39,7 @@ var ChartSystem = function (_a) {
|
|
|
39
39
|
React.createElement(Result, null,
|
|
40
40
|
React.createElement(Content, { isOpen: isOpen },
|
|
41
41
|
data && React.createElement(ChartContent, { dataInput: data }),
|
|
42
|
-
!isLoading && (React.createElement(QuantidadeResultados, { quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (
|
|
42
|
+
!isLoading && (React.createElement(QuantidadeResultados, { quantidadeProtestos: quantidadeProtestos, quantidadeProcessos: (_f = data === null || data === void 0 ? void 0 : data.pieChartTotalConfig) === null || _f === void 0 ? void 0 : _f.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeSerasa, quantidadeDividasBoaVista: quantidadeBoaVista, quantidadeChequesSemFundos: quantidadeCCFs, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalSerasa, valorTotalDividasBoaVista: valorTotalBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos }))))));
|
|
43
43
|
};
|
|
44
44
|
export default ChartSystem;
|
|
45
45
|
var templateObject_1;
|
|
@@ -28,8 +28,8 @@ import classNames from "classnames";
|
|
|
28
28
|
import React from "react";
|
|
29
29
|
import styled from "styled-components";
|
|
30
30
|
import theme from "../interface/theme";
|
|
31
|
-
var StyledButton = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius:
|
|
32
|
-
var SmallContent = styled.small(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: #fdeb35;\n display: block;\n margin-top:
|
|
31
|
+
var StyledButton = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius: 60px;\n cursor: pointer;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n \n transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;\n\n &:hover {\n background-color: #0056b3;\n }\n\n width: 100% !important;\n"], ["\n font-style: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n background-color: ", ";\n color: ", ";\n \n padding: 8px 20px;\n border: none;\n border-radius: 60px;\n cursor: pointer;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n \n transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;\n\n &:hover {\n background-color: #0056b3;\n }\n\n width: 100% !important;\n"])), theme.typography.headline14.fontStyle, theme.typography.headline14.fontWeight, theme.typography.headline14.fontSize, theme.typography.headline14.lineHeight, theme.colors.azulCredithub, theme.colors.white);
|
|
32
|
+
var SmallContent = styled.small(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: #fdeb35;\n display: block;\n margin-top: 4px;\n"], ["\n color: #fdeb35;\n display: block;\n margin-top: 4px;\n"])));
|
|
33
33
|
var Button = function (_a) {
|
|
34
34
|
var children = _a.children, className = _a.className, smallContent = _a.smallContent, props = __rest(_a, ["children", "className", "smallContent"]);
|
|
35
35
|
var buttonClassName = classNames(className);
|
|
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
26
26
|
};
|
|
27
27
|
import React, { useContext } from 'react';
|
|
28
28
|
import { Queries, RequestStatus } from '../webservice';
|
|
29
|
-
import {
|
|
29
|
+
import { formatDocument } from '../../utils/string';
|
|
30
30
|
import StatusMessage from '../interface/statusMessage';
|
|
31
31
|
import Section from '../interface/section';
|
|
32
32
|
import ConsultaSimplesIcon from '../../assets/icones/consultaSimples';
|
|
@@ -36,16 +36,12 @@ import styled from 'styled-components';
|
|
|
36
36
|
var StatusMessageContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n gap: 10px;\n\n span {\n width: fit-content;\n }\n\n @media only screen and (max-width: 768px) {\n flex-direction: column;\n }\n"], ["\n display: flex;\n gap: 10px;\n\n span {\n width: fit-content;\n }\n\n @media only screen and (max-width: 768px) {\n flex-direction: column;\n }\n"])));
|
|
37
37
|
var getPossuiPendenciaText = function (_a) {
|
|
38
38
|
var ccf = _a.ccf, ultimoRegistroCCF = _a.ultimoRegistroCCF, dividasPublicas = _a.dividasPublicas, protestos = _a.protestos, processosJuridicos = _a.processosJuridicos;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
];
|
|
46
|
-
return capitalizeFirstLetter(data
|
|
47
|
-
.filter(function (text) { return text; })
|
|
48
|
-
.join(', ') + '');
|
|
39
|
+
return [
|
|
40
|
+
dividasPublicas ? "".concat(formatMoney(dividasPublicas), " em D\u00EDvidas P\u00FAblicas") : '',
|
|
41
|
+
ccf ? "".concat(ccf === 1 ? 'Cheque sem Fundo' : "".concat(ccf, " Cheques sem Fundo"), " com \u00DAltima Ocorr\u00EAncia em ").concat(ultimoRegistroCCF) : '',
|
|
42
|
+
protestos ? (protestos === 1 ? 'Protesto Encontrado' : "Protestos: ".concat(protestos)) : '',
|
|
43
|
+
processosJuridicos ? (processosJuridicos === 1 ? 'Processo Jurídico' : "".concat(processosJuridicos, " Processos Jur\u00EDdicos")) : '',
|
|
44
|
+
].filter(function (x) { return !!x; });
|
|
49
45
|
};
|
|
50
46
|
var ConsultaSimplesSection = function (_a) {
|
|
51
47
|
var _b, _c;
|
|
@@ -66,7 +62,9 @@ var ConsultaSimplesSection = function (_a) {
|
|
|
66
62
|
var statusType = isError ? 'warning' : possuiPendencias ? 'error' : 'success';
|
|
67
63
|
return (React.createElement(Section, __assign({ title: "Consulta Simples", subtitle: "Consulta de informa\u00E7\u00F5es do documento.", description: (React.createElement(StatusMessageContainer, null,
|
|
68
64
|
React.createElement(StatusMessage, { type: "found" }, formatDocument(documento)),
|
|
69
|
-
|
|
65
|
+
possuiPendenciaText.length ? possuiPendenciaText.map(function (text) {
|
|
66
|
+
return React.createElement(StatusMessage, { key: text, type: 'error' }, text);
|
|
67
|
+
}) : React.createElement(StatusMessage, { type: statusType }, isError ? ctx === null || ctx === void 0 ? void 0 : ctx.error.message : 'Nenhum registro encontrado'))), onClose: onClose, icon: ConsultaSimplesIcon, variant: isLoading ? 'loading' : 'default' }, rest), children));
|
|
70
68
|
};
|
|
71
69
|
function getDataFromRequestContext(ctx) {
|
|
72
70
|
if (ctx.type != RequestStatus.Success)
|
|
@@ -13,7 +13,6 @@ var CompanyName = styled.span(templateObject_2 || (templateObject_2 = __makeTemp
|
|
|
13
13
|
var DocumentContainer = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n \n color: ", ";\n background-color: ", ";\n \n text-align: center;\n position: relative;\n padding: 5px 20px;\n border-radius: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n \n color: ", ";\n background-color: ", ";\n \n text-align: center;\n position: relative;\n padding: 5px 20px;\n border-radius: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), theme.typography.body14.fontSize, theme.typography.body14.fontWeight, theme.typography.body14.lineHeight, theme.colors.cinzaEscuro, theme.colors.cinzaClaro);
|
|
14
14
|
var Companylogo = function (_a) {
|
|
15
15
|
var name = _a.name, document = _a.document;
|
|
16
|
-
console.log(isDocumentoPF(document), document);
|
|
17
16
|
return (React.createElement(React.Fragment, null,
|
|
18
17
|
React.createElement(LogoContainer, null,
|
|
19
18
|
React.createElement(CompanyName, null, name),
|
|
@@ -24,7 +24,6 @@ var Dossie = function (_a) {
|
|
|
24
24
|
var response = function (_data) {
|
|
25
25
|
var data = _data instanceof Error ? undefined : _data;
|
|
26
26
|
var isPF = (documento === null || documento === void 0 ? void 0 : documento.length) === 11;
|
|
27
|
-
console.log('isPF', isPF, documento);
|
|
28
27
|
var name = (isPF
|
|
29
28
|
? XPathUtils.select("string(//cadastro/nome)", data)
|
|
30
29
|
: XPathUtils.select("string(//cadastro/razaoSocial)", data) || rfbResponse && XPathUtils.select("string(//RFB/nome)", rfbResponse));
|
|
@@ -37,7 +36,7 @@ var Dossie = function (_a) {
|
|
|
37
36
|
return (React.createElement(DossieContainer, null,
|
|
38
37
|
React.createElement(DossieContent, null,
|
|
39
38
|
React.createElement(DossieCarrousel, null),
|
|
40
|
-
React.createElement(Summary, { finderResponse: data, rfbResponse: rfbResponse })),
|
|
39
|
+
React.createElement(Summary, { finderResponse: data, rfbResponse: rfbResponse, document: document })),
|
|
41
40
|
React.createElement(TransactionsTable, { events: XPathUtils.select("//historico/consulta", data) || [] })));
|
|
42
41
|
};
|
|
43
42
|
return (React.createElement(Section, { ctx: finderCtx, hideHeader: true, minimized: false, isError: function (e) { return response(e); }, onSuccess: response }));
|
|
@@ -11,19 +11,11 @@ declare const useCardsAndProducts: ({ finderResponse, rfbResponse }: {
|
|
|
11
11
|
onClick: () => void;
|
|
12
12
|
price: number;
|
|
13
13
|
hide?: undefined;
|
|
14
|
-
onclick?: undefined;
|
|
15
14
|
} | {
|
|
16
15
|
title: string;
|
|
17
16
|
price: number;
|
|
18
17
|
onClick: () => void;
|
|
19
18
|
hide: boolean;
|
|
20
|
-
onclick?: undefined;
|
|
21
|
-
} | {
|
|
22
|
-
title: string;
|
|
23
|
-
price: number;
|
|
24
|
-
onclick: () => void;
|
|
25
|
-
hide: boolean;
|
|
26
|
-
onClick?: undefined;
|
|
27
19
|
})[];
|
|
28
20
|
};
|
|
29
21
|
export default useCardsAndProducts;
|
|
@@ -197,7 +197,7 @@ var useCardsAndProducts = function (_a) {
|
|
|
197
197
|
{
|
|
198
198
|
title: "Consultar Imóveis SP Capital",
|
|
199
199
|
price: productsPrices === null || productsPrices === void 0 ? void 0 : productsPrices.imoveis,
|
|
200
|
-
|
|
200
|
+
onClick: handleOnClick("imoveis"),
|
|
201
201
|
hide: !isPF || ((_f = consultasComplementares === null || consultasComplementares === void 0 ? void 0 : consultasComplementares.imoveis) === null || _f === void 0 ? void 0 : _f.consultaRealizada),
|
|
202
202
|
},
|
|
203
203
|
],
|
|
@@ -2,27 +2,84 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
2
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
15
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
16
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
17
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
18
|
+
function step(op) {
|
|
19
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
20
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
21
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
22
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
23
|
+
switch (op[0]) {
|
|
24
|
+
case 0: case 1: t = op; break;
|
|
25
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
26
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
27
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
28
|
+
default:
|
|
29
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
30
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
31
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
32
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
33
|
+
if (t[2]) _.ops.pop();
|
|
34
|
+
_.trys.pop(); continue;
|
|
35
|
+
}
|
|
36
|
+
op = body.call(thisArg, _);
|
|
37
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
38
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
import React, { useCallback, useContext, useMemo } from "react";
|
|
6
42
|
import AddItemField from "../../../components/common/addItem";
|
|
7
43
|
import Button from "../../../components/common/button";
|
|
8
44
|
import { formatMoney } from "../../../utils/number";
|
|
9
45
|
import useCardsAndProducts from "./cardsAndProducts";
|
|
10
46
|
import styled from "styled-components";
|
|
47
|
+
import { WebService } from "../../../components/webservice";
|
|
11
48
|
var ContainerSummary = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n padding: 0 20px;\n width: 100%;\n justify-content: space-between;\n @media (max-width: 768px) {\n padding: 0px;\n }\n\n @media (max-width: 992px) {\n flex-direction: column;\n }\n \n"], ["\n display: flex;\n padding: 0 20px;\n width: 100%;\n justify-content: space-between;\n @media (max-width: 768px) {\n padding: 0px;\n }\n\n @media (max-width: 992px) {\n flex-direction: column;\n }\n \n"])));
|
|
12
|
-
var ContentSummary = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0
|
|
13
|
-
var FieldSummary = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n margin-bottom:
|
|
14
|
-
var ButtonsSummary = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap:
|
|
49
|
+
var ContentSummary = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0 16px;\n\n @media (max-width: 1280px) {\n grid-template-columns: repeat(3, 1fr);\n justify-content: center;\n align-items: center;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n width: 100%;\n }\n"], ["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0 16px;\n\n @media (max-width: 1280px) {\n grid-template-columns: repeat(3, 1fr);\n justify-content: center;\n align-items: center;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n width: 100%;\n }\n"])));
|
|
50
|
+
var FieldSummary = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n margin-bottom: 16px;\n grid-column: ", ";\n"], ["\n align-items: center;\n margin-bottom: 16px;\n grid-column: ", ";\n"])), function (props) { return (props.fullRow ? "1 / 3" : "auto"); });
|
|
51
|
+
var ButtonsSummary = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"])));
|
|
15
52
|
var ButtonsWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex; \n gap: 10px; \n flex-direction: column;\n\n @media (max-width: 1000px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n }\n"], ["\n display: flex; \n gap: 10px; \n flex-direction: column;\n\n @media (max-width: 1000px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n }\n"])));
|
|
16
53
|
var SummaryButton = styled(Button)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n height: 100%;\n"], ["\n height: 100%;\n"])));
|
|
17
54
|
export var Summary = function (_a) {
|
|
18
|
-
var finderResponse = _a.finderResponse, rfbResponse = _a.rfbResponse;
|
|
55
|
+
var finderResponse = _a.finderResponse, rfbResponse = _a.rfbResponse, document = _a.document;
|
|
19
56
|
var _b = useCardsAndProducts({ finderResponse: finderResponse, rfbResponse: rfbResponse }), cards = _b.cards, products = _b.products;
|
|
20
57
|
return (React.createElement(React.Fragment, null,
|
|
21
58
|
React.createElement(ContainerSummary, { className: "credithub-container-summary" },
|
|
22
59
|
React.createElement(ContentSummary, { className: "credithub-content-summary" }, cards.map(function (card, index) { return (React.createElement(FieldSummary, { key: index, fullRow: card.header === "Nome" || card.header === "Nome Da Mãe" },
|
|
23
60
|
React.createElement(AddItemField, { name: card.header, value: card.title }))); })),
|
|
24
|
-
React.createElement(ButtonsWrapper, null,
|
|
25
|
-
React.createElement(
|
|
61
|
+
React.createElement(ButtonsWrapper, null,
|
|
62
|
+
products.map(function (product, index) { return (React.createElement(ButtonsSummary, { key: index, style: { display: (product === null || product === void 0 ? void 0 : product.hide) ? 'none' : '', width: '100%' } },
|
|
63
|
+
React.createElement(SummaryButton, { onClick: function () { return (product === null || product === void 0 ? void 0 : product.onClick) && (product === null || product === void 0 ? void 0 : product.onClick()); }, smallContent: product.price ? formatMoney(product.price) : undefined }, product.title))); }),
|
|
64
|
+
React.createElement(PrintButton, { document: document })))));
|
|
65
|
+
};
|
|
66
|
+
var PrintButton = function (_a) {
|
|
67
|
+
var document = _a.document;
|
|
68
|
+
var client = useContext(WebService);
|
|
69
|
+
var url = useMemo(function () {
|
|
70
|
+
var url = new URL("https://pdfnode.credithub.com.br/relatorio/analitico/pdf");
|
|
71
|
+
url.searchParams.append("apiKey", client.apiKey);
|
|
72
|
+
url.searchParams.append("documento", document.replace(/\D/g, ''));
|
|
73
|
+
return url;
|
|
74
|
+
}, [document, client.apiKey]);
|
|
75
|
+
var onClick = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
+
return __generator(this, function (_a) {
|
|
77
|
+
window.open(url.toString(), "_blank");
|
|
78
|
+
return [2 /*return*/];
|
|
79
|
+
});
|
|
80
|
+
}); }, [url]);
|
|
81
|
+
return React.createElement(ButtonsSummary, null,
|
|
82
|
+
React.createElement(SummaryButton, { onClick: onClick }, "PDF para Impress\u00E3o"));
|
|
26
83
|
};
|
|
27
84
|
export default Summary;
|
|
28
85
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -8,10 +8,10 @@ import XPathUtils from "../../../utils/xpath";
|
|
|
8
8
|
import styled from "styled-components";
|
|
9
9
|
import IconePessoa from "../../../assets/icones/iconePessoa";
|
|
10
10
|
import theme from "../../../components/interface/theme";
|
|
11
|
-
var StyledContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom:
|
|
12
|
-
var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding:
|
|
11
|
+
var StyledContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"], ["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"])), theme.colors.cinzaClaro);
|
|
12
|
+
var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding: 16px;\n margin: 16px;\n row-gap: 20px;\n @media (max-width: 992px) {\n padding: 0 0 16px 0;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding: 16px;\n margin: 16px;\n row-gap: 20px;\n @media (max-width: 992px) {\n padding: 0 0 16px 0;\n }\n"])));
|
|
13
13
|
var Title = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 18px;\n font-weight: bold;\n text-align: center;\n"], ["\n font-size: 18px;\n font-weight: bold;\n text-align: center;\n"])));
|
|
14
|
-
var TransactionContent = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding:
|
|
14
|
+
var TransactionContent = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 16px;\n align-items: flex-start;\n"], ["\n display: flex;\n align-items: center;\n padding: 16px;\n align-items: flex-start;\n"])));
|
|
15
15
|
var UserField = styled.span(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n flex: 1;\n padding-right: 16px;\n"], ["\n flex: 1;\n padding-right: 16px;\n"])));
|
|
16
16
|
var DateField = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n flex: 1;\n text-align: right;\n"], ["\n flex: 1;\n text-align: right;\n"])));
|
|
17
17
|
export var TransactionsTable = function (_a) {
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
1
|
+
import React, { useContext, useState } from "react";
|
|
2
2
|
import { Queries } from "../webservice";
|
|
3
3
|
import ProtestosIcon from "../../assets/icones/protestos";
|
|
4
4
|
import StatusMessage from "../interface/statusMessage";
|
|
5
5
|
var Liminar = function () {
|
|
6
6
|
var ctx = useContext(Queries.Liminar);
|
|
7
|
+
var _a = useState(false), hideSection = _a[0], setHideSection = _a[1];
|
|
7
8
|
var Section = ctx.Section;
|
|
9
|
+
if (hideSection)
|
|
10
|
+
return null;
|
|
8
11
|
return (React.createElement(Section, { title: "Liminares para Remo\u00E7\u00E3o de Protesto", subtitle: "Ind\u00EDcios de liminares para oculta\u00E7\u00E3o de registros.", icon: ProtestosIcon, onSuccess: function (document) {
|
|
9
12
|
var possuiLiminar = document.totalProtestos === 'NADA CONSTA';
|
|
13
|
+
if (!possuiLiminar) {
|
|
14
|
+
setHideSection(true);
|
|
15
|
+
}
|
|
10
16
|
var message = possuiLiminar ? 'Encontrado' : 'Não encontrado';
|
|
11
17
|
return {
|
|
12
18
|
children: null,
|
|
@@ -5,6 +5,6 @@ import XPathUtils from '../../utils/xpath';
|
|
|
5
5
|
var PartnerRFBStatus = function (_a) {
|
|
6
6
|
var documento = _a.documento;
|
|
7
7
|
var _b = useQuery("SELECT FROM 'RFB'.'CERTIDAO'", { documento: documento }), isLoading = _b.isLoading, error = _b.error, response = _b.response;
|
|
8
|
-
return isLoading ? React.createElement(Loading, null) : error ? '
|
|
8
|
+
return isLoading ? React.createElement(Loading, null) : error ? '--' : XPathUtils.select('string(//situacao)', response === null || response === void 0 ? void 0 : response.document);
|
|
9
9
|
};
|
|
10
10
|
export default PartnerRFBStatus;
|
|
@@ -2,6 +2,6 @@ import React from "react";
|
|
|
2
2
|
import { ProcessoJuridicoResume } from "./types";
|
|
3
3
|
declare const ProcessosJuridicosList: React.FC<{
|
|
4
4
|
processos: ProcessoJuridicoResume[];
|
|
5
|
-
onClickConsultarProcessoJuridico
|
|
5
|
+
onClickConsultarProcessoJuridico?: (processo: string) => void;
|
|
6
6
|
}>;
|
|
7
7
|
export default ProcessosJuridicosList;
|
|
@@ -56,7 +56,7 @@ var ProcessosJuridicosList = function (_a) {
|
|
|
56
56
|
var processos = _a.processos, onClickConsultarProcessoJuridico = _a.onClickConsultarProcessoJuridico;
|
|
57
57
|
return (React.createElement(ResultList, { resultContentStriped: false }, processos.map(function (processo, i) { return (React.createElement("div", { key: i },
|
|
58
58
|
React.createElement(ProcessoJuridicoItem, { processo: processo },
|
|
59
|
-
React.createElement(ConsultarProcessoBtn, { onClick: function () { return onClickConsultarProcessoJuridico(processo.numero_novo); }, smallContent: "R$ 1" }, "Consultar Processo")))); })));
|
|
59
|
+
React.createElement(ConsultarProcessoBtn, { onClick: onClickConsultarProcessoJuridico ? function () { return onClickConsultarProcessoJuridico(processo.numero_novo); } : undefined, smallContent: "R$ 1" }, "Consultar Processo")))); })));
|
|
60
60
|
};
|
|
61
61
|
export default ProcessosJuridicosList;
|
|
62
62
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -23,15 +23,15 @@ import theme from "../interface/theme";
|
|
|
23
23
|
import { formatValue } from "../../utils/number";
|
|
24
24
|
import ChevronLeft from "../../assets/btn/chevronLeft";
|
|
25
25
|
import ChevronRight from "../../assets/btn/chevronRight";
|
|
26
|
-
var ContainerSummary = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n gap:
|
|
26
|
+
var ContainerSummary = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n gap: 16px;\n padding: 16px;\n width: 90%;\n"], ["\n display: grid;\n gap: 16px;\n padding: 16px;\n width: 90%;\n"])));
|
|
27
27
|
var ReclameAquiStatsContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
|
|
28
|
-
var LogoContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding:
|
|
29
|
-
var StyledImage = styled.img(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom:
|
|
30
|
-
var StatsImage = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom:
|
|
31
|
-
var CompanyName = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size:
|
|
32
|
-
var DocumentContainer = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-size:
|
|
28
|
+
var LogoContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 16px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 16px;\n"])));
|
|
29
|
+
var StyledImage = styled.img(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom: 16px;\n"], ["\n width: 60px;\n height: 60px;\n object-fit: cover;\n border-radius: 50%;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n margin-bottom: 16px;\n"])));
|
|
30
|
+
var StatsImage = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 60px;\n height: 60px;\n border-radius: 50%;\n object-fit: contain;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n border: 2px solid #fff;\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n background-image: url(", ");\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) { return props.src; });
|
|
31
|
+
var CompanyName = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: 16px;\n color: ", ";\n text-align: center;\n margin-bottom: 8px;\n line-height: 18px;\n font-weight: bold;\n"], ["\n font-size: 16px;\n color: ", ";\n text-align: center;\n margin-bottom: 8px;\n line-height: 18px;\n font-weight: bold;\n"])), theme.colors.cinzaEscuro);
|
|
32
|
+
var DocumentContainer = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-size: 16px;\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n font-size: 16px;\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), theme.colors.cinzaEscuro, theme.colors.cinzaClaro);
|
|
33
33
|
var DocumentPrefix = styled.span(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
34
|
-
var ProblemsSolved = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding:
|
|
34
|
+
var ProblemsSolved = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 16px 0;\n\n a {\n text-decoration: none;\n color: inherit;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 16px 0;\n\n a {\n text-decoration: none;\n color: inherit;\n }\n"])));
|
|
35
35
|
var CarrouselBtn = styled.span(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n cursor: pointer;\n height: fit-content;\n"], ["\n cursor: pointer;\n height: fit-content;\n"])));
|
|
36
36
|
var statusMap = {
|
|
37
37
|
GREAT: "Ótimo",
|
|
@@ -8,8 +8,8 @@ import theme from "../interface/theme";
|
|
|
8
8
|
import { formatCnpj, formatCpf } from '../../utils/string';
|
|
9
9
|
var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: 'Open Sans Condensed';\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5em;\n margin-top: 1em;\n"], ["\n font-family: 'Open Sans Condensed';\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5em;\n margin-top: 1em;\n"])));
|
|
10
10
|
var Title = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", "; \n"], ["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", "; \n"])), theme.typography.headline20.fontSize, theme.typography.headline20.fontWeight, theme.typography.headline20.lineHeight);
|
|
11
|
-
var DocumentContainer = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding:
|
|
12
|
-
var DocumentPrefix = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0
|
|
11
|
+
var DocumentContainer = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n color: ", ";\n text-align: center;\n position: relative;\n background-color: ", ";\n padding: 4px 8px;\n border-radius: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), theme.colors.cinzaEscuro, theme.colors.cinzaClaro);
|
|
12
|
+
var DocumentPrefix = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 8px;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 8px;\n"])));
|
|
13
13
|
var ResultadoDaPesquisa = function (_a) {
|
|
14
14
|
var documento = _a.documento;
|
|
15
15
|
var isCpf = (documento === null || documento === void 0 ? void 0 : documento.length) === 11;
|
|
@@ -3,9 +3,9 @@ import { HasCreditsType } from "./components/consultasComplementares";
|
|
|
3
3
|
type ConsultaSimplesProps = {
|
|
4
4
|
documento: string;
|
|
5
5
|
apiKey: string;
|
|
6
|
-
onClose
|
|
6
|
+
onClose?: () => void;
|
|
7
7
|
hasCredits?: HasCreditsType;
|
|
8
|
-
onClickConsultarProcessoJuridico
|
|
8
|
+
onClickConsultarProcessoJuridico?: (processoId: string) => void;
|
|
9
9
|
};
|
|
10
10
|
declare const ConsultaSimples: React.FC<ConsultaSimplesProps>;
|
|
11
11
|
export default ConsultaSimples;
|
|
@@ -33,9 +33,10 @@ var ConsultaSimples = function (_a) {
|
|
|
33
33
|
React.createElement(Wrapper, null,
|
|
34
34
|
React.createElement(ConsultaSimplesSection, { documento: documento, onClose: onClose },
|
|
35
35
|
React.createElement(ConsultaRfbProvider, { documento: documento },
|
|
36
|
-
React.createElement(Dossie, { documento: documento
|
|
36
|
+
React.createElement(Dossie, { documento: documento }),
|
|
37
|
+
React.createElement(Liminar, null),
|
|
37
38
|
React.createElement(Addresses, { apiKey: apiKey }),
|
|
38
|
-
React.createElement(Contacts,
|
|
39
|
+
React.createElement(Contacts, null),
|
|
39
40
|
React.createElement(Partners, null)),
|
|
40
41
|
React.createElement(Dominios, null),
|
|
41
42
|
React.createElement(BankAccounts, null),
|
|
@@ -47,7 +48,6 @@ var ConsultaSimples = function (_a) {
|
|
|
47
48
|
React.createElement(ConsultaScore, { documento: documento }),
|
|
48
49
|
React.createElement(ConsultaImoveis, { documento: documento }),
|
|
49
50
|
React.createElement(Veiculos, { documento: documento })),
|
|
50
|
-
React.createElement(Liminar, null),
|
|
51
51
|
React.createElement(Protestos, null),
|
|
52
52
|
React.createElement(CCF, null),
|
|
53
53
|
React.createElement(ProcessosJuridicos, { onClickConsultarProcessoJuridico: onClickConsultarProcessoJuridico })))))))))))));
|