@scalar/api-client 2.3.1 → 2.3.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/DataTable/DataTableHeader.vue.js +9 -9
  3. package/dist/components/DataTable/DataTableRow.vue.d.ts.map +1 -1
  4. package/dist/components/DataTable/DataTableRow.vue.js +8 -8
  5. package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
  6. package/dist/components/Server/ServerDropdown.vue.js +49 -38
  7. package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
  8. package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
  9. package/dist/components/Server/ServerDropdownItem.vue2.js +49 -46
  10. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +7 -7
  11. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +3 -3
  12. package/dist/store/active-entities.d.ts.map +1 -1
  13. package/dist/store/active-entities.js +69 -64
  14. package/dist/style.css +1 -1
  15. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  16. package/dist/views/Request/RequestRoot.vue.js +1 -1
  17. package/dist/views/Request/RequestRoot.vue2.js +71 -64
  18. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  19. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  20. package/dist/views/Request/RequestSection/RequestTable.vue2.js +120 -96
  21. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  22. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  23. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +32 -27
  24. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  25. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cA8M8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAiQjE,wBAMG"}
1
+ {"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cAyN8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA+QjE,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestRoot.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1dfc8727"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fb90f3bc"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,96 +1,103 @@
1
- import { defineComponent as W, ref as N, computed as j, onMounted as L, onBeforeUnmount as M, watch as $, openBlock as m, createElementBlock as H, normalizeClass as w, unref as o, createBlock as O, isRef as Q, createCommentVNode as V, createElementVNode as _, createVNode as F } from "vue";
2
- import { isDefined as G } from "@scalar/oas-utils/helpers";
3
- import { safeJSON as K } from "@scalar/object-utils/parse";
4
- import { useToasts as X } from "@scalar/use-toasts";
5
- import { RouterView as Y } from "vue-router";
6
- import Z from "../../components/Sidebar/SidebarToggle.vue.js";
7
- import { useSidebar as ee } from "../../hooks/useSidebar.js";
8
- import { validateParameters as te } from "../../libs/validate-parameters.js";
9
- import { useActiveEntities as oe } from "../../store/active-entities.js";
10
- import { useOpenApiWatcher as re } from "./hooks/useOpenApiWatcher.js";
11
- import se from "./RequestSidebar.vue.js";
12
- import { createRequestOperation as ae } from "../../libs/send-request/create-request-operation.js";
13
- import { ERRORS as le } from "../../libs/errors.js";
14
- import { useWorkspace as ne } from "../../store/store.js";
1
+ import { defineComponent as L, ref as f, computed as M, onMounted as w, onBeforeUnmount as $, watch as H, openBlock as d, createElementBlock as Q, normalizeClass as O, unref as o, createBlock as V, isRef as F, createCommentVNode as U, createElementVNode as C, createVNode as G } from "vue";
2
+ import { isDefined as K } from "@scalar/oas-utils/helpers";
3
+ import { safeJSON as X } from "@scalar/object-utils/parse";
4
+ import { useToasts as Y } from "@scalar/use-toasts";
5
+ import { RouterView as Z } from "vue-router";
6
+ import ee from "../../components/Sidebar/SidebarToggle.vue.js";
7
+ import { useSidebar as te } from "../../hooks/useSidebar.js";
8
+ import { validateParameters as oe } from "../../libs/validate-parameters.js";
9
+ import { useActiveEntities as re } from "../../store/active-entities.js";
10
+ import { useOpenApiWatcher as se } from "./hooks/useOpenApiWatcher.js";
11
+ import ae from "./RequestSidebar.vue.js";
12
+ import { createRequestOperation as le } from "../../libs/send-request/create-request-operation.js";
13
+ import { ERRORS as ne } from "../../libs/errors.js";
14
+ import { useWorkspace as ue } from "../../store/store.js";
15
15
  import { useLayout as ie } from "../../hooks/useLayout.js";
16
- const ue = { class: "flex h-full" }, ce = { class: "flex h-full flex-1 flex-col" }, Oe = /* @__PURE__ */ W({
16
+ const ce = { class: "flex h-full" }, me = { class: "flex h-full flex-1 flex-col" }, Oe = /* @__PURE__ */ L({
17
17
  __name: "RequestRoot",
18
18
  emits: ["newTab"],
19
- setup(me) {
20
- const U = ne(), { toast: f } = X(), { layout: n } = ie(), {
21
- activeCollection: i,
22
- activeExample: a,
23
- activeEnvironment: d,
24
- activeRequest: u,
25
- activeWorkspace: v,
26
- activeServer: C
27
- } = oe(), { cookies: T, requestHistory: g, showSidebar: p, securitySchemes: A, events: l } = U, { isSidebarOpen: r } = ee(), S = N(), c = N(/* @__PURE__ */ new Set()), B = j(
19
+ setup(fe) {
20
+ const T = ue(), { toast: v } = Y(), { layout: a } = ie(), {
21
+ activeCollection: u,
22
+ activeExample: l,
23
+ activeEnvironment: p,
24
+ activeRequest: i,
25
+ activeWorkspace: S,
26
+ activeServer: g
27
+ } = re(), { cookies: A, requestHistory: B, showSidebar: R, securitySchemes: D, events: n } = T, { isSidebarOpen: r } = te(), c = f(), b = f(), m = f(/* @__PURE__ */ new Set()), P = M(
28
28
  () => {
29
29
  var e, t;
30
- return (n === "modal" ? (e = i.value) == null ? void 0 : e.selectedSecuritySchemeUids : (t = u.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
30
+ return (a === "modal" ? (e = u.value) == null ? void 0 : e.selectedSecuritySchemeUids : (t = i.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
31
31
  }
32
- ), R = async () => {
33
- var q, h, E, k;
34
- if (!u.value || !a.value || !i.value)
32
+ ), x = async () => {
33
+ var k, E, N, _;
34
+ if (!i.value || !l.value || !u.value)
35
35
  return;
36
- c.value = te(a.value);
37
- const e = typeof d.value == "object" ? d.value.value : "{}", t = K.parse(e);
36
+ m.value = oe(l.value);
37
+ const e = typeof p.value == "object" ? p.value.value : "{}", t = X.parse(e);
38
38
  t.error && console.error("INVALID ENVIRONMENT!");
39
- const s = t.error || typeof t.data != "object" ? {} : t.data ?? {}, P = ((q = v.value) == null ? void 0 : q.cookies.map((J) => T[J]).filter(G)) ?? [], z = ((E = (h = i.value) == null ? void 0 : h.info) == null ? void 0 : E.title) === "Drafts" ? void 0 : C.value, [x, b] = ae({
40
- request: u.value,
41
- example: a.value,
42
- selectedSecuritySchemeUids: B.value,
43
- proxyUrl: ((k = v.value) == null ? void 0 : k.proxyUrl) ?? "",
39
+ const s = t.error || typeof t.data != "object" ? {} : t.data ?? {}, I = ((k = S.value) == null ? void 0 : k.cookies.map((j) => A[j]).filter(K)) ?? [], J = ((N = (E = u.value) == null ? void 0 : E.info) == null ? void 0 : N.title) === "Drafts" ? void 0 : g.value, [y, q] = le({
40
+ request: i.value,
41
+ example: l.value,
42
+ selectedSecuritySchemeUids: P.value,
43
+ proxyUrl: ((_ = S.value) == null ? void 0 : _.proxyUrl) ?? "",
44
44
  environment: s,
45
- globalCookies: P,
46
- status: l.requestStatus,
47
- securitySchemes: A,
48
- server: z
45
+ globalCookies: I,
46
+ status: n.requestStatus,
47
+ securitySchemes: D,
48
+ server: J
49
49
  });
50
- if (x) {
51
- f(x.message, "error");
50
+ if (y) {
51
+ v(y.message, "error");
52
52
  return;
53
53
  }
54
- S.value = b.controller;
55
- const [y, I] = await b.sendRequest();
56
- y ? f(y.message, "error") : g.push(JSON.parse(JSON.stringify(I)));
57
- }, D = async () => {
54
+ b.value = q.controller;
55
+ const [h, W] = await q.sendRequest();
56
+ h ? v(h.message, "error") : B.push(JSON.parse(JSON.stringify(W)));
57
+ }, z = async () => {
58
58
  var e;
59
- return (e = S.value) == null ? void 0 : e.abort(le.REQUEST_ABORTED);
59
+ return (e = b.value) == null ? void 0 : e.abort(ne.REQUEST_ABORTED);
60
60
  };
61
- return L(() => {
62
- l.executeRequest.on(R), l.cancelRequest.on(D);
63
- }), re(), M(() => l.executeRequest.off(R)), $(
61
+ return w(() => {
62
+ n.executeRequest.on(x), n.cancelRequest.on(z);
63
+ }), w(() => {
64
+ if (c.value && a === "modal") {
65
+ const e = c.value.querySelector("button");
66
+ e && e.focus();
67
+ }
68
+ }), se(), $(() => n.executeRequest.off(x)), H(
64
69
  () => {
65
70
  var e;
66
- return (e = a.value) == null ? void 0 : e.parameters;
71
+ return (e = l.value) == null ? void 0 : e.parameters;
67
72
  },
68
73
  () => {
69
- c.value.clear();
74
+ m.value.clear();
70
75
  },
71
76
  { deep: !0 }
72
- ), (e, t) => (m(), H("div", {
73
- class: w(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
74
- "!mb-0 !mr-0 !border-0": o(n) === "modal"
77
+ ), (e, t) => (d(), Q("div", {
78
+ ref_key: "element",
79
+ ref: c,
80
+ class: O(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
81
+ "!mb-0 !mr-0 !border-0": o(a) === "modal"
75
82
  }])
76
83
  }, [
77
- o(p) ? (m(), O(Z, {
84
+ o(R) ? (d(), V(ee, {
78
85
  key: 0,
79
86
  modelValue: o(r),
80
- "onUpdate:modelValue": t[0] || (t[0] = (s) => Q(r) ? r.value = s : null),
81
- class: w(["absolute left-3 top-2 z-50", [
87
+ "onUpdate:modelValue": t[0] || (t[0] = (s) => F(r) ? r.value = s : null),
88
+ class: O(["absolute left-3 top-2 z-50", [
82
89
  { hidden: o(r) },
83
90
  { "xl:!flex": !o(r) },
84
- { "!flex": o(n) === "modal" }
91
+ { "!flex": o(a) === "modal" }
85
92
  ]])
86
- }, null, 8, ["modelValue", "class"])) : V("", !0),
87
- _("div", ue, [
88
- o(p) ? (m(), O(se, {
93
+ }, null, 8, ["modelValue", "class"])) : U("", !0),
94
+ C("div", ce, [
95
+ o(R) ? (d(), V(ae, {
89
96
  key: 0,
90
97
  onNewTab: t[1] || (t[1] = (s) => e.$emit("newTab", s))
91
- })) : V("", !0),
92
- _("div", ce, [
93
- F(o(Y), { invalidParams: c.value }, null, 8, ["invalidParams"])
98
+ })) : U("", !0),
99
+ C("div", me, [
100
+ G(o(Z), { invalidParams: m.value }, null, 8, ["invalidParams"])
94
101
  ])
95
102
  ])
96
103
  ], 2));
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAmPA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAOlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,CAAC,uBAAuB,GAAG;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC,EAAE,CAAA;IAClE,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC5B,CAAC;;;;;;;;;;;;;;;;;;;;yBARsB,OAAO;sBACV,OAAO;cACf,OAAO;gBACL,OAAO;;AA6exB,wBASG"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAyPA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAQlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,CAAC,uBAAuB,GAAG;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC,EAAE,CAAA;IAClE,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC5B,CAAC;;;;;;;;;;;;;;;;;;;;yBARsB,OAAO;sBACV,OAAO;cACf,OAAO;gBACL,OAAO;;AA+gBxB,wBASG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cabdb6a1"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7f27d2f7"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,16 +1,17 @@
1
- import { defineComponent as _, resolveComponent as $, openBlock as r, createBlock as p, withCtx as t, createElementBlock as m, Fragment as f, renderList as I, normalizeClass as y, unref as u, createElementVNode as s, createVNode as d, toDisplayString as w, createCommentVNode as V } from "vue";
2
- import { ScalarTooltip as T, ScalarIcon as g, ScalarButton as z } from "@scalar/components";
3
- import x from "../../../components/CodeInput/CodeInput.vue.js";
4
- import D from "../../../components/DataTable/DataTable.vue.js";
1
+ import { defineComponent as I, resolveComponent as z, openBlock as d, createBlock as p, withCtx as n, createVNode as t, createElementVNode as s, createTextVNode as w, createElementBlock as m, Fragment as f, renderList as D, normalizeClass as V, unref as i, toDisplayString as x, createCommentVNode as g } from "vue";
2
+ import { ScalarTooltip as E, ScalarIcon as B, ScalarButton as q } from "@scalar/components";
3
+ import R from "../../../components/CodeInput/CodeInput.vue.js";
4
+ import G from "../../../components/DataTable/DataTable.vue.js";
5
5
  import v from "../../../components/DataTable/DataTableCell.vue.js";
6
- import q from "../../../components/DataTable/DataTableCheckbox.vue.js";
7
- import E from "../../../components/DataTable/DataTableRow.vue.js";
8
- import { parameterIsInvalid as G, hasItemProperties as B } from "../libs/request.js";
9
- import P from "./RequestTableTooltip.vue.js";
10
- const j = { class: "contents" }, L = { class: "sr-only" }, N = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, O = ["onClick"], A = {
6
+ import N from "../../../components/DataTable/DataTableCheckbox.vue.js";
7
+ import k from "../../../components/DataTable/DataTableHeader.vue.js";
8
+ import C from "../../../components/DataTable/DataTableRow.vue.js";
9
+ import { parameterIsInvalid as P, hasItemProperties as h } from "../libs/request.js";
10
+ import j from "./RequestTableTooltip.vue.js";
11
+ const L = { class: "contents" }, O = { class: "sr-only" }, A = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, K = ["onClick"], H = {
11
12
  key: 1,
12
13
  class: "p-0.5"
13
- }, ee = /* @__PURE__ */ _({
14
+ }, oe = /* @__PURE__ */ I({
14
15
  __name: "RequestTable",
15
16
  props: {
16
17
  items: {},
@@ -24,48 +25,71 @@ const j = { class: "contents" }, L = { class: "sr-only" }, N = { class: "text-c-
24
25
  invalidParams: {}
25
26
  },
26
27
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
27
- setup(h, { emit: R }) {
28
- const c = h, n = R, C = ["", "", "36px"], k = (l, a, b) => {
29
- n("updateRow", l, a, b);
30
- }, F = (l) => {
31
- n("uploadFile", l);
32
- }, U = (l) => Array.isArray(l.default) && l.default.length === 1 ? l.default[0] : l.default;
33
- return (l, a) => {
34
- const b = $("RouterLink");
35
- return r(), p(D, {
28
+ setup(F, { emit: U }) {
29
+ const b = F, r = U, S = ["", "", "36px"], y = (a, e, c) => {
30
+ r("updateRow", a, e, c);
31
+ }, _ = (a) => {
32
+ r("uploadFile", a);
33
+ }, $ = (a) => Array.isArray(a.default) && a.default.length === 1 ? a.default[0] : a.default;
34
+ return (a, e) => {
35
+ const c = z("RouterLink");
36
+ return d(), p(G, {
36
37
  class: "group/table flex-1",
37
- columns: C
38
+ columns: S
38
39
  }, {
39
- default: t(() => [
40
- (r(!0), m(f, null, I(l.items, (e, i) => (r(), p(E, {
41
- key: i,
42
- id: e.key,
43
- class: y({
44
- alert: u(G)(e).value,
45
- error: l.invalidParams && l.invalidParams.has(e.key)
40
+ default: n(() => [
41
+ t(C, { class: "sr-only !block" }, {
42
+ default: n(() => [
43
+ t(k, null, {
44
+ default: n(() => e[4] || (e[4] = [
45
+ s("span", { class: "sr-only" }, "Enabled", -1)
46
+ ])),
47
+ _: 1
48
+ }),
49
+ t(k, null, {
50
+ default: n(() => e[5] || (e[5] = [
51
+ w("Key")
52
+ ])),
53
+ _: 1
54
+ }),
55
+ t(k, null, {
56
+ default: n(() => e[6] || (e[6] = [
57
+ w("Value")
58
+ ])),
59
+ _: 1
60
+ })
61
+ ]),
62
+ _: 1
63
+ }),
64
+ (d(!0), m(f, null, D(a.items, (l, u) => (d(), p(C, {
65
+ id: l.key,
66
+ key: u,
67
+ class: V({
68
+ alert: i(P)(l).value,
69
+ error: a.invalidParams && a.invalidParams.has(l.key)
46
70
  })
47
71
  }, {
48
- default: t(() => [
49
- s("label", j, [
50
- l.isGlobal ? (r(), p(b, {
72
+ default: n(() => [
73
+ s("label", L, [
74
+ a.isGlobal ? (d(), p(c, {
51
75
  key: 0,
52
76
  class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
53
- to: e.route ?? {}
77
+ to: l.route ?? {}
54
78
  }, {
55
- default: t(() => [
56
- a[5] || (a[5] = s("span", { class: "sr-only" }, "Global", -1)),
57
- d(u(T), {
79
+ default: n(() => [
80
+ e[8] || (e[8] = s("span", { class: "sr-only" }, "Global", -1)),
81
+ t(i(E), {
58
82
  as: "div",
59
83
  side: "top"
60
84
  }, {
61
- trigger: t(() => [
62
- d(u(g), {
85
+ trigger: n(() => [
86
+ t(i(B), {
63
87
  class: "text-c-1",
64
88
  icon: "Globe",
65
89
  size: "xs"
66
90
  })
67
91
  ]),
68
- content: t(() => a[4] || (a[4] = [
92
+ content: n(() => e[7] || (e[7] = [
69
93
  s("div", { class: "w-content bg-b-1 text-xxs text-c-1 z-100 pointer-events-none z-10 grid max-w-[320px] gap-1.5 rounded p-2 leading-5 shadow-lg" }, [
70
94
  s("div", { class: "text-c-1 flex items-center" }, [
71
95
  s("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
@@ -76,101 +100,101 @@ const j = { class: "contents" }, L = { class: "sr-only" }, N = { class: "text-c-
76
100
  })
77
101
  ]),
78
102
  _: 2
79
- }, 1032, ["to"])) : (r(), m(f, { key: 1 }, [
80
- s("span", L, " Row " + w(e.enabled ? "Enabled" : "Disabled"), 1),
81
- d(q, {
103
+ }, 1032, ["to"])) : (d(), m(f, { key: 1 }, [
104
+ s("span", O, " Row " + x(l.enabled ? "Enabled" : "Disabled"), 1),
105
+ t(N, {
82
106
  class: "!border-r-1/2",
83
- disabled: c.hasCheckboxDisabled,
84
- modelValue: e.enabled,
85
- "onUpdate:modelValue": (o) => n("toggleRow", i, o)
107
+ disabled: b.hasCheckboxDisabled,
108
+ modelValue: l.enabled,
109
+ "onUpdate:modelValue": (o) => r("toggleRow", u, o)
86
110
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])
87
111
  ], 64))
88
112
  ]),
89
- d(v, null, {
90
- default: t(() => [
91
- d(x, {
113
+ t(v, null, {
114
+ default: n(() => [
115
+ t(R, {
92
116
  disableCloseBrackets: "",
93
- disabled: c.isReadOnly,
117
+ disabled: b.isReadOnly,
94
118
  disableEnter: "",
95
119
  disableTabIndent: "",
96
- envVariables: l.envVariables,
97
- environment: l.environment,
98
- modelValue: e.key,
120
+ envVariables: a.envVariables,
121
+ environment: a.environment,
122
+ modelValue: l.key,
99
123
  placeholder: "Key",
100
- required: !!e.required,
101
- workspace: l.workspace,
102
- onBlur: a[0] || (a[0] = (o) => n("inputBlur")),
103
- onFocus: a[1] || (a[1] = (o) => n("inputFocus")),
104
- onSelectVariable: (o) => k(i, "key", o),
105
- "onUpdate:modelValue": (o) => n("updateRow", i, "key", o)
124
+ required: !!l.required,
125
+ workspace: a.workspace,
126
+ onBlur: e[0] || (e[0] = (o) => r("inputBlur")),
127
+ onFocus: e[1] || (e[1] = (o) => r("inputFocus")),
128
+ onSelectVariable: (o) => y(u, "key", o),
129
+ "onUpdate:modelValue": (o) => r("updateRow", u, "key", o)
106
130
  }, null, 8, ["disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
107
131
  ]),
108
132
  _: 2
109
133
  }, 1024),
110
- d(v, null, {
111
- default: t(() => [
112
- d(x, {
113
- class: y({
114
- "pr-6": u(B)(e)
134
+ t(v, null, {
135
+ default: n(() => [
136
+ t(R, {
137
+ class: V({
138
+ "pr-6": i(h)(l)
115
139
  }),
116
- default: e.default,
140
+ default: l.default,
117
141
  disableCloseBrackets: "",
118
- disabled: c.isReadOnly,
142
+ disabled: b.isReadOnly,
119
143
  disableEnter: "",
120
144
  disableTabIndent: "",
121
- enum: e.enum ?? [],
122
- envVariables: l.envVariables,
123
- environment: l.environment,
124
- examples: e.examples ?? [],
125
- max: e.maximum,
126
- min: e.minimum,
127
- modelValue: e.value,
128
- nullable: !!e.nullable,
145
+ enum: l.enum ?? [],
146
+ envVariables: a.envVariables,
147
+ environment: a.environment,
148
+ examples: l.examples ?? [],
149
+ max: l.maximum,
150
+ min: l.minimum,
151
+ modelValue: l.value,
152
+ nullable: !!l.nullable,
129
153
  placeholder: "Value",
130
- type: e.type,
131
- workspace: l.workspace,
132
- onBlur: a[2] || (a[2] = (o) => n("inputBlur")),
133
- onFocus: a[3] || (a[3] = (o) => n("inputFocus")),
134
- onSelectVariable: (o) => k(i, "value", o),
135
- "onUpdate:modelValue": (o) => n("updateRow", i, "value", o)
154
+ type: l.type,
155
+ workspace: a.workspace,
156
+ onBlur: e[2] || (e[2] = (o) => r("inputBlur")),
157
+ onFocus: e[3] || (e[3] = (o) => r("inputFocus")),
158
+ onSelectVariable: (o) => y(u, "value", o),
159
+ "onUpdate:modelValue": (o) => r("updateRow", u, "value", o)
136
160
  }, {
137
- icon: t(() => [
138
- u(B)(e) ? (r(), p(P, {
161
+ icon: n(() => [
162
+ i(h)(l) ? (d(), p(j, {
139
163
  key: 0,
140
- item: { ...e, default: U(e) }
141
- }, null, 8, ["item"])) : V("", !0)
164
+ item: { ...l, default: $(l) }
165
+ }, null, 8, ["item"])) : g("", !0)
142
166
  ]),
143
167
  _: 2
144
168
  }, 1032, ["class", "default", "disabled", "enum", "envVariables", "environment", "examples", "max", "min", "modelValue", "nullable", "type", "workspace", "onSelectVariable", "onUpdate:modelValue"])
145
169
  ]),
146
170
  _: 2
147
171
  }, 1024),
148
- l.showUploadButton ? (r(), p(v, {
172
+ a.showUploadButton ? (d(), p(v, {
149
173
  key: 0,
150
174
  class: "group/upload flex items-center justify-center whitespace-nowrap"
151
175
  }, {
152
- default: t(() => {
176
+ default: n(() => {
153
177
  var o;
154
178
  return [
155
- e.file ? (r(), m(f, { key: 0 }, [
156
- s("div", N, [
157
- s("span", null, w((o = e.file) == null ? void 0 : o.name), 1)
179
+ l.file ? (d(), m(f, { key: 0 }, [
180
+ s("div", A, [
181
+ s("span", null, x((o = l.file) == null ? void 0 : o.name), 1)
158
182
  ]),
159
183
  s("button", {
160
184
  class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
161
185
  type: "button",
162
- onClick: (S) => n("removeFile", i)
163
- }, " Delete ", 8, O)
164
- ], 64)) : (r(), m("div", A, [
165
- d(u(z), {
186
+ onClick: (T) => r("removeFile", u)
187
+ }, " Delete ", 8, K)
188
+ ], 64)) : (d(), m("div", H, [
189
+ t(i(q), {
166
190
  class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
167
191
  size: "sm",
168
192
  variant: "outlined",
169
- onClick: (S) => F(i)
193
+ onClick: (T) => _(u)
170
194
  }, {
171
- default: t(() => [
172
- a[6] || (a[6] = s("span", null, "Upload File", -1)),
173
- d(u(g), {
195
+ default: n(() => [
196
+ e[9] || (e[9] = s("span", null, "Upload File", -1)),
197
+ t(i(B), {
174
198
  class: "ml-1",
175
199
  icon: "UploadSimple",
176
200
  size: "xs",
@@ -183,7 +207,7 @@ const j = { class: "contents" }, L = { class: "sr-only" }, N = { class: "text-c-
183
207
  ];
184
208
  }),
185
209
  _: 2
186
- }, 1024)) : V("", !0)
210
+ }, 1024)) : g("", !0)
187
211
  ]),
188
212
  _: 2
189
213
  }, 1032, ["id", "class"]))), 128))
@@ -194,5 +218,5 @@ const j = { class: "contents" }, L = { class: "sr-only" }, N = { class: "text-c-
194
218
  }
195
219
  });
196
220
  export {
197
- ee as default
221
+ oe as default
198
222
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAM9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AA6JrD,wBAOG"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AAkFA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAO9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AAgKrD,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTableTooltip.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-eaaae574"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ffeb58c7"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,51 +1,56 @@
1
- import { defineComponent as l, openBlock as t, createBlock as p, unref as r, withCtx as a, createElementVNode as m, createVNode as u, normalizeClass as d, createElementBlock as o, toDisplayString as i, createCommentVNode as s } from "vue";
2
- import { ScalarTooltip as f, ScalarIcon as c } from "@scalar/components";
3
- import { parameterIsInvalid as n } from "../libs/request.js";
4
- const g = { class: "bg-b-1 mr-1 pl-1 pr-1.5 group-[.alert]:bg-transparent group-[.error]:bg-transparent" }, b = { class: "w-content bg-b-1 text-xxs text-c-1 pointer-events-none grid min-w-48 gap-1.5 rounded p-2 leading-5 shadow-lg" }, h = {
1
+ import { defineComponent as u, computed as d, openBlock as t, createBlock as f, unref as n, withCtx as s, createElementVNode as m, createVNode as c, normalizeClass as b, createElementBlock as o, toDisplayString as r, createCommentVNode as i } from "vue";
2
+ import { ScalarTooltip as g, ScalarIcon as h } from "@scalar/components";
3
+ import { parameterIsInvalid as l } from "../libs/request.js";
4
+ const v = ["aria-label", "role"], y = { class: "w-content bg-b-1 text-xxs text-c-1 pointer-events-none grid min-w-48 gap-1.5 rounded p-2 leading-5 shadow-lg" }, k = {
5
5
  key: 0,
6
6
  class: "text-error-1"
7
- }, y = {
7
+ }, _ = {
8
8
  key: 1,
9
9
  class: "schema text-c-2 flex items-center"
10
- }, v = { key: 0 }, k = { key: 1 }, _ = { key: 2 }, w = { key: 3 }, C = { key: 4 }, I = {
10
+ }, I = { key: 0 }, w = { key: 1 }, x = { key: 2 }, C = { key: 3 }, B = { key: 4 }, N = {
11
11
  key: 2,
12
12
  class: "text-pretty text-sm leading-snug",
13
13
  style: { maxWidth: "16rem" }
14
- }, z = /* @__PURE__ */ l({
14
+ }, E = /* @__PURE__ */ u({
15
15
  __name: "RequestTableTooltip",
16
16
  props: {
17
17
  item: {}
18
18
  },
19
- setup(B) {
20
- return (e, N) => (t(), p(r(f), {
19
+ setup(p) {
20
+ const a = d(() => !!l(p.item).value);
21
+ return (e, S) => (t(), f(n(g), {
21
22
  align: "start",
22
23
  class: "w-full pr-px",
23
24
  delay: 0,
24
25
  side: "left",
25
26
  triggerClass: "before:absolute before:content-[''] before:bg-gradient-to-r before:from-transparent before:to-b-1 group-[.alert]:before:to-b-alert group-[.error]:before:to-b-danger before:min-h-[calc(100%-4px)] before:pointer-events-none before:right-[23px] before:top-0.5 before:w-3 absolute h-full right-0 -outline-offset-1"
26
27
  }, {
27
- trigger: a(() => [
28
- m("div", g, [
29
- u(r(c), {
30
- class: d(
31
- r(n)(e.item).value ? "text-orange brightness-[.9]" : "text-c-3 group-hover/info:text-c-1"
28
+ trigger: s(() => [
29
+ m("div", {
30
+ "aria-label": a.value ? "Input is invalid" : "More Information",
31
+ class: "bg-b-1 mr-1 pl-1 pr-1.5 group-[.alert]:bg-transparent group-[.error]:bg-transparent",
32
+ role: a.value ? "alert" : "none"
33
+ }, [
34
+ c(n(h), {
35
+ class: b(
36
+ a.value ? "text-orange brightness-[.9]" : "text-c-3 group-hover/info:text-c-1"
32
37
  ),
33
- icon: r(n)(e.item).value ? "Alert" : "Info",
38
+ icon: a.value ? "Alert" : "Info",
34
39
  size: "sm",
35
40
  thickness: "1.5"
36
41
  }, null, 8, ["class", "icon"])
37
- ])
42
+ ], 8, v)
38
43
  ]),
39
- content: a(() => [
40
- m("div", b, [
41
- r(n)(e.item).value ? (t(), o("div", h, i(r(n)(e.item).value), 1)) : e.item.type || e.item.format || e.item.minimum || e.item.maximum || e.item.default ? (t(), o("div", y, [
42
- e.item.type ? (t(), o("span", v, i(e.item.type), 1)) : s("", !0),
43
- e.item.format ? (t(), o("span", k, i(e.item.format), 1)) : s("", !0),
44
- e.item.minimum ? (t(), o("span", _, "min: " + i(e.item.minimum), 1)) : s("", !0),
45
- e.item.maximum ? (t(), o("span", w, "max: " + i(e.item.maximum), 1)) : s("", !0),
46
- e.item.default ? (t(), o("span", C, "default: " + i(e.item.default), 1)) : s("", !0)
47
- ])) : s("", !0),
48
- e.item.description && !r(n)(e.item).value ? (t(), o("span", I, i(e.item.description), 1)) : s("", !0)
44
+ content: s(() => [
45
+ m("div", y, [
46
+ a.value ? (t(), o("div", k, r(n(l)(e.item).value), 1)) : e.item.type || e.item.format || e.item.minimum || e.item.maximum || e.item.default ? (t(), o("div", _, [
47
+ e.item.type ? (t(), o("span", I, r(e.item.type), 1)) : i("", !0),
48
+ e.item.format ? (t(), o("span", w, r(e.item.format), 1)) : i("", !0),
49
+ e.item.minimum ? (t(), o("span", x, "min: " + r(e.item.minimum), 1)) : i("", !0),
50
+ e.item.maximum ? (t(), o("span", C, "max: " + r(e.item.maximum), 1)) : i("", !0),
51
+ e.item.default ? (t(), o("span", B, "default: " + r(e.item.default), 1)) : i("", !0)
52
+ ])) : i("", !0),
53
+ e.item.description && !a.value ? (t(), o("span", N, r(e.item.description), 1)) : i("", !0)
49
54
  ])
50
55
  ]),
51
56
  _: 1
@@ -53,5 +58,5 @@ const g = { class: "bg-b-1 mr-1 pl-1 pr-1.5 group-[.alert]:bg-transparent group-
53
58
  }
54
59
  });
55
60
  export {
56
- z as default
61
+ E as default
57
62
  };