@scalar/api-client 2.3.32 → 2.3.33

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 (99) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  4. package/dist/components/CodeInput/CodeInput.vue2.js +63 -61
  5. package/dist/components/DataTable/DataTable.vue.js +1 -1
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  7. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +58 -48
  8. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
  9. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  10. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +34 -32
  11. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  12. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  13. package/dist/hooks/useClientConfig.d.ts +3 -0
  14. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  15. package/dist/layouts/App/create-api-client-app.d.ts +64 -24
  16. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts +128 -48
  18. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  19. package/dist/layouts/Web/create-api-client-web.d.ts +64 -24
  20. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  21. package/dist/libs/create-client.d.ts +64 -24
  22. package/dist/libs/create-client.d.ts.map +1 -1
  23. package/dist/libs/index.js +26 -25
  24. package/dist/libs/local-storage.d.ts +8 -0
  25. package/dist/libs/local-storage.d.ts.map +1 -1
  26. package/dist/libs/local-storage.js +28 -24
  27. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  28. package/dist/libs/send-request/create-request-operation.js +8 -8
  29. package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
  30. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  31. package/dist/libs/send-request/decode-buffer.js +4 -4
  32. package/dist/store/active-entities.d.ts +2 -2
  33. package/dist/store/active-entities.d.ts.map +1 -1
  34. package/dist/store/request-example.d.ts +22 -22
  35. package/dist/store/request-example.d.ts.map +1 -1
  36. package/dist/store/security-schemes.d.ts +42 -2
  37. package/dist/store/security-schemes.d.ts.map +1 -1
  38. package/dist/store/store.d.ts +64 -24
  39. package/dist/store/store.d.ts.map +1 -1
  40. package/dist/style.css +1 -1
  41. package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
  42. package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
  43. package/dist/views/Collection/CollectionAuthentication.vue2.js +32 -32
  44. package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -1
  45. package/dist/views/Collection/CollectionEnvironment.vue.js +3 -2
  46. package/dist/views/Collection/CollectionEnvironment.vue2.js +233 -9
  47. package/dist/views/Collection/CollectionNavigation.vue.js +36 -36
  48. package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
  49. package/dist/views/Collection/CollectionServers.vue2.js +6 -6
  50. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +13 -0
  51. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -0
  52. package/dist/views/Collection/components/EnvironmentForm.vue.js +7 -0
  53. package/dist/views/Collection/components/EnvironmentForm.vue2.js +274 -0
  54. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
  55. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +35 -34
  56. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
  57. package/dist/views/Environment/EnvironmentModal.vue.js +32 -28
  58. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
  59. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  60. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +67 -65
  61. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  62. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +94 -97
  63. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -0
  64. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  65. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  66. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +116 -99
  67. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -0
  68. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  69. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
  70. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +27 -25
  71. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -0
  72. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  73. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
  74. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +114 -73
  75. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  76. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  77. package/dist/views/Request/RequestSection/RequestSection.vue2.js +15 -15
  78. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +8 -0
  79. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -0
  80. package/dist/views/Request/RequestSection/helpers/update-scheme.js +17 -0
  81. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +2 -0
  82. package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +1 -0
  83. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  84. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  85. package/dist/views/Request/RequestSidebar.vue2.js +87 -84
  86. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
  87. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +21 -21
  88. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
  89. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +11 -11
  90. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  91. package/dist/views/Request/consts/index.js +7 -5
  92. package/dist/views/Request/consts/mediaTypes.d.ts +4 -0
  93. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  94. package/dist/views/Request/consts/mediaTypes.js +21 -4
  95. package/dist/views/Request/consts/mediaTypes.test.d.ts +2 -0
  96. package/dist/views/Request/consts/mediaTypes.test.d.ts.map +1 -0
  97. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  98. package/dist/views/Request/libs/oauth2.js +53 -47
  99. package/package.json +11 -11
@@ -1,49 +1,51 @@
1
- import { defineComponent as S, createElementBlock as V, openBlock as s, Fragment as U, createBlock as k, createCommentVNode as p, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as d, createElementVNode as $ } from "vue";
1
+ import { defineComponent as z, createElementBlock as V, openBlock as d, Fragment as U, createBlock as k, createCommentVNode as w, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as u, createElementVNode as $ } from "vue";
2
2
  import { useLoadingState as T, ScalarButton as b } from "@scalar/components";
3
3
  import { pkceOptions as P } 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 B from "./OAuthScopesInput.vue.js";
7
- import w from "./RequestAuthDataTableInput.vue.js";
8
- import u from "../../../../components/DataTable/DataTableRow.vue.js";
4
+ import { useToasts as A } from "@scalar/use-toasts";
5
+ import { useWorkspace as B } from "../../../../store/store.js";
6
+ import { updateScheme as L } from "../helpers/update-scheme.js";
7
+ import R from "./OAuthScopesInput.vue.js";
8
+ import p from "./RequestAuthDataTableInput.vue.js";
9
+ import f from "../../../../components/DataTable/DataTableRow.vue.js";
9
10
  import { authorizeOauth2 as F } from "../../libs/oauth2.js";
10
- const I = { class: "border-t-1/2 flex h-8 items-center justify-end gap-2" }, A = { class: "border-t-1/2 flex h-8 w-full items-center justify-end" }, W = /* @__PURE__ */ S({
11
+ const I = { class: "border-t-1/2 flex h-8 items-center justify-end gap-2" }, N = { class: "border-t-1/2 flex h-8 w-full items-center justify-end" }, Y = /* @__PURE__ */ z({
11
12
  __name: "OAuth2",
12
13
  props: {
13
14
  collection: {},
14
15
  environment: {},
15
16
  envVariables: {},
16
17
  flow: {},
18
+ persistAuth: { type: Boolean, default: !1 },
17
19
  scheme: {},
18
20
  server: {},
19
21
  workspace: {}
20
22
  },
21
- setup(i) {
22
- const y = T(), { toast: g } = L(), { securitySchemeMutators: z } = R(), n = (l, e) => z.edit(i.scheme.uid, l, e), C = async () => {
23
+ setup(s) {
24
+ const y = T(), { toast: g } = A(), C = B(), n = (l, e) => L(s.scheme.uid, l, e, C, s.persistAuth), S = async () => {
23
25
  var t, v;
24
- if (y.isLoading || !((t = i.collection) != null && t.uid))
26
+ if (y.isLoading || !((t = s.collection) != null && t.uid))
25
27
  return;
26
- if (!i.server) {
28
+ if (!s.server) {
27
29
  g("No server selected", "error");
28
30
  return;
29
31
  }
30
32
  y.startLoading();
31
33
  const [l, e] = await F(
32
- i.flow,
33
- i.server,
34
- (v = i.workspace) == null ? void 0 : v.proxyUrl
34
+ s.flow,
35
+ s.server,
36
+ (v = s.workspace) == null ? void 0 : v.proxyUrl
35
37
  ).finally(() => y.stopLoading());
36
- e ? n(`flows.${i.flow.type}.token`, e) : (console.error(l), g((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
37
- }, f = {
38
- environment: i.environment,
39
- envVariables: i.envVariables,
40
- workspace: i.workspace
38
+ e ? n(`flows.${s.flow.type}.token`, e) : (console.error(l), g((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
39
+ }, i = {
40
+ environment: s.environment,
41
+ envVariables: s.envVariables,
42
+ workspace: s.workspace
41
43
  };
42
- return (l, e) => (s(), V(U, null, [
43
- l.flow.token ? (s(), V(U, { key: 0 }, [
44
- a(r(u), null, {
44
+ return (l, e) => (d(), V(U, null, [
45
+ l.flow.token ? (d(), V(U, { key: 0 }, [
46
+ a(r(f), null, {
45
47
  default: o(() => [
46
- a(w, m(f, {
48
+ a(p, m(i, {
47
49
  class: "border-r-transparent",
48
50
  modelValue: l.flow.token,
49
51
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
@@ -51,14 +53,14 @@ const I = { class: "border-t-1/2 flex h-8 items-center justify-end gap-2" }, A =
51
53
  "onUpdate:modelValue": e[0] || (e[0] = (t) => n(`flows.${l.flow.type}.token`, t))
52
54
  }), {
53
55
  default: o(() => e[10] || (e[10] = [
54
- d(" Access Token ")
56
+ u(" Access Token ")
55
57
  ])),
56
58
  _: 1
57
59
  }, 16, ["modelValue"])
58
60
  ]),
59
61
  _: 1
60
62
  }),
61
- a(r(u), { class: "min-w-full" }, {
63
+ a(r(f), { class: "min-w-full" }, {
62
64
  default: o(() => [
63
65
  $("div", I, [
64
66
  a(r(b), {
@@ -69,7 +71,7 @@ const I = { class: "border-t-1/2 flex h-8 items-center justify-end gap-2" }, A =
69
71
  onClick: e[1] || (e[1] = (t) => n(`flows.${l.flow.type}.token`, ""))
70
72
  }, {
71
73
  default: o(() => e[11] || (e[11] = [
72
- d(" Clear ")
74
+ u(" Clear ")
73
75
  ])),
74
76
  _: 1
75
77
  }, 8, ["loading"])
@@ -77,116 +79,116 @@ const I = { class: "border-t-1/2 flex h-8 items-center justify-end gap-2" }, A =
77
79
  ]),
78
80
  _: 1
79
81
  })
80
- ], 64)) : (s(), V(U, { key: 1 }, [
81
- a(r(u), null, {
82
+ ], 64)) : (d(), V(U, { key: 1 }, [
83
+ a(r(f), null, {
82
84
  default: o(() => [
83
- "authorizationUrl" in l.flow ? (s(), k(w, m({ key: 0 }, f, {
85
+ "authorizationUrl" in l.flow ? (d(), k(p, m({ key: 0 }, i, {
84
86
  containerClass: "border-r-0",
85
87
  modelValue: l.flow.authorizationUrl,
86
88
  placeholder: "https://galaxy.scalar.com/authorize",
87
89
  "onUpdate:modelValue": e[2] || (e[2] = (t) => n(`flows.${l.flow.type}.authorizationUrl`, t))
88
90
  }), {
89
91
  default: o(() => e[12] || (e[12] = [
90
- d(" Auth URL ")
92
+ u(" Auth URL ")
91
93
  ])),
92
94
  _: 1
93
- }, 16, ["modelValue"])) : p("", !0),
94
- "tokenUrl" in l.flow ? (s(), k(w, m({ key: 1 }, f, {
95
+ }, 16, ["modelValue"])) : w("", !0),
96
+ "tokenUrl" in l.flow ? (d(), k(p, m({ key: 1 }, i, {
95
97
  modelValue: l.flow.tokenUrl,
96
98
  placeholder: "https://galaxy.scalar.com/token",
97
99
  "onUpdate:modelValue": e[3] || (e[3] = (t) => n(`flows.${l.flow.type}.tokenUrl`, t))
98
100
  }), {
99
101
  default: o(() => e[13] || (e[13] = [
100
- d(" Token URL ")
102
+ u(" Token URL ")
101
103
  ])),
102
104
  _: 1
103
- }, 16, ["modelValue"])) : p("", !0)
105
+ }, 16, ["modelValue"])) : w("", !0)
104
106
  ]),
105
107
  _: 1
106
108
  }),
107
- "x-scalar-redirect-uri" in l.flow ? (s(), k(r(u), { key: 0 }, {
109
+ "x-scalar-redirect-uri" in l.flow ? (d(), k(r(f), { key: 0 }, {
108
110
  default: o(() => [
109
- a(w, m(f, {
111
+ a(p, m(i, {
110
112
  modelValue: l.flow["x-scalar-redirect-uri"],
111
113
  placeholder: "https://galaxy.scalar.com/callback",
112
114
  "onUpdate:modelValue": e[4] || (e[4] = (t) => n(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
113
115
  }), {
114
116
  default: o(() => e[14] || (e[14] = [
115
- d(" Redirect URL ")
117
+ u(" Redirect URL ")
116
118
  ])),
117
119
  _: 1
118
120
  }, 16, ["modelValue"])
119
121
  ]),
120
122
  _: 1
121
- })) : p("", !0),
122
- l.flow.type === "password" ? (s(), V(U, { key: 1 }, [
123
- a(r(u), null, {
123
+ })) : w("", !0),
124
+ l.flow.type === "password" ? (d(), V(U, { key: 1 }, [
125
+ a(r(f), null, {
124
126
  default: o(() => [
125
- a(w, m(f, {
127
+ a(p, m(i, {
126
128
  class: "text-c-2",
127
129
  modelValue: l.flow.username,
128
130
  placeholder: "janedoe",
129
131
  "onUpdate:modelValue": e[5] || (e[5] = (t) => n(`flows.${l.flow.type}.username`, t))
130
132
  }), {
131
133
  default: o(() => e[15] || (e[15] = [
132
- d(" Username ")
134
+ u(" Username ")
133
135
  ])),
134
136
  _: 1
135
137
  }, 16, ["modelValue"])
136
138
  ]),
137
139
  _: 1
138
140
  }),
139
- a(r(u), null, {
141
+ a(r(f), null, {
140
142
  default: o(() => [
141
- a(w, m(f, {
143
+ a(p, m(i, {
142
144
  modelValue: l.flow.password,
143
145
  placeholder: "********",
144
146
  type: "password",
145
147
  "onUpdate:modelValue": e[6] || (e[6] = (t) => n(`flows.${l.flow.type}.password`, t))
146
148
  }), {
147
149
  default: o(() => e[16] || (e[16] = [
148
- d(" Password ")
150
+ u(" Password ")
149
151
  ])),
150
152
  _: 1
151
153
  }, 16, ["modelValue"])
152
154
  ]),
153
155
  _: 1
154
156
  })
155
- ], 64)) : p("", !0),
156
- a(r(u), null, {
157
+ ], 64)) : w("", !0),
158
+ a(r(f), null, {
157
159
  default: o(() => [
158
- a(w, m(f, {
160
+ a(p, m(i, {
159
161
  modelValue: l.flow["x-scalar-client-id"],
160
162
  placeholder: "12345",
161
163
  "onUpdate:modelValue": e[7] || (e[7] = (t) => n(`flows.${l.flow.type}.x-scalar-client-id`, t))
162
164
  }), {
163
165
  default: o(() => e[17] || (e[17] = [
164
- d(" Client ID ")
166
+ u(" Client ID ")
165
167
  ])),
166
168
  _: 1
167
169
  }, 16, ["modelValue"])
168
170
  ]),
169
171
  _: 1
170
172
  }),
171
- "clientSecret" in l.flow ? (s(), k(r(u), { key: 2 }, {
173
+ "clientSecret" in l.flow ? (d(), k(r(f), { key: 2 }, {
172
174
  default: o(() => [
173
- a(w, m(f, {
175
+ a(p, m(i, {
174
176
  modelValue: l.flow.clientSecret,
175
177
  placeholder: "XYZ123",
176
178
  type: "password",
177
179
  "onUpdate:modelValue": e[8] || (e[8] = (t) => n(`flows.${l.flow.type}.clientSecret`, t))
178
180
  }), {
179
181
  default: o(() => e[18] || (e[18] = [
180
- d(" Client Secret ")
182
+ u(" Client Secret ")
181
183
  ])),
182
184
  _: 1
183
185
  }, 16, ["modelValue"])
184
186
  ]),
185
187
  _: 1
186
- })) : p("", !0),
187
- "x-usePkce" in l.flow ? (s(), k(r(u), { key: 3 }, {
188
+ })) : w("", !0),
189
+ "x-usePkce" in l.flow ? (d(), k(r(f), { key: 3 }, {
188
190
  default: o(() => [
189
- a(w, m(f, {
191
+ a(p, m(i, {
190
192
  enum: r(P),
191
193
  modelValue: l.flow["x-usePkce"],
192
194
  readOnly: "",
@@ -196,38 +198,38 @@ const I = { class: "border-t-1/2 flex h-8 items-center justify-end gap-2" }, A =
196
198
  ))
197
199
  }), {
198
200
  default: o(() => e[19] || (e[19] = [
199
- d(" Use PKCE ")
201
+ u(" Use PKCE ")
200
202
  ])),
201
203
  _: 1
202
204
  }, 16, ["enum", "modelValue"])
203
205
  ]),
204
206
  _: 1
205
- })) : p("", !0),
206
- Object.keys(l.flow.scopes ?? {}).length ? (s(), k(r(u), { key: 4 }, {
207
+ })) : w("", !0),
208
+ Object.keys(l.flow.scopes ?? {}).length ? (d(), k(r(f), { key: 4 }, {
207
209
  default: o(() => [
208
- a(B, {
210
+ a(R, {
209
211
  flow: l.flow,
210
212
  updateScheme: n
211
213
  }, null, 8, ["flow"])
212
214
  ]),
213
215
  _: 1
214
- })) : p("", !0)
216
+ })) : w("", !0)
215
217
  ], 64)),
216
- l.flow.token ? p("", !0) : (s(), k(r(u), {
218
+ l.flow.token ? w("", !0) : (d(), k(r(f), {
217
219
  key: 2,
218
220
  class: "min-w-full"
219
221
  }, {
220
222
  default: o(() => [
221
- $("div", A, [
223
+ $("div", N, [
222
224
  a(r(b), {
223
225
  class: "mr-0.75 p-0 px-2 py-0.5",
224
226
  loading: r(y),
225
227
  size: "sm",
226
228
  variant: "outlined",
227
- onClick: C
229
+ onClick: S
228
230
  }, {
229
231
  default: o(() => e[20] || (e[20] = [
230
- d(" Authorize ")
232
+ u(" Authorize ")
231
233
  ])),
232
234
  _: 1
233
235
  }, 8, ["loading"])
@@ -239,5 +241,5 @@ const I = { class: "border-t-1/2 flex h-8 items-center justify-end gap-2" }, A =
239
241
  }
240
242
  });
241
243
  export {
242
- W as default
244
+ Y as default
243
245
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAQjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAoSF,wBAOG"}
1
+ {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAQjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAqSF,wBAOG"}
@@ -1,134 +1,131 @@
1
- import { defineComponent as j, computed as k, resolveComponent as N, createBlock as h, openBlock as u, unref as o, withCtx as c, createElementVNode as n, createVNode as a, normalizeClass as z, toDisplayString as m, createCommentVNode as C, withModifiers as A, createTextVNode as V, createElementBlock as B, Fragment as T, renderList as E } from "vue";
2
- import { Disclosure as F, DisclosureButton as I, DisclosurePanel as R } from "@headlessui/vue";
3
- import { ScalarIcon as L } from "@scalar/components";
1
+ import { defineComponent as j, computed as y, createBlock as h, openBlock as u, unref as o, withCtx as c, createElementVNode as a, createVNode as i, normalizeClass as N, toDisplayString as m, createCommentVNode as k, withModifiers as z, createTextVNode as C, createElementBlock as V, Fragment as A, renderList as T } from "vue";
2
+ import { Disclosure as _, DisclosureButton as E, DisclosurePanel as F } from "@headlessui/vue";
3
+ import { ScalarButton as I, ScalarIcon as R } from "@scalar/components";
4
4
  import D from "../../../../components/DataTable/DataTableCell.vue.js";
5
- import M from "../../../../components/DataTable/DataTableRow.vue.js";
6
- import P from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
- const U = { class: "flex h-fit w-full" }, q = { class: "flex-1" }, G = { class: "gap-1.75 flex items-center" }, H = {
5
+ import L from "../../../../components/DataTable/DataTableRow.vue.js";
6
+ import M from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
+ const P = { class: "flex h-fit w-full" }, U = { class: "flex-1" }, q = { class: "gap-1.75 flex items-center" }, G = {
8
8
  class: "grid auto-rows-auto",
9
9
  style: { gridTemplateColumns: "1fr auto" }
10
- }, J = { key: 0 }, K = { class: "font-code text-xs" }, te = /* @__PURE__ */ j({
10
+ }, H = { key: 0 }, J = { class: "font-code text-xs" }, ee = /* @__PURE__ */ j({
11
11
  __name: "OAuthScopesInput",
12
12
  props: {
13
13
  flow: {},
14
14
  updateScheme: { type: Function }
15
15
  },
16
16
  setup(t) {
17
- const $ = k(
17
+ const $ = y(
18
18
  () => {
19
19
  var e;
20
- return Object.entries(((e = t.flow) == null ? void 0 : e.scopes) ?? {}).map(([l, r]) => ({
20
+ return Object.entries(((e = t.flow) == null ? void 0 : e.scopes) ?? {}).map(([l, n]) => ({
21
21
  id: l,
22
22
  label: l,
23
- description: r
23
+ description: n
24
24
  }));
25
25
  }
26
- ), d = k(() => {
26
+ ), d = y(() => {
27
27
  var e;
28
28
  return ((e = t.flow) == null ? void 0 : e.selectedScopes) || [];
29
29
  });
30
- function O(e, l) {
30
+ function B(e, l) {
31
31
  l ? t.updateScheme(`flows.${t.flow.type}.selectedScopes`, [
32
32
  ...d.value,
33
33
  e
34
34
  ]) : t.updateScheme(
35
35
  `flows.${t.flow.type}.selectedScopes`,
36
- d.value.filter((r) => r !== e)
36
+ d.value.filter((n) => n !== e)
37
37
  );
38
38
  }
39
- function _() {
39
+ function O() {
40
40
  var e;
41
41
  t.updateScheme(
42
42
  `flows.${t.flow.type}.selectedScopes`,
43
43
  Object.keys(((e = t.flow) == null ? void 0 : e.scopes) ?? {})
44
44
  );
45
45
  }
46
- return (e, l) => {
47
- const r = N("ScalarButton");
48
- return u(), h(o(D), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
49
- default: c(() => [
50
- n("div", U, [
51
- l[1] || (l[1] = n("div", { class: "text-c-1 h-full items-center" }, null, -1)),
52
- a(o(F), {
53
- as: "div",
54
- class: "bl flex w-full flex-col"
55
- }, {
56
- default: c(() => {
57
- var w, S;
58
- return [
59
- a(o(I), {
60
- class: z([
61
- "group/scopes-accordion hover:text-c-1 pr-2.25 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pl-3 text-left",
62
- (((S = (w = e.flow) == null ? void 0 : w.selectedScopes) == null ? void 0 : S.length) || 0) > 0 ? "text-c-1" : "text-c-3"
63
- ])
64
- }, {
65
- default: c(({ open: s }) => {
66
- var f, i, p, x, v, g, b, y;
67
- return [
68
- n("div", q, " Scopes Selected " + m(((i = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : i.length) || 0) + " / " + m(Object.keys(((p = e.flow) == null ? void 0 : p.scopes) ?? {}).length || 0), 1),
69
- n("div", G, [
70
- ((v = (x = e.flow) == null ? void 0 : x.selectedScopes) == null ? void 0 : v.length) > 4 && s && ((b = (g = e.flow) == null ? void 0 : g.selectedScopes) == null ? void 0 : b.length) < Object.keys(((y = e.flow) == null ? void 0 : y.scopes) ?? {}).length ? (u(), h(r, {
71
- key: 0,
72
- class: "text-c-3 hover:bg-b-2 hover:text-c-1 rounded px-1.5",
73
- size: "sm",
74
- onClick: A(_, ["stop"])
75
- }, {
76
- default: c(() => l[0] || (l[0] = [
77
- V(" Select All ")
78
- ])),
79
- _: 1
80
- })) : C("", !0),
81
- a(o(L), {
82
- class: "text-c-3 group-hover/scopes-accordion:text-c-2",
83
- icon: s ? "ChevronDown" : "ChevronRight",
84
- size: "md"
85
- }, null, 8, ["icon"])
86
- ])
87
- ];
88
- }),
89
- _: 1
90
- }, 8, ["class"]),
91
- a(o(R), { as: "template" }, {
92
- default: c(() => [
93
- n("table", H, [
94
- (u(!0), B(T, null, E($.value, ({ id: s, label: f, description: i }) => (u(), h(o(M), {
95
- key: s,
96
- class: "text-c-2",
97
- onClick: (p) => O(s, !d.value.includes(s))
46
+ return (e, l) => (u(), h(o(D), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
47
+ default: c(() => [
48
+ a("div", P, [
49
+ l[1] || (l[1] = a("div", { class: "text-c-1 h-full items-center" }, null, -1)),
50
+ i(o(_), {
51
+ as: "div",
52
+ class: "bl flex w-full flex-col"
53
+ }, {
54
+ default: c(() => {
55
+ var n, w;
56
+ return [
57
+ i(o(E), {
58
+ class: N([
59
+ "group/scopes-accordion hover:text-c-1 pr-2.25 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pl-3 text-left",
60
+ (((w = (n = e.flow) == null ? void 0 : n.selectedScopes) == null ? void 0 : w.length) || 0) > 0 ? "text-c-1" : "text-c-3"
61
+ ])
62
+ }, {
63
+ default: c(({ open: s }) => {
64
+ var f, r, p, x, S, v, g, b;
65
+ return [
66
+ a("div", U, " Scopes Selected " + m(((r = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : r.length) || 0) + " / " + m(Object.keys(((p = e.flow) == null ? void 0 : p.scopes) ?? {}).length || 0), 1),
67
+ a("div", q, [
68
+ ((S = (x = e.flow) == null ? void 0 : x.selectedScopes) == null ? void 0 : S.length) > 4 && s && ((g = (v = e.flow) == null ? void 0 : v.selectedScopes) == null ? void 0 : g.length) < Object.keys(((b = e.flow) == null ? void 0 : b.scopes) ?? {}).length ? (u(), h(o(I), {
69
+ key: 0,
70
+ class: "text-c-3 hover:bg-b-2 hover:text-c-1 rounded px-1.5",
71
+ size: "sm",
72
+ onClick: z(O, ["stop"])
98
73
  }, {
99
- default: c(() => [
100
- a(o(D), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
101
- default: c(() => [
102
- i ? (u(), B("div", J, [
103
- n("span", K, m(f), 1),
104
- V(" – " + m(i), 1)
105
- ])) : C("", !0)
106
- ]),
107
- _: 2
108
- }, 1024),
109
- a(o(P), {
110
- modelValue: d.value.includes(s),
111
- "onUpdate:modelValue": () => {
112
- }
113
- }, null, 8, ["modelValue"])
114
- ]),
115
- _: 2
116
- }, 1032, ["onClick"]))), 128))
74
+ default: c(() => l[0] || (l[0] = [
75
+ C(" Select All ")
76
+ ])),
77
+ _: 1
78
+ })) : k("", !0),
79
+ i(o(R), {
80
+ class: "text-c-3 group-hover/scopes-accordion:text-c-2",
81
+ icon: s ? "ChevronDown" : "ChevronRight",
82
+ size: "md"
83
+ }, null, 8, ["icon"])
117
84
  ])
118
- ]),
119
- _: 1
120
- })
121
- ];
122
- }),
123
- _: 1
124
- })
125
- ])
126
- ]),
127
- _: 1
128
- });
129
- };
85
+ ];
86
+ }),
87
+ _: 1
88
+ }, 8, ["class"]),
89
+ i(o(F), { as: "template" }, {
90
+ default: c(() => [
91
+ a("table", G, [
92
+ (u(!0), V(A, null, T($.value, ({ id: s, label: f, description: r }) => (u(), h(o(L), {
93
+ key: s,
94
+ class: "text-c-2",
95
+ onClick: (p) => B(s, !d.value.includes(s))
96
+ }, {
97
+ default: c(() => [
98
+ i(o(D), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
99
+ default: c(() => [
100
+ r ? (u(), V("div", H, [
101
+ a("span", J, m(f), 1),
102
+ C(" – " + m(r), 1)
103
+ ])) : k("", !0)
104
+ ]),
105
+ _: 2
106
+ }, 1024),
107
+ i(o(M), {
108
+ modelValue: d.value.includes(s),
109
+ "onUpdate:modelValue": () => {
110
+ }
111
+ }, null, 8, ["modelValue"])
112
+ ]),
113
+ _: 2
114
+ }, 1032, ["onClick"]))), 128))
115
+ ])
116
+ ]),
117
+ _: 1
118
+ })
119
+ ];
120
+ }),
121
+ _: 1
122
+ })
123
+ ])
124
+ ]),
125
+ _: 1
126
+ }));
130
127
  }
131
128
  });
132
129
  export {
133
- te as default
130
+ ee as default
134
131
  };
@@ -9,6 +9,7 @@ type __VLS_Props = {
9
9
  envVariables: EnvVariable[];
10
10
  layout: 'client' | 'reference';
11
11
  operation?: Operation | undefined;
12
+ persistAuth?: boolean;
12
13
  selectedSecuritySchemeUids: SelectedSecuritySchemeUids;
13
14
  server: Server | undefined;
14
15
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AA+VA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAe1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4YF,wBAOG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAsXA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAOrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAe1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAgaF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuth.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1f349e0c"]]);
4
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-78825580"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };