@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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { CustomMessageActionItem, MessageActionItem, MessageActionsClickDetails, MessageReactionActionItem, StreamMessage } from './types';
|
|
3
|
+
import { ChatClientService } from './chat-client.service';
|
|
4
|
+
import { NotificationService } from './notification.service';
|
|
5
|
+
import { ChannelService } from './channel.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* The message actions service provides customization options for the [message actions](/chat/docs/sdk/angular/components/MessageActionsBoxComponent)
|
|
9
|
+
*/
|
|
10
|
+
export declare class MessageActionsService {
|
|
11
|
+
private chatClientService;
|
|
12
|
+
private notificationService;
|
|
13
|
+
private channelService;
|
|
14
|
+
/**
|
|
15
|
+
* Default actions - these are the actions that are handled by the built-in component
|
|
16
|
+
*/
|
|
17
|
+
readonly defaultActions: (MessageActionItem | MessageReactionActionItem)[];
|
|
18
|
+
/**
|
|
19
|
+
* The built-in components will handle changes to this observable.
|
|
20
|
+
*/
|
|
21
|
+
messageToEdit$: BehaviorSubject<StreamMessage | undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* You can pass your own custom actions that will be displayed inside the built-in message actions component
|
|
24
|
+
*/
|
|
25
|
+
customActions$: BehaviorSubject<CustomMessageActionItem[]>;
|
|
26
|
+
/**
|
|
27
|
+
* By default the [`MessageComponent`](/chat/docs/sdk/angular/components/MessageComponent/) will display the [`MessageActionsBoxComponent`](/chat/docs/sdk/angular/components/MessageActionsBoxComponent/). You can override that behavior by providing your own event handler.
|
|
28
|
+
*/
|
|
29
|
+
customActionClickHandler?: (details: MessageActionsClickDetails) => void;
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
messageMenuOpenedFor$: BehaviorSubject<string | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
modalOpenedForMessage: BehaviorSubject<string | undefined>;
|
|
38
|
+
private hasDisplayedClipboardWarning;
|
|
39
|
+
constructor(chatClientService: ChatClientService, notificationService: NotificationService, channelService: ChannelService);
|
|
40
|
+
/**
|
|
41
|
+
* This method returns how many authorized actions are available to the given message
|
|
42
|
+
* @param message
|
|
43
|
+
* @param enabledActions
|
|
44
|
+
* @returns the count
|
|
45
|
+
*/
|
|
46
|
+
getAuthorizedMessageActionsCount(message: StreamMessage, enabledActions: string[]): number;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageActionsService, never>;
|
|
48
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MessageActionsService>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StreamMessage } from '../types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* The `MessageBlocked` component displays a message that has been blocked by moderation policies.
|
|
5
|
+
*/
|
|
6
|
+
export declare class MessageBlockedComponent {
|
|
7
|
+
/**
|
|
8
|
+
* The message that has been blocked.
|
|
9
|
+
*/
|
|
10
|
+
message: StreamMessage | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the message is the current user's own message.
|
|
13
|
+
*/
|
|
14
|
+
isMyMessage: boolean;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBlockedComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBlockedComponent, "stream-message-blocked", never, { "message": { "alias": "message"; "required": false; }; "isMyMessage": { "alias": "isMyMessage"; "required": false; }; }, {}, never, never, false, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { ChannelService } from '../channel.service';
|
|
3
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
4
|
+
import { MessageActionsService } from '../message-actions.service';
|
|
5
|
+
import { StreamMessage } from '../types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* The component watches for the [`channelService.bouncedMessage$` stream](/chat/docs/sdk/angular/services/ChannelService/#bouncedmessage) and opens the bounce modal if a message is emitted.
|
|
9
|
+
*
|
|
10
|
+
* To bounce messages, you need to set up [semantic filters for moderation](https://getstream.io/automated-moderation/docs/automod_configuration/?q=semantic%20filters).
|
|
11
|
+
*/
|
|
12
|
+
export declare class MessageBouncePromptComponent implements OnDestroy {
|
|
13
|
+
private channelService;
|
|
14
|
+
readonly customTemplatesService: CustomTemplatesService;
|
|
15
|
+
private messageActionsService;
|
|
16
|
+
class: string;
|
|
17
|
+
isModalOpen: boolean;
|
|
18
|
+
message?: StreamMessage;
|
|
19
|
+
private subscriptions;
|
|
20
|
+
constructor(channelService: ChannelService, customTemplatesService: CustomTemplatesService, messageActionsService: MessageActionsService);
|
|
21
|
+
messageBounceModalOpenChanged: (isOpen: boolean) => void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
resendMessage(): Promise<void>;
|
|
24
|
+
deleteMessage(): Promise<void>;
|
|
25
|
+
editMessage(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBouncePromptComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBouncePromptComponent, "stream-message-bounce-prompt", never, {}, {}, never, never, false, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { MentionConfig } from '@stream-io/angular-mentions';
|
|
3
|
+
import { MentionAutcompleteListItemContext, MentionAutcompleteListItem, CommandAutocompleteListItemContext } from '../../types';
|
|
4
|
+
import { UserResponse } from 'stream-chat';
|
|
5
|
+
import { ChannelService } from '../../channel.service';
|
|
6
|
+
import { TextareaInterface } from '../textarea.interface';
|
|
7
|
+
import { ChatClientService } from '../../chat-client.service';
|
|
8
|
+
import { TransliterationService } from '../../transliteration.service';
|
|
9
|
+
import { EmojiInputService } from '../emoji-input.service';
|
|
10
|
+
import { CustomTemplatesService } from '../../custom-templates.service';
|
|
11
|
+
import { MessageInputConfigService } from '../message-input-config.service';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
/**
|
|
14
|
+
* The `AutocompleteTextarea` component is used by the [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) component to display the input HTML element where users can type their message.
|
|
15
|
+
*/
|
|
16
|
+
export declare class AutocompleteTextareaComponent implements TextareaInterface, OnChanges, AfterViewInit {
|
|
17
|
+
private channelService;
|
|
18
|
+
private chatClientService;
|
|
19
|
+
private transliterationService;
|
|
20
|
+
private emojiInputService;
|
|
21
|
+
private customTemplatesService;
|
|
22
|
+
private cdRef;
|
|
23
|
+
private messageInputConfigService;
|
|
24
|
+
class: string;
|
|
25
|
+
/**
|
|
26
|
+
* The value of the input HTML element.
|
|
27
|
+
*/
|
|
28
|
+
value: string;
|
|
29
|
+
/**
|
|
30
|
+
* Placeholder of the textarea
|
|
31
|
+
*/
|
|
32
|
+
placeholder: string;
|
|
33
|
+
/**
|
|
34
|
+
* If true, users can mention other users in messages. You can also set this input on the [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/#inputs-and-outputs/) component.
|
|
35
|
+
*/
|
|
36
|
+
areMentionsEnabled: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* See [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService) for more information
|
|
39
|
+
*/
|
|
40
|
+
inputMode: 'desktop' | 'mobile';
|
|
41
|
+
/**
|
|
42
|
+
* The scope for user mentions, either members of the current channel of members of the application. You can also set this input on the [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/#inputs-and-outputs) component.
|
|
43
|
+
*/
|
|
44
|
+
mentionScope: 'channel' | 'application';
|
|
45
|
+
/**
|
|
46
|
+
* Enables or disables auto focus on the textarea element
|
|
47
|
+
*/
|
|
48
|
+
autoFocus: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Emits the current value of the input element when a user types.
|
|
51
|
+
*/
|
|
52
|
+
readonly valueChange: EventEmitter<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Emits when a user triggers a message send event (this happens when they hit the `Enter` key).
|
|
55
|
+
*/
|
|
56
|
+
readonly send: EventEmitter<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Emits the array of users that are mentioned in the message, it is updated when a user mentions a new user or deletes a mention.
|
|
59
|
+
*/
|
|
60
|
+
readonly userMentions: EventEmitter<UserResponse[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Emits any paste event that occured inside the textarea
|
|
63
|
+
*/
|
|
64
|
+
readonly pasteFromClipboard: EventEmitter<ClipboardEvent>;
|
|
65
|
+
mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
|
|
66
|
+
commandAutocompleteItemTemplate: TemplateRef<CommandAutocompleteListItemContext> | undefined;
|
|
67
|
+
private readonly autocompleteKey;
|
|
68
|
+
private readonly mentionTriggerChar;
|
|
69
|
+
private readonly commandTriggerChar;
|
|
70
|
+
autocompleteConfig: MentionConfig;
|
|
71
|
+
private messageInput;
|
|
72
|
+
private subscriptions;
|
|
73
|
+
private mentionedUsers;
|
|
74
|
+
private userMentionConfig;
|
|
75
|
+
private slashCommandConfig;
|
|
76
|
+
private searchTerm$;
|
|
77
|
+
private isViewInited;
|
|
78
|
+
constructor(channelService: ChannelService, chatClientService: ChatClientService, transliterationService: TransliterationService, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef, messageInputConfigService: MessageInputConfigService);
|
|
79
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
80
|
+
ngAfterViewInit(): void;
|
|
81
|
+
filter(searchString: string, items: {
|
|
82
|
+
autocompleteLabel: string;
|
|
83
|
+
}[]): {
|
|
84
|
+
autocompleteLabel: string;
|
|
85
|
+
}[];
|
|
86
|
+
itemSelectedFromAutocompleteList(item: MentionAutcompleteListItem, triggerChar?: string): string;
|
|
87
|
+
autcompleteSearchTermChanged(searchTerm: string): void;
|
|
88
|
+
inputChanged(): void;
|
|
89
|
+
inputLeft(): void;
|
|
90
|
+
enterHit(event: Event): void;
|
|
91
|
+
private adjustTextareaHeight;
|
|
92
|
+
private transliterate;
|
|
93
|
+
private updateMentionOptions;
|
|
94
|
+
private updateMentionedUsersFromText;
|
|
95
|
+
private updateCustomAutocompleteOptions;
|
|
96
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteTextareaComponent, never>;
|
|
97
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteTextareaComponent, "stream-autocomplete-textarea", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "areMentionsEnabled": { "alias": "areMentionsEnabled"; "required": false; }; "inputMode": { "alias": "inputMode"; "required": false; }; "mentionScope": { "alias": "mentionScope"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; "pasteFromClipboard": "pasteFromClipboard"; }, never, never, false, never>;
|
|
98
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* If you have an emoji picker in your application, you can propagate the selected emoji to the textarea using this service, more info can be found in [custom emoji picker guide](/chat/docs/sdk/angular/code-examples/emoji-picker/)
|
|
5
|
+
*/
|
|
6
|
+
export declare class EmojiInputService {
|
|
7
|
+
/**
|
|
8
|
+
* If you have an emoji picker in your application, you can propagate the selected emoji to the textarea using this Subject, more info can be found in [custom emoji picker guide](/chat/docs/sdk/angular/code-examples/emoji-picker/)
|
|
9
|
+
*/
|
|
10
|
+
emojiInput$: Subject<string>;
|
|
11
|
+
constructor();
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmojiInputService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EmojiInputService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { MessageInputComponent } from './message-input.component';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { CustomAutocomplete } from '../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* The `MessageInputConfigService` is used to keep a consistent configuration among the different [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) components if your UI has more than one input component.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MessageInputConfigService {
|
|
9
|
+
/**
|
|
10
|
+
* If file upload is enabled, the user can open a file selector from the input. Please note that the user also needs to have the necessary [channel capability](/chat/docs/javascript/channel_capabilities/).
|
|
11
|
+
*/
|
|
12
|
+
isFileUploadEnabled: boolean | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* If true, users can mention other users in messages. You also [need to use the `AutocompleteTextarea`](/chat/docs/sdk/angular/concepts/opt-in-architecture/) for this feature to work.
|
|
15
|
+
*/
|
|
16
|
+
areMentionsEnabled: boolean | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* If `false`, users can only upload one attachment per message
|
|
19
|
+
*/
|
|
20
|
+
isMultipleFileUploadEnabled: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The scope for user mentions, either members of the current channel of members of the application
|
|
23
|
+
*/
|
|
24
|
+
mentionScope: 'channel' | 'application' | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* In `desktop` mode the `Enter` key will trigger message sending, in `mobile` mode the `Enter` key will insert a new line to the message input.
|
|
27
|
+
*/
|
|
28
|
+
inputMode: 'desktop' | 'mobile';
|
|
29
|
+
/**
|
|
30
|
+
* If `true` the recording will be sent as a message immediately after the recording is completed.
|
|
31
|
+
* If `false`, the recording will added to the attachment preview, and users can continue composing the message.
|
|
32
|
+
*/
|
|
33
|
+
sendVoiceRecordingImmediately: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Override the message input's default event handler for [paste events](https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event)
|
|
36
|
+
*
|
|
37
|
+
* The event handler will receive the event object, and the [message input component](/chat/docs/sdk/angular/components/MessageInputComponent).
|
|
38
|
+
*
|
|
39
|
+
* You can use the public API of the message input component to update the composer. Typically you want to update the message text and/or attachments, this is how you can do these:
|
|
40
|
+
* - Change message text: `inputComponent.textareaValue = '<new value>'`
|
|
41
|
+
* - Upload file or image attachments: `inputComponent.attachmentService.filesSelected(<files>)`
|
|
42
|
+
* - Upload custom attachments: `inputComponent.attachmentService.customAttachments$.next(<custom attachments>)`
|
|
43
|
+
*/
|
|
44
|
+
customPasteEventHandler?: (event: ClipboardEvent, inputComponent: MessageInputComponent) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Add custom autocomplete configurations to the message input
|
|
47
|
+
*
|
|
48
|
+
* Only works when using StreamAutocompleteTextareaModule
|
|
49
|
+
*/
|
|
50
|
+
customAutocompletes$: BehaviorSubject<CustomAutocomplete[]>;
|
|
51
|
+
constructor();
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputConfigService, never>;
|
|
53
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MessageInputConfigService>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ComponentRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
|
+
import { Attachment, DraftMessagePayload, DraftResponse, UserResponse } from 'stream-chat';
|
|
4
|
+
import { AttachmentService } from '../attachment.service';
|
|
5
|
+
import { ChannelService } from '../channel.service';
|
|
6
|
+
import { NotificationService } from '../notification.service';
|
|
7
|
+
import { AttachmentPreviewListContext, AttachmentUpload, AudioRecording, CustomAttachmentUploadContext, EmojiPickerContext, MessageTextContext, StreamMessage } from '../types';
|
|
8
|
+
import { MessageInputConfigService } from './message-input-config.service';
|
|
9
|
+
import { TextareaInterface } from './textarea.interface';
|
|
10
|
+
import { EmojiInputService } from './emoji-input.service';
|
|
11
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
12
|
+
import { MessageActionsService } from '../message-actions.service';
|
|
13
|
+
import { VoiceRecorderService } from './voice-recorder.service';
|
|
14
|
+
import { AudioRecorderService } from '../voice-recorder/audio-recorder.service';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
/**
|
|
17
|
+
* The `MessageInput` component displays an input where users can type their messages and upload files, and sends the message to the active channel. The component can be used to compose new messages or update existing ones. To send messages, the chat user needs to have the necessary [channel capability](/chat/docs/javascript/channel_capabilities/).
|
|
18
|
+
*/
|
|
19
|
+
export declare class MessageInputComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
|
20
|
+
private channelService;
|
|
21
|
+
private notificationService;
|
|
22
|
+
readonly attachmentService: AttachmentService;
|
|
23
|
+
private configService;
|
|
24
|
+
private textareaType;
|
|
25
|
+
private cdRef;
|
|
26
|
+
private emojiInputService;
|
|
27
|
+
readonly customTemplatesService: CustomTemplatesService;
|
|
28
|
+
private messageActionsService;
|
|
29
|
+
readonly voiceRecorderService: VoiceRecorderService;
|
|
30
|
+
audioRecorder?: AudioRecorderService | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* If file upload is enabled, the user can open a file selector from the input. Please note that the user also needs to have the necessary [channel capability](/chat/docs/javascript/channel_capabilities/). If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
|
|
33
|
+
*/
|
|
34
|
+
isFileUploadEnabled: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* If true, users can mention other users in messages. You also [need to use the `AutocompleteTextarea`](/chat/docs/sdk/angular/concepts/opt-in-architecture/) for this feature to work. If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
|
|
37
|
+
*/
|
|
38
|
+
areMentionsEnabled: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The scope for user mentions, either members of the current channel of members of the application. If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
|
|
41
|
+
*/
|
|
42
|
+
mentionScope: 'channel' | 'application' | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Determines if the message is being dispalyed in a channel or in a [thread](/chat/docs/javascript/threads/).
|
|
45
|
+
*/
|
|
46
|
+
mode: 'thread' | 'main';
|
|
47
|
+
/**
|
|
48
|
+
* If true, users can select multiple files to upload. If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
|
|
49
|
+
*/
|
|
50
|
+
isMultipleFileUploadEnabled: boolean | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The message to edit
|
|
53
|
+
*/
|
|
54
|
+
message: StreamMessage | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* An observable that can be used to trigger message sending from the outside
|
|
57
|
+
*/
|
|
58
|
+
sendMessage$: Observable<void> | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* In `desktop` mode the `Enter` key will trigger message sending, in `mobile` mode the `Enter` key will insert a new line to the message input. If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
|
|
61
|
+
*/
|
|
62
|
+
inputMode: 'desktop' | 'mobile';
|
|
63
|
+
/**
|
|
64
|
+
* Enables or disables auto focus on the textarea element
|
|
65
|
+
*/
|
|
66
|
+
autoFocus: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* By default the input will react to changes in `messageToEdit$` from [`MessageActionsService`](/chat/docs/sdk/angular/services/MessageActionsService/) and display the message to be edited (taking into account the current `mode`).
|
|
69
|
+
*
|
|
70
|
+
* If you don't need that behavior, you can turn this of with this flag. In that case you should create your own edit message UI.
|
|
71
|
+
*/
|
|
72
|
+
watchForMessageToEdit: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Use this input to control wether a send button is rendered or not. If you don't render a send button, you can still trigger message send using the `sendMessage$` input.
|
|
75
|
+
*/
|
|
76
|
+
displaySendButton: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* You can enable/disable voice recordings with this input
|
|
79
|
+
*/
|
|
80
|
+
displayVoiceRecordingButton: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* You can enable/disable polls with this input
|
|
83
|
+
*/
|
|
84
|
+
displayPollCreateButton: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Emits when a message was successfuly sent or updated
|
|
87
|
+
*/
|
|
88
|
+
readonly messageUpdate: EventEmitter<{
|
|
89
|
+
message: StreamMessage;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Emits the messsage draft whenever the composed message changes.
|
|
93
|
+
* - If the user clears the message input, or sends the message, undefined is emitted.
|
|
94
|
+
* - If active channel changes, nothing is emitted.
|
|
95
|
+
*
|
|
96
|
+
* To save and fetch message drafts, you can use the [Stream message drafts API](https://getstream.io/chat/docs/javascript/drafts/).
|
|
97
|
+
*
|
|
98
|
+
* Message draft only works for new messages, nothing is emitted when input is in edit mode (if `message` input is set).
|
|
99
|
+
*
|
|
100
|
+
* To load a message draft into the input, use the `loadDraft` method.
|
|
101
|
+
* - If channel id doesn't match the active channel id, the draft is ignored.
|
|
102
|
+
* - If a thread message is loaded, and the input isn't in thread mode or parent ids don't match, the draft is ignored.
|
|
103
|
+
*/
|
|
104
|
+
readonly messageDraftChange: EventEmitter<DraftMessagePayload | undefined>;
|
|
105
|
+
voiceRecorderRef: TemplateRef<{
|
|
106
|
+
service: VoiceRecorderService;
|
|
107
|
+
}> | undefined;
|
|
108
|
+
class: string;
|
|
109
|
+
isVoiceRecording: boolean;
|
|
110
|
+
isFileUploadAuthorized: boolean | undefined;
|
|
111
|
+
canSendLinks: boolean | undefined;
|
|
112
|
+
canSendMessages: boolean | undefined;
|
|
113
|
+
canSendPolls: boolean | undefined;
|
|
114
|
+
attachmentUploads$: Observable<AttachmentUpload[]>;
|
|
115
|
+
customAttachments$: Observable<Attachment[]>;
|
|
116
|
+
attachmentUploadInProgressCounter$: Observable<number>;
|
|
117
|
+
textareaValue: string;
|
|
118
|
+
textareaRef: ComponentRef<TextareaInterface & Partial<OnChanges>> | undefined;
|
|
119
|
+
mentionedUsers: UserResponse[];
|
|
120
|
+
quotedMessage: undefined | StreamMessage;
|
|
121
|
+
typingStart$: Subject<void>;
|
|
122
|
+
cooldown$: Observable<number> | undefined;
|
|
123
|
+
isCooldownInProgress: boolean;
|
|
124
|
+
emojiPickerTemplate: TemplateRef<EmojiPickerContext> | undefined;
|
|
125
|
+
customAttachmentUploadTemplate: TemplateRef<CustomAttachmentUploadContext> | undefined;
|
|
126
|
+
attachmentPreviewListTemplate: TemplateRef<AttachmentPreviewListContext> | undefined;
|
|
127
|
+
textareaPlaceholder: string;
|
|
128
|
+
fileInputId: string;
|
|
129
|
+
isComposerOpen: boolean;
|
|
130
|
+
private fileInput;
|
|
131
|
+
private textareaAnchor;
|
|
132
|
+
private subscriptions;
|
|
133
|
+
private hideNotification;
|
|
134
|
+
private isViewInited;
|
|
135
|
+
private channel;
|
|
136
|
+
private sendMessageSubcription;
|
|
137
|
+
private readonly defaultTextareaPlaceholder;
|
|
138
|
+
private readonly slowModeTextareaPlaceholder;
|
|
139
|
+
private messageToEdit?;
|
|
140
|
+
private pollId;
|
|
141
|
+
private isChannelChangeResetInProgress;
|
|
142
|
+
private isSendingMessage;
|
|
143
|
+
private isLoadingDraft;
|
|
144
|
+
constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, cdRef: ChangeDetectorRef, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService, messageActionsService: MessageActionsService, voiceRecorderService: VoiceRecorderService, audioRecorder?: AudioRecorderService | undefined);
|
|
145
|
+
ngOnInit(): void;
|
|
146
|
+
ngAfterViewInit(): void;
|
|
147
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
148
|
+
ngOnDestroy(): void;
|
|
149
|
+
messageSent(): Promise<void>;
|
|
150
|
+
get containsLinks(): boolean;
|
|
151
|
+
get quotedMessageAttachments(): Attachment[];
|
|
152
|
+
get disabledTextareaText(): "" | "streamChat.You can't send thread replies in this channel" | "streamChat.You can't send messages in this channel";
|
|
153
|
+
itemsPasted(event: ClipboardEvent): void;
|
|
154
|
+
filesSelected(fileList: FileList | null): Promise<void>;
|
|
155
|
+
deselectMessageToQuote(): void;
|
|
156
|
+
deselectMessageToEdit(): void;
|
|
157
|
+
getEmojiPickerContext(): EmojiPickerContext;
|
|
158
|
+
getAttachmentPreviewListContext(): AttachmentPreviewListContext;
|
|
159
|
+
getAttachmentUploadContext(): CustomAttachmentUploadContext;
|
|
160
|
+
getQuotedMessageTextContext(): MessageTextContext;
|
|
161
|
+
startVoiceRecording(): Promise<void>;
|
|
162
|
+
openPollComposer(): void;
|
|
163
|
+
closePollComposer: () => void;
|
|
164
|
+
addPoll: (pollId: string) => void;
|
|
165
|
+
userMentionsChanged(userMentions: UserResponse[]): void;
|
|
166
|
+
updateMessageDraft(): void;
|
|
167
|
+
voiceRecordingReady(recording: AudioRecording): Promise<void>;
|
|
168
|
+
get isUpdate(): boolean;
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @param draft DraftResponse to load into the message input.
|
|
172
|
+
* - Draft messages are only supported for new messages, input is ignored in edit mode (if `message` input is set).
|
|
173
|
+
* - If channel id doesn't match the active channel id, the draft is ignored.
|
|
174
|
+
* - If a thread message is loaded, and the input isn't in thread mode or parent ids don't match, the draft is ignored.
|
|
175
|
+
*/
|
|
176
|
+
loadDraft(draft: DraftResponse): void;
|
|
177
|
+
private deleteUpload;
|
|
178
|
+
private retryUpload;
|
|
179
|
+
private clearFileInput;
|
|
180
|
+
private initTextarea;
|
|
181
|
+
private setCanSendMessages;
|
|
182
|
+
private get parentMessageId();
|
|
183
|
+
private startCooldown;
|
|
184
|
+
private stopCooldown;
|
|
185
|
+
private checkIfInEditMode;
|
|
186
|
+
private messageToUpdateChanged;
|
|
187
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, [null, null, null, null, null, null, null, null, null, null, { optional: true; }]>;
|
|
188
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": { "alias": "isFileUploadEnabled"; "required": false; }; "areMentionsEnabled": { "alias": "areMentionsEnabled"; "required": false; }; "mentionScope": { "alias": "mentionScope"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "isMultipleFileUploadEnabled": { "alias": "isMultipleFileUploadEnabled"; "required": false; }; "message": { "alias": "message"; "required": false; }; "sendMessage$": { "alias": "sendMessage$"; "required": false; }; "inputMode": { "alias": "inputMode"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "watchForMessageToEdit": { "alias": "watchForMessageToEdit"; "required": false; }; "displaySendButton": { "alias": "displaySendButton"; "required": false; }; "displayVoiceRecordingButton": { "alias": "displayVoiceRecordingButton"; "required": false; }; "displayPollCreateButton": { "alias": "displayPollCreateButton"; "required": false; }; }, { "messageUpdate": "messageUpdate"; "messageDraftChange": "messageDraftChange"; }, ["voiceRecorderRef"], ["[message-input-start]", "[message-input-end]"], false, never>;
|
|
189
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { EmojiInputService } from '../emoji-input.service';
|
|
3
|
+
import { TextareaInterface } from '../textarea.interface';
|
|
4
|
+
import { UserResponse } from 'stream-chat';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* The `Textarea` component is used by the [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) component to display the input HTML element where users can type their message.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TextareaComponent implements TextareaInterface, OnChanges, OnDestroy, AfterViewInit {
|
|
10
|
+
private emojiInputService;
|
|
11
|
+
class: string;
|
|
12
|
+
/**
|
|
13
|
+
* The value of the input HTML element.
|
|
14
|
+
*/
|
|
15
|
+
value: string;
|
|
16
|
+
/**
|
|
17
|
+
* Placeholder of the textarea
|
|
18
|
+
*/
|
|
19
|
+
placeholder: string;
|
|
20
|
+
/**
|
|
21
|
+
* See [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService) for more information
|
|
22
|
+
*/
|
|
23
|
+
inputMode: 'desktop' | 'mobile';
|
|
24
|
+
/**
|
|
25
|
+
* Enables or disables auto focus on the textarea element
|
|
26
|
+
*/
|
|
27
|
+
autoFocus: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Emits the current value of the input element when a user types.
|
|
30
|
+
*/
|
|
31
|
+
readonly valueChange: EventEmitter<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Emits when a user triggers a message send event (this happens when they hit the `Enter` key).
|
|
34
|
+
*/
|
|
35
|
+
readonly send: EventEmitter<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Emits any paste event that occured inside the textarea
|
|
38
|
+
*/
|
|
39
|
+
readonly pasteFromClipboard: EventEmitter<ClipboardEvent>;
|
|
40
|
+
private messageInput;
|
|
41
|
+
userMentions?: EventEmitter<UserResponse[]> | undefined;
|
|
42
|
+
areMentionsEnabled?: boolean | undefined;
|
|
43
|
+
mentionScope?: 'channel' | 'application' | undefined;
|
|
44
|
+
private subscriptions;
|
|
45
|
+
private isViewInited;
|
|
46
|
+
constructor(emojiInputService: EmojiInputService);
|
|
47
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
48
|
+
ngAfterViewInit(): void;
|
|
49
|
+
ngOnDestroy(): void;
|
|
50
|
+
inputChanged(): void;
|
|
51
|
+
enterHit(event: Event): void;
|
|
52
|
+
private adjustTextareaHeight;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "stream-textarea", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputMode": { "alias": "inputMode"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; }, { "valueChange": "valueChange"; "send": "send"; "pasteFromClipboard": "pasteFromClipboard"; }, never, never, false, never>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentRef, EventEmitter, OnChanges, SimpleChanges, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { UserResponse } from 'stream-chat';
|
|
3
|
+
import { TextareaInterface } from './textarea.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TextareaDirective implements OnChanges {
|
|
6
|
+
viewContainerRef: ViewContainerRef;
|
|
7
|
+
componentRef: ComponentRef<TextareaInterface & Partial<OnChanges>> | undefined;
|
|
8
|
+
areMentionsEnabled: boolean | undefined;
|
|
9
|
+
mentionScope?: 'channel' | 'application';
|
|
10
|
+
inputMode: 'mobile' | 'desktop';
|
|
11
|
+
value: string;
|
|
12
|
+
placeholder: string | undefined;
|
|
13
|
+
autoFocus: boolean;
|
|
14
|
+
readonly valueChange: EventEmitter<string>;
|
|
15
|
+
readonly send: EventEmitter<void>;
|
|
16
|
+
readonly userMentions: EventEmitter<UserResponse[]>;
|
|
17
|
+
readonly pasteFromClipboard: EventEmitter<ClipboardEvent>;
|
|
18
|
+
private subscriptions;
|
|
19
|
+
private unpropagatedChanges;
|
|
20
|
+
constructor(viewContainerRef: ViewContainerRef);
|
|
21
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaDirective, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TextareaDirective, "[streamTextarea]", never, { "componentRef": { "alias": "componentRef"; "required": false; }; "areMentionsEnabled": { "alias": "areMentionsEnabled"; "required": false; }; "mentionScope": { "alias": "mentionScope"; "required": false; }; "inputMode": { "alias": "inputMode"; "required": false; }; "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; "pasteFromClipboard": "pasteFromClipboard"; }, never, never, false, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { UserResponse } from 'stream-chat';
|
|
3
|
+
export interface TextareaInterface {
|
|
4
|
+
value: string;
|
|
5
|
+
valueChange: EventEmitter<string>;
|
|
6
|
+
send: EventEmitter<void>;
|
|
7
|
+
userMentions?: EventEmitter<UserResponse[]>;
|
|
8
|
+
pasteFromClipboard: EventEmitter<ClipboardEvent>;
|
|
9
|
+
areMentionsEnabled?: boolean;
|
|
10
|
+
mentionScope?: 'channel' | 'application';
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
inputMode?: 'mobile' | 'desktop';
|
|
13
|
+
autoFocus?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { AudioRecording } from '../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* The `VoiceRecorderService` provides a commincation outlet between the message input and voice recorder components.
|
|
6
|
+
*/
|
|
7
|
+
export declare class VoiceRecorderService {
|
|
8
|
+
/**
|
|
9
|
+
* Use this property to get/set if the recording component should be visible
|
|
10
|
+
*/
|
|
11
|
+
isRecorderVisible$: BehaviorSubject<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* The audio recording that was created
|
|
14
|
+
*/
|
|
15
|
+
recording$: BehaviorSubject<AudioRecording | undefined>;
|
|
16
|
+
constructor();
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VoiceRecorderService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VoiceRecorderService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GroupStyleOptions, StreamMessage } from '../types';
|
|
2
|
+
export type GroupStyle = '' | 'middle' | 'top' | 'bottom' | 'single';
|
|
3
|
+
export declare const getGroupStyles: (message: StreamMessage, previousMessage?: StreamMessage, nextMessage?: StreamMessage, options?: GroupStyleOptions) => GroupStyle;
|