@rhc-shared-components/form-select-component 0.0.6 → 0.1.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,70 @@
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.1.1](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.1.0...@rhc-shared-components/form-select-component@0.1.1) (2022-10-20)
7
+
8
+ **Note:** Version bump only for package @rhc-shared-components/form-select-component
9
+
10
+
11
+
12
+
13
+
14
+ # [0.1.0](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.4...@rhc-shared-components/form-select-component@0.1.0) (2022-10-20)
15
+
16
+
17
+ ### Features
18
+
19
+ * adding order prop for vulnerability summaries severity ([24e0c7c](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/commit/24e0c7c992058f0c3e42e8c7ba6ad1bd98e70c4f))
20
+
21
+
22
+
23
+
24
+
25
+ ## [0.0.6](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.5...@rhc-shared-components/form-select-component@0.0.6) (2022-08-22)
26
+
27
+ **Note:** Version bump only for package @rhc-shared-components/form-select-component
28
+
29
+
30
+
31
+
32
+
33
+ ## [0.0.5](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.4...@rhc-shared-components/form-select-component@0.0.5) (2022-08-22)
34
+
35
+ **Note:** Version bump only for package @rhc-shared-components/form-select-component
36
+
37
+
38
+
39
+
40
+
41
+ ## [0.0.4](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.3...@rhc-shared-components/form-select-component@0.0.4) (2022-08-22)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * added ReactNode type to subLabel prop for formselect component ([060d955](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/commit/060d9557e708e8f1a722f158c6f07ff6416aed60))
47
+
48
+
49
+
50
+
51
+
52
+ ## [0.0.3](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.2...@rhc-shared-components/form-select-component@0.0.3) (2022-01-05)
53
+
54
+ **Note:** Version bump only for package @rhc-shared-components/form-select-component
55
+
56
+
57
+
58
+
59
+
60
+ ## [0.0.2](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.1...@rhc-shared-components/form-select-component@0.0.2) (2021-12-29)
61
+
62
+ **Note:** Version bump only for package @rhc-shared-components/form-select-component
63
+
64
+
65
+
66
+
67
+
68
+ ## 0.0.1 (2021-12-06)
69
+
70
+ **Note:** Version bump only for package @rhc-shared-components/form-select-component
@@ -17,6 +17,7 @@ export interface FormSelectProps {
17
17
  subInfo?: string;
18
18
  ariaLabel?: string;
19
19
  helperText?: string;
20
+ onChange?: (_event: any, selection: any) => void;
20
21
  }
21
22
  declare const FormSelect: React.FC<FormSelectProps>;
22
23
  export default FormSelect;
package/dist/index.js CHANGED
@@ -9658,7 +9658,7 @@ var InfoCircleIconConfig = {
9658
9658
  };
9659
9659
  var InfoCircleIcon = createIcon(InfoCircleIconConfig);
9660
9660
 
9661
- var _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "subLabel", "subInfo"];
9661
+ var _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "subLabel", "subInfo", "onChange"];
9662
9662
 
9663
9663
  var FormSelect = function FormSelect(_ref) {
9664
9664
  var label = _ref.label,
@@ -9670,6 +9670,7 @@ var FormSelect = function FormSelect(_ref) {
9670
9670
  helperText = _ref.helperText,
9671
9671
  subLabel = _ref.subLabel,
9672
9672
  subInfo = _ref.subInfo,
9673
+ onChange = _ref.onChange,
9673
9674
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
9674
9675
 
9675
9676
  var _useField = formik.useField(rest),
@@ -9695,6 +9696,7 @@ var FormSelect = function FormSelect(_ref) {
9695
9696
  };
9696
9697
 
9697
9698
  var onSelect = function onSelect(_event, selection) {
9699
+ if (onChange) onChange(_event, selection);
9698
9700
  setFieldValue(rest.name, selection);
9699
9701
  validateField(rest.name);
9700
9702
  onToggle();
@@ -9612,7 +9612,7 @@ const InfoCircleIconConfig = {
9612
9612
  };
9613
9613
  const InfoCircleIcon = createIcon(InfoCircleIconConfig);
9614
9614
 
9615
- const _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "subLabel", "subInfo"];
9615
+ const _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "subLabel", "subInfo", "onChange"];
9616
9616
 
9617
9617
  const FormSelect = _ref => {
9618
9618
  let {
@@ -9623,7 +9623,8 @@ const FormSelect = _ref => {
9623
9623
  placeholder,
9624
9624
  helperText,
9625
9625
  subLabel,
9626
- subInfo
9626
+ subInfo,
9627
+ onChange
9627
9628
  } = _ref,
9628
9629
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
9629
9630
 
@@ -9644,6 +9645,7 @@ const FormSelect = _ref => {
9644
9645
  };
9645
9646
 
9646
9647
  const onSelect = (_event, selection) => {
9648
+ if (onChange) onChange(_event, selection);
9647
9649
  setFieldValue(rest.name, selection);
9648
9650
  validateField(rest.name);
9649
9651
  onToggle();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhc-shared-components/form-select-component",
3
- "version": "0.0.6",
3
+ "version": "0.1.3",
4
4
  "description": "project description",
5
5
  "author": "redhatofficial",
6
6
  "license": "MIT",
@@ -52,18 +52,18 @@
52
52
  "eslint-plugin-react": "^7.17.0",
53
53
  "eslint-plugin-standard": "^4.0.1",
54
54
  "microbundle": "^0.13.3",
55
- "node-sass": "^4.0.0",
56
55
  "npm-run-all": "^4.1.5",
57
56
  "prettier": "^2.0.4",
58
57
  "react": "^16.13.1",
59
58
  "react-dom": "^16.13.1",
60
59
  "react-scripts": "^3.4.1",
61
60
  "rimraf": "^3.0.2",
61
+ "sass": "^1.57.1",
62
62
  "typescript": "^3.7.5"
63
63
  },
64
64
  "dependencies": {
65
- "@patternfly/react-core": "^4.101.3",
66
- "@rhc-shared-components/form-group-container": "^0.2.9",
65
+ "@patternfly/react-core": "^4.276.6",
66
+ "@rhc-shared-components/form-group-container": "^0.3.2",
67
67
  "formik": "^2.1.4",
68
68
  "react": "^16.13.1",
69
69
  "react-dom": "^16.13.1"
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "f67c24c31868174d92f4e6e79978a0fdce6a6a0d"
77
+ "gitHead": "e3ffbb8f2793c6be4ea9d3d4ec916fc0d9faba5d"
78
78
  }