@scalar/api-client 2.1.7 → 2.1.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 (112) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/assets/rabbit.ascii.js +11 -0
  3. package/dist/assets/rabbitjump.ascii.js +11 -0
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  6. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +48 -21
  8. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  9. package/dist/components/ContextBar.vue.js +2 -2
  10. package/dist/components/ContextBar.vue2.js +22 -13
  11. package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
  12. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  13. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  14. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  15. package/dist/components/IconSelector.vue.d.ts +35 -0
  16. package/dist/components/IconSelector.vue.d.ts.map +1 -0
  17. package/dist/components/IconSelector.vue.js +74 -0
  18. package/dist/components/IconSelector.vue2.js +4 -0
  19. package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
  20. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  21. package/dist/components/ScalarAsciiArt.vue2.js +10 -10
  22. package/dist/components/SideNav/SideHelp.vue.js +1 -1
  23. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  24. package/dist/components/SideNav/SideNav.vue.js +2 -2
  25. package/dist/components/SideNav/SideNav.vue2.js +19 -22
  26. package/dist/components/SideNav/SideNavLink.vue.d.ts +0 -2
  27. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  28. package/dist/components/SideNav/SideNavLink.vue.js +19 -21
  29. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +24 -0
  30. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -0
  31. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +58 -0
  32. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +4 -0
  33. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.d.ts → EditSidebarListElement.vue.d.ts} +3 -3
  34. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -0
  35. package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.js → EditSidebarListElement.vue.js} +9 -9
  36. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +4 -0
  37. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  38. package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
  39. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  40. package/dist/components/Sidebar/SidebarButton.vue.js +24 -26
  41. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  42. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  43. package/dist/layouts/App/ApiClientApp.vue.js +4 -4
  44. package/dist/layouts/App/create-api-client-app.d.ts +34 -22
  45. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  46. package/dist/layouts/Modal/create-api-client-modal.d.ts +68 -44
  47. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  48. package/dist/layouts/Modal/create-api-client-modal.js +19 -17
  49. package/dist/libs/create-client.d.ts +39 -38
  50. package/dist/libs/create-client.d.ts.map +1 -1
  51. package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
  52. package/dist/store/collections.d.ts +14 -4
  53. package/dist/store/collections.d.ts.map +1 -1
  54. package/dist/store/import-spec.d.ts +3 -2
  55. package/dist/store/import-spec.d.ts.map +1 -1
  56. package/dist/store/import-spec.js +34 -26
  57. package/dist/store/request-example.d.ts +2 -2
  58. package/dist/store/requests.d.ts +2 -2
  59. package/dist/store/security-schemes.d.ts +4 -4
  60. package/dist/store/store.d.ts +68 -44
  61. package/dist/store/store.d.ts.map +1 -1
  62. package/dist/store/tags.d.ts +4 -4
  63. package/dist/store/workspace.d.ts +4 -4
  64. package/dist/style.css +1 -1
  65. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  66. package/dist/views/Cookies/Cookies.vue2.js +74 -80
  67. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  68. package/dist/views/Environment/Environment.vue2.js +86 -92
  69. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  70. package/dist/views/Request/Request.vue.js +1 -1
  71. package/dist/views/Request/Request.vue2.js +26 -26
  72. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  73. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  74. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -80
  75. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  76. package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -45
  77. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  78. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  79. package/dist/views/Request/RequestSidebar.vue2.js +135 -113
  80. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  82. package/dist/views/Request/RequestSidebarItem.vue2.js +94 -91
  83. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  84. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  85. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +93 -79
  86. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  87. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  88. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +8 -5
  89. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  90. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +33 -33
  91. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  92. package/dist/views/Request/components/WorkspaceDropdown.vue.js +109 -95
  93. package/dist/views/Request/types/sidebar-item.d.ts +2 -1
  94. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  95. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  96. package/dist/views/Servers/Servers.vue2.js +48 -54
  97. package/package.json +9 -12
  98. package/dist/components/Search/SearchButton.vue.d.ts +0 -7
  99. package/dist/components/Search/SearchButton.vue.d.ts.map +0 -1
  100. package/dist/components/Search/SearchModal.vue.d.ts +0 -17
  101. package/dist/components/Search/SearchModal.vue.d.ts.map +0 -1
  102. package/dist/components/Search/SearchModal.vue.js +0 -7
  103. package/dist/components/Search/SearchModal.vue2.js +0 -142
  104. package/dist/components/Search/index.d.ts +0 -3
  105. package/dist/components/Search/index.d.ts.map +0 -1
  106. package/dist/components/Search/index.js +0 -4
  107. package/dist/components/SideNav/WorkspaceProfileIcon.vue.js +0 -31
  108. package/dist/components/SideNav/WorkspaceProfileIcon.vue3.js +0 -5
  109. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +0 -1
  110. package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +0 -4
  111. package/dist/components/SubpageHeader.vue.js +0 -7
  112. package/dist/components/SubpageHeader.vue2.js +0 -34
@@ -1,23 +1,22 @@
1
- import { defineComponent as L, computed as V, onMounted as D, openBlock as l, createBlock as y, withCtx as n, createVNode as s, unref as a, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as x, normalizeClass as w, createTextVNode as v, toDisplayString as S, withDirectives as O, vShow as $ } from "vue";
1
+ import { defineComponent as L, computed as V, onMounted as D, openBlock as l, createBlock as y, withCtx as a, createVNode as s, unref as n, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as x, normalizeClass as w, createTextVNode as v, toDisplayString as S, withDirectives as O, vShow as $ } from "vue";
2
2
  import M from "../../components/Sidebar/SidebarButton.vue.js";
3
3
  import N from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import B from "../../components/Sidebar/SidebarListElement.vue.js";
5
- import F from "../../components/SubpageHeader.vue.js";
6
- import I from "../../components/ViewLayout/ViewLayout.vue.js";
7
- import R from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
+ import F from "../../components/ViewLayout/ViewLayout.vue.js";
6
+ import I from "../../components/ViewLayout/ViewLayoutContent.vue.js";
8
7
  import { ScalarIcon as j } from "@scalar/components";
9
- import { cookieSchema as A } from "@scalar/oas-utils/entities/cookie";
10
- import { useRouter as H } from "vue-router";
11
- import P from "./CookieForm.vue.js";
12
- import T from "./CookieRaw.vue.js";
13
- import { useSidebar as W } from "../../hooks/useSidebar.js";
14
- import { useWorkspace as q } from "../../store/store.js";
15
- import G from "../../components/Sidebar/Sidebar.vue.js";
16
- const J = { class: "flex-1" }, K = ["onClick"], Q = { class: "before:bg-b-3 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, U = ["onClick"], X = { class: "before:bg-b-3 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, be = /* @__PURE__ */ L({
8
+ import { cookieSchema as R } from "@scalar/oas-utils/entities/cookie";
9
+ import { useRouter as A } from "vue-router";
10
+ import H from "./CookieForm.vue.js";
11
+ import P from "./CookieRaw.vue.js";
12
+ import { useSidebar as T } from "../../hooks/useSidebar.js";
13
+ import { useWorkspace as W } from "../../store/store.js";
14
+ import q from "../../components/Sidebar/Sidebar.vue.js";
15
+ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, Q = ["onClick"], U = { class: "before:bg-b-3 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, de = /* @__PURE__ */ L({
17
16
  __name: "Cookies",
18
- setup(Y) {
19
- const { cookies: p, cookieMutators: g } = q(), { collapsedSidebarFolders: i, toggleSidebarFolder: k } = W(), b = H(), E = () => {
20
- const t = Object.keys(p).length, e = A.parse({
17
+ setup(X) {
18
+ const { cookies: p, cookieMutators: g } = W(), { collapsedSidebarFolders: i, toggleSidebarFolder: k } = T(), b = A(), E = () => {
19
+ const t = Object.keys(p).length, e = R.parse({
21
20
  name: `Cookie ${t}`,
22
21
  value: "",
23
22
  domain: "example.com",
@@ -52,87 +51,82 @@ const J = { class: "flex-1" }, K = ["onClick"], Q = { class: "before:bg-b-3 befo
52
51
  i[o] = !0;
53
52
  });
54
53
  }), (t, e) => (l(), y(F, null, {
55
- default: n(() => [
56
- s(I, null, {
57
- default: n(() => [
58
- s(a(G), { title: "Cookies" }, {
59
- content: n(() => [
60
- f("div", J, [
61
- s(N, null, {
62
- default: n(() => [
63
- (l(!0), m(_, null, x(h.value, (o, r) => (l(), m("div", { key: r }, [
54
+ default: a(() => [
55
+ s(n(q), { title: "Cookies" }, {
56
+ content: a(() => [
57
+ f("div", G, [
58
+ s(N, null, {
59
+ default: a(() => [
60
+ (l(!0), m(_, null, x(h.value, (o, r) => (l(), m("div", { key: r }, [
61
+ f("button", {
62
+ class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
63
+ type: "button",
64
+ onClick: (d) => n(k)(r)
65
+ }, [
66
+ s(n(j), {
67
+ class: w(["text-c-3", {
68
+ "rotate-90": n(i)[r]
69
+ }]),
70
+ icon: "ChevronRight",
71
+ size: "sm",
72
+ thickness: "2.5"
73
+ }, null, 8, ["class"]),
74
+ v(" " + S(r), 1)
75
+ ], 8, J),
76
+ O(f("div", K, [
77
+ (l(!0), m(_, null, x(o, (d, c) => (l(), m("div", { key: c }, [
64
78
  f("button", {
65
- class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
79
+ class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
66
80
  type: "button",
67
- onClick: (d) => a(k)(r)
81
+ onClick: (u) => n(k)(r + c)
68
82
  }, [
69
- s(a(j), {
83
+ s(n(j), {
70
84
  class: w(["text-c-3", {
71
- "rotate-90": a(i)[r]
85
+ "rotate-90": n(i)[r + c]
72
86
  }]),
73
87
  icon: "ChevronRight",
74
88
  size: "sm",
75
89
  thickness: "2.5"
76
90
  }, null, 8, ["class"]),
77
- v(" " + S(r), 1)
78
- ], 8, K),
79
- O(f("div", Q, [
80
- (l(!0), m(_, null, x(o, (d, c) => (l(), m("div", { key: c }, [
81
- f("button", {
82
- class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
83
- type: "button",
84
- onClick: (u) => a(k)(r + c)
85
- }, [
86
- s(a(j), {
87
- class: w(["text-c-3", {
88
- "rotate-90": a(i)[r + c]
89
- }]),
90
- icon: "ChevronRight",
91
- size: "sm",
92
- thickness: "2.5"
93
- }, null, 8, ["class"]),
94
- v(" " + S(c), 1)
95
- ], 8, U),
96
- O(f("div", X, [
97
- (l(!0), m(_, null, x(d, (u) => (l(), y(B, {
98
- key: u.uid,
99
- class: "cookie text-xs",
100
- variable: { name: u.name, uid: u.uid },
101
- warningMessage: "Are you sure you want to delete this cookie?",
102
- onDelete: (Z) => z(u.uid)
103
- }, null, 8, ["variable", "onDelete"]))), 128))
104
- ], 512), [
105
- [$, C(r + c)]
106
- ])
107
- ]))), 128))
91
+ v(" " + S(c), 1)
92
+ ], 8, Q),
93
+ O(f("div", U, [
94
+ (l(!0), m(_, null, x(d, (u) => (l(), y(B, {
95
+ key: u.uid,
96
+ class: "cookie text-xs",
97
+ variable: { name: u.name, uid: u.uid },
98
+ warningMessage: "Are you sure you want to delete this cookie?",
99
+ onDelete: (Y) => z(u.uid)
100
+ }, null, 8, ["variable", "onDelete"]))), 128))
108
101
  ], 512), [
109
- [$, C(r)]
102
+ [$, C(r + c)]
110
103
  ])
111
104
  ]))), 128))
112
- ]),
113
- _: 1
114
- })
115
- ])
116
- ]),
117
- button: n(() => [
118
- s(M, { click: E }, {
119
- title: n(() => [
120
- v("Add Item")
121
- ]),
122
- _: 1
123
- })
124
- ]),
125
- _: 1
126
- }),
127
- s(R, { class: "flex-1" }, {
128
- default: n(() => [
129
- s(P),
130
- s(T)
105
+ ], 512), [
106
+ [$, C(r)]
107
+ ])
108
+ ]))), 128))
109
+ ]),
110
+ _: 1
111
+ })
112
+ ])
113
+ ]),
114
+ button: a(() => [
115
+ s(M, { click: E }, {
116
+ title: a(() => [
117
+ v("Add Item")
131
118
  ]),
132
119
  _: 1
133
120
  })
134
121
  ]),
135
122
  _: 1
123
+ }),
124
+ s(I, { class: "flex-1" }, {
125
+ default: a(() => [
126
+ s(H),
127
+ s(P)
128
+ ]),
129
+ _: 1
136
130
  })
137
131
  ]),
138
132
  _: 1
@@ -140,5 +134,5 @@ const J = { class: "flex-1" }, K = ["onClick"], Q = { class: "before:bg-b-3 befo
140
134
  }
141
135
  });
142
136
  export {
143
- be as default
137
+ de as default
144
138
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AAkhBA,wBAKG"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AA6fA,wBAKG"}
@@ -1,22 +1,21 @@
1
- import { defineComponent as C, ref as c, onMounted as S, openBlock as r, createBlock as d, withCtx as o, createVNode as a, createElementVNode as _, createElementBlock as f, Fragment as V, renderList as w, unref as u, createTextVNode as h, createSlots as I, createCommentVNode as $, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
1
+ import { defineComponent as C, ref as c, onMounted as V, openBlock as a, createBlock as d, withCtx as o, createVNode as r, createElementVNode as _, createElementBlock as v, Fragment as w, renderList as S, unref as u, createTextVNode as h, createSlots as I, createCommentVNode as $, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
2
2
  import A from "../../components/CodeInput/CodeInput.vue.js";
3
3
  import K from "../../components/Sidebar/Sidebar.vue.js";
4
4
  import M from "../../components/Sidebar/SidebarButton.vue.js";
5
5
  import T from "../../components/Sidebar/SidebarList.vue.js";
6
6
  import U from "../../components/Sidebar/SidebarListElement.vue.js";
7
- import j from "../../components/SubpageHeader.vue.js";
8
- import F from "../../components/ViewLayout/ViewLayout.vue.js";
9
- import H from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
+ import j from "../../components/ViewLayout/ViewLayout.vue.js";
8
+ import F from "../../components/ViewLayout/ViewLayoutContent.vue.js";
10
9
  import J from "../../components/ViewLayout/ViewLayoutSection.vue.js";
11
10
  import { environmentSchema as O } from "@scalar/oas-utils/entities/environment";
12
11
  import { nanoid as W } from "nanoid";
13
12
  import { useRouter as q } from "vue-router";
14
13
  import z from "./EnvironmentColors.vue.js";
15
14
  import { useWorkspace as G } from "../../store/store.js";
16
- const P = { class: "flex-1" }, Q = ["value"], X = { class: "colors ml-auto" }, ve = /* @__PURE__ */ C({
15
+ const H = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, de = /* @__PURE__ */ C({
17
16
  __name: "Environment",
18
- setup(Y) {
19
- const v = q(), { environments: l, environmentMutators: i } = G(), e = c(null), p = c(null), m = c(!1);
17
+ setup(X) {
18
+ const f = q(), { environments: l, environmentMutators: i } = G(), e = c(null), p = c(null), m = c(!1);
20
19
  function y() {
21
20
  const t = O.parse({
22
21
  name: "New Environment",
@@ -26,107 +25,102 @@ const P = { class: "flex-1" }, Q = ["value"], X = { class: "colors ml-auto" }, v
26
25
  parsed: [],
27
26
  isDefault: !1
28
27
  });
29
- i.add(t), e.value = t.uid, v.push(e.value);
28
+ i.add(t), e.value = t.uid, f.push(e.value);
30
29
  }
31
- function g(t) {
30
+ function E(t) {
32
31
  e.value && i.edit(e.value, "value", t);
33
32
  }
34
- const E = (t) => {
33
+ const g = (t) => {
35
34
  i.delete(t), e.value === t && (e.value = null);
36
35
  }, k = (t) => e.value && i.edit(e.value, "color", t), x = () => {
37
- v.currentRoute.value.params.environment === "default" && (e.value = l.default.uid);
38
- }, b = () => {
36
+ f.currentRoute.value.params.environment === "default" && (e.value = l.default.uid);
37
+ }, D = () => {
39
38
  e.value && !l[e.value].isDefault && (m.value = !0, R(() => {
40
39
  var t;
41
40
  (t = p.value) == null || t.focus();
42
41
  }));
43
- }, D = (t) => {
42
+ }, N = (t) => {
44
43
  const n = t.target.value;
45
44
  e.value && !l[e.value].isDefault && i.edit(e.value, "name", n);
46
45
  };
47
- return S(x), (t, s) => (r(), d(j, null, {
46
+ return V(x), (t, s) => (a(), d(j, null, {
48
47
  default: o(() => [
49
- a(F, null, {
50
- default: o(() => [
51
- a(K, { title: "Environment" }, {
52
- content: o(() => [
53
- _("div", P, [
54
- a(T, null, {
55
- default: o(() => [
56
- (r(!0), f(V, null, w(u(l), (n) => (r(), d(U, {
57
- key: n.uid,
58
- class: "text-xs",
59
- variable: {
60
- name: n.name,
61
- uid: n.uid,
62
- color: n.color,
63
- isDefault: n.isDefault
64
- },
65
- warningMessage: "Are you sure you want to delete this environment?",
66
- onClick: (N) => e.value = n.uid,
67
- onDelete: (N) => E(n.uid)
68
- }, null, 8, ["variable", "onClick", "onDelete"]))), 128))
69
- ]),
70
- _: 1
71
- })
72
- ])
73
- ]),
74
- button: o(() => [
75
- a(M, { click: y }, {
76
- title: o(() => [
77
- h("Add Environment")
78
- ]),
79
- _: 1
80
- })
48
+ r(K, { title: "Environment" }, {
49
+ content: o(() => [
50
+ _("div", H, [
51
+ r(T, null, {
52
+ default: o(() => [
53
+ (a(!0), v(w, null, S(u(l), (n) => (a(), d(U, {
54
+ key: n.uid,
55
+ class: "text-xs",
56
+ variable: {
57
+ name: n.name,
58
+ uid: n.uid,
59
+ color: n.color,
60
+ isDefault: n.isDefault
61
+ },
62
+ warningMessage: "Are you sure you want to delete this environment?",
63
+ onClick: (b) => e.value = n.uid,
64
+ onDelete: (b) => g(n.uid)
65
+ }, null, 8, ["variable", "onClick", "onDelete"]))), 128))
66
+ ]),
67
+ _: 1
68
+ })
69
+ ])
70
+ ]),
71
+ button: o(() => [
72
+ r(M, { click: y }, {
73
+ title: o(() => [
74
+ h("Add Environment")
81
75
  ]),
82
76
  _: 1
83
- }),
84
- a(H, { class: "flex-1" }, {
77
+ })
78
+ ]),
79
+ _: 1
80
+ }),
81
+ r(F, { class: "flex-1" }, {
82
+ default: o(() => [
83
+ r(J, null, I({
85
84
  default: o(() => [
86
- a(J, null, I({
87
- default: o(() => [
88
- e.value ? (r(), d(A, {
89
- key: 0,
90
- class: "pl-px pr-2 md:px-2 py-2.5",
91
- language: "json",
92
- lineNumbers: "",
93
- modelValue: u(l)[e.value].value,
94
- "onUpdate:modelValue": g
95
- }, null, 8, ["modelValue"])) : $("", !0)
96
- ]),
97
- _: 2
98
- }, [
99
- e.value ? {
100
- name: "title",
101
- fn: o(() => [
102
- !m.value || u(l)[e.value].isDefault ? (r(), f("span", {
103
- key: 0,
104
- onDblclick: b
105
- }, L(u(l)[e.value].name), 33)) : (r(), f("input", {
106
- key: 1,
107
- ref_key: "nameInputRef",
108
- ref: p,
109
- class: "ring-1 ring-offset-4 ring-b-outline rounded",
110
- spellcheck: "false",
111
- type: "text",
112
- value: u(l)[e.value].name,
113
- onBlur: s[0] || (s[0] = (n) => m.value = !1),
114
- onInput: D,
115
- onKeyup: s[1] || (s[1] = B((n) => m.value = !1, ["enter"]))
116
- }, null, 40, Q)),
117
- _("div", X, [
118
- a(z, {
119
- activeColor: u(l)[e.value].color,
120
- onSelect: k
121
- }, null, 8, ["activeColor"])
122
- ])
123
- ]),
124
- key: "0"
125
- } : void 0
126
- ]), 1024)
85
+ e.value ? (a(), d(A, {
86
+ key: 0,
87
+ class: "pl-px pr-2 md:px-2 py-2.5",
88
+ language: "json",
89
+ lineNumbers: "",
90
+ modelValue: u(l)[e.value].value,
91
+ "onUpdate:modelValue": E
92
+ }, null, 8, ["modelValue"])) : $("", !0)
127
93
  ]),
128
- _: 1
129
- })
94
+ _: 2
95
+ }, [
96
+ e.value ? {
97
+ name: "title",
98
+ fn: o(() => [
99
+ !m.value || u(l)[e.value].isDefault ? (a(), v("span", {
100
+ key: 0,
101
+ onDblclick: D
102
+ }, L(u(l)[e.value].name), 33)) : (a(), v("input", {
103
+ key: 1,
104
+ ref_key: "nameInputRef",
105
+ ref: p,
106
+ class: "ring-1 ring-offset-4 ring-b-outline rounded",
107
+ spellcheck: "false",
108
+ type: "text",
109
+ value: u(l)[e.value].name,
110
+ onBlur: s[0] || (s[0] = (n) => m.value = !1),
111
+ onInput: N,
112
+ onKeyup: s[1] || (s[1] = B((n) => m.value = !1, ["enter"]))
113
+ }, null, 40, P)),
114
+ _("div", Q, [
115
+ r(z, {
116
+ activeColor: u(l)[e.value].color,
117
+ onSelect: k
118
+ }, null, 8, ["activeColor"])
119
+ ])
120
+ ]),
121
+ key: "0"
122
+ } : void 0
123
+ ]), 1024)
130
124
  ]),
131
125
  _: 1
132
126
  })
@@ -136,5 +130,5 @@ const P = { class: "flex-1" }, Q = ["value"], X = { class: "colors ml-auto" }, v
136
130
  }
137
131
  });
138
132
  export {
139
- ve as default
133
+ de as default
140
134
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAmL8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAiQjD,wBAMG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAuK8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAwPjD,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.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-d3ddd323"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-901adb4c"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as H, ref as q, computed as L, watch as M, onMounted as A, onBeforeUnmount as I, openBlock as w, createElementBlock as $, normalizeClass as x, unref as s, createVNode as n, withCtx as S, createBlock as D, createCommentVNode as Q } from "vue";
1
+ import { defineComponent as H, ref as q, computed as L, watch as M, onMounted as A, onBeforeUnmount as I, openBlock as w, createElementBlock as $, normalizeClass as x, unref as s, createVNode as l, withCtx as S, createBlock as D, createCommentVNode as Q } from "vue";
2
2
  import W from "../../components/ViewLayout/ViewLayout.vue.js";
3
3
  import j from "../../components/ViewLayout/ViewLayoutContent.vue.js";
4
4
  import { createRequestOperation as z } from "../../libs/send-request.js";
@@ -17,39 +17,39 @@ import { cancelRequestBus as oe } from "../../libs/event-busses/cancel-request-b
17
17
  const qe = /* @__PURE__ */ H({
18
18
  __name: "Request",
19
19
  emits: ["newTab"],
20
- setup(re) {
20
+ setup(te) {
21
21
  var f;
22
22
  const k = ee(), { toast: u } = P(), {
23
23
  activeCollection: i,
24
- activeExample: l,
24
+ activeExample: n,
25
25
  activeEnvironment: O,
26
26
  activeRequest: m,
27
- activeWorkspace: t,
27
+ activeWorkspace: r,
28
28
  activeServer: C,
29
29
  cookies: N,
30
30
  modalState: V,
31
31
  requestHistory: d,
32
32
  securitySchemes: h
33
- } = k, a = q(!((f = t.value) != null && f.isReadOnly)), c = q(), B = L(
33
+ } = k, a = q(!((f = r.value) != null && f.isReadOnly)), c = q(), B = L(
34
34
  () => d.findLast((e) => {
35
35
  var o;
36
- return e.request.uid === ((o = l.value) == null ? void 0 : o.uid);
36
+ return e.request.uid === ((o = n.value) == null ? void 0 : o.uid);
37
37
  })
38
38
  ), T = X("(max-width: 780px)");
39
39
  M(T, (e) => a.value = !e);
40
40
  const p = async () => {
41
41
  var b;
42
- if (!m.value || !l.value || !i.value)
42
+ if (!m.value || !n.value || !i.value)
43
43
  return;
44
44
  const e = K.parse(((b = O.value) == null ? void 0 : b.value) || "{}");
45
45
  e.error && console.error("INVALID ENVIRONMENT!");
46
- const o = e.error || typeof e.data != "object" ? {} : e.data ?? {}, r = t.value.cookies.map((U) => N[U]), [v, R] = z({
46
+ const o = e.error || typeof e.data != "object" ? {} : e.data ?? {}, t = r.value.cookies.map((U) => N[U]), [v, R] = z({
47
47
  auth: i.value.auth,
48
48
  request: m.value,
49
- example: l.value,
50
- proxy: t.value.proxyUrl ?? "",
49
+ example: n.value,
50
+ proxy: r.value.proxyUrl ?? "",
51
51
  environment: o,
52
- globalCookies: r,
52
+ globalCookies: t,
53
53
  securitySchemes: h,
54
54
  server: C.value
55
55
  });
@@ -67,34 +67,34 @@ const qe = /* @__PURE__ */ H({
67
67
  return A(() => {
68
68
  E.on(p), oe.on(_);
69
69
  }), I(() => E.off(p)), (e, o) => (w(), $("div", {
70
- class: x(["flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden", {
71
- "!mr-0 !mb-0 !border-0": s(t).isReadOnly
70
+ class: x(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative overflow-hidden", {
71
+ "!mr-0 !mb-0 !border-0": s(r).isReadOnly
72
72
  }])
73
73
  }, [
74
- n(F, {
74
+ l(F, {
75
75
  modelValue: a.value,
76
- "onUpdate:modelValue": o[0] || (o[0] = (r) => a.value = r),
77
- isReadonly: s(t).isReadOnly,
76
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => a.value = t),
77
+ isReadonly: s(r).isReadOnly,
78
78
  onHideModal: o[1] || (o[1] = () => s(V).hide())
79
79
  }, null, 8, ["modelValue", "isReadonly"]),
80
- n(W, null, {
80
+ l(W, null, {
81
81
  default: S(() => [
82
- n(Y, {
83
- isReadonly: s(t).isReadOnly,
82
+ l(Y, {
83
+ isReadonly: s(r).isReadOnly,
84
84
  showSidebar: a.value,
85
- onNewTab: o[2] || (o[2] = (r) => e.$emit("newTab", r)),
86
- "onUpdate:showSidebar": o[3] || (o[3] = (r) => a.value = r)
85
+ onNewTab: o[2] || (o[2] = (t) => e.$emit("newTab", t)),
86
+ "onUpdate:showSidebar": o[3] || (o[3] = (t) => a.value = t)
87
87
  }, null, 8, ["isReadonly", "showSidebar"]),
88
- s(l) ? (w(), D(j, {
88
+ s(n) ? (w(), D(j, {
89
89
  key: 0,
90
90
  class: x(["flex-1", [a.value ? "sidebar-active-hide-layout" : ""]])
91
91
  }, {
92
92
  default: S(() => {
93
- var r;
93
+ var t;
94
94
  return [
95
- n(J),
96
- n(G, {
97
- response: (r = B.value) == null ? void 0 : r.response
95
+ l(J),
96
+ l(G, {
97
+ response: (t = B.value) == null ? void 0 : t.response
98
98
  }, null, 8, ["response"])
99
99
  ];
100
100
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";WAoUS,MAAM;;WAAN,MAAM;;AA6bf,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";WA+US,MAAM;;WAAN,MAAM;;AAudf,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuth.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-cdda9bac"]]);
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b2a5825f"]]);
5
5
  export {
6
- e as default
6
+ f as default
7
7
  };