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