@scalar/api-client 2.0.8 → 2.0.10

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 (27) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/App.vue.d.ts.map +1 -1
  3. package/dist/components/DataTable/DataTableInput.vue.d.ts +5 -0
  4. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  5. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  6. package/dist/components/DataTable/DataTableInput.vue2.js +46 -36
  7. package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
  8. package/dist/components/Search/SearchModal.vue.js +3 -3
  9. package/dist/components/Search/SearchModal.vue2.js +65 -54
  10. package/dist/store/workspace.d.ts +92 -2
  11. package/dist/store/workspace.d.ts.map +1 -1
  12. package/dist/store/workspace.js +67 -65
  13. package/dist/style.css +1 -1
  14. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  15. package/dist/views/Cookies/Cookies.vue2.js +31 -30
  16. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  17. package/dist/views/Request/Request.vue.js +2 -2
  18. package/dist/views/Request/Request.vue2.js +80 -79
  19. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  20. package/dist/views/Request/RequestSection/RequestTable.vue.js +3 -2
  21. package/dist/views/Request/RequestSection/RequestTable.vue2.js +79 -59
  22. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  23. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +30 -18
  24. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  25. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  26. package/dist/views/Request/RequestSidebarItem.vue2.js +23 -23
  27. package/package.json +6 -6
@@ -1,22 +1,23 @@
1
- import { defineComponent as f, openBlock as r, createBlock as i, withCtx as e, createVNode as t, unref as n, createTextVNode as m, createElementVNode as u, createElementBlock as d, Fragment as _, renderList as p } from "vue";
2
- import k from "../../components/Sidebar/SidebarButton.vue.js";
3
- import x from "../../components/Sidebar/SidebarList.vue.js";
4
- import h from "../../components/Sidebar/SidebarListElement.vue.js";
5
- import C from "../../components/ViewLayout/ViewLayout.vue.js";
6
- import b from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
- import { useWorkspace as v } from "../../store/workspace.js";
8
- import { createCookie as w } from "@scalar/oas-utils/entities/workspace/cookie";
9
- import { nanoid as L } from "nanoid";
10
- import V from "./CookieForm.vue.js";
11
- import y from "./CookieRaw.vue.js";
12
- import N from "../../components/Sidebar/Sidebar.vue.js";
1
+ import { defineComponent as f, openBlock as i, createBlock as a, withCtx as e, createVNode as t, unref as n, createTextVNode as m, createElementVNode as d, createElementBlock as p, Fragment as _, renderList as k } from "vue";
2
+ import x from "../../components/Sidebar/SidebarButton.vue.js";
3
+ import h from "../../components/Sidebar/SidebarList.vue.js";
4
+ import C from "../../components/Sidebar/SidebarListElement.vue.js";
5
+ import b from "../../components/ViewLayout/ViewLayout.vue.js";
6
+ import v from "../../components/ViewLayout/ViewLayoutContent.vue.js";
7
+ import { useWorkspace as w } from "../../store/workspace.js";
8
+ import { createCookie as L } from "@scalar/oas-utils/entities/workspace/cookie";
9
+ import { nanoid as V } from "nanoid";
10
+ import { useRouter as y } from "vue-router";
11
+ import N from "./CookieForm.vue.js";
12
+ import $ from "./CookieRaw.vue.js";
13
+ import B from "../../components/Sidebar/Sidebar.vue.js";
13
14
  /* empty css */
14
- const $ = { class: "flex-1" }, z = /* @__PURE__ */ f({
15
+ const E = { class: "flex-1" }, J = /* @__PURE__ */ f({
15
16
  __name: "Cookies",
16
- setup(B) {
17
- const { cookies: l, cookieMutators: s } = v(), c = () => {
18
- const a = w({
19
- uid: L(),
17
+ setup(S) {
18
+ const { cookies: l, cookieMutators: s } = w(), c = y(), u = () => {
19
+ const o = L({
20
+ uid: V(),
20
21
  name: "new cookie",
21
22
  value: "new value",
22
23
  domain: "localhost",
@@ -25,22 +26,22 @@ const $ = { class: "flex-1" }, z = /* @__PURE__ */ f({
25
26
  httpOnly: !1,
26
27
  sameSite: "None"
27
28
  });
28
- s.add(a);
29
+ s.add(o), c.push(o.uid);
29
30
  };
30
- return (a, E) => (r(), i(C, null, {
31
+ return (o, g) => (i(), a(b, null, {
31
32
  default: e(() => [
32
- t(n(N), null, {
33
+ t(n(B), null, {
33
34
  title: e(() => [
34
35
  m("Domain")
35
36
  ]),
36
37
  content: e(() => [
37
- u("div", $, [
38
- t(x, null, {
38
+ d("div", E, [
39
+ t(h, null, {
39
40
  default: e(() => [
40
- (r(!0), d(_, null, p(n(l), (o) => (r(), i(h, {
41
- key: o.uid,
41
+ (i(!0), p(_, null, k(n(l), (r) => (i(), a(C, {
42
+ key: r.uid,
42
43
  class: "text-xs",
43
- variable: { name: o.name, uid: o.uid }
44
+ variable: { name: r.name, uid: r.uid }
44
45
  }, null, 8, ["variable"]))), 128))
45
46
  ]),
46
47
  _: 1
@@ -48,7 +49,7 @@ const $ = { class: "flex-1" }, z = /* @__PURE__ */ f({
48
49
  ])
49
50
  ]),
50
51
  button: e(() => [
51
- t(k, { click: c }, {
52
+ t(x, { click: u }, {
52
53
  title: e(() => [
53
54
  m("Add Item")
54
55
  ]),
@@ -57,10 +58,10 @@ const $ = { class: "flex-1" }, z = /* @__PURE__ */ f({
57
58
  ]),
58
59
  _: 1
59
60
  }),
60
- t(b, { class: "flex-1" }, {
61
+ t(v, { class: "flex-1" }, {
61
62
  default: e(() => [
62
- t(V),
63
- t(y)
63
+ t(N),
64
+ t($)
64
65
  ]),
65
66
  _: 1
66
67
  })
@@ -70,5 +71,5 @@ const $ = { class: "flex-1" }, z = /* @__PURE__ */ f({
70
71
  }
71
72
  });
72
73
  export {
73
- z as default
74
+ J as default
74
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AA4/BA,wBAKG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";AA0/BA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.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-ac5dd98f"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-011dee0b"]]);
5
5
  export {
6
- f as default
6
+ p as default
7
7
  };
@@ -1,63 +1,63 @@
1
- import { defineComponent as K, ref as P, onMounted as W, onBeforeUnmount as G, computed as J, openBlock as c, createElementBlock as S, Fragment as B, createElementVNode as d, createVNode as s, unref as e, createCommentVNode as h, withCtx as m, createBlock as b, normalizeClass as C, createTextVNode as q, toDisplayString as Q, withModifiers as E, renderList as X } from "vue";
2
- import Y from "../../components/ActionModal/ActionModal.vue.js";
3
- import Z from "../../components/AddressBar/AddressBar.vue.js";
4
- import ee from "../../components/Search/SearchButton.vue.js";
5
- import te from "../../components/Search/SearchModal.vue.js";
6
- import oe from "../../components/Sidebar/SidebarButton.vue.js";
7
- import re from "../../components/ViewLayout/ViewLayout.vue.js";
8
- import se from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
- import { useWorkspace as ne } from "../../store/workspace.js";
10
- import ae from "./RequestSection/RequestSection.vue.js";
1
+ import { defineComponent as K, ref as P, onMounted as W, onBeforeUnmount as G, computed as J, openBlock as p, createElementBlock as _, Fragment as B, createElementVNode as c, createVNode as s, unref as e, createCommentVNode as k, withCtx as d, withDirectives as Q, normalizeClass as S, createTextVNode as q, toDisplayString as X, withModifiers as E, renderList as Y, createBlock as C, vShow as Z } from "vue";
2
+ import ee from "../../components/ActionModal/ActionModal.vue.js";
3
+ import te from "../../components/AddressBar/AddressBar.vue.js";
4
+ import oe from "../../components/Search/SearchButton.vue.js";
5
+ import re from "../../components/Search/SearchModal.vue.js";
6
+ import se from "../../components/Sidebar/SidebarButton.vue.js";
7
+ import ne from "../../components/ViewLayout/ViewLayout.vue.js";
8
+ import ae from "../../components/ViewLayout/ViewLayoutContent.vue.js";
9
+ import { useWorkspace as le } from "../../store/workspace.js";
10
+ import ie from "./RequestSection/RequestSection.vue.js";
11
11
  /* empty css */
12
- import le from "./ResponseSection/ResponseSection.vue.js";
13
- import { useModal as ie, ScalarIcon as y } from "@scalar/components";
12
+ import ue from "./ResponseSection/ResponseSection.vue.js";
13
+ import { useModal as ce, ScalarIcon as h } from "@scalar/components";
14
14
  import { isMacOS as $ } from "@scalar/use-tooltip";
15
- import { useMagicKeys as ue, useEventListener as ce } from "@vueuse/core";
16
- import de from "./RequestSidebarItem.vue.js";
17
- import { useActionModal as me } from "../../hooks/useActionModal.js";
18
- import pe from "../../components/Sidebar/Sidebar.vue.js";
15
+ import { useMagicKeys as de, useEventListener as me } from "@vueuse/core";
16
+ import pe from "./RequestSidebarItem.vue.js";
17
+ import { useActionModal as fe } from "../../hooks/useActionModal.js";
18
+ import ve from "../../components/Sidebar/Sidebar.vue.js";
19
19
  /* empty css */
20
- import { useSidebar as fe } from "../../hooks/useSidebar.js";
21
- import { sendRequest as ve } from "../../libs/sendRequest.js";
20
+ import { useSidebar as ge } from "../../hooks/useSidebar.js";
21
+ import { sendRequest as xe } from "../../libs/sendRequest.js";
22
22
  import { executeRequestBus as I } from "../../libs/eventBusses/executeRequestBus.js";
23
- const ge = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full" }, xe = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, he = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, be = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, V = !0, je = /* @__PURE__ */ K({
23
+ const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full" }, be = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, ye = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, we = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, V = !0, Ke = /* @__PURE__ */ K({
24
24
  __name: "Request",
25
- setup(ye) {
25
+ setup(_e) {
26
26
  const {
27
- activeExample: w,
28
- activeRequest: p,
29
- activeServer: _,
27
+ activeExample: b,
28
+ activeRequest: m,
29
+ activeServer: y,
30
30
  activeSecurityScheme: z,
31
31
  collections: L,
32
32
  modalState: N,
33
33
  workspace: i
34
- } = ne(), { collapsedSidebarFolders: U } = fe(), k = me(), f = ie(), l = P(!1), A = (r) => {
35
- k.tab = r;
34
+ } = le(), { collapsedSidebarFolders: U } = ge(), w = fe(), f = ce(), l = P(!1), A = (r) => {
35
+ w.tab = r;
36
36
  }, D = async () => {
37
37
  var n, u;
38
- if (!p.value || !w.value) {
38
+ if (!m.value || !b.value) {
39
39
  console.warn(
40
40
  "There is no request active at the moment. Please select one then try again."
41
41
  );
42
42
  return;
43
43
  }
44
- let r = ((n = _.value) == null ? void 0 : n.url) + p.value.path;
45
- if ((u = _.value) != null && u.variables) {
44
+ let r = ((n = y.value) == null ? void 0 : n.url) + m.value.path;
45
+ if ((u = y.value) != null && u.variables) {
46
46
  const g = /{\s*([\w.-]+)\s*}/g;
47
47
  r = r.replace(g, (x, H) => {
48
48
  var M, R, O;
49
- const a = (R = (M = _.value) == null ? void 0 : M.variables) == null ? void 0 : R[H];
49
+ const a = (R = (M = y.value) == null ? void 0 : M.variables) == null ? void 0 : R[H];
50
50
  return (a == null ? void 0 : a.value) || (a == null ? void 0 : a.default) || ((O = a == null ? void 0 : a.enum) == null ? void 0 : O[0]) || x;
51
51
  });
52
52
  }
53
- const { request: o, response: t } = await ve(
54
- p.value,
55
- w.value,
53
+ const { request: o, response: t } = await xe(
54
+ m.value,
55
+ b.value,
56
56
  r,
57
57
  z.value,
58
58
  i.proxyUrl
59
59
  );
60
- o && t ? p.value.history.push({
60
+ o && t ? m.value.history.push({
61
61
  request: o,
62
62
  response: t,
63
63
  timestamp: Date.now()
@@ -68,61 +68,60 @@ const ge = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
68
68
  () => i.collectionUids.map((r) => L[r])
69
69
  ), T = (r, o, t, n) => {
70
70
  }, j = () => {
71
- k.show();
72
- }, v = ue();
73
- return ce(document, "keydown", (r) => {
71
+ w.show();
72
+ }, v = de();
73
+ return me(document, "keydown", (r) => {
74
74
  ($() ? v.meta.value : v.ctrl.value) && r.key === "b" && (l.value = !l.value), ($() ? v.meta.value : v.ctrl.value) && r.key === "k" && (f.open ? f.hide() : f.show());
75
- }), (r, o) => (c(), S(B, null, [
76
- d("div", ge, [
77
- d("div", xe, [
78
- d("div", he, [
79
- d("button", {
75
+ }), (r, o) => (p(), _(B, null, [
76
+ c("div", he, [
77
+ c("div", be, [
78
+ c("div", ye, [
79
+ c("button", {
80
80
  class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
81
81
  type: "button",
82
82
  onClick: o[0] || (o[0] = (t) => l.value = !l.value)
83
83
  }, [
84
- s(e(y), {
84
+ s(e(h), {
85
85
  icon: l.value ? "SideBarOpen" : "SideBarClosed",
86
86
  size: "sm"
87
87
  }, null, 8, ["icon"])
88
88
  ])
89
89
  ]),
90
- s(Z),
91
- d("div", be, [
92
- e(i).isReadOnly ? (c(), S("button", {
90
+ s(te),
91
+ c("div", we, [
92
+ e(i).isReadOnly ? (p(), _("button", {
93
93
  key: 0,
94
94
  class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
95
95
  type: "button",
96
96
  onClick: o[1] || (o[1] = (t) => e(N).hide())
97
97
  }, [
98
- s(e(y), {
98
+ s(e(h), {
99
99
  icon: "Close",
100
100
  size: "xs"
101
101
  })
102
- ])) : h("", !0)
102
+ ])) : k("", !0)
103
103
  ])
104
104
  ]),
105
- s(re, null, {
106
- default: m(() => [
107
- l.value ? (c(), b(e(pe), {
108
- key: 0,
109
- class: C([l.value ? "sidebar-active-width" : ""])
105
+ s(ne, null, {
106
+ default: d(() => [
107
+ Q(s(e(ve), {
108
+ class: S([l.value ? "sidebar-active-width" : ""])
110
109
  }, {
111
- title: m(() => [
112
- q(Q(e(i).name), 1)
110
+ title: d(() => [
111
+ q(X(e(i).name), 1)
113
112
  ]),
114
- content: m(() => [
115
- s(ee, {
113
+ content: d(() => [
114
+ s(oe, {
116
115
  onOpenSearchModal: o[2] || (o[2] = (t) => e(f).show())
117
116
  }),
118
- d("div", {
117
+ c("div", {
119
118
  class: "custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-12 pt-2.5",
120
119
  onDragenter: o[3] || (o[3] = E(() => {
121
120
  }, ["prevent"])),
122
121
  onDragover: o[4] || (o[4] = E(() => {
123
122
  }, ["prevent"]))
124
123
  }, [
125
- (c(!0), S(B, null, X(F.value, (t, n) => (c(), b(de, {
124
+ (p(!0), _(B, null, Y(F.value, (t, n) => (p(), C(pe, {
126
125
  key: t.uid,
127
126
  isDraggable: V && !e(i).isReadOnly,
128
127
  isDroppable: V && !e(i).isReadOnly,
@@ -130,18 +129,18 @@ const ge = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
130
129
  parentUids: [],
131
130
  onOnDragEnd: (...u) => T(t, n, ...u)
132
131
  }, {
133
- leftIcon: m(() => [
134
- s(e(y), {
132
+ leftIcon: d(() => [
133
+ s(e(h), {
135
134
  class: "text-sidebar-c-2 stroke-[1] text-sm group-hover:hidden",
136
135
  icon: "CodeFolder",
137
136
  size: "sm"
138
137
  }),
139
- d("div", {
140
- class: C({
138
+ c("div", {
139
+ class: S({
141
140
  "rotate-90": e(U)[t.uid]
142
141
  })
143
142
  }, [
144
- s(e(y), {
143
+ s(e(h), {
145
144
  class: "text-c-3 hidden text-sm group-hover:block",
146
145
  icon: "ChevronRight",
147
146
  size: "sm"
@@ -152,46 +151,48 @@ const ge = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
152
151
  }, 1032, ["isDraggable", "isDroppable", "item", "onOnDragEnd"]))), 128))
153
152
  ], 32)
154
153
  ]),
155
- button: m(() => [
156
- e(i).isReadOnly ? h("", !0) : (c(), b(oe, {
154
+ button: d(() => [
155
+ e(i).isReadOnly ? k("", !0) : (p(), C(se, {
157
156
  key: 0,
158
157
  click: j
159
158
  }, {
160
- title: m(() => [
159
+ title: d(() => [
161
160
  q("Add Item")
162
161
  ]),
163
162
  _: 1
164
163
  }))
165
164
  ]),
166
165
  _: 1
167
- }, 8, ["class"])) : h("", !0),
168
- e(w) ? (c(), b(se, {
169
- key: 1,
170
- class: C(["flex-1", [l.value ? "sidebar-active-hide-layout" : ""]])
166
+ }, 8, ["class"]), [
167
+ [Z, l.value]
168
+ ]),
169
+ e(b) ? (p(), C(ae, {
170
+ key: 0,
171
+ class: S(["flex-1", [l.value ? "sidebar-active-hide-layout" : ""]])
171
172
  }, {
172
- default: m(() => {
173
+ default: d(() => {
173
174
  var t, n, u, g, x;
174
175
  return [
175
- s(ae),
176
- s(le, {
177
- response: (x = (g = (t = e(p)) == null ? void 0 : t.history) == null ? void 0 : g[((u = (n = e(p)) == null ? void 0 : n.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : x.response
176
+ s(ie),
177
+ s(ue, {
178
+ response: (x = (g = (t = e(m)) == null ? void 0 : t.history) == null ? void 0 : g[((u = (n = e(m)) == null ? void 0 : n.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : x.response
178
179
  }, null, 8, ["response"])
179
180
  ];
180
181
  }),
181
182
  _: 1
182
- }, 8, ["class"])) : h("", !0),
183
- s(Y, {
184
- state: e(k),
183
+ }, 8, ["class"])) : k("", !0),
184
+ s(ee, {
185
+ state: e(w),
185
186
  "onUpdate:tab": A
186
187
  }, null, 8, ["state"])
187
188
  ]),
188
189
  _: 1
189
190
  })
190
191
  ]),
191
- s(te, { modalState: e(f) }, null, 8, ["modalState"])
192
+ s(re, { modalState: e(f) }, null, 8, ["modalState"])
192
193
  ], 64));
193
194
  }
194
195
  });
195
196
  export {
196
- je as default
197
+ Ke as default
197
198
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAsIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAO5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AA2Y9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AAoa9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
+ /* empty css */
3
4
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2cf8458e"]]);
5
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4deab659"]]);
5
6
  export {
6
- f as default
7
+ p as default
7
8
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as _, openBlock as u, createBlock as d, unref as i, withCtx as s, createElementBlock as b, Fragment as w, renderList as F, createCommentVNode as m, createVNode as c, createElementVNode as p, toDisplayString as R, pushScopeId as S, popScopeId as $ } from "vue";
2
- import U from "../../../components/DataTable/DataTable.vue.js";
3
- import I from "../../../components/DataTable/DataTableCell.vue.js";
4
- import C from "../../../components/DataTable/DataTableCheckbox.vue.js";
5
- import v from "../../../components/DataTable/DataTableInput.vue.js";
6
- import E from "../../../components/DataTable/DataTableRow.vue.js";
7
- import { ScalarButton as q, ScalarIcon as D } from "@scalar/components";
8
- import T from "./RequestTableTooltip.vue.js";
9
- const H = (r) => (S("data-v-2cf8458e"), r = r(), $(), r), N = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, z = ["onClick"], j = /* @__PURE__ */ H(() => /* @__PURE__ */ p("span", null, "File", -1)), P = /* @__PURE__ */ _({
1
+ import { defineComponent as S, openBlock as u, createBlock as r, unref as p, withCtx as d, createElementBlock as b, Fragment as w, renderList as _, createCommentVNode as m, createVNode as c, createSlots as F, createTextVNode as x, toDisplayString as y, createElementVNode as i, computed as U, pushScopeId as I, popScopeId as C } from "vue";
2
+ import E from "../../../components/DataTable/DataTable.vue.js";
3
+ import N from "../../../components/DataTable/DataTableCell.vue.js";
4
+ import T from "../../../components/DataTable/DataTableCheckbox.vue.js";
5
+ import V from "../../../components/DataTable/DataTableInput.vue.js";
6
+ import q from "../../../components/DataTable/DataTableRow.vue.js";
7
+ import { ScalarButton as D, ScalarIcon as H } from "@scalar/components";
8
+ import z from "./RequestTableTooltip.vue.js";
9
+ const M = (s) => (I("data-v-4deab659"), s = s(), C(), s), O = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, j = ["onClick"], K = /* @__PURE__ */ M(() => /* @__PURE__ */ i("span", null, "File", -1)), Y = /* @__PURE__ */ S({
10
10
  __name: "RequestTable",
11
11
  props: {
12
12
  items: {},
@@ -14,78 +14,98 @@ const H = (r) => (S("data-v-2cf8458e"), r = r(), $(), r), N = { class: "text-c-2
14
14
  showUploadButton: { type: Boolean, default: !1 }
15
15
  },
16
16
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
17
- setup(r, { emit: V }) {
18
- const k = r, l = V, y = k.isEnabledHidden ? ["", ""] : ["", "", "36px"], f = (o, n, t) => {
19
- l("updateRow", o, n, t);
20
- }, h = (o) => {
21
- l("uploadFile", o);
22
- }, g = (o) => !!(o.description || o.type || o.default || o.format);
23
- return (o, n) => (u(), d(U, {
17
+ setup(s, { emit: k }) {
18
+ const g = s, t = k, h = g.isEnabledHidden ? ["", ""] : ["", "", "36px"], f = (e, n, l) => {
19
+ t("updateRow", e, n, l);
20
+ }, $ = (e) => {
21
+ t("uploadFile", e);
22
+ }, B = (e) => !!(e.description || e.type || e.default || e.format), v = (e) => U(() => {
23
+ if (e.type === "integer" && e.value !== void 0) {
24
+ const n = Number(e.value);
25
+ if (e.minimum !== void 0 && n < e.minimum)
26
+ return `Min is ${e.minimum}`;
27
+ if (e.maximum !== void 0 && n > e.maximum)
28
+ return `Max is ${e.maximum}`;
29
+ }
30
+ return !1;
31
+ });
32
+ return (e, n) => (u(), r(E, {
24
33
  class: "flex-1",
25
- columns: i(y)
34
+ columns: p(h)
26
35
  }, {
27
- default: s(() => [
28
- (u(!0), b(w, null, F(o.items, (t, a) => (u(), d(E, { key: a }, {
29
- default: s(() => [
30
- o.isEnabledHidden ? m("", !0) : (u(), d(C, {
36
+ default: d(() => [
37
+ (u(!0), b(w, null, _(e.items, (l, a) => (u(), r(q, { key: a }, {
38
+ default: d(() => [
39
+ e.isEnabledHidden ? m("", !0) : (u(), r(T, {
31
40
  key: 0,
32
- modelValue: t.enabled,
33
- "onUpdate:modelValue": (e) => l("toggleRow", a, e)
41
+ modelValue: l.enabled,
42
+ "onUpdate:modelValue": (o) => t("toggleRow", a, o)
34
43
  }, null, 8, ["modelValue", "onUpdate:modelValue"])),
35
- c(v, {
36
- modelValue: t.key,
44
+ c(V, {
45
+ modelValue: l.key,
37
46
  placeholder: "Key",
38
- required: t.required,
39
- onBlur: n[0] || (n[0] = (e) => l("inputBlur")),
40
- onFocus: n[1] || (n[1] = (e) => l("inputFocus")),
41
- onInput: (e) => o.items && a === o.items.length - 1 && l("addRow"),
42
- onSelectVariable: (e) => f(a, "key", e),
43
- "onUpdate:modelValue": (e) => l("updateRow", a, "key", e)
47
+ required: l.required,
48
+ onBlur: n[0] || (n[0] = (o) => t("inputBlur")),
49
+ onFocus: n[1] || (n[1] = (o) => t("inputFocus")),
50
+ onInput: (o) => e.items && a === e.items.length - 1 && t("addRow"),
51
+ onSelectVariable: (o) => f(a, "key", o),
52
+ "onUpdate:modelValue": (o) => t("updateRow", a, "key", o)
44
53
  }, null, 8, ["modelValue", "required", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
45
- c(v, {
46
- enum: t.enum,
47
- modelValue: t.value,
54
+ c(V, {
55
+ enum: l.enum,
56
+ max: l.maximum,
57
+ min: l.minimum,
58
+ modelValue: l.value,
48
59
  placeholder: "Value",
49
- onBlur: n[2] || (n[2] = (e) => l("inputBlur")),
50
- onFocus: n[3] || (n[3] = (e) => l("inputFocus")),
51
- onInput: (e) => o.items && a === o.items.length - 1 && l("addRow"),
52
- onSelectVariable: (e) => f(a, "value", e),
53
- "onUpdate:modelValue": (e) => l("updateRow", a, "value", e)
54
- }, {
55
- icon: s(() => [
56
- g(t) ? (u(), d(T, {
60
+ type: l.type === "integer" ? "number" : "text",
61
+ onBlur: n[2] || (n[2] = (o) => t("inputBlur")),
62
+ onFocus: n[3] || (n[3] = (o) => t("inputFocus")),
63
+ onInput: (o) => e.items && a === e.items.length - 1 && t("addRow"),
64
+ onSelectVariable: (o) => f(a, "value", o),
65
+ "onUpdate:modelValue": (o) => t("updateRow", a, "value", o)
66
+ }, F({
67
+ icon: d(() => [
68
+ B(l) ? (u(), r(z, {
57
69
  key: 0,
58
- item: t
70
+ item: l
59
71
  }, null, 8, ["item"])) : m("", !0)
60
72
  ]),
61
73
  _: 2
62
- }, 1032, ["enum", "modelValue", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
63
- o.showUploadButton ? (u(), d(I, {
74
+ }, [
75
+ v(l).value ? {
76
+ name: "warning",
77
+ fn: d(() => [
78
+ x(y(v(l).value), 1)
79
+ ]),
80
+ key: "0"
81
+ } : void 0
82
+ ]), 1032, ["enum", "max", "min", "modelValue", "type", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
83
+ e.showUploadButton ? (u(), r(N, {
64
84
  key: 1,
65
85
  class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
66
86
  }, {
67
- default: s(() => {
68
- var e;
87
+ default: d(() => {
88
+ var o;
69
89
  return [
70
- t.file ? (u(), b(w, { key: 0 }, [
71
- p("div", N, [
72
- p("span", null, R((e = t.file) == null ? void 0 : e.name), 1)
90
+ l.file ? (u(), b(w, { key: 0 }, [
91
+ i("div", O, [
92
+ i("span", null, y((o = l.file) == null ? void 0 : o.name), 1)
73
93
  ]),
74
- p("button", {
94
+ i("button", {
75
95
  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",
76
96
  type: "button",
77
- onClick: (B) => l("removeFile", a)
78
- }, " Delete ", 8, z)
79
- ], 64)) : (u(), d(i(q), {
97
+ onClick: (R) => t("removeFile", a)
98
+ }, " Delete ", 8, j)
99
+ ], 64)) : (u(), r(p(D), {
80
100
  key: 1,
81
101
  class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2",
82
102
  size: "sm",
83
103
  variant: "outlined",
84
- onClick: (B) => h(a)
104
+ onClick: (R) => $(a)
85
105
  }, {
86
- default: s(() => [
87
- j,
88
- c(i(D), {
106
+ default: d(() => [
107
+ K,
108
+ c(p(H), {
89
109
  class: "ml-1 stroke-[2.5]",
90
110
  icon: "UploadSimple",
91
111
  size: "xs"
@@ -106,5 +126,5 @@ const H = (r) => (S("data-v-2cf8458e"), r = r(), $(), r), N = { class: "text-c-2
106
126
  }
107
127
  });
108
128
  export {
109
- P as default
129
+ Y as default
110
130
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;UAI1D,uBAAuB;;UAAvB,uBAAuB;;AAiIrD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;UAI1D,uBAAuB;;UAAvB,uBAAuB;;AAuJrD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}