@gustavo-valsechi/client 1.4.60 → 1.4.62
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/chart/styles.js +1 -0
- package/dist/components/types/chart/styles.mjs +1 -0
- 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/components/types/tooltip/styles.js +1 -0
- package/dist/components/types/tooltip/styles.mjs +1 -0
- package/dist/contexts/modal/styles.js +1 -0
- package/dist/contexts/modal/styles.mjs +1 -0
- package/dist/contexts/target/index.js +4 -5
- package/dist/contexts/target/index.mjs +5 -6
- package/dist/contexts/target/styles.js +1 -0
- package/dist/contexts/target/styles.mjs +1 -0
- package/dist/contexts/theme/styles.js +1 -0
- package/dist/contexts/theme/styles.mjs +1 -0
- 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)({});
|
|
@@ -49,12 +49,10 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
49
49
|
const element = (_a = target.ref) == null ? void 0 : _a.current;
|
|
50
50
|
if (!element) return;
|
|
51
51
|
element.addEventListener("click", () => {
|
|
52
|
-
console.log("showMemory", showMemory);
|
|
53
52
|
const isShow = import_lodash.default.find(showMemory, (data) => data.index === index);
|
|
54
|
-
console.log("isShow", isShow);
|
|
55
53
|
if (isShow) {
|
|
56
54
|
const showIndex = import_lodash.default.findIndex(showMemory, (data) => data.index === index);
|
|
57
|
-
showMemory.
|
|
55
|
+
showMemory.splice(showIndex, 1);
|
|
58
56
|
setShow(showMemory);
|
|
59
57
|
return;
|
|
60
58
|
}
|
|
@@ -63,6 +61,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
63
61
|
});
|
|
64
62
|
});
|
|
65
63
|
}, [targets]);
|
|
64
|
+
console.log(show);
|
|
66
65
|
const getCoords = (target) => {
|
|
67
66
|
const rect = target.getBoundingClientRect();
|
|
68
67
|
const targetTop = rect.top + window.scrollY;
|
|
@@ -107,7 +106,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
107
106
|
children: target.component
|
|
108
107
|
},
|
|
109
108
|
index
|
|
110
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
109
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {}, index);
|
|
111
110
|
}
|
|
112
111
|
),
|
|
113
112
|
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({});
|
|
@@ -15,12 +15,10 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
15
15
|
const element = (_a = target.ref) == null ? void 0 : _a.current;
|
|
16
16
|
if (!element) return;
|
|
17
17
|
element.addEventListener("click", () => {
|
|
18
|
-
console.log("showMemory", showMemory);
|
|
19
18
|
const isShow = _.find(showMemory, (data) => data.index === index);
|
|
20
|
-
console.log("isShow", isShow);
|
|
21
19
|
if (isShow) {
|
|
22
20
|
const showIndex = _.findIndex(showMemory, (data) => data.index === index);
|
|
23
|
-
showMemory.
|
|
21
|
+
showMemory.splice(showIndex, 1);
|
|
24
22
|
setShow(showMemory);
|
|
25
23
|
return;
|
|
26
24
|
}
|
|
@@ -29,6 +27,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
29
27
|
});
|
|
30
28
|
});
|
|
31
29
|
}, [targets]);
|
|
30
|
+
console.log(show);
|
|
32
31
|
const getCoords = (target) => {
|
|
33
32
|
const rect = target.getBoundingClientRect();
|
|
34
33
|
const targetTop = rect.top + window.scrollY;
|
|
@@ -73,7 +72,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
73
72
|
children: target.component
|
|
74
73
|
},
|
|
75
74
|
index
|
|
76
|
-
) : /* @__PURE__ */ jsx(Fragment, {});
|
|
75
|
+
) : /* @__PURE__ */ jsx(React.Fragment, {}, index);
|
|
77
76
|
}
|
|
78
77
|
),
|
|
79
78
|
children
|