@usebruno/graphql-docs 0.1.0
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/cjs/components/DocExplorer/Argument.d.ts +16 -0
- package/dist/cjs/components/DocExplorer/DefaultValue.d.ts +13 -0
- package/dist/cjs/components/DocExplorer/Directive.d.ts +13 -0
- package/dist/cjs/components/DocExplorer/FieldDoc.d.ts +14 -0
- package/dist/cjs/components/DocExplorer/MarkdownContent.d.ts +14 -0
- package/dist/cjs/components/DocExplorer/SchemaDoc.d.ts +15 -0
- package/dist/cjs/components/DocExplorer/SearchBox.d.ts +24 -0
- package/dist/cjs/components/DocExplorer/SearchResults.d.ts +21 -0
- package/dist/cjs/components/DocExplorer/TypeDoc.d.ts +25 -0
- package/dist/cjs/components/DocExplorer/TypeLink.d.ts +16 -0
- package/dist/cjs/components/DocExplorer/types.d.ts +6 -0
- package/dist/cjs/components/DocExplorer.d.ts +53 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/utility/debounce.d.ts +11 -0
- package/dist/esm/components/DocExplorer/Argument.d.ts +16 -0
- package/dist/esm/components/DocExplorer/DefaultValue.d.ts +13 -0
- package/dist/esm/components/DocExplorer/Directive.d.ts +13 -0
- package/dist/esm/components/DocExplorer/FieldDoc.d.ts +14 -0
- package/dist/esm/components/DocExplorer/MarkdownContent.d.ts +14 -0
- package/dist/esm/components/DocExplorer/SchemaDoc.d.ts +15 -0
- package/dist/esm/components/DocExplorer/SearchBox.d.ts +24 -0
- package/dist/esm/components/DocExplorer/SearchResults.d.ts +21 -0
- package/dist/esm/components/DocExplorer/TypeDoc.d.ts +25 -0
- package/dist/esm/components/DocExplorer/TypeLink.d.ts +16 -0
- package/dist/esm/components/DocExplorer/types.d.ts +6 -0
- package/dist/esm/components/DocExplorer.d.ts +53 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/utility/debounce.d.ts +11 -0
- package/dist/index.d.ts +57 -0
- package/package.json +39 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { GraphQLArgument } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction } from './types';
|
|
10
|
+
declare type ArgumentProps = {
|
|
11
|
+
arg: GraphQLArgument;
|
|
12
|
+
onClickType: OnClickTypeFunction;
|
|
13
|
+
showDefaultValue?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export default function Argument({ arg, onClickType, showDefaultValue, }: ArgumentProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { FieldType } from './types';
|
|
9
|
+
declare type DefaultValueProps = {
|
|
10
|
+
field: FieldType;
|
|
11
|
+
};
|
|
12
|
+
export default function DefaultValue({ field }: DefaultValueProps): JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { DirectiveNode } from 'graphql';
|
|
9
|
+
declare type DirectiveProps = {
|
|
10
|
+
directive: DirectiveNode;
|
|
11
|
+
};
|
|
12
|
+
export default function Directive({ directive }: DirectiveProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { OnClickTypeFunction, FieldType } from './types';
|
|
9
|
+
declare type FieldDocProps = {
|
|
10
|
+
field?: FieldType;
|
|
11
|
+
onClickType: OnClickTypeFunction;
|
|
12
|
+
};
|
|
13
|
+
export default function FieldDoc({ field, onClickType }: FieldDocProps): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
declare type Maybe<T> = T | null | undefined;
|
|
9
|
+
declare type MarkdownContentProps = {
|
|
10
|
+
markdown?: Maybe<string>;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export default function MarkdownContent({ markdown, className, }: MarkdownContentProps): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { GraphQLSchema } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction } from './types';
|
|
10
|
+
declare type SchemaDocProps = {
|
|
11
|
+
schema: GraphQLSchema;
|
|
12
|
+
onClickType: OnClickTypeFunction;
|
|
13
|
+
};
|
|
14
|
+
export default function SchemaDoc({ schema, onClickType }: SchemaDocProps): JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React, { ChangeEventHandler } from 'react';
|
|
8
|
+
declare type OnSearchFn = (value: string) => void;
|
|
9
|
+
declare type SearchBoxProps = {
|
|
10
|
+
value?: string;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
onSearch: OnSearchFn;
|
|
13
|
+
};
|
|
14
|
+
declare type SearchBoxState = {
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
17
|
+
export default class SearchBox extends React.Component<SearchBoxProps, SearchBoxState> {
|
|
18
|
+
debouncedOnSearch: OnSearchFn;
|
|
19
|
+
constructor(props: SearchBoxProps);
|
|
20
|
+
render(): JSX.Element;
|
|
21
|
+
handleChange: ChangeEventHandler<HTMLInputElement>;
|
|
22
|
+
handleClear: () => void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { GraphQLSchema, GraphQLNamedType } from 'graphql';
|
|
9
|
+
import { OnClickFieldFunction, OnClickTypeFunction } from './types';
|
|
10
|
+
declare type SearchResultsProps = {
|
|
11
|
+
schema: GraphQLSchema;
|
|
12
|
+
withinType?: GraphQLNamedType;
|
|
13
|
+
searchValue: string;
|
|
14
|
+
onClickType: OnClickTypeFunction;
|
|
15
|
+
onClickField: OnClickFieldFunction;
|
|
16
|
+
};
|
|
17
|
+
export default class SearchResults extends React.Component<SearchResultsProps, {}> {
|
|
18
|
+
shouldComponentUpdate(nextProps: SearchResultsProps): boolean;
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { GraphQLSchema, GraphQLType } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction, OnClickFieldFunction } from './types';
|
|
10
|
+
declare type TypeDocProps = {
|
|
11
|
+
schema: GraphQLSchema;
|
|
12
|
+
type: GraphQLType;
|
|
13
|
+
onClickType: OnClickTypeFunction;
|
|
14
|
+
onClickField: OnClickFieldFunction;
|
|
15
|
+
};
|
|
16
|
+
declare type TypeDocState = {
|
|
17
|
+
showDeprecated: boolean;
|
|
18
|
+
};
|
|
19
|
+
export default class TypeDoc extends React.Component<TypeDocProps, TypeDocState> {
|
|
20
|
+
constructor(props: TypeDocProps);
|
|
21
|
+
shouldComponentUpdate(nextProps: TypeDocProps, nextState: TypeDocState): boolean;
|
|
22
|
+
render(): JSX.Element;
|
|
23
|
+
handleShowDeprecated: () => void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { GraphQLType } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction } from './types';
|
|
10
|
+
declare type Maybe<T> = T | null | undefined;
|
|
11
|
+
declare type TypeLinkProps = {
|
|
12
|
+
type?: Maybe<GraphQLType>;
|
|
13
|
+
onClick?: OnClickTypeFunction;
|
|
14
|
+
};
|
|
15
|
+
export default function TypeLink(props: TypeLinkProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { GraphQLField, GraphQLInputField, GraphQLArgument, GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLType, GraphQLNamedType } from 'graphql';
|
|
3
|
+
export declare type FieldType = GraphQLField<{}, {}, {}> | GraphQLInputField | GraphQLArgument;
|
|
4
|
+
export declare type OnClickFieldFunction = (field: FieldType, type?: GraphQLObjectType | GraphQLInterfaceType | GraphQLInputObjectType | GraphQLType, event?: MouseEvent) => void;
|
|
5
|
+
export declare type OnClickTypeFunction = (type: GraphQLNamedType, event?: MouseEvent<HTMLAnchorElement>) => void;
|
|
6
|
+
export declare type OnClickFieldOrTypeFunction = OnClickFieldFunction | OnClickTypeFunction;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React, { ReactNode } from 'react';
|
|
8
|
+
import { GraphQLSchema, GraphQLNamedType, GraphQLError } from 'graphql';
|
|
9
|
+
import { FieldType } from './DocExplorer/types';
|
|
10
|
+
declare type NavStackItem = {
|
|
11
|
+
name: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
search?: string;
|
|
14
|
+
def?: GraphQLNamedType | FieldType;
|
|
15
|
+
};
|
|
16
|
+
declare type DocExplorerProps = {
|
|
17
|
+
schema?: GraphQLSchema | null;
|
|
18
|
+
schemaErrors?: readonly GraphQLError[];
|
|
19
|
+
children?: ReactNode | null;
|
|
20
|
+
};
|
|
21
|
+
declare type DocExplorerState = {
|
|
22
|
+
navStack: NavStackItem[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* DocExplorer
|
|
26
|
+
*
|
|
27
|
+
* Shows documentations for GraphQL definitions from the schema.
|
|
28
|
+
*
|
|
29
|
+
* Props:
|
|
30
|
+
*
|
|
31
|
+
* - schema: A required GraphQLSchema instance that provides GraphQL document
|
|
32
|
+
* definitions.
|
|
33
|
+
*
|
|
34
|
+
* Children:
|
|
35
|
+
*
|
|
36
|
+
* - Any provided children will be positioned in the right-hand-side of the
|
|
37
|
+
* top bar. Typically this will be a "close" button for temporary explorer.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare class DocExplorer extends React.Component<DocExplorerProps, DocExplorerState> {
|
|
41
|
+
constructor(props: DocExplorerProps);
|
|
42
|
+
shouldComponentUpdate(nextProps: DocExplorerProps, nextState: DocExplorerState): boolean;
|
|
43
|
+
render(): JSX.Element;
|
|
44
|
+
showDoc(typeOrField: GraphQLNamedType | FieldType): void;
|
|
45
|
+
showDocForReference(reference: any): void;
|
|
46
|
+
showSearch(search: string): void;
|
|
47
|
+
reset(): void;
|
|
48
|
+
handleNavBackClick: () => void;
|
|
49
|
+
handleClickType: (type: GraphQLNamedType) => void;
|
|
50
|
+
handleClickField: (field: FieldType) => void;
|
|
51
|
+
handleSearch: (value: string) => void;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react"),t=require("graphql"),a=require("markdown-it"),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},r(e,t)};function n(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var o=function(){return o=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var n in t=arguments[a])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};function c(e){var t=e.onClick?e.onClick:function(){return null};return i(e.type,t)}function i(a,r){return a instanceof t.GraphQLNonNull?e.createElement("span",null,i(a.ofType,r),"!"):a instanceof t.GraphQLList?e.createElement("span",null,"[",i(a.ofType,r),"]"):e.createElement("a",{className:"type-name",onClick:function(e){e.preventDefault(),r(a,e)},href:"#"},null==a?void 0:a.name)}function l(a){var r,n=a.field;return"defaultValue"in n&&void 0!==n.defaultValue?e.createElement("span",null," = ",e.createElement("span",{className:"arg-default-value"},(r=t.astFromValue(n.defaultValue,n.type))?t.print(r):"")):null}function s(t){var a=t.arg,r=t.onClickType,n=t.showDefaultValue;return e.createElement("span",{className:"arg"},e.createElement("span",{className:"arg-name"},a.name),": ",e.createElement(c,{type:a.type,onClick:r}),!1!==n&&e.createElement(l,{field:a}))}function d(t){var a=t.directive;return e.createElement("span",{className:"doc-category-item",id:a.name.value},"@",a.name.value)}var p=new a({linkify:!0});function m(t){var a=t.markdown,r=t.className;return a?e.createElement("div",{className:r,dangerouslySetInnerHTML:{__html:p.render(a)}}):e.createElement("div",null)}function h(t){var a,r,n,o=t.field,i=t.onClickType,l=e.useState(!1),p=l[0],h=l[1];if(o&&"args"in o&&o.args.length>0){a=e.createElement("div",{id:"doc-args",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"arguments"),o.args.filter((function(e){return!e.deprecationReason})).map((function(t){return e.createElement("div",{key:t.name,className:"doc-category-item"},e.createElement("div",null,e.createElement(s,{arg:t,onClickType:i})),e.createElement(m,{className:"doc-value-description",markdown:t.description}),t&&"deprecationReason"in t&&e.createElement(m,{className:"doc-deprecation",markdown:null==t?void 0:t.deprecationReason}))})));var u=o.args.filter((function(e){return Boolean(e.deprecationReason)}));u.length>0&&(r=e.createElement("div",{id:"doc-deprecated-args",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"deprecated arguments"),p?u.map((function(t,a){return e.createElement("div",{key:a},e.createElement("div",null,e.createElement(s,{arg:t,onClickType:i})),e.createElement(m,{className:"doc-value-description",markdown:t.description}),t&&"deprecationReason"in t&&e.createElement(m,{className:"doc-deprecation",markdown:null==t?void 0:t.deprecationReason}))})):e.createElement("button",{className:"show-btn",onClick:function(){return h(!p)}},"Show deprecated arguments...")))}return o&&o.astNode&&o.astNode.directives&&o.astNode.directives.length>0&&(n=e.createElement("div",{id:"doc-directives",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"directives"),o.astNode.directives.map((function(t){return e.createElement("div",{key:t.name.value,className:"doc-category-item"},e.createElement("div",null,e.createElement(d,{directive:t})))})))),e.createElement("div",null,e.createElement(m,{className:"doc-type-description",markdown:(null==o?void 0:o.description)||"No Description"}),o&&"deprecationReason"in o&&e.createElement(m,{className:"doc-deprecation",markdown:null==o?void 0:o.deprecationReason}),e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"type"),e.createElement(c,{type:null==o?void 0:o.type,onClick:i})),a,n,r)}function u(t){var a=t.schema,r=t.onClickType,n=a.getQueryType(),o=a.getMutationType&&a.getMutationType(),i=a.getSubscriptionType&&a.getSubscriptionType();return e.createElement("div",null,e.createElement(m,{className:"doc-type-description",markdown:a.description||"A GraphQL schema provides a root type for each kind of operation."}),e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"root types"),e.createElement("div",{className:"doc-category-item"},e.createElement("span",{className:"keyword"},"query"),": ",e.createElement(c,{type:n,onClick:r})),o&&e.createElement("div",{className:"doc-category-item"},e.createElement("span",{className:"keyword"},"mutation"),": ",e.createElement(c,{type:o,onClick:r})),i&&e.createElement("div",{className:"doc-category-item"},e.createElement("span",{className:"keyword"},"subscription"),": ",e.createElement(c,{type:i,onClick:r}))))}var g=function(t){function a(e){var a,r,n,o=t.call(this,e)||this;return o.handleChange=function(e){var t=e.currentTarget.value;o.setState({value:t}),o.debouncedOnSearch(t)},o.handleClear=function(){o.setState({value:""}),o.props.onSearch("")},o.state={value:e.value||""},o.debouncedOnSearch=(a=200,r=o.props.onSearch,function(){for(var e=this,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];n&&window.clearTimeout(n),n=window.setTimeout((function(){n=null,r.apply(e,t)}),a)}),o}return n(a,t),a.prototype.render=function(){return e.createElement("label",{className:"search-box"},e.createElement("div",{className:"search-box-icon","aria-hidden":"true"},"⚲"),e.createElement("input",{value:this.state.value,onChange:this.handleChange,type:"text",placeholder:this.props.placeholder,"aria-label":this.props.placeholder}),this.state.value&&e.createElement("button",{className:"search-box-clear",onClick:this.handleClear,"aria-label":"Clear search input"},"✕"))},a}(e.Component),f=function(t){function a(){return null!==t&&t.apply(this,arguments)||this}return n(a,t),a.prototype.shouldComponentUpdate=function(e){return this.props.schema!==e.schema||this.props.searchValue!==e.searchValue},a.prototype.render=function(){var t=this.props.searchValue,a=this.props.withinType,r=this.props.schema,n=this.props.onClickType,o=this.props.onClickField,i=[],l=[],d=[],p=r.getTypeMap(),m=Object.keys(p);a&&(m=m.filter((function(e){return e!==a.name}))).unshift(a.name);for(var h=function(r){if(i.length+l.length+d.length>=100)return"break";var m=p[r];if(a!==m&&y(r,t)&&l.push(e.createElement("div",{className:"doc-category-item",key:r},e.createElement(c,{type:m,onClick:n}))),m&&"getFields"in m){var h=m.getFields();Object.keys(h).forEach((function(l){var p,u=h[l];if(!y(l,t)){if(!("args"in u)||!u.args.length)return;if(0===(p=u.args.filter((function(e){return y(e.name,t)}))).length)return}var g=e.createElement("div",{className:"doc-category-item",key:r+"."+l},a!==m&&[e.createElement(c,{key:"type",type:m,onClick:n}),"."],e.createElement("a",{className:"field-name",onClick:function(e){return o(u,m,e)}},u.name),p&&["(",e.createElement("span",{key:"args"},p.map((function(t){return e.createElement(s,{key:t.name,arg:t,onClickType:n,showDefaultValue:!1})}))),")"]);a===m?i.push(g):d.push(g)}))}},u=0,g=m;u<g.length;u++){if("break"===h(g[u]))break}return i.length+l.length+d.length===0?e.createElement("span",{className:"doc-alert-text"},"No results found."):a&&l.length+d.length>0?e.createElement("div",null,i,e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"other results"),l,d)):e.createElement("div",{className:"doc-search-items"},i,l,d)},a}(e.Component);function y(e,t){try{var a=t.replace(/[^_0-9A-Za-z]/g,(function(e){return"\\"+e}));return-1!==e.search(new RegExp(a,"i"))}catch(a){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}}var v=function(a){function r(e){var t=a.call(this,e)||this;return t.handleShowDeprecated=function(){return t.setState({showDeprecated:!0})},t.state={showDeprecated:!1},t}return n(r,a),r.prototype.shouldComponentUpdate=function(e,t){return this.props.type!==e.type||this.props.schema!==e.schema||this.state.showDeprecated!==t.showDeprecated},r.prototype.render=function(){var a,r,n,o,i,l=this.props.schema,s=this.props.type,d=this.props.onClickType,p=this.props.onClickField,h=null,u=[];if(s instanceof t.GraphQLUnionType?(h="possible types",u=l.getPossibleTypes(s)):s instanceof t.GraphQLInterfaceType?(h="implementations",u=l.getPossibleTypes(s)):s instanceof t.GraphQLObjectType&&(h="implements",u=s.getInterfaces()),u&&u.length>0&&(a=e.createElement("div",{id:"doc-types",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},h),u.map((function(t){return e.createElement("div",{key:t.name,className:"doc-category-item"},e.createElement(c,{type:t,onClick:d}))})))),s&&"getFields"in s){var g=s.getFields(),f=Object.keys(g).map((function(e){return g[e]}));r=e.createElement("div",{id:"doc-fields",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"fields"),f.filter((function(e){return!e.deprecationReason})).map((function(t){return e.createElement(k,{key:t.name,type:s,field:t,onClickType:d,onClickField:p})})));var y=f.filter((function(e){return Boolean(e.deprecationReason)}));y.length>0&&(n=e.createElement("div",{id:"doc-deprecated-fields",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"deprecated fields"),this.state.showDeprecated?y.map((function(t){return e.createElement(k,{key:t.name,type:s,field:t,onClickType:d,onClickField:p})})):e.createElement("button",{className:"show-btn",onClick:this.handleShowDeprecated},"Show deprecated fields...")))}if(s instanceof t.GraphQLEnumType){var v=s.getValues();o=e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"values"),v.filter((function(e){return Boolean(!e.deprecationReason)})).map((function(t){return e.createElement(x,{key:t.name,value:t})})));var E=v.filter((function(e){return Boolean(e.deprecationReason)}));E.length>0&&(i=e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"deprecated values"),this.state.showDeprecated?E.map((function(t){return e.createElement(x,{key:t.name,value:t})})):e.createElement("button",{className:"show-btn",onClick:this.handleShowDeprecated},"Show deprecated values...")))}return e.createElement("div",null,e.createElement(m,{className:"doc-type-description",markdown:"description"in s&&s.description||"No Description"}),s instanceof t.GraphQLObjectType&&a,r,n,o,i,!(s instanceof t.GraphQLObjectType)&&a)},r}(e.Component);function k(t){var a=t.type,r=t.field,n=t.onClickType,o=t.onClickField;return e.createElement("div",{className:"doc-category-item"},e.createElement("a",{className:"field-name",onClick:function(e){return o(r,a,e)}},r.name),"args"in r&&r.args&&r.args.length>0&&["(",e.createElement("span",{key:"args"},r.args.filter((function(e){return!e.deprecationReason})).map((function(t){return e.createElement(s,{key:t.name,arg:t,onClickType:n})}))),")"],": ",e.createElement(c,{type:r.type,onClick:n}),e.createElement(l,{field:r}),r.description&&e.createElement(m,{className:"field-short-description",markdown:r.description}),"deprecationReason"in r&&r.deprecationReason&&e.createElement(m,{className:"doc-deprecation",markdown:r.deprecationReason}))}function x(t){var a=t.value;return e.createElement("div",{className:"doc-category-item"},e.createElement("div",{className:"enum-value"},a.name),e.createElement(m,{className:"doc-value-description",markdown:a.description}),a.deprecationReason&&e.createElement(m,{className:"doc-deprecation",markdown:a.deprecationReason}))}var E={name:"Schema",title:"Documentation Explorer"},b=function(a){function r(e){var t=a.call(this,e)||this;return t.handleNavBackClick=function(){t.state.navStack.length>1&&t.setState({navStack:t.state.navStack.slice(0,-1)})},t.handleClickType=function(e){t.showDoc(e)},t.handleClickField=function(e){t.showDoc(e)},t.handleSearch=function(e){t.showSearch(e)},t.state={navStack:[E]},t}return n(r,a),r.prototype.shouldComponentUpdate=function(e,t){return this.props.schema!==e.schema||this.state.navStack!==t.navStack||this.props.schemaErrors!==e.schemaErrors},r.prototype.render=function(){var a,r=this.props,n=r.schema,o=r.schemaErrors,c=this.state.navStack,i=c[c.length-1];a=o?e.createElement("div",{className:"error-container"},"Error fetching schema"):void 0===n?e.createElement("div",{className:"spinner-container"},e.createElement("div",{className:"spinner"})):n?i.search?e.createElement(f,{searchValue:i.search,withinType:i.def,schema:n,onClickType:this.handleClickType,onClickField:this.handleClickField}):1===c.length?e.createElement(u,{schema:n,onClickType:this.handleClickType}):t.isType(i.def)?e.createElement(v,{schema:n,type:i.def,onClickType:this.handleClickType,onClickField:this.handleClickField}):e.createElement(h,{field:i.def,onClickType:this.handleClickType}):e.createElement("div",{className:"error-container"},"No Schema Available");var l,s=1===c.length||t.isType(i.def)&&"getFields"in i.def;return c.length>1&&(l=c[c.length-2].name),e.createElement("div",{className:"graphql-docs-container"},e.createElement("section",{className:"doc-explorer",key:i.name,"aria-label":"Documentation Explorer"},e.createElement("div",{className:"doc-explorer-title-bar"},l&&e.createElement("button",{className:"doc-explorer-back",onClick:this.handleNavBackClick,"aria-label":"Go back to ".concat(l)},l),e.createElement("div",{className:"doc-explorer-title"},i.title||i.name),e.createElement("div",{className:"doc-explorer-rhs"},this.props.children)),e.createElement("div",{className:"doc-explorer-contents"},s&&e.createElement(g,{value:i.search,placeholder:"Search ".concat(i.name,"..."),onSearch:this.handleSearch}),a)))},r.prototype.showDoc=function(e){var t=this.state.navStack;t[t.length-1].def!==e&&this.setState({navStack:t.concat([{name:e.name,def:e}])})},r.prototype.showDocForReference=function(e){e&&"Type"===e.kind?this.showDoc(e.type):"Field"===e.kind||"Argument"===e.kind&&e.field?this.showDoc(e.field):"EnumValue"===e.kind&&e.type&&this.showDoc(e.type)},r.prototype.showSearch=function(e){var t=this.state.navStack.slice(),a=t[t.length-1];t[t.length-1]=o(o({},a),{search:e}),this.setState({navStack:t})},r.prototype.reset=function(){this.setState({navStack:[E]})},r}(e.Component);!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===a&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}('.graphql-docs-container .doc-explorer{background:#fff}.graphql-docs-container .doc-explorer-title-bar,.graphql-docs-container .history-title-bar{cursor:default;display:flex;line-height:14px;padding:8px 8px 5px;position:relative;user-select:none}.graphql-docs-container .doc-explorer-title,.graphql-docs-container .history-title{flex:1;font-weight:700;overflow-x:hidden;padding:10px 0 10px 10px;text-align:center;text-overflow:ellipsis;user-select:text;white-space:nowrap}.graphql-docs-container .doc-explorer-back{background:0;border:0;color:#3b5998;cursor:pointer;line-height:14px;margin:-7px 0 -6px -8px;overflow-x:hidden;padding:17px 12px 16px 16px;text-overflow:ellipsis;white-space:nowrap}.doc-explorer-narrow .doc-explorer-back{width:0}.graphql-docs-container .doc-explorer-back:before{border-left:2px solid #3b5998;border-top:2px solid #3b5998;content:"";display:inline-block;height:9px;margin:0 3px -1px 0;position:relative;transform:rotate(-45deg);width:9px}.graphql-docs-container .doc-explorer-rhs{position:relative}.graphql-docs-container .doc-explorer-contents,.graphql-docs-container .history-contents{background-color:#fff;border-top:1px solid #d6d6d6;bottom:0;left:0;overflow-y:auto;padding:20px 15px;position:absolute;right:0;top:47px}.graphql-docs-container .doc-explorer-contents{min-width:300px}.graphql-docs-container .doc-type-description blockquote:first-child,.graphql-docs-container .doc-type-description p:first-child{margin-top:0}.graphql-docs-container .doc-explorer-contents a{cursor:pointer;text-decoration:none}.graphql-docs-container .doc-explorer-contents a:hover{text-decoration:underline}.graphql-docs-container .doc-value-description>:first-child{margin-top:4px}.graphql-docs-container .doc-value-description>:last-child{margin-bottom:4px}.graphql-docs-container .doc-category code,.graphql-docs-container .doc-category pre,.graphql-docs-container .doc-type-description code,.graphql-docs-container .doc-type-description pre{--saf-0:rgba(var(--sk_foreground_low,29,28,29),0.13);word-wrap:break-word;font-size:12px;font-variant-ligatures:none;line-height:1.50001;-webkit-tab-size:4;-moz-tab-size:4;tab-size:4;white-space:pre;white-space:pre-wrap;word-break:normal}.graphql-docs-container .doc-category code,.graphql-docs-container .doc-type-description code{background-color:rgba(var(--sk_foreground_min,29,28,29),.04);background-color:#fff;border:1px solid var(--saf-0);border-radius:3px;color:#e01e5a;padding:2px 3px 1px}.graphql-docs-container .doc-category{margin:20px 0}.graphql-docs-container .doc-category-title{border-bottom:1px solid #e0e0e0;color:#777;cursor:default;font-size:14px;font-variant:small-caps;font-weight:700;letter-spacing:1px;margin:0 -15px 10px 0;padding:10px 0;user-select:none}.graphql-docs-container .doc-category-item{color:#555;margin:12px 0}.graphql-docs-container .keyword{color:#b11a04}.graphql-docs-container .type-name{color:#ca9800}.graphql-docs-container .field-name{color:#1f61a0}.graphql-docs-container .field-short-description{color:#666;margin-left:5px;overflow:hidden;text-overflow:ellipsis}.graphql-docs-container .enum-value{color:#0b7fc7}.graphql-docs-container .arg-name{color:#8b2bb9}.graphql-docs-container .arg{display:block;margin-left:1em}.graphql-docs-container .arg:first-child:last-child,.graphql-docs-container .arg:first-child:nth-last-child(2),.graphql-docs-container .arg:first-child:nth-last-child(2)~.arg{display:inherit;margin:inherit}.graphql-docs-container .arg:first-child:nth-last-child(2):after{content:", "}.graphql-docs-container .arg-default-value{color:#43a047}.graphql-docs-container .doc-deprecation{background:#fffae8;border-radius:3px;box-shadow:inset 0 0 1px #bfb063;color:#867f70;line-height:16px;margin:8px -8px;max-height:80px;overflow:hidden;padding:8px}.graphql-docs-container .doc-deprecation:before{color:#c79b2e;content:"Deprecated:";cursor:default;display:block;font-size:9px;font-weight:700;letter-spacing:1px;line-height:1;padding-bottom:5px;text-transform:uppercase;user-select:none}.graphql-docs-container .doc-deprecation>:first-child{margin-top:0}.graphql-docs-container .doc-deprecation>:last-child{margin-bottom:0}.graphql-docs-container .show-btn{-webkit-appearance:initial;background:#fbfcfc;border:1px solid #ccc;border-radius:3px;box-sizing:border-box;color:#555;cursor:pointer;display:block;padding:8px 12px 10px;text-align:center;width:100%}.graphql-docs-container .search-box{align-items:center;border-bottom:1px solid #d3d6db;display:flex;font-size:14px;margin:-15px -15px 12px 0;position:relative}.graphql-docs-container .search-box-icon{cursor:pointer;display:block;font-size:24px;transform:rotate(-45deg);user-select:none}.graphql-docs-container .search-box .search-box-clear{background-color:#d0d0d0;border:0;border-radius:12px;color:#fff;cursor:pointer;font-size:11px;padding:1px 5px 2px;position:absolute;right:3px;user-select:none}.graphql-docs-container .search-box .search-box-clear:hover{background-color:#b9b9b9}.graphql-docs-container .search-box>input{border:none;box-sizing:border-box;font-size:14px;outline:none;padding:6px 24px 8px 20px;width:100%}.graphql-docs-container .error-container{font-weight:700;left:0;letter-spacing:1px;opacity:.5;position:absolute;right:0;text-align:center;text-transform:uppercase;top:50%;transform:translateY(-50%)}'),exports.DocExplorer=b;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../src/components/DocExplorer/TypeLink.tsx","../../src/components/DocExplorer/DefaultValue.tsx","../../src/components/DocExplorer/Argument.tsx","../../src/components/DocExplorer/Directive.tsx","../../src/components/DocExplorer/MarkdownContent.tsx","../../src/components/DocExplorer/FieldDoc.tsx","../../src/components/DocExplorer/SchemaDoc.tsx","../../src/components/DocExplorer/SearchBox.tsx","../../src/utility/debounce.ts","../../src/components/DocExplorer/SearchResults.tsx","../../src/components/DocExplorer/TypeDoc.tsx","../../src/components/DocExplorer.tsx","../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","TypeLink","props","onClick","renderType","type","GraphQLNonNull","React","createElement","ofType","GraphQLList","className","event","preventDefault","href","name","DefaultValue","_a","ast","field","undefined","defaultValue","astFromValue","print","Argument","arg","onClickType","showDefaultValue","Directive","directive","id","value","md","MD","linkify","MarkdownContent","markdown","dangerouslySetInnerHTML","__html","render","FieldDoc","argsDef","deprecatedArgsDef","directivesDef","_b","useState","showDeprecated","handleShowDeprecated","args","filter","deprecationReason","map","key","description","deprecatedArgs","Boolean","astNode","directives","SchemaDoc","schema","queryType","getQueryType","mutationType","getMutationType","subscriptionType","getSubscriptionType","SearchBox","_super","duration","fn","timeout","_this","handleChange","currentTarget","setState","debouncedOnSearch","handleClear","onSearch","state","_i","window","clearTimeout","setTimeout","onChange","placeholder","Component","SearchResults","shouldComponentUpdate","nextProps","searchValue","withinType","onClickField","matchedWithin","matchedTypes","matchedFields","typeMap","getTypeMap","typeNames","keys","unshift","typeName","isMatch","push","fields_1","getFields","forEach","fieldName","matchingArgs","match","typeNames_1","sourceText","escaped","replace","ch","search","RegExp","e","toLowerCase","indexOf","TypeDoc","nextState","typesDef","fieldsDef","deprecatedFieldsDef","valuesDef","deprecatedValuesDef","typesTitle","types","GraphQLUnionType","getPossibleTypes","GraphQLInterfaceType","GraphQLObjectType","getInterfaces","subtype","fieldMap_1","fields","Field","deprecatedFields","GraphQLEnumType","values","getValues","EnumValue","deprecatedValues","initialNav","title","DocExplorer","handleNavBackClick","navStack","slice","handleClickType","showDoc","handleClickField","handleSearch","showSearch","schemaErrors","content","navItem","def","isType","prevName","shouldSearchBoxAppear","concat","children","typeOrField","showDocForReference","reference","kind","topNav","reset","css","ref","insertAt","document","head","getElementsByTagName","style","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode"],"mappings":"kFAgBIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAE,GACzE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,KAClEP,EAAcC,EAAGC,EAC5B,EAEO,SAASO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,CAAI,CADvCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,EACnF,CAEO,IAAIK,EAAW,WAQlB,OAPAA,EAAWZ,OAAOa,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIZ,KADTW,EAAIG,UAAUF,GACOhB,OAAOU,UAAUL,eAAee,KAAKL,EAAGX,KAAIU,EAAEV,GAAKW,EAAEX,IAE9E,OAAOU,CACV,EACMF,EAASS,MAAMb,KAAMU,UAChC,ECfwB,SAAAI,EAASC,GAC/B,IAAMC,EAAUD,EAAMC,QAAUD,EAAMC,QAAU,WAAM,OAAA,MACtD,OAAOC,EAAWF,EAAMG,KAAMF,EAChC,CAEA,SAASC,EAAWC,EAA0BF,GAC5C,OAAIE,aAAgBC,EAAAA,eAEhBC,EAAAC,cAAA,OAAA,KACGJ,EAAWC,EAAKI,OAAQN,GACxB,KAIHE,aAAgBK,EAAAA,YAEhBH,EAAAC,cAAA,OAAA,KACG,IACAJ,EAAWC,EAAKI,OA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E file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Provided a duration and a function, returns a new function which is called
|
|
9
|
+
* `duration` milliseconds after the last call.
|
|
10
|
+
*/
|
|
11
|
+
export default function debounce<F extends (...args: any[]) => any>(duration: number, fn: F): (this: any, ...args: Parameters<F>) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { GraphQLArgument } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction } from './types';
|
|
10
|
+
declare type ArgumentProps = {
|
|
11
|
+
arg: GraphQLArgument;
|
|
12
|
+
onClickType: OnClickTypeFunction;
|
|
13
|
+
showDefaultValue?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export default function Argument({ arg, onClickType, showDefaultValue, }: ArgumentProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { FieldType } from './types';
|
|
9
|
+
declare type DefaultValueProps = {
|
|
10
|
+
field: FieldType;
|
|
11
|
+
};
|
|
12
|
+
export default function DefaultValue({ field }: DefaultValueProps): JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { DirectiveNode } from 'graphql';
|
|
9
|
+
declare type DirectiveProps = {
|
|
10
|
+
directive: DirectiveNode;
|
|
11
|
+
};
|
|
12
|
+
export default function Directive({ directive }: DirectiveProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { OnClickTypeFunction, FieldType } from './types';
|
|
9
|
+
declare type FieldDocProps = {
|
|
10
|
+
field?: FieldType;
|
|
11
|
+
onClickType: OnClickTypeFunction;
|
|
12
|
+
};
|
|
13
|
+
export default function FieldDoc({ field, onClickType }: FieldDocProps): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
declare type Maybe<T> = T | null | undefined;
|
|
9
|
+
declare type MarkdownContentProps = {
|
|
10
|
+
markdown?: Maybe<string>;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export default function MarkdownContent({ markdown, className, }: MarkdownContentProps): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { GraphQLSchema } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction } from './types';
|
|
10
|
+
declare type SchemaDocProps = {
|
|
11
|
+
schema: GraphQLSchema;
|
|
12
|
+
onClickType: OnClickTypeFunction;
|
|
13
|
+
};
|
|
14
|
+
export default function SchemaDoc({ schema, onClickType }: SchemaDocProps): JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React, { ChangeEventHandler } from 'react';
|
|
8
|
+
declare type OnSearchFn = (value: string) => void;
|
|
9
|
+
declare type SearchBoxProps = {
|
|
10
|
+
value?: string;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
onSearch: OnSearchFn;
|
|
13
|
+
};
|
|
14
|
+
declare type SearchBoxState = {
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
17
|
+
export default class SearchBox extends React.Component<SearchBoxProps, SearchBoxState> {
|
|
18
|
+
debouncedOnSearch: OnSearchFn;
|
|
19
|
+
constructor(props: SearchBoxProps);
|
|
20
|
+
render(): JSX.Element;
|
|
21
|
+
handleChange: ChangeEventHandler<HTMLInputElement>;
|
|
22
|
+
handleClear: () => void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { GraphQLSchema, GraphQLNamedType } from 'graphql';
|
|
9
|
+
import { OnClickFieldFunction, OnClickTypeFunction } from './types';
|
|
10
|
+
declare type SearchResultsProps = {
|
|
11
|
+
schema: GraphQLSchema;
|
|
12
|
+
withinType?: GraphQLNamedType;
|
|
13
|
+
searchValue: string;
|
|
14
|
+
onClickType: OnClickTypeFunction;
|
|
15
|
+
onClickField: OnClickFieldFunction;
|
|
16
|
+
};
|
|
17
|
+
export default class SearchResults extends React.Component<SearchResultsProps, {}> {
|
|
18
|
+
shouldComponentUpdate(nextProps: SearchResultsProps): boolean;
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { GraphQLSchema, GraphQLType } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction, OnClickFieldFunction } from './types';
|
|
10
|
+
declare type TypeDocProps = {
|
|
11
|
+
schema: GraphQLSchema;
|
|
12
|
+
type: GraphQLType;
|
|
13
|
+
onClickType: OnClickTypeFunction;
|
|
14
|
+
onClickField: OnClickFieldFunction;
|
|
15
|
+
};
|
|
16
|
+
declare type TypeDocState = {
|
|
17
|
+
showDeprecated: boolean;
|
|
18
|
+
};
|
|
19
|
+
export default class TypeDoc extends React.Component<TypeDocProps, TypeDocState> {
|
|
20
|
+
constructor(props: TypeDocProps);
|
|
21
|
+
shouldComponentUpdate(nextProps: TypeDocProps, nextState: TypeDocState): boolean;
|
|
22
|
+
render(): JSX.Element;
|
|
23
|
+
handleShowDeprecated: () => void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import { GraphQLType } from 'graphql';
|
|
9
|
+
import { OnClickTypeFunction } from './types';
|
|
10
|
+
declare type Maybe<T> = T | null | undefined;
|
|
11
|
+
declare type TypeLinkProps = {
|
|
12
|
+
type?: Maybe<GraphQLType>;
|
|
13
|
+
onClick?: OnClickTypeFunction;
|
|
14
|
+
};
|
|
15
|
+
export default function TypeLink(props: TypeLinkProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { GraphQLField, GraphQLInputField, GraphQLArgument, GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLType, GraphQLNamedType } from 'graphql';
|
|
3
|
+
export declare type FieldType = GraphQLField<{}, {}, {}> | GraphQLInputField | GraphQLArgument;
|
|
4
|
+
export declare type OnClickFieldFunction = (field: FieldType, type?: GraphQLObjectType | GraphQLInterfaceType | GraphQLInputObjectType | GraphQLType, event?: MouseEvent) => void;
|
|
5
|
+
export declare type OnClickTypeFunction = (type: GraphQLNamedType, event?: MouseEvent<HTMLAnchorElement>) => void;
|
|
6
|
+
export declare type OnClickFieldOrTypeFunction = OnClickFieldFunction | OnClickTypeFunction;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React, { ReactNode } from 'react';
|
|
8
|
+
import { GraphQLSchema, GraphQLNamedType, GraphQLError } from 'graphql';
|
|
9
|
+
import { FieldType } from './DocExplorer/types';
|
|
10
|
+
declare type NavStackItem = {
|
|
11
|
+
name: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
search?: string;
|
|
14
|
+
def?: GraphQLNamedType | FieldType;
|
|
15
|
+
};
|
|
16
|
+
declare type DocExplorerProps = {
|
|
17
|
+
schema?: GraphQLSchema | null;
|
|
18
|
+
schemaErrors?: readonly GraphQLError[];
|
|
19
|
+
children?: ReactNode | null;
|
|
20
|
+
};
|
|
21
|
+
declare type DocExplorerState = {
|
|
22
|
+
navStack: NavStackItem[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* DocExplorer
|
|
26
|
+
*
|
|
27
|
+
* Shows documentations for GraphQL definitions from the schema.
|
|
28
|
+
*
|
|
29
|
+
* Props:
|
|
30
|
+
*
|
|
31
|
+
* - schema: A required GraphQLSchema instance that provides GraphQL document
|
|
32
|
+
* definitions.
|
|
33
|
+
*
|
|
34
|
+
* Children:
|
|
35
|
+
*
|
|
36
|
+
* - Any provided children will be positioned in the right-hand-side of the
|
|
37
|
+
* top bar. Typically this will be a "close" button for temporary explorer.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare class DocExplorer extends React.Component<DocExplorerProps, DocExplorerState> {
|
|
41
|
+
constructor(props: DocExplorerProps);
|
|
42
|
+
shouldComponentUpdate(nextProps: DocExplorerProps, nextState: DocExplorerState): boolean;
|
|
43
|
+
render(): JSX.Element;
|
|
44
|
+
showDoc(typeOrField: GraphQLNamedType | FieldType): void;
|
|
45
|
+
showDocForReference(reference: any): void;
|
|
46
|
+
showSearch(search: string): void;
|
|
47
|
+
reset(): void;
|
|
48
|
+
handleNavBackClick: () => void;
|
|
49
|
+
handleClickType: (type: GraphQLNamedType) => void;
|
|
50
|
+
handleClickField: (field: FieldType) => void;
|
|
51
|
+
handleSearch: (value: string) => void;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from"react";import{GraphQLNonNull as t,GraphQLList as a,astFromValue as n,print as r,GraphQLUnionType as o,GraphQLInterfaceType as c,GraphQLObjectType as i,GraphQLEnumType as l,isType as s}from"graphql";import d from"markdown-it";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},p(e,t)};function m(e,t){function a(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var h=function(){return h=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},h.apply(this,arguments)};function u(e){var t=e.onClick?e.onClick:function(){return null};return g(e.type,t)}function g(n,r){return n instanceof t?e.createElement("span",null,g(n.ofType,r),"!"):n instanceof a?e.createElement("span",null,"[",g(n.ofType,r),"]"):e.createElement("a",{className:"type-name",onClick:function(e){e.preventDefault(),r(n,e)},href:"#"},null==n?void 0:n.name)}function f(t){var a,o=t.field;return"defaultValue"in o&&void 0!==o.defaultValue?e.createElement("span",null," = ",e.createElement("span",{className:"arg-default-value"},(a=n(o.defaultValue,o.type))?r(a):"")):null}function y(t){var a=t.arg,n=t.onClickType,r=t.showDefaultValue;return e.createElement("span",{className:"arg"},e.createElement("span",{className:"arg-name"},a.name),": ",e.createElement(u,{type:a.type,onClick:n}),!1!==r&&e.createElement(f,{field:a}))}function v(t){var a=t.directive;return e.createElement("span",{className:"doc-category-item",id:a.name.value},"@",a.name.value)}var k=new d({linkify:!0});function x(t){var a=t.markdown,n=t.className;return a?e.createElement("div",{className:n,dangerouslySetInnerHTML:{__html:k.render(a)}}):e.createElement("div",null)}function E(t){var a,n,r,o=t.field,c=t.onClickType,i=e.useState(!1),l=i[0],s=i[1];if(o&&"args"in o&&o.args.length>0){a=e.createElement("div",{id:"doc-args",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"arguments"),o.args.filter((function(e){return!e.deprecationReason})).map((function(t){return e.createElement("div",{key:t.name,className:"doc-category-item"},e.createElement("div",null,e.createElement(y,{arg:t,onClickType:c})),e.createElement(x,{className:"doc-value-description",markdown:t.description}),t&&"deprecationReason"in t&&e.createElement(x,{className:"doc-deprecation",markdown:null==t?void 0:t.deprecationReason}))})));var d=o.args.filter((function(e){return Boolean(e.deprecationReason)}));d.length>0&&(n=e.createElement("div",{id:"doc-deprecated-args",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"deprecated arguments"),l?d.map((function(t,a){return e.createElement("div",{key:a},e.createElement("div",null,e.createElement(y,{arg:t,onClickType:c})),e.createElement(x,{className:"doc-value-description",markdown:t.description}),t&&"deprecationReason"in t&&e.createElement(x,{className:"doc-deprecation",markdown:null==t?void 0:t.deprecationReason}))})):e.createElement("button",{className:"show-btn",onClick:function(){return s(!l)}},"Show deprecated arguments...")))}return o&&o.astNode&&o.astNode.directives&&o.astNode.directives.length>0&&(r=e.createElement("div",{id:"doc-directives",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"directives"),o.astNode.directives.map((function(t){return e.createElement("div",{key:t.name.value,className:"doc-category-item"},e.createElement("div",null,e.createElement(v,{directive:t})))})))),e.createElement("div",null,e.createElement(x,{className:"doc-type-description",markdown:(null==o?void 0:o.description)||"No Description"}),o&&"deprecationReason"in o&&e.createElement(x,{className:"doc-deprecation",markdown:null==o?void 0:o.deprecationReason}),e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"type"),e.createElement(u,{type:null==o?void 0:o.type,onClick:c})),a,r,n)}function b(t){var a=t.schema,n=t.onClickType,r=a.getQueryType(),o=a.getMutationType&&a.getMutationType(),c=a.getSubscriptionType&&a.getSubscriptionType();return e.createElement("div",null,e.createElement(x,{className:"doc-type-description",markdown:a.description||"A GraphQL schema provides a root type for each kind of operation."}),e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"root types"),e.createElement("div",{className:"doc-category-item"},e.createElement("span",{className:"keyword"},"query"),": ",e.createElement(u,{type:r,onClick:n})),o&&e.createElement("div",{className:"doc-category-item"},e.createElement("span",{className:"keyword"},"mutation"),": ",e.createElement(u,{type:o,onClick:n})),c&&e.createElement("div",{className:"doc-category-item"},e.createElement("span",{className:"keyword"},"subscription"),": ",e.createElement(u,{type:c,onClick:n}))))}var w=function(t){function a(e){var a,n,r,o=t.call(this,e)||this;return o.handleChange=function(e){var t=e.currentTarget.value;o.setState({value:t}),o.debouncedOnSearch(t)},o.handleClear=function(){o.setState({value:""}),o.props.onSearch("")},o.state={value:e.value||""},o.debouncedOnSearch=(a=200,n=o.props.onSearch,function(){for(var e=this,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];r&&window.clearTimeout(r),r=window.setTimeout((function(){r=null,n.apply(e,t)}),a)}),o}return m(a,t),a.prototype.render=function(){return e.createElement("label",{className:"search-box"},e.createElement("div",{className:"search-box-icon","aria-hidden":"true"},"⚲"),e.createElement("input",{value:this.state.value,onChange:this.handleChange,type:"text",placeholder:this.props.placeholder,"aria-label":this.props.placeholder}),this.state.value&&e.createElement("button",{className:"search-box-clear",onClick:this.handleClear,"aria-label":"Clear search input"},"✕"))},a}(e.Component),N=function(t){function a(){return null!==t&&t.apply(this,arguments)||this}return m(a,t),a.prototype.shouldComponentUpdate=function(e){return this.props.schema!==e.schema||this.props.searchValue!==e.searchValue},a.prototype.render=function(){var t=this.props.searchValue,a=this.props.withinType,n=this.props.schema,r=this.props.onClickType,o=this.props.onClickField,c=[],i=[],l=[],s=n.getTypeMap(),d=Object.keys(s);a&&(d=d.filter((function(e){return e!==a.name}))).unshift(a.name);for(var p=function(n){if(c.length+i.length+l.length>=100)return"break";var d=s[n];if(a!==d&&C(n,t)&&i.push(e.createElement("div",{className:"doc-category-item",key:n},e.createElement(u,{type:d,onClick:r}))),d&&"getFields"in d){var p=d.getFields();Object.keys(p).forEach((function(i){var s,m=p[i];if(!C(i,t)){if(!("args"in m)||!m.args.length)return;if(0===(s=m.args.filter((function(e){return C(e.name,t)}))).length)return}var h=e.createElement("div",{className:"doc-category-item",key:n+"."+i},a!==d&&[e.createElement(u,{key:"type",type:d,onClick:r}),"."],e.createElement("a",{className:"field-name",onClick:function(e){return o(m,d,e)}},m.name),s&&["(",e.createElement("span",{key:"args"},s.map((function(t){return e.createElement(y,{key:t.name,arg:t,onClickType:r,showDefaultValue:!1})}))),")"]);a===d?c.push(h):l.push(h)}))}},m=0,h=d;m<h.length;m++){if("break"===p(h[m]))break}return c.length+i.length+l.length===0?e.createElement("span",{className:"doc-alert-text"},"No results found."):a&&i.length+l.length>0?e.createElement("div",null,c,e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"other results"),i,l)):e.createElement("div",{className:"doc-search-items"},c,i,l)},a}(e.Component);function C(e,t){try{var a=t.replace(/[^_0-9A-Za-z]/g,(function(e){return"\\"+e}));return-1!==e.search(new RegExp(a,"i"))}catch(a){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}}var q=function(t){function a(e){var a=t.call(this,e)||this;return a.handleShowDeprecated=function(){return a.setState({showDeprecated:!0})},a.state={showDeprecated:!1},a}return m(a,t),a.prototype.shouldComponentUpdate=function(e,t){return this.props.type!==e.type||this.props.schema!==e.schema||this.state.showDeprecated!==t.showDeprecated},a.prototype.render=function(){var t,a,n,r,s,d=this.props.schema,p=this.props.type,m=this.props.onClickType,h=this.props.onClickField,g=null,f=[];if(p instanceof o?(g="possible types",f=d.getPossibleTypes(p)):p instanceof c?(g="implementations",f=d.getPossibleTypes(p)):p instanceof i&&(g="implements",f=p.getInterfaces()),f&&f.length>0&&(t=e.createElement("div",{id:"doc-types",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},g),f.map((function(t){return e.createElement("div",{key:t.name,className:"doc-category-item"},e.createElement(u,{type:t,onClick:m}))})))),p&&"getFields"in p){var y=p.getFields(),v=Object.keys(y).map((function(e){return y[e]}));a=e.createElement("div",{id:"doc-fields",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"fields"),v.filter((function(e){return!e.deprecationReason})).map((function(t){return e.createElement(S,{key:t.name,type:p,field:t,onClickType:m,onClickField:h})})));var k=v.filter((function(e){return Boolean(e.deprecationReason)}));k.length>0&&(n=e.createElement("div",{id:"doc-deprecated-fields",className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"deprecated fields"),this.state.showDeprecated?k.map((function(t){return e.createElement(S,{key:t.name,type:p,field:t,onClickType:m,onClickField:h})})):e.createElement("button",{className:"show-btn",onClick:this.handleShowDeprecated},"Show deprecated fields...")))}if(p instanceof l){var E=p.getValues();r=e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"values"),E.filter((function(e){return Boolean(!e.deprecationReason)})).map((function(t){return e.createElement(T,{key:t.name,value:t})})));var b=E.filter((function(e){return Boolean(e.deprecationReason)}));b.length>0&&(s=e.createElement("div",{className:"doc-category"},e.createElement("div",{className:"doc-category-title"},"deprecated values"),this.state.showDeprecated?b.map((function(t){return e.createElement(T,{key:t.name,value:t})})):e.createElement("button",{className:"show-btn",onClick:this.handleShowDeprecated},"Show deprecated values...")))}return e.createElement("div",null,e.createElement(x,{className:"doc-type-description",markdown:"description"in p&&p.description||"No Description"}),p instanceof i&&t,a,n,r,s,!(p instanceof i)&&t)},a}(e.Component);function S(t){var a=t.type,n=t.field,r=t.onClickType,o=t.onClickField;return e.createElement("div",{className:"doc-category-item"},e.createElement("a",{className:"field-name",onClick:function(e){return o(n,a,e)}},n.name),"args"in n&&n.args&&n.args.length>0&&["(",e.createElement("span",{key:"args"},n.args.filter((function(e){return!e.deprecationReason})).map((function(t){return e.createElement(y,{key:t.name,arg:t,onClickType:r})}))),")"],": ",e.createElement(u,{type:n.type,onClick:r}),e.createElement(f,{field:n}),n.description&&e.createElement(x,{className:"field-short-description",markdown:n.description}),"deprecationReason"in n&&n.deprecationReason&&e.createElement(x,{className:"doc-deprecation",markdown:n.deprecationReason}))}function T(t){var a=t.value;return e.createElement("div",{className:"doc-category-item"},e.createElement("div",{className:"enum-value"},a.name),e.createElement(x,{className:"doc-value-description",markdown:a.description}),a.deprecationReason&&e.createElement(x,{className:"doc-deprecation",markdown:a.deprecationReason}))}var D={name:"Schema",title:"Documentation Explorer"},R=function(t){function a(e){var a=t.call(this,e)||this;return a.handleNavBackClick=function(){a.state.navStack.length>1&&a.setState({navStack:a.state.navStack.slice(0,-1)})},a.handleClickType=function(e){a.showDoc(e)},a.handleClickField=function(e){a.showDoc(e)},a.handleSearch=function(e){a.showSearch(e)},a.state={navStack:[D]},a}return m(a,t),a.prototype.shouldComponentUpdate=function(e,t){return this.props.schema!==e.schema||this.state.navStack!==t.navStack||this.props.schemaErrors!==e.schemaErrors},a.prototype.render=function(){var t,a=this.props,n=a.schema,r=a.schemaErrors,o=this.state.navStack,c=o[o.length-1];t=r?e.createElement("div",{className:"error-container"},"Error fetching schema"):void 0===n?e.createElement("div",{className:"spinner-container"},e.createElement("div",{className:"spinner"})):n?c.search?e.createElement(N,{searchValue:c.search,withinType:c.def,schema:n,onClickType:this.handleClickType,onClickField:this.handleClickField}):1===o.length?e.createElement(b,{schema:n,onClickType:this.handleClickType}):s(c.def)?e.createElement(q,{schema:n,type:c.def,onClickType:this.handleClickType,onClickField:this.handleClickField}):e.createElement(E,{field:c.def,onClickType:this.handleClickType}):e.createElement("div",{className:"error-container"},"No Schema Available");var i,l=1===o.length||s(c.def)&&"getFields"in c.def;return o.length>1&&(i=o[o.length-2].name),e.createElement("div",{className:"graphql-docs-container"},e.createElement("section",{className:"doc-explorer",key:c.name,"aria-label":"Documentation Explorer"},e.createElement("div",{className:"doc-explorer-title-bar"},i&&e.createElement("button",{className:"doc-explorer-back",onClick:this.handleNavBackClick,"aria-label":"Go back to ".concat(i)},i),e.createElement("div",{className:"doc-explorer-title"},c.title||c.name),e.createElement("div",{className:"doc-explorer-rhs"},this.props.children)),e.createElement("div",{className:"doc-explorer-contents"},l&&e.createElement(w,{value:c.search,placeholder:"Search ".concat(c.name,"..."),onSearch:this.handleSearch}),t)))},a.prototype.showDoc=function(e){var t=this.state.navStack;t[t.length-1].def!==e&&this.setState({navStack:t.concat([{name:e.name,def:e}])})},a.prototype.showDocForReference=function(e){e&&"Type"===e.kind?this.showDoc(e.type):"Field"===e.kind||"Argument"===e.kind&&e.field?this.showDoc(e.field):"EnumValue"===e.kind&&e.type&&this.showDoc(e.type)},a.prototype.showSearch=function(e){var t=this.state.navStack.slice(),a=t[t.length-1];t[t.length-1]=h(h({},a),{search:e}),this.setState({navStack:t})},a.prototype.reset=function(){this.setState({navStack:[D]})},a}(e.Component);!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('.graphql-docs-container .doc-explorer{background:#fff}.graphql-docs-container .doc-explorer-title-bar,.graphql-docs-container .history-title-bar{cursor:default;display:flex;line-height:14px;padding:8px 8px 5px;position:relative;user-select:none}.graphql-docs-container .doc-explorer-title,.graphql-docs-container .history-title{flex:1;font-weight:700;overflow-x:hidden;padding:10px 0 10px 10px;text-align:center;text-overflow:ellipsis;user-select:text;white-space:nowrap}.graphql-docs-container .doc-explorer-back{background:0;border:0;color:#3b5998;cursor:pointer;line-height:14px;margin:-7px 0 -6px -8px;overflow-x:hidden;padding:17px 12px 16px 16px;text-overflow:ellipsis;white-space:nowrap}.doc-explorer-narrow .doc-explorer-back{width:0}.graphql-docs-container .doc-explorer-back:before{border-left:2px solid #3b5998;border-top:2px solid #3b5998;content:"";display:inline-block;height:9px;margin:0 3px -1px 0;position:relative;transform:rotate(-45deg);width:9px}.graphql-docs-container .doc-explorer-rhs{position:relative}.graphql-docs-container .doc-explorer-contents,.graphql-docs-container .history-contents{background-color:#fff;border-top:1px solid #d6d6d6;bottom:0;left:0;overflow-y:auto;padding:20px 15px;position:absolute;right:0;top:47px}.graphql-docs-container .doc-explorer-contents{min-width:300px}.graphql-docs-container .doc-type-description blockquote:first-child,.graphql-docs-container .doc-type-description p:first-child{margin-top:0}.graphql-docs-container .doc-explorer-contents a{cursor:pointer;text-decoration:none}.graphql-docs-container .doc-explorer-contents a:hover{text-decoration:underline}.graphql-docs-container .doc-value-description>:first-child{margin-top:4px}.graphql-docs-container .doc-value-description>:last-child{margin-bottom:4px}.graphql-docs-container .doc-category code,.graphql-docs-container .doc-category pre,.graphql-docs-container .doc-type-description code,.graphql-docs-container .doc-type-description pre{--saf-0:rgba(var(--sk_foreground_low,29,28,29),0.13);word-wrap:break-word;font-size:12px;font-variant-ligatures:none;line-height:1.50001;-webkit-tab-size:4;-moz-tab-size:4;tab-size:4;white-space:pre;white-space:pre-wrap;word-break:normal}.graphql-docs-container .doc-category code,.graphql-docs-container .doc-type-description code{background-color:rgba(var(--sk_foreground_min,29,28,29),.04);background-color:#fff;border:1px solid var(--saf-0);border-radius:3px;color:#e01e5a;padding:2px 3px 1px}.graphql-docs-container .doc-category{margin:20px 0}.graphql-docs-container .doc-category-title{border-bottom:1px solid #e0e0e0;color:#777;cursor:default;font-size:14px;font-variant:small-caps;font-weight:700;letter-spacing:1px;margin:0 -15px 10px 0;padding:10px 0;user-select:none}.graphql-docs-container .doc-category-item{color:#555;margin:12px 0}.graphql-docs-container .keyword{color:#b11a04}.graphql-docs-container .type-name{color:#ca9800}.graphql-docs-container .field-name{color:#1f61a0}.graphql-docs-container .field-short-description{color:#666;margin-left:5px;overflow:hidden;text-overflow:ellipsis}.graphql-docs-container .enum-value{color:#0b7fc7}.graphql-docs-container .arg-name{color:#8b2bb9}.graphql-docs-container .arg{display:block;margin-left:1em}.graphql-docs-container .arg:first-child:last-child,.graphql-docs-container .arg:first-child:nth-last-child(2),.graphql-docs-container .arg:first-child:nth-last-child(2)~.arg{display:inherit;margin:inherit}.graphql-docs-container .arg:first-child:nth-last-child(2):after{content:", "}.graphql-docs-container .arg-default-value{color:#43a047}.graphql-docs-container .doc-deprecation{background:#fffae8;border-radius:3px;box-shadow:inset 0 0 1px #bfb063;color:#867f70;line-height:16px;margin:8px -8px;max-height:80px;overflow:hidden;padding:8px}.graphql-docs-container .doc-deprecation:before{color:#c79b2e;content:"Deprecated:";cursor:default;display:block;font-size:9px;font-weight:700;letter-spacing:1px;line-height:1;padding-bottom:5px;text-transform:uppercase;user-select:none}.graphql-docs-container .doc-deprecation>:first-child{margin-top:0}.graphql-docs-container .doc-deprecation>:last-child{margin-bottom:0}.graphql-docs-container .show-btn{-webkit-appearance:initial;background:#fbfcfc;border:1px solid #ccc;border-radius:3px;box-sizing:border-box;color:#555;cursor:pointer;display:block;padding:8px 12px 10px;text-align:center;width:100%}.graphql-docs-container .search-box{align-items:center;border-bottom:1px solid #d3d6db;display:flex;font-size:14px;margin:-15px -15px 12px 0;position:relative}.graphql-docs-container .search-box-icon{cursor:pointer;display:block;font-size:24px;transform:rotate(-45deg);user-select:none}.graphql-docs-container .search-box .search-box-clear{background-color:#d0d0d0;border:0;border-radius:12px;color:#fff;cursor:pointer;font-size:11px;padding:1px 5px 2px;position:absolute;right:3px;user-select:none}.graphql-docs-container .search-box .search-box-clear:hover{background-color:#b9b9b9}.graphql-docs-container .search-box>input{border:none;box-sizing:border-box;font-size:14px;outline:none;padding:6px 24px 8px 20px;width:100%}.graphql-docs-container .error-container{font-weight:700;left:0;letter-spacing:1px;opacity:.5;position:absolute;right:0;text-align:center;text-transform:uppercase;top:50%;transform:translateY(-50%)}');export{R as DocExplorer};
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../src/components/DocExplorer/TypeLink.tsx","../../src/components/DocExplorer/DefaultValue.tsx","../../src/components/DocExplorer/Argument.tsx","../../src/components/DocExplorer/Directive.tsx","../../src/components/DocExplorer/MarkdownContent.tsx","../../src/components/DocExplorer/FieldDoc.tsx","../../src/components/DocExplorer/SchemaDoc.tsx","../../src/components/DocExplorer/SearchBox.tsx","../../src/utility/debounce.ts","../../src/components/DocExplorer/SearchResults.tsx","../../src/components/DocExplorer/TypeDoc.tsx","../../src/components/DocExplorer.tsx","../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n",null,null,null,null,null,null,null,null,null,null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","TypeLink","props","onClick","renderType","type","GraphQLNonNull","React","createElement","ofType","GraphQLList","className","event","preventDefault","href","name","DefaultValue","_a","ast","field","undefined","defaultValue","astFromValue","print","Argument","arg","onClickType","showDefaultValue","Directive","directive","id","value","md","MD","linkify","MarkdownContent","markdown","dangerouslySetInnerHTML","__html","render","FieldDoc","argsDef","deprecatedArgsDef","directivesDef","_b","useState","showDeprecated","handleShowDeprecated","args","filter","deprecationReason","map","key","description","deprecatedArgs","Boolean","astNode","directives","SchemaDoc","schema","queryType","getQueryType","mutationType","getMutationType","subscriptionType","getSubscriptionType","SearchBox","_super","duration","fn","timeout","_this","handleChange","currentTarget","setState","debouncedOnSearch","handleClear","onSearch","state","_i","window","clearTimeout","setTimeout","onChange","placeholder","Component","SearchResults","shouldComponentUpdate","nextProps","searchValue","withinType","onClickField","matchedWithin","matchedTypes","matchedFields","typeMap","getTypeMap","typeNames","keys","unshift","typeName","isMatch","push","fields_1","getFields","forEach","fieldName","matchingArgs","match","typeNames_1","sourceText","escaped","replace","ch","search","RegExp","e","toLowerCase","indexOf","TypeDoc","nextState","typesDef","fieldsDef","deprecatedFieldsDef","valuesDef","deprecatedValuesDef","typesTitle","types","GraphQLUnionType","getPossibleTypes","GraphQLInterfaceType","GraphQLObjectType","getInterfaces","subtype","fieldMap_1","fields","Field","deprecatedFields","GraphQLEnumType","values","getValues","EnumValue","deprecatedValues","initialNav","title","DocExplorer","handleNavBackClick","navStack","slice","handleClickType","showDoc","handleClickField","handleSearch","showSearch","schemaErrors","content","navItem","def","isType","prevName","shouldSearchBoxAppear","concat","children","typeOrField","showDocForReference","reference","kind","topNav","reset","css","ref","insertAt","document","head","getElementsByTagName","style","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode"],"mappings":";;;;;;;;;;;;;;gFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAE,GACzE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,KAClEP,EAAcC,EAAGC,EAC5B,EAEO,SAASO,EAAUR,EAAGC,GAEzB,SAAS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AAEyE,SAAQA,KAG1BF,EAAA5J,UAAAmL,MAAA,WACErL,KAAKuF,SAAS,CAAEyE,SAAU,CAACJ,MAoB9BE,CAAD,CAjLA,CAAiC1I,EAAM8E,YCvDvC,SAAqBoF,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASpK,cAAc,SACnCuK,EAAM1K,KAAO,WAEI,QAAbsK,GACEE,EAAKG,WACPH,EAAKI,aAAaF,EAAOF,EAAKG,YAKhCH,EAAKK,YAAYH,GAGfA,EAAMI,WACRJ,EAAMI,WAAWC,QAAUX,EAE3BM,EAAMG,YAAYN,SAASS,eAAeZ,GAnBY,CAqB1D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Provided a duration and a function, returns a new function which is called
|
|
9
|
+
* `duration` milliseconds after the last call.
|
|
10
|
+
*/
|
|
11
|
+
export default function debounce<F extends (...args: any[]) => any>(duration: number, fn: F): (this: any, ...args: Parameters<F>) => void;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { GraphQLField, GraphQLInputField, GraphQLArgument, GraphQLNamedType, GraphQLSchema, GraphQLError } from 'graphql';
|
|
3
|
+
|
|
4
|
+
declare type FieldType = GraphQLField<{}, {}, {}> | GraphQLInputField | GraphQLArgument;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Copyright (c) 2021 GraphQL Contributors.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare type NavStackItem = {
|
|
14
|
+
name: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
search?: string;
|
|
17
|
+
def?: GraphQLNamedType | FieldType;
|
|
18
|
+
};
|
|
19
|
+
declare type DocExplorerProps = {
|
|
20
|
+
schema?: GraphQLSchema | null;
|
|
21
|
+
schemaErrors?: readonly GraphQLError[];
|
|
22
|
+
children?: ReactNode | null;
|
|
23
|
+
};
|
|
24
|
+
declare type DocExplorerState = {
|
|
25
|
+
navStack: NavStackItem[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* DocExplorer
|
|
29
|
+
*
|
|
30
|
+
* Shows documentations for GraphQL definitions from the schema.
|
|
31
|
+
*
|
|
32
|
+
* Props:
|
|
33
|
+
*
|
|
34
|
+
* - schema: A required GraphQLSchema instance that provides GraphQL document
|
|
35
|
+
* definitions.
|
|
36
|
+
*
|
|
37
|
+
* Children:
|
|
38
|
+
*
|
|
39
|
+
* - Any provided children will be positioned in the right-hand-side of the
|
|
40
|
+
* top bar. Typically this will be a "close" button for temporary explorer.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
declare class DocExplorer extends React.Component<DocExplorerProps, DocExplorerState> {
|
|
44
|
+
constructor(props: DocExplorerProps);
|
|
45
|
+
shouldComponentUpdate(nextProps: DocExplorerProps, nextState: DocExplorerState): boolean;
|
|
46
|
+
render(): JSX.Element;
|
|
47
|
+
showDoc(typeOrField: GraphQLNamedType | FieldType): void;
|
|
48
|
+
showDocForReference(reference: any): void;
|
|
49
|
+
showSearch(search: string): void;
|
|
50
|
+
reset(): void;
|
|
51
|
+
handleNavBackClick: () => void;
|
|
52
|
+
handleClickType: (type: GraphQLNamedType) => void;
|
|
53
|
+
handleClickField: (field: FieldType) => void;
|
|
54
|
+
handleSearch: (value: string) => void;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { DocExplorer };
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usebruno/graphql-docs",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "dist/cjs/index.js",
|
|
5
|
+
"module": "dist/esm/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"package.json"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "rollup -c"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rollup/plugin-commonjs": "^23.0.2",
|
|
15
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
16
|
+
"@rollup/plugin-typescript": "^9.0.2",
|
|
17
|
+
"@types/markdown-it": "^12.2.3",
|
|
18
|
+
"@types/react": "^18.0.25",
|
|
19
|
+
"graphql": "^16.6.0",
|
|
20
|
+
"markdown-it": "^13.0.1",
|
|
21
|
+
"postcss": "^8.4.18",
|
|
22
|
+
"react": "^17.0.2",
|
|
23
|
+
"react-dom": "^17.0.2",
|
|
24
|
+
"rollup": "3.2.5",
|
|
25
|
+
"rollup-plugin-dts": "^5.0.0",
|
|
26
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
27
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
28
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
29
|
+
"typescript": "^4.8.4"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"graphql": "^16.6.0",
|
|
33
|
+
"markdown-it": "^13.0.1",
|
|
34
|
+
"react": "^17.0.2"
|
|
35
|
+
},
|
|
36
|
+
"overrides": {
|
|
37
|
+
"rollup": "3.2.5"
|
|
38
|
+
}
|
|
39
|
+
}
|