@planningcenter/chat-react-native 3.16.0-rc.3 → 3.16.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/build/components/conversation/message.d.ts +2 -1
  2. package/build/components/conversation/message.d.ts.map +1 -1
  3. package/build/components/conversation/message.js +18 -2
  4. package/build/components/conversation/message.js.map +1 -1
  5. package/build/components/conversation/message_form.d.ts +2 -1
  6. package/build/components/conversation/message_form.d.ts.map +1 -1
  7. package/build/components/conversation/message_form.js +38 -16
  8. package/build/components/conversation/message_form.js.map +1 -1
  9. package/build/components/conversation/reply_connectors.js +1 -1
  10. package/build/components/conversation/reply_connectors.js.map +1 -1
  11. package/build/components/conversation/shadow_message.d.ts +2 -1
  12. package/build/components/conversation/shadow_message.d.ts.map +1 -1
  13. package/build/components/conversation/shadow_message.js +10 -5
  14. package/build/components/conversation/shadow_message.js.map +1 -1
  15. package/build/components/display/icon.d.ts +3 -1
  16. package/build/components/display/icon.d.ts.map +1 -1
  17. package/build/components/display/icon.js +2 -0
  18. package/build/components/display/icon.js.map +1 -1
  19. package/build/hooks/use_conversation_messages.d.ts +6 -3
  20. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  21. package/build/hooks/use_conversation_messages.js +32 -25
  22. package/build/hooks/use_conversation_messages.js.map +1 -1
  23. package/build/hooks/use_message_create_or_update.d.ts +2 -1
  24. package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
  25. package/build/hooks/use_message_create_or_update.js +6 -2
  26. package/build/hooks/use_message_create_or_update.js.map +1 -1
  27. package/build/hooks/use_suspense_api.d.ts +3 -1
  28. package/build/hooks/use_suspense_api.d.ts.map +1 -1
  29. package/build/hooks/use_suspense_api.js +1 -0
  30. package/build/hooks/use_suspense_api.js.map +1 -1
  31. package/build/navigation/index.d.ts +6 -0
  32. package/build/navigation/index.d.ts.map +1 -1
  33. package/build/navigation/index.js +6 -0
  34. package/build/navigation/index.js.map +1 -1
  35. package/build/screens/conversation_screen.d.ts +2 -1
  36. package/build/screens/conversation_screen.d.ts.map +1 -1
  37. package/build/screens/conversation_screen.js +7 -5
  38. package/build/screens/conversation_screen.js.map +1 -1
  39. package/build/screens/message_actions_screen.d.ts +1 -0
  40. package/build/screens/message_actions_screen.d.ts.map +1 -1
  41. package/build/screens/message_actions_screen.js +16 -3
  42. package/build/screens/message_actions_screen.js.map +1 -1
  43. package/build/types/jolt_events/message_events.d.ts +2 -0
  44. package/build/types/jolt_events/message_events.d.ts.map +1 -1
  45. package/build/types/jolt_events/message_events.js.map +1 -1
  46. package/build/types/resources/message.d.ts +2 -0
  47. package/build/types/resources/message.d.ts.map +1 -1
  48. package/build/types/resources/message.js.map +1 -1
  49. package/build/utils/cache/optimistically_create_message.d.ts.map +1 -1
  50. package/build/utils/cache/optimistically_create_message.js +2 -0
  51. package/build/utils/cache/optimistically_create_message.js.map +1 -1
  52. package/build/utils/index.d.ts +1 -0
  53. package/build/utils/index.d.ts.map +1 -1
  54. package/build/utils/index.js +1 -0
  55. package/build/utils/index.js.map +1 -1
  56. package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts.map +1 -1
  57. package/build/utils/jolt/transform_message_event_data_to_message_resource.js +2 -0
  58. package/build/utils/jolt/transform_message_event_data_to_message_resource.js.map +1 -1
  59. package/build/utils/replies_local_feature_flag.d.ts +2 -0
  60. package/build/utils/replies_local_feature_flag.d.ts.map +1 -0
  61. package/build/utils/replies_local_feature_flag.js +3 -0
  62. package/build/utils/replies_local_feature_flag.js.map +1 -0
  63. package/package.json +2 -2
  64. package/src/components/conversation/message.tsx +29 -1
  65. package/src/components/conversation/message_form.tsx +85 -15
  66. package/src/components/conversation/reply_connectors.tsx +1 -1
  67. package/src/components/conversation/shadow_message.tsx +15 -7
  68. package/src/components/display/icon.tsx +3 -0
  69. package/src/hooks/use_conversation_messages.ts +45 -25
  70. package/src/hooks/use_message_create_or_update.ts +7 -2
  71. package/src/hooks/use_suspense_api.ts +3 -0
  72. package/src/navigation/index.tsx +6 -0
  73. package/src/screens/conversation_screen.tsx +9 -4
  74. package/src/screens/message_actions_screen.tsx +27 -1
  75. package/src/types/jolt_events/message_events.ts +2 -0
  76. package/src/types/resources/message.ts +2 -0
  77. package/src/utils/cache/optimistically_create_message.ts +2 -0
  78. package/src/utils/index.ts +1 -0
  79. package/src/utils/jolt/transform_message_event_data_to_message_resource.ts +2 -0
  80. package/src/utils/replies_local_feature_flag.ts +2 -0
@@ -16,6 +16,8 @@ interface BaseMessageEventData extends Record<string, unknown> {
16
16
  html: string
17
17
  attachments: DenormalizedAttachmentResource[]
18
18
  idempotent_key?: string | null
19
+ reply_count: number
20
+ reply_root_id: string | null
19
21
  }
20
22
  }
21
23
 
@@ -15,6 +15,8 @@ export interface MessageResource {
15
15
  attachments: DenormalizedAttachmentResource[]
16
16
  author: PersonResource
17
17
  reactionCounts: ReactionCountResource[]
18
+ replyCount: number
19
+ replyRootId?: string | null
18
20
 
19
21
  // Custom Local Properties we set for rendering
20
22
  renderAuthor?: boolean
@@ -48,6 +48,8 @@ export function optimisticallyCreateMessage({
48
48
  myLatestInConversation: true,
49
49
  lastInGroup: true,
50
50
  pending: true,
51
+ replyCount: 0,
52
+ replyRootId: null,
51
53
  }
52
54
 
53
55
  // Add the optimistic message to the cache
@@ -9,3 +9,4 @@ export * from './pluralize'
9
9
  export * from './destructure_chat_group_graph_id'
10
10
  export * from './convert_attachments_for_create'
11
11
  export * from './assert_keys_are_numbers'
12
+ export * from './replies_local_feature_flag'
@@ -27,5 +27,7 @@ export function transformMessageEventDataToMessageResource({
27
27
  avatar: data.author_avatar,
28
28
  },
29
29
  reactionCounts: [],
30
+ replyCount: data.reply_count || 0,
31
+ replyRootId: data.reply_root_id || null,
30
32
  }
31
33
  }
@@ -0,0 +1,2 @@
1
+ // TODO: Replace this whole file with the flipper flag
2
+ export const REPLIES_FEATURE_ENABLED = false