Skip to content

Commit

Permalink
TEMPORARY: remove PerspectiveViewer interface
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenvachon committed Jan 21, 2020
1 parent c2694b7 commit 9f9fe40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/PerspectivePanel.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { config } from '@grafana/runtime';
import { PanelData } from '@grafana/data';
import { PerspectiveViewer, Props } from 'types';
import { Props } from 'types';
import React, { createRef, PureComponent } from 'react';
import '@finos/perspective-viewer';
import '@finos/perspective-viewer/themes/all-themes.css';
import '@finos/perspective-viewer-d3fc';
import '@finos/perspective-viewer-hypergrid';

export class PerspectivePanel extends PureComponent<Props> {
perspectiveViewer = createRef<PerspectiveViewer | HTMLElement | null>();
perspectiveViewer = createRef<HTMLElement | null>();

async assignPerspectiveProps(prevProps: Props, diff = true) {
const viewer = this.perspectiveViewer.current;
Expand Down
11 changes: 2 additions & 9 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
import { PanelProps } from '@grafana/data';
import { PerspectiveViewer as PerspectiveViewerOriginal, PerspectiveViewerOptions } from '@finos/perspective-viewer';
import { Ref } from 'react';
import { PerspectiveViewerOptions } from '@finos/perspective-viewer';

export interface PerspectiveOptions extends PerspectiveViewerOptions {}

// @todo https://github.com/Microsoft/TypeScript/issues/16936
export interface PerspectiveViewer extends PerspectiveViewerOriginal {
ref: Ref<PerspectiveViewerOriginal | null>;
}

export interface Props extends PanelProps<PerspectiveOptions> {}

export const defaults: PerspectiveOptions = {};

declare global {
namespace JSX {
interface IntrinsicElements {
'perspective-viewer': PerspectiveViewer;
'perspective-viewer': any;
}
}
}

0 comments on commit 9f9fe40

Please sign in to comment.