@ahmadmubarak98/namozaj 1.6.11 → 1.6.12
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/namozaj.js +19 -23
- package/package.json +1 -1
package/dist/namozaj.js
CHANGED
|
@@ -46334,26 +46334,21 @@ const FileField = ({
|
|
|
46334
46334
|
onChange: l,
|
|
46335
46335
|
error: c
|
|
46336
46336
|
}) => {
|
|
46337
|
-
const { name: p, meta: d, type: u } = t, b = useFormContext(), h = (
|
|
46338
|
-
|
|
46339
|
-
|
|
46340
|
-
|
|
46341
|
-
(m) => {
|
|
46342
|
-
if (!(typeof m > "u" || m === null))
|
|
46343
|
-
return typeof m == "function" ? m(b.watch(), b) : m;
|
|
46337
|
+
const { name: p, meta: d, type: u } = t, b = useFormContext(), h = useCallback(
|
|
46338
|
+
(C) => {
|
|
46339
|
+
if (!(typeof C > "u" || C === null))
|
|
46340
|
+
return typeof C == "function" ? C(b.watch(), b) : C;
|
|
46344
46341
|
},
|
|
46345
46342
|
[b, b == null ? void 0 : b.watch()]
|
|
46346
|
-
)
|
|
46347
|
-
|
|
46348
|
-
|
|
46349
|
-
|
|
46350
|
-
|
|
46351
|
-
|
|
46352
|
-
|
|
46353
|
-
|
|
46354
|
-
|
|
46355
|
-
}));
|
|
46356
|
-
}, [a]), /* @__PURE__ */ jsx(
|
|
46343
|
+
), g = h(d.min), m = h(d.max), y = (C) => {
|
|
46344
|
+
const v = C.target.value;
|
|
46345
|
+
if (v.trim() === "") {
|
|
46346
|
+
l(null);
|
|
46347
|
+
return;
|
|
46348
|
+
}
|
|
46349
|
+
/^-?\d*\.?\d+$/.test(v.trim()) ? (l(parseFloat(v)), typeof g == "object" && parseFloat(v) < g.value && (b.setValue(p, g.value), b.clearErrors(p)), typeof m == "object" && parseFloat(v) > m.value && (b.setValue(p, m.value), b.clearErrors(p))) : l(null);
|
|
46350
|
+
};
|
|
46351
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
46357
46352
|
TextField$2,
|
|
46358
46353
|
{
|
|
46359
46354
|
id: e,
|
|
@@ -46368,16 +46363,16 @@ const FileField = ({
|
|
|
46368
46363
|
endAdornment: d.endAdornment
|
|
46369
46364
|
},
|
|
46370
46365
|
htmlInput: {
|
|
46371
|
-
min:
|
|
46372
|
-
max:
|
|
46366
|
+
// min: typeof min === "object" ? min.value : min,
|
|
46367
|
+
// max: typeof max === "object" ? max.value : max,
|
|
46373
46368
|
step: d.step
|
|
46374
46369
|
}
|
|
46375
46370
|
},
|
|
46376
46371
|
value: a ?? "",
|
|
46377
|
-
onChange:
|
|
46372
|
+
onChange: y,
|
|
46378
46373
|
fullWidth: !0
|
|
46379
46374
|
}
|
|
46380
|
-
);
|
|
46375
|
+
) });
|
|
46381
46376
|
}, SliderField = ({ id: e, config: t, value: a, onChange: l }) => {
|
|
46382
46377
|
const {
|
|
46383
46378
|
meta: {
|
|
@@ -85026,7 +85021,8 @@ const _ = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports), MultiSelectFie
|
|
|
85026
85021
|
error: h.fieldState.error
|
|
85027
85022
|
}) }),
|
|
85028
85023
|
((w = d.helperText) == null ? void 0 : w.content) && shouldRenderHelperText(e.type) && /* @__PURE__ */ jsx(Box, { mt: 0.25, children: /* @__PURE__ */ jsx(HelperText, { ...d.helperText }) }),
|
|
85029
|
-
h.fieldState.error && h.fieldState.error.message && /* @__PURE__ */ jsx(FormHelperText$1, { error: !0, children: h.fieldState.error.message })
|
|
85024
|
+
h.fieldState.error && h.fieldState.error.message && /* @__PURE__ */ jsx(FormHelperText$1, { error: !0, children: h.fieldState.error.message }),
|
|
85025
|
+
JSON.stringify(h.fieldState.error)
|
|
85030
85026
|
]
|
|
85031
85027
|
}
|
|
85032
85028
|
) : null;
|