@scalar/api-client 2.9.1 → 2.10.0

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 (341) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +2 -2
  3. package/dist/libs/send-request/build-request-security.d.ts.map +1 -1
  4. package/dist/libs/send-request/build-request-security.js +1 -1
  5. package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
  6. package/dist/style.css +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +89 -0
  8. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -0
  9. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +129 -0
  10. package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +4 -0
  11. package/dist/v2/{features/operation → blocks/operation-block}/components/Header.vue.d.ts +8 -27
  12. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -0
  13. package/dist/v2/blocks/operation-block/components/Header.vue.js +7 -0
  14. package/dist/v2/blocks/operation-block/components/Header.vue2.js +93 -0
  15. package/dist/v2/blocks/operation-block/index.d.ts +2 -0
  16. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -0
  17. package/dist/v2/blocks/operation-block/index.js +4 -0
  18. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +8 -24
  19. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  20. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  21. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +60 -59
  22. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +7 -28
  23. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
  25. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +97 -87
  26. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +7 -17
  27. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  28. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
  29. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +46 -41
  30. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
  31. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +4 -5
  33. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  34. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +47 -45
  35. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +5 -5
  36. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  37. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +7 -7
  38. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +6 -9
  39. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
  40. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
  41. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +255 -206
  42. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +30 -25
  43. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
  45. package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +140 -97
  46. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +1 -0
  47. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
  48. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +31 -29
  49. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +1 -0
  50. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
  51. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +2 -2
  52. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +32 -29
  53. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
  54. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +56 -51
  55. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +2 -4
  56. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +3 -3
  58. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +39 -38
  59. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  60. package/dist/v2/components/sidebar/Sidebar.vue.js +43 -42
  61. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  62. package/dist/v2/features/app/App.vue.js +62 -49
  63. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
  64. package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
  65. package/dist/v2/features/app/helpers/routes.d.ts +5 -1
  66. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  67. package/dist/v2/features/app/helpers/routes.js +1 -1
  68. package/dist/v2/features/collection/DocumentCollection.vue2.js +27 -24
  69. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +15 -12
  70. package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -25
  71. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  72. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  73. package/dist/v2/features/collection/components/Authentication.vue2.js +27 -28
  74. package/dist/v2/features/collection/components/Environment.vue2.js +3 -0
  75. package/dist/v2/features/collection/components/Overview.vue2.js +24 -21
  76. package/dist/v2/features/operation/Operation.vue.d.ts +10 -77
  77. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  78. package/dist/v2/features/operation/Operation.vue.js +56 -114
  79. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  80. package/dist/v2/hooks/use-workspace-client-events.js +131 -18
  81. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  82. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  83. package/dist/views/Request/libs/oauth2.js +8 -6
  84. package/package.json +17 -17
  85. package/dist/components/CodeInput/CodeInput.test.d.ts +0 -2
  86. package/dist/components/CodeInput/CodeInput.test.d.ts.map +0 -1
  87. package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts +0 -2
  88. package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts.map +0 -1
  89. package/dist/components/ImportCollection/utils/is-document.test.d.ts +0 -2
  90. package/dist/components/ImportCollection/utils/is-document.test.d.ts.map +0 -1
  91. package/dist/components/ImportCollection/utils/is-url.test.d.ts +0 -2
  92. package/dist/components/ImportCollection/utils/is-url.test.d.ts.map +0 -1
  93. package/dist/components/Search/useSearch.test.d.ts +0 -2
  94. package/dist/components/Search/useSearch.test.d.ts.map +0 -1
  95. package/dist/components/Server/ServerDropdown.test.d.ts +0 -2
  96. package/dist/components/Server/ServerDropdown.test.d.ts.map +0 -1
  97. package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts +0 -2
  98. package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts.map +0 -1
  99. package/dist/hooks/useResponseBody.test.d.ts +0 -2
  100. package/dist/hooks/useResponseBody.test.d.ts.map +0 -1
  101. package/dist/hooks/useSidebar.test.d.ts +0 -2
  102. package/dist/hooks/useSidebar.test.d.ts.map +0 -1
  103. package/dist/layouts/App/create-api-client-app.test.d.ts +0 -2
  104. package/dist/layouts/App/create-api-client-app.test.d.ts.map +0 -1
  105. package/dist/layouts/Modal/create-api-client-modal.test.d.ts +0 -2
  106. package/dist/layouts/Modal/create-api-client-modal.test.d.ts.map +0 -1
  107. package/dist/layouts/Web/create-api-client-web.test.d.ts +0 -2
  108. package/dist/layouts/Web/create-api-client-web.test.d.ts.map +0 -1
  109. package/dist/libs/create-client.test.d.ts +0 -2
  110. package/dist/libs/create-client.test.d.ts.map +0 -1
  111. package/dist/libs/env-helpers.test.d.ts +0 -2
  112. package/dist/libs/env-helpers.test.d.ts.map +0 -1
  113. package/dist/libs/event-bus.test.d.ts +0 -2
  114. package/dist/libs/event-bus.test.d.ts.map +0 -1
  115. package/dist/libs/extractAttachmentFilename.test.d.ts +0 -2
  116. package/dist/libs/extractAttachmentFilename.test.d.ts.map +0 -1
  117. package/dist/libs/find-request.test.d.ts +0 -2
  118. package/dist/libs/find-request.test.d.ts.map +0 -1
  119. package/dist/libs/get-request-uid-by-path-method.test.d.ts +0 -2
  120. package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +0 -1
  121. package/dist/libs/hot-keys.test.d.ts +0 -2
  122. package/dist/libs/hot-keys.test.d.ts.map +0 -1
  123. package/dist/libs/importers/curl.test.d.ts +0 -2
  124. package/dist/libs/importers/curl.test.d.ts.map +0 -1
  125. package/dist/libs/normalize-headers.test.d.ts +0 -2
  126. package/dist/libs/normalize-headers.test.d.ts.map +0 -1
  127. package/dist/libs/parse-curl.test.d.ts +0 -2
  128. package/dist/libs/parse-curl.test.d.ts.map +0 -1
  129. package/dist/libs/send-request/build-request-security.test.d.ts +0 -2
  130. package/dist/libs/send-request/build-request-security.test.d.ts.map +0 -1
  131. package/dist/libs/send-request/create-fetch-auth.test.d.ts +0 -2
  132. package/dist/libs/send-request/create-fetch-auth.test.d.ts.map +0 -1
  133. package/dist/libs/send-request/create-fetch-body.test.d.ts +0 -2
  134. package/dist/libs/send-request/create-fetch-body.test.d.ts.map +0 -1
  135. package/dist/libs/send-request/create-fetch-headers.test.d.ts +0 -2
  136. package/dist/libs/send-request/create-fetch-headers.test.d.ts.map +0 -1
  137. package/dist/libs/send-request/create-fetch-query-params.test.d.ts +0 -2
  138. package/dist/libs/send-request/create-fetch-query-params.test.d.ts.map +0 -1
  139. package/dist/libs/send-request/create-request-operation.test.d.ts +0 -191
  140. package/dist/libs/send-request/create-request-operation.test.d.ts.map +0 -1
  141. package/dist/libs/send-request/decode-buffer.test.d.ts +0 -2
  142. package/dist/libs/send-request/decode-buffer.test.d.ts.map +0 -1
  143. package/dist/libs/send-request/set-request-cookies.test.d.ts +0 -2
  144. package/dist/libs/send-request/set-request-cookies.test.d.ts.map +0 -1
  145. package/dist/libs/string-template.test.d.ts +0 -2
  146. package/dist/libs/string-template.test.d.ts.map +0 -1
  147. package/dist/libs/validate-parameters.test.d.ts +0 -2
  148. package/dist/libs/validate-parameters.test.d.ts.map +0 -1
  149. package/dist/plugins/plugin-manager.test.d.ts +0 -2
  150. package/dist/plugins/plugin-manager.test.d.ts.map +0 -1
  151. package/dist/routes.test.d.ts +0 -2
  152. package/dist/routes.test.d.ts.map +0 -1
  153. package/dist/store/collections.test.d.ts +0 -2
  154. package/dist/store/collections.test.d.ts.map +0 -1
  155. package/dist/store/request.test.d.ts +0 -2
  156. package/dist/store/request.test.d.ts.map +0 -1
  157. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts +0 -2
  158. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts.map +0 -1
  159. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +0 -2
  160. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +0 -1
  161. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts +0 -2
  162. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts.map +0 -1
  163. package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts +0 -2
  164. package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts.map +0 -1
  165. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts +0 -2
  166. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts.map +0 -1
  167. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts +0 -2
  168. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts.map +0 -1
  169. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts +0 -2
  170. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts.map +0 -1
  171. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts +0 -2
  172. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts.map +0 -1
  173. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts +0 -2
  174. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts.map +0 -1
  175. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts +0 -2
  176. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts.map +0 -1
  177. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts +0 -2
  178. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts.map +0 -1
  179. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts +0 -2
  180. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts.map +0 -1
  181. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts +0 -2
  182. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts.map +0 -1
  183. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts +0 -2
  184. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts.map +0 -1
  185. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts +0 -2
  186. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts.map +0 -1
  187. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts +0 -2
  188. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts.map +0 -1
  189. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts +0 -2
  190. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts.map +0 -1
  191. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts +0 -2
  192. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts.map +0 -1
  193. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts +0 -2
  194. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts.map +0 -1
  195. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts +0 -2
  196. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts.map +0 -1
  197. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts +0 -2
  198. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts.map +0 -1
  199. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts +0 -2
  200. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts.map +0 -1
  201. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts +0 -2
  202. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts.map +0 -1
  203. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts +0 -2
  204. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts.map +0 -1
  205. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts +0 -2
  206. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts.map +0 -1
  207. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +0 -2
  208. package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +0 -1
  209. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +0 -2
  210. package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +0 -1
  211. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +0 -2
  212. package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +0 -1
  213. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +0 -2
  214. package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +0 -1
  215. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +0 -2
  216. package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +0 -1
  217. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +0 -2
  218. package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +0 -1
  219. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +0 -2
  220. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +0 -1
  221. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +0 -2
  222. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +0 -1
  223. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +0 -2
  224. package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +0 -1
  225. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +0 -2
  226. package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +0 -1
  227. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +0 -2
  228. package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +0 -1
  229. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +0 -2
  230. package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +0 -1
  231. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +0 -2
  232. package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +0 -1
  233. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +0 -2
  234. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +0 -1
  235. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +0 -2
  236. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +0 -1
  237. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +0 -2
  238. package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +0 -1
  239. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +0 -2
  240. package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +0 -1
  241. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +0 -2
  242. package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +0 -1
  243. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +0 -2
  244. package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +0 -1
  245. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +0 -2
  246. package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +0 -1
  247. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +0 -2
  248. package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +0 -1
  249. package/dist/v2/components/code-input/CodeInput.test.d.ts +0 -2
  250. package/dist/v2/components/code-input/CodeInput.test.d.ts.map +0 -1
  251. package/dist/v2/components/code-input/code-variable-widget.test.d.ts +0 -2
  252. package/dist/v2/components/code-input/code-variable-widget.test.d.ts.map +0 -1
  253. package/dist/v2/components/server/ServerDropdown.test.d.ts +0 -2
  254. package/dist/v2/components/server/ServerDropdown.test.d.ts.map +0 -1
  255. package/dist/v2/components/server/ServerDropdownItem.test.d.ts +0 -2
  256. package/dist/v2/components/server/ServerDropdownItem.test.d.ts.map +0 -1
  257. package/dist/v2/features/app/App.test.d.ts +0 -2
  258. package/dist/v2/features/app/App.test.d.ts.map +0 -1
  259. package/dist/v2/features/collection/DocumentCollection.test.d.ts +0 -2
  260. package/dist/v2/features/collection/DocumentCollection.test.d.ts.map +0 -1
  261. package/dist/v2/features/collection/components/Authentication.test.d.ts +0 -2
  262. package/dist/v2/features/collection/components/Authentication.test.d.ts.map +0 -1
  263. package/dist/v2/features/collection/components/Environment.test.d.ts +0 -2
  264. package/dist/v2/features/collection/components/Environment.test.d.ts.map +0 -1
  265. package/dist/v2/features/collection/components/LabelInput.test.d.ts +0 -2
  266. package/dist/v2/features/collection/components/LabelInput.test.d.ts.map +0 -1
  267. package/dist/v2/features/collection/components/Overview.test.d.ts +0 -2
  268. package/dist/v2/features/collection/components/Overview.test.d.ts.map +0 -1
  269. package/dist/v2/features/collection/components/Servers.test.d.ts +0 -2
  270. package/dist/v2/features/collection/components/Servers.test.d.ts.map +0 -1
  271. package/dist/v2/features/collection/components/Settings.test.d.ts +0 -2
  272. package/dist/v2/features/collection/components/Settings.test.d.ts.map +0 -1
  273. package/dist/v2/features/collection/components/Tabs.test.d.ts +0 -2
  274. package/dist/v2/features/collection/components/Tabs.test.d.ts.map +0 -1
  275. package/dist/v2/features/environments/EnvironmentsList.test.d.ts +0 -2
  276. package/dist/v2/features/environments/EnvironmentsList.test.d.ts.map +0 -1
  277. package/dist/v2/features/environments/components/Environment.test.d.ts +0 -2
  278. package/dist/v2/features/environments/components/Environment.test.d.ts.map +0 -1
  279. package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts +0 -2
  280. package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts.map +0 -1
  281. package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts +0 -2
  282. package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts.map +0 -1
  283. package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts +0 -2
  284. package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts.map +0 -1
  285. package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts +0 -2
  286. package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts.map +0 -1
  287. package/dist/v2/features/operation/Operation.test.d.ts +0 -2
  288. package/dist/v2/features/operation/Operation.test.d.ts.map +0 -1
  289. package/dist/v2/features/operation/components/Header.test.d.ts +0 -2
  290. package/dist/v2/features/operation/components/Header.test.d.ts.map +0 -1
  291. package/dist/v2/features/operation/components/Header.vue.d.ts.map +0 -1
  292. package/dist/v2/features/operation/components/Header.vue.js +0 -7
  293. package/dist/v2/features/operation/components/Header.vue2.js +0 -97
  294. package/dist/v2/features/settings/Settings.test.d.ts +0 -2
  295. package/dist/v2/features/settings/Settings.test.d.ts.map +0 -1
  296. package/dist/v2/hooks/use-document-watcher.test.d.ts +0 -2
  297. package/dist/v2/hooks/use-document-watcher.test.d.ts.map +0 -1
  298. package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts +0 -2
  299. package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts.map +0 -1
  300. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts +0 -2
  301. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts.map +0 -1
  302. package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts +0 -2
  303. package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts.map +0 -1
  304. package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts +0 -2
  305. package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts.map +0 -1
  306. package/dist/views/Request/RequestRoot.test.d.ts +0 -2
  307. package/dist/views/Request/RequestRoot.test.d.ts.map +0 -1
  308. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts +0 -2
  309. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts.map +0 -1
  310. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts +0 -2
  311. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts.map +0 -1
  312. package/dist/views/Request/RequestSection/RequestBody.test.d.ts +0 -2
  313. package/dist/views/Request/RequestSection/RequestBody.test.d.ts.map +0 -1
  314. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +0 -2
  315. package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +0 -1
  316. package/dist/views/Request/RequestSection/RequestSection.test.d.ts +0 -2
  317. package/dist/views/Request/RequestSection/RequestSection.test.d.ts.map +0 -1
  318. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts +0 -2
  319. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts.map +0 -1
  320. package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts +0 -2
  321. package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts.map +0 -1
  322. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +0 -2
  323. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +0 -1
  324. package/dist/views/Request/RequestSubpageHeader.test.d.ts +0 -2
  325. package/dist/views/Request/RequestSubpageHeader.test.d.ts.map +0 -1
  326. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts +0 -2
  327. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts.map +0 -1
  328. package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts +0 -2
  329. package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts.map +0 -1
  330. package/dist/views/Request/consts/mediaTypes.test.d.ts +0 -2
  331. package/dist/views/Request/consts/mediaTypes.test.d.ts.map +0 -1
  332. package/dist/views/Request/libs/auth.test.d.ts +0 -2
  333. package/dist/views/Request/libs/auth.test.d.ts.map +0 -1
  334. package/dist/views/Request/libs/oauth2.test.d.ts +0 -2
  335. package/dist/views/Request/libs/oauth2.test.d.ts.map +0 -1
  336. package/dist/views/Request/libs/request.test.d.ts +0 -2
  337. package/dist/views/Request/libs/request.test.d.ts.map +0 -1
  338. package/dist/views/Request/libs/watch-mode.test.d.ts +0 -2
  339. package/dist/views/Request/libs/watch-mode.test.d.ts.map +0 -1
  340. package/dist/vitest.setup.d.ts +0 -34
  341. package/dist/vitest.setup.d.ts.map +0 -1
@@ -1,37 +1,37 @@
1
- import { defineComponent as j, computed as g, createBlock as u, openBlock as i, withCtx as a, createVNode as r, unref as l, createElementVNode as m, toDisplayString as f, createElementBlock as c, Fragment as F, createTextVNode as T } from "vue";
2
- import { ScalarListbox as h, ScalarButton as y, ScalarIcon as x } from "@scalar/components";
3
- import N from "../../../../components/CodeInput/CodeInput.vue.js";
4
- import O from "../../../../components/DataTable/DataTable.vue.js";
5
- import U from "../../../../components/DataTable/DataTableHeader.vue.js";
6
- import D from "../../../../components/DataTable/DataTableRow.vue.js";
7
- import R from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
8
- import V from "./OperationTable.vue.js";
9
- import { getFileName as C } from "../helpers/files.js";
10
- import { getExampleFromBody as S } from "../helpers/get-request-body-example.js";
11
- import { useFileDialog as E } from "../../../../hooks/useFileDialog.js";
12
- const L = {
1
+ import { defineComponent as O, computed as m, createBlock as v, openBlock as u, withCtx as i, createVNode as d, unref as l, createElementVNode as f, toDisplayString as c, createElementBlock as w, Fragment as D, createTextVNode as g } from "vue";
2
+ import { ScalarListbox as S, ScalarButton as b, ScalarIcon as V } from "@scalar/components";
3
+ import { unpackProxyObject as k } from "@scalar/workspace-store/helpers/unpack-proxy";
4
+ import q from "../../../../components/CodeInput/CodeInput.vue.js";
5
+ import A from "../../../../components/DataTable/DataTable.vue.js";
6
+ import E from "../../../../components/DataTable/DataTableHeader.vue.js";
7
+ import L from "../../../../components/DataTable/DataTableRow.vue.js";
8
+ import M from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
9
+ import B from "./OperationTable.vue.js";
10
+ import { getFileName as F } from "../helpers/files.js";
11
+ import { getExampleFromBody as z } from "../helpers/get-request-body-example.js";
12
+ import { useFileDialog as $ } from "../../../../hooks/useFileDialog.js";
13
+ const K = {
13
14
  key: 0,
14
15
  class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
15
- }, M = {
16
+ }, I = {
16
17
  key: 1,
17
18
  class: "flex items-center justify-center overflow-hidden border-t p-1.5"
18
- }, z = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, Q = /* @__PURE__ */ j({
19
+ }, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, oe = /* @__PURE__ */ O({
19
20
  __name: "OperationBody",
20
21
  props: {
21
22
  requestBody: {},
22
- selectedContentType: {},
23
23
  exampleKey: {},
24
24
  title: {},
25
25
  environment: {},
26
26
  envVariables: {}
27
27
  },
28
- emits: ["update:contentType", "update:value", "add:formRow", "update:formRow"],
29
- setup(d, { emit: k }) {
30
- const p = k, B = {
28
+ emits: ["update:contentType", "update:value", "add:formRow", "update:formRow", "delete:fromRow"],
29
+ setup(s, { emit: N }) {
30
+ const a = N, U = {
31
31
  "application/json": "json",
32
32
  "application/xml": "xml",
33
33
  "application/yaml": "yaml"
34
- }, v = Object.entries({
34
+ }, j = {
35
35
  "multipart/form-data": "Multipart Form",
36
36
  "application/x-www-form-urlencoded": "Form URL Encoded",
37
37
  "application/octet-stream": "Binary File",
@@ -41,56 +41,63 @@ const L = {
41
41
  "application/edn": "EDN",
42
42
  other: "Other",
43
43
  none: "None"
44
- }).map(([t, e]) => ({
45
- id: t,
44
+ }, o = m(() => s.requestBody?.["x-scalar-selected-content-type"]?.[s.exampleKey] ?? Object.keys(s.requestBody?.content ?? {})[0] ?? "other"), y = Object.entries(j).map(([n, e]) => ({
45
+ id: n,
46
46
  label: e
47
- })), b = g({
48
- get: () => v.find((e) => e.id === d.selectedContentType) ?? v.at(-1),
49
- set: (t) => {
50
- p("update:contentType", { value: t.id });
47
+ })), x = m({
48
+ get: () => y.find(
49
+ (e) => e.id === o.value
50
+ ) ?? y.at(-1),
51
+ set: (n) => {
52
+ a("update:contentType", { value: n.id });
51
53
  }
52
54
  });
53
- function w(t) {
54
- const { open: e } = E({
55
- onChange: (n) => {
56
- const o = n?.[0];
57
- o && t(o);
55
+ function T(n) {
56
+ const { open: e } = $({
57
+ onChange: (t) => {
58
+ const r = t?.[0];
59
+ r && n(r);
58
60
  },
59
61
  multiple: !1,
60
62
  accept: "*/*"
61
63
  });
62
64
  e();
63
65
  }
64
- const s = g(
65
- () => d.requestBody && S(d.requestBody, d.selectedContentType, d.exampleKey)
66
- );
67
- return (t, e) => (i(), u(R, null, {
68
- title: a(() => [
69
- T(f(t.title), 1)
66
+ const p = m(
67
+ () => s.requestBody && z(s.requestBody, o.value, s.exampleKey)
68
+ ), C = m(() => {
69
+ if (!p.value)
70
+ return "";
71
+ const n = p.value.value;
72
+ return typeof n == "string" ? n : JSON.stringify(n, null, 2);
73
+ }), R = m(() => p.value ? Array.isArray(p.value.value) ? p.value.value : [] : []);
74
+ return (n, e) => (u(), v(M, null, {
75
+ title: i(() => [
76
+ g(c(n.title), 1)
70
77
  ]),
71
- default: a(() => [
72
- r(O, {
78
+ default: i(() => [
79
+ d(A, {
73
80
  columns: [""],
74
81
  presentational: ""
75
82
  }, {
76
- default: a(() => [
77
- r(U, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
78
- default: a(() => [
79
- r(l(h), {
80
- modelValue: b.value,
81
- "onUpdate:modelValue": e[0] || (e[0] = (n) => b.value = n),
82
- options: l(v),
83
+ default: i(() => [
84
+ d(E, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
85
+ default: i(() => [
86
+ d(l(S), {
87
+ modelValue: x.value,
88
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => x.value = t),
89
+ options: l(y),
83
90
  teleport: ""
84
91
  }, {
85
- default: a(() => [
86
- r(l(y), {
92
+ default: i(() => [
93
+ d(l(b), {
87
94
  class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
88
95
  fullWidth: "",
89
96
  variant: "ghost"
90
97
  }, {
91
- default: a(() => [
92
- m("span", null, f(t.selectedContentType), 1),
93
- r(l(x), {
98
+ default: i(() => [
99
+ f("span", null, c(o.value), 1),
100
+ d(l(V), {
94
101
  icon: "ChevronDown",
95
102
  size: "md"
96
103
  })
@@ -103,36 +110,42 @@ const L = {
103
110
  ]),
104
111
  _: 1
105
112
  }),
106
- r(D, null, {
107
- default: a(() => [
108
- t.selectedContentType === "none" ? (i(), c("div", L, [...e[5] || (e[5] = [
109
- m("span", null, "No Body", -1)
110
- ])])) : t.selectedContentType === "application/octet-stream" ? (i(), c("div", M, [
111
- l(C)(s.value?.value) !== void 0 ? (i(), c(F, { key: 0 }, [
112
- m("span", z, f(l(C)(s.value?.value)), 1),
113
- r(l(y), {
113
+ d(L, null, {
114
+ default: i(() => [
115
+ o.value === "none" ? (u(), w("div", K, [...e[12] || (e[12] = [
116
+ f("span", null, "No Body", -1)
117
+ ])])) : o.value === "application/octet-stream" ? (u(), w("div", I, [
118
+ l(F)(l(k)(p.value?.value)) !== void 0 ? (u(), w(D, { key: 0 }, [
119
+ f("span", J, c(l(F)(l(k)(p.value?.value))), 1),
120
+ d(l(b), {
114
121
  class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
115
122
  size: "sm",
116
123
  variant: "outlined",
117
- onClick: e[1] || (e[1] = (n) => p("update:value", { value: void 0 }))
124
+ onClick: e[1] || (e[1] = (t) => a("update:value", {
125
+ value: void 0,
126
+ contentType: o.value
127
+ }))
118
128
  }, {
119
- default: a(() => [...e[6] || (e[6] = [
120
- T(" Delete ", -1)
129
+ default: i(() => [...e[13] || (e[13] = [
130
+ g(" Delete ", -1)
121
131
  ])]),
122
132
  _: 1
123
133
  })
124
- ], 64)) : (i(), u(l(y), {
134
+ ], 64)) : (u(), v(l(b), {
125
135
  key: 1,
126
136
  class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
127
137
  size: "sm",
128
138
  variant: "outlined",
129
- onClick: e[2] || (e[2] = () => w(
130
- (n) => p("update:value", { value: n })
139
+ onClick: e[2] || (e[2] = () => T(
140
+ (t) => a("update:value", {
141
+ value: t,
142
+ contentType: o.value
143
+ })
131
144
  ))
132
145
  }, {
133
- default: a(() => [
134
- e[7] || (e[7] = m("span", null, "Upload File", -1)),
135
- r(l(x), {
146
+ default: i(() => [
147
+ e[14] || (e[14] = f("span", null, "Upload File", -1)),
148
+ d(l(V), {
136
149
  class: "ml-1",
137
150
  icon: "Upload",
138
151
  size: "xs",
@@ -141,46 +154,76 @@ const L = {
141
154
  ]),
142
155
  _: 1
143
156
  }))
144
- ])) : t.selectedContentType === "multipart/form-data" ? (i(), u(V, {
157
+ ])) : o.value === "multipart/form-data" ? (u(), v(B, {
145
158
  key: 2,
146
- data: Object.entries(
147
- typeof s.value?.value == "object" ? s.value.value ?? {} : {}
148
- ).map(([n, o]) => ({
149
- name: n,
150
- value: o
151
- })),
152
- envVariables: t.envVariables,
153
- environment: t.environment,
159
+ data: R.value,
160
+ envVariables: n.envVariables,
161
+ environment: n.environment,
154
162
  showUploadButton: "",
155
- onUploadFile: e[3] || (e[3] = (n) => w((o) => {
156
- if (n !== void 0)
157
- return p("update:formRow", {
158
- index: n,
159
- payload: { value: o ?? void 0 }
163
+ onAddRow: e[3] || (e[3] = (t) => a("add:formRow", {
164
+ data: t,
165
+ contentType: o.value
166
+ })),
167
+ onUpdateRow: e[4] || (e[4] = (t, r) => a("update:formRow", {
168
+ index: t,
169
+ data: r,
170
+ contentType: o.value
171
+ })),
172
+ onUploadFile: e[5] || (e[5] = (t) => T((r) => {
173
+ if (t !== void 0)
174
+ return a("update:formRow", {
175
+ index: t,
176
+ data: { value: r ?? void 0 },
177
+ contentType: o.value
160
178
  });
161
- p("add:formRow", { value: o ?? void 0 });
179
+ a("add:formRow", {
180
+ data: { value: r ?? void 0 },
181
+ contentType: o.value
182
+ });
183
+ })),
184
+ onRemoveFile: e[6] || (e[6] = (t) => a("update:formRow", {
185
+ contentType: o.value,
186
+ index: t,
187
+ data: {
188
+ value: null
189
+ }
190
+ })),
191
+ onDeleteRow: e[7] || (e[7] = (t) => a("delete:fromRow", {
192
+ contentType: o.value,
193
+ index: t
162
194
  }))
163
- }, null, 8, ["data", "envVariables", "environment"])) : t.selectedContentType === "application/x-www-form-urlencoded" ? (i(), u(V, {
195
+ }, null, 8, ["data", "envVariables", "environment"])) : o.value === "application/x-www-form-urlencoded" ? (u(), v(B, {
164
196
  key: 3,
165
- data: Object.entries(
166
- typeof s.value?.value == "object" ? s.value.value : {}
167
- ).map(([n, o]) => ({
168
- name: n,
169
- value: String(o)
197
+ data: R.value,
198
+ onAddRow: e[8] || (e[8] = (t) => a("add:formRow", {
199
+ data: t,
200
+ contentType: o.value
201
+ })),
202
+ onUpdateRow: e[9] || (e[9] = (t, r) => a("update:formRow", {
203
+ index: t,
204
+ data: r,
205
+ contentType: o.value
170
206
  })),
171
- envVariables: t.envVariables,
172
- environment: t.environment
173
- }, null, 8, ["data", "envVariables", "environment"])) : (i(), u(N, {
207
+ onDeleteRow: e[10] || (e[10] = (t) => a("delete:fromRow", {
208
+ contentType: o.value,
209
+ index: t
210
+ })),
211
+ envVariables: n.envVariables,
212
+ environment: n.environment
213
+ }, null, 8, ["data", "envVariables", "environment"])) : (u(), v(q, {
174
214
  key: 4,
175
215
  class: "border-t px-3",
176
216
  content: "",
177
- envVariables: t.envVariables,
178
- environment: t.environment,
179
- language: B[t.selectedContentType] ?? "plaintext",
217
+ envVariables: n.envVariables,
218
+ environment: n.environment,
219
+ language: U[o.value] ?? "plaintext",
180
220
  lineNumbers: "",
181
221
  lint: "",
182
- modelValue: s.value?.value ?? "",
183
- "onUpdate:modelValue": e[4] || (e[4] = (n) => p("update:value", { value: n }))
222
+ modelValue: C.value,
223
+ "onUpdate:modelValue": e[11] || (e[11] = (t) => a("update:value", {
224
+ value: t,
225
+ contentType: o.value
226
+ }))
184
227
  }, null, 8, ["envVariables", "environment", "language", "modelValue"]))
185
228
  ]),
186
229
  _: 1
@@ -194,5 +237,5 @@ const L = {
194
237
  }
195
238
  });
196
239
  export {
197
- Q as default
240
+ oe as default
198
241
  };
@@ -8,6 +8,7 @@ type __VLS_Props = {
8
8
  label?: string;
9
9
  invalidParams?: Set<string>;
10
10
  globalRoute?: string;
11
+ showAddRowPlaceholder?: boolean;
11
12
  /** TODO: remove as soon as we migrate to everything to the new store */
12
13
  environment: Environment;
13
14
  envVariables: EnvVariable[];
@@ -1 +1 @@
1
- {"version":3,"file":"OperationParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationParams.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAM1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wEAAwE;IACxE,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;eAmBgC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAGxC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAoL1E,wBAOG"}
1
+ {"version":3,"file":"OperationParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationParams.vue"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAM1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,wEAAwE;IACxE,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;eAoBgC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAGxC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAsL1E,wBAOG"}
@@ -1,10 +1,10 @@
1
- import { defineComponent as y, computed as r, createBlock as i, openBlock as s, withCtx as l, createVNode as m, createElementVNode as p, createCommentVNode as R, unref as d, withModifiers as w, createTextVNode as u, toDisplayString as v } from "vue";
2
- import { ScalarTooltip as C, ScalarButton as V } from "@scalar/components";
3
- import x from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
- import P from "./OperationTable.vue.js";
5
- import { getParameterExample as K } from "../helpers/get-parameter-example.js";
6
- import { getParameterSchema as h } from "../helpers/get-parameter-schema.js";
7
- const k = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, A = { class: "sr-only" }, E = /* @__PURE__ */ y({
1
+ import { defineComponent as c, computed as n, createBlock as s, openBlock as i, withCtx as l, createVNode as m, createElementVNode as d, createCommentVNode as g, unref as p, withModifiers as h, createTextVNode as u, toDisplayString as f } from "vue";
2
+ import { ScalarTooltip as y, ScalarButton as P } from "@scalar/components";
3
+ import A from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
+ import C from "./OperationTable.vue.js";
5
+ import { getParameterExample as V } from "../helpers/get-parameter-example.js";
6
+ import { getParameterSchema as x } from "../helpers/get-parameter-schema.js";
7
+ const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, k = { class: "sr-only" }, E = /* @__PURE__ */ c({
8
8
  __name: "OperationParams",
9
9
  props: {
10
10
  parameters: {},
@@ -13,71 +13,73 @@ const k = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
13
13
  label: {},
14
14
  invalidParams: {},
15
15
  globalRoute: {},
16
+ showAddRowPlaceholder: { type: Boolean, default: !0 },
16
17
  environment: {},
17
18
  envVariables: {}
18
19
  },
19
20
  emits: ["add", "update", "delete", "deleteAll"],
20
- setup(o, { emit: b }) {
21
- const n = b, f = r(
21
+ setup(o, { emit: v }) {
22
+ const r = v, b = n(
22
23
  () => o.parameters.map((e) => {
23
- const t = K(e, o.exampleKey);
24
+ const a = V(e, o.exampleKey);
24
25
  return {
25
26
  name: e.name,
26
- value: t?.value ?? "",
27
+ value: a?.value ?? "",
27
28
  globalRoute: o.globalRoute,
28
- schema: h(e),
29
+ schema: x(e),
29
30
  isRequired: e.required,
30
- isDisabled: t?.["x-disabled"] ?? !1
31
+ isDisabled: a?.["x-disabled"] ?? !1
31
32
  };
32
33
  })
33
- ), g = r(() => o.parameters.length > 1);
34
- return (e, t) => (s(), i(x, {
34
+ ), w = n(() => o.parameters.length > 1);
35
+ return (e, a) => (i(), s(A, {
35
36
  class: "group/params",
36
37
  itemCount: e.parameters.length
37
38
  }, {
38
39
  title: l(() => [
39
- u(v(e.title), 1)
40
+ u(f(e.title), 1)
40
41
  ]),
41
42
  actions: l(() => [
42
- p("div", k, [
43
- g.value ? (s(), i(d(C), {
43
+ d("div", K, [
44
+ w.value ? (i(), s(p(y), {
44
45
  key: 0,
45
46
  content: "Clear optional parameters",
46
47
  placement: "left"
47
48
  }, {
48
49
  default: l(() => [
49
- m(d(V), {
50
+ m(p(P), {
50
51
  class: "pr-0.75 pl-1 transition-none",
51
52
  size: "sm",
52
53
  variant: "ghost",
53
- onClick: t[0] || (t[0] = w((a) => n("deleteAll"), ["stop"]))
54
+ onClick: a[0] || (a[0] = h((t) => r("deleteAll"), ["stop"]))
54
55
  }, {
55
56
  default: l(() => [
56
- t[4] || (t[4] = u(" Clear ", -1)),
57
- p("span", A, "All " + v(e.title), 1)
57
+ a[4] || (a[4] = u(" Clear ", -1)),
58
+ d("span", k, "All " + f(e.title), 1)
58
59
  ]),
59
60
  _: 1
60
61
  })
61
62
  ]),
62
63
  _: 1
63
- })) : R("", !0)
64
+ })) : g("", !0)
64
65
  ])
65
66
  ]),
66
67
  default: l(() => [
67
- m(P, {
68
+ m(C, {
68
69
  class: "flex-1",
69
70
  columns: ["32px", "", ""],
70
- data: f.value,
71
+ data: b.value,
71
72
  envVariables: e.envVariables,
72
73
  environment: e.environment,
73
74
  exampleKey: e.exampleKey,
74
75
  globalRoute: e.globalRoute,
75
76
  invalidParams: e.invalidParams,
76
77
  label: e.label,
77
- onAddRow: t[1] || (t[1] = (a) => n("add", a)),
78
- onDeleteRow: t[2] || (t[2] = (a) => n("delete", { index: a })),
79
- onUpdateRow: t[3] || (t[3] = (a, c) => n("update", { index: a, payload: c }))
80
- }, null, 8, ["data", "envVariables", "environment", "exampleKey", "globalRoute", "invalidParams", "label"])
78
+ showAddRowPlaceholder: e.showAddRowPlaceholder,
79
+ onAddRow: a[1] || (a[1] = (t) => r("add", t)),
80
+ onDeleteRow: a[2] || (a[2] = (t) => r("delete", { index: t })),
81
+ onUpdateRow: a[3] || (a[3] = (t, R) => r("update", { index: t, payload: R }))
82
+ }, null, 8, ["data", "envVariables", "environment", "exampleKey", "globalRoute", "invalidParams", "label", "showAddRowPlaceholder"])
81
83
  ]),
82
84
  _: 1
83
85
  }, 8, ["itemCount"]));
@@ -9,6 +9,7 @@ type __VLS_Props = {
9
9
  invalidParams?: Set<string>;
10
10
  label?: string;
11
11
  showUploadButton?: boolean;
12
+ showAddRowPlaceholder?: boolean;
12
13
  /** TODO: remove once we migrate */
13
14
  environment: Environment;
14
15
  envVariables: EnvVariable[];
@@ -1 +1 @@
1
- {"version":3,"file":"OperationTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTable.vue"],"names":[],"mappings":"AA2JA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAMzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAA0B,EACxB,KAAK,QAAQ,EACd,MAAM,qEAAqE,CAAA;AAE5E,KAAK,WAAW,GAAG;IACf,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;aAgBwB,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAKzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AAoNrE,wBAOG"}
1
+ {"version":3,"file":"OperationTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTable.vue"],"names":[],"mappings":"AA2KA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAMzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAA0B,EACxB,KAAK,QAAQ,EACd,MAAM,qEAAqE,CAAA;AAE5E,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;aAqB0B,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAKzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;aALzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AA6NrE,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./OperationTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5ef78e55"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8f9602b0"]]);
5
5
  export {
6
- p as default
6
+ e as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as h, computed as y, createBlock as p, openBlock as r, withCtx as o, createVNode as t, createElementBlock as B, createTextVNode as s, toDisplayString as u, Fragment as D, renderList as F } from "vue";
1
+ import { defineComponent as y, computed as b, createBlock as c, openBlock as i, withCtx as n, createVNode as t, createElementBlock as B, createTextVNode as s, toDisplayString as u, Fragment as D, renderList as F } from "vue";
2
2
  import k from "../../../../components/DataTable/DataTable.vue.js";
3
3
  import m from "../../../../components/DataTable/DataTableHeader.vue.js";
4
4
  import U from "../../../../components/DataTable/DataTableRow.vue.js";
5
5
  import V from "./OperationTableRow.vue.js";
6
- const T = /* @__PURE__ */ h({
6
+ const A = /* @__PURE__ */ y({
7
7
  __name: "OperationTable",
8
8
  props: {
9
9
  data: {},
@@ -12,47 +12,50 @@ const T = /* @__PURE__ */ h({
12
12
  invalidParams: {},
13
13
  label: {},
14
14
  showUploadButton: { type: Boolean },
15
+ showAddRowPlaceholder: { type: Boolean, default: !0 },
15
16
  environment: {},
16
17
  envVariables: {}
17
18
  },
18
19
  emits: ["addRow", "updateRow", "deleteRow", "uploadFile", "removeFile"],
19
- setup(n, { emit: b }) {
20
- const a = b, v = (e) => {
21
- a("uploadFile", e);
22
- }, c = ["36px", "", "", "auto"], f = y(() => {
23
- const e = n.data.at(-1);
24
- return !e || e.name !== "" && e.value !== "" ? [...n.data, { name: "", value: "", isDisabled: !0 }] : n.data;
25
- }), R = ({
20
+ setup(a, { emit: p }) {
21
+ const l = p, f = (e) => {
22
+ l("uploadFile", e);
23
+ }, v = b(() => a.showUploadButton ? ["36px", "", "", "auto"] : ["36px", "", ""]), w = b(() => {
24
+ if (!a.showAddRowPlaceholder)
25
+ return a.data;
26
+ const e = a.data.at(-1);
27
+ return !e || e.name !== "" || e.value !== "" ? [...a.data, { name: "", value: "", isDisabled: !0 }] : a.data;
28
+ }), h = ({
26
29
  index: e,
27
- payload: i
30
+ payload: d
28
31
  }) => {
29
- if (e >= n.data.length) {
30
- a("addRow", i);
32
+ if (e >= a.data.length) {
33
+ l("addRow", d);
31
34
  return;
32
35
  }
33
- a("updateRow", e, i);
36
+ l("updateRow", e, d);
34
37
  };
35
- return (e, i) => (r(), p(k, {
38
+ return (e, d) => (i(), c(k, {
36
39
  class: "group/table flex-1",
37
- columns: c
40
+ columns: v.value
38
41
  }, {
39
- default: o(() => [
42
+ default: n(() => [
40
43
  t(U, { class: "sr-only !block" }, {
41
- default: o(() => [
44
+ default: n(() => [
42
45
  t(m, null, {
43
- default: o(() => [
46
+ default: n(() => [
44
47
  s(u(e.label) + " Enabled", 1)
45
48
  ]),
46
49
  _: 1
47
50
  }),
48
51
  t(m, null, {
49
- default: o(() => [
52
+ default: n(() => [
50
53
  s(u(e.label) + " Key", 1)
51
54
  ]),
52
55
  _: 1
53
56
  }),
54
57
  t(m, null, {
55
- default: o(() => [
58
+ default: n(() => [
56
59
  s(u(e.label) + " Value", 1)
57
60
  ]),
58
61
  _: 1
@@ -60,9 +63,9 @@ const T = /* @__PURE__ */ h({
60
63
  ]),
61
64
  _: 1
62
65
  }),
63
- (r(!0), B(D, null, F(f.value, (w, l) => (r(), p(V, {
64
- key: l,
65
- data: w,
66
+ (i(!0), B(D, null, F(w.value, (R, o) => (i(), c(V, {
67
+ key: o,
68
+ data: R,
66
69
  envVariables: e.envVariables,
67
70
  environment: e.environment,
68
71
  hasCheckboxDisabled: e.hasCheckboxDisabled,
@@ -70,16 +73,16 @@ const T = /* @__PURE__ */ h({
70
73
  isReadOnly: e.isReadOnly,
71
74
  label: e.label,
72
75
  showUploadButton: e.showUploadButton,
73
- onDeleteRow: (d) => a("deleteRow", l),
74
- onRemoveFile: (d) => a("removeFile", l),
75
- onUpdateRow: (d) => R({ index: l, payload: d }),
76
- onUploadFile: () => v(l)
76
+ onDeleteRow: (r) => l("deleteRow", o),
77
+ onRemoveFile: (r) => l("removeFile", o),
78
+ onUpdateRow: (r) => h({ index: o, payload: r }),
79
+ onUploadFile: () => f(o)
77
80
  }, null, 8, ["data", "envVariables", "environment", "hasCheckboxDisabled", "invalidParams", "isReadOnly", "label", "showUploadButton", "onDeleteRow", "onRemoveFile", "onUpdateRow", "onUploadFile"]))), 128))
78
81
  ]),
79
82
  _: 1
80
- }));
83
+ }, 8, ["columns"]));
81
84
  }
82
85
  });
83
86
  export {
84
- T as default
87
+ A as default
85
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OperationTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTableRow.vue"],"names":[],"mappings":"AAwNA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAShG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0DAA0D;IAC1D,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAoBF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;;;aAf2B,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAAzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AA2erE,wBAOG"}
1
+ {"version":3,"file":"OperationTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationTableRow.vue"],"names":[],"mappings":"AA4NA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAShG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAK1C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0DAA0D;IAC1D,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAoBF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;;;aAf2B,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;;aAAzC,MAAM;eAAS,MAAM;mBAAa,OAAO;;;;;;AA+erE,wBAOG"}