This commit is contained in:
Dan Marshall 2019-04-15 15:12:46 -07:00
Родитель cdbe6b007b
Коммит de1898a539
10 изменённых файлов: 1579 добавлений и 984 удалений

Просмотреть файл

@ -18,6 +18,7 @@
"Props",
"Snapshot",
"State",
"themePalettes",
"use"
],
"sanddance-react": [

Просмотреть файл

@ -92,28 +92,37 @@
height: 24px; }
.sanddance-explorer-topbar {
border-bottom: 1px solid #ccc;
display: grid;
grid-template-columns: 250px auto; }
.sanddance-explorer-topbar > div {
align-self: center; }
.sanddance-explorer-topbar .logo {
color: #0078d4;
padding-top: 4px; }
display: grid;
grid-template-columns: 50px auto;
height: 24px; }
.sanddance-explorer-topbar .logo i {
font-size: 24px;
margin-left: 12px;
margin-right: 8px; }
margin-left: 12px; }
.sanddance-explorer-topbar .logo span {
.sanddance-explorer-topbar .logo a {
color: inherit;
font-size: 14px;
font-weight: bold;
position: relative;
top: -6px; }
line-height: 24px;
text-decoration: none; }
.sanddance-explorer-topbar button {
margin-right: 1em;
min-width: unset; }
.dark-theme .sanddance-explorer-topbar .logo {
color: #00b4f0; }
.sanddance-group {
border-top: 1px solid #ccc;
padding-bottom: 1.5em;
@ -155,7 +164,7 @@
background-color: #f9f9f9;
bottom: 0;
display: grid;
grid-template-areas: "stats stats" "tabs bar";
grid-template-areas: "stats stats" "tabs bar";
grid-template-columns: 50px auto;
grid-template-rows: 0fr auto;
overflow: hidden;
@ -192,9 +201,6 @@
.sanddance-sidebar.closed {
width: 50px; }
.sanddance-sidebar.calculator {
position: relative; }
.sanddance-sidebar.calculator .calculating {
background: rgba(249, 249, 249, 0.5);
height: 100%;
@ -207,6 +213,19 @@
position: relative;
top: 50%; }
.dark-theme .sanddance-sidebar {
background-color: #272727;
color: #fff; }
.dark-theme .sanddance-sidebar .vbuttons {
background-color: rgba(0, 0, 0, 0.4); }
.dark-theme .sanddance-sidebar .vbutton.selected {
background-color: #272727; }
.dark-theme .sanddance-sidebar.calculator .calculating {
background: rgba(39, 39, 39, 0.5); }
.sanddance-datascope {
grid-area: stats;
background-color: rgba(0, 0, 0, 0.05);
@ -241,13 +260,27 @@
width: 33.333%; }
.sanddance-datascope .datascope-button:hover {
background-color: #eff6fc; }
background-color: #0078d4;
color: #fff; }
.sanddance-datascope .datascope-button label {
cursor: inherit; }
.sanddance-datascope.active .datascope-button.selected {
border-color: #000; }
border-color: #0078d4; }
.dark-theme .sanddance-datascope {
background-color: rgba(0, 0, 0, 0.3);
border-bottom-color: rgba(255, 255, 255, 0.1); }
.dark-theme .sanddance-datascope .datascope-button {
background-color: #000;
border-color: rgba(255, 255, 255, 0.2);
color: #fff; }
.dark-theme .sanddance-datascope .datascope-button:hover {
background-color: #0078d4;
color: #fff; }
.sanddance-dataItem {
background-color: #fff;
@ -261,7 +294,8 @@
word-break: break-all; }
.sanddance-dataItem .name-value:hover {
background-color: #eff6fc; }
background-color: #0078d4;
color: #fff; }
.sanddance-dataItem .name-value:first-child {
border-top: none; }
@ -272,6 +306,16 @@
.sanddance-dataItem .bing-search {
text-align: right; }
.dark-theme .sanddance-dataItem {
background-color: #000;
border-color: #222; }
.dark-theme .sanddance-dataItem .name-value {
border-top-color: #222; }
.dark-theme .sanddance-dataItem a {
color: #00b4f0; }
.sanddance-dataIndex .index {
display: grid;
grid-template-columns: 32px auto 32px;
@ -313,6 +357,10 @@
.sanddance-search .search-field {
margin-top: 4px; }
.dark-theme .sanddance-search .sanddance-search-expression {
background-color: rgba(0, 0, 0, 0.9);
border-color: rgba(255, 255, 255, 0.2); }
.sanddance-snapshots .snapshot {
cursor: pointer;
margin-top: 0.5em;
@ -356,67 +404,69 @@
font-size: 13px;
grid-template-rows: 50px auto; }
.sanddance-explorer-topbar {
border-bottom: 1px solid #ccc;
padding-top: 8px; }
.sanddance-explorer.dark-theme {
background-color: black; }
.wide {
.sanddance-explorer.dark-theme canvas {
background-color: black; }
.sanddance-main {
display: grid;
position: relative;
transition: grid-template-columns 350ms cubic-bezier(0.4, 0, 0.2, 1); }
.wide .loading {
.sanddance-main .loading {
grid-row-end: span 2;
position: relative; }
.wide .loading .ms-Spinner {
.sanddance-main .loading .ms-Spinner {
position: absolute;
top: 50%;
width: 100%; }
.wide .sanddance-view {
.sanddance-main .sanddance-view {
display: grid;
position: relative; }
.wide .sanddance-layout-unpinned, .wide .sanddance-layout-pinned {
.sanddance-main .sanddance-layout-unpinned, .sanddance-main .sanddance-layout-pinned {
position: absolute;
top: 0;
left: 0;
right: 150px;
bottom: 0; }
.wide .sanddance-layout-pinned {
.sanddance-main .sanddance-layout-pinned {
left: 250px; }
.wide .sanddance-ReactViewer {
.sanddance-main .sanddance-ReactViewer {
position: absolute;
top: 0;
left: -150px;
bottom: 0;
right: 0; }
.wide.show-center .sanddance-layout-unpinned, .wide.show-center .sanddance-layout-pinned {
.sanddance-main.show-center .sanddance-layout-unpinned, .sanddance-main.show-center .sanddance-layout-pinned {
background: linear-gradient(to right, transparent 49%, rgba(255, 0, 255, 0.2), transparent 51%);
background-color: rgba(0, 255, 255, 0.1); }
.wide.pinned {
.sanddance-main.pinned {
grid-template-columns: 250px auto;
grid-template-areas: "side main"; }
.wide.pinned .sanddance-view {
.sanddance-main.pinned .sanddance-view {
grid-area: main; }
.wide.pinned .loading {
.sanddance-main.pinned .loading {
grid-area: main;
grid-row-end: unset; }
.wide.pinned .sanddance-slidePanel {
.sanddance-main.pinned .sanddance-slidePanel {
grid-area: side; }
.wide.pinned.closed {
.sanddance-main.pinned.closed {
grid-template-columns: 0 auto; }
.wide span.ms-layer {
.sanddance-main span.ms-layer {
display: none; }
#sanddance-explorer-toolbar {
@ -458,7 +508,6 @@
margin-top: 1em; }
.sanddance-viewport {
background-color: #fff;
position: absolute;
right: 10px;
top: -42px;
@ -467,8 +516,13 @@
.sanddance-viewport i {
font-size: 20px; }
.dark-theme .sanddance-panel {
background-color: #000;
color: #fff; }
.sanddance-legend .legend-row:hover {
background-color: #0078d4;
color: #fff; }
.sanddance-sidebar .sanddance-datascope {
min-height: 7em; }
.sanddance-app.dark-theme .wide, .sanddance-app.dark-theme canvas {
background-color: black; }

Разница между файлами не показана из-за своего большого размера Загрузить разницу

13
docs/dist/sanddance/v1/sanddance.js поставляемый
Просмотреть файл

@ -199,7 +199,7 @@
});
function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x;
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function createCommonjsModule(fn, module) {
@ -10184,12 +10184,15 @@ void main(void) {
*/
getInsight() {
const insight = Object.assign({}, this.insight);
insight.signalValues = {};
this.vegaSpec.signals.forEach(signal => {
insight.signalValues[signal.name] = this.vegaViewGl.signal(signal.name);
});
insight.signalValues = this.getSignalValues();
return insight;
}
/**
* Gets current signal values.
*/
getSignalValues() {
return extractSignalValuesFromView(this.vegaViewGl, this.vegaSpec);
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.

Просмотреть файл

@ -133,6 +133,24 @@ void
----------
### changeInsight(newState)
```typescript
public changeInsight(newState: Partial<State>): void;
```
**Parameters**
| Name | Type |
| -------- | ---------------------------------------- |
| newState | Partial<[State][InterfaceDeclaration-7]> |
**Return type**
void
----------
### changespecCapabilities(specCapabilities)
```typescript
@ -254,10 +272,12 @@ public prefs: Prefs;
[MethodDeclaration-3]: explorer#changecharttypechart
[MethodDeclaration-4]: explorer#calculatecalculating
[MethodDeclaration-5]: explorer#changeviewview
[MethodDeclaration-6]: explorer#changespeccapabilitiesspeccapabilities
[MethodDeclaration-7]: explorer#changecolumnmappingrole-column-options
[MethodDeclaration-8]: explorer#componentdidmount
[MethodDeclaration-9]: explorer#render
[MethodDeclaration-6]: explorer#changeinsightnewstate
[InterfaceDeclaration-7]: ../index#state
[MethodDeclaration-7]: explorer#changespeccapabilitiesspeccapabilities
[MethodDeclaration-8]: explorer#changecolumnmappingrole-column-options
[MethodDeclaration-9]: explorer#componentdidmount
[MethodDeclaration-10]: explorer#render
[PropertyDeclaration-0]: explorer#viewer
[PropertyDeclaration-1]: explorer#vieweroptions
[PropertyDeclaration-2]: explorer#discardcolorcontextupdates

Просмотреть файл

@ -114,6 +114,7 @@ interface Prefs {
```typescript
interface Props {
theme?: string;
viewerOptions?: Partial<ViewerOptions>;
initialView?: View;
mounted?: (explorer: Explorer) => any;
@ -128,6 +129,7 @@ interface Props {
| Name | Type | Optional |
| ----------------- | ---------------------------------------- | -------- |
| theme | string | true |
| viewerOptions | Partial<ViewerOptions> | true |
| initialView | View | true |
| mounted | (explorer: Explorer) => any | true |
@ -141,36 +143,28 @@ interface Props {
### State
```typescript
interface State {
interface State extends Insight {
calculating: () => void;
errors: string[];
autoCompleteDistinctValues: AutoCompleteDistinctValues;
search: SearchExpressionGroup<InputSearchExpression>[];
filter: Search;
filteredData: object[];
toolbarClosed: boolean;
toolbarPinned: boolean;
view: View;
dataFile: DataFile;
dataContent: DataContent;
specCapabilities: SpecCapabilities;
facets: Facets;
scheme: string;
chart: Chart;
columns: InsightColumns;
size: Size;
colorBin: ColorBin;
sideTabId: SideTabId;
dataScopeId: DataScopeId;
selectedItemIndex: { [key: number]: number; };
initialPointSize: number;
initialColorBinCount: number;
initialXBinCount: number;
initialTreeMapMethod: string;
snapshots: Snapshot[];
}
```
**Extends**
Insight
**Properties**
| Name | Type | Optional |
@ -179,27 +173,15 @@ interface State {
| errors | string[] | false |
| autoCompleteDistinctValues | AutoCompleteDistinctValues | false |
| search | SearchExpressionGroup<InputSearchExpression>[] | false |
| filter | Search | false |
| filteredData | object[] | false |
| toolbarClosed | boolean | false |
| toolbarPinned | boolean | false |
| view | View | false |
| dataFile | [DataFile][InterfaceDeclaration-1] | false |
| dataContent | [DataContent][InterfaceDeclaration-0] | false |
| specCapabilities | SpecCapabilities | false |
| facets | Facets | false |
| scheme | string | false |
| chart | Chart | false |
| columns | InsightColumns | false |
| size | Size | false |
| colorBin | ColorBin | false |
| sideTabId | SideTabId | false |
| dataScopeId | DataScopeId | false |
| selectedItemIndex | { [key: number]: number; } | false |
| initialPointSize | number | false |
| initialColorBinCount | number | false |
| initialXBinCount | number | false |
| initialTreeMapMethod | string | false |
| snapshots | [Snapshot][InterfaceDeclaration-2][] | false |
## Classes
@ -207,6 +189,18 @@ interface State {
### [Explorer][ClassDeclaration-0]
## Variables
### themePalettes
```typescript
const themePalettes: { [theme: string]: Partial<IPalette>; };
```
**Type**
{ [theme: string]: Partial<IPalette>; }
[SourceFile-0]: index#indextsx
[FunctionDeclaration-0]: index#use
[InterfaceDeclaration-0]: index#datacontent
@ -218,4 +212,5 @@ interface State {
[InterfaceDeclaration-1]: index#datafile
[InterfaceDeclaration-0]: index#datacontent
[InterfaceDeclaration-2]: index#snapshot
[ClassDeclaration-0]: explorer#explorer
[ClassDeclaration-0]: explorer#explorer
[VariableDeclaration-0]: index#themepalettes

Просмотреть файл

@ -198,6 +198,20 @@ public getInsight(): Insight;
[Insight][InterfaceDeclaration-8]
----------
### getSignalValues()
Gets current signal values.
```typescript
public getSignalValues(): SignalValues;
```
**Return type**
[SignalValues][InterfaceDeclaration-11]
## Properties
### specCapabilities
@ -331,6 +345,8 @@ number
[MethodDeclaration-17]: viewer#deactivate
[MethodDeclaration-18]: viewer#getinsight
[InterfaceDeclaration-8]: types#insight
[MethodDeclaration-19]: viewer#getsignalvalues
[InterfaceDeclaration-11]: types#signalvalues
[PropertyDeclaration-16]: viewer#speccapabilities
[InterfaceDeclaration-13]: types#speccapabilities
[PropertyDeclaration-17]: viewer#options

Просмотреть файл

@ -20,12 +20,12 @@ Smooth animated transitions between views help you to maintain context as you in
</ul>
<h2 id="changelog">Changelog</h2>
<ul>
<li>March 2019 - Initial release to GitHub.</li>
<li>April 2019 - Initial release to GitHub.</li>
</ul>
<h2 id="roadmap">Roadmap</h2>
<ul>
<li>PowerBI custom visual based on this new architecture.</li>
<li>Additional views, such as treemaps &amp; 3d stacks.</li>
<li>Additional views, such as stacks.</li>
<li>Code examples and tutorials.</li>
</ul>
<h2 id="dependencies">Dependencies</h2>

Просмотреть файл

@ -81211,7 +81211,7 @@ function _default(_) {
div = _.divide || [5, 2],
min = _.extent[0],
max = _.extent[1],
span = max - min,
span = max - min || Math.abs(min) || 1,
step,
level,
minstep,
@ -81261,7 +81261,7 @@ function _default(_) {
return {
start: min,
stop: max,
stop: max === min ? min + step : max,
step: step
};
}
@ -90194,7 +90194,7 @@ Object.defineProperty(exports, "__esModule", {
exports.default = _default;
function _default(series, order) {
if (!((n = series.length) > 1)) return;
if (!((n = series.length) > 0)) return;
for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {
for (yp = yn = 0, i = 0; i < n; ++i) {
@ -114665,8 +114665,8 @@ function _default(nodes) {
function initializeNodes() {
for (var i = 0, n = nodes.length, node; i < n; ++i) {
node = nodes[i], node.index = i;
if (!isNaN(node.fx)) node.x = node.fx;
if (!isNaN(node.fy)) node.y = node.fy;
if (node.fx != null) node.x = node.fx;
if (node.fy != null) node.y = node.fy;
if (isNaN(node.x) || isNaN(node.y)) {
var radius = initialRadius * Math.sqrt(i),
@ -120729,12 +120729,6 @@ var _ResolveFilter = _interopRequireDefault(require("./src/ResolveFilter"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
},{"./src/CrossFilter":"Ony7","./src/ResolveFilter":"Ik0p"}],"q4S0":[function(require,module,exports) {
module.exports = {
"_args": [
[
"vega-lib@4.3.0",
"C:\\src\\_sanddance5\\packages\\sanddance-test-es6"
]
],
"_from": "vega-lib@4.3.0",
"_id": "vega-lib@4.3.0",
"_inBundle": false,
@ -120755,8 +120749,9 @@ module.exports = {
"/"
],
"_resolved": "https://registry.npmjs.org/vega-lib/-/vega-lib-4.3.0.tgz",
"_spec": "4.3.0",
"_where": "C:\\src\\_sanddance5\\packages\\sanddance-test-es6",
"_shasum": "b17bea4393a281db3e647e665b9e97aa793ccfd6",
"_spec": "vega-lib@4.3.0",
"_where": "C:\\src\\_SandDanceMaster\\packages\\sanddance-test-es6",
"author": {
"name": "UW Interactive Data Lab",
"url": "http://idl.cs.washington.edu"
@ -120768,6 +120763,7 @@ module.exports = {
"bugs": {
"url": "https://github.com/vega/vega-lib/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Jeffrey Heer",
@ -120818,6 +120814,7 @@ module.exports = {
"vega-voronoi": "^3.0.0",
"vega-wordcloud": "^3.0.0"
},
"deprecated": false,
"description": "Include Vega in projects using minimal dependencies.",
"devDependencies": {
"eslint": "5",
@ -123621,11 +123618,15 @@ function _default(codegen) {
utcminutes: fn('getUTCMinutes', DATE, 0),
utcseconds: fn('getUTCSeconds', DATE, 0),
utcmilliseconds: fn('getUTCMilliseconds', DATE, 0),
// shared sequence functions
// sequence functions
length: fn('length', null, -1),
join: fn('join', null),
indexof: fn('indexOf', null),
lastindexof: fn('lastIndexOf', null),
slice: fn('slice', null),
reverse: function (args) {
return '(' + codegen(args[0]) + ').slice().reverse()';
},
// STRING functions
parseFloat: 'parseFloat',
parseInt: 'parseInt',
@ -123634,6 +123635,7 @@ function _default(codegen) {
substring: fn('substring', STRING),
split: fn('split', STRING),
replace: fn('replace', STRING),
trim: fn('trim', STRING, 0),
// REGEXP functions
regexp: REGEXP,
test: fn('test', REGEXP),
@ -123662,6 +123664,11 @@ var _vegaUtil = require("vega-util");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function stripQuotes(s) {
var n = s && s.length - 1;
return n && (s[0] === '"' && s[n] === '"' || s[0] === '\'' && s[n] === '\'') ? s.slice(1, -1) : s;
}
function _default(opt) {
opt = opt || {};
@ -123713,9 +123720,9 @@ function _default(opt) {
var p = visit(n.property);
if (o === fieldvar) {
fields[p] = 1;
} // HACKish...
// strip quotes to sanitize field name (#1653)
fields[stripQuotes(p)] = 1;
}
if (d) memberDepth -= 1;
return o + (d ? '.' + p : '[' + p + ']');
@ -145166,12 +145173,17 @@ class Viewer {
getInsight() {
const insight = Object.assign({}, this.insight);
insight.signalValues = {};
this.vegaSpec.signals.forEach(signal => {
insight.signalValues[signal.name] = this.vegaViewGl.signal(signal.name);
});
insight.signalValues = this.getSignalValues();
return insight;
}
/**
* Gets current signal values.
*/
getSignalValues() {
return (0, _signals.extractSignalValuesFromView)(this.vegaViewGl, this.vegaSpec);
}
}

Просмотреть файл

@ -10,7 +10,7 @@ import {
SandDance,
Snapshot,
themePalettes
} from '@msrvida/sanddance-explorer';
} from '@msrvida/sanddance-explorer';
import { strings } from './language';
export interface Props {