@planningcenter/chat-react-native 4.4.1-qa-staging.14 → 4.4.1-qa-staging.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAoB9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAmB7C;;GAEG;AACH,UAAU,YAAa,SAAQ,eAAe;IAC5C,4BAA4B,EAAE,OAAO,CAAA;IACrC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED,eAAO,MAAM,OAAO,8KASjB,YAAY,6CA6Sb,CAAA"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAoB9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAmB7C;;GAEG;AACH,UAAU,YAAa,SAAQ,eAAe;IAC5C,4BAA4B,EAAE,OAAO,CAAA;IACrC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED,eAAO,MAAM,OAAO,8KASjB,YAAY,6CAySb,CAAA"}
@@ -27,7 +27,7 @@ import { TheirReplyConnector, MyReplyConnector, AVATAR_CONNECTOR_SPACING } from
27
27
  */
28
28
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
29
29
  export const Message = memo(function MessageRow(t0) {
30
- const $ = _c(77);
30
+ const $ = _c(84);
31
31
  const {
32
32
  canDeleteNonAuthoredMessages,
33
33
  conversationDisabled,
@@ -91,6 +91,7 @@ export const Message = memo(function MessageRow(t0) {
91
91
  const replyRootAuthorName = replyToReplyRootMessage ? replyRoot?.author.name : author.name;
92
92
  const messageText = isDeletedReplyRootMessage ? "Message deleted" : text;
93
93
  const messageBottomMargin = message.lastInGroup || message.nextIsReplyShadowMessage ? 16 : hasReactions || showMessageMeta || showReplyCountButton ? 8 : 4;
94
+ const spaceBelowPressable = messageBottomMargin - MESSAGE_BACKGROUND_OUTSET;
94
95
  const messageIsReplyLabel = replyToReplyRootMessage ? "Reply" : "";
95
96
  const attachmentLabel = some(attachments) ? pluralize(attachments.length, "attachment") : "";
96
97
  const replyCountLabel = isReplyRootMessage ? replyCountText : "";
@@ -206,52 +207,78 @@ export const Message = memo(function MessageRow(t0) {
206
207
  };
207
208
  const T0 = Pressable;
208
209
  const t6 = `message-${message.id}`;
209
- const t7 = isDeleting ? undefined : handleMessageLongPress;
210
- const t8 = isDeleting ? undefined : handleMessagePress;
211
- const t9 = isDeleting ? undefined : handleMessagePressIn;
212
- const t10 = isDeleting ? undefined : handleMessagePressOut;
213
- let t11;
214
- if ($[8] !== colors.androidRippleNeutral) {
215
- t11 = {
210
+ let t7;
211
+ if ($[8] !== spaceBelowPressable) {
212
+ t7 = {
213
+ marginBottom: spaceBelowPressable
214
+ };
215
+ $[8] = spaceBelowPressable;
216
+ $[9] = t7;
217
+ } else {
218
+ t7 = $[9];
219
+ }
220
+ let t8;
221
+ if ($[10] !== styles.pressable || $[11] !== t7) {
222
+ t8 = [styles.pressable, t7];
223
+ $[10] = styles.pressable;
224
+ $[11] = t7;
225
+ $[12] = t8;
226
+ } else {
227
+ t8 = $[12];
228
+ }
229
+ const t9 = isDeleting ? undefined : handleMessageLongPress;
230
+ const t10 = isDeleting ? undefined : handleMessagePress;
231
+ const t11 = isDeleting ? undefined : handleMessagePressIn;
232
+ const t12 = isDeleting ? undefined : handleMessagePressOut;
233
+ let t13;
234
+ if ($[13] !== colors.androidRippleNeutral) {
235
+ t13 = {
216
236
  color: colors.androidRippleNeutral,
217
237
  borderless: false,
218
238
  foreground: true
219
239
  };
220
- $[8] = colors.androidRippleNeutral;
221
- $[9] = t11;
240
+ $[13] = colors.androidRippleNeutral;
241
+ $[14] = t13;
242
+ } else {
243
+ t13 = $[14];
244
+ }
245
+ const t14 = "button";
246
+ const t15 = "Long press to view message actions like reacting and copying.";
247
+ const t16 = isReplyRootMessage ? accessibilityActions : undefined;
248
+ const t17 = isReplyRootMessage ? handleAccessibilityAction : undefined;
249
+ const t18 = isDeletedReplyRootMessage || isDeleting;
250
+ let t19;
251
+ if ($[15] !== animatedBackgroundColor) {
252
+ t19 = /*#__PURE__*/_jsx(Animated.View, {
253
+ style: [StyleSheet.absoluteFill, animatedBackgroundColor]
254
+ });
255
+ $[15] = animatedBackgroundColor;
256
+ $[16] = t19;
222
257
  } else {
223
- t11 = $[9];
258
+ t19 = $[16];
224
259
  }
225
- const t12 = "button";
226
- const t13 = "Long press to view message actions like reacting and copying.";
227
- const t14 = isReplyRootMessage ? accessibilityActions : undefined;
228
- const t15 = isReplyRootMessage ? handleAccessibilityAction : undefined;
229
- const t16 = isDeletedReplyRootMessage || isDeleting;
230
260
  const T1 = View;
231
- const t17 = messageBottomMargin - MESSAGE_BACKGROUND_OUTSET;
232
- let t18;
233
- if ($[10] !== t17) {
234
- t18 = {
235
- bottom: t17
261
+ const t20 = -spaceBelowPressable;
262
+ let t21;
263
+ if ($[17] !== t20) {
264
+ t21 = {
265
+ marginBottom: t20
236
266
  };
237
- $[10] = t17;
238
- $[11] = t18;
267
+ $[17] = t20;
268
+ $[18] = t21;
239
269
  } else {
240
- t18 = $[11];
270
+ t21 = $[18];
241
271
  }
242
- let t19;
243
- if ($[12] !== animatedBackgroundColor || $[13] !== styles.background || $[14] !== t18) {
244
- t19 = /*#__PURE__*/_jsx(Animated.View, {
245
- style: [styles.background, t18, animatedBackgroundColor]
246
- });
247
- $[12] = animatedBackgroundColor;
248
- $[13] = styles.background;
249
- $[14] = t18;
250
- $[15] = t19;
272
+ let t22;
273
+ if ($[19] !== styles.message || $[20] !== t21) {
274
+ t22 = [styles.message, t21];
275
+ $[19] = styles.message;
276
+ $[20] = t21;
277
+ $[21] = t22;
251
278
  } else {
252
- t19 = $[15];
279
+ t22 = $[21];
253
280
  }
254
- const t20 = !message.mine && /*#__PURE__*/_jsxs(View, {
281
+ const t23 = !message.mine && /*#__PURE__*/_jsxs(View, {
255
282
  children: [renderAuthor ? /*#__PURE__*/_jsx(Avatar, {
256
283
  size: "md",
257
284
  sourceUri: author.avatar,
@@ -268,38 +295,38 @@ export const Message = memo(function MessageRow(t0) {
268
295
  })]
269
296
  });
270
297
  const T2 = View;
271
- let t21;
272
- if ($[16] !== messageBottomMargin) {
273
- t21 = {
298
+ let t24;
299
+ if ($[22] !== messageBottomMargin) {
300
+ t24 = {
274
301
  marginBottom: messageBottomMargin
275
302
  };
276
- $[16] = messageBottomMargin;
277
- $[17] = t21;
303
+ $[22] = messageBottomMargin;
304
+ $[23] = t24;
278
305
  } else {
279
- t21 = $[17];
306
+ t24 = $[23];
280
307
  }
281
- let t22;
282
- if ($[18] !== styles.messageContent || $[19] !== t21) {
283
- t22 = [styles.messageContent, t21];
284
- $[18] = styles.messageContent;
285
- $[19] = t21;
286
- $[20] = t22;
308
+ let t25;
309
+ if ($[24] !== styles.messageContent || $[25] !== t24) {
310
+ t25 = [styles.messageContent, t24];
311
+ $[24] = styles.messageContent;
312
+ $[25] = t24;
313
+ $[26] = t25;
287
314
  } else {
288
- t22 = $[20];
315
+ t25 = $[26];
289
316
  }
290
- const t23 = renderAuthor && !isDeletedReplyRootMessage && /*#__PURE__*/_jsx(Text, {
317
+ const t26 = renderAuthor && !isDeletedReplyRootMessage && /*#__PURE__*/_jsx(Text, {
291
318
  variant: "footnote",
292
319
  style: styles.authorName,
293
320
  children: author.name
294
321
  });
295
- let t24;
296
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
297
- t24 = e => setMessageBubbleHeight(e.nativeEvent.layout.height);
298
- $[21] = t24;
322
+ let t27;
323
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
324
+ t27 = e => setMessageBubbleHeight(e.nativeEvent.layout.height);
325
+ $[27] = t27;
299
326
  } else {
300
- t24 = $[21];
327
+ t27 = $[27];
301
328
  }
302
- const t25 = isDeletedReplyRootMessage ? /*#__PURE__*/_jsx(View, {
329
+ const t28 = isDeletedReplyRootMessage ? /*#__PURE__*/_jsx(View, {
303
330
  style: styles.messageText,
304
331
  children: /*#__PURE__*/_jsx(Text, {
305
332
  style: styles.replyRootDeletedText,
@@ -320,20 +347,20 @@ export const Message = memo(function MessageRow(t0) {
320
347
  })
321
348
  })]
322
349
  });
323
- let t26;
324
- if ($[22] !== styles.messageBubble || $[23] !== t25) {
325
- t26 = /*#__PURE__*/_jsx(View, {
350
+ let t29;
351
+ if ($[28] !== styles.messageBubble || $[29] !== t28) {
352
+ t29 = /*#__PURE__*/_jsx(View, {
326
353
  style: styles.messageBubble,
327
- onLayout: t24,
328
- children: t25
354
+ onLayout: t27,
355
+ children: t28
329
356
  });
330
- $[22] = styles.messageBubble;
331
- $[23] = t25;
332
- $[24] = t26;
357
+ $[28] = styles.messageBubble;
358
+ $[29] = t28;
359
+ $[30] = t29;
333
360
  } else {
334
- t26 = $[24];
361
+ t29 = $[30];
335
362
  }
336
- const t27 = showReplyCountButton && /*#__PURE__*/_jsx(TextButton, {
363
+ const t30 = showReplyCountButton && /*#__PURE__*/_jsx(TextButton, {
337
364
  variant: "footnote",
338
365
  onPress: handleNavigateToReplyPress,
339
366
  style: styles.messageReplyCount,
@@ -341,7 +368,7 @@ export const Message = memo(function MessageRow(t0) {
341
368
  accessibilityRole: "link",
342
369
  children: replyCountText
343
370
  });
344
- const t28 = hasReactions && !isDeletedReplyRootMessage && /*#__PURE__*/_jsx(View, {
371
+ const t31 = hasReactions && !isDeletedReplyRootMessage && /*#__PURE__*/_jsx(View, {
345
372
  style: styles.messageReactions,
346
373
  children: reactionCounts.map(reaction_0 => /*#__PURE__*/_jsx(MessageReaction, {
347
374
  reaction: reaction_0,
@@ -351,9 +378,9 @@ export const Message = memo(function MessageRow(t0) {
351
378
  disabled: conversationDisabled
352
379
  }, reaction_0.value))
353
380
  });
354
- let t29;
355
- if ($[25] !== colors.iconColorDefaultSecondary || $[26] !== error || $[27] !== handleRetry || $[28] !== isDeletedReplyRootMessage || $[29] !== isPersisted || $[30] !== messagePendingLabel || $[31] !== pending || $[32] !== readByOthers || $[33] !== retryFailedSaveMutation || $[34] !== showMessageMeta || $[35] !== showReadReceipts || $[36] !== styles.editedText || $[37] !== styles.errorContainer || $[38] !== styles.errorIcon || $[39] !== styles.errorText || $[40] !== styles.messageMeta || $[41] !== styles.pendingIndicatorContainer || $[42] !== temporarilyHidePendingState || $[43] !== timestamp || $[44] !== wasEdited) {
356
- t29 = showMessageMeta && !isDeletedReplyRootMessage && /*#__PURE__*/_jsxs(View, {
381
+ let t32;
382
+ if ($[31] !== colors.iconColorDefaultSecondary || $[32] !== error || $[33] !== handleRetry || $[34] !== isDeletedReplyRootMessage || $[35] !== isPersisted || $[36] !== messagePendingLabel || $[37] !== pending || $[38] !== readByOthers || $[39] !== retryFailedSaveMutation || $[40] !== showMessageMeta || $[41] !== showReadReceipts || $[42] !== styles.editedText || $[43] !== styles.errorContainer || $[44] !== styles.errorIcon || $[45] !== styles.errorText || $[46] !== styles.messageMeta || $[47] !== styles.pendingIndicatorContainer || $[48] !== temporarilyHidePendingState || $[49] !== timestamp || $[50] !== wasEdited) {
383
+ t32 = showMessageMeta && !isDeletedReplyRootMessage && /*#__PURE__*/_jsxs(View, {
357
384
  style: styles.messageMeta,
358
385
  children: [showReadReceipts && /*#__PURE__*/_jsx(MessageReadReceipts, {
359
386
  read: readByOthers
@@ -398,109 +425,111 @@ export const Message = memo(function MessageRow(t0) {
398
425
  })]
399
426
  })]
400
427
  });
401
- $[25] = colors.iconColorDefaultSecondary;
402
- $[26] = error;
403
- $[27] = handleRetry;
404
- $[28] = isDeletedReplyRootMessage;
405
- $[29] = isPersisted;
406
- $[30] = messagePendingLabel;
407
- $[31] = pending;
408
- $[32] = readByOthers;
409
- $[33] = retryFailedSaveMutation;
410
- $[34] = showMessageMeta;
411
- $[35] = showReadReceipts;
412
- $[36] = styles.editedText;
413
- $[37] = styles.errorContainer;
414
- $[38] = styles.errorIcon;
415
- $[39] = styles.errorText;
416
- $[40] = styles.messageMeta;
417
- $[41] = styles.pendingIndicatorContainer;
418
- $[42] = temporarilyHidePendingState;
419
- $[43] = timestamp;
420
- $[44] = wasEdited;
421
- $[45] = t29;
428
+ $[31] = colors.iconColorDefaultSecondary;
429
+ $[32] = error;
430
+ $[33] = handleRetry;
431
+ $[34] = isDeletedReplyRootMessage;
432
+ $[35] = isPersisted;
433
+ $[36] = messagePendingLabel;
434
+ $[37] = pending;
435
+ $[38] = readByOthers;
436
+ $[39] = retryFailedSaveMutation;
437
+ $[40] = showMessageMeta;
438
+ $[41] = showReadReceipts;
439
+ $[42] = styles.editedText;
440
+ $[43] = styles.errorContainer;
441
+ $[44] = styles.errorIcon;
442
+ $[45] = styles.errorText;
443
+ $[46] = styles.messageMeta;
444
+ $[47] = styles.pendingIndicatorContainer;
445
+ $[48] = temporarilyHidePendingState;
446
+ $[49] = timestamp;
447
+ $[50] = wasEdited;
448
+ $[51] = t32;
422
449
  } else {
423
- t29 = $[45];
450
+ t32 = $[51];
424
451
  }
425
- let t30;
426
- if ($[46] !== T2 || $[47] !== t22 || $[48] !== t23 || $[49] !== t26 || $[50] !== t27 || $[51] !== t28 || $[52] !== t29) {
427
- t30 = /*#__PURE__*/_jsxs(T2, {
428
- style: t22,
429
- children: [t23, t26, t27, t28, t29]
452
+ let t33;
453
+ if ($[52] !== T2 || $[53] !== t25 || $[54] !== t26 || $[55] !== t29 || $[56] !== t30 || $[57] !== t31 || $[58] !== t32) {
454
+ t33 = /*#__PURE__*/_jsxs(T2, {
455
+ style: t25,
456
+ children: [t26, t29, t30, t31, t32]
430
457
  });
431
- $[46] = T2;
432
- $[47] = t22;
433
- $[48] = t23;
434
- $[49] = t26;
435
- $[50] = t27;
436
- $[51] = t28;
437
- $[52] = t29;
438
- $[53] = t30;
458
+ $[52] = T2;
459
+ $[53] = t25;
460
+ $[54] = t26;
461
+ $[55] = t29;
462
+ $[56] = t30;
463
+ $[57] = t31;
464
+ $[58] = t32;
465
+ $[59] = t33;
439
466
  } else {
440
- t30 = $[53];
467
+ t33 = $[59];
441
468
  }
442
- let t31;
443
- if ($[54] !== message || $[55] !== messageBubbleHeight) {
444
- t31 = message.mine && /*#__PURE__*/_jsx(MyReplyConnector, {
469
+ let t34;
470
+ if ($[60] !== message || $[61] !== messageBubbleHeight) {
471
+ t34 = message.mine && /*#__PURE__*/_jsx(MyReplyConnector, {
445
472
  message: message,
446
473
  messageBubbleHeight: messageBubbleHeight
447
474
  });
448
- $[54] = message;
449
- $[55] = messageBubbleHeight;
450
- $[56] = t31;
475
+ $[60] = message;
476
+ $[61] = messageBubbleHeight;
477
+ $[62] = t34;
451
478
  } else {
452
- t31 = $[56];
479
+ t34 = $[62];
453
480
  }
454
- let t32;
455
- if ($[57] !== T1 || $[58] !== styles.message || $[59] !== t19 || $[60] !== t20 || $[61] !== t30 || $[62] !== t31) {
456
- t32 = /*#__PURE__*/_jsxs(T1, {
457
- style: styles.message,
458
- children: [t19, t20, t30, t31]
481
+ let t35;
482
+ if ($[63] !== T1 || $[64] !== t22 || $[65] !== t23 || $[66] !== t33 || $[67] !== t34) {
483
+ t35 = /*#__PURE__*/_jsxs(T1, {
484
+ style: t22,
485
+ children: [t23, t33, t34]
459
486
  });
460
- $[57] = T1;
461
- $[58] = styles.message;
462
- $[59] = t19;
463
- $[60] = t20;
464
- $[61] = t30;
465
- $[62] = t31;
466
- $[63] = t32;
487
+ $[63] = T1;
488
+ $[64] = t22;
489
+ $[65] = t23;
490
+ $[66] = t33;
491
+ $[67] = t34;
492
+ $[68] = t35;
467
493
  } else {
468
- t32 = $[63];
494
+ t35 = $[68];
469
495
  }
470
- let t33;
471
- if ($[64] !== T0 || $[65] !== accessibilityLabel || $[66] !== t10 || $[67] !== t11 || $[68] !== t14 || $[69] !== t15 || $[70] !== t16 || $[71] !== t32 || $[72] !== t6 || $[73] !== t7 || $[74] !== t8 || $[75] !== t9) {
472
- t33 = /*#__PURE__*/_jsx(T0, {
496
+ let t36;
497
+ if ($[69] !== T0 || $[70] !== accessibilityLabel || $[71] !== t10 || $[72] !== t11 || $[73] !== t12 || $[74] !== t13 || $[75] !== t16 || $[76] !== t17 || $[77] !== t18 || $[78] !== t19 || $[79] !== t35 || $[80] !== t6 || $[81] !== t8 || $[82] !== t9) {
498
+ t36 = /*#__PURE__*/_jsxs(T0, {
473
499
  testID: t6,
474
- onLongPress: t7,
475
- onPress: t8,
476
- onPressIn: t9,
477
- onPressOut: t10,
478
- android_ripple: t11,
479
- accessibilityRole: t12,
500
+ style: t8,
501
+ onLongPress: t9,
502
+ onPress: t10,
503
+ onPressIn: t11,
504
+ onPressOut: t12,
505
+ android_ripple: t13,
506
+ accessibilityRole: t14,
480
507
  accessibilityLabel: accessibilityLabel,
481
- accessibilityHint: t13,
482
- accessibilityActions: t14,
483
- onAccessibilityAction: t15,
484
- disabled: t16,
485
- children: t32
508
+ accessibilityHint: t15,
509
+ accessibilityActions: t16,
510
+ onAccessibilityAction: t17,
511
+ disabled: t18,
512
+ children: [t19, t35]
486
513
  });
487
- $[64] = T0;
488
- $[65] = accessibilityLabel;
489
- $[66] = t10;
490
- $[67] = t11;
491
- $[68] = t14;
492
- $[69] = t15;
493
- $[70] = t16;
494
- $[71] = t32;
495
- $[72] = t6;
496
- $[73] = t7;
497
- $[74] = t8;
498
- $[75] = t9;
499
- $[76] = t33;
514
+ $[69] = T0;
515
+ $[70] = accessibilityLabel;
516
+ $[71] = t10;
517
+ $[72] = t11;
518
+ $[73] = t12;
519
+ $[74] = t13;
520
+ $[75] = t16;
521
+ $[76] = t17;
522
+ $[77] = t18;
523
+ $[78] = t19;
524
+ $[79] = t35;
525
+ $[80] = t6;
526
+ $[81] = t8;
527
+ $[82] = t9;
528
+ $[83] = t36;
500
529
  } else {
501
- t33 = $[76];
530
+ t36 = $[83];
502
531
  }
503
- return t33;
532
+ return t36;
504
533
  });
505
534
  const useMessageStyles = (mine, isDeleting) => {
506
535
  const $ = _c(8);
@@ -516,18 +545,16 @@ const useMessageStyles = (mine, isDeleting) => {
516
545
  let t0;
517
546
  if ($[0] !== colors.statusErrorIcon || $[1] !== colors.statusErrorText || $[2] !== colors.textColorDefaultSecondary || $[3] !== isDeleting || $[4] !== messageBubbleBackgroundColor || $[5] !== mine || $[6] !== tabletWidth) {
518
547
  t0 = StyleSheet.create({
548
+ pressable: {
549
+ marginTop: -MESSAGE_BACKGROUND_OUTSET,
550
+ paddingTop: MESSAGE_BACKGROUND_OUTSET
551
+ },
519
552
  message: {
520
553
  gap: 8,
521
554
  flexDirection: mine ? "row-reverse" : "row",
522
555
  paddingHorizontal: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,
523
556
  opacity: isDeleting ? 0.5 : 1
524
557
  },
525
- background: {
526
- position: "absolute",
527
- left: 0,
528
- right: 0,
529
- top: -MESSAGE_BACKGROUND_OUTSET
530
- },
531
558
  messageContent: {
532
559
  flex: 1,
533
560
  gap: 4