@gustavo-valsechi/client 1.4.60 → 1.4.61
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/types/form/index.js +1 -1
- package/dist/components/types/form/index.mjs +1 -1
- package/dist/components/types/form/types/custom/index.js +1 -1
- package/dist/components/types/form/types/custom/index.mjs +1 -1
- package/dist/components/types/form/types/datetime/index.js +1 -1
- package/dist/components/types/form/types/datetime/index.mjs +1 -1
- package/dist/components/types/form/types/select/index.js +1 -1
- package/dist/components/types/form/types/select/index.mjs +1 -1
- package/dist/components/types/form/types/text/index.js +1 -1
- package/dist/components/types/form/types/text/index.mjs +1 -1
- package/dist/components/types/form/types/textarea/index.js +1 -1
- package/dist/components/types/form/types/textarea/index.mjs +1 -1
- package/dist/contexts/target/index.js +3 -3
- package/dist/contexts/target/index.mjs +4 -4
- package/dist/interfaces/components/form/custom/index.d.ts +1 -1
- package/dist/interfaces/components/form/select/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ function InputCustom(props) {
|
|
|
31
31
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
32
32
|
(0, import_react.useEffect)(() => {
|
|
33
33
|
var _a;
|
|
34
|
-
(_a = props.
|
|
34
|
+
(_a = props.setValue) == null ? void 0 : _a.call(props, props.name, props.value);
|
|
35
35
|
}, [props.name, props.value]);
|
|
36
36
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, children: [
|
|
37
37
|
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
|
|
@@ -8,7 +8,7 @@ function InputCustom(props) {
|
|
|
8
8
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
var _a;
|
|
11
|
-
(_a = props.
|
|
11
|
+
(_a = props.setValue) == null ? void 0 : _a.call(props, props.name, props.value);
|
|
12
12
|
}, [props.name, props.value]);
|
|
13
13
|
return /* @__PURE__ */ jsxs(Container, { className: props.className, children: [
|
|
14
14
|
!!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
|
|
@@ -53,7 +53,7 @@ function InputDateTime(props) {
|
|
|
53
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
54
|
"input",
|
|
55
55
|
{
|
|
56
|
-
...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
|
|
56
|
+
...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "required", "register", "setValue"]),
|
|
57
57
|
type: "datetime-local",
|
|
58
58
|
onFocus: () => {
|
|
59
59
|
if (props.onFocus) props.onFocus(props.name);
|
|
@@ -20,7 +20,7 @@ function InputDateTime(props) {
|
|
|
20
20
|
/* @__PURE__ */ jsx("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx(
|
|
21
21
|
"input",
|
|
22
22
|
{
|
|
23
|
-
..._.omit(props, ["className", "onChange", "mask", "type", "required", "register"]),
|
|
23
|
+
..._.omit(props, ["className", "onChange", "mask", "type", "required", "register", "setValue"]),
|
|
24
24
|
type: "datetime-local",
|
|
25
25
|
onFocus: () => {
|
|
26
26
|
if (props.onFocus) props.onFocus(props.name);
|
|
@@ -72,7 +72,7 @@ function InputSelect(props) {
|
|
|
72
72
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
73
|
"input",
|
|
74
74
|
{
|
|
75
|
-
...import_lodash.default.omit(props, ["className", "register", "mask"]),
|
|
75
|
+
...import_lodash.default.omit(props, ["className", "register", "mask", "setvalue"]),
|
|
76
76
|
type: "text",
|
|
77
77
|
maxLength: props.maxLength || 255,
|
|
78
78
|
...register,
|
|
@@ -39,7 +39,7 @@ function InputSelect(props) {
|
|
|
39
39
|
/* @__PURE__ */ jsx(
|
|
40
40
|
"input",
|
|
41
41
|
{
|
|
42
|
-
..._.omit(props, ["className", "register", "mask"]),
|
|
42
|
+
..._.omit(props, ["className", "register", "mask", "setvalue"]),
|
|
43
43
|
type: "text",
|
|
44
44
|
maxLength: props.maxLength || 255,
|
|
45
45
|
...register,
|
|
@@ -56,7 +56,7 @@ function InputText(props) {
|
|
|
56
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
57
|
"input",
|
|
58
58
|
{
|
|
59
|
-
...import_lodash.default.omit(props, ["className", "register", "mask"]),
|
|
59
|
+
...import_lodash.default.omit(props, ["className", "register", "mask", "setValue"]),
|
|
60
60
|
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
61
61
|
maxLength: props.maxLength || 255,
|
|
62
62
|
onFocus: () => {
|
|
@@ -23,7 +23,7 @@ function InputText(props) {
|
|
|
23
23
|
/* @__PURE__ */ jsx(
|
|
24
24
|
"input",
|
|
25
25
|
{
|
|
26
|
-
..._.omit(props, ["className", "register", "mask"]),
|
|
26
|
+
..._.omit(props, ["className", "register", "mask", "setValue"]),
|
|
27
27
|
type: props.type === "password" ? showPassword ? "text" : "password" : props.type,
|
|
28
28
|
maxLength: props.maxLength || 255,
|
|
29
29
|
onFocus: () => {
|
|
@@ -53,7 +53,7 @@ function InputTextarea(props) {
|
|
|
53
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-input-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
54
|
"textarea",
|
|
55
55
|
{
|
|
56
|
-
...import_lodash.default.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register"]),
|
|
56
|
+
...import_lodash.default.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register", "setValue"]),
|
|
57
57
|
maxLength: props.maxLength,
|
|
58
58
|
rows: props.rows || 5,
|
|
59
59
|
onFocus: () => {
|
|
@@ -20,7 +20,7 @@ function InputTextarea(props) {
|
|
|
20
20
|
/* @__PURE__ */ jsx("div", { className: "iz-input-content", children: /* @__PURE__ */ jsx(
|
|
21
21
|
"textarea",
|
|
22
22
|
{
|
|
23
|
-
..._.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register"]),
|
|
23
|
+
..._.omit(props, ["onFocus", "maxLength", "className", "onChange", "mask", "rows", "required", "register", "setValue"]),
|
|
24
24
|
maxLength: props.maxLength,
|
|
25
25
|
rows: props.rows || 5,
|
|
26
26
|
onFocus: () => {
|
|
@@ -34,7 +34,7 @@ __export(target_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(target_exports);
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_react = require("react");
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_styles = require("./styles");
|
|
39
39
|
var import_lodash = __toESM(require("lodash"));
|
|
40
40
|
const TargetContext = (0, import_react.createContext)({});
|
|
@@ -54,7 +54,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
54
54
|
console.log("isShow", isShow);
|
|
55
55
|
if (isShow) {
|
|
56
56
|
const showIndex = import_lodash.default.findIndex(showMemory, (data) => data.index === index);
|
|
57
|
-
showMemory.
|
|
57
|
+
showMemory.splice(showIndex, 1);
|
|
58
58
|
setShow(showMemory);
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
@@ -107,7 +107,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
107
107
|
children: target.component
|
|
108
108
|
},
|
|
109
109
|
index
|
|
110
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {}, index);
|
|
111
111
|
}
|
|
112
112
|
),
|
|
113
113
|
children
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { createContext, useContext, useEffect, useState } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React, { createContext, useContext, useEffect, useState } from "react";
|
|
4
4
|
import { Container } from "./styles";
|
|
5
5
|
import _ from "lodash";
|
|
6
6
|
const TargetContext = createContext({});
|
|
@@ -20,7 +20,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
20
20
|
console.log("isShow", isShow);
|
|
21
21
|
if (isShow) {
|
|
22
22
|
const showIndex = _.findIndex(showMemory, (data) => data.index === index);
|
|
23
|
-
showMemory.
|
|
23
|
+
showMemory.splice(showIndex, 1);
|
|
24
24
|
setShow(showMemory);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
@@ -73,7 +73,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
73
73
|
children: target.component
|
|
74
74
|
},
|
|
75
75
|
index
|
|
76
|
-
) : /* @__PURE__ */ jsx(Fragment, {});
|
|
76
|
+
) : /* @__PURE__ */ jsx(React.Fragment, {}, index);
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
79
|
children
|