@credithub/harlan-components 1.120.0 → 1.120.2

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.
@@ -158,7 +158,7 @@ var useChartData = function (consultaSerasa, consultaBoaVista) {
158
158
  ctxHistory.type === RequestStatus.Success &&
159
159
  ctxProtestos.type === RequestStatus.Success &&
160
160
  ctxCCF.type === RequestStatus.Success &&
161
- ctxProcessos.type === RequestStatus.Success);
161
+ (ctxProcessos.type === RequestStatus.Success || ctxProcessos.type === RequestStatus.Error));
162
162
  }, [ctxHistory.type, ctxProtestos.type, ctxCCF.type, ctxProcessos.type]);
163
163
  useEffect(function () {
164
164
  var _a;
@@ -1,3 +1,7 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
1
5
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
6
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
7
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -42,6 +46,7 @@ import AddItemField from '../common/addItem';
42
46
  import Button from '../common/button';
43
47
  import ModalInstrumentoProtestoSP from '../common/modalInstrumentoProtestoSP';
44
48
  import { ResultContent } from '../interface/result';
49
+ import styled from 'styled-components';
45
50
  import { WebService } from '../webservice';
46
51
  import InstrumentoDiscoveryConfirmModal from './instrumento/InstrumentoDiscoveryConfirmModal';
47
52
  import InstrumentoEmailStatusModal from './instrumento/InstrumentoEmailStatusModal';
@@ -126,21 +131,22 @@ var AIIndicator = function () { return (React.createElement("span", { title: "In
126
131
  fontSize: '0.8em',
127
132
  cursor: 'help'
128
133
  } }, "*")); };
134
+ /**
135
+ * Botão do cartório na coluna UF. Usa styled-component para evitar conflito
136
+ * em produção com estilos globais do app host (button { min-width, margin, flex }).
137
+ * Layout explícito (width: fit-content, display: inline-block) evita deslocamento.
138
+ */
139
+ var UfCellButton = styled.button.attrs({
140
+ type: 'button',
141
+ title: 'Ver dados do cartório'
142
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n all: unset;\n box-sizing: border-box;\n display: inline-block;\n width: fit-content;\n min-width: 0;\n margin: 0;\n padding: 0;\n background: none;\n border: none;\n cursor: pointer;\n text-decoration: underline;\n color: inherit;\n font: inherit;\n"], ["\n all: unset;\n box-sizing: border-box;\n display: inline-block;\n width: fit-content;\n min-width: 0;\n margin: 0;\n padding: 0;\n background: none;\n border: none;\n cursor: pointer;\n text-decoration: underline;\n color: inherit;\n font: inherit;\n"])));
143
+ /** Evita que a célula UF estique e desloque o conteúdo em produção (conflito com estilos do host). */
144
+ var UfCellValueWrapper = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n width: fit-content;\n min-width: 0;\n"], ["\n display: inline-block;\n width: fit-content;\n min-width: 0;\n"])));
129
145
  var UfCell = function (_a) {
130
146
  var uf = _a.uf, hasCartorio = _a.hasCartorio, onOpenCartorio = _a.onOpenCartorio;
131
147
  var display = uf && uf.trim() !== '' ? uf : '—';
132
- if (hasCartorio && onOpenCartorio) {
133
- return (React.createElement("button", { type: "button", onClick: onOpenCartorio, title: "Ver dados do cart\u00F3rio", style: {
134
- background: 'none',
135
- border: 'none',
136
- padding: 0,
137
- cursor: 'pointer',
138
- textDecoration: 'underline',
139
- color: 'inherit',
140
- font: 'inherit'
141
- } }, display));
142
- }
143
- return (React.createElement("span", { title: !hasCartorio ? 'Dados do cartório não disponíveis' : undefined }, display));
148
+ var content = hasCartorio && onOpenCartorio ? (React.createElement(UfCellButton, { onClick: onOpenCartorio }, display)) : (React.createElement("span", { title: !hasCartorio ? 'Dados do cartório não disponíveis' : undefined }, display));
149
+ return React.createElement(UfCellValueWrapper, null, content);
144
150
  };
145
151
  export var ProtestoItem = memo(function (_a) {
146
152
  var _b, _c, _d;
@@ -398,3 +404,4 @@ export var Instrumento = function (_a) {
398
404
  });
399
405
  }); } })));
400
406
  };
407
+ var templateObject_1, templateObject_2;