@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.
@@ -99,7 +99,7 @@ function Form(props) {
99
99
  type: component2 ? void 0 : data.type,
100
100
  error: (_a = errors[data.name]) == null ? void 0 : _a.message,
101
101
  register,
102
- setvalue: setValue
102
+ setValue
103
103
  }
104
104
  );
105
105
  };
@@ -65,7 +65,7 @@ function Form(props) {
65
65
  type: component2 ? void 0 : data.type,
66
66
  error: (_a = errors[data.name]) == null ? void 0 : _a.message,
67
67
  register,
68
- setvalue: setValue
68
+ setValue
69
69
  }
70
70
  );
71
71
  };
@@ -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.setvalue) == null ? void 0 : _a.call(props, props.name, props.value);
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.setvalue) == null ? void 0 : _a.call(props, props.name, props.value);
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.slice(showIndex, 1);
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)(import_jsx_runtime.Fragment, {});
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 { Fragment, jsx, jsxs } from "react/jsx-runtime";
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.slice(showIndex, 1);
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
@@ -13,7 +13,7 @@ export interface IInputCustom {
13
13
  disabled?: boolean;
14
14
  required?: boolean;
15
15
  register?: UseFormRegister<any>;
16
- setvalue?: (...args: any[]) => void;
16
+ setValue?: (...args: any[]) => void;
17
17
  children: React.ReactNode;
18
18
  validation?: typeof z;
19
19
  }
@@ -16,6 +16,6 @@ export interface IInputSelect {
16
16
  register?: UseFormRegister<any>;
17
17
  validation?: typeof z;
18
18
  mask?: (value: string) => void;
19
- setvalue?: (...args: any[]) => void;
19
+ setValue?: (...args: any[]) => void;
20
20
  maxLength?: number;
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.60",
3
+ "version": "1.4.61",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",