@ssplib/react-components 0.0.68 → 0.0.70
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.
|
@@ -4,8 +4,9 @@ export declare function ToggleVisibility({ invert, ...props }: {
|
|
|
4
4
|
unregisterNameList: string[];
|
|
5
5
|
invert?: boolean;
|
|
6
6
|
}): JSX.Element;
|
|
7
|
-
export declare function SwitchWatch(props: {
|
|
7
|
+
export declare function SwitchWatch({ invert, ...props }: {
|
|
8
8
|
children: JSX.Element | JSX.Element[];
|
|
9
9
|
switchId: string;
|
|
10
10
|
unregisterNameList: string[];
|
|
11
|
+
invert?: boolean;
|
|
11
12
|
}): JSX.Element;
|
|
@@ -37,7 +37,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.SwitchWatch = exports.ToggleVisibility = void 0;
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const form_1 = require("../../../context/form");
|
|
40
|
-
const lodash_1 = require("lodash");
|
|
41
40
|
// Coloque esse componente dentro de um bloco que é retirado com o valor do input
|
|
42
41
|
function ToggleVisibility(_a) {
|
|
43
42
|
var { invert = false } = _a, props = __rest(_a, ["invert"]);
|
|
@@ -52,10 +51,11 @@ function ToggleVisibility(_a) {
|
|
|
52
51
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
53
52
|
}
|
|
54
53
|
exports.ToggleVisibility = ToggleVisibility;
|
|
55
|
-
function SwitchWatch(
|
|
54
|
+
function SwitchWatch(_a) {
|
|
55
|
+
var { invert = false } = _a, props = __rest(_a, ["invert"]);
|
|
56
56
|
const context = (0, react_1.useContext)(form_1.FormContext);
|
|
57
|
-
return (react_1.default.createElement(react_1.default.Fragment, null, (context === null || context === void 0 ? void 0 : context.formWatch(props.switchId)) !==
|
|
58
|
-
react_1.default.createElement(ToggleVisibility, { switchId: props.switchId, unregisterNameList: props.unregisterNameList }),
|
|
57
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, (context === null || context === void 0 ? void 0 : context.formWatch(props.switchId)) !== invert && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
58
|
+
react_1.default.createElement(ToggleVisibility, { switchId: props.switchId, unregisterNameList: props.unregisterNameList, invert: invert }),
|
|
59
59
|
props.children))));
|
|
60
60
|
}
|
|
61
61
|
exports.SwitchWatch = SwitchWatch;
|
|
@@ -126,7 +126,7 @@ function Table({ columns, fetchFunc, emptyMsg = {
|
|
|
126
126
|
if (status.includes(key)) {
|
|
127
127
|
switch (key) {
|
|
128
128
|
case 'P':
|
|
129
|
-
if ('
|
|
129
|
+
if ('EM ANÁLISE'.includes(searchValue.toLowerCase())) {
|
|
130
130
|
exists = true;
|
|
131
131
|
}
|
|
132
132
|
return;
|
|
@@ -236,7 +236,7 @@ function Table({ columns, fetchFunc, emptyMsg = {
|
|
|
236
236
|
const getStatusMsg = (0, react_1.useCallback)((cod) => {
|
|
237
237
|
switch (cod) {
|
|
238
238
|
case 'P':
|
|
239
|
-
return (react_1.default.createElement(Typography_1.default, { color: '#F59E0B', fontWeight: 600, fontFamily: 'Inter' }, "
|
|
239
|
+
return (react_1.default.createElement(Typography_1.default, { color: '#F59E0B', fontWeight: 600, fontFamily: 'Inter' }, "EM AN\u00C1LISE"));
|
|
240
240
|
case 'A':
|
|
241
241
|
return (react_1.default.createElement(Typography_1.default, { color: '#22C55E', fontWeight: 600, fontFamily: 'Inter' }, "CADASTRADO"));
|
|
242
242
|
case 'C':
|