@scalar/api-client 2.0.36 → 2.0.38
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 +20 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +35 -42
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +54 -64
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +37 -44
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +33 -43
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +50 -57
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +29 -36
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +34 -34
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideHelp.vue.js +34 -34
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +12 -12
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +14 -14
- package/dist/layouts/App/create-api-client-app.d.ts +5 -5
- package/dist/layouts/Modal/create-api-client-modal.d.ts +10 -10
- package/dist/libs/create-client.d.ts +6 -5
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +12 -12
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +185 -181
- package/dist/style.css +1 -1
- 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 +112 -101
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +8 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +92 -82
- package/package.json +4 -4
- package/dist/components/CommandPalette/handleKeyDown.d.ts +0 -2
- package/dist/components/CommandPalette/handleKeyDown.d.ts.map +0 -1
- package/dist/components/CommandPalette/handleKeyDown.js +0 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { PathId as
|
|
3
|
-
import { useWorkspace as
|
|
4
|
-
import { ScalarIcon as
|
|
5
|
-
import { Draggable as
|
|
6
|
-
import { RouterLink as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useSidebar as
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as P, useCssVars as T, computed as o, resolveComponent as W, openBlock as r, createElementBlock as u, normalizeClass as p, unref as i, createVNode as c, withCtx as k, createBlock as m, createElementVNode as n, toDisplayString as w, createCommentVNode as f, createTextVNode as q, renderSlot as A, withDirectives as G, Fragment as H, renderList as J, vShow as K } from "vue";
|
|
2
|
+
import { PathId as M } from "../../router.js";
|
|
3
|
+
import { useWorkspace as Q } from "../../store/workspace.js";
|
|
4
|
+
import { ScalarIcon as X } from "@scalar/components";
|
|
5
|
+
import { Draggable as Y } from "@scalar/draggable";
|
|
6
|
+
import { RouterLink as Z } from "vue-router";
|
|
7
|
+
import $ from "./RequestSidebarItemMenu.vue.js";
|
|
8
|
+
import _ from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
9
|
+
import { useSidebar as ee } from "../../hooks/useSidebar.js";
|
|
10
|
+
const te = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" }, ie = { class: "flex flex-row gap-1" }, se = { class: "flex" }, re = { class: "z-10 flex h-fit items-center justify-center max-w-[14px]" }, ne = { class: "flex flex-1 flex-row justify-between" }, ae = { class: "z-10 font-medium" }, le = { key: 2 }, x = "hover:bg-sidebar-active-b indent-padding-left", he = /* @__PURE__ */ P({
|
|
11
11
|
__name: "RequestSidebarItem",
|
|
12
12
|
props: {
|
|
13
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -16,116 +16,127 @@ const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
16
16
|
item: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["onDragEnd"],
|
|
19
|
-
setup(
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
19
|
+
setup(C) {
|
|
20
|
+
T((e) => ({
|
|
21
|
+
"2005dcd1": z.value,
|
|
22
|
+
"06c2c966": B.value
|
|
23
23
|
}));
|
|
24
|
-
const t =
|
|
24
|
+
const t = C, {
|
|
25
25
|
activeRequest: b,
|
|
26
|
-
activeRouterParams:
|
|
27
|
-
activeWorkspace:
|
|
28
|
-
folders:
|
|
29
|
-
isReadOnly:
|
|
30
|
-
requests:
|
|
31
|
-
requestExamples:
|
|
32
|
-
} =
|
|
26
|
+
activeRouterParams: S,
|
|
27
|
+
activeWorkspace: g,
|
|
28
|
+
folders: R,
|
|
29
|
+
isReadOnly: a,
|
|
30
|
+
requests: h,
|
|
31
|
+
requestExamples: E
|
|
32
|
+
} = Q(), { collapsedSidebarFolders: v, toggleSidebarFolder: I } = ee(), U = o(() => "childUids" in t.item), z = o(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), B = o(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), D = (e) => {
|
|
33
33
|
var s;
|
|
34
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 : "";
|
|
35
|
-
},
|
|
35
|
+
}, O = o(() => ("requestUid" in t.item ? h[t.item.requestUid] : t.item).method), V = o(
|
|
36
36
|
() => {
|
|
37
37
|
var e;
|
|
38
|
-
return
|
|
38
|
+
return v[t.item.uid] || ((e = b.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
|
|
39
39
|
}
|
|
40
|
-
),
|
|
41
|
-
() =>
|
|
40
|
+
), j = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, N = o(
|
|
41
|
+
() => S.value[M.Request] === "default" && b.value.uid === t.item.uid
|
|
42
42
|
);
|
|
43
43
|
return (e, s) => {
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
class:
|
|
47
|
-
i(
|
|
44
|
+
const F = W("RequestSidebarItem", !0);
|
|
45
|
+
return r(), u("div", {
|
|
46
|
+
class: p(["relative flex flex-row", [
|
|
47
|
+
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-px mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
48
48
|
]])
|
|
49
49
|
}, [
|
|
50
|
-
|
|
50
|
+
c(i(Y), {
|
|
51
51
|
id: e.item.uid,
|
|
52
|
-
ceiling:
|
|
52
|
+
ceiling: U.value ? 0.8 : 0.5,
|
|
53
53
|
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
54
|
-
floor:
|
|
54
|
+
floor: U.value ? 0.2 : 0.5,
|
|
55
55
|
isDraggable: e.parentUids.length > 0 && e.isDraggable,
|
|
56
56
|
isDroppable: e.isDroppable,
|
|
57
57
|
parentIds: e.parentUids,
|
|
58
|
-
onOnDragEnd: s[2] || (s[2] = (...
|
|
58
|
+
onOnDragEnd: s[2] || (s[2] = (...d) => e.$emit("onDragEnd", ...d))
|
|
59
59
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
q,
|
|
70
|
-
r || O.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
71
|
-
]]),
|
|
72
|
-
tabindex: "0"
|
|
73
|
-
}, [
|
|
74
|
-
n("span", Z, y(U(e.item)), 1),
|
|
75
|
-
n("div", ee, [
|
|
76
|
-
i(l) ? f("", !0) : (a(), p(Q, {
|
|
77
|
-
key: 0,
|
|
78
|
-
item: e.item
|
|
79
|
-
}, null, 8, ["item"])),
|
|
80
|
-
n("span", te, [
|
|
81
|
-
k(" "),
|
|
82
|
-
m(i(X), {
|
|
83
|
-
class: "font-bold",
|
|
84
|
-
method: I.value
|
|
85
|
-
}, null, 8, ["method"])
|
|
86
|
-
])
|
|
87
|
-
])
|
|
88
|
-
], 2)
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["to"])) : !i(l) || e.parentUids.length ? (a(), d("button", {
|
|
92
|
-
key: 1,
|
|
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]),
|
|
94
|
-
type: "button",
|
|
95
|
-
onClick: s[0] || (s[0] = (r) => i(S)(e.item.uid))
|
|
96
|
-
}, [
|
|
97
|
-
n("span", ie, [
|
|
98
|
-
P(e.$slots, "leftIcon", {}, () => [
|
|
60
|
+
default: k(() => {
|
|
61
|
+
var d, y;
|
|
62
|
+
return [
|
|
63
|
+
"summary" in e.item || "requestUid" in e.item ? (r(), m(i(Z), {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "no-underline",
|
|
66
|
+
to: j()
|
|
67
|
+
}, {
|
|
68
|
+
default: k(({ isExactActive: l }) => [
|
|
99
69
|
n("div", {
|
|
100
|
-
class:
|
|
101
|
-
|
|
102
|
-
|
|
70
|
+
class: p(["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", [
|
|
71
|
+
x,
|
|
72
|
+
l || N.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
73
|
+
]]),
|
|
74
|
+
tabindex: "0"
|
|
103
75
|
}, [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
76
|
+
n("span", te, w(D(e.item)), 1),
|
|
77
|
+
n("div", ie, [
|
|
78
|
+
i(a) ? f("", !0) : (r(), m($, {
|
|
79
|
+
key: 0,
|
|
80
|
+
item: e.item,
|
|
81
|
+
parentUids: e.parentUids
|
|
82
|
+
}, null, 8, ["item", "parentUids"])),
|
|
83
|
+
n("span", se, [
|
|
84
|
+
q(" "),
|
|
85
|
+
c(i(_), {
|
|
86
|
+
class: "font-bold",
|
|
87
|
+
method: O.value
|
|
88
|
+
}, null, 8, ["method"])
|
|
89
|
+
])
|
|
90
|
+
])
|
|
110
91
|
], 2)
|
|
111
|
-
]
|
|
112
|
-
|
|
113
|
-
]),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
}, 8, ["to"])) : !i(a) || e.parentUids.length ? (r(), u("button", {
|
|
95
|
+
key: 1,
|
|
96
|
+
class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", x]),
|
|
97
|
+
type: "button",
|
|
98
|
+
onClick: s[0] || (s[0] = (l) => i(I)(e.item.uid))
|
|
99
|
+
}, [
|
|
100
|
+
n("span", re, [
|
|
101
|
+
A(e.$slots, "leftIcon", {}, () => [
|
|
102
|
+
n("div", {
|
|
103
|
+
class: p({
|
|
104
|
+
"rotate-90": i(v)[e.item.uid]
|
|
105
|
+
})
|
|
106
|
+
}, [
|
|
107
|
+
c(i(X), {
|
|
108
|
+
class: "text-c-3 text-sm",
|
|
109
|
+
icon: "ChevronRight",
|
|
110
|
+
size: "sm",
|
|
111
|
+
thickness: "2.5"
|
|
112
|
+
})
|
|
113
|
+
], 2)
|
|
114
|
+
], !0),
|
|
115
|
+
q(" ")
|
|
116
|
+
]),
|
|
117
|
+
n("div", ne, [
|
|
118
|
+
n("span", ae, w(D(e.item)), 1),
|
|
119
|
+
!i(a) && ((y = (d = e.item.spec) == null ? void 0 : d.info) == null ? void 0 : y.title) !== "Drafts" ? (r(), m($, {
|
|
120
|
+
key: 0,
|
|
121
|
+
item: e.item,
|
|
122
|
+
parentUids: e.parentUids
|
|
123
|
+
}, null, 8, ["item", "parentUids"])) : f("", !0)
|
|
124
|
+
])
|
|
125
|
+
])) : f("", !0),
|
|
126
|
+
"childUids" in e.item ? G((r(), u("div", le, [
|
|
127
|
+
(r(!0), u(H, null, J("summary" in e.item ? e.item.childUids.slice(1) : e.item.childUids, (l) => (r(), m(F, {
|
|
128
|
+
key: l,
|
|
129
|
+
isDraggable: e.isDraggable,
|
|
130
|
+
isDroppable: e.isDroppable,
|
|
131
|
+
item: i(R)[l] || i(h)[l] || i(E)[l],
|
|
132
|
+
parentUids: [...e.parentUids, e.item.uid],
|
|
133
|
+
onOnDragEnd: s[1] || (s[1] = (...L) => e.$emit("onDragEnd", ...L))
|
|
134
|
+
}, null, 8, ["isDraggable", "isDroppable", "item", "parentUids"]))), 128))
|
|
135
|
+
], 512)), [
|
|
136
|
+
[K, V.value]
|
|
137
|
+
]) : f("", !0)
|
|
138
|
+
];
|
|
139
|
+
}),
|
|
129
140
|
_: 3
|
|
130
141
|
}, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
|
|
131
142
|
], 2);
|
|
@@ -133,5 +144,5 @@ const Z = { class: "z-10 font-medium w-full editable-sidebar-hover-item pl-2" },
|
|
|
133
144
|
}
|
|
134
145
|
});
|
|
135
146
|
export {
|
|
136
|
-
|
|
147
|
+
he as default
|
|
137
148
|
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import type { Collection } from '@scalar/oas-utils/entities/workspace/collection';
|
|
2
|
+
import type { Folder } from '@scalar/oas-utils/entities/workspace/folder';
|
|
1
3
|
import type { Request, RequestExample } from '@scalar/oas-utils/entities/workspace/spec';
|
|
2
4
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
-
|
|
5
|
+
/** Both inidicate the level and provide a way to traverse upwards */
|
|
6
|
+
parentUids: string[];
|
|
7
|
+
item: Collection | Folder | Request | RequestExample;
|
|
4
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
5
|
-
|
|
9
|
+
/** Both inidicate the level and provide a way to traverse upwards */
|
|
10
|
+
parentUids: string[];
|
|
11
|
+
item: Collection | Folder | Request | RequestExample;
|
|
6
12
|
}>>>, {}, {}>;
|
|
7
13
|
export default _default;
|
|
8
14
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -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":"AAkPA,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;;IAOhD,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;IAFpD,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;AAghBtD,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,93 +1,101 @@
|
|
|
1
|
-
import { defineComponent as V, computed as
|
|
2
|
-
import
|
|
3
|
-
import { commandPaletteBus as
|
|
4
|
-
import { PathId as
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
import { useModal as
|
|
7
|
-
import { useRouter as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as V, computed as p, ref as I, openBlock as M, createElementBlock as B, Fragment as A, createVNode as l, unref as t, withCtx as a, createBlock as F, createCommentVNode as P, withKeys as T, withModifiers as K, createElementVNode as u, createTextVNode as b } from "vue";
|
|
2
|
+
import W from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import { commandPaletteBus as j } from "../../libs/eventBusses/command-palette.js";
|
|
4
|
+
import { PathId as E } from "../../router.js";
|
|
5
|
+
import { useWorkspace as G } from "../../store/workspace.js";
|
|
6
|
+
import { useModal as R, ScalarDropdown as H, ScalarDropdownItem as f, ScalarIcon as r, ScalarButton as v, ScalarModal as N, ScalarTextField as J } from "@scalar/components";
|
|
7
|
+
import { useRouter as L } from "vue-router";
|
|
8
|
+
const O = /* @__PURE__ */ u("span", null, "Add Example", -1), Q = /* @__PURE__ */ u("span", null, "Rename", -1), X = /* @__PURE__ */ u("span", null, "Delete", -1), Y = { class: "flex gap-3" }, se = /* @__PURE__ */ V({
|
|
9
9
|
__name: "RequestSidebarItemMenu",
|
|
10
10
|
props: {
|
|
11
|
+
parentUids: {},
|
|
11
12
|
item: {}
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
activeWorkspace:
|
|
16
|
-
activeRouterParams:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
setup(S) {
|
|
15
|
+
const e = S, {
|
|
16
|
+
activeWorkspace: x,
|
|
17
|
+
activeRouterParams: h,
|
|
18
|
+
collectionMutators: k,
|
|
19
|
+
folderMutators: _,
|
|
20
|
+
requestMutators: C,
|
|
21
|
+
requestExampleMutators: y
|
|
22
|
+
} = G(), { replace: g } = L(), U = () => j.emit({
|
|
21
23
|
commandName: "Add Example",
|
|
22
|
-
metaData:
|
|
23
|
-
}),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
metaData: e.item.uid
|
|
25
|
+
}), $ = () => {
|
|
26
|
+
"requestUid" in e.item ? (y.delete(e.item), h.value[E.Examples] === e.item.uid && g(`/workspace/${x.value}/request/default`)) : "summary" in e.item ? (C.delete(
|
|
27
|
+
e.item,
|
|
28
|
+
e.parentUids[e.parentUids.length - 1]
|
|
29
|
+
), h.value[E.Request] === e.item.uid && g(`/workspace/${x.value.uid}/request/default`)) : "spec" in e.item ? k.delete(e.item) : "name" in e.item && _.delete(
|
|
30
|
+
e.item,
|
|
31
|
+
e.parentUids[e.parentUids.length - 1]
|
|
32
|
+
);
|
|
33
|
+
}, z = p(() => "summary" in e.item), w = p(() => {
|
|
34
|
+
var c;
|
|
35
|
+
return "summary" in e.item ? e.item.summary || "" : "name" in e.item ? e.item.name || "" : "spec" in e.item && ((c = e.item.spec.info) == null ? void 0 : c.title) || "";
|
|
36
|
+
}), n = I(""), q = () => {
|
|
37
|
+
"summary" in e.item ? C.edit(e.item.uid, "summary", n.value) : "requestUid" in e.item ? y.edit(e.item.uid, "name", n.value) : "spec" in e.item ? k.edit(e.item.uid, "spec.info.title", n.value) : _.edit(e.item.uid, "name", n.value), m.hide();
|
|
38
|
+
}, m = R(), d = R(), D = () => {
|
|
39
|
+
n.value = w.value, m.show();
|
|
40
|
+
}, o = p(() => "requestUid" in e.item ? "Example" : "summary" in e.item ? "Request" : "spec" in e.item ? "Collection" : "Folder");
|
|
41
|
+
return (c, i) => (M(), B(A, null, [
|
|
42
|
+
l(t(H), { teleport: "#scalar-client" }, {
|
|
43
|
+
items: a(() => [
|
|
44
|
+
z.value ? (M(), F(t(f), {
|
|
40
45
|
key: 0,
|
|
41
46
|
class: "flex !gap-2",
|
|
42
|
-
onClick:
|
|
47
|
+
onClick: U
|
|
43
48
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
|
|
49
|
+
default: a(() => [
|
|
50
|
+
l(t(r), {
|
|
46
51
|
class: "inline-flex",
|
|
47
52
|
icon: "Add",
|
|
48
53
|
size: "sm"
|
|
49
54
|
}),
|
|
50
|
-
|
|
55
|
+
O
|
|
51
56
|
]),
|
|
52
57
|
_: 1
|
|
53
|
-
})) :
|
|
54
|
-
|
|
58
|
+
})) : P("", !0),
|
|
59
|
+
l(t(f), {
|
|
55
60
|
class: "flex !gap-2",
|
|
56
|
-
onClick:
|
|
61
|
+
onClick: D
|
|
57
62
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
63
|
+
default: a(() => [
|
|
64
|
+
l(t(r), {
|
|
60
65
|
class: "inline-flex",
|
|
61
66
|
icon: "Edit",
|
|
62
67
|
size: "sm"
|
|
63
68
|
}),
|
|
64
|
-
|
|
69
|
+
Q
|
|
65
70
|
]),
|
|
66
71
|
_: 1
|
|
67
72
|
}),
|
|
68
|
-
|
|
73
|
+
l(t(f), {
|
|
69
74
|
class: "flex !gap-2",
|
|
70
|
-
onClick:
|
|
75
|
+
onClick: i[1] || (i[1] = (s) => t(d).show())
|
|
71
76
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
77
|
+
default: a(() => [
|
|
78
|
+
l(t(r), {
|
|
74
79
|
class: "inline-flex",
|
|
75
80
|
icon: "Trash",
|
|
76
81
|
size: "sm"
|
|
77
82
|
}),
|
|
78
|
-
|
|
83
|
+
X
|
|
79
84
|
]),
|
|
80
85
|
_: 1
|
|
81
86
|
})
|
|
82
87
|
]),
|
|
83
|
-
default:
|
|
84
|
-
|
|
85
|
-
class: "z-10 hover:bg-b-3
|
|
88
|
+
default: a(() => [
|
|
89
|
+
l(t(v), {
|
|
90
|
+
class: "px-1 py-0 z-10 hover:bg-b-3 hidden group-hover:flex ui-open:flex",
|
|
86
91
|
size: "sm",
|
|
87
|
-
variant: "ghost"
|
|
92
|
+
variant: "ghost",
|
|
93
|
+
onClick: i[0] || (i[0] = (s) => {
|
|
94
|
+
(o.value === "Collection" || o.value === "Folder") && s.stopPropagation();
|
|
95
|
+
})
|
|
88
96
|
}, {
|
|
89
|
-
default:
|
|
90
|
-
|
|
97
|
+
default: a(() => [
|
|
98
|
+
l(t(r), {
|
|
91
99
|
icon: "Ellipses",
|
|
92
100
|
size: "sm"
|
|
93
101
|
})
|
|
@@ -97,48 +105,50 @@ const H = /* @__PURE__ */ r("span", null, "Add Example", -1), J = /* @__PURE__ *
|
|
|
97
105
|
]),
|
|
98
106
|
_: 1
|
|
99
107
|
}),
|
|
100
|
-
|
|
108
|
+
l(t(N), {
|
|
101
109
|
size: "sm",
|
|
102
|
-
state:
|
|
103
|
-
title:
|
|
110
|
+
state: t(d),
|
|
111
|
+
title: `Delete ${o.value}`
|
|
104
112
|
}, {
|
|
105
|
-
default:
|
|
106
|
-
|
|
107
|
-
variableName:
|
|
108
|
-
onClose:
|
|
109
|
-
onDelete:
|
|
113
|
+
default: a(() => [
|
|
114
|
+
l(W, {
|
|
115
|
+
variableName: w.value,
|
|
116
|
+
onClose: i[2] || (i[2] = (s) => t(d).hide()),
|
|
117
|
+
onDelete: $
|
|
110
118
|
}, null, 8, ["variableName"])
|
|
111
119
|
]),
|
|
112
120
|
_: 1
|
|
113
121
|
}, 8, ["state", "title"]),
|
|
114
|
-
|
|
115
|
-
state:
|
|
116
|
-
title:
|
|
122
|
+
l(t(N), {
|
|
123
|
+
state: t(m),
|
|
124
|
+
title: `Rename ${o.value}`
|
|
117
125
|
}, {
|
|
118
|
-
default:
|
|
119
|
-
|
|
120
|
-
modelValue:
|
|
121
|
-
"onUpdate:modelValue":
|
|
122
|
-
label:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
default: a(() => [
|
|
127
|
+
l(t(J), {
|
|
128
|
+
modelValue: n.value,
|
|
129
|
+
"onUpdate:modelValue": i[3] || (i[3] = (s) => n.value = s),
|
|
130
|
+
label: o.value,
|
|
131
|
+
labelShadowColor: "var(--scalar-background-1)",
|
|
132
|
+
onKeydown: T(K(q, ["prevent"]), ["enter"])
|
|
133
|
+
}, null, 8, ["modelValue", "label", "onKeydown"]),
|
|
134
|
+
u("div", Y, [
|
|
135
|
+
l(t(v), {
|
|
126
136
|
class: "flex-1",
|
|
127
137
|
variant: "outlined",
|
|
128
|
-
onClick:
|
|
138
|
+
onClick: i[4] || (i[4] = (s) => t(m).hide())
|
|
129
139
|
}, {
|
|
130
|
-
default:
|
|
131
|
-
|
|
140
|
+
default: a(() => [
|
|
141
|
+
b(" Cancel ")
|
|
132
142
|
]),
|
|
133
143
|
_: 1
|
|
134
144
|
}),
|
|
135
|
-
|
|
145
|
+
l(t(v), {
|
|
136
146
|
class: "flex-1",
|
|
137
147
|
type: "submit",
|
|
138
|
-
onClick:
|
|
148
|
+
onClick: q
|
|
139
149
|
}, {
|
|
140
|
-
default:
|
|
141
|
-
|
|
150
|
+
default: a(() => [
|
|
151
|
+
b(" Save ")
|
|
142
152
|
]),
|
|
143
153
|
_: 1
|
|
144
154
|
})
|
|
@@ -150,5 +160,5 @@ const H = /* @__PURE__ */ r("span", null, "Add Example", -1), J = /* @__PURE__ *
|
|
|
150
160
|
}
|
|
151
161
|
});
|
|
152
162
|
export {
|
|
153
|
-
|
|
163
|
+
se as default
|
|
154
164
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.38",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -126,11 +126,11 @@
|
|
|
126
126
|
"vue": "^3.4.29",
|
|
127
127
|
"vue-router": "^4.3.0",
|
|
128
128
|
"zod": "^3.22.4",
|
|
129
|
-
"@scalar/components": "0.12.
|
|
129
|
+
"@scalar/components": "0.12.24",
|
|
130
130
|
"@scalar/draggable": "0.1.3",
|
|
131
|
-
"@scalar/oas-utils": "0.2.
|
|
131
|
+
"@scalar/oas-utils": "0.2.20",
|
|
132
132
|
"@scalar/object-utils": "1.1.5",
|
|
133
|
-
"@scalar/themes": "0.9.
|
|
133
|
+
"@scalar/themes": "0.9.17",
|
|
134
134
|
"@scalar/use-codemirror": "0.11.8",
|
|
135
135
|
"@scalar/use-toasts": "0.7.4",
|
|
136
136
|
"@scalar/use-tooltip": "1.0.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleKeyDown.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/handleKeyDown.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,UACjB,aAAa,gBACN,MAAM,IAAI,SAOzB,CAAA"}
|