@gustavo-valsechi/client 1.4.352 → 1.4.353

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.
@@ -77,7 +77,7 @@ function InputDateTime(props) {
77
77
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
78
  "input",
79
79
  {
80
- ...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch", "optional", "getValues", "setError", "defaultValue"]),
80
+ ...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch", "optional", "getValues", "setError"]),
81
81
  type: "datetime-local",
82
82
  onFocus: () => {
83
83
  if (props.onFocus) props.onFocus(props.name);
@@ -44,7 +44,7 @@ function InputDateTime(props) {
44
44
  /* @__PURE__ */ jsx(
45
45
  "input",
46
46
  {
47
- ..._.omit(props, ["className", "register", "mask", "setValue", "watch", "optional", "getValues", "setError", "defaultValue"]),
47
+ ..._.omit(props, ["className", "register", "mask", "setValue", "watch", "optional", "getValues", "setError"]),
48
48
  type: "datetime-local",
49
49
  onFocus: () => {
50
50
  if (props.onFocus) props.onFocus(props.name);
@@ -48,13 +48,6 @@ let memory = import_utils.default.moment().startOf("minutes");
48
48
  function InputDateTimePicker(props) {
49
49
  const theme = (0, import_contexts.useTheme)();
50
50
  const [dateTime, setDateTime] = (0, import_react.useState)(import_utils.default.moment().startOf("minutes"));
51
- (0, import_react.useEffect)(() => {
52
- var _a;
53
- console.log(props.defaultValue);
54
- if (!props.defaultValue || !!props.value) return;
55
- setDateTime(import_utils.default.moment(props.defaultValue).startOf("minutes"));
56
- (_a = props.setValue) == null ? void 0 : _a.call(props, props.name, import_utils.default.moment(props.defaultValue).startOf("minutes").format("YYYY-MM-DD HH:mm"));
57
- }, [props.defaultValue, props.value]);
58
51
  (0, import_react.useEffect)(() => {
59
52
  const valueMoment = import_utils.default.moment(props.value || void 0).format("YYYY-MM-DD HH:mm");
60
53
  if (valueMoment === memory.format("YYYY-MM-DD HH:mm")) return;
@@ -15,13 +15,6 @@ let memory = Utils.moment().startOf("minutes");
15
15
  function InputDateTimePicker(props) {
16
16
  const theme = useTheme();
17
17
  const [dateTime, setDateTime] = useState(Utils.moment().startOf("minutes"));
18
- useEffect(() => {
19
- var _a;
20
- console.log(props.defaultValue);
21
- if (!props.defaultValue || !!props.value) return;
22
- setDateTime(Utils.moment(props.defaultValue).startOf("minutes"));
23
- (_a = props.setValue) == null ? void 0 : _a.call(props, props.name, Utils.moment(props.defaultValue).startOf("minutes").format("YYYY-MM-DD HH:mm"));
24
- }, [props.defaultValue, props.value]);
25
18
  useEffect(() => {
26
19
  const valueMoment = Utils.moment(props.value || void 0).format("YYYY-MM-DD HH:mm");
27
20
  if (valueMoment === memory.format("YYYY-MM-DD HH:mm")) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.352",
3
+ "version": "1.4.353",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",