* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import classNames from 'classnames';
-import PageLink from './PageLink';
+import * as React from 'react';
+import { MarkdownRemark } from '../@types/graphql-types';
import ChevronDownIcon from './icons/ChevronDownIcon';
import ChevronUpIcon from './icons/ChevronUpIcon';
-import { MarkdownRemark } from '../@types/graphql-types';
+import PageLink from './PageLink';
interface Props {
children: (MarkdownRemark | JSX.Element)[];
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as PropTypes from 'prop-types';
+import * as React from 'react';
import { MarkdownHeading } from '../@types/graphql-types';
interface Props {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import * as PropTypes from 'prop-types';
+import * as React from 'react';
import { MarkdownHeading } from '../@types/graphql-types';
interface Props {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import classNames from 'classnames';
+import * as React from 'react';
interface Props {
active: boolean;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import HeadingAnchor from './HeadingAnchor';
import { MarkdownHeading } from '../@types/graphql-types';
+import HeadingAnchor from './HeadingAnchor';
const MINIMUM_TOP_MARGIN = 80;
const HEADER_SCROLL_MARGIN = 100;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import classNames from 'classnames';
import { Link } from 'gatsby';
-import { getMarkdownRemarkTitle, getMarkdownRemarkUrl } from './utils';
+import * as React from 'react';
import { MarkdownRemark } from '../@types/graphql-types';
+import { getMarkdownRemarkTitle, getMarkdownRemarkUrl } from './utils';
interface Props {
className?: string;
*/
import * as React from 'react';
import { createPortal } from 'react-dom';
+import { Dict, PluginMetaDataInfo } from '../@types/types';
import PluginVersionMetaData from './PluginVersionMetaData';
import { getPluginMetaData } from './utils';
-import { Dict, PluginMetaDataInfo } from '../@types/types';
interface Props {
location: Pick<Location, 'pathname'>;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import classNames from 'classnames';
+import * as React from 'react';
import { PluginVersionInfo } from '../@types/types';
interface Props {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
-import lunr, { LunrIndex, LunrBuilder, LunrToken, LunrMatch } from 'lunr';
import { sortBy } from 'lodash';
-import ClearIcon from './icons/ClearIcon';
-import { getUrlsList } from './navTreeUtils';
-import { getMarkdownRemarkUrl, getMarkdownRemarkTitle, isDefined } from './utils';
+import lunr, { LunrBuilder, LunrIndex, LunrMatch, LunrToken } from 'lunr';
+import * as React from 'react';
import { MarkdownRemark } from '../@types/graphql-types';
import { DocNavigationItem, SearchResult } from '../@types/types';
+import ClearIcon from './icons/ClearIcon';
+import { getUrlsList } from './navTreeUtils';
+import { getMarkdownRemarkTitle, getMarkdownRemarkUrl, isDefined } from './utils';
interface Props {
navigation: DocNavigationItem[];
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { Link } from 'gatsby';
-import { highlightMarks, cutWords } from './utils';
+import * as React from 'react';
import { SearchResult } from '../@types/types';
+import { cutWords, highlightMarks } from './utils';
interface ResultProps {
result: SearchResult;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { Link } from 'gatsby';
+import * as React from 'react';
+import { MarkdownRemark } from '../@types/graphql-types';
+import { DocNavigationItem, DocVersion, SearchResult } from '../@types/types';
import CategoryBlockLink from './CategoryBlockLink';
import ExternalLink from './ExternalLink';
-import PageLink from './PageLink';
-import Search from './Search';
-import SearchEntryResult from './SearchEntryResult';
-import VersionSelect from './VersionSelect';
import DownloadIcon from './icons/DownloadIcon';
import {
getNavTree,
+ getOpenChainFromPath,
isDocsNavigationBlock,
isDocsNavigationExternalLink,
- getOpenChainFromPath,
testPathAgainstUrl
} from './navTreeUtils';
-import { MarkdownRemark } from '../@types/graphql-types';
-import { SearchResult, DocVersion, DocNavigationItem } from '../@types/types';
+import PageLink from './PageLink';
+import Search from './Search';
+import SearchEntryResult from './SearchEntryResult';
+import VersionSelect from './VersionSelect';
interface Props {
location: Location;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { DocVersion } from '../@types/types';
import ChevronDownIcon from './icons/ChevronDownIcon';
import ChevronUpIcon from './icons/ChevronUpIcon';
import OutsideClickHandler from './OutsideClickHandler';
-import { DocVersion } from '../@types/types';
interface Props {
isOnCurrentVersion: boolean;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
-import CategoryBlockLink from '../CategoryBlockLink';
+import * as React from 'react';
import { MarkdownRemark } from '../../@types/graphql-types';
+import CategoryBlockLink from '../CategoryBlockLink';
it('should render correctly', () => {
expect(shallowRender({})).toMatchSnapshot();
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import ExternalLink from '../ExternalLink';
it('should render correctly', () => {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
-import PageLink from '../PageLink';
+import * as React from 'react';
import { MarkdownRemark } from '../../@types/graphql-types';
+import PageLink from '../PageLink';
const page = { frontmatter: { title: 'Foo', url: '/foo' } } as MarkdownRemark;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { mount } from 'enzyme';
+import * as React from 'react';
import PluginMetaData from '../PluginMetaData';
import { getPluginMetaData } from '../utils';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
import { shallow } from 'enzyme';
+import * as React from 'react';
import PluginVersionMetaData from '../PluginVersionMetaData';
it('should render correctly', () => {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import * as React from 'react';
-import { FetchMock } from 'jest-fetch-mock';
import { shallow } from 'enzyme';
-import Sidebar from '../Sidebar';
+import { FetchMock } from 'jest-fetch-mock';
+import * as React from 'react';
import { MarkdownRemark } from '../../@types/graphql-types';
+import Sidebar from '../Sidebar';
jest.mock('../navTreeUtils', () => {
return {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { getUrlsList, getOpenChainFromPath, testPathAgainstUrl } from '../navTreeUtils';
+import { getOpenChainFromPath, getUrlsList, testPathAgainstUrl } from '../navTreeUtils';
const navTree = [
'path/value',
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { flatten } from 'lodash';
+import NavigationTree from '../../static/StaticNavigationTree.json';
import {
DocNavigationItem,
DocsNavigationBlock,
DocsNavigationExternalLink
} from '../@types/types';
-import NavigationTree from '../../static/StaticNavigationTree.json';
export function getNavTree() {
return NavigationTree as DocNavigationItem[];
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { graphql, StaticQuery } from 'gatsby';
import * as React from 'react';
-import { StaticQuery, graphql } from 'gatsby';
+import { MarkdownRemark, MarkdownRemarkConnection } from '../@types/graphql-types';
import Footer from '../components/Footer';
import HeaderListProvider from '../components/HeaderListProvider';
import HeadingsLink from '../components/HeadingsLink';
import PluginMetaData from '../components/PluginMetaData';
import Sidebar from '../components/Sidebar';
-import { MarkdownRemarkConnection, MarkdownRemark } from '../@types/graphql-types';
import './layout.css';
const version = process.env.GATSBY_DOCS_VERSION || '1.0';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { graphql } from 'gatsby';
import * as React from 'react';
import Helmet from 'react-helmet';
-import { graphql } from 'gatsby';
+import { MarkdownHeading, MarkdownRemark, MarkdownRemarkConnection } from '../@types/graphql-types';
import HeaderList from '../components/HeaderList';
-import { MarkdownRemark, MarkdownRemarkConnection, MarkdownHeading } from '../@types/graphql-types';
interface Props {
data: {