@scalar/api-client 2.2.22 → 2.2.23

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 (124) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +69 -70
  5. package/dist/components/AddressBar/AddressBarServer.vue.js +26 -26
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  8. package/dist/components/CodeInput/CodeInput.vue2.js +46 -46
  9. package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
  10. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  11. package/dist/components/CodeInput/codeVariableWidget.js +42 -38
  12. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
  13. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
  14. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  15. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
  16. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
  18. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
  19. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
  20. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  21. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
  22. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  23. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
  24. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  25. package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
  26. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
  27. package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
  28. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
  29. package/dist/components/ScalarAsciiArt.vue.js +1 -1
  30. package/dist/components/ScalarAsciiArt.vue2.js +22 -19
  31. package/dist/components/Search/useSearch.d.ts.map +1 -1
  32. package/dist/components/Search/useSearch.js +57 -49
  33. package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
  34. package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
  35. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  36. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  37. package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
  38. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  39. package/dist/components/TopNav/TopNav.vue.js +71 -64
  40. package/dist/layouts/App/ApiClientApp.vue.js +4 -1
  41. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  42. package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
  43. package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
  44. package/dist/libs/create-client.d.ts +10 -10
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/create-client.js +42 -36
  47. package/dist/libs/extractAttachmentFilename.d.ts +3 -0
  48. package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
  49. package/dist/libs/extractAttachmentFilename.js +7 -7
  50. package/dist/libs/importers/curl.d.ts.map +1 -1
  51. package/dist/libs/importers/curl.js +18 -18
  52. package/dist/libs/normalize-headers.d.ts.map +1 -1
  53. package/dist/libs/normalize-headers.js +2 -2
  54. package/dist/libs/parse-curl.js +39 -36
  55. package/dist/store/active-entities.d.ts +4 -4
  56. package/dist/store/active-entities.d.ts.map +1 -1
  57. package/dist/store/active-entities.js +88 -86
  58. package/dist/store/collections.d.ts.map +1 -1
  59. package/dist/store/collections.js +29 -29
  60. package/dist/store/request-example.d.ts.map +1 -1
  61. package/dist/store/request-example.js +27 -23
  62. package/dist/store/requests.d.ts.map +1 -1
  63. package/dist/store/requests.js +94 -77
  64. package/dist/store/security-schemes.d.ts.map +1 -1
  65. package/dist/store/security-schemes.js +27 -27
  66. package/dist/store/servers.d.ts.map +1 -1
  67. package/dist/store/servers.js +18 -18
  68. package/dist/store/tags.d.ts.map +1 -1
  69. package/dist/store/tags.js +35 -33
  70. package/dist/style.css +1 -1
  71. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  72. package/dist/views/Cookies/CookieForm.vue.js +14 -9
  73. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  74. package/dist/views/Cookies/Cookies.vue2.js +39 -37
  75. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  76. package/dist/views/Environment/Environment.vue2.js +94 -89
  77. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  78. package/dist/views/Request/Request.vue.js +1 -1
  79. package/dist/views/Request/Request.vue2.js +121 -119
  80. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
  82. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  83. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  84. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
  88. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
  89. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
  90. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  91. package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
  92. package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
  93. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  94. package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
  95. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  96. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
  97. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  98. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  99. package/dist/views/Request/RequestSidebar.vue2.js +149 -144
  100. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  102. package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
  103. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  104. package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
  105. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
  106. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  107. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
  108. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
  109. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  110. package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
  111. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  112. package/dist/views/Request/handle-drag.js +37 -31
  113. package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
  114. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  115. package/dist/views/Request/libs/live-sync.js +147 -130
  116. package/dist/views/Request/types/sidebar-item.d.ts +4 -1
  117. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  118. package/dist/views/Servers/ServerForm.vue.js +38 -35
  119. package/dist/views/Servers/Servers.vue2.js +38 -35
  120. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  121. package/dist/views/Settings/Settings.vue2.js +15 -15
  122. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  123. package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
  124. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"CookieForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/CookieForm.vue"],"names":[],"mappings":";AA2KA,wBAMG"}
1
+ {"version":3,"file":"CookieForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/CookieForm.vue"],"names":[],"mappings":";AAyLA,wBAMG"}
@@ -1,11 +1,11 @@
1
- import { defineComponent as p, computed as u, openBlock as d, createBlock as m, withCtx as k, createElementVNode as t } from "vue";
1
+ import { defineComponent as c, computed as p, openBlock as m, createBlock as d, withCtx as k, createElementVNode as t } from "vue";
2
2
  import v from "../../components/Form/Form.vue.js";
3
3
  import { useActiveEntities as f } from "../../store/active-entities.js";
4
4
  import { useWorkspace as h } from "../../store/store.js";
5
- const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F = /* @__PURE__ */ p({
5
+ const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F = /* @__PURE__ */ c({
6
6
  __name: "CookieForm",
7
7
  setup(b) {
8
- const { activeCookieId: o } = f(), { cookies: n, cookieMutators: i } = h(), s = [
8
+ const { activeCookieId: o } = f(), { cookies: r, cookieMutators: i } = h(), s = [
9
9
  { label: "Key", key: "key", placeholder: "Username" },
10
10
  { label: "Value", key: "value", placeholder: "123" },
11
11
  { label: "Domain", key: "domain", placeholder: "scalar.com" },
@@ -13,12 +13,17 @@ const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F =
13
13
  { label: "Expires", key: "expires", placeholder: "Tomorrow" },
14
14
  { label: "Secure", key: "secure", placeholder: "True/False" },
15
15
  { label: "HttpOnly", key: "httpOnly", placeholder: "True/False" }
16
- ], l = u(
17
- () => n[o.value] || {}
18
- ), a = (r, e) => {
19
- o.value && i.edit(o.value, r, e);
16
+ ], l = p(
17
+ () => r[o.value] || {
18
+ value: "",
19
+ uid: "",
20
+ name: "",
21
+ sameSite: "Lax"
22
+ }
23
+ ), a = (n, e) => {
24
+ o.value && i.edit(o.value, n, e);
20
25
  };
21
- return (r, e) => (d(), m(v, {
26
+ return (n, e) => (m(), d(v, {
22
27
  data: l.value,
23
28
  onUpdate: a,
24
29
  options: s
@@ -34,7 +39,7 @@ const y = { class: "flex items-center pointer-events-none" }, _ = ["value"], F =
34
39
  class: "md:pl-1 outline-none border-0 text-c-2 rounded pointer-events-auto relative w-full",
35
40
  placeholder: "Cookie Name",
36
41
  value: l.value.name,
37
- onInput: e[0] || (e[0] = (c) => a("name", c.target.value))
42
+ onInput: e[0] || (e[0] = (u) => a("name", u.target.value))
38
43
  }, null, 40, _)
39
44
  ])
40
45
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA0iBA,wBAMG"}
1
+ {"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA8iBA,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, computed as K, onMounted as R, onBeforeUnmount as F, openBlock as n, createBlock as N, withCtx as i, createVNode as s, unref as l, createElementVNode as f, createElementBlock as d, Fragment as _, renderList as k, normalizeClass as O, createTextVNode as x, toDisplayString as j, withDirectives as E, withModifiers as A, vShow as z } from "vue";
1
+ import { defineComponent as D, computed as K, onMounted as R, onBeforeUnmount as F, openBlock as n, createBlock as N, withCtx as a, createVNode as s, unref as l, createElementVNode as f, createElementBlock as d, Fragment as _, renderList as k, normalizeClass as O, createTextVNode as x, toDisplayString as j, withDirectives as E, withModifiers as A, vShow as z } from "vue";
2
2
  import H from "../../components/Sidebar/SidebarButton.vue.js";
3
3
  import I from "../../components/Sidebar/SidebarList.vue.js";
4
4
  import P from "../../components/Sidebar/SidebarListElement.vue.js";
@@ -16,8 +16,8 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
16
16
  __name: "Cookies",
17
17
  setup(ne) {
18
18
  const { cookies: b, cookieMutators: v, events: g } = X(), { collapsedSidebarFolders: c, toggleSidebarFolder: y } = Z(), m = q(), M = G(), C = () => {
19
- const t = Object.keys(b).length, e = W.parse({
20
- name: `Cookie ${t}`,
19
+ const e = Object.keys(b).length, t = W.parse({
20
+ name: `Cookie ${e}`,
21
21
  value: "",
22
22
  domain: "example.com",
23
23
  path: "/",
@@ -25,43 +25,45 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
25
25
  httpOnly: !1,
26
26
  sameSite: "None"
27
27
  });
28
- v.add(e), m.push(e.uid);
29
- }, V = (t) => {
30
- v.delete(t);
31
- const e = Object.values(b).filter(
32
- (o) => o.uid !== t
28
+ v.add(t), m.push(t.uid);
29
+ }, V = (e) => {
30
+ var o;
31
+ v.delete(e);
32
+ const t = Object.values(b).filter(
33
+ (r) => r.uid !== e
33
34
  );
34
- if (e.length > 1) {
35
- const o = e[e.length - 1];
36
- m.push(o.uid);
37
- } else e.length === 1 && e[0].uid === "default" && m.push("default");
35
+ if (t.length > 1) {
36
+ const r = t[t.length - 1];
37
+ r && m.push(r.uid);
38
+ } else t.length === 1 && ((o = t[0]) == null ? void 0 : o.uid) === "default" && m.push("default");
38
39
  }, h = K(() => {
39
- const t = {};
40
- return Object.values(b).forEach((e) => {
41
- e.domain && e.path && (t[e.domain] || (t[e.domain] = {}), t[e.domain][e.path] || (t[e.domain][e.path] = []), t[e.domain][e.path].push(e));
42
- }), t;
43
- }), w = (t) => c[t], S = (t) => {
44
- t != null && t.createNew && M.name === "cookies" && C();
45
- }, B = (t, e) => {
46
- const o = `/workspace/default/cookies/${e}`;
47
- t.metaKey ? window.open(o, "_blank") : m.push({ path: o });
40
+ const e = {};
41
+ return Object.values(b).forEach((t) => {
42
+ const o = t.domain ?? "", r = t.path ?? "";
43
+ e[o] || (e[o] = {}), e[o][r] || (e[o][r] = []), e[o][r].push(t);
44
+ }), e;
45
+ }), w = (e) => c[e], S = (e) => {
46
+ e != null && e.createNew && M.name === "cookies" && C();
47
+ }, B = (e, t) => {
48
+ const o = `/workspace/default/cookies/${t}`;
49
+ e.metaKey ? window.open(o, "_blank") : m.push({ path: o });
48
50
  };
49
51
  return R(() => {
50
- const t = Object.keys(h.value), e = Object.entries(h.value).flatMap(
52
+ const e = Object.keys(h.value), t = Object.entries(h.value).flatMap(
51
53
  ([o, r]) => Object.keys(r).map((p) => o + p)
52
54
  );
53
- t.forEach((o) => {
55
+ e.forEach((o) => {
54
56
  c[o] = !0;
55
- }), e.forEach((o) => {
57
+ }), t.forEach((o) => {
56
58
  c[o] = !0;
57
59
  }), g.hotKeys.on(S);
58
- }), F(() => g.hotKeys.off(S)), (t, e) => (n(), N(T, null, {
59
- default: i(() => [
60
+ }), F(() => g.hotKeys.off(S)), (e, t) => (n(), N(T, null, {
61
+ default: a(() => [
60
62
  s(l(Y), { title: "Cookies" }, {
61
- content: i(() => [
63
+ content: a(() => [
62
64
  f("div", ee, [
63
65
  s(I, null, {
64
- default: i(() => [
66
+ default: a(() => [
65
67
  (n(!0), d(_, null, k(h.value, (o, r) => (n(), d("div", { key: r }, [
66
68
  f("button", {
67
69
  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",
@@ -82,7 +84,7 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
82
84
  f("button", {
83
85
  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",
84
86
  type: "button",
85
- onClick: (a) => l(y)(r + u)
87
+ onClick: (i) => l(y)(r + u)
86
88
  }, [
87
89
  s(l(L), {
88
90
  class: O(["text-c-3", {
@@ -94,14 +96,14 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
94
96
  x(" " + j(u), 1)
95
97
  ], 8, re),
96
98
  E(f("div", se, [
97
- (n(!0), d(_, null, k(p, (a) => (n(), N(P, {
98
- key: a.uid,
99
+ (n(!0), d(_, null, k(p, (i) => (n(), N(P, {
100
+ key: i.uid,
99
101
  class: "cookie text-xs",
100
102
  type: "cookies",
101
- variable: { name: a.name, uid: a.uid },
103
+ variable: { name: i.name, uid: i.uid },
102
104
  warningMessage: "Are you sure you want to delete this cookie?",
103
- onClick: A(($) => B($, a.uid), ["prevent"]),
104
- onDelete: ($) => V(a.uid)
105
+ onClick: A(($) => B($, i.uid), ["prevent"]),
106
+ onDelete: ($) => V(i.uid)
105
107
  }, null, 8, ["variable", "onClick", "onDelete"]))), 128))
106
108
  ], 512), [
107
109
  [z, w(r + u)]
@@ -116,12 +118,12 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
116
118
  })
117
119
  ])
118
120
  ]),
119
- button: i(() => [
121
+ button: a(() => [
120
122
  s(H, {
121
123
  click: C,
122
124
  hotkey: "N"
123
125
  }, {
124
- title: i(() => e[0] || (e[0] = [
126
+ title: a(() => t[0] || (t[0] = [
125
127
  x("Add Cookie")
126
128
  ])),
127
129
  _: 1
@@ -130,7 +132,7 @@ const ee = { class: "flex-1" }, te = ["onClick"], oe = { class: "before:bg-borde
130
132
  _: 1
131
133
  }),
132
134
  s(U, { class: "flex-1" }, {
133
- default: i(() => [
135
+ default: a(() => [
134
136
  s(J),
135
137
  s(Q)
136
138
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AA80CA,wBAMG"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AA41CA,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as re, ref as f, watch as se, onMounted as ie, onBeforeUnmount as ue, openBlock as m, createBlock as h, withCtx as d, createVNode as u, createElementVNode as y, createElementBlock as M, Fragment as U, renderList as z, unref as r, normalizeClass as A, createTextVNode as B, toDisplayString as W, withDirectives as de, withModifiers as ce, createCommentVNode as K, vShow as me, createSlots as ve } from "vue";
1
+ import { defineComponent as re, ref as p, watch as se, onMounted as ie, onBeforeUnmount as ue, openBlock as m, createBlock as y, withCtx as d, createVNode as u, createElementVNode as C, createElementBlock as M, Fragment as U, renderList as z, unref as s, normalizeClass as A, createTextVNode as B, toDisplayString as W, withDirectives as de, withModifiers as ce, createCommentVNode as K, vShow as me, createSlots as ve } from "vue";
2
2
  import fe from "../../components/CodeInput/CodeInput.vue.js";
3
3
  import pe from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
4
4
  import xe from "../../components/Sidebar/Sidebar.vue.js";
@@ -20,7 +20,7 @@ import { useSidebar as Oe } from "../../hooks/useSidebar.js";
20
20
  const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
21
21
  __name: "Environment",
22
22
  setup(De) {
23
- const p = Se(), C = Me(), { activeWorkspace: V, activeEnvironment: J, activeWorkspaceCollections: s } = Ee(), { events: N, workspaceMutators: T, collectionMutators: x } = Ne(), { collapsedSidebarFolders: b, toggleSidebarFolder: k } = Oe(), E = $(), g = $(), _ = $(), O = f(null), l = f("default"), R = f(""), v = f(void 0), c = f(void 0), I = f(void 0), { toast: j } = we(), H = (e) => JSON.parse(e);
23
+ const x = Se(), k = Me(), { activeWorkspace: V, activeEnvironment: J, activeWorkspaceCollections: i } = Ee(), { events: N, workspaceMutators: T, collectionMutators: b } = Ne(), { collapsedSidebarFolders: h, toggleSidebarFolder: E } = Oe(), g = $(), _ = $(), I = $(), O = p(null), l = p("default"), R = p(""), f = p(void 0), c = p(void 0), w = p(void 0), { toast: j } = we(), H = (e) => JSON.parse(e);
24
24
  function D(e, o, n) {
25
25
  var t;
26
26
  e && (o.uid === n ? j(
@@ -29,141 +29,146 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
29
29
  ) : j("Environment name already used in another collection", "error"));
30
30
  }
31
31
  function q(e) {
32
- s.value.some(
32
+ i.value.some(
33
33
  (n) => {
34
34
  const t = Object.keys(
35
35
  n["x-scalar-environments"] || {}
36
36
  ).includes(e.name);
37
37
  return D(t, n, e.collectionId), t;
38
38
  }
39
- ) || (e.collectionId && (x.addEnvironment(
39
+ ) || (e.collectionId && (b.addEnvironment(
40
40
  e.name,
41
41
  {
42
42
  variables: {},
43
43
  color: e.color
44
44
  },
45
45
  e.collectionId
46
- ), b[e.collectionId] || k(e.collectionId), p.push({
46
+ ), h[e.collectionId] || E(e.collectionId), x.push({
47
47
  name: "environment.collection",
48
48
  params: {
49
49
  collectionId: e.collectionId,
50
50
  environmentId: e.name
51
51
  }
52
- })), g.hide());
52
+ })), _.hide());
53
53
  }
54
54
  function P(e) {
55
- var o;
55
+ var o, n;
56
56
  if (J) {
57
- const n = H(e);
57
+ const t = H(e);
58
58
  if (l.value === "default")
59
59
  T.edit(
60
- V.value.uid,
60
+ ((o = V.value) == null ? void 0 : o.uid) ?? "",
61
61
  "environments",
62
- n
62
+ t
63
63
  );
64
64
  else {
65
- const t = s.value.find(
66
- (a) => {
67
- var i;
68
- return (i = a["x-scalar-environments"]) == null ? void 0 : i[l.value ?? ""];
65
+ const a = i.value.find(
66
+ (r) => {
67
+ var v;
68
+ return (v = r["x-scalar-environments"]) == null ? void 0 : v[l.value ?? ""];
69
69
  }
70
70
  );
71
- (o = t == null ? void 0 : t["x-scalar-environments"]) != null && o[l.value ?? ""] && (t["x-scalar-environments"][l.value ?? ""].variables = n, x.edit(
72
- t.uid,
73
- "x-scalar-environments",
74
- t["x-scalar-environments"]
75
- ));
71
+ if ((n = a == null ? void 0 : a["x-scalar-environments"]) != null && n[l.value ?? ""]) {
72
+ const r = a["x-scalar-environments"][l.value ?? ""];
73
+ r && (r.variables = t, b.edit(
74
+ a.uid,
75
+ "x-scalar-environments",
76
+ a["x-scalar-environments"]
77
+ ));
78
+ }
76
79
  }
77
80
  }
78
81
  }
79
82
  const S = (e) => {
80
- v.value = e, g.show();
83
+ f.value = e, _.show();
81
84
  }, Q = (e, o) => {
82
- c.value = e, v.value = o, I.value = e, _.show();
85
+ c.value = e, f.value = o, w.value = e, I.show();
83
86
  }, X = (e) => {
84
87
  var o, n, t;
85
- O.value = e, R.value = ((t = (n = (o = s.value.find(
88
+ O.value = e, R.value = ((t = (n = (o = i.value.find(
86
89
  (a) => {
87
- var i;
88
- return (i = a["x-scalar-environments"]) == null ? void 0 : i[e];
90
+ var r;
91
+ return (r = a["x-scalar-environments"]) == null ? void 0 : r[e];
89
92
  }
90
- )) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[e]) == null ? void 0 : t.color) ?? "", E.show();
93
+ )) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[e]) == null ? void 0 : t.color) ?? "", g.show();
91
94
  }, Y = (e) => {
92
95
  const o = O.value;
93
- typeof o == "string" && (s.value.some(
96
+ typeof o == "string" && (i.value.some(
94
97
  (t) => {
95
98
  var a;
96
99
  return (a = t["x-scalar-environments"]) == null ? void 0 : a[o];
97
100
  }
98
- ) && s.value.forEach((t) => {
101
+ ) && i.value.forEach((t) => {
99
102
  var a;
100
- (a = t["x-scalar-environments"]) != null && a[o] && (t["x-scalar-environments"][o].color = e, x.edit(
103
+ (a = t["x-scalar-environments"]) != null && a[o] && (t["x-scalar-environments"][o].color = e, b.edit(
101
104
  t.uid,
102
105
  "x-scalar-environments",
103
106
  t["x-scalar-environments"]
104
107
  ));
105
- }), E.hide());
108
+ }), g.hide());
106
109
  };
107
110
  function Z(e) {
108
- s.value.forEach((n) => {
109
- x.removeEnvironment(e, n.uid);
111
+ i.value.forEach((n) => {
112
+ b.removeEnvironment(e, n.uid);
110
113
  });
111
- const o = s.value.flatMap(
114
+ const o = i.value.flatMap(
112
115
  (n) => Object.keys(n["x-scalar-environments"] || {})
113
116
  );
114
117
  if (o.length > 0) {
115
- const n = o[o.length - 1], t = s.value.find(
118
+ const n = o[o.length - 1];
119
+ if (!n) return;
120
+ const t = i.value.find(
116
121
  (a) => Object.keys(a["x-scalar-environments"] || {}).includes(
117
122
  n
118
123
  )
119
124
  );
120
- l.value = n, p.push({
125
+ l.value = n, x.push({
121
126
  name: "environment.collection",
122
127
  params: {
123
128
  collectionId: t == null ? void 0 : t.uid,
124
129
  environmentId: n
125
130
  }
126
- }), t && !b[t.uid] && k(t.uid);
131
+ }), t && !h[t.uid] && E(t.uid);
127
132
  } else
128
- l.value = "default", p.push({
133
+ l.value = "default", x.push({
129
134
  name: "environment",
130
135
  params: { environment: "default" }
131
136
  });
132
137
  }
133
138
  const ee = () => l.value === "default" ? "Global Environment" : l.value, ne = () => {
134
- var e, o, n;
135
- return l.value === "default" ? JSON.stringify(V.value.environments, null, 2) : JSON.stringify(
136
- (n = (o = (e = s.value.find(
137
- (t) => {
138
- var a;
139
- return (a = t["x-scalar-environments"]) == null ? void 0 : a[l.value ?? ""];
139
+ var e, o, n, t;
140
+ return l.value === "default" ? JSON.stringify((e = V.value) == null ? void 0 : e.environments, null, 2) : JSON.stringify(
141
+ (t = (n = (o = i.value.find(
142
+ (a) => {
143
+ var r;
144
+ return (r = a["x-scalar-environments"]) == null ? void 0 : r[l.value ?? ""];
140
145
  }
141
- )) == null ? void 0 : e["x-scalar-environments"]) == null ? void 0 : o[l.value ?? ""]) == null ? void 0 : n.variables,
146
+ )) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[l.value ?? ""]) == null ? void 0 : t.variables,
142
147
  null,
143
148
  2
144
149
  );
145
- }, te = (e) => b[e], L = (e) => {
146
- e != null && e.createNew && C.name === "environment" && S();
150
+ }, te = (e) => h[e], L = (e) => {
151
+ e != null && e.createNew && k.name === "environment" && S();
147
152
  };
148
153
  se(
149
- () => [C.params.collectionId, C.params.environmentId],
154
+ () => [k.params.collectionId, k.params.environmentId],
150
155
  ([e, o]) => {
151
156
  e ? l.value = o : l.value = "default";
152
157
  }
153
158
  ), ie(() => {
154
- l.value = C.params.environmentId || "default", N.hotKeys.on(L);
155
- const { collectionId: e } = p.currentRoute.value.params;
156
- e && !b[e] && k(e);
159
+ l.value = k.params.environmentId || "default", N.hotKeys.on(L);
160
+ const { collectionId: e } = x.currentRoute.value.params;
161
+ e && !h[e] && E(e);
157
162
  }), ue(() => N.hotKeys.off(L));
158
163
  const oe = (e, o, n) => {
159
164
  const t = n ? `/workspace/default/environment/${n}/${o}` : `/workspace/default/environment/${o}`;
160
- e.metaKey ? window.open(t, "_blank") : p.push({ path: t });
165
+ e.metaKey ? window.open(t, "_blank") : x.push({ path: t });
161
166
  };
162
167
  function ae() {
163
- c.value = void 0, v.value = void 0, I.value = void 0, _.hide();
168
+ c.value = void 0, f.value = void 0, w.value = void 0, I.hide();
164
169
  }
165
170
  function le(e) {
166
- s.value.some(
171
+ i.value.some(
167
172
  (n) => {
168
173
  const t = Object.keys(
169
174
  n["x-scalar-environments"] || {}
@@ -171,29 +176,29 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
171
176
  return D(
172
177
  t,
173
178
  n,
174
- v.value
179
+ f.value
175
180
  ), t;
176
181
  }
177
- ) || (e && c.value !== "default" && s.value.forEach((n) => {
182
+ ) || (e && c.value !== "default" && i.value.forEach((n) => {
178
183
  var t;
179
184
  if ((t = n["x-scalar-environments"]) != null && t[c.value ?? ""]) {
180
185
  const a = n["x-scalar-environments"][c.value ?? ""];
181
- delete n["x-scalar-environments"][c.value ?? ""], n["x-scalar-environments"][e] = a, x.edit(
186
+ a && (delete n["x-scalar-environments"][c.value ?? ""], n["x-scalar-environments"][e] = a, b.edit(
182
187
  n.uid,
183
188
  "x-scalar-environments",
184
189
  n["x-scalar-environments"]
185
- );
190
+ ));
186
191
  }
187
- }), e && l.value === c.value && (l.value = e), c.value = void 0, v.value = void 0, I.value = void 0, _.hide());
192
+ }), e && l.value === c.value && (l.value = e), c.value = void 0, f.value = void 0, w.value = void 0, I.hide());
188
193
  }
189
- return (e, o) => (m(), h(ye, null, {
194
+ return (e, o) => (m(), y(ye, null, {
190
195
  default: d(() => [
191
196
  u(xe, { title: "Collections" }, {
192
197
  content: d(() => [
193
- y("div", Re, [
198
+ C("div", Re, [
194
199
  u(he, null, {
195
200
  default: d(() => [
196
- (m(), h(F, {
201
+ (m(), y(F, {
197
202
  key: "default",
198
203
  class: "text-xs",
199
204
  isCopyable: !1,
@@ -205,24 +210,24 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
205
210
  isDefault: !0
206
211
  }
207
212
  })),
208
- (m(!0), M(U, null, z(r(s), (n) => {
213
+ (m(!0), M(U, null, z(s(i), (n) => {
209
214
  var t;
210
215
  return m(), M("div", {
211
216
  key: n.uid,
212
217
  class: "flex flex-col gap-0.25"
213
218
  }, [
214
- y("button", {
219
+ C("button", {
215
220
  class: "flex font-medium gap-1.5 group items-center p-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
216
221
  type: "button",
217
- onClick: (a) => r(k)(n.uid)
222
+ onClick: (a) => s(E)(n.uid)
218
223
  }, [
219
- u(r(Ie), {
224
+ u(s(Ie), {
220
225
  class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
221
226
  src: n["x-scalar-icon"] || "interface-content-folder"
222
227
  }, null, 8, ["src"]),
223
- u(r(G), {
228
+ u(s(G), {
224
229
  class: A(["text-c-3 hidden text-sm group-hover:block", {
225
- "rotate-90": r(b)[n.uid]
230
+ "rotate-90": s(h)[n.uid]
226
231
  }]),
227
232
  icon: "ChevronRight",
228
233
  size: "sm",
@@ -230,13 +235,13 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
230
235
  }, null, 8, ["class"]),
231
236
  B(" " + W(((t = n.info) == null ? void 0 : t.title) ?? ""), 1)
232
237
  ], 8, je),
233
- de(y("div", {
238
+ de(C("div", {
234
239
  class: A({
235
240
  "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] flex flex-col gap-px mb-[.5px] last:mb-0 relative": Object.keys(n["x-scalar-environments"] || {}).length > 0
236
241
  })
237
242
  }, [
238
- (m(!0), M(U, null, z(n["x-scalar-environments"], (a, i) => (m(), h(F, {
239
- key: i,
243
+ (m(!0), M(U, null, z(n["x-scalar-environments"], (a, r) => (m(), y(F, {
244
+ key: r,
240
245
  class: "text-xs [&>a]:pl-5",
241
246
  collectionId: n.uid,
242
247
  isCopyable: !1,
@@ -244,30 +249,30 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
244
249
  isRenameable: !0,
245
250
  type: "environment",
246
251
  variable: {
247
- name: i,
248
- uid: i,
252
+ name: r,
253
+ uid: r,
249
254
  color: a.color ?? "#8E8E8E",
250
255
  isDefault: !1
251
256
  },
252
257
  warningMessage: "Are you sure you want to delete this environment?",
253
- onClick: ce((w) => oe(w, i, n.uid), ["prevent"]),
254
- onColorModal: (w) => X(i),
255
- onDelete: (w) => Z(i),
256
- onRename: (w) => Q(i, n.uid)
258
+ onClick: ce((v) => oe(v, r, n.uid), ["prevent"]),
259
+ onColorModal: (v) => X(r),
260
+ onDelete: (v) => Z(r),
261
+ onRename: (v) => Q(r, n.uid)
257
262
  }, null, 8, ["collectionId", "variable", "onClick", "onColorModal", "onDelete", "onRename"]))), 128)),
258
- Object.keys(n["x-scalar-environments"] || {}).length === 0 ? (m(), h(r(ge), {
263
+ Object.keys(n["x-scalar-environments"] || {}).length === 0 ? (m(), y(s(ge), {
259
264
  key: 0,
260
265
  class: "mb-[.5px] flex gap-1.5 h-8 text-c-1 pl-6 py-0 justify-start text-xs w-full hover:bg-b-2",
261
266
  variant: "ghost",
262
267
  onClick: (a) => S(n.uid)
263
268
  }, {
264
269
  default: d(() => [
265
- u(r(G), {
270
+ u(s(G), {
266
271
  class: "ml-0.5 h-2.5 w-2.5",
267
272
  icon: "Add",
268
273
  thickness: "3"
269
274
  }),
270
- o[2] || (o[2] = y("span", null, "Add Environment", -1))
275
+ o[2] || (o[2] = C("span", null, "Add Environment", -1))
271
276
  ]),
272
277
  _: 2
273
278
  }, 1032, ["onClick"])) : K("", !0)
@@ -298,7 +303,7 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
298
303
  default: d(() => [
299
304
  u(ke, null, ve({
300
305
  default: d(() => [
301
- l.value ? (m(), h(fe, {
306
+ l.value ? (m(), y(fe, {
302
307
  key: 0,
303
308
  class: "pl-px pr-2 md:px-4 py-2",
304
309
  isCopyable: "",
@@ -314,7 +319,7 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
314
319
  l.value ? {
315
320
  name: "title",
316
321
  fn: d(() => [
317
- y("span", null, W(ee()), 1)
322
+ C("span", null, W(ee()), 1)
318
323
  ]),
319
324
  key: "0"
320
325
  } : void 0
@@ -324,25 +329,25 @@ const Re = { class: "flex-1" }, je = ["onClick"], nn = /* @__PURE__ */ re({
324
329
  }),
325
330
  u($e, {
326
331
  selectedColor: R.value,
327
- state: r(E),
328
- onCancel: o[0] || (o[0] = (n) => r(E).hide()),
332
+ state: s(g),
333
+ onCancel: o[0] || (o[0] = (n) => s(g).hide()),
329
334
  onSubmit: Y
330
335
  }, null, 8, ["selectedColor", "state"]),
331
336
  u(Ve, {
332
- activeWorkspaceCollections: r(s),
333
- collectionId: v.value,
334
- state: r(g),
335
- onCancel: o[1] || (o[1] = (n) => r(g).hide()),
337
+ activeWorkspaceCollections: s(i),
338
+ collectionId: f.value,
339
+ state: s(_),
340
+ onCancel: o[1] || (o[1] = (n) => s(_).hide()),
336
341
  onSubmit: q
337
342
  }, null, 8, ["activeWorkspaceCollections", "collectionId", "state"]),
338
- u(r(_e), {
343
+ u(s(_e), {
339
344
  size: "xxs",
340
- state: r(_),
345
+ state: s(I),
341
346
  title: `Edit ${c.value}`
342
347
  }, {
343
348
  default: d(() => [
344
349
  u(pe, {
345
- name: I.value ?? "",
350
+ name: w.value ?? "",
346
351
  onClose: ae,
347
352
  onEdit: le
348
353
  }, null, 8, ["name"])
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAqS8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAmajD,wBAMG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAyS8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAqajD,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-8b8ff238"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-32033bf8"]]);
5
5
  export {
6
6
  m as default
7
7
  };