Skip to content

Commit 80b6441

Browse files
committed
Update of topcoder-react-utils version and docs
1 parent 3bfca81 commit 80b6441

7 files changed

+180
-129
lines changed

docs/actions.smp.md

-15
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Actions related to *My Submissions Management* page.
88
* [.deleteSubmissionInit()](#module_actions.smp.deleteSubmissionInit) ⇒ <code>Action</code>
99
* [.deleteSubmissionDone(tokenV3, submissionId)](#module_actions.smp.deleteSubmissionDone) ⇒ <code>Action</code>
1010
* [.downloadSubmission()](#module_actions.smp.downloadSubmission) ⇒ <code>Action</code>
11-
* [.getCommunityStatsInit(community, uuid)](#module_actions.smp.getCommunityStatsInit) ⇒ <code>Action</code>
1211

1312
<a name="module_actions.smp.deleteSubmissionInit"></a>
1413

@@ -41,17 +40,3 @@ the component. Soon we'll migrate to use the new TC API instead, and
4140
then we'll decide, whether we need operate downloads in JS, or can we
4241
just remove this action.
4342

44-
<a name="module_actions.smp.getCommunityStatsInit"></a>
45-
46-
### actions.smp.getCommunityStatsInit(community, uuid) ⇒ <code>Action</code>
47-
Creates an action that signals beginning of the loading community
48-
stats.
49-
50-
**Kind**: static method of [<code>actions.smp</code>](#module_actions.smp)
51-
52-
| Param | Type | Description |
53-
| --- | --- | --- |
54-
| community | <code>Object</code> | Community meta-data object. |
55-
| [community.communityId] | <code>String</code> | Community ID. |
56-
| uuid | <code>String</code> | Operation UUID. |
57-

docs/actions.stats.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<a name="module_actions.stats"></a>
2+
3+
## actions.stats
4+
Actions related to Topcoder statistics (at the moment, only community
5+
statistics).
6+
7+
<a name="module_actions.stats.getCommunityStatsInit"></a>
8+
9+
### actions.stats.getCommunityStatsInit(community, uuid) ⇒ <code>Action</code>
10+
Creates an action that signals beginning of the loading community
11+
stats.
12+
13+
**Kind**: static method of [<code>actions.stats</code>](#module_actions.stats)
14+
15+
| Param | Type | Description |
16+
| --- | --- | --- |
17+
| community | <code>Object</code> | Community meta-data object. |
18+
| [community.communityId] | <code>String</code> | Community ID. |
19+
| uuid | <code>String</code> | Operation UUID. |
20+

docs/actions.terms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Creates an action that fetches terms of the specified entity.
4444
| [entity.type] | <code>String</code> | entity type: `challenge` or `community` |
4545
| [entity.id] | <code>String</code> | entity id |
4646
| tokens | <code>Object</code> | object with tokenV2 and tokenV3 properties |
47-
| mockAgreed | <code>Boolean</code> | if true, then all terms will be mocked as agreed this only makes effect if MOCK_TERMS_SERVICE is `true` and the only purpose of this param is testing terms |
47+
| mockAgreed | <code>Boolean</code> | if true, then all terms will be mocked as agreed this only makes effect if MOCK_TERMS_SERVICE is `true` and the only purpose of this param is testing terms |
4848

4949
<a name="module_actions.terms.checkStatusInit"></a>
5050

docs/challenges.filter.md renamed to docs/challenge.filter.md

+59-59
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<a name="module_challenges.filter"></a>
1+
<a name="module_challenge.filter"></a>
22

3-
## challenges.filter
3+
## challenge.filter
44
Universal challenge filter. Must be used in all places where we need filter
55
or fetch challenges. This way we keep all related logic in the same place,
66
which simplifies maintenance and modifications of the code.
@@ -59,62 +59,62 @@ users {Array} - Permits only the challenges where the specified (by handles)
5959
users are participating.
6060

6161

62-
* [challenges.filter](#module_challenges.filter)
62+
* [challenge.filter](#module_challenge.filter)
6363
* _static_
64-
* [.addTrack(state, track)](#module_challenges.filter.addTrack) ⇒ <code>Object</code>
65-
* [.getFilterFunction(state)](#module_challenges.filter.getFilterFunction) ⇒ <code>function</code>
66-
* [.getReviewOpportunitiesFilterFunction(state)](#module_challenges.filter.getReviewOpportunitiesFilterFunction) ⇒ <code>function</code>
67-
* [.combine(filters)](#module_challenges.filter.combine) ⇒ <code>Object</code>
68-
* [.mapToBackend(filter)](#module_challenges.filter.mapToBackend) ⇒ <code>Object</code>
69-
* [.removeTrack(state, track)](#module_challenges.filter.removeTrack) ⇒ <code>Object</code>
70-
* [.setEndDate(state, date)](#module_challenges.filter.setEndDate) ⇒ <code>Object</code>
71-
* [.setReviewOpportunityType(state, reviewOpportunityType)](#module_challenges.filter.setReviewOpportunityType) ⇒ <code>Object</code>
72-
* [.setStartDate(state, date)](#module_challenges.filter.setStartDate) ⇒ <code>Object</code>
73-
* [.setSubtracks(state, subtracks)](#module_challenges.filter.setSubtracks) ⇒ <code>Object</code>
74-
* [.setTags(state, tags)](#module_challenges.filter.setTags) ⇒ <code>Object</code>
75-
* [.setText(state, text)](#module_challenges.filter.setText) ⇒ <code>Object</code>
64+
* [.addTrack(state, track)](#module_challenge.filter.addTrack) ⇒ <code>Object</code>
65+
* [.getFilterFunction(state)](#module_challenge.filter.getFilterFunction) ⇒ <code>function</code>
66+
* [.getReviewOpportunitiesFilterFunction(state)](#module_challenge.filter.getReviewOpportunitiesFilterFunction) ⇒ <code>function</code>
67+
* [.combine(filters)](#module_challenge.filter.combine) ⇒ <code>Object</code>
68+
* [.mapToBackend(filter)](#module_challenge.filter.mapToBackend) ⇒ <code>Object</code>
69+
* [.removeTrack(state, track)](#module_challenge.filter.removeTrack) ⇒ <code>Object</code>
70+
* [.setEndDate(state, date)](#module_challenge.filter.setEndDate) ⇒ <code>Object</code>
71+
* [.setReviewOpportunityType(state, reviewOpportunityType)](#module_challenge.filter.setReviewOpportunityType) ⇒ <code>Object</code>
72+
* [.setStartDate(state, date)](#module_challenge.filter.setStartDate) ⇒ <code>Object</code>
73+
* [.setSubtracks(state, subtracks)](#module_challenge.filter.setSubtracks) ⇒ <code>Object</code>
74+
* [.setTags(state, tags)](#module_challenge.filter.setTags) ⇒ <code>Object</code>
75+
* [.setText(state, text)](#module_challenge.filter.setText) ⇒ <code>Object</code>
7676
* _inner_
77-
* [~filterByEndDate()](#module_challenges.filter..filterByEndDate)
78-
* [~filterByReviewOpportunityType(opp, state)](#module_challenges.filter..filterByReviewOpportunityType) ⇒ <code>Boolean</code>
77+
* [~filterByEndDate()](#module_challenge.filter..filterByEndDate)
78+
* [~filterByReviewOpportunityType(opp, state)](#module_challenge.filter..filterByReviewOpportunityType) ⇒ <code>Boolean</code>
7979

80-
<a name="module_challenges.filter.addTrack"></a>
80+
<a name="module_challenge.filter.addTrack"></a>
8181

82-
### challenges.filter.addTrack(state, track) ⇒ <code>Object</code>
82+
### challenge.filter.addTrack(state, track) ⇒ <code>Object</code>
8383
Returns clone of the state with the specified competition track added.
8484

85-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
85+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
8686
**Returns**: <code>Object</code> - Resulting state.
8787

8888
| Param | Type |
8989
| --- | --- |
9090
| state | <code>Object</code> |
9191
| track | <code>String</code> |
9292

93-
<a name="module_challenges.filter.getFilterFunction"></a>
93+
<a name="module_challenge.filter.getFilterFunction"></a>
9494

95-
### challenges.filter.getFilterFunction(state) ⇒ <code>function</code>
95+
### challenge.filter.getFilterFunction(state) ⇒ <code>function</code>
9696
Generates filter function for the state.
9797

98-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
98+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
9999

100100
| Param | Type |
101101
| --- | --- |
102102
| state | <code>Object</code> |
103103

104-
<a name="module_challenges.filter.getReviewOpportunitiesFilterFunction"></a>
104+
<a name="module_challenge.filter.getReviewOpportunitiesFilterFunction"></a>
105105

106-
### challenges.filter.getReviewOpportunitiesFilterFunction(state) ⇒ <code>function</code>
106+
### challenge.filter.getReviewOpportunitiesFilterFunction(state) ⇒ <code>function</code>
107107
Generates a Review Opportunities filter function for the provided filter state.
108108

109-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
109+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
110110

111111
| Param | Type |
112112
| --- | --- |
113113
| state | <code>Object</code> |
114114

115-
<a name="module_challenges.filter.combine"></a>
115+
<a name="module_challenge.filter.combine"></a>
116116

117-
### challenges.filter.combine(filters) ⇒ <code>Object</code>
117+
### challenge.filter.combine(filters) ⇒ <code>Object</code>
118118
Combines multiple filter state objects together. Resulting state describes
119119
the filter, which matches only those challenges that satisfy each of the
120120
filters passed in as arguments.
@@ -123,15 +123,15 @@ The main intended use of this function is to combine multiple frontend
123123
challenge filters into a single one, that can be mapped into the
124124
corresponding backend filter by mapToBackend(..) function.
125125

126-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
126+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
127127

128128
| Param | Type | Description |
129129
| --- | --- | --- |
130130
| filters | <code>Object</code> | Input filter state objects to combine. |
131131

132-
<a name="module_challenges.filter.mapToBackend"></a>
132+
<a name="module_challenge.filter.mapToBackend"></a>
133133

134-
### challenges.filter.mapToBackend(filter) ⇒ <code>Object</code>
134+
### challenge.filter.mapToBackend(filter) ⇒ <code>Object</code>
135135
Maps the frontend challenge filter into the corresponding backend (api) one.
136136
As there is no 1:1 match between the frontend and backend challenge filters,
137137
the resulting backend filter is always equal or broader than the given
@@ -143,114 +143,114 @@ It is assumed that this function will help us to load challenges from the
143143
backend more specifically, though it does not prevent as from the need
144144
always perform the final filtering at the frontend side.
145145

146-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
146+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
147147

148148
| Param | Type |
149149
| --- | --- |
150150
| filter | <code>Object</code> |
151151

152-
<a name="module_challenges.filter.removeTrack"></a>
152+
<a name="module_challenge.filter.removeTrack"></a>
153153

154-
### challenges.filter.removeTrack(state, track) ⇒ <code>Object</code>
154+
### challenge.filter.removeTrack(state, track) ⇒ <code>Object</code>
155155
Returns clone of the state with the specified competition track removed.
156156

157-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
157+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
158158
**Returns**: <code>Object</code> - Resulting state.
159159

160160
| Param | Type |
161161
| --- | --- |
162162
| state | <code>Object</code> |
163163
| track | <code>String</code> |
164164

165-
<a name="module_challenges.filter.setEndDate"></a>
165+
<a name="module_challenge.filter.setEndDate"></a>
166166

167-
### challenges.filter.setEndDate(state, date) ⇒ <code>Object</code>
167+
### challenge.filter.setEndDate(state, date) ⇒ <code>Object</code>
168168
Clone the state and sets the end date.
169169

170-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
170+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
171171

172172
| Param | Type |
173173
| --- | --- |
174174
| state | <code>Object</code> |
175175
| date | <code>String</code> |
176176

177-
<a name="module_challenges.filter.setReviewOpportunityType"></a>
177+
<a name="module_challenge.filter.setReviewOpportunityType"></a>
178178

179-
### challenges.filter.setReviewOpportunityType(state, reviewOpportunityType) ⇒ <code>Object</code>
179+
### challenge.filter.setReviewOpportunityType(state, reviewOpportunityType) ⇒ <code>Object</code>
180180
Clones the state and sets the review opportunity type.
181181

182-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
182+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
183183

184184
| Param | Type | Description |
185185
| --- | --- | --- |
186186
| state | <code>Object</code> | |
187187
| reviewOpportunityType | <code>Array</code> | Possible values found in utils/tc REVIEW_OPPORTUNITY_TYPES |
188188

189-
<a name="module_challenges.filter.setStartDate"></a>
189+
<a name="module_challenge.filter.setStartDate"></a>
190190

191-
### challenges.filter.setStartDate(state, date) ⇒ <code>Object</code>
191+
### challenge.filter.setStartDate(state, date) ⇒ <code>Object</code>
192192
Clones the state and sets the start date.
193193

194-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
194+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
195195

196196
| Param | Type | Description |
197197
| --- | --- | --- |
198198
| state | <code>Object</code> | |
199199
| date | <code>String</code> | ISO date string. |
200200

201-
<a name="module_challenges.filter.setSubtracks"></a>
201+
<a name="module_challenge.filter.setSubtracks"></a>
202202

203-
### challenges.filter.setSubtracks(state, subtracks) ⇒ <code>Object</code>
203+
### challenge.filter.setSubtracks(state, subtracks) ⇒ <code>Object</code>
204204
Clones the state and sets the subtracks.
205205

206-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
206+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
207207

208208
| Param | Type |
209209
| --- | --- |
210210
| state | <code>Object</code> |
211211
| subtracks | <code>Array</code> |
212212

213-
<a name="module_challenges.filter.setTags"></a>
213+
<a name="module_challenge.filter.setTags"></a>
214214

215-
### challenges.filter.setTags(state, tags) ⇒ <code>Object</code>
215+
### challenge.filter.setTags(state, tags) ⇒ <code>Object</code>
216216
Clones the state and sets the tags.
217217

218-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
218+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
219219

220220
| Param | Type | Description |
221221
| --- | --- | --- |
222222
| state | <code>Object</code> | |
223223
| tags | <code>Array</code> | String array. |
224224

225-
<a name="module_challenges.filter.setText"></a>
225+
<a name="module_challenge.filter.setText"></a>
226226

227-
### challenges.filter.setText(state, text) ⇒ <code>Object</code>
227+
### challenge.filter.setText(state, text) ⇒ <code>Object</code>
228228
Clones fitler state and sets the free-text string for the filtering by
229229
challenge name and tags. To clear the string set it to anything evaluating
230230
to falst (empty string, null, undefined).
231231

232-
**Kind**: static method of [<code>challenges.filter</code>](#module_challenges.filter)
232+
**Kind**: static method of [<code>challenge.filter</code>](#module_challenge.filter)
233233
**Returns**: <code>Object</code> - Resulting string.
234234

235235
| Param | Type |
236236
| --- | --- |
237237
| state | <code>Object</code> |
238238
| text | <code>String</code> |
239239

240-
<a name="module_challenges.filter..filterByEndDate"></a>
240+
<a name="module_challenge.filter..filterByEndDate"></a>
241241

242-
### challenges.filter~filterByEndDate()
242+
### challenge.filter~filterByEndDate()
243243
Here are many similiar filerBy..(challenge, state) functions. Each of them
244244
checks whether the given challenge fulfills the corresponding filtering rule
245245
from the filter state object, and returns true or false depending on it.
246246

247-
**Kind**: inner method of [<code>challenges.filter</code>](#module_challenges.filter)
248-
<a name="module_challenges.filter..filterByReviewOpportunityType"></a>
247+
**Kind**: inner method of [<code>challenge.filter</code>](#module_challenge.filter)
248+
<a name="module_challenge.filter..filterByReviewOpportunityType"></a>
249249

250-
### challenges.filter~filterByReviewOpportunityType(opp, state) ⇒ <code>Boolean</code>
250+
### challenge.filter~filterByReviewOpportunityType(opp, state) ⇒ <code>Boolean</code>
251251
Filter function for Review Opportunity Type, will be used internally in filter.js
252252

253-
**Kind**: inner method of [<code>challenges.filter</code>](#module_challenges.filter)
253+
**Kind**: inner method of [<code>challenge.filter</code>](#module_challenge.filter)
254254
**Returns**: <code>Boolean</code> - True if opp satifies the filter
255255

256256
| Param | Type | Description |

docs/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ actions and reducer; thus, this module.</p>
4949
<dd><p>Actions related to <em>My Submissions Management</em> page.</p>
5050
</dd>
5151
<dt>
52-
<a href="actions.smp.md">actions.smp</a></dt>
52+
<a href="actions.stats.md">actions.stats</a></dt>
5353
<dd><p>Actions related to Topcoder statistics (at the moment, only community
5454
statistics).</p>
5555
</dd>
@@ -188,7 +188,7 @@ Currently, we use it to save user-defined filters in the challenge search.</p>
188188
accounts.</p>
189189
</dd>
190190
<dt>
191-
<a href="challenges.filter.md">challenges.filter</a></dt>
191+
<a href="challenge.filter.md">challenge.filter</a></dt>
192192
<dd><p>Universal challenge filter. Must be used in all places where we need filter
193193
or fetch challenges. This way we keep all related logic in the same place,
194194
which simplifies maintenance and modifications of the code.</p>

0 commit comments

Comments
 (0)