@naniteninja/dashboard-components-lib 2.3.4 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,95 +1,86 @@
|
|
|
1
1
|
# @naniteninja/dashboard-components-lib
|
|
2
2
|
|
|
3
|
-
Angular
|
|
3
|
+
Shared Angular/Ionic UI component library for the Cyrano dashboard ecosystem.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Purpose
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
```
|
|
7
|
+
This library provides reusable UI components for messaging, scheduling, progress visualization, and match management. It is consumed by the Cyrano frontend application.
|
|
8
|
+
|
|
9
|
+
## Key Interfaces
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
| Interface | Purpose |
|
|
12
|
+
|-----------|---------|
|
|
13
|
+
| `IMessage` | Single chat message (sender, message, timestamp, attachments, sendOptions, origin) |
|
|
14
|
+
| `IProspectData` | Per-match messaging state aligned with CyranoServer Chat document |
|
|
15
|
+
| `ILibClientMatchOverview` | Dashboard card model: display profiles + prospectData + matchRequest |
|
|
16
|
+
| `IChatSuggestion` | LLM-generated conversation suggestion |
|
|
17
|
+
| `IAttachment` | Image/GIF attachment on messages |
|
|
18
|
+
| `ISendOptionsMessage` | Delayed/immediate send scheduling options |
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
## Architecture
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
The library is **WebSocket-free** — it receives data and emits events, but does NOT manage network connections:
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
- **Host app (Cyrano)** owns: WebSocket connections, API calls, state management (BehaviorSubjects), server-to-UI data transformation
|
|
25
|
+
- **This library** owns: UI rendering, display grouping (messages by day), progress visualization, user interaction events
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
|------|---------|
|
|
24
|
-
| `IMessage` | Fundamental message unit |
|
|
25
|
-
| `IAttachment` | Message media |
|
|
26
|
-
| `ISendOptionsMessage` | Send timing preferences |
|
|
27
|
-
| `IChatSuggestion` | LLM suggestion entry |
|
|
28
|
-
| `SenderTypes` | `user` / `other` enum |
|
|
29
|
-
| `SendMessageType` | Send timing enum |
|
|
30
|
-
| `MatcherStatuses` | Pipeline status funnel |
|
|
27
|
+
## Primary Components
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
| Component | Selector | Purpose |
|
|
30
|
+
|-----------|----------|---------|
|
|
31
|
+
| `ChatComponent` | `lib-chat` | Full chat UI with message display, input, GIF picker |
|
|
32
|
+
| `LibClientHomeComponent` | `lib-client-home` | Main dashboard shell with tabs |
|
|
33
|
+
| `LibClientMatchOverviewComponent` | `lib-client-match-overview` | Prospect card with progress rings |
|
|
34
|
+
| `MatcherStatusesComponent` | `lib-matcher-statuses` | Status ladder with embedded chat |
|
|
35
|
+
| `ClientViewportComponent` | `lib-client-viewport` | Client-side full viewport shell |
|
|
36
|
+
| `MatcherViewportComponent` | `lib-matcher-viewport` | Matcher-side full viewport shell |
|
|
37
|
+
| `LibHandoffPanelComponent` | `lib-handoff-panel` | Multi-tab handoff (messages, schedule, date prep) |
|
|
38
|
+
| `LibSchedulerComponent` | `lib-scheduler` | Date booking UI |
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
|------|---------|
|
|
36
|
-
| `IProspectData` | Chat/prospect card payload (+ UI-only fields like `llmPreferenceLoading$`) |
|
|
37
|
-
| `ILibClientMatchOverview` | Client match overview envelope |
|
|
38
|
-
| `IDashboardMatchRequest` | Match request metadata |
|
|
39
|
-
| `ISchedulerEvent` | Calendar events |
|
|
40
|
-
| `IChartData` | Compatibility chart data |
|
|
41
|
-
| `IConversationFlag` | Unresponsive/redelegation flags |
|
|
40
|
+
## Data Flow
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
```
|
|
43
|
+
Host App (Cyrano)
|
|
44
|
+
-> Provides ILibClientMatchOverview[] via config/inputs
|
|
45
|
+
-> lib-client-viewport / lib-matcher-viewport
|
|
46
|
+
-> lib-client-home
|
|
47
|
+
-> lib-chat (displays IMessage[], emits sendMessage)
|
|
48
|
+
-> lib-matcher-statuses (displays status progression)
|
|
49
|
+
-> lib-scheduler (displays schedule events)
|
|
50
|
+
-> lib-spider-chart (compatibility visualization)
|
|
51
|
+
```
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|------|------|---------|
|
|
47
|
-
| `CONVERSATION_FLAG` | `enums/conversation-flag.enum.ts` | Unresponsive / redelegation |
|
|
48
|
-
| `COUNTER_FLAG_BASE` | `enums/counter-flag-base.enum.ts` | Flag timing base |
|
|
53
|
+
## Consuming from a Host App
|
|
49
54
|
|
|
50
|
-
|
|
55
|
+
1. Import `LibChatComponentModule` or viewport modules
|
|
56
|
+
2. Provide `ILibClientMatchOverview[]` data (typically from a BehaviorSubject)
|
|
57
|
+
3. Handle output events: `addMessage`, `getMessages`, status changes
|
|
58
|
+
4. Transform server data to library interfaces using a mapper utility (e.g. `buildClientMatchOverviews`)
|
|
51
59
|
|
|
52
|
-
|
|
53
|
-
|-----------|----------|---------|
|
|
54
|
-
| `ChatComponent` | `lib-chat` | Message list + input with virtual scroll |
|
|
55
|
-
| `ClientHomeComponent` | `lib-client-home` | Client dashboard shell |
|
|
56
|
-
| `ClientViewportComponent` | `lib-client-viewport` | Tabbed viewport (chat, scheduler, suggestions) |
|
|
57
|
-
| `MatcherViewportComponent` | `lib-matcher-viewport` | Matcher dashboard viewport |
|
|
58
|
-
| `DashboardSwipeableTabsComponent` | `lib-dashboard-swipeable-tabs` | Prospect card swipe strip |
|
|
59
|
-
| `MatcherStatusesComponent` | `lib-matcher-statuses` | Status milestone ladder |
|
|
60
|
-
| `ChatSuggestionComponent` | `lib-chat-suggestion` | AI suggestion chips |
|
|
60
|
+
## Key Enums
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
| Enum | Values |
|
|
63
|
+
|------|--------|
|
|
64
|
+
| `SenderTypes` | `USER` ('user'), `OTHER` ('other') |
|
|
65
|
+
| `MatcherStatuses` | STATUS0 ('no contact') through STATUS10 ('all followup') |
|
|
66
|
+
| `SendMessageType` | `send_immediately`, `send_after`, `specify_time` |
|
|
63
67
|
|
|
64
|
-
|
|
65
|
-
|---------|---------|
|
|
66
|
-
| `ChatService` | `transformMessages()` — groups messages by date for rendering |
|
|
67
|
-
| `CalendarUtilsService` | Calendar event helpers |
|
|
68
|
-
| `ProgressTickerService` | Progress ring animation |
|
|
68
|
+
## Contract Alignment
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
The `IMessage` interface in this library is the **canonical messaging contract** for the entire Cyrano ecosystem. CyranoServer mirrors it (verified via `contract-alignment.spec.ts`). The host app's primary responsibility is timestamp coercion (ISO string -> Date) since Socket.IO serializes Dates as strings.
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
2. **UI-only extensions** belong here (e.g. `llmPreferenceLoading$` on `IProspectData`)
|
|
74
|
-
3. **Cyrano** imports wire types from contracts; lib types for components
|
|
75
|
-
4. **Blackbox** mirrors wire types via Python stubs from `cyrano-contracts/scripts/generate-python.ts`
|
|
72
|
+
## Building
|
|
76
73
|
|
|
77
|
-
|
|
74
|
+
```bash
|
|
75
|
+
npm run build_lib && npm run npm_pack
|
|
76
|
+
```
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
2. Re-export or extend in this library if UI needs extra fields
|
|
81
|
-
3. Run contract alignment tests in cyranoserver and cyrano
|
|
82
|
-
4. Regenerate Python stubs for Blackbox if the type crosses the wire boundary
|
|
78
|
+
Output: `dist/dashboard-components-lib/naniteninja-dashboard-components-lib-{version}.tgz`
|
|
83
79
|
|
|
84
|
-
##
|
|
80
|
+
## Testing
|
|
85
81
|
|
|
86
82
|
```bash
|
|
87
|
-
|
|
88
|
-
npm test
|
|
83
|
+
ng test dashboard-components-lib
|
|
89
84
|
```
|
|
90
85
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- `cyrano-contracts/README.md` — wire SSOT package
|
|
94
|
-
- `cyranoserver/docs/CANONICAL_MESSAGING_CONTRACTS.md` — full contract reference
|
|
95
|
-
- `cyrano/docs/MESSAGING_ARCHITECTURE.md` — frontend socket integration
|
|
86
|
+
Demo app available at `projects/dashboard-components-lib-test/` (port 4400).
|