@cometchat/skills 4.4.2 → 5.0.0
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/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +14 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +41 -163
- package/RULES.md +114 -0
- package/bin/cometchat-skills.mjs +1180 -0
- package/bin/legacy-skills.json +95 -0
- package/catalogs/android-v6.json +1646 -0
- package/catalogs/flutter-v6.json +651 -0
- package/catalogs/ios-v5.json +1383 -0
- package/catalogs/rn-calls-v5.json +134 -0
- package/catalogs/rn-calls-v5.symbols.txt +58 -0
- package/catalogs/rn-sdk-v4.json +672 -0
- package/catalogs/rn-v5.json +449 -0
- package/catalogs/rn-v5.symbols.txt +216 -0
- package/catalogs/sdk-android-v5.json +514 -0
- package/contracts.android-calls-v5.json +122 -0
- package/contracts.android-v6.json +135 -0
- package/contracts.angular-v5.json +694 -0
- package/contracts.flutter-calls-v5.json +77 -0
- package/contracts.flutter-v6.json +126 -0
- package/contracts.ios-calls-v5.json +67 -0
- package/contracts.ios-v5.json +436 -0
- package/contracts.json +82 -0
- package/contracts.rn-calls-v5.json +77 -0
- package/contracts.rn-v5.json +727 -0
- package/contracts.sdk-android-v5.json +15 -0
- package/contracts.web-calls-v5.json +45 -0
- package/features.android-calls-v5.json +246 -0
- package/features.android-v6.json +65 -0
- package/features.angular-v5.json +521 -0
- package/features.flutter-calls-v5.json +286 -0
- package/features.flutter-v6.json +484 -0
- package/features.ios-calls-v5.json +236 -0
- package/features.ios-v5.json +573 -0
- package/features.json +61 -0
- package/features.rn-calls-v5.json +187 -0
- package/features.rn-v5.json +614 -0
- package/features.sdk-android-v5.json +40 -0
- package/features.sdk-jsv4.json +24 -0
- package/features.web-calls-v5.json +108 -0
- package/package.json +151 -74
- package/peers.yaml +312 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +54 -0
- package/registry/android-v6.json +137 -0
- package/registry/angular-v5.json +114 -0
- package/registry/flutter-calls-v5.json +54 -0
- package/registry/flutter-v6.json +119 -0
- package/registry/ios-calls-v5.json +59 -0
- package/registry/ios-v5.json +97 -0
- package/registry/rn-calls-v5.json +59 -0
- package/registry/rn-v5.json +129 -0
- package/registry/sdk-android-v5.json +53 -0
- package/registry/sdk-jsv4.json +53 -0
- package/registry/web-calls-v5.json +54 -0
- package/registry/web-v7.json +99 -0
- package/skills/cometchat/SKILL.md +42 -2096
- package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
- package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
- package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
- package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
- package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
- package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
- package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
- package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
- package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
- package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
- package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
- package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
- package/skills/cometchat-android-v6-core/SKILL.md +236 -672
- package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
- package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
- package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
- package/skills/cometchat-android-v6-core/references/layout.md +112 -0
- package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
- package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
- package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
- package/skills/cometchat-android-v6-events/SKILL.md +46 -184
- package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
- package/skills/cometchat-android-v6-features/SKILL.md +74 -143
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
- package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
- package/skills/cometchat-android-v6-production/SKILL.md +40 -179
- package/skills/cometchat-android-v6-push/SKILL.md +39 -289
- package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
- package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
- package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
- package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
- package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
- package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
- package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
- package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
- package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
- package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
- package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
- package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
- package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
- package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
- package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
- package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
- package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
- package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
- package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
- package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
- package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
- package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
- package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
- package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
- package/skills/cometchat-angular-v5-production/SKILL.md +101 -0
- package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
- package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
- package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
- package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
- package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
- package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
- package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
- package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
- package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
- package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
- package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
- package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
- package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
- package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
- package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
- package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
- package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
- package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
- package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
- package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
- package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
- package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +131 -0
- package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
- package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
- package/skills/cometchat-flutter-v6-production/SKILL.md +58 -615
- package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
- package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
- package/skills/cometchat-ios-calls/SKILL.md +112 -563
- package/skills/cometchat-ios-components/SKILL.md +44 -834
- package/skills/cometchat-ios-core/SKILL.md +181 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
- package/skills/cometchat-ios-core/references/docs-map.md +123 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +186 -0
- package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
- package/skills/cometchat-ios-core/references/swiftui.md +91 -0
- package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
- package/skills/cometchat-ios-customization/SKILL.md +33 -968
- package/skills/cometchat-ios-features/SKILL.md +29 -738
- package/skills/cometchat-ios-migration/SKILL.md +39 -0
- package/skills/cometchat-ios-placement/SKILL.md +51 -729
- package/skills/cometchat-ios-push/SKILL.md +24 -602
- package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
- package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
- package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
- package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
- package/skills/cometchat-onboarding/SKILL.md +89 -0
- package/skills/cometchat-onboarding/references/archetypes.md +51 -0
- package/skills/cometchat-onboarding/references/calling-first.md +77 -0
- package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
- package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
- package/skills/cometchat-onboarding/references/platforms.md +90 -0
- package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
- package/skills/cometchat-react-native-calls/SKILL.md +200 -0
- package/skills/cometchat-react-native-components/SKILL.md +142 -0
- package/skills/cometchat-react-native-core/SKILL.md +313 -0
- package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
- package/skills/cometchat-react-native-core/references/component-props.md +105 -0
- package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
- package/skills/cometchat-react-native-core/references/docs-map.md +126 -0
- package/skills/cometchat-react-native-core/references/layout.md +61 -0
- package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
- package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
- package/skills/cometchat-react-native-customization/SKILL.md +198 -0
- package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
- package/skills/cometchat-react-native-features/SKILL.md +122 -0
- package/skills/cometchat-react-native-migration/SKILL.md +103 -0
- package/skills/cometchat-react-native-placement/SKILL.md +158 -0
- package/skills/cometchat-react-native-production/SKILL.md +78 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +126 -0
- package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
- package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
- package/skills/cometchat-react-native-testing/SKILL.md +94 -0
- package/skills/cometchat-react-native-troubleshooting/SKILL.md +116 -0
- package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
- package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
- package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
- package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
- package/skills/cometchat-react-v7-components/SKILL.md +72 -0
- package/skills/cometchat-react-v7-core/SKILL.md +101 -0
- package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
- package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
- package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
- package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
- package/skills/cometchat-react-v7-core/references/i18n-rtl-a11y.md +22 -0
- package/skills/cometchat-react-v7-core/references/layout.md +158 -0
- package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
- package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
- package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
- package/skills/cometchat-react-v7-core/references/theming.md +52 -0
- package/skills/cometchat-react-v7-core/references/troubleshooting.md +28 -0
- package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
- package/skills/cometchat-react-v7-features/SKILL.md +92 -0
- package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
- package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
- package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
- package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
- package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
- package/skills/cometchat-react-v7-push/SKILL.md +53 -0
- package/test-suite/README.md +70 -0
- package/test-suite/catalogs/android-calls-v5.json +830 -0
- package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
- package/test-suite/catalogs/android-v6.json +1646 -0
- package/test-suite/catalogs/android-v6.symbols.txt +298 -0
- package/test-suite/catalogs/angular-v5.json +7587 -0
- package/test-suite/catalogs/flutter-calls-v5.json +196 -0
- package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
- package/test-suite/catalogs/flutter-v6.json +651 -0
- package/test-suite/catalogs/ios-calls-v5.json +158 -0
- package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
- package/test-suite/catalogs/ios-v5.json +1383 -0
- package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
- package/test-suite/catalogs/rn-calls-v5.json +134 -0
- package/test-suite/catalogs/rn-sdk-v4.json +672 -0
- package/test-suite/catalogs/rn-v5.json +449 -0
- package/test-suite/catalogs/sdk-android-v5.json +514 -0
- package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
- package/test-suite/catalogs/sdk-jsv4.json +800 -0
- package/test-suite/catalogs/web-calls-v5.json +195 -0
- package/test-suite/catalogs/web-v7.json +1243 -0
- package/test-suite/scripts/build-registry.mjs +113 -0
- package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
- package/test-suite/scripts/catalog-refresh.mjs +100 -0
- package/test-suite/scripts/lint-skills.mjs +909 -0
- package/test-suite/scripts/measure-tokens.mjs +169 -0
- package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
- package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
- package/test-suite/scripts/typecheck-fences.mjs +206 -0
- package/test-suite/scripts/verify-catalog.mjs +242 -0
- package/test-suite/scripts/verify-contract-fences.mjs +94 -0
- package/test-suite/scripts/verify-detection.mjs +178 -0
- package/test-suite/scripts/verify-docs-base.mjs +91 -0
- package/test-suite/scripts/verify-family-agnostic.mjs +130 -0
- package/test-suite/scripts/verify-golden-path.mjs +138 -0
- package/test-suite/scripts/verify-oracle-components.mjs +133 -0
- package/test-suite/scripts/verify-template-bindings.mjs +148 -0
- package/test-suite/typecheck/angular-v5/package.json +21 -0
- package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
- package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
- package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
- package/test-suite/typecheck/web-v7/package.json +18 -0
- package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
- package/bin/install.js +0 -1003
- package/skills/.claude-plugin/marketplace.json +0 -86
- package/skills/cometchat/references/asking-questions.md +0 -48
- package/skills/cometchat-a11y/SKILL.md +0 -477
- package/skills/cometchat-android-v5/SKILL.md +0 -121
- package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
- package/skills/cometchat-android-v5-calls/references/README.md +0 -53
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
- package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
- package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
- package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
- package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
- package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
- package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
- package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
- package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
- package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
- package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
- package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
- package/skills/cometchat-android-v5-components/SKILL.md +0 -431
- package/skills/cometchat-android-v5-core/SKILL.md +0 -486
- package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
- package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
- package/skills/cometchat-android-v5-features/SKILL.md +0 -131
- package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
- package/skills/cometchat-android-v5-production/SKILL.md +0 -95
- package/skills/cometchat-android-v5-push/SKILL.md +0 -619
- package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
- package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
- package/skills/cometchat-android-v6/SKILL.md +0 -108
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
- package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
- package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
- package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
- package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
- package/skills/cometchat-angular-calls/SKILL.md +0 -380
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
- package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
- package/skills/cometchat-angular-calls/references/call-session.md +0 -167
- package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
- package/skills/cometchat-angular-calls/references/device-management.md +0 -154
- package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
- package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
- package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
- package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
- package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
- package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
- package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
- package/skills/cometchat-angular-components/SKILL.md +0 -235
- package/skills/cometchat-angular-core/SKILL.md +0 -386
- package/skills/cometchat-angular-customization/SKILL.md +0 -616
- package/skills/cometchat-angular-features/SKILL.md +0 -329
- package/skills/cometchat-angular-patterns/SKILL.md +0 -256
- package/skills/cometchat-angular-placement/SKILL.md +0 -314
- package/skills/cometchat-angular-production/SKILL.md +0 -564
- package/skills/cometchat-angular-push/SKILL.md +0 -389
- package/skills/cometchat-angular-testing/SKILL.md +0 -605
- package/skills/cometchat-angular-theming/SKILL.md +0 -290
- package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
- package/skills/cometchat-astro-patterns/SKILL.md +0 -708
- package/skills/cometchat-calls/SKILL.md +0 -364
- package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
- package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
- package/skills/cometchat-calls/references/use-case-support.md +0 -189
- package/skills/cometchat-calls/references/use-case-team.md +0 -180
- package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
- package/skills/cometchat-components/SKILL.md +0 -1142
- package/skills/cometchat-core/SKILL.md +0 -1048
- package/skills/cometchat-customization/SKILL.md +0 -580
- package/skills/cometchat-customization/references/component-catalog.md +0 -236
- package/skills/cometchat-features/SKILL.md +0 -861
- package/skills/cometchat-flutter-v5/SKILL.md +0 -173
- package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
- package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
- package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
- package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
- package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
- package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
- package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
- package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
- package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
- package/skills/cometchat-flutter-v6/SKILL.md +0 -446
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
- package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
- package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
- package/skills/cometchat-i18n/SKILL.md +0 -419
- package/skills/cometchat-ios/SKILL.md +0 -325
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
- package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
- package/skills/cometchat-ios-calls/references/call-session.md +0 -218
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
- package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
- package/skills/cometchat-ios-calls/references/device-management.md +0 -171
- package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
- package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
- package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
- package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
- package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
- package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
- package/skills/cometchat-ios-production/SKILL.md +0 -738
- package/skills/cometchat-ios-testing/SKILL.md +0 -376
- package/skills/cometchat-ios-theming/SKILL.md +0 -667
- package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
- package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
- package/skills/cometchat-native-calls/SKILL.md +0 -671
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
- package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
- package/skills/cometchat-native-calls/references/call-session.md +0 -182
- package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
- package/skills/cometchat-native-calls/references/device-management.md +0 -158
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
- package/skills/cometchat-native-calls/references/group-calls.md +0 -296
- package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
- package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
- package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
- package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
- package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
- package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
- package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
- package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
- package/skills/cometchat-native-calls/references/share-invite.md +0 -146
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
- package/skills/cometchat-native-components/SKILL.md +0 -628
- package/skills/cometchat-native-core/SKILL.md +0 -679
- package/skills/cometchat-native-customization/SKILL.md +0 -716
- package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
- package/skills/cometchat-native-features/SKILL.md +0 -638
- package/skills/cometchat-native-placement/SKILL.md +0 -509
- package/skills/cometchat-native-production/SKILL.md +0 -700
- package/skills/cometchat-native-push/SKILL.md +0 -594
- package/skills/cometchat-native-testing/SKILL.md +0 -582
- package/skills/cometchat-native-theming/SKILL.md +0 -681
- package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
- package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
- package/skills/cometchat-placement/SKILL.md +0 -1360
- package/skills/cometchat-production/SKILL.md +0 -1027
- package/skills/cometchat-react-calls/SKILL.md +0 -752
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
- package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
- package/skills/cometchat-react-calls/references/call-session.md +0 -235
- package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
- package/skills/cometchat-react-calls/references/device-management.md +0 -210
- package/skills/cometchat-react-calls/references/group-calls.md +0 -257
- package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
- package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
- package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
- package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
- package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
- package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
- package/skills/cometchat-react-calls/references/share-invite.md +0 -175
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
- package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
- package/skills/cometchat-react-patterns/SKILL.md +0 -628
- package/skills/cometchat-react-push/SKILL.md +0 -634
- package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
- package/skills/cometchat-react-testing/SKILL.md +0 -413
- package/skills/cometchat-theming/SKILL.md +0 -498
- package/skills/cometchat-troubleshooting/SKILL.md +0 -294
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Host-composed extensions — send, fetch, render
|
|
2
|
+
|
|
3
|
+
10 of the 17 dashboard extensions render **no kit affordance at all**. Enabling one in the dashboard changes nothing visible — you send through the generic `CometChat.callExtension()`, fetch the same way, and render the result yourself. This file is the full send→fetch→render pattern for `pin-message` and `save-message`; the other 8 host-composed extensions follow the same three-call shape against their own `docs_topic` page.
|
|
4
|
+
|
|
5
|
+
## 1. Send
|
|
6
|
+
```ts
|
|
7
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
8
|
+
|
|
9
|
+
// exact slug, endpoint and payload are on the extension's own docs page
|
|
10
|
+
await CometChat.callExtension('pin-message', 'POST', 'v1/pin', { msgId, receiverType });
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 2. Fetch
|
|
14
|
+
```ts
|
|
15
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
16
|
+
|
|
17
|
+
async function fetchPinned(receiverType: string, receiverId: string) {
|
|
18
|
+
const url = `v1/fetch?receiverType=${receiverType}&receiver=${receiverId}`;
|
|
19
|
+
// The 4th param is `data?: Object` — optional, no `| null` in its type. The docs'
|
|
20
|
+
// own JS example passes `null` for a GET with no body; that fails strict TS. Omit
|
|
21
|
+
// the argument instead (verified against the installed SDK's callExtension signature).
|
|
22
|
+
return CometChat.callExtension('pin-message', 'GET', url);
|
|
23
|
+
// response: { pinnedMessages: [...] } — per the extension's docs page
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
> **The docs show only `{ pinnedMessages: [] }` / `{ savedMessages: [] }` — never the shape of one ENTRY in that array.** Both `/fundamentals/pin-message` and `/fundamentals/save-message` stop exactly at the point that matters for rendering. This is a genuine **DOCS GAP** (recorded `AUDIT-145`, owner: docs) — do not silently guess a field name and present it as fact. **Log the raw response once in the running app** (`console.log(response)`) to see the real entry shape before writing render code against it.
|
|
28
|
+
|
|
29
|
+
## 3. Render — go through `getMessageDetails()`, not the raw JSON directly
|
|
30
|
+
The response is **plain JSON from an HTTP call**, not an SDK message instance — it does not have `.getText()` or any other SDK method on it. Whatever ID field the entry carries (send it a `msgId` when pinning, so the fetched entry almost certainly carries an identifier back — confirm the exact key from the logged response), resolve it into a real, typed message through the SDK's own lookup:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
34
|
+
|
|
35
|
+
// static getMessageDetails(messageId: string | any):
|
|
36
|
+
// Promise<TextMessage | MediaMessage | CustomMessage | InteractiveMessage | BaseMessage>
|
|
37
|
+
// Verified in the angular-v5 catalog — this IS the documented, type-safe path from an
|
|
38
|
+
// id to a real message instance. Never assume the raw extension entry exposes .getText()
|
|
39
|
+
// itself; only an SDK-constructed message instance does.
|
|
40
|
+
async function labelForPinnedEntry(entry: any) {
|
|
41
|
+
const message = await CometChat.getMessageDetails(entry.msgId ?? entry.messageId ?? entry.id);
|
|
42
|
+
// instanceof narrows the union cleanly — .getText() only exists on TextMessage,
|
|
43
|
+
// so guard it rather than assuming every pinned/saved message is text.
|
|
44
|
+
return message instanceof CometChat.TextMessage
|
|
45
|
+
? message.getText()
|
|
46
|
+
: message.getCategory(); // non-text (media/custom/interactive): show the category, not invented text
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Render each entry as its own row (a "Saved messages" / "Pinned messages" panel) — there is no kit component for this list; it is your own `*ngFor`.
|
|
51
|
+
|
|
52
|
+
## 4. Integrating a per-message action — pin/unpin, not a bolted-on button
|
|
53
|
+
For an action that acts ON an existing message (pin, save, star), do **not** add a separate, unstyled control below the kit's own context menu — `<cometchat-message-list>` has a real input for exactly this, so your action gets the kit's own icon slot and styling instead of looking like an unrelated append:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { CometChatActionsIcon } from '@cometchat/chat-uikit-angular';
|
|
57
|
+
|
|
58
|
+
class ChatComponent {
|
|
59
|
+
// A single shared option — CometChatActionsIcon is a STATIC array entry, so every
|
|
60
|
+
// message's context menu shows the SAME title/icon. onClick(id) receives the
|
|
61
|
+
// clicked message's numeric id; branch inside it if the label needs to differ
|
|
62
|
+
// (e.g. check whether `id` is already pinned before deciding what to do).
|
|
63
|
+
readonly pinOption = new CometChatActionsIcon({
|
|
64
|
+
id: 'pin-toggle',
|
|
65
|
+
title: 'Pin message',
|
|
66
|
+
iconURL: 'data:image/svg+xml;base64,…', // supply your own — the kit ships no pin icon asset
|
|
67
|
+
onClick: (id: number) => this.togglePin(id),
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
togglePin(id: number) { /* your pin/unpin logic */ }
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
```html
|
|
74
|
+
<cometchat-message-list [user]="activeUser()" [additionalOptions]="[pinOption]"></cometchat-message-list>
|
|
75
|
+
```
|
|
76
|
+
> **Known limitation, stated plainly rather than glossed over:** because `additionalOptions` is one static array shared by every message, you cannot show "Pin message" on an unpinned message and "Unpin message" on a pinned one through this input alone — every message's menu displays the identical entry. The workable pattern is a single, generically-labelled toggle (`"Pin / Unpin"`) whose shared `onClick(id)` checks the message's current pinned state and acts accordingly, or a visually different affordance elsewhere in the bubble driven by `MessageBubbleConfigService.setBubbleView()`'s `statusInfoView` slot (`references/custom-messages.md` §3) for messages you already know are pinned. Verified against the installed 5.1.0 kit: `additionalOptions: CometChatActionsIcon[]`, `CometChatActionsIcon`'s constructor takes `{ id, title, iconURL, onClick: (id: number) => void }`.
|
|
77
|
+
|
|
78
|
+
## The 10 host-composed extensions
|
|
79
|
+
`pin-message` · `save-message` · `message-shortcuts` · `voice-transcription` · `rich-media-preview` · `gifs` · `reminders` · `url-shortener` · `disappearing-messages` · `support-integrations`
|
|
80
|
+
|
|
81
|
+
> **Do not conclude a feature "does not exist" because the kit has no component and the SDK has no named method for it.** Extensions are reached through the generic `CometChat.callExtension()` — there is no `pinMessage()` to grep for. Searching `node_modules` for one will find nothing, and that is expected for the SEND/FETCH calls. Reading source **is** correct for the ONE thing the docs genuinely omit here — the response entry shape — but log the running app's response first; don't reverse-engineer it from the SDK's `.d.ts`, which describes the SDK's own classes, not this extension's ad-hoc REST payload.
|
|
82
|
+
|
|
83
|
+
Each entry in `features.angular-v5.json` carries its own `docs_topic`; `needs_stitching: true` marks all 10.
|
|
84
|
+
|
|
85
|
+
> **`docs_topic` is a PATH, not a URL.** Prefix it with `DOCS_BASE` from `cometchat-angular-v5-core/references/docs-map.md`, then append `.md`: `{DOCS_BASE}` + `/fundamentals/pin-message` + `.md`. Do **not** hardcode `https://www.cometchat.com/docs/...` — `DOCS_BASE` may point at a preview while a docs change is in flight, and a hardcoded production URL silently reads the pre-change page.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-angular-v5-migration
|
|
3
|
+
description: "Upgrade an Angular app from CometChat UI Kit v4 → v5 (`@cometchat/chat-uikit-angular` ^4 → ^5). Reads the repo's CometChat usage, applies the breaking-change map (deps, composite components removed, bare→Component renames, CometChatThemeService → CSS variables, event inputs → Outputs, DataSource → composition, localization renames), fetches the exhaustive guide, and verifies the build. Triggers: 'upgrade my v4 uikit to v5', 'migrate cometchat angular v4 to v5', 'upgrade @cometchat/chat-uikit-angular to v5', 'cometchat angular v4 to v5', 'bump cometchat angular uikit'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "Angular 17-21; FROM @cometchat/chat-uikit-angular ^4 (4.3.36) → ^5 (5.1.0–5.2.0 verified); @cometchat/chat-sdk-javascript ^4.1.13 (peer); @cometchat/cards-angular ^1.0.0 (new peer, undocumented in the official guide); @cometchat/uikit-elements/-resources/-shared removed"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat angular migration upgrade v4 v5 uikit"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** migrates an Angular app **FROM `@cometchat/chat-uikit-angular@4` TO `@5`**. v5 target symbols are catalog-verified vs installed 5.1.0; the v4→v5 breaking-change map is BAKED in `references/migration-guide.md` (distilled from the official "Upgrading From V4" guide + a real v4.3.36→v5.1.0 export diff — 146 genuine removals, 33 bare→`Component` renames, kept separate). The exhaustive per-component prop table is FETCHED from `cometchat-angular-v5-components/references/catalog.md` + the docs `.md` twins. **APPEND/transform the user's code — never wipe it; work on a branch and confirm before bulk edits** (`RULES.md`).
|
|
13
|
+
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- `cometchat-angular-v5-core` — the v5 init/login/render the migrated app lands on. This skill ASSUMES it.
|
|
16
|
+
- `cometchat-angular-v5-components` — the v5 component catalog (the target names + real inputs/outputs).
|
|
17
|
+
- `cometchat-angular-v5-placement` — how to rebuild a v4 composite from v5 modules (§2 of the migration guide points here per composite).
|
|
18
|
+
|
|
19
|
+
## Use this skill when
|
|
20
|
+
"upgrade my v4 UI Kit to v5", "migrate CometChat Angular v4→v5", "bump `@cometchat/chat-uikit-angular` to v5". Precondition: the project currently has `@cometchat/chat-uikit-angular@4`.
|
|
21
|
+
|
|
22
|
+
## Migration workflow (BAKED)
|
|
23
|
+
1. **Detect the starting point.** Confirm `package.json` has `@cometchat/chat-uikit-angular@4` (already `@5` → STOP, nothing to migrate). Note whether the app uses composite components (`…WithMessages`/`…WithDetails`), `CometChatThemeService`, `*Style` inputs, `DataSource`/`ChatConfigurator`, or custom localization keys — each drives a later step. **Work on a branch; transform in place, never delete the user's code.**
|
|
24
|
+
2. **Update dependencies.** `npm install @cometchat/chat-uikit-angular@5 @cometchat/chat-sdk-javascript@^4.1.13 @cometchat/cards-angular@^1.0.0` then `npm uninstall @cometchat/uikit-elements @cometchat/uikit-resources @cometchat/uikit-shared`. `@cometchat/cards-angular` is a genuine new 5.1.0 peer the official guide never mentions — install it or the build fails on a missing peer, not a CometChat error.
|
|
25
|
+
3. **Scan the repo for v4 usage.** Grep for every symbol in `references/migration-guide.md` §2 (composites, no-equivalent standalones, `DataSource`/decorators, the ~35 `*Style` objects) and §2b (the 33 bare-name renames) — produce the concrete change list before editing anything. A bare name is not automatically "removed"; check §2b first.
|
|
26
|
+
4. **Apply the breaking-change map** (`references/migration-guide.md`): §2/§2b symbol removals + renames, §3 theming (`CometChatThemeService` + `*Style` → CSS variables + the real `ThemeService`, **not** the official guide's own hand-rolled `matchMedia` example — see the warning in §3), §4 event-input → Output rename, §5 `DataSource`/`ChatConfigurator` → `MessageBubbleConfigService` or "nothing, it's auto-rendered," §6 drop `CUSTOM_ELEMENTS_SCHEMA` + convert to standalone, §7 optional `ChatStateService` adoption, §8 localization method renames.
|
|
27
|
+
**The baked map is a closed list, not a prop reference — FETCH the rest** (`RULES.md` § Fetch discipline; **never** `node_modules/**/*.d.ts`), routed from `cometchat-angular-v5-core/references/docs-map.md`: the **official guide** `{DOCS_BASE}/ui-kit/angular/customization/migration-guide.md` for anything the map omits; a **component's** exact inputs/outputs/slots from its own `.md` twin (Angular has no `migration-property-changes` page — there is no single prop-diff table); an **SDK method** for a capability with no v5 component (`{SDK_DOCS_BASE}/sdk/javascript/groups-overview.md` et al.) — that is where the host-composed group surfaces in step 5 come from.
|
|
28
|
+
5. **Rebuild every composite from modules.** v5 has no composite components at all — `CometChatConversationsWithMessages` etc. must become a hand-stitched surface. Use `cometchat-angular-v5-placement/references/core-surface.md` (1:1) or `combined-app.md` (tabbed) as the target shape, not a literal prop-for-prop port — the composite's *configuration options* (which v4 had many of) don't exist in v5; its *behavior* is what you're reproducing.
|
|
29
|
+
6. **Verify.** Build/typecheck passes; NO v4 symbols remain (grep `references/migration-guide.md` §2's full list); every kit component is in its consumer's `imports: []`; the app renders after init→login resolves (`cometchat-angular-v5-core/references/lifecycle.md`). Reuse `cometchat-angular-v5-core` "Verify it works".
|
|
30
|
+
|
|
31
|
+
## Common pitfalls (BAKED)
|
|
32
|
+
- **Porting the official guide's own theming example.** It shows a hand-rolled `matchMedia` listener for OS-follow — that predates the real v5 mechanism. `ThemeService.initFromPreference()` already does this; don't reintroduce v4-era manual theme-tracking code (§3).
|
|
33
|
+
- **Treating a bare v4 name as removed when it's only renamed.** Check §2b (33 bare→`Component` renames) before concluding a component is gone — most "missing" names are one word away from their v5 form.
|
|
34
|
+
- **Missing `@cometchat/cards-angular`.** Genuinely undocumented in the official migration guide; the install fails on a peer-dependency error that looks unrelated to the migration.
|
|
35
|
+
- **Forgetting `imports: []` after dropping `CUSTOM_ELEMENTS_SCHEMA`.** v4's schema tolerated unregistered elements; v5's standalone components render **nothing, silently** if omitted from `imports: []` — the single most common v5 failure mode, and migrated code is exactly where it's missed (`cometchat-angular-v5-core/SKILL.md`).
|
|
36
|
+
- **Rebuilding a composite as a literal prop-for-prop port.** v4 composites had large configuration surfaces (`*Style` objects, callback inputs) with no v5 equivalent — port the *behavior*, not the *configuration*, using `cometchat-angular-v5-placement`'s real recipes as the target.
|
|
37
|
+
- **Assuming every `DataSourceDecorator` needs `MessageBubbleConfigService`.** Some were registering a *built-in extension* (polls, stickers, translation) — v5 auto-renders most of those once enabled in the dashboard, with nothing to register (`cometchat-angular-v5-features/SKILL.md`; verify against `needs_stitching` in `features.angular-v5.json`, never assume).
|
|
38
|
+
|
|
39
|
+
## Verify it works
|
|
40
|
+
Build/typecheck is green; a repo-wide grep finds NO §2 v4 symbols (composites, `CometChatThemeService`, `DataSource`/`ChatConfigurator`, any `*Style` object, any bare §2b name unqualified); every kit component is in `imports: []`; the app renders once init→login resolves; migrated theming follows the OS via `ThemeService`, not a leftover `matchMedia` listener. Full per-component prop reference: `cometchat-angular-v5-components/references/catalog.md` + the docs `.md` twins.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# migration-guide — CometChat Angular UI Kit v4 → v5 (BAKED breaking-change map)
|
|
2
|
+
|
|
3
|
+
Distilled from the official "Upgrading From V4" guide (`ui-kit/angular/customization/migration-guide`) and a real **v4.3.36 → v5.1.0 export diff** (v4 installed and catalogued the same way as v5 — `exports-only+members`). v4 names appear in tables/prose (they no longer exist in v5); v5 code is the target.
|
|
4
|
+
|
|
5
|
+
> **This map is the BAKED half. FETCH the other half — do not substitute the installed bundle for it.**
|
|
6
|
+
> This file is deliberately a *closed list*: what was removed, what was renamed, what replaces each concept. It is **not** a prop reference and does not try to be. For anything it does not name, fetch — never read `node_modules/**/*.d.ts` and never answer from memory (`RULES.md` § Fetch discipline):
|
|
7
|
+
> - **The official guide itself**, for the narrative/checklist view and anything this map omits: `{DOCS_BASE}/ui-kit/angular/customization/migration-guide.md` (route: `cometchat-angular-v5-core/references/docs-map.md`). Read it as a cross-check, **not** as the theming source — see the §3 warning.
|
|
8
|
+
> - **A v5 component's exact inputs/outputs/view slots** → that component's own `.md` twin (docs-map "Component docs"). Angular has **no** `migration-property-changes` page like React's, so per-component props come from the component pages — there is no single prop-diff table to fetch.
|
|
9
|
+
> - **A capability with no v5 component** (the host-composed group surfaces: create/join/add-members/banned-members/transfer-ownership) → the **SDK docs**, `{SDK_DOCS_BASE}/sdk/javascript/groups-overview.md` and siblings (docs-map "SDK docs"). Every `CometChat.*` group/user method signature lives there.
|
|
10
|
+
>
|
|
11
|
+
> A v4 name absent from §2/§2b is **not** proven gone — check the v5 catalog (`cometchat-angular-v5-components/references/catalog.md`) and the component docs before telling anyone a feature was dropped.
|
|
12
|
+
|
|
13
|
+
## 0. What actually changed
|
|
14
|
+
v5 is a rewrite: v4's composite ("WithMessages"/"WithDetails") components and web-component substrate are gone, replaced by small modular standalone Angular components you stitch together — the same shape of break React went through at v6→v7. Six real breaks: (1) shared deps + `CUSTOM_ELEMENTS_SCHEMA`, (2) composite components removed (build the surface from modules — `cometchat-angular-v5-placement`), (3) `CometChatThemeService`/`*Style` objects → CSS variables, (4) event inputs → `@Output()` EventEmitters (the `on` prefix drops), (5) `DataSource`/`ChatConfigurator`/extension decorators → direct composition + `MessageBubbleConfigService` (`cometchat-angular-v5-features/references/custom-messages.md`), (6) a handful of `CometChatLocalize` method renames. Plus: adopt `ChatStateService` (optional but recommended) instead of repeating `[user]`/`[group]` on every component.
|
|
15
|
+
|
|
16
|
+
## 1. Dependencies
|
|
17
|
+
```bash
|
|
18
|
+
npm install @cometchat/chat-uikit-angular@5 @cometchat/chat-sdk-javascript@^4.1.13
|
|
19
|
+
npm uninstall @cometchat/uikit-elements @cometchat/uikit-resources @cometchat/uikit-shared
|
|
20
|
+
```
|
|
21
|
+
| Package | v4 | v5 |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `@cometchat/chat-uikit-angular` | `^4.x` | `^5.0.0` (5.1.0 verified) |
|
|
24
|
+
| `@cometchat/chat-sdk-javascript` | `^4.x` | `^4.1.13` (peer) |
|
|
25
|
+
| `@cometchat/uikit-elements` / `-resources` / `-shared` | required (web-component substrate shared across React/Angular/Vue) | **removed** — v5 is pure Angular standalone components |
|
|
26
|
+
| `@cometchat/cards-angular` | — | **new peer**, `^1.0.0` — required by 5.1.0, absent from the v4→v5 guide (a tracked docs gap, `cometchat-angular-v5-core/SKILL.md`) |
|
|
27
|
+
| Angular | v4-kit-compatible range | `>=17.0.0 <22.0.0` (verified 5.1.0; 22 hard-fails `npm install` today) |
|
|
28
|
+
|
|
29
|
+
## 2. Symbol removals — verified vs a real v4.3.36 → v5.1.0 EXPORT diff
|
|
30
|
+
> **146 v4 public exports have no v5 form under either name.** A separate 33 are **not removed** — only renamed, bare → `…Component` suffix (§2b). Don't grep-and-panic on a bare name before checking §2b first.
|
|
31
|
+
|
|
32
|
+
**Composite components — no v5 replacement; compose from modules instead.**
|
|
33
|
+
|
|
34
|
+
> **Which target shape? The v4 SOURCE decides, not preference: port to `core-surface.md` unless the v4 screen actually rendered a tab bar.** Verified against installed **4.3.36**: `cometchat-tabs` appears in exactly **one** v4 component — `CometChatContacts` — and **no composite renders an app-level tab bar**. `CometChatConversationsWithMessages` renders `cometchat-conversations` (sidebar) + `cometchat-messages` (pane) + `cometchat-contacts` (the "start conversation" **overlay**); the only tabs in that screen are Users/Groups *inside* the overlay (`CometChatContacts.tabVisibility` defaults to `TabsVisibility.usersAndGroups` — `cometchat-contacts.component.mjs:33`), which is a picker, not an app-level selector.
|
|
35
|
+
> So **every** rebuilt composite lands on `core-surface.md`. `combined-app.md` (the tabbed selector) is a **grow target — added only when the user asks**, per `cometchat-angular-v5-core/SKILL.md`'s core-vs-grow rule. Porting a composite straight onto the tabbed app invents a navigation level the v4 app never had.
|
|
36
|
+
> When the user *does* ask for tabs, build against the documented reference layout: `{DOCS_BASE}/ui-kit/angular/angular-tab-based-chat.md` (`@switch (activeTab)` over `ChatStateService`, left sidebar) — routed from `cometchat-angular-v5-core/references/docs-map.md` § Reference layouts. That page's own tab set is **one example** (Chats · Call Logs · Users), not the definitive list; `combined-app.md` ships four (chats · users · groups · calls). Compose the tabs the app needs.
|
|
37
|
+
|
|
38
|
+
(`cometchat-angular-v5-placement/references/core-surface.md` for the 1:1 pattern, `combined-app.md` only on request):
|
|
39
|
+
|
|
40
|
+
| v4 composite | Build in v5 from |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `CometChatConversationsWithMessages` | `CometChatConversationsComponent` + `CometChatMessageHeaderComponent` + `CometChatMessageListComponent` + `CometChatMessageComposerComponent`, stitched via `(itemClick)` or `ChatStateService` |
|
|
43
|
+
| `CometChatUsersWithMessages` / `CometChatGroupsWithMessages` | `CometChatUsersComponent` / `CometChatGroupsComponent` + the same message-pane trio |
|
|
44
|
+
| `CometChatMessages` | The message-pane trio alone (no list) |
|
|
45
|
+
| `CometChatThreadedMessages` | `CometChatThreadHeaderComponent` + a second `CometChatMessageListComponent` bound to `[parentMessageId]` (`cometchat-angular-v5-placement/SKILL.md` "Threaded Messages") |
|
|
46
|
+
| `CometChatCallLogsWithDetails` | `CometChatCallLogsComponent` + your own detail panel (`cometchat-angular-v5-calls`) |
|
|
47
|
+
| `CometChatDetails` | Compose your own — header + `CometChatGroupMembersComponent` for a group (`cometchat-angular-v5-placement/references/combined-app.md` "Details panel") |
|
|
48
|
+
|
|
49
|
+
**Standalone v4 components with NO v5 equivalent at all — the feature must be rebuilt, not renamed:**
|
|
50
|
+
`CometChatContacts` · `CometChatTransferOwnership` · `CometChatUserMemberWrapper` · `CometChatAddMembers` · `CometChatBannedMembers` (v5: `<cometchat-group-members>`'s built-in ban/unban view — `cometchat-angular-v5-components/references/host-composed.md`) · `CometChatCreateGroup` · `CometChatJoinGroup` (both host-composed in v5 — no kit component; same file) · `CometChatDocumentBubble` (v5 keeps only `CometChatFileBubble` for documents) · `CometChatCallLogDetails` / `-History` / `-Participants` / `-Recordings` (no v5 call-log detail sub-components at all — `cometchat-angular-v5-calls` for what v5 does ship).
|
|
51
|
+
|
|
52
|
+
**Customization-layer classes removed — the whole v4 decorator/DataSource pattern is gone:**
|
|
53
|
+
`DataSource`, `DataSourceDecorator`, `ChatConfigurator`, `ExtensionsDataSource`, `AIExtensionDataSource`, and one `*Decorator`/`*Extension` pair per built-in extension (`PollsExtensionDecorator`, `StickersExtensionDecorator`, `MessageTranslationExtensionDecorator`, `LinkPreviewExtensionDecorator`, `ImageModerationExtensionDecorator`, `TextModeratorExtensionDecorator`, `ThumbnailGenerationExtensionDecorator`, `CollaborativeDocumentExtensionDecorator`, `CollaborativeWhiteBoardExtensionDecorator`, `CallingExtensionDecorator`, `AIAssistBotDecorator`, `AIConversationStarterDecorator`, `AIConversationSummaryDecorator`, `AISmartRepliesExtensionDecorator`, and their non-`Decorator` counterparts). **v5 replacement depends on what the decorator did:** a custom message type → `MessageBubbleConfigService.setBubbleView()` (`cometchat-angular-v5-features/references/custom-messages.md`); a built-in extension (polls, stickers, translation, …) → nothing to register at all, most are auto-rendered once enabled in the dashboard (`cometchat-angular-v5-features/SKILL.md`'s classify table — verify against `needs_stitching` in `features.angular-v5.json`, never assume).
|
|
54
|
+
|
|
55
|
+
**`*Style` config-object inputs — an entire category, not individually deprecated.** Every per-component style object (`AvatarStyle`, `BadgeStyle`, `ButtonGroupStyle`, `CallscreenStyle`, `CardStyle`, `CheckboxStyle`, `ConfirmDialogStyle`, `ConversationsStyle`, `CreateGroupStyle`, `DateStyle`, `DocumentBubbleStyle`, `DropdownStyle`, `EmojiKeyboardStyle`, `FileBubbleStyle`, `FullScreenViewerStyle`, `IconStyle`, `ImageBubbleStyle`, `InputStyle`, `JoinGroupStyle`, `LabelStyle`, `ListItemStyle`, `LoaderStyle`, `MediaRecorderStyle`, `MenuListStyle`, `MessageInputStyle`, `ModalStyle`, `PanelStyle`, `PopoverStyle`, `PreviewStyle`, `QuickViewStyle`, `RadioButtonStyle`, `ReceiptStyle`, `SearchInputStyle`, `SingleSelectStyle`, `TextBubbleStyle`, `TextInputStyle`, `ThumbnailGenerationExtensionStyle` — ~35 total) is **removed**. Do not hunt for a v5 renamed form; there isn't one. Delete the input and its object, then set the same values via CSS variables (§3).
|
|
56
|
+
|
|
57
|
+
**Small v4 UI atoms/primitives with no direct v5 export** (were public in v4, are internal to their host component in v5, OR have a differently-shaped v5 counterpart worth checking against the catalog before assuming gone): `CometChatIcon`, `CometChatLabel`, `CometChatInput`, `CometChatTextInput`, `CometChatSearchInput`, `CometChatDropdown`, `CometChatSingleSelect`, `CometChatModal`, `CometChatPanel`, `CometChatLoader`, `CometChatDivider`, `CometChatBackdrop`, `CometChatDraggable`, `CometChatQuickView`, `CometChatPreview`, `CometChatStatusIndicator`, `CometChatMenuList`, `CometChatList`, `CometChatReceipt`, `CometChatMessageInput`, `CometChatCard`. If one of these was load-bearing in the v4 app, check `cometchat-angular-v5-components/references/catalog.md` for a same-purpose v5 atom (`CometChatButtonComponent`, `CometChatAvatarComponent`, `CometChatDateComponent`, `CometChatPopoverComponent`, `CometChatCheckboxComponent`, `CometChatListItemComponent` cover several of these) before concluding the feature is gone.
|
|
58
|
+
|
|
59
|
+
## 2b. Renames — bare v4 name → `…Component` suffix, SAME component (33)
|
|
60
|
+
Not a removal. v4 exported the bare class name directly; v5's export always carries the `Component` suffix (the bare form is internal-only — `cometchat-angular-v5-core/SKILL.md` "Class name ≠ selector ≠ docs title"). Mechanical `sed`-safe rename, one for one:
|
|
61
|
+
|
|
62
|
+
`CometChatConversations` · `CometChatUsers` · `CometChatGroups` · `CometChatGroupMembers` · `CometChatMessageHeader` · `CometChatMessageList` · `CometChatMessageComposer` · `CometChatMessageBubble` · `CometChatMessageInformation` · `CometChatIncomingCall` · `CometChatOutgoingCall` · `CometChatOngoingCall` · `CometChatCallButtons` · `CometChatCallLogs` · `CometChatAvatar` · `CometChatButton` · `CometChatCheckbox` · `CometChatRadioButton` · `CometChatDate` · `CometChatPopover` · `CometChatContextMenu` · `CometChatActionSheet` · `CometChatConfirmDialog` · `CometChatChangeScope` · `CometChatFullScreenViewer` · `CometChatEmojiKeyboard` · `CometChatMediaRecorder` · `CometChatListItem` · `CometChatTextBubble` · `CometChatImageBubble` · `CometChatVideoBubble` · `CometChatAudioBubble` · `CometChatFileBubble`
|
|
63
|
+
|
|
64
|
+
Each rename adds the `Component` suffix to both the import and every usage site — e.g. `import { CometChatConversations } from '@cometchat/chat-uikit-angular'` becomes `import { CometChatConversationsComponent } from '@cometchat/chat-uikit-angular'`. Selectors are unaffected (kebab-case, unrelated to the class name).
|
|
65
|
+
|
|
66
|
+
## 2c. One rename outside the pattern — theming's entry point
|
|
67
|
+
`CometChatThemeService` (v4) → **`ThemeService`** (v5, `CometChat` prefix dropped — the one exception to §2b's suffix rule, because the whole theming *mechanism* changed too, not just the export name). See §3.
|
|
68
|
+
|
|
69
|
+
## 3. Theming — `CometChatThemeService` + `*Style` objects → CSS variables + `ThemeService`
|
|
70
|
+
v4 injected `CometChatThemeService` and called `theme.palette.setPrimary(...)`/`setMode(...)`; per-component `*Style` inputs (§2) covered everything CSS couldn't. v5 removes BOTH mechanisms — theming is CSS variables, full stop:
|
|
71
|
+
```css
|
|
72
|
+
/* styles.css */
|
|
73
|
+
@import '@cometchat/chat-uikit-angular/styles/css-variables.css';
|
|
74
|
+
|
|
75
|
+
.cometchat {
|
|
76
|
+
--cometchat-primary-color: #f76808;
|
|
77
|
+
--cometchat-neutral-color-300: #ffffff;
|
|
78
|
+
}
|
|
79
|
+
@media (prefers-color-scheme: dark) {
|
|
80
|
+
.cometchat {
|
|
81
|
+
--cometchat-primary-color: #f76808;
|
|
82
|
+
--cometchat-neutral-color-300: #311502;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
> ⚠️ **The official migration guide's own OS-theme-follow example is a hand-rolled `matchMedia` listener — do not port it.** That recipe predates the real v5 mechanism. `ThemeService` (verified against the installed 5.1.0 kit) already does this natively: `initFromPreference()` reads `prefers-color-scheme` on construction and keeps its own `matchMedia` listener live; `setTheme('dark' | 'light')` / `toggleTheme()` set it manually. It writes `data-theme` on `<html>` through Angular's `DOCUMENT` token — SSR-safe. Use it instead of migrating the guide's own snippet (`cometchat-angular-v5-core/references/theming.md`, `cometchat-angular-v5-customization/SKILL.md`). **Known kit divergence, not this pack's error:** `ThemeService`'s own docstrings additionally claim it persists a manual choice to `localStorage` — it does not (`AUDIT-143`, owner uikit). Don't port v4 persistence logic expecting v5's service to already do it.
|
|
87
|
+
|
|
88
|
+
## 4. Event inputs → `@Output()` EventEmitters, `on` prefix dropped
|
|
89
|
+
| v4 (callback input) | v5 (`@Output()`) |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `[onItemClick]="handler"` | `(itemClick)="handler($event)"` |
|
|
92
|
+
| `[onSelect]="handler"` | `(select)="handler($event)"` |
|
|
93
|
+
| `[onError]="handler"` | `(error)="handler($event)"` |
|
|
94
|
+
| `[onBack]="handler"` | `(backClick)="handler()"` |
|
|
95
|
+
| `[onThreadRepliesClick]="handler"` | `(threadRepliesClick)="handler($event)"` |
|
|
96
|
+
Mechanical per call site — drop `on`, lower-case the first letter after, move from `[ ]` to `( )`, add `($event)` if the v4 handler took an argument. **Verify the exact v5 output name against `cometchat-angular-v5-components/SKILL.md`'s per-component table before assuming a 1:1 drop-the-prefix match** — a few renamed further (`onBack` → `backClick`, not `back`).
|
|
97
|
+
|
|
98
|
+
## 5. `DataSource`/`ChatConfigurator` → direct composition
|
|
99
|
+
```diff
|
|
100
|
+
- class MyDecorator extends DataSourceDecorator { getTextMessageBubble() { /* … */ } }
|
|
101
|
+
- ChatConfigurator.enable(new MyDecorator());
|
|
102
|
+
```
|
|
103
|
+
```ts
|
|
104
|
+
import { MessageBubbleConfigService } from '@cometchat/chat-uikit-angular';
|
|
105
|
+
import { TemplateRef, inject } from '@angular/core';
|
|
106
|
+
|
|
107
|
+
class ChatComponent {
|
|
108
|
+
private bubbleConfig = inject(MessageBubbleConfigService);
|
|
109
|
+
myBubble!: TemplateRef<unknown>;
|
|
110
|
+
|
|
111
|
+
registerBubble() {
|
|
112
|
+
// v5: register a template against the message TYPE_CATEGORY key — see
|
|
113
|
+
// custom-messages.md for send/fetch/render and the {type}_{category} key-format trap.
|
|
114
|
+
this.bubbleConfig.setBubbleView('order_update_custom', { contentView: this.myBubble });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
Full pattern — including the local-echo requirement raw SDK sends need (`publishMessageSent`) and the `{type}_{category}` key rule: `cometchat-angular-v5-features/references/custom-messages.md`.
|
|
119
|
+
|
|
120
|
+
## 6. Shared web-component packages removed — pure standalone components now
|
|
121
|
+
```diff
|
|
122
|
+
- import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
123
|
+
- import "@cometchat/uikit-elements"; // side-effect import
|
|
124
|
+
- @NgModule({ imports: [CometChatConversations], schemas: [CUSTOM_ELEMENTS_SCHEMA] })
|
|
125
|
+
```
|
|
126
|
+
```ts
|
|
127
|
+
// v5: standalone, no schema, no side-effect import, full type safety
|
|
128
|
+
import { Component } from '@angular/core';
|
|
129
|
+
import { CometChatConversationsComponent } from '@cometchat/chat-uikit-angular';
|
|
130
|
+
|
|
131
|
+
@Component({ standalone: true, imports: [CometChatConversationsComponent], template: `<cometchat-conversations></cometchat-conversations>` })
|
|
132
|
+
export class ChatComponent {}
|
|
133
|
+
```
|
|
134
|
+
Every component must be in the consuming component's `imports: []` or it renders nothing, silently — the #1 v5 failure mode (`cometchat-angular-v5-core/SKILL.md`).
|
|
135
|
+
|
|
136
|
+
## 7. State management — `ChatStateService` (optional, recommended)
|
|
137
|
+
v4 repeated `[user]`/`[group]` on every component. v5's `ChatStateService` (verified: `setActiveUser`/`setActiveGroup`/`setActiveConversation`/`activeUser`/`activeGroup`/`activeConversation` signals/`clearActiveChat`) centralizes it — set once, every subscribed component reacts. Explicit `[user]`/`[group]` props still work and take priority when passed, so this is additive, not required. Full pattern: `cometchat-angular-v5-placement/references/core-surface.md`.
|
|
138
|
+
|
|
139
|
+
## 8. Localization — method renames, not a new system
|
|
140
|
+
Both majors use `CometChatLocalize`; the class survives, some methods don't:
|
|
141
|
+
|
|
142
|
+
| v4 method | v5 method |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `CometChatLocalize.setLocale("hi")` | `CometChatLocalize.setCurrentLanguage("hi")` |
|
|
145
|
+
| `CometChatLocalize.getLocale()` | `CometChatLocalize.getCurrentLanguage()` |
|
|
146
|
+
| `CometChatLocalize.init()` | not needed — auto-initializes |
|
|
147
|
+
|
|
148
|
+
v5 adds a `translate` pipe (`{{ 'SEND_MESSAGE' | translate }}`) and expands to 19 languages (from 12). Verified in the angular-v5 catalog: `setCurrentLanguage`/`getCurrentLanguage` exist, `setLocale` does not.
|
|
149
|
+
|
|
150
|
+
## Quick migration checklist
|
|
151
|
+
- [ ] `npm install @cometchat/chat-uikit-angular@5 @cometchat/chat-sdk-javascript@^4.1.13 @cometchat/cards-angular@^1.0.0` (the last is an undocumented new 5.1.0 peer — see §1)
|
|
152
|
+
- [ ] `npm uninstall @cometchat/uikit-elements @cometchat/uikit-resources @cometchat/uikit-shared`
|
|
153
|
+
- [ ] Remove `CUSTOM_ELEMENTS_SCHEMA` + any `import "@cometchat/uikit-elements"` side-effect import
|
|
154
|
+
- [ ] Convert to standalone components; every kit component in `imports: []` (§6)
|
|
155
|
+
- [ ] Rebuild every composite (`…WithMessages`, `…WithDetails`, `CometChatThreadedMessages`) from modules (§2)
|
|
156
|
+
- [ ] Grep for the 33 §2b bare names → add `Component` suffix
|
|
157
|
+
- [ ] Grep for `CometChatThemeService` → `ThemeService`, migrate to CSS variables + `initFromPreference()` (§3) — not the guide's own `matchMedia` example
|
|
158
|
+
- [ ] Delete every `*Style` input + object (§2), replace with CSS variable overrides
|
|
159
|
+
- [ ] Grep for `[onXxx]` inputs → `(xxx)` outputs (§4)
|
|
160
|
+
- [ ] Grep for `DataSource`/`DataSourceDecorator`/`ChatConfigurator`/`*Extension(Decorator)` → `MessageBubbleConfigService` or "nothing, it's auto-rendered" per §5
|
|
161
|
+
- [ ] Optionally adopt `ChatStateService` (§7)
|
|
162
|
+
- [ ] Grep for `setLocale`/`getLocale`/`CometChatLocalize.init()` → §8 renames
|
|
163
|
+
- [ ] Build/typecheck green; grep confirms **zero** §2 names remain; app renders after `init→login`
|
|
164
|
+
|
|
165
|
+
> **For anything not listed above, FETCH — do not guess and do not read the installed bundle.** The official guide (`{DOCS_BASE}/ui-kit/angular/customization/migration-guide.md`), the target component's `.md` twin, or the SDK page for a host-composed capability — all routed from `cometchat-angular-v5-core/references/docs-map.md`. Do NOT infer a v4→v5 mapping from `node_modules/**/*.d.ts`: the bundle tells you a symbol's *shape*, never whether it is the *sanctioned* replacement, and a `declare class` that isn't publicly exported reads identically to one that is (`CometChatSoundManager`, AUDIT-152).
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-angular-v5-patterns
|
|
3
|
+
description: "Angular project-shape glue for CometChat — Angular CLI vs Nx, standalone vs NgModule, environment file wiring, SSR/Angular Universal, lazy routes, and RxJS/signals state patterns. Triggers: 'add cometchat to my nx workspace', 'ngmodule not standalone', 'angular universal ssr', 'lazy load the chat route', 'window is not defined'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "@cometchat/chat-uikit-angular ^5 (5.1.0–5.2.0 verified); Angular 17-21; CLI or Nx"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat angular patterns v5 nx ssr universal ngmodule standalone lazy rxjs signals"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** this skill is Angular PROJECT-SHAPE glue — CLI vs Nx, standalone vs NgModule, `environment.ts`, SSR, lazy routes. CometChat API surface belongs to `cometchat-angular-v5-core`; fetch any symbol via `cometchat-angular-v5-core/references/docs-map.md`. Where the Angular UI Kit docs genuinely do not cover a shape (SSR / Angular Universal), this file says so explicitly and marks the guidance as the pack's own — absence from the guide is never silently presented as documented.
|
|
13
|
+
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- `cometchat-angular-v5-core` — install, credentials, `init→login→render`. Assumed.
|
|
16
|
+
- `cometchat-angular-v5-placement` — routing a chat page.
|
|
17
|
+
|
|
18
|
+
## Use this skill when
|
|
19
|
+
The blocker is the **project shape**, not CometChat: a monorepo, NgModules, SSR, or where config lives.
|
|
20
|
+
|
|
21
|
+
## Detect the shape first
|
|
22
|
+
| Signal | Shape | Deltas |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| `nx.json` present | **Nx workspace** | env files, project-level `styles`, path aliases |
|
|
25
|
+
| `angular.json` + `src/main.ts` | **Angular CLI** | the default; core's recipe applies as-is |
|
|
26
|
+
| `app.module.ts` present | **NgModule** app | components go in `imports:` of the module |
|
|
27
|
+
| `server.ts` / `@angular/ssr` | **SSR / Universal** | browser-only guards, see below |
|
|
28
|
+
|
|
29
|
+
## NgModule instead of standalone
|
|
30
|
+
The kit's components are standalone, which means an NgModule app imports them into the module's `imports` array — the same array, a different file:
|
|
31
|
+
```ts
|
|
32
|
+
// app.module.ts
|
|
33
|
+
import { NgModule } from '@angular/core';
|
|
34
|
+
import { CometChatConversationsComponent, CometChatMessageListComponent } from '@cometchat/chat-uikit-angular';
|
|
35
|
+
import { ChatComponent } from './chat/chat.component'; // YOUR (non-standalone) component
|
|
36
|
+
|
|
37
|
+
@NgModule({
|
|
38
|
+
declarations: [ChatComponent],
|
|
39
|
+
imports: [CometChatConversationsComponent, CometChatMessageListComponent],
|
|
40
|
+
})
|
|
41
|
+
export class AppModule {}
|
|
42
|
+
```
|
|
43
|
+
Do not add them to `declarations` — they are not yours to declare, and Angular will error. Init moves from `main.ts` into an `APP_INITIALIZER` provider on the module.
|
|
44
|
+
|
|
45
|
+
## Nx workspaces
|
|
46
|
+
Three things move:
|
|
47
|
+
- **Environment files** live under the app project, e.g. `apps/<app>/src/environments/environment.ts`. `fileReplacements` go in that project's `project.json`, not a root `angular.json`.
|
|
48
|
+
- **The kit stylesheet** is registered in the app project's build `styles` array with a workspace-root-relative path: `node_modules/@cometchat/chat-uikit-angular/styles/css-variables.css`.
|
|
49
|
+
- **Shared wrapper libs** may re-export the kit's components; a lib that re-exports must also list them in its own `imports`, or consumers get the silent no-render.
|
|
50
|
+
|
|
51
|
+
Nx does not change the CometChat API at all — only where config lives.
|
|
52
|
+
|
|
53
|
+
## SSR / Angular Universal
|
|
54
|
+
The kit is a browser client. The SDK touches `window`, `localStorage` and WebSockets, none of which exist on the server.
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { Component, inject, PLATFORM_ID } from '@angular/core';
|
|
58
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
59
|
+
import { CometChatUIKit } from '@cometchat/chat-uikit-angular';
|
|
60
|
+
import { environment } from '../environments/environment';
|
|
61
|
+
|
|
62
|
+
@Component({ selector: 'app-root', standalone: true, template: '<router-outlet />' })
|
|
63
|
+
export class AppComponent {
|
|
64
|
+
constructor() {
|
|
65
|
+
if (isPlatformBrowser(inject(PLATFORM_ID))) {
|
|
66
|
+
const { appId, region, authKey } = environment.cometchat;
|
|
67
|
+
// init only in the browser — on the server this throws "window is not defined"
|
|
68
|
+
CometChatUIKit.initFromSettings({
|
|
69
|
+
appId, region,
|
|
70
|
+
credentials: { authKey },
|
|
71
|
+
chatSDK: { presenceSubscription: { type: 'ALL_USERS' } },
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
Rules:
|
|
78
|
+
- Guard **every** init/login call with `isPlatformBrowser`.
|
|
79
|
+
- Render chat components client-side only (`@defer` on hydration, or an `*ngIf` on a browser flag). Server-rendering them produces markup that immediately mismatches.
|
|
80
|
+
- `ThemeService` is already SSR-safe — it writes `data-theme` through the `DOCUMENT` token rather than touching `document` directly.
|
|
81
|
+
- Do not attempt to prerender a chat route; there is nothing meaningful to prerender.
|
|
82
|
+
|
|
83
|
+
> **Not in the docs.** The Angular UI Kit docs do not cover SSR / Angular Universal. The guards above are derived from what the SDK touches (`window`, `localStorage`, WebSockets) and are the pack's own guidance — absence from the guide is not a signal that they are unnecessary.
|
|
84
|
+
|
|
85
|
+
## Lazy-loading the chat route
|
|
86
|
+
```ts
|
|
87
|
+
{ path: 'chat', loadComponent: () => import('./chat/chat.component').then(m => m.ChatComponent) }
|
|
88
|
+
```
|
|
89
|
+
Lazy loading the route is fine and recommended — the kit is large. Init still happens once at bootstrap, **not** in the lazy chunk, or the first navigation pays for it and a second navigation re-runs it.
|
|
90
|
+
|
|
91
|
+
## State — signals or RxJS, one of them
|
|
92
|
+
`ChatStateService` exposes both (`activeUser` signal, `activeUser$` observable). Pick one style per component and stay in it; mixing produces two update paths for the same value.
|
|
93
|
+
|
|
94
|
+
- Signals in templates: no subscription, no teardown, no `async` pipe.
|
|
95
|
+
- Observables when composing with other streams: always `takeUntil(destroy$)` in `ngOnDestroy`.
|
|
96
|
+
|
|
97
|
+
Never mirror either into your own field — see `placement`'s "two sources of truth" pitfall.
|
|
98
|
+
|
|
99
|
+
## Common pitfalls
|
|
100
|
+
1. **Kit components in `declarations`** → Angular error; they belong in `imports`.
|
|
101
|
+
2. **Unguarded init under SSR** → `window is not defined` at build or first request.
|
|
102
|
+
3. **Init inside a lazy chunk** → runs late, or twice.
|
|
103
|
+
4. **Nx: env/styles edited at the workspace root** → silently no effect; they belong to the app project.
|
|
104
|
+
5. **Signals and observables for the same value** → two update paths, drifting UI.
|
|
105
|
+
|
|
106
|
+
## Verify it works
|
|
107
|
+
`ng build` (and `ng build --ssr` where applicable) passes · chat renders in the browser · no `window is not defined` on the server · navigating to the lazy route once initialises once · config resolves in every configuration you build.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-angular-v5-placement
|
|
3
|
+
description: "Where CometChat components go in an Angular app — the chat shell layout, thread and details panels, search, routing a chat page, and the mobile one-pane fallback. Triggers: 'add a chat page', 'put chat in my dashboard', 'conversation list beside messages', 'open a thread panel', 'chat route', 'make chat responsive'."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "@cometchat/chat-uikit-angular ^5 (5.1.0–5.2.0 verified); Angular 17-21"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat angular placement v5 layout routing panels responsive shell"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** `@cometchat/chat-uikit-angular@5` (5.1.0–5.2.0 verified). Uses only components in the `angular-v5` catalog. The layouts here are built FROM the live task guides — `{DOCS_BASE}/ui-kit/angular/guides/new-chat.md`, `/guides/group-chat.md`, `/guides/threaded-messages.md`, `/guides/search-messages.md`, plus `/angular-conversation`, `/angular-one-to-one-chat`, `/angular-tab-based-chat` and `/api-reference/chat-state-service.md`; base + paths in `cometchat-angular-v5-core/references/docs-map.md`. Fetch layout-specific inputs from the component's `.md` twin rather than reading the installed bundle. **APPEND to the user's app — additive only** (`RULES.md`).
|
|
13
|
+
|
|
14
|
+
## Companion skills (read first)
|
|
15
|
+
- `cometchat-angular-v5-core` — install, credentials, `init→login→render`, and `references/layout.md` for the sizing rules this skill assumes.
|
|
16
|
+
- `cometchat-angular-v5-components` — which component to use and its real inputs/outputs.
|
|
17
|
+
|
|
18
|
+
## Use this skill when
|
|
19
|
+
Deciding **where** chat lives: a dedicated route, a panel inside an existing dashboard, a widget, or the full multi-pane app.
|
|
20
|
+
|
|
21
|
+
## Pick a placement
|
|
22
|
+
| Ask | Placement | Recipe |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| "add chat to my app" (unscoped) | **Core surface** — list + message pane, thread and search as panels | `references/core-surface.md` |
|
|
25
|
+
| "the whole chat app" — users, groups, calls, details | **Combined app** — tabbed selector + panels | `references/combined-app.md` |
|
|
26
|
+
| "chat inside my dashboard" | Embed the core surface in an existing layout slot | below |
|
|
27
|
+
| "a support widget" | Single conversation — header + list + composer, no list pane | below |
|
|
28
|
+
|
|
29
|
+
Default to the **core surface** for an unscoped request. Grow to the combined app only when asked.
|
|
30
|
+
|
|
31
|
+
## Active item — use ChatStateService, not your own field
|
|
32
|
+
Angular ships an injectable source of truth for the active chat. It exposes **signals** and **observables**; prefer signals in templates. This is what satisfies "the selected row is visually reflected" and makes panel-close round-trip correctly.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { Component, computed, inject } from '@angular/core';
|
|
36
|
+
import { CometChat } from '@cometchat/chat-sdk-javascript';
|
|
37
|
+
import { ChatStateService, CometChatUIKitConstants } from '@cometchat/chat-uikit-angular';
|
|
38
|
+
|
|
39
|
+
@Component({ selector: 'app-chat-shell', standalone: true, template: '' })
|
|
40
|
+
export class ChatShellComponent {
|
|
41
|
+
readonly chatState = inject(ChatStateService);
|
|
42
|
+
// The service's signals are `T | null`, but the kit's inputs are optional
|
|
43
|
+
// (`T | undefined`) — bind the raw signal and Angular's strict template check
|
|
44
|
+
// rejects it. Normalise once, here.
|
|
45
|
+
readonly activeUser = computed(() => this.chatState.activeUser() ?? undefined);
|
|
46
|
+
readonly activeGroup = computed(() => this.chatState.activeGroup() ?? undefined);
|
|
47
|
+
|
|
48
|
+
// (itemClick) emits a Conversation — resolve the subject, then branch on its TYPE.
|
|
49
|
+
// A Conversation has no getGuid(), so duck-typing routes groups into the user slot
|
|
50
|
+
// and the message pane throws "getUid is not a function". See references/core-surface.md.
|
|
51
|
+
open(conversation: CometChat.Conversation) {
|
|
52
|
+
const subject = conversation.getConversationWith();
|
|
53
|
+
if (conversation.getConversationType() === CometChatUIKitConstants.MessageReceiverType.group) {
|
|
54
|
+
this.chatState.setActiveGroup(subject as CometChat.Group);
|
|
55
|
+
} else {
|
|
56
|
+
this.chatState.setActiveUser(subject as CometChat.User);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
closeChat() { this.chatState.clearActiveChat(); }
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
Available: `activeUser` `activeGroup` `activeConversation` (signals) · `activeUser$` `activeGroup$` `activeConversation$` (observables) · `setActiveUser/Group/Conversation` · `getActiveChatEntity()` · `clearActiveChat()`.
|
|
63
|
+
|
|
64
|
+
Keeping a separate `selected` field alongside this is how the two drift and the list stops highlighting the open conversation.
|
|
65
|
+
|
|
66
|
+
## Panels are columns, not overlays
|
|
67
|
+
Thread, user/group details and search are **additional columns in the same flex shell**. Opening one must not resize or remount the message list, and closing must return to the exact prior layout.
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<div class="cc-shell">
|
|
71
|
+
<aside class="cc-side"><!-- list --></aside>
|
|
72
|
+
<main class="cc-main"><!-- header · list · composer --></main>
|
|
73
|
+
<aside class="cc-panel" *ngIf="threadParent()"><!-- thread --></aside>
|
|
74
|
+
</div>
|
|
75
|
+
```
|
|
76
|
+
```css
|
|
77
|
+
.cc-shell { display: flex; height: 100dvh; width: 100%; min-height: 0; overflow: hidden; }
|
|
78
|
+
.cc-side { width: 320px; min-height: 0; overflow: hidden; }
|
|
79
|
+
.cc-main { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
|
|
80
|
+
.cc-panel { width: 360px; min-height: 0; overflow: hidden; border-left: 1px solid var(--cometchat-border-color-default); }
|
|
81
|
+
```
|
|
82
|
+
`min-height: 0` on every column is required — see core's `references/layout.md`.
|
|
83
|
+
|
|
84
|
+
## Routing a chat page
|
|
85
|
+
```ts
|
|
86
|
+
// app.routes.ts
|
|
87
|
+
import { Routes } from '@angular/router';
|
|
88
|
+
export const routes: Routes = [
|
|
89
|
+
{ path: 'chat', loadComponent: () => import('./chat/chat.component').then(m => m.ChatComponent) },
|
|
90
|
+
{ path: 'chat/:uid', loadComponent: () => import('./chat/chat.component').then(m => m.ChatComponent) },
|
|
91
|
+
];
|
|
92
|
+
```
|
|
93
|
+
Two rules:
|
|
94
|
+
1. **Do not re-init CometChat per route.** Init happens once at bootstrap (core). A route guard may await login, never re-init.
|
|
95
|
+
2. **Tear down on leave.** Every subscription in the chat component needs `takeUntil(destroy$)` in `ngOnDestroy`, or navigating away leaks listeners that keep firing.
|
|
96
|
+
|
|
97
|
+
Reading `:uid` into the active chat belongs in the component's `ngOnInit`, resolved through `ChatStateService`.
|
|
98
|
+
|
|
99
|
+
## Embedding in an existing dashboard
|
|
100
|
+
Give the host slot a resolved height and let the shell fill it — do **not** put the kit inside a container sized by its content.
|
|
101
|
+
```css
|
|
102
|
+
.dashboard-chat-slot { height: calc(100dvh - var(--app-header-height)); min-height: 0; display: flex; }
|
|
103
|
+
```
|
|
104
|
+
If the surrounding app uses `transform` or `filter` on an ancestor, the height chain breaks — core's `layout.md` covers why.
|
|
105
|
+
|
|
106
|
+
## Mobile — one pane at a time (mandatory for any multi-pane layout)
|
|
107
|
+
Below ~768px show the list **or** the conversation, never both.
|
|
108
|
+
```html
|
|
109
|
+
<div class="cc-shell">
|
|
110
|
+
<aside class="cc-side" [hidden]="isMobile() && hasActiveChat()"><!-- list --></aside>
|
|
111
|
+
<main class="cc-main" [hidden]="isMobile() && !hasActiveChat()"><!-- message pane --></main>
|
|
112
|
+
</div>
|
|
113
|
+
```
|
|
114
|
+
Drive `[hidden]` from the same `ChatStateService` state as the message components, and give the mobile conversation view a back control that calls `clearActiveChat()`. A multi-pane layout squeezed onto a phone is a defect, not a style choice.
|
|
115
|
+
|
|
116
|
+
## Common pitfalls
|
|
117
|
+
1. **Two sources of truth** — a local `selected` field plus `ChatStateService`. They drift; the list stops highlighting.
|
|
118
|
+
2. **Panels as overlays** — thread rendered over the list instead of beside it, so closing does not restore layout.
|
|
119
|
+
3. **Re-initialising per route** — init belongs at bootstrap, once.
|
|
120
|
+
4. **No teardown on navigate** — leaked listeners keep firing against a destroyed view.
|
|
121
|
+
5. **Unsized embed slot** — the kit collapses to zero height inside a content-sized container.
|
|
122
|
+
6. **Both panes on mobile** — unusable at 375px.
|
|
123
|
+
|
|
124
|
+
## Verify it works
|
|
125
|
+
Clicking a conversation opens it AND highlights the row · opening a thread does not resize the message list · closing returns to the exact prior layout · navigating away and back does not duplicate messages · at 375px only one pane is visible with a working back control · no console errors.
|
|
126
|
+
|
|
127
|
+
## Explain what you built (REQUIRED close)
|
|
128
|
+
Tell the developer what changed, naming the files: the layout you built — which panes exist, and how the mobile one-pane fallback behaves. Flag anything dev-only as dev-only, and say what you did **not** touch — this is additive.
|
|
129
|
+
|
|
130
|
+
**Then offer these THREE options as a SELECTABLE choice and WAIT for the pick — never auto-continue (`RULES.md` §19):**
|
|
131
|
+
1. **Add another feature** → a feature from `features.angular-v5.json`, or growing the surface — users/groups tabs, a details panel, calling. **Never offer an `auto` entry** (reactions, mentions, receipts, typing, media) — those are core in v5 and already on.
|
|
132
|
+
2. **Customize theming** → `cometchat-angular-v5-customization`.
|
|
133
|
+
3. **Test it manually** → do nothing further; hand back so the user runs it.
|