diff --git a/src/Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.ts b/src/Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.ts index 959980371..b0f398f1a 100644 --- a/src/Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.ts +++ b/src/Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.ts @@ -42,7 +42,7 @@ interface CollapsiblePanelParams { * Use the optional "collapseToLeft" parameter to collapse to the left. */ class CollapsiblePanelViewModel { - private params: CollapsiblePanelParams; + public params: CollapsiblePanelParams; private isCollapsed: ko.Observable; public constructor(params: CollapsiblePanelParams) { @@ -50,7 +50,7 @@ class CollapsiblePanelViewModel { this.isCollapsed = params.isCollapsed || ko.observable(false); } - private toggleCollapse(): void { + public toggleCollapse(): void { this.isCollapsed(!this.isCollapsed()); } } diff --git a/src/Explorer/Controls/InputTypeahead/InputTypeahead.ts b/src/Explorer/Controls/InputTypeahead/InputTypeahead.ts index 9a7f9257f..aff4a14fd 100644 --- a/src/Explorer/Controls/InputTypeahead/InputTypeahead.ts +++ b/src/Explorer/Controls/InputTypeahead/InputTypeahead.ts @@ -71,7 +71,7 @@ interface InputTypeaheadParams { /** * This function gets called when pressing ENTER on the input box */ - submitFct?: (inputValue: string, selection: Item) => void; + submitFct?: (inputValue: string | null, selection: Item | null) => void; /** * Typehead comes with a Search button that we normally remove. @@ -88,8 +88,8 @@ interface OnClickItem { } interface Cache { - inputValue: string; - selection: Item; + inputValue: string | null; + selection: Item | null; } class InputTypeaheadViewModel { @@ -98,15 +98,12 @@ class InputTypeaheadViewModel { private params: InputTypeaheadParams; private cache: Cache; - private inputValue: string; - private selection: Item; public constructor(params: InputTypeaheadParams) { this.instanceNumber = InputTypeaheadViewModel.instanceCount++; this.params = params; this.params.choices.subscribe(this.initializeTypeahead.bind(this)); - this.cache = { inputValue: null, selection: null @@ -161,7 +158,7 @@ class InputTypeaheadViewModel { } } - $.typeahead(options); + ($ as any).typeahead(options); } /** @@ -177,11 +174,11 @@ class InputTypeaheadViewModel { * Use ko's "template: afterRender" callback to do that without actually using any template. * Another way is to call it within setTimeout() in constructor. */ - private afterRender(): void { + public afterRender(): void { this.initializeTypeahead(); } - private submit(): void { + public submit(): void { if (this.params.submitFct) { this.params.submitFct(this.cache.inputValue, this.cache.selection); } diff --git a/tsconfig.strict.json b/tsconfig.strict.json index 8faaf8d07..ae44faaaf 100644 --- a/tsconfig.strict.json +++ b/tsconfig.strict.json @@ -41,8 +41,10 @@ "./src/Definitions/jquery.d.ts", "./src/Definitions/plotly.js-cartesian-dist.d-min.ts", "./src/Definitions/svg.d.ts", - "./src/Explorer/Controls/ErrorDisplayComponent/ErrorDisplayComponent.ts", - "./src/Explorer/Controls/GitHub/GitHubStyleConstants.ts", + "./src/Explorer/Controls/ErrorDisplayComponent/ErrorDisplayComponent.ts", + "./src/Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.ts", + "./src/Explorer/Controls/GitHub/GitHubStyleConstants.ts", + "./src/Explorer/Controls/InputTypeahead/InputTypeahead.ts", "./src/Explorer/Controls/SmartUi/InputUtils.ts", "./src/Explorer/Graph/GraphExplorerComponent/__mocks__/GremlinClient.ts", "./src/Explorer/Notebook/FileSystemUtil.ts",