@ohos-ports/stream-chat-angular 0.0.0-stage → 7.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +139 -2
- package/assets/i18n/en.d.ts +157 -0
- package/assets/version.d.ts +1 -0
- package/esm2022/assets/i18n/en.mjs +158 -0
- package/esm2022/assets/version.mjs +2 -0
- package/esm2022/lib/attachment-configuration.service.mjs +182 -0
- package/esm2022/lib/attachment-list/attachment-list.component.mjs +232 -0
- package/esm2022/lib/attachment-preview-list/attachment-preview-list.component.mjs +55 -0
- package/esm2022/lib/attachment.service.mjs +481 -0
- package/esm2022/lib/avatar/avatar.component.mjs +160 -0
- package/esm2022/lib/avatar-placeholder/avatar-placeholder.component.mjs +66 -0
- package/esm2022/lib/channel/channel.component.mjs +45 -0
- package/esm2022/lib/channel-header/channel-header.component.mjs +72 -0
- package/esm2022/lib/channel-list/channel-list.component.mjs +47 -0
- package/esm2022/lib/channel-preview/channel-preview.component.mjs +158 -0
- package/esm2022/lib/channel-query.mjs +77 -0
- package/esm2022/lib/channel.service.mjs +1576 -0
- package/esm2022/lib/chat-client.service.mjs +233 -0
- package/esm2022/lib/custom-templates.service.mjs +258 -0
- package/esm2022/lib/date-parser.service.mjs +51 -0
- package/esm2022/lib/file-utils.mjs +35 -0
- package/esm2022/lib/format-duration.mjs +16 -0
- package/esm2022/lib/get-channel-display-text.mjs +14 -0
- package/esm2022/lib/get-message-translation.mjs +12 -0
- package/esm2022/lib/icon/icon-placeholder/icon-placeholder.component.mjs +28 -0
- package/esm2022/lib/icon/icon.component.mjs +17 -0
- package/esm2022/lib/icon/icon.module.mjs +37 -0
- package/esm2022/lib/icon/loading-indicator/loading-indicator.component.mjs +15 -0
- package/esm2022/lib/icon/loading-indicator-placeholder/loading-indicator-placeholder.component.mjs +20 -0
- package/esm2022/lib/injection-tokens.mjs +3 -0
- package/esm2022/lib/is-image-attachment.mjs +6 -0
- package/esm2022/lib/is-on-separate-date.mjs +11 -0
- package/esm2022/lib/is-safari.mjs +2 -0
- package/esm2022/lib/list-users.mjs +12 -0
- package/esm2022/lib/message/message.component.mjs +501 -0
- package/esm2022/lib/message-actions-box/message-actions-box.component.mjs +123 -0
- package/esm2022/lib/message-actions.service.mjs +191 -0
- package/esm2022/lib/message-blocked/message-blocked.component.mjs +25 -0
- package/esm2022/lib/message-bounce-prompt/message-bounce-prompt.component.mjs +71 -0
- package/esm2022/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.mjs +333 -0
- package/esm2022/lib/message-input/emoji-input.service.mjs +23 -0
- package/esm2022/lib/message-input/message-input-config.service.mjs +50 -0
- package/esm2022/lib/message-input/message-input.component.mjs +626 -0
- package/esm2022/lib/message-input/textarea/textarea.component.mjs +113 -0
- package/esm2022/lib/message-input/textarea.directive.mjs +93 -0
- package/esm2022/lib/message-input/textarea.interface.mjs +2 -0
- package/esm2022/lib/message-input/voice-recorder.service.mjs +27 -0
- package/esm2022/lib/message-list/group-styles.mjs +52 -0
- package/esm2022/lib/message-list/message-list.component.mjs +717 -0
- package/esm2022/lib/message-preview.mjs +22 -0
- package/esm2022/lib/message-reactions/message-reactions.component.mjs +168 -0
- package/esm2022/lib/message-reactions-selector/message-reactions-selector.component.mjs +61 -0
- package/esm2022/lib/message-reactions.service.mjs +70 -0
- package/esm2022/lib/message-text/message-text.component.mjs +141 -0
- package/esm2022/lib/message.service.mjs +43 -0
- package/esm2022/lib/modal/modal.component.mjs +69 -0
- package/esm2022/lib/modal/stream-modal.module.mjs +19 -0
- package/esm2022/lib/notification/notification.component.mjs +20 -0
- package/esm2022/lib/notification-list/notification-list.component.mjs +36 -0
- package/esm2022/lib/notification-list/stream-notification.module.mjs +20 -0
- package/esm2022/lib/notification.service.mjs +79 -0
- package/esm2022/lib/paginated-list/paginated-list.component.mjs +94 -0
- package/esm2022/lib/paginated-list/stream-paginated-list.module.mjs +20 -0
- package/esm2022/lib/parse-date.mjs +27 -0
- package/esm2022/lib/polls/base-poll.component.mjs +87 -0
- package/esm2022/lib/polls/poll/poll.component.mjs +34 -0
- package/esm2022/lib/polls/poll-actions/add-option/add-option.component.mjs +67 -0
- package/esm2022/lib/polls/poll-actions/poll-actions.component.mjs +137 -0
- package/esm2022/lib/polls/poll-actions/poll-answers-list/poll-answers-list.component.mjs +82 -0
- package/esm2022/lib/polls/poll-actions/poll-results/poll-results-list/poll-results-list.component.mjs +63 -0
- package/esm2022/lib/polls/poll-actions/poll-results/poll-vote/poll-vote.component.mjs +33 -0
- package/esm2022/lib/polls/poll-actions/poll-results/poll-vote-results-list/poll-vote-results-list.component.mjs +82 -0
- package/esm2022/lib/polls/poll-actions/upsert-answer/upsert-answer.component.mjs +60 -0
- package/esm2022/lib/polls/poll-composer/poll-composer.component.mjs +134 -0
- package/esm2022/lib/polls/poll-composer/validators.mjs +18 -0
- package/esm2022/lib/polls/poll-header/poll-header.component.mjs +80 -0
- package/esm2022/lib/polls/poll-option-selector/poll-option-selector.component.mjs +137 -0
- package/esm2022/lib/polls/poll-options-list/poll-options-list.component.mjs +39 -0
- package/esm2022/lib/polls/poll-preview/poll-preview.component.mjs +31 -0
- package/esm2022/lib/polls/stream-polls.module.mjs +107 -0
- package/esm2022/lib/polls/unique.validator.mjs +13 -0
- package/esm2022/lib/read-by.mjs +13 -0
- package/esm2022/lib/stream-autocomplete-textarea.module.mjs +33 -0
- package/esm2022/lib/stream-avatar.module.mjs +20 -0
- package/esm2022/lib/stream-chat.module.mjs +163 -0
- package/esm2022/lib/stream-i18n.service.mjs +34 -0
- package/esm2022/lib/stream-textarea.module.mjs +31 -0
- package/esm2022/lib/theme.service.mjs +23 -0
- package/esm2022/lib/thread/thread.component.mjs +51 -0
- package/esm2022/lib/transliteration.service.mjs +24 -0
- package/esm2022/lib/types-custom.mjs +2 -0
- package/esm2022/lib/types.mjs +2 -0
- package/esm2022/lib/user-list/user-list.component.mjs +47 -0
- package/esm2022/lib/virtualized-list.service.mjs +271 -0
- package/esm2022/lib/virtualized-message-list.service.mjs +73 -0
- package/esm2022/lib/voice-recorder/amplitude-recorder.service.mjs +119 -0
- package/esm2022/lib/voice-recorder/audio-recorder.service.mjs +79 -0
- package/esm2022/lib/voice-recorder/media-recorder.mjs +190 -0
- package/esm2022/lib/voice-recorder/mp3-transcoder.mjs +61 -0
- package/esm2022/lib/voice-recorder/transcoder.service.mjs +121 -0
- package/esm2022/lib/voice-recorder/voice-recorder-wavebar/voice-recorder-wavebar.component.mjs +35 -0
- package/esm2022/lib/voice-recorder/voice-recorder.component.mjs +80 -0
- package/esm2022/lib/voice-recorder/voice-recorder.module.mjs +34 -0
- package/esm2022/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.mjs +112 -0
- package/esm2022/lib/voice-recording/voice-recording.component.mjs +91 -0
- package/esm2022/lib/voice-recording/voice-recording.module.mjs +21 -0
- package/esm2022/lib/wave-form-sampler.mjs +72 -0
- package/esm2022/public-api.mjs +104 -0
- package/esm2022/stream-chat-angular.mjs +5 -0
- package/esm2022/stream-chat.mjs +2 -0
- package/fesm2022/stream-chat-angular.mjs +10363 -0
- package/fesm2022/stream-chat-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/attachment-configuration.service.d.ts +58 -0
- package/lib/attachment-list/attachment-list.component.d.ts +76 -0
- package/lib/attachment-preview-list/attachment-preview-list.component.d.ts +37 -0
- package/lib/attachment.service.d.ts +104 -0
- package/lib/avatar/avatar.component.d.ts +64 -0
- package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +48 -0
- package/lib/channel/channel.component.d.ts +22 -0
- package/lib/channel-header/channel-header.component.d.ts +36 -0
- package/lib/channel-list/channel-list.component.d.ts +30 -0
- package/lib/channel-preview/channel-preview.component.d.ts +46 -0
- package/lib/channel-query.d.ts +26 -0
- package/lib/channel.service.d.ts +482 -0
- package/lib/chat-client.service.d.ts +91 -0
- package/lib/custom-templates.service.d.ts +258 -0
- package/lib/date-parser.service.d.ts +39 -0
- package/lib/file-utils.d.ts +9 -0
- package/lib/format-duration.d.ts +1 -0
- package/lib/get-channel-display-text.d.ts +2 -0
- package/lib/get-message-translation.d.ts +3 -0
- package/lib/icon/icon-placeholder/icon-placeholder.component.d.ts +20 -0
- package/lib/icon/icon.component.d.ts +14 -0
- package/lib/icon/icon.module.d.ts +11 -0
- package/lib/icon/loading-indicator/loading-indicator.component.d.ts +9 -0
- package/lib/icon/loading-indicator-placeholder/loading-indicator-placeholder.component.d.ts +11 -0
- package/lib/injection-tokens.d.ts +3 -0
- package/lib/is-image-attachment.d.ts +2 -0
- package/lib/is-on-separate-date.d.ts +1 -0
- package/lib/is-safari.d.ts +1 -0
- package/lib/list-users.d.ts +2 -0
- package/lib/message/message.component.d.ts +126 -0
- package/lib/message-actions-box/message-actions-box.component.d.ts +49 -0
- package/lib/message-actions.service.d.ts +49 -0
- package/lib/message-blocked/message-blocked.component.d.ts +17 -0
- package/lib/message-bounce-prompt/message-bounce-prompt.component.d.ts +28 -0
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +98 -0
- package/lib/message-input/emoji-input.service.d.ts +14 -0
- package/lib/message-input/message-input-config.service.d.ts +54 -0
- package/lib/message-input/message-input.component.d.ts +189 -0
- package/lib/message-input/textarea/textarea.component.d.ts +55 -0
- package/lib/message-input/textarea.directive.d.ts +24 -0
- package/lib/message-input/textarea.interface.d.ts +14 -0
- package/lib/message-input/voice-recorder.service.d.ts +19 -0
- package/lib/message-list/group-styles.d.ts +3 -0
- package/lib/message-list/message-list.component.d.ts +146 -0
- package/lib/message-preview.d.ts +2 -0
- package/lib/message-reactions/message-reactions.component.d.ts +69 -0
- package/lib/message-reactions-selector/message-reactions-selector.component.d.ts +35 -0
- package/lib/message-reactions.service.d.ts +50 -0
- package/lib/message-text/message-text.component.d.ts +45 -0
- package/lib/message.service.d.ts +38 -0
- package/lib/modal/modal.component.d.ts +29 -0
- package/lib/modal/stream-modal.module.d.ts +9 -0
- package/lib/notification/notification.component.d.ts +19 -0
- package/lib/notification-list/notification-list.component.d.ts +23 -0
- package/lib/notification-list/stream-notification.module.d.ts +10 -0
- package/lib/notification.service.d.ts +38 -0
- package/lib/paginated-list/paginated-list.component.d.ts +45 -0
- package/lib/paginated-list/stream-paginated-list.module.d.ts +10 -0
- package/lib/parse-date.d.ts +1 -0
- package/lib/polls/base-poll.component.d.ts +43 -0
- package/lib/polls/poll/poll.component.d.ts +12 -0
- package/lib/polls/poll-actions/add-option/add-option.component.d.ts +22 -0
- package/lib/polls/poll-actions/poll-actions.component.d.ts +50 -0
- package/lib/polls/poll-actions/poll-answers-list/poll-answers-list.component.d.ts +25 -0
- package/lib/polls/poll-actions/poll-results/poll-results-list/poll-results-list.component.d.ts +22 -0
- package/lib/polls/poll-actions/poll-results/poll-vote/poll-vote.component.d.ts +20 -0
- package/lib/polls/poll-actions/poll-results/poll-vote-results-list/poll-vote-results-list.component.d.ts +24 -0
- package/lib/polls/poll-actions/upsert-answer/upsert-answer.component.d.ts +27 -0
- package/lib/polls/poll-composer/poll-composer.component.d.ts +43 -0
- package/lib/polls/poll-composer/validators.d.ts +3 -0
- package/lib/polls/poll-header/poll-header.component.d.ts +19 -0
- package/lib/polls/poll-option-selector/poll-option-selector.component.d.ts +27 -0
- package/lib/polls/poll-options-list/poll-options-list.component.d.ts +17 -0
- package/lib/polls/poll-preview/poll-preview.component.d.ts +13 -0
- package/lib/polls/stream-polls.module.d.ts +26 -0
- package/lib/polls/unique.validator.d.ts +2 -0
- package/lib/read-by.d.ts +2 -0
- package/lib/stream-autocomplete-textarea.module.d.ts +11 -0
- package/lib/stream-avatar.module.d.ts +10 -0
- package/lib/stream-chat.module.d.ts +35 -0
- package/lib/stream-i18n.service.d.ts +19 -0
- package/lib/stream-textarea.module.d.ts +9 -0
- package/lib/theme.service.d.ts +14 -0
- package/lib/thread/thread.component.d.ts +26 -0
- package/lib/transliteration.service.d.ts +15 -0
- package/lib/types-custom.d.ts +16 -0
- package/lib/types.d.ts +365 -0
- package/lib/user-list/user-list.component.d.ts +29 -0
- package/lib/virtualized-list.service.d.ts +58 -0
- package/lib/virtualized-message-list.service.d.ts +15 -0
- package/lib/voice-recorder/amplitude-recorder.service.d.ts +71 -0
- package/lib/voice-recorder/audio-recorder.service.d.ts +46 -0
- package/lib/voice-recorder/media-recorder.d.ts +46 -0
- package/lib/voice-recorder/mp3-transcoder.d.ts +1 -0
- package/lib/voice-recorder/transcoder.service.d.ts +40 -0
- package/lib/voice-recorder/voice-recorder-wavebar/voice-recorder-wavebar.component.d.ts +21 -0
- package/lib/voice-recorder/voice-recorder.component.d.ts +30 -0
- package/lib/voice-recorder/voice-recorder.module.d.ts +12 -0
- package/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.d.ts +36 -0
- package/lib/voice-recording/voice-recording.component.d.ts +29 -0
- package/lib/voice-recording/voice-recording.module.d.ts +11 -0
- package/lib/wave-form-sampler.d.ts +1 -0
- package/package.json +62 -4
- package/public-api.d.ts +99 -0
- package/src/assets/assets/EmojiOneColor.woff2 +0 -0
- package/src/assets/assets/NotoColorEmoji-flags.woff2 +0 -0
- package/src/assets/assets/icons/stream-chat-icons.eot +0 -0
- package/src/assets/assets/icons/stream-chat-icons.svg +50 -0
- package/src/assets/assets/icons/stream-chat-icons.ttf +0 -0
- package/src/assets/assets/icons/stream-chat-icons.woff +0 -0
- package/src/assets/assets/icons/stream-chat-icons.woff2 +0 -0
- package/src/assets/i18n/en.ts +184 -0
- package/src/assets/styles/css/emoji-mart.css +1 -0
- package/src/assets/styles/css/emoji-replacement.css +1 -0
- package/src/assets/styles/css/index.css +1 -0
- package/src/assets/styles/css/index.layout.css +1 -0
- package/src/assets/styles/scss/AIStateIndicator/AIStateIndicator-layout.scss +3 -0
- package/src/assets/styles/scss/AIStateIndicator/AIStateIndicator-theme.scss +7 -0
- package/src/assets/styles/scss/AttachmentList/AttachmentList-layout.scss +701 -0
- package/src/assets/styles/scss/AttachmentList/AttachmentList-theme.scss +605 -0
- package/src/assets/styles/scss/AttachmentPreviewList/AttachmentPreviewList-layout.scss +141 -0
- package/src/assets/styles/scss/AttachmentPreviewList/AttachmentPreviewList-theme.scss +190 -0
- package/src/assets/styles/scss/AudioRecorder/AudioRecorder-layout.scss +139 -0
- package/src/assets/styles/scss/AudioRecorder/AudioRecorder-theme.scss +61 -0
- package/src/assets/styles/scss/Autocomplete/Autocomplete-layout.scss +94 -0
- package/src/assets/styles/scss/Autocomplete/Autocomplete-theme.scss +220 -0
- package/src/assets/styles/scss/Avatar/Avatar-layout.scss +137 -0
- package/src/assets/styles/scss/Avatar/Avatar-theme.scss +64 -0
- package/src/assets/styles/scss/BaseImage/BaseImage-layout.scss +21 -0
- package/src/assets/styles/scss/BaseImage/BaseImage-theme.scss +35 -0
- package/src/assets/styles/scss/BaseImage/index.scss +2 -0
- package/src/assets/styles/scss/Channel/Channel-layout.scss +141 -0
- package/src/assets/styles/scss/Channel/Channel-theme.scss +100 -0
- package/src/assets/styles/scss/ChannelHeader/ChannelHeader-layout.scss +27 -0
- package/src/assets/styles/scss/ChannelHeader/ChannelHeader-theme.scss +43 -0
- package/src/assets/styles/scss/ChannelList/ChannelList-layout.scss +65 -0
- package/src/assets/styles/scss/ChannelList/ChannelList-theme.scss +89 -0
- package/src/assets/styles/scss/ChannelPreview/ChannelPreview-layout.scss +126 -0
- package/src/assets/styles/scss/ChannelPreview/ChannelPreview-theme.scss +148 -0
- package/src/assets/styles/scss/ChannelSearch/ChannelSearch-layout.scss +122 -0
- package/src/assets/styles/scss/ChannelSearch/ChannelSearch-theme.scss +238 -0
- package/src/assets/styles/scss/ChatView/ChatView-layout.scss +43 -0
- package/src/assets/styles/scss/ChatView/ChatView-theme.scss +32 -0
- package/src/assets/styles/scss/Dialog/Dialog-layout.scss +70 -0
- package/src/assets/styles/scss/Dialog/Dialog-theme.scss +103 -0
- package/src/assets/styles/scss/DragAndDropContainer/DragAndDropContainer-layout.scss +5 -0
- package/src/assets/styles/scss/DragAndDropContainer/DragAndDropContainer-theme.scss +47 -0
- package/src/assets/styles/scss/DropzoneContainer/DropzoneContainer-layout.scss +14 -0
- package/src/assets/styles/scss/DropzoneContainer/DropzoneContainer-theme.scss +17 -0
- package/src/assets/styles/scss/EditMessageForm/EditMessageForm-layout.scss +51 -0
- package/src/assets/styles/scss/EditMessageForm/EditMessageForm-theme.scss +50 -0
- package/src/assets/styles/scss/Form/Form-layout.scss +49 -0
- package/src/assets/styles/scss/Form/Form-theme.scss +82 -0
- package/src/assets/styles/scss/Icon/Icon-layout.scss +98 -0
- package/src/assets/styles/scss/Icon/Icon-theme.scss +17 -0
- package/src/assets/styles/scss/ImageCarousel/ImageCarousel-layout.scss +51 -0
- package/src/assets/styles/scss/ImageCarousel/ImageCarousel-theme.scss +30 -0
- package/src/assets/styles/scss/InfiniteScrollPaginator/InfiniteScrollPaginator-layout.scss +4 -0
- package/src/assets/styles/scss/LinkPreview/LinkPreview-layout.scss +67 -0
- package/src/assets/styles/scss/LinkPreview/LinkPreview-theme.scss +32 -0
- package/src/assets/styles/scss/LinkPreview/index.scss +2 -0
- package/src/assets/styles/scss/LoadingIndicator/LoadingIndicator-layout.scss +64 -0
- package/src/assets/styles/scss/LoadingIndicator/LoadingIndicator-theme.scss +14 -0
- package/src/assets/styles/scss/Location/Location-layout.scss +52 -0
- package/src/assets/styles/scss/Location/Location-theme.scss +32 -0
- package/src/assets/styles/scss/Message/Message-layout.scss +605 -0
- package/src/assets/styles/scss/Message/Message-theme.scss +483 -0
- package/src/assets/styles/scss/MessageActionsBox/MessageActionsBox-layout.scss +20 -0
- package/src/assets/styles/scss/MessageActionsBox/MessageActionsBox-theme.scss +85 -0
- package/src/assets/styles/scss/MessageBouncePrompt/MessageBouncePrompt-layout.scss +19 -0
- package/src/assets/styles/scss/MessageBouncePrompt/MessageBouncePrompt-theme.scss +51 -0
- package/src/assets/styles/scss/MessageInput/MessageInput-layout.scss +268 -0
- package/src/assets/styles/scss/MessageInput/MessageInput-theme.scss +359 -0
- package/src/assets/styles/scss/MessageList/MessageList-layout.scss +65 -0
- package/src/assets/styles/scss/MessageList/MessageList-theme.scss +107 -0
- package/src/assets/styles/scss/MessageList/VirtualizedMessageList-layout.scss +57 -0
- package/src/assets/styles/scss/MessageList/VirtualizedMessageList-theme.scss +41 -0
- package/src/assets/styles/scss/MessageReactions/MessageReactions-layout.scss +143 -0
- package/src/assets/styles/scss/MessageReactions/MessageReactions-theme.scss +92 -0
- package/src/assets/styles/scss/MessageReactions/MessageReactionsSelector-layout.scss +86 -0
- package/src/assets/styles/scss/MessageReactions/MessageReactionsSelector-theme.scss +94 -0
- package/src/assets/styles/scss/Modal/Modal-layout.scss +74 -0
- package/src/assets/styles/scss/Modal/Modal-theme.scss +109 -0
- package/src/assets/styles/scss/Notification/MessageNotification-layout.scss +12 -0
- package/src/assets/styles/scss/Notification/MessageNotification-theme.scss +34 -0
- package/src/assets/styles/scss/Notification/Notification-layout.scss +7 -0
- package/src/assets/styles/scss/Notification/Notification-theme.scss +32 -0
- package/src/assets/styles/scss/Notification/NotificationList-layout.scss +11 -0
- package/src/assets/styles/scss/Notification/NotificationList-theme.scss +31 -0
- package/src/assets/styles/scss/Poll/Poll-layout.scss +489 -0
- package/src/assets/styles/scss/Poll/Poll-theme.scss +178 -0
- package/src/assets/styles/scss/Search/Search-layout.scss +148 -0
- package/src/assets/styles/scss/Search/Search-theme.scss +222 -0
- package/src/assets/styles/scss/Thread/Thread-layout.scss +65 -0
- package/src/assets/styles/scss/Thread/Thread-theme.scss +82 -0
- package/src/assets/styles/scss/ThreadList/ThreadList-layout.scss +152 -0
- package/src/assets/styles/scss/ThreadList/ThreadList-theme.scss +75 -0
- package/src/assets/styles/scss/Tooltip/Tooltip-layout.scss +10 -0
- package/src/assets/styles/scss/Tooltip/Tooltip-theme.scss +36 -0
- package/src/assets/styles/scss/TypingIndicator/TypingIndicator-layout.scss +31 -0
- package/src/assets/styles/scss/TypingIndicator/TypingIndicator-theme.scss +68 -0
- package/src/assets/styles/scss/UnreadCountBadge/UnreadCountBadge-layout.scss +49 -0
- package/src/assets/styles/scss/UnreadCountBadge/UnreadCountBadge-theme.scss +11 -0
- package/src/assets/styles/scss/_base.scss +65 -0
- package/src/assets/styles/scss/_emoji-replacement.scss +45 -0
- package/src/assets/styles/scss/_global-layout-variables.scss +65 -0
- package/src/assets/styles/scss/_global-theme-variables.scss +173 -0
- package/src/assets/styles/scss/_icons.scss +36 -0
- package/src/assets/styles/scss/_palette-variables.scss +55 -0
- package/src/assets/styles/scss/_utils.scss +212 -0
- package/src/assets/styles/scss/_variables.scss +2 -0
- package/src/assets/styles/scss/common/CTAButton/CTAButton-layout.scss +4 -0
- package/src/assets/styles/scss/common/CTAButton/CTAButton-theme.scss +42 -0
- package/src/assets/styles/scss/common/CircleFAButton/CircleFAButton-layout.scss +14 -0
- package/src/assets/styles/scss/common/CircleFAButton/CircleFAButton-theme.scss +35 -0
- package/src/assets/styles/scss/index.layout.scss +49 -0
- package/src/assets/styles/scss/index.scss +50 -0
- package/src/assets/styles/scss/vendor/emoji-mart.scss +514 -0
- package/src/assets/styles/scss/vendor/react-image-gallery.scss +258 -0
- package/src/assets/version.ts +1 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Attachment } from 'stream-chat';
|
|
2
|
+
import { AttachmentConfigration, ImageAttachmentConfiguration, VideoAttachmentConfiguration } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* The `AttachmentConfigurationService` provides customization for certain attributes of attachments displayed inside the message component. If you're using your own CDN, you can integrate resizing features of it by providing your own handlers.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AttachmentConfigurationService {
|
|
8
|
+
/**
|
|
9
|
+
* A custom handler can be provided to override the default image attachment (images uploaded from files) configuration. By default the SDK uses fixed image height (a size that's known before image is loaded), if you override that with dynamic image height (for example: height: 100%) the scrolling logic inside the message list can break.
|
|
10
|
+
*/
|
|
11
|
+
customImageAttachmentConfigurationHandler?: (a: Attachment, type: 'gallery' | 'single' | 'carousel', containerElement: HTMLElement) => ImageAttachmentConfiguration;
|
|
12
|
+
/**
|
|
13
|
+
* A custom handler can be provided to override the default video attachment (videos uploaded from files) configuration. By default the SDK uses fixed height (a size that's known before video is loaded), if you override that with dynamic height (for example: height: 100%) the scrolling logic inside the message list can break.
|
|
14
|
+
*/
|
|
15
|
+
customVideoAttachmentConfigurationHandler?: (a: Attachment, containerElement: HTMLElement) => VideoAttachmentConfiguration;
|
|
16
|
+
/**
|
|
17
|
+
* A custom handler can be provided to override the default giphy attachment (GIFs sent with the /giphy command) configuration. By default the SDK uses fixed height (a size that's known before the GIF is loaded), if you override that with dynamic height (for example: height: 100%) the scrolling logic inside the message list can break.
|
|
18
|
+
*/
|
|
19
|
+
customGiphyAttachmentConfigurationHandler?: (a: Attachment) => AttachmentConfigration;
|
|
20
|
+
/**
|
|
21
|
+
* A custom handler can be provided to override the default scraped image attachment (images found in links inside messages) configuration. By default the SDK uses fixed height (a size that's known before image is loaded), if you override that with dynamic height (for example: height: 100%) the scrolling logic inside the message list can break.
|
|
22
|
+
*/
|
|
23
|
+
customScrapedImageAttachmentConfigurationHandler?: (a: Attachment) => AttachmentConfigration;
|
|
24
|
+
/**
|
|
25
|
+
* You can turn on/off thumbnail generation for video attachments
|
|
26
|
+
*/
|
|
27
|
+
shouldGenerateVideoThumbnail: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Handles the configuration for image attachments, it's possible to provide your own function to override the default logic
|
|
30
|
+
* @param attachment The attachment to configure
|
|
31
|
+
* @param location Specifies where the image is being displayed
|
|
32
|
+
* @param element The default resizing logics reads the height/max-height and max-width propperties of this element and reduces file size based on the given values. File size reduction is done by Stream's CDN.
|
|
33
|
+
*/
|
|
34
|
+
getImageAttachmentConfiguration(attachment: Attachment, location: 'gallery' | 'single' | 'carousel', element: HTMLElement): ImageAttachmentConfiguration;
|
|
35
|
+
/**
|
|
36
|
+
* Handles the configuration for video attachments, it's possible to provide your own function to override the default logic
|
|
37
|
+
* @param attachment The attachment to configure
|
|
38
|
+
* @param element The default resizing logics reads the height/max-height and max-width propperties of this element and reduces file size based on the given values. File size reduction is done by Stream's CDN.
|
|
39
|
+
*/
|
|
40
|
+
getVideoAttachmentConfiguration(attachment: Attachment, element: HTMLElement): VideoAttachmentConfiguration;
|
|
41
|
+
/**
|
|
42
|
+
* Handles the configuration for giphy attachments, it's possible to provide your own function to override the default logic
|
|
43
|
+
* @param attachment The attachment to configure
|
|
44
|
+
*/
|
|
45
|
+
getGiphyAttachmentConfiguration(attachment: Attachment): AttachmentConfigration;
|
|
46
|
+
/**
|
|
47
|
+
* Handles the configuration for scraped image attachments, it's possible to provide your own function to override the default logic
|
|
48
|
+
* @param attachment The attachment to configure
|
|
49
|
+
*/
|
|
50
|
+
getScrapedImageAttachmentConfiguration(attachment: Attachment): AttachmentConfigration;
|
|
51
|
+
private addResizingParamsToUrl;
|
|
52
|
+
private getSizingRestrictions;
|
|
53
|
+
private getSizeRestrictions;
|
|
54
|
+
private getCSSSizeRestriction;
|
|
55
|
+
private getValueRepresentationOfCSSProperty;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentConfigurationService, never>;
|
|
57
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AttachmentConfigurationService>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Action, Attachment } from 'stream-chat';
|
|
3
|
+
import { ModalContext, AttachmentConfigration, VideoAttachmentConfiguration, ImageAttachmentConfiguration, AttachmentContext, CustomAttachmentListContext, GalleryAttachment } from '../types';
|
|
4
|
+
import { ChannelService } from '../channel.service';
|
|
5
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
6
|
+
import { AttachmentConfigurationService } from '../attachment-configuration.service';
|
|
7
|
+
import { MessageService } from '../message.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* The `AttachmentList` component displays the attachments of a message
|
|
11
|
+
*/
|
|
12
|
+
export declare class AttachmentListComponent implements OnChanges, OnInit, OnDestroy {
|
|
13
|
+
readonly customTemplatesService: CustomTemplatesService;
|
|
14
|
+
private channelService;
|
|
15
|
+
private attachmentConfigurationService;
|
|
16
|
+
private messageService;
|
|
17
|
+
/**
|
|
18
|
+
* The id of the message the attachments belong to
|
|
19
|
+
*/
|
|
20
|
+
messageId: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The parent id of the message the attachments belong to
|
|
23
|
+
*/
|
|
24
|
+
parentMessageId: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The attachments to display
|
|
27
|
+
*/
|
|
28
|
+
attachments: Attachment[];
|
|
29
|
+
/**
|
|
30
|
+
* Emits the state of the image carousel window
|
|
31
|
+
*/
|
|
32
|
+
readonly imageModalStateChange: EventEmitter<"closed" | "opened">;
|
|
33
|
+
class: string;
|
|
34
|
+
orderedAttachments: (Attachment | GalleryAttachment)[];
|
|
35
|
+
customAttachments: Attachment[];
|
|
36
|
+
imagesToView: Attachment[];
|
|
37
|
+
imagesToViewCurrentIndex: number;
|
|
38
|
+
customAttachmentsTemplate?: TemplateRef<CustomAttachmentListContext>;
|
|
39
|
+
private modalContent;
|
|
40
|
+
private attachmentConfigurations;
|
|
41
|
+
private subscriptions;
|
|
42
|
+
constructor(customTemplatesService: CustomTemplatesService, channelService: ChannelService, attachmentConfigurationService: AttachmentConfigurationService, messageService: MessageService);
|
|
43
|
+
trackByUrl: (_: number, attachment: Attachment | GalleryAttachment) => string | undefined;
|
|
44
|
+
ngOnInit(): void;
|
|
45
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
46
|
+
ngOnDestroy(): void;
|
|
47
|
+
isImage(attachment: Attachment): boolean;
|
|
48
|
+
isSvg(attachment: Attachment): boolean;
|
|
49
|
+
isFile(attachment: Attachment): boolean;
|
|
50
|
+
isGallery(attachment: Attachment): boolean;
|
|
51
|
+
isVideo(attachment: Attachment): boolean | "" | undefined;
|
|
52
|
+
isCard(attachment: Attachment): string | boolean | undefined;
|
|
53
|
+
isVoiceMessage(attachment: Attachment): boolean;
|
|
54
|
+
hasFileSize(attachment: Attachment): boolean | "" | 0 | undefined;
|
|
55
|
+
getFileSize(attachment: Attachment): string;
|
|
56
|
+
getModalContext(): ModalContext;
|
|
57
|
+
trimUrl(url?: string | null): string | null;
|
|
58
|
+
sendAction(action: Action): void;
|
|
59
|
+
trackByActionValue(_: number, item: Action): string | undefined;
|
|
60
|
+
openImageModal(attachments: Attachment[], selectedIndex?: number): void;
|
|
61
|
+
stepImages(dir: -1 | 1): void;
|
|
62
|
+
trackByImageUrl(_: number, item: Attachment): string | undefined;
|
|
63
|
+
getAttachmentContext(attachment: Attachment): AttachmentContext;
|
|
64
|
+
getImageAttachmentConfiguration(attachment: Attachment, type: 'gallery' | 'single', element: HTMLElement): ImageAttachmentConfiguration;
|
|
65
|
+
getCarouselImageAttachmentConfiguration(attachment: Attachment, element: HTMLElement): ImageAttachmentConfiguration;
|
|
66
|
+
getVideoAttachmentConfiguration(attachment: Attachment, element: HTMLElement): VideoAttachmentConfiguration;
|
|
67
|
+
getCardAttachmentConfiguration(attachment: Attachment): AttachmentConfigration;
|
|
68
|
+
isGalleryType(attachment: Attachment | GalleryAttachment): attachment is GalleryAttachment;
|
|
69
|
+
get isImageModalPrevButtonVisible(): boolean;
|
|
70
|
+
get isImageModalNextButtonVisible(): boolean;
|
|
71
|
+
private createGallery;
|
|
72
|
+
private closeImageModal;
|
|
73
|
+
private getAttachmentUrl;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentListComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentListComponent, "stream-attachment-list", never, { "messageId": { "alias": "messageId"; "required": false; }; "parentMessageId": { "alias": "parentMessageId"; "required": false; }; "attachments": { "alias": "attachments"; "required": false; }; }, { "imageModalStateChange": "imageModalStateChange"; }, never, ["*"], false, never>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AttachmentUpload, CustomAttachmentPreviewListContext } from '../types';
|
|
4
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
5
|
+
import { AttachmentService } from '../attachment.service';
|
|
6
|
+
import { Attachment } from 'stream-chat';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* The `AttachmentPreviewList` component displays a preview of the attachments uploaded to a message. Users can delete attachments using the preview component, or retry upload if it failed previously.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AttachmentPreviewListComponent implements OnInit, OnDestroy {
|
|
12
|
+
private customTemplateService;
|
|
13
|
+
readonly attachmentService: AttachmentService;
|
|
14
|
+
/**
|
|
15
|
+
* A stream that emits the current file uploads and their states
|
|
16
|
+
*/
|
|
17
|
+
attachmentUploads$: Observable<AttachmentUpload[]> | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* An output to notify the parent component if the user tries to retry a failed upload
|
|
20
|
+
*/
|
|
21
|
+
readonly retryAttachmentUpload: EventEmitter<File>;
|
|
22
|
+
/**
|
|
23
|
+
* An output to notify the parent component if the user wants to delete a file
|
|
24
|
+
*/
|
|
25
|
+
readonly deleteAttachment: EventEmitter<AttachmentUpload>;
|
|
26
|
+
customAttachments: Attachment[];
|
|
27
|
+
customAttachmentsPreview?: TemplateRef<CustomAttachmentPreviewListContext>;
|
|
28
|
+
private subscriptions;
|
|
29
|
+
constructor(customTemplateService: CustomTemplatesService, attachmentService: AttachmentService);
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
attachmentUploadRetried(file: File): void;
|
|
33
|
+
attachmentDeleted(upload: AttachmentUpload): void;
|
|
34
|
+
trackByFile(_: number, item: AttachmentUpload): File;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentPreviewListComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentPreviewListComponent, "stream-attachment-preview-list", never, { "attachmentUploads$": { "alias": "attachmentUploads$"; "required": false; }; }, { "retryAttachmentUpload": "retryAttachmentUpload"; "deleteAttachment": "deleteAttachment"; }, never, never, false, never>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
import { Attachment } from 'stream-chat';
|
|
3
|
+
import { ChannelService } from './channel.service';
|
|
4
|
+
import { NotificationService } from './notification.service';
|
|
5
|
+
import { AttachmentUpload, AudioRecording } from './types';
|
|
6
|
+
import { ChatClientService } from './chat-client.service';
|
|
7
|
+
import { MessageService } from './message.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* The `AttachmentService` manages the uploads of a message input.
|
|
11
|
+
*
|
|
12
|
+
* 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.
|
|
13
|
+
*/
|
|
14
|
+
export declare class AttachmentService {
|
|
15
|
+
private channelService;
|
|
16
|
+
private notificationService;
|
|
17
|
+
private chatClientService;
|
|
18
|
+
private messageService;
|
|
19
|
+
/**
|
|
20
|
+
* Emits the number of uploads in progress.
|
|
21
|
+
*
|
|
22
|
+
* You can increment and decrement this counter if you're using custom attachments and want to disable message sending until all attachments are uploaded.
|
|
23
|
+
*
|
|
24
|
+
* The SDK will handle updating this counter for built-in attachments, but for custom attachments you should take care of this.
|
|
25
|
+
*/
|
|
26
|
+
attachmentUploadInProgressCounter$: BehaviorSubject<number>;
|
|
27
|
+
/**
|
|
28
|
+
* Emits the state of the uploads ([`AttachmentUpload[]`](https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angular/src/lib/types.ts)), it adds a state (`success`, `error` or `uploading`) to each file the user selects for upload. It is used by the [`AttachmentPreviewList`](/chat/docs/sdk/angular/components/AttachmentPreviewListComponent/) to display the attachment previews.
|
|
29
|
+
*/
|
|
30
|
+
attachmentUploads$: Observable<AttachmentUpload[]>;
|
|
31
|
+
/**
|
|
32
|
+
* You can get and set the list if uploaded custom attachments
|
|
33
|
+
*
|
|
34
|
+
* By default the SDK components won't display these, but you can provide your own `customAttachmentPreviewListTemplate$` and `customAttachmentListTemplate$` for the [`CustomTemplatesService`](/chat/docs/sdk/angular/services/CustomTemplatesService/).
|
|
35
|
+
*/
|
|
36
|
+
customAttachments$: BehaviorSubject<Attachment[]>;
|
|
37
|
+
/**
|
|
38
|
+
* The current number of attachments
|
|
39
|
+
*/
|
|
40
|
+
attachmentsCounter$: Observable<number>;
|
|
41
|
+
/**
|
|
42
|
+
* The maximum number of attachments allowed for a message.
|
|
43
|
+
*
|
|
44
|
+
* The maximum is 30, you can set it to lower, but not higher.
|
|
45
|
+
*/
|
|
46
|
+
maxNumberOfAttachments: number;
|
|
47
|
+
private attachmentUploadsSubject;
|
|
48
|
+
private appSettings;
|
|
49
|
+
private attachmentLimitNotificationHide?;
|
|
50
|
+
constructor(channelService: ChannelService, notificationService: NotificationService, chatClientService: ChatClientService, messageService: MessageService);
|
|
51
|
+
/**
|
|
52
|
+
* Resets the attachments uploads (for example after the message with the attachments sent successfully)
|
|
53
|
+
*/
|
|
54
|
+
resetAttachmentUploads(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Upload a voice recording
|
|
57
|
+
* @param audioRecording
|
|
58
|
+
* @returns A promise with true or false. If false is returned the upload was canceled because of a client side error. The error is emitted via the `NotificationService`.
|
|
59
|
+
*/
|
|
60
|
+
uploadVoiceRecording(audioRecording: AudioRecording): Promise<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Uploads the selected files, and creates preview for image files. The result is propagated throught the `attachmentUploads$` stream.
|
|
63
|
+
* @param fileList The files selected by the user, if you have Blobs instead of Files, you can convert them with this method: https://developer.mozilla.org/en-US/docs/Web/API/File/File
|
|
64
|
+
* @returns A promise with true or false. If false is returned the upload was canceled because of a client side error. The error is emitted via the `NotificationService`.
|
|
65
|
+
*/
|
|
66
|
+
filesSelected(fileList: FileList | File[] | null): Promise<boolean | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* You can add custom `image`, `video` and `file` attachments using this method.
|
|
69
|
+
*
|
|
70
|
+
* Note: If you just want to use your own CDN for file uploads, you don't necessary need this method, you can just specify you own upload function in the [`ChannelService`](/chat/docs/sdk/angular/services/ChannelService/)
|
|
71
|
+
* @param attachment
|
|
72
|
+
*
|
|
73
|
+
* Will set `isCustomAttachment` to `true` on the attachment. This is a non-standard field, other SDKs will ignore this property.
|
|
74
|
+
*/
|
|
75
|
+
addAttachment(attachment: Attachment): void;
|
|
76
|
+
/**
|
|
77
|
+
* Retries to upload an attachment.
|
|
78
|
+
* @param file
|
|
79
|
+
* @returns A promise with the result
|
|
80
|
+
*/
|
|
81
|
+
retryAttachmentUpload(file: File): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Deletes an attachment, the attachment can have any state (`error`, `uploading` or `success`).
|
|
84
|
+
* @param upload
|
|
85
|
+
*/
|
|
86
|
+
deleteAttachment(upload: AttachmentUpload): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Maps the current uploads to a format that can be sent along with the message to the Stream API.
|
|
89
|
+
* @returns the attachments
|
|
90
|
+
*/
|
|
91
|
+
mapToAttachments(): Attachment[];
|
|
92
|
+
/**
|
|
93
|
+
* Maps attachments received from the Stream API to uploads. This is useful when editing a message.
|
|
94
|
+
* @param attachments Attachemnts received with the message
|
|
95
|
+
*/
|
|
96
|
+
createFromAttachments(attachments: Attachment[]): void;
|
|
97
|
+
private createPreview;
|
|
98
|
+
private uploadAttachments;
|
|
99
|
+
private areAttachmentsHaveValidExtension;
|
|
100
|
+
private areAttachmentsHaveValidSize;
|
|
101
|
+
private isWithinLimit;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentService, never>;
|
|
103
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AttachmentService>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Channel, User } from 'stream-chat';
|
|
3
|
+
import { ChatClientService } from '../chat-client.service';
|
|
4
|
+
import { AvatarLocation, AvatarType } from '../types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* The `Avatar` component displays the provided image, with fallback to the first letter of the optional name input.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AvatarComponent implements OnChanges, OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
10
|
+
private chatClientService;
|
|
11
|
+
private ngZone;
|
|
12
|
+
private cdRef;
|
|
13
|
+
/**
|
|
14
|
+
* An optional name of the image, used for fallback image or image title (if `imageUrl` is provided)
|
|
15
|
+
*/
|
|
16
|
+
name: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The URL of the image to be displayed. If the image can't be displayed the first letter of the name input is displayed.
|
|
19
|
+
*/
|
|
20
|
+
imageUrl: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The location the avatar will be displayed in
|
|
23
|
+
*/
|
|
24
|
+
location: AvatarLocation | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The channel the avatar belongs to (if avatar of a channel is displayed)
|
|
27
|
+
*/
|
|
28
|
+
channel?: Channel;
|
|
29
|
+
/**
|
|
30
|
+
* The user the avatar belongs to (if avatar of a user is displayed)
|
|
31
|
+
*/
|
|
32
|
+
user?: User;
|
|
33
|
+
/**
|
|
34
|
+
* The type of the avatar: channel if channel avatar is displayed, user if user avatar is displayed
|
|
35
|
+
*/
|
|
36
|
+
type: AvatarType | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* If a channel avatar is displayed, and if the channel has exactly two members a green dot is displayed if the other member is online. Set this flag to `false` to turn off this behavior.
|
|
39
|
+
*/
|
|
40
|
+
showOnlineIndicator: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* If channel/user image isn't provided the initials of the name of the channel/user is shown instead, you can choose how the initals should be computed
|
|
43
|
+
*/
|
|
44
|
+
initialsType: 'first-letter-of-first-word' | 'first-letter-of-each-word';
|
|
45
|
+
isError: boolean;
|
|
46
|
+
isOnline: boolean;
|
|
47
|
+
private isOnlineSubscription?;
|
|
48
|
+
initials: string;
|
|
49
|
+
fallbackChannelImage: string | undefined;
|
|
50
|
+
private userId?;
|
|
51
|
+
private isViewInited;
|
|
52
|
+
private subscriptions;
|
|
53
|
+
constructor(chatClientService: ChatClientService, ngZone: NgZone, cdRef: ChangeDetectorRef);
|
|
54
|
+
ngOnInit(): void;
|
|
55
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
56
|
+
ngOnDestroy(): void;
|
|
57
|
+
private setFallbackChannelImage;
|
|
58
|
+
private setInitials;
|
|
59
|
+
private updateIsOnlineSubscription;
|
|
60
|
+
ngAfterViewInit(): void;
|
|
61
|
+
private getOtherMemberIfOneToOneChannel;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "stream-avatar", never, { "name": { "alias": "name"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "location": { "alias": "location"; "required": false; }; "channel": { "alias": "channel"; "required": false; }; "user": { "alias": "user"; "required": false; }; "type": { "alias": "type"; "required": false; }; "showOnlineIndicator": { "alias": "showOnlineIndicator"; "required": false; }; "initialsType": { "alias": "initialsType"; "required": false; }; }, {}, never, never, false, never>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { Channel, User } from 'stream-chat';
|
|
3
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
4
|
+
import { AvatarContext, AvatarLocation, AvatarType } from '../types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* The `AvatarPlaceholder` component displays the [default avatar](/chat/docs/sdk/angular/components/AvatarComponent/) unless a [custom template](/chat/docs/sdk/angular/services/CustomTemplatesService/) is provided. This component is used by the SDK internally, you likely won't need to use it.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AvatarPlaceholderComponent implements OnChanges {
|
|
10
|
+
customTemplatesService: CustomTemplatesService;
|
|
11
|
+
/**
|
|
12
|
+
* An optional name of the image, used for fallback image or image title (if `imageUrl` is provided)
|
|
13
|
+
*/
|
|
14
|
+
name: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The URL of the image to be displayed. If the image can't be displayed the first letter of the name input is displayed.
|
|
17
|
+
*/
|
|
18
|
+
imageUrl: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The location the avatar will be displayed in
|
|
21
|
+
*/
|
|
22
|
+
location: AvatarLocation | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The channel the avatar belongs to (if avatar of a channel is displayed)
|
|
25
|
+
*/
|
|
26
|
+
channel?: Channel;
|
|
27
|
+
/**
|
|
28
|
+
* The user the avatar belongs to (if avatar of a user is displayed)
|
|
29
|
+
*/
|
|
30
|
+
user?: User;
|
|
31
|
+
/**
|
|
32
|
+
* The type of the avatar: channel if channel avatar is displayed, user if user avatar is displayed
|
|
33
|
+
*/
|
|
34
|
+
type: AvatarType | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* If channel/user image isn't provided the initials of the name of the channel/user is shown instead, you can choose how the initals should be computed
|
|
37
|
+
*/
|
|
38
|
+
initialsType: 'first-letter-of-first-word' | 'first-letter-of-each-word';
|
|
39
|
+
/**
|
|
40
|
+
* If a channel avatar is displayed, and if the channel has exactly two members a green dot is displayed if the other member is online. Set this flag to `false` to turn off this behavior.
|
|
41
|
+
*/
|
|
42
|
+
showOnlineIndicator: boolean;
|
|
43
|
+
context: AvatarContext;
|
|
44
|
+
constructor(customTemplatesService: CustomTemplatesService);
|
|
45
|
+
ngOnChanges(): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarPlaceholderComponent, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": { "alias": "name"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "location": { "alias": "location"; "required": false; }; "channel": { "alias": "channel"; "required": false; }; "user": { "alias": "user"; "required": false; }; "type": { "alias": "type"; "required": false; }; "initialsType": { "alias": "initialsType"; "required": false; }; "showOnlineIndicator": { "alias": "showOnlineIndicator"; "required": false; }; }, {}, never, never, false, never>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Observable, Subscription } from 'rxjs';
|
|
2
|
+
import { ChannelService } from '../channel.service';
|
|
3
|
+
import { ThemeService } from '../theme.service';
|
|
4
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* 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/).
|
|
8
|
+
*/
|
|
9
|
+
export declare class ChannelComponent {
|
|
10
|
+
private channelService;
|
|
11
|
+
private themeService;
|
|
12
|
+
readonly customTemplatesService: CustomTemplatesService;
|
|
13
|
+
isError$: Observable<boolean>;
|
|
14
|
+
isInitializing$: Observable<boolean>;
|
|
15
|
+
isActiveThread$: Observable<boolean>;
|
|
16
|
+
isActiveChannel$: Observable<boolean>;
|
|
17
|
+
subscriptions: Subscription[];
|
|
18
|
+
theme$: Observable<string>;
|
|
19
|
+
constructor(channelService: ChannelService, themeService: ThemeService, customTemplatesService: CustomTemplatesService);
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChannelComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChannelComponent, "stream-channel", never, {}, {}, never, ["*", "[name=\"thread\"]"], false, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Channel } from 'stream-chat';
|
|
3
|
+
import { ChannelService } from '../channel.service';
|
|
4
|
+
import { ChatClientService } from '../chat-client.service';
|
|
5
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
6
|
+
import { ChannelActionsContext, ChannelHeaderInfoContext } from '../types';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* 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/)
|
|
10
|
+
*/
|
|
11
|
+
export declare class ChannelHeaderComponent implements OnInit, OnDestroy {
|
|
12
|
+
private channelService;
|
|
13
|
+
private customTemplatesService;
|
|
14
|
+
private cdRef;
|
|
15
|
+
private chatClientService;
|
|
16
|
+
channelActionsTemplate?: TemplateRef<ChannelActionsContext>;
|
|
17
|
+
channelHeaderInfoTemplate?: TemplateRef<ChannelHeaderInfoContext>;
|
|
18
|
+
activeChannel: Channel | undefined;
|
|
19
|
+
canReceiveConnectEvents: boolean | undefined;
|
|
20
|
+
private subscriptions;
|
|
21
|
+
constructor(channelService: ChannelService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef, chatClientService: ChatClientService);
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
ngOnDestroy(): void;
|
|
24
|
+
getChannelActionsContext(): ChannelActionsContext;
|
|
25
|
+
getChannelInfoContext(): ChannelHeaderInfoContext;
|
|
26
|
+
get memberCountParam(): {
|
|
27
|
+
memberCount: number;
|
|
28
|
+
};
|
|
29
|
+
get watcherCountParam(): {
|
|
30
|
+
watcherCount: number;
|
|
31
|
+
};
|
|
32
|
+
get displayText(): string | undefined;
|
|
33
|
+
get avatarName(): string | undefined;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChannelHeaderComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChannelHeaderComponent, "stream-channel-header", never, {}, {}, never, ["*"], false, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnDestroy, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable, Subscription } from 'rxjs';
|
|
3
|
+
import { Channel } from 'stream-chat';
|
|
4
|
+
import { ChannelService } from '../channel.service';
|
|
5
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
6
|
+
import { ThemeService } from '../theme.service';
|
|
7
|
+
import { ChannelPreviewContext } from '../types';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* The `ChannelList` component renders the list of channels.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ChannelListComponent implements OnDestroy {
|
|
13
|
+
private channelService;
|
|
14
|
+
private customTemplatesService;
|
|
15
|
+
private themeService;
|
|
16
|
+
channels$: Observable<Channel[] | undefined>;
|
|
17
|
+
isError$: Observable<boolean>;
|
|
18
|
+
isInitializing$: Observable<boolean>;
|
|
19
|
+
isLoadingMoreChannels: boolean;
|
|
20
|
+
hasMoreChannels$: Observable<boolean>;
|
|
21
|
+
customChannelPreviewTemplate: TemplateRef<ChannelPreviewContext> | undefined;
|
|
22
|
+
theme$: Observable<string>;
|
|
23
|
+
subscriptions: Subscription[];
|
|
24
|
+
constructor(channelService: ChannelService, customTemplatesService: CustomTemplatesService, themeService: ThemeService);
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
loadMoreChannels(): Promise<void>;
|
|
27
|
+
trackByChannelId(_: number, item: Channel): string;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChannelListComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChannelListComponent, "stream-channel-list", never, {}, {}, never, ["[channel-list-top]", "[channel-list-bottom]"], false, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Channel, FormatMessageResponse } from 'stream-chat';
|
|
3
|
+
import { ChannelService } from '../channel.service';
|
|
4
|
+
import { ChatClientService } from '../chat-client.service';
|
|
5
|
+
import { MessageService } from '../message.service';
|
|
6
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
7
|
+
import { DateParserService } from '../date-parser.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* The `ChannelPreview` component displays a channel preview in the channel list, it consists of the image, name and latest message of the channel.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ChannelPreviewComponent implements OnInit, OnDestroy {
|
|
13
|
+
private channelService;
|
|
14
|
+
private ngZone;
|
|
15
|
+
private chatClientService;
|
|
16
|
+
customTemplatesService: CustomTemplatesService;
|
|
17
|
+
private dateParser;
|
|
18
|
+
/**
|
|
19
|
+
* The channel to be displayed
|
|
20
|
+
*/
|
|
21
|
+
channel: Channel | undefined;
|
|
22
|
+
isActive: boolean;
|
|
23
|
+
isUnreadMessageWasCalled: boolean;
|
|
24
|
+
isUnread: boolean;
|
|
25
|
+
unreadCount: number | undefined;
|
|
26
|
+
latestMessageText: string;
|
|
27
|
+
latestMessageStatus?: 'delivered' | 'read';
|
|
28
|
+
latestMessageTime?: string;
|
|
29
|
+
latestMessage?: FormatMessageResponse;
|
|
30
|
+
displayAs: 'text' | 'html';
|
|
31
|
+
userId?: string;
|
|
32
|
+
private subscriptions;
|
|
33
|
+
private canSendReadEvents;
|
|
34
|
+
constructor(channelService: ChannelService, ngZone: NgZone, chatClientService: ChatClientService, messageService: MessageService, customTemplatesService: CustomTemplatesService, dateParser: DateParserService);
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
ngOnDestroy(): void;
|
|
37
|
+
get avatarImage(): string | undefined;
|
|
38
|
+
get avatarName(): string | undefined;
|
|
39
|
+
get title(): string | undefined;
|
|
40
|
+
setAsActiveChannel(): void;
|
|
41
|
+
private handleMessageEvent;
|
|
42
|
+
private setLatestMessage;
|
|
43
|
+
private updateUnreadState;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChannelPreviewComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChannelPreviewComponent, "stream-channel-preview", never, { "channel": { "alias": "channel"; "required": false; }; }, {}, never, never, false, never>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Channel, ChannelFilters, ChannelOptions, ChannelSort } from 'stream-chat';
|
|
2
|
+
import { ChannelService } from './channel.service';
|
|
3
|
+
import { ChannelQueryResult, ChannelQueryType, NextPageConfiguration } from './types';
|
|
4
|
+
import { ChatClientService } from './chat-client.service';
|
|
5
|
+
/**
|
|
6
|
+
* This class allows you to make paginated channel query requests.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ChannelQuery {
|
|
9
|
+
private chatService;
|
|
10
|
+
private channelService;
|
|
11
|
+
private filters;
|
|
12
|
+
private sort;
|
|
13
|
+
private options;
|
|
14
|
+
/**
|
|
15
|
+
* By default the SDK uses an offset based pagination, you can change/extend this by providing your own custom paginator method.
|
|
16
|
+
*
|
|
17
|
+
* The method will be called with the result of the latest channel query.
|
|
18
|
+
*
|
|
19
|
+
* 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.
|
|
20
|
+
*/
|
|
21
|
+
customPaginator?: (channelQueryResult: Channel[]) => NextPageConfiguration;
|
|
22
|
+
private nextPageConfiguration?;
|
|
23
|
+
constructor(chatService: ChatClientService, channelService: ChannelService, filters: ChannelFilters, sort?: ChannelSort, options?: ChannelOptions);
|
|
24
|
+
query(queryType: ChannelQueryType): Promise<ChannelQueryResult>;
|
|
25
|
+
setNextPageConfiguration(channelQueryResult: Channel[]): void;
|
|
26
|
+
}
|