@scalar/api-client 2.3.8 → 2.3.9

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 (78) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +8 -8
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  7. package/dist/components/ScalarHotkey.vue.d.ts +1 -1
  8. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  9. package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
  10. package/dist/components/Server/ServerDropdownItem.vue.js +2 -2
  11. package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts +2 -0
  12. package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts.map +1 -0
  13. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  14. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +8 -8
  15. package/dist/layouts/App/create-api-client-app.d.ts +638 -466
  16. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts +1297 -953
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  19. package/dist/layouts/Web/create-api-client-web.d.ts +638 -466
  20. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  21. package/dist/libs/create-client.d.ts +631 -459
  22. package/dist/libs/create-client.d.ts.map +1 -1
  23. package/dist/libs/find-request.d.ts +4 -4
  24. package/dist/libs/find-request.d.ts.map +1 -1
  25. package/dist/libs/hot-keys.d.ts +2 -2
  26. package/dist/libs/send-request/build-request-security.d.ts +2 -2
  27. package/dist/libs/send-request/create-request-operation.test.d.ts +49 -47
  28. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  29. package/dist/store/active-entities.d.ts +65 -61
  30. package/dist/store/active-entities.d.ts.map +1 -1
  31. package/dist/store/collections.d.ts +30 -30
  32. package/dist/store/collections.d.ts.map +1 -1
  33. package/dist/store/cookies.d.ts +18 -18
  34. package/dist/store/environment.d.ts +9 -9
  35. package/dist/store/import-spec.d.ts +154 -2
  36. package/dist/store/import-spec.d.ts.map +1 -1
  37. package/dist/store/request-example.d.ts +272 -272
  38. package/dist/store/request-example.d.ts.map +1 -1
  39. package/dist/store/requests.d.ts +44 -44
  40. package/dist/store/requests.d.ts.map +1 -1
  41. package/dist/store/security-schemes.d.ts +10 -10
  42. package/dist/store/security-schemes.d.ts.map +1 -1
  43. package/dist/store/servers.d.ts +50 -30
  44. package/dist/store/servers.d.ts.map +1 -1
  45. package/dist/store/store.d.ts +635 -463
  46. package/dist/store/store.d.ts.map +1 -1
  47. package/dist/store/tags.d.ts +10 -10
  48. package/dist/store/workspace.d.ts +44 -44
  49. package/dist/style.css +1 -1
  50. package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
  51. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
  52. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  53. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  54. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
  55. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  56. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  57. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
  58. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  59. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  60. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  61. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  62. package/dist/views/Request/RequestSection/RequestSection.test.d.ts +2 -0
  63. package/dist/views/Request/RequestSection/RequestSection.test.d.ts.map +1 -0
  64. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
  65. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  66. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  67. package/dist/views/Request/RequestSection/RequestSection.vue2.js +26 -19
  68. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
  69. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  70. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  71. package/dist/views/Request/RequestSection/RequestTable.vue2.js +191 -193
  72. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  73. package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts +2 -0
  74. package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts.map +1 -0
  75. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  76. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
  77. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +50 -47
  78. package/package.json +12 -12
@@ -1,17 +1,18 @@
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
- import v from "../../../components/DataTable/DataTableCell.vue.js";
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 = {
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";
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";
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
13
  key: 1,
13
14
  class: "p-0.5"
14
- }, oe = /* @__PURE__ */ I({
15
+ }, oe = /* @__PURE__ */ _({
15
16
  __name: "RequestTable",
16
17
  props: {
17
18
  items: {},
@@ -25,196 +26,193 @@ const L = { class: "contents" }, O = { class: "sr-only" }, A = { class: "text-c-
25
26
  invalidParams: {}
26
27
  },
27
28
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
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) => {
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) => {
32
33
  r("uploadFile", a);
33
34
  }, $ = (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, {
37
- class: "group/table flex-1",
38
- columns: S
39
- }, {
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)
35
+ return (a, l) => (d(), p(q, {
36
+ class: "group/table flex-1",
37
+ columns: U
38
+ }, {
39
+ default: n(() => [
40
+ t(R, { class: "sr-only !block" }, {
41
+ default: n(() => [
42
+ t(v, null, {
43
+ default: n(() => l[4] || (l[4] = [
44
+ s("span", { class: "sr-only" }, "Enabled", -1)
45
+ ])),
46
+ _: 1
47
+ }),
48
+ t(v, null, {
49
+ default: n(() => l[5] || (l[5] = [
50
+ k("Key")
51
+ ])),
52
+ _: 1
53
+ }),
54
+ t(v, null, {
55
+ default: n(() => l[6] || (l[6] = [
56
+ k("Value")
57
+ ])),
58
+ _: 1
70
59
  })
71
- }, {
72
- default: n(() => [
73
- s("label", L, [
74
- a.isGlobal ? (d(), p(c, {
75
- key: 0,
76
- class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
77
- to: l.route ?? {}
78
- }, {
79
- default: n(() => [
80
- e[8] || (e[8] = s("span", { class: "sr-only" }, "Global", -1)),
81
- t(i(E), {
82
- as: "div",
83
- side: "top"
84
- }, {
85
- trigger: n(() => [
86
- t(i(B), {
87
- class: "text-c-1",
88
- icon: "Globe",
89
- size: "xs"
90
- })
91
- ]),
92
- content: n(() => e[7] || (e[7] = [
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" }, [
94
- s("div", { class: "text-c-1 flex items-center" }, [
95
- s("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
96
- ])
97
- ], -1)
98
- ])),
99
- _: 1
100
- })
101
- ]),
102
- _: 2
103
- }, 1032, ["to"])) : (d(), m(f, { key: 1 }, [
104
- s("span", O, " Row " + x(l.enabled ? "Enabled" : "Disabled"), 1),
105
- t(N, {
106
- class: "!border-r-1/2",
107
- disabled: b.hasCheckboxDisabled,
108
- modelValue: l.enabled,
109
- "onUpdate:modelValue": (o) => r("toggleRow", u, o)
110
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])
111
- ], 64))
112
- ]),
113
- t(v, null, {
114
- default: n(() => [
115
- t(R, {
116
- disableCloseBrackets: "",
117
- disabled: b.isReadOnly,
118
- disableEnter: "",
119
- disableTabIndent: "",
120
- envVariables: a.envVariables,
121
- environment: a.environment,
122
- modelValue: l.key,
123
- placeholder: "Key",
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)
130
- }, null, 8, ["disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
131
- ]),
132
- _: 2
133
- }, 1024),
134
- t(v, null, {
60
+ ]),
61
+ _: 1
62
+ }),
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)
69
+ })
70
+ }, {
71
+ 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
+ }, {
135
78
  default: n(() => [
136
- t(R, {
137
- class: V({
138
- "pr-6": i(h)(l)
139
- }),
140
- default: l.default,
141
- disableCloseBrackets: "",
142
- disabled: b.isReadOnly,
143
- disableEnter: "",
144
- disableTabIndent: "",
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,
153
- placeholder: "Value",
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)
79
+ l[8] || (l[8] = s("span", { class: "sr-only" }, "Global", -1)),
80
+ t(i(z), {
81
+ as: "div",
82
+ side: "top"
160
83
  }, {
161
- icon: n(() => [
162
- i(h)(l) ? (d(), p(j, {
163
- key: 0,
164
- item: { ...l, default: $(l) }
165
- }, null, 8, ["item"])) : g("", !0)
84
+ trigger: n(() => [
85
+ t(i(g), {
86
+ class: "text-c-1",
87
+ icon: "Globe",
88
+ size: "xs"
89
+ })
166
90
  ]),
167
- _: 2
168
- }, 1032, ["class", "default", "disabled", "enum", "envVariables", "environment", "examples", "max", "min", "modelValue", "nullable", "type", "workspace", "onSelectVariable", "onUpdate:modelValue"])
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
+ })
169
100
  ]),
170
101
  _: 2
171
- }, 1024),
172
- a.showUploadButton ? (d(), p(v, {
173
- key: 0,
174
- class: "group/upload flex items-center justify-center whitespace-nowrap"
175
- }, {
176
- default: n(() => {
177
- var o;
178
- return [
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)
182
- ]),
183
- s("button", {
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",
185
- type: "button",
186
- onClick: (T) => r("removeFile", u)
187
- }, " Delete ", 8, K)
188
- ], 64)) : (d(), m("div", H, [
189
- t(i(q), {
190
- class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
191
- size: "sm",
192
- variant: "outlined",
193
- onClick: (T) => _(u)
194
- }, {
195
- default: n(() => [
196
- e[9] || (e[9] = s("span", null, "Upload File", -1)),
197
- t(i(B), {
198
- class: "ml-1",
199
- icon: "UploadSimple",
200
- size: "xs",
201
- thickness: "2.5"
202
- })
203
- ]),
204
- _: 2
205
- }, 1032, ["onClick"])
206
- ]))
207
- ];
208
- }),
209
- _: 2
210
- }, 1024)) : g("", !0)
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))
211
111
  ]),
212
- _: 2
213
- }, 1032, ["id", "class"]))), 128))
214
- ]),
215
- _: 1
216
- });
217
- };
112
+ t(c, null, {
113
+ default: n(() => [
114
+ t(B, {
115
+ disableCloseBrackets: "",
116
+ disabled: b.isReadOnly,
117
+ disableEnter: "",
118
+ disableTabIndent: "",
119
+ envVariables: a.envVariables,
120
+ environment: a.environment,
121
+ modelValue: e.key,
122
+ 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)
129
+ }, null, 8, ["disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
130
+ ]),
131
+ _: 2
132
+ }, 1024),
133
+ t(c, null, {
134
+ default: n(() => [
135
+ t(B, {
136
+ class: w({
137
+ "pr-6": i(C)(e)
138
+ }),
139
+ default: e.default,
140
+ disableCloseBrackets: "",
141
+ disabled: b.isReadOnly,
142
+ disableEnter: "",
143
+ 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,
152
+ 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)
159
+ }, {
160
+ icon: n(() => [
161
+ i(C)(e) ? (d(), p(P, {
162
+ key: 0,
163
+ item: { ...e, default: $(e) }
164
+ }, null, 8, ["item"])) : x("", !0)
165
+ ]),
166
+ _: 2
167
+ }, 1032, ["class", "default", "disabled", "enum", "envVariables", "environment", "examples", "max", "min", "modelValue", "nullable", "type", "workspace", "onSelectVariable", "onUpdate:modelValue"])
168
+ ]),
169
+ _: 2
170
+ }, 1024),
171
+ a.showUploadButton ? (d(), p(c, {
172
+ key: 0,
173
+ class: "group/upload flex items-center justify-center whitespace-nowrap"
174
+ }, {
175
+ default: n(() => {
176
+ var o;
177
+ 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)
181
+ ]),
182
+ s("button", {
183
+ 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
+ type: "button",
185
+ onClick: (T) => r("removeFile", u)
186
+ }, " Delete ", 8, K)
187
+ ], 64)) : (d(), m("div", L, [
188
+ t(i(D), {
189
+ class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
190
+ size: "sm",
191
+ variant: "outlined",
192
+ onClick: (T) => S(u)
193
+ }, {
194
+ default: n(() => [
195
+ l[9] || (l[9] = s("span", null, "Upload File", -1)),
196
+ t(i(g), {
197
+ class: "ml-1",
198
+ icon: "UploadSimple",
199
+ size: "xs",
200
+ thickness: "2.5"
201
+ })
202
+ ]),
203
+ _: 2
204
+ }, 1032, ["onClick"])
205
+ ]))
206
+ ];
207
+ }),
208
+ _: 2
209
+ }, 1024)) : x("", !0)
210
+ ]),
211
+ _: 2
212
+ }, 1032, ["id", "class"]))), 128))
213
+ ]),
214
+ _: 1
215
+ }));
218
216
  }
219
217
  });
220
218
  export {
@@ -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.8";
40
+ }, N = "2.3.9";
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", {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ResponseSection.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponseSection.test.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAoOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAgBvE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AAyRF,wBAOG"}
1
+ {"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAuOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAgBvE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA4RF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseSection.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-6a58aca0"]]);
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-19922b4d"]]);
5
5
  export {
6
- r as default
6
+ s as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, computed as d, ref as T, useId as g, openBlock as l, createBlock as i, withCtx as v, createElementVNode as u, normalizeClass as y, createCommentVNode as c, createVNode as h, createElementBlock as k, Fragment as A } from "vue";
1
+ import { defineComponent as j, computed as c, ref as T, useId as g, openBlock as n, createBlock as i, withCtx as v, createElementVNode as d, normalizeClass as y, createCommentVNode as u, createVNode as h, createElementBlock as k, Fragment as A } from "vue";
2
2
  import I from "../../../components/SectionFilter.vue.js";
3
3
  import V from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
4
  import H from "./ResponseBody.vue.js";
@@ -9,49 +9,49 @@ import $ from "./ResponseBodyVirtual.vue.js";
9
9
  /* empty css */
10
10
  import w from "./ResponseCookies.vue.js";
11
11
  import z from "./ResponseHeaders.vue.js";
12
- const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], x = 2e5, J = /* @__PURE__ */ j({
12
+ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], b = 2e5, J = /* @__PURE__ */ j({
13
13
  __name: "ResponseSection",
14
14
  props: {
15
15
  numWorkspaceRequests: {},
16
16
  response: {}
17
17
  },
18
- setup(n) {
19
- const m = d(() => {
20
- var o;
21
- const e = (o = n.response) == null ? void 0 : o.headers;
22
- return e ? Object.keys(e).map((a) => ({
23
- name: a,
24
- value: e[a] ?? "",
18
+ setup(t) {
19
+ const m = c(() => {
20
+ var a;
21
+ const e = (a = t.response) == null ? void 0 : a.headers;
22
+ return e ? Object.keys(e).map((o) => ({
23
+ name: o,
24
+ value: e[o] ?? "",
25
25
  required: !1
26
26
  })).filter(
27
- (a) => ![
27
+ (o) => ![
28
28
  "rest-api-client-content-length",
29
29
  "X-API-Client-Content-Length"
30
- ].includes(a.name)
30
+ ].includes(o.name)
31
31
  ) : [];
32
- }), B = d(
32
+ }), x = c(
33
33
  () => {
34
34
  var e;
35
- return ((e = n.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((o) => {
36
- var t, r;
37
- const a = (r = (t = n.response) == null ? void 0 : t.headers) == null ? void 0 : r[o];
38
- return a ? {
39
- name: o,
40
- value: a,
35
+ return ((e = t.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((a) => {
36
+ var l, r;
37
+ const o = (r = (l = t.response) == null ? void 0 : l.headers) == null ? void 0 : r[a];
38
+ return o ? {
39
+ name: a,
40
+ value: o,
41
41
  required: !1
42
42
  } : [];
43
43
  })) ?? [];
44
44
  }
45
- ), b = ["Cookies", "Headers", "Body"], s = T("All"), f = d(() => ["All", ...b]), p = d(
45
+ ), B = ["Cookies", "Headers", "Body"], s = T("All"), f = c(() => ["All", ...B]), p = c(
46
46
  () => Object.fromEntries(
47
47
  f.value.map((e) => [e, g()])
48
48
  )
49
- ), R = d(() => {
50
- var t, r;
51
- if (!n.response)
49
+ ), R = c(() => {
50
+ var l, r;
51
+ if (!t.response)
52
52
  return !1;
53
- const e = ((t = n.response.headers) == null ? void 0 : t["content-type"]) || ((r = n.response.headers) == null ? void 0 : r["Content-Type"]);
54
- return !e || (n.response.size ?? 0) <= x || e.includes("text/html") ? !1 : [
53
+ const e = ((l = t.response.headers) == null ? void 0 : l["content-type"]) || ((r = t.response.headers) == null ? void 0 : r["Content-Type"]);
54
+ return !e || (t.response.size ?? 0) <= b || e.includes("text/html") ? !1 : [
55
55
  // Text types
56
56
  "text/",
57
57
  // JSON types
@@ -78,63 +78,66 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], x = 2e5
78
78
  "application/x-java-source",
79
79
  // Form data
80
80
  "application/x-www-form-urlencoded"
81
- ].some((C) => e.includes(C)) && (n.response.size ?? 0) > x;
81
+ ].some((C) => e.includes(C)) && (t.response.size ?? 0) > b;
82
82
  });
83
- return (e, o) => (l(), i(V, { "aria-label": "Response" }, {
83
+ return (e, a) => (n(), i(V, { "aria-label": "Response" }, {
84
84
  title: v(() => [
85
- u("div", L, [
86
- u("div", {
85
+ d("div", L, [
86
+ d("div", {
87
87
  "aria-live": "polite",
88
88
  class: y(["flex items-center", { "animate-response-heading": e.response }])
89
89
  }, [
90
- o[1] || (o[1] = u("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
91
- e.response ? (l(), i(O, {
90
+ a[1] || (a[1] = d("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
91
+ e.response ? (n(), i(O, {
92
92
  key: 0,
93
93
  class: "animate-response-children",
94
94
  response: e.response
95
- }, null, 8, ["response"])) : c("", !0)
95
+ }, null, 8, ["response"])) : u("", !0)
96
96
  ], 2),
97
97
  h(I, {
98
98
  modelValue: s.value,
99
- "onUpdate:modelValue": o[0] || (o[0] = (a) => s.value = a),
99
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => s.value = o),
100
100
  filterIds: p.value,
101
101
  filters: f.value
102
102
  }, null, 8, ["modelValue", "filterIds", "filters"])
103
103
  ])
104
104
  ]),
105
105
  default: v(() => {
106
- var a, t, r;
106
+ var o, l, r;
107
107
  return [
108
- u("div", {
108
+ d("div", {
109
109
  id: p.value.All,
110
- class: y(["custom-scroll relative grid h-full justify-stretch divide-y", {
110
+ class: y(["custom-scroll response-section-content relative grid h-full justify-stretch", {
111
111
  "content-start": e.response
112
112
  }]),
113
113
  role: s.value === "All" && e.response ? "tabpanel" : "none"
114
114
  }, [
115
- e.response ? (l(), k(A, { key: 1 }, [
116
- s.value === "All" || s.value === "Cookies" ? (l(), i(w, {
115
+ e.response ? (n(), k(A, { key: 1 }, [
116
+ s.value === "All" || s.value === "Cookies" ? (n(), i(w, {
117
117
  key: 0,
118
+ class: "response-section-content-cookies",
118
119
  id: p.value.Cookies,
119
- cookies: B.value,
120
+ cookies: x.value,
120
121
  role: s.value === "All" ? "none" : "tabpanel"
121
- }, null, 8, ["id", "cookies", "role"])) : c("", !0),
122
- s.value === "All" || s.value === "Headers" ? (l(), i(z, {
122
+ }, null, 8, ["id", "cookies", "role"])) : u("", !0),
123
+ s.value === "All" || s.value === "Headers" ? (n(), i(z, {
123
124
  key: 1,
125
+ class: "response-section-content-headers",
124
126
  id: p.value.Headers,
125
127
  headers: m.value,
126
128
  role: s.value === "All" ? "none" : "tabpanel"
127
- }, null, 8, ["id", "headers", "role"])) : c("", !0),
128
- s.value === "All" || s.value === "Body" ? (l(), k(A, { key: 2 }, [
129
- R.value && typeof ((a = e.response) == null ? void 0 : a.data) == "string" ? (l(), i($, {
129
+ }, null, 8, ["id", "headers", "role"])) : u("", !0),
130
+ s.value === "All" || s.value === "Body" ? (n(), k(A, { key: 2 }, [
131
+ R.value && typeof ((o = e.response) == null ? void 0 : o.data) == "string" ? (n(), i($, {
130
132
  key: 0,
131
133
  id: p.value.Body,
132
134
  content: e.response.data,
133
- data: (t = e.response) == null ? void 0 : t.data,
135
+ data: (l = e.response) == null ? void 0 : l.data,
134
136
  headers: m.value,
135
137
  role: s.value === "All" ? "none" : "tabpanel"
136
- }, null, 8, ["id", "content", "data", "headers", "role"])) : (l(), i(H, {
138
+ }, null, 8, ["id", "content", "data", "headers", "role"])) : (n(), i(H, {
137
139
  key: 1,
140
+ class: "response-section-content-body",
138
141
  id: p.value.Body,
139
142
  active: !0,
140
143
  data: (r = e.response) == null ? void 0 : r.data,
@@ -142,8 +145,8 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], x = 2e5
142
145
  role: s.value === "All" ? "none" : "tabpanel",
143
146
  title: "Body"
144
147
  }, null, 8, ["id", "data", "headers", "role"]))
145
- ], 64)) : c("", !0)
146
- ], 64)) : (l(), i(q, {
148
+ ], 64)) : u("", !0)
149
+ ], 64)) : (n(), i(q, {
147
150
  key: 0,
148
151
  numWorkspaceRequests: e.numWorkspaceRequests
149
152
  }, null, 8, ["numWorkspaceRequests"])),