@scalar/api-client 2.1.46 → 2.1.48
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.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +6 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +32 -26
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +14 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +15 -10
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +17 -12
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +2 -2
- package/dist/components/ImportCollection/DropEventListener.vue.js +6 -6
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -21
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +87 -74
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +2 -2
- package/dist/components/ImportCollection/PasteEventListener.vue.js +5 -5
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +10 -5
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +43 -33
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +31 -21
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +17 -17
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +14 -13
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -3
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +11 -11
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +11 -10
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +22 -10
- package/dist/router.d.ts +4 -41
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +18 -149
- package/dist/routes.d.ts +150 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +182 -0
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/router-params.js +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +90 -90
- package/dist/style.css +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +20 -15
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +71 -71
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +18 -18
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +46 -33
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +6 -6
- 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 +26 -21
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +5 -97
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +97 -2
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +61 -55
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +95 -64
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +60 -50
- package/dist/views/Request/types/sidebar-item.d.ts +2 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +12 -7
- package/package.json +7 -7
- package/dist/components/SubpageHeader.vue.d.ts +0 -18
- package/dist/components/SubpageHeader.vue.d.ts.map +0 -1
|
@@ -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":"AAyUA,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;;;;;;AAiYF,wBAQG"}
|
|
@@ -1,128 +1,141 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as j, ref as z, computed as l, watch as f, onMounted as S, onUnmounted as B, openBlock as c, createBlock as g, unref as i, withCtx as E, createElementVNode as t, normalizeClass as F, createElementBlock as m, Fragment as x, createVNode as a, createCommentVNode as h, toDisplayString as q, createTextVNode as k } from "vue";
|
|
2
|
+
import R from "../CommandPalette/WatchModeToggle.vue.js";
|
|
3
3
|
import W from "./ImportNowButton.vue.js";
|
|
4
4
|
import K from "./IntegrationLogo.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useUrlPrefetcher as
|
|
8
|
-
import { getOpenApiDocumentVersion as
|
|
9
|
-
import { isDocument as
|
|
10
|
-
import { isUrl as
|
|
11
|
-
import { useModal as
|
|
12
|
-
import { isLocalUrl as
|
|
13
|
-
import { normalize as
|
|
14
|
-
import { useWorkspace as
|
|
15
|
-
const
|
|
5
|
+
import G from "./PrefetchError.vue.js";
|
|
6
|
+
import H from "./WorkspaceSelector.vue.js";
|
|
7
|
+
import { useUrlPrefetcher as J } from "./hooks/useUrlPrefetcher.js";
|
|
8
|
+
import { getOpenApiDocumentVersion as I } from "./utils/getOpenApiDocumentVersion.js";
|
|
9
|
+
import { isDocument as U } from "./utils/isDocument.js";
|
|
10
|
+
import { isUrl as A } from "./utils/isUrl.js";
|
|
11
|
+
import { useModal as Q, ScalarModal as X, ScalarIcon as Y } from "@scalar/components";
|
|
12
|
+
import { isLocalUrl as Z } from "@scalar/oas-utils/helpers";
|
|
13
|
+
import { normalize as ee } from "@scalar/openapi-parser";
|
|
14
|
+
import { useWorkspace as te } from "../../store/store.js";
|
|
15
|
+
const oe = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden relative md:px-0" }, se = { class: "text-center text-md font-bold mb-2 line-clamp-1" }, re = { class: "inline-flex flex-col gap-2 items-center z-10 w-full" }, ne = { class: "flex justify-center" }, ie = { class: "inline-flex py-1 px-4 items-center text-xs font-medium text-c-3" }, le = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "text-sm overflow-hidden mt-5 pt-4 border-t-1/2"
|
|
18
|
-
},
|
|
18
|
+
}, ce = { class: "flex items-center justify-center" }, ae = { class: "flex flex-col justify-center items-center pb-8" }, de = { class: "text-center flex items-center flex-col" }, me = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, ue = {
|
|
19
19
|
href: "https://scalar.com/download",
|
|
20
20
|
target: "_blank"
|
|
21
|
-
}, Le = /* @__PURE__ */
|
|
21
|
+
}, Le = /* @__PURE__ */ j({
|
|
22
22
|
__name: "ImportCollectionModal",
|
|
23
23
|
props: {
|
|
24
24
|
source: {},
|
|
25
|
-
integration: {}
|
|
25
|
+
integration: {},
|
|
26
|
+
eventType: {}
|
|
26
27
|
},
|
|
27
28
|
emits: ["importFinished"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const
|
|
29
|
+
setup(L) {
|
|
30
|
+
const s = L, { activeWorkspace: v, events: P } = te(), { prefetchResult: r, prefetchUrl: y, resetPrefetchResult: C } = J(), n = Q(), u = z(!0);
|
|
31
|
+
P.hotKeys.on(() => n.hide());
|
|
32
|
+
const D = l(() => {
|
|
32
33
|
try {
|
|
33
|
-
return
|
|
34
|
-
|
|
34
|
+
return ee(
|
|
35
|
+
r.content || s.source || ""
|
|
35
36
|
);
|
|
36
37
|
} catch {
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
|
-
}),
|
|
40
|
+
}), M = l(() => {
|
|
40
41
|
var o, e;
|
|
41
|
-
return (e = (o =
|
|
42
|
-
}),
|
|
43
|
-
() =>
|
|
42
|
+
return (e = (o = D.value) == null ? void 0 : o.info) == null ? void 0 : e.title;
|
|
43
|
+
}), b = l(
|
|
44
|
+
() => I(r.content || s.source || "")
|
|
44
45
|
);
|
|
45
|
-
|
|
46
|
-
() =>
|
|
47
|
-
(o) => {
|
|
48
|
-
|
|
46
|
+
f(
|
|
47
|
+
() => s.source,
|
|
48
|
+
async (o) => {
|
|
49
|
+
if (C(), A(o)) {
|
|
50
|
+
if (s.eventType && ["paste", "drop"].includes(s.eventType)) {
|
|
51
|
+
const { error: d } = await y(
|
|
52
|
+
o,
|
|
53
|
+
v.value.proxyUrl
|
|
54
|
+
);
|
|
55
|
+
d ? n.hide() : n.show();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
y(o, v.value.proxyUrl), n.show();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
o && U(o) && I(o) ? n.show() : n.hide();
|
|
49
62
|
}
|
|
50
63
|
);
|
|
51
|
-
const
|
|
52
|
-
document.body.classList.remove("has-no-import-url"), (
|
|
53
|
-
},
|
|
64
|
+
const V = l(() => !!s.source && A(s.source)), N = l(() => !!s.source && U(s.source)), O = l(() => r.url && Z(r.url)), p = (o) => {
|
|
65
|
+
document.body.classList.remove("has-no-import-url"), (V.value || N.value) && n.open ? document.body.classList.add("has-import-url") : document.body.classList.remove("has-import-url");
|
|
66
|
+
}, T = () => {
|
|
54
67
|
document.body.classList.remove("has-import-url"), document.body.classList.add("has-no-import-url");
|
|
55
68
|
};
|
|
56
|
-
return
|
|
57
|
-
() =>
|
|
69
|
+
return f(
|
|
70
|
+
() => n.open,
|
|
58
71
|
(o) => {
|
|
59
|
-
o ?
|
|
72
|
+
o ? p() : T();
|
|
60
73
|
}
|
|
61
|
-
),
|
|
62
|
-
() =>
|
|
74
|
+
), f(
|
|
75
|
+
() => s.source,
|
|
63
76
|
() => {
|
|
64
|
-
|
|
77
|
+
p();
|
|
65
78
|
}
|
|
66
|
-
),
|
|
67
|
-
|
|
68
|
-
}),
|
|
79
|
+
), S(() => {
|
|
80
|
+
p();
|
|
81
|
+
}), B(() => {
|
|
69
82
|
document.body.classList.remove("has-import-url"), document.body.classList.remove("has-no-import-url");
|
|
70
|
-
}), (o, e) => (c(), g(
|
|
83
|
+
}), (o, e) => (c(), g(i(X), {
|
|
71
84
|
size: "full",
|
|
72
|
-
state:
|
|
85
|
+
state: i(n)
|
|
73
86
|
}, {
|
|
74
|
-
default:
|
|
75
|
-
var
|
|
87
|
+
default: E(() => {
|
|
88
|
+
var d, _, w;
|
|
76
89
|
return [
|
|
77
|
-
t("div",
|
|
90
|
+
t("div", oe, [
|
|
78
91
|
t("div", {
|
|
79
|
-
class:
|
|
92
|
+
class: F(["flex items-center flex-col m-auto px-8 py-8 rounded-xl border-1/2 max-w-[380px] w-full transition-opacity", { "opacity-0": i(r).state === "loading" }])
|
|
80
93
|
}, [
|
|
81
|
-
r
|
|
94
|
+
i(r).error && i(r).state === "idle" && !b.value ? (c(), m(x, { key: 0 }, [
|
|
82
95
|
e[2] || (e[2] = t("div", { class: "text-center text-md font-bold mb-2 line-clamp-1" }, " No OpenAPI document found ", -1)),
|
|
83
|
-
a(
|
|
84
|
-
url: ((
|
|
96
|
+
a(G, {
|
|
97
|
+
url: ((d = i(r)) == null ? void 0 : d.input) || s.source
|
|
85
98
|
}, null, 8, ["url"])
|
|
86
|
-
], 64)) : (c(), m(
|
|
87
|
-
|
|
99
|
+
], 64)) : (c(), m(x, { key: 1 }, [
|
|
100
|
+
O.value ? (c(), g(K, {
|
|
88
101
|
key: 0,
|
|
89
102
|
integration: o.integration
|
|
90
|
-
}, null, 8, ["integration"])) :
|
|
91
|
-
t("div",
|
|
103
|
+
}, null, 8, ["integration"])) : h("", !0),
|
|
104
|
+
t("div", se, q(M.value || "Untitled Collection"), 1),
|
|
92
105
|
e[5] || (e[5] = t("div", { class: "text-c-1 text-sm font-medium text-center text-balance" }, " Import the OpenAPI document to instantly send API requests. No signup required. ", -1)),
|
|
93
|
-
|
|
94
|
-
t("div",
|
|
106
|
+
b.value ? (c(), m(x, { key: 1 }, [
|
|
107
|
+
t("div", re, [
|
|
95
108
|
a(W, {
|
|
96
|
-
source: ((
|
|
109
|
+
source: ((_ = i(r)) == null ? void 0 : _.url) ?? o.source,
|
|
97
110
|
variant: "button",
|
|
98
|
-
watchMode:
|
|
111
|
+
watchMode: u.value,
|
|
99
112
|
onImportFinished: e[0] || (e[0] = () => o.$emit("importFinished"))
|
|
100
113
|
}, null, 8, ["source", "watchMode"])
|
|
101
114
|
]),
|
|
102
115
|
t("div", ne, [
|
|
103
|
-
t("div",
|
|
104
|
-
e[3] || (e[3] =
|
|
105
|
-
a(
|
|
116
|
+
t("div", ie, [
|
|
117
|
+
e[3] || (e[3] = k(" Import to: ")),
|
|
118
|
+
a(H)
|
|
106
119
|
])
|
|
107
120
|
]),
|
|
108
|
-
(
|
|
109
|
-
t("div",
|
|
110
|
-
a(
|
|
111
|
-
modelValue:
|
|
112
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
121
|
+
(w = i(r)) != null && w.url ? (c(), m("div", le, [
|
|
122
|
+
t("div", ce, [
|
|
123
|
+
a(R, {
|
|
124
|
+
modelValue: u.value,
|
|
125
|
+
"onUpdate:modelValue": e[1] || (e[1] = ($) => u.value = $),
|
|
113
126
|
disableToolTip: !0
|
|
114
127
|
}, null, 8, ["modelValue"])
|
|
115
128
|
]),
|
|
116
129
|
e[4] || (e[4] = t("div", { class: "pt-0 text-center text-balance font-medium text-xs text-c-3" }, " Automatically update your API client when the OpenAPI document content changes. ", -1))
|
|
117
|
-
])) :
|
|
118
|
-
], 64)) :
|
|
130
|
+
])) : h("", !0)
|
|
131
|
+
], 64)) : h("", !0)
|
|
119
132
|
], 64))
|
|
120
133
|
], 2),
|
|
121
|
-
t("div",
|
|
122
|
-
t("div",
|
|
134
|
+
t("div", ae, [
|
|
135
|
+
t("div", de, [
|
|
123
136
|
t("div", me, [
|
|
124
|
-
t("a",
|
|
125
|
-
a(
|
|
137
|
+
t("a", ue, [
|
|
138
|
+
a(i(Y), {
|
|
126
139
|
icon: "Logo",
|
|
127
140
|
size: "xl"
|
|
128
141
|
})
|
|
@@ -135,7 +148,7 @@ const te = { class: "flex flex-col h-screen justify-center px-6 overflow-hidden
|
|
|
135
148
|
target: "_blank"
|
|
136
149
|
}, " Download Desktop App "),
|
|
137
150
|
t("br"),
|
|
138
|
-
|
|
151
|
+
k(" free · open-source · offline first ")
|
|
139
152
|
], -1))
|
|
140
153
|
])
|
|
141
154
|
])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
-
input: (value: string) => any;
|
|
2
|
+
input: (value: string, integration: null, eventType: "paste") => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onInput?: ((value: string) => any) | undefined;
|
|
4
|
+
onInput?: ((value: string, integration: null, eventType: "paste") => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=PasteEventListener.vue.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const u = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as i, onMounted as r, onBeforeUnmount as c } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ i({
|
|
3
3
|
__name: "PasteEventListener",
|
|
4
4
|
emits: ["input"],
|
|
5
5
|
setup(m, { emit: o }) {
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const s = o;
|
|
7
|
+
r(() => {
|
|
8
8
|
document.addEventListener("paste", n);
|
|
9
9
|
}), c(() => {
|
|
10
10
|
document.removeEventListener("paste", n);
|
|
@@ -13,7 +13,7 @@ const u = /* @__PURE__ */ r({
|
|
|
13
13
|
const t = e.target;
|
|
14
14
|
if (!(t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable)) && e.clipboardData) {
|
|
15
15
|
const a = e.clipboardData.getData("text");
|
|
16
|
-
a &&
|
|
16
|
+
a && s("input", a, null, "paste");
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
return (e, t) => null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
-
input: (url: string, integration: string | null) => any;
|
|
2
|
+
input: (url: string, integration: string | null, eventType: "query") => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onInput?: ((url: string, integration: string | null) => any) | undefined;
|
|
4
|
+
onInput?: ((url: string, integration: string | null, eventType: "query") => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=UrlQueryParameterChecker.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"UrlQueryParameterChecker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/UrlQueryParameterChecker.vue"],"names":[],"mappings":";;;;;AAkHA,wBAMG"}
|
|
@@ -2,12 +2,17 @@ import { defineComponent as a, onMounted as o } from "vue";
|
|
|
2
2
|
const c = /* @__PURE__ */ a({
|
|
3
3
|
__name: "UrlQueryParameterChecker",
|
|
4
4
|
emits: ["input"],
|
|
5
|
-
setup(
|
|
6
|
-
const n =
|
|
5
|
+
setup(u, { emit: t }) {
|
|
6
|
+
const n = t;
|
|
7
7
|
return o(() => {
|
|
8
|
-
const e = new URLSearchParams(window.location.search),
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const e = new URLSearchParams(window.location.search), r = e.get("url");
|
|
9
|
+
r && n(
|
|
10
|
+
"input",
|
|
11
|
+
r,
|
|
12
|
+
e.get("integration"),
|
|
13
|
+
"query"
|
|
14
|
+
);
|
|
15
|
+
}), (e, r) => null;
|
|
11
16
|
}
|
|
12
17
|
});
|
|
13
18
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AA2bA,wBAKG"}
|
|
@@ -1,77 +1,87 @@
|
|
|
1
|
-
import { defineComponent as y, ref as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as y, ref as W, openBlock as d, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as o, renderList as D, createBlock as N, withModifiers as k, normalizeClass as M, toDisplayString as h, withDirectives as z, vModelText as B, createTextVNode as V } from "vue";
|
|
2
|
+
import { useModal as j, ScalarDropdown as T, ScalarDropdownItem as v, ScalarIcon as m, ScalarDropdownDivider as $, ScalarButton as _, ScalarModal as E } from "@scalar/components";
|
|
3
3
|
import { useToasts as I } from "@scalar/use-toasts";
|
|
4
4
|
import { useRouter as A } from "vue-router";
|
|
5
5
|
import { useWorkspace as F } from "../../store/store.js";
|
|
6
6
|
const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, R = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, U = { class: "text-ellipsis overflow-hidden" }, q = { class: "flex items-center justify-center h-4 w-4" }, Y = /* @__PURE__ */ y({
|
|
7
7
|
__name: "WorkspaceSelector",
|
|
8
8
|
setup(G) {
|
|
9
|
-
const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push:
|
|
10
|
-
|
|
9
|
+
const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push: u } = A(), c = j(), { toast: f } = I(), r = W(""), C = (n) => {
|
|
10
|
+
n !== i.value.uid && u({
|
|
11
|
+
name: "workspace",
|
|
12
|
+
params: {
|
|
13
|
+
workspace: n
|
|
14
|
+
}
|
|
15
|
+
});
|
|
11
16
|
}, S = () => {
|
|
12
|
-
if (!
|
|
17
|
+
if (!r.value.trim()) {
|
|
13
18
|
f("Please enter a name before creating a workspace.", "error");
|
|
14
19
|
return;
|
|
15
20
|
}
|
|
16
|
-
const
|
|
17
|
-
name:
|
|
21
|
+
const n = g.add({
|
|
22
|
+
name: r.value
|
|
18
23
|
});
|
|
19
|
-
|
|
24
|
+
f(`Created new workspace '${n.name}'`), u({
|
|
25
|
+
name: "workspace",
|
|
26
|
+
params: {
|
|
27
|
+
workspace: n.uid
|
|
28
|
+
}
|
|
29
|
+
}), r.value = "", c.hide();
|
|
20
30
|
};
|
|
21
|
-
return (
|
|
31
|
+
return (n, a) => (d(), x(w, null, [
|
|
22
32
|
t("div", L, [
|
|
23
|
-
s(e(
|
|
24
|
-
items:
|
|
25
|
-
(d(!0), x(w, null,
|
|
33
|
+
s(e(T), null, {
|
|
34
|
+
items: o(() => [
|
|
35
|
+
(d(!0), x(w, null, D(e(b), (l, p) => (d(), N(e(v), {
|
|
26
36
|
key: p,
|
|
27
37
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
28
|
-
onClick:
|
|
38
|
+
onClick: k((H) => C(p), ["stop"])
|
|
29
39
|
}, {
|
|
30
|
-
default:
|
|
40
|
+
default: o(() => [
|
|
31
41
|
t("div", {
|
|
32
42
|
class: M([
|
|
33
43
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
34
44
|
e(i).uid === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
35
45
|
])
|
|
36
46
|
}, [
|
|
37
|
-
s(e(
|
|
47
|
+
s(e(m), {
|
|
38
48
|
class: "size-2.5",
|
|
39
49
|
icon: "Checkmark",
|
|
40
50
|
thickness: "3.5"
|
|
41
51
|
})
|
|
42
52
|
], 2),
|
|
43
|
-
t("span", U,
|
|
53
|
+
t("span", U, h(l.name), 1)
|
|
44
54
|
]),
|
|
45
55
|
_: 2
|
|
46
56
|
}, 1032, ["onClick"]))), 128)),
|
|
47
|
-
s(e(
|
|
57
|
+
s(e($)),
|
|
48
58
|
s(e(v), {
|
|
49
59
|
class: "flex items-center gap-1.5",
|
|
50
|
-
onClick:
|
|
60
|
+
onClick: a[0] || (a[0] = (l) => e(c).show())
|
|
51
61
|
}, {
|
|
52
|
-
default:
|
|
62
|
+
default: o(() => [
|
|
53
63
|
t("div", q, [
|
|
54
|
-
s(e(
|
|
64
|
+
s(e(m), {
|
|
55
65
|
class: "h-2.5",
|
|
56
66
|
icon: "Add",
|
|
57
67
|
thickness: "3"
|
|
58
68
|
})
|
|
59
69
|
]),
|
|
60
|
-
|
|
70
|
+
a[2] || (a[2] = t("span", null, "New Workspace", -1))
|
|
61
71
|
]),
|
|
62
72
|
_: 1
|
|
63
73
|
})
|
|
64
74
|
]),
|
|
65
|
-
default:
|
|
75
|
+
default: o(() => [
|
|
66
76
|
s(e(_), {
|
|
67
77
|
class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
|
|
68
78
|
fullWidth: "",
|
|
69
79
|
variant: "ghost"
|
|
70
80
|
}, {
|
|
71
|
-
default:
|
|
81
|
+
default: o(() => [
|
|
72
82
|
t("div", P, [
|
|
73
|
-
t("h2", R,
|
|
74
|
-
s(e(
|
|
83
|
+
t("h2", R, h(e(i).name), 1),
|
|
84
|
+
s(e(m), {
|
|
75
85
|
class: "size-3",
|
|
76
86
|
icon: "ChevronDown",
|
|
77
87
|
thickness: "3"
|
|
@@ -90,26 +100,26 @@ const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font
|
|
|
90
100
|
state: e(c),
|
|
91
101
|
variant: "form"
|
|
92
102
|
}, {
|
|
93
|
-
default:
|
|
103
|
+
default: o(() => [
|
|
94
104
|
t("form", {
|
|
95
105
|
class: "flex gap-1 rounded",
|
|
96
|
-
onSubmit:
|
|
106
|
+
onSubmit: k(S, ["prevent"])
|
|
97
107
|
}, [
|
|
98
|
-
|
|
99
|
-
"onUpdate:modelValue":
|
|
108
|
+
z(t("input", {
|
|
109
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => r.value = l),
|
|
100
110
|
class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
|
|
101
111
|
placeholder: "New Workspace",
|
|
102
112
|
type: "text"
|
|
103
113
|
}, null, 512), [
|
|
104
|
-
[
|
|
114
|
+
[B, r.value]
|
|
105
115
|
]),
|
|
106
116
|
s(e(_), {
|
|
107
117
|
class: "max-h-8 text-xs p-0 px-3",
|
|
108
|
-
disabled: !
|
|
118
|
+
disabled: !r.value.trim(),
|
|
109
119
|
type: "submit"
|
|
110
120
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
121
|
+
default: o(() => a[3] || (a[3] = [
|
|
122
|
+
V(" Continue ")
|
|
113
123
|
])),
|
|
114
124
|
_: 1
|
|
115
125
|
}, 8, ["disabled"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;
|
|
1
|
+
{"version":3,"file":"useUrlPrefetcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ImportCollection/hooks/useUrlPrefetcher.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB;;eAVvB,MAAM,GAAG,SAAS;iBAChB,MAAM,GAAG,IAAI;eACf,MAAM,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;eACX,MAAM,GAAG,IAAI;;yBAiHX,MAAM,GAAG,IAAI,UACZ,MAAM;;;;;;;;;;;;;;;;;;;;EAoBjB"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import { resolve as
|
|
2
|
-
import { redirectToProxy as
|
|
3
|
-
import { reactive as
|
|
4
|
-
import { isUrl as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
1
|
+
import { resolve as i } from "@scalar/import";
|
|
2
|
+
import { redirectToProxy as f, fetchWithProxyFallback as d } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { reactive as h } from "vue";
|
|
4
|
+
import { isUrl as m } from "../../../libs/isUrl.js";
|
|
5
|
+
function b() {
|
|
6
|
+
const n = h({
|
|
7
7
|
state: "idle",
|
|
8
8
|
content: null,
|
|
9
9
|
url: null,
|
|
10
10
|
input: null,
|
|
11
11
|
error: null
|
|
12
12
|
});
|
|
13
|
-
async function u(
|
|
13
|
+
async function u() {
|
|
14
|
+
Object.assign(n, {
|
|
15
|
+
state: "idle",
|
|
16
|
+
content: null,
|
|
17
|
+
url: null,
|
|
18
|
+
input: null,
|
|
19
|
+
error: null
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async function s(t, r) {
|
|
14
23
|
if (!t)
|
|
15
24
|
return {
|
|
16
25
|
state: "idle",
|
|
@@ -20,8 +29,8 @@ function v() {
|
|
|
20
29
|
error: null
|
|
21
30
|
};
|
|
22
31
|
try {
|
|
23
|
-
const e = await
|
|
24
|
-
fetch: (c) => fetch(r ?
|
|
32
|
+
const e = await i(t, {
|
|
33
|
+
fetch: (c) => fetch(r ? f(r, c) : c, {
|
|
25
34
|
cache: "no-cache"
|
|
26
35
|
})
|
|
27
36
|
});
|
|
@@ -35,7 +44,7 @@ function v() {
|
|
|
35
44
|
input: t,
|
|
36
45
|
error: `Could not find an OpenAPI document in ${t}`
|
|
37
46
|
};
|
|
38
|
-
if (!
|
|
47
|
+
if (!m(e))
|
|
39
48
|
return {
|
|
40
49
|
state: "idle",
|
|
41
50
|
content: null,
|
|
@@ -43,13 +52,13 @@ function v() {
|
|
|
43
52
|
input: t,
|
|
44
53
|
error: "Oops, we got invalid content for the given URL."
|
|
45
54
|
};
|
|
46
|
-
const o = e,
|
|
55
|
+
const o = e, l = await d(o, {
|
|
47
56
|
proxy: r,
|
|
48
57
|
cache: "no-cache"
|
|
49
58
|
});
|
|
50
|
-
return
|
|
59
|
+
return l.ok ? {
|
|
51
60
|
state: "idle",
|
|
52
|
-
content: await
|
|
61
|
+
content: await l.text(),
|
|
53
62
|
url: o,
|
|
54
63
|
error: null
|
|
55
64
|
} : {
|
|
@@ -57,7 +66,7 @@ function v() {
|
|
|
57
66
|
content: null,
|
|
58
67
|
url: null,
|
|
59
68
|
input: t,
|
|
60
|
-
error: `Couldn't fetch ${o}, got error ${[
|
|
69
|
+
error: `Couldn't fetch ${o}, got error ${[l.status, l.statusText].join(" ").trim()}.`
|
|
61
70
|
};
|
|
62
71
|
} catch (e) {
|
|
63
72
|
return console.error("[prefetchDocument]", e), {
|
|
@@ -69,22 +78,23 @@ function v() {
|
|
|
69
78
|
};
|
|
70
79
|
}
|
|
71
80
|
}
|
|
72
|
-
async function
|
|
73
|
-
Object.assign(
|
|
81
|
+
async function a(t, r) {
|
|
82
|
+
Object.assign(n, {
|
|
74
83
|
state: "loading",
|
|
75
84
|
content: null,
|
|
76
85
|
url: null,
|
|
77
86
|
input: t,
|
|
78
87
|
error: null
|
|
79
88
|
});
|
|
80
|
-
const e = await
|
|
81
|
-
return Object.assign(
|
|
89
|
+
const e = await s(t, r);
|
|
90
|
+
return Object.assign(n, e), e;
|
|
82
91
|
}
|
|
83
92
|
return {
|
|
84
|
-
prefetchResult:
|
|
85
|
-
prefetchUrl:
|
|
93
|
+
prefetchResult: n,
|
|
94
|
+
prefetchUrl: a,
|
|
95
|
+
resetPrefetchResult: u
|
|
86
96
|
};
|
|
87
97
|
}
|
|
88
98
|
export {
|
|
89
|
-
|
|
99
|
+
b as useUrlPrefetcher
|
|
90
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewLayoutCollapse.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutCollapse.vue"],"names":[],"mappings":"AAgEA,KAAK,WAAW,GAAG;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAkBJ,iBAAS,cAAc;WAyIT,OAAO,IAA6B;;;;YAVtB,GAAG;;;YACD,GAAG;;;YACH,GAAG;;;;EAahC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAhLH,OAAO;eACT,MAAM;6EAuLpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|