zudoku 0.35.1 → 0.35.2
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/dist/config/validators/common.d.ts +176 -0
- package/dist/config/validators/common.js +1 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +63 -0
- package/dist/lib/plugins/openapi/OperationList.js +5 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +1 -0
- package/dist/vite/plugin-api.js +1 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{OasProvider-vimCZXXF.js → OasProvider-_ye9MUAd.js} +2 -2
- package/lib/{OasProvider-vimCZXXF.js.map → OasProvider-_ye9MUAd.js.map} +1 -1
- package/lib/{OperationList-C6Tumce9.js → OperationList-Br5x22KD.js} +1135 -1134
- package/lib/{OperationList-C6Tumce9.js.map → OperationList-Br5x22KD.js.map} +1 -1
- package/lib/{index-OD2IZ2Nn.js → index-C7TIhpXK.js} +3 -3
- package/lib/{index-OD2IZ2Nn.js.map → index-C7TIhpXK.js.map} +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +7 -2
- package/src/lib/plugins/openapi/interfaces.ts +1 -0
|
@@ -5,7 +5,7 @@ import "./chunk-HA7DTUK3-ZGg2W6yV.js";
|
|
|
5
5
|
import "./hook-CfCFKZ-2.js";
|
|
6
6
|
import "./ui/Button.js";
|
|
7
7
|
import "./joinUrl-10po2Jdj.js";
|
|
8
|
-
import { U as n, o as s } from "./index-
|
|
8
|
+
import { U as n, o as s } from "./index-C7TIhpXK.js";
|
|
9
9
|
export {
|
|
10
10
|
n as UNTAGGED_PATH,
|
|
11
11
|
s as openApiPlugin
|
package/package.json
CHANGED
|
@@ -131,7 +131,7 @@ export const OperationList = ({
|
|
|
131
131
|
tag?: string;
|
|
132
132
|
untagged?: boolean;
|
|
133
133
|
}) => {
|
|
134
|
-
const { input, type, versions, version } = useOasConfig();
|
|
134
|
+
const { input, type, versions, version, options } = useOasConfig();
|
|
135
135
|
const query = useCreateQuery(AllOperationsQuery, {
|
|
136
136
|
input,
|
|
137
137
|
type,
|
|
@@ -164,7 +164,11 @@ export const OperationList = ({
|
|
|
164
164
|
? sanitizeMarkdownForMetatag(description)
|
|
165
165
|
: undefined;
|
|
166
166
|
|
|
167
|
-
const
|
|
167
|
+
const hasMultipleVersions = Object.entries(versions).length > 1;
|
|
168
|
+
|
|
169
|
+
const showVersions =
|
|
170
|
+
options?.showVersionSelect === "always" ||
|
|
171
|
+
(hasMultipleVersions && options?.showVersionSelect !== "hide");
|
|
168
172
|
|
|
169
173
|
return (
|
|
170
174
|
<div
|
|
@@ -203,6 +207,7 @@ export const OperationList = ({
|
|
|
203
207
|
<Select
|
|
204
208
|
onValueChange={(version) => navigate(versions[version]!)}
|
|
205
209
|
defaultValue={version}
|
|
210
|
+
disabled={!hasMultipleVersions}
|
|
206
211
|
>
|
|
207
212
|
<SelectTrigger className="w-[180px]">
|
|
208
213
|
<SelectValue placeholder="Select version" />
|