-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added
perspective-workspace
customElement
- Loading branch information
Showing
66 changed files
with
1,735 additions
and
1,485 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- | ||
Copyright (c) 2017, 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. | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
|
||
<!-- <script src="perspective-viewer.js"></script> --> | ||
<script src="perspective-workspace.js"></script> | ||
<script src="perspective-viewer-hypergrid.js"></script> | ||
<script src="perspective-viewer-d3fc.js"></script> | ||
|
||
<script src="perspective.js"></script> | ||
<script src="workspace.js"></script> | ||
|
||
<link rel='stylesheet' href="index.css"> | ||
<link rel='stylesheet' href="material.css" is="custom-style"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<perspective-workspace></perspective-workspace> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (c) 2017, 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. | ||
* | ||
*/ | ||
const datasource = async () => { | ||
const req = fetch("./superstore.arrow"); | ||
const resp = await req; | ||
const buffer = await resp.arrayBuffer(); | ||
const worker = window.perspective.shared_worker(); | ||
return worker.table(buffer); | ||
}; | ||
|
||
window.addEventListener("WebComponentsReady", async function() { | ||
const workspace = document.getElementsByTagName("perspective-workspace")[0]; | ||
workspace.addTable("superstore", await datasource()); | ||
|
||
const config = { | ||
detail: { | ||
main: { | ||
currentIndex: 0, | ||
type: "tab-area", | ||
widgets: [{table: "superstore"}] | ||
} | ||
} | ||
}; | ||
workspace.restore(config); | ||
}); |
2 changes: 1 addition & 1 deletion
2
examples/phosphor/package.json → examples/workspace/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/****************************************************************************** | ||
* | ||
* 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 perspective from "@finos/perspective"; | ||
import "@finos/perspective-workspace"; | ||
|
||
import "@finos/perspective-viewer-hypergrid"; | ||
import "@finos/perspective-viewer-d3fc"; | ||
|
||
import "./index.less"; | ||
|
||
const datasource = async () => { | ||
const req = fetch("./superstore.arrow"); | ||
const resp = await req; | ||
const buffer = await resp.arrayBuffer(); | ||
const worker = perspective.shared_worker(); | ||
return worker.table(buffer); | ||
}; | ||
|
||
window.addEventListener("load", async () => { | ||
const workspace = document.createElement("perspective-workspace"); | ||
document.body.append(workspace); | ||
workspace.addTable("superstore", await datasource()); | ||
|
||
const config = { | ||
master: { | ||
widgets: [ | ||
{table: "superstore", name: "Three", "row-pivots": ["State"], columns: ["Sales", "Profit"]}, | ||
{table: "superstore", name: "Four", "row-pivots": ["Category", "Sub-Category"], columns: ["Sales", "Profit"]} | ||
] | ||
}, | ||
detail: { | ||
main: { | ||
currentIndex: 0, | ||
type: "tab-area", | ||
widgets: [ | ||
{table: "superstore", name: "One"}, | ||
{table: "superstore", name: "Two"} | ||
] | ||
} | ||
} | ||
}; | ||
|
||
workspace.restore(config); | ||
window.workspace = workspace; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
packages/perspective-phosphor/src/theme/default/index.less
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
packages/perspective-phosphor/src/theme/default/tabbar.less
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
packages/perspective-phosphor/src/theme/material/index.less
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/perspective-phosphor/src/theme/material/material-phosphor.less
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
packages/perspective-phosphor/src/theme/material/widget.less
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.