Skip to content

Commit

Permalink
Use Pair interface from Pivot
Browse files Browse the repository at this point in the history
  • Loading branch information
David Mesquita-Morris committed Oct 1, 2021
1 parent 4da5e2c commit bff80be
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 75 deletions.
6 changes: 3 additions & 3 deletions docs/api/v3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h3>merge</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L82">index.ts:82</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L80">index.ts:80</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -132,7 +132,7 @@ <h3>split</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L44">index.ts:44</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L42">index.ts:42</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -178,7 +178,7 @@ <h3>table</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L30">index.ts:30</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L28">index.ts:28</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
8 changes: 4 additions & 4 deletions docs/api/v3/interfaces/cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ <h3>cols</h3>
<div class="tsd-signature tsd-kind-icon">cols<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L20">index.ts:20</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L18">index.ts:18</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -122,7 +122,7 @@ <h3>rows</h3>
<div class="tsd-signature tsd-kind-icon">rows<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L17">index.ts:17</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L15">index.ts:15</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -138,7 +138,7 @@ <h3>style</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="key.html">Key</a>.<a href="key.html#style">style</a></p>
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L11">index.ts:11</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L9">index.ts:9</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -154,7 +154,7 @@ <h3>text</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="key.html">Key</a>.<a href="key.html#text">text</a></p>
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L8">index.ts:8</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L6">index.ts:6</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
4 changes: 2 additions & 2 deletions docs/api/v3/interfaces/key.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h3>style</h3>
<div class="tsd-signature tsd-kind-icon">style<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L11">index.ts:11</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L9">index.ts:9</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -120,7 +120,7 @@ <h3>text</h3>
<div class="tsd-signature tsd-kind-icon">text<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/fcfc6fc/src/index.ts#L8">index.ts:8</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/4da5e2c/src/index.ts#L6">index.ts:6</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
4 changes: 2 additions & 2 deletions lib/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ function cell(key) {
* Creates a cell within a table for a column or row heading.
* @hidden
*/
function axis(criterion, name) {
return cell({ text: criterion.value, style: `axis ${name} ${criterion.key}` });
function axis(pair, name) {
return cell({ text: pair.value, style: `axis ${name} ${pair.key}` });
}
114 changes: 57 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@steelbreeze/landscape",
"version": "3.3.0",
"version": "3.3.1",
"description": "Landscape map viewpoint visualisation",
"main": "lib/node/index.js",
"module": "lib/node/index.js",
Expand All @@ -12,7 +12,7 @@
"lib": "lib"
},
"dependencies": {
"@steelbreeze/pivot": "^1.2.0"
"@steelbreeze/pivot": "^1.2.3"
},
"devDependencies": {
"typedoc": "^0.20.36",
Expand Down
8 changes: 3 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// @steelbreeze/landscape
// Copyright (c) 2019-21 David Mesquita-Morris
import { Axes, Cube, Func1, Func2, Row } from '@steelbreeze/pivot';
import { Axes, Cube, Func1, Func2, Pair, Row } from '@steelbreeze/pivot';

/** The final text and class name to use when rendering cells in a table. */
export interface Key {
Expand Down Expand Up @@ -159,6 +157,6 @@ function cell(key: Key): Cell {
* Creates a cell within a table for a column or row heading.
* @hidden
*/
function axis(criterion: { key: string, value: string }, name: string): Cell {
return cell({ text: criterion.value, style: `axis ${name} ${criterion.key}` });
function axis(pair: Pair, name: string): Cell {
return cell({ text: pair.value, style: `axis ${name} ${pair.key}` });
}

0 comments on commit bff80be

Please sign in to comment.