@scalar/api-client 2.0.8 → 2.0.11
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.
- package/CHANGELOG.md +35 -0
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/Modal/ApiClientModal.vue.js +2 -2
- package/dist/Modal/ApiClientModal.vue2.js +19 -16
- package/dist/components/DataTable/DataTableInput.vue.d.ts +5 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +46 -36
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +3 -3
- package/dist/components/Search/SearchModal.vue2.js +65 -54
- package/dist/store/workspace.d.ts +92 -2
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +67 -65
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +31 -30
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +89 -88
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +3 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +79 -59
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +31 -19
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +23 -23
- package/package.json +7 -7
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as f, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
import { createCookie as
|
|
9
|
-
import { nanoid as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
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
|
|
15
|
+
const E = { class: "flex-1" }, J = /* @__PURE__ */ f({
|
|
15
16
|
__name: "Cookies",
|
|
16
|
-
setup(
|
|
17
|
-
const { cookies: l, cookieMutators: s } =
|
|
18
|
-
const
|
|
19
|
-
uid:
|
|
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(
|
|
29
|
+
s.add(o), c.push(o.uid);
|
|
29
30
|
};
|
|
30
|
-
return (
|
|
31
|
+
return (o, g) => (i(), a(b, null, {
|
|
31
32
|
default: e(() => [
|
|
32
|
-
t(n(
|
|
33
|
+
t(n(B), null, {
|
|
33
34
|
title: e(() => [
|
|
34
35
|
m("Domain")
|
|
35
36
|
]),
|
|
36
37
|
content: e(() => [
|
|
37
|
-
|
|
38
|
-
t(
|
|
38
|
+
d("div", E, [
|
|
39
|
+
t(h, null, {
|
|
39
40
|
default: e(() => [
|
|
40
|
-
(
|
|
41
|
-
key:
|
|
41
|
+
(i(!0), p(_, null, k(n(l), (r) => (i(), a(C, {
|
|
42
|
+
key: r.uid,
|
|
42
43
|
class: "text-xs",
|
|
43
|
-
variable: { name:
|
|
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(
|
|
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(
|
|
61
|
+
t(v, { class: "flex-1" }, {
|
|
61
62
|
default: e(() => [
|
|
62
|
-
t(
|
|
63
|
-
t(
|
|
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
|
-
|
|
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":";
|
|
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
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6d03b674"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
import
|
|
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
|
|
13
|
-
import { useModal as
|
|
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
|
|
16
|
-
import
|
|
17
|
-
import { useActionModal as
|
|
18
|
-
import
|
|
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
|
|
21
|
-
import { sendRequest as
|
|
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
|
|
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(
|
|
25
|
+
setup(_e) {
|
|
26
26
|
const {
|
|
27
|
-
activeExample:
|
|
28
|
-
activeRequest:
|
|
29
|
-
activeServer:
|
|
27
|
+
activeExample: b,
|
|
28
|
+
activeRequest: m,
|
|
29
|
+
activeServer: y,
|
|
30
30
|
activeSecurityScheme: z,
|
|
31
31
|
collections: L,
|
|
32
32
|
modalState: N,
|
|
33
|
-
workspace:
|
|
34
|
-
} =
|
|
35
|
-
|
|
33
|
+
workspace: l
|
|
34
|
+
} = le(), { collapsedSidebarFolders: U } = ge(), w = fe(), f = ce(), i = P(!l.isReadOnly), A = (r) => {
|
|
35
|
+
w.tab = r;
|
|
36
36
|
}, D = async () => {
|
|
37
37
|
var n, u;
|
|
38
|
-
if (!
|
|
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 =
|
|
45
|
-
if ((u =
|
|
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
|
-
var
|
|
49
|
-
const a = (
|
|
48
|
+
var R, M, O;
|
|
49
|
+
const a = (M = (R = y.value) == null ? void 0 : R.variables) == null ? void 0 : M[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
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
const { request: o, response: t } = await xe(
|
|
54
|
+
m.value,
|
|
55
|
+
b.value,
|
|
56
56
|
r,
|
|
57
57
|
z.value,
|
|
58
|
-
|
|
58
|
+
l.proxyUrl
|
|
59
59
|
);
|
|
60
|
-
o && t ?
|
|
60
|
+
o && t ? m.value.history.push({
|
|
61
61
|
request: o,
|
|
62
62
|
response: t,
|
|
63
63
|
timestamp: Date.now()
|
|
@@ -65,83 +65,82 @@ const ge = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
65
65
|
};
|
|
66
66
|
W(() => I.on(D)), G(() => I.off(D));
|
|
67
67
|
const F = J(
|
|
68
|
-
() =>
|
|
68
|
+
() => l.collectionUids.map((r) => L[r])
|
|
69
69
|
), T = (r, o, t, n) => {
|
|
70
70
|
}, j = () => {
|
|
71
|
-
|
|
72
|
-
}, v =
|
|
73
|
-
return
|
|
74
|
-
($() ? v.meta.value : v.ctrl.value) && r.key === "b" && (
|
|
75
|
-
}), (r, o) => (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
w.show();
|
|
72
|
+
}, v = de();
|
|
73
|
+
return me(document, "keydown", (r) => {
|
|
74
|
+
($() ? v.meta.value : v.ctrl.value) && r.key === "b" && (i.value = !i.value), ($() ? v.meta.value : v.ctrl.value) && r.key === "k" && (f.open ? f.hide() : f.show());
|
|
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
|
-
onClick: o[0] || (o[0] = (t) =>
|
|
82
|
+
onClick: o[0] || (o[0] = (t) => i.value = !i.value)
|
|
83
83
|
}, [
|
|
84
|
-
s(e(
|
|
85
|
-
icon:
|
|
84
|
+
s(e(h), {
|
|
85
|
+
icon: i.value ? "SideBarOpen" : "SideBarClosed",
|
|
86
86
|
size: "sm"
|
|
87
87
|
}, null, 8, ["icon"])
|
|
88
88
|
])
|
|
89
89
|
]),
|
|
90
|
-
s(
|
|
91
|
-
|
|
92
|
-
e(
|
|
90
|
+
s(te),
|
|
91
|
+
c("div", we, [
|
|
92
|
+
e(l).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(
|
|
98
|
+
s(e(h), {
|
|
99
99
|
icon: "Close",
|
|
100
100
|
size: "xs"
|
|
101
101
|
})
|
|
102
|
-
])) :
|
|
102
|
+
])) : k("", !0)
|
|
103
103
|
])
|
|
104
104
|
]),
|
|
105
|
-
s(
|
|
106
|
-
default:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
class: C([l.value ? "sidebar-active-width" : ""])
|
|
105
|
+
s(ne, null, {
|
|
106
|
+
default: d(() => [
|
|
107
|
+
Q(s(e(ve), {
|
|
108
|
+
class: S([i.value ? "sidebar-active-width" : ""])
|
|
110
109
|
}, {
|
|
111
|
-
title:
|
|
112
|
-
q(
|
|
110
|
+
title: d(() => [
|
|
111
|
+
q(X(e(l).name), 1)
|
|
113
112
|
]),
|
|
114
|
-
content:
|
|
115
|
-
s(
|
|
113
|
+
content: d(() => [
|
|
114
|
+
s(oe, {
|
|
116
115
|
onOpenSearchModal: o[2] || (o[2] = (t) => e(f).show())
|
|
117
116
|
}),
|
|
118
|
-
|
|
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
|
-
(
|
|
124
|
+
(p(!0), _(B, null, Y(F.value, (t, n) => (p(), C(pe, {
|
|
126
125
|
key: t.uid,
|
|
127
|
-
isDraggable: V && !e(
|
|
128
|
-
isDroppable: V && !e(
|
|
126
|
+
isDraggable: V && !e(l).isReadOnly,
|
|
127
|
+
isDroppable: V && !e(l).isReadOnly,
|
|
129
128
|
item: t,
|
|
130
129
|
parentUids: [],
|
|
131
130
|
onOnDragEnd: (...u) => T(t, n, ...u)
|
|
132
131
|
}, {
|
|
133
|
-
leftIcon:
|
|
134
|
-
s(e(
|
|
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
|
-
|
|
140
|
-
class:
|
|
138
|
+
c("div", {
|
|
139
|
+
class: S({
|
|
141
140
|
"rotate-90": e(U)[t.uid]
|
|
142
141
|
})
|
|
143
142
|
}, [
|
|
144
|
-
s(e(
|
|
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:
|
|
156
|
-
e(
|
|
154
|
+
button: d(() => [
|
|
155
|
+
e(l).isReadOnly ? k("", !0) : (p(), C(se, {
|
|
157
156
|
key: 0,
|
|
158
157
|
click: j
|
|
159
158
|
}, {
|
|
160
|
-
title:
|
|
159
|
+
title: d(() => [
|
|
161
160
|
q("Add Item")
|
|
162
161
|
]),
|
|
163
162
|
_: 1
|
|
164
163
|
}))
|
|
165
164
|
]),
|
|
166
165
|
_: 1
|
|
167
|
-
}, 8, ["class"])
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
}, 8, ["class"]), [
|
|
167
|
+
[Z, i.value]
|
|
168
|
+
]),
|
|
169
|
+
e(b) ? (p(), C(ae, {
|
|
170
|
+
key: 0,
|
|
171
|
+
class: S(["flex-1", [i.value ? "sidebar-active-hide-layout" : ""]])
|
|
171
172
|
}, {
|
|
172
|
-
default:
|
|
173
|
+
default: d(() => {
|
|
173
174
|
var t, n, u, g, x;
|
|
174
175
|
return [
|
|
175
|
-
s(
|
|
176
|
-
s(
|
|
177
|
-
response: (x = (g = (t = e(
|
|
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"])) :
|
|
183
|
-
s(
|
|
184
|
-
state: e(
|
|
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(
|
|
192
|
+
s(re, { modalState: e(f) }, null, 8, ["modalState"])
|
|
192
193
|
], 64));
|
|
193
194
|
}
|
|
194
195
|
});
|
|
195
196
|
export {
|
|
196
|
-
|
|
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":"
|
|
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
|
|
5
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4deab659"]]);
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
p as default
|
|
7
8
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ScalarButton as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
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(
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
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:
|
|
34
|
+
columns: p(h)
|
|
26
35
|
}, {
|
|
27
|
-
default:
|
|
28
|
-
(u(!0), b(w, null,
|
|
29
|
-
default:
|
|
30
|
-
|
|
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:
|
|
33
|
-
"onUpdate:modelValue": (
|
|
41
|
+
modelValue: l.enabled,
|
|
42
|
+
"onUpdate:modelValue": (o) => t("toggleRow", a, o)
|
|
34
43
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])),
|
|
35
|
-
c(
|
|
36
|
-
modelValue:
|
|
44
|
+
c(V, {
|
|
45
|
+
modelValue: l.key,
|
|
37
46
|
placeholder: "Key",
|
|
38
|
-
required:
|
|
39
|
-
onBlur: n[0] || (n[0] = (
|
|
40
|
-
onFocus: n[1] || (n[1] = (
|
|
41
|
-
onInput: (
|
|
42
|
-
onSelectVariable: (
|
|
43
|
-
"onUpdate:modelValue": (
|
|
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(
|
|
46
|
-
enum:
|
|
47
|
-
|
|
54
|
+
c(V, {
|
|
55
|
+
enum: l.enum,
|
|
56
|
+
max: l.maximum,
|
|
57
|
+
min: l.minimum,
|
|
58
|
+
modelValue: l.value,
|
|
48
59
|
placeholder: "Value",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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:
|
|
70
|
+
item: l
|
|
59
71
|
}, null, 8, ["item"])) : m("", !0)
|
|
60
72
|
]),
|
|
61
73
|
_: 2
|
|
62
|
-
},
|
|
63
|
-
|
|
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:
|
|
68
|
-
var
|
|
87
|
+
default: d(() => {
|
|
88
|
+
var o;
|
|
69
89
|
return [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
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: (
|
|
78
|
-
}, " Delete ", 8,
|
|
79
|
-
], 64)) : (u(),
|
|
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: (
|
|
104
|
+
onClick: (R) => $(a)
|
|
85
105
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
|
|
88
|
-
c(
|
|
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
|
-
|
|
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":"
|
|
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"}
|