@effect-app/vue-components 4.0.0-beta.55 → 4.0.0-beta.57
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.
|
@@ -80,7 +80,7 @@ var o = /* @__PURE__ */ new Set(), s = () => globalThis.process?.env?.NODE_ENV !
|
|
|
80
80
|
if (r) {
|
|
81
81
|
for (let n of r) {
|
|
82
82
|
let r = t ? `${t}.${n.name.toString()}` : n.name.toString(), o = f(n.type), s;
|
|
83
|
-
s = e._isNullableDiscriminatedUnion && n.name.toString() === "_tag" || e.required === !1 ? !1 : !o;
|
|
83
|
+
s = e._isNullableDiscriminatedUnion && n.name.toString() === "_tag" || e.required === !1 || n.type.context?.isOptional ? !1 : !o;
|
|
84
84
|
let l = c(n.type);
|
|
85
85
|
if (a.AST.isUnion(n.type)) {
|
|
86
86
|
let e = m(n.type.types);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue-components",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.57",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@mdi/js": "^7.4.47",
|
|
6
6
|
"effect": "^4.0.0-beta.43",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"highlight.js": "^11.11.1",
|
|
58
58
|
"mitt": "^3.0.1",
|
|
59
59
|
"vue3-highlightjs": "^1.0.5",
|
|
60
|
-
"@effect-app/vue": "4.0.0-beta.
|
|
61
|
-
"effect-app": "4.0.0-beta.
|
|
60
|
+
"@effect-app/vue": "4.0.0-beta.57",
|
|
61
|
+
"effect-app": "4.0.0-beta.57"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"check": "vue-tsc",
|
|
@@ -521,6 +521,7 @@ export const createMeta = <T = any>(
|
|
|
521
521
|
|
|
522
522
|
// Determine if this field should be required:
|
|
523
523
|
// - For nullable discriminated unions, only _tag should be non-required
|
|
524
|
+
// - optionalKey fields are not required
|
|
524
525
|
// - All other fields should calculate their required status normally
|
|
525
526
|
let isRequired: boolean
|
|
526
527
|
if (meta._isNullableDiscriminatedUnion && p.name.toString() === "_tag") {
|
|
@@ -529,6 +530,8 @@ export const createMeta = <T = any>(
|
|
|
529
530
|
} else if (meta.required === false) {
|
|
530
531
|
// Explicitly set to non-required (legacy behavior for backwards compatibility)
|
|
531
532
|
isRequired = false
|
|
533
|
+
} else if ((p.type as any).context?.isOptional) {
|
|
534
|
+
isRequired = false
|
|
532
535
|
} else {
|
|
533
536
|
// Calculate from the property itself
|
|
534
537
|
isRequired = !nullableOrUndefined
|