@scalar/api-client 2.2.48 → 2.2.50
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 +15 -3
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +102 -94
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +54 -58
- package/dist/components/CodeInput/CodeInput.vue.d.ts +9 -0
- 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 +95 -93
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +1 -3
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -22
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +13 -13
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +12 -12
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +54 -49
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +9 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +11 -8
- package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -0
- 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 +36 -30
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -15
- package/dist/components/Form/Form.vue.d.ts +3 -1
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +30 -25
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +41 -41
- package/dist/components/ImportCollection/ImportNowButton.vue.js +24 -24
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +13 -13
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +19 -19
- package/dist/layouts/App/create-api-client-app.d.ts +387 -477
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +774 -954
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +387 -477
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +390 -479
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +3 -15
- package/dist/libs/env-helpers.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +7 -7
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +3 -1
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/hot-keys.js +11 -15
- package/dist/libs/hot-keys.test.d.ts +2 -0
- package/dist/libs/hot-keys.test.d.ts.map +1 -0
- package/dist/libs/index.js +27 -26
- package/dist/libs/send-request/build-request-security.d.ts +1 -1
- package/dist/libs/send-request/build-request-security.js +19 -16
- package/dist/libs/send-request/create-request-operation.test.d.ts +10 -10
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +37 -34
- package/dist/store/active-entities.d.ts +58 -67
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +61 -74
- package/dist/store/collections.d.ts +90 -90
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +4 -17
- package/dist/store/cookies.d.ts +14 -14
- package/dist/store/environment.d.ts +19 -18
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +2 -8
- package/dist/store/import-spec.d.ts +16 -106
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +9 -14
- package/dist/store/request-example.d.ts +25 -25
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +15 -20
- package/dist/store/requests.d.ts +84 -84
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +17 -40
- package/dist/store/router-params.d.ts +13 -11
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +5 -5
- package/dist/store/security-schemes.d.ts +58 -58
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +1 -3
- package/dist/store/servers.d.ts +17 -17
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +2 -9
- package/dist/store/store.d.ts +387 -477
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +2 -4
- package/dist/store/tags.d.ts +28 -28
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +19 -34
- package/dist/store/workspace.d.ts +36 -36
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +1 -5
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +18 -18
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +24 -24
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +140 -132
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +15 -15
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +160 -141
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +7 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +6 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +99 -95
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +4 -0
- 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 +70 -64
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +40 -34
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +6 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +32 -26
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +93 -85
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +9 -0
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +214 -244
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +10 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +77 -80
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +89 -96
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +10 -2
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +59 -66
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +11 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +176 -155
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +6 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +97 -100
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +31 -22
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +2 -2
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.js +11 -13
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +50 -48
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- 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 +38 -44
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +10 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +77 -69
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +4 -1
- 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 +41 -39
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +56 -52
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +68 -68
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +38 -55
- package/dist/views/Request/libs/auth.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +28 -29
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +42 -65
- package/dist/views/Request/libs/request.d.ts +5 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -1
- package/dist/views/Request/libs/request.js +37 -2
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +10 -34
- package/dist/views/Servers/ServerForm.vue.d.ts +1 -8
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +21 -22
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +73 -81
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +118 -134
- package/package.json +14 -14
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as u, openBlock as t, createBlock as r, withCtx as a, createElementBlock as i, toDisplayString as m, renderSlot as f, createElementVNode as k, unref as l, Fragment as V, renderList as v, normalizeClass as _, createVNode as y, createTextVNode as b, createCommentVNode as h } from "vue";
|
|
2
|
+
import w from "../DataTable/DataTable.vue.js";
|
|
3
|
+
import E from "../DataTable/DataTableInput.vue.js";
|
|
4
|
+
import g from "../DataTable/DataTableRow.vue.js";
|
|
5
|
+
import C from "../ViewLayout/ViewLayoutSection.vue.js";
|
|
6
|
+
import { useActiveEntities as N } from "../../store/active-entities.js";
|
|
7
|
+
const U = { key: 0 }, B = { class: "custom-scroll flex flex-1 flex-col gap-1.5" }, A = /* @__PURE__ */ u({
|
|
7
8
|
__name: "Form",
|
|
8
9
|
props: {
|
|
9
10
|
title: {},
|
|
@@ -11,39 +12,43 @@ const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5"
|
|
|
11
12
|
data: {},
|
|
12
13
|
onUpdate: { type: Function }
|
|
13
14
|
},
|
|
14
|
-
setup(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
setup(D) {
|
|
16
|
+
const { activeEnvVariables: c, activeEnvironment: d, activeWorkspace: n } = N();
|
|
17
|
+
return (e, F) => (t(), r(C, null, {
|
|
18
|
+
title: a(() => [
|
|
19
|
+
e.title ? (t(), i("span", U, m(e.title), 1)) : f(e.$slots, "title", { key: 1 })
|
|
18
20
|
]),
|
|
19
|
-
default:
|
|
20
|
-
|
|
21
|
-
Object.keys(e.data).length > 0 ? (t(),
|
|
21
|
+
default: a(() => [
|
|
22
|
+
k("div", B, [
|
|
23
|
+
Object.keys(e.data).length > 0 && l(n) ? (t(), r(w, {
|
|
22
24
|
key: 0,
|
|
23
25
|
columns: [""]
|
|
24
26
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
(t(!0),
|
|
27
|
-
key:
|
|
28
|
-
class:
|
|
27
|
+
default: a(() => [
|
|
28
|
+
(t(!0), i(V, null, v(e.options, (o, s) => (t(), r(g, {
|
|
29
|
+
key: s,
|
|
30
|
+
class: _({ "border-t": s === 0 })
|
|
29
31
|
}, {
|
|
30
|
-
default:
|
|
31
|
-
|
|
32
|
+
default: a(() => [
|
|
33
|
+
y(E, {
|
|
34
|
+
envVariables: l(c),
|
|
35
|
+
environment: l(d),
|
|
32
36
|
modelValue: e.data[o.key] ?? "",
|
|
33
37
|
placeholder: o.placeholder,
|
|
34
|
-
|
|
38
|
+
workspace: l(n),
|
|
39
|
+
"onUpdate:modelValue": (p) => e.onUpdate(o.key, p)
|
|
35
40
|
}, {
|
|
36
|
-
default:
|
|
37
|
-
|
|
41
|
+
default: a(() => [
|
|
42
|
+
b(m(o.label), 1)
|
|
38
43
|
]),
|
|
39
44
|
_: 2
|
|
40
|
-
}, 1032, ["modelValue", "placeholder", "onUpdate:modelValue"])
|
|
45
|
+
}, 1032, ["envVariables", "environment", "modelValue", "placeholder", "workspace", "onUpdate:modelValue"])
|
|
41
46
|
]),
|
|
42
47
|
_: 2
|
|
43
48
|
}, 1032, ["class"]))), 128))
|
|
44
49
|
]),
|
|
45
50
|
_: 1
|
|
46
|
-
})) :
|
|
51
|
+
})) : h("", !0)
|
|
47
52
|
])
|
|
48
53
|
]),
|
|
49
54
|
_: 3
|
|
@@ -51,5 +56,5 @@ const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5"
|
|
|
51
56
|
}
|
|
52
57
|
});
|
|
53
58
|
export {
|
|
54
|
-
|
|
59
|
+
A as default
|
|
55
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportCollectionModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionModal.vue"],"names":[],"mappings":"AA+aA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,CAAA;CAC7C,CAAC;;;;;;AA6dF,wBAQG"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { defineComponent as H, ref as W, computed as a, watch as _, onMounted as K, onUnmounted as G, openBlock as l, createBlock as J, unref as i, withCtx as Q, createElementBlock as d, createCommentVNode as f, createElementVNode as e, normalizeClass as X, Fragment as b, createVNode as m, toDisplayString as Y, createTextVNode as M } from "vue";
|
|
2
|
-
import Z from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
2
|
+
import { useModal as Z, ScalarModal as ee, ScalarIcon as te } from "@scalar/components";
|
|
3
|
+
import { isLocalUrl as oe } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { normalize as se } from "@scalar/openapi-parser";
|
|
5
|
+
import { getThemeStyles as ne, themeIds as re } from "@scalar/themes";
|
|
6
|
+
import { useColorMode as ie } from "@scalar/use-hooks/useColorMode";
|
|
7
|
+
import { useRouter as le } from "vue-router";
|
|
8
|
+
import ce from "../CommandPalette/WatchModeToggle.vue.js";
|
|
9
|
+
import { useUrlPrefetcher as ae } from "./hooks/useUrlPrefetcher.js";
|
|
10
|
+
import de from "./ImportNowButton.vue.js";
|
|
11
|
+
import me from "./IntegrationLogo.vue.js";
|
|
12
|
+
import ue from "./PrefetchError.vue.js";
|
|
8
13
|
import { getOpenApiDocumentVersion as T } from "./utils/getOpenApiDocumentVersion.js";
|
|
9
14
|
import { isDocument as U } from "./utils/isDocument.js";
|
|
10
15
|
import { isUrl as A } from "./utils/isUrl.js";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { isLocalUrl as ae } from "@scalar/oas-utils/helpers";
|
|
14
|
-
import { normalize as de } from "@scalar/openapi-parser";
|
|
15
|
-
import { getThemeStyles as me, themeIds as ue } from "@scalar/themes";
|
|
16
|
-
import { useColorMode as fe } from "@scalar/use-hooks/useColorMode";
|
|
17
|
-
import { useRouter as pe } from "vue-router";
|
|
16
|
+
import fe from "./WorkspaceSelector.vue.js";
|
|
17
|
+
import { useActiveEntities as pe } from "../../store/active-entities.js";
|
|
18
18
|
import { useWorkspace as ve } from "../../store/store.js";
|
|
19
|
-
const he = ["innerHTML"], xe = { class: "
|
|
19
|
+
const he = ["innerHTML"], xe = { class: "relative flex h-screen flex-col justify-center overflow-hidden px-6 md:px-0" }, ye = {
|
|
20
20
|
key: 0,
|
|
21
|
-
class: "flex
|
|
22
|
-
}, ge = { class: "rounded-xl
|
|
21
|
+
class: "mb-2 flex items-center justify-center p-1"
|
|
22
|
+
}, ge = { class: "size-10 rounded-xl" }, _e = ["src"], be = {
|
|
23
23
|
key: 2,
|
|
24
|
-
class: "text-
|
|
25
|
-
}, we = { class: "inline-flex flex-col
|
|
24
|
+
class: "text-md mb-2 line-clamp-1 text-center font-bold"
|
|
25
|
+
}, we = { class: "z-10 inline-flex w-full flex-col items-center gap-2" }, ke = { class: "flex justify-center" }, Ie = { class: "text-c-3 inline-flex items-center px-4 py-1 text-xs font-medium" }, Le = {
|
|
26
26
|
key: 0,
|
|
27
|
-
class: "
|
|
28
|
-
}, Me = { class: "flex items-center justify-center" }, Te = { class: "flex flex-col
|
|
27
|
+
class: "border-t-1/2 mt-5 overflow-hidden pt-4 text-sm"
|
|
28
|
+
}, Me = { class: "flex items-center justify-center" }, Te = { class: "flex flex-col items-center justify-center pb-8" }, Ue = { class: "flex flex-col items-center text-center" }, Ae = { class: "mb-2 flex h-10 w-10 items-center justify-center rounded-[10px] border" }, Ce = {
|
|
29
29
|
href: "https://scalar.com/download",
|
|
30
30
|
target: "_blank"
|
|
31
31
|
}, Je = /* @__PURE__ */ H({
|
|
@@ -37,11 +37,11 @@ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center p
|
|
|
37
37
|
},
|
|
38
38
|
emits: ["importFinished"],
|
|
39
39
|
setup(C, { emit: P }) {
|
|
40
|
-
const s = C, D = P, { activeWorkspace: p } =
|
|
40
|
+
const s = C, D = P, { activeWorkspace: p } = pe(), { workspaceMutators: V, events: j } = ve(), { prefetchResult: n, prefetchUrl: w, resetPrefetchResult: S } = ae(), r = Z(), h = W(!0);
|
|
41
41
|
j.hotKeys.on(() => r.hide());
|
|
42
42
|
const z = a(() => {
|
|
43
43
|
try {
|
|
44
|
-
return
|
|
44
|
+
return se(
|
|
45
45
|
n.content || s.source || ""
|
|
46
46
|
);
|
|
47
47
|
} catch {
|
|
@@ -52,7 +52,7 @@ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center p
|
|
|
52
52
|
return (t = (o = z.value) == null ? void 0 : o.info) == null ? void 0 : t.title;
|
|
53
53
|
}), k = a(
|
|
54
54
|
() => T(n.content || s.source || "")
|
|
55
|
-
), { darkLightMode: O } =
|
|
55
|
+
), { darkLightMode: O } = ie(), { currentRoute: $ } = le(), x = a(() => {
|
|
56
56
|
try {
|
|
57
57
|
const o = $.value.query, t = O.value === "dark" ? o.dark_logo : o.light_logo;
|
|
58
58
|
if (t) return decodeURIComponent(t);
|
|
@@ -79,7 +79,7 @@ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center p
|
|
|
79
79
|
o && U(o) && T(o) ? r.show() : r.hide();
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
|
-
const E = a(() => !!s.source && A(s.source)), F = a(() => !!s.source && U(s.source)), y = a(() => n.url &&
|
|
82
|
+
const E = a(() => !!s.source && A(s.source)), F = a(() => !!s.source && U(s.source)), y = a(() => n.url && oe(n.url)), g = (o) => {
|
|
83
83
|
document.body.classList.remove("has-no-import-url"), (E.value || F.value) && r.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
|
|
84
84
|
}, R = () => {
|
|
85
85
|
document.body.classList.remove("has-import-url"), document.body.classList.add("has-no-import-url");
|
|
@@ -100,18 +100,18 @@ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center p
|
|
|
100
100
|
document.body.classList.remove("has-import-url"), document.body.classList.remove("has-no-import-url");
|
|
101
101
|
});
|
|
102
102
|
const I = a(
|
|
103
|
-
() => p.value && y.value && s.integration && `<style>${
|
|
103
|
+
() => p.value && y.value && s.integration && `<style>${ne(s.integration)}</style>`
|
|
104
104
|
);
|
|
105
105
|
function q() {
|
|
106
106
|
var c;
|
|
107
|
-
const o = (u) =>
|
|
107
|
+
const o = (u) => re.includes(u), t = s.integration && o(s.integration) ? s.integration : "default";
|
|
108
108
|
y.value && V.edit(
|
|
109
|
-
(
|
|
109
|
+
(c = p.value) == null ? void 0 : c.uid,
|
|
110
110
|
"themeId",
|
|
111
111
|
t
|
|
112
112
|
), D("importFinished");
|
|
113
113
|
}
|
|
114
|
-
return (o, t) => (l(), J(i(
|
|
114
|
+
return (o, t) => (l(), J(i(ee), {
|
|
115
115
|
size: "full",
|
|
116
116
|
state: i(r)
|
|
117
117
|
}, {
|
|
@@ -134,29 +134,29 @@ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center p
|
|
|
134
134
|
e("div", { class: "section-flare-item" })
|
|
135
135
|
], -1)),
|
|
136
136
|
e("div", {
|
|
137
|
-
class: X(["
|
|
137
|
+
class: X(["border-1/2 m-auto flex w-full max-w-[380px] flex-col items-center rounded-xl px-8 py-8 transition-opacity", { "opacity-0": i(n).state === "loading" }])
|
|
138
138
|
}, [
|
|
139
139
|
i(n).error && i(n).state === "idle" && !k.value ? (l(), d(b, { key: 0 }, [
|
|
140
|
-
t[1] || (t[1] = e("div", { class: "text-
|
|
141
|
-
m(
|
|
140
|
+
t[1] || (t[1] = e("div", { class: "text-md mb-2 line-clamp-1 text-center font-bold" }, " No OpenAPI document found ", -1)),
|
|
141
|
+
m(ue, {
|
|
142
142
|
url: ((c = i(n)) == null ? void 0 : c.input) || s.source
|
|
143
143
|
}, null, 8, ["url"])
|
|
144
144
|
], 64)) : (l(), d(b, { key: 1 }, [
|
|
145
145
|
y.value ? (l(), d("div", ye, [
|
|
146
146
|
e("div", ge, [
|
|
147
|
-
m(
|
|
147
|
+
m(me, { integration: o.integration }, null, 8, ["integration"])
|
|
148
148
|
])
|
|
149
149
|
])) : x.value ? (l(), d("img", {
|
|
150
150
|
key: 1,
|
|
151
151
|
alt: "Logo",
|
|
152
|
-
class: "w-full object-contain
|
|
152
|
+
class: "mb-2 w-full object-contain",
|
|
153
153
|
src: x.value
|
|
154
154
|
}, null, 8, _e)) : f("", !0),
|
|
155
155
|
x.value ? f("", !0) : (l(), d("div", be, Y(N.value || "Untitled Collection"), 1)),
|
|
156
|
-
t[4] || (t[4] = e("div", { class: "text-c-1 text-
|
|
156
|
+
t[4] || (t[4] = e("div", { class: "text-c-1 text-balance text-center text-sm font-medium" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
|
|
157
157
|
k.value ? (l(), d(b, { key: 3 }, [
|
|
158
158
|
e("div", we, [
|
|
159
|
-
m(
|
|
159
|
+
m(de, {
|
|
160
160
|
source: ((u = i(n)) == null ? void 0 : u.url) ?? ((v = i(n)) == null ? void 0 : v.content) ?? o.source,
|
|
161
161
|
variant: "button",
|
|
162
162
|
watchMode: h.value,
|
|
@@ -166,18 +166,18 @@ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center p
|
|
|
166
166
|
e("div", ke, [
|
|
167
167
|
e("div", Ie, [
|
|
168
168
|
t[2] || (t[2] = M(" Import to: ")),
|
|
169
|
-
m(
|
|
169
|
+
m(fe)
|
|
170
170
|
])
|
|
171
171
|
]),
|
|
172
172
|
(L = i(n)) != null && L.url ? (l(), d("div", Le, [
|
|
173
173
|
e("div", Me, [
|
|
174
|
-
m(
|
|
174
|
+
m(ce, {
|
|
175
175
|
modelValue: h.value,
|
|
176
176
|
"onUpdate:modelValue": t[0] || (t[0] = (B) => h.value = B),
|
|
177
177
|
disableToolTip: !0
|
|
178
178
|
}, null, 8, ["modelValue"])
|
|
179
179
|
]),
|
|
180
|
-
t[3] || (t[3] = e("div", { class: "
|
|
180
|
+
t[3] || (t[3] = e("div", { class: "text-c-3 text-balance pt-0 text-center text-xs font-medium" }, " Automatically update your API client when the OpenAPI document content changes. ", -1))
|
|
181
181
|
])) : f("", !0)
|
|
182
182
|
], 64)) : f("", !0)
|
|
183
183
|
], 64))
|
|
@@ -186,15 +186,15 @@ const he = ["innerHTML"], xe = { class: "flex flex-col h-screen justify-center p
|
|
|
186
186
|
e("div", Ue, [
|
|
187
187
|
e("div", Ae, [
|
|
188
188
|
e("a", Ce, [
|
|
189
|
-
m(i(
|
|
189
|
+
m(i(te), {
|
|
190
190
|
icon: "Logo",
|
|
191
191
|
size: "xl"
|
|
192
192
|
})
|
|
193
193
|
])
|
|
194
194
|
]),
|
|
195
|
-
t[5] || (t[5] = e("span", { class: "text-c-2
|
|
195
|
+
t[5] || (t[5] = e("span", { class: "text-c-2 text-sm font-medium leading-snug" }, [
|
|
196
196
|
e("a", {
|
|
197
|
-
class: "hover:text-c-1
|
|
197
|
+
class: "hover:text-c-1 mb-1 inline-block underline-offset-2",
|
|
198
198
|
href: "https://scalar.com/download",
|
|
199
199
|
target: "_blank"
|
|
200
200
|
}, " Download Desktop App "),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as
|
|
1
|
+
import { defineComponent as b, openBlock as i, createElementBlock as g, Fragment as B, createBlock as c, unref as l, withCtx as f, createTextVNode as d, createCommentVNode as F } from "vue";
|
|
2
2
|
import { isUrl as I } from "./utils/isUrl.js";
|
|
3
3
|
import { useActiveEntities as U } from "../../store/active-entities.js";
|
|
4
4
|
import { ScalarButton as y } from "@scalar/components";
|
|
@@ -14,59 +14,59 @@ const _ = /* @__PURE__ */ b({
|
|
|
14
14
|
},
|
|
15
15
|
emits: ["importFinished"],
|
|
16
16
|
setup(k, { emit: w }) {
|
|
17
|
-
const r = k, h = w, v = M(), { activeWorkspace:
|
|
17
|
+
const r = k, h = w, v = M(), { activeWorkspace: n } = U(), { importSpecFromUrl: C, importSpecFile: x } = T(), { toast: u } = q();
|
|
18
18
|
async function a() {
|
|
19
|
-
var
|
|
19
|
+
var o, t, m;
|
|
20
20
|
try {
|
|
21
21
|
if (r.source) {
|
|
22
22
|
if (I(r.source)) {
|
|
23
|
-
const [
|
|
23
|
+
const [e, s] = await C(
|
|
24
24
|
r.source,
|
|
25
|
-
((
|
|
25
|
+
((o = n.value) == null ? void 0 : o.uid) ?? "",
|
|
26
26
|
{
|
|
27
|
-
proxyUrl: (
|
|
27
|
+
proxyUrl: (t = n.value) == null ? void 0 : t.proxyUrl,
|
|
28
28
|
watchMode: r.watchMode
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
|
-
|
|
31
|
+
e || p(s == null ? void 0 : s.collection);
|
|
32
32
|
} else {
|
|
33
|
-
const
|
|
33
|
+
const e = await x(
|
|
34
34
|
r.source,
|
|
35
|
-
((m =
|
|
35
|
+
((m = n.value) == null ? void 0 : m.uid) ?? ""
|
|
36
36
|
);
|
|
37
|
-
p(
|
|
37
|
+
p(e == null ? void 0 : e.collection);
|
|
38
38
|
}
|
|
39
39
|
u("Import successful", "info"), h("importFinished");
|
|
40
40
|
}
|
|
41
|
-
} catch (
|
|
42
|
-
console.error("[importCollection]",
|
|
43
|
-
const
|
|
44
|
-
u(`Import failed: ${
|
|
41
|
+
} catch (e) {
|
|
42
|
+
console.error("[importCollection]", e);
|
|
43
|
+
const s = (e == null ? void 0 : e.message) || "Unknown error";
|
|
44
|
+
u(`Import failed: ${s}`, "error");
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function p(
|
|
48
|
-
var
|
|
49
|
-
|
|
47
|
+
function p(o) {
|
|
48
|
+
var t;
|
|
49
|
+
o && v.push({
|
|
50
50
|
name: "request",
|
|
51
51
|
params: {
|
|
52
|
-
workspace: (
|
|
53
|
-
request:
|
|
52
|
+
workspace: (t = n.value) == null ? void 0 : t.uid,
|
|
53
|
+
request: o == null ? void 0 : o.requests[0]
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
return (
|
|
58
|
-
|
|
57
|
+
return (o, t) => o.source ? (i(), g(B, { key: 0 }, [
|
|
58
|
+
o.variant === "button" ? (i(), c(l(y), {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "py-2.5 px-6 rounded-lg font-bold h-fit mt-3 w-full",
|
|
61
61
|
size: "md",
|
|
62
62
|
type: "button",
|
|
63
63
|
onClick: a
|
|
64
64
|
}, {
|
|
65
|
-
default: f(() =>
|
|
65
|
+
default: f(() => t[0] || (t[0] = [
|
|
66
66
|
d(" Import Collection ")
|
|
67
67
|
])),
|
|
68
68
|
_: 1
|
|
69
|
-
})) : (
|
|
69
|
+
})) : (i(), c(l(y), {
|
|
70
70
|
key: 1,
|
|
71
71
|
class: "text-[21px] py-2.5 px-6 rounded-lg font-bold h-fit",
|
|
72
72
|
size: "md",
|
|
@@ -74,7 +74,7 @@ const _ = /* @__PURE__ */ b({
|
|
|
74
74
|
variant: "ghost",
|
|
75
75
|
onClick: a
|
|
76
76
|
}, {
|
|
77
|
-
default: f(() =>
|
|
77
|
+
default: f(() => t[1] || (t[1] = [
|
|
78
78
|
d(" Try it in the browser ")
|
|
79
79
|
])),
|
|
80
80
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenReader.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScreenReader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScreenReader.vue.d.ts","sourceRoot":"","sources":["../../src/components/ScreenReader.vue"],"names":[],"mappings":"AAkCA,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAC;AAgBJ,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;yBATrB,GAAG;yBACH,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;QA7EZ,OAAO;6EAoFd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAepG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerDropdown.vue"],"names":[],"mappings":"AA8LA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,IAAI,SAAS,EACpB,MAAM,EACP,MAAM,iCAAiC,CAAA;AAUxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;;AAuRF,wBAOG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as L, computed as i, watch as W, openBlock as n, createBlock as c, unref as a, withCtx as u, createElementVNode as s, normalizeClass as h, createElementBlock as d, Fragment as m, renderList as k, createVNode as v, createCommentVNode as f, createTextVNode as j, toDisplayString as q } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { cva as E, ScalarPopover as F, ScalarDropdownDivider as I, ScalarIcon as x, ScalarFloatingBackdrop as M, ScalarButton as P, cx as T } from "@scalar/components";
|
|
3
|
+
import { useLayout as $ } from "../../hooks/useLayout.js";
|
|
4
|
+
import { useWorkspace as G } from "../../store/store.js";
|
|
5
5
|
import w from "./ServerDropdownItem.vue.js";
|
|
6
|
-
const H = ["onClick"], J = { class: "flex items-center justify-center
|
|
6
|
+
const H = ["onClick"], J = { class: "flex h-4 w-4 items-center justify-center" }, Z = /* @__PURE__ */ L({
|
|
7
7
|
__name: "ServerDropdown",
|
|
8
8
|
props: {
|
|
9
9
|
collection: {},
|
|
@@ -13,7 +13,7 @@ const H = ["onClick"], J = { class: "flex items-center justify-center h-4 w-4" }
|
|
|
13
13
|
target: {}
|
|
14
14
|
},
|
|
15
15
|
setup(l) {
|
|
16
|
-
const { layout: C } =
|
|
16
|
+
const { layout: C } = $(), { servers: p, collectionMutators: D, events: U, serverMutators: V } = G(), y = i(
|
|
17
17
|
() => {
|
|
18
18
|
var e, r;
|
|
19
19
|
return (r = (e = l.operation) == null ? void 0 : e.servers) == null ? void 0 : r.map((t) => {
|
|
@@ -63,7 +63,7 @@ const H = ["onClick"], J = { class: "flex items-center justify-center h-4 w-4" }
|
|
|
63
63
|
if (!l.server) return;
|
|
64
64
|
const t = l.server.variables || {};
|
|
65
65
|
t[e] = { ...t[e], default: r }, V.edit(l.server.uid, "variables", t);
|
|
66
|
-
}, A =
|
|
66
|
+
}, A = E({
|
|
67
67
|
base: "gap-0.75 z-context-plus lg:text-sm text-xs whitespace-nowrap px-1.5 h-6.5",
|
|
68
68
|
variants: {
|
|
69
69
|
reference: {
|
|
@@ -72,7 +72,7 @@ const H = ["onClick"], J = { class: "flex items-center justify-center h-4 w-4" }
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
return (e, r) => (n(), c(a(
|
|
75
|
+
return (e, r) => (n(), c(a(F), {
|
|
76
76
|
class: "max-h-[inherit] p-0 text-sm",
|
|
77
77
|
offset: e.layout === "reference" ? 6 : 0,
|
|
78
78
|
placement: "bottom-start",
|
|
@@ -82,7 +82,7 @@ const H = ["onClick"], J = { class: "flex items-center justify-center h-4 w-4" }
|
|
|
82
82
|
}, {
|
|
83
83
|
popover: u(({ close: t }) => [
|
|
84
84
|
s("div", {
|
|
85
|
-
class: h(["custom-scroll flex
|
|
85
|
+
class: h(["custom-scroll flex max-h-[inherit] flex-col gap-1 p-1", e.layout !== "reference" && "border-t"]),
|
|
86
86
|
onClick: t
|
|
87
87
|
}, [
|
|
88
88
|
(n(!0), d(m, null, k(y.value, (o) => (n(), c(w, {
|
|
@@ -96,7 +96,7 @@ const H = ["onClick"], J = { class: "flex items-center justify-center h-4 w-4" }
|
|
|
96
96
|
"onUpdate:variable": g
|
|
97
97
|
}, null, 8, ["collection", "layout", "operation", "server", "serverOption"]))), 128)),
|
|
98
98
|
z.value ? (n(), d(m, { key: 0 }, [
|
|
99
|
-
v(a(
|
|
99
|
+
v(a(I)),
|
|
100
100
|
r[1] || (r[1] = s("div", { class: "text-xxs text-c-2 px-2.5 py-1" }, "Collection", -1))
|
|
101
101
|
], 64)) : f("", !0),
|
|
102
102
|
(n(!0), d(m, null, k(b.value, (o) => (n(), c(w, {
|
|
@@ -111,7 +111,7 @@ const H = ["onClick"], J = { class: "flex items-center justify-center h-4 w-4" }
|
|
|
111
111
|
}, null, 8, ["collection", "layout", "operation", "server", "serverOption"]))), 128)),
|
|
112
112
|
a(C) !== "modal" ? (n(), d("button", {
|
|
113
113
|
key: 1,
|
|
114
|
-
class: "
|
|
114
|
+
class: "text-xxs p-1.75 hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded",
|
|
115
115
|
type: "button",
|
|
116
116
|
onClick: B
|
|
117
117
|
}, [
|
|
@@ -126,11 +126,11 @@ const H = ["onClick"], J = { class: "flex items-center justify-center h-4 w-4" }
|
|
|
126
126
|
], 10, H)
|
|
127
127
|
]),
|
|
128
128
|
backdrop: u(() => [
|
|
129
|
-
v(a(
|
|
129
|
+
v(a(M), { class: "-top-[--scalar-address-bar-height] rounded-lg" })
|
|
130
130
|
]),
|
|
131
131
|
default: u(() => [
|
|
132
|
-
v(a(
|
|
133
|
-
class: h(a(
|
|
132
|
+
v(a(P), {
|
|
133
|
+
class: h(a(T)(a(A)({ reference: e.layout === "reference" }))),
|
|
134
134
|
variant: "ghost"
|
|
135
135
|
}, {
|
|
136
136
|
default: u(() => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerDropdownItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerDropdownItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerDropdownItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerDropdownItem.vue"],"names":[],"mappings":"AA4HA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,IAAI,SAAS,EACpB,MAAM,EACP,MAAM,iCAAiC,CAAA;AAQxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,YAAY,EAAE;QACZ,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,IAAI,EAAE,YAAY,GAAG,SAAS,CAAA;IAC9B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;CAC/B,CAAC;;;;;;AAgMF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ServerDropdownItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-8eba7808"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as C, useId as O, computed as b, openBlock as
|
|
2
|
-
import N from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
const P = ["aria-expanded"], j = { class: "
|
|
1
|
+
import { defineComponent as C, useId as O, computed as b, openBlock as n, createElementBlock as d, normalizeClass as V, createElementVNode as c, mergeProps as M, unref as a, createVNode as p, toDisplayString as E, withModifiers as I, createCommentVNode as f } from "vue";
|
|
2
|
+
import { ScalarListboxCheckbox as N, ScalarMarkdown as q } from "@scalar/components";
|
|
3
|
+
import B from "./ServerVariablesForm.vue.js";
|
|
4
|
+
import { useWorkspace as D } from "../../store/store.js";
|
|
5
|
+
const P = ["aria-expanded"], j = { class: "overflow-hidden text-ellipsis whitespace-nowrap" }, z = ["id"], L = { key: 0 }, U = { class: "description text-c-3 px-3 py-1.5" }, G = /* @__PURE__ */ C({
|
|
6
6
|
__name: "ServerDropdownItem",
|
|
7
7
|
props: {
|
|
8
8
|
collection: {},
|
|
@@ -14,9 +14,9 @@ const P = ["aria-expanded"], j = { class: "whitespace-nowrap text-ellipsis overf
|
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:variable"],
|
|
16
16
|
setup(y, { emit: h }) {
|
|
17
|
-
const t = y, S = h, u = O(), { collectionMutators: g, requestMutators: v, servers: k } =
|
|
17
|
+
const t = y, S = h, u = O(), { collectionMutators: g, requestMutators: v, servers: k } = D(), x = (e, r) => {
|
|
18
18
|
var o, i;
|
|
19
|
-
m(e) && t.layout !== "reference" && (r == null || r.stopPropagation()), t.type === "collection" && t.collection ? ((i = (o = t.operation) == null ? void 0 : o.servers) != null && i.length && v.edit(t.operation.uid, "selectedServerUid",
|
|
19
|
+
m(e) && t.layout !== "reference" && (r == null || r.stopPropagation()), t.type === "collection" && t.collection ? ((i = (o = t.operation) == null ? void 0 : o.servers) != null && i.length && v.edit(t.operation.uid, "selectedServerUid", null), g.edit(
|
|
20
20
|
t.collection.uid,
|
|
21
21
|
"selectedServerUid",
|
|
22
22
|
e
|
|
@@ -30,7 +30,7 @@ const P = ["aria-expanded"], j = { class: "whitespace-nowrap text-ellipsis overf
|
|
|
30
30
|
if (!e) return !1;
|
|
31
31
|
const r = k[e];
|
|
32
32
|
return Object.keys((r == null ? void 0 : r.variables) ?? {}).length > 0;
|
|
33
|
-
},
|
|
33
|
+
}, l = b(
|
|
34
34
|
() => {
|
|
35
35
|
var e;
|
|
36
36
|
return s.value && m(((e = t.server) == null ? void 0 : e.uid) ?? "");
|
|
@@ -40,32 +40,32 @@ const P = ["aria-expanded"], j = { class: "whitespace-nowrap text-ellipsis overf
|
|
|
40
40
|
};
|
|
41
41
|
return (e, r) => {
|
|
42
42
|
var o, i;
|
|
43
|
-
return
|
|
44
|
-
class: V(["min-h-fit
|
|
43
|
+
return n(), d("div", {
|
|
44
|
+
class: V(["group/item flex min-h-fit flex-col rounded border", { "border-transparent": !s.value }])
|
|
45
45
|
}, [
|
|
46
|
-
c("button", M(
|
|
47
|
-
"aria-expanded":
|
|
48
|
-
class: ["cursor-pointer
|
|
46
|
+
c("button", M(l.value ? { "aria-controls": a(u) } : {}, {
|
|
47
|
+
"aria-expanded": l.value,
|
|
48
|
+
class: ["flex min-h-8 cursor-pointer items-center gap-1.5 rounded px-1.5", s.value ? "text-c-1 bg-b-2" : "hover:bg-b-2"],
|
|
49
49
|
type: "button",
|
|
50
50
|
onClick: r[0] || (r[0] = (w) => x(e.serverOption.id, w))
|
|
51
51
|
}), [
|
|
52
|
-
p(a(
|
|
52
|
+
p(a(N), { selected: s.value }, null, 8, ["selected"]),
|
|
53
53
|
c("span", j, E(e.serverOption.label), 1)
|
|
54
54
|
], 16, P),
|
|
55
|
-
|
|
55
|
+
l.value && t.layout !== "reference" ? (n(), d("div", {
|
|
56
56
|
key: 0,
|
|
57
57
|
id: a(u),
|
|
58
|
-
class: "bg-b-2
|
|
58
|
+
class: "bg-b-2 divide divide-y rounded-b border-t *:pl-4",
|
|
59
59
|
onClick: r[1] || (r[1] = I(() => {
|
|
60
60
|
}, ["stop"]))
|
|
61
61
|
}, [
|
|
62
|
-
p(
|
|
62
|
+
p(B, {
|
|
63
63
|
variables: (o = e.server) == null ? void 0 : o.variables,
|
|
64
64
|
"onUpdate:variable": _
|
|
65
65
|
}, null, 8, ["variables"]),
|
|
66
|
-
(i = e.server) != null && i.description ? (
|
|
66
|
+
(i = e.server) != null && i.description ? (n(), d("div", L, [
|
|
67
67
|
c("div", U, [
|
|
68
|
-
p(a(
|
|
68
|
+
p(a(q), {
|
|
69
69
|
value: e.server.description
|
|
70
70
|
}, null, 8, ["value"])
|
|
71
71
|
])
|