aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@types/react-dom
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-03 15:35:00 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-03 15:35:00 +0200
commitde98e0b232509d5f40c135d540a70e415272ff85 (patch)
treea79222a5b58484ab3b80d18efcaaa7ccc4769b33 /node_modules/@types/react-dom
parente0c9d480a73fa629c1e4a47d3e721f1d2d345406 (diff)
downloadwallet-core-de98e0b232509d5f40c135d540a70e415272ff85.tar.xz
node_modules
Diffstat (limited to 'node_modules/@types/react-dom')
-rw-r--r--node_modules/@types/react-dom/LICENSE21
-rw-r--r--node_modules/@types/react-dom/README.md16
-rw-r--r--node_modules/@types/react-dom/index.d.ts67
-rw-r--r--node_modules/@types/react-dom/package.json36
-rw-r--r--node_modules/@types/react-dom/server/index.d.ts24
-rw-r--r--node_modules/@types/react-dom/test-utils/index.d.ts242
6 files changed, 406 insertions, 0 deletions
diff --git a/node_modules/@types/react-dom/LICENSE b/node_modules/@types/react-dom/LICENSE
new file mode 100644
index 000000000..21071075c
--- /dev/null
+++ b/node_modules/@types/react-dom/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/react-dom/README.md b/node_modules/@types/react-dom/README.md
new file mode 100644
index 000000000..25281a394
--- /dev/null
+++ b/node_modules/@types/react-dom/README.md
@@ -0,0 +1,16 @@
+# Installation
+> `npm install --save @types/react-dom`
+
+# Summary
+This package contains type definitions for React (react-dom) (http://facebook.github.io/react/).
+
+# Details
+Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom
+
+Additional Details
+ * Last updated: Tue, 18 Apr 2017 18:28:36 GMT
+ * Dependencies: react
+ * Global values: ReactDOM, ReactDOMServer
+
+# Credits
+These definitions were written by Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>, MartynasZilinskas <https://github.com/MartynasZilinskas>.
diff --git a/node_modules/@types/react-dom/index.d.ts b/node_modules/@types/react-dom/index.d.ts
new file mode 100644
index 000000000..6adb9da76
--- /dev/null
+++ b/node_modules/@types/react-dom/index.d.ts
@@ -0,0 +1,67 @@
+// Type definitions for React (react-dom) 15.5
+// Project: http://facebook.github.io/react/
+// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>, MartynasZilinskas <https://github.com/MartynasZilinskas>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.1
+
+export as namespace ReactDOM;
+
+import {
+ ReactInstance, Component, ComponentState,
+ ReactElement, SFCElement, CElement,
+ DOMAttributes, DOMElement
+} from 'react';
+
+export function findDOMNode<E extends Element>(instance: ReactInstance): E;
+export function findDOMNode(instance: ReactInstance): Element;
+
+export function render<P extends DOMAttributes<T>, T extends Element>(
+ element: DOMElement<P, T>,
+ container: Element | null,
+ callback?: (element: T) => any
+): T;
+export function render<P>(
+ element: SFCElement<P>,
+ container: Element | null,
+ callback?: () => any
+): void;
+export function render<P, T extends Component<P, ComponentState>>(
+ element: CElement<P, T>,
+ container: Element | null,
+ callback?: (component: T) => any
+): T;
+export function render<P>(
+ element: ReactElement<P>,
+ container: Element | null,
+ callback?: (component?: Component<P, ComponentState> | Element) => any
+): Component<P, ComponentState> | Element | void;
+export function render<P>(
+ parentComponent: Component<any, any>,
+ element: SFCElement<P>,
+ container: Element,
+ callback?: () => any
+): void;
+
+export function unmountComponentAtNode(container: Element): boolean;
+
+export const version: string;
+
+export function unstable_batchedUpdates<A, B>(callback: (a: A, b: B) => any, a: A, b: B): void;
+export function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void;
+export function unstable_batchedUpdates(callback: () => any): void;
+
+export function unstable_renderSubtreeIntoContainer<P extends DOMAttributes<T>, T extends Element>(
+ parentComponent: Component<any, any>,
+ element: DOMElement<P, T>,
+ container: Element,
+ callback?: (element: T) => any): T;
+export function unstable_renderSubtreeIntoContainer<P, T extends Component<P, ComponentState>>(
+ parentComponent: Component<any, any>,
+ element: CElement<P, T>,
+ container: Element,
+ callback?: (component: T) => any): T;
+export function unstable_renderSubtreeIntoContainer<P>(
+ parentComponent: Component<any, any>,
+ element: ReactElement<P>,
+ container: Element,
+ callback?: (component?: Component<P, ComponentState> | Element) => any): Component<P, ComponentState> | Element | void;
diff --git a/node_modules/@types/react-dom/package.json b/node_modules/@types/react-dom/package.json
new file mode 100644
index 000000000..9aa6cc83d
--- /dev/null
+++ b/node_modules/@types/react-dom/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "@types/react-dom",
+ "version": "15.5.0",
+ "description": "TypeScript definitions for React (react-dom)",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Asana",
+ "url": "https://asana.com"
+ },
+ {
+ "name": "AssureSign",
+ "url": "http://www.assuresign.com"
+ },
+ {
+ "name": "Microsoft",
+ "url": "https://microsoft.com"
+ },
+ {
+ "name": "MartynasZilinskas",
+ "url": "https://github.com/MartynasZilinskas"
+ }
+ ],
+ "main": "",
+ "repository": {
+ "type": "git",
+ "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/react": "*"
+ },
+ "peerDependencies": {},
+ "typesPublisherContentHash": "960702efe448701815f2c8563e30c357a80c23d541018709d74453db04adeb21",
+ "typeScriptVersion": "2.1"
+} \ No newline at end of file
diff --git a/node_modules/@types/react-dom/server/index.d.ts b/node_modules/@types/react-dom/server/index.d.ts
new file mode 100644
index 000000000..7d45ecbee
--- /dev/null
+++ b/node_modules/@types/react-dom/server/index.d.ts
@@ -0,0 +1,24 @@
+import { ReactElement } from 'react';
+
+/**
+ * Render a React element to its initial HTML. This should only be used on the server.
+ * React will return an HTML string. You can use this method to generate HTML on the server
+ * and send the markup down on the initial request for faster page loads and to allow search
+ * engines to crawl your pages for SEO purposes.
+ *
+ * If you call `ReactDOM.render()` on a node that already has this server-rendered markup,
+ * React will preserve it and only attach event handlers, allowing you
+ * to have a very performant first-load experience.
+ */
+export function renderToString(element: ReactElement<any>): string;
+
+/**
+ * Similar to `renderToString`, except this doesn't create extra DOM attributes
+ * such as `data-reactid`, that React uses internally. This is useful if you want
+ * to use React as a simple static page generator, as stripping away the extra
+ * attributes can save lots of bytes.
+ */
+export function renderToStaticMarkup(element: ReactElement<any>): string;
+export const version: string;
+
+export as namespace ReactDOMServer;
diff --git a/node_modules/@types/react-dom/test-utils/index.d.ts b/node_modules/@types/react-dom/test-utils/index.d.ts
new file mode 100644
index 000000000..3153b3dba
--- /dev/null
+++ b/node_modules/@types/react-dom/test-utils/index.d.ts
@@ -0,0 +1,242 @@
+import {
+ AbstractView, Component, ComponentClass,
+ ReactElement, ReactInstance, ClassType,
+ DOMElement, SFCElement, CElement,
+ ReactHTMLElement, DOMAttributes, SFC
+} from 'react';
+
+import * as ReactTestUtils from ".";
+
+export interface OptionalEventProperties {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ currentTarget?: EventTarget;
+ defaultPrevented?: boolean;
+ eventPhase?: number;
+ isTrusted?: boolean;
+ nativeEvent?: Event;
+ preventDefault?(): void;
+ stopPropagation?(): void;
+ target?: EventTarget;
+ timeStamp?: Date;
+ type?: string;
+}
+
+export interface SyntheticEventData extends OptionalEventProperties {
+ altKey?: boolean;
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ changedTouches?: TouchList;
+ charCode?: boolean;
+ clipboardData?: DataTransfer;
+ ctrlKey?: boolean;
+ deltaMode?: number;
+ deltaX?: number;
+ deltaY?: number;
+ deltaZ?: number;
+ detail?: number;
+ getModifierState?(key: string): boolean;
+ key?: string;
+ keyCode?: number;
+ locale?: string;
+ location?: number;
+ metaKey?: boolean;
+ pageX?: number;
+ pageY?: number;
+ relatedTarget?: EventTarget;
+ repeat?: boolean;
+ screenX?: number;
+ screenY?: number;
+ shiftKey?: boolean;
+ targetTouches?: TouchList;
+ touches?: TouchList;
+ view?: AbstractView;
+ which?: number;
+}
+
+export type EventSimulator = (element: Element | Component<any, any>, eventData?: SyntheticEventData) => void;
+
+export interface MockedComponentClass {
+ new (): any;
+}
+
+export interface ShallowRenderer {
+ /**
+ * After `shallowRenderer.render()` has been called, returns shallowly rendered output.
+ */
+ getRenderOutput<E extends ReactElement<any>>(): E;
+ /**
+ * After `shallowRenderer.render()` has been called, returns shallowly rendered output.
+ */
+ getRenderOutput(): ReactElement<any>;
+ /**
+ * Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep.
+ */
+ render(element: ReactElement<any>, context?: any): void;
+ unmount(): void;
+}
+
+/**
+ * Simulate an event dispatch on a DOM node with optional `eventData` event data.
+ * `Simulate` has a method for every event that React understands.
+ */
+export namespace Simulate {
+ const blur: EventSimulator;
+ const change: EventSimulator;
+ const click: EventSimulator;
+ const copy: EventSimulator;
+ const cut: EventSimulator;
+ const doubleClick: EventSimulator;
+ const drag: EventSimulator;
+ const dragEnd: EventSimulator;
+ const dragEnter: EventSimulator;
+ const dragExit: EventSimulator;
+ const dragLeave: EventSimulator;
+ const dragOver: EventSimulator;
+ const dragStart: EventSimulator;
+ const drop: EventSimulator;
+ const focus: EventSimulator;
+ const input: EventSimulator;
+ const keyDown: EventSimulator;
+ const keyPress: EventSimulator;
+ const keyUp: EventSimulator;
+ const mouseDown: EventSimulator;
+ const mouseEnter: EventSimulator;
+ const mouseLeave: EventSimulator;
+ const mouseMove: EventSimulator;
+ const mouseOut: EventSimulator;
+ const mouseOver: EventSimulator;
+ const mouseUp: EventSimulator;
+ const paste: EventSimulator;
+ const scroll: EventSimulator;
+ const submit: EventSimulator;
+ const touchCancel: EventSimulator;
+ const touchEnd: EventSimulator;
+ const touchMove: EventSimulator;
+ const touchStart: EventSimulator;
+ const wheel: EventSimulator;
+}
+
+/**
+ * Render a React element into a detached DOM node in the document. __This function requires a DOM__.
+ */
+export function renderIntoDocument<T extends Element>(
+ element: DOMElement<any, T>): T;
+export function renderIntoDocument(
+ element: SFCElement<any>): void;
+export function renderIntoDocument<T extends Component<any, any>>(
+ element: CElement<any, T>): T;
+export function renderIntoDocument<P>(
+ element: ReactElement<P>): Component<P, {}> | Element | void;
+
+/**
+ * Pass a mocked component module to this method to augment it with useful methods that allow it to
+ * be used as a dummy React component. Instead of rendering as usual, the component will become
+ * a simple `<div>` (or other tag if `mockTagName` is provided) containing any provided children.
+ */
+export function mockComponent(
+ mocked: MockedComponentClass, mockTagName?: string): typeof ReactTestUtils;
+
+/**
+ * Returns `true` if `element` is any React element.
+ */
+export function isElement(element: any): boolean;
+
+/**
+ * Returns `true` if `element` is a React element whose type is of a React `componentClass`.
+ */
+export function isElementOfType<T extends HTMLElement>(
+ element: ReactElement<any>, type: string): element is ReactHTMLElement<T>;
+/**
+ * Returns `true` if `element` is a React element whose type is of a React `componentClass`.
+ */
+export function isElementOfType<P extends DOMAttributes<{}>, T extends Element>(
+ element: ReactElement<any>, type: string): element is DOMElement<P, T>;
+/**
+ * Returns `true` if `element` is a React element whose type is of a React `componentClass`.
+ */
+export function isElementOfType<P>(
+ element: ReactElement<any>, type: SFC<P>): element is SFCElement<P>;
+/**
+ * Returns `true` if `element` is a React element whose type is of a React `componentClass`.
+ */
+export function isElementOfType<P, T extends Component<P, {}>, C extends ComponentClass<P>>(
+ element: ReactElement<any>, type: ClassType<P, T, C>): element is CElement<P, T>;
+
+/**
+ * Returns `true` if `instance` is a DOM component (such as a `<div>` or `<span>`).
+ */
+export function isDOMComponent(instance: ReactInstance): instance is Element;
+/**
+ * Returns `true` if `instance` is a user-defined component, such as a class or a function.
+ */
+export function isCompositeComponent(instance: ReactInstance): instance is Component<any, any>;
+/**
+ * Returns `true` if `instance` is a component whose type is of a React `componentClass`.
+ */
+export function isCompositeComponentWithType<T extends Component<any, any>, C extends ComponentClass<any>>(
+ instance: ReactInstance, type: ClassType<any, T, C>): boolean;
+
+/**
+ * Traverse all components in `tree` and accumulate all components where
+ * `test(component)` is `true`. This is not that useful on its own, but it's used
+ * as a primitive for other test utils.
+ */
+export function findAllInRenderedTree(
+ root: Component<any, any>,
+ fn: (i: ReactInstance) => boolean): ReactInstance[];
+
+/**
+ * Finds all DOM elements of components in the rendered tree that are
+ * DOM components with the class name matching `className`.
+ */
+export function scryRenderedDOMComponentsWithClass(
+ root: Component<any, any>,
+ className: string): Element[];
+/**
+ * Like `scryRenderedDOMComponentsWithClass()` but expects there to be one result,
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ */
+export function findRenderedDOMComponentWithClass(
+ root: Component<any, any>,
+ className: string): Element;
+
+/**
+ * Finds all DOM elements of components in the rendered tree that are
+ * DOM components with the tag name matching `tagName`.
+ */
+export function scryRenderedDOMComponentsWithTag(
+ root: Component<any, any>,
+ tagName: string): Element[];
+/**
+ * Like `scryRenderedDOMComponentsWithTag()` but expects there to be one result,
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ */
+export function findRenderedDOMComponentWithTag(
+ root: Component<any, any>,
+ tagName: string): Element;
+
+/**
+ * Finds all instances of components with type equal to `componentClass`.
+ */
+export function scryRenderedComponentsWithType<T extends Component<{}, {}>, C extends ComponentClass<{}>>(
+ root: Component<any, any>,
+ type: ClassType<any, T, C>): T[];
+
+/**
+ * Same as `scryRenderedComponentsWithType()` but expects there to be one result
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ */
+export function findRenderedComponentWithType<T extends Component<{}, {}>, C extends ComponentClass<{}>>(
+ root: Component<any, any>,
+ type: ClassType<any, T, C>): T;
+
+/**
+ * Call this in your tests to create a shallow renderer.
+ */
+export function createRenderer(): ShallowRenderer;