stream-chat-angular 2.20.2 → 3.0.0-beta.10

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 (127) hide show
  1. package/README.md +44 -12
  2. package/assets/version.d.ts +1 -1
  3. package/bundles/stream-chat-angular.umd.js +780 -534
  4. package/bundles/stream-chat-angular.umd.js.map +1 -1
  5. package/esm2015/assets/version.js +2 -2
  6. package/esm2015/lib/attachment-list/attachment-list.component.js +27 -15
  7. package/esm2015/lib/attachment-preview-list/attachment-preview-list.component.js +28 -22
  8. package/esm2015/lib/attachment.service.js +11 -5
  9. package/esm2015/lib/avatar-placeholder/avatar-placeholder.component.js +41 -0
  10. package/esm2015/lib/channel-header/channel-header.component.js +26 -12
  11. package/esm2015/lib/channel-list/channel-list.component.js +23 -13
  12. package/esm2015/lib/channel-preview/channel-preview.component.js +3 -3
  13. package/esm2015/lib/channel.service.js +28 -35
  14. package/esm2015/lib/chat-client.service.js +5 -4
  15. package/esm2015/lib/custom-templates.service.js +139 -0
  16. package/esm2015/lib/icon-placeholder/icon-placeholder.component.js +34 -0
  17. package/esm2015/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.js +42 -0
  18. package/esm2015/lib/message/message.component.js +74 -29
  19. package/esm2015/lib/message-actions-box/message-actions-box.component.js +114 -99
  20. package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +13 -13
  21. package/esm2015/lib/message-input/message-input-config.service.js +1 -1
  22. package/esm2015/lib/message-input/message-input.component.js +56 -45
  23. package/esm2015/lib/message-input/textarea.directive.js +2 -18
  24. package/esm2015/lib/message-input/textarea.interface.js +1 -1
  25. package/esm2015/lib/message-list/message-list.component.js +32 -93
  26. package/esm2015/lib/message-preview.js +4 -17
  27. package/esm2015/lib/message-reactions/message-reactions.component.js +3 -3
  28. package/esm2015/lib/modal/modal.component.js +9 -6
  29. package/esm2015/lib/notification/notification.component.js +5 -2
  30. package/esm2015/lib/notification-list/notification-list.component.js +12 -10
  31. package/esm2015/lib/read-by.js +1 -1
  32. package/esm2015/lib/stream-avatar.module.js +5 -4
  33. package/esm2015/lib/stream-chat.module.js +13 -3
  34. package/esm2015/lib/thread/thread.component.js +19 -11
  35. package/esm2015/lib/types.js +1 -1
  36. package/esm2015/public-api.js +5 -1
  37. package/fesm2015/stream-chat-angular.js +723 -449
  38. package/fesm2015/stream-chat-angular.js.map +1 -1
  39. package/lib/attachment-list/attachment-list.component.d.ts +12 -8
  40. package/lib/attachment-preview-list/attachment-preview-list.component.d.ts +17 -7
  41. package/lib/attachment.service.d.ts +1 -1
  42. package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +25 -0
  43. package/lib/channel-header/channel-header.component.d.ts +15 -12
  44. package/lib/channel-list/channel-list.component.d.ts +14 -11
  45. package/lib/channel-preview/channel-preview.component.d.ts +3 -2
  46. package/lib/channel.service.d.ts +32 -31
  47. package/lib/chat-client.service.d.ts +12 -11
  48. package/lib/custom-templates.service.d.ts +132 -0
  49. package/lib/icon-placeholder/icon-placeholder.component.d.ts +22 -0
  50. package/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.d.ts +21 -0
  51. package/lib/message/message.component.d.ts +42 -30
  52. package/lib/message-actions-box/message-actions-box.component.d.ts +22 -26
  53. package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +7 -11
  54. package/lib/message-input/message-input-config.service.d.ts +0 -19
  55. package/lib/message-input/message-input.component.d.ts +40 -26
  56. package/lib/message-input/textarea.directive.d.ts +3 -6
  57. package/lib/message-input/textarea.interface.d.ts +1 -4
  58. package/lib/message-list/group-styles.d.ts +1 -1
  59. package/lib/message-list/message-list.component.d.ts +10 -34
  60. package/lib/message-preview.d.ts +2 -1
  61. package/lib/message-reactions/message-reactions.component.d.ts +4 -5
  62. package/lib/modal/modal.component.d.ts +7 -3
  63. package/lib/notification/notification.component.d.ts +6 -1
  64. package/lib/notification-list/notification-list.component.d.ts +4 -2
  65. package/lib/read-by.d.ts +2 -1
  66. package/lib/stream-avatar.module.d.ts +4 -3
  67. package/lib/stream-chat.module.d.ts +6 -4
  68. package/lib/thread/thread.component.d.ts +6 -3
  69. package/lib/types.d.ts +115 -9
  70. package/package.json +2 -3
  71. package/public-api.d.ts +4 -0
  72. package/src/assets/styles/assets/EmojiOneColor.woff2 +0 -0
  73. package/src/assets/styles/assets/NotoColorEmoji-flags.woff2 +0 -0
  74. package/src/assets/styles/assets/Poweredby_100px-White_VertText.png +0 -0
  75. package/src/assets/styles/assets/str-chat__reaction-list-sprite@1x.png +0 -0
  76. package/src/assets/styles/assets/str-chat__reaction-list-sprite@2x.png +0 -0
  77. package/src/assets/styles/assets/str-chat__reaction-list-sprite@3x.png +0 -0
  78. package/src/assets/styles/css/index.css +1 -0
  79. package/src/assets/styles/css/index.css.map +1 -0
  80. package/src/assets/styles/scss/ActionsBox.scss +56 -0
  81. package/src/assets/styles/scss/Attachment.scss +227 -0
  82. package/src/assets/styles/scss/AttachmentActions.scss +44 -0
  83. package/src/assets/styles/scss/Audio.scss +112 -0
  84. package/src/assets/styles/scss/Avatar.scss +79 -0
  85. package/src/assets/styles/scss/Card.scss +100 -0
  86. package/src/assets/styles/scss/ChannelHeader.scss +284 -0
  87. package/src/assets/styles/scss/ChannelList.scss +117 -0
  88. package/src/assets/styles/scss/ChannelListMessenger.scss +9 -0
  89. package/src/assets/styles/scss/ChannelPreview.scss +108 -0
  90. package/src/assets/styles/scss/ChannelSearch.scss +111 -0
  91. package/src/assets/styles/scss/ChatDown.scss +15 -0
  92. package/src/assets/styles/scss/DateSeparator.scss +51 -0
  93. package/src/assets/styles/scss/EditMessageForm.scss +112 -0
  94. package/src/assets/styles/scss/EventComponent.scss +48 -0
  95. package/src/assets/styles/scss/Gallery.scss +135 -0
  96. package/src/assets/styles/scss/InfiniteScrollPaginator.scss +6 -0
  97. package/src/assets/styles/scss/LoadMoreButton.scss +44 -0
  98. package/src/assets/styles/scss/LoadingChannels.scss +70 -0
  99. package/src/assets/styles/scss/LoadingIndicator.scss +38 -0
  100. package/src/assets/styles/scss/Message.scss +1261 -0
  101. package/src/assets/styles/scss/MessageActions.scss +112 -0
  102. package/src/assets/styles/scss/MessageCommerce.scss +564 -0
  103. package/src/assets/styles/scss/MessageInput.scss +385 -0
  104. package/src/assets/styles/scss/MessageInputFlat.scss +305 -0
  105. package/src/assets/styles/scss/MessageList.scss +203 -0
  106. package/src/assets/styles/scss/MessageLivestream.scss +325 -0
  107. package/src/assets/styles/scss/MessageNotification.scss +49 -0
  108. package/src/assets/styles/scss/MessageRepliesCountButton.scss +33 -0
  109. package/src/assets/styles/scss/MessageTeam.scss +617 -0
  110. package/src/assets/styles/scss/Modal.scss +77 -0
  111. package/src/assets/styles/scss/ReactionList.scss +183 -0
  112. package/src/assets/styles/scss/ReactionSelector.scss +212 -0
  113. package/src/assets/styles/scss/SendButton.scss +14 -0
  114. package/src/assets/styles/scss/SimpleReactionsList.scss +76 -0
  115. package/src/assets/styles/scss/SmallMessageInput.scss +172 -0
  116. package/src/assets/styles/scss/Thread.scss +306 -0
  117. package/src/assets/styles/scss/Tooltip.scss +38 -0
  118. package/src/assets/styles/scss/TypingIndicator.scss +75 -0
  119. package/src/assets/styles/scss/VirtualMessage.scss +291 -0
  120. package/src/assets/styles/scss/_base.scss +206 -0
  121. package/src/assets/styles/scss/_variables.scss +158 -0
  122. package/src/assets/styles/scss/index.scss +50 -0
  123. package/src/assets/styles/scss/vendor/emoji-mart.scss +495 -0
  124. package/src/assets/styles/scss/vendor/mml-react.scss +1749 -0
  125. package/src/assets/styles/scss/vendor/react-file-utils.scss +378 -0
  126. package/src/assets/styles/scss/vendor/react-image-gallery.scss +224 -0
  127. package/src/assets/version.ts +1 -1
@@ -0,0 +1,206 @@
1
+ .str-chat {
2
+ box-sizing: border-box;
3
+
4
+ *,
5
+ *::after,
6
+ *::before {
7
+ box-sizing: inherit;
8
+ font-family: var(--second-font);
9
+ }
10
+ }
11
+
12
+ .clearfix {
13
+ clear: both;
14
+ }
15
+
16
+ .messenger-chat {
17
+ &.str-chat {
18
+ display: flex;
19
+ align-items: flex-start;
20
+ justify-content: flex-start;
21
+ font-family: var(--second-font);
22
+ height: 100vh;
23
+ margin: 0;
24
+ flex: 1 0 100%;
25
+
26
+ .str-chat {
27
+ &__container {
28
+ flex: 1;
29
+ height: 100%;
30
+ display: flex;
31
+ flex-direction: row;
32
+ }
33
+
34
+ &__main-panel {
35
+ width: 100%;
36
+ min-width: 250px;
37
+ flex: 1;
38
+ height: 100%;
39
+ display: flex;
40
+ flex-direction: column;
41
+ padding: var(--sm-p) var(--sm-p) 0 var(--xs-p);
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ .str-chat {
48
+ height: 100vh;
49
+ font-family: var(--second-font);
50
+ color: var(--black);
51
+
52
+ &.messaging,
53
+ &.commerce {
54
+ background-color: var(--grey-gainsboro);
55
+
56
+ &.dark {
57
+ background-color: var(--dark-grey);
58
+ }
59
+ }
60
+
61
+ &.team {
62
+ &.dark {
63
+ background: var(--dark-grey);
64
+ }
65
+ }
66
+
67
+ &.livestream {
68
+ &.dark {
69
+ background: var(--dark-grey);
70
+ }
71
+ }
72
+ }
73
+
74
+ /* declare a font faces for our Emoji Replacement font, based on the default font used by Stream Chat React */
75
+
76
+ $emoji-flag-unicode-range: U+1F1E6-1F1FF;
77
+
78
+ /* png based woff for most browsers */
79
+ @font-face {
80
+ font-family: ReplaceFlagEmojiPNG;
81
+ src: url('#{$assetsPath}/NotoColorEmoji-flags.woff2') format('woff2');
82
+ /* using the unicode-range attribute to limit the reach of the Flag Emoji web font to only flags */
83
+ unicode-range: $emoji-flag-unicode-range;
84
+ }
85
+
86
+ /* svg based for firefox */
87
+ @font-face {
88
+ font-family: ReplaceFlagEmojiSVG;
89
+ src: url('#{$assetsPath}/EmojiOneColor.woff2') format('woff2');
90
+ unicode-range: $emoji-flag-unicode-range;
91
+ }
92
+
93
+ .str-chat--windows-flags {
94
+ .str-chat__textarea__textarea,
95
+ .str-chat__message-text-inner *,
96
+ .str-chat__emoji-item--entity,
97
+ .emoji-mart-emoji-native * {
98
+ font-family: ReplaceFlagEmojiPNG, var(--second-font), sans-serif;
99
+ font-display: swap;
100
+ }
101
+ }
102
+
103
+ @-moz-document url-prefix('') {
104
+ .str-chat--windows-flags {
105
+ .str-chat__textarea__textarea,
106
+ .str-chat__message-text-inner *,
107
+ .str-chat__emoji-item--entity,
108
+ .emoji-mart-emoji-native * {
109
+ font-family: ReplaceFlagEmojiSVG, var(--second-font), sans-serif;
110
+ font-display: swap;
111
+ }
112
+ }
113
+ }
114
+
115
+ .str-chat-channel-list {
116
+ float: left;
117
+ }
118
+
119
+ .str-chat-channel {
120
+ max-height: 100vh;
121
+
122
+ .str-chat__container {
123
+ height: 100%;
124
+ display: flex;
125
+
126
+ .str-chat__main-panel,
127
+ .str-chat-angular__main-panel-inner {
128
+ height: 100%;
129
+ width: 100%;
130
+ min-width: 250px;
131
+ display: flex;
132
+ flex-direction: column;
133
+ flex: 1;
134
+
135
+ &--hideOnThread {
136
+ display: none;
137
+ }
138
+ }
139
+
140
+ .rfu-dropzone {
141
+ width: 100%;
142
+ }
143
+ }
144
+
145
+ &.messaging {
146
+ .str-chat__main-panel {
147
+ padding: var(--sm-p) var(--xs-p) 0 0;
148
+ }
149
+
150
+ @media screen and (max-width: 960px) {
151
+ .str-chat__main-panel {
152
+ padding: var(--xxs-p) var(--xxs-p) 0;
153
+ }
154
+ }
155
+ }
156
+
157
+ &.team {
158
+ .str-chat {
159
+ &__container {
160
+ display: flex;
161
+ }
162
+ }
163
+ }
164
+
165
+ &.commerce {
166
+ .str-chat {
167
+ &__main-panel {
168
+ width: 100%;
169
+ }
170
+
171
+ &__container {
172
+ background: var(--white95);
173
+ }
174
+ }
175
+
176
+ &.dark {
177
+ .str-chat__container {
178
+ background: var(--dark-grey);
179
+ box-shadow: 0 10px 31px 0 var(--black50);
180
+ }
181
+ }
182
+ }
183
+ }
184
+
185
+ .str-chat.dark {
186
+ .emoji-mart {
187
+ background: var(--dark-grey);
188
+ border: var(--dark-grey);
189
+ }
190
+
191
+ .emoji-mart-category-label span {
192
+ background: var(--dark-grey);
193
+ color: var(--white);
194
+ }
195
+
196
+ .emoji-mart-search {
197
+ input {
198
+ background: var(--dark-grey);
199
+ color: var(--white);
200
+ }
201
+
202
+ button svg {
203
+ fill: var(--white);
204
+ }
205
+ }
206
+ }
@@ -0,0 +1,158 @@
1
+ /* fonts */
2
+ /* https://systemfontstack.com/ */
3
+ $system-stack-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu,
4
+ Cantarell, 'Helvetica Neue', sans-serif;
5
+ $main-font: #{$system-stack-font};
6
+ $second-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
7
+
8
+ $base-font-weight: 400;
9
+ $heavy-font-weight: 700;
10
+
11
+ /* colors */
12
+ $primary-color: #ff00ff;
13
+ $secondary-color: #006cff;
14
+
15
+ $dt-bg-team: #1d1f22;
16
+
17
+ $border-color: #00000014;
18
+
19
+ $black: #000000;
20
+ $white: #ffffff;
21
+ $grey: #7a7a7a;
22
+ $darken-grey: #343434;
23
+ $lighten-black: #808080;
24
+ $lighten-grey: #858585;
25
+
26
+ /* miscellaneous */
27
+ $assetsPath: '../assets';
28
+ $border-radius: 16px;
29
+
30
+ :root {
31
+ /* fonts */
32
+ --main-font: #{$main-font};
33
+ --second-font: #{$second-font};
34
+
35
+ /* font size */
36
+
37
+ --xs-font: 10px;
38
+ --sm-font: 12px;
39
+ --md-font: 14px;
40
+ --lg-font: 16px;
41
+ --xl-font: 22px;
42
+ --xxl-font: 26px;
43
+ --xxxl-font: 32px;
44
+
45
+ /* fonts weight */
46
+ --font-weight-regular: #{$base-font-weight}; //400
47
+ --font-weight-semi-bold: 600;
48
+ --font-weight-bold: #{$heavy-font-weight}; //700
49
+
50
+ /* colors */
51
+ --primary-color: #{$secondary-color}; // this reassignment is to maintain backwards compatibility with the old scss variables
52
+ --primary-color-faded: #006cff5c;
53
+
54
+ --magenta: #{$primary-color};
55
+ --red: #ff0000;
56
+ --faded-red: #d0021b1a;
57
+ --blue: #026afa;
58
+ --faded-blue: #cfe3ff;
59
+
60
+ --dt-bg-team: #{$dt-bg-team};
61
+
62
+ --border-color: #{$border-color};
63
+
64
+ --lighten-black: #{$lighten-black};
65
+
66
+ --lighten-grey: #{$lighten-grey};
67
+
68
+ --light-grey: #ebebeb;
69
+ --grey: #{$grey};
70
+ --dark-grey: #{$darken-grey};
71
+
72
+ --green: #28ca42;
73
+ --faded-green: #02d0021a;
74
+
75
+ //-------------------------------White
76
+ --white: #{$white};
77
+ --white5: #ffffff0d;
78
+ --white10: #ffffff1a;
79
+ --white20: #ffffff33;
80
+ --white30: #ffffff4d;
81
+ --white40: #ffffff66;
82
+ --white50: #ffffff80;
83
+ --white60: #ffffff99;
84
+ --white70: #ffffffb3;
85
+ --white80: #ffffffcc;
86
+ --white90: #ffffffe6;
87
+ --white95: #fffffff2;
88
+
89
+ //-------------------------------Black
90
+ --black: #{$black};
91
+ --black5: #0000000d;
92
+ --black10: #0000001a;
93
+ --black20: #00000033;
94
+ --black30: #0000004d;
95
+ --black40: #00000066;
96
+ --black50: #00000080;
97
+ --black60: #00000099;
98
+ --black70: #000000b3;
99
+ --black80: #000000cc;
100
+ --black90: #000000e6;
101
+ --black95: #000000f2;
102
+
103
+ /* border-radius */
104
+ --border-radius: #{$border-radius};
105
+ --border-radius-sm: calc(var(--border-radius) / 4);
106
+ --border-radius-md: calc(var(--border-radius) / 2);
107
+ --border-radius-round: 999px;
108
+
109
+ --spacing-unit: 8px; // .5rem
110
+
111
+ /* padding */
112
+ --xxs-p: calc(var(--spacing-unit) / 2); // 4px
113
+ --xs-p: var(--spacing-unit); // 8px
114
+ --sm-p: calc(var(--spacing-unit) * 2); // 16px Base
115
+ --md-p: calc(var(--spacing-unit) * 3); // 24px
116
+ --lg-p: calc(var(--spacing-unit) * 4); // 32px
117
+ --xl-p: calc(var(--spacing-unit) * 5); // 40px
118
+ --xxl-p: calc(var(--spacing-unit) * 8); // 64px
119
+
120
+ /* margin */
121
+ --xxs-m: calc(var(--spacing-unit) / 2); // 4px
122
+ --xs-m: var(--spacing-unit); // 8px
123
+ --sm-m: calc(var(--spacing-unit) * 2); // 16px Base
124
+ --md-m: calc(var(--spacing-unit) * 3); // 24px
125
+ --lg-m: calc(var(--spacing-unit) * 4); // 32px
126
+ --xl-m: calc(var(--spacing-unit) * 5); // 40px
127
+ --xxl-m: calc(var(--spacing-unit) * 8); // 64px
128
+
129
+ /* miscellaneous */
130
+ --assetsPath: '../assets';
131
+
132
+ /* accent colors */
133
+ --accent_blue: #005fff;
134
+ --accent_green: #20e070;
135
+ --accent_red: #ff3742;
136
+
137
+ /* base colors */
138
+
139
+ --bg-gradient-end: #f7f7f7;
140
+ --bg-gradient-start: #fcfcfc;
141
+ --blue-alice: #e9f2ff;
142
+ --border: #00000014; // 14 = 8% opacity; top: x=0, y=-1; bottom: x=0, y=1
143
+ --button-background: #ffffff;
144
+ --button-text: #005fff;
145
+ --grey-gainsboro: #dbdbdb;
146
+ --grey-whisper: #ecebeb;
147
+ --highlight: #fbf4dd;
148
+ --modal-shadow: #00000099; // 99 = 60% opacity; x=0, y= 1, radius=4
149
+ --overlay: #00000033; // 33 = 20% opacity
150
+ --overlay-dark: #00000099; // 99 = 60% opacity
151
+ --shadow-icon: #00000040; // 40 = 25% opacity; x=0, y=0, radius=4
152
+ --targetedMessageBackground: #fbf4dd; // dark mode = #302D22
153
+ --transparent: transparent;
154
+ --white-smoke: #f2f2f2;
155
+ --white-snow: #fcfcfc;
156
+
157
+ --modal-overlay-color: rgba(0, 0, 0, 0.89);
158
+ }
@@ -0,0 +1,50 @@
1
+ // Setup
2
+ @import './_variables.scss';
3
+ @import './base.scss';
4
+
5
+ // External dependencies (copied from libraries to rectify built file path discrepancies)
6
+ @import './vendor/emoji-mart.scss'; // copy from '../../node_modules/emoji-mart/css/emoji-mart.css'
7
+ @import './vendor/mml-react.scss'; // copy from '../../node_modules/mml-react/dist/styles/index.css'
8
+ @import './vendor/react-file-utils.scss'; // copy from '../../node_modules/react-file-utils/dist/index.css'
9
+ @import './vendor/react-image-gallery.scss'; // copy from '../../node_modules/react-image-gallery/styles/css/image-gallery.css'
10
+
11
+ // Components
12
+ @import './ActionsBox.scss';
13
+ @import './AttachmentActions.scss';
14
+ @import './Attachment.scss';
15
+ @import './Avatar.scss';
16
+ @import './Audio.scss';
17
+ @import './Card.scss';
18
+ @import './ChannelHeader.scss';
19
+ @import './ChannelList.scss';
20
+ @import './ChannelListMessenger.scss';
21
+ @import './ChannelPreview.scss';
22
+ @import './ChannelSearch.scss';
23
+ @import './ChatDown.scss';
24
+ @import './EventComponent.scss';
25
+ @import './DateSeparator.scss';
26
+ @import './EditMessageForm.scss';
27
+ @import './Gallery.scss';
28
+ @import './LoadingChannels.scss';
29
+ @import './LoadingIndicator.scss';
30
+ @import './LoadMoreButton.scss';
31
+ @import './Message.scss';
32
+ @import './MessageActions.scss';
33
+ @import './MessageCommerce.scss';
34
+ @import './MessageInput.scss';
35
+ @import './MessageInputFlat.scss';
36
+ @import './MessageNotification.scss';
37
+ @import './MessageList.scss';
38
+ @import './MessageTeam.scss';
39
+ @import './MessageLivestream.scss';
40
+ @import './MessageRepliesCountButton.scss';
41
+ @import './Modal.scss';
42
+ @import './ReactionList.scss';
43
+ @import './ReactionSelector.scss';
44
+ @import './SendButton.scss';
45
+ @import './SimpleReactionsList.scss';
46
+ @import './SmallMessageInput.scss';
47
+ @import './Thread.scss';
48
+ @import './TypingIndicator.scss';
49
+ @import './Tooltip.scss';
50
+ @import './VirtualMessage.scss';