@credithub/harlan-components 1.61.3 → 1.61.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.
@@ -14,8 +14,8 @@ export var Spinner = styled.div(templateObject_1 || (templateObject_1 = __makeTe
14
14
  export var ContainerSummary = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n padding: 0 20px;\n width: 100%;\n justify-content: space-between;\n @media (max-width: 768px) {\n padding: 0px;\n }\n\n @media (max-width: 992px) {\n flex-direction: column;\n }\n"], ["\n display: flex;\n padding: 0 20px;\n width: 100%;\n justify-content: space-between;\n @media (max-width: 768px) {\n padding: 0px;\n }\n\n @media (max-width: 992px) {\n flex-direction: column;\n }\n"])));
15
15
  export var ContentSummary = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0 16px;\n\n @media (max-width: 1280px) {\n grid-template-columns: repeat(3, 1fr);\n justify-content: center;\n align-items: center;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n width: 100%;\n }\n"], ["\n display: grid;\n grid-row: 1 / 8;\n grid-template-columns: repeat(4, 1fr);\n gap: 0 16px;\n\n @media (max-width: 1280px) {\n grid-template-columns: repeat(3, 1fr);\n justify-content: center;\n align-items: center;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n width: 100%;\n }\n"])));
16
16
  export var FieldSummary = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n margin-bottom: 16px;\n grid-column: ", ";\n"], ["\n align-items: center;\n margin-bottom: 16px;\n grid-column: ", ";\n"])), function (props) { return (props.fullRow ? '1 / 3' : 'auto'); });
17
- export var ButtonsSummary = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"])));
18
- export var ButtonsWrapper = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n gap: 10px;\n min-width: fit-content;\n flex-direction: column;\n\n @media (max-width: 1000px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n }\n\n @media print {\n display: none;\n }\n"], ["\n display: flex;\n gap: 10px;\n min-width: fit-content;\n flex-direction: column;\n\n @media (max-width: 1000px) {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n flex-direction: row;\n }\n\n @media (max-width: 768px) {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n flex-direction: row;\n }\n\n @media print {\n display: none;\n }\n"])));
17
+ export var ButtonsSummary = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"], ["\n\n @media (max-width: 768px) {\n align-items: center;\n max-width: 100%;\n }\n"])));
18
+ export var ButtonsWrapper = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n gap: 10px;\n min-width: fit-content;\n flex-direction: column;\n\n @media print {\n display: none;\n }\n"], ["\n display: flex;\n gap: 10px;\n min-width: fit-content;\n flex-direction: column;\n\n @media print {\n display: none;\n }\n"])));
19
19
  export var SummaryButton = styled(Button)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n background: ", ";\n color: ", ";\n cursor: ", ";\n opacity: ", ";\n pointer-events: ", ";\n\n &:hover {\n background: ", ";\n }\n"], ["\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n background: ", ";\n color: ", ";\n cursor: ", ";\n opacity: ", ";\n pointer-events: ", ";\n\n &:hover {\n background: ", ";\n }\n"])), function (_a) {
20
20
  var theme = _a.theme, disabled = _a.disabled;
21
21
  return disabled ? theme.colors.cinzaClaro : theme.colors.azulCredithub;
@@ -28,7 +28,7 @@ export var Summary = function (_a) {
28
28
  React.createElement(AddItemField, { name: card.header, value: card.title }))); })),
29
29
  React.createElement(ButtonsWrapper, null,
30
30
  React.createElement(ButtonAtualizarDadosRfb, null),
31
- products.map(function (product, index) { return (React.createElement(ButtonsSummary, { key: index, style: { display: (product === null || product === void 0 ? void 0 : product.hide) ? 'none' : '', width: '100%' } },
31
+ products.map(function (product, index) { return (React.createElement(ButtonsSummary, { key: index, style: { display: (product === null || product === void 0 ? void 0 : product.hide) ? 'none' : '' } },
32
32
  React.createElement(SummaryButton, { onClick: function () { return (product === null || product === void 0 ? void 0 : product.onClick) && (product === null || product === void 0 ? void 0 : product.onClick()); }, disabled: product.isLoading, smallContent: product.price ? formatMoney(product.price) : undefined }, product.isLoading ? React.createElement(Spinner, null) : product.title))); })),
33
33
  React.createElement(Modal, { isOpen: isModalOpen, onClose: closeModal, title: "\uD83D\uDEA7 Consulta temporariamente indispon\u00EDvel", message: "A consulta Pefin/Refin Serasa est\u00E1 fora do ar devido a mudan\u00E7as na fonte. Nossa equipe j\u00E1 est\u00E1 trabalhando para resolver, mas ainda n\u00E3o h\u00E1 previs\u00E3o de normaliza\u00E7\u00E3o.", incidentUrl: "https://credithub.statuspage.io/incidents/hnvx1dxby7rk" })),
34
34
  isScrModalOpen && (React.createElement(ScrDataBaseModal, { isOpen: isScrModalOpen, onClose: function () { return setScrModalOpen(false); }, onConfirm: function (selected) {
@@ -23,6 +23,12 @@ var ProcessosJuridicos = function (_a) {
23
23
  // Use a ref instead of state to track whether data has been processed
24
24
  var processedRef = useRef(false);
25
25
  var ctxHashRef = useRef('');
26
+ useEffect(function () {
27
+ if (ctx.type === RequestStatus.Loading) {
28
+ processedRef.current = false;
29
+ setData(function (prevState) { return (__assign(__assign({}, prevState), { processosJuridicosData: __assign(__assign({}, prevState.processosJuridicosData), { isLoaded: false }) })); });
30
+ }
31
+ }, [ctx.type, setData]);
26
32
  useEffect(function () {
27
33
  var _a;
28
34
  // Create a hash of the current context state to detect changes