sccoreui 5.2.8 → 5.3.0
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.
|
@@ -4,6 +4,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const formik_1 = require("formik");
|
|
5
5
|
const FormComponent = (props) => {
|
|
6
6
|
const { formRef, values, validations, children, validateOnChange, validateOnBlur, validateForm, className, onSubmit } = props;
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(formik_1.Formik, Object.assign({ innerRef: formRef, initialValues: values, validationSchema: validations, validateOnChange: validateOnChange, validate: validateForm, validateOnBlur: validateOnBlur, onSubmit: (values) => onSubmit(values) }, { children: ({ errors, touched, isValid, values, actions, resetForm, setFieldValue, handleSubmit, setFieldTouched, dirty, validate }) => ((0, jsx_runtime_1.jsx)(formik_1.Form, Object.assign({ className: className }, { children: children({ errors, touched, isValid, values, actions, resetForm, handleSubmit, setFieldValue, setFieldTouched, dirty, validate }) }))) })));
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(formik_1.Formik, Object.assign({ innerRef: formRef, enableReinitialize: true, initialValues: values, validationSchema: validations, validateOnChange: validateOnChange, validate: validateForm, validateOnBlur: validateOnBlur, onSubmit: (values) => onSubmit(values) }, { children: ({ errors, touched, isValid, values, actions, resetForm, setFieldValue, handleSubmit, setFieldTouched, dirty, validate }) => ((0, jsx_runtime_1.jsx)(formik_1.Form, Object.assign({ className: className }, { children: children({ errors, touched, isValid, values, actions, resetForm, handleSubmit, setFieldValue, setFieldTouched, dirty, validate }) }))) })));
|
|
8
8
|
};
|
|
9
9
|
exports.default = FormComponent;
|
|
@@ -47,7 +47,7 @@ const ListBoxDropdown = ({ onChange, footeTemplate, headerTemplate, labelIcon, l
|
|
|
47
47
|
// handleFormValues(formValues);
|
|
48
48
|
onDranghandle(newItems);
|
|
49
49
|
};
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(menu_1.Menu, { onShow: (e) => onShow(e), onHide: (e) => onHide(e), onFocus: (e) => onFocus(e), popup: true, className: menuClassName ? menuClassName : '', ref: optionsMenuRef, model: [{
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(menu_1.Menu, { onShow: (e) => onShow && onShow(e), onHide: (e) => onHide && onHide(e), onFocus: (e) => onFocus && onFocus(e), popup: true, className: menuClassName ? menuClassName : '', ref: optionsMenuRef, model: [{
|
|
51
51
|
template: () => (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: listBoxParentClassName ? listBoxParentClassName + ' list_box_dropdown' : 'list_box_dropdown' }, { children: [headerTemplate &&
|
|
52
52
|
(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: headerTemplate() }), (0, jsx_runtime_1.jsx)(listbox_1.ListBox, { itemTemplate: (option) => (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: optionTemplate ?
|
|
53
53
|
optionTemplate(option)
|
|
@@ -62,12 +62,12 @@ const ListBoxDropdown = ({ onChange, footeTemplate, headerTemplate, labelIcon, l
|
|
|
62
62
|
(0, jsx_runtime_1.jsx)("li", Object.assign({ draggable: isDraggable, onDragStart: (e) => handleDragStart(e, index), onDragOver: (e) => handleDragOver(e), onDrop: (e) => handleDrop(e, index), className: `${chipClassName} ${showRemoveIcon ? 'pr-6 relative' : ''}` }, { children: chipTemplate ?
|
|
63
63
|
chipTemplate(item)
|
|
64
64
|
:
|
|
65
|
-
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [" ", item[`${optionLabel}`]] }), showRemoveIcon && (0, jsx_runtime_1.jsxs)("span", Object.assign({ onClick: () => onRemoveItem(item), className: `absolute right-0 p-1 ${removeIconClassName}` }, { children: [" ", (0, jsx_runtime_1.jsx)(sccoreui_1.SvgComponent, { icon: showRemoveIcon, size: removeIconSize ? removeIconSize : 20 })] }))] }) }))
|
|
65
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [" ", typeof (item) === 'object' ? item[`${optionLabel}`] : item] }), showRemoveIcon && (0, jsx_runtime_1.jsxs)("span", Object.assign({ onClick: () => onRemoveItem(item), className: `absolute right-0 p-1 ${removeIconClassName}` }, { children: [" ", (0, jsx_runtime_1.jsx)(sccoreui_1.SvgComponent, { icon: showRemoveIcon, size: removeIconSize ? removeIconSize : 20 })] }))] }) }), index)
|
|
66
66
|
:
|
|
67
67
|
(0, jsx_runtime_1.jsx)("li", Object.assign({ className: `${chipClassName} ${showRemoveIcon ? 'pr-6 relative' : ''}` }, { children: chipTemplate ?
|
|
68
68
|
chipTemplate(item)
|
|
69
69
|
:
|
|
70
|
-
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [" ", item[`${optionLabel}`]] }), showRemoveIcon && (0, jsx_runtime_1.jsxs)("span", Object.assign({ onClick: () => onRemoveItem(item), className: `absolute right-0 p-1 ${removeIconClassName}` }, { children: [" ", (0, jsx_runtime_1.jsx)(sccoreui_1.SvgComponent, { icon: showRemoveIcon, size: removeIconSize ? removeIconSize : 20 })] }))] }) })) }));
|
|
70
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [" ", typeof (item) === 'object' ? item[`${optionLabel}`] : item] }), showRemoveIcon && (0, jsx_runtime_1.jsxs)("span", Object.assign({ onClick: () => onRemoveItem(item), className: `absolute right-0 p-1 ${removeIconClassName}` }, { children: [" ", (0, jsx_runtime_1.jsx)(sccoreui_1.SvgComponent, { icon: showRemoveIcon, size: removeIconSize ? removeIconSize : 20 })] }))] }) }), index) }));
|
|
71
71
|
}))] }))] })) }));
|
|
72
72
|
};
|
|
73
73
|
exports.default = ListBoxDropdown;
|