@scalar/api-client 2.0.46 → 2.0.48
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 +44 -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 +77 -71
- package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
- 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 +49 -44
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +97 -106
- 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 +10 -10
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +1 -1
- package/dist/components/Search/SearchModal.vue2.js +43 -41
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +22 -19
- package/dist/components/Sidebar/Sidebar.vue.d.ts +24 -3
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +57 -19
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
- 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 +46 -43
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/layouts/App/ApiClientApp.vue.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +56 -46
- 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/ApiClientModal.vue2.js +20 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +112 -92
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +56 -46
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/{command-palette.d.ts → command-palette-bus.d.ts} +1 -1
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/{execute-requestBus.d.ts → execute-request-bus.d.ts} +1 -1
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts +33 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-keys-bus.js +33 -0
- package/dist/libs/event-busses/index.d.ts +3 -3
- package/dist/libs/event-busses/index.d.ts.map +1 -1
- package/dist/libs/event-busses/index.js +3 -3
- package/dist/libs/index.js +3 -3
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +15 -30
- package/dist/router.d.ts +2 -2
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +3 -3
- package/dist/store/workspace.d.ts +112 -92
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +140 -137
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -15
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +114 -55
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +21 -20
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +132 -128
- 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 +253 -139
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +27 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +83 -158
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +214 -70
- package/package.json +6 -6
- package/dist/libs/event-busses/command-palette.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-requestBus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-key.d.ts +0 -34
- package/dist/libs/event-busses/hot-key.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-key.js +0 -25
- /package/dist/libs/event-busses/{command-palette.js → command-palette-bus.js} +0 -0
- /package/dist/libs/event-busses/{execute-requestBus.js → execute-request-bus.js} +0 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
1
|
+
import { defineComponent as me, useCssVars as pe, computed as n, ref as P, resolveComponent as fe, openBlock as m, createElementBlock as C, Fragment as A, createElementVNode as r, normalizeClass as c, unref as i, createVNode as o, withCtx as d, createBlock as v, toDisplayString as H, createCommentVNode as w, createTextVNode as D, renderSlot as ce, withDirectives as ve, renderList as be, vShow as ge, withKeys as he, withModifiers as Ue, pushScopeId as we, popScopeId as ye } from "vue";
|
|
2
|
+
import De from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import { PathId as M } from "../../router.js";
|
|
4
|
+
import { useWorkspace as ke } from "../../store/workspace.js";
|
|
5
|
+
import { useModal as G, ScalarContextMenu as J, ScalarIcon as qe, ScalarModal as Q, ScalarTextField as Re, ScalarButton as X } from "@scalar/components";
|
|
6
|
+
import { Draggable as $e } from "@scalar/draggable";
|
|
7
|
+
import { useRouter as xe, RouterLink as Se } from "vue-router";
|
|
8
|
+
import k from "./RequestSidebarItemMenu.vue.js";
|
|
9
|
+
import Ce from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
10
|
+
import { useSidebar as Me } from "../../hooks/useSidebar.js";
|
|
11
|
+
const Ie = (b) => (we("data-v-846321e2"), b = b(), ye(), b), Te = { class: "flex flex-row gap-1 items-center" }, Ee = { class: "relative" }, ze = { class: "flex items-start" }, Ne = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Ve = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Oe = { class: "relative flex h-fit" }, Be = /* @__PURE__ */ Ie(() => /* @__PURE__ */ r("span", null, " ", -1)), Fe = { key: 2 }, je = { class: "flex gap-3" }, Y = "hover:bg-sidebar-active-b indent-padding-left", Ye = /* @__PURE__ */ me({
|
|
11
12
|
__name: "RequestSidebarItem",
|
|
12
13
|
props: {
|
|
13
14
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -16,154 +17,267 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
16
17
|
item: {}
|
|
17
18
|
},
|
|
18
19
|
emits: ["onDragEnd"],
|
|
19
|
-
setup(
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
20
|
+
setup(b) {
|
|
21
|
+
pe((e) => ({
|
|
22
|
+
"8cbace56": te.value,
|
|
23
|
+
"02fa30c9": ie.value
|
|
23
24
|
}));
|
|
24
|
-
const t =
|
|
25
|
-
activeRequest:
|
|
26
|
-
activeRouterParams:
|
|
25
|
+
const t = b, {
|
|
26
|
+
activeRequest: I,
|
|
27
|
+
activeRouterParams: q,
|
|
27
28
|
activeWorkspace: g,
|
|
28
|
-
collections:
|
|
29
|
-
folders:
|
|
30
|
-
isReadOnly:
|
|
31
|
-
requests:
|
|
32
|
-
requestExamples:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
collections: T,
|
|
30
|
+
folders: Z,
|
|
31
|
+
isReadOnly: a,
|
|
32
|
+
requests: E,
|
|
33
|
+
requestExamples: R,
|
|
34
|
+
collectionMutators: z,
|
|
35
|
+
folderMutators: N,
|
|
36
|
+
requestMutators: V,
|
|
37
|
+
requestExampleMutators: O
|
|
38
|
+
} = ke(), { replace: B } = xe(), { collapsedSidebarFolders: F, toggleSidebarFolder: _ } = Me(), ee = n(() => "childUids" in t.item), j = n(() => "spec" in t.item), K = n(() => "summary" in t.item), te = n(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), ie = n(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), $ = (e) => {
|
|
39
|
+
var s;
|
|
40
|
+
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 : "";
|
|
41
|
+
}, se = n(() => ("requestUid" in t.item ? E[t.item.requestUid] : t.item).method), le = n(
|
|
37
42
|
() => {
|
|
38
43
|
var e;
|
|
39
|
-
return
|
|
44
|
+
return F[t.item.uid] || ((e = I.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
|
|
40
45
|
}
|
|
41
|
-
),
|
|
42
|
-
() =>
|
|
43
|
-
),
|
|
44
|
-
let e = 0.5,
|
|
45
|
-
if (!
|
|
46
|
-
const { draggingItem:
|
|
47
|
-
return !
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
46
|
+
), re = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, ae = n(
|
|
47
|
+
() => q.value[M.Request] === "default" && I.value.uid === t.item.uid
|
|
48
|
+
), x = P(null), L = n(() => {
|
|
49
|
+
let e = 0.5, s = 0.5;
|
|
50
|
+
if (!x.value) return { ceiling: e, floor: s };
|
|
51
|
+
const { draggingItem: U } = x.value;
|
|
52
|
+
return !T[U == null ? void 0 : U.id] && j.value ? (e = 1, s = 0) : ee.value && !K.value && !j.value && (e = 0.8, s = 0.2), { ceiling: e, floor: s };
|
|
53
|
+
}), ne = (e, s) => !(g.value.isReadOnly || R[s.id] || T[e.id]), p = P(""), y = G(), h = G(), W = () => {
|
|
54
|
+
"summary" in t.item ? V.edit(t.item.uid, "summary", p.value) : "requestUid" in t.item ? O.edit(t.item.uid, "name", p.value) : "spec" in t.item ? z.edit(t.item.uid, "spec.info.title", p.value) : N.edit(t.item.uid, "name", p.value), y.hide();
|
|
55
|
+
}, S = () => {
|
|
56
|
+
p.value = $(t.item) || "", y.show();
|
|
57
|
+
}, oe = () => {
|
|
58
|
+
"requestUid" in t.item ? (O.delete(t.item), q.value[M.Examples] === t.item.uid && B(`/workspace/${g.value}/request/default`)) : "summary" in t.item ? (V.delete(
|
|
59
|
+
t.item,
|
|
60
|
+
t.parentUids[t.parentUids.length - 1]
|
|
61
|
+
), q.value[M.Request] === t.item.uid && B(`/workspace/${g.value.uid}/request/default`)) : "spec" in t.item ? z.delete(t.item) : "name" in t.item && N.delete(
|
|
62
|
+
t.item,
|
|
63
|
+
t.parentUids[t.parentUids.length - 1]
|
|
64
|
+
);
|
|
65
|
+
}, de = n(() => {
|
|
66
|
+
var e;
|
|
67
|
+
return "summary" in t.item ? t.item.summary || "" : "name" in t.item ? t.item.name || "" : "spec" in t.item && ((e = t.item.spec.info) == null ? void 0 : e.title) || "";
|
|
68
|
+
}), f = n(() => "requestUid" in t.item ? "Example" : "summary" in t.item ? "Request" : "spec" in t.item ? "Collection" : "Folder");
|
|
69
|
+
return (e, s) => {
|
|
70
|
+
const U = fe("RequestSidebarItem", !0);
|
|
71
|
+
return m(), C(A, null, [
|
|
72
|
+
r("div", {
|
|
73
|
+
class: c(["relative flex flex-row", [
|
|
74
|
+
i(a) && e.parentUids.length > 1 || !i(a) && 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" : ""
|
|
75
|
+
]])
|
|
76
|
+
}, [
|
|
77
|
+
o(i($e), {
|
|
78
|
+
id: e.item.uid,
|
|
79
|
+
ref_key: "draggableRef",
|
|
80
|
+
ref: x,
|
|
81
|
+
ceiling: L.value.ceiling,
|
|
82
|
+
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
83
|
+
floor: L.value.floor,
|
|
84
|
+
isDraggable: e.isDraggable,
|
|
85
|
+
isDroppable: e.isDroppable,
|
|
86
|
+
parentIds: e.parentUids,
|
|
87
|
+
onOnDragEnd: s[5] || (s[5] = (...l) => e.$emit("onDragEnd", ...l))
|
|
88
|
+
}, {
|
|
89
|
+
default: d(() => [
|
|
90
|
+
"summary" in e.item || "requestUid" in e.item ? (m(), v(i(Se), {
|
|
72
91
|
key: 0,
|
|
73
92
|
class: "no-underline",
|
|
74
|
-
to:
|
|
93
|
+
to: re()
|
|
75
94
|
}, {
|
|
76
|
-
default:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
default: d(({ isExactActive: l }) => [
|
|
96
|
+
o(i(J), { disabled: i(a) }, {
|
|
97
|
+
trigger: d(() => [
|
|
98
|
+
r("div", {
|
|
99
|
+
class: c(["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", [
|
|
100
|
+
Y,
|
|
101
|
+
l || ae.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
102
|
+
]]),
|
|
103
|
+
tabindex: "0"
|
|
104
|
+
}, [
|
|
105
|
+
r("span", {
|
|
106
|
+
class: c(["z-10 font-medium w-full pl-2 word-break-break-word", {
|
|
107
|
+
"editable-sidebar-hover-item": !i(a)
|
|
108
|
+
}])
|
|
109
|
+
}, H($(e.item)), 3),
|
|
110
|
+
r("div", Te, [
|
|
111
|
+
r("div", Ee, [
|
|
112
|
+
i(a) ? w("", !0) : (m(), v(k, {
|
|
113
|
+
key: 0,
|
|
114
|
+
item: e.item,
|
|
115
|
+
parentUids: e.parentUids,
|
|
116
|
+
resourceTitle: f.value,
|
|
117
|
+
onDelete: s[0] || (s[0] = (u) => i(h).show()),
|
|
118
|
+
onRename: S
|
|
119
|
+
}, null, 8, ["item", "parentUids", "resourceTitle"]))
|
|
120
|
+
]),
|
|
121
|
+
r("span", ze, [
|
|
122
|
+
D(" "),
|
|
123
|
+
o(i(Ce), {
|
|
124
|
+
class: "font-bold",
|
|
125
|
+
method: se.value
|
|
126
|
+
}, null, 8, ["method"])
|
|
127
|
+
])
|
|
128
|
+
])
|
|
129
|
+
], 2)
|
|
130
|
+
]),
|
|
131
|
+
content: d(() => [
|
|
132
|
+
o(k, {
|
|
133
|
+
item: e.item,
|
|
134
|
+
parentUids: e.parentUids,
|
|
135
|
+
resourceTitle: f.value,
|
|
136
|
+
static: "",
|
|
137
|
+
onDelete: s[1] || (s[1] = (u) => i(h).show()),
|
|
138
|
+
onRename: S
|
|
139
|
+
}, null, 8, ["item", "parentUids", "resourceTitle"])
|
|
140
|
+
]),
|
|
141
|
+
_: 2
|
|
142
|
+
}, 1032, ["disabled"])
|
|
106
143
|
]),
|
|
107
144
|
_: 1
|
|
108
|
-
}, 8, ["to"])) : !i(
|
|
145
|
+
}, 8, ["to"])) : !i(a) || e.parentUids.length ? (m(), v(i(J), {
|
|
109
146
|
key: 1,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})
|
|
147
|
+
disabled: i(a)
|
|
148
|
+
}, {
|
|
149
|
+
trigger: d(() => {
|
|
150
|
+
var l, u;
|
|
151
|
+
return [
|
|
152
|
+
r("button", {
|
|
153
|
+
class: c(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", Y]),
|
|
154
|
+
type: "button",
|
|
155
|
+
onClick: s[2] || (s[2] = (ue) => i(_)(e.item.uid))
|
|
120
156
|
}, [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
157
|
+
r("span", Ne, [
|
|
158
|
+
ce(e.$slots, "leftIcon", {}, () => [
|
|
159
|
+
r("div", {
|
|
160
|
+
class: c({
|
|
161
|
+
"rotate-90": i(F)[e.item.uid]
|
|
162
|
+
})
|
|
163
|
+
}, [
|
|
164
|
+
o(i(qe), {
|
|
165
|
+
class: "text-c-3 text-sm",
|
|
166
|
+
icon: "ChevronRight",
|
|
167
|
+
size: "sm",
|
|
168
|
+
thickness: "2.5"
|
|
169
|
+
})
|
|
170
|
+
], 2)
|
|
171
|
+
], !0),
|
|
172
|
+
D(" ")
|
|
173
|
+
]),
|
|
174
|
+
r("div", Ve, [
|
|
175
|
+
r("span", {
|
|
176
|
+
class: c(["z-10 font-medium text-left w-full word-break-break-word", {
|
|
177
|
+
"editable-sidebar-hover-item": !i(a)
|
|
178
|
+
}])
|
|
179
|
+
}, H($(e.item)), 3),
|
|
180
|
+
r("div", Oe, [
|
|
181
|
+
!i(a) && ((u = (l = e.item.spec) == null ? void 0 : l.info) == null ? void 0 : u.title) !== "Drafts" ? (m(), v(k, {
|
|
182
|
+
key: 0,
|
|
183
|
+
item: e.item,
|
|
184
|
+
parentUids: e.parentUids,
|
|
185
|
+
resourceTitle: f.value
|
|
186
|
+
}, null, 8, ["item", "parentUids", "resourceTitle"])) : w("", !0),
|
|
187
|
+
Be
|
|
188
|
+
])
|
|
189
|
+
])
|
|
190
|
+
])
|
|
191
|
+
];
|
|
192
|
+
}),
|
|
193
|
+
content: d(() => {
|
|
194
|
+
var l, u;
|
|
195
|
+
return [
|
|
196
|
+
!i(a) && ((u = (l = e.item.spec) == null ? void 0 : l.info) == null ? void 0 : u.title) !== "Drafts" ? (m(), v(k, {
|
|
139
197
|
key: 0,
|
|
140
198
|
item: e.item,
|
|
141
|
-
parentUids: e.parentUids
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
199
|
+
parentUids: e.parentUids,
|
|
200
|
+
resourceTitle: f.value,
|
|
201
|
+
static: "",
|
|
202
|
+
onDelete: s[3] || (s[3] = (ue) => i(h).show()),
|
|
203
|
+
onRename: S
|
|
204
|
+
}, null, 8, ["item", "parentUids", "resourceTitle"])) : w("", !0)
|
|
205
|
+
];
|
|
206
|
+
}),
|
|
207
|
+
_: 3
|
|
208
|
+
}, 8, ["disabled"])) : w("", !0),
|
|
209
|
+
"childUids" in e.item ? ve((m(), C("div", Fe, [
|
|
210
|
+
(m(!0), C(A, null, be(K.value ? e.item.childUids.slice(1) : e.item.childUids, (l) => (m(), v(U, {
|
|
211
|
+
key: l,
|
|
212
|
+
isDraggable: !i(R)[l],
|
|
213
|
+
isDroppable: ne,
|
|
214
|
+
item: i(Z)[l] || i(E)[l] || i(R)[l],
|
|
153
215
|
parentUids: [...e.parentUids, e.item.uid],
|
|
154
|
-
onOnDragEnd:
|
|
216
|
+
onOnDragEnd: s[4] || (s[4] = (...u) => e.$emit("onDragEnd", ...u))
|
|
155
217
|
}, null, 8, ["isDraggable", "item", "parentUids"]))), 128))
|
|
156
218
|
], 512)), [
|
|
157
|
-
[
|
|
158
|
-
]) :
|
|
159
|
-
]
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
219
|
+
[ge, le.value]
|
|
220
|
+
]) : w("", !0)
|
|
221
|
+
]),
|
|
222
|
+
_: 3
|
|
223
|
+
}, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
|
|
224
|
+
], 2),
|
|
225
|
+
o(i(Q), {
|
|
226
|
+
size: "sm",
|
|
227
|
+
state: i(h),
|
|
228
|
+
title: `Delete ${f.value}`
|
|
229
|
+
}, {
|
|
230
|
+
default: d(() => [
|
|
231
|
+
o(De, {
|
|
232
|
+
variableName: de.value,
|
|
233
|
+
warningMessage: "Warning: Deleting this will delete all items inside of this",
|
|
234
|
+
onClose: s[6] || (s[6] = (l) => i(h).hide()),
|
|
235
|
+
onDelete: oe
|
|
236
|
+
}, null, 8, ["variableName"])
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["state", "title"]),
|
|
240
|
+
o(i(Q), {
|
|
241
|
+
state: i(y),
|
|
242
|
+
title: `Rename ${f.value}`
|
|
243
|
+
}, {
|
|
244
|
+
default: d(() => [
|
|
245
|
+
o(i(Re), {
|
|
246
|
+
modelValue: p.value,
|
|
247
|
+
"onUpdate:modelValue": s[7] || (s[7] = (l) => p.value = l),
|
|
248
|
+
label: f.value,
|
|
249
|
+
labelShadowColor: "var(--scalar-background-1)",
|
|
250
|
+
onKeydown: he(Ue(W, ["prevent"]), ["enter"])
|
|
251
|
+
}, null, 8, ["modelValue", "label", "onKeydown"]),
|
|
252
|
+
r("div", je, [
|
|
253
|
+
o(i(X), {
|
|
254
|
+
class: "flex-1",
|
|
255
|
+
variant: "outlined",
|
|
256
|
+
onClick: s[8] || (s[8] = (l) => i(y).hide())
|
|
257
|
+
}, {
|
|
258
|
+
default: d(() => [
|
|
259
|
+
D(" Cancel ")
|
|
260
|
+
]),
|
|
261
|
+
_: 1
|
|
262
|
+
}),
|
|
263
|
+
o(i(X), {
|
|
264
|
+
class: "flex-1",
|
|
265
|
+
type: "submit",
|
|
266
|
+
onClick: W
|
|
267
|
+
}, {
|
|
268
|
+
default: d(() => [
|
|
269
|
+
D(" Save ")
|
|
270
|
+
]),
|
|
271
|
+
_: 1
|
|
272
|
+
})
|
|
273
|
+
])
|
|
274
|
+
]),
|
|
275
|
+
_: 1
|
|
276
|
+
}, 8, ["state", "title"])
|
|
277
|
+
], 64);
|
|
164
278
|
};
|
|
165
279
|
}
|
|
166
280
|
});
|
|
167
281
|
export {
|
|
168
|
-
|
|
282
|
+
Ye as default
|
|
169
283
|
};
|
|
@@ -1,16 +1,38 @@
|
|
|
1
1
|
import type { Collection } from '@scalar/oas-utils/entities/workspace/collection';
|
|
2
2
|
import type { Folder } from '@scalar/oas-utils/entities/workspace/folder';
|
|
3
3
|
import type { Request, RequestExample } from '@scalar/oas-utils/entities/workspace/spec';
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
5
5
|
/** Both inidicate the level and provide a way to traverse upwards */
|
|
6
|
-
parentUids: string[];
|
|
7
6
|
item: Collection | Folder | Request | RequestExample;
|
|
8
|
-
|
|
7
|
+
resourceTitle: string;
|
|
8
|
+
static?: boolean;
|
|
9
|
+
}>, {
|
|
10
|
+
static: boolean;
|
|
11
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
delete: () => void;
|
|
13
|
+
rename: () => void;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
9
15
|
/** Both inidicate the level and provide a way to traverse upwards */
|
|
10
|
-
parentUids: string[];
|
|
11
16
|
item: Collection | Folder | Request | RequestExample;
|
|
12
|
-
|
|
17
|
+
resourceTitle: string;
|
|
18
|
+
static?: boolean;
|
|
19
|
+
}>, {
|
|
20
|
+
static: boolean;
|
|
21
|
+
}>>> & {
|
|
22
|
+
onDelete?: (() => any) | undefined;
|
|
23
|
+
onRename?: (() => any) | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
static: boolean;
|
|
26
|
+
}, {}>;
|
|
13
27
|
export default _default;
|
|
28
|
+
type __VLS_WithDefaults<P, D> = {
|
|
29
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
30
|
+
default: D[K];
|
|
31
|
+
}> : P[K];
|
|
32
|
+
};
|
|
33
|
+
type __VLS_Prettify<T> = {
|
|
34
|
+
[K in keyof T]: T[K];
|
|
35
|
+
} & {};
|
|
14
36
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
37
|
type __VLS_TypePropsToOption<T> = {
|
|
16
38
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
@@ -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":"AAkIA,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;;IAM9C,qEAAqE;UAC/D,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;mBACrC,MAAM;aACZ,OAAO;;;;;;;IAHhB,qEAAqE;UAC/D,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;mBACrC,MAAM;aACZ,OAAO;;;;;;;YAAP,OAAO;;AAoSpB,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
|
-
import
|
|
1
|
+
import t from "./RequestSidebarItemMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ e(t, [["__scopeId", "data-v-5686fba5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|