@scalar/api-client 2.1.31 → 2.1.33

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 (54) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +3 -3
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  7. package/dist/components/CodeInput/CodeInput.vue2.js +104 -92
  8. package/dist/components/CodeInput/codeVariableWidget.js +3 -3
  9. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  11. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +110 -95
  12. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  13. package/dist/components/DataTable/DataTableCell.vue.js +5 -5
  14. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  15. package/dist/components/SideNav/SideNav.vue.js +1 -1
  16. package/dist/components/SideNav/SideNav.vue2.js +22 -22
  17. package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
  18. package/dist/components/ViewLayout/ViewLayout.vue.js +4 -4
  19. package/dist/constants.d.ts +1 -1
  20. package/dist/constants.js +1 -1
  21. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  22. package/dist/layouts/App/ApiClientApp.vue.js +37 -42
  23. package/dist/layouts/App/MainLayout.vue.d.ts +12 -0
  24. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -0
  25. package/dist/layouts/App/MainLayout.vue.js +18 -0
  26. package/dist/layouts/App/MainLayout.vue2.js +4 -0
  27. package/dist/layouts/App/create-api-client-app.d.ts +6 -5
  28. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  29. package/dist/layouts/Modal/create-api-client-modal.d.ts +12 -10
  30. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  31. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  32. package/dist/layouts/Web/ApiClientWeb.vue.js +26 -31
  33. package/dist/layouts/Web/create-api-client-web.d.ts +6 -5
  34. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  35. package/dist/libs/create-client.d.ts +6 -5
  36. package/dist/libs/create-client.d.ts.map +1 -1
  37. package/dist/libs/create-client.js +21 -18
  38. package/dist/store/store.d.ts +28 -13
  39. package/dist/store/store.d.ts.map +1 -1
  40. package/dist/store/store.js +112 -108
  41. package/dist/store/workspace.d.ts +4 -4
  42. package/dist/style.css +1 -1
  43. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +4 -1
  44. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  45. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +61 -48
  46. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  47. package/dist/views/Request/RequestSection/RequestBody.vue.js +5 -384
  48. package/dist/views/Request/RequestSection/RequestBody.vue2.js +384 -2
  49. package/dist/views/Request/RequestSection/RequestSection.vue.js +15 -15
  50. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  51. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  52. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  53. package/dist/views/Settings/SettingsGeneral.vue.js +90 -65
  54. package/package.json +6 -6
@@ -8,7 +8,10 @@ declare const _default: import("vue").DefineComponent<{
8
8
  left: number;
9
9
  top: number;
10
10
  };
11
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
+ }, {
12
+ handleArrowKey: (direction: "up" | "down") => void;
13
+ handleSelect: () => void;
14
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
15
  select: (variable: string) => any;
13
16
  }, string, import("vue").PublicProps, Readonly<{
14
17
  query: string;
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;;WAK/B,MAAM;wBACO,cAAc,CAAC,oBAAoB,CAAC;YAChD,MAAM;uBAEK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;;;WAJzC,MAAM;wBACO,cAAc,CAAC,oBAAoB,CAAC;YAChD,MAAM;uBAEK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;;;AAoPlD,wBASG"}
1
+ {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AA0JA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;;WAK/B,MAAM;wBACO,cAAc,CAAC,oBAAoB,CAAC;YAChD,MAAM;uBAEK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;gCAqDf,IAAI,GAAG,MAAM;;;;;WAzDvC,MAAM;wBACO,cAAc,CAAC,oBAAoB,CAAC;YAChD,MAAM;uBAEK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;;;AAyRlD,wBAUG"}
@@ -1,9 +1,9 @@
1
- import { defineComponent as B, ref as f, computed as O, openBlock as r, createBlock as m, unref as i, normalizeStyle as D, withCtx as v, createElementBlock as c, Fragment as N, renderList as P, createElementVNode as u, normalizeClass as R, createTextVNode as w, toDisplayString as k, createVNode as $ } from "vue";
2
- import { ScalarDropdown as j, ScalarButton as q, ScalarIcon as z } from "@scalar/components";
3
- import { onClickOutside as A } from "@vueuse/core";
4
- import F from "fuse.js";
5
- import { parseEnvVariables as y } from "../../libs/environment-parser.js";
6
- const I = { key: 0 }, T = ["onClick"], L = { class: "flex items-center gap-1.5 whitespace-nowrap" }, Q = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, W = /* @__PURE__ */ B({
1
+ import { defineComponent as I, ref as u, computed as N, onMounted as P, openBlock as s, createBlock as w, unref as d, normalizeStyle as R, withCtx as h, createElementBlock as p, Fragment as $, renderList as j, normalizeClass as y, createElementVNode as f, createTextVNode as b, toDisplayString as k, createVNode as q } from "vue";
2
+ import { ScalarDropdown as z, ScalarButton as F, ScalarIcon as K } from "@scalar/components";
3
+ import { onClickOutside as T } from "@vueuse/core";
4
+ import L from "fuse.js";
5
+ import { parseEnvVariables as x } from "../../libs/environment-parser.js";
6
+ const M = { key: 0 }, Q = ["onClick"], G = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, oe = /* @__PURE__ */ I({
7
7
  __name: "EnvironmentVariableDropdown",
8
8
  props: {
9
9
  query: {},
@@ -12,71 +12,84 @@ const I = { key: 0 }, T = ["onClick"], L = { class: "flex items-center gap-1.5 w
12
12
  dropdownPosition: {}
13
13
  },
14
14
  emits: ["select"],
15
- setup(h, { emit: b }) {
16
- const t = h, x = b, a = f(!0), l = f(null), g = () => {
17
- const e = V.value.params.workspace;
18
- _(`/workspace/${e}/environment/default`), a.value = !1;
19
- }, { push: _, currentRoute: V } = t.router, E = new F(y(t.activeEnvVariables.value), {
15
+ setup(g, { expose: V, emit: _ }) {
16
+ const r = g, E = _, i = u(!0), c = u(null), n = u(0), C = () => {
17
+ const e = A.value.params.workspace;
18
+ S(`/workspace/${e}/environment/default`), i.value = !1;
19
+ }, { push: S, currentRoute: A } = r.router, B = new L(x(r.activeEnvVariables.value), {
20
20
  keys: ["key", "value"]
21
- }), p = O(() => {
22
- const e = t.query;
21
+ }), a = N(() => {
22
+ const e = r.query;
23
23
  if (!e)
24
- return y(t.activeEnvVariables.value).slice(-4);
25
- const o = E.search(e);
26
- return o.length > 0 ? o.map((n) => n.item) : [];
27
- }), C = (e) => {
28
- x("select", e);
29
- }, S = () => t.activeEnvVariables.value.map((e) => {
24
+ return x(r.activeEnvVariables.value).slice(-4);
25
+ const o = B.search(e);
26
+ return o.length > 0 ? o.map((t) => t.item) : [];
27
+ }), v = (e) => {
28
+ E("select", e);
29
+ }, O = () => r.activeEnvVariables.value.map((e) => {
30
30
  if (e.key === "color")
31
31
  return `bg-${e.value}`;
32
32
  });
33
- return A(
34
- l,
33
+ return V({
34
+ handleArrowKey: (e) => {
35
+ const o = e === "up" ? -1 : 1, t = a.value.length;
36
+ t !== 0 && (n.value = (n.value + o + t) % t);
37
+ },
38
+ handleSelect: () => {
39
+ if (n.value >= 0) {
40
+ const e = a.value[n.value];
41
+ e && v(e.key);
42
+ }
43
+ }
44
+ }), P(() => {
45
+ n.value = 0;
46
+ }), T(
47
+ c,
35
48
  () => {
36
- a.value = !1;
49
+ i.value = !1;
37
50
  },
38
- { ignore: [l] }
51
+ { ignore: [c] }
39
52
  ), (e, o) => {
40
- var n, d;
41
- return r(), m(i(j), {
53
+ var t, m;
54
+ return s(), w(d(z), {
42
55
  ref_key: "dropdownRef",
43
- ref: l,
56
+ ref: c,
44
57
  class: "mt-2 min-w-60 rounded border bg-b-1 p-1 w-fit",
45
58
  static: "",
46
- staticOpen: a.value,
47
- style: D({
48
- left: ((n = e.dropdownPosition) == null ? void 0 : n.left) + "px",
49
- top: ((d = e.dropdownPosition) == null ? void 0 : d.top) + "px"
59
+ staticOpen: i.value,
60
+ style: R({
61
+ left: ((t = e.dropdownPosition) == null ? void 0 : t.left) + "px",
62
+ top: ((m = e.dropdownPosition) == null ? void 0 : m.top) + "px"
50
63
  }),
51
64
  teleport: ".scalar-client"
52
65
  }, {
53
- items: v(() => [
54
- p.value.length ? (r(), c("ul", I, [
55
- (r(!0), c(N, null, P(p.value, (s) => (r(), c("li", {
56
- key: s.key,
57
- class: "h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150",
58
- onClick: (G) => C(s.key)
66
+ items: h(() => [
67
+ a.value.length ? (s(), p("ul", M, [
68
+ (s(!0), p($, null, j(a.value, (l, D) => (s(), p("li", {
69
+ key: l.key,
70
+ class: y(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": D === n.value }]),
71
+ onClick: (W) => v(l.key)
59
72
  }, [
60
- u("div", L, [
61
- u("span", {
62
- class: R(["h-2.5 w-2.5 min-w-2.5 rounded-full", S()])
73
+ f("div", G, [
74
+ f("span", {
75
+ class: y(["h-2.5 w-2.5 min-w-2.5 rounded-full", O()])
63
76
  }, null, 2),
64
- w(" " + k(s.key), 1)
77
+ b(" " + k(l.key), 1)
65
78
  ]),
66
- u("span", Q, k(s.value), 1)
67
- ], 8, T))), 128))
68
- ])) : (r(), m(i(q), {
79
+ f("span", H, k(l.value), 1)
80
+ ], 10, Q))), 128))
81
+ ])) : (s(), w(d(F), {
69
82
  key: 1,
70
83
  class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
71
84
  variant: "secondary",
72
- onClick: g
85
+ onClick: C
73
86
  }, {
74
- default: v(() => [
75
- $(i(z), {
87
+ default: h(() => [
88
+ q(d(K), {
76
89
  class: "w-2.5",
77
90
  icon: "Add"
78
91
  }),
79
- o[0] || (o[0] = w(" Add Variable "))
92
+ o[0] || (o[0] = b(" Add Variable "))
80
93
  ]),
81
94
  _: 1
82
95
  }))
@@ -87,5 +100,5 @@ const I = { key: 0 }, T = ["onClick"], L = { class: "flex items-center gap-1.5 w
87
100
  }
88
101
  });
89
102
  export {
90
- W as default
103
+ oe as default
91
104
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WAghBS,MAAM;;WAAN,MAAM;;AAi3Bf,wBAMG"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WAqhBS,MAAM;;WAAN,MAAM;;AAm3Bf,wBAMG"}
@@ -1,386 +1,7 @@
1
- import { defineComponent as G, computed as w, ref as K, watch as S, openBlock as p, createBlock as b, withCtx as u, createTextVNode as q, toDisplayString as F, createVNode as s, unref as c, createElementVNode as x, createElementBlock as R, Fragment as Q, nextTick as Z } from "vue";
2
- import I from "../../../components/CodeInput/CodeInput.vue.js";
3
- import ee from "../../../components/DataTable/DataTable.vue.js";
4
- import ae from "../../../components/DataTable/DataTableHeader.vue.js";
5
- import k from "../../../components/DataTable/DataTableRow.vue.js";
6
- import te from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
- import { ScalarListbox as oe, ScalarButton as _, ScalarIcon as L } from "@scalar/components";
8
- import { requestExampleParametersSchema as M } from "@scalar/oas-utils/entities/spec";
9
- import { canMethodHaveBody as ne } from "@scalar/oas-utils/helpers";
10
- import W from "./RequestTable.vue.js";
11
- import { useWorkspace as le } from "../../../store/store.js";
12
- import { useFileDialog as A } from "../../../hooks/useFileDialog.js";
13
- const re = {
14
- key: 0,
15
- class: "text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
16
- }, de = {
17
- key: 1,
18
- class: "flex items-center justify-center p-1.5 overflow-hidden"
19
- }, ie = { class: "text-c-2 text-xs w-full border rounded p-1 max-w-full overflow-hidden whitespace-nowrap" }, De = /* @__PURE__ */ G({
20
- __name: "RequestBody",
21
- props: {
22
- title: {}
23
- },
24
- setup(ue) {
25
- const { activeRequest: i, activeExample: a, requestExampleMutators: r } = le(), z = {
26
- json: "json",
27
- xml: "xml",
28
- yaml: "yaml",
29
- edn: "edn",
30
- other: "html"
31
- }, h = Object.entries({
32
- multipartForm: "Multipart Form",
33
- formUrlEncoded: "Form URL Encoded",
34
- binaryFile: "Binary File",
35
- json: "JSON",
36
- xml: "XML",
37
- yaml: "YAML",
38
- edn: "EDN",
39
- other: "Other",
40
- none: "None"
41
- }).map(([e, t]) => ({
42
- id: e,
43
- label: t
44
- })), B = w(() => {
45
- var e, t;
46
- return a.value ? a.value.body.activeBody === "formData" ? ((e = a.value.body.formData) == null ? void 0 : e.encoding) === "urlencoded" ? "formUrlEncoded" : "multipartForm" : a.value.body.activeBody === "binary" ? "binaryFile" : a.value.body.activeBody === "raw" && ((t = a.value.body.raw) != null && t.encoding) ? a.value.body.raw.encoding === "html" ? "other" : a.value.body.raw.encoding : "none" : "none";
47
- }), m = w({
48
- get: () => h.find(
49
- (e) => e.id === B.value
50
- ) ?? h[h.length - 1],
51
- set: (e) => {
52
- e != null && e.id && C(e.id);
53
- }
54
- }), g = K(null), O = w(() => {
55
- const e = m.value.id;
56
- return z[e] ?? "plaintext";
57
- });
58
- function U() {
59
- console.log("deleteRow");
60
- }
61
- const T = (e, t, o) => {
62
- if (!i.value || !a.value) return;
63
- const l = v.value;
64
- if (l.length > e) {
65
- const n = [...l];
66
- n[e] = { ...n[e], [t]: o }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), r.edit(
67
- a.value.uid,
68
- "body.formData.value",
69
- n
70
- );
71
- } else {
72
- const n = [M.parse({ [t]: o })];
73
- r.edit(
74
- a.value.uid,
75
- "body.formData.value",
76
- n
77
- ), Z(() => {
78
- var y;
79
- if (!g.value) return;
80
- (y = g.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || y.focus();
81
- });
82
- }
83
- }, v = w(
84
- () => {
85
- var e, t, o;
86
- return ((o = (t = (e = a.value) == null ? void 0 : e.body) == null ? void 0 : t.formData) == null ? void 0 : o.value) ?? [];
87
- }
88
- ), E = () => v.value.length === 0 && D(), D = () => {
89
- if (!i.value || !a.value) return;
90
- const e = M.parse({
91
- enabled: !1
92
- }), t = [...v.value, e];
93
- a.value.body.formData ? r.edit(
94
- a.value.uid,
95
- "body.formData.value",
96
- t
97
- ) : r.edit(a.value.uid, "body.formData", {
98
- value: t,
99
- encoding: "form-data"
100
- });
101
- }, P = (e, t) => {
102
- if (!i.value || !a.value) return;
103
- const o = v.value;
104
- if (o.length > e) {
105
- const l = [...o];
106
- l[e].enabled = t, r.edit(
107
- a.value.uid,
108
- "body.formData.value",
109
- l
110
- );
111
- }
112
- }, $ = (e) => {
113
- !i.value || !a.value || r.edit(a.value.uid, "body.raw.value", e);
114
- }, H = (e) => e === "multipartForm" ? {
115
- activeBody: "formData",
116
- encoding: "form-data",
117
- header: "multipart/form-data"
118
- } : e === "formUrlEncoded" ? {
119
- activeBody: "formData",
120
- encoding: "urlencoded",
121
- header: "application/x-www-form-urlencoded"
122
- } : e === "binaryFile" ? {
123
- activeBody: "binary",
124
- encoding: void 0,
125
- header: "application/octet-stream"
126
- } : e === "json" ? {
127
- activeBody: "raw",
128
- encoding: "json",
129
- header: "application/json"
130
- } : e === "xml" ? {
131
- activeBody: "raw",
132
- encoding: "xml",
133
- header: "application/xml"
134
- } : e === "yaml" ? {
135
- activeBody: "raw",
136
- encoding: "yaml",
137
- header: "application/yaml"
138
- } : e === "edn" ? {
139
- activeBody: "raw",
140
- encoding: "edn",
141
- header: "application/edn"
142
- } : e === "other" ? {
143
- activeBody: "raw",
144
- encoding: "html",
145
- header: "application/html"
146
- } : { activeBody: "raw", encoding: void 0, header: void 0 }, C = (e) => {
147
- var f, y;
148
- if (!a.value) return;
149
- const { activeBody: t, encoding: o, header: l } = H(e);
150
- if (r.edit(
151
- a.value.uid,
152
- "body.activeBody",
153
- t
154
- ), o && t === "raw")
155
- r.edit(a.value.uid, "body.raw", {
156
- encoding: o,
157
- value: ((f = a.value.body.raw) == null ? void 0 : f.value) ?? ""
158
- });
159
- else if (o && t === "formData")
160
- r.edit(a.value.uid, "body.formData", {
161
- encoding: o,
162
- value: ((y = a.value.body.formData) == null ? void 0 : y.value) ?? []
163
- });
164
- else if (!o) {
165
- const { raw: N, ...Y } = a.value.body;
166
- r.edit(a.value.uid, "body", Y);
167
- }
168
- const n = [...a.value.parameters.headers], d = n.findIndex(
169
- (N) => N.key.toLowerCase() === "content-type"
170
- );
171
- d >= 0 ? l ? n[d].value = l : n.splice(d, 1) : l && n.unshift({
172
- key: "Content-Type",
173
- value: l,
174
- enabled: !0
175
- }), r.edit(
176
- a.value.uid,
177
- "parameters.headers",
178
- n
179
- );
180
- }, j = async (e) => {
181
- const { open: t } = A({
182
- onChange: async (o) => {
183
- const l = o == null ? void 0 : o[0];
184
- if (l && i.value && a.value) {
185
- const d = [...v.value];
186
- d[e] = {
187
- ...d[e],
188
- file: l
189
- }, r.edit(
190
- a.value.uid,
191
- "body.formData.value",
192
- d
193
- );
194
- }
195
- },
196
- multiple: !1,
197
- accept: "*/*"
198
- });
199
- t();
200
- };
201
- function J() {
202
- !i.value || !a.value || r.edit(a.value.uid, "body.binary", void 0);
203
- }
204
- function V(e) {
205
- if (!i.value || !a.value) return;
206
- const o = [...v.value];
207
- o[e] = {
208
- ...o[e],
209
- file: void 0
210
- }, r.edit(
211
- a.value.uid,
212
- "body.formData.value",
213
- o
214
- );
215
- }
216
- function X() {
217
- const { open: e } = A({
218
- onChange: async (t) => {
219
- const o = t == null ? void 0 : t[0];
220
- o && i.value && a.value && r.edit(
221
- a.value.uid,
222
- "body.binary",
223
- o
224
- );
225
- },
226
- multiple: !1,
227
- accept: "*/*"
228
- });
229
- e();
230
- }
231
- return S(
232
- m,
233
- (e) => {
234
- ["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) && E();
235
- },
236
- { immediate: !0 }
237
- ), S(
238
- () => {
239
- var e;
240
- return (e = a.value) == null ? void 0 : e.uid;
241
- },
242
- () => {
243
- var e;
244
- (e = i.value) != null && e.method && ne(i.value.method) && C(B.value), ["multipartForm", "formUrlEncoded"].includes(
245
- B.value
246
- ) && E();
247
- },
248
- { immediate: !0 }
249
- ), (e, t) => (p(), b(te, null, {
250
- title: u(() => [
251
- q(F(e.title), 1)
252
- ]),
253
- default: u(() => [
254
- s(ee, { columns: [""] }, {
255
- default: u(() => [
256
- s(k, null, {
257
- default: u(() => [
258
- s(ae, { class: "relative col-span-full flex h-8 cursor-pointer items-center px-[2.25px] py-[2.25px]" }, {
259
- default: u(() => [
260
- s(c(oe), {
261
- modelValue: m.value,
262
- "onUpdate:modelValue": t[0] || (t[0] = (o) => m.value = o),
263
- class: "text-xxs w-full",
264
- fullWidth: "",
265
- options: c(h),
266
- teleport: ""
267
- }, {
268
- default: u(() => [
269
- s(c(_), {
270
- class: "flex gap-1.5 h-auto px-1.5 text-c-2 font-normal hover:text-c-1",
271
- fullWidth: "",
272
- variant: "ghost"
273
- }, {
274
- default: u(() => {
275
- var o;
276
- return [
277
- x("span", null, F((o = m.value) == null ? void 0 : o.label), 1),
278
- s(c(L), {
279
- icon: "ChevronDown",
280
- size: "xs",
281
- thickness: "2.5"
282
- })
283
- ];
284
- }),
285
- _: 1
286
- })
287
- ]),
288
- _: 1
289
- }, 8, ["modelValue", "options"])
290
- ]),
291
- _: 1
292
- })
293
- ]),
294
- _: 1
295
- }),
296
- s(k, null, {
297
- default: u(() => {
298
- var o, l, n, d, f;
299
- return [
300
- m.value.id === "none" ? (p(), R("div", re, t[1] || (t[1] = [
301
- x("span", null, "No Body", -1)
302
- ]))) : m.value.id === "binaryFile" ? (p(), R("div", de, [
303
- (o = c(a)) != null && o.body.binary ? (p(), R(Q, { key: 0 }, [
304
- x("span", ie, F(((l = c(a)) == null ? void 0 : l.body.binary).name), 1),
305
- s(c(_), {
306
- class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
307
- size: "sm",
308
- variant: "outlined",
309
- onClick: J
310
- }, {
311
- default: u(() => t[2] || (t[2] = [
312
- q(" Delete ")
313
- ])),
314
- _: 1
315
- })
316
- ], 64)) : (p(), b(c(_), {
317
- key: 1,
318
- class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
319
- size: "sm",
320
- variant: "outlined",
321
- onClick: X
322
- }, {
323
- default: u(() => [
324
- t[3] || (t[3] = x("span", null, "Upload File", -1)),
325
- s(c(L), {
326
- class: "ml-1",
327
- icon: "UploadSimple",
328
- size: "xs",
329
- thickness: "2.5"
330
- })
331
- ]),
332
- _: 1
333
- }))
334
- ])) : m.value.id == "multipartForm" ? (p(), b(W, {
335
- key: 2,
336
- ref_key: "tableWrapperRef",
337
- ref: g,
338
- class: "!m-0 rounded-t-none shadow-none border-l-0 border-r-0 border-t-0 border-b-0",
339
- columns: ["32px", "", "", "61px"],
340
- items: v.value,
341
- showUploadButton: "",
342
- onAddRow: D,
343
- onDeleteRow: U,
344
- onRemoveFile: V,
345
- onToggleRow: P,
346
- onUpdateRow: T,
347
- onUploadFile: j
348
- }, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (p(), b(W, {
349
- key: 3,
350
- ref_key: "tableWrapperRef",
351
- ref: g,
352
- class: "!m-0 rounded-t-none border-t-0 shadow-none border-l-0 border-r-0 border-t-0 border-b-0",
353
- columns: ["32px", "", "", "61px"],
354
- items: v.value,
355
- showUploadButton: "",
356
- onAddRow: D,
357
- onDeleteRow: U,
358
- onRemoveFile: V,
359
- onToggleRow: P,
360
- onUpdateRow: T,
361
- onUploadFile: j
362
- }, null, 8, ["items"])) : (p(), b(I, {
363
- key: 4,
364
- content: "",
365
- language: O.value,
366
- lineNumbers: "",
367
- lint: "",
368
- modelValue: ((f = (d = (n = c(a)) == null ? void 0 : n.body) == null ? void 0 : d.raw) == null ? void 0 : f.value) ?? "",
369
- "onUpdate:modelValue": $
370
- }, null, 8, ["language", "modelValue"]))
371
- ];
372
- }),
373
- _: 1
374
- }),
375
- s(k)
376
- ]),
377
- _: 1
378
- })
379
- ]),
380
- _: 1
381
- }));
382
- }
383
- });
1
+ import o from "./RequestBody.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-33e11d9f"]]);
384
5
  export {
385
- De as default
6
+ m as default
386
7
  };