Skip to content

Commit a4b794b

Browse files
authored
Merge pull request #673 from GetStream/custom-autocompletes
chore: make JavaScript links internal
2 parents 1d0923e + 09d89f8 commit a4b794b

20 files changed

+57
-52
lines changed

copy-generated-component-docs.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ const insertGeneratedParts = (
3232
fileContent: string,
3333
generatedContent: string[]
3434
) => {
35+
generatedContent = generatedContent.map((l) =>
36+
l.replace(/\s/g, '').replace(/\s/g, '')
37+
);
3538
const lines: string[] = fileContent.split('\n');
3639
const startOfGeneratedContentLineNumber = lines.indexOf(
3740
startOfGeneratedContentMark

copy-generated-service-docs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ fs.readdir(sourcePath, (err: any, files: string[]) => {
4646
/\b(?!README)(\w+)\.md\b/g,
4747
'/chat/docs/sdk/angular/services/$1'
4848
)
49+
.replace(/\s/g, '')
50+
.replace(/\s/g, '')
4951
.replace('<T\\>', '')
5052
.replace('\\', '');
5153

projects/stream-chat-angular/src/lib/attachment.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { MessageService } from './message.service';
2323
/**
2424
* The `AttachmentService` manages the uploads of a message input.
2525
*
26-
* You can read more about [uploads](https://getstream.io/chat/docs/javascript/file_uploads/?language=javascript&q=size) in the Stream API documentation. You can use Stream's API or the dashboard to customize the [file](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript&q=size#file-uploads) and [image upload](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript&q=size#image-uploads) configuration.
26+
* You can read more about [uploads](/chat/docs/javascript/file_uploads/) in the Stream API documentation. You can use Stream's API or the dashboard to customize the [file](/chat/docs/javascript/app_setting_overview/#file-uploads) and [image upload](/chat/docs/javascript/app_setting_overview/#image-uploads) configuration.
2727
*/
2828
@Injectable({
2929
providedIn: 'root',

projects/stream-chat-angular/src/lib/channel-header/channel-header.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from '../types';
1919

2020
/**
21-
* The `ChannelHeader` component displays the avatar and name of the currently active channel along with member and watcher information. You can read about [the difference between members and watchers](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript#watchers-vs-members) in the platform documentation. Please note that number of watchers is only displayed if the user has [`connect-events` capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript)
21+
* The `ChannelHeader` component displays the avatar and name of the currently active channel along with member and watcher information. You can read about [the difference between members and watchers](/chat/docs/javascript/watch_channel/#watchers-vs-members) in the platform documentation. Please note that number of watchers is only displayed if the user has [`connect-events` capability](/chat/docs/javascript/channel_capabilities/)
2222
*/
2323
@Component({
2424
selector: 'stream-channel-header',

projects/stream-chat-angular/src/lib/channel-query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class ChannelQuery<
2424
*
2525
* The method will be called with the result of the latest channel query.
2626
*
27-
* You can return either an offset, or a filter using the [`$lte`/`$gte` operator](https://getstream.io/chat/docs/javascript/query_syntax_operators/). If you return a filter, it will be merged with the filter provided for the `init` method.
27+
* You can return either an offset, or a filter using the [`$lte`/`$gte` operator](/chat/docs/javascript/query_syntax_operators/). If you return a filter, it will be merged with the filter provided for the `init` method.
2828
*/
2929
customPaginator?: (channelQueryResult: Channel<T>[]) => NextPageConfiguration;
3030
private nextPageConfiguration?: NextPageConfiguration;

projects/stream-chat-angular/src/lib/channel.service.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class ChannelService<
5757
*/
5858
hasMoreChannels$: Observable<boolean>;
5959
/**
60-
* Emits the currently loaded and [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel list.
60+
* Emits the currently loaded and [watched](/chat/docs/javascript/watch_channel/) channel list.
6161
*
6262
* :::important
6363
* If you want to subscribe to channel events, you need to manually reenter Angular's change detection zone, our [Change detection guide](/chat/docs/sdk/angular/concepts/change-detection/) explains this in detail.
@@ -119,7 +119,7 @@ export class ChannelService<
119119
*/
120120
latestMessageDateByUserByChannels$: Observable<{ [key: string]: Date }>;
121121
/**
122-
* If you're using [semantic filters for moderation](https://getstream.io/automated-moderation/docs/automod_configuration/?q=semantic%20filters) you can set up rules for bouncing messages.
122+
* If you're using [semantic filters for moderation](/moderation/docs/) you can set up rules for bouncing messages.
123123
*
124124
* If a message is bounced, it will be emitted via this `Observable`. The built-in [`MessageBouncePrompt` component](/chat/docs/sdk/angular/components/MessageBouncePromptComponent/) will display the bounce option to the user if a bounced message is clicked.
125125
*/
@@ -139,7 +139,7 @@ export class ChannelService<
139139
/**
140140
* Custom event handler to call if a new message received from a channel that is not being watched, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/)
141141
*
142-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
142+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
143143
*/
144144
customNewMessageNotificationHandler?: (
145145
clientEvent: ClientEvent,
@@ -151,7 +151,7 @@ export class ChannelService<
151151
/**
152152
* Custom event handler to call when the user is added to a channel, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
153153
*
154-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
154+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
155155
*/
156156
customAddedToChannelNotificationHandler?: (
157157
clientEvent: ClientEvent,
@@ -163,7 +163,7 @@ export class ChannelService<
163163
/**
164164
* Custom event handler to call when the user is removed from a channel, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
165165
*
166-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
166+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
167167
*/
168168
customRemovedFromChannelNotificationHandler?: (
169169
clientEvent: ClientEvent,
@@ -175,7 +175,7 @@ export class ChannelService<
175175
/**
176176
* Custom event handler to call when a channel is deleted, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
177177
*
178-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
178+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
179179
*/
180180
customChannelDeletedHandler?: (
181181
event: Event,
@@ -191,7 +191,7 @@ export class ChannelService<
191191
/**
192192
* Custom event handler to call when a channel is updated, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
193193
*
194-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
194+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
195195
*/
196196
customChannelUpdatedHandler?: (
197197
event: Event,
@@ -207,7 +207,7 @@ export class ChannelService<
207207
/**
208208
* Custom event handler to call when a channel is truncated, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
209209
*
210-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
210+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
211211
*/
212212
customChannelTruncatedHandler?: (
213213
event: Event,
@@ -223,7 +223,7 @@ export class ChannelService<
223223
/**
224224
* Custom event handler to call when a channel becomes hidden, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
225225
*
226-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
226+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
227227
*/
228228
customChannelHiddenHandler?: (
229229
event: Event,
@@ -239,7 +239,7 @@ export class ChannelService<
239239
/**
240240
* Custom event handler to call when a channel becomes visible, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
241241
*
242-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
242+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
243243
*/
244244
customChannelVisibleHandler?: (
245245
event: Event,
@@ -255,7 +255,7 @@ export class ChannelService<
255255
/**
256256
* Custom event handler to call if a new message received from a channel that is being watched, provide an event handler if you want to override the [default channel list ordering](/chat/docs/sdk/angular/services/ChannelService/#channels/).
257257
*
258-
* If you're adding a new channel, make sure that it's a [watched](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript) channel.
258+
* If you're adding a new channel, make sure that it's a [watched](/chat/docs/javascript/watch_channel/) channel.
259259
*/
260260
customNewMessageHandler?: (
261261
event: Event,
@@ -542,7 +542,7 @@ export class ChannelService<
542542
*
543543
* The method will be called with the result of the latest channel query.
544544
*
545-
* You can return either an offset, or a filter using the [`$lte`/`$gte` operator](https://getstream.io/chat/docs/javascript/query_syntax_operators/). If you return a filter, it will be merged with the filter provided for the `init` method.
545+
* You can return either an offset, or a filter using the [`$lte`/`$gte` operator](/chat/docs/javascript/query_syntax_operators/). If you return a filter, it will be merged with the filter provided for the `init` method.
546546
*/
547547
set customPaginator(
548548
paginator:
@@ -652,7 +652,7 @@ export class ChannelService<
652652
}
653653

654654
/**
655-
* Loads the next page of messages of the active channel. The page size can be set in the [query option](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript#query-options) object.
655+
* Loads the next page of messages of the active channel. The page size can be set in the [query option](/chat/docs/javascript/query_channels/#query-options) object.
656656
* @param direction
657657
*/
658658
loadMoreMessages(direction: 'older' | 'newer' = 'older') {
@@ -691,7 +691,7 @@ export class ChannelService<
691691
}
692692

693693
/**
694-
* Loads the next page of messages of the active thread. The page size can be set in the [query option](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript#query-options) object.
694+
* Loads the next page of messages of the active thread. The page size can be set in the [query option](/chat/docs/javascript/query_channels/#query-options) object.
695695
* @param direction
696696
*/
697697
loadMoreThreadReplies(direction: 'older' | 'newer' = 'older') {
@@ -720,7 +720,7 @@ export class ChannelService<
720720
}
721721

722722
/**
723-
* Queries the channels with the given filters, sorts and options. More info about [channel querying](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript) can be found in the platform documentation. By default the first channel in the list will be set as active channel and will be marked as read.
723+
* Queries the channels with the given filters, sorts and options. More info about [channel querying](/chat/docs/javascript/query_channels/) can be found in the platform documentation. By default the first channel in the list will be set as active channel and will be marked as read.
724724
* @param filters
725725
* @param sort
726726
* @param options
@@ -756,7 +756,7 @@ export class ChannelService<
756756
}
757757

758758
/**
759-
* Queries the channels with the given query function. More info about [channel querying](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript) can be found in the platform documentation.
759+
* Queries the channels with the given query function. More info about [channel querying](/chat/docs/javascript/query_channels/) can be found in the platform documentation.
760760
* @param query
761761
* @param options
762762
* @param options.shouldSetActiveChannel The `shouldSetActiveChannel` specifies if the first channel in the result should be selected as the active channel or not. Default is `true`.
@@ -791,7 +791,7 @@ export class ChannelService<
791791
}
792792

793793
/**
794-
* Loads the next page of channels. The page size can be set in the [query option](https://getstream.io/chat/docs/javascript/query_channels/?language=javascript#query-options) object.
794+
* Loads the next page of channels. The page size can be set in the [query option](/chat/docs/javascript/query_channels/#query-options) object.
795795
*/
796796
async loadMoreChannels() {
797797
await this.queryChannels(false, 'next-page');
@@ -960,7 +960,7 @@ export class ChannelService<
960960
}
961961

962962
/**
963-
* Uploads files to the channel. If you want to know more about [file uploads](https://getstream.io/chat/docs/javascript/file_uploads/?language=javascript) check out the platform documentation.
963+
* Uploads files to the channel. If you want to know more about [file uploads](/chat/docs/javascript/file_uploads/) check out the platform documentation.
964964
* @param uploads the attachments to upload (output of the [`AttachmentService`](/chat/docs/sdk/angular/services/AttachmentService/))
965965
* @returns the result of file upload requests
966966
*/
@@ -1041,7 +1041,7 @@ export class ChannelService<
10411041
}
10421042

10431043
/**
1044-
* Deletes an uploaded file by URL. If you want to know more about [file uploads](https://getstream.io/chat/docs/javascript/file_uploads/?language=javascript) check out the platform documentation
1044+
* Deletes an uploaded file by URL. If you want to know more about [file uploads](/chat/docs/javascript/file_uploads/) check out the platform documentation
10451045
* @param attachmentUpload Attachment to be deleted (output of the [`AttachmentService`](/chat/docs/sdk/angular/services/AttachmentService/))
10461046
*/
10471047
async deleteAttachment(attachmentUpload: AttachmentUpload) {
@@ -1056,7 +1056,7 @@ export class ChannelService<
10561056
}
10571057

10581058
/**
1059-
* Returns the autocomplete options for current channel members. If the channel has less than 100 members, it returns the channel members, otherwise sends a [search request](https://getstream.io/chat/docs/javascript/query_members/?language=javascript#pagination-and-ordering) with the given search term.
1059+
* Returns the autocomplete options for current channel members. If the channel has less than 100 members, it returns the channel members, otherwise sends a [search request](/chat/docs/javascript/query_members/#pagination-and-ordering) with the given search term.
10601060
* @param searchTerm Text to search for in the names of members
10611061
* @returns The list of members matching the search filter
10621062
*/
@@ -1642,8 +1642,8 @@ export class ChannelService<
16421642
}
16431643

16441644
/**
1645-
* Get the last 1200 reactions of a message in the current active channel. If you need to fetch more reactions please use the [following endpoint](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript#paginating-reactions).
1646-
* @deprecated use [`messageReactionsService.queryReactions()`](https://getstream.io/chat/docs/sdk/angular/services/MessageReactionsService/#queryreactions) instead
1645+
* Get the last 1200 reactions of a message in the current active channel. If you need to fetch more reactions please use the [following endpoint](/chat/docs/javascript/send_reaction/#paginating-reactions).
1646+
* @deprecated use [`messageReactionsService.queryReactions()`](/chat/docs/sdk/angular/services/MessageReactionsService/#queryreactions) instead
16471647
* @param messageId
16481648
* @returns all reactions of a message
16491649
*/

projects/stream-chat-angular/src/lib/channel/channel.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ThemeService } from '../theme.service';
66
import { CustomTemplatesService } from '../custom-templates.service';
77

88
/**
9-
* The `Channel` component is a container component that displays the [`ChannelHeader`](/chat/docs/sdk/angular/components/ChannelHeaderComponent/), [`MessageList`](/chat/docs/sdk/angular/components/MessageListComponent), [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/) and [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) components. You can also provide the [`Thread`](/chat/docs/sdk/angular/components/ThreadComponent/) component to use message [threads](https://getstream.io/chat/docs/javascript/threads/?language=javascript).
9+
* The `Channel` component is a container component that displays the [`ChannelHeader`](/chat/docs/sdk/angular/components/ChannelHeaderComponent/), [`MessageList`](/chat/docs/sdk/angular/components/MessageListComponent), [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/) and [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) components. You can also provide the [`Thread`](/chat/docs/sdk/angular/components/ThreadComponent/) component to use message [threads](/chat/docs/javascript/threads/).
1010
*/
1111
@Component({
1212
selector: 'stream-channel',

0 commit comments

Comments
 (0)