Skip to content

Commit 5f99f83

Browse files
committed
style(jsdoc): ensure components documentation
1 parent 94476bc commit 5f99f83

File tree

23 files changed

+158
-161
lines changed

23 files changed

+158
-161
lines changed

src/Auth/SecureRoute.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
99
* @description Route which check authentication status and route to appropriate
1010
* component
1111
*
12-
* @param {object} properties React props
12+
* @param {object} properties props object
1313
*
1414
* @returns {object} React Element
1515
*

src/Auth/components/ChangePassword/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ const formItemLayout = {
2727

2828
/**
2929
* @function
30-
* @param props.user
31-
* @param props.posting
32-
* @param props.onCancel
30+
* @param {object} props props object
31+
* @param {object} props.user user object
32+
* @param {boolean} props.posting posting flag
33+
* @param {Function} props.onCancel cancel callback
3334
* @name ChangePasswordForm
3435
* @description Change password form to allow current logged in user to update password
35-
* @param {object} props Change Password form props
3636
* @returns {object} React component
3737
* @version 0.1.0
3838
* @since 0.1.0

src/Auth/components/SignIn/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import './styles.css';
1111
* @function
1212
* @name SignInForm
1313
* @description Sign In form component
14-
* @param {object} props React props
14+
* @param {object} props props object
1515
* @param {boolean} props.loading Flag for showing login http request state
1616
* @param {object} props.history Browser history object
1717
* @returns {object} Sign In Form

src/Events/Events/ChangelogForm/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ const formItemLayout = {
5151

5252
/**
5353
* @function
54-
* @param props.event
55-
* @param props.posting
56-
* @param props.onCancel
57-
* @param props.action
54+
* @param {object} props Event Changelog Form properties
55+
* @param {object} props.event event object
56+
* @param {boolean} props.posting posting flag
57+
* @param {Function} props.onCancel cancel callback
58+
* @param {string} props.action valid action
5859
* @name EventChangelogForm
5960
* @description Render Event form for creating and updating stakeholder
6061
* event details
61-
* @param {object} props Event Changelog Form properties
6262
* @returns {object} Event Changelog Form
6363
* @version 0.2.1
6464
* @since 0.1.0

src/Events/Events/DetailsView/Body.js

+56-56
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ const { Paragraph, Text } = Typography;
6060

6161
/**
6262
* @function
63-
* @param props.event
64-
* @param props.openForm
65-
* @param props.onEdit
66-
* @param props.onShare
67-
* @param props.openIndicatorDashboard
68-
* @param props.onContent
63+
* @param {object} props props object
64+
* @param {object} props.event valid event objetc
65+
* @param {Function} props.openForm open callback
66+
* @param {Function} props.onEdit edit callback
67+
* @param {Function} props.onShare share callback
68+
* @param {Function} props.openIndicatorDashboard indicator callback
69+
* @param {Function} props.onContent content callback
6970
* @name EventToolbar
7071
* @description List of actions user can perform on a particular event
71-
* @param {object} props React props
7272
* @returns {object} React component
7373
* @version 0.1.0
7474
* @since 0.1.0
@@ -223,10 +223,10 @@ const EventToolbar = ({
223223

224224
/**
225225
* @function
226-
* @param props.cause
226+
* @param {object} props props object
227+
* @param {string} props.cause event cause
227228
* @name EventCause
228229
* @description Display Event Cause
229-
* @param {object} props React props
230230
* @returns {object} React component
231231
* @version 0.1.0
232232
* @since 0.1.0
@@ -242,11 +242,11 @@ const EventCause = ({ cause }) => {
242242

243243
/**
244244
* @function
245-
* @param props.title
246-
* @param props.actions
245+
* @param {object} props props object
246+
* @param {string} props.title valid title
247+
* @param {*} props.actions valid actions
247248
* @name EventDetailsSectionHeader
248249
* @description Header section for event details drawer
249-
* @param {object} props React props
250250
* @returns {object} React component
251251
* @version 0.1.0
252252
* @since 0.1.0
@@ -261,9 +261,9 @@ export const EventDetailsSectionHeader = ({ title, actions }) => {
261261
};
262262

263263
/**
264-
* @param root0
265-
* @param root0.areas
266-
* @param root0.openForm
264+
* @param {object} props props object
265+
* @param {object[]} props.areas list of areas
266+
* @param {Function} props.openForm open callback
267267
* @function
268268
* @name EventLocations
269269
* @description Section which show event location(s) in hierarchy
@@ -295,8 +295,8 @@ export const EventLocations = ({ areas = [], openForm }) => {
295295
};
296296

297297
/**
298-
* @param root0
299-
* @param root0.places
298+
* @param {object} props props object
299+
* @param {*} props.places valid places
300300
* @function
301301
* @name EventPlaces
302302
* @description Section which show event affected place(s) in hierarchy
@@ -316,11 +316,11 @@ export const EventPlaces = ({ places = '' }) => {
316316

317317
/**
318318
* @function
319-
* @param props.actions
320-
* @param props.openForm
319+
* @param {object} props Event action taken props
320+
* @param {object[]} props.actions valid actions
321+
* @param {Function} props.openForm open callback
321322
* @name EventActionsTaken
322323
* @description Section which show actions taken per event
323-
* @param {object} props Event action taken props
324324
* @returns {object} React component
325325
* @version 0.1.0
326326
* @since 0.1.0
@@ -355,9 +355,9 @@ export const EventActionsTaken = ({ actions = [], openForm }) => {
355355
};
356356

357357
/**
358-
* @param root0
359-
* @param root0.agencies
360-
* @param root0.openForm
358+
* @param {object} props props object
359+
* @param {object[]} props.agencies list of agencies
360+
* @param {Function} props.openForm open callback
361361
* @function
362362
* @name EventRespondingAgencies
363363
* @description Section which show event responding agencies
@@ -393,9 +393,9 @@ export const EventRespondingAgencies = ({ agencies = [], openForm }) => {
393393
};
394394

395395
/**
396-
* @param root0
397-
* @param root0.focalPeople
398-
* @param root0.openForm
396+
* @param {object} props props object
397+
* @param {object[]} props.focalPeople list of focal people
398+
* @param {Function} props.openForm open callback
399399
* @function
400400
* @name EventRespondingFocalPeople
401401
* @description Section which show event responding agencies
@@ -436,11 +436,11 @@ export const EventRespondingFocalPeople = ({ focalPeople = [], openForm }) => {
436436

437437
/**
438438
* @function
439-
* @param props.initiator
440-
* @param props.date
439+
* @param {object} props Component props
440+
* @param {object} props.initiator valid initiator
441+
* @param {Date} props.date valid date
441442
* @name EventFeedItemHeader
442443
* @description Render Event feed item header
443-
* @param {object} props Component props
444444
* @returns {object} EventFeedItemHeader component
445445
* @version 0.1.0
446446
* @since 0.1.0
@@ -455,8 +455,8 @@ const EventFeedItemHeader = ({ initiator, date }) => {
455455
};
456456

457457
/**
458-
* @param root0
459-
* @param root0.openForm
458+
* @param {object} props props object
459+
* @param {Function} props.openForm open callback
460460
* @function
461461
* @name EventImpact
462462
* @description Display Event impact based on indicators
@@ -499,11 +499,11 @@ const EventImpact = ({ openForm }) => {
499499

500500
/**
501501
* @function
502-
* @param props.gaps
503-
* @param props.openForm
502+
* @param {object} props React components props
503+
* @param {object[]} props.gaps list of gaps
504+
* @param {Function} props.openForm open callback
504505
* @name EventGaps
505506
* @description Event Gaps and Constraints
506-
* @param {object} props React components props
507507
* @returns {object} EventGaps
508508
* @version 0.1.0
509509
* @since 0.1.0
@@ -537,11 +537,11 @@ const EventGaps = ({ gaps = [], openForm }) => {
537537

538538
/**
539539
* @function
540-
* @param props.recommendations
541-
* @param props.openForm
540+
* @param {object} props React components props
541+
* @param {object[]} props.recommendations list of recommendations
542+
* @param {Function} props.openForm open callback
542543
* @name EventRecommendations
543544
* @description Event Recommendations and Remarks
544-
* @param {object} props React components props
545545
* @returns {object} EventRecommendations
546546
* @version 0.1.0
547547
* @since 0.1.0
@@ -741,12 +741,12 @@ const renderFeed = (feed) => {
741741

742742
/**
743743
* @function
744-
* @param props.feeds
745-
* @param props.loading
746-
* @param props.hasMore
744+
* @param {object} props React props
745+
* @param {object[]} props.feeds list of feeds
746+
* @param {boolean} props.loading loading flag
747+
* @param {boolean} props.hasMore more flag
747748
* @name EventFeed
748749
* @description A list of activities(feeds) happening on a particular event
749-
* @param {object} props React props
750750
* @returns {object} React component
751751
* @version 0.1.0
752752
* @since 0.1.0
@@ -787,14 +787,14 @@ export const EventFeed = ({ feeds = [], loading, hasMore }) => {
787787

788788
/**
789789
* @function
790-
* @param props.type
791-
* @param props.description
792-
* @param props.number
793-
* @param props.reportedDate
790+
* @param {object} props PrintEventDetails Props
791+
* @param {string} props.type event type
792+
* @param {string} props.description event description
793+
* @param {string} props.number event number
794+
* @param {Date} props.reportedDate event report date
794795
* @name PrintedEventDetails
795796
* @description This is event details section which will be visible on printed
796797
* report only
797-
* @param {object} props PrintEventDetails Props
798798
* @returns {object} PrintedEventDetails Component
799799
* @version 0.1.0
800800
* @since 0.1.0
@@ -820,18 +820,18 @@ const PrintedEventDetails = ({ type, description, number, reportedDate }) => {
820820

821821
/**
822822
* @function
823-
* @param props.event
824-
* @param props.showForm
825-
* @param props.posting
826-
* @param props.changelogs
827-
* @param props.loading
828-
* @param props.hasMore
829-
* @param props.onEdit
830-
* @param props.onShare
831-
* @param props.eventPosting
823+
* @param {object} props React props
824+
* @param {object} props.event valid event
825+
* @param {boolean} props.showForm show flag
826+
* @param {boolean} props.posting posting flag
827+
* @param {object[]} props.changelogs list of changelogs
828+
* @param {boolean} props.loading loading flag
829+
* @param {boolean} props.hasMore more flag
830+
* @param {Function} props.onEdit edit callback
831+
* @param {Function} props.onShare share callback
832+
* @param {boolean} props.eventPosting event posting flag
832833
* @name EventDetailsViewBody
833834
* @description Event Details body view
834-
* @param {object} props React props
835835
* @returns {object} React component
836836
* @version 0.1.0
837837
* @since 0.1.0

src/Events/Events/DetailsView/Header.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ const { Text } = Typography;
66

77
/**
88
* @function
9-
* @param props.number
10-
* @param props.type
11-
* @param props.description
12-
* @param props.stage
9+
* @param {object} props props object
10+
* @param {string} props.number event number
11+
* @param {string} props.type event type
12+
* @param {string} props.description event description
13+
* @param {string} props.stage event stage
1314
* @name EventDetailsViewHeader
1415
* @description Event Details header for drawer
15-
* @param {object} props React props
1616
* @returns {object} React component
1717
* @version 0.1.0
1818
* @since 0.1.0

src/Events/Events/Form/index.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ const formItemLayout = {
3939

4040
/**
4141
* @function
42-
* @param props.isEditForm
43-
* @param props.defaultStage
44-
* @param props.stages
45-
* @param props.event
46-
* @param props.posting
47-
* @param props.onCancel
42+
* @param {object} props props object
43+
* @param {boolean} props.isEditForm edit flag
44+
* @param {string} props.defaultStage default stage
45+
* @param {string[]} props.stages allowed stages
46+
* @param {object} props.event event object
47+
* @param {boolean} props.posting posting flag
48+
* @param {Function} props.onCancel cancel callback
4849
* @name EventForm
4950
* @description Event Form component for creating and editing event
50-
* @param {object} props React props
5151
* @returns {object} React component
5252
* @version 0.1.0
5353
* @since 0.1.0

src/GeographicalFeatures/AdministrativeLevels/Form/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ const formItemLayout = {
2828

2929
/**
3030
* @function
31-
* @param props.administrativeLevel
32-
* @param props.isEditForm
33-
* @param props.posting
34-
* @param props.onCancel
31+
* @param {object} props props object
32+
* @param {*} props.administrativeLevel valid administrative level
33+
* @param {boolean} props.isEditForm edit flag
34+
* @param {boolean} props.posting posting flag
35+
* @param {Function} props.onCancel cancel callback
3536
* @name AdministrativeLevelForm
3637
* @description Administrative Level Form
37-
* @param {object} props React props
3838
* @returns {object} React Component
3939
* @version 0.1.0
4040
* @since 0.1.0

src/GeographicalFeatures/EvacuationCenters/List/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import EvacuationCenterListItem from '../ListItem';
99
* @name EvacuationCenterList
1010
* @description Render Evacuation Center list
1111
* @param {object} props props object
12-
* @param props.evacuationCenters
12+
* @param {object[]} props.evacuationCenters list of evacuation centers
1313
* @param {boolean} props.loading preload list of Evacuation Center
14-
* @param {Array} props.districts array list of Evacuation Center
1514
* @param {Function} props.onEdit function for editing Evacuation Center
1615
* @returns {object} React component
1716
* @version 0.1.0

src/GeographicalFeatures/Facilities/List/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import FacilityListItem from '../ListItem';
99
* @name FacilityList
1010
* @description Render facilities list
1111
* @param {object} props props object
12-
* @param props.facilities
12+
* @param {object[]} props.facilities list of facilities
1313
* @param {boolean} props.loading preload list of facilities
14-
* @param {Array} props.districts array list of facilities
1514
* @param {Function} props.onEdit function for editing facilities
1615
* @returns {object} React Component
1716
* @version 0.1.0

src/GeographicalFeatures/FeatureTypes/Form/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ const formItemLayout = {
2929

3030
/**
3131
* @function
32-
* @param props.featureType
33-
* @param props.isEditForm
34-
* @param props.posting
35-
* @param props.onCancel
32+
* @param {object} props props object
33+
* @param {object} props.featureType valid feature type
34+
* @param {boolean} props.isEditForm edit flag
35+
* @param {boolean} props.posting posting flag
36+
* @param {Function} props.onCancel cancel callback
3637
* @name FeatureTypeForm
3738
* @description Feature Type Form
38-
* @param {object} props React props
3939
* @returns {object} React Component
4040
* @version 0.1.0
4141
* @since 0.1.0

0 commit comments

Comments
 (0)