@credithub/harlan-components 1.20.4 → 1.20.5
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 +12 -9
- package/lib/esm/components/interface/globalStyle.js +2 -2
- package/lib/esm/components/interface/responsiveGrid.d.ts +1 -0
- package/lib/esm/components/interface/responsiveGrid.js +4 -1
- package/lib/esm/components/interface/result.d.ts +1 -0
- package/lib/esm/components/scr/getResumoDeModalidades.js +1 -1
- package/lib/esm/components/scr/scr.js +5 -5
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -1749,7 +1749,10 @@ var __makeTemplateObject$s = (undefined && undefined.__makeTemplateObject) || fu
|
|
|
1749
1749
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
1750
1750
|
return cooked;
|
|
1751
1751
|
};
|
|
1752
|
-
var ResponsiveGrid = styled.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject$s(["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n"], ["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n"])), function (props) { return props.fullWidth && 'width: 100%'; }, function (props) { return props.mobile || 'auto'; }, function (props) { return props.tablet || 'auto'; }, function (props) { return props.desktop || 'auto'; })
|
|
1752
|
+
var ResponsiveGrid = styled.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject$s(["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n\n ", "\n"], ["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n\n ", "\n"])), function (props) { return props.fullWidth && 'width: 100%'; }, function (props) { return props.mobile || 'auto'; }, function (props) { return props.tablet || 'auto'; }, function (props) { return props.desktop || 'auto'; }, function (props) {
|
|
1753
|
+
return props.print &&
|
|
1754
|
+
"@media print {\n grid-template-columns: ".concat(props.print || 'auto', ";\n }");
|
|
1755
|
+
});
|
|
1753
1756
|
var templateObject_1$s;
|
|
1754
1757
|
|
|
1755
1758
|
var __makeTemplateObject$r = (undefined && undefined.__makeTemplateObject) || function (cooked, raw) {
|
|
@@ -65109,7 +65112,7 @@ function getResumoDeModalidades(scr) {
|
|
|
65109
65112
|
var _a;
|
|
65110
65113
|
return ({
|
|
65111
65114
|
modalidade: !/^Limite/.test(modalidade)
|
|
65112
|
-
? "Cr\u00E9ditos ".concat((_a = vencimento === null || vencimento === void 0 ? void 0 : vencimento.descricao) === null || _a === void 0 ? void 0 : _a.toLowerCase())
|
|
65115
|
+
? "Cr\u00E9ditos baixados como ".concat((_a = vencimento === null || vencimento === void 0 ? void 0 : vencimento.descricao) === null || _a === void 0 ? void 0 : _a.toLowerCase())
|
|
65113
65116
|
: vencimento === null || vencimento === void 0 ? void 0 : vencimento.descricao,
|
|
65114
65117
|
valor: vencimento === null || vencimento === void 0 ? void 0 : vencimento.valor
|
|
65115
65118
|
});
|
|
@@ -65191,12 +65194,12 @@ function ConsultaSCR(_a) {
|
|
|
65191
65194
|
var FluxosDeVencimentosConsolidados = function (_a) {
|
|
65192
65195
|
var _b;
|
|
65193
65196
|
var scr = _a.scr, isLoading = _a.isLoading, error = _a.error;
|
|
65194
|
-
var _c = useToggle(
|
|
65197
|
+
var _c = useToggle(true), isOpen = _c[0], toggleOpen = _c[1];
|
|
65195
65198
|
return (React.createElement("div", null,
|
|
65196
65199
|
React.createElement(Header$1, { title: "SCR", subtitle: "Fluxo De Vencimentos Consolidados", variant: isLoading ? 'loading' : error ? 'error' : 'default', icon: ScrIcon, actions: React.createElement(BtnWrapper$1, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)) }),
|
|
65197
65200
|
scr && !isLoading && (React.createElement(Content$1, { isOpen: isOpen },
|
|
65198
65201
|
React.createElement(Result, null,
|
|
65199
|
-
React.createElement(ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
65202
|
+
React.createElement(ResultContent, { desktop: "repeat(4, 1fr)", print: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
65200
65203
|
React.createElement(AddItemField, { name: "Data-base", value: scr.dataBaseConsultada }),
|
|
65201
65204
|
React.createElement(AddItemField, { name: "Situa\u00E7\u00E3o de processamento IF's", value: scr.percentualDocumentosProcessados }),
|
|
65202
65205
|
React.createElement(AddItemField, { name: "Situa\u00E7\u00E3o de processamento Valor", value: scr.percentualVolumeProcessado }),
|
|
@@ -65213,7 +65216,7 @@ var FluxosDeVencimentosConsolidados = function (_a) {
|
|
|
65213
65216
|
};
|
|
65214
65217
|
var ResumoList = function (_a) {
|
|
65215
65218
|
var isLoading = _a.isLoading; _a.className; var error = _a.error, resumos = _a.resumos, props = __rest$2(_a, ["isLoading", "className", "error", "resumos"]);
|
|
65216
|
-
var _b = useToggle(
|
|
65219
|
+
var _b = useToggle(true), isOpen = _b[0], toggleOpen = _b[1];
|
|
65217
65220
|
if (!isLoading && !resumos.length)
|
|
65218
65221
|
return null;
|
|
65219
65222
|
return (React.createElement("div", null,
|
|
@@ -65224,14 +65227,14 @@ var ResumoList = function (_a) {
|
|
|
65224
65227
|
};
|
|
65225
65228
|
var ResumoModalidades = function (_a) {
|
|
65226
65229
|
var scr = _a.scr, isLoading = _a.isLoading, error = _a.error;
|
|
65227
|
-
var _b = useToggle(
|
|
65230
|
+
var _b = useToggle(true), isOpen = _b[0], toggleOpen = _b[1];
|
|
65228
65231
|
var resumoModalidades = (scr && getResumoDeModalidades(scr)) || [];
|
|
65229
65232
|
if (!isLoading && !(resumoModalidades === null || resumoModalidades === void 0 ? void 0 : resumoModalidades.length))
|
|
65230
65233
|
return null;
|
|
65231
65234
|
return (React.createElement("div", null,
|
|
65232
65235
|
React.createElement(Header$1, { title: "SCR", subtitle: "Modalidade x Data Base", variant: isLoading ? 'loading' : error ? 'error' : 'default', icon: ScrIcon, actions: React.createElement(BtnWrapper$1, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)) }),
|
|
65233
65236
|
!isLoading && (React.createElement(Content$1, { isOpen: isOpen },
|
|
65234
|
-
React.createElement(Result, null, resumoModalidades.map(function (resumo, index) { return (React.createElement(ResultContent, { key: "".concat(resumo.modalidade, "-").concat(index), desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
65237
|
+
React.createElement(Result, null, resumoModalidades.map(function (resumo, index) { return (React.createElement(ResultContent, { key: "".concat(resumo.modalidade, "-").concat(index), desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr", print: "repeat(4, 1fr)" },
|
|
65235
65238
|
React.createElement(AddItemField, { name: "Modalidade", value: resumo.modalidade }),
|
|
65236
65239
|
React.createElement(AddItemField, { name: "Vencido", value: resumo.vencido && formatMoney(resumo.vencido) }),
|
|
65237
65240
|
React.createElement(AddItemField, { name: "A Vencer", value: resumo.aVencer && formatMoney(resumo.aVencer) }),
|
|
@@ -65334,8 +65337,8 @@ var __makeTemplateObject$3 = (undefined && undefined.__makeTemplateObject) || fu
|
|
|
65334
65337
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
65335
65338
|
return cooked;
|
|
65336
65339
|
};
|
|
65337
|
-
var OpenSansFont = Ne(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject$3(["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300');\n"], ["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300');\n"])));
|
|
65338
|
-
var GlobalStyle = He(templateObject_2 || (templateObject_2 = __makeTemplateObject$3(["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n"], ["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n"])), OpenSansFont);
|
|
65340
|
+
var OpenSansFont = Ne(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject$3(["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300,400,500,600,700');\n"], ["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300,400,500,600,700');\n"])));
|
|
65341
|
+
var GlobalStyle = He(templateObject_2 || (templateObject_2 = __makeTemplateObject$3(["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n print-color-adjust: exact !important;\n }\n"], ["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n print-color-adjust: exact !important;\n }\n"])), OpenSansFont);
|
|
65339
65342
|
var templateObject_1$3, templateObject_2;
|
|
65340
65343
|
|
|
65341
65344
|
var DominiosIcon = function (_a) {
|
|
@@ -3,7 +3,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
5
|
import { createGlobalStyle, css } from 'styled-components';
|
|
6
|
-
var OpenSansFont = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300');\n"], ["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300');\n"])));
|
|
7
|
-
var GlobalStyle = createGlobalStyle(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n"], ["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n"])), OpenSansFont);
|
|
6
|
+
var OpenSansFont = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300,400,500,600,700');\n"], ["\n @import url('https://fonts.googleapis.com/css?family=Open%20Sans%20Condensed:300,400,500,600,700');\n"])));
|
|
7
|
+
var GlobalStyle = createGlobalStyle(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n print-color-adjust: exact !important;\n }\n"], ["\n * {\n ", "\n font-family: 'Open Sans Condensed';\n }\n\n @media print {\n button {\n display: none !important;\n }\n }\n\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n print-color-adjust: exact !important;\n }\n"])), OpenSansFont);
|
|
8
8
|
export default GlobalStyle;
|
|
9
9
|
var templateObject_1, templateObject_2;
|
|
@@ -3,6 +3,7 @@ declare const ResponsiveGrid: import("styled-components").StyledComponent<"div",
|
|
|
3
3
|
mobile?: CSSProperties['gridTemplateColumns'];
|
|
4
4
|
tablet?: CSSProperties['gridTemplateColumns'];
|
|
5
5
|
desktop?: CSSProperties['gridTemplateColumns'];
|
|
6
|
+
print?: CSSProperties['gridTemplateColumns'];
|
|
6
7
|
fullWidth?: boolean | undefined;
|
|
7
8
|
}, never>;
|
|
8
9
|
export default ResponsiveGrid;
|
|
@@ -3,6 +3,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
var ResponsiveGrid = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n"], ["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n"])), function (props) { return props.fullWidth && 'width: 100%'; }, function (props) { return props.mobile || 'auto'; }, function (props) { return props.tablet || 'auto'; }, function (props) { return props.desktop || 'auto'; })
|
|
6
|
+
var ResponsiveGrid = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n\n ", "\n"], ["\n display: grid;\n ", ";\n\n @media (max-width: 768px) {\n grid-template-columns: ", ";\n gap: 16px;\n }\n\n @media (min-width: 768px) {\n grid-template-columns: ", ";\n }\n\n @media (min-width: 1000px) {\n grid-template-columns: ", ";\n }\n\n ", "\n"])), function (props) { return props.fullWidth && 'width: 100%'; }, function (props) { return props.mobile || 'auto'; }, function (props) { return props.tablet || 'auto'; }, function (props) { return props.desktop || 'auto'; }, function (props) {
|
|
7
|
+
return props.print &&
|
|
8
|
+
"@media print {\n grid-template-columns: ".concat(props.print || 'auto', ";\n }");
|
|
9
|
+
});
|
|
7
10
|
export default ResponsiveGrid;
|
|
8
11
|
var templateObject_1;
|
|
@@ -2,6 +2,7 @@ export declare const ResultContent: import("styled-components").StyledComponent<
|
|
|
2
2
|
mobile?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
|
|
3
3
|
tablet?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
|
|
4
4
|
desktop?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
|
|
5
|
+
print?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
|
|
5
6
|
fullWidth?: boolean | undefined;
|
|
6
7
|
}, never>;
|
|
7
8
|
export declare const Result: import("styled-components").StyledComponent<"div", any, {
|
|
@@ -99,7 +99,7 @@ function getResumoDeModalidades(scr) {
|
|
|
99
99
|
var _a;
|
|
100
100
|
return ({
|
|
101
101
|
modalidade: !/^Limite/.test(modalidade)
|
|
102
|
-
? "Cr\u00E9ditos ".concat((_a = vencimento === null || vencimento === void 0 ? void 0 : vencimento.descricao) === null || _a === void 0 ? void 0 : _a.toLowerCase())
|
|
102
|
+
? "Cr\u00E9ditos baixados como ".concat((_a = vencimento === null || vencimento === void 0 ? void 0 : vencimento.descricao) === null || _a === void 0 ? void 0 : _a.toLowerCase())
|
|
103
103
|
: vencimento === null || vencimento === void 0 ? void 0 : vencimento.descricao,
|
|
104
104
|
valor: vencimento === null || vencimento === void 0 ? void 0 : vencimento.valor
|
|
105
105
|
});
|
|
@@ -84,12 +84,12 @@ function ConsultaSCR(_a) {
|
|
|
84
84
|
var FluxosDeVencimentosConsolidados = function (_a) {
|
|
85
85
|
var _b;
|
|
86
86
|
var scr = _a.scr, isLoading = _a.isLoading, error = _a.error;
|
|
87
|
-
var _c = useToggle(
|
|
87
|
+
var _c = useToggle(true), isOpen = _c[0], toggleOpen = _c[1];
|
|
88
88
|
return (React.createElement("div", null,
|
|
89
89
|
React.createElement(Header, { title: "SCR", subtitle: "Fluxo De Vencimentos Consolidados", variant: isLoading ? 'loading' : error ? 'error' : 'default', icon: ScrIcon, actions: React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)) }),
|
|
90
90
|
scr && !isLoading && (React.createElement(Content, { isOpen: isOpen },
|
|
91
91
|
React.createElement(Result, null,
|
|
92
|
-
React.createElement(ResultContent, { desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
92
|
+
React.createElement(ResultContent, { desktop: "repeat(4, 1fr)", print: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
93
93
|
React.createElement(AddItemField, { name: "Data-base", value: scr.dataBaseConsultada }),
|
|
94
94
|
React.createElement(AddItemField, { name: "Situa\u00E7\u00E3o de processamento IF's", value: scr.percentualDocumentosProcessados }),
|
|
95
95
|
React.createElement(AddItemField, { name: "Situa\u00E7\u00E3o de processamento Valor", value: scr.percentualVolumeProcessado }),
|
|
@@ -106,7 +106,7 @@ var FluxosDeVencimentosConsolidados = function (_a) {
|
|
|
106
106
|
};
|
|
107
107
|
var ResumoList = function (_a) {
|
|
108
108
|
var isLoading = _a.isLoading, className = _a.className, error = _a.error, resumos = _a.resumos, props = __rest(_a, ["isLoading", "className", "error", "resumos"]);
|
|
109
|
-
var _b = useToggle(
|
|
109
|
+
var _b = useToggle(true), isOpen = _b[0], toggleOpen = _b[1];
|
|
110
110
|
if (!isLoading && !resumos.length)
|
|
111
111
|
return null;
|
|
112
112
|
return (React.createElement("div", null,
|
|
@@ -117,14 +117,14 @@ var ResumoList = function (_a) {
|
|
|
117
117
|
};
|
|
118
118
|
var ResumoModalidades = function (_a) {
|
|
119
119
|
var scr = _a.scr, isLoading = _a.isLoading, error = _a.error;
|
|
120
|
-
var _b = useToggle(
|
|
120
|
+
var _b = useToggle(true), isOpen = _b[0], toggleOpen = _b[1];
|
|
121
121
|
var resumoModalidades = (scr && getResumoDeModalidades(scr)) || [];
|
|
122
122
|
if (!isLoading && !(resumoModalidades === null || resumoModalidades === void 0 ? void 0 : resumoModalidades.length))
|
|
123
123
|
return null;
|
|
124
124
|
return (React.createElement("div", null,
|
|
125
125
|
React.createElement(Header, { title: "SCR", subtitle: "Modalidade x Data Base", variant: isLoading ? 'loading' : error ? 'error' : 'default', icon: ScrIcon, actions: React.createElement(BtnWrapper, { onClick: toggleOpen }, isOpen ? React.createElement(ChevronUp, null) : React.createElement(ChevronDown, null)) }),
|
|
126
126
|
!isLoading && (React.createElement(Content, { isOpen: isOpen },
|
|
127
|
-
React.createElement(Result, null, resumoModalidades.map(function (resumo, index) { return (React.createElement(ResultContent, { key: "".concat(resumo.modalidade, "-").concat(index), desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr" },
|
|
127
|
+
React.createElement(Result, null, resumoModalidades.map(function (resumo, index) { return (React.createElement(ResultContent, { key: "".concat(resumo.modalidade, "-").concat(index), desktop: "repeat(4, 1fr)", tablet: "repeat(3, 1fr)", mobile: "1fr 1fr", print: "repeat(4, 1fr)" },
|
|
128
128
|
React.createElement(AddItemField, { name: "Modalidade", value: resumo.modalidade }),
|
|
129
129
|
React.createElement(AddItemField, { name: "Vencido", value: resumo.vencido && formatMoney(resumo.vencido) }),
|
|
130
130
|
React.createElement(AddItemField, { name: "A Vencer", value: resumo.aVencer && formatMoney(resumo.aVencer) }),
|