@scalar/api-client 2.0.34 → 2.0.35

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 (57) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/components/DataTable/DataTableInput.vue.d.ts +7 -0
  3. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  4. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  5. package/dist/components/DataTable/DataTableInput.vue2.js +33 -31
  6. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +19 -3
  7. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  8. package/dist/components/DataTable/DataTableInputSelect.vue.js +37 -35
  9. package/dist/components/DataTable/index.d.ts +1 -0
  10. package/dist/components/DataTable/index.d.ts.map +1 -1
  11. package/dist/components/DataTable/index.js +6 -4
  12. package/dist/components/SideNav/SideHelp.vue.d.ts +3 -0
  13. package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -0
  14. package/dist/components/SideNav/SideHelp.vue.js +125 -0
  15. package/dist/components/SideNav/SideHelp.vue2.js +4 -0
  16. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  17. package/dist/components/SideNav/SideNav.vue.js +3 -3
  18. package/dist/components/SideNav/SideNav.vue2.js +28 -24
  19. package/dist/layouts/App/create-api-client-app.d.ts +512 -603
  20. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  21. package/dist/layouts/Modal/api-client-modal.d.ts +1036 -1218
  22. package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -1
  23. package/dist/libs/create-client.d.ts +513 -603
  24. package/dist/libs/create-client.d.ts.map +1 -1
  25. package/dist/libs/create-client.js +58 -68
  26. package/dist/libs/local-storage.js +5 -5
  27. package/dist/libs/sendRequest.d.ts +2 -5
  28. package/dist/libs/sendRequest.d.ts.map +1 -1
  29. package/dist/libs/sendRequest.js +60 -63
  30. package/dist/store/workspace.d.ts +1037 -1219
  31. package/dist/store/workspace.d.ts.map +1 -1
  32. package/dist/store/workspace.js +350 -277
  33. package/dist/style.css +1 -1
  34. package/dist/views/Request/Request.vue.js +2 -2
  35. package/dist/views/Request/Request.vue2.js +22 -22
  36. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  37. package/dist/views/Request/RequestSection/RequestAuth.vue.js +270 -177
  38. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  39. package/dist/views/Request/RequestSection/RequestSection.vue.js +52 -42
  40. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  41. package/dist/views/Request/RequestSidebarItemMenu.vue.js +141 -104
  42. package/dist/views/Request/components/OAuth2.vue.d.ts +3 -9
  43. package/dist/views/Request/components/OAuth2.vue.d.ts.map +1 -1
  44. package/dist/views/Request/components/OAuth2.vue.js +141 -112
  45. package/dist/views/Request/components/OAuthScopesInput.vue.d.ts +2 -6
  46. package/dist/views/Request/components/OAuthScopesInput.vue.d.ts.map +1 -1
  47. package/dist/views/Request/components/OAuthScopesInput.vue.js +35 -39
  48. package/dist/views/Request/consts/index.d.ts +2 -0
  49. package/dist/views/Request/consts/index.d.ts.map +1 -0
  50. package/dist/views/Request/consts/index.js +5 -0
  51. package/dist/views/Request/consts/new-auth-options.d.ts +92 -0
  52. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -0
  53. package/dist/views/Request/consts/new-auth-options.js +83 -0
  54. package/dist/views/Request/libs/oauth2.d.ts +3 -16
  55. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  56. package/dist/views/Request/libs/oauth2.js +28 -31
  57. package/package.json +10 -6
@@ -2,8 +2,8 @@ import { defineComponent as P, ref as A, onMounted as H, onBeforeUnmount as J, o
2
2
  import te from "../../components/AddressBar/AddressBar.vue.js";
3
3
  import oe from "../../components/Search/SearchButton.vue.js";
4
4
  import re from "../../components/Search/SearchModal.vue.js";
5
- import ae from "../../components/Sidebar/SidebarButton.vue.js";
6
- import se from "../../components/Sidebar/SidebarToggle.vue.js";
5
+ import se from "../../components/Sidebar/SidebarButton.vue.js";
6
+ import ae from "../../components/Sidebar/SidebarToggle.vue.js";
7
7
  import le from "../../components/ViewLayout/ViewLayout.vue.js";
8
8
  import ne from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
9
  import { commandPaletteBus as E } from "../../libs/eventBusses/command-palette.js";
@@ -22,7 +22,7 @@ import he from "./components/WorkspaceDropdown.vue.js";
22
22
  import { useSidebar as be } from "../../hooks/useSidebar.js";
23
23
  import { sendRequest as xe } from "../../libs/sendRequest.js";
24
24
  import { executeRequestBus as B } from "../../libs/eventBusses/executeRequestBus.js";
25
- const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, we = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, ke = /* @__PURE__ */ ye(() => /* @__PURE__ */ m("a", {
25
+ const ye = (g) => (Z("data-v-1eb6d142"), g = g(), ee(), g), _e = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, we = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, ke = /* @__PURE__ */ ye(() => /* @__PURE__ */ m("a", {
26
26
  class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
27
27
  href: "https://scalar.com/",
28
28
  target: "_blank"
@@ -33,7 +33,7 @@ const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:mi
33
33
  const {
34
34
  activeExample: h,
35
35
  activeRequest: l,
36
- activeSecurityScheme: M,
36
+ activeSecuritySchemes: M,
37
37
  activeWorkspaceServers: I,
38
38
  activeWorkspace: n,
39
39
  environments: V,
@@ -49,7 +49,7 @@ const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:mi
49
49
  );
50
50
  return;
51
51
  }
52
- let a = h.value.url;
52
+ let s = h.value.url;
53
53
  const o = Object.values(V).reduce(
54
54
  (d, p) => {
55
55
  try {
@@ -60,45 +60,45 @@ const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:mi
60
60
  },
61
61
  {}
62
62
  ), t = /\{\{(.*?)\}\}/g;
63
- a = a.replace(t, (d, p) => (I.value.forEach((F) => {
63
+ s = s.replace(t, (d, p) => (I.value.forEach((F) => {
64
64
  if (F.url === p)
65
65
  return p;
66
66
  }), o[p] || p));
67
- const { request: s, response: c } = await xe(
67
+ const { request: a, response: c } = await xe(
68
68
  l.value,
69
69
  h.value,
70
- a,
70
+ s,
71
71
  M.value,
72
72
  (v = n.value) == null ? void 0 : v.proxyUrl,
73
73
  z
74
74
  );
75
- s && c ? $.edit(l.value.uid, "history", [
75
+ a && c ? $.edit(l.value.uid, "history", [
76
76
  ...l.value.history,
77
77
  {
78
- request: s,
78
+ request: a,
79
79
  response: c,
80
80
  timestamp: Date.now()
81
81
  }
82
82
  ]) : console.warn("No response or request was returned");
83
83
  };
84
84
  H(() => B.on(C)), J(() => B.off(C));
85
- const T = (a, o, t, s) => {
85
+ const T = (s, o, t, a) => {
86
86
  }, W = () => E.emit(), b = pe();
87
- fe(document, "keydown", (a) => {
88
- (q() ? b.meta.value : b.ctrl.value) && a.key === "b" && (i.value = !i.value), !n.value.isReadOnly && (q() ? b.meta.value : b.ctrl.value) && a.key === "k" && E.emit();
87
+ fe(document, "keydown", (s) => {
88
+ (q() ? b.meta.value : b.ctrl.value) && s.key === "b" && (i.value = !i.value), !n.value.isReadOnly && (q() ? b.meta.value : b.ctrl.value) && s.key === "k" && E.emit();
89
89
  });
90
90
  const j = () => {
91
91
  if (!l.value) return "";
92
- const { method: a } = l.value;
93
- return de[a].backgroundColor;
92
+ const { method: s } = l.value;
93
+ return de[s].backgroundColor;
94
94
  };
95
- return (a, o) => (f(), y(O, null, [
95
+ return (s, o) => (f(), y(O, null, [
96
96
  m("div", {
97
97
  class: x(["flex flex-1 flex-col rounded rounded-b-none rounded-r-none pt-0 h-full client-wrapper-bg-color relative", j()])
98
98
  }, [
99
99
  m("div", _e, [
100
100
  m("div", we, [
101
- r(se, {
101
+ r(ae, {
102
102
  modelValue: i.value,
103
103
  "onUpdate:modelValue": o[0] || (o[0] = (t) => i.value = t),
104
104
  class: "gitbook-hidden"
@@ -137,13 +137,13 @@ const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:mi
137
137
  onDragover: o[4] || (o[4] = D(() => {
138
138
  }, ["prevent"]))
139
139
  }, [
140
- (f(!0), y(O, null, G(e(N), (t, s) => (f(), w(ve, {
140
+ (f(!0), y(O, null, G(e(N), (t, a) => (f(), w(ve, {
141
141
  key: t.uid,
142
142
  isDraggable: !e(n).isReadOnly,
143
143
  isDroppable: !e(n).isReadOnly,
144
144
  item: t,
145
145
  parentUids: [],
146
- onOnDragEnd: (...c) => T(t, s, ...c)
146
+ onOnDragEnd: (...c) => T(t, a, ...c)
147
147
  }, {
148
148
  leftIcon: u(() => [
149
149
  r(e(k), {
@@ -169,7 +169,7 @@ const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:mi
169
169
  ], 32)
170
170
  ]),
171
171
  button: u(() => [
172
- e(n).isReadOnly ? _("", !0) : (f(), w(ae, {
172
+ e(n).isReadOnly ? _("", !0) : (f(), w(se, {
173
173
  key: 0,
174
174
  click: W
175
175
  }, {
@@ -196,11 +196,11 @@ const ye = (g) => (Z("data-v-ceecd7c7"), g = g(), ee(), g), _e = { class: "lg:mi
196
196
  class: x(["flex-1", [i.value ? "sidebar-active-hide-layout" : ""]])
197
197
  }, {
198
198
  default: u(() => {
199
- var t, s, c, v, d;
199
+ var t, a, c, v, d;
200
200
  return [
201
201
  r(ce),
202
202
  r(ue, {
203
- response: (d = (v = (t = e(l)) == null ? void 0 : t.history) == null ? void 0 : v[((c = (s = e(l)) == null ? void 0 : s.history) == null ? void 0 : c.length) - 1]) == null ? void 0 : d.response
203
+ response: (d = (v = (t = e(l)) == null ? void 0 : t.history) == null ? void 0 : v[((c = (a = e(l)) == null ? void 0 : a.history) == null ? void 0 : c.length) - 1]) == null ? void 0 : d.response
204
204
  }, null, 8, ["response"])
205
205
  ];
206
206
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuth.vue"],"names":[],"mappings":";WAkPS,MAAM;;WAAN,MAAM;;AAkdf,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuth.vue"],"names":[],"mappings":";WAkXS,MAAM;;WAAN,MAAM;;AA6qBf,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,212 +1,305 @@
1
- import { defineComponent as T, computed as k, openBlock as d, createBlock as v, withCtx as s, createElementVNode as f, toDisplayString as x, createVNode as r, unref as l, createTextVNode as y, createElementBlock as N, Fragment as U, createCommentVNode as B, capitalize as w } from "vue";
2
- import D from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useWorkspace as O } from "../../../store/workspace.js";
4
- import _ from "./RequestAuthDataTableInput.vue.js";
5
- import { ScalarListbox as W, ScalarButton as j, ScalarIcon as A } from "@scalar/components";
6
- import { camelToTitleWords as E } from "@scalar/oas-utils/helpers";
7
- import I from "../../../components/DataTable/DataTable.vue.js";
8
- import p from "../../../components/DataTable/DataTableRow.vue.js";
9
- import K from "../../../components/DataTable/DataTableHeader.vue.js";
10
- import R from "../components/OAuth2.vue.js";
11
- const q = { class: "flex gap-1" }, z = { class: "flex h-8 items-center" }, L = /* @__PURE__ */ f("div", { class: "text-c-2 flex min-w-[100px] items-center border-r-1/2 pr-0 pl-2 h-full" }, " Auth Type ", -1), F = { class: "pl-2" }, ae = /* @__PURE__ */ T({
1
+ import { defineComponent as q, ref as O, computed as $, openBlock as i, createBlock as x, withCtx as l, createElementVNode as b, toDisplayString as k, createVNode as u, unref as n, createElementBlock as _, Fragment as v, renderList as Q, createTextVNode as p, withModifiers as j, createCommentVNode as I, capitalize as M } from "vue";
2
+ import H from "../../../components/DataTable/DataTableCell.vue.js";
3
+ import z from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
+ import { useWorkspace as E } from "../../../store/workspace.js";
5
+ import y from "./RequestAuthDataTableInput.vue.js";
6
+ import { ScalarComboboxMultiselect as L, ScalarButton as B, ScalarIcon as K } from "@scalar/components";
7
+ import { camelToTitleWords as G } from "@scalar/oas-utils/helpers";
8
+ import { ADD_AUTH_OPTIONS as J, ADD_AUTH_DICT as X } from "../consts/new-auth-options.js";
9
+ import Y from "../../../components/DataTable/DataTable.vue.js";
10
+ import c from "../../../components/DataTable/DataTableRow.vue.js";
11
+ import Z from "../../../components/DataTable/DataTableHeader.vue.js";
12
+ import ee from "../components/OAuth2.vue.js";
13
+ const te = { class: "flex gap-1" }, le = /* @__PURE__ */ b("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1), ae = { class: "pl-2" }, oe = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons" }, Ve = /* @__PURE__ */ q({
12
14
  __name: "RequestAuth",
13
15
  props: {
14
16
  title: {}
15
17
  },
16
- setup(P) {
18
+ setup(ue) {
17
19
  const {
18
- activeCollection: V,
19
- collectionMutators: S,
20
- activeSecurityRequirements: g,
21
- activeSecurityScheme: a,
22
- securitySchemes: $,
23
- securitySchemeMutators: C
24
- } = O(), M = (t) => {
25
- const e = $[t];
26
- switch (e == null ? void 0 : e.type) {
20
+ activeCollection: h,
21
+ activeRequest: V,
22
+ activeSecurityRequirements: N,
23
+ activeSecuritySchemes: T,
24
+ isReadOnly: U,
25
+ requestMutators: F,
26
+ securitySchemeMutators: S,
27
+ securitySchemes: w
28
+ } = E(), C = O(null), D = (a) => {
29
+ switch (a == null ? void 0 : a.type) {
27
30
  case "apiKey":
28
- return `${w(e.in)} (${t})`;
31
+ return `${M(a.in)}`;
29
32
  case "http":
30
- return `${w(e.scheme)} Authentication (${t})`;
33
+ return `${M(a.scheme)} Authentication`;
34
+ case "oauth2":
35
+ return G(a.flow.type);
31
36
  case "openIdConnect":
32
- return `Open ID Connect (${t})`;
37
+ return "Open ID Connect";
33
38
  default:
34
39
  return "None";
35
40
  }
36
- }, h = k(
37
- () => g.value.flatMap((t) => {
38
- const e = Object.keys(t);
39
- return e.length === 0 ? { id: "none", label: "None" } : e.flatMap((o) => {
40
- const n = $[o];
41
- return (n == null ? void 0 : n.type) === "oauth2" ? Object.keys(n.flows).map((i) => ({
42
- // Since ID's must be unique, we also store the uid and flowKey separately
43
- id: `${o}${i}`,
44
- label: `${E(i)} (${o})`,
45
- flowKey: i,
46
- uid: o
47
- })) : { id: o, label: M(o) };
41
+ }, g = $(
42
+ () => {
43
+ var e;
44
+ const a = (e = h.value) == null ? void 0 : e.securitySchemeDict, o = N.value.flatMap((r) => {
45
+ const t = Object.keys(r);
46
+ return t.length === 0 && U.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((d) => {
47
+ if (!a) return [];
48
+ const s = a[d], W = w[s], R = D(W);
49
+ return {
50
+ id: s,
51
+ label: `${R} (${d})`,
52
+ labelWithoutId: R
53
+ };
54
+ });
48
55
  });
49
- })
50
- ), c = k({
56
+ if (U.value)
57
+ return o;
58
+ {
59
+ const r = V.value.securitySchemeUids.map((t) => {
60
+ const d = w[t], s = D(d);
61
+ return {
62
+ id: t,
63
+ label: "name" in d && d.name.length ? `${s} (${d.name})` : s,
64
+ labelWithoutId: s
65
+ };
66
+ });
67
+ return [
68
+ { label: "Select auth", options: [...o, ...r] },
69
+ {
70
+ label: "Add new auth",
71
+ options: J
72
+ }
73
+ ];
74
+ }
75
+ }
76
+ ), f = $({
51
77
  // Grab the selected OR first security scheme
52
- get: () => {
53
- var e, o;
54
- const t = (o = (e = V.value) == null ? void 0 : e.selectedSecuritySchemes) == null ? void 0 : o[0];
55
- return h.value.find(
56
- ({ id: n }) => n === `${t == null ? void 0 : t.uid}${(t == null ? void 0 : t.flowKey) ?? ""}`
57
- ) || h.value[0];
58
- },
59
- // Update the mutator on set
60
- set: (t) => {
61
- if (!(t != null && t.id)) return;
62
- const e = "uid" in t ? { flowKey: t.flowKey, uid: t.uid } : { uid: t.id };
63
- S.edit(
78
+ get: () => g.value.flatMap(
79
+ (o) => "options" in o ? o.options : o
80
+ ).filter(
81
+ ({ id: o }) => {
82
+ var e, r;
83
+ return (r = (e = V.value) == null ? void 0 : e.selectedSecuritySchemeUids) == null ? void 0 : r.find(
84
+ (t) => t === o
85
+ );
86
+ }
87
+ ),
88
+ // Update the selected auth per this request
89
+ set: (a) => {
90
+ var e, r, t, d;
91
+ const o = a.find(
92
+ (s) => X[s.id]
93
+ );
94
+ o != null && o.payload && h.value ? ((d = (t = (r = (e = C.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : r.popoverButtonRef) == null ? void 0 : t.el) == null || d.click(), S.add(
95
+ o.payload,
96
+ h.value.uid,
97
+ V.value,
98
+ !0
99
+ )) : F.edit(
64
100
  V.value.uid,
65
- "selectedSecuritySchemes",
66
- [e]
101
+ "selectedSecuritySchemeUids",
102
+ a.map((s) => s.id)
67
103
  );
68
104
  }
69
- }), m = (t, e) => {
70
- var o;
71
- return C.edit(
72
- ((o = a.value) == null ? void 0 : o.scheme.uid) ?? "",
73
- t,
74
- e
75
- );
76
- };
77
- return (t, e) => (d(), v(D, {
105
+ }), m = (a, o, e) => S.edit(a.uid ?? "", o, e), A = $(() => f.value.length > 1 ? f.value.map(({ labelWithoutId: a }) => a).join(", ") : f.value.length ? f.value[0].label : "None"), P = (a) => S.delete(a, V.value);
106
+ return (a, o) => (i(), x(z, {
78
107
  class: "group/params",
79
- itemCount: h.value.length
108
+ itemCount: g.value.length
80
109
  }, {
81
- title: s(() => [
82
- f("div", q, x(t.title), 1)
110
+ title: l(() => [
111
+ b("div", te, k(a.title), 1)
83
112
  ]),
84
- default: s(() => [
85
- f("form", null, [
86
- r(l(I), {
113
+ default: l(() => [
114
+ b("form", null, [
115
+ u(n(Y), {
87
116
  class: "flex-1",
88
117
  columns: [""]
89
118
  }, {
90
- default: s(() => {
91
- var o, n, i, b;
92
- return [
93
- r(l(p), null, {
94
- default: s(() => [
95
- r(l(K), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
96
- default: s(() => [
97
- r(l(W), {
98
- modelValue: c.value,
99
- "onUpdate:modelValue": e[0] || (e[0] = (u) => c.value = u),
100
- class: "text-xs w-full left-2",
101
- fullWidth: "",
102
- options: h.value,
103
- teleport: ""
104
- }, {
105
- default: s(() => [
106
- r(l(j), {
107
- class: "flex gap-1.5 h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal",
108
- fullWidth: "",
109
- variant: "ghost"
110
- }, {
111
- default: s(() => {
112
- var u;
113
- return [
114
- f("div", z, [
115
- L,
116
- f("span", F, x((u = c.value) == null ? void 0 : u.label), 1),
117
- r(l(A), {
118
- icon: "ChevronDown",
119
- size: "xs"
120
- })
121
- ])
122
- ];
123
- }),
124
- _: 1
125
- })
126
- ]),
127
- _: 1
128
- }, 8, ["modelValue", "options"])
129
- ]),
130
- _: 1
131
- })
132
- ]),
133
- _: 1
134
- }),
135
- ((o = l(a)) == null ? void 0 : o.scheme.type) === "http" && l(a).scheme.scheme === "bearer" ? (d(), v(l(p), { key: 0 }, {
136
- default: s(() => [
137
- r(_, {
138
- id: "http-bearer-token",
139
- modelValue: l(a).scheme.value,
140
- placeholder: "Token",
141
- type: "password",
142
- "onUpdate:modelValue": e[1] || (e[1] = (u) => m("value", u))
143
- }, {
144
- default: s(() => [
145
- y(" Bearer Token ")
146
- ]),
147
- _: 1
148
- }, 8, ["modelValue"])
149
- ]),
150
- _: 1
151
- })) : ((n = l(a)) == null ? void 0 : n.scheme.type) === "http" && l(a).scheme.scheme === "basic" ? (d(), N(U, { key: 1 }, [
152
- r(l(p), null, {
153
- default: s(() => [
154
- r(_, {
155
- id: "http-basic-username",
156
- class: "text-c-2",
157
- modelValue: l(a).scheme.value,
158
- placeholder: "ScalarEnjoyer01",
159
- "onUpdate:modelValue": e[2] || (e[2] = (u) => m("value", u))
119
+ default: l(() => [
120
+ u(n(c), null, {
121
+ default: l(() => [
122
+ u(n(Z), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
123
+ default: l(() => [
124
+ u(n(L), {
125
+ ref_key: "comboboxRef",
126
+ ref: C,
127
+ modelValue: f.value,
128
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => f.value = e),
129
+ class: "text-xs w-full left-2",
130
+ fullWidth: "",
131
+ multiple: "",
132
+ options: g.value,
133
+ teleport: ""
160
134
  }, {
161
- default: s(() => [
162
- y(" Username ")
135
+ default: l(() => [
136
+ u(n(B), {
137
+ class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
138
+ fullWidth: "",
139
+ variant: "ghost"
140
+ }, {
141
+ default: l(() => [
142
+ le,
143
+ b("span", ae, k(A.value), 1),
144
+ u(n(K), {
145
+ icon: "ChevronDown",
146
+ size: "xs"
147
+ })
148
+ ]),
149
+ _: 1
150
+ })
163
151
  ]),
164
152
  _: 1
165
- }, 8, ["modelValue"])
153
+ }, 8, ["modelValue", "options"])
166
154
  ]),
167
155
  _: 1
168
- }),
169
- r(l(p), null, {
170
- default: s(() => [
171
- r(_, {
172
- id: "http-basic-password",
173
- modelValue: l(a).scheme.secondValue,
174
- placeholder: "xxxxxx",
156
+ })
157
+ ]),
158
+ _: 1
159
+ }),
160
+ (i(!0), _(v, null, Q(n(T), (e, r) => (i(), _(v, {
161
+ key: e.uid
162
+ }, [
163
+ n(T).length > 1 ? (i(), x(n(c), {
164
+ key: 0,
165
+ class: "group/delete"
166
+ }, {
167
+ default: l(() => [
168
+ u(H, { class: "text-c-1 pl-2 text-sm flex items-center justify-between" }, {
169
+ default: l(() => {
170
+ var t;
171
+ return [
172
+ p(k((t = f.value[r]) == null ? void 0 : t.label) + " ", 1),
173
+ b("div", oe, [
174
+ u(n(B), {
175
+ class: "px-1 transition-none",
176
+ size: "sm",
177
+ variant: "ghost",
178
+ onClick: j((d) => P(e), ["stop"])
179
+ }, {
180
+ default: l(() => [
181
+ p(" Delete ")
182
+ ]),
183
+ _: 2
184
+ }, 1032, ["onClick"])
185
+ ])
186
+ ];
187
+ }),
188
+ _: 2
189
+ }, 1024)
190
+ ]),
191
+ _: 2
192
+ }, 1024)) : I("", !0),
193
+ e.type === "http" ? (i(), _(v, { key: 1 }, [
194
+ e.scheme === "bearer" ? (i(), x(n(c), { key: 0 }, {
195
+ default: l(() => [
196
+ u(y, {
197
+ id: `http-bearer-token-${e.uid}`,
198
+ modelValue: e.value,
199
+ placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
175
200
  type: "password",
176
- "onUpdate:modelValue": e[3] || (e[3] = (u) => m("secondValue", u))
201
+ "onUpdate:modelValue": (t) => m(e, "value", t)
177
202
  }, {
178
- default: s(() => [
179
- y(" Password ")
203
+ default: l(() => [
204
+ p(" Bearer Token ")
180
205
  ]),
181
- _: 1
182
- }, 8, ["modelValue"])
206
+ _: 2
207
+ }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
183
208
  ]),
184
- _: 1
185
- })
186
- ], 64)) : ((i = l(a)) == null ? void 0 : i.scheme.type) === "apiKey" ? (d(), v(l(p), { key: 2 }, {
187
- default: s(() => [
188
- r(_, {
189
- id: `api-key-${l(a).scheme.name}`,
190
- modelValue: l(a).scheme.value,
191
- placeholder: "Value",
192
- type: "password",
193
- "onUpdate:modelValue": e[4] || (e[4] = (u) => m("value", u))
194
- }, {
195
- default: s(() => [
196
- y(x(l(a).scheme.name), 1)
209
+ _: 2
210
+ }, 1024)) : e.scheme === "basic" ? (i(), _(v, { key: 1 }, [
211
+ u(n(c), null, {
212
+ default: l(() => [
213
+ u(y, {
214
+ id: `http-basic-username-${e.uid}`,
215
+ class: "text-c-2",
216
+ modelValue: e.value,
217
+ placeholder: "ScalarEnjoyer01",
218
+ required: "",
219
+ "onUpdate:modelValue": (t) => m(e, "value", t)
220
+ }, {
221
+ default: l(() => [
222
+ p(" Username ")
223
+ ]),
224
+ _: 2
225
+ }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
197
226
  ]),
198
- _: 1
199
- }, 8, ["id", "modelValue"])
200
- ]),
201
- _: 1
202
- })) : ((b = l(a)) == null ? void 0 : b.scheme.type) === "oauth2" && c.value && "uid" in c.value && l(a).flow ? (d(), v(l(R), {
227
+ _: 2
228
+ }, 1024),
229
+ u(n(c), null, {
230
+ default: l(() => [
231
+ u(y, {
232
+ id: `http-basic-password-${e.uid}`,
233
+ modelValue: e.secondValue,
234
+ placeholder: "xxxxxx",
235
+ type: "password",
236
+ "onUpdate:modelValue": (t) => m(e, "secondValue", t)
237
+ }, {
238
+ default: l(() => [
239
+ p(" Password ")
240
+ ]),
241
+ _: 2
242
+ }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
243
+ ]),
244
+ _: 2
245
+ }, 1024)
246
+ ], 64)) : I("", !0)
247
+ ], 64)) : e.type === "apiKey" ? (i(), _(v, { key: 2 }, [
248
+ n(U) ? (i(), x(n(c), { key: 1 }, {
249
+ default: l(() => [
250
+ u(y, {
251
+ id: `api-key-value-${e.uid}`,
252
+ modelValue: e.value,
253
+ placeholder: "Value",
254
+ "onUpdate:modelValue": (t) => m(e, "value", t)
255
+ }, {
256
+ default: l(() => [
257
+ p(k(e.name), 1)
258
+ ]),
259
+ _: 2
260
+ }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
261
+ ]),
262
+ _: 2
263
+ }, 1024)) : (i(), _(v, { key: 0 }, [
264
+ u(n(c), null, {
265
+ default: l(() => [
266
+ u(y, {
267
+ id: `api-key-name-${e.uid}`,
268
+ modelValue: e.name,
269
+ placeholder: "api-key",
270
+ "onUpdate:modelValue": (t) => m(e, "name", t)
271
+ }, {
272
+ default: l(() => [
273
+ p(" Name ")
274
+ ]),
275
+ _: 2
276
+ }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
277
+ ]),
278
+ _: 2
279
+ }, 1024),
280
+ u(n(c), null, {
281
+ default: l(() => [
282
+ u(y, {
283
+ id: `api-key-value-add-${e.uid}`,
284
+ modelValue: e.value,
285
+ placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
286
+ "onUpdate:modelValue": (t) => m(e, "value", t)
287
+ }, {
288
+ default: l(() => [
289
+ p(" Value ")
290
+ ]),
291
+ _: 2
292
+ }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
293
+ ]),
294
+ _: 2
295
+ }, 1024)
296
+ ], 64))
297
+ ], 64)) : e.type === "oauth2" ? (i(), x(n(ee), {
203
298
  key: 3,
204
- activeScheme: l(a),
205
- schemeModel: c.value,
206
- updateScheme: m
207
- }, null, 8, ["activeScheme", "schemeModel"])) : B("", !0)
208
- ];
209
- }),
299
+ scheme: e
300
+ }, null, 8, ["scheme"])) : I("", !0)
301
+ ], 64))), 128))
302
+ ]),
210
303
  _: 1
211
304
  })
212
305
  ])
@@ -216,5 +309,5 @@ const q = { class: "flex gap-1" }, z = { class: "flex h-8 items-center" }, L = /
216
309
  }
217
310
  });
218
311
  export {
219
- ae as default
312
+ Ve as default
220
313
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAmXA,wBAKG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";AAgYA,wBAKG"}