|
1 | | -/* eslint-disable ember/no-computed-properties-in-native-classes */ |
2 | | -import { computed } from '@ember/object'; |
3 | | -import Component from '@ember/component'; |
| 1 | +import Component from '@glimmer/component'; |
4 | 2 |
|
| 3 | +/** |
| 4 | + * @typedef ItemData |
| 5 | + * @property {Array<{ name: string }>} methods |
| 6 | + * @property {Array<{ name: string }>} properties |
| 7 | + * @property {Array<{ name: string }>} events |
| 8 | + */ |
| 9 | + |
| 10 | +/** |
| 11 | + * @typedef Args |
| 12 | + * @property {ItemData} itemData |
| 13 | + */ |
| 14 | + |
| 15 | +/** |
| 16 | + * @typedef Blocks |
| 17 | + * @property {[{ sections: ApiIndex['sections'] }]} default |
| 18 | + */ |
| 19 | + |
| 20 | +/** |
| 21 | + * @extends Component<{ Args: Args, Blocks: Blocks }> |
| 22 | + */ |
5 | 23 | export default class ApiIndex extends Component { |
6 | | - @computed('itemData.{methods,properties,events}') |
7 | 24 | get sections() { |
8 | 25 | return [ |
9 | 26 | { |
10 | 27 | title: 'Methods', |
11 | 28 | tab: 'methods', |
12 | | - items: this.itemData.methods, |
| 29 | + items: this.args.itemData.methods, |
13 | 30 | class: 'spec-method-list', |
14 | 31 | routeSuffix: '.methods.method', |
15 | 32 | }, |
16 | 33 | { |
17 | 34 | title: 'Properties', |
18 | 35 | tab: 'properties', |
19 | | - items: this.itemData.properties, |
| 36 | + items: this.args.itemData.properties, |
20 | 37 | class: 'spec-property-list', |
21 | 38 | routeSuffix: '.properties.property', |
22 | 39 | }, |
23 | 40 | { |
24 | 41 | title: 'Events', |
25 | 42 | tab: 'events', |
26 | | - items: this.itemData.events, |
| 43 | + items: this.args.itemData.events, |
27 | 44 | class: 'spec-event-list', |
28 | 45 | routeSuffix: '.events.event', |
29 | 46 | }, |
|
0 commit comments