1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/**
* Created by km on 2/13/17.
*/
import * as models from "./index";
import * as metrics from "./metrics/metrics";
/** @public */
export class TopChartSegment extends models.Model {
constructor(shortName, longName, chart, shelfModels) {
super();
this.shortName = shortName;
this.longName = longName;
this.chart = chart;
this.shelves = shelfModels;
this.nextPage = null;
this.pageMetrics = new metrics.PageMetrics();
this.pageRenderMetrics = {};
}
}
/** @public */
export class TopChartCategory extends models.Category {
constructor(category, url, children) {
super(category.name, category.genreId, category.artwork, category.ageBandId, children);
this.shortName = this.name;
this.longName = this.name;
this.url = url;
}
}
/**
* Shared "Top Charts" view-model
*
* @see {@linkcode TopChartsPage} for when "Top Charts" should be rendered as a page
* @see {@linkcode ChartsHubChart} for when a "chart" exists on a page with other "charts"
*/
export class TopChartsPage extends models.Model {
constructor(genreId, ageBandId, title, segments, categoriesButtonTitle, categories) {
super();
this.genreId = genreId;
this.ageBandId = ageBandId;
this.title = title;
this.segments = segments;
this.categoriesButtonTitle = categoriesButtonTitle;
this.categories = categories;
this.initialSegmentIndex = 0;
}
}
/**
* A single chart within a {@linkcode ChartsHubPage}
*/
export class ChartsHubChart extends TopChartsPage {
}
/**
* View-model for the "Charts Hub" page
*
* This is used by the "web" client to power the charts overview, which includes
* multiple charts in the same view
*/
export class ChartsHubPage extends models.Model {
constructor(charts) {
super();
this.charts = charts;
}
}
//# sourceMappingURL=top-charts.js.map
|