@scalar/api-client 2.3.33 → 2.4.1

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 (98) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  3. package/dist/components/CodeInput/CodeInput.vue2.js +1 -1
  4. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +74 -89
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +4 -0
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  8. package/dist/components/Server/ServerVariablesForm.vue.d.ts +2 -0
  9. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
  10. package/dist/components/Server/ServerVariablesForm.vue.js +19 -18
  11. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  12. package/dist/components/TopNav/TopNavItem.vue.js +3 -3
  13. package/dist/components/TopNav/TopNavItem.vue2.js +46 -54
  14. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  15. package/dist/hooks/useClientConfig.d.ts +72 -6
  16. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  17. package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
  18. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  19. package/dist/layouts/App/ApiClientApp.vue.js +45 -40
  20. package/dist/layouts/App/create-api-client-app.d.ts +72 -52
  21. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  22. package/dist/layouts/Modal/create-api-client-modal.d.ts +144 -104
  23. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  24. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  25. package/dist/layouts/Web/ApiClientWeb.vue.js +49 -44
  26. package/dist/layouts/Web/create-api-client-web.d.ts +72 -52
  27. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  28. package/dist/libs/create-client.d.ts +72 -52
  29. package/dist/libs/create-client.d.ts.map +1 -1
  30. package/dist/libs/create-client.js +53 -49
  31. package/dist/libs/electron.d.ts +5 -0
  32. package/dist/libs/electron.d.ts.map +1 -0
  33. package/dist/libs/electron.js +4 -0
  34. package/dist/libs/find-request.d.ts +2 -0
  35. package/dist/libs/find-request.d.ts.map +1 -1
  36. package/dist/libs/index.js +17 -15
  37. package/dist/libs/send-request/create-fetch-query-params.d.ts +10 -3
  38. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  39. package/dist/libs/send-request/create-fetch-query-params.js +28 -6
  40. package/dist/libs/send-request/create-request-operation.d.ts +3 -1
  41. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  42. package/dist/libs/send-request/create-request-operation.js +91 -87
  43. package/dist/libs/send-request/create-request-operation.test.d.ts +2 -0
  44. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  45. package/dist/libs/send-request/index.d.ts +1 -0
  46. package/dist/libs/send-request/index.d.ts.map +1 -1
  47. package/dist/libs/send-request/index.js +6 -4
  48. package/dist/plugins/hooks/usePluginManager.d.ts +8 -0
  49. package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -0
  50. package/dist/plugins/hooks/usePluginManager.js +10 -0
  51. package/dist/plugins/index.d.ts +3 -0
  52. package/dist/plugins/index.d.ts.map +1 -0
  53. package/dist/plugins/index.js +7 -0
  54. package/dist/plugins/plugin-manager.d.ts +28 -0
  55. package/dist/plugins/plugin-manager.d.ts.map +1 -0
  56. package/dist/plugins/plugin-manager.js +24 -0
  57. package/dist/store/active-entities.d.ts +2 -0
  58. package/dist/store/active-entities.d.ts.map +1 -1
  59. package/dist/store/collections.d.ts +4 -4
  60. package/dist/store/cookies.d.ts +4 -4
  61. package/dist/store/environment.d.ts +4 -4
  62. package/dist/store/request-example.d.ts +4 -4
  63. package/dist/store/requests.d.ts +26 -4
  64. package/dist/store/requests.d.ts.map +1 -1
  65. package/dist/store/security-schemes.d.ts +24 -24
  66. package/dist/store/store.d.ts +72 -52
  67. package/dist/store/store.d.ts.map +1 -1
  68. package/dist/store/tags.d.ts +4 -4
  69. package/dist/store/workspace.d.ts +4 -4
  70. package/dist/style.css +1 -1
  71. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  72. package/dist/views/Request/Request.vue.js +2 -2
  73. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  74. package/dist/views/Request/RequestRoot.vue.js +1 -1
  75. package/dist/views/Request/RequestRoot.vue2.js +47 -45
  76. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSection/RequestParams.vue.js +61 -70
  78. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  79. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  80. package/dist/views/Request/RequestSection/RequestSection.vue2.js +92 -77
  81. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  82. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  83. package/dist/views/Request/RequestSection/RequestTable.vue2.js +71 -75
  84. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  85. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
  86. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +34 -35
  87. package/dist/views/Request/RequestSection/types/post-response.d.ts +7 -0
  88. package/dist/views/Request/RequestSection/types/post-response.d.ts.map +1 -0
  89. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  90. package/dist/views/Request/RequestSidebarItem.vue.js +3 -3
  91. package/dist/views/Request/RequestSidebarItem.vue2.js +132 -134
  92. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  93. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  94. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  95. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +82 -70
  96. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  97. package/dist/views/Request/components/WorkspaceDropdown.vue.js +80 -114
  98. package/package.json +25 -20
@@ -1,20 +1,21 @@
1
- import { defineComponent as H, computed as p, useId as A, ref as N, watch as I, createBlock as v, openBlock as i, withCtx as d, createElementVNode as c, withDirectives as s, createCommentVNode as f, createVNode as t, unref as n, vShow as m, createElementBlock as h, toDisplayString as U } from "vue";
2
- import { ScalarErrorBoundary as D } from "@scalar/components";
3
- import { canMethodHaveBody as b, isDefined as K, REGEX as q } from "@scalar/oas-utils/helpers";
4
- import Q from "../../../components/SectionFilter.vue.js";
5
- import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
6
- import { matchesDomain as L } from "../../../libs/send-request/set-request-cookies.js";
7
- import j from "./RequestBody.vue.js";
8
- import k from "./RequestParams.vue.js";
9
- import F from "./RequestPathParams.vue.js";
10
- import M from "./RequestAuth/RequestAuth.vue.js";
11
- import T from "./RequestCodeExample.vue.js";
12
- import { useWorkspace as W } from "../../../store/store.js";
13
- import { useLayout as z } from "../../../hooks/useLayout.js";
14
- const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, X = ["for"], J = ["id", "placeholder", "value"], Y = {
1
+ import { defineComponent as U, computed as v, useId as g, ref as D, watch as M, createBlock as p, openBlock as n, withCtx as c, createElementVNode as y, withDirectives as s, createCommentVNode as h, createElementBlock as f, createVNode as i, unref as r, vShow as m, Fragment as K, renderList as L, resolveDynamicComponent as Q, toDisplayString as $ } from "vue";
2
+ import { ScalarErrorBoundary as P } from "@scalar/components";
3
+ import { canMethodHaveBody as k, isDefined as F, REGEX as S } from "@scalar/oas-utils/helpers";
4
+ import j from "../../../components/SectionFilter.vue.js";
5
+ import T from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
6
+ import { matchesDomain as W } from "../../../libs/send-request/set-request-cookies.js";
7
+ import z from "./RequestBody.vue.js";
8
+ import b from "./RequestParams.vue.js";
9
+ import G from "./RequestPathParams.vue.js";
10
+ import X from "./RequestAuth/RequestAuth.vue.js";
11
+ import J from "./RequestCodeExample.vue.js";
12
+ import { usePluginManager as Y } from "../../../plugins/hooks/usePluginManager.js";
13
+ import { useWorkspace as Z } from "../../../store/store.js";
14
+ import { useLayout as x } from "../../../hooks/useLayout.js";
15
+ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, ee = ["for"], ae = ["id", "placeholder", "value"], oe = {
15
16
  key: 2,
16
17
  class: "text-c-1 flex h-8 items-center"
17
- }, Z = ["id", "role"], pe = /* @__PURE__ */ H({
18
+ }, le = ["id", "role"], be = /* @__PURE__ */ U({
18
19
  __name: "RequestSection",
19
20
  props: {
20
21
  collection: {},
@@ -27,41 +28,42 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
27
28
  server: {},
28
29
  workspace: {}
29
30
  },
30
- setup(l) {
31
- const P = [
31
+ setup(o) {
32
+ const C = [
32
33
  "Auth",
33
34
  "Variables",
34
35
  "Cookies",
35
36
  "Headers",
36
37
  "Query",
37
- "Body"
38
- ], { requestMutators: S, cookies: g, securitySchemes: B } = W(), { layout: u } = z(), y = p(() => {
39
- const e = /* @__PURE__ */ new Set(["All", ...P]);
40
- return l.example.parameters.path.length || e.delete("Variables"), b(l.operation.method ?? "get") || e.delete("Body"), w.value && e.delete("Auth"), [...e];
41
- }), r = p(
38
+ "Body",
39
+ "Scripts"
40
+ ], { requestMutators: V, cookies: B, securitySchemes: R } = Z(), { layout: d } = x(), w = v(() => {
41
+ const e = /* @__PURE__ */ new Set(["All", ...C]);
42
+ return o.example.parameters.path.length || e.delete("Variables"), k(o.operation.method ?? "get") || e.delete("Body"), A.value && e.delete("Auth"), [...e];
43
+ }), t = v(
42
44
  () => Object.fromEntries(
43
- y.value.map((e) => [e, A()])
45
+ w.value.map((e) => [e, g()])
44
46
  )
45
- ), w = p(
47
+ ), A = v(
46
48
  () => {
47
49
  var e;
48
- return u === "modal" && ((e = l.operation.security) == null ? void 0 : e.length) === 0;
50
+ return d === "modal" && ((e = o.operation.security) == null ? void 0 : e.length) === 0;
49
51
  }
50
- ), a = N("All");
51
- I(
52
- () => l.operation,
52
+ ), a = D("All");
53
+ M(
54
+ () => o.operation,
53
55
  (e) => {
54
- a.value === "Body" && e && !b(e.method) && (a.value = "All");
56
+ a.value === "Body" && e && !k(e.method) && (a.value = "All");
55
57
  }
56
58
  );
57
- const C = (e) => {
58
- const o = e.target;
59
- S.edit(l.operation.uid, "summary", o.value);
60
- }, R = p(
61
- () => (l.workspace.cookies ?? []).map((e) => g[e]).filter(K).filter((e) => e.name).filter(
59
+ const O = (e) => {
60
+ const l = e.target;
61
+ V.edit(o.operation.uid, "summary", l.value);
62
+ }, E = v(
63
+ () => (o.workspace.cookies ?? []).map((e) => B[e]).filter(F).filter((e) => e.name).filter(
62
64
  (e) => {
63
- var o;
64
- return L(((o = l.server) == null ? void 0 : o.url) || l.operation.path, e.domain);
65
+ var l;
66
+ return W(((l = o.server) == null ? void 0 : l.url) || o.operation.path, e.domain);
65
67
  }
66
68
  ).map((e) => ({
67
69
  key: e.name,
@@ -74,42 +76,42 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
74
76
  },
75
77
  enabled: !0
76
78
  }))
77
- ), E = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(q.PROTOCOL, "") ? l.operation.path.replace(q.PROTOCOL, "") : "Request Name", V = A();
78
- return (e, o) => (i(), v($, {
79
+ ), H = () => o.operation.summary ? o.operation.summary : o.operation.path.replace(S.PROTOCOL, "") ? o.operation.path.replace(S.PROTOCOL, "") : "Request Name", q = g(), N = Y().getViewComponents("request.section"), I = (e, l) => V.edit(o.operation.uid, e, l);
80
+ return (e, l) => (n(), p(T, {
79
81
  "aria-label": `Request: ${e.operation.summary}`
80
82
  }, {
81
- title: d(() => [
82
- c("div", G, [
83
- n(u) !== "modal" ? (i(), h("label", {
83
+ title: c(() => [
84
+ y("div", _, [
85
+ r(d) !== "modal" ? (n(), f("label", {
84
86
  key: 0,
85
87
  class: "pointer-events-auto absolute left-0 top-0 h-full w-full cursor-text opacity-0",
86
- for: n(V)
87
- }, null, 8, X)) : f("", !0),
88
- n(u) !== "modal" ? (i(), h("input", {
88
+ for: r(q)
89
+ }, null, 8, ee)) : h("", !0),
90
+ r(d) !== "modal" ? (n(), f("input", {
89
91
  key: 1,
90
- id: n(V),
92
+ id: r(q),
91
93
  class: "text-c-1 group-hover-input pl-1.25 md:-ml-1.25 pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded has-[:focus-visible]:outline",
92
- placeholder: E(),
94
+ placeholder: H(),
93
95
  value: e.operation.summary,
94
- onInput: C
95
- }, null, 40, J)) : (i(), h("span", Y, U(e.operation.summary), 1))
96
+ onInput: O
97
+ }, null, 40, ae)) : (n(), f("span", oe, $(e.operation.summary), 1))
96
98
  ]),
97
- t(Q, {
99
+ i(j, {
98
100
  modelValue: a.value,
99
- "onUpdate:modelValue": o[0] || (o[0] = (O) => a.value = O),
100
- filterIds: r.value,
101
- filters: y.value
101
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => a.value = u),
102
+ filterIds: t.value,
103
+ filters: w.value
102
104
  }, null, 8, ["modelValue", "filterIds", "filters"])
103
105
  ]),
104
- default: d(() => [
105
- c("div", {
106
- id: r.value.All,
106
+ default: c(() => [
107
+ y("div", {
108
+ id: t.value.All,
107
109
  class: "request-section-content custom-scroll relative flex flex-1 flex-col",
108
110
  role: a.value === "All" ? "tabpanel" : "none"
109
111
  }, [
110
- e.collection && e.workspace && (n(u) !== "modal" || Object.keys(n(B) ?? {}).length) ? s((i(), v(M, {
112
+ e.collection && e.workspace && (r(d) !== "modal" || Object.keys(r(R) ?? {}).length) ? s((n(), p(X, {
111
113
  key: 0,
112
- id: r.value.Auth,
114
+ id: t.value.Auth,
113
115
  class: "request-section-content-auth",
114
116
  collection: e.collection,
115
117
  envVariables: e.envVariables,
@@ -124,11 +126,11 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
124
126
  }, null, 8, ["id", "collection", "envVariables", "environment", "operation", "role", "selectedSecuritySchemeUids", "server", "workspace"])), [
125
127
  [
126
128
  m,
127
- !w.value && (a.value === "All" || a.value === "Auth")
129
+ !A.value && (a.value === "All" || a.value === "Auth")
128
130
  ]
129
- ]) : f("", !0),
130
- s(t(F, {
131
- id: r.value.Variables,
131
+ ]) : h("", !0),
132
+ s(i(G, {
133
+ id: t.value.Variables,
132
134
  class: "request-section-content-path-params",
133
135
  envVariables: e.envVariables,
134
136
  environment: e.environment,
@@ -145,8 +147,8 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
145
147
  (a.value === "All" || a.value === "Variables") && e.example.parameters.path.length
146
148
  ]
147
149
  ]),
148
- s(t(k, {
149
- id: r.value.Cookies,
150
+ s(i(b, {
151
+ id: t.value.Cookies,
150
152
  class: "request-section-content-cookies",
151
153
  envVariables: e.envVariables,
152
154
  environment: e.environment,
@@ -155,15 +157,15 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
155
157
  label: "Cookie",
156
158
  operation: e.operation,
157
159
  paramKey: "cookies",
158
- readOnlyEntries: R.value,
160
+ readOnlyEntries: E.value,
159
161
  role: a.value === "All" ? "none" : "tabpanel",
160
162
  title: "Cookies",
161
163
  workspace: e.workspace
162
164
  }, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "readOnlyEntries", "role", "workspace"]), [
163
165
  [m, a.value === "All" || a.value === "Cookies"]
164
166
  ]),
165
- s(t(k, {
166
- id: r.value.Headers,
167
+ s(i(b, {
168
+ id: t.value.Headers,
167
169
  class: "request-section-content-headers",
168
170
  envVariables: e.envVariables,
169
171
  environment: e.environment,
@@ -178,8 +180,8 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
178
180
  }, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
179
181
  [m, a.value === "All" || a.value === "Headers"]
180
182
  ]),
181
- s(t(k, {
182
- id: r.value.Query,
183
+ s(i(b, {
184
+ id: t.value.Query,
183
185
  class: "request-section-content-query",
184
186
  envVariables: e.envVariables,
185
187
  environment: e.environment,
@@ -194,9 +196,9 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
194
196
  }, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
195
197
  [m, a.value === "All" || a.value === "Query"]
196
198
  ]),
197
- e.operation.method && (a.value === "All" || a.value === "Body") && n(b)(e.operation.method) ? (i(), v(j, {
199
+ e.operation.method && (a.value === "All" || a.value === "Body") && r(k)(e.operation.method) ? (n(), p(z, {
198
200
  key: 1,
199
- id: r.value.Body,
201
+ id: t.value.Body,
200
202
  class: "request-section-content-body",
201
203
  envVariables: e.envVariables,
202
204
  environment: e.environment,
@@ -205,11 +207,24 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
205
207
  role: a.value === "All" ? "none" : "tabpanel",
206
208
  title: "Body",
207
209
  workspace: e.workspace
208
- }, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : f("", !0),
209
- o[1] || (o[1] = c("div", { class: "flex flex-grow" }, null, -1)),
210
- t(n(D), null, {
211
- default: d(() => [
212
- t(T, {
210
+ }, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : h("", !0),
211
+ (n(!0), f(K, null, L(r(N), (u) => (n(), p(r(P), {
212
+ key: u.component
213
+ }, {
214
+ default: c(() => [
215
+ s((n(), p(Q(u.component), {
216
+ "onUpdate:operation": I,
217
+ operation: e.operation
218
+ }, null, 40, ["operation"])), [
219
+ [m, a.value === "All" || a.value === u.title]
220
+ ])
221
+ ]),
222
+ _: 2
223
+ }, 1024))), 128)),
224
+ l[1] || (l[1] = y("div", { class: "flex flex-grow" }, null, -1)),
225
+ i(r(P), null, {
226
+ default: c(() => [
227
+ i(J, {
213
228
  class: "request-section-content-code-example -mt-1/2 border-t",
214
229
  collection: e.collection,
215
230
  example: e.example,
@@ -221,12 +236,12 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
221
236
  ]),
222
237
  _: 1
223
238
  })
224
- ], 8, Z)
239
+ ], 8, le)
225
240
  ]),
226
241
  _: 1
227
242
  }, 8, ["aria-label"]));
228
243
  }
229
244
  });
230
245
  export {
231
- pe as default
246
+ be as default
232
247
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AA8QA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAQ9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,CAAC,uBAAuB,GAAG;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC,EAAE,CAAA;IAClE,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;;;;;;;;;;;;yBATsB,OAAO;sBACV,OAAO;cACf,OAAO;gBACL,OAAO;;AAukBxB,wBASG"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAqQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAQ9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,CAAC,uBAAuB,GAAG;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC,EAAE,CAAA;IAClE,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;;;;;;;;;;;;yBATsB,OAAO;sBACV,OAAO;cACf,OAAO;gBACL,OAAO;;AA2iBxB,wBASG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9b558be3"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0277e06b"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as _, createBlock as p, openBlock as d, withCtx as n, createVNode as t, createElementBlock as f, createTextVNode as b, toDisplayString as c, Fragment as h, renderList as q, normalizeClass as v, unref as r, createCommentVNode as k, createElementVNode as i } from "vue";
2
- import { ScalarTooltip as D, ScalarIcon as x, ScalarButton as B } from "@scalar/components";
1
+ import { defineComponent as z, createBlock as i, openBlock as u, withCtx as n, createVNode as r, createElementBlock as b, createTextVNode as f, toDisplayString as c, Fragment as g, renderList as q, normalizeClass as v, unref as s, createCommentVNode as k, createElementVNode as p } from "vue";
2
+ import { ScalarTooltip as D, ScalarIcon as B, ScalarButton as R } from "@scalar/components";
3
3
  import { ScalarIconTrash as E } from "@scalar/icons";
4
4
  import { RouterLink as G } from "vue-router";
5
- import R from "../../../components/CodeInput/CodeInput.vue.js";
5
+ import C from "../../../components/CodeInput/CodeInput.vue.js";
6
6
  import N from "../../../components/DataTable/DataTable.vue.js";
7
7
  import y from "../../../components/DataTable/DataTableCell.vue.js";
8
8
  import P from "../../../components/DataTable/DataTableCheckbox.vue.js";
9
- import w from "../../../components/DataTable/DataTableHeader.vue.js";
10
- import C from "../../../components/DataTable/DataTableRow.vue.js";
11
- import { parameterIsInvalid as j, hasItemProperties as V } from "../libs/request.js";
12
- import O from "./RequestTableTooltip.vue.js";
13
- const A = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, K = ["onClick"], L = {
9
+ import V from "../../../components/DataTable/DataTableHeader.vue.js";
10
+ import $ from "../../../components/DataTable/DataTableRow.vue.js";
11
+ import { parameterIsInvalid as j, hasItemProperties as h } from "../libs/request.js";
12
+ import K from "./RequestTableTooltip.vue.js";
13
+ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, A = ["onClick"], L = {
14
14
  key: 1,
15
15
  class: "p-0.5"
16
- }, ne = /* @__PURE__ */ _({
16
+ }, ne = /* @__PURE__ */ z({
17
17
  __name: "RequestTable",
18
18
  props: {
19
19
  items: {},
@@ -28,88 +28,83 @@ const A = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
28
28
  label: {}
29
29
  },
30
30
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
31
- setup(F, { emit: U }) {
32
- const m = F, s = U, $ = ["", "", "36px"], g = (e, o, l) => {
33
- s("updateRow", e, o, l);
31
+ setup(x, { emit: F }) {
32
+ const m = x, t = F, U = ["", "", "36px"], w = (e, o, l) => {
33
+ t("updateRow", e, o, l);
34
34
  }, S = (e) => {
35
- s("uploadFile", e);
36
- }, z = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default, T = (e) => !!(e.key || e.value);
37
- return (e, o) => (d(), p(N, {
35
+ t("uploadFile", e);
36
+ }, T = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default, I = (e) => !!(e.key || e.value);
37
+ return (e, o) => (u(), i(N, {
38
38
  class: "group/table flex-1",
39
- columns: $
39
+ columns: U
40
40
  }, {
41
41
  default: n(() => [
42
- t(C, { class: "sr-only !block" }, {
42
+ r($, { class: "sr-only !block" }, {
43
43
  default: n(() => [
44
- t(w, null, {
44
+ r(V, null, {
45
45
  default: n(() => [
46
- b(c(e.label) + " Enabled", 1)
46
+ f(c(e.label) + " Enabled", 1)
47
47
  ]),
48
48
  _: 1
49
49
  }),
50
- t(w, null, {
50
+ r(V, null, {
51
51
  default: n(() => [
52
- b(c(e.label) + " Key", 1)
52
+ f(c(e.label) + " Key", 1)
53
53
  ]),
54
54
  _: 1
55
55
  }),
56
- t(w, null, {
56
+ r(V, null, {
57
57
  default: n(() => [
58
- b(c(e.label) + " Value", 1)
58
+ f(c(e.label) + " Value", 1)
59
59
  ]),
60
60
  _: 1
61
61
  })
62
62
  ]),
63
63
  _: 1
64
64
  }),
65
- (d(!0), f(h, null, q(e.items, (l, u) => (d(), p(C, {
65
+ (u(!0), b(g, null, q(e.items, (l, d) => (u(), i($, {
66
66
  id: l.key,
67
- key: u,
67
+ key: d,
68
68
  class: v({
69
- alert: r(j)(l).value,
69
+ alert: s(j)(l).value,
70
70
  error: e.invalidParams && e.invalidParams.has(l.key)
71
71
  })
72
72
  }, {
73
73
  default: n(() => [
74
- e.isGlobal ? (d(), p(r(G), {
74
+ e.isGlobal ? (u(), i(s(G), {
75
75
  key: 0,
76
76
  class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
77
77
  to: l.route ?? {}
78
78
  }, {
79
79
  default: n(() => [
80
- o[5] || (o[5] = i("span", { class: "sr-only" }, "Global", -1)),
81
- t(r(D), {
82
- as: "div",
83
- side: "top"
80
+ o[4] || (o[4] = p("span", { class: "sr-only" }, "Global", -1)),
81
+ r(s(D), {
82
+ content: "Global cookies are shared across the whole workspace.",
83
+ placement: "top"
84
84
  }, {
85
- trigger: n(() => [
86
- t(r(x), {
85
+ default: n(() => [
86
+ r(s(B), {
87
+ tabindex: "0",
87
88
  class: "text-c-1",
88
89
  icon: "Globe",
89
90
  size: "xs"
90
91
  })
91
92
  ]),
92
- content: n(() => o[4] || (o[4] = [
93
- 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" }, [
94
- i("div", { class: "text-c-1 flex items-center" }, [
95
- i("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
96
- ])
97
- ], -1)
98
- ])),
99
93
  _: 1
100
94
  })
101
95
  ]),
102
96
  _: 2
103
- }, 1032, ["to"])) : (d(), p(P, {
97
+ }, 1032, ["to"])) : (u(), i(P, {
104
98
  key: 1,
105
99
  class: "!border-r-1/2",
106
100
  disabled: m.hasCheckboxDisabled,
107
101
  modelValue: l.enabled,
108
- "onUpdate:modelValue": (a) => s("toggleRow", u, a)
102
+ "onUpdate:modelValue": (a) => t("toggleRow", d, a)
109
103
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])),
110
- t(y, null, {
104
+ r(y, null, {
111
105
  default: n(() => [
112
- t(R, {
106
+ r(C, {
107
+ "aria-label": `${e.label} Key`,
113
108
  disableCloseBrackets: "",
114
109
  disabled: m.isReadOnly,
115
110
  disableEnter: "",
@@ -121,19 +116,20 @@ const A = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
121
116
  placeholder: "Key",
122
117
  required: !!l.required,
123
118
  workspace: e.workspace,
124
- onBlur: o[0] || (o[0] = (a) => s("inputBlur")),
125
- onFocus: o[1] || (o[1] = (a) => s("inputFocus")),
126
- onSelectVariable: (a) => g(u, "key", a),
127
- "onUpdate:modelValue": (a) => s("updateRow", u, "key", a)
128
- }, null, 8, ["disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
119
+ onBlur: o[0] || (o[0] = (a) => t("inputBlur")),
120
+ onFocus: o[1] || (o[1] = (a) => t("inputFocus")),
121
+ onSelectVariable: (a) => w(d, "key", a),
122
+ "onUpdate:modelValue": (a) => t("updateRow", d, "key", a)
123
+ }, null, 8, ["aria-label", "disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
129
124
  ]),
130
125
  _: 2
131
126
  }, 1024),
132
- t(y, null, {
127
+ r(y, null, {
133
128
  default: n(() => [
134
- t(R, {
129
+ r(C, {
130
+ "aria-label": `${e.label} Value`,
135
131
  class: v(
136
- r(V)(l) ? "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10" : "group-hover:pr-6 group-has-[.cm-focused]:pr-6"
132
+ s(h)(l) ? "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10" : "group-hover:pr-6 group-has-[.cm-focused]:pr-6"
137
133
  ),
138
134
  default: l.default,
139
135
  disableCloseBrackets: "",
@@ -152,62 +148,62 @@ const A = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
152
148
  placeholder: "Value",
153
149
  type: l.type,
154
150
  workspace: e.workspace,
155
- onBlur: o[2] || (o[2] = (a) => s("inputBlur")),
156
- onFocus: o[3] || (o[3] = (a) => s("inputFocus")),
157
- onSelectVariable: (a) => g(u, "value", a),
158
- "onUpdate:modelValue": (a) => s("updateRow", u, "value", a)
151
+ onBlur: o[2] || (o[2] = (a) => t("inputBlur")),
152
+ onFocus: o[3] || (o[3] = (a) => t("inputFocus")),
153
+ onSelectVariable: (a) => w(d, "value", a),
154
+ "onUpdate:modelValue": (a) => t("updateRow", d, "value", a)
159
155
  }, {
160
156
  icon: n(() => [
161
- T(l) && !l.required ? (d(), p(r(B), {
157
+ I(l) && !l.required ? (u(), i(s(R), {
162
158
  key: 0,
163
159
  class: v([{
164
- "-mr-0.5": r(V)(l)
160
+ "-mr-0.5": s(h)(l)
165
161
  }, "text-c-2 hover:text-c-1 hover:bg-b-2 z-context hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex"]),
166
162
  size: "sm",
167
163
  variant: "ghost",
168
- onClick: (a) => s("deleteRow", u)
164
+ onClick: (a) => t("deleteRow", d)
169
165
  }, {
170
166
  default: n(() => [
171
- t(r(E), { class: "size-3.5" })
167
+ r(s(E), { class: "size-3.5" })
172
168
  ]),
173
169
  _: 2
174
170
  }, 1032, ["class", "onClick"])) : k("", !0),
175
- r(V)(l) ? (d(), p(O, {
171
+ s(h)(l) ? (u(), i(K, {
176
172
  key: 1,
177
- item: { ...l, default: z(l) }
173
+ item: { ...l, default: T(l) }
178
174
  }, null, 8, ["item"])) : k("", !0)
179
175
  ]),
180
176
  _: 2
181
- }, 1032, ["class", "default", "disabled", "enum", "envVariables", "environment", "examples", "max", "min", "modelValue", "nullable", "type", "workspace", "onSelectVariable", "onUpdate:modelValue"])
177
+ }, 1032, ["aria-label", "class", "default", "disabled", "enum", "envVariables", "environment", "examples", "max", "min", "modelValue", "nullable", "type", "workspace", "onSelectVariable", "onUpdate:modelValue"])
182
178
  ]),
183
179
  _: 2
184
180
  }, 1024),
185
- e.showUploadButton ? (d(), p(y, {
181
+ e.showUploadButton ? (u(), i(y, {
186
182
  key: 2,
187
183
  class: "group/upload flex items-center justify-center whitespace-nowrap"
188
184
  }, {
189
185
  default: n(() => {
190
186
  var a;
191
187
  return [
192
- l.file ? (d(), f(h, { key: 0 }, [
193
- i("div", A, [
194
- i("span", null, c((a = l.file) == null ? void 0 : a.name), 1)
188
+ l.file ? (u(), b(g, { key: 0 }, [
189
+ p("div", O, [
190
+ p("span", null, c((a = l.file) == null ? void 0 : a.name), 1)
195
191
  ]),
196
- i("button", {
192
+ p("button", {
197
193
  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",
198
194
  type: "button",
199
- onClick: (I) => s("removeFile", u)
200
- }, " Delete ", 8, K)
201
- ], 64)) : (d(), f("div", L, [
202
- t(r(B), {
195
+ onClick: (_) => t("removeFile", d)
196
+ }, " Delete ", 8, A)
197
+ ], 64)) : (u(), b("div", L, [
198
+ r(s(R), {
203
199
  class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
204
200
  size: "sm",
205
201
  variant: "outlined",
206
- onClick: (I) => S(u)
202
+ onClick: (_) => S(d)
207
203
  }, {
208
204
  default: n(() => [
209
- o[6] || (o[6] = i("span", null, "Upload File", -1)),
210
- t(r(x), {
205
+ o[5] || (o[5] = p("span", null, "Upload File", -1)),
206
+ r(s(B), {
211
207
  class: "ml-1",
212
208
  icon: "Upload",
213
209
  size: "xs",
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAO9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AAuKrD,wBAOG"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAO9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AAkKrD,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTableTooltip.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f9282a5e"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-da15dfd7"]]);
5
5
  export {
6
6
  r as default
7
7
  };