@becollective/utils 1.10.2 → 2.0.0

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 (125) hide show
  1. package/.semaphore/utils.yml +1 -1
  2. package/index.ts +7 -0
  3. package/lib/FeatureFlag.d.ts +12 -0
  4. package/lib/FeatureFlag.js +51 -0
  5. package/lib/constants/allowedHtmlTags.d.ts +7 -0
  6. package/lib/constants/allowedHtmlTags.js +8 -0
  7. package/lib/constants/avatarColours.d.ts +35 -0
  8. package/lib/constants/avatarColours.js +36 -0
  9. package/lib/constants/countries.d.ts +253 -0
  10. package/lib/constants/countries.js +254 -0
  11. package/lib/constants/currencies.d.ts +29 -0
  12. package/lib/constants/currencies.js +36 -0
  13. package/lib/constants/customFields.d.ts +11 -0
  14. package/lib/constants/customFields.js +12 -0
  15. package/lib/constants/distancesUnits.d.ts +11 -0
  16. package/lib/constants/distancesUnits.js +13 -0
  17. package/lib/constants/groups.d.ts +13 -0
  18. package/lib/constants/groups.js +85 -0
  19. package/lib/constants/insuranceStatuses.d.ts +15 -0
  20. package/lib/constants/insuranceStatuses.js +7 -0
  21. package/lib/constants/insuranceTypes.d.ts +35 -0
  22. package/lib/constants/insuranceTypes.js +36 -0
  23. package/lib/constants/languages.d.ts +2 -0
  24. package/lib/constants/languages.js +194 -0
  25. package/lib/constants/locales.d.ts +119 -0
  26. package/lib/constants/locales.js +191 -0
  27. package/lib/constants/notifications.d.ts +47 -0
  28. package/lib/constants/notifications.js +31 -0
  29. package/lib/constants/opportunities.d.ts +72 -0
  30. package/lib/constants/opportunities.js +82 -0
  31. package/lib/constants/qualificationTypes.d.ts +4 -0
  32. package/lib/constants/qualificationTypes.js +18 -0
  33. package/lib/constants/rules.d.ts +13 -0
  34. package/lib/constants/rules.js +21 -0
  35. package/lib/constants/subscriptions.d.ts +9 -0
  36. package/lib/constants/subscriptions.js +10 -0
  37. package/lib/constants/surveys.d.ts +16 -0
  38. package/lib/constants/surveys.js +17 -0
  39. package/lib/constants.d.ts +1 -0
  40. package/lib/constants.js +76 -0
  41. package/lib/date-time.d.ts +28 -0
  42. package/lib/date-time.js +79 -0
  43. package/lib/forms.d.ts +1 -0
  44. package/lib/forms.js +728 -0
  45. package/lib/locality.d.ts +5 -0
  46. package/lib/locality.js +15 -0
  47. package/lib/money.d.ts +7 -0
  48. package/lib/money.js +32 -0
  49. package/lib/opportunity.d.ts +1 -0
  50. package/lib/opportunity.js +11 -0
  51. package/lib/opportunityUser.d.ts +8 -0
  52. package/lib/opportunityUser.js +29 -0
  53. package/lib/password.d.ts +8 -0
  54. package/lib/password.js +43 -0
  55. package/lib/rrule/date.d.ts +4 -0
  56. package/lib/rrule/date.js +30 -0
  57. package/lib/rrule/index.d.ts +2 -0
  58. package/lib/rrule/index.js +18 -0
  59. package/lib/rrule/parsing.d.ts +6 -0
  60. package/lib/rrule/parsing.js +130 -0
  61. package/lib/rrule/parsing.test.d.ts +1 -0
  62. package/lib/rrule/parsing.test.js +11 -0
  63. package/lib/rrule.d.ts +49 -0
  64. package/lib/rrule.js +303 -0
  65. package/lib/src/FeatureFlag.d.ts +12 -0
  66. package/lib/src/FeatureFlag.js +51 -0
  67. package/lib/src/date-time.d.ts +28 -0
  68. package/lib/src/date-time.js +79 -0
  69. package/lib/src/forms.d.ts +1 -0
  70. package/lib/src/forms.js +728 -0
  71. package/lib/src/locality.d.ts +5 -0
  72. package/lib/src/locality.js +15 -0
  73. package/lib/src/money.d.ts +7 -0
  74. package/lib/src/money.js +32 -0
  75. package/lib/src/opportunity.d.ts +1 -0
  76. package/lib/src/opportunity.js +11 -0
  77. package/lib/src/opportunityUser.d.ts +8 -0
  78. package/lib/src/opportunityUser.js +29 -0
  79. package/lib/src/password.d.ts +8 -0
  80. package/lib/src/password.js +43 -0
  81. package/package.json +15 -29
  82. package/src/FeatureFlag.ts +26 -10
  83. package/src/constants/allowedHtmlTags.ts +6 -0
  84. package/src/constants/avatarColours.ts +34 -0
  85. package/src/constants/countries.ts +252 -0
  86. package/src/constants/currencies.ts +33 -0
  87. package/src/constants/customFields.ts +10 -0
  88. package/src/constants/distancesUnits.ts +11 -0
  89. package/src/constants/groups.ts +83 -0
  90. package/src/constants/insuranceStatuses.ts +5 -0
  91. package/src/constants/insuranceTypes.ts +34 -0
  92. package/src/constants/languages.ts +192 -0
  93. package/src/constants/locales.ts +189 -0
  94. package/src/constants/notifications.ts +30 -0
  95. package/src/constants/opportunities.ts +84 -0
  96. package/src/constants/qualificationTypes.ts +17 -0
  97. package/src/constants/rules.ts +22 -0
  98. package/src/constants/subscriptions.ts +8 -0
  99. package/src/constants/surveys.ts +15 -0
  100. package/src/constants.ts +40 -0
  101. package/src/{date-time.js → date-time.ts} +18 -11
  102. package/src/forms.ts +807 -0
  103. package/src/{opportunityUser.js → opportunityUser.ts} +5 -1
  104. package/src/{password.js → password.ts} +2 -0
  105. package/src/rrule/date.ts +25 -0
  106. package/src/rrule/index.ts +2 -0
  107. package/src/rrule/parsing.ts +136 -0
  108. package/src/rrule.ts +367 -0
  109. package/tests/{date-time.test.js → date-time.test.ts} +48 -46
  110. package/tests/featureFlag.test.ts +36 -39
  111. package/tests/forms.test-data.json +43 -0
  112. package/tests/forms.test-schema.json +144 -0
  113. package/tests/forms.test-uischema.json +117 -0
  114. package/tests/forms.test.ts +674 -0
  115. package/tests/{money.test.js → money.test.ts} +2 -3
  116. package/tests/{password.test.js → password.test.ts} +7 -6
  117. package/tests/rrule/parsing.test.ts +12 -0
  118. package/tests/rrule.test.ts +625 -0
  119. package/tsconfig.json +15 -12
  120. package/bundle.js +0 -270
  121. package/index.js +0 -25
  122. package/rollup.config.js +0 -25
  123. /package/src/{locality.js → locality.ts} +0 -0
  124. /package/src/{money.js → money.ts} +0 -0
  125. /package/src/{opportunity.js → opportunity.ts} +0 -0
@@ -0,0 +1,83 @@
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' },
82
+ ],
83
+ };
@@ -0,0 +1,5 @@
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' },
5
+ };
@@ -0,0 +1,34 @@
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
+ },
34
+ };
@@ -0,0 +1,192 @@
1
+ export default [
2
+ 'abkhaz',
3
+ 'afar',
4
+ 'afrikaans',
5
+ 'akan',
6
+ 'albanian',
7
+ 'amharic',
8
+ 'arabic',
9
+ 'aragonese',
10
+ 'armenian',
11
+ 'assamese',
12
+ 'avaric',
13
+ 'avestan',
14
+ 'aymara',
15
+ 'azerbaijani',
16
+ 'bambara',
17
+ 'bashkir',
18
+ 'basque',
19
+ 'belarusian',
20
+ 'bengali',
21
+ 'berber',
22
+ 'bihari',
23
+ 'bislama',
24
+ 'bosnian',
25
+ 'breton',
26
+ 'bulgarian',
27
+ 'burmese',
28
+ 'cantonese',
29
+ 'catalan',
30
+ 'chamorro',
31
+ 'chechen',
32
+ 'chichewa',
33
+ 'chinese (mandarin)',
34
+ 'chuvash',
35
+ 'cornish',
36
+ 'corsican',
37
+ 'cree',
38
+ 'croatian',
39
+ 'czech',
40
+ 'danish',
41
+ 'dari',
42
+ 'divehi',
43
+ 'dutch',
44
+ 'dzongkha',
45
+ 'english',
46
+ 'esperanto',
47
+ 'estonian',
48
+ 'ewe',
49
+ 'faroese',
50
+ 'fijian',
51
+ 'filipino',
52
+ 'finnish',
53
+ 'french',
54
+ 'fula',
55
+ 'gaelic',
56
+ 'galician',
57
+ 'ganda',
58
+ 'georgian',
59
+ 'german',
60
+ 'greek',
61
+ 'guaraní',
62
+ 'gujarati',
63
+ 'haitian',
64
+ 'hausa',
65
+ 'hebrew',
66
+ 'herero',
67
+ 'hindi',
68
+ 'hiri motu',
69
+ 'hungarian',
70
+ 'icelandic',
71
+ 'ido',
72
+ 'igbo',
73
+ 'indonesian',
74
+ 'interlingua',
75
+ 'interlingue',
76
+ 'inuktitut',
77
+ 'inupiaq',
78
+ 'irish',
79
+ 'italian',
80
+ 'japanese',
81
+ 'javanese',
82
+ 'kalaallisut',
83
+ 'kannada',
84
+ 'kanuri',
85
+ 'kashmiri',
86
+ 'kazakh',
87
+ 'khmer',
88
+ 'kikuyu',
89
+ 'kinyarwanda',
90
+ 'kirundi',
91
+ 'komi',
92
+ 'kongo',
93
+ 'korean',
94
+ 'kurdish',
95
+ 'kwanyama',
96
+ 'kyrgyz',
97
+ 'lao',
98
+ 'latin',
99
+ 'latvian',
100
+ 'limburgish',
101
+ 'lingala',
102
+ 'lithuanian',
103
+ 'luba-katanga',
104
+ 'luxembourgish',
105
+ 'macedonian',
106
+ 'malagasy',
107
+ 'malay',
108
+ 'malayalam',
109
+ 'maltese',
110
+ 'manx',
111
+ 'marathi (marāṭhī)',
112
+ 'marshallese',
113
+ 'mongolian',
114
+ 'nauru',
115
+ 'navajo',
116
+ 'ndonga',
117
+ 'nepali',
118
+ 'northern ndebele',
119
+ 'northern sami',
120
+ 'northern sotho',
121
+ 'norwegian bokmål',
122
+ 'norwegian nynorsk',
123
+ 'norwegian',
124
+ 'nuosu',
125
+ 'occitan',
126
+ 'ojibwe',
127
+ 'oriya',
128
+ 'oromo',
129
+ 'ossetian',
130
+ 'panjabi',
131
+ 'pashto',
132
+ 'persian',
133
+ 'polish',
134
+ 'portuguese',
135
+ 'pāli',
136
+ 'quechua',
137
+ 'romanian',
138
+ 'romansh',
139
+ 'russian',
140
+ 'samoan',
141
+ 'sango',
142
+ 'sanskrit (saṁskṛta)',
143
+ 'sardinian',
144
+ 'scottish gaelic',
145
+ 'serbian',
146
+ 'shona',
147
+ 'sign language',
148
+ 'sindhi',
149
+ 'sinhala',
150
+ 'slovak',
151
+ 'slovene',
152
+ 'somali',
153
+ 'southern ndebele',
154
+ 'southern sotho',
155
+ 'spanish',
156
+ 'sundanese',
157
+ 'swahili',
158
+ 'swati',
159
+ 'swedish',
160
+ 'tagalog',
161
+ 'tahitian',
162
+ 'tajik',
163
+ 'tamil',
164
+ 'tatar',
165
+ 'te reo māori',
166
+ 'telugu',
167
+ 'thai',
168
+ 'tibetan standard',
169
+ 'tigrinya',
170
+ 'tonga',
171
+ 'tsonga',
172
+ 'tswana',
173
+ 'turkish',
174
+ 'turkmen',
175
+ 'twi',
176
+ 'ukrainian',
177
+ 'urdu',
178
+ 'uyghur',
179
+ 'uzbek',
180
+ 'venda',
181
+ 'vietnamese',
182
+ 'volapük',
183
+ 'walloon',
184
+ 'welsh',
185
+ 'western frisian',
186
+ 'wolof',
187
+ 'xhosa',
188
+ 'yiddish',
189
+ 'yoruba',
190
+ 'zhuang',
191
+ 'zulu',
192
+ ];
@@ -0,0 +1,189 @@
1
+ import distanceUnits from './distancesUnits';
2
+ import insuranceTypes from './insuranceTypes';
3
+
4
+ export default {
5
+ europeanCountryCodes: [
6
+ 'AL',
7
+ 'AD',
8
+ 'AM',
9
+ 'AT',
10
+ 'BY',
11
+ 'BE',
12
+ 'BA',
13
+ 'BG',
14
+ 'CH',
15
+ 'CY',
16
+ 'CZ',
17
+ 'DE',
18
+ 'DK',
19
+ 'EE',
20
+ 'ES',
21
+ 'FO',
22
+ 'FI',
23
+ 'FR',
24
+ 'GE',
25
+ 'VA',
26
+ 'GI',
27
+ 'GR',
28
+ 'HU',
29
+ 'HR',
30
+ 'IE',
31
+ 'IS',
32
+ 'IT',
33
+ 'LT',
34
+ 'LU',
35
+ 'LV',
36
+ 'MC',
37
+ 'MK',
38
+ 'MT',
39
+ 'NO',
40
+ 'NL',
41
+ 'PO',
42
+ 'PT',
43
+ 'RO',
44
+ 'RU',
45
+ 'SE',
46
+ 'SI',
47
+ 'SK',
48
+ 'SM',
49
+ 'TR',
50
+ 'UA',
51
+ ],
52
+ regionOptions: {
53
+ au: {
54
+ name: 'Australia',
55
+ domain: 'https://app.becollective.com',
56
+ hostname: 'app.becollective.com',
57
+ trademark: 'Be Collective International Limited',
58
+ twitter: 'https://twitter.com/BeCollective_',
59
+ facebook: 'https://www.facebook.com/becollectiveintl/',
60
+ instagram: 'https://www.instagram.com/becollective_',
61
+ linkedin: 'https://www.linkedin.com/company/becollectiveintl',
62
+ privacyPolicyUrl: 'https://www.becollective.com/documents/Be-Collective-Global-Privacy-Policy-September-2021.pdf',
63
+ termsAndConditionsUrl:
64
+ 'https://www.becollective.com/documents/Be-Collective-Global-General-Terms-February-2023.pdf',
65
+ privacyPolicyVersion: 2,
66
+ termsAndConditionsVersion: 6,
67
+ address: 'Level 16, 300 Flinders Street, Melbourne, VIC 3000',
68
+ },
69
+ nz: {
70
+ name: 'New Zealand',
71
+ domain: 'https://nz.becollective.com',
72
+ hostname: 'nz.becollective.com',
73
+ trademark: 'Be Collective New Zealand Limited',
74
+ twitter: 'https://twitter.com/BeCollective_',
75
+ facebook: 'https://www.facebook.com/becollectivenz/',
76
+ instagram: 'https://www.instagram.com/becollective_',
77
+ linkedin: 'https://www.linkedin.com/company/becollectiveintl',
78
+ privacyPolicyUrl: 'https://www.becollective.com/documents/Be-Collective-Global-Privacy-Policy-September-2021.pdf',
79
+ termsAndConditionsUrl:
80
+ 'https://www.becollective.com/documents/Be-Collective-Global-General-Terms-February-2023.pdf',
81
+ privacyPolicyVersion: 2,
82
+ termsAndConditionsVersion: 6,
83
+ address: 'Level 3 Zephyr House, 82 Willis Street, Wellington',
84
+ },
85
+ // eu: {
86
+ // name: 'Europe',
87
+ // domain: 'https://eu.becollective.com',
88
+ // hostname: 'eu.becollective.com',
89
+ // trademark: 'Be Collective Europe Limited',
90
+ // twitter: 'https://twitter.com/BeCollective_',
91
+ // facebook: 'https://www.facebook.com/Be-Collective-Europe-2168455776525016/',
92
+ // instagram: 'https://www.instagram.com/becollective_',
93
+ // linkedin: 'https://www.linkedin.com/company/becollectiveintl',
94
+ // privacyPolicyUrl: 'https://www.becollective.com/documents/Be-Collective-Europe-Privacy-Notice-December-2020.pdf',
95
+ // termsAndConditionsUrl: 'https://www.becollective.com/documents/Be-Collective-Europe-General-Terms-May-2023.pdf',
96
+ // privacyPolicyVersion: 2,
97
+ // termsAndConditionsVersion: 4,
98
+ // address: 'Tintagel House, 92 Albert Embankment, Lambeth, London, SE1 7TY',
99
+ // },
100
+ uk: {
101
+ name: 'United Kingdom',
102
+ domain: 'https://uk.becollective.com',
103
+ hostname: 'uk.becollective.com',
104
+ trademark: 'Be Collective Europe Limited',
105
+ twitter: 'https://twitter.com/BeCollective_',
106
+ facebook: 'https://www.facebook.com/Be-Collective-Europe-2168455776525016/',
107
+ instagram: 'https://www.instagram.com/becollective_',
108
+ linkedin: 'https://www.linkedin.com/company/becollectiveintl',
109
+ privacyPolicyUrl: 'https://www.becollective.com/documents/Be-Collective-Europe-Privacy-Notice-December-2020.pdf',
110
+ termsAndConditionsUrl: 'https://www.becollective.com/documents/Be-Collective-Europe-General-Terms-May-2023.pdf',
111
+ privacyPolicyVersion: 2,
112
+ termsAndConditionsVersion: 4,
113
+ address: 'Tintagel House, 92 Albert Embankment, Lambeth, London, SE1 7TY',
114
+ },
115
+ },
116
+ // Financial years from https://www.cia.gov/library/publications/the-world-factbook/fields/228.html
117
+ countryOptions: {
118
+ AU: {
119
+ financialYearEndDate: {
120
+ month: 5,
121
+ date: 30,
122
+ },
123
+ distanceUnit: distanceUnits.km,
124
+ regions: [
125
+ {
126
+ long: 'Australian Capital Territory',
127
+ short: 'ACT',
128
+ },
129
+ {
130
+ long: 'New South Wales',
131
+ short: 'NSW',
132
+ },
133
+ {
134
+ long: 'Northern Territory',
135
+ short: 'NT',
136
+ },
137
+ {
138
+ long: 'Queensland',
139
+ short: 'QLD',
140
+ },
141
+ {
142
+ long: 'South Australia',
143
+ short: 'SA',
144
+ },
145
+ {
146
+ long: 'Tasmania',
147
+ short: 'TAS',
148
+ },
149
+ {
150
+ long: 'Victoria',
151
+ short: 'VIC',
152
+ },
153
+ {
154
+ long: 'Western Australia',
155
+ short: 'WA',
156
+ },
157
+ ],
158
+ insuranceTypes: [insuranceTypes.publicLiabilityAU, insuranceTypes.volunteerAccidentAU],
159
+ },
160
+ NZ: {
161
+ financialYearEndDate: {
162
+ month: 2,
163
+ date: 31,
164
+ },
165
+ distanceUnit: distanceUnits.km,
166
+ insuranceTypes: [insuranceTypes.publicLiabilityNZ, insuranceTypes.volunteerAccidentNZ],
167
+ },
168
+ GB: {
169
+ financialYearEndDate: {
170
+ month: 3,
171
+ date: 5,
172
+ },
173
+ distanceUnit: distanceUnits.mi,
174
+ insuranceTypes: [insuranceTypes.publicLiabilityGB, insuranceTypes.volunteerAccidentGB],
175
+ },
176
+ // Reminder: this is Republic of Ireland. Northern Ireland is within GB.
177
+ IE: {
178
+ financialYearEndDate: {
179
+ month: 11,
180
+ date: 31,
181
+ },
182
+ distanceUnit: distanceUnits.km,
183
+ insuranceTypes: [insuranceTypes.publicLiabilityOthers, insuranceTypes.volunteerAccidentOthers],
184
+ },
185
+ Others: {
186
+ insuranceTypes: [insuranceTypes.publicLiabilityOthers, insuranceTypes.volunteerAccidentOthers],
187
+ },
188
+ },
189
+ };
@@ -0,0 +1,30 @@
1
+ const notificationTypes = {
2
+ volunteer: {
3
+ messengerUpdates: 'messengerUpdates',
4
+ volunteerUpdates: 'volunteerUpdates',
5
+ groupMemberUpdates: 'groupMemberUpdates',
6
+ groupInvitations: 'groupInvitations',
7
+ opportunityInvitations: 'opportunityInvitations',
8
+ opportunitiesSharedWithMe: 'opportunitiesSharedWithMe',
9
+ licenseCertificateExpiryNotice: 'licenseCertificateExpiryNotice',
10
+ certificates: 'certificates',
11
+ },
12
+ manager: {
13
+ membershipApplications: 'membershipApplications',
14
+ volunteerApplications: 'volunteerApplications',
15
+ opportunityUpdates: 'opportunityUpdates',
16
+ timesheets: 'timesheets',
17
+ partnerships: 'partnerships',
18
+ endorsements: 'endorsements',
19
+ socialCurrency: 'socialCurrency',
20
+ groupUpdates: 'groupUpdates',
21
+ licenseCertificateExpiryNotice: 'licenseCertificateExpiryNotice',
22
+ },
23
+ acquired: 'acquired',
24
+ };
25
+
26
+ export default {
27
+ // Filter out acquired, as backend model does not use it.
28
+ types: Object.values(notificationTypes).filter((x) => x !== notificationTypes.acquired),
29
+ typesMap: notificationTypes,
30
+ };
@@ -0,0 +1,84 @@
1
+ const typesMap = {
2
+ roleFixed: 'role-fixed',
3
+ roleFlexible: 'role-flexible',
4
+ ongoing: 'ongoing',
5
+ };
6
+ const typesMapV2 = {
7
+ shift: 'shift',
8
+ flexible: 'flexible',
9
+ };
10
+
11
+ const ruleStatus = {
12
+ approved: 'approved',
13
+ cancelled: 'cancelled',
14
+ };
15
+
16
+ const shiftStatus = {
17
+ approved: 'approved',
18
+ cancelled: 'cancelled',
19
+ left: 'left',
20
+ };
21
+
22
+ const volunteerStatus = {
23
+ approved: 'approved',
24
+ pending: 'pending',
25
+ invited: 'invited',
26
+ declined: 'declined',
27
+ left: 'left',
28
+ };
29
+
30
+ export default {
31
+ types: Object.values(typesMap),
32
+ typesMap,
33
+ typesV2: Object.values(typesMapV2),
34
+ typesMapV2,
35
+ statuses: ['draft', 'pending', 'published', 'cancelled'],
36
+ volunteer: {
37
+ shiftStatus: shiftStatus,
38
+ ruleStatus: ruleStatus,
39
+ volunteerStatus: volunteerStatus,
40
+ },
41
+ checklist: [
42
+ { key: 'interview', value: 'Interview' },
43
+ { key: 'police-check', value: 'Police Check' },
44
+ { key: 'reference-check', value: 'Reference Check' },
45
+ { key: 'screening', value: 'Screening' },
46
+ { key: 'training', value: 'Training' },
47
+ { key: 'trial', value: 'Check' },
48
+ ],
49
+ defaultOptions: {
50
+ details: {
51
+ currentJobTitle: 'Current Job Title',
52
+ dateOfBirth: 'Date of Birth',
53
+ emergencyContactDetails: 'Emergency Contact Details',
54
+ gender: 'Gender',
55
+ homeAddress: 'Home Address',
56
+ phoneNumber: 'Phone Number',
57
+ },
58
+ requirements: {
59
+ driversLicense: 'Drivers License',
60
+ firstAidCertificate: 'First Aid Certificate',
61
+ orientation: 'Orientation',
62
+ policeCheck: 'Police Check',
63
+ training: 'Training',
64
+ workingWithChildrenCheck: 'Working with Children Check',
65
+ },
66
+ suitability: {
67
+ families: 'Families',
68
+ deafHardOfHearing: 'Deaf/hard of hearing',
69
+ intellectuallyDisabled: 'Intellectual/learning disabilities',
70
+ largeGroups: 'Large groups (10+)',
71
+ skilledVolunteers: 'Skilled volunteers',
72
+ travellingShortTermVolunteers: 'Travelling/short term volunteers',
73
+ blindLowVision: 'Blind/low vision',
74
+ volunteersWithLimitedEnglish: 'Volunteers with limited English',
75
+ wheelchairUsers: 'Wheelchair users',
76
+ workingExperience: 'Work experience',
77
+ employeeVolunteers: 'Employee volunteers',
78
+ socialPrescribing: 'Social prescribing',
79
+ publicTransportUsers: 'Public transport users',
80
+ LGBTQIAPlusCommunity: 'LGBTQIA+ community',
81
+ LongTermVolunteers: 'Long term volunteers',
82
+ },
83
+ },
84
+ };
@@ -0,0 +1,17 @@
1
+ export const licencesAndCertifications = [
2
+ 'Drivers Licence',
3
+ 'First Aid Certification',
4
+ 'Working with Children Check',
5
+ 'Other', // Other option should always be anchored to the bottom.
6
+ ];
7
+
8
+ export const educationalQualifications = [
9
+ 'Secondary / High School',
10
+ 'Certificate or equivalent',
11
+ 'Diploma or equivalent',
12
+ 'Advanced Diploma or equivalent',
13
+ "Bachelor's Degree / Undergraduate",
14
+ "Master's Degree / Postgraduate and above",
15
+ ];
16
+
17
+ export default [...licencesAndCertifications, ...educationalQualifications];
@@ -0,0 +1,22 @@
1
+ import { RRule } from 'rrule';
2
+
3
+ const daysOfTheWeek = [
4
+ { label: 'Monday', value: RRule.MO, selected: false },
5
+ { label: 'Tuesday', value: RRule.TU, selected: false },
6
+ { label: 'Wednesday', value: RRule.WE, selected: false },
7
+ { label: 'Thursday', value: RRule.TH, selected: false },
8
+ { label: 'Friday', value: RRule.FR, selected: false },
9
+ { label: 'Saturday', value: RRule.SA, selected: false },
10
+ { label: 'Sunday', value: RRule.SU, selected: false },
11
+ ];
12
+
13
+ const frequencyOptions = [
14
+ { value: 0, label: 'in total', description: '' },
15
+ { value: RRule.WEEKLY, label: 'per week', description: 'each week' },
16
+ { value: RRule.MONTHLY, label: 'per month', description: 'each month' },
17
+ ];
18
+
19
+ export default {
20
+ daysOfTheWeek,
21
+ frequencyOptions,
22
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ tierValues: {
3
+ none: 0, // none of the below tiers
4
+ standard: 1,
5
+ plus: 2,
6
+ pro: 3,
7
+ },
8
+ };
@@ -0,0 +1,15 @@
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
+ },
15
+ };