@scalar/api-client 2.19.2 → 2.19.3
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 +21 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/hooks/useFileDialog.d.ts +4 -4
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +96 -48
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts +96 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +49 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +16 -17
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +109 -152
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +2 -2
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +9 -10
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +1 -3
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +2 -2
- package/dist/v2/features/modal/Modal.vue2.js +31 -31
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts +8 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +36 -0
- package/dist/v2/features/modal/index.d.ts +1 -0
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/modal/index.js +4 -2
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +48 -34
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts +2 -1
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-server.js +2 -2
- package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +0 -2
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +110 -135
- package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +1 -1
- package/dist/v2/helpers/get-servers.d.ts +23 -0
- package/dist/v2/helpers/get-servers.d.ts.map +1 -0
- package/dist/v2/helpers/get-servers.js +66 -0
- package/dist/v2/helpers/index.d.ts +1 -0
- package/dist/v2/helpers/index.d.ts.map +1 -1
- package/dist/v2/helpers/index.js +4 -2
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as W, ref as w, useId as I, watch as N, nextTick as D, onBeforeMount as E, onBeforeUnmount as F, computed as d, toValue as U, withDirectives as k, createElementBlock as u, openBlock as m, createElementVNode as i, unref as o, createVNode as l, withCtx as V, vShow as b } from "vue";
|
|
2
2
|
import { addScalarClassesToHeadless as A, ScalarTeleportRoot as $ } from "@scalar/components";
|
|
3
3
|
import { ScalarToasts as z } from "@scalar/use-toasts";
|
|
4
4
|
import { useFocusTrap as H } from "@vueuse/integrations/useFocusTrap";
|
|
@@ -16,7 +16,7 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
16
16
|
}, Y = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "flex h-full w-full items-center justify-center"
|
|
19
|
-
}, Z = {}, me = /* @__PURE__ */
|
|
19
|
+
}, Z = {}, me = /* @__PURE__ */ W({
|
|
20
20
|
...Z,
|
|
21
21
|
__name: "Modal",
|
|
22
22
|
props: {
|
|
@@ -31,7 +31,7 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
31
31
|
plugins: {},
|
|
32
32
|
options: {}
|
|
33
33
|
},
|
|
34
|
-
setup(e, { expose:
|
|
34
|
+
setup(e, { expose: x }) {
|
|
35
35
|
typeof window < "u" && (window.dataDumpWorkspace = () => e.workspaceStore);
|
|
36
36
|
const r = {
|
|
37
37
|
label: "default",
|
|
@@ -44,37 +44,37 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
44
44
|
modalState: e.modalState,
|
|
45
45
|
store: e.workspaceStore
|
|
46
46
|
}), j(e.eventBus, "modal");
|
|
47
|
-
const
|
|
47
|
+
const v = w(null), f = I(), { activate: p, deactivate: y } = H(v, {
|
|
48
48
|
allowOutsideClick: !0,
|
|
49
|
-
fallbackFocus: `#${
|
|
49
|
+
fallbackFocus: `#${f}`
|
|
50
50
|
}), S = () => {
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
51
|
+
y(), e.eventBus.emit("operation:cancel:request");
|
|
52
|
+
}, B = q(() => typeof window < "u" ? window.document.body : null);
|
|
53
|
+
N(
|
|
54
54
|
() => e.modalState.open,
|
|
55
55
|
(a) => {
|
|
56
|
-
|
|
56
|
+
B.value = a, a ? p({ checkCanFocusTrap: () => D() }) : S();
|
|
57
57
|
}
|
|
58
|
-
),
|
|
59
|
-
const
|
|
60
|
-
() => e.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ??
|
|
58
|
+
), E(() => A()), F(() => S());
|
|
59
|
+
const g = 288, c = d(
|
|
60
|
+
() => e.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ?? g
|
|
61
61
|
), T = (a) => e.workspaceStore?.update("x-scalar-sidebar-width", a), h = d(
|
|
62
62
|
() => R(e.workspaceStore, e.document.value)
|
|
63
|
-
),
|
|
63
|
+
), C = d(
|
|
64
64
|
() => L(
|
|
65
65
|
e.document.value?.components?.securitySchemes,
|
|
66
|
-
|
|
66
|
+
U(e.options)?.authentication?.securitySchemes
|
|
67
67
|
)
|
|
68
68
|
);
|
|
69
|
-
return
|
|
69
|
+
return x({
|
|
70
70
|
sidebarWidth: c,
|
|
71
71
|
environment: h
|
|
72
|
-
}), (a, t) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
id: o(
|
|
72
|
+
}), (a, t) => k((m(), u("div", P, [
|
|
73
|
+
i("div", J, [
|
|
74
|
+
i("div", {
|
|
75
|
+
id: o(f),
|
|
76
76
|
ref_key: "client",
|
|
77
|
-
ref:
|
|
77
|
+
ref: v,
|
|
78
78
|
"aria-label": "API Client",
|
|
79
79
|
"aria-modal": "true",
|
|
80
80
|
class: "scalar-app-layout scalar-client flex",
|
|
@@ -87,13 +87,13 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
87
87
|
e.document.value && e.path?.value && e.method?.value ? (m(), u("main", X, [
|
|
88
88
|
l(o(G), {
|
|
89
89
|
modelValue: n.value,
|
|
90
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
90
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => n.value = s),
|
|
91
91
|
class: "absolute top-2 left-3 z-[10001]"
|
|
92
92
|
}, null, 8, ["modelValue"]),
|
|
93
|
-
|
|
93
|
+
k(l(o(K), {
|
|
94
94
|
sidebarWidth: c.value,
|
|
95
95
|
"onUpdate:sidebarWidth": [
|
|
96
|
-
t[1] || (t[1] = (
|
|
96
|
+
t[1] || (t[1] = (s) => c.value = s),
|
|
97
97
|
T
|
|
98
98
|
],
|
|
99
99
|
activeWorkspace: r,
|
|
@@ -106,7 +106,7 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
106
106
|
workspaces: [],
|
|
107
107
|
onSelectItem: e.sidebarState.handleSelectItem
|
|
108
108
|
}, null, 8, ["sidebarWidth", "documents", "eventBus", "sidebarState", "onSelectItem"]), [
|
|
109
|
-
[
|
|
109
|
+
[b, n.value]
|
|
110
110
|
]),
|
|
111
111
|
l(O, {
|
|
112
112
|
activeWorkspace: r,
|
|
@@ -116,28 +116,28 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
116
116
|
environment: h.value,
|
|
117
117
|
eventBus: e.eventBus,
|
|
118
118
|
exampleName: e.exampleName?.value,
|
|
119
|
-
hideClientButton: k(e.options)?.hideClientButton ?? !1,
|
|
120
119
|
layout: "modal",
|
|
121
120
|
method: e.method?.value,
|
|
121
|
+
options: e.options,
|
|
122
122
|
path: e.path?.value,
|
|
123
123
|
plugins: e.plugins,
|
|
124
|
-
securitySchemes:
|
|
124
|
+
securitySchemes: C.value,
|
|
125
125
|
workspaceStore: e.workspaceStore
|
|
126
|
-
}, null, 8, ["document", "documentSlug", "environment", "eventBus", "exampleName", "
|
|
126
|
+
}, null, 8, ["document", "documentSlug", "environment", "eventBus", "exampleName", "method", "options", "path", "plugins", "securitySchemes", "workspaceStore"])
|
|
127
127
|
])) : (m(), u("div", Y, [...t[3] || (t[3] = [
|
|
128
|
-
|
|
128
|
+
i("span", { class: "text-c-3" }, "No document selected", -1)
|
|
129
129
|
])]))
|
|
130
130
|
]),
|
|
131
131
|
_: 1
|
|
132
132
|
})
|
|
133
133
|
], 8, Q),
|
|
134
|
-
|
|
134
|
+
i("div", {
|
|
135
135
|
class: "scalar-app-exit",
|
|
136
|
-
onClick: t[2] || (t[2] = (
|
|
136
|
+
onClick: t[2] || (t[2] = (s) => e.modalState.hide())
|
|
137
137
|
})
|
|
138
138
|
])
|
|
139
139
|
], 512)), [
|
|
140
|
-
[
|
|
140
|
+
[b, e.modalState.open]
|
|
141
141
|
]);
|
|
142
142
|
}
|
|
143
143
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
|
+
import { type AvailableClients } from '@scalar/types/snippetz';
|
|
3
|
+
/**
|
|
4
|
+
* Map the old hiddenClients config to the new httpClients config.
|
|
5
|
+
* Filters out clients based on the configuration and returns the remaining clients.
|
|
6
|
+
*/
|
|
7
|
+
export declare const mapHiddenClientsConfig: (hiddenClients: ApiReferenceConfiguration["hiddenClients"]) => AvailableClients;
|
|
8
|
+
//# sourceMappingURL=map-hidden-clients-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-hidden-clients-config.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/helpers/map-hidden-clients-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAqB,KAAK,gBAAgB,EAAmB,MAAM,wBAAwB,CAAA;AAElG;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,eAAe,yBAAyB,CAAC,eAAe,CAAC,KAAG,gBAgElG,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { objectKeys as l } from "@scalar/helpers/object/object-keys";
|
|
2
|
+
import { AVAILABLE_CLIENTS as s, GROUPED_CLIENTS as c } from "@scalar/types/snippetz";
|
|
3
|
+
const A = (o) => {
|
|
4
|
+
if (o === !0)
|
|
5
|
+
return [];
|
|
6
|
+
if (!o || Array.isArray(o) && o.length === 0)
|
|
7
|
+
return s;
|
|
8
|
+
const t = new Set(s);
|
|
9
|
+
if (Array.isArray(o))
|
|
10
|
+
for (const e of o) {
|
|
11
|
+
const f = c[e];
|
|
12
|
+
if (f)
|
|
13
|
+
for (const r of f)
|
|
14
|
+
t.delete(`${e}/${r}`);
|
|
15
|
+
else if (e.includes("/"))
|
|
16
|
+
t.delete(e);
|
|
17
|
+
else
|
|
18
|
+
for (const r of l(c))
|
|
19
|
+
t.delete(`${r}/${e}`);
|
|
20
|
+
}
|
|
21
|
+
else if (typeof o == "object") {
|
|
22
|
+
for (const [e, f] of Object.entries(o))
|
|
23
|
+
if (f === !0) {
|
|
24
|
+
const r = c[e];
|
|
25
|
+
if (r)
|
|
26
|
+
for (const i of r)
|
|
27
|
+
t.delete(`${e}/${i}`);
|
|
28
|
+
} else if (Array.isArray(f))
|
|
29
|
+
for (const r of f)
|
|
30
|
+
t.delete(r), t.delete(`${e}/${r}`);
|
|
31
|
+
}
|
|
32
|
+
return Array.from(t);
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
A as mapHiddenClientsConfig
|
|
36
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type ApiClientModal, createApiClientModal } from './helpers/create-api-client-modal.js';
|
|
2
|
+
export { mapHiddenClientsConfig } from './helpers/map-hidden-clients-config.js';
|
|
2
3
|
export { initializeModalEvents } from './modal-events.js';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { createApiClientModal as o } from "./helpers/create-api-client-modal.js";
|
|
2
|
-
import {
|
|
2
|
+
import { mapHiddenClientsConfig as r } from "./helpers/map-hidden-clients-config.js";
|
|
3
|
+
import { initializeModalEvents as a } from "./modal-events.js";
|
|
3
4
|
export {
|
|
4
5
|
o as createApiClientModal,
|
|
5
|
-
|
|
6
|
+
a as initializeModalEvents,
|
|
7
|
+
r as mapHiddenClientsConfig
|
|
6
8
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RouteProps } from '../../../v2/features/app/helpers/routes.js';
|
|
2
|
+
import type { ModalProps } from '../../../v2/features/modal/Modal.vue.js';
|
|
2
3
|
/**
|
|
3
4
|
* Operation example page
|
|
4
5
|
*
|
|
@@ -8,9 +9,11 @@ import type { RouteProps } from '../../../v2/features/app/helpers/routes.js';
|
|
|
8
9
|
* - Send example request
|
|
9
10
|
*/
|
|
10
11
|
declare const _default: import("vue").DefineComponent<RouteProps & {
|
|
11
|
-
|
|
12
|
+
/** Subset of config options for the modal */
|
|
13
|
+
options?: ModalProps["options"];
|
|
12
14
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps & {
|
|
13
|
-
|
|
15
|
+
/** Subset of config options for the modal */
|
|
16
|
+
options?: ModalProps["options"];
|
|
14
17
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
18
|
export default _default;
|
|
16
19
|
//# sourceMappingURL=Operation.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/operation/Operation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/operation/Operation.vue"],"names":[],"mappings":"AAkMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAM/D;;;;;;;GAOG;;IAGC,6CAA6C;cACnC,UAAU,CAAC,SAAS,CAAC;;IAD/B,6CAA6C;cACnC,UAAU,CAAC,SAAS,CAAC;;AAHnC,wBA0PC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as y, computed as n, toValue as o, onMounted as S, createBlock as x, createElementBlock as k, openBlock as c, unref as i, createElementVNode as g } from "vue";
|
|
2
|
+
import { getResolvedRef as s } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { mapHiddenClientsConfig as C } from "../modal/helpers/map-hidden-clients-config.js";
|
|
4
|
+
import { combineParams as B } from "./helpers/combine-params.js";
|
|
5
|
+
import { getSelectedServer as w } from "./helpers/get-selected-server.js";
|
|
6
|
+
import { getServers as U } from "../../helpers/get-servers.js";
|
|
7
|
+
import p from "../../blocks/operation-block/OperationBlock.vue.js";
|
|
8
|
+
const b = {
|
|
7
9
|
key: 1,
|
|
8
10
|
class: "flex h-full w-full items-center justify-center"
|
|
9
|
-
},
|
|
10
|
-
...
|
|
11
|
+
}, N = {}, $ = /* @__PURE__ */ y({
|
|
12
|
+
...N,
|
|
11
13
|
__name: "Operation",
|
|
12
14
|
props: {
|
|
13
15
|
documentSlug: {},
|
|
@@ -22,21 +24,23 @@ const B = {
|
|
|
22
24
|
workspaceStore: {},
|
|
23
25
|
activeWorkspace: {},
|
|
24
26
|
plugins: {},
|
|
25
|
-
|
|
27
|
+
options: {}
|
|
26
28
|
},
|
|
27
29
|
setup(e) {
|
|
28
|
-
const
|
|
30
|
+
const u = n(() => e.path ? s(e.document?.paths?.[e.path]) : null), l = n(() => {
|
|
29
31
|
if (!e.path || !e.method)
|
|
30
32
|
return null;
|
|
31
|
-
const t =
|
|
33
|
+
const t = s(e.document?.paths?.[e.path]?.[e.method]);
|
|
32
34
|
if (!t)
|
|
33
35
|
return null;
|
|
34
|
-
|
|
35
|
-
if (!n)
|
|
36
|
+
if (!u.value)
|
|
36
37
|
return t;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const a = B(
|
|
39
|
+
u.value.parameters,
|
|
40
|
+
t.parameters
|
|
41
|
+
);
|
|
42
|
+
return { ...t, parameters: a };
|
|
43
|
+
}), m = n(() => [
|
|
40
44
|
...(e.workspaceStore.workspace?.["x-scalar-cookies"] ?? []).map((t) => ({
|
|
41
45
|
...t,
|
|
42
46
|
location: "workspace"
|
|
@@ -45,49 +49,59 @@ const B = {
|
|
|
45
49
|
...t,
|
|
46
50
|
location: "document"
|
|
47
51
|
}))
|
|
48
|
-
]),
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
]), r = n(() => {
|
|
53
|
+
const t = o(e.options)?.servers ?? l.value?.servers ?? u.value?.servers ?? e.document?.servers;
|
|
54
|
+
return U(t, {
|
|
55
|
+
baseServerUrl: o(e.options)?.baseServerURL,
|
|
56
|
+
documentUrl: e.document?.["x-scalar-original-source-url"]
|
|
57
|
+
});
|
|
58
|
+
}), d = n(
|
|
59
|
+
() => w(e.document, r.value)
|
|
60
|
+
);
|
|
61
|
+
S(() => {
|
|
62
|
+
typeof e.document?.["x-scalar-selected-server"] > "u" && r.value?.[0]?.url && e.eventBus.emit("server:update:selected", { url: r.value[0].url });
|
|
51
63
|
});
|
|
52
|
-
const
|
|
64
|
+
const v = n(() => e.document?.["x-scalar-set-operation-security"] ? {
|
|
53
65
|
type: "operation",
|
|
54
66
|
path: e.path ?? "",
|
|
55
67
|
method: e.method ?? "get"
|
|
56
68
|
} : {
|
|
57
69
|
type: "document"
|
|
58
|
-
}),
|
|
59
|
-
|
|
70
|
+
}), h = n(
|
|
71
|
+
() => C(o(e.options)?.hiddenClients)
|
|
72
|
+
), f = "2.19.3";
|
|
73
|
+
return (t, a) => e.path && e.method && e.exampleName && l.value ? (c(), x(i(p), {
|
|
60
74
|
key: 0,
|
|
61
|
-
appVersion:
|
|
62
|
-
authMeta:
|
|
75
|
+
appVersion: i(f),
|
|
76
|
+
authMeta: v.value,
|
|
63
77
|
documentSecurity: e.document?.security ?? [],
|
|
64
78
|
documentSelectedSecurity: e.document?.["x-scalar-selected-security"],
|
|
65
79
|
documentUrl: e.document?.["x-scalar-original-source-url"],
|
|
66
80
|
environment: e.environment,
|
|
67
81
|
eventBus: e.eventBus,
|
|
68
82
|
exampleKey: e.exampleName,
|
|
69
|
-
globalCookies:
|
|
70
|
-
hideClientButton: e.hideClientButton,
|
|
83
|
+
globalCookies: m.value,
|
|
84
|
+
hideClientButton: o(e.options)?.hideClientButton ?? !1,
|
|
71
85
|
history: [],
|
|
72
|
-
httpClients:
|
|
86
|
+
httpClients: h.value,
|
|
73
87
|
layout: e.layout,
|
|
74
88
|
method: e.method,
|
|
75
|
-
operation:
|
|
89
|
+
operation: l.value,
|
|
76
90
|
path: e.path,
|
|
77
91
|
plugins: e.plugins,
|
|
78
92
|
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
79
93
|
securitySchemes: e.securitySchemes,
|
|
80
94
|
selectedClient: e.workspaceStore.workspace["x-scalar-default-client"],
|
|
81
|
-
server:
|
|
82
|
-
servers:
|
|
95
|
+
server: d.value,
|
|
96
|
+
servers: r.value,
|
|
83
97
|
setOperationSecurity: e.document?.["x-scalar-set-operation-security"] ?? !1,
|
|
84
98
|
totalPerformedRequests: 0,
|
|
85
|
-
"onUpdate:servers":
|
|
86
|
-
}, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (c(),
|
|
87
|
-
|
|
99
|
+
"onUpdate:servers": a[0] || (a[0] = (R) => e.eventBus.emit("ui:route:page", { name: "document.servers" }))
|
|
100
|
+
}, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (c(), k("div", b, [...a[1] || (a[1] = [
|
|
101
|
+
g("span", { class: "text-c-3" }, "Select an operation to view details", -1)
|
|
88
102
|
])]));
|
|
89
103
|
}
|
|
90
104
|
});
|
|
91
105
|
export {
|
|
92
|
-
|
|
106
|
+
$ as default
|
|
93
107
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
1
2
|
import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
|
|
2
3
|
/**
|
|
3
4
|
* Get the selected server for a document,
|
|
@@ -6,5 +7,5 @@ import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspac
|
|
|
6
7
|
* If x-scalar-selected-server is undefined we select the first server (this means the user has not selected a server yet)
|
|
7
8
|
* If the user has un-selected a server it would be an empty string
|
|
8
9
|
*/
|
|
9
|
-
export declare const getSelectedServer: (document: WorkspaceDocument | null) =>
|
|
10
|
+
export declare const getSelectedServer: (document: WorkspaceDocument | null, servers: ServerObject[] | null) => ServerObject | null;
|
|
10
11
|
//# sourceMappingURL=get-selected-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-selected-server.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/operation/helpers/get-selected-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,iBAAiB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get-selected-server.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/operation/helpers/get-selected-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,iBAAiB,GAAG,IAAI,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,wBAQnG,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l = (r, e) => typeof r?.["x-scalar-selected-server"] > "u" && e?.length ? e[0] : e?.find(({ url: t }) => t === r?.["x-scalar-selected-server"]) ?? null;
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
l as getSelectedServer
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAC;;
|
|
1
|
+
{"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAC;;AA+IF,wBAMG"}
|
|
@@ -2,8 +2,6 @@ import { type ThemeId } from '@scalar/themes';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** Currently active proxy URL, when set to null means no proxy */
|
|
4
4
|
activeProxyUrl?: string | null;
|
|
5
|
-
/** Custom proxy url, when set to null means no custom proxy */
|
|
6
|
-
customProxyUrl?: string | null;
|
|
7
5
|
/** Currently active theme ID */
|
|
8
6
|
activeThemeId: ThemeId;
|
|
9
7
|
/** Currently active color mode */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/CollectionSettings.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/CollectionSettings.vue"],"names":[],"mappings":"AAsQA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAQvB,KAAK,WAAW,GAAG;IACjB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,gCAAgC;IAChC,aAAa,EAAE,OAAO,CAAA;IACtB,kCAAkC;IAClC,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;;;;;AA2fF,wBAOG"}
|