@scalar/api-reference 1.29.3 → 1.30.0
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 +16 -0
- package/README.md +13 -114
- package/dist/browser/standalone.js +1864 -1773
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.vue2.js +118 -84
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +13 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +49 -0
- package/dist/components/Content/Schema/SchemaDiscriminator.vue2.js +4 -0
- 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 +123 -119
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +9 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.js +45 -0
- package/dist/components/Section/SectionHeaderTag.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeaderTag.vue.js +2 -2
- package/dist/features/ApiClientModal/useApiClient.d.ts +28 -8
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +14 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callback.vue.js +7 -0
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +62 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +10 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +30 -0
- package/dist/features/Operation/components/callbacks/Callbacks.vue2.js +4 -0
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +86 -74
- package/dist/features/Operation/types/schemas.d.ts +3 -0
- package/dist/features/Operation/types/schemas.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AA+bA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAgB9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,YAAY,GACtB,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;;WAfQ,MAAM;oBAMG,OAAO;;AA0e5B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Schema.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fce8655f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { defineComponent as F, ref as I, computed as k, watch as L, createBlock as t, createCommentVNode as o, openBlock as l, unref as n, withCtx as p, createElementVNode as V, normalizeClass as P, createElementBlock as s, withDirectives as z, createVNode as v, createTextVNode as b, toDisplayString as C, vShow as A, normalizeStyle as R, Fragment as u, renderList as M } from "vue";
|
|
2
|
+
import { Disclosure as U, DisclosureButton as q, DisclosurePanel as G } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as J, ScalarIcon as D } from "@scalar/components";
|
|
4
|
+
import { getDiscriminatorMapping as K, getDiscriminatorPropertyName as Q, mergeDiscriminatorSchemas as W } from "./helpers/schema-discriminator.js";
|
|
5
|
+
import X from "./SchemaDiscriminator.vue.js";
|
|
6
|
+
import T from "../../ScreenReader.vue.js";
|
|
7
|
+
import Y from "./SchemaHeading.vue.js";
|
|
8
|
+
import H from "./SchemaProperty.vue.js";
|
|
9
|
+
const Z = {
|
|
8
10
|
key: 0,
|
|
9
11
|
class: "schema-card-description"
|
|
10
|
-
},
|
|
12
|
+
}, _ = {
|
|
11
13
|
key: 0,
|
|
12
14
|
class: "schema-properties"
|
|
13
|
-
},
|
|
15
|
+
}, se = /* @__PURE__ */ F({
|
|
14
16
|
__name: "Schema",
|
|
15
17
|
props: {
|
|
16
18
|
value: { type: [Object, Boolean] },
|
|
@@ -22,49 +24,68 @@ const M = {
|
|
|
22
24
|
additionalProperties: { type: Boolean },
|
|
23
25
|
schemas: {}
|
|
24
26
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
|
|
27
|
+
setup($) {
|
|
28
|
+
const r = $, c = I(""), m = k(() => {
|
|
29
|
+
if (r.value)
|
|
30
|
+
return K(r.value);
|
|
31
|
+
}), E = k(() => m.value && Object.keys(m.value)[0] || ""), N = k(() => {
|
|
32
|
+
if (r.value)
|
|
33
|
+
return Q(r.value);
|
|
34
|
+
}), a = k(() => {
|
|
35
|
+
if (r.value)
|
|
36
|
+
return !m.value || !c.value ? r.value : W(
|
|
37
|
+
r.value,
|
|
38
|
+
c.value,
|
|
39
|
+
r.schemas
|
|
40
|
+
) || r.value;
|
|
41
|
+
}), O = k(() => !(r.noncollapsible || r.level === 0)), B = (e) => r.noncollapsible && e.stopPropagation();
|
|
42
|
+
return L(
|
|
43
|
+
m,
|
|
44
|
+
(e) => {
|
|
45
|
+
e && !c.value && (c.value = E.value);
|
|
46
|
+
},
|
|
47
|
+
{ immediate: !0 }
|
|
48
|
+
), (e, S) => typeof e.value == "object" && Object.keys(e.value).length ? (l(), t(n(U), {
|
|
28
49
|
key: 0,
|
|
29
50
|
defaultOpen: e.noncollapsible
|
|
30
51
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
var
|
|
52
|
+
default: p(({ open: d }) => {
|
|
53
|
+
var j;
|
|
33
54
|
return [
|
|
34
|
-
|
|
35
|
-
class:
|
|
55
|
+
V("div", {
|
|
56
|
+
class: P(["schema-card", [
|
|
36
57
|
`schema-card--level-${e.level}`,
|
|
37
|
-
{ "schema-card--compact": e.compact, "schema-card--open":
|
|
38
|
-
{ "border-t-1/2": e.additionalProperties &&
|
|
58
|
+
{ "schema-card--compact": e.compact, "schema-card--open": d },
|
|
59
|
+
{ "border-t-1/2": e.additionalProperties && d }
|
|
39
60
|
]])
|
|
40
61
|
}, [
|
|
41
|
-
(
|
|
42
|
-
|
|
62
|
+
(j = a.value) != null && j.description && typeof a.value.description == "string" && !a.value.allOf && !a.value.oneOf && !a.value.anyOf && !e.compact ? (l(), s("div", Z, [
|
|
63
|
+
a.value.enum ? o("", !0) : (l(), t(n(J), {
|
|
43
64
|
key: 0,
|
|
44
|
-
value:
|
|
65
|
+
value: a.value.description
|
|
45
66
|
}, null, 8, ["value"]))
|
|
46
67
|
])) : o("", !0),
|
|
47
|
-
|
|
48
|
-
class:
|
|
49
|
-
"schema-properties-open":
|
|
68
|
+
V("div", {
|
|
69
|
+
class: P(["schema-properties", {
|
|
70
|
+
"schema-properties-open": d
|
|
50
71
|
}])
|
|
51
72
|
}, [
|
|
52
|
-
e.additionalProperties ?
|
|
53
|
-
|
|
73
|
+
e.additionalProperties ? z((l(), s("div", _, [
|
|
74
|
+
v(n(q), {
|
|
54
75
|
as: "button",
|
|
55
76
|
class: "schema-card-title schema-card-title--compact",
|
|
56
|
-
onClickCapture:
|
|
77
|
+
onClickCapture: B
|
|
57
78
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
79
|
+
default: p(() => [
|
|
80
|
+
v(n(D), {
|
|
60
81
|
class: "schema-card-title-icon",
|
|
61
82
|
icon: "Add",
|
|
62
83
|
size: "sm"
|
|
63
84
|
}),
|
|
64
|
-
|
|
65
|
-
e.name ? (
|
|
66
|
-
default:
|
|
67
|
-
|
|
85
|
+
S[1] || (S[1] = b(" Show additional properties ")),
|
|
86
|
+
e.name ? (l(), t(T, { key: 0 }, {
|
|
87
|
+
default: p(() => [
|
|
88
|
+
b("for " + C(e.name), 1)
|
|
68
89
|
]),
|
|
69
90
|
_: 1
|
|
70
91
|
})) : o("", !0)
|
|
@@ -72,44 +93,44 @@ const M = {
|
|
|
72
93
|
_: 1
|
|
73
94
|
})
|
|
74
95
|
], 512)), [
|
|
75
|
-
[
|
|
76
|
-
]) :
|
|
96
|
+
[A, !d]
|
|
97
|
+
]) : O.value ? z((l(), t(n(q), {
|
|
77
98
|
key: 1,
|
|
78
99
|
as: e.noncollapsible ? "div" : "button",
|
|
79
|
-
class:
|
|
80
|
-
style:
|
|
100
|
+
class: P(["schema-card-title", { "schema-card-title--compact": e.compact }]),
|
|
101
|
+
style: R({
|
|
81
102
|
top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
|
|
82
103
|
}),
|
|
83
|
-
onClickCapture:
|
|
104
|
+
onClickCapture: B
|
|
84
105
|
}, {
|
|
85
|
-
default:
|
|
86
|
-
var
|
|
106
|
+
default: p(() => {
|
|
107
|
+
var h, y, f;
|
|
87
108
|
return [
|
|
88
|
-
e.compact ? (
|
|
89
|
-
|
|
90
|
-
class:
|
|
109
|
+
e.compact ? (l(), s(u, { key: 0 }, [
|
|
110
|
+
v(n(D), {
|
|
111
|
+
class: P(["schema-card-title-icon", { "schema-card-title-icon--open": d }]),
|
|
91
112
|
icon: "Add",
|
|
92
113
|
size: "sm"
|
|
93
114
|
}, null, 8, ["class"]),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
], 64)) : (
|
|
97
|
-
|
|
115
|
+
d ? (l(), s(u, { key: 0 }, [
|
|
116
|
+
b(" Hide " + C(((h = e.value) == null ? void 0 : h.title) ?? "Child Attributes"), 1)
|
|
117
|
+
], 64)) : (l(), s(u, { key: 1 }, [
|
|
118
|
+
b(" Show " + C(((y = e.value) == null ? void 0 : y.title) ?? "Child Attributes"), 1)
|
|
98
119
|
], 64)),
|
|
99
|
-
e.name ? (
|
|
100
|
-
default:
|
|
101
|
-
|
|
120
|
+
e.name ? (l(), t(T, { key: 2 }, {
|
|
121
|
+
default: p(() => [
|
|
122
|
+
b("for " + C(e.name), 1)
|
|
102
123
|
]),
|
|
103
124
|
_: 1
|
|
104
125
|
})) : o("", !0)
|
|
105
|
-
], 64)) : (
|
|
106
|
-
|
|
107
|
-
class:
|
|
126
|
+
], 64)) : (l(), s(u, { key: 1 }, [
|
|
127
|
+
v(n(D), {
|
|
128
|
+
class: P(["schema-card-title-icon", { "schema-card-title-icon--open": d }]),
|
|
108
129
|
icon: "Add",
|
|
109
130
|
size: "sm"
|
|
110
131
|
}, null, 8, ["class"]),
|
|
111
|
-
|
|
112
|
-
name: ((
|
|
132
|
+
v(Y, {
|
|
133
|
+
name: ((f = e.value) == null ? void 0 : f.title) ?? e.name,
|
|
113
134
|
value: e.value
|
|
114
135
|
}, null, 8, ["name", "value"])
|
|
115
136
|
], 64))
|
|
@@ -117,44 +138,57 @@ const M = {
|
|
|
117
138
|
}),
|
|
118
139
|
_: 2
|
|
119
140
|
}, 1032, ["as", "class", "style"])), [
|
|
120
|
-
[
|
|
141
|
+
[A, !e.hideHeading && !(e.noncollapsible && e.compact)]
|
|
121
142
|
]) : o("", !0),
|
|
122
|
-
|
|
143
|
+
v(n(G), {
|
|
123
144
|
as: "ul",
|
|
124
|
-
static: !
|
|
145
|
+
static: !O.value
|
|
125
146
|
}, {
|
|
126
|
-
default:
|
|
127
|
-
var
|
|
147
|
+
default: p(() => {
|
|
148
|
+
var h, y, f;
|
|
128
149
|
return [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
150
|
+
m.value && ((h = a.value) != null && h.properties) ? (l(), t(X, {
|
|
151
|
+
key: 0,
|
|
152
|
+
modelValue: c.value,
|
|
153
|
+
"onUpdate:modelValue": S[0] || (S[0] = (i) => c.value = i),
|
|
154
|
+
discriminatorMapping: m.value,
|
|
155
|
+
discriminatorPropertyName: N.value
|
|
156
|
+
}, null, 8, ["modelValue", "discriminatorMapping", "discriminatorPropertyName"])) : o("", !0),
|
|
157
|
+
a.value && ("properties" in a.value || "additionalProperties" in a.value || "patternProperties" in a.value) ? (l(), s(u, { key: 1 }, [
|
|
158
|
+
a.value.properties ? (l(!0), s(u, { key: 0 }, M(Object.keys(a.value.properties), (i) => {
|
|
159
|
+
var g, w;
|
|
160
|
+
return l(), t(H, {
|
|
161
|
+
key: i,
|
|
134
162
|
compact: e.compact,
|
|
135
163
|
hideHeading: e.hideHeading,
|
|
136
164
|
level: e.level + 1,
|
|
137
|
-
name:
|
|
138
|
-
required: ((
|
|
165
|
+
name: i,
|
|
166
|
+
required: ((g = a.value.required) == null ? void 0 : g.includes(i)) || ((w = a.value.properties[i]) == null ? void 0 : w.required) === !0,
|
|
139
167
|
schemas: e.schemas,
|
|
140
|
-
value:
|
|
168
|
+
value: {
|
|
169
|
+
...a.value.properties[i],
|
|
170
|
+
parent: a.value,
|
|
171
|
+
isDiscriminator: i === N.value
|
|
172
|
+
}
|
|
141
173
|
}, null, 8, ["compact", "hideHeading", "level", "name", "required", "schemas", "value"]);
|
|
142
174
|
}), 128)) : o("", !0),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
175
|
+
a.value.patternProperties ? (l(!0), s(u, { key: 1 }, M(Object.keys(
|
|
176
|
+
a.value.patternProperties
|
|
177
|
+
), (i) => {
|
|
178
|
+
var g;
|
|
179
|
+
return l(), t(H, {
|
|
180
|
+
key: i,
|
|
147
181
|
compact: e.compact,
|
|
148
182
|
hideHeading: e.hideHeading,
|
|
149
183
|
level: e.level,
|
|
150
|
-
name:
|
|
184
|
+
name: i,
|
|
151
185
|
pattern: "",
|
|
152
186
|
schemas: e.schemas,
|
|
153
|
-
value: (
|
|
187
|
+
value: ((g = e.value.discriminator) == null ? void 0 : g.propertyName) === i ? e.value : a.value.patternProperties[i]
|
|
154
188
|
}, null, 8, ["compact", "hideHeading", "level", "name", "schemas", "value"]);
|
|
155
189
|
}), 128)) : o("", !0),
|
|
156
|
-
|
|
157
|
-
|
|
190
|
+
a.value.additionalProperties ? (l(), s(u, { key: 2 }, [
|
|
191
|
+
a.value.additionalProperties === !0 || Object.keys(a.value.additionalProperties).length === 0 || !("type" in a.value.additionalProperties) ? (l(), t(H, {
|
|
158
192
|
key: 0,
|
|
159
193
|
additional: "",
|
|
160
194
|
compact: e.compact,
|
|
@@ -164,9 +198,9 @@ const M = {
|
|
|
164
198
|
schemas: e.schemas,
|
|
165
199
|
value: {
|
|
166
200
|
type: "anything",
|
|
167
|
-
...typeof
|
|
201
|
+
...typeof a.value.additionalProperties == "object" ? a.value.additionalProperties : {}
|
|
168
202
|
}
|
|
169
|
-
}, null, 8, ["compact", "hideHeading", "level", "schemas", "value"])) : (
|
|
203
|
+
}, null, 8, ["compact", "hideHeading", "level", "schemas", "value"])) : (l(), t(H, {
|
|
170
204
|
key: 1,
|
|
171
205
|
additional: "",
|
|
172
206
|
compact: e.compact,
|
|
@@ -174,17 +208,17 @@ const M = {
|
|
|
174
208
|
level: e.level,
|
|
175
209
|
noncollapsible: "",
|
|
176
210
|
schemas: e.schemas,
|
|
177
|
-
value: e.value.additionalProperties
|
|
211
|
+
value: ((y = e.value.discriminator) == null ? void 0 : y.propertyName) === e.name ? e.value : a.value.additionalProperties
|
|
178
212
|
}, null, 8, ["compact", "hideHeading", "level", "schemas", "value"]))
|
|
179
213
|
], 64)) : o("", !0)
|
|
180
|
-
], 64)) : (
|
|
181
|
-
key:
|
|
214
|
+
], 64)) : (l(), t(H, {
|
|
215
|
+
key: 2,
|
|
182
216
|
compact: e.compact,
|
|
183
217
|
hideHeading: e.hideHeading,
|
|
184
218
|
level: e.level,
|
|
185
|
-
name:
|
|
219
|
+
name: a.value.name,
|
|
186
220
|
schemas: e.schemas,
|
|
187
|
-
value: e.value
|
|
221
|
+
value: ((f = e.value.discriminator) == null ? void 0 : f.propertyName) === e.name ? e.value : a.value
|
|
188
222
|
}, null, 8, ["compact", "hideHeading", "level", "name", "schemas", "value"]))
|
|
189
223
|
];
|
|
190
224
|
}),
|
|
@@ -199,5 +233,5 @@ const M = {
|
|
|
199
233
|
}
|
|
200
234
|
});
|
|
201
235
|
export {
|
|
202
|
-
|
|
236
|
+
se as default
|
|
203
237
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DiscriminatorMapping, DiscriminatorPropertyName } from './helpers/schema-discriminator.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
discriminatorMapping: DiscriminatorMapping;
|
|
4
|
+
modelValue: string;
|
|
5
|
+
discriminatorPropertyName?: DiscriminatorPropertyName;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
"update:modelValue": (value: string) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=SchemaDiscriminator.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAA;AAIvC,KAAK,WAAW,GAAG;IACf,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB,CAAC,EAAE,yBAAyB,CAAA;CACtD,CAAC;;;;;;AAiHJ,wBAQG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as c, computed as n, createBlock as u, openBlock as b, unref as s, withCtx as f, createElementVNode as i, createVNode as V, toDisplayString as m } from "vue";
|
|
2
|
+
import { ScalarListbox as x } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as g } from "@scalar/icons";
|
|
4
|
+
const v = {
|
|
5
|
+
class: "bg-b-1.5 hover:bg-b-2 py-1.25 flex w-full items-center gap-1 border-b px-2",
|
|
6
|
+
type: "button"
|
|
7
|
+
}, y = { class: "composition-selector-label text-c-1 relative" }, _ = /* @__PURE__ */ c({
|
|
8
|
+
__name: "SchemaDiscriminator",
|
|
9
|
+
props: {
|
|
10
|
+
discriminatorMapping: {},
|
|
11
|
+
modelValue: {},
|
|
12
|
+
discriminatorPropertyName: {}
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(l, { emit: p }) {
|
|
16
|
+
const d = p, r = n(
|
|
17
|
+
() => Object.keys(l.discriminatorMapping).map((e) => ({
|
|
18
|
+
id: e,
|
|
19
|
+
label: e
|
|
20
|
+
}))
|
|
21
|
+
), a = n({
|
|
22
|
+
get: () => r.value.find(
|
|
23
|
+
(e) => e.id === l.modelValue
|
|
24
|
+
),
|
|
25
|
+
set: (e) => d("update:modelValue", e.id)
|
|
26
|
+
});
|
|
27
|
+
return (e, t) => (b(), u(s(x), {
|
|
28
|
+
modelValue: a.value,
|
|
29
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => a.value = o),
|
|
30
|
+
options: r.value,
|
|
31
|
+
resize: ""
|
|
32
|
+
}, {
|
|
33
|
+
default: f(() => {
|
|
34
|
+
var o;
|
|
35
|
+
return [
|
|
36
|
+
i("button", v, [
|
|
37
|
+
t[1] || (t[1] = i("span", { class: "text-c-2" }, "Discriminator", -1)),
|
|
38
|
+
i("span", y, m(e.discriminatorPropertyName) + " " + m((o = a.value) == null ? void 0 : o.label), 1),
|
|
39
|
+
V(s(g))
|
|
40
|
+
])
|
|
41
|
+
];
|
|
42
|
+
}),
|
|
43
|
+
_: 1
|
|
44
|
+
}, 8, ["modelValue", "options"]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
_ as default
|
|
49
|
+
};
|
|
@@ -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":"AAsYA,OAAO,KAAK,EAEV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAgB9B,KAAK,WAAW,GAAG;IACjB,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;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;CACZ,CAAC;AAkJF,iBAAS,cAAc;WA4UT,OAAO,IAA6B;;sBATxB,GAAG;sBACH,GAAG;;;;EAa5B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,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 e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ce6ed2af"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|