@scalar/api-client 2.1.18 → 2.1.20
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 +41 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
- 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 +70 -69
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +29 -29
- package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
- 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 +57 -49
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +13 -7
- 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 +87 -89
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- 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 +37 -26
- package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +10 -11
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
- 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 +26 -22
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue2.js +41 -40
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/hooks/useDarkModeState.d.ts +4 -3
- package/dist/hooks/useDarkModeState.d.ts.map +1 -1
- package/dist/hooks/useDarkModeState.js +36 -21
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +40 -44
- package/dist/layouts/App/create-api-client-app.d.ts +46 -36
- 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 +17 -17
- package/dist/layouts/Modal/create-api-client-modal.d.ts +92 -72
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +30 -34
- package/dist/layouts/Web/create-api-client-web.d.ts +46 -36
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +46 -36
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-bus.d.ts +41 -0
- package/dist/libs/event-bus.d.ts.map +1 -0
- package/dist/libs/event-bus.js +32 -0
- package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
- package/dist/libs/hot-keys.d.ts.map +1 -0
- package/dist/libs/hot-keys.js +45 -0
- package/dist/libs/importers/curl.d.ts +3 -0
- package/dist/libs/importers/curl.d.ts.map +1 -0
- package/dist/libs/importers/curl.js +61 -0
- package/dist/libs/importers/index.d.ts +2 -0
- package/dist/libs/importers/index.d.ts.map +1 -0
- package/dist/libs/importers/index.js +4 -0
- package/dist/libs/index.d.ts +4 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -31
- package/dist/libs/parse-curl.d.ts +12 -0
- package/dist/libs/parse-curl.d.ts.map +1 -0
- package/dist/libs/parse-curl.js +70 -0
- package/dist/libs/send-request.d.ts +4 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +103 -103
- package/dist/router.d.ts +2 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +33 -24
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/events.d.ts +29 -0
- package/dist/store/events.d.ts.map +1 -0
- package/dist/store/events.js +31 -0
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/router-params.d.ts +1 -0
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +2 -1
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store.d.ts +92 -72
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +138 -129
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- 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 -18
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- 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 +148 -98
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
- 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 +101 -102
- 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 +73 -73
- 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 +33 -34
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
- package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -33
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +18 -19
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
- package/dist/views/Settings/Settings.vue.d.ts +4 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
- package/dist/views/Settings/Settings.vue.js +4 -0
- package/dist/views/Settings/Settings.vue2.js +59 -0
- package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
- package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
- package/package.json +59 -35
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
- package/dist/components/DarkModeToggle/index.d.ts +0 -2
- package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/index.js +0 -4
- package/dist/components/ScreenReader.vue.js +0 -7
- package/dist/components/ScreenReader.vue2.js +0 -18
- package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/cancel-request-bus.js +0 -5
- package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/command-palette-bus.js +0 -5
- package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-request-bus.js +0 -5
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-keys-bus.js +0 -47
- package/dist/libs/event-busses/index.d.ts +0 -6
- package/dist/libs/event-busses/index.d.ts.map +0 -1
- package/dist/libs/event-busses/index.js +0 -15
- package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
- package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/request-status-bus.js +0 -5
|
@@ -1,156 +1,155 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useSearch as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { dragHandlerFactory as
|
|
10
|
-
import { ScalarSearchInput as
|
|
11
|
-
import { LibraryIcon as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
1
|
+
import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as S, Fragment as v, withDirectives as _, createVNode as l, unref as e, normalizeClass as h, createSlots as ee, withCtx as n, createElementVNode as i, isRef as te, withKeys as R, withModifiers as c, createBlock as d, renderList as D, createTextVNode as $, toDisplayString as oe, createCommentVNode as V, vShow as se, pushScopeId as re, popScopeId as ae } from "vue";
|
|
2
|
+
import ie from "../../assets/rabbit.ascii.js";
|
|
3
|
+
import ne from "../../assets/rabbitjump.ascii.js";
|
|
4
|
+
import le from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
5
|
+
import q from "../../components/ScalarAsciiArt.vue.js";
|
|
6
|
+
import { useSearch as de } from "../../components/Search/useSearch.js";
|
|
7
|
+
import me from "../../components/Sidebar/SidebarButton.vue.js";
|
|
8
|
+
import pe from "./RequestSidebarItemMenu.vue.js";
|
|
9
|
+
import { dragHandlerFactory as ue } from "./handle-drag.js";
|
|
10
|
+
import { ScalarSearchInput as ce, ScalarSearchResultList as fe, ScalarSearchResultItem as be, ScalarIcon as P } from "@scalar/components";
|
|
11
|
+
import { LibraryIcon as he } from "@scalar/icons";
|
|
12
|
+
import Se from "./RequestSidebarItem.vue.js";
|
|
13
|
+
import ve from "../../components/Sidebar/Sidebar.vue.js";
|
|
14
|
+
import Re from "./components/WorkspaceDropdown.vue.js";
|
|
15
15
|
import { useSidebar as ye } from "../../hooks/useSidebar.js";
|
|
16
|
-
import { useWorkspace as
|
|
17
|
-
|
|
18
|
-
import { commandPaletteBus as E } from "../../libs/event-busses/command-palette-bus.js";
|
|
19
|
-
const ge = (p) => (ae("data-v-8ce3ee0b"), p = p(), ie(), p), Ie = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, xe = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, Ce = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, De = /* @__PURE__ */ ge(() => /* @__PURE__ */ i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
|
|
16
|
+
import { useWorkspace as we } from "../../store/store.js";
|
|
17
|
+
const ke = (p) => (re("data-v-254a8369"), p = p(), ae(), p), ge = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, Ie = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, xe = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, Ce = /* @__PURE__ */ ke(() => /* @__PURE__ */ i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
|
|
20
18
|
/* @__PURE__ */ i("b", { class: "font-medium" }, "Let's Get Started"),
|
|
21
19
|
/* @__PURE__ */ i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
|
|
22
|
-
], -1)),
|
|
20
|
+
], -1)), Ue = /* @__PURE__ */ J({
|
|
23
21
|
__name: "RequestSidebar",
|
|
24
22
|
props: {
|
|
25
23
|
showSidebar: { type: Boolean },
|
|
26
24
|
isReadonly: { type: Boolean }
|
|
27
25
|
},
|
|
28
26
|
emits: ["update:showSidebar", "newTab"],
|
|
29
|
-
setup(p, { emit:
|
|
30
|
-
const
|
|
31
|
-
activeWorkspaceCollections:
|
|
32
|
-
activeRequest:
|
|
33
|
-
activeWorkspaceRequests:
|
|
34
|
-
findRequestParents:
|
|
35
|
-
isReadOnly:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
setup(p, { emit: B }) {
|
|
28
|
+
const E = p, y = B, w = we(), {
|
|
29
|
+
activeWorkspaceCollections: F,
|
|
30
|
+
activeRequest: M,
|
|
31
|
+
activeWorkspaceRequests: O,
|
|
32
|
+
findRequestParents: K,
|
|
33
|
+
isReadOnly: N,
|
|
34
|
+
events: f
|
|
35
|
+
} = w, { handleDragEnd: T, isDroppable: z } = ue(w), { collapsedSidebarFolders: A, setCollapsedSidebarFolder: L } = ye(), u = Q({ open: !1 });
|
|
36
|
+
X(
|
|
37
|
+
M,
|
|
38
|
+
(s) => {
|
|
39
|
+
s && K(s).forEach(
|
|
40
|
+
(t) => L(t, !0)
|
|
42
41
|
);
|
|
43
42
|
},
|
|
44
43
|
{ immediate: !0 }
|
|
45
44
|
);
|
|
46
45
|
const {
|
|
47
|
-
searchText:
|
|
48
|
-
searchResultsWithPlaceholderResults:
|
|
49
|
-
selectedSearchResult:
|
|
50
|
-
onSearchResultClick:
|
|
51
|
-
fuseSearch:
|
|
52
|
-
searchInputRef:
|
|
53
|
-
searchResultRefs:
|
|
54
|
-
navigateSearchResults:
|
|
55
|
-
selectSearchResult:
|
|
56
|
-
} =
|
|
46
|
+
searchText: b,
|
|
47
|
+
searchResultsWithPlaceholderResults: k,
|
|
48
|
+
selectedSearchResult: g,
|
|
49
|
+
onSearchResultClick: U,
|
|
50
|
+
fuseSearch: W,
|
|
51
|
+
searchInputRef: I,
|
|
52
|
+
searchResultRefs: H,
|
|
53
|
+
navigateSearchResults: x,
|
|
54
|
+
selectSearchResult: j
|
|
55
|
+
} = de(), C = (s) => {
|
|
57
56
|
var t;
|
|
58
|
-
|
|
57
|
+
s && (s.toggleSidebar && y("update:showSidebar", E.showSidebar), s.openCommandPalette && (s.openCommandPalette.preventDefault(), f.commandPalette.emit()), s.focusRequestSearch && ((t = I.value) == null || t.focus()));
|
|
59
58
|
};
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
}), (
|
|
63
|
-
|
|
64
|
-
class:
|
|
65
|
-
showSidebar:
|
|
66
|
-
"onUpdate:showSidebar": t[8] || (t[8] = (o) =>
|
|
67
|
-
},
|
|
59
|
+
return Y(() => f.hotKeys.on(C)), Z(() => {
|
|
60
|
+
f.hotKeys.off(C);
|
|
61
|
+
}), (s, t) => (a(), S(v, null, [
|
|
62
|
+
_(l(e(ve), {
|
|
63
|
+
class: h([s.showSidebar ? "sidebar-active-width" : ""]),
|
|
64
|
+
showSidebar: s.showSidebar,
|
|
65
|
+
"onUpdate:showSidebar": t[8] || (t[8] = (o) => s.$emit("update:showSidebar", o))
|
|
66
|
+
}, ee({
|
|
68
67
|
content: n(() => [
|
|
69
|
-
i("div",
|
|
70
|
-
l(e(
|
|
68
|
+
i("div", ge, [
|
|
69
|
+
l(e(ce), {
|
|
71
70
|
ref_key: "searchInputRef",
|
|
72
|
-
ref:
|
|
73
|
-
modelValue: e(
|
|
74
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) =>
|
|
71
|
+
ref: I,
|
|
72
|
+
modelValue: e(b),
|
|
73
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => te(b) ? b.value = o : null),
|
|
75
74
|
sidebar: "",
|
|
76
|
-
onInput: e(
|
|
75
|
+
onInput: e(W),
|
|
77
76
|
onKeydown: [
|
|
78
|
-
t[1] || (t[1] =
|
|
79
|
-
t[2] || (t[2] =
|
|
80
|
-
t[3] || (t[3] =
|
|
77
|
+
t[1] || (t[1] = R(c((o) => e(x)("down"), ["stop"]), ["down"])),
|
|
78
|
+
t[2] || (t[2] = R(c((o) => e(j)(), ["stop"]), ["enter"])),
|
|
79
|
+
t[3] || (t[3] = R(c((o) => e(x)("up"), ["stop"]), ["up"]))
|
|
81
80
|
]
|
|
82
81
|
}, null, 8, ["modelValue", "onInput"])
|
|
83
82
|
]),
|
|
84
83
|
i("div", {
|
|
85
|
-
class:
|
|
86
|
-
"pb-14": !
|
|
84
|
+
class: h(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
85
|
+
"pb-14": !s.isReadonly
|
|
87
86
|
}]),
|
|
88
87
|
onDragenter: t[6] || (t[6] = c(() => {
|
|
89
88
|
}, ["prevent"])),
|
|
90
89
|
onDragover: t[7] || (t[7] = c(() => {
|
|
91
90
|
}, ["prevent"]))
|
|
92
91
|
}, [
|
|
93
|
-
e(
|
|
92
|
+
e(b) ? (a(), d(e(fe), {
|
|
94
93
|
key: 0,
|
|
95
94
|
class: "gap-px custom-scroll",
|
|
96
|
-
noResults: !e(
|
|
95
|
+
noResults: !e(k).length
|
|
97
96
|
}, {
|
|
98
97
|
default: n(() => [
|
|
99
|
-
(a(!0),
|
|
98
|
+
(a(!0), S(v, null, D(e(k), (o, m) => (a(), d(e(be), {
|
|
100
99
|
id: `#search-input-${o.item.id}`,
|
|
101
100
|
key: o.refIndex,
|
|
102
101
|
ref_for: !0,
|
|
103
|
-
ref: (
|
|
104
|
-
active: e(
|
|
102
|
+
ref: (r) => e(H)[m] = r,
|
|
103
|
+
active: e(g) === m,
|
|
105
104
|
class: "px-2",
|
|
106
|
-
onClick: (
|
|
107
|
-
onFocus: (
|
|
105
|
+
onClick: (r) => e(U)(o),
|
|
106
|
+
onFocus: (r) => g.value = m
|
|
108
107
|
}, {
|
|
109
108
|
addon: n(() => [
|
|
110
|
-
l(
|
|
109
|
+
l(le, {
|
|
111
110
|
class: "font-bold",
|
|
112
111
|
method: o.item.httpVerb ?? "get"
|
|
113
112
|
}, null, 8, ["method"])
|
|
114
113
|
]),
|
|
115
114
|
default: n(() => [
|
|
116
|
-
|
|
115
|
+
$(oe(o.item.title) + " ", 1)
|
|
117
116
|
]),
|
|
118
117
|
_: 2
|
|
119
118
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
120
119
|
]),
|
|
121
120
|
_: 1
|
|
122
|
-
}, 8, ["noResults"])) : (a(!0),
|
|
121
|
+
}, 8, ["noResults"])) : (a(!0), S(v, { key: 1 }, D(e(F), (o) => {
|
|
123
122
|
var m;
|
|
124
|
-
return a(), d(
|
|
123
|
+
return a(), d(Se, {
|
|
125
124
|
key: o.uid,
|
|
126
|
-
isDraggable: !
|
|
127
|
-
isDroppable: e(
|
|
125
|
+
isDraggable: !s.isReadonly && ((m = o.info) == null ? void 0 : m.title) !== "Drafts",
|
|
126
|
+
isDroppable: e(z),
|
|
128
127
|
menuItem: u,
|
|
129
128
|
parentUids: [],
|
|
130
129
|
uid: o.uid,
|
|
131
|
-
onNewTab: t[4] || (t[4] = (
|
|
132
|
-
onOnDragEnd: e(
|
|
133
|
-
onOpenMenu: t[5] || (t[5] = (
|
|
130
|
+
onNewTab: t[4] || (t[4] = (r, G) => y("newTab", { name: r, uid: G })),
|
|
131
|
+
onOnDragEnd: e(T),
|
|
132
|
+
onOpenMenu: t[5] || (t[5] = (r) => Object.assign(u, r))
|
|
134
133
|
}, {
|
|
135
134
|
leftIcon: n(() => {
|
|
136
|
-
var
|
|
135
|
+
var r;
|
|
137
136
|
return [
|
|
138
|
-
((
|
|
137
|
+
((r = o.info) == null ? void 0 : r.title) === "Drafts" ? (a(), d(e(P), {
|
|
139
138
|
key: 0,
|
|
140
139
|
class: "text-sidebar-c-2 group-hover:hidden",
|
|
141
140
|
icon: "Scribble",
|
|
142
141
|
thickness: "2.5"
|
|
143
|
-
})) : (a(), d(e(
|
|
142
|
+
})) : (a(), d(e(he), {
|
|
144
143
|
key: 1,
|
|
145
144
|
class: "text-sidebar-c-2 size-3.5 stroke-[2.5] group-hover:hidden",
|
|
146
145
|
src: o["x-scalar-icon"] || "interface-content-folder"
|
|
147
146
|
}, null, 8, ["src"])),
|
|
148
147
|
i("div", {
|
|
149
|
-
class:
|
|
150
|
-
"rotate-90": e(
|
|
148
|
+
class: h({
|
|
149
|
+
"rotate-90": e(A)[o.uid]
|
|
151
150
|
})
|
|
152
151
|
}, [
|
|
153
|
-
l(e(
|
|
152
|
+
l(e(P), {
|
|
154
153
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
155
154
|
icon: "ChevronRight",
|
|
156
155
|
size: "sm"
|
|
@@ -165,29 +164,29 @@ const ge = (p) => (ae("data-v-8ce3ee0b"), p = p(), ie(), p), Ie = { class: "sear
|
|
|
165
164
|
]),
|
|
166
165
|
button: n(() => [
|
|
167
166
|
i("div", {
|
|
168
|
-
class:
|
|
169
|
-
"empty-sidebar-item": e(
|
|
167
|
+
class: h({
|
|
168
|
+
"empty-sidebar-item": e(O).length <= 1
|
|
170
169
|
})
|
|
171
170
|
}, [
|
|
172
|
-
i("div",
|
|
173
|
-
i("div",
|
|
174
|
-
l(
|
|
175
|
-
art: e(
|
|
171
|
+
i("div", Ie, [
|
|
172
|
+
i("div", xe, [
|
|
173
|
+
l(q, {
|
|
174
|
+
art: e(ie),
|
|
176
175
|
class: "font-bold rabbitsit"
|
|
177
176
|
}, null, 8, ["art"]),
|
|
178
|
-
l(
|
|
179
|
-
art: e(
|
|
177
|
+
l(q, {
|
|
178
|
+
art: e(ne),
|
|
180
179
|
class: "font-bold absolute top-0 left-0 rabbitjump"
|
|
181
180
|
}, null, 8, ["art"])
|
|
182
181
|
]),
|
|
183
|
-
|
|
182
|
+
Ce
|
|
184
183
|
]),
|
|
185
|
-
|
|
184
|
+
s.isReadonly ? V("", !0) : (a(), d(me, {
|
|
186
185
|
key: 0,
|
|
187
|
-
click: e(
|
|
186
|
+
click: e(f).commandPalette.emit
|
|
188
187
|
}, {
|
|
189
188
|
title: n(() => [
|
|
190
|
-
|
|
189
|
+
$("Add Item")
|
|
191
190
|
]),
|
|
192
191
|
_: 1
|
|
193
192
|
}, 8, ["click"]))
|
|
@@ -195,24 +194,24 @@ const ge = (p) => (ae("data-v-8ce3ee0b"), p = p(), ie(), p), Ie = { class: "sear
|
|
|
195
194
|
]),
|
|
196
195
|
_: 2
|
|
197
196
|
}, [
|
|
198
|
-
|
|
197
|
+
s.isReadonly ? void 0 : {
|
|
199
198
|
name: "header",
|
|
200
199
|
fn: n(() => [
|
|
201
|
-
l(e(
|
|
200
|
+
l(e(Re), { class: "min-h-11 xl:min-h-header xl:py-2.5 py-1 px-2.5 border-b-1/2" })
|
|
202
201
|
]),
|
|
203
202
|
key: "0"
|
|
204
203
|
}
|
|
205
204
|
]), 1032, ["class", "showSidebar"]), [
|
|
206
|
-
[se,
|
|
205
|
+
[se, s.showSidebar]
|
|
207
206
|
]),
|
|
208
|
-
!e(
|
|
207
|
+
!e(N) && u ? (a(), d(pe, {
|
|
209
208
|
key: 0,
|
|
210
209
|
menuItem: u,
|
|
211
210
|
onCloseMenu: t[9] || (t[9] = (o) => u.open = !1)
|
|
212
|
-
}, null, 8, ["menuItem"])) :
|
|
211
|
+
}, null, 8, ["menuItem"])) : V("", !0)
|
|
213
212
|
], 64));
|
|
214
213
|
}
|
|
215
214
|
});
|
|
216
215
|
export {
|
|
217
|
-
|
|
216
|
+
Ue as default
|
|
218
217
|
};
|
|
@@ -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":"AA0bA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAyO1B,iBAAS,cAAc;gBAlMT,IAAI;;gBAAJ,IAAI;EAyvBjB;AACD,QAAA,MAAM,eAAe;IAzxBjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;;;;;IAjBzB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;;;;;;iBAZX,OAAO;MA2xBvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,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,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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"}
|
|
@@ -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 a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9324d78b"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { PathId as
|
|
1
|
+
import { defineComponent as ie, useCssVars as ne, computed as c, ref as le, resolveComponent as re, openBlock as p, createElementBlock as w, normalizeClass as m, unref as n, createVNode as h, withCtx as y, createBlock as b, withModifiers as R, createElementVNode as d, toDisplayString as z, createCommentVNode as g, createTextVNode as B, renderSlot as se, Fragment as ae, renderList as oe, pushScopeId as de, popScopeId as ue } from "vue";
|
|
2
|
+
import { PathId as pe } from "../../router.js";
|
|
3
3
|
import { ScalarButton as $, ScalarIcon as q } from "@scalar/components";
|
|
4
|
-
import { Draggable as
|
|
5
|
-
import { RouterLink as
|
|
6
|
-
import
|
|
7
|
-
import { useSidebar as
|
|
8
|
-
import { getModifiers as
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
|
|
11
|
-
const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, we = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, Ue = /* @__PURE__ */ V(() => /* @__PURE__ */ d("span", null, " ", -1)), De = { key: 2 }, Ce = /* @__PURE__ */ V(() => /* @__PURE__ */ d("span", null, "Add Request", -1)), P = "hover:bg-sidebar-active-b indent-padding-left", Be = /* @__PURE__ */ te({
|
|
4
|
+
import { Draggable as fe } from "@scalar/draggable";
|
|
5
|
+
import { RouterLink as me } from "vue-router";
|
|
6
|
+
import ce from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
7
|
+
import { useSidebar as be } from "../../hooks/useSidebar.js";
|
|
8
|
+
import { getModifiers as ge } from "../../libs/hot-keys.js";
|
|
9
|
+
import { useWorkspace as ve } from "../../store/store.js";
|
|
10
|
+
const V = (v) => (de("data-v-9324d78b"), v = v(), ue(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = { class: "flex h-5 items-center justify-center max-w-[14px]" }, we = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, Ue = /* @__PURE__ */ V(() => /* @__PURE__ */ d("span", null, " ", -1)), De = { key: 2 }, Ce = /* @__PURE__ */ V(() => /* @__PURE__ */ d("span", null, "Add Request", -1)), P = "hover:bg-sidebar-active-b indent-padding-left", je = /* @__PURE__ */ ie({
|
|
12
11
|
__name: "RequestSidebarItem",
|
|
13
12
|
props: {
|
|
14
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -19,11 +18,11 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
19
18
|
},
|
|
20
19
|
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
21
20
|
setup(v, { emit: F }) {
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
ne((e) => ({
|
|
22
|
+
"46298a49": K.value,
|
|
23
|
+
"4e765ad5": Q.value
|
|
25
24
|
}));
|
|
26
|
-
const
|
|
25
|
+
const l = v, Y = F, {
|
|
27
26
|
activeRequest: T,
|
|
28
27
|
activeRouterParams: A,
|
|
29
28
|
activeWorkspace: x,
|
|
@@ -33,13 +32,14 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
33
32
|
requests: M,
|
|
34
33
|
requestExamples: D,
|
|
35
34
|
collectionMutators: C,
|
|
36
|
-
tagMutators:
|
|
37
|
-
requestMutators:
|
|
38
|
-
requestExampleMutators:
|
|
39
|
-
router: W
|
|
40
|
-
|
|
35
|
+
tagMutators: E,
|
|
36
|
+
requestMutators: S,
|
|
37
|
+
requestExampleMutators: N,
|
|
38
|
+
router: W,
|
|
39
|
+
events: H
|
|
40
|
+
} = ve(), { collapsedSidebarFolders: O, toggleSidebarFolder: G } = be(), i = c(() => {
|
|
41
41
|
var s, u;
|
|
42
|
-
const e = U[
|
|
42
|
+
const e = U[l.uid], t = L[l.uid], r = M[l.uid], a = D[l.uid];
|
|
43
43
|
return e ? {
|
|
44
44
|
title: ((s = e.info) == null ? void 0 : s.title) ?? "Unknown title",
|
|
45
45
|
entity: e,
|
|
@@ -57,18 +57,18 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
57
57
|
resourceTitle: "Tag",
|
|
58
58
|
children: t.children,
|
|
59
59
|
warning: "This cannot be undone. You’re about to delete the tag and all requests inside it",
|
|
60
|
-
edit: (o) =>
|
|
61
|
-
delete: () =>
|
|
62
|
-
} :
|
|
63
|
-
title:
|
|
64
|
-
link: `/workspace/${x.value.uid}/request/${
|
|
65
|
-
method:
|
|
66
|
-
entity:
|
|
60
|
+
edit: (o) => E.edit(t.uid, "name", o),
|
|
61
|
+
delete: () => E.delete(t, l.parentUids[0])
|
|
62
|
+
} : r ? {
|
|
63
|
+
title: r.summary ?? [r.method, r.path].join(" - "),
|
|
64
|
+
link: `/workspace/${x.value.uid}/request/${r.uid}`,
|
|
65
|
+
method: r.method,
|
|
66
|
+
entity: r,
|
|
67
67
|
resourceTitle: "Request",
|
|
68
68
|
warning: "This cannot be undone. You’re about to delete the request.",
|
|
69
|
-
children:
|
|
70
|
-
edit: (o) =>
|
|
71
|
-
delete: () =>
|
|
69
|
+
children: r.examples,
|
|
70
|
+
edit: (o) => S.edit(r.uid, "summary", o),
|
|
71
|
+
delete: () => S.delete(r, l.parentUids[0])
|
|
72
72
|
} : {
|
|
73
73
|
title: a.name,
|
|
74
74
|
link: `/workspace/${x.value.uid}/request/${a.requestUid}/examples/${a.uid}`,
|
|
@@ -77,52 +77,52 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
77
77
|
resourceTitle: "Example",
|
|
78
78
|
warning: "This cannot be undone. You’re about to delete the example from the request.",
|
|
79
79
|
children: [],
|
|
80
|
-
edit: (o) =>
|
|
81
|
-
delete: () =>
|
|
80
|
+
edit: (o) => N.edit(a.uid, "name", o),
|
|
81
|
+
delete: () => N.delete(a)
|
|
82
82
|
};
|
|
83
|
-
}),
|
|
83
|
+
}), J = c(
|
|
84
84
|
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
85
|
-
),
|
|
85
|
+
), K = c(() => l.parentUids.length ? f.value ? `${(l.parentUids.length - 1) * 12}px` : `${l.parentUids.length * 12}px` : "12px"), Q = c(() => l.parentUids.length ? f.value ? `${(l.parentUids.length - 1) * 12}px` : `${l.parentUids.length * 12}px` : "0px"), X = c(
|
|
86
86
|
() => {
|
|
87
87
|
var e;
|
|
88
|
-
return
|
|
88
|
+
return O[l.uid] || ((e = T.value) == null ? void 0 : e.uid) === l.uid && i.value.entity.examples.length > 1;
|
|
89
89
|
}
|
|
90
|
-
),
|
|
90
|
+
), Z = c(
|
|
91
91
|
() => {
|
|
92
92
|
var e;
|
|
93
|
-
return A.value[
|
|
93
|
+
return A.value[pe.Request] === "default" && ((e = T.value) == null ? void 0 : e.uid) === l.uid;
|
|
94
94
|
}
|
|
95
|
-
), I =
|
|
95
|
+
), I = le(null), j = c(() => {
|
|
96
96
|
let e = 0.5, t = 0.5;
|
|
97
97
|
if (!I.value) return { ceiling: e, floor: t };
|
|
98
|
-
const { draggingItem:
|
|
99
|
-
return !U[
|
|
100
|
-
}),
|
|
101
|
-
e && (
|
|
98
|
+
const { draggingItem: r } = I.value;
|
|
99
|
+
return !U[r == null ? void 0 : r.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 };
|
|
100
|
+
}), _ = (e, t) => !(x.value.isReadOnly || D[t.id] || U[e.id]), ee = (e, t) => {
|
|
101
|
+
e && (ge(["default"]).some((s) => e[s]) ? Y("newTab", t.title || "", t.entity.uid) : t.link && W.push(t.link));
|
|
102
102
|
};
|
|
103
|
-
function
|
|
104
|
-
|
|
103
|
+
function te() {
|
|
104
|
+
H.commandPalette.emit({
|
|
105
105
|
commandName: "Create Request",
|
|
106
106
|
metaData: {
|
|
107
|
-
itemUid:
|
|
108
|
-
parentUid:
|
|
107
|
+
itemUid: l.uid,
|
|
108
|
+
parentUid: l.parentUids[0]
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
return (e, t) => {
|
|
113
|
-
const
|
|
113
|
+
const r = re("RequestSidebarItem", !0);
|
|
114
114
|
return p(), w("div", {
|
|
115
115
|
class: m(["relative flex flex-row", [
|
|
116
|
-
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:
|
|
116
|
+
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
117
117
|
]])
|
|
118
118
|
}, [
|
|
119
|
-
h(n(
|
|
119
|
+
h(n(fe), {
|
|
120
120
|
id: i.value.entity.uid,
|
|
121
121
|
ref_key: "draggableRef",
|
|
122
122
|
ref: I,
|
|
123
|
-
ceiling:
|
|
123
|
+
ceiling: j.value.ceiling,
|
|
124
124
|
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
125
|
-
floor:
|
|
125
|
+
floor: j.value.floor,
|
|
126
126
|
isDraggable: e.isDraggable,
|
|
127
127
|
isDroppable: e.isDroppable,
|
|
128
128
|
parentIds: e.parentUids,
|
|
@@ -131,12 +131,12 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
131
131
|
default: y(() => {
|
|
132
132
|
var a;
|
|
133
133
|
return [
|
|
134
|
-
i.value.link ? (p(), b(n(
|
|
134
|
+
i.value.link ? (p(), b(n(me), {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "no-underline",
|
|
137
137
|
to: i.value.link,
|
|
138
138
|
onClick: t[1] || (t[1] = R(
|
|
139
|
-
(s) =>
|
|
139
|
+
(s) => ee(s, i.value),
|
|
140
140
|
["prevent"]
|
|
141
141
|
))
|
|
142
142
|
}, {
|
|
@@ -146,20 +146,20 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
146
146
|
d("div", {
|
|
147
147
|
class: m(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover w-full", [
|
|
148
148
|
P,
|
|
149
|
-
s ||
|
|
149
|
+
s || Z.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
150
150
|
]]),
|
|
151
151
|
tabindex: "0"
|
|
152
152
|
}, [
|
|
153
153
|
d("span", {
|
|
154
|
-
class: m(["line-clamp-3
|
|
154
|
+
class: m(["line-clamp-3 font-medium w-full pl-2 word-break-break-word", {
|
|
155
155
|
"editable-sidebar-hover-item": !n(f)
|
|
156
156
|
}])
|
|
157
|
-
},
|
|
157
|
+
}, z(i.value.title), 3),
|
|
158
158
|
d("div", he, [
|
|
159
159
|
d("div", ye, [
|
|
160
160
|
n(f) ? g("", !0) : (p(), b(n($), {
|
|
161
161
|
key: 0,
|
|
162
|
-
class: m(["px-0.5 py-0
|
|
162
|
+
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", {
|
|
163
163
|
flex: ((o = (u = e.menuItem) == null ? void 0 : u.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
164
164
|
}]),
|
|
165
165
|
size: "sm",
|
|
@@ -185,8 +185,8 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
185
185
|
}, 8, ["class"]))
|
|
186
186
|
]),
|
|
187
187
|
d("span", xe, [
|
|
188
|
-
|
|
189
|
-
i.value.method ? (p(), b(n(
|
|
188
|
+
B(" "),
|
|
189
|
+
i.value.method ? (p(), b(n(ce), {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: "font-bold",
|
|
192
192
|
method: i.value.method
|
|
@@ -199,15 +199,15 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
199
199
|
_: 1
|
|
200
200
|
}, 8, ["to"])) : !n(f) || e.parentUids.length ? (p(), w("button", {
|
|
201
201
|
key: 1,
|
|
202
|
-
class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5
|
|
202
|
+
class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5", P]),
|
|
203
203
|
type: "button",
|
|
204
|
-
onClick: t[3] || (t[3] = (s) => n(
|
|
204
|
+
onClick: t[3] || (t[3] = (s) => n(G)(i.value.entity.uid))
|
|
205
205
|
}, [
|
|
206
206
|
d("span", ke, [
|
|
207
|
-
|
|
207
|
+
se(e.$slots, "leftIcon", {}, () => [
|
|
208
208
|
d("div", {
|
|
209
209
|
class: m({
|
|
210
|
-
"rotate-90": n(
|
|
210
|
+
"rotate-90": n(O)[i.value.entity.uid]
|
|
211
211
|
})
|
|
212
212
|
}, [
|
|
213
213
|
h(n(q), {
|
|
@@ -218,18 +218,18 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
218
218
|
})
|
|
219
219
|
], 2)
|
|
220
220
|
], !0),
|
|
221
|
-
|
|
221
|
+
B(" ")
|
|
222
222
|
]),
|
|
223
223
|
d("div", we, [
|
|
224
224
|
d("span", {
|
|
225
|
-
class: m(["line-clamp-3
|
|
225
|
+
class: m(["line-clamp-3 font-medium text-left w-full word-break-break-word", {
|
|
226
226
|
"editable-sidebar-hover-item": !n(f)
|
|
227
227
|
}])
|
|
228
|
-
},
|
|
228
|
+
}, z(i.value.title), 3),
|
|
229
229
|
d("div", qe, [
|
|
230
|
-
!n(f) && !
|
|
230
|
+
!n(f) && !J.value ? (p(), b(n($), {
|
|
231
231
|
key: 0,
|
|
232
|
-
class: m(["px-0.5 py-0
|
|
232
|
+
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", {
|
|
233
233
|
flex: ((a = e.menuItem.item) == null ? void 0 : a.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
234
234
|
}]),
|
|
235
235
|
size: "sm",
|
|
@@ -256,11 +256,11 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
256
256
|
])
|
|
257
257
|
])
|
|
258
258
|
])) : g("", !0),
|
|
259
|
-
|
|
260
|
-
(p(!0), w(
|
|
259
|
+
X.value ? (p(), w("div", De, [
|
|
260
|
+
(p(!0), w(ae, null, oe(i.value.children, (s) => (p(), b(r, {
|
|
261
261
|
key: s,
|
|
262
262
|
isDraggable: !n(D)[s],
|
|
263
|
-
isDroppable:
|
|
263
|
+
isDroppable: _,
|
|
264
264
|
menuItem: e.menuItem,
|
|
265
265
|
parentUids: [...e.parentUids, e.uid],
|
|
266
266
|
uid: s,
|
|
@@ -272,7 +272,7 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
272
272
|
key: 0,
|
|
273
273
|
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" : ""]),
|
|
274
274
|
variant: "ghost",
|
|
275
|
-
onClick: t[7] || (t[7] = (s) =>
|
|
275
|
+
onClick: t[7] || (t[7] = (s) => te())
|
|
276
276
|
}, {
|
|
277
277
|
default: y(() => [
|
|
278
278
|
h(n(q), {
|
|
@@ -294,5 +294,5 @@ const V = (v) => (oe("data-v-d3581d0d"), v = v(), de(), v), he = { class: "flex
|
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
export {
|
|
297
|
-
|
|
297
|
+
je as default
|
|
298
298
|
};
|
|
@@ -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":"AAmLA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;;cAa1B,eAAe;;;;cAAf,eAAe;;;;AA+bjD,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|