schema-components 1.4.0 → 1.5.1
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 +12 -0
- package/dist/html/renderToHtml.mjs +1 -1
- package/dist/react/headless.mjs +1 -1
- package/dist/themes/mui.mjs +2 -2
- package/dist/themes/shadcn.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [1.5.1](https://github.com/Mearman/schema-components/compare/v1.5.0...v1.5.1) (2026-05-14)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* blank writeOnly values in boolean and number renderers ([b46ecac](https://github.com/Mearman/schema-components/commit/b46ecac8d997fd4b875d6090d5374cded1143e5d))
|
|
6
|
+
|
|
7
|
+
## [1.5.0](https://github.com/Mearman/schema-components/compare/v1.4.0...v1.5.0) (2026-05-14)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add storybook stories for widgets, SchemaView, defaults, editability, and records ([e36720e](https://github.com/Mearman/schema-components/commit/e36720e09edcba11374eca77394f000a62261309))
|
|
12
|
+
|
|
1
13
|
## [1.4.0](https://github.com/Mearman/schema-components/compare/v1.3.3...v1.4.0) (2026-05-14)
|
|
2
14
|
|
|
3
15
|
### Features
|
|
@@ -133,7 +133,7 @@ function renderBooleanEditable(props) {
|
|
|
133
133
|
type: "checkbox",
|
|
134
134
|
name: id
|
|
135
135
|
};
|
|
136
|
-
if (props.value === true) attrs.checked = true;
|
|
136
|
+
if (!props.writeOnly && props.value === true) attrs.checked = true;
|
|
137
137
|
Object.assign(attrs, ariaRequiredAttrs(props.tree));
|
|
138
138
|
Object.assign(attrs, ariaLabelAttrs(props.meta.description));
|
|
139
139
|
return h("input", attrs);
|
package/dist/react/headless.mjs
CHANGED
|
@@ -200,7 +200,7 @@ function renderBoolean(props) {
|
|
|
200
200
|
return /* @__PURE__ */ jsx("input", {
|
|
201
201
|
id,
|
|
202
202
|
type: "checkbox",
|
|
203
|
-
checked: props.value === true,
|
|
203
|
+
checked: props.writeOnly ? false : props.value === true,
|
|
204
204
|
onChange: (e) => {
|
|
205
205
|
props.onChange(e.target.checked);
|
|
206
206
|
},
|
package/dist/themes/mui.mjs
CHANGED
|
@@ -45,7 +45,7 @@ function renderNumberInput(props) {
|
|
|
45
45
|
return /* @__PURE__ */ jsx(MuiTextField, {
|
|
46
46
|
label,
|
|
47
47
|
type: "number",
|
|
48
|
-
value: typeof props.value === "number" ? props.value : "",
|
|
48
|
+
value: props.writeOnly ? "" : typeof props.value === "number" ? props.value : "",
|
|
49
49
|
onChange: (e) => {
|
|
50
50
|
props.onChange(Number(e.target.value));
|
|
51
51
|
},
|
|
@@ -73,7 +73,7 @@ function renderBooleanInput(props) {
|
|
|
73
73
|
}
|
|
74
74
|
return /* @__PURE__ */ jsx(MuiFormControlLabel, {
|
|
75
75
|
control: /* @__PURE__ */ jsx(MuiCheckbox, {
|
|
76
|
-
checked: props.value === true,
|
|
76
|
+
checked: props.writeOnly ? false : props.value === true,
|
|
77
77
|
onChange: (e) => {
|
|
78
78
|
props.onChange(e.target.checked);
|
|
79
79
|
}
|
package/dist/themes/shadcn.mjs
CHANGED
|
@@ -51,7 +51,7 @@ function renderNumberInput(props) {
|
|
|
51
51
|
return /* @__PURE__ */ jsx("input", {
|
|
52
52
|
type: "number",
|
|
53
53
|
className,
|
|
54
|
-
value: typeof props.value === "number" ? props.value : "",
|
|
54
|
+
value: props.writeOnly ? "" : typeof props.value === "number" ? props.value : "",
|
|
55
55
|
onChange: (e) => {
|
|
56
56
|
props.onChange(Number(e.target.value));
|
|
57
57
|
},
|
|
@@ -74,7 +74,7 @@ function renderBooleanInput(props) {
|
|
|
74
74
|
return /* @__PURE__ */ jsx("input", {
|
|
75
75
|
type: "checkbox",
|
|
76
76
|
className,
|
|
77
|
-
checked: props.value === true,
|
|
77
|
+
checked: props.writeOnly ? false : props.value === true,
|
|
78
78
|
onChange: (e) => {
|
|
79
79
|
props.onChange(e.target.checked);
|
|
80
80
|
}
|