@scalar/api-client 2.2.48 → 2.2.50
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 +41 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +15 -3
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +102 -94
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +54 -58
- package/dist/components/CodeInput/CodeInput.vue.d.ts +9 -0
- 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 +95 -93
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +1 -3
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -22
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +13 -13
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +12 -12
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +54 -49
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +9 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +11 -8
- package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue2.js +36 -30
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +15 -15
- package/dist/components/Form/Form.vue.d.ts +3 -1
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +30 -25
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +41 -41
- package/dist/components/ImportCollection/ImportNowButton.vue.js +24 -24
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +13 -13
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +19 -19
- package/dist/layouts/App/create-api-client-app.d.ts +387 -477
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +774 -954
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +387 -477
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +390 -479
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +3 -15
- package/dist/libs/env-helpers.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +7 -7
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +3 -1
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/hot-keys.js +11 -15
- package/dist/libs/hot-keys.test.d.ts +2 -0
- package/dist/libs/hot-keys.test.d.ts.map +1 -0
- package/dist/libs/index.js +27 -26
- package/dist/libs/send-request/build-request-security.d.ts +1 -1
- package/dist/libs/send-request/build-request-security.js +19 -16
- package/dist/libs/send-request/create-request-operation.test.d.ts +10 -10
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +37 -34
- package/dist/store/active-entities.d.ts +58 -67
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +61 -74
- package/dist/store/collections.d.ts +90 -90
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +4 -17
- package/dist/store/cookies.d.ts +14 -14
- package/dist/store/environment.d.ts +19 -18
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +2 -8
- package/dist/store/import-spec.d.ts +16 -106
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +9 -14
- package/dist/store/request-example.d.ts +25 -25
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +15 -20
- package/dist/store/requests.d.ts +84 -84
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +17 -40
- package/dist/store/router-params.d.ts +13 -11
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +5 -5
- package/dist/store/security-schemes.d.ts +58 -58
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +1 -3
- package/dist/store/servers.d.ts +17 -17
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +2 -9
- package/dist/store/store.d.ts +387 -477
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +2 -4
- package/dist/store/tags.d.ts +28 -28
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +19 -34
- package/dist/store/workspace.d.ts +36 -36
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +1 -5
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +18 -18
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +24 -24
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +140 -132
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +15 -15
- 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 +160 -141
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +7 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +6 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +99 -95
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +70 -64
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +40 -34
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +6 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +32 -26
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +93 -85
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +9 -0
- 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 +214 -244
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +10 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +77 -80
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +89 -96
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +10 -2
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +59 -66
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +11 -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 +176 -155
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +6 -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 +97 -100
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +31 -22
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +2 -2
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.js +11 -13
- 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 +50 -48
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- 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 +38 -44
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +10 -0
- 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 +77 -69
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +4 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +41 -39
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +56 -52
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +68 -68
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +38 -55
- package/dist/views/Request/libs/auth.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +28 -29
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +42 -65
- package/dist/views/Request/libs/request.d.ts +5 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -1
- package/dist/views/Request/libs/request.js +37 -2
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +10 -34
- package/dist/views/Servers/ServerForm.vue.d.ts +1 -8
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +21 -22
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +73 -81
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +118 -134
- package/package.json +14 -14
|
@@ -1,90 +1,95 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as L } from "../../store/active-entities.js";
|
|
1
|
+
import { defineComponent as _, ref as p, computed as N, openBlock as u, createBlock as c, withCtx as l, createVNode as d, unref as n, createElementVNode as f, normalizeClass as P, toDisplayString as B, createTextVNode as L } from "vue";
|
|
3
2
|
import { ScalarListbox as M, ScalarButton as b, ScalarIcon as T } from "@scalar/components";
|
|
4
3
|
import { useToasts as j } from "@scalar/use-toasts";
|
|
5
|
-
import z from "
|
|
6
|
-
import E from "./
|
|
7
|
-
import
|
|
8
|
-
|
|
4
|
+
import { useActiveEntities as z } from "../../store/active-entities.js";
|
|
5
|
+
import E from "./CommandActionForm.vue.js";
|
|
6
|
+
import R from "./CommandActionInput.vue.js";
|
|
7
|
+
import { useWorkspace as W } from "../../store/store.js";
|
|
8
|
+
const G = /* @__PURE__ */ _({
|
|
9
9
|
__name: "CommandPaletteServer",
|
|
10
10
|
props: {
|
|
11
11
|
metaData: {}
|
|
12
12
|
},
|
|
13
13
|
emits: ["close", "back"],
|
|
14
14
|
setup(C, { emit: x }) {
|
|
15
|
-
const s = C,
|
|
15
|
+
const s = C, m = x, { toast: v } = j(), { activeCollection: S, activeWorkspaceCollections: k } = z(), {
|
|
16
|
+
collectionMutators: V,
|
|
17
|
+
serverMutators: g,
|
|
18
|
+
events: D,
|
|
19
|
+
collections: U
|
|
20
|
+
} = W(), r = p(""), i = N(
|
|
16
21
|
() => k.value.flatMap(
|
|
17
|
-
(
|
|
22
|
+
(o) => {
|
|
18
23
|
var e, t;
|
|
19
|
-
return ((e =
|
|
20
|
-
id:
|
|
21
|
-
label: ((t =
|
|
24
|
+
return ((e = o.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
|
|
25
|
+
id: o.uid,
|
|
26
|
+
label: ((t = o.info) == null ? void 0 : t.title) ?? "Unititled Collection"
|
|
22
27
|
};
|
|
23
28
|
}
|
|
24
29
|
)
|
|
25
|
-
),
|
|
30
|
+
), a = p(
|
|
26
31
|
s.metaData ? i.value.find(
|
|
27
|
-
(
|
|
32
|
+
(o) => {
|
|
28
33
|
var e, t;
|
|
29
|
-
return
|
|
34
|
+
return o.id === ((e = s.metaData) == null ? void 0 : e.itemUid) || o.id === ((t = s.metaData) == null ? void 0 : t.parentUid);
|
|
30
35
|
}
|
|
31
36
|
) : i.value.find(
|
|
32
|
-
(
|
|
37
|
+
(o) => {
|
|
33
38
|
var e;
|
|
34
|
-
return
|
|
39
|
+
return o.id === ((e = S.value) == null ? void 0 : e.uid);
|
|
35
40
|
}
|
|
36
41
|
)
|
|
37
|
-
),
|
|
42
|
+
), w = () => {
|
|
38
43
|
var t;
|
|
39
44
|
if (!r.value.trim()) {
|
|
40
45
|
v("Please enter a valid url before creating a server.", "error");
|
|
41
46
|
return;
|
|
42
47
|
}
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
48
|
+
const o = U[((t = a.value) == null ? void 0 : t.id) ?? ""];
|
|
49
|
+
if (!o) {
|
|
45
50
|
v("Please select a collection before creating a server.", "error");
|
|
46
51
|
return;
|
|
47
52
|
}
|
|
48
|
-
const e =
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
53
|
+
const e = g.add({ url: r.value }, o.uid);
|
|
54
|
+
V.edit(o.uid, "selectedServerUid", e.uid), m("close");
|
|
55
|
+
}, y = () => {
|
|
56
|
+
D.commandPalette.emit({ commandName: "Create Collection" });
|
|
52
57
|
};
|
|
53
|
-
return (
|
|
54
|
-
disabled: !r.value.trim() || !
|
|
55
|
-
onSubmit:
|
|
58
|
+
return (o, e) => (u(), c(E, {
|
|
59
|
+
disabled: !r.value.trim() || !a.value,
|
|
60
|
+
onSubmit: w
|
|
56
61
|
}, {
|
|
57
|
-
options:
|
|
58
|
-
|
|
59
|
-
modelValue:
|
|
60
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) =>
|
|
62
|
+
options: l(() => [
|
|
63
|
+
d(n(M), {
|
|
64
|
+
modelValue: a.value,
|
|
65
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => a.value = t),
|
|
61
66
|
options: i.value
|
|
62
67
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
i.value.length > 0 ? (u(),
|
|
68
|
+
default: l(() => [
|
|
69
|
+
i.value.length > 0 ? (u(), c(n(b), {
|
|
65
70
|
key: 0,
|
|
66
|
-
class: "
|
|
71
|
+
class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
|
|
67
72
|
variant: "outlined"
|
|
68
73
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
|
|
71
|
-
class: P(
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
+
default: l(() => [
|
|
75
|
+
f("span", {
|
|
76
|
+
class: P(a.value ? "text-c-1" : "text-c-3")
|
|
77
|
+
}, B(a.value ? a.value.label : "Select Collection"), 3),
|
|
78
|
+
d(n(T), {
|
|
74
79
|
class: "text-c-3",
|
|
75
80
|
icon: "ChevronDown",
|
|
76
81
|
size: "md"
|
|
77
82
|
})
|
|
78
83
|
]),
|
|
79
84
|
_: 1
|
|
80
|
-
})) : (u(),
|
|
85
|
+
})) : (u(), c(n(b), {
|
|
81
86
|
key: 1,
|
|
82
|
-
class: "
|
|
87
|
+
class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
|
|
83
88
|
variant: "outlined",
|
|
84
|
-
onClick:
|
|
89
|
+
onClick: y
|
|
85
90
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
|
|
91
|
+
default: l(() => e[3] || (e[3] = [
|
|
92
|
+
f("span", { class: "text-c-1" }, "Create Collection", -1)
|
|
88
93
|
])),
|
|
89
94
|
_: 1
|
|
90
95
|
}))
|
|
@@ -92,16 +97,16 @@ const F = /* @__PURE__ */ y({
|
|
|
92
97
|
_: 1
|
|
93
98
|
}, 8, ["modelValue", "options"])
|
|
94
99
|
]),
|
|
95
|
-
submit:
|
|
96
|
-
|
|
100
|
+
submit: l(() => e[4] || (e[4] = [
|
|
101
|
+
L(" Create Server ")
|
|
97
102
|
])),
|
|
98
|
-
default:
|
|
99
|
-
|
|
103
|
+
default: l(() => [
|
|
104
|
+
d(R, {
|
|
100
105
|
modelValue: r.value,
|
|
101
106
|
"onUpdate:modelValue": e[0] || (e[0] = (t) => r.value = t),
|
|
102
107
|
label: "Server URL",
|
|
103
108
|
placeholder: "Server URL",
|
|
104
|
-
onOnDelete: e[1] || (e[1] = (t) =>
|
|
109
|
+
onOnDelete: e[1] || (e[1] = (t) => m("back", t))
|
|
105
110
|
}, null, 8, ["modelValue"])
|
|
106
111
|
]),
|
|
107
112
|
_: 1
|
|
@@ -109,5 +114,5 @@ const F = /* @__PURE__ */ y({
|
|
|
109
114
|
}
|
|
110
115
|
});
|
|
111
116
|
export {
|
|
112
|
-
|
|
117
|
+
G as default
|
|
113
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteTag.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteTag.vue"],"names":[],"mappings":";;;;;;;AAwRA,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as g, computed as x, ref as m, openBlock as C, createBlock as V, withCtx as n, createVNode as i, unref as s, createElementVNode as S, normalizeClass as _, toDisplayString as k, createTextVNode as T } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ScalarListbox as N, ScalarButton as w, ScalarIcon as B } from "@scalar/components";
|
|
3
|
+
import { useToasts as D } from "@scalar/use-toasts";
|
|
4
|
+
import { useActiveEntities as y } from "../../store/active-entities.js";
|
|
5
5
|
import z from "./CommandActionForm.vue.js";
|
|
6
6
|
import E from "./CommandActionInput.vue.js";
|
|
7
7
|
import { useWorkspace as P } from "../../store/store.js";
|
|
@@ -9,7 +9,7 @@ const O = /* @__PURE__ */ g({
|
|
|
9
9
|
__name: "CommandPaletteTag",
|
|
10
10
|
emits: ["close", "back"],
|
|
11
11
|
setup(U, { emit: d }) {
|
|
12
|
-
const r = d, { activeWorkspaceCollections: c, activeCollection: p } =
|
|
12
|
+
const r = d, { activeWorkspaceCollections: c, activeCollection: p } = y(), { tagMutators: f } = P(), { toast: v } = D(), u = x(
|
|
13
13
|
() => c.value.map((o) => {
|
|
14
14
|
var e;
|
|
15
15
|
return {
|
|
@@ -42,21 +42,21 @@ const O = /* @__PURE__ */ g({
|
|
|
42
42
|
onSubmit: b
|
|
43
43
|
}, {
|
|
44
44
|
options: n(() => [
|
|
45
|
-
i(s(
|
|
45
|
+
i(s(N), {
|
|
46
46
|
modelValue: t.value,
|
|
47
47
|
"onUpdate:modelValue": e[2] || (e[2] = (l) => t.value = l),
|
|
48
48
|
options: u.value
|
|
49
49
|
}, {
|
|
50
50
|
default: n(() => [
|
|
51
|
-
i(s(
|
|
52
|
-
class: "
|
|
51
|
+
i(s(w), {
|
|
52
|
+
class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
|
|
53
53
|
variant: "outlined"
|
|
54
54
|
}, {
|
|
55
55
|
default: n(() => [
|
|
56
56
|
S("span", {
|
|
57
57
|
class: _(t.value ? "text-c-1" : "text-c-3")
|
|
58
58
|
}, k(t.value ? t.value.label : "Select Collection"), 3),
|
|
59
|
-
i(s(
|
|
59
|
+
i(s(B), {
|
|
60
60
|
class: "text-c-3",
|
|
61
61
|
icon: "ChevronDown",
|
|
62
62
|
size: "md"
|
|
@@ -69,7 +69,7 @@ const O = /* @__PURE__ */ g({
|
|
|
69
69
|
}, 8, ["modelValue", "options"])
|
|
70
70
|
]),
|
|
71
71
|
submit: n(() => e[3] || (e[3] = [
|
|
72
|
-
T("Create Tag")
|
|
72
|
+
T(" Create Tag ")
|
|
73
73
|
])),
|
|
74
74
|
default: n(() => [
|
|
75
75
|
i(E, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA9f9B,
|
|
1
|
+
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA9f9B,CA/OuC;qBA+OvC,CA9Oc;;;;;;;mBA8Od,CA/OuC;qBA+OvC,CA9Oc;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAovBJ,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAIpC,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAC;AAeJ,iBAAS,cAAc;WAgDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;QAhFZ,MAAM,GAAG,SAAS;6EAuFzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAepG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as t, openBlock as o, createBlock as l, resolveDynamicComponent as
|
|
1
|
+
import { defineComponent as t, openBlock as o, createBlock as l, resolveDynamicComponent as a, mergeProps as s, unref as n, withCtx as p, renderSlot as m } from "vue";
|
|
2
2
|
import { useBindCx as d } from "@scalar/components";
|
|
3
|
-
const
|
|
3
|
+
const u = /* @__PURE__ */ t({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "DataTableCell",
|
|
6
6
|
props: {
|
|
@@ -8,19 +8,22 @@ const b = /* @__PURE__ */ t({
|
|
|
8
8
|
},
|
|
9
9
|
setup(i) {
|
|
10
10
|
const { cx: r } = d();
|
|
11
|
-
return (e,
|
|
12
|
-
|
|
11
|
+
return (e, b) => (o(), l(a(e.is), s(
|
|
12
|
+
n(r)(
|
|
13
13
|
"max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
|
|
14
14
|
),
|
|
15
|
-
{
|
|
15
|
+
{
|
|
16
|
+
class: "group-[.alert]:bg-b-alert",
|
|
17
|
+
role: "cell"
|
|
18
|
+
}
|
|
16
19
|
), {
|
|
17
|
-
default:
|
|
18
|
-
|
|
20
|
+
default: p(() => [
|
|
21
|
+
m(e.$slots, "default")
|
|
19
22
|
]),
|
|
20
23
|
_: 3
|
|
21
24
|
}, 16));
|
|
22
25
|
}
|
|
23
26
|
});
|
|
24
27
|
export {
|
|
25
|
-
|
|
28
|
+
u as default
|
|
26
29
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { EnvVariable } from '../../store/active-entities';
|
|
1
2
|
import type { VueClassProp } from '../../types/vue';
|
|
3
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
4
|
+
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
2
5
|
type __VLS_Props = {
|
|
3
6
|
id?: string;
|
|
4
7
|
type?: string | undefined;
|
|
@@ -12,6 +15,9 @@ type __VLS_Props = {
|
|
|
12
15
|
enum?: string[];
|
|
13
16
|
min?: number;
|
|
14
17
|
max?: number;
|
|
18
|
+
environment: Environment;
|
|
19
|
+
envVariables: EnvVariable[];
|
|
20
|
+
workspace: Workspace;
|
|
15
21
|
};
|
|
16
22
|
declare function __VLS_template(): {
|
|
17
23
|
attrs: Partial<{}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"AA0KA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAwCJ,iBAAS,cAAc;WA4OT,OAAO,IAA6B;;yBAVrB,GAAG;yBACF,GAAG;sBACN,GAAG;;;;EAa7B;AAkBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cAvTN,OAAO;2BAGM,OAAO;cACpB,OAAO;6EA2TpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAepG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "./DataTableInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-cb0ff5b1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as w, ref as m, computed as b, openBlock as l, createBlock as u, normalizeClass as k, withCtx as g, createElementBlock as
|
|
1
|
+
import { defineComponent as w, ref as m, computed as b, openBlock as l, createBlock as u, normalizeClass as k, withCtx as g, createElementBlock as s, renderSlot as i, createTextVNode as B, createCommentVNode as d, createElementVNode as C, Fragment as $, mergeProps as f, unref as h } from "vue";
|
|
2
2
|
import q from "../CodeInput/CodeInput.vue.js";
|
|
3
3
|
import { ScalarIconButton as O } from "@scalar/components";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
4
|
+
import A from "./DataTableCell.vue.js";
|
|
5
|
+
import I from "./DataTableInputSelect.vue.js";
|
|
6
|
+
const E = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-c-1 flex items-center pl-3 pr-0"
|
|
9
|
-
},
|
|
9
|
+
}, F = { class: "row-1 overflow-x-auto" }, S = ["readOnly", "type", "value"], T = {
|
|
10
10
|
key: 2,
|
|
11
11
|
class: "scalar-input-required absolute centered-y right-2 pt-px text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[:focus-visible]:opacity-0"
|
|
12
|
-
},
|
|
12
|
+
}, x = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "absolute centered-y right-7 text-orange text-xs"
|
|
15
15
|
}, z = /* @__PURE__ */ w({
|
|
@@ -25,32 +25,35 @@ const I = {
|
|
|
25
25
|
readOnly: { type: Boolean, default: !1 },
|
|
26
26
|
enum: {},
|
|
27
27
|
min: {},
|
|
28
|
-
max: {}
|
|
28
|
+
max: {},
|
|
29
|
+
environment: {},
|
|
30
|
+
envVariables: {},
|
|
31
|
+
workspace: {}
|
|
29
32
|
},
|
|
30
33
|
emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
+
setup(v, { emit: y }) {
|
|
35
|
+
const t = v, r = y, n = m(!0), c = m(!1), V = () => {
|
|
36
|
+
c.value || r("inputBlur");
|
|
34
37
|
}, p = b(
|
|
35
|
-
() =>
|
|
38
|
+
() => t.type === "password" ? n.value ? "password" : "text" : t.type ?? "text"
|
|
36
39
|
);
|
|
37
|
-
return (e,
|
|
40
|
+
return (e, a) => (l(), u(A, {
|
|
38
41
|
class: k(["relative row", e.containerClass])
|
|
39
42
|
}, {
|
|
40
43
|
default: g(() => [
|
|
41
|
-
e.$slots.default ? (l(),
|
|
44
|
+
e.$slots.default ? (l(), s("div", E, [
|
|
42
45
|
i(e.$slots, "default", {}, void 0, !0),
|
|
43
|
-
|
|
46
|
+
a[5] || (a[5] = B(": "))
|
|
44
47
|
])) : d("", !0),
|
|
45
|
-
C("div",
|
|
46
|
-
|
|
48
|
+
C("div", F, [
|
|
49
|
+
t.enum && t.enum.length ? (l(), u(I, {
|
|
47
50
|
key: 0,
|
|
48
|
-
canAddCustomValue:
|
|
49
|
-
modelValue:
|
|
50
|
-
value:
|
|
51
|
-
"onUpdate:modelValue":
|
|
52
|
-
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (l(),
|
|
53
|
-
n.value && e.type === "password" ? (l(),
|
|
51
|
+
canAddCustomValue: t.canAddCustomEnumValue,
|
|
52
|
+
modelValue: t.modelValue,
|
|
53
|
+
value: t.enum,
|
|
54
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => r("update:modelValue", o))
|
|
55
|
+
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (l(), s($, { key: 1 }, [
|
|
56
|
+
n.value && e.type === "password" ? (l(), s("input", f({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
|
|
54
57
|
autocomplete: "off",
|
|
55
58
|
class: "border-none text-c-1 disabled:text-c-2 min-w-0 w-full peer px-2 py-1.25 -outline-offset-2",
|
|
56
59
|
"data-1p-ignore": "",
|
|
@@ -58,15 +61,17 @@ const I = {
|
|
|
58
61
|
spellcheck: "false",
|
|
59
62
|
type: p.value,
|
|
60
63
|
value: e.modelValue,
|
|
61
|
-
onInput:
|
|
64
|
+
onInput: a[1] || (a[1] = (o) => r(
|
|
62
65
|
"update:modelValue",
|
|
63
66
|
o.target.value ?? ""
|
|
64
67
|
))
|
|
65
|
-
}), null, 16,
|
|
68
|
+
}), null, 16, S)) : (l(), u(q, f({ key: 1 }, e.$attrs, {
|
|
66
69
|
id: e.id,
|
|
67
70
|
class: "border-none text-c-1 disabled:text-c-2 min-w-0 w-full peer",
|
|
68
71
|
disableCloseBrackets: "",
|
|
69
72
|
disableTabIndent: "",
|
|
73
|
+
envVariables: e.envVariables,
|
|
74
|
+
environment: e.environment,
|
|
70
75
|
max: e.max,
|
|
71
76
|
min: e.min,
|
|
72
77
|
modelValue: e.modelValue ?? "",
|
|
@@ -74,14 +79,15 @@ const I = {
|
|
|
74
79
|
required: !!e.required,
|
|
75
80
|
spellcheck: "false",
|
|
76
81
|
type: p.value,
|
|
82
|
+
workspace: e.workspace,
|
|
77
83
|
onBlur: V,
|
|
78
|
-
onFocus:
|
|
79
|
-
"onUpdate:modelValue":
|
|
80
|
-
}), null, 16, ["id", "max", "min", "modelValue", "readOnly", "required", "type"])),
|
|
81
|
-
e.required ? (l(),
|
|
84
|
+
onFocus: a[2] || (a[2] = (o) => r("inputFocus")),
|
|
85
|
+
"onUpdate:modelValue": a[3] || (a[3] = (o) => r("update:modelValue", o))
|
|
86
|
+
}), null, 16, ["id", "envVariables", "environment", "max", "min", "modelValue", "readOnly", "required", "type", "workspace"])),
|
|
87
|
+
e.required ? (l(), s("div", T, " Required ")) : d("", !0)
|
|
82
88
|
], 64))
|
|
83
89
|
]),
|
|
84
|
-
e.$slots.warning ? (l(),
|
|
90
|
+
e.$slots.warning ? (l(), s("div", x, [
|
|
85
91
|
i(e.$slots, "warning", {}, void 0, !0)
|
|
86
92
|
])) : d("", !0),
|
|
87
93
|
i(e.$slots, "icon", {}, void 0, !0),
|
|
@@ -90,7 +96,7 @@ const I = {
|
|
|
90
96
|
class: "-ml-.5 mr-0.75 h-6 w-6 self-center p-1.5",
|
|
91
97
|
icon: n.value ? "Show" : "Hide",
|
|
92
98
|
label: n.value ? "Show Password" : "Hide Password",
|
|
93
|
-
onClick:
|
|
99
|
+
onClick: a[4] || (a[4] = (o) => n.value = !n.value)
|
|
94
100
|
}, null, 8, ["icon", "label"])) : d("", !0)
|
|
95
101
|
]),
|
|
96
102
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputSelect.vue"],"names":[],"mappings":"AA4LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAC;;;;;;uBAFoB,OAAO;;
|
|
1
|
+
{"version":3,"file":"DataTableInputSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputSelect.vue"],"names":[],"mappings":"AA4LA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAC;;;;;;uBAFoB,OAAO;;AA2W/B,wBASG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as O, computed as m, ref as w, watch as
|
|
1
|
+
import { defineComponent as O, computed as m, ref as w, watch as S, nextTick as E, openBlock as o, createElementBlock as f, createBlock as v, unref as a, withCtx as u, createVNode as n, createElementVNode as d, toDisplayString as y, withDirectives as K, withKeys as M, vModelText as R, Fragment as C, renderList as U, normalizeClass as W, createTextVNode as $, createCommentVNode as _ } from "vue";
|
|
2
2
|
import { ScalarComboboxMultiselect as F, ScalarButton as b, ScalarIcon as h, ScalarDropdown as L, ScalarDropdownItem as D, ScalarDropdownDivider as q } from "@scalar/components";
|
|
3
|
-
const G = { class: "
|
|
3
|
+
const G = { class: "group-[.alert]:outline-orange w-full pr-4 -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline" }, H = { class: "text-c-1 whitespace-nowrap" }, J = { class: "text-c-1" }, P = { class: "flex h-4 w-4 items-center justify-center" }, Z = /* @__PURE__ */ O({
|
|
4
4
|
__name: "DataTableInputSelect",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: {},
|
|
@@ -12,23 +12,23 @@ const G = { class: "pr-4 w-full has-[:focus-visible]:outline has-[:focus-visible
|
|
|
12
12
|
emits: ["update:modelValue"],
|
|
13
13
|
setup(B, { emit: j }) {
|
|
14
14
|
const s = B, c = j, p = m(() => s.value ?? []), i = w(!1), r = w(""), x = w(null);
|
|
15
|
-
|
|
15
|
+
S(r, (e) => {
|
|
16
16
|
c("update:modelValue", e);
|
|
17
17
|
});
|
|
18
|
-
const
|
|
18
|
+
const g = (e) => {
|
|
19
19
|
c("update:modelValue", e), i.value = !1;
|
|
20
20
|
}, z = () => {
|
|
21
|
-
r.value.trim() &&
|
|
21
|
+
r.value.trim() && g(r.value);
|
|
22
22
|
}, A = () => {
|
|
23
23
|
r.value.trim() || c("update:modelValue", ""), i.value = !1;
|
|
24
24
|
}, N = (e) => s.modelValue.toString() === e;
|
|
25
|
-
|
|
25
|
+
S(i, (e) => {
|
|
26
26
|
e && E(() => {
|
|
27
27
|
var t;
|
|
28
28
|
(t = x.value) == null || t.focus();
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
|
-
const
|
|
31
|
+
const k = m(() => s.modelValue !== void 0 ? s.modelValue : s.default), V = m(() => {
|
|
32
32
|
const e = new Set(s.modelValue.toString().split(", "));
|
|
33
33
|
return p.value.filter((t) => e.has(t)).map((t) => ({ id: t, label: t, value: t }));
|
|
34
34
|
}), T = m(
|
|
@@ -46,7 +46,7 @@ const G = { class: "pr-4 w-full has-[:focus-visible]:outline has-[:focus-visible
|
|
|
46
46
|
}, {
|
|
47
47
|
default: u(() => [
|
|
48
48
|
n(a(b), {
|
|
49
|
-
class: "
|
|
49
|
+
class: "custom-scroll h-full justify-start gap-1.5 px-2 py-1.5 pr-6 font-normal outline-none",
|
|
50
50
|
fullWidth: "",
|
|
51
51
|
variant: "ghost"
|
|
52
52
|
}, {
|
|
@@ -66,7 +66,7 @@ const G = { class: "pr-4 w-full has-[:focus-visible]:outline has-[:focus-visible
|
|
|
66
66
|
ref_key: "inputRef",
|
|
67
67
|
ref: x,
|
|
68
68
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => r.value = l),
|
|
69
|
-
class: "
|
|
69
|
+
class: "text-c-1 w-full min-w-0 border-none px-2 py-1.5 outline-none",
|
|
70
70
|
placeholder: "Value",
|
|
71
71
|
type: "text",
|
|
72
72
|
onBlur: A,
|
|
@@ -76,19 +76,19 @@ const G = { class: "pr-4 w-full has-[:focus-visible]:outline has-[:focus-visible
|
|
|
76
76
|
]) : (o(), v(a(L), {
|
|
77
77
|
key: 2,
|
|
78
78
|
resize: "",
|
|
79
|
-
value:
|
|
79
|
+
value: k.value
|
|
80
80
|
}, {
|
|
81
81
|
items: u(() => [
|
|
82
82
|
(o(!0), f(C, null, U(p.value, (l) => (o(), v(a(D), {
|
|
83
83
|
key: l,
|
|
84
|
-
class: "flex gap-1.5
|
|
84
|
+
class: "group/item flex items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
85
85
|
value: l,
|
|
86
|
-
onClick: (Q) =>
|
|
86
|
+
onClick: (Q) => g(l)
|
|
87
87
|
}, {
|
|
88
88
|
default: u(() => [
|
|
89
89
|
d("div", {
|
|
90
90
|
class: W([
|
|
91
|
-
"flex items-center justify-center rounded-full p-[3px]
|
|
91
|
+
"flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
|
|
92
92
|
N(l) ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
|
|
93
93
|
])
|
|
94
94
|
}, [
|
|
@@ -123,12 +123,12 @@ const G = { class: "pr-4 w-full has-[:focus-visible]:outline has-[:focus-visible
|
|
|
123
123
|
]),
|
|
124
124
|
default: u(() => [
|
|
125
125
|
n(a(b), {
|
|
126
|
-
class: "gap-1.5
|
|
126
|
+
class: "h-full justify-start gap-1.5 overflow-auto whitespace-nowrap px-2 py-1.5 font-normal outline-none",
|
|
127
127
|
fullWidth: "",
|
|
128
128
|
variant: "ghost"
|
|
129
129
|
}, {
|
|
130
130
|
default: u(() => [
|
|
131
|
-
d("span", J, y(
|
|
131
|
+
d("span", J, y(k.value || "Select a value"), 1),
|
|
132
132
|
n(a(h), {
|
|
133
133
|
icon: "ChevronDown",
|
|
134
134
|
size: "md"
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Cookie } from '@scalar/oas-utils/entities/cookie';
|
|
2
|
+
import type { Path, PathValue } from '@scalar/object-utils/nested';
|
|
1
3
|
type __VLS_Props = {
|
|
2
4
|
title?: string;
|
|
3
5
|
options: {
|
|
@@ -6,7 +8,7 @@ type __VLS_Props = {
|
|
|
6
8
|
placeholder: string;
|
|
7
9
|
}[];
|
|
8
10
|
data: Record<string, any>;
|
|
9
|
-
onUpdate: (key:
|
|
11
|
+
onUpdate: <P extends Path<Cookie>>(key: P, value: NonNullable<PathValue<Cookie, P>>) => void;
|
|
10
12
|
};
|
|
11
13
|
declare function __VLS_template(): {
|
|
12
14
|
attrs: Partial<{}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAUlE,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,WAAW,EAAE,MAAM,CAAA;KACpB,EAAE,CAAA;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzB,QAAQ,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,EAC/B,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KACrC,IAAI,CAAA;CACV,CAAC;AAWF,iBAAS,cAAc;WAwGT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|