@credithub/harlan-components 1.91.4 → 1.91.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/partners/partners.js +10 -7
- package/dist/consultaSimples.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/lib/cjs/index.js +399 -160
- package/lib/esm/index.js +399 -161
- package/package.json +1 -1
|
@@ -46,9 +46,9 @@ import PartnerList from './partnerList';
|
|
|
46
46
|
var Partners = function (_a) {
|
|
47
47
|
var onClickQSA = _a.onClickQSA;
|
|
48
48
|
var ctx = useContext(Queries.Finder);
|
|
49
|
-
var
|
|
49
|
+
var _b = useConsultaRfb(), rfbResponse = _b.rfbResponse, updatedOnce = _b.updatedOnce, error = _b.error;
|
|
50
50
|
var setData = useGlobalData().setData;
|
|
51
|
-
var
|
|
51
|
+
var _c = useState(false), dataUpdated = _c[0], setDataUpdated = _c[1];
|
|
52
52
|
useEffect(function () {
|
|
53
53
|
if (ctx.type === RequestStatus.Success && !dataUpdated && ctx.document) {
|
|
54
54
|
var data = ctx.document;
|
|
@@ -80,9 +80,7 @@ var Partners = function (_a) {
|
|
|
80
80
|
}, [ctx, rfbResponse, dataUpdated, setData]);
|
|
81
81
|
var response = function (data) {
|
|
82
82
|
var partnersNode = __spreadArray(__spreadArray([], XPathUtils.selectArray('//quadroSocietario/quadroSocietario', data), true), XPathUtils.selectArray('//participacoesEmpresas/participacoesEmpresas', data), true);
|
|
83
|
-
var
|
|
84
|
-
? partnersNode
|
|
85
|
-
: XPathUtils.selectArray('//RFB/socios/socio', rfbResponse)).map(function (partner) {
|
|
83
|
+
var formatPartner = function (partner) {
|
|
86
84
|
var documento = XPathUtils.select('string(documento)', partner);
|
|
87
85
|
return {
|
|
88
86
|
nome: XPathUtils.select('string(nome)', partner) || partner.textContent,
|
|
@@ -93,7 +91,12 @@ var Partners = function (_a) {
|
|
|
93
91
|
dividasPublicas: documento ? (React.createElement(PartnerDividasPublicas, { documento: documento })) : null,
|
|
94
92
|
protestos: documento ? React.createElement(PartnerProtestos, { documento: documento }) : null
|
|
95
93
|
};
|
|
96
|
-
}
|
|
94
|
+
};
|
|
95
|
+
var partnersFinder = partnersNode.map(formatPartner);
|
|
96
|
+
var partnersRfb = XPathUtils.selectArray('//RFB/socios/socio', rfbResponse).map(formatPartner);
|
|
97
|
+
var partners = !updatedOnce ? (partnersFinder.length
|
|
98
|
+
? partnersFinder
|
|
99
|
+
: partnersRfb) : error ? [] : partnersRfb.map(function (partnerRfb) { return partnersFinder.find(function (partnerFinder) { return partnerFinder.nome === partnerRfb.nome; }) || partnerRfb; });
|
|
97
100
|
var children = (partners === null || partners === void 0 ? void 0 : partners.length) ? (React.createElement(Result, null,
|
|
98
101
|
React.createElement(PartnerList, { onClickQSA: onClickQSA, partners: partners }))) : null;
|
|
99
102
|
return {
|
|
@@ -101,6 +104,6 @@ var Partners = function (_a) {
|
|
|
101
104
|
description: !(partners === null || partners === void 0 ? void 0 : partners.length) && (React.createElement(StatusMessage, null, "N\u00E3o h\u00E1 informa\u00E7\u00F5es de Quadro Societ\u00E1rio"))
|
|
102
105
|
};
|
|
103
106
|
};
|
|
104
|
-
return (React.createElement(Section, { ctx: ctx, title: "Quadro Societ\u00E1rio", minimized: false, subtitle: "Informa\u00E7\u00F5es sobre o quadro societ\u00E1rio da pessoa pesquisada.", icon: QuadroSocietarioIcon, isError: function () { return response(undefined); }, onSuccess: response }));
|
|
107
|
+
return (React.createElement(Section, { ctx: ctx, title: "Quadro Societ\u00E1rio", minimized: false, subtitle: "Informa\u00E7\u00F5es sobre o quadro societ\u00E1rio da pessoa pesquisada.", icon: QuadroSocietarioIcon, isError: function () { return response(undefined); }, onSuccess: function (data) { return response(data); } }));
|
|
105
108
|
};
|
|
106
109
|
export default Partners;
|
package/dist/consultaSimples.js
CHANGED
|
@@ -5,7 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import { Chart, registerables } from 'chart.js';
|
|
6
6
|
import React, { useContext } from 'react';
|
|
7
7
|
import styled, { ThemeProvider } from 'styled-components';
|
|
8
|
-
import { Addresses, BankAccounts, CCF, ChartSystem, Contacts, DividasPublicas, Dossie, Partners, ProcessosJuridicos, Protestos, Queries, RefinBoaVista, RefinSerasa, useQuery, Veiculos, WebServiceProvider } from './';
|
|
8
|
+
import { Addresses, BankAccounts, CCF, ChartSystem, Contacts, DividasPublicas, Dossie, Falencia, Partners, ProcessosJuridicos, Protestos, Queries, RefinBoaVista, RefinSerasa, useQuery, Veiculos, WebServiceProvider } from './';
|
|
9
9
|
import Modal from './components/common/modal';
|
|
10
10
|
import { ConsultaRfbProvider } from './components/consultaRfb';
|
|
11
11
|
import ConsultaSimplesSection from './components/consultaSimplesSection/consultaSimplesSection';
|
|
@@ -78,6 +78,7 @@ var ConsultaSimples = function (_a) {
|
|
|
78
78
|
React.createElement(ConsultaRfbProvider, { documento: documento },
|
|
79
79
|
React.createElement(Dossie, { documento: documento, printMode: printMode, isFinancial: isFinancial }),
|
|
80
80
|
React.createElement(Liminar, { isFinancial: isFinancial, hasCredits: hasCredits, tags: tags }),
|
|
81
|
+
React.createElement(Falencia, { documento: documento }),
|
|
81
82
|
React.createElement(Addresses, { apiKey: apiKey }),
|
|
82
83
|
React.createElement(Contacts, null),
|
|
83
84
|
React.createElement(Partners, { onClickQSA: onClickQSA })),
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as AddItemField } from './components/common/addItem';
|
|
|
6
6
|
export { default as Contacts } from './components/contacts/contacts';
|
|
7
7
|
export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
|
|
8
8
|
export { default as Dossie } from './components/dossie/dossie';
|
|
9
|
+
export { default as Falencia } from './components/falencia/falencia';
|
|
9
10
|
export { default as Header } from './components/interface/header';
|
|
10
11
|
export { default as Loading } from './components/interface/loading';
|
|
11
12
|
export * from './components/interface/result';
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { default as AddItemField } from './components/common/addItem';
|
|
|
6
6
|
export { default as Contacts } from './components/contacts/contacts';
|
|
7
7
|
export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
|
|
8
8
|
export { default as Dossie } from './components/dossie/dossie';
|
|
9
|
+
export { default as Falencia } from './components/falencia/falencia';
|
|
9
10
|
export { default as Header } from './components/interface/header';
|
|
10
11
|
export { default as Loading } from './components/interface/loading';
|
|
11
12
|
export * from './components/interface/result';
|