@scalar/api-client 2.2.54 → 2.2.56
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 +24 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +121 -106
- package/dist/components/{ImportCurl/ImportCurlModal.vue.d.ts → CommandPalette/CommandPaletteImportCurl.vue.d.ts} +9 -17
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +141 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +98 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +128 -113
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +122 -94
- package/dist/components/TopNav/TopNavItem.vue.d.ts +1 -0
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue2.js +49 -42
- package/dist/layouts/App/create-api-client-app.d.ts +12 -12
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +24 -24
- package/dist/layouts/Web/create-api-client-web.d.ts +12 -12
- package/dist/libs/create-client.d.ts +12 -12
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -115
- package/dist/libs/get-request-uid-by-path-method.d.ts +7 -0
- package/dist/libs/get-request-uid-by-path-method.d.ts.map +1 -0
- package/dist/libs/get-request-uid-by-path-method.js +10 -0
- package/dist/libs/get-request-uid-by-path-method.test.d.ts +2 -0
- package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/validate-parameters.d.ts +6 -0
- package/dist/libs/validate-parameters.d.ts.map +1 -0
- package/dist/libs/validate-parameters.js +12 -0
- package/dist/libs/validate-parameters.test.d.ts +2 -0
- package/dist/libs/validate-parameters.test.d.ts.map +1 -0
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/store.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +6 -3
- 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 +96 -145
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue2.js +68 -57
- 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 +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +34 -31
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +35 -33
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -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 +59 -54
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -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 +29 -27
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +23 -23
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/libs/request.js +1 -2
- package/package.json +12 -12
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +0 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +0 -7
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +0 -125
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarTooltip as T, ScalarIcon as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as $, resolveComponent as _, openBlock as r, createBlock as p, withCtx as t, createElementBlock as b, Fragment as f, renderList as I, normalizeClass as y, unref as u, createElementVNode as s, createVNode as i, toDisplayString as w, createCommentVNode as V } from "vue";
|
|
2
|
+
import { ScalarTooltip as T, ScalarIcon as g, ScalarButton as z } from "@scalar/components";
|
|
3
|
+
import x from "../../../components/CodeInput/CodeInput.vue.js";
|
|
4
|
+
import D from "../../../components/DataTable/DataTable.vue.js";
|
|
5
5
|
import v from "../../../components/DataTable/DataTableCell.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import q from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
7
7
|
import E from "../../../components/DataTable/DataTableRow.vue.js";
|
|
8
|
-
import { parameterIsInvalid as G,
|
|
9
|
-
import
|
|
10
|
-
const
|
|
8
|
+
import { parameterIsInvalid as G, hasItemProperties as B } from "../libs/request.js";
|
|
9
|
+
import P from "./RequestTableTooltip.vue.js";
|
|
10
|
+
const L = { class: "contents" }, N = { class: "sr-only" }, O = { class: "text-c-2 filemask flex max-w-[100%] items-end justify-end overflow-hidden" }, j = ["onClick"], Z = /* @__PURE__ */ $({
|
|
11
11
|
__name: "RequestTable",
|
|
12
12
|
props: {
|
|
13
13
|
items: {},
|
|
@@ -17,31 +17,33 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
17
17
|
isReadOnly: { type: Boolean, default: !1 },
|
|
18
18
|
environment: {},
|
|
19
19
|
envVariables: {},
|
|
20
|
-
workspace: {}
|
|
20
|
+
workspace: {},
|
|
21
|
+
invalidParams: {}
|
|
21
22
|
},
|
|
22
23
|
emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
|
|
23
|
-
setup(
|
|
24
|
-
const m =
|
|
24
|
+
setup(h, { emit: R }) {
|
|
25
|
+
const m = h, n = R, C = ["", "", "36px"], k = (l, a, c) => {
|
|
25
26
|
n("updateRow", l, a, c);
|
|
26
27
|
}, F = (l) => {
|
|
27
28
|
n("uploadFile", l);
|
|
28
29
|
}, U = (l) => Array.isArray(l.default) && l.default.length === 1 ? l.default[0] : l.default;
|
|
29
30
|
return (l, a) => {
|
|
30
|
-
const c =
|
|
31
|
-
return r(), p(
|
|
31
|
+
const c = _("RouterLink");
|
|
32
|
+
return r(), p(D, {
|
|
32
33
|
class: "group/table flex-1",
|
|
33
34
|
columns: C
|
|
34
35
|
}, {
|
|
35
36
|
default: t(() => [
|
|
36
37
|
(r(!0), b(f, null, I(l.items, (e, d) => (r(), p(E, {
|
|
37
38
|
key: d,
|
|
39
|
+
id: e.key,
|
|
38
40
|
class: y({
|
|
39
41
|
alert: u(G)(e).value,
|
|
40
|
-
error:
|
|
42
|
+
error: l.invalidParams && l.invalidParams.has(e.key)
|
|
41
43
|
})
|
|
42
44
|
}, {
|
|
43
45
|
default: t(() => [
|
|
44
|
-
s("label",
|
|
46
|
+
s("label", L, [
|
|
45
47
|
l.isGlobal ? (r(), p(c, {
|
|
46
48
|
key: 0,
|
|
47
49
|
class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
|
|
@@ -54,7 +56,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
54
56
|
side: "top"
|
|
55
57
|
}, {
|
|
56
58
|
trigger: t(() => [
|
|
57
|
-
i(u(
|
|
59
|
+
i(u(g), {
|
|
58
60
|
class: "text-c-1",
|
|
59
61
|
icon: "Globe",
|
|
60
62
|
size: "xs"
|
|
@@ -72,8 +74,8 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
72
74
|
]),
|
|
73
75
|
_: 2
|
|
74
76
|
}, 1032, ["to"])) : (r(), b(f, { key: 1 }, [
|
|
75
|
-
s("span",
|
|
76
|
-
i(
|
|
77
|
+
s("span", N, " Row " + w(e.enabled ? "Enabled" : "Disabled"), 1),
|
|
78
|
+
i(q, {
|
|
77
79
|
class: "!border-r-1/2",
|
|
78
80
|
disabled: m.hasCheckboxDisabled,
|
|
79
81
|
modelValue: e.enabled,
|
|
@@ -83,7 +85,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
83
85
|
]),
|
|
84
86
|
i(v, null, {
|
|
85
87
|
default: t(() => [
|
|
86
|
-
i(
|
|
88
|
+
i(x, {
|
|
87
89
|
disableCloseBrackets: "",
|
|
88
90
|
disabled: m.isReadOnly,
|
|
89
91
|
disableEnter: "",
|
|
@@ -104,7 +106,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
104
106
|
}, 1024),
|
|
105
107
|
i(v, null, {
|
|
106
108
|
default: t(() => [
|
|
107
|
-
i(
|
|
109
|
+
i(x, {
|
|
108
110
|
class: y({
|
|
109
111
|
"pr-6": u(B)(e)
|
|
110
112
|
}),
|
|
@@ -130,7 +132,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
130
132
|
"onUpdate:modelValue": (o) => n("updateRow", d, "value", o)
|
|
131
133
|
}, {
|
|
132
134
|
icon: t(() => [
|
|
133
|
-
u(B)(e) ? (r(), p(
|
|
135
|
+
u(B)(e) ? (r(), p(P, {
|
|
134
136
|
key: 0,
|
|
135
137
|
item: { ...e, default: U(e) }
|
|
136
138
|
}, null, 8, ["item"])) : V("", !0)
|
|
@@ -148,15 +150,15 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
148
150
|
var o;
|
|
149
151
|
return [
|
|
150
152
|
e.file ? (r(), b(f, { key: 0 }, [
|
|
151
|
-
s("div",
|
|
153
|
+
s("div", O, [
|
|
152
154
|
s("span", null, w((o = e.file) == null ? void 0 : o.name), 1)
|
|
153
155
|
]),
|
|
154
156
|
s("button", {
|
|
155
157
|
class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
|
|
156
158
|
type: "button",
|
|
157
159
|
onClick: (S) => n("removeFile", d)
|
|
158
|
-
}, " Delete ", 8,
|
|
159
|
-
], 64)) : (r(), p(u(
|
|
160
|
+
}, " Delete ", 8, j)
|
|
161
|
+
], 64)) : (r(), p(u(z), {
|
|
160
162
|
key: 1,
|
|
161
163
|
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 py-px shadow-none",
|
|
162
164
|
size: "sm",
|
|
@@ -165,7 +167,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
165
167
|
}, {
|
|
166
168
|
default: t(() => [
|
|
167
169
|
a[6] || (a[6] = s("span", null, "Upload File", -1)),
|
|
168
|
-
i(u(
|
|
170
|
+
i(u(g), {
|
|
169
171
|
class: "ml-1",
|
|
170
172
|
icon: "UploadSimple",
|
|
171
173
|
size: "xs",
|
|
@@ -180,7 +182,7 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
180
182
|
}, 1024)) : V("", !0)
|
|
181
183
|
]),
|
|
182
184
|
_: 2
|
|
183
|
-
}, 1032, ["class"]))), 128))
|
|
185
|
+
}, 1032, ["id", "class"]))), 128))
|
|
184
186
|
]),
|
|
185
187
|
_: 1
|
|
186
188
|
});
|
|
@@ -188,5 +190,5 @@ const O = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-
|
|
|
188
190
|
}
|
|
189
191
|
});
|
|
190
192
|
export {
|
|
191
|
-
|
|
193
|
+
Z as default
|
|
192
194
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ab5cde6a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ve, useId as he, reactive as be, ref as ge, watch as K, onMounted as Se, onBeforeUnmount as ke, computed as
|
|
1
|
+
import { defineComponent as ve, useId as he, reactive as be, ref as ge, watch as K, onMounted as Se, onBeforeUnmount as ke, computed as L, openBlock as r, createElementBlock as S, Fragment as q, withDirectives as N, createVNode as m, unref as e, normalizeClass as f, createSlots as Re, withCtx as d, createElementVNode as n, createBlock as u, createCommentVNode as p, isRef as xe, withKeys as D, withModifiers as v, vShow as B, renderList as H, createTextVNode as M, toDisplayString as ye, nextTick as we } from "vue";
|
|
2
2
|
import { ScalarIcon as $, ScalarSearchInput as Ie, ScalarSearchResultList as Ce, ScalarSearchResultItem as qe, ScalarButton as De } from "@scalar/components";
|
|
3
3
|
import { LibraryIcon as Me } from "@scalar/icons";
|
|
4
4
|
import { useToasts as $e } from "@scalar/use-toasts";
|
|
@@ -7,20 +7,20 @@ import Te from "../../assets/rabbit.ascii.js";
|
|
|
7
7
|
import _e from "../../assets/rabbitjump.ascii.js";
|
|
8
8
|
import Ee from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
9
9
|
import Ve from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
10
|
-
import
|
|
10
|
+
import U from "../../components/ScalarAsciiArt.vue.js";
|
|
11
11
|
import { useSearch as Oe } from "../../components/Search/useSearch.js";
|
|
12
12
|
import We from "../../components/Sidebar/SidebarButton.vue.js";
|
|
13
13
|
import ze from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
14
14
|
import { useLayout as Ae } from "../../hooks/useLayout.js";
|
|
15
15
|
import { useSidebar as Fe } from "../../hooks/useSidebar.js";
|
|
16
|
-
import { PathId as
|
|
16
|
+
import { PathId as G } from "../../routes.js";
|
|
17
17
|
import { useActiveEntities as Ke } from "../../store/active-entities.js";
|
|
18
|
-
import { createInitialRequest as
|
|
19
|
-
import { dragHandlerFactory as
|
|
20
|
-
import
|
|
18
|
+
import { createInitialRequest as Le } from "../../store/requests.js";
|
|
19
|
+
import { dragHandlerFactory as Ne } from "./handle-drag.js";
|
|
20
|
+
import Be from "./RequestSidebarItemMenu.vue.js";
|
|
21
21
|
import { isGettingStarted as He } from "./RequestSection/helpers/getting-started.js";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
22
|
+
import Ue from "./RequestSidebarItem.vue.js";
|
|
23
|
+
import Ge from "../../components/Sidebar/Sidebar.vue.js";
|
|
24
24
|
import je from "./components/WorkspaceDropdown.vue.js";
|
|
25
25
|
import { useWorkspace as Je } from "../../store/store.js";
|
|
26
26
|
const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe = {
|
|
@@ -46,12 +46,12 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
46
46
|
activeRequest: Z,
|
|
47
47
|
activeWorkspaceRequests: _,
|
|
48
48
|
activeWorkspace: ee
|
|
49
|
-
} = Ke(), { findRequestParents: te, events: k, requestMutators: E, requests: x } = T, { handleDragEnd: oe, isDroppable: se } =
|
|
49
|
+
} = Ke(), { findRequestParents: te, events: k, requestMutators: E, requests: x } = T, { handleDragEnd: oe, isDroppable: se } = Ne(
|
|
50
50
|
ee,
|
|
51
51
|
T
|
|
52
52
|
), { replace: V } = Pe(), ae = () => {
|
|
53
53
|
k.commandPalette.emit({
|
|
54
|
-
commandName: "Import from OpenAPI/Swagger/Postman"
|
|
54
|
+
commandName: "Import from OpenAPI/Swagger/Postman/cURL"
|
|
55
55
|
});
|
|
56
56
|
}, O = he(), { toast: re } = $e(), h = be({ open: !1 }), b = ge(!1);
|
|
57
57
|
K(
|
|
@@ -105,7 +105,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
const de =
|
|
108
|
+
const de = L(() => {
|
|
109
109
|
var t;
|
|
110
110
|
const s = y.value[w.value];
|
|
111
111
|
return (t = s == null ? void 0 : s.item) != null && t.id ? `#search-input-${s.item.id}` : void 0;
|
|
@@ -123,15 +123,15 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
123
123
|
a && V({
|
|
124
124
|
name: "request",
|
|
125
125
|
params: {
|
|
126
|
-
[
|
|
126
|
+
[G.Request]: a
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
} else {
|
|
130
|
-
const { request: o } =
|
|
130
|
+
const { request: o } = Le();
|
|
131
131
|
s && (E.add(o, s.uid), V({
|
|
132
132
|
name: "request",
|
|
133
133
|
params: {
|
|
134
|
-
[
|
|
134
|
+
[G.Request]: o.uid
|
|
135
135
|
}
|
|
136
136
|
}));
|
|
137
137
|
}
|
|
@@ -140,7 +140,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
140
140
|
var s;
|
|
141
141
|
(s = I.value) == null || s.focus();
|
|
142
142
|
}), b.value = !b.value;
|
|
143
|
-
}, C =
|
|
143
|
+
}, C = L(
|
|
144
144
|
() => He(
|
|
145
145
|
c.value,
|
|
146
146
|
_.value,
|
|
@@ -148,7 +148,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
148
148
|
)
|
|
149
149
|
);
|
|
150
150
|
return (s, t) => (r(), S(q, null, [
|
|
151
|
-
|
|
151
|
+
N(m(e(Ge), {
|
|
152
152
|
class: f([e(P) ? "sidebar-active-width" : ""])
|
|
153
153
|
}, Re({
|
|
154
154
|
content: d(() => [
|
|
@@ -170,7 +170,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
170
170
|
})
|
|
171
171
|
])
|
|
172
172
|
]),
|
|
173
|
-
|
|
173
|
+
N(n("div", Ye, [
|
|
174
174
|
m(e(Ie), {
|
|
175
175
|
ref_key: "searchInputRef",
|
|
176
176
|
ref: I,
|
|
@@ -187,7 +187,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
187
187
|
]
|
|
188
188
|
}, null, 8, ["modelValue", "aria-activedescendant", "aria-controls", "onInput"])
|
|
189
189
|
], 512), [
|
|
190
|
-
[
|
|
190
|
+
[B, b.value]
|
|
191
191
|
]),
|
|
192
192
|
n("div", {
|
|
193
193
|
class: f(["gap-1/2 flex flex-1 flex-col overflow-visible overflow-y-auto px-3 pb-3 pt-0", [
|
|
@@ -239,7 +239,7 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
239
239
|
}, 8, ["id", "noResults"])) : (r(), S("nav", Ze, [
|
|
240
240
|
(r(!0), S(q, null, H(e(c), (o) => {
|
|
241
241
|
var a;
|
|
242
|
-
return r(), u(
|
|
242
|
+
return r(), u(Ue, {
|
|
243
243
|
key: o.uid,
|
|
244
244
|
isDraggable: e(i) !== "modal" && ((a = o.info) == null ? void 0 : a.title) !== "Drafts",
|
|
245
245
|
isDroppable: e(se),
|
|
@@ -290,11 +290,11 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
290
290
|
}, [
|
|
291
291
|
n("div", et, [
|
|
292
292
|
n("div", tt, [
|
|
293
|
-
m(
|
|
293
|
+
m(U, {
|
|
294
294
|
art: e(Te),
|
|
295
295
|
class: "rabbitsit font-bold"
|
|
296
296
|
}, null, 8, ["art"]),
|
|
297
|
-
m(
|
|
297
|
+
m(U, {
|
|
298
298
|
art: e(_e),
|
|
299
299
|
class: "rabbitjump absolute left-0 top-0 font-bold"
|
|
300
300
|
}, null, 8, ["art"])
|
|
@@ -336,9 +336,9 @@ const Qe = { class: "bg-b-1 sticky top-0 z-20 flex h-12 items-center px-3" }, Xe
|
|
|
336
336
|
key: "0"
|
|
337
337
|
} : void 0
|
|
338
338
|
]), 1032, ["class"]), [
|
|
339
|
-
[
|
|
339
|
+
[B, e(P)]
|
|
340
340
|
]),
|
|
341
|
-
e(i) !== "modal" && h ? (r(), u(
|
|
341
|
+
e(i) !== "modal" && h ? (r(), u(Be, {
|
|
342
342
|
key: 0,
|
|
343
343
|
menuItem: h,
|
|
344
344
|
onClearDrafts: me,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AAqHA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AASrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;;;AA4NJ,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./RequestSubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ o(e, [["__scopeId", "data-v-82f1fa0c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -7,7 +7,7 @@ import { useLayout as h } from "../../hooks/useLayout.js";
|
|
|
7
7
|
import { useSidebar as x } from "../../hooks/useSidebar.js";
|
|
8
8
|
import B from "../../components/OpenApiClientButton.vue.js";
|
|
9
9
|
import { useWorkspace as S } from "../../store/store.js";
|
|
10
|
-
const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" },
|
|
10
|
+
const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, z = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, R = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, L = /* @__PURE__ */ k({
|
|
11
11
|
__name: "RequestSubpageHeader",
|
|
12
12
|
props: {
|
|
13
13
|
collection: {},
|
|
@@ -21,7 +21,7 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
|
|
|
21
21
|
setup(M) {
|
|
22
22
|
const { hideClientButton: c, showSidebar: f, integration: b } = S(), { isSidebarOpen: l } = x(), { layout: r } = h(), { currentRoute: g } = w();
|
|
23
23
|
return (o, t) => (i(), m("div", $, [
|
|
24
|
-
s("div",
|
|
24
|
+
s("div", z, [
|
|
25
25
|
e(f) ? (i(), u(V, {
|
|
26
26
|
key: 0,
|
|
27
27
|
modelValue: e(l),
|
|
@@ -43,7 +43,7 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
|
|
|
43
43
|
workspace: o.workspace,
|
|
44
44
|
onImportCurl: t[1] || (t[1] = (n) => o.$emit("importCurl", n))
|
|
45
45
|
}, null, 8, ["collection", "envVariables", "environment", "operation", "server", "workspace"]),
|
|
46
|
-
s("div",
|
|
46
|
+
s("div", R, [
|
|
47
47
|
e(r) === "modal" && o.collection.documentUrl && !e(c) ? (i(), u(e(B), {
|
|
48
48
|
key: 0,
|
|
49
49
|
buttonSource: "modal",
|
|
@@ -54,7 +54,7 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
|
|
|
54
54
|
}, null, 8, ["integration", "source", "url"])) : a("", !0),
|
|
55
55
|
e(r) === "modal" ? (i(), m("button", {
|
|
56
56
|
key: 1,
|
|
57
|
-
class: "app-exit-button gitbook-hidden fixed right-2 top-2 rounded-full p-2",
|
|
57
|
+
class: "app-exit-button gitbook-hidden zoomed:static zoomed:p-1 fixed right-2 top-2 rounded-full p-2",
|
|
58
58
|
type: "button",
|
|
59
59
|
onClick: t[2] || (t[2] = (n) => o.$emit("hideModal"))
|
|
60
60
|
}, [
|
|
@@ -19,7 +19,7 @@ const V = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, _ = {
|
|
|
19
19
|
a.commandPalette.emit({ commandName: "Create Request" });
|
|
20
20
|
}, d = (o) => {
|
|
21
21
|
o != null && o.createNew && y.name === "request" && u();
|
|
22
|
-
}, k = "2.2.
|
|
22
|
+
}, k = "2.2.56";
|
|
23
23
|
return g(() => a.hotKeys.on(d)), R(() => a.hotKeys.off(d)), (o, e) => (n(), m("div", V, [
|
|
24
24
|
s("div", {
|
|
25
25
|
class: f(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -32,9 +32,8 @@ const m = (e) => !!(e.description || e.type || e.default || e.format || e.minimu
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
return !1;
|
|
35
|
-
})
|
|
35
|
+
});
|
|
36
36
|
export {
|
|
37
|
-
s as hasEmptyRequiredParameter,
|
|
38
37
|
m as hasItemProperties,
|
|
39
38
|
n as parameterIsInvalid
|
|
40
39
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.56",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -188,22 +188,22 @@
|
|
|
188
188
|
"whatwg-mimetype": "^4.0.0",
|
|
189
189
|
"yaml": "^2.4.5",
|
|
190
190
|
"zod": "^3.23.8",
|
|
191
|
-
"@scalar/components": "0.13.
|
|
191
|
+
"@scalar/components": "0.13.28",
|
|
192
192
|
"@scalar/icons": "0.1.3",
|
|
193
|
-
"@scalar/import": "0.2.
|
|
194
|
-
"@scalar/draggable": "0.1.11",
|
|
195
|
-
"@scalar/oas-utils": "0.2.109",
|
|
193
|
+
"@scalar/import": "0.2.30",
|
|
196
194
|
"@scalar/object-utils": "1.1.13",
|
|
197
195
|
"@scalar/openapi-parser": "0.10.9",
|
|
198
|
-
"@scalar/postman-to-openapi": "0.1.32",
|
|
199
|
-
"@scalar/snippetz": "0.2.15",
|
|
200
|
-
"@scalar/themes": "0.9.70",
|
|
201
196
|
"@scalar/openapi-types": "0.1.9",
|
|
202
|
-
"@scalar/
|
|
203
|
-
"@scalar/
|
|
204
|
-
"@scalar/
|
|
197
|
+
"@scalar/oas-utils": "0.2.110",
|
|
198
|
+
"@scalar/snippetz": "0.2.15",
|
|
199
|
+
"@scalar/postman-to-openapi": "0.1.33",
|
|
200
|
+
"@scalar/themes": "0.9.71",
|
|
205
201
|
"@scalar/types": "0.0.36",
|
|
206
|
-
"@scalar/use-
|
|
202
|
+
"@scalar/use-codemirror": "0.11.73",
|
|
203
|
+
"@scalar/use-hooks": "0.1.25",
|
|
204
|
+
"@scalar/use-toasts": "0.7.9",
|
|
205
|
+
"@scalar/use-tooltip": "1.0.6",
|
|
206
|
+
"@scalar/draggable": "0.1.11"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
209
209
|
"@types/shell-quote": "^1.7.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImportCurlModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCurl/ImportCurlModal.vue"],"names":[],"mappings":"AAmKA,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,iCAAiC,CAAA;AASxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,cAAc,GAAG,IAAI,CAAA;IACjC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;IAC5D,aAAa,EAAE,MAAM,CAAA;CACtB,CAAC;;;;oBAOgB,cAAc;qBACb,MAAM;uBACJ,MAAM;;;;;oBAFT,cAAc;qBACb,MAAM;uBACJ,MAAM;;;AAwP3B,wBAQG"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as x, computed as b, watch as k, openBlock as I, createBlock as R, unref as a, withCtx as n, createVNode as s, withKeys as E, createElementVNode as r, toDisplayString as c, normalizeClass as z, createTextVNode as B } from "vue";
|
|
2
|
-
import { ScalarModal as M, ScalarTextField as T, ScalarListbox as j, ScalarButton as w, ScalarIcon as D } from "@scalar/components";
|
|
3
|
-
import { useToasts as K } from "@scalar/use-toasts";
|
|
4
|
-
import L from "../HttpMethod/HttpMethod.vue.js";
|
|
5
|
-
import { useActiveEntities as A } from "../../store/active-entities.js";
|
|
6
|
-
const F = { class: "mb-4 mt-2 flex h-9 flex-row items-center gap-2 rounded border p-[3px] text-sm" }, H = { class: "flex h-full" }, P = { class: "scroll-timeline-x whitespace-nowrap" }, W = { class: "flex justify-between gap-10" }, Y = /* @__PURE__ */ N({
|
|
7
|
-
__name: "ImportCurlModal",
|
|
8
|
-
props: {
|
|
9
|
-
parsedCurl: {},
|
|
10
|
-
state: {},
|
|
11
|
-
collectionUid: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["importCurl", "close"],
|
|
14
|
-
setup(_, { emit: q }) {
|
|
15
|
-
const o = _, V = q, { toast: g } = K(), i = x(""), { activeWorkspaceCollections: y, activeCollection: S } = A(), p = b(() => !i.value.trim()), u = b(
|
|
16
|
-
() => y.value.map((e) => {
|
|
17
|
-
var t;
|
|
18
|
-
return {
|
|
19
|
-
id: e.uid,
|
|
20
|
-
label: ((t = e.info) == null ? void 0 : t.title) ?? "Unititled Collection"
|
|
21
|
-
};
|
|
22
|
-
})
|
|
23
|
-
), l = x(
|
|
24
|
-
o.collectionUid ? u.value.find(
|
|
25
|
-
(e) => e.id === o.collectionUid
|
|
26
|
-
) : u.value.find(
|
|
27
|
-
(e) => {
|
|
28
|
-
var t;
|
|
29
|
-
return e.id === ((t = S.value) == null ? void 0 : t.uid);
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
);
|
|
33
|
-
function m() {
|
|
34
|
-
if (p.value) {
|
|
35
|
-
g("Please enter a name before importing your request.", "error");
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
U();
|
|
39
|
-
}
|
|
40
|
-
function U() {
|
|
41
|
-
var e;
|
|
42
|
-
o.parsedCurl && V("importCurl", {
|
|
43
|
-
parsedCurl: o.parsedCurl,
|
|
44
|
-
requestName: i.value,
|
|
45
|
-
collectionUid: ((e = l.value) == null ? void 0 : e.id) ?? ""
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return k(
|
|
49
|
-
() => o.state.open,
|
|
50
|
-
(e) => {
|
|
51
|
-
e && (i.value = "");
|
|
52
|
-
}
|
|
53
|
-
), (e, t) => (I(), R(a(M), {
|
|
54
|
-
size: "xs",
|
|
55
|
-
state: e.state,
|
|
56
|
-
title: "Import cURL request"
|
|
57
|
-
}, {
|
|
58
|
-
default: n(() => {
|
|
59
|
-
var f, v, C, h;
|
|
60
|
-
return [
|
|
61
|
-
s(a(T), {
|
|
62
|
-
modelValue: i.value,
|
|
63
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) => i.value = d),
|
|
64
|
-
autofocus: "",
|
|
65
|
-
class: "h-9",
|
|
66
|
-
placeholder: "Request Name",
|
|
67
|
-
onKeyup: E(m, ["enter"])
|
|
68
|
-
}, null, 8, ["modelValue"]),
|
|
69
|
-
r("div", F, [
|
|
70
|
-
r("div", H, [
|
|
71
|
-
s(L, {
|
|
72
|
-
isEditable: !1,
|
|
73
|
-
isSquare: "",
|
|
74
|
-
method: ((f = o.parsedCurl) == null ? void 0 : f.method) || "get"
|
|
75
|
-
}, null, 8, ["method"])
|
|
76
|
-
]),
|
|
77
|
-
r("span", P, c(((C = (v = o.parsedCurl) == null ? void 0 : v.servers) == null ? void 0 : C[0]) || "") + c(((h = o.parsedCurl) == null ? void 0 : h.path) || ""), 1)
|
|
78
|
-
]),
|
|
79
|
-
r("div", W, [
|
|
80
|
-
s(a(j), {
|
|
81
|
-
modelValue: l.value,
|
|
82
|
-
"onUpdate:modelValue": t[1] || (t[1] = (d) => l.value = d),
|
|
83
|
-
options: u.value
|
|
84
|
-
}, {
|
|
85
|
-
default: n(() => [
|
|
86
|
-
s(a(w), {
|
|
87
|
-
class: "hover:bg-b-2 max-h-8 justify-between gap-1 p-2 text-xs",
|
|
88
|
-
variant: "outlined"
|
|
89
|
-
}, {
|
|
90
|
-
default: n(() => [
|
|
91
|
-
r("span", {
|
|
92
|
-
class: z(["whitespace-nowrap", l.value ? "text-c-1" : "text-c-3"])
|
|
93
|
-
}, c(l.value ? l.value.label : "Select Collection"), 3),
|
|
94
|
-
s(a(D), {
|
|
95
|
-
class: "text-c-3",
|
|
96
|
-
icon: "ChevronDown",
|
|
97
|
-
size: "md"
|
|
98
|
-
})
|
|
99
|
-
]),
|
|
100
|
-
_: 1
|
|
101
|
-
})
|
|
102
|
-
]),
|
|
103
|
-
_: 1
|
|
104
|
-
}, 8, ["modelValue", "options"]),
|
|
105
|
-
s(a(w), {
|
|
106
|
-
class: "h-8 gap-1.5 whitespace-nowrap px-2.5 font-medium shadow-none focus:outline-none",
|
|
107
|
-
disabled: p.value,
|
|
108
|
-
type: "submit",
|
|
109
|
-
onClick: m
|
|
110
|
-
}, {
|
|
111
|
-
default: n(() => t[2] || (t[2] = [
|
|
112
|
-
B(" Import Request ")
|
|
113
|
-
])),
|
|
114
|
-
_: 1
|
|
115
|
-
}, 8, ["disabled"])
|
|
116
|
-
])
|
|
117
|
-
];
|
|
118
|
-
}),
|
|
119
|
-
_: 1
|
|
120
|
-
}, 8, ["state"]));
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
export {
|
|
124
|
-
Y as default
|
|
125
|
-
};
|