@scalar/api-client 2.5.22 → 2.5.25

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 (71) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +2 -2
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -3
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue2.js +86 -106
  7. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  8. package/dist/components/CodeInput/codeVariableWidget.js +55 -87
  9. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -6
  10. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  12. package/dist/components/EmptyState.vue.d.ts.map +1 -1
  13. package/dist/components/EmptyState.vue.js +1 -1
  14. package/dist/components/EmptyState.vue2.js +12 -12
  15. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
  16. package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
  17. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  18. package/dist/components/Sidebar/SidebarButton.vue.js +11 -12
  19. package/dist/components/TopNav/TopNav.vue.js +50 -51
  20. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  21. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  22. package/dist/components/TopNav/TopNavItem.vue2.js +19 -20
  23. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  24. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +8 -8
  25. package/dist/layouts/App/create-api-client-app.d.ts +50 -50
  26. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  27. package/dist/layouts/Modal/create-api-client-modal.d.ts +100 -100
  28. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  29. package/dist/layouts/Web/create-api-client-web.d.ts +50 -50
  30. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  31. package/dist/libs/create-client.d.ts +50 -50
  32. package/dist/libs/create-client.d.ts.map +1 -1
  33. package/dist/libs/send-request/create-request-operation.test.d.ts +5 -5
  34. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  35. package/dist/store/active-entities.d.ts +5 -5
  36. package/dist/store/active-entities.d.ts.map +1 -1
  37. package/dist/store/request-example.d.ts +50 -50
  38. package/dist/store/request-example.d.ts.map +1 -1
  39. package/dist/store/store.d.ts +50 -50
  40. package/dist/store/store.d.ts.map +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/views/Collection/components/EnvironmentForm.vue.js +2 -2
  43. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  44. package/dist/views/Environment/Environment.vue2.js +14 -15
  45. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  46. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +71 -65
  47. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +80 -59
  49. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  50. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +52 -52
  51. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  52. package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
  53. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
  54. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
  55. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +5 -7
  56. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  57. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -1
  58. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +26 -13
  59. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  60. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  61. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -37
  62. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  63. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  64. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +9 -9
  65. package/package.json +16 -17
  66. package/dist/components/ScalarHotkey.test.d.ts +0 -2
  67. package/dist/components/ScalarHotkey.test.d.ts.map +0 -1
  68. package/dist/components/ScalarHotkey.vue.d.ts +0 -8
  69. package/dist/components/ScalarHotkey.vue.d.ts.map +0 -1
  70. package/dist/components/ScalarHotkey.vue.js +0 -44
  71. package/dist/components/ScalarHotkey.vue2.js +0 -4
@@ -1,7 +1,7 @@
1
1
  import o from "./EnvironmentForm.vue2.js";
2
2
  import "./EnvironmentForm.vue3.js";
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2debec7e"]]);
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-83bfcc8a"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AAihDA,wBAMG"}
1
+ {"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AAghDA,wBAMG"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as ve, ref as k, computed as fe, watch as B, onMounted as pe, onBeforeUnmount as be, createBlock as _, openBlock as f, withCtx as c, createVNode as u, createTextVNode as L, createElementVNode as b, createElementBlock as O, unref as l, Fragment as K, renderList as G, withDirectives as xe, normalizeClass as J, toDisplayString as T, createCommentVNode as H, withModifiers as he, vShow as Ee, createSlots as Ce } from "vue";
2
- import { useModal as j, ScalarIcon as q, ScalarButton as ke, ScalarModal as ye } from "@scalar/components";
3
- import { LibraryIcon as ge } from "@scalar/icons/library";
2
+ import { useModal as j, ScalarIcon as q, ScalarButton as ke, ScalarModal as ge } from "@scalar/components";
3
+ import { LibraryIcon as ye } from "@scalar/icons/library";
4
4
  import { useToasts as _e } from "@scalar/use-toasts";
5
5
  import { useRouter as we, useRoute as Me } from "vue-router";
6
6
  import De from "../../components/CodeInput/CodeInput.vue.js";
@@ -22,12 +22,12 @@ import { useWorkspace as Ae } from "../../store/store.js";
22
22
  const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-[14px] items-center justify-center" }, vn = /* @__PURE__ */ ve({
23
23
  __name: "Environment",
24
24
  setup(Ge) {
25
- const y = we(), x = Me(), {
25
+ const g = we(), x = Me(), {
26
26
  activeWorkspace: p,
27
27
  activeEnvironment: F,
28
28
  activeWorkspaceCollections: d,
29
29
  activeEnvVariables: Q
30
- } = Re(), { events: N, workspaceMutators: X, collectionMutators: h } = Ae(), { collapsedSidebarFolders: g, toggleSidebarFolder: w } = Ne(), M = j(), D = j(), I = j(), R = k(null), s = k("default"), W = k(""), E = k(void 0), v = k(void 0), S = k(void 0), { toast: U } = _e(), Y = (e) => JSON.parse(e);
30
+ } = Re(), { events: N, workspaceMutators: X, collectionMutators: h } = Ae(), { collapsedSidebarFolders: y, toggleSidebarFolder: w } = Ne(), M = j(), D = j(), I = j(), R = k(null), s = k("default"), W = k(""), E = k(void 0), v = k(void 0), S = k(void 0), { toast: U } = _e(), Y = (e) => JSON.parse(e);
31
31
  function z(e, o, n) {
32
32
  var t;
33
33
  e && (o.uid === n ? U(
@@ -56,7 +56,7 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
56
56
  color: e.color
57
57
  },
58
58
  e.collectionId
59
- ), g[e.collectionId] || w(e.collectionId), y.push({
59
+ ), y[e.collectionId] || w(e.collectionId), g.push({
60
60
  name: "environment.collection",
61
61
  params: {
62
62
  [i.Collection]: e.collectionId,
@@ -137,15 +137,15 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
137
137
  t
138
138
  )
139
139
  );
140
- s.value = t, y.push({
140
+ s.value = t, g.push({
141
141
  name: "environment.collection",
142
142
  params: {
143
143
  [i.Collection]: a == null ? void 0 : a.uid,
144
144
  [i.Environment]: t
145
145
  }
146
- }), a && !g[a.uid] && w(a.uid);
146
+ }), a && !y[a.uid] && w(a.uid);
147
147
  } else
148
- s.value = "default", y.push({
148
+ s.value = "default", g.push({
149
149
  name: "environment.default",
150
150
  params: {
151
151
  [i.Workspace]: (n = p.value) == null ? void 0 : n.uid
@@ -164,7 +164,7 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
164
164
  null,
165
165
  2
166
166
  );
167
- }, se = (e) => g[e], A = (e) => {
167
+ }, se = (e) => y[e], A = (e) => {
168
168
  e != null && e.createNew && x.name === "environment" && $();
169
169
  };
170
170
  B(
@@ -175,7 +175,7 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
175
175
  ), pe(() => {
176
176
  s.value = x.params[i.Environment] || "default", N.hotKeys.on(A);
177
177
  const e = x.params[i.Collection];
178
- e && !g[e] && w(e);
178
+ e && !y[e] && w(e);
179
179
  }), be(() => N.hotKeys.off(A));
180
180
  const ie = (e, o, n) => {
181
181
  var a, r;
@@ -193,7 +193,7 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
193
193
  [i.Environment]: o
194
194
  }
195
195
  };
196
- e.metaKey ? window.open(y.resolve(t).href, "_blank") : y.push(t);
196
+ e.metaKey ? window.open(g.resolve(t).href, "_blank") : g.push(t);
197
197
  };
198
198
  function ue() {
199
199
  v.value = void 0, E.value = void 0, S.value = void 0, I.hide();
@@ -272,13 +272,13 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
272
272
  onClick: (a) => l(w)(n.uid)
273
273
  }, [
274
274
  b("span", Ke, [
275
- u(l(ge), {
275
+ u(l(ye), {
276
276
  class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2 group-hover:hidden",
277
277
  src: n["x-scalar-icon"] || "interface-content-folder"
278
278
  }, null, 8, ["src"]),
279
279
  b("div", {
280
280
  class: J({
281
- "rotate-90": l(g)[n.uid]
281
+ "rotate-90": l(y)[n.uid]
282
282
  })
283
283
  }, [
284
284
  u(l(q), {
@@ -373,7 +373,6 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
373
373
  class: "py-2 pr-2 pl-px md:px-4",
374
374
  envVariables: l(Q),
375
375
  environment: l(F),
376
- isCopyable: "",
377
376
  language: "json",
378
377
  lineNumbers: "",
379
378
  lint: "",
@@ -408,7 +407,7 @@ const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-
408
407
  onCancel: o[1] || (o[1] = (n) => l(D).hide()),
409
408
  onSubmit: Z
410
409
  }, null, 8, ["activeWorkspaceCollections", "collectionId", "state"]),
411
- u(l(ye), {
410
+ u(l(ge), {
412
411
  size: "xxs",
413
412
  state: l(I),
414
413
  title: `Edit ${v.value}`
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAOzE,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAInE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;IAE1B,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCA0DiC,IAAI,GAAG,MAAM;;;;;;;AAyPhD,wBAQG"}
1
+ {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAsMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAOzE,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAMnE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;IAE1B,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCAyEiC,IAAI,GAAG,MAAM;;;;;;;AA+PhD,wBAQG"}
@@ -1,14 +1,17 @@
1
- import { defineComponent as R, ref as m, computed as w, onMounted as I, createBlock as v, createCommentVNode as x, openBlock as r, unref as l, withCtx as y, createElementVNode as c, normalizeStyle as b, createElementBlock as u, Fragment as P, renderList as T, normalizeClass as j, createTextVNode as k, toDisplayString as g, createVNode as q } from "vue";
2
- import { ScalarTeleport as D, ScalarIcon as V, ScalarButton as F } from "@scalar/components";
3
- import { onClickOutside as K } from "@vueuse/core";
4
- import O from "fuse.js";
5
- import { useRouter as G } from "vue-router";
6
- import { getEnvColor as L } from "../../libs/env-helpers.js";
7
- import { parseEnvVariables as _ } from "../../libs/environment-parser.js";
8
- const M = {
1
+ import { defineComponent as B, ref as v, computed as w, onMounted as R, createBlock as h, createCommentVNode as y, openBlock as r, unref as s, withCtx as k, createElementVNode as c, normalizeStyle as x, createElementBlock as u, Fragment as D, renderList as T, normalizeClass as j, createTextVNode as g, toDisplayString as V, createVNode as q } from "vue";
2
+ import { ScalarTeleport as F, ScalarButton as G } from "@scalar/components";
3
+ import { ScalarIconGlobe as K, ScalarIconPlus as O } from "@scalar/icons";
4
+ import { onClickOutside as L } from "@vueuse/core";
5
+ import M from "fuse.js";
6
+ import { useRouter as Q } from "vue-router";
7
+ import { getEnvColor as W } from "../../libs/env-helpers.js";
8
+ import { PathId as _ } from "../../routes.js";
9
+ import { useActiveEntities as $ } from "../../store/active-entities.js";
10
+ import { parseEnvVariables as C } from "../../libs/environment-parser.js";
11
+ const H = {
9
12
  key: 0,
10
13
  class: "gap-1/2 flex flex-col"
11
- }, Q = ["onClick"], $ = { class: "flex items-center gap-2 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-right text-ellipsis whitespace-nowrap" }, ne = /* @__PURE__ */ R({
14
+ }, J = ["onClick"], U = { class: "flex items-center gap-2 whitespace-nowrap" }, X = { class: "w-20 overflow-hidden text-right text-ellipsis whitespace-nowrap" }, de = /* @__PURE__ */ B({
12
15
  __name: "EnvironmentVariableDropdown",
13
16
  props: {
14
17
  query: {},
@@ -17,112 +20,115 @@ const M = {
17
20
  dropdownPosition: {}
18
21
  },
19
22
  emits: ["select"],
20
- setup(C, { expose: S, emit: E }) {
21
- const s = C, z = E, d = m(!0), p = m(null), n = m(0), f = G(), A = () => {
23
+ setup(S, { expose: E, emit: z }) {
24
+ const a = S, I = z, d = v(!0), p = v(null), l = v(0), f = Q(), { activeCollection: m } = $(), N = () => {
25
+ var n;
22
26
  if (!f)
23
27
  return;
24
- const { currentRoute: t, push: o } = f, e = t.value.params.workspace;
25
- o({
28
+ const { currentRoute: e, push: o } = f, t = e.value.params.workspace;
29
+ !m.value || ((n = m.value.info) == null ? void 0 : n.title) === "Drafts" ? o({
26
30
  name: "environment.default",
27
31
  params: {
28
- workspace: e
32
+ [_.Workspace]: t
33
+ }
34
+ }) : o({
35
+ name: "collection.environment",
36
+ params: {
37
+ [_.Collection]: m.value.uid
29
38
  }
30
39
  }), d.value = !1;
31
- }, B = new O(_(s.envVariables), {
40
+ }, P = new M(C(a.envVariables), {
32
41
  keys: ["key", "value"]
33
42
  }), i = w(() => {
34
- const t = s.query;
35
- if (!t)
36
- return _(s.envVariables).slice(-4).filter(({ key: e, value: a }) => e !== "" || a !== "");
37
- const o = B.search(t, { limit: 10 });
38
- return o.length > 0 ? o.map((e) => e.item).filter(({ key: e, value: a }) => e !== "" || a !== "") : [];
39
- }), h = (t) => {
40
- z("select", t);
43
+ const e = a.query;
44
+ if (!e)
45
+ return C(a.envVariables).slice(-4).filter(({ key: t, value: n }) => t !== "" || n !== "");
46
+ const o = P.search(e, { limit: 10 });
47
+ return o.length > 0 ? o.map((t) => t.item).filter(({ key: t, value: n }) => t !== "" || n !== "") : [];
48
+ }), b = (e) => {
49
+ I("select", e);
41
50
  };
42
- S({
43
- handleArrowKey: (t) => {
44
- const o = t === "up" ? -1 : 1, e = i.value.length;
45
- e !== 0 && (n.value = (n.value + o + e) % e);
51
+ E({
52
+ handleArrowKey: (e) => {
53
+ const o = e === "up" ? -1 : 1, t = i.value.length;
54
+ t !== 0 && (l.value = (l.value + o + t) % t);
46
55
  },
47
56
  handleSelect: () => {
48
- if (n.value >= 0) {
49
- const t = i.value[n.value];
50
- t && h(t.key);
57
+ if (l.value >= 0) {
58
+ const e = i.value[l.value];
59
+ e && b(e.key);
51
60
  }
52
61
  }
53
- }), I(() => {
54
- n.value = 0;
62
+ }), R(() => {
63
+ l.value = 0;
55
64
  });
56
- const N = w(() => {
57
- var t, o;
65
+ const A = w(() => {
66
+ var e, o;
58
67
  return {
59
- left: (((t = s.dropdownPosition) == null ? void 0 : t.left) ?? 0) + "px",
68
+ left: (((e = a.dropdownPosition) == null ? void 0 : e.left) ?? 0) + "px",
60
69
  // Add a 5px offset from the editor
61
- top: (((o = s.dropdownPosition) == null ? void 0 : o.top) ?? 0) + 5 + "px"
70
+ top: (((o = a.dropdownPosition) == null ? void 0 : o.top) ?? 0) + 5 + "px"
62
71
  };
63
72
  });
64
- return K(
73
+ return L(
65
74
  p,
66
75
  () => {
67
76
  d.value = !1;
68
77
  },
69
78
  { ignore: [p] }
70
- ), (t, o) => d.value ? (r(), v(l(D), {
79
+ ), (e, o) => d.value ? (r(), h(s(F), {
71
80
  key: 0,
72
81
  class: "scalar-client"
73
82
  }, {
74
- default: y(() => [
83
+ default: k(() => [
75
84
  c("div", {
76
85
  ref_key: "dropdownRef",
77
86
  ref: p,
78
87
  class: "custom-scroll fixed top-0 left-0 flex max-h-[60svh] w-56 flex-col rounded border p-0.75",
79
- style: b(N.value)
88
+ style: x(A.value)
80
89
  }, [
81
- i.value.length ? (r(), u("ul", M, [
82
- (r(!0), u(P, null, T(i.value, (e, a) => (r(), u("li", {
83
- key: e.key,
84
- class: j(["font-code text-xxs hover:bg-b-2 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": a === n.value }]),
85
- onClick: (W) => h(e.key)
90
+ i.value.length ? (r(), u("ul", H, [
91
+ (r(!0), u(D, null, T(i.value, (t, n) => (r(), u("li", {
92
+ key: t.key,
93
+ class: j(["font-code text-xxs hover:bg-b-2 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": n === l.value }]),
94
+ onClick: (ee) => b(t.key)
86
95
  }, [
87
- c("div", $, [
88
- e.source === "collection" ? (r(), u("span", {
96
+ c("div", U, [
97
+ t.source === "collection" && e.environment.name !== "No Environment" ? (r(), u("span", {
89
98
  key: 0,
90
99
  class: "h-2.25 w-2.25 min-w-2.25 rounded-full",
91
- style: b({
92
- backgroundColor: l(L)(t.environment)
100
+ style: x({
101
+ backgroundColor: s(W)(e.environment)
93
102
  })
94
- }, null, 4)) : (r(), v(l(V), {
103
+ }, null, 4)) : (r(), h(s(K), {
95
104
  key: 1,
96
- class: "-ml-1/2 h-2.5 w-2.5",
105
+ class: "-ml-0.25 size-2.5",
97
106
  icon: "Globe"
98
107
  })),
99
- k(" " + g(e.key), 1)
108
+ g(" " + V(t.key), 1)
100
109
  ]),
101
- c("span", H, g(e.value), 1)
102
- ], 10, Q))), 128))
103
- ])) : l(f) ? (r(), v(l(F), {
110
+ c("span", X, V(t.value), 1)
111
+ ], 10, J))), 128))
112
+ ])) : s(f) ? (r(), h(s(G), {
104
113
  key: 1,
105
- class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
114
+ class: "font-code text-xxs bg-b-inherit hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
106
115
  variant: "outlined",
107
- onClick: A
116
+ onClick: N
108
117
  }, {
109
- default: y(() => [
110
- q(l(V), {
111
- icon: "Add",
112
- size: "sm"
113
- }),
114
- o[0] || (o[0] = k(" Add Variable "))
118
+ default: k(() => [
119
+ q(s(O), { class: "size-3" }),
120
+ o[0] || (o[0] = g(" Add Variable "))
115
121
  ]),
116
122
  _: 1,
117
123
  __: [0]
118
- })) : x("", !0),
124
+ })) : y("", !0),
119
125
  o[1] || (o[1] = c("div", { class: "bg-b-1 brightness-lifted absolute inset-0 -z-1 rounded shadow-lg" }, null, -1))
120
126
  ], 4)
121
127
  ]),
122
128
  _: 1
123
- })) : x("", !0);
129
+ })) : y("", !0);
124
130
  }
125
131
  });
126
132
  export {
127
- ne as default
133
+ de as default
128
134
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAQjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAqSF,wBAOG"}
1
+ {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AA0IA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAQjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAkUF,wBAOG"}
@@ -1,85 +1,106 @@
1
- import { defineComponent as _, computed as y, createBlock as h, openBlock as u, unref as o, withCtx as c, createElementVNode as a, createVNode as i, normalizeClass as j, toDisplayString as m, createCommentVNode as k, withModifiers as N, createTextVNode as C, createElementBlock as V, Fragment as z, renderList as A } from "vue";
2
- import { Disclosure as T, DisclosureButton as E, DisclosurePanel as F } from "@headlessui/vue";
3
- import { ScalarButton as I, ScalarIcon as R } from "@scalar/components";
4
- import D from "../../../../components/DataTable/DataTableCell.vue.js";
5
- import L from "../../../../components/DataTable/DataTableRow.vue.js";
6
- import M from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
- const P = { class: "flex h-fit w-full" }, U = { class: "flex-1" }, q = { class: "flex items-center gap-1.75" }, G = {
1
+ import { defineComponent as B, computed as S, createBlock as m, openBlock as a, unref as o, withCtx as c, createElementVNode as i, createVNode as r, normalizeClass as O, toDisplayString as p, createCommentVNode as w, withModifiers as y, createTextVNode as x, createElementBlock as k, Fragment as j, renderList as z } from "vue";
2
+ import { Disclosure as N, DisclosureButton as T, DisclosurePanel as E } from "@headlessui/vue";
3
+ import { ScalarButton as C, ScalarIcon as F } from "@scalar/components";
4
+ import b from "../../../../components/DataTable/DataTableCell.vue.js";
5
+ import I from "../../../../components/DataTable/DataTableRow.vue.js";
6
+ import R from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
+ const L = { class: "flex h-fit w-full" }, M = { class: "flex-1" }, P = { class: "flex items-center gap-1.75" }, U = {
8
8
  class: "grid auto-rows-auto",
9
9
  style: { gridTemplateColumns: "1fr auto" }
10
- }, H = { key: 0 }, J = { class: "font-code text-xs" }, ee = /* @__PURE__ */ _({
10
+ }, _ = { key: 0 }, q = { class: "font-code text-xs" }, X = /* @__PURE__ */ B({
11
11
  __name: "OAuthScopesInput",
12
12
  props: {
13
13
  flow: {},
14
14
  updateScheme: { type: Function }
15
15
  },
16
- setup(t) {
17
- const $ = y(
16
+ setup(l) {
17
+ const D = S(
18
18
  () => {
19
19
  var e;
20
- return Object.entries(((e = t.flow) == null ? void 0 : e.scopes) ?? {}).map(([l, n]) => ({
21
- id: l,
22
- label: l,
23
- description: n
20
+ return Object.entries(((e = l.flow) == null ? void 0 : e.scopes) ?? {}).map(([t, s]) => ({
21
+ id: t,
22
+ label: t,
23
+ description: s
24
24
  }));
25
25
  }
26
- ), d = y(() => {
26
+ ), d = S(() => {
27
27
  var e;
28
- return ((e = t.flow) == null ? void 0 : e.selectedScopes) || [];
28
+ return ((e = l.flow) == null ? void 0 : e.selectedScopes) || [];
29
29
  });
30
- function B(e, l) {
31
- l ? t.updateScheme(`flows.${t.flow.type}.selectedScopes`, [
30
+ function V(e, t) {
31
+ t ? l.updateScheme(`flows.${l.flow.type}.selectedScopes`, [
32
32
  ...d.value,
33
33
  e
34
- ]) : t.updateScheme(
35
- `flows.${t.flow.type}.selectedScopes`,
36
- d.value.filter((n) => n !== e)
34
+ ]) : l.updateScheme(
35
+ `flows.${l.flow.type}.selectedScopes`,
36
+ d.value.filter((s) => s !== e)
37
37
  );
38
38
  }
39
- function O() {
39
+ const v = S(
40
+ () => {
41
+ var e, t, s;
42
+ return ((t = (e = l.flow) == null ? void 0 : e.selectedScopes) == null ? void 0 : t.length) === Object.keys(((s = l.flow) == null ? void 0 : s.scopes) ?? {}).length;
43
+ }
44
+ ), $ = () => {
40
45
  var e;
41
- t.updateScheme(
42
- `flows.${t.flow.type}.selectedScopes`,
43
- Object.keys(((e = t.flow) == null ? void 0 : e.scopes) ?? {})
46
+ l.updateScheme(
47
+ `flows.${l.flow.type}.selectedScopes`,
48
+ Object.keys(((e = l.flow) == null ? void 0 : e.scopes) ?? {})
44
49
  );
45
- }
46
- return (e, l) => (u(), h(o(D), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
50
+ }, A = () => {
51
+ l.updateScheme(`flows.${l.flow.type}.selectedScopes`, []);
52
+ };
53
+ return (e, t) => (a(), m(o(b), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
47
54
  default: c(() => [
48
- a("div", P, [
49
- l[1] || (l[1] = a("div", { class: "text-c-1 h-full items-center" }, null, -1)),
50
- i(o(T), {
55
+ i("div", L, [
56
+ t[2] || (t[2] = i("div", { class: "text-c-1 h-full items-center" }, null, -1)),
57
+ r(o(N), {
51
58
  as: "div",
52
59
  class: "bl flex w-full flex-col"
53
60
  }, {
54
61
  default: c(() => {
55
- var n, w;
62
+ var s, g;
56
63
  return [
57
- i(o(E), {
58
- class: j([
64
+ r(o(T), {
65
+ class: O([
59
66
  "group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left",
60
- (((w = (n = e.flow) == null ? void 0 : n.selectedScopes) == null ? void 0 : w.length) || 0) > 0 ? "text-c-1" : "text-c-3"
67
+ (((g = (s = e.flow) == null ? void 0 : s.selectedScopes) == null ? void 0 : g.length) || 0) > 0 ? "text-c-1" : "text-c-3"
61
68
  ])
62
69
  }, {
63
- default: c(({ open: s }) => {
64
- var f, r, p, x, S, v, g, b;
70
+ default: c(({ open: n }) => {
71
+ var f, u, h;
65
72
  return [
66
- a("div", U, " Scopes Selected " + m(((r = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : r.length) || 0) + " / " + m(Object.keys(((p = e.flow) == null ? void 0 : p.scopes) ?? {}).length || 0), 1),
67
- a("div", q, [
68
- ((S = (x = e.flow) == null ? void 0 : x.selectedScopes) == null ? void 0 : S.length) > 4 && s && ((g = (v = e.flow) == null ? void 0 : v.selectedScopes) == null ? void 0 : g.length) < Object.keys(((b = e.flow) == null ? void 0 : b.scopes) ?? {}).length ? (u(), h(o(I), {
73
+ i("div", M, " Scopes Selected " + p(((u = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : u.length) || 0) + " / " + p(Object.keys(((h = e.flow) == null ? void 0 : h.scopes) ?? {}).length || 0), 1),
74
+ i("div", P, [
75
+ v.value ? (a(), m(o(C), {
69
76
  key: 0,
70
- class: "text-c-3 hover:bg-b-2 hover:text-c-1 rounded px-1.5",
77
+ class: "pr-0.75 pl-1 transition-none",
71
78
  size: "sm",
72
- onClick: N(O, ["stop"])
79
+ variant: "ghost",
80
+ onClick: y(A, ["stop"])
73
81
  }, {
74
- default: c(() => l[0] || (l[0] = [
75
- C(" Select All ")
82
+ default: c(() => t[0] || (t[0] = [
83
+ x(" Deselect All ")
76
84
  ])),
77
85
  _: 1,
78
86
  __: [0]
79
- })) : k("", !0),
80
- i(o(R), {
87
+ })) : w("", !0),
88
+ v.value ? w("", !0) : (a(), m(o(C), {
89
+ key: 1,
90
+ class: "pr-0.75 pl-1 transition-none",
91
+ size: "sm",
92
+ variant: "ghost",
93
+ onClick: y($, ["stop"])
94
+ }, {
95
+ default: c(() => t[1] || (t[1] = [
96
+ x(" Select All ")
97
+ ])),
98
+ _: 1,
99
+ __: [1]
100
+ })),
101
+ r(o(F), {
81
102
  class: "text-c-3 group-hover/scopes-accordion:text-c-2",
82
- icon: s ? "ChevronDown" : "ChevronRight",
103
+ icon: n ? "ChevronDown" : "ChevronRight",
83
104
  size: "md"
84
105
  }, null, 8, ["icon"])
85
106
  ])
@@ -87,26 +108,26 @@ const P = { class: "flex h-fit w-full" }, U = { class: "flex-1" }, q = { class:
87
108
  }),
88
109
  _: 1
89
110
  }, 8, ["class"]),
90
- i(o(F), { as: "template" }, {
111
+ r(o(E), { as: "template" }, {
91
112
  default: c(() => [
92
- a("table", G, [
93
- (u(!0), V(z, null, A($.value, ({ id: s, label: f, description: r }) => (u(), h(o(L), {
94
- key: s,
113
+ i("table", U, [
114
+ (a(!0), k(j, null, z(D.value, ({ id: n, label: f, description: u }) => (a(), m(o(I), {
115
+ key: n,
95
116
  class: "text-c-2",
96
- onClick: (p) => B(s, !d.value.includes(s))
117
+ onClick: (h) => V(n, !d.value.includes(n))
97
118
  }, {
98
119
  default: c(() => [
99
- i(o(D), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
120
+ r(o(b), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
100
121
  default: c(() => [
101
- r ? (u(), V("div", H, [
102
- a("span", J, m(f), 1),
103
- C(" – " + m(r), 1)
104
- ])) : k("", !0)
122
+ u ? (a(), k("div", _, [
123
+ i("span", q, p(f), 1),
124
+ x(" – " + p(u), 1)
125
+ ])) : w("", !0)
105
126
  ]),
106
127
  _: 2
107
128
  }, 1024),
108
- i(o(M), {
109
- modelValue: d.value.includes(s),
129
+ r(o(R), {
130
+ modelValue: d.value.includes(n),
110
131
  "onUpdate:modelValue": () => {
111
132
  }
112
133
  }, null, 8, ["modelValue"])
@@ -128,5 +149,5 @@ const P = { class: "flex h-fit w-full" }, U = { class: "flex-1" }, q = { class:
128
149
  }
129
150
  });
130
151
  export {
131
- ee as default
152
+ X as default
132
153
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"AAyTA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAOrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAY1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAmgBF,wBAMG"}
1
+ {"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"AAyTA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAOrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAY1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAmfF,wBAMG"}