@credithub/harlan-components 1.13.4 → 1.13.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/lib/cjs/components/chart/customChart.js +9 -8
- package/lib/cjs/components/interface/result.js +2 -2
- package/lib/cjs/components/protestos/protestos.js +2 -2
- package/lib/cjs/components/protestos/protestosCategory.js +1 -1
- package/lib/esm/components/chart/customChart.js +9 -8
- package/lib/esm/components/interface/result.js +2 -2
- package/lib/esm/components/protestos/protestos.js +2 -2
- package/lib/esm/components/protestos/protestosCategory.js +1 -1
- package/package.json +1 -1
|
@@ -121,20 +121,21 @@ var ResumoDeNegativacoesChartSection = function (_a) {
|
|
|
121
121
|
react_1.default.createElement(Content, { isOpen: isOpen }, !isLoading && (response === null || response === void 0 ? void 0 : response.document) && process(response === null || response === void 0 ? void 0 : response.document))));
|
|
122
122
|
};
|
|
123
123
|
exports.ResumoDeNegativacoesChartSection = ResumoDeNegativacoesChartSection;
|
|
124
|
-
var ChartWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding:
|
|
124
|
+
var ChartWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 20px 30px;\n //background-color: ", ";\n"], ["\n padding: 20px 30px;\n //background-color: ", ";\n"])), theme_1.default.colors.white);
|
|
125
125
|
var CustomChart = function (_a) {
|
|
126
|
-
var _b, _c, _d, _e;
|
|
126
|
+
var _b, _c, _d, _e, _f, _g;
|
|
127
127
|
var dataInput = _a.dataInput;
|
|
128
128
|
var ultimaOcorrenciaCCF = (0, useUltimaOcorrenciaCCF_1.default)();
|
|
129
|
-
var
|
|
130
|
-
var
|
|
131
|
-
var _h = (0, useCalculation_1.useCalculation)(dataInput.
|
|
132
|
-
var _j = (0, useCalculation_1.useCalculation)(dataInput.
|
|
129
|
+
var quantidadeDeProtestos = ((_c = (_b = dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos) === null || _b === void 0 ? void 0 : _b[(dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos.length) - 1]) === null || _c === void 0 ? void 0 : _c.quantidade) || 0;
|
|
130
|
+
var valorTotalProtestos = (0, useCalculation_1.useCalculation)(dataInput.protestos).valorTotal;
|
|
131
|
+
var _h = (0, useCalculation_1.useCalculation)(dataInput.dividasPublicasGrafico), quantidadeDividas = _h.quantidade, valorTotalDividas = _h.valorTotal;
|
|
132
|
+
var _j = (0, useCalculation_1.useCalculation)(dataInput.serasa), quantidadeDeNegativacoesSerasa = _j.quantidade, valorTotalDeNegativacoesSerasa = _j.valorTotal;
|
|
133
|
+
var _k = (0, useCalculation_1.useCalculation)(dataInput.boaVista), quantidadeDeNegativacoesBoaVista = _k.quantidade, valorTotalDeNegativacoesBoaVista = _k.valorTotal;
|
|
133
134
|
var quantidadeCCF = (0, useCalculation_1.useCalculation)(dataInput.ccfs).quantidade;
|
|
134
|
-
var ultimaOcorrenciaProtestos = (
|
|
135
|
+
var ultimaOcorrenciaProtestos = (_f = (_e = dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos[((_d = dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos) === null || _d === void 0 ? void 0 : _d.length) - 1]) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.toLocaleDateString();
|
|
135
136
|
return (react_1.default.createElement(ChartWrapper, null,
|
|
136
137
|
react_1.default.createElement(chartContent_1.default, { dataInput: dataInput }),
|
|
137
|
-
react_1.default.createElement(quantityResult_1.default, { quantidadeProtestos:
|
|
138
|
+
react_1.default.createElement(quantityResult_1.default, { quantidadeProtestos: quantidadeDeProtestos, quantidadeProcessos: (_g = dataInput === null || dataInput === void 0 ? void 0 : dataInput.pieChartTotalConfig) === null || _g === void 0 ? void 0 : _g.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeDeNegativacoesSerasa, quantidadeDividasBoaVista: quantidadeDeNegativacoesBoaVista, quantidadeChequesSemFundos: quantidadeCCF, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalDeNegativacoesSerasa, valorTotalDividasBoaVista: valorTotalDeNegativacoesBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos })));
|
|
138
139
|
};
|
|
139
140
|
exports.default = CustomChart;
|
|
140
141
|
var templateObject_1, templateObject_2;
|
|
@@ -11,11 +11,11 @@ exports.Result = exports.ResultContent = void 0;
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
var responsiveGrid_1 = __importDefault(require("./responsiveGrid"));
|
|
13
13
|
exports.ResultContent = (0, styled_components_1.default)(responsiveGrid_1.default)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 18px 59px;\n box-sizing: border-box;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px;\n\n > * {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n }\n"], ["\n padding: 18px 59px;\n box-sizing: border-box;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px;\n\n > * {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n }\n"])));
|
|
14
|
-
exports.Result = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n flex-direction: column;\n padding: 37px 20px;\n \n ", " {\n :nth-child(
|
|
14
|
+
exports.Result = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n flex-direction: column;\n padding: 37px 20px;\n \n ", " {\n :nth-child(odd) {\n background: ", ";\n border-radius: 60px;\n }\n }\n"], ["\n display: ", ";\n flex-direction: column;\n padding: 37px 20px;\n \n ", " {\n :nth-child(odd) {\n background: ", ";\n border-radius: 60px;\n }\n }\n"])), function (props) {
|
|
15
15
|
var _a;
|
|
16
16
|
var haveChildren = Array.isArray(props.children) ? (_a = props.children) === null || _a === void 0 ? void 0 : _a.length : props.children;
|
|
17
17
|
return haveChildren ? 'flex' : 'none';
|
|
18
|
-
}, exports.ResultContent, function (
|
|
18
|
+
}, exports.ResultContent, function (_a) {
|
|
19
19
|
var _b = _a.resultContentStriped, resultContentStriped = _b === void 0 ? true : _b;
|
|
20
20
|
return resultContentStriped ? '#FFFFFF' : 'transparent';
|
|
21
21
|
});
|
|
@@ -43,7 +43,7 @@ var protestosCredito_1 = __importDefault(require("../../assets/icones/protestosC
|
|
|
43
43
|
var protestosImpostos_1 = __importDefault(require("../../assets/icones/protestosImpostos"));
|
|
44
44
|
var statusMessage_1 = __importDefault(require("../interface/statusMessage"));
|
|
45
45
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
46
|
-
var ResultProtestos = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n row-gap: 20px;\n"], ["\n display: flex;\n flex-direction: column;\n row-gap: 20px;\n"])));
|
|
46
|
+
var ResultProtestos = styled_components_1.default.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"])));
|
|
47
47
|
var Protestos = function () {
|
|
48
48
|
var ctx = (0, react_1.useContext)(webservice_1.Queries.Protestos);
|
|
49
49
|
var Section = ctx.Section;
|
|
@@ -82,7 +82,7 @@ var Protestos = function () {
|
|
|
82
82
|
return {
|
|
83
83
|
children: children,
|
|
84
84
|
variant: registros ? 'error' : 'default',
|
|
85
|
-
description: (react_1.default.createElement(statusMessage_1.default, { type: registros ? "
|
|
85
|
+
description: (react_1.default.createElement(statusMessage_1.default, { type: registros ? "error" : "default" }, registros
|
|
86
86
|
? registros === 1
|
|
87
87
|
? "Encontrado um protesto"
|
|
88
88
|
: "Encontrados ".concat(registros, " protestos")
|
|
@@ -45,7 +45,7 @@ var ProtestosCategory = function (_a) {
|
|
|
45
45
|
var defaultHeaderActions = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
46
46
|
react_1.default.createElement(btnWrapper_1.default, { onClick: toggleOpen }, isOpen ? react_1.default.createElement(chevronUp_1.default, null) : react_1.default.createElement(chevronDown_1.default, null))));
|
|
47
47
|
return (react_1.default.createElement("div", null,
|
|
48
|
-
react_1.default.createElement(header_1.default, __assign({ title: title, subtitle: subtitle, description: react_1.default.createElement(statusMessage_1.default, { type: registros ? "
|
|
48
|
+
react_1.default.createElement(header_1.default, __assign({ title: title, subtitle: subtitle, description: react_1.default.createElement(statusMessage_1.default, { type: registros ? "error" : "default" }, !registros
|
|
49
49
|
? "Não foram encontradas ocorrências"
|
|
50
50
|
: (registros === 1 ? 'Foi encontrado um protesto' : "Foram encontrados ".concat(registros, " protestos"))), variant: registros ? 'error' : 'default', actions: registros ? defaultHeaderActions : null }, rest)),
|
|
51
51
|
react_1.default.createElement(Content, { isOpen: isOpen },
|
|
@@ -91,20 +91,21 @@ export var ResumoDeNegativacoesChartSection = function (_a) {
|
|
|
91
91
|
React.createElement(Header, { title: "Resumo de Negativa\u00E7\u00F5es", subtitle: "Veja a quantidade de ocorr\u00EAncias conforme o documento foi consultado ao longo do tempo.", description: error && React.createElement(StatusMessage, { type: "error" }, error.message), variant: isLoading ? 'loading' : 'default', actions: isLoading ? null : defaultHeaderActions, icon: ResumoDeNegativacoesIcon }),
|
|
92
92
|
React.createElement(Content, { isOpen: isOpen }, !isLoading && (response === null || response === void 0 ? void 0 : response.document) && process(response === null || response === void 0 ? void 0 : response.document))));
|
|
93
93
|
};
|
|
94
|
-
var ChartWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding:
|
|
94
|
+
var ChartWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 20px 30px;\n //background-color: ", ";\n"], ["\n padding: 20px 30px;\n //background-color: ", ";\n"])), theme.colors.white);
|
|
95
95
|
var CustomChart = function (_a) {
|
|
96
|
-
var _b, _c, _d, _e;
|
|
96
|
+
var _b, _c, _d, _e, _f, _g;
|
|
97
97
|
var dataInput = _a.dataInput;
|
|
98
98
|
var ultimaOcorrenciaCCF = useUltimaOcorrenciaCCF();
|
|
99
|
-
var
|
|
100
|
-
var
|
|
101
|
-
var _h = useCalculation(dataInput.
|
|
102
|
-
var _j = useCalculation(dataInput.
|
|
99
|
+
var quantidadeDeProtestos = ((_c = (_b = dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos) === null || _b === void 0 ? void 0 : _b[(dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos.length) - 1]) === null || _c === void 0 ? void 0 : _c.quantidade) || 0;
|
|
100
|
+
var valorTotalProtestos = useCalculation(dataInput.protestos).valorTotal;
|
|
101
|
+
var _h = useCalculation(dataInput.dividasPublicasGrafico), quantidadeDividas = _h.quantidade, valorTotalDividas = _h.valorTotal;
|
|
102
|
+
var _j = useCalculation(dataInput.serasa), quantidadeDeNegativacoesSerasa = _j.quantidade, valorTotalDeNegativacoesSerasa = _j.valorTotal;
|
|
103
|
+
var _k = useCalculation(dataInput.boaVista), quantidadeDeNegativacoesBoaVista = _k.quantidade, valorTotalDeNegativacoesBoaVista = _k.valorTotal;
|
|
103
104
|
var quantidadeCCF = useCalculation(dataInput.ccfs).quantidade;
|
|
104
|
-
var ultimaOcorrenciaProtestos = (
|
|
105
|
+
var ultimaOcorrenciaProtestos = (_f = (_e = dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos[((_d = dataInput === null || dataInput === void 0 ? void 0 : dataInput.protestos) === null || _d === void 0 ? void 0 : _d.length) - 1]) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.toLocaleDateString();
|
|
105
106
|
return (React.createElement(ChartWrapper, null,
|
|
106
107
|
React.createElement(ChartContent, { dataInput: dataInput }),
|
|
107
|
-
React.createElement(QuantidadeResultados, { quantidadeProtestos:
|
|
108
|
+
React.createElement(QuantidadeResultados, { quantidadeProtestos: quantidadeDeProtestos, quantidadeProcessos: (_g = dataInput === null || dataInput === void 0 ? void 0 : dataInput.pieChartTotalConfig) === null || _g === void 0 ? void 0 : _g.processosJuridicos, quantidadeDividas: quantidadeDividas, quantidadeDividasSerasa: quantidadeDeNegativacoesSerasa, quantidadeDividasBoaVista: quantidadeDeNegativacoesBoaVista, quantidadeChequesSemFundos: quantidadeCCF, ultimaOcorrenciaChequesSemFundos: ultimaOcorrenciaCCF, valorTotalDividasSerasa: valorTotalDeNegativacoesSerasa, valorTotalDividasBoaVista: valorTotalDeNegativacoesBoaVista, valorTotalProtestos: valorTotalProtestos, valorTotalDividas: valorTotalDividas, ultimaOcorrenciaProtestos: ultimaOcorrenciaProtestos })));
|
|
108
109
|
};
|
|
109
110
|
export default CustomChart;
|
|
110
111
|
var templateObject_1, templateObject_2;
|
|
@@ -5,11 +5,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
import ResponsiveGrid from "./responsiveGrid";
|
|
7
7
|
export var ResultContent = styled(ResponsiveGrid)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 18px 59px;\n box-sizing: border-box;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px;\n\n > * {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n }\n"], ["\n padding: 18px 59px;\n box-sizing: border-box;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px;\n\n > * {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n }\n"])));
|
|
8
|
-
export var Result = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n flex-direction: column;\n padding: 37px 20px;\n \n ", " {\n :nth-child(
|
|
8
|
+
export var Result = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n flex-direction: column;\n padding: 37px 20px;\n \n ", " {\n :nth-child(odd) {\n background: ", ";\n border-radius: 60px;\n }\n }\n"], ["\n display: ", ";\n flex-direction: column;\n padding: 37px 20px;\n \n ", " {\n :nth-child(odd) {\n background: ", ";\n border-radius: 60px;\n }\n }\n"])), function (props) {
|
|
9
9
|
var _a;
|
|
10
10
|
var haveChildren = Array.isArray(props.children) ? (_a = props.children) === null || _a === void 0 ? void 0 : _a.length : props.children;
|
|
11
11
|
return haveChildren ? 'flex' : 'none';
|
|
12
|
-
}, ResultContent, function (
|
|
12
|
+
}, ResultContent, function (_a) {
|
|
13
13
|
var _b = _a.resultContentStriped, resultContentStriped = _b === void 0 ? true : _b;
|
|
14
14
|
return resultContentStriped ? '#FFFFFF' : 'transparent';
|
|
15
15
|
});
|
|
@@ -15,7 +15,7 @@ import ProtestosCreditoIcon from "../../assets/icones/protestosCredito";
|
|
|
15
15
|
import ProtestosImpostosIcon from "../../assets/icones/protestosImpostos";
|
|
16
16
|
import StatusMessage from "../interface/statusMessage";
|
|
17
17
|
import styled from "styled-components";
|
|
18
|
-
var ResultProtestos = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n row-gap: 20px;\n"], ["\n display: flex;\n flex-direction: column;\n row-gap: 20px;\n"])));
|
|
18
|
+
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"])));
|
|
19
19
|
var Protestos = function () {
|
|
20
20
|
var ctx = useContext(Queries.Protestos);
|
|
21
21
|
var Section = ctx.Section;
|
|
@@ -54,7 +54,7 @@ var Protestos = function () {
|
|
|
54
54
|
return {
|
|
55
55
|
children: children,
|
|
56
56
|
variant: registros ? 'error' : 'default',
|
|
57
|
-
description: (React.createElement(StatusMessage, { type: registros ? "
|
|
57
|
+
description: (React.createElement(StatusMessage, { type: registros ? "error" : "default" }, registros
|
|
58
58
|
? registros === 1
|
|
59
59
|
? "Encontrado um protesto"
|
|
60
60
|
: "Encontrados ".concat(registros, " protestos")
|
|
@@ -40,7 +40,7 @@ var ProtestosCategory = function (_a) {
|
|
|
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 ? "
|
|
43
|
+
React.createElement(Header, __assign({ title: title, subtitle: subtitle, description: React.createElement(StatusMessage, { type: registros ? "error" : "default" }, !registros
|
|
44
44
|
? "Não foram encontradas ocorrências"
|
|
45
45
|
: (registros === 1 ? 'Foi encontrado um protesto' : "Foram encontrados ".concat(registros, " protestos"))), variant: registros ? 'error' : 'default', actions: registros ? defaultHeaderActions : null }, rest)),
|
|
46
46
|
React.createElement(Content, { isOpen: isOpen },
|