@graphiql/plugin-doc-explorer 1.0.0 → 1.0.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/components/argument.js +3 -4
- package/dist/components/argument.js.map +1 -1
- package/dist/components/arguments-list.js +66 -69
- package/dist/components/arguments-list.js.map +1 -1
- package/dist/components/breadcrumb.js +2 -3
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/default-value.d.ts +8 -0
- package/dist/components/default-value.js +38 -28
- package/dist/components/default-value.js.map +1 -1
- package/dist/components/deprecation-reason.js +2 -3
- package/dist/components/deprecation-reason.js.map +1 -1
- package/dist/components/directive.js +2 -3
- package/dist/components/directive.js.map +1 -1
- package/dist/components/doc-explorer.js +5 -6
- package/dist/components/doc-explorer.js.map +1 -1
- package/dist/components/field-card.js +4 -5
- package/dist/components/field-card.js.map +1 -1
- package/dist/components/field-documentation.js +3 -4
- package/dist/components/field-documentation.js.map +1 -1
- package/dist/components/field-link.js +2 -3
- package/dist/components/field-link.js.map +1 -1
- package/dist/components/fields-list.js +6 -7
- package/dist/components/fields-list.js.map +1 -1
- package/dist/components/schema-documentation.js +4 -5
- package/dist/components/schema-documentation.js.map +1 -1
- package/dist/components/search-row.js +71 -85
- package/dist/components/search-row.js.map +1 -1
- package/dist/components/search.js +107 -123
- package/dist/components/search.js.map +1 -1
- package/dist/components/section.js +2 -3
- package/dist/components/section.js.map +1 -1
- package/dist/components/type-card.js +3 -4
- package/dist/components/type-card.js.map +1 -1
- package/dist/components/type-documentation.js +7 -8
- package/dist/components/type-documentation.js.map +1 -1
- package/dist/components/type-link.js +3 -4
- package/dist/components/type-link.js.map +1 -1
- package/dist/components/utils.js +1 -2
- package/dist/components/utils.js.map +1 -1
- package/dist/context.d.ts +3 -1
- package/dist/context.js +23 -20
- package/dist/context.js.map +1 -1
- package/dist/schema-reference.js +1 -2
- package/dist/schema-reference.js.map +1 -1
- package/dist/style.css +42 -119
- package/package.json +18 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc-explorer.js","names":["
|
|
1
|
+
{"version":3,"file":"doc-explorer.js","names":["isEnumType","isInputObjectType","isInterfaceType","isObjectType","isType","isUnionType","useGraphiQL","pick","useDocExplorer","useDocExplorerActions","DocExplorer","$","_c","t0","Symbol","for","fetchError","isIntrospecting","schema","validationErrors","explorerNavStack","pop","content","navItem","navigateToIndex","at","t1","length","index","stepsBack","i","t2","message","def","isTypeOrFieldView","t3","name","t4","t5","TypeView","type","hasNewFieldsList","needsTypeDocs","t6","_jsx","_jsxs","_Fragment"],"sources":["../../src/components/doc-explorer.tsx"],"sourcesContent":["import {\n GraphQLNamedType,\n isEnumType,\n isInputObjectType,\n isInterfaceType,\n isObjectType,\n isType,\n isUnionType,\n} from 'graphql';\nimport type { FC, ReactNode } from 'react';\nimport { PanelHeader, Spinner, useGraphiQL, pick } from '@graphiql/react';\nimport { useDocExplorer, useDocExplorerActions } from '../context';\nimport { Breadcrumb } from './breadcrumb';\nimport { FieldDocumentation } from './field-documentation';\nimport { FieldsList } from './fields-list';\nimport { SchemaDocumentation } from './schema-documentation';\nimport { SearchRow } from './search-row';\nimport { TypeCard } from './type-card';\nimport { TypeDocumentation } from './type-documentation';\nimport './doc-explorer.css';\n\nexport const DocExplorer: FC = () => {\n const { fetchError, isIntrospecting, schema, validationErrors } = useGraphiQL(\n pick('fetchError', 'isIntrospecting', 'schema', 'validationErrors'),\n );\n const explorerNavStack = useDocExplorer();\n const { pop } = useDocExplorerActions();\n const navItem = explorerNavStack.at(-1)!;\n\n const navigateToIndex = (index: number) => {\n const stepsBack = explorerNavStack.length - 1 - index;\n for (let i = 0; i < stepsBack; i++) {\n pop();\n }\n };\n\n let content: ReactNode = null;\n if (fetchError) {\n content = (\n <div className=\"graphiql-doc-explorer-error\">Error fetching schema</div>\n );\n } else if (validationErrors[0]) {\n content = (\n <div className=\"graphiql-doc-explorer-error\">\n Schema is invalid: {validationErrors[0].message}\n </div>\n );\n } else if (isIntrospecting) {\n content = <Spinner />;\n } else if (!schema) {\n content = (\n <div className=\"graphiql-doc-explorer-error\">\n No GraphQL schema available\n </div>\n );\n } else if (explorerNavStack.length === 1) {\n content = <SchemaDocumentation schema={schema} />;\n } else if (isType(navItem.def)) {\n content = <TypeView type={navItem.def} />;\n } else if (navItem.def) {\n content = <FieldDocumentation field={navItem.def} />;\n }\n\n const isTypeOrFieldView = explorerNavStack.length > 1;\n\n return (\n <section\n className=\"graphiql-doc-explorer graphiql-side-panel-content\"\n aria-label=\"Documentation Explorer\"\n >\n <PanelHeader title=\"Schema Explorer\" />\n {isTypeOrFieldView && (\n <Breadcrumb\n navStack={explorerNavStack}\n onNavigateTo={navigateToIndex}\n />\n )}\n <SearchRow key={navItem.name} />\n <div className=\"graphiql-doc-explorer-content\">{content}</div>\n </section>\n );\n};\n\nconst TypeView: FC<{ type: GraphQLNamedType }> = ({ type }) => {\n const hasNewFieldsList =\n isObjectType(type) || isInterfaceType(type) || isInputObjectType(type);\n // Enum/union/scalar still need the TypeDocumentation for enum values and\n // possible-type sections; interface needs it for Implementations.\n const needsTypeDocs =\n isEnumType(type) || isUnionType(type) || isInterfaceType(type);\n\n return (\n <>\n <TypeCard type={type} />\n {hasNewFieldsList && <FieldsList type={type} />}\n {needsTypeDocs && (\n <div className=\"graphiql-doc-explorer-type-extra\">\n <TypeDocumentation type={type} hideHeader />\n </div>\n )}\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAqBA,IAAaU,oBAAkB;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAE3BF,KAAAN,KAAK,cAAc,mBAAmB,UAAU,kBAAkB;EAACI,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CADrE,MAAA,EAAAK,YAAAC,iBAAAC,QAAAC,qBAAkEb,YAChEO,EACF;CACA,MAAAO,mBAAyBZ,eAAe;CACxC,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;CAAA,IAAAgC;CAAA,IAAAhC,EAAA,QAAAwB,MAAAxB,EAAA,QAAA0B,MAAA1B,EAAA,QAAA2B,IAAA;EAPHK,KAAAE,qBAAAC,UAAA,EAAA,UAAA;GACEX;GACCE;GACAC;EAIA,EAAA,CAAA;EACA3B,EAAA,MAAAwB;EAAAxB,EAAA,MAAA0B;EAAA1B,EAAA,MAAA2B;EAAA3B,EAAA,MAAAgC;CAAA,OAAAA,KAAAhC,EAAA;CAAA,OARHgC;AAQG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TypeLink } from "./type-link.js";
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
3
2
|
import { DeprecationReason } from "./deprecation-reason.js";
|
|
3
|
+
import { TypeLink } from "./type-link.js";
|
|
4
|
+
import { renderType } from "./utils.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
import { c } from "react-compiler-runtime";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/field-card.tsx
|
|
8
8
|
var FieldCard = (t0) => {
|
|
9
9
|
const $ = c(19);
|
|
10
10
|
const { field } = t0;
|
|
@@ -102,7 +102,6 @@ var FieldCard = (t0) => {
|
|
|
102
102
|
function _temp(namedType) {
|
|
103
103
|
return /* @__PURE__ */ jsx(TypeLink, { type: namedType });
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { FieldCard };
|
|
107
106
|
|
|
108
107
|
//# sourceMappingURL=field-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-card.js","names":["
|
|
1
|
+
{"version":3,"file":"field-card.js","names":["renderType","field","FieldCard","t0","$","_c","t1","Symbol","for","t2","name","t3","t4","type","_temp","t5","t6","t7","description","t8","deprecationReason","t9","namedType","_jsx","_jsxs"],"sources":["../../src/components/field-card.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { DocExplorerFieldDef } from '../context';\nimport { DeprecationReason } from './deprecation-reason';\nimport { TypeLink } from './type-link';\nimport { renderType } from './utils';\nimport './field-card.css';\n\ntype FieldCardProps = {\n field: DocExplorerFieldDef;\n};\n\nexport const FieldCard: FC<FieldCardProps> = ({ field }) => {\n return (\n <div className=\"graphiql-doc-explorer-field-card\">\n <div className=\"graphiql-doc-explorer-field-card-header\">\n <span className=\"graphiql-doc-explorer-type-badge\">FIELD</span>\n <span className=\"graphiql-doc-explorer-field-card-name\">\n {field.name}\n </span>\n <span\n className=\"graphiql-doc-explorer-field-card-colon\"\n aria-hidden=\"true\"\n >\n :\n </span>\n <span className=\"graphiql-doc-explorer-field-card-type\">\n {renderType(field.type, namedType => (\n <TypeLink type={namedType} />\n ))}\n </span>\n </div>\n {field.description && (\n <p className=\"graphiql-doc-explorer-field-card-description\">\n {field.description}\n </p>\n )}\n {'deprecationReason' in field && field.deprecationReason ? (\n <DeprecationReason preview={false}>\n {field.deprecationReason}\n </DeprecationReason>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;AAWA,IAAaE,aAAgCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAJ,UAAAE;CAAS,IAAAG;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAI/CF,KAAAiB,oBAAA,QAAA;GAAgB,WAAA;GAAmC,UAAA;EAAW,CAAA;EAACnB,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAH,MAAAS,MAAA;EAC/DD,KAAAc,oBAAA,QAAA;GAAgB,WAAA;GACbtB,UAAAA,MAAKS;EACF,CAAA;EAACN,EAAA,KAAAH,MAAAS;EAAAN,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EACPG,KAAAY,oBAAA,QAAA;GACY,WAAA;GACE,eAAA;GACb,U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,WAAA;GAAf,UAAA;IACER;IAiBCC;IAKAE;GAKE;;EAACf,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;EAAAb,EAAA,MAAAe;EAAAf,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OA5BNiB;AA4BM;AA9BmC,SAAAP,MAAAQ,WAAA;CAAA,OAgBjCC,oBAAC,UAAD,EAAgBD,MAAAA,UAAW,CAAA;AAAE"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
1
3
|
import { ArgumentsList, ShowDeprecatedArgumentsButton } from "./arguments-list.js";
|
|
2
4
|
import { Directive } from "./directive.js";
|
|
3
5
|
import { FieldCard } from "./field-card.js";
|
|
4
|
-
import { c } from "react-compiler-runtime";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region src/components/field-documentation.tsx
|
|
7
|
+
// src/components/field-documentation.tsx
|
|
8
8
|
var FieldDocumentation = (t0) => {
|
|
9
9
|
const $ = c(2);
|
|
10
10
|
const { field } = t0;
|
|
@@ -120,7 +120,6 @@ function _temp(directive) {
|
|
|
120
120
|
children: /* @__PURE__ */ jsx(Directive, { directive })
|
|
121
121
|
}, directive.name.value);
|
|
122
122
|
}
|
|
123
|
-
//#endregion
|
|
124
123
|
export { FieldDocumentation };
|
|
125
124
|
|
|
126
125
|
//# sourceMappingURL=field-documentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-documentation.js","names":["
|
|
1
|
+
{"version":3,"file":"field-documentation.js","names":["useState","field","FieldDocumentation","t0","$","_c","t1","Arguments","showDeprecated","setShowDeprecated","args","deprecatedArgs","argument","deprecationReason","push","t2","length","t3","Directives","directives","astNode","map","_temp","t4","directive","name","value","_jsxs","_Fragment","_jsx"],"sources":["../../src/components/field-documentation.tsx"],"sourcesContent":["import type { ConstDirectiveNode, GraphQLArgument } from 'graphql';\nimport { FC, useState } from 'react';\nimport type { DocExplorerFieldDef } from '../context';\nimport { ArgumentsList, ShowDeprecatedArgumentsButton } from './arguments-list';\nimport { Directive } from './directive';\nimport { FieldCard } from './field-card';\n\ntype FieldDocumentationProps = {\n /**\n * The field or argument that should be rendered.\n */\n field: DocExplorerFieldDef;\n};\n\nexport const FieldDocumentation: FC<FieldDocumentationProps> = ({ field }) => {\n return (\n <>\n <FieldCard field={field} />\n <Arguments field={field} />\n <Directives field={field} />\n </>\n );\n};\n\nconst Arguments: FC<{ field: DocExplorerFieldDef }> = ({ field }) => {\n const [showDeprecated, setShowDeprecated] = useState(false);\n\n if (!('args' in field)) {\n return null;\n }\n\n const args: GraphQLArgument[] = [];\n const deprecatedArgs: GraphQLArgument[] = [];\n for (const argument of field.args) {\n if (argument.deprecationReason) {\n deprecatedArgs.push(argument);\n } else {\n args.push(argument);\n }\n }\n\n return (\n <>\n <ArgumentsList title=\"ARGUMENTS\" args={args} />\n {deprecatedArgs.length > 0 &&\n (showDeprecated || args.length === 0 ? (\n <ArgumentsList title=\"DEPRECATED ARGUMENTS\" args={deprecatedArgs} />\n ) : (\n <ShowDeprecatedArgumentsButton\n onClick={() => setShowDeprecated(true)}\n />\n ))}\n </>\n );\n};\n\nconst Directives: FC<{ field: DocExplorerFieldDef }> = ({ field }) => {\n const directives = field.astNode?.directives as\n | readonly ConstDirectiveNode[]\n | undefined;\n if (!directives?.length) {\n return null;\n }\n return (\n <div className=\"graphiql-doc-explorer-directives-list\">\n <div className=\"graphiql-doc-explorer-directives-list-header\">\n DIRECTIVES{' '}\n <span className=\"graphiql-doc-explorer-directives-list-count\">\n · {directives.length}\n </span>\n </div>\n <div className=\"graphiql-doc-explorer-directives-list-body\">\n {directives.map(directive => (\n <div\n key={directive.name.value}\n className=\"graphiql-doc-explorer-directive-row\"\n >\n <Directive directive={directive} />\n </div>\n ))}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAcA,IAAaE,sBA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A,OAAAE,MAAAF,EAAA,OAAAa,IAAA;EAhBRM,KAAAI,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA,CACErB,IAMAW,EAUG;;EAACb,EAAA,KAAAE;EAAAF,EAAA,KAAAa;EAAAb,EAAA,KAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,OAjBNmB;AAiBM;AAzB6C,SAAAD,MAAAE,WAAA;CAAA,OAiB7CK,oBAAA,OAAA;EAEY,WAAA;EAEV,UAAAA,oBAAC,WAAD,EAAsBL,UAAW,CAAA;CAC9B,GAJEA,UAASC,KAAKC,KAIhB;AAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
1
2
|
import { useDocExplorerActions } from "../context.js";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import { c } from "react-compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/field-link.tsx
|
|
6
6
|
var FieldLink = (t0) => {
|
|
7
7
|
const $ = c(6);
|
|
8
8
|
const { field } = t0;
|
|
@@ -34,7 +34,6 @@ var FieldLink = (t0) => {
|
|
|
34
34
|
} else t2 = $[5];
|
|
35
35
|
return t2;
|
|
36
36
|
};
|
|
37
|
-
//#endregion
|
|
38
37
|
export { FieldLink };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=field-link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-link.js","names":["
|
|
1
|
+
{"version":3,"file":"field-link.js","names":["useDocExplorerActions","field","FieldLink","t0","$","_c","push","t1","event","preventDefault","name","def","t2","_jsx"],"sources":["../../src/components/field-link.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { DocExplorerFieldDef, useDocExplorerActions } from '../context';\nimport './field-link.css';\n\ntype FieldLinkProps = {\n /**\n * The field or argument that should be linked to.\n */\n field: DocExplorerFieldDef;\n};\n\nexport const FieldLink: FC<FieldLinkProps> = ({ field }) => {\n const { push } = useDocExplorerActions();\n\n return (\n <a\n className=\"graphiql-doc-explorer-field-name\"\n onClick={event => {\n event.preventDefault();\n push({ name: field.name, def: field });\n }}\n href=\"#\"\n >\n {field.name}\n </a>\n );\n};\n"],"mappings":";;;;;AAWA,IAAaE,aAAgCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAJ,UAAAE;CAC5C,MAAA,EAAAG,SAAiBN,sBAAsB;CAAE,IAAAO;CAAA,IAAAH,EAAA,OAAAH,SAAAG,EAAA,OAAAE,MAAA;EAK5BC,MAAAC,UAAA;GACPA,MAAKC,eAAgB;GACrBH,KAAK;IAAAI,MAAQT,MAAKS;IAAKC,KAAOV;GAAM,CAAC;EAAC;EACvCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAH,MAAAS,QAAAN,EAAA,OAAAG,IAAA;EALHK,KAAAC,oBAAA,KAAA;GACY,WAAA;GACD,SAAAN;GAIJ,MAAA;GAEJN,UAAAA,MAAKS;EACL,CAAA;EAACN,EAAA,KAAAH,MAAAS;EAAAN,EAAA,KAAAG;EAAAH,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OATJQ;AASI"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { isInputObjectType, isInterfaceType, isObjectType } from "graphql";
|
|
4
|
+
import { Button, ChevronDownIcon, ChevronUpIcon } from "@graphiql/react";
|
|
1
5
|
import { useDocExplorerActions } from "../context.js";
|
|
2
|
-
import { renderType } from "./utils.js";
|
|
3
6
|
import { TypeLink } from "./type-link.js";
|
|
7
|
+
import { renderType } from "./utils.js";
|
|
4
8
|
/* empty css */
|
|
5
|
-
import { c } from "react-compiler-runtime";
|
|
6
|
-
import { Button, ChevronDownIcon, ChevronUpIcon } from "@graphiql/react";
|
|
7
|
-
import { isInputObjectType, isInterfaceType, isObjectType } from "graphql";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
//#region src/components/fields-list.tsx
|
|
10
|
+
// src/components/fields-list.tsx
|
|
11
11
|
var FieldsList = (t0) => {
|
|
12
12
|
const $ = c(23);
|
|
13
13
|
const { type, activeFieldName } = t0;
|
|
@@ -219,7 +219,6 @@ function _temp(e) {
|
|
|
219
219
|
function _temp2(namedType) {
|
|
220
220
|
return /* @__PURE__ */ jsx(TypeLink, { type: namedType });
|
|
221
221
|
}
|
|
222
|
-
//#endregion
|
|
223
222
|
export { FieldsList };
|
|
224
223
|
|
|
225
224
|
//# sourceMappingURL=fields-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields-list.js","names":["
|
|
1
|
+
{"version":3,"file":"fields-list.js","names":["useState","isObjectType","isInterfaceType","isInputObjectType","useDocExplorerActions","renderType","type","activeFieldName","FieldsList","t0","$","_c","expanded","setExpanded","showDeprecated","setShowDeprecated","t1","getFields","fieldMap","deprecatedFields","fields","field","Object","values","deprecationReason","push","totalCount","length","t2","Symbol","for","_temp","t3","t4","t5","t6","map","field_0","name","field_1","t7","isActive","deprecated","FieldRow","filter","Boolean","join","def","undefined","t8","t9","_temp2","t10","t11","t12","description","t13","e","namedType","_jsx","_jsxs"],"sources":["../../src/components/fields-list.tsx"],"sourcesContent":["import { FC, useState } from 'react';\nimport {\n GraphQLNamedType,\n isObjectType,\n isInterfaceType,\n isInputObjectType,\n} from 'graphql';\nimport { Button, ChevronDownIcon, ChevronUpIcon } from '@graphiql/react';\nimport type { DocExplorerFieldDef } from '../context';\nimport { useDocExplorerActions } from '../context';\nimport { TypeLink } from './type-link';\nimport { renderType } from './utils';\nimport './fields-list.css';\n\ntype FieldsListProps = {\n type: GraphQLNamedType;\n activeFieldName?: string;\n};\n\nexport const FieldsList: FC<FieldsListProps> = ({ type, activeFieldName }) => {\n const [expanded, setExpanded] = useState(true);\n const [showDeprecated, setShowDeprecated] = useState(false);\n\n if (\n !isObjectType(type) &&\n !isInterfaceType(type) &&\n !isInputObjectType(type)\n ) {\n return null;\n }\n\n const fieldMap = type.getFields();\n const fields: DocExplorerFieldDef[] = [];\n const deprecatedFields: DocExplorerFieldDef[] = [];\n\n for (const field of Object.values(fieldMap)) {\n if (field.deprecationReason) {\n deprecatedFields.push(field);\n } else {\n fields.push(field);\n }\n }\n\n const totalCount =\n fields.length + (showDeprecated ? deprecatedFields.length : 0);\n\n return (\n <div className=\"graphiql-doc-explorer-fields-list\">\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-fields-list-header\"\n onClick={() => setExpanded(e => !e)}\n aria-expanded={expanded}\n >\n {expanded ? (\n <ChevronDownIcon aria-hidden=\"true\" />\n ) : (\n <ChevronUpIcon aria-hidden=\"true\" />\n )}\n <span>\n FIELDS{' '}\n <span className=\"graphiql-doc-explorer-fields-list-count\">\n · {totalCount}\n </span>\n </span>\n </button>\n {expanded && (\n <div className=\"graphiql-doc-explorer-fields-list-body\">\n {fields.map(field => (\n <FieldRow\n key={field.name}\n field={field}\n isActive={field.name === activeFieldName}\n />\n ))}\n {deprecatedFields.length > 0 &&\n (showDeprecated || fields.length === 0 ? (\n deprecatedFields.map(field => (\n <FieldRow\n key={field.name}\n field={field}\n isActive={field.name === activeFieldName}\n deprecated\n />\n ))\n ) : (\n <Button\n type=\"button\"\n onClick={() => setShowDeprecated(true)}\n className=\"graphiql-doc-explorer-fields-list-show-deprecated\"\n >\n Show Deprecated Fields\n </Button>\n ))}\n </div>\n )}\n </div>\n );\n};\n\ntype FieldRowProps = {\n field: DocExplorerFieldDef;\n isActive: boolean;\n deprecated?: boolean;\n};\n\nconst FieldRow: FC<FieldRowProps> = ({ field, isActive, deprecated }) => {\n const { push } = useDocExplorerActions();\n\n return (\n <button\n type=\"button\"\n className={[\n 'graphiql-doc-explorer-field-row',\n isActive ? 'graphiql-doc-explorer-field-row--active' : '',\n deprecated ? 'graphiql-doc-explorer-field-row--deprecated' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => push({ name: field.name, def: field })}\n aria-current={isActive ? 'true' : undefined}\n >\n <div className=\"graphiql-doc-explorer-field-row-sig\">\n <span className=\"graphiql-doc-explorer-field-row-name\">\n {field.name}\n </span>\n <span className=\"graphiql-doc-explorer-field-row-colon\">:</span>\n <span className=\"graphiql-doc-explorer-field-row-type\">\n {renderType(field.type, namedType => (\n <TypeLink type={namedType} />\n ))}\n </span>\n </div>\n {field.description && (\n <div className=\"graphiql-doc-explorer-field-row-desc\">\n {field.description}\n </div>\n )}\n </button>\n );\n};\n"],"mappings":";;;;;;;;;;AAmBA,IAAaQ,cAAkCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAL,MAAAC,oBAAAE;CAC9C,MAAA,CAAAG,UAAAC,eAAgCb,SAAS,IAAI;CAC7C,MAAA,CAAAc,gBAAAC,qBAA4Cf,SAAS,KAAK;CAE1D,IACE,CAACC,aAAaK,IAAI,KAAlB,CACCJ,gBAAgBI,IAAI,KADrB,CAECH,kBAAkBG,IAAI,GAAC,OAEjB;CACR,IAAAU;CAAA,IAAAN,EAAA,OAAAJ,MAAA;EAEgBU,KAAAV,KAAIW,UAAW;EAACP,EAAA,KAAAJ;EAAAI,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAjC,MAAAQ,WAAiBF;CAAiB,IAAAG;CAAA,IAAAC;CAAA,IAAAV,EAAA,OAAAQ,UAAA;EAClCE,SAAsC,CAAA;EACtCD,mBAAgD,CAAA;EAEhD,KAAK,MAAAE,SAAeC,OAAMC,OAAQL,QAAQ,GACxC,IAAIG,MAAKG,mBACPL,iBAAgBM,KAAMJ,KAAK;OAE3BD,OAAMK,KAAMJ,KAAK;EAEpBX,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;EAAAT,EAAA,KAAAU;CAAA,OA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a,MAAAO,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA;IACEpB;IAGAS;IACAG;GAKG;;EAAC1C,EAAA,MAAA0C;EAAA1C,EAAA,MAAA8B;EAAA9B,EAAA,MAAA2C;CAAA,OAAAA,MAAA3C,EAAA;CAAA,IAAA4C;CAAA,IAAA5C,EAAA,QAAAW,MAAAkC,aAAA;EACLD,MAAAjC,MAAKkC,eACJI,oBAAA,OAAA;GAAe,WAAA;GACZtC,UAAAA,MAAKkC;EACH,CAAA;EACN7C,EAAA,MAAAW,MAAAkC;EAAA7C,EAAA,MAAA4C;CAAA,OAAAA,MAAA5C,EAAA;CAAA,IAAA8C;CAAA,IAAA9C,EAAA,QAAA2C,OAAA3C,EAAA,QAAA4C,OAAA5C,EAAA,QAAAuB,MAAAvB,EAAA,QAAAwB,MAAAxB,EAAA,QAAAyB,IAAA;EA3BHqB,MAAAI,qBAAA,UAAA;GACO,MAAA;GACM,WAAA3B;GAOF,SAAAC;GACK,gBAAAC;GAVhB,UAAA,CAYEkB,KAWCC,GAKK;;EAAC5C,EAAA,MAAA2C;EAAA3C,EAAA,MAAA4C;EAAA5C,EAAA,MAAAuB;EAAAvB,EAAA,MAAAwB;EAAAxB,EAAA,MAAAyB;EAAAzB,EAAA,MAAA8C;CAAA,OAAAA,MAAA9C,EAAA;CAAA,OA5BT8C;AA4BS;AAvHkC,SAAAzB,MAAA0B,GAAA;CAAA,OAgCP,CAACA;AAAC;AAuDN,SAAAN,OAAAO,WAAA;CAAA,OAuBxBC,oBAAC,UAAD,EAAgBD,MAAAA,UAAW,CAAA;AAAE"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useDocExplorerActions } from "../context.js";
|
|
2
|
-
/* empty css */
|
|
3
1
|
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { MethodPill } from "@graphiql/react";
|
|
5
2
|
import { isEnumType, isInputObjectType, isInterfaceType, isObjectType, isScalarType, isUnionType } from "graphql";
|
|
3
|
+
import { MethodPill } from "@graphiql/react";
|
|
4
|
+
import { useDocExplorerActions } from "../context.js";
|
|
5
|
+
/* empty css */
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/schema-documentation.tsx
|
|
8
8
|
function getTypeKindLabel(type) {
|
|
9
9
|
if (isObjectType(type)) return "TYPE";
|
|
10
10
|
if (isInterfaceType(type)) return "INTERFACE";
|
|
@@ -262,7 +262,6 @@ var SchemaDocumentation = (t0) => {
|
|
|
262
262
|
} else t15 = $[46];
|
|
263
263
|
return t15;
|
|
264
264
|
};
|
|
265
|
-
//#endregion
|
|
266
265
|
export { SchemaDocumentation };
|
|
267
266
|
|
|
268
267
|
//# sourceMappingURL=schema-documentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-documentation.js","names":["FC","GraphQLNamedType","GraphQLSchema","isObjectType","isInterfaceType","isInputObjectType","isEnumType","isScalarType","isUnionType","MethodPill","useDocExplorerActions","SchemaDocumentationProps","schema","getTypeKindLabel","type","SchemaDocumentation","t0","$","_c","push","t1","getQueryType","queryType","t2","getMutationType","mutationType","t3","getSubscriptionType","subscriptionType","t4","name","t5","t6","t7","Set","filter","Boolean","rootTypeNames","t10","t11","t12","t13","t8","t9","allTypes","Object","values","getTypeMap","startsWith","has","Symbol","for","t14","def","t15","t16","length","map","type_0"],"sources":["../../src/components/schema-documentation.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { GraphQLNamedType, GraphQLSchema } from 'graphql';\nimport {\n isObjectType,\n isInterfaceType,\n isInputObjectType,\n isEnumType,\n isScalarType,\n isUnionType,\n} from 'graphql';\nimport { MethodPill } from '@graphiql/react';\nimport { useDocExplorerActions } from '../context';\nimport './schema-documentation.css';\n\ntype SchemaDocumentationProps = {\n /**\n * The schema that should be rendered.\n */\n schema: GraphQLSchema;\n};\n\nfunction getTypeKindLabel(type: GraphQLNamedType): string {\n if (isObjectType(type)) {\n return 'TYPE';\n }\n if (isInterfaceType(type)) {\n return 'INTERFACE';\n }\n if (isInputObjectType(type)) {\n return 'INPUT';\n }\n if (isEnumType(type)) {\n return 'ENUM';\n }\n if (isScalarType(type)) {\n return 'SCALAR';\n }\n if (isUnionType(type)) {\n return 'UNION';\n }\n return 'TYPE';\n}\n\nexport const SchemaDocumentation: FC<SchemaDocumentationProps> = ({\n schema,\n}) => {\n const { push } = useDocExplorerActions();\n const queryType = schema.getQueryType();\n const mutationType = schema.getMutationType();\n const subscriptionType = schema.getSubscriptionType();\n const rootTypeNames = new Set(\n [queryType?.name, mutationType?.name, subscriptionType?.name].filter(\n Boolean,\n ),\n );\n\n const allTypes = Object.values(schema.getTypeMap()).filter(\n type => !type.name.startsWith('__') && !rootTypeNames.has(type.name),\n );\n\n return (\n <div className=\"graphiql-doc-explorer-schema-overview\">\n {/* Root types section */}\n <div className=\"graphiql-doc-explorer-schema-section-header\">\n ROOT TYPES\n </div>\n <div className=\"graphiql-doc-explorer-schema-root-types\">\n {queryType && (\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-root-row\"\n onClick={() => push({ name: queryType.name, def: queryType })}\n >\n <MethodPill operation=\"query\" aria-hidden />\n <span className=\"graphiql-doc-explorer-schema-root-label\">\n Query\n </span>\n <span className=\"graphiql-doc-explorer-schema-root-colon\">:</span>\n <span className=\"graphiql-doc-explorer-type-name\">\n {queryType.name}\n </span>\n </button>\n )}\n {mutationType && (\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-root-row\"\n onClick={() => push({ name: mutationType.name, def: mutationType })}\n >\n <MethodPill operation=\"mutation\" aria-hidden />\n <span className=\"graphiql-doc-explorer-schema-root-label\">\n Mutation\n </span>\n <span className=\"graphiql-doc-explorer-schema-root-colon\">:</span>\n <span className=\"graphiql-doc-explorer-type-name\">\n {mutationType.name}\n </span>\n </button>\n )}\n {subscriptionType && (\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-root-row\"\n onClick={() =>\n push({ name: subscriptionType.name, def: subscriptionType })\n }\n >\n <MethodPill operation=\"subscription\" aria-hidden />\n <span className=\"graphiql-doc-explorer-schema-root-label\">\n Subscription\n </span>\n <span className=\"graphiql-doc-explorer-schema-root-colon\">:</span>\n <span className=\"graphiql-doc-explorer-type-name\">\n {subscriptionType.name}\n </span>\n </button>\n )}\n </div>\n\n {/* All schema types section */}\n <div className=\"graphiql-doc-explorer-schema-section-header graphiql-doc-explorer-schema-section-header--types\">\n ALL SCHEMA TYPES\n <span className=\"graphiql-doc-explorer-schema-type-count\">\n {' '}\n · {allTypes.length}\n </span>\n </div>\n <div className=\"graphiql-doc-explorer-schema-all-types\">\n {allTypes.map(type => (\n <button\n key={type.name}\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-type-row\"\n onClick={() => push({ name: type.name, def: type })}\n >\n <span className=\"graphiql-doc-explorer-type-badge\">\n {getTypeKindLabel(type)}\n </span>\n <span className=\"graphiql-doc-explorer-schema-type-name\">\n {type.name}\n </span>\n </button>\n ))}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAqBA,SAASa,iBAAiBC,MAAgC;CACxD,IAAIX,aAAaW,IAAI,GACnB,OAAO;CAET,IAAIV,gBAAgBU,IAAI,GACtB,OAAO;CAET,IAAIT,kBAAkBS,IAAI,GACxB,OAAO;CAET,IAAIR,WAAWQ,IAAI,GACjB,OAAO;CAET,IAAIP,aAAaO,IAAI,GACnB,OAAO;CAET,IAAIN,YAAYM,IAAI,GAClB,OAAO;CAET,OAAO;AACT;AAEA,IAAaC,uBAAoDC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAN,WAAAI;CAGhE,MAAA,EAAAG,SAAiBT,sBAAsB;CAAE,IAAAU;CAAA,IAAAH,EAAA,OAAAL,QAAA;EACvBQ,KAAAR,OAAMS,aAAc;EAACJ,EAAA,KAAAL;EAAAK,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAvC,MAAAK,YAAkBF;CAAsB,IAAAG;C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Type","isInterfaceType","isInputObjectType","isEnumType","isScalarType","isUnionType","useDocExplorerActions","schema","getTypeKindLabel","type","SchemaDocumentation","t0","$","_c","push","t1","getQueryType","queryType","t2","getMutationType","mutationType","t3","getSubscriptionType","subscriptionType","t4","name","t5","t6","t7","Set","filter","Boolean","rootTypeNames","t10","t11","t12","t13","t8","t9","allTypes","Object","values","getTypeMap","startsWith","has","Symbol","for","t14","def","t15","t16","length","map","type_0","_jsx","_jsxs"],"sources":["../../src/components/schema-documentation.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { GraphQLNamedType, GraphQLSchema } from 'graphql';\nimport {\n isObjectType,\n isInterfaceType,\n isInputObjectType,\n isEnumType,\n isScalarType,\n isUnionType,\n} from 'graphql';\nimport { MethodPill } from '@graphiql/react';\nimport { useDocExplorerActions } from '../context';\nimport './schema-documentation.css';\n\ntype SchemaDocumentationProps = {\n /**\n * The schema that should be rendered.\n */\n schema: GraphQLSchema;\n};\n\nfunction getTypeKindLabel(type: GraphQLNamedType): string {\n if (isObjectType(type)) {\n return 'TYPE';\n }\n if (isInterfaceType(type)) {\n return 'INTERFACE';\n }\n if (isInputObjectType(type)) {\n return 'INPUT';\n }\n if (isEnumType(type)) {\n return 'ENUM';\n }\n if (isScalarType(type)) {\n return 'SCALAR';\n }\n if (isUnionType(type)) {\n return 'UNION';\n }\n return 'TYPE';\n}\n\nexport const SchemaDocumentation: FC<SchemaDocumentationProps> = ({\n schema,\n}) => {\n const { push } = useDocExplorerActions();\n const queryType = schema.getQueryType();\n const mutationType = schema.getMutationType();\n const subscriptionType = schema.getSubscriptionType();\n const rootTypeNames = new Set(\n [queryType?.name, mutationType?.name, subscriptionType?.name].filter(\n Boolean,\n ),\n );\n\n const allTypes = Object.values(schema.getTypeMap()).filter(\n type => !type.name.startsWith('__') && !rootTypeNames.has(type.name),\n );\n\n return (\n <div className=\"graphiql-doc-explorer-schema-overview\">\n {/* Root types section */}\n <div className=\"graphiql-doc-explorer-schema-section-header\">\n ROOT TYPES\n </div>\n <div className=\"graphiql-doc-explorer-schema-root-types\">\n {queryType && (\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-root-row\"\n onClick={() => push({ name: queryType.name, def: queryType })}\n >\n <MethodPill operation=\"query\" aria-hidden />\n <span className=\"graphiql-doc-explorer-schema-root-label\">\n Query\n </span>\n <span className=\"graphiql-doc-explorer-schema-root-colon\">:</span>\n <span className=\"graphiql-doc-explorer-type-name\">\n {queryType.name}\n </span>\n </button>\n )}\n {mutationType && (\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-root-row\"\n onClick={() => push({ name: mutationType.name, def: mutationType })}\n >\n <MethodPill operation=\"mutation\" aria-hidden />\n <span className=\"graphiql-doc-explorer-schema-root-label\">\n Mutation\n </span>\n <span className=\"graphiql-doc-explorer-schema-root-colon\">:</span>\n <span className=\"graphiql-doc-explorer-type-name\">\n {mutationType.name}\n </span>\n </button>\n )}\n {subscriptionType && (\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-root-row\"\n onClick={() =>\n push({ name: subscriptionType.name, def: subscriptionType })\n }\n >\n <MethodPill operation=\"subscription\" aria-hidden />\n <span className=\"graphiql-doc-explorer-schema-root-label\">\n Subscription\n </span>\n <span className=\"graphiql-doc-explorer-schema-root-colon\">:</span>\n <span className=\"graphiql-doc-explorer-type-name\">\n {subscriptionType.name}\n </span>\n </button>\n )}\n </div>\n\n {/* All schema types section */}\n <div className=\"graphiql-doc-explorer-schema-section-header graphiql-doc-explorer-schema-section-header--types\">\n ALL SCHEMA TYPES\n <span className=\"graphiql-doc-explorer-schema-type-count\">\n {' '}\n · {allTypes.length}\n </span>\n </div>\n <div className=\"graphiql-doc-explorer-schema-all-types\">\n {allTypes.map(type => (\n <button\n key={type.name}\n type=\"button\"\n className=\"graphiql-doc-explorer-schema-type-row\"\n onClick={() => push({ name: type.name, def: type })}\n >\n <span className=\"graphiql-doc-explorer-type-badge\">\n {getTypeKindLabel(type)}\n </span>\n <span className=\"gra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AA1B,EAAA;CAAA;CAAA,IAAAmC;CAAA,IAAAnC,EAAA,QAAAyB,MAAAzB,EAAA,QAAA0B,IAAA;EAfJS,MAAAO,oBAAA,OAAA;GAAe,WAAAjB;GACZC,UAAAA;EAeE,CAAA;EAAC1B,EAAA,MAAAyB;EAAAzB,EAAA,MAAA0B;EAAA1B,EAAA,MAAAmC;CAAA,OAAAA,MAAAnC,EAAA;CAAA,IAAAqC;CAAA,IAAArC,EAAA,QAAAqB,OAAArB,EAAA,QAAAsB,OAAAtB,EAAA,QAAAuB,OAAAvB,EAAA,QAAAwB,OAAAxB,EAAA,QAAAmC,KAAA;EAlFRE,MAAAM,qBAAA,OAAA;GAAe,WAAAtB;GAAf,UAAA;IAEEC;IAGAC;IAsDAC;IAOAW;GAiBG;;EAACnC,EAAA,MAAAqB;EAAArB,EAAA,MAAAsB;EAAAtB,EAAA,MAAAuB;EAAAvB,EAAA,MAAAwB;EAAAxB,EAAA,MAAAmC;EAAAnC,EAAA,MAAAqC;CAAA,OAAAA,MAAArC,EAAA;CAAA,OAnFNqC;AAmFM"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { isInputObjectType, isInterfaceType, isObjectType } from "graphql";
|
|
4
|
+
import { Combobox, ComboboxInput, ComboboxOption, ComboboxOptions } from "@headlessui/react";
|
|
5
|
+
import { KEY_MAP, KeycapHint, SearchInput, debounce, formatShortcutForOS, typeCategory } from "@graphiql/react";
|
|
1
6
|
import { useDocExplorer, useDocExplorerActions } from "../context.js";
|
|
2
|
-
import { renderType } from "./utils.js";
|
|
3
7
|
import { useSearchResults } from "./search.js";
|
|
8
|
+
import { renderType } from "./utils.js";
|
|
4
9
|
/* empty css */
|
|
5
|
-
import { c } from "react-compiler-runtime";
|
|
6
|
-
import { KEY_MAP, KeycapHint, MagnifyingGlassIcon, debounce, formatShortcutForOS, typeCategory } from "@graphiql/react";
|
|
7
|
-
import { isInputObjectType, isInterfaceType, isObjectType } from "graphql";
|
|
8
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
import { Combobox, ComboboxInput, ComboboxOption, ComboboxOptions } from "@headlessui/react";
|
|
11
|
-
//#region src/components/search-row.tsx
|
|
11
|
+
// src/components/search-row.tsx
|
|
12
12
|
var SearchRow = () => {
|
|
13
|
-
const $ = c(
|
|
13
|
+
const $ = c(36);
|
|
14
14
|
const explorerNavStack = useDocExplorer();
|
|
15
15
|
const { push } = useDocExplorerActions();
|
|
16
16
|
const inputRef = useRef(null);
|
|
@@ -90,79 +90,68 @@ var SearchRow = () => {
|
|
|
90
90
|
$[16] = t5;
|
|
91
91
|
} else t5 = $[16];
|
|
92
92
|
const shortcutKeys = t5;
|
|
93
|
-
|
|
94
|
-
let t7;
|
|
95
|
-
let t8;
|
|
93
|
+
let t6;
|
|
96
94
|
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
97
|
-
|
|
98
|
-
inputRef.current.focus();
|
|
95
|
+
t6 = (event) => {
|
|
96
|
+
if (event.target === event.currentTarget) inputRef.current.focus();
|
|
99
97
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
} else {
|
|
104
|
-
t7 = $[17];
|
|
105
|
-
t8 = $[18];
|
|
106
|
-
}
|
|
98
|
+
$[17] = t6;
|
|
99
|
+
} else t6 = $[17];
|
|
100
|
+
const t7 = `Search ${navItem.name}...`;
|
|
107
101
|
let t10;
|
|
108
|
-
let
|
|
102
|
+
let t8;
|
|
109
103
|
let t9;
|
|
110
|
-
if ($[
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
104
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
+
t8 = (event_0) => setSearchValue(event_0.target.value);
|
|
106
|
+
t9 = () => setIsFocused(true);
|
|
107
|
+
t10 = () => setIsFocused(false);
|
|
108
|
+
$[18] = t10;
|
|
109
|
+
$[19] = t8;
|
|
110
|
+
$[20] = t9;
|
|
117
111
|
} else {
|
|
118
|
-
t10 = $[
|
|
119
|
-
|
|
120
|
-
t9 = $[
|
|
112
|
+
t10 = $[18];
|
|
113
|
+
t8 = $[19];
|
|
114
|
+
t9 = $[20];
|
|
121
115
|
}
|
|
122
|
-
let
|
|
123
|
-
if ($[22] !== searchValue) {
|
|
124
|
-
|
|
125
|
-
autoComplete: "off",
|
|
126
|
-
onChange: t9,
|
|
127
|
-
onFocus: t10,
|
|
128
|
-
onBlur: t11,
|
|
129
|
-
placeholder: "Search schema",
|
|
130
|
-
ref: inputRef,
|
|
131
|
-
value: searchValue,
|
|
132
|
-
"data-cy": "doc-explorer-input"
|
|
133
|
-
});
|
|
134
|
-
$[22] = searchValue;
|
|
135
|
-
$[23] = t12;
|
|
136
|
-
} else t12 = $[23];
|
|
137
|
-
let t13;
|
|
138
|
-
if ($[24] !== isFocused || $[25] !== searchValue || $[26] !== shortcutKeys) {
|
|
139
|
-
t13 = !isFocused && !searchValue && /* @__PURE__ */ jsx(KeycapHint, {
|
|
116
|
+
let t11;
|
|
117
|
+
if ($[21] !== isFocused || $[22] !== searchValue || $[23] !== shortcutKeys) {
|
|
118
|
+
t11 = !isFocused && !searchValue && /* @__PURE__ */ jsx(KeycapHint, {
|
|
140
119
|
keys: shortcutKeys,
|
|
141
120
|
ariaLabel: "Search docs shortcut"
|
|
142
121
|
});
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
} else
|
|
148
|
-
let
|
|
149
|
-
if ($[
|
|
150
|
-
|
|
122
|
+
$[21] = isFocused;
|
|
123
|
+
$[22] = searchValue;
|
|
124
|
+
$[23] = shortcutKeys;
|
|
125
|
+
$[24] = t11;
|
|
126
|
+
} else t11 = $[24];
|
|
127
|
+
let t12;
|
|
128
|
+
if ($[25] !== searchValue || $[26] !== t11 || $[27] !== t7) {
|
|
129
|
+
t12 = /* @__PURE__ */ jsx("div", {
|
|
151
130
|
className: "graphiql-doc-explorer-search-row-input",
|
|
152
|
-
onClick:
|
|
153
|
-
children:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
131
|
+
onClick: t6,
|
|
132
|
+
children: /* @__PURE__ */ jsx(ComboboxInput, {
|
|
133
|
+
as: SearchInput,
|
|
134
|
+
monospace: true,
|
|
135
|
+
"aria-label": t7,
|
|
136
|
+
autoComplete: "off",
|
|
137
|
+
onChange: t8,
|
|
138
|
+
onFocus: t9,
|
|
139
|
+
onBlur: t10,
|
|
140
|
+
placeholder: "Search schema",
|
|
141
|
+
ref: inputRef,
|
|
142
|
+
value: searchValue,
|
|
143
|
+
"data-cy": "doc-explorer-input",
|
|
144
|
+
hint: t11
|
|
145
|
+
})
|
|
158
146
|
});
|
|
147
|
+
$[25] = searchValue;
|
|
148
|
+
$[26] = t11;
|
|
149
|
+
$[27] = t7;
|
|
159
150
|
$[28] = t12;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if ($[31] !== isFocused || $[32] !== results) {
|
|
165
|
-
t15 = isFocused && /* @__PURE__ */ jsxs(ComboboxOptions, {
|
|
151
|
+
} else t12 = $[28];
|
|
152
|
+
let t13;
|
|
153
|
+
if ($[29] !== isFocused || $[30] !== results) {
|
|
154
|
+
t13 = isFocused && /* @__PURE__ */ jsxs(ComboboxOptions, {
|
|
166
155
|
className: "graphiql-doc-explorer-search-row-listbox",
|
|
167
156
|
"data-cy": "doc-explorer-list",
|
|
168
157
|
children: [
|
|
@@ -178,29 +167,27 @@ var SearchRow = () => {
|
|
|
178
167
|
results.fields.map(_temp3)
|
|
179
168
|
]
|
|
180
169
|
});
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
} else
|
|
185
|
-
let
|
|
186
|
-
if ($[
|
|
187
|
-
|
|
170
|
+
$[29] = isFocused;
|
|
171
|
+
$[30] = results;
|
|
172
|
+
$[31] = t13;
|
|
173
|
+
} else t13 = $[31];
|
|
174
|
+
let t14;
|
|
175
|
+
if ($[32] !== onSelect || $[33] !== t12 || $[34] !== t13) {
|
|
176
|
+
t14 = /* @__PURE__ */ jsx("div", {
|
|
188
177
|
className: "graphiql-doc-explorer-search-row-wrapper",
|
|
189
178
|
children: /* @__PURE__ */ jsxs(Combobox, {
|
|
190
179
|
as: "div",
|
|
191
180
|
className: "graphiql-doc-explorer-search-row",
|
|
192
181
|
onChange: onSelect,
|
|
193
|
-
|
|
194
|
-
children: [t14, t15]
|
|
182
|
+
children: [t12, t13]
|
|
195
183
|
})
|
|
196
184
|
});
|
|
197
|
-
$[
|
|
185
|
+
$[32] = onSelect;
|
|
186
|
+
$[33] = t12;
|
|
187
|
+
$[34] = t13;
|
|
198
188
|
$[35] = t14;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
$[38] = t16;
|
|
202
|
-
} else t16 = $[38];
|
|
203
|
-
return t16;
|
|
189
|
+
} else t14 = $[35];
|
|
190
|
+
return t14;
|
|
204
191
|
};
|
|
205
192
|
var SearchType = (t0) => {
|
|
206
193
|
const $ = c(5);
|
|
@@ -295,7 +282,6 @@ function _temp3(result_1, i_1) {
|
|
|
295
282
|
function _temp4(namedType) {
|
|
296
283
|
return /* @__PURE__ */ jsx(SearchType, { type: namedType });
|
|
297
284
|
}
|
|
298
|
-
//#endregion
|
|
299
285
|
export { SearchRow };
|
|
300
286
|
|
|
301
287
|
//# sourceMappingURL=search-row.js.map
|