@trackunit/custom-field-components 0.0.212 → 0.0.215

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.
Files changed (2) hide show
  1. package/index.js +6 -3
  2. package/package.json +6 -6
package/index.js CHANGED
@@ -1900,8 +1900,9 @@ const BooleanCustomField = _a => {
1900
1900
  setInternalValue((value === undefined ? defaultValue : value) || false);
1901
1901
  }, [value, setInternalValue, defaultValue]);
1902
1902
  const onChangeHandler = React.useCallback(event => {
1903
+ var _a;
1903
1904
  onChange && onChange(event);
1904
- const isChecked = event.target.checked;
1905
+ const isChecked = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.checked) || false;
1905
1906
  if (setValue) {
1906
1907
  setValue(id, isChecked);
1907
1908
  }
@@ -1943,8 +1944,10 @@ const DateCustomField = props => {
1943
1944
  } = props,
1944
1945
  rest = __rest(props, ["setValue", "defaultValue", "register", "id", "validationRules"]);
1945
1946
  const onChangeHandler = useCallback(e => {
1946
- var _a;
1947
- setValue && setValue(id, (_a = e.target.valueAsDate) === null || _a === void 0 ? void 0 : _a.toISOString());
1947
+ var _a, _b, _c, _d;
1948
+ if (((_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.valueAsDate) === null || _b === void 0 ? void 0 : _b.toISOString()) !== undefined) {
1949
+ setValue && setValue(id, (_d = (_c = e.target) === null || _c === void 0 ? void 0 : _c.valueAsDate) === null || _d === void 0 ? void 0 : _d.toISOString());
1950
+ }
1948
1951
  }, [setValue, id]);
1949
1952
  useEffect(() => {
1950
1953
  const value = defaultValue && new Date(defaultValue);
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@trackunit/custom-field-components",
3
- "version": "0.0.212",
3
+ "version": "0.0.215",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
7
- "@trackunit/react-core-contexts-test": "0.1.11",
8
- "@trackunit/react-components": "0.0.208",
9
- "react": "17.0.2",
7
+ "@trackunit/react-core-contexts-test": "0.1.13",
8
+ "@trackunit/react-components": "0.1.2",
9
+ "react": "18.2.0",
10
10
  "react-hook-form": "7.40.0",
11
- "@trackunit/iris-app-runtime-core": "0.3.3",
12
- "@trackunit/iris-app-runtime-core-api": "0.3.2",
11
+ "@trackunit/iris-app-runtime-core": "0.3.5",
12
+ "@trackunit/iris-app-runtime-core-api": "0.3.4",
13
13
  "@trackunit/tailwind-styled-components": "0.0.50",
14
14
  "react-select": "5.7.0",
15
15
  "libphonenumber-js": "1.10.14"