Skip to content

Commit 2106478

Browse files
merge with develop branch
2 parents 84cb027 + ea288ed commit 2106478

34 files changed

+9832
-11159
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- attach_workspace:
2929
at: .
3030
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
31-
- run: npm publish --tag test-release
32-
31+
- run: npm publish
32+
# dont change anything
3333
workflows:
3434
version: 2
3535
build:

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The [Topcoder](https://www.topcoder.com) lib for internal ReactJS projects.
1010

1111
Change the property in `AV_SCAN_SCORER_REVIEW_TYPE_ID` in config.
1212

13+
### Configuration for AV-Scan scorer review type ID
14+
15+
Change the property in `PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID` in config.
16+
1317
### Development
1418
```shell
1519
# Install dependencies
@@ -19,7 +23,7 @@ npm install
1923
npm test
2024
npm run build
2125

22-
# Go to other project which depends on the topcoder-react-lib, config its package.json so
26+
# Go to other project which depends on the topcoder-react-lib, config its package.json so
2327
# that the 'topcoder-react-lib' points to the local foler path of topcoder-react-lib:
2428
#
2529
# "dependencies": {

__tests__/__snapshots__/index.js.snap

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,24 @@ Object {
6868
"getModelsInit": [Function],
6969
"getOsesDone": [Function],
7070
"getOsesInit": [Function],
71+
"getReviewTypesDone": [Function],
72+
"getReviewTypesInit": [Function],
7173
"getSkillTagsDone": [Function],
7274
"getSkillTagsInit": [Function],
7375
"getTypesDone": [Function],
7476
"getTypesInit": [Function],
7577
},
78+
"memberSearch": Object {
79+
"checkIfSearchTermIsATag": [Function],
80+
"clearMemberSearch": [Function],
81+
"loadMoreUsernames": [Function],
82+
"memberSearchSuccess": [Function],
83+
"resetSearchTerm": [Function],
84+
"setSearchTag": [Function],
85+
"setSearchTerm": [Function],
86+
"topMemberSearchSuccess": [Function],
87+
"usernameSearchSuccess": [Function],
88+
},
7689
"memberTasks": Object {
7790
"dropAll": [Function],
7891
"getDone": [Function],
@@ -101,6 +114,18 @@ Object {
101114
"getUserSrmDone": [Function],
102115
"getUserSrmInit": [Function],
103116
},
117+
"notifications": Object {
118+
"dismissChallengeNotificationsDone": [Function],
119+
"dismissChallengeNotificationsInit": [Function],
120+
"getNotificationsDone": [Function],
121+
"getNotificationsInit": [Function],
122+
"markAllNotificationAsReadDone": [Function],
123+
"markAllNotificationAsReadInit": [Function],
124+
"markAllNotificationAsSeenDone": [Function],
125+
"markAllNotificationAsSeenInit": [Function],
126+
"markNotificationAsReadDone": [Function],
127+
"markNotificationAsReadInit": [Function],
128+
},
104129
"profile": Object {
105130
"addSkillDone": [Function],
106131
"addSkillInit": [Function],
@@ -246,9 +271,11 @@ Object {
246271
"groups": [Function],
247272
"looker": [Function],
248273
"lookup": [Function],
274+
"memberSearch": [Function],
249275
"memberTasks": [Function],
250276
"members": [Function],
251277
"mySubmissionsManagement": [Function],
278+
"notifications": [Function],
252279
"profile": [Function],
253280
"reviewOpportunity": [Function],
254281
"settings": [Function],
@@ -298,10 +325,18 @@ Object {
298325
"default": undefined,
299326
"getService": [Function],
300327
},
328+
"memberSearch": Object {
329+
"default": undefined,
330+
"getService": [Function],
331+
},
301332
"members": Object {
302333
"default": undefined,
303334
"getService": [Function],
304335
},
336+
"notifications": Object {
337+
"default": undefined,
338+
"getService": [Function],
339+
},
305340
"reviewOpportunities": Object {
306341
"default": undefined,
307342
"getReviewOpportunitiesService": [Function],

__tests__/actions/__snapshots__/lookup.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Object {
1313
"getModelsInit": [Function],
1414
"getOsesDone": [Function],
1515
"getOsesInit": [Function],
16+
"getReviewTypesDone": [Function],
17+
"getReviewTypesInit": [Function],
1618
"getSkillTagsDone": [Function],
1719
"getSkillTagsInit": [Function],
1820
"getTypesDone": [Function],

__tests__/reducers/__snapshots__/lookup.js.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Object {
1818
"models": Array [],
1919
"osPage": 1,
2020
"oses": Array [],
21+
"reviewTypes": Array [],
2122
"skillTags": Array [
2223
Object {
2324
"domain": "SKILLS",
@@ -48,6 +49,7 @@ Object {
4849
"models": Array [],
4950
"osPage": 1,
5051
"oses": Array [],
52+
"reviewTypes": Array [],
5153
"skillTags": Array [
5254
Object {
5355
"domain": "SKILLS",
@@ -72,6 +74,7 @@ Object {
7274
"models": Array [],
7375
"osPage": 1,
7476
"oses": Array [],
77+
"reviewTypes": Array [],
7578
"skillTags": Array [
7679
Object {
7780
"domain": "SKILLS",
@@ -96,6 +99,7 @@ Object {
9699
"models": Array [],
97100
"osPage": 1,
98101
"oses": Array [],
102+
"reviewTypes": Array [],
99103
"skillTags": Array [
100104
Object {
101105
"domain": "SKILLS",
@@ -119,6 +123,7 @@ Object {
119123
"models": Array [],
120124
"osPage": 1,
121125
"oses": Array [],
126+
"reviewTypes": Array [],
122127
"skillTags": Array [],
123128
"types": Array [],
124129
}
@@ -142,6 +147,7 @@ Object {
142147
"models": Array [],
143148
"osPage": 1,
144149
"oses": Array [],
150+
"reviewTypes": Array [],
145151
"skillTags": Array [
146152
Object {
147153
"domain": "SKILLS",
@@ -172,6 +178,7 @@ Object {
172178
"models": Array [],
173179
"osPage": 1,
174180
"oses": Array [],
181+
"reviewTypes": Array [],
175182
"skillTags": Array [
176183
Object {
177184
"domain": "SKILLS",
@@ -196,6 +203,7 @@ Object {
196203
"models": Array [],
197204
"osPage": 1,
198205
"oses": Array [],
206+
"reviewTypes": Array [],
199207
"skillTags": Array [
200208
Object {
201209
"domain": "SKILLS",
@@ -220,6 +228,7 @@ Object {
220228
"models": Array [],
221229
"osPage": 1,
222230
"oses": Array [],
231+
"reviewTypes": Array [],
223232
"skillTags": Array [
224233
Object {
225234
"domain": "SKILLS",
@@ -243,6 +252,7 @@ Object {
243252
"models": Array [],
244253
"osPage": 1,
245254
"oses": Array [],
255+
"reviewTypes": Array [],
246256
"skillTags": Array [],
247257
"types": Array [],
248258
}

config/default.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "",
3+
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "",
34
"PAGE_SIZE": 50,
45
"REVIEW_OPPORTUNITY_PAGE_SIZE": 1000
56
}

config/development.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "68c5a381-c8ab-48af-92a7-7a869a4ee6c3"
2+
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "68c5a381-c8ab-48af-92a7-7a869a4ee6c3",
3+
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "52c91e85-745f-4e62-b592-9879a2dfe9fd"
34
}

config/production.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05"
2+
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05",
3+
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "df51ca7d-fb0a-4147-9569-992fcf5aae48"
34
}

config/test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ module.exports = {
44
V3: 'https://api.topcoder-dev.com/v3',
55
},
66
dummyConfigKey: 'Dummy config value',
7+
SECRET: {
8+
TC_M2M: {
9+
AUTH0_URL: '',
10+
AUTH0_AUDIENCE: '',
11+
TOKEN_CACHE_TIME: '',
12+
AUTH0_PROXY_SERVER_URL: '',
13+
},
14+
},
715
};

config/webpack/default.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
const webpack = require('webpack');
33

44
module.exports = {
5-
plugins: [
6-
// eslint-disable-next-line global-require
7-
new webpack.DefinePlugin({ CONFIG: JSON.stringify(require('config')) }),
8-
],
5+
node: {
6+
tls: 'empty',
7+
fs: 'empty',
8+
net: 'empty',
9+
},
910
// Don't include the dependencies to keep built bundle small,
1011
// they will be provided by the app using this lib
1112
externals: [
@@ -24,8 +25,10 @@ module.exports = {
2425
'tc-accounts',
2526
'to-capital-case',
2627
'topcoder-react-utils',
28+
'tc-core-library-js',
29+
],
30+
plugins: [
31+
// eslint-disable-next-line global-require
32+
new webpack.DefinePlugin({ CONFIG: JSON.stringify(require('config')) }),
2733
],
28-
node: {
29-
fs: 'empty',
30-
},
3134
};

dist/dev/index.js

Lines changed: 0 additions & 1445 deletions
This file was deleted.

docs/actions.lookup.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Actions related to lookup data.
1111
* [.getCountriesDone()](#module_actions.lookup.getCountriesDone) ⇒ <code>Action</code>
1212
* [.getAllCountriesInit()](#module_actions.lookup.getCountriesInit) ⇒ <code>Action</code>
1313
* [.getAllCountriesDone(tokenV3)](#module_actions.lookup.getCountriesDone) ⇒ <code>Action</code>
14+
* [.getReviewTypesInit()](#module_actions.lookup.getReviewTypesInit) ⇒ <code>Action</code>
15+
* [.getReviewTypesDone(tokenV3)](#module_actions.lookup.ggetReviewTypesDone) ⇒ <code>Action</code>
1416

1517
<a name="module_actions.lookup.getSkillTagsInit"></a>
1618

@@ -40,3 +42,19 @@ Creates an action that gets all countries new version.
4042
| Param | Type | Description |
4143
| --- | --- | --- |
4244
| tokenV3 | <code>String</code> | Topcoder v3 auth token. |
45+
<a name="module_actions.lookup.getReviewTypesInit"></a>
46+
47+
### actions.lookup.getReviewTypesInit() ⇒ <code>Action</code>
48+
Creates an action that gets all reiview types.
49+
50+
**Kind**: static method of [<code>actions.lookup</code>](#module_actions.lookup)
51+
<a name="module_actions.lookup.getReviewTypesDone"></a>
52+
53+
### actions.lookup.getReviewTypesDone(tokenV3) ⇒ <code>Action</code>
54+
Creates an action that gets all review types.
55+
56+
**Kind**: static method of [<code>actions.lookup</code>](#module_actions.lookup)
57+
58+
| Param | Type | Description |
59+
| --- | --- | --- |
60+
| tokenV3 | <code>String</code> | Topcoder v3 auth token. |

docs/reducers.lookup.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,48 @@ State segment managed by this reducer has the following structure:
1818
* _inner_
1919
* [~onGetSkillTagsDone(state, action)](#module_reducers.lookup..onGetSkillTagsDone) ⇒ <code>Object</code>
2020
* [~onGetCountriesDone(state, action)](#module_reducers.lookup..onGetCountriesDone) ⇒ <code>Object</code>
21+
* [~onGetReviewTypesDone(state, action)](#module_reducers.lookup..onGetReviewTypesDone) ⇒ <code>Object</code>
2122
* [~create(initialState)](#module_reducers.lookup..create) ⇒ <code>function</code>
2223

2324
<a name="module_reducers.lookup.default"></a>
2425

2526
### reducers.lookup.default
2627
Reducer with default initial state.
2728

28-
**Kind**: static property of [<code>reducers.lookup</code>](#module_reducers.lookup)
29+
**Kind**: static property of [<code>reducers.lookup</code>](#module_reducers.lookup)
2930
<a name="module_reducers.lookup.factory"></a>
3031

3132
### reducers.lookup.factory() ⇒ <code>Promise</code>
3233
Factory which creates a new reducer.
3334

34-
**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
35-
**Resolves**: <code>Function(state, action): state</code> New reducer.
35+
**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
36+
**Resolves**: <code>Function(state, action): state</code> New reducer.
3637
<a name="module_reducers.lookup..onGetSkillTagsDone"></a>
3738

3839
### reducers.lookup~onGetSkillTagsDone(state, action) ⇒ <code>Object</code>
3940
Handles LOOKUP/GET_SKILL_TAGS_DONE action.
4041

41-
**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
42-
**Resolves**: <code>Function(state, action): state</code> New reducer.
42+
**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
43+
**Resolves**: <code>Function(state, action): state</code> New reducer.
4344
<a name="module_reducers.lookup..onGetCountriesDone"></a>
4445

4546
### reducers.lookup~onGetCountriesDone(state, action) ⇒ <code>Object</code>
4647
Handles LOOKUP/GET_COUNTRIES_DONE action.
4748

48-
**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
49-
**Returns**: <code>Object</code> - New state
49+
**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
50+
**Returns**: <code>Object</code> - New state
51+
52+
| Param | Type | Description |
53+
| --- | --- | --- |
54+
| state | <code>Object</code> | |
55+
| action | <code>Object</code> | Payload will be JSON from api call |
56+
<a name="module_reducers.lookup..onGetReviewTypesDone"></a>
57+
58+
### reducers.lookup~onGetReviewTypesDone(state, action) ⇒ <code>Object</code>
59+
Handles LOOKUP/GET_REVIEW_TYPES_DONE action.
60+
61+
**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
62+
**Returns**: <code>Object</code> - New state
5063

5164
| Param | Type | Description |
5265
| --- | --- | --- |
@@ -58,8 +71,8 @@ Handles LOOKUP/GET_COUNTRIES_DONE action.
5871
### reducers.lookup~create(initialState) ⇒ <code>function</code>
5972
Creates a new Lookup reducer with the specified initial state.
6073

61-
**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
62-
**Returns**: <code>function</code> - Lookup reducer.
74+
**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
75+
**Returns**: <code>function</code> - Lookup reducer.
6376

6477
| Param | Type | Description |
6578
| --- | --- | --- |

docs/services.submissions.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ via API V5.
1313
* [new SubmissionsService(tokenV3)](#new_module_services.submissions..SubmissionsService_new)
1414
* [.getSubmissions(filters, params)](#module_services.submissions..SubmissionsService+getSubmissions) ⇒ <code>Promise</code>
1515
* [.getSubmissionInformation(submissionId)](#module_services.submissions..SubmissionsService+getSubmissionInformation) ⇒ <code>Promise</code>
16+
* [.downloadSubmission(submissionId)](#module_services.submissions..SubmissionsService+downloadSubmission) ⇒ <code>Promise</code>
1617

1718
<a name="module_services.submissions.getService"></a>
1819

@@ -35,6 +36,7 @@ Returns a new or existing submissions service.
3536
* [new SubmissionsService(tokenV3)](#new_module_services.submissions..SubmissionsService_new)
3637
* [.getSubmissions(filters, params)](#module_services.submissions..SubmissionsService+getSubmissions) ⇒ <code>Promise</code>
3738
* [.getSubmissionInformation(submissionId)](#module_services.submissions..SubmissionsService+getSubmissionInformation) ⇒ <code>Promise</code>
39+
* [.downloadSubmission(submissionId)](#module_services.submissions..SubmissionsService+downloadSubmission) ⇒ <code>Promise</code>
3840

3941
<a name="new_module_services.submissions..SubmissionsService_new"></a>
4042

@@ -68,3 +70,15 @@ Gets submission information.
6870
| Param | Type | Description |
6971
| --- | --- | --- |
7072
| submissionId | <code>String</code> | The id of submission |
73+
74+
<a name="module_services.submissions..SubmissionsService+downloadSubmission"></a>
75+
76+
#### submissionsService.downloadSubmission(submissionId) ⇒ <code>Promise</code>
77+
Download submission.
78+
79+
**Kind**: instance method of [<code>SubmissionsService</code>](#module_services.submissions..SubmissionsService)
80+
**Returns**: <code>Promise</code> - Resolves to the submission file.
81+
82+
| Param | Type | Description |
83+
| --- | --- | --- |
84+
| submissionId | <code>String</code> | The id of submission |

0 commit comments

Comments
 (0)