@messenger-box/platform-mobile 10.0.3-alpha.5 → 10.0.3-alpha.50
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/CHANGELOG.md +92 -0
- package/lib/compute.js +2 -3
- package/lib/compute.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/queries/inboxQueries.js +65 -0
- package/lib/queries/inboxQueries.js.map +1 -0
- package/lib/routes.json +2 -3
- package/lib/screens/inbox/DialogMessages.js +1 -1
- package/lib/screens/inbox/DialogMessages.js.map +1 -1
- package/lib/screens/inbox/DialogThreadMessages.js +4 -8
- package/lib/screens/inbox/DialogThreadMessages.js.map +1 -1
- package/lib/screens/inbox/DialogThreads.js +57 -12
- package/lib/screens/inbox/DialogThreads.js.map +1 -1
- package/lib/screens/inbox/Inbox.js +1 -1
- package/lib/screens/inbox/Inbox.js.map +1 -1
- package/lib/screens/inbox/components/CachedImage/consts.js +1 -1
- package/lib/screens/inbox/components/CachedImage/consts.js.map +1 -1
- package/lib/screens/inbox/components/CachedImage/index.js +168 -46
- package/lib/screens/inbox/components/CachedImage/index.js.map +1 -1
- package/lib/screens/inbox/components/DialogItem.js +169 -0
- package/lib/screens/inbox/components/DialogItem.js.map +1 -0
- package/lib/screens/inbox/components/GiftedChatInboxComponent.js +313 -0
- package/lib/screens/inbox/components/GiftedChatInboxComponent.js.map +1 -0
- package/lib/screens/inbox/components/SlackMessageContainer/SlackBubble.js +147 -31
- package/lib/screens/inbox/components/SlackMessageContainer/SlackBubble.js.map +1 -1
- package/lib/screens/inbox/components/SlackMessageContainer/SlackMessage.js +6 -1
- package/lib/screens/inbox/components/SlackMessageContainer/SlackMessage.js.map +1 -1
- package/lib/screens/inbox/components/SubscriptionHandler.js +24 -0
- package/lib/screens/inbox/components/SubscriptionHandler.js.map +1 -0
- package/lib/screens/inbox/components/ThreadsViewItem.js +66 -55
- package/lib/screens/inbox/components/ThreadsViewItem.js.map +1 -1
- package/lib/screens/inbox/config/config.js +2 -2
- package/lib/screens/inbox/config/config.js.map +1 -1
- package/lib/screens/inbox/containers/ConversationView.js +1111 -434
- package/lib/screens/inbox/containers/ConversationView.js.map +1 -1
- package/lib/screens/inbox/containers/Dialogs.js +193 -80
- package/lib/screens/inbox/containers/Dialogs.js.map +1 -1
- package/lib/screens/inbox/containers/ThreadConversationView.js +725 -216
- package/lib/screens/inbox/containers/ThreadConversationView.js.map +1 -1
- package/lib/screens/inbox/containers/ThreadsView.js +83 -50
- package/lib/screens/inbox/containers/ThreadsView.js.map +1 -1
- package/lib/screens/inbox/hooks/useInboxMessages.js +31 -0
- package/lib/screens/inbox/hooks/useInboxMessages.js.map +1 -0
- package/lib/screens/inbox/hooks/useSafeDialogThreadsMachine.js +108 -0
- package/lib/screens/inbox/hooks/useSafeDialogThreadsMachine.js.map +1 -0
- package/lib/screens/inbox/workflow/dialog-threads-xstate.js +151 -0
- package/lib/screens/inbox/workflow/dialog-threads-xstate.js.map +1 -0
- package/package.json +4 -4
- package/src/compute.ts +5 -6
- package/src/index.ts +2 -0
- package/src/navigation/InboxNavigation.tsx +3 -3
- package/src/queries/inboxQueries.ts +299 -0
- package/src/queries/index.d.ts +2 -0
- package/src/queries/index.ts +1 -0
- package/src/screens/inbox/DialogMessages.tsx +1 -1
- package/src/screens/inbox/DialogThreadMessages.tsx +7 -14
- package/src/screens/inbox/DialogThreads.tsx +55 -61
- package/src/screens/inbox/Inbox.tsx +1 -1
- package/src/screens/inbox/components/Actionsheet.tsx +30 -0
- package/src/screens/inbox/components/CachedImage/consts.ts +4 -3
- package/src/screens/inbox/components/CachedImage/index.tsx +232 -61
- package/src/screens/inbox/components/DialogItem.tsx +306 -0
- package/src/screens/inbox/components/DialogsHeader.tsx +6 -13
- package/src/screens/inbox/components/DialogsListItem.tsx +262 -198
- package/src/screens/inbox/components/ExpandableInput.tsx +460 -0
- package/src/screens/inbox/components/ExpandableInputActionSheet.tsx +518 -0
- package/src/screens/inbox/components/GiftedChatInboxComponent.tsx +411 -0
- package/src/screens/inbox/components/ServiceDialogsListItem.tsx +337 -194
- package/src/screens/inbox/components/SlackInput.tsx +23 -0
- package/src/screens/inbox/components/SlackMessageContainer/SlackBubble.tsx +233 -23
- package/src/screens/inbox/components/SlackMessageContainer/SlackMessage.tsx +1 -1
- package/src/screens/inbox/components/SmartLoader.tsx +61 -0
- package/src/screens/inbox/components/SubscriptionHandler.tsx +41 -0
- package/src/screens/inbox/components/SupportServiceDialogsListItem.tsx +53 -55
- package/src/screens/inbox/components/ThreadsViewItem.tsx +178 -285
- package/src/screens/inbox/components/workflow/dialogs-list-item-xstate.ts +145 -0
- package/src/screens/inbox/components/workflow/service-dialogs-list-item-xstate.ts +159 -0
- package/src/screens/inbox/config/config.ts +2 -2
- package/src/screens/inbox/containers/ConversationView.tsx +1843 -702
- package/src/screens/inbox/containers/ConversationView.tsx.bk +1467 -0
- package/src/screens/inbox/containers/Dialogs.tsx +402 -204
- package/src/screens/inbox/containers/SupportServiceDialogs.tsx +4 -4
- package/src/screens/inbox/containers/ThreadConversationView.tsx +1350 -319
- package/src/screens/inbox/containers/ThreadsView.tsx +105 -193
- package/src/screens/inbox/containers/workflow/apollo/handleResult.ts +20 -0
- package/src/screens/inbox/containers/workflow/conversation-xstate.ts +313 -0
- package/src/screens/inbox/containers/workflow/dialogs-xstate.ts +196 -0
- package/src/screens/inbox/containers/workflow/thread-conversation-xstate.ts +401 -0
- package/src/screens/inbox/hooks/useInboxMessages.ts +34 -0
- package/src/screens/inbox/hooks/useSafeDialogThreadsMachine.ts +136 -0
- package/src/screens/inbox/index.ts +37 -0
- package/src/screens/inbox/machines/threadsMachine.ts +147 -0
- package/src/screens/inbox/workflow/dialog-threads-xstate.ts +163 -0
- package/tsconfig.json +11 -54
- package/lib/screens/inbox/components/DialogsListItem.js +0 -171
- package/lib/screens/inbox/components/DialogsListItem.js.map +0 -1
- package/lib/screens/inbox/components/ServiceDialogsListItem.js +0 -171
- package/lib/screens/inbox/components/ServiceDialogsListItem.js.map +0 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import React__default,{forwardRef,useCallback}from'react';import {Platform,View,TouchableOpacity,TextInput,ScrollView,KeyboardAvoidingView,Animated}from'react-native';import {Image,Box,Spinner,Text}from'@admin-layout/gluestack-ui-mobile';import {GiftedChat}from'react-native-gifted-chat';import {MaterialIcons,MaterialCommunityIcons,Ionicons}from'@expo/vector-icons';import colors from'tailwindcss/colors';var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
function getRefCurrent(ref) {
|
|
30
|
+
if (ref && typeof ref === "object" && "current" in ref) {
|
|
31
|
+
return ref.current;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const GiftedChatInboxComponent = forwardRef((props, ref) => {
|
|
36
|
+
const _a = props, {
|
|
37
|
+
messages,
|
|
38
|
+
onSend,
|
|
39
|
+
text,
|
|
40
|
+
onInputTextChanged,
|
|
41
|
+
user,
|
|
42
|
+
images,
|
|
43
|
+
setImages,
|
|
44
|
+
onSelectImages,
|
|
45
|
+
onRemoveImage,
|
|
46
|
+
selectedImage,
|
|
47
|
+
setSelectedImage,
|
|
48
|
+
isUploadingImage,
|
|
49
|
+
loading,
|
|
50
|
+
errorMessage,
|
|
51
|
+
notificationType = "error",
|
|
52
|
+
onCloseError,
|
|
53
|
+
inputToolbarHeight = 56,
|
|
54
|
+
bottomMargin = 0,
|
|
55
|
+
renderMessageText,
|
|
56
|
+
renderActions,
|
|
57
|
+
renderAccessory,
|
|
58
|
+
renderMessage,
|
|
59
|
+
renderInputToolbar,
|
|
60
|
+
renderChatFooter,
|
|
61
|
+
renderLoadEarlier,
|
|
62
|
+
loadEarlier,
|
|
63
|
+
isLoadingEarlier,
|
|
64
|
+
keyboardVerticalOffset = Platform.OS === "ios" ? 64 : 0,
|
|
65
|
+
placeholder = "Jot something down",
|
|
66
|
+
listViewProps,
|
|
67
|
+
wrapInSafeArea = true,
|
|
68
|
+
minComposerHeight = 36,
|
|
69
|
+
maxComposerHeight = 100,
|
|
70
|
+
renderFooter,
|
|
71
|
+
lightboxProps = {
|
|
72
|
+
underlayColor: "transparent",
|
|
73
|
+
springConfig: {
|
|
74
|
+
tension: 9e4,
|
|
75
|
+
friction: 9e4
|
|
76
|
+
},
|
|
77
|
+
disabled: true
|
|
78
|
+
},
|
|
79
|
+
infiniteScroll = false,
|
|
80
|
+
alwaysShowSend = true,
|
|
81
|
+
minInputToolbarHeight = 30,
|
|
82
|
+
textInputProps = {
|
|
83
|
+
multiline: true,
|
|
84
|
+
returnKeyType: "default",
|
|
85
|
+
enablesReturnKeyAutomatically: true,
|
|
86
|
+
placeholderTextColor: colors.gray[400]
|
|
87
|
+
},
|
|
88
|
+
messagesContainerStyle = {
|
|
89
|
+
paddingTop: 8
|
|
90
|
+
},
|
|
91
|
+
renderHeader
|
|
92
|
+
} = _a, rest = __objRest(_a, [
|
|
93
|
+
"messages",
|
|
94
|
+
"onSend",
|
|
95
|
+
"text",
|
|
96
|
+
"onInputTextChanged",
|
|
97
|
+
"user",
|
|
98
|
+
"images",
|
|
99
|
+
"setImages",
|
|
100
|
+
"onSelectImages",
|
|
101
|
+
"onRemoveImage",
|
|
102
|
+
"selectedImage",
|
|
103
|
+
"setSelectedImage",
|
|
104
|
+
"isUploadingImage",
|
|
105
|
+
"loading",
|
|
106
|
+
"errorMessage",
|
|
107
|
+
"notificationType",
|
|
108
|
+
"onCloseError",
|
|
109
|
+
"inputToolbarHeight",
|
|
110
|
+
"bottomMargin",
|
|
111
|
+
"renderMessageText",
|
|
112
|
+
"renderActions",
|
|
113
|
+
"renderAccessory",
|
|
114
|
+
"renderMessage",
|
|
115
|
+
"renderInputToolbar",
|
|
116
|
+
"renderChatFooter",
|
|
117
|
+
"renderLoadEarlier",
|
|
118
|
+
"loadEarlier",
|
|
119
|
+
"isLoadingEarlier",
|
|
120
|
+
"keyboardVerticalOffset",
|
|
121
|
+
"placeholder",
|
|
122
|
+
"listViewProps",
|
|
123
|
+
"wrapInSafeArea",
|
|
124
|
+
"minComposerHeight",
|
|
125
|
+
"maxComposerHeight",
|
|
126
|
+
"renderFooter",
|
|
127
|
+
"lightboxProps",
|
|
128
|
+
"infiniteScroll",
|
|
129
|
+
"alwaysShowSend",
|
|
130
|
+
"minInputToolbarHeight",
|
|
131
|
+
"textInputProps",
|
|
132
|
+
"messagesContainerStyle",
|
|
133
|
+
"renderHeader"
|
|
134
|
+
]);
|
|
135
|
+
const renderErrorNotification = () => {
|
|
136
|
+
if (!errorMessage)
|
|
137
|
+
return null;
|
|
138
|
+
return /* @__PURE__ */ React__default.createElement(Animated.View, { style: {
|
|
139
|
+
position: "absolute",
|
|
140
|
+
top: 10,
|
|
141
|
+
left: 10,
|
|
142
|
+
right: 10,
|
|
143
|
+
backgroundColor: notificationType === "error" ? "#f44336" : "#ff9800",
|
|
144
|
+
padding: 15,
|
|
145
|
+
borderRadius: 8,
|
|
146
|
+
shadowColor: "#000",
|
|
147
|
+
shadowOffset: {
|
|
148
|
+
width: 0,
|
|
149
|
+
height: 2
|
|
150
|
+
},
|
|
151
|
+
shadowOpacity: 0.25,
|
|
152
|
+
shadowRadius: 3.84,
|
|
153
|
+
elevation: 5,
|
|
154
|
+
zIndex: 1e3
|
|
155
|
+
} }, /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
justifyContent: "space-between",
|
|
158
|
+
alignItems: "center"
|
|
159
|
+
} }, /* @__PURE__ */ React__default.createElement(View, null, /* @__PURE__ */ React__default.createElement(Text, { style: {
|
|
160
|
+
color: "white",
|
|
161
|
+
fontWeight: "bold"
|
|
162
|
+
} }, notificationType === "error" ? "Error" : "Warning")), /* @__PURE__ */ React__default.createElement(View, null, /* @__PURE__ */ React__default.createElement(TouchableOpacity, { onPress: onCloseError }, /* @__PURE__ */ React__default.createElement(Ionicons, { name: "close", size: 20, color: "white" })))), /* @__PURE__ */ React__default.createElement(Text, { style: {
|
|
163
|
+
color: "white",
|
|
164
|
+
marginTop: 5
|
|
165
|
+
} }, errorMessage));
|
|
166
|
+
};
|
|
167
|
+
const renderInputToolbarDefault = useCallback((props2) => /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
168
|
+
backgroundColor: "#fff",
|
|
169
|
+
paddingBottom: 4,
|
|
170
|
+
paddingTop: 4
|
|
171
|
+
} }, /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
172
|
+
flexDirection: "row",
|
|
173
|
+
alignItems: "center",
|
|
174
|
+
minHeight: 44,
|
|
175
|
+
maxHeight: 56,
|
|
176
|
+
backgroundColor: "#fff",
|
|
177
|
+
borderRadius: 22,
|
|
178
|
+
marginHorizontal: 8,
|
|
179
|
+
paddingHorizontal: 8,
|
|
180
|
+
borderTopWidth: 1,
|
|
181
|
+
borderTopColor: "#e0e0e0"
|
|
182
|
+
} }, /* @__PURE__ */ React__default.createElement(TouchableOpacity, { onPress: onSelectImages, style: {
|
|
183
|
+
width: 32,
|
|
184
|
+
height: 32,
|
|
185
|
+
borderRadius: 16,
|
|
186
|
+
backgroundColor: "#fff",
|
|
187
|
+
alignItems: "center",
|
|
188
|
+
justifyContent: "center",
|
|
189
|
+
marginRight: 8
|
|
190
|
+
} }, /* @__PURE__ */ React__default.createElement(MaterialIcons, { name: "add", size: 24, color: "#888" })), /* @__PURE__ */ React__default.createElement(TextInput, { ref, style: {
|
|
191
|
+
flex: 1,
|
|
192
|
+
maxHeight: 44,
|
|
193
|
+
backgroundColor: "transparent",
|
|
194
|
+
color: "#444",
|
|
195
|
+
paddingHorizontal: 8,
|
|
196
|
+
paddingVertical: 0,
|
|
197
|
+
alignSelf: "center",
|
|
198
|
+
textAlignVertical: "center"
|
|
199
|
+
}, placeholder: placeholder || "Jot something down", placeholderTextColor: colors.gray[400], multiline: true, value: text, onChangeText: onInputTextChanged }), /* @__PURE__ */ React__default.createElement(
|
|
200
|
+
TouchableOpacity,
|
|
201
|
+
{
|
|
202
|
+
onPress: () => onSend([{
|
|
203
|
+
text
|
|
204
|
+
}]),
|
|
205
|
+
disabled: false,
|
|
206
|
+
style: {
|
|
207
|
+
marginLeft: 8,
|
|
208
|
+
opacity: !text.trim() && images.length === 0 ? 0.5 : 1
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
/* @__PURE__ */ React__default.createElement(
|
|
212
|
+
MaterialCommunityIcons,
|
|
213
|
+
{
|
|
214
|
+
name: "send-circle",
|
|
215
|
+
size: 32,
|
|
216
|
+
color: !text.trim() && images.length === 0 ? colors.gray[400] : colors.blue[500]
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
)), images && images.length > 0 && /* @__PURE__ */ React__default.createElement(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: {
|
|
220
|
+
marginTop: 4,
|
|
221
|
+
marginLeft: 8
|
|
222
|
+
} }, images.map((img, index) => /* @__PURE__ */ React__default.createElement(View, { key: `image-preview-${index}`, style: {
|
|
223
|
+
width: 48,
|
|
224
|
+
height: 48,
|
|
225
|
+
marginRight: 8,
|
|
226
|
+
borderRadius: 6,
|
|
227
|
+
overflow: "hidden",
|
|
228
|
+
position: "relative",
|
|
229
|
+
backgroundColor: colors.gray[200]
|
|
230
|
+
} }, /* @__PURE__ */ React__default.createElement(Image, { source: {
|
|
231
|
+
uri: img.uri || img.url
|
|
232
|
+
}, style: {
|
|
233
|
+
width: "100%",
|
|
234
|
+
height: "100%"
|
|
235
|
+
}, alt: `selected image ${index + 1}` }), /* @__PURE__ */ React__default.createElement(TouchableOpacity, { onPress: () => {
|
|
236
|
+
onRemoveImage(index);
|
|
237
|
+
}, style: {
|
|
238
|
+
position: "absolute",
|
|
239
|
+
top: 2,
|
|
240
|
+
right: 2,
|
|
241
|
+
backgroundColor: "rgba(0,0,0,0.6)",
|
|
242
|
+
borderRadius: 10,
|
|
243
|
+
width: 20,
|
|
244
|
+
height: 20,
|
|
245
|
+
alignItems: "center",
|
|
246
|
+
justifyContent: "center"
|
|
247
|
+
} }, /* @__PURE__ */ React__default.createElement(Ionicons, { name: "close", size: 14, color: "white" })))))), [onSelectImages, text, images, isUploadingImage, loading, onSend, onRemoveImage, placeholder, ref]);
|
|
248
|
+
const renderAccessoryDefault = useCallback(() => {
|
|
249
|
+
if (!images.length)
|
|
250
|
+
return null;
|
|
251
|
+
return /* @__PURE__ */ React__default.createElement(Box, { style: {
|
|
252
|
+
position: "relative",
|
|
253
|
+
height: 70,
|
|
254
|
+
backgroundColor: "transparent",
|
|
255
|
+
justifyContent: "center"
|
|
256
|
+
} }, /* @__PURE__ */ React__default.createElement(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: {
|
|
257
|
+
flexDirection: "row",
|
|
258
|
+
paddingLeft: 15,
|
|
259
|
+
paddingRight: 5
|
|
260
|
+
}, contentContainerStyle: {
|
|
261
|
+
alignItems: "center",
|
|
262
|
+
height: "100%"
|
|
263
|
+
} }, images.map((img, index) => /* @__PURE__ */ React__default.createElement(View, { key: `image-preview-${index}`, style: {
|
|
264
|
+
width: 40,
|
|
265
|
+
height: 40,
|
|
266
|
+
marginRight: 15,
|
|
267
|
+
borderRadius: 4,
|
|
268
|
+
backgroundColor: colors.gray[200],
|
|
269
|
+
overflow: "hidden",
|
|
270
|
+
borderWidth: 1,
|
|
271
|
+
borderColor: "#e0e0e0",
|
|
272
|
+
position: "relative",
|
|
273
|
+
zIndex: 10
|
|
274
|
+
} }, /* @__PURE__ */ React__default.createElement(Image, { source: {
|
|
275
|
+
uri: img.uri || img.url
|
|
276
|
+
}, style: {
|
|
277
|
+
width: "100%",
|
|
278
|
+
height: "100%"
|
|
279
|
+
}, alt: `selected image ${index + 1}` }), /* @__PURE__ */ React__default.createElement(TouchableOpacity, { onPress: () => {
|
|
280
|
+
const newImages = [...images];
|
|
281
|
+
newImages.splice(index, 1);
|
|
282
|
+
setImages(newImages);
|
|
283
|
+
if (newImages.length === 0) {
|
|
284
|
+
setSelectedImage("");
|
|
285
|
+
const inputRef = getRefCurrent(ref);
|
|
286
|
+
if (inputRef && typeof inputRef.focus === "function") {
|
|
287
|
+
inputRef.focus();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}, style: {
|
|
291
|
+
position: "absolute",
|
|
292
|
+
top: -1,
|
|
293
|
+
right: -1,
|
|
294
|
+
backgroundColor: "rgba(0,0,0,0.6)",
|
|
295
|
+
borderRadius: 12,
|
|
296
|
+
width: 20,
|
|
297
|
+
height: 20,
|
|
298
|
+
alignItems: "center",
|
|
299
|
+
justifyContent: "center",
|
|
300
|
+
zIndex: 9999
|
|
301
|
+
} }, /* @__PURE__ */ React__default.createElement(Ionicons, { name: "close", size: 16, color: "white" }))))));
|
|
302
|
+
}, [images, setImages, setSelectedImage, ref]);
|
|
303
|
+
return /* @__PURE__ */ React__default.createElement(KeyboardAvoidingView, { style: {
|
|
304
|
+
flex: 1,
|
|
305
|
+
justifyContent: "flex-end",
|
|
306
|
+
backgroundColor: "#fff"
|
|
307
|
+
}, behavior: Platform.OS === "ios" ? "padding" : "height", keyboardVerticalOffset }, /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
308
|
+
flex: 1,
|
|
309
|
+
backgroundColor: "#fff",
|
|
310
|
+
position: "relative",
|
|
311
|
+
marginBottom: bottomMargin
|
|
312
|
+
} }, renderErrorNotification(), loading && /* @__PURE__ */ React__default.createElement(Spinner, { color: colors.blue[500] }), /* @__PURE__ */ React__default.createElement(GiftedChat, __spreadValues({ ref, wrapInSafeArea, messages, onSend, text, onInputTextChanged, user, renderMessageText, renderActions: renderActions || null, renderAccessory: renderAccessory || renderAccessoryDefault, renderMessage, renderInputToolbar: renderInputToolbar || renderInputToolbarDefault, renderLoading: props.renderLoading || null, renderChatFooter, renderLoadEarlier, listViewProps, loadEarlier, isLoadingEarlier, bottomOffset: props.bottomOffset || 0, isKeyboardInternallyHandled: props.isKeyboardInternallyHandled || false, renderFooter: () => renderFooter ? renderFooter() : null, minComposerHeight, maxComposerHeight, placeholder: placeholder || "Jot something down", lightboxProps, infiniteScroll, alwaysShowSend, minInputToolbarHeight, textInputProps, messagesContainerStyle, isTyping: props.isTyping || false, renderChatEmpty: props.renderChatEmpty || null }, rest))));
|
|
313
|
+
});export{GiftedChatInboxComponent,GiftedChatInboxComponent as default};//# sourceMappingURL=GiftedChatInboxComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GiftedChatInboxComponent.js","sources":["../../../../src/screens/inbox/components/GiftedChatInboxComponent.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { Platform, View, KeyboardAvoidingView, TouchableOpacity, TextInput, ScrollView, Animated } from 'react-native';\nimport { Spinner, Box, Image, HStack, Text } from '@admin-layout/gluestack-ui-mobile';\nimport { GiftedChat, Send } from 'react-native-gifted-chat';\nimport { Ionicons, MaterialCommunityIcons, MaterialIcons } from '@expo/vector-icons';\nimport colors from 'tailwindcss/colors';\n// If you have a SlackMessage component, import it:\n// import SlackMessage from './SlackMessage';\n\nexport interface GiftedChatInboxComponentProps {\n messages: any[];\n onSend: (messages: any[]) => void;\n text: string;\n onInputTextChanged: (text: string) => void;\n user: any;\n images: any[];\n onSelectImages: () => void;\n onRemoveImage: (index: number) => void;\n selectedImage: string;\n setSelectedImage: (img: string) => void;\n isUploadingImage: boolean;\n loading: boolean;\n errorMessage: string;\n notificationType?: string;\n onCloseError?: () => void;\n inputToolbarHeight?: number;\n bottomMargin?: number;\n renderMessageText?: any;\n renderActions?: any;\n renderAccessory?: any;\n renderMessage?: any;\n renderInputToolbar?: any;\n renderChatFooter?: any;\n renderLoadEarlier?: any;\n loadEarlier?: boolean;\n isLoadingEarlier?: boolean;\n totalCount?: number;\n channelMessagesLength?: number;\n keyboardVerticalOffset?: number;\n placeholder?: string;\n listViewProps?: any;\n wrapInSafeArea?: boolean;\n minComposerHeight?: number;\n maxComposerHeight?: number;\n renderFooter?: any;\n lightboxProps?: any;\n infiniteScroll?: boolean;\n alwaysShowSend?: boolean;\n minInputToolbarHeight?: number;\n textInputProps?: any;\n messagesContainerStyle?: any;\n renderHeader?: any;\n [key: string]: any;\n}\n\n// Helper to get the current ref if it's an object\nfunction getRefCurrent(ref: React.ForwardedRef<any>) {\n if (ref && typeof ref === 'object' && 'current' in ref) {\n return ref.current;\n }\n return null;\n}\n\nexport const GiftedChatInboxComponent = forwardRef<any, GiftedChatInboxComponentProps>((props, ref) => {\n const {\n messages,\n onSend,\n text,\n onInputTextChanged,\n user,\n images,\n setImages,\n onSelectImages,\n onRemoveImage,\n selectedImage,\n setSelectedImage,\n isUploadingImage,\n loading,\n errorMessage,\n notificationType = 'error',\n onCloseError,\n inputToolbarHeight = 56,\n bottomMargin = 0,\n renderMessageText,\n renderActions,\n renderAccessory,\n renderMessage,\n renderInputToolbar,\n renderChatFooter,\n renderLoadEarlier,\n loadEarlier,\n isLoadingEarlier,\n keyboardVerticalOffset = Platform.OS === 'ios' ? 64 : 0,\n placeholder = 'Jot something down',\n listViewProps,\n wrapInSafeArea = true,\n minComposerHeight = 36,\n maxComposerHeight = 100,\n renderFooter,\n lightboxProps = {\n underlayColor: 'transparent',\n springConfig: { tension: 90000, friction: 90000 },\n disabled: true,\n },\n infiniteScroll = false,\n alwaysShowSend = true,\n minInputToolbarHeight = 30,\n textInputProps = {\n multiline: true,\n returnKeyType: 'default',\n enablesReturnKeyAutomatically: true,\n placeholderTextColor: colors.gray[400],\n },\n messagesContainerStyle = { paddingTop: 8 },\n renderHeader,\n ...rest\n } = props;\n\n // Error Notification\n const renderErrorNotification = () => {\n if (!errorMessage) return null;\n return (\n <Animated.View\n style={{\n position: 'absolute',\n top: 10,\n left: 10,\n right: 10,\n backgroundColor: notificationType === 'error' ? '#f44336' : '#ff9800',\n padding: 15,\n borderRadius: 8,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.25,\n shadowRadius: 3.84,\n elevation: 5,\n zIndex: 1000,\n }}\n >\n <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>\n <View>\n <Text style={{ color: 'white', fontWeight: 'bold' }}>\n {notificationType === 'error' ? 'Error' : 'Warning'}\n </Text>\n </View>\n <View>\n <TouchableOpacity onPress={onCloseError}>\n <Ionicons name=\"close\" size={20} color=\"white\" />\n </TouchableOpacity>\n </View>\n </View>\n <Text style={{ color: 'white', marginTop: 5 }}>{errorMessage}</Text>\n </Animated.View>\n );\n };\n\n const renderInputToolbarDefault = useCallback(\n (props) => (\n <View style={{ backgroundColor: '#fff', paddingBottom: 4, paddingTop: 4 }}>\n <View\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n minHeight: 44,\n maxHeight: 56,\n backgroundColor: '#fff',\n borderRadius: 22,\n marginHorizontal: 8,\n paddingHorizontal: 8,\n borderTopWidth: 1,\n borderTopColor: '#e0e0e0',\n }}\n >\n <TouchableOpacity\n onPress={onSelectImages}\n style={{\n width: 32,\n height: 32,\n borderRadius: 16,\n backgroundColor: '#fff',\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 8,\n }}\n >\n <MaterialIcons name=\"add\" size={24} color=\"#888\" />\n </TouchableOpacity>\n <TextInput\n ref={ref}\n style={{\n flex: 1,\n //minHeight: 36,\n maxHeight: 44,\n backgroundColor: 'transparent',\n color: '#444',\n paddingHorizontal: 8,\n paddingVertical: 0,\n alignSelf: 'center',\n textAlignVertical: 'center',\n }}\n placeholder={placeholder || 'Jot something down'}\n placeholderTextColor={colors.gray[400]}\n multiline\n value={text}\n onChangeText={onInputTextChanged}\n />\n <TouchableOpacity\n onPress={() => onSend([{ text: text }])}\n // disabled={(!messageText.trim() && images.length === 0) || isUploadingImage || loading}\n disabled={false}\n style={{\n marginLeft: 8,\n // opacity: (!messageText.trim() && images.length === 0) || isUploadingImage || loading ? 0.5 : 1,\n opacity: !text.trim() && images.length === 0 ? 0.5 : 1,\n }}\n >\n <MaterialCommunityIcons\n name=\"send-circle\"\n size={32}\n color={!text.trim() && images.length === 0 ? colors.gray[400] : colors.blue[500]}\n // color={\n // (!messageText.trim() && images.length === 0) || isUploadingImage || loading\n // ? colors.gray[400]\n // : colors.blue[500]\n // }\n />\n </TouchableOpacity>\n </View>\n {/* Selected Images Row */}\n {images && images.length > 0 && (\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n style={{ marginTop: 4, marginLeft: 8 }}\n >\n {images.map((img, index) => (\n <View\n key={`image-preview-${index}`}\n style={{\n width: 48,\n height: 48,\n marginRight: 8,\n borderRadius: 6,\n overflow: 'hidden',\n position: 'relative',\n backgroundColor: colors.gray[200],\n }}\n >\n <Image\n source={{ uri: img.uri || img.url }}\n style={{ width: '100%', height: '100%' }}\n alt={`selected image ${index + 1}`}\n />\n <TouchableOpacity\n onPress={() => {\n onRemoveImage(index);\n }}\n style={{\n position: 'absolute',\n top: 2,\n right: 2,\n backgroundColor: 'rgba(0,0,0,0.6)',\n borderRadius: 10,\n width: 20,\n height: 20,\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <Ionicons name=\"close\" size={14} color=\"white\" />\n </TouchableOpacity>\n </View>\n ))}\n </ScrollView>\n )}\n </View>\n ),\n [onSelectImages, text, images, isUploadingImage, loading, onSend, onRemoveImage, placeholder, ref],\n );\n\n const renderAccessoryDefault = useCallback(() => {\n if (!images.length) return null;\n return (\n <Box style={{ position: 'relative', height: 70, backgroundColor: 'transparent', justifyContent: 'center' }}>\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n style={{\n flexDirection: 'row',\n paddingLeft: 15,\n paddingRight: 5,\n }}\n contentContainerStyle={{\n alignItems: 'center',\n height: '100%',\n }}\n >\n {images.map((img, index) => (\n <View\n key={`image-preview-${index}`}\n style={{\n width: 40,\n height: 40,\n marginRight: 15,\n borderRadius: 4,\n backgroundColor: colors.gray[200],\n overflow: 'hidden',\n borderWidth: 1,\n borderColor: '#e0e0e0',\n position: 'relative',\n zIndex: 10,\n }}\n >\n <Image\n source={{ uri: img.uri || img.url }}\n style={{ width: '100%', height: '100%' }}\n alt={`selected image ${index + 1}`}\n />\n {/* Cross button at top right */}\n <TouchableOpacity\n onPress={() => {\n const newImages = [...images];\n newImages.splice(index, 1);\n setImages(newImages);\n if (newImages.length === 0) {\n setSelectedImage('');\n const inputRef = getRefCurrent(ref);\n if (inputRef && typeof inputRef.focus === 'function') {\n inputRef.focus();\n }\n }\n }}\n style={{\n position: 'absolute',\n top: -1,\n right: -1,\n backgroundColor: 'rgba(0,0,0,0.6)',\n borderRadius: 12,\n width: 20,\n height: 20,\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: 9999,\n }}\n >\n <Ionicons name=\"close\" size={16} color=\"white\" />\n </TouchableOpacity>\n </View>\n ))}\n </ScrollView>\n </Box>\n );\n }, [images, setImages, setSelectedImage, ref]);\n\n return (\n <KeyboardAvoidingView\n style={{ flex: 1, justifyContent: 'flex-end', backgroundColor: '#fff' }}\n behavior={Platform.OS === 'ios' ? 'padding' : 'height'}\n keyboardVerticalOffset={keyboardVerticalOffset}\n >\n <View\n style={{\n flex: 1,\n backgroundColor: '#fff',\n position: 'relative',\n marginBottom: bottomMargin,\n }}\n >\n {renderErrorNotification()}\n {loading && <Spinner color={colors.blue[500]} />}\n <GiftedChat\n ref={ref}\n wrapInSafeArea={wrapInSafeArea}\n messages={messages}\n onSend={onSend}\n text={text}\n onInputTextChanged={onInputTextChanged}\n user={user}\n renderMessageText={renderMessageText}\n renderActions={renderActions || null}\n renderAccessory={renderAccessory || renderAccessoryDefault}\n renderMessage={renderMessage}\n renderInputToolbar={renderInputToolbar || renderInputToolbarDefault}\n renderLoading={props.renderLoading || null}\n renderChatFooter={renderChatFooter}\n renderLoadEarlier={renderLoadEarlier}\n listViewProps={listViewProps}\n loadEarlier={loadEarlier}\n isLoadingEarlier={isLoadingEarlier}\n bottomOffset={props.bottomOffset || 0}\n isKeyboardInternallyHandled={props.isKeyboardInternallyHandled || false}\n renderFooter={() => (renderFooter ? renderFooter() : null)}\n minComposerHeight={minComposerHeight}\n maxComposerHeight={maxComposerHeight}\n placeholder={placeholder || 'Jot something down'}\n lightboxProps={lightboxProps}\n infiniteScroll={infiniteScroll}\n alwaysShowSend={alwaysShowSend}\n minInputToolbarHeight={minInputToolbarHeight}\n textInputProps={textInputProps}\n messagesContainerStyle={messagesContainerStyle}\n isTyping={props.isTyping || false}\n renderChatEmpty={props.renderChatEmpty || null}\n {...rest}\n />\n </View>\n </KeyboardAvoidingView>\n );\n});\n\nexport default GiftedChatInboxComponent;\n"],"names":["React","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAS,cAAc,GAA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A,EAAiB,GAAA,IAAA,EAAM,mBAAsC,iBAAsC,EAAA,WAAA,EAAa,WAAe,IAAA,oBAAA,EAAsB,eAA8B,cAAgC,EAAA,cAAA,EAAgC,qBAA8C,EAAA,cAAA,EAAgC,wBAAgD,QAAU,EAAA,KAAA,CAAM,QAAY,IAAA,KAAA,EAAO,iBAAiB,KAAM,CAAA,eAAA,IAAmB,IAAU,EAAA,EAAA,IAAA,CAAM,CAC5rC,CACJ,CAAA;AACR,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default from'react';import {StyleSheet,TouchableHighlight,
|
|
1
|
+
import React__default from'react';import {StyleSheet,View,TouchableHighlight,Text,Platform,Dimensions}from'react-native';import {MessageText,MessageImage,Time,utils}from'react-native-gifted-chat';import CachedImage from'../CachedImage/index.js';var __defProp = Object.defineProperty;
|
|
2
2
|
var __defProps = Object.defineProperties;
|
|
3
3
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -29,12 +29,16 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
+
var __publicField = (obj, key, value) => {
|
|
33
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
|
+
return value;
|
|
35
|
+
};
|
|
32
36
|
const {
|
|
33
37
|
isSameUser,
|
|
34
38
|
isSameDay
|
|
35
39
|
} = utils;
|
|
36
40
|
const windowWidth = Dimensions.get("window").width;
|
|
37
|
-
|
|
41
|
+
Dimensions.get("window").height;
|
|
38
42
|
class Bubble extends React__default.Component {
|
|
39
43
|
constructor(props) {
|
|
40
44
|
super(props);
|
|
@@ -60,41 +64,151 @@ class Bubble extends React__default.Component {
|
|
|
60
64
|
return null;
|
|
61
65
|
}
|
|
62
66
|
renderMessageImage() {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
const _a = this.props, {
|
|
68
|
+
currentMessage,
|
|
69
|
+
containerStyle,
|
|
70
|
+
wrapperStyle
|
|
71
|
+
} = _a, messageImageProps = __objRest(_a, [
|
|
72
|
+
"currentMessage",
|
|
73
|
+
"containerStyle",
|
|
74
|
+
"wrapperStyle"
|
|
75
|
+
]);
|
|
76
|
+
if (currentMessage.images && Array.isArray(currentMessage.images) && currentMessage.images.length > 0) {
|
|
77
|
+
const validImages = currentMessage.images.filter((url) => url && typeof url === "string");
|
|
78
|
+
if (validImages.length === 0) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
82
|
+
marginVertical: 0
|
|
83
|
+
} }, /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
84
|
+
flexDirection: "row",
|
|
85
|
+
flexWrap: "wrap",
|
|
86
|
+
gap: 8
|
|
87
|
+
} }, validImages.map((imageUrl, index) => {
|
|
88
|
+
const isLocalImage = imageUrl.startsWith("file:") || imageUrl.startsWith("data:") || imageUrl.startsWith("content:") || !imageUrl.startsWith("http://") && !imageUrl.startsWith("https://");
|
|
89
|
+
const imageSize = validImages.length === 1 ? {
|
|
90
|
+
width: windowWidth * 0.6,
|
|
91
|
+
height: windowWidth * 0.4
|
|
92
|
+
} : {
|
|
93
|
+
width: windowWidth * 0.3,
|
|
94
|
+
height: windowWidth * 0.3
|
|
95
|
+
};
|
|
96
|
+
const isUploading = currentMessage.isUploading;
|
|
97
|
+
return /* @__PURE__ */ React__default.createElement(TouchableHighlight, { key: `image-${index}-${currentMessage._id}`, underlayColor: "transparent", onPress: () => {
|
|
98
|
+
if (isUploading)
|
|
99
|
+
return;
|
|
100
|
+
const imageObject = {
|
|
101
|
+
_id: `${currentMessage._id}-img-${index}`,
|
|
102
|
+
image: imageUrl
|
|
103
|
+
};
|
|
104
|
+
this.props.setImageViewer(imageObject, true);
|
|
105
|
+
} }, /* @__PURE__ */ React__default.createElement(View, { style: __spreadProps(__spreadValues({}, imageSize), {
|
|
106
|
+
maxHeight: 200,
|
|
107
|
+
borderRadius: 8,
|
|
108
|
+
overflow: "hidden",
|
|
109
|
+
borderWidth: 1,
|
|
110
|
+
borderColor: "#e0e0e0",
|
|
111
|
+
backgroundColor: "#f7f7f7"
|
|
112
|
+
}) }, isLocalImage ? /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
113
|
+
width: "100%",
|
|
114
|
+
height: "100%"
|
|
115
|
+
} }, /* @__PURE__ */ React__default.createElement(MessageImage, __spreadProps(__spreadValues({}, messageImageProps), { currentMessage: __spreadProps(__spreadValues({}, currentMessage), {
|
|
116
|
+
image: imageUrl
|
|
117
|
+
}), imageStyle: {
|
|
118
|
+
width: "100%",
|
|
119
|
+
height: "100%",
|
|
120
|
+
borderRadius: 8
|
|
121
|
+
} })), isUploading && /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
122
|
+
position: "absolute",
|
|
123
|
+
top: 0,
|
|
124
|
+
left: 0,
|
|
125
|
+
right: 0,
|
|
126
|
+
bottom: 0,
|
|
127
|
+
backgroundColor: "rgba(0,0,0,0.2)",
|
|
128
|
+
justifyContent: "center",
|
|
129
|
+
alignItems: "center"
|
|
130
|
+
} }, /* @__PURE__ */ React__default.createElement(Text, { style: {
|
|
131
|
+
color: "white",
|
|
132
|
+
fontWeight: "bold"
|
|
133
|
+
} }, "Uploading..."))) : /* @__PURE__ */ React__default.createElement(CachedImage, { style: [styles.slackImage, {
|
|
134
|
+
width: "100%",
|
|
135
|
+
height: "100%"
|
|
136
|
+
}], cacheKey: `${currentMessage._id}-img-${index}-slack-bubble-imageKey`, source: {
|
|
137
|
+
uri: imageUrl,
|
|
138
|
+
expiresIn: 86400
|
|
139
|
+
}, resizeMode: "cover", alt: "image", placeholderContent: /* @__PURE__ */ React__default.createElement(View, { style: [styles.slackImage, {
|
|
140
|
+
width: "100%",
|
|
141
|
+
height: "100%",
|
|
142
|
+
backgroundColor: "#e1e1e1",
|
|
143
|
+
justifyContent: "center",
|
|
144
|
+
alignItems: "center",
|
|
145
|
+
borderRadius: 8
|
|
146
|
+
}] }, /* @__PURE__ */ React__default.createElement(Text, null, isUploading ? "Uploading..." : "Loading...")) })));
|
|
147
|
+
})));
|
|
148
|
+
}
|
|
149
|
+
if (currentMessage.image) {
|
|
71
150
|
if (this.props.renderMessageImage) {
|
|
72
151
|
return this.props.renderMessageImage(messageImageProps);
|
|
73
152
|
}
|
|
74
153
|
const {
|
|
75
154
|
image,
|
|
76
155
|
_id
|
|
77
|
-
} =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
156
|
+
} = currentMessage;
|
|
157
|
+
if (!image || typeof image !== "string") {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
const isLocalImage = image.startsWith("file:") || image.startsWith("data:") || image.startsWith("content:") || !image.startsWith("http://") && !image.startsWith("https://");
|
|
161
|
+
const isUploading = currentMessage.isUploading;
|
|
162
|
+
return /* @__PURE__ */ React__default.createElement(TouchableHighlight, { underlayColor: "transparent", style: {
|
|
163
|
+
width: "100%",
|
|
164
|
+
marginVertical: 0
|
|
165
|
+
}, onPress: () => {
|
|
166
|
+
if (isUploading)
|
|
167
|
+
return;
|
|
168
|
+
this.props.setImageViewer(currentMessage, true);
|
|
169
|
+
} }, /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
170
|
+
width: windowWidth * 0.6,
|
|
171
|
+
height: windowWidth * 0.4,
|
|
172
|
+
maxHeight: 200,
|
|
173
|
+
borderRadius: 8,
|
|
174
|
+
overflow: "hidden",
|
|
175
|
+
borderWidth: 1,
|
|
176
|
+
borderColor: "#e0e0e0",
|
|
177
|
+
backgroundColor: "#f7f7f7"
|
|
178
|
+
} }, isLocalImage ? /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
179
|
+
width: "100%",
|
|
180
|
+
height: "100%",
|
|
181
|
+
position: "relative"
|
|
182
|
+
} }, /* @__PURE__ */ React__default.createElement(MessageImage, __spreadProps(__spreadValues({}, messageImageProps), { imageStyle: {
|
|
183
|
+
width: "100%",
|
|
184
|
+
height: "100%",
|
|
185
|
+
borderRadius: 8
|
|
186
|
+
} })), isUploading && /* @__PURE__ */ React__default.createElement(View, { style: {
|
|
187
|
+
position: "absolute",
|
|
188
|
+
top: 0,
|
|
189
|
+
left: 0,
|
|
190
|
+
right: 0,
|
|
191
|
+
bottom: 0,
|
|
192
|
+
backgroundColor: "rgba(0,0,0,0.2)",
|
|
193
|
+
justifyContent: "center",
|
|
194
|
+
alignItems: "center"
|
|
195
|
+
} }, /* @__PURE__ */ React__default.createElement(Text, { style: {
|
|
196
|
+
color: "white",
|
|
197
|
+
fontWeight: "bold"
|
|
198
|
+
} }, "Uploading..."))) : /* @__PURE__ */ React__default.createElement(CachedImage, { style: [styles.slackImage, {
|
|
199
|
+
width: "100%",
|
|
200
|
+
height: "100%"
|
|
201
|
+
}], cacheKey: `${_id}-slack-bubble-imageKey`, source: {
|
|
202
|
+
uri: image,
|
|
203
|
+
expiresIn: 86400
|
|
204
|
+
}, resizeMode: "cover", alt: "image", placeholderContent: /* @__PURE__ */ React__default.createElement(View, { style: [styles.slackImage, {
|
|
205
|
+
width: "100%",
|
|
206
|
+
height: "100%",
|
|
207
|
+
backgroundColor: "#e1e1e1",
|
|
208
|
+
justifyContent: "center",
|
|
209
|
+
alignItems: "center",
|
|
210
|
+
borderRadius: 8
|
|
211
|
+
}] }, /* @__PURE__ */ React__default.createElement(Text, null, isUploading ? "Uploading..." : "Loading...")) })));
|
|
98
212
|
}
|
|
99
213
|
return null;
|
|
100
214
|
}
|
|
@@ -173,6 +287,8 @@ class Bubble extends React__default.Component {
|
|
|
173
287
|
));
|
|
174
288
|
}
|
|
175
289
|
}
|
|
290
|
+
__publicField(Bubble, "defaultProps");
|
|
291
|
+
__publicField(Bubble, "propTypes");
|
|
176
292
|
const styles = StyleSheet.create({
|
|
177
293
|
standardFont: {
|
|
178
294
|
fontSize: 15
|