@scalar/api-client 2.5.22 → 2.5.24
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.
- package/CHANGELOG.md +67 -0
- package/README.md +2 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -3
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +86 -106
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +55 -87
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EmptyState.vue2.js +12 -12
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +11 -12
- package/dist/components/TopNav/TopNav.vue.js +50 -51
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue2.js +19 -20
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts +50 -50
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +100 -100
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +50 -50
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +50 -50
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.test.d.ts +5 -5
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +5 -5
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +50 -50
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/store.d.ts +50 -50
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.js +2 -2
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +14 -15
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +71 -65
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +80 -59
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +52 -52
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +5 -7
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +26 -13
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -37
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +9 -9
- package/package.json +16 -17
- package/dist/components/ScalarHotkey.test.d.ts +0 -2
- package/dist/components/ScalarHotkey.test.d.ts.map +0 -1
- package/dist/components/ScalarHotkey.vue.d.ts +0 -8
- package/dist/components/ScalarHotkey.vue.d.ts.map +0 -1
- package/dist/components/ScalarHotkey.vue.js +0 -44
- 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
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-83bfcc8a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
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":";
|
|
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
|
|
3
|
-
import { LibraryIcon as
|
|
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
|
|
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:
|
|
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
|
-
),
|
|
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,
|
|
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 && !
|
|
146
|
+
}), a && !y[a.uid] && w(a.uid);
|
|
147
147
|
} else
|
|
148
|
-
s.value = "default",
|
|
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) =>
|
|
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 && !
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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":"
|
|
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
|
|
2
|
-
import { ScalarTeleport as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
-
},
|
|
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(
|
|
21
|
-
const
|
|
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:
|
|
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
|
-
|
|
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
|
-
},
|
|
40
|
+
}, P = new M(C(a.envVariables), {
|
|
32
41
|
keys: ["key", "value"]
|
|
33
42
|
}), i = w(() => {
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
return
|
|
37
|
-
const o =
|
|
38
|
-
return o.length > 0 ? o.map((
|
|
39
|
-
}),
|
|
40
|
-
|
|
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
|
-
|
|
43
|
-
handleArrowKey: (
|
|
44
|
-
const o =
|
|
45
|
-
|
|
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 (
|
|
49
|
-
const
|
|
50
|
-
|
|
57
|
+
if (l.value >= 0) {
|
|
58
|
+
const e = i.value[l.value];
|
|
59
|
+
e && b(e.key);
|
|
51
60
|
}
|
|
52
61
|
}
|
|
53
|
-
}),
|
|
54
|
-
|
|
62
|
+
}), R(() => {
|
|
63
|
+
l.value = 0;
|
|
55
64
|
});
|
|
56
|
-
const
|
|
57
|
-
var
|
|
65
|
+
const A = w(() => {
|
|
66
|
+
var e, o;
|
|
58
67
|
return {
|
|
59
|
-
left: (((
|
|
68
|
+
left: (((e = a.dropdownPosition) == null ? void 0 : e.left) ?? 0) + "px",
|
|
60
69
|
// Add a 5px offset from the editor
|
|
61
|
-
top: (((o =
|
|
70
|
+
top: (((o = a.dropdownPosition) == null ? void 0 : o.top) ?? 0) + 5 + "px"
|
|
62
71
|
};
|
|
63
72
|
});
|
|
64
|
-
return
|
|
73
|
+
return L(
|
|
65
74
|
p,
|
|
66
75
|
() => {
|
|
67
76
|
d.value = !1;
|
|
68
77
|
},
|
|
69
78
|
{ ignore: [p] }
|
|
70
|
-
), (
|
|
79
|
+
), (e, o) => d.value ? (r(), h(s(F), {
|
|
71
80
|
key: 0,
|
|
72
81
|
class: "scalar-client"
|
|
73
82
|
}, {
|
|
74
|
-
default:
|
|
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:
|
|
88
|
+
style: x(A.value)
|
|
80
89
|
}, [
|
|
81
|
-
i.value.length ? (r(), u("ul",
|
|
82
|
-
(r(!0), u(
|
|
83
|
-
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":
|
|
85
|
-
onClick: (
|
|
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
|
-
|
|
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:
|
|
92
|
-
backgroundColor:
|
|
100
|
+
style: x({
|
|
101
|
+
backgroundColor: s(W)(e.environment)
|
|
93
102
|
})
|
|
94
|
-
}, null, 4)) : (r(),
|
|
103
|
+
}, null, 4)) : (r(), h(s(K), {
|
|
95
104
|
key: 1,
|
|
96
|
-
class: "-ml-
|
|
105
|
+
class: "-ml-0.25 size-2.5",
|
|
97
106
|
icon: "Globe"
|
|
98
107
|
})),
|
|
99
|
-
|
|
108
|
+
g(" " + V(t.key), 1)
|
|
100
109
|
]),
|
|
101
|
-
c("span",
|
|
102
|
-
], 10,
|
|
103
|
-
])) :
|
|
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:
|
|
116
|
+
onClick: N
|
|
108
117
|
}, {
|
|
109
|
-
default:
|
|
110
|
-
q(
|
|
111
|
-
|
|
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
|
-
})) :
|
|
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
|
-
})) :
|
|
129
|
+
})) : y("", !0);
|
|
124
130
|
}
|
|
125
131
|
});
|
|
126
132
|
export {
|
|
127
|
-
|
|
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":"
|
|
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
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarButton as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
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
|
-
},
|
|
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(
|
|
17
|
-
const
|
|
16
|
+
setup(l) {
|
|
17
|
+
const D = S(
|
|
18
18
|
() => {
|
|
19
19
|
var e;
|
|
20
|
-
return Object.entries(((e =
|
|
21
|
-
id:
|
|
22
|
-
label:
|
|
23
|
-
description:
|
|
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 =
|
|
26
|
+
), d = S(() => {
|
|
27
27
|
var e;
|
|
28
|
-
return ((e =
|
|
28
|
+
return ((e = l.flow) == null ? void 0 : e.selectedScopes) || [];
|
|
29
29
|
});
|
|
30
|
-
function
|
|
31
|
-
|
|
30
|
+
function V(e, t) {
|
|
31
|
+
t ? l.updateScheme(`flows.${l.flow.type}.selectedScopes`, [
|
|
32
32
|
...d.value,
|
|
33
33
|
e
|
|
34
|
-
]) :
|
|
35
|
-
`flows.${
|
|
36
|
-
d.value.filter((
|
|
34
|
+
]) : l.updateScheme(
|
|
35
|
+
`flows.${l.flow.type}.selectedScopes`,
|
|
36
|
+
d.value.filter((s) => s !== e)
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
-
|
|
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
|
-
|
|
42
|
-
`flows.${
|
|
43
|
-
Object.keys(((e =
|
|
46
|
+
l.updateScheme(
|
|
47
|
+
`flows.${l.flow.type}.selectedScopes`,
|
|
48
|
+
Object.keys(((e = l.flow) == null ? void 0 : e.scopes) ?? {})
|
|
44
49
|
);
|
|
45
|
-
}
|
|
46
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
62
|
+
var s, g;
|
|
56
63
|
return [
|
|
57
|
-
|
|
58
|
-
class:
|
|
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
|
-
(((
|
|
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:
|
|
64
|
-
var f,
|
|
70
|
+
default: c(({ open: n }) => {
|
|
71
|
+
var f, u, h;
|
|
65
72
|
return [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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: "
|
|
77
|
+
class: "pr-0.75 pl-1 transition-none",
|
|
71
78
|
size: "sm",
|
|
72
|
-
|
|
79
|
+
variant: "ghost",
|
|
80
|
+
onClick: y(A, ["stop"])
|
|
73
81
|
}, {
|
|
74
|
-
default: c(() =>
|
|
75
|
-
|
|
82
|
+
default: c(() => t[0] || (t[0] = [
|
|
83
|
+
x(" Deselect All ")
|
|
76
84
|
])),
|
|
77
85
|
_: 1,
|
|
78
86
|
__: [0]
|
|
79
|
-
})) :
|
|
80
|
-
|
|
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:
|
|
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
|
-
|
|
111
|
+
r(o(E), { as: "template" }, {
|
|
91
112
|
default: c(() => [
|
|
92
|
-
|
|
93
|
-
(
|
|
94
|
-
key:
|
|
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: (
|
|
117
|
+
onClick: (h) => V(n, !d.value.includes(n))
|
|
97
118
|
}, {
|
|
98
119
|
default: c(() => [
|
|
99
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
])) :
|
|
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
|
-
|
|
109
|
-
modelValue: d.value.includes(
|
|
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
|
-
|
|
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;;
|
|
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"}
|