@scalar/api-client 2.2.35 → 2.2.38

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 (164) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue2.js +107 -116
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  7. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  8. package/dist/components/AddressBar/AddressBarHistory.vue2.js +96 -76
  9. package/dist/components/AddressBar/AddressBarServer.vue.d.ts +5 -1
  10. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  11. package/dist/components/AddressBar/AddressBarServer.vue.js +92 -86
  12. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +7 -10
  13. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  14. package/dist/components/AddressBar/AddressBarServerItem.vue.js +5 -52
  15. package/dist/components/AddressBar/AddressBarServerItem.vue2.js +75 -2
  16. package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -0
  17. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  18. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  19. package/dist/components/CodeInput/CodeInput.vue2.js +126 -112
  20. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -4
  21. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  22. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +1 -0
  23. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandActionInput.vue.js +21 -18
  25. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  26. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  27. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +2 -2
  28. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  29. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  30. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -0
  31. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  32. package/dist/components/DataTable/DataTableInputSelect.vue.js +86 -54
  33. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  34. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +22 -21
  35. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  36. package/dist/components/Form/Form.vue.js +3 -3
  37. package/dist/components/Server/ServerVariablesForm.vue.d.ts +14 -0
  38. package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -0
  39. package/dist/components/Server/ServerVariablesForm.vue.js +47 -0
  40. package/dist/components/Server/ServerVariablesForm.vue2.js +4 -0
  41. package/dist/components/Server/ServerVariablesSelect.vue.d.ts +12 -0
  42. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -0
  43. package/dist/components/Server/ServerVariablesSelect.vue.js +54 -0
  44. package/dist/components/Server/ServerVariablesSelect.vue2.js +4 -0
  45. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +11 -0
  46. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -0
  47. package/dist/components/Server/ServerVariablesTextbox.vue.js +29 -0
  48. package/dist/components/Server/ServerVariablesTextbox.vue2.js +4 -0
  49. package/dist/components/Server/types.d.ts +9 -0
  50. package/dist/components/Server/types.d.ts.map +1 -0
  51. package/dist/components/SideNav/SideHelp.vue.js +16 -16
  52. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  53. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  54. package/dist/components/Sidebar/Sidebar.vue2.js +11 -10
  55. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  56. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  57. package/dist/components/Sidebar/SidebarListElement.vue2.js +10 -9
  58. package/dist/components/TopNav/TopNav.vue.js +27 -27
  59. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
  60. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  61. package/dist/layouts/App/create-api-client-app.d.ts +99 -84
  62. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  63. package/dist/layouts/Modal/create-api-client-modal.d.ts +198 -168
  64. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  65. package/dist/layouts/Web/create-api-client-web.d.ts +99 -84
  66. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  67. package/dist/libs/create-client.d.ts +110 -90
  68. package/dist/libs/create-client.d.ts.map +1 -1
  69. package/dist/libs/create-client.js +86 -81
  70. package/dist/libs/find-request.d.ts.map +1 -1
  71. package/dist/libs/importers/curl.js +4 -4
  72. package/dist/libs/index.js +18 -19
  73. package/dist/libs/send-request/index.js +3 -4
  74. package/dist/libs/send-request/send-request.d.ts +0 -14
  75. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  76. package/dist/libs/send-request/send-request.js +120 -142
  77. package/dist/libs/send-request/set-request-cookies.d.ts +27 -0
  78. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -0
  79. package/dist/libs/send-request/set-request-cookies.js +54 -0
  80. package/dist/store/active-entities.d.ts +13 -4
  81. package/dist/store/active-entities.d.ts.map +1 -1
  82. package/dist/store/active-entities.js +15 -12
  83. package/dist/store/collections.d.ts.map +1 -1
  84. package/dist/store/cookies.d.ts +4 -58
  85. package/dist/store/cookies.d.ts.map +1 -1
  86. package/dist/store/cookies.js +5 -17
  87. package/dist/store/import-spec.d.ts.map +1 -1
  88. package/dist/store/request-example.d.ts +52 -2
  89. package/dist/store/request-example.d.ts.map +1 -1
  90. package/dist/store/requests.d.ts +2 -2
  91. package/dist/store/requests.d.ts.map +1 -1
  92. package/dist/store/servers.d.ts +40 -20
  93. package/dist/store/servers.d.ts.map +1 -1
  94. package/dist/store/store.d.ts +99 -86
  95. package/dist/store/store.d.ts.map +1 -1
  96. package/dist/store/store.js +51 -53
  97. package/dist/style.css +1 -1
  98. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  99. package/dist/views/Cookies/CookieForm.vue.js +24 -37
  100. package/dist/views/Cookies/CookieModal.vue.d.ts +21 -0
  101. package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -0
  102. package/dist/views/Cookies/CookieModal.vue.js +7 -0
  103. package/dist/views/Cookies/CookieModal.vue2.js +88 -0
  104. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  105. package/dist/views/Cookies/Cookies.vue2.js +98 -119
  106. package/dist/views/Environment/Environment.vue2.js +1 -1
  107. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  108. package/dist/views/Request/Request.vue.js +2 -2
  109. package/dist/views/Request/Request.vue2.js +88 -89
  110. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  111. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  112. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +87 -88
  113. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -1
  114. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  115. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
  116. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +16 -17
  117. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
  118. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +1 -1
  119. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  120. package/dist/views/Request/RequestSection/RequestBody.vue2.js +34 -34
  121. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
  122. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  123. package/dist/views/Request/RequestSection/RequestParams.vue.js +79 -66
  124. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  125. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +57 -74
  126. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  127. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  128. package/dist/views/Request/RequestSection/RequestSection.vue2.js +91 -64
  129. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +9 -2
  130. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  131. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  132. package/dist/views/Request/RequestSection/RequestTable.vue2.js +168 -129
  133. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  134. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +5 -64
  135. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +46 -2
  136. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  137. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  138. package/dist/views/Request/RequestSidebar.vue2.js +143 -143
  139. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  140. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  141. package/dist/views/Request/RequestSidebarItem.vue2.js +71 -71
  142. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  143. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  144. package/dist/views/Request/RequestSubpageHeader.vue2.js +37 -37
  145. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +19 -17
  146. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  147. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  148. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -27
  149. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +31 -31
  150. package/dist/views/Request/handle-drag.d.ts +1 -1
  151. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  152. package/dist/views/Request/handle-drag.js +27 -26
  153. package/dist/views/Request/hooks/useOpenApiWatcher.js +1 -1
  154. package/dist/views/Request/libs/request.d.ts +12 -0
  155. package/dist/views/Request/libs/request.d.ts.map +1 -0
  156. package/dist/views/Request/libs/request.js +4 -0
  157. package/dist/views/Request/libs/{live-sync.d.ts → watch-mode.d.ts} +1 -1
  158. package/dist/views/Request/libs/watch-mode.d.ts.map +1 -0
  159. package/dist/views/Request/libs/{live-sync.js → watch-mode.js} +6 -6
  160. package/dist/views/Servers/Servers.vue2.js +29 -29
  161. package/package.json +10 -12
  162. package/dist/views/Cookies/CookieRaw.vue.js +0 -28
  163. package/dist/views/Cookies/CookieRaw.vue2.js +0 -4
  164. package/dist/views/Request/libs/live-sync.d.ts.map +0 -1
@@ -1,109 +1,92 @@
1
- import { defineComponent as E, computed as P, watch as v, openBlock as g, createBlock as x, withCtx as R, createTextVNode as _, toDisplayString as q, createCommentVNode as V } from "vue";
1
+ import { defineComponent as k, computed as E, watch as P, openBlock as f, createBlock as v, withCtx as y, createTextVNode as _, toDisplayString as b, createCommentVNode as q } from "vue";
2
2
  import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useActiveEntities as M } from "../../../store/active-entities.js";
4
- import N from "./RequestTable.vue.js";
5
- import { REGEX as T } from "@scalar/oas-utils/helpers";
6
- import { useWorkspace as A } from "../../../store/store.js";
7
- const W = /* @__PURE__ */ E({
3
+ import { useActiveEntities as V } from "../../../store/active-entities.js";
4
+ import M from "./RequestTable.vue.js";
5
+ import { REGEX as U } from "@scalar/oas-utils/helpers";
6
+ import { useWorkspace as N } from "../../../store/store.js";
7
+ const O = /* @__PURE__ */ k({
8
8
  __name: "RequestPathParams",
9
9
  props: {
10
10
  title: {},
11
11
  paramKey: {}
12
12
  },
13
- setup($) {
14
- const u = $, { activeRequest: o, activeExample: s, activeServer: l } = M(), { requestMutators: h, requestExampleMutators: y } = A(), c = P(() => {
15
- const e = s.value;
16
- return e ? e.parameters[u.paramKey].map((t) => {
17
- var a;
18
- return {
19
- ...t,
20
- enum: t.enum || ((a = e.serverVariables) == null ? void 0 : a[t.key])
21
- };
22
- }) : [];
23
- }), k = (e, t, a) => {
24
- var i, r;
25
- if (!o.value || !s.value) return;
26
- const p = s.value.parameters[u.paramKey], n = (i = p[e]) == null ? void 0 : i.key;
27
- if (n) {
28
- if (t === "key") {
29
- if ((r = p[e]) != null && r.required)
13
+ setup(g) {
14
+ const p = g, { activeRequest: o, activeExample: n } = V(), { requestMutators: d, requestExampleMutators: h } = N(), i = E(() => {
15
+ const e = n.value;
16
+ return e ? e.parameters[p.paramKey].map((a) => ({
17
+ ...a,
18
+ enum: a.enum
19
+ })) : [];
20
+ }), x = (e, a, r) => {
21
+ var c, t;
22
+ if (!o.value || !n.value) return;
23
+ const u = n.value.parameters[p.paramKey], s = (c = u[e]) == null ? void 0 : c.key;
24
+ if (s) {
25
+ if (a === "key") {
26
+ if ((t = u[e]) != null && t.required)
30
27
  return;
31
- if (a) {
32
- const d = encodeURIComponent(n), f = encodeURIComponent(a), K = new RegExp(`(?<=/):${d}(?=[/?#]|$)`, "g"), b = o.value.path.replace(
33
- K,
34
- `:${f}`
28
+ if (r) {
29
+ const l = encodeURIComponent(s), m = encodeURIComponent(r), C = new RegExp(`(?<=/):${l}(?=[/?#]|$)`, "g"), K = o.value.path.replace(
30
+ C,
31
+ `:${m}`
35
32
  );
36
- h.edit(o.value.uid, "path", b);
33
+ d.edit(o.value.uid, "path", K);
37
34
  } else {
38
- p.splice(e, 1);
39
- const d = new RegExp(`/:${encodeURIComponent(n)}(?=[/?#]|$)`, "g"), f = o.value.path.replace(d, "");
40
- h.edit(o.value.uid, "path", f);
35
+ u.splice(e, 1);
36
+ const l = new RegExp(`/:${encodeURIComponent(s)}(?=[/?#]|$)`, "g"), m = o.value.path.replace(l, "");
37
+ d.edit(o.value.uid, "path", m);
41
38
  }
42
39
  }
43
- y.edit(
44
- s.value.uid,
45
- `parameters.${u.paramKey}.${e}.${t}`,
46
- a
40
+ h.edit(
41
+ n.value.uid,
42
+ `parameters.${p.paramKey}.${e}.${a}`,
43
+ r
47
44
  );
48
45
  }
49
- }, C = (e) => {
50
- var i;
51
- if (!s.value) return;
52
- const t = ((i = e.match(T.PATH)) == null ? void 0 : i.map((r) => r.slice(1, -1))) || [], a = s.value.parameters[u.paramKey], p = new Map(a.map((r) => [r.key, r])), n = t.map(
53
- (r) => p.get(r) || { key: r, value: "", enabled: !0 }
46
+ }, R = (e) => {
47
+ var c;
48
+ if (!n.value) return;
49
+ const a = ((c = e.match(U.PATH)) == null ? void 0 : c.map((t) => t.slice(1, -1))) || [], r = n.value.parameters[p.paramKey], u = new Map(r.map((t) => [t.key, t])), s = a.map(
50
+ (t) => u.get(t) || { key: t, value: "", enabled: !0 }
54
51
  );
55
- a.forEach((r) => {
56
- !t.includes(r.key) && (r.value || r.required) && n.push(r);
57
- }), a.splice(0, a.length, ...n), y.edit(
58
- s.value.uid,
59
- `parameters.${u.paramKey}`,
60
- a
52
+ r.forEach((t) => {
53
+ !a.includes(t.key) && (t.value || t.required) && s.push(t);
54
+ }), r.splice(0, r.length, ...s), h.edit(
55
+ n.value.uid,
56
+ `parameters.${p.paramKey}`,
57
+ r
61
58
  );
62
- }, m = (e) => {
63
- e && C(e);
59
+ }, $ = (e) => {
60
+ e && R(e);
64
61
  };
65
- return v(
66
- () => o.value,
67
- (e) => {
68
- var t, a;
69
- e && ((t = l.value) != null && t.url) && m((a = l.value) == null ? void 0 : a.url);
70
- }
71
- ), v(
72
- () => {
73
- var e;
74
- return (e = l.value) == null ? void 0 : e.url;
75
- },
76
- (e, t) => {
77
- e && e !== t && m(e);
78
- }
79
- ), v(
62
+ return P(
80
63
  () => {
81
64
  var e;
82
65
  return (e = o.value) == null ? void 0 : e.path;
83
66
  },
84
67
  (e) => {
85
- e && m(e);
68
+ e && $(e);
86
69
  }
87
- ), (e, t) => (g(), x(w, {
88
- itemCount: c.value.length
70
+ ), (e, a) => (f(), v(w, {
71
+ itemCount: i.value.length
89
72
  }, {
90
- title: R(() => [
91
- _(q(e.title), 1)
73
+ title: y(() => [
74
+ _(b(e.title), 1)
92
75
  ]),
93
- default: R(() => [
94
- c.value.length ? (g(), x(N, {
76
+ default: y(() => [
77
+ i.value.length ? (f(), v(M, {
95
78
  key: 0,
96
79
  class: "flex-1",
97
80
  columns: ["32px", "", ""],
98
81
  hasCheckboxDisabled: "",
99
- items: c.value,
100
- onUpdateRow: k
101
- }, null, 8, ["items"])) : V("", !0)
82
+ items: i.value,
83
+ onUpdateRow: x
84
+ }, null, 8, ["items"])) : q("", !0)
102
85
  ]),
103
86
  _: 1
104
87
  }, 8, ["itemCount"]));
105
88
  }
106
89
  });
107
90
  export {
108
- W as default
91
+ O as default
109
92
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA4KA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAkQF,wBAOG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA+MA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AA+RF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSection.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-4daacc06"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-306eaf39"]]);
5
5
  export {
6
- r as default
6
+ f as default
7
7
  };
@@ -1,28 +1,30 @@
1
- import { defineComponent as b, computed as A, ref as V, watch as w, openBlock as d, createBlock as C, unref as o, withCtx as x, createElementVNode as g, createElementBlock as v, createCommentVNode as R, toDisplayString as H, createVNode as s, withDirectives as i, vShow as r } from "vue";
2
- import N from "../../../components/ContextBar.vue.js";
3
- import E from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import { useActiveEntities as K } from "../../../store/active-entities.js";
5
- import U from "./RequestBody.vue.js";
6
- import h from "./RequestParams.vue.js";
7
- import Q from "./RequestPathParams.vue.js";
8
- import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
9
- import $ from "./RequestAuth/RequestAuth.vue.js";
10
- import { useWorkspace as D } from "../../../store/store.js";
11
- const M = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, z = {
1
+ import { defineComponent as E, computed as f, ref as H, watch as R, openBlock as d, createBlock as K, unref as o, withCtx as x, createElementVNode as g, createElementBlock as h, createCommentVNode as N, toDisplayString as D, createVNode as i, withDirectives as u, vShow as n } from "vue";
2
+ import U from "../../../components/ContextBar.vue.js";
3
+ import Q from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import { matchesDomain as W } from "../../../libs/send-request/set-request-cookies.js";
5
+ import { useActiveEntities as $ } from "../../../store/active-entities.js";
6
+ import L from "./RequestBody.vue.js";
7
+ import y from "./RequestParams.vue.js";
8
+ import M from "./RequestPathParams.vue.js";
9
+ import { canMethodHaveBody as _, isDefined as O } from "@scalar/oas-utils/helpers";
10
+ import P from "./RequestAuth/RequestAuth.vue.js";
11
+ import { useWorkspace as z } from "../../../store/store.js";
12
+ import { useLayout as I } from "../../../hooks/useLayout.js";
13
+ const j = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, F = {
12
14
  key: 0,
13
15
  class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
14
16
  for: "requestname"
15
- }, I = ["value"], L = {
17
+ }, G = ["value"], J = {
16
18
  key: 2,
17
19
  class: "flex items-center text-c-1 h-8"
18
- }, O = { class: "request-section-content custom-scroll flex flex-1 flex-col" }, te = /* @__PURE__ */ b({
20
+ }, T = { class: "request-section-content custom-scroll flex flex-1 flex-col" }, ce = /* @__PURE__ */ E({
19
21
  __name: "RequestSection",
20
22
  props: {
21
23
  selectedSecuritySchemeUids: {}
22
24
  },
23
- setup(P) {
24
- const { activeRequest: l, activeExample: y } = K(), { isReadOnly: p, requestMutators: k } = D(), q = A(() => {
25
- var a, u;
25
+ setup(X) {
26
+ const { activeRequest: a, activeExample: k, activeWorkspace: q, activeServer: p } = $(), { requestMutators: B, cookies: b } = z(), { layout: v } = I(), w = f(() => {
27
+ var e, s;
26
28
  const t = /* @__PURE__ */ new Set([
27
29
  "All",
28
30
  "Query",
@@ -32,91 +34,116 @@ const M = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
32
34
  "Headers",
33
35
  "Body"
34
36
  ]);
35
- return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"), f(((u = l.value) == null ? void 0 : u.method) ?? "get") || t.delete("Body"), _.value && t.delete("Auth"), [...t];
36
- }), _ = A(
37
+ return (e = k.value) != null && e.parameters.path.length || t.delete("Variables"), _(((s = a.value) == null ? void 0 : s.method) ?? "get") || t.delete("Body"), S.value && t.delete("Auth"), [...t];
38
+ }), S = f(
37
39
  () => {
38
- var t, a;
39
- return p && ((a = (t = l.value) == null ? void 0 : t.security) == null ? void 0 : a.length) === 0;
40
+ var t, e;
41
+ return v === "modal" && ((e = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : e.length) === 0;
40
42
  }
41
- ), e = V("All");
42
- w(l, (t) => {
43
- e.value === "Body" && t && !f(t.method) && (e.value = "All");
43
+ ), l = H("All");
44
+ R(a, (t) => {
45
+ l.value === "Body" && t && !_(t.method) && (l.value = "All");
44
46
  });
45
- const B = (t) => {
46
- if (!l.value) return;
47
- const a = t.target;
48
- k.edit(l.value.uid, "summary", a.value);
49
- };
50
- return (t, a) => {
51
- var u;
52
- return d(), C(E, {
53
- "aria-label": `Request: ${(u = o(l)) == null ? void 0 : u.summary}`
47
+ const C = (t) => {
48
+ if (!a.value) return;
49
+ const e = t.target;
50
+ B.edit(a.value.uid, "summary", e.value);
51
+ }, V = f(
52
+ () => {
53
+ var t;
54
+ return (((t = q.value) == null ? void 0 : t.cookies) ?? []).map((e) => b[e]).filter(O).filter((e) => e.name).filter(
55
+ (e) => {
56
+ var s, r;
57
+ return W(
58
+ ((s = p == null ? void 0 : p.value) == null ? void 0 : s.url) || ((r = a.value) == null ? void 0 : r.path),
59
+ e.domain
60
+ );
61
+ }
62
+ ).map((e) => ({
63
+ key: e.name,
64
+ value: e.value,
65
+ route: {
66
+ name: "cookies",
67
+ params: {
68
+ cookies: e.uid
69
+ }
70
+ },
71
+ enabled: !0
72
+ }));
73
+ }
74
+ );
75
+ return (t, e) => {
76
+ var s;
77
+ return d(), K(Q, {
78
+ "aria-label": `Request: ${(s = o(a)) == null ? void 0 : s.summary}`
54
79
  }, {
55
80
  title: x(() => {
56
- var n, c;
81
+ var r, c;
57
82
  return [
58
- g("div", M, [
59
- o(p) ? R("", !0) : (d(), v("label", z)),
60
- o(p) ? (d(), v("span", L, H((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
83
+ g("div", j, [
84
+ o(v) !== "modal" ? (d(), h("label", F)) : N("", !0),
85
+ o(v) !== "modal" ? (d(), h("input", {
61
86
  key: 1,
62
87
  id: "requestname",
63
- class: "text-c-1 rounded pointer-events-auto relative w-full pl-1.25 -ml-0.5 md:-ml-1.25 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline z-10",
88
+ class: "text-c-1 rounded pointer-events-auto relative w-full pl-1.25 -ml-0.5 md:-ml-1.25 h-8 group-hover-input has-[:focus-visible]:outline z-10",
64
89
  placeholder: "Request Name",
65
- value: (n = o(l)) == null ? void 0 : n.summary,
66
- onInput: B
67
- }, null, 40, I))
90
+ value: (r = o(a)) == null ? void 0 : r.summary,
91
+ onInput: C
92
+ }, null, 40, G)) : (d(), h("span", J, D((c = o(a)) == null ? void 0 : c.summary), 1))
68
93
  ]),
69
- s(N, {
70
- activeSection: e.value,
71
- sections: q.value,
72
- onSetActiveSection: a[0] || (a[0] = (m) => e.value = m)
94
+ i(U, {
95
+ activeSection: l.value,
96
+ sections: w.value,
97
+ onSetActiveSection: e[0] || (e[0] = (m) => l.value = m)
73
98
  }, null, 8, ["activeSection", "sections"])
74
99
  ];
75
100
  }),
76
101
  default: x(() => {
77
- var n, c, m, S;
102
+ var r, c, m, A;
78
103
  return [
79
- g("div", O, [
80
- i(s($, {
104
+ g("div", T, [
105
+ u(i(P, {
81
106
  selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
82
107
  title: "Authentication"
83
108
  }, null, 8, ["selectedSecuritySchemeUids"]), [
84
109
  [
85
- r,
86
- !_.value && (e.value === "All" || e.value === "Auth")
110
+ n,
111
+ !S.value && (l.value === "All" || l.value === "Auth")
87
112
  ]
88
113
  ]),
89
- i(s(Q, {
114
+ u(i(M, {
90
115
  paramKey: "path",
91
116
  title: "Variables"
92
117
  }, null, 512), [
93
118
  [
94
- r,
95
- (e.value === "All" || e.value === "Variables") && ((m = (c = (n = o(y)) == null ? void 0 : n.parameters) == null ? void 0 : c.path) == null ? void 0 : m.length)
119
+ n,
120
+ (l.value === "All" || l.value === "Variables") && ((m = (c = (r = o(k)) == null ? void 0 : r.parameters) == null ? void 0 : c.path) == null ? void 0 : m.length)
96
121
  ]
97
122
  ]),
98
- i(s(h, {
123
+ u(i(y, {
99
124
  paramKey: "cookies",
100
- title: "Cookies"
101
- }, null, 512), [
102
- [r, e.value === "All" || e.value === "Cookies"]
125
+ readOnlyEntries: V.value,
126
+ title: "Cookies",
127
+ workspaceParamKey: "cookies"
128
+ }, null, 8, ["readOnlyEntries"]), [
129
+ [n, l.value === "All" || l.value === "Cookies"]
103
130
  ]),
104
- i(s(h, {
131
+ u(i(y, {
105
132
  paramKey: "headers",
106
133
  title: "Headers"
107
134
  }, null, 512), [
108
- [r, e.value === "All" || e.value === "Headers"]
135
+ [n, l.value === "All" || l.value === "Headers"]
109
136
  ]),
110
- i(s(h, {
137
+ u(i(y, {
111
138
  paramKey: "query",
112
139
  title: "Query Parameters"
113
140
  }, null, 512), [
114
- [r, e.value === "All" || e.value === "Query"]
141
+ [n, l.value === "All" || l.value === "Query"]
115
142
  ]),
116
- i(s(U, { title: "Body" }, null, 512), [
143
+ u(i(L, { title: "Body" }, null, 512), [
117
144
  [
118
- r,
119
- ((S = o(l)) == null ? void 0 : S.method) && (e.value === "All" || e.value === "Body") && o(f)(o(l).method)
145
+ n,
146
+ ((A = o(a)) == null ? void 0 : A.method) && (l.value === "All" || l.value === "Body") && o(_)(o(a).method)
120
147
  ]
121
148
  ])
122
149
  ])
@@ -128,5 +155,5 @@ const M = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
128
155
  }
129
156
  });
130
157
  export {
131
- te as default
158
+ ce as default
132
159
  };
@@ -1,9 +1,14 @@
1
1
  import type { RequestExampleParameter } from '@scalar/oas-utils/entities/spec';
2
+ import type { RouteLocationRaw } from 'vue-router';
2
3
  type __VLS_Props = {
3
- items?: RequestExampleParameter[];
4
- /** Disable the checkbox */
4
+ items?: (RequestExampleParameter & {
5
+ route?: RouteLocationRaw;
6
+ })[];
7
+ /** Hide the enabled column */
5
8
  hasCheckboxDisabled?: boolean;
6
9
  showUploadButton?: boolean;
10
+ isGlobal?: boolean;
11
+ isReadOnly?: boolean;
7
12
  };
8
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
14
  updateRow: (idx: number, field: "key" | "value", value: string) => any;
@@ -26,6 +31,8 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
26
31
  }>, {
27
32
  hasCheckboxDisabled: boolean;
28
33
  showUploadButton: boolean;
34
+ isGlobal: boolean;
35
+ isReadOnly: boolean;
29
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
30
37
  export default _default;
31
38
  //# sourceMappingURL=RequestTable.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAiNA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAO9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACjC,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;;;;;;;;;;;;;;yBAFsB,OAAO;sBACV,OAAO;;AA4a9B,wBASG"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAuPA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAOlD,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;CACrB,CAAC;;;;;;;;;;;;;;;;;;;;yBAJsB,OAAO;sBACV,OAAO;cACf,OAAO;gBACL,OAAO;;AAifxB,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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d205bf31"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49d61d6c"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };