@scalar/api-client 2.12.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -2
  5. package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
  6. package/dist/components/CommandPalette/CommandActionForm.vue.js +14 -14
  7. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +38 -38
  8. package/dist/components/EmptyState.vue.d.ts.map +1 -1
  9. package/dist/components/EmptyState.vue.js +2 -2
  10. package/dist/components/EmptyState.vue2.js +27 -16
  11. package/dist/components/TopNav/TopNav.vue.js +33 -33
  12. package/dist/layouts/App/create-api-client-app.d.ts +28 -28
  13. package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
  14. package/dist/libs/create-client.d.ts +28 -28
  15. package/dist/libs/hot-keys.d.ts +2 -2
  16. package/dist/libs/send-request/create-fetch-body.d.ts +2 -2
  17. package/dist/store/active-entities.d.ts +2 -2
  18. package/dist/store/collections.d.ts +4 -4
  19. package/dist/store/index.d.ts +1 -1
  20. package/dist/store/index.d.ts.map +1 -1
  21. package/dist/store/index.js +8 -8
  22. package/dist/store/request-example.d.ts +12 -12
  23. package/dist/store/store.d.ts +28 -28
  24. package/dist/store/workspace.d.ts +12 -12
  25. package/dist/style.css +1 -1
  26. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
  27. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  28. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +9 -8
  29. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
  30. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  31. package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
  32. package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
  33. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
  35. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +14 -11
  36. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +22 -22
  37. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
  38. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
  40. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +18 -15
  41. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
  42. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +17 -17
  43. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  45. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +17 -12
  46. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +205 -0
  48. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +52 -52
  50. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +1 -1
  51. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  52. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +205 -0
  53. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
  55. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  56. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +90 -75
  57. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  58. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -2
  59. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  60. package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
  61. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  62. package/dist/v2/features/app/App.vue.js +126 -103
  63. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -2
  64. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  65. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  66. package/dist/v2/features/app/components/AppSidebar.vue2.js +56 -53
  67. package/dist/v2/features/app/components/DesktopTab.vue.d.ts +26 -0
  68. package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -0
  69. package/dist/v2/features/app/components/DesktopTab.vue.js +7 -0
  70. package/dist/v2/features/app/components/DesktopTab.vue2.js +134 -0
  71. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +9 -4
  72. package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
  73. package/dist/v2/features/app/components/DesktopTabs.vue.js +47 -13
  74. package/dist/v2/features/app/components/DesktopTabs.vue2.js +2 -4
  75. package/dist/v2/features/app/components/SplashScreen.vue.js +2 -2
  76. package/dist/v2/features/app/components/SplashScreen.vue2.js +2 -2
  77. package/dist/v2/features/app/helpers/routes.js +1 -1
  78. package/dist/v2/features/collection/components/Settings.vue2.js +3 -3
  79. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +61 -0
  80. package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -0
  81. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +48 -0
  82. package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +4 -0
  83. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +39 -0
  84. package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts.map +1 -0
  85. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +52 -0
  86. package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +4 -0
  87. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts +36 -0
  88. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +1 -0
  89. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.js +78 -0
  90. package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +4 -0
  91. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +30 -0
  92. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -0
  93. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +169 -0
  94. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +4 -0
  95. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +34 -0
  96. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -0
  97. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +175 -0
  98. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +4 -0
  99. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +43 -0
  100. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -0
  101. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +7 -0
  102. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +115 -0
  103. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +39 -0
  104. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -0
  105. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +213 -0
  106. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +4 -0
  107. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +38 -0
  108. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -0
  109. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +89 -0
  110. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +4 -0
  111. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts +41 -0
  112. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -0
  113. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +7 -0
  114. package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +172 -0
  115. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +33 -0
  116. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -0
  117. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +40 -0
  118. package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +4 -0
  119. package/dist/v2/features/command-palette/components/index.d.ts +2 -0
  120. package/dist/v2/features/command-palette/components/index.d.ts.map +1 -0
  121. package/dist/v2/features/command-palette/components/index.js +4 -0
  122. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +23 -0
  123. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -0
  124. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +31 -0
  125. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +13 -0
  126. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -0
  127. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +12 -0
  128. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +26 -0
  129. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -0
  130. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +70 -0
  131. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +23 -0
  132. package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -0
  133. package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +18 -0
  134. package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts +11 -0
  135. package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts.map +1 -0
  136. package/dist/v2/features/command-palette/helpers/is-postman-collection.js +11 -0
  137. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +202 -0
  138. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -0
  139. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +109 -0
  140. package/dist/v2/features/command-palette/types.d.ts +82 -0
  141. package/dist/v2/features/command-palette/types.d.ts.map +1 -0
  142. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  143. package/dist/v2/features/operation/Operation.vue.js +24 -20
  144. package/dist/v2/helpers/drag-handle-factory.d.ts +1 -2
  145. package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
  146. package/dist/v2/helpers/drag-handle-factory.js +84 -99
  147. package/dist/v2/helpers/get-tab-details.d.ts +43 -0
  148. package/dist/v2/helpers/get-tab-details.d.ts.map +1 -0
  149. package/dist/v2/helpers/get-tab-details.js +34 -0
  150. package/dist/v2/helpers/handle-hotkeys.js +1 -1
  151. package/dist/v2/helpers/is-url.d.ts +2 -0
  152. package/dist/v2/helpers/is-url.d.ts.map +1 -0
  153. package/dist/v2/helpers/is-url.js +5 -0
  154. package/dist/v2/helpers/remove-circular.d.ts +15 -0
  155. package/dist/v2/helpers/remove-circular.d.ts.map +1 -0
  156. package/dist/v2/helpers/remove-circular.js +18 -0
  157. package/dist/v2/helpers/storage.d.ts +4 -6
  158. package/dist/v2/helpers/storage.d.ts.map +1 -1
  159. package/dist/v2/helpers/storage.js +8 -12
  160. package/dist/v2/hooks/use-sidebar-state.d.ts +12 -19
  161. package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
  162. package/dist/v2/hooks/use-sidebar-state.js +36 -30
  163. package/dist/v2/hooks/use-sync-path.d.ts +11 -0
  164. package/dist/v2/hooks/use-sync-path.d.ts.map +1 -0
  165. package/dist/v2/hooks/use-sync-path.js +51 -0
  166. package/dist/v2/hooks/use-tabs.d.ts +31 -0
  167. package/dist/v2/hooks/use-tabs.d.ts.map +1 -0
  168. package/dist/v2/hooks/use-tabs.js +44 -0
  169. package/dist/v2/hooks/use-workspace-client-events.d.ts +5 -2
  170. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  171. package/dist/v2/hooks/use-workspace-client-events.js +91 -36
  172. package/dist/v2/hooks/use-workspace-selector.d.ts +16 -6
  173. package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -1
  174. package/dist/v2/hooks/use-workspace-selector.js +58 -64
  175. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  176. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +78 -78
  177. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +29 -29
  178. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  179. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
  180. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +19 -19
  181. package/dist/views/Request/libs/oauth2.d.ts +2 -2
  182. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  183. package/dist/views/Request/libs/oauth2.js +66 -53
  184. package/package.json +134 -44
@@ -1,15 +1,14 @@
1
- import { createWorkspaceStore as f } from "@scalar/workspace-store/client";
2
- import { generateUniqueValue as d } from "@scalar/workspace-store/helpers/generate-unique-value";
3
- import { createWorkspaceStorePersistence as W } from "@scalar/workspace-store/persistence";
4
- import { persistencePlugin as g } from "@scalar/workspace-store/plugins/client";
5
- import { ref as u, watch as h, toValue as v } from "vue";
6
- import { useRouter as y } from "vue-router";
7
- import { slugify as D } from "../helpers/slugify.js";
8
- import { workspaceStorage as S } from "../helpers/storage.js";
9
- const A = 1e3, s = {
1
+ import { createWorkspaceStore as l } from "@scalar/workspace-store/client";
2
+ import { generateUniqueValue as W } from "@scalar/workspace-store/helpers/generate-unique-value";
3
+ import { createWorkspaceStorePersistence as v } from "@scalar/workspace-store/persistence";
4
+ import { persistencePlugin as D } from "@scalar/workspace-store/plugins/client";
5
+ import { ref as i } from "vue";
6
+ import { useRouter as g } from "vue-router";
7
+ import { slugify as y } from "../helpers/slugify.js";
8
+ const S = 1e3, R = {
10
9
  name: "Default Workspace",
11
10
  id: "default"
12
- }, E = {
11
+ }, h = {
13
12
  openapi: "3.1.0",
14
13
  info: {
15
14
  title: "Drafts",
@@ -22,66 +21,61 @@ const A = 1e3, s = {
22
21
  },
23
22
  "x-scalar-original-document-hash": "drafts",
24
23
  "x-scalar-icon": "interface-edit-tool-pencil"
25
- }, I = async ({ workspaceId: c }) => f({
26
- plugins: [await g({ workspaceId: c, debounceDelay: A })]
27
- }), F = ({
28
- workspaceId: c
29
- }) => {
30
- const l = u(null), n = u([]), w = u(null), o = W(), k = y(), i = async (e) => {
31
- const t = await (await o).workspace.getItem(e);
32
- if (!t)
33
- return !1;
34
- const a = await I({ workspaceId: e });
35
- return a.loadWorkspace(t.workspace), S.setActiveWorkspaceId(e), l.value = { id: e, name: t.name }, w.value = a, !0;
36
- }, m = async ({ id: e, name: r }) => {
37
- const t = f();
38
- await t.addDocument({
24
+ }, A = async ({ workspaceId: r }) => l({
25
+ plugins: [await D({ workspaceId: r, debounceDelay: S })]
26
+ }), _ = () => {
27
+ const r = i(null), c = i([]), n = i(null), o = v(), w = g(), m = async (e) => {
28
+ const a = await (await o).workspace.getItem(e);
29
+ if (!a)
30
+ return {
31
+ success: !1
32
+ };
33
+ const s = await A({ workspaceId: e });
34
+ return s.loadWorkspace(a.workspace), r.value = { id: e, name: a.name }, n.value = s, {
35
+ success: !0,
36
+ workspace: s
37
+ };
38
+ }, k = async ({ id: e, name: t }) => {
39
+ const a = l();
40
+ await a.addDocument({
39
41
  name: "drafts",
40
- document: E
42
+ document: h
41
43
  }), await (await o).workspace.setItem(e, {
42
- name: r,
43
- workspace: t.exportWorkspace()
44
+ name: t,
45
+ workspace: a.exportWorkspace()
46
+ }), c.value.push({ id: e, name: t });
47
+ }, p = async (e) => {
48
+ await w.push({
49
+ name: "workspace.environment",
50
+ params: { workspaceSlug: e }
44
51
  });
52
+ }, f = async ({ id: e, name: t }) => {
53
+ n.value = null;
54
+ const a = await o, s = await W({
55
+ defaultValue: e ?? t,
56
+ // Use the provided id if it exists, otherwise use the name
57
+ validation: async (d) => !await a.workspace.has(d),
58
+ maxRetries: 100,
59
+ transformation: y
60
+ });
61
+ if (!s)
62
+ return;
63
+ const u = { id: s, name: t };
64
+ return await k(u), await p(s), u;
45
65
  };
46
- h(
47
- () => v(c),
48
- async (e) => {
49
- const r = e, a = await (await o).workspace.getAll();
50
- if (n.value = a, !!r && !await i(r)) {
51
- if (r === s.id) {
52
- if (a[0] && await i(a[0].id))
53
- return;
54
- if (await m(s), await i(s.id)) {
55
- n.value.push(s);
56
- return;
57
- }
58
- console.error("[ERROR]: something went wrong when trying to create the default workspace");
59
- return;
60
- }
61
- return p(s.id);
62
- }
63
- },
64
- { immediate: !0 }
65
- );
66
- const p = (e) => {
67
- k.push({ name: "workspace.environment", params: { workspaceSlug: e } });
68
- };
69
- return {
70
- store: w,
71
- activeWorkspace: l,
72
- workspaces: n,
66
+ return (async () => {
67
+ const t = await (await o).workspace.getAll();
68
+ c.value = t;
69
+ })(), {
70
+ store: n,
71
+ activeWorkspace: r,
72
+ workspaces: c,
73
73
  setWorkspaceId: p,
74
- createWorkspace: async ({ name: e }) => {
75
- const r = await o, t = await d({
76
- defaultValue: e,
77
- validation: async (a) => !await r.workspace.has(a),
78
- maxRetries: 100,
79
- transformation: D
80
- });
81
- t && (await m({ id: t, name: e }), p(t));
82
- }
74
+ createWorkspace: f,
75
+ loadWorkspace: m
83
76
  };
84
77
  };
85
78
  export {
86
- F as useWorkspaceSelector
79
+ R as DEFAULT_WORKSPACE,
80
+ _ as useWorkspaceSelector
87
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAkRA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAiBF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;CAChC,CAAC;AAqgBF,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAoRA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAiBF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;CAChC,CAAC;AAugBF,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,14 +1,14 @@
1
- import { defineComponent as T, createElementBlock as V, openBlock as d, Fragment as U, createBlock as k, createCommentVNode as w, createVNode as r, unref as a, withCtx as o, mergeProps as m, createTextVNode as u, createElementVNode as $, renderSlot as P } from "vue";
2
- import { useLoadingState as A, ScalarButton as v } from "@scalar/components";
1
+ import { defineComponent as T, createElementBlock as y, openBlock as d, Fragment as U, createBlock as k, createCommentVNode as p, createVNode as r, unref as a, withCtx as o, mergeProps as m, createTextVNode as u, createElementVNode as $, renderSlot as P } from "vue";
2
+ import { useLoadingState as A, ScalarButton as z } from "@scalar/components";
3
3
  import { pkceOptions as B } from "@scalar/oas-utils/entities/spec";
4
- import { useToasts as L } from "@scalar/use-toasts";
5
- import { useWorkspace as R } from "../../../../store/store.js";
6
- import { updateScheme as F } from "../helpers/update-scheme.js";
7
- import I from "./OAuthScopesInput.vue.js";
8
- import p from "./RequestAuthDataTableInput.vue.js";
9
- import i from "../../../../components/DataTable/DataTableRow.vue.js";
10
- import { authorizeOauth2 as N } from "../../libs/oauth2.js";
11
- const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class: "flex h-8 w-full items-center justify-end border-t" }, q = /* @__PURE__ */ T({
4
+ import { useToasts as R } from "@scalar/use-toasts";
5
+ import { useWorkspace as F } from "../../../../store/store.js";
6
+ import { updateScheme as I } from "../helpers/update-scheme.js";
7
+ import N from "./OAuthScopesInput.vue.js";
8
+ import w from "./RequestAuthDataTableInput.vue.js";
9
+ import f from "../../../../components/DataTable/DataTableRow.vue.js";
10
+ import { authorizeOauth2 as O } from "../../libs/oauth2.js";
11
+ const j = { class: "flex h-8 items-center justify-end border-t" }, L = { class: "flex h-8 w-full items-center justify-end border-t" }, q = /* @__PURE__ */ T({
12
12
  __name: "OAuth2",
13
13
  props: {
14
14
  collection: {},
@@ -21,36 +21,36 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
21
21
  workspace: {}
22
22
  },
23
23
  emits: ["authorized"],
24
- setup(s, { emit: z }) {
25
- const S = z, y = A(), { toast: g } = L(), b = R(), n = (l, e) => F(s.scheme.uid, l, e, b, s.persistAuth), C = async () => {
26
- if (y.isLoading || !s.collection?.uid)
24
+ setup(n, { emit: b }) {
25
+ const C = b, V = A(), { toast: v } = R(), S = F(), s = (l, e) => I(n.scheme.uid, l, e, S, n.persistAuth), g = async () => {
26
+ if (V.isActive || !n.collection?.uid)
27
27
  return;
28
- if (!s.server) {
29
- g("No server selected", "error");
28
+ if (!n.server) {
29
+ v("No server selected", "error");
30
30
  return;
31
31
  }
32
- y.startLoading();
33
- const [l, e] = await N(
34
- s.flow,
35
- s.server,
36
- s.workspace?.proxyUrl
37
- ).finally(() => y.stopLoading());
38
- e ? (n(`flows.${s.flow.type}.token`, e), S("authorized")) : (console.error(l), g(l?.message ?? "Failed to authorize", "error"));
39
- }, f = {
40
- environment: s.environment,
41
- envVariables: s.envVariables,
42
- workspace: s.workspace
32
+ V.start();
33
+ const [l, e] = await O(
34
+ n.flow,
35
+ n.server,
36
+ n.workspace?.proxyUrl
37
+ );
38
+ await V.clear(), e ? (s(`flows.${n.flow.type}.token`, e), C("authorized")) : (console.error(l), v(l?.message ?? "Failed to authorize", "error"));
39
+ }, i = {
40
+ environment: n.environment,
41
+ envVariables: n.envVariables,
42
+ workspace: n.workspace
43
43
  };
44
- return (l, e) => (d(), V(U, null, [
45
- l.flow.token ? (d(), V(U, { key: 0 }, [
46
- r(a(i), null, {
44
+ return (l, e) => (d(), y(U, null, [
45
+ l.flow.token ? (d(), y(U, { key: 0 }, [
46
+ r(a(f), null, {
47
47
  default: o(() => [
48
- r(p, m(f, {
48
+ r(w, m(i, {
49
49
  class: "border-r-transparent",
50
50
  modelValue: l.flow.token,
51
51
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
52
52
  type: "password",
53
- "onUpdate:modelValue": e[0] || (e[0] = (t) => n(`flows.${l.flow.type}.token`, t))
53
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => s(`flows.${l.flow.type}.token`, t))
54
54
  }), {
55
55
  default: o(() => [...e[10] || (e[10] = [
56
56
  u(" Access Token ", -1)
@@ -60,59 +60,59 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
60
60
  ]),
61
61
  _: 1
62
62
  }),
63
- r(a(i), { class: "min-w-full" }, {
63
+ r(a(f), { class: "min-w-full" }, {
64
64
  default: o(() => [
65
- $("div", O, [
66
- r(a(v), {
65
+ $("div", j, [
66
+ r(a(z), {
67
67
  class: "mr-1 p-0 px-2 py-0.5",
68
- loading: a(y),
68
+ loader: a(V),
69
69
  size: "sm",
70
70
  variant: "outlined",
71
- onClick: e[1] || (e[1] = (t) => n(`flows.${l.flow.type}.token`, ""))
71
+ onClick: e[1] || (e[1] = (t) => s(`flows.${l.flow.type}.token`, ""))
72
72
  }, {
73
73
  default: o(() => [...e[11] || (e[11] = [
74
74
  u(" Clear ", -1)
75
75
  ])]),
76
76
  _: 1
77
- }, 8, ["loading"]),
77
+ }, 8, ["loader"]),
78
78
  P(l.$slots, "oauth-actions")
79
79
  ])
80
80
  ]),
81
81
  _: 3
82
82
  })
83
- ], 64)) : (d(), V(U, { key: 1 }, [
84
- r(a(i), null, {
83
+ ], 64)) : (d(), y(U, { key: 1 }, [
84
+ r(a(f), null, {
85
85
  default: o(() => [
86
- "authorizationUrl" in l.flow ? (d(), k(p, m({ key: 0 }, f, {
86
+ "authorizationUrl" in l.flow ? (d(), k(w, m({ key: 0 }, i, {
87
87
  containerClass: "border-r-0",
88
88
  modelValue: l.flow.authorizationUrl,
89
89
  placeholder: "https://galaxy.scalar.com/authorize",
90
- "onUpdate:modelValue": e[2] || (e[2] = (t) => n(`flows.${l.flow.type}.authorizationUrl`, t))
90
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => s(`flows.${l.flow.type}.authorizationUrl`, t))
91
91
  }), {
92
92
  default: o(() => [...e[12] || (e[12] = [
93
93
  u(" Auth URL ", -1)
94
94
  ])]),
95
95
  _: 1
96
- }, 16, ["modelValue"])) : w("", !0),
97
- "tokenUrl" in l.flow ? (d(), k(p, m({ key: 1 }, f, {
96
+ }, 16, ["modelValue"])) : p("", !0),
97
+ "tokenUrl" in l.flow ? (d(), k(w, m({ key: 1 }, i, {
98
98
  modelValue: l.flow.tokenUrl,
99
99
  placeholder: "https://galaxy.scalar.com/token",
100
- "onUpdate:modelValue": e[3] || (e[3] = (t) => n(`flows.${l.flow.type}.tokenUrl`, t))
100
+ "onUpdate:modelValue": e[3] || (e[3] = (t) => s(`flows.${l.flow.type}.tokenUrl`, t))
101
101
  }), {
102
102
  default: o(() => [...e[13] || (e[13] = [
103
103
  u(" Token URL ", -1)
104
104
  ])]),
105
105
  _: 1
106
- }, 16, ["modelValue"])) : w("", !0)
106
+ }, 16, ["modelValue"])) : p("", !0)
107
107
  ]),
108
108
  _: 1
109
109
  }),
110
- "x-scalar-redirect-uri" in l.flow ? (d(), k(a(i), { key: 0 }, {
110
+ "x-scalar-redirect-uri" in l.flow ? (d(), k(a(f), { key: 0 }, {
111
111
  default: o(() => [
112
- r(p, m(f, {
112
+ r(w, m(i, {
113
113
  modelValue: l.flow["x-scalar-redirect-uri"],
114
114
  placeholder: "https://galaxy.scalar.com/callback",
115
- "onUpdate:modelValue": e[4] || (e[4] = (t) => n(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
115
+ "onUpdate:modelValue": e[4] || (e[4] = (t) => s(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
116
116
  }), {
117
117
  default: o(() => [...e[14] || (e[14] = [
118
118
  u(" Redirect URL ", -1)
@@ -121,15 +121,15 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
121
121
  }, 16, ["modelValue"])
122
122
  ]),
123
123
  _: 1
124
- })) : w("", !0),
125
- l.flow.type === "password" ? (d(), V(U, { key: 1 }, [
126
- r(a(i), null, {
124
+ })) : p("", !0),
125
+ l.flow.type === "password" ? (d(), y(U, { key: 1 }, [
126
+ r(a(f), null, {
127
127
  default: o(() => [
128
- r(p, m(f, {
128
+ r(w, m(i, {
129
129
  class: "text-c-2",
130
130
  modelValue: l.flow.username,
131
131
  placeholder: "janedoe",
132
- "onUpdate:modelValue": e[5] || (e[5] = (t) => n(`flows.${l.flow.type}.username`, t))
132
+ "onUpdate:modelValue": e[5] || (e[5] = (t) => s(`flows.${l.flow.type}.username`, t))
133
133
  }), {
134
134
  default: o(() => [...e[15] || (e[15] = [
135
135
  u(" Username ", -1)
@@ -139,13 +139,13 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
139
139
  ]),
140
140
  _: 1
141
141
  }),
142
- r(a(i), null, {
142
+ r(a(f), null, {
143
143
  default: o(() => [
144
- r(p, m(f, {
144
+ r(w, m(i, {
145
145
  modelValue: l.flow.password,
146
146
  placeholder: "********",
147
147
  type: "password",
148
- "onUpdate:modelValue": e[6] || (e[6] = (t) => n(`flows.${l.flow.type}.password`, t))
148
+ "onUpdate:modelValue": e[6] || (e[6] = (t) => s(`flows.${l.flow.type}.password`, t))
149
149
  }), {
150
150
  default: o(() => [...e[16] || (e[16] = [
151
151
  u(" Password ", -1)
@@ -155,13 +155,13 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
155
155
  ]),
156
156
  _: 1
157
157
  })
158
- ], 64)) : w("", !0),
159
- r(a(i), null, {
158
+ ], 64)) : p("", !0),
159
+ r(a(f), null, {
160
160
  default: o(() => [
161
- r(p, m(f, {
161
+ r(w, m(i, {
162
162
  modelValue: l.flow["x-scalar-client-id"],
163
163
  placeholder: "12345",
164
- "onUpdate:modelValue": e[7] || (e[7] = (t) => n(`flows.${l.flow.type}.x-scalar-client-id`, t))
164
+ "onUpdate:modelValue": e[7] || (e[7] = (t) => s(`flows.${l.flow.type}.x-scalar-client-id`, t))
165
165
  }), {
166
166
  default: o(() => [...e[17] || (e[17] = [
167
167
  u(" Client ID ", -1)
@@ -171,13 +171,13 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
171
171
  ]),
172
172
  _: 1
173
173
  }),
174
- "clientSecret" in l.flow ? (d(), k(a(i), { key: 2 }, {
174
+ "clientSecret" in l.flow ? (d(), k(a(f), { key: 2 }, {
175
175
  default: o(() => [
176
- r(p, m(f, {
176
+ r(w, m(i, {
177
177
  modelValue: l.flow.clientSecret,
178
178
  placeholder: "XYZ123",
179
179
  type: "password",
180
- "onUpdate:modelValue": e[8] || (e[8] = (t) => n(`flows.${l.flow.type}.clientSecret`, t))
180
+ "onUpdate:modelValue": e[8] || (e[8] = (t) => s(`flows.${l.flow.type}.clientSecret`, t))
181
181
  }), {
182
182
  default: o(() => [...e[18] || (e[18] = [
183
183
  u(" Client Secret ", -1)
@@ -186,14 +186,14 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
186
186
  }, 16, ["modelValue"])
187
187
  ]),
188
188
  _: 1
189
- })) : w("", !0),
190
- "x-usePkce" in l.flow ? (d(), k(a(i), { key: 3 }, {
189
+ })) : p("", !0),
190
+ "x-usePkce" in l.flow ? (d(), k(a(f), { key: 3 }, {
191
191
  default: o(() => [
192
- r(p, m(f, {
192
+ r(w, m(i, {
193
193
  enum: a(B),
194
194
  modelValue: l.flow["x-usePkce"],
195
195
  readOnly: "",
196
- "onUpdate:modelValue": e[9] || (e[9] = (t) => n(
196
+ "onUpdate:modelValue": e[9] || (e[9] = (t) => s(
197
197
  `flows.${l.flow.type}.x-usePkce`,
198
198
  t
199
199
  ))
@@ -205,35 +205,35 @@ const O = { class: "flex h-8 items-center justify-end border-t" }, j = { class:
205
205
  }, 16, ["enum", "modelValue"])
206
206
  ]),
207
207
  _: 1
208
- })) : w("", !0),
209
- Object.keys(l.flow.scopes ?? {}).length ? (d(), k(a(i), { key: 4 }, {
208
+ })) : p("", !0),
209
+ Object.keys(l.flow.scopes ?? {}).length ? (d(), k(a(f), { key: 4 }, {
210
210
  default: o(() => [
211
- r(I, {
211
+ r(N, {
212
212
  flow: l.flow,
213
- updateScheme: n
213
+ updateScheme: s
214
214
  }, null, 8, ["flow"])
215
215
  ]),
216
216
  _: 1
217
- })) : w("", !0)
217
+ })) : p("", !0)
218
218
  ], 64)),
219
- l.flow.token ? w("", !0) : (d(), k(a(i), {
219
+ l.flow.token ? p("", !0) : (d(), k(a(f), {
220
220
  key: 2,
221
221
  class: "min-w-full"
222
222
  }, {
223
223
  default: o(() => [
224
- $("div", j, [
225
- r(a(v), {
224
+ $("div", L, [
225
+ r(a(z), {
226
226
  class: "mr-0.75 p-0 px-2 py-0.5",
227
- loading: a(y),
227
+ loader: a(V),
228
228
  size: "sm",
229
229
  variant: "outlined",
230
- onClick: C
230
+ onClick: g
231
231
  }, {
232
232
  default: o(() => [...e[20] || (e[20] = [
233
233
  u(" Authorize ", -1)
234
234
  ])]),
235
235
  _: 1
236
- }, 8, ["loading"])
236
+ }, 8, ["loader"])
237
237
  ])
238
238
  ]),
239
239
  _: 1
@@ -1,6 +1,6 @@
1
- import { defineComponent as y, ref as i, watch as _, nextTick as w, onMounted as h, onBeforeUnmount as k, createBlock as L, openBlock as s, withCtx as p, createElementVNode as l, createElementBlock as d, createCommentVNode as c, toDisplayString as g, unref as u, createVNode as B } from "vue";
2
- import { useLoadingState as S, ScalarLoading as b } from "@scalar/components";
3
- import C from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
1
+ import { defineComponent as y, ref as c, watch as _, nextTick as w, onMounted as h, onBeforeUnmount as k, createBlock as B, openBlock as l, withCtx as v, createElementVNode as s, createElementBlock as i, createCommentVNode as d, toDisplayString as p, unref as u, createVNode as b } from "vue";
2
+ import { useLoadingState as C, ScalarLoading as S } from "@scalar/components";
3
+ import L from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
4
  const T = { class: "flex w-full items-center justify-between" }, E = {
5
5
  key: 0,
6
6
  class: "mr-2 flex items-center gap-2"
@@ -16,53 +16,53 @@ const T = { class: "flex w-full items-center justify-between" }, E = {
16
16
  reader: {}
17
17
  },
18
18
  setup(f) {
19
- const e = S(), o = i(""), a = i(null), m = new TextDecoder(), r = i(null), v = () => {
20
- r.value && (r.value.scrollTop = r.value.scrollHeight);
19
+ const e = C(), o = c(""), n = c(null), m = new TextDecoder(), a = c(null), x = () => {
20
+ a.value && (a.value.scrollTop = a.value.scrollHeight);
21
21
  };
22
22
  _(o, () => {
23
- w(v);
23
+ w(x);
24
24
  });
25
- async function x() {
25
+ async function g() {
26
26
  try {
27
27
  for (; e.isLoading; ) {
28
- const { done: n, value: t } = await f.reader.read();
29
- if (n) {
30
- e.stopLoading();
28
+ const { done: r, value: t } = await f.reader.read();
29
+ if (r) {
30
+ e.clear();
31
31
  break;
32
32
  }
33
33
  t && (o.value += m.decode(t, { stream: !0 }));
34
34
  }
35
- } catch (n) {
36
- console.error("Error reading stream:", n), e.stopLoading(), a.value = n;
35
+ } catch (r) {
36
+ console.error("Error reading stream:", r), e.clear(), n.value = r;
37
37
  } finally {
38
38
  o.value += m.decode();
39
39
  }
40
40
  }
41
41
  return h(() => {
42
- e.startLoading(), x(), a.value = null;
42
+ e.start(), g(), n.value = null;
43
43
  }), k(() => {
44
- f.reader.cancel(), e.stopLoading();
45
- }), (n, t) => (s(), L(C, { class: "max-h-content overflow-y-hidden" }, {
46
- title: p(() => [
47
- l("div", T, [
48
- t[1] || (t[1] = l("div", null, "Body", -1)),
49
- u(e).isLoading ? (s(), d("div", E, [
50
- B(u(b), {
51
- loadingState: u(e),
44
+ f.reader.cancel(), e.clear();
45
+ }), (r, t) => (l(), B(L, { class: "max-h-content overflow-y-hidden" }, {
46
+ title: v(() => [
47
+ s("div", T, [
48
+ t[1] || (t[1] = s("div", null, "Body", -1)),
49
+ u(e).isActive ? (l(), i("div", E, [
50
+ b(u(S), {
51
+ loader: u(e),
52
52
  size: "xs"
53
- }, null, 8, ["loadingState"]),
54
- t[0] || (t[0] = l("span", { class: "text-c-2" }, " Listening… ", -1))
55
- ])) : c("", !0)
53
+ }, null, 8, ["loader"]),
54
+ t[0] || (t[0] = s("span", { class: "text-c-2" }, " Listening… ", -1))
55
+ ])) : d("", !0)
56
56
  ])
57
57
  ]),
58
- default: p(() => [
59
- l("div", {
58
+ default: v(() => [
59
+ s("div", {
60
60
  ref_key: "contentContainer",
61
- ref: r,
61
+ ref: a,
62
62
  class: "text-xxs font-code h-full overflow-auto leading-2 whitespace-pre-wrap"
63
63
  }, [
64
- a.value ? (s(), d("div", N, g(a.value.message), 1)) : c("", !0),
65
- o.value ? (s(), d("div", V, g(o.value), 1)) : c("", !0)
64
+ n.value ? (l(), i("div", N, p(n.value.message), 1)) : d("", !0),
65
+ o.value ? (l(), i("div", V, p(o.value), 1)) : d("", !0)
66
66
  ], 512)
67
67
  ]),
68
68
  _: 1
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
33
33
  }));
34
34
  }, f = (o) => {
35
35
  o?.createNew && g.name === "request" && d();
36
- }, v = "2.12.0";
36
+ }, v = "2.14.0";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (o, e) => (i(), l("div", W, [
38
38
  s("div", {
39
39
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
@@ -1,7 +1,7 @@
1
1
  import o from "./ResponseLoadingOverlay.vue2.js";
2
2
  /* empty css */
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-5d3b84e1"]]);
3
+ import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-7ec8af01"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,29 +1,29 @@
1
- import { defineComponent as u, ref as c, createBlock as d, openBlock as l, Transition as m, withCtx as r, createElementBlock as f, createCommentVNode as p, unref as e, createVNode as i, createTextVNode as g } from "vue";
2
- import { useLoadingState as v, ScalarLoading as x, ScalarButton as _ } from "@scalar/components";
1
+ import { defineComponent as c, ref as u, createBlock as m, openBlock as s, Transition as d, withCtx as l, createElementBlock as f, createCommentVNode as p, unref as e, createVNode as i, createTextVNode as v } from "vue";
2
+ import { useLoadingState as x, ScalarLoading as _, ScalarButton as g } from "@scalar/components";
3
3
  import { useWorkspace as k } from "../../../store/store.js";
4
- const L = {
4
+ const y = {
5
5
  key: 0,
6
6
  class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
7
- }, b = /* @__PURE__ */ u({
7
+ }, L = /* @__PURE__ */ c({
8
8
  __name: "ResponseLoadingOverlay",
9
- setup(S) {
10
- const { events: n } = k(), t = v(), a = c();
11
- return n.requestStatus.on((s) => {
12
- s === "start" ? a.value = setTimeout(() => t.startLoading(), 1e3) : (clearTimeout(a.value), a.value = void 0, t.stopLoading());
13
- }), (s, o) => (l(), d(m, null, {
14
- default: r(() => [
15
- e(t).isLoading ? (l(), f("div", L, [
16
- i(e(x), {
9
+ setup(C) {
10
+ const { events: r } = k(), t = x(), a = u();
11
+ return r.requestStatus.on(async (n) => {
12
+ n === "start" ? a.value = setTimeout(() => t.start(), 1e3) : (clearTimeout(a.value), a.value = void 0, await t.clear());
13
+ }), (n, o) => (s(), m(d, null, {
14
+ default: l(() => [
15
+ e(t).isActive ? (s(), f("div", y, [
16
+ i(e(_), {
17
17
  class: "text-c-3",
18
- loadingState: e(t),
18
+ loader: e(t),
19
19
  size: "3xl"
20
- }, null, 8, ["loadingState"]),
21
- i(e(_), {
20
+ }, null, 8, ["loader"]),
21
+ i(e(g), {
22
22
  variant: "ghost",
23
- onClick: o[0] || (o[0] = (C) => e(n).cancelRequest.emit())
23
+ onClick: o[0] || (o[0] = (B) => e(r).cancelRequest.emit())
24
24
  }, {
25
- default: r(() => [...o[1] || (o[1] = [
26
- g(" Cancel ", -1)
25
+ default: l(() => [...o[1] || (o[1] = [
26
+ v(" Cancel ", -1)
27
27
  ])]),
28
28
  _: 1
29
29
  })
@@ -34,5 +34,5 @@ const L = {
34
34
  }
35
35
  });
36
36
  export {
37
- b as default
37
+ L as default
38
38
  };
@@ -27,10 +27,10 @@ proxyUrl?: string) => Promise<ErrorResponse<string>>;
27
27
  * Makes the BE authorization call to grab the token server to server
28
28
  * Used for clientCredentials and authorizationCode
29
29
  */
30
- export declare const authorizeServers: (flow: NonImplicitFlow, scopes: string, { code, pkce, proxyUrl, }?: {
30
+ export declare const authorizeServers: (flow: NonImplicitFlow, scopes: string, { code, pkce, proxyUrl, }: {
31
31
  code?: string;
32
32
  pkce?: PKCEState | null;
33
33
  proxyUrl?: string | undefined;
34
- }) => Promise<ErrorResponse<string>>;
34
+ } | undefined, activeServer: Server | undefined) => Promise<ErrorResponse<string>>;
35
35
  export {};
36
36
  //# sourceMappingURL=oauth2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/oauth2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAIzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,eAAe,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAA;AAEhE,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,UAAU;AAChB,wEAAwE;AACxE,cAAc,MAAM;AACpB,kCAAkC;AAClC,WAAW,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA+J/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,eAAe,EACrB,QAAQ,MAAM,EACd,4BAIG;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,KACL,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA0F/B,CAAA"}
1
+ {"version":3,"file":"oauth2.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/libs/oauth2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAIzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,eAAe,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAA;AAEhE,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,UAAU;AAChB,wEAAwE;AACxE,cAAc,MAAM;AACpB,kCAAkC;AAClC,WAAW,MAAM,KAChB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA4K/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,eAAe,EACrB,QAAQ,MAAM,EACd,2BAIG;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,YAAK,EACN,cAAc,MAAM,GAAG,SAAS,KAC/B,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CA2F/B,CAAA"}