From eb5dae98dff1652610c41ddce3d3f077abfa0c6d Mon Sep 17 00:00:00 2001 From: Kun Yan Date: Thu, 21 Nov 2019 03:51:14 +0800 Subject: [PATCH] feat(react-lazylog): Add more fields for react-lazylog 4.4.1 (#40520) * feat(react-lazylog): add more fields in Lazylog * feat(react-lazylog): Add SearchBar * Update LazyLog.d.ts * Update index.d.ts * Update index.d.ts * Update index.d.ts * (react-lazylog): text should be optional * fix(react-lazylog): remove patch version of react-lazylog --- types/react-lazylog/build/LazyLog.d.ts | 6 ++++++ types/react-lazylog/build/SearchBar.d.ts | 14 ++++++++++++++ types/react-lazylog/index.d.ts | 8 +++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 types/react-lazylog/build/SearchBar.d.ts diff --git a/types/react-lazylog/build/LazyLog.d.ts b/types/react-lazylog/build/LazyLog.d.ts index 21b42f8030..fb648f8ab1 100644 --- a/types/react-lazylog/build/LazyLog.d.ts +++ b/types/react-lazylog/build/LazyLog.d.ts @@ -3,6 +3,7 @@ import { Range } from "immutable"; export interface LazyLogProps { url: string; + text?: string; fetchOptions?: RequestInit; stream?: boolean; height?: string | number; @@ -19,6 +20,11 @@ export interface LazyLogProps { overscanRowCount?: number; containerStyle?: CSSProperties; style?: CSSProperties; + loadingComponent?: any; + lineClassName?: string; + highlightLineClassName?: string; + extraLines?: number; + caseInsensitive?: boolean; } export class LazyLog extends Component { diff --git a/types/react-lazylog/build/SearchBar.d.ts b/types/react-lazylog/build/SearchBar.d.ts new file mode 100644 index 0000000000..bb90fdd014 --- /dev/null +++ b/types/react-lazylog/build/SearchBar.d.ts @@ -0,0 +1,14 @@ +import { Component, ReactNode, CSSProperties } from "react"; + +export interface SearchBarProps { + onSearch?: (keyword: string) => void; + onClearSearch?: () => void; + onFilterLinesWithMatches?: (isFiltered: boolean) => void; + resultsCount?: number; + filterActive?: boolean; + disabled?: boolean; +} + +export default class SearchBar extends Component { + static defaultProps: Partial; +} diff --git a/types/react-lazylog/index.d.ts b/types/react-lazylog/index.d.ts index 7f180b425a..2711fa0740 100644 --- a/types/react-lazylog/index.d.ts +++ b/types/react-lazylog/index.d.ts @@ -1,8 +1,14 @@ -// Type definitions for react-lazylog 3.1 +// Type definitions for react-lazylog 4.4 // Project: https://github.com/mozilla-frontend-infra/react-lazylog // Definitions by: Benjamin Romano // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 export * from "./build/LazyLog"; +export * from "./build/Line"; +export * from "./build/LineContent"; +export * from "./build/LineNumber"; +export * from "./build/LinePart"; +export * from "./build/Loading"; export * from "./build/ScrollFollow"; +export * from "./build/SearchBar";