@scalar/api-client 2.1.4 → 2.1.6
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 +30 -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 +25 -25
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +5 -87
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +87 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +6 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +38 -37
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +6 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +5 -5
- package/dist/hooks/useFileDialog.d.ts +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +2 -313
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +25 -647
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +14 -325
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/errors.d.ts +1 -1
- package/dist/libs/errors.js +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +40 -24
- package/dist/store/collections.d.ts +0 -63
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +0 -13
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/environment.d.ts +0 -7
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +2 -102
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +0 -32
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +0 -55
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/servers.d.ts +0 -8
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +25 -647
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +0 -14
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +0 -19
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +49 -47
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +47 -49
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +50 -50
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +20 -20
- package/package.json +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as te, useCssVars as ie, computed as c, ref as ne, resolveComponent as re, openBlock as
|
|
2
|
-
import { PathId as
|
|
1
|
+
import { defineComponent as te, useCssVars as ie, computed as c, ref as ne, resolveComponent as re, openBlock as p, createElementBlock as k, normalizeClass as m, unref as n, createVNode as h, withCtx as y, createBlock as b, withModifiers as C, createElementVNode as u, toDisplayString as O, createCommentVNode as g, createTextVNode as B, renderSlot as le, Fragment as se, renderList as ae, pushScopeId as oe, popScopeId as ue } from "vue";
|
|
2
|
+
import { PathId as de } from "../../router.js";
|
|
3
3
|
import { ScalarButton as I, ScalarIcon as w } from "@scalar/components";
|
|
4
4
|
import { Draggable as pe } from "@scalar/draggable";
|
|
5
5
|
import { RouterLink as fe } from "vue-router";
|
|
@@ -8,7 +8,7 @@ import { useSidebar as ce } from "../../hooks/useSidebar.js";
|
|
|
8
8
|
import { getModifiers as be } from "../../libs/event-busses/hot-keys-bus.js";
|
|
9
9
|
import { useWorkspace as ge } from "../../store/store.js";
|
|
10
10
|
import { commandPaletteBus as ve } from "../../libs/event-busses/command-palette-bus.js";
|
|
11
|
-
const P = (v) => (oe("data-v-
|
|
11
|
+
const P = (v) => (oe("data-v-4a6dd4d2"), v = v(), ue(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, we = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, Ue = /* @__PURE__ */ P(() => /* @__PURE__ */ u("span", null, " ", -1)), De = { key: 2 }, Ce = /* @__PURE__ */ P(() => /* @__PURE__ */ u("span", null, "Add Request", -1)), j = "hover:bg-sidebar-active-b indent-padding-left", Be = /* @__PURE__ */ te({
|
|
12
12
|
__name: "RequestSidebarItem",
|
|
13
13
|
props: {
|
|
14
14
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -20,26 +20,26 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
20
20
|
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
21
21
|
setup(v, { emit: V }) {
|
|
22
22
|
ie((e) => ({
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"2d4187ae": G.value,
|
|
24
|
+
"33fcdcf5": J.value
|
|
25
25
|
}));
|
|
26
26
|
const r = v, F = V, {
|
|
27
27
|
activeRequest: R,
|
|
28
|
-
activeRouterParams:
|
|
28
|
+
activeRouterParams: Y,
|
|
29
29
|
activeWorkspace: x,
|
|
30
|
-
collections:
|
|
31
|
-
tags:
|
|
32
|
-
isReadOnly:
|
|
30
|
+
collections: q,
|
|
31
|
+
tags: A,
|
|
32
|
+
isReadOnly: f,
|
|
33
33
|
requests: $,
|
|
34
|
-
requestExamples:
|
|
34
|
+
requestExamples: U,
|
|
35
35
|
collectionMutators: T,
|
|
36
36
|
tagMutators: M,
|
|
37
37
|
requestMutators: z,
|
|
38
38
|
requestExampleMutators: E,
|
|
39
39
|
router: L
|
|
40
40
|
} = ge(), { collapsedSidebarFolders: S, toggleSidebarFolder: W } = ce(), i = c(() => {
|
|
41
|
-
var s,
|
|
42
|
-
const e =
|
|
41
|
+
var s, d;
|
|
42
|
+
const e = q[r.uid], t = A[r.uid], l = $[r.uid], a = U[r.uid];
|
|
43
43
|
return e ? {
|
|
44
44
|
title: ((s = e.info) == null ? void 0 : s.title) ?? "Unknown title",
|
|
45
45
|
entity: e,
|
|
@@ -69,16 +69,17 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
69
69
|
} : {
|
|
70
70
|
title: a.name,
|
|
71
71
|
link: `/workspace/${x.value.uid}/request/${a.requestUid}/examples/${a.uid}`,
|
|
72
|
-
method: (
|
|
72
|
+
method: (d = $[a.requestUid]) == null ? void 0 : d.method,
|
|
73
73
|
entity: a,
|
|
74
74
|
resourceTitle: "Example",
|
|
75
|
+
warning: "This cannot be undone. You’re about to delete the example from the request.",
|
|
75
76
|
children: [],
|
|
76
77
|
rename: (o) => E.edit(a.uid, "name", o),
|
|
77
78
|
delete: () => E.delete(a)
|
|
78
79
|
};
|
|
79
80
|
}), H = c(
|
|
80
81
|
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
81
|
-
), G = c(() => r.parentUids.length ?
|
|
82
|
+
), G = c(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "12px"), J = c(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "0px"), K = c(
|
|
82
83
|
() => {
|
|
83
84
|
var e;
|
|
84
85
|
return S[r.uid] || ((e = R.value) == null ? void 0 : e.uid) === r.uid && i.value.entity.examples.length > 1;
|
|
@@ -86,14 +87,14 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
86
87
|
), Q = c(
|
|
87
88
|
() => {
|
|
88
89
|
var e;
|
|
89
|
-
return
|
|
90
|
+
return Y.value[de.Request] === "default" && ((e = R.value) == null ? void 0 : e.uid) === r.uid;
|
|
90
91
|
}
|
|
91
92
|
), D = ne(null), N = c(() => {
|
|
92
93
|
let e = 0.5, t = 0.5;
|
|
93
94
|
if (!D.value) return { ceiling: e, floor: t };
|
|
94
95
|
const { draggingItem: l } = D.value;
|
|
95
|
-
return !
|
|
96
|
-
}), X = (e, t) => !(x.value.isReadOnly ||
|
|
96
|
+
return !q[l == null ? void 0 : l.id] && i.value.entity.type === "collection" ? (e = 1, t = 0) : i.value.entity.type === "tag" && (e = 0.8, t = 0.2), { ceiling: e, floor: t };
|
|
97
|
+
}), X = (e, t) => !(x.value.isReadOnly || U[t.id] || q[e.id]), Z = (e, t) => {
|
|
97
98
|
e && (be(["default"]).some((s) => e[s]) ? F("newTab", t.title || "", t.entity.uid) : t.link && L.push(t.link));
|
|
98
99
|
};
|
|
99
100
|
function _() {
|
|
@@ -107,9 +108,9 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
107
108
|
}
|
|
108
109
|
return (e, t) => {
|
|
109
110
|
const l = re("RequestSidebarItem", !0);
|
|
110
|
-
return
|
|
111
|
+
return p(), k("div", {
|
|
111
112
|
class: m(["relative flex flex-row", [
|
|
112
|
-
n(
|
|
113
|
+
n(f) && e.parentUids.length > 1 || !n(f) && 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-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
113
114
|
]])
|
|
114
115
|
}, [
|
|
115
116
|
h(n(pe), {
|
|
@@ -127,7 +128,7 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
127
128
|
default: y(() => {
|
|
128
129
|
var a;
|
|
129
130
|
return [
|
|
130
|
-
i.value.link ? (
|
|
131
|
+
i.value.link ? (p(), b(n(fe), {
|
|
131
132
|
key: 0,
|
|
132
133
|
class: "no-underline",
|
|
133
134
|
to: i.value.link,
|
|
@@ -137,26 +138,26 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
137
138
|
))
|
|
138
139
|
}, {
|
|
139
140
|
default: y(({ isExactActive: s }) => {
|
|
140
|
-
var
|
|
141
|
+
var d, o;
|
|
141
142
|
return [
|
|
142
|
-
|
|
143
|
+
u("div", {
|
|
143
144
|
class: m(["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 w-full", [
|
|
144
145
|
j,
|
|
145
146
|
s || Q.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
146
147
|
]]),
|
|
147
148
|
tabindex: "0"
|
|
148
149
|
}, [
|
|
149
|
-
|
|
150
|
+
u("span", {
|
|
150
151
|
class: m(["line-clamp-3 z-10 font-medium w-full pl-2 word-break-break-word", {
|
|
151
|
-
"editable-sidebar-hover-item": !n(
|
|
152
|
+
"editable-sidebar-hover-item": !n(f)
|
|
152
153
|
}])
|
|
153
154
|
}, O(i.value.title), 3),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
n(
|
|
155
|
+
u("div", he, [
|
|
156
|
+
u("div", ye, [
|
|
157
|
+
n(f) ? g("", !0) : (p(), b(n(I), {
|
|
157
158
|
key: 0,
|
|
158
159
|
class: m(["px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
159
|
-
flex: ((o = (
|
|
160
|
+
flex: ((o = (d = e.menuItem) == null ? void 0 : d.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
160
161
|
}]),
|
|
161
162
|
size: "sm",
|
|
162
163
|
type: "button",
|
|
@@ -180,9 +181,9 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
180
181
|
_: 1
|
|
181
182
|
}, 8, ["class"]))
|
|
182
183
|
]),
|
|
183
|
-
|
|
184
|
+
u("span", xe, [
|
|
184
185
|
B(" "),
|
|
185
|
-
i.value.method ? (
|
|
186
|
+
i.value.method ? (p(), b(n(me), {
|
|
186
187
|
key: 0,
|
|
187
188
|
class: "font-bold",
|
|
188
189
|
method: i.value.method
|
|
@@ -193,16 +194,15 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
193
194
|
];
|
|
194
195
|
}),
|
|
195
196
|
_: 1
|
|
196
|
-
}, 8, ["to"])) : !n(
|
|
197
|
+
}, 8, ["to"])) : !n(f) || e.parentUids.length ? (p(), k("button", {
|
|
197
198
|
key: 1,
|
|
198
199
|
class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", j]),
|
|
199
|
-
disabled: n(p),
|
|
200
200
|
type: "button",
|
|
201
201
|
onClick: t[3] || (t[3] = (s) => n(W)(i.value.entity.uid))
|
|
202
202
|
}, [
|
|
203
|
-
|
|
203
|
+
u("span", ke, [
|
|
204
204
|
le(e.$slots, "leftIcon", {}, () => [
|
|
205
|
-
|
|
205
|
+
u("div", {
|
|
206
206
|
class: m({
|
|
207
207
|
"rotate-90": n(S)[i.value.entity.uid]
|
|
208
208
|
})
|
|
@@ -217,14 +217,14 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
217
217
|
], !0),
|
|
218
218
|
B(" ")
|
|
219
219
|
]),
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
u("div", we, [
|
|
221
|
+
u("span", {
|
|
222
222
|
class: m(["line-clamp-3 z-10 font-medium text-left w-full word-break-break-word", {
|
|
223
|
-
"editable-sidebar-hover-item": !n(
|
|
223
|
+
"editable-sidebar-hover-item": !n(f)
|
|
224
224
|
}])
|
|
225
225
|
}, O(i.value.title), 3),
|
|
226
|
-
|
|
227
|
-
!n(
|
|
226
|
+
u("div", qe, [
|
|
227
|
+
!n(f) && !H.value ? (p(), b(n(I), {
|
|
228
228
|
key: 0,
|
|
229
229
|
class: m(["px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
230
230
|
flex: ((a = e.menuItem.item) == null ? void 0 : a.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
@@ -249,23 +249,23 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
249
249
|
]),
|
|
250
250
|
_: 1
|
|
251
251
|
}, 8, ["class"])) : g("", !0),
|
|
252
|
-
|
|
252
|
+
Ue
|
|
253
253
|
])
|
|
254
254
|
])
|
|
255
|
-
]
|
|
256
|
-
K.value ? (
|
|
257
|
-
(
|
|
255
|
+
])) : g("", !0),
|
|
256
|
+
K.value ? (p(), k("div", De, [
|
|
257
|
+
(p(!0), k(se, null, ae(i.value.children, (s) => (p(), b(l, {
|
|
258
258
|
key: s,
|
|
259
|
-
isDraggable: !n(
|
|
259
|
+
isDraggable: !n(U)[s],
|
|
260
260
|
isDroppable: X,
|
|
261
261
|
menuItem: e.menuItem,
|
|
262
262
|
parentUids: [...e.parentUids, e.uid],
|
|
263
263
|
uid: s,
|
|
264
|
-
onNewTab: t[4] || (t[4] = (
|
|
265
|
-
onOnDragEnd: t[5] || (t[5] = (...
|
|
266
|
-
onOpenMenu: t[6] || (t[6] = (
|
|
264
|
+
onNewTab: t[4] || (t[4] = (d, o) => e.$emit("newTab", d, o)),
|
|
265
|
+
onOnDragEnd: t[5] || (t[5] = (...d) => e.$emit("onDragEnd", ...d)),
|
|
266
|
+
onOpenMenu: t[6] || (t[6] = (d) => e.$emit("openMenu", d))
|
|
267
267
|
}, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
|
|
268
|
-
i.value.children.length === 0 ? (
|
|
268
|
+
i.value.children.length === 0 ? (p(), b(n(I), {
|
|
269
269
|
key: 0,
|
|
270
270
|
class: m(["mb-[.5px] flex gap-1.5 h-8 text-c-1 py-0 justify-start text-xs w-full hover:bg-b-2", e.parentUids.length ? "pl-9" : ""]),
|
|
271
271
|
variant: "ghost",
|
|
@@ -277,7 +277,7 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
277
277
|
icon: "Add",
|
|
278
278
|
thickness: "3"
|
|
279
279
|
}),
|
|
280
|
-
|
|
280
|
+
Ce
|
|
281
281
|
]),
|
|
282
282
|
_: 1
|
|
283
283
|
}, 8, ["class"])) : g("", !0)
|
|
@@ -291,5 +291,5 @@ const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex
|
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
293
|
export {
|
|
294
|
-
|
|
294
|
+
Be as default
|
|
295
295
|
};
|
|
@@ -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":"AA8KA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;;cAa1B,eAAe;;;;cAAf,eAAe;;;;AAiZjD,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestSidebarItemMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-b6270746"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -6,14 +6,14 @@ import { useModal as D, ScalarDropdown as H, ScalarDropdownItem as f, ScalarIcon
|
|
|
6
6
|
import { useRouter as J } from "vue-router";
|
|
7
7
|
import { useWorkspace as O } from "../../store/store.js";
|
|
8
8
|
import { commandPaletteBus as Q } from "../../libs/event-busses/command-palette-bus.js";
|
|
9
|
-
const k = (s) => (W("data-v-
|
|
9
|
+
const k = (s) => (W("data-v-b6270746"), s = s(), F(), s), X = /* @__PURE__ */ k(() => /* @__PURE__ */ v("span", null, "Add Example", -1)), Y = /* @__PURE__ */ k(() => /* @__PURE__ */ v("span", null, "Rename", -1)), Z = /* @__PURE__ */ k(() => /* @__PURE__ */ v("span", null, "Delete", -1)), re = /* @__PURE__ */ A({
|
|
10
10
|
__name: "RequestSidebarItemMenu",
|
|
11
11
|
props: {
|
|
12
12
|
menuItem: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["closeMenu"],
|
|
15
15
|
setup(s, { emit: N }) {
|
|
16
|
-
const o = s, _ = N, { replace: w } = J(), { activeWorkspace: R, activeRouterParams: $ } = O(), g = y(""), r = D(),
|
|
16
|
+
const o = s, _ = N, { replace: w } = J(), { activeWorkspace: R, activeRouterParams: $ } = O(), g = y(""), r = D(), u = D(), b = () => {
|
|
17
17
|
var e;
|
|
18
18
|
return Q.emit({
|
|
19
19
|
commandName: "Add Example",
|
|
@@ -21,19 +21,19 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
|
|
|
21
21
|
itemUid: (e = o.menuItem.item) == null ? void 0 : e.entity.uid
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
},
|
|
24
|
+
}, q = () => {
|
|
25
25
|
var e;
|
|
26
26
|
g.value = ((e = o.menuItem.item) == null ? void 0 : e.title) || "", r.show();
|
|
27
|
-
},
|
|
27
|
+
}, z = (e) => {
|
|
28
28
|
var t;
|
|
29
29
|
g.value = e, (t = o.menuItem.item) == null || t.rename(e), r.hide();
|
|
30
|
-
},
|
|
30
|
+
}, B = () => {
|
|
31
31
|
var e, t, l;
|
|
32
|
-
(e = o.menuItem.item) == null || e.delete(), $.value[x.Request] === ((t = o.menuItem.item) == null ? void 0 : t.entity.uid) && w(`/workspace/${R.value.uid}/request/default`), $.value[x.Examples] === ((l = o.menuItem.item) == null ? void 0 : l.entity.uid) && w(`/workspace/${R.value}/request/default`);
|
|
33
|
-
},
|
|
34
|
-
L([() => o.menuItem.open,
|
|
32
|
+
(e = o.menuItem.item) == null || e.delete(), $.value[x.Request] === ((t = o.menuItem.item) == null ? void 0 : t.entity.uid) && w(`/workspace/${R.value.uid}/request/default`), $.value[x.Examples] === ((l = o.menuItem.item) == null ? void 0 : l.entity.uid) && w(`/workspace/${R.value}/request/default`), u.hide();
|
|
33
|
+
}, d = y(null);
|
|
34
|
+
L([() => o.menuItem.open, d], async ([e]) => {
|
|
35
35
|
var t, l;
|
|
36
|
-
e && ((l = (t =
|
|
36
|
+
e && ((l = (t = d.value) == null ? void 0 : t.$parent) != null && l.$el) && d.value.$parent.$el.focus();
|
|
37
37
|
});
|
|
38
38
|
const h = () => o.menuItem.open && _("closeMenu");
|
|
39
39
|
return P(() => window.addEventListener("click", h)), V(() => window.removeEventListener("click", h)), (e, t) => {
|
|
@@ -52,7 +52,7 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
|
|
|
52
52
|
((m = e.menuItem.item) == null ? void 0 : m.entity.type) === "request" ? (p(), E(n(f), {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "flex gap-2",
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: b
|
|
56
56
|
}, {
|
|
57
57
|
default: i(() => [
|
|
58
58
|
a(n(I), {
|
|
@@ -67,9 +67,9 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
|
|
|
67
67
|
})) : C("", !0),
|
|
68
68
|
a(n(f), {
|
|
69
69
|
ref_key: "menuRef",
|
|
70
|
-
ref:
|
|
70
|
+
ref: d,
|
|
71
71
|
class: "flex gap-2",
|
|
72
|
-
onClick:
|
|
72
|
+
onClick: q
|
|
73
73
|
}, {
|
|
74
74
|
default: i(() => [
|
|
75
75
|
a(n(I), {
|
|
@@ -84,7 +84,7 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
|
|
|
84
84
|
}, 512),
|
|
85
85
|
a(n(f), {
|
|
86
86
|
class: "flex gap-2",
|
|
87
|
-
onClick: t[0] || (t[0] = (
|
|
87
|
+
onClick: t[0] || (t[0] = (c) => n(u).show())
|
|
88
88
|
}, {
|
|
89
89
|
default: i(() => [
|
|
90
90
|
a(n(I), {
|
|
@@ -103,17 +103,17 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
|
|
|
103
103
|
}, 8, ["targetRef"])) : C("", !0),
|
|
104
104
|
a(n(S), {
|
|
105
105
|
size: "xxs",
|
|
106
|
-
state: n(
|
|
106
|
+
state: n(u),
|
|
107
107
|
title: `Delete ${(l = e.menuItem.item) == null ? void 0 : l.resourceTitle}`
|
|
108
108
|
}, {
|
|
109
109
|
default: i(() => {
|
|
110
|
-
var m,
|
|
110
|
+
var m, c;
|
|
111
111
|
return [
|
|
112
112
|
a(j, {
|
|
113
113
|
variableName: ((m = e.menuItem.item) == null ? void 0 : m.title) ?? "",
|
|
114
|
-
warningMessage: (
|
|
115
|
-
onClose: t[2] || (t[2] = (ee) => n(
|
|
116
|
-
onDelete:
|
|
114
|
+
warningMessage: (c = e.menuItem.item) == null ? void 0 : c.warning,
|
|
115
|
+
onClose: t[2] || (t[2] = (ee) => n(u).hide()),
|
|
116
|
+
onDelete: B
|
|
117
117
|
}, null, 8, ["variableName", "warningMessage"])
|
|
118
118
|
];
|
|
119
119
|
}),
|
|
@@ -129,8 +129,8 @@ const k = (s) => (W("data-v-59cf3dad"), s = s(), F(), s), X = /* @__PURE__ */ k(
|
|
|
129
129
|
return [
|
|
130
130
|
a(G, {
|
|
131
131
|
name: ((m = e.menuItem.item) == null ? void 0 : m.title) ?? "",
|
|
132
|
-
onClose: t[3] || (t[3] = (
|
|
133
|
-
onRename:
|
|
132
|
+
onClose: t[3] || (t[3] = (c) => n(r).hide()),
|
|
133
|
+
onRename: z
|
|
134
134
|
}, null, 8, ["name"])
|
|
135
135
|
];
|
|
136
136
|
}),
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.6",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -129,15 +129,15 @@
|
|
|
129
129
|
"vue-router": "^4.3.0",
|
|
130
130
|
"whatwg-mimetype": "^4.0.0",
|
|
131
131
|
"zod": "^3.23.8",
|
|
132
|
+
"@scalar/components": "0.12.47",
|
|
132
133
|
"@scalar/draggable": "0.1.5",
|
|
133
|
-
"@scalar/
|
|
134
|
-
"@scalar/
|
|
135
|
-
"@scalar/openapi-parser": "0.8.3",
|
|
136
|
-
"@scalar/object-utils": "1.1.8",
|
|
134
|
+
"@scalar/oas-utils": "0.2.47",
|
|
135
|
+
"@scalar/object-utils": "1.1.9",
|
|
137
136
|
"@scalar/openapi-types": "0.1.1",
|
|
138
|
-
"@scalar/
|
|
139
|
-
"@scalar/types": "0.0.
|
|
140
|
-
"@scalar/
|
|
137
|
+
"@scalar/openapi-parser": "0.8.3",
|
|
138
|
+
"@scalar/types": "0.0.10",
|
|
139
|
+
"@scalar/themes": "0.9.31",
|
|
140
|
+
"@scalar/use-codemirror": "0.11.13",
|
|
141
141
|
"@scalar/use-toasts": "0.7.6",
|
|
142
142
|
"@scalar/use-tooltip": "1.0.2"
|
|
143
143
|
},
|