sccoreui 5.3.1 → 5.3.3

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.
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const formik_1 = require("formik");
5
5
  const FormComponent = (props) => {
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, 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 }) }))) })));
6
+ const { formRef, values, enableReinitialize = false, validations, children, validateOnChange, validateOnBlur, validateForm, className, onSubmit } = props;
7
+ return ((0, jsx_runtime_1.jsx)(formik_1.Formik, Object.assign({ innerRef: formRef, enableReinitialize: enableReinitialize, 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;
@@ -4,7 +4,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const sccoreui_1 = require("sccoreui");
5
5
  const ScMultiSelect = (props) => {
6
6
  var _a, _b;
7
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "w-full relative" }, { children: [(0, jsx_runtime_1.jsx)(sccoreui_1.MultiSelect, { filter: props === null || props === void 0 ? void 0 : props.filter, filterIcon: props === null || props === void 0 ? void 0 : props.filterIcon, filterBy: props === null || props === void 0 ? void 0 : props.filterBy, onFilter: props === null || props === void 0 ? void 0 : props.onFilter, filterPlaceholder: props === null || props === void 0 ? void 0 : props.filterPlaceholder, filterTemplate: props === null || props === void 0 ? void 0 : props.filterTemplate, filterMatchMode: props.filterMatchMode, fixedPlaceholder: props === null || props === void 0 ? void 0 : props.fixedPlaceholder, filterLocale: props === null || props === void 0 ? void 0 : props.filterLocale, filterInputAutoFocus: props === null || props === void 0 ? void 0 : props.filterInputAutoFocus, emptyFilterMessage: props === null || props === void 0 ? void 0 : props.emptyFilterMessage, panelClassName: "sc_multiSelect_panel", onShow: () => props === null || props === void 0 ? void 0 : props.onShow, onHide: () => props === null || props === void 0 ? void 0 : props.onHide, dropdownIcon: props === null || props === void 0 ? void 0 : props.dropdownIcon, showClear: props === null || props === void 0 ? void 0 : props.showClear, display: props === null || props === void 0 ? void 0 : props.display, value: props === null || props === void 0 ? void 0 : props.value, onChange: (e) => props === null || props === void 0 ? void 0 : props.onChange(e), options: props === null || props === void 0 ? void 0 : props.options, optionLabel: props === null || props === void 0 ? void 0 : props.optionLabel, placeholder: props === null || props === void 0 ? void 0 : props.placeholder, className: (props === null || props === void 0 ? void 0 : props.className) + ` ${(props === null || props === void 0 ? void 0 : props.removeChipIcon) ? 'hideChipremoveIcon' : ''} sc_multiSelect`, id: props === null || props === void 0 ? void 0 : props.id }), (props === null || props === void 0 ? void 0 : props.showSelectedCount) &&
7
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "w-full relative" }, { children: [(0, jsx_runtime_1.jsx)(sccoreui_1.MultiSelect, { selectAll: props === null || props === void 0 ? void 0 : props.selectAll, filter: props === null || props === void 0 ? void 0 : props.filter, filterIcon: props === null || props === void 0 ? void 0 : props.filterIcon, filterBy: props === null || props === void 0 ? void 0 : props.filterBy, onFilter: props === null || props === void 0 ? void 0 : props.onFilter, filterPlaceholder: props === null || props === void 0 ? void 0 : props.filterPlaceholder, filterTemplate: props === null || props === void 0 ? void 0 : props.filterTemplate, filterMatchMode: props.filterMatchMode, fixedPlaceholder: props === null || props === void 0 ? void 0 : props.fixedPlaceholder, filterLocale: props === null || props === void 0 ? void 0 : props.filterLocale, filterInputAutoFocus: props === null || props === void 0 ? void 0 : props.filterInputAutoFocus, emptyFilterMessage: props === null || props === void 0 ? void 0 : props.emptyFilterMessage, panelClassName: "sc_multiSelect_panel", onShow: () => props === null || props === void 0 ? void 0 : props.onShow(), onHide: () => props === null || props === void 0 ? void 0 : props.onHide(), dropdownIcon: props === null || props === void 0 ? void 0 : props.dropdownIcon, showClear: props === null || props === void 0 ? void 0 : props.showClear, display: props === null || props === void 0 ? void 0 : props.display, value: props === null || props === void 0 ? void 0 : props.value, onChange: (e) => props === null || props === void 0 ? void 0 : props.onChange(e), options: props === null || props === void 0 ? void 0 : props.options, optionLabel: props === null || props === void 0 ? void 0 : props.optionLabel, placeholder: props === null || props === void 0 ? void 0 : props.placeholder, className: (props === null || props === void 0 ? void 0 : props.className) + ` ${(props === null || props === void 0 ? void 0 : props.removeChipIcon) ? 'hideChipremoveIcon' : ''} sc_multiSelect`, id: props === null || props === void 0 ? void 0 : props.id }), (props === null || props === void 0 ? void 0 : props.showSelectedCount) &&
8
8
  (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "absolute top-0 h-full text-center flex align-items-center w-2rem justify-content-center", style: { right: `${(props === null || props === void 0 ? void 0 : props.showClear) ? '68px' : '40px'}` } }, { children: (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "px-2 bg-primary-50 border-round-sm text-base" }, { children: (((_a = props === null || props === void 0 ? void 0 : props.value) === null || _a === void 0 ? void 0 : _a.length) > 0) && `+${(_b = props === null || props === void 0 ? void 0 : props.value) === null || _b === void 0 ? void 0 : _b.length}` })) }))] })) }));
9
9
  };
10
10
  exports.default = ScMultiSelect;
@@ -72,6 +72,7 @@ export interface FormComponentProps {
72
72
  className?: string;
73
73
  onSubmit?: any;
74
74
  formRef?: any;
75
+ enableReinitialize?: boolean;
75
76
  }
76
77
  export interface TextFieldProps {
77
78
  errors: any;
@@ -267,4 +268,5 @@ export interface ScMultiSelectTypes {
267
268
  filterLocale?: string;
268
269
  filterInputAutoFocus?: boolean;
269
270
  emptyFilterMessage?: any;
271
+ selectAll?: boolean;
270
272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "5.3.1",
3
+ "version": "5.3.3",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",