@rhc-shared-components/form-multi-select-component 0.0.5 → 0.0.8
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/FormMultiSelectInput.d.ts +3 -0
- package/dist/index.js +9 -2
- package/dist/index.modern.js +10 -3
- package/package.json +3 -2
- package/CHANGELOG.md +0 -37
|
@@ -13,6 +13,9 @@ export interface FormMultiSelectInputProps {
|
|
|
13
13
|
ariaLabel?: string;
|
|
14
14
|
helperText?: string;
|
|
15
15
|
maxHeight?: string | number;
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
classNames?: string;
|
|
18
|
+
menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
|
|
16
19
|
}
|
|
17
20
|
declare const FormMultiSelectInput: React.FC<FormMultiSelectInputProps>;
|
|
18
21
|
export default FormMultiSelectInput;
|
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
39
39
|
return target;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
var _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight"];
|
|
42
|
+
var _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight", "isDisabled", "classNames", "menuAppendTo"];
|
|
43
43
|
|
|
44
44
|
var FormMultiSelectInput = function FormMultiSelectInput(_ref) {
|
|
45
45
|
var label = _ref.label,
|
|
@@ -50,6 +50,9 @@ var FormMultiSelectInput = function FormMultiSelectInput(_ref) {
|
|
|
50
50
|
placeholder = _ref.placeholder,
|
|
51
51
|
helperText = _ref.helperText,
|
|
52
52
|
maxHeight = _ref.maxHeight,
|
|
53
|
+
isDisabled = _ref.isDisabled,
|
|
54
|
+
classNames = _ref.classNames,
|
|
55
|
+
menuAppendTo = _ref.menuAppendTo,
|
|
53
56
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
54
57
|
|
|
55
58
|
var _useField = formik.useField(rest),
|
|
@@ -103,8 +106,12 @@ var FormMultiSelectInput = function FormMultiSelectInput(_ref) {
|
|
|
103
106
|
}, maxHeight && {
|
|
104
107
|
maxHeight: maxHeight
|
|
105
108
|
}, {
|
|
106
|
-
isDisabled: isSubmitting,
|
|
109
|
+
isDisabled: isSubmitting || isDisabled,
|
|
107
110
|
"aria-label": ariaLabel
|
|
111
|
+
}, classNames && {
|
|
112
|
+
className: classNames
|
|
113
|
+
}, menuAppendTo && {
|
|
114
|
+
menuAppendTo: menuAppendTo
|
|
108
115
|
}, rest), lodash.map(selectOptions, function (option, index) {
|
|
109
116
|
return React__namespace.createElement(reactCore.SelectOption, Object.assign({
|
|
110
117
|
key: index,
|
package/dist/index.modern.js
CHANGED
|
@@ -19,7 +19,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
19
19
|
return target;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight"];
|
|
22
|
+
const _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight", "isDisabled", "classNames", "menuAppendTo"];
|
|
23
23
|
|
|
24
24
|
const FormMultiSelectInput = _ref => {
|
|
25
25
|
let {
|
|
@@ -29,7 +29,10 @@ const FormMultiSelectInput = _ref => {
|
|
|
29
29
|
ariaLabel = 'Select Input',
|
|
30
30
|
placeholder,
|
|
31
31
|
helperText,
|
|
32
|
-
maxHeight
|
|
32
|
+
maxHeight,
|
|
33
|
+
isDisabled,
|
|
34
|
+
classNames,
|
|
35
|
+
menuAppendTo
|
|
33
36
|
} = _ref,
|
|
34
37
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
35
38
|
|
|
@@ -79,8 +82,12 @@ const FormMultiSelectInput = _ref => {
|
|
|
79
82
|
}, maxHeight && {
|
|
80
83
|
maxHeight
|
|
81
84
|
}, {
|
|
82
|
-
isDisabled: isSubmitting,
|
|
85
|
+
isDisabled: isSubmitting || isDisabled,
|
|
83
86
|
"aria-label": ariaLabel
|
|
87
|
+
}, classNames && {
|
|
88
|
+
className: classNames
|
|
89
|
+
}, menuAppendTo && {
|
|
90
|
+
menuAppendTo
|
|
84
91
|
}, rest), map(selectOptions, (option, index) => React.createElement(SelectOption, Object.assign({
|
|
85
92
|
key: index,
|
|
86
93
|
value: option.value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhc-shared-components/form-multi-select-component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "project description",
|
|
5
5
|
"author": "shkale",
|
|
6
6
|
"license": "MIT",
|
|
@@ -76,5 +76,6 @@
|
|
|
76
76
|
],
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
|
-
}
|
|
79
|
+
},
|
|
80
|
+
"gitHead": "7d6f877710b011c16c52b143698bec2a7595afd5"
|
|
80
81
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [0.0.4](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-multi-select-component@0.0.2...@rhc-shared-components/form-multi-select-component@0.0.4) (2022-10-27)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* added setTouched prop in multiselect component. ([3b0b6ff](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/commit/3b0b6ff0445995129bc2b2908861768a513339d8))
|
|
12
|
-
* added touched handler ([82e397e](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/commit/82e397e3c8ae90944d3110dd5d7b3d5ff98b0589))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## 0.0.3 (2022-10-27)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Bug Fixes
|
|
20
|
-
|
|
21
|
-
* added meta.touched prop to the form multi select component. ([590886f](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/commit/590886fd8eb49a2153f6d5b512c6bd61cbae205c))
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## [0.0.2](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-multi-select-component@0.0.1...@rhc-shared-components/form-multi-select-component@0.0.2) (2022-01-05)
|
|
28
|
-
|
|
29
|
-
**Note:** Version bump only for package @rhc-shared-components/form-multi-select-component
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## 0.0.1 (2021-12-06)
|
|
36
|
-
|
|
37
|
-
**Note:** Version bump only for package @rhc-shared-components/form-multi-select-component
|