@scalar/api-client 2.2.7 → 2.2.9

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 (149) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  4. package/dist/components/CodeInput/CodeInput.vue2.js +65 -65
  5. package/dist/components/CodeInput/codeVariableWidget.d.ts +6 -4
  6. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  7. package/dist/components/CodeInput/codeVariableWidget.js +72 -68
  8. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  9. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +108 -106
  10. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  12. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +12 -12
  13. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  14. package/dist/components/DataTable/DataTable.vue.js +20 -15
  15. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  16. package/dist/components/DataTable/DataTableCell.vue.js +16 -11
  17. package/dist/components/DataTable/DataTableHeader.vue.d.ts.map +1 -1
  18. package/dist/components/DataTable/DataTableHeader.vue.js +11 -12
  19. package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -1
  20. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  21. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  22. package/dist/components/DataTable/DataTableInput.vue2.js +9 -9
  23. package/dist/components/DataTable/index.js +14 -14
  24. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  25. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +87 -67
  26. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  27. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +2 -2
  28. package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
  29. package/dist/components/Sidebar/SidebarList.vue.js +4 -4
  30. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +8 -4
  31. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  32. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  33. package/dist/components/Sidebar/SidebarListElement.vue2.js +52 -32
  34. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +3 -0
  35. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  36. package/dist/components/Sidebar/SidebarListElementActions.vue.js +43 -31
  37. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  38. package/dist/components/TopNav/TopNav.vue.js +32 -31
  39. package/dist/layouts/App/create-api-client-app.d.ts +49 -42
  40. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  41. package/dist/layouts/Modal/create-api-client-modal.d.ts +103 -89
  42. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  43. package/dist/layouts/Modal/create-api-client-modal.js +31 -19
  44. package/dist/layouts/Web/create-api-client-web.d.ts +49 -42
  45. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  46. package/dist/libs/create-client.d.ts +50 -44
  47. package/dist/libs/create-client.d.ts.map +1 -1
  48. package/dist/libs/env-helpers.d.ts +9 -0
  49. package/dist/libs/env-helpers.d.ts.map +1 -0
  50. package/dist/libs/env-helpers.js +4 -0
  51. package/dist/libs/environment-parser.d.ts +3 -4
  52. package/dist/libs/environment-parser.d.ts.map +1 -1
  53. package/dist/libs/environment-parser.js +5 -4
  54. package/dist/libs/index.d.ts +2 -0
  55. package/dist/libs/index.d.ts.map +1 -1
  56. package/dist/libs/index.js +28 -22
  57. package/dist/libs/postman.d.ts +11 -0
  58. package/dist/libs/postman.d.ts.map +1 -0
  59. package/dist/libs/postman.js +39 -0
  60. package/dist/libs/send-request/send-request.d.ts +5 -2
  61. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  62. package/dist/libs/send-request/send-request.js +106 -104
  63. package/dist/routes.d.ts +11 -0
  64. package/dist/routes.d.ts.map +1 -1
  65. package/dist/routes.js +13 -7
  66. package/dist/store/active-entities.d.ts +18 -11
  67. package/dist/store/active-entities.d.ts.map +1 -1
  68. package/dist/store/active-entities.js +108 -69
  69. package/dist/store/collections.d.ts +17 -15
  70. package/dist/store/collections.d.ts.map +1 -1
  71. package/dist/store/collections.js +62 -41
  72. package/dist/store/environment.d.ts +4 -4
  73. package/dist/store/import-spec.d.ts +2 -2
  74. package/dist/store/import-spec.d.ts.map +1 -1
  75. package/dist/store/index.d.ts +1 -0
  76. package/dist/store/index.d.ts.map +1 -1
  77. package/dist/store/index.js +7 -3
  78. package/dist/store/requests.d.ts +4 -4
  79. package/dist/store/router-params.d.ts +1 -1
  80. package/dist/store/router-params.d.ts.map +1 -1
  81. package/dist/store/router-params.js +7 -7
  82. package/dist/store/store.d.ts +49 -42
  83. package/dist/store/store.d.ts.map +1 -1
  84. package/dist/store/store.js +76 -72
  85. package/dist/store/workspace.d.ts +12 -12
  86. package/dist/store/workspace.d.ts.map +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/types/index.d.ts +2 -0
  89. package/dist/types/index.d.ts.map +1 -0
  90. package/dist/types/index.js +1 -0
  91. package/dist/types/vue.d.ts +10 -0
  92. package/dist/types/vue.d.ts.map +1 -0
  93. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  94. package/dist/views/Cookies/Cookies.vue2.js +75 -70
  95. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  96. package/dist/views/Environment/Environment.vue2.js +308 -152
  97. package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -1
  98. package/dist/views/Environment/EnvironmentColorModal.vue.js +20 -18
  99. package/dist/views/Environment/EnvironmentColors.vue.d.ts +4 -1
  100. package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +1 -1
  101. package/dist/views/Environment/EnvironmentColors.vue.js +83 -58
  102. package/dist/views/Environment/EnvironmentModal.vue.d.ts +7 -0
  103. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
  104. package/dist/views/Environment/EnvironmentModal.vue.js +119 -37
  105. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +4 -5
  106. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  107. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +73 -63
  108. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  109. package/dist/views/Request/Request.vue.js +2 -2
  110. package/dist/views/Request/Request.vue2.js +60 -61
  111. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
  112. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  113. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +185 -187
  114. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -0
  115. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  116. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -24
  117. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  118. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  119. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +35 -187
  120. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +7 -0
  121. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -0
  122. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +7 -0
  123. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +207 -0
  124. package/dist/views/Request/RequestSection/{RequestAuthDataTableInput.vue.d.ts → RequestAuth/RequestAuthDataTableInput.vue.d.ts} +2 -2
  125. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -0
  126. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +43 -0
  127. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +1 -0
  128. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  129. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +5 -134
  130. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +176 -2
  131. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -0
  132. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -0
  133. package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -0
  134. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  135. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  136. package/dist/views/Request/RequestSidebar.vue2.js +139 -117
  137. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  138. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  139. package/dist/views/Request/RequestSidebarItem.vue2.js +32 -38
  140. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  141. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  142. package/dist/views/Request/libs/auth.js +3 -3
  143. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  144. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  145. package/dist/views/Servers/Servers.vue2.js +9 -8
  146. package/package.json +19 -8
  147. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +0 -1
  148. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.js +0 -46
  149. /package/dist/views/Request/RequestSection/{RequestAuthDataTableInput.vue2.js → RequestAuth/RequestAuthDataTableInput.vue2.js} +0 -0
@@ -2,6 +2,7 @@ import type { UpdateScheme } from '../../../../store/index.js';
2
2
  import type { Oauth2Flow } from '@scalar/oas-utils/entities/spec';
3
3
  type __VLS_Props = {
4
4
  flow: Oauth2Flow;
5
+ layout: 'client' | 'reference';
5
6
  updateScheme: UpdateScheme;
6
7
  };
7
8
  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>;
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAKjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAyPF,wBAOG"}
1
+ {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAKjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AA6PF,wBAOG"}
@@ -1,16 +1,17 @@
1
- import { defineComponent as C, computed as x, openBlock as p, createBlock as w, unref as t, withCtx as a, createElementVNode as o, createVNode as r, normalizeClass as y, toDisplayString as d, createElementBlock as v, Fragment as b, renderList as k, createCommentVNode as D } from "vue";
2
- import { Disclosure as V, DisclosureButton as $, DisclosurePanel as B } from "@headlessui/vue";
3
- import { ScalarIcon as N } from "@scalar/components";
1
+ import { defineComponent as y, computed as x, openBlock as p, createBlock as w, unref as t, withCtx as n, createElementVNode as o, createVNode as r, normalizeClass as C, toDisplayString as d, createElementBlock as v, Fragment as b, renderList as k, createTextVNode as V, createCommentVNode as D } from "vue";
2
+ import { Disclosure as $, DisclosureButton as B, DisclosurePanel as N } from "@headlessui/vue";
3
+ import { ScalarIcon as O } from "@scalar/components";
4
4
  import S from "../../../../components/DataTable/DataTableCell.vue.js";
5
- import O from "../../../../components/DataTable/DataTableRow.vue.js";
5
+ import T from "../../../../components/DataTable/DataTableRow.vue.js";
6
6
  import j from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
7
  const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
8
8
  class: "grid auto-rows-auto border-t-1/2",
9
9
  style: { gridTemplateColumns: "1fr auto" }
10
- }, I = { class: "font-code text-xs" }, R = { key: 0 }, G = /* @__PURE__ */ C({
10
+ }, I = { key: 0 }, R = { class: "font-code text-xs" }, H = /* @__PURE__ */ y({
11
11
  __name: "OAuthScopesInput",
12
12
  props: {
13
13
  flow: {},
14
+ layout: { default: "client" },
14
15
  updateScheme: { type: Function }
15
16
  },
16
17
  setup(s) {
@@ -37,57 +38,59 @@ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
37
38
  );
38
39
  }
39
40
  return (e, l) => (p(), w(t(S), { class: "items-center min-h-8 h-auto" }, {
40
- default: a(() => [
41
+ default: n(() => [
41
42
  o("div", z, [
42
43
  l[0] || (l[0] = o("div", { class: "text-c-1 min-w-[94px] items-center pl-2 h-full" }, [
43
44
  o("span", { class: "h-8 flex items-center" }, " Scopes ")
44
45
  ], -1)),
45
- r(t(V), {
46
+ r(t($), {
46
47
  as: "div",
47
48
  class: "flex flex-col w-full bl"
48
49
  }, {
49
- default: a(() => {
50
+ default: n(() => {
50
51
  var c, h;
51
52
  return [
52
- r(t($), {
53
- class: y([
53
+ r(t(B), {
54
+ class: C([
54
55
  "group/scopes-accordion flex items-center text-left min-h-8 gap-1.5 h-auto pl-2 hover:text-c-1 pr-2.5 cursor-pointer",
55
56
  (((h = (c = e.flow) == null ? void 0 : c.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
56
57
  ])
57
58
  }, {
58
- default: a(({ open: n }) => {
59
+ default: n(({ open: a }) => {
59
60
  var f, u, m;
60
61
  return [
61
62
  o("div", E, " Selected " + d(((u = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : u.length) || 0) + " / " + d(Object.keys(((m = e.flow) == null ? void 0 : m.scopes) ?? {}).length || 0), 1),
62
- r(t(N), {
63
+ r(t(O), {
63
64
  class: "text-c-3 group-hover/scopes-accordion:text-c-2",
64
- icon: n ? "ChevronDown" : "ChevronRight",
65
+ icon: a ? "ChevronDown" : "ChevronRight",
65
66
  size: "xs"
66
67
  }, null, 8, ["icon"])
67
68
  ];
68
69
  }),
69
70
  _: 1
70
71
  }, 8, ["class"]),
71
- r(t(B), { as: "template" }, {
72
- default: a(() => [
72
+ r(t(N), { as: "template" }, {
73
+ default: n(() => [
73
74
  o("table", F, [
74
- (p(!0), v(b, null, k(g.value, ({ id: n, label: f, description: u }) => (p(), w(t(O), {
75
- key: n,
75
+ (p(!0), v(b, null, k(g.value, ({ id: a, label: f, description: u }) => (p(), w(t(T), {
76
+ key: a,
76
77
  class: "text-c-2",
77
- onClick: (m) => _(n, !i.value.includes(n))
78
+ onClick: (m) => _(a, !i.value.includes(a))
78
79
  }, {
79
- default: a(() => [
80
+ default: n(() => [
80
81
  r(t(S), { class: "w-full px-2 py-1.5 hover:text-c-1 cursor-pointer" }, {
81
- default: a(() => [
82
+ default: n(() => [
82
83
  o("span", null, [
83
- o("span", I, d(f), 1),
84
- u ? (p(), v("span", R, "  – " + d(u), 1)) : D("", !0)
84
+ u ? (p(), v("span", I, [
85
+ o("span", R, d(f), 1),
86
+ V(" – " + d(u), 1)
87
+ ])) : D("", !0)
85
88
  ])
86
89
  ]),
87
90
  _: 2
88
91
  }, 1024),
89
92
  r(t(j), {
90
- modelValue: i.value.includes(n),
93
+ modelValue: i.value.includes(a),
91
94
  "onUpdate:modelValue": () => {
92
95
  }
93
96
  }, null, 8, ["modelValue"])
@@ -109,5 +112,5 @@ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
109
112
  }
110
113
  });
111
114
  export {
112
- G as default
115
+ H as default
113
116
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAwYA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AA2fF,wBAOG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAyKA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAyJF,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-5f5171f4"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-c8154c4e"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,212 +1,60 @@
1
- import { defineComponent as F, ref as b, computed as f, openBlock as u, createBlock as z, withCtx as r, createElementVNode as m, createTextVNode as _, toDisplayString as g, createElementBlock as p, createVNode as c, unref as i, createCommentVNode as W, Fragment as L, renderList as H, withModifiers as D, withKeys as P } from "vue";
2
- import G from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useActiveEntities as J } from "../../../../store/active-entities.js";
4
- import { useModal as Q, ScalarIcon as O, ScalarComboboxMultiselect as X, ScalarButton as Y, ScalarIconButton as Z } from "@scalar/components";
5
- import ee from "./DeleteRequestAuthModal.vue.js";
6
- import te from "./RequestExampleAuth.vue.js";
7
- import { displaySchemeFormatter as k } from "../../libs/auth.js";
8
- import { ADD_AUTH_OPTIONS as le } from "../../consts/new-auth-options.js";
9
- import se from "../../../../components/DataTable/DataTable.vue.js";
10
- import oe from "../../../../components/DataTable/DataTableRow.vue.js";
11
- import ie from "../../../../components/DataTable/DataTableHeader.vue.js";
12
- import { useWorkspace as ne } from "../../../../store/store.js";
13
- const ce = { class: "flex flex-1 gap-1 items-center justify-between" }, re = {
1
+ import { defineComponent as x, ref as r, computed as o, openBlock as l, createBlock as _, withCtx as u, createElementVNode as g, createTextVNode as a, toDisplayString as m, createElementBlock as k, createVNode as d, unref as R, createCommentVNode as C } from "vue";
2
+ import U from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useActiveEntities as A } from "../../../../store/active-entities.js";
4
+ import { useModal as O, ScalarIcon as b } from "@scalar/components";
5
+ import N from "./RequestAuthDataTable.vue.js";
6
+ import { useWorkspace as V } from "../../../../store/store.js";
7
+ import { displaySchemeFormatter as j } from "../../libs/auth.js";
8
+ const B = { class: "flex flex-1 gap-1 items-center justify-between" }, E = {
14
9
  key: 0,
15
10
  class: "flex items-center gap-1 text-c-3"
16
- }, ae = {
17
- key: 0,
18
- class: "flex relative scroll-timeline-x w-full"
19
- }, ue = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, me = {
20
- key: 1,
21
- class: "pl-2"
22
- }, Re = /* @__PURE__ */ F({
11
+ }, M = /* @__PURE__ */ x({
23
12
  __name: "RequestAuth",
24
13
  props: {
25
14
  selectedSecuritySchemeUids: {},
26
15
  title: {}
27
16
  },
28
- setup(R) {
29
- const { activeCollection: a, activeRequest: h } = J(), {
30
- collectionMutators: B,
31
- isReadOnly: x,
32
- requestMutators: M,
33
- securitySchemes: q,
34
- securitySchemeMutators: V
35
- } = ne(), K = b(null), w = b(null), y = Q(), C = b(void 0), U = f(() => {
36
- var l, o;
37
- const e = ((l = h.value) == null ? void 0 : l.security) ?? ((o = a.value) == null ? void 0 : o.security) ?? [];
17
+ setup(p) {
18
+ const { activeCollection: f, activeRequest: h } = A(), { isReadOnly: T, securitySchemes: y } = V();
19
+ r(null), r(null), O(), r(void 0);
20
+ const S = o(() => {
21
+ var t, s;
22
+ const e = ((t = h.value) == null ? void 0 : t.security) ?? ((s = f.value) == null ? void 0 : s.security) ?? [];
38
23
  return { filteredRequirements: e.filter((n) => Object.keys(n).length), requirements: e };
39
- }), T = f(() => {
40
- var t;
41
- return (((t = a.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => q[l]).filter((l) => l);
42
- }), j = f(
43
- () => {
44
- const e = [...T.value], t = [];
45
- U.value.filteredRequirements.forEach((s) => {
46
- const d = e.findIndex(
47
- (E) => E.nameKey === Object.keys(s)[0]
48
- );
49
- d > -1 && (t.push(e[d]), e.splice(d, 1));
50
- });
51
- const l = e.map(
52
- (s) => k(s)
53
- ), o = t.map(
54
- (s) => k(s)
55
- ), n = [
56
- { label: "Required authentication", options: o },
57
- { label: "Available authentication", options: l }
58
- ];
59
- return x ? o.length ? n : l : (n.push({
60
- label: "Add new authentication",
61
- options: le
62
- }), n);
63
- }
64
- ), S = f(() => {
65
- const { filteredRequirements: e, requirements: t } = U.value;
66
- if (!t.length) return null;
67
- const l = e.length < t.length, o = l ? "Unlock" : "Lock", n = l ? "Optional" : "Required", d = `${e.length === 1 ? Object.keys(e[0])[0] : "Authentication"} ${n}`;
68
- return { icon: o, text: d };
69
- }), $ = (e) => {
70
- !a.value || !h.value || (x ? B.edit(
71
- a.value.uid,
72
- "selectedSecuritySchemeUids",
73
- e
74
- ) : M.edit(
75
- h.value.uid,
76
- "selectedSecuritySchemeUids",
77
- e
78
- ));
79
- }, v = f(
80
- () => R.selectedSecuritySchemeUids.map(
81
- (e) => k(q[e])
24
+ }), i = o(() => {
25
+ const { filteredRequirements: e, requirements: c } = S.value;
26
+ if (!c.length) return null;
27
+ const t = e.length < c.length, s = t ? "Unlock" : "Lock", n = t ? "Optional" : "Required", q = `${e.length === 1 ? Object.keys(e[0])[0] : "Authentication"} ${n}`;
28
+ return { icon: s, text: q };
29
+ }), v = o(
30
+ () => p.selectedSecuritySchemeUids.map(
31
+ (e) => j(y[e])
82
32
  )
83
33
  );
84
- function I(e) {
85
- var o, n;
86
- if (!((o = a.value) != null && o.uid) || !((n = h.value) != null && n.uid)) return;
87
- const t = e.find((s) => s.payload), l = e.filter((s) => !s.payload).map(({ id: s }) => s);
88
- if (t != null && t.payload) {
89
- const s = V.add(
90
- t.payload,
91
- a.value.uid
92
- );
93
- s && l.push(s.uid);
94
- }
95
- $(l);
96
- }
97
- const A = (e) => {
98
- var t;
99
- $(
100
- R.selectedSecuritySchemeUids.filter((l) => l !== e)
101
- ), (t = w.value) == null || t.$el.focus();
102
- };
103
- function N(e) {
104
- C.value = e, y.show();
105
- }
106
- return (e, t) => (u(), z(G, {
34
+ return (e, c) => (l(), _(U, {
107
35
  class: "group/params",
108
36
  itemCount: v.value.length
109
37
  }, {
110
- title: r(() => [
111
- m("div", ce, [
112
- _(g(e.title) + " ", 1),
113
- S.value ? (u(), p("div", re, [
114
- _(g(S.value.text) + " ", 1),
115
- c(i(O), {
38
+ title: u(() => [
39
+ g("div", B, [
40
+ a(m(e.title) + " ", 1),
41
+ i.value ? (l(), k("div", E, [
42
+ a(m(i.value.text) + " ", 1),
43
+ d(R(b), {
116
44
  class: "text-c-3",
117
- icon: S.value.icon,
45
+ icon: i.value.icon,
118
46
  size: "xs"
119
47
  }, null, 8, ["icon"])
120
- ])) : W("", !0)
48
+ ])) : C("", !0)
121
49
  ])
122
50
  ]),
123
- default: r(() => [
124
- m("form", null, [
125
- c(i(se), {
126
- class: "flex-1",
127
- columns: [""]
128
- }, {
129
- default: r(() => [
130
- c(i(oe), null, {
131
- default: r(() => [
132
- c(i(ie), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
133
- default: r(() => [
134
- c(i(X), {
135
- ref_key: "comboboxRef",
136
- ref: K,
137
- class: "text-xs w-full",
138
- fullWidth: "",
139
- isDeletable: !i(x),
140
- modelValue: v.value,
141
- multiple: "",
142
- options: j.value,
143
- style: { "margin-left": "120px" },
144
- teleport: "",
145
- onDelete: N,
146
- "onUpdate:modelValue": I
147
- }, {
148
- default: r(() => [
149
- c(i(Y), {
150
- ref_key: "comboboxButtonRef",
151
- ref: w,
152
- class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start -outline-offset-2",
153
- fullWidth: "",
154
- variant: "ghost"
155
- }, {
156
- default: r(() => [
157
- t[3] || (t[3] = m("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
158
- v.value.length ? (u(), p("div", ae, [
159
- t[1] || (t[1] = m("div", { class: "fade-left" }, null, -1)),
160
- m("div", ue, [
161
- (u(!0), p(L, null, H(v.value, (l) => (u(), p("span", {
162
- key: l.id,
163
- class: "cm-pill flex items-center mx-0 h-fit pr-0.5 !bg-b-2 text-c-1"
164
- }, [
165
- _(g(l.label) + " ", 1),
166
- c(i(Z), {
167
- class: "cursor-pointer -ml-0.5 text-c-3 hover:text-c-1 rounded-full",
168
- icon: "Close",
169
- label: `Remove ${l.label}`,
170
- size: "xs",
171
- onClick: D((o) => A(l.id), ["stop"]),
172
- onKeydown: P(D((o) => A(l.id), ["stop"]), ["enter"])
173
- }, null, 8, ["label", "onClick", "onKeydown"])
174
- ]))), 128))
175
- ]),
176
- t[2] || (t[2] = m("div", { class: "fade-right" }, null, -1))
177
- ])) : (u(), p("div", me, " None ")),
178
- c(i(O), {
179
- class: "mr-[9px]",
180
- icon: "ChevronDown",
181
- size: "md"
182
- })
183
- ]),
184
- _: 1
185
- }, 512)
186
- ]),
187
- _: 1
188
- }, 8, ["isDeletable", "modelValue", "options"])
189
- ]),
190
- _: 1
191
- })
192
- ]),
193
- _: 1
194
- }),
195
- c(te, { selectedSecuritySchemeUids: e.selectedSecuritySchemeUids }, null, 8, ["selectedSecuritySchemeUids"])
196
- ]),
197
- _: 1
198
- }),
199
- c(ee, {
200
- scheme: C.value,
201
- state: i(y),
202
- onClose: t[0] || (t[0] = (l) => i(y).hide())
203
- }, null, 8, ["scheme", "state"])
204
- ])
51
+ default: u(() => [
52
+ d(N, { selectedSecuritySchemeUids: e.selectedSecuritySchemeUids }, null, 8, ["selectedSecuritySchemeUids"])
205
53
  ]),
206
54
  _: 1
207
55
  }, 8, ["itemCount"]));
208
56
  }
209
57
  });
210
58
  export {
211
- Re as default
59
+ M as default
212
60
  };
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ selectedSecuritySchemeUids: string[];
3
+ layout?: 'client' | 'reference';
4
+ };
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>;
6
+ export default _default;
7
+ //# sourceMappingURL=RequestAuthDataTable.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue"],"names":[],"mappings":"AAgaA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AAifF,wBAOG"}
@@ -0,0 +1,7 @@
1
+ import t from "./RequestAuthDataTable.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-ea5c24d5"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,207 @@
1
+ import { defineComponent as j, ref as x, computed as h, openBlock as a, createElementBlock as c, createVNode as r, unref as s, normalizeClass as k, withCtx as m, Fragment as U, createElementVNode as d, renderList as W, createTextVNode as H, toDisplayString as L, withModifiers as D, withKeys as P, createBlock as G, createCommentVNode as $ } from "vue";
2
+ import { useActiveEntities as J } from "../../../../store/active-entities.js";
3
+ import { useModal as Q, ScalarComboboxMultiselect as X, ScalarButton as Y, ScalarIconButton as Z, ScalarIcon as ee } from "@scalar/components";
4
+ import { nanoid as te } from "nanoid";
5
+ import le from "./DeleteRequestAuthModal.vue.js";
6
+ import oe from "./RequestExampleAuth.vue.js";
7
+ import { displaySchemeFormatter as R } from "../../libs/auth.js";
8
+ import { ADD_AUTH_OPTIONS as se } from "../../consts/new-auth-options.js";
9
+ import ie from "../../../../components/DataTable/DataTable.vue.js";
10
+ import B from "../../../../components/DataTable/DataTableRow.vue.js";
11
+ import ne from "../../../../components/DataTable/DataTableHeader.vue.js";
12
+ import { useWorkspace as ae } from "../../../../store/store.js";
13
+ const re = {
14
+ key: 0,
15
+ class: "flex relative scroll-timeline-x w-full"
16
+ }, ce = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, ue = {
17
+ key: 1,
18
+ class: "pl-2"
19
+ }, me = {
20
+ key: 1,
21
+ class: "text-c-3 uppercase font-medium"
22
+ }, de = {
23
+ key: 0,
24
+ class: "border-1/2 flex items-center min-h-8 min-w-8 px-2 rounded text-sm"
25
+ }, qe = /* @__PURE__ */ j({
26
+ __name: "RequestAuthDataTable",
27
+ props: {
28
+ selectedSecuritySchemeUids: {},
29
+ layout: { default: "client" }
30
+ },
31
+ setup(y) {
32
+ const { activeCollection: u, activeRequest: f } = J(), {
33
+ collectionMutators: M,
34
+ isReadOnly: v,
35
+ requestMutators: V,
36
+ securitySchemes: _,
37
+ securitySchemeMutators: N
38
+ } = ae(), T = x(null), w = x(null), b = Q(), q = x(void 0), A = `combobox-${te()}`, E = h(() => {
39
+ var l, i, n;
40
+ const e = (y.layout === "client" ? ((l = f.value) == null ? void 0 : l.security) ?? ((i = u.value) == null ? void 0 : i.security) : (n = u.value) == null ? void 0 : n.security) ?? [];
41
+ return { filteredRequirements: e.filter((o) => Object.keys(o).length), requirements: e };
42
+ }), I = h(() => {
43
+ var t;
44
+ return (((t = u.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => _[l]).filter((l) => l);
45
+ }), O = h(
46
+ () => {
47
+ const e = [...I.value], t = [];
48
+ E.value.filteredRequirements.forEach((o) => {
49
+ const S = e.findIndex(
50
+ (K) => K.nameKey === Object.keys(o)[0]
51
+ );
52
+ S > -1 && (t.push(e[S]), e.splice(S, 1));
53
+ });
54
+ const l = e.map(
55
+ (o) => R(o)
56
+ ), i = t.map(
57
+ (o) => R(o)
58
+ ), n = [
59
+ { label: "Required authentication", options: i },
60
+ { label: "Available authentication", options: l }
61
+ ];
62
+ return v ? i.length ? n : l : (n.push({
63
+ label: "Add new authentication",
64
+ options: se
65
+ }), n);
66
+ }
67
+ ), g = (e) => {
68
+ !u.value || !f.value || (v ? M.edit(
69
+ u.value.uid,
70
+ "selectedSecuritySchemeUids",
71
+ e
72
+ ) : V.edit(
73
+ f.value.uid,
74
+ "selectedSecuritySchemeUids",
75
+ e
76
+ ));
77
+ }, p = h(
78
+ () => y.selectedSecuritySchemeUids.map(
79
+ (e) => R(_[e])
80
+ )
81
+ );
82
+ function z(e) {
83
+ var i, n;
84
+ if (!((i = u.value) != null && i.uid) || !((n = f.value) != null && n.uid)) return;
85
+ const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => o);
86
+ if (t != null && t.payload) {
87
+ const o = N.add(
88
+ t.payload,
89
+ u.value.uid
90
+ );
91
+ o && l.push(o.uid);
92
+ }
93
+ g(l);
94
+ }
95
+ const C = (e) => {
96
+ var t;
97
+ g(
98
+ y.selectedSecuritySchemeUids.filter((l) => l !== e)
99
+ ), (t = w.value) == null || t.$el.focus();
100
+ };
101
+ function F(e) {
102
+ q.value = e, b.show();
103
+ }
104
+ return (e, t) => (a(), c("form", null, [
105
+ r(s(ie), {
106
+ class: k(["flex-1", e.layout === "reference" && "border-0"]),
107
+ columns: [""]
108
+ }, {
109
+ default: m(() => [
110
+ r(s(B), null, {
111
+ default: m(() => [
112
+ r(s(ne), {
113
+ class: k(["relative col-span-full cursor-pointer py-0 px-0 flex items-center", e.layout === "reference" && "border-0 min-h-0 mb-1.5"])
114
+ }, {
115
+ default: m(() => [
116
+ r(s(X), {
117
+ ref_key: "comboboxRef",
118
+ ref: T,
119
+ class: "text-xs w-full",
120
+ fullWidth: "",
121
+ isDeletable: !s(v),
122
+ modelValue: p.value,
123
+ multiple: "",
124
+ options: O.value,
125
+ resize: "",
126
+ style: { "margin-left": "120px" },
127
+ teleport: `#${A}`,
128
+ onDelete: F,
129
+ "onUpdate:modelValue": z
130
+ }, {
131
+ default: m(() => [
132
+ r(s(Y), {
133
+ ref_key: "comboboxButtonRef",
134
+ ref: w,
135
+ class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start -outline-offset-2",
136
+ fullWidth: "",
137
+ variant: "ghost"
138
+ }, {
139
+ default: m(() => [
140
+ e.layout === "client" ? (a(), c(U, { key: 0 }, [
141
+ t[3] || (t[3] = d("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
142
+ p.value.length ? (a(), c("div", re, [
143
+ t[1] || (t[1] = d("div", { class: "fade-left" }, null, -1)),
144
+ d("div", ce, [
145
+ (a(!0), c(U, null, W(p.value, (l) => (a(), c("span", {
146
+ key: l.id,
147
+ class: "cm-pill flex items-center mx-0 h-fit pr-0.5 !bg-b-2 text-c-1"
148
+ }, [
149
+ H(L(l.label) + " ", 1),
150
+ r(s(Z), {
151
+ class: "cursor-pointer -ml-0.5 text-c-3 hover:text-c-1 rounded-full",
152
+ icon: "Close",
153
+ label: `Remove ${l.label}`,
154
+ size: "xs",
155
+ onClick: D((i) => C(l.id), ["stop"]),
156
+ onKeydown: P(D((i) => C(l.id), ["stop"]), ["enter"])
157
+ }, null, 8, ["label", "onClick", "onKeydown"])
158
+ ]))), 128))
159
+ ]),
160
+ t[2] || (t[2] = d("div", { class: "fade-right" }, null, -1))
161
+ ])) : (a(), c("div", ue, " None "))
162
+ ], 64)) : (a(), c("div", me, " Authentication ")),
163
+ r(s(ee), {
164
+ class: k(["min-w-3 mr-2.5", {
165
+ "ml-auto": e.layout === "client",
166
+ "ml-1": e.layout === "reference"
167
+ }]),
168
+ icon: "ChevronDown",
169
+ size: "xs"
170
+ }, null, 8, ["class"])
171
+ ]),
172
+ _: 1
173
+ }, 512)
174
+ ]),
175
+ _: 1
176
+ }, 8, ["isDeletable", "modelValue", "options", "teleport"])
177
+ ]),
178
+ _: 1
179
+ }, 8, ["class"]),
180
+ e.layout === "reference" ? (a(), G(s(B), { key: 0 }, {
181
+ default: m(() => [
182
+ p.value.length ? $("", !0) : (a(), c("div", de, " None "))
183
+ ]),
184
+ _: 1
185
+ })) : $("", !0)
186
+ ]),
187
+ _: 1
188
+ }),
189
+ r(oe, {
190
+ layout: e.layout,
191
+ selectedSecuritySchemeUids: e.selectedSecuritySchemeUids
192
+ }, null, 8, ["layout", "selectedSecuritySchemeUids"])
193
+ ]),
194
+ _: 1
195
+ }, 8, ["class"]),
196
+ r(le, {
197
+ scheme: q.value,
198
+ state: s(b),
199
+ onClose: t[0] || (t[0] = (l) => s(b).hide())
200
+ }, null, 8, ["scheme", "state"]),
201
+ d("div", { id: A })
202
+ ]));
203
+ }
204
+ });
205
+ export {
206
+ qe as default
207
+ };
@@ -1,7 +1,7 @@
1
+ import type { VueClassProp } from '../../../../types/vue';
1
2
  type __VLS_Props = {
2
- id: string;
3
3
  type?: string;
4
- containerClass?: string;
4
+ containerClass?: VueClassProp;
5
5
  required?: boolean;
6
6
  modelValue: string | number;
7
7
  readOnly?: boolean;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK/C,KAAK,WAAW,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,YAAY,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAuBJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBATpB,GAAG;sBACN,GAAG;;;;EAa7B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cAzJN,OAAO;cAEP,OAAO;6EAgKpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}