-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.js
34 lines (33 loc) · 948 Bytes
/
index.js
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
import CoreStore from '../CoreStore';
/**
* Store definition.
* @type {Object}
*/
const DEFINITION = {
criteria: 'criteria',
groupingKey: 'groupingKey',
sortBy: 'sortBy',
sortAsc: 'sortAsc',
dataList: 'dataList',
totalCount: 'totalCount'
};
/**
* Class standing for all list information.
* The list has almost the same data as the search store but instead of the facets, it can have a .
*/
class ListStore extends CoreStore {
constructor(conf) {
conf = conf || {};
if (!conf.identifier) {
throw new Error(
`
The identifier is necessary, maybe it should be the name of the entity which is in the List.
Your code should look like let myListStore = new ListStore({identifier: 'myEntityList'}) or something like that.
`
);
}
conf.definition = DEFINITION;
super(conf);
}
}
export default ListStore;