@scalar/api-client 2.0.38 → 2.0.40

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 (86) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  4. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +84 -80
  5. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  6. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  7. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  8. package/dist/components/DataTable/DataTableInput.vue2.js +1 -1
  9. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  10. package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -1
  11. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -0
  12. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
  13. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +18 -14
  14. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  15. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +5 -40
  16. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +48 -2
  17. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -0
  18. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  19. package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
  20. package/dist/components/Sidebar/SidebarListElement.vue2.js +24 -22
  21. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  22. package/dist/components/Sidebar/SidebarListElementActions.vue.js +26 -25
  23. package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
  24. package/dist/components/SubpageHeader.vue.js +5 -29
  25. package/dist/components/SubpageHeader.vue2.js +31 -2
  26. package/dist/layouts/App/create-api-client-app.d.ts +20 -20
  27. package/dist/layouts/Modal/create-api-client-modal.d.ts +40 -40
  28. package/dist/libs/create-client.d.ts +20 -20
  29. package/dist/libs/sendRequest.d.ts.map +1 -1
  30. package/dist/libs/sendRequest.js +87 -70
  31. package/dist/store/workspace.d.ts +64 -64
  32. package/dist/store/workspace.d.ts.map +1 -1
  33. package/dist/store/workspace.js +129 -132
  34. package/dist/style.css +1 -1
  35. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  36. package/dist/views/Cookies/Cookies.vue2.js +46 -36
  37. package/dist/views/Environment/Environment.vue2.js +26 -26
  38. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  39. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +37 -34
  40. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  41. package/dist/views/Request/Request.vue.js +2 -2
  42. package/dist/views/Request/Request.vue2.js +196 -142
  43. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  44. package/dist/views/Request/RequestSection/RequestAuth.vue.js +5 -311
  45. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +312 -2
  46. package/dist/views/Request/RequestSection/RequestSection.vue.js +19 -19
  47. package/dist/views/Request/RequestSidebarItem.vue.d.ts +4 -4
  48. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  49. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  50. package/dist/views/Request/RequestSidebarItem.vue2.js +108 -87
  51. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  52. package/dist/views/Request/RequestSidebarItemMenu.vue.js +5 -162
  53. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +166 -2
  54. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +3 -17
  55. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  56. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +89 -5
  57. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +2 -37
  58. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +18 -0
  59. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -0
  60. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +34 -0
  61. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +4 -0
  62. package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts +12 -0
  63. package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts.map +1 -0
  64. package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +14 -0
  65. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +23 -0
  66. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -0
  67. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +7 -0
  68. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +65 -0
  69. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +19 -0
  70. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -0
  71. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +7 -0
  72. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +29 -0
  73. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +20 -0
  74. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +1 -0
  75. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +25 -0
  76. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +4 -0
  77. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  78. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +61 -63
  79. package/dist/views/Request/consts/index.d.ts +2 -0
  80. package/dist/views/Request/consts/index.d.ts.map +1 -1
  81. package/dist/views/Request/consts/index.js +6 -3
  82. package/dist/views/Request/consts/mediaTypes.d.ts +16 -0
  83. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -0
  84. package/dist/views/Request/consts/mediaTypes.js +108 -0
  85. package/dist/views/Servers/Servers.vue2.js +17 -17
  86. package/package.json +8 -6
@@ -1,24 +1,24 @@
1
- import { defineComponent as u, openBlock as i, createBlock as a, withCtx as e, createVNode as t, unref as m, createElementVNode as f, createElementBlock as d, Fragment as _, renderList as p, createTextVNode as k } from "vue";
1
+ import { defineComponent as f, openBlock as a, createBlock as s, withCtx as t, createVNode as o, unref as u, createElementVNode as p, createElementBlock as _, Fragment as k, renderList as h, createTextVNode as C } from "vue";
2
2
  import x from "../../components/Sidebar/SidebarButton.vue.js";
3
- import C from "../../components/Sidebar/SidebarList.vue.js";
4
- import h from "../../components/Sidebar/SidebarListElement.vue.js";
5
- import b from "../../components/SubpageHeader.vue.js";
3
+ import b from "../../components/Sidebar/SidebarList.vue.js";
4
+ import v from "../../components/Sidebar/SidebarListElement.vue.js";
5
+ import g from "../../components/SubpageHeader.vue.js";
6
6
  import L from "../../components/ViewLayout/ViewLayout.vue.js";
7
7
  import V from "../../components/ViewLayout/ViewLayoutContent.vue.js";
8
8
  import { useWorkspace as $ } from "../../store/workspace.js";
9
- import { createCookie as v } from "@scalar/oas-utils/entities/workspace/cookie";
10
- import { nanoid as y } from "nanoid";
11
- import { useRouter as N } from "vue-router";
9
+ import { createCookie as y } from "@scalar/oas-utils/entities/workspace/cookie";
10
+ import { nanoid as N } from "nanoid";
11
+ import { useRouter as S } from "vue-router";
12
12
  import w from "./CookieForm.vue.js";
13
13
  import B from "./CookieRaw.vue.js";
14
- import E from "../../components/Sidebar/Sidebar.vue.js";
14
+ import D from "../../components/Sidebar/Sidebar.vue.js";
15
15
  /* empty css */
16
- const S = { class: "flex-1" }, P = /* @__PURE__ */ u({
16
+ const E = { class: "flex-1" }, U = /* @__PURE__ */ f({
17
17
  __name: "Cookies",
18
- setup(g) {
19
- const { cookies: n, cookieMutators: s } = $(), l = N(), c = () => {
20
- const o = v({
21
- uid: y(),
18
+ setup(H) {
19
+ const { cookies: m, cookieMutators: l } = $(), n = S(), c = () => {
20
+ const r = y({
21
+ uid: N(),
22
22
  name: "Cookie",
23
23
  value: "",
24
24
  domain: "",
@@ -27,41 +27,51 @@ const S = { class: "flex-1" }, P = /* @__PURE__ */ u({
27
27
  httpOnly: !1,
28
28
  sameSite: "None"
29
29
  });
30
- s.add(o), l.push(o.uid);
30
+ l.add(r), n.push(r.uid);
31
+ }, d = (r) => {
32
+ l.delete(r);
33
+ const i = Object.values(m).filter(
34
+ (e) => e.uid !== r
35
+ );
36
+ if (i.length > 1) {
37
+ const e = i[i.length - 1];
38
+ n.push(e.uid);
39
+ } else i.length === 1 && i[0].uid === "default" && n.push("default");
31
40
  };
32
- return (o, A) => (i(), a(b, null, {
33
- default: e(() => [
34
- t(L, null, {
35
- default: e(() => [
36
- t(m(E), { title: "Domain" }, {
37
- content: e(() => [
38
- f("div", S, [
39
- t(C, null, {
40
- default: e(() => [
41
- (i(!0), d(_, null, p(m(n), (r) => (i(), a(h, {
42
- key: r.uid,
41
+ return (r, i) => (a(), s(g, null, {
42
+ default: t(() => [
43
+ o(L, null, {
44
+ default: t(() => [
45
+ o(u(D), { title: "Domain" }, {
46
+ content: t(() => [
47
+ p("div", E, [
48
+ o(b, null, {
49
+ default: t(() => [
50
+ (a(!0), _(k, null, h(u(m), (e) => (a(), s(v, {
51
+ key: e.uid,
43
52
  class: "text-xs",
44
- variable: { name: r.name, uid: r.uid }
45
- }, null, 8, ["variable"]))), 128))
53
+ variable: { name: e.name, uid: e.uid },
54
+ onDelete: (O) => d(e.uid)
55
+ }, null, 8, ["variable", "onDelete"]))), 128))
46
56
  ]),
47
57
  _: 1
48
58
  })
49
59
  ])
50
60
  ]),
51
- button: e(() => [
52
- t(x, { click: c }, {
53
- title: e(() => [
54
- k("Add Item")
61
+ button: t(() => [
62
+ o(x, { click: c }, {
63
+ title: t(() => [
64
+ C("Add Item")
55
65
  ]),
56
66
  _: 1
57
67
  })
58
68
  ]),
59
69
  _: 1
60
70
  }),
61
- t(V, { class: "flex-1" }, {
62
- default: e(() => [
63
- t(w),
64
- t(B)
71
+ o(V, { class: "flex-1" }, {
72
+ default: t(() => [
73
+ o(w),
74
+ o(B)
65
75
  ]),
66
76
  _: 1
67
77
  })
@@ -74,5 +84,5 @@ const S = { class: "flex-1" }, P = /* @__PURE__ */ u({
74
84
  }
75
85
  });
76
86
  export {
77
- P as default
87
+ U as default
78
88
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as N, ref as c, onMounted as C, openBlock as r, createBlock as f, withCtx as o, createVNode as a, createElementVNode as _, createElementBlock as d, Fragment as w, renderList as $, unref as u, createTextVNode as I, createSlots as S, createCommentVNode as h, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
1
+ import { defineComponent as N, ref as c, onMounted as C, openBlock as r, createBlock as f, withCtx as o, createVNode as a, createElementVNode as _, createElementBlock as d, Fragment as w, renderList as S, unref as u, createTextVNode as $, createSlots as I, createCommentVNode as h, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
2
2
  import K from "../../components/CodeInput/CodeInput.vue.js";
3
3
  import A from "../../components/Sidebar/Sidebar.vue.js";
4
4
  /* empty css */
@@ -6,21 +6,21 @@ import M from "../../components/Sidebar/SidebarButton.vue.js";
6
6
  import T from "../../components/Sidebar/SidebarList.vue.js";
7
7
  import U from "../../components/Sidebar/SidebarListElement.vue.js";
8
8
  import F from "../../components/SubpageHeader.vue.js";
9
- import J from "../../components/ViewLayout/ViewLayout.vue.js";
10
- import O from "../../components/ViewLayout/ViewLayoutContent.vue.js";
11
- import W from "../../components/ViewLayout/ViewLayoutSection.vue.js";
12
- import { useWorkspace as j } from "../../store/workspace.js";
13
- import { nanoid as q } from "nanoid";
14
- import { useRouter as z } from "vue-router";
15
- import G from "./EnvironmentColors.vue.js";
16
- const H = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, de = /* @__PURE__ */ N({
9
+ import H from "../../components/ViewLayout/ViewLayout.vue.js";
10
+ import J from "../../components/ViewLayout/ViewLayoutContent.vue.js";
11
+ import O from "../../components/ViewLayout/ViewLayoutSection.vue.js";
12
+ import { useWorkspace as W } from "../../store/workspace.js";
13
+ import { nanoid as j } from "nanoid";
14
+ import { useRouter as q } from "vue-router";
15
+ import z from "./EnvironmentColors.vue.js";
16
+ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, de = /* @__PURE__ */ N({
17
17
  __name: "Environment",
18
18
  setup(X) {
19
- const v = z(), { environments: n, environmentMutators: m } = j(), e = c(null), p = c(null), s = c(!1);
19
+ const v = q(), { environments: n, environmentMutators: m } = W(), e = c(null), p = c(null), s = c(!1);
20
20
  function E() {
21
21
  const t = {
22
22
  name: "New Environment",
23
- uid: q(),
23
+ uid: j(),
24
24
  color: "grey",
25
25
  raw: JSON.stringify({ exampleKey: "exampleValue" }, null, 2),
26
26
  parsed: [],
@@ -33,29 +33,29 @@ const H = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
33
33
  }
34
34
  const y = (t) => {
35
35
  m.delete(t), e.value === t && (e.value = null);
36
- }, x = (t) => {
36
+ }, b = (t) => {
37
37
  e.value && (n[e.value].color = t);
38
- }, V = () => {
38
+ }, g = () => {
39
39
  v.currentRoute.value.params.environment === "default" && (e.value = n.default.uid);
40
- }, b = () => {
40
+ }, x = () => {
41
41
  e.value && !n[e.value].isDefault && (s.value = !0, R(() => {
42
42
  var t;
43
43
  (t = p.value) == null || t.focus();
44
44
  }));
45
- }, g = (t) => {
45
+ }, V = (t) => {
46
46
  const l = t.target.value;
47
47
  e.value && !n[e.value].isDefault && (n[e.value].name = l);
48
48
  };
49
- return C(V), (t, i) => (r(), f(F, null, {
49
+ return C(g), (t, i) => (r(), f(F, null, {
50
50
  default: o(() => [
51
- a(J, null, {
51
+ a(H, null, {
52
52
  default: o(() => [
53
53
  a(A, { title: "Environment" }, {
54
54
  content: o(() => [
55
- _("div", H, [
55
+ _("div", G, [
56
56
  a(T, null, {
57
57
  default: o(() => [
58
- (r(!0), d(w, null, $(u(n), (l) => (r(), f(U, {
58
+ (r(!0), d(w, null, S(u(n), (l) => (r(), f(U, {
59
59
  key: l.uid,
60
60
  class: "text-xs",
61
61
  variable: {
@@ -75,16 +75,16 @@ const H = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
75
75
  button: o(() => [
76
76
  a(M, { click: E }, {
77
77
  title: o(() => [
78
- I("Add Environment Variable")
78
+ $("Add Environment Variable")
79
79
  ]),
80
80
  _: 1
81
81
  })
82
82
  ]),
83
83
  _: 1
84
84
  }),
85
- a(O, { class: "flex-1" }, {
85
+ a(J, { class: "flex-1" }, {
86
86
  default: o(() => [
87
- a(W, null, S({
87
+ a(O, null, I({
88
88
  default: o(() => [
89
89
  e.value ? (r(), f(K, {
90
90
  key: 0,
@@ -101,7 +101,7 @@ const H = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
101
101
  fn: o(() => [
102
102
  !s.value || u(n)[e.value].isDefault ? (r(), d("span", {
103
103
  key: 0,
104
- onDblclick: b
104
+ onDblclick: x
105
105
  }, L(u(n)[e.value].name), 33)) : (r(), d("input", {
106
106
  key: 1,
107
107
  ref_key: "nameInputRef",
@@ -111,13 +111,13 @@ const H = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
111
111
  type: "text",
112
112
  value: u(n)[e.value].name,
113
113
  onBlur: i[0] || (i[0] = (l) => s.value = !1),
114
- onInput: g,
114
+ onInput: V,
115
115
  onKeyup: i[1] || (i[1] = B((l) => s.value = !1, ["enter"]))
116
116
  }, null, 40, P)),
117
117
  _("div", Q, [
118
- a(G, {
118
+ a(z, {
119
119
  activeColor: u(n)[e.value].color,
120
- onSelect: x
120
+ onSelect: b
121
121
  }, null, 8, ["activeColor"])
122
122
  ])
123
123
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAIvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;;WAK/B,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;WAHP,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;AA6MhB,wBAOG;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":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAkHA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAIvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;;WAK/B,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;WAHP,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;AAmNhB,wBAOG;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,12 +1,7 @@
1
- import { defineComponent as x, computed as b, openBlock as o, createElementBlock as s, Fragment as y, renderList as k, createElementVNode as a, normalizeClass as w, createTextVNode as c, toDisplayString as u, createBlock as E, unref as i, withCtx as C, createVNode as V } from "vue";
2
- import { ScalarButton as B, ScalarIcon as z } from "@scalar/components";
3
- import I from "fuse.js";
4
- const N = {
5
- id: "env-dialog",
6
- class: "z-10 w-60 rounded border bg-b-1 p-1",
7
- open: !0,
8
- tabindex: "0"
9
- }, P = { key: 0 }, S = ["onClick"], $ = { class: "flex items-center gap-1.5 whitespace-nowrap" }, j = { class: "w-20 overflow-hidden text-ellipsis text-right" }, L = /* @__PURE__ */ x({
1
+ import { defineComponent as b, ref as y, computed as E, openBlock as r, createElementBlock as o, Fragment as C, renderList as V, createElementVNode as a, normalizeClass as B, createTextVNode as i, toDisplayString as u, createBlock as I, unref as d, withCtx as z, createVNode as N } from "vue";
2
+ import { ScalarButton as P, ScalarIcon as S } from "@scalar/components";
3
+ import $ from "fuse.js";
4
+ const j = ["open"], q = { key: 0 }, A = ["onClick"], D = { class: "flex items-center gap-1.5 whitespace-nowrap" }, F = { class: "w-20 overflow-hidden text-ellipsis text-right" }, R = /* @__PURE__ */ b({
10
5
  __name: "EnvironmentVariableDropdown",
11
6
  props: {
12
7
  query: {},
@@ -15,52 +10,60 @@ const N = {
15
10
  router: {}
16
11
  },
17
12
  emits: ["select"],
18
- setup(d, { emit: p }) {
19
- const n = d, v = p, { push: m } = n.router, f = new I(n.activeParsedEnvironments.value, {
13
+ setup(p, { emit: v }) {
14
+ const n = p, m = v, c = y(!0), f = () => {
15
+ const e = _.value.params.workspace;
16
+ h(`/workspace/${e}/environment/default`), c.value = !1;
17
+ }, { push: h, currentRoute: _ } = n.router, g = new $(n.activeParsedEnvironments.value, {
20
18
  keys: ["key", "value"]
21
- }), l = b(() => {
19
+ }), l = E(() => {
22
20
  const e = n.query;
23
21
  if (!e)
24
22
  return n.activeParsedEnvironments.value.slice(-4);
25
- const r = f.search(e);
26
- return r.length > 0 ? r.map((t) => t.item) : [];
27
- }), g = (e) => {
28
- v("select", e);
29
- }, h = (e) => "_scalarEnvId" in e ? `bg-${n.environments[e._scalarEnvId].color}` : "bg-grey";
30
- return (e, r) => (o(), s("dialog", N, [
31
- l.value.length ? (o(), s("ul", P, [
32
- (o(!0), s(y, null, k(l.value, (t, _) => (o(), s("li", {
33
- key: _,
23
+ const s = g.search(e);
24
+ return s.length > 0 ? s.map((t) => t.item) : [];
25
+ }), k = (e) => {
26
+ m("select", e);
27
+ }, w = (e) => "_scalarEnvId" in e ? `bg-${n.environments[e._scalarEnvId].color}` : "bg-grey";
28
+ return (e, s) => (r(), o("dialog", {
29
+ id: "env-dialog",
30
+ class: "z-10 w-60 rounded border bg-b-1 p-1",
31
+ open: c.value,
32
+ tabindex: "0"
33
+ }, [
34
+ l.value.length ? (r(), o("ul", q, [
35
+ (r(!0), o(C, null, V(l.value, (t, x) => (r(), o("li", {
36
+ key: x,
34
37
  class: "font-code text-3xs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150",
35
- onClick: (q) => g(t.key)
38
+ onClick: (T) => k(t.key)
36
39
  }, [
37
- a("div", $, [
40
+ a("div", D, [
38
41
  a("span", {
39
- class: w(["h-2.5 w-2.5 min-w-2.5 rounded-full", h(t)])
42
+ class: B(["h-2.5 w-2.5 min-w-2.5 rounded-full", w(t)])
40
43
  }, null, 2),
41
- c(" " + u(t.key), 1)
44
+ i(" " + u(t.key), 1)
42
45
  ]),
43
- a("span", j, u(t.value), 1)
44
- ], 8, S))), 128))
45
- ])) : (o(), E(i(B), {
46
+ a("span", F, u(t.value), 1)
47
+ ], 8, A))), 128))
48
+ ])) : (r(), I(d(P), {
46
49
  key: 1,
47
50
  class: "font-code text-3xs hover:bg-b-2 flex h-7 w-full justify-start gap-2 px-2 transition-colors duration-150",
48
51
  variant: "secondary",
49
- onClick: r[0] || (r[0] = (t) => i(m)("/environment"))
52
+ onClick: f
50
53
  }, {
51
- default: C(() => [
52
- V(i(z), {
54
+ default: z(() => [
55
+ N(d(S), {
53
56
  class: "w-2",
54
57
  icon: "Add",
55
58
  size: "xs"
56
59
  }),
57
- c(" Add variable ")
60
+ i(" Add variable ")
58
61
  ]),
59
62
  _: 1
60
63
  }))
61
- ]));
64
+ ], 8, j));
62
65
  }
63
66
  });
64
67
  export {
65
- L as default
68
+ R as default
66
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AAyhCA,wBAKG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AAg/BA,wBAKG"}
@@ -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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1eb6d142"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a88db4d1"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };