mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-23 19:01:28 +00:00
Compare commits
1 Commits
eslint/fix
...
jbunster/t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ba434a1ac |
3938
package-lock.json
generated
3938
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -101,10 +101,10 @@
|
||||
"utility-types": "3.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.9.0",
|
||||
"@babel/preset-env": "7.9.0",
|
||||
"@babel/preset-react": "7.9.4",
|
||||
"@babel/preset-typescript": "7.9.0",
|
||||
"@babel/core": "7.14.0",
|
||||
"@babel/preset-env": "7.14.1",
|
||||
"@babel/preset-react": "7.13.13",
|
||||
"@babel/preset-typescript": "7.13.0",
|
||||
"@testing-library/react": "11.2.3",
|
||||
"@types/applicationinsights-js": "1.0.7",
|
||||
"@types/codemirror": "0.0.56",
|
||||
@@ -127,10 +127,10 @@
|
||||
"@types/sinon": "2.3.3",
|
||||
"@types/styled-components": "5.1.1",
|
||||
"@types/underscore": "1.7.36",
|
||||
"@typescript-eslint/eslint-plugin": "4.22.0",
|
||||
"@typescript-eslint/parser": "4.22.0",
|
||||
"babel-jest": "24.9.0",
|
||||
"babel-loader": "8.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.22.1",
|
||||
"@typescript-eslint/parser": "4.22.1",
|
||||
"babel-jest": "26.6.3",
|
||||
"babel-loader": "8.2.2",
|
||||
"buffer": "5.1.0",
|
||||
"case-sensitive-paths-webpack-plugin": "2.3.0",
|
||||
"create-file-webpack": "1.0.2",
|
||||
@@ -138,7 +138,7 @@
|
||||
"enzyme": "3.11.0",
|
||||
"enzyme-adapter-react-16": "1.15.5",
|
||||
"enzyme-to-json": "3.6.1",
|
||||
"eslint": "7.8.1",
|
||||
"eslint": "7.25.0",
|
||||
"eslint-cli": "1.1.1",
|
||||
"eslint-plugin-no-null": "1.0.2",
|
||||
"eslint-plugin-prefer-arrow": "1.2.2",
|
||||
@@ -152,7 +152,7 @@
|
||||
"html-loader": "0.5.5",
|
||||
"html-loader-jest": "0.2.1",
|
||||
"html-webpack-plugin": "4.5.2",
|
||||
"jest": "25.5.4",
|
||||
"jest": "26.6.3",
|
||||
"jest-canvas-mock": "2.1.0",
|
||||
"jest-playwright-preset": "1.5.1",
|
||||
"jest-trx-results-processor": "0.0.7",
|
||||
@@ -169,10 +169,10 @@
|
||||
"rimraf": "3.0.0",
|
||||
"sinon": "3.2.1",
|
||||
"style-loader": "0.23.0",
|
||||
"ts-loader": "6.2.2",
|
||||
"tslint": "5.11.0",
|
||||
"tslint-microsoft-contrib": "6.0.0",
|
||||
"typescript": "4.2.4",
|
||||
"ts-loader": "9.1.2",
|
||||
"tslint": "6.1.3",
|
||||
"tslint-microsoft-contrib": "6.2.0",
|
||||
"typescript": "4.3.0-beta",
|
||||
"url-loader": "1.1.1",
|
||||
"wait-on": "4.0.2",
|
||||
"webpack": "4.46.0",
|
||||
|
||||
@@ -3,11 +3,11 @@ export class ObjectCache<T> extends Map<string, T> {
|
||||
super();
|
||||
}
|
||||
|
||||
public get(key: string): T | undefined {
|
||||
public override get(key: string): T | undefined {
|
||||
return this.touch(key);
|
||||
}
|
||||
|
||||
public set(key: string, value: T): this {
|
||||
public override set(key: string, value: T): this {
|
||||
if (this.size === this.limit) {
|
||||
this.delete(this.keys().next().value);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export class AccessibleElement extends React.Component<AccessibleElementProps> {
|
||||
}
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const elementProps = { ...this.props };
|
||||
delete elementProps.as;
|
||||
delete elementProps.onActivated;
|
||||
|
||||
@@ -12,7 +12,7 @@ import TriangleRightIcon from "../../../../images/Triangle-right.svg";
|
||||
export interface AccordionComponentProps {}
|
||||
|
||||
export class AccordionComponent extends React.Component<AccordionComponentProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return <div className="accordion">{this.props.children}</div>;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ export class AccordionItemComponent extends React.Component<AccordionItemCompone
|
||||
};
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
public override componentDidUpdate() {
|
||||
if (this.props.isExpanded !== this.isExpanded) {
|
||||
this.isExpanded = this.props.isExpanded;
|
||||
this.setState({
|
||||
@@ -51,7 +51,7 @@ export class AccordionItemComponent extends React.Component<AccordionItemCompone
|
||||
}
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="accordionItemContainer">
|
||||
<div className="accordionItemHeader" onClick={this.onHeaderClick} onKeyPress={this.onHeaderKeyPress}>
|
||||
|
||||
@@ -62,7 +62,7 @@ export class ArcadiaMenuPicker extends React.Component<ArcadiaMenuPickerProps, A
|
||||
this.props.onCreateNewSparkPoolClicked(item.key);
|
||||
};
|
||||
|
||||
public render() {
|
||||
public override render() {
|
||||
const { workspaces } = this.props;
|
||||
let workspaceMenuItems: IContextualMenuItem[] = workspaces.map((workspace) => {
|
||||
let sparkPoolsMenuProps: IContextualMenuProps = {
|
||||
|
||||
@@ -19,7 +19,7 @@ export interface CollapsiblePanelProps {
|
||||
}
|
||||
|
||||
export class CollapsiblePanel extends React.Component<CollapsiblePanelProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className={`collapsiblePanel ${this.props.isCollapsed ? "paneCollapsed" : ""}`}>
|
||||
{!this.props.isCollapsed ? this.getExpandedFragment() : this.getCollapsedFragment()}
|
||||
|
||||
@@ -24,13 +24,13 @@ export class CollapsibleSectionComponent extends React.Component<CollapsibleSect
|
||||
this.setState({ isExpanded: !this.state.isExpanded });
|
||||
};
|
||||
|
||||
public componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
if (this.state.isExpanded && this.props.onExpand) {
|
||||
this.props.onExpand();
|
||||
}
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<>
|
||||
<Stack
|
||||
|
||||
@@ -129,7 +129,7 @@ export class CommandButtonComponent extends React.Component<CommandButtonCompone
|
||||
private dropdownElt: HTMLElement;
|
||||
private expandButtonElt: HTMLElement;
|
||||
|
||||
public componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
if (!this.dropdownElt || !this.expandButtonElt) {
|
||||
return;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ export class CommandButtonComponent extends React.Component<CommandButtonCompone
|
||||
);
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
let mainClassName = "commandButtonComponent";
|
||||
if (this.props.disabled) {
|
||||
mainClassName += " commandDisabled";
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface DefaultDirectoryDropdownProps {
|
||||
export class DefaultDirectoryDropdownComponent extends React.Component<DefaultDirectoryDropdownProps> {
|
||||
public static readonly lastVisitedKey: string = "lastVisited";
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const lastVisitedOption: IDropdownOption = {
|
||||
key: DefaultDirectoryDropdownComponent.lastVisitedKey,
|
||||
text: "Sign in to your last visited directory",
|
||||
|
||||
@@ -36,7 +36,7 @@ export class DirectoryListComponent extends React.Component<DirectoryListProps,
|
||||
};
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const { directories: originalItems, selectedDirectoryId } = this.props;
|
||||
const { filterText } = this.state;
|
||||
const filteredItems =
|
||||
|
||||
@@ -56,7 +56,7 @@ export class DynamicListViewModel extends WaitsForTemplateViewModel {
|
||||
public ariaLabel: string;
|
||||
public buttonText: string;
|
||||
public newItem: ko.Observable<string>;
|
||||
public isTemplateReady: ko.Observable<boolean>;
|
||||
public override isTemplateReady: ko.Observable<boolean>;
|
||||
public listItems: ko.ObservableArray<DynamicListItem>;
|
||||
|
||||
public constructor(options: DynamicListParams) {
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface EditorParams extends JsonEditorParams {
|
||||
*/
|
||||
// TODO: Ideally, JsonEditorViewModel should extend EditorViewModel and not the other way around
|
||||
class EditorViewModel extends JsonEditorViewModel {
|
||||
public params: EditorParams;
|
||||
public override params: EditorParams;
|
||||
private static providerRegistered: string[] = [];
|
||||
|
||||
public constructor(params: EditorParams) {
|
||||
@@ -44,11 +44,11 @@ class EditorViewModel extends JsonEditorViewModel {
|
||||
});
|
||||
}
|
||||
|
||||
protected getEditorLanguage(): string {
|
||||
protected override getEditorLanguage(): string {
|
||||
return this.params.contentType;
|
||||
}
|
||||
|
||||
protected async registerCompletionItemProvider() {
|
||||
protected override async registerCompletionItemProvider() {
|
||||
if (EditorViewModel.providerRegistered.indexOf("sql") < 0) {
|
||||
const { SqlCompletionItemProvider } = await import("@azure/cosmos-language-service");
|
||||
const monaco = await loadMonaco();
|
||||
@@ -57,7 +57,7 @@ class EditorViewModel extends JsonEditorViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
protected async getErrorMarkers(input: string): Promise<monaco.editor.IMarkerData[]> {
|
||||
protected override async getErrorMarkers(input: string): Promise<monaco.editor.IMarkerData[]> {
|
||||
const { ErrorMarkProvider } = await import("@azure/cosmos-language-service");
|
||||
return ErrorMarkProvider.getErrorMark(input);
|
||||
}
|
||||
|
||||
@@ -21,20 +21,20 @@ export class EditorReact extends React.Component<EditorReactProps> {
|
||||
super(props);
|
||||
}
|
||||
|
||||
public componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.createEditor(this.configureEditor.bind(this));
|
||||
}
|
||||
|
||||
public shouldComponentUpdate(): boolean {
|
||||
public override shouldComponentUpdate(): boolean {
|
||||
// Prevents component re-rendering
|
||||
return false;
|
||||
}
|
||||
|
||||
public componentWillUnmount(): void {
|
||||
public override componentWillUnmount(): void {
|
||||
this.selectionListener && this.selectionListener.dispose();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return <div className="jsonEditor" ref={(elt: HTMLElement) => this.setRef(elt)} />;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export class AddRepoComponent extends React.Component<AddRepoComponentProps, Add
|
||||
};
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const textFieldProps: ITextFieldProps = {
|
||||
placeholder: AddRepoComponent.TextFieldPlaceholder,
|
||||
autoFocus: true,
|
||||
|
||||
@@ -49,7 +49,7 @@ export class AuthorizeAccessComponent extends React.Component<
|
||||
};
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const choiceGroupProps: IChoiceGroupProps = {
|
||||
options: [
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ export class GitHubReposComponent extends React.Component<GitHubReposComponentPr
|
||||
private static readonly OKButtonText = "OK";
|
||||
private static readonly CancelButtonText = "Cancel";
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const content: JSX.Element = this.props.showAuthorizeAccess ? (
|
||||
<AuthorizeAccessComponent {...this.props.authorizeAccessProps} />
|
||||
) : (
|
||||
|
||||
@@ -67,7 +67,7 @@ export class ReposListComponent extends React.Component<ReposListComponentProps>
|
||||
private static readonly DefaultBranchName = "master";
|
||||
private static readonly FooterIndex = -1;
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const pinnedReposListProps: IDetailsListProps = {
|
||||
styles: {
|
||||
contentWrapper: {
|
||||
|
||||
@@ -30,7 +30,7 @@ export class GalleryHeaderComponent extends React.Component {
|
||||
);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<Stack
|
||||
tokens={{ childrenGap: 10 }}
|
||||
|
||||
@@ -113,7 +113,7 @@ export class InputTypeaheadComponent extends React.Component<
|
||||
* @param prevState
|
||||
* @param snapshot
|
||||
*/
|
||||
public componentDidUpdate(
|
||||
public override componentDidUpdate(
|
||||
prevProps: InputTypeaheadComponentProps,
|
||||
prevState: InputTypeaheadComponentState,
|
||||
snapshot: any
|
||||
@@ -127,11 +127,11 @@ export class InputTypeaheadComponent extends React.Component<
|
||||
/**
|
||||
* Executed once react is done building the DOM for this component
|
||||
*/
|
||||
public componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.initializeTypeahead();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<span className="input-typeahead-container">
|
||||
<div
|
||||
|
||||
@@ -19,7 +19,7 @@ export class NotebookTerminalComponent extends React.Component<NotebookTerminalC
|
||||
super(props);
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="notebookTerminalContainer">
|
||||
<iframe
|
||||
|
||||
@@ -42,7 +42,7 @@ export class GalleryAndNotebookViewerComponent extends React.Component<
|
||||
};
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
if (this.state.notebookUrl) {
|
||||
const props: NotebookViewerComponentProps = {
|
||||
container: this.props.container,
|
||||
|
||||
@@ -149,7 +149,7 @@ export class GalleryViewerComponent extends React.Component<GalleryViewerCompone
|
||||
this.loadFavoriteNotebooks(this.state.searchText, this.state.sortBy, false); // Need this to show correct favorite button state
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
this.traceViewGallery();
|
||||
|
||||
const tabs: GalleryTabInfo[] = [
|
||||
|
||||
@@ -38,7 +38,7 @@ export class InfoComponent extends React.Component<InfoComponentProps> {
|
||||
);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<HoverCard plainCardProps={{ onRenderPlainCard: this.onHover }} instantOpenOnClick type={HoverCardType.plain}>
|
||||
<div className="infoPanelMain">
|
||||
|
||||
@@ -41,7 +41,7 @@ export class NotebookMetadataComponent extends React.Component<NotebookMetadataC
|
||||
);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
|
||||
@@ -132,7 +132,7 @@ export class NotebookViewerComponent
|
||||
}
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="notebookViewerContainer">
|
||||
{this.props.backNavigationText !== undefined ? (
|
||||
|
||||
@@ -62,7 +62,7 @@ export class QueriesGridComponent extends React.Component<QueriesGridComponentPr
|
||||
this.selection.setItems(this.state.filteredResults);
|
||||
}
|
||||
|
||||
public componentDidUpdate(prevProps: QueriesGridComponentProps, prevState: QueriesGridComponentState): void {
|
||||
public override componentDidUpdate(prevProps: QueriesGridComponentProps, prevState: QueriesGridComponentState): void {
|
||||
this.selection.setItems(
|
||||
this.state.filteredResults,
|
||||
!_.isEqual(prevState.filteredResults, this.state.filteredResults)
|
||||
@@ -79,11 +79,11 @@ export class QueriesGridComponent extends React.Component<QueriesGridComponentPr
|
||||
}
|
||||
|
||||
// fetched saved queries when panel open
|
||||
public componentDidMount() {
|
||||
public override componentDidMount() {
|
||||
this.fetchSavedQueries();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
if (this.state.queries.length === 0) {
|
||||
return this.renderBannerComponent();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface RadioSwitchComponentProps {
|
||||
}
|
||||
|
||||
export class RadioSwitchComponent extends React.Component<RadioSwitchComponentProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="radioSwitchComponent">
|
||||
{this.props.choices.map((choice: Choice) => (
|
||||
|
||||
@@ -17,7 +17,7 @@ export abstract class ResizeSensorComponent<P, S> extends React.Component<P, S>
|
||||
protected abstract onDimensionsChanged(width: number, height: number): void;
|
||||
protected abstract getSensorTarget(): HTMLElement;
|
||||
|
||||
public componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
if (this.isSensing) {
|
||||
return;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ export abstract class ResizeSensorComponent<P, S> extends React.Component<P, S>
|
||||
}
|
||||
}
|
||||
|
||||
public componentWillUnmount(): void {
|
||||
public override componentWillUnmount(): void {
|
||||
if (!!this.resizeSensor) {
|
||||
this.resizeSensor.detach();
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
if (this.isCollectionSettingsTab) {
|
||||
this.refreshIndexTransformationProgress();
|
||||
this.loadMongoIndexes();
|
||||
@@ -226,7 +226,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
if (this.props.settingsTab.isActive()) {
|
||||
this.props.settingsTab.getContainer().onUpdateTabsButtons(this.getTabsButtons());
|
||||
}
|
||||
@@ -879,7 +879,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
return mongoIndexingPolicyAADError;
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const scaleComponentProps: ScaleComponentProps = {
|
||||
collection: this.collection,
|
||||
database: this.database,
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from "./SettingsRenderUtils";
|
||||
|
||||
class SettingsRenderUtilsTestComponent extends React.Component {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const estimatedSpendingColumns: IColumn[] = [
|
||||
{ key: "costType", name: "", fieldName: "costType", minWidth: 100, maxWidth: 200, isResizable: true },
|
||||
{ key: "hourly", name: "Hourly", fieldName: "hourly", minWidth: 100, maxWidth: 200, isResizable: true },
|
||||
|
||||
@@ -40,11 +40,11 @@ export class ConflictResolutionComponent extends React.Component<ConflictResolut
|
||||
{ key: DataModels.ConflictResolutionMode.Custom, text: "Merge Procedure (custom)" },
|
||||
];
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ export class ConflictResolutionComponent extends React.Component<ConflictResolut
|
||||
/>
|
||||
);
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<Stack {...subComponentStackProps}>
|
||||
{this.getConflictResolutionModeComponent()}
|
||||
|
||||
@@ -38,7 +38,7 @@ export class IndexingPolicyComponent extends React.Component<
|
||||
};
|
||||
}
|
||||
|
||||
componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
if (this.props.shouldDiscardIndexingPolicy) {
|
||||
this.resetIndexingPolicyEditor();
|
||||
this.props.resetShouldDiscardIndexingPolicy();
|
||||
@@ -46,7 +46,7 @@ export class IndexingPolicyComponent extends React.Component<
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.resetIndexingPolicyEditor();
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export class IndexingPolicyComponent extends React.Component<
|
||||
}
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<Stack {...titleAndInputStackProps}>
|
||||
<IndexingPolicyRefreshComponent
|
||||
|
||||
@@ -52,7 +52,7 @@ export class IndexingPolicyRefreshComponent extends React.Component<
|
||||
}
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return this.renderIndexTransformationWarning() ? (
|
||||
<MessageBar messageBarType={MessageBarType.warning}>{this.renderIndexTransformationWarning()}</MessageBar>
|
||||
) : (
|
||||
|
||||
@@ -61,7 +61,7 @@ export class AddMongoIndexComponent extends React.Component<AddMongoIndexCompone
|
||||
this.descriptionTextField.focus();
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<Stack {...mongoWarningStackProps}>
|
||||
<Stack horizontal tokens={addMongoIndexSubElementsTokens}>
|
||||
|
||||
@@ -89,14 +89,14 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
|
||||
},
|
||||
];
|
||||
|
||||
componentDidUpdate(prevProps: MongoIndexingPolicyComponentProps): void {
|
||||
public override componentDidUpdate(prevProps: MongoIndexingPolicyComponentProps): void {
|
||||
if (this.props.indexesToAdd.length > prevProps.indexesToAdd.length) {
|
||||
this.addMongoIndexComponentRefs[prevProps.indexesToAdd.length]?.current?.focus();
|
||||
}
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ export class MongoIndexingPolicyComponent extends React.Component<MongoIndexingP
|
||||
);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
if (this.props.mongoIndexes) {
|
||||
if (this.hasCompoundIndex()) {
|
||||
return mongoCompoundIndexNotSupportedMessage;
|
||||
|
||||
@@ -216,7 +216,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
|
||||
);
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<Stack {...subComponentStackProps}>
|
||||
{this.isFreeTierAccount() && (
|
||||
|
||||
@@ -72,11 +72,11 @@ export class SubSettingsComponent extends React.Component<SubSettingsComponentPr
|
||||
this.partitionKeyName = userContext.apiType === "Mongo" ? "Shard key" : "Partition key";
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ export class SubSettingsComponent extends React.Component<SubSettingsComponentPr
|
||||
|
||||
public isLargePartitionKeyEnabled = (): boolean => this.props.collection.partitionKey?.version >= 2;
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<Stack {...subComponentStackProps}>
|
||||
{userContext.apiType !== "Cassandra" && this.getTtlComponent()}
|
||||
|
||||
@@ -96,11 +96,11 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
{ key: "false", text: "Manual" },
|
||||
];
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
this.onComponentUpdate();
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
||||
);
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<Stack {...checkBoxAndInputStackProps}>
|
||||
{this.renderWarningMessage()}
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface ToolTipLabelComponentProps {
|
||||
const iconButtonStyles: Partial<IIconStyles> = { root: { marginBottom: -3 } };
|
||||
|
||||
export class ToolTipLabelComponent extends React.Component<ToolTipLabelComponentProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<>
|
||||
<Stack horizontal verticalAlign="center" tokens={toolTipLabelStackTokens}>
|
||||
|
||||
@@ -115,7 +115,7 @@ export class SmartUiComponent extends React.Component<SmartUiComponentProps, Sma
|
||||
fontSize: 12,
|
||||
};
|
||||
|
||||
componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
if (!this.shouldCheckErrors) {
|
||||
this.shouldCheckErrors = true;
|
||||
return;
|
||||
@@ -407,7 +407,7 @@ export class SmartUiComponent extends React.Component<SmartUiComponentProps, Sma
|
||||
);
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return this.renderNode(this.props.descriptor.root);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export class TabComponent extends React.Component<TabComponentProps> {
|
||||
});
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const currentTabContent = this.props.tabs[this.props.currentTabIndex].content;
|
||||
let className = "tabComponentContent";
|
||||
if (currentTabContent.className) {
|
||||
|
||||
@@ -38,7 +38,7 @@ export class ThroughputInput extends React.Component<ThroughputInputProps, Throu
|
||||
this.props.setIsAutoscale(true);
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="throughputInputContainer throughputInputSpacing">
|
||||
<Stack horizontal>
|
||||
|
||||
@@ -56,7 +56,7 @@ export interface TreeComponentProps {
|
||||
}
|
||||
|
||||
export class TreeComponent extends React.Component<TreeComponentProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div style={this.props.style} className={`treeComponent ${this.props.className}`}>
|
||||
<TreeNodeComponent paddingLeft={0} node={this.props.rootNode} generation={0} />
|
||||
@@ -93,7 +93,7 @@ export class TreeNodeComponent extends React.Component<TreeNodeComponentProps, T
|
||||
};
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: TreeNodeComponentProps, prevState: TreeNodeComponentState) {
|
||||
public override componentDidUpdate(prevProps: TreeNodeComponentProps, prevState: TreeNodeComponentState) {
|
||||
// Only call when expand has actually changed
|
||||
if (this.state.isExpanded !== prevState.isExpanded) {
|
||||
if (this.state.isExpanded) {
|
||||
@@ -110,7 +110,7 @@ export class TreeNodeComponent extends React.Component<TreeNodeComponentProps, T
|
||||
}
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return this.renderNode(this.props.node, this.props.generation);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export class EditorNeighborsComponent extends React.Component<EditorNeighborsCom
|
||||
this.addNewEdgeToNeighbor = this.props.isSource ? this.addNewEdgeToSource : this.addNewEdgeToTarget;
|
||||
}
|
||||
|
||||
public componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
// Show empty text boxes by default if no neighbor for convenience
|
||||
if (this.props.editedNeighbors.currentNeighbors.length === 0) {
|
||||
if (this.props.isSource) {
|
||||
@@ -45,7 +45,7 @@ export class EditorNeighborsComponent extends React.Component<EditorNeighborsCom
|
||||
}
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const neighborTitle = this.props.isSource
|
||||
? EditorNeighborsComponent.SOURCE_TITLE
|
||||
: EditorNeighborsComponent.TARGET_TITLE;
|
||||
|
||||
@@ -20,7 +20,7 @@ export class EditorNodePropertiesComponent extends React.Component<EditorNodePro
|
||||
public static readonly VERTEX_PROPERTY_TYPES = ["string", "number", "boolean" /* 'null' */]; // TODO Enable null when fully supported by backend
|
||||
private static readonly DEFAULT_PROPERTY_TYPE = "string";
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<table className="propertyTable">
|
||||
<tbody>
|
||||
|
||||
@@ -965,7 +965,7 @@ export class GraphExplorer extends React.Component<GraphExplorerProps, GraphExpl
|
||||
}
|
||||
|
||||
/* ************* React life-cycle methods *********** */
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const currentTabIndex = ((resultDisplay: ResultDisplay): number => {
|
||||
switch (resultDisplay) {
|
||||
case ResultDisplay.Graph:
|
||||
@@ -1022,10 +1022,10 @@ export class GraphExplorer extends React.Component<GraphExplorerProps, GraphExpl
|
||||
);
|
||||
}
|
||||
|
||||
public componentWillUnmount(): void {
|
||||
public override componentWillUnmount(): void {
|
||||
this.gremlinClient.destroy();
|
||||
}
|
||||
public componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
if (this.props.onLoadStartKey != null && this.props.onLoadStartKey != undefined) {
|
||||
TelemetryProcessor.traceSuccess(
|
||||
Action.Tab,
|
||||
@@ -1069,7 +1069,7 @@ export class GraphExplorer extends React.Component<GraphExplorerProps, GraphExpl
|
||||
}
|
||||
}
|
||||
|
||||
public componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
this.onIsPropertyPaneEditing(this.isPropertyPaneEditing());
|
||||
this.onIsNewVertexDisabledChange(this.isNewVertexDisabled());
|
||||
}
|
||||
|
||||
@@ -18,20 +18,20 @@ export class GraphVizComponent extends React.Component<GraphVizComponentProps> {
|
||||
this.forceGraph = new D3ForceGraph(this.props.forceGraphParams);
|
||||
}
|
||||
|
||||
public componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.forceGraph.init(this.rootNode);
|
||||
}
|
||||
|
||||
public shouldComponentUpdate(): boolean {
|
||||
public override shouldComponentUpdate(): boolean {
|
||||
// Prevents component re-rendering
|
||||
return false;
|
||||
}
|
||||
|
||||
public componentWillUnmount(): void {
|
||||
public override componentWillUnmount(): void {
|
||||
this.forceGraph.destroy();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<svg id="maingraph" ref={(elt: Element) => this.setRef(elt)}>
|
||||
<title>Main Graph</title>
|
||||
|
||||
@@ -18,7 +18,7 @@ interface LeftPaneComponentProps {
|
||||
}
|
||||
|
||||
export class LeftPaneComponent extends React.Component<LeftPaneComponentProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="leftPane">
|
||||
<div className="paneTitle leftPaneResults">Results</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ interface MiddlePaneComponentProps {
|
||||
}
|
||||
|
||||
export class MiddlePaneComponent extends React.Component<MiddlePaneComponentProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="middlePane">
|
||||
<div className="graphTitle">
|
||||
|
||||
@@ -104,7 +104,7 @@ export class NodePropertiesComponent extends React.Component<
|
||||
return null;
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
if (!this.props.node) {
|
||||
return <span />;
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@ export class QueryContainerComponent extends React.Component<
|
||||
};
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="queryContainer">
|
||||
<InputTypeaheadComponent.InputTypeaheadComponent
|
||||
|
||||
@@ -20,7 +20,7 @@ export class ReadOnlyNeighborsComponent extends React.Component<ReadOnlyNeighbor
|
||||
private static readonly NO_TARGETS_LABEL = "No targets found";
|
||||
private static readonly TARGET_TITLE = "Target";
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const neighbors = this.props.isSource ? this.props.node.sources : this.props.node.targets;
|
||||
const noNeighborsLabel = this.props.isSource
|
||||
? ReadOnlyNeighborsComponent.NO_SOURCES_LABEL
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface ReadOnlyNodePropertiesComponentProps {
|
||||
}
|
||||
|
||||
export class ReadOnlyNodePropertiesComponent extends React.Component<ReadOnlyNodePropertiesComponentProps> {
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<table className="roPropertyTable propertyTable">
|
||||
<tbody>
|
||||
|
||||
@@ -10,17 +10,17 @@ interface MemoryTrackerProps {
|
||||
export class MemoryTrackerComponent extends React.Component<MemoryTrackerProps> {
|
||||
private memoryUsageInfoSubscription: Subscription;
|
||||
|
||||
public componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.memoryUsageInfoSubscription = this.props.memoryUsageInfo.subscribe(() => {
|
||||
this.forceUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
public componentWillUnmount(): void {
|
||||
public override componentWillUnmount(): void {
|
||||
this.memoryUsageInfoSubscription && this.memoryUsageInfoSubscription.dispose();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const memoryUsageInfo: MemoryUsageInfo = this.props.memoryUsageInfo();
|
||||
if (!memoryUsageInfo) {
|
||||
return (
|
||||
|
||||
@@ -23,7 +23,7 @@ export class ControlBarComponent extends React.Component<ControlBarComponentProp
|
||||
);
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
if (!this.props.buttons || this.props.buttons.length < 1) {
|
||||
return <React.Fragment />;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class NotificationConsoleComponent extends React.Component<
|
||||
this.prevHeaderStatus = undefined;
|
||||
}
|
||||
|
||||
public componentDidUpdate(
|
||||
public override componentDidUpdate(
|
||||
prevProps: NotificationConsoleComponentProps,
|
||||
prevState: NotificationConsoleComponentState
|
||||
): void {
|
||||
@@ -102,7 +102,7 @@ export class NotificationConsoleComponent extends React.Component<
|
||||
this.consoleHeaderElement = element;
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const numInProgress = this.state.allConsoleData.filter(
|
||||
(data: ConsoleData) => data.type === ConsoleDataType.InProgress
|
||||
).length;
|
||||
|
||||
@@ -6,11 +6,11 @@ import { default as Contents } from "./contents";
|
||||
export class NotebookComponent extends React.Component<{ contentRef: ContentRef }> {
|
||||
notificationSystem!: ReactNotificationSystem;
|
||||
|
||||
shouldComponentUpdate(nextProps: { contentRef: ContentRef }): boolean {
|
||||
public override shouldComponentUpdate(nextProps: { contentRef: ContentRef }): boolean {
|
||||
return nextProps.contentRef !== this.props.contentRef;
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="notebookComponentContainer">
|
||||
<Contents contentRef={this.props.contentRef} />
|
||||
|
||||
@@ -53,7 +53,7 @@ export class NotebookComponentAdapter extends NotebookComponentBootstrapper impl
|
||||
};
|
||||
}
|
||||
|
||||
protected renderExtraComponent = (): JSX.Element => {
|
||||
protected override renderExtraComponent = (): JSX.Element => {
|
||||
return <VirtualCommandBarComponent contentRef={this.contentRef} onRender={this.onUpdateKernelInfo} />;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class VirtualCommandBarComponent extends React.Component<VirtualCommandBarCompon
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps: VirtualCommandBarComponentProps): boolean {
|
||||
public override shouldComponentUpdate(nextProps: VirtualCommandBarComponentProps): boolean {
|
||||
return (
|
||||
this.props.kernelStatus !== nextProps.kernelStatus ||
|
||||
this.props.kernelSpecName !== nextProps.kernelSpecName ||
|
||||
@@ -24,7 +24,7 @@ class VirtualCommandBarComponent extends React.Component<VirtualCommandBarCompon
|
||||
);
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
this.props.onRender && this.props.onRender();
|
||||
return <></>;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export class File extends React.PureComponent<FileProps> {
|
||||
return choice;
|
||||
};
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const choice = this.getChoice();
|
||||
|
||||
// Right now we only handle one kind of editor
|
||||
|
||||
@@ -35,7 +35,7 @@ interface TextFileState {
|
||||
}
|
||||
|
||||
class EditorPlaceholder extends React.PureComponent<MonacoEditorProps> {
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
// TODO: Show a little blocky placeholder
|
||||
return null;
|
||||
}
|
||||
@@ -53,13 +53,13 @@ export class TextFile extends React.PureComponent<TextFileProps, TextFileState>
|
||||
this.props.handleChange(source);
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
import(/* webpackChunkName: "monaco-editor" */ "@nteract/monaco-editor").then((module) => {
|
||||
this.setState({ Editor: module.default });
|
||||
});
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const Editor = this.state.Editor;
|
||||
|
||||
return (
|
||||
|
||||
@@ -54,7 +54,7 @@ class Contents extends React.PureComponent<ContentsProps> {
|
||||
SAVE: ["ctrl+s", "ctrl+shift+s", "meta+s", "meta+shift+s"],
|
||||
};
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const { contentRef, handlers } = this.props;
|
||||
|
||||
if (!contentRef) {
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface NotebookRendererProps {
|
||||
* This is the class that uses nteract to render a read-only notebook.
|
||||
*/
|
||||
class NotebookReadOnlyRenderer extends React.Component<NotebookRendererProps> {
|
||||
componentDidMount() {
|
||||
public override componentDidMount() {
|
||||
if (!userContext.features.sandboxNotebookOutputs) {
|
||||
loadTransform(this.props as any);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ class NotebookReadOnlyRenderer extends React.Component<NotebookRendererProps> {
|
||||
);
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className="NotebookReadOnlyRender">
|
||||
<Cells contentRef={this.props.contentRef}>
|
||||
|
||||
@@ -68,22 +68,22 @@ class BaseNotebookRenderer extends React.Component<NotebookRendererProps> {
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
public override componentDidMount() {
|
||||
if (!userContext.features.sandboxNotebookOutputs) {
|
||||
loadTransform(this.props as any);
|
||||
}
|
||||
this.props.updateNotebookParentDomElt(this.props.contentRef, this.notebookRendererRef.current);
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
public override componentDidUpdate() {
|
||||
this.props.updateNotebookParentDomElt(this.props.contentRef, this.notebookRendererRef.current);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
public override componentWillUnmount() {
|
||||
this.props.updateNotebookParentDomElt(this.props.contentRef, undefined);
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<>
|
||||
<div className="NotebookRendererContainer">
|
||||
|
||||
@@ -36,7 +36,7 @@ interface DispatchProps {
|
||||
type Props = StateProps & DispatchProps & ComponentProps;
|
||||
|
||||
export class PromptPure extends React.Component<Props> {
|
||||
render() {
|
||||
public override render() {
|
||||
return (
|
||||
<div className="nteract-cell-prompt">
|
||||
{this.props.children({
|
||||
|
||||
@@ -45,14 +45,14 @@ const BarContainer = styled.div`
|
||||
`;
|
||||
|
||||
export class StatusBar extends React.Component<Props> {
|
||||
shouldComponentUpdate(nextProps: Props): boolean {
|
||||
public override shouldComponentUpdate(nextProps: Props): boolean {
|
||||
if (this.props.lastSaved !== nextProps.lastSaved || this.props.kernelStatus !== nextProps.kernelStatus) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
render() {
|
||||
public override render() {
|
||||
const name = this.props.kernelSpecDisplayName || "Loading...";
|
||||
|
||||
return (
|
||||
|
||||
@@ -37,7 +37,7 @@ interface StateProps {
|
||||
class BaseToolbar extends React.PureComponent<ComponentProps & DispatchProps & StateProps> {
|
||||
static contextType = CellToolbarContext;
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
let items: IContextualMenuItem[] = [];
|
||||
|
||||
if (this.props.cellType === "code") {
|
||||
|
||||
@@ -132,7 +132,7 @@ export class PureCellCreator extends React.PureComponent<CellCreatorProps> {
|
||||
this.props.createCell("code", this.props.above);
|
||||
};
|
||||
|
||||
render() {
|
||||
public override render() {
|
||||
return (
|
||||
<CreatorHoverMask>
|
||||
<CreatorHoverRegion>
|
||||
@@ -171,7 +171,7 @@ class CellCreator extends React.PureComponent<ComponentProps & DispatchProps & S
|
||||
: createCellBelow({ cellType: type, id, source: "", contentRef });
|
||||
};
|
||||
|
||||
render() {
|
||||
public override render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{this.props.isFirstCell && (
|
||||
|
||||
@@ -19,7 +19,7 @@ interface StateProps {
|
||||
* Displays "Cell <index>"
|
||||
*/
|
||||
class CellLabeler extends React.Component<ComponentProps & StateProps> {
|
||||
render() {
|
||||
public override render() {
|
||||
return (
|
||||
<div className="CellLabeler">
|
||||
<div className="CellLabel">Cell {this.props.cellIndex + 1}</div>
|
||||
|
||||
@@ -20,7 +20,7 @@ interface DispatchProps {
|
||||
* HoverableCell sets the hovered cell
|
||||
*/
|
||||
class HoverableCell extends React.Component<ComponentProps & DispatchProps> {
|
||||
render() {
|
||||
public override render() {
|
||||
return (
|
||||
<div className="HoverableCell" onMouseEnter={this.props.hover} onMouseLeave={this.props.unHover}>
|
||||
{this.props.children}
|
||||
|
||||
@@ -173,11 +173,11 @@ function collectTarget(
|
||||
export class DraggableCellView extends React.Component<Props & DnDSourceProps & DnDTargetProps, State> {
|
||||
el?: HTMLDivElement | null;
|
||||
|
||||
state = {
|
||||
public override state = {
|
||||
hoverUpperHalf: true,
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
const connectDragPreview = this.props.connectDragPreview;
|
||||
const img = new (window as any).Image();
|
||||
|
||||
@@ -193,7 +193,7 @@ export class DraggableCellView extends React.Component<Props & DnDSourceProps &
|
||||
focusCell({ id, contentRef });
|
||||
};
|
||||
|
||||
render() {
|
||||
public override render() {
|
||||
return this.props.connectDropTarget(
|
||||
// Sadly connectDropTarget _has_ to take a React element for a DOM element (no styled-divs)
|
||||
<div>
|
||||
|
||||
@@ -47,15 +47,15 @@ export class HijackScroll extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
public override componentDidUpdate(prevProps: Props) {
|
||||
this.scrollIntoViewIfNeeded(prevProps.focused);
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.scrollIntoViewIfNeeded();
|
||||
}
|
||||
|
||||
render() {
|
||||
public override render() {
|
||||
return (
|
||||
<div
|
||||
onClick={this.props.selectCell}
|
||||
|
||||
@@ -31,18 +31,18 @@ export class KeyboardShortcuts extends React.Component<Props> {
|
||||
this.keyDown = this.keyDown.bind(this);
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps: Props) {
|
||||
public override shouldComponentUpdate(nextProps: Props) {
|
||||
const newContentRef = this.props.contentRef !== nextProps.contentRef;
|
||||
const newFocusedCell = this.props.focusedCell !== nextProps.focusedCell;
|
||||
const newCellOrder = this.props.cellOrder && this.props.cellOrder.size !== nextProps.cellOrder.size;
|
||||
return newContentRef || newFocusedCell || newCellOrder;
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
document.addEventListener("keydown", this.keyDown);
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
public override componentWillUnmount(): void {
|
||||
document.removeEventListener("keydown", this.keyDown);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export class KeyboardShortcuts extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
public override render() {
|
||||
return <React.Fragment>{this.props.children}</React.Fragment>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export const Source = styled(BareSource)`
|
||||
width: -moz-available;
|
||||
`;
|
||||
export class PureMarkdownCell extends React.Component<ComponentProps & DispatchProps & StateProps> {
|
||||
render() {
|
||||
public override render() {
|
||||
const { contentRef, id, cell, children } = this.props;
|
||||
|
||||
const { isEditorFocused, isCellFocused, markdownOptions } = this.props;
|
||||
|
||||
@@ -33,7 +33,7 @@ interface DispatchProps {
|
||||
export class SandboxOutputs extends React.PureComponent<ComponentProps & StateProps & DispatchProps> {
|
||||
private childWindow: Window;
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
// Using min-width to set the width of the iFrame, works around an issue in iOS that can prevent the iFrame from sizing correctly.
|
||||
return (
|
||||
<IframeResizer
|
||||
@@ -72,11 +72,11 @@ export class SandboxOutputs extends React.PureComponent<ComponentProps & StatePr
|
||||
postRobot.send(this.childWindow, "props", props);
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.sendPropsToFrame();
|
||||
}
|
||||
|
||||
componentDidUpdate(): void {
|
||||
public override componentDidUpdate(): void {
|
||||
this.sendPropsToFrame();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export class SchemaAnalyzerComponent extends React.Component<
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
loadTransform(this.props);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ export class SchemaAnalyzerComponent extends React.Component<
|
||||
this.props.runCell(this.props.contentRef, this.props.firstCellId);
|
||||
};
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const { firstCellId: id, contentRef, kernelStatus, outputs } = this.props;
|
||||
if (!id) {
|
||||
return <></>;
|
||||
|
||||
@@ -71,7 +71,7 @@ export class SchemaAnalyzerComponentAdapter extends NotebookComponentBootstrappe
|
||||
}
|
||||
}
|
||||
|
||||
public renderComponent(): JSX.Element {
|
||||
public override renderComponent(): JSX.Element {
|
||||
const props = {
|
||||
contentRef: this.contentRef,
|
||||
kernelRef: this.kernelRef,
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
public collectionWithThroughputInShared: ko.Observable<boolean>;
|
||||
public databaseCreateNewShared: ko.Observable<boolean>;
|
||||
public databaseHasSharedOffer: ko.Observable<boolean>;
|
||||
public formErrorsDetails: ko.Observable<string>;
|
||||
public override formErrorsDetails: ko.Observable<string>;
|
||||
public formWarnings: ko.Observable<string>;
|
||||
public partitionKey: ko.Observable<string>;
|
||||
public partitionKeyName: ko.Computed<string>;
|
||||
@@ -658,7 +658,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
return true;
|
||||
};
|
||||
|
||||
public async open(databaseId?: string) {
|
||||
public override async open(databaseId?: string) {
|
||||
super.open();
|
||||
// TODO: Figure out if a database level partition split is about to happen once shared throughput read is available
|
||||
this.formWarnings("");
|
||||
@@ -752,7 +752,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
return this._getThroughput();
|
||||
}
|
||||
|
||||
public submit() {
|
||||
public override submit() {
|
||||
if (!this.isValid()) {
|
||||
return;
|
||||
}
|
||||
@@ -912,7 +912,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
);
|
||||
}
|
||||
|
||||
public resetData() {
|
||||
public override resetData() {
|
||||
this.collectionId("");
|
||||
this.databaseId("");
|
||||
this.partitionKey("");
|
||||
|
||||
@@ -91,7 +91,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
||||
};
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<form className="panelFormWrapper" onSubmit={this.submit.bind(this)}>
|
||||
{this.state.errorMessage && (
|
||||
|
||||
@@ -23,7 +23,7 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
public databaseIdTooltipText: ko.Computed<string>;
|
||||
public databaseLevelThroughputTooltipText: ko.Computed<string>;
|
||||
public databaseCreateNewShared: ko.Observable<boolean>;
|
||||
public formErrorsDetails: ko.Observable<string>;
|
||||
public override formErrorsDetails: ko.Observable<string>;
|
||||
public throughput: ViewModels.Editable<number>;
|
||||
public maxThroughputRU: ko.Observable<number>;
|
||||
public minThroughputRU: ko.Observable<number>;
|
||||
@@ -255,7 +255,7 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
return true;
|
||||
};
|
||||
|
||||
public open() {
|
||||
public override open() {
|
||||
super.open();
|
||||
this.resetData();
|
||||
const addDatabasePaneOpenMessage = {
|
||||
@@ -272,7 +272,7 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
TelemetryProcessor.trace(Action.CreateDatabase, ActionModifiers.Open, addDatabasePaneOpenMessage);
|
||||
}
|
||||
|
||||
public submit() {
|
||||
public override submit() {
|
||||
if (!this._isValid()) {
|
||||
return;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
);
|
||||
}
|
||||
|
||||
public resetData() {
|
||||
public override resetData() {
|
||||
this.databaseId("");
|
||||
this.databaseCreateNewShared(this.getSharedThroughputDefault());
|
||||
this.isAutoPilotSelected(this.container.isAutoscaleDefaultEnabled());
|
||||
|
||||
@@ -279,7 +279,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
}
|
||||
}
|
||||
|
||||
public open() {
|
||||
public override open() {
|
||||
super.open();
|
||||
if (!this.container.isServerlessEnabled()) {
|
||||
this.isAutoPilotSelected(this.container.isAutoscaleDefaultEnabled());
|
||||
@@ -306,7 +306,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
TelemetryProcessor.trace(Action.CreateCollection, ActionModifiers.Open, addCollectionPaneOpenMessage);
|
||||
}
|
||||
|
||||
public submit() {
|
||||
public override submit() {
|
||||
if (!this._isValid()) {
|
||||
return;
|
||||
}
|
||||
@@ -436,7 +436,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
);
|
||||
}
|
||||
|
||||
public resetData() {
|
||||
public override resetData() {
|
||||
super.resetData();
|
||||
const throughputDefaults = this.container.collectionCreationDefaults.throughput;
|
||||
this.isAutoPilotSelected(this.container.isAutoscaleDefaultEnabled());
|
||||
|
||||
@@ -98,7 +98,7 @@ export class GitHubReposPanel extends React.Component<IGitHubReposPanelProps, IG
|
||||
this.junoClient = this.props.junoClientProp;
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
this.open();
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ export class GitHubReposPanel extends React.Component<IGitHubReposPanelProps, IG
|
||||
this.props.explorer.notebookManager?.gitHubOAuthService.startOAuth(scope);
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<form className="panelFormWrapper">
|
||||
{this.state.errorMessage && (
|
||||
|
||||
@@ -61,7 +61,7 @@ export default class GraphStylingPane extends ContextualPaneBase {
|
||||
this.remoteConfig = config;
|
||||
}
|
||||
|
||||
public close() {
|
||||
public override close() {
|
||||
this.remoteConfig = null;
|
||||
super.close();
|
||||
}
|
||||
|
||||
@@ -27,15 +27,15 @@ export class PanelContainerComponent extends React.Component<PanelContainerProps
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
public override componentDidMount(): void {
|
||||
window.addEventListener("resize", () => this.setState({ height: this.getPanelHeight() }));
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
public override componentWillUnmount(): void {
|
||||
window.removeEventListener("resize", () => this.setState({ height: this.getPanelHeight() }));
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
if (!this.props.panelContent) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class KeyValidator implements ValueValidator {
|
||||
class BooleanValueValidator extends ValueValidator {
|
||||
private detailedHelp = "Enter true or false."; // localize
|
||||
|
||||
public validate(value: string): IValidationResult {
|
||||
public override validate(value: string): IValidationResult {
|
||||
var success: boolean = false;
|
||||
var help: string = noHelp;
|
||||
|
||||
@@ -66,7 +66,7 @@ class BooleanValueValidator extends ValueValidator {
|
||||
return { isInvalid: !success, help: help };
|
||||
}
|
||||
|
||||
public parseValue(value: string): boolean {
|
||||
public override parseValue(value: string): boolean {
|
||||
// OData seems to require lowercase boolean values, see http://www.odata.org/documentation/odata-version-2-0/overview/
|
||||
return value.toString().toLowerCase() === "true";
|
||||
}
|
||||
@@ -75,7 +75,7 @@ class BooleanValueValidator extends ValueValidator {
|
||||
class DateTimeValueValidator extends ValueValidator {
|
||||
private detailedHelp = "Enter a date and time."; // localize
|
||||
|
||||
public validate(value: string): IValidationResult {
|
||||
public override validate(value: string): IValidationResult {
|
||||
var success: boolean = false;
|
||||
var help: string = noHelp;
|
||||
|
||||
@@ -93,7 +93,7 @@ class DateTimeValueValidator extends ValueValidator {
|
||||
return { isInvalid: !success, help: help };
|
||||
}
|
||||
|
||||
public parseValue(value: string): Date {
|
||||
public override parseValue(value: string): Date {
|
||||
var millisecondTime = Date.parse(value);
|
||||
var parsed: Date = new Date(millisecondTime);
|
||||
|
||||
@@ -104,7 +104,7 @@ class DateTimeValueValidator extends ValueValidator {
|
||||
class DoubleValueValidator extends ValueValidator {
|
||||
private detailedHelp = "Enter a 64-bit floating point value."; // localize
|
||||
|
||||
public validate(value: string): IValidationResult {
|
||||
public override validate(value: string): IValidationResult {
|
||||
var success: boolean = false;
|
||||
var help: string = noHelp;
|
||||
|
||||
@@ -119,7 +119,7 @@ class DoubleValueValidator extends ValueValidator {
|
||||
return { isInvalid: !success, help: help };
|
||||
}
|
||||
|
||||
public parseValue(value: string): number {
|
||||
public override parseValue(value: string): number {
|
||||
return parseFloat(value);
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ class DoubleValueValidator extends ValueValidator {
|
||||
class GuidValueValidator extends ValueValidator {
|
||||
private detailedHelp = "Enter a 16-byte (128-bit) GUID value."; // localize
|
||||
|
||||
public validate(value: string): IValidationResult {
|
||||
public override validate(value: string): IValidationResult {
|
||||
var success: boolean = false;
|
||||
var help: string = noHelp;
|
||||
|
||||
@@ -155,7 +155,7 @@ class IntegerValueValidator extends ValueValidator {
|
||||
this.isInt64 = isInt64;
|
||||
}
|
||||
|
||||
public validate(value: string): IValidationResult {
|
||||
public override validate(value: string): IValidationResult {
|
||||
var success: boolean = false;
|
||||
var help: string = noHelp;
|
||||
|
||||
@@ -180,7 +180,7 @@ class IntegerValueValidator extends ValueValidator {
|
||||
return { isInvalid: !success, help: help };
|
||||
}
|
||||
|
||||
public parseValue(value: string): number {
|
||||
public override parseValue(value: string): number {
|
||||
return parseInt(value, 10);
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@ class StringValidator extends ValueValidator {
|
||||
this.isRequired = isRequired;
|
||||
}
|
||||
|
||||
public validate(value: string): IValidationResult {
|
||||
public override validate(value: string): IValidationResult {
|
||||
var help: string = this.isRequired ? this.isRequiredHelp : this.detailedHelp;
|
||||
if (value === null) {
|
||||
return { isInvalid: false, help: help };
|
||||
@@ -219,7 +219,7 @@ class StringValidator extends ValueValidator {
|
||||
return { isInvalid: !success, help: help };
|
||||
}
|
||||
|
||||
public parseValue(value: string): string {
|
||||
public override parseValue(value: string): string {
|
||||
return String(value); // Ensure value is converted to string.
|
||||
}
|
||||
}
|
||||
@@ -233,12 +233,12 @@ class NotSupportedValidator extends ValueValidator {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public validate(ignoredValue: string): IValidationResult {
|
||||
public override validate(ignoredValue: string): IValidationResult {
|
||||
//throw new Errors.NotSupportedError(this.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
public parseValue(ignoredValue: string): any {
|
||||
public override parseValue(ignoredValue: string): any {
|
||||
//throw new Errors.NotSupportedError(this.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
|
||||
this.subscriptions = [];
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
public override componentWillUnmount() {
|
||||
while (this.subscriptions.length) {
|
||||
this.subscriptions.pop().dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
public override componentDidMount() {
|
||||
this.subscriptions.push(
|
||||
this.container.selectedNode.subscribe(() => this.setState({})),
|
||||
this.container.isNotebookEnabled.subscribe(() => this.setState({}))
|
||||
@@ -68,7 +68,7 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
|
||||
this.setState({});
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
public override render(): JSX.Element {
|
||||
const mainItems = this.createMainItems();
|
||||
const commonTaskItems = this.createCommonTaskItems();
|
||||
const recentItems = this.createRecentItems();
|
||||
|
||||
@@ -107,7 +107,7 @@ export default class TableEntityListViewModel extends DataTableViewModel {
|
||||
public cqlQuery: ko.Observable<string>;
|
||||
public oDataQuery: ko.Observable<string>;
|
||||
public sqlQuery: ko.Observable<string>;
|
||||
public cache: TableEntityCache;
|
||||
public override cache: TableEntityCache;
|
||||
public isCancelled: boolean = false;
|
||||
public queryErrorMessage: ko.Observable<string>;
|
||||
public id: string;
|
||||
@@ -386,7 +386,7 @@ export default class TableEntityListViewModel extends DataTableViewModel {
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
protected matchesKeys(item: Entities.ITableEntity, itemKeys: Entities.IProperty[]): boolean {
|
||||
protected override matchesKeys(item: Entities.ITableEntity, itemKeys: Entities.IProperty[]): boolean {
|
||||
return itemKeys.every((property: Entities.IProperty) => {
|
||||
return this.stringCompare(item[property.key]._, property.value);
|
||||
});
|
||||
|
||||
@@ -415,12 +415,12 @@ export default class ConflictsTab extends TabsBase {
|
||||
return Q();
|
||||
}
|
||||
|
||||
public onTabClick(): void {
|
||||
public override onTabClick(): void {
|
||||
super.onTabClick();
|
||||
this.collection && this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.Conflicts);
|
||||
}
|
||||
|
||||
public async onActivate(): Promise<void> {
|
||||
public override async onActivate(): Promise<void> {
|
||||
super.onActivate();
|
||||
|
||||
if (!this._documentsIterator) {
|
||||
@@ -587,7 +587,7 @@ export default class ConflictsTab extends TabsBase {
|
||||
return Q();
|
||||
}
|
||||
|
||||
protected getTabsButtons(): CommandButtonComponentProps[] {
|
||||
protected override getTabsButtons(): CommandButtonComponentProps[] {
|
||||
const buttons: CommandButtonComponentProps[] = [];
|
||||
const label = this._acceptButtonLabel();
|
||||
if (this.acceptChangesButton.visible()) {
|
||||
|
||||
@@ -583,12 +583,12 @@ export default class DocumentsTab extends TabsBase {
|
||||
return Q();
|
||||
}
|
||||
|
||||
public onTabClick(): void {
|
||||
public override onTabClick(): void {
|
||||
super.onTabClick();
|
||||
this.collection && this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.Documents);
|
||||
}
|
||||
|
||||
public async onActivate(): Promise<void> {
|
||||
public async override onActivate(): Promise<void> {
|
||||
super.onActivate();
|
||||
|
||||
if (!this._documentsIterator) {
|
||||
@@ -788,7 +788,7 @@ export default class DocumentsTab extends TabsBase {
|
||||
return QueryUtils.buildDocumentsQuery(filter, this.partitionKeyProperty, this.partitionKey);
|
||||
}
|
||||
|
||||
protected getTabsButtons(): CommandButtonComponentProps[] {
|
||||
protected override getTabsButtons(): CommandButtonComponentProps[] {
|
||||
const buttons: CommandButtonComponentProps[] = [];
|
||||
const label = !this.isPreferredApiMongoDB ? "New Item" : "New Document";
|
||||
if (this.newDocumentButton.visible()) {
|
||||
|
||||
@@ -27,7 +27,7 @@ export default class GalleryTab extends TabsBase {
|
||||
return <GalleryViewer {...this.props} sortBy={SortBy.MostRecent} searchText={undefined} />;
|
||||
}
|
||||
|
||||
public getContainer(): Explorer {
|
||||
public override getContainer(): Explorer {
|
||||
return this.props.container;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ export default class GraphTab extends TabsBase {
|
||||
);
|
||||
}
|
||||
|
||||
public onTabClick(): void {
|
||||
public override onTabClick(): void {
|
||||
super.onTabClick();
|
||||
this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.Graph);
|
||||
}
|
||||
@@ -226,7 +226,7 @@ export default class GraphTab extends TabsBase {
|
||||
this.graphConfigUiData.nodeIconChoice(this.graphConfigUiData.nodePropertiesWithNone()[0]);
|
||||
}
|
||||
}
|
||||
protected getTabsButtons(): CommandButtonComponentProps[] {
|
||||
protected override getTabsButtons(): CommandButtonComponentProps[] {
|
||||
const label = "New Vertex";
|
||||
const buttons: CommandButtonComponentProps[] = [
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ import ObjectId from "../Tree/ObjectId";
|
||||
import DocumentsTab from "./DocumentsTab";
|
||||
|
||||
export default class MongoDocumentsTab extends DocumentsTab {
|
||||
public collection: ViewModels.Collection;
|
||||
public override collection: ViewModels.Collection;
|
||||
private continuationToken: string;
|
||||
|
||||
constructor(options: ViewModels.DocumentsTabOptions) {
|
||||
@@ -43,7 +43,7 @@ export default class MongoDocumentsTab extends DocumentsTab {
|
||||
super.buildCommandBarOptions();
|
||||
}
|
||||
|
||||
public onSaveNewDocumentClick = (): Promise<any> => {
|
||||
public override onSaveNewDocumentClick = (): Promise<any> => {
|
||||
const documentContent = JSON.parse(this.selectedDocumentContent());
|
||||
this.displayedError("");
|
||||
const startKey: number = TelemetryProcessor.traceStart(Action.CreateDocument, {
|
||||
@@ -127,7 +127,7 @@ export default class MongoDocumentsTab extends DocumentsTab {
|
||||
.finally(() => this.isExecuting(false));
|
||||
};
|
||||
|
||||
public onSaveExisitingDocumentClick = (): Promise<any> => {
|
||||
public override onSaveExisitingDocumentClick = (): Promise<any> => {
|
||||
const selectedDocumentId = this.selectedDocumentId();
|
||||
const documentContent = this.selectedDocumentContent();
|
||||
this.isExecutionError(false);
|
||||
@@ -185,17 +185,17 @@ export default class MongoDocumentsTab extends DocumentsTab {
|
||||
.finally(() => this.isExecuting(false));
|
||||
};
|
||||
|
||||
public buildQuery(filter: string): string {
|
||||
public override buildQuery(filter: string): string {
|
||||
return filter || "{}";
|
||||
}
|
||||
|
||||
public async selectDocument(documentId: DocumentId): Promise<void> {
|
||||
public override async selectDocument(documentId: DocumentId): Promise<void> {
|
||||
this.selectedDocumentId(documentId);
|
||||
const content = await readDocument(this.collection.databaseId, this.collection, documentId);
|
||||
this.initDocumentEditor(documentId, content);
|
||||
}
|
||||
|
||||
public loadNextPage(): Q.Promise<any> {
|
||||
public override loadNextPage(): Q.Promise<any> {
|
||||
this.isExecuting(true);
|
||||
this.isExecutionError(false);
|
||||
const filter: string = this.filterContent().trim();
|
||||
@@ -264,7 +264,7 @@ export default class MongoDocumentsTab extends DocumentsTab {
|
||||
.finally(() => this.isExecuting(false));
|
||||
}
|
||||
|
||||
protected _onEditorContentChange(newContent: string) {
|
||||
protected override _onEditorContentChange(newContent: string) {
|
||||
try {
|
||||
if (
|
||||
this.editorState() === ViewModels.DocumentExplorerState.newDocumentValid ||
|
||||
@@ -281,7 +281,7 @@ export default class MongoDocumentsTab extends DocumentsTab {
|
||||
}
|
||||
|
||||
/** Renders a Javascript object to be displayed inside Monaco Editor */
|
||||
protected renderObjectForEditor(value: any, replacer: any, space: string | number): string {
|
||||
protected override renderObjectForEditor(value: any, replacer: any, space: string | number): string {
|
||||
return MongoUtility.tojson(value, null, false);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ export default class MongoDocumentsTab extends DocumentsTab {
|
||||
return partitionKey;
|
||||
}
|
||||
|
||||
protected __deleteDocument(documentId: DocumentId): Promise<void> {
|
||||
protected override __deleteDocument(documentId: DocumentId): Promise<void> {
|
||||
return deleteDocument(this.collection.databaseId, this.collection, documentId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { queryIterator } from "../../Common/MongoProxyClient";
|
||||
import { MinimalQueryIterator } from "../../Common/IteratorUtilities";
|
||||
|
||||
export default class MongoQueryTab extends QueryTab {
|
||||
public collection: ViewModels.Collection;
|
||||
public override collection: ViewModels.Collection;
|
||||
|
||||
constructor(options: ViewModels.QueryTabOptions) {
|
||||
options.queryText = ""; // override sql query editor content for now so we only display mongo related help items
|
||||
@@ -16,11 +16,11 @@ export default class MongoQueryTab extends QueryTab {
|
||||
this.monacoSettings = new ViewModels.MonacoEditorSettings("plaintext", false);
|
||||
}
|
||||
/** Renders a Javascript object to be displayed inside Monaco Editor */
|
||||
protected renderObjectForEditor(value: any, replacer: any, space: string | number): string {
|
||||
protected override renderObjectForEditor(value: any, replacer: any, space: string | number): string {
|
||||
return MongoUtility.tojson(value, null, false);
|
||||
}
|
||||
|
||||
protected _initIterator(): Q.Promise<MinimalQueryIterator> {
|
||||
protected override _initIterator(): Q.Promise<MinimalQueryIterator> {
|
||||
let options: any = {};
|
||||
options.enableCrossPartitionQuery = HeadersUtility.shouldEnableCrossPartitionKey();
|
||||
this._iterator = queryIterator(this.collection.databaseId, this.collection, this.sqlStatementToExecute());
|
||||
|
||||
@@ -51,7 +51,7 @@ export default class MongoShellTab extends TabsBase {
|
||||
// }
|
||||
}
|
||||
|
||||
public onTabClick(): void {
|
||||
public override onTabClick(): void {
|
||||
super.onTabClick();
|
||||
this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.Documents);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export default class NotebookTabBase extends TabsBase {
|
||||
/**
|
||||
* Override base behavior
|
||||
*/
|
||||
public getContainer(): Explorer {
|
||||
public override getContainer(): Explorer {
|
||||
return this.container;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ export default class NotebookTabV2 extends NotebookTabBase {
|
||||
});
|
||||
}
|
||||
|
||||
public onCloseTabButtonClick(): Q.Promise<any> {
|
||||
public override onCloseTabButtonClick(): Q.Promise<any> {
|
||||
const cleanup = () => {
|
||||
this.notebookComponentAdapter.notebookShutdown();
|
||||
super.onCloseTabButtonClick();
|
||||
@@ -92,7 +92,7 @@ export default class NotebookTabV2 extends NotebookTabBase {
|
||||
return await this.configureServiceEndpoints(this.notebookComponentAdapter.getCurrentKernelName());
|
||||
}
|
||||
|
||||
protected getTabsButtons(): CommandButtonComponentProps[] {
|
||||
public override getTabsButtons(): CommandButtonComponentProps[] {
|
||||
const availableKernels = NotebookTabV2.clientManager.getAvailableKernelSpecs();
|
||||
|
||||
const saveLabel = "Save";
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class QueryTab extends TabsBase implements ViewModels.WaitsForTem
|
||||
public allResultsMetadata: ko.ObservableArray<ViewModels.QueryResultsMetadata>;
|
||||
public showingDocumentsDisplayText: ko.Observable<string>;
|
||||
public requestChargeDisplayText: ko.Observable<string>;
|
||||
public isTemplateReady: ko.Observable<boolean>;
|
||||
public override isTemplateReady: ko.Observable<boolean>;
|
||||
public splitterId: string;
|
||||
public splitter: Splitter;
|
||||
public isPreferredApiMongoDB: boolean;
|
||||
@@ -165,7 +165,7 @@ export default class QueryTab extends TabsBase implements ViewModels.WaitsForTem
|
||||
this._buildCommandBarOptions();
|
||||
}
|
||||
|
||||
public onTabClick(): void {
|
||||
public override onTabClick(): void {
|
||||
super.onTabClick();
|
||||
this.collection && this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.Query);
|
||||
}
|
||||
@@ -197,13 +197,13 @@ export default class QueryTab extends TabsBase implements ViewModels.WaitsForTem
|
||||
await this._executeQueryDocumentsPage(firstResultIndex + itemCount - 1);
|
||||
}
|
||||
|
||||
public onErrorDetailsClick = (src: any, event: MouseEvent): boolean => {
|
||||
public override onErrorDetailsClick = (src: any, event: MouseEvent): boolean => {
|
||||
this.collection && this.collection.container.expandConsole();
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
public onErrorDetailsKeyPress = (src: any, event: KeyboardEvent): boolean => {
|
||||
public override onErrorDetailsKeyPress = (src: any, event: KeyboardEvent): boolean => {
|
||||
if (event.keyCode === Constants.KeyCodes.Space || event.keyCode === Constants.KeyCodes.Enter) {
|
||||
this.onErrorDetailsClick(src, null);
|
||||
return false;
|
||||
@@ -553,7 +553,7 @@ export default class QueryTab extends TabsBase implements ViewModels.WaitsForTem
|
||||
return csvData;
|
||||
}
|
||||
|
||||
protected getTabsButtons(): CommandButtonComponentProps[] {
|
||||
public override getTabsButtons(): CommandButtonComponentProps[] {
|
||||
const buttons: CommandButtonComponentProps[] = [];
|
||||
if (this.executeQueryButton.visible()) {
|
||||
const label = this._executeQueryButtonTitle();
|
||||
|
||||
@@ -20,7 +20,7 @@ import TabsBase from "./TabsBase";
|
||||
// Will act as table explorer class
|
||||
export default class QueryTablesTab extends TabsBase {
|
||||
public readonly html = template;
|
||||
public collection: ViewModels.Collection;
|
||||
public override collection: ViewModels.Collection;
|
||||
public tableEntityListViewModel = ko.observable<TableEntityListViewModel>();
|
||||
public queryViewModel = ko.observable<QueryViewModel>();
|
||||
public tableCommands: TableCommands;
|
||||
@@ -160,7 +160,7 @@ export default class QueryTablesTab extends TabsBase {
|
||||
return null;
|
||||
};
|
||||
|
||||
public onActivate(): void {
|
||||
public override onActivate(): void {
|
||||
super.onActivate();
|
||||
const columns =
|
||||
!!this.tableEntityListViewModel() &&
|
||||
@@ -172,7 +172,7 @@ export default class QueryTablesTab extends TabsBase {
|
||||
}
|
||||
}
|
||||
|
||||
protected getTabsButtons(): CommandButtonComponentProps[] {
|
||||
protected override getTabsButtons(): CommandButtonComponentProps[] {
|
||||
const buttons: CommandButtonComponentProps[] = [];
|
||||
if (this.queryBuilderButton.visible()) {
|
||||
const label = userContext.apiType === "Cassandra" ? "CQL Query Builder" : "Query Builder";
|
||||
|
||||
@@ -31,7 +31,7 @@ export default abstract class ScriptTabBase extends TabsBase implements ViewMode
|
||||
public isNew: ko.Observable<boolean>;
|
||||
// TODO: Remove any. The SDK types for all the script.body are slightly incorrect which makes this REALLY hard to type correct.
|
||||
public resource: ko.Observable<any>;
|
||||
public isTemplateReady: ko.Observable<boolean>;
|
||||
public override isTemplateReady: ko.Observable<boolean>;
|
||||
protected _partitionKey: DataModels.PartitionKey;
|
||||
|
||||
constructor(options: ViewModels.ScriptTabOption) {
|
||||
@@ -186,7 +186,7 @@ export default abstract class ScriptTabBase extends TabsBase implements ViewMode
|
||||
this._setBaselines();
|
||||
}
|
||||
|
||||
public onTabClick(): void {
|
||||
public override onTabClick(): void {
|
||||
super.onTabClick();
|
||||
if (this.isNew()) {
|
||||
this.collection.selectedSubnodeKind(this.tabKind);
|
||||
@@ -215,7 +215,7 @@ export default abstract class ScriptTabBase extends TabsBase implements ViewMode
|
||||
return undefined;
|
||||
}
|
||||
|
||||
protected getTabsButtons(): CommandButtonComponentProps[] {
|
||||
protected override getTabsButtons(): CommandButtonComponentProps[] {
|
||||
const buttons: CommandButtonComponentProps[] = [];
|
||||
const label = "Save";
|
||||
if (this.saveButton.visible()) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user