@effect-app/vue-components 2.4.6 → 2.4.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/types/components/OmegaForm/useOmegaForm.d.ts +21 -17
- package/dist/vue-components.es10.js +17 -14
- package/dist/vue-components.es22.js +1 -1
- package/dist/vue-components.es23.js +1 -1
- package/dist/vue-components.es36.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 +11 -26
- package/dist/vue-components.es53.js +4 -11
- 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/useOmegaForm.ts +168 -275
|
@@ -76,8 +76,12 @@ export declare const OmegaFormKey: InjectionKey<OF<any, any>>;
|
|
|
76
76
|
type __VLS_PrettifyLocal<T> = {
|
|
77
77
|
[K in keyof T]: T[K];
|
|
78
78
|
} & {};
|
|
79
|
+
type CachedFieldApi<From, To, TypeProps = DefaultTypeProps> = import("@tanstack/vue-form").FieldApi<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").StandardSchemaV1<From, To>, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, Record<string, any> | undefined>;
|
|
80
|
+
type CachedFieldState<From, To, TypeProps = DefaultTypeProps> = import("@tanstack/vue-form").FieldState<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, OmegaFormReturn<From, To, TypeProps>["_keys"], DeepValue<From, OmegaFormReturn<From, To, TypeProps>["_keys"]>> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").StandardSchemaV1<From, To>, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined>;
|
|
79
81
|
export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, TypeProps = DefaultTypeProps> extends OF<From, To> {
|
|
80
|
-
|
|
82
|
+
_paths: FieldPath<From>;
|
|
83
|
+
_keys: DeepKeys<From>;
|
|
84
|
+
Input: <Name extends OmegaFormReturn<From, To, TypeProps>["_paths"]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
81
85
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & TypeProps & Partial<{}>> & BaseProps<From, Name> & import("vue").PublicProps;
|
|
82
86
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
83
87
|
attrs: any;
|
|
@@ -107,7 +111,7 @@ export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To exten
|
|
|
107
111
|
}>) => import("vue").VNode & {
|
|
108
112
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
109
113
|
};
|
|
110
|
-
TaggedUnion: <Name extends
|
|
114
|
+
TaggedUnion: <Name extends OmegaFormReturn<From, To, TypeProps>["_keys"]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
111
115
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
112
116
|
name: Name;
|
|
113
117
|
type?: "select" | "radio";
|
|
@@ -124,43 +128,43 @@ export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To exten
|
|
|
124
128
|
}>) => import("vue").VNode & {
|
|
125
129
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
126
130
|
};
|
|
127
|
-
Array: <Name extends
|
|
131
|
+
Array: <Name extends OmegaFormReturn<From, To, TypeProps>["_keys"]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
128
132
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & (Omit<OmegaArrayProps<From, To, Name>, "form">) & {}> & import("vue").PublicProps;
|
|
129
133
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
130
134
|
attrs: any;
|
|
131
135
|
slots: {
|
|
132
136
|
"pre-array"?: (props: {
|
|
133
|
-
field:
|
|
134
|
-
state:
|
|
137
|
+
field: CachedFieldApi<From, To, TypeProps>;
|
|
138
|
+
state: CachedFieldState<From, To, TypeProps>;
|
|
135
139
|
}) => any;
|
|
136
140
|
} & {
|
|
137
141
|
default?: (props: {
|
|
138
|
-
subField:
|
|
139
|
-
subState:
|
|
142
|
+
subField: CachedFieldApi<From, To, TypeProps>;
|
|
143
|
+
subState: CachedFieldState<From, To, TypeProps>;
|
|
140
144
|
index: number;
|
|
141
|
-
field:
|
|
145
|
+
field: CachedFieldApi<From, To, TypeProps>;
|
|
142
146
|
}) => any;
|
|
143
147
|
} & {
|
|
144
148
|
"post-array"?: (props: {
|
|
145
|
-
field:
|
|
146
|
-
state:
|
|
149
|
+
field: CachedFieldApi<From, To, TypeProps>;
|
|
150
|
+
state: CachedFieldState<From, To, TypeProps>;
|
|
147
151
|
}) => any;
|
|
148
152
|
} & {
|
|
149
153
|
field?: (props: {
|
|
150
|
-
field:
|
|
154
|
+
field: CachedFieldApi<From, To, TypeProps>;
|
|
151
155
|
}) => any;
|
|
152
156
|
};
|
|
153
157
|
emit: {};
|
|
154
158
|
}>) => import("vue").VNode & {
|
|
155
159
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
156
160
|
};
|
|
157
|
-
AutoGen: <Name extends
|
|
161
|
+
AutoGen: <Name extends OmegaFormReturn<From, To, TypeProps>["_keys"]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
158
162
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
159
|
-
pick?:
|
|
160
|
-
omit?:
|
|
161
|
-
labelMap?: (key:
|
|
162
|
-
filterMap?: <M extends OmegaAutoGenMeta<From, To, Name>>(key:
|
|
163
|
-
order?:
|
|
163
|
+
pick?: OmegaFormReturn<From, To, TypeProps>["_keys"][];
|
|
164
|
+
omit?: OmegaFormReturn<From, To, TypeProps>["_keys"][];
|
|
165
|
+
labelMap?: (key: OmegaFormReturn<From, To, TypeProps>["_keys"]) => string | undefined;
|
|
166
|
+
filterMap?: <M extends OmegaAutoGenMeta<From, To, Name>>(key: OmegaFormReturn<From, To, TypeProps>["_keys"], meta: M) => boolean | M;
|
|
167
|
+
order?: OmegaFormReturn<From, To, TypeProps>["_keys"][];
|
|
164
168
|
sort?: Order.Order<OmegaAutoGenMeta<From, To, Name>>;
|
|
165
169
|
} & {}> & import("vue").PublicProps;
|
|
166
170
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useForm as J } from "@tanstack/vue-form";
|
|
2
|
-
import { Data as z, S as
|
|
2
|
+
import { Data as z, S as k, Effect as l, Fiber as N, Option as P, Array as g } from "effect-app";
|
|
3
3
|
import { runtimeFiberAsPromise as K } from "./vue-components.es16.js";
|
|
4
4
|
import { isObject as T } from "./vue-components.es17.js";
|
|
5
|
-
import { computed as
|
|
5
|
+
import { computed as x, onUnmounted as D, onMounted as Z, onBeforeUnmount as G, watch as W, ref as Q, h as B } from "vue";
|
|
6
6
|
import X from "./vue-components.es18.js";
|
|
7
7
|
import Y from "./vue-components.es19.js";
|
|
8
8
|
import C from "./vue-components.es20.js";
|
|
@@ -11,7 +11,7 @@ import re from "./vue-components.es6.js";
|
|
|
11
11
|
import te from "./vue-components.es8.js";
|
|
12
12
|
import ne from "./vue-components.es21.js";
|
|
13
13
|
import { trace as R } from "./vue-components.es22.js";
|
|
14
|
-
import { context as
|
|
14
|
+
import { context as _ } from "./vue-components.es23.js";
|
|
15
15
|
class se extends z.TaggedError("FormErrors") {
|
|
16
16
|
}
|
|
17
17
|
const E = (c) => function(i) {
|
|
@@ -26,7 +26,7 @@ const E = (c) => function(i) {
|
|
|
26
26
|
}, oe = (c) => function(i) {
|
|
27
27
|
return {
|
|
28
28
|
setup() {
|
|
29
|
-
const { fieldMap: S, form: v } = c, m = v.useStore((u) => u.errors), p = v.useStore((u) => u.fieldMeta), F = v.useStore((u) => u.errorMap), M =
|
|
29
|
+
const { fieldMap: S, form: v } = c, m = v.useStore((u) => u.errors), p = v.useStore((u) => u.fieldMeta), F = v.useStore((u) => u.errorMap), M = x(() => {
|
|
30
30
|
const u = g.filterMap(
|
|
31
31
|
Object.entries(p.value),
|
|
32
32
|
([j, o]) => {
|
|
@@ -76,7 +76,7 @@ const E = (c) => function(i) {
|
|
|
76
76
|
};
|
|
77
77
|
}, ye = (c, f, i) => {
|
|
78
78
|
if (!c) throw new Error("Schema is required");
|
|
79
|
-
const S =
|
|
79
|
+
const S = k.standardSchemaV1(c), v = k.decode(c), { meta: m } = ee(c), p = x(() => {
|
|
80
80
|
if (i?.persistency?.id)
|
|
81
81
|
return i.persistency.id;
|
|
82
82
|
const e = window.location.pathname, r = Object.keys(m);
|
|
@@ -99,7 +99,7 @@ const E = (c) => function(i) {
|
|
|
99
99
|
s && !s.required && s.nullableOrUndefined && s.type !== "boolean" && (t === void 0 || y) && (r[n] = s.nullableOrUndefined === "undefined" ? void 0 : null);
|
|
100
100
|
}
|
|
101
101
|
return r;
|
|
102
|
-
}, O =
|
|
102
|
+
}, O = x(() => {
|
|
103
103
|
const e = f?.defaultValues ? u(f.defaultValues) : void 0;
|
|
104
104
|
if (e && !i?.persistency?.overrideDefaultValues)
|
|
105
105
|
return e;
|
|
@@ -129,7 +129,7 @@ const E = (c) => function(i) {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
return r ??= {}, e ? M(e, r) : r;
|
|
132
|
-
}), j = (e, r) => e ?
|
|
132
|
+
}), j = (e, r) => e ? _.with(R.setSpan(_.active(), e), r) : r(), o = J({
|
|
133
133
|
...f,
|
|
134
134
|
validators: {
|
|
135
135
|
onSubmit: S,
|
|
@@ -176,7 +176,7 @@ const E = (c) => function(i) {
|
|
|
176
176
|
const n = w(e);
|
|
177
177
|
return r.setItem(p.value, JSON.stringify(n));
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, L = () => {
|
|
180
180
|
const e = i?.persistency;
|
|
181
181
|
if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
|
|
182
182
|
const r = w(e), n = new URLSearchParams(window.location.search);
|
|
@@ -184,13 +184,13 @@ const E = (c) => function(i) {
|
|
|
184
184
|
const s = new URL(window.location.href);
|
|
185
185
|
s.search = n.toString(), window.history.replaceState({}, "", s.toString());
|
|
186
186
|
}
|
|
187
|
-
},
|
|
187
|
+
}, V = (e) => {
|
|
188
188
|
o.store.state.isDirty && e.preventDefault();
|
|
189
189
|
};
|
|
190
|
-
if (
|
|
191
|
-
window.addEventListener("beforeunload", U), window.addEventListener("blur",
|
|
190
|
+
if (D(U), Z(() => {
|
|
191
|
+
window.addEventListener("beforeunload", U), window.addEventListener("blur", L), i?.preventWindowExit && i.preventWindowExit !== "nope" && window.addEventListener("beforeunload", V);
|
|
192
192
|
}), G(() => {
|
|
193
|
-
window.removeEventListener("beforeunload", U), window.removeEventListener("blur",
|
|
193
|
+
window.removeEventListener("beforeunload", U), window.removeEventListener("blur", L), i?.preventWindowExit && i.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", V);
|
|
194
194
|
}), i?.preventWindowExit === "prevent-and-reset") {
|
|
195
195
|
const e = o.useStore((t) => t.isSubmitting), r = o.useStore((t) => t.submissionAttempts), n = o.useStore((t) => t.canSubmit), s = o.useStore((t) => t.values);
|
|
196
196
|
W([e, r], ([t, d], [y]) => {
|
|
@@ -212,16 +212,19 @@ const E = (c) => function(i) {
|
|
|
212
212
|
meta: m,
|
|
213
213
|
clear: b,
|
|
214
214
|
handleSubmit: (e) => {
|
|
215
|
-
const r = R.getSpan(
|
|
215
|
+
const r = R.getSpan(_.active());
|
|
216
216
|
return H({ currentSpan: r, ...e });
|
|
217
217
|
},
|
|
218
218
|
// /** @experimental */
|
|
219
219
|
handleSubmitEffect: q,
|
|
220
220
|
registerField: (e) => {
|
|
221
|
-
W(e, (r) => A.value.set(r.name, { label: r.label, id: r.id }), { immediate: !0 }),
|
|
221
|
+
W(e, (r) => A.value.set(r.name, { label: r.label, id: r.id }), { immediate: !0 }), D(() => A.value.delete(e.value.name));
|
|
222
222
|
}
|
|
223
223
|
}), $ = { form: h, fieldMap: A };
|
|
224
224
|
return Object.assign(h, {
|
|
225
|
+
// Type-level properties for performance optimization (not used at runtime)
|
|
226
|
+
_paths: void 0,
|
|
227
|
+
_keys: void 0,
|
|
225
228
|
errorContext: $,
|
|
226
229
|
Form: E(h)(ne),
|
|
227
230
|
Input: E(h)(i?.input ?? re),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as m, createElementBlock as d, openBlock as u, withModifiers as f, createElementVNode as l, unref as s, renderSlot as a } from "vue";
|
|
2
2
|
import { useStore as b } from "@tanstack/vue-form";
|
|
3
3
|
import { usePreventClose as p } from "./vue-components.es11.js";
|
|
4
|
-
import { getOmegaStore as c } from "./vue-components.
|
|
4
|
+
import { getOmegaStore as c } from "./vue-components.es52.js";
|
|
5
5
|
const S = ["disabled"], V = /* @__PURE__ */ m({
|
|
6
6
|
__name: "OmegaWrapper",
|
|
7
7
|
props: {
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function a(t) {
|
|
2
|
+
return Symbol.for(t);
|
|
3
|
+
}
|
|
4
|
+
var c = (
|
|
5
|
+
/** @class */
|
|
6
|
+
/* @__PURE__ */ (function() {
|
|
7
|
+
function t(u) {
|
|
8
|
+
var e = this;
|
|
9
|
+
e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
|
|
10
|
+
return e._currentContext.get(n);
|
|
11
|
+
}, e.setValue = function(n, r) {
|
|
12
|
+
var o = new t(e._currentContext);
|
|
13
|
+
return o._currentContext.set(n, r), o;
|
|
14
|
+
}, e.deleteValue = function(n) {
|
|
15
|
+
var r = new t(e._currentContext);
|
|
16
|
+
return r._currentContext.delete(n), r;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
})()
|
|
21
|
+
), x = new c();
|
|
4
22
|
export {
|
|
5
|
-
|
|
23
|
+
x as ROOT_CONTEXT,
|
|
24
|
+
a as createContextKey
|
|
6
25
|
};
|
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** @class */
|
|
6
|
-
/* @__PURE__ */ (function() {
|
|
7
|
-
function t(u) {
|
|
8
|
-
var e = this;
|
|
9
|
-
e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
|
|
10
|
-
return e._currentContext.get(n);
|
|
11
|
-
}, e.setValue = function(n, r) {
|
|
12
|
-
var o = new t(e._currentContext);
|
|
13
|
-
return o._currentContext.set(n, r), o;
|
|
14
|
-
}, e.deleteValue = function(n) {
|
|
15
|
-
var r = new t(e._currentContext);
|
|
16
|
-
return r._currentContext.delete(n), r;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
})()
|
|
21
|
-
), x = new c();
|
|
1
|
+
var R;
|
|
2
|
+
(function(E) {
|
|
3
|
+
E[E.NONE = 0] = "NONE", E[E.ERROR = 30] = "ERROR", E[E.WARN = 50] = "WARN", E[E.INFO = 60] = "INFO", E[E.DEBUG = 70] = "DEBUG", E[E.VERBOSE = 80] = "VERBOSE", E[E.ALL = 9999] = "ALL";
|
|
4
|
+
})(R || (R = {}));
|
|
22
5
|
export {
|
|
23
|
-
|
|
24
|
-
a as createContextKey
|
|
6
|
+
R as DiagLogLevel
|
|
25
7
|
};
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
(
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { NoopTracer as o } from "./vue-components.es43.js";
|
|
2
|
+
var s = new o(), c = (
|
|
3
|
+
/** @class */
|
|
4
|
+
(function() {
|
|
5
|
+
function r(t, e, n, a) {
|
|
6
|
+
this._provider = t, this.name = e, this.version = n, this.options = a;
|
|
7
|
+
}
|
|
8
|
+
return r.prototype.startSpan = function(t, e, n) {
|
|
9
|
+
return this._getTracer().startSpan(t, e, n);
|
|
10
|
+
}, r.prototype.startActiveSpan = function(t, e, n, a) {
|
|
11
|
+
var i = this._getTracer();
|
|
12
|
+
return Reflect.apply(i.startActiveSpan, i, arguments);
|
|
13
|
+
}, r.prototype._getTracer = function() {
|
|
14
|
+
if (this._delegate)
|
|
15
|
+
return this._delegate;
|
|
16
|
+
var t = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
17
|
+
return t ? (this._delegate = t, this._delegate) : s;
|
|
18
|
+
}, r;
|
|
19
|
+
})()
|
|
20
|
+
);
|
|
5
21
|
export {
|
|
6
|
-
|
|
22
|
+
c as ProxyTracer
|
|
7
23
|
};
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ContextAPI as l } from "./vue-components.es50.js";
|
|
2
|
+
import { getSpanContext as m, setSpan as d } from "./vue-components.es58.js";
|
|
3
|
+
import { NonRecordingSpan as p } from "./vue-components.es49.js";
|
|
4
|
+
import { isSpanContextValid as S } from "./vue-components.es47.js";
|
|
5
|
+
var f = l.getInstance(), I = (
|
|
3
6
|
/** @class */
|
|
4
7
|
(function() {
|
|
5
|
-
function
|
|
6
|
-
this._provider = t, this.name = e, this.version = n, this.options = a;
|
|
8
|
+
function t() {
|
|
7
9
|
}
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
return t.prototype.startSpan = function(u, e, r) {
|
|
11
|
+
r === void 0 && (r = f.active());
|
|
12
|
+
var i = !!e?.root;
|
|
13
|
+
if (i)
|
|
14
|
+
return new p();
|
|
15
|
+
var n = r && m(r);
|
|
16
|
+
return g(n) && S(n) ? new p(n) : new p();
|
|
17
|
+
}, t.prototype.startActiveSpan = function(u, e, r, i) {
|
|
18
|
+
var n, o, a;
|
|
19
|
+
if (!(arguments.length < 2)) {
|
|
20
|
+
arguments.length === 2 ? a = e : arguments.length === 3 ? (n = e, a = r) : (n = e, o = r, a = i);
|
|
21
|
+
var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
|
|
22
|
+
return f.with(c, a, void 0, s);
|
|
23
|
+
}
|
|
24
|
+
}, t;
|
|
19
25
|
})()
|
|
20
26
|
);
|
|
27
|
+
function g(t) {
|
|
28
|
+
return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
|
|
29
|
+
}
|
|
21
30
|
export {
|
|
22
|
-
|
|
31
|
+
I as NoopTracer
|
|
23
32
|
};
|
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { isSpanContextValid as S } from "./vue-components.es48.js";
|
|
5
|
-
var f = l.getInstance(), I = (
|
|
1
|
+
import { ProxyTracer as i } from "./vue-components.es42.js";
|
|
2
|
+
import { NoopTracerProvider as n } from "./vue-components.es45.js";
|
|
3
|
+
var c = new n(), g = (
|
|
6
4
|
/** @class */
|
|
7
5
|
(function() {
|
|
8
6
|
function t() {
|
|
9
7
|
}
|
|
10
|
-
return t.prototype.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
|
|
22
|
-
return f.with(c, a, void 0, s);
|
|
23
|
-
}
|
|
8
|
+
return t.prototype.getTracer = function(e, o, a) {
|
|
9
|
+
var r;
|
|
10
|
+
return (r = this.getDelegateTracer(e, o, a)) !== null && r !== void 0 ? r : new i(this, e, o, a);
|
|
11
|
+
}, t.prototype.getDelegate = function() {
|
|
12
|
+
var e;
|
|
13
|
+
return (e = this._delegate) !== null && e !== void 0 ? e : c;
|
|
14
|
+
}, t.prototype.setDelegate = function(e) {
|
|
15
|
+
this._delegate = e;
|
|
16
|
+
}, t.prototype.getDelegateTracer = function(e, o, a) {
|
|
17
|
+
var r;
|
|
18
|
+
return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
|
|
24
19
|
}, t;
|
|
25
20
|
})()
|
|
26
21
|
);
|
|
27
|
-
function g(t) {
|
|
28
|
-
return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
|
|
29
|
-
}
|
|
30
22
|
export {
|
|
31
|
-
|
|
23
|
+
g as ProxyTracerProvider
|
|
32
24
|
};
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var c = new n(), g = (
|
|
1
|
+
import { NoopTracer as o } from "./vue-components.es43.js";
|
|
2
|
+
var p = (
|
|
4
3
|
/** @class */
|
|
5
4
|
(function() {
|
|
6
|
-
function
|
|
5
|
+
function r() {
|
|
7
6
|
}
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, t.prototype.getDelegate = function() {
|
|
12
|
-
var e;
|
|
13
|
-
return (e = this._delegate) !== null && e !== void 0 ? e : c;
|
|
14
|
-
}, t.prototype.setDelegate = function(e) {
|
|
15
|
-
this._delegate = e;
|
|
16
|
-
}, t.prototype.getDelegateTracer = function(e, o, a) {
|
|
17
|
-
var r;
|
|
18
|
-
return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
|
|
19
|
-
}, t;
|
|
7
|
+
return r.prototype.getTracer = function(e, n, t) {
|
|
8
|
+
return new o();
|
|
9
|
+
}, r;
|
|
20
10
|
})()
|
|
21
11
|
);
|
|
22
12
|
export {
|
|
23
|
-
|
|
13
|
+
p as NoopTracerProvider
|
|
24
14
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function r() {
|
|
6
|
-
}
|
|
7
|
-
return r.prototype.getTracer = function(e, n, t) {
|
|
8
|
-
return new o();
|
|
9
|
-
}, r;
|
|
10
|
-
})()
|
|
11
|
-
);
|
|
1
|
+
var N;
|
|
2
|
+
(function(E) {
|
|
3
|
+
E[E.NONE = 0] = "NONE", E[E.SAMPLED = 1] = "SAMPLED";
|
|
4
|
+
})(N || (N = {}));
|
|
12
5
|
export {
|
|
13
|
-
|
|
6
|
+
N as TraceFlags
|
|
14
7
|
};
|
|
@@ -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
|
};
|