-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathplugin.ts
More file actions
41 lines (33 loc) · 1.28 KB
/
plugin.ts
File metadata and controls
41 lines (33 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/******************************************************************************
*
* Copyright (c) 2018, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
import {Application, IPlugin} from "@phosphor/application";
import {Widget} from "@phosphor/widgets";
import {IJupyterWidgetRegistry} from "@jupyter-widgets/base";
import {PerspectiveModel} from "./model";
import {PerspectiveView} from "./view";
import {PERSPECTIVE_VERSION} from "./version";
/**
* PerspectiveJupyterPlugin Defines the Jupyterlab plugin, and registers `PerspectiveModel` and `PerspectiveView`
* to be called on initialization.
*/
export const PerspectiveJupyterPlugin: IPlugin<Application<Widget>, void> = {
id: "@finos/perspective-jupyterlab",
requires: [IJupyterWidgetRegistry],
activate: (app: Application<Widget>, registry: IJupyterWidgetRegistry): void => {
registry.registerWidget({
name: "@finos/perspective-jupyterlab",
version: PERSPECTIVE_VERSION,
exports: {
PerspectiveModel: PerspectiveModel,
PerspectiveView: PerspectiveView
}
});
},
autoStart: true
};