@makehq/forman-schema 1.9.1 → 1.9.2

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.cjs CHANGED
@@ -45,6 +45,10 @@ var FORMAN_REFERENCE_TYPES = [
45
45
  function isReferenceType(type) {
46
46
  return FORMAN_REFERENCE_TYPES.includes(type);
47
47
  }
48
+ var EDITABLE_TYPES = ["select", "file", "folder", "boolean"];
49
+ function isEditableType(type) {
50
+ return EDITABLE_TYPES.includes(type);
51
+ }
48
52
  function noEmpty(text) {
49
53
  return text?.trim() || void 0;
50
54
  }
@@ -1216,6 +1220,12 @@ async function validateFormanValue(value, field, context) {
1216
1220
  ]
1217
1221
  };
1218
1222
  }
1223
+ if (isEditableType(normalizedField.type)) {
1224
+ context.roots[context.domain].fieldStates.push({
1225
+ path: [...context.path],
1226
+ state: { mode: "edit" }
1227
+ });
1228
+ }
1219
1229
  return {
1220
1230
  valid: true,
1221
1231
  errors: []
package/dist/index.js CHANGED
@@ -16,6 +16,10 @@ var FORMAN_REFERENCE_TYPES = [
16
16
  function isReferenceType(type) {
17
17
  return FORMAN_REFERENCE_TYPES.includes(type);
18
18
  }
19
+ var EDITABLE_TYPES = ["select", "file", "folder", "boolean"];
20
+ function isEditableType(type) {
21
+ return EDITABLE_TYPES.includes(type);
22
+ }
19
23
  function noEmpty(text) {
20
24
  return text?.trim() || void 0;
21
25
  }
@@ -1187,6 +1191,12 @@ async function validateFormanValue(value, field, context) {
1187
1191
  ]
1188
1192
  };
1189
1193
  }
1194
+ if (isEditableType(normalizedField.type)) {
1195
+ context.roots[context.domain].fieldStates.push({
1196
+ path: [...context.path],
1197
+ state: { mode: "edit" }
1198
+ });
1199
+ }
1190
1200
  return {
1191
1201
  valid: true,
1192
1202
  errors: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makehq/forman-schema",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "Forman Schema Tools",
5
5
  "license": "MIT",
6
6
  "author": "Make",