@effect-app/vue-components 2.4.6 → 2.4.9
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/types/components/OmegaForm/OmegaArray.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +5 -5
- package/dist/types/components/OmegaForm/OmegaFormInput.vue.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +14 -11
- package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +2 -3
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +71 -90
- package/dist/vue-components.es10.js +139 -122
- package/dist/vue-components.es22.js +1 -1
- package/dist/vue-components.es23.js +1 -1
- package/dist/vue-components.es40.js +23 -4
- package/dist/vue-components.es41.js +5 -23
- package/dist/vue-components.es42.js +21 -5
- package/dist/vue-components.es43.js +25 -16
- package/dist/vue-components.es44.js +15 -23
- package/dist/vue-components.es45.js +7 -17
- package/dist/vue-components.es46.js +5 -12
- package/dist/vue-components.es47.js +19 -5
- package/dist/vue-components.es48.js +9 -19
- package/dist/vue-components.es49.js +31 -9
- package/dist/vue-components.es50.js +42 -25
- package/dist/vue-components.es51.js +16 -38
- package/dist/vue-components.es52.js +4 -26
- package/dist/vue-components.es54.js +1 -1
- package/dist/vue-components.es56.js +1 -1
- package/dist/vue-components.es58.js +3 -3
- package/dist/vue-components.es59.js +1 -1
- package/package.json +1 -1
- package/src/components/OmegaForm/OmegaArray.vue +2 -3
- package/src/components/OmegaForm/OmegaAutoGen.vue +5 -6
- package/src/components/OmegaForm/OmegaFormInput.vue +2 -3
- package/src/components/OmegaForm/OmegaFormStuff.ts +12 -16
- package/src/components/OmegaForm/OmegaInput.vue +2 -3
- package/src/components/OmegaForm/useOmegaForm.ts +222 -466
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { INVALID_TRACEID as r, INVALID_SPANID as t } from "./vue-components.es48.js";
|
|
2
|
+
import { NonRecordingSpan as i } from "./vue-components.es49.js";
|
|
3
|
+
var a = /^([0-9a-f]{32})$/i, o = /^[0-9a-f]{16}$/i;
|
|
4
|
+
function I(n) {
|
|
5
|
+
return a.test(n) && n !== r;
|
|
6
|
+
}
|
|
7
|
+
function e(n) {
|
|
8
|
+
return o.test(n) && n !== t;
|
|
9
|
+
}
|
|
10
|
+
function A(n) {
|
|
11
|
+
return I(n.traceId) && e(n.spanId);
|
|
12
|
+
}
|
|
13
|
+
function D(n) {
|
|
14
|
+
return new i(n);
|
|
15
|
+
}
|
|
5
16
|
export {
|
|
6
|
-
|
|
17
|
+
A as isSpanContextValid,
|
|
18
|
+
e as isValidSpanId,
|
|
19
|
+
I as isValidTraceId,
|
|
20
|
+
D as wrapSpanContext
|
|
7
21
|
};
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
function e(n) {
|
|
8
|
-
return o.test(n) && n !== t;
|
|
9
|
-
}
|
|
10
|
-
function A(n) {
|
|
11
|
-
return I(n.traceId) && e(n.spanId);
|
|
12
|
-
}
|
|
13
|
-
function D(n) {
|
|
14
|
-
return new i(n);
|
|
15
|
-
}
|
|
1
|
+
import { TraceFlags as I } from "./vue-components.es46.js";
|
|
2
|
+
var a = "0000000000000000", r = "00000000000000000000000000000000", A = {
|
|
3
|
+
traceId: r,
|
|
4
|
+
spanId: a,
|
|
5
|
+
traceFlags: I.NONE
|
|
6
|
+
};
|
|
16
7
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
D as wrapSpanContext
|
|
8
|
+
a as INVALID_SPANID,
|
|
9
|
+
A as INVALID_SPAN_CONTEXT,
|
|
10
|
+
r as INVALID_TRACEID
|
|
21
11
|
};
|
|
@@ -1,11 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { INVALID_SPAN_CONTEXT as o } from "./vue-components.es48.js";
|
|
2
|
+
var i = (
|
|
3
|
+
/** @class */
|
|
4
|
+
(function() {
|
|
5
|
+
function t(n) {
|
|
6
|
+
n === void 0 && (n = o), this._spanContext = n;
|
|
7
|
+
}
|
|
8
|
+
return t.prototype.spanContext = function() {
|
|
9
|
+
return this._spanContext;
|
|
10
|
+
}, t.prototype.setAttribute = function(n, e) {
|
|
11
|
+
return this;
|
|
12
|
+
}, t.prototype.setAttributes = function(n) {
|
|
13
|
+
return this;
|
|
14
|
+
}, t.prototype.addEvent = function(n, e) {
|
|
15
|
+
return this;
|
|
16
|
+
}, t.prototype.addLink = function(n) {
|
|
17
|
+
return this;
|
|
18
|
+
}, t.prototype.addLinks = function(n) {
|
|
19
|
+
return this;
|
|
20
|
+
}, t.prototype.setStatus = function(n) {
|
|
21
|
+
return this;
|
|
22
|
+
}, t.prototype.updateName = function(n) {
|
|
23
|
+
return this;
|
|
24
|
+
}, t.prototype.end = function(n) {
|
|
25
|
+
}, t.prototype.isRecording = function() {
|
|
26
|
+
return !1;
|
|
27
|
+
}, t.prototype.recordException = function(n, e) {
|
|
28
|
+
}, t;
|
|
29
|
+
})()
|
|
30
|
+
);
|
|
7
31
|
export {
|
|
8
|
-
|
|
9
|
-
A as INVALID_SPAN_CONTEXT,
|
|
10
|
-
r as INVALID_TRACEID
|
|
32
|
+
i as NonRecordingSpan
|
|
11
33
|
};
|
|
@@ -1,33 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { NoopContextManager as f } from "./vue-components.es59.js";
|
|
2
|
+
import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es57.js";
|
|
3
|
+
import { DiagAPI as u } from "./vue-components.es54.js";
|
|
4
|
+
var y = function(t, e) {
|
|
5
|
+
var a = typeof Symbol == "function" && t[Symbol.iterator];
|
|
6
|
+
if (!a) return t;
|
|
7
|
+
var n = a.call(t), o, r = [], i;
|
|
8
|
+
try {
|
|
9
|
+
for (; (e === void 0 || e-- > 0) && !(o = n.next()).done; ) r.push(o.value);
|
|
10
|
+
} catch (c) {
|
|
11
|
+
i = { error: c };
|
|
12
|
+
} finally {
|
|
13
|
+
try {
|
|
14
|
+
o && !o.done && (a = n.return) && a.call(n);
|
|
15
|
+
} finally {
|
|
16
|
+
if (i) throw i.error;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return r;
|
|
20
|
+
}, d = function(t, e, a) {
|
|
21
|
+
if (a || arguments.length === 2) for (var n = 0, o = e.length, r; n < o; n++)
|
|
22
|
+
(r || !(n in e)) && (r || (r = Array.prototype.slice.call(e, 0, n)), r[n] = e[n]);
|
|
23
|
+
return t.concat(r || Array.prototype.slice.call(e));
|
|
24
|
+
}, l = "context", _ = new f(), A = (
|
|
3
25
|
/** @class */
|
|
4
26
|
(function() {
|
|
5
|
-
function t(
|
|
6
|
-
n === void 0 && (n = o), this._spanContext = n;
|
|
27
|
+
function t() {
|
|
7
28
|
}
|
|
8
|
-
return t.
|
|
9
|
-
return this.
|
|
10
|
-
}, t.prototype.
|
|
11
|
-
return
|
|
12
|
-
}, t.prototype.
|
|
13
|
-
return this;
|
|
14
|
-
}, t.prototype.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return this;
|
|
18
|
-
}, t.prototype.
|
|
19
|
-
return this;
|
|
20
|
-
}, t.prototype.
|
|
21
|
-
return
|
|
22
|
-
}, t.prototype.
|
|
23
|
-
|
|
24
|
-
}, t.prototype.end = function(n) {
|
|
25
|
-
}, t.prototype.isRecording = function() {
|
|
26
|
-
return !1;
|
|
27
|
-
}, t.prototype.recordException = function(n, e) {
|
|
29
|
+
return t.getInstance = function() {
|
|
30
|
+
return this._instance || (this._instance = new t()), this._instance;
|
|
31
|
+
}, t.prototype.setGlobalContextManager = function(e) {
|
|
32
|
+
return s(l, e, u.instance());
|
|
33
|
+
}, t.prototype.active = function() {
|
|
34
|
+
return this._getContextManager().active();
|
|
35
|
+
}, t.prototype.with = function(e, a, n) {
|
|
36
|
+
for (var o, r = [], i = 3; i < arguments.length; i++)
|
|
37
|
+
r[i - 3] = arguments[i];
|
|
38
|
+
return (o = this._getContextManager()).with.apply(o, d([e, a, n], y(r), !1));
|
|
39
|
+
}, t.prototype.bind = function(e, a) {
|
|
40
|
+
return this._getContextManager().bind(e, a);
|
|
41
|
+
}, t.prototype._getContextManager = function() {
|
|
42
|
+
return p(l) || _;
|
|
43
|
+
}, t.prototype.disable = function() {
|
|
44
|
+
this._getContextManager().disable(), g(l, u.instance());
|
|
28
45
|
}, t;
|
|
29
46
|
})()
|
|
30
47
|
);
|
|
31
48
|
export {
|
|
32
|
-
|
|
49
|
+
A as ContextAPI
|
|
33
50
|
};
|
|
@@ -1,50 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var n = a.call(t), o, r = [], i;
|
|
8
|
-
try {
|
|
9
|
-
for (; (e === void 0 || e-- > 0) && !(o = n.next()).done; ) r.push(o.value);
|
|
10
|
-
} catch (c) {
|
|
11
|
-
i = { error: c };
|
|
12
|
-
} finally {
|
|
13
|
-
try {
|
|
14
|
-
o && !o.done && (a = n.return) && a.call(n);
|
|
15
|
-
} finally {
|
|
16
|
-
if (i) throw i.error;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return r;
|
|
20
|
-
}, d = function(t, e, a) {
|
|
21
|
-
if (a || arguments.length === 2) for (var n = 0, o = e.length, r; n < o; n++)
|
|
22
|
-
(r || !(n in e)) && (r || (r = Array.prototype.slice.call(e, 0, n)), r[n] = e[n]);
|
|
23
|
-
return t.concat(r || Array.prototype.slice.call(e));
|
|
24
|
-
}, l = "context", _ = new f(), A = (
|
|
1
|
+
import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es57.js";
|
|
2
|
+
import { ProxyTracerProvider as i } from "./vue-components.es44.js";
|
|
3
|
+
import { wrapSpanContext as c, isSpanContextValid as h } from "./vue-components.es47.js";
|
|
4
|
+
import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es58.js";
|
|
5
|
+
import { DiagAPI as o } from "./vue-components.es54.js";
|
|
6
|
+
var n = "trace", y = (
|
|
25
7
|
/** @class */
|
|
26
8
|
(function() {
|
|
27
9
|
function t() {
|
|
10
|
+
this._proxyTracerProvider = new i(), this.wrapSpanContext = c, this.isSpanContextValid = h, this.deleteSpan = g, this.getSpan = S, this.getActiveSpan = x, this.getSpanContext = d, this.setSpan = f, this.setSpanContext = l;
|
|
28
11
|
}
|
|
29
12
|
return t.getInstance = function() {
|
|
30
13
|
return this._instance || (this._instance = new t()), this._instance;
|
|
31
|
-
}, t.prototype.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return (o = this._getContextManager()).with.apply(o, d([e, a, n], y(r), !1));
|
|
39
|
-
}, t.prototype.bind = function(e, a) {
|
|
40
|
-
return this._getContextManager().bind(e, a);
|
|
41
|
-
}, t.prototype._getContextManager = function() {
|
|
42
|
-
return p(l) || _;
|
|
14
|
+
}, t.prototype.setGlobalTracerProvider = function(r) {
|
|
15
|
+
var e = a(n, this._proxyTracerProvider, o.instance());
|
|
16
|
+
return e && this._proxyTracerProvider.setDelegate(r), e;
|
|
17
|
+
}, t.prototype.getTracerProvider = function() {
|
|
18
|
+
return p(n) || this._proxyTracerProvider;
|
|
19
|
+
}, t.prototype.getTracer = function(r, e) {
|
|
20
|
+
return this.getTracerProvider().getTracer(r, e);
|
|
43
21
|
}, t.prototype.disable = function() {
|
|
44
|
-
|
|
22
|
+
s(n, o.instance()), this._proxyTracerProvider = new i();
|
|
45
23
|
}, t;
|
|
46
24
|
})()
|
|
47
25
|
);
|
|
48
26
|
export {
|
|
49
|
-
|
|
27
|
+
y as TraceAPI
|
|
50
28
|
};
|
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es58.js";
|
|
5
|
-
import { DiagAPI as o } from "./vue-components.es54.js";
|
|
6
|
-
var n = "trace", y = (
|
|
7
|
-
/** @class */
|
|
8
|
-
(function() {
|
|
9
|
-
function t() {
|
|
10
|
-
this._proxyTracerProvider = new i(), this.wrapSpanContext = c, this.isSpanContextValid = h, this.deleteSpan = g, this.getSpan = S, this.getActiveSpan = x, this.getSpanContext = d, this.setSpan = f, this.setSpanContext = l;
|
|
11
|
-
}
|
|
12
|
-
return t.getInstance = function() {
|
|
13
|
-
return this._instance || (this._instance = new t()), this._instance;
|
|
14
|
-
}, t.prototype.setGlobalTracerProvider = function(r) {
|
|
15
|
-
var e = a(n, this._proxyTracerProvider, o.instance());
|
|
16
|
-
return e && this._proxyTracerProvider.setDelegate(r), e;
|
|
17
|
-
}, t.prototype.getTracerProvider = function() {
|
|
18
|
-
return p(n) || this._proxyTracerProvider;
|
|
19
|
-
}, t.prototype.getTracer = function(r, e) {
|
|
20
|
-
return this.getTracerProvider().getTracer(r, e);
|
|
21
|
-
}, t.prototype.disable = function() {
|
|
22
|
-
s(n, o.instance()), this._proxyTracerProvider = new i();
|
|
23
|
-
}, t;
|
|
24
|
-
})()
|
|
25
|
-
);
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import o from "./vue-components.es38.js";
|
|
3
|
+
|
|
26
4
|
export {
|
|
27
|
-
|
|
5
|
+
o as default
|
|
28
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiagComponentLogger as m } from "./vue-components.es55.js";
|
|
2
2
|
import { createLogLevelDiagLogger as y } from "./vue-components.es56.js";
|
|
3
|
-
import { DiagLogLevel as d } from "./vue-components.
|
|
3
|
+
import { DiagLogLevel as d } from "./vue-components.es41.js";
|
|
4
4
|
import { unregisterGlobal as p, getGlobal as v, registerGlobal as w } from "./vue-components.es57.js";
|
|
5
5
|
var b = function(i, n) {
|
|
6
6
|
var r = typeof Symbol == "function" && i[Symbol.iterator];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createContextKey as o } from "./vue-components.
|
|
2
|
-
import { NonRecordingSpan as a } from "./vue-components.
|
|
3
|
-
import { ContextAPI as u } from "./vue-components.
|
|
1
|
+
import { createContextKey as o } from "./vue-components.es40.js";
|
|
2
|
+
import { NonRecordingSpan as a } from "./vue-components.es49.js";
|
|
3
|
+
import { ContextAPI as u } from "./vue-components.es50.js";
|
|
4
4
|
var n = o("OpenTelemetry Context Key SPAN");
|
|
5
5
|
function r(e) {
|
|
6
6
|
return e.getValue(n) || void 0;
|
package/package.json
CHANGED
|
@@ -45,15 +45,14 @@
|
|
|
45
45
|
generic="
|
|
46
46
|
// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
47
47
|
From extends Record<PropertyKey, any>,
|
|
48
|
-
To extends Record<PropertyKey, any
|
|
49
|
-
Name extends DeepKeys<From>
|
|
48
|
+
To extends Record<PropertyKey, any>
|
|
50
49
|
"
|
|
51
50
|
>
|
|
52
51
|
import { type DeepKeys } from "@tanstack/vue-form"
|
|
53
52
|
import { computed, onMounted, provide } from "vue"
|
|
54
53
|
import { type OmegaArrayProps } from "./OmegaFormStuff"
|
|
55
54
|
|
|
56
|
-
const props = defineProps<OmegaArrayProps<From, To
|
|
55
|
+
const props = defineProps<OmegaArrayProps<From, To>>()
|
|
57
56
|
|
|
58
57
|
defineOptions({
|
|
59
58
|
inheritAttrs: false
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:child="{ name, label, ...attrs }"
|
|
5
5
|
>
|
|
6
6
|
<form.Input
|
|
7
|
-
:name="name
|
|
7
|
+
:name="name"
|
|
8
8
|
:label="label"
|
|
9
9
|
v-bind="attrs"
|
|
10
10
|
/>
|
|
@@ -16,16 +16,15 @@
|
|
|
16
16
|
lang="ts"
|
|
17
17
|
generic="
|
|
18
18
|
From extends Record<PropertyKey, string>,
|
|
19
|
-
To extends Record<PropertyKey, string
|
|
20
|
-
Name extends DeepKeys<From>
|
|
19
|
+
To extends Record<PropertyKey, string>
|
|
21
20
|
"
|
|
22
21
|
>
|
|
23
22
|
import { type DeepKeys } from "@tanstack/vue-form"
|
|
24
23
|
import { Array as A, Order, pipe } from "effect-app"
|
|
25
24
|
import { computed } from "vue"
|
|
26
|
-
import { type FieldMeta, type
|
|
25
|
+
import { type FieldMeta, type OmegaAutoGenMeta, type OmegaInputProps } from "./OmegaFormStuff"
|
|
27
26
|
|
|
28
|
-
type NewMeta = OmegaAutoGenMeta<From, To
|
|
27
|
+
type NewMeta = OmegaAutoGenMeta<From, To>
|
|
29
28
|
|
|
30
29
|
const mapObject = <K extends string, A, B>(fn: (value: A, key: K) => B) => (obj: Record<K, A>): Record<K, B> =>
|
|
31
30
|
Object.fromEntries(
|
|
@@ -52,7 +51,7 @@ const filterMapRecord =
|
|
|
52
51
|
)
|
|
53
52
|
|
|
54
53
|
const props = defineProps<{
|
|
55
|
-
form: OmegaInputProps<From, To
|
|
54
|
+
form: OmegaInputProps<From, To>["form"]
|
|
56
55
|
pick?: DeepKeys<From>[]
|
|
57
56
|
omit?: DeepKeys<From>[]
|
|
58
57
|
labelMap?: (key: DeepKeys<From>) => string | undefined
|
|
@@ -27,8 +27,7 @@ import { OmegaFormKey } from "./useOmegaForm"
|
|
|
27
27
|
|
|
28
28
|
const form = inject(OmegaFormKey) as unknown as OmegaInputProps<
|
|
29
29
|
From,
|
|
30
|
-
To
|
|
31
|
-
Name
|
|
30
|
+
To
|
|
32
31
|
>["form"]
|
|
33
32
|
|
|
34
33
|
if (!form) {
|
|
@@ -36,7 +35,7 @@ if (!form) {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
defineProps<
|
|
39
|
-
BaseProps<From
|
|
38
|
+
BaseProps<From> & DefaultTypeProps
|
|
40
39
|
>()
|
|
41
40
|
|
|
42
41
|
defineSlots<{
|
|
@@ -17,19 +17,19 @@ export type FieldPath<T> = unknown extends T ? string
|
|
|
17
17
|
// technically we cannot have primitive at the root
|
|
18
18
|
: T extends string | boolean | number | null | undefined | symbol | bigint ? ""
|
|
19
19
|
// technically we cannot have array at the root
|
|
20
|
-
: T extends ReadonlyArray<infer U> ? FieldPath_<U, `[${number}]
|
|
20
|
+
: T extends ReadonlyArray<infer U> ? Compute<FieldPath_<U, `[${number}]`>>
|
|
21
21
|
: {
|
|
22
|
-
[K in keyof T]: FieldPath_<T[K], `${K & string}
|
|
22
|
+
[K in keyof T]: Compute<FieldPath_<T[K], `${K & string}`>>
|
|
23
23
|
}[keyof T]
|
|
24
24
|
|
|
25
25
|
export type FieldPath_<T, Path extends string> = unknown extends T ? string
|
|
26
26
|
: T extends string | boolean | number | null | undefined | symbol | bigint ? Path
|
|
27
|
-
: T extends ReadonlyArray<infer U> ? FieldPath_<U, `${Path}[${number}]
|
|
27
|
+
: T extends ReadonlyArray<infer U> ? Compute<FieldPath_<U, `${Path}[${number}]`>> | Path
|
|
28
28
|
: {
|
|
29
|
-
[K in keyof T]: FieldPath_<T[K], `${Path}.${K & string}
|
|
29
|
+
[K in keyof T]: Compute<FieldPath_<T[K], `${Path}.${K & string}`>>
|
|
30
30
|
}[keyof T]
|
|
31
31
|
|
|
32
|
-
export type BaseProps<From, TName extends FieldPath<From>> = {
|
|
32
|
+
export type BaseProps<From, TName extends FieldPath<From> = FieldPath<From>> = {
|
|
33
33
|
/**
|
|
34
34
|
* Will fallback to i18n when not specified.
|
|
35
35
|
* Can also be provided via #label slot for custom HTML labels.
|
|
@@ -64,34 +64,31 @@ export type DefaultTypeProps = {
|
|
|
64
64
|
|
|
65
65
|
export type OmegaInputPropsBase<
|
|
66
66
|
From extends Record<PropertyKey, any>,
|
|
67
|
-
To extends Record<PropertyKey, any
|
|
68
|
-
Name extends DeepKeys<From>
|
|
67
|
+
To extends Record<PropertyKey, any>
|
|
69
68
|
> = {
|
|
70
69
|
form: OF<From, To> & {
|
|
71
70
|
meta: MetaRecord<From>
|
|
72
71
|
i18nNamespace?: string
|
|
73
72
|
}
|
|
74
|
-
} & BaseProps<From
|
|
73
|
+
} & BaseProps<From>
|
|
75
74
|
|
|
76
75
|
export type OmegaInputProps<
|
|
77
76
|
From extends Record<PropertyKey, any>,
|
|
78
77
|
To extends Record<PropertyKey, any>,
|
|
79
|
-
Name extends DeepKeys<From>,
|
|
80
78
|
TypeProps = DefaultTypeProps
|
|
81
79
|
> = {
|
|
82
80
|
form: OmegaFormReturn<From, To, TypeProps> & {
|
|
83
81
|
meta: MetaRecord<From>
|
|
84
82
|
i18nNamespace?: string
|
|
85
83
|
}
|
|
86
|
-
} & BaseProps<From
|
|
84
|
+
} & BaseProps<From>
|
|
87
85
|
|
|
88
86
|
export type OmegaArrayProps<
|
|
89
87
|
From extends Record<PropertyKey, any>,
|
|
90
|
-
To extends Record<PropertyKey, any
|
|
91
|
-
Name extends DeepKeys<From>
|
|
88
|
+
To extends Record<PropertyKey, any>
|
|
92
89
|
> =
|
|
93
90
|
& Omit<
|
|
94
|
-
OmegaInputProps<From, To
|
|
91
|
+
OmegaInputProps<From, To>,
|
|
95
92
|
"validators" | "options" | "label" | "type" | "items" | "name"
|
|
96
93
|
>
|
|
97
94
|
& {
|
|
@@ -889,9 +886,8 @@ export const nullableInput = <A, I, R>(
|
|
|
889
886
|
|
|
890
887
|
export type OmegaAutoGenMeta<
|
|
891
888
|
From extends Record<PropertyKey, any>,
|
|
892
|
-
To extends Record<PropertyKey, any
|
|
893
|
-
|
|
894
|
-
> = Omit<OmegaInputProps<From, To, Name>, "form">
|
|
889
|
+
To extends Record<PropertyKey, any>
|
|
890
|
+
> = Omit<OmegaInputProps<From, To>, "form">
|
|
895
891
|
|
|
896
892
|
const supportedInputs = [
|
|
897
893
|
"button",
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
generic="
|
|
41
41
|
// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
42
42
|
From extends Record<PropertyKey, any>,
|
|
43
|
-
To extends Record<PropertyKey, any
|
|
44
|
-
Name extends DeepKeys<From>
|
|
43
|
+
To extends Record<PropertyKey, any>
|
|
45
44
|
"
|
|
46
45
|
>
|
|
47
46
|
import { type DeepKeys } from "@tanstack/vue-form"
|
|
@@ -50,7 +49,7 @@ import { useIntl } from "../../utils"
|
|
|
50
49
|
import { type FieldMeta, generateInputStandardSchemaFromFieldMeta, type OmegaInputPropsBase } from "./OmegaFormStuff"
|
|
51
50
|
import OmegaInternalInput from "./OmegaInternalInput.vue"
|
|
52
51
|
|
|
53
|
-
const props = defineProps<OmegaInputPropsBase<From, To
|
|
52
|
+
const props = defineProps<OmegaInputPropsBase<From, To>>()
|
|
54
53
|
|
|
55
54
|
// downgrade to *as* DeepKeys<From> to avoid useless and possible infinite recursion in TS
|
|
56
55
|
const propsName = computed(() => props.name as DeepKeys<From>)
|