@scalar/api-client 2.0.16 → 2.0.17
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 +8 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +9 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +69 -44
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +13 -13
- package/dist/components/DataTable/{DataTableInputEnumSelect.vue.d.ts → DataTableInputSelect.vue.d.ts} +3 -3
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.js +109 -0
- package/dist/components/DataTable/DataTableInputSelect.vue2.js +4 -0
- package/dist/store/workspace.d.ts +52 -2
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +74 -73
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +39 -38
- package/package.json +6 -6
- package/dist/components/DataTable/DataTableInputEnumSelect.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableInputEnumSelect.vue.js +0 -102
- package/dist/components/DataTable/DataTableInputEnumSelect.vue2.js +0 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as F, openBlock as u, createBlock as d, unref as m, withCtx as r, createElementBlock as y, Fragment as w, renderList as I, createCommentVNode as c, createVNode as i, createSlots as
|
|
1
|
+
import { defineComponent as F, openBlock as u, createBlock as d, unref as m, withCtx as r, createElementBlock as y, Fragment as w, renderList as I, createCommentVNode as c, createVNode as i, createSlots as C, createTextVNode as U, toDisplayString as V, createElementVNode as p, computed as x, pushScopeId as E, popScopeId as T } from "vue";
|
|
2
2
|
import k from "../../../components/CodeInput/CodeInput.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import q from "../../../components/DataTable/DataTable.vue.js";
|
|
4
4
|
import f from "../../../components/DataTable/DataTableCell.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import N from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
6
6
|
import D from "../../../components/DataTable/DataTableRow.vue.js";
|
|
7
7
|
import { ScalarButton as H, ScalarIcon as z } from "@scalar/components";
|
|
8
8
|
import A from "./RequestTableTooltip.vue.js";
|
|
9
|
-
const M = (s) => (E("data-v-
|
|
9
|
+
const M = (s) => (E("data-v-fe74a9ea"), s = s(), T(), s), O = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, j = ["onClick"], K = /* @__PURE__ */ M(() => /* @__PURE__ */ p("span", null, "File", -1)), Z = /* @__PURE__ */ F({
|
|
10
10
|
__name: "RequestTable",
|
|
11
11
|
props: {
|
|
12
12
|
items: {},
|
|
@@ -15,11 +15,11 @@ const M = (s) => (E("data-v-8e8bfed1"), s = s(), T(), s), O = { class: "text-c-2
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
|
|
17
17
|
setup(s, { emit: g }) {
|
|
18
|
-
const h = s, t = g, B = h.isEnabledHidden ? ["", ""] : ["", "", "36px"], b = (e, n,
|
|
19
|
-
t("updateRow", e, n,
|
|
18
|
+
const h = s, t = g, B = h.isEnabledHidden ? ["", ""] : ["", "", "36px"], b = (e, n, l) => {
|
|
19
|
+
t("updateRow", e, n, l);
|
|
20
20
|
}, _ = (e) => {
|
|
21
21
|
t("uploadFile", e);
|
|
22
|
-
}, $ = (e) => !!(e.description || e.type || e.default || e.format), v = (e) =>
|
|
22
|
+
}, $ = (e) => !!(e.description || e.type || e.default || e.format), v = (e) => x(() => {
|
|
23
23
|
if (e.type === "integer" && e.value !== void 0) {
|
|
24
24
|
const n = Number(e.value);
|
|
25
25
|
if (e.minimum !== void 0 && n < e.minimum)
|
|
@@ -29,17 +29,17 @@ const M = (s) => (E("data-v-8e8bfed1"), s = s(), T(), s), O = { class: "text-c-2
|
|
|
29
29
|
}
|
|
30
30
|
return !1;
|
|
31
31
|
}), R = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
|
|
32
|
-
return (e, n) => (u(), d(
|
|
32
|
+
return (e, n) => (u(), d(q, {
|
|
33
33
|
class: "flex-1",
|
|
34
34
|
columns: m(B)
|
|
35
35
|
}, {
|
|
36
36
|
default: r(() => [
|
|
37
|
-
(u(!0), y(w, null, I(e.items, (
|
|
37
|
+
(u(!0), y(w, null, I(e.items, (l, a) => (u(), d(D, { key: a }, {
|
|
38
38
|
default: r(() => [
|
|
39
|
-
e.isEnabledHidden ? c("", !0) : (u(), d(
|
|
39
|
+
e.isEnabledHidden ? c("", !0) : (u(), d(N, {
|
|
40
40
|
key: 0,
|
|
41
|
-
modelValue:
|
|
42
|
-
"onUpdate:modelValue": (
|
|
41
|
+
modelValue: !!l.required,
|
|
42
|
+
"onUpdate:modelValue": (o) => t("toggleRow", a, o)
|
|
43
43
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])),
|
|
44
44
|
i(f, null, {
|
|
45
45
|
default: r(() => [
|
|
@@ -47,14 +47,14 @@ const M = (s) => (E("data-v-8e8bfed1"), s = s(), T(), s), O = { class: "text-c-2
|
|
|
47
47
|
disableCloseBrackets: "",
|
|
48
48
|
disableEnter: "",
|
|
49
49
|
disableTabIndent: "",
|
|
50
|
-
modelValue:
|
|
50
|
+
modelValue: l.key,
|
|
51
51
|
placeholder: "Key",
|
|
52
|
-
required:
|
|
53
|
-
onBlur: n[0] || (n[0] = (
|
|
54
|
-
onFocus: n[1] || (n[1] = (
|
|
55
|
-
onInput: (
|
|
56
|
-
onSelectVariable: (
|
|
57
|
-
"onUpdate:modelValue": (
|
|
52
|
+
required: l.required,
|
|
53
|
+
onBlur: n[0] || (n[0] = (o) => t("inputBlur")),
|
|
54
|
+
onFocus: n[1] || (n[1] = (o) => t("inputFocus")),
|
|
55
|
+
onInput: (o) => e.items && a === e.items.length - 1 && t("addRow"),
|
|
56
|
+
onSelectVariable: (o) => b(a, "key", o),
|
|
57
|
+
"onUpdate:modelValue": (o) => t("updateRow", a, "key", o)
|
|
58
58
|
}, null, 8, ["modelValue", "required", "onInput", "onSelectVariable", "onUpdate:modelValue"])
|
|
59
59
|
]),
|
|
60
60
|
_: 2
|
|
@@ -65,34 +65,35 @@ const M = (s) => (E("data-v-8e8bfed1"), s = s(), T(), s), O = { class: "text-c-2
|
|
|
65
65
|
disableCloseBrackets: "",
|
|
66
66
|
disableEnter: "",
|
|
67
67
|
disableTabIndent: "",
|
|
68
|
-
enum:
|
|
69
|
-
max:
|
|
70
|
-
min:
|
|
71
|
-
modelValue:
|
|
68
|
+
enum: l.enum,
|
|
69
|
+
max: l.maximum,
|
|
70
|
+
min: l.minimum,
|
|
71
|
+
modelValue: l.value,
|
|
72
|
+
nullable: l.nullable,
|
|
72
73
|
placeholder: "Value",
|
|
73
|
-
type:
|
|
74
|
-
onBlur: n[2] || (n[2] = (
|
|
75
|
-
onFocus: n[3] || (n[3] = (
|
|
76
|
-
onInput: (
|
|
77
|
-
onSelectVariable: (
|
|
78
|
-
"onUpdate:modelValue": (
|
|
79
|
-
},
|
|
74
|
+
type: l.type,
|
|
75
|
+
onBlur: n[2] || (n[2] = (o) => t("inputBlur")),
|
|
76
|
+
onFocus: n[3] || (n[3] = (o) => t("inputFocus")),
|
|
77
|
+
onInput: (o) => e.items && a === e.items.length - 1 && t("addRow"),
|
|
78
|
+
onSelectVariable: (o) => b(a, "value", o),
|
|
79
|
+
"onUpdate:modelValue": (o) => t("updateRow", a, "value", o)
|
|
80
|
+
}, C({
|
|
80
81
|
icon: r(() => [
|
|
81
|
-
$(
|
|
82
|
+
$(l) ? (u(), d(A, {
|
|
82
83
|
key: 0,
|
|
83
|
-
item: { ...
|
|
84
|
+
item: { ...l, default: R(l) }
|
|
84
85
|
}, null, 8, ["item"])) : c("", !0)
|
|
85
86
|
]),
|
|
86
87
|
_: 2
|
|
87
88
|
}, [
|
|
88
|
-
v(
|
|
89
|
+
v(l).value ? {
|
|
89
90
|
name: "warning",
|
|
90
91
|
fn: r(() => [
|
|
91
|
-
|
|
92
|
+
U(V(v(l).value), 1)
|
|
92
93
|
]),
|
|
93
94
|
key: "0"
|
|
94
95
|
} : void 0
|
|
95
|
-
]), 1032, ["enum", "max", "min", "modelValue", "type", "onInput", "onSelectVariable", "onUpdate:modelValue"])
|
|
96
|
+
]), 1032, ["enum", "max", "min", "modelValue", "nullable", "type", "onInput", "onSelectVariable", "onUpdate:modelValue"])
|
|
96
97
|
]),
|
|
97
98
|
_: 2
|
|
98
99
|
}, 1024),
|
|
@@ -101,11 +102,11 @@ const M = (s) => (E("data-v-8e8bfed1"), s = s(), T(), s), O = { class: "text-c-2
|
|
|
101
102
|
class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
|
|
102
103
|
}, {
|
|
103
104
|
default: r(() => {
|
|
104
|
-
var
|
|
105
|
+
var o;
|
|
105
106
|
return [
|
|
106
|
-
|
|
107
|
+
l.file ? (u(), y(w, { key: 0 }, [
|
|
107
108
|
p("div", O, [
|
|
108
|
-
p("span", null, V((
|
|
109
|
+
p("span", null, V((o = l.file) == null ? void 0 : o.name), 1)
|
|
109
110
|
]),
|
|
110
111
|
p("button", {
|
|
111
112
|
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",
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.17",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -116,11 +116,11 @@
|
|
|
116
116
|
"zod": "^3.22.4",
|
|
117
117
|
"@scalar/components": "0.12.13",
|
|
118
118
|
"@scalar/draggable": "0.1.3",
|
|
119
|
-
"@scalar/oas-utils": "0.2.13",
|
|
120
|
-
"@scalar/themes": "0.9.13",
|
|
121
|
-
"@scalar/use-toasts": "0.7.4",
|
|
122
119
|
"@scalar/object-utils": "1.1.4",
|
|
120
|
+
"@scalar/themes": "0.9.13",
|
|
123
121
|
"@scalar/use-codemirror": "0.11.6",
|
|
122
|
+
"@scalar/oas-utils": "0.2.13",
|
|
123
|
+
"@scalar/use-toasts": "0.7.4",
|
|
124
124
|
"@scalar/use-tooltip": "1.0.2"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
"scripts": {
|
|
144
144
|
"build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",
|
|
145
145
|
"dev": "vite",
|
|
146
|
-
"playground:app": "vite ./playground/app -c ./vite.config.ts",
|
|
147
|
-
"playground:modal": "vite ./playground/modal -c ./vite.config.ts",
|
|
148
146
|
"lint:check": "eslint .",
|
|
149
147
|
"lint:fix": "eslint . --fix",
|
|
148
|
+
"playground:app": "vite ./playground/app -c ./vite.config.ts",
|
|
149
|
+
"playground:modal": "vite ./playground/modal -c ./vite.config.ts",
|
|
150
150
|
"preview": "vite preview",
|
|
151
151
|
"test": "vitest",
|
|
152
152
|
"types:build": "vue-tsc -p tsconfig.build.json",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInputEnumSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInputEnumSelect.vue"],"names":[],"mappings":";gBA+Hc,MAAM,GAAG,MAAM;WACpB,MAAM,EAAE;;;;gBADH,MAAM,GAAG,MAAM;WACpB,MAAM,EAAE;;;;AA8SjB,wBAOG;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,102 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, computed as b, ref as d, watch as B, openBlock as o, createElementBlock as m, withDirectives as z, withKeys as N, vModelText as j, createBlock as p, unref as t, withCtx as u, Fragment as E, renderList as I, createElementVNode as i, normalizeClass as T, createVNode as s, createTextVNode as A, toDisplayString as w, createCommentVNode as K } from "vue";
|
|
2
|
-
import { ScalarDropdown as $, ScalarDropdownItem as V, ScalarIcon as v, ScalarDropdownDivider as F, ScalarButton as L } from "@scalar/components";
|
|
3
|
-
const M = { class: "w-full" }, U = { class: "flex items-center justify-center h-4 w-4" }, W = /* @__PURE__ */ i("span", null, "Add value", -1), J = /* @__PURE__ */ D({
|
|
4
|
-
__name: "DataTableInputEnumSelect",
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: {},
|
|
7
|
-
enum: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(k, { emit: y }) {
|
|
11
|
-
const f = k, x = y, _ = b(() => f.enum ?? []), n = d(f.modelValue.toString()), r = d(!1), l = d("");
|
|
12
|
-
B(l, (a) => {
|
|
13
|
-
x("update:modelValue", a);
|
|
14
|
-
});
|
|
15
|
-
const h = (a) => {
|
|
16
|
-
n.value = a, x("update:modelValue", a), r.value = !1;
|
|
17
|
-
}, g = () => {
|
|
18
|
-
l.value.trim() && (h(l.value), l.value = "");
|
|
19
|
-
}, C = () => {
|
|
20
|
-
l.value.trim() || (n.value = "", r.value = !1);
|
|
21
|
-
}, S = (a) => n.value === a;
|
|
22
|
-
return (a, c) => (o(), m("div", M, [
|
|
23
|
-
r.value ? z((o(), m("input", {
|
|
24
|
-
key: 0,
|
|
25
|
-
"onUpdate:modelValue": c[0] || (c[0] = (e) => l.value = e),
|
|
26
|
-
class: "border-none focus:text-c-1 text-c-2 min-w-0 w-full px-2 py-1.5 outline-none",
|
|
27
|
-
placeholder: "Value",
|
|
28
|
-
type: "text",
|
|
29
|
-
onBlur: C,
|
|
30
|
-
onKeyup: N(g, ["enter"])
|
|
31
|
-
}, null, 544)), [
|
|
32
|
-
[j, l.value]
|
|
33
|
-
]) : (o(), p(t($), {
|
|
34
|
-
key: 1,
|
|
35
|
-
resize: "",
|
|
36
|
-
value: n.value
|
|
37
|
-
}, {
|
|
38
|
-
items: u(() => [
|
|
39
|
-
(o(!0), m(E, null, I(_.value, (e) => (o(), p(t(V), {
|
|
40
|
-
key: e,
|
|
41
|
-
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
|
|
42
|
-
value: e,
|
|
43
|
-
onClick: (q) => h(e)
|
|
44
|
-
}, {
|
|
45
|
-
default: u(() => [
|
|
46
|
-
i("div", {
|
|
47
|
-
class: T([
|
|
48
|
-
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
49
|
-
S(e) ? "bg-blue text-b-1" : "text-transparent"
|
|
50
|
-
])
|
|
51
|
-
}, [
|
|
52
|
-
s(t(v), {
|
|
53
|
-
class: "size-2.5 stroke-[1.75]",
|
|
54
|
-
icon: "Checkmark"
|
|
55
|
-
})
|
|
56
|
-
], 2),
|
|
57
|
-
A(" " + w(e), 1)
|
|
58
|
-
]),
|
|
59
|
-
_: 2
|
|
60
|
-
}, 1032, ["value", "onClick"]))), 128)),
|
|
61
|
-
s(t(F)),
|
|
62
|
-
s(t(V), {
|
|
63
|
-
class: "flex items-center gap-1.5",
|
|
64
|
-
onClick: c[1] || (c[1] = (e) => r.value = !0)
|
|
65
|
-
}, {
|
|
66
|
-
default: u(() => [
|
|
67
|
-
i("div", U, [
|
|
68
|
-
s(t(v), {
|
|
69
|
-
class: "h-2.5",
|
|
70
|
-
icon: "Add"
|
|
71
|
-
})
|
|
72
|
-
]),
|
|
73
|
-
W
|
|
74
|
-
]),
|
|
75
|
-
_: 1
|
|
76
|
-
})
|
|
77
|
-
]),
|
|
78
|
-
default: u(() => [
|
|
79
|
-
s(t(L), {
|
|
80
|
-
class: "gap-1.5 font-normal h-full justify-start px-2 py-1.5",
|
|
81
|
-
fullWidth: "",
|
|
82
|
-
variant: "ghost"
|
|
83
|
-
}, {
|
|
84
|
-
default: u(() => [
|
|
85
|
-
i("span", null, w(n.value || "Select a value"), 1),
|
|
86
|
-
n.value ? K("", !0) : (o(), p(t(v), {
|
|
87
|
-
key: 0,
|
|
88
|
-
icon: "ChevronDown",
|
|
89
|
-
size: "xs"
|
|
90
|
-
}))
|
|
91
|
-
]),
|
|
92
|
-
_: 1
|
|
93
|
-
})
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
}, 8, ["value"]))
|
|
97
|
-
]));
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
export {
|
|
101
|
-
J as default
|
|
102
|
-
};
|