@trackunit/custom-field-components 0.0.546 → 0.0.547

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/index.cjs.js CHANGED
@@ -85,7 +85,7 @@ const BooleanCustomField = (_a) => {
85
85
  register && register(id, Object.assign(Object.assign({}, validationRules), { value: internalValue.toString() }));
86
86
  // eslint-disable-next-line react-hooks/exhaustive-deps
87
87
  }, []); // register only once
88
- return (jsxRuntime.jsx(reactFormComponents.FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsxRuntime.jsx(reactFormComponents.Checkbox, Object.assign({ checked: internalValue, dataTestId: dataTestId, id: htmlForId, disabled: disabled, name: id, onChange: onChangeHandler, isInvalid: renderAsInvalid }, rest)) }));
88
+ return (jsxRuntime.jsx(reactFormComponents.FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsxRuntime.jsx(reactFormComponents.Checkbox, Object.assign({ checked: internalValue, dataTestId: dataTestId, id: htmlForId, disabled: disabled, name: id, onChange: event => (!rest.readOnly ? onChangeHandler(event) : null), isInvalid: renderAsInvalid }, rest)) }));
89
89
  };
90
90
 
91
91
  /**
package/index.esm.js CHANGED
@@ -62,7 +62,7 @@ const BooleanCustomField = (_a) => {
62
62
  register && register(id, Object.assign(Object.assign({}, validationRules), { value: internalValue.toString() }));
63
63
  // eslint-disable-next-line react-hooks/exhaustive-deps
64
64
  }, []); // register only once
65
- return (jsx(FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsx(Checkbox, Object.assign({ checked: internalValue, dataTestId: dataTestId, id: htmlForId, disabled: disabled, name: id, onChange: onChangeHandler, isInvalid: renderAsInvalid }, rest)) }));
65
+ return (jsx(FormGroup, { htmlFor: htmlForId, label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: dataTestId && `${dataTestId}-FormGroup`, children: jsx(Checkbox, Object.assign({ checked: internalValue, dataTestId: dataTestId, id: htmlForId, disabled: disabled, name: id, onChange: event => (!rest.readOnly ? onChangeHandler(event) : null), isInvalid: renderAsInvalid }, rest)) }));
66
66
  };
67
67
 
68
68
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/custom-field-components",
3
- "version": "0.0.546",
3
+ "version": "0.0.547",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {