@credithub/harlan-components 1.27.9 → 1.28.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/dist/components/consultasComplementares.d.ts +3 -0
- package/dist/components/consultasComplementares.js +6 -6
- package/dist/components/dossie/transactionTable/transactionTable.js +6 -8
- package/dist/consultaSimples.d.ts +3 -0
- package/dist/consultaSimples.js +2 -2
- package/lib/cjs/index.js +14 -17
- package/lib/esm/index.js +14 -17
- package/package.json +1 -1
|
@@ -22,5 +22,8 @@ export type HasCreditsType = (credits: number, callback: () => void) => void;
|
|
|
22
22
|
export declare const ConsultasComplementaresContext: React.Context<ConsultasComplementaresContextProps | null>;
|
|
23
23
|
export declare const ConsultasComplementaresProvider: React.FC<PropsWithChildren<{
|
|
24
24
|
hasCredits?: HasCreditsType;
|
|
25
|
+
initRefinBoaVista?: boolean;
|
|
26
|
+
initRefinSerasa?: boolean;
|
|
27
|
+
initVeiculos?: boolean;
|
|
25
28
|
}>>;
|
|
26
29
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { createContext, useState } from 'react';
|
|
2
2
|
export var ConsultasComplementaresContext = createContext(null);
|
|
3
3
|
export var ConsultasComplementaresProvider = function (_a) {
|
|
4
|
-
var children = _a.children, hasCredits = _a.hasCredits;
|
|
5
|
-
var
|
|
4
|
+
var children = _a.children, hasCredits = _a.hasCredits, _b = _a.initRefinBoaVista, initRefinBoaVista = _b === void 0 ? false : _b, _c = _a.initRefinSerasa, initRefinSerasa = _c === void 0 ? false : _c, _d = _a.initVeiculos, initVeiculos = _d === void 0 ? false : _d;
|
|
5
|
+
var _e = useState({
|
|
6
6
|
refinBoaVista: {
|
|
7
|
-
consultaRealizada:
|
|
7
|
+
consultaRealizada: initRefinBoaVista
|
|
8
8
|
},
|
|
9
9
|
refinSerasa: {
|
|
10
|
-
consultaRealizada:
|
|
10
|
+
consultaRealizada: initRefinSerasa
|
|
11
11
|
},
|
|
12
12
|
scoreBoaVista: {
|
|
13
13
|
consultaRealizada: false
|
|
@@ -16,13 +16,13 @@ export var ConsultasComplementaresProvider = function (_a) {
|
|
|
16
16
|
consultaRealizada: false
|
|
17
17
|
},
|
|
18
18
|
veiculos: {
|
|
19
|
-
consultaRealizada:
|
|
19
|
+
consultaRealizada: initVeiculos
|
|
20
20
|
},
|
|
21
21
|
scr: {
|
|
22
22
|
consultaRealizada: false
|
|
23
23
|
},
|
|
24
24
|
hasCredits: hasCredits
|
|
25
|
-
}), consultasComplementares =
|
|
25
|
+
}), consultasComplementares = _e[0], setConsultasComplementares = _e[1];
|
|
26
26
|
return (React.createElement(ConsultasComplementaresContext.Provider, { value: {
|
|
27
27
|
consultasComplementares: consultasComplementares,
|
|
28
28
|
setConsultasComplementares: setConsultasComplementares,
|
|
@@ -8,6 +8,7 @@ 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
|
+
import { format } from 'date-fns';
|
|
11
12
|
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 screen and (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 screen and (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"])), theme.colors.cinzaClaro);
|
|
12
13
|
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 justify-content: flex-start;\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 justify-content: flex-start;\n }\n"])));
|
|
13
14
|
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"])));
|
|
@@ -20,14 +21,11 @@ export var TransactionsTable = function (_a) {
|
|
|
20
21
|
React.createElement(Header, null,
|
|
21
22
|
React.createElement(Title, null, "Quem Consultou esse Documento?"),
|
|
22
23
|
React.createElement(IconePessoa, { size: 60 })),
|
|
23
|
-
events.map(function (event, index) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
React.createElement(DateField, null,
|
|
29
|
-
React.createElement(AddItemField, { name: "Data", value: (_a = new Date(XPathUtils.select('string(./ultimaConsulta)', event))) === null || _a === void 0 ? void 0 : _a.toLocaleDateString(), style: { display: 'inline-block' } }))));
|
|
30
|
-
})));
|
|
24
|
+
events.map(function (event, index) { return (React.createElement(TransactionContent, { key: index },
|
|
25
|
+
React.createElement(UserField, null,
|
|
26
|
+
React.createElement(AddItemField, { name: "Usu\u00E1rio", value: XPathUtils.select('string(./usuario)', event), style: { display: 'inline-block', padding: '2px 0px' } })),
|
|
27
|
+
React.createElement(DateField, null,
|
|
28
|
+
React.createElement(AddItemField, { name: "Data", value: format(new Date(XPathUtils.select('string(./ultimaConsulta)', event)), 'dd/MM/yyyy'), style: { display: 'inline-block' } })))); })));
|
|
31
29
|
};
|
|
32
30
|
export default TransactionsTable;
|
|
33
31
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -8,6 +8,9 @@ type ConsultaSimplesProps = {
|
|
|
8
8
|
hasCredits?: HasCreditsType;
|
|
9
9
|
onClickPrint: () => void;
|
|
10
10
|
onClickConsultarProcessoJuridico?: (processoId: string) => void;
|
|
11
|
+
initRefinBoaVista?: boolean;
|
|
12
|
+
initRefinSerasa?: boolean;
|
|
13
|
+
initVeiculos?: boolean;
|
|
11
14
|
};
|
|
12
15
|
declare const ConsultaSimples: React.FC<ConsultaSimplesProps>;
|
|
13
16
|
export default ConsultaSimples;
|
package/dist/consultaSimples.js
CHANGED
|
@@ -19,11 +19,11 @@ import { GlobalDataProvider } from './contexts/globalDataContext';
|
|
|
19
19
|
Chart.register.apply(Chart, registerables);
|
|
20
20
|
var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: 'Open Sans Condensed';\n display: flex;\n flex-direction: column;\n gap: 20px;\n\n * {\n -webkit-print-color-adjust: exact !important;\n print-color-adjust: exact !important;\n }\n\n @media print {\n @page {\n size: auto;\n margin: 5mm;\n }\n }\n"], ["\n font-family: 'Open Sans Condensed';\n display: flex;\n flex-direction: column;\n gap: 20px;\n\n * {\n -webkit-print-color-adjust: exact !important;\n print-color-adjust: exact !important;\n }\n\n @media print {\n @page {\n size: auto;\n margin: 5mm;\n }\n }\n"])));
|
|
21
21
|
var ConsultaSimples = function (_a) {
|
|
22
|
-
var _documento = _a.documento, onClickConsultarProcessoJuridico = _a.onClickConsultarProcessoJuridico, onClickQSA = _a.onClickQSA, onClickPrint = _a.onClickPrint, apiKey = _a.apiKey, onClose = _a.onClose, hasCredits = _a.hasCredits;
|
|
22
|
+
var _documento = _a.documento, onClickConsultarProcessoJuridico = _a.onClickConsultarProcessoJuridico, onClickQSA = _a.onClickQSA, onClickPrint = _a.onClickPrint, apiKey = _a.apiKey, onClose = _a.onClose, hasCredits = _a.hasCredits, _b = _a.initRefinBoaVista, initRefinBoaVista = _b === void 0 ? false : _b, _c = _a.initRefinSerasa, initRefinSerasa = _c === void 0 ? false : _c, _d = _a.initVeiculos, initVeiculos = _d === void 0 ? false : _d;
|
|
23
23
|
var documento = _documento.replace(/\D+/g, '');
|
|
24
24
|
return (React.createElement(React.Fragment, null,
|
|
25
25
|
React.createElement(GlobalStyle, null),
|
|
26
|
-
React.createElement(ConsultasComplementaresProvider, { hasCredits: hasCredits },
|
|
26
|
+
React.createElement(ConsultasComplementaresProvider, { hasCredits: hasCredits, initRefinBoaVista: initRefinBoaVista, initRefinSerasa: initRefinSerasa, initVeiculos: initVeiculos },
|
|
27
27
|
React.createElement(WebServiceProvider, { credential: apiKey },
|
|
28
28
|
React.createElement(Queries.Dominios.Request, { data: { documento: documento, cnpj: documento } },
|
|
29
29
|
React.createElement(Queries.Finder.Request, { data: { documento: documento } },
|