@scalar/api-reference 1.30.0 → 1.31.1
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 +50 -0
- package/dist/browser/standalone.js +6690 -6569
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +164 -181
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +2 -2
- package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +56 -51
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/components/Content/Content.vue2.js +5 -5
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
- package/dist/components/Content/Introduction/Introduction.vue.d.ts.map +1 -1
- package/dist/components/Content/Introduction/Introduction.vue.js +2 -2
- package/dist/components/Content/Introduction/Introduction.vue2.js +57 -63
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +46 -46
- package/dist/components/Content/Models/Models.vue.d.ts +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +9 -7
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Schema/Schema.preview.d.ts +294 -84
- package/dist/components/Content/Schema/Schema.preview.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +21 -4
- 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 +158 -131
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +57 -53
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts +2 -3
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaDiscriminator.vue.js +29 -29
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
- package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +12 -3
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +133 -103
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +3 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +133 -126
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts +2 -2
- package/dist/components/Content/Schema/helpers/merge-all-of-schemas.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.d.ts +2 -2
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/DocumentSelector/DocumentSelector.vue.js +3 -3
- package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Layouts/ClassicLayout.vue.js +19 -17
- package/dist/components/Layouts/Layouts.vue.js +11 -9
- package/dist/components/Layouts/ModernLayout.vue2.js +22 -20
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +2 -2
- package/dist/components/Section/SectionAccordion.vue2.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/components/Section/SectionContainerAccordion.vue2.js +4 -4
- package/dist/components/Section/SectionHeader.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionHeader.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +56 -56
- package/dist/components/SingleApiReference.vue.d.ts.map +1 -1
- package/dist/components/SingleApiReference.vue.js +27 -33
- package/dist/esm.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts +2 -2
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +49 -50
- package/dist/features/ApiClientModal/useApiClient.d.ts +196 -196
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts +11 -0
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.d.ts.map +1 -0
- package/dist/features/DocumentSource/hooks/useDocumentFetcher.js +38 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts +21 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.d.ts.map +1 -0
- package/dist/features/DocumentSource/hooks/useDocumentSource.js +94 -0
- package/dist/features/DocumentSource/index.d.ts +2 -0
- package/dist/features/DocumentSource/index.d.ts.map +1 -0
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue2.js +18 -17
- package/dist/features/DownloadLink/index.d.ts +1 -0
- package/dist/features/DownloadLink/index.d.ts.map +1 -1
- package/dist/features/DownloadLink/openapi-version-symbol.d.ts +2 -0
- package/dist/features/DownloadLink/openapi-version-symbol.d.ts.map +1 -0
- package/dist/features/DownloadLink/openapi-version-symbol.js +4 -0
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +2 -0
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +178 -127
- package/dist/features/Operation/Operation.vue.d.ts +2 -2
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +29 -23
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +7 -3
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +28 -24
- package/dist/features/Operation/components/OperationResponses.vue.d.ts +2 -2
- package/dist/features/Operation/components/OperationResponses.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterHeaders.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterHeaders.vue.js +2 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
- 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/ParameterListItem.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue2.js +6 -6
- package/dist/features/Operation/components/RequestBody.vue.d.ts +7 -3
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +2 -2
- package/dist/features/Operation/components/RequestBody.vue2.js +41 -36
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +7 -3
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +84 -79
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +5 -1
- 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 +66 -57
- package/dist/features/Operation/types/schemas.d.ts +2 -2
- package/dist/features/Operation/types/schemas.d.ts.map +1 -1
- package/dist/features/Search/SearchButton.vue.js +2 -2
- package/dist/helpers/local-storage.d.ts +8 -0
- package/dist/helpers/local-storage.d.ts.map +1 -0
- package/dist/helpers/local-storage.js +6 -0
- package/dist/helpers/measure.d.ts +21 -0
- package/dist/helpers/measure.d.ts.map +1 -0
- package/dist/helpers/measure.js +7 -0
- package/dist/helpers/parse.d.ts +3 -5
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +64 -86
- package/dist/helpers/scroll-to-id.d.ts.map +1 -1
- package/dist/helpers/scroll-to-id.js +18 -4
- package/dist/hooks/useDiscriminator.d.ts +53 -0
- package/dist/hooks/useDiscriminator.d.ts.map +1 -0
- package/dist/hooks/useDiscriminator.js +149 -0
- package/dist/hooks/useOperationDiscriminator.d.ts +8 -0
- package/dist/hooks/useOperationDiscriminator.d.ts.map +1 -0
- package/dist/hooks/useOperationDiscriminator.js +57 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -35
- package/dist/libs/openapi.d.ts +3 -3
- package/dist/libs/openapi.d.ts.map +1 -1
- package/dist/libs/openapi.js +35 -42
- package/dist/standalone/lib/html-api.d.ts.map +1 -1
- package/dist/standalone/lib/html-api.js +15 -15
- package/dist/stores/useHttpClientStore.d.ts.map +1 -1
- package/dist/stores/useHttpClientStore.js +19 -18
- package/dist/style.css +1 -1
- package/dist/types.d.ts +27 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +15 -16
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts +0 -12
- package/dist/components/Content/Schema/helpers/schema-discriminator.d.ts.map +0 -1
- package/dist/components/Content/Schema/helpers/schema-discriminator.js +0 -45
- package/dist/hooks/useReactiveSpec.d.ts +0 -448
- package/dist/hooks/useReactiveSpec.d.ts.map +0 -1
- package/dist/hooks/useReactiveSpec.js +0 -59
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.preview.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.preview.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"Schema.preview.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.preview.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWxB,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBxB,CAAA;AAWD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO3B,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWtB,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBhC,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgChC,CAAA;AAED,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+C3C,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D9B,CAAA;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCjC,CAAA;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCvC,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyE/B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CnC,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD1C,CAAA;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDlC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
2
3
|
type __VLS_Props = {
|
|
3
|
-
value?:
|
|
4
|
+
value?: OpenAPIV3_1.OperationObject | OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ArraySchemaObject | OpenAPIV3_1.NonArraySchemaObject | OpenAPIV3_1.SchemaObject | OpenAPIV3_1.ArraySchemaObject | OpenAPIV3_1.NonArraySchemaObject;
|
|
4
5
|
/** Track how deep we’ve gone */
|
|
5
6
|
level?: number;
|
|
6
7
|
name?: string;
|
|
@@ -11,11 +12,27 @@ type __VLS_Props = {
|
|
|
11
12
|
hideHeading?: boolean;
|
|
12
13
|
/** Show a special one way toggle for additional properties, also has a top border when open */
|
|
13
14
|
additionalProperties?: boolean;
|
|
14
|
-
|
|
15
|
+
/** Hide model names in type display */
|
|
16
|
+
hideModelNames?: boolean;
|
|
17
|
+
/** All schemas for model name retrieval */
|
|
18
|
+
schemas?: Schemas;
|
|
19
|
+
/** Selected discriminator */
|
|
20
|
+
discriminator?: string;
|
|
21
|
+
/** Discriminator mapping */
|
|
22
|
+
discriminatorMapping?: Record<string, string>;
|
|
23
|
+
/** Discriminator property name */
|
|
24
|
+
discriminatorPropertyName?: string;
|
|
25
|
+
/** Whether the schema has a discriminator */
|
|
26
|
+
hasDiscriminator?: boolean;
|
|
15
27
|
};
|
|
16
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
28
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
|
+
"update:modelValue": (value: string) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
32
|
+
}>, {
|
|
17
33
|
level: number;
|
|
18
34
|
noncollapsible: boolean;
|
|
35
|
+
hideModelNames: boolean;
|
|
19
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
37
|
export default _default;
|
|
21
38
|
//# sourceMappingURL=Schema.vue.d.ts.map
|
|
@@ -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":"AAmfA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAQjE,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,WAAW,CAAC,eAAe,GAC3B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,GAChC,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,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4BAA4B;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,kCAAkC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;WAtBQ,MAAM;oBAMG,OAAO;oBAKP,OAAO;;AA6lB5B,wBAQG"}
|
|
@@ -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 e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-be133070"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
const Z = {
|
|
1
|
+
import { defineComponent as Q, inject as W, computed as p, createBlock as s, createCommentVNode as n, openBlock as i, unref as u, withCtx as v, createElementVNode as I, normalizeClass as M, createElementBlock as o, withDirectives as E, createVNode as h, createTextVNode as P, toDisplayString as H, vShow as R, normalizeStyle as Y, Fragment as m, renderList as $ } from "vue";
|
|
2
|
+
import { Disclosure as Z, DisclosureButton as F, DisclosurePanel as _ } from "@headlessui/vue";
|
|
3
|
+
import { ScalarMarkdown as x, ScalarIcon as V } from "@scalar/components";
|
|
4
|
+
import L from "../../ScreenReader.vue.js";
|
|
5
|
+
import { DISCRIMINATOR_CONTEXT as ee } from "../../../hooks/useDiscriminator.js";
|
|
6
|
+
import ae from "./SchemaHeading.vue.js";
|
|
7
|
+
import b from "./SchemaProperty.vue.js";
|
|
8
|
+
const ie = {
|
|
10
9
|
key: 0,
|
|
11
10
|
class: "schema-card-description"
|
|
12
|
-
},
|
|
11
|
+
}, le = {
|
|
13
12
|
key: 0,
|
|
14
13
|
class: "schema-properties"
|
|
15
|
-
},
|
|
14
|
+
}, ue = /* @__PURE__ */ Q({
|
|
16
15
|
__name: "Schema",
|
|
17
16
|
props: {
|
|
18
17
|
value: { type: [Object, Boolean] },
|
|
@@ -22,115 +21,126 @@ const Z = {
|
|
|
22
21
|
noncollapsible: { type: Boolean, default: !1 },
|
|
23
22
|
hideHeading: { type: Boolean },
|
|
24
23
|
additionalProperties: { type: Boolean },
|
|
25
|
-
|
|
24
|
+
hideModelNames: { type: Boolean, default: !1 },
|
|
25
|
+
schemas: {},
|
|
26
|
+
discriminator: {},
|
|
27
|
+
discriminatorMapping: {},
|
|
28
|
+
discriminatorPropertyName: {},
|
|
29
|
+
hasDiscriminator: { type: Boolean }
|
|
26
30
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
), (
|
|
31
|
+
emits: ["update:modelValue"],
|
|
32
|
+
setup(X, { emit: G }) {
|
|
33
|
+
const d = X, J = G, r = W(ee, null), y = p(
|
|
34
|
+
() => {
|
|
35
|
+
var e;
|
|
36
|
+
return ((e = r == null ? void 0 : r.value) == null ? void 0 : e.discriminatorMapping) || d.discriminatorMapping || {};
|
|
37
|
+
}
|
|
38
|
+
), c = p(
|
|
39
|
+
() => {
|
|
40
|
+
var e;
|
|
41
|
+
return ((e = r == null ? void 0 : r.value) == null ? void 0 : e.discriminatorPropertyName) || d.discriminatorPropertyName || "";
|
|
42
|
+
}
|
|
43
|
+
), O = p(
|
|
44
|
+
() => {
|
|
45
|
+
var e;
|
|
46
|
+
return ((e = r == null ? void 0 : r.value) == null ? void 0 : e.selectedType) || d.discriminator;
|
|
47
|
+
}
|
|
48
|
+
), j = (e) => e !== null && typeof e == "object" && "type" in e && e.type === "object", a = p(() => {
|
|
49
|
+
var t;
|
|
50
|
+
const e = (t = r == null ? void 0 : r.value) == null ? void 0 : t.mergedSchema, S = d.value;
|
|
51
|
+
return e && j(S) && j(e) ? e : d.value;
|
|
52
|
+
}), D = p(() => !(d.noncollapsible || d.level === 0)), K = p(() => {
|
|
53
|
+
var e;
|
|
54
|
+
return !(!((e = a.value) != null && e.description) || typeof a.value.description != "string" || a.value.allOf || a.value.oneOf || a.value.anyOf || a.value.enum || d.level === 0);
|
|
55
|
+
}), B = (e) => d.noncollapsible && e.stopPropagation(), g = (e) => {
|
|
56
|
+
J("update:modelValue", e);
|
|
57
|
+
};
|
|
58
|
+
return (e, S) => typeof e.value == "object" && Object.keys(e.value).length ? (i(), s(u(Z), {
|
|
49
59
|
key: 0,
|
|
50
60
|
defaultOpen: e.noncollapsible
|
|
51
61
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
var
|
|
62
|
+
default: v(({ open: t }) => {
|
|
63
|
+
var w, C;
|
|
54
64
|
return [
|
|
55
|
-
|
|
56
|
-
class:
|
|
65
|
+
I("div", {
|
|
66
|
+
class: M(["schema-card", [
|
|
57
67
|
`schema-card--level-${e.level}`,
|
|
58
|
-
{ "schema-card--compact": e.compact, "schema-card--open":
|
|
59
|
-
{ "border-t
|
|
68
|
+
{ "schema-card--compact": e.compact, "schema-card--open": t },
|
|
69
|
+
{ "border-t": e.additionalProperties && t }
|
|
60
70
|
]])
|
|
61
71
|
}, [
|
|
62
|
-
|
|
63
|
-
a.value.enum ?
|
|
72
|
+
K.value ? (i(), o("div", ie, [
|
|
73
|
+
(w = a.value) != null && w.enum ? n("", !0) : (i(), s(u(x), {
|
|
64
74
|
key: 0,
|
|
65
|
-
value: a.value.description
|
|
75
|
+
value: (C = a.value) == null ? void 0 : C.description
|
|
66
76
|
}, null, 8, ["value"]))
|
|
67
|
-
])) :
|
|
68
|
-
|
|
69
|
-
class:
|
|
70
|
-
"schema-properties-open":
|
|
77
|
+
])) : n("", !0),
|
|
78
|
+
I("div", {
|
|
79
|
+
class: M(["schema-properties", {
|
|
80
|
+
"schema-properties-open": t
|
|
71
81
|
}])
|
|
72
82
|
}, [
|
|
73
|
-
e.additionalProperties ?
|
|
74
|
-
|
|
83
|
+
e.additionalProperties ? E((i(), o("div", le, [
|
|
84
|
+
h(u(F), {
|
|
75
85
|
as: "button",
|
|
76
86
|
class: "schema-card-title schema-card-title--compact",
|
|
77
87
|
onClickCapture: B
|
|
78
88
|
}, {
|
|
79
|
-
default:
|
|
80
|
-
|
|
89
|
+
default: v(() => [
|
|
90
|
+
h(u(V), {
|
|
81
91
|
class: "schema-card-title-icon",
|
|
82
92
|
icon: "Add",
|
|
83
93
|
size: "sm"
|
|
84
94
|
}),
|
|
85
|
-
S[
|
|
86
|
-
e.name ? (
|
|
87
|
-
default:
|
|
88
|
-
|
|
95
|
+
S[0] || (S[0] = P(" Show additional properties ")),
|
|
96
|
+
e.name ? (i(), s(L, { key: 0 }, {
|
|
97
|
+
default: v(() => [
|
|
98
|
+
P("for " + H(e.name), 1)
|
|
89
99
|
]),
|
|
90
100
|
_: 1
|
|
91
|
-
})) :
|
|
101
|
+
})) : n("", !0)
|
|
92
102
|
]),
|
|
93
103
|
_: 1
|
|
94
104
|
})
|
|
95
105
|
], 512)), [
|
|
96
|
-
[
|
|
97
|
-
]) :
|
|
106
|
+
[R, !t]
|
|
107
|
+
]) : D.value ? E((i(), s(u(F), {
|
|
98
108
|
key: 1,
|
|
99
109
|
as: e.noncollapsible ? "div" : "button",
|
|
100
|
-
class:
|
|
101
|
-
style:
|
|
110
|
+
class: M(["schema-card-title", { "schema-card-title--compact": e.compact }]),
|
|
111
|
+
style: Y({
|
|
102
112
|
top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
|
|
103
113
|
}),
|
|
104
114
|
onClickCapture: B
|
|
105
115
|
}, {
|
|
106
|
-
default:
|
|
107
|
-
var
|
|
116
|
+
default: v(() => {
|
|
117
|
+
var f, N, l;
|
|
108
118
|
return [
|
|
109
|
-
e.compact ? (
|
|
110
|
-
|
|
111
|
-
class:
|
|
119
|
+
e.compact ? (i(), o(m, { key: 0 }, [
|
|
120
|
+
h(u(V), {
|
|
121
|
+
class: M(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
|
|
112
122
|
icon: "Add",
|
|
113
123
|
size: "sm"
|
|
114
124
|
}, null, 8, ["class"]),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
], 64)) : (
|
|
118
|
-
|
|
125
|
+
t ? (i(), o(m, { key: 0 }, [
|
|
126
|
+
P(" Hide " + H(((f = e.value) == null ? void 0 : f.title) ?? "Child Attributes"), 1)
|
|
127
|
+
], 64)) : (i(), o(m, { key: 1 }, [
|
|
128
|
+
P(" Show " + H(((N = e.value) == null ? void 0 : N.title) ?? "Child Attributes"), 1)
|
|
119
129
|
], 64)),
|
|
120
|
-
e.name ? (
|
|
121
|
-
default:
|
|
122
|
-
|
|
130
|
+
e.name ? (i(), s(L, { key: 2 }, {
|
|
131
|
+
default: v(() => [
|
|
132
|
+
P("for " + H(e.name), 1)
|
|
123
133
|
]),
|
|
124
134
|
_: 1
|
|
125
|
-
})) :
|
|
126
|
-
], 64)) : (
|
|
127
|
-
|
|
128
|
-
class:
|
|
135
|
+
})) : n("", !0)
|
|
136
|
+
], 64)) : (i(), o(m, { key: 1 }, [
|
|
137
|
+
h(u(V), {
|
|
138
|
+
class: M(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
|
|
129
139
|
icon: "Add",
|
|
130
140
|
size: "sm"
|
|
131
141
|
}, null, 8, ["class"]),
|
|
132
|
-
|
|
133
|
-
name: ((
|
|
142
|
+
h(ae, {
|
|
143
|
+
name: ((l = e.value) == null ? void 0 : l.title) ?? e.name,
|
|
134
144
|
value: e.value
|
|
135
145
|
}, null, 8, ["name", "value"])
|
|
136
146
|
], 64))
|
|
@@ -138,88 +148,105 @@ const Z = {
|
|
|
138
148
|
}),
|
|
139
149
|
_: 2
|
|
140
150
|
}, 1032, ["as", "class", "style"])), [
|
|
141
|
-
[
|
|
142
|
-
]) :
|
|
143
|
-
|
|
151
|
+
[R, !e.hideHeading && !(e.noncollapsible && e.compact)]
|
|
152
|
+
]) : n("", !0),
|
|
153
|
+
h(u(_), {
|
|
144
154
|
as: "ul",
|
|
145
|
-
static: !
|
|
155
|
+
static: !D.value
|
|
146
156
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
var
|
|
157
|
+
default: v(() => {
|
|
158
|
+
var f, N;
|
|
149
159
|
return [
|
|
150
|
-
|
|
151
|
-
key: 0,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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,
|
|
160
|
+
a.value && typeof a.value == "object" && ("properties" in a.value || "additionalProperties" in a.value || "patternProperties" in a.value) ? (i(), o(m, { key: 0 }, [
|
|
161
|
+
a.value.properties ? (i(!0), o(m, { key: 0 }, $(Object.keys(a.value.properties), (l) => {
|
|
162
|
+
var k, A, T, z, U, q;
|
|
163
|
+
return i(), s(b, {
|
|
164
|
+
key: l,
|
|
162
165
|
compact: e.compact,
|
|
163
166
|
hideHeading: e.hideHeading,
|
|
164
167
|
level: e.level + 1,
|
|
165
|
-
name:
|
|
166
|
-
|
|
168
|
+
name: l,
|
|
169
|
+
hideModelNames: e.hideModelNames,
|
|
170
|
+
required: ((k = a.value.required) == null ? void 0 : k.includes(l)) || ((A = a.value.properties[l]) == null ? void 0 : A.required) === !0,
|
|
167
171
|
schemas: e.schemas,
|
|
172
|
+
resolvedSchema: a.value.properties[l],
|
|
168
173
|
value: {
|
|
169
|
-
...a.value.properties[
|
|
174
|
+
...a.value.properties[l],
|
|
170
175
|
parent: a.value,
|
|
171
|
-
isDiscriminator:
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
isDiscriminator: l === c.value || ((T = a.value.discriminator) == null ? void 0 : T.propertyName) === l
|
|
177
|
+
},
|
|
178
|
+
discriminatorMapping: ((z = a.value.discriminator) == null ? void 0 : z.mapping) || y.value,
|
|
179
|
+
discriminatorPropertyName: ((U = a.value.discriminator) == null ? void 0 : U.propertyName) || c.value,
|
|
180
|
+
isDiscriminator: l === (((q = a.value.discriminator) == null ? void 0 : q.propertyName) || c.value),
|
|
181
|
+
modelValue: O.value,
|
|
182
|
+
"onUpdate:modelValue": g
|
|
183
|
+
}, null, 8, ["compact", "hideHeading", "level", "name", "hideModelNames", "required", "schemas", "resolvedSchema", "value", "discriminatorMapping", "discriminatorPropertyName", "isDiscriminator", "modelValue"]);
|
|
184
|
+
}), 128)) : n("", !0),
|
|
185
|
+
a.value.patternProperties ? (i(!0), o(m, { key: 1 }, $(Object.keys(a.value.patternProperties), (l) => {
|
|
186
|
+
var k;
|
|
187
|
+
return i(), s(b, {
|
|
188
|
+
key: l,
|
|
181
189
|
compact: e.compact,
|
|
182
190
|
hideHeading: e.hideHeading,
|
|
183
191
|
level: e.level,
|
|
184
|
-
name:
|
|
192
|
+
name: l,
|
|
193
|
+
hideModelNames: e.hideModelNames,
|
|
185
194
|
pattern: "",
|
|
186
195
|
schemas: e.schemas,
|
|
187
|
-
value: ((
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
value: ((k = e.value.discriminator) == null ? void 0 : k.propertyName) === l ? e.value : a.value.patternProperties[l],
|
|
197
|
+
discriminatorMapping: y.value,
|
|
198
|
+
discriminatorPropertyName: c.value,
|
|
199
|
+
"onUpdate:modelValue": g
|
|
200
|
+
}, null, 8, ["compact", "hideHeading", "level", "name", "hideModelNames", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName"]);
|
|
201
|
+
}), 128)) : n("", !0),
|
|
202
|
+
a.value.additionalProperties ? (i(), o(m, { key: 2 }, [
|
|
203
|
+
a.value.additionalProperties === !0 || Object.keys(a.value.additionalProperties).length === 0 || !("type" in a.value.additionalProperties) ? (i(), s(b, {
|
|
192
204
|
key: 0,
|
|
193
205
|
additional: "",
|
|
194
206
|
compact: e.compact,
|
|
195
207
|
hideHeading: e.hideHeading,
|
|
208
|
+
hideModelNames: e.hideModelNames,
|
|
196
209
|
level: e.level,
|
|
197
210
|
noncollapsible: "",
|
|
198
211
|
schemas: e.schemas,
|
|
199
212
|
value: {
|
|
200
213
|
type: "anything",
|
|
201
214
|
...typeof a.value.additionalProperties == "object" ? a.value.additionalProperties : {}
|
|
202
|
-
}
|
|
203
|
-
|
|
215
|
+
},
|
|
216
|
+
discriminatorMapping: y.value,
|
|
217
|
+
discriminatorPropertyName: c.value,
|
|
218
|
+
"onUpdate:modelValue": g
|
|
219
|
+
}, null, 8, ["compact", "hideHeading", "hideModelNames", "level", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName"])) : (i(), s(b, {
|
|
204
220
|
key: 1,
|
|
205
221
|
additional: "",
|
|
206
222
|
compact: e.compact,
|
|
207
223
|
hideHeading: e.hideHeading,
|
|
224
|
+
hideModelNames: e.hideModelNames,
|
|
208
225
|
level: e.level,
|
|
209
226
|
noncollapsible: "",
|
|
210
227
|
schemas: e.schemas,
|
|
211
|
-
value: ((
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
value: ((f = e.value.discriminator) == null ? void 0 : f.propertyName) === e.name ? e.value : a.value.additionalProperties,
|
|
229
|
+
discriminatorMapping: y.value,
|
|
230
|
+
discriminatorPropertyName: c.value,
|
|
231
|
+
"onUpdate:modelValue": g
|
|
232
|
+
}, null, 8, ["compact", "hideHeading", "hideModelNames", "level", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName"]))
|
|
233
|
+
], 64)) : n("", !0)
|
|
234
|
+
], 64)) : (i(), o(m, { key: 1 }, [
|
|
235
|
+
a.value ? (i(), s(b, {
|
|
236
|
+
key: 0,
|
|
237
|
+
compact: e.compact,
|
|
238
|
+
hideHeading: e.hideHeading,
|
|
239
|
+
hideModelNames: e.hideModelNames,
|
|
240
|
+
level: e.level,
|
|
241
|
+
name: a.value.name,
|
|
242
|
+
schemas: e.schemas,
|
|
243
|
+
value: ((N = e.value.discriminator) == null ? void 0 : N.propertyName) === e.name ? e.value : a.value,
|
|
244
|
+
discriminatorMapping: y.value,
|
|
245
|
+
discriminatorPropertyName: c.value,
|
|
246
|
+
modelValue: O.value,
|
|
247
|
+
"onUpdate:modelValue": g
|
|
248
|
+
}, null, 8, ["compact", "hideHeading", "hideModelNames", "level", "name", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName", "modelValue"])) : n("", !0)
|
|
249
|
+
], 64))
|
|
223
250
|
];
|
|
224
251
|
}),
|
|
225
252
|
_: 1
|
|
@@ -229,9 +256,9 @@ const Z = {
|
|
|
229
256
|
];
|
|
230
257
|
}),
|
|
231
258
|
_: 1
|
|
232
|
-
}, 8, ["defaultOpen"])) :
|
|
259
|
+
}, 8, ["defaultOpen"])) : n("", !0);
|
|
233
260
|
}
|
|
234
261
|
});
|
|
235
262
|
export {
|
|
236
|
-
|
|
263
|
+
ue as default
|
|
237
264
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Schemas } from '../../../features/Operation/types/schemas';
|
|
2
2
|
import { type CompositionKeyword } from './helpers/schema-composition.js';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
composition: CompositionKeyword;
|
|
5
|
-
schemas?:
|
|
5
|
+
schemas?: Schemas;
|
|
6
6
|
name?: string;
|
|
7
7
|
value: Record<string, any>;
|
|
8
8
|
level: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AA2SA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAEjE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAA;AAKrC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAgWF,wBAOG"}
|