@credithub/harlan-components 1.63.2 → 1.64.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/liminar/liminar.js +19 -1
- package/lib/cjs/index.js +20 -2
- package/lib/esm/index.js +20 -2
- package/package.json +1 -1
|
@@ -30,6 +30,20 @@ var Liminar = function () {
|
|
|
30
30
|
var _a, _b, _c;
|
|
31
31
|
var ctx = useContext(Queries.LiminarCenprot);
|
|
32
32
|
var _d = useGlobalData(), globalData = _d.data, setData = _d.setData;
|
|
33
|
+
var origemLiminar = useMemo(function () {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
var tipo = (_b = (_a = ctx.document) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
36
|
+
switch (tipo) {
|
|
37
|
+
case 'cenprot':
|
|
38
|
+
return 'Liminar em Cartório';
|
|
39
|
+
case 'serasa':
|
|
40
|
+
return 'Liminar em Base Privada';
|
|
41
|
+
case 'judicial':
|
|
42
|
+
return 'Liminar no Processo';
|
|
43
|
+
default:
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
}, [ctx.document]);
|
|
33
47
|
// Use refs instead of state to avoid rendering cycles
|
|
34
48
|
var processedRef = useRef(false);
|
|
35
49
|
var processingRef = useRef(true);
|
|
@@ -149,7 +163,11 @@ var Liminar = function () {
|
|
|
149
163
|
return {
|
|
150
164
|
children: React.createElement(React.Fragment, null),
|
|
151
165
|
variant: variant,
|
|
152
|
-
description: (React.createElement(
|
|
166
|
+
description: (React.createElement(React.Fragment, null,
|
|
167
|
+
React.createElement(StatusMessage, { type: variant },
|
|
168
|
+
globalMessage,
|
|
169
|
+
' '),
|
|
170
|
+
origemLiminar && (React.createElement(StatusMessage, { type: variant }, origemLiminar))))
|
|
153
171
|
};
|
|
154
172
|
} }));
|
|
155
173
|
};
|