-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.jsx
More file actions
157 lines (145 loc) · 3.49 KB
/
data.jsx
File metadata and controls
157 lines (145 loc) · 3.49 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import { __ } from "./helpers.jsx";
import LinkedInIcon from './static/images/social-img/crew-linkedin-icon.svg';
import FacebookIcon from './static/images/social-img/crew-facebook-icon.svg';
import TwitterIcon from './static/images/social-img/crew-twitter-icon.svg';
import GithubIcon from './static/images/social-img/crew-github-icon.svg';
import YoutubeIcon from './static/images/social-img/crew-youtube-icon-icon.svg';
import WordpresskIcon from './static/images/social-img/crew-wordpress-icon.svg';
import MediumIcon from './static/images/social-img/crew-medium-icon.svg';
import DribbleIcon from './static/images/social-img/crew-dribble-icon.svg';
import BehanceIcon from './static/images/social-img/crew-behance-icon.svg';
export const order_statuses = {
pending : __('Pending payment'),
processing : __('Processing'),
'on-hold' : __('On hold'),
completed : __('Completed'),
cancelled : __('Cancelled'),
refunded : __('Refunded'),
failed : __('Failed')
}
export const social_icons = {
linkedin: LinkedInIcon,
twitter: TwitterIcon,
facebook: FacebookIcon,
github: GithubIcon,
medium: MediumIcon,
dribble: DribbleIcon,
behance: BehanceIcon,
wordpress: WordpresskIcon,
youtube: YoutubeIcon
}
export const week_days = {
monday: __('Monday'),
tuesday: __('Tuesday'),
wednesday: __('Wednesday'),
thursday: __('Thursday'),
friday: __('Friday'),
saturday: __('Saturday'),
sunday: __('Sunday')
}
export const patterns = {
date: /^(\d{4})-(\d{2})-(\d{2})$/,
email: /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/,
phone: /^[0-9\+\-]{10,15}$/,
zip_code: /^[A-Za-z0-9\s-]{4,10}$/,
url: /^(http|https):\/\/[A-Za-z0-9.-]+(\.[A-Za-z]{2,})?(:\d+)?(\/\S*)?$/,
first_name: /^(?=.*\S).{1,20}$/,
last_name: /^(?=.*\S).{1,20}$/,
at_least_one_special_character: /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~^€£]+/,
at_least_one_uppercase: /[A-Z]/,
at_least_one_digit: /[0-9]/,
eight_to_twenty: /^.{8,20}$/,
}
export const statuses = {
publish: {
color: '#73BF45',
label: __('Published')
},
draft: {
color: '#EE940D',
label: __('Draft')
},
archive: {
color: '#BBBFC3',
label: __('Archived')
},
expired: {
color: '#FF180A',
label: __('Expired')
}
};
export const attachment_formats = {
pdf: {
label: __('PDF'),
},
doc: {
label: __('DOC')
},
docx: {
label: __('DOCX')
},
jpg: {
label: __('JPG')
},
jpeg: {
label: __('JPEG')
},
png: {
label: __('PNG')
},
mp3: {
label: __('MP3')
},
wav: {
label: __('WAV')
},
mp4: {
label: __('MP4')
},
mov: {
label: __('MOV')
},
zip: {
label: __('ZIP')
},
rar: {
label: __('RAR')
}
};
export const time_formats = {
_12: __('12 Hours'),
_24: __('24 Hours')
};
export const numbers = {
0: __('0'),
1: __('1'),
2: __('2'),
3: __('3'),
4: __('4'),
5: __('5'),
6: __('6'),
7: __('7'),
8: __('8'),
9: __('9'),
}
// Prepare country data
const _countries_array = [];
const _countries_object = {};
const A = 65;
const Z = 90;
const countryName = new Intl.DisplayNames(['en'], { type: 'region' });
for (let i = A; i <= Z; ++i) {
for (let j = A; j <= Z; ++j) {
let code = String.fromCharCode(i) + String.fromCharCode(j);
let name = countryName.of(code);
if (code !== name) {
_countries_array.push({
id: code,
label: __(name)
});
_countries_object[code] = __(name);
}
}
}
export const countries_array = _countries_array;
export const countries_object = _countries_object;