@memberjunction/ng-conversations 2.114.0 → 2.115.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.
Files changed (34) hide show
  1. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  2. package/dist/lib/components/conversation/conversation-chat-area.component.js +8 -4
  3. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  4. package/dist/lib/components/mention/mention-dropdown.component.js +31 -23
  5. package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -1
  6. package/dist/lib/components/mention/mention-editor.component.d.ts +117 -0
  7. package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -0
  8. package/dist/lib/components/mention/mention-editor.component.js +550 -0
  9. package/dist/lib/components/mention/mention-editor.component.js.map +1 -0
  10. package/dist/lib/components/message/message-input-box.component.d.ts +19 -34
  11. package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
  12. package/dist/lib/components/message/message-input-box.component.js +66 -176
  13. package/dist/lib/components/message/message-input-box.component.js.map +1 -1
  14. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  15. package/dist/lib/components/message/message-item.component.js +41 -3
  16. package/dist/lib/components/message/message-item.component.js.map +1 -1
  17. package/dist/lib/components/navigation/conversation-navigation.component.js +2 -2
  18. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +4 -1
  19. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  20. package/dist/lib/components/workspace/conversation-workspace.component.js +108 -73
  21. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  22. package/dist/lib/conversations.module.d.ts +55 -54
  23. package/dist/lib/conversations.module.d.ts.map +1 -1
  24. package/dist/lib/conversations.module.js +4 -0
  25. package/dist/lib/conversations.module.js.map +1 -1
  26. package/dist/lib/services/mention-autocomplete.service.d.ts +8 -0
  27. package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
  28. package/dist/lib/services/mention-autocomplete.service.js +34 -3
  29. package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
  30. package/dist/public-api.d.ts +1 -0
  31. package/dist/public-api.d.ts.map +1 -1
  32. package/dist/public-api.js +1 -0
  33. package/dist/public-api.js.map +1 -1
  34. package/package.json +14 -14
@@ -0,0 +1,117 @@
1
+ import { EventEmitter, ElementRef, AfterViewInit, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { MentionAutocompleteService, MentionSuggestion } from '../../services/mention-autocomplete.service';
4
+ import { UserInfo } from '@memberjunction/core';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * ContentEditable-based mention editor with visual chips/pills
8
+ * Provides Slack/Teams-style mention UX with immutable mention tokens
9
+ */
10
+ export declare class MentionEditorComponent implements OnInit, AfterViewInit, ControlValueAccessor {
11
+ private mentionAutocomplete;
12
+ editorRef: ElementRef<HTMLDivElement>;
13
+ placeholder: string;
14
+ disabled: boolean;
15
+ currentUser?: UserInfo;
16
+ enableMentions: boolean;
17
+ valueChange: EventEmitter<string>;
18
+ mentionSelected: EventEmitter<MentionSuggestion>;
19
+ enterPressed: EventEmitter<string>;
20
+ showMentionDropdown: boolean;
21
+ mentionSuggestions: MentionSuggestion[];
22
+ mentionDropdownPosition: {
23
+ top: number;
24
+ left: number;
25
+ };
26
+ mentionDropdownShowAbove: boolean;
27
+ private mentionStartIndex;
28
+ private mentionQuery;
29
+ private onChange;
30
+ onTouched: () => void;
31
+ constructor(mentionAutocomplete: MentionAutocompleteService);
32
+ ngOnInit(): Promise<void>;
33
+ ngAfterViewInit(): void;
34
+ /**
35
+ * Handle clicks on the container - focus the editor if clicking outside the contentEditable
36
+ */
37
+ onContainerClick(event: MouseEvent): void;
38
+ /**
39
+ * Handle input changes in contentEditable
40
+ */
41
+ onInput(): void;
42
+ /**
43
+ * Handle blur event - close dropdown when editor loses focus
44
+ */
45
+ onBlur(): void;
46
+ /**
47
+ * Handle paste event - strip HTML and paste as plain text only
48
+ */
49
+ onPaste(event: ClipboardEvent): void;
50
+ /**
51
+ * Handle keydown events
52
+ */
53
+ onKeyDown(event: KeyboardEvent): void;
54
+ /**
55
+ * Handle @mention input detection
56
+ */
57
+ private handleMentionInput;
58
+ /**
59
+ * Get text before cursor position
60
+ */
61
+ private getTextBeforeCursor;
62
+ /**
63
+ * Position the mention dropdown
64
+ */
65
+ private positionMentionDropdown;
66
+ /**
67
+ * Handle mention selection from dropdown
68
+ */
69
+ onMentionSelected(suggestion: MentionSuggestion): void;
70
+ /**
71
+ * Insert a mention chip at the current cursor position
72
+ */
73
+ private insertMentionChip;
74
+ /**
75
+ * Create a mention chip DOM element
76
+ */
77
+ private createMentionChip;
78
+ /**
79
+ * Get icon classes with proper FA prefix
80
+ */
81
+ private getIconClasses;
82
+ /**
83
+ * Handle backspace key - delete entire chip if cursor is right after one
84
+ */
85
+ private handleBackspace;
86
+ /**
87
+ * Close mention dropdown
88
+ */
89
+ closeMentionDropdown(): void;
90
+ /**
91
+ * Convert editor HTML to plain text with @mentions
92
+ */
93
+ private getPlainText;
94
+ /**
95
+ * Get text from a node recursively
96
+ */
97
+ private getNodeText;
98
+ /**
99
+ * Set editor content from plain text (for programmatic updates)
100
+ */
101
+ private setEditorContent;
102
+ writeValue(value: string): void;
103
+ registerOnChange(fn: (value: string) => void): void;
104
+ registerOnTouched(fn: () => void): void;
105
+ setDisabledState(isDisabled: boolean): void;
106
+ /**
107
+ * Focus the editor
108
+ */
109
+ focus(): void;
110
+ /**
111
+ * Clear the editor content
112
+ */
113
+ clear(): void;
114
+ static ɵfac: i0.ɵɵFactoryDeclaration<MentionEditorComponent, never>;
115
+ static ɵcmp: i0.ɵɵComponentDeclaration<MentionEditorComponent, "mj-mention-editor", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "enableMentions": { "alias": "enableMentions"; "required": false; }; }, { "valueChange": "valueChange"; "mentionSelected": "mentionSelected"; "enterPressed": "enterPressed"; }, never, never, false, never>;
116
+ }
117
+ //# sourceMappingURL=mention-editor.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mention-editor.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/mention/mention-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,UAAU,EACV,aAAa,EAEb,MAAM,EAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAqB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;AAEhD;;;GAGG;AACH,qBAYa,sBAAuB,YAAW,MAAM,EAAE,aAAa,EAAE,oBAAoB;IAuB5E,OAAO,CAAC,mBAAmB;IAtBC,SAAS,EAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAEtE,WAAW,EAAE,MAAM,CAA0C;IAC7D,QAAQ,EAAE,OAAO,CAAS;IAC1B,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,cAAc,EAAE,OAAO,CAAQ;IAE9B,WAAW,uBAA8B;IACzC,eAAe,kCAAyC;IACxD,YAAY,uBAA8B;IAG7C,mBAAmB,EAAE,OAAO,CAAS;IACrC,kBAAkB,EAAE,iBAAiB,EAAE,CAAM;IAC7C,uBAAuB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAuB;IAC7E,wBAAwB,EAAE,OAAO,CAAS;IAEjD,OAAO,CAAC,iBAAiB,CAAc;IACvC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAqC;IAC9C,SAAS,EAAE,MAAM,IAAI,CAAY;gBAEpB,mBAAmB,EAAE,0BAA0B;IAE7D,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAM/B,eAAe,IAAI,IAAI;IAO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