@scalar/api-client 2.2.3 → 2.2.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 +69 -0
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +15 -15
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +24 -24
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -5
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +5 -6
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -8
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +37 -47
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +16 -17
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +85 -84
- package/dist/components/ImportCollection/ImportNowButton.vue.js +3 -3
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +24 -26
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +6 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +28 -23
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +1 -1
- package/dist/components/OpenApiClientButton.vue2.js +16 -16
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +72 -70
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue2.js +83 -81
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -6
- package/dist/layouts/App/create-api-client-app.d.ts +3 -2
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +6 -6
- package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -4
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +3 -2
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +4 -4
- package/dist/libs/create-client.d.ts +6 -5
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +38 -37
- package/dist/libs/index.d.ts +1 -2
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +20 -20
- package/dist/libs/send-request/index.d.ts +2 -0
- package/dist/libs/send-request/index.d.ts.map +1 -0
- package/dist/libs/send-request/index.js +9 -0
- package/dist/libs/{send-request.d.ts → send-request/send-request.d.ts} +6 -6
- package/dist/libs/send-request/send-request.d.ts.map +1 -0
- package/dist/libs/{send-request.js → send-request/send-request.js} +29 -29
- package/dist/store/events.d.ts +1 -1
- package/dist/store/import-spec.d.ts +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +1 -1
- package/dist/store/store.d.ts +6 -4
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +47 -45
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -20
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +76 -72
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +30 -30
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +20 -19
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +245 -191
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +60 -61
- 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 +188 -196
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +153 -147
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +24 -28
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +5 -5
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -25
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +41 -30
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +50 -58
- package/dist/views/Request/libs/oauth2.d.ts +6 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +43 -37
- package/package.json +18 -14
- package/dist/libs/send-request.d.ts.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { ScalarButton as
|
|
4
|
-
import { Draggable as
|
|
5
|
-
import { RouterLink as
|
|
6
|
-
import { PathId as
|
|
7
|
-
import
|
|
8
|
-
import { useSidebar as
|
|
9
|
-
import { getModifiers as
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const
|
|
1
|
+
import { defineComponent as ne, useCssVars as re, computed as c, ref as le, resolveComponent as ae, openBlock as f, createElementBlock as w, normalizeClass as m, unref as s, createVNode as g, withCtx as v, createBlock as b, withModifiers as k, createElementVNode as l, toDisplayString as I, createCommentVNode as h, createTextVNode as B, renderSlot as oe, Fragment as ue, renderList as de } from "vue";
|
|
2
|
+
import { useActiveEntities as pe } from "../../store/active-entities.js";
|
|
3
|
+
import { ScalarButton as q, ScalarIcon as y, ScalarTooltip as fe } from "@scalar/components";
|
|
4
|
+
import { Draggable as me } from "@scalar/draggable";
|
|
5
|
+
import { RouterLink as ce } from "vue-router";
|
|
6
|
+
import { PathId as ge } from "../../routes.js";
|
|
7
|
+
import ve from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
8
|
+
import { useSidebar as be } from "../../hooks/useSidebar.js";
|
|
9
|
+
import { getModifiers as he } from "../../libs/hot-keys.js";
|
|
10
|
+
import { useWorkspace as ye } from "../../store/store.js";
|
|
11
|
+
const xe = { class: "flex flex-row gap-1 items-center" }, we = { class: "relative" }, ke = { class: "flex items-start" }, qe = ["aria-expanded"], Ue = { class: "flex h-5 items-center justify-center max-w-[14px]" }, De = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Ce = { class: "relative flex h-fit" }, Re = { class: "grid gap-1.5 pointer-events-none max-w-10 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, Me = { class: "flex items-center text-c-2" }, Te = { class: "text-pretty break-all" }, Ie = { key: 2 }, j = "hover:bg-sidebar-active-b indent-padding-left", Ve = /* @__PURE__ */ ne({
|
|
12
12
|
__name: "RequestSidebarItem",
|
|
13
13
|
props: {
|
|
14
14
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -18,33 +18,33 @@ const we = { class: "flex flex-row gap-1 items-center" }, ke = { class: "relativ
|
|
|
18
18
|
menuItem: {}
|
|
19
19
|
},
|
|
20
20
|
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
21
|
-
setup(
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
setup(V, { emit: W }) {
|
|
22
|
+
re((e) => ({
|
|
23
|
+
"0640e307": Q.value,
|
|
24
|
+
"2b566157": X.value
|
|
25
25
|
}));
|
|
26
|
-
const
|
|
27
|
-
activeCollection:
|
|
28
|
-
router:
|
|
26
|
+
const n = V, F = W, {
|
|
27
|
+
activeCollection: Y,
|
|
28
|
+
router: H,
|
|
29
29
|
activeRequest: E,
|
|
30
|
-
activeRouterParams:
|
|
31
|
-
activeWorkspace:
|
|
32
|
-
} =
|
|
30
|
+
activeRouterParams: L,
|
|
31
|
+
activeWorkspace: U
|
|
32
|
+
} = pe(), {
|
|
33
33
|
collections: D,
|
|
34
|
-
tags:
|
|
35
|
-
isReadOnly:
|
|
34
|
+
tags: G,
|
|
35
|
+
isReadOnly: d,
|
|
36
36
|
requests: $,
|
|
37
37
|
requestExamples: C,
|
|
38
|
-
collectionMutators:
|
|
38
|
+
collectionMutators: R,
|
|
39
39
|
tagMutators: z,
|
|
40
40
|
requestMutators: S,
|
|
41
41
|
requestExampleMutators: N,
|
|
42
|
-
events:
|
|
43
|
-
} =
|
|
44
|
-
var
|
|
45
|
-
const e = D[
|
|
42
|
+
events: J
|
|
43
|
+
} = ye(), { collapsedSidebarFolders: M, toggleSidebarFolder: K } = be(), i = c(() => {
|
|
44
|
+
var r, p;
|
|
45
|
+
const e = D[n.uid], t = G[n.uid], a = $[n.uid], o = C[n.uid];
|
|
46
46
|
return e ? {
|
|
47
|
-
title: ((
|
|
47
|
+
title: ((r = e.info) == null ? void 0 : r.title) ?? "Unknown title",
|
|
48
48
|
entity: e,
|
|
49
49
|
resourceTitle: "Collection",
|
|
50
50
|
children: e.children,
|
|
@@ -52,93 +52,93 @@ const we = { class: "flex flex-row gap-1 items-center" }, ke = { class: "relativ
|
|
|
52
52
|
documentUrl: e.documentUrl,
|
|
53
53
|
watchMode: e.watchMode,
|
|
54
54
|
warning: "This cannot be undone. You’re about to delete the collection and all folders and requests inside it.",
|
|
55
|
-
edit: (
|
|
56
|
-
|
|
55
|
+
edit: (u, x) => {
|
|
56
|
+
R.edit(e.uid, "info.title", u), x && R.edit(e.uid, "x-scalar-icon", x);
|
|
57
57
|
},
|
|
58
|
-
delete: () =>
|
|
58
|
+
delete: () => R.delete(e, U.value)
|
|
59
59
|
} : t ? {
|
|
60
60
|
title: t.name,
|
|
61
61
|
entity: t,
|
|
62
62
|
resourceTitle: "Tag",
|
|
63
63
|
children: t.children,
|
|
64
64
|
warning: "This cannot be undone. You’re about to delete the tag and all requests inside it",
|
|
65
|
-
edit: (
|
|
66
|
-
delete: () => z.delete(t,
|
|
67
|
-
} :
|
|
68
|
-
title:
|
|
65
|
+
edit: (u) => z.edit(t.uid, "name", u),
|
|
66
|
+
delete: () => z.delete(t, n.parentUids[0])
|
|
67
|
+
} : a ? {
|
|
68
|
+
title: a.summary ?? a.path,
|
|
69
69
|
link: {
|
|
70
70
|
name: "request",
|
|
71
71
|
params: {
|
|
72
|
-
workspace:
|
|
73
|
-
request:
|
|
72
|
+
workspace: U.value.uid,
|
|
73
|
+
request: a.uid
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
-
method:
|
|
77
|
-
entity:
|
|
76
|
+
method: a.method,
|
|
77
|
+
entity: a,
|
|
78
78
|
resourceTitle: "Request",
|
|
79
79
|
warning: "This cannot be undone. You’re about to delete the request.",
|
|
80
|
-
children:
|
|
81
|
-
edit: (
|
|
82
|
-
delete: () => S.delete(
|
|
80
|
+
children: a.examples,
|
|
81
|
+
edit: (u) => S.edit(a.uid, "summary", u),
|
|
82
|
+
delete: () => S.delete(a, n.parentUids[0])
|
|
83
83
|
} : {
|
|
84
|
-
title:
|
|
84
|
+
title: o.name,
|
|
85
85
|
link: {
|
|
86
86
|
name: "request.examples",
|
|
87
87
|
params: {
|
|
88
|
-
workspace:
|
|
89
|
-
request:
|
|
90
|
-
examples:
|
|
88
|
+
workspace: U.value.uid,
|
|
89
|
+
request: o.requestUid,
|
|
90
|
+
examples: o.uid
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
method: (
|
|
94
|
-
entity:
|
|
93
|
+
method: (p = $[o.requestUid]) == null ? void 0 : p.method,
|
|
94
|
+
entity: o,
|
|
95
95
|
resourceTitle: "Example",
|
|
96
96
|
warning: "This cannot be undone. You’re about to delete the example from the request.",
|
|
97
97
|
children: [],
|
|
98
|
-
edit: (
|
|
99
|
-
delete: () => N.delete(
|
|
98
|
+
edit: (u) => N.edit(o.uid, "name", u),
|
|
99
|
+
delete: () => N.delete(o)
|
|
100
100
|
};
|
|
101
|
-
}), O =
|
|
101
|
+
}), O = c(
|
|
102
102
|
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
103
|
-
),
|
|
103
|
+
), Q = c(() => n.parentUids.length ? d ? `${(n.parentUids.length - 1) * 12}px` : `${n.parentUids.length * 12}px` : "12px"), X = c(() => n.parentUids.length ? d ? `${(n.parentUids.length - 1) * 12}px` : `${n.parentUids.length * 12}px` : "0px"), Z = c(
|
|
104
104
|
() => {
|
|
105
105
|
var e;
|
|
106
|
-
return
|
|
106
|
+
return M[n.uid] || ((e = E.value) == null ? void 0 : e.uid) === n.uid && i.value.entity.examples.length > 1;
|
|
107
107
|
}
|
|
108
|
-
),
|
|
108
|
+
), _ = c(
|
|
109
109
|
() => {
|
|
110
110
|
var e;
|
|
111
|
-
return
|
|
111
|
+
return L.value[ge.Request] === "default" && ((e = E.value) == null ? void 0 : e.uid) === n.uid;
|
|
112
112
|
}
|
|
113
|
-
), T =
|
|
113
|
+
), T = le(null), P = c(() => {
|
|
114
114
|
let e = 0.5, t = 0.5;
|
|
115
115
|
if (!T.value) return { ceiling: e, floor: t };
|
|
116
|
-
const { draggingItem:
|
|
117
|
-
return !D[
|
|
118
|
-
}),
|
|
119
|
-
e && (
|
|
116
|
+
const { draggingItem: a } = T.value;
|
|
117
|
+
return !D[a == null ? void 0 : a.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 };
|
|
118
|
+
}), ee = (e, t) => !(d || C[t.id] || D[e.id]), te = (e, t) => {
|
|
119
|
+
e && (he(["default"]).some((r) => e[r]) ? F("newTab", t.title || "", t.entity.uid) : t.link && H.push(t.link));
|
|
120
120
|
};
|
|
121
|
-
function
|
|
122
|
-
|
|
121
|
+
function A() {
|
|
122
|
+
J.commandPalette.emit({
|
|
123
123
|
commandName: "Create Request",
|
|
124
124
|
metaData: {
|
|
125
|
-
itemUid:
|
|
126
|
-
parentUid:
|
|
125
|
+
itemUid: n.uid,
|
|
126
|
+
parentUid: n.parentUids[0]
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
const ie =
|
|
131
|
-
const { uid: e, watchModeStatus: t } =
|
|
130
|
+
const ie = c(() => {
|
|
131
|
+
const { uid: e, watchModeStatus: t } = Y.value || {};
|
|
132
132
|
return e !== i.value.entity.uid ? "text-c-3" : t === "WATCHING" ? "text-c-1" : t === "ERROR" ? "text-red" : "text-c-3";
|
|
133
|
-
}),
|
|
133
|
+
}), se = c(() => i.value.title == "Drafts" && !d && i.value.children.length > 0);
|
|
134
134
|
return (e, t) => {
|
|
135
|
-
const
|
|
136
|
-
return
|
|
135
|
+
const a = ae("RequestSidebarItem", !0);
|
|
136
|
+
return f(), w("li", {
|
|
137
137
|
class: m(["relative flex flex-row", [
|
|
138
|
-
|
|
138
|
+
s(d) && e.parentUids.length > 1 || !s(d) && e.parentUids.length ? "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
139
139
|
]])
|
|
140
140
|
}, [
|
|
141
|
-
|
|
141
|
+
g(s(me), {
|
|
142
142
|
id: i.value.entity.uid,
|
|
143
143
|
ref_key: "draggableRef",
|
|
144
144
|
ref: T,
|
|
@@ -148,215 +148,207 @@ const we = { class: "flex flex-row gap-1 items-center" }, ke = { class: "relativ
|
|
|
148
148
|
isDraggable: e.isDraggable,
|
|
149
149
|
isDroppable: e.isDroppable,
|
|
150
150
|
parentIds: e.parentUids,
|
|
151
|
-
onOnDragEnd: t[9] || (t[9] = (...
|
|
151
|
+
onOnDragEnd: t[9] || (t[9] = (...o) => e.$emit("onDragEnd", ...o))
|
|
152
152
|
}, {
|
|
153
|
-
default:
|
|
154
|
-
var
|
|
153
|
+
default: v(() => {
|
|
154
|
+
var o;
|
|
155
155
|
return [
|
|
156
|
-
i.value.link ? (
|
|
156
|
+
i.value.link ? (f(), b(s(ce), {
|
|
157
157
|
key: 0,
|
|
158
158
|
class: "group no-underline",
|
|
159
159
|
to: i.value.link,
|
|
160
160
|
onClick: t[1] || (t[1] = k(
|
|
161
|
-
(
|
|
161
|
+
(r) => te(r, i.value),
|
|
162
162
|
["prevent"]
|
|
163
163
|
))
|
|
164
164
|
}, {
|
|
165
|
-
default:
|
|
166
|
-
var
|
|
165
|
+
default: v(({ isExactActive: r }) => {
|
|
166
|
+
var p, u;
|
|
167
167
|
return [
|
|
168
|
-
|
|
168
|
+
l("div", {
|
|
169
169
|
class: m(["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", [
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
j,
|
|
171
|
+
r || _.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
172
172
|
]])
|
|
173
173
|
}, [
|
|
174
|
-
|
|
174
|
+
l("span", {
|
|
175
175
|
class: m(["line-clamp-3 font-medium w-full pl-2 word-break-break-word", {
|
|
176
|
-
"editable-sidebar-hover-item": !
|
|
176
|
+
"editable-sidebar-hover-item": !s(d)
|
|
177
177
|
}])
|
|
178
178
|
}, I(i.value.title), 3),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
l("div", xe, [
|
|
180
|
+
l("div", we, [
|
|
181
|
+
s(d) ? h("", !0) : (f(), b(s(q), {
|
|
182
182
|
key: 0,
|
|
183
183
|
class: m(["px-0.5 py-0 hover:bg-b-3 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
184
|
-
flex: ((
|
|
184
|
+
flex: ((u = (p = e.menuItem) == null ? void 0 : p.item) == null ? void 0 : u.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
185
185
|
}]),
|
|
186
186
|
size: "sm",
|
|
187
187
|
type: "button",
|
|
188
188
|
variant: "ghost",
|
|
189
189
|
onClick: t[0] || (t[0] = k(
|
|
190
|
-
(
|
|
190
|
+
(x) => e.$emit("openMenu", {
|
|
191
191
|
item: i.value,
|
|
192
192
|
parentUids: e.parentUids,
|
|
193
|
-
targetRef:
|
|
194
|
-
open: !
|
|
193
|
+
targetRef: x.currentTarget,
|
|
194
|
+
open: !e.menuItem.open
|
|
195
195
|
}),
|
|
196
196
|
["stop", "prevent"]
|
|
197
197
|
))
|
|
198
198
|
}, {
|
|
199
|
-
default:
|
|
200
|
-
|
|
199
|
+
default: v(() => [
|
|
200
|
+
g(s(y), {
|
|
201
201
|
icon: "Ellipses",
|
|
202
|
-
size: "
|
|
202
|
+
size: "md"
|
|
203
203
|
})
|
|
204
204
|
]),
|
|
205
205
|
_: 1
|
|
206
206
|
}, 8, ["class"]))
|
|
207
207
|
]),
|
|
208
|
-
|
|
209
|
-
t[10] || (t[10] =
|
|
210
|
-
t[11] || (t[11] =
|
|
211
|
-
i.value.method ? (
|
|
208
|
+
l("span", ke, [
|
|
209
|
+
t[10] || (t[10] = B(" ")),
|
|
210
|
+
t[11] || (t[11] = l("span", { class: "sr-only" }, "HTTP Method:", -1)),
|
|
211
|
+
i.value.method ? (f(), b(s(ve), {
|
|
212
212
|
key: 0,
|
|
213
213
|
class: "font-bold",
|
|
214
214
|
method: i.value.method
|
|
215
|
-
}, null, 8, ["method"])) :
|
|
215
|
+
}, null, 8, ["method"])) : h("", !0)
|
|
216
216
|
])
|
|
217
217
|
])
|
|
218
218
|
], 2)
|
|
219
219
|
];
|
|
220
220
|
}),
|
|
221
221
|
_: 1
|
|
222
|
-
}, 8, ["to"])) : !
|
|
222
|
+
}, 8, ["to"])) : !s(d) || e.parentUids.length ? (f(), w("button", {
|
|
223
223
|
key: 1,
|
|
224
|
-
"aria-expanded":
|
|
225
|
-
class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 focus-visible:z-10",
|
|
224
|
+
"aria-expanded": s(M)[i.value.entity.uid],
|
|
225
|
+
class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 focus-visible:z-10", j]),
|
|
226
226
|
type: "button",
|
|
227
|
-
onClick: t[4] || (t[4] = (
|
|
227
|
+
onClick: t[4] || (t[4] = (r) => s(K)(i.value.entity.uid))
|
|
228
228
|
}, [
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
l("span", Ue, [
|
|
230
|
+
oe(e.$slots, "leftIcon", {}, () => [
|
|
231
|
+
l("div", {
|
|
232
232
|
class: m({
|
|
233
|
-
"rotate-90":
|
|
233
|
+
"rotate-90": s(M)[i.value.entity.uid]
|
|
234
234
|
})
|
|
235
235
|
}, [
|
|
236
|
-
|
|
236
|
+
g(s(y), {
|
|
237
237
|
class: "text-c-3 text-sm",
|
|
238
238
|
icon: "ChevronRight",
|
|
239
|
-
size: "
|
|
240
|
-
thickness: "2.5"
|
|
239
|
+
size: "md"
|
|
241
240
|
})
|
|
242
241
|
], 2)
|
|
243
242
|
], !0),
|
|
244
|
-
t[12] || (t[12] =
|
|
243
|
+
t[12] || (t[12] = B(" "))
|
|
245
244
|
]),
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
l("div", De, [
|
|
246
|
+
l("span", {
|
|
248
247
|
class: m(["line-clamp-3 font-medium text-left w-full word-break-break-word", {
|
|
249
|
-
"editable-sidebar-hover-item": !
|
|
248
|
+
"editable-sidebar-hover-item": !s(d)
|
|
250
249
|
}])
|
|
251
250
|
}, I(i.value.title), 3),
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
l("div", Ce, [
|
|
252
|
+
l("div", {
|
|
253
|
+
class: m(["flex items-center opacity-0 gap-px group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 absolute -translate-y-1/2 -right-px inset-y-2/4", {
|
|
254
|
+
flex: ((o = e.menuItem.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open,
|
|
255
|
+
"!right-5": i.value.watchMode
|
|
256
|
+
}])
|
|
257
|
+
}, [
|
|
258
|
+
!s(d) && !O.value || O.value && se.value ? (f(), b(s(q), {
|
|
259
|
+
key: 0,
|
|
260
|
+
class: "px-0.5 py-0 hover:bg-b-3 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 aspect-square h-fit",
|
|
261
|
+
size: "sm",
|
|
262
|
+
variant: "ghost",
|
|
263
|
+
onClick: t[2] || (t[2] = k(
|
|
264
|
+
(r) => e.$emit("openMenu", {
|
|
265
|
+
item: i.value,
|
|
266
|
+
parentUids: e.parentUids,
|
|
267
|
+
targetRef: r.currentTarget.parentNode,
|
|
268
|
+
open: !0
|
|
269
|
+
}),
|
|
270
|
+
["stop", "prevent"]
|
|
271
|
+
))
|
|
272
|
+
}, {
|
|
273
|
+
default: v(() => [
|
|
274
|
+
g(s(y), {
|
|
275
|
+
icon: "Ellipses",
|
|
276
|
+
size: "md"
|
|
277
|
+
})
|
|
278
|
+
]),
|
|
279
|
+
_: 1
|
|
280
|
+
})) : h("", !0),
|
|
281
|
+
g(s(q), {
|
|
282
|
+
class: "px-0.5 py-0 hover:bg-b-3 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 aspect-square h-fit",
|
|
283
|
+
size: "sm",
|
|
284
|
+
variant: "ghost",
|
|
285
|
+
onClick: t[3] || (t[3] = k((r) => A(), ["stop", "prevent"]))
|
|
286
|
+
}, {
|
|
287
|
+
default: v(() => [
|
|
288
|
+
g(s(y), {
|
|
289
|
+
icon: "Add",
|
|
290
|
+
size: "md",
|
|
291
|
+
thickness: "2"
|
|
292
|
+
})
|
|
293
|
+
]),
|
|
294
|
+
_: 1
|
|
295
|
+
})
|
|
296
|
+
], 2),
|
|
297
|
+
i.value.watchMode ? (f(), b(s(fe), {
|
|
254
298
|
key: 0,
|
|
255
|
-
class: m(["px-0.5 py-0 hover:bg-b-3 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
256
|
-
flex: ((u = e.menuItem.item) == null ? void 0 : u.entity.uid) === i.value.entity.uid && e.menuItem.open,
|
|
257
|
-
"right-5": i.value.watchMode
|
|
258
|
-
}]),
|
|
259
|
-
size: "sm",
|
|
260
|
-
variant: "ghost",
|
|
261
|
-
onClick: t[2] || (t[2] = k(
|
|
262
|
-
(l) => e.$emit("openMenu", {
|
|
263
|
-
item: i.value,
|
|
264
|
-
parentUids: e.parentUids,
|
|
265
|
-
targetRef: l.currentTarget.parentNode,
|
|
266
|
-
open: !0
|
|
267
|
-
}),
|
|
268
|
-
["stop", "prevent"]
|
|
269
|
-
))
|
|
270
|
-
}, {
|
|
271
|
-
default: c(() => [
|
|
272
|
-
y(n(x), {
|
|
273
|
-
icon: "Ellipses",
|
|
274
|
-
size: "sm"
|
|
275
|
-
})
|
|
276
|
-
]),
|
|
277
|
-
_: 1
|
|
278
|
-
}, 8, ["class"])) : v("", !0),
|
|
279
|
-
O.value && ne.value ? (d(), g(n(U), {
|
|
280
|
-
key: 1,
|
|
281
|
-
class: m(["px-0.5 py-0 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
282
|
-
flex: ((b = e.menuItem.item) == null ? void 0 : b.entity.uid) === i.value.entity.uid && e.menuItem.open,
|
|
283
|
-
"right-5": i.value.watchMode
|
|
284
|
-
}]),
|
|
285
|
-
size: "sm",
|
|
286
|
-
variant: "ghost",
|
|
287
|
-
onClick: t[3] || (t[3] = k(
|
|
288
|
-
(l) => e.$emit("openMenu", {
|
|
289
|
-
item: i.value,
|
|
290
|
-
parentUids: e.parentUids,
|
|
291
|
-
targetRef: l.currentTarget.parentNode,
|
|
292
|
-
open: !0
|
|
293
|
-
}),
|
|
294
|
-
["stop", "prevent"]
|
|
295
|
-
))
|
|
296
|
-
}, {
|
|
297
|
-
default: c(() => [
|
|
298
|
-
y(n(x), {
|
|
299
|
-
icon: "Ellipses",
|
|
300
|
-
size: "sm"
|
|
301
|
-
})
|
|
302
|
-
]),
|
|
303
|
-
_: 1
|
|
304
|
-
}, 8, ["class"])) : v("", !0),
|
|
305
|
-
i.value.watchMode ? (d(), g(n(fe), {
|
|
306
|
-
key: 2,
|
|
307
299
|
side: "right",
|
|
308
300
|
sideOffset: 12
|
|
309
301
|
}, {
|
|
310
|
-
trigger:
|
|
311
|
-
|
|
302
|
+
trigger: v(() => [
|
|
303
|
+
g(s(y), {
|
|
312
304
|
class: m(["text-sm", ie.value]),
|
|
313
305
|
icon: "Watch",
|
|
314
|
-
size: "
|
|
315
|
-
thickness: "2
|
|
306
|
+
size: "md",
|
|
307
|
+
thickness: "2"
|
|
316
308
|
}, null, 8, ["class"])
|
|
317
309
|
]),
|
|
318
|
-
content:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
310
|
+
content: v(() => [
|
|
311
|
+
l("div", Re, [
|
|
312
|
+
l("div", Me, [
|
|
313
|
+
l("p", Te, " Watching: " + I(i.value.documentUrl), 1)
|
|
322
314
|
])
|
|
323
315
|
])
|
|
324
316
|
]),
|
|
325
317
|
_: 1
|
|
326
|
-
})) :
|
|
327
|
-
t[13] || (t[13] =
|
|
318
|
+
})) : h("", !0),
|
|
319
|
+
t[13] || (t[13] = l("span", null, " ", -1))
|
|
328
320
|
])
|
|
329
321
|
])
|
|
330
|
-
], 8, qe)) :
|
|
331
|
-
|
|
332
|
-
(
|
|
333
|
-
key:
|
|
334
|
-
isDraggable: !
|
|
335
|
-
isDroppable:
|
|
322
|
+
], 8, qe)) : h("", !0),
|
|
323
|
+
Z.value ? (f(), w("ul", Ie, [
|
|
324
|
+
(f(!0), w(ue, null, de(i.value.children, (r) => (f(), b(a, {
|
|
325
|
+
key: r,
|
|
326
|
+
isDraggable: !s(C)[r],
|
|
327
|
+
isDroppable: ee,
|
|
336
328
|
menuItem: e.menuItem,
|
|
337
329
|
parentUids: [...e.parentUids, e.uid],
|
|
338
|
-
uid:
|
|
339
|
-
onNewTab: t[5] || (t[5] = (
|
|
340
|
-
onOnDragEnd: t[6] || (t[6] = (...
|
|
341
|
-
onOpenMenu: t[7] || (t[7] = (
|
|
330
|
+
uid: r,
|
|
331
|
+
onNewTab: t[5] || (t[5] = (p, u) => e.$emit("newTab", p, u)),
|
|
332
|
+
onOnDragEnd: t[6] || (t[6] = (...p) => e.$emit("onDragEnd", ...p)),
|
|
333
|
+
onOpenMenu: t[7] || (t[7] = (p) => e.$emit("openMenu", p))
|
|
342
334
|
}, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
|
|
343
|
-
i.value.children.length === 0 ? (
|
|
335
|
+
i.value.children.length === 0 ? (f(), b(s(q), {
|
|
344
336
|
key: 0,
|
|
345
337
|
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" : ""]),
|
|
346
338
|
variant: "ghost",
|
|
347
|
-
onClick: t[8] || (t[8] = (
|
|
339
|
+
onClick: t[8] || (t[8] = (r) => A())
|
|
348
340
|
}, {
|
|
349
|
-
default:
|
|
350
|
-
|
|
341
|
+
default: v(() => [
|
|
342
|
+
g(s(y), {
|
|
351
343
|
class: "ml-0.5 h-2.5 w-2.5",
|
|
352
344
|
icon: "Add",
|
|
353
345
|
thickness: "3"
|
|
354
346
|
}),
|
|
355
|
-
t[14] || (t[14] =
|
|
347
|
+
t[14] || (t[14] = l("span", null, "Add Request", -1))
|
|
356
348
|
]),
|
|
357
349
|
_: 1
|
|
358
|
-
}, 8, ["class"])) :
|
|
359
|
-
])) :
|
|
350
|
+
}, 8, ["class"])) : h("", !0)
|
|
351
|
+
])) : h("", !0)
|
|
360
352
|
];
|
|
361
353
|
}),
|
|
362
354
|
_: 3
|
|
@@ -366,5 +358,5 @@ const we = { class: "flex flex-row gap-1 items-center" }, ke = { class: "relativ
|
|
|
366
358
|
}
|
|
367
359
|
});
|
|
368
360
|
export {
|
|
369
|
-
|
|
361
|
+
Ve as default
|
|
370
362
|
};
|
|
@@ -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":"AA8QA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAe5D,KAAK,WAAW,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC;;;;;;;;;;AA+iBjD,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "./RequestSidebarItemMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const a = /* @__PURE__ */ t
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-4505d1d7"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|