@scalar/api-client 2.5.31 → 2.5.33
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 +33 -0
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +120 -128
- package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +57 -63
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +143 -150
- package/dist/components/CodeInput/codeVariableWidget.js +70 -75
- package/dist/components/CommandPalette/CommandActionInput.vue.js +17 -19
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -27
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +53 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +129 -133
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +84 -98
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +64 -74
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -11
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +164 -183
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue2.js +31 -31
- package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -2
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +75 -84
- package/dist/components/Form/LabelInput.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +11 -11
- package/dist/components/ImportCollection/DropEventListener.vue.js +42 -44
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -23
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +141 -149
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +22 -23
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +12 -13
- package/dist/components/ImportCollection/PasteEventListener.vue.js +11 -12
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +69 -76
- package/dist/components/ImportCollection/utils/get-openapi-version.js +8 -8
- package/dist/components/ImportCollection/utils/import-collection.js +14 -14
- package/dist/components/OpenApiClientButton.vue.js +1 -1
- package/dist/components/OpenApiClientButton.vue2.js +10 -10
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +19 -22
- package/dist/components/Search/useSearch.js +51 -61
- package/dist/components/SectionFilter.vue.js +1 -1
- package/dist/components/SectionFilter.vue2.js +26 -29
- package/dist/components/Server/ServerDropdown.vue.js +70 -96
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +57 -67
- package/dist/components/Server/ServerSelector.vue.js +44 -55
- package/dist/components/Server/ServerVariablesForm.vue.js +36 -42
- package/dist/components/Server/ServerVariablesSelect.vue.js +6 -6
- package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.js +68 -74
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue.js +107 -122
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/hooks/useFileDialog.js +12 -12
- package/dist/hooks/useResponseBody.js +14 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.js +50 -56
- package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
- package/dist/layouts/App/create-api-client-app.js +19 -20
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +18 -21
- package/dist/layouts/Web/ApiClientWeb.vue.js +45 -51
- package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
- package/dist/layouts/Web/create-api-client-web.js +19 -20
- package/dist/layouts/Web/index.js +1 -1
- package/dist/libs/create-client.js +102 -109
- package/dist/libs/env-helpers.js +3 -3
- package/dist/libs/event-bus.js +15 -15
- package/dist/libs/extractAttachmentFilename.js +5 -6
- package/dist/libs/find-request.js +9 -10
- package/dist/libs/get-request-uid-by-path-method.js +12 -12
- package/dist/libs/getOpenApiDocumentDetails.js +7 -7
- package/dist/libs/importers/curl.js +3 -3
- package/dist/libs/normalize-headers.js +9 -10
- package/dist/libs/postman.js +15 -17
- package/dist/libs/send-request/build-request-security.js +9 -10
- package/dist/libs/send-request/create-fetch-body.js +11 -12
- package/dist/libs/send-request/create-fetch-query-params.js +13 -13
- package/dist/libs/send-request/create-request-operation.js +83 -84
- package/dist/libs/send-request/decode-buffer.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +12 -12
- package/dist/libs/string-template.js +21 -21
- package/dist/libs/validate-parameters.js +5 -8
- package/dist/plugins/plugin-manager.js +11 -17
- package/dist/store/active-entities.js +90 -117
- package/dist/store/collections.js +41 -42
- package/dist/store/import-spec.js +25 -26
- package/dist/store/request-example.js +20 -24
- package/dist/store/requests.js +63 -81
- package/dist/store/router-params.js +7 -7
- package/dist/store/security-schemes.js +35 -36
- package/dist/store/store.js +2 -2
- package/dist/store/tags.js +20 -21
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue2.js +21 -22
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue2.js +43 -47
- package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue2.js +196 -207
- package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue2.js +34 -41
- package/dist/views/Collection/CollectionNavigation.vue.js +116 -125
- package/dist/views/Collection/CollectionOverview.vue2.js +22 -25
- package/dist/views/Collection/CollectionServerForm.vue.js +39 -45
- package/dist/views/Collection/CollectionServers.vue2.js +88 -98
- package/dist/views/Collection/CollectionSettings.vue.js +1 -1
- package/dist/views/Collection/CollectionSettings.vue2.js +101 -108
- package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +141 -145
- package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -2
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -15
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +15 -16
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +61 -64
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +9 -10
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +90 -93
- package/dist/views/Environment/Environment.vue2.js +267 -295
- package/dist/views/Environment/EnvironmentModal.vue.js +63 -70
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -42
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +60 -67
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +78 -89
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +37 -44
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -45
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -127
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +120 -139
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +97 -97
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +287 -310
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +86 -94
- package/dist/views/Request/RequestSection/RequestParams.vue.js +37 -38
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +36 -38
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +28 -31
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +49 -52
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +16 -16
- package/dist/views/Request/RequestSection/helpers/getting-started.js +7 -11
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +7 -8
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +199 -211
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +332 -349
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +210 -240
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +58 -64
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -2
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +20 -23
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +29 -30
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +28 -29
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +128 -140
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +116 -124
- package/dist/views/Request/consts/mediaTypes.js +2 -3
- package/dist/views/Request/handle-drag.js +24 -28
- package/dist/views/Request/hooks/useOpenApiWatcher.js +26 -33
- package/dist/views/Request/libs/auth.js +37 -43
- package/dist/views/Request/libs/oauth2.js +30 -32
- package/dist/views/Request/libs/watch-mode.js +100 -103
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -236
- package/package.json +22 -22
- package/dist/components/AddressBar/AddressBar.vue3.js +0 -4
- package/dist/components/AddressBar/AddressBarHistory.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue4.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +0 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue3.js +0 -4
- package/dist/components/DataTable/DataTableInput.vue3.js +0 -4
- package/dist/components/EmptyState.vue3.js +0 -4
- package/dist/components/Form/LabelInput.vue3.js +0 -4
- package/dist/components/HttpMethod/HttpMethod.vue3.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
- package/dist/components/OpenApiClientButton.vue3.js +0 -4
- package/dist/components/ScalarAsciiArt.vue3.js +0 -4
- package/dist/components/SectionFilter.vue3.js +0 -4
- package/dist/components/Server/ServerDropdownItem.vue3.js +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue3.js +0 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue4.js +0 -4
- package/dist/components/TopNav/TopNavItem.vue3.js +0 -4
- package/dist/layouts/App/ApiClientApp.vue2.js +0 -4
- package/dist/layouts/Modal/ApiClientModal.vue3.js +0 -4
- package/dist/layouts/Web/ApiClientWeb.vue2.js +0 -4
- package/dist/style.css.js +0 -4
- package/dist/views/Collection/CollectionAuthentication.vue3.js +0 -4
- package/dist/views/Collection/CollectionEnvironment.vue3.js +0 -4
- package/dist/views/Collection/CollectionInfoForm.vue3.js +0 -4
- package/dist/views/Collection/CollectionSettings.vue3.js +0 -4
- package/dist/views/Collection/components/EnvironmentForm.vue3.js +0 -4
- package/dist/views/Collection/components/MarkdownInput.vue3.js +0 -4
- package/dist/views/Cookies/CookieModal.vue3.js +0 -4
- package/dist/views/Request/Request.vue3.js +0 -4
- package/dist/views/Request/RequestRoot.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestBody.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +0 -4
- package/dist/views/Request/RequestSidebar.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue4.js +0 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue3.js +0 -4
- package/dist/views/Request/RequestSubpageHeader.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +0 -4
|
@@ -1,50 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { LibraryIcon as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useActiveEntities as
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as p, computed as n, createElementBlock as f, openBlock as v, createVNode as o, createElementVNode as x, withCtx as c, unref as u } from "vue";
|
|
2
|
+
import { ScalarButton as _ } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as b } from "@scalar/icons/library";
|
|
4
|
+
import h from "../../components/Form/LabelInput.vue.js";
|
|
5
|
+
import C from "../../components/IconSelector.vue.js";
|
|
6
|
+
import { useActiveEntities as V } from "../../store/active-entities.js";
|
|
7
|
+
import { useWorkspace as w } from "../../store/store.js";
|
|
8
|
+
const I = ["aria-label"], g = { class: "group relative ml-1.25" }, y = /* @__PURE__ */ p({
|
|
9
9
|
__name: "CollectionInfoForm",
|
|
10
|
-
setup(
|
|
11
|
-
const { activeCollection: e } =
|
|
12
|
-
() =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
), x = (t) => {
|
|
17
|
-
var r, o;
|
|
18
|
-
(r = e == null ? void 0 : e.value) != null && r.uid && l.edit((o = e == null ? void 0 : e.value) == null ? void 0 : o.uid, "x-scalar-icon", t);
|
|
19
|
-
}, _ = (t) => {
|
|
10
|
+
setup(k) {
|
|
11
|
+
const { activeCollection: e } = V(), { collectionMutators: l } = w(), a = n(
|
|
12
|
+
() => e?.value?.["x-scalar-icon"] || "interface-content-folder"
|
|
13
|
+
), s = (t) => {
|
|
14
|
+
e?.value?.uid && l.edit(e?.value?.uid, "x-scalar-icon", t);
|
|
15
|
+
}, d = (t) => {
|
|
20
16
|
e.value && l.edit(e.value.uid, "info.title", t);
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
return (t, r) => (h(), v("div", {
|
|
31
|
-
"aria-label": `Collection: ${u.value.title}`,
|
|
17
|
+
}, r = n(() => ({
|
|
18
|
+
icon: e?.value?.["x-scalar-icon"],
|
|
19
|
+
title: e?.value?.info?.title,
|
|
20
|
+
description: e?.value?.info?.description,
|
|
21
|
+
version: e?.value?.info?.version
|
|
22
|
+
}));
|
|
23
|
+
return (t, i) => (v(), f("div", {
|
|
24
|
+
"aria-label": `Collection: ${r.value.title}`,
|
|
32
25
|
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
33
26
|
}, [
|
|
34
|
-
|
|
35
|
-
modelValue:
|
|
27
|
+
o(C, {
|
|
28
|
+
modelValue: a.value,
|
|
36
29
|
placement: "bottom-start",
|
|
37
|
-
"onUpdate:modelValue":
|
|
30
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => s(m))
|
|
38
31
|
}, {
|
|
39
32
|
default: c(() => [
|
|
40
|
-
|
|
33
|
+
o(u(_), {
|
|
41
34
|
class: "hover:bg-b-2 aspect-square h-7 w-7 cursor-pointer rounded border border-transparent p-0 hover:border-inherit",
|
|
42
35
|
variant: "ghost"
|
|
43
36
|
}, {
|
|
44
37
|
default: c(() => [
|
|
45
|
-
|
|
38
|
+
o(u(b), {
|
|
46
39
|
class: "text-c-2 size-5",
|
|
47
|
-
src:
|
|
40
|
+
src: a.value,
|
|
48
41
|
"stroke-width": "2"
|
|
49
42
|
}, null, 8, ["src"])
|
|
50
43
|
]),
|
|
@@ -53,18 +46,18 @@ const N = ["aria-label"], U = { class: "group relative ml-1.25" }, S = /* @__PUR
|
|
|
53
46
|
]),
|
|
54
47
|
_: 1
|
|
55
48
|
}, 8, ["modelValue"]),
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
x("div", g, [
|
|
50
|
+
o(h, {
|
|
58
51
|
class: "text-xl font-bold",
|
|
59
52
|
inputId: "collectionName",
|
|
60
53
|
placeholder: "Untitled Collection",
|
|
61
|
-
value:
|
|
62
|
-
onUpdateValue:
|
|
54
|
+
value: r.value.title,
|
|
55
|
+
onUpdateValue: d
|
|
63
56
|
}, null, 8, ["value"])
|
|
64
57
|
])
|
|
65
|
-
], 8,
|
|
58
|
+
], 8, I));
|
|
66
59
|
}
|
|
67
60
|
});
|
|
68
61
|
export {
|
|
69
|
-
|
|
62
|
+
y as default
|
|
70
63
|
};
|
|
@@ -1,142 +1,133 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { LibraryIcon as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { PathId as
|
|
5
|
-
import
|
|
6
|
-
import { useActiveEntities as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as v, createElementBlock as s, openBlock as o, createVNode as m, createElementVNode as i, normalizeClass as a, createCommentVNode as h, unref as t, toDisplayString as d, Fragment as y, renderList as w, createBlock as b, withCtx as k } from "vue";
|
|
2
|
+
import { LibraryIcon as _ } from "@scalar/icons/library";
|
|
3
|
+
import { useRouter as g, RouterLink as C } from "vue-router";
|
|
4
|
+
import { PathId as n } from "../../routes.js";
|
|
5
|
+
import N from "./CollectionInfoForm.vue.js";
|
|
6
|
+
import { useActiveEntities as S } from "../../store/active-entities.js";
|
|
7
|
+
const B = { class: "bg-b-1 sticky -top-[104px] z-10 mx-auto w-full" }, E = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "flex max-w-40 items-center"
|
|
10
|
-
},
|
|
10
|
+
}, z = { class: "text-c-1 mr-[6.25px] hidden overflow-hidden px-2 font-medium text-ellipsis whitespace-nowrap md:block" }, P = /* @__PURE__ */ x({
|
|
11
11
|
__name: "CollectionNavigation",
|
|
12
12
|
props: {
|
|
13
13
|
isSticky: { type: Boolean }
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const { currentRoute:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
params: {
|
|
25
|
-
[s.Collection]: (t = e.value) == null ? void 0 : t.uid
|
|
26
|
-
}
|
|
15
|
+
setup(I) {
|
|
16
|
+
const { currentRoute: c } = g(), { activeCollection: e } = S(), p = v(() => [
|
|
17
|
+
{
|
|
18
|
+
displayName: "Overview",
|
|
19
|
+
// icon: 'Collection',
|
|
20
|
+
to: {
|
|
21
|
+
name: "collection.overview",
|
|
22
|
+
params: {
|
|
23
|
+
[n.Collection]: e.value?.uid
|
|
27
24
|
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
displayName: "Authentication",
|
|
41
|
-
// icon: 'Lock',
|
|
42
|
-
to: {
|
|
43
|
-
name: "collection.authentication",
|
|
44
|
-
params: {
|
|
45
|
-
[s.Collection]: (i = e.value) == null ? void 0 : i.uid
|
|
46
|
-
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: "Servers",
|
|
29
|
+
// icon: 'Server',
|
|
30
|
+
to: {
|
|
31
|
+
name: "collection.servers",
|
|
32
|
+
params: {
|
|
33
|
+
[n.Collection]: e.value?.uid
|
|
47
34
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: "Authentication",
|
|
39
|
+
// icon: 'Lock',
|
|
40
|
+
to: {
|
|
41
|
+
name: "collection.authentication",
|
|
42
|
+
params: {
|
|
43
|
+
[n.Collection]: e.value?.uid
|
|
57
44
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
// },
|
|
68
|
-
// },
|
|
69
|
-
// {
|
|
70
|
-
// displayName: 'Scripts',
|
|
71
|
-
// // icon: 'CodeFolder',
|
|
72
|
-
// to: {
|
|
73
|
-
// name: 'collection.scripts',
|
|
74
|
-
// params: {
|
|
75
|
-
// [PathId.Collection]: activeCollection.value?.uid,
|
|
76
|
-
// },
|
|
77
|
-
// },
|
|
78
|
-
// },
|
|
79
|
-
// {
|
|
80
|
-
// displayName: 'Sync',
|
|
81
|
-
// // icon: 'Download',
|
|
82
|
-
// to: {
|
|
83
|
-
// name: 'collection.sync',
|
|
84
|
-
// },
|
|
85
|
-
// },
|
|
86
|
-
{
|
|
87
|
-
displayName: "Settings",
|
|
88
|
-
// icon: 'Settings',
|
|
89
|
-
to: {
|
|
90
|
-
name: "collection.settings"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayName: "Environment",
|
|
49
|
+
// icon: 'Brackets',
|
|
50
|
+
to: {
|
|
51
|
+
name: "collection.environment",
|
|
52
|
+
params: {
|
|
53
|
+
[n.Collection]: e.value?.uid
|
|
91
54
|
}
|
|
92
55
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
56
|
+
},
|
|
57
|
+
// {
|
|
58
|
+
// displayName: 'Cookies',
|
|
59
|
+
// // icon: 'Cookie',
|
|
60
|
+
// to: {
|
|
61
|
+
// name: 'collection.cookies',
|
|
62
|
+
// params: {
|
|
63
|
+
// [PathId.Collection]: activeCollection.value?.uid,
|
|
64
|
+
// },
|
|
65
|
+
// },
|
|
66
|
+
// },
|
|
67
|
+
// {
|
|
68
|
+
// displayName: 'Scripts',
|
|
69
|
+
// // icon: 'CodeFolder',
|
|
70
|
+
// to: {
|
|
71
|
+
// name: 'collection.scripts',
|
|
72
|
+
// params: {
|
|
73
|
+
// [PathId.Collection]: activeCollection.value?.uid,
|
|
74
|
+
// },
|
|
75
|
+
// },
|
|
76
|
+
// },
|
|
77
|
+
// {
|
|
78
|
+
// displayName: 'Sync',
|
|
79
|
+
// // icon: 'Download',
|
|
80
|
+
// to: {
|
|
81
|
+
// name: 'collection.sync',
|
|
82
|
+
// },
|
|
83
|
+
// },
|
|
84
|
+
{
|
|
85
|
+
displayName: "Settings",
|
|
86
|
+
// icon: 'Settings',
|
|
87
|
+
to: {
|
|
88
|
+
name: "collection.settings"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]);
|
|
92
|
+
return (r, L) => (o(), s("div", B, [
|
|
93
|
+
m(N),
|
|
94
|
+
i("div", {
|
|
95
|
+
class: a([
|
|
96
|
+
"items-center text-sm font-medium",
|
|
97
|
+
r.isSticky ? "h-fit border-b md:grid md:grid-cols-[1fr_720px_1fr] md:px-4" : "flex md:mx-auto md:max-w-[720px]"
|
|
98
|
+
])
|
|
99
|
+
}, [
|
|
100
|
+
r.isSticky ? (o(), s("div", E, [
|
|
101
|
+
m(t(_), {
|
|
102
|
+
class: "text-c-2 hidden size-3.5 md:block",
|
|
103
|
+
src: t(e)?.["x-scalar-icon"] || "interface-content-folder",
|
|
104
|
+
"stroke-width": "2"
|
|
105
|
+
}, null, 8, ["src"]),
|
|
106
|
+
i("span", z, d(t(e)?.info?.title), 1)
|
|
107
|
+
])) : h("", !0),
|
|
108
|
+
i("div", {
|
|
109
|
+
class: a(["flex w-full max-w-[720px] gap-2 pl-1.5 md:ml-1.5 md:pl-0", !r.isSticky && "border-b"])
|
|
104
110
|
}, [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}, {
|
|
121
|
-
default: S(() => {
|
|
122
|
-
var f;
|
|
123
|
-
return [
|
|
124
|
-
l("span", {
|
|
125
|
-
class: d([
|
|
126
|
-
"flex-center h-full w-full border-b",
|
|
127
|
-
typeof c.name == "string" && typeof o(p).name == "string" && ((f = o(p).name) != null && f.startsWith(c.name)) ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"
|
|
128
|
-
])
|
|
129
|
-
}, v(y), 3)
|
|
130
|
-
];
|
|
131
|
-
}),
|
|
132
|
-
_: 2
|
|
133
|
-
}, 1032, ["to"]))), 128))
|
|
134
|
-
], 2)
|
|
111
|
+
(o(!0), s(y, null, w(p.value, ({ to: l, displayName: u }, f) => (o(), b(t(C), {
|
|
112
|
+
key: f,
|
|
113
|
+
class: "-ml-2 flex h-10 cursor-pointer items-center px-2 text-center text-sm font-medium whitespace-nowrap no-underline -outline-offset-1 has-[:focus-visible]:outline",
|
|
114
|
+
to: l
|
|
115
|
+
}, {
|
|
116
|
+
default: k(() => [
|
|
117
|
+
i("span", {
|
|
118
|
+
class: a([
|
|
119
|
+
"flex-center h-full w-full border-b",
|
|
120
|
+
typeof l.name == "string" && typeof t(c).name == "string" && t(c).name?.startsWith(l.name) ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"
|
|
121
|
+
])
|
|
122
|
+
}, d(u), 3)
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, 1032, ["to"]))), 128))
|
|
135
126
|
], 2)
|
|
136
|
-
])
|
|
137
|
-
|
|
127
|
+
], 2)
|
|
128
|
+
]));
|
|
138
129
|
}
|
|
139
130
|
});
|
|
140
131
|
export {
|
|
141
|
-
|
|
132
|
+
P as default
|
|
142
133
|
};
|
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useActiveEntities as
|
|
4
|
-
import
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as m, createBlock as r, openBlock as a, withCtx as p, createCommentVNode as u, unref as e } from "vue";
|
|
2
|
+
import v from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
3
|
+
import { useActiveEntities as d } from "../../store/active-entities.js";
|
|
4
|
+
import f from "./components/MarkdownInput.vue.js";
|
|
5
|
+
import { useWorkspace as _ } from "../../store/store.js";
|
|
6
|
+
const h = /* @__PURE__ */ m({
|
|
7
7
|
__name: "CollectionOverview",
|
|
8
|
-
setup(
|
|
8
|
+
setup(k) {
|
|
9
9
|
const {
|
|
10
10
|
activeCollection: o,
|
|
11
11
|
activeEnvironment: t,
|
|
12
|
-
activeEnvVariables:
|
|
12
|
+
activeEnvVariables: c,
|
|
13
13
|
activeWorkspace: n
|
|
14
|
-
} =
|
|
15
|
-
o.value &&
|
|
14
|
+
} = d(), { collectionMutators: l } = _(), s = (i) => {
|
|
15
|
+
o.value && l.edit(o.value.uid, "info.description", i);
|
|
16
16
|
};
|
|
17
|
-
return (i,
|
|
18
|
-
default:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, null, 8, ["envVariables", "environment", "modelValue", "workspace"])) : d("", !0)
|
|
29
|
-
];
|
|
30
|
-
}),
|
|
17
|
+
return (i, V) => (a(), r(v, null, {
|
|
18
|
+
default: p(() => [
|
|
19
|
+
e(t) && e(n) ? (a(), r(f, {
|
|
20
|
+
key: 0,
|
|
21
|
+
envVariables: e(c),
|
|
22
|
+
environment: e(t),
|
|
23
|
+
modelValue: e(o)?.info?.description ?? "",
|
|
24
|
+
workspace: e(n),
|
|
25
|
+
"onUpdate:modelValue": s
|
|
26
|
+
}, null, 8, ["envVariables", "environment", "modelValue", "workspace"])) : u("", !0)
|
|
27
|
+
]),
|
|
31
28
|
_: 1
|
|
32
29
|
}));
|
|
33
30
|
}
|
|
34
31
|
});
|
|
35
32
|
export {
|
|
36
|
-
|
|
33
|
+
h as default
|
|
37
34
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as h, computed as
|
|
1
|
+
import { defineComponent as h, computed as c, watch as k, useTemplateRef as x, createElementBlock as v, openBlock as s, normalizeClass as C, createCommentVNode as n, Fragment as E, createVNode as S, createBlock as y } from "vue";
|
|
2
2
|
import { REGEX as g } from "@scalar/oas-utils/helpers";
|
|
3
3
|
import { emitCustomEvent as u } from "@scalar/workspace-store/events";
|
|
4
4
|
import w from "../../components/Form/Form.vue.js";
|
|
@@ -11,8 +11,8 @@ const $ = /* @__PURE__ */ h({
|
|
|
11
11
|
collectionId: { default: "" },
|
|
12
12
|
serverUid: { default: "" }
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const l =
|
|
14
|
+
setup(p) {
|
|
15
|
+
const l = p, { activeWorkspaceCollections: d } = B(), { servers: f, serverMutators: o } = R(), m = [
|
|
16
16
|
{
|
|
17
17
|
label: "URL",
|
|
18
18
|
key: "url",
|
|
@@ -25,28 +25,25 @@ const $ = /* @__PURE__ */ h({
|
|
|
25
25
|
placeholder: "Production",
|
|
26
26
|
type: "text"
|
|
27
27
|
}
|
|
28
|
-
],
|
|
28
|
+
], r = c(() => {
|
|
29
29
|
const e = d.value.find(
|
|
30
|
-
(
|
|
30
|
+
(t) => t.uid === l.collectionId
|
|
31
31
|
);
|
|
32
|
-
return f[e && typeof l.serverUid == "string" && l.serverUid === "default" ? e.servers[0] ?? "" :
|
|
33
|
-
}), b =
|
|
34
|
-
var e, r;
|
|
35
|
-
return (e = t.value) != null && e.url ? ((r = t.value.url.match(g.PATH)) == null ? void 0 : r.map((a) => a.slice(1, -1))) ?? [] : [];
|
|
36
|
-
});
|
|
32
|
+
return f[e && typeof l.serverUid == "string" && l.serverUid === "default" ? e.servers[0] ?? "" : e?.servers.find((t) => t === l.serverUid) ?? ""];
|
|
33
|
+
}), b = c(() => r.value?.url ? r.value.url.match(g.PATH)?.map((e) => e.slice(1, -1)) ?? [] : []);
|
|
37
34
|
k(
|
|
38
35
|
b,
|
|
39
36
|
(e) => {
|
|
40
|
-
if (!
|
|
37
|
+
if (!r.value)
|
|
41
38
|
return;
|
|
42
|
-
const
|
|
43
|
-
Object.keys(
|
|
44
|
-
e.includes(a) || delete
|
|
39
|
+
const t = r.value.variables ? { ...r.value.variables } : {};
|
|
40
|
+
Object.keys(t).forEach((a) => {
|
|
41
|
+
e.includes(a) || delete t[a];
|
|
45
42
|
}), e.forEach((a) => {
|
|
46
|
-
|
|
47
|
-
}),
|
|
43
|
+
t[a] || (t[a] = { default: "" });
|
|
44
|
+
}), o.edit(r.value.uid, "variables", t), u(i.value, "store-update-selected-server-properties", {
|
|
48
45
|
key: "variables",
|
|
49
|
-
value:
|
|
46
|
+
value: t,
|
|
50
47
|
options: {
|
|
51
48
|
disableOldStoreUpdate: !0
|
|
52
49
|
}
|
|
@@ -54,46 +51,43 @@ const $ = /* @__PURE__ */ h({
|
|
|
54
51
|
},
|
|
55
52
|
{ immediate: !0 }
|
|
56
53
|
);
|
|
57
|
-
const U = (e,
|
|
58
|
-
!d.value || !
|
|
54
|
+
const U = (e, t) => {
|
|
55
|
+
!d.value || !r.value || (o.edit(r.value.uid, e, t), (e === "url" || e === "description") && u(i.value, "store-update-selected-server-properties", {
|
|
59
56
|
key: e,
|
|
60
|
-
value:
|
|
57
|
+
value: t,
|
|
61
58
|
options: {
|
|
62
59
|
disableOldStoreUpdate: !0
|
|
63
60
|
}
|
|
64
61
|
}));
|
|
65
|
-
}, _ = (e,
|
|
66
|
-
if (!
|
|
62
|
+
}, _ = (e, t) => {
|
|
63
|
+
if (!r.value)
|
|
67
64
|
return;
|
|
68
|
-
const a =
|
|
69
|
-
a[e] = { ...a[e], default:
|
|
65
|
+
const a = r.value.variables || {};
|
|
66
|
+
a[e] = { ...a[e], default: t }, o.edit(r.value.uid, "variables", a), u(i.value, "store-update-selected-server-properties", {
|
|
70
67
|
key: "variables",
|
|
71
68
|
value: a,
|
|
72
69
|
options: {
|
|
73
70
|
disableOldStoreUpdate: !0
|
|
74
71
|
}
|
|
75
72
|
});
|
|
76
|
-
},
|
|
77
|
-
return (e,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
], 64)) : p("", !0)
|
|
95
|
-
], 2);
|
|
96
|
-
};
|
|
73
|
+
}, i = x("wrapper-ref");
|
|
74
|
+
return (e, t) => (s(), v("div", {
|
|
75
|
+
ref: "wrapper-ref",
|
|
76
|
+
class: C(["divide-0.5 flex w-full flex-col divide-y rounded-b-lg text-sm", r.value?.variables && "bg-b-1"])
|
|
77
|
+
}, [
|
|
78
|
+
r.value ? (s(), v(E, { key: 0 }, [
|
|
79
|
+
S(w, {
|
|
80
|
+
data: r.value,
|
|
81
|
+
onUpdate: U,
|
|
82
|
+
options: m
|
|
83
|
+
}, null, 8, ["data"]),
|
|
84
|
+
r.value.variables ? (s(), y(O, {
|
|
85
|
+
key: 0,
|
|
86
|
+
variables: r.value.variables,
|
|
87
|
+
"onUpdate:variable": _
|
|
88
|
+
}, null, 8, ["variables"])) : n("", !0)
|
|
89
|
+
], 64)) : n("", !0)
|
|
90
|
+
], 2));
|
|
97
91
|
}
|
|
98
92
|
});
|
|
99
93
|
export {
|