@scalar/api-client 2.1.46 → 2.1.47
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 +16 -0
- 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/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 +15 -15
- 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/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/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/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/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
- 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/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 +8 -8
- package/dist/components/SubpageHeader.vue.d.ts +0 -18
- package/dist/components/SubpageHeader.vue.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.1.47
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b717102: style: enhances response section childs spacing
|
|
8
|
+
- 8610c74: refactor: use route objects instead of strings
|
|
9
|
+
- af47a3e: fix: only virtualize text based contents
|
|
10
|
+
- 766a1fd: fix: import modal shows for any URL
|
|
11
|
+
- Updated dependencies [82f7c35]
|
|
12
|
+
- Updated dependencies [b717102]
|
|
13
|
+
- Updated dependencies [3421489]
|
|
14
|
+
- @scalar/oas-utils@0.2.73
|
|
15
|
+
- @scalar/import@0.1.1
|
|
16
|
+
- @scalar/components@0.12.67
|
|
17
|
+
- @scalar/use-codemirror@0.11.34
|
|
18
|
+
|
|
3
19
|
## 2.1.46
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":"AAuMA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAC;;;;;;;;AA2TF,wBAQG"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as W, ref as c, computed as x, openBlock as C, createBlock as h, withCtx as u, createElementVNode as f, createVNode as i, unref as n, normalizeClass as q, toDisplayString as V, createCommentVNode as j, createTextVNode as E } from "vue";
|
|
2
|
+
import H from "../HttpMethod/HttpMethod.vue.js";
|
|
3
3
|
import { ScalarListbox as D, ScalarButton as k, ScalarIcon as w } from "@scalar/components";
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
4
|
+
import { useToasts as I } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as $ } from "vue-router";
|
|
6
6
|
import L from "./CommandActionForm.vue.js";
|
|
7
7
|
import O from "./CommandActionInput.vue.js";
|
|
8
8
|
import { isHTTPMethod as A } from "../HttpMethod/helpers.js";
|
|
9
9
|
import { useWorkspace as F } from "../../store/store.js";
|
|
10
|
-
const G = { class: "flex gap-2" }, le = /* @__PURE__ */
|
|
10
|
+
const G = { class: "flex gap-2" }, le = /* @__PURE__ */ W({
|
|
11
11
|
__name: "CommandPaletteRequest",
|
|
12
12
|
props: {
|
|
13
13
|
metaData: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["close", "back"],
|
|
16
16
|
setup(S, { emit: _ }) {
|
|
17
|
-
const r = S, b = _, { push: M } =
|
|
17
|
+
const r = S, b = _, { push: M } = $(), { toast: N } = I(), {
|
|
18
18
|
activeCollection: R,
|
|
19
19
|
activeWorkspace: U,
|
|
20
20
|
activeWorkspaceCollections: g,
|
|
21
21
|
requestMutators: T,
|
|
22
22
|
activeRequest: y,
|
|
23
|
-
tags:
|
|
24
|
-
} = F(), o = c(""), d = c("get"),
|
|
23
|
+
tags: z
|
|
24
|
+
} = F(), o = c(""), d = c("get"), p = x(
|
|
25
25
|
() => g.value.map((t) => {
|
|
26
26
|
var e;
|
|
27
27
|
return {
|
|
@@ -34,23 +34,23 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
34
34
|
(t) => {
|
|
35
35
|
var e;
|
|
36
36
|
return t.uid === ((e = l.value) == null ? void 0 : e.id) ? t.tags.flatMap((a) => {
|
|
37
|
-
const
|
|
38
|
-
return
|
|
37
|
+
const v = z[a];
|
|
38
|
+
return v ? [
|
|
39
39
|
{
|
|
40
|
-
id:
|
|
41
|
-
label:
|
|
40
|
+
id: v.uid,
|
|
41
|
+
label: v.name
|
|
42
42
|
}
|
|
43
43
|
] : [];
|
|
44
44
|
}) : [];
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
), l = c(
|
|
48
|
-
r.metaData ?
|
|
48
|
+
r.metaData ? p.value.find(
|
|
49
49
|
(t) => {
|
|
50
50
|
var e, a;
|
|
51
51
|
return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid) || t.id === ((a = r.metaData) == null ? void 0 : a.parentUid);
|
|
52
52
|
}
|
|
53
|
-
) :
|
|
53
|
+
) : p.value.find(
|
|
54
54
|
(t) => {
|
|
55
55
|
var e;
|
|
56
56
|
return t.id === ((e = R.value) == null ? void 0 : e.uid);
|
|
@@ -64,7 +64,7 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
64
64
|
var e, a;
|
|
65
65
|
return t.label === ((a = (e = y.value) == null ? void 0 : e.tags) == null ? void 0 : a[0]);
|
|
66
66
|
})
|
|
67
|
-
),
|
|
67
|
+
), B = (t) => d.value = t, P = () => {
|
|
68
68
|
var e;
|
|
69
69
|
if (!o.value.trim()) {
|
|
70
70
|
N("Please enter a name before creating a request.", "error");
|
|
@@ -83,24 +83,30 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
83
83
|
},
|
|
84
84
|
l.value.id
|
|
85
85
|
);
|
|
86
|
-
t && M(
|
|
86
|
+
t && M({
|
|
87
|
+
name: "request",
|
|
88
|
+
params: {
|
|
89
|
+
workspace: U.value.uid,
|
|
90
|
+
request: t.uid
|
|
91
|
+
}
|
|
92
|
+
}), b("close");
|
|
87
93
|
};
|
|
88
94
|
return (t, e) => (C(), h(L, {
|
|
89
95
|
disabled: !o.value.trim(),
|
|
90
|
-
onSubmit:
|
|
96
|
+
onSubmit: P
|
|
91
97
|
}, {
|
|
92
98
|
options: u(() => [
|
|
93
99
|
f("div", G, [
|
|
94
|
-
i(
|
|
100
|
+
i(H, {
|
|
95
101
|
isEditable: !0,
|
|
96
102
|
isSquare: "",
|
|
97
103
|
method: d.value,
|
|
98
|
-
onChange:
|
|
104
|
+
onChange: B
|
|
99
105
|
}, null, 8, ["method"]),
|
|
100
106
|
i(n(D), {
|
|
101
107
|
modelValue: l.value,
|
|
102
108
|
"onUpdate:modelValue": e[2] || (e[2] = (a) => l.value = a),
|
|
103
|
-
options:
|
|
109
|
+
options: p.value
|
|
104
110
|
}, {
|
|
105
111
|
default: u(() => [
|
|
106
112
|
i(n(k), {
|
|
@@ -109,8 +115,8 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
109
115
|
}, {
|
|
110
116
|
default: u(() => [
|
|
111
117
|
f("span", {
|
|
112
|
-
class:
|
|
113
|
-
},
|
|
118
|
+
class: q(l.value ? "text-c-1" : "text-c-3")
|
|
119
|
+
}, V(l.value ? l.value.label : "Select Collection"), 3),
|
|
114
120
|
i(n(w), {
|
|
115
121
|
class: "text-c-3",
|
|
116
122
|
icon: "ChevronDown",
|
|
@@ -135,8 +141,8 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
135
141
|
}, {
|
|
136
142
|
default: u(() => [
|
|
137
143
|
f("span", {
|
|
138
|
-
class:
|
|
139
|
-
},
|
|
144
|
+
class: q(s.value ? "text-c-1" : "text-c-3")
|
|
145
|
+
}, V(s.value ? s.value.label : "Select Tag"), 3),
|
|
140
146
|
i(n(w), {
|
|
141
147
|
class: "text-c-3",
|
|
142
148
|
icon: "ChevronDown",
|
|
@@ -147,11 +153,11 @@ const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
147
153
|
})
|
|
148
154
|
]),
|
|
149
155
|
_: 1
|
|
150
|
-
}, 8, ["modelValue", "options"])) :
|
|
156
|
+
}, 8, ["modelValue", "options"])) : j("", !0)
|
|
151
157
|
])
|
|
152
158
|
]),
|
|
153
159
|
submit: u(() => e[4] || (e[4] = [
|
|
154
|
-
|
|
160
|
+
E("Create Request")
|
|
155
161
|
])),
|
|
156
162
|
default: u(() => [
|
|
157
163
|
i(O, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;AAsMA,wBAOG"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useToasts as
|
|
3
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as c, ref as i, openBlock as d, createBlock as f, withCtx as s, createTextVNode as k, createVNode as b } from "vue";
|
|
2
|
+
import { useToasts as w } from "@scalar/use-toasts";
|
|
3
|
+
import { useRouter as _ } from "vue-router";
|
|
4
4
|
import v from "./CommandActionForm.vue.js";
|
|
5
5
|
import N from "./CommandActionInput.vue.js";
|
|
6
6
|
import { useWorkspace as V } from "../../store/store.js";
|
|
7
|
-
const
|
|
7
|
+
const $ = /* @__PURE__ */ c({
|
|
8
8
|
__name: "CommandPaletteWorkspace",
|
|
9
9
|
emits: ["close", "back"],
|
|
10
10
|
setup(W, { emit: m }) {
|
|
11
|
-
const
|
|
11
|
+
const t = m, { push: n } = _(), { toast: l } = w(), { workspaceMutators: p } = V(), o = i(""), u = () => {
|
|
12
12
|
if (!o.value.trim()) {
|
|
13
13
|
l("Please enter a name before creating a workspace.", "error");
|
|
14
14
|
return;
|
|
@@ -16,7 +16,12 @@ const T = /* @__PURE__ */ i({
|
|
|
16
16
|
const r = p.add({
|
|
17
17
|
name: o.value
|
|
18
18
|
});
|
|
19
|
-
n(
|
|
19
|
+
n({
|
|
20
|
+
name: "workspace",
|
|
21
|
+
params: {
|
|
22
|
+
workspace: r.uid
|
|
23
|
+
}
|
|
24
|
+
}), t("close");
|
|
20
25
|
};
|
|
21
26
|
return (r, e) => (d(), f(v, {
|
|
22
27
|
disabled: !o.value.trim(),
|
|
@@ -28,10 +33,10 @@ const T = /* @__PURE__ */ i({
|
|
|
28
33
|
default: s(() => [
|
|
29
34
|
b(N, {
|
|
30
35
|
modelValue: o.value,
|
|
31
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
36
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
|
|
32
37
|
label: "Workspace Name",
|
|
33
38
|
placeholder: "Workspace Name",
|
|
34
|
-
onOnDelete: e[1] || (e[1] = (
|
|
39
|
+
onOnDelete: e[1] || (e[1] = (a) => t("back", a))
|
|
35
40
|
}, null, 8, ["modelValue"])
|
|
36
41
|
]),
|
|
37
42
|
_: 1
|
|
@@ -39,5 +44,5 @@ const T = /* @__PURE__ */ i({
|
|
|
39
44
|
}
|
|
40
45
|
});
|
|
41
46
|
export {
|
|
42
|
-
|
|
47
|
+
$ as default
|
|
43
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AA8YA;;;;GAIG;;AACH,wBA+dI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import o from "./TheCommandPalette.vue2.js";
|
|
2
|
-
import { PaletteComponents as
|
|
2
|
+
import { PaletteComponents as f } from "./TheCommandPalette.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8de4d9e3"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
f as PaletteComponents,
|
|
8
|
+
a as default
|
|
9
9
|
};
|
|
@@ -73,12 +73,12 @@ const ve = {
|
|
|
73
73
|
{
|
|
74
74
|
name: "Add Environment",
|
|
75
75
|
icon: "Brackets",
|
|
76
|
-
path: "
|
|
76
|
+
path: "environment"
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
name: "Add Cookie",
|
|
80
80
|
icon: "Cookie",
|
|
81
|
-
path: "
|
|
81
|
+
path: "cookies"
|
|
82
82
|
}
|
|
83
83
|
]
|
|
84
84
|
},
|
|
@@ -87,10 +87,10 @@ const ve = {
|
|
|
87
87
|
commands: se.map((e) => ({
|
|
88
88
|
name: e.prettyName,
|
|
89
89
|
icon: e.icon,
|
|
90
|
-
path:
|
|
90
|
+
path: `${e.name}.default`
|
|
91
91
|
}))
|
|
92
92
|
}
|
|
93
|
-
], d = oe(), { push: W } = le(), { activeWorkspace: H, events: f } = fe(), x = i(), l = i(""), s = i(null), c = i(-1),
|
|
93
|
+
], d = oe(), { push: W } = le(), { activeWorkspace: H, events: f } = fe(), x = i(), l = i(""), s = i(null), c = i(-1), D = i([]), v = T(
|
|
94
94
|
() => P.reduce((e, o) => {
|
|
95
95
|
const t = o.commands.filter(
|
|
96
96
|
(n) => n.name.toLowerCase().includes(l.value.toLowerCase())
|
|
@@ -104,8 +104,13 @@ const ve = {
|
|
|
104
104
|
var o;
|
|
105
105
|
return (o = _.value) == null ? void 0 : o.focus();
|
|
106
106
|
});
|
|
107
|
-
},
|
|
108
|
-
"path" in e ? (W(
|
|
107
|
+
}, $ = (e) => {
|
|
108
|
+
"path" in e ? (W({
|
|
109
|
+
name: e.path,
|
|
110
|
+
params: {
|
|
111
|
+
workspace: H.value.uid
|
|
112
|
+
}
|
|
113
|
+
}), h()) : s.value = e.name;
|
|
109
114
|
}, _ = i(), I = ({
|
|
110
115
|
commandName: e,
|
|
111
116
|
metaData: o
|
|
@@ -123,14 +128,14 @@ const ve = {
|
|
|
123
128
|
if (!d.open) return;
|
|
124
129
|
o.preventDefault();
|
|
125
130
|
const t = e === "up" ? -1 : 1, n = v.value.length;
|
|
126
|
-
c.value = (c.value + t + n) % n, (C =
|
|
131
|
+
c.value = (c.value + t + n) % n, (C = D.value[c.value]) == null || C.scrollIntoView({
|
|
127
132
|
behavior: "smooth",
|
|
128
133
|
block: "nearest"
|
|
129
134
|
});
|
|
130
135
|
}, k = T(
|
|
131
136
|
() => v.value[c.value]
|
|
132
137
|
), U = (e) => {
|
|
133
|
-
!k.value || s.value || (e.preventDefault(), e.stopPropagation(),
|
|
138
|
+
!k.value || s.value || (e.preventDefault(), e.stopPropagation(), $(k.value));
|
|
134
139
|
}, L = (e) => {
|
|
135
140
|
d.open && e != null && e.closeModal && h();
|
|
136
141
|
};
|
|
@@ -216,12 +221,12 @@ const ve = {
|
|
|
216
221
|
key: n.name,
|
|
217
222
|
ref_for: !0,
|
|
218
223
|
ref: (b) => {
|
|
219
|
-
b && (
|
|
224
|
+
b && (D.value[C] = b);
|
|
220
225
|
},
|
|
221
226
|
class: X(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
|
|
222
227
|
"bg-b-2": n.name === ((E = k.value) == null ? void 0 : E.name)
|
|
223
228
|
}]),
|
|
224
|
-
onClick: (b) =>
|
|
229
|
+
onClick: (b) => $(n)
|
|
225
230
|
}, [
|
|
226
231
|
p(r(A), {
|
|
227
232
|
class: "text-c-2 mr-2.5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAkZA,wBAMG"}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
import { defineComponent as y, computed as S, openBlock as c, createElementBlock as f, createVNode as n, unref as e, withCtx as r, Fragment as N, renderList as D, createBlock as v, withModifiers as h, createElementVNode as s, normalizeClass as w, createTextVNode as d, toDisplayString as x, createCommentVNode as j } from "vue";
|
|
2
|
-
import { ScalarDropdown as z, ScalarDropdownItem as
|
|
2
|
+
import { ScalarDropdown as z, ScalarDropdownItem as m, ScalarIcon as l, ScalarDropdownDivider as B, ScalarButton as I } from "@scalar/components";
|
|
3
3
|
import { useRouter as V } from "vue-router";
|
|
4
4
|
import { useWorkspace as M } from "../../store/store.js";
|
|
5
|
-
const W = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap" },
|
|
5
|
+
const W = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap" }, O = { class: "flex items-center justify-center h-4 w-4" }, A = /* @__PURE__ */ y({
|
|
6
6
|
__name: "EnvironmentSelector",
|
|
7
|
-
setup(
|
|
7
|
+
setup(R) {
|
|
8
8
|
const {
|
|
9
|
-
environments:
|
|
9
|
+
environments: u,
|
|
10
10
|
activeWorkspace: i,
|
|
11
11
|
workspaceMutators: k,
|
|
12
12
|
activeEnvironment: g,
|
|
13
13
|
isReadOnly: C
|
|
14
14
|
} = M(), E = V(), p = (a) => {
|
|
15
15
|
k.edit(i.value.uid, "activeEnvironmentId", a);
|
|
16
|
-
}, _ = () => E.push(
|
|
16
|
+
}, _ = () => E.push({
|
|
17
|
+
name: "environment",
|
|
18
|
+
params: {
|
|
19
|
+
environment: i.value.uid
|
|
20
|
+
}
|
|
21
|
+
}), b = S(() => [
|
|
17
22
|
// Always add the default environment
|
|
18
|
-
|
|
19
|
-
...Object.values(
|
|
23
|
+
u.default,
|
|
24
|
+
...Object.values(u).filter((a) => a.uid !== "default")
|
|
20
25
|
]);
|
|
21
26
|
return (a, o) => (c(), f("div", null, [
|
|
22
27
|
n(e(z), null, {
|
|
23
28
|
items: r(() => [
|
|
24
|
-
(c(!0), f(N, null, D(b.value, (t) => (c(), v(e(
|
|
29
|
+
(c(!0), f(N, null, D(b.value, (t) => (c(), v(e(m), {
|
|
25
30
|
key: t.uid,
|
|
26
31
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
|
|
27
|
-
onClick: h((
|
|
32
|
+
onClick: h(($) => p(t.uid), ["stop"])
|
|
28
33
|
}, {
|
|
29
34
|
default: r(() => [
|
|
30
35
|
s("div", {
|
|
@@ -43,7 +48,7 @@ const W = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
43
48
|
]),
|
|
44
49
|
_: 2
|
|
45
50
|
}, 1032, ["onClick"]))), 128)),
|
|
46
|
-
n(e(
|
|
51
|
+
n(e(m), {
|
|
47
52
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
|
|
48
53
|
onClick: o[0] || (o[0] = h((t) => p(""), ["stop"]))
|
|
49
54
|
}, {
|
|
@@ -65,13 +70,13 @@ const W = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
65
70
|
_: 1
|
|
66
71
|
}),
|
|
67
72
|
n(e(B)),
|
|
68
|
-
e(C) ? j("", !0) : (c(), v(e(
|
|
73
|
+
e(C) ? j("", !0) : (c(), v(e(m), {
|
|
69
74
|
key: 0,
|
|
70
75
|
class: "flex items-center gap-1.5",
|
|
71
76
|
onClick: _
|
|
72
77
|
}, {
|
|
73
78
|
default: r(() => [
|
|
74
|
-
s("div",
|
|
79
|
+
s("div", O, [
|
|
75
80
|
n(e(l), {
|
|
76
81
|
icon: "Brackets",
|
|
77
82
|
size: "sm"
|
|
@@ -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: "drop") => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onInput?: ((value: string) => any) | undefined;
|
|
4
|
+
onInput?: ((value: string, integration: null, eventType: "drop") => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=DropEventListener.vue.d.ts.map
|
|
@@ -7,26 +7,26 @@ const A = {
|
|
|
7
7
|
__name: "DropEventListener",
|
|
8
8
|
emits: ["input"],
|
|
9
9
|
setup(B, { emit: v }) {
|
|
10
|
-
const
|
|
10
|
+
const l = v, r = y(!1);
|
|
11
11
|
let o = 0;
|
|
12
12
|
x(() => {
|
|
13
13
|
document.addEventListener("dragenter", m), document.addEventListener("dragleave", f), document.addEventListener("dragover", u), document.addEventListener("drop", c);
|
|
14
14
|
}), h(() => {
|
|
15
15
|
document.removeEventListener("dragenter", m), document.removeEventListener("dragover", u), document.removeEventListener("dragleave", f), document.removeEventListener("drop", c);
|
|
16
16
|
});
|
|
17
|
-
function
|
|
17
|
+
function d(e) {
|
|
18
18
|
var t;
|
|
19
19
|
return ((t = e.dataTransfer) == null ? void 0 : t.types.includes("text/html")) ?? !1;
|
|
20
20
|
}
|
|
21
21
|
async function c(e) {
|
|
22
|
-
if (e.preventDefault(), r.value = !1, o = 0, !
|
|
22
|
+
if (e.preventDefault(), r.value = !1, o = 0, !d(e) && e.dataTransfer) {
|
|
23
23
|
const t = e.dataTransfer.getData("text").replace(/^blob:/, "");
|
|
24
24
|
if (t)
|
|
25
|
-
|
|
25
|
+
l("input", t, null, "drop");
|
|
26
26
|
else if (e.dataTransfer.files.length > 0) {
|
|
27
27
|
const a = e.dataTransfer.files[0], n = new FileReader();
|
|
28
28
|
n.onload = async (s) => {
|
|
29
|
-
s.target && typeof s.target.result == "string" &&
|
|
29
|
+
s.target && typeof s.target.result == "string" && l("input", s.target.result, null, "drop");
|
|
30
30
|
}, n.readAsText(a);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -38,7 +38,7 @@ const A = {
|
|
|
38
38
|
e.preventDefault(), o--, o === 0 && (r.value = !1);
|
|
39
39
|
}
|
|
40
40
|
function m(e) {
|
|
41
|
-
if (e.preventDefault(), o++, !
|
|
41
|
+
if (e.preventDefault(), o++, !d(e)) {
|
|
42
42
|
if (e.dataTransfer) {
|
|
43
43
|
const t = e.dataTransfer.items;
|
|
44
44
|
for (let a = 0; a < t.length; a++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportCollectionListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionListener.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportCollectionListener.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportCollectionListener.vue"],"names":[],"mappings":"AAqGA,iBAAS,cAAc;WAqHT,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as m, ref as r, openBlock as s, createElementBlock as p, Fragment as f, createVNode as n, renderSlot as _, nextTick as v } from "vue";
|
|
2
|
+
import d from "./DropEventListener.vue.js";
|
|
3
|
+
import I from "./ImportCollectionModal.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import y from "./PasteEventListener.vue.js";
|
|
6
|
+
import $ from "./UrlQueryParameterChecker.vue.js";
|
|
7
|
+
const C = /* @__PURE__ */ m({
|
|
8
8
|
__name: "ImportCollectionListener",
|
|
9
|
-
setup(
|
|
10
|
-
const e =
|
|
11
|
-
async function
|
|
12
|
-
e.value = null, t.value = null, await
|
|
9
|
+
setup(g) {
|
|
10
|
+
const e = r(null), t = r(null), o = r(null);
|
|
11
|
+
async function u() {
|
|
12
|
+
e.value = null, t.value = null, o.value = null, await v();
|
|
13
13
|
}
|
|
14
|
-
async function
|
|
15
|
-
await
|
|
14
|
+
async function l(a, i = null, c) {
|
|
15
|
+
await u(), e.value = a, t.value = i, o.value = c;
|
|
16
16
|
}
|
|
17
|
-
return (
|
|
18
|
-
n(
|
|
17
|
+
return (a, i) => (s(), p(f, null, [
|
|
18
|
+
n(I, {
|
|
19
|
+
eventType: o.value,
|
|
19
20
|
integration: t.value,
|
|
20
21
|
source: e.value,
|
|
21
|
-
onImportFinished:
|
|
22
|
-
}, null, 8, ["integration", "source"]),
|
|
23
|
-
n(
|
|
24
|
-
n(
|
|
25
|
-
n(
|
|
26
|
-
|
|
22
|
+
onImportFinished: u
|
|
23
|
+
}, null, 8, ["eventType", "integration", "source"]),
|
|
24
|
+
n(y, { onInput: l }),
|
|
25
|
+
n(d, { onInput: l }),
|
|
26
|
+
n($, { onInput: l }),
|
|
27
|
+
_(a.$slots, "default")
|
|
27
28
|
], 64));
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
C as default
|
|
32
33
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
source: string | null;
|
|
3
3
|
integration: string | null;
|
|
4
|
+
eventType: 'drop' | 'paste' | 'query' | null;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
7
|
importFinished: () => any;
|
|
@@ -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"}
|