Skip to content

Commit

Permalink
Bump landscape lib to 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
David Mesquita-Morris committed Nov 12, 2021
1 parent 8945c1b commit 8f9b8be
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 137 deletions.
10 changes: 5 additions & 5 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/368eb8f/src/index.ts#L85">index.ts:85</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L84">index.ts:84</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -138,7 +138,7 @@ <h3>split</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/368eb8f/src/index.ts#L47">index.ts:47</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L47">index.ts:47</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -178,13 +178,13 @@ <h4 class="tsd-returns-title">Returns <a href="interfaces/cell.html" class="tsd-
<a name="table" class="tsd-anchor"></a>
<h3>table</h3>
<ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter">
<li class="tsd-signature tsd-kind-icon">table&lt;TRow&gt;<span class="tsd-signature-symbol">(</span>cube<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Cube</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">&gt;</span>, axes<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Axes</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">&gt;</span>, getKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Func</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">, </span><a href="interfaces/key.html" class="tsd-signature-type" data-tsd-kind="Interface">Key</a><span class="tsd-signature-symbol">&gt;</span>, onX<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="interfaces/cell.html" class="tsd-signature-type" data-tsd-kind="Interface">Cell</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></li>
<li class="tsd-signature tsd-kind-icon">table&lt;TRow&gt;<span class="tsd-signature-symbol">(</span>cube<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Cube</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">&gt;</span>, axes<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Axes</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">&gt;</span>, getKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">, </span><a href="interfaces/key.html" class="tsd-signature-type" data-tsd-kind="Interface">Key</a><span class="tsd-signature-symbol">&gt;</span>, onX<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="interfaces/cell.html" class="tsd-signature-type" data-tsd-kind="Interface">Cell</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/368eb8f/src/index.ts#L34">index.ts:34</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L34">index.ts:34</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -213,7 +213,7 @@ <h5>axes: <span class="tsd-signature-type">Axes</span><span class="tsd-signature
</div>
</li>
<li>
<h5>getKey: <span class="tsd-signature-type">Func</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">, </span><a href="interfaces/key.html" class="tsd-signature-type" data-tsd-kind="Interface">Key</a><span class="tsd-signature-symbol">&gt;</span></h5>
<h5>getKey: <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">, </span><a href="interfaces/key.html" class="tsd-signature-type" data-tsd-kind="Interface">Key</a><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>A callback to generate a key containing the text and className used in the table from the source records,</p>
</div>
Expand Down
12 changes: 6 additions & 6 deletions docs/api/v3/interfaces/cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,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/368eb8f/src/index.ts#L24">index.ts:24</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L24">index.ts:24</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -132,7 +132,7 @@ <h3>index</h3>
<div class="tsd-signature tsd-kind-icon">index<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/368eb8f/src/index.ts#L15">index.ts:15</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L15">index.ts:15</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -147,7 +147,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/368eb8f/src/index.ts#L21">index.ts:21</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L21">index.ts:21</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -162,7 +162,7 @@ <h3>source</h3>
<div class="tsd-signature tsd-kind-icon">source<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">TRow</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/368eb8f/src/index.ts#L18">index.ts:18</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L18">index.ts:18</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -178,7 +178,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/368eb8f/src/index.ts#L9">index.ts:9</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L9">index.ts:9</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -194,7 +194,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/368eb8f/src/index.ts#L6">index.ts:6</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/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/368eb8f/src/index.ts#L9">index.ts:9</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/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/368eb8f/src/index.ts#L6">index.ts:6</a></li>
<li>Defined in <a href="https://github.com/steelbreeze/landscape/blob/8945c1b/src/index.ts#L6">index.ts:6</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/landscape.min.js

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

4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ <h1>Outstanding work</h1>
<script src="./dist/render.min.js"></script>
<script type="module">
import * as d3 from 'https://cdn.skypack.dev/d3-dsv@3?min';
import * as pivot from 'https://cdn.skypack.dev/@steelbreeze/pivot@2.4?min';
import * as pivot from 'https://cdn.skypack.dev/@steelbreeze/pivot@2.5?min';

// common controls used
const xAxisSelector = document.getElementById("xAxisSelector");
Expand Down Expand Up @@ -249,7 +249,7 @@ <h1>Outstanding work</h1>
dateOfInterest.textContent = date;

// filter the cube using the date of interest
context.filtered = pivot.filter(context.cube, app => (!app.From || app.From < date) && (!app.To || date < app.To));
context.filtered = pivot.map(context.cube, pivot.filter(app => (!app.From || app.From < date) && (!app.To || date < app.To)));

renderCube();
}
Expand Down
4 changes: 2 additions & 2 deletions lib/node/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Axes, Cube, Func, Row } from '@steelbreeze/pivot';
import { Axes, Cube, Function, Row } from '@steelbreeze/pivot';
/** The final text and class name to use when rendering cells in a table. */
export interface Key {
/** The text to use in the final table rendering. */
Expand All @@ -24,7 +24,7 @@ export interface Cell<TRow extends Row> extends Key {
* @param getKey A callback to generate a key containing the text and className used in the table from the source records,
* @param onX A flag to indicate if cells in cube containing multiple values should be split on the x axis (if not, the y axis will be used).
*/
export declare function table<TRow extends Row>(cube: Cube<TRow>, axes: Axes<TRow>, getKey: Func<TRow, Key>, onX: boolean): Array<Array<Cell<TRow>>>;
export declare function table<TRow extends Row>(cube: Cube<TRow>, axes: Axes<TRow>, getKey: Function<TRow, Key>, onX: boolean): Array<Array<Cell<TRow>>>;
/**
* Splits a cube of keys into a table, creating mutiple rows or columns where a cell in a cube has multiple values.
* @param cube The source cube.
Expand Down
4 changes: 2 additions & 2 deletions lib/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ function reduce(values, splits, callbackfn, seed) {
* A reverse for loop
* @param hidden
*/
function forEachRev(values, callbackfn) {
const forEachRev = (values, callbackfn) => {
for (let index = values.length; index--;) {
callbackfn(values[index], index);
}
}
};
/**
* Returns the least common multiple of a set of integers generated from an object.
* @hidden
Expand Down
2 changes: 1 addition & 1 deletion lib/web/landscape.min.js

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

Loading

0 comments on commit 8f9b8be

Please sign in to comment.