@scalar/api-client 2.3.25 → 2.3.27

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 (93) hide show
  1. package/CHANGELOG.md +49 -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 +75 -72
  5. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  6. package/dist/components/CodeInput/codeVariableWidget.js +48 -45
  7. package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -0
  8. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  10. package/dist/components/DataTable/DataTableInput.vue2.js +46 -43
  11. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +1 -1
  12. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  13. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +82 -92
  14. package/dist/components/Form/Form.vue.d.ts +2 -2
  15. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  16. package/dist/components/Form/Form.vue.js +17 -14
  17. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  18. package/dist/components/ImportCollection/IntegrationLogo.vue.js +2 -1
  19. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  20. package/dist/components/SideNav/SideNav.vue.js +30 -30
  21. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +16 -0
  22. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  23. package/dist/components/Sidebar/SidebarListElement.vue.js +3 -2
  24. package/dist/components/Sidebar/SidebarListElement.vue2.js +76 -54
  25. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts +2 -2
  26. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  27. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +5 -4
  28. package/dist/hooks/useClientConfig.d.ts +6 -6
  29. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  30. package/dist/layouts/App/create-api-client-app.d.ts +3 -3
  31. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  32. package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -6
  33. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  34. package/dist/layouts/Web/create-api-client-web.d.ts +3 -3
  35. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  36. package/dist/libs/create-client.d.ts +3 -3
  37. package/dist/libs/create-client.d.ts.map +1 -1
  38. package/dist/libs/env-helpers.d.ts +10 -2
  39. package/dist/libs/env-helpers.d.ts.map +1 -1
  40. package/dist/libs/env-helpers.js +4 -2
  41. package/dist/libs/environment-parser.d.ts +1 -1
  42. package/dist/libs/hot-keys.d.ts +1 -1
  43. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  44. package/dist/libs/send-request/create-request-operation.js +9 -9
  45. package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
  46. package/dist/libs/string-template.d.ts.map +1 -1
  47. package/dist/libs/string-template.js +35 -21
  48. package/dist/routes.d.ts +10 -10
  49. package/dist/store/active-entities.js +34 -34
  50. package/dist/store/environment.js +1 -1
  51. package/dist/store/security-schemes.d.ts.map +1 -1
  52. package/dist/store/store.d.ts +3 -3
  53. package/dist/store/store.d.ts.map +1 -1
  54. package/dist/store/workspace.d.ts +2 -2
  55. package/dist/style.css +1 -1
  56. package/dist/views/Collection/CollectionCookies.vue.d.ts +1 -1
  57. package/dist/views/Collection/CollectionEnvironment.vue.d.ts +1 -1
  58. package/dist/views/Collection/CollectionOverview.vue.d.ts +1 -1
  59. package/dist/views/Collection/CollectionScripts.vue.d.ts +1 -1
  60. package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
  61. package/dist/views/Collection/CollectionServerForm.vue.js +39 -34
  62. package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
  63. package/dist/views/Collection/CollectionServers.vue2.js +58 -78
  64. package/dist/views/Collection/CollectionSync.vue.d.ts +1 -1
  65. package/dist/views/Cookies/CookieForm.vue.d.ts +1 -1
  66. package/dist/views/Cookies/CookieRaw.vue.d.ts +1 -1
  67. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  68. package/dist/views/Environment/Environment.vue2.js +208 -188
  69. package/dist/views/Environment/EnvironmentColors.vue.js +5 -5
  70. package/dist/views/Environment/EnvironmentModal.vue.js +21 -21
  71. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  72. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
  73. package/dist/views/Environment/handle-drag.d.ts +13 -0
  74. package/dist/views/Environment/handle-drag.d.ts.map +1 -0
  75. package/dist/views/Environment/handle-drag.js +32 -0
  76. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  77. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -88
  78. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  79. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +1 -0
  80. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  81. package/dist/views/Request/RequestSection/RequestParams.vue.js +62 -56
  82. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
  83. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  84. package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
  85. package/dist/views/Request/RequestSection/RequestSection.vue2.js +42 -47
  86. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  87. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  88. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
  89. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
  90. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +10 -10
  91. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
  92. package/dist/views/Request/libs/watch-mode.js +2 -2
  93. package/package.json +13 -13
@@ -1,11 +1,11 @@
1
- import { defineComponent as _, ref as u, computed as h, watch as w, openBlock as m, createBlock as v, unref as i, withCtx as a, createVNode as s, createElementVNode as p, normalizeClass as I, toDisplayString as N, createTextVNode as T } from "vue";
2
- import { ScalarModal as $, ScalarListbox as z, ScalarButton as C, ScalarIcon as B } from "@scalar/components";
3
- import { useToasts as D } from "@scalar/use-toasts";
4
- import U from "../../components/CommandPalette/CommandActionForm.vue.js";
5
- import W from "../../components/CommandPalette/CommandActionInput.vue.js";
6
- import j from "./EnvironmentColors.vue.js";
7
- import { useWorkspace as M } from "../../store/store.js";
8
- const P = { class: "flex items-start gap-2" }, K = /* @__PURE__ */ _({
1
+ import { defineComponent as _, ref as u, computed as h, watch as w, openBlock as m, createBlock as v, unref as i, withCtx as a, createVNode as s, createElementVNode as p, normalizeClass as I, toDisplayString as E, createTextVNode as N } from "vue";
2
+ import { ScalarModal as T, ScalarListbox as $, ScalarButton as C, ScalarIcon as z } from "@scalar/components";
3
+ import { useToasts as B } from "@scalar/use-toasts";
4
+ import D from "../../components/CommandPalette/CommandActionForm.vue.js";
5
+ import U from "../../components/CommandPalette/CommandActionInput.vue.js";
6
+ import W from "./EnvironmentColors.vue.js";
7
+ import { useWorkspace as j } from "../../store/store.js";
8
+ const M = { class: "flex items-start gap-2" }, K = /* @__PURE__ */ _({
9
9
  __name: "EnvironmentModal",
10
10
  props: {
11
11
  state: {},
@@ -14,7 +14,7 @@ const P = { class: "flex items-start gap-2" }, K = /* @__PURE__ */ _({
14
14
  },
15
15
  emits: ["cancel", "submit"],
16
16
  setup(x, { emit: g }) {
17
- const n = x, f = g, { events: E } = M(), r = u(""), c = u("#8E8E8E"), d = h(() => [
17
+ const n = x, f = g, { events: F } = j(), r = u(""), c = u("#FFFFFF"), d = h(() => [
18
18
  ...n.activeWorkspaceCollections.filter((t) => {
19
19
  var e;
20
20
  return ((e = t.info) == null ? void 0 : e.title) !== "Drafts";
@@ -27,13 +27,13 @@ const P = { class: "flex items-start gap-2" }, K = /* @__PURE__ */ _({
27
27
  })
28
28
  ]), l = u(
29
29
  d.value.find((t) => t.id === n.collectionId)
30
- ), { toast: S } = D(), V = (t) => {
30
+ ), { toast: S } = B(), V = (t) => {
31
31
  c.value = t;
32
32
  };
33
33
  w(
34
34
  () => n.state.open,
35
35
  (t) => {
36
- t && (r.value = "", c.value = "#8E8E8E", n.collectionId ? l.value = d.value.find(
36
+ t && (r.value = "", c.value = "#FFFFFF", n.collectionId ? l.value = d.value.find(
37
37
  (e) => e.id === n.collectionId
38
38
  ) : l.value = void 0);
39
39
  }
@@ -51,21 +51,21 @@ const P = { class: "flex items-start gap-2" }, K = /* @__PURE__ */ _({
51
51
  collectionId: ((o = l.value) == null ? void 0 : o.id) !== "global" ? (b = l.value) == null ? void 0 : b.id : void 0
52
52
  });
53
53
  }, y = () => {
54
- n.state.hide(), E.commandPalette.emit({ commandName: "Create Collection" });
54
+ n.state.hide(), F.commandPalette.emit({ commandName: "Create Collection" });
55
55
  };
56
- return (t, e) => (m(), v(i($), {
56
+ return (t, e) => (m(), v(i(T), {
57
57
  bodyClass: "border-t-0 rounded-t-lg",
58
58
  size: "xs",
59
59
  state: t.state
60
60
  }, {
61
61
  default: a(() => [
62
- s(U, {
62
+ s(D, {
63
63
  disabled: !l.value,
64
64
  onCancel: e[2] || (e[2] = (o) => f("cancel")),
65
65
  onSubmit: k
66
66
  }, {
67
67
  options: a(() => [
68
- s(i(z), {
68
+ s(i($), {
69
69
  modelValue: l.value,
70
70
  "onUpdate:modelValue": e[1] || (e[1] = (o) => l.value = o),
71
71
  options: d.value,
@@ -80,8 +80,8 @@ const P = { class: "flex items-start gap-2" }, K = /* @__PURE__ */ _({
80
80
  default: a(() => [
81
81
  p("span", {
82
82
  class: I(l.value ? "text-c-1" : "text-c-3")
83
- }, N(l.value ? l.value.label : "Select Collection"), 3),
84
- s(i(B), {
83
+ }, E(l.value ? l.value.label : "Select Collection"), 3),
84
+ s(i(z), {
85
85
  class: "text-c-3",
86
86
  icon: "ChevronDown",
87
87
  size: "xs"
@@ -104,17 +104,17 @@ const P = { class: "flex items-start gap-2" }, K = /* @__PURE__ */ _({
104
104
  }, 8, ["modelValue", "options"])
105
105
  ]),
106
106
  submit: a(() => e[4] || (e[4] = [
107
- T(" Add Environment ")
107
+ N(" Add Environment ")
108
108
  ])),
109
109
  default: a(() => [
110
- p("div", P, [
111
- s(j, {
110
+ p("div", M, [
111
+ s(W, {
112
112
  activeColor: c.value,
113
113
  class: "peer",
114
114
  selector: "",
115
115
  onSelect: V
116
116
  }, null, 8, ["activeColor"]),
117
- s(W, {
117
+ s(U, {
118
118
  modelValue: r.value,
119
119
  "onUpdate:modelValue": e[0] || (e[0] = (o) => r.value = o),
120
120
  class: "-mt-[.5px] !p-0 peer-has-[.color-selector]:hidden",
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAOzE,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAInE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;IAE1B,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCA0DiC,IAAI,GAAG,MAAM;;;;;;;AAuPhD,wBAQG"}
1
+ {"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAOzE,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAInE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;IAE1B,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCA0DiC,IAAI,GAAG,MAAM;;;;;;;AAyPhD,wBAQG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as R, ref as m, computed as h, onMounted as I, openBlock as r, createBlock as v, unref as l, withCtx as y, createElementVNode as c, normalizeStyle as x, createElementBlock as u, Fragment as P, renderList as T, normalizeClass as j, createTextVNode as b, toDisplayString as k, createVNode as q, createCommentVNode as g } from "vue";
1
+ import { defineComponent as R, ref as m, computed as w, onMounted as I, openBlock as r, createBlock as v, unref as l, withCtx as y, createElementVNode as c, normalizeStyle as x, createElementBlock as u, Fragment as P, renderList as T, normalizeClass as j, createTextVNode as b, toDisplayString as k, createVNode as q, createCommentVNode as g } from "vue";
2
2
  import { ScalarTeleport as D, ScalarIcon as V, ScalarButton as F } from "@scalar/components";
3
3
  import { onClickOutside as K } from "@vueuse/core";
4
4
  import O from "fuse.js";
@@ -8,7 +8,7 @@ import { parseEnvVariables as _ } from "../../libs/environment-parser.js";
8
8
  const M = {
9
9
  key: 0,
10
10
  class: "gap-1/2 flex flex-col"
11
- }, Q = ["onClick"], $ = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis whitespace-nowrap text-right" }, ne = /* @__PURE__ */ R({
11
+ }, Q = ["onClick"], $ = { class: "flex items-center gap-2 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis whitespace-nowrap text-right" }, ne = /* @__PURE__ */ R({
12
12
  __name: "EnvironmentVariableDropdown",
13
13
  props: {
14
14
  query: {},
@@ -30,13 +30,13 @@ const M = {
30
30
  }), d.value = !1;
31
31
  }, B = new O(_(s.envVariables), {
32
32
  keys: ["key", "value"]
33
- }), i = h(() => {
33
+ }), i = w(() => {
34
34
  const t = s.query;
35
35
  if (!t)
36
36
  return _(s.envVariables).slice(-4).filter(({ key: e, value: a }) => e !== "" || a !== "");
37
37
  const o = B.search(t, { limit: 10 });
38
38
  return o.length > 0 ? o.map((e) => e.item).filter(({ key: e, value: a }) => e !== "" || a !== "") : [];
39
- }), w = (t) => {
39
+ }), h = (t) => {
40
40
  z("select", t);
41
41
  };
42
42
  S({
@@ -47,13 +47,13 @@ const M = {
47
47
  handleSelect: () => {
48
48
  if (n.value >= 0) {
49
49
  const t = i.value[n.value];
50
- t && w(t.key);
50
+ t && h(t.key);
51
51
  }
52
52
  }
53
53
  }), I(() => {
54
54
  n.value = 0;
55
55
  });
56
- const N = h(() => {
56
+ const N = w(() => {
57
57
  var t, o;
58
58
  return {
59
59
  left: (((t = s.dropdownPosition) == null ? void 0 : t.left) ?? 0) + "px",
@@ -82,18 +82,18 @@ const M = {
82
82
  (r(!0), u(P, null, T(i.value, (e, a) => (r(), u("li", {
83
83
  key: e.key,
84
84
  class: j(["font-code text-xxs hover:bg-b-2 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": a === n.value }]),
85
- onClick: (W) => w(e.key)
85
+ onClick: (W) => h(e.key)
86
86
  }, [
87
87
  c("div", $, [
88
88
  e.source === "collection" ? (r(), u("span", {
89
89
  key: 0,
90
- class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
90
+ class: "h-2.25 w-2.25 min-w-2.25 rounded-full",
91
91
  style: x({
92
92
  backgroundColor: l(L)(t.environment)
93
93
  })
94
94
  }, null, 4)) : (r(), v(l(V), {
95
95
  key: 1,
96
- class: "w-2.5",
96
+ class: "-ml-1/2 h-2.5 w-2.5",
97
97
  icon: "Globe"
98
98
  })),
99
99
  b(" " + k(e.key), 1)
@@ -0,0 +1,13 @@
1
+ import type { ActiveEntitiesStore } from '../../store/active-entities';
2
+ import type { DraggingItem, HoveredItem } from '@scalar/draggable';
3
+ import type { Collection } from '@scalar/oas-utils/entities/spec';
4
+ type CollectionMutator = {
5
+ edit: (uid: Collection['uid'], path: 'x-scalar-environments', value: Collection['x-scalar-environments']) => void;
6
+ };
7
+ /** Create environment DnD handlers */
8
+ export declare function environmentDragHandlerFactory(activeWorkspaceCollections: ActiveEntitiesStore['activeWorkspaceCollections'], collectionMutator: CollectionMutator): {
9
+ handleDragEnd: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => void;
10
+ isDroppable: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => boolean;
11
+ };
12
+ export {};
13
+ //# sourceMappingURL=handle-drag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-drag.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/handle-drag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEjE,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,UAAU,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;CAClH,CAAA;AAED,sCAAsC;AACtC,wBAAgB,6BAA6B,CAC3C,0BAA0B,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,EAC7E,iBAAiB,EAAE,iBAAiB;kCAGC,YAAY,eAAe,WAAW;gCAiDxC,YAAY,eAAe,WAAW;EAQ1E"}
@@ -0,0 +1,32 @@
1
+ function U(l, v) {
2
+ return {
3
+ handleDragEnd: (t, d) => {
4
+ if (!t || !d)
5
+ return;
6
+ const { id: s, parentId: i } = t, { id: x, parentId: p, offset: u } = d;
7
+ if (i !== p)
8
+ return;
9
+ const e = l.value.find((n) => n.uid === i);
10
+ if (!e || !e["x-scalar-environments"])
11
+ return;
12
+ const o = e["x-scalar-environments"], r = Object.keys(o);
13
+ ({ ...o });
14
+ const f = r.findIndex((n) => n === s);
15
+ r.splice(f, 1);
16
+ const g = r.findIndex((n) => n === x) + (u === 1 ? 1 : 0);
17
+ r.splice(g, 0, s);
18
+ const I = r.reduce(
19
+ (n, a) => {
20
+ const c = o[a];
21
+ return c && (n[a] = c), n;
22
+ },
23
+ {}
24
+ );
25
+ e["x-scalar-environments"] = I, v.edit(e.uid, "x-scalar-environments", e["x-scalar-environments"]);
26
+ },
27
+ isDroppable: (t, d) => t.parentId === d.parentId
28
+ };
29
+ }
30
+ export {
31
+ U as environmentDragHandlerFactory
32
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAqGA,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;;AAsPF,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;;AAoSF,wBAOG"}
@@ -1,111 +1,134 @@
1
- import { defineComponent as C, computed as x, openBlock as f, createBlock as w, unref as t, withCtx as a, createElementVNode as i, createVNode as n, normalizeClass as b, toDisplayString as m, createElementBlock as v, Fragment as y, 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
- import S from "../../../../components/DataTable/DataTableCell.vue.js";
5
- import T from "../../../../components/DataTable/DataTableRow.vue.js";
6
- import j from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
- const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
1
+ import { defineComponent as j, computed as k, resolveComponent as N, openBlock as u, createBlock as h, unref as o, withCtx as c, createElementVNode as n, createVNode as a, normalizeClass as z, toDisplayString as m, withModifiers as A, createTextVNode as C, createCommentVNode 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";
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 = {
8
8
  class: "grid auto-rows-auto",
9
9
  style: { gridTemplateColumns: "1fr auto" }
10
- }, I = { key: 0 }, R = { class: "font-code text-xs" }, H = /* @__PURE__ */ C({
10
+ }, J = { key: 0 }, K = { class: "font-code text-xs" }, te = /* @__PURE__ */ j({
11
11
  __name: "OAuthScopesInput",
12
12
  props: {
13
13
  flow: {},
14
14
  updateScheme: { type: Function }
15
15
  },
16
- setup(o) {
17
- const g = x(
16
+ setup(t) {
17
+ const $ = k(
18
18
  () => {
19
19
  var e;
20
- return Object.entries(((e = o.flow) == null ? void 0 : e.scopes) ?? {}).map(([l, s]) => ({
20
+ return Object.entries(((e = t.flow) == null ? void 0 : e.scopes) ?? {}).map(([l, r]) => ({
21
21
  id: l,
22
22
  label: l,
23
- description: s
23
+ description: r
24
24
  }));
25
25
  }
26
- ), u = x(() => {
26
+ ), d = k(() => {
27
27
  var e;
28
- return ((e = o.flow) == null ? void 0 : e.selectedScopes) || [];
28
+ return ((e = t.flow) == null ? void 0 : e.selectedScopes) || [];
29
29
  });
30
- function _(e, l) {
31
- l ? o.updateScheme(`flows.${o.flow.type}.selectedScopes`, [
32
- ...u.value,
30
+ function O(e, l) {
31
+ l ? t.updateScheme(`flows.${t.flow.type}.selectedScopes`, [
32
+ ...d.value,
33
33
  e
34
- ]) : o.updateScheme(
35
- `flows.${o.flow.type}.selectedScopes`,
36
- u.value.filter((s) => s !== e)
34
+ ]) : t.updateScheme(
35
+ `flows.${t.flow.type}.selectedScopes`,
36
+ d.value.filter((r) => r !== e)
37
37
  );
38
38
  }
39
- return (e, l) => (f(), w(t(S), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
40
- default: a(() => [
41
- i("div", z, [
42
- l[0] || (l[0] = i("div", { class: "text-c-1 h-full items-center" }, null, -1)),
43
- n(t($), {
44
- as: "div",
45
- class: "bl flex w-full flex-col"
46
- }, {
47
- default: a(() => {
48
- var s, h;
49
- return [
50
- n(t(B), {
51
- class: b([
52
- "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",
53
- (((h = (s = e.flow) == null ? void 0 : s.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
54
- ])
55
- }, {
56
- default: a(({ open: c }) => {
57
- var d, r, p;
58
- return [
59
- i("div", E, " Scopes Selected " + m(((r = (d = e.flow) == null ? void 0 : d.selectedScopes) == null ? void 0 : r.length) || 0) + " / " + m(Object.keys(((p = e.flow) == null ? void 0 : p.scopes) ?? {}).length || 0), 1),
60
- n(t(O), {
61
- class: "text-c-3 group-hover/scopes-accordion:text-c-2",
62
- icon: c ? "ChevronDown" : "ChevronRight",
63
- size: "md"
64
- }, null, 8, ["icon"])
65
- ];
66
- }),
67
- _: 1
68
- }, 8, ["class"]),
69
- n(t(N), { as: "template" }, {
70
- default: a(() => [
71
- i("table", F, [
72
- (f(!0), v(y, null, k(g.value, ({ id: c, label: d, description: r }) => (f(), w(t(T), {
73
- key: c,
74
- class: "text-c-2",
75
- onClick: (p) => _(c, !u.value.includes(c))
76
- }, {
77
- default: a(() => [
78
- n(t(S), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
79
- default: a(() => [
80
- r ? (f(), v("div", I, [
81
- i("span", R, m(d), 1),
82
- V(" – " + m(r), 1)
83
- ])) : D("", !0)
84
- ]),
85
- _: 2
86
- }, 1024),
87
- n(t(j), {
88
- modelValue: u.value.includes(c),
89
- "onUpdate:modelValue": () => {
90
- }
91
- }, null, 8, ["modelValue"])
92
- ]),
93
- _: 2
94
- }, 1032, ["onClick"]))), 128))
39
+ function _() {
40
+ var e;
41
+ t.updateScheme(
42
+ `flows.${t.flow.type}.selectedScopes`,
43
+ Object.keys(((e = t.flow) == null ? void 0 : e.scopes) ?? {})
44
+ );
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"
95
63
  ])
96
- ]),
97
- _: 1
98
- })
99
- ];
100
- }),
101
- _: 1
102
- })
103
- ])
104
- ]),
105
- _: 1
106
- }));
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
+ C(" Select All ")
78
+ ])),
79
+ _: 1
80
+ })) : V("", !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))
98
+ }, {
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
+ C(" – " + m(i), 1)
105
+ ])) : V("", !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))
117
+ ])
118
+ ]),
119
+ _: 1
120
+ })
121
+ ];
122
+ }),
123
+ _: 1
124
+ })
125
+ ])
126
+ ]),
127
+ _: 1
128
+ });
129
+ };
107
130
  }
108
131
  });
109
132
  export {
110
- H as default
133
+ te as default
111
134
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/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;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,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;;;;;;;;;;;cA5JN,OAAO;cAEP,OAAO;6EAmKpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAepG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/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;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,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;;;;;;;;;;;cA5JN,OAAO;cAEP,OAAO;6EAmKpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAepG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -22,6 +22,7 @@ const v = ["for"], k = /* @__PURE__ */ p({
22
22
  }, o.$attrs, {
23
23
  envVariables: e.envVariables,
24
24
  environment: e.environment,
25
+ lineWrapping: "",
25
26
  modelValue: e.modelValue,
26
27
  readOnly: e.readOnly,
27
28
  required: e.required,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAyPA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAC;;AA8WF,wBAOG"}
1
+ {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAkQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAC;;AAuXF,wBAOG"}