Skip to content

Commit 731f09b

Browse files
committed
Fix docs gen, add docs comments
1 parent e14a016 commit 731f09b

File tree

10 files changed

+41
-2
lines changed

10 files changed

+41
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"generate-docs": "npm run typedoc:services && npm run typedoc:components && npm run copy-docs:v6",
3939
"typedoc:services": "typedoc --plugin typedoc-plugin-markdown --plugin typedoc-plugin-reference-excluder --cleanOutputDir true --excludeConstructors true --hideBreadcrumbs true --hideInPageTOC true --excludePrivate true --out temp-service-docs --exclude '!**/*service.ts' --excludeNotDocumented --tsconfig projects/stream-chat-angular/tsconfig.lib.json projects/stream-chat-angular/src/public-api.ts",
4040
"typedoc:components": "typedoc --plugin typedoc-plugin-markdown --plugin typedoc-plugin-reference-excluder --cleanOutputDir true --excludeConstructors true --sort source-order --hideBreadcrumbs true --hideInPageTOC true --excludePrivate true --excludeNotDocumented --out temp-component-docs --exclude '!**/*component.ts' --tsconfig projects/stream-chat-angular/tsconfig.lib.json projects/stream-chat-angular/src/public-api.ts",
41-
"copy-docs:v6": "ts-node copy-generated-service-docs.ts ../docs/data/docs/chat-sdk/angular/06-services & (ts-node remove-generated-component-docs-content ../docs/data/docs/chat-sdk/angular/05-components && ts-node copy-generated-component-docs.ts ../docs/data/docs/chat-sdk/angular/05-components)"
41+
"copy-docs:v6": "ts-node copy-generated-service-docs.ts ../docs/data/docs/chat-sdk/angular/v6-latest/06-services & (ts-node remove-generated-component-docs-content ../docs/data/docs/chat-sdk/angular/v6-latest/05-components && ts-node copy-generated-component-docs.ts ../docs/data/docs/chat-sdk/angular/v6-latest/05-components)"
4242
},
4343
"lint-staged": {
4444
"**/*": [

projects/stream-chat-angular/src/lib/polls/base-poll.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { CustomTemplatesService } from '../custom-templates.service';
1616
import { NotificationService } from '../notification.service';
1717

1818
/**
19-
*
19+
* @internal
2020
*/
2121
@Component({
2222
selector: 'stream-base-poll',
@@ -26,7 +26,13 @@ import { NotificationService } from '../notification.service';
2626
export abstract class BasePollComponent
2727
implements OnChanges, AfterViewInit, OnDestroy
2828
{
29+
/**
30+
* The poll id to display
31+
*/
2932
@Input() pollId: string | undefined;
33+
/**
34+
* The message id the poll is attached to
35+
*/
3036
@Input() messageId: string | undefined;
3137
canVote = false;
3238
canQueryVotes = false;

projects/stream-chat-angular/src/lib/polls/poll-actions/add-option/add-option.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import { createUniqueValidator } from '../../unique.validator';
2020
})
2121
export class AddOptionComponent extends BasePollComponent {
2222
@HostBinding('class') class = 'str-chat__dialog';
23+
/**
24+
* The callback to close the modal the component is displayed in
25+
*/
2326
@Input() closeModal: () => void = () => {};
2427
formGroup = new FormGroup({
2528
text: new FormControl('', [

projects/stream-chat-angular/src/lib/polls/poll-actions/poll-actions.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ type Action =
3333
changeDetection: ChangeDetectionStrategy.OnPush,
3434
})
3535
export class PollActionsComponent extends BasePollComponent {
36+
/**
37+
* If there are more options than this number, the "See all options" button will be displayed
38+
*/
3639
@Input() maxOptionsDisplayed: number | undefined = 10;
40+
/**
41+
* The maximum number of options allowed for the poll, this is defined by Stream API
42+
*/
3743
@Input() maxPollOptions = 100;
3844
name = '';
3945
options: PollOption[] = [];

projects/stream-chat-angular/src/lib/polls/poll-actions/poll-answers-list/poll-answers-list.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export class PollAnswersListComponent
2424
implements OnChanges
2525
{
2626
@HostBinding('class') class = 'str-chat__modal__poll-answer-list';
27+
/**
28+
* The even that's emitted when the update/add comment button is clicked
29+
*/
2730
@Output() upsertOwnAnswer = new EventEmitter<void>();
2831
isLoading = false;
2932
next?: string | undefined;

projects/stream-chat-angular/src/lib/polls/poll-actions/poll-results/poll-vote-results-list/poll-vote-results-list.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export class PollVoteResultsListComponent
2121
extends BasePollComponent
2222
implements OnChanges
2323
{
24+
/**
25+
* The poll option to display the votes for
26+
*/
2427
@Input() option: PollOption | undefined;
2528
isWinner = false;
2629
voteCount = 0;

projects/stream-chat-angular/src/lib/polls/poll-actions/poll-results/poll-vote/poll-vote.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import { DateParserService } from '../../../../date-parser.service';
1313
changeDetection: ChangeDetectionStrategy.OnPush,
1414
})
1515
export class PollVoteComponent {
16+
/**
17+
* The poll vote or answer to display
18+
*/
1619
@Input() vote: PollVote | PollAnswer | undefined;
1720
anonymousTranslation = 'Anonymous';
1821

projects/stream-chat-angular/src/lib/polls/poll-actions/upsert-answer/upsert-answer.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ export class UpsertAnswerComponent
2424
implements OnChanges
2525
{
2626
@HostBinding('class') class = 'str-chat__dialog';
27+
/**
28+
* The poll comment to edit, when in edit mode
29+
*/
2730
@Input() answer: PollAnswer | undefined;
31+
/**
32+
* The callback to close the modal the component is displayed in
33+
*/
2834
@Input() closeModal: () => void = () => {};
2935
formGroup = new FormGroup({
3036
comment: new FormControl('', [Validators.required]),

projects/stream-chat-angular/src/lib/polls/poll-composer/poll-composer.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ import { atLeastOneOption, maximumNumberOfVotes } from './validators';
2222
styles: [],
2323
})
2424
export class PollComposerComponent {
25+
/**
26+
* Emitted when a poll is created, the poll id is emitted
27+
*/
2528
@Output() pollCompose = new EventEmitter<string>();
29+
/**
30+
* Emitted when the poll composing is cancelled
31+
*/
2632
@Output() cancel = new EventEmitter<void>();
2733
formGroup = new FormGroup({
2834
name: new FormControl('', [Validators.required]),

projects/stream-chat-angular/src/lib/polls/poll-options-list/poll-options-list.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import { Poll, PollOption } from 'stream-chat';
1212
changeDetection: ChangeDetectionStrategy.OnPush,
1313
})
1414
export class PollOptionsListComponent extends BasePollComponent {
15+
/**
16+
* How many options should be displayed. If there are more options than this number, use the poll actions to display all options
17+
*/
1518
@Input() maxOptionsDisplayed: number | undefined = 10;
1619
options: PollOption[] = [];
1720

0 commit comments

Comments
 (0)