@mintlify/msft-sdk 1.1.61 → 1.1.63
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/api-playground/ApiPlayground/Response/DownloadFileButton.js +6 -5
- package/dist/api-playground/ApiPlayground/Response/ResponseBody/CodeResponseContent.js +13 -12
- package/dist/api-playground/ApiPlayground/Response/ResponsePlaceholder.js +8 -7
- package/dist/api-playground/ApiPlayground/Response/ResponseTable.js +3 -2
- package/dist/api-playground/ApiPlayground/Response/ResponseTopbar.js +9 -8
- package/dist/api-playground/ApiPlayground/Response/index.js +4 -3
- package/dist/api-playground/ApiPlayground/components/AdditionalPropertyButton.js +42 -21
- package/dist/api-playground/ApiPlayground/components/ParamFieldWrapper.js +13 -9
- package/dist/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +6 -5
- package/dist/api-playground/ApiPlayground/components/SendPill.js +3 -2
- package/dist/api-playground/ApiPlayground/components/TypeDropdown.js +6 -5
- package/dist/api-playground/EndpointFields/ParamFields/ExampleDescription.js +3 -2
- package/dist/api-playground/EndpointFields/components/Description.js +6 -5
- package/dist/api-playground/EndpointFields/components/OptionDropdown.js +9 -8
- package/dist/api-playground/EndpointFields/components/SectionHeading.js +8 -7
- package/dist/api-playground-2/ApiExamples.js +19 -20
- package/dist/api-playground-2/ApiFields.js +20 -247
- package/dist/api-playground-2/EndpointHeader.js +59 -47
- package/dist/api-playground-2/OperationPage.js +70 -66
- package/dist/api-playground-2/Playground.js +67 -83
- package/dist/api-playground-2/SchemaPage.js +22 -9
- package/dist/api-playground-2/components/EndpointFields/Body.js +40 -0
- package/dist/api-playground-2/components/EndpointFields/Parameters.js +90 -0
- package/dist/api-playground-2/components/EndpointFields/Response.js +146 -0
- package/dist/api-playground-2/components/EndpointFields/Security.js +88 -0
- package/dist/api-playground-2/components/EndpointFields/fields/ArrayParamField.js +93 -0
- package/dist/api-playground-2/components/EndpointFields/fields/Enum.js +29 -11
- package/dist/api-playground-2/components/EndpointFields/fields/ObjectParamField.js +145 -0
- package/dist/api-playground-2/components/EndpointFields/fields/PrimitiveParamField.js +60 -48
- package/dist/api-playground-2/components/EndpointFields/fields/SchemaField.js +230 -0
- package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +93 -89
- package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +18 -17
- package/dist/api-playground-2/components/Example/RequestExample.js +92 -93
- package/dist/api-playground-2/components/Example/ResponseExample.js +19 -15
- package/dist/api-playground-2/components/Request/ParameterSection.js +20 -18
- package/dist/api-playground-2/components/Request/SecuritySection.js +53 -43
- package/dist/api-playground-2/components/Request/inputs/ArrayInput.js +89 -40
- package/dist/api-playground-2/components/Request/inputs/DifferentiatedInput.js +12 -12
- package/dist/api-playground-2/components/Request/inputs/FileInput.js +16 -15
- package/dist/api-playground-2/components/Request/inputs/InputContainer.js +76 -57
- package/dist/api-playground-2/components/Request/inputs/NumberInput.js +10 -9
- package/dist/api-playground-2/components/Request/inputs/ObjectInput.js +98 -80
- package/dist/api-playground-2/components/Request/inputs/OneOfInput.js +55 -47
- package/dist/api-playground-2/components/Request/inputs/SelectInput.js +18 -17
- package/dist/api-playground-2/components/Request/inputs/StringInput.js +19 -18
- package/dist/api-playground-2/components/Request/inputs/TextInput.js +12 -11
- package/dist/api-playground-2/components/SendPillWrapper.js +35 -0
- package/dist/api-playground-2/contexts/ApiPlaygroundContext.js +3 -5
- package/dist/api-playground-2/generators/createCookies.js +23 -0
- package/dist/api-playground-2/generators/createHeaders.js +53 -36
- package/dist/api-playground-2/generators/createQueryString.js +30 -0
- package/dist/api-playground-2/generators/generateAuthPlaceholder.js +14 -0
- package/dist/api-playground-2/generators/generateInteractiveCodeSample.js +27 -25
- package/dist/api-playground-2/generators/generateRequest.js +47 -51
- package/dist/api-playground-2/generators/generateResponseExampleMap.js +15 -11
- package/dist/api-playground-2/generators/generateSnippet.js +1 -1
- package/dist/api-playground-2/generators/generateSnippetMap.js +13 -11
- package/dist/api-playground-2/hooks/useCopyPathWithInputs.js +11 -11
- package/dist/api-playground-2/hooks/useInitializeInputs.js +185 -88
- package/dist/api-playground-2/hooks/usePlaygroundInputsStore.js +70 -25
- package/dist/api-playground-2/hooks/useSelectedBaseUrl.js +13 -0
- package/dist/api-playground-2/hooks/useSelectedExample.js +10 -0
- package/dist/api-playground-2/hooks/useSelectedRequestBodyContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedResponseContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedSecurityOption.js +31 -0
- package/dist/api-playground-2/hooks/useSendPlaygroundRequest.js +114 -101
- package/dist/api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js +23 -32
- package/dist/api-playground-2/schemaGraph/addTypeLabelsToSchema.js +50 -0
- package/dist/api-playground-2/schemaGraph/addUniqueKeysToSchema.js +40 -24
- package/dist/api-playground-2/schemaGraph/getExampleBodyInputs.js +94 -0
- package/dist/api-playground-2/schemaGraph/getSchemaGraphOperationData.js +56 -50
- package/dist/api-playground-2/schemaGraph/processExamples.js +117 -52
- package/dist/api-playground-2/schemaGraph/processSchema.js +10 -0
- package/dist/api-playground-2/schemaGraph/processSecurityOptions.js +58 -28
- package/dist/api-playground-2/schemaGraph/reduceCompositions.js +220 -181
- package/dist/api-playground-2/schemaGraph/resolveOperationWithDependencies.js +128 -89
- package/dist/api-playground-2/schemaGraph/resolveSchemaWithDependencies.js +15 -16
- package/dist/api-playground-2/schemaGraph/sortSchemaByRequired.js +14 -12
- package/dist/api-playground-2/schemaGraph/utils.js +185 -147
- package/dist/common/guards.js +11 -19
- package/dist/components/Api/Expandable.js +10 -9
- package/dist/components/Api/Param.js +11 -13
- package/dist/components/Api/dropdown-menu.js +10 -9
- package/dist/components/content-components/code-group.js +4 -4
- package/dist/contexts/EndpointLocationContext.js +3 -3
- package/dist/hooks/useApiParamFieldOption.js +10 -0
- package/dist/hooks/useEndpoint.js +3 -3
- package/dist/hooks/useKeyboardShortcut.js +13 -13
- package/dist/hooks/useSendPlaygroundRequest.js +14 -146
- package/dist/httpsnippet/src/helpers/code-builder.js +27 -0
- package/dist/httpsnippet/src/helpers/escape.js +11 -0
- package/dist/httpsnippet/src/helpers/headers.js +13 -0
- package/dist/httpsnippet/src/helpers/reducer.js +7 -0
- package/dist/httpsnippet/src/helpers/shell.js +5 -0
- package/dist/httpsnippet/src/helpers/url-format.js +35 -0
- package/dist/httpsnippet/src/helpers/url-parse.js +76 -0
- package/dist/httpsnippet/src/index.js +157 -0
- package/dist/httpsnippet/src/targets/c/libcurl/client.js +22 -0
- package/dist/httpsnippet/src/targets/c/target.js +15 -0
- package/dist/httpsnippet/src/targets/clojure/clj_http/client.js +120 -0
- package/dist/httpsnippet/src/targets/clojure/target.js +14 -0
- package/dist/httpsnippet/src/targets/csharp/httpclient/client.js +76 -0
- package/dist/httpsnippet/src/targets/csharp/restsharp/client.js +63 -0
- package/dist/httpsnippet/src/targets/csharp/target.js +17 -0
- package/dist/httpsnippet/src/targets/go/native/client.js +24 -0
- package/dist/httpsnippet/src/targets/go/target.js +15 -0
- package/dist/httpsnippet/src/targets/http/http1.1/client.js +34 -0
- package/dist/httpsnippet/src/targets/http/target.js +14 -0
- package/dist/httpsnippet/src/targets/index.js +43 -0
- package/dist/httpsnippet/src/targets/java/asynchttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/java/nethttp/client.js +28 -0
- package/dist/httpsnippet/src/targets/java/okhttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/java/target.js +20 -0
- package/dist/httpsnippet/src/targets/java/unirest/client.js +23 -0
- package/dist/httpsnippet/src/targets/javascript/axios/client.js +50 -0
- package/dist/httpsnippet/src/targets/javascript/fetch/client.js +61 -0
- package/dist/httpsnippet/src/targets/javascript/jquery/client.js +51 -0
- package/dist/httpsnippet/src/targets/javascript/target.js +20 -0
- package/dist/httpsnippet/src/targets/javascript/xhr/client.js +49 -0
- package/dist/httpsnippet/src/targets/json/native/client.js +39 -0
- package/dist/httpsnippet/src/targets/json/target.js +14 -0
- package/dist/httpsnippet/src/targets/kotlin/okhttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/kotlin/target.js +14 -0
- package/dist/httpsnippet/src/targets/node/axios/client.js +40 -0
- package/dist/httpsnippet/src/targets/node/fetch/client.js +68 -0
- package/dist/httpsnippet/src/targets/node/native/client.js +45 -0
- package/dist/httpsnippet/src/targets/node/target.js +19 -0
- package/dist/httpsnippet/src/targets/objc/helpers.js +27 -0
- package/dist/httpsnippet/src/targets/objc/nsurlsession/client.js +63 -0
- package/dist/httpsnippet/src/targets/objc/target.js +14 -0
- package/dist/httpsnippet/src/targets/ocaml/cohttp/client.js +32 -0
- package/dist/httpsnippet/src/targets/ocaml/target.js +14 -0
- package/dist/httpsnippet/src/targets/php/curl/client.js +85 -0
- package/dist/httpsnippet/src/targets/php/guzzle/client.js +57 -0
- package/dist/httpsnippet/src/targets/php/helpers.js +65 -0
- package/dist/httpsnippet/src/targets/php/http1/client.js +28 -0
- package/dist/httpsnippet/src/targets/php/http2/client.js +55 -0
- package/dist/httpsnippet/src/targets/php/target.js +21 -0
- package/dist/httpsnippet/src/targets/powershell/common.js +19 -0
- package/dist/httpsnippet/src/targets/powershell/restmethod/client.js +14 -0
- package/dist/httpsnippet/src/targets/powershell/target.js +16 -0
- package/dist/httpsnippet/src/targets/powershell/webrequest/client.js +14 -0
- package/dist/httpsnippet/src/targets/python/helpers.js +33 -0
- package/dist/httpsnippet/src/targets/python/requests/client.js +74 -0
- package/dist/httpsnippet/src/targets/python/target.js +15 -0
- package/dist/httpsnippet/src/targets/r/httr/client.js +46 -0
- package/dist/httpsnippet/src/targets/r/target.js +14 -0
- package/dist/httpsnippet/src/targets/ruby/native/client.js +37 -0
- package/dist/httpsnippet/src/targets/ruby/target.js +14 -0
- package/dist/httpsnippet/src/targets/shell/curl/client.js +92 -0
- package/dist/httpsnippet/src/targets/shell/httpie/client.js +56 -0
- package/dist/httpsnippet/src/targets/shell/target.js +19 -0
- package/dist/httpsnippet/src/targets/shell/wget/client.js +30 -0
- package/dist/httpsnippet/src/targets/swift/helpers.js +38 -0
- package/dist/httpsnippet/src/targets/swift/target.js +14 -0
- package/dist/httpsnippet/src/targets/swift/urlsession/client.js +59 -0
- package/dist/index.d.ts +65 -58
- package/dist/index.js +109 -111
- package/dist/openapi/generateTypeStringFromSchema.js +2 -31
- package/dist/styles.css +1 -1
- package/package.json +17 -4
- package/dist/api-playground/ApiPlayground/Request/BodySection.js +0 -64
- package/dist/api-playground/ApiPlayground/Request/ParameterSection.js +0 -32
- package/dist/api-playground/ApiPlayground/Request/PlaygroundModal.js +0 -201
- package/dist/api-playground/ApiPlayground/Request/SecuritySection.js +0 -146
- package/dist/api-playground/ApiPlayground/Request/ServerSection.js +0 -30
- package/dist/api-playground/ApiPlayground/Request/index.js +0 -43
- package/dist/api-playground/ApiPlayground/Request/inputs/ArrayInput.js +0 -93
- package/dist/api-playground/ApiPlayground/Request/inputs/DifferentiatedInput.js +0 -90
- package/dist/api-playground/ApiPlayground/Request/inputs/FileInput.js +0 -62
- package/dist/api-playground/ApiPlayground/Request/inputs/NullInput.js +0 -33
- package/dist/api-playground/ApiPlayground/Request/inputs/NumberInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectChildren.js +0 -109
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectInput.js +0 -87
- package/dist/api-playground/ApiPlayground/Request/inputs/RecursiveInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/SelectInput.js +0 -54
- package/dist/api-playground/ApiPlayground/Request/inputs/StringInput.js +0 -67
- package/dist/api-playground/ApiPlayground/Request/inputs/TextInput.js +0 -44
- package/dist/api-playground/ApiPlayground/components/EndpointsMenu.js +0 -42
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuLink.js +0 -43
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuSearch.js +0 -38
- package/dist/api-playground/ApiPlayground/components/InputContainer.js +0 -128
- package/dist/api-playground/ApiPlayground/components/InputSectionContainer.js +0 -59
- package/dist/api-playground/ApiPlayground/components/PathHeader.js +0 -162
- package/dist/api-playground/ApiPlayground/components/TrashButton.js +0 -26
- package/dist/api-playground/ApiPlayground/index.js +0 -67
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/Enum.js +0 -19
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/NumberMetadata.js +0 -18
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/StringMetadata.js +0 -28
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/index.js +0 -5
- package/dist/api-playground/EndpointFields/ParamFields/RecursiveParamField.js +0 -13
- package/dist/api-playground/EndpointFields/index.js +0 -7
- package/dist/api-playground-2/components/EndpointFields/EndpointSecurity.js +0 -87
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleArrayParamField.js +0 -89
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleObjectParamField.js +0 -121
- package/dist/api-playground-2/components/EndpointFields/fields/SimplePrimitiveParamField.js +0 -74
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleSchemaField.js +0 -252
- package/dist/common/potentiallyParseOpenApiString.js +0 -24
- package/dist/common/replaceSlashIndex.js +0 -6
- package/dist/common/slugToTitle.js +0 -10
- package/dist/constants/prism-languages.js +0 -19
- package/dist/contexts/ApiPlaygroundInputsContext.js +0 -17
- package/dist/contexts/MDXContentContext.js +0 -17
- package/dist/hooks/useApiPlaygroundInputs.js +0 -6
- package/dist/hooks/useApiPlaygroundPrefillExamples.js +0 -39
- package/dist/hooks/useBaseUrlOptions.js +0 -18
- package/dist/hooks/useComponentSchemas.js +0 -9
- package/dist/hooks/useGenerateNextAdditionalProperties.js +0 -11
- package/dist/hooks/useGenerateNextItems.js +0 -11
- package/dist/hooks/useGenerateNextProperties.js +0 -11
- package/dist/hooks/useMDXContent.js +0 -6
- package/dist/hooks/useMDXContentController/useApiPlaygroundInputs.js +0 -9
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiBaseIndexCallback.js +0 -15
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiPlaygroundInputsCallback.js +0 -15
- package/dist/hooks/usePlaygroundSchemaOptions.js +0 -42
- package/dist/hooks/usePrefilledInputs/index.js +0 -65
- package/dist/hooks/usePrefilledInputs/storedServerVariables.js +0 -29
- package/dist/hooks/useSecurityOption.js +0 -10
- package/dist/hooks/useSetDefaultValue.js +0 -63
- package/dist/openapi/filterEnums.js +0 -20
- package/dist/openapi/generateNextAdditionalProperties.js +0 -7
- package/dist/openapi/generateNextItems.js +0 -7
- package/dist/openapi/generateNextProperties.js +0 -23
- package/dist/openapi/generateOptionLabels.js +0 -20
- package/dist/openapi/generateSimpleLabels.js +0 -4
- package/dist/openapi/getAuthFilteredSchemaArray.js +0 -18
- package/dist/paths/isEqualIgnoringLeadingSlash.js +0 -21
- package/dist/paths/optionallyRemoveLeadingSlash.js +0 -6
- package/dist/paths/optionallyRemoveTrailingSlash.js +0 -6
- package/dist/utils/api-playground/defaults.js +0 -15
- package/dist/utils/api-playground/paramFieldDefaults.js +0 -10
- package/dist/utils/api-reference/getFilteredSecurityOptions.js +0 -4
- package/dist/utils/api-reference/getNextPropertiesByType.js +0 -5
- package/dist/utils/flattenObject.js +0 -10
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { isInteger as c, isNumber as m, isString as p, isArray as y, isObject as j, isBoolean as S } from "../../../../common/guards.js";
|
|
3
|
-
import { useSetDefaultValue as d } from "../../../../hooks/useSetDefaultValue.js";
|
|
4
|
-
import { ArrayInput as w } from "./ArrayInput.js";
|
|
5
|
-
import { FileInput as x } from "./FileInput.js";
|
|
6
|
-
import { NullInput as N } from "./NullInput.js";
|
|
7
|
-
import { NumberInput as I } from "./NumberInput.js";
|
|
8
|
-
import { ObjectInput as a } from "./ObjectInput.js";
|
|
9
|
-
import { SelectInput as u } from "./SelectInput.js";
|
|
10
|
-
import { StringInput as A } from "./StringInput.js";
|
|
11
|
-
import { TextInput as D } from "./TextInput.js";
|
|
12
|
-
const H = ({
|
|
13
|
-
schema: o,
|
|
14
|
-
value: n,
|
|
15
|
-
depth: e,
|
|
16
|
-
isBody: b,
|
|
17
|
-
setValue: i,
|
|
18
|
-
defaultExpanded: g,
|
|
19
|
-
renderedRefs: l,
|
|
20
|
-
prefillDisabled: s,
|
|
21
|
-
...r
|
|
22
|
-
}) => {
|
|
23
|
-
switch (d(o, n, i, s), o.type) {
|
|
24
|
-
case "string": {
|
|
25
|
-
const t = p(n) ? n : void 0;
|
|
26
|
-
return /* @__PURE__ */ f(b && e === 0 ? D : A, { schema: o, value: t, setValue: i, ...r });
|
|
27
|
-
}
|
|
28
|
-
case "number": {
|
|
29
|
-
const t = m(n) ? n : void 0;
|
|
30
|
-
return /* @__PURE__ */ f(I, { schema: o, value: t, setValue: i, ...r });
|
|
31
|
-
}
|
|
32
|
-
case "boolean": {
|
|
33
|
-
const t = S(n) ? n : void 0;
|
|
34
|
-
return /* @__PURE__ */ f(u, { schema: o, value: t, setValue: i, ...r });
|
|
35
|
-
}
|
|
36
|
-
case "object": {
|
|
37
|
-
const t = j(n) ? n : void 0;
|
|
38
|
-
return /* @__PURE__ */ f(
|
|
39
|
-
a,
|
|
40
|
-
{
|
|
41
|
-
schema: o,
|
|
42
|
-
value: t,
|
|
43
|
-
setValue: i,
|
|
44
|
-
depth: e,
|
|
45
|
-
defaultExpanded: g,
|
|
46
|
-
renderedRefs: l,
|
|
47
|
-
...r
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
case "integer": {
|
|
52
|
-
const t = c(n) ? n : void 0;
|
|
53
|
-
return /* @__PURE__ */ f(I, { schema: o, value: t, setValue: i, ...r });
|
|
54
|
-
}
|
|
55
|
-
case "array": {
|
|
56
|
-
const t = y(n) ? n : void 0;
|
|
57
|
-
return /* @__PURE__ */ f(
|
|
58
|
-
w,
|
|
59
|
-
{
|
|
60
|
-
schema: o,
|
|
61
|
-
value: t,
|
|
62
|
-
setValue: i,
|
|
63
|
-
depth: e,
|
|
64
|
-
...r
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
case "enum<string>": {
|
|
69
|
-
const t = p(n) ? n : void 0;
|
|
70
|
-
return /* @__PURE__ */ f(u, { schema: o, value: t, setValue: i, ...r });
|
|
71
|
-
}
|
|
72
|
-
case "enum<number>": {
|
|
73
|
-
const t = m(n) ? n : void 0;
|
|
74
|
-
return /* @__PURE__ */ f(u, { schema: o, value: t, setValue: i, ...r });
|
|
75
|
-
}
|
|
76
|
-
case "enum<integer>": {
|
|
77
|
-
const t = c(n) ? n : void 0;
|
|
78
|
-
return /* @__PURE__ */ f(u, { schema: o, value: t, setValue: i, ...r });
|
|
79
|
-
}
|
|
80
|
-
case "file": {
|
|
81
|
-
const t = typeof window < "u" && n instanceof File ? n : void 0;
|
|
82
|
-
return /* @__PURE__ */ f(x, { schema: o, value: t, setValue: i, ...r });
|
|
83
|
-
}
|
|
84
|
-
case "null":
|
|
85
|
-
return /* @__PURE__ */ f(N, { schema: o, value: n === null ? null : void 0, setValue: i, ...r });
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
export {
|
|
89
|
-
H as DifferentiatedInput
|
|
90
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as u } from "react";
|
|
3
|
-
import { useSelectedLocale as x } from "../../../../utils/locales/index.js";
|
|
4
|
-
import "@mintlify/validation";
|
|
5
|
-
import { cn as h } from "../../../../utils/cn.js";
|
|
6
|
-
import { InputContainer as g } from "../../components/InputContainer.js";
|
|
7
|
-
const w = ({
|
|
8
|
-
name: l,
|
|
9
|
-
schema: i,
|
|
10
|
-
typeDropdown: a,
|
|
11
|
-
value: t,
|
|
12
|
-
setValue: m,
|
|
13
|
-
clearValue: p,
|
|
14
|
-
parentNames: c,
|
|
15
|
-
arrayIndex: d
|
|
16
|
-
}) => {
|
|
17
|
-
const f = x(), n = u(null);
|
|
18
|
-
return /* @__PURE__ */ s(
|
|
19
|
-
g,
|
|
20
|
-
{
|
|
21
|
-
name: l,
|
|
22
|
-
typeDropdown: a,
|
|
23
|
-
schema: i,
|
|
24
|
-
onClear: p,
|
|
25
|
-
parentNames: c,
|
|
26
|
-
arrayIndex: d,
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ o(
|
|
29
|
-
"button",
|
|
30
|
-
{
|
|
31
|
-
"aria-label": f["aria.fileUploadButton"],
|
|
32
|
-
className: h(
|
|
33
|
-
"mint:text-left mint:flex mint:text-playground-input mint:overflow-hidden",
|
|
34
|
-
t ? "mint:text-gray-900! mint:dark:text-gray-100!" : "mint:text-gray-400! mint:dark:text-white/30!"
|
|
35
|
-
),
|
|
36
|
-
onClick: () => {
|
|
37
|
-
var e;
|
|
38
|
-
return (e = n.current) == null ? void 0 : e.click();
|
|
39
|
-
},
|
|
40
|
-
children: (t == null ? void 0 : t.name) ?? i.placeholder ?? "Drop a file here or click to upload"
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ o(
|
|
44
|
-
"input",
|
|
45
|
-
{
|
|
46
|
-
type: "file",
|
|
47
|
-
"data-testid": "file-input",
|
|
48
|
-
onChange: (e) => {
|
|
49
|
-
var r;
|
|
50
|
-
return m((r = e.target.files) == null ? void 0 : r[0]);
|
|
51
|
-
},
|
|
52
|
-
ref: n,
|
|
53
|
-
className: "mint:hidden"
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
export {
|
|
61
|
-
w as FileInput
|
|
62
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { InputContainer as a } from "../../components/InputContainer.js";
|
|
3
|
-
const u = ({
|
|
4
|
-
name: n,
|
|
5
|
-
schema: e,
|
|
6
|
-
typeDropdown: i,
|
|
7
|
-
clearValue: r,
|
|
8
|
-
parentNames: l,
|
|
9
|
-
arrayIndex: o
|
|
10
|
-
}) => /* @__PURE__ */ t(
|
|
11
|
-
a,
|
|
12
|
-
{
|
|
13
|
-
name: n,
|
|
14
|
-
typeDropdown: i,
|
|
15
|
-
schema: e,
|
|
16
|
-
onClear: r,
|
|
17
|
-
parentNames: l,
|
|
18
|
-
arrayIndex: o,
|
|
19
|
-
children: /* @__PURE__ */ t(
|
|
20
|
-
"input",
|
|
21
|
-
{
|
|
22
|
-
className: "mint:flex-1 mint:min-w-0 mint:outline-0 mint:bg-transparent mint:text-playground-input",
|
|
23
|
-
type: "text",
|
|
24
|
-
placeholder: "--",
|
|
25
|
-
contentEditable: "false",
|
|
26
|
-
disabled: !0
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
export {
|
|
32
|
-
u as NullInput
|
|
33
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback as g } from "react";
|
|
3
|
-
import { useSelectedLocale as s } from "../../../../utils/locales/index.js";
|
|
4
|
-
import { InputContainer as c } from "../../components/InputContainer.js";
|
|
5
|
-
import { Ids as y } from "../../../../api-playground-2/types/index.js";
|
|
6
|
-
const C = ({
|
|
7
|
-
name: n,
|
|
8
|
-
typeDropdown: o,
|
|
9
|
-
schema: r,
|
|
10
|
-
value: i,
|
|
11
|
-
setValue: t,
|
|
12
|
-
clearValue: p,
|
|
13
|
-
arrayIndex: u,
|
|
14
|
-
...m
|
|
15
|
-
}) => {
|
|
16
|
-
const d = s(), f = g(
|
|
17
|
-
(e) => {
|
|
18
|
-
if (e.target.value.length === 0) {
|
|
19
|
-
t(void 0);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (r.type === "integer") {
|
|
23
|
-
const a = parseInt(e.target.value);
|
|
24
|
-
if (isNaN(a))
|
|
25
|
-
return;
|
|
26
|
-
t(a);
|
|
27
|
-
} else
|
|
28
|
-
t(parseFloat(e.target.value));
|
|
29
|
-
},
|
|
30
|
-
[t, r.type]
|
|
31
|
-
);
|
|
32
|
-
return /* @__PURE__ */ l(
|
|
33
|
-
c,
|
|
34
|
-
{
|
|
35
|
-
name: n,
|
|
36
|
-
typeDropdown: o,
|
|
37
|
-
schema: r,
|
|
38
|
-
onClear: p,
|
|
39
|
-
parentNames: m.parentNames,
|
|
40
|
-
arrayIndex: u,
|
|
41
|
-
children: /* @__PURE__ */ l(
|
|
42
|
-
"input",
|
|
43
|
-
{
|
|
44
|
-
id: y.APIPlaygroundInput,
|
|
45
|
-
className: "mint:flex-1 mint:min-w-0 mint:bg-transparent mint:outline-0 mint:text-playground-input",
|
|
46
|
-
placeholder: r.placeholder ?? `enter ${n ?? "value"}`,
|
|
47
|
-
"aria-label": r.placeholder ?? d["aria.enterValue"].replace("{name}", n ?? "value"),
|
|
48
|
-
onKeyDown: (e) => {
|
|
49
|
-
(e.key === "e" || e.key === "." && r.type === "integer") && e.preventDefault();
|
|
50
|
-
},
|
|
51
|
-
type: "number",
|
|
52
|
-
value: i ?? "",
|
|
53
|
-
onChange: f
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
C as NumberInput
|
|
61
|
-
};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
-
import { getNextPropertiesByType as g } from "../../../../utils/api-reference/getNextPropertiesByType.js";
|
|
3
|
-
import { RecursiveInput as V } from "./RecursiveInput.js";
|
|
4
|
-
const B = ({
|
|
5
|
-
properties: p,
|
|
6
|
-
additionalProperties: i,
|
|
7
|
-
value: e,
|
|
8
|
-
setValue: o,
|
|
9
|
-
name: s,
|
|
10
|
-
parentNames: f,
|
|
11
|
-
defaultExpanded: d,
|
|
12
|
-
depth: t,
|
|
13
|
-
refId: m,
|
|
14
|
-
refs: x,
|
|
15
|
-
style: A,
|
|
16
|
-
explode: S
|
|
17
|
-
}) => {
|
|
18
|
-
const u = new Set(x);
|
|
19
|
-
m && u.add(m);
|
|
20
|
-
const h = [], w = F(p, i, e);
|
|
21
|
-
return u.size > 0 ? w.map((j) => {
|
|
22
|
-
const {
|
|
23
|
-
key: n,
|
|
24
|
-
schema: l,
|
|
25
|
-
value: a,
|
|
26
|
-
isAdditionalProperty: b
|
|
27
|
-
} = j, I = (r) => {
|
|
28
|
-
const N = { ...e };
|
|
29
|
-
N[n] = r, o(N);
|
|
30
|
-
}, O = a === void 0 && !b ? void 0 : () => {
|
|
31
|
-
const r = { ...e };
|
|
32
|
-
delete r[n], o(r);
|
|
33
|
-
}, P = s ? [...f ?? [], s] : void 0, c = l[0], y = g(c), C = Object.values(y).some(
|
|
34
|
-
(r) => typeof r == "string" && u.has(r)
|
|
35
|
-
);
|
|
36
|
-
h.push(
|
|
37
|
-
/* @__PURE__ */ R(
|
|
38
|
-
V,
|
|
39
|
-
{
|
|
40
|
-
name: n,
|
|
41
|
-
schemaArray: l,
|
|
42
|
-
value: a,
|
|
43
|
-
setValue: I,
|
|
44
|
-
clearValue: O,
|
|
45
|
-
depth: t + 1,
|
|
46
|
-
parentNames: P,
|
|
47
|
-
defaultExpanded: C ? !1 : d,
|
|
48
|
-
renderedRefs: new Set(u),
|
|
49
|
-
style: A,
|
|
50
|
-
explode: S
|
|
51
|
-
},
|
|
52
|
-
n
|
|
53
|
-
)
|
|
54
|
-
);
|
|
55
|
-
}) : w.map((j) => {
|
|
56
|
-
const {
|
|
57
|
-
key: n,
|
|
58
|
-
schema: l,
|
|
59
|
-
value: a,
|
|
60
|
-
isAdditionalProperty: b
|
|
61
|
-
} = j, I = (c) => {
|
|
62
|
-
const y = { ...e };
|
|
63
|
-
y[n] = c, o(y);
|
|
64
|
-
}, O = a === void 0 && !b ? void 0 : () => {
|
|
65
|
-
const c = { ...e };
|
|
66
|
-
delete c[n], o(c);
|
|
67
|
-
}, P = s ? [...f ?? [], s] : void 0;
|
|
68
|
-
h.push(
|
|
69
|
-
/* @__PURE__ */ R(
|
|
70
|
-
V,
|
|
71
|
-
{
|
|
72
|
-
name: n,
|
|
73
|
-
schemaArray: l,
|
|
74
|
-
value: a,
|
|
75
|
-
setValue: I,
|
|
76
|
-
clearValue: O,
|
|
77
|
-
depth: t + 1,
|
|
78
|
-
parentNames: P,
|
|
79
|
-
defaultExpanded: d,
|
|
80
|
-
style: A,
|
|
81
|
-
explode: S,
|
|
82
|
-
renderedRefs: /* @__PURE__ */ new Set()
|
|
83
|
-
},
|
|
84
|
-
n
|
|
85
|
-
)
|
|
86
|
-
);
|
|
87
|
-
}), h;
|
|
88
|
-
}, F = (p, i, e) => {
|
|
89
|
-
const o = Object.entries(p).map(([t, m]) => ({
|
|
90
|
-
key: t,
|
|
91
|
-
schema: m,
|
|
92
|
-
value: e == null ? void 0 : e[t],
|
|
93
|
-
isAdditionalProperty: !1
|
|
94
|
-
}));
|
|
95
|
-
if (i === !1)
|
|
96
|
-
return o;
|
|
97
|
-
const s = typeof i == "object" ? i : [{ type: "any" }], d = Object.keys(e ?? {}).filter(
|
|
98
|
-
(t) => !Object.keys(p).includes(t)
|
|
99
|
-
).map((t) => ({
|
|
100
|
-
key: t,
|
|
101
|
-
schema: s,
|
|
102
|
-
value: e == null ? void 0 : e[t],
|
|
103
|
-
isAdditionalProperty: !0
|
|
104
|
-
}));
|
|
105
|
-
return [...o, ...d];
|
|
106
|
-
};
|
|
107
|
-
export {
|
|
108
|
-
B as calculateObjectInputChildren
|
|
109
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsxs as w, jsx as B } from "react/jsx-runtime";
|
|
2
|
-
import { useState as C, useMemo as S } from "react";
|
|
3
|
-
import { generateUniqueString as b } from "../../../../utils/uuid.js";
|
|
4
|
-
import { useGenerateNextAdditionalProperties as k } from "../../../../hooks/useGenerateNextAdditionalProperties.js";
|
|
5
|
-
import { useGenerateNextProperties as x } from "../../../../hooks/useGenerateNextProperties.js";
|
|
6
|
-
import { AdditionalPropertyButton as G } from "../../components/AdditionalPropertyButton.js";
|
|
7
|
-
import { InputContainer as q } from "../../components/InputContainer.js";
|
|
8
|
-
import { calculateObjectInputChildren as M } from "./ObjectChildren.js";
|
|
9
|
-
const Q = ({
|
|
10
|
-
name: o,
|
|
11
|
-
schema: t,
|
|
12
|
-
typeDropdown: l,
|
|
13
|
-
setValue: i,
|
|
14
|
-
clearValue: m,
|
|
15
|
-
value: r,
|
|
16
|
-
depth: n,
|
|
17
|
-
parentNames: e,
|
|
18
|
-
arrayIndex: I,
|
|
19
|
-
defaultExpanded: s,
|
|
20
|
-
style: p,
|
|
21
|
-
explode: d,
|
|
22
|
-
renderedRefs: c
|
|
23
|
-
}) => {
|
|
24
|
-
const [K, O] = C(b()), a = t.additionalProperties !== !1, A = [...Object.keys(r ?? {}), ...Object.keys(t.properties)], f = x(t), u = k(t), j = t.refIdentifier, y = S(
|
|
25
|
-
() => M({
|
|
26
|
-
properties: f,
|
|
27
|
-
additionalProperties: u,
|
|
28
|
-
value: r,
|
|
29
|
-
setValue: i,
|
|
30
|
-
name: o,
|
|
31
|
-
parentNames: e,
|
|
32
|
-
defaultExpanded: s,
|
|
33
|
-
depth: n,
|
|
34
|
-
refId: j,
|
|
35
|
-
refs: new Set(c),
|
|
36
|
-
style: p,
|
|
37
|
-
explode: d
|
|
38
|
-
}),
|
|
39
|
-
[
|
|
40
|
-
u,
|
|
41
|
-
s,
|
|
42
|
-
n,
|
|
43
|
-
o,
|
|
44
|
-
e,
|
|
45
|
-
f,
|
|
46
|
-
j,
|
|
47
|
-
c,
|
|
48
|
-
i,
|
|
49
|
-
r,
|
|
50
|
-
p,
|
|
51
|
-
d
|
|
52
|
-
]
|
|
53
|
-
);
|
|
54
|
-
return n === 0 ? y : /* @__PURE__ */ w(
|
|
55
|
-
q,
|
|
56
|
-
{
|
|
57
|
-
name: o,
|
|
58
|
-
typeDropdown: l,
|
|
59
|
-
schema: t,
|
|
60
|
-
onClear: m,
|
|
61
|
-
isObject: !0,
|
|
62
|
-
parentNames: e,
|
|
63
|
-
arrayIndex: I,
|
|
64
|
-
defaultExpanded: s,
|
|
65
|
-
style: p,
|
|
66
|
-
explode: d,
|
|
67
|
-
children: [
|
|
68
|
-
y,
|
|
69
|
-
a ? /* @__PURE__ */ B(
|
|
70
|
-
G,
|
|
71
|
-
{
|
|
72
|
-
onAddKey: (g) => {
|
|
73
|
-
const P = { ...r };
|
|
74
|
-
P[g] = void 0, i(P), O(b());
|
|
75
|
-
},
|
|
76
|
-
existingKeys: A,
|
|
77
|
-
dataTestId: o + "-additional-property-button"
|
|
78
|
-
},
|
|
79
|
-
K
|
|
80
|
-
) : null
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
Q as ObjectInput
|
|
87
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as O, useCallback as P } from "react";
|
|
3
|
-
import { useApiPlaygroundPrefillExamples as g } from "../../../../hooks/useApiPlaygroundPrefillExamples.js";
|
|
4
|
-
import { usePlaygroundSchemaOptions as T } from "../../../../hooks/usePlaygroundSchemaOptions.js";
|
|
5
|
-
import j from "../../../../components/Api/ErrorBoundary.js";
|
|
6
|
-
import { TypeDropdown as k } from "../../components/TypeDropdown.js";
|
|
7
|
-
import { DifferentiatedInput as A } from "./DifferentiatedInput.js";
|
|
8
|
-
const F = ({
|
|
9
|
-
name: p,
|
|
10
|
-
value: i,
|
|
11
|
-
schemaArray: m,
|
|
12
|
-
setValue: e,
|
|
13
|
-
clearValue: a,
|
|
14
|
-
isBody: d,
|
|
15
|
-
depth: f = 0,
|
|
16
|
-
parentNames: u,
|
|
17
|
-
arrayIndex: h,
|
|
18
|
-
defaultExpanded: S,
|
|
19
|
-
style: y,
|
|
20
|
-
explode: x,
|
|
21
|
-
renderedRefs: I = /* @__PURE__ */ new Set()
|
|
22
|
-
}) => {
|
|
23
|
-
var l;
|
|
24
|
-
const [n, b] = O(0), o = T(m), r = (l = o[n]) == null ? void 0 : l.schema, { prefillExamplesEnabled: D } = g(), E = D, v = P(
|
|
25
|
-
(s) => {
|
|
26
|
-
var c;
|
|
27
|
-
((c = o[s]) == null ? void 0 : c.schema.type) === "null" ? e(null) : e(void 0), b(s);
|
|
28
|
-
},
|
|
29
|
-
[o, e]
|
|
30
|
-
), w = /* @__PURE__ */ t(
|
|
31
|
-
k,
|
|
32
|
-
{
|
|
33
|
-
options: o,
|
|
34
|
-
selectedIndex: n,
|
|
35
|
-
onSelectOption: v
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
return r === void 0 ? null : /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(
|
|
39
|
-
A,
|
|
40
|
-
{
|
|
41
|
-
name: p,
|
|
42
|
-
schema: r,
|
|
43
|
-
typeDropdown: w,
|
|
44
|
-
value: i,
|
|
45
|
-
setValue: e,
|
|
46
|
-
clearValue: a,
|
|
47
|
-
isBody: d,
|
|
48
|
-
depth: f,
|
|
49
|
-
parentNames: u,
|
|
50
|
-
arrayIndex: h,
|
|
51
|
-
defaultExpanded: S,
|
|
52
|
-
style: y,
|
|
53
|
-
explode: x,
|
|
54
|
-
renderedRefs: I,
|
|
55
|
-
prefillDisabled: E
|
|
56
|
-
}
|
|
57
|
-
) });
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
F as RecursiveInput
|
|
61
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDownFilled as u } from "@fluentui/react-icons";
|
|
3
|
-
import { useSelectedLocale as g } from "../../../../utils/locales/index.js";
|
|
4
|
-
import { getXFilteredEnumValues as x } from "../../../../openapi/filterEnums.js";
|
|
5
|
-
import "@mintlify/validation";
|
|
6
|
-
import { cn as f } from "../../../../utils/cn.js";
|
|
7
|
-
import { InputContainer as h } from "../../components/InputContainer.js";
|
|
8
|
-
const N = ({
|
|
9
|
-
name: r,
|
|
10
|
-
schema: t,
|
|
11
|
-
typeDropdown: a,
|
|
12
|
-
value: n,
|
|
13
|
-
setValue: o,
|
|
14
|
-
clearValue: m,
|
|
15
|
-
parentNames: p,
|
|
16
|
-
arrayIndex: s
|
|
17
|
-
}) => {
|
|
18
|
-
const d = g(), c = t.type === "boolean" ? [!0, !1] : x({ schema: t, userGroups: void 0 });
|
|
19
|
-
return /* @__PURE__ */ i(
|
|
20
|
-
h,
|
|
21
|
-
{
|
|
22
|
-
name: r,
|
|
23
|
-
typeDropdown: a,
|
|
24
|
-
schema: t,
|
|
25
|
-
onClear: m,
|
|
26
|
-
parentNames: p,
|
|
27
|
-
arrayIndex: s,
|
|
28
|
-
children: /* @__PURE__ */ l("div", { className: "mint:relative", children: [
|
|
29
|
-
/* @__PURE__ */ l(
|
|
30
|
-
"select",
|
|
31
|
-
{
|
|
32
|
-
className: f(
|
|
33
|
-
"mint:relative mint:text-playground-input mint:w-full mint:text-left mint:flex-1 mint:outline-0 mint:cursor-pointer mint:bg-transparent",
|
|
34
|
-
n !== void 0 ? "mint:text-gray-900! mint:dark:text-gray-100!" : "mint:text-gray-400! mint:dark:text-white/30!"
|
|
35
|
-
),
|
|
36
|
-
value: (n == null ? void 0 : n.toString()) ?? "",
|
|
37
|
-
"aria-label": t.placeholder ?? d["aria.selectOption"].replace("{name}", r || "option"),
|
|
38
|
-
onChange: (e) => {
|
|
39
|
-
t.type === "boolean" ? o(e.target.value === "true") : o(e.target.value);
|
|
40
|
-
},
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ i("option", { value: "", disabled: !0, children: t.placeholder ?? `select ${r || "option"}` }),
|
|
43
|
-
c.map((e) => /* @__PURE__ */ i("option", { value: e.toString(), children: e.toString() }, e.toString()))
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
/* @__PURE__ */ i(u, { className: "mint:absolute mint:right-2 mint:top-1/2 mint:-translate-y-1/2 mint:h-4 mint:w-4 mint:text-gray-400 mint:dark:text-white/30 mint:pointer-events-none" })
|
|
48
|
-
] })
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
N as SelectInput
|
|
54
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback as y } from "react";
|
|
3
|
-
import { useSelectedLocale as C } from "../../../../utils/locales/index.js";
|
|
4
|
-
import { InputContainer as I } from "../../components/InputContainer.js";
|
|
5
|
-
import { Ids as k } from "../../../../api-playground-2/types/index.js";
|
|
6
|
-
const A = ({
|
|
7
|
-
name: e,
|
|
8
|
-
schema: i,
|
|
9
|
-
typeDropdown: s,
|
|
10
|
-
value: n,
|
|
11
|
-
setValue: r,
|
|
12
|
-
clearValue: c,
|
|
13
|
-
parentNames: d,
|
|
14
|
-
arrayIndex: p,
|
|
15
|
-
style: u,
|
|
16
|
-
explode: f
|
|
17
|
-
}) => {
|
|
18
|
-
const x = C(), { prefix: t, placeholder: a } = j(i.format), g = t && (n != null && n.startsWith(t)) ? n.substring(t.length) : n, h = y(
|
|
19
|
-
(l) => {
|
|
20
|
-
const m = `${t ?? ""}${l}`;
|
|
21
|
-
r(m || void 0);
|
|
22
|
-
},
|
|
23
|
-
[r, t]
|
|
24
|
-
);
|
|
25
|
-
return /* @__PURE__ */ o(
|
|
26
|
-
I,
|
|
27
|
-
{
|
|
28
|
-
name: e,
|
|
29
|
-
typeDropdown: s,
|
|
30
|
-
schema: i,
|
|
31
|
-
onClear: c,
|
|
32
|
-
parentNames: d,
|
|
33
|
-
arrayIndex: p,
|
|
34
|
-
style: u,
|
|
35
|
-
explode: f,
|
|
36
|
-
children: /* @__PURE__ */ b("div", { className: "mint:relative mint:flex mint:flex-1 mint:items-center", children: [
|
|
37
|
-
/* @__PURE__ */ o("div", { className: "mint:absolute mint:left-2.5 mint:top-0 mint:bottom-0 mint:flex mint:items-center mint:justify-center mint:text-sm mint:text-gray-800 mint:dark:text-gray-100", children: t }),
|
|
38
|
-
/* @__PURE__ */ o(
|
|
39
|
-
"input",
|
|
40
|
-
{
|
|
41
|
-
id: k.APIPlaygroundInput,
|
|
42
|
-
className: "mint:flex-1 mint:min-w-0 mint:bg-transparent mint:outline-0 mint:text-playground-input",
|
|
43
|
-
style: { paddingLeft: t ? t.length * 0.52 + "rem" : void 0 },
|
|
44
|
-
placeholder: i.placeholder ?? a ?? `enter ${e ?? "value"}`,
|
|
45
|
-
"aria-label": i.placeholder ?? a ?? x["aria.enterValue"].replace("{name}", e ?? "value"),
|
|
46
|
-
type: "text",
|
|
47
|
-
value: g ?? "",
|
|
48
|
-
onChange: (l) => h(l.target.value),
|
|
49
|
-
spellCheck: !1
|
|
50
|
-
}
|
|
51
|
-
)
|
|
52
|
-
] })
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}, j = (e) => {
|
|
56
|
-
switch (e == null ? void 0 : e.toLowerCase()) {
|
|
57
|
-
case "bearer":
|
|
58
|
-
return {
|
|
59
|
-
prefix: "Bearer ",
|
|
60
|
-
placeholder: "enter bearer token"
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return {};
|
|
64
|
-
};
|
|
65
|
-
export {
|
|
66
|
-
A as StringInput
|
|
67
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useSelectedLocale as c } from "../../../../utils/locales/index.js";
|
|
3
|
-
import { InputContainer as f } from "../../components/InputContainer.js";
|
|
4
|
-
const d = ({
|
|
5
|
-
name: e,
|
|
6
|
-
schema: t,
|
|
7
|
-
typeDropdown: a,
|
|
8
|
-
value: l,
|
|
9
|
-
setValue: n,
|
|
10
|
-
clearValue: o,
|
|
11
|
-
parentNames: i,
|
|
12
|
-
arrayIndex: m
|
|
13
|
-
}) => {
|
|
14
|
-
const p = c();
|
|
15
|
-
return /* @__PURE__ */ r(
|
|
16
|
-
f,
|
|
17
|
-
{
|
|
18
|
-
name: e,
|
|
19
|
-
typeDropdown: a,
|
|
20
|
-
schema: t,
|
|
21
|
-
onClear: o,
|
|
22
|
-
parentNames: i,
|
|
23
|
-
arrayIndex: m,
|
|
24
|
-
children: /* @__PURE__ */ r(
|
|
25
|
-
"textarea",
|
|
26
|
-
{
|
|
27
|
-
className: "mint:-mx-3.5 mint:px-3.5 mint:flex-1 mint:min-h-[2.5rem] mint:min-w-0 mint:bg-transparent mint:outline-0 mint:text-playground-input mint:resize-y",
|
|
28
|
-
rows: 2,
|
|
29
|
-
placeholder: t.placeholder ?? `Enter ${e ?? "value"}`,
|
|
30
|
-
"aria-label": t.placeholder ?? p["aria.enterValue"].replace("{name}", e ?? "value"),
|
|
31
|
-
value: l,
|
|
32
|
-
onChange: (u) => n(u.target.value),
|
|
33
|
-
spellCheck: !1,
|
|
34
|
-
autoCapitalize: "off",
|
|
35
|
-
autoComplete: "off",
|
|
36
|
-
autoCorrect: "off"
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
d as TextInput
|
|
44
|
-
};
|