@effect-app/vue-components 0.23.0 → 0.23.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.
@@ -14,10 +14,18 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
14
14
  schema: S.Schema<To, From, never>;
15
15
  }) & ({
16
16
  isLoading: boolean;
17
- onSubmit: (value: To, meta: any, formApi: import("./OmegaFormStuff").OmegaFormParams<From, To>) => void;
17
+ onSubmit: (value: To, extra: Pick<{
18
+ formApi: import("./OmegaFormStuff").OmegaFormParams<From, To>;
19
+ meta: any;
20
+ value: To;
21
+ }, "formApi" | "meta">) => void;
18
22
  } | {
19
23
  isLoading?: undefined;
20
- onSubmit?: (value: To, meta: any, formApi: import("./OmegaFormStuff").OmegaFormParams<From, To>) => ReturnType<(props: {
24
+ onSubmit?: (value: To, extra: Pick<{
25
+ formApi: import("./OmegaFormStuff").OmegaFormParams<From, To>;
26
+ meta: any;
27
+ value: To;
28
+ }, "formApi" | "meta">) => ReturnType<(props: {
21
29
  formApi: import("./OmegaFormStuff").OmegaFormParams<From, To>;
22
30
  meta: any;
23
31
  value: To;
@@ -1,8 +1,8 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-b77e8ae3]{display:contents}fieldset[disabled][data-v-b77e8ae3]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-b77e8ae3]{display:contents}fieldset[disabled][data-v-b77e8ae3]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-d1710c8c]{display:contents}fieldset[disabled][data-v-d1710c8c]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(c,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-d1710c8c]{display:contents}fieldset[disabled][data-v-d1710c8c]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,c,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  import o from "./vue-components.es20.js";
3
3
 
4
4
  import r from "./vue-components.es17.js";
5
- const t = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b77e8ae3"]]);
5
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d1710c8c"]]);
6
6
  export {
7
- t as default
7
+ m as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as B, getCurrentInstance as F, computed as l, onBeforeMount as L, watch as S, createElementBlock as O, openBlock as h, withModifiers as C, createElementVNode as V, unref as m, renderSlot as b, createCommentVNode as k, Fragment as _ } from "vue";
1
+ import { defineComponent as B, getCurrentInstance as F, computed as u, onBeforeMount as L, watch as S, createElementBlock as O, openBlock as h, withModifiers as C, createElementVNode as V, unref as m, renderSlot as p, createCommentVNode as k, Fragment as _ } from "vue";
2
2
  import { useStore as y } from "@tanstack/vue-form";
3
3
  import { getOmegaStore as $ } from "./vue-components.es27.js";
4
4
  import { provideOmegaErrors as A } from "./vue-components.es8.js";
@@ -27,19 +27,19 @@ const P = ["disabled"], H = /* @__PURE__ */ B({
27
27
  onSubmit: {}
28
28
  },
29
29
  setup(w) {
30
- const o = w, E = F(), j = (e, r, n) => new Promise((t) => {
31
- E.emit("submit", e, r, n);
32
- const i = S(() => o.isLoading, (u) => {
33
- u || (t(), i.stop());
30
+ const o = w, E = F(), j = (e, r) => new Promise((n) => {
31
+ E.emit("submit", e, r);
32
+ const t = S(() => o.isLoading, (i) => {
33
+ i || (n(), t.stop());
34
34
  });
35
- }), v = typeof o.isLoading < "u" ? l(() => j) : typeof o.onSubmit < "u" ? l(() => o.onSubmit) : void 0, f = v?.value ? ({ formApi: e, meta: r, value: n }) => v.value(n, r, e) : void 0, c = o.form || !o.schema ? void 0 : K(
35
+ }), b = typeof o.isLoading < "u" ? u(() => j) : typeof o.onSubmit < "u" ? u(() => o.onSubmit) : void 0, l = b?.value ? ({ formApi: e, meta: r, value: n }) => b.value(n, { meta: r, formApi: e }) : void 0, f = o.form || !o.schema ? void 0 : K(
36
36
  o.schema,
37
37
  {
38
38
  ...o,
39
- onSubmit: f
39
+ onSubmit: l
40
40
  },
41
41
  o.omegaConfig
42
- ), s = l(() => o.form ?? c);
42
+ ), s = u(() => o.form ?? f);
43
43
  L(() => {
44
44
  if (!o.form) return;
45
45
  const e = Object.keys(o.form.options || {}), r = /* @__PURE__ */ new Set([
@@ -51,7 +51,7 @@ const P = ["disabled"], H = /* @__PURE__ */ B({
51
51
  "schema"
52
52
  ]), n = Object.fromEntries(
53
53
  Object.entries(o).filter(
54
- ([a, p]) => a === "isLoading" ? !1 : !r.has(a) && p !== void 0
54
+ ([a, d]) => a === "isLoading" ? !1 : !r.has(a) && d !== void 0
55
55
  )
56
56
  ), t = Object.keys(n), i = e.filter(
57
57
  (a) => t.includes(a) && n[a] !== void 0
@@ -64,31 +64,31 @@ ${i.join(
64
64
  )}.
65
65
  Props will overwrite existing form options. This might indicate a configuration issue.`
66
66
  );
67
- const u = {
67
+ const g = {
68
68
  ...s.value.options,
69
69
  ...n
70
70
  };
71
- f && (u.onSubmit = f), s.value.options = Object.fromEntries(
71
+ l && (g.onSubmit = l), s.value.options = Object.fromEntries(
72
72
  // TODO
73
- Object.entries(u).filter(
74
- ([a, p]) => p !== void 0
73
+ Object.entries(g).filter(
74
+ ([a, d]) => d !== void 0
75
75
  )
76
76
  );
77
77
  });
78
78
  const I = y(
79
79
  s.value.store,
80
80
  (e) => e.isSubmitting
81
- ), g = $(
81
+ ), v = $(
82
82
  s.value,
83
83
  o.subscribe
84
84
  ), M = y(
85
85
  s.value.store,
86
86
  (e) => e.submissionAttempts
87
- ), d = l(() => s.value.useStore((e) => e.errors));
87
+ ), c = u(() => s.value.useStore((e) => e.errors));
88
88
  return S(
89
- () => [s.value.filterItems, d.value.value],
89
+ () => [s.value.filterItems, c.value.value],
90
90
  () => {
91
- const e = s.value.filterItems, r = d.value.value;
91
+ const e = s.value.filterItems, r = c.value.value;
92
92
  return e ? r ? (Object.values(r).filter(
93
93
  (t) => !!t
94
94
  ).flatMap(
@@ -105,18 +105,18 @@ Props will overwrite existing form options. This might indicate a configuration
105
105
  });
106
106
  }), {}) : {} : {};
107
107
  }
108
- ), A(M, d.value, o.showErrorsOn), (e, r) => (h(), O("form", {
108
+ ), A(M, c.value, o.showErrorsOn), (e, r) => (h(), O("form", {
109
109
  novalidate: "",
110
110
  onSubmit: r[0] || (r[0] = C((n) => s.value.handleSubmit(), ["prevent", "stop"]))
111
111
  }, [
112
112
  V("fieldset", { disabled: m(I) }, [
113
113
  o.form ? (h(), O(_, { key: 0 }, [
114
- b(e.$slots, "externalForm", { subscribedValues: m(g) }, void 0, !0),
115
- b(e.$slots, "default", {}, void 0, !0)
116
- ], 64)) : m(c) ? b(e.$slots, "internalForm", {
114
+ p(e.$slots, "externalForm", { subscribedValues: m(v) }, void 0, !0),
115
+ p(e.$slots, "default", {}, void 0, !0)
116
+ ], 64)) : m(f) ? p(e.$slots, "internalForm", {
117
117
  key: 1,
118
- form: m(c),
119
- subscribedValues: m(g)
118
+ form: m(f),
119
+ subscribedValues: m(v)
120
120
  }, void 0, !0) : k("", !0)
121
121
  ], 8, P)
122
122
  ], 32));
@@ -1,5 +1,5 @@
1
1
  import { Exit as c, Runtime as s } from "effect";
2
- import { dual as n, isFunction as m } from "./vue-components.es28.js";
2
+ import { dual as n, isFunction as m } from "./vue-components.es26.js";
3
3
  const i = Symbol.for("clone-trait"), u = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
4
4
  n(2, (e, t) => u(e, { ...e, ...m(t) ? t(e) : t }));
5
5
  const b = (e) => new Promise((t, r) => e.addObserver((o) => {
@@ -1,4 +1,4 @@
1
- import { isFunction as c } from "./vue-components.es28.js";
1
+ import { isFunction as c } from "./vue-components.es26.js";
2
2
  const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
3
3
  export {
4
4
  s as isFunction,
@@ -1,92 +1,44 @@
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 { defineComponent as w, getCurrentInstance as x, useId as C, computed as a, watch as f, nextTick as N, onMounted as d, ref as $, watchEffect as k, renderSlot as B, normalizeProps as I, guardReactiveProps as O, createElementVNode as _, normalizeClass as q, createBlock as L, createCommentVNode as P, unref as F, openBlock as S, mergeProps as T } from "vue";
3
- import { useStore as z } from "@tanstack/vue-form";
4
- import { useOmegaErrors as A } from "./vue-components.es8.js";
5
- import D from "./vue-components.es48.js";
6
-
7
- const J = /* @__PURE__ */ w({
8
- inheritAttrs: !1,
9
- __name: "OmegaInternalInput",
10
- props: {
11
- field: {},
12
- meta: {},
13
- label: {},
14
- options: {},
15
- type: {},
16
- validators: {}
17
- },
18
- setup(c) {
19
- const e = c, v = x()?.appContext.components.VTextField, l = C(), o = e.field, r = z(o.store, (t) => t), m = a(() => e.type ? e.type : e.meta?.type === "string" ? e.meta.format === "email" ? "email" : "string" : e.meta?.type || "unknown"), n = a(() => r.value.value), g = a(
20
- () => (
21
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
- r.value.meta.errors.map((t) => t?.message).filter(Boolean)
23
- )
24
- ), y = (t) => t == null || t === !1 || t === "" || Number.isNaN(t);
25
- f(
26
- () => !!n.value,
27
- () => {
28
- y(n.value) && e.meta?.type !== "boolean" && N(() => {
29
- o.setValue(
30
- e.meta?.nullableOrUndefined === "undefined" ? void 0 : null
31
- );
32
- });
33
- }
34
- ), d(() => {
35
- !n.value && !e.meta?.required && e.meta?.nullableOrUndefined === "null" && o.setValue(null);
36
- });
37
- const { addError: h, removeError: b, showErrors: E, showErrorsOn: V } = A(), s = $(!1);
38
- k(() => {
39
- (E.value || V === "onChange") && (s.value = !0);
40
- });
41
- const u = () => {
42
- s.value = !0;
43
- };
44
- d(() => {
45
- n.value && u();
46
- });
47
- const p = a(() => !s.value && m.value !== "select" ? [] : g.value);
48
- f(
49
- () => r.value.meta.errors,
50
- () => {
51
- r.value.meta.errors.length ? h({
52
- inputId: l,
53
- errors: r.value.meta.errors.map((t) => t.message).filter(Boolean),
54
- label: e.label
55
- }) : b(l);
56
- }
57
- );
58
- const i = a(() => ({
59
- id: l,
60
- required: e.meta?.required,
61
- minLength: e.meta?.type === "string" && e.meta?.minLength,
62
- maxLength: e.meta?.type === "string" && e.meta?.maxLength,
63
- max: e.meta?.type === "number" && e.meta?.maximum,
64
- min: e.meta?.type === "number" && e.meta?.minimum,
65
- name: e.field.name,
66
- modelValue: e.field.state.value,
67
- errorMessages: p.value,
68
- error: !!p.value.length,
69
- field: e.field,
70
- setRealDirty: u,
71
- type: m.value,
72
- label: `${e.label}${e.meta?.required ? " *" : ""}`,
73
- options: e.options
74
- }));
75
- return (t, R) => B(t.$slots, "default", I(O(i.value)), () => [
76
- _("div", {
77
- class: q(t.$attrs.class),
78
- onFocusout: u
79
- }, [
80
- F(v) ? (S(), L(D, T({
81
- key: 0,
82
- "input-props": i.value
83
- }, t.$attrs, {
84
- "vuetify-value": i.value.field.state.value
85
- }), null, 16, ["input-props", "vuetify-value"])) : P("", !0)
86
- ], 34)
87
- ]);
1
+ const f = (c) => typeof c == "function", a = function(c, r) {
2
+ switch (c) {
3
+ case 0:
4
+ case 1:
5
+ throw new RangeError(`Invalid arity ${c}`);
6
+ case 2:
7
+ return function(n, t) {
8
+ return arguments.length >= 2 ? r(n, t) : function(e) {
9
+ return r(e, n);
10
+ };
11
+ };
12
+ case 3:
13
+ return function(n, t, e) {
14
+ return arguments.length >= 3 ? r(n, t, e) : function(u) {
15
+ return r(u, n, t);
16
+ };
17
+ };
18
+ case 4:
19
+ return function(n, t, e, u) {
20
+ return arguments.length >= 4 ? r(n, t, e, u) : function(i) {
21
+ return r(i, n, t, e);
22
+ };
23
+ };
24
+ case 5:
25
+ return function(n, t, e, u, i) {
26
+ return arguments.length >= 5 ? r(n, t, e, u, i) : function(s) {
27
+ return r(s, n, t, e, u);
28
+ };
29
+ };
30
+ default:
31
+ return function() {
32
+ if (arguments.length >= c)
33
+ return r.apply(this, arguments);
34
+ const n = arguments;
35
+ return function(t) {
36
+ return r(t, ...n);
37
+ };
38
+ };
88
39
  }
89
- });
40
+ };
90
41
  export {
91
- J as default
42
+ a as dual,
43
+ f as isFunction
92
44
  };
@@ -1,44 +1,92 @@
1
- const f = (c) => typeof c == "function", a = function(c, r) {
2
- switch (c) {
3
- case 0:
4
- case 1:
5
- throw new RangeError(`Invalid arity ${c}`);
6
- case 2:
7
- return function(n, t) {
8
- return arguments.length >= 2 ? r(n, t) : function(e) {
9
- return r(e, n);
10
- };
11
- };
12
- case 3:
13
- return function(n, t, e) {
14
- return arguments.length >= 3 ? r(n, t, e) : function(u) {
15
- return r(u, n, t);
16
- };
17
- };
18
- case 4:
19
- return function(n, t, e, u) {
20
- return arguments.length >= 4 ? r(n, t, e, u) : function(i) {
21
- return r(i, n, t, e);
22
- };
23
- };
24
- case 5:
25
- return function(n, t, e, u, i) {
26
- return arguments.length >= 5 ? r(n, t, e, u, i) : function(s) {
27
- return r(s, n, t, e, u);
28
- };
29
- };
30
- default:
31
- return function() {
32
- if (arguments.length >= c)
33
- return r.apply(this, arguments);
34
- const n = arguments;
35
- return function(t) {
36
- return r(t, ...n);
37
- };
38
- };
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 { defineComponent as w, getCurrentInstance as x, useId as C, computed as a, watch as f, nextTick as N, onMounted as d, ref as $, watchEffect as k, renderSlot as B, normalizeProps as I, guardReactiveProps as O, createElementVNode as _, normalizeClass as q, createBlock as L, createCommentVNode as P, unref as F, openBlock as S, mergeProps as T } from "vue";
3
+ import { useStore as z } from "@tanstack/vue-form";
4
+ import { useOmegaErrors as A } from "./vue-components.es8.js";
5
+ import D from "./vue-components.es51.js";
6
+
7
+ const J = /* @__PURE__ */ w({
8
+ inheritAttrs: !1,
9
+ __name: "OmegaInternalInput",
10
+ props: {
11
+ field: {},
12
+ meta: {},
13
+ label: {},
14
+ options: {},
15
+ type: {},
16
+ validators: {}
17
+ },
18
+ setup(c) {
19
+ const e = c, v = x()?.appContext.components.VTextField, l = C(), o = e.field, r = z(o.store, (t) => t), m = a(() => e.type ? e.type : e.meta?.type === "string" ? e.meta.format === "email" ? "email" : "string" : e.meta?.type || "unknown"), n = a(() => r.value.value), g = a(
20
+ () => (
21
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
+ r.value.meta.errors.map((t) => t?.message).filter(Boolean)
23
+ )
24
+ ), y = (t) => t == null || t === !1 || t === "" || Number.isNaN(t);
25
+ f(
26
+ () => !!n.value,
27
+ () => {
28
+ y(n.value) && e.meta?.type !== "boolean" && N(() => {
29
+ o.setValue(
30
+ e.meta?.nullableOrUndefined === "undefined" ? void 0 : null
31
+ );
32
+ });
33
+ }
34
+ ), d(() => {
35
+ !n.value && !e.meta?.required && e.meta?.nullableOrUndefined === "null" && o.setValue(null);
36
+ });
37
+ const { addError: h, removeError: b, showErrors: E, showErrorsOn: V } = A(), s = $(!1);
38
+ k(() => {
39
+ (E.value || V === "onChange") && (s.value = !0);
40
+ });
41
+ const u = () => {
42
+ s.value = !0;
43
+ };
44
+ d(() => {
45
+ n.value && u();
46
+ });
47
+ const p = a(() => !s.value && m.value !== "select" ? [] : g.value);
48
+ f(
49
+ () => r.value.meta.errors,
50
+ () => {
51
+ r.value.meta.errors.length ? h({
52
+ inputId: l,
53
+ errors: r.value.meta.errors.map((t) => t.message).filter(Boolean),
54
+ label: e.label
55
+ }) : b(l);
56
+ }
57
+ );
58
+ const i = a(() => ({
59
+ id: l,
60
+ required: e.meta?.required,
61
+ minLength: e.meta?.type === "string" && e.meta?.minLength,
62
+ maxLength: e.meta?.type === "string" && e.meta?.maxLength,
63
+ max: e.meta?.type === "number" && e.meta?.maximum,
64
+ min: e.meta?.type === "number" && e.meta?.minimum,
65
+ name: e.field.name,
66
+ modelValue: e.field.state.value,
67
+ errorMessages: p.value,
68
+ error: !!p.value.length,
69
+ field: e.field,
70
+ setRealDirty: u,
71
+ type: m.value,
72
+ label: `${e.label}${e.meta?.required ? " *" : ""}`,
73
+ options: e.options
74
+ }));
75
+ return (t, R) => B(t.$slots, "default", I(O(i.value)), () => [
76
+ _("div", {
77
+ class: q(t.$attrs.class),
78
+ onFocusout: u
79
+ }, [
80
+ F(v) ? (S(), L(D, T({
81
+ key: 0,
82
+ "input-props": i.value
83
+ }, t.$attrs, {
84
+ "vuetify-value": i.value.field.state.value
85
+ }), null, 16, ["input-props", "vuetify-value"])) : P("", !0)
86
+ ], 34)
87
+ ]);
39
88
  }
40
- };
89
+ });
41
90
  export {
42
- a as dual,
43
- f as isFunction
91
+ J as default
44
92
  };
@@ -1,5 +1,5 @@
1
1
  import { ContextAPI as l } from "./vue-components.es39.js";
2
- import { getSpanContext as m, setSpan as d } from "./vue-components.es46.js";
2
+ import { getSpanContext as m, setSpan as d } from "./vue-components.es45.js";
3
3
  import { NonRecordingSpan as p } from "./vue-components.es38.js";
4
4
  import { isSpanContextValid as S } from "./vue-components.es36.js";
5
5
  var f = l.getInstance(), I = (
@@ -1,6 +1,6 @@
1
- import { NoopContextManager as f } from "./vue-components.es47.js";
2
- import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es45.js";
3
- import { DiagAPI as u } from "./vue-components.es42.js";
1
+ import { NoopContextManager as f } from "./vue-components.es46.js";
2
+ import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es44.js";
3
+ import { DiagAPI as u } from "./vue-components.es41.js";
4
4
  var y = function(t, e) {
5
5
  var a = typeof Symbol == "function" && t[Symbol.iterator];
6
6
  if (!a) return t;
@@ -1,8 +1,8 @@
1
- import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es45.js";
1
+ import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es44.js";
2
2
  import { ProxyTracerProvider as i } from "./vue-components.es33.js";
3
3
  import { wrapSpanContext as c, isSpanContextValid as h } from "./vue-components.es36.js";
4
- import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es46.js";
5
- import { DiagAPI as o } from "./vue-components.es42.js";
4
+ import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es45.js";
5
+ import { DiagAPI as o } from "./vue-components.es41.js";
6
6
  var n = "trace", y = (
7
7
  /** @class */
8
8
  (function() {
@@ -1,4 +1,67 @@
1
- import f from "./vue-components.es26.js";
1
+ import { DiagComponentLogger as m } from "./vue-components.es42.js";
2
+ import { createLogLevelDiagLogger as y } from "./vue-components.es43.js";
3
+ import { DiagLogLevel as d } from "./vue-components.es30.js";
4
+ import { unregisterGlobal as p, getGlobal as v, registerGlobal as w } from "./vue-components.es44.js";
5
+ var b = function(i, n) {
6
+ var r = typeof Symbol == "function" && i[Symbol.iterator];
7
+ if (!r) return i;
8
+ var t = r.call(i), a, e = [], o;
9
+ try {
10
+ for (; (n === void 0 || n-- > 0) && !(a = t.next()).done; ) e.push(a.value);
11
+ } catch (l) {
12
+ o = { error: l };
13
+ } finally {
14
+ try {
15
+ a && !a.done && (r = t.return) && r.call(t);
16
+ } finally {
17
+ if (o) throw o.error;
18
+ }
19
+ }
20
+ return e;
21
+ }, _ = function(i, n, r) {
22
+ if (r || arguments.length === 2) for (var t = 0, a = n.length, e; t < a; t++)
23
+ (e || !(t in n)) && (e || (e = Array.prototype.slice.call(n, 0, t)), e[t] = n[t]);
24
+ return i.concat(e || Array.prototype.slice.call(n));
25
+ }, h = "diag", P = (
26
+ /** @class */
27
+ (function() {
28
+ function i() {
29
+ function n(a) {
30
+ return function() {
31
+ for (var e = [], o = 0; o < arguments.length; o++)
32
+ e[o] = arguments[o];
33
+ var l = v("diag");
34
+ if (l)
35
+ return l[a].apply(l, _([], b(e), !1));
36
+ };
37
+ }
38
+ var r = this, t = function(a, e) {
39
+ var o, l, g;
40
+ if (e === void 0 && (e = { logLevel: d.INFO }), a === r) {
41
+ var u = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
42
+ return r.error((o = u.stack) !== null && o !== void 0 ? o : u.message), !1;
43
+ }
44
+ typeof e == "number" && (e = {
45
+ logLevel: e
46
+ });
47
+ var f = v("diag"), s = y((l = e.logLevel) !== null && l !== void 0 ? l : d.INFO, a);
48
+ if (f && !e.suppressOverrideMessage) {
49
+ var c = (g = new Error().stack) !== null && g !== void 0 ? g : "<failed to generate stacktrace>";
50
+ f.warn("Current logger will be overwritten from " + c), s.warn("Current logger will overwrite one already registered from " + c);
51
+ }
52
+ return w("diag", s, r, !0);
53
+ };
54
+ r.setLogger = t, r.disable = function() {
55
+ p(h, r);
56
+ }, r.createComponentLogger = function(a) {
57
+ return new m(a);
58
+ }, r.verbose = n("verbose"), r.debug = n("debug"), r.info = n("info"), r.warn = n("warn"), r.error = n("error");
59
+ }
60
+ return i.instance = function() {
61
+ return this._instance || (this._instance = new i()), this._instance;
62
+ }, i;
63
+ })()
64
+ );
2
65
  export {
3
- f as default
66
+ P as DiagAPI
4
67
  };