@scalar/api-client 2.15.0 → 2.17.1
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 +166 -0
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/libs/errors.d.ts +1 -0
- package/dist/libs/errors.d.ts.map +1 -1
- package/dist/libs/errors.js +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +41 -35
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +28 -38
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +84 -45
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -11
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +28 -35
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +22 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +3 -9
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +56 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +10 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +46 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +45 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.js +66 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +9 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts +16 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +4 -0
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +17 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +9 -3
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +21 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +53 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.js +120 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +89 -110
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +8 -13
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +22 -28
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +19 -8
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -24
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +12 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +20 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts +10 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +4 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +14 -12
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +191 -169
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +10 -10
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +2 -1
- 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 +15 -19
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +2 -2
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/types.d.ts +16 -0
- package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +15 -10
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +158 -125
- 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 +59 -50
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +148 -149
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
- 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 +13 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js +27 -27
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +97 -87
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
- 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 +59 -56
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
- 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 -24
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
- 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 +44 -43
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +7 -6
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/code-input/CodeInput.vue2.js +61 -59
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
- package/dist/v2/components/resize/index.d.ts +0 -1
- package/dist/v2/components/resize/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +5 -5
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +49 -47
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.d.ts +3 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +128 -139
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +137 -105
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/{ItemDecorator.vue.d.ts → SidebarItemMenu.vue.d.ts} +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +129 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +4 -0
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
- 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 +8 -8
- package/dist/v2/features/app/helpers/routes.d.ts +32 -6
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +25 -16
- package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
- package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
- package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
- package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
- package/dist/v2/{hooks/use-workspace-client-events.js → features/app/hooks/use-workspace-client-app-events.js} +48 -45
- package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
- package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
- package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
- package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
- package/dist/v2/features/collection/components/Environment.vue.js +32 -1
- package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
- package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
- package/dist/v2/features/collection/components/Servers.vue.js +142 -2
- package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
- package/dist/v2/features/collection/components/Settings.vue.js +58 -2
- package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
- package/dist/v2/features/modal/Modal.vue.d.ts +23 -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 +118 -31
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +59 -28
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
- package/dist/v2/features/operation/index.d.ts +0 -1
- package/dist/v2/features/operation/index.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
- package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
- package/dist/v2/helpers/generate-location-id.d.ts +19 -0
- package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
- package/dist/v2/helpers/generate-location-id.js +10 -0
- package/dist/v2/helpers/get-active-environment.d.ts +5 -0
- package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-environment.js +22 -0
- package/dist/v2/helpers/get-tab-details.d.ts +2 -2
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/plugins.d.ts +59 -0
- package/dist/v2/helpers/plugins.d.ts.map +1 -0
- package/dist/v2/helpers/plugins.js +11 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/v2/hooks/use-scroll-lock.js +21 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +20 -20
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
- package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/ItemDecorator.vue.js +0 -138
- package/dist/v2/features/app/components/ItemDecorator.vue2.js +0 -4
- package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.js +0 -51
- package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
- package/dist/v2/plugins.d.ts +0 -44
- package/dist/v2/plugins.d.ts.map +0 -1
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { ScalarIconDotsThree as
|
|
4
|
-
import { getParentEntry as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { dragHandleFactory as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as q, mergeModels as C, computed as b, capitalize as V, useModel as W, ref as G, createElementBlock as I, openBlock as m, createVNode as l, createBlock as g, createCommentVNode as f, unref as n, createSlots as R, withCtx as r, createTextVNode as y, withKeys as k, withModifiers as p, toDisplayString as j, createElementVNode as d, normalizeClass as F, nextTick as H } from "vue";
|
|
2
|
+
import { useModal as L, ScalarSidebarItem as E, ScalarIconButton as U, ScalarButton as O, ScalarModal as J } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as Y, ScalarIconDotsThree as Q, ScalarIconGlobe as X } from "@scalar/icons";
|
|
4
|
+
import { getParentEntry as w } from "@scalar/workspace-store/navigation";
|
|
5
|
+
import Z from "../../../../assets/rabbit.ascii.js";
|
|
6
|
+
import _ from "../../../../assets/rabbitjump.ascii.js";
|
|
7
|
+
import $ from "../../../../components/ScalarAsciiArt.vue.js";
|
|
8
|
+
import ee from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
9
|
+
import te from "./SidebarItemMenu.vue.js";
|
|
10
|
+
import { dragHandleFactory as ae } from "../../../helpers/drag-handle-factory.js";
|
|
11
|
+
import oe from "../../../components/sidebar/Sidebar.vue.js";
|
|
12
|
+
const ne = { class: "flex" }, se = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "empty-sidebar-item-content overflow-hidden px-2.5 py-2.5"
|
|
15
|
-
},
|
|
15
|
+
}, ie = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, re = { class: "gap-1.5 p-2" }, we = /* @__PURE__ */ q({
|
|
16
16
|
__name: "AppSidebar",
|
|
17
|
-
props: /* @__PURE__ */
|
|
17
|
+
props: /* @__PURE__ */ C({
|
|
18
18
|
layout: {},
|
|
19
19
|
sidebarState: {},
|
|
20
20
|
isWorkspaceOpen: { type: Boolean },
|
|
@@ -31,130 +31,162 @@ const _ = { class: "flex" }, ee = {
|
|
|
31
31
|
},
|
|
32
32
|
sidebarWidthModifiers: {}
|
|
33
33
|
}),
|
|
34
|
-
emits: /* @__PURE__ */
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
() =>
|
|
38
|
-
store:
|
|
39
|
-
sidebarState:
|
|
34
|
+
emits: /* @__PURE__ */ C(["click:workspace", "selectItem", "select:workspace", "create:workspace"], ["update:isSidebarOpen", "update:sidebarWidth"]),
|
|
35
|
+
setup(i, { emit: D }) {
|
|
36
|
+
const c = D, N = b(() => V(i.activeWorkspace.name)), B = W(i, "isSidebarOpen"), M = W(i, "sidebarWidth"), S = b(() => i.sidebarState.items.value.length <= 1), h = b(
|
|
37
|
+
() => ae({
|
|
38
|
+
store: i.store,
|
|
39
|
+
sidebarState: i.sidebarState
|
|
40
40
|
})
|
|
41
|
-
),
|
|
42
|
-
const t =
|
|
41
|
+
), A = (t, e) => h.value.handleDragEnd(t, e), T = (t, e) => h.value.isDroppable(t, e), s = G(null), v = L(), x = b(() => {
|
|
42
|
+
const t = s.value?.item;
|
|
43
43
|
return t?.type === "document" ? "This cannot be undone. You're about to delete the document and all tags and operations inside it." : `Are you sure you want to delete this ${t?.type ?? "item"}? This action cannot be undone.`;
|
|
44
44
|
}), z = () => {
|
|
45
|
-
const t =
|
|
45
|
+
const t = s.value?.item;
|
|
46
46
|
if (!t)
|
|
47
47
|
return;
|
|
48
|
-
const e =
|
|
48
|
+
const e = i.sidebarState.getEntryById(t.id), a = w("document", e), o = w("operation", e);
|
|
49
49
|
if (a) {
|
|
50
50
|
if (t.type === "document")
|
|
51
|
-
|
|
51
|
+
i.eventBus.emit("document:delete:document", { name: a.name });
|
|
52
52
|
else if (t.type === "tag")
|
|
53
|
-
|
|
54
|
-
documentName: a.
|
|
53
|
+
i.eventBus.emit("tag:delete:tag", {
|
|
54
|
+
documentName: a.name,
|
|
55
55
|
name: t.name
|
|
56
56
|
});
|
|
57
57
|
else if (t.type === "operation") {
|
|
58
|
-
if (!
|
|
58
|
+
if (!o)
|
|
59
59
|
return;
|
|
60
|
-
|
|
60
|
+
i.eventBus.emit("operation:delete:operation", {
|
|
61
61
|
meta: {
|
|
62
|
-
method:
|
|
63
|
-
path:
|
|
62
|
+
method: o.method,
|
|
63
|
+
path: o.path
|
|
64
64
|
},
|
|
65
|
-
documentName: a.
|
|
65
|
+
documentName: a.name
|
|
66
66
|
});
|
|
67
67
|
} else if (t.type === "example") {
|
|
68
|
-
if (!
|
|
68
|
+
if (!o)
|
|
69
69
|
return;
|
|
70
|
-
|
|
70
|
+
i.eventBus.emit("operation:delete:example", {
|
|
71
71
|
meta: {
|
|
72
|
-
method:
|
|
73
|
-
path:
|
|
72
|
+
method: o.method,
|
|
73
|
+
path: o.path,
|
|
74
74
|
exampleKey: t.name
|
|
75
75
|
},
|
|
76
|
-
documentName: a.
|
|
76
|
+
documentName: a.name
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
v.hide(), s.value = null;
|
|
80
80
|
}
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
}, u = async (t, e) => {
|
|
82
|
+
if (s.value?.showMenu)
|
|
83
|
+
return;
|
|
84
|
+
const a = t.currentTarget;
|
|
85
|
+
s.value = { item: e, el: a, showMenu: !0 }, await H();
|
|
86
|
+
const o = t instanceof MouseEvent ? new MouseEvent(t.type, t) : new KeyboardEvent(t.type, t);
|
|
87
|
+
s.value?.el.dispatchEvent(o);
|
|
88
|
+
}, K = () => {
|
|
89
|
+
s.value && (s.value.showMenu = !1);
|
|
90
|
+
}, P = (t) => {
|
|
91
|
+
const e = i.sidebarState.getEntryById(t.id), a = w("document", e), o = w("tag", e);
|
|
92
|
+
i.eventBus.emit("ui:open:command-palette", {
|
|
93
|
+
action: "create-request",
|
|
94
|
+
payload: {
|
|
95
|
+
documentId: a?.id,
|
|
96
|
+
tagId: o?.name
|
|
97
|
+
}
|
|
98
|
+
});
|
|
89
99
|
};
|
|
90
|
-
return (t, e) => (m(),
|
|
91
|
-
|
|
92
|
-
isSidebarOpen:
|
|
93
|
-
"onUpdate:isSidebarOpen": e[3] || (e[3] = (a) =>
|
|
94
|
-
sidebarWidth:
|
|
95
|
-
"onUpdate:sidebarWidth": e[4] || (e[4] = (a) =>
|
|
100
|
+
return (t, e) => (m(), I("div", ne, [
|
|
101
|
+
l(n(oe), {
|
|
102
|
+
isSidebarOpen: B.value,
|
|
103
|
+
"onUpdate:isSidebarOpen": e[3] || (e[3] = (a) => B.value = a),
|
|
104
|
+
sidebarWidth: M.value,
|
|
105
|
+
"onUpdate:sidebarWidth": e[4] || (e[4] = (a) => M.value = a),
|
|
96
106
|
activeWorkspace: t.activeWorkspace,
|
|
97
107
|
documents: Object.values(t.store.workspace.documents),
|
|
98
108
|
eventBus: t.eventBus,
|
|
99
|
-
isDroppable:
|
|
109
|
+
isDroppable: T,
|
|
100
110
|
layout: t.layout,
|
|
101
111
|
sidebarState: t.sidebarState,
|
|
102
112
|
workspaces: t.workspaces,
|
|
103
|
-
"onCreate:workspace": e[5] || (e[5] = (a) =>
|
|
104
|
-
onReorder: e[6] || (e[6] = (a,
|
|
105
|
-
"onSelect:workspace": e[7] || (e[7] = (a) =>
|
|
106
|
-
onSelectItem: e[8] || (e[8] = (a) =>
|
|
107
|
-
},
|
|
108
|
-
workspaceButton:
|
|
109
|
-
|
|
113
|
+
"onCreate:workspace": e[5] || (e[5] = (a) => c("create:workspace")),
|
|
114
|
+
onReorder: e[6] || (e[6] = (a, o) => A(a, o)),
|
|
115
|
+
"onSelect:workspace": e[7] || (e[7] = (a) => c("select:workspace", a)),
|
|
116
|
+
onSelectItem: e[8] || (e[8] = (a) => c("selectItem", a))
|
|
117
|
+
}, R({
|
|
118
|
+
workspaceButton: r(() => [
|
|
119
|
+
l(n(E), {
|
|
110
120
|
is: "button",
|
|
111
121
|
active: t.isWorkspaceOpen,
|
|
112
|
-
icon:
|
|
113
|
-
onClick: e[0] || (e[0] = (a) =>
|
|
122
|
+
icon: n(X),
|
|
123
|
+
onClick: e[0] || (e[0] = (a) => c("click:workspace"))
|
|
114
124
|
}, {
|
|
115
|
-
default:
|
|
116
|
-
|
|
125
|
+
default: r(() => [
|
|
126
|
+
y(j(N.value), 1)
|
|
117
127
|
]),
|
|
118
128
|
_: 1
|
|
119
129
|
}, 8, ["active", "icon"])
|
|
120
130
|
]),
|
|
121
|
-
decorator:
|
|
122
|
-
|
|
123
|
-
icon:
|
|
124
|
-
weight: "bold",
|
|
131
|
+
decorator: r(({ item: a }) => [
|
|
132
|
+
l(n(U), {
|
|
133
|
+
icon: n(Q),
|
|
125
134
|
label: "More options",
|
|
126
135
|
size: "sm",
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
weight: "bold",
|
|
137
|
+
"aria-haspopup": "menu",
|
|
138
|
+
"aria-expanded": "false",
|
|
139
|
+
onClick: p((o) => u(o, a), ["stop"]),
|
|
140
|
+
onKeydown: [
|
|
141
|
+
k(p((o) => u(o, a), ["stop"]), ["enter"]),
|
|
142
|
+
k(p((o) => u(o, a), ["stop"]), ["space"]),
|
|
143
|
+
k(p((o) => u(o, a), ["stop"]), ["down"]),
|
|
144
|
+
k(p((o) => u(o, a), ["stop"]), ["up"])
|
|
145
|
+
]
|
|
146
|
+
}, null, 8, ["icon", "onClick", "onKeydown"])
|
|
147
|
+
]),
|
|
148
|
+
empty: r(({ item: a }) => [
|
|
149
|
+
l(n(E), {
|
|
150
|
+
is: "button",
|
|
151
|
+
onClick: (o) => P(a)
|
|
152
|
+
}, {
|
|
153
|
+
icon: r(() => [
|
|
154
|
+
l(n(Y))
|
|
155
|
+
]),
|
|
156
|
+
default: r(() => [...e[11] || (e[11] = [
|
|
157
|
+
y("Add operation", -1)
|
|
158
|
+
])]),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["onClick"])
|
|
129
161
|
]),
|
|
130
162
|
_: 2
|
|
131
163
|
}, [
|
|
132
164
|
t.layout !== "modal" ? {
|
|
133
165
|
name: "footer",
|
|
134
|
-
fn:
|
|
166
|
+
fn: r(() => [
|
|
135
167
|
d("div", {
|
|
136
|
-
class:
|
|
137
|
-
"empty-sidebar-item border-t":
|
|
168
|
+
class: F({
|
|
169
|
+
"empty-sidebar-item border-t": S.value
|
|
138
170
|
})
|
|
139
171
|
}, [
|
|
140
|
-
|
|
141
|
-
d("div",
|
|
142
|
-
|
|
143
|
-
art:
|
|
172
|
+
S.value ? (m(), I("div", se, [
|
|
173
|
+
d("div", ie, [
|
|
174
|
+
l($, {
|
|
175
|
+
art: n(Z),
|
|
144
176
|
class: "rabbitsit font-bold"
|
|
145
177
|
}, null, 8, ["art"]),
|
|
146
|
-
|
|
147
|
-
art:
|
|
178
|
+
l($, {
|
|
179
|
+
art: n(_),
|
|
148
180
|
class: "rabbitjump absolute top-0 left-0 font-bold"
|
|
149
181
|
}, null, 8, ["art"])
|
|
150
182
|
]),
|
|
151
|
-
e[
|
|
183
|
+
e[12] || (e[12] = d("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
|
|
152
184
|
d("b", { class: "font-medium" }, "Let's Get Started"),
|
|
153
185
|
d("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
154
186
|
], -1))
|
|
155
|
-
])) :
|
|
156
|
-
d("div",
|
|
157
|
-
|
|
187
|
+
])) : f("", !0),
|
|
188
|
+
d("div", re, [
|
|
189
|
+
S.value ? (m(), g(n(O), {
|
|
158
190
|
key: 0,
|
|
159
191
|
class: "w-full",
|
|
160
192
|
size: "sm",
|
|
@@ -163,20 +195,20 @@ const _ = { class: "flex" }, ee = {
|
|
|
163
195
|
payload: void 0
|
|
164
196
|
}))
|
|
165
197
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
|
|
198
|
+
default: r(() => [...e[13] || (e[13] = [
|
|
199
|
+
y(" Import Collection ", -1)
|
|
168
200
|
])]),
|
|
169
201
|
_: 1
|
|
170
|
-
})) :
|
|
171
|
-
|
|
202
|
+
})) : f("", !0),
|
|
203
|
+
l(n(O), {
|
|
172
204
|
class: "w-full",
|
|
173
205
|
hotkey: "K",
|
|
174
206
|
size: "sm",
|
|
175
207
|
variant: "outlined",
|
|
176
208
|
onClick: e[2] || (e[2] = (a) => t.eventBus.emit("ui:open:command-palette"))
|
|
177
209
|
}, {
|
|
178
|
-
default:
|
|
179
|
-
|
|
210
|
+
default: r(() => [...e[14] || (e[14] = [
|
|
211
|
+
y(" Add Item ", -1)
|
|
180
212
|
])]),
|
|
181
213
|
_: 1
|
|
182
214
|
})
|
|
@@ -186,34 +218,34 @@ const _ = { class: "flex" }, ee = {
|
|
|
186
218
|
key: "0"
|
|
187
219
|
} : void 0
|
|
188
220
|
]), 1032, ["isSidebarOpen", "sidebarWidth", "activeWorkspace", "documents", "eventBus", "layout", "sidebarState", "workspaces"]),
|
|
189
|
-
|
|
221
|
+
s.value?.showMenu ? (m(), g(te, {
|
|
190
222
|
key: 0,
|
|
191
223
|
eventBus: t.eventBus,
|
|
192
|
-
item:
|
|
224
|
+
item: s.value.item,
|
|
193
225
|
sidebarState: t.sidebarState,
|
|
194
|
-
target:
|
|
195
|
-
onCloseMenu:
|
|
196
|
-
onShowDeleteModal: e[9] || (e[9] = (a) =>
|
|
197
|
-
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) :
|
|
198
|
-
|
|
226
|
+
target: s.value.el,
|
|
227
|
+
onCloseMenu: K,
|
|
228
|
+
onShowDeleteModal: e[9] || (e[9] = (a) => n(v).show())
|
|
229
|
+
}, null, 8, ["eventBus", "item", "sidebarState", "target"])) : f("", !0),
|
|
230
|
+
s.value ? (m(), g(n(J), {
|
|
199
231
|
key: 1,
|
|
200
232
|
size: "xxs",
|
|
201
|
-
state:
|
|
202
|
-
title: `Delete ${
|
|
233
|
+
state: n(v),
|
|
234
|
+
title: `Delete ${s.value.item.title}`
|
|
203
235
|
}, {
|
|
204
|
-
default:
|
|
205
|
-
|
|
206
|
-
variableName:
|
|
207
|
-
warningMessage:
|
|
208
|
-
onClose: e[10] || (e[10] = (a) =>
|
|
236
|
+
default: r(() => [
|
|
237
|
+
l(ee, {
|
|
238
|
+
variableName: s.value.item.title,
|
|
239
|
+
warningMessage: x.value,
|
|
240
|
+
onClose: e[10] || (e[10] = (a) => n(v).hide()),
|
|
209
241
|
onDelete: z
|
|
210
242
|
}, null, 8, ["variableName", "warningMessage"])
|
|
211
243
|
]),
|
|
212
244
|
_: 1
|
|
213
|
-
}, 8, ["state", "title"])) :
|
|
245
|
+
}, 8, ["state", "title"])) : f("", !0)
|
|
214
246
|
]));
|
|
215
247
|
}
|
|
216
248
|
});
|
|
217
249
|
export {
|
|
218
|
-
|
|
250
|
+
we as default
|
|
219
251
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { UseTabsReturn } from '../../../../v2/hooks/use-tabs.js';
|
|
2
|
+
import type { UseTabsReturn } from '../../../../v2/features/app/hooks/use-tabs.js';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
/** Tabs state */
|
|
5
5
|
tabsState: UseTabsReturn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,iBAAiB;IACjB,SAAS,EAAE,aAAa,CAAA;IACxB,0DAA0D;IAC1D,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;AA6IF,wBAMG"}
|
|
@@ -19,4 +19,4 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
19
19
|
onShowDeleteModal?: (() => any) | undefined;
|
|
20
20
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
export default _default;
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=SidebarItemMenu.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/SidebarItemMenu.vue"],"names":[],"mappings":"AAgLA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAA;AAGhF,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,IAAI,EAAE,cAAc,CAAA;IACpB,sCAAsC;IACtC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,qDAAqD;IACrD,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAC1C,sDAAsD;IACtD,MAAM,EAAE,WAAW,CAAA;CACpB,CAAC;;;;;;;;AA6TF,wBAOG"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineComponent as S, ref as C, watch as E, nextTick as b, createBlock as i, openBlock as a, unref as n, withCtx as m, createCommentVNode as l, createElementVNode as r, createVNode as u, createTextVNode as c } from "vue";
|
|
2
|
+
import { ScalarDropdown as M, ScalarDropdownItem as s, ScalarIcon as y, ScalarDropdownDivider as T } from "@scalar/components";
|
|
3
|
+
import { getParentEntry as p } from "@scalar/workspace-store/navigation";
|
|
4
|
+
const z = { class: "flex items-center gap-2" }, N = { class: "flex items-center gap-2" }, V = { class: "flex items-center gap-2" }, $ = { class: "text-red flex items-center gap-2" }, W = /* @__PURE__ */ S({
|
|
5
|
+
__name: "SidebarItemMenu",
|
|
6
|
+
props: {
|
|
7
|
+
item: {},
|
|
8
|
+
eventBus: {},
|
|
9
|
+
sidebarState: {},
|
|
10
|
+
target: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["closeMenu", "showDeleteModal"],
|
|
13
|
+
setup(e, { emit: I }) {
|
|
14
|
+
const g = I, f = C(!1);
|
|
15
|
+
E(f, async (d, t) => {
|
|
16
|
+
!d && t && (await b(), g("closeMenu"));
|
|
17
|
+
});
|
|
18
|
+
const v = () => e.item.type === "document" || e.item.type === "tag", x = () => e.item.type === "document", k = () => e.item.type === "operation", A = () => e.item.type === "document" && e.item.id !== "drafts" || e.item.type === "tag" || e.item.type === "operation" || e.item.type === "example", B = () => {
|
|
19
|
+
if (e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
|
|
20
|
+
action: "create-request",
|
|
21
|
+
payload: {
|
|
22
|
+
documentId: e.item.id
|
|
23
|
+
}
|
|
24
|
+
}), e.item.type === "tag") {
|
|
25
|
+
const d = e.sidebarState.getEntryById(e.item.id);
|
|
26
|
+
e.eventBus.emit("ui:open:command-palette", {
|
|
27
|
+
action: "create-request",
|
|
28
|
+
payload: {
|
|
29
|
+
documentId: p("document", d)?.id,
|
|
30
|
+
tagId: e.item.name
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}, D = () => {
|
|
35
|
+
e.item.type === "document" && e.eventBus.emit("ui:open:command-palette", {
|
|
36
|
+
action: "add-tag",
|
|
37
|
+
payload: {
|
|
38
|
+
documentId: e.item.id
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}, w = () => {
|
|
42
|
+
if (e.item.type === "operation") {
|
|
43
|
+
const d = e.sidebarState.getEntryById(e.item.id);
|
|
44
|
+
e.eventBus.emit("ui:open:command-palette", {
|
|
45
|
+
action: "add-example",
|
|
46
|
+
payload: {
|
|
47
|
+
documentId: p("document", d)?.id,
|
|
48
|
+
operationId: e.item.id
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return (d, t) => (a(), i(n(M), {
|
|
54
|
+
open: f.value,
|
|
55
|
+
"onUpdate:open": t[4] || (t[4] = (o) => f.value = o),
|
|
56
|
+
placement: "bottom-end",
|
|
57
|
+
target: d.target,
|
|
58
|
+
teleport: ""
|
|
59
|
+
}, {
|
|
60
|
+
items: m(() => [
|
|
61
|
+
v() ? (a(), i(n(s), {
|
|
62
|
+
key: 0,
|
|
63
|
+
onClick: t[0] || (t[0] = (o) => B())
|
|
64
|
+
}, {
|
|
65
|
+
default: m(() => [
|
|
66
|
+
r("div", z, [
|
|
67
|
+
u(n(y), {
|
|
68
|
+
icon: "Add",
|
|
69
|
+
size: "sm"
|
|
70
|
+
}),
|
|
71
|
+
t[5] || (t[5] = c(" Add Operation ", -1))
|
|
72
|
+
])
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
})) : l("", !0),
|
|
76
|
+
x() ? (a(), i(n(s), {
|
|
77
|
+
key: 1,
|
|
78
|
+
onClick: t[1] || (t[1] = (o) => D())
|
|
79
|
+
}, {
|
|
80
|
+
default: m(() => [
|
|
81
|
+
r("div", N, [
|
|
82
|
+
u(n(y), {
|
|
83
|
+
icon: "Add",
|
|
84
|
+
size: "sm"
|
|
85
|
+
}),
|
|
86
|
+
t[6] || (t[6] = c(" Add Tag ", -1))
|
|
87
|
+
])
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
})) : l("", !0),
|
|
91
|
+
k() ? (a(), i(n(s), {
|
|
92
|
+
key: 2,
|
|
93
|
+
onClick: t[2] || (t[2] = (o) => w())
|
|
94
|
+
}, {
|
|
95
|
+
default: m(() => [
|
|
96
|
+
r("div", V, [
|
|
97
|
+
u(n(y), {
|
|
98
|
+
icon: "Add",
|
|
99
|
+
size: "sm"
|
|
100
|
+
}),
|
|
101
|
+
t[7] || (t[7] = c(" Add Example ", -1))
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
})) : l("", !0),
|
|
106
|
+
(k() || v() || x()) && A() ? (a(), i(n(T), { key: 3 })) : l("", !0),
|
|
107
|
+
A() ? (a(), i(n(s), {
|
|
108
|
+
key: 4,
|
|
109
|
+
onClick: t[3] || (t[3] = (o) => g("showDeleteModal"))
|
|
110
|
+
}, {
|
|
111
|
+
default: m(() => [
|
|
112
|
+
r("div", $, [
|
|
113
|
+
u(n(y), {
|
|
114
|
+
icon: "Delete",
|
|
115
|
+
size: "sm"
|
|
116
|
+
}),
|
|
117
|
+
t[8] || (t[8] = c(" Delete ", -1))
|
|
118
|
+
])
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
})) : l("", !0)
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
}, 8, ["open", "target"]));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
export {
|
|
128
|
+
W as default
|
|
129
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebTopNav.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/WebTopNav.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WebTopNav.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/WebTopNav.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAK/E;;;;GAIG;;IAGD;;;OAGG;qBACc,SAAS;IAC1B;;;OAGG;gBACS,SAAS,EAAE;;;;;IATvB;;;OAGG;qBACc,SAAS;IAC1B;;;OAGG;gBACS,SAAS,EAAE;;;;;AAXzB,wBAuGC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClientPlugin } from '../../../../v2/plugins';
|
|
1
|
+
import type { ClientPlugin } from '../../../../v2/helpers/plugins.js';
|
|
2
2
|
import type { ClientLayout } from '../../../../v2/types/layout';
|
|
3
3
|
export type CreateApiClientOptions = {
|
|
4
4
|
/**
|
|
@@ -20,5 +20,5 @@ export declare const createAppRouter: (layout: CreateApiClientOptions["layout"])
|
|
|
20
20
|
/**
|
|
21
21
|
* Create the API Client with router and passes in the workspace store as a prop
|
|
22
22
|
*/
|
|
23
|
-
export declare const createApiClientApp: (el: HTMLElement | null, { layout }: CreateApiClientOptions) => void;
|
|
23
|
+
export declare const createApiClientApp: (el: HTMLElement | null, { layout, plugins }: CreateApiClientOptions) => void;
|
|
24
24
|
//# sourceMappingURL=create-api-client-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,sBAAsB,CAAC,QAAQ,CAAC,gCAQvE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,WAAW,GAAG,IAAI,EAAE,qBAAiC,sBAAsB,SAkBjH,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createApp as
|
|
2
|
-
import { createRouter as o, createWebHistory as
|
|
3
|
-
import
|
|
1
|
+
import { createApp as p } from "vue";
|
|
2
|
+
import { createRouter as o, createWebHistory as c, createWebHashHistory as s } from "vue-router";
|
|
3
|
+
import n from "../App.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { ROUTES as a } from "./routes.js";
|
|
6
|
-
const
|
|
7
|
-
const t =
|
|
8
|
-
if (t.use(
|
|
6
|
+
const m = (e) => e === "web" ? o({ history: c(), routes: a }) : o({ history: s(), routes: a }), A = (e, { layout: r = "desktop", plugins: i }) => {
|
|
7
|
+
const t = p(n, { layout: r, plugins: i });
|
|
8
|
+
if (t.use(m(r)), !e) {
|
|
9
9
|
console.error(
|
|
10
10
|
"[@scalar/api-client-modal] Could not create the API client.",
|
|
11
11
|
"Invalid HTML element provided.",
|
|
@@ -16,6 +16,6 @@ const n = (e) => e === "web" ? o({ history: p(), routes: a }) : o({ history: c()
|
|
|
16
16
|
t.mount(e);
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
A as createApiClientApp,
|
|
20
|
+
m as createAppRouter
|
|
21
21
|
};
|