tp-react-elements-dev 1.4.13 → 1.4.14
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/Form/FormRender.d.ts +4 -0
- package/dist/index.esm.js +23 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52102,24 +52102,27 @@ const PasswordField = ({ props }) => {
|
|
|
52102
52102
|
const handleTogglePasswordVisibility = () => {
|
|
52103
52103
|
setShowPassword((prevShowPassword) => !prevShowPassword);
|
|
52104
52104
|
};
|
|
52105
|
-
return (jsxRuntimeExports.jsxs(FormControl, Object.assign({ fullWidth: true }, { children: [" ", jsxRuntimeExports.jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) =>
|
|
52106
|
-
|
|
52107
|
-
|
|
52108
|
-
|
|
52109
|
-
|
|
52110
|
-
|
|
52111
|
-
|
|
52112
|
-
|
|
52113
|
-
top: "50%",
|
|
52114
|
-
transform: "translateY(-50%)",
|
|
52115
|
-
width: '25px'
|
|
52116
|
-
}, "aria-label": "toggle password visibility", onClick: handleTogglePasswordVisibility, edge: "end" }, { children: showPassword ? (jsxRuntimeExports.jsx(Visibility, { sx: {
|
|
52117
|
-
fontSize: "12px",
|
|
52118
|
-
position: "absolute",
|
|
52119
|
-
} })) : (jsxRuntimeExports.jsx(VisibilityOff, { sx: {
|
|
52120
|
-
fontSize: "12px",
|
|
52105
|
+
return (jsxRuntimeExports.jsxs(FormControl, Object.assign({ fullWidth: true }, { children: [" ", jsxRuntimeExports.jsx(Controller, { control: props.control, name: props.item.name, render: ({ field }) => {
|
|
52106
|
+
var _a, _b;
|
|
52107
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs(Box, Object.assign({ sx: { position: "relative" } }, { children: [" ", jsxRuntimeExports.jsx(TextField, Object.assign({ size: "small", type: showPassword ? "text" : "password", autoComplete: ((_b = (_a = props.item) === null || _a === void 0 ? void 0 : _a.InputProps) === null || _b === void 0 ? void 0 : _b.autoComplete) || 'off', placeholder: props.item.placeholder || "" }, field, { label: `${props.item.label}${props.item.required ? ' *' : ''}`, sx: {
|
|
52108
|
+
width: "100%",
|
|
52109
|
+
"& .css-kichxs-MuiFormLabel-root-MuiInputLabel-root,.css-1holvmy": {
|
|
52110
|
+
top: "-8px",
|
|
52111
|
+
},
|
|
52112
|
+
}, value: field.value || null, disabled: props.item.disable })), jsxRuntimeExports.jsx(IconButton, Object.assign({ sx: {
|
|
52121
52113
|
position: "absolute",
|
|
52122
|
-
|
|
52114
|
+
right: "14px",
|
|
52115
|
+
top: "50%",
|
|
52116
|
+
transform: "translateY(-50%)",
|
|
52117
|
+
width: '25px'
|
|
52118
|
+
}, "aria-label": "toggle password visibility", onClick: handleTogglePasswordVisibility, edge: "end" }, { children: showPassword ? (jsxRuntimeExports.jsx(Visibility, { sx: {
|
|
52119
|
+
fontSize: "12px",
|
|
52120
|
+
position: "absolute",
|
|
52121
|
+
} })) : (jsxRuntimeExports.jsx(VisibilityOff, { sx: {
|
|
52122
|
+
fontSize: "12px",
|
|
52123
|
+
position: "absolute",
|
|
52124
|
+
} })) }))] })), jsxRuntimeExports.jsx(ErrorMessageComponent, { children: jsxRuntimeExports.jsx(s, { errors: props.errors, name: props.item.name }) })] }));
|
|
52125
|
+
} })] })));
|
|
52123
52126
|
};
|
|
52124
52127
|
|
|
52125
52128
|
const Monthpickerrender = ({ props }) => {
|
|
@@ -52888,9 +52891,9 @@ const FormRenderWrapper = ({ formArray, name, numberOfColumns = 3, form, }) => {
|
|
|
52888
52891
|
// useEffect(() => {
|
|
52889
52892
|
// // form.reset(initialValues, { resolver: yupResolver(validationSchema) });
|
|
52890
52893
|
// }, [formArray, validationSchema, initialValues]);
|
|
52891
|
-
return (jsxRuntimeExports.jsx(ThemeProvider, Object.assign({ theme: customTheme }, { children: jsxRuntimeExports.jsx(FormComponent, Object.assign({ container: true, margin: "auto" }, { children: formArray.map((item, i) => {
|
|
52892
|
-
|
|
52893
|
-
|
|
52894
|
+
return (jsxRuntimeExports.jsx(ThemeProvider, Object.assign({ theme: customTheme }, { children: jsxRuntimeExports.jsx(Box, Object.assign({ component: 'form', autoComplete: "off" }, { children: jsxRuntimeExports.jsx(FormComponent, Object.assign({ container: true, margin: "auto" }, { children: formArray.map((item, i) => {
|
|
52895
|
+
return (jsxRuntimeExports.jsx(Formitem, Object.assign({ container: true, sx: item.CustomProps, noOfColumn: item.numberOfColumns || numberOfColumns }, { children: jsxRuntimeExports.jsx(RenderForm, { item: item, register: form.register, control: form.control, errors: form.formState.errors, getValues: form.getValues, clearErrors: form.clearErrors, setValue: form.setValue }) }), i));
|
|
52896
|
+
}) })) })) })));
|
|
52894
52897
|
};
|
|
52895
52898
|
|
|
52896
52899
|
/**
|