@gustavo-valsechi/client 1.4.59 → 1.4.60
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/index.js
CHANGED
|
@@ -40,9 +40,7 @@ var import_lodash = __toESM(require("lodash"));
|
|
|
40
40
|
var Types = __toESM(require("./types"));
|
|
41
41
|
__reExport(components_exports, require("./types"), module.exports);
|
|
42
42
|
function Component(props) {
|
|
43
|
-
console.log("COMPONENTE RENDERIZADO");
|
|
44
43
|
const renderComponent = (config) => {
|
|
45
|
-
console.log(config);
|
|
46
44
|
const ComponentElement = Types[config.type];
|
|
47
45
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComponentElement, { ...config.props });
|
|
48
46
|
};
|
|
@@ -6,9 +6,7 @@ import _ from "lodash";
|
|
|
6
6
|
import * as Types from "./types";
|
|
7
7
|
export * from "./types";
|
|
8
8
|
function Component(props) {
|
|
9
|
-
console.log("COMPONENTE RENDERIZADO");
|
|
10
9
|
const renderComponent = (config) => {
|
|
11
|
-
console.log(config);
|
|
12
10
|
const ComponentElement = Types[config.type];
|
|
13
11
|
return /* @__PURE__ */ jsx(ComponentElement, { ...config.props });
|
|
14
12
|
};
|
|
@@ -91,7 +91,6 @@ function Form(props) {
|
|
|
91
91
|
inputType = import_lodash.default.includes(inputType, "Input") ? inputType : `Input${inputType}`;
|
|
92
92
|
const component2 = Types[inputType];
|
|
93
93
|
const ComponentType = component2 || Types.InputText;
|
|
94
|
-
console.log(data);
|
|
95
94
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
95
|
ComponentType,
|
|
97
96
|
{
|
|
@@ -110,7 +109,6 @@ function Form(props) {
|
|
|
110
109
|
await props.onSubmit(data);
|
|
111
110
|
setSubmitting(false);
|
|
112
111
|
};
|
|
113
|
-
console.log("FORM RENDERIZADO");
|
|
114
112
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { ref: formRef, onSubmit: handleSubmit(onSubmit), children: [
|
|
115
113
|
import_lodash.default.map(
|
|
116
114
|
props.inputs,
|
|
@@ -57,7 +57,6 @@ function Form(props) {
|
|
|
57
57
|
inputType = _.includes(inputType, "Input") ? inputType : `Input${inputType}`;
|
|
58
58
|
const component2 = Types[inputType];
|
|
59
59
|
const ComponentType = component2 || Types.InputText;
|
|
60
|
-
console.log(data);
|
|
61
60
|
return /* @__PURE__ */ jsx(
|
|
62
61
|
ComponentType,
|
|
63
62
|
{
|
|
@@ -76,7 +75,6 @@ function Form(props) {
|
|
|
76
75
|
await props.onSubmit(data);
|
|
77
76
|
setSubmitting(false);
|
|
78
77
|
};
|
|
79
|
-
console.log("FORM RENDERIZADO");
|
|
80
78
|
return /* @__PURE__ */ jsxs(Container, { ref: formRef, onSubmit: handleSubmit(onSubmit), children: [
|
|
81
79
|
_.map(
|
|
82
80
|
props.inputs,
|
|
@@ -53,7 +53,8 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
53
53
|
const isShow = import_lodash.default.find(showMemory, (data) => data.index === index);
|
|
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
58
|
setShow(showMemory);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
@@ -62,7 +63,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
62
63
|
});
|
|
63
64
|
});
|
|
64
65
|
}, [targets]);
|
|
65
|
-
console.log("targets", targets);
|
|
66
66
|
const getCoords = (target) => {
|
|
67
67
|
const rect = target.getBoundingClientRect();
|
|
68
68
|
const targetTop = rect.top + window.scrollY;
|
|
@@ -19,7 +19,8 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
19
19
|
const isShow = _.find(showMemory, (data) => data.index === index);
|
|
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
24
|
setShow(showMemory);
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
@@ -28,7 +29,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
31
|
}, [targets]);
|
|
31
|
-
console.log("targets", targets);
|
|
32
32
|
const getCoords = (target) => {
|
|
33
33
|
const rect = target.getBoundingClientRect();
|
|
34
34
|
const targetTop = rect.top + window.scrollY;
|