@raketa-builder/builder 1.1.6 → 1.1.7
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/dist/index.js +9 -1
- package/package.json +3 -3
- package/src/AdminForm/index.js +11 -1
package/dist/index.js
CHANGED
|
@@ -1783,11 +1783,19 @@ var FormField = ({ field, value, path, opts, onChange }) => {
|
|
|
1783
1783
|
label: opts.label,
|
|
1784
1784
|
value,
|
|
1785
1785
|
path,
|
|
1786
|
-
opts,
|
|
1786
|
+
opts: sanitezeOpts(opts),
|
|
1787
1787
|
onChange
|
|
1788
1788
|
}
|
|
1789
1789
|
);
|
|
1790
1790
|
};
|
|
1791
|
+
function sanitezeOpts(opts) {
|
|
1792
|
+
Object.keys(opts).forEach((key) => {
|
|
1793
|
+
if (key.toString().startsWith("_")) {
|
|
1794
|
+
delete opts[key];
|
|
1795
|
+
}
|
|
1796
|
+
});
|
|
1797
|
+
return opts;
|
|
1798
|
+
}
|
|
1791
1799
|
var AdminForm = ({ schema = {}, value = {}, onChange }) => {
|
|
1792
1800
|
return Object.keys(schema).map((field) => {
|
|
1793
1801
|
const opts = Object.assign(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raketa-builder/builder",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"react-sortablejs": "2.0.11",
|
|
19
|
-
"@raketa-builder/support": "1.1.
|
|
20
|
-
"@raketa-builder/ui": "1.1.
|
|
19
|
+
"@raketa-builder/support": "1.1.7",
|
|
20
|
+
"@raketa-builder/ui": "1.1.7"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@biomejs/biome": "1.5.2",
|
package/src/AdminForm/index.js
CHANGED
|
@@ -102,12 +102,22 @@ const FormField = ({ field, value, path, opts, onChange }) => {
|
|
|
102
102
|
label={opts.label}
|
|
103
103
|
value={value}
|
|
104
104
|
path={path}
|
|
105
|
-
opts={opts}
|
|
105
|
+
opts={sanitezeOpts(opts)}
|
|
106
106
|
onChange={onChange}
|
|
107
107
|
/>
|
|
108
108
|
);
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
+
function sanitezeOpts(opts) {
|
|
112
|
+
Object.keys(opts).forEach((key) => {
|
|
113
|
+
if (key.toString().startsWith("_")) {
|
|
114
|
+
delete opts[key];
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
return opts;
|
|
119
|
+
}
|
|
120
|
+
|
|
111
121
|
const AdminForm = ({ schema = {}, value = {}, onChange }) => {
|
|
112
122
|
return Object.keys(schema).map((field) => {
|
|
113
123
|
const opts = Object.assign(
|