@measured/puck 0.17.0 → 0.17.1-canary.3406b01

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -2165,7 +2165,8 @@ var RadioField = ({
2165
2165
  value: option.value,
2166
2166
  name,
2167
2167
  onChange: (e) => {
2168
- const jsonValue = safeJsonParse(e.target.value) || e.target.value;
2168
+ var _a;
2169
+ const jsonValue = (_a = safeJsonParse(e.target.value)) != null ? _a : e.target.value;
2169
2170
  if (flatOptions.indexOf(jsonValue) > -1) {
2170
2171
  onChange(jsonValue);
2171
2172
  } else {
@@ -2221,7 +2222,8 @@ var SelectField = ({
2221
2222
  className: getClassName12("input"),
2222
2223
  disabled: readOnly,
2223
2224
  onChange: (e) => {
2224
- const jsonValue = safeJsonParse(e.target.value) || e.target.value;
2225
+ var _a;
2226
+ const jsonValue = (_a = safeJsonParse(e.target.value)) != null ? _a : e.target.value;
2225
2227
  if (flatOptions.indexOf(jsonValue) > -1) {
2226
2228
  onChange(jsonValue);
2227
2229
  } else {
package/dist/index.mjs CHANGED
@@ -1983,7 +1983,8 @@ var RadioField = ({
1983
1983
  value: option.value,
1984
1984
  name,
1985
1985
  onChange: (e) => {
1986
- const jsonValue = safeJsonParse(e.target.value) || e.target.value;
1986
+ var _a;
1987
+ const jsonValue = (_a = safeJsonParse(e.target.value)) != null ? _a : e.target.value;
1987
1988
  if (flatOptions.indexOf(jsonValue) > -1) {
1988
1989
  onChange(jsonValue);
1989
1990
  } else {
@@ -2039,7 +2040,8 @@ var SelectField = ({
2039
2040
  className: getClassName12("input"),
2040
2041
  disabled: readOnly,
2041
2042
  onChange: (e) => {
2042
- const jsonValue = safeJsonParse(e.target.value) || e.target.value;
2043
+ var _a;
2044
+ const jsonValue = (_a = safeJsonParse(e.target.value)) != null ? _a : e.target.value;
2043
2045
  if (flatOptions.indexOf(jsonValue) > -1) {
2044
2046
  onChange(jsonValue);
2045
2047
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.17.0",
3
+ "version": "0.17.1-canary.3406b01",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",