@scalar/api-client 2.18.0 → 2.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +52 -52
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +15 -15
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -33
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +112 -112
- package/dist/components/CommandPalette/CommandActionForm.vue.js +18 -18
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +25 -25
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +14 -14
- package/dist/components/DataTable/DataTable.vue.js +17 -17
- package/dist/components/DataTable/DataTableCell.vue.js +9 -9
- package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
- package/dist/components/DataTable/DataTableInput.vue2.js +48 -48
- package/dist/components/DataTable/DataTableInputSelect.vue.js +35 -35
- package/dist/components/DataTable/DataTableText.vue.js +10 -10
- package/dist/components/Form/Form.vue.js +32 -32
- package/dist/components/Form/LabelInput.vue2.js +15 -15
- package/dist/components/HelpfulLink.vue.js +7 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +22 -22
- package/dist/components/IconSelector.vue.js +16 -16
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +50 -50
- package/dist/components/ImportCollection/ImportNowButton.vue.js +23 -23
- package/dist/components/ImportCollection/PrefetchError.vue.js +8 -8
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -7
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +16 -16
- package/dist/components/SectionFilter.vue2.js +21 -21
- package/dist/components/SectionFilterButton.vue.js +7 -7
- package/dist/components/Server/ServerDropdown.vue.js +32 -32
- package/dist/components/Server/ServerDropdownItem.vue2.js +39 -39
- package/dist/components/Server/ServerSelector.vue.js +27 -27
- package/dist/components/Server/ServerVariablesForm.vue.js +26 -26
- package/dist/components/Server/ServerVariablesSelect.vue.js +21 -21
- package/dist/components/Server/ServerVariablesTextbox.vue.js +10 -10
- package/dist/components/Server/types.d.ts +2 -1
- package/dist/components/Server/types.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +18 -18
- package/dist/components/SideNav/SideNavRouterLink.vue.js +13 -13
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +11 -11
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue2.js +28 -28
- package/dist/components/Sidebar/SidebarButton.vue.js +12 -12
- package/dist/components/Sidebar/SidebarListElement.vue2.js +34 -34
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +33 -33
- package/dist/components/TopNav/TopNavItem.vue2.js +41 -41
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +43 -43
- package/dist/data/httpHeaders.d.ts +2 -1
- package/dist/data/httpHeaders.d.ts.map +1 -1
- package/dist/hooks/useClientConfig.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/hooks/useSidebar.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.js +5 -5
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +5 -5
- package/dist/plugins/plugin-manager.d.ts +0 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/routes.d.ts +0 -10
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +0 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +40 -32
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
- package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +83 -82
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -3
- package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
- package/dist/v2/components/data-table/DataTable.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
- package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
- package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
- package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
- package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
- package/dist/v2/components/resize/Resize.vue2.js +11 -11
- package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
- package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
- package/dist/v2/features/app/App.vue.js +25 -25
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +55 -61
- package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
- package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
- package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
- package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
- package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
- package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
- package/dist/v2/features/collection/components/Environment.vue.js +10 -10
- package/dist/v2/features/collection/components/Form.vue.js +21 -21
- package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
- package/dist/v2/features/collection/components/Servers.vue.js +37 -37
- package/dist/v2/features/collection/components/Settings.vue.js +22 -22
- package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
- package/dist/v2/features/command-palette/types.d.ts +11 -10
- package/dist/v2/features/command-palette/types.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
- package/dist/v2/features/environments/components/Environment.vue.js +16 -16
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +57 -56
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +5 -4
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +41 -39
- package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
- package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
- package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
- package/dist/v2/features/search/types.d.ts +5 -4
- package/dist/v2/features/search/types.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
- package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
- package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +0 -2
- package/dist/v2/helpers/plugins.d.ts +2 -2
- package/dist/v2/helpers/plugins.d.ts.map +1 -1
- package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
- package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
- package/dist/views/Cookies/CookieModal.vue2.js +26 -26
- package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
- package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
- package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
- package/dist/views/Request/Request.vue2.js +55 -55
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
- package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
- package/dist/views/Request/RequestSection/index.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
- package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
- package/package.json +24 -24
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
- package/dist/components/ScreenReader.vue.d.ts +0 -20
- package/dist/components/ScreenReader.vue.d.ts.map +0 -1
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
- package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as Q, useAttrs as G, ref as
|
|
1
|
+
import { defineComponent as Q, useAttrs as G, ref as d, computed as s, toRef as r, watch as X, createElementBlock as i, openBlock as o, Fragment as Y, createBlock as y, createCommentVNode as c, normalizeClass as Z, createElementVNode as V, toDisplayString as _, mergeProps as ee, unref as O, withKeys as b, withModifiers as $, createTextVNode as p, renderSlot as I } from "vue";
|
|
2
2
|
import { isDefined as te } from "@scalar/helpers/array/is-defined";
|
|
3
|
-
import { useCodeMirror as ne, useDropdown as le, colorPicker as
|
|
4
|
-
import { nanoid as
|
|
5
|
-
import
|
|
3
|
+
import { useCodeMirror as ne, useDropdown as le, colorPicker as ae } from "@scalar/use-codemirror";
|
|
4
|
+
import { nanoid as oe } from "nanoid";
|
|
5
|
+
import B from "../data-table/DataTableInputSelect.vue.js";
|
|
6
6
|
import re from "../../features/environments/components/EnvironmentVariablesDropdown.vue.js";
|
|
7
|
-
import { pillPlugin as ie, backspaceCommand as
|
|
8
|
-
const
|
|
7
|
+
import { pillPlugin as ie, backspaceCommand as ue } from "./code-variable-widget.js";
|
|
8
|
+
const de = { class: "whitespace-nowrap" }, se = ["id"], ce = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "z-context text-c-2 absolute right-1.5 bottom-1 hidden font-sans group-has-[:focus-visible]/input:block",
|
|
11
11
|
role: "alert"
|
|
12
|
-
},
|
|
12
|
+
}, fe = {
|
|
13
13
|
key: 5,
|
|
14
14
|
class: "centered-y text-orange absolute right-7 text-xs"
|
|
15
15
|
}, me = {
|
|
@@ -20,7 +20,7 @@ const ue = { class: "whitespace-nowrap" }, de = ["id"], fe = {
|
|
|
20
20
|
class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pt-px pr-2 opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.alert]:shadow-none group-[.error]:bg-transparent group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
|
|
21
21
|
}, be = {
|
|
22
22
|
inheritAttrs: !1
|
|
23
|
-
},
|
|
23
|
+
}, ke = /* @__PURE__ */ Q({
|
|
24
24
|
...be,
|
|
25
25
|
__name: "CodeInput",
|
|
26
26
|
props: {
|
|
@@ -53,83 +53,83 @@ const ue = { class: "whitespace-nowrap" }, de = ["id"], fe = {
|
|
|
53
53
|
handleFieldSubmit: { type: Function }
|
|
54
54
|
},
|
|
55
55
|
emits: ["update:modelValue", "submit", "blur", "curl", "redirectToEnvironment"],
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
56
|
+
setup(e, { expose: M, emit: N }) {
|
|
57
|
+
const u = N, k = G(), R = k.id || `id-${oe()}`, h = d(!1), q = s(() => e.enum?.length ? !1 : e.type === "boolean" || Array.isArray(e.type) && e.type.includes("boolean")), C = s(() => e.nullable ? ["true", "false", "null"] : ["true", "false"]), z = s(() => Array.isArray(e.type) ? e.type.find((t) => t !== "null") ?? "string" : e.type), E = (t) => {
|
|
58
|
+
if (!e.alwaysEmitChange && t === f(e.modelValue))
|
|
59
59
|
return;
|
|
60
|
-
if (typeof
|
|
61
|
-
|
|
60
|
+
if (typeof t == "string" && e.importCurl && t.trim().toLowerCase().startsWith("curl")) {
|
|
61
|
+
u("curl", t), l.value && l.value.dispatch({
|
|
62
62
|
changes: {
|
|
63
63
|
from: 0,
|
|
64
64
|
to: l.value.state.doc.length,
|
|
65
|
-
insert:
|
|
65
|
+
insert: f(e.modelValue)
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
const n = T(
|
|
71
|
-
|
|
72
|
-
}, g = (
|
|
73
|
-
|
|
74
|
-
}, S = (
|
|
75
|
-
h.value = !1,
|
|
76
|
-
},
|
|
77
|
-
|
|
70
|
+
const n = T(t);
|
|
71
|
+
e.handleFieldChange ? e.handleFieldChange(n) : u("update:modelValue", n);
|
|
72
|
+
}, g = (t) => {
|
|
73
|
+
e.handleFieldSubmit ? e.handleFieldSubmit(t) : u("submit", t);
|
|
74
|
+
}, S = (t) => {
|
|
75
|
+
h.value = !1, e.emitOnBlur && e.modelValue && g(t), u("blur", t);
|
|
76
|
+
}, v = (t) => {
|
|
77
|
+
u("update:modelValue", t);
|
|
78
78
|
}, W = () => {
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
-
}, K =
|
|
79
|
+
const t = [...e.extensions];
|
|
80
|
+
return e.colorPicker && t.push(ae), t;
|
|
81
|
+
}, K = s(
|
|
82
82
|
() => ie({
|
|
83
|
-
environment:
|
|
84
|
-
isReadOnly:
|
|
83
|
+
environment: e.environment,
|
|
84
|
+
isReadOnly: e.layout === "modal"
|
|
85
85
|
})
|
|
86
|
-
), L =
|
|
86
|
+
), L = s(() => [
|
|
87
87
|
...W(),
|
|
88
88
|
K.value,
|
|
89
|
-
|
|
90
|
-
]), P =
|
|
91
|
-
const n =
|
|
92
|
-
if (Array.isArray(
|
|
89
|
+
ue
|
|
90
|
+
]), P = d(null), f = (t) => typeof t == "object" ? JSON.stringify(t) : String(t ?? ""), T = (t) => {
|
|
91
|
+
const n = t.trim(), a = n.startsWith("[") || n.startsWith("{"), F = typeof e.modelValue;
|
|
92
|
+
if (Array.isArray(e.modelValue) && !a && n.includes(","))
|
|
93
93
|
return n.split(",").map((H) => H.trim());
|
|
94
|
-
if (
|
|
94
|
+
if (a || F === "number" || F === "boolean")
|
|
95
95
|
try {
|
|
96
|
-
return JSON.parse(
|
|
96
|
+
return JSON.parse(t);
|
|
97
97
|
} catch {
|
|
98
98
|
}
|
|
99
|
-
return
|
|
99
|
+
return t;
|
|
100
100
|
}, { codeMirror: l } = ne({
|
|
101
|
-
content: r(() =>
|
|
102
|
-
onChange: (
|
|
103
|
-
E(
|
|
101
|
+
content: r(() => f(e.modelValue)),
|
|
102
|
+
onChange: (t) => {
|
|
103
|
+
E(t), J();
|
|
104
104
|
},
|
|
105
105
|
onFocus: () => {
|
|
106
106
|
h.value = !0;
|
|
107
107
|
},
|
|
108
108
|
onBlur: S,
|
|
109
109
|
codeMirrorRef: P,
|
|
110
|
-
disableTabIndent: r(() =>
|
|
111
|
-
disableEnter: r(() =>
|
|
112
|
-
disableCloseBrackets: r(() =>
|
|
113
|
-
lineNumbers: r(() =>
|
|
114
|
-
language: r(() =>
|
|
115
|
-
lint: r(() =>
|
|
110
|
+
disableTabIndent: r(() => e.disableTabIndent),
|
|
111
|
+
disableEnter: r(() => e.disableEnter),
|
|
112
|
+
disableCloseBrackets: r(() => e.disableCloseBrackets),
|
|
113
|
+
lineNumbers: r(() => e.lineNumbers),
|
|
114
|
+
language: r(() => e.language),
|
|
115
|
+
lint: r(() => e.lint),
|
|
116
116
|
extensions: L,
|
|
117
|
-
placeholder: r(() =>
|
|
117
|
+
placeholder: r(() => e.placeholder)
|
|
118
118
|
});
|
|
119
119
|
X(l, () => {
|
|
120
|
-
l.value && Object.hasOwn(
|
|
120
|
+
l.value && Object.hasOwn(k, "autofocus") && l.value.focus();
|
|
121
121
|
});
|
|
122
|
-
const
|
|
122
|
+
const w = d(!1), A = d(""), D = d({ left: 0, top: 0 }), x = d(null), { handleDropdownSelect: j, updateDropdownVisibility: J } = le({
|
|
123
123
|
codeMirror: l,
|
|
124
124
|
query: A,
|
|
125
|
-
showDropdown:
|
|
125
|
+
showDropdown: w,
|
|
126
126
|
dropdownPosition: D
|
|
127
|
-
}), U =
|
|
128
|
-
if (
|
|
129
|
-
|
|
127
|
+
}), U = s(() => w.value && e.withVariables && e.layout !== "modal" && !!e.environment), m = (t, n) => {
|
|
128
|
+
if (w.value) {
|
|
129
|
+
t === "down" || t === "up" ? (n.preventDefault(), x.value?.handleArrowKey(t)) : t === "enter" && (n.preventDefault(), x.value?.handleSelect());
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
|
-
|
|
132
|
+
t === "escape" && !e.disableTabIndent && n.stopPropagation(), t === "enter" && n.target instanceof HTMLDivElement && g(n.target.textContent ?? "");
|
|
133
133
|
};
|
|
134
134
|
return M({
|
|
135
135
|
/**
|
|
@@ -137,10 +137,10 @@ const ue = { class: "whitespace-nowrap" }, de = ["id"], fe = {
|
|
|
137
137
|
*
|
|
138
138
|
* @param cursorAtEnd boolean place the cursor at the end of the input
|
|
139
139
|
*/
|
|
140
|
-
focus: (
|
|
141
|
-
if (!l.value || (l.value.focus(), !te(
|
|
140
|
+
focus: (t) => {
|
|
141
|
+
if (!l.value || (l.value.focus(), !te(t)))
|
|
142
142
|
return;
|
|
143
|
-
const n =
|
|
143
|
+
const n = t === "start" ? 0 : t === "end" ? l.value.state.doc.length : t;
|
|
144
144
|
l.value.dispatch({
|
|
145
145
|
selection: { anchor: n },
|
|
146
146
|
scrollIntoView: !0
|
|
@@ -152,40 +152,40 @@ const ue = { class: "whitespace-nowrap" }, de = ["id"], fe = {
|
|
|
152
152
|
handleBlur: S,
|
|
153
153
|
booleanOptions: C,
|
|
154
154
|
codeMirror: l,
|
|
155
|
-
modelValue:
|
|
155
|
+
modelValue: e.modelValue,
|
|
156
156
|
cursorPosition: () => l.value?.state.selection.main.head,
|
|
157
|
-
serializeValue:
|
|
157
|
+
serializeValue: f,
|
|
158
158
|
deserializeValue: T
|
|
159
|
-
}), (
|
|
160
|
-
e.disabled ? (
|
|
159
|
+
}), (t, n) => (o(), i(Y, null, [
|
|
160
|
+
e.disabled ? (o(), i("div", {
|
|
161
161
|
key: 0,
|
|
162
162
|
class: Z(["text-c-2 flex cursor-default items-center justify-center", e.layout === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
|
|
163
163
|
"data-testid": "code-input-disabled"
|
|
164
164
|
}, [
|
|
165
|
-
V("span",
|
|
166
|
-
], 2)) :
|
|
165
|
+
V("span", de, _(e.modelValue), 1)
|
|
166
|
+
], 2)) : e.enum?.length ? (o(), y(B, {
|
|
167
167
|
key: 1,
|
|
168
|
-
default:
|
|
168
|
+
default: e.default,
|
|
169
169
|
modelValue: e.modelValue,
|
|
170
170
|
type: z.value,
|
|
171
|
-
value:
|
|
172
|
-
"onUpdate:modelValue":
|
|
173
|
-
}, null, 8, ["default", "modelValue", "type", "value"])) : q.value ? (
|
|
171
|
+
value: e.enum,
|
|
172
|
+
"onUpdate:modelValue": v
|
|
173
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : q.value ? (o(), y(B, {
|
|
174
174
|
key: 2,
|
|
175
|
-
default:
|
|
175
|
+
default: e.default,
|
|
176
176
|
modelValue: e.modelValue,
|
|
177
177
|
value: C.value,
|
|
178
|
-
"onUpdate:modelValue":
|
|
179
|
-
}, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (
|
|
178
|
+
"onUpdate:modelValue": v
|
|
179
|
+
}, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (o(), y(B, {
|
|
180
180
|
key: 3,
|
|
181
|
-
default:
|
|
181
|
+
default: e.default,
|
|
182
182
|
modelValue: e.modelValue,
|
|
183
183
|
value: e.examples,
|
|
184
|
-
"onUpdate:modelValue":
|
|
185
|
-
}, null, 8, ["default", "modelValue", "value"])) : (
|
|
184
|
+
"onUpdate:modelValue": v
|
|
185
|
+
}, null, 8, ["default", "modelValue", "value"])) : (o(), i("div", ee({
|
|
186
186
|
key: 4,
|
|
187
187
|
id: O(R)
|
|
188
|
-
},
|
|
188
|
+
}, t.$attrs, {
|
|
189
189
|
ref_key: "codeMirrorRef",
|
|
190
190
|
ref: P,
|
|
191
191
|
class: ["group/input group-[.alert]:outline-orange group-[.error]:outline-red font-code peer relative w-full overflow-hidden text-xs leading-[1.44] whitespace-nowrap -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
|
|
@@ -193,40 +193,40 @@ const ue = { class: "whitespace-nowrap" }, de = ["id"], fe = {
|
|
|
193
193
|
"flow-code-input--error": e.error
|
|
194
194
|
}],
|
|
195
195
|
onKeydown: [
|
|
196
|
-
n[0] || (n[0] = b($((
|
|
197
|
-
n[1] || (n[1] = b((
|
|
198
|
-
n[2] || (n[2] = b((
|
|
199
|
-
n[3] || (n[3] = b($((
|
|
196
|
+
n[0] || (n[0] = b($((a) => m("down", a), ["stop"]), ["down"])),
|
|
197
|
+
n[1] || (n[1] = b((a) => m("enter", a), ["enter"])),
|
|
198
|
+
n[2] || (n[2] = b((a) => m("escape", a), ["escape"])),
|
|
199
|
+
n[3] || (n[3] = b($((a) => m("up", a), ["stop"]), ["up"]))
|
|
200
200
|
]
|
|
201
201
|
}), [
|
|
202
|
-
e.disableTabIndent ?
|
|
203
|
-
|
|
202
|
+
e.disableTabIndent ? c("", !0) : (o(), i("div", ce, [...n[5] || (n[5] = [
|
|
203
|
+
p(" Press ", -1),
|
|
204
204
|
V("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
|
|
205
|
-
|
|
205
|
+
p(" then ", -1),
|
|
206
206
|
V("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
|
|
207
|
-
|
|
207
|
+
p(" to exit ", -1)
|
|
208
208
|
])]))
|
|
209
|
-
], 16,
|
|
210
|
-
|
|
211
|
-
I(
|
|
212
|
-
])) :
|
|
213
|
-
|
|
214
|
-
I(
|
|
215
|
-
])) :
|
|
216
|
-
e.required ? (
|
|
217
|
-
U.value && e.environment ? (
|
|
209
|
+
], 16, se)),
|
|
210
|
+
t.$slots.warning ? (o(), i("div", fe, [
|
|
211
|
+
I(t.$slots, "warning", {}, void 0, !0)
|
|
212
|
+
])) : c("", !0),
|
|
213
|
+
t.$slots.icon ? (o(), i("div", me, [
|
|
214
|
+
I(t.$slots, "icon", {}, void 0, !0)
|
|
215
|
+
])) : c("", !0),
|
|
216
|
+
e.required ? (o(), i("div", ye, " Required ")) : c("", !0),
|
|
217
|
+
U.value && e.environment ? (o(), y(re, {
|
|
218
218
|
key: 8,
|
|
219
219
|
ref_key: "dropdownRef",
|
|
220
|
-
ref:
|
|
220
|
+
ref: x,
|
|
221
221
|
dropdownPosition: D.value,
|
|
222
222
|
environment: e.environment,
|
|
223
223
|
query: A.value,
|
|
224
|
-
onRedirect: n[4] || (n[4] = (
|
|
224
|
+
onRedirect: n[4] || (n[4] = (a) => u("redirectToEnvironment")),
|
|
225
225
|
onSelect: O(j)
|
|
226
|
-
}, null, 8, ["dropdownPosition", "environment", "query", "onSelect"])) :
|
|
226
|
+
}, null, 8, ["dropdownPosition", "environment", "query", "onSelect"])) : c("", !0)
|
|
227
227
|
], 64));
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
export {
|
|
231
|
-
|
|
231
|
+
ke as default
|
|
232
232
|
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineComponent as r, createElementBlock as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as r, createElementBlock as t, openBlock as l, normalizeProps as c, guardReactiveProps as i, unref as m, createElementVNode as u, normalizeStyle as d, normalizeClass as p, createCommentVNode as f, renderSlot as a } from "vue";
|
|
2
|
+
import { useBindCx as b } from "@scalar/components";
|
|
3
|
+
const y = ["role"], v = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "sr-only"
|
|
6
|
-
},
|
|
6
|
+
}, h = /* @__PURE__ */ r({
|
|
7
7
|
__name: "DataTable",
|
|
8
8
|
props: {
|
|
9
9
|
columns: {},
|
|
10
10
|
scroll: { type: Boolean },
|
|
11
11
|
presentational: { type: Boolean }
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const { cx:
|
|
15
|
-
return (
|
|
16
|
-
m(
|
|
13
|
+
setup(e) {
|
|
14
|
+
const { cx: n } = b();
|
|
15
|
+
return (o, w) => (l(), t("div", c(i(
|
|
16
|
+
m(n)(
|
|
17
17
|
e.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible",
|
|
18
18
|
"scalar-data-table"
|
|
19
19
|
)
|
|
20
20
|
)), [
|
|
21
|
-
|
|
22
|
-
class:
|
|
21
|
+
u("table", {
|
|
22
|
+
class: p(["mb-0 grid min-h-8 auto-rows-auto", { "w-max min-w-full": e.scroll }]),
|
|
23
23
|
role: e.presentational ? "presentation" : "table",
|
|
24
|
-
style:
|
|
24
|
+
style: d({
|
|
25
25
|
gridTemplateColumns: e.columns.map((s) => s || "1fr").join(" ")
|
|
26
26
|
})
|
|
27
27
|
}, [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
])) :
|
|
31
|
-
|
|
32
|
-
], 14,
|
|
28
|
+
o.$slots.caption ? (l(), t("caption", v, [
|
|
29
|
+
a(o.$slots, "caption")
|
|
30
|
+
])) : f("", !0),
|
|
31
|
+
a(o.$slots, "default")
|
|
32
|
+
], 14, y)
|
|
33
33
|
], 16));
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
h as default
|
|
38
38
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
const f = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as o, createBlock as a, openBlock as n, resolveDynamicComponent as l, mergeProps as s, unref as b, withCtx as d, renderSlot as p } from "vue";
|
|
2
|
+
import { useBindCx as i } from "@scalar/components";
|
|
3
|
+
const f = /* @__PURE__ */ o({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "DataTableCell",
|
|
6
6
|
props: {
|
|
7
7
|
is: { default: "td" }
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const { cx: r } =
|
|
11
|
-
return (
|
|
12
|
-
|
|
9
|
+
setup(e) {
|
|
10
|
+
const { cx: r } = i();
|
|
11
|
+
return (t, m) => (n(), a(l(e.is), s(
|
|
12
|
+
b(r)(
|
|
13
13
|
"box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-base last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
|
|
14
14
|
),
|
|
15
15
|
{ class: "group-[.alert]:bg-b-alert group-[.error]:bg-b-danger" }
|
|
16
16
|
), {
|
|
17
|
-
default:
|
|
18
|
-
|
|
17
|
+
default: d(() => [
|
|
18
|
+
p(t.$slots, "default")
|
|
19
19
|
]),
|
|
20
20
|
_: 3
|
|
21
21
|
}, 16));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cva as p, ScalarIcon as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as i, createBlock as r, openBlock as d, withCtx as u, createElementVNode as t, normalizeClass as l, unref as o, createVNode as m } from "vue";
|
|
2
|
+
import { cva as p, ScalarIcon as b } from "@scalar/components";
|
|
3
|
+
import f from "./DataTableCell.vue.js";
|
|
4
|
+
const h = ["checked", "disabled"], x = /* @__PURE__ */ i({
|
|
5
5
|
__name: "DataTableCheckbox",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: { type: Boolean },
|
|
@@ -9,8 +9,8 @@ const f = ["checked", "disabled"], y = /* @__PURE__ */ c({
|
|
|
9
9
|
align: { default: "center" }
|
|
10
10
|
},
|
|
11
11
|
emits: ["update:modelValue"],
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(e) {
|
|
13
|
+
const c = p({
|
|
14
14
|
base: "w-8 h-8 flex items-center justify-center text-border peer-checked:text-c-1 pointer-events-none absolute",
|
|
15
15
|
variants: {
|
|
16
16
|
align: {
|
|
@@ -19,25 +19,25 @@ const f = ["checked", "disabled"], y = /* @__PURE__ */ c({
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
return (
|
|
23
|
-
default:
|
|
24
|
-
|
|
22
|
+
return (n, a) => (d(), r(f, { class: "group/cell relative flex min-w-8" }, {
|
|
23
|
+
default: u(() => [
|
|
24
|
+
t("input", {
|
|
25
25
|
checked: e.modelValue,
|
|
26
26
|
class: "peer absolute inset-0 cursor-pointer opacity-0 disabled:cursor-default",
|
|
27
27
|
disabled: !!e.disabled,
|
|
28
28
|
type: "checkbox",
|
|
29
|
-
onChange:
|
|
30
|
-
}, null, 40,
|
|
31
|
-
|
|
32
|
-
class:
|
|
29
|
+
onChange: a[0] || (a[0] = (s) => n.$emit("update:modelValue", s.target.checked))
|
|
30
|
+
}, null, 40, h),
|
|
31
|
+
t("div", {
|
|
32
|
+
class: l(o(c)({ align: e.align }))
|
|
33
33
|
}, [
|
|
34
|
-
|
|
35
|
-
class:
|
|
34
|
+
t("div", {
|
|
35
|
+
class: l([
|
|
36
36
|
"absolute m-auto size-3/4 rounded border-[1px] opacity-0",
|
|
37
37
|
!e.disabled && "group-has-[:focus-visible]/cell:border-c-accent group-hover/cell:opacity-100 group-has-[:focus-visible]/cell:opacity-100"
|
|
38
38
|
])
|
|
39
39
|
}, null, 2),
|
|
40
|
-
|
|
40
|
+
m(o(b), {
|
|
41
41
|
icon: "Checkmark",
|
|
42
42
|
size: "xs",
|
|
43
43
|
thickness: "2.5"
|
|
@@ -49,5 +49,5 @@ const f = ["checked", "disabled"], y = /* @__PURE__ */ c({
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
x as default
|
|
53
53
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as b, ref as y, useTemplateRef as
|
|
2
|
-
import { ScalarIconButton as
|
|
3
|
-
import { ScalarIconX as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as b, ref as y, useTemplateRef as x, computed as B, createBlock as s, openBlock as a, normalizeClass as $, withCtx as I, createElementBlock as r, createCommentVNode as m, createElementVNode as O, renderSlot as c, createTextVNode as S, Fragment as E, mergeProps as v, unref as u } from "vue";
|
|
2
|
+
import { ScalarIconButton as V } from "@scalar/components";
|
|
3
|
+
import { ScalarIconX as h, ScalarIconEye as A, ScalarIconEyeSlash as T } from "@scalar/icons";
|
|
4
|
+
import W from "./DataTableCell.vue.js";
|
|
5
|
+
import q from "./DataTableInputSelect.vue.js";
|
|
6
|
+
import F from "../code-input/CodeInput.vue.js";
|
|
7
|
+
const N = ["for"], P = { class: "relative flex min-w-0 flex-1" }, D = ["readOnly", "type", "value"], U = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "centered-y text-orange absolute right-7 text-xs"
|
|
10
|
-
},
|
|
10
|
+
}, G = /* @__PURE__ */ b({
|
|
11
11
|
inheritAttrs: !1,
|
|
12
12
|
__name: "DataTableInput",
|
|
13
13
|
props: {
|
|
@@ -26,49 +26,49 @@ const P = ["for"], D = { class: "relative flex min-w-0 flex-1" }, U = ["readOnly
|
|
|
26
26
|
lineWrapping: { type: Boolean, default: !1 }
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
() =>
|
|
29
|
+
setup(e, { emit: w }) {
|
|
30
|
+
const t = e, d = w, i = y(!0), k = y(!1), f = x("codeInput"), g = () => !k.value && d("inputBlur"), p = B(
|
|
31
|
+
() => t.type === "password" ? "text" : t.type ?? "text"
|
|
32
32
|
), C = () => {
|
|
33
|
-
!
|
|
33
|
+
!t.enum?.length && !t.readOnly && f.value?.focus();
|
|
34
34
|
};
|
|
35
|
-
return (
|
|
36
|
-
class:
|
|
35
|
+
return (n, l) => (a(), s(W, {
|
|
36
|
+
class: $(["relative flex", e.containerClass])
|
|
37
37
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
|
|
38
|
+
default: I(() => [
|
|
39
|
+
n.$slots.default ? (a(), r("div", {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "text-c-1 flex items-center pr-0 pl-3",
|
|
42
42
|
for: e.id ?? "",
|
|
43
43
|
onClick: C
|
|
44
44
|
}, [
|
|
45
|
-
|
|
46
|
-
l[6] || (l[6] =
|
|
47
|
-
], 8,
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
c(n.$slots, "default", {}, void 0, !0),
|
|
46
|
+
l[6] || (l[6] = S(": ", -1))
|
|
47
|
+
], 8, N)) : m("", !0),
|
|
48
|
+
O("div", P, [
|
|
49
|
+
t.enum && t.enum.length ? (a(), s(q, {
|
|
50
50
|
key: 0,
|
|
51
|
-
canAddCustomValue:
|
|
52
|
-
modelValue:
|
|
53
|
-
value:
|
|
54
|
-
"onUpdate:modelValue": l[0] || (l[0] = (o) =>
|
|
55
|
-
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (
|
|
56
|
-
|
|
51
|
+
canAddCustomValue: t.canAddCustomEnumValue,
|
|
52
|
+
modelValue: t.modelValue,
|
|
53
|
+
value: t.enum,
|
|
54
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => d("update:modelValue", o))
|
|
55
|
+
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (a(), r(E, { key: 1 }, [
|
|
56
|
+
i.value && e.type === "password" ? (a(), r("input", v({ key: 0 }, e.id ? { ...n.$attrs, id: e.id } : n.$attrs, {
|
|
57
57
|
autocomplete: "off",
|
|
58
58
|
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" }],
|
|
59
59
|
"data-1p-ignore": "",
|
|
60
60
|
readOnly: e.readOnly,
|
|
61
61
|
spellcheck: "false",
|
|
62
|
-
type:
|
|
62
|
+
type: p.value,
|
|
63
63
|
value: e.modelValue,
|
|
64
|
-
onInput: l[1] || (l[1] = (o) =>
|
|
64
|
+
onInput: l[1] || (l[1] = (o) => d(
|
|
65
65
|
"update:modelValue",
|
|
66
66
|
o.target.value ?? ""
|
|
67
67
|
))
|
|
68
|
-
}), null, 16,
|
|
68
|
+
}), null, 16, D)) : (a(), s(u(F), v({ key: 1 }, n.$attrs, {
|
|
69
69
|
id: e.id,
|
|
70
70
|
ref_key: "codeInput",
|
|
71
|
-
ref:
|
|
71
|
+
ref: f,
|
|
72
72
|
class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none -outline-offset-1", [
|
|
73
73
|
e.type === "password" && e.description && "pr-12",
|
|
74
74
|
e.description && "pr-8",
|
|
@@ -85,37 +85,37 @@ const P = ["for"], D = { class: "relative flex min-w-0 flex-1" }, U = ["readOnly
|
|
|
85
85
|
readOnly: e.readOnly,
|
|
86
86
|
required: !!e.required,
|
|
87
87
|
spellcheck: "false",
|
|
88
|
-
type:
|
|
88
|
+
type: p.value,
|
|
89
89
|
onBlur: g,
|
|
90
|
-
onFocus: l[2] || (l[2] = (o) =>
|
|
91
|
-
"onUpdate:modelValue": l[3] || (l[3] = (o) =>
|
|
90
|
+
onFocus: l[2] || (l[2] = (o) => d("inputFocus")),
|
|
91
|
+
"onUpdate:modelValue": l[3] || (l[3] = (o) => d("update:modelValue", o))
|
|
92
92
|
}), null, 16, ["id", "class", "description", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type"]))
|
|
93
93
|
], 64))
|
|
94
94
|
]),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
])) :
|
|
98
|
-
|
|
99
|
-
e.modelValue ? (
|
|
95
|
+
n.$slots.warning ? (a(), r("div", U, [
|
|
96
|
+
c(n.$slots, "warning", {}, void 0, !0)
|
|
97
|
+
])) : m("", !0),
|
|
98
|
+
c(n.$slots, "icon", {}, void 0, !0),
|
|
99
|
+
e.modelValue ? (a(), s(u(V), {
|
|
100
100
|
key: 2,
|
|
101
101
|
class: "-ml-.25 h-6 w-6 self-center p-1.25",
|
|
102
|
-
icon:
|
|
102
|
+
icon: u(h),
|
|
103
103
|
label: "Clear Value",
|
|
104
|
-
onClick: l[4] || (l[4] = (o) =>
|
|
105
|
-
}, null, 8, ["icon"])) :
|
|
106
|
-
e.type === "password" ? (
|
|
104
|
+
onClick: l[4] || (l[4] = (o) => d("update:modelValue", ""))
|
|
105
|
+
}, null, 8, ["icon"])) : m("", !0),
|
|
106
|
+
e.type === "password" ? (a(), s(u(V), {
|
|
107
107
|
key: 3,
|
|
108
108
|
class: "-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25",
|
|
109
109
|
"data-testid": "data-table-password-toggle",
|
|
110
|
-
icon:
|
|
111
|
-
label:
|
|
112
|
-
onClick: l[5] || (l[5] = (o) =>
|
|
113
|
-
}, null, 8, ["icon", "label"])) :
|
|
110
|
+
icon: i.value ? u(A) : u(T),
|
|
111
|
+
label: i.value ? "Show Password" : "Hide Password",
|
|
112
|
+
onClick: l[5] || (l[5] = (o) => i.value = !i.value)
|
|
113
|
+
}, null, 8, ["icon", "label"])) : m("", !0)
|
|
114
114
|
]),
|
|
115
115
|
_: 3
|
|
116
116
|
}, 8, ["class"]));
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
export {
|
|
120
|
-
|
|
120
|
+
G as default
|
|
121
121
|
};
|