@scalar/api-reference 1.25.102 → 1.25.104
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 +41 -0
- package/dist/blocks/constants.d.ts +9 -0
- package/dist/blocks/constants.d.ts.map +1 -0
- package/dist/blocks/constants.js +8 -0
- package/dist/blocks/helpers/getPointer.d.ts +22 -0
- package/dist/blocks/helpers/getPointer.d.ts.map +1 -0
- package/dist/blocks/helpers/getPointer.js +12 -0
- package/dist/blocks/hooks/useBlockProps.d.ts +32 -0
- package/dist/blocks/hooks/useBlockProps.d.ts.map +1 -0
- package/dist/blocks/hooks/useBlockProps.js +28 -0
- package/dist/browser/standalone.js +12846 -12739
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.js +31 -31
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +2 -1
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +1 -1
- package/dist/components/Content/Introduction/Introduction.vue2.js +84 -70
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +2 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +118 -111
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +3 -3
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +91 -77
- package/dist/components/Content/Schema/helpers/formatExample.d.ts +5 -0
- package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/formatExample.js +6 -0
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts +9 -0
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.js +20 -0
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +30 -27
- package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ModernLayout.vue.js +2 -2
- package/dist/components/Layouts/ModernLayout.vue2.js +55 -50
- package/dist/features/ApiClientModal/useApiClient.d.ts +336 -254
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
- package/dist/features/DownloadLink/DownloadLink.vue2.js +10 -3
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +37 -26
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationResponses.vue.js +8 -7
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +2 -2
- package/dist/features/Operation/components/ParameterList.vue2.js +18 -16
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +2 -0
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +27 -25
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +3 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +108 -101
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +3 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +54 -50
- package/dist/helpers/get-request.d.ts +2 -0
- package/dist/helpers/get-request.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +88 -68
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -83
- package/dist/style.css +1 -1
- package/package.json +11 -12
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts +0 -10
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -7
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -30
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts +0 -11
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/DarkModeToggle.vue.js +0 -7
- package/dist/components/DarkModeToggle/DarkModeToggle.vue2.js +0 -31
- package/dist/components/DarkModeToggle/index.d.ts +0 -3
- package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
- package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts +0 -10
- package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts.map +0 -1
- package/dist/embeds/ExampleRequest/index.d.ts +0 -2
- package/dist/embeds/ExampleRequest/index.d.ts.map +0 -1
- package/dist/embeds/ExampleResponses/ExampleResponses.vue.d.ts +0 -7
- package/dist/embeds/ExampleResponses/ExampleResponses.vue.d.ts.map +0 -1
- package/dist/embeds/ExampleResponses/index.d.ts +0 -2
- package/dist/embeds/ExampleResponses/index.d.ts.map +0 -1
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +0 -782
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +0 -1
- package/dist/embeds/OpenApiDocument/index.d.ts +0 -3
- package/dist/embeds/OpenApiDocument/index.d.ts.map +0 -1
- package/dist/embeds/OpenApiDocument/types.d.ts +0 -3
- package/dist/embeds/OpenApiDocument/types.d.ts.map +0 -1
- package/dist/embeds/index.d.ts +0 -4
- package/dist/embeds/index.d.ts.map +0 -1
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { defineComponent as W, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as W, computed as v, openBlock as l, createElementBlock as t, normalizeClass as G, createVNode as n, createSlots as X, withCtx as y, createTextVNode as E, toDisplayString as r, unref as i, createCommentVNode as s, createElementVNode as c, Fragment as u, renderList as m, createBlock as S } from "vue";
|
|
2
|
+
import { formatExample as Y } from "./helpers/formatExample.js";
|
|
3
|
+
import { optimizeValueForDisplay as _, discriminators as x } from "./helpers/optimizeValueForDisplay.js";
|
|
4
|
+
import { Disclosure as ee, DisclosurePanel as le, DisclosureButton as te } from "@headlessui/vue";
|
|
5
|
+
import { ScalarMarkdown as B, ScalarIcon as ae } from "@scalar/components";
|
|
6
|
+
import h from "./Schema.vue.js";
|
|
7
|
+
import oe from "./SchemaPropertyHeading.vue.js";
|
|
8
|
+
const se = {
|
|
7
9
|
key: 0,
|
|
8
10
|
class: "property-description"
|
|
9
|
-
},
|
|
11
|
+
}, ne = {
|
|
10
12
|
key: 1,
|
|
11
13
|
class: "property-description"
|
|
12
|
-
},
|
|
14
|
+
}, re = {
|
|
13
15
|
key: 2,
|
|
14
16
|
class: "property-example custom-scroll"
|
|
15
|
-
},
|
|
17
|
+
}, ie = { class: "property-example-value" }, ue = {
|
|
16
18
|
key: 3,
|
|
17
19
|
class: "property-example custom-scroll"
|
|
18
|
-
},
|
|
20
|
+
}, pe = { class: "property-example-label" }, me = {
|
|
19
21
|
key: 4,
|
|
20
22
|
class: "property-enum"
|
|
21
|
-
},
|
|
23
|
+
}, de = {
|
|
22
24
|
key: 0,
|
|
23
25
|
class: "property-list"
|
|
24
|
-
},
|
|
26
|
+
}, ce = { class: "property-heading" }, ve = { class: "property-name" }, ye = { class: "property-description" }, fe = {
|
|
25
27
|
key: 1,
|
|
26
28
|
class: "property-enum-values"
|
|
27
|
-
},
|
|
29
|
+
}, he = {
|
|
28
30
|
key: 5,
|
|
29
31
|
class: "children"
|
|
30
|
-
},
|
|
32
|
+
}, ge = {
|
|
31
33
|
key: 0,
|
|
32
34
|
class: "children"
|
|
33
|
-
},
|
|
35
|
+
}, ke = {
|
|
34
36
|
key: 0,
|
|
35
37
|
class: "property-rule"
|
|
36
|
-
},
|
|
38
|
+
}, be = {
|
|
37
39
|
key: 1,
|
|
38
40
|
class: "property-rule"
|
|
39
|
-
},
|
|
41
|
+
}, je = /* @__PURE__ */ W({
|
|
40
42
|
__name: "SchemaProperty",
|
|
41
43
|
props: {
|
|
42
44
|
value: {},
|
|
@@ -45,10 +47,11 @@ const te = {
|
|
|
45
47
|
required: { type: Boolean, default: !1 },
|
|
46
48
|
compact: { type: Boolean, default: !1 },
|
|
47
49
|
description: {},
|
|
48
|
-
additional: { type: Boolean }
|
|
50
|
+
additional: { type: Boolean },
|
|
51
|
+
withExamples: { type: Boolean, default: !0 }
|
|
49
52
|
},
|
|
50
|
-
setup(
|
|
51
|
-
const
|
|
53
|
+
setup(J) {
|
|
54
|
+
const f = J, D = {
|
|
52
55
|
integer: {
|
|
53
56
|
_default: "Integer numbers.",
|
|
54
57
|
int32: "Signed 32-bit integers (commonly used integer type).",
|
|
@@ -61,158 +64,162 @@ const te = {
|
|
|
61
64
|
byte: "base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==",
|
|
62
65
|
binary: "binary data, used to describe files"
|
|
63
66
|
}
|
|
64
|
-
},
|
|
65
|
-
return
|
|
67
|
+
}, w = function(e, o) {
|
|
68
|
+
return o != null && o.properties || o != null && o.additionalProperties ? null : e || (o == null ? void 0 : o.description) || null;
|
|
66
69
|
}, C = function(e) {
|
|
67
|
-
return !e || !
|
|
68
|
-
},
|
|
69
|
-
var
|
|
70
|
-
return (e == null ? void 0 : e.enum) || ((
|
|
71
|
-
},
|
|
72
|
-
() =>
|
|
73
|
-
),
|
|
74
|
-
() =>
|
|
75
|
-
),
|
|
76
|
-
return (e,
|
|
77
|
-
var
|
|
70
|
+
return !e || !D[e.type] ? null : D[e.type][e.format || "_default"];
|
|
71
|
+
}, d = function(e) {
|
|
72
|
+
var o;
|
|
73
|
+
return (e == null ? void 0 : e.enum) || ((o = e == null ? void 0 : e.items) == null ? void 0 : o.enum) || [];
|
|
74
|
+
}, P = v(() => d(f.value).length > 9), j = v(() => P.value ? 5 : 9), K = v(
|
|
75
|
+
() => d(f.value).slice(0, j.value)
|
|
76
|
+
), Q = v(
|
|
77
|
+
() => d(f.value).slice(j.value)
|
|
78
|
+
), g = v(() => _(f.value));
|
|
79
|
+
return (e, o) => {
|
|
80
|
+
var F, N, V, q, z, I, L, H, O, R, T, U, Z;
|
|
78
81
|
return l(), t("div", {
|
|
79
|
-
class:
|
|
82
|
+
class: G(["property", [
|
|
80
83
|
`property--level-${e.level}`,
|
|
81
84
|
{
|
|
82
85
|
"property--compact": e.compact,
|
|
83
|
-
"property--deprecated": (
|
|
86
|
+
"property--deprecated": (F = e.value) == null ? void 0 : F.deprecated
|
|
84
87
|
}
|
|
85
88
|
]])
|
|
86
89
|
}, [
|
|
87
|
-
|
|
90
|
+
n(oe, {
|
|
88
91
|
additional: e.additional,
|
|
89
|
-
enum:
|
|
92
|
+
enum: d(e.value).length > 0,
|
|
90
93
|
required: e.required,
|
|
91
|
-
value:
|
|
94
|
+
value: g.value
|
|
92
95
|
}, X({ _: 2 }, [
|
|
93
96
|
e.name ? {
|
|
94
97
|
name: "name",
|
|
95
|
-
fn:
|
|
96
|
-
|
|
98
|
+
fn: y(() => [
|
|
99
|
+
E(r(e.name), 1)
|
|
97
100
|
]),
|
|
98
101
|
key: "0"
|
|
99
102
|
} : void 0,
|
|
100
103
|
(N = e.value) != null && N.example ? {
|
|
101
104
|
name: "example",
|
|
102
|
-
fn:
|
|
103
|
-
|
|
105
|
+
fn: y(() => [
|
|
106
|
+
E(" Example: " + r(e.value.example), 1)
|
|
104
107
|
]),
|
|
105
108
|
key: "1"
|
|
106
109
|
} : void 0
|
|
107
110
|
]), 1032, ["additional", "enum", "required", "value"]),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
value:
|
|
111
|
+
w(e.description, e.value) ? (l(), t("div", se, [
|
|
112
|
+
n(i(B), {
|
|
113
|
+
value: w(e.description, e.value)
|
|
111
114
|
}, null, 8, ["value"])
|
|
112
|
-
])) : C(e.value) ? (l(), t("div",
|
|
113
|
-
|
|
115
|
+
])) : C(e.value) ? (l(), t("div", ne, [
|
|
116
|
+
n(i(B), {
|
|
114
117
|
value: C(e.value) || ""
|
|
115
118
|
}, null, 8, ["value"])
|
|
116
|
-
])) :
|
|
117
|
-
(
|
|
118
|
-
|
|
119
|
-
c("code",
|
|
120
|
-
])) :
|
|
121
|
-
(
|
|
122
|
-
c("span",
|
|
123
|
-
(l(!0), t(
|
|
124
|
-
key:
|
|
119
|
+
])) : s("", !0),
|
|
120
|
+
e.withExamples && ((V = e.value) != null && V.example || (z = (q = e.value) == null ? void 0 : q.items) != null && z.example) ? (l(), t("div", re, [
|
|
121
|
+
o[0] || (o[0] = c("span", { class: "property-example-label" }, "Example", -1)),
|
|
122
|
+
c("code", ie, r(i(Y)(e.value.example || ((I = e.value) == null ? void 0 : I.items.example))), 1)
|
|
123
|
+
])) : s("", !0),
|
|
124
|
+
(L = e.value) != null && L.examples && typeof e.value.examples == "object" && Object.keys(e.value.examples).length > 0 ? (l(), t("div", ue, [
|
|
125
|
+
c("span", pe, r(Object.keys(e.value.examples).length === 1 ? "Example" : "Examples"), 1),
|
|
126
|
+
(l(!0), t(u, null, m(e.value.examples, (a, p) => (l(), t("code", {
|
|
127
|
+
key: p,
|
|
125
128
|
class: "property-example-value"
|
|
126
|
-
},
|
|
127
|
-
])) :
|
|
128
|
-
((
|
|
129
|
-
(
|
|
130
|
-
(l(!0), t(
|
|
131
|
-
key:
|
|
129
|
+
}, r(a), 1))), 128))
|
|
130
|
+
])) : s("", !0),
|
|
131
|
+
((H = d(e.value)) == null ? void 0 : H.length) > 0 ? (l(), t("div", me, [
|
|
132
|
+
(O = e.value) != null && O["x-enumDescriptions"] ? (l(), t("div", de, [
|
|
133
|
+
(l(!0), t(u, null, m(d(e.value), (a) => (l(), t("div", {
|
|
134
|
+
key: a,
|
|
132
135
|
class: "property"
|
|
133
136
|
}, [
|
|
134
|
-
c("div",
|
|
135
|
-
c("div",
|
|
137
|
+
c("div", ce, [
|
|
138
|
+
c("div", ve, r(a), 1)
|
|
136
139
|
]),
|
|
137
|
-
c("div",
|
|
138
|
-
|
|
139
|
-
value: e.value["x-enumDescriptions"][
|
|
140
|
+
c("div", ye, [
|
|
141
|
+
n(i(B), {
|
|
142
|
+
value: e.value["x-enumDescriptions"][a]
|
|
140
143
|
}, null, 8, ["value"])
|
|
141
144
|
])
|
|
142
145
|
]))), 128))
|
|
143
|
-
])) : (l(), t("ul",
|
|
144
|
-
(l(!0), t(
|
|
145
|
-
key:
|
|
146
|
+
])) : (l(), t("ul", fe, [
|
|
147
|
+
(l(!0), t(u, null, m(K.value, (a) => (l(), t("li", {
|
|
148
|
+
key: a,
|
|
146
149
|
class: "property-enum-value"
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
default:
|
|
150
|
-
|
|
151
|
-
default:
|
|
152
|
-
(l(!0), t(
|
|
153
|
-
key:
|
|
150
|
+
}, r(a), 1))), 128)),
|
|
151
|
+
P.value ? (l(), S(i(ee), { key: 0 }, {
|
|
152
|
+
default: y(({ open: a }) => [
|
|
153
|
+
n(i(le), null, {
|
|
154
|
+
default: y(() => [
|
|
155
|
+
(l(!0), t(u, null, m(Q.value, (p) => (l(), t("li", {
|
|
156
|
+
key: p,
|
|
154
157
|
class: "property-enum-value"
|
|
155
|
-
},
|
|
158
|
+
}, r(p), 1))), 128))
|
|
156
159
|
]),
|
|
157
160
|
_: 1
|
|
158
161
|
}),
|
|
159
|
-
|
|
160
|
-
default:
|
|
161
|
-
|
|
162
|
-
class:
|
|
162
|
+
n(i(te), { class: "enum-toggle-button" }, {
|
|
163
|
+
default: y(() => [
|
|
164
|
+
n(i(ae), {
|
|
165
|
+
class: G(["enum-toggle-button-icon", { "enum-toggle-button-icon--open": a }]),
|
|
163
166
|
icon: "Add",
|
|
164
167
|
size: "sm"
|
|
165
168
|
}, null, 8, ["class"]),
|
|
166
|
-
|
|
169
|
+
E(" " + r(a ? "Hide values" : "Show all values"), 1)
|
|
167
170
|
]),
|
|
168
171
|
_: 2
|
|
169
172
|
}, 1024)
|
|
170
173
|
]),
|
|
171
174
|
_: 1
|
|
172
|
-
})) :
|
|
175
|
+
})) : s("", !0)
|
|
173
176
|
]))
|
|
174
|
-
])) :
|
|
175
|
-
((
|
|
176
|
-
|
|
177
|
+
])) : s("", !0),
|
|
178
|
+
((R = e.value) == null ? void 0 : R.type) === "object" && ((T = e.value) != null && T.properties || (U = e.value) != null && U.additionalProperties) ? (l(), t("div", he, [
|
|
179
|
+
n(h, {
|
|
177
180
|
compact: e.compact,
|
|
178
181
|
level: e.level + 1,
|
|
179
182
|
value: e.value
|
|
180
183
|
}, null, 8, ["compact", "level", "value"])
|
|
181
|
-
])) :
|
|
182
|
-
(
|
|
183
|
-
["object"].includes(e.value.items.type) ? (l(), t("div",
|
|
184
|
-
|
|
184
|
+
])) : s("", !0),
|
|
185
|
+
(Z = e.value) != null && Z.items ? (l(), t(u, { key: 6 }, [
|
|
186
|
+
["object"].includes(e.value.items.type) ? (l(), t("div", ge, [
|
|
187
|
+
n(h, {
|
|
185
188
|
compact: e.compact,
|
|
186
189
|
level: e.level + 1,
|
|
187
190
|
value: e.value.items
|
|
188
191
|
}, null, 8, ["compact", "level", "value"])
|
|
189
|
-
])) :
|
|
190
|
-
], 64)) :
|
|
191
|
-
(l(), t(
|
|
192
|
-
var
|
|
193
|
-
return l(), t(
|
|
194
|
-
(
|
|
195
|
-
(l(!0), t(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
192
|
+
])) : s("", !0)
|
|
193
|
+
], 64)) : s("", !0),
|
|
194
|
+
(l(!0), t(u, null, m(i(x), (a) => {
|
|
195
|
+
var p, A, M;
|
|
196
|
+
return l(), t(u, { key: a }, [
|
|
197
|
+
(p = g.value) != null && p[a] ? (l(), t("div", ke, [
|
|
198
|
+
(l(!0), t(u, null, m(g.value[a], (k, b) => {
|
|
199
|
+
var $;
|
|
200
|
+
return l(), S(h, {
|
|
201
|
+
key: b,
|
|
202
|
+
compact: e.compact,
|
|
203
|
+
level: e.level + 1,
|
|
204
|
+
noncollapsible: (($ = e.value) == null ? void 0 : $[a].length) === 1,
|
|
205
|
+
value: k
|
|
206
|
+
}, null, 8, ["compact", "level", "noncollapsible", "value"]);
|
|
207
|
+
}), 128))
|
|
208
|
+
])) : s("", !0),
|
|
209
|
+
(M = (A = e.value) == null ? void 0 : A.items) != null && M[a] && e.level < 3 ? (l(), t("div", be, [
|
|
210
|
+
(l(!0), t(u, null, m(e.value.items[a], (k, b) => (l(), S(h, {
|
|
211
|
+
key: b,
|
|
205
212
|
compact: e.compact,
|
|
206
213
|
level: e.level + 1,
|
|
207
|
-
value:
|
|
214
|
+
value: k
|
|
208
215
|
}, null, 8, ["compact", "level", "value"]))), 128))
|
|
209
|
-
])) :
|
|
216
|
+
])) : s("", !0)
|
|
210
217
|
], 64);
|
|
211
|
-
}),
|
|
218
|
+
}), 128))
|
|
212
219
|
], 2);
|
|
213
220
|
};
|
|
214
221
|
}
|
|
215
222
|
});
|
|
216
223
|
export {
|
|
217
|
-
|
|
224
|
+
je as default
|
|
218
225
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaPropertyHeading.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaPropertyHeading.vue"],"names":[],"mappings":"AA2NA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AA0BJ,iBAAS,cAAc;WA0RT,OAAO,IAA6B;;sBARxB,GAAG;;;;EAa5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cAzUN,OAAO;wFAiVpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SchemaPropertyHeading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-e3aa4b0d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, openBlock as u, createElementBlock as n, renderSlot as S, createCommentVNode as t, Fragment as s, createTextVNode as
|
|
1
|
+
import { defineComponent as P, openBlock as u, createElementBlock as n, renderSlot as S, createCommentVNode as t, Fragment as s, createTextVNode as l, toDisplayString as i, createVNode as v, unref as b, withCtx as r, createBlock as d, renderList as V } from "vue";
|
|
2
2
|
import o from "./SchemaPropertyDetail.vue.js";
|
|
3
3
|
import w from "../../Badge/Badge.vue.js";
|
|
4
4
|
const C = { class: "property-heading" }, D = {
|
|
@@ -7,22 +7,22 @@ const C = { class: "property-heading" }, D = {
|
|
|
7
7
|
}, $ = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "property-additional"
|
|
10
|
-
},
|
|
10
|
+
}, j = {
|
|
11
11
|
key: 2,
|
|
12
12
|
class: "property-deprecated"
|
|
13
|
-
},
|
|
13
|
+
}, E = {
|
|
14
14
|
key: 3,
|
|
15
15
|
class: "property-const"
|
|
16
|
-
}, E = {
|
|
17
|
-
key: 5,
|
|
18
|
-
class: "property-write-only"
|
|
19
16
|
}, F = {
|
|
20
17
|
key: 6,
|
|
21
|
-
class: "property-
|
|
18
|
+
class: "property-write-only"
|
|
22
19
|
}, H = {
|
|
23
20
|
key: 7,
|
|
21
|
+
class: "property-read-only"
|
|
22
|
+
}, T = {
|
|
23
|
+
key: 8,
|
|
24
24
|
class: "property-required"
|
|
25
|
-
},
|
|
25
|
+
}, Q = /* @__PURE__ */ P({
|
|
26
26
|
__name: "SchemaPropertyHeading",
|
|
27
27
|
props: {
|
|
28
28
|
value: {},
|
|
@@ -30,119 +30,119 @@ const C = { class: "property-heading" }, D = {
|
|
|
30
30
|
required: { type: Boolean, default: !1 },
|
|
31
31
|
additional: { type: Boolean }
|
|
32
32
|
},
|
|
33
|
-
setup(
|
|
33
|
+
setup(z) {
|
|
34
34
|
const A = ["oneOf", "anyOf", "allOf", "not"], M = (e) => Array.isArray(e == null ? void 0 : e.default) && e.default.length === 1 ? e.default[0] : e == null ? void 0 : e.default;
|
|
35
|
-
return (e,
|
|
36
|
-
var f, k, g, B, q, I, L;
|
|
35
|
+
return (e, a) => {
|
|
36
|
+
var f, k, g, B, q, I, L, N;
|
|
37
37
|
return u(), n("div", C, [
|
|
38
38
|
e.$slots.name ? (u(), n("div", D, [
|
|
39
39
|
S(e.$slots, "name", {}, void 0, !0)
|
|
40
40
|
])) : t("", !0),
|
|
41
41
|
e.additional ? (u(), n("div", $, [
|
|
42
42
|
(f = e.value) != null && f["x-additionalPropertiesName"] ? (u(), n(s, { key: 0 }, [
|
|
43
|
-
|
|
43
|
+
l(i(e.value["x-additionalPropertiesName"]), 1)
|
|
44
44
|
], 64)) : (u(), n(s, { key: 1 }, [
|
|
45
|
-
|
|
45
|
+
l("additional properties")
|
|
46
46
|
], 64))
|
|
47
47
|
])) : t("", !0),
|
|
48
|
-
(k = e.value) != null && k.deprecated ? (u(), n("div",
|
|
49
|
-
v(
|
|
50
|
-
default:
|
|
51
|
-
|
|
48
|
+
(k = e.value) != null && k.deprecated ? (u(), n("div", j, [
|
|
49
|
+
v(b(w), null, {
|
|
50
|
+
default: r(() => a[0] || (a[0] = [
|
|
51
|
+
l("deprecated")
|
|
52
52
|
])),
|
|
53
53
|
_: 1
|
|
54
54
|
})
|
|
55
55
|
])) : t("", !0),
|
|
56
|
-
(g = e.value) != null && g.const || (B = e.value) != null && B.enum && e.value.enum.length === 1 ? (u(), n("div",
|
|
56
|
+
(g = e.value) != null && g.const || (B = e.value) != null && B.enum && e.value.enum.length === 1 ? (u(), n("div", E, [
|
|
57
57
|
v(o, { truncate: "" }, {
|
|
58
|
-
prefix:
|
|
59
|
-
|
|
58
|
+
prefix: r(() => a[1] || (a[1] = [
|
|
59
|
+
l("const:")
|
|
60
60
|
])),
|
|
61
|
-
default:
|
|
62
|
-
|
|
61
|
+
default: r(() => [
|
|
62
|
+
l(" " + i(e.value.const ?? e.value.enum[0]), 1)
|
|
63
63
|
]),
|
|
64
64
|
_: 1
|
|
65
65
|
})
|
|
66
66
|
])) : (q = e.value) != null && q.type ? (u(), n(s, { key: 4 }, [
|
|
67
67
|
v(o, null, {
|
|
68
|
-
default:
|
|
69
|
-
var m,
|
|
68
|
+
default: r(() => {
|
|
69
|
+
var m, y, p;
|
|
70
70
|
return [
|
|
71
|
-
(
|
|
72
|
-
|
|
71
|
+
(y = (m = e.value) == null ? void 0 : m.items) != null && y.type ? (u(), n(s, { key: 0 }, [
|
|
72
|
+
l(i(e.value.type) + " " + i(e.value.items.type) + "[] ", 1)
|
|
73
73
|
], 64)) : (u(), n(s, { key: 1 }, [
|
|
74
|
-
|
|
74
|
+
l(i(Array.isArray(e.value.type) ? e.value.type.join(" | ") : e.value.type) + " " + i((p = e.value) != null && p.nullable ? " | nullable" : ""), 1)
|
|
75
75
|
], 64)),
|
|
76
76
|
e.value.minItems || e.value.maxItems ? (u(), n(s, { key: 2 }, [
|
|
77
|
-
|
|
77
|
+
l(i(e.value.minItems) + "…" + i(e.value.maxItems), 1)
|
|
78
78
|
], 64)) : t("", !0)
|
|
79
79
|
];
|
|
80
80
|
}),
|
|
81
81
|
_: 1
|
|
82
82
|
}),
|
|
83
83
|
e.value.minLength ? (u(), d(o, { key: 0 }, {
|
|
84
|
-
prefix:
|
|
85
|
-
|
|
84
|
+
prefix: r(() => a[2] || (a[2] = [
|
|
85
|
+
l("min:")
|
|
86
86
|
])),
|
|
87
|
-
default:
|
|
88
|
-
|
|
87
|
+
default: r(() => [
|
|
88
|
+
l(" " + i(e.value.minLength), 1)
|
|
89
89
|
]),
|
|
90
90
|
_: 1
|
|
91
91
|
})) : t("", !0),
|
|
92
92
|
e.value.maxLength ? (u(), d(o, { key: 1 }, {
|
|
93
|
-
prefix:
|
|
94
|
-
|
|
93
|
+
prefix: r(() => a[3] || (a[3] = [
|
|
94
|
+
l("max:")
|
|
95
95
|
])),
|
|
96
|
-
default:
|
|
97
|
-
|
|
96
|
+
default: r(() => [
|
|
97
|
+
l(" " + i(e.value.maxLength), 1)
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
})) : t("", !0),
|
|
101
101
|
e.value.uniqueItems ? (u(), d(o, { key: 2 }, {
|
|
102
|
-
default:
|
|
103
|
-
|
|
102
|
+
default: r(() => a[4] || (a[4] = [
|
|
103
|
+
l(" unique! ")
|
|
104
104
|
])),
|
|
105
105
|
_: 1
|
|
106
106
|
})) : t("", !0),
|
|
107
107
|
e.value.format ? (u(), d(o, { key: 3 }, {
|
|
108
|
-
default:
|
|
109
|
-
|
|
108
|
+
default: r(() => [
|
|
109
|
+
l(i(e.value.format), 1)
|
|
110
110
|
]),
|
|
111
111
|
_: 1
|
|
112
112
|
})) : t("", !0),
|
|
113
113
|
e.value.minimum !== void 0 && e.value.exclusiveMinimum ? (u(), d(o, { key: 4 }, {
|
|
114
|
-
prefix:
|
|
115
|
-
|
|
114
|
+
prefix: r(() => a[5] || (a[5] = [
|
|
115
|
+
l("greater than:")
|
|
116
116
|
])),
|
|
117
|
-
default:
|
|
118
|
-
|
|
117
|
+
default: r(() => [
|
|
118
|
+
l(" " + i(e.value.minimum), 1)
|
|
119
119
|
]),
|
|
120
120
|
_: 1
|
|
121
121
|
})) : t("", !0),
|
|
122
122
|
e.value.minimum !== void 0 && !e.value.exclusiveMinimum ? (u(), d(o, { key: 5 }, {
|
|
123
|
-
prefix:
|
|
124
|
-
|
|
123
|
+
prefix: r(() => a[6] || (a[6] = [
|
|
124
|
+
l("min:")
|
|
125
125
|
])),
|
|
126
|
-
default:
|
|
127
|
-
|
|
126
|
+
default: r(() => [
|
|
127
|
+
l(" " + i(e.value.minimum), 1)
|
|
128
128
|
]),
|
|
129
129
|
_: 1
|
|
130
130
|
})) : t("", !0),
|
|
131
131
|
e.value.maximum !== void 0 && e.value.exclusiveMaximum ? (u(), d(o, { key: 6 }, {
|
|
132
|
-
prefix:
|
|
133
|
-
|
|
132
|
+
prefix: r(() => a[7] || (a[7] = [
|
|
133
|
+
l("less than:")
|
|
134
134
|
])),
|
|
135
|
-
default:
|
|
136
|
-
|
|
135
|
+
default: r(() => [
|
|
136
|
+
l(" " + i(e.value.maximum), 1)
|
|
137
137
|
]),
|
|
138
138
|
_: 1
|
|
139
139
|
})) : t("", !0),
|
|
140
140
|
e.value.maximum !== void 0 && !e.value.exclusiveMaximum ? (u(), d(o, { key: 7 }, {
|
|
141
|
-
prefix:
|
|
142
|
-
|
|
141
|
+
prefix: r(() => a[8] || (a[8] = [
|
|
142
|
+
l("max:")
|
|
143
143
|
])),
|
|
144
|
-
default:
|
|
145
|
-
|
|
144
|
+
default: r(() => [
|
|
145
|
+
l(" " + i(e.value.maximum), 1)
|
|
146
146
|
]),
|
|
147
147
|
_: 1
|
|
148
148
|
})) : t("", !0),
|
|
@@ -151,14 +151,14 @@ const C = { class: "property-heading" }, D = {
|
|
|
151
151
|
code: "",
|
|
152
152
|
truncate: ""
|
|
153
153
|
}, {
|
|
154
|
-
default:
|
|
155
|
-
|
|
154
|
+
default: r(() => [
|
|
155
|
+
l(i(e.value.pattern), 1)
|
|
156
156
|
]),
|
|
157
157
|
_: 1
|
|
158
158
|
})) : t("", !0),
|
|
159
159
|
e.$props.enum ? (u(), d(o, { key: 9 }, {
|
|
160
|
-
default:
|
|
161
|
-
|
|
160
|
+
default: r(() => a[9] || (a[9] = [
|
|
161
|
+
l("enum")
|
|
162
162
|
])),
|
|
163
163
|
_: 1
|
|
164
164
|
})) : t("", !0),
|
|
@@ -166,30 +166,44 @@ const C = { class: "property-heading" }, D = {
|
|
|
166
166
|
key: 10,
|
|
167
167
|
truncate: ""
|
|
168
168
|
}, {
|
|
169
|
-
prefix:
|
|
170
|
-
|
|
169
|
+
prefix: r(() => a[10] || (a[10] = [
|
|
170
|
+
l("default:")
|
|
171
171
|
])),
|
|
172
|
-
default:
|
|
173
|
-
|
|
172
|
+
default: r(() => [
|
|
173
|
+
l(" " + i(M(e.value)), 1)
|
|
174
174
|
]),
|
|
175
175
|
_: 1
|
|
176
176
|
})) : t("", !0)
|
|
177
|
-
], 64)) :
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
177
|
+
], 64)) : (u(), n(s, { key: 5 }, [
|
|
178
|
+
((I = e.value) == null ? void 0 : I.nullable) === !0 ? (u(), d(o, { key: 0 }, {
|
|
179
|
+
default: r(() => a[11] || (a[11] = [
|
|
180
|
+
l(" nullable ")
|
|
181
|
+
])),
|
|
182
|
+
_: 1
|
|
183
|
+
})) : t("", !0)
|
|
184
|
+
], 64)),
|
|
185
|
+
(L = e.value) != null && L.writeOnly ? (u(), n("div", F, " write-only ")) : (N = e.value) != null && N.readOnly ? (u(), n("div", H, " read-only ")) : t("", !0),
|
|
186
|
+
(u(!0), n(s, null, V(A.filter(
|
|
187
|
+
(m) => {
|
|
188
|
+
var y, p, O;
|
|
189
|
+
return ((y = e.value) == null ? void 0 : y[m]) || ((O = (p = e.value) == null ? void 0 : p.items) == null ? void 0 : O[m]);
|
|
190
|
+
}
|
|
191
|
+
), (m) => {
|
|
192
|
+
var y, p;
|
|
193
|
+
return u(), n(s, { key: m }, [
|
|
194
|
+
((p = (y = e.value) == null ? void 0 : y[m]) == null ? void 0 : p.length) > 1 ? (u(), d(b(w), { key: 0 }, {
|
|
195
|
+
default: r(() => [
|
|
196
|
+
l(i(m), 1)
|
|
197
|
+
]),
|
|
198
|
+
_: 2
|
|
199
|
+
}, 1024)) : t("", !0)
|
|
200
|
+
], 64);
|
|
201
|
+
}), 128)),
|
|
202
|
+
e.required ? (u(), n("div", T, " required ")) : t("", !0)
|
|
189
203
|
]);
|
|
190
204
|
};
|
|
191
205
|
}
|
|
192
206
|
});
|
|
193
207
|
export {
|
|
194
|
-
|
|
208
|
+
Q as default
|
|
195
209
|
};
|