/
lists.data.js
104 lines (94 loc) · 2.18 KB
/
lists.data.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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import DocumentBuilder from './documents.data';
import image01 from '../img/image01.jpg';
import image02 from '../img/image02.jpg';
import image03 from '../img/image03.jpg';
import image04 from '../img/image04.jpg';
import image05 from '../img/image05.jpg';
import image06 from '../img/image06.jpg';
import image07 from '../img/image07.jpg';
import image08 from '../img/image08.jpg';
import image09 from '../img/image09.jpg';
import image10 from '../img/image10.jpg';
const images = [image01, image02, image03, image04, image05, image06, image07, image08, image09, image10];
const companyNames = [
'Oyope',
'Babbleset',
'Twimm',
'Flipstorm',
'Feedmix',
'Dabjam',
'Photobug',
'Browsezoom',
'Yadel',
'Zooxo',
];
const departments = [
'Marketing',
'Training',
'Accounting',
'Product Management',
'Legal',
'Engineering',
'Support',
'Research and Development',
'Services',
'Sales',
];
const users = [
'cmagauran0@sbwire.com',
'tgorgler1@wordpress.org',
'wfogg2@photobucket.com',
'cvanezis3@nymag.com',
'ageist4@washingtonpost.com',
'cwhilder5@bluehost.com',
'blemmen9@salon.com',
'phydechambers8@artisteer.com',
'mcorbould7@symantec.com',
'gmaddicks6@macromedia.com',
];
const dates = [
'8/16/2018',
'9/18/2018',
'7/20/2018',
'10/21/2018',
'3/3/2019',
'9/10/2018',
'5/24/2019',
'7/22/2018',
'12/8/2018',
'9/28/2018',
];
export const cities = [
'Lisbon',
'Paris',
'San Francisco',
'Oslo',
'New York',
'Copenhagen',
'London',
'Madrid',
'Rome',
'Berlin',
];
export const LIST = (numberOfItems) => {
const list = { data: [] };
for (let index = 0; index < numberOfItems; index++) {
const random = (arr) => arr[Math.floor(Math.random() * arr.length)];
const documentBuilder = new DocumentBuilder()
.setProperties({
company_name: random(companyNames),
department: random(departments),
user: random(users),
city: random(cities),
date: random(dates),
})
.setContextParameters({
thumbnail: {
url: random(images),
},
})
.setPermissions(['Write', 'ManageWorkflows']);
list.data.push(documentBuilder.build());
}
return list;
};