@scalar/api-client 2.5.32 → 2.5.33
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 +20 -0
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +120 -128
- package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +57 -63
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +143 -150
- package/dist/components/CodeInput/codeVariableWidget.js +70 -75
- package/dist/components/CommandPalette/CommandActionInput.vue.js +17 -19
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -27
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +53 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +129 -133
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +84 -98
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +64 -74
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -11
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +164 -183
- 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 +31 -31
- package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -2
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +75 -84
- package/dist/components/Form/LabelInput.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +11 -11
- package/dist/components/ImportCollection/DropEventListener.vue.js +42 -44
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -23
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +141 -149
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +22 -23
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +12 -13
- package/dist/components/ImportCollection/PasteEventListener.vue.js +11 -12
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +69 -76
- package/dist/components/ImportCollection/utils/get-openapi-version.js +8 -8
- package/dist/components/ImportCollection/utils/import-collection.js +14 -14
- package/dist/components/OpenApiClientButton.vue.js +1 -1
- package/dist/components/OpenApiClientButton.vue2.js +10 -10
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +19 -22
- package/dist/components/Search/useSearch.js +51 -61
- package/dist/components/SectionFilter.vue.js +1 -1
- package/dist/components/SectionFilter.vue2.js +26 -29
- package/dist/components/Server/ServerDropdown.vue.js +70 -96
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +57 -67
- package/dist/components/Server/ServerSelector.vue.js +44 -55
- package/dist/components/Server/ServerVariablesForm.vue.js +36 -42
- package/dist/components/Server/ServerVariablesSelect.vue.js +6 -6
- package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.js +68 -74
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue.js +107 -122
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/hooks/useFileDialog.js +12 -12
- package/dist/hooks/useResponseBody.js +14 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.js +50 -56
- package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
- package/dist/layouts/App/create-api-client-app.js +19 -20
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +18 -21
- package/dist/layouts/Web/ApiClientWeb.vue.js +45 -51
- package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
- package/dist/layouts/Web/create-api-client-web.js +19 -20
- package/dist/layouts/Web/index.js +1 -1
- package/dist/libs/create-client.js +102 -109
- package/dist/libs/env-helpers.js +3 -3
- package/dist/libs/event-bus.js +15 -15
- package/dist/libs/extractAttachmentFilename.js +5 -6
- package/dist/libs/find-request.js +9 -10
- package/dist/libs/get-request-uid-by-path-method.js +12 -12
- package/dist/libs/getOpenApiDocumentDetails.js +7 -7
- package/dist/libs/importers/curl.js +3 -3
- package/dist/libs/normalize-headers.js +9 -10
- package/dist/libs/postman.js +15 -17
- package/dist/libs/send-request/build-request-security.js +9 -10
- package/dist/libs/send-request/create-fetch-body.js +11 -12
- package/dist/libs/send-request/create-fetch-query-params.js +13 -13
- package/dist/libs/send-request/create-request-operation.js +83 -84
- package/dist/libs/send-request/decode-buffer.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +12 -12
- package/dist/libs/string-template.js +21 -21
- package/dist/libs/validate-parameters.js +5 -8
- package/dist/plugins/plugin-manager.js +11 -17
- package/dist/store/active-entities.js +90 -117
- package/dist/store/collections.js +41 -42
- package/dist/store/import-spec.js +25 -26
- package/dist/store/request-example.js +20 -24
- package/dist/store/requests.js +63 -81
- package/dist/store/router-params.js +7 -7
- package/dist/store/security-schemes.js +35 -36
- package/dist/store/store.js +2 -2
- package/dist/store/tags.js +20 -21
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue2.js +21 -22
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue2.js +43 -47
- package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue2.js +196 -207
- package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue2.js +34 -41
- package/dist/views/Collection/CollectionNavigation.vue.js +116 -125
- package/dist/views/Collection/CollectionOverview.vue2.js +22 -25
- package/dist/views/Collection/CollectionServerForm.vue.js +39 -45
- package/dist/views/Collection/CollectionServers.vue2.js +88 -98
- package/dist/views/Collection/CollectionSettings.vue.js +1 -1
- package/dist/views/Collection/CollectionSettings.vue2.js +101 -108
- package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +141 -145
- package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -2
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -15
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +15 -16
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +61 -64
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +9 -10
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +90 -93
- package/dist/views/Environment/Environment.vue2.js +267 -295
- package/dist/views/Environment/EnvironmentModal.vue.js +63 -70
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -42
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +60 -67
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +78 -89
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +37 -44
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -45
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -127
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +120 -139
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +97 -97
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +287 -310
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +86 -94
- package/dist/views/Request/RequestSection/RequestParams.vue.js +37 -38
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +36 -38
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +28 -31
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +49 -52
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +16 -16
- package/dist/views/Request/RequestSection/helpers/getting-started.js +7 -11
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +7 -8
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +199 -211
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +332 -349
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +210 -240
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +58 -64
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -2
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +20 -23
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +29 -30
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +28 -29
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +128 -140
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +116 -124
- package/dist/views/Request/consts/mediaTypes.js +2 -3
- package/dist/views/Request/handle-drag.js +24 -28
- package/dist/views/Request/hooks/useOpenApiWatcher.js +26 -33
- package/dist/views/Request/libs/auth.js +37 -43
- package/dist/views/Request/libs/oauth2.js +30 -32
- package/dist/views/Request/libs/watch-mode.js +100 -103
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -236
- package/package.json +22 -22
- package/dist/components/AddressBar/AddressBar.vue3.js +0 -4
- package/dist/components/AddressBar/AddressBarHistory.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue4.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +0 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue3.js +0 -4
- package/dist/components/DataTable/DataTableInput.vue3.js +0 -4
- package/dist/components/EmptyState.vue3.js +0 -4
- package/dist/components/Form/LabelInput.vue3.js +0 -4
- package/dist/components/HttpMethod/HttpMethod.vue3.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
- package/dist/components/OpenApiClientButton.vue3.js +0 -4
- package/dist/components/ScalarAsciiArt.vue3.js +0 -4
- package/dist/components/SectionFilter.vue3.js +0 -4
- package/dist/components/Server/ServerDropdownItem.vue3.js +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue3.js +0 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue4.js +0 -4
- package/dist/components/TopNav/TopNavItem.vue3.js +0 -4
- package/dist/layouts/App/ApiClientApp.vue2.js +0 -4
- package/dist/layouts/Modal/ApiClientModal.vue3.js +0 -4
- package/dist/layouts/Web/ApiClientWeb.vue2.js +0 -4
- package/dist/style.css.js +0 -4
- package/dist/views/Collection/CollectionAuthentication.vue3.js +0 -4
- package/dist/views/Collection/CollectionEnvironment.vue3.js +0 -4
- package/dist/views/Collection/CollectionInfoForm.vue3.js +0 -4
- package/dist/views/Collection/CollectionSettings.vue3.js +0 -4
- package/dist/views/Collection/components/EnvironmentForm.vue3.js +0 -4
- package/dist/views/Collection/components/MarkdownInput.vue3.js +0 -4
- package/dist/views/Cookies/CookieModal.vue3.js +0 -4
- package/dist/views/Request/Request.vue3.js +0 -4
- package/dist/views/Request/RequestRoot.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestBody.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +0 -4
- package/dist/views/Request/RequestSidebar.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue4.js +0 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue3.js +0 -4
- package/dist/views/Request/RequestSubpageHeader.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +0 -4
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Dialog as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import { ROUTES as
|
|
6
|
-
import { importCurlCommand as
|
|
7
|
-
import { PathId as
|
|
8
|
-
import { useActiveEntities as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { useWorkspace as
|
|
17
|
-
const
|
|
1
|
+
import { defineComponent as ee, ref as f, computed as z, watch as te, onMounted as oe, onBeforeUnmount as ne, createBlock as N, openBlock as l, unref as i, withCtx as R, createElementVNode as v, createVNode as k, createElementBlock as c, createTextVNode as U, createCommentVNode as ae, withKeys as A, withModifiers as S, Fragment as T, renderList as V, withDirectives as le, toDisplayString as O, vShow as re, normalizeClass as se, resolveDynamicComponent as me, mergeProps as ie, nextTick as g } from "vue";
|
|
2
|
+
import { Dialog as ce, DialogPanel as ue, DialogTitle as de } from "@headlessui/vue";
|
|
3
|
+
import { useModal as pe, ScalarIcon as D } from "@scalar/components";
|
|
4
|
+
import { useRouter as fe } from "vue-router";
|
|
5
|
+
import { ROUTES as ve } from "../../constants.js";
|
|
6
|
+
import { importCurlCommand as Ce } from "../../libs/importers/curl.js";
|
|
7
|
+
import { PathId as L } from "../../routes.js";
|
|
8
|
+
import { useActiveEntities as he } from "../../store/active-entities.js";
|
|
9
|
+
import ke from "./CommandPaletteCollection.vue.js";
|
|
10
|
+
import xe from "./CommandPaletteExample.vue.js";
|
|
11
|
+
import _e from "./CommandPaletteImport.vue.js";
|
|
12
|
+
import ye from "./CommandPaletteImportCurl.vue.js";
|
|
13
|
+
import ge from "./CommandPaletteServer.vue.js";
|
|
14
|
+
import be from "./CommandPaletteTag.vue.js";
|
|
15
|
+
import we from "./CommandPaletteWorkspace.vue.js";
|
|
16
|
+
import { useWorkspace as Pe } from "../../store/store.js";
|
|
17
|
+
const Ie = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "custom-scroll max-h-[50dvh] min-h-0 flex-1 rounded-lg p-1.5"
|
|
20
|
-
},
|
|
20
|
+
}, Re = { class: "bg-b-2 focus-within:bg-b-1 sticky top-0 flex items-center rounded-md border border-transparent pl-2 shadow-[0_-8px_0_8px_var(--scalar-background-1),0_0_8px_8px_var(--scalar-background-1)] focus-within:border-(--scalar-background-3)" }, Ae = { for: "commandmenu" }, Se = ["value", "onKeydown"], Te = ["onClick"], De = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "text-c-3 p-2 pt-3 text-center text-sm"
|
|
23
|
-
},
|
|
23
|
+
}, Le = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "flex-1 p-1.5"
|
|
26
|
-
},
|
|
26
|
+
}, Ee = {
|
|
27
27
|
name: "TheCommandPalette"
|
|
28
|
-
},
|
|
29
|
-
"Import from OpenAPI/Swagger/Postman/cURL":
|
|
28
|
+
}, We = {
|
|
29
|
+
"Import from OpenAPI/Swagger/Postman/cURL": _e,
|
|
30
30
|
"Create Request": "",
|
|
31
|
-
"Create Workspace":
|
|
32
|
-
"Add Tag":
|
|
33
|
-
"Add Server":
|
|
34
|
-
"Create Collection":
|
|
35
|
-
"Add Example":
|
|
36
|
-
"Import from cURL":
|
|
37
|
-
},
|
|
38
|
-
...
|
|
39
|
-
setup(
|
|
40
|
-
|
|
41
|
-
const h = he(), w = xe(), { activeWorkspace: l, activeWorkspaceCollections: J, activeCollection: X } = ye(), { events: p, requestMutators: Y } = Se(), q = [
|
|
31
|
+
"Create Workspace": we,
|
|
32
|
+
"Add Tag": be,
|
|
33
|
+
"Add Server": ge,
|
|
34
|
+
"Create Collection": ke,
|
|
35
|
+
"Add Example": xe,
|
|
36
|
+
"Import from cURL": ye
|
|
37
|
+
}, Ye = /* @__PURE__ */ ee({
|
|
38
|
+
...Ee,
|
|
39
|
+
setup(qe) {
|
|
40
|
+
const C = pe(), b = fe(), { activeWorkspace: x, activeWorkspaceCollections: F, activeCollection: G } = he(), { events: u, requestMutators: Q } = Pe(), E = [
|
|
42
41
|
{
|
|
43
42
|
label: "",
|
|
44
43
|
commands: [
|
|
@@ -81,7 +80,7 @@ const Te = {
|
|
|
81
80
|
path: {
|
|
82
81
|
name: "environment.default",
|
|
83
82
|
params: {
|
|
84
|
-
[
|
|
83
|
+
[L.Workspace]: x?.value?.uid ?? "default"
|
|
85
84
|
},
|
|
86
85
|
query: { openEnvironmentModal: "true" }
|
|
87
86
|
}
|
|
@@ -92,7 +91,7 @@ const Te = {
|
|
|
92
91
|
path: {
|
|
93
92
|
name: "cookies.default",
|
|
94
93
|
params: {
|
|
95
|
-
[
|
|
94
|
+
[L.Workspace]: x?.value?.uid ?? "default"
|
|
96
95
|
},
|
|
97
96
|
query: { openCookieModal: "true" }
|
|
98
97
|
}
|
|
@@ -101,216 +100,198 @@ const Te = {
|
|
|
101
100
|
},
|
|
102
101
|
{
|
|
103
102
|
label: "Pages",
|
|
104
|
-
commands:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}).href
|
|
115
|
-
};
|
|
116
|
-
})
|
|
103
|
+
commands: ve.map((e) => ({
|
|
104
|
+
name: e.displayName,
|
|
105
|
+
icon: e.icon,
|
|
106
|
+
path: b.resolve({
|
|
107
|
+
...e.to,
|
|
108
|
+
params: {
|
|
109
|
+
[L.Workspace]: x?.value?.uid ?? "default"
|
|
110
|
+
}
|
|
111
|
+
}).href
|
|
112
|
+
}))
|
|
117
113
|
}
|
|
118
|
-
],
|
|
119
|
-
() =>
|
|
120
|
-
const
|
|
121
|
-
(n) => n.name.toLowerCase().includes(
|
|
114
|
+
], w = f(), r = f(""), s = f(null), m = f(-1), W = f([]), h = z(
|
|
115
|
+
() => E.reduce((e, t) => {
|
|
116
|
+
const o = t.commands.filter(
|
|
117
|
+
(n) => n.name.toLowerCase().includes(r.value.toLowerCase())
|
|
122
118
|
);
|
|
123
|
-
return [...
|
|
119
|
+
return [...e, ...o];
|
|
124
120
|
}, [])
|
|
125
|
-
),
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
w.push(o.path), f();
|
|
136
|
-
else if (o.name === "Create Request") {
|
|
137
|
-
const t = J.value.find(
|
|
138
|
-
(n) => {
|
|
139
|
-
var a;
|
|
140
|
-
return ((a = n.info) == null ? void 0 : a.title) === "Drafts";
|
|
141
|
-
}
|
|
121
|
+
), d = () => {
|
|
122
|
+
C.hide(), r.value = "", s.value = null, m.value = -1;
|
|
123
|
+
}, j = (e) => {
|
|
124
|
+
r.value !== "" && e?.preventDefault(), s.value = null, g(() => _.value?.focus());
|
|
125
|
+
}, q = (e) => {
|
|
126
|
+
if ("path" in e)
|
|
127
|
+
b.push(e.path), d();
|
|
128
|
+
else if (e.name === "Create Request") {
|
|
129
|
+
const t = F.value.find(
|
|
130
|
+
(o) => o.info?.title === "Drafts"
|
|
142
131
|
);
|
|
143
132
|
if (t) {
|
|
144
|
-
const
|
|
145
|
-
|
|
133
|
+
const o = Q.add({}, t.uid);
|
|
134
|
+
o && (b.push({
|
|
146
135
|
name: "request",
|
|
147
136
|
params: {
|
|
148
|
-
workspace:
|
|
149
|
-
request:
|
|
137
|
+
workspace: x.value?.uid,
|
|
138
|
+
request: o.uid
|
|
150
139
|
}
|
|
151
|
-
}),
|
|
152
|
-
|
|
140
|
+
}), d(), g(() => {
|
|
141
|
+
u.hotKeys.emit({
|
|
153
142
|
focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
|
|
154
143
|
});
|
|
155
144
|
}));
|
|
156
145
|
} else
|
|
157
|
-
|
|
146
|
+
d();
|
|
158
147
|
} else
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
commandName:
|
|
162
|
-
metaData:
|
|
148
|
+
s.value = e.name;
|
|
149
|
+
}, _ = f(), M = ({
|
|
150
|
+
commandName: e,
|
|
151
|
+
metaData: t
|
|
163
152
|
} = {}) => {
|
|
164
|
-
|
|
165
|
-
var t;
|
|
166
|
-
return (t = y.value) == null ? void 0 : t.focus();
|
|
167
|
-
});
|
|
153
|
+
s.value = e ?? null, w.value = t, C.show(), g(() => _.value?.focus());
|
|
168
154
|
};
|
|
169
|
-
|
|
170
|
-
|
|
155
|
+
te(r, (e) => {
|
|
156
|
+
e && h.value.length > 0 && (m.value = 0);
|
|
171
157
|
});
|
|
172
|
-
const
|
|
173
|
-
if (!
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
const a = (W = y.value) == null ? void 0 : W.closest(".custom-scroll");
|
|
158
|
+
const B = (e, t) => {
|
|
159
|
+
if (!C.open) return;
|
|
160
|
+
t.preventDefault();
|
|
161
|
+
const o = e === "up" ? -1 : 1, n = h.value.length;
|
|
162
|
+
m.value = (m.value + o + n) % n, g(() => {
|
|
163
|
+
const a = _.value?.closest(".custom-scroll");
|
|
179
164
|
if (!a) return;
|
|
180
|
-
if (
|
|
165
|
+
if (m.value === 0) {
|
|
181
166
|
a.scrollTop = 0;
|
|
182
167
|
return;
|
|
183
168
|
}
|
|
184
|
-
const
|
|
185
|
-
if (!
|
|
186
|
-
const
|
|
187
|
-
|
|
169
|
+
const p = W.value[m.value];
|
|
170
|
+
if (!p) return;
|
|
171
|
+
const y = (a.querySelector(".sticky")?.clientHeight || 0) + 16, K = 6, I = p.offsetTop, $ = I + p.clientHeight, Y = a.scrollTop + y, Z = a.scrollTop + a.clientHeight - K;
|
|
172
|
+
I < Y ? a.scrollTop = I - y : $ > Z && (a.scrollTop = $ - a.clientHeight + K);
|
|
188
173
|
});
|
|
189
|
-
},
|
|
190
|
-
() =>
|
|
191
|
-
),
|
|
192
|
-
!
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
p.commandPalette.emit({
|
|
174
|
+
}, P = z(
|
|
175
|
+
() => h.value[m.value]
|
|
176
|
+
), J = (e) => {
|
|
177
|
+
!P.value || s.value || (e.preventDefault(), e.stopPropagation(), q(P.value));
|
|
178
|
+
}, H = (e) => {
|
|
179
|
+
C.open && e?.closeModal && d();
|
|
180
|
+
}, X = (e) => {
|
|
181
|
+
if (e.trim().toLowerCase().startsWith("curl")) {
|
|
182
|
+
u.commandPalette.emit({
|
|
199
183
|
commandName: "Import from cURL",
|
|
200
184
|
metaData: {
|
|
201
|
-
parsedCurl:
|
|
202
|
-
collectionUid:
|
|
185
|
+
parsedCurl: Ce(e),
|
|
186
|
+
collectionUid: G.value?.uid
|
|
203
187
|
}
|
|
204
188
|
});
|
|
205
189
|
return;
|
|
206
190
|
}
|
|
207
|
-
|
|
191
|
+
r.value = e;
|
|
208
192
|
};
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
}),
|
|
212
|
-
|
|
213
|
-
}), (
|
|
214
|
-
open:
|
|
215
|
-
onClose:
|
|
193
|
+
return oe(() => {
|
|
194
|
+
u.commandPalette.on(M), u.hotKeys.on(H);
|
|
195
|
+
}), ne(() => {
|
|
196
|
+
u.commandPalette.off(M), u.hotKeys.off(H);
|
|
197
|
+
}), (e, t) => (l(), N(i(ce), {
|
|
198
|
+
open: i(C).open,
|
|
199
|
+
onClose: t[5] || (t[5] = (o) => d())
|
|
216
200
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
|
|
219
|
-
k(
|
|
220
|
-
default:
|
|
221
|
-
k(
|
|
222
|
-
default:
|
|
223
|
-
|
|
201
|
+
default: R(() => [
|
|
202
|
+
t[7] || (t[7] = v("div", { class: "commandmenu-overlay z-overlay" }, null, -1)),
|
|
203
|
+
k(i(ue), { class: "commandmenu z-overlay flex flex-col" }, {
|
|
204
|
+
default: R(() => [
|
|
205
|
+
k(i(de), { class: "sr-only" }, {
|
|
206
|
+
default: R(() => t[6] || (t[6] = [
|
|
207
|
+
U("API Client Command Menu")
|
|
224
208
|
])),
|
|
225
209
|
_: 1,
|
|
226
210
|
__: [6]
|
|
227
211
|
}),
|
|
228
|
-
|
|
229
|
-
|
|
212
|
+
s.value ? (l(), c("div", Le, [
|
|
213
|
+
v("button", {
|
|
230
214
|
class: "hover:bg-b-3 text-c-3 active:text-c-1 absolute z-1 mt-[0.5px] rounded p-1.5",
|
|
231
215
|
type: "button",
|
|
232
|
-
onClick:
|
|
216
|
+
onClick: t[3] || (t[3] = (o) => s.value = null)
|
|
233
217
|
}, [
|
|
234
|
-
k(
|
|
218
|
+
k(i(D), {
|
|
235
219
|
icon: "ChevronLeft",
|
|
236
220
|
size: "md",
|
|
237
221
|
thickness: "1.5"
|
|
238
222
|
})
|
|
239
223
|
]),
|
|
240
|
-
(
|
|
241
|
-
onBack:
|
|
242
|
-
onClose:
|
|
224
|
+
(l(), N(me(We[s.value]), ie(w.value ? { metaData: w.value } : {}, {
|
|
225
|
+
onBack: t[4] || (t[4] = (o) => j(o)),
|
|
226
|
+
onClose: d
|
|
243
227
|
}), null, 16))
|
|
244
|
-
])) : (
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
k(
|
|
228
|
+
])) : (l(), c("div", Ie, [
|
|
229
|
+
v("div", Re, [
|
|
230
|
+
v("label", Ae, [
|
|
231
|
+
k(i(D), {
|
|
248
232
|
class: "text-c-2 mr-2.5",
|
|
249
233
|
icon: "Search",
|
|
250
234
|
size: "md",
|
|
251
235
|
thickness: "1.5"
|
|
252
236
|
})
|
|
253
237
|
]),
|
|
254
|
-
|
|
238
|
+
v("input", {
|
|
255
239
|
id: "commandmenu",
|
|
256
240
|
ref_key: "commandInputRef",
|
|
257
|
-
ref:
|
|
241
|
+
ref: _,
|
|
258
242
|
autocomplete: "off",
|
|
259
243
|
autofocus: "",
|
|
260
244
|
class: "w-full rounded border-none bg-none py-1.5 text-sm focus:outline-none",
|
|
261
245
|
placeholder: "Search commands...",
|
|
262
246
|
type: "text",
|
|
263
|
-
value:
|
|
264
|
-
onInput:
|
|
247
|
+
value: r.value,
|
|
248
|
+
onInput: t[0] || (t[0] = (o) => X(o.target.value)),
|
|
265
249
|
onKeydown: [
|
|
266
|
-
|
|
267
|
-
S(
|
|
268
|
-
|
|
250
|
+
t[1] || (t[1] = A(S((o) => B("down", o), ["stop"]), ["down"])),
|
|
251
|
+
A(S(J, ["stop"]), ["enter"]),
|
|
252
|
+
t[2] || (t[2] = A(S((o) => B("up", o), ["stop"]), ["up"]))
|
|
269
253
|
]
|
|
270
|
-
}, null, 40,
|
|
254
|
+
}, null, 40, Se)
|
|
271
255
|
]),
|
|
272
|
-
(
|
|
273
|
-
key:
|
|
256
|
+
(l(), c(T, null, V(E, (o) => (l(), c(T, {
|
|
257
|
+
key: o.label
|
|
274
258
|
}, [
|
|
275
|
-
|
|
259
|
+
le(v("div", { class: "text-c-3 mt-2 mb-1 px-2 text-xs font-medium" }, O(o.label), 513), [
|
|
276
260
|
[
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
(n) => n.name.toLowerCase().includes(
|
|
261
|
+
re,
|
|
262
|
+
o.commands.filter(
|
|
263
|
+
(n) => n.name.toLowerCase().includes(r.value.toLowerCase())
|
|
280
264
|
).length > 0
|
|
281
265
|
]
|
|
282
266
|
]),
|
|
283
|
-
(
|
|
284
|
-
(n) => n.name.toLowerCase().includes(
|
|
285
|
-
), (n) => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
G(" " + j(n.name), 1)
|
|
310
|
-
], 10, qe);
|
|
311
|
-
}), 128))
|
|
267
|
+
(l(!0), c(T, null, V(o.commands.filter(
|
|
268
|
+
(n) => n.name.toLowerCase().includes(r.value.toLowerCase())
|
|
269
|
+
), (n) => (l(), c("div", {
|
|
270
|
+
key: n.name,
|
|
271
|
+
ref_for: !0,
|
|
272
|
+
ref: (a) => {
|
|
273
|
+
if (a) {
|
|
274
|
+
const p = h.value.findIndex(
|
|
275
|
+
(y) => y.name === n.name
|
|
276
|
+
);
|
|
277
|
+
p !== -1 && (W.value[p] = a);
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
class: se(["commandmenu-item hover:bg-b-2 flex cursor-pointer items-center rounded px-2 py-1.5 text-sm", {
|
|
281
|
+
"bg-b-2": n.name === P.value?.name
|
|
282
|
+
}]),
|
|
283
|
+
onClick: (a) => q(n)
|
|
284
|
+
}, [
|
|
285
|
+
k(i(D), {
|
|
286
|
+
class: "text-c-2 mr-2.5",
|
|
287
|
+
icon: n.icon,
|
|
288
|
+
size: "md",
|
|
289
|
+
thickness: "1.5"
|
|
290
|
+
}, null, 8, ["icon"]),
|
|
291
|
+
U(" " + O(n.name), 1)
|
|
292
|
+
], 10, Te))), 128))
|
|
312
293
|
], 64))), 64)),
|
|
313
|
-
|
|
294
|
+
h.value.length ? ae("", !0) : (l(), c("div", De, " No commands found "))
|
|
314
295
|
]))
|
|
315
296
|
]),
|
|
316
297
|
_: 1
|
|
@@ -322,6 +303,6 @@ const Te = {
|
|
|
322
303
|
}
|
|
323
304
|
});
|
|
324
305
|
export {
|
|
325
|
-
|
|
326
|
-
|
|
306
|
+
We as PaletteComponents,
|
|
307
|
+
Ye as default
|
|
327
308
|
};
|
|
@@ -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":"AAwMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK/C,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;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AA0SJ,QAAA,IAAI,OAAO,IAAU,EAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAmC7C,QAAA,MAAM,eAAe;;;;;;;;;;;cA9VN,OAAO;cAIP,OAAO;kBAQH,OAAO;2BATE,OAAO;6EAmWjC,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./DataTableInput.vue2.js";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
const
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ a(t, [["__scopeId", "data-v-46e1ae6e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
1
|
+
import { defineComponent as g, ref as d, computed as B, createBlock as s, openBlock as n, normalizeClass as C, withCtx as $, createElementBlock as i, createCommentVNode as u, createElementVNode as I, renderSlot as p, createTextVNode as O, Fragment as h, mergeProps as c, unref as m } from "vue";
|
|
2
|
+
import { ScalarIconButton as E } from "@scalar/components";
|
|
3
|
+
import { ScalarIconEye as S, ScalarIconEyeSlash as A } from "@scalar/icons";
|
|
3
4
|
import W from "../CodeInput/CodeInput.vue.js";
|
|
4
5
|
import q from "./DataTableCell.vue.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
6
|
+
import F from "./DataTableInputSelect.vue.js";
|
|
7
|
+
const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly", "type", "value"], D = {
|
|
7
8
|
key: 1,
|
|
8
9
|
class: "centered-y text-orange absolute right-7 text-xs"
|
|
9
|
-
},
|
|
10
|
+
}, J = /* @__PURE__ */ g({
|
|
10
11
|
inheritAttrs: !1,
|
|
11
12
|
__name: "DataTableInput",
|
|
12
13
|
props: {
|
|
@@ -27,52 +28,51 @@ const F = ["for"], S = { class: "relative flex min-w-0 flex-1" }, T = ["readOnly
|
|
|
27
28
|
lineWrapping: { type: Boolean, default: !1 }
|
|
28
29
|
},
|
|
29
30
|
emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
|
|
30
|
-
setup(v, { emit:
|
|
31
|
-
const a = v, t =
|
|
31
|
+
setup(v, { emit: V }) {
|
|
32
|
+
const a = v, t = V, r = d(!0), w = d(!1), f = d(null), k = () => {
|
|
32
33
|
w.value || t("inputBlur");
|
|
33
|
-
},
|
|
34
|
+
}, y = B(
|
|
34
35
|
() => a.type === "password" ? "text" : a.type ?? "text"
|
|
35
|
-
),
|
|
36
|
-
|
|
37
|
-
!((e = a.enum) != null && e.length) && !a.readOnly && ((l = m.value) == null || l.focus());
|
|
36
|
+
), b = () => {
|
|
37
|
+
!a.enum?.length && !a.readOnly && f.value?.focus();
|
|
38
38
|
};
|
|
39
|
-
return (e, l) => (n(),
|
|
40
|
-
class:
|
|
39
|
+
return (e, l) => (n(), s(q, {
|
|
40
|
+
class: C(["relative flex", e.containerClass])
|
|
41
41
|
}, {
|
|
42
|
-
default:
|
|
42
|
+
default: $(() => [
|
|
43
43
|
e.$slots.default ? (n(), i("div", {
|
|
44
44
|
key: 0,
|
|
45
45
|
class: "text-c-1 flex items-center pr-0 pl-3",
|
|
46
46
|
for: e.id ?? "",
|
|
47
|
-
onClick:
|
|
47
|
+
onClick: b
|
|
48
48
|
}, [
|
|
49
49
|
p(e.$slots, "default", {}, void 0, !0),
|
|
50
50
|
l[5] || (l[5] = O(": "))
|
|
51
|
-
], 8,
|
|
52
|
-
|
|
53
|
-
a.enum && a.enum.length ? (n(),
|
|
51
|
+
], 8, T)) : u("", !0),
|
|
52
|
+
I("div", N, [
|
|
53
|
+
a.enum && a.enum.length ? (n(), s(F, {
|
|
54
54
|
key: 0,
|
|
55
55
|
canAddCustomValue: a.canAddCustomEnumValue,
|
|
56
56
|
modelValue: a.modelValue,
|
|
57
57
|
value: a.enum,
|
|
58
58
|
"onUpdate:modelValue": l[0] || (l[0] = (o) => t("update:modelValue", o))
|
|
59
|
-
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (n(), i(
|
|
60
|
-
|
|
59
|
+
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (n(), i(h, { key: 1 }, [
|
|
60
|
+
r.value && e.type === "password" ? (n(), i("input", c({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
|
|
61
61
|
autocomplete: "off",
|
|
62
62
|
class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1", { "scalar-password-input": e.type === "password" }],
|
|
63
63
|
"data-1p-ignore": "",
|
|
64
64
|
readOnly: e.readOnly,
|
|
65
65
|
spellcheck: "false",
|
|
66
|
-
type:
|
|
66
|
+
type: y.value,
|
|
67
67
|
value: e.modelValue,
|
|
68
68
|
onInput: l[1] || (l[1] = (o) => t(
|
|
69
69
|
"update:modelValue",
|
|
70
70
|
o.target.value ?? ""
|
|
71
71
|
))
|
|
72
|
-
}), null, 16,
|
|
72
|
+
}), null, 16, P)) : (n(), s(W, c({ key: 1 }, e.$attrs, {
|
|
73
73
|
id: e.id,
|
|
74
74
|
ref_key: "codeInput",
|
|
75
|
-
ref:
|
|
75
|
+
ref: f,
|
|
76
76
|
class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1", [
|
|
77
77
|
e.type === "password" && e.description && "pr-12",
|
|
78
78
|
e.description && "pr-8",
|
|
@@ -90,24 +90,24 @@ const F = ["for"], S = { class: "relative flex min-w-0 flex-1" }, T = ["readOnly
|
|
|
90
90
|
readOnly: e.readOnly,
|
|
91
91
|
required: !!e.required,
|
|
92
92
|
spellcheck: "false",
|
|
93
|
-
type:
|
|
93
|
+
type: y.value,
|
|
94
94
|
workspace: e.workspace,
|
|
95
|
-
onBlur:
|
|
95
|
+
onBlur: k,
|
|
96
96
|
onFocus: l[2] || (l[2] = (o) => t("inputFocus")),
|
|
97
97
|
"onUpdate:modelValue": l[3] || (l[3] = (o) => t("update:modelValue", o))
|
|
98
98
|
}), null, 16, ["id", "class", "description", "envVariables", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type", "workspace"]))
|
|
99
99
|
], 64))
|
|
100
100
|
]),
|
|
101
|
-
e.$slots.warning ? (n(), i("div",
|
|
101
|
+
e.$slots.warning ? (n(), i("div", D, [
|
|
102
102
|
p(e.$slots, "warning", {}, void 0, !0)
|
|
103
103
|
])) : u("", !0),
|
|
104
104
|
p(e.$slots, "icon", {}, void 0, !0),
|
|
105
|
-
e.type === "password" ? (n(),
|
|
105
|
+
e.type === "password" ? (n(), s(m(E), {
|
|
106
106
|
key: 2,
|
|
107
107
|
class: "-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25",
|
|
108
|
-
icon:
|
|
109
|
-
label:
|
|
110
|
-
onClick: l[4] || (l[4] = (o) =>
|
|
108
|
+
icon: r.value ? m(S) : m(A),
|
|
109
|
+
label: r.value ? "Show Password" : "Hide Password",
|
|
110
|
+
onClick: l[4] || (l[4] = (o) => r.value = !r.value)
|
|
111
111
|
}, null, 8, ["icon", "label"])) : u("", !0)
|
|
112
112
|
]),
|
|
113
113
|
_: 3
|
|
@@ -115,5 +115,5 @@ const F = ["for"], S = { class: "relative flex min-w-0 flex-1" }, T = ["readOnly
|
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
export {
|
|
118
|
-
|
|
118
|
+
J as default
|
|
119
119
|
};
|
|
@@ -24,8 +24,7 @@ const q = { class: "group-[.alert]:outline-orange group-[.error]:outline-red w-f
|
|
|
24
24
|
}, I = (e) => n.modelValue.toString() === e;
|
|
25
25
|
_(d, (e) => {
|
|
26
26
|
e && E(() => {
|
|
27
|
-
|
|
28
|
-
(l = x.value) == null || l.focus();
|
|
27
|
+
x.value?.focus();
|
|
29
28
|
});
|
|
30
29
|
});
|
|
31
30
|
const k = m(() => n.modelValue !== void 0 ? n.modelValue : n.default), w = m(() => {
|