mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-23 19:01:28 +00:00
Compare commits
4 Commits
master
...
fix_eslint
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed79737603 | ||
|
|
92acc63103 | ||
|
|
22f6670184 | ||
|
|
315a67e4dd |
@@ -18,9 +18,7 @@ src/Common/MessageHandler.test.ts
|
|||||||
src/Common/MessageHandler.ts
|
src/Common/MessageHandler.ts
|
||||||
src/Common/MongoProxyClient.test.ts
|
src/Common/MongoProxyClient.test.ts
|
||||||
src/Common/MongoUtility.ts
|
src/Common/MongoUtility.ts
|
||||||
src/Common/NotificationsClientBase.ts
|
|
||||||
src/Common/QueriesClient.ts
|
src/Common/QueriesClient.ts
|
||||||
src/Common/Splitter.ts
|
|
||||||
src/Controls/Heatmap/Heatmap.test.ts
|
src/Controls/Heatmap/Heatmap.test.ts
|
||||||
src/Controls/Heatmap/Heatmap.ts
|
src/Controls/Heatmap/Heatmap.ts
|
||||||
src/Definitions/datatables.d.ts
|
src/Definitions/datatables.d.ts
|
||||||
@@ -34,11 +32,7 @@ src/Definitions/jquery.d.ts
|
|||||||
src/Definitions/plotly.js-cartesian-dist.d-min.ts
|
src/Definitions/plotly.js-cartesian-dist.d-min.ts
|
||||||
src/Definitions/png.d.ts
|
src/Definitions/png.d.ts
|
||||||
src/Definitions/svg.d.ts
|
src/Definitions/svg.d.ts
|
||||||
src/Explorer/ComponentRegisterer.test.ts
|
|
||||||
src/Explorer/ComponentRegisterer.ts
|
|
||||||
src/Explorer/Controls/DiffEditor/DiffEditorComponent.ts
|
src/Explorer/Controls/DiffEditor/DiffEditorComponent.ts
|
||||||
|
|
||||||
src/Explorer/Controls/Editor/EditorComponent.ts
|
|
||||||
src/Explorer/Controls/JsonEditor/JsonEditorComponent.ts
|
src/Explorer/Controls/JsonEditor/JsonEditorComponent.ts
|
||||||
src/Explorer/DataSamples/ContainerSampleGenerator.test.ts
|
src/Explorer/DataSamples/ContainerSampleGenerator.test.ts
|
||||||
src/Explorer/DataSamples/ContainerSampleGenerator.ts
|
src/Explorer/DataSamples/ContainerSampleGenerator.ts
|
||||||
@@ -152,14 +146,11 @@ src/Explorer/Graph/GraphExplorerComponent/NodePropertiesComponent.tsx
|
|||||||
src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.test.tsx
|
src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.test.tsx
|
||||||
src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.tsx
|
src/Explorer/Graph/GraphExplorerComponent/ReadOnlyNodePropertiesComponent.tsx
|
||||||
src/Explorer/Menus/CommandBar/CommandBarUtil.tsx
|
src/Explorer/Menus/CommandBar/CommandBarUtil.tsx
|
||||||
src/Explorer/Notebook/NotebookComponent/NotebookComponentAdapter.tsx
|
|
||||||
src/Explorer/Notebook/NotebookComponent/NotebookComponentBootstrapper.tsx
|
src/Explorer/Notebook/NotebookComponent/NotebookComponentBootstrapper.tsx
|
||||||
src/Explorer/Notebook/NotebookComponent/VirtualCommandBarComponent.tsx
|
|
||||||
src/Explorer/Notebook/NotebookComponent/contents/index.tsx
|
src/Explorer/Notebook/NotebookComponent/contents/index.tsx
|
||||||
src/Explorer/Notebook/NotebookRenderer/NotebookReadOnlyRenderer.tsx
|
src/Explorer/Notebook/NotebookRenderer/NotebookReadOnlyRenderer.tsx
|
||||||
src/Explorer/Notebook/NotebookRenderer/NotebookRenderer.tsx
|
src/Explorer/Notebook/NotebookRenderer/NotebookRenderer.tsx
|
||||||
src/Explorer/Notebook/NotebookRenderer/decorators/draggable/index.tsx
|
src/Explorer/Notebook/NotebookRenderer/decorators/draggable/index.tsx
|
||||||
src/Explorer/Notebook/NotebookRenderer/decorators/hijack-scroll/index.tsx
|
|
||||||
src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/index.tsx
|
src/Explorer/Notebook/NotebookRenderer/decorators/kbd-shortcuts/index.tsx
|
||||||
src/Explorer/Notebook/temp/inputs/connected-editors/codemirror.tsx
|
src/Explorer/Notebook/temp/inputs/connected-editors/codemirror.tsx
|
||||||
src/Explorer/Tree/ResourceTreeAdapter.tsx
|
src/Explorer/Tree/ResourceTreeAdapter.tsx
|
||||||
|
|||||||
@@ -35,8 +35,11 @@ export class Splitter {
|
|||||||
this.initialize();
|
this.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public initialize() {
|
public initialize(): void {
|
||||||
if (document.getElementById(this.splitterId) !== null && document.getElementById(this.leftSideId) != null) {
|
if (
|
||||||
|
document.getElementById(this.splitterId) !== undefined &&
|
||||||
|
document.getElementById(this.leftSideId) !== undefined
|
||||||
|
) {
|
||||||
this.splitter = <HTMLElement>document.getElementById(this.splitterId);
|
this.splitter = <HTMLElement>document.getElementById(this.splitterId);
|
||||||
this.leftSide = <HTMLElement>document.getElementById(this.leftSideId);
|
this.leftSide = <HTMLElement>document.getElementById(this.leftSideId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import template from "./editor-component.html";
|
|||||||
/**
|
/**
|
||||||
* Helper class for ko component registration
|
* Helper class for ko component registration
|
||||||
*/
|
*/
|
||||||
|
//eslint-disable-next-line
|
||||||
export class EditorComponent {
|
export class EditorComponent {
|
||||||
constructor() {
|
constructor() {
|
||||||
return {
|
return {
|
||||||
@@ -38,7 +39,7 @@ class EditorViewModel extends JsonEditorViewModel {
|
|||||||
* setTimeout is needed as creating the edtior manipulates the dom directly and expects
|
* setTimeout is needed as creating the edtior manipulates the dom directly and expects
|
||||||
* Knockout to have completed all of the initial bindings for the component
|
* Knockout to have completed all of the initial bindings for the component
|
||||||
*/
|
*/
|
||||||
this.params.content() != null &&
|
this.params.content() !== undefined &&
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.createEditor(this.params.content(), this.configureEditor.bind(this));
|
this.createEditor(this.params.content(), this.configureEditor.bind(this));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export interface NotebookComponentAdapterOptions {
|
|||||||
|
|
||||||
export class NotebookComponentAdapter extends NotebookComponentBootstrapper implements ReactAdapter {
|
export class NotebookComponentAdapter extends NotebookComponentBootstrapper implements ReactAdapter {
|
||||||
private onUpdateKernelInfo: () => void;
|
private onUpdateKernelInfo: () => void;
|
||||||
public parameters: any;
|
public parameters: unknown;
|
||||||
|
|
||||||
constructor(options: NotebookComponentAdapterOptions) {
|
constructor(options: NotebookComponentAdapterOptions) {
|
||||||
super({
|
super({
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ const makeMapStateToProps = (
|
|||||||
const { contentRef } = initialProps;
|
const { contentRef } = initialProps;
|
||||||
const mapStateToProps = (state: AppState) => {
|
const mapStateToProps = (state: AppState) => {
|
||||||
const content = selectors.content(state, { contentRef });
|
const content = selectors.content(state, { contentRef });
|
||||||
let kernelStatus, kernelSpecName, currentCellType;
|
let kernelStatus,
|
||||||
|
kernelSpecName,
|
||||||
|
currentCellType = "";
|
||||||
|
|
||||||
if (!content || content.type !== "notebook") {
|
if (!content || content.type !== "notebook") {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
/* eslint jsx-a11y/no-static-element-interactions: 0 */
|
|
||||||
/* eslint jsx-a11y/click-events-have-key-events: 0 */
|
|
||||||
|
|
||||||
import { actions, AppState, ContentRef, selectors } from "@nteract/core";
|
import { actions, AppState, ContentRef, selectors } from "@nteract/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -23,7 +20,7 @@ interface DispatchProps {
|
|||||||
type Props = ComponentProps & DispatchProps & StateProps;
|
type Props = ComponentProps & DispatchProps & StateProps;
|
||||||
|
|
||||||
export class HijackScroll extends React.Component<Props> {
|
export class HijackScroll extends React.Component<Props> {
|
||||||
el: HTMLDivElement | null = null;
|
el: HTMLDivElement | null | undefined = undefined;
|
||||||
|
|
||||||
scrollIntoViewIfNeeded(prevFocused?: boolean): void {
|
scrollIntoViewIfNeeded(prevFocused?: boolean): void {
|
||||||
// Check if the element is being hovered over.
|
// Check if the element is being hovered over.
|
||||||
@@ -38,7 +35,7 @@ export class HijackScroll extends React.Component<Props> {
|
|||||||
) {
|
) {
|
||||||
if (this.el && "scrollIntoViewIfNeeded" in this.el) {
|
if (this.el && "scrollIntoViewIfNeeded" in this.el) {
|
||||||
// This is only valid in Chrome, WebKit
|
// This is only valid in Chrome, WebKit
|
||||||
(this.el as any).scrollIntoViewIfNeeded();
|
((this.el as unknown) as HijackScroll).scrollIntoViewIfNeeded();
|
||||||
} else if (this.el) {
|
} else if (this.el) {
|
||||||
// Make a best guess effort for older platforms
|
// Make a best guess effort for older platforms
|
||||||
this.el.scrollIntoView();
|
this.el.scrollIntoView();
|
||||||
|
|||||||
Reference in New Issue
Block a user