@scalar/api-client 2.26.1 → 2.27.1
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 +102 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +48 -43
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -10
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +101 -100
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +62 -69
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +36 -2
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +38 -3
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +68 -69
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +35 -41
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +37 -41
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +107 -87
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +29 -37
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +2 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue2.js +45 -42
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +6 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +48 -46
- package/dist/v2/features/app/app-events.d.ts +1 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +95 -56
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +111 -105
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +12 -2
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +3 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/app/index.d.ts +0 -1
- package/dist/v2/features/app/index.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +13 -12
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +31 -34
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/helpers/index.d.ts +0 -1
- package/dist/v2/helpers/index.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +10 -0
- 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 +139 -155
- 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 +104 -101
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +20 -18
- package/dist/v2/helpers/plugins.d.ts +0 -65
- package/dist/v2/helpers/plugins.d.ts.map +0 -1
- package/dist/v2/helpers/plugins.js +0 -11
|
@@ -1,89 +1,84 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as we, ScalarIcon as
|
|
3
|
-
import { LibraryIcon as
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { defineComponent as pe, useId as ve, reactive as be, ref as z, watch as I, onMounted as he, onBeforeUnmount as ge, computed as C, createElementBlock as v, openBlock as r, Fragment as $, withDirectives as Se, createBlock as u, createCommentVNode as m, createVNode as b, unref as t, normalizeClass as S, createSlots as ke, withCtx as d, createElementVNode as n, createTextVNode as D, toDisplayString as A, withKeys as q, withModifiers as h, isRef as Re, renderList as F, vShow as ye } from "vue";
|
|
2
|
+
import { ScalarButton as we, ScalarIcon as H, ScalarSidebarSearchInput as xe, ScalarSearchResultList as Ie, ScalarSearchResultItem as Ce } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as $e } from "@scalar/icons/library";
|
|
4
|
+
import { useToasts as De } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as qe } from "vue-router";
|
|
6
|
+
import Me from "../../assets/rabbit.ascii.js";
|
|
7
|
+
import Te from "../../assets/rabbitjump.ascii.js";
|
|
8
|
+
import Pe from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
9
|
+
import _e from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
10
10
|
import K from "../../components/ScalarAsciiArt.vue.js";
|
|
11
|
-
import { useSearch as
|
|
12
|
-
import
|
|
13
|
-
import { useLayout as
|
|
14
|
-
import { useSidebar as
|
|
11
|
+
import { useSearch as Ve } from "../../components/Search/useSearch.js";
|
|
12
|
+
import Ee from "../../components/Sidebar/SidebarButton.vue.js";
|
|
13
|
+
import { useLayout as Le } from "../../hooks/useLayout.js";
|
|
14
|
+
import { useSidebar as Ne } from "../../hooks/useSidebar.js";
|
|
15
15
|
import { PathId as U } from "../../routes.js";
|
|
16
|
-
import { useActiveEntities as
|
|
16
|
+
import { useActiveEntities as Oe } from "../../store/active-entities.js";
|
|
17
17
|
import { createInitialRequest as Be } from "../../store/requests.js";
|
|
18
|
-
import { dragHandlerFactory as
|
|
19
|
-
import
|
|
18
|
+
import { dragHandlerFactory as We } from "./handle-drag.js";
|
|
19
|
+
import ze from "./RequestSidebarItemMenu.vue.js";
|
|
20
20
|
import { isGettingStarted as Ae } from "./RequestSection/helpers/getting-started.js";
|
|
21
|
-
import
|
|
22
|
-
import { useWorkspace as
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
const
|
|
21
|
+
import Fe from "./RequestSidebarItem.vue.js";
|
|
22
|
+
import { useWorkspace as He } from "../../store/store.js";
|
|
23
|
+
import Ke from "../../components/Sidebar/Sidebar.vue.js";
|
|
24
|
+
import Ue from "./components/WorkspaceDropdown.vue.js";
|
|
25
|
+
const Ge = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, je = {
|
|
26
26
|
key: 1,
|
|
27
27
|
class: "text-c-3"
|
|
28
|
-
},
|
|
28
|
+
}, Je = ["aria-pressed"], Qe = { class: "sr-only" }, Xe = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "search-button-fade sticky top-12 z-10 px-3 py-2.5 pt-0 focus-within:z-20",
|
|
31
31
|
role: "search"
|
|
32
|
-
},
|
|
32
|
+
}, Ye = {
|
|
33
33
|
key: 1,
|
|
34
34
|
class: "contents"
|
|
35
|
-
},
|
|
35
|
+
}, Ze = {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "empty-sidebar-item-content px-2.5 py-2.5"
|
|
38
|
-
},
|
|
38
|
+
}, et = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, Ct = /* @__PURE__ */ pe({
|
|
39
39
|
__name: "RequestSidebar",
|
|
40
40
|
emits: ["newTab", "clearDrafts"],
|
|
41
|
-
setup(
|
|
42
|
-
const j = G, {
|
|
43
|
-
|
|
44
|
-
isSidebarOpen: T,
|
|
45
|
-
setCollapsedSidebarFolder: Q,
|
|
46
|
-
toggleSidebarOpen: X
|
|
47
|
-
} = Oe(), { layout: l } = Ne(), P = Ke(), {
|
|
48
|
-
activeCollection: _,
|
|
41
|
+
setup(tt, { emit: G }) {
|
|
42
|
+
const j = G, { isSidebarOpen: M, setCollapsedSidebarFolder: J, toggleSidebarOpen: Q } = Ne(), { layout: l } = Le(), T = He(), {
|
|
43
|
+
activeCollection: P,
|
|
49
44
|
activeWorkspaceCollections: c,
|
|
50
|
-
activeRequest:
|
|
51
|
-
activeWorkspaceRequests:
|
|
52
|
-
activeWorkspace:
|
|
53
|
-
} =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
), { replace:
|
|
45
|
+
activeRequest: X,
|
|
46
|
+
activeWorkspaceRequests: _,
|
|
47
|
+
activeWorkspace: Y
|
|
48
|
+
} = Oe(), { findRequestParents: Z, events: k, requestMutators: V, requests: y } = T, { handleDragEnd: ee, isDroppable: te } = We(
|
|
49
|
+
Y,
|
|
50
|
+
T
|
|
51
|
+
), { replace: E } = qe(), oe = () => {
|
|
57
52
|
k.commandPalette.emit({
|
|
58
53
|
commandName: "Import from OpenAPI/Swagger/Postman/cURL"
|
|
59
54
|
});
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
}, L = ve(), { toast: se } = De(), g = be({ open: !1 }), f = z(!1);
|
|
56
|
+
I(
|
|
57
|
+
X,
|
|
63
58
|
(s) => {
|
|
64
|
-
s &&
|
|
65
|
-
(e) =>
|
|
59
|
+
s && Z(s).forEach(
|
|
60
|
+
(e) => J(e, !0)
|
|
66
61
|
);
|
|
67
62
|
},
|
|
68
63
|
{ immediate: !0 }
|
|
69
64
|
);
|
|
70
65
|
const {
|
|
71
66
|
searchText: p,
|
|
72
|
-
searchResultsWithPlaceholderResults:
|
|
73
|
-
selectedSearchResult:
|
|
67
|
+
searchResultsWithPlaceholderResults: w,
|
|
68
|
+
selectedSearchResult: x,
|
|
74
69
|
onSearchResultClick: ae,
|
|
75
|
-
fuseSearch:
|
|
76
|
-
searchInputRef:
|
|
77
|
-
searchResultRefs:
|
|
78
|
-
navigateSearchResults:
|
|
79
|
-
selectSearchResult:
|
|
80
|
-
} =
|
|
81
|
-
s && (s.toggleSidebar &&
|
|
70
|
+
fuseSearch: re,
|
|
71
|
+
searchInputRef: N,
|
|
72
|
+
searchResultRefs: le,
|
|
73
|
+
navigateSearchResults: O,
|
|
74
|
+
selectSearchResult: ne
|
|
75
|
+
} = Ve(), B = z(), W = (s) => {
|
|
76
|
+
s && (s.toggleSidebar && Q(), s.focusRequestSearch && N.value?.focus());
|
|
82
77
|
};
|
|
83
|
-
|
|
84
|
-
k.hotKeys.off(
|
|
78
|
+
he(() => k.hotKeys.on(W)), ge(() => {
|
|
79
|
+
k.hotKeys.off(W);
|
|
85
80
|
});
|
|
86
|
-
const
|
|
81
|
+
const ie = (s) => {
|
|
87
82
|
if (s?.documentUrl) {
|
|
88
83
|
s.watchMode = !s.watchMode;
|
|
89
84
|
const e = c.value.find(
|
|
@@ -92,48 +87,48 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
92
87
|
e && (e.watchMode = s.watchMode);
|
|
93
88
|
}
|
|
94
89
|
};
|
|
95
|
-
|
|
90
|
+
I(
|
|
96
91
|
() => c.value.map(
|
|
97
92
|
(s) => s.watchMode
|
|
98
93
|
),
|
|
99
94
|
(s, e) => {
|
|
100
|
-
s.forEach((o,
|
|
101
|
-
if (l !== "modal" && o !== e[
|
|
102
|
-
const i = c.value[
|
|
95
|
+
s.forEach((o, a) => {
|
|
96
|
+
if (l !== "modal" && o !== e[a] && c.value[a]?.info?.title !== "Drafts" && c.value[a]) {
|
|
97
|
+
const i = c.value[a];
|
|
103
98
|
if (!i)
|
|
104
99
|
return;
|
|
105
|
-
const
|
|
106
|
-
|
|
100
|
+
const fe = `${i.info?.title}: Watch Mode ${o ? "enabled" : "disabled"}`;
|
|
101
|
+
se(fe, "info");
|
|
107
102
|
}
|
|
108
103
|
});
|
|
109
104
|
}
|
|
110
105
|
);
|
|
111
|
-
const
|
|
112
|
-
const s =
|
|
106
|
+
const ue = C(() => {
|
|
107
|
+
const s = w.value;
|
|
113
108
|
if (!s.length)
|
|
114
109
|
return "No results found";
|
|
115
|
-
const e = s[
|
|
110
|
+
const e = s[x.value]?.item;
|
|
116
111
|
if (!e)
|
|
117
112
|
return "No result selected";
|
|
118
|
-
const o = p.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "",
|
|
113
|
+
const o = p.value.length ? `${s.length} result${s.length === 1 ? "" : "s"} found, ` : "", a = `, HTTP Method ${e.httpVerb}, Path ${e.path}`, i = `${e.title} ${a}`;
|
|
119
114
|
return `${o}Selected: ${i}`;
|
|
120
|
-
}),
|
|
115
|
+
}), ce = () => {
|
|
121
116
|
const s = c.value.find(
|
|
122
117
|
(o) => o.info?.title === "Drafts"
|
|
123
118
|
);
|
|
124
119
|
if (s && s.requests.forEach((o) => {
|
|
125
|
-
y[o] &&
|
|
126
|
-
}),
|
|
127
|
-
const
|
|
128
|
-
|
|
120
|
+
y[o] && V.delete(y[o], s.uid);
|
|
121
|
+
}), _.value.length) {
|
|
122
|
+
const a = c.value[0]?.requests[0];
|
|
123
|
+
a && E({
|
|
129
124
|
name: "request",
|
|
130
125
|
params: {
|
|
131
|
-
[U.Request]:
|
|
126
|
+
[U.Request]: a
|
|
132
127
|
}
|
|
133
128
|
});
|
|
134
129
|
} else {
|
|
135
130
|
const { request: o } = Be();
|
|
136
|
-
s && (
|
|
131
|
+
s && (V.add(o, s.uid), E({
|
|
137
132
|
name: "request",
|
|
138
133
|
params: {
|
|
139
134
|
[U.Request]: o.uid
|
|
@@ -141,31 +136,31 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
141
136
|
}));
|
|
142
137
|
}
|
|
143
138
|
};
|
|
144
|
-
|
|
139
|
+
I(f, (s) => {
|
|
145
140
|
s || (p.value = "");
|
|
146
141
|
});
|
|
147
|
-
const R =
|
|
142
|
+
const R = C(
|
|
148
143
|
() => Ae(
|
|
149
144
|
c.value,
|
|
150
|
-
|
|
145
|
+
_.value,
|
|
151
146
|
y
|
|
152
147
|
)
|
|
153
|
-
),
|
|
154
|
-
function
|
|
148
|
+
), de = C(() => l === "modal" && P.value ? [P.value] : c.value);
|
|
149
|
+
function me(s) {
|
|
155
150
|
!p.value && s.relatedTarget !== B.value && (f.value = !1);
|
|
156
151
|
}
|
|
157
|
-
return (s, e) => (
|
|
158
|
-
|
|
159
|
-
class:
|
|
160
|
-
},
|
|
152
|
+
return (s, e) => (r(), v($, null, [
|
|
153
|
+
Se(b(t(Ke), {
|
|
154
|
+
class: S([t(M) ? "sidebar-active-width" : ""])
|
|
155
|
+
}, ke({
|
|
161
156
|
content: d(() => [
|
|
162
|
-
n("div",
|
|
157
|
+
n("div", Ge, [
|
|
163
158
|
n("div", {
|
|
164
|
-
class:
|
|
159
|
+
class: S(["size-8", { "xl:hidden": t(l) !== "modal" }])
|
|
165
160
|
}, null, 2),
|
|
166
|
-
t(l) !== "modal" ? (
|
|
167
|
-
t(l) !== "modal" ? (
|
|
168
|
-
t(l) !== "modal" ? (
|
|
161
|
+
t(l) !== "modal" ? (r(), u(t(Ue), { key: 0 })) : m("", !0),
|
|
162
|
+
t(l) !== "modal" ? (r(), v("span", je, " / ")) : m("", !0),
|
|
163
|
+
t(l) !== "modal" ? (r(), u(Pe, { key: 2 })) : m("", !0),
|
|
169
164
|
n("button", {
|
|
170
165
|
ref_key: "searchToggleRef",
|
|
171
166
|
ref: B,
|
|
@@ -174,33 +169,33 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
174
169
|
type: "button",
|
|
175
170
|
onClick: e[0] || (e[0] = (o) => f.value = !f.value)
|
|
176
171
|
}, [
|
|
177
|
-
n("span",
|
|
178
|
-
|
|
172
|
+
n("span", Qe, A(f.value ? "Hide" : "Show") + " search ", 1),
|
|
173
|
+
b(t(H), {
|
|
179
174
|
class: "text-c-3 hover:bg-b-2 max-h-8 max-w-8 rounded-lg p-1.75 text-sm",
|
|
180
175
|
icon: "Search"
|
|
181
176
|
})
|
|
182
|
-
], 8,
|
|
177
|
+
], 8, Je)
|
|
183
178
|
]),
|
|
184
|
-
f.value ? (
|
|
185
|
-
|
|
179
|
+
f.value ? (r(), v("div", Xe, [
|
|
180
|
+
b(t(xe), {
|
|
186
181
|
ref_key: "searchInputRef",
|
|
187
|
-
ref:
|
|
182
|
+
ref: N,
|
|
188
183
|
modelValue: t(p),
|
|
189
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) =>
|
|
184
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => Re(p) ? p.value = o : null),
|
|
190
185
|
autofocus: "",
|
|
191
|
-
"aria-controls": t(
|
|
192
|
-
label:
|
|
193
|
-
onInput: t(
|
|
186
|
+
"aria-controls": t(L),
|
|
187
|
+
label: ue.value,
|
|
188
|
+
onInput: t(re),
|
|
194
189
|
onKeydown: [
|
|
195
|
-
e[2] || (e[2] = q(
|
|
196
|
-
e[3] || (e[3] = q(
|
|
197
|
-
e[4] || (e[4] = q(
|
|
190
|
+
e[2] || (e[2] = q(h((o) => t(O)("down"), ["stop"]), ["down"])),
|
|
191
|
+
e[3] || (e[3] = q(h((o) => t(ne)(), ["stop"]), ["enter"])),
|
|
192
|
+
e[4] || (e[4] = q(h((o) => t(O)("up"), ["stop"]), ["up"]))
|
|
198
193
|
],
|
|
199
|
-
onBlur:
|
|
194
|
+
onBlur: me
|
|
200
195
|
}, null, 8, ["modelValue", "aria-controls", "label", "onInput"])
|
|
201
196
|
])) : m("", !0),
|
|
202
197
|
n("div", {
|
|
203
|
-
class:
|
|
198
|
+
class: S(["gap-1/2 flex flex-1 flex-col overflow-visible overflow-y-auto px-3 pt-0 pb-3", [
|
|
204
199
|
{
|
|
205
200
|
"pb-14": t(l) !== "modal"
|
|
206
201
|
},
|
|
@@ -208,33 +203,33 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
208
203
|
"h-[calc(100%-273.5px)]": R.value
|
|
209
204
|
}
|
|
210
205
|
]]),
|
|
211
|
-
onDragenter: e[7] || (e[7] =
|
|
206
|
+
onDragenter: e[7] || (e[7] = h(() => {
|
|
212
207
|
}, ["prevent"])),
|
|
213
|
-
onDragover: e[8] || (e[8] =
|
|
208
|
+
onDragover: e[8] || (e[8] = h(() => {
|
|
214
209
|
}, ["prevent"]))
|
|
215
210
|
}, [
|
|
216
|
-
t(p) ? (
|
|
211
|
+
t(p) ? (r(), u(t(Ie), {
|
|
217
212
|
key: 0,
|
|
218
|
-
id: t(
|
|
213
|
+
id: t(L),
|
|
219
214
|
"aria-label": "Search Results",
|
|
220
215
|
class: "gap-px",
|
|
221
|
-
noResults: !t(
|
|
216
|
+
noResults: !t(w).length
|
|
222
217
|
}, {
|
|
223
218
|
default: d(() => [
|
|
224
|
-
(
|
|
219
|
+
(r(!0), v($, null, F(t(w), (o, a) => (r(), u(t(Ce), {
|
|
225
220
|
id: `#search-input-${o.item.id}`,
|
|
226
221
|
key: o.refIndex,
|
|
227
222
|
ref_for: !0,
|
|
228
|
-
ref: (i) => t(
|
|
229
|
-
selected: t(
|
|
223
|
+
ref: (i) => t(le)[a] = i,
|
|
224
|
+
selected: t(x) === a,
|
|
230
225
|
class: "px-2",
|
|
231
226
|
href: o.item.link,
|
|
232
|
-
onClick:
|
|
233
|
-
onFocus: (i) =>
|
|
227
|
+
onClick: h((i) => t(ae)(o), ["prevent"]),
|
|
228
|
+
onFocus: (i) => x.value = a
|
|
234
229
|
}, {
|
|
235
230
|
addon: d(() => [
|
|
236
231
|
e[10] || (e[10] = n("span", { class: "sr-only" }, "HTTP Method:", -1)),
|
|
237
|
-
|
|
232
|
+
b(_e, {
|
|
238
233
|
class: "font-bold",
|
|
239
234
|
method: o.item.httpVerb ?? "get"
|
|
240
235
|
}, null, 8, ["method"])
|
|
@@ -246,40 +241,29 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
246
241
|
}, 1032, ["id", "selected", "href", "onClick", "onFocus"]))), 128))
|
|
247
242
|
]),
|
|
248
243
|
_: 1
|
|
249
|
-
}, 8, ["id", "noResults"])) : (
|
|
250
|
-
(
|
|
244
|
+
}, 8, ["id", "noResults"])) : (r(), v("nav", Ye, [
|
|
245
|
+
(r(!0), v($, null, F(de.value, (o) => (r(), u(Fe, {
|
|
251
246
|
key: o.uid,
|
|
252
247
|
isDraggable: t(l) !== "modal" && o.info?.title !== "Drafts",
|
|
253
|
-
isDroppable: t(
|
|
254
|
-
menuItem:
|
|
248
|
+
isDroppable: t(te),
|
|
249
|
+
menuItem: g,
|
|
255
250
|
parentUids: [],
|
|
256
251
|
uid: o.uid,
|
|
257
|
-
onNewTab: e[5] || (e[5] = (
|
|
258
|
-
onOnDragEnd: t(
|
|
259
|
-
onOpenMenu: e[6] || (e[6] = (
|
|
252
|
+
onNewTab: e[5] || (e[5] = (a, i) => j("newTab", { name: a, uid: i })),
|
|
253
|
+
onOnDragEnd: t(ee),
|
|
254
|
+
onOpenMenu: e[6] || (e[6] = (a) => Object.assign(g, a))
|
|
260
255
|
}, {
|
|
261
256
|
leftIcon: d(() => [
|
|
262
|
-
o.info?.title === "Drafts" ? (
|
|
257
|
+
o.info?.title === "Drafts" ? (r(), u(t(H), {
|
|
263
258
|
key: 0,
|
|
264
|
-
class: "text-sidebar-c-2
|
|
259
|
+
class: "text-sidebar-c-2",
|
|
265
260
|
icon: "Scribble",
|
|
266
261
|
thickness: "2.25"
|
|
267
|
-
})) : (
|
|
262
|
+
})) : (r(), u(t($e), {
|
|
268
263
|
key: 1,
|
|
269
|
-
class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2
|
|
264
|
+
class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2",
|
|
270
265
|
src: o["x-scalar-icon"] || "interface-content-folder"
|
|
271
|
-
}, null, 8, ["src"]))
|
|
272
|
-
n("div", {
|
|
273
|
-
class: b({
|
|
274
|
-
"rotate-90": t(J)[o.uid]
|
|
275
|
-
})
|
|
276
|
-
}, [
|
|
277
|
-
h(t(M), {
|
|
278
|
-
class: "text-c-3 hover:text-c-1 hidden text-sm group-hover:block",
|
|
279
|
-
icon: "ChevronRight",
|
|
280
|
-
size: "md"
|
|
281
|
-
})
|
|
282
|
-
], 2)
|
|
266
|
+
}, null, 8, ["src"]))
|
|
283
267
|
]),
|
|
284
268
|
_: 2
|
|
285
269
|
}, 1032, ["isDraggable", "isDroppable", "menuItem", "uid", "onOnDragEnd"]))), 128))
|
|
@@ -288,18 +272,18 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
288
272
|
]),
|
|
289
273
|
button: d(() => [
|
|
290
274
|
n("div", {
|
|
291
|
-
class:
|
|
275
|
+
class: S({
|
|
292
276
|
"empty-sidebar-item": R.value
|
|
293
277
|
})
|
|
294
278
|
}, [
|
|
295
|
-
R.value ? (
|
|
296
|
-
n("div",
|
|
297
|
-
|
|
298
|
-
art: t(
|
|
279
|
+
R.value ? (r(), v("div", Ze, [
|
|
280
|
+
n("div", et, [
|
|
281
|
+
b(K, {
|
|
282
|
+
art: t(Me),
|
|
299
283
|
class: "rabbitsit font-bold"
|
|
300
284
|
}, null, 8, ["art"]),
|
|
301
|
-
|
|
302
|
-
art: t(
|
|
285
|
+
b(K, {
|
|
286
|
+
art: t(Te),
|
|
303
287
|
class: "rabbitjump absolute top-0 left-0 font-bold"
|
|
304
288
|
}, null, 8, ["art"])
|
|
305
289
|
]),
|
|
@@ -308,19 +292,19 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
308
292
|
n("p", { class: "mt-2" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
309
293
|
], -1))
|
|
310
294
|
])) : m("", !0),
|
|
311
|
-
t(l) !== "modal" ? (
|
|
295
|
+
t(l) !== "modal" ? (r(), u(t(we), {
|
|
312
296
|
key: 1,
|
|
313
|
-
class:
|
|
297
|
+
class: S(["mb-1.5 hidden h-fit w-full p-1.5 opacity-0", {
|
|
314
298
|
"flex opacity-100": R.value
|
|
315
299
|
}]),
|
|
316
|
-
onClick:
|
|
300
|
+
onClick: oe
|
|
317
301
|
}, {
|
|
318
302
|
default: d(() => [...e[12] || (e[12] = [
|
|
319
303
|
D(" Import Collection ", -1)
|
|
320
304
|
])]),
|
|
321
305
|
_: 1
|
|
322
306
|
}, 8, ["class"])) : m("", !0),
|
|
323
|
-
t(l) !== "modal" ? (
|
|
307
|
+
t(l) !== "modal" ? (r(), u(Ee, {
|
|
324
308
|
key: 2,
|
|
325
309
|
click: t(k).commandPalette.emit,
|
|
326
310
|
hotkey: "K"
|
|
@@ -340,18 +324,18 @@ const je = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Je
|
|
|
340
324
|
key: "0"
|
|
341
325
|
} : void 0
|
|
342
326
|
]), 1032, ["class"]), [
|
|
343
|
-
[
|
|
327
|
+
[ye, t(M)]
|
|
344
328
|
]),
|
|
345
|
-
t(l) !== "modal" &&
|
|
329
|
+
t(l) !== "modal" && g ? (r(), u(ze, {
|
|
346
330
|
key: 0,
|
|
347
|
-
menuItem:
|
|
348
|
-
onClearDrafts:
|
|
349
|
-
onCloseMenu: e[9] || (e[9] = (o) =>
|
|
350
|
-
onToggleWatchMode:
|
|
331
|
+
menuItem: g,
|
|
332
|
+
onClearDrafts: ce,
|
|
333
|
+
onCloseMenu: e[9] || (e[9] = (o) => g.open = !1),
|
|
334
|
+
onToggleWatchMode: ie
|
|
351
335
|
}, null, 8, ["menuItem"])) : m("", !0)
|
|
352
336
|
], 64));
|
|
353
337
|
}
|
|
354
338
|
});
|
|
355
339
|
export {
|
|
356
|
-
|
|
340
|
+
Ct as default
|
|
357
341
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAssBA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAa1B,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,KAAK,WAAW,GAAG;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AAiBF,KAAK,WAAW,GAAG;IACjB,QAAQ,IAAI,IAAI,CAAA;CACjB,CAAC;AA8zCF,QAAA,MAAM,UAAU;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-24d396a0"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
p as default
|
|
8
8
|
};
|