@scalar/api-reference 1.35.5 → 1.35.6
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 +21 -0
- package/dist/browser/standalone.js +18150 -18465
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/WithBreadcrumb.vue2.js +8 -11
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +4 -4
- package/dist/components/ApiReferenceLayout.vue2.js +247 -268
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/ClassicHeader.vue.js +1 -1
- package/dist/components/Content/Content.vue.js +145 -169
- package/dist/components/Content/Content.vue3.js +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue2.js +32 -35
- package/dist/components/Content/Models/Models.vue.js +27 -31
- package/dist/components/Content/Models/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +32 -35
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +26 -27
- package/dist/components/Content/Operations/get-current-index.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue2.js +68 -74
- package/dist/components/Content/Schema/SchemaComposition.vue.js +42 -45
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +45 -50
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +41 -48
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +142 -157
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +160 -164
- package/dist/components/Content/Schema/helpers/get-schema-type.js +15 -17
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.js +74 -77
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +10 -11
- package/dist/components/Content/Tags/ClassicLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue2.js +36 -39
- package/dist/components/Content/Tags/ModernLayout.vue.js +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue2.js +31 -35
- package/dist/components/Content/Tags/TagSection.vue.js +86 -92
- package/dist/components/GettingStarted.vue.js +1 -1
- package/dist/components/LinkList/LinkList.vue.js +1 -1
- package/dist/components/LoadingSkeleton.vue.js +1 -1
- package/dist/components/MobileHeader.vue.d.ts.map +1 -1
- package/dist/components/MobileHeader.vue.js +3 -3
- package/dist/components/MobileHeader.vue2.js +13 -12
- package/dist/components/OperationPath.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue2.js +45 -51
- package/dist/components/OperationsList/OperationsListItem.vue.js +1 -1
- package/dist/components/ScreenReader.vue.js +1 -1
- package/dist/components/Section/CompactSection.vue.js +1 -1
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/Section.vue2.js +13 -14
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +29 -30
- package/dist/components/Section/SectionColumn.vue.js +1 -1
- package/dist/components/Section/SectionColumns.vue.js +1 -1
- package/dist/components/Section/SectionContainer.vue.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +1 -1
- package/dist/components/Section/SectionContent.vue.js +1 -1
- package/dist/components/Section/SectionHeader.vue.js +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +1 -1
- package/dist/components/SectionFlare/SectionFlare.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue.js +1 -1
- package/dist/components/ShowMoreButton.vue2.js +12 -13
- package/dist/features/Operation/Operation.vue.js +31 -36
- package/dist/features/Operation/components/Headers.vue.js +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +8 -11
- package/dist/features/Operation/components/ParameterList.vue.js +21 -24
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +36 -37
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +45 -52
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +32 -35
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +4 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +114 -119
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +3 -3
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +87 -89
- package/dist/features/Search/components/SearchButton.vue.js +23 -25
- package/dist/features/Search/components/SearchModal.vue.js +1 -1
- package/dist/features/Search/components/SearchModal.vue2.js +53 -54
- package/dist/features/api-client-modal/ApiClientModal.vue.js +31 -38
- package/dist/features/document-source/hooks/useDocumentFetcher.js +17 -18
- package/dist/features/document-source/hooks/useDocumentSource.js +16 -16
- package/dist/features/example-responses/ExampleResponse.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponse.vue2.js +23 -26
- package/dist/features/example-responses/ExampleResponseTab.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
- package/dist/features/example-responses/ExampleResponses.vue2.js +128 -153
- package/dist/features/info-object/Contact.vue.js +24 -27
- package/dist/features/info-object/License.vue.js +26 -29
- package/dist/features/multiple-documents/DocumentSelector.vue.js +22 -31
- package/dist/features/multiple-documents/useMultipleDocuments.js +52 -56
- package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +1 -1
- package/dist/features/sidebar/components/Sidebar.vue.js +3 -3
- package/dist/features/sidebar/components/Sidebar.vue2.js +74 -79
- package/dist/features/sidebar/components/SidebarElement.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarElement.vue2.js +52 -53
- package/dist/features/sidebar/components/SidebarGroup.vue.js +1 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +1 -1
- package/dist/features/specification-extension/SpecificationExtension.vue2.js +28 -31
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue2.js +1 -2
- package/dist/features/traverse-schema/helpers/traverse-description.js +13 -14
- package/dist/features/traverse-schema/helpers/traverse-document.js +14 -15
- package/dist/features/traverse-schema/helpers/traverse-paths.js +20 -23
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +13 -15
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +8 -10
- package/dist/hooks/useFreezing.js +14 -14
- package/dist/hooks/useNavState.js +37 -39
- package/dist/index.js +2 -2
- package/dist/libs/openapi.js +28 -31
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +68 -75
- package/dist/v2/ApiReferenceWorkspace.vue3.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +116 -135
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +40 -47
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +45 -46
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +109 -125
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +84 -84
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/update-scheme.js +12 -13
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue.js +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue2.js +1 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue2.js +77 -82
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue2.js +46 -49
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue2.js +74 -89
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +24 -27
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +106 -119
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +11 -12
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +3 -3
- package/dist/v2/blocks/scalar-server-selector-block/components/Selector.vue.js +11 -14
- package/dist/v2/blocks/scalar-server-selector-block/components/ServerSelector.vue.js +45 -48
- package/dist/v2/helpers/get-document-name.js +10 -10
- package/dist/v2/helpers/map-configuration.js +48 -51
- package/dist/v2/hooks/use-legacy-store-events.js +44 -48
- package/dist/v2/hooks/use-workspace-store-events.js +23 -26
- package/package.json +22 -22
- package/dist/components/ApiReferenceLayout.vue3.js +0 -4
- package/dist/components/ApiReferenceLayout.vue4.js +0 -4
- package/dist/components/ApiReferenceLayout.vue5.js +0 -4
- package/dist/components/ApiReferenceLayout.vue6.js +0 -4
- package/dist/components/Badge/Badge.vue3.js +0 -4
- package/dist/components/ClassicHeader.vue2.js +0 -4
- package/dist/components/Content/Content.vue2.js +0 -4
- package/dist/components/Content/Models/ClassicLayout.vue3.js +0 -4
- package/dist/components/Content/Models/ModernLayout.vue3.js +0 -4
- package/dist/components/Content/Schema/Schema.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaEnumValues.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaHeading.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaProperty.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyDetail.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue3.js +0 -4
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue3.js +0 -4
- package/dist/components/Content/Tags/ClassicLayout.vue3.js +0 -4
- package/dist/components/Content/Tags/ModernLayout.vue3.js +0 -4
- package/dist/components/GettingStarted.vue3.js +0 -4
- package/dist/components/LinkList/LinkList.vue3.js +0 -4
- package/dist/components/LoadingSkeleton.vue3.js +0 -4
- package/dist/components/MobileHeader.vue3.js +0 -4
- package/dist/components/OperationPath.vue3.js +0 -4
- package/dist/components/OperationsList/OperationsList.vue3.js +0 -4
- package/dist/components/OperationsList/OperationsListItem.vue3.js +0 -4
- package/dist/components/ScreenReader.vue3.js +0 -4
- package/dist/components/Section/CompactSection.vue3.js +0 -4
- package/dist/components/Section/Section.vue3.js +0 -4
- package/dist/components/Section/SectionAccordion.vue3.js +0 -4
- package/dist/components/Section/SectionColumn.vue2.js +0 -4
- package/dist/components/Section/SectionColumns.vue2.js +0 -4
- package/dist/components/Section/SectionContainer.vue3.js +0 -4
- package/dist/components/Section/SectionContainerAccordion.vue3.js +0 -4
- package/dist/components/Section/SectionContent.vue3.js +0 -4
- package/dist/components/Section/SectionHeader.vue3.js +0 -4
- package/dist/components/Section/SectionHeaderTag.vue3.js +0 -4
- package/dist/components/SectionFlare/SectionFlare.vue2.js +0 -4
- package/dist/components/ShowMoreButton.vue3.js +0 -4
- package/dist/features/Operation/components/Headers.vue3.js +0 -4
- package/dist/features/Operation/components/ParameterListItem.vue3.js +0 -4
- package/dist/features/Operation/components/RequestBody.vue3.js +0 -4
- package/dist/features/Operation/components/callbacks/Callback.vue3.js +0 -4
- package/dist/features/Operation/layouts/ClassicLayout.vue3.js +0 -4
- package/dist/features/Operation/layouts/ModernLayout.vue3.js +0 -4
- package/dist/features/Search/components/SearchModal.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponse.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponseTab.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponseTabList.vue3.js +0 -4
- package/dist/features/example-responses/ExampleResponses.vue3.js +0 -4
- package/dist/features/sidebar/components/Sidebar.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarElement.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarGroup.vue3.js +0 -4
- package/dist/features/sidebar/components/SidebarHttpBadge.vue3.js +0 -4
- package/dist/features/test-request-button/TestRequestButton.vue3.js +0 -4
- package/dist/v2/ApiReferenceWorkspace.vue2.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue3.js +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue3.js +0 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientDropdown.vue3.js +0 -4
- package/dist/v2/blocks/scalar-client-selector-block/components/ClientSelector.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/DownloadLink.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/InfoDescription.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCard.vue3.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionCardItem.vue2.js +0 -4
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue3.js +0 -4
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue3.js +0 -4
|
@@ -1,64 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarModal as
|
|
3
|
-
import { emitCustomEvent as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as h, useTemplateRef as x, createBlock as _, openBlock as b, unref as o, withCtx as s, createElementVNode as a, toDisplayString as c, createVNode as i, createTextVNode as m } from "vue";
|
|
2
|
+
import { ScalarModal as y, ScalarButton as u } from "@scalar/components";
|
|
3
|
+
import { emitCustomEvent as w } from "@scalar/workspace-store/events";
|
|
4
|
+
const C = { class: "text-c-2 mb-4 text-sm leading-normal" }, S = { class: "flex justify-between gap-2" }, D = /* @__PURE__ */ h({
|
|
5
5
|
__name: "DeleteRequestAuthModal",
|
|
6
6
|
props: {
|
|
7
7
|
state: {},
|
|
8
8
|
scheme: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["close", "delete"],
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return (t, e) => (w(), y(s(C), {
|
|
11
|
+
setup(p, { emit: d }) {
|
|
12
|
+
const n = p, l = d, f = () => {
|
|
13
|
+
n.scheme?.id && w(r.value?.$el, "scalar-delete-security-scheme", {
|
|
14
|
+
uid: n.scheme.id
|
|
15
|
+
}), l("delete");
|
|
16
|
+
}, r = x("wrapperRef");
|
|
17
|
+
return (t, e) => (b(), _(o(y), {
|
|
19
18
|
ref_key: "wrapperRef",
|
|
20
|
-
ref:
|
|
19
|
+
ref: r,
|
|
21
20
|
size: "xxs",
|
|
22
21
|
state: t.state,
|
|
23
22
|
title: "Delete Security Scheme"
|
|
24
23
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
i(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
_: 1
|
|
54
|
-
})
|
|
55
|
-
])
|
|
56
|
-
];
|
|
57
|
-
}),
|
|
24
|
+
default: s(() => [
|
|
25
|
+
a("p", C, " This cannot be undone. You're about to delete the " + c(t.scheme?.label) + " security scheme from the collection. ", 1),
|
|
26
|
+
a("div", S, [
|
|
27
|
+
i(o(u), {
|
|
28
|
+
class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
|
|
29
|
+
type: "button",
|
|
30
|
+
variant: "outlined",
|
|
31
|
+
onClick: e[0] || (e[0] = (g) => l("close"))
|
|
32
|
+
}, {
|
|
33
|
+
default: s(() => e[1] || (e[1] = [
|
|
34
|
+
m(" Cancel ")
|
|
35
|
+
])),
|
|
36
|
+
_: 1,
|
|
37
|
+
__: [1]
|
|
38
|
+
}),
|
|
39
|
+
i(o(u), {
|
|
40
|
+
class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
|
|
41
|
+
type: "submit",
|
|
42
|
+
onClick: f
|
|
43
|
+
}, {
|
|
44
|
+
default: s(() => [
|
|
45
|
+
m(" Delete " + c(t.scheme?.label), 1)
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
})
|
|
49
|
+
])
|
|
50
|
+
]),
|
|
58
51
|
_: 1
|
|
59
52
|
}, 8, ["state"]));
|
|
60
53
|
}
|
|
61
54
|
});
|
|
62
55
|
export {
|
|
63
|
-
|
|
56
|
+
D as default
|
|
64
57
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, useTemplateRef as T, createElementBlock as V, openBlock as d, Fragment as U, createElementVNode as g, createBlock as k, createCommentVNode as w, createVNode as r, unref as a, withCtx as o, mergeProps as m, createTextVNode as u } from "vue";
|
|
2
2
|
import { DataTableRow as f } from "@scalar/api-client/components/DataTable";
|
|
3
|
-
import { useWorkspace as
|
|
4
|
-
import { authorizeOauth2 as
|
|
5
|
-
import { useLoadingState as
|
|
6
|
-
import { pkceOptions as
|
|
7
|
-
import { useToasts as
|
|
8
|
-
import { updateScheme as
|
|
9
|
-
import
|
|
3
|
+
import { useWorkspace as z } from "@scalar/api-client/store";
|
|
4
|
+
import { authorizeOauth2 as P } from "@scalar/api-client/views/Request/libs";
|
|
5
|
+
import { useLoadingState as A, ScalarButton as b } from "@scalar/components";
|
|
6
|
+
import { pkceOptions as B } from "@scalar/oas-utils/entities/spec";
|
|
7
|
+
import { useToasts as L } from "@scalar/use-toasts";
|
|
8
|
+
import { updateScheme as F } from "../helpers/update-scheme.js";
|
|
9
|
+
import I from "./OAuthScopesInput.vue.js";
|
|
10
10
|
import p from "./RequestAuthDataTableInput.vue.js";
|
|
11
|
-
const
|
|
11
|
+
const N = { class: "flex h-8 items-center justify-end gap-2 border-t" }, O = { class: "flex h-8 w-full items-center justify-end border-t" }, Z = /* @__PURE__ */ S({
|
|
12
12
|
__name: "OAuth2",
|
|
13
13
|
props: {
|
|
14
14
|
collection: {},
|
|
@@ -21,42 +21,41 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
21
21
|
workspace: {}
|
|
22
22
|
},
|
|
23
23
|
setup(s) {
|
|
24
|
-
const y =
|
|
24
|
+
const y = A(), { toast: v } = L(), C = z(), n = (l, e) => F(
|
|
25
25
|
s.scheme.uid,
|
|
26
26
|
l,
|
|
27
27
|
e,
|
|
28
|
-
|
|
28
|
+
C,
|
|
29
29
|
$.value,
|
|
30
30
|
s.persistAuth
|
|
31
|
-
),
|
|
32
|
-
|
|
33
|
-
if (y.isLoading || !((t = s.collection) != null && t.uid))
|
|
31
|
+
), R = async () => {
|
|
32
|
+
if (y.isLoading || !s.collection?.uid)
|
|
34
33
|
return;
|
|
35
34
|
if (!s.server) {
|
|
36
35
|
v("No server selected", "error");
|
|
37
36
|
return;
|
|
38
37
|
}
|
|
39
38
|
y.startLoading();
|
|
40
|
-
const [l, e] = await
|
|
39
|
+
const [l, e] = await P(
|
|
41
40
|
s.flow,
|
|
42
41
|
s.server,
|
|
43
|
-
|
|
42
|
+
s.workspace?.proxyUrl
|
|
44
43
|
).finally(() => y.stopLoading());
|
|
45
|
-
e ? n(`flows.${s.flow.type}.token`, e) : (console.error(l), v(
|
|
44
|
+
e ? n(`flows.${s.flow.type}.token`, e) : (console.error(l), v(l?.message ?? "Failed to authorize", "error"));
|
|
46
45
|
}, i = {
|
|
47
46
|
environment: s.environment,
|
|
48
47
|
envVariables: s.envVariables,
|
|
49
48
|
workspace: s.workspace
|
|
50
|
-
}, $ =
|
|
49
|
+
}, $ = T("wrapperRef");
|
|
51
50
|
return (l, e) => (d(), V(U, null, [
|
|
52
51
|
g("div", {
|
|
53
52
|
ref_key: "wrapperRef",
|
|
54
53
|
ref: $
|
|
55
54
|
}, null, 512),
|
|
56
55
|
l.flow.token ? (d(), V(U, { key: 0 }, [
|
|
57
|
-
a(
|
|
56
|
+
r(a(f), null, {
|
|
58
57
|
default: o(() => [
|
|
59
|
-
|
|
58
|
+
r(p, m(i, {
|
|
60
59
|
class: "border-r-transparent",
|
|
61
60
|
modelValue: l.flow.token,
|
|
62
61
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
@@ -72,12 +71,12 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
72
71
|
]),
|
|
73
72
|
_: 1
|
|
74
73
|
}),
|
|
75
|
-
a(
|
|
74
|
+
r(a(f), { class: "min-w-full" }, {
|
|
76
75
|
default: o(() => [
|
|
77
|
-
g("div",
|
|
78
|
-
a(
|
|
76
|
+
g("div", N, [
|
|
77
|
+
r(a(b), {
|
|
79
78
|
class: "mr-1 p-0 px-2 py-0.5",
|
|
80
|
-
loading:
|
|
79
|
+
loading: a(y),
|
|
81
80
|
size: "sm",
|
|
82
81
|
variant: "outlined",
|
|
83
82
|
onClick: e[1] || (e[1] = (t) => n(`flows.${l.flow.type}.token`, ""))
|
|
@@ -93,7 +92,7 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
93
92
|
_: 1
|
|
94
93
|
})
|
|
95
94
|
], 64)) : (d(), V(U, { key: 1 }, [
|
|
96
|
-
a(
|
|
95
|
+
r(a(f), null, {
|
|
97
96
|
default: o(() => [
|
|
98
97
|
"authorizationUrl" in l.flow ? (d(), k(p, m({ key: 0 }, i, {
|
|
99
98
|
containerClass: "border-r-0",
|
|
@@ -121,9 +120,9 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
121
120
|
]),
|
|
122
121
|
_: 1
|
|
123
122
|
}),
|
|
124
|
-
"x-scalar-redirect-uri" in l.flow ? (d(), k(
|
|
123
|
+
"x-scalar-redirect-uri" in l.flow ? (d(), k(a(f), { key: 0 }, {
|
|
125
124
|
default: o(() => [
|
|
126
|
-
|
|
125
|
+
r(p, m(i, {
|
|
127
126
|
modelValue: l.flow["x-scalar-redirect-uri"],
|
|
128
127
|
placeholder: "https://galaxy.scalar.com/callback",
|
|
129
128
|
"onUpdate:modelValue": e[4] || (e[4] = (t) => n(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
|
|
@@ -138,9 +137,9 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
138
137
|
_: 1
|
|
139
138
|
})) : w("", !0),
|
|
140
139
|
l.flow.type === "password" ? (d(), V(U, { key: 1 }, [
|
|
141
|
-
a(
|
|
140
|
+
r(a(f), null, {
|
|
142
141
|
default: o(() => [
|
|
143
|
-
|
|
142
|
+
r(p, m(i, {
|
|
144
143
|
class: "text-c-2",
|
|
145
144
|
modelValue: l.flow.username,
|
|
146
145
|
placeholder: "janedoe",
|
|
@@ -155,9 +154,9 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
155
154
|
]),
|
|
156
155
|
_: 1
|
|
157
156
|
}),
|
|
158
|
-
a(
|
|
157
|
+
r(a(f), null, {
|
|
159
158
|
default: o(() => [
|
|
160
|
-
|
|
159
|
+
r(p, m(i, {
|
|
161
160
|
modelValue: l.flow.password,
|
|
162
161
|
placeholder: "********",
|
|
163
162
|
type: "password",
|
|
@@ -173,9 +172,9 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
173
172
|
_: 1
|
|
174
173
|
})
|
|
175
174
|
], 64)) : w("", !0),
|
|
176
|
-
a(
|
|
175
|
+
r(a(f), null, {
|
|
177
176
|
default: o(() => [
|
|
178
|
-
|
|
177
|
+
r(p, m(i, {
|
|
179
178
|
modelValue: l.flow["x-scalar-client-id"],
|
|
180
179
|
placeholder: "12345",
|
|
181
180
|
"onUpdate:modelValue": e[7] || (e[7] = (t) => n(`flows.${l.flow.type}.x-scalar-client-id`, t))
|
|
@@ -189,9 +188,9 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
189
188
|
]),
|
|
190
189
|
_: 1
|
|
191
190
|
}),
|
|
192
|
-
"clientSecret" in l.flow ? (d(), k(
|
|
191
|
+
"clientSecret" in l.flow ? (d(), k(a(f), { key: 2 }, {
|
|
193
192
|
default: o(() => [
|
|
194
|
-
|
|
193
|
+
r(p, m(i, {
|
|
195
194
|
modelValue: l.flow.clientSecret,
|
|
196
195
|
placeholder: "XYZ123",
|
|
197
196
|
type: "password",
|
|
@@ -206,10 +205,10 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
206
205
|
]),
|
|
207
206
|
_: 1
|
|
208
207
|
})) : w("", !0),
|
|
209
|
-
"x-usePkce" in l.flow ? (d(), k(
|
|
208
|
+
"x-usePkce" in l.flow ? (d(), k(a(f), { key: 3 }, {
|
|
210
209
|
default: o(() => [
|
|
211
|
-
|
|
212
|
-
enum:
|
|
210
|
+
r(p, m(i, {
|
|
211
|
+
enum: a(B),
|
|
213
212
|
modelValue: l.flow["x-usePkce"],
|
|
214
213
|
readOnly: "",
|
|
215
214
|
"onUpdate:modelValue": e[9] || (e[9] = (t) => n(
|
|
@@ -226,9 +225,9 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
226
225
|
]),
|
|
227
226
|
_: 1
|
|
228
227
|
})) : w("", !0),
|
|
229
|
-
Object.keys(l.flow.scopes ?? {}).length ? (d(), k(
|
|
228
|
+
Object.keys(l.flow.scopes ?? {}).length ? (d(), k(a(f), { key: 4 }, {
|
|
230
229
|
default: o(() => [
|
|
231
|
-
|
|
230
|
+
r(I, {
|
|
232
231
|
flow: l.flow,
|
|
233
232
|
updateScheme: n
|
|
234
233
|
}, null, 8, ["flow"])
|
|
@@ -236,18 +235,18 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
236
235
|
_: 1
|
|
237
236
|
})) : w("", !0)
|
|
238
237
|
], 64)),
|
|
239
|
-
l.flow.token ? w("", !0) : (d(), k(
|
|
238
|
+
l.flow.token ? w("", !0) : (d(), k(a(f), {
|
|
240
239
|
key: 2,
|
|
241
240
|
class: "min-w-full"
|
|
242
241
|
}, {
|
|
243
242
|
default: o(() => [
|
|
244
|
-
g("div",
|
|
245
|
-
a(
|
|
243
|
+
g("div", O, [
|
|
244
|
+
r(a(b), {
|
|
246
245
|
class: "mr-0.75 p-0 px-2 py-0.5",
|
|
247
|
-
loading:
|
|
246
|
+
loading: a(y),
|
|
248
247
|
size: "sm",
|
|
249
248
|
variant: "outlined",
|
|
250
|
-
onClick:
|
|
249
|
+
onClick: R
|
|
251
250
|
}, {
|
|
252
251
|
default: o(() => e[20] || (e[20] = [
|
|
253
252
|
u(" Authorize ")
|
|
@@ -263,5 +262,5 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, j = { c
|
|
|
263
262
|
}
|
|
264
263
|
});
|
|
265
264
|
export {
|
|
266
|
-
|
|
265
|
+
Z as default
|
|
267
266
|
};
|
|
@@ -1,143 +1,127 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { DataTableCell as
|
|
4
|
-
import { ScalarButton as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as V, computed as f, createBlock as r, openBlock as a, unref as l, withCtx as c, createElementVNode as n, createVNode as i, normalizeClass as A, toDisplayString as d, createCommentVNode as p, withModifiers as w, createTextVNode as m, createElementBlock as x, Fragment as B, renderList as O } from "vue";
|
|
2
|
+
import { Disclosure as T, DisclosureButton as $, DisclosurePanel as j } from "@headlessui/vue";
|
|
3
|
+
import { DataTableCell as v, DataTableRow as z, DataTableCheckbox as N } from "@scalar/api-client/components/DataTable";
|
|
4
|
+
import { ScalarButton as g, ScalarIcon as E } from "@scalar/components";
|
|
5
|
+
const F = { class: "flex h-fit w-full" }, I = { class: "flex-1" }, R = { class: "flex items-center gap-1.75" }, L = {
|
|
6
6
|
class: "grid auto-rows-auto",
|
|
7
7
|
style: { gridTemplateColumns: "1fr auto" }
|
|
8
|
-
},
|
|
8
|
+
}, M = { key: 0 }, P = { class: "font-code text-xs" }, K = /* @__PURE__ */ V({
|
|
9
9
|
__name: "OAuthScopesInput",
|
|
10
10
|
props: {
|
|
11
11
|
flow: {},
|
|
12
12
|
updateScheme: { type: Function }
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
() => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
t ? l.updateScheme(`flows.${l.flow.type}.selectedScopes`, [
|
|
30
|
-
...d.value,
|
|
31
|
-
e
|
|
32
|
-
]) : l.updateScheme(
|
|
33
|
-
`flows.${l.flow.type}.selectedScopes`,
|
|
34
|
-
d.value.filter((o) => o !== e)
|
|
14
|
+
setup(e) {
|
|
15
|
+
const k = f(
|
|
16
|
+
() => Object.entries(e.flow?.scopes ?? {}).map(([s, t]) => ({
|
|
17
|
+
id: s,
|
|
18
|
+
label: s,
|
|
19
|
+
description: t
|
|
20
|
+
}))
|
|
21
|
+
), u = f(() => e.flow?.selectedScopes || []);
|
|
22
|
+
function y(s, t) {
|
|
23
|
+
t ? e.updateScheme(`flows.${e.flow.type}.selectedScopes`, [
|
|
24
|
+
...u.value,
|
|
25
|
+
s
|
|
26
|
+
]) : e.updateScheme(
|
|
27
|
+
`flows.${e.flow.type}.selectedScopes`,
|
|
28
|
+
u.value.filter((o) => o !== s)
|
|
35
29
|
);
|
|
36
30
|
}
|
|
37
|
-
const
|
|
38
|
-
() => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var e;
|
|
44
|
-
l.updateScheme(
|
|
45
|
-
`flows.${l.flow.type}.selectedScopes`,
|
|
46
|
-
Object.keys(((e = l.flow) == null ? void 0 : e.scopes) ?? {})
|
|
31
|
+
const h = f(
|
|
32
|
+
() => e.flow?.selectedScopes?.length === Object.keys(e.flow?.scopes ?? {}).length
|
|
33
|
+
), b = () => {
|
|
34
|
+
e.updateScheme(
|
|
35
|
+
`flows.${e.flow.type}.selectedScopes`,
|
|
36
|
+
Object.keys(e.flow?.scopes ?? {})
|
|
47
37
|
);
|
|
48
|
-
},
|
|
49
|
-
|
|
38
|
+
}, C = () => {
|
|
39
|
+
e.updateScheme(`flows.${e.flow.type}.selectedScopes`, []);
|
|
50
40
|
};
|
|
51
|
-
return (
|
|
41
|
+
return (s, t) => (a(), r(l(v), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
|
|
52
42
|
default: c(() => [
|
|
53
|
-
|
|
54
|
-
t[2] || (t[2] =
|
|
55
|
-
|
|
43
|
+
n("div", F, [
|
|
44
|
+
t[2] || (t[2] = n("div", { class: "text-c-1 h-full items-center" }, null, -1)),
|
|
45
|
+
i(l(T), {
|
|
56
46
|
as: "div",
|
|
57
47
|
class: "bl flex w-full flex-col"
|
|
58
48
|
}, {
|
|
59
|
-
default: c(() =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
49
|
+
default: c(() => [
|
|
50
|
+
i(l($), {
|
|
51
|
+
class: A([
|
|
52
|
+
"group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left",
|
|
53
|
+
(s.flow?.selectedScopes?.length || 0) > 0 ? "text-c-1" : "text-c-3"
|
|
54
|
+
])
|
|
55
|
+
}, {
|
|
56
|
+
default: c(({ open: o }) => [
|
|
57
|
+
n("div", I, " Scopes Selected " + d(s.flow?.selectedScopes?.length || 0) + " / " + d(Object.keys(s.flow?.scopes ?? {}).length || 0), 1),
|
|
58
|
+
n("div", R, [
|
|
59
|
+
h.value ? (a(), r(l(g), {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "pr-0.75 pl-1 transition-none",
|
|
62
|
+
size: "sm",
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
onClick: w(C, ["stop"])
|
|
65
|
+
}, {
|
|
66
|
+
default: c(() => t[0] || (t[0] = [
|
|
67
|
+
m(" Deselect All ")
|
|
68
|
+
])),
|
|
69
|
+
_: 1,
|
|
70
|
+
__: [0]
|
|
71
|
+
})) : p("", !0),
|
|
72
|
+
h.value ? p("", !0) : (a(), r(l(g), {
|
|
73
|
+
key: 1,
|
|
74
|
+
class: "pr-0.75 pl-1 transition-none",
|
|
75
|
+
size: "sm",
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
onClick: w(b, ["stop"])
|
|
78
|
+
}, {
|
|
79
|
+
default: c(() => t[1] || (t[1] = [
|
|
80
|
+
m(" Select All ")
|
|
81
|
+
])),
|
|
82
|
+
_: 1,
|
|
83
|
+
__: [1]
|
|
84
|
+
})),
|
|
85
|
+
i(l(E), {
|
|
86
|
+
class: "text-c-3 group-hover/scopes-accordion:text-c-2",
|
|
87
|
+
icon: o ? "ChevronDown" : "ChevronRight",
|
|
88
|
+
size: "md"
|
|
89
|
+
}, null, 8, ["icon"])
|
|
66
90
|
])
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, {
|
|
80
|
-
default: c(() =>
|
|
81
|
-
x("
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
icon: a ? "ChevronDown" : "ChevronRight",
|
|
102
|
-
size: "md"
|
|
103
|
-
}, null, 8, ["icon"])
|
|
104
|
-
])
|
|
105
|
-
];
|
|
106
|
-
}),
|
|
107
|
-
_: 1
|
|
108
|
-
}, 8, ["class"]),
|
|
109
|
-
u(s(E), { as: "template" }, {
|
|
110
|
-
default: c(() => [
|
|
111
|
-
i("table", U, [
|
|
112
|
-
(n(!0), y($, null, j(D.value, ({ id: a, label: f, description: r }) => (n(), p(s(F), {
|
|
113
|
-
key: a,
|
|
114
|
-
class: "text-c-2",
|
|
115
|
-
onClick: (h) => V(a, !d.value.includes(a))
|
|
116
|
-
}, {
|
|
117
|
-
default: c(() => [
|
|
118
|
-
u(s(b), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
|
|
119
|
-
default: c(() => [
|
|
120
|
-
r ? (n(), y("div", q, [
|
|
121
|
-
i("span", G, m(f), 1),
|
|
122
|
-
x(" – " + m(r), 1)
|
|
123
|
-
])) : w("", !0)
|
|
124
|
-
]),
|
|
125
|
-
_: 2
|
|
126
|
-
}, 1024),
|
|
127
|
-
u(s(I), {
|
|
128
|
-
modelValue: d.value.includes(a),
|
|
129
|
-
"onUpdate:modelValue": () => {
|
|
130
|
-
}
|
|
131
|
-
}, null, 8, ["modelValue"])
|
|
132
|
-
]),
|
|
133
|
-
_: 2
|
|
134
|
-
}, 1032, ["onClick"]))), 128))
|
|
135
|
-
])
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
})
|
|
139
|
-
];
|
|
140
|
-
}),
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
}, 8, ["class"]),
|
|
94
|
+
i(l(j), { as: "template" }, {
|
|
95
|
+
default: c(() => [
|
|
96
|
+
n("table", L, [
|
|
97
|
+
(a(!0), x(B, null, O(k.value, ({ id: o, label: D, description: S }) => (a(), r(l(z), {
|
|
98
|
+
key: o,
|
|
99
|
+
class: "text-c-2",
|
|
100
|
+
onClick: (U) => y(o, !u.value.includes(o))
|
|
101
|
+
}, {
|
|
102
|
+
default: c(() => [
|
|
103
|
+
i(l(v), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
|
|
104
|
+
default: c(() => [
|
|
105
|
+
S ? (a(), x("div", M, [
|
|
106
|
+
n("span", P, d(D), 1),
|
|
107
|
+
m(" – " + d(S), 1)
|
|
108
|
+
])) : p("", !0)
|
|
109
|
+
]),
|
|
110
|
+
_: 2
|
|
111
|
+
}, 1024),
|
|
112
|
+
i(l(N), {
|
|
113
|
+
modelValue: u.value.includes(o),
|
|
114
|
+
"onUpdate:modelValue": () => {
|
|
115
|
+
}
|
|
116
|
+
}, null, 8, ["modelValue"])
|
|
117
|
+
]),
|
|
118
|
+
_: 2
|
|
119
|
+
}, 1032, ["onClick"]))), 128))
|
|
120
|
+
])
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})
|
|
124
|
+
]),
|
|
141
125
|
_: 1
|
|
142
126
|
})
|
|
143
127
|
])
|
|
@@ -147,5 +131,5 @@ const L = { class: "flex h-fit w-full" }, M = { class: "flex-1" }, P = { class:
|
|
|
147
131
|
}
|
|
148
132
|
});
|
|
149
133
|
export {
|
|
150
|
-
|
|
134
|
+
K as default
|
|
151
135
|
};
|