@scalar/api-client 2.2.35 → 2.2.37

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 (78) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue2.js +18 -18
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -0
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue2.js +114 -108
  8. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +1 -0
  9. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/CommandActionInput.vue.js +21 -18
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  13. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +2 -2
  14. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  15. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  16. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  17. package/dist/components/DataTable/DataTableInputSelect.vue.js +43 -43
  18. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  19. package/dist/components/Form/Form.vue.js +3 -3
  20. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  21. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  22. package/dist/components/TopNav/TopNav.vue.js +27 -27
  23. package/dist/layouts/App/create-api-client-app.d.ts +4 -58
  24. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  25. package/dist/layouts/Modal/create-api-client-modal.d.ts +8 -116
  26. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  27. package/dist/layouts/Web/create-api-client-web.d.ts +4 -58
  28. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  29. package/dist/libs/create-client.d.ts +4 -58
  30. package/dist/libs/create-client.d.ts.map +1 -1
  31. package/dist/libs/index.js +18 -19
  32. package/dist/libs/send-request/index.js +3 -4
  33. package/dist/libs/send-request/send-request.d.ts +0 -14
  34. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  35. package/dist/libs/send-request/send-request.js +120 -142
  36. package/dist/libs/send-request/set-request-cookies.d.ts +27 -0
  37. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -0
  38. package/dist/libs/send-request/set-request-cookies.js +54 -0
  39. package/dist/store/active-entities.d.ts.map +1 -1
  40. package/dist/store/active-entities.js +15 -12
  41. package/dist/store/cookies.d.ts +4 -58
  42. package/dist/store/cookies.d.ts.map +1 -1
  43. package/dist/store/cookies.js +5 -17
  44. package/dist/store/store.d.ts +4 -58
  45. package/dist/store/store.d.ts.map +1 -1
  46. package/dist/style.css +1 -1
  47. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  48. package/dist/views/Cookies/CookieForm.vue.js +24 -37
  49. package/dist/views/Cookies/CookieModal.vue.d.ts +21 -0
  50. package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -0
  51. package/dist/views/Cookies/CookieModal.vue.js +7 -0
  52. package/dist/views/Cookies/CookieModal.vue2.js +88 -0
  53. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  54. package/dist/views/Cookies/Cookies.vue2.js +98 -119
  55. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  56. package/dist/views/Request/RequestSection/RequestBody.vue2.js +34 -34
  57. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
  58. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  59. package/dist/views/Request/RequestSection/RequestParams.vue.js +79 -66
  60. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  61. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  62. package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -64
  63. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +9 -2
  64. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  65. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  66. package/dist/views/Request/RequestSection/RequestTable.vue2.js +168 -130
  67. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  68. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +5 -64
  69. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +46 -2
  70. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +19 -17
  71. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  72. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +31 -31
  73. package/dist/views/Request/libs/request.d.ts +12 -0
  74. package/dist/views/Request/libs/request.d.ts.map +1 -0
  75. package/dist/views/Request/libs/request.js +4 -0
  76. package/package.json +11 -13
  77. package/dist/views/Cookies/CookieRaw.vue.js +0 -28
  78. package/dist/views/Cookies/CookieRaw.vue2.js +0 -4
@@ -1,28 +1,29 @@
1
- import { defineComponent as b, computed as A, ref as V, watch as w, openBlock as d, createBlock as C, unref as o, withCtx as x, createElementVNode as g, createElementBlock as v, createCommentVNode as R, toDisplayString as H, createVNode as s, withDirectives as i, vShow as r } from "vue";
2
- import N from "../../../components/ContextBar.vue.js";
3
- import E from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
- import { useActiveEntities as K } from "../../../store/active-entities.js";
5
- import U from "./RequestBody.vue.js";
6
- import h from "./RequestParams.vue.js";
7
- import Q from "./RequestPathParams.vue.js";
8
- import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
9
- import $ from "./RequestAuth/RequestAuth.vue.js";
10
- import { useWorkspace as D } from "../../../store/store.js";
11
- const M = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, z = {
1
+ import { defineComponent as R, computed as f, ref as E, watch as H, openBlock as d, createBlock as K, unref as o, withCtx as x, createElementVNode as g, createElementBlock as h, createCommentVNode as N, toDisplayString as D, createVNode as r, withDirectives as u, vShow as n } from "vue";
2
+ import U from "../../../components/ContextBar.vue.js";
3
+ import O from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
4
+ import { matchesDomain as Q } from "../../../libs/send-request/set-request-cookies.js";
5
+ import { useActiveEntities as W } from "../../../store/active-entities.js";
6
+ import $ from "./RequestBody.vue.js";
7
+ import y from "./RequestParams.vue.js";
8
+ import M from "./RequestPathParams.vue.js";
9
+ import { canMethodHaveBody as _, isDefined as P } from "@scalar/oas-utils/helpers";
10
+ import z from "./RequestAuth/RequestAuth.vue.js";
11
+ import { useWorkspace as I } from "../../../store/store.js";
12
+ const L = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, j = {
12
13
  key: 0,
13
14
  class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
14
15
  for: "requestname"
15
- }, I = ["value"], L = {
16
+ }, F = ["value"], G = {
16
17
  key: 2,
17
18
  class: "flex items-center text-c-1 h-8"
18
- }, O = { class: "request-section-content custom-scroll flex flex-1 flex-col" }, te = /* @__PURE__ */ b({
19
+ }, J = { class: "request-section-content custom-scroll flex flex-1 flex-col" }, ue = /* @__PURE__ */ R({
19
20
  __name: "RequestSection",
20
21
  props: {
21
22
  selectedSecuritySchemeUids: {}
22
23
  },
23
- setup(P) {
24
- const { activeRequest: l, activeExample: y } = K(), { isReadOnly: p, requestMutators: k } = D(), q = A(() => {
25
- var a, u;
24
+ setup(T) {
25
+ const { activeRequest: a, activeExample: k, activeWorkspace: q, activeServer: p } = W(), { isReadOnly: v, requestMutators: B, cookies: b } = I(), w = f(() => {
26
+ var e, s;
26
27
  const t = /* @__PURE__ */ new Set([
27
28
  "All",
28
29
  "Query",
@@ -32,91 +33,116 @@ const M = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
32
33
  "Headers",
33
34
  "Body"
34
35
  ]);
35
- return (a = y.value) != null && a.parameters.path.length || t.delete("Variables"), f(((u = l.value) == null ? void 0 : u.method) ?? "get") || t.delete("Body"), _.value && t.delete("Auth"), [...t];
36
- }), _ = A(
36
+ return (e = k.value) != null && e.parameters.path.length || t.delete("Variables"), _(((s = a.value) == null ? void 0 : s.method) ?? "get") || t.delete("Body"), S.value && t.delete("Auth"), [...t];
37
+ }), S = f(
37
38
  () => {
38
- var t, a;
39
- return p && ((a = (t = l.value) == null ? void 0 : t.security) == null ? void 0 : a.length) === 0;
39
+ var t, e;
40
+ return v && ((e = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : e.length) === 0;
40
41
  }
41
- ), e = V("All");
42
- w(l, (t) => {
43
- e.value === "Body" && t && !f(t.method) && (e.value = "All");
42
+ ), l = E("All");
43
+ H(a, (t) => {
44
+ l.value === "Body" && t && !_(t.method) && (l.value = "All");
44
45
  });
45
- const B = (t) => {
46
- if (!l.value) return;
47
- const a = t.target;
48
- k.edit(l.value.uid, "summary", a.value);
49
- };
50
- return (t, a) => {
51
- var u;
52
- return d(), C(E, {
53
- "aria-label": `Request: ${(u = o(l)) == null ? void 0 : u.summary}`
46
+ const C = (t) => {
47
+ if (!a.value) return;
48
+ const e = t.target;
49
+ B.edit(a.value.uid, "summary", e.value);
50
+ }, V = f(
51
+ () => {
52
+ var t;
53
+ return (((t = q.value) == null ? void 0 : t.cookies) ?? []).map((e) => b[e]).filter(P).filter((e) => e.name).filter(
54
+ (e) => {
55
+ var s, i;
56
+ return Q(
57
+ ((s = p == null ? void 0 : p.value) == null ? void 0 : s.url) || ((i = a.value) == null ? void 0 : i.path),
58
+ e.domain
59
+ );
60
+ }
61
+ ).map((e) => ({
62
+ key: e.name,
63
+ value: e.value,
64
+ route: {
65
+ name: "cookies",
66
+ params: {
67
+ cookies: e.uid
68
+ }
69
+ },
70
+ enabled: !0
71
+ }));
72
+ }
73
+ );
74
+ return (t, e) => {
75
+ var s;
76
+ return d(), K(O, {
77
+ "aria-label": `Request: ${(s = o(a)) == null ? void 0 : s.summary}`
54
78
  }, {
55
79
  title: x(() => {
56
- var n, c;
80
+ var i, c;
57
81
  return [
58
- g("div", M, [
59
- o(p) ? R("", !0) : (d(), v("label", z)),
60
- o(p) ? (d(), v("span", L, H((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
82
+ g("div", L, [
83
+ o(v) ? N("", !0) : (d(), h("label", j)),
84
+ o(v) ? (d(), h("span", G, D((c = o(a)) == null ? void 0 : c.summary), 1)) : (d(), h("input", {
61
85
  key: 1,
62
86
  id: "requestname",
63
- class: "text-c-1 rounded pointer-events-auto relative w-full pl-1.25 -ml-0.5 md:-ml-1.25 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline z-10",
87
+ class: "text-c-1 rounded pointer-events-auto relative w-full pl-1.25 -ml-0.5 md:-ml-1.25 h-8 group-hover-input has-[:focus-visible]:outline z-10",
64
88
  placeholder: "Request Name",
65
- value: (n = o(l)) == null ? void 0 : n.summary,
66
- onInput: B
67
- }, null, 40, I))
89
+ value: (i = o(a)) == null ? void 0 : i.summary,
90
+ onInput: C
91
+ }, null, 40, F))
68
92
  ]),
69
- s(N, {
70
- activeSection: e.value,
71
- sections: q.value,
72
- onSetActiveSection: a[0] || (a[0] = (m) => e.value = m)
93
+ r(U, {
94
+ activeSection: l.value,
95
+ sections: w.value,
96
+ onSetActiveSection: e[0] || (e[0] = (m) => l.value = m)
73
97
  }, null, 8, ["activeSection", "sections"])
74
98
  ];
75
99
  }),
76
100
  default: x(() => {
77
- var n, c, m, S;
101
+ var i, c, m, A;
78
102
  return [
79
- g("div", O, [
80
- i(s($, {
103
+ g("div", J, [
104
+ u(r(z, {
81
105
  selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
82
106
  title: "Authentication"
83
107
  }, null, 8, ["selectedSecuritySchemeUids"]), [
84
108
  [
85
- r,
86
- !_.value && (e.value === "All" || e.value === "Auth")
109
+ n,
110
+ !S.value && (l.value === "All" || l.value === "Auth")
87
111
  ]
88
112
  ]),
89
- i(s(Q, {
113
+ u(r(M, {
90
114
  paramKey: "path",
91
115
  title: "Variables"
92
116
  }, null, 512), [
93
117
  [
94
- r,
95
- (e.value === "All" || e.value === "Variables") && ((m = (c = (n = o(y)) == null ? void 0 : n.parameters) == null ? void 0 : c.path) == null ? void 0 : m.length)
118
+ n,
119
+ (l.value === "All" || l.value === "Variables") && ((m = (c = (i = o(k)) == null ? void 0 : i.parameters) == null ? void 0 : c.path) == null ? void 0 : m.length)
96
120
  ]
97
121
  ]),
98
- i(s(h, {
122
+ u(r(y, {
99
123
  paramKey: "cookies",
100
- title: "Cookies"
101
- }, null, 512), [
102
- [r, e.value === "All" || e.value === "Cookies"]
124
+ readOnlyEntries: V.value,
125
+ title: "Cookies",
126
+ workspaceParamKey: "cookies"
127
+ }, null, 8, ["readOnlyEntries"]), [
128
+ [n, l.value === "All" || l.value === "Cookies"]
103
129
  ]),
104
- i(s(h, {
130
+ u(r(y, {
105
131
  paramKey: "headers",
106
132
  title: "Headers"
107
133
  }, null, 512), [
108
- [r, e.value === "All" || e.value === "Headers"]
134
+ [n, l.value === "All" || l.value === "Headers"]
109
135
  ]),
110
- i(s(h, {
136
+ u(r(y, {
111
137
  paramKey: "query",
112
138
  title: "Query Parameters"
113
139
  }, null, 512), [
114
- [r, e.value === "All" || e.value === "Query"]
140
+ [n, l.value === "All" || l.value === "Query"]
115
141
  ]),
116
- i(s(U, { title: "Body" }, null, 512), [
142
+ u(r($, { title: "Body" }, null, 512), [
117
143
  [
118
- r,
119
- ((S = o(l)) == null ? void 0 : S.method) && (e.value === "All" || e.value === "Body") && o(f)(o(l).method)
144
+ n,
145
+ ((A = o(a)) == null ? void 0 : A.method) && (l.value === "All" || l.value === "Body") && o(_)(o(a).method)
120
146
  ]
121
147
  ])
122
148
  ])
@@ -128,5 +154,5 @@ const M = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
128
154
  }
129
155
  });
130
156
  export {
131
- te as default
157
+ ue as default
132
158
  };
@@ -1,9 +1,14 @@
1
1
  import type { RequestExampleParameter } from '@scalar/oas-utils/entities/spec';
2
+ import type { RouteLocationRaw } from 'vue-router';
2
3
  type __VLS_Props = {
3
- items?: RequestExampleParameter[];
4
- /** Disable the checkbox */
4
+ items?: (RequestExampleParameter & {
5
+ route?: RouteLocationRaw;
6
+ })[];
7
+ /** Hide the enabled column */
5
8
  hasCheckboxDisabled?: boolean;
6
9
  showUploadButton?: boolean;
10
+ isGlobal?: boolean;
11
+ isReadOnly?: boolean;
7
12
  };
8
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
14
  updateRow: (idx: number, field: "key" | "value", value: string) => any;
@@ -24,8 +29,10 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
24
29
  onUploadFile?: ((idx: number) => any) | undefined;
25
30
  onRemoveFile?: ((idx: number) => any) | undefined;
26
31
  }>, {
32
+ isReadOnly: boolean;
27
33
  hasCheckboxDisabled: boolean;
28
34
  showUploadButton: boolean;
35
+ isGlobal: boolean;
29
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
30
37
  export default _default;
31
38
  //# sourceMappingURL=RequestTable.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAiNA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAO9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACjC,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;;;;;;;;;;;;;;yBAFsB,OAAO;sBACV,OAAO;;AA4a9B,wBASG"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAsPA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAOlD,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,CAAC,uBAAuB,GAAG;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC,EAAE,CAAA;IAClE,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;;;;;;;;;;;;;;;;;;;;gBADa,OAAO;yBAHE,OAAO;sBACV,OAAO;cACf,OAAO;;AAkftB,wBASG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d205bf31"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-674f4786"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,25 +1,28 @@
1
- import { defineComponent as C, openBlock as r, createBlock as i, withCtx as u, createElementBlock as b, Fragment as v, renderList as F, createElementVNode as s, createVNode as d, normalizeClass as R, createSlots as $, createCommentVNode as y, createTextVNode as S, toDisplayString as k, unref as V, computed as U } from "vue";
2
- import w from "../../../components/CodeInput/CodeInput.vue.js";
3
- import T from "../../../components/DataTable/DataTable.vue.js";
4
- import p from "../../../components/DataTable/DataTableCell.vue.js";
5
- import D from "../../../components/DataTable/DataTableCheckbox.vue.js";
6
- import E from "../../../components/DataTable/DataTableRow.vue.js";
7
- import { ScalarButton as N, ScalarIcon as q } from "@scalar/components";
8
- import I from "./RequestTableTooltip.vue.js";
9
- const z = { class: "contents" }, A = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, M = ["onClick"], W = /* @__PURE__ */ C({
1
+ import { defineComponent as F, resolveComponent as S, openBlock as r, createBlock as i, withCtx as t, createElementBlock as c, Fragment as f, renderList as $, createElementVNode as s, createVNode as d, unref as p, toDisplayString as b, normalizeClass as U, createSlots as T, createCommentVNode as w, createTextVNode as z, computed as D } from "vue";
2
+ import x from "../../../components/CodeInput/CodeInput.vue.js";
3
+ import q from "../../../components/DataTable/DataTable.vue.js";
4
+ import y from "../../../components/DataTable/DataTableCell.vue.js";
5
+ import E from "../../../components/DataTable/DataTableCheckbox.vue.js";
6
+ import G from "../../../components/DataTable/DataTableRow.vue.js";
7
+ import { ScalarTooltip as I, ScalarIcon as V, ScalarButton as N } from "@scalar/components";
8
+ import { hasItemProperties as g } from "../libs/request.js";
9
+ import O from "./RequestTableTooltip.vue.js";
10
+ const L = { class: "contents" }, j = { class: "sr-only" }, A = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, M = ["onClick"], le = /* @__PURE__ */ F({
10
11
  __name: "RequestTable",
11
12
  props: {
12
13
  items: {},
13
14
  hasCheckboxDisabled: { type: Boolean, default: !1 },
14
- showUploadButton: { type: Boolean, default: !1 }
15
+ showUploadButton: { type: Boolean, default: !1 },
16
+ isGlobal: { type: Boolean, default: !1 },
17
+ isReadOnly: { type: Boolean, default: !1 }
15
18
  },
16
19
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
17
- setup(O, { emit: x }) {
18
- const n = x, _ = ["", "", "36px"], m = (e, o, l) => {
19
- n("updateRow", e, o, l);
20
- }, g = (e) => {
20
+ setup(K, { emit: R }) {
21
+ const n = R, B = ["", "", "36px"], v = (e, o, m) => {
22
+ n("updateRow", e, o, m);
23
+ }, h = (e) => {
21
24
  n("uploadFile", e);
22
- }, c = (e) => !!(e.description || e.type || e.default || e.format), f = (e) => U(() => {
25
+ }, k = (e) => D(() => {
23
26
  if (e.type === "integer" && e.value !== void 0) {
24
27
  const o = Number(e.value);
25
28
  if (e.minimum !== void 0 && o < e.minimum)
@@ -28,127 +31,162 @@ const z = { class: "contents" }, A = { class: "text-c-2 max-w-[100%] overflow-hi
28
31
  return `Max is ${e.maximum}`;
29
32
  }
30
33
  return !1;
31
- }), B = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
32
- return (e, o) => (r(), i(T, {
33
- class: "flex-1",
34
- columns: _
35
- }, {
36
- default: u(() => [
37
- (r(!0), b(v, null, F(e.items, (l, t) => (r(), i(E, { key: t }, {
38
- default: u(() => [
39
- s("label", z, [
40
- o[4] || (o[4] = s("span", { class: "sr-only" }, "Row Enabled", -1)),
41
- d(D, {
42
- class: "!border-r-1/2",
43
- disabled: e.hasCheckboxDisabled,
44
- modelValue: l.enabled,
45
- "onUpdate:modelValue": (a) => n("toggleRow", t, a)
46
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])
47
- ]),
48
- d(p, null, {
49
- default: u(() => [
50
- d(w, {
51
- disableCloseBrackets: "",
52
- disableEnter: "",
53
- disableTabIndent: "",
54
- modelValue: l.key,
55
- placeholder: "Key",
56
- required: l.required,
57
- onBlur: o[0] || (o[0] = (a) => n("inputBlur")),
58
- onFocus: o[1] || (o[1] = (a) => n("inputFocus")),
59
- onSelectVariable: (a) => m(t, "key", a),
60
- "onUpdate:modelValue": (a) => n("updateRow", t, "key", a)
61
- }, null, 8, ["modelValue", "required", "onSelectVariable", "onUpdate:modelValue"])
62
- ]),
63
- _: 2
64
- }, 1024),
65
- d(p, null, {
66
- default: u(() => [
67
- d(w, {
68
- class: R({
69
- "pr-6": c(l)
70
- }),
71
- default: l.default,
72
- disableCloseBrackets: "",
73
- disableEnter: "",
74
- disableTabIndent: "",
75
- enum: l.enum,
76
- max: l.maximum,
77
- min: l.minimum,
78
- modelValue: l.value,
79
- nullable: l.nullable,
80
- placeholder: "Value",
81
- type: l.type,
82
- onBlur: o[2] || (o[2] = (a) => n("inputBlur")),
83
- onFocus: o[3] || (o[3] = (a) => n("inputFocus")),
84
- onSelectVariable: (a) => m(t, "value", a),
85
- "onUpdate:modelValue": (a) => n("updateRow", t, "value", a)
86
- }, $({
87
- icon: u(() => [
88
- c(l) ? (r(), i(I, {
89
- key: 0,
90
- item: { ...l, default: B(l) }
91
- }, null, 8, ["item"])) : y("", !0)
34
+ }), _ = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
35
+ return (e, o) => {
36
+ const m = S("RouterLink");
37
+ return r(), i(q, {
38
+ class: "flex-1",
39
+ columns: B
40
+ }, {
41
+ default: t(() => [
42
+ (r(!0), c(f, null, $(e.items, (l, u) => (r(), i(G, { key: u }, {
43
+ default: t(() => [
44
+ s("label", L, [
45
+ e.isGlobal ? (r(), i(m, {
46
+ key: 0,
47
+ class: "!border-r-1/2 border-t-1/2 text-c-2 flex justify-center items-center",
48
+ to: l.route ?? {}
49
+ }, {
50
+ default: t(() => [
51
+ o[5] || (o[5] = s("span", { class: "sr-only" }, "Global", -1)),
52
+ d(p(I), {
53
+ as: "div",
54
+ side: "top"
55
+ }, {
56
+ trigger: t(() => [
57
+ d(p(V), {
58
+ icon: "Globe",
59
+ size: "xs"
60
+ })
61
+ ]),
62
+ content: t(() => o[4] || (o[4] = [
63
+ s("div", { class: "grid gap-1.5 pointer-events-none max-w-[320px] w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
64
+ s("div", { class: "flex items-center text-c-2" }, [
65
+ s("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
66
+ ])
67
+ ], -1)
68
+ ])),
69
+ _: 1
70
+ })
92
71
  ]),
93
72
  _: 2
94
- }, [
95
- f(l).value ? {
96
- name: "warning",
97
- fn: u(() => [
98
- S(k(f(l).value), 1)
99
- ]),
100
- key: "0"
101
- } : void 0
102
- ]), 1032, ["class", "default", "enum", "max", "min", "modelValue", "nullable", "type", "onSelectVariable", "onUpdate:modelValue"])
73
+ }, 1032, ["to"])) : (r(), c(f, { key: 1 }, [
74
+ s("span", j, " Row " + b(l.enabled ? "Enabled" : "Disabled"), 1),
75
+ d(E, {
76
+ class: "!border-r-1/2",
77
+ disabled: e.hasCheckboxDisabled,
78
+ modelValue: l.enabled,
79
+ "onUpdate:modelValue": (a) => n("toggleRow", u, a)
80
+ }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])
81
+ ], 64))
103
82
  ]),
104
- _: 2
105
- }, 1024),
106
- e.showUploadButton ? (r(), i(p, {
107
- key: 0,
108
- class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
109
- }, {
110
- default: u(() => {
111
- var a;
112
- return [
113
- l.file ? (r(), b(v, { key: 0 }, [
114
- s("div", A, [
115
- s("span", null, k((a = l.file) == null ? void 0 : a.name), 1)
116
- ]),
117
- s("button", {
118
- class: "absolute bg-b-2 font-medium centered-x centered-y hidden rounded text-center p-0.5 w-[calc(100%_-_8px)] group-hover/upload:block text-xs",
119
- type: "button",
120
- onClick: (h) => n("removeFile", t)
121
- }, " Delete ", 8, M)
122
- ], 64)) : (r(), i(V(N), {
123
- key: 1,
124
- class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2 shadow-none",
125
- size: "sm",
126
- variant: "outlined",
127
- onClick: (h) => g(t)
128
- }, {
129
- default: u(() => [
130
- o[5] || (o[5] = s("span", null, "File", -1)),
131
- d(V(q), {
132
- class: "ml-1",
133
- icon: "UploadSimple",
134
- size: "xs",
135
- thickness: "2.5"
136
- })
83
+ d(y, null, {
84
+ default: t(() => [
85
+ d(x, {
86
+ disableCloseBrackets: "",
87
+ disabled: e.isReadOnly,
88
+ disableEnter: "",
89
+ disableTabIndent: "",
90
+ modelValue: l.key,
91
+ placeholder: "Key",
92
+ required: l.required,
93
+ onBlur: o[0] || (o[0] = (a) => n("inputBlur")),
94
+ onFocus: o[1] || (o[1] = (a) => n("inputFocus")),
95
+ onSelectVariable: (a) => v(u, "key", a),
96
+ "onUpdate:modelValue": (a) => n("updateRow", u, "key", a)
97
+ }, null, 8, ["disabled", "modelValue", "required", "onSelectVariable", "onUpdate:modelValue"])
98
+ ]),
99
+ _: 2
100
+ }, 1024),
101
+ d(y, null, {
102
+ default: t(() => [
103
+ d(x, {
104
+ class: U({
105
+ "pr-6": p(g)(l)
106
+ }),
107
+ default: l.default,
108
+ disableCloseBrackets: "",
109
+ disabled: e.isReadOnly,
110
+ disableEnter: "",
111
+ disableTabIndent: "",
112
+ enum: l.enum,
113
+ max: l.maximum,
114
+ min: l.minimum,
115
+ modelValue: l.value,
116
+ nullable: l.nullable,
117
+ placeholder: "Value",
118
+ type: l.type,
119
+ onBlur: o[2] || (o[2] = (a) => n("inputBlur")),
120
+ onFocus: o[3] || (o[3] = (a) => n("inputFocus")),
121
+ onSelectVariable: (a) => v(u, "value", a),
122
+ "onUpdate:modelValue": (a) => n("updateRow", u, "value", a)
123
+ }, T({
124
+ icon: t(() => [
125
+ p(g)(l) ? (r(), i(O, {
126
+ key: 0,
127
+ item: { ...l, default: _(l) }
128
+ }, null, 8, ["item"])) : w("", !0)
137
129
  ]),
138
130
  _: 2
139
- }, 1032, ["onClick"]))
140
- ];
141
- }),
142
- _: 2
143
- }, 1024)) : y("", !0)
144
- ]),
145
- _: 2
146
- }, 1024))), 128))
147
- ]),
148
- _: 1
149
- }));
131
+ }, [
132
+ k(l).value ? {
133
+ name: "warning",
134
+ fn: t(() => [
135
+ z(b(k(l).value), 1)
136
+ ]),
137
+ key: "0"
138
+ } : void 0
139
+ ]), 1032, ["class", "default", "disabled", "enum", "max", "min", "modelValue", "nullable", "type", "onSelectVariable", "onUpdate:modelValue"])
140
+ ]),
141
+ _: 2
142
+ }, 1024),
143
+ e.showUploadButton ? (r(), i(y, {
144
+ key: 0,
145
+ class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
146
+ }, {
147
+ default: t(() => {
148
+ var a;
149
+ return [
150
+ l.file ? (r(), c(f, { key: 0 }, [
151
+ s("div", A, [
152
+ s("span", null, b((a = l.file) == null ? void 0 : a.name), 1)
153
+ ]),
154
+ s("button", {
155
+ class: "absolute bg-b-2 font-medium centered-x centered-y hidden rounded text-center p-0.5 w-[calc(100%_-_8px)] group-hover/upload:block text-xs",
156
+ type: "button",
157
+ onClick: (C) => n("removeFile", u)
158
+ }, " Delete ", 8, M)
159
+ ], 64)) : (r(), i(p(N), {
160
+ key: 1,
161
+ class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2 shadow-none",
162
+ size: "sm",
163
+ variant: "outlined",
164
+ onClick: (C) => h(u)
165
+ }, {
166
+ default: t(() => [
167
+ o[6] || (o[6] = s("span", null, "File", -1)),
168
+ d(p(V), {
169
+ class: "ml-1",
170
+ icon: "UploadSimple",
171
+ size: "xs",
172
+ thickness: "2.5"
173
+ })
174
+ ]),
175
+ _: 2
176
+ }, 1032, ["onClick"]))
177
+ ];
178
+ }),
179
+ _: 2
180
+ }, 1024)) : w("", !0)
181
+ ]),
182
+ _: 2
183
+ }, 1024))), 128))
184
+ ]),
185
+ _: 1
186
+ });
187
+ };
150
188
  }
151
189
  });
152
190
  export {
153
- W as default
191
+ le as default
154
192
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAK9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AAiKrD,wBAOG"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAI9E,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC;;AAoIrD,wBAOG"}