@becollective/utils 2.0.12 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/lib/constants/allowedHtmlTags.d.ts +6 -2
  2. package/lib/constants/allowedHtmlTags.js +9 -5
  3. package/lib/constants/countries.d.ts +2 -2
  4. package/lib/constants/countries.js +3 -1
  5. package/lib/constants/customFields.d.ts +2 -2
  6. package/lib/constants/customFields.js +3 -1
  7. package/lib/constants/distancesUnits.d.ts +2 -2
  8. package/lib/constants/distancesUnits.js +13 -9
  9. package/lib/constants/groups.d.ts +12 -2
  10. package/lib/constants/groups.js +86 -81
  11. package/lib/constants/insuranceStatuses.d.ts +14 -2
  12. package/lib/constants/insuranceStatuses.js +9 -4
  13. package/lib/constants/insuranceTypes.d.ts +34 -2
  14. package/lib/constants/insuranceTypes.js +43 -33
  15. package/lib/constants/languages.d.ts +2 -2
  16. package/lib/constants/languages.js +3 -1
  17. package/lib/constants/qualificationTypes.d.ts +2 -2
  18. package/lib/constants/qualificationTypes.js +3 -2
  19. package/lib/constants/rules.d.ts +12 -2
  20. package/lib/constants/rules.js +7 -5
  21. package/lib/constants/surveys.d.ts +15 -2
  22. package/lib/constants/surveys.js +18 -14
  23. package/package.json +1 -1
  24. package/src/constants/allowedHtmlTags.ts +10 -5
  25. package/src/constants/countries.ts +3 -1
  26. package/src/constants/customFields.ts +3 -1
  27. package/src/constants/distancesUnits.ts +15 -9
  28. package/src/constants/groups.ts +89 -81
  29. package/src/constants/insuranceStatuses.ts +10 -4
  30. package/src/constants/insuranceTypes.ts +51 -33
  31. package/src/constants/languages.ts +3 -1
  32. package/src/constants/qualificationTypes.ts +2 -1
  33. package/src/constants/rules.ts +5 -3
  34. package/src/constants/surveys.ts +20 -14
@@ -1,7 +1,11 @@
1
- declare const _default: {
1
+ export declare const allowedTags: string[];
2
+ export declare const allowedAttributes: {
3
+ a: string[];
4
+ };
5
+ export declare const allowedHtmlTags: {
2
6
  allowedTags: string[];
3
7
  allowedAttributes: {
4
8
  a: string[];
5
9
  };
6
10
  };
7
- export default _default;
11
+ export default allowedHtmlTags;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- allowedTags: ['b', 'i', 'em', 'strong', 'a', 'p', 'u', 'del', 'div', 'ins', 'li', 'ul', 'ol', 'br'],
5
- allowedAttributes: {
6
- a: ['href', 'target', 'rel'],
7
- },
3
+ exports.allowedHtmlTags = exports.allowedAttributes = exports.allowedTags = void 0;
4
+ exports.allowedTags = ['b', 'i', 'em', 'strong', 'a', 'p', 'u', 'del', 'div', 'ins', 'li', 'ul', 'ol', 'br'];
5
+ exports.allowedAttributes = {
6
+ a: ['href', 'target', 'rel'],
8
7
  };
8
+ exports.allowedHtmlTags = {
9
+ allowedTags: exports.allowedTags,
10
+ allowedAttributes: exports.allowedAttributes,
11
+ };
12
+ exports.default = exports.allowedHtmlTags;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const countries: {
2
2
  BD: string;
3
3
  BE: string;
4
4
  BF: string;
@@ -250,4 +250,4 @@ declare const _default: {
250
250
  QA: string;
251
251
  MZ: string;
252
252
  };
253
- export default _default;
253
+ export default countries;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
3
+ exports.countries = void 0;
4
+ exports.countries = {
4
5
  BD: 'Bangladesh',
5
6
  BE: 'Belgium',
6
7
  BF: 'Burkina Faso',
@@ -252,3 +253,4 @@ exports.default = {
252
253
  QA: 'Qatar',
253
254
  MZ: 'Mozambique',
254
255
  };
256
+ exports.default = exports.countries;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const customFields: {
2
2
  maxMongoStringLength: number;
3
3
  maxFileSizeBytes: number;
4
4
  emailReferenceHeadingString: string;
@@ -8,4 +8,4 @@ declare const _default: {
8
8
  maxNumberOfRows: number;
9
9
  templateFileName: string;
10
10
  };
11
- export default _default;
11
+ export default customFields;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
3
+ exports.customFields = void 0;
4
+ exports.customFields = {
4
5
  maxMongoStringLength: 4096, // https://github.com/mongodb/mongo/blob/master/src/mongo/shell/linenoise.cpp#L145
5
6
  maxFileSizeBytes: 16000000, // 16 MB https://docs.mongodb.com/manual/reference/limits/
6
7
  emailReferenceHeadingString: 'Email (ref.)',
@@ -10,3 +11,4 @@ exports.default = {
10
11
  maxNumberOfRows: 501, // 500 rows + headings row
11
12
  templateFileName: 'Custom_Fields_Template.csv', // should end in .csv
12
13
  };
14
+ exports.default = exports.customFields;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const distancesUnits: {
2
2
  km: {
3
3
  long: string;
4
4
  short: string;
@@ -8,4 +8,4 @@ declare const _default: {
8
8
  short: string;
9
9
  };
10
10
  };
11
- export default _default;
11
+ export default distancesUnits;
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.distancesUnits = void 0;
3
4
  // These align to https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#distance-units
4
- exports.default = {
5
- km: {
6
- long: 'kilometers',
7
- short: 'km',
8
- },
9
- mi: {
10
- long: 'miles',
11
- short: 'mi',
12
- },
5
+ const km = {
6
+ long: 'kilometers',
7
+ short: 'km',
13
8
  };
9
+ const mi = {
10
+ long: 'miles',
11
+ short: 'mi',
12
+ };
13
+ exports.distancesUnits = {
14
+ km,
15
+ mi,
16
+ };
17
+ exports.default = exports.distancesUnits;
@@ -1,4 +1,14 @@
1
- declare const _default: {
1
+ export declare const maxNumberOfGroupMembers = 10000;
2
+ export declare const defaultOptions: {
3
+ details: string[];
4
+ requirements: string[];
5
+ industries: string[];
6
+ };
7
+ export declare const groupTypes: {
8
+ name: string;
9
+ value: string;
10
+ }[];
11
+ export declare const groups: {
2
12
  maxNumberOfGroupMembers: number;
3
13
  defaultOptions: {
4
14
  details: string[];
@@ -10,4 +20,4 @@ declare const _default: {
10
20
  value: string;
11
21
  }[];
12
22
  };
13
- export default _default;
23
+ export default groups;
@@ -1,85 +1,90 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- maxNumberOfGroupMembers: 10000,
5
- defaultOptions: {
6
- details: [
7
- 'Phone Number',
8
- 'Gender',
9
- 'Date of Birth',
10
- 'Home Address',
11
- 'Current Job Title',
12
- 'Emergency Contact Details',
13
- ],
14
- requirements: [
15
- 'Working with Children Check',
16
- 'Drivers License',
17
- 'Police Check',
18
- 'First Aid Certificate',
19
- 'Orientation',
20
- 'Training',
21
- ],
22
- industries: [
23
- 'Accommodations',
24
- 'Accounting',
25
- 'Advertising',
26
- 'Aerospace',
27
- 'Agriculture & Agribusiness',
28
- 'Air Transportation',
29
- 'Apparel & Accessories',
30
- 'Auto',
31
- 'Banking',
32
- 'Beauty & Cosmetics',
33
- 'Biotechnology',
34
- 'Chemical',
35
- 'Communications',
36
- 'Computer',
37
- 'Construction',
38
- 'Consulting',
39
- 'Consumer Products',
40
- 'Education',
41
- 'Electronics',
42
- 'Employment',
43
- 'Energy',
44
- 'Entertainment & Recreation',
45
- 'Fashion',
46
- 'Financial Services',
47
- 'Food & Beverage',
48
- 'Health',
49
- 'Information',
50
- 'Information Technology',
51
- 'Insurance',
52
- 'Journalism & News',
53
- 'Legal Services',
54
- 'Manufacturing',
55
- 'Media & Broadcasting',
56
- 'Medical Devices & Supplies',
57
- 'Motion Pictures & Video',
58
- 'Music',
59
- 'Pharmaceutical',
60
- 'Public Administration',
61
- 'Public Relations',
62
- 'Publishing',
63
- 'Real Estate',
64
- 'Retail',
65
- 'Service',
66
- 'Sports',
67
- 'Technology',
68
- 'Telecommunications',
69
- 'Tourism',
70
- 'Transportation',
71
- 'Travel',
72
- 'Utilities',
73
- 'Video Game',
74
- 'Web Services',
75
- ],
76
- },
77
- groupTypes: [
78
- { name: 'Business', value: 'business' },
79
- { name: 'Charity/Not-for-profit', value: 'charity-not-for-profit' },
80
- { name: 'Club/Community group', value: 'club-community-group' },
81
- { name: 'Education provider', value: 'education-provider' },
82
- { name: 'Government/Public sector', value: 'government-public-sector' },
83
- { name: 'Volunteer services & centre', value: 'volunteer-service-centre' },
3
+ exports.groups = exports.groupTypes = exports.defaultOptions = exports.maxNumberOfGroupMembers = void 0;
4
+ exports.maxNumberOfGroupMembers = 10000;
5
+ exports.defaultOptions = {
6
+ details: [
7
+ 'Phone Number',
8
+ 'Gender',
9
+ 'Date of Birth',
10
+ 'Home Address',
11
+ 'Current Job Title',
12
+ 'Emergency Contact Details',
84
13
  ],
14
+ requirements: [
15
+ 'Working with Children Check',
16
+ 'Drivers License',
17
+ 'Police Check',
18
+ 'First Aid Certificate',
19
+ 'Orientation',
20
+ 'Training',
21
+ ],
22
+ industries: [
23
+ 'Accommodations',
24
+ 'Accounting',
25
+ 'Advertising',
26
+ 'Aerospace',
27
+ 'Agriculture & Agribusiness',
28
+ 'Air Transportation',
29
+ 'Apparel & Accessories',
30
+ 'Auto',
31
+ 'Banking',
32
+ 'Beauty & Cosmetics',
33
+ 'Biotechnology',
34
+ 'Chemical',
35
+ 'Communications',
36
+ 'Computer',
37
+ 'Construction',
38
+ 'Consulting',
39
+ 'Consumer Products',
40
+ 'Education',
41
+ 'Electronics',
42
+ 'Employment',
43
+ 'Energy',
44
+ 'Entertainment & Recreation',
45
+ 'Fashion',
46
+ 'Financial Services',
47
+ 'Food & Beverage',
48
+ 'Health',
49
+ 'Information',
50
+ 'Information Technology',
51
+ 'Insurance',
52
+ 'Journalism & News',
53
+ 'Legal Services',
54
+ 'Manufacturing',
55
+ 'Media & Broadcasting',
56
+ 'Medical Devices & Supplies',
57
+ 'Motion Pictures & Video',
58
+ 'Music',
59
+ 'Pharmaceutical',
60
+ 'Public Administration',
61
+ 'Public Relations',
62
+ 'Publishing',
63
+ 'Real Estate',
64
+ 'Retail',
65
+ 'Service',
66
+ 'Sports',
67
+ 'Technology',
68
+ 'Telecommunications',
69
+ 'Tourism',
70
+ 'Transportation',
71
+ 'Travel',
72
+ 'Utilities',
73
+ 'Video Game',
74
+ 'Web Services',
75
+ ],
76
+ };
77
+ exports.groupTypes = [
78
+ { name: 'Business', value: 'business' },
79
+ { name: 'Charity/Not-for-profit', value: 'charity-not-for-profit' },
80
+ { name: 'Club/Community group', value: 'club-community-group' },
81
+ { name: 'Education provider', value: 'education-provider' },
82
+ { name: 'Government/Public sector', value: 'government-public-sector' },
83
+ { name: 'Volunteer services & centre', value: 'volunteer-service-centre' },
84
+ ];
85
+ exports.groups = {
86
+ maxNumberOfGroupMembers: exports.maxNumberOfGroupMembers,
87
+ defaultOptions: exports.defaultOptions,
88
+ groupTypes: exports.groupTypes,
85
89
  };
90
+ exports.default = exports.groups;
@@ -1,4 +1,16 @@
1
- declare const _default: {
1
+ export declare const INSURED: {
2
+ value: string;
3
+ label: string;
4
+ };
5
+ export declare const UNINSURED: {
6
+ value: string;
7
+ label: string;
8
+ };
9
+ export declare const AUSPICED: {
10
+ value: string;
11
+ label: string;
12
+ };
13
+ export declare const insuranceStatuses: {
2
14
  INSURED: {
3
15
  value: string;
4
16
  label: string;
@@ -12,4 +24,4 @@ declare const _default: {
12
24
  label: string;
13
25
  };
14
26
  };
15
- export default _default;
27
+ export default insuranceStatuses;
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- INSURED: { value: 'insured', label: 'We have insurance' },
5
- UNINSURED: { value: 'uninsured', label: "We don't have insurance" },
6
- AUSPICED: { value: 'auspiced', label: 'We are auspiced by another organisation' },
3
+ exports.insuranceStatuses = exports.AUSPICED = exports.UNINSURED = exports.INSURED = void 0;
4
+ exports.INSURED = { value: 'insured', label: 'We have insurance' };
5
+ exports.UNINSURED = { value: 'uninsured', label: "We don't have insurance" };
6
+ exports.AUSPICED = { value: 'auspiced', label: 'We are auspiced by another organisation' };
7
+ exports.insuranceStatuses = {
8
+ INSURED: exports.INSURED,
9
+ UNINSURED: exports.UNINSURED,
10
+ AUSPICED: exports.AUSPICED,
7
11
  };
12
+ exports.default = exports.insuranceStatuses;
@@ -1,4 +1,36 @@
1
- declare const _default: {
1
+ export declare const publicLiabilityAU: {
2
+ type: string;
3
+ label: string;
4
+ };
5
+ export declare const volunteerAccidentAU: {
6
+ type: string;
7
+ label: string;
8
+ };
9
+ export declare const publicLiabilityGB: {
10
+ type: string;
11
+ label: string;
12
+ };
13
+ export declare const volunteerAccidentGB: {
14
+ type: string;
15
+ label: string;
16
+ };
17
+ export declare const publicLiabilityNZ: {
18
+ type: string;
19
+ label: string;
20
+ };
21
+ export declare const volunteerAccidentNZ: {
22
+ type: string;
23
+ label: string;
24
+ };
25
+ export declare const publicLiabilityOthers: {
26
+ type: string;
27
+ label: string;
28
+ };
29
+ export declare const volunteerAccidentOthers: {
30
+ type: string;
31
+ label: string;
32
+ };
33
+ export declare const insuranceTypes: {
2
34
  publicLiabilityAU: {
3
35
  type: string;
4
36
  label: string;
@@ -32,4 +64,4 @@ declare const _default: {
32
64
  label: string;
33
65
  };
34
66
  };
35
- export default _default;
67
+ export default insuranceTypes;
@@ -1,36 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- publicLiabilityAU: {
5
- type: 'publicLiabilityAU',
6
- label: 'Public Liability Insurance',
7
- },
8
- volunteerAccidentAU: {
9
- type: 'volunteerAccidentAU',
10
- label: 'Volunteer Accident Insurance',
11
- },
12
- publicLiabilityGB: {
13
- type: 'publicLiabilityGB',
14
- label: 'Public Liability',
15
- },
16
- volunteerAccidentGB: {
17
- type: 'volunteerAccidentGB',
18
- label: "Employer's Liability",
19
- },
20
- publicLiabilityNZ: {
21
- type: 'publicLiabilityNZ',
22
- label: 'Public Liability',
23
- },
24
- volunteerAccidentNZ: {
25
- type: 'volunteerAccidentNZ',
26
- label: "Employer's Liability",
27
- },
28
- publicLiabilityOthers: {
29
- type: 'publicLiabilityOthers',
30
- label: 'Public Liability',
31
- },
32
- volunteerAccidentOthers: {
33
- type: 'volunteerAccidentOthers',
34
- label: "Employer's Liability",
35
- },
3
+ exports.insuranceTypes = exports.volunteerAccidentOthers = exports.publicLiabilityOthers = exports.volunteerAccidentNZ = exports.publicLiabilityNZ = exports.volunteerAccidentGB = exports.publicLiabilityGB = exports.volunteerAccidentAU = exports.publicLiabilityAU = void 0;
4
+ exports.publicLiabilityAU = {
5
+ type: 'publicLiabilityAU',
6
+ label: 'Public Liability Insurance',
36
7
  };
8
+ exports.volunteerAccidentAU = {
9
+ type: 'volunteerAccidentAU',
10
+ label: 'Volunteer Accident Insurance',
11
+ };
12
+ exports.publicLiabilityGB = {
13
+ type: 'publicLiabilityGB',
14
+ label: 'Public Liability',
15
+ };
16
+ exports.volunteerAccidentGB = {
17
+ type: 'volunteerAccidentGB',
18
+ label: "Employer's Liability",
19
+ };
20
+ exports.publicLiabilityNZ = {
21
+ type: 'publicLiabilityNZ',
22
+ label: 'Public Liability',
23
+ };
24
+ exports.volunteerAccidentNZ = {
25
+ type: 'volunteerAccidentNZ',
26
+ label: "Employer's Liability",
27
+ };
28
+ exports.publicLiabilityOthers = {
29
+ type: 'publicLiabilityOthers',
30
+ label: 'Public Liability',
31
+ };
32
+ exports.volunteerAccidentOthers = {
33
+ type: 'volunteerAccidentOthers',
34
+ label: "Employer's Liability",
35
+ };
36
+ exports.insuranceTypes = {
37
+ publicLiabilityAU: exports.publicLiabilityAU,
38
+ volunteerAccidentAU: exports.volunteerAccidentAU,
39
+ publicLiabilityGB: exports.publicLiabilityGB,
40
+ volunteerAccidentGB: exports.volunteerAccidentGB,
41
+ publicLiabilityNZ: exports.publicLiabilityNZ,
42
+ volunteerAccidentNZ: exports.volunteerAccidentNZ,
43
+ publicLiabilityOthers: exports.publicLiabilityOthers,
44
+ volunteerAccidentOthers: exports.volunteerAccidentOthers
45
+ };
46
+ exports.default = exports.insuranceTypes;
@@ -1,2 +1,2 @@
1
- declare const _default: string[];
2
- export default _default;
1
+ export declare const languages: string[];
2
+ export default languages;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [
3
+ exports.languages = void 0;
4
+ exports.languages = [
4
5
  'abkhaz',
5
6
  'afar',
6
7
  'afrikaans',
@@ -192,3 +193,4 @@ exports.default = [
192
193
  'zhuang',
193
194
  'zulu',
194
195
  ];
196
+ exports.default = exports.languages;
@@ -1,4 +1,4 @@
1
1
  export declare const licencesAndCertifications: string[];
2
2
  export declare const educationalQualifications: string[];
3
- declare const _default: string[];
4
- export default _default;
3
+ export declare const qualificationTypes: string[];
4
+ export default qualificationTypes;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.educationalQualifications = exports.licencesAndCertifications = void 0;
3
+ exports.qualificationTypes = exports.educationalQualifications = exports.licencesAndCertifications = void 0;
4
4
  exports.licencesAndCertifications = [
5
5
  'Drivers Licence',
6
6
  'First Aid Certification',
@@ -15,4 +15,5 @@ exports.educationalQualifications = [
15
15
  "Bachelor's Degree / Undergraduate",
16
16
  "Master's Degree / Postgraduate and above",
17
17
  ];
18
- exports.default = [...exports.licencesAndCertifications, ...exports.educationalQualifications];
18
+ exports.qualificationTypes = [...exports.licencesAndCertifications, ...exports.educationalQualifications];
19
+ exports.default = exports.qualificationTypes;
@@ -1,4 +1,14 @@
1
- declare const _default: {
1
+ export declare const daysOfTheWeek: {
2
+ label: string;
3
+ value: import("rrule").Weekday;
4
+ selected: boolean;
5
+ }[];
6
+ export declare const frequencyOptions: {
7
+ value: number;
8
+ label: string;
9
+ description: string;
10
+ }[];
11
+ export declare const rules: {
2
12
  daysOfTheWeek: {
3
13
  label: string;
4
14
  value: import("rrule").Weekday;
@@ -10,4 +20,4 @@ declare const _default: {
10
20
  description: string;
11
21
  }[];
12
22
  };
13
- export default _default;
23
+ export default rules;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rules = exports.frequencyOptions = exports.daysOfTheWeek = void 0;
3
4
  const rrule_1 = require("rrule");
4
- const daysOfTheWeek = [
5
+ exports.daysOfTheWeek = [
5
6
  { label: 'Monday', value: rrule_1.RRule.MO, selected: false },
6
7
  { label: 'Tuesday', value: rrule_1.RRule.TU, selected: false },
7
8
  { label: 'Wednesday', value: rrule_1.RRule.WE, selected: false },
@@ -10,12 +11,13 @@ const daysOfTheWeek = [
10
11
  { label: 'Saturday', value: rrule_1.RRule.SA, selected: false },
11
12
  { label: 'Sunday', value: rrule_1.RRule.SU, selected: false },
12
13
  ];
13
- const frequencyOptions = [
14
+ exports.frequencyOptions = [
14
15
  { value: 0, label: 'in total', description: '' },
15
16
  { value: rrule_1.RRule.WEEKLY, label: 'per week', description: 'each week' },
16
17
  { value: rrule_1.RRule.MONTHLY, label: 'per month', description: 'each month' },
17
18
  ];
18
- exports.default = {
19
- daysOfTheWeek,
20
- frequencyOptions,
19
+ exports.rules = {
20
+ daysOfTheWeek: exports.daysOfTheWeek,
21
+ frequencyOptions: exports.frequencyOptions,
21
22
  };
23
+ exports.default = exports.rules;
@@ -1,4 +1,17 @@
1
- declare const _default: {
1
+ export declare const participantStatuses: {
2
+ notSent: string;
3
+ sent: string;
4
+ reSent: string;
5
+ responded: string;
6
+ };
7
+ export declare const subscriptionDowngradeReasons: {
8
+ featureLack: string;
9
+ expense: string;
10
+ difficulty: string;
11
+ technicalIssues: string;
12
+ other: string;
13
+ };
14
+ export declare const surveys: {
2
15
  participantStatuses: {
3
16
  notSent: string;
4
17
  sent: string;
@@ -13,4 +26,4 @@ declare const _default: {
13
26
  other: string;
14
27
  };
15
28
  };
16
- export default _default;
29
+ export default surveys;
@@ -1,17 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- participantStatuses: {
5
- notSent: 'not-sent',
6
- sent: 'sent',
7
- reSent: 're-sent',
8
- responded: 'responded',
9
- },
10
- subscriptionDowngradeReasons: {
11
- featureLack: 'Features not useful / missing features we need',
12
- expense: 'Too expensive',
13
- difficulty: 'Difficult to use',
14
- technicalIssues: 'Technical issues',
15
- other: 'Other',
16
- },
3
+ exports.surveys = exports.subscriptionDowngradeReasons = exports.participantStatuses = void 0;
4
+ exports.participantStatuses = {
5
+ notSent: 'not-sent',
6
+ sent: 'sent',
7
+ reSent: 're-sent',
8
+ responded: 'responded',
17
9
  };
10
+ exports.subscriptionDowngradeReasons = {
11
+ featureLack: 'Features not useful / missing features we need',
12
+ expense: 'Too expensive',
13
+ difficulty: 'Difficult to use',
14
+ technicalIssues: 'Technical issues',
15
+ other: 'Other',
16
+ };
17
+ exports.surveys = {
18
+ participantStatuses: exports.participantStatuses,
19
+ subscriptionDowngradeReasons: exports.subscriptionDowngradeReasons,
20
+ };
21
+ exports.default = exports.surveys;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@becollective/utils",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Common utilities",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,6 +1,11 @@
1
- export default {
2
- allowedTags: ['b', 'i', 'em', 'strong', 'a', 'p', 'u', 'del', 'div', 'ins', 'li', 'ul', 'ol', 'br'],
3
- allowedAttributes: {
4
- a: ['href', 'target', 'rel'],
5
- },
1
+ export const allowedTags = ['b', 'i', 'em', 'strong', 'a', 'p', 'u', 'del', 'div', 'ins', 'li', 'ul', 'ol', 'br'];
2
+ export const allowedAttributes = {
3
+ a: ['href', 'target', 'rel'],
6
4
  };
5
+
6
+ export const allowedHtmlTags = {
7
+ allowedTags,
8
+ allowedAttributes,
9
+ };
10
+
11
+ export default allowedHtmlTags;
@@ -1,4 +1,4 @@
1
- export default {
1
+ export const countries = {
2
2
  BD: 'Bangladesh',
3
3
  BE: 'Belgium',
4
4
  BF: 'Burkina Faso',
@@ -250,3 +250,5 @@ export default {
250
250
  QA: 'Qatar',
251
251
  MZ: 'Mozambique',
252
252
  };
253
+
254
+ export default countries;
@@ -1,4 +1,4 @@
1
- export default {
1
+ export const customFields = {
2
2
  maxMongoStringLength: 4096, // https://github.com/mongodb/mongo/blob/master/src/mongo/shell/linenoise.cpp#L145
3
3
  maxFileSizeBytes: 16000000, // 16 MB https://docs.mongodb.com/manual/reference/limits/
4
4
  emailReferenceHeadingString: 'Email (ref.)',
@@ -8,3 +8,5 @@ export default {
8
8
  maxNumberOfRows: 501, // 500 rows + headings row
9
9
  templateFileName: 'Custom_Fields_Template.csv', // should end in .csv
10
10
  };
11
+
12
+ export default customFields;
@@ -1,11 +1,17 @@
1
1
  // These align to https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#distance-units
2
- export default {
3
- km: {
4
- long: 'kilometers',
5
- short: 'km',
6
- },
7
- mi: {
8
- long: 'miles',
9
- short: 'mi',
10
- },
2
+ const km = {
3
+ long: 'kilometers',
4
+ short: 'km',
11
5
  };
6
+
7
+ const mi = {
8
+ long: 'miles',
9
+ short: 'mi',
10
+ };
11
+
12
+ export const distancesUnits = {
13
+ km,
14
+ mi,
15
+ }
16
+
17
+ export default distancesUnits;
@@ -1,83 +1,91 @@
1
- export default {
2
- maxNumberOfGroupMembers: 10000,
3
- defaultOptions: {
4
- details: [
5
- 'Phone Number',
6
- 'Gender',
7
- 'Date of Birth',
8
- 'Home Address',
9
- 'Current Job Title',
10
- 'Emergency Contact Details',
11
- ],
12
- requirements: [
13
- 'Working with Children Check',
14
- 'Drivers License',
15
- 'Police Check',
16
- 'First Aid Certificate',
17
- 'Orientation',
18
- 'Training',
19
- ],
20
- industries: [
21
- 'Accommodations',
22
- 'Accounting',
23
- 'Advertising',
24
- 'Aerospace',
25
- 'Agriculture & Agribusiness',
26
- 'Air Transportation',
27
- 'Apparel & Accessories',
28
- 'Auto',
29
- 'Banking',
30
- 'Beauty & Cosmetics',
31
- 'Biotechnology',
32
- 'Chemical',
33
- 'Communications',
34
- 'Computer',
35
- 'Construction',
36
- 'Consulting',
37
- 'Consumer Products',
38
- 'Education',
39
- 'Electronics',
40
- 'Employment',
41
- 'Energy',
42
- 'Entertainment & Recreation',
43
- 'Fashion',
44
- 'Financial Services',
45
- 'Food & Beverage',
46
- 'Health',
47
- 'Information',
48
- 'Information Technology',
49
- 'Insurance',
50
- 'Journalism & News',
51
- 'Legal Services',
52
- 'Manufacturing',
53
- 'Media & Broadcasting',
54
- 'Medical Devices & Supplies',
55
- 'Motion Pictures & Video',
56
- 'Music',
57
- 'Pharmaceutical',
58
- 'Public Administration',
59
- 'Public Relations',
60
- 'Publishing',
61
- 'Real Estate',
62
- 'Retail',
63
- 'Service',
64
- 'Sports',
65
- 'Technology',
66
- 'Telecommunications',
67
- 'Tourism',
68
- 'Transportation',
69
- 'Travel',
70
- 'Utilities',
71
- 'Video Game',
72
- 'Web Services',
73
- ],
74
- },
75
- groupTypes: [
76
- { name: 'Business', value: 'business' },
77
- { name: 'Charity/Not-for-profit', value: 'charity-not-for-profit' },
78
- { name: 'Club/Community group', value: 'club-community-group' },
79
- { name: 'Education provider', value: 'education-provider' },
80
- { name: 'Government/Public sector', value: 'government-public-sector' },
81
- { name: 'Volunteer services & centre', value: 'volunteer-service-centre' },
1
+ export const maxNumberOfGroupMembers = 10000;
2
+
3
+ export const defaultOptions = {
4
+ details: [
5
+ 'Phone Number',
6
+ 'Gender',
7
+ 'Date of Birth',
8
+ 'Home Address',
9
+ 'Current Job Title',
10
+ 'Emergency Contact Details',
82
11
  ],
12
+ requirements: [
13
+ 'Working with Children Check',
14
+ 'Drivers License',
15
+ 'Police Check',
16
+ 'First Aid Certificate',
17
+ 'Orientation',
18
+ 'Training',
19
+ ],
20
+ industries: [
21
+ 'Accommodations',
22
+ 'Accounting',
23
+ 'Advertising',
24
+ 'Aerospace',
25
+ 'Agriculture & Agribusiness',
26
+ 'Air Transportation',
27
+ 'Apparel & Accessories',
28
+ 'Auto',
29
+ 'Banking',
30
+ 'Beauty & Cosmetics',
31
+ 'Biotechnology',
32
+ 'Chemical',
33
+ 'Communications',
34
+ 'Computer',
35
+ 'Construction',
36
+ 'Consulting',
37
+ 'Consumer Products',
38
+ 'Education',
39
+ 'Electronics',
40
+ 'Employment',
41
+ 'Energy',
42
+ 'Entertainment & Recreation',
43
+ 'Fashion',
44
+ 'Financial Services',
45
+ 'Food & Beverage',
46
+ 'Health',
47
+ 'Information',
48
+ 'Information Technology',
49
+ 'Insurance',
50
+ 'Journalism & News',
51
+ 'Legal Services',
52
+ 'Manufacturing',
53
+ 'Media & Broadcasting',
54
+ 'Medical Devices & Supplies',
55
+ 'Motion Pictures & Video',
56
+ 'Music',
57
+ 'Pharmaceutical',
58
+ 'Public Administration',
59
+ 'Public Relations',
60
+ 'Publishing',
61
+ 'Real Estate',
62
+ 'Retail',
63
+ 'Service',
64
+ 'Sports',
65
+ 'Technology',
66
+ 'Telecommunications',
67
+ 'Tourism',
68
+ 'Transportation',
69
+ 'Travel',
70
+ 'Utilities',
71
+ 'Video Game',
72
+ 'Web Services',
73
+ ],
74
+ };
75
+
76
+ export const groupTypes = [
77
+ { name: 'Business', value: 'business' },
78
+ { name: 'Charity/Not-for-profit', value: 'charity-not-for-profit' },
79
+ { name: 'Club/Community group', value: 'club-community-group' },
80
+ { name: 'Education provider', value: 'education-provider' },
81
+ { name: 'Government/Public sector', value: 'government-public-sector' },
82
+ { name: 'Volunteer services & centre', value: 'volunteer-service-centre' },
83
+ ];
84
+
85
+ export const groups = {
86
+ maxNumberOfGroupMembers,
87
+ defaultOptions,
88
+ groupTypes,
83
89
  };
90
+
91
+ export default groups;
@@ -1,5 +1,11 @@
1
- export default {
2
- INSURED: { value: 'insured', label: 'We have insurance' },
3
- UNINSURED: { value: 'uninsured', label: "We don't have insurance" },
4
- AUSPICED: { value: 'auspiced', label: 'We are auspiced by another organisation' },
1
+ export const INSURED = { value: 'insured', label: 'We have insurance' };
2
+ export const UNINSURED = { value: 'uninsured', label: "We don't have insurance" };
3
+ export const AUSPICED = { value: 'auspiced', label: 'We are auspiced by another organisation' };
4
+
5
+ export const insuranceStatuses = {
6
+ INSURED,
7
+ UNINSURED,
8
+ AUSPICED,
5
9
  };
10
+
11
+ export default insuranceStatuses;
@@ -1,34 +1,52 @@
1
- export default {
2
- publicLiabilityAU: {
3
- type: 'publicLiabilityAU',
4
- label: 'Public Liability Insurance',
5
- },
6
- volunteerAccidentAU: {
7
- type: 'volunteerAccidentAU',
8
- label: 'Volunteer Accident Insurance',
9
- },
10
- publicLiabilityGB: {
11
- type: 'publicLiabilityGB',
12
- label: 'Public Liability',
13
- },
14
- volunteerAccidentGB: {
15
- type: 'volunteerAccidentGB',
16
- label: "Employer's Liability",
17
- },
18
- publicLiabilityNZ: {
19
- type: 'publicLiabilityNZ',
20
- label: 'Public Liability',
21
- },
22
- volunteerAccidentNZ: {
23
- type: 'volunteerAccidentNZ',
24
- label: "Employer's Liability",
25
- },
26
- publicLiabilityOthers: {
27
- type: 'publicLiabilityOthers',
28
- label: 'Public Liability',
29
- },
30
- volunteerAccidentOthers: {
31
- type: 'volunteerAccidentOthers',
32
- label: "Employer's Liability",
33
- },
1
+ export const publicLiabilityAU = {
2
+ type: 'publicLiabilityAU',
3
+ label: 'Public Liability Insurance',
34
4
  };
5
+
6
+ export const volunteerAccidentAU = {
7
+ type: 'volunteerAccidentAU',
8
+ label: 'Volunteer Accident Insurance',
9
+ };
10
+
11
+ export const publicLiabilityGB = {
12
+ type: 'publicLiabilityGB',
13
+ label: 'Public Liability',
14
+ };
15
+
16
+ export const volunteerAccidentGB = {
17
+ type: 'volunteerAccidentGB',
18
+ label: "Employer's Liability",
19
+ };
20
+
21
+ export const publicLiabilityNZ = {
22
+ type: 'publicLiabilityNZ',
23
+ label: 'Public Liability',
24
+ };
25
+
26
+ export const volunteerAccidentNZ = {
27
+ type: 'volunteerAccidentNZ',
28
+ label: "Employer's Liability",
29
+ };
30
+
31
+ export const publicLiabilityOthers = {
32
+ type: 'publicLiabilityOthers',
33
+ label: 'Public Liability',
34
+ };
35
+
36
+ export const volunteerAccidentOthers = {
37
+ type: 'volunteerAccidentOthers',
38
+ label: "Employer's Liability",
39
+ };
40
+
41
+ export const insuranceTypes = {
42
+ publicLiabilityAU,
43
+ volunteerAccidentAU,
44
+ publicLiabilityGB,
45
+ volunteerAccidentGB,
46
+ publicLiabilityNZ,
47
+ volunteerAccidentNZ,
48
+ publicLiabilityOthers,
49
+ volunteerAccidentOthers
50
+ };
51
+
52
+ export default insuranceTypes;
@@ -1,4 +1,4 @@
1
- export default [
1
+ export const languages = [
2
2
  'abkhaz',
3
3
  'afar',
4
4
  'afrikaans',
@@ -190,3 +190,5 @@ export default [
190
190
  'zhuang',
191
191
  'zulu',
192
192
  ];
193
+
194
+ export default languages;
@@ -14,4 +14,5 @@ export const educationalQualifications = [
14
14
  "Master's Degree / Postgraduate and above",
15
15
  ];
16
16
 
17
- export default [...licencesAndCertifications, ...educationalQualifications];
17
+ export const qualificationTypes = [...licencesAndCertifications, ...educationalQualifications];
18
+ export default qualificationTypes;
@@ -1,6 +1,6 @@
1
1
  import { RRule } from 'rrule';
2
2
 
3
- const daysOfTheWeek = [
3
+ export const daysOfTheWeek = [
4
4
  { label: 'Monday', value: RRule.MO, selected: false },
5
5
  { label: 'Tuesday', value: RRule.TU, selected: false },
6
6
  { label: 'Wednesday', value: RRule.WE, selected: false },
@@ -10,13 +10,15 @@ const daysOfTheWeek = [
10
10
  { label: 'Sunday', value: RRule.SU, selected: false },
11
11
  ];
12
12
 
13
- const frequencyOptions = [
13
+ export const frequencyOptions = [
14
14
  { value: 0, label: 'in total', description: '' },
15
15
  { value: RRule.WEEKLY, label: 'per week', description: 'each week' },
16
16
  { value: RRule.MONTHLY, label: 'per month', description: 'each month' },
17
17
  ];
18
18
 
19
- export default {
19
+ export const rules = {
20
20
  daysOfTheWeek,
21
21
  frequencyOptions,
22
22
  };
23
+
24
+ export default rules;
@@ -1,15 +1,21 @@
1
- export default {
2
- participantStatuses: {
3
- notSent: 'not-sent',
4
- sent: 'sent',
5
- reSent: 're-sent',
6
- responded: 'responded',
7
- },
8
- subscriptionDowngradeReasons: {
9
- featureLack: 'Features not useful / missing features we need',
10
- expense: 'Too expensive',
11
- difficulty: 'Difficult to use',
12
- technicalIssues: 'Technical issues',
13
- other: 'Other',
14
- },
1
+ export const participantStatuses = {
2
+ notSent: 'not-sent',
3
+ sent: 'sent',
4
+ reSent: 're-sent',
5
+ responded: 'responded',
15
6
  };
7
+
8
+ export const subscriptionDowngradeReasons = {
9
+ featureLack: 'Features not useful / missing features we need',
10
+ expense: 'Too expensive',
11
+ difficulty: 'Difficult to use',
12
+ technicalIssues: 'Technical issues',
13
+ other: 'Other',
14
+ };
15
+
16
+ export const surveys = {
17
+ participantStatuses,
18
+ subscriptionDowngradeReasons,
19
+ };
20
+
21
+ export default surveys;