@scalar/api-reference 1.32.6 → 1.32.8
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 +53 -0
- package/dist/browser/standalone.js +16427 -16210
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue2.js +2 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +8 -8
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/ApiReferenceLayout.vue2.js +164 -176
- package/dist/components/Badge/Badge.vue.js +1 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +20 -20
- package/dist/components/Content/Models/Models.vue2.js +5 -4
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -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 +99 -157
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts +7 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +7 -0
- package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +25 -0
- package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +73 -90
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +21 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +92 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +4 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -2
- 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 +54 -55
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +0 -2
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +95 -104
- package/dist/components/Content/Schema/helpers/{formatExample.d.ts → format-example.d.ts} +1 -1
- package/dist/components/Content/Schema/helpers/format-example.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/is-type-object.d.ts +3 -0
- package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/is-type-object.js +17 -0
- package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.d.ts → optimize-value-for-display.d.ts} +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -0
- package/dist/components/Content/Tag/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsList.vue.js +1 -1
- package/dist/components/Content/Tag/OperationsList.vue2.js +18 -22
- package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
- package/dist/components/Content/Tag/OperationsListItem.vue2.js +33 -34
- package/dist/components/Content/Tag/Tag.vue.js +2 -1
- package/dist/components/Content/Tag/TagSection.vue.d.ts.map +1 -1
- package/dist/components/GettingStarted.vue2.js +8 -6
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +28 -29
- 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 +17 -18
- package/dist/features/Operation/Operation.vue.d.ts +6 -6
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +50 -49
- package/dist/features/Operation/components/ContentTypeSelect.vue.js +8 -7
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts +8 -6
- package/dist/features/Operation/components/callbacks/Callback.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue.js +1 -1
- package/dist/features/Operation/components/callbacks/Callback.vue2.js +21 -28
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts +5 -3
- package/dist/features/Operation/components/callbacks/Callbacks.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/callbacks/Callbacks.vue.js +33 -18
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +11 -12
- 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 +168 -154
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +12 -13
- 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 +113 -117
- package/dist/features/Search/SearchButton.vue.js +2 -1
- package/dist/features/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/SearchModal.vue.js +2 -2
- package/dist/features/Search/SearchModal.vue2.js +16 -16
- package/dist/features/api-client-modal/useApiClient.d.ts +5338 -5258
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/download-link/DownloadLink.vue2.js +4 -2
- package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
- package/dist/{components/Card/CardTab.vue.d.ts → features/example-responses/ExampleResponseTab.vue.d.ts} +1 -1
- package/dist/features/example-responses/ExampleResponseTab.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponseTab.vue.js +7 -0
- package/dist/{components/Card/CardTab.vue2.js → features/example-responses/ExampleResponseTab.vue2.js} +6 -6
- package/dist/{components/Card/CardTabHeader.vue.d.ts → features/example-responses/ExampleResponseTabList.vue.d.ts} +3 -3
- package/dist/features/example-responses/ExampleResponseTabList.vue.d.ts.map +1 -0
- package/dist/features/example-responses/ExampleResponseTabList.vue.js +7 -0
- package/dist/{components/Card/CardTabHeader.vue2.js → features/example-responses/ExampleResponseTabList.vue2.js} +9 -9
- package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
- package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
- package/dist/features/example-responses/ExampleResponses.vue2.js +89 -96
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +3 -2
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +2 -2
- package/dist/features/test-request-button/TestRequestButton.vue2.js +26 -24
- package/dist/helpers/convert-security-scheme.d.ts +9 -0
- package/dist/helpers/convert-security-scheme.d.ts.map +1 -0
- package/dist/helpers/convert-security-scheme.js +23 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -29
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +3 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +114 -86
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +6 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.js +4 -0
- package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue2.js +64 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.js +7 -0
- package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue2.js +212 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +3 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +22 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-client-options.js +35 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/generate-code-snippet.js +29 -0
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +10 -0
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts +2 -1
- package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +1 -1
- package/dist/v2/events/definitions.d.ts +6 -6
- package/dist/v2/events/definitions.d.ts.map +1 -1
- package/dist/v2/events/definitions.js +7 -0
- package/dist/v2/events/index.d.ts +1 -1
- package/dist/v2/events/listeners.d.ts +1 -1
- package/dist/v2/hooks/useStore.d.ts +9 -0
- package/dist/v2/hooks/useStore.d.ts.map +1 -0
- package/dist/v2/hooks/useStore.js +14 -0
- package/package.json +24 -24
- package/dist/blocks/constants.js +0 -6
- package/dist/blocks/helpers/getPointer.js +0 -12
- package/dist/blocks/hooks/useBlockProps.d.ts +0 -31
- package/dist/blocks/hooks/useBlockProps.d.ts.map +0 -1
- package/dist/blocks/hooks/useBlockProps.js +0 -24
- package/dist/components/Card/Card.vue.d.ts +0 -18
- package/dist/components/Card/Card.vue.d.ts.map +0 -1
- package/dist/components/Card/Card.vue.js +0 -13
- package/dist/components/Card/CardContent.vue.d.ts +0 -19
- package/dist/components/Card/CardContent.vue.d.ts.map +0 -1
- package/dist/components/Card/CardContent.vue.js +0 -7
- package/dist/components/Card/CardContent.vue2.js +0 -27
- package/dist/components/Card/CardFooter.vue.d.ts +0 -19
- package/dist/components/Card/CardFooter.vue.d.ts.map +0 -1
- package/dist/components/Card/CardFooter.vue.js +0 -7
- package/dist/components/Card/CardFooter.vue2.js +0 -24
- package/dist/components/Card/CardHeader.vue.d.ts +0 -20
- package/dist/components/Card/CardHeader.vue.d.ts.map +0 -1
- package/dist/components/Card/CardHeader.vue.js +0 -7
- package/dist/components/Card/CardHeader.vue2.js +0 -31
- package/dist/components/Card/CardTab.vue.d.ts.map +0 -1
- package/dist/components/Card/CardTab.vue.js +0 -7
- package/dist/components/Card/CardTabHeader.vue.d.ts.map +0 -1
- package/dist/components/Card/CardTabHeader.vue.js +0 -7
- package/dist/components/Card/index.d.ts +0 -7
- package/dist/components/Card/index.d.ts.map +0 -1
- package/dist/components/Card/types.d.ts +0 -8
- package/dist/components/Card/types.d.ts.map +0 -1
- package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +0 -1
- package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +0 -1
- package/dist/features/example-request/ExamplePicker.vue.d.ts +0 -13
- package/dist/features/example-request/ExamplePicker.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExamplePicker.vue.js +0 -7
- package/dist/features/example-request/ExamplePicker.vue2.js +0 -56
- package/dist/features/example-request/ExampleRequest.vue.d.ts +0 -79
- package/dist/features/example-request/ExampleRequest.vue.d.ts.map +0 -1
- package/dist/features/example-request/ExampleRequest.vue.js +0 -7
- package/dist/features/example-request/ExampleRequest.vue2.js +0 -359
- package/dist/features/example-request/TextSelect.vue.d.ts +0 -34
- package/dist/features/example-request/TextSelect.vue.d.ts.map +0 -1
- package/dist/features/example-request/TextSelect.vue.js +0 -48
- package/dist/features/example-request/TextSelect.vue3.js +0 -5
- package/dist/features/example-request/index.d.ts +0 -3
- package/dist/features/example-request/index.d.ts.map +0 -1
- /package/dist/components/Content/Schema/helpers/{formatExample.js → format-example.js} +0 -0
- /package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.js → optimize-value-for-display.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatExample.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/formatExample.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAkD/D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"optimizeValueForDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimizeValueForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,eAAO,MAAM,YAAY,EAAE,kBAAkB,EAAuC,CAAA;AAEpF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAuEzG"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
examples: Record<string, any>;
|
|
3
|
-
};
|
|
4
|
-
type __VLS_PublicProps = {
|
|
5
|
-
modelValue?: string;
|
|
6
|
-
} & __VLS_Props;
|
|
7
|
-
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
-
"update:modelValue": (value: string) => any;
|
|
9
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
11
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
12
|
-
export default _default;
|
|
13
|
-
//# sourceMappingURL=ExamplePicker.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-request/ExamplePicker.vue"],"names":[],"mappings":"AAsEA,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC9B,CAAC;AA0CF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;;;;;;AAsFhB,wBAQG"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { defineComponent as u, mergeModels as i, useModel as d, watch as c, createBlock as f, openBlock as x, withCtx as s, createVNode as V, createTextVNode as n, toDisplayString as b } from "vue";
|
|
2
|
-
import v from "../../components/ScreenReader.vue.js";
|
|
3
|
-
import E from "./TextSelect.vue.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
const y = /* @__PURE__ */ u({
|
|
6
|
-
__name: "ExamplePicker",
|
|
7
|
-
props: /* @__PURE__ */ i({
|
|
8
|
-
examples: {}
|
|
9
|
-
}, {
|
|
10
|
-
modelValue: {},
|
|
11
|
-
modelModifiers: {}
|
|
12
|
-
}),
|
|
13
|
-
emits: ["update:modelValue"],
|
|
14
|
-
setup(m) {
|
|
15
|
-
const a = m, t = d(m, "modelValue");
|
|
16
|
-
function p(e) {
|
|
17
|
-
e && (t.value = e);
|
|
18
|
-
}
|
|
19
|
-
c(
|
|
20
|
-
() => a.examples,
|
|
21
|
-
() => {
|
|
22
|
-
a.examples[t.value ?? ""] || p(Object.keys(a.examples)[0]);
|
|
23
|
-
},
|
|
24
|
-
{ immediate: !0 }
|
|
25
|
-
);
|
|
26
|
-
function r(e) {
|
|
27
|
-
if (!e)
|
|
28
|
-
return "Select an example";
|
|
29
|
-
const l = a.examples[e];
|
|
30
|
-
return (l == null ? void 0 : l.summary) ?? e;
|
|
31
|
-
}
|
|
32
|
-
return (e, l) => (x(), f(E, {
|
|
33
|
-
modelValue: t.value,
|
|
34
|
-
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
35
|
-
class: "example-selector",
|
|
36
|
-
options: Object.keys(e.examples).map((o) => ({
|
|
37
|
-
label: r(o),
|
|
38
|
-
value: o
|
|
39
|
-
}))
|
|
40
|
-
}, {
|
|
41
|
-
default: s(() => [
|
|
42
|
-
V(v, null, {
|
|
43
|
-
default: s(() => l[1] || (l[1] = [
|
|
44
|
-
n("Selected Example Values:")
|
|
45
|
-
])),
|
|
46
|
-
_: 1
|
|
47
|
-
}),
|
|
48
|
-
n(" " + b(r(t.value ?? "Unknown")), 1)
|
|
49
|
-
]),
|
|
50
|
-
_: 1
|
|
51
|
-
}, 8, ["modelValue", "options"]));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
export {
|
|
55
|
-
y as default
|
|
56
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { type Collection, type Request, type Server } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import type { OpenAPIV3_1 } from '@scalar/types/legacy';
|
|
3
|
-
import { type ComponentPublicInstance } from 'vue';
|
|
4
|
-
import type { Schemas } from '../../features/Operation/types/schemas';
|
|
5
|
-
type __VLS_Props = {
|
|
6
|
-
server: Server | undefined;
|
|
7
|
-
collection: Collection;
|
|
8
|
-
operation: OpenAPIV3_1.OperationObject;
|
|
9
|
-
request: Request | undefined;
|
|
10
|
-
method: OpenAPIV3_1.HttpMethods;
|
|
11
|
-
/** Show a simplified card if no example are available */
|
|
12
|
-
fallback?: boolean;
|
|
13
|
-
schemas?: Schemas;
|
|
14
|
-
};
|
|
15
|
-
declare function __VLS_template(): {
|
|
16
|
-
attrs: Partial<{}>;
|
|
17
|
-
slots: {
|
|
18
|
-
header?(_: {}): any;
|
|
19
|
-
header?(_: {}): any;
|
|
20
|
-
footer?(_: {}): any;
|
|
21
|
-
footer?(_: {}): any;
|
|
22
|
-
};
|
|
23
|
-
refs: {
|
|
24
|
-
elem: ({
|
|
25
|
-
$: import("vue").ComponentInternalInstance;
|
|
26
|
-
$data: {};
|
|
27
|
-
$props: Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
28
|
-
$attrs: {
|
|
29
|
-
[x: string]: unknown;
|
|
30
|
-
};
|
|
31
|
-
$refs: {
|
|
32
|
-
[x: string]: unknown;
|
|
33
|
-
};
|
|
34
|
-
$slots: Readonly<{
|
|
35
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
36
|
-
}>;
|
|
37
|
-
$root: ComponentPublicInstance | null;
|
|
38
|
-
$parent: ComponentPublicInstance | null;
|
|
39
|
-
$host: Element | null;
|
|
40
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
41
|
-
$el: HTMLDivElement;
|
|
42
|
-
$options: import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
43
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
44
|
-
created?: (() => void) | (() => void)[];
|
|
45
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
46
|
-
mounted?: (() => void) | (() => void)[];
|
|
47
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
48
|
-
updated?: (() => void) | (() => void)[];
|
|
49
|
-
activated?: (() => void) | (() => void)[];
|
|
50
|
-
deactivated?: (() => void) | (() => void)[];
|
|
51
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
52
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
53
|
-
destroyed?: (() => void) | (() => void)[];
|
|
54
|
-
unmounted?: (() => void) | (() => void)[];
|
|
55
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
56
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
57
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
58
|
-
};
|
|
59
|
-
$forceUpdate: () => void;
|
|
60
|
-
$nextTick: typeof import("vue").nextTick;
|
|
61
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
62
|
-
} & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, never> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
63
|
-
$slots: {
|
|
64
|
-
default?(_: {}): any;
|
|
65
|
-
};
|
|
66
|
-
}) | null;
|
|
67
|
-
};
|
|
68
|
-
rootEl: any;
|
|
69
|
-
};
|
|
70
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
71
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
73
|
-
export default _default;
|
|
74
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
75
|
-
new (): {
|
|
76
|
-
$slots: S;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=ExampleRequest.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExampleRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-request/ExampleRequest.vue"],"names":[],"mappings":"AAyjBA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AAGxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAOL,KAAK,uBAAuB,EAC7B,MAAM,KAAK,CAAA;AAKZ,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAiBjE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,WAAW,CAAC,eAAe,CAAA;IACtC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAmXF,iBAAS,cAAc;WAoOT,OAAO,IAA6B;;wBAZrB,GAAG;wBAEH,GAAG;wBADH,GAAG;wBAEH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAtPL,GAAG,8CACtB,GAAE,yBAAyB,GAAG,6DACd,GAAG;;;;;;;;EAkQ1B;AAkCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,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,359 +0,0 @@
|
|
|
1
|
-
import { defineComponent as pe, useId as fe, ref as j, inject as Q, computed as m, watch as Y, onMounted as ye, createBlock as w, createCommentVNode as J, unref as r, openBlock as g, withCtx as s, createVNode as n, createElementVNode as U, renderSlot as $, createTextVNode as b, createElementBlock as D, Fragment as Z, toDisplayString as H } from "vue";
|
|
2
|
-
import { useWorkspace as ve } from "@scalar/api-client/store";
|
|
3
|
-
import { getHarRequest as ge, getSnippet as xe } from "@scalar/api-client/views/Components/CodeSnippet";
|
|
4
|
-
import { filterSecurityRequirements as he } from "@scalar/api-client/views/Request/RequestSection";
|
|
5
|
-
import { ScalarCodeBlock as qe } from "@scalar/components";
|
|
6
|
-
import { freezeElement as Ee } from "@scalar/helpers/dom/freeze-element";
|
|
7
|
-
import { requestSchema as Ke, createExampleFromRequest as be } from "@scalar/oas-utils/entities/spec";
|
|
8
|
-
import { isDereferenced as Se } from "@scalar/openapi-types/helpers";
|
|
9
|
-
import I from "../../components/ScreenReader.vue.js";
|
|
10
|
-
import { useConfig as ke } from "../../hooks/useConfig.js";
|
|
11
|
-
import { EXAMPLE_CONTEXT as Ce, DISCRIMINATOR_CONTEXT as Oe } from "../../hooks/useDiscriminator.js";
|
|
12
|
-
import { useHttpClientStore as Ne } from "../../stores/useHttpClientStore.js";
|
|
13
|
-
import $e from "./ExamplePicker.vue.js";
|
|
14
|
-
import Te from "./TextSelect.vue.js";
|
|
15
|
-
/* empty css */
|
|
16
|
-
import _ from "../../components/Card/Card.vue.js";
|
|
17
|
-
import Ve from "../../components/Card/CardHeader.vue.js";
|
|
18
|
-
import ee from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
19
|
-
import te from "../../components/Card/CardContent.vue.js";
|
|
20
|
-
import Re from "../../components/Card/CardFooter.vue.js";
|
|
21
|
-
import { useExampleStore as Be } from "../../legacy/stores/useExampleStore.js";
|
|
22
|
-
const je = ["id"], we = ["id"], Je = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "request-card-footer-addon"
|
|
25
|
-
}, Ue = { class: "request-header" }, ot = /* @__PURE__ */ pe({
|
|
26
|
-
__name: "ExampleRequest",
|
|
27
|
-
props: {
|
|
28
|
-
server: {},
|
|
29
|
-
collection: {},
|
|
30
|
-
operation: {},
|
|
31
|
-
request: {},
|
|
32
|
-
method: {},
|
|
33
|
-
fallback: { type: Boolean },
|
|
34
|
-
schemas: {}
|
|
35
|
-
},
|
|
36
|
-
setup(l) {
|
|
37
|
-
const { selectedExampleKey: M, operationId: ae } = Be(), { requestExamples: S, securitySchemes: A, requestExampleMutators: T } = ve(), le = ke(), {
|
|
38
|
-
httpClient: u,
|
|
39
|
-
setHttpClient: re,
|
|
40
|
-
availableTargets: F,
|
|
41
|
-
httpTargetTitle: oe,
|
|
42
|
-
httpClientTitle: se
|
|
43
|
-
} = Ne(), k = fe(), x = j(!1), C = Q(Ce), f = Q(Oe), V = m(() => {
|
|
44
|
-
var e;
|
|
45
|
-
return (e = f == null ? void 0 : f.value) == null ? void 0 : e.selectedType;
|
|
46
|
-
}), P = m(
|
|
47
|
-
() => {
|
|
48
|
-
var e;
|
|
49
|
-
return ((e = f == null ? void 0 : f.value) == null ? void 0 : e.hasDiscriminator) || !1;
|
|
50
|
-
}
|
|
51
|
-
), d = m(() => {
|
|
52
|
-
var t;
|
|
53
|
-
const e = ["x-custom-examples", "x-codeSamples", "x-code-samples"];
|
|
54
|
-
for (const a of e)
|
|
55
|
-
if ((t = l.operation) != null && t[a])
|
|
56
|
-
return [...l.operation[a]];
|
|
57
|
-
return [];
|
|
58
|
-
}), o = j(
|
|
59
|
-
// Default to first custom example
|
|
60
|
-
d.value.length ? {
|
|
61
|
-
targetKey: "customExamples",
|
|
62
|
-
clientKey: 0
|
|
63
|
-
} : (
|
|
64
|
-
// Otherwise use the globally selected HTTP client
|
|
65
|
-
{
|
|
66
|
-
targetKey: u.targetKey,
|
|
67
|
-
clientKey: u.clientKey
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
Y(u, () => {
|
|
72
|
-
o.value = {
|
|
73
|
-
targetKey: u.targetKey,
|
|
74
|
-
clientKey: u.clientKey
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
const X = m(() => {
|
|
78
|
-
const e = O.value;
|
|
79
|
-
return Object.keys(e).length > 1;
|
|
80
|
-
}), ne = () => {
|
|
81
|
-
var q, E, c;
|
|
82
|
-
if (o.value.targetKey === "customExamples")
|
|
83
|
-
return ((q = d.value[o.value.clientKey]) == null ? void 0 : q.source) ?? "";
|
|
84
|
-
const e = u.clientKey, t = u.targetKey, a = l.request || Ke.parse({
|
|
85
|
-
uid: l.operation.operationId || "temp-request",
|
|
86
|
-
method: l.method,
|
|
87
|
-
path: l.operation.path,
|
|
88
|
-
parameters: l.operation.parameters || [],
|
|
89
|
-
requestBody: l.operation.requestBody,
|
|
90
|
-
examples: [],
|
|
91
|
-
type: "request",
|
|
92
|
-
selectedSecuritySchemeUids: [],
|
|
93
|
-
selectedServerUid: "",
|
|
94
|
-
servers: [],
|
|
95
|
-
summary: l.operation.summary || "Example Request"
|
|
96
|
-
});
|
|
97
|
-
let i = S[((c = (E = l.request) == null ? void 0 : E.examples) == null ? void 0 : c[0]) ?? ""];
|
|
98
|
-
if (!i) {
|
|
99
|
-
const B = O.value, K = Object.keys(B)[0];
|
|
100
|
-
i = be(a, K);
|
|
101
|
-
}
|
|
102
|
-
const p = he(
|
|
103
|
-
l.operation.security || l.collection.security,
|
|
104
|
-
l.collection.selectedSecuritySchemeUids,
|
|
105
|
-
A
|
|
106
|
-
), y = ge({
|
|
107
|
-
operation: a,
|
|
108
|
-
example: i,
|
|
109
|
-
server: l.server,
|
|
110
|
-
securitySchemes: p
|
|
111
|
-
}), [h, N] = xe(t, e, y);
|
|
112
|
-
return h ? h.message ?? "" : N;
|
|
113
|
-
}, z = m(() => {
|
|
114
|
-
try {
|
|
115
|
-
return ne();
|
|
116
|
-
} catch (e) {
|
|
117
|
-
return console.error("[generateSnippet]", e), "";
|
|
118
|
-
}
|
|
119
|
-
}), O = m(() => {
|
|
120
|
-
var a;
|
|
121
|
-
if (!Se(l.operation.requestBody))
|
|
122
|
-
return {};
|
|
123
|
-
const e = ((a = l.operation.requestBody) == null ? void 0 : a.content) ?? {}, t = Object.values(e)[0];
|
|
124
|
-
return (t == null ? void 0 : t.examples) ?? {};
|
|
125
|
-
}), ue = m(() => {
|
|
126
|
-
var t, a;
|
|
127
|
-
const e = (
|
|
128
|
-
// Specified language
|
|
129
|
-
((t = o.value) == null ? void 0 : t.targetKey) === "customExamples" ? ((a = d.value[o.value.clientKey]) == null ? void 0 : a.lang) ?? "plaintext" : (
|
|
130
|
-
// Or language for the globally selected HTTP client
|
|
131
|
-
u.targetKey
|
|
132
|
-
)
|
|
133
|
-
);
|
|
134
|
-
return e === "shell" && z.value.includes("curl") ? "curl" : e === "Objective-C" ? "objc" : e;
|
|
135
|
-
}), ie = m(
|
|
136
|
-
() => Object.values(A).flatMap((e) => e.type === "apiKey" ? e.value : (e == null ? void 0 : e.type) === "http" ? [
|
|
137
|
-
e.token,
|
|
138
|
-
e.password,
|
|
139
|
-
btoa(`${e.username}:${e.password}`)
|
|
140
|
-
] : e.type === "oauth2" ? Object.values(e.flows).map((t) => t.token) : [])
|
|
141
|
-
), ce = m(() => {
|
|
142
|
-
const e = F.value.map((t) => ({
|
|
143
|
-
value: t.key,
|
|
144
|
-
label: t.title,
|
|
145
|
-
options: t.clients.map((a) => ({
|
|
146
|
-
value: JSON.stringify({
|
|
147
|
-
targetKey: t.key,
|
|
148
|
-
clientKey: a.client
|
|
149
|
-
}),
|
|
150
|
-
label: a.title
|
|
151
|
-
}))
|
|
152
|
-
}));
|
|
153
|
-
return d.value.length && e.unshift({
|
|
154
|
-
value: "customExamples",
|
|
155
|
-
label: "Examples",
|
|
156
|
-
options: d.value.map((t, a) => ({
|
|
157
|
-
value: JSON.stringify({
|
|
158
|
-
targetKey: "customExamples",
|
|
159
|
-
clientKey: a
|
|
160
|
-
}),
|
|
161
|
-
label: t.label ?? t.lang ?? `Example #${a + 1}`
|
|
162
|
-
}))
|
|
163
|
-
}), e;
|
|
164
|
-
}), R = j(null);
|
|
165
|
-
function me(e) {
|
|
166
|
-
const t = JSON.parse(e);
|
|
167
|
-
if (R.value) {
|
|
168
|
-
const a = Ee(R.value.$el);
|
|
169
|
-
setTimeout(() => {
|
|
170
|
-
a();
|
|
171
|
-
}, 300);
|
|
172
|
-
}
|
|
173
|
-
t.targetKey === "customExamples" || o.value.targetKey === "customExamples" && t.targetKey === u.targetKey && t.clientKey === u.clientKey ? o.value = t : re(t);
|
|
174
|
-
}
|
|
175
|
-
function de(e) {
|
|
176
|
-
var i, p;
|
|
177
|
-
M.value = e, ae.value = l.operation.operationId;
|
|
178
|
-
const t = S[((p = (i = l.request) == null ? void 0 : i.examples) == null ? void 0 : p[0]) ?? ""], a = O.value[e];
|
|
179
|
-
if (t && (a != null && a.value))
|
|
180
|
-
try {
|
|
181
|
-
T.edit(
|
|
182
|
-
t.uid,
|
|
183
|
-
"body.raw.value",
|
|
184
|
-
JSON.stringify(a.value, null, 2)
|
|
185
|
-
);
|
|
186
|
-
} catch (y) {
|
|
187
|
-
console.error("[handleExampleUpdate]", y);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
ye(() => {
|
|
191
|
-
P.value && V.value && !x.value && L(V.value);
|
|
192
|
-
});
|
|
193
|
-
const L = (e) => {
|
|
194
|
-
var t, a, i, p, y, h, N, q, E;
|
|
195
|
-
if (!x.value)
|
|
196
|
-
try {
|
|
197
|
-
x.value = !0;
|
|
198
|
-
const c = S[l.operation.examples[0]];
|
|
199
|
-
if (c && (C != null && C.generateExampleValue)) {
|
|
200
|
-
const B = (a = (t = c.body) == null ? void 0 : t.raw) != null && a.value ? JSON.parse(c.body.raw.value) : void 0, K = C.generateExampleValue(
|
|
201
|
-
Array.isArray(B)
|
|
202
|
-
);
|
|
203
|
-
if (T.edit(
|
|
204
|
-
c.uid,
|
|
205
|
-
"body.raw.value",
|
|
206
|
-
JSON.stringify(K, null, 2)
|
|
207
|
-
), (p = (i = l.request) == null ? void 0 : i.examples) != null && p[0]) {
|
|
208
|
-
const v = S[(h = (y = l.request) == null ? void 0 : y.examples) == null ? void 0 : h[0]];
|
|
209
|
-
v && T.edit(
|
|
210
|
-
v.uid,
|
|
211
|
-
"body.raw.value",
|
|
212
|
-
JSON.stringify(K, null, 2)
|
|
213
|
-
);
|
|
214
|
-
}
|
|
215
|
-
if ((E = (q = (N = l.operation.requestBody) == null ? void 0 : N.content) == null ? void 0 : q["application/json"]) != null && E.examples) {
|
|
216
|
-
const v = l.operation.requestBody.content["application/json"].examples;
|
|
217
|
-
Object.keys(v).forEach((W) => {
|
|
218
|
-
var G;
|
|
219
|
-
(G = v[W]) != null && G.value && (v[W].value = K);
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
} catch (c) {
|
|
224
|
-
console.error("[handleDiscriminatorChange]", c);
|
|
225
|
-
} finally {
|
|
226
|
-
x.value = !1;
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
return Y(V, (e) => {
|
|
230
|
-
e && P.value && !x.value && L();
|
|
231
|
-
}), (e, t) => r(F).length || d.value.length ? (g(), w(r(_), {
|
|
232
|
-
key: 0,
|
|
233
|
-
"aria-labelledby": `${r(k)}-header`,
|
|
234
|
-
class: "dark-mode",
|
|
235
|
-
ref_key: "elem",
|
|
236
|
-
ref: R,
|
|
237
|
-
role: "region"
|
|
238
|
-
}, {
|
|
239
|
-
default: s(() => [
|
|
240
|
-
n(r(Ve), { muted: "" }, {
|
|
241
|
-
actions: s(() => [
|
|
242
|
-
n(Te, {
|
|
243
|
-
class: "request-client-picker",
|
|
244
|
-
controls: `${r(k)}-example`,
|
|
245
|
-
modelValue: JSON.stringify(o.value),
|
|
246
|
-
options: ce.value,
|
|
247
|
-
"onUpdate:modelValue": me
|
|
248
|
-
}, {
|
|
249
|
-
default: s(() => [
|
|
250
|
-
o.value.targetKey === "customExamples" ? (g(), D(Z, { key: 0 }, [
|
|
251
|
-
n(I, null, {
|
|
252
|
-
default: s(() => t[1] || (t[1] = [
|
|
253
|
-
b("Selected Example:")
|
|
254
|
-
])),
|
|
255
|
-
_: 1
|
|
256
|
-
}),
|
|
257
|
-
b(" " + H(d.value[o.value.clientKey].label ?? "Example"), 1)
|
|
258
|
-
], 64)) : (g(), D(Z, { key: 1 }, [
|
|
259
|
-
n(I, null, {
|
|
260
|
-
default: s(() => t[2] || (t[2] = [
|
|
261
|
-
b("Selected HTTP client:")
|
|
262
|
-
])),
|
|
263
|
-
_: 1
|
|
264
|
-
}),
|
|
265
|
-
b(" " + H(r(oe)) + " " + H(r(se)), 1)
|
|
266
|
-
], 64))
|
|
267
|
-
]),
|
|
268
|
-
_: 1
|
|
269
|
-
}, 8, ["controls", "modelValue", "options"])
|
|
270
|
-
]),
|
|
271
|
-
default: s(() => [
|
|
272
|
-
U("div", {
|
|
273
|
-
id: `${r(k)}-header`,
|
|
274
|
-
class: "request-header"
|
|
275
|
-
}, [
|
|
276
|
-
n(I, null, {
|
|
277
|
-
default: s(() => t[0] || (t[0] = [
|
|
278
|
-
b("Request Example for")
|
|
279
|
-
])),
|
|
280
|
-
_: 1
|
|
281
|
-
}),
|
|
282
|
-
n(r(ee), {
|
|
283
|
-
as: "span",
|
|
284
|
-
class: "request-method",
|
|
285
|
-
method: e.method
|
|
286
|
-
}, null, 8, ["method"]),
|
|
287
|
-
$(e.$slots, "header", {}, void 0, !0)
|
|
288
|
-
], 8, je)
|
|
289
|
-
]),
|
|
290
|
-
_: 3
|
|
291
|
-
}),
|
|
292
|
-
n(r(te), {
|
|
293
|
-
borderless: "",
|
|
294
|
-
class: "request-editor-section custom-scroll",
|
|
295
|
-
frameless: ""
|
|
296
|
-
}, {
|
|
297
|
-
default: s(() => [
|
|
298
|
-
U("div", {
|
|
299
|
-
id: `${r(k)}-example`,
|
|
300
|
-
class: "code-snippet"
|
|
301
|
-
}, [
|
|
302
|
-
n(r(qe), {
|
|
303
|
-
class: "bg-b-2 -outline-offset-2",
|
|
304
|
-
content: z.value,
|
|
305
|
-
hideCredentials: ie.value,
|
|
306
|
-
lang: ue.value,
|
|
307
|
-
lineNumbers: ""
|
|
308
|
-
}, null, 8, ["content", "hideCredentials", "lang"])
|
|
309
|
-
], 8, we)
|
|
310
|
-
]),
|
|
311
|
-
_: 1
|
|
312
|
-
}),
|
|
313
|
-
(X.value || !r(le).hideTestRequestButton) && e.$slots.footer ? (g(), w(r(Re), {
|
|
314
|
-
key: 0,
|
|
315
|
-
class: "request-card-footer",
|
|
316
|
-
contrast: ""
|
|
317
|
-
}, {
|
|
318
|
-
default: s(() => [
|
|
319
|
-
X.value ? (g(), D("div", Je, [
|
|
320
|
-
n($e, {
|
|
321
|
-
class: "request-example-selector",
|
|
322
|
-
examples: O.value,
|
|
323
|
-
modelValue: r(M),
|
|
324
|
-
"onUpdate:modelValue": de
|
|
325
|
-
}, null, 8, ["examples", "modelValue"])
|
|
326
|
-
])) : J("", !0),
|
|
327
|
-
$(e.$slots, "footer", {}, void 0, !0)
|
|
328
|
-
]),
|
|
329
|
-
_: 3
|
|
330
|
-
})) : J("", !0)
|
|
331
|
-
]),
|
|
332
|
-
_: 3
|
|
333
|
-
}, 8, ["aria-labelledby"])) : e.fallback ? (g(), w(r(_), {
|
|
334
|
-
key: 1,
|
|
335
|
-
class: "dark-mode"
|
|
336
|
-
}, {
|
|
337
|
-
default: s(() => [
|
|
338
|
-
n(r(te), { class: "request-card-simple" }, {
|
|
339
|
-
default: s(() => [
|
|
340
|
-
U("div", Ue, [
|
|
341
|
-
n(r(ee), {
|
|
342
|
-
as: "span",
|
|
343
|
-
class: "request-method",
|
|
344
|
-
method: e.method
|
|
345
|
-
}, null, 8, ["method"]),
|
|
346
|
-
$(e.$slots, "header", {}, void 0, !0)
|
|
347
|
-
]),
|
|
348
|
-
$(e.$slots, "footer", {}, void 0, !0)
|
|
349
|
-
]),
|
|
350
|
-
_: 3
|
|
351
|
-
})
|
|
352
|
-
]),
|
|
353
|
-
_: 3
|
|
354
|
-
})) : J("", !0);
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
export {
|
|
358
|
-
ot as default
|
|
359
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
modelValue: any;
|
|
3
|
-
options: {
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
options?: {
|
|
7
|
-
value: string;
|
|
8
|
-
label: string;
|
|
9
|
-
}[];
|
|
10
|
-
}[];
|
|
11
|
-
controls?: string;
|
|
12
|
-
};
|
|
13
|
-
declare function __VLS_template(): {
|
|
14
|
-
attrs: Partial<{}>;
|
|
15
|
-
slots: {
|
|
16
|
-
default?(_: {}): any;
|
|
17
|
-
};
|
|
18
|
-
refs: {};
|
|
19
|
-
rootEl: HTMLLabelElement;
|
|
20
|
-
};
|
|
21
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
23
|
-
"update:modelValue": (value: any) => any;
|
|
24
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
26
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
27
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
-
export default _default;
|
|
29
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
-
new (): {
|
|
31
|
-
$slots: S;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=TextSelect.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/features/example-request/TextSelect.vue"],"names":[],"mappings":"AA4HA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,GAAG,CAAA;IACf,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE;YACR,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,EAAE,CAAA;KACJ,EAAE,CAAA;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAkBF,iBAAS,cAAc;WAyDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;+FAQnB,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,48 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, computed as v, createElementBlock as l, openBlock as o, normalizeClass as b, createElementVNode as u, renderSlot as _, Fragment as s, renderList as r, toDisplayString as p } from "vue";
|
|
2
|
-
const g = { class: "text-select-label" }, f = ["aria-controls", "tabindex", "value"], k = ["label"], y = ["value"], V = ["value"], S = /* @__PURE__ */ m({
|
|
3
|
-
__name: "TextSelect",
|
|
4
|
-
props: {
|
|
5
|
-
modelValue: {},
|
|
6
|
-
options: {},
|
|
7
|
-
controls: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(i) {
|
|
11
|
-
const d = i, c = v(
|
|
12
|
-
() => d.options.flatMap((e) => e.options ?? e).length
|
|
13
|
-
);
|
|
14
|
-
return (e, n) => (o(), l("label", {
|
|
15
|
-
class: b(["text-select", c.value === 1 ? "text-select--single-option" : ""])
|
|
16
|
-
}, [
|
|
17
|
-
u("span", g, [
|
|
18
|
-
_(e.$slots, "default")
|
|
19
|
-
]),
|
|
20
|
-
u("select", {
|
|
21
|
-
"aria-controls": e.controls,
|
|
22
|
-
tabindex: e.options.length === 1 ? -1 : 0,
|
|
23
|
-
value: e.modelValue,
|
|
24
|
-
onInput: n[0] || (n[0] = (t) => e.$emit("update:modelValue", t.target.value))
|
|
25
|
-
}, [
|
|
26
|
-
(o(!0), l(s, null, r(e.options, (t) => (o(), l(s, {
|
|
27
|
-
key: t.value
|
|
28
|
-
}, [
|
|
29
|
-
t.options ? (o(), l("optgroup", {
|
|
30
|
-
key: 0,
|
|
31
|
-
label: t.label
|
|
32
|
-
}, [
|
|
33
|
-
(o(!0), l(s, null, r(t.options, (a) => (o(), l("option", {
|
|
34
|
-
key: a.value,
|
|
35
|
-
value: a.value
|
|
36
|
-
}, p(a.label), 9, y))), 128))
|
|
37
|
-
], 8, k)) : (o(), l("option", {
|
|
38
|
-
key: t.value,
|
|
39
|
-
value: t.value
|
|
40
|
-
}, p(t.label), 9, V))
|
|
41
|
-
], 64))), 128))
|
|
42
|
-
], 40, f)
|
|
43
|
-
], 2));
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
export {
|
|
47
|
-
S as default
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/example-request/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
|
File without changes
|
|
File without changes
|