@makehq/forman-schema 1.11.0 → 1.11.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/dist/index.cjs +12 -0
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1775,6 +1775,7 @@ async function handleSelectType(value, field, context) {
|
|
|
1775
1775
|
warnings
|
|
1776
1776
|
};
|
|
1777
1777
|
}
|
|
1778
|
+
let hasUnresolvedValue = false;
|
|
1778
1779
|
for (const singleValue of value) {
|
|
1779
1780
|
const found = findValueInSelectOptions(
|
|
1780
1781
|
field,
|
|
@@ -1787,8 +1788,15 @@ async function handleSelectType(value, field, context) {
|
|
|
1787
1788
|
path: context.path.join("."),
|
|
1788
1789
|
message: `Value '${singleValue}' not found in options.`
|
|
1789
1790
|
});
|
|
1791
|
+
hasUnresolvedValue = true;
|
|
1790
1792
|
}
|
|
1791
1793
|
}
|
|
1794
|
+
if (optionsFromRPC && hasUnresolvedValue) {
|
|
1795
|
+
context.roots[context.domain].fieldStates.push({
|
|
1796
|
+
path: context.path,
|
|
1797
|
+
state: { mode: "edit" }
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1792
1800
|
if (field.validate) {
|
|
1793
1801
|
if (field.validate.minItems !== void 0 && value.length < field.validate.minItems) {
|
|
1794
1802
|
errors.push({
|
|
@@ -1826,6 +1834,10 @@ async function handleSelectType(value, field, context) {
|
|
|
1826
1834
|
path: context.path.join("."),
|
|
1827
1835
|
message: `Value '${value}' not found in options.`
|
|
1828
1836
|
});
|
|
1837
|
+
context.roots[context.domain].fieldStates.push({
|
|
1838
|
+
path: context.path,
|
|
1839
|
+
state: { mode: "edit" }
|
|
1840
|
+
});
|
|
1829
1841
|
} else {
|
|
1830
1842
|
return {
|
|
1831
1843
|
valid: false,
|
package/dist/index.js
CHANGED
|
@@ -1746,6 +1746,7 @@ async function handleSelectType(value, field, context) {
|
|
|
1746
1746
|
warnings
|
|
1747
1747
|
};
|
|
1748
1748
|
}
|
|
1749
|
+
let hasUnresolvedValue = false;
|
|
1749
1750
|
for (const singleValue of value) {
|
|
1750
1751
|
const found = findValueInSelectOptions(
|
|
1751
1752
|
field,
|
|
@@ -1758,8 +1759,15 @@ async function handleSelectType(value, field, context) {
|
|
|
1758
1759
|
path: context.path.join("."),
|
|
1759
1760
|
message: `Value '${singleValue}' not found in options.`
|
|
1760
1761
|
});
|
|
1762
|
+
hasUnresolvedValue = true;
|
|
1761
1763
|
}
|
|
1762
1764
|
}
|
|
1765
|
+
if (optionsFromRPC && hasUnresolvedValue) {
|
|
1766
|
+
context.roots[context.domain].fieldStates.push({
|
|
1767
|
+
path: context.path,
|
|
1768
|
+
state: { mode: "edit" }
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1763
1771
|
if (field.validate) {
|
|
1764
1772
|
if (field.validate.minItems !== void 0 && value.length < field.validate.minItems) {
|
|
1765
1773
|
errors.push({
|
|
@@ -1797,6 +1805,10 @@ async function handleSelectType(value, field, context) {
|
|
|
1797
1805
|
path: context.path.join("."),
|
|
1798
1806
|
message: `Value '${value}' not found in options.`
|
|
1799
1807
|
});
|
|
1808
|
+
context.roots[context.domain].fieldStates.push({
|
|
1809
|
+
path: context.path,
|
|
1810
|
+
state: { mode: "edit" }
|
|
1811
|
+
});
|
|
1800
1812
|
} else {
|
|
1801
1813
|
return {
|
|
1802
1814
|
valid: false,
|