@cometchat/chat-uikit-react-native 5.3.9 → 5.4.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/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatClipboardModule.kt +52 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -0
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +95 -8
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorView.kt +237 -6
- package/android/src/main/java/com/reactnativecometchatuikit/RichTextEditorViewManager.kt +2 -1
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +85 -47
- package/ios/CometChatClipboardModule.m +11 -0
- package/ios/CometChatClipboardModule.swift +41 -0
- package/ios/FileManager.m +201 -39
- package/ios/RichTextEditorView.swift +312 -4
- package/ios/RichTextEditorViewManager.m +1 -0
- package/ios/SoundPlayer.m +18 -6
- package/package.json +9 -7
- package/react-native-cometchat-ui-kit.podspec +1 -0
- package/src/CometChatCompactMessageComposer/CometChatCompactMessageComposer.tsx +692 -107
- package/src/CometChatConversations/CometChatConversations.tsx +28 -6
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +649 -49
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +23 -4
- package/src/CometChatMessageList/CometChatMessageList.tsx +530 -58
- package/src/CometChatMessageList/MANUAL_TEST_CASES.md +154 -0
- package/src/CometChatMessageList/components/MessageListItem.tsx +30 -17
- package/src/CometChatMessageList/style.ts +33 -5
- package/src/CometChatRichTextEditor/RichTextEditorViewNativeComponent.ts +13 -0
- package/src/CometChatRichTextEditor/index.tsx +25 -0
- package/src/CometChatSearch/CometChatSearch.tsx +296 -154
- package/src/calls/CallingExtension.tsx +19 -13
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +20 -1
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +20 -9
- package/src/index.ts +39 -0
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +40 -34
- package/src/shared/base/Types.ts +3 -0
- package/src/shared/constants/UIKitConstants.ts +15 -1
- package/src/shared/framework/DataSource.ts +14 -4
- package/src/shared/framework/DataSourceDecorator.tsx +17 -8
- package/src/shared/framework/MessageDataSource.tsx +321 -62
- package/src/shared/helper/useToast.tsx +29 -0
- package/src/shared/icons/components/audio-file-type.tsx +11 -22
- package/src/shared/icons/components/document-file-type.tsx +11 -24
- package/src/shared/icons/components/image-file-type.tsx +12 -21
- package/src/shared/icons/components/link-file-type.tsx +25 -0
- package/src/shared/icons/components/pdf-file-type.tsx +11 -22
- package/src/shared/icons/components/presentation-file-type.tsx +11 -24
- package/src/shared/icons/components/spreadsheet-file-type.tsx +11 -24
- package/src/shared/icons/components/text-file-type.tsx +11 -21
- package/src/shared/icons/components/unknown-file-type.tsx +21 -25
- package/src/shared/icons/components/video-file-type.tsx +11 -24
- package/src/shared/icons/components/zip-file-type.tsx +11 -24
- package/src/shared/icons/icon-mapping.tsx +2 -0
- package/src/shared/index.ts +28 -0
- package/src/shared/modals/AttachmentPickerConfiguration.ts +13 -0
- package/src/shared/modals/SelectedAttachment.ts +65 -0
- package/src/shared/modals/UploadState.ts +10 -0
- package/src/shared/modals/index.ts +4 -0
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +43 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +43 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +44 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +44 -2
- package/src/shared/services/UploadQueueService.ts +145 -0
- package/src/shared/services/index.ts +2 -0
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +42 -18
- package/src/shared/utils/MessageUtils.tsx +13 -4
- package/src/shared/utils/attachmentLimits.ts +156 -0
- package/src/shared/utils/audioPlaybackCoordinator.ts +28 -0
- package/src/shared/utils/batchMediaContext.tsx +30 -0
- package/src/shared/utils/conversationUtils.ts +44 -4
- package/src/shared/utils/groupAttachments.ts +93 -0
- package/src/shared/utils/index.ts +8 -0
- package/src/shared/utils/openMultiFileChooser.ts +123 -0
- package/src/shared/utils/partitionAttachmentsByKind.ts +44 -0
- package/src/shared/views/ClipboardPasteHandler/ClipboardPasteHandler.ts +28 -0
- package/src/shared/views/ClipboardPasteHandler/NativeCometChatClipboardModule.ts +16 -0
- package/src/shared/views/ClipboardPasteHandler/index.ts +2 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +1 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.style.ts +32 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreview.tsx +90 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentPreviewItem.tsx +276 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTile.tsx +827 -0
- package/src/shared/views/CometChatAttachmentPreview/CometChatAttachmentTray.tsx +110 -0
- package/src/shared/views/CometChatAttachmentPreview/StagedVideoDurationProbe.tsx +53 -0
- package/src/shared/views/CometChatAttachmentPreview/index.ts +8 -0
- package/src/shared/views/CometChatAttachmentViewer/CometChatAttachmentViewer.tsx +305 -0
- package/src/shared/views/CometChatAttachmentViewer/index.ts +2 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +71 -74
- package/src/shared/views/CometChatAudiosBubble/CometChatAudiosBubble.tsx +587 -0
- package/src/shared/views/CometChatAudiosBubble/index.ts +2 -0
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +5 -7
- package/src/shared/views/CometChatCaptionText/CometChatCaptionText.tsx +182 -0
- package/src/shared/views/CometChatCaptionText/index.ts +2 -0
- package/src/shared/views/CometChatComposerErrorBanner.tsx +83 -0
- package/src/shared/views/CometChatConversationStarter/CometChatConversationStarter.tsx +141 -0
- package/src/shared/views/CometChatConversationStarter/index.ts +2 -0
- package/src/shared/views/CometChatConversationSummary/CometChatConversationSummary.tsx +155 -0
- package/src/shared/views/CometChatConversationSummary/index.ts +2 -0
- package/src/shared/views/CometChatFileBubble/style.ts +6 -4
- package/src/shared/views/CometChatFilesBubble/CometChatFilesBubble.tsx +316 -0
- package/src/shared/views/CometChatFilesBubble/index.ts +2 -0
- package/src/shared/views/CometChatImagesBubble/CometChatImagesBubble.tsx +323 -0
- package/src/shared/views/CometChatImagesBubble/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/CometChatMediaViewer.tsx +425 -0
- package/src/shared/views/CometChatMediaViewer/index.ts +2 -0
- package/src/shared/views/CometChatMediaViewer/mediaViewerUtils.ts +30 -0
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +14 -4
- package/src/shared/views/CometChatSendButtonView/CometChatSendButtonView.tsx +1 -0
- package/src/shared/views/CometChatSmartReplies/CometChatSmartReplies.tsx +172 -0
- package/src/shared/views/CometChatSmartReplies/index.ts +2 -0
- package/src/shared/views/CometChatVideoBubble/style.ts +3 -3
- package/src/shared/views/CometChatVideosBubble/CometChatVideosBubble.tsx +441 -0
- package/src/shared/views/CometChatVideosBubble/index.ts +2 -0
- package/src/shared/views/CometChatVoiceNoteBubble/CometChatVoiceNoteBubble.tsx +78 -0
- package/src/shared/views/CometChatVoiceNoteBubble/index.ts +2 -0
- package/src/shared/views/index.ts +37 -1
- package/src/theme/CometChatThemeHelper.ts +8 -0
- package/src/theme/default/color/dark.ts +9 -0
- package/src/theme/default/color/light.ts +10 -0
- package/src/theme/type.ts +73 -0
- package/src/CometChatMessageList/PERFORMANCE_ARCHITECTURE.md +0 -478
- package/src/CometChatMessageList/SEARCH_NAV_PERF_PLAN.md +0 -613
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fillRule='evenodd'
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<G filter='url(#prefix__b)'>
|
|
16
|
-
<Path
|
|
17
|
-
fill='#fff'
|
|
18
|
-
d='m13.978 22.666 2.008-7.36h.037l1.996 7.36h1.121l2.525-8.833h-1.133l-1.934 7.41h-.05l-1.995-7.41h-1.096l-2.008 7.41h-.05l-1.934-7.41h-1.133l2.525 8.833z'
|
|
19
|
-
/>
|
|
20
|
-
</G>
|
|
21
|
-
<Path fill='url(#prefix__c)' d='M26.174 8.708h-5.416l6.041 6.042V9.333z' />
|
|
22
|
-
<Path fill='#B5C8FC' d='M22.266 9.333h4.533l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#4876F9' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M8.97836 20L10.9864 12.6388H11.0234L13.019 20H14.14L16.6654 11.1666H15.532L13.598 18.5773H13.5487L11.553 11.1666H10.4567L8.4487 18.5773H8.39937L6.46536 11.1666H5.33203L7.85736 20H8.97836Z' />
|
|
8
|
+
<Path fill='url(#prefix__document-file-type_b)' d='M21.174 6.04163L15.7578 6.04163L21.7995 12.0833L21.7995 6.66663L21.174 6.04163Z' />
|
|
9
|
+
<Path fill='#B5C8FC' d='M17.2655 6.66663L21.7988 6.66663L15.1322 -4.06371e-05L15.1322 4.53329C15.1322 5.7115 16.0873 6.66663 17.2655 6.66663Z' />
|
|
23
10
|
<Defs>
|
|
24
11
|
<LinearGradient
|
|
25
|
-
id='
|
|
26
|
-
x1={
|
|
27
|
-
x2={
|
|
28
|
-
y1={
|
|
29
|
-
y2={
|
|
12
|
+
id='prefix__document-file-type_b'
|
|
13
|
+
x1={17.112}
|
|
14
|
+
x2={23.1536}
|
|
15
|
+
y1={4.68746}
|
|
16
|
+
y2={10.7291}
|
|
30
17
|
gradientUnits='userSpaceOnUse'
|
|
31
18
|
>
|
|
32
19
|
<Stop stopOpacity={0.2} />
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<G fill='#fff' filter='url(#prefix__b)'>
|
|
16
|
-
<Path d='m9.96 21.991 2.43-3.571a.376.376 0 0 1 .578-.057l1.605 1.573 3.524-5.522a.378.378 0 0 1 .646.014l4.378 7.587a.378.378 0 0 1-.328.567h-12.52a.378.378 0 0 1-.313-.59M10.688 13.905a1.905 1.905 0 1 0 3.81 0 1.905 1.905 0 0 0-3.81 0' />
|
|
17
|
-
</G>
|
|
18
|
-
<Path fill='url(#prefix__c)' d='M26.174 8.708h-5.416l6.041 6.042V9.333z' />
|
|
19
|
-
<Path fill='#FBDE99' d='M22.267 9.333h4.534l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#F6AD00' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M4.9605 19.3252L7.39033 15.7539C7.42144 15.7081 7.46223 15.6697 7.50981 15.6414C7.5574 15.6132 7.61061 15.5957 7.66569 15.5903C7.72077 15.5849 7.77637 15.5916 7.82855 15.6101C7.88073 15.6285 7.92822 15.6582 7.96766 15.697L9.57349 17.2704L13.0968 11.7479C13.1317 11.6931 13.1801 11.6482 13.2374 11.6176C13.2947 11.5869 13.359 11.5716 13.4239 11.5731C13.4889 11.5745 13.5523 11.5927 13.6082 11.6259C13.6641 11.659 13.7104 11.706 13.7428 11.7624L18.1205 19.349C18.1537 19.4065 18.1713 19.4717 18.1713 19.538C18.1713 19.6044 18.1539 19.6696 18.1207 19.7271C18.0875 19.7845 18.0397 19.8322 17.9822 19.8654C17.9247 19.8985 17.8595 19.9159 17.7932 19.9159H5.273C5.20421 19.916 5.13669 19.8974 5.07773 19.8619C5.01876 19.8265 4.97059 19.7757 4.93841 19.7149C4.90623 19.6541 4.89126 19.5857 4.89513 19.517C4.89899 19.4483 4.92153 19.382 4.96033 19.3252H4.9605Z' />
|
|
8
|
+
<Path fill='#fff' d='M5.68816 11.2387C5.68816 11.7439 5.88885 12.2284 6.24607 12.5856C6.6033 12.9428 7.0878 13.1435 7.59299 13.1435C8.09819 13.1435 8.58269 12.9428 8.93991 12.5856C9.29714 12.2284 9.49783 11.7439 9.49783 11.2387C9.49783 10.7335 9.29714 10.249 8.93991 9.89178C8.58269 9.53455 8.09819 9.33386 7.59299 9.33386C7.0878 9.33386 6.6033 9.53455 6.24607 9.89178C5.88885 10.249 5.68816 10.7335 5.68816 11.2387Z' />
|
|
9
|
+
<Path fill='url(#prefix__image-file-type_b)' d='M21.174 6.04163L15.7578 6.04163L21.7995 12.0833L21.7995 6.66663L21.174 6.04163Z' />
|
|
10
|
+
<Path fill='#FBDE99' d='M17.2674 6.66663L21.8008 6.66663L15.1341 -4.06371e-05L15.1341 4.53329C15.1341 5.7115 16.0892 6.66663 17.2674 6.66663Z' />
|
|
20
11
|
<Defs>
|
|
21
12
|
<LinearGradient
|
|
22
|
-
id='
|
|
23
|
-
x1={
|
|
24
|
-
x2={
|
|
25
|
-
y1={
|
|
26
|
-
y2={
|
|
13
|
+
id='prefix__image-file-type_b'
|
|
14
|
+
x1={17.112}
|
|
15
|
+
x2={23.1536}
|
|
16
|
+
y1={4.68746}
|
|
17
|
+
y2={10.7291}
|
|
27
18
|
gradientUnits='userSpaceOnUse'
|
|
28
19
|
>
|
|
29
20
|
<Stop stopOpacity={0.2} />
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
|
+
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
|
+
import type { SvgProps } from "react-native-svg";
|
|
4
|
+
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#4876F9' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M10.2415 13.0677C10.7098 13.0677 11.1512 13.1682 11.5685 13.3678C11.8813 13.5155 12.1638 13.7165 12.4182 13.9695C12.6662 14.2156 12.8697 14.5027 13.0198 14.8182C12.819 15.0192 12.5773 15.1183 12.2948 15.1183C12.1932 15.1177 12.0921 15.1027 11.9947 15.0738C11.8235 14.7965 11.59 14.5631 11.3127 14.392C10.9911 14.1941 10.6205 14.0901 10.2428 14.0918C9.97567 14.0918 9.71617 14.1427 9.4655 14.2445C9.21326 14.3473 8.98441 14.5 8.79267 14.6935L7.25333 16.2328C7.05979 16.4246 6.90701 16.6535 6.80417 16.9058C6.70346 17.1526 6.65161 17.4165 6.6515 17.683C6.6515 17.9502 6.7025 18.2097 6.80417 18.4603C6.90622 18.7131 7.0591 18.9421 7.25333 19.1333C7.44501 19.327 7.67395 19.4797 7.92633 19.5823C8.173 19.6828 8.43767 19.735 8.70483 19.735C8.972 19.735 9.2315 19.6842 9.48217 19.5823C9.7344 19.4795 9.96326 19.3268 10.155 19.1333L11.2327 18.0558C11.5748 18.1487 11.9285 18.1958 12.2948 18.1958C12.3533 18.1958 12.436 18.1932 12.5428 18.1882C12.5024 18.2328 12.4613 18.2769 12.4195 18.3203L10.8802 19.8597C10.5838 20.1562 10.248 20.38 9.87133 20.5327C9.12267 20.8383 8.28398 20.8378 7.53567 20.5313C7.15781 20.3773 6.81474 20.1489 6.52683 19.8597C6.2305 19.5633 6.00667 19.2275 5.854 18.8522C5.70261 18.4814 5.62484 18.0848 5.625 17.6843C5.625 17.2837 5.7025 16.8867 5.854 16.5165C6.00667 16.1412 6.2305 15.8053 6.52683 15.509L8.06617 13.9697C8.0955 13.9403 8.14 13.8997 8.1985 13.845C8.47919 13.5944 8.80405 13.3981 9.1565 13.2662C9.50351 13.1361 9.87092 13.069 10.2415 13.0678V13.0677ZM13.8328 9.47768C14.2337 9.47768 14.6305 9.55534 15.0007 9.70668C15.376 9.85801 15.7118 10.0833 16.0095 10.3797C16.306 10.676 16.5312 11.0118 16.6825 11.3872C16.8339 11.7578 16.9113 12.1546 16.9102 12.555C16.9102 12.9557 16.8327 13.345 16.68 13.7228C16.5262 14.1005 16.2977 14.4431 16.0083 14.7303L14.469 16.2697C14.4397 16.3002 14.3952 16.341 14.3367 16.3943C14.0564 16.6455 13.7314 16.8419 13.3787 16.9732C13.0315 17.1043 12.6634 17.1715 12.2923 17.1715C11.8331 17.1731 11.3794 17.0706 10.9655 16.8715C10.6525 16.7238 10.37 16.5228 10.1155 16.2698C9.86749 16.0238 9.66393 15.7367 9.51383 15.4212C9.71367 15.2202 9.9555 15.121 10.239 15.121C10.3383 15.121 10.4388 15.1362 10.5393 15.1655C10.7099 15.4427 10.9429 15.6762 11.2198 15.8473C11.5416 16.0452 11.9122 16.1491 12.2898 16.1475C12.5568 16.1475 12.8165 16.0967 13.067 15.9948C13.3195 15.8924 13.5484 15.7396 13.74 15.5458L15.2793 14.0065C15.4732 13.8151 15.626 13.5861 15.7283 13.3335C15.8288 13.0868 15.881 12.8235 15.881 12.5563C15.881 12.2892 15.8302 12.0297 15.7283 11.779C15.6259 11.5265 15.4731 11.2976 15.2793 11.106C15.0877 10.9124 14.8587 10.7596 14.6063 10.657C14.3595 10.5564 14.0955 10.5046 13.829 10.5043C13.5618 10.5043 13.3023 10.5552 13.0518 10.657C12.7994 10.7595 12.5704 10.9123 12.3788 11.106L11.3 12.1835C10.9537 12.0898 10.5965 12.0428 10.2378 12.0435C10.1792 12.0435 10.0965 12.0462 9.98967 12.0512C10.0303 12.0067 10.0712 11.9622 10.1143 11.919L11.6537 10.3797C11.9409 10.0903 12.2835 9.86181 12.6612 9.70801C13.0417 9.55401 13.4308 9.47634 13.8328 9.47768V9.47768Z' />
|
|
8
|
+
<Path fill='url(#prefix__link-file-type_b)' d='M21.176 6.04163L15.7598 6.04163L21.8014 12.0833L21.8014 6.66663L21.176 6.04163Z' />
|
|
9
|
+
<Path fill='#B5C8FC' d='M17.2674 6.66663L21.8008 6.66663L15.1341 -4.06371e-05L15.1341 4.53329C15.1341 5.7115 16.0892 6.66663 17.2674 6.66663Z' />
|
|
10
|
+
<Defs>
|
|
11
|
+
<LinearGradient
|
|
12
|
+
id='prefix__link-file-type_b'
|
|
13
|
+
x1={17.1139}
|
|
14
|
+
x2={23.1556}
|
|
15
|
+
y1={4.68746}
|
|
16
|
+
y2={10.7291}
|
|
17
|
+
gradientUnits='userSpaceOnUse'
|
|
18
|
+
>
|
|
19
|
+
<Stop stopOpacity={0.2} />
|
|
20
|
+
<Stop offset={1} stopOpacity={0} />
|
|
21
|
+
</LinearGradient>
|
|
22
|
+
</Defs>
|
|
23
|
+
</Svg>
|
|
24
|
+
);
|
|
25
|
+
export default SvgComponent;
|
|
@@ -1,30 +1,19 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fillRule='evenodd'
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<Path
|
|
16
|
-
fill='#fff'
|
|
17
|
-
d='M20.33 20.626a4.25 4.25 0 0 1-2.465-1.002c-1.366.3-2.666.735-3.966 1.27-1.033 1.837-2 2.773-2.833 2.773-.166 0-.366-.033-.5-.134a.99.99 0 0 1-.566-.902c0-.3.067-1.136 3.233-2.506a24 24 0 0 0 1.766-4.144c-.4-.802-1.267-2.773-.667-3.776.2-.367.6-.568 1.034-.534.333 0 .666.167.866.434.433.601.4 1.871-.167 3.743a10.1 10.1 0 0 0 2.066 2.673c.7-.134 1.4-.234 2.1-.234 1.566.033 1.8.768 1.766 1.203 0 1.136-1.1 1.136-1.666 1.136M11 22.698l.1-.034c.466-.167.833-.5 1.1-.935-.5.2-.9.534-1.2.969m4.432-10.025h-.1c-.033 0-.1 0-.133.033-.134.568-.034 1.17.2 1.705.2-.568.2-1.17.033-1.738m.233 4.845-.033.067-.033-.033c-.3.768-.634 1.537-1 2.272l.066-.033v.066a19 19 0 0 1 2.267-.668l-.034-.033h.1c-.5-.502-.966-1.07-1.333-1.638m4.533 1.771c-.3 0-.567 0-.867.067.333.167.667.234 1 .268.233.033.466 0 .666-.067 0-.1-.133-.268-.8-.268'
|
|
18
|
-
/>
|
|
19
|
-
<Path fill='url(#prefix__b)' d='M26.174 8.708h-5.416l6.041 6.042V9.333z' />
|
|
20
|
-
<Path fill='#FDB8B8' d='M22.266 9.333h4.533l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#FA4E4E' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M15.3308 17.9602C14.431 17.8934 13.5647 17.5592 12.8648 16.9577C11.4985 17.2584 10.1987 17.6927 8.899 18.2276C7.866 20.0654 6.8995 21.0011 6.06633 21.0011C5.89967 21.0011 5.69983 20.9677 5.5665 20.8674C5.19983 20.7004 5 20.3327 5 19.9652C5 19.6644 5.06667 18.8291 8.2325 17.4589C8.96583 16.1222 9.53217 14.7522 9.99883 13.3154C9.59883 12.5134 8.7325 10.5417 9.33217 9.53939C9.53217 9.17172 9.93217 8.97122 10.3655 9.00472C10.6987 9.00472 11.0318 9.17172 11.2318 9.43905C11.6652 10.0406 11.6318 11.3104 11.0652 13.1817C11.5985 14.1828 12.297 15.0866 13.1313 15.8551C13.8313 15.7212 14.531 15.6211 15.2308 15.6211C16.7972 15.6544 17.0305 16.3896 16.9972 16.8241C16.9972 17.9602 15.8973 17.9602 15.3308 17.9602V17.9602ZM5.99983 20.0319L6.09983 19.9986C6.56633 19.8316 6.93283 19.4974 7.1995 19.0629C6.6995 19.2634 6.29967 19.5976 5.99983 20.0321V20.0319ZM10.432 10.0072H10.332C10.2987 10.0072 10.232 10.0072 10.1987 10.0406C10.0653 10.6086 10.1653 11.2101 10.3987 11.7447C10.5987 11.1767 10.5987 10.5752 10.432 10.0072V10.0072ZM10.6653 14.8526L10.632 14.9192L10.5987 14.8859C10.2987 15.6546 9.96533 16.4231 9.59883 17.1582L9.6655 17.1249V17.1916C10.4066 16.9229 11.1634 16.6997 11.9317 16.5232L11.8983 16.4899H11.9983C11.4983 15.9886 11.0318 15.4206 10.6653 14.8526V14.8526ZM15.1975 16.6236C14.8975 16.6236 14.631 16.6236 14.331 16.6902C14.6643 16.8574 14.9977 16.9242 15.3308 16.9577C15.5642 16.9911 15.7975 16.9577 15.9973 16.8909C15.9973 16.7906 15.864 16.6236 15.1975 16.6236Z' />
|
|
8
|
+
<Path fill='url(#prefix__pdf-file-type_b)' d='M21.174 6.04163L15.7578 6.04163L21.7995 12.0833L21.7995 6.66663L21.174 6.04163Z' />
|
|
9
|
+
<Path fill='#FDB8B8' d='M17.2655 6.66663L21.7988 6.66663L15.1322 -4.06371e-05L15.1322 4.53329C15.1322 5.7115 16.0873 6.66663 17.2655 6.66663Z' />
|
|
21
10
|
<Defs>
|
|
22
11
|
<LinearGradient
|
|
23
|
-
id='
|
|
24
|
-
x1={
|
|
25
|
-
x2={
|
|
26
|
-
y1={
|
|
27
|
-
y2={
|
|
12
|
+
id='prefix__pdf-file-type_b'
|
|
13
|
+
x1={17.112}
|
|
14
|
+
x2={23.1536}
|
|
15
|
+
y1={4.68746}
|
|
16
|
+
y2={10.7291}
|
|
28
17
|
gradientUnits='userSpaceOnUse'
|
|
29
18
|
>
|
|
30
19
|
<Stop stopOpacity={0.2} />
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fillRule='evenodd'
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<G filter='url(#prefix__b)'>
|
|
16
|
-
<Path
|
|
17
|
-
fill='#fff'
|
|
18
|
-
d='M14.192 22.667v-4.09h2.913c2.287 0 3.444-.994 3.444-2.969q0-2.94-3.43-2.941h-4.07v10zm2.858-5.084h-2.858v-3.922h2.858c.794 0 1.38.155 1.77.49.39.295.586.785.586 1.457s-.195 1.163-.572 1.485c-.39.322-.976.49-1.784.49'
|
|
19
|
-
/>
|
|
20
|
-
</G>
|
|
21
|
-
<Path fill='url(#prefix__c)' d='M26.174 8.708h-5.416l6.041 6.042V9.333z' />
|
|
22
|
-
<Path fill='#FFD3AD' d='M22.266 9.333h4.533l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#FF9333' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M9.192 20.0011V15.9114H12.1055C14.3918 15.9114 15.5488 14.9171 15.5488 12.9423C15.5488 10.9814 14.4057 10.0011 12.1195 10.0011H8.04883V20.0011H9.192ZM12.0498 14.9171H9.192V10.9954H12.0498C12.8443 10.9954 13.4298 11.1496 13.8202 11.4858C14.2105 11.7798 14.4057 12.2699 14.4057 12.9424C14.4057 13.6146 14.2107 14.1048 13.834 14.4269C13.4438 14.7489 12.8583 14.9169 12.0498 14.9169V14.9171Z' />
|
|
8
|
+
<Path fill='url(#prefix__presentation-file-type_b)' d='M21.174 6.04163L15.7578 6.04163L21.7995 12.0833L21.7995 6.66663L21.174 6.04163Z' />
|
|
9
|
+
<Path fill='#FFD3AD' d='M17.2655 6.66663L21.7988 6.66663L15.1322 -4.06371e-05L15.1322 4.53329C15.1322 5.7115 16.0873 6.66663 17.2655 6.66663Z' />
|
|
23
10
|
<Defs>
|
|
24
11
|
<LinearGradient
|
|
25
|
-
id='
|
|
26
|
-
x1={
|
|
27
|
-
x2={
|
|
28
|
-
y1={
|
|
29
|
-
y2={
|
|
12
|
+
id='prefix__presentation-file-type_b'
|
|
13
|
+
x1={17.112}
|
|
14
|
+
x2={23.1536}
|
|
15
|
+
y1={4.68746}
|
|
16
|
+
y2={10.7291}
|
|
30
17
|
gradientUnits='userSpaceOnUse'
|
|
31
18
|
>
|
|
32
19
|
<Stop stopOpacity={0.2} />
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fillRule='evenodd'
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<G filter='url(#prefix__b)'>
|
|
16
|
-
<Path
|
|
17
|
-
fill='#fff'
|
|
18
|
-
d='m13.007 22.667 2.986-4.286 3.001 4.286h1.423l-3.734-5.196 3.465-4.804h-1.422l-2.733 3.894-2.719-3.894h-1.422l3.437 4.804-3.705 5.196z'
|
|
19
|
-
/>
|
|
20
|
-
</G>
|
|
21
|
-
<Path fill='url(#prefix__c)' d='M26.174 8.708h-5.416l6.041 6.042V9.333z' />
|
|
22
|
-
<Path fill='#EBFFEC' d='M22.267 9.333h4.534l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#32BD7A' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M8.00732 20.0011L10.9932 15.7154L13.9945 20.0011H15.4173L11.6835 14.8051L15.1485 10.0011H13.7257L10.9932 13.8946L8.27398 10.0011H6.85165L10.2888 14.8051L6.58398 20.0011H8.00732Z' />
|
|
8
|
+
<Path fill='url(#prefix__spreadsheet-file-type_b)' d='M21.174 6.04163L15.7578 6.04163L21.7995 12.0833L21.7995 6.66663L21.174 6.04163Z' />
|
|
9
|
+
<Path fill='#EBFFEC' d='M17.2674 6.66663L21.8008 6.66663L15.1341 -4.06371e-05L15.1341 4.53329C15.1341 5.7115 16.0892 6.66663 17.2674 6.66663Z' />
|
|
23
10
|
<Defs>
|
|
24
11
|
<LinearGradient
|
|
25
|
-
id='
|
|
26
|
-
x1={
|
|
27
|
-
x2={
|
|
28
|
-
y1={
|
|
29
|
-
y2={
|
|
12
|
+
id='prefix__spreadsheet-file-type_b'
|
|
13
|
+
x1={17.112}
|
|
14
|
+
x2={23.1536}
|
|
15
|
+
y1={4.68746}
|
|
16
|
+
y2={10.7291}
|
|
30
17
|
gradientUnits='userSpaceOnUse'
|
|
31
18
|
>
|
|
32
19
|
<Stop stopOpacity={0.2} />
|
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fillRule='evenodd'
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<G filter='url(#prefix__b)'>
|
|
16
|
-
<Path fill='#fff' d='M16.567 22.667v-9.006h3.518v-.994h-8.167v.994h3.518v9.006z' />
|
|
17
|
-
</G>
|
|
18
|
-
<Path fill='url(#prefix__c)' d='M26.176 8.708H20.76L26.8 14.75V9.333z' />
|
|
19
|
-
<Path fill='#CDCFDE' d='M22.267 9.333h4.534l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#8289AD' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M11.5666 20.0011V10.9954H15.0846V10.0011H6.91797V10.9954H10.436V20.0011H11.5666Z' />
|
|
8
|
+
<Path fill='url(#prefix__text-file-type_b)' d='M21.176 6.04163L15.7598 6.04163L21.8014 12.0833L21.8014 6.66663L21.176 6.04163Z' />
|
|
9
|
+
<Path fill='#CDCFDE' d='M17.2674 6.66663L21.8008 6.66663L15.1341 -4.06371e-05L15.1341 4.53329C15.1341 5.7115 16.0892 6.66663 17.2674 6.66663Z' />
|
|
20
10
|
<Defs>
|
|
21
11
|
<LinearGradient
|
|
22
|
-
id='
|
|
23
|
-
x1={
|
|
24
|
-
x2={
|
|
25
|
-
y1={
|
|
26
|
-
y2={
|
|
12
|
+
id='prefix__text-file-type_b'
|
|
13
|
+
x1={15.7598}
|
|
14
|
+
x2={23.1556}
|
|
15
|
+
y1={5.94193}
|
|
16
|
+
y2={10.7291}
|
|
27
17
|
gradientUnits='userSpaceOnUse'
|
|
28
18
|
>
|
|
29
19
|
<Stop stopOpacity={0.2} />
|
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/>
|
|
20
|
-
</G>
|
|
21
|
-
<Path fill='url(#prefix__c)' d='M26.174 8.708h-5.416l6.041 6.042V9.333z' />
|
|
22
|
-
<Path fill='#EAEAEA' d='M22.266 9.333h4.533l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
4
|
+
|
|
5
|
+
// Fallback file-type icon (unmapped extensions) — a "no preview available" page with an eye-slash
|
|
6
|
+
// glyph. Multi-colour by design (grey page + white glyph + fold gradient), so it ignores `color`.
|
|
7
|
+
const SvgComponent = ({ height, width }: SvgProps) => (
|
|
8
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
9
|
+
<Path
|
|
10
|
+
fill='#CCCCCC'
|
|
11
|
+
d='M15.1328 0.000732422L21.7988 6.66675V24.5339C21.7988 25.7121 20.8442 26.6677 19.666 26.6677H2.33301C1.1548 26.6677 0.199219 25.7121 0.199219 24.5339V2.13452C0.199219 0.956314 1.1548 0.000732422 2.33301 0.000732422H15.1328Z'
|
|
12
|
+
/>
|
|
13
|
+
<Path
|
|
14
|
+
fill='#fff'
|
|
15
|
+
d='M11.0006 21.334C10.1697 21.334 9.38975 21.1764 8.6609 20.8613C7.93204 20.546 7.2969 20.118 6.75547 19.5773C6.21394 19.0366 5.78596 18.402 5.47151 17.6737C5.15717 16.9453 5 16.1656 5 15.3346C5 14.5036 5.15758 13.7237 5.47273 12.9949C5.78799 12.266 6.21598 11.6309 6.75669 11.0895C7.29741 10.5479 7.93194 10.1199 8.66029 9.8055C9.38873 9.49116 10.1684 9.33398 10.9994 9.33398C11.8303 9.33398 12.6103 9.49156 13.3391 9.80672C14.068 10.122 14.7031 10.55 15.2445 11.0907C15.7861 11.6314 16.214 12.2659 16.5285 12.9943C16.8428 13.7227 17 14.5024 17 15.3334C17 16.1643 16.8424 16.9442 16.5273 17.6731C16.212 18.4019 15.784 19.0371 15.2433 19.5785C14.7026 20.12 14.0681 20.548 13.3397 20.8625C12.6113 21.1768 11.8316 21.334 11.0006 21.334ZM11 20.3679C11.5977 20.3679 12.1706 20.2688 12.7189 20.0705C13.2672 19.8722 13.7655 19.5849 14.2136 19.2086L7.12753 12.1203C6.75664 12.5746 6.47032 13.0749 6.26855 13.6212C6.06689 14.1675 5.96606 14.7385 5.96606 15.334C5.96606 16.7382 6.454 17.9282 7.42987 18.9041C8.40574 19.88 9.59578 20.3679 11 20.3679ZM14.8624 18.5476C15.2265 18.1002 15.5127 17.6022 15.7212 17.0536C15.9297 16.5051 16.0339 15.9319 16.0339 15.334C16.0339 13.9298 15.546 12.7397 14.5701 11.7639C13.5943 10.788 12.4042 10.3 11 10.3C10.4048 10.3 9.83411 10.4009 9.288 10.6025C8.7419 10.8043 8.24135 11.0933 7.78636 11.4696L14.8624 18.5476Z'
|
|
16
|
+
/>
|
|
17
|
+
<Path fill='url(#prefix__unknown-file-type_b)' d='M21.174 6.04175L15.7578 6.04175L21.7995 12.0834L21.7995 6.66675L21.174 6.04175Z' />
|
|
18
|
+
<Path fill='#EAEAEA' d='M17.2655 6.66675L21.7988 6.66675L15.1322 8.14332e-05L15.1322 4.53341C15.1322 5.71162 16.0873 6.66675 17.2655 6.66675Z' />
|
|
23
19
|
<Defs>
|
|
24
20
|
<LinearGradient
|
|
25
|
-
id='
|
|
26
|
-
x1={
|
|
27
|
-
x2={
|
|
28
|
-
y1={
|
|
29
|
-
y2={
|
|
21
|
+
id='prefix__unknown-file-type_b'
|
|
22
|
+
x1={17.112}
|
|
23
|
+
x2={23.1536}
|
|
24
|
+
y1={4.68758}
|
|
25
|
+
y2={10.7292}
|
|
30
26
|
gradientUnits='userSpaceOnUse'
|
|
31
27
|
>
|
|
32
28
|
<Stop stopOpacity={0.2} />
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fillRule='evenodd'
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<G filter='url(#prefix__b)'>
|
|
16
|
-
<Path
|
|
17
|
-
fill='#fff'
|
|
18
|
-
d='m21.09 17.753-7.775 4.635a.78.78 0 0 1-1.18-.674v-9.27c0-.595.66-.97 1.18-.673l7.775 4.635c.504.313.504 1.05 0 1.347'
|
|
19
|
-
/>
|
|
20
|
-
</G>
|
|
21
|
-
<Path fill='url(#prefix__c)' d='M26.176 8.708H20.76L26.8 14.75V9.333z' />
|
|
22
|
-
<Path fill='#CAD1F8' d='M22.267 9.333h4.534l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#7C8EEE' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M16.0904 15.0868L8.31527 19.7218C7.79577 20.0348 7.13477 19.659 7.13477 19.0485V9.77849C7.13477 9.18349 7.79577 8.80782 8.31527 9.10516L16.0903 13.7402C16.5939 14.0535 16.5939 14.7893 16.0903 15.0868H16.0904Z' />
|
|
8
|
+
<Path fill='url(#prefix__video-file-type_b)' d='M21.176 6.04163L15.7598 6.04163L21.8014 12.0833L21.8014 6.66663L21.176 6.04163Z' />
|
|
9
|
+
<Path fill='#CAD1F8' d='M17.2674 6.66663L21.8008 6.66663L15.1341 -4.06371e-05L15.1341 4.53329C15.1341 5.7115 16.0892 6.66663 17.2674 6.66663Z' />
|
|
23
10
|
<Defs>
|
|
24
11
|
<LinearGradient
|
|
25
|
-
id='
|
|
26
|
-
x1={
|
|
27
|
-
x2={
|
|
28
|
-
y1={
|
|
29
|
-
y2={
|
|
12
|
+
id='prefix__video-file-type_b'
|
|
13
|
+
x1={17.1139}
|
|
14
|
+
x2={23.1556}
|
|
15
|
+
y1={4.68746}
|
|
16
|
+
y2={10.7291}
|
|
30
17
|
gradientUnits='userSpaceOnUse'
|
|
31
18
|
>
|
|
32
19
|
<Stop stopOpacity={0.2} />
|
|
@@ -1,32 +1,19 @@
|
|
|
1
|
-
import Svg, { Path,
|
|
1
|
+
import Svg, { Path, Defs, LinearGradient, Stop } from "react-native-svg";
|
|
2
2
|
/* SVGR has dropped some elements not supported by react-native-svg: filter */
|
|
3
3
|
import type { SvgProps } from "react-native-svg";
|
|
4
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
5
|
-
<Svg width={width} height={height} fill='none' viewBox='0 0
|
|
6
|
-
<Path fill='#
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fillRule='evenodd'
|
|
11
|
-
d='M7.333 2.667A2.133 2.133 0 0 0 5.199 4.8v22.4c0 1.178.955 2.134 2.134 2.134h17.333a2.133 2.133 0 0 0 2.133-2.134V9.333l-6.666-6.666z'
|
|
12
|
-
clipRule='evenodd'
|
|
13
|
-
/>
|
|
14
|
-
</G>
|
|
15
|
-
<G filter='url(#prefix__b)'>
|
|
16
|
-
<Path
|
|
17
|
-
fill='#fff'
|
|
18
|
-
d='M17.833 19.32v3.62a.906.906 0 0 1-.907.906h-1.853a.91.91 0 0 1-.907-.905V19.32zm-.907 2.074h-1.853v1.819h1.852zm.876-5.696v1.819H15.98v-1.819zM16.003 2.933v1.833h1.83v1.833h-1.83v1.698h1.83v1.833h-1.83v1.811h1.83v1.81h-1.83v1.812h-1.837v-1.811h1.83V11.94h-1.83v-1.81h1.83V8.296h-1.83V6.463h1.83V4.766h-1.83V2.933z'
|
|
19
|
-
/>
|
|
20
|
-
</G>
|
|
21
|
-
<Path fill='url(#prefix__c)' d='M26.174 8.708h-5.416l6.041 6.042V9.333z' />
|
|
22
|
-
<Path fill='#BBC3D4' d='M22.267 9.333h4.534l-6.667-6.667V7.2c0 1.178.955 2.133 2.133 2.133' />
|
|
5
|
+
<Svg width={width} height={height} fill='none' viewBox='0 0 22 27'>
|
|
6
|
+
<Path fill='#576A95' d='M15.1328 0.000610352L21.7988 6.66663V24.5338C21.7988 25.712 20.8442 26.6675 19.666 26.6676H2.33301C1.1548 26.6676 0.199219 25.712 0.199219 24.5338V2.1344C0.199219 0.956192 1.1548 0.000610352 2.33301 0.000610352H15.1328Z' />
|
|
7
|
+
<Path fill='#fff' d='M12.8327 16.6536V20.2749C12.8326 20.3938 12.8091 20.5116 12.7635 20.6215C12.7179 20.7313 12.6511 20.8311 12.5668 20.9151C12.3966 21.0849 12.166 21.1803 11.9255 21.1802H10.0732C9.83275 21.1803 9.60212 21.085 9.43185 20.9152C9.34758 20.8312 9.28073 20.7314 9.23511 20.6215C9.18949 20.5116 9.16601 20.3937 9.16602 20.2747V16.6536H12.8327V16.6536ZM11.9255 18.7282H10.0732V20.5466H11.9255V18.7282ZM12.8023 13.0322V14.8506H10.9805V13.0322H12.8023V13.0322ZM11.0032 0.266724V2.10006H12.8327V3.93339H11.003V5.63089H12.8327V7.46422H11.0032V9.27506H12.8327V11.0859H11.0032V12.8966H9.16602V11.0857H10.9955V9.27489H9.16602V7.46422H10.9955V5.63089H9.16602V3.79756H10.9955V2.10006H9.16602V0.266724H11.0032Z' />
|
|
8
|
+
<Path fill='url(#prefix__zip-file-type_b)' d='M21.174 6.04163L15.7578 6.04163L21.7995 12.0833L21.7995 6.66663L21.174 6.04163Z' />
|
|
9
|
+
<Path fill='#BBC3D4' d='M17.2674 6.66663L21.8008 6.66663L15.1341 -4.06371e-05L15.1341 4.53329C15.1341 5.7115 16.0892 6.66663 17.2674 6.66663Z' />
|
|
23
10
|
<Defs>
|
|
24
11
|
<LinearGradient
|
|
25
|
-
id='
|
|
26
|
-
x1={
|
|
27
|
-
x2={
|
|
28
|
-
y1={
|
|
29
|
-
y2={
|
|
12
|
+
id='prefix__zip-file-type_b'
|
|
13
|
+
x1={17.112}
|
|
14
|
+
x2={23.1536}
|
|
15
|
+
y1={4.68746}
|
|
16
|
+
y2={10.7291}
|
|
30
17
|
gradientUnits='userSpaceOnUse'
|
|
31
18
|
>
|
|
32
19
|
<Stop stopOpacity={0.2} />
|
|
@@ -307,6 +307,7 @@ import ZoomOutMapFill from "./components/zoom-out-map-fill";
|
|
|
307
307
|
import AudioFileType from "./components/audio-file-type";
|
|
308
308
|
import DocumentFileType from "./components/document-file-type";
|
|
309
309
|
import ImageFileType from "./components/image-file-type";
|
|
310
|
+
import LinkFileType from "./components/link-file-type";
|
|
310
311
|
import ListItemCheck from "./components/ListItemCheck";
|
|
311
312
|
import PdfFileType from "./components/pdf-file-type";
|
|
312
313
|
import PresentationFileType from "./components/presentation-file-type";
|
|
@@ -637,6 +638,7 @@ export const ICONS = {
|
|
|
637
638
|
/******File Bubble Type Preview Icons*****/
|
|
638
639
|
"audio-file-type": AudioFileType,
|
|
639
640
|
"image-file-type": ImageFileType,
|
|
641
|
+
"link-file-type": LinkFileType,
|
|
640
642
|
"pdf-file-type": PdfFileType,
|
|
641
643
|
"presentation-file-type": PresentationFileType,
|
|
642
644
|
"spreadsheet-file-type": SpreadsheetFileType,
|
package/src/shared/index.ts
CHANGED
|
@@ -104,6 +104,34 @@ export type{
|
|
|
104
104
|
WaveformStyle,
|
|
105
105
|
} from "./views";
|
|
106
106
|
|
|
107
|
+
// Multiple Attachment Support — forward the new multi-attachment views/types to the
|
|
108
|
+
// public entry so external consumers can import them (PR review B1).
|
|
109
|
+
export {
|
|
110
|
+
CometChatAttachmentTray,
|
|
111
|
+
CometChatAttachmentTile,
|
|
112
|
+
CometChatAttachmentPreview,
|
|
113
|
+
CometChatAttachmentPreviewItem,
|
|
114
|
+
getAttachmentPreviewStyle,
|
|
115
|
+
CometChatImagesBubble,
|
|
116
|
+
CometChatVideosBubble,
|
|
117
|
+
CometChatFilesBubble,
|
|
118
|
+
CometChatAudiosBubble,
|
|
119
|
+
CometChatVoiceNoteBubble,
|
|
120
|
+
CometChatMediaViewer,
|
|
121
|
+
CometChatAttachmentViewer,
|
|
122
|
+
} from "./views";
|
|
123
|
+
export type {
|
|
124
|
+
CometChatAttachmentTrayProps,
|
|
125
|
+
CometChatAttachmentTileProps,
|
|
126
|
+
CometChatAttachmentPreviewProps,
|
|
127
|
+
CometChatAttachmentPreviewItemProps,
|
|
128
|
+
CometChatFilesBubbleProps,
|
|
129
|
+
CometChatAudiosBubbleProps,
|
|
130
|
+
CometChatVoiceNoteBubbleProps,
|
|
131
|
+
CometChatMediaViewerProps,
|
|
132
|
+
CometChatAttachmentViewerProps,
|
|
133
|
+
} from "./views";
|
|
134
|
+
|
|
107
135
|
export {
|
|
108
136
|
CometChatMentionsFormatter,
|
|
109
137
|
CometChatTextFormatter,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fallback max attachment count when the server `file.count.max` setting is
|
|
3
|
+
* unavailable (decision 5.1). Once the SDK exposes the setting, the effective
|
|
4
|
+
* limit is `min(developerValue, serverValue)` (tighten-only).
|
|
5
|
+
*/
|
|
6
|
+
export const DEFAULT_MAX_ATTACHMENT_COUNT = 10;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* PER-FILE size cap (bytes) used by the UIKit's "X MB" rejection toast (design doc §6.1 —
|
|
10
|
+
* size is validated per file, never as a batch total). The SDK exposes no public size getter
|
|
11
|
+
* and enforces `file.size.max` internally, so this DEFAULT is the value the UIKit shows.
|
|
12
|
+
*/
|
|
13
|
+
export const DEFAULT_MAX_FILE_SIZE = 100 * 1024 * 1024; // 100 MB (per file)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { CometChat } from '@cometchat/chat-sdk-react-native';
|
|
2
|
+
import { UploadState } from './UploadState';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents a single file in the pre-send attachment strip.
|
|
6
|
+
* Lives only in the composer — discarded after the message is sent or cancelled.
|
|
7
|
+
*/
|
|
8
|
+
export interface SelectedAttachment {
|
|
9
|
+
/** Caller-assigned UUID. Matches FileUploadInput.fileId sent to CometChat.uploadFiles(). */
|
|
10
|
+
fileId: string;
|
|
11
|
+
|
|
12
|
+
/** Local file reference from the picker. */
|
|
13
|
+
file: {
|
|
14
|
+
uri: string; // file:// (iOS) or content:// (Android)
|
|
15
|
+
name: string; // original filename with extension
|
|
16
|
+
type: string; // MIME type e.g. "image/jpeg"
|
|
17
|
+
size: number; // bytes
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Current upload lifecycle state — drives strip item UI and send gate. */
|
|
21
|
+
uploadState: UploadState;
|
|
22
|
+
|
|
23
|
+
/** Upload progress 0–100. Only meaningful when uploadState === 'UPLOADING'. */
|
|
24
|
+
uploadProgress: number;
|
|
25
|
+
|
|
26
|
+
/** Populated when uploadState === 'COMPLETED'. Contains the CDN URL for the sent message. */
|
|
27
|
+
uploadedAttachment?: CometChat.Attachment;
|
|
28
|
+
|
|
29
|
+
/** Localization key shown in the strip item error label (e.g. 'UPLOAD_FAILED', 'FILE_TOO_LARGE'). */
|
|
30
|
+
errorKey?: string;
|
|
31
|
+
|
|
32
|
+
/** SDK upload error CODE for a rejected file (e.g. 'ERR_FILE_SIZE_EXCEEDED'). Not shown inline —
|
|
33
|
+
* resolved to a reason toast when the user taps the errored tile. */
|
|
34
|
+
errorCode?: string;
|
|
35
|
+
|
|
36
|
+
/** Full SDK error object for a failed/rejected file (debug — logged when the tile is tapped). */
|
|
37
|
+
rawError?: any;
|
|
38
|
+
|
|
39
|
+
/** Video duration in whole seconds, read once at staging (react-native-video `onLoad`). Written
|
|
40
|
+
* into the attachment metadata on send so the receiver's bubble shows the duration chip.
|
|
41
|
+
* `undefined` = not yet probed; `0` = probed but no valid duration (chip omitted). */
|
|
42
|
+
durationSeconds?: number;
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Single source of truth for the `{ uri, name, type, size }` object handed to the upload queue.
|
|
48
|
+
* Gallery, document picker, and clipboard/paste all route through this so the object shape AND
|
|
49
|
+
* value types are IDENTICAL regardless of source (pickers expose `type`, paste exposes `mimeType`;
|
|
50
|
+
* both normalize to `type`; `size` is always coerced to a real number). Prevents per-source drift.
|
|
51
|
+
*/
|
|
52
|
+
export function toAttachmentFile(src: {
|
|
53
|
+
uri: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
type?: string;
|
|
56
|
+
mimeType?: string;
|
|
57
|
+
size?: number;
|
|
58
|
+
}): SelectedAttachment['file'] {
|
|
59
|
+
return {
|
|
60
|
+
uri: src.uri,
|
|
61
|
+
name: src.name ?? 'file',
|
|
62
|
+
type: src.type ?? src.mimeType ?? 'application/octet-stream',
|
|
63
|
+
size: Number(src.size) || 0,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks the lifecycle of a single file in the pre-send attachment strip.
|
|
3
|
+
*
|
|
4
|
+
* NONE — Selected from picker; queued but no XHR started yet.
|
|
5
|
+
* UPLOADING — Active XHR to S3 in progress; uploadProgress is meaningful.
|
|
6
|
+
* COMPLETED — S3 returned 204; uploadedAttachment is populated.
|
|
7
|
+
* FAILED — Transient failure (network/S3); errorKey is set; user can RETRY.
|
|
8
|
+
* REJECTED — Permanent rejection (size limit, RBAC, billing); user must REMOVE.
|
|
9
|
+
*/
|
|
10
|
+
export type UploadState = 'NONE' | 'UPLOADING' | 'COMPLETED' | 'FAILED' | 'REJECTED';
|