Skip to content

Commit

Permalink
fix api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Dec 8, 2018
1 parent dcb5b3d commit e41023a
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/renderer/AAggregatedGroupRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export abstract class AAggregatedGroupRenderer<T extends Column> implements ICel
return {
template: `<div>${single.template}</div>`,
update: (node: HTMLElement, group: IOrderedGroup, groupMeta: IGroupMeta) => {
return context.tasks.groupRows(col, group, (rows) => this.aggregatedIndex(rows, col)).then((data) => {
return context.tasks.groupRows(col, group, 'aagreated', (rows) => this.aggregatedIndex(rows, col)).then((data) => {
if (typeof data !== 'symbol') {
single.update(<HTMLElement>node.firstElementChild!, data.row, data.index, group, groupMeta);
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ANumbersCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export abstract class ANumbersCellRenderer {
template: `<div class="${clazz}">${templateRow}</div>`,
update: (n: HTMLDivElement, group: IOrderedGroup) => {
// render a heatmap
return context.tasks.groupRows(col, group, (rows) => ANumbersCellRenderer.choose(col, rows)).then((data) => {
return context.tasks.groupRows(col, group, this.title, (rows) => ANumbersCellRenderer.choose(col, rows)).then((data) => {
if (typeof data !== 'symbol') {
update(n, data.normalized, data.raw, data.row!);
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ActionRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class ActionRenderer implements ICellRendererFactory {
ni.onclick = function (event) {
event.preventDefault();
event.stopPropagation();
context.tasks.groupRows(col, group, (r) => r).then((rows) => {
context.tasks.groupRows(col, group, 'identity', (r) => r).then((rows) => {
if (Array.isArray(rows)) {
actions[i].action(group, rows);
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/BoxplotCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class BoxplotCellRenderer implements ICellRendererFactory {
return {
template: BOXPLOT,
update: (n: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (rows: ISequence<IDataRow>) => {
return context.tasks.groupRows(col, group, 'boxplot', (rows: ISequence<IDataRow>) => {
// compute
if (rows.every((row) => col.getValue(row) == null)) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/CategoricalHeatmapCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class CategoricalHeatmapCellRenderer implements ICellRendererFact
return {
template: `<div class="${cssClass('heatmap')}">${templateRow}</div>`,
update: (n: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (rows) => union(col, rows)).then((value) => {
return context.tasks.groupRows(col, group, 'union', (rows) => union(col, rows)).then((value) => {
if (typeof value === 'symbol') {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/DateCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export default class DateCellRenderer implements ICellRendererFactory {
update: (n: HTMLDivElement, group: IOrderedGroup) => {
const isGrouped = col.isGroupedBy() >= 0;
if (isGrouped) {
return context.tasks.groupRows(col, group, (rows) => choose(rows, col.getDateGrouper(), col)).then((chosen) => {
return context.tasks.groupRows(col, group, , 'date', (rows) => choose(rows, col.getDateGrouper(), col)).then((chosen) => {
if (typeof chosen !== 'symbol') {
setText(n, chosen.name);
}
});
}
return context.tasks.groupExampleRows(col, group, (sample) => exampleText(col, sample)).then((text) => {
return context.tasks.groupExampleRows(col, group, 'date', (sample) => exampleText(col, sample)).then((text) => {
if (typeof text !== 'symbol') {
setText(n, text);
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/DotCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class DotCellRenderer implements ICellRendererFactory {
return {
template,
update: (n: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (rows) => {
return context.tasks.groupRows(col, group, 'dot', (rows) => {
//value, color, label,

if (!isNumbersColumn(col)) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/HeatmapCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class HeatmapCellRenderer implements ICellRendererFactory {
return {
template,
update: (n: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (rows) => ANumbersCellRenderer.choose(col, rows)).then((data) => {
return context.tasks.groupRows(col, group, this.title, (rows) => ANumbersCellRenderer.choose(col, rows)).then((data) => {
if (typeof data === 'symbol') {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/LinkCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class LinkCellRenderer implements ICellRendererFactory {
return {
template: `<div> </div>`,
update: (n: HTMLDivElement, group: IOrderedGroup) => {
return context.tasks.groupExampleRows(col, group, (rows) => LinkCellRenderer.exampleText(col, rows)).then((text) => {
return context.tasks.groupExampleRows(col, group, 'link', (rows) => LinkCellRenderer.exampleText(col, rows)).then((text) => {
if (typeof text !== 'symbol') {
n.innerHTML = text;
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/LinkMapCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class LinkMapCellRenderer implements ICellRendererFactory {
return {
template: `<div class="${cssClass('rtable')}"></div>`,
update: (node: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (rows) => groupByKey(rows.map((d) => col.getLinkMap(d)))).then((entries) => {
return context.tasks.groupRows(col, group, 'linkmap', (rows) => groupByKey(rows.map((d) => col.getLinkMap(d)))).then((entries) => {
if (typeof entries !== 'symbol') {
node.innerHTML = entries.map(({key, values}) => `<div>${key}</div><div${align !== 'left' ? ` class="${cssClass(align)}"` : ''}>${LinkMapCellRenderer.example(values)}</div>`).join('');
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/SelectionRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class SelectionRenderer implements ICellRendererFactory {
return {
template: `<div></div>`,
update: (n: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (r) => r).then((rows) => {
return context.tasks.groupRows(col, group, 'identity', (r) => r).then((rows) => {
if (typeof rows === 'symbol') {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/SparklineCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class SparklineCellRenderer implements ICellRendererFactory {
update: (n: HTMLElement, group: IOrderedGroup) => {
//overlapping ones
matchRows(n, group.order.length, `<path></path>`);
return context.tasks.groupRows(col, group, (r) => Array.from(r.map((d) => col.getNumbers(d)))).then((vs) => {
return context.tasks.groupRows(col, group, 'numbers', (r) => Array.from(r.map((d) => col.getNumbers(d)))).then((vs) => {
if (typeof vs === 'symbol') {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/StringCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class StringCellRenderer implements ICellRendererFactory {
return {
template: `<div> </div>`,
update: (n: HTMLDivElement, group: IOrderedGroup) => {
return context.tasks.groupExampleRows(col, group, (rows) => exampleText(col, rows)).then((text) => {
return context.tasks.groupExampleRows(col, group, 'string', (rows) => exampleText(col, rows)).then((text) => {
if (typeof text === 'symbol') {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/TableCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class TableCellRenderer implements ICellRendererFactory {
return {
template: `<div class="${cssClass('rtable')}"></div>`,
update: (node: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (rows) => groupByKey(rows.map((d) => col.getMapLabel(d)))).then((entries) => {
return context.tasks.groupRows(col, group, 'table', (rows) => groupByKey(rows.map((d) => col.getMapLabel(d)))).then((entries) => {
if (typeof entries === 'symbol') {
return;
}
Expand All @@ -78,7 +78,7 @@ export default class TableCellRenderer implements ICellRendererFactory {
return {
template: TableCellRenderer.template(col),
update: (node: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupExampleRows(col, group, (rows) => {
return context.tasks.groupExampleRows(col, group, 'table', (rows) => {
const values: string[][] = col.labels.map(() => []);
rows.forEach((row) => {
const labels = col.getLabels(row);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/UpSetCellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class UpSetCellRenderer implements ICellRendererFactory {
return {
template: `<div><div class="${cssClass('upset-line')}"></div>${templateRow}</div>`,
update: (n: HTMLElement, group: IOrderedGroup) => {
return context.tasks.groupRows(col, group, (rows) => union(col, rows)).then((value) => {
return context.tasks.groupRows(col, group, 'union', (rows) => union(col, rows)).then((value) => {
if (typeof value !== 'symbol') {
render(n, value);
}
Expand Down

0 comments on commit e41023a

Please sign in to comment.