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