tp-react-elements-dev 1.5.2 → 1.5.4
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/index.js
CHANGED
|
@@ -52112,6 +52112,12 @@ const PasswordField = ({ props }) => {
|
|
|
52112
52112
|
onInput: (e) => {
|
|
52113
52113
|
props.item.onInputProps && props.item.onInputProps(e);
|
|
52114
52114
|
},
|
|
52115
|
+
onPaste: (e) => {
|
|
52116
|
+
var _a;
|
|
52117
|
+
if ((_a = props.item) === null || _a === void 0 ? void 0 : _a.doNotAllowPaste) {
|
|
52118
|
+
e.preventDefault();
|
|
52119
|
+
}
|
|
52120
|
+
}
|
|
52115
52121
|
}, value: field.value || null, disabled: props.item.disable })), jsxRuntimeExports.jsx(IconButton, Object.assign({ sx: {
|
|
52116
52122
|
position: "absolute",
|
|
52117
52123
|
right: "14px",
|
|
@@ -52251,7 +52257,7 @@ const FormRenderFileUpload = ({ props }) => {
|
|
|
52251
52257
|
? ".pdf,.jpg,.jpeg,.png,.xls,.xlsx,.doc,.docx"
|
|
52252
52258
|
: "",
|
|
52253
52259
|
}, onChange: (event) => {
|
|
52254
|
-
var _a, _b, _c, _d, _e
|
|
52260
|
+
var _a, _b, _c, _d, _e;
|
|
52255
52261
|
const file = event.target.files[0];
|
|
52256
52262
|
const fileName = file ? file.name : null;
|
|
52257
52263
|
const allowedExtensions = {
|
|
@@ -52277,10 +52283,10 @@ const FormRenderFileUpload = ({ props }) => {
|
|
|
52277
52283
|
// Proceed if valid
|
|
52278
52284
|
props.setValue((_d = props.item) === null || _d === void 0 ? void 0 : _d.name, file);
|
|
52279
52285
|
props.setValue(((_e = props.item) === null || _e === void 0 ? void 0 : _e.name) + "Name", fileName);
|
|
52280
|
-
|
|
52281
|
-
|
|
52282
|
-
|
|
52283
|
-
});
|
|
52286
|
+
// props?.item?.onChangeFn({
|
|
52287
|
+
// [props.item.name]: file,
|
|
52288
|
+
// [props.item.name + "Name"]: fileName,
|
|
52289
|
+
// });
|
|
52284
52290
|
// props.setValue(props.item?.name, file);
|
|
52285
52291
|
// props.setValue(props.item?.name + "Name", fileName);
|
|
52286
52292
|
// props?.item?.onChangeInput({
|
|
@@ -52405,6 +52411,11 @@ const RenderForm = (props) => {
|
|
|
52405
52411
|
}
|
|
52406
52412
|
props.item.onInputProps && props.item.onInputProps(e);
|
|
52407
52413
|
},
|
|
52414
|
+
onPaste: (e) => {
|
|
52415
|
+
if (props.item.doNotAllowPaste) {
|
|
52416
|
+
e.preventDefault();
|
|
52417
|
+
}
|
|
52418
|
+
}
|
|
52408
52419
|
} })), ((_a = props === null || props === void 0 ? void 0 : props.item) === null || _a === void 0 ? void 0 : _a.helperText) && (jsxRuntimeExports.jsxs("span", Object.assign({ style: {
|
|
52409
52420
|
fontFamily: "Roboto-Reg",
|
|
52410
52421
|
fontSize: "11px",
|
|
@@ -52784,9 +52795,7 @@ const RenderForm = (props) => {
|
|
|
52784
52795
|
// textTransform:'uppercase'
|
|
52785
52796
|
maxHeight: "500px !important",
|
|
52786
52797
|
overflow: "auto",
|
|
52787
|
-
} }, props.item.sx), minRows: props.item.minRows || 1,
|
|
52788
|
-
// maxRows={2}
|
|
52789
|
-
placeholder: props.item.placeholder || "Type Something..." }, field, { label: `${props.item.label}${props.item.required ? " *" : ""}`, value: field.value || "", disabled: props.item.disable, inputProps: {
|
|
52798
|
+
} }, props.item.sx), minRows: props.item.minRows || 1, maxRows: props.item.maxRows || 100, placeholder: props.item.placeholder || "Type Something..." }, field, { label: `${props.item.label}${props.item.required ? " *" : ""}`, value: field.value || "", disabled: props.item.disable, inputProps: {
|
|
52790
52799
|
onInput: (e) => {
|
|
52791
52800
|
var _a;
|
|
52792
52801
|
if (!((_a = props === null || props === void 0 ? void 0 : props.item) === null || _a === void 0 ? void 0 : _a.allowSpecialChars)) {
|
|
@@ -55192,7 +55201,7 @@ const useFormValidatingContext = (formArray) => {
|
|
|
55192
55201
|
const renderCustomError = (field) => {
|
|
55193
55202
|
if (field.customErrorMessage) {
|
|
55194
55203
|
validationShape[field.name] = validationShape[field.name].test("custom-check", field.customErrorMessage, // Use the actual custom message
|
|
55195
|
-
(value) => field.customErrorMessage && field.customErrorMessage
|
|
55204
|
+
(value) => field.customErrorMessage && field.customErrorMessage // No additional validation logic required
|
|
55196
55205
|
);
|
|
55197
55206
|
}
|
|
55198
55207
|
};
|