@linktr.ee/messaging-react 2.3.0-rc-1779427772 → 2.3.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.
- package/dist/{Card-DKp7ijLV.js → Card-4takoN_-.js} +6 -6
- package/dist/{Card-DKp7ijLV.js.map → Card-4takoN_-.js.map} +1 -1
- package/dist/{Card-Djm6JjNo.js → Card-BuROm0u7.js} +19 -19
- package/dist/{Card-Djm6JjNo.js.map → Card-BuROm0u7.js.map} +1 -1
- package/dist/{Card-BlzGsGam.cjs → Card-CexShqpK.cjs} +2 -2
- package/dist/{Card-BlzGsGam.cjs.map → Card-CexShqpK.cjs.map} +1 -1
- package/dist/{Card-BkWwtS0b.cjs → Card-CgpHBx-W.cjs} +2 -2
- package/dist/{Card-BkWwtS0b.cjs.map → Card-CgpHBx-W.cjs.map} +1 -1
- package/dist/{Card-B7yHs01-.js → Card-DdpdnSh_.js} +16 -16
- package/dist/{Card-B7yHs01-.js.map → Card-DdpdnSh_.js.map} +1 -1
- package/dist/{Card-DApWNv5V.cjs → Card-ot16XqS2.cjs} +2 -2
- package/dist/{Card-DApWNv5V.cjs.map → Card-ot16XqS2.cjs.map} +1 -1
- package/dist/{LockedThumbnail-BjF6khtg.cjs → LockedThumbnail-CydtYOSA.cjs} +2 -2
- package/dist/{LockedThumbnail-BjF6khtg.cjs.map → LockedThumbnail-CydtYOSA.cjs.map} +1 -1
- package/dist/{LockedThumbnail-pm6jo2B4.js → LockedThumbnail-Drsh4B5o.js} +8 -8
- package/dist/{LockedThumbnail-pm6jo2B4.js.map → LockedThumbnail-Drsh4B5o.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index-BCbVXFHI.js +4698 -0
- package/dist/index-BCbVXFHI.js.map +1 -0
- package/dist/index-CQ913euH.cjs +2 -0
- package/dist/index-CQ913euH.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +22 -13
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/ChannelView.tsx +2 -8
- package/src/components/CustomMessage/CustomMessage.stories.tsx +0 -140
- package/src/components/CustomMessage/index.tsx +15 -20
- package/src/components/MessageAttachment/Image/ImageAttachment.stories.tsx +8 -5
- package/src/components/MessageAttachment/Image/index.tsx +7 -1
- package/src/components/MessageAttachment/MessageAttachment.test.tsx +200 -19
- package/src/components/MessageAttachment/Pdf/index.tsx +14 -15
- package/src/components/MessageAttachment/Video/VideoAttachment.stories.tsx +2 -2
- package/src/components/MessageAttachment/Video/index.tsx +11 -2
- package/src/components/MessageAttachment/_shared/CarouselNav.tsx +47 -0
- package/src/components/MessageAttachment/_shared/DownloadAction.tsx +27 -27
- package/src/components/MessageAttachment/_shared/ImageViewer.tsx +59 -261
- package/src/components/MessageAttachment/_shared/PdfViewer.tsx +56 -30
- package/src/components/MessageAttachment/_shared/VideoViewer.tsx +53 -109
- package/src/components/MessageAttachment/_shared/ViewerShell.tsx +127 -107
- package/src/components/MessageAttachment/_shared/useCarousel.ts +103 -0
- package/src/components/MessageAttachment/index.tsx +18 -9
- package/src/components/MessageAttachment/types.ts +1 -1
- package/src/styles.css +177 -85
- package/dist/index-7sLuX6s4.cjs +0 -18
- package/dist/index-7sLuX6s4.cjs.map +0 -1
- package/dist/index-Co-LV7yc.js +0 -8220
- package/dist/index-Co-LV7yc.js.map +0 -1
- package/src/components/CustomMessage/CustomMessageActions.tsx +0 -35
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { useMessageContext, useTranslationContext } from 'stream-chat-react'
|
|
3
|
-
import {
|
|
4
|
-
DefaultDropdownActionButton,
|
|
5
|
-
MessageActions,
|
|
6
|
-
type MessageActionSetItem,
|
|
7
|
-
} from 'stream-chat-react/experimental'
|
|
8
|
-
|
|
9
|
-
const DeleteAction = () => {
|
|
10
|
-
const { handleDelete } = useMessageContext('CustomMessageActions')
|
|
11
|
-
const { t } = useTranslationContext('CustomMessageActions')
|
|
12
|
-
return (
|
|
13
|
-
<DefaultDropdownActionButton onClick={handleDelete}>
|
|
14
|
-
{t('Delete')}
|
|
15
|
-
</DefaultDropdownActionButton>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const ReportAction = () => {
|
|
20
|
-
const { handleFlag } = useMessageContext('CustomMessageActions')
|
|
21
|
-
return (
|
|
22
|
-
<DefaultDropdownActionButton onClick={handleFlag}>
|
|
23
|
-
Report
|
|
24
|
-
</DefaultDropdownActionButton>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const MESSAGE_ACTION_SET: MessageActionSetItem[] = [
|
|
29
|
-
{ Component: DeleteAction, placement: 'dropdown', type: 'delete' },
|
|
30
|
-
{ Component: ReportAction, placement: 'dropdown', type: 'flag' },
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
export const CustomMessageActions = () => (
|
|
34
|
-
<MessageActions messageActionSet={MESSAGE_ACTION_SET} />
|
|
35
|
-
)
|