@gustavo-valsechi/client 1.4.239 → 1.4.241
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.
|
@@ -38,14 +38,12 @@ var import_react = require("react");
|
|
|
38
38
|
var import_styles = require("./styles");
|
|
39
39
|
var import_label = require("../label");
|
|
40
40
|
var import_error = require("../error");
|
|
41
|
-
var import_react_datepicker = __toESM(require("react-datepicker"));
|
|
42
41
|
var import_lodash = __toESM(require("lodash"));
|
|
43
|
-
var import_react_datepicker2 = require("react-datepicker/dist/react-datepicker.css");
|
|
44
42
|
function InputDateTime(props) {
|
|
45
43
|
const inputRef = (0, import_react.useRef)();
|
|
46
44
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
47
|
-
const [date, setDate] = (0, import_react.useState)(null);
|
|
48
45
|
const onChange = (event) => {
|
|
46
|
+
event.target.value = event.target.value || "";
|
|
49
47
|
if (register.onChange) register.onChange(event);
|
|
50
48
|
if (props.onChange) props.onChange(event);
|
|
51
49
|
};
|
|
@@ -57,17 +55,16 @@ function InputDateTime(props) {
|
|
|
57
55
|
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.InputLabel, { optional: props.optional, children: props.label }),
|
|
58
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "input-content", children: [
|
|
59
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
-
|
|
58
|
+
"input",
|
|
61
59
|
{
|
|
62
60
|
...import_lodash.default.omit(props, ["className", "onChange", "mask", "type", "optional", "register", "setValue", "watch", "optional"]),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
placeholderText: "Selecione data e hora"
|
|
61
|
+
type: "datetime-local",
|
|
62
|
+
onFocus: () => {
|
|
63
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
64
|
+
},
|
|
65
|
+
...register,
|
|
66
|
+
ref: inputRef,
|
|
67
|
+
onChange
|
|
71
68
|
}
|
|
72
69
|
),
|
|
73
70
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useRef
|
|
4
|
+
import { useRef } from "react";
|
|
5
5
|
import { Container } from "./styles";
|
|
6
6
|
import { InputLabel } from "../label";
|
|
7
7
|
import { InputError } from "../error";
|
|
8
|
-
import DatePicker from "react-datepicker";
|
|
9
8
|
import _ from "lodash";
|
|
10
|
-
import "react-datepicker/dist/react-datepicker.css";
|
|
11
9
|
function InputDateTime(props) {
|
|
12
10
|
const inputRef = useRef();
|
|
13
11
|
const register = (props.register || ((name) => ({})))(props.name || "");
|
|
14
|
-
const [date, setDate] = useState(null);
|
|
15
12
|
const onChange = (event) => {
|
|
13
|
+
event.target.value = event.target.value || "";
|
|
16
14
|
if (register.onChange) register.onChange(event);
|
|
17
15
|
if (props.onChange) props.onChange(event);
|
|
18
16
|
};
|
|
@@ -24,17 +22,16 @@ function InputDateTime(props) {
|
|
|
24
22
|
!!props.label && /* @__PURE__ */ jsx(InputLabel, { optional: props.optional, children: props.label }),
|
|
25
23
|
/* @__PURE__ */ jsxs("div", { className: "input-content", children: [
|
|
26
24
|
/* @__PURE__ */ jsx(
|
|
27
|
-
|
|
25
|
+
"input",
|
|
28
26
|
{
|
|
29
27
|
..._.omit(props, ["className", "onChange", "mask", "type", "optional", "register", "setValue", "watch", "optional"]),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
placeholderText: "Selecione data e hora"
|
|
28
|
+
type: "datetime-local",
|
|
29
|
+
onFocus: () => {
|
|
30
|
+
if (props.onFocus) props.onFocus(props.name);
|
|
31
|
+
},
|
|
32
|
+
...register,
|
|
33
|
+
ref: inputRef,
|
|
34
|
+
onChange
|
|
38
35
|
}
|
|
39
36
|
),
|
|
40
37
|
/* @__PURE__ */ jsx(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gustavo-valsechi/client",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.241",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,14 +29,12 @@
|
|
|
29
29
|
"@gustavo-valsechi/utils": "1.0.5",
|
|
30
30
|
"@hookform/resolvers": "5.2.2",
|
|
31
31
|
"apexcharts": "3.51.0",
|
|
32
|
-
"date-fns": "4.1.0",
|
|
33
32
|
"lodash": "4.17.21",
|
|
34
33
|
"luhn": "2.4.1",
|
|
35
34
|
"next": "14.2.5",
|
|
36
35
|
"randomcolor": "0.6.2",
|
|
37
36
|
"react-apexcharts": "1.4.1",
|
|
38
37
|
"react-credit-cards-2": "1.0.3",
|
|
39
|
-
"react-datepicker": "9.1.0",
|
|
40
38
|
"react-hook-form": "7.65.0",
|
|
41
39
|
"react-lottie": "1.2.4",
|
|
42
40
|
"tsup": "8.5.0",
|