@scalar/api-client 2.2.22 → 2.2.24
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 +22 -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 +69 -70
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +69 -61
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +17 -16
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +46 -46
- package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +42 -38
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
- package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +22 -19
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +57 -49
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +71 -64
- package/dist/layouts/App/ApiClientApp.vue.js +4 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
- package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
- package/dist/libs/create-client.d.ts +10 -10
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +42 -36
- package/dist/libs/extractAttachmentFilename.d.ts +3 -0
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +7 -7
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +18 -18
- package/dist/libs/normalize-headers.d.ts.map +1 -1
- package/dist/libs/normalize-headers.js +2 -2
- package/dist/libs/parse-curl.js +39 -36
- package/dist/store/active-entities.d.ts +4 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +88 -86
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +29 -29
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +27 -23
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +94 -77
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +27 -27
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +18 -18
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +35 -33
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -9
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +39 -37
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +94 -89
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +118 -116
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +149 -144
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +37 -31
- package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +147 -130
- package/dist/views/Request/types/sidebar-item.d.ts +4 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +38 -35
- package/dist/views/Servers/Servers.vue2.js +38 -35
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +15 -15
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
- package/package.json +8 -8
|
@@ -1,208 +1,218 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useActiveEntities as
|
|
5
|
-
import { useModal as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as L, computed as O, ref as D, openBlock as p, createElementBlock as z, createElementVNode as a, createVNode as s, unref as t, withCtx as o, Fragment as I, renderList as U, createBlock as g, withModifiers as c, toDisplayString as C } from "vue";
|
|
2
|
+
import V from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
4
|
+
import { useActiveEntities as F } from "../../../store/active-entities.js";
|
|
5
|
+
import { useModal as S, ScalarDropdown as $, ScalarDropdownItem as u, ScalarListboxCheckbox as P, ScalarIcon as m, ScalarTooltip as Y, ScalarButton as E, ScalarDropdownDivider as G, ScalarModal as N } from "@scalar/components";
|
|
6
|
+
import { useRouter as H } from "vue-router";
|
|
7
|
+
import { useWorkspace as J } from "../../../store/store.js";
|
|
8
|
+
const K = { class: "flex items-center text-sm w-[inherit]" }, Q = { class: "font-bold m-0 flex gap-1.5 items-center" }, X = { class: "line-clamp-1 text-left" }, Z = { class: "text-ellipsis overflow-hidden" }, ee = { class: "flex items-center justify-center h-4 w-4" }, ce = /* @__PURE__ */ L({
|
|
9
9
|
__name: "WorkspaceDropdown",
|
|
10
|
-
setup(
|
|
11
|
-
const { activeWorkspace: f } =
|
|
12
|
-
|
|
10
|
+
setup(te) {
|
|
11
|
+
const { activeWorkspace: f } = F(), { workspaces: d, workspaceMutators: b, events: T } = J(), { push: _ } = H(), j = (n) => {
|
|
12
|
+
var e;
|
|
13
|
+
n !== ((e = f.value) == null ? void 0 : e.uid) && _({
|
|
13
14
|
name: "workspace",
|
|
14
15
|
params: {
|
|
15
|
-
workspace:
|
|
16
|
+
workspace: n
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
}, y = O(() => Object.keys(d).length === 1), B = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = D(""), i = D(""), w = S(), k = S(), M = (n) => {
|
|
20
|
+
const e = d[n];
|
|
21
|
+
e && (v.value = e.name, i.value = n, w.show());
|
|
22
|
+
}, R = (n) => {
|
|
23
|
+
n.trim() && (b.edit(i.value, "name", n.trim()), w.hide());
|
|
24
|
+
}, W = (n) => {
|
|
25
|
+
const e = d[n];
|
|
26
|
+
e && (v.value = e.name, i.value = n, k.show());
|
|
27
|
+
}, A = async () => {
|
|
28
|
+
var n;
|
|
29
|
+
if (!y.value) {
|
|
30
|
+
const e = ((n = f.value) == null ? void 0 : n.uid) === i.value, l = { ...d };
|
|
31
|
+
if (delete l[i.value], b.delete(i.value), e) {
|
|
32
|
+
const r = Object.keys(l)[0];
|
|
33
|
+
await _({
|
|
30
34
|
name: "workspace",
|
|
31
35
|
params: {
|
|
32
|
-
workspace:
|
|
36
|
+
workspace: r
|
|
33
37
|
}
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
k.hide();
|
|
38
42
|
};
|
|
39
|
-
return (
|
|
40
|
-
|
|
41
|
-
s(
|
|
42
|
-
items:
|
|
43
|
-
(p(!0),
|
|
44
|
-
key:
|
|
43
|
+
return (n, e) => (p(), z("div", null, [
|
|
44
|
+
a("div", K, [
|
|
45
|
+
s(t($), null, {
|
|
46
|
+
items: o(() => [
|
|
47
|
+
(p(!0), z(I, null, U(t(d), (l, r) => (p(), g(t(u), {
|
|
48
|
+
key: r,
|
|
45
49
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
46
|
-
onClick:
|
|
50
|
+
onClick: c((x) => j(r), ["stop"])
|
|
47
51
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
52
|
+
default: o(() => {
|
|
53
|
+
var x;
|
|
54
|
+
return [
|
|
55
|
+
s(t(P), {
|
|
56
|
+
selected: ((x = t(f)) == null ? void 0 : x.uid) === r
|
|
57
|
+
}, null, 8, ["selected"]),
|
|
58
|
+
a("span", Z, C(l.name), 1),
|
|
59
|
+
s(t($), {
|
|
60
|
+
placement: "right-start",
|
|
61
|
+
teleport: ""
|
|
62
|
+
}, {
|
|
63
|
+
items: o(() => [
|
|
64
|
+
s(t(u), {
|
|
65
|
+
class: "flex gap-2",
|
|
66
|
+
onMousedown: (h) => M(r),
|
|
67
|
+
onTouchend: c((h) => M(r), ["prevent"])
|
|
68
|
+
}, {
|
|
69
|
+
default: o(() => [
|
|
70
|
+
s(t(m), {
|
|
71
|
+
class: "inline-flex",
|
|
72
|
+
icon: "Edit",
|
|
73
|
+
size: "md",
|
|
74
|
+
thickness: "1.5"
|
|
75
|
+
}),
|
|
76
|
+
e[4] || (e[4] = a("span", null, "Rename", -1))
|
|
77
|
+
]),
|
|
78
|
+
_: 2
|
|
79
|
+
}, 1032, ["onMousedown", "onTouchend"]),
|
|
80
|
+
y.value ? (p(), g(t(Y), {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "z-overlay",
|
|
83
|
+
side: "bottom"
|
|
84
|
+
}, {
|
|
85
|
+
trigger: o(() => [
|
|
86
|
+
s(t(u), {
|
|
87
|
+
class: "flex gap-2 w-full",
|
|
88
|
+
disabled: "",
|
|
89
|
+
onMousedown: e[0] || (e[0] = c(() => {
|
|
90
|
+
}, ["prevent"])),
|
|
91
|
+
onTouchend: e[1] || (e[1] = c(() => {
|
|
92
|
+
}, ["prevent"]))
|
|
93
|
+
}, {
|
|
94
|
+
default: o(() => [
|
|
95
|
+
s(t(m), {
|
|
96
|
+
class: "inline-flex",
|
|
97
|
+
icon: "Delete",
|
|
98
|
+
size: "md",
|
|
99
|
+
thickness: "1.5"
|
|
100
|
+
}),
|
|
101
|
+
e[5] || (e[5] = a("span", null, "Delete", -1))
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
})
|
|
105
|
+
]),
|
|
106
|
+
content: o(() => e[6] || (e[6] = [
|
|
107
|
+
a("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-context p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
108
|
+
a("div", { class: "flex items-center text-c-2" }, [
|
|
109
|
+
a("span", null, "Only workspace cannot be deleted.")
|
|
110
|
+
])
|
|
111
|
+
], -1)
|
|
112
|
+
])),
|
|
113
|
+
_: 1
|
|
114
|
+
})) : (p(), g(t(u), {
|
|
115
|
+
key: 1,
|
|
116
|
+
class: "flex !gap-2",
|
|
117
|
+
onMousedown: c((h) => W(r), ["prevent"]),
|
|
118
|
+
onTouchend: c((h) => W(r), ["prevent"])
|
|
119
|
+
}, {
|
|
120
|
+
default: o(() => [
|
|
121
|
+
s(t(m), {
|
|
122
|
+
class: "inline-flex",
|
|
123
|
+
icon: "Delete",
|
|
124
|
+
size: "sm",
|
|
125
|
+
thickness: "1.5"
|
|
126
|
+
}),
|
|
127
|
+
e[7] || (e[7] = a("span", null, "Delete", -1))
|
|
128
|
+
]),
|
|
129
|
+
_: 2
|
|
130
|
+
}, 1032, ["onMousedown", "onTouchend"]))
|
|
131
|
+
]),
|
|
132
|
+
default: o(() => [
|
|
133
|
+
s(t(E), {
|
|
134
|
+
class: "px-0.5 py-0 hover:bg-b-3 group-hover/item:flex aspect-square ml-auto -mr-1 h-fit",
|
|
135
|
+
size: "sm",
|
|
136
|
+
type: "button",
|
|
137
|
+
variant: "ghost"
|
|
138
|
+
}, {
|
|
139
|
+
default: o(() => [
|
|
140
|
+
s(t(m), {
|
|
141
|
+
icon: "Ellipses",
|
|
142
|
+
size: "sm"
|
|
143
|
+
})
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
})
|
|
147
|
+
]),
|
|
148
|
+
_: 2
|
|
149
|
+
}, 1024)
|
|
150
|
+
];
|
|
151
|
+
}),
|
|
145
152
|
_: 2
|
|
146
153
|
}, 1032, ["onClick"]))), 128)),
|
|
147
|
-
s(
|
|
148
|
-
s(
|
|
154
|
+
s(t(G)),
|
|
155
|
+
s(t(u), {
|
|
149
156
|
class: "flex items-center gap-1.5",
|
|
150
|
-
onClick:
|
|
157
|
+
onClick: B
|
|
151
158
|
}, {
|
|
152
|
-
default:
|
|
153
|
-
|
|
154
|
-
s(
|
|
159
|
+
default: o(() => [
|
|
160
|
+
a("div", ee, [
|
|
161
|
+
s(t(m), {
|
|
155
162
|
icon: "Add",
|
|
156
163
|
size: "sm"
|
|
157
164
|
})
|
|
158
165
|
]),
|
|
159
|
-
|
|
166
|
+
e[8] || (e[8] = a("span", null, "Create Workspace", -1))
|
|
160
167
|
]),
|
|
161
168
|
_: 1
|
|
162
169
|
})
|
|
163
170
|
]),
|
|
164
|
-
default:
|
|
165
|
-
s(
|
|
171
|
+
default: o(() => [
|
|
172
|
+
s(t(E), {
|
|
166
173
|
class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
167
174
|
fullWidth: "",
|
|
168
175
|
variant: "ghost"
|
|
169
176
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
l
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
default: o(() => {
|
|
178
|
+
var l;
|
|
179
|
+
return [
|
|
180
|
+
a("div", Q, [
|
|
181
|
+
a("h2", X, C((l = t(f)) == null ? void 0 : l.name), 1)
|
|
182
|
+
])
|
|
183
|
+
];
|
|
184
|
+
}),
|
|
175
185
|
_: 1
|
|
176
186
|
})
|
|
177
187
|
]),
|
|
178
188
|
_: 1
|
|
179
189
|
})
|
|
180
190
|
]),
|
|
181
|
-
s(
|
|
191
|
+
s(t(N), {
|
|
182
192
|
size: "xxs",
|
|
183
|
-
state:
|
|
193
|
+
state: t(k),
|
|
184
194
|
title: "Delete workspace"
|
|
185
195
|
}, {
|
|
186
|
-
default:
|
|
187
|
-
s(
|
|
196
|
+
default: o(() => [
|
|
197
|
+
s(V, {
|
|
188
198
|
variableName: v.value,
|
|
189
199
|
warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
|
|
190
|
-
onClose:
|
|
191
|
-
onDelete:
|
|
200
|
+
onClose: e[2] || (e[2] = (l) => t(k).hide()),
|
|
201
|
+
onDelete: A
|
|
192
202
|
}, null, 8, ["variableName"])
|
|
193
203
|
]),
|
|
194
204
|
_: 1
|
|
195
205
|
}, 8, ["state"]),
|
|
196
|
-
s(
|
|
206
|
+
s(t(N), {
|
|
197
207
|
size: "xxs",
|
|
198
|
-
state:
|
|
208
|
+
state: t(w),
|
|
199
209
|
title: "Rename Workspace"
|
|
200
210
|
}, {
|
|
201
|
-
default:
|
|
202
|
-
s(
|
|
211
|
+
default: o(() => [
|
|
212
|
+
s(q, {
|
|
203
213
|
name: v.value,
|
|
204
|
-
onClose:
|
|
205
|
-
onEdit:
|
|
214
|
+
onClose: e[3] || (e[3] = (l) => t(w).hide()),
|
|
215
|
+
onEdit: R
|
|
206
216
|
}, null, 8, ["name"])
|
|
207
217
|
]),
|
|
208
218
|
_: 1
|
|
@@ -211,5 +221,5 @@ const J = { class: "flex items-center text-sm w-[inherit]" }, K = { class: "font
|
|
|
211
221
|
}
|
|
212
222
|
});
|
|
213
223
|
export {
|
|
214
|
-
|
|
224
|
+
ce as default
|
|
215
225
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-drag.d.ts","sourceRoot":"","sources":["../../../src/views/Request/handle-drag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAElE,0BAA0B;AAC1B,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,EACvD,EACE,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,IAAI,EACJ,WAAW,EACX,iBAAiB,GAClB,EAAE,cAAc;kCASoB,YAAY,eAAe,WAAW;
|
|
1
|
+
{"version":3,"file":"handle-drag.d.ts","sourceRoot":"","sources":["../../../src/views/Request/handle-drag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAElE,0BAA0B;AAC1B,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,EACvD,EACE,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,IAAI,EACJ,WAAW,EACX,iBAAiB,GAClB,EAAE,cAAc;kCASoB,YAAY,eAAe,WAAW;gCAwE3D,YAAY,eACb,WAAW;EAoB3B"}
|
|
@@ -1,54 +1,60 @@
|
|
|
1
|
-
function
|
|
1
|
+
function E(s, {
|
|
2
2
|
collections: r,
|
|
3
|
-
collectionMutators:
|
|
4
|
-
isReadOnly:
|
|
3
|
+
collectionMutators: x,
|
|
4
|
+
isReadOnly: I,
|
|
5
5
|
tags: l,
|
|
6
|
-
tagMutators:
|
|
7
|
-
workspaceMutators:
|
|
6
|
+
tagMutators: U,
|
|
7
|
+
workspaceMutators: a
|
|
8
8
|
}) {
|
|
9
|
-
function
|
|
10
|
-
r[
|
|
9
|
+
function D(i, f) {
|
|
10
|
+
r[i] ? x.edit(i, "children", f) : l[i] && U.edit(i, "children", f);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
function P(i, f) {
|
|
13
|
+
var p, v, C, b;
|
|
14
|
+
if (!i || !f) return;
|
|
15
|
+
const { id: d, parentId: n } = i, { id: t, parentId: u, offset: c } = f;
|
|
16
|
+
if (n ? r[n] ? x.edit(
|
|
17
|
+
n,
|
|
17
18
|
"children",
|
|
18
|
-
r[
|
|
19
|
+
r[n].children.filter(
|
|
19
20
|
(e) => e !== d
|
|
20
21
|
)
|
|
21
|
-
) : l[
|
|
22
|
-
|
|
22
|
+
) : l[n] && U.edit(
|
|
23
|
+
n,
|
|
23
24
|
"children",
|
|
24
|
-
l[
|
|
25
|
-
) :
|
|
26
|
-
s.value.uid,
|
|
25
|
+
l[n].children.filter((e) => e !== d)
|
|
26
|
+
) : a.edit(
|
|
27
|
+
((p = s.value) == null ? void 0 : p.uid) ?? "",
|
|
27
28
|
"collections",
|
|
28
|
-
s.value.collections.filter(
|
|
29
|
-
|
|
29
|
+
((v = s.value) == null ? void 0 : v.collections.filter(
|
|
30
|
+
(e) => e !== d
|
|
31
|
+
)) ?? []
|
|
32
|
+
), c === 2) {
|
|
30
33
|
const e = r[t] || l[t];
|
|
31
|
-
|
|
34
|
+
D(t, [
|
|
35
|
+
...(e == null ? void 0 : e.children) ?? [],
|
|
36
|
+
d
|
|
37
|
+
]);
|
|
32
38
|
} else if (u) {
|
|
33
|
-
const
|
|
34
|
-
h.splice(
|
|
39
|
+
const e = r[u] || l[u], h = [...(e == null ? void 0 : e.children) ?? []], o = h.findIndex((w) => t === w) ?? 0;
|
|
40
|
+
h.splice(o + c, 0, d), D(u, h);
|
|
35
41
|
} else {
|
|
36
|
-
const e = [...s.value.collections], h = e.findIndex((
|
|
37
|
-
e.splice(h +
|
|
38
|
-
s.value.uid,
|
|
42
|
+
const e = [...((C = s.value) == null ? void 0 : C.collections) ?? []], h = e.findIndex((o) => t === o) ?? 0;
|
|
43
|
+
e.splice(h + c, 0, d), a.edit(
|
|
44
|
+
((b = s.value) == null ? void 0 : b.uid) ?? "",
|
|
39
45
|
"collections",
|
|
40
46
|
e
|
|
41
47
|
);
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
return {
|
|
45
|
-
handleDragEnd:
|
|
46
|
-
isDroppable: (
|
|
47
|
-
var d,
|
|
48
|
-
return !(
|
|
51
|
+
handleDragEnd: P,
|
|
52
|
+
isDroppable: (i, f) => {
|
|
53
|
+
var d, n;
|
|
54
|
+
return !(I || !r[i.id] && f.offset !== 2 || r[i.id] && ((n = (d = r[f.id]) == null ? void 0 : d.info) == null ? void 0 : n.title) === "Drafts");
|
|
49
55
|
}
|
|
50
56
|
};
|
|
51
57
|
}
|
|
52
58
|
export {
|
|
53
|
-
|
|
59
|
+
E as dragHandlerFactory
|
|
54
60
|
};
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { useActiveEntities as
|
|
1
|
+
import { useActiveEntities as R } from "../../../store/active-entities.js";
|
|
2
2
|
import { specDictionary as f } from "../../../store/import-spec.js";
|
|
3
|
-
import { combineRenameDiffs as
|
|
4
|
-
import { fetchSpecFromUrl as
|
|
5
|
-
import { parseSchema as
|
|
6
|
-
import { useToasts as
|
|
7
|
-
import { useTimeoutPoll as
|
|
8
|
-
import
|
|
9
|
-
import { watch as
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const
|
|
12
|
-
const { toast: h } =
|
|
3
|
+
import { combineRenameDiffs as S, mutateCollectionDiff as d, mutateSecuritySchemeDiff as g, mutateServerDiff as D, mutateTagDiff as T, mutateRequestDiff as M } from "../libs/live-sync.js";
|
|
4
|
+
import { fetchSpecFromUrl as I, createHash as U } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { parseSchema as O } from "@scalar/oas-utils/transforms";
|
|
6
|
+
import { useToasts as C } from "@scalar/use-toasts";
|
|
7
|
+
import { useTimeoutPoll as L } from "@vueuse/core";
|
|
8
|
+
import N from "microdiff";
|
|
9
|
+
import { watch as b } from "vue";
|
|
10
|
+
import { useWorkspace as P } from "../../../store/store.js";
|
|
11
|
+
const k = 5 * 1e3, q = 60 * 1e3, J = () => {
|
|
12
|
+
const { toast: h } = C(), c = R(), o = P(), { activeCollection: t, activeWorkspace: W } = c, { collectionMutators: n } = o, r = (e) => h(
|
|
13
13
|
`[useOpenApiWatcher] Changes to the ${e} were not applied`,
|
|
14
14
|
"error"
|
|
15
|
-
),
|
|
16
|
-
e.path[0] === "info" || e.path[0] === "security" ?
|
|
17
|
-
}, { pause: p, resume: m } =
|
|
18
|
-
var l;
|
|
15
|
+
), w = (e) => {
|
|
16
|
+
e.path[0] === "info" || e.path[0] === "security" ? d(e, c, o) || r("collection") : e.path[0] === "components" && e.path[1] === "securitySchemes" ? g(e, c, o) || r("securitySchemes") : e.path[0] === "servers" ? D(e, c, o) || r("servers") : e.path[0] === "tags" ? T(e, c, o) || r("tags") : e.path[0] === "paths" && (M(e, c, o) || r("requests"));
|
|
17
|
+
}, { pause: p, resume: m } = L(async () => {
|
|
18
|
+
var l, v;
|
|
19
19
|
const e = (l = t.value) == null ? void 0 : l.documentUrl;
|
|
20
20
|
if (!e) return;
|
|
21
21
|
const s = f[e];
|
|
22
22
|
try {
|
|
23
|
-
const a = await
|
|
23
|
+
const a = await I(
|
|
24
24
|
e,
|
|
25
|
-
|
|
25
|
+
(v = W.value) == null ? void 0 : v.proxyUrl,
|
|
26
26
|
!1
|
|
27
|
-
), u =
|
|
27
|
+
), u = U(a);
|
|
28
28
|
if (n.edit(
|
|
29
29
|
t.value.uid,
|
|
30
30
|
"watchModeStatus",
|
|
31
31
|
"WATCHING"
|
|
32
32
|
), s != null && s.hash)
|
|
33
33
|
if (s.hash && s.hash !== u) {
|
|
34
|
-
const { schema: i } = await
|
|
34
|
+
const { schema: i } = await O(a), A = N(s.schema, i), y = S(A);
|
|
35
35
|
try {
|
|
36
|
-
|
|
36
|
+
y.forEach(w), f[e] = {
|
|
37
37
|
hash: u,
|
|
38
38
|
schema: i
|
|
39
39
|
};
|
|
40
|
-
} catch (
|
|
41
|
-
console.error("[useOpenApiWatcher] Error:",
|
|
40
|
+
} catch (E) {
|
|
41
|
+
console.error("[useOpenApiWatcher] Error:", E);
|
|
42
42
|
}
|
|
43
43
|
} else console.log("[useOpenApiWatcher] No changes detected yet…");
|
|
44
44
|
else {
|
|
45
|
-
const { schema: i } = await
|
|
45
|
+
const { schema: i } = await O(a);
|
|
46
46
|
i && (f[e] = {
|
|
47
47
|
hash: u,
|
|
48
48
|
schema: i
|
|
@@ -58,10 +58,10 @@ const P = 5 * 1e3, k = 60 * 1e3, B = () => {
|
|
|
58
58
|
"error"
|
|
59
59
|
), setTimeout(() => {
|
|
60
60
|
console.info("[useOpenApiWatcher] Resuming watcher"), m();
|
|
61
|
-
},
|
|
61
|
+
}, q);
|
|
62
62
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
63
|
+
}, k);
|
|
64
|
+
b(
|
|
65
65
|
[
|
|
66
66
|
() => {
|
|
67
67
|
var e;
|
|
@@ -83,5 +83,5 @@ const P = 5 * 1e3, k = 60 * 1e3, B = () => {
|
|
|
83
83
|
);
|
|
84
84
|
};
|
|
85
85
|
export {
|
|
86
|
-
|
|
86
|
+
J as useOpenApiWatcher
|
|
87
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAelE,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,6BAA6B,CAAA;AAEpC,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAK,MAAM,KAAK,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,EAAE,eACN,MAAM,EAAE,KACnB,UAAU,
|
|
1
|
+
{"version":3,"file":"live-sync.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/live-sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAelE,OAAO,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EAEf,MAAM,6BAA6B,CAAA;AAEpC,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAK,MAAM,KAAK,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,EAAE,eACN,MAAM,EAAE,KACnB,UAAU,EA8FZ,CAAA;AAED,kEAAkE;AAClE,eAAO,MAAM,YAAY,GAAI,CAAC,OACvB,MAAM,EAAE,aACF,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,aACjB,CAAC,QAAQ,EAAE,CAAC,KAAK,OAAO,KAClC,CAAC,GAAG,IAMN,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WACpB,SAAS,QACX,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KACxB,SAAS,GAAG,IAqDd,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,UACjB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,QAC/B,UAAU,KACf;IACD,0DAA0D;IAC1D,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACb,mGAAmG;IACnG,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACrB,2DAA2D;IAC3D,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;CACzC,GAAG,IAwBH,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,wBACM,mBAAmB,0BACjB,cAAc,KACrC,OA0CF,CAAA;AAwBD;;GAEG;AACH,eAAO,MAAM,iBAAiB,SACtB,UAAU,wBACM,mBAAmB,SAClC,cAAc,KACpB,OA2IF,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,SACrB,UAAU,wBACM,mBAAmB,+BACZ,cAAc,KAC1C,OAsCF,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,aAAa,SAClB,UAAU,wBACM,mBAAmB,yBAClB,cAAc,KACpC,OAmCF,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,WACpB,SAAS,OACZ,MAAM,SACJ,MAAM,KACZ,SAAS,GAAG,IAmBd,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,wBACM,mBAAmB,+CACI,cAAc,KAC1D,OA8CF,CAAA"}
|