quickblox-react-ui-kit 0.3.0-beta.2 → 0.3.0-beta.3

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 (129) hide show
  1. package/dist/Data/repository/DialogsRepository.d.ts +1 -0
  2. package/dist/Data/source/remote/IRemoteDataSource.d.ts +1 -0
  3. package/dist/Data/source/remote/RemoteDataSource.d.ts +2 -0
  4. package/dist/Domain/entity/DialogEventInfo.d.ts +4 -0
  5. package/dist/Domain/use_cases/GetAllMessagesForDialog.d.ts +3 -3
  6. package/dist/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.d.ts +10 -0
  7. package/dist/Presentation/Views/Dialog/DialogViewModel.d.ts +2 -0
  8. package/dist/Presentation/Views/Dialog/MessageItem/MessageItem.d.ts +2 -2
  9. package/dist/Presentation/ui-components/MessageInput/MessageInput.stories.d.ts +4 -4
  10. package/dist/index-ui.js +549 -422
  11. package/dist/index-ui.js.map +1 -1
  12. package/dist/qb-api-calls/index.d.ts +1 -0
  13. package/package.json +1 -1
  14. package/src/App.tsx +2 -2
  15. package/src/Data/repository/DialogsRepository.ts +16 -0
  16. package/src/Data/source/remote/IRemoteDataSource.ts +2 -0
  17. package/src/Data/source/remote/RemoteDataSource.ts +89 -10
  18. package/src/Domain/entity/DialogEventInfo.ts +4 -0
  19. package/src/Domain/use_cases/GetAllMessagesForDialog.ts +3 -3
  20. package/src/Domain/use_cases/GetDialogByIdUseCase.ts +5 -1
  21. package/src/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.ts +31 -0
  22. package/src/Presentation/Views/Dialog/DialogViewModel.ts +2 -0
  23. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.scss +10 -0
  24. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.tsx +12 -13
  25. package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +17 -9
  26. package/src/Presentation/Views/Dialog/useDialogViewModel.ts +64 -32
  27. package/src/Presentation/Views/DialogInfo/DialogInfo.scss +3 -11
  28. package/src/Presentation/Views/DialogInfo/MembersList/MembersList.scss +8 -99
  29. package/src/Presentation/Views/DialogInfo/MembersList/MembersList.tsx +9 -29
  30. package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +83 -3
  31. package/src/Presentation/Views/EditDialog/EditDialog.scss +1 -40
  32. package/src/Presentation/Views/EditDialog/EditDialog.tsx +9 -14
  33. package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +14 -15
  34. package/src/Presentation/icons/media/video-file.svg +2 -2
  35. package/src/Presentation/layouts/Desktop/DesktopLayout.scss +8 -8
  36. package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +119 -100
  37. package/src/Presentation/ui-components/Avatar/avatar.stories.tsx +1 -1
  38. package/src/Presentation/ui-components/Badge/Badge.stories.ts +1 -1
  39. package/src/Presentation/ui-components/Button/Button.stories.ts +1 -1
  40. package/src/Presentation/ui-components/DialogBanner/DialogBanner.stories.ts +2 -1
  41. package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx +29 -1
  42. package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +4 -1
  43. package/src/Presentation/ui-components/DialogWindow/DialogWindow.stories.tsx +2 -1
  44. package/src/Presentation/ui-components/Dropdown/Dropdown.stories.tsx +2 -1
  45. package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +4 -1
  46. package/src/Presentation/ui-components/Header/Header.stories.tsx +2 -1
  47. package/src/Presentation/ui-components/Loader/Loader.stories.ts +1 -1
  48. package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +6 -1
  49. package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.scss +13 -0
  50. package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx +16 -2
  51. package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.scss +9 -0
  52. package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx +15 -17
  53. package/src/Presentation/ui-components/Message/Message.stories.tsx +80 -1
  54. package/src/Presentation/ui-components/MessageInput/MessageInput.stories.tsx +16 -8
  55. package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.ts +3 -1
  56. package/src/Presentation/ui-components/Placeholder/Placeholder.stories.tsx +2 -6
  57. package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.ts +12 -1
  58. package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +5 -1
  59. package/src/Presentation/ui-components/TextField/TextField.stories.ts +7 -2
  60. package/src/Presentation/ui-components/Toast/Toast.stories.tsx +1 -1
  61. package/src/Presentation/ui-components/UserListItem/UserListItem.stories.tsx +3 -1
  62. package/src/index.scss +0 -2
  63. package/src/qb-api-calls/index.ts +1 -0
  64. package/storybook-static/433.dffc897e.iframe.bundle.js +1 -0
  65. package/storybook-static/603.4cf0423b.iframe.bundle.js +1 -0
  66. package/storybook-static/{758.d99b0166.iframe.bundle.js → 758.e75a5a47.iframe.bundle.js} +3 -3
  67. package/storybook-static/{758.d99b0166.iframe.bundle.js.map → 758.e75a5a47.iframe.bundle.js.map} +1 -1
  68. package/storybook-static/{472.3c9e81e6.iframe.bundle.js → 768.e44c05aa.iframe.bundle.js} +3 -3
  69. package/storybook-static/{472.3c9e81e6.iframe.bundle.js.map → 768.e44c05aa.iframe.bundle.js.map} +1 -1
  70. package/storybook-static/{926.f14bb932.iframe.bundle.js → 926.f5308089.iframe.bundle.js} +2 -2
  71. package/storybook-static/{926.f14bb932.iframe.bundle.js.map → 926.f5308089.iframe.bundle.js.map} +1 -1
  72. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.cf806856.iframe.bundle.js +1 -0
  73. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js +14 -0
  74. package/storybook-static/{Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js.map → Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js.map} +1 -1
  75. package/storybook-static/Presentation-ui-components-Button-Button-stories.4fac7996.iframe.bundle.js +1 -0
  76. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js +10 -0
  77. package/storybook-static/{Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js.map → Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js.map} +1 -1
  78. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.90aa44c5.iframe.bundle.js +1 -0
  79. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.3523a670.iframe.bundle.js +1 -0
  80. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.aacf2ec2.iframe.bundle.js +1 -0
  81. package/storybook-static/Presentation-ui-components-Header-Header-stories.073c4507.iframe.bundle.js +1 -0
  82. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.9bf3fb63.iframe.bundle.js +1 -0
  83. package/storybook-static/{Presentation-ui-components-Message-Message-stories.63bec01b.iframe.bundle.js → Presentation-ui-components-Message-Message-stories.343dfae0.iframe.bundle.js} +1 -1
  84. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.262a0cf2.iframe.bundle.js +1 -0
  85. package/storybook-static/{Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js → Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js} +3 -3
  86. package/storybook-static/{Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js.map → Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js.map} +1 -1
  87. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.871f508c.iframe.bundle.js +1 -0
  88. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.1661d95b.iframe.bundle.js +1 -0
  89. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.8f6fca84.iframe.bundle.js +1 -0
  90. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.4a2eef3e.iframe.bundle.js +1 -0
  91. package/storybook-static/{Presentation-ui-components-Toast-Toast-stories.e26b2e07.iframe.bundle.js → Presentation-ui-components-Toast-Toast-stories.55e63162.iframe.bundle.js} +1 -1
  92. package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.e88f4206.iframe.bundle.js → Presentation-ui-components-UserListItem-UserListItem-stories.04d3eefe.iframe.bundle.js} +1 -1
  93. package/storybook-static/docs-Introduction-mdx.ac401482.iframe.bundle.js +10 -0
  94. package/storybook-static/docs-Introduction-mdx.ac401482.iframe.bundle.js.map +1 -0
  95. package/storybook-static/docs-Styling-mdx.1d6c1212.iframe.bundle.js +10 -0
  96. package/storybook-static/docs-Styling-mdx.1d6c1212.iframe.bundle.js.map +1 -0
  97. package/storybook-static/iframe.html +4 -4
  98. package/storybook-static/index.json +1 -1
  99. package/storybook-static/main.597d432b.iframe.bundle.js +1 -0
  100. package/storybook-static/project.json +1 -1
  101. package/storybook-static/runtime~main.e945879b.iframe.bundle.js +1 -0
  102. package/storybook-static/static/css/{Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css → Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css} +3 -3
  103. package/storybook-static/static/css/{Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css.map → Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css.map} +1 -1
  104. package/storybook-static/static/css/{Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css → Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css} +1 -2
  105. package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css.map +1 -0
  106. package/storybook-static/static/css/{main.4e852eef.css → main.6fa55a2c.css} +2 -2
  107. package/storybook-static/static/css/{main.4e852eef.css.map → main.6fa55a2c.css.map} +1 -1
  108. package/storybook-static/static/media/video-file.dc2971be489b2af7b1c04dcc55bfe881.svg +3 -0
  109. package/storybook-static/stories.json +1 -1
  110. package/storybook-static/312.0aa0e670.iframe.bundle.js +0 -1
  111. package/storybook-static/341.bea6d0bd.iframe.bundle.js +0 -1
  112. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.2fb23ae6.iframe.bundle.js +0 -1
  113. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js +0 -14
  114. package/storybook-static/Presentation-ui-components-Button-Button-stories.f6c6437b.iframe.bundle.js +0 -1
  115. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js +0 -10
  116. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.f1cb9d40.iframe.bundle.js +0 -1
  117. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.0ad17c54.iframe.bundle.js +0 -1
  118. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.3b620239.iframe.bundle.js +0 -1
  119. package/storybook-static/Presentation-ui-components-Header-Header-stories.45503161.iframe.bundle.js +0 -1
  120. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.8b53bb33.iframe.bundle.js +0 -1
  121. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.728a66ad.iframe.bundle.js +0 -1
  122. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.0898ead6.iframe.bundle.js +0 -1
  123. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.973cdb64.iframe.bundle.js +0 -1
  124. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.0af0b8a8.iframe.bundle.js +0 -1
  125. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.5987d2bb.iframe.bundle.js +0 -1
  126. package/storybook-static/main.0332574c.iframe.bundle.js +0 -1
  127. package/storybook-static/runtime~main.16726a14.iframe.bundle.js +0 -1
  128. package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css.map +0 -1
  129. package/storybook-static/static/media/video-file.dbd1f8c63a3769f9e9a027f0922d56b2.svg +0 -3
@@ -27,6 +27,7 @@ export default function AudioBubble({
27
27
 
28
28
  const handleAudioEnd = () => {
29
29
  setIsPlaying(false);
30
+ setSecondsElapsed(0);
30
31
  };
31
32
 
32
33
  // eslint-disable-next-line @typescript-eslint/no-unsafe-call,consistent-return
@@ -123,6 +124,16 @@ export default function AudioBubble({
123
124
  return divElements;
124
125
  };
125
126
 
127
+ const formatTime = (time: number): string => {
128
+ const minutes = Math.floor((time % 3600) / 60);
129
+ const seconds = Math.floor(time % 60);
130
+
131
+ const formattedMinutes = minutes.toString().padStart(2, '0');
132
+ const formattedSeconds = seconds.toString().padStart(2, '0');
133
+
134
+ return `${formattedMinutes}:${formattedSeconds}`;
135
+ };
136
+
126
137
  return (
127
138
  <div className={`audio-bubble-background__${type}`}>
128
139
  <audio ref={audioRef} className="audio-body" preload="auto">
@@ -139,8 +150,11 @@ export default function AudioBubble({
139
150
  <PlaySvg className="audio-body__controls--color" />
140
151
  )}
141
152
  </div>
142
- <div className="equalizer">
143
- {isPlaying ? renderRandomEqualizer() : renderEqualizer(fileUid!)}
153
+ <div className="audio-player__equalizer-time">
154
+ <div className="equalizer">
155
+ {isPlaying ? renderRandomEqualizer() : renderEqualizer(fileUid!)}
156
+ </div>
157
+ <div className="time-play">{formatTime(secondsElapsed)}</div>
144
158
  </div>
145
159
  </div>
146
160
  </div>
@@ -4,6 +4,13 @@
4
4
  width: var(--max-width-audio-message);
5
5
  padding: 0;
6
6
  border-radius: 4px;
7
+
8
+ &__link {
9
+ color: var(--secondary-text, #636d78);
10
+ text-align: left;
11
+ font: var(--label-label-small);
12
+ height: 16px;
13
+ }
7
14
  }
8
15
 
9
16
  .message-attachment-video {
@@ -16,3 +23,5 @@
16
23
  width: var(--max-width-audio-message);
17
24
  max-height: 160px;
18
25
  }
26
+
27
+
@@ -13,24 +13,22 @@ export default function VideoBubble({
13
13
  }: VideoBubbleProps) {
14
14
  return (
15
15
  <div className={className}>
16
- <div>
17
- <div className="message-attachment-video">
18
- <video
19
- className="message-attachment-video-body"
20
- controls
21
- key={title}
22
- playsInline
23
- src={href}
24
- >
25
- <a href={href} download>
26
- Download
27
- </a>
28
- </video>
29
- </div>
30
- <a href={href} download>
31
- Download
32
- </a>
16
+ <div className="message-attachment-video">
17
+ <video
18
+ className="message-attachment-video-body"
19
+ controls
20
+ key={title}
21
+ playsInline
22
+ src={href}
23
+ >
24
+ <a href={href} download>
25
+ Download
26
+ </a>
27
+ </video>
33
28
  </div>
29
+ <a href={href} download className="message-attachment-video-body__link">
30
+ Download
31
+ </a>
34
32
  </div>
35
33
  );
36
34
  }
@@ -76,7 +76,8 @@ function getChildrenByType(type: string, children?: ReactElement) {
76
76
  }
77
77
  // const meta: Meta<typeof Message> = {
78
78
  const meta: Meta<MessageProps> = {
79
- title: 'Message',
79
+ tags: ['autodocs'],
80
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/Message',
80
81
  component: Message,
81
82
  decorators: [
82
83
  (StoryFn, context) => {
@@ -126,11 +127,66 @@ const meta: Meta<MessageProps> = {
126
127
  // ),
127
128
  },
128
129
  argTypes: {
130
+ userName: {
131
+ table: {
132
+ type: { summary: 'string' },
133
+ defaultValue: {
134
+ summary: '',
135
+ },
136
+ },
137
+ description: 'User name',
138
+ },
139
+ avatar: {
140
+ control: false,
141
+ table: {
142
+ type: { summary: 'ReactElement' },
143
+ },
144
+ description: 'Message sender avatar',
145
+ },
146
+ time: {
147
+ table: {
148
+ type: { summary: 'string' },
149
+ defaultValue: {
150
+ summary: '',
151
+ },
152
+ },
153
+ description: 'Time of sending the message',
154
+ },
129
155
  type: {
156
+ table: {
157
+ type: { summary: 'outgoing | incoming' },
158
+ defaultValue: {
159
+ summary: 'incoming',
160
+ },
161
+ },
130
162
  control: 'radio',
131
163
  options: ['incoming', 'outgoing'],
164
+ description: 'The type of message can be either outgoing or incoming',
165
+ },
166
+ enableSelect: {
167
+ description: 'Enables the option to select a message',
168
+ },
169
+ isSelect: {
170
+ description: 'The status of message selection',
171
+ },
172
+ disabled: {
173
+ description: 'Active',
174
+ },
175
+ status: {
176
+ table: {
177
+ type: { summary: 'sent | delivered | viewed | error' },
178
+ defaultValue: {
179
+ summary: '',
180
+ },
181
+ },
182
+ control: 'select',
183
+ options: ['sent', 'delivered', 'viewed', 'error'],
184
+ description: 'The status of the message',
132
185
  },
133
186
  children: {
187
+ table: {
188
+ type: { summary: 'ReactElement' },
189
+ },
134
190
  description: 'Message bubble',
135
191
  control: 'select',
136
192
  options: [
@@ -177,6 +233,29 @@ const meta: Meta<MessageProps> = {
177
233
  ),
178
234
  },
179
235
  },
236
+ subtype: {
237
+ description: 'Additional message subtype',
238
+ },
239
+ onSelect: {
240
+ table: {
241
+ type: { summary: 'function' },
242
+ },
243
+ description: 'The function responsible for message selection',
244
+ },
245
+ bottomPart: {
246
+ table: {
247
+ type: { summary: 'ReactElement' },
248
+ },
249
+ control: false,
250
+ description: 'The bottom part of the message layout',
251
+ },
252
+ additionalPart: {
253
+ table: {
254
+ type: { summary: 'ReactElement' },
255
+ },
256
+ control: false,
257
+ description: 'Additional section of the message layout',
258
+ },
180
259
  },
181
260
  };
182
261
 
@@ -5,12 +5,16 @@ import ReplyMessagePreview from './ReplyMessagePreview/ReplyMessagePreview';
5
5
  import { Stubs } from '../../../Data/Stubs';
6
6
 
7
7
  const meta: Meta<typeof MessageInput> = {
8
- title: 'MessageInput',
8
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/MessageInput',
9
9
  component: MessageInput,
10
+ tags: ['autodocs'],
10
11
  parameters: {
11
12
  layout: 'centered',
12
13
  },
13
14
  argTypes: {
15
+ rephrase: {
16
+ control: false,
17
+ },
14
18
  value: {
15
19
  control: 'text',
16
20
  description: 'Input value',
@@ -96,7 +100,8 @@ const meta: Meta<typeof MessageInput> = {
96
100
 
97
101
  export default meta;
98
102
 
99
- export const Default: StoryObj<typeof MessageInput> = {
103
+ export const MessageInputDefault: StoryObj<typeof MessageInput> = {
104
+ name: 'MessageInput Default',
100
105
  args: {
101
106
  value: '',
102
107
  enableVoice: false,
@@ -105,16 +110,18 @@ export const Default: StoryObj<typeof MessageInput> = {
105
110
  },
106
111
  };
107
112
 
108
- export const WithVoiceMessage: StoryObj<typeof MessageInput> = {
113
+ export const MessageInputWithVoiceMessage: StoryObj<typeof MessageInput> = {
114
+ name: 'MessageInput With Voice Message',
109
115
  args: {
110
- ...Default.args,
116
+ ...MessageInputDefault.args,
111
117
  enableVoice: true,
112
118
  },
113
119
  };
114
120
 
115
- export const WithPreview: StoryObj<typeof MessageInput> = {
121
+ export const MessageInputWithPreview: StoryObj<typeof MessageInput> = {
122
+ name: 'MessageInput With Preview',
116
123
  args: {
117
- ...Default.args,
124
+ ...MessageInputDefault.args,
118
125
  previewMessage: (
119
126
  <ReplyMessagePreview
120
127
  messages={[Stubs.initializeMessagesWithMockData()[0]]}
@@ -127,9 +134,10 @@ export const WithPreview: StoryObj<typeof MessageInput> = {
127
134
  },
128
135
  };
129
136
 
130
- export const LoadingState: StoryObj<typeof MessageInput> = {
137
+ export const MessageInputLoadingState: StoryObj<typeof MessageInput> = {
138
+ name: 'MessageInput Loading State',
131
139
  args: {
132
- ...Default.args,
140
+ ...MessageInputDefault.args,
133
141
  loading: true,
134
142
  },
135
143
  };
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
3
3
  import MessageSeparator from './MessageSeparator';
4
4
 
5
5
  const meta = {
6
- title: 'MessageSeparator',
6
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/MessageSeparator',
7
7
  component: MessageSeparator,
8
8
  tags: ['autodocs'],
9
9
  parameters: {
@@ -38,6 +38,7 @@ export default meta;
38
38
  type Story = StoryObj<typeof meta>;
39
39
 
40
40
  export const MessageSeparatorDate: Story = {
41
+ name: 'MessageSeparator Date',
41
42
  args: {
42
43
  text: '2024-01-26T00:00:00.000Z',
43
44
  type: 'date',
@@ -45,6 +46,7 @@ export const MessageSeparatorDate: Story = {
45
46
  };
46
47
 
47
48
  export const MessageSeparatorSystem: Story = {
49
+ name: 'MessageSeparator System',
48
50
  args: {
49
51
  text: 'User created chat',
50
52
  type: 'system',
@@ -10,16 +10,16 @@ import {
10
10
  BannedSvg,
11
11
  SearchSvg,
12
12
  } from '../../icons';
13
- import Loader from '../Loader/Loader';
14
13
 
15
14
  const meta: Meta<typeof Placeholder> = {
16
- title: 'Placeholder',
15
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/Placeholder',
17
16
  component: Placeholder,
18
17
  tags: ['autodocs'],
19
18
  parameters: {
20
19
  layout: 'centered',
21
20
  },
22
21
  args: {
22
+ text: ['Text for placeholder'],
23
23
  className: '',
24
24
  onRetry: undefined,
25
25
  icon: undefined,
@@ -33,7 +33,6 @@ const meta: Meta<typeof Placeholder> = {
33
33
  'Muted',
34
34
  'Banned',
35
35
  'Search',
36
- 'Loader',
37
36
  'Error',
38
37
  ],
39
38
  control: 'select',
@@ -44,7 +43,6 @@ const meta: Meta<typeof Placeholder> = {
44
43
  Muted: <MutedSvg />,
45
44
  Banned: <BannedSvg />,
46
45
  Search: <SearchSvg />,
47
- Loader: <Loader size="lg" />,
48
46
  Error: <ErrorSvg />,
49
47
  },
50
48
  table: {
@@ -81,14 +79,12 @@ type StoryDefault = StoryObj<typeof meta>;
81
79
 
82
80
  export const PlaceholderDefault: StoryDefault = {
83
81
  args: {
84
- text: ['The are no massage'],
85
82
  icon: <PublicChannelSvg />,
86
83
  },
87
84
  };
88
85
 
89
86
  export const PlaceholderError: StoryDefault = {
90
87
  args: {
91
- text: ['Something wrong'],
92
88
  icon: <ErrorSvg />,
93
89
  onRetry: () => undefined,
94
90
  },
@@ -2,7 +2,8 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import PreviewFileMessage from './PreviewFileMessage';
3
3
 
4
4
  const meta: Meta<typeof PreviewFileMessage> = {
5
- title: 'PreviewFileMessage',
5
+ title:
6
+ '@quickblox-react-ui-kit/Presentation/ui-components/PreviewFileMessage',
6
7
  tags: ['autodocs'],
7
8
  component: PreviewFileMessage,
8
9
  parameters: {
@@ -32,6 +33,12 @@ const meta: Meta<typeof PreviewFileMessage> = {
32
33
  },
33
34
  description: 'Additional classes',
34
35
  },
36
+ src: {
37
+ table: {
38
+ type: { summary: 'string' },
39
+ },
40
+ description: 'Source file',
41
+ },
35
42
  },
36
43
  };
37
44
 
@@ -39,12 +46,14 @@ export default meta;
39
46
  type StoryDefault = StoryObj<typeof meta>;
40
47
 
41
48
  export const PreviewFileMessageDefault: StoryDefault = {
49
+ name: 'PreviewFileMessage Default',
42
50
  args: {
43
51
  name: 'text document.txt',
44
52
  },
45
53
  };
46
54
 
47
55
  export const PreviewFileMessageAudio: StoryDefault = {
56
+ name: 'PreviewFileMessage Audio',
48
57
  args: {
49
58
  type: 'audio',
50
59
  name: 'audio.mp3',
@@ -52,6 +61,7 @@ export const PreviewFileMessageAudio: StoryDefault = {
52
61
  };
53
62
 
54
63
  export const PreviewFileMessageVideo: StoryDefault = {
64
+ name: 'PreviewFileMessage Video',
55
65
  args: {
56
66
  type: 'video',
57
67
  name: 'video.mp4',
@@ -59,6 +69,7 @@ export const PreviewFileMessageVideo: StoryDefault = {
59
69
  };
60
70
 
61
71
  export const PreviewFileMessageImage: StoryDefault = {
72
+ name: 'PreviewFileMessage Image',
62
73
  args: {
63
74
  src: 'https://quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-messaging.svg',
64
75
  name: 'screenshot.jpg',
@@ -11,7 +11,7 @@ import {
11
11
  } from '../../icons';
12
12
 
13
13
  const meta: Meta<typeof SettingsItem> = {
14
- title: 'Settings Item',
14
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/SettingsItem',
15
15
  component: SettingsItem,
16
16
  tags: ['autodocs'],
17
17
  parameters: {
@@ -46,6 +46,7 @@ const meta: Meta<typeof SettingsItem> = {
46
46
  description: 'Format plug svg or React element ',
47
47
  },
48
48
  rightSection: {
49
+ control: false,
49
50
  table: {
50
51
  defaultValue: {
51
52
  summary: 'ReactElement | ReactElement[]',
@@ -79,6 +80,7 @@ export default meta;
79
80
  type StoryDefault = StoryObj<typeof meta>;
80
81
 
81
82
  export const SettingsItemDefault: StoryDefault = {
83
+ name: 'SettingsItem Default',
82
84
  args: {
83
85
  title: 'Search in dialog',
84
86
  icon: (
@@ -92,6 +94,7 @@ export const SettingsItemDefault: StoryDefault = {
92
94
  };
93
95
 
94
96
  export const SettingsItemNotification: StoryDefault = {
97
+ name: 'SettingsItem Notification',
95
98
  args: {
96
99
  title: 'Notification',
97
100
  icon: (
@@ -112,6 +115,7 @@ export const SettingsItemNotification: StoryDefault = {
112
115
  };
113
116
 
114
117
  export const SettingsItemMembers: StoryDefault = {
118
+ name: 'SettingsItem Members',
115
119
  args: {
116
120
  title: 'Notification',
117
121
  icon: (
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
3
3
  import TextField from './TextField';
4
4
 
5
5
  const meta: Meta<typeof TextField> = {
6
- title: 'TextField',
6
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/TextField',
7
7
  component: TextField,
8
8
  tags: ['autodocs'],
9
9
  parameters: {
@@ -50,6 +50,7 @@ const meta: Meta<typeof TextField> = {
50
50
  description: 'Text field label',
51
51
  },
52
52
  icon: {
53
+ control: false,
53
54
  table: {
54
55
  type: { summary: 'svg' },
55
56
  },
@@ -84,9 +85,12 @@ const meta: Meta<typeof TextField> = {
84
85
  export default meta;
85
86
  type StoryDefault = StoryObj<typeof meta>;
86
87
 
87
- export const TextFieldDefault: StoryDefault = {};
88
+ export const TextFieldDefault: StoryDefault = {
89
+ name: 'TextField Default',
90
+ };
88
91
 
89
92
  export const TextFieldDisabled: StoryDefault = {
93
+ name: 'TextField Disabled',
90
94
  args: {
91
95
  disabled: true,
92
96
  label: 'Text Label',
@@ -95,6 +99,7 @@ export const TextFieldDisabled: StoryDefault = {
95
99
  };
96
100
 
97
101
  export const TextFieldReset: StoryDefault = {
102
+ name: 'TextField Reset',
98
103
  args: {
99
104
  label: 'Text Label',
100
105
  placeholder: 'Placeholder',
@@ -5,7 +5,7 @@ import ToastProvider from './ToastProvider';
5
5
  import Button from '../Button/Button';
6
6
 
7
7
  const meta: Meta<typeof ToastProvider> = {
8
- title: 'Toast',
8
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/Toast',
9
9
  component: ToastProvider,
10
10
  tags: ['autodocs'],
11
11
  parameters: {
@@ -5,7 +5,7 @@ import UserListItem from './UserListItem';
5
5
  import ScrollableContainer from '../../components/containers/ScrollableContainer/ScrollableContainer';
6
6
 
7
7
  const meta = {
8
- title: 'User List Item',
8
+ title: '@quickblox-react-ui-kit/Presentation/ui-components/UserListItem',
9
9
  component: UserListItem,
10
10
  tags: ['autodocs'],
11
11
  parameters: {
@@ -118,11 +118,13 @@ function UserListExample() {
118
118
  }
119
119
 
120
120
  export const UserListItemDefault: StoryDefault = {
121
+ name: 'UserListItem Default',
121
122
  args: {
122
123
  userName: 'User name',
123
124
  },
124
125
  };
125
126
 
126
127
  export const UserList: StoryDefault = {
128
+ name: 'UserListItem Multiple',
127
129
  render: () => <UserListExample />,
128
130
  };
package/src/index.scss CHANGED
@@ -11,8 +11,6 @@ body {
11
11
  font-family: 'Roboto';
12
12
  color: var(--main-text);
13
13
  background-color: var(--main-background);
14
- overflow: hidden !important;
15
- scrollbar-width: none !important;
16
14
  }
17
15
 
18
16
  /* Media-query for mobile devices */
@@ -479,6 +479,7 @@ export function qbChatGetMessagesExtended(
479
479
  sort_desc: 'date_sent' | 'created_at' | 'updated_at';
480
480
  sort_asc: 'date_sent' | 'created_at' | 'updated_at';
481
481
  _id: string;
482
+ mark_as_read: 0 | 1;
482
483
  date_sent: Partial<{
483
484
  lt: number;
484
485
  lte: number;
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[433],{"./node_modules/@mdx-js/react/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{MDXContext:()=>_lib_index_js__WEBPACK_IMPORTED_MODULE_0__.pC,MDXProvider:()=>_lib_index_js__WEBPACK_IMPORTED_MODULE_0__.Zo,useMDXComponents:()=>_lib_index_js__WEBPACK_IMPORTED_MODULE_0__.ah,withMDXComponents:()=>_lib_index_js__WEBPACK_IMPORTED_MODULE_0__.NF});var _lib_index_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js")},"./node_modules/@mdx-js/react/lib/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{NF:()=>withMDXComponents,Zo:()=>MDXProvider,ah:()=>useMDXComponents,pC:()=>MDXContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");let MDXContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext({});function withMDXComponents(Component){return boundMDXComponent;function boundMDXComponent(props){let allComponents=useMDXComponents(props.components);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,{...props,allComponents})}}function useMDXComponents(components){let contextComponents=react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext);return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(()=>"function"==typeof components?components(contextComponents):{...contextComponents,...components},[contextComponents,components])}let emptyObject={};function MDXProvider({components,children,disableParentContext}){let allComponents;return allComponents=disableParentContext?"function"==typeof components?components({}):components||emptyObject:useMDXComponents(components),react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXContext.Provider,{value:allComponents},children)}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[603],{"./node_modules/@storybook/addon-docs/dist/DocsRenderer-NNNQARDV.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{DocsRenderer:()=>DocsRenderer});var react=__webpack_require__("./node_modules/react/index.js"),react_18=__webpack_require__("./node_modules/@storybook/react-dom-shim/dist/react-18.mjs"),dist=__webpack_require__("./node_modules/@storybook/blocks/dist/index.mjs"),defaultComponents={code:dist.bD,a:dist.Ct,...dist.lO},ErrorBoundary=class extends react.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(err){let{showException}=this.props;showException(err)}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:react.createElement(react.Fragment,null,children)}},DocsRenderer=class{constructor(){this.render=async(context,docsParameter,element)=>{let components={...defaultComponents,...docsParameter?.components},TDocs=dist.WI;return new Promise((resolve,reject)=>{__webpack_require__.e(433).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@mdx-js/react/index.js")).then(({MDXProvider})=>(0,react_18.l)(react.createElement(ErrorBoundary,{showException:reject,key:Math.random()},react.createElement(MDXProvider,{components},react.createElement(TDocs,{context,docsParameter}))),element)).then(()=>resolve())})},this.unmount=element=>{(0,react_18.K)(element)}}}},"./node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext}}]);