@cometchat/skills 4.3.0 → 4.4.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/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +3 -2
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +258 -20
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +314 -35
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +140 -79
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
- package/skills/cometchat-native-calls/SKILL.md +29 -17
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +102 -33
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
- package/skills/cometchat-native-features/SKILL.md +24 -17
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
- package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +45 -5
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -1,706 +1,235 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cometchat-angular-components
|
|
3
|
-
description: "Component catalog for the CometChat Angular UI Kit
|
|
3
|
+
description: "Component catalog for the CometChat Angular UI Kit v5 (@cometchat/chat-uikit-angular@5) — standalone <cometchat-*> selectors, verified @Input bindings, @Output events, @Input callback props, and template slot views. Always loaded before writing any <cometchat-*> HTML. Never invent selectors or bindings — look them up here."
|
|
4
4
|
license: "MIT"
|
|
5
|
-
compatibility: "Angular >=
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
5
|
+
compatibility: "Angular >=17 <22; @cometchat/chat-uikit-angular ^5.0"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
|
-
version: "
|
|
10
|
-
tags: "cometchat angular components catalog
|
|
8
|
+
version: "4.0.0"
|
|
9
|
+
tags: "cometchat angular components catalog selectors inputs outputs standalone v5"
|
|
11
10
|
---
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
> **Ground truth:** `@cometchat/chat-uikit-angular@5.x` component catalog (installed package types) + `docs/ui-kit/angular`. **Official docs:** https://www.cometchat.com/docs/ui-kit/angular/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
# CometChat Angular UI Kit v5 — Component Catalog
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
Authoritative reference for every component you'll actually use. Verified against `@cometchat/chat-uikit-angular@5.0.2` bundled types. **Never invent a selector, `@Input`, or `@Output` — look it up here** (or grep `node_modules/@cometchat/chat-uikit-angular/types/cometchat-chat-uikit-angular.d.ts`).
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Read `<cometchat-angular-core>` first.
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## How to use this catalog
|
|
24
|
-
|
|
25
|
-
Angular UI Kit components are Angular standalone components that render as custom HTML elements. Three patterns cover almost every use case:
|
|
26
|
-
|
|
27
|
-
| Pattern | Components | Use when |
|
|
28
|
-
|---|---|---|
|
|
29
|
-
| **Composite (quickest)** | `<cometchat-conversations-with-messages>` — renders a 3-panel layout (Conversations + Messages + Details) in one tag | Full-page route placements with **≥ 1024px** of horizontal space. The composite reserves room for a Details panel — in narrower containers (modals, sidebars, drawers) the Details slot stays empty and the layout looks broken. |
|
|
30
|
-
| **Two-pane (custom layout)** | `<cometchat-conversations>` + `<cometchat-messages>` side by side | Modal / dialog / sidebar / drawer placements (anywhere narrower than ~1024px). You wire the click handler from Conversations to set the active user/group on Messages. |
|
|
31
|
-
| **Granular (full control)** | `<cometchat-message-header>` + `<cometchat-message-list>` + `<cometchat-message-composer>` | Embedded chat surfaces with no inbox — e.g. a "Contact seller" modal that opens a 1:1 thread directly, or a per-page chat panel pinned to a specific user/group. |
|
|
32
|
-
|
|
33
|
-
**Data flow:** a list component calls the `[onItemClick]` Input callback with a `CometChat.Conversation` / `User` / `Group`. Extract the entity and pass it as `[user]` or `[group]` to the message components.
|
|
20
|
+
## How v5 components work
|
|
34
21
|
|
|
35
|
-
|
|
22
|
+
- **Standalone.** Import the component **class** (with the `Component` suffix) into a standalone component's `imports: []`. No NgModule, no `CUSTOM_ELEMENTS_SCHEMA`.
|
|
23
|
+
- **Selector vs class:** the HTML selector has no suffix (`<cometchat-conversations>`); the class does (`CometChatConversationsComponent`).
|
|
24
|
+
- **No composites.** There is no `<cometchat-conversations-with-messages>` / `Contacts` in v5. Build layouts by composing components (see `<cometchat-angular-placement>`).
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
### Three binding mechanisms — get these right
|
|
38
27
|
|
|
39
|
-
|
|
|
28
|
+
| Mechanism | Syntax | Example |
|
|
40
29
|
|---|---|---|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
| **
|
|
45
|
-
| **Style object** | `[componentStyle]="styleInstance"` | `[conversationsStyle]="myStyle"` |
|
|
46
|
-
|
|
47
|
-
> **Critical — `on*` props are `@Input()` callbacks, NOT `@Output()` events.** Use `[onItemClick]="myFn"` (square brackets), never `(onItemClick)="myFn($event)"` (round brackets). This applies to every `on*` prop across all CometChat components: `[onItemClick]`, `[onError]`, `[onSelect]`, `[onSendButtonClick]`, `[onAccept]`, `[onDecline]`, `[onVoiceCallClick]`, `[onVideoCallClick]`, etc.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## 1. Composite Components
|
|
52
|
-
|
|
53
|
-
### CometChatConversationsWithMessages
|
|
30
|
+
| **`@Input`** (data + config + hide flags) | `[input]="value"` | `[user]="selectedUser"` |
|
|
31
|
+
| **`@Output`** (EventEmitter) | `(output)="handler($event)"` | `(itemClick)="onPick($event)"` |
|
|
32
|
+
| **`@Input` callback prop** (a function passed as input) | `[onCallback]="fnRef"` | `[onAccept]="handleAccept"` |
|
|
33
|
+
| **Slot view** (`@Input` of type `TemplateRef`/component) | `[slotView]="tmplRef"` | `[leadingView]="myTmpl"` |
|
|
54
34
|
|
|
55
|
-
The
|
|
56
|
-
|
|
57
|
-
> **⚠️ Width requirement: ≥ 1024px.** This composite renders a 3-panel layout (Conversations + Messages + Details). Below ~1024px of available width, the Details panel stays empty and visible — the layout looks broken with whitespace where Details should be. **Do not use this composite inside a modal, dialog, drawer, or sidebar** unless the container is at least 1024px wide. Use the Two-pane pattern (`<cometchat-conversations>` + `<cometchat-messages>`) for narrower placements (see § *Two-pane modal layout* in `cometchat-angular-placement`).
|
|
58
|
-
|
|
59
|
-
```html
|
|
60
|
-
<!-- app.component.html — full-page route placement only -->
|
|
61
|
-
<cometchat-conversations-with-messages></cometchat-conversations-with-messages>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
// app.module.ts
|
|
66
|
-
import { CometChatConversationsWithMessages } from "@cometchat/chat-uikit-angular";
|
|
67
|
-
@NgModule({ imports: [CometChatConversationsWithMessages], schemas: [CUSTOM_ELEMENTS_SCHEMA] })
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Key inputs: `[conversationsWithMessagesStyle]`, `[messagesConfiguration]`, `[conversationsConfiguration]`.
|
|
71
|
-
|
|
72
|
-
### CometChatUsersWithMessages
|
|
73
|
-
|
|
74
|
-
Renders a users list + message thread.
|
|
75
|
-
|
|
76
|
-
```html
|
|
77
|
-
<cometchat-users-with-messages></cometchat-users-with-messages>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### CometChatGroupsWithMessages
|
|
81
|
-
|
|
82
|
-
Renders a groups list + message thread.
|
|
83
|
-
|
|
84
|
-
```html
|
|
85
|
-
<cometchat-groups-with-messages></cometchat-groups-with-messages>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## 2. Lists
|
|
91
|
-
|
|
92
|
-
### CometChatConversations
|
|
93
|
-
|
|
94
|
-
Scrollable list of recent conversations (user + group).
|
|
95
|
-
|
|
96
|
-
```html
|
|
97
|
-
<cometchat-conversations
|
|
98
|
-
[conversationsRequestBuilder]="conversationsRequestBuilder"
|
|
99
|
-
[onItemClick]="handleConvClick"
|
|
100
|
-
[onError]="handleError"
|
|
101
|
-
title="Chats"
|
|
102
|
-
[hideReceipt]="false"
|
|
103
|
-
[hideSeparator]="false"
|
|
104
|
-
[disableUsersPresence]="false"
|
|
105
|
-
></cometchat-conversations>
|
|
106
|
-
```
|
|
35
|
+
> **The `@Output` vs `@Input`-callback distinction is the #1 Angular-v5 trap.** Most components use `@Output` EventEmitters (`(itemClick)`, `(error)`, `(callEnded)`). But the **call** components also expose **`@Input` callback props** (`onAccept`, `onDecline`, `onError`, `onVoiceCallClick`, …). And `<cometchat-incoming-call>` exposes **both** (`[onAccept]` input AND `(callAccepted)` output). Bind the one that exists — the tables below mark which is which.
|
|
107
36
|
|
|
108
37
|
```typescript
|
|
109
38
|
import { Component } from "@angular/core";
|
|
39
|
+
import { CometChatConversationsComponent } from "@cometchat/chat-uikit-angular";
|
|
110
40
|
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
111
41
|
|
|
112
|
-
@Component({
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
42
|
+
@Component({
|
|
43
|
+
selector: "app-conversations",
|
|
44
|
+
standalone: true,
|
|
45
|
+
imports: [CometChatConversationsComponent],
|
|
46
|
+
template: `
|
|
47
|
+
<cometchat-conversations
|
|
48
|
+
[showSearchBar]="true"
|
|
49
|
+
(itemClick)="onConversation($event)"
|
|
50
|
+
(error)="onError($event)">
|
|
51
|
+
</cometchat-conversations>`,
|
|
52
|
+
})
|
|
53
|
+
export class AppConversationsComponent {
|
|
54
|
+
onConversation(conversation: CometChat.Conversation) { /* … */ }
|
|
55
|
+
onError(e: CometChat.CometChatException) { /* … */ }
|
|
125
56
|
}
|
|
126
57
|
```
|
|
127
58
|
|
|
128
|
-
Key inputs: `[conversationsRequestBuilder]`, `[onItemClick]`, `[onSelect]`, `[onError]`, `title`, `[hideReceipt]`, `[hideSeparator]`, `[disableUsersPresence]`, `[disableTyping]`, `[disableMentions]`, `[activeConversation]`, `[listItemView]`, `[menu]`, `[options]`, `[textFormatters]`, `[conversationsStyle]`, `[avatarStyle]`, `[statusIndicatorStyle]`, `[badgeStyle]`, `[dateStyle]`, `[listItemStyle]`.
|
|
129
|
-
|
|
130
|
-
### CometChatUsers
|
|
131
|
-
|
|
132
|
-
```html
|
|
133
|
-
<cometchat-users
|
|
134
|
-
[usersRequestBuilder]="usersRequestBuilder"
|
|
135
|
-
[onItemClick]="handleUserClick"
|
|
136
|
-
[hideStatus]="false"
|
|
137
|
-
[hideSearch]="false"
|
|
138
|
-
></cometchat-users>
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Key inputs: `[usersRequestBuilder]`, `[onItemClick]`, `[onSelect]`, `[onError]`, `title`, `[hideStatus]`, `[hideSearch]`, `[listItemView]`, `[menu]`, `[options]`, `[usersStyle]`, `[avatarStyle]`, `[statusIndicatorStyle]`, `[listItemStyle]`.
|
|
142
|
-
|
|
143
|
-
### CometChatGroups
|
|
144
|
-
|
|
145
|
-
```html
|
|
146
|
-
<cometchat-groups
|
|
147
|
-
[groupsRequestBuilder]="groupsRequestBuilder"
|
|
148
|
-
[onItemClick]="handleGroupClick"
|
|
149
|
-
></cometchat-groups>
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Key inputs: `[groupsRequestBuilder]`, `[onItemClick]`, `[onSelect]`, `[onError]`, `title`, `[hideSearch]`, `[listItemView]`, `[menu]`, `[options]`, `[groupsStyle]`, `[avatarStyle]`, `[listItemStyle]`.
|
|
153
|
-
|
|
154
|
-
### CometChatGroupMembers
|
|
155
|
-
|
|
156
|
-
```html
|
|
157
|
-
<cometchat-group-members
|
|
158
|
-
[group]="selectedGroup"
|
|
159
|
-
[groupMemberRequestBuilder]="memberRequestBuilder"
|
|
160
|
-
[onItemClick]="handleMemberClick"
|
|
161
|
-
[options]="getMemberOptions"
|
|
162
|
-
></cometchat-group-members>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Key inputs: `[group]` (**required** — pass a `CometChat.Group` instance), `[groupMemberRequestBuilder]`, `[onItemClick]`, `[onBack]`, `[onClose]`, `[options]`, `[groupMembersStyle]`, `[hideSearch]`, `[selectionMode]`, `[disableUsersPresence]`.
|
|
166
|
-
|
|
167
59
|
---
|
|
168
60
|
|
|
169
|
-
##
|
|
170
|
-
|
|
171
|
-
### CometChatMessages
|
|
172
|
-
|
|
173
|
-
Composite message view — header + list + composer in one component.
|
|
61
|
+
## List components
|
|
174
62
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
[user]="selectedUser"
|
|
178
|
-
[messageHeaderConfiguration]="headerConfig"
|
|
179
|
-
[messageListConfiguration]="listConfig"
|
|
180
|
-
[messageComposerConfiguration]="composerConfig"
|
|
181
|
-
></cometchat-messages>
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
Key inputs: `[user]` OR `[group]` (one required), `[messageHeaderConfiguration]`, `[messageListConfiguration]`, `[messageComposerConfiguration]`, `[messagesStyle]`.
|
|
185
|
-
|
|
186
|
-
### CometChatMessageHeader
|
|
63
|
+
### CometChatConversationsComponent
|
|
64
|
+
Selector: `<cometchat-conversations>`
|
|
187
65
|
|
|
188
|
-
|
|
189
|
-
<cometchat-message-header
|
|
190
|
-
[user]="selectedUser"
|
|
191
|
-
[onBack]="handleBack"
|
|
192
|
-
[hideBackButton]="false"
|
|
193
|
-
[menu]="menuTemplate"
|
|
194
|
-
></cometchat-message-header>
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Key inputs: `[user]` OR `[group]`, `[onBack]`, `[hideBackButton]`, `[menu]`, `[subtitleView]`, `[listItemView]`, `[messageHeaderStyle]`, `[avatarStyle]`, `[statusIndicatorStyle]`, `[disableUsersPresence]`, `[disableTyping]`.
|
|
66
|
+
The conversation list. Drives the left pane of a chat layout.
|
|
198
67
|
|
|
199
|
-
|
|
68
|
+
- **Key `@Input`:** `conversationsRequestBuilder`, `activeConversation`, `selectionMode`, `options`, `showSearchBar`, `showScrollbar`, `lastMessageDateTimeFormat`, `textFormatters`, `disableSoundForMessages`, `customSoundForMessages`
|
|
69
|
+
- **Hide flags:** `hideReceipts`, `hideError`, `hideDeleteConversation`, `hideUserStatus`, `hideGroupType`, `disableDefaultContextMenu`
|
|
70
|
+
- **Slot views (`@Input`):** `headerView`, `menuView`, `loadingView`, `emptyView`, `errorView`, `searchView`, `itemView`, `leadingView`, `titleView`, `subtitleView`, `trailingView`
|
|
71
|
+
- **`@Output`:** `itemClick`, `select`, `error`, `searchBarClick`, `contextMenuOpen`, `contextMenuClose`, `scrollToTop`, `scrollToBottom`, `selectionChange`
|
|
200
72
|
|
|
201
|
-
###
|
|
73
|
+
### CometChatUsersComponent
|
|
74
|
+
Selector: `<cometchat-users>`
|
|
202
75
|
|
|
203
|
-
|
|
76
|
+
- **`@Input`:** `usersRequestBuilder`, `searchRequestBuilder`, `searchKeyword`, `activeUser`, `selectionMode`, `options`, `showSectionHeader`, `sectionHeaderKey`, `showScrollbar`, `showSelectedUsersPreview`
|
|
77
|
+
- **Hide flags:** `hideSearch`, `hideError`, `hideUserStatus`, `disableLoadingState`, `disableDefaultContextMenu`
|
|
78
|
+
- **Slots:** `headerView`, `menuView`, `loadingView`, `emptyView`, `errorView`, `itemView`, `leadingView`, `titleView`, `subtitleView`, `trailingView`
|
|
79
|
+
- **`@Output`:** `itemClick`, `select`, `error`, `empty`, `selectionChange`
|
|
204
80
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
[user]="selectedUser"
|
|
208
|
-
[messagesRequestBuilder]="messagesRequestBuilder"
|
|
209
|
-
[hideReceipt]="false"
|
|
210
|
-
[disableReactions]="false"
|
|
211
|
-
[textFormatters]="textFormatters"
|
|
212
|
-
[templates]="messageTemplates"
|
|
213
|
-
[onThreadRepliesClick]="openThread"
|
|
214
|
-
[onError]="handleError"
|
|
215
|
-
></cometchat-message-list>
|
|
216
|
-
```
|
|
81
|
+
### CometChatGroupsComponent
|
|
82
|
+
Selector: `<cometchat-groups>`
|
|
217
83
|
|
|
218
|
-
|
|
84
|
+
- **`@Input`:** `groupsRequestBuilder`, `searchRequestBuilder`, `activeGroup`, `selectionMode`, `options`, `showScrollbar`
|
|
85
|
+
- **Hide flags:** `hideSearch`, `hideError`, `hideGroupType`, `disableDefaultContextMenu`
|
|
86
|
+
- **Slots:** `headerView`, `menuView`, `loadingView`, `emptyView`, `errorView`, `itemView`, `leadingView`, `titleView`, `subtitleView`, `trailingView`
|
|
87
|
+
- **`@Output`:** `itemClick`, `select`, `error`, `selectionChange`
|
|
219
88
|
|
|
220
|
-
|
|
89
|
+
### CometChatGroupMembersComponent
|
|
90
|
+
Selector: `<cometchat-group-members>`
|
|
221
91
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
Rich text input. Attachments, mentions, voice notes, sticker picker.
|
|
227
|
-
|
|
228
|
-
```html
|
|
229
|
-
<cometchat-message-composer
|
|
230
|
-
[user]="selectedUser"
|
|
231
|
-
placeholderText="Type a message..."
|
|
232
|
-
[textFormatters]="textFormatters"
|
|
233
|
-
[attachmentOptions]="attachmentOptions"
|
|
234
|
-
[onSendButtonClick]="handleSend"
|
|
235
|
-
[onError]="handleError"
|
|
236
|
-
[auxilaryButtonView]="auxButtonTemplate"
|
|
237
|
-
></cometchat-message-composer>
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Key inputs: `[user]` OR `[group]`, `[parentMessageId]` (for thread composer), `placeholderText`, `[textFormatters]`, `[attachmentOptions]`, `[auxilaryButtonView]` (**note spelling: one `i` — `auxilary` not `auxiliary`**), `[headerView]`, `[sendButtonView]`, `[onSendButtonClick]` (Input callback), `[onError]` (Input callback), `[onTextChange]` (Input callback), `[disableMentions]`, `[disableSoundForMessages]`, `[messageComposerStyle]`.
|
|
241
|
-
|
|
242
|
-
> **Important — all `on*` props are `@Input()` callbacks, not `@Output()` events.** Use `[onSendButtonClick]="myFn"` (square brackets), never `(onSendButtonClick)="myFn($event)"` (round brackets). The same applies to `[onError]` and `[onTextChange]`.
|
|
92
|
+
- **`@Input`:** `group` (required), `groupMemberRequestBuilder`, `searchRequestBuilder`, `searchKeyword`, `selectionMode`, `options`, `showScrollbar`
|
|
93
|
+
- **Hide flags:** `hideSearch`, `hideError`, `hideUserStatus`, `hideKickMemberOption`, `hideBanMemberOption`, `hideScopeChangeOption`, `disableLoadingState`, `disableDefaultContextMenu`
|
|
94
|
+
- **Slots:** `headerView`, `menuView`, `loadingView`, `errorView`, `emptyView`, `itemView`, `leadingView`, `titleView`, `subtitleView`, `trailingView`
|
|
95
|
+
- **`@Output`:** `error`, `itemClick`, `selectionChange`, `empty`
|
|
243
96
|
|
|
244
97
|
---
|
|
245
98
|
|
|
246
|
-
##
|
|
99
|
+
## Messaging components
|
|
247
100
|
|
|
248
|
-
|
|
101
|
+
### CometChatMessageHeaderComponent
|
|
102
|
+
Selector: `<cometchat-message-header>`
|
|
249
103
|
|
|
250
|
-
|
|
104
|
+
Header bar above the message list. Pass **`user` OR `group`** (mutually exclusive).
|
|
251
105
|
|
|
252
|
-
|
|
106
|
+
- **`@Input`:** `user`, `group`, `callSettingsBuilder`, `lastActiveAtDateTimeFormat`, `summaryGenerationMessageCount`, `enableAutoSummaryGeneration`
|
|
107
|
+
- **Show/hide:** `hideUserStatus`, `showBackButton`, `hideVoiceCallButton`, `hideVideoCallButton`, `showSearchOption`, `showConversationSummaryButton`
|
|
108
|
+
- **Slots:** `headerView`, `itemView`, `leadingView`, `titleView`, `subtitleView`, `trailingView`, `backButtonView`, `auxiliaryButtonView`
|
|
109
|
+
- **`@Output`:** `backClick`, `itemClick`, `searchClick`, `conversationSummaryClick`, `error`, `voiceCallClick`, `videoCallClick`
|
|
253
110
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
[user]="selectedUser"
|
|
257
|
-
[onVoiceCallClick]="handleVoiceCall"
|
|
258
|
-
[onVideoCallClick]="handleVideoCall"
|
|
259
|
-
></cometchat-call-buttons>
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
> **All `on*` props are `@Input()` callbacks.** Use `[onVoiceCallClick]="myFn"` (square brackets), never `(onVoiceCallClick)="myFn($event)"` (round brackets).
|
|
111
|
+
### CometChatMessageListComponent
|
|
112
|
+
Selector: `<cometchat-message-list>`
|
|
263
113
|
|
|
264
|
-
|
|
114
|
+
The message stream. Pass **`user` OR `group`** (and `parentMessageId` for threads).
|
|
265
115
|
|
|
266
|
-
|
|
116
|
+
- **Key `@Input`:** `user`, `group`, `parentMessageId`, `messagesRequestBuilder`, `reactionsRequestBuilder`, `textFormatters`, `messageAlignment`, `scrollToBottomOnNewMessages`, `goToMessageId`, `quickOptionsCount`, `additionalOptions`, `optionsOverride`
|
|
117
|
+
- **AI/replies:** `showConversationStarters`, `showSmartReplies`, `smartRepliesKeywords`, `smartRepliesDelayDuration`
|
|
118
|
+
- **Hide flags (many):** `hideReceipts`, `hideDateSeparator`, `hideStickyDate`, `hideAvatar`, `hideGroupActionMessages`, `hideError`, `hideReplyInThreadOption`, `hideTranslateMessageOption`, `hideEditMessageOption`, `hideDeleteMessageOption`, `hideReactionOption`, `hideMessagePrivatelyOption`, `hideCopyMessageOption`, `hideMessageInfoOption`, `hideReplyOption`, `hideTimestamp`, `hideModerationView`, `hideFlagMessageOption`, `showMarkAsUnreadOption`, `startFromUnreadMessages`, `disableInteraction`
|
|
119
|
+
- **Slots:** `headerView`, `footerView`, `emptyView`, `errorView`, `loadingView`, `bubbleFooterView`, `appendView`
|
|
120
|
+
- **`@Output`:** `error`, `threadRepliesClick`, `reactionClick`, `reactionListItemClick`, `smartReplyClick`, `conversationStarterClick`, `messagePrivatelyClick`, `replyClick`
|
|
267
121
|
|
|
268
|
-
|
|
122
|
+
### CometChatMessageComposerComponent
|
|
123
|
+
Selector: `<cometchat-message-composer>`
|
|
269
124
|
|
|
270
|
-
|
|
271
|
-
<cometchat-incoming-call
|
|
272
|
-
[call]="incomingCall"
|
|
273
|
-
[onAccept]="handleAccept"
|
|
274
|
-
[onDecline]="handleDecline"
|
|
275
|
-
></cometchat-incoming-call>
|
|
276
|
-
```
|
|
125
|
+
The input box. Pass **`user` OR `group`** (and `parentMessageId` for threads).
|
|
277
126
|
|
|
278
|
-
|
|
127
|
+
- **Key `@Input`:** `user`, `group`, `parentMessageId`, `placeholderText`, `initialComposerText`, `text`, `maxHeight`, `enterKeyBehavior`, `attachmentOptions`, `maxAttachments`, `allowedFileTypes`, `maxFileSize`, `layout`, `textFormatters`, `messageToEdit`, `messageToReply`, `mentionsUsersRequestBuilder`, `mentionsGroupMembersRequestBuilder`
|
|
128
|
+
- **Hide flags:** `hideAttachmentButton`, `hideImageAttachmentOption`, `hideVideoAttachmentOption`, `hideAudioAttachmentOption`, `hideFileAttachmentOption`, `hidePollsOption`, `hideCollaborativeDocumentOption`, `hideCollaborativeWhiteboardOption`, `hideEmojiKeyboardButton`, `hideVoiceRecordingButton`, `hideStickersButton`, `hideLiveReaction`, `hideSendButton`, `hideRichTextToolbar`, `disableMentions`, `disableMentionAll`, `disableTypingEvents`, `enableRichText`
|
|
129
|
+
- **Slots:** `headerView`, `footerView`, `sendButtonView`, `auxiliaryButtonView`, `secondaryButtonView`, `attachmentIconView`, `voiceRecordingIconView`, `emojiIconView`, `errorView`
|
|
130
|
+
- **`@Output`:** `textChange`, `sendButtonClick`, `error`, `closePreview`, `attachmentAdded`, `attachmentRemoved`, `mentionSelected`
|
|
279
131
|
|
|
280
|
-
|
|
132
|
+
### CometChatMessageInformationComponent
|
|
133
|
+
Selector: `<cometchat-message-information>`
|
|
281
134
|
|
|
282
|
-
|
|
135
|
+
- **`@Input`:** `message`, `dateTimeFormat`, `textFormatters`, `showScrollbar` · **`@Output`:** `closeClick`
|
|
283
136
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
[call]="outgoingCall"
|
|
289
|
-
[onCloseClicked]="handleClose"
|
|
290
|
-
></cometchat-outgoing-call>
|
|
291
|
-
```
|
|
137
|
+
### Threads — `<cometchat-thread-header>` / `<cometchat-thread-view>`
|
|
138
|
+
- `<cometchat-thread-header>`: `@Input` `parentMessage`, `replyCount` · `@Output` `closeClick`, `backClick`
|
|
139
|
+
- `<cometchat-thread-view>`: `@Input` `mode`, `replyCount`, `unreadReplyCount`, `parentMessage`, `announceOnOpen` · `@Output` `threadClick`, `closeClick`
|
|
140
|
+
- For a thread pane, render `<cometchat-message-list>` + `<cometchat-message-composer>` with the same `[parentMessageId]`.
|
|
292
141
|
|
|
293
|
-
|
|
142
|
+
### CometChatReactionsComponent
|
|
143
|
+
Selector: `<cometchat-reactions>`
|
|
294
144
|
|
|
295
|
-
|
|
145
|
+
- **`@Input`:** `message`, `alignment`, `reactionsRequestBuilder`, `hoverDebounceTime` · **`@Output`:** `reactionClick`, `reactionListItemClick`
|
|
296
146
|
|
|
297
|
-
###
|
|
147
|
+
### CometChatSearchComponent
|
|
148
|
+
Selector: `<cometchat-search>`
|
|
298
149
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
<cometchat-ongoing-call
|
|
303
|
-
[sessionID]="session.sessionId"
|
|
304
|
-
[onError]="handleError"
|
|
305
|
-
></cometchat-ongoing-call>
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
Key inputs: `[sessionID]`, `[onError]` (Input callback), `[ongoingCallStyle]`, `[callSettingsBuilder]`.
|
|
309
|
-
|
|
310
|
-
> **`(onCallEnded)` does not exist** on this component — there is no `@Output()` for call end. To detect when a call ends, subscribe to `CometChatCallEvents.ccCallEnded` from the event bus instead:
|
|
311
|
-
> ```typescript
|
|
312
|
-
> import { CometChatCallEvents } from "@cometchat/chat-uikit-angular";
|
|
313
|
-
> CometChatCallEvents.ccCallEnded.subscribe(() => {
|
|
314
|
-
> // call ended — navigate away or update state
|
|
315
|
-
> });
|
|
316
|
-
> ```
|
|
317
|
-
|
|
318
|
-
### CometChatCallLogs
|
|
319
|
-
|
|
320
|
-
Scrollable call history.
|
|
321
|
-
|
|
322
|
-
```html
|
|
323
|
-
<cometchat-call-logs
|
|
324
|
-
[onItemClick]="openCallDetails"
|
|
325
|
-
></cometchat-call-logs>
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
> **`[onItemClick]` is an `@Input()` callback** — use square brackets, not round brackets.
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
## 5. Search
|
|
333
|
-
|
|
334
|
-
The Angular v4 UIKit does **not** export a standalone `<cometchat-search>` Angular module. Search is built into the list components via the `[hideSearch]` input:
|
|
335
|
-
|
|
336
|
-
```html
|
|
337
|
-
<!-- Built-in search bar on conversations list -->
|
|
338
|
-
<cometchat-conversations [hideSearch]="false"></cometchat-conversations>
|
|
339
|
-
|
|
340
|
-
<!-- Built-in search bar on users list -->
|
|
341
|
-
<cometchat-users [hideSearch]="false"></cometchat-users>
|
|
342
|
-
|
|
343
|
-
<!-- Built-in search bar on groups list -->
|
|
344
|
-
<cometchat-groups [hideSearch]="false"></cometchat-groups>
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
> **Hard rule — never roll your own search.** Use `[hideSearch]="false"` on the list components. Do NOT build custom `<input>` search bars — they bypass the SDK's pagination and highlighting.
|
|
150
|
+
Unified conversation + message search.
|
|
151
|
+
- **Key `@Input`:** `searchIn`, `searchFilters`, `initialSearchFilter`, `defaultSearchText`, `uid`, `guid`, `conversationsRequestBuilder`, `messagesRequestBuilder`, `hideBackButton` (+ per-result slot views)
|
|
152
|
+
- **`@Output`:** `backClick`, `conversationClick`, `messageClick`, `searchError`
|
|
348
153
|
|
|
349
154
|
---
|
|
350
155
|
|
|
351
|
-
##
|
|
156
|
+
## Call components
|
|
352
157
|
|
|
353
|
-
|
|
158
|
+
> **Binding nuance:** call components use **`@Input` callback props** (`onAccept`, `onDecline`, `onError`, `onVoiceCallClick`, …) AND some `@Output` EventEmitters. Bind the form that exists per the tables. `<cometchat-incoming-call>` exposes both — prefer the `@Input` callbacks for accept/decline (they carry the kit's call handling) and use the `@Output`s for observing.
|
|
354
159
|
|
|
355
|
-
|
|
160
|
+
### CometChatCallButtonsComponent
|
|
161
|
+
Selector: `<cometchat-call-buttons>`
|
|
356
162
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
></cometchat-details>
|
|
363
|
-
```
|
|
163
|
+
Voice/video buttons for a `user` or `group`. Drop into a header or contact row.
|
|
164
|
+
- **`@Input`:** `user`, `group`, `callSettingsBuilder`, `hideVoiceCallButton`, `hideVideoCallButton`, `hideOverlays`, `outgoingCallDisableSoundForCalls`, `outgoingCallCustomSoundForCalls`
|
|
165
|
+
- **`@Input` callbacks:** `onVoiceCallClick`, `onVideoCallClick`, `onError`
|
|
166
|
+
- **Slots:** `voiceCallButtonView`, `videoCallButtonView`
|
|
167
|
+
- **`@Output`:** `error`
|
|
364
168
|
|
|
365
|
-
|
|
169
|
+
### CometChatIncomingCallComponent
|
|
170
|
+
Selector: `<cometchat-incoming-call>`
|
|
366
171
|
|
|
367
|
-
|
|
172
|
+
Incoming-call banner/overlay. Mount app-wide (see calls skill).
|
|
173
|
+
- **`@Input`:** `call`, `disableSoundForCalls`, `customSoundForCalls`
|
|
174
|
+
- **`@Input` callbacks:** `onAccept`, `onDecline`, `onError`
|
|
175
|
+
- **Slots:** `itemView`, `titleView`, `subtitleView`, `leadingView`, `trailingView`, `acceptButtonView`, `declineButtonView`
|
|
176
|
+
- **`@Output`:** `callAccepted`, `callDeclined`, `error`
|
|
368
177
|
|
|
369
|
-
|
|
178
|
+
### CometChatOutgoingCallComponent
|
|
179
|
+
Selector: `<cometchat-outgoing-call>`
|
|
370
180
|
|
|
371
|
-
|
|
372
|
-
<cometchat-contacts
|
|
373
|
-
[onItemClick]="handleContactClick"
|
|
374
|
-
[onClose]="closeContacts"
|
|
375
|
-
style="height:100%;display:block;"
|
|
376
|
-
></cometchat-contacts>
|
|
377
|
-
```
|
|
181
|
+
- **`@Input`:** `call`, `disableSoundForCalls`, `customSoundForCalls` · **`@Input` callback:** `onError` · **Slots:** `titleView`, `subtitleView`, `avatarView`, `cancelButtonView` · **`@Output`:** `callCanceled`, `error`
|
|
378
182
|
|
|
379
|
-
|
|
183
|
+
### CometChatOngoingCallComponent
|
|
184
|
+
Selector: `<cometchat-ongoing-call>`
|
|
380
185
|
|
|
381
|
-
|
|
186
|
+
The active WebRTC call surface.
|
|
187
|
+
- **`@Input`:** `sessionID`, `callSettingsBuilder`, `callWorkflow`, `isAudioOnly` · **`@Input` callback:** `onError` · **Slot:** `callScreenView` · **`@Output`:** `callEnded`, `error`
|
|
382
188
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
```html
|
|
386
|
-
<cometchat-add-members [group]="selectedGroup"></cometchat-add-members>
|
|
387
|
-
```
|
|
189
|
+
### CometChatCallLogsComponent
|
|
190
|
+
Selector: `<cometchat-call-logs>`
|
|
388
191
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
List and unban banned members of a group.
|
|
392
|
-
|
|
393
|
-
```html
|
|
394
|
-
<cometchat-banned-members [group]="selectedGroup"></cometchat-banned-members>
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
### CometChatTransferOwnership
|
|
398
|
-
|
|
399
|
-
Transfer group ownership to another member.
|
|
400
|
-
|
|
401
|
-
```html
|
|
402
|
-
<cometchat-transfer-ownership [group]="selectedGroup"></cometchat-transfer-ownership>
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
### CometChatCreateGroup
|
|
406
|
-
|
|
407
|
-
Dialog for creating a new group.
|
|
408
|
-
|
|
409
|
-
```html
|
|
410
|
-
<cometchat-create-group></cometchat-create-group>
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
> **Not in Angular v4:** `CometChatNewChat`, `CometChatBlockedUsers`, `CometChatSearchBar`, `CometChatThreadHeader` (standalone), `CometChatCompactMessageComposer` — these are React v6 UIKit only. Use `<cometchat-contacts>` for new chat, `<cometchat-details>` for block/unblock, and `<cometchat-threaded-messages>` for threads.
|
|
192
|
+
- **`@Input`:** `activeCall`, `callLogRequestBuilder`, `callSettingsBuilder`, `callInitiatedDateTimeFormat`, `showScrollbar` · **`@Input` callback:** `onError` · **Slots:** `menuView`, `itemView`, `leadingView`, `titleView`, `subtitleView`, `trailingView`, `loadingView`, `emptyView`, `errorView` · **`@Output`:** `itemClick`, `callButtonClicked`
|
|
414
193
|
|
|
415
194
|
---
|
|
416
195
|
|
|
417
|
-
##
|
|
196
|
+
## AI components
|
|
418
197
|
|
|
419
|
-
###
|
|
198
|
+
### CometChatConversationStarterComponent
|
|
199
|
+
`<cometchat-conversation-starter>` — `@Input` `user`, `group` · `@Output` `starterClick`
|
|
420
200
|
|
|
421
|
-
|
|
201
|
+
### CometChatConversationSummaryComponent
|
|
202
|
+
`<cometchat-conversation-summary>` — `@Input` `getConversationSummary`, `closeCallback`
|
|
422
203
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
[parentMessage]="threadParentMessage"
|
|
426
|
-
[user]="selectedUser"
|
|
427
|
-
[group]="selectedGroup"
|
|
428
|
-
[onClose]="closeThread"
|
|
429
|
-
></cometchat-threaded-messages>
|
|
430
|
-
```
|
|
204
|
+
### CometChatSmartRepliesComponent
|
|
205
|
+
`<cometchat-smart-replies>` — smart-reply chips
|
|
431
206
|
|
|
432
|
-
|
|
207
|
+
### CometChatAIAssistantChat
|
|
208
|
+
`<cometchat-ai-assistant-chat>` (+ `CometChatAIAssistantChatHistory` / `CometChatAIAssistantMessageBubble`) — AI assistant chat surfaces.
|
|
433
209
|
|
|
434
|
-
|
|
210
|
+
AI views are usually surfaced through `<cometchat-message-list>`'s `showSmartReplies` / `showConversationStarters` inputs and the header's summary button — see the `cometchat-angular-features` skill.
|
|
435
211
|
|
|
436
212
|
---
|
|
437
213
|
|
|
438
|
-
##
|
|
439
|
-
|
|
440
|
-
Building blocks used inside `ng-template` slot overrides or custom components.
|
|
441
|
-
|
|
442
|
-
| Selector | Purpose |
|
|
443
|
-
|---|---|
|
|
444
|
-
| `<cometchat-avatar>` | Circular avatar. `[image]`, `[name]` (initials fallback), `[avatarStyle]` |
|
|
445
|
-
| `<cometchat-badge>` | Unread count badge. `[count]`, `[badgeStyle]` |
|
|
446
|
-
| `<cometchat-status-indicator>` | Online/offline dot. `[status]`, `[statusIndicatorStyle]` |
|
|
447
|
-
| `<cometchat-list-item>` | Standard row — leading + title/subtitle + trailing. `[listItemStyle]` |
|
|
448
|
-
| `<cometchat-date>` | Relative-time date pill. `[timestamp]`, `[pattern]`, `[dateStyle]` |
|
|
449
|
-
| `<cometchat-button>` | Icon button. `[iconURL]`, `[buttonStyle]`, `(click)` |
|
|
450
|
-
| `<cometchat-loader>` | Loading spinner. `[iconURL]`, `[loaderStyle]` |
|
|
451
|
-
| `<cometchat-confirm-dialog>` | Confirm/cancel dialog. `[title]`, `[messageText]`, `[onConfirm]`, `[onCancel]` |
|
|
452
|
-
| `<cometchat-emoji-keyboard>` | Full emoji picker. `[onEmojiClick]` |
|
|
214
|
+
## Other exported components (selectors)
|
|
453
215
|
|
|
454
|
-
|
|
216
|
+
Building blocks + bubbles + dialogs you rarely instantiate directly (the list/message components compose them), but they're exported and available: `<cometchat-avatar>`, `<cometchat-button>`, `<cometchat-list-item>`, `<cometchat-date>`, `<cometchat-search-bar>`, `<cometchat-emoji-keyboard>`, `<cometchat-stickers-keyboard>`, `<cometchat-media-recorder>`, `<cometchat-reaction-list>`, `<cometchat-reaction-info>`, `<cometchat-create-poll>`, `<cometchat-fullscreen-viewer>`, `<cometchat-confirm-dialog>`, `<cometchat-flag-message-dialog>`, `<cometchat-change-scope>`, `<cometchat-context-menu>`, `<cometchat-popover>`, `<cometchat-toast>`, `<cometchat-typing-indicator>`, and the bubble set (`<cometchat-text-bubble>`, `-image-bubble`, `-video-bubble`, `-audio-bubble`, `-file-bubble`, `-call-bubble`, `-poll-bubble`, `-sticker-bubble`, `-collaborative-document-bubble`, `-collaborative-whiteboard-bubble`, `-action-bubble`, `-delete-bubble`, `-message-bubble`).
|
|
455
217
|
|
|
456
|
-
|
|
218
|
+
To confirm any of their bindings, grep the bundled `.d.ts` for `ɵɵComponentDeclaration<<Class>,` — the input/output names are in the type literal.
|
|
457
219
|
|
|
458
220
|
---
|
|
459
221
|
|
|
460
|
-
##
|
|
461
|
-
|
|
462
|
-
These are not components — they are formatter classes that customize how text renders in message bubbles. Import from `@cometchat/uikit-shared` and pass via `[textFormatters]` on both `<cometchat-message-list>` and `<cometchat-message-composer>`.
|
|
463
|
-
|
|
464
|
-
| Class | Purpose |
|
|
465
|
-
|---|---|
|
|
466
|
-
| `CometChatTextFormatter` | Abstract base class — extend to build custom formatters |
|
|
467
|
-
| `CometChatMentionsFormatter` | Renders @mentions with styling + suggestion popover |
|
|
468
|
-
| `CometChatUrlsFormatter` | Auto-links URLs. Requires regex patterns in constructor |
|
|
469
|
-
|
|
470
|
-
```typescript
|
|
471
|
-
import {
|
|
472
|
-
CometChatMentionsFormatter,
|
|
473
|
-
CometChatUrlsFormatter,
|
|
474
|
-
} from "@cometchat/uikit-shared";
|
|
475
|
-
|
|
476
|
-
textFormatters = [
|
|
477
|
-
new CometChatMentionsFormatter(),
|
|
478
|
-
new CometChatUrlsFormatter([
|
|
479
|
-
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/gi,
|
|
480
|
-
]),
|
|
481
|
-
];
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
**Always pass the same array to both list and composer** — if they differ, sent and received messages render differently.
|
|
485
|
-
|
|
486
|
-
> **Note:** `CometChatMarkdownFormatter`, `CometChatRichTextFormatter`, and `CometChatTextHighlightFormatter` are React v6 UIKit only — they do not exist in the Angular v4 UIKit. To add custom text rendering patterns in Angular, extend `CometChatTextFormatter` directly (see `cometchat-angular-customization` § Tier 3a).
|
|
487
|
-
|
|
488
|
-
---
|
|
489
|
-
|
|
490
|
-
## 7. Infrastructure (static classes + event bus)
|
|
491
|
-
|
|
492
|
-
### CometChatUIKit
|
|
493
|
-
|
|
494
|
-
Static class — init + login + logout.
|
|
495
|
-
|
|
496
|
-
| Method | Purpose |
|
|
497
|
-
|---|---|
|
|
498
|
-
| `CometChatUIKit.init(settings)` | Initialize. Must resolve before any component renders. |
|
|
499
|
-
| `CometChatUIKit.login({ uid })` | Log in (dev mode). Takes an object. |
|
|
500
|
-
| `CometChatUIKit.login({ authToken })` | Log in with a server-minted token (production). |
|
|
501
|
-
| `CometChatUIKit.getLoggedinUser()` | Returns current `CometChat.User` or `null` (Promise). |
|
|
502
|
-
| `CometChatUIKit.logout()` | Log out + clear session. |
|
|
503
|
-
|
|
504
|
-
### CometChatConversationEvents / CometChatMessageEvents / CometChatGroupEvents / CometChatUserEvents
|
|
505
|
-
|
|
506
|
-
Angular event bus — RxJS `Subject`-based. Subscribe in `ngOnInit`, unsubscribe in `ngOnDestroy`.
|
|
507
|
-
|
|
508
|
-
```typescript
|
|
509
|
-
import { Subscription } from "rxjs";
|
|
510
|
-
import { CometChatConversationEvents } from "@cometchat/chat-uikit-angular";
|
|
511
|
-
|
|
512
|
-
export class MyComponent implements OnInit, OnDestroy {
|
|
513
|
-
private ccConversationDeleted!: Subscription;
|
|
514
|
-
|
|
515
|
-
ngOnInit(): void {
|
|
516
|
-
this.ccConversationDeleted =
|
|
517
|
-
CometChatConversationEvents.ccConversationDeleted.subscribe(
|
|
518
|
-
(conversation: CometChat.Conversation) => {
|
|
519
|
-
// handle deletion
|
|
520
|
-
}
|
|
521
|
-
);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
ngOnDestroy(): void {
|
|
525
|
-
this.ccConversationDeleted?.unsubscribe();
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
Available event streams:
|
|
531
|
-
- `CometChatConversationEvents`: `ccConversationDeleted`, `ccUpdateConversation`
|
|
532
|
-
- `CometChatMessageEvents`: `ccMessageSent`, `ccMessageEdited`, `ccMessageDeleted`, `ccMessageRead`, `ccLiveReaction`
|
|
533
|
-
- `CometChatGroupEvents`: `ccGroupCreated`, `ccGroupDeleted`, `ccGroupLeft`, `ccGroupMemberScopeChanged`, `ccGroupMemberKicked`, `ccGroupMemberBanned`, `ccGroupMemberJoined`, `ccGroupMemberAdded`, `ccOwnershipChanged`
|
|
534
|
-
- `CometChatUserEvents`: `ccUserBlocked`, `ccUserUnblocked`
|
|
535
|
-
|
|
536
|
-
**Always unsubscribe in `ngOnDestroy`.** Angular components can be destroyed and re-created on navigation; leaked subscriptions cause duplicate event handling.
|
|
537
|
-
|
|
538
|
-
### CometChatThemeService
|
|
539
|
-
|
|
540
|
-
Injected service for palette control. See `cometchat-angular-core` § 6 and `cometchat-angular-theming`.
|
|
541
|
-
|
|
542
|
-
---
|
|
543
|
-
|
|
544
|
-
## 8. Style objects
|
|
545
|
-
|
|
546
|
-
Each component accepts a typed style object. Import from `@cometchat/uikit-shared` or `@cometchat/chat-uikit-angular`.
|
|
547
|
-
|
|
548
|
-
```typescript
|
|
549
|
-
import {
|
|
550
|
-
ConversationsStyle,
|
|
551
|
-
MessagesStyle,
|
|
552
|
-
MessageListStyle,
|
|
553
|
-
MessageComposerStyle,
|
|
554
|
-
MessageHeaderStyle,
|
|
555
|
-
UsersStyle,
|
|
556
|
-
GroupsStyle,
|
|
557
|
-
GroupMembersStyle,
|
|
558
|
-
AvatarStyle,
|
|
559
|
-
BadgeStyle,
|
|
560
|
-
StatusIndicatorStyle,
|
|
561
|
-
ListItemStyle,
|
|
562
|
-
DateStyle,
|
|
563
|
-
BackdropStyle,
|
|
564
|
-
ConfirmDialogStyle,
|
|
565
|
-
LoaderStyle,
|
|
566
|
-
CallLogsStyle,
|
|
567
|
-
} from "@cometchat/uikit-shared";
|
|
568
|
-
// or from "@cometchat/chat-uikit-angular" — both re-export the same types
|
|
569
|
-
```
|
|
222
|
+
## Anti-patterns
|
|
570
223
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
border: "1px solid #e8e8e8",
|
|
578
|
-
borderRadius: "8px",
|
|
579
|
-
background: "#ffffff",
|
|
580
|
-
titleTextFont: "600 18px Inter",
|
|
581
|
-
titleTextColor: "#141414",
|
|
582
|
-
lastMessageTextColor: "#727272",
|
|
583
|
-
onlineStatusColor: "#09C26F",
|
|
584
|
-
});
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
---
|
|
588
|
-
|
|
589
|
-
## 9. ng-template slot views
|
|
590
|
-
|
|
591
|
-
Custom views are passed as Angular `TemplateRef` via `ng-template`. The template receives the entity as an implicit context variable.
|
|
592
|
-
|
|
593
|
-
```html
|
|
594
|
-
<!-- In the component template -->
|
|
595
|
-
<cometchat-conversations
|
|
596
|
-
[listItemView]="customListItem"
|
|
597
|
-
></cometchat-conversations>
|
|
598
|
-
|
|
599
|
-
<ng-template #customListItem let-conversation>
|
|
600
|
-
<div class="custom-item">
|
|
601
|
-
<span>{{ conversation.getConversationWith().getName() }}</span>
|
|
602
|
-
</div>
|
|
603
|
-
</ng-template>
|
|
604
|
-
```
|
|
605
|
-
|
|
606
|
-
```typescript
|
|
607
|
-
// In the component class
|
|
608
|
-
import { ViewChild, TemplateRef } from "@angular/core";
|
|
609
|
-
|
|
610
|
-
@Component({ /* ... */ })
|
|
611
|
-
export class AppComponent {
|
|
612
|
-
@ViewChild("customListItem") customListItem!: TemplateRef<any>;
|
|
613
|
-
}
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
Common slot inputs per component:
|
|
617
|
-
|
|
618
|
-
| Component | Slot inputs |
|
|
619
|
-
|---|---|
|
|
620
|
-
| `<cometchat-conversations>` | `[listItemView]`, `[menu]`, `[loadingStateView]`, `[errorStateView]`, `[emptyStateView]` |
|
|
621
|
-
| `<cometchat-message-header>` | `[menu]`, `[subtitleView]` |
|
|
622
|
-
| `<cometchat-message-list>` | `[emptyStateView]`, `[errorStateView]`, `[loadingStateView]` |
|
|
623
|
-
| `<cometchat-message-composer>` | `[auxilaryButtonView]`, `[headerView]`, `[sendButtonView]` |
|
|
624
|
-
| `<cometchat-users>` | `[listItemView]`, `[menu]`, `[loadingStateView]`, `[errorStateView]`, `[emptyStateView]` |
|
|
625
|
-
| `<cometchat-groups>` | `[listItemView]`, `[menu]`, `[loadingStateView]`, `[errorStateView]`, `[emptyStateView]` |
|
|
626
|
-
|
|
627
|
-
---
|
|
628
|
-
|
|
629
|
-
## 10. Request builders
|
|
630
|
-
|
|
631
|
-
Pass request builders to filter what data loads. Import builder classes from `@cometchat/chat-sdk-javascript`.
|
|
632
|
-
|
|
633
|
-
```typescript
|
|
634
|
-
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
635
|
-
|
|
636
|
-
// Filter conversations
|
|
637
|
-
conversationsRequestBuilder = new CometChat.ConversationsRequestBuilder()
|
|
638
|
-
.setLimit(20)
|
|
639
|
-
.setConversationType(CometChat.RECEIVER_TYPE.USER);
|
|
640
|
-
|
|
641
|
-
// Filter users
|
|
642
|
-
usersRequestBuilder = new CometChat.UsersRequestBuilder()
|
|
643
|
-
.setLimit(30)
|
|
644
|
-
.setStatus("online");
|
|
645
|
-
|
|
646
|
-
// Filter messages
|
|
647
|
-
messagesRequestBuilder = new CometChat.MessagesRequestBuilder()
|
|
648
|
-
.setUID(this.selectedUser.getUid())
|
|
649
|
-
.setLimit(30)
|
|
650
|
-
.setCategories(["message"]);
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
---
|
|
654
|
-
|
|
655
|
-
## 11. Threading — wiring `[onThreadRepliesClick]`
|
|
656
|
-
|
|
657
|
-
The Angular v4 UIKit does **not** have a `[hideReplyInThreadOption]` input. The "Reply in Thread" option in the message action menu is always present when threads are supported by the kit.
|
|
658
|
-
|
|
659
|
-
To wire a thread panel, pass `[onThreadRepliesClick]` as an **Input callback** (square brackets) on `<cometchat-message-list>`:
|
|
660
|
-
|
|
661
|
-
```html
|
|
662
|
-
<cometchat-message-list
|
|
663
|
-
[user]="selectedUser"
|
|
664
|
-
[onThreadRepliesClick]="openThread"
|
|
665
|
-
></cometchat-message-list>
|
|
666
|
-
```
|
|
667
|
-
|
|
668
|
-
```typescript
|
|
669
|
-
// The callback receives { message, view } — extract the message:
|
|
670
|
-
openThread = (payload: any): void => {
|
|
671
|
-
const msg = payload?.message ?? payload;
|
|
672
|
-
this.threadMessage = msg;
|
|
673
|
-
this.showThreadPanel = true;
|
|
674
|
-
};
|
|
675
|
-
```
|
|
676
|
-
|
|
677
|
-
Then render the thread panel using `<cometchat-threaded-messages>` or a manual scoped list + composer with `[parentMessageId]`.
|
|
678
|
-
|
|
679
|
-
---
|
|
680
|
-
|
|
681
|
-
## 12. Common prop-finding recipe
|
|
682
|
-
|
|
683
|
-
When a user's request isn't obviously covered, check in this order:
|
|
684
|
-
|
|
685
|
-
1. **Named component in this catalog fits?** ("show call history" → `<cometchat-call-logs>`)
|
|
686
|
-
2. **A `[hide*]` / visibility input?** ("disable reactions" → `[disableReactions]="true"`, "hide receipt" → `[hideReceipt]="true"`)
|
|
687
|
-
3. **A `[*View]` / `[*Template]` slot?** ("customize the header title" → `[subtitleView]="myTemplate"`)
|
|
688
|
-
4. **A `[*RequestBuilder]`?** ("filter conversations" → `[conversationsRequestBuilder]`)
|
|
689
|
-
5. **`[textFormatters]` + `[templates]`** for message-rendering customization
|
|
690
|
-
6. **`CometChatConversationEvents` / `CometChatMessageEvents`** for cross-component communication
|
|
691
|
-
7. **Only then** escalate to `cometchat-angular-customization` § Tier 4 (DataSource decorators)
|
|
692
|
-
|
|
693
|
-
---
|
|
224
|
+
1. **Don't invent bindings.** If a prop isn't in this catalog (or the `.d.ts`), it doesn't exist. v4 prop names frequently differ from v5.
|
|
225
|
+
2. **Don't bind a call `@Input` callback as an `@Output`** (or vice-versa). `[onAccept]="fn"` (input) vs `(callAccepted)="fn($event)"` (output) — use the one listed.
|
|
226
|
+
3. **Don't reach for a composite** (`<cometchat-conversations-with-messages>`) — removed in v5. Compose manually.
|
|
227
|
+
4. **Don't pass both `[user]` and `[group]`** to header/list/composer — they're mutually exclusive; pass exactly one.
|
|
228
|
+
5. **Don't add `CUSTOM_ELEMENTS_SCHEMA`** — v5 components are real Angular components; importing the class is enough.
|
|
229
|
+
6. **Don't forget to import the component class** into the standalone component's `imports: []` — otherwise the selector renders as an unknown element.
|
|
694
230
|
|
|
695
|
-
##
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
| `cometchat-angular-components` | This skill — any time you write `<cometchat-*>` HTML |
|
|
701
|
-
| `cometchat-angular-placement` | Deciding WHERE components go (route / sidebar / modal / tab) |
|
|
702
|
-
| `cometchat-angular-customization` | `[textFormatters]`, `[templates]`, custom slot views, event bus |
|
|
703
|
-
| `cometchat-angular-features` | Adding calls, extensions, AI |
|
|
704
|
-
| `cometchat-angular-theming` | `[*Style]` not enough — need app-wide color / typography changes |
|
|
705
|
-
| `cometchat-angular-production` | `login({ authToken })` setup |
|
|
706
|
-
| `cometchat-angular-troubleshooting` | `<cometchat-*>` renders nothing or throws at runtime |
|
|
231
|
+
## Pointers
|
|
232
|
+
- `<cometchat-angular-core>` — setup, init, login
|
|
233
|
+
- `<cometchat-angular-placement>` — composing these into routes/modals/drawers
|
|
234
|
+
- `<cometchat-angular-customization>` — slot templates, formatters, options overrides
|
|
235
|
+
- `<cometchat-angular-calls>` — full call flow + incoming-call mounting
|