@scalar/api-client 2.2.39 → 2.2.41

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 (76) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/AddressBar/AddressBar.vue2.js +35 -31
  5. package/dist/components/AddressBar/index.d.ts +1 -2
  6. package/dist/components/AddressBar/index.d.ts.map +1 -1
  7. package/dist/components/DataTable/DataTableInputSelect.vue.js +29 -29
  8. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +7 -7
  9. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +21 -21
  10. package/dist/components/{AddressBar/AddressBarServer.vue.d.ts → Server/ServerDropdown.vue.d.ts} +6 -1
  11. package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -0
  12. package/dist/components/Server/ServerDropdown.vue.js +155 -0
  13. package/dist/components/Server/ServerDropdown.vue2.js +4 -0
  14. package/dist/components/Server/ServerDropdownItem.vue.d.ts +19 -0
  15. package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -0
  16. package/dist/components/Server/ServerDropdownItem.vue.js +7 -0
  17. package/dist/components/Server/ServerDropdownItem.vue2.js +81 -0
  18. package/dist/components/Server/ServerVariablesForm.vue.js +20 -20
  19. package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
  20. package/dist/components/Server/ServerVariablesTextbox.vue.js +4 -4
  21. package/dist/components/Server/index.d.ts +3 -0
  22. package/dist/components/Server/index.d.ts.map +1 -0
  23. package/dist/components/Server/index.js +6 -0
  24. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -5
  25. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  26. package/dist/hooks/useLayout.d.ts +2 -0
  27. package/dist/hooks/useLayout.d.ts.map +1 -1
  28. package/dist/layouts/App/create-api-client-app.d.ts +30 -40
  29. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  30. package/dist/layouts/Modal/create-api-client-modal.d.ts +60 -80
  31. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  32. package/dist/layouts/Web/create-api-client-web.d.ts +30 -40
  33. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  34. package/dist/libs/create-client.d.ts +30 -40
  35. package/dist/libs/create-client.d.ts.map +1 -1
  36. package/dist/store/active-entities.d.ts +6 -8
  37. package/dist/store/active-entities.d.ts.map +1 -1
  38. package/dist/store/servers.d.ts +30 -40
  39. package/dist/store/servers.d.ts.map +1 -1
  40. package/dist/store/store.d.ts +30 -40
  41. package/dist/store/store.d.ts.map +1 -1
  42. package/dist/style.css +1 -1
  43. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +0 -1
  44. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  45. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +40 -42
  46. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
  47. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  49. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +72 -72
  50. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -2
  51. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  52. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
  53. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +18 -17
  54. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +1 -1
  55. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  56. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +1 -1
  57. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +12 -11
  58. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  59. package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
  60. package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -0
  61. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  62. package/dist/views/Servers/index.d.ts +2 -0
  63. package/dist/views/Servers/index.d.ts.map +1 -0
  64. package/dist/views/Servers/index.js +4 -0
  65. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  66. package/dist/views/Settings/SettingsGeneral.vue.js +196 -160
  67. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -1
  68. package/dist/views/Settings/components/SettingsAppearance.vue.js +50 -39
  69. package/package.json +20 -10
  70. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +0 -1
  71. package/dist/components/AddressBar/AddressBarServer.vue.js +0 -123
  72. package/dist/components/AddressBar/AddressBarServer.vue2.js +0 -4
  73. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +0 -10
  74. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +0 -1
  75. package/dist/components/AddressBar/AddressBarServerItem.vue.js +0 -7
  76. package/dist/components/AddressBar/AddressBarServerItem.vue2.js +0 -77
@@ -2,7 +2,6 @@ import { type Oauth2Flow, type SecuritySchemeOauth2 } from '@scalar/oas-utils/en
2
2
  type __VLS_Props = {
3
3
  scheme: SecuritySchemeOauth2;
4
4
  flow: Oauth2Flow;
5
- layout?: 'client' | 'reference';
6
5
  };
7
6
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
7
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AA4OA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,oBAAoB,EAE1B,MAAM,iCAAiC,CAAA;AAQxC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AAkeF,wBAMG"}
1
+ {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAsOA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,oBAAoB,EAE1B,MAAM,iCAAiC,CAAA;AAQxC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,UAAU,CAAA;CACjB,CAAC;;AA8dF,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as L, openBlock as s, createElementBlock as w, Fragment as y, createVNode as a, unref as r, withCtx as o, createTextVNode as d, createElementVNode as v, createBlock as m, createCommentVNode as i } from "vue";
1
+ import { defineComponent as L, openBlock as d, createElementBlock as w, Fragment as k, createVNode as a, unref as r, withCtx as o, createTextVNode as u, createElementVNode as v, createBlock as m, createCommentVNode as i } from "vue";
2
2
  import { useActiveEntities as P } from "../../../../store/active-entities.js";
3
3
  import { useLoadingState as R, ScalarButton as $ } from "@scalar/components";
4
4
  import { pkceOptions as A } from "@scalar/oas-utils/entities/spec";
@@ -12,11 +12,10 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
12
12
  __name: "OAuth2",
13
13
  props: {
14
14
  scheme: {},
15
- flow: {},
16
- layout: { default: "client" }
15
+ flow: {}
17
16
  },
18
- setup(k) {
19
- const p = R(), { toast: V } = B(), { activeCollection: S, activeServer: U, activeWorkspace: z } = P(), { securitySchemeMutators: C } = I(), u = (l, e) => C.edit(k.scheme.uid, l, e), T = async () => {
17
+ setup(y) {
18
+ const p = R(), { toast: V } = B(), { activeCollection: S, activeServer: U, activeWorkspace: z } = P(), { securitySchemeMutators: C } = I(), s = (l, e) => C.edit(y.scheme.uid, l, e), T = async () => {
20
19
  var t, g;
21
20
  if (p.isLoading || !((t = S.value) != null && t.uid)) return;
22
21
  if (p.startLoading(), !U.value) {
@@ -24,14 +23,14 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
24
23
  return;
25
24
  }
26
25
  const [l, e] = await b(
27
- k.flow,
26
+ y.flow,
28
27
  U.value,
29
28
  (g = z.value) == null ? void 0 : g.proxyUrl
30
29
  ).finally(() => p.stopLoading());
31
- e ? u(`flows.${k.flow.type}.token`, e) : (console.error(l), V((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
30
+ e ? s(`flows.${y.flow.type}.token`, e) : (console.error(l), V((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
32
31
  };
33
- return (l, e) => (s(), w(y, null, [
34
- l.flow.token ? (s(), w(y, { key: 0 }, [
32
+ return (l, e) => (d(), w(k, null, [
33
+ l.flow.token ? (d(), w(k, { key: 0 }, [
35
34
  a(r(n), null, {
36
35
  default: o(() => [
37
36
  a(f, {
@@ -39,10 +38,10 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
39
38
  modelValue: l.flow.token,
40
39
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
41
40
  type: "password",
42
- "onUpdate:modelValue": e[0] || (e[0] = (t) => u(`flows.${l.flow.type}.token`, t))
41
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => s(`flows.${l.flow.type}.token`, t))
43
42
  }, {
44
43
  default: o(() => e[10] || (e[10] = [
45
- d(" Access Token ")
44
+ u(" Access Token ")
46
45
  ])),
47
46
  _: 1
48
47
  }, 8, ["modelValue"])
@@ -57,10 +56,10 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
57
56
  loading: r(p),
58
57
  size: "sm",
59
58
  variant: "outlined",
60
- onClick: e[1] || (e[1] = (t) => u(`flows.${l.flow.type}.token`, ""))
59
+ onClick: e[1] || (e[1] = (t) => s(`flows.${l.flow.type}.token`, ""))
61
60
  }, {
62
61
  default: o(() => e[11] || (e[11] = [
63
- d(" Clear ")
62
+ u(" Clear ")
64
63
  ])),
65
64
  _: 1
66
65
  }, 8, ["loading"])
@@ -68,60 +67,60 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
68
67
  ]),
69
68
  _: 1
70
69
  })
71
- ], 64)) : (s(), w(y, { key: 1 }, [
70
+ ], 64)) : (d(), w(k, { key: 1 }, [
72
71
  a(r(n), null, {
73
72
  default: o(() => [
74
- "authorizationUrl" in l.flow ? (s(), m(f, {
73
+ "authorizationUrl" in l.flow ? (d(), m(f, {
75
74
  key: 0,
76
75
  modelValue: l.flow.authorizationUrl,
77
76
  placeholder: "https://galaxy.scalar.com/authorize",
78
- "onUpdate:modelValue": e[2] || (e[2] = (t) => u(`flows.${l.flow.type}.authorizationUrl`, t))
77
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => s(`flows.${l.flow.type}.authorizationUrl`, t))
79
78
  }, {
80
79
  default: o(() => e[12] || (e[12] = [
81
- d(" Auth URL ")
80
+ u(" Auth URL ")
82
81
  ])),
83
82
  _: 1
84
83
  }, 8, ["modelValue"])) : i("", !0),
85
- "tokenUrl" in l.flow ? (s(), m(f, {
84
+ "tokenUrl" in l.flow ? (d(), m(f, {
86
85
  key: 1,
87
86
  modelValue: l.flow.tokenUrl,
88
87
  placeholder: "https://galaxy.scalar.com/token",
89
- "onUpdate:modelValue": e[3] || (e[3] = (t) => u(`flows.${l.flow.type}.tokenUrl`, t))
88
+ "onUpdate:modelValue": e[3] || (e[3] = (t) => s(`flows.${l.flow.type}.tokenUrl`, t))
90
89
  }, {
91
90
  default: o(() => e[13] || (e[13] = [
92
- d(" Token URL ")
91
+ u(" Token URL ")
93
92
  ])),
94
93
  _: 1
95
94
  }, 8, ["modelValue"])) : i("", !0)
96
95
  ]),
97
96
  _: 1
98
97
  }),
99
- "x-scalar-redirect-uri" in l.flow ? (s(), m(r(n), { key: 0 }, {
98
+ "x-scalar-redirect-uri" in l.flow ? (d(), m(r(n), { key: 0 }, {
100
99
  default: o(() => [
101
100
  a(f, {
102
101
  modelValue: l.flow["x-scalar-redirect-uri"],
103
102
  placeholder: "https://galaxy.scalar.com/callback",
104
- "onUpdate:modelValue": e[4] || (e[4] = (t) => u(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
103
+ "onUpdate:modelValue": e[4] || (e[4] = (t) => s(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
105
104
  }, {
106
105
  default: o(() => e[14] || (e[14] = [
107
- d(" Redirect URL ")
106
+ u(" Redirect URL ")
108
107
  ])),
109
108
  _: 1
110
109
  }, 8, ["modelValue"])
111
110
  ]),
112
111
  _: 1
113
112
  })) : i("", !0),
114
- l.flow.type === "password" ? (s(), w(y, { key: 1 }, [
113
+ l.flow.type === "password" ? (d(), w(k, { key: 1 }, [
115
114
  a(r(n), null, {
116
115
  default: o(() => [
117
116
  a(f, {
118
117
  class: "text-c-2",
119
118
  modelValue: l.flow.username,
120
119
  placeholder: "janedoe",
121
- "onUpdate:modelValue": e[5] || (e[5] = (t) => u(`flows.${l.flow.type}.username`, t))
120
+ "onUpdate:modelValue": e[5] || (e[5] = (t) => s(`flows.${l.flow.type}.username`, t))
122
121
  }, {
123
122
  default: o(() => e[15] || (e[15] = [
124
- d(" Username ")
123
+ u(" Username ")
125
124
  ])),
126
125
  _: 1
127
126
  }, 8, ["modelValue"])
@@ -134,10 +133,10 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
134
133
  modelValue: l.flow.password,
135
134
  placeholder: "********",
136
135
  type: "password",
137
- "onUpdate:modelValue": e[6] || (e[6] = (t) => u(`flows.${l.flow.type}.password`, t))
136
+ "onUpdate:modelValue": e[6] || (e[6] = (t) => s(`flows.${l.flow.type}.password`, t))
138
137
  }, {
139
138
  default: o(() => e[16] || (e[16] = [
140
- d(" Password ")
139
+ u(" Password ")
141
140
  ])),
142
141
  _: 1
143
142
  }, 8, ["modelValue"])
@@ -150,63 +149,62 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
150
149
  a(f, {
151
150
  modelValue: l.flow["x-scalar-client-id"],
152
151
  placeholder: "12345",
153
- "onUpdate:modelValue": e[7] || (e[7] = (t) => u(`flows.${l.flow.type}.x-scalar-client-id`, t))
152
+ "onUpdate:modelValue": e[7] || (e[7] = (t) => s(`flows.${l.flow.type}.x-scalar-client-id`, t))
154
153
  }, {
155
154
  default: o(() => e[17] || (e[17] = [
156
- d(" Client ID ")
155
+ u(" Client ID ")
157
156
  ])),
158
157
  _: 1
159
158
  }, 8, ["modelValue"])
160
159
  ]),
161
160
  _: 1
162
161
  }),
163
- "clientSecret" in l.flow ? (s(), m(r(n), { key: 2 }, {
162
+ "clientSecret" in l.flow ? (d(), m(r(n), { key: 2 }, {
164
163
  default: o(() => [
165
164
  a(f, {
166
165
  modelValue: l.flow.clientSecret,
167
166
  placeholder: "XYZ123",
168
167
  type: "password",
169
- "onUpdate:modelValue": e[8] || (e[8] = (t) => u(`flows.${l.flow.type}.clientSecret`, t))
168
+ "onUpdate:modelValue": e[8] || (e[8] = (t) => s(`flows.${l.flow.type}.clientSecret`, t))
170
169
  }, {
171
170
  default: o(() => e[18] || (e[18] = [
172
- d(" Client Secret ")
171
+ u(" Client Secret ")
173
172
  ])),
174
173
  _: 1
175
174
  }, 8, ["modelValue"])
176
175
  ]),
177
176
  _: 1
178
177
  })) : i("", !0),
179
- "x-usePkce" in l.flow ? (s(), m(r(n), { key: 3 }, {
178
+ "x-usePkce" in l.flow ? (d(), m(r(n), { key: 3 }, {
180
179
  default: o(() => [
181
180
  a(f, {
182
181
  enum: r(A),
183
182
  modelValue: l.flow["x-usePkce"],
184
183
  readOnly: "",
185
- "onUpdate:modelValue": e[9] || (e[9] = (t) => u(
184
+ "onUpdate:modelValue": e[9] || (e[9] = (t) => s(
186
185
  `flows.${l.flow.type}.x-usePkce`,
187
186
  t
188
187
  ))
189
188
  }, {
190
189
  default: o(() => e[19] || (e[19] = [
191
- d(" Use PKCE ")
190
+ u(" Use PKCE ")
192
191
  ])),
193
192
  _: 1
194
193
  }, 8, ["enum", "modelValue"])
195
194
  ]),
196
195
  _: 1
197
196
  })) : i("", !0),
198
- Object.keys(l.flow.scopes ?? {}).length ? (s(), m(r(n), { key: 4 }, {
197
+ Object.keys(l.flow.scopes ?? {}).length ? (d(), m(r(n), { key: 4 }, {
199
198
  default: o(() => [
200
199
  a(F, {
201
200
  flow: l.flow,
202
- layout: l.layout,
203
- updateScheme: u
204
- }, null, 8, ["flow", "layout"])
201
+ updateScheme: s
202
+ }, null, 8, ["flow"])
205
203
  ]),
206
204
  _: 1
207
205
  })) : i("", !0)
208
206
  ], 64)),
209
- l.flow.token ? i("", !0) : (s(), m(r(n), {
207
+ l.flow.token ? i("", !0) : (d(), m(r(n), {
210
208
  key: 2,
211
209
  class: "min-w-full"
212
210
  }, {
@@ -220,7 +218,7 @@ const N = { class: "h-8 flex items-center justify-self-end" }, O = { class: "h-8
220
218
  onClick: T
221
219
  }, {
222
220
  default: o(() => e[20] || (e[20] = [
223
- d(" Authorize ")
221
+ u(" Authorize ")
224
222
  ])),
225
223
  _: 1
226
224
  }, 8, ["loading"])
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  selectedSecuritySchemeUids: string[];
3
3
  title: string;
4
- layout?: 'client' | 'reference';
4
+ layout: 'client' | 'reference';
5
5
  };
6
6
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
7
  "update:selectedSecuritySchemeUids": (args_0: string[]) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAyVA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;;;;;AA8YF,wBAQG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAkVA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;CAC/B,CAAC;;;;;;AAuYF,wBAQG"}
@@ -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 p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-603916cb"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-01b699f6"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as K, ref as C, computed as m, openBlock as M, createBlock as L, withCtx as d, createElementVNode as y, toDisplayString as q, createElementBlock as N, normalizeClass as z, createCommentVNode as W, createVNode as h, unref as a } from "vue";
2
- import H from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
1
+ import { defineComponent as F, ref as _, computed as r, openBlock as M, createBlock as K, withCtx as m, createElementVNode as y, toDisplayString as q, createElementBlock as L, normalizeClass as N, createCommentVNode as z, createVNode as d, unref as n } from "vue";
2
+ import W from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useLayout as H } from "../../../../hooks/useLayout.js";
3
4
  import { useActiveEntities as P } from "../../../../store/active-entities.js";
4
5
  import { useModal as G, ScalarComboboxMultiselect as J, ScalarButton as Q, ScalarIcon as X } from "@scalar/components";
5
6
  import { isDefined as U } from "@scalar/oas-utils/helpers";
6
7
  import Y from "./DeleteRequestAuthModal.vue.js";
7
8
  import Z from "./RequestAuthDataTable.vue.js";
8
9
  import { ADD_AUTH_OPTIONS as ee } from "../../consts/new-auth-options.js";
9
- import { useLayout as te } from "../../../../hooks/useLayout.js";
10
- import { useWorkspace as le } from "../../../../store/store.js";
10
+ import { useWorkspace as te } from "../../../../store/store.js";
11
11
  import { displaySchemeFormatter as g } from "../../libs/auth.js";
12
- const oe = { class: "inline-flex gap-1 items-center" }, ie = { class: "flex flex-1 -mx-1" }, se = { class: "text-c-1" }, ye = /* @__PURE__ */ K({
12
+ const le = { class: "inline-flex gap-1 items-center" }, oe = { class: "flex flex-1 -mx-1" }, ie = { class: "text-c-1" }, ye = /* @__PURE__ */ F({
13
13
  __name: "RequestAuth",
14
14
  props: {
15
15
  selectedSecuritySchemeUids: {},
@@ -17,123 +17,123 @@ const oe = { class: "inline-flex gap-1 items-center" }, ie = { class: "flex flex
17
17
  layout: {}
18
18
  },
19
19
  emits: ["update:selectedSecuritySchemeUids"],
20
- setup(f, { emit: O }) {
21
- const k = O, { layout: $ } = te(), c = f.layout || $, { activeCollection: n, activeRequest: p } = P(), {
22
- securitySchemes: R,
23
- securitySchemeMutators: B,
24
- requestMutators: V,
25
- collectionMutators: w
26
- } = le(), _ = C(null), v = G(), S = C(null), A = m(() => {
20
+ setup(h, { emit: O }) {
21
+ const R = O, { layout: v } = H(), { activeCollection: a, activeRequest: f } = P(), {
22
+ securitySchemes: k,
23
+ securitySchemeMutators: $,
24
+ requestMutators: B,
25
+ collectionMutators: V
26
+ } = te(), A = _(null), p = G(), S = _(null), D = r(() => {
27
27
  var l, i;
28
- const e = ((l = p.value) == null ? void 0 : l.security) ?? ((i = n.value) == null ? void 0 : i.security) ?? [];
28
+ const e = ((l = f.value) == null ? void 0 : l.security) ?? ((i = a.value) == null ? void 0 : i.security) ?? [];
29
29
  return { filteredRequirements: e.filter(
30
30
  (s) => Object.keys(s).length
31
31
  ), requirements: e };
32
- }), b = m(() => {
33
- const { filteredRequirements: e, requirements: t } = A.value;
32
+ }), b = r(() => {
33
+ const { filteredRequirements: e, requirements: t } = D.value;
34
34
  if (!t.length) return null;
35
- const l = e.length < t.length, i = l ? "Unlock" : "Lock", s = l ? "Optional" : "Required", r = `${e.length === 1 ? Object.keys(e[0] || {})[0] : ""} ${s}`;
36
- return { icon: i, text: r };
37
- }), u = m(
38
- () => f.selectedSecuritySchemeUids.map((e) => {
39
- const t = R[e ?? ""];
35
+ const l = e.length < t.length, i = l ? "Unlock" : "Lock", s = l ? "Optional" : "Required", u = `${e.length === 1 ? Object.keys(e[0] || {})[0] : ""} ${s}`;
36
+ return { icon: i, text: u };
37
+ }), c = r(
38
+ () => h.selectedSecuritySchemeUids.map((e) => {
39
+ const t = k[e ?? ""];
40
40
  if (t)
41
41
  return g(t);
42
42
  }).filter(U)
43
43
  );
44
- function T(e) {
44
+ function w(e) {
45
45
  var i, s;
46
- if (!((i = n.value) != null && i.uid) || !((s = p.value) != null && s.uid)) return;
46
+ if (!((i = a.value) != null && i.uid) || !((s = f.value) != null && s.uid)) return;
47
47
  const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => o);
48
48
  if (t != null && t.payload) {
49
- const o = B.add(
49
+ const o = $.add(
50
50
  t.payload,
51
- n.value.uid
51
+ a.value.uid
52
52
  );
53
53
  o && l.push(o.uid);
54
54
  }
55
- D(l), k("update:selectedSecuritySchemeUids", l);
55
+ C(l), R("update:selectedSecuritySchemeUids", l);
56
56
  }
57
- const D = (e) => {
58
- !n.value || !p.value || (c === "modal" || c === "reference" ? w.edit(
59
- n.value.uid,
57
+ const C = (e) => {
58
+ !a.value || !f.value || (v === "modal" || h.layout === "reference" ? V.edit(
59
+ a.value.uid,
60
60
  "selectedSecuritySchemeUids",
61
61
  e
62
- ) : V.edit(
63
- p.value.uid,
62
+ ) : B.edit(
63
+ f.value.uid,
64
64
  "selectedSecuritySchemeUids",
65
65
  e
66
66
  ));
67
67
  };
68
- function E(e) {
69
- S.value = e, v.show();
68
+ function T(e) {
69
+ S.value = e, p.show();
70
70
  }
71
- const I = (e) => {
71
+ const E = (e) => {
72
72
  var l;
73
- const t = f.selectedSecuritySchemeUids.filter(
73
+ const t = h.selectedSecuritySchemeUids.filter(
74
74
  (i) => i !== e
75
75
  );
76
- D(t), k("update:selectedSecuritySchemeUids", t), (l = _.value) == null || l.$el.focus(), v.hide();
77
- }, j = m(() => {
76
+ C(t), R("update:selectedSecuritySchemeUids", t), (l = A.value) == null || l.$el.focus(), p.hide();
77
+ }, I = r(() => {
78
78
  var t;
79
- return (((t = n.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => R[l]).filter((l) => l);
80
- }), F = m(
79
+ return (((t = a.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => k[l]).filter((l) => l);
80
+ }), j = r(
81
81
  () => {
82
- const e = [...j.value], t = [];
83
- A.value.filteredRequirements.forEach((o) => {
84
- const r = e.findIndex(
82
+ const e = [...I.value], t = [];
83
+ D.value.filteredRequirements.forEach((o) => {
84
+ const u = e.findIndex(
85
85
  (x) => (x == null ? void 0 : x.nameKey) === Object.keys(o)[0]
86
86
  );
87
- r > -1 && (t.push(e[r]), e.splice(r, 1));
87
+ u > -1 && (t.push(e[u]), e.splice(u, 1));
88
88
  });
89
89
  const l = e.map((o) => o ? g(o) : void 0).filter(U), i = t.map((o) => o ? g(o) : void 0).filter(U), s = [
90
90
  { label: "Required authentication", options: i },
91
91
  { label: "Available authentication", options: l }
92
92
  ];
93
- return c === "modal" || c === "reference" ? i.length ? s : l : (s.push({
93
+ return v === "modal" || h.layout === "reference" ? i.length ? s : l : (s.push({
94
94
  label: "Add new authentication",
95
95
  options: ee
96
96
  }), s);
97
97
  }
98
98
  );
99
- return (e, t) => (M(), L(H, {
99
+ return (e, t) => (M(), K(W, {
100
100
  class: "group/params",
101
- itemCount: u.value.length,
102
- layout: f.layout
101
+ itemCount: c.value.length,
102
+ layout: e.layout
103
103
  }, {
104
- title: d(() => [
105
- y("div", oe, [
104
+ title: m(() => [
105
+ y("div", le, [
106
106
  y("span", null, q(e.title), 1),
107
- b.value ? (M(), N("span", {
107
+ b.value ? (M(), L("span", {
108
108
  key: 0,
109
- class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": b.value.text === "Required" }])
110
- }, q(b.value.text), 3)) : W("", !0)
109
+ class: N(["text-c-3 text-xs leading-[normal]", { "text-c-1": b.value.text === "Required" }])
110
+ }, q(b.value.text), 3)) : z("", !0)
111
111
  ])
112
112
  ]),
113
- actions: d(() => [
114
- y("div", ie, [
115
- h(a(J), {
113
+ actions: m(() => [
114
+ y("div", oe, [
115
+ d(n(J), {
116
116
  class: "text-xs w-72",
117
- isDeletable: a(c) !== "modal" && a(c) !== "reference",
118
- modelValue: u.value,
117
+ isDeletable: n(v) !== "modal" && e.layout !== "reference",
118
+ modelValue: c.value,
119
119
  multiple: "",
120
- options: F.value,
121
- onDelete: E,
122
- "onUpdate:modelValue": T
120
+ options: j.value,
121
+ onDelete: T,
122
+ "onUpdate:modelValue": w
123
123
  }, {
124
- default: d(() => [
125
- h(a(Q), {
124
+ default: m(() => [
125
+ d(n(Q), {
126
126
  ref_key: "comboboxButtonRef",
127
- ref: _,
127
+ ref: A,
128
128
  class: "h-auto px-1.5 py-0.75 hover:bg-b-3 text-c-1 hover:text-c-1 font-normal",
129
129
  fullWidth: "",
130
130
  variant: "ghost"
131
131
  }, {
132
- default: d(() => {
132
+ default: m(() => {
133
133
  var l;
134
134
  return [
135
- y("div", se, q(u.value.length === 0 ? "Auth Type" : u.value.length === 1 ? (l = u.value[0]) == null ? void 0 : l.label : "Multiple"), 1),
136
- h(a(X), {
135
+ y("div", ie, q(c.value.length === 0 ? "Auth Type" : c.value.length === 1 ? (l = c.value[0]) == null ? void 0 : l.label : "Multiple"), 1),
136
+ d(n(X), {
137
137
  class: "ml-1 shrink-0",
138
138
  icon: "ChevronDown",
139
139
  size: "sm"
@@ -147,18 +147,18 @@ const oe = { class: "inline-flex gap-1 items-center" }, ie = { class: "flex flex
147
147
  }, 8, ["isDeletable", "modelValue", "options"])
148
148
  ])
149
149
  ]),
150
- default: d(() => [
151
- h(Z, {
152
- layout: a(c),
150
+ default: m(() => [
151
+ d(Z, {
152
+ layout: e.layout,
153
153
  selectedSecuritySchemeUids: e.selectedSecuritySchemeUids
154
154
  }, null, 8, ["layout", "selectedSecuritySchemeUids"]),
155
- h(Y, {
155
+ d(Y, {
156
156
  scheme: S.value,
157
- state: a(v),
158
- onClose: t[0] || (t[0] = (l) => a(v).hide()),
157
+ state: n(p),
158
+ onClose: t[0] || (t[0] = (l) => n(p).hide()),
159
159
  onDelete: t[1] || (t[1] = (l) => {
160
160
  var i;
161
- return I((i = S.value) == null ? void 0 : i.id);
161
+ return E((i = S.value) == null ? void 0 : i.id);
162
162
  })
163
163
  }, null, 8, ["scheme", "state"])
164
164
  ]),
@@ -1,7 +1,6 @@
1
- import type { ClientLayout } from '../../../../hooks/index.js';
2
1
  type __VLS_Props = {
3
2
  selectedSecuritySchemeUids: string[];
4
- layout?: 'client' | 'reference' | ClientLayout;
3
+ layout: 'client' | 'reference';
5
4
  };
6
5
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFormElement>;
7
6
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue"],"names":[],"mappings":"AAmLA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAW3C,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAA;CAC/C,CAAC;;AA2MF,wBAOG"}
1
+ {"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue"],"names":[],"mappings":"AA8LA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;CAC/B,CAAC;;AA2MF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuthDataTable.vue2.js";
2
2
  /* empty css */
3
- import e from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ e(t, [["__scopeId", "data-v-ecff9e0b"]]);
3
+ import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f417cbbe"]]);
5
5
  export {
6
- r as default
6
+ f as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as S, ref as f, computed as y, watch as x, openBlock as t, createElementBlock as l, withModifiers as k, Fragment as w, renderList as g, normalizeClass as p, createElementVNode as n, toDisplayString as _, unref as o, createCommentVNode as c, createBlock as C, withCtx as U, createVNode as v } from "vue";
1
+ import { defineComponent as y, ref as f, computed as S, watch as x, openBlock as r, createElementBlock as o, withModifiers as k, Fragment as w, renderList as g, normalizeClass as p, createElementVNode as n, toDisplayString as _, unref as l, createCommentVNode as c, createBlock as C, withCtx as U, createVNode as v } from "vue";
2
2
  import { useModal as z } from "@scalar/components";
3
3
  import A from "./DeleteRequestAuthModal.vue.js";
4
4
  import M from "./RequestExampleAuth.vue.js";
@@ -14,25 +14,25 @@ const E = {
14
14
  }, F = {
15
15
  key: 2,
16
16
  class: "text-c-3 px-4 text-sm border-t min-h-16 justify-center flex items-center bg-b-1"
17
- }, J = /* @__PURE__ */ S({
17
+ }, J = /* @__PURE__ */ y({
18
18
  __name: "RequestAuthDataTable",
19
19
  props: {
20
20
  selectedSecuritySchemeUids: {},
21
- layout: { default: "client" }
21
+ layout: {}
22
22
  },
23
23
  setup(u) {
24
- const { securitySchemes: d } = B(), m = z(), b = f(null), e = f(0), h = y(() => u.selectedSecuritySchemeUids[e.value] || null);
24
+ const { securitySchemes: d } = B(), m = z(), b = f(null), e = f(0), h = S(() => u.selectedSecuritySchemeUids[e.value] || null);
25
25
  return x(
26
26
  () => u.selectedSecuritySchemeUids,
27
- (r) => {
28
- r[e.value] || (e.value = Math.max(0, e.value - 1));
27
+ (t) => {
28
+ t[e.value] || (e.value = Math.max(0, e.value - 1));
29
29
  }
30
- ), (r, s) => (t(), l("form", {
30
+ ), (t, s) => (r(), o("form", {
31
31
  onSubmit: s[1] || (s[1] = k(() => {
32
32
  }, ["prevent"]))
33
33
  }, [
34
- r.selectedSecuritySchemeUids.length > 1 ? (t(), l("div", E, [
35
- (t(!0), l(w, null, g(r.selectedSecuritySchemeUids, (a, i) => (t(), l("div", {
34
+ t.selectedSecuritySchemeUids.length > 1 ? (r(), o("div", E, [
35
+ (r(!0), o(w, null, g(t.selectedSecuritySchemeUids, (a, i) => (r(), o("div", {
36
36
  key: a,
37
37
  class: p(["flex relative h-8 z-1 cursor-pointer -mb-[var(--scalar-border-width)]", [e.value === i ? "text-c-1" : "text-c-3"]])
38
38
  }, [
@@ -41,29 +41,30 @@ const E = {
41
41
  type: "button",
42
42
  onClick: (R) => e.value = i
43
43
  }, [
44
- n("span", q, _(o(d)[a] ? o(N)(o(d)[a]).label : ""), 1)
44
+ n("span", q, _(l(d)[a] ? l(N)(l(d)[a]).label : ""), 1)
45
45
  ], 8, V),
46
46
  s[2] || (s[2] = n("div", { class: "absolute bottom-0 z-0 -inset-x-96 h-[var(--scalar-border-width)] bg-border" }, null, -1)),
47
- e.value === i ? (t(), l("div", D)) : c("", !0)
47
+ e.value === i ? (r(), o("div", D)) : c("", !0)
48
48
  ], 2))), 128))
49
49
  ])) : c("", !0),
50
- h.value ? (t(), C(o($), {
50
+ h.value ? (r(), C(l($), {
51
51
  key: 1,
52
- class: p(["flex-1", r.layout === "reference" && "border-0"]),
52
+ class: p(["flex-1", t.layout === "reference" && "border-0"]),
53
53
  columns: [""]
54
54
  }, {
55
55
  default: U(() => [
56
56
  v(M, {
57
+ layout: t.layout,
57
58
  selectedSecuritySchemeUids: [h.value]
58
- }, null, 8, ["selectedSecuritySchemeUids"])
59
+ }, null, 8, ["layout", "selectedSecuritySchemeUids"])
59
60
  ]),
60
61
  _: 1
61
62
  }, 8, ["class"])) : c("", !0),
62
- r.selectedSecuritySchemeUids.length ? c("", !0) : (t(), l("div", F, " No authentication selected ")),
63
+ t.selectedSecuritySchemeUids.length ? c("", !0) : (r(), o("div", F, " No authentication selected ")),
63
64
  v(A, {
64
65
  scheme: b.value,
65
- state: o(m),
66
- onClose: s[0] || (s[0] = (a) => o(m).hide())
66
+ state: l(m),
67
+ onClose: s[0] || (s[0] = (a) => l(m).hide())
67
68
  }, null, 8, ["scheme", "state"])
68
69
  ], 32));
69
70
  }
@@ -1,6 +1,6 @@
1
1
  type __VLS_Props = {
2
2
  selectedSecuritySchemeUids: string[];
3
- layout?: 'client' | 'reference';
3
+ layout: 'client' | 'reference';
4
4
  };
5
5
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
6
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AAkNA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AA2XF,wBAMG"}
1
+ {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AAmNA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;CAC/B,CAAC;;AA+XF,wBAMG"}