From a84ff5234e5e3d83c36aea98fdc5c25d0bfa50ea Mon Sep 17 00:00:00 2001 From: Konrad Mattheis Date: Sat, 20 May 2017 00:40:18 +0200 Subject: [PATCH 001/947] * move qlik-engineapi types from / to new /types --- {qlik-engineapi => types/qlik-engineapi}/index.d.ts | 0 {qlik-engineapi => types/qlik-engineapi}/qlik-engineapi-tests.ts | 0 {qlik-engineapi => types/qlik-engineapi}/tsconfig.json | 0 {qlik-engineapi => types/qlik-engineapi}/tslint.json | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {qlik-engineapi => types/qlik-engineapi}/index.d.ts (100%) rename {qlik-engineapi => types/qlik-engineapi}/qlik-engineapi-tests.ts (100%) rename {qlik-engineapi => types/qlik-engineapi}/tsconfig.json (100%) rename {qlik-engineapi => types/qlik-engineapi}/tslint.json (100%) diff --git a/qlik-engineapi/index.d.ts b/types/qlik-engineapi/index.d.ts similarity index 100% rename from qlik-engineapi/index.d.ts rename to types/qlik-engineapi/index.d.ts diff --git a/qlik-engineapi/qlik-engineapi-tests.ts b/types/qlik-engineapi/qlik-engineapi-tests.ts similarity index 100% rename from qlik-engineapi/qlik-engineapi-tests.ts rename to types/qlik-engineapi/qlik-engineapi-tests.ts diff --git a/qlik-engineapi/tsconfig.json b/types/qlik-engineapi/tsconfig.json similarity index 100% rename from qlik-engineapi/tsconfig.json rename to types/qlik-engineapi/tsconfig.json diff --git a/qlik-engineapi/tslint.json b/types/qlik-engineapi/tslint.json similarity index 100% rename from qlik-engineapi/tslint.json rename to types/qlik-engineapi/tslint.json From 7fbcd08359659b6f9db5cec24bdc6f155622ad7f Mon Sep 17 00:00:00 2001 From: Konrad Mattheis Date: Sat, 20 May 2017 01:24:13 +0200 Subject: [PATCH 002/947] fix TSLint errors Signed-off-by: Konrad Mattheis --- types/qlik-engineapi/index.d.ts | 70 ++++++++------------ types/qlik-engineapi/qlik-engineapi-tests.ts | 1 + types/qlik-engineapi/tslint.json | 8 +-- 3 files changed, 33 insertions(+), 46 deletions(-) diff --git a/types/qlik-engineapi/index.d.ts b/types/qlik-engineapi/index.d.ts index 4baf80e8fe..6b6adc25d8 100644 --- a/types/qlik-engineapi/index.d.ts +++ b/types/qlik-engineapi/index.d.ts @@ -101,7 +101,7 @@ declare namespace EngineAPI { interface IGenericProperties { qInfo: INxInfo; - //?Dynamic properties? + // ?Dynamic properties? [qMetaDef: string]: any; } @@ -1021,10 +1021,10 @@ declare namespace EngineAPI { } interface IImplementOn { - //? nicht in der docu - on(event: "changed" | "closed", func: () => void); + // ? not in Docu + on(event: "changed" | "closed", func: () => void): void; - //? not in Docu + // ? not in Docu id: string; } @@ -1053,7 +1053,13 @@ declare namespace EngineAPI { getChild(qId: string): Promise; getEffectiveProperties(): Promise; getFullPropertyTree(): Promise; - getHyperCubeBinnedData(qPath: string, qPages: INxPage[], qViewport: INxViewPort, qDataRanges: INxDataAreaPage, qMaxNbrCells: number, qQueryLevel: number, qBinningMethod: number): Promise; + getHyperCubeBinnedData(qPath: string, + qPages: INxPage[], + qViewport: INxViewPort, + qDataRanges: INxDataAreaPage, + qMaxNbrCells: number, + qQueryLevel: number, + qBinningMethod: number): Promise; getHyperCubeContinuousData(qPath: string, qOptions: IContinuousDataOptions[]): Promise | Promise | Promise; getHyperCubeData(qPath: string, qPages: INxPage[]): Promise; getHyperCubePivotData(qPath: string, qPages: INxPage[]): Promise; @@ -1287,13 +1293,13 @@ declare namespace EngineAPI { cancelRequest(qRequestId: number): Promise; configureReload(qCancelOnScriptError: boolean, qUseErrorData: boolean, qInteractOnError: boolean): Promise; copyApp(qTargetAppId: string, qSrcAppId: string, qIds: string[]): Promise; - createApp(qAppName: string, qLocalizedScriptMainSection: string): Promise; //?Result + createApp(qAppName: string, qLocalizedScriptMainSection: string): Promise; // ?Result createDocEx(qDocName: string, qUserName?: string, qPassword?: string, qSerial?: string, qLocalizedScriptMainSection?: string): Promise; createSessionApp(): Promise; createSessionAppFromApp(qSrcAppId: string): Promise; deleteApp(qAppId: string): Promise; exportApp(qTargetPath: string, qSrcAppId: string, qIds: string[]): Promise; - getActiveDoc(): Promise; //?Result + getActiveDoc(): Promise; // ?Result getAppEntry(qAppID: string): Promise; getAuthenticatedUser(): Promise; getBNF(qBnfType: BnfType): Promise; @@ -1595,7 +1601,7 @@ declare namespace EngineAPI { * Validation error. * REF(NxValidationError) */ - //?Type = REF(NxValidationError)? + // ?Type = REF(NxValidationError)? qError: INxValidationError; } @@ -1743,8 +1749,8 @@ declare namespace EngineAPI { qAttributeExpressions?: INxAttrExprDef[]; qAttributeDimensions?: INxAttrDimDef[]; - qIncludeElemValue?: boolean; //?Nicht in Doku - qShowTotal?: boolean; //?Nicht in Doku + qIncludeElemValue?: boolean; // ?Nicht in Doku + qShowTotal?: boolean; // ?Nicht in Doku } interface INxCellPosition { @@ -1765,7 +1771,7 @@ declare namespace EngineAPI { qSortByExpression?: TypeSortDirection; qExpression?: IValueExpr; - qSortByGreyness?: TypeSortDirection; //?Nicht in Doku + qSortByGreyness?: TypeSortDirection; // ?Nicht in Doku } interface IStringExpressionContainer { @@ -1825,20 +1831,20 @@ declare namespace EngineAPI { qData: T; } - //public enum NxHypercubeMode { + // public enum NxHypercubeMode { // [QixName("P: // DATA_MODE_PIVOT = 1, // [QixName("K: // DATA_MODE_PIVOT_STACK = 2, // [QixName("S: // DATA_MODE_STRAIGHT = 0 - //} + // } - //public enum SortDirection { + // public enum SortDirection { // Ascending = 1, // Descending = -1, // None = 0 - //} + // } } //#region Prototype Interfaces for Class definitions @@ -1957,8 +1963,8 @@ declare namespace EngineAPI { qCalcCond: IValueExpr; qSortbyYValue: string; - qPseudoDimPos: number; //?Dokufehler - qReductionMode: ReductionModeType; //?Dokufehler + qPseudoDimPos: number; // ?Dokufehler + qReductionMode: ReductionModeType; // ?Dokufehler } interface IVisualizationHyperCubeDef extends IHyperCubeDef { @@ -2059,7 +2065,7 @@ declare namespace EngineAPI { interface IBookmarkListDef { qType: "bookmark"; - // qData: //?nicht dokumentiert + // qData: nicht dokumentiert // example from websocket // qData: { title: "/qMetaDef/title", description: "/qMetaDef/description", sheetId: "/sheetId", title: "/qMetaDef/title" } } @@ -2101,7 +2107,7 @@ declare namespace EngineAPI { interface IMeasureListDef { qType: "measure"; - // qData: INxMeasure[]; //?nicht dokumentiert + // qData: INxMeasure[]; nicht dokumentiert // example from websocket // qData : { title: "/qMetaDef/title", tags: "/qMetaDef/tags" } } @@ -2143,7 +2149,7 @@ declare namespace EngineAPI { interface IDimensionListDef { qType: "dimension"; - //qData: INxDimension[]; //?nicht dokumentiert + // qData: INxDimension[]; nicht dokumentiert } interface IDimensionListObject extends IGenericObject { @@ -2167,7 +2173,7 @@ declare namespace EngineAPI { qIsReserved?: boolean; qMeta?: INxMeta; qInfo: INxInfo; - qData: any; //?nicht dokumentiert + qData: any; // ? nicht dokumentiert qIsScriptCreated: boolean; } @@ -2187,7 +2193,7 @@ declare namespace EngineAPI { qType: string; qShowReserved: boolean; qShowConfig: boolean; - qData: any; //?nicht dokumentiert + qData: any; // ?nicht dokumentiert } interface IVariableListObject extends IGenericObject { @@ -2271,23 +2277,3 @@ declare namespace EngineAPI { } } //#endregion - -// extens the AppAPI Namespace with the access of the EnigmaModel - -declare namespace AppAPI { - interface IApp { - model: IModel; - } - - interface IModel { - enigmaModel: Enigma.IApp; - } -} - -declare namespace ExtensionAPI { - - interface IExtensionModel { - enigmaModel: Enigma.IGenericObject; - } - -} \ No newline at end of file diff --git a/types/qlik-engineapi/qlik-engineapi-tests.ts b/types/qlik-engineapi/qlik-engineapi-tests.ts index e69de29bb2..3484d95073 100644 --- a/types/qlik-engineapi/qlik-engineapi-tests.ts +++ b/types/qlik-engineapi/qlik-engineapi-tests.ts @@ -0,0 +1 @@ +let app: EngineAPI.IApp; diff --git a/types/qlik-engineapi/tslint.json b/types/qlik-engineapi/tslint.json index cae1bdf2ad..9a48ae7955 100644 --- a/types/qlik-engineapi/tslint.json +++ b/types/qlik-engineapi/tslint.json @@ -1,8 +1,8 @@ -{ - "extends": "../tslint.json", +{ + "extends": "dtslint/dt.json", "rules": { - "forbidden-types": false, + "ban-types": false, "no-empty-interface": false, "interface-name": false } -} \ No newline at end of file +} From f25a05789881db96e80abd6ec133100bb2cf6d7a Mon Sep 17 00:00:00 2001 From: Christoph Spielmann Date: Thu, 20 Jul 2017 23:36:18 +0200 Subject: [PATCH 003/947] Add typings for Reactable 0.14. Not complete but the stuff provided by the typings have been tested/used quite extensively by myself during the development of ReactPlayer! --- types/reactable/index.d.ts | 60 +++++++++++++++++++++++++++++++++++ types/reactable/tsconfig.json | 23 ++++++++++++++ types/reactable/tslint.json | 1 + 3 files changed, 84 insertions(+) create mode 100644 types/reactable/index.d.ts create mode 100644 types/reactable/tsconfig.json create mode 100644 types/reactable/tslint.json diff --git a/types/reactable/index.d.ts b/types/reactable/index.d.ts new file mode 100644 index 0000000000..4509d421c1 --- /dev/null +++ b/types/reactable/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for reactable 0.14 +// Project: https://github.com/glittershark/reactable +// Definitions by: Christoph Spielmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from 'react'; + +export interface KeyLabelObject { + key: string; + label: string; +} + +export type ColumnsType = string | KeyLabelObject; + +export type FilterMethodType = (text: string) => void; + +export interface TableComponentProperties { + data?: T[]; + className?: string; + columns?: ColumnsType[]; + id?: string; + sortable?: string[]; + filterable?: string[]; + filterBy?: string; + onFilter?: FilterMethodType; +} + +export interface ThProperties { + column: string; + className?: string; +} + +export interface TrProperties { + data?: T; + className?: string; +} + +export interface TdProperties { + column: string; + value?: any; + data?: any; +} + +export class Table extends React.Component, {}> { +} + +export class Thead extends React.Component<{}, {}> { +} + +export class Th extends React.Component { +} + +export class Tr extends React.Component, {}> { +} + +export class Td extends React.Component { +} + +export class Tfoot extends React.Component<{}, {}> { +} diff --git a/types/reactable/tsconfig.json b/types/reactable/tsconfig.json new file mode 100644 index 0000000000..619dd0b8bf --- /dev/null +++ b/types/reactable/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts" + ] +} diff --git a/types/reactable/tslint.json b/types/reactable/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/reactable/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 7c3257b794726e53e5f0da2b32dc89d29ee168a2 Mon Sep 17 00:00:00 2001 From: Christoph Spielmann Date: Sat, 22 Jul 2017 16:17:17 +0200 Subject: [PATCH 004/947] Add two tests (very simple one and a quite sophisticated one which contains all the components i created typings for...) --- types/reactable/reactable-tests.tsx | 82 +++++++++++++++++++++++++++++ types/reactable/tsconfig.json | 3 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 types/reactable/reactable-tests.tsx diff --git a/types/reactable/reactable-tests.tsx b/types/reactable/reactable-tests.tsx new file mode 100644 index 0000000000..91d80c27ef --- /dev/null +++ b/types/reactable/reactable-tests.tsx @@ -0,0 +1,82 @@ +import * as React from "react"; +import * as ReactDOM from "react-dom"; +import * as Reactable from "reactable"; + +interface Person { + name: string; + age: number; +} + +type PersonTable = new () => Reactable.Table; +const PersonTable = Reactable.Table as PersonTable; + +type PersonTableHeader = new () => Reactable.Thead; +const PersonTableHeader = Reactable.Thead as PersonTableHeader; + +type PersonTableTh = new () => Reactable.Th; +const PersonTableTh = Reactable.Th as PersonTableTh; + +type PersonRow = new () => Reactable.Tr; +const PersonRow = Reactable.Tr as PersonRow; + +type PersonTableTd = new () => Reactable.Td; +const PersonTableTd = Reactable.Td as PersonTableTd; + +type PersonTableTfoot = new () => Reactable.Tfoot; +const PersonTableTfoot = Reactable.Tfoot as PersonTableTfoot; + +let data = [ + { + name: "Christoph Spielmann", + age: 36 + } +]; + +export class TestComponent extends React.Component<{}, {}> { + render(): JSX.Element { + return ; + } +} + +export class FullblownReactableTestComponent extends React.Component<{}, {}> { + render(): JSX.Element { + let displayedColumns = ["name"]; + // custom table Th-elements + let columns: JSX.Element[] = []; + for (let colName of displayedColumns) { + columns.push( + + {colName} + + ); + } + let rows: JSX.Element[] = []; + for (let d of data) { + let tds: JSX.Element[] = []; + displayedColumns.forEach(col => tds.push( + +

d[col]

+
+ )); + rows.push( + + {tds} + + ); + } + return ( + + + {columns} + + {rows} + + + footer cell1 + footer cell2 + + + + ); + } +} diff --git a/types/reactable/tsconfig.json b/types/reactable/tsconfig.json index 619dd0b8bf..c3300f0e32 100644 --- a/types/reactable/tsconfig.json +++ b/types/reactable/tsconfig.json @@ -18,6 +18,7 @@ "jsx": "react" }, "files": [ - "index.d.ts" + "index.d.ts", + "reactable-tests.tsx" ] } From d16fb75482be156195ffdac6e5b058728951e5d8 Mon Sep 17 00:00:00 2001 From: Vito Date: Tue, 18 Jul 2017 19:10:05 -0400 Subject: [PATCH 005/947] refactor react-bootstrap into individual modules this allows individual components to be imported in addition to named imports on the root module. closes #15856 --- types/react-bootstrap/index.d.ts | 1316 +++-------------- types/react-bootstrap/lib/Accordion.d.ts | 15 + types/react-bootstrap/lib/Alert.d.ts | 12 + types/react-bootstrap/lib/Badge.d.ts | 8 + types/react-bootstrap/lib/Breadcrumb.d.ts | 10 + types/react-bootstrap/lib/BreadcrumbItem.d.ts | 10 + types/react-bootstrap/lib/Button.d.ts | 13 + types/react-bootstrap/lib/ButtonGroup.d.ts | 12 + types/react-bootstrap/lib/ButtonToolbar.d.ts | 12 + types/react-bootstrap/lib/Carousel.d.ts | 29 + .../react-bootstrap/lib/CarouselCaption.d.ts | 7 + types/react-bootstrap/lib/CarouselItem.d.ts | 12 + types/react-bootstrap/lib/Checkbox.d.ts | 11 + types/react-bootstrap/lib/Clearfix.d.ts | 11 + types/react-bootstrap/lib/Col.d.ts | 27 + types/react-bootstrap/lib/Collapse.d.ts | 13 + types/react-bootstrap/lib/ControlLabel.d.ts | 9 + types/react-bootstrap/lib/Dropdown.d.ts | 25 + types/react-bootstrap/lib/DropdownButton.d.ts | 16 + types/react-bootstrap/lib/DropdownMenu.d.ts | 12 + types/react-bootstrap/lib/DropdownToggle.d.ts | 13 + types/react-bootstrap/lib/Fade.d.ts | 11 + types/react-bootstrap/lib/Form.d.ts | 10 + types/react-bootstrap/lib/FormControl.d.ts | 18 + .../lib/FormControlFeedback.d.ts | 5 + .../lib/FormControlStatic.d.ts | 8 + types/react-bootstrap/lib/FormGroup.d.ts | 11 + types/react-bootstrap/lib/Glyphicon.d.ts | 8 + types/react-bootstrap/lib/Grid.d.ts | 9 + types/react-bootstrap/lib/HelpBlock.d.ts | 7 + types/react-bootstrap/lib/Image.d.ts | 10 + types/react-bootstrap/lib/InputGroup.d.ts | 14 + .../react-bootstrap/lib/InputGroupAddon.d.ts | 5 + .../react-bootstrap/lib/InputGroupButton.d.ts | 5 + types/react-bootstrap/lib/Jumbotron.d.ts | 7 + types/react-bootstrap/lib/Label.d.ts | 9 + types/react-bootstrap/lib/ListGroup.d.ts | 8 + types/react-bootstrap/lib/ListGroupItem.d.ts | 13 + types/react-bootstrap/lib/Media.d.ts | 20 + types/react-bootstrap/lib/MediaBody.d.ts | 7 + types/react-bootstrap/lib/MediaHeading.d.ts | 7 + types/react-bootstrap/lib/MediaLeft.d.ts | 7 + types/react-bootstrap/lib/MediaList.d.ts | 5 + types/react-bootstrap/lib/MediaListItem.d.ts | 7 + types/react-bootstrap/lib/MediaRight.d.ts | 7 + types/react-bootstrap/lib/MenuItem.d.ts | 17 + types/react-bootstrap/lib/Modal.d.ts | 41 + types/react-bootstrap/lib/ModalBody.d.ts | 8 + types/react-bootstrap/lib/ModalDialog.d.ts | 14 + types/react-bootstrap/lib/ModalFooter.d.ts | 8 + types/react-bootstrap/lib/ModalHeader.d.ts | 10 + types/react-bootstrap/lib/ModalTitle.d.ts | 8 + types/react-bootstrap/lib/Nav.d.ts | 23 + types/react-bootstrap/lib/NavDropdown.d.ts | 12 + types/react-bootstrap/lib/NavItem.d.ts | 25 + types/react-bootstrap/lib/Navbar.d.ts | 55 + types/react-bootstrap/lib/NavbarBrand.d.ts | 5 + types/react-bootstrap/lib/NavbarCollapse.d.ts | 5 + types/react-bootstrap/lib/NavbarHeader.d.ts | 5 + types/react-bootstrap/lib/NavbarToggle.d.ts | 7 + types/react-bootstrap/lib/Overlay.d.ts | 17 + types/react-bootstrap/lib/OverlayTrigger.d.ts | 26 + types/react-bootstrap/lib/PageHeader.d.ts | 5 + types/react-bootstrap/lib/PageItem.d.ts | 3 + types/react-bootstrap/lib/Pager.d.ts | 11 + types/react-bootstrap/lib/PagerItem.d.ts | 13 + types/react-bootstrap/lib/Pagination.d.ts | 20 + .../react-bootstrap/lib/PaginationButton.d.ts | 14 + types/react-bootstrap/lib/Panel.d.ts | 17 + types/react-bootstrap/lib/PanelGroup.d.ts | 13 + types/react-bootstrap/lib/Popover.d.ts | 15 + types/react-bootstrap/lib/ProgressBar.d.ts | 17 + types/react-bootstrap/lib/Radio.d.ts | 11 + .../react-bootstrap/lib/ResponsiveEmbed.d.ts | 9 + types/react-bootstrap/lib/Row.d.ts | 7 + types/react-bootstrap/lib/SafeAnchor.d.ts | 11 + types/react-bootstrap/lib/SplitButton.d.ts | 12 + types/react-bootstrap/lib/SplitToggle.d.ts | 6 + types/react-bootstrap/lib/Tab.d.ts | 20 + types/react-bootstrap/lib/TabContainer.d.ts | 9 + types/react-bootstrap/lib/TabContent.d.ts | 10 + types/react-bootstrap/lib/TabPane.d.ts | 12 + types/react-bootstrap/lib/Table.d.ts | 13 + types/react-bootstrap/lib/Tabs.d.ts | 17 + types/react-bootstrap/lib/Thumbnail.d.ts | 9 + types/react-bootstrap/lib/Tooltip.d.ts | 15 + types/react-bootstrap/lib/Well.d.ts | 9 + types/react-bootstrap/lib/index.d.ts | 178 +++ .../react-bootstrap/lib/utils/PropTypes.d.ts | 2 + .../lib/utils/StyleConfig.d.ts | 32 + .../lib/utils/ValidComponentChildren.d.ts | 1 + .../lib/utils/bootstrapUtils.d.ts | 18 + .../react-bootstrap/lib/utils/capitalize.d.ts | 1 + .../lib/utils/createChainedFunction.d.ts | 1 + .../lib/utils/deprecationWarning.d.ts | 3 + types/react-bootstrap/lib/utils/index.d.ts | 4 + .../lib/utils/splitComponentProps.d.ts | 1 + ...-bootstrap-individual-components-tests.tsx | 193 +++ .../react-bootstrap/react-bootstrap-tests.tsx | 7 +- types/react-bootstrap/tsconfig.json | 8 +- 100 files changed, 1724 insertions(+), 1120 deletions(-) create mode 100644 types/react-bootstrap/lib/Accordion.d.ts create mode 100644 types/react-bootstrap/lib/Alert.d.ts create mode 100644 types/react-bootstrap/lib/Badge.d.ts create mode 100644 types/react-bootstrap/lib/Breadcrumb.d.ts create mode 100644 types/react-bootstrap/lib/BreadcrumbItem.d.ts create mode 100644 types/react-bootstrap/lib/Button.d.ts create mode 100644 types/react-bootstrap/lib/ButtonGroup.d.ts create mode 100644 types/react-bootstrap/lib/ButtonToolbar.d.ts create mode 100644 types/react-bootstrap/lib/Carousel.d.ts create mode 100644 types/react-bootstrap/lib/CarouselCaption.d.ts create mode 100644 types/react-bootstrap/lib/CarouselItem.d.ts create mode 100644 types/react-bootstrap/lib/Checkbox.d.ts create mode 100644 types/react-bootstrap/lib/Clearfix.d.ts create mode 100644 types/react-bootstrap/lib/Col.d.ts create mode 100644 types/react-bootstrap/lib/Collapse.d.ts create mode 100644 types/react-bootstrap/lib/ControlLabel.d.ts create mode 100644 types/react-bootstrap/lib/Dropdown.d.ts create mode 100644 types/react-bootstrap/lib/DropdownButton.d.ts create mode 100644 types/react-bootstrap/lib/DropdownMenu.d.ts create mode 100644 types/react-bootstrap/lib/DropdownToggle.d.ts create mode 100644 types/react-bootstrap/lib/Fade.d.ts create mode 100644 types/react-bootstrap/lib/Form.d.ts create mode 100644 types/react-bootstrap/lib/FormControl.d.ts create mode 100644 types/react-bootstrap/lib/FormControlFeedback.d.ts create mode 100644 types/react-bootstrap/lib/FormControlStatic.d.ts create mode 100644 types/react-bootstrap/lib/FormGroup.d.ts create mode 100644 types/react-bootstrap/lib/Glyphicon.d.ts create mode 100644 types/react-bootstrap/lib/Grid.d.ts create mode 100644 types/react-bootstrap/lib/HelpBlock.d.ts create mode 100644 types/react-bootstrap/lib/Image.d.ts create mode 100644 types/react-bootstrap/lib/InputGroup.d.ts create mode 100644 types/react-bootstrap/lib/InputGroupAddon.d.ts create mode 100644 types/react-bootstrap/lib/InputGroupButton.d.ts create mode 100644 types/react-bootstrap/lib/Jumbotron.d.ts create mode 100644 types/react-bootstrap/lib/Label.d.ts create mode 100644 types/react-bootstrap/lib/ListGroup.d.ts create mode 100644 types/react-bootstrap/lib/ListGroupItem.d.ts create mode 100644 types/react-bootstrap/lib/Media.d.ts create mode 100644 types/react-bootstrap/lib/MediaBody.d.ts create mode 100644 types/react-bootstrap/lib/MediaHeading.d.ts create mode 100644 types/react-bootstrap/lib/MediaLeft.d.ts create mode 100644 types/react-bootstrap/lib/MediaList.d.ts create mode 100644 types/react-bootstrap/lib/MediaListItem.d.ts create mode 100644 types/react-bootstrap/lib/MediaRight.d.ts create mode 100644 types/react-bootstrap/lib/MenuItem.d.ts create mode 100644 types/react-bootstrap/lib/Modal.d.ts create mode 100644 types/react-bootstrap/lib/ModalBody.d.ts create mode 100644 types/react-bootstrap/lib/ModalDialog.d.ts create mode 100644 types/react-bootstrap/lib/ModalFooter.d.ts create mode 100644 types/react-bootstrap/lib/ModalHeader.d.ts create mode 100644 types/react-bootstrap/lib/ModalTitle.d.ts create mode 100644 types/react-bootstrap/lib/Nav.d.ts create mode 100644 types/react-bootstrap/lib/NavDropdown.d.ts create mode 100644 types/react-bootstrap/lib/NavItem.d.ts create mode 100644 types/react-bootstrap/lib/Navbar.d.ts create mode 100644 types/react-bootstrap/lib/NavbarBrand.d.ts create mode 100644 types/react-bootstrap/lib/NavbarCollapse.d.ts create mode 100644 types/react-bootstrap/lib/NavbarHeader.d.ts create mode 100644 types/react-bootstrap/lib/NavbarToggle.d.ts create mode 100644 types/react-bootstrap/lib/Overlay.d.ts create mode 100644 types/react-bootstrap/lib/OverlayTrigger.d.ts create mode 100644 types/react-bootstrap/lib/PageHeader.d.ts create mode 100644 types/react-bootstrap/lib/PageItem.d.ts create mode 100644 types/react-bootstrap/lib/Pager.d.ts create mode 100644 types/react-bootstrap/lib/PagerItem.d.ts create mode 100644 types/react-bootstrap/lib/Pagination.d.ts create mode 100644 types/react-bootstrap/lib/PaginationButton.d.ts create mode 100644 types/react-bootstrap/lib/Panel.d.ts create mode 100644 types/react-bootstrap/lib/PanelGroup.d.ts create mode 100644 types/react-bootstrap/lib/Popover.d.ts create mode 100644 types/react-bootstrap/lib/ProgressBar.d.ts create mode 100644 types/react-bootstrap/lib/Radio.d.ts create mode 100644 types/react-bootstrap/lib/ResponsiveEmbed.d.ts create mode 100644 types/react-bootstrap/lib/Row.d.ts create mode 100644 types/react-bootstrap/lib/SafeAnchor.d.ts create mode 100644 types/react-bootstrap/lib/SplitButton.d.ts create mode 100644 types/react-bootstrap/lib/SplitToggle.d.ts create mode 100644 types/react-bootstrap/lib/Tab.d.ts create mode 100644 types/react-bootstrap/lib/TabContainer.d.ts create mode 100644 types/react-bootstrap/lib/TabContent.d.ts create mode 100644 types/react-bootstrap/lib/TabPane.d.ts create mode 100644 types/react-bootstrap/lib/Table.d.ts create mode 100644 types/react-bootstrap/lib/Tabs.d.ts create mode 100644 types/react-bootstrap/lib/Thumbnail.d.ts create mode 100644 types/react-bootstrap/lib/Tooltip.d.ts create mode 100644 types/react-bootstrap/lib/Well.d.ts create mode 100644 types/react-bootstrap/lib/index.d.ts create mode 100644 types/react-bootstrap/lib/utils/PropTypes.d.ts create mode 100644 types/react-bootstrap/lib/utils/StyleConfig.d.ts create mode 100644 types/react-bootstrap/lib/utils/ValidComponentChildren.d.ts create mode 100644 types/react-bootstrap/lib/utils/bootstrapUtils.d.ts create mode 100644 types/react-bootstrap/lib/utils/capitalize.d.ts create mode 100644 types/react-bootstrap/lib/utils/createChainedFunction.d.ts create mode 100644 types/react-bootstrap/lib/utils/deprecationWarning.d.ts create mode 100644 types/react-bootstrap/lib/utils/index.d.ts create mode 100644 types/react-bootstrap/lib/utils/splitComponentProps.d.ts create mode 100644 types/react-bootstrap/react-bootstrap-individual-components-tests.tsx diff --git a/types/react-bootstrap/index.d.ts b/types/react-bootstrap/index.d.ts index a696c4ac6d..1ff32a9836 100644 --- a/types/react-bootstrap/index.d.ts +++ b/types/react-bootstrap/index.d.ts @@ -1,1123 +1,207 @@ // Type definitions for react-bootstrap // Project: https://github.com/react-bootstrap/react-bootstrap -// Definitions by: Walker Burgin , Vincent Siao , Danilo Barros , Batbold Gansukh , Raymond May Jr. , Cheng Sieu Ly , Kat Busch +// Definitions by: Walker Burgin , Vincent Siao , Danilo Barros , Batbold Gansukh , Raymond May Jr. , Cheng Sieu Ly , Kat Busch , Vito Samson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import * as React from 'react'; -export = ReactBootstrap; -export as namespace ReactBootstrap; - -declare namespace ReactBootstrap { - - type Sizes = 'xs' | 'xsmall' | 'sm' | 'small' | 'medium' | 'lg' | 'large'; - - - // Change onSelect signature to be (eventKey: any, event: SyntheticEvent<{}>) => any on all React-Bootstrap components, instead of the old inconsistent mishmash (#1604, #1677, #1756) - /** ( eventKey:any, e:React.SyntheticEvent<{}> ):void */ - interface SelectCallback extends React.EventHandler { - (eventKey: any, e: React.SyntheticEvent<{}>): void; - /** - @deprecated - This signature is a hack so can still derive from HTMLProps. - It does not reflect the underlying event and should not be used. - */ - (e: React.MouseEvent<{}>): void; - } - - - interface TransitionCallbacks { - onEnter?: Function; - onEntered?: Function; - onEntering?: Function; - onExit?: Function; - onExited?: Function; - onExiting?: Function; - } - - - // - interface AccordionProps extends React.HTMLProps { - bsSize?: Sizes; - bsStyle?: string; - collapsible?: boolean; - defaultExpanded?: boolean; - eventKey?: any; - expanded?: boolean; - footer?: any; // TODO: Add more specific type - header?: any; // TODO: Add more specific type - } - type Accordion = React.ClassicComponent; - var Accordion: React.ClassicComponentClass; - - - // - interface BreadcrumbProps extends React.Props { - bsClass?: string; - } - interface BreadcrumbClass extends React.ClassicComponentClass { - Item: typeof BreadcrumbItem; - } - type Breadcrumb = React.ClassicComponent; - var Breadcrumb: BreadcrumbClass; - - - // - interface BreadcrumbItemProps extends React.Props { - active?: boolean; - id?: string | number; - href?: string; - title?: React.ReactNode; - target?: string; - } - type BreadcrumbItem = React.ClassicComponent; - var BreadcrumbItem: React.ClassicComponentClass; - - - //