@credithub/harlan-components 1.18.4 → 1.19.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.
Files changed (201) hide show
  1. package/lib/cjs/index.js +736 -652
  2. package/lib/esm/assets/btn/chevronDown.d.ts +1 -1
  3. package/lib/esm/assets/btn/chevronDown.js +1 -1
  4. package/lib/esm/assets/btn/chevronLeft.d.ts +1 -1
  5. package/lib/esm/assets/btn/chevronLeft.js +3 -3
  6. package/lib/esm/assets/btn/chevronRight.d.ts +1 -1
  7. package/lib/esm/assets/btn/chevronRight.js +3 -3
  8. package/lib/esm/assets/btn/chevronUp.d.ts +1 -1
  9. package/lib/esm/assets/btn/chevronUp.js +2 -2
  10. package/lib/esm/assets/btn/closeIcon.d.ts +1 -1
  11. package/lib/esm/assets/btn/closeIcon.js +1 -1
  12. package/lib/esm/assets/btn/thumbUp.d.ts +1 -1
  13. package/lib/esm/assets/btn/thumbUp.js +4 -4
  14. package/lib/esm/assets/icones/chequesSemFundo.d.ts +2 -2
  15. package/lib/esm/assets/icones/chequesSemFundo.js +4 -4
  16. package/lib/esm/assets/icones/consultaSimples.d.ts +2 -2
  17. package/lib/esm/assets/icones/consultaSimples.js +4 -4
  18. package/lib/esm/assets/icones/contasBancarias.d.ts +1 -1
  19. package/lib/esm/assets/icones/contato.d.ts +2 -2
  20. package/lib/esm/assets/icones/contato.js +4 -4
  21. package/lib/esm/assets/icones/dividasVencidasSerasa.d.ts +2 -2
  22. package/lib/esm/assets/icones/dividasVencidasSerasa.js +3 -3
  23. package/lib/esm/assets/icones/dominios.d.ts +2 -2
  24. package/lib/esm/assets/icones/dominios.js +3 -3
  25. package/lib/esm/assets/icones/endereco.d.ts +3 -3
  26. package/lib/esm/assets/icones/endereco.js +4 -4
  27. package/lib/esm/assets/icones/iconeEmpresa.d.ts +1 -1
  28. package/lib/esm/assets/icones/iconeEmpresa.js +4 -4
  29. package/lib/esm/assets/icones/iconePessoa.d.ts +1 -1
  30. package/lib/esm/assets/icones/iconePessoa.js +4 -4
  31. package/lib/esm/assets/icones/imoveis.d.ts +2 -2
  32. package/lib/esm/assets/icones/imoveis.js +3 -3
  33. package/lib/esm/assets/icones/pefinRefinBoaVista.d.ts +1 -1
  34. package/lib/esm/assets/icones/pefinRefinBoaVista.js +2 -2
  35. package/lib/esm/assets/icones/pefinRefinSerasa.d.ts +1 -1
  36. package/lib/esm/assets/icones/pefinRefinSerasa.js +2 -2
  37. package/lib/esm/assets/icones/processosJuridicos.d.ts +1 -1
  38. package/lib/esm/assets/icones/protestos.d.ts +2 -2
  39. package/lib/esm/assets/icones/protestos.js +4 -4
  40. package/lib/esm/assets/icones/protestosCredito.d.ts +2 -2
  41. package/lib/esm/assets/icones/protestosCredito.js +4 -4
  42. package/lib/esm/assets/icones/protestosGerais.d.ts +2 -2
  43. package/lib/esm/assets/icones/protestosGerais.js +4 -4
  44. package/lib/esm/assets/icones/protestosImpostos.d.ts +2 -2
  45. package/lib/esm/assets/icones/protestosImpostos.js +4 -4
  46. package/lib/esm/assets/icones/resumoNegativacoes.d.ts +1 -1
  47. package/lib/esm/assets/icones/resumoNegativacoes.js +1 -1
  48. package/lib/esm/assets/icones/scoreBoaVista.d.ts +2 -2
  49. package/lib/esm/assets/icones/scoreBoaVista.js +3 -3
  50. package/lib/esm/assets/icones/scr.d.ts +2 -2
  51. package/lib/esm/assets/icones/scr.js +3 -3
  52. package/lib/esm/assets/icones/ultimaMovimentacao.d.ts +2 -2
  53. package/lib/esm/assets/icones/ultimaMovimentacao.js +4 -4
  54. package/lib/esm/assets/icones/veiculos.d.ts +2 -2
  55. package/lib/esm/assets/icones/veiculos.js +3 -3
  56. package/lib/esm/components/adresses/addresses.d.ts +1 -1
  57. package/lib/esm/components/adresses/addresses.js +21 -17
  58. package/lib/esm/components/adresses/getGeocode.js +2 -2
  59. package/lib/esm/components/adresses/map.d.ts +1 -1
  60. package/lib/esm/components/adresses/map.js +5 -5
  61. package/lib/esm/components/bank-accounts/bank-accounts.d.ts +1 -1
  62. package/lib/esm/components/bank-accounts/bank-accounts.js +19 -15
  63. package/lib/esm/components/ccf/ccf.d.ts +1 -1
  64. package/lib/esm/components/ccf/ccf.js +16 -16
  65. package/lib/esm/components/ccf/ccfList.d.ts +1 -1
  66. package/lib/esm/components/ccf/ccfList.js +6 -6
  67. package/lib/esm/components/chart/chartContent.d.ts +2 -2
  68. package/lib/esm/components/chart/chartContent.js +12 -12
  69. package/lib/esm/components/chart/chartSystem.d.ts +1 -1
  70. package/lib/esm/components/chart/chartSystem.js +19 -19
  71. package/lib/esm/components/chart/components/MixedChart.d.ts +2 -2
  72. package/lib/esm/components/chart/components/MixedChart.js +15 -15
  73. package/lib/esm/components/chart/components/PieChart.d.ts +2 -2
  74. package/lib/esm/components/chart/components/PieChart.js +3 -3
  75. package/lib/esm/components/chart/components/categoryProtestos.d.ts +3 -3
  76. package/lib/esm/components/chart/components/categoryProtestos.js +4 -4
  77. package/lib/esm/components/chart/hooks/useCategoryProtestos.d.ts +5 -5
  78. package/lib/esm/components/chart/hooks/useCategoryProtestos.js +23 -23
  79. package/lib/esm/components/chart/hooks/useChartData.d.ts +1 -1
  80. package/lib/esm/components/chart/hooks/useChartData.js +8 -8
  81. package/lib/esm/components/chart/hooks/useMixedChartData.d.ts +5 -5
  82. package/lib/esm/components/chart/hooks/useMixedChartData.js +10 -10
  83. package/lib/esm/components/chart/hooks/usePieChartData.d.ts +4 -4
  84. package/lib/esm/components/chart/hooks/usePieChartData.js +34 -34
  85. package/lib/esm/components/chart/quantityResult.d.ts +2 -2
  86. package/lib/esm/components/chart/quantityResult.js +6 -6
  87. package/lib/esm/components/chart/types/iChart.d.ts +4 -4
  88. package/lib/esm/components/chart/utils/chartCustomization.d.ts +4 -4
  89. package/lib/esm/components/chart/utils/chartCustomization.js +62 -62
  90. package/lib/esm/components/chart/utils/chartUtils.d.ts +1 -1
  91. package/lib/esm/components/chart/utils/chartUtils.js +9 -9
  92. package/lib/esm/components/chart/utils/dataManipulation.d.ts +1 -1
  93. package/lib/esm/components/chart/utils/dataManipulation.js +17 -17
  94. package/lib/esm/components/chart/utils/dataProcessing.d.ts +2 -2
  95. package/lib/esm/components/chart/utils/dataProcessing.js +16 -16
  96. package/lib/esm/components/common/addItem.d.ts +1 -1
  97. package/lib/esm/components/common/addItem.js +6 -6
  98. package/lib/esm/components/common/button.d.ts +1 -1
  99. package/lib/esm/components/common/button.js +5 -5
  100. package/lib/esm/components/common/content.js +2 -2
  101. package/lib/esm/components/consultaRfb.d.ts +1 -1
  102. package/lib/esm/components/consultaRfb.js +2 -2
  103. package/lib/esm/components/consultaSimplesSection/consultaSimplesSection.js +34 -14
  104. package/lib/esm/components/consultasComplementares.d.ts +6 -6
  105. package/lib/esm/components/consultasComplementares.js +9 -9
  106. package/lib/esm/components/contacts/contactLikeDislikeSection.d.ts +3 -3
  107. package/lib/esm/components/contacts/contactLikeDislikeSection.js +16 -16
  108. package/lib/esm/components/contacts/contacts.d.ts +1 -1
  109. package/lib/esm/components/contacts/contacts.js +16 -10
  110. package/lib/esm/components/contacts/contactsLikeDislike.d.ts +1 -1
  111. package/lib/esm/components/contacts/contactsLikeDislike.js +2 -2
  112. package/lib/esm/components/contacts/thumbsButton.d.ts +1 -1
  113. package/lib/esm/components/contacts/thumbsButton.js +19 -19
  114. package/lib/esm/components/dividasPublicas/dividasPublicas.d.ts +1 -1
  115. package/lib/esm/components/dividasPublicas/dividasPublicas.js +10 -10
  116. package/lib/esm/components/dominios/dominios.d.ts +1 -1
  117. package/lib/esm/components/dominios/dominios.js +13 -9
  118. package/lib/esm/components/dossie/carrousel/carrousel.d.ts +1 -1
  119. package/lib/esm/components/dossie/carrousel/carrousel.js +3 -3
  120. package/lib/esm/components/dossie/companyLogo/companyLogo.d.ts +1 -1
  121. package/lib/esm/components/dossie/companyLogo/companyLogo.js +9 -9
  122. package/lib/esm/components/dossie/dossie.d.ts +1 -1
  123. package/lib/esm/components/dossie/dossie.js +16 -17
  124. package/lib/esm/components/dossie/summary/cardsAndProducts.js +98 -90
  125. package/lib/esm/components/dossie/summary/summary.d.ts +1 -1
  126. package/lib/esm/components/dossie/summary/summary.js +21 -18
  127. package/lib/esm/components/dossie/summary/utils.js +8 -8
  128. package/lib/esm/components/dossie/transactionTable/transactionTable.d.ts +1 -1
  129. package/lib/esm/components/dossie/transactionTable/transactionTable.js +8 -8
  130. package/lib/esm/components/imoveis/imoveisService.d.ts +1 -1
  131. package/lib/esm/components/imoveis/imoveisService.js +12 -12
  132. package/lib/esm/components/interface/globalStyle.js +1 -1
  133. package/lib/esm/components/interface/header.d.ts +3 -3
  134. package/lib/esm/components/interface/header.js +6 -6
  135. package/lib/esm/components/interface/loadingBar.js +2 -2
  136. package/lib/esm/components/interface/responsiveGrid.d.ts +1 -1
  137. package/lib/esm/components/interface/responsiveGrid.js +2 -2
  138. package/lib/esm/components/interface/result.js +6 -4
  139. package/lib/esm/components/interface/resultWithoutInformation.js +1 -1
  140. package/lib/esm/components/interface/section.d.ts +2 -2
  141. package/lib/esm/components/interface/section.js +11 -12
  142. package/lib/esm/components/interface/statusMessage.js +3 -3
  143. package/lib/esm/components/interface/theme.js +34 -34
  144. package/lib/esm/components/liminar/liminar.d.ts +1 -1
  145. package/lib/esm/components/liminar/liminar.js +5 -5
  146. package/lib/esm/components/partners/partner-dividas-publicas.js +3 -3
  147. package/lib/esm/components/partners/partner-protestos.js +3 -3
  148. package/lib/esm/components/partners/partner-rfb-status.js +3 -3
  149. package/lib/esm/components/partners/partnerField.d.ts +1 -1
  150. package/lib/esm/components/partners/partnerField.js +3 -3
  151. package/lib/esm/components/partners/partnerList.d.ts +1 -1
  152. package/lib/esm/components/partners/partnerList.js +8 -8
  153. package/lib/esm/components/partners/partners.d.ts +1 -1
  154. package/lib/esm/components/partners/partners.js +18 -16
  155. package/lib/esm/components/pep/pep.d.ts +1 -1
  156. package/lib/esm/components/pep/pep.js +11 -8
  157. package/lib/esm/components/processos-juridicos/envolvidosList.js +2 -2
  158. package/lib/esm/components/processos-juridicos/processosJuridicos.d.ts +1 -1
  159. package/lib/esm/components/processos-juridicos/processosJuridicos.js +9 -7
  160. package/lib/esm/components/processos-juridicos/processosJuridicosList.d.ts +2 -2
  161. package/lib/esm/components/processos-juridicos/processosJuridicosList.js +12 -10
  162. package/lib/esm/components/protestos/getTotalProtestos.js +2 -2
  163. package/lib/esm/components/protestos/protestos.d.ts +1 -1
  164. package/lib/esm/components/protestos/protestos.js +32 -26
  165. package/lib/esm/components/protestos/protestosCategory.d.ts +2 -2
  166. package/lib/esm/components/protestos/protestosCategory.js +15 -13
  167. package/lib/esm/components/protestos/protestosList.d.ts +2 -2
  168. package/lib/esm/components/protestos/protestosList.js +20 -20
  169. package/lib/esm/components/reclameAqui/reclameAquiCarousel.d.ts +1 -1
  170. package/lib/esm/components/reclameAqui/reclameAquiCarousel.js +20 -20
  171. package/lib/esm/components/refinBoaVista/refinBoaVista.js +22 -15
  172. package/lib/esm/components/refinSerasa/refinSerasa.d.ts +1 -1
  173. package/lib/esm/components/refinSerasa/refinSerasa.js +26 -26
  174. package/lib/esm/components/refinSerasa/types.d.ts +2 -2
  175. package/lib/esm/components/resultadoDaPesquisa/resultado-da-pesquisa.js +6 -6
  176. package/lib/esm/components/score/scoreService.d.ts +1 -1
  177. package/lib/esm/components/score/scoreService.js +10 -10
  178. package/lib/esm/components/scr/getResumoDeCreditos.d.ts +1 -1
  179. package/lib/esm/components/scr/getResumoDeCreditos.js +9 -9
  180. package/lib/esm/components/scr/getResumoDeModalidades.d.ts +1 -1
  181. package/lib/esm/components/scr/getResumoDeModalidades.js +25 -27
  182. package/lib/esm/components/scr/scr.d.ts +1 -1
  183. package/lib/esm/components/scr/scr.js +23 -23
  184. package/lib/esm/components/scr/types.d.ts +5 -5
  185. package/lib/esm/components/veiculos/veiculos.js +28 -19
  186. package/lib/esm/components/webservice.d.ts +5 -5
  187. package/lib/esm/components/webservice.js +35 -31
  188. package/lib/esm/consultaSimples.d.ts +2 -2
  189. package/lib/esm/consultaSimples.js +14 -14
  190. package/lib/esm/hooks/useConsultaRfb.js +3 -3
  191. package/lib/esm/hooks/useConsultasComplementares.js +3 -3
  192. package/lib/esm/hooks/useToggle.js +1 -1
  193. package/lib/esm/hooks/useWindowSize.js +5 -5
  194. package/lib/esm/index.d.ts +23 -23
  195. package/lib/esm/index.js +23 -23
  196. package/lib/esm/utils/calculation.js +4 -4
  197. package/lib/esm/utils/formatter.js +3 -3
  198. package/lib/esm/utils/number.js +7 -7
  199. package/lib/esm/utils/string.js +11 -11
  200. package/lib/esm/utils/xpath.js +1 -1
  201. package/package.json +4 -1
@@ -2,25 +2,25 @@ 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
- import React, { memo } from "react";
6
- import styled from "styled-components";
7
- import PartnerField from "../common/addItem";
8
- import { ResultContent } from "../interface/result";
9
- import Button from "../common/button";
5
+ import React, { memo } from 'react';
6
+ import styled from 'styled-components';
7
+ import PartnerField from '../common/addItem';
8
+ import { ResultContent } from '../interface/result';
9
+ import Button from '../common/button';
10
10
  var ButtonPartner = styled(Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: 100px;\n margin: 0;\n"], ["\n max-width: 100px;\n margin: 0;\n"])));
11
11
  var PartnerList = memo(function (_a) {
12
12
  var partners = _a.partners, onClickQSA = _a.onClickQSA;
13
13
  return partners.map(function (partner, key) {
14
14
  var _a, _b;
15
15
  return (React.createElement(ResultContent, { key: key, desktop: "2fr 1fr 0.7fr 1fr 1fr 1fr", tablet: "2fr repeat(2, 1fr)" },
16
- React.createElement(PartnerField, { name: partner.cnpj ? "Empresa" : (_a = partner.cargo) !== null && _a !== void 0 ? _a : "", value: partner.nome }),
17
- React.createElement(PartnerField, { name: partner.cnpj ? "CNPJ" : "CPF", value: (_b = (partner.cnpj || partner.cpf)) !== null && _b !== void 0 ? _b : "", onClick: function () { var _a, _b; return (_a = partner.onClickCpfCnpj) === null || _a === void 0 ? void 0 : _a.call(partner, (_b = (partner.cnpj || partner.cpf)) !== null && _b !== void 0 ? _b : ""); } }),
16
+ React.createElement(PartnerField, { name: partner.cnpj ? 'Empresa' : (_a = partner.cargo) !== null && _a !== void 0 ? _a : '', value: partner.nome }),
17
+ React.createElement(PartnerField, { name: partner.cnpj ? 'CNPJ' : 'CPF', value: (_b = (partner.cnpj || partner.cpf)) !== null && _b !== void 0 ? _b : '', onClick: function () { var _a, _b; return (_a = partner.onClickCpfCnpj) === null || _a === void 0 ? void 0 : _a.call(partner, (_b = (partner.cnpj || partner.cpf)) !== null && _b !== void 0 ? _b : ''); } }),
18
18
  React.createElement(PartnerField, { name: "Protestos", value: partner === null || partner === void 0 ? void 0 : partner.protestos }),
19
19
  React.createElement(PartnerField, { name: "Receita Status", value: partner.receitaStatus }),
20
20
  React.createElement(PartnerField, { name: "Dividas P\u00FAblicas", value: partner.dividasPublicas }),
21
21
  React.createElement("div", null, (partner.cpf || partner.cnpj) && (React.createElement(ButtonPartner, { onClick: function (e) {
22
22
  e.preventDefault();
23
- onClickQSA(partner.cpf || partner.cnpj || "");
23
+ onClickQSA(partner.cpf || partner.cnpj || '');
24
24
  } }, "Abrir")))));
25
25
  });
26
26
  });
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare const Partners: ({ onClickQSA }: {
3
3
  onClickQSA: (cpfCnpj: string) => void;
4
4
  }) => React.JSX.Element;
@@ -7,18 +7,18 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
7
7
  }
8
8
  return to.concat(ar || Array.prototype.slice.call(from));
9
9
  };
10
- import React, { useContext } from "react";
11
- import { Result } from "../interface/result";
12
- import PartnerList from "./partnerList";
13
- import { Queries } from "../webservice";
14
- import XPathUtils from "../../utils/xpath";
15
- import { formatCnpj, formatCpf, isCnpj } from "../../utils/string";
16
- import PartnerRFBStatus from "./partner-rfb-status";
17
- import PartnerProtestos from "./partner-protestos";
18
- import PartnerDividasPublicas from "./partner-dividas-publicas";
19
- import QuadroSocietarioIcon from "../../assets/icones/quadroSocietario";
20
- import StatusMessage from "../interface/statusMessage";
21
- import { useConsultaRfb } from "../../hooks/useConsultaRfb";
10
+ import React, { useContext } from 'react';
11
+ import { Result } from '../interface/result';
12
+ import PartnerList from './partnerList';
13
+ import { Queries } from '../webservice';
14
+ import XPathUtils from '../../utils/xpath';
15
+ import { formatCnpj, formatCpf, isCnpj } from '../../utils/string';
16
+ import PartnerRFBStatus from './partner-rfb-status';
17
+ import PartnerProtestos from './partner-protestos';
18
+ import PartnerDividasPublicas from './partner-dividas-publicas';
19
+ import QuadroSocietarioIcon from '../../assets/icones/quadroSocietario';
20
+ import StatusMessage from '../interface/statusMessage';
21
+ import { useConsultaRfb } from '../../hooks/useConsultaRfb';
22
22
  var Partners = function (_a) {
23
23
  var onClickQSA = _a.onClickQSA;
24
24
  var ctx = useContext(Queries.Finder);
@@ -26,15 +26,17 @@ var Partners = function (_a) {
26
26
  var Section = ctx.Section;
27
27
  var response = function (data) {
28
28
  var partnersNode = __spreadArray(__spreadArray([], XPathUtils.selectArray('//quadroSocietario/quadroSocietario', data), true), XPathUtils.selectArray('//participacoesEmpresas/participacoesEmpresas', data), true);
29
- var partners = (partnersNode.length ? partnersNode : XPathUtils.selectArray('//RFB/socios/socio', rfbResponse)).map(function (partner) {
29
+ var partners = (partnersNode.length
30
+ ? partnersNode
31
+ : XPathUtils.selectArray('//RFB/socios/socio', rfbResponse)).map(function (partner) {
30
32
  var documento = XPathUtils.select('string(documento)', partner);
31
33
  return {
32
34
  nome: XPathUtils.select('string(nome)', partner) || partner.textContent,
33
35
  cpf: (!isCnpj(documento) && formatCpf(documento)) || '',
34
36
  cargo: XPathUtils.select('string(qualificacaoSocio)', partner),
35
37
  cnpj: (isCnpj(documento) && formatCnpj(documento)) || '',
36
- receitaStatus: documento ? React.createElement(PartnerRFBStatus, { documento: documento }) : null,
37
- dividasPublicas: documento ? React.createElement(PartnerDividasPublicas, { documento: documento }) : null,
38
+ receitaStatus: documento ? (React.createElement(PartnerRFBStatus, { documento: documento })) : null,
39
+ dividasPublicas: documento ? (React.createElement(PartnerDividasPublicas, { documento: documento })) : null,
38
40
  protestos: documento ? React.createElement(PartnerProtestos, { documento: documento }) : null
39
41
  };
40
42
  });
@@ -42,7 +44,7 @@ var Partners = function (_a) {
42
44
  React.createElement(PartnerList, { onClickQSA: onClickQSA, partners: partners }))) : null;
43
45
  return {
44
46
  children: children,
45
- 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")
47
+ 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"))
46
48
  };
47
49
  };
48
50
  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 }));
@@ -1,3 +1,3 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare const PessoaPoliticamenteExposta: React.FC;
3
3
  export default PessoaPoliticamenteExposta;
@@ -1,8 +1,8 @@
1
- import React, { useContext } from "react";
2
- import { Queries } from "../webservice";
3
- import XPathUtils from "../../utils/xpath";
4
- import { Result } from "../interface/result";
5
- import AddItemField from "../common/addItem";
1
+ import React, { useContext } from 'react';
2
+ import { Queries } from '../webservice';
3
+ import XPathUtils from '../../utils/xpath';
4
+ import { Result } from '../interface/result';
5
+ import AddItemField from '../common/addItem';
6
6
  var PessoaPoliticamenteExposta = function () {
7
7
  var ctx = useContext(Queries.Finder);
8
8
  var Section = ctx.Section;
@@ -15,14 +15,17 @@ var PessoaPoliticamenteExposta = function () {
15
15
  React.createElement("div", { className: "content" }, FIELDS.map(function (field) { return (React.createElement(AddItemField, { key: field.key, name: field.name, value: pepData[field.key] })); }))))) : null;
16
16
  return {
17
17
  children: children,
18
- description: ((_c = data === null || data === void 0 ? void 0 : data.childNodes) === null || _c === void 0 ? void 0 : _c.length) ? '' : 'Não foram encontradas informações de pessoa politicamente exposta.',
18
+ description: ((_c = data === null || data === void 0 ? void 0 : data.childNodes) === null || _c === void 0 ? void 0 : _c.length)
19
+ ? ''
20
+ : 'Não foram encontradas informações de pessoa politicamente exposta.'
19
21
  };
20
22
  } }));
21
23
  };
22
24
  var parsePepData = function (data) {
23
25
  var pep = Object.fromEntries(FIELDS.map(function (field) { return [
24
26
  field.key,
25
- XPathUtils.select("string(./".concat(field.key, ")"), data) || 'NÃO INFORMADO',
27
+ XPathUtils.select("string(./".concat(field.key, ")"), data) ||
28
+ 'NÃO INFORMADO'
26
29
  ]; }));
27
30
  return pep;
28
31
  };
@@ -33,6 +36,6 @@ var FIELDS = [
33
36
  { key: 'nome_orgao', name: 'Nome do Orgão' },
34
37
  { key: 'data_inicio_exercicio', name: 'Data de Início do Exercício' },
35
38
  { key: 'data_fim_exercicio', name: 'Data de Fim do Exercício' },
36
- { key: 'data_fim_carencia', name: 'Data de Fim da Carência' },
39
+ { key: 'data_fim_carencia', name: 'Data de Fim da Carência' }
37
40
  ];
38
41
  export default PessoaPoliticamenteExposta;
@@ -8,8 +8,8 @@ import styled from 'styled-components';
8
8
  import ResponsiveGrid from '../interface/responsiveGrid';
9
9
  import theme from '../interface/theme';
10
10
  import { ResultContent } from '../interface/result';
11
- var EnvolvidosListWrapper = styled(ResultContent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n gap: 8px;\n color: ", ";\n width: 100%;\n \n .field > .value, .name {\n color: ", "\n }\n"], ["\n gap: 8px;\n color: ", ";\n width: 100%;\n \n .field > .value, .name {\n color: ", "\n }\n"])), theme.colors.prata, theme.colors.prata);
12
- var EnvolvidosUltimaMovimentacaoTitle = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: ", ";\n"], ["\n font-weight: ", ";\n"])), theme.typography.headline16.fontWeight);
11
+ var EnvolvidosListWrapper = styled(ResultContent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n gap: 8px;\n color: ", ";\n width: 100%;\n\n .field > .value,\n .name {\n color: ", ";\n }\n"], ["\n gap: 8px;\n color: ", ";\n width: 100%;\n\n .field > .value,\n .name {\n color: ", ";\n }\n"])), theme.colors.prata, theme.colors.prata);
12
+ var EnvolvidosUltimaMovimentacaoTitle = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: ", ";\n"], ["\n font-weight: ", ";\n"])), theme.typography.headline16.fontWeight);
13
13
  var EnvolvidosList = function (_a) {
14
14
  var envolvidos = _a.envolvidos;
15
15
  return (React.createElement(EnvolvidosListWrapper, { desktop: "1fr 3fr", tablet: "1fr" },
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare const ProcessosJuridicos: React.FC<{
3
3
  onClickConsultarProcessoJuridico?: (processo: string) => void;
4
4
  }>;
@@ -1,9 +1,9 @@
1
- import React, { useContext } from "react";
2
- import ProcessosJuridicosList from "./processosJuridicosList";
3
- import { Queries } from "../webservice";
4
- import ResultWithoutInformation from "../interface/resultWithoutInformation";
5
- import ProcessosJuridicosIcon from "../../assets/icones/processosJuridicos";
6
- import StatusMessage from "../interface/statusMessage";
1
+ import React, { useContext } from 'react';
2
+ import ProcessosJuridicosList from './processosJuridicosList';
3
+ import { Queries } from '../webservice';
4
+ import ResultWithoutInformation from '../interface/resultWithoutInformation';
5
+ import ProcessosJuridicosIcon from '../../assets/icones/processosJuridicos';
6
+ import StatusMessage from '../interface/statusMessage';
7
7
  var ProcessosJuridicos = function (_a) {
8
8
  var onClickConsultarProcessoJuridico = _a.onClickConsultarProcessoJuridico;
9
9
  var ctx = useContext(Queries.ProcessosJuridicos);
@@ -15,7 +15,9 @@ var ProcessosJuridicos = function (_a) {
15
15
  var children = ((_b = data === null || data === void 0 ? void 0 : data.empresa) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement(ProcessosJuridicosList, { processos: data === null || data === void 0 ? void 0 : data.empresa, onClickConsultarProcessoJuridico: onClickConsultarProcessoJuridico })) : null;
16
16
  return {
17
17
  children: children,
18
- description: React.createElement(StatusMessage, { type: ((_c = data === null || data === void 0 ? void 0 : data.empresa) === null || _c === void 0 ? void 0 : _c.length) ? 'error' : 'default' }, ((_d = data === null || data === void 0 ? void 0 : data.empresa) === null || _d === void 0 ? void 0 : _d.length) ? "Pesquisa concluída" : "Não foram econtrados processos jurídicos para o documento pesquisado"),
18
+ description: (React.createElement(StatusMessage, { type: ((_c = data === null || data === void 0 ? void 0 : data.empresa) === null || _c === void 0 ? void 0 : _c.length) ? 'error' : 'default' }, ((_d = data === null || data === void 0 ? void 0 : data.empresa) === null || _d === void 0 ? void 0 : _d.length)
19
+ ? 'Pesquisa concluída'
20
+ : 'Não foram econtrados processos jurídicos para o documento pesquisado')),
19
21
  variant: ((_e = data === null || data === void 0 ? void 0 : data.empresa) === null || _e === void 0 ? void 0 : _e.length) ? 'error' : 'default'
20
22
  };
21
23
  } }));
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { ProcessoJuridicoResume } from "./types";
1
+ import React from 'react';
2
+ import { ProcessoJuridicoResume } from './types';
3
3
  declare const ProcessosJuridicosList: React.FC<{
4
4
  processos: ProcessoJuridicoResume[];
5
5
  onClickConsultarProcessoJuridico?: (processo: string) => void;
@@ -24,18 +24,18 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  }
25
25
  return t;
26
26
  };
27
- import React, { memo } from "react";
28
- import { Result, ResultContent } from "../interface/result";
29
- import AddItem from "../common/addItem";
30
- import Button from "../common/button";
31
- import styled from "styled-components";
32
- import theme from "../interface/theme";
33
- import EnvolvidosList from "./envolvidosList";
27
+ import React, { memo } from 'react';
28
+ import { Result, ResultContent } from '../interface/result';
29
+ import AddItem from '../common/addItem';
30
+ import Button from '../common/button';
31
+ import styled from 'styled-components';
32
+ import theme from '../interface/theme';
33
+ import EnvolvidosList from './envolvidosList';
34
34
  var AddProcessoJuridicoField = function (_a) {
35
35
  var value = _a.value, props = __rest(_a, ["value"]);
36
- return (React.createElement(AddItem, __assign({}, props, { value: value || "Não Informado" })));
36
+ return (React.createElement(AddItem, __assign({}, props, { value: value || 'Não Informado' })));
37
37
  };
38
- var ProcessoJuridicoWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n \n @media only screen and (min-width: 1000px) {\n flex-direction: row;\n } \n"], ["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n \n @media only screen and (min-width: 1000px) {\n flex-direction: row;\n } \n"])));
38
+ var ProcessoJuridicoWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n @media only screen and (min-width: 1000px) {\n flex-direction: row;\n }\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n @media only screen and (min-width: 1000px) {\n flex-direction: row;\n }\n"])));
39
39
  var ConsultarProcessoBtn = styled(Button)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n @media only screen and (min-width: 1000px) {\n width: 100%;\n max-width: 150px;\n height: max-content;\n }\n"], ["\n @media only screen and (min-width: 1000px) {\n width: 100%;\n max-width: 150px;\n height: max-content;\n }\n"])));
40
40
  var ResultWrapper = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
41
41
  var ProcessoJuridicoItem = memo(function (_a) {
@@ -56,7 +56,9 @@ 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: onClickConsultarProcessoJuridico ? function () { return onClickConsultarProcessoJuridico(processo.numero_novo); } : undefined, smallContent: "R$ 1" }, "Consultar Processo")))); })));
59
+ React.createElement(ConsultarProcessoBtn, { onClick: onClickConsultarProcessoJuridico
60
+ ? function () { return onClickConsultarProcessoJuridico(processo.numero_novo); }
61
+ : undefined, smallContent: "R$ 1" }, "Consultar Processo")))); })));
60
62
  };
61
63
  export default ProcessosJuridicosList;
62
64
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -1,4 +1,4 @@
1
- import XPathUtils from "../../utils/xpath";
1
+ import XPathUtils from '../../utils/xpath';
2
2
  export default function getTotalProtestos(response) {
3
- return XPathUtils.select("number(//registros)", response);
3
+ return XPathUtils.select('number(//registros)', response);
4
4
  }
@@ -1,3 +1,3 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare const Protestos: React.FC;
3
3
  export default Protestos;
@@ -3,50 +3,56 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  /* eslint-disable @typescript-eslint/no-explicit-any */
6
- import React, { useContext } from "react";
7
- import { Queries } from "../webservice";
8
- import ProtestosCategory from "./protestosCategory";
9
- import { ProtestoItem } from "./protestosList";
10
- import XPathUtils from "../../utils/xpath";
11
- import { REGEX_PROTESTOS_DE_CREDITO, REGEX_PROTESTOS_DE_IMPOSTO, } from "../../constants/regex";
12
- import ProtestosIcon from "../../assets/icones/protestos";
13
- import ProtestosGeraisIcon from "../../assets/icones/protestosGerais";
14
- import ProtestosCreditoIcon from "../../assets/icones/protestosCredito";
15
- import ProtestosImpostosIcon from "../../assets/icones/protestosImpostos";
16
- import StatusMessage from "../interface/statusMessage";
17
- import styled from "styled-components";
18
- import { formatDatePtBrToDate } from "../../utils/string";
6
+ import React, { useContext } from 'react';
7
+ import { Queries } from '../webservice';
8
+ import ProtestosCategory from './protestosCategory';
9
+ import { ProtestoItem } from './protestosList';
10
+ import XPathUtils from '../../utils/xpath';
11
+ import { REGEX_PROTESTOS_DE_CREDITO, REGEX_PROTESTOS_DE_IMPOSTO } from '../../constants/regex';
12
+ import ProtestosIcon from '../../assets/icones/protestos';
13
+ import ProtestosGeraisIcon from '../../assets/icones/protestosGerais';
14
+ import ProtestosCreditoIcon from '../../assets/icones/protestosCredito';
15
+ import ProtestosImpostosIcon from '../../assets/icones/protestosImpostos';
16
+ import StatusMessage from '../interface/statusMessage';
17
+ import styled from 'styled-components';
18
+ import { formatDatePtBrToDate } from '../../utils/string';
19
19
  var ResultProtestos = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n row-gap: 20px;\n margin-top: 20px;\n"], ["\n display: flex;\n flex-direction: column;\n row-gap: 20px;\n margin-top: 20px;\n"])));
20
20
  var Protestos = function () {
21
21
  var ctx = useContext(Queries.Protestos);
22
22
  var Section = ctx.Section;
23
23
  var filterProtestos = function (regex, data) {
24
- return XPathUtils.selectArray("//body//protesto", data).filter(function (protesto) {
25
- return regex.test(XPathUtils.select("string(./nomeCedente)", protesto));
24
+ return XPathUtils.selectArray('//body//protesto', data).filter(function (protesto) {
25
+ return regex.test(XPathUtils.select('string(./nomeCedente)', protesto));
26
26
  });
27
27
  };
28
28
  return (React.createElement(Section, { ctx: ctx, title: "Apontamentos na Central de Protestos (CENPROT)", subtitle: "Consulta de protestos de cr\u00E9dito, imposto e gerais.", icon: ProtestosIcon, onSuccess: function (data) {
29
- var byDate = function (protesto, protesto2) { var _a, _b; return ((_a = formatDatePtBrToDate(XPathUtils.select("string(./dataProtesto)", protesto2))) === null || _a === void 0 ? void 0 : _a.getTime()) - ((_b = formatDatePtBrToDate(XPathUtils.select("string(./dataProtesto)", protesto))) === null || _b === void 0 ? void 0 : _b.getTime()); };
30
- var registros = XPathUtils.select("number(//registros)", data);
29
+ var byDate = function (protesto, protesto2) {
30
+ var _a, _b;
31
+ return ((_a = formatDatePtBrToDate(XPathUtils.select('string(./dataProtesto)', protesto2))) === null || _a === void 0 ? void 0 : _a.getTime()) -
32
+ ((_b = formatDatePtBrToDate(XPathUtils.select('string(./dataProtesto)', protesto))) === null || _b === void 0 ? void 0 : _b.getTime());
33
+ };
34
+ var registros = XPathUtils.select('number(//registros)', data);
31
35
  var protestosDeCredito = filterProtestos(REGEX_PROTESTOS_DE_CREDITO, data).sort(byDate);
32
36
  var protestosDeImposto = filterProtestos(REGEX_PROTESTOS_DE_IMPOSTO, data).sort(byDate);
33
- var protestosGerais = XPathUtils.selectArray("//body//protesto", data).filter(function (protesto) {
34
- var nomeCedente = XPathUtils.select("string(./nomeCedente)", protesto);
37
+ var protestosGerais = XPathUtils.selectArray('//body//protesto', data)
38
+ .filter(function (protesto) {
39
+ var nomeCedente = XPathUtils.select('string(./nomeCedente)', protesto);
35
40
  return (!REGEX_PROTESTOS_DE_IMPOSTO.test(nomeCedente) &&
36
41
  !REGEX_PROTESTOS_DE_CREDITO.test(nomeCedente));
37
- }).sort(byDate);
42
+ })
43
+ .sort(byDate);
38
44
  var elements = [
39
45
  {
40
46
  total: protestosDeCredito === null || protestosDeCredito === void 0 ? void 0 : protestosDeCredito.length,
41
- element: React.createElement(ProtestosCategory, { title: "Protestos de Cr\u00E9dito", subtitle: "Protestos de cr\u00E9dito em geral.", registros: protestosDeCredito === null || protestosDeCredito === void 0 ? void 0 : protestosDeCredito.length, icon: ProtestosCreditoIcon }, protestosDeCredito.map(function (protesto, i) { return (React.createElement(ProtestoItem, { protesto: protesto, key: i })); }))
47
+ element: (React.createElement(ProtestosCategory, { title: "Protestos de Cr\u00E9dito", subtitle: "Protestos de cr\u00E9dito em geral.", registros: protestosDeCredito === null || protestosDeCredito === void 0 ? void 0 : protestosDeCredito.length, icon: ProtestosCreditoIcon }, protestosDeCredito.map(function (protesto, i) { return (React.createElement(ProtestoItem, { protesto: protesto, key: i })); })))
42
48
  },
43
49
  {
44
50
  total: protestosDeImposto === null || protestosDeImposto === void 0 ? void 0 : protestosDeImposto.length,
45
- element: React.createElement(ProtestosCategory, { title: "Protestos de Imposto", subtitle: "Protestos de impostos federais, estaduais e municipais.", registros: protestosDeImposto === null || protestosDeImposto === void 0 ? void 0 : protestosDeImposto.length, icon: ProtestosImpostosIcon }, protestosDeImposto.map(function (protestoElement, index) { return (React.createElement(ProtestoItem, { protesto: protestoElement, key: index })); }))
51
+ element: (React.createElement(ProtestosCategory, { title: "Protestos de Imposto", subtitle: "Protestos de impostos federais, estaduais e municipais.", registros: protestosDeImposto === null || protestosDeImposto === void 0 ? void 0 : protestosDeImposto.length, icon: ProtestosImpostosIcon }, protestosDeImposto.map(function (protestoElement, index) { return (React.createElement(ProtestoItem, { protesto: protestoElement, key: index })); })))
46
52
  },
47
53
  {
48
54
  total: protestosGerais === null || protestosGerais === void 0 ? void 0 : protestosGerais.length,
49
- element: React.createElement(ProtestosCategory, { title: "Protestos Gerais", subtitle: "Protestos de outros tipos.", registros: protestosGerais === null || protestosGerais === void 0 ? void 0 : protestosGerais.length, icon: ProtestosGeraisIcon }, protestosGerais.map(function (protestoElement, index) { return (React.createElement(ProtestoItem, { protesto: protestoElement, key: index })); }))
55
+ element: (React.createElement(ProtestosCategory, { title: "Protestos Gerais", subtitle: "Protestos de outros tipos.", registros: protestosGerais === null || protestosGerais === void 0 ? void 0 : protestosGerais.length, icon: ProtestosGeraisIcon }, protestosGerais.map(function (protestoElement, index) { return (React.createElement(ProtestoItem, { protesto: protestoElement, key: index })); })))
50
56
  }
51
57
  ].sort(function (a, b) { return b.total - a.total; });
52
58
  var children = registros ? (React.createElement(ResultProtestos, null, elements.map(function (_a) {
@@ -56,11 +62,11 @@ var Protestos = function () {
56
62
  return {
57
63
  children: children,
58
64
  variant: registros ? 'error' : 'default',
59
- description: (React.createElement(StatusMessage, { type: registros ? "error" : "default" }, registros
65
+ description: (React.createElement(StatusMessage, { type: registros ? 'error' : 'default' }, registros
60
66
  ? registros === 1
61
- ? "Encontrado um protesto"
67
+ ? 'Encontrado um protesto'
62
68
  : "Encontrados ".concat(registros, " protestos")
63
- : "Não há ocorrência de protesto")),
69
+ : 'Não há ocorrência de protesto'))
64
70
  };
65
71
  } }));
66
72
  };
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { HeaderProps } from "../interface/header";
1
+ import React from 'react';
2
+ import { HeaderProps } from '../interface/header';
3
3
  declare const ProtestosCategory: React.FC<HeaderProps & {
4
4
  registros: number;
5
5
  children: React.ReactNode;
@@ -24,25 +24,27 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  }
25
25
  return t;
26
26
  };
27
- import React from "react";
28
- import Header from "../interface/header";
29
- import { Result } from "../interface/result";
30
- import StatusMessage from "../interface/statusMessage";
31
- import useToggle from "../../hooks/useToggle";
32
- import styled from "styled-components";
33
- import BtnWrapper from "../../assets/btn/btnWrapper";
34
- import ChevronUp from "../../assets/btn/chevronUp";
35
- import ChevronDown from "../../assets/btn/chevronDown";
36
- var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n"], ["\n display: ", ";\n"])), function (props) { return props.isOpen ? 'block' : 'none'; });
27
+ import React from 'react';
28
+ import Header from '../interface/header';
29
+ import { Result } from '../interface/result';
30
+ import StatusMessage from '../interface/statusMessage';
31
+ import useToggle from '../../hooks/useToggle';
32
+ import styled from 'styled-components';
33
+ import BtnWrapper from '../../assets/btn/btnWrapper';
34
+ import ChevronUp from '../../assets/btn/chevronUp';
35
+ import ChevronDown from '../../assets/btn/chevronDown';
36
+ var Content = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n"], ["\n display: ", ";\n"])), function (props) { return (props.isOpen ? 'block' : 'none'); });
37
37
  var ProtestosCategory = function (_a) {
38
38
  var registros = _a.registros, title = _a.title, subtitle = _a.subtitle, children = _a.children, rest = __rest(_a, ["registros", "title", "subtitle", "children"]);
39
39
  var _b = useToggle(), isOpen = _b[0], toggleOpen = _b[1];
40
40
  var defaultHeaderActions = (React.createElement(React.Fragment, null,
41
41
  React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null))));
42
42
  return (React.createElement("div", null,
43
- React.createElement(Header, __assign({ title: title, subtitle: subtitle, description: React.createElement(StatusMessage, { type: registros ? "error" : "default" }, !registros
44
- ? "Não foram encontradas ocorrências"
45
- : (registros === 1 ? 'Foi encontrado um protesto' : "Foram encontrados ".concat(registros, " protestos"))), variant: registros ? 'error' : 'default', actions: registros ? defaultHeaderActions : null }, rest)),
43
+ React.createElement(Header, __assign({ title: title, subtitle: subtitle, description: React.createElement(StatusMessage, { type: registros ? 'error' : 'default' }, !registros
44
+ ? 'Não foram encontradas ocorrências'
45
+ : registros === 1
46
+ ? 'Foi encontrado um protesto'
47
+ : "Foram encontrados ".concat(registros, " protestos")), variant: registros ? 'error' : 'default', actions: registros ? defaultHeaderActions : null }, rest)),
46
48
  React.createElement(Content, { isOpen: isOpen },
47
49
  React.createElement(Result, null, children))));
48
50
  };
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export type ProtestoData = {
3
3
  quemProtestou: string;
4
4
  atravesDe: string;
@@ -8,7 +8,7 @@ export type ProtestoData = {
8
8
  anuenciaVencida: string;
9
9
  valorDoProtesto: string;
10
10
  valor?: number;
11
- tipo: "CREDITO" | "IMPOSTO" | "GERAL";
11
+ tipo: 'CREDITO' | 'IMPOSTO' | 'GERAL';
12
12
  };
13
13
  export declare const ProtestoItem: React.MemoExoticComponent<({ protesto }: {
14
14
  protesto: Node;
@@ -34,14 +34,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
34
34
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
35
  }
36
36
  };
37
- import React, { memo, useContext } from "react";
38
- import AddItemField from "../common/addItem";
39
- import XPathUtils from "../../utils/xpath";
40
- import { formatMoney } from "../../utils/number";
41
- import { ResultContent } from "../interface/result";
42
- import { formatDocument } from "../../utils/string";
43
- import Button from "../common/button";
44
- import { WebService } from "../webservice";
37
+ import React, { memo, useContext } from 'react';
38
+ import AddItemField from '../common/addItem';
39
+ import XPathUtils from '../../utils/xpath';
40
+ import { formatMoney } from '../../utils/number';
41
+ import { ResultContent } from '../interface/result';
42
+ import { formatDocument } from '../../utils/string';
43
+ import Button from '../common/button';
44
+ import { WebService } from '../webservice';
45
45
  export var ProtestoItem = memo(function (_a) {
46
46
  var protesto = _a.protesto;
47
47
  var getField = function (path, formatter) {
@@ -49,17 +49,17 @@ export var ProtestoItem = memo(function (_a) {
49
49
  return formatter ? formatter(value) : value;
50
50
  };
51
51
  var formatBooleanField = function (value) {
52
- return value === "true" ? "Sim" : "Não";
52
+ return value === 'true' ? 'Sim' : 'Não';
53
53
  };
54
- return (React.createElement(ResultContent, { desktop: "repeat(8, 1fr)", tablet: "repeat(4, 1fr)", mobile: "repeat(2, 1fr)" },
55
- React.createElement(AddItemField, { name: "Quem Protestou", value: getField("./nomeCedente") }),
56
- React.createElement(AddItemField, { name: "Atrav\u00E9s De", value: getField("./nomeApresentante") }),
57
- React.createElement(AddItemField, { name: "CPF/CNPJ Protestado", value: formatDocument(getField("./cpfCnpj")) }),
58
- React.createElement(AddItemField, { name: "Data Do Protesto", value: getField("./dataProtesto") }),
59
- React.createElement(AddItemField, { name: "Possui Anu\u00EAncia", value: formatBooleanField(getField("./temAnuencia")) }),
60
- React.createElement(AddItemField, { name: "Anu\u00EAncia Vencida", value: formatBooleanField(getField("./anuenciaVencida")) }),
61
- React.createElement(AddItemField, { name: "Valor Do Protesto", value: formatMoney(getField("./valor")) }),
62
- React.createElement(Instrumento, { nm_chave: getField("./nm_chave") })));
54
+ return (React.createElement(ResultContent, { desktop: "repeat(8, 1fr)", tablet: "repeat(4, 1fr)", mobile: 'repeat(2, 1fr)' },
55
+ React.createElement(AddItemField, { name: "Quem Protestou", value: getField('./nomeCedente') }),
56
+ React.createElement(AddItemField, { name: "Atrav\u00E9s De", value: getField('./nomeApresentante') }),
57
+ React.createElement(AddItemField, { name: "CPF/CNPJ Protestado", value: formatDocument(getField('./cpfCnpj')) }),
58
+ React.createElement(AddItemField, { name: "Data Do Protesto", value: getField('./dataProtesto') }),
59
+ React.createElement(AddItemField, { name: "Possui Anu\u00EAncia", value: formatBooleanField(getField('./temAnuencia')) }),
60
+ React.createElement(AddItemField, { name: "Anu\u00EAncia Vencida", value: formatBooleanField(getField('./anuenciaVencida')) }),
61
+ React.createElement(AddItemField, { name: "Valor Do Protesto", value: formatMoney(getField('./valor')) }),
62
+ React.createElement(Instrumento, { nm_chave: getField('./nm_chave') })));
63
63
  });
64
64
  export var Instrumento = function (_a) {
65
65
  var nm_chave = _a.nm_chave;
@@ -68,7 +68,7 @@ export var Instrumento = function (_a) {
68
68
  var _c = React.useState(false), isLoading = _c[0], setIsLoading = _c[1];
69
69
  if (!nm_chave)
70
70
  return null;
71
- return React.createElement(Button, { onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
71
+ return (React.createElement(Button, { onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
72
72
  var request, pdfWindow, e_1;
73
73
  return __generator(this, function (_a) {
74
74
  switch (_a.label) {
@@ -97,7 +97,7 @@ export var Instrumento = function (_a) {
97
97
  case 6: return [2 /*return*/];
98
98
  }
99
99
  });
100
- }); }, disabled: isLoading }, error ? 'Instrumento não Localizado' : 'Instrumento');
100
+ }); }, disabled: isLoading }, error ? 'Instrumento não Localizado' : 'Instrumento'));
101
101
  };
102
102
  export var ProtestosList = function (_a) {
103
103
  var protestos = _a.protestos;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export declare const ReclameAquiCarousel: React.FC<{
3
3
  documento: string;
4
4
  nome: string;
@@ -14,15 +14,15 @@ var __assign = (this && this.__assign) || function () {
14
14
  return __assign.apply(this, arguments);
15
15
  };
16
16
  /* eslint-disable @typescript-eslint/no-unused-vars */
17
- import React, { memo } from "react";
18
- import Carousel from "../common/carousel";
19
- import { useQuery } from "../webservice";
20
- import Carrousel from "../dossie/carrousel/carrousel";
21
- import styled from "styled-components";
22
- import theme from "../interface/theme";
23
- import { formatValue } from "../../utils/number";
24
- import ChevronLeft from "../../assets/btn/chevronLeft";
25
- import ChevronRight from "../../assets/btn/chevronRight";
17
+ import React, { memo } from 'react';
18
+ import Carousel from '../common/carousel';
19
+ import { useQuery } from '../webservice';
20
+ import Carrousel from '../dossie/carrousel/carrousel';
21
+ import styled from 'styled-components';
22
+ import theme from '../interface/theme';
23
+ import { formatValue } from '../../utils/number';
24
+ import ChevronLeft from '../../assets/btn/chevronLeft';
25
+ import ChevronRight from '../../assets/btn/chevronRight';
26
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
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"])));
@@ -34,16 +34,16 @@ var DocumentPrefix = styled.span(templateObject_8 || (templateObject_8 = __makeT
34
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
- GREAT: "Ótimo",
38
- GOOD: "Bom",
39
- REGULAR: "Regular",
40
- NOT_RECOMMENDED: "Não Recomendado",
41
- NO_INDEX: "--",
42
- BAD: "Ruim",
43
- RA1000: "RA1000"
37
+ GREAT: 'Ótimo',
38
+ GOOD: 'Bom',
39
+ REGULAR: 'Regular',
40
+ NOT_RECOMMENDED: 'Não Recomendado',
41
+ NO_INDEX: '--',
42
+ BAD: 'Ruim',
43
+ RA1000: 'RA1000'
44
44
  };
45
45
  var translateStatus = function (status) {
46
- return statusMap[status] || "--";
46
+ return statusMap[status] || '--';
47
47
  };
48
48
  var ProblemasResolvidos = function (_a) {
49
49
  var value = _a.value;
@@ -71,7 +71,7 @@ var ReclameAquiStats = function (_a) {
71
71
  " ",
72
72
  score,
73
73
  "/10")),
74
- React.createElement(ProblemasResolvidos, { value: percentualProblemasResolvidos + "%" }))));
74
+ React.createElement(ProblemasResolvidos, { value: percentualProblemasResolvidos + '%' }))));
75
75
  };
76
76
  export var ReclameAquiCarousel = memo(function (_a) {
77
77
  var _b, _c, _d;
@@ -82,7 +82,7 @@ export var ReclameAquiCarousel = memo(function (_a) {
82
82
  return (React.createElement(ContainerSummary, null,
83
83
  React.createElement(Carousel, { pagination: false, isRTL: false, showArrows: (response === null || response === void 0 ? void 0 : response.document) && ((_c = response === null || response === void 0 ? void 0 : response.document) === null || _c === void 0 ? void 0 : _c.length) > 1, renderArrow: function (_a) {
84
84
  var type = _a.type, onClick = _a.onClick;
85
- return React.createElement(CarrouselBtn, null, type == "PREV" ? React.createElement(ChevronLeft, { onClick: onClick }) : React.createElement(ChevronRight, { onClick: onClick }));
85
+ return (React.createElement(CarrouselBtn, null, type == 'PREV' ? (React.createElement(ChevronLeft, { onClick: onClick })) : (React.createElement(ChevronRight, { onClick: onClick }))));
86
86
  } }, (_d = response === null || response === void 0 ? void 0 : response.document) === null || _d === void 0 ? void 0 : _d.map(function (item) {
87
87
  var infos = item.infos;
88
88
  return {
@@ -93,7 +93,7 @@ export var ReclameAquiCarousel = memo(function (_a) {
93
93
  shortname: infos.shortname,
94
94
  imageUrl: infos.logo,
95
95
  quantidadeProblemasResolvidos: infos.count.toString(),
96
- percentualProblemasResolvidos: infos.solvedPercentual,
96
+ percentualProblemasResolvidos: infos.solvedPercentual
97
97
  };
98
98
  }).map(function (empresa, index) { return (React.createElement(ReclameAquiStats, __assign({ key: index }, empresa))); }))));
99
99
  });