@scalar/api-client 2.0.29 → 2.0.31
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 +19 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +23 -23
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +2 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +63 -48
- package/dist/components/CodeInput/codeDropdownWidget.d.ts +9 -1
- package/dist/components/CodeInput/codeDropdownWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeDropdownWidget.js +62 -51
- package/dist/components/CodeInput/codeVariableWidget.d.ts +10 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +63 -56
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +1 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +1 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +5 -5
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +5 -43
- package/dist/components/SideNav/SideNav.vue2.js +44 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -0
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +29 -20
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +65 -34
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -11
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +9 -9
- package/dist/layouts/App/create-api-client-app.d.ts +2966 -0
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -0
- package/dist/layouts/App/create-api-client-app.js +18 -0
- package/dist/layouts/App/index.d.ts +1 -1
- package/dist/layouts/App/index.d.ts.map +1 -1
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -17
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +20 -24
- package/dist/layouts/Modal/api-client-modal.d.ts +5905 -57
- package/dist/layouts/Modal/api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/api-client-modal.js +27 -129
- package/dist/libs/create-client.d.ts +3025 -0
- package/dist/libs/create-client.d.ts.map +1 -0
- package/dist/libs/create-client.js +147 -0
- package/dist/libs/index.d.ts +1 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +11 -9
- package/dist/router.d.ts +7 -17
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +28 -40
- package/dist/store/index.d.ts +2 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +5 -0
- package/dist/store/workspace.d.ts +3028 -603
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +454 -432
- package/dist/style.css +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +8 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +32 -31
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +11 -11
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +13 -13
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +24 -23
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +26 -20
- package/package.json +11 -7
- package/dist/layouts/App/createApiClientApp.d.ts +0 -16
- package/dist/layouts/App/createApiClientApp.d.ts.map +0 -1
- package/dist/layouts/App/createApiClientApp.js +0 -62
- package/dist/store/topNav.d.ts +0 -445
- package/dist/store/topNav.d.ts.map +0 -1
- package/dist/store/topNav.js +0 -53
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { useRouter as j } from "vue-router";
|
|
6
|
-
const q = {
|
|
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 = {
|
|
7
5
|
id: "env-dialog",
|
|
8
6
|
class: "z-10 w-60 rounded border bg-b-1 p-1",
|
|
9
7
|
open: !0,
|
|
10
8
|
tabindex: "0"
|
|
11
|
-
},
|
|
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({
|
|
12
10
|
__name: "EnvironmentVariableDropdown",
|
|
13
11
|
props: {
|
|
14
|
-
query: {}
|
|
12
|
+
query: {},
|
|
13
|
+
activeParsedEnvironments: {},
|
|
14
|
+
environments: {},
|
|
15
|
+
router: {}
|
|
15
16
|
},
|
|
16
17
|
emits: ["select"],
|
|
17
18
|
setup(d, { emit: p }) {
|
|
18
|
-
const
|
|
19
|
+
const n = d, v = p, { push: m } = n.router, f = new I(n.activeParsedEnvironments.value, {
|
|
19
20
|
keys: ["key", "value"]
|
|
20
|
-
}),
|
|
21
|
-
const e =
|
|
21
|
+
}), l = b(() => {
|
|
22
|
+
const e = n.query;
|
|
22
23
|
if (!e)
|
|
23
|
-
return
|
|
24
|
-
const r =
|
|
24
|
+
return n.activeParsedEnvironments.value.slice(-4);
|
|
25
|
+
const r = f.search(e);
|
|
25
26
|
return r.length > 0 ? r.map((t) => t.item) : [];
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
return (e, r) => (
|
|
30
|
-
|
|
31
|
-
(
|
|
32
|
-
key:
|
|
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: _,
|
|
33
34
|
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",
|
|
34
|
-
onClick: (
|
|
35
|
+
onClick: (q) => g(t.key)
|
|
35
36
|
}, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class:
|
|
37
|
+
a("div", $, [
|
|
38
|
+
a("span", {
|
|
39
|
+
class: w(["h-2.5 w-2.5 min-w-2.5 rounded-full", h(t)])
|
|
39
40
|
}, null, 2),
|
|
40
41
|
c(" " + u(t.key), 1)
|
|
41
42
|
]),
|
|
42
|
-
|
|
43
|
-
], 8,
|
|
44
|
-
])) : (
|
|
43
|
+
a("span", j, u(t.value), 1)
|
|
44
|
+
], 8, S))), 128))
|
|
45
|
+
])) : (o(), E(i(B), {
|
|
45
46
|
key: 1,
|
|
46
47
|
class: "font-code text-3xs hover:bg-b-2 flex h-7 w-full justify-start gap-2 px-2 transition-colors duration-150",
|
|
47
48
|
variant: "secondary",
|
|
48
|
-
onClick: r[0] || (r[0] = (t) =>
|
|
49
|
+
onClick: r[0] || (r[0] = (t) => i(m)("/environment"))
|
|
49
50
|
}, {
|
|
50
|
-
default:
|
|
51
|
-
|
|
51
|
+
default: C(() => [
|
|
52
|
+
V(i(z), {
|
|
52
53
|
class: "w-2",
|
|
53
54
|
icon: "Add",
|
|
54
55
|
size: "xs"
|
|
@@ -61,5 +62,5 @@ const q = {
|
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
L as default
|
|
65
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AA6gCA,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
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0c56ac02"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -18,11 +18,11 @@ import { useMagicKeys as de, useEventListener as pe } from "@vueuse/core";
|
|
|
18
18
|
import fe from "./RequestSidebarItem.vue.js";
|
|
19
19
|
import ve from "../../components/Sidebar/Sidebar.vue.js";
|
|
20
20
|
/* empty css */
|
|
21
|
-
import
|
|
22
|
-
import { useSidebar as
|
|
21
|
+
import he from "./components/WorkspaceDropdown.vue.js";
|
|
22
|
+
import { useSidebar as ge } from "../../hooks/useSidebar.js";
|
|
23
23
|
import { sendRequest as xe } from "../../libs/sendRequest.js";
|
|
24
24
|
import { executeRequestBus as q } from "../../libs/eventBusses/executeRequestBus.js";
|
|
25
|
-
const be = (
|
|
25
|
+
const be = (g) => (X("data-v-0c56ac02"), g = g(), Y(), g), _e = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, ye = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, we = /* @__PURE__ */ be(() => /* @__PURE__ */ n("div", { class: "text-c-2 text-sm font-medium gitbook-show pl-2" }, [
|
|
26
26
|
/* @__PURE__ */ B(" Powered by "),
|
|
27
27
|
/* @__PURE__ */ n("a", {
|
|
28
28
|
class: "hover:text-c-1",
|
|
@@ -31,7 +31,7 @@ const be = (h) => (X("data-v-945c36e9"), h = h(), Y(), h), _e = { class: "lg:min
|
|
|
31
31
|
}, "Scalar.com")
|
|
32
32
|
], -1)), ke = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, Ke = /* @__PURE__ */ F({
|
|
33
33
|
__name: "Request",
|
|
34
|
-
setup(
|
|
34
|
+
setup(g) {
|
|
35
35
|
var R;
|
|
36
36
|
const {
|
|
37
37
|
activeExample: x,
|
|
@@ -43,8 +43,8 @@ const be = (h) => (X("data-v-945c36e9"), h = h(), Y(), h), _e = { class: "lg:min
|
|
|
43
43
|
requestMutators: $,
|
|
44
44
|
activeWorkspaceCollections: N,
|
|
45
45
|
modalState: U
|
|
46
|
-
} = ne(), { collapsedSidebarFolders: z } =
|
|
47
|
-
var
|
|
46
|
+
} = ne(), { collapsedSidebarFolders: z } = ge(), v = ue(), c = P(!((R = i.value) != null && R.isReadOnly)), C = async () => {
|
|
47
|
+
var h;
|
|
48
48
|
if (!l.value || !x.value) {
|
|
49
49
|
console.warn(
|
|
50
50
|
"There is no request active at the moment. Please select one then try again."
|
|
@@ -71,7 +71,7 @@ const be = (h) => (X("data-v-945c36e9"), h = h(), Y(), h), _e = { class: "lg:min
|
|
|
71
71
|
x.value,
|
|
72
72
|
s,
|
|
73
73
|
M.value,
|
|
74
|
-
(
|
|
74
|
+
(h = i.value) == null ? void 0 : h.proxyUrl
|
|
75
75
|
);
|
|
76
76
|
a && u ? $.edit(l.value.uid, "history", [
|
|
77
77
|
...l.value.history,
|
|
@@ -95,7 +95,7 @@ const be = (h) => (X("data-v-945c36e9"), h = h(), Y(), h), _e = { class: "lg:min
|
|
|
95
95
|
};
|
|
96
96
|
return (s, o) => (f(), y(O, null, [
|
|
97
97
|
n("div", {
|
|
98
|
-
class: _(["flex flex-1 flex-col rounded
|
|
98
|
+
class: _(["flex flex-1 flex-col rounded rounded-b-none rounded-r-none pt-0 h-full client-wrapper-bg-color relative", W()])
|
|
99
99
|
}, [
|
|
100
100
|
n("div", _e, [
|
|
101
101
|
n("div", ye, [
|
|
@@ -185,7 +185,7 @@ const be = (h) => (X("data-v-945c36e9"), h = h(), Y(), h), _e = { class: "lg:min
|
|
|
185
185
|
e(i).isReadOnly ? void 0 : {
|
|
186
186
|
name: "header",
|
|
187
187
|
fn: m(() => [
|
|
188
|
-
r(e(
|
|
188
|
+
r(e(he))
|
|
189
189
|
]),
|
|
190
190
|
key: "0"
|
|
191
191
|
}
|
|
@@ -197,11 +197,11 @@ const be = (h) => (X("data-v-945c36e9"), h = h(), Y(), h), _e = { class: "lg:min
|
|
|
197
197
|
class: _(["flex-1", [c.value ? "sidebar-active-hide-layout" : ""]])
|
|
198
198
|
}, {
|
|
199
199
|
default: m(() => {
|
|
200
|
-
var t, a, u,
|
|
200
|
+
var t, a, u, h, d;
|
|
201
201
|
return [
|
|
202
202
|
r(ie),
|
|
203
203
|
r(ce, {
|
|
204
|
-
response: (d = (
|
|
204
|
+
response: (d = (h = (t = e(l)) == null ? void 0 : t.history) == null ? void 0 : h[((u = (a = e(l)) == null ? void 0 : a.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : d.response
|
|
205
205
|
}, null, 8, ["response"])
|
|
206
206
|
];
|
|
207
207
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WA4dS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WA4dS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;AAuzBlB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -82,9 +82,9 @@ const le = {
|
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
84
|
function $() {
|
|
85
|
-
f.value.length === 0 &&
|
|
85
|
+
f.value.length === 0 && w();
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const w = () => {
|
|
88
88
|
if (!p.value || !t.value) return;
|
|
89
89
|
const e = S({
|
|
90
90
|
enabled: !1
|
|
@@ -194,14 +194,14 @@ const le = {
|
|
|
194
194
|
label: a,
|
|
195
195
|
value: e
|
|
196
196
|
})
|
|
197
|
-
),
|
|
197
|
+
), x = _({
|
|
198
198
|
get: () => B.find((e) => e.id === u.value),
|
|
199
199
|
set: (e) => {
|
|
200
200
|
e != null && e.id && (u.value = e.id);
|
|
201
201
|
}
|
|
202
|
-
}),
|
|
203
|
-
return
|
|
204
|
-
|
|
202
|
+
}), g = _(() => t.value ? t.value.body.activeBody === "formData" && t.value.body.formData && t.value.body.formData.value.length > 0 ? "multipartForm" : t.value.body.activeBody === "raw" ? t.value.body.raw.encoding : u.value : "none");
|
|
203
|
+
return g.value !== "none" && (u.value = g.value), N(
|
|
204
|
+
g,
|
|
205
205
|
(e) => {
|
|
206
206
|
e && (u.value = e);
|
|
207
207
|
},
|
|
@@ -227,8 +227,8 @@ const le = {
|
|
|
227
227
|
m(te, { class: "relative col-span-full flex h-8 cursor-pointer items-center px-[2.25px] py-[2.25px]" }, {
|
|
228
228
|
default: d(() => [
|
|
229
229
|
m(c(ne), {
|
|
230
|
-
modelValue:
|
|
231
|
-
"onUpdate:modelValue": a[0] || (a[0] = (o) =>
|
|
230
|
+
modelValue: x.value,
|
|
231
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => x.value = o),
|
|
232
232
|
class: "text-xxs w-full",
|
|
233
233
|
fullWidth: "",
|
|
234
234
|
options: c(B),
|
|
@@ -243,7 +243,7 @@ const le = {
|
|
|
243
243
|
default: d(() => {
|
|
244
244
|
var o;
|
|
245
245
|
return [
|
|
246
|
-
b("span", null, k((o =
|
|
246
|
+
b("span", null, k((o = x.value) == null ? void 0 : o.label), 1),
|
|
247
247
|
m(c(q), {
|
|
248
248
|
icon: "ChevronDown",
|
|
249
249
|
size: "xs",
|
|
@@ -270,7 +270,7 @@ const le = {
|
|
|
270
270
|
(o = c(t)) != null && o.body.binary ? (i(), y(j, { key: 0 }, [
|
|
271
271
|
b("span", me, k((s = c(t)) == null ? void 0 : s.body.binary.name), 1),
|
|
272
272
|
m(c(D), {
|
|
273
|
-
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1",
|
|
273
|
+
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
|
|
274
274
|
size: "sm",
|
|
275
275
|
variant: "outlined",
|
|
276
276
|
onClick: G
|
|
@@ -282,7 +282,7 @@ const le = {
|
|
|
282
282
|
})
|
|
283
283
|
], 64)) : (i(), v(c(D), {
|
|
284
284
|
key: 1,
|
|
285
|
-
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2",
|
|
285
|
+
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
|
|
286
286
|
size: "sm",
|
|
287
287
|
variant: "outlined",
|
|
288
288
|
onClick: K
|
|
@@ -306,7 +306,7 @@ const le = {
|
|
|
306
306
|
columns: ["32px", "", "", "61px"],
|
|
307
307
|
items: f.value,
|
|
308
308
|
showUploadButton: "",
|
|
309
|
-
onAddRow:
|
|
309
|
+
onAddRow: w,
|
|
310
310
|
onDeleteRow: R,
|
|
311
311
|
onRemoveFile: U,
|
|
312
312
|
onUpdateRow: C,
|
|
@@ -319,7 +319,7 @@ const le = {
|
|
|
319
319
|
columns: ["32px", "", "", "61px"],
|
|
320
320
|
items: f.value,
|
|
321
321
|
showUploadButton: "",
|
|
322
|
-
onAddRow:
|
|
322
|
+
onAddRow: w,
|
|
323
323
|
onDeleteRow: R,
|
|
324
324
|
onRemoveFile: U,
|
|
325
325
|
onUpdateRow: C,
|
|
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
8
8
|
isEnabledHidden: boolean;
|
|
9
9
|
showUploadButton: boolean;
|
|
10
10
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
updateRow: (idx: number, field: "
|
|
11
|
+
updateRow: (idx: number, field: "value" | "key", value: string) => void;
|
|
12
12
|
toggleRow: (idx: number, enabled: boolean) => void;
|
|
13
13
|
addRow: () => void;
|
|
14
14
|
deleteRow: () => void;
|
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
27
27
|
}>>> & {
|
|
28
28
|
onInputFocus?: (() => any) | undefined;
|
|
29
29
|
onInputBlur?: (() => any) | undefined;
|
|
30
|
-
onUpdateRow?: ((idx: number, field: "
|
|
30
|
+
onUpdateRow?: ((idx: number, field: "value" | "key", value: string) => any) | undefined;
|
|
31
31
|
onToggleRow?: ((idx: number, enabled: boolean) => any) | undefined;
|
|
32
32
|
onAddRow?: (() => any) | undefined;
|
|
33
33
|
onDeleteRow?: (() => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAmMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAmMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AA4c9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestTable.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-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2b656c55"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -6,7 +6,7 @@ import q from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
|
6
6
|
import D from "../../../components/DataTable/DataTableRow.vue.js";
|
|
7
7
|
import { ScalarButton as H, ScalarIcon as z } from "@scalar/components";
|
|
8
8
|
import A from "./RequestTableTooltip.vue.js";
|
|
9
|
-
const M = (s) => (E("data-v-
|
|
9
|
+
const M = (s) => (E("data-v-2b656c55"), s = s(), T(), s), O = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, j = ["onClick"], K = /* @__PURE__ */ M(() => /* @__PURE__ */ p("span", null, "File", -1)), Z = /* @__PURE__ */ F({
|
|
10
10
|
__name: "RequestTable",
|
|
11
11
|
props: {
|
|
12
12
|
items: {},
|
|
@@ -115,7 +115,7 @@ const M = (s) => (E("data-v-92212893"), s = s(), T(), s), O = { class: "text-c-2
|
|
|
115
115
|
}, " Delete ", 8, j)
|
|
116
116
|
], 64)) : (u(), r(m(H), {
|
|
117
117
|
key: 1,
|
|
118
|
-
class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2",
|
|
118
|
+
class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2 shadow-none",
|
|
119
119
|
size: "sm",
|
|
120
120
|
variant: "outlined",
|
|
121
121
|
onClick: (S) => _(a)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA2PA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAA;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;AA0HlD,iBAAS,cAAc;gBAvFT,IAAI;;gBAAJ,IAAI;EAmXjB;AACD,QAAA,MAAM,eAAe;IA9YjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;IAdpD;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;iBATtC,OAAO;iBAMP,OAAO;MA0YvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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"}
|
|
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
5
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f2df081d"]]);
|
|
6
6
|
export {
|
|
7
7
|
p as default
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as j, useCssVars as F, computed as o, resolveComponent as L, openBlock as a, createElementBlock as d, normalizeClass as u, unref as i, createVNode as m, withCtx as D, createBlock as p, createElementVNode as n, toDisplayString as y, createCommentVNode as f, createTextVNode as k, renderSlot as P, withDirectives as T, Fragment as W, renderList as A, vShow as _ } from "vue";
|
|
2
|
+
import { PathId as G } from "../../router.js";
|
|
3
3
|
import { useWorkspace as H } from "../../store/workspace.js";
|
|
4
4
|
import { ScalarIcon as J } from "@scalar/components";
|
|
5
5
|
import { Draggable as K } from "@scalar/draggable";
|
|
@@ -7,7 +7,7 @@ import { RouterLink as M } from "vue-router";
|
|
|
7
7
|
import Q from "./RequestSidebarItemMenu.vue.js";
|
|
8
8
|
import X from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
9
9
|
import { useSidebar as Y } from "../../hooks/useSidebar.js";
|
|
10
|
-
const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" }, ee = { class: "relative" }, te = { class: "flex" }, ie = { class: "z-10 flex h-fit items-center justify-center max-w-[14px]" }, se = { class: "z-10 font-medium" }, re = { key: 2 }, q = "hover:bg-sidebar-active-b indent-padding-left", be = /* @__PURE__ */
|
|
10
|
+
const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" }, ee = { class: "relative" }, te = { class: "flex" }, ie = { class: "z-10 flex h-fit items-center justify-center max-w-[14px]" }, se = { class: "z-10 font-medium" }, re = { key: 2 }, q = "hover:bg-sidebar-active-b indent-padding-left", be = /* @__PURE__ */ j({
|
|
11
11
|
__name: "RequestSidebarItem",
|
|
12
12
|
props: {
|
|
13
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -17,30 +17,31 @@ const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
17
17
|
},
|
|
18
18
|
emits: ["onDragEnd"],
|
|
19
19
|
setup($) {
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
20
|
+
F((e) => ({
|
|
21
|
+
"1fe07419": R.value,
|
|
22
|
+
"096d41f6": E.value
|
|
23
23
|
}));
|
|
24
24
|
const t = $, {
|
|
25
25
|
activeRequest: b,
|
|
26
|
+
activeRouterParams: w,
|
|
26
27
|
activeWorkspace: c,
|
|
27
|
-
folders:
|
|
28
|
+
folders: x,
|
|
28
29
|
isReadOnly: l,
|
|
29
30
|
requests: g,
|
|
30
|
-
requestExamples:
|
|
31
|
-
} = H(), { collapsedSidebarFolders: h, toggleSidebarFolder:
|
|
31
|
+
requestExamples: C
|
|
32
|
+
} = H(), { collapsedSidebarFolders: h, toggleSidebarFolder: S } = Y(), v = o(() => "childUids" in t.item), R = o(() => t.parentUids.length ? l.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), E = o(() => t.parentUids.length ? l.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), U = (e) => {
|
|
32
33
|
var s;
|
|
33
34
|
return "spec" in e ? (s = e.spec.info) == null ? void 0 : s.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
|
|
34
|
-
},
|
|
35
|
+
}, I = o(() => ("requestUid" in t.item ? g[t.item.requestUid] : t.item).method), z = o(
|
|
35
36
|
() => {
|
|
36
37
|
var e;
|
|
37
38
|
return h[t.item.uid] || ((e = b.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
|
|
38
39
|
}
|
|
39
|
-
),
|
|
40
|
-
() =>
|
|
40
|
+
), B = () => "requestUid" in t.item ? `/workspace/${c.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${c.value.uid}/request/${t.item.uid}`, O = o(
|
|
41
|
+
() => w.value[G.Request] === "default" && b.value.uid === t.item.uid
|
|
41
42
|
);
|
|
42
43
|
return (e, s) => {
|
|
43
|
-
const
|
|
44
|
+
const V = L("RequestSidebarItem", !0);
|
|
44
45
|
return a(), d("div", {
|
|
45
46
|
class: u(["relative flex flex-row", [
|
|
46
47
|
i(l) && e.parentUids.length > 1 || !i(l) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-px mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
@@ -60,13 +61,13 @@ const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
60
61
|
"summary" in e.item || "requestUid" in e.item ? (a(), p(i(M), {
|
|
61
62
|
key: 0,
|
|
62
63
|
class: "no-underline",
|
|
63
|
-
to:
|
|
64
|
+
to: B()
|
|
64
65
|
}, {
|
|
65
66
|
default: D(({ isExactActive: r }) => [
|
|
66
67
|
n("div", {
|
|
67
68
|
class: u(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover", [
|
|
68
69
|
q,
|
|
69
|
-
r ||
|
|
70
|
+
r || O.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
70
71
|
]]),
|
|
71
72
|
tabindex: "0"
|
|
72
73
|
}, [
|
|
@@ -80,7 +81,7 @@ const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
80
81
|
k(" "),
|
|
81
82
|
m(i(X), {
|
|
82
83
|
class: "font-bold",
|
|
83
|
-
method:
|
|
84
|
+
method: I.value
|
|
84
85
|
}, null, 8, ["method"])
|
|
85
86
|
])
|
|
86
87
|
])
|
|
@@ -91,10 +92,10 @@ const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
91
92
|
key: 1,
|
|
92
93
|
class: u(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", q]),
|
|
93
94
|
type: "button",
|
|
94
|
-
onClick: s[0] || (s[0] = (r) => i(
|
|
95
|
+
onClick: s[0] || (s[0] = (r) => i(S)(e.item.uid))
|
|
95
96
|
}, [
|
|
96
97
|
n("span", ie, [
|
|
97
|
-
|
|
98
|
+
P(e.$slots, "leftIcon", {}, () => [
|
|
98
99
|
n("div", {
|
|
99
100
|
class: u({
|
|
100
101
|
"rotate-90": i(h)[e.item.uid]
|
|
@@ -112,17 +113,17 @@ const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
112
113
|
]),
|
|
113
114
|
n("span", se, y(U(e.item)), 1)
|
|
114
115
|
])) : f("", !0),
|
|
115
|
-
"childUids" in e.item ?
|
|
116
|
-
(a(!0), d(
|
|
116
|
+
"childUids" in e.item ? T((a(), d("div", re, [
|
|
117
|
+
(a(!0), d(W, null, A("summary" in e.item ? e.item.childUids.slice(1) : e.item.childUids, (r) => (a(), p(V, {
|
|
117
118
|
key: r,
|
|
118
119
|
isDraggable: e.isDraggable,
|
|
119
120
|
isDroppable: e.isDroppable,
|
|
120
|
-
item: i(
|
|
121
|
+
item: i(x)[r] || i(g)[r] || i(C)[r],
|
|
121
122
|
parentUids: [...e.parentUids, e.item.uid],
|
|
122
|
-
onOnDragEnd: s[1] || (s[1] = (...
|
|
123
|
+
onOnDragEnd: s[1] || (s[1] = (...N) => e.$emit("onDragEnd", ...N))
|
|
123
124
|
}, null, 8, ["isDraggable", "isDroppable", "item", "parentUids"]))), 128))
|
|
124
125
|
], 512)), [
|
|
125
|
-
[
|
|
126
|
+
[_, z.value]
|
|
126
127
|
]) : f("", !0)
|
|
127
128
|
]),
|
|
128
129
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;;UAO1C,OAAO,GAAG,cAAc;;UAAxB,OAAO,GAAG,cAAc;;AA2VhC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { commandPaletteBus as
|
|
3
|
-
import {
|
|
4
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as E, computed as R, openBlock as u, createBlock as d, unref as e, withCtx as l, createVNode as t, createCommentVNode as z, createElementVNode as n } from "vue";
|
|
2
|
+
import { commandPaletteBus as C } from "../../libs/eventBusses/command-palette.js";
|
|
3
|
+
import { PathId as p } from "../../router.js";
|
|
4
|
+
import { useWorkspace as I } from "../../store/workspace.js";
|
|
5
5
|
import { ScalarDropdown as w, ScalarDropdownItem as o, ScalarIcon as s, ScalarDropdownDivider as S, ScalarButton as b } from "@scalar/components";
|
|
6
6
|
import { useRouter as A } from "vue-router";
|
|
7
|
-
const B = /* @__PURE__ */ n("span", null, "Add Example", -1), N = /* @__PURE__ */ n("span", null, "Rename", -1), M = /* @__PURE__ */ n("span", null, "Duplicate", -1), P = /* @__PURE__ */ n("span", null, "Delete", -1), j = /* @__PURE__ */
|
|
7
|
+
const B = /* @__PURE__ */ n("span", null, "Add Example", -1), N = /* @__PURE__ */ n("span", null, "Rename", -1), M = /* @__PURE__ */ n("span", null, "Duplicate", -1), P = /* @__PURE__ */ n("span", null, "Delete", -1), j = /* @__PURE__ */ E({
|
|
8
8
|
__name: "RequestSidebarItemMenu",
|
|
9
9
|
props: {
|
|
10
10
|
item: {}
|
|
11
11
|
},
|
|
12
12
|
setup(f) {
|
|
13
|
-
const a = f, {
|
|
13
|
+
const a = f, {
|
|
14
|
+
activeWorkspace: c,
|
|
15
|
+
activeRouterParams: r,
|
|
16
|
+
findRequestFolders: _,
|
|
17
|
+
requestMutators: x,
|
|
18
|
+
requestExampleMutators: h
|
|
19
|
+
} = I(), { replace: m } = A(), k = () => C.emit({
|
|
14
20
|
commandName: "Add Example",
|
|
15
21
|
metaData: a.item.uid
|
|
16
|
-
}),
|
|
22
|
+
}), v = () => {
|
|
17
23
|
console.log("rename");
|
|
18
|
-
}, v = () => {
|
|
19
|
-
console.log("duplicate");
|
|
20
24
|
}, g = () => {
|
|
25
|
+
console.log("duplicate");
|
|
26
|
+
}, D = () => {
|
|
21
27
|
if ("requestUid" in a.item)
|
|
22
|
-
|
|
28
|
+
h.delete(a.item), r.value[p.Examples] === a.item.uid && m(`/workspace/${c.value}/request/default`);
|
|
23
29
|
else {
|
|
24
|
-
const i =
|
|
30
|
+
const i = _(a.item.uid);
|
|
25
31
|
if (!i.length) return;
|
|
26
|
-
|
|
32
|
+
x.delete(a.item, i[0]), r.value[p.Request] === a.item.uid && m(`/workspace/${c.value.uid}/request/default`);
|
|
27
33
|
}
|
|
28
|
-
},
|
|
29
|
-
return (i, V) => (
|
|
34
|
+
}, q = R(() => "summary" in a.item);
|
|
35
|
+
return (i, V) => (u(), d(e(w), { teleport: "#scalar-client" }, {
|
|
30
36
|
items: l(() => [
|
|
31
|
-
|
|
37
|
+
q.value ? (u(), d(e(o), {
|
|
32
38
|
key: 0,
|
|
33
39
|
class: "flex !gap-2",
|
|
34
|
-
onClick:
|
|
40
|
+
onClick: k
|
|
35
41
|
}, {
|
|
36
42
|
default: l(() => [
|
|
37
43
|
t(e(s), {
|
|
@@ -42,10 +48,10 @@ const B = /* @__PURE__ */ n("span", null, "Add Example", -1), N = /* @__PURE__ *
|
|
|
42
48
|
B
|
|
43
49
|
]),
|
|
44
50
|
_: 1
|
|
45
|
-
})) :
|
|
51
|
+
})) : z("", !0),
|
|
46
52
|
t(e(o), {
|
|
47
53
|
class: "flex !gap-2",
|
|
48
|
-
onClick:
|
|
54
|
+
onClick: v
|
|
49
55
|
}, {
|
|
50
56
|
default: l(() => [
|
|
51
57
|
t(e(s), {
|
|
@@ -59,7 +65,7 @@ const B = /* @__PURE__ */ n("span", null, "Add Example", -1), N = /* @__PURE__ *
|
|
|
59
65
|
}),
|
|
60
66
|
t(e(o), {
|
|
61
67
|
class: "flex !gap-2",
|
|
62
|
-
onClick:
|
|
68
|
+
onClick: g
|
|
63
69
|
}, {
|
|
64
70
|
default: l(() => [
|
|
65
71
|
t(e(s), {
|
|
@@ -74,7 +80,7 @@ const B = /* @__PURE__ */ n("span", null, "Add Example", -1), N = /* @__PURE__ *
|
|
|
74
80
|
t(e(S)),
|
|
75
81
|
t(e(o), {
|
|
76
82
|
class: "flex !gap-2",
|
|
77
|
-
onClick:
|
|
83
|
+
onClick: D
|
|
78
84
|
}, {
|
|
79
85
|
default: l(() => [
|
|
80
86
|
t(e(s), {
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.31",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
"import": "./dist/views/Request/components/index.js",
|
|
38
38
|
"types": "./dist/views/Request/components/index.d.ts"
|
|
39
39
|
},
|
|
40
|
+
"./store": {
|
|
41
|
+
"import": "./dist/store/index.js",
|
|
42
|
+
"types": "./dist/store/index.d.ts"
|
|
43
|
+
},
|
|
40
44
|
"./libs": {
|
|
41
45
|
"import": "./dist/libs/index.js",
|
|
42
46
|
"types": "./dist/libs/index.d.ts"
|
|
@@ -118,14 +122,14 @@
|
|
|
118
122
|
"vue": "^3.4.29",
|
|
119
123
|
"vue-router": "^4.3.0",
|
|
120
124
|
"zod": "^3.22.4",
|
|
121
|
-
"@scalar/components": "0.12.
|
|
122
|
-
"@scalar/oas-utils": "0.2.
|
|
123
|
-
"@scalar/object-utils": "1.1.
|
|
124
|
-
"@scalar/
|
|
125
|
-
"@scalar/
|
|
125
|
+
"@scalar/components": "0.12.19",
|
|
126
|
+
"@scalar/oas-utils": "0.2.17",
|
|
127
|
+
"@scalar/object-utils": "1.1.5",
|
|
128
|
+
"@scalar/themes": "0.9.16",
|
|
129
|
+
"@scalar/use-toasts": "0.7.4",
|
|
126
130
|
"@scalar/use-codemirror": "0.11.8",
|
|
127
131
|
"@scalar/use-tooltip": "1.0.2",
|
|
128
|
-
"@scalar/
|
|
132
|
+
"@scalar/draggable": "0.1.3"
|
|
129
133
|
},
|
|
130
134
|
"devDependencies": {
|
|
131
135
|
"@types/content-type": "^1.1.8",
|