@banta/sdk 5.4.0 → 5.5.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 (138) hide show
  1. package/{esm2020 → esm2022}/banta-sdk.mjs +4 -4
  2. package/{esm2020 → esm2022}/lib/attachment-scraper.mjs +1 -1
  3. package/esm2022/lib/banta/banta.component.mjs +204 -0
  4. package/{esm2020 → esm2022}/lib/banta-logo.component.mjs +11 -11
  5. package/{esm2020 → esm2022}/lib/banta-sdk.module.mjs +135 -135
  6. package/esm2022/lib/chat/banta-chat/banta-chat.component.mjs +209 -0
  7. package/esm2022/lib/chat/chat-message/chat-message.component.mjs +62 -0
  8. package/esm2022/lib/chat/chat-view/chat-view.component.mjs +170 -0
  9. package/{esm2020 → esm2022}/lib/chat/chat.module.mjs +51 -51
  10. package/{esm2020 → esm2022}/lib/chat/index.mjs +5 -5
  11. package/esm2022/lib/chat/live-chat-message.component.mjs +80 -0
  12. package/{esm2020 → esm2022}/lib/chat-backend-base.mjs +30 -30
  13. package/esm2022/lib/chat-backend.mjs +194 -0
  14. package/{esm2020 → esm2022}/lib/chat-source-base.mjs +1 -1
  15. package/esm2022/lib/chat-source.mjs +233 -0
  16. package/esm2022/lib/comments/attachment-button/attachment-button.component.mjs +76 -0
  17. package/esm2022/lib/comments/attachment-scraper.directive.mjs +107 -0
  18. package/esm2022/lib/comments/banta-comments/banta-comments.component.mjs +748 -0
  19. package/esm2022/lib/comments/comment/comment.component.mjs +175 -0
  20. package/esm2022/lib/comments/comment-field/comment-field.component.mjs +401 -0
  21. package/esm2022/lib/comments/comment-sort/comment-sort.component.mjs +37 -0
  22. package/esm2022/lib/comments/comment-view/comment-view.component.mjs +470 -0
  23. package/{esm2020 → esm2022}/lib/comments/comments.module.mjs +111 -111
  24. package/{esm2020 → esm2022}/lib/comments/index.mjs +10 -10
  25. package/esm2022/lib/comments/live-comment.component.mjs +80 -0
  26. package/{esm2020 → esm2022}/lib/comments/reply-send-options.directive.mjs +13 -13
  27. package/esm2022/lib/common/attachment/attachment.component.mjs +128 -0
  28. package/{esm2020 → esm2022}/lib/common/attachments/attachments.component.mjs +75 -75
  29. package/{esm2020 → esm2022}/lib/common/common.module.mjs +68 -68
  30. package/{esm2020 → esm2022}/lib/common/index.mjs +10 -10
  31. package/{esm2020 → esm2022}/lib/common/lazy-connection.mjs +14 -14
  32. package/esm2022/lib/common/lightbox/lightbox.component.mjs +31 -0
  33. package/esm2022/lib/common/markdown-to-html.pipe.mjs +88 -0
  34. package/esm2022/lib/common/mention-linker.pipe.mjs +35 -0
  35. package/esm2022/lib/common/timer-pool.service.mjs +83 -0
  36. package/esm2022/lib/common/timestamp.component.mjs +123 -0
  37. package/{esm2020 → esm2022}/lib/common/trust-resource-url.pipe.mjs +22 -22
  38. package/esm2022/lib/emoji/emoji-selector-button.component.mjs +115 -0
  39. package/esm2022/lib/emoji/emoji-selector-panel/emoji-selector-panel.component.mjs +98 -0
  40. package/{esm2020 → esm2022}/lib/emoji/emoji.module.mjs +55 -55
  41. package/{esm2020 → esm2022}/lib/emoji/emojis.mjs +6507 -6507
  42. package/{esm2020 → esm2022}/lib/emoji/index.mjs +4 -4
  43. package/esm2022/lib/giphy-attachments.mjs +16 -0
  44. package/{esm2020 → esm2022}/lib/index.mjs +19 -19
  45. package/{esm2020 → esm2022}/lib/live-message.component.mjs +61 -61
  46. package/{esm2020 → esm2022}/lib/message-menu-item.mjs +1 -1
  47. package/{esm2020 → esm2022}/lib/sdk-options.mjs +1 -1
  48. package/esm2022/lib/static-chat-source.mjs +71 -0
  49. package/esm2022/lib/tweet-attachments.mjs +13 -0
  50. package/esm2022/lib/url-attachments.mjs +42 -0
  51. package/esm2022/lib/youtube-attachments.mjs +29 -0
  52. package/{esm2020 → esm2022}/public-api.mjs +4 -4
  53. package/{fesm2020 → fesm2022}/banta-sdk.mjs +10822 -10823
  54. package/fesm2022/banta-sdk.mjs.map +1 -0
  55. package/index.d.ts +5 -5
  56. package/lib/attachment-scraper.d.ts +15 -15
  57. package/lib/banta/banta.component.d.ts +58 -58
  58. package/lib/banta-logo.component.d.ts +5 -5
  59. package/lib/banta-sdk.module.d.ts +31 -31
  60. package/lib/chat/banta-chat/banta-chat.component.d.ts +79 -79
  61. package/lib/chat/chat-message/chat-message.component.d.ts +21 -21
  62. package/lib/chat/chat-view/chat-view.component.d.ts +52 -52
  63. package/lib/chat/chat.module.d.ts +15 -15
  64. package/lib/chat/index.d.ts +5 -5
  65. package/lib/chat/live-chat-message.component.d.ts +23 -23
  66. package/lib/chat-backend-base.d.ts +72 -72
  67. package/lib/chat-backend.d.ts +67 -67
  68. package/lib/chat-source-base.d.ts +44 -44
  69. package/lib/chat-source.d.ts +65 -65
  70. package/lib/comments/attachment-button/attachment-button.component.d.ts +17 -17
  71. package/lib/comments/attachment-scraper.directive.d.ts +21 -21
  72. package/lib/comments/banta-comments/banta-comments.component.d.ts +203 -203
  73. package/lib/comments/comment/comment.component.d.ts +72 -72
  74. package/lib/comments/comment-field/comment-field.component.d.ts +89 -89
  75. package/lib/comments/comment-sort/comment-sort.component.d.ts +16 -16
  76. package/lib/comments/comment-view/comment-view.component.d.ts +121 -121
  77. package/lib/comments/comments.module.d.ts +30 -30
  78. package/lib/comments/index.d.ts +10 -10
  79. package/lib/comments/live-comment.component.d.ts +23 -23
  80. package/lib/comments/reply-send-options.directive.d.ts +5 -5
  81. package/lib/common/attachment/attachment.component.d.ts +34 -34
  82. package/lib/common/attachments/attachments.component.d.ts +26 -26
  83. package/lib/common/common.module.d.ts +19 -19
  84. package/lib/common/index.d.ts +10 -10
  85. package/lib/common/lazy-connection.d.ts +6 -6
  86. package/lib/common/lightbox/lightbox.component.d.ts +14 -14
  87. package/lib/common/markdown-to-html.pipe.d.ts +15 -15
  88. package/lib/common/mention-linker.pipe.d.ts +13 -13
  89. package/lib/common/timer-pool.service.d.ts +15 -15
  90. package/lib/common/timestamp.component.d.ts +19 -19
  91. package/lib/common/trust-resource-url.pipe.d.ts +10 -10
  92. package/lib/emoji/emoji-selector-button.component.d.ts +30 -30
  93. package/lib/emoji/emoji-selector-panel/emoji-selector-panel.component.d.ts +26 -26
  94. package/lib/emoji/emoji.module.d.ts +16 -16
  95. package/lib/emoji/emojis.d.ts +6507 -6507
  96. package/lib/emoji/index.d.ts +4 -4
  97. package/lib/giphy-attachments.d.ts +5 -5
  98. package/lib/index.d.ts +19 -19
  99. package/lib/live-message.component.d.ts +22 -22
  100. package/lib/message-menu-item.d.ts +6 -6
  101. package/lib/sdk-options.d.ts +5 -5
  102. package/lib/static-chat-source.d.ts +42 -42
  103. package/lib/tweet-attachments.d.ts +5 -5
  104. package/lib/url-attachments.d.ts +14 -14
  105. package/lib/youtube-attachments.d.ts +5 -5
  106. package/package.json +5 -11
  107. package/public-api.d.ts +1 -1
  108. package/esm2020/lib/banta/banta.component.mjs +0 -204
  109. package/esm2020/lib/chat/banta-chat/banta-chat.component.mjs +0 -209
  110. package/esm2020/lib/chat/chat-message/chat-message.component.mjs +0 -62
  111. package/esm2020/lib/chat/chat-view/chat-view.component.mjs +0 -170
  112. package/esm2020/lib/chat/live-chat-message.component.mjs +0 -80
  113. package/esm2020/lib/chat-backend.mjs +0 -194
  114. package/esm2020/lib/chat-source.mjs +0 -233
  115. package/esm2020/lib/comments/attachment-button/attachment-button.component.mjs +0 -76
  116. package/esm2020/lib/comments/attachment-scraper.directive.mjs +0 -107
  117. package/esm2020/lib/comments/banta-comments/banta-comments.component.mjs +0 -749
  118. package/esm2020/lib/comments/comment/comment.component.mjs +0 -175
  119. package/esm2020/lib/comments/comment-field/comment-field.component.mjs +0 -401
  120. package/esm2020/lib/comments/comment-sort/comment-sort.component.mjs +0 -37
  121. package/esm2020/lib/comments/comment-view/comment-view.component.mjs +0 -470
  122. package/esm2020/lib/comments/live-comment.component.mjs +0 -80
  123. package/esm2020/lib/common/attachment/attachment.component.mjs +0 -128
  124. package/esm2020/lib/common/lightbox/lightbox.component.mjs +0 -31
  125. package/esm2020/lib/common/markdown-to-html.pipe.mjs +0 -88
  126. package/esm2020/lib/common/mention-linker.pipe.mjs +0 -35
  127. package/esm2020/lib/common/timer-pool.service.mjs +0 -83
  128. package/esm2020/lib/common/timestamp.component.mjs +0 -123
  129. package/esm2020/lib/emoji/emoji-selector-button.component.mjs +0 -116
  130. package/esm2020/lib/emoji/emoji-selector-panel/emoji-selector-panel.component.mjs +0 -98
  131. package/esm2020/lib/giphy-attachments.mjs +0 -16
  132. package/esm2020/lib/static-chat-source.mjs +0 -71
  133. package/esm2020/lib/tweet-attachments.mjs +0 -13
  134. package/esm2020/lib/url-attachments.mjs +0 -42
  135. package/esm2020/lib/youtube-attachments.mjs +0 -29
  136. package/fesm2015/banta-sdk.mjs +0 -11258
  137. package/fesm2015/banta-sdk.mjs.map +0 -1
  138. package/fesm2020/banta-sdk.mjs.map +0 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@banta/sdk" />
5
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@banta/sdk" />
5
+ export * from './public-api';
@@ -1,15 +1,15 @@
1
- import { ChatMessage, ChatMessageAttachment } from '@banta/common';
2
- export interface AttachmentFragment {
3
- text: string;
4
- offset: number;
5
- type: string;
6
- }
7
- export interface AttachmentScraper {
8
- findFragments(message: ChatMessage): AttachmentFragment[];
9
- }
10
- export interface AttachmentResolver {
11
- resolveFragment(message: ChatMessage, fragment: AttachmentFragment): Promise<ChatMessageAttachment>;
12
- }
13
- export interface AttachmentRenderer {
14
- attachment: ChatMessageAttachment;
15
- }
1
+ import { ChatMessage, ChatMessageAttachment } from '@banta/common';
2
+ export interface AttachmentFragment {
3
+ text: string;
4
+ offset: number;
5
+ type: string;
6
+ }
7
+ export interface AttachmentScraper {
8
+ findFragments(message: ChatMessage): AttachmentFragment[];
9
+ }
10
+ export interface AttachmentResolver {
11
+ resolveFragment(message: ChatMessage, fragment: AttachmentFragment): Promise<ChatMessageAttachment>;
12
+ }
13
+ export interface AttachmentRenderer {
14
+ attachment: ChatMessageAttachment;
15
+ }
@@ -1,58 +1,58 @@
1
- import { NewMessageForm, ChatMessage, User, Notification } from '@banta/common';
2
- import { Observable } from 'rxjs';
3
- import { MatDialog } from '@angular/material/dialog';
4
- import { BantaChatComponent } from '../chat';
5
- import { ChatBackendBase } from "../chat-backend-base";
6
- import { ChatSourceBase } from "../chat-source-base";
7
- import * as i0 from "@angular/core";
8
- /**
9
- * Unified chat and comments component
10
- */
11
- export declare class BantaComponent {
12
- private backend;
13
- private matDialog;
14
- constructor(backend: ChatBackendBase, matDialog: MatDialog);
15
- firehoseSource: ChatSourceBase;
16
- pointSource: ChatSourceBase;
17
- private _topicID;
18
- private _subs;
19
- auxOpen: boolean;
20
- auxTitle: string;
21
- auxMode: string;
22
- ngOnInit(): void;
23
- mobileFocus: string;
24
- sendPointSubMessage(): Promise<void>;
25
- firehose: BantaChatComponent;
26
- goToMessage(message: ChatMessage): Promise<void>;
27
- notifications: Notification[];
28
- newNotifications: boolean;
29
- pointUnfocus(): void;
30
- ngOnDestroy(): void;
31
- showAux(title: string, mode: string): void;
32
- showNotifications(): void;
33
- get topicID(): string;
34
- chatLabel: string;
35
- commentsLabel: string;
36
- set topicID(value: string);
37
- private connectToTopic;
38
- private _signInSelected;
39
- get signInSelected(): Observable<void>;
40
- showSignIn(): void;
41
- close(): void;
42
- get hasPoint(): boolean;
43
- pointOpen: ChatMessage;
44
- pointSubChat: ChatSourceBase;
45
- closeAux(): void;
46
- getViewType(message: ChatMessage): "chat" | "comment";
47
- upvoteMessage(message: ChatMessage): Promise<void>;
48
- showProfile(user: User): void;
49
- profileUser: User;
50
- reportedMessage: ChatMessage;
51
- sendReport(message: ChatMessage): void;
52
- reportMessage(message: ChatMessage): void;
53
- currentUser: User;
54
- newPointSubMessage: NewMessageForm;
55
- genericAvatarUrl: string;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<BantaComponent, never>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<BantaComponent, "banta", never, { "topicID": "topicID"; "chatLabel": "chatLabel"; "commentsLabel": "commentsLabel"; }, { "signInSelected": "signInSelected"; }, never, never, false>;
58
- }
1
+ import { NewMessageForm, ChatMessage, User, Notification } from '@banta/common';
2
+ import { Observable } from 'rxjs';
3
+ import { MatDialog } from '@angular/material/dialog';
4
+ import { BantaChatComponent } from '../chat';
5
+ import { ChatBackendBase } from "../chat-backend-base";
6
+ import { ChatSourceBase } from "../chat-source-base";
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Unified chat and comments component
10
+ */
11
+ export declare class BantaComponent {
12
+ private backend;
13
+ private matDialog;
14
+ constructor(backend: ChatBackendBase, matDialog: MatDialog);
15
+ firehoseSource: ChatSourceBase;
16
+ pointSource: ChatSourceBase;
17
+ private _topicID;
18
+ private _subs;
19
+ auxOpen: boolean;
20
+ auxTitle: string;
21
+ auxMode: string;
22
+ ngOnInit(): void;
23
+ mobileFocus: string;
24
+ sendPointSubMessage(): Promise<void>;
25
+ firehose: BantaChatComponent;
26
+ goToMessage(message: ChatMessage): Promise<void>;
27
+ notifications: Notification[];
28
+ newNotifications: boolean;
29
+ pointUnfocus(): void;
30
+ ngOnDestroy(): void;
31
+ showAux(title: string, mode: string): void;
32
+ showNotifications(): void;
33
+ get topicID(): string;
34
+ chatLabel: string;
35
+ commentsLabel: string;
36
+ set topicID(value: string);
37
+ private connectToTopic;
38
+ private _signInSelected;
39
+ get signInSelected(): Observable<void>;
40
+ showSignIn(): void;
41
+ close(): void;
42
+ get hasPoint(): boolean;
43
+ pointOpen: ChatMessage;
44
+ pointSubChat: ChatSourceBase;
45
+ closeAux(): void;
46
+ getViewType(message: ChatMessage): "chat" | "comment";
47
+ upvoteMessage(message: ChatMessage): Promise<void>;
48
+ showProfile(user: User): void;
49
+ profileUser: User;
50
+ reportedMessage: ChatMessage;
51
+ sendReport(message: ChatMessage): void;
52
+ reportMessage(message: ChatMessage): void;
53
+ currentUser: User;
54
+ newPointSubMessage: NewMessageForm;
55
+ genericAvatarUrl: string;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<BantaComponent, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<BantaComponent, "banta", never, { "topicID": { "alias": "topicID"; "required": false; }; "chatLabel": { "alias": "chatLabel"; "required": false; }; "commentsLabel": { "alias": "commentsLabel"; "required": false; }; }, { "signInSelected": "signInSelected"; }, never, never, false, never>;
58
+ }
@@ -1,5 +1,5 @@
1
- import * as i0 from "@angular/core";
2
- export declare class BantaLogoComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<BantaLogoComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<BantaLogoComponent, "banta-logo", never, {}, {}, never, never, false>;
5
- }
1
+ import * as i0 from "@angular/core";
2
+ export declare class BantaLogoComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<BantaLogoComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<BantaLogoComponent, "banta-logo", never, {}, {}, never, never, false, never>;
5
+ }
@@ -1,31 +1,31 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { SdkOptions } from './sdk-options';
3
- import { ChatBackendBase } from './chat-backend-base';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "./banta/banta.component";
6
- import * as i2 from "./banta-logo.component";
7
- import * as i3 from "./live-message.component";
8
- import * as i4 from "@angular/common";
9
- import * as i5 from "@angular/forms";
10
- import * as i6 from "./common/common.module";
11
- import * as i7 from "./comments/comments.module";
12
- import * as i8 from "./chat/chat.module";
13
- import * as i9 from "./emoji/emoji.module";
14
- import * as i10 from "@angular/material/icon";
15
- import * as i11 from "@angular/material/button";
16
- import * as i12 from "@angular/material/tooltip";
17
- import * as i13 from "@angular/material/menu";
18
- import * as i14 from "@angular/material/dialog";
19
- import * as i15 from "@angular/material/form-field";
20
- import * as i16 from "@angular/material/input";
21
- import * as i17 from "@angular/material/progress-spinner";
22
- import * as i18 from "@angular/material/snack-bar";
23
- import * as i19 from "@angular/cdk/overlay";
24
- import * as i20 from "@angular/cdk/portal";
25
- export declare class BantaSdkModule {
26
- constructor(chatBackend: ChatBackendBase);
27
- static configure(options?: SdkOptions): ModuleWithProviders<BantaSdkModule>;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<BantaSdkModule, never>;
29
- static ɵmod: i0.ɵɵNgModuleDeclaration<BantaSdkModule, [typeof i1.BantaComponent, typeof i2.BantaLogoComponent, typeof i3.LiveMessageComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.BantaCommonModule, typeof i7.CommentsModule, typeof i8.ChatModule, typeof i9.EmojiModule, typeof i10.MatIconModule, typeof i11.MatButtonModule, typeof i12.MatTooltipModule, typeof i13.MatMenuModule, typeof i14.MatDialogModule, typeof i15.MatFormFieldModule, typeof i16.MatInputModule, typeof i17.MatProgressSpinnerModule, typeof i18.MatSnackBarModule, typeof i19.OverlayModule, typeof i20.PortalModule], [typeof i1.BantaComponent, typeof i2.BantaLogoComponent, typeof i3.LiveMessageComponent, typeof i6.BantaCommonModule, typeof i8.ChatModule, typeof i7.CommentsModule, typeof i9.EmojiModule]>;
30
- static ɵinj: i0.ɵɵInjectorDeclaration<BantaSdkModule>;
31
- }
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { SdkOptions } from './sdk-options';
3
+ import { ChatBackendBase } from './chat-backend-base';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "./banta/banta.component";
6
+ import * as i2 from "./banta-logo.component";
7
+ import * as i3 from "./live-message.component";
8
+ import * as i4 from "@angular/common";
9
+ import * as i5 from "@angular/forms";
10
+ import * as i6 from "./common/common.module";
11
+ import * as i7 from "./comments/comments.module";
12
+ import * as i8 from "./chat/chat.module";
13
+ import * as i9 from "./emoji/emoji.module";
14
+ import * as i10 from "@angular/material/icon";
15
+ import * as i11 from "@angular/material/button";
16
+ import * as i12 from "@angular/material/tooltip";
17
+ import * as i13 from "@angular/material/menu";
18
+ import * as i14 from "@angular/material/dialog";
19
+ import * as i15 from "@angular/material/form-field";
20
+ import * as i16 from "@angular/material/input";
21
+ import * as i17 from "@angular/material/progress-spinner";
22
+ import * as i18 from "@angular/material/snack-bar";
23
+ import * as i19 from "@angular/cdk/overlay";
24
+ import * as i20 from "@angular/cdk/portal";
25
+ export declare class BantaSdkModule {
26
+ constructor(chatBackend: ChatBackendBase);
27
+ static configure(options?: SdkOptions): ModuleWithProviders<BantaSdkModule>;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<BantaSdkModule, never>;
29
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BantaSdkModule, [typeof i1.BantaComponent, typeof i2.BantaLogoComponent, typeof i3.LiveMessageComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.BantaCommonModule, typeof i7.CommentsModule, typeof i8.ChatModule, typeof i9.EmojiModule, typeof i10.MatIconModule, typeof i11.MatButtonModule, typeof i12.MatTooltipModule, typeof i13.MatMenuModule, typeof i14.MatDialogModule, typeof i15.MatFormFieldModule, typeof i16.MatInputModule, typeof i17.MatProgressSpinnerModule, typeof i18.MatSnackBarModule, typeof i19.OverlayModule, typeof i20.PortalModule], [typeof i1.BantaComponent, typeof i2.BantaLogoComponent, typeof i3.LiveMessageComponent, typeof i6.BantaCommonModule, typeof i8.ChatModule, typeof i7.CommentsModule, typeof i9.EmojiModule]>;
30
+ static ɵinj: i0.ɵɵInjectorDeclaration<BantaSdkModule>;
31
+ }
@@ -1,79 +1,79 @@
1
- import { ElementRef } from "@angular/core";
2
- import { Observable } from 'rxjs';
3
- import { User, ChatMessage, NewMessageForm } from '@banta/common';
4
- import { ChatViewComponent } from '../chat-view/chat-view.component';
5
- import { ChatBackendBase } from "../../chat-backend-base";
6
- import { ChatSourceBase } from "../../chat-source-base";
7
- import * as i0 from "@angular/core";
8
- /**
9
- * Chat component
10
- */
11
- export declare class BantaChatComponent {
12
- private backend;
13
- constructor(backend: ChatBackendBase);
14
- private _source;
15
- private _subs;
16
- user: User;
17
- shouldInterceptMessageSend?: (message: ChatMessage, source: ChatSourceBase) => boolean | Promise<boolean>;
18
- url: string;
19
- ngOnInit(): void;
20
- ngOnDestroy(): void;
21
- get source(): ChatSourceBase;
22
- set source(value: ChatSourceBase);
23
- get topicID(): string;
24
- set topicID(value: string);
25
- private _metadata;
26
- /**
27
- * Arbitrary metadata to send to the chat server. This can be used to provide context about the client to the server
28
- * for things like validating authorization and other uses.
29
- */
30
- get metadata(): Record<string, any>;
31
- set metadata(value: Record<string, any>);
32
- private _reloadSourceTimeout;
33
- private reloadSource;
34
- private setSourceFromTopicID;
35
- signInLabel: string;
36
- sendLabel: string;
37
- permissionDeniedLabel: string;
38
- messageFieldPlaceholder: string;
39
- emptyLabel: string;
40
- private _selected;
41
- private _selected$;
42
- private _reported;
43
- private _reported$;
44
- private _upvoted;
45
- private _upvoted$;
46
- private _userSelected;
47
- private _userSelected$;
48
- private _permissionDeniedError;
49
- private _permissionDeniedError$;
50
- private _signInSelected;
51
- private _signInSelected$;
52
- private _received;
53
- private _received$;
54
- get selected(): Observable<ChatMessage>;
55
- get reported(): Observable<ChatMessage>;
56
- get upvoted(): Observable<ChatMessage>;
57
- get userSelected(): Observable<ChatMessage>;
58
- get permissionDeniedError(): Observable<string>;
59
- get signInSelected(): Observable<void>;
60
- get received(): Observable<ChatMessage>;
61
- onReceived(message: ChatMessage): void;
62
- showEmojiPanel: boolean;
63
- showSignIn(): void;
64
- sendPermissionError(message: string): void;
65
- insertEmoji(emoji: any): void;
66
- onKeyDown(event: KeyboardEvent): void;
67
- chatView: ChatViewComponent;
68
- inputElementRef: ElementRef<HTMLInputElement>;
69
- jumpToMessage(message: ChatMessage): void;
70
- select(message: ChatMessage): void;
71
- selectUser(message: ChatMessage): void;
72
- report(message: ChatMessage): void;
73
- upvote(message: ChatMessage): Promise<void>;
74
- get canChat(): boolean;
75
- newMessage: NewMessageForm;
76
- sendMessage(): Promise<void>;
77
- static ɵfac: i0.ɵɵFactoryDeclaration<BantaChatComponent, never>;
78
- static ɵcmp: i0.ɵɵComponentDeclaration<BantaChatComponent, "banta-chat", never, { "shouldInterceptMessageSend": "shouldInterceptMessageSend"; "url": "url"; "source": "source"; "topicID": "topicID"; "metadata": "metadata"; "signInLabel": "signInLabel"; "sendLabel": "sendLabel"; "permissionDeniedLabel": "permissionDeniedLabel"; "messageFieldPlaceholder": "messageFieldPlaceholder"; "emptyLabel": "emptyLabel"; }, { "selected": "selected"; "reported": "reported"; "upvoted": "upvoted"; "userSelected": "userSelected"; "permissionDeniedError": "permissionDeniedError"; "signInSelected": "signInSelected"; "received": "received"; }, never, never, false>;
79
- }
1
+ import { ElementRef } from "@angular/core";
2
+ import { Observable } from 'rxjs';
3
+ import { User, ChatMessage, NewMessageForm } from '@banta/common';
4
+ import { ChatViewComponent } from '../chat-view/chat-view.component';
5
+ import { ChatBackendBase } from "../../chat-backend-base";
6
+ import { ChatSourceBase } from "../../chat-source-base";
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Chat component
10
+ */
11
+ export declare class BantaChatComponent {
12
+ private backend;
13
+ constructor(backend: ChatBackendBase);
14
+ private _source;
15
+ private _subs;
16
+ user: User;
17
+ shouldInterceptMessageSend?: (message: ChatMessage, source: ChatSourceBase) => boolean | Promise<boolean>;
18
+ url: string;
19
+ ngOnInit(): void;
20
+ ngOnDestroy(): void;
21
+ get source(): ChatSourceBase;
22
+ set source(value: ChatSourceBase);
23
+ get topicID(): string;
24
+ set topicID(value: string);
25
+ private _metadata;
26
+ /**
27
+ * Arbitrary metadata to send to the chat server. This can be used to provide context about the client to the server
28
+ * for things like validating authorization and other uses.
29
+ */
30
+ get metadata(): Record<string, any>;
31
+ set metadata(value: Record<string, any>);
32
+ private _reloadSourceTimeout;
33
+ private reloadSource;
34
+ private setSourceFromTopicID;
35
+ signInLabel: string;
36
+ sendLabel: string;
37
+ permissionDeniedLabel: string;
38
+ messageFieldPlaceholder: string;
39
+ emptyLabel: string;
40
+ private _selected;
41
+ private _selected$;
42
+ private _reported;
43
+ private _reported$;
44
+ private _upvoted;
45
+ private _upvoted$;
46
+ private _userSelected;
47
+ private _userSelected$;
48
+ private _permissionDeniedError;
49
+ private _permissionDeniedError$;
50
+ private _signInSelected;
51
+ private _signInSelected$;
52
+ private _received;
53
+ private _received$;
54
+ get selected(): Observable<ChatMessage>;
55
+ get reported(): Observable<ChatMessage>;
56
+ get upvoted(): Observable<ChatMessage>;
57
+ get userSelected(): Observable<ChatMessage>;
58
+ get permissionDeniedError(): Observable<string>;
59
+ get signInSelected(): Observable<void>;
60
+ get received(): Observable<ChatMessage>;
61
+ onReceived(message: ChatMessage): void;
62
+ showEmojiPanel: boolean;
63
+ showSignIn(): void;
64
+ sendPermissionError(message: string): void;
65
+ insertEmoji(emoji: any): void;
66
+ onKeyDown(event: KeyboardEvent): void;
67
+ chatView: ChatViewComponent;
68
+ inputElementRef: ElementRef<HTMLInputElement>;
69
+ jumpToMessage(message: ChatMessage): void;
70
+ select(message: ChatMessage): void;
71
+ selectUser(message: ChatMessage): void;
72
+ report(message: ChatMessage): void;
73
+ upvote(message: ChatMessage): Promise<void>;
74
+ get canChat(): boolean;
75
+ newMessage: NewMessageForm;
76
+ sendMessage(): Promise<void>;
77
+ static ɵfac: i0.ɵɵFactoryDeclaration<BantaChatComponent, never>;
78
+ static ɵcmp: i0.ɵɵComponentDeclaration<BantaChatComponent, "banta-chat", never, { "shouldInterceptMessageSend": { "alias": "shouldInterceptMessageSend"; "required": false; }; "url": { "alias": "url"; "required": false; }; "source": { "alias": "source"; "required": false; }; "topicID": { "alias": "topicID"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "signInLabel": { "alias": "signInLabel"; "required": false; }; "sendLabel": { "alias": "sendLabel"; "required": false; }; "permissionDeniedLabel": { "alias": "permissionDeniedLabel"; "required": false; }; "messageFieldPlaceholder": { "alias": "messageFieldPlaceholder"; "required": false; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; }; }, { "selected": "selected"; "reported": "reported"; "upvoted": "upvoted"; "userSelected": "userSelected"; "permissionDeniedError": "permissionDeniedError"; "signInSelected": "signInSelected"; "received": "received"; }, never, never, false, never>;
79
+ }
@@ -1,21 +1,21 @@
1
- import { User, ChatMessage } from '@banta/common';
2
- import { Subject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare class ChatMessageComponent {
5
- private _selected;
6
- private _reported;
7
- private _upvoted;
8
- private _userSelected;
9
- message: ChatMessage;
10
- get userSelected(): Subject<User>;
11
- get selected(): Subject<void>;
12
- get reported(): Subject<void>;
13
- get upvoted(): Subject<void>;
14
- avatarForUser(user: User): string;
15
- upvote(): void;
16
- report(): void;
17
- select(): void;
18
- selectUser(): void;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "banta-chat-message", never, { "message": "message"; }, { "userSelected": "userSelected"; "selected": "selected"; "reported": "reported"; "upvoted": "upvoted"; }, never, never, false>;
21
- }
1
+ import { User, ChatMessage } from '@banta/common';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ChatMessageComponent {
5
+ private _selected;
6
+ private _reported;
7
+ private _upvoted;
8
+ private _userSelected;
9
+ message: ChatMessage;
10
+ get userSelected(): Subject<User>;
11
+ get selected(): Subject<void>;
12
+ get reported(): Subject<void>;
13
+ get upvoted(): Subject<void>;
14
+ avatarForUser(user: User): string;
15
+ upvote(): void;
16
+ report(): void;
17
+ select(): void;
18
+ selectUser(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "banta-chat-message", never, { "message": { "alias": "message"; "required": false; }; }, { "userSelected": "userSelected"; "selected": "selected"; "reported": "reported"; "upvoted": "upvoted"; }, never, never, false, never>;
21
+ }
@@ -1,52 +1,52 @@
1
- import { ElementRef } from "@angular/core";
2
- import { User, ChatMessage } from '@banta/common';
3
- import { ChatBackendBase } from "../../chat-backend-base";
4
- import { ChatSourceBase } from "../../chat-source-base";
5
- import * as i0 from "@angular/core";
6
- export declare class ChatViewComponent {
7
- private backend;
8
- private elementRef;
9
- constructor(backend: ChatBackendBase, elementRef: ElementRef<HTMLElement>);
10
- private _sourceSubs;
11
- private _source;
12
- get source(): ChatSourceBase;
13
- private _selected;
14
- private _selected$;
15
- private _reported;
16
- private _reported$;
17
- private _upvoted;
18
- private _upvoted$;
19
- private _userSelected;
20
- private _userSelected$;
21
- private _received;
22
- private _received$;
23
- get selected(): import("rxjs").Observable<ChatMessage>;
24
- get userSelected(): import("rxjs").Observable<ChatMessage>;
25
- get reported(): import("rxjs").Observable<ChatMessage>;
26
- get upvoted(): import("rxjs").Observable<ChatMessage>;
27
- get received(): import("rxjs").Observable<ChatMessage>;
28
- set source(value: ChatSourceBase);
29
- private getInitialMessages;
30
- private sortMessages;
31
- messages: ChatMessage[];
32
- currentUser: User;
33
- messageContainer: ElementRef<HTMLElement>;
34
- maxMessages: number;
35
- emptyLabel: string;
36
- private addMessage;
37
- private messageReceived;
38
- isScrolledToLatest(): boolean;
39
- private messageSent;
40
- scrollToLatest(): void;
41
- jumpTo(message: ChatMessage): void;
42
- flashMessage(message: ChatMessage): void;
43
- flashedMessageId: string;
44
- mentionsMe(message: ChatMessage): boolean;
45
- upvoteMessage(message: ChatMessage): void;
46
- reportMessage(message: ChatMessage): void;
47
- selectMessage(message: ChatMessage): void;
48
- selectMessageUser(message: ChatMessage): void;
49
- avatarForUser(user: User): string;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<ChatViewComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatViewComponent, "banta-chat-view", never, { "source": "source"; "maxMessages": "maxMessages"; "emptyLabel": "emptyLabel"; }, { "selected": "selected"; "userSelected": "userSelected"; "reported": "reported"; "upvoted": "upvoted"; "received": "received"; }, never, ["[data-before]", ":not([data-before])"], false>;
52
- }
1
+ import { ElementRef } from "@angular/core";
2
+ import { User, ChatMessage } from '@banta/common';
3
+ import { ChatBackendBase } from "../../chat-backend-base";
4
+ import { ChatSourceBase } from "../../chat-source-base";
5
+ import * as i0 from "@angular/core";
6
+ export declare class ChatViewComponent {
7
+ private backend;
8
+ private elementRef;
9
+ constructor(backend: ChatBackendBase, elementRef: ElementRef<HTMLElement>);
10
+ private _sourceSubs;
11
+ private _source;
12
+ get source(): ChatSourceBase;
13
+ private _selected;
14
+ private _selected$;
15
+ private _reported;
16
+ private _reported$;
17
+ private _upvoted;
18
+ private _upvoted$;
19
+ private _userSelected;
20
+ private _userSelected$;
21
+ private _received;
22
+ private _received$;
23
+ get selected(): import("rxjs").Observable<ChatMessage>;
24
+ get userSelected(): import("rxjs").Observable<ChatMessage>;
25
+ get reported(): import("rxjs").Observable<ChatMessage>;
26
+ get upvoted(): import("rxjs").Observable<ChatMessage>;
27
+ get received(): import("rxjs").Observable<ChatMessage>;
28
+ set source(value: ChatSourceBase);
29
+ private getInitialMessages;
30
+ private sortMessages;
31
+ messages: ChatMessage[];
32
+ currentUser: User;
33
+ messageContainer: ElementRef<HTMLElement>;
34
+ maxMessages: number;
35
+ emptyLabel: string;
36
+ private addMessage;
37
+ private messageReceived;
38
+ isScrolledToLatest(): boolean;
39
+ private messageSent;
40
+ scrollToLatest(): void;
41
+ jumpTo(message: ChatMessage): void;
42
+ flashMessage(message: ChatMessage): void;
43
+ flashedMessageId: string;
44
+ mentionsMe(message: ChatMessage): boolean;
45
+ upvoteMessage(message: ChatMessage): void;
46
+ reportMessage(message: ChatMessage): void;
47
+ selectMessage(message: ChatMessage): void;
48
+ selectMessageUser(message: ChatMessage): void;
49
+ avatarForUser(user: User): string;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChatViewComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatViewComponent, "banta-chat-view", never, { "source": { "alias": "source"; "required": false; }; "maxMessages": { "alias": "maxMessages"; "required": false; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; }; }, { "selected": "selected"; "userSelected": "userSelected"; "reported": "reported"; "upvoted": "upvoted"; "received": "received"; }, never, ["[data-before]", ":not([data-before])"], false, never>;
52
+ }
@@ -1,15 +1,15 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./chat-message/chat-message.component";
3
- import * as i2 from "./live-chat-message.component";
4
- import * as i3 from "./chat-view/chat-view.component";
5
- import * as i4 from "./banta-chat/banta-chat.component";
6
- import * as i5 from "@angular/common";
7
- import * as i6 from "@angular/forms";
8
- import * as i7 from "@angular/material/icon";
9
- import * as i8 from "@angular/material/button";
10
- import * as i9 from "../emoji/emoji.module";
11
- export declare class ChatModule {
12
- static ɵfac: i0.ɵɵFactoryDeclaration<ChatModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<ChatModule, [typeof i1.ChatMessageComponent, typeof i2.LiveChatMessageComponent, typeof i3.ChatViewComponent, typeof i4.BantaChatComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.MatIconModule, typeof i8.MatButtonModule, typeof i9.EmojiModule], [typeof i1.ChatMessageComponent, typeof i2.LiveChatMessageComponent, typeof i3.ChatViewComponent, typeof i4.BantaChatComponent]>;
14
- static ɵinj: i0.ɵɵInjectorDeclaration<ChatModule>;
15
- }
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./chat-message/chat-message.component";
3
+ import * as i2 from "./live-chat-message.component";
4
+ import * as i3 from "./chat-view/chat-view.component";
5
+ import * as i4 from "./banta-chat/banta-chat.component";
6
+ import * as i5 from "@angular/common";
7
+ import * as i6 from "@angular/forms";
8
+ import * as i7 from "@angular/material/icon";
9
+ import * as i8 from "@angular/material/button";
10
+ import * as i9 from "../emoji/emoji.module";
11
+ export declare class ChatModule {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChatModule, never>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ChatModule, [typeof i1.ChatMessageComponent, typeof i2.LiveChatMessageComponent, typeof i3.ChatViewComponent, typeof i4.BantaChatComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.MatIconModule, typeof i8.MatButtonModule, typeof i9.EmojiModule], [typeof i1.ChatMessageComponent, typeof i2.LiveChatMessageComponent, typeof i3.ChatViewComponent, typeof i4.BantaChatComponent]>;
14
+ static ɵinj: i0.ɵɵInjectorDeclaration<ChatModule>;
15
+ }
@@ -1,5 +1,5 @@
1
- export * from './chat-message/chat-message.component';
2
- export * from './live-chat-message.component';
3
- export * from './chat-view/chat-view.component';
4
- export * from './banta-chat/banta-chat.component';
5
- export * from './chat.module';
1
+ export * from './chat-message/chat-message.component';
2
+ export * from './live-chat-message.component';
3
+ export * from './chat-view/chat-view.component';
4
+ export * from './banta-chat/banta-chat.component';
5
+ export * from './chat.module';