@scalar/api-client 2.3.14 → 2.3.15

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 (53) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/components/DataTable/DataTable.vue.d.ts +2 -0
  3. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  4. package/dist/components/DataTable/DataTable.vue.js +17 -15
  5. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  6. package/dist/components/DataTable/DataTableCell.vue.js +6 -9
  7. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
  8. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +68 -23
  9. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  10. package/dist/components/ImportCollection/ImportNowButton.vue.js +41 -54
  11. package/dist/components/ImportCollection/utils/import-collection.d.ts +12 -0
  12. package/dist/components/ImportCollection/utils/import-collection.d.ts.map +1 -0
  13. package/dist/components/ImportCollection/utils/import-collection.js +29 -0
  14. package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +6 -0
  15. package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts.map +1 -0
  16. package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +7 -0
  17. package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
  18. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  19. package/dist/components/ScalarAsciiArt.vue2.js +10 -8
  20. package/dist/components/ScalarHotkey.test.d.ts +2 -0
  21. package/dist/components/ScalarHotkey.test.d.ts.map +1 -0
  22. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  23. package/dist/components/ScalarHotkey.vue.js +34 -11
  24. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  25. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  26. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  27. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  28. package/dist/style.css +1 -1
  29. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  30. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
  31. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +2 -1
  32. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  33. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  34. package/dist/views/Request/RequestSection/RequestBody.vue2.js +4 -1
  35. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  36. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  37. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +4 -1
  38. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
  39. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSection/RequestParams.vue.js +19 -16
  41. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  42. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  43. package/dist/views/Request/RequestSection/RequestSection.vue2.js +9 -6
  44. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -0
  45. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  47. package/dist/views/Request/RequestSection/RequestTable.vue2.js +123 -126
  48. package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -1
  49. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +53 -35
  50. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  51. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  52. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +53 -35
  53. package/package.json +3 -3
@@ -1,18 +1,18 @@
1
- import { defineComponent as _, openBlock as d, createBlock as p, withCtx as n, createVNode as t, createElementVNode as s, createTextVNode as k, createElementBlock as m, Fragment as f, renderList as I, normalizeClass as w, unref as i, toDisplayString as V, createCommentVNode as x } from "vue";
2
- import { ScalarTooltip as z, ScalarIcon as g, ScalarButton as D } from "@scalar/components";
3
- import { RouterLink as E } from "vue-router";
4
- import B from "../../../components/CodeInput/CodeInput.vue.js";
5
- import q from "../../../components/DataTable/DataTable.vue.js";
6
- import c from "../../../components/DataTable/DataTableCell.vue.js";
1
+ import { defineComponent as I, openBlock as r, createBlock as p, withCtx as n, createVNode as t, createTextVNode as c, toDisplayString as m, createElementBlock as f, Fragment as w, renderList as _, normalizeClass as V, unref as u, createElementVNode as i, createCommentVNode as g } from "vue";
2
+ import { ScalarTooltip as z, ScalarIcon as B, ScalarButton as q } from "@scalar/components";
3
+ import { RouterLink as D } from "vue-router";
4
+ import x from "../../../components/CodeInput/CodeInput.vue.js";
5
+ import E from "../../../components/DataTable/DataTable.vue.js";
6
+ import v from "../../../components/DataTable/DataTableCell.vue.js";
7
7
  import G from "../../../components/DataTable/DataTableCheckbox.vue.js";
8
- import v from "../../../components/DataTable/DataTableHeader.vue.js";
9
- import R from "../../../components/DataTable/DataTableRow.vue.js";
10
- import { parameterIsInvalid as N, hasItemProperties as C } from "../libs/request.js";
8
+ import k from "../../../components/DataTable/DataTableHeader.vue.js";
9
+ import h from "../../../components/DataTable/DataTableRow.vue.js";
10
+ import { parameterIsInvalid as N, hasItemProperties as R } from "../libs/request.js";
11
11
  import P from "./RequestTableTooltip.vue.js";
12
- const j = { 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"], L = {
12
+ const j = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, O = ["onClick"], A = {
13
13
  key: 1,
14
14
  class: "p-0.5"
15
- }, oe = /* @__PURE__ */ _({
15
+ }, le = /* @__PURE__ */ I({
16
16
  __name: "RequestTable",
17
17
  props: {
18
18
  items: {},
@@ -23,177 +23,174 @@ const j = { class: "contents" }, O = { class: "sr-only" }, A = { class: "text-c-
23
23
  environment: {},
24
24
  envVariables: {},
25
25
  workspace: {},
26
- invalidParams: {}
26
+ invalidParams: {},
27
+ label: {}
27
28
  },
28
29
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
29
- setup(h, { emit: F }) {
30
- const b = h, r = F, U = ["", "", "36px"], y = (a, l, e) => {
31
- r("updateRow", a, l, e);
32
- }, S = (a) => {
33
- r("uploadFile", a);
34
- }, $ = (a) => Array.isArray(a.default) && a.default.length === 1 ? a.default[0] : a.default;
35
- return (a, l) => (d(), p(q, {
30
+ setup(C, { emit: F }) {
31
+ const b = C, s = F, U = ["", "", "36px"], y = (e, a, l) => {
32
+ s("updateRow", e, a, l);
33
+ }, S = (e) => {
34
+ s("uploadFile", e);
35
+ }, $ = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
36
+ return (e, a) => (r(), p(E, {
36
37
  class: "group/table flex-1",
37
38
  columns: U
38
39
  }, {
39
40
  default: n(() => [
40
- t(R, { class: "sr-only !block" }, {
41
+ t(h, { class: "sr-only !block" }, {
41
42
  default: n(() => [
42
- t(v, null, {
43
- default: n(() => l[4] || (l[4] = [
44
- s("span", { class: "sr-only" }, "Enabled", -1)
45
- ])),
43
+ t(k, null, {
44
+ default: n(() => [
45
+ c(m(e.label) + " Enabled", 1)
46
+ ]),
46
47
  _: 1
47
48
  }),
48
- t(v, null, {
49
- default: n(() => l[5] || (l[5] = [
50
- k("Key")
51
- ])),
49
+ t(k, null, {
50
+ default: n(() => [
51
+ c(m(e.label) + " Key", 1)
52
+ ]),
52
53
  _: 1
53
54
  }),
54
- t(v, null, {
55
- default: n(() => l[6] || (l[6] = [
56
- k("Value")
57
- ])),
55
+ t(k, null, {
56
+ default: n(() => [
57
+ c(m(e.label) + " Value", 1)
58
+ ]),
58
59
  _: 1
59
60
  })
60
61
  ]),
61
62
  _: 1
62
63
  }),
63
- (d(!0), m(f, null, I(a.items, (e, u) => (d(), p(R, {
64
- id: e.key,
65
- key: u,
66
- class: w({
67
- alert: i(N)(e).value,
68
- error: a.invalidParams && a.invalidParams.has(e.key)
64
+ (r(!0), f(w, null, _(e.items, (l, d) => (r(), p(h, {
65
+ id: l.key,
66
+ key: d,
67
+ class: V({
68
+ alert: u(N)(l).value,
69
+ error: e.invalidParams && e.invalidParams.has(l.key)
69
70
  })
70
71
  }, {
71
72
  default: n(() => [
72
- s("label", j, [
73
- a.isGlobal ? (d(), p(i(E), {
74
- key: 0,
75
- class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
76
- to: e.route ?? {}
77
- }, {
78
- default: n(() => [
79
- l[8] || (l[8] = s("span", { class: "sr-only" }, "Global", -1)),
80
- t(i(z), {
81
- as: "div",
82
- side: "top"
83
- }, {
84
- trigger: n(() => [
85
- t(i(g), {
86
- class: "text-c-1",
87
- icon: "Globe",
88
- size: "xs"
89
- })
90
- ]),
91
- content: n(() => l[7] || (l[7] = [
92
- 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" }, [
93
- s("div", { class: "text-c-1 flex items-center" }, [
94
- s("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
95
- ])
96
- ], -1)
97
- ])),
98
- _: 1
99
- })
100
- ]),
101
- _: 2
102
- }, 1032, ["to"])) : (d(), m(f, { key: 1 }, [
103
- s("span", O, " Row " + V(e.enabled ? "Enabled" : "Disabled"), 1),
104
- t(G, {
105
- class: "!border-r-1/2",
106
- disabled: b.hasCheckboxDisabled,
107
- modelValue: e.enabled,
108
- "onUpdate:modelValue": (o) => r("toggleRow", u, o)
109
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])
110
- ], 64))
111
- ]),
112
- t(c, null, {
73
+ e.isGlobal ? (r(), p(u(D), {
74
+ key: 0,
75
+ class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
76
+ to: l.route ?? {}
77
+ }, {
78
+ default: n(() => [
79
+ a[5] || (a[5] = i("span", { class: "sr-only" }, "Global", -1)),
80
+ t(u(z), {
81
+ as: "div",
82
+ side: "top"
83
+ }, {
84
+ trigger: n(() => [
85
+ t(u(B), {
86
+ class: "text-c-1",
87
+ icon: "Globe",
88
+ size: "xs"
89
+ })
90
+ ]),
91
+ content: n(() => a[4] || (a[4] = [
92
+ i("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" }, [
93
+ i("div", { class: "text-c-1 flex items-center" }, [
94
+ i("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
95
+ ])
96
+ ], -1)
97
+ ])),
98
+ _: 1
99
+ })
100
+ ]),
101
+ _: 2
102
+ }, 1032, ["to"])) : (r(), p(G, {
103
+ key: 1,
104
+ class: "!border-r-1/2",
105
+ disabled: b.hasCheckboxDisabled,
106
+ modelValue: l.enabled,
107
+ "onUpdate:modelValue": (o) => s("toggleRow", d, o)
108
+ }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])),
109
+ t(v, null, {
113
110
  default: n(() => [
114
- t(B, {
111
+ t(x, {
115
112
  disableCloseBrackets: "",
116
113
  disabled: b.isReadOnly,
117
114
  disableEnter: "",
118
115
  disableTabIndent: "",
119
- envVariables: a.envVariables,
120
- environment: a.environment,
121
- modelValue: e.key,
116
+ envVariables: e.envVariables,
117
+ environment: e.environment,
118
+ modelValue: l.key,
122
119
  placeholder: "Key",
123
- required: !!e.required,
124
- workspace: a.workspace,
125
- onBlur: l[0] || (l[0] = (o) => r("inputBlur")),
126
- onFocus: l[1] || (l[1] = (o) => r("inputFocus")),
127
- onSelectVariable: (o) => y(u, "key", o),
128
- "onUpdate:modelValue": (o) => r("updateRow", u, "key", o)
120
+ required: !!l.required,
121
+ workspace: e.workspace,
122
+ onBlur: a[0] || (a[0] = (o) => s("inputBlur")),
123
+ onFocus: a[1] || (a[1] = (o) => s("inputFocus")),
124
+ onSelectVariable: (o) => y(d, "key", o),
125
+ "onUpdate:modelValue": (o) => s("updateRow", d, "key", o)
129
126
  }, null, 8, ["disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
130
127
  ]),
131
128
  _: 2
132
129
  }, 1024),
133
- t(c, null, {
130
+ t(v, null, {
134
131
  default: n(() => [
135
- t(B, {
136
- class: w({
137
- "pr-6": i(C)(e)
132
+ t(x, {
133
+ class: V({
134
+ "pr-6": u(R)(l)
138
135
  }),
139
- default: e.default,
136
+ default: l.default,
140
137
  disableCloseBrackets: "",
141
138
  disabled: b.isReadOnly,
142
139
  disableEnter: "",
143
140
  disableTabIndent: "",
144
- enum: e.enum ?? [],
145
- envVariables: a.envVariables,
146
- environment: a.environment,
147
- examples: e.examples ?? [],
148
- max: e.maximum,
149
- min: e.minimum,
150
- modelValue: e.value,
151
- nullable: !!e.nullable,
141
+ enum: l.enum ?? [],
142
+ envVariables: e.envVariables,
143
+ environment: e.environment,
144
+ examples: l.examples ?? [],
145
+ max: l.maximum,
146
+ min: l.minimum,
147
+ modelValue: l.value,
148
+ nullable: !!l.nullable,
152
149
  placeholder: "Value",
153
- type: e.type,
154
- workspace: a.workspace,
155
- onBlur: l[2] || (l[2] = (o) => r("inputBlur")),
156
- onFocus: l[3] || (l[3] = (o) => r("inputFocus")),
157
- onSelectVariable: (o) => y(u, "value", o),
158
- "onUpdate:modelValue": (o) => r("updateRow", u, "value", o)
150
+ type: l.type,
151
+ workspace: e.workspace,
152
+ onBlur: a[2] || (a[2] = (o) => s("inputBlur")),
153
+ onFocus: a[3] || (a[3] = (o) => s("inputFocus")),
154
+ onSelectVariable: (o) => y(d, "value", o),
155
+ "onUpdate:modelValue": (o) => s("updateRow", d, "value", o)
159
156
  }, {
160
157
  icon: n(() => [
161
- i(C)(e) ? (d(), p(P, {
158
+ u(R)(l) ? (r(), p(P, {
162
159
  key: 0,
163
- item: { ...e, default: $(e) }
164
- }, null, 8, ["item"])) : x("", !0)
160
+ item: { ...l, default: $(l) }
161
+ }, null, 8, ["item"])) : g("", !0)
165
162
  ]),
166
163
  _: 2
167
164
  }, 1032, ["class", "default", "disabled", "enum", "envVariables", "environment", "examples", "max", "min", "modelValue", "nullable", "type", "workspace", "onSelectVariable", "onUpdate:modelValue"])
168
165
  ]),
169
166
  _: 2
170
167
  }, 1024),
171
- a.showUploadButton ? (d(), p(c, {
172
- key: 0,
168
+ e.showUploadButton ? (r(), p(v, {
169
+ key: 2,
173
170
  class: "group/upload flex items-center justify-center whitespace-nowrap"
174
171
  }, {
175
172
  default: n(() => {
176
173
  var o;
177
174
  return [
178
- e.file ? (d(), m(f, { key: 0 }, [
179
- s("div", A, [
180
- s("span", null, V((o = e.file) == null ? void 0 : o.name), 1)
175
+ l.file ? (r(), f(w, { key: 0 }, [
176
+ i("div", j, [
177
+ i("span", null, m((o = l.file) == null ? void 0 : o.name), 1)
181
178
  ]),
182
- s("button", {
179
+ i("button", {
183
180
  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",
184
181
  type: "button",
185
- onClick: (T) => r("removeFile", u)
186
- }, " Delete ", 8, K)
187
- ], 64)) : (d(), m("div", L, [
188
- t(i(D), {
182
+ onClick: (T) => s("removeFile", d)
183
+ }, " Delete ", 8, O)
184
+ ], 64)) : (r(), f("div", A, [
185
+ t(u(q), {
189
186
  class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
190
187
  size: "sm",
191
188
  variant: "outlined",
192
- onClick: (T) => S(u)
189
+ onClick: (T) => S(d)
193
190
  }, {
194
191
  default: n(() => [
195
- l[9] || (l[9] = s("span", null, "Upload File", -1)),
196
- t(i(g), {
192
+ a[6] || (a[6] = i("span", null, "Upload File", -1)),
193
+ t(u(B), {
197
194
  class: "ml-1",
198
195
  icon: "UploadSimple",
199
196
  size: "xs",
@@ -206,7 +203,7 @@ const j = { class: "contents" }, O = { class: "sr-only" }, A = { class: "text-c-
206
203
  ];
207
204
  }),
208
205
  _: 2
209
- }, 1024)) : x("", !0)
206
+ }, 1024)) : g("", !0)
210
207
  ]),
211
208
  _: 2
212
209
  }, 1032, ["id", "class"]))), 128))
@@ -216,5 +213,5 @@ const j = { class: "contents" }, O = { class: "sr-only" }, A = { class: "text-c-
216
213
  }
217
214
  });
218
215
  export {
219
- oe as default
216
+ le as default
220
217
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/RequestHeaders.vue"],"names":[],"mappings":"AA0EA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAwJF,wBAOG"}
1
+ {"version":3,"file":"RequestHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/RequestHeaders.vue"],"names":[],"mappings":"AAgFA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAiLF,wBAOG"}
@@ -1,68 +1,86 @@
1
- import { defineComponent as p, openBlock as e, createBlock as n, withCtx as r, createTextVNode as l, createElementBlock as s, createVNode as m, Fragment as i, renderList as _, toDisplayString as c } from "vue";
2
- import h from "../../../components/DataTable/DataTable.vue.js";
3
- import x from "../../../components/DataTable/DataTableRow.vue.js";
4
- import u from "../../../components/DataTable/DataTableText.vue.js";
5
- import g from "../../../components/HelpfulLink.vue.js";
1
+ import { defineComponent as y, openBlock as r, createBlock as f, withCtx as e, createTextVNode as n, createElementBlock as l, createVNode as a, unref as u, Fragment as i, renderList as b, toDisplayString as c } from "vue";
2
+ import g from "../../../components/DataTable/DataTable.vue.js";
3
+ import p from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import _ from "../../../components/DataTable/DataTableText.vue.js";
5
+ import k from "../../../components/HelpfulLink.vue.js";
6
6
  import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
- import { httpHeaders as y } from "../../../data/httpHeaders.js";
8
- const b = {
7
+ import { httpHeaders as h } from "../../../data/httpHeaders.js";
8
+ import x from "../../../components/DataTable/DataTableHeader.vue.js";
9
+ const H = {
9
10
  key: 0,
10
11
  class: "max-h-[calc(100%-32px)] overflow-y-auto border-t"
11
- }, k = {
12
+ }, C = {
12
13
  key: 1,
13
14
  class: "text-c-3 bg-b-1 flex min-h-12 items-center justify-center rounded border px-4 text-sm"
14
- }, q = /* @__PURE__ */ p({
15
+ }, D = /* @__PURE__ */ y({
15
16
  __name: "RequestHeaders",
16
17
  props: {
17
18
  headers: {}
18
19
  },
19
- setup(C) {
20
- const f = (o) => y.find(
21
- (a) => a.name.toLowerCase() === o.toLowerCase()
20
+ setup(v) {
21
+ const m = (s) => h.find(
22
+ (t) => t.name.toLowerCase() === s.toLowerCase()
22
23
  );
23
- return (o, a) => (e(), n(w, {
24
+ return (s, t) => (r(), f(w, {
24
25
  class: "overflow-auto",
25
26
  defaultOpen: !1,
26
- itemCount: o.headers.length
27
+ itemCount: s.headers.length
27
28
  }, {
28
- title: r(() => a[0] || (a[0] = [
29
- l("Request Headers")
29
+ title: e(() => t[0] || (t[0] = [
30
+ n("Request Headers")
30
31
  ])),
31
- default: r(() => [
32
- o.headers.length ? (e(), s("div", b, [
33
- m(h, {
32
+ default: e(() => [
33
+ s.headers.length ? (r(), l("div", H, [
34
+ a(g, {
34
35
  columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
35
36
  scroll: ""
36
37
  }, {
37
- default: r(() => [
38
- (e(!0), s(i, null, _(o.headers, (t) => (e(), n(x, {
39
- key: t.name,
38
+ default: e(() => [
39
+ a(p, { class: "sr-only !block" }, {
40
+ default: e(() => [
41
+ a(u(x), null, {
42
+ default: e(() => t[1] || (t[1] = [
43
+ n("Header Key")
44
+ ])),
45
+ _: 1
46
+ }),
47
+ a(u(x), null, {
48
+ default: e(() => t[2] || (t[2] = [
49
+ n("Header Value")
50
+ ])),
51
+ _: 1
52
+ })
53
+ ]),
54
+ _: 1
55
+ }),
56
+ (r(!0), l(i, null, b(s.headers, (o) => (r(), f(p, {
57
+ key: o.name,
40
58
  class: "group/row text-c-1"
41
59
  }, {
42
- default: r(() => [
43
- m(u, { class: "z-1 bg-b-1 sticky left-0 max-w-48 group-first/row:border-t-0" }, {
44
- default: r(() => {
60
+ default: e(() => [
61
+ a(_, { class: "z-1 bg-b-1 sticky left-0 max-w-48 group-first/row:border-t-0" }, {
62
+ default: e(() => {
45
63
  var d;
46
64
  return [
47
- typeof ((d = f(t.name)) == null ? void 0 : d.url) == "string" ? (e(), n(g, {
65
+ typeof ((d = m(o.name)) == null ? void 0 : d.url) == "string" ? (r(), f(k, {
48
66
  key: 0,
49
67
  class: "decoration-c-3",
50
- href: f(t.name).url
68
+ href: m(o.name).url
51
69
  }, {
52
- default: r(() => [
53
- l(c(t.name), 1)
70
+ default: e(() => [
71
+ n(c(o.name), 1)
54
72
  ]),
55
73
  _: 2
56
- }, 1032, ["href"])) : (e(), s(i, { key: 1 }, [
57
- l(c(t.name), 1)
74
+ }, 1032, ["href"])) : (r(), l(i, { key: 1 }, [
75
+ n(c(o.name), 1)
58
76
  ], 64))
59
77
  ];
60
78
  }),
61
79
  _: 2
62
80
  }, 1024),
63
- m(u, {
81
+ a(_, {
64
82
  class: "z-0 group-first/row:border-t-0",
65
- text: t.value
83
+ text: o.value
66
84
  }, null, 8, ["text"])
67
85
  ]),
68
86
  _: 2
@@ -70,12 +88,12 @@ const b = {
70
88
  ]),
71
89
  _: 1
72
90
  })
73
- ])) : (e(), s("div", k, " No Headers "))
91
+ ])) : (r(), l("div", C, " No Headers "))
74
92
  ]),
75
93
  _: 1
76
94
  }, 8, ["itemCount"]));
77
95
  }
78
96
  });
79
97
  export {
80
- q as default
98
+ D as default
81
99
  };
@@ -37,7 +37,7 @@ const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
37
37
  }));
38
38
  }, y = (s) => {
39
39
  s != null && s.createNew && w.name === "request" && k();
40
- }, N = "2.3.14";
40
+ }, N = "2.3.15";
41
41
  return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
42
42
  o("div", {
43
43
  class: q(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AA0EA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAwJF,wBAOG"}
1
+ {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AAgFA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAiLF,wBAOG"}
@@ -1,68 +1,86 @@
1
- import { defineComponent as p, openBlock as e, createBlock as n, withCtx as r, createTextVNode as l, createElementBlock as s, createVNode as m, Fragment as i, renderList as _, toDisplayString as c } from "vue";
2
- import h from "../../../components/DataTable/DataTable.vue.js";
3
- import x from "../../../components/DataTable/DataTableRow.vue.js";
4
- import u from "../../../components/DataTable/DataTableText.vue.js";
5
- import g from "../../../components/HelpfulLink.vue.js";
1
+ import { defineComponent as y, openBlock as t, createBlock as f, withCtx as e, createTextVNode as n, createElementBlock as l, createVNode as a, unref as u, Fragment as i, renderList as b, toDisplayString as p } from "vue";
2
+ import g from "../../../components/DataTable/DataTable.vue.js";
3
+ import c from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import _ from "../../../components/DataTable/DataTableText.vue.js";
5
+ import k from "../../../components/HelpfulLink.vue.js";
6
6
  import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
- import { httpHeaders as y } from "../../../data/httpHeaders.js";
8
- const b = {
7
+ import { httpHeaders as h } from "../../../data/httpHeaders.js";
8
+ import x from "../../../components/DataTable/DataTableHeader.vue.js";
9
+ const H = {
9
10
  key: 0,
10
11
  class: "max-h-[calc(100%-32px)] overflow-y-auto border-t"
11
- }, k = {
12
+ }, C = {
12
13
  key: 1,
13
14
  class: "text-c-3 bg-b-1 flex min-h-12 items-center justify-center rounded border px-4 text-sm"
14
- }, z = /* @__PURE__ */ p({
15
+ }, T = /* @__PURE__ */ y({
15
16
  __name: "ResponseHeaders",
16
17
  props: {
17
18
  headers: {}
18
19
  },
19
- setup(C) {
20
- const f = (o) => y.find(
21
- (a) => a.name.toLowerCase() === o.toLowerCase()
20
+ setup(v) {
21
+ const m = (s) => h.find(
22
+ (r) => r.name.toLowerCase() === s.toLowerCase()
22
23
  );
23
- return (o, a) => (e(), n(w, {
24
+ return (s, r) => (t(), f(w, {
24
25
  class: "overflow-auto",
25
26
  defaultOpen: !1,
26
- itemCount: o.headers.length
27
+ itemCount: s.headers.length
27
28
  }, {
28
- title: r(() => a[0] || (a[0] = [
29
- l("Response Headers")
29
+ title: e(() => r[0] || (r[0] = [
30
+ n("Response Headers")
30
31
  ])),
31
- default: r(() => [
32
- o.headers.length ? (e(), s("div", b, [
33
- m(h, {
32
+ default: e(() => [
33
+ s.headers.length ? (t(), l("div", H, [
34
+ a(g, {
34
35
  columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
35
36
  scroll: ""
36
37
  }, {
37
- default: r(() => [
38
- (e(!0), s(i, null, _(o.headers, (t) => (e(), n(x, {
39
- key: t.name,
38
+ default: e(() => [
39
+ a(c, { class: "sr-only !block" }, {
40
+ default: e(() => [
41
+ a(u(x), null, {
42
+ default: e(() => r[1] || (r[1] = [
43
+ n("Header Key")
44
+ ])),
45
+ _: 1
46
+ }),
47
+ a(u(x), null, {
48
+ default: e(() => r[2] || (r[2] = [
49
+ n("Header Value")
50
+ ])),
51
+ _: 1
52
+ })
53
+ ]),
54
+ _: 1
55
+ }),
56
+ (t(!0), l(i, null, b(s.headers, (o) => (t(), f(c, {
57
+ key: o.name,
40
58
  class: "group/row text-c-1"
41
59
  }, {
42
- default: r(() => [
43
- m(u, { class: "z-1 bg-b-1 sticky left-0 max-w-48 group-first/row:border-t-0" }, {
44
- default: r(() => {
60
+ default: e(() => [
61
+ a(_, { class: "z-1 bg-b-1 sticky left-0 max-w-48 group-first/row:border-t-0" }, {
62
+ default: e(() => {
45
63
  var d;
46
64
  return [
47
- typeof ((d = f(t.name)) == null ? void 0 : d.url) == "string" ? (e(), n(g, {
65
+ typeof ((d = m(o.name)) == null ? void 0 : d.url) == "string" ? (t(), f(k, {
48
66
  key: 0,
49
67
  class: "decoration-c-3",
50
- href: f(t.name).url
68
+ href: m(o.name).url
51
69
  }, {
52
- default: r(() => [
53
- l(c(t.name), 1)
70
+ default: e(() => [
71
+ n(p(o.name), 1)
54
72
  ]),
55
73
  _: 2
56
- }, 1032, ["href"])) : (e(), s(i, { key: 1 }, [
57
- l(c(t.name), 1)
74
+ }, 1032, ["href"])) : (t(), l(i, { key: 1 }, [
75
+ n(p(o.name), 1)
58
76
  ], 64))
59
77
  ];
60
78
  }),
61
79
  _: 2
62
80
  }, 1024),
63
- m(u, {
81
+ a(_, {
64
82
  class: "z-0 group-first/row:border-t-0",
65
- text: t.value
83
+ text: o.value
66
84
  }, null, 8, ["text"])
67
85
  ]),
68
86
  _: 2
@@ -70,12 +88,12 @@ const b = {
70
88
  ]),
71
89
  _: 1
72
90
  })
73
- ])) : (e(), s("div", k, " No Headers "))
91
+ ])) : (t(), l("div", C, " No Headers "))
74
92
  ]),
75
93
  _: 1
76
94
  }, 8, ["itemCount"]));
77
95
  }
78
96
  });
79
97
  export {
80
- z as default
98
+ T as default
81
99
  };