@planningcenter/chat-react-native 3.5.0-rc.1 → 3.5.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.
Files changed (217) hide show
  1. package/build/components/conversation/attachments/audio_attachment.d.ts +2 -2
  2. package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
  3. package/build/components/conversation/attachments/audio_attachment.js +2 -2
  4. package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
  5. package/build/components/conversation/attachments/expanded_link.d.ts +2 -2
  6. package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
  7. package/build/components/conversation/attachments/expanded_link.js +2 -2
  8. package/build/components/conversation/attachments/expanded_link.js.map +1 -1
  9. package/build/components/conversation/attachments/generic_file_attachment.d.ts +2 -2
  10. package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
  11. package/build/components/conversation/attachments/generic_file_attachment.js +2 -2
  12. package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
  13. package/build/components/conversation/attachments/giphy_attachment.d.ts +2 -2
  14. package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
  15. package/build/components/conversation/attachments/giphy_attachment.js +18 -5
  16. package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
  17. package/build/components/conversation/attachments/image_attachment.d.ts +2 -2
  18. package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
  19. package/build/components/conversation/attachments/image_attachment.js +3 -3
  20. package/build/components/conversation/attachments/image_attachment.js.map +1 -1
  21. package/build/components/conversation/attachments/video_attachment.d.ts +2 -2
  22. package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
  23. package/build/components/conversation/attachments/video_attachment.js +2 -2
  24. package/build/components/conversation/attachments/video_attachment.js.map +1 -1
  25. package/build/components/conversation/empty_conversation_blank_state.js +1 -1
  26. package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
  27. package/build/components/conversation/message.d.ts +5 -2
  28. package/build/components/conversation/message.d.ts.map +1 -1
  29. package/build/components/conversation/message.js +11 -9
  30. package/build/components/conversation/message.js.map +1 -1
  31. package/build/components/conversation/message_attachments.d.ts +3 -2
  32. package/build/components/conversation/message_attachments.d.ts.map +1 -1
  33. package/build/components/conversation/message_attachments.js +9 -9
  34. package/build/components/conversation/message_attachments.js.map +1 -1
  35. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  36. package/build/components/conversations/conversation_actions.js +1 -1
  37. package/build/components/conversations/conversation_actions.js.map +1 -1
  38. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  39. package/build/components/conversations/conversation_preview.js +13 -3
  40. package/build/components/conversations/conversation_preview.js.map +1 -1
  41. package/build/components/conversations/conversations.js +3 -3
  42. package/build/components/conversations/conversations.js.map +1 -1
  43. package/build/components/display/action_button.d.ts +4 -1
  44. package/build/components/display/action_button.d.ts.map +1 -1
  45. package/build/components/display/action_button.js +20 -5
  46. package/build/components/display/action_button.js.map +1 -1
  47. package/build/components/display/avatar.d.ts +4 -1
  48. package/build/components/display/avatar.d.ts.map +1 -1
  49. package/build/components/display/avatar.js +3 -2
  50. package/build/components/display/avatar.js.map +1 -1
  51. package/build/components/display/avatar_group.d.ts +4 -1
  52. package/build/components/display/avatar_group.d.ts.map +1 -1
  53. package/build/components/display/avatar_group.js +6 -3
  54. package/build/components/display/avatar_group.js.map +1 -1
  55. package/build/components/display/blank_state.d.ts +7 -2
  56. package/build/components/display/blank_state.d.ts.map +1 -1
  57. package/build/components/display/blank_state.js +6 -5
  58. package/build/components/display/blank_state.js.map +1 -1
  59. package/build/components/display/child_notice.d.ts +2 -1
  60. package/build/components/display/child_notice.d.ts.map +1 -1
  61. package/build/components/display/child_notice.js +4 -4
  62. package/build/components/display/child_notice.js.map +1 -1
  63. package/build/components/display/heading.d.ts +2 -3
  64. package/build/components/display/heading.d.ts.map +1 -1
  65. package/build/components/display/heading.js.map +1 -1
  66. package/build/components/display/icon.d.ts +2 -1
  67. package/build/components/display/icon.d.ts.map +1 -1
  68. package/build/components/display/icon.js +3 -0
  69. package/build/components/display/icon.js.map +1 -1
  70. package/build/components/display/icon_button.d.ts +4 -0
  71. package/build/components/display/icon_button.d.ts.map +1 -1
  72. package/build/components/display/icon_button.js +32 -0
  73. package/build/components/display/icon_button.js.map +1 -1
  74. package/build/components/display/image_attachment_preview.d.ts +14 -0
  75. package/build/components/display/image_attachment_preview.d.ts.map +1 -0
  76. package/build/components/display/image_attachment_preview.js +42 -0
  77. package/build/components/display/image_attachment_preview.js.map +1 -0
  78. package/build/components/display/index.d.ts +2 -0
  79. package/build/components/display/index.d.ts.map +1 -1
  80. package/build/components/display/index.js +2 -0
  81. package/build/components/display/index.js.map +1 -1
  82. package/build/components/display/keyboard_view.d.ts +2 -1
  83. package/build/components/display/keyboard_view.d.ts.map +1 -1
  84. package/build/components/display/keyboard_view.js +13 -11
  85. package/build/components/display/keyboard_view.js.map +1 -1
  86. package/build/components/display/person.d.ts.map +1 -1
  87. package/build/components/display/person.js +4 -1
  88. package/build/components/display/person.js.map +1 -1
  89. package/build/components/display/platform_modal_header_buttons.d.ts +15 -0
  90. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -0
  91. package/build/components/display/platform_modal_header_buttons.js +43 -0
  92. package/build/components/display/platform_modal_header_buttons.js.map +1 -0
  93. package/build/components/display/video_attachment_preview.d.ts +8 -0
  94. package/build/components/display/video_attachment_preview.d.ts.map +1 -0
  95. package/build/components/display/video_attachment_preview.js +71 -0
  96. package/build/components/display/video_attachment_preview.js.map +1 -0
  97. package/build/components/group_conversation_list.d.ts +1 -1
  98. package/build/components/group_conversation_list.d.ts.map +1 -1
  99. package/build/components/group_conversation_list.js +8 -6
  100. package/build/components/group_conversation_list.js.map +1 -1
  101. package/build/components/page/error_boundary.d.ts.map +1 -1
  102. package/build/components/page/error_boundary.js +4 -1
  103. package/build/components/page/error_boundary.js.map +1 -1
  104. package/build/components/primitive/avatar_primitive.d.ts +6 -1
  105. package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
  106. package/build/components/primitive/avatar_primitive.js +24 -3
  107. package/build/components/primitive/avatar_primitive.js.map +1 -1
  108. package/build/contexts/chat_context.d.ts +1 -0
  109. package/build/contexts/chat_context.d.ts.map +1 -1
  110. package/build/contexts/chat_context.js +5 -3
  111. package/build/contexts/chat_context.js.map +1 -1
  112. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +14 -196
  113. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
  114. package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
  115. package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
  116. package/build/hooks/use_conversation.d.ts.map +1 -1
  117. package/build/hooks/use_conversation.js +7 -1
  118. package/build/hooks/use_conversation.js.map +1 -1
  119. package/build/hooks/use_giphy.js.map +1 -1
  120. package/build/hooks/use_report_bug_action.d.ts +5 -0
  121. package/build/hooks/use_report_bug_action.d.ts.map +1 -0
  122. package/build/hooks/use_report_bug_action.js +30 -0
  123. package/build/hooks/use_report_bug_action.js.map +1 -0
  124. package/build/navigation/index.d.ts +5 -0
  125. package/build/navigation/index.d.ts.map +1 -1
  126. package/build/navigation/index.js +5 -0
  127. package/build/navigation/index.js.map +1 -1
  128. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +6 -2
  129. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  130. package/build/screens/attachment_actions/attachment_actions_screen.js +16 -16
  131. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  132. package/build/screens/attachment_actions/hooks/useDeleteAttachment.d.ts +10 -0
  133. package/build/screens/attachment_actions/hooks/useDeleteAttachment.d.ts.map +1 -0
  134. package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +29 -0
  135. package/build/screens/attachment_actions/hooks/useDeleteAttachment.js.map +1 -0
  136. package/build/screens/bug_report_screen.d.ts +5 -0
  137. package/build/screens/bug_report_screen.d.ts.map +1 -0
  138. package/build/screens/bug_report_screen.js +237 -0
  139. package/build/screens/bug_report_screen.js.map +1 -0
  140. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  141. package/build/screens/conversation_details_screen.js +29 -10
  142. package/build/screens/conversation_details_screen.js.map +1 -1
  143. package/build/screens/conversation_new/components/form_list.d.ts +3 -1
  144. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  145. package/build/screens/conversation_new/components/form_list.js +6 -2
  146. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  147. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  148. package/build/screens/conversation_new/components/groups_form.js +3 -6
  149. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  150. package/build/screens/conversation_new/components/services_form.js +1 -1
  151. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  152. package/build/screens/conversation_screen.d.ts.map +1 -1
  153. package/build/screens/conversation_screen.js +3 -5
  154. package/build/screens/conversation_screen.js.map +1 -1
  155. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  156. package/build/screens/conversations/conversations_screen.js +7 -2
  157. package/build/screens/conversations/conversations_screen.js.map +1 -1
  158. package/build/screens/design_system_screen.d.ts.map +1 -1
  159. package/build/screens/design_system_screen.js +29 -4
  160. package/build/screens/design_system_screen.js.map +1 -1
  161. package/build/types/resources/denormalized_attachment_resource.d.ts +2 -2
  162. package/build/types/resources/denormalized_attachment_resource.js.map +1 -1
  163. package/build/types/resources/member_ability.d.ts +1 -0
  164. package/build/types/resources/member_ability.d.ts.map +1 -1
  165. package/build/types/resources/member_ability.js.map +1 -1
  166. package/build/utils/request/conversation.d.ts +2 -1
  167. package/build/utils/request/conversation.d.ts.map +1 -1
  168. package/build/utils/request/conversation.js.map +1 -1
  169. package/package.json +2 -2
  170. package/src/components/conversation/attachments/audio_attachment.tsx +3 -3
  171. package/src/components/conversation/attachments/expanded_link.tsx +3 -8
  172. package/src/components/conversation/attachments/generic_file_attachment.tsx +3 -3
  173. package/src/components/conversation/attachments/giphy_attachment.tsx +23 -8
  174. package/src/components/conversation/attachments/image_attachment.tsx +4 -4
  175. package/src/components/conversation/attachments/video_attachment.tsx +3 -3
  176. package/src/components/conversation/empty_conversation_blank_state.tsx +1 -1
  177. package/src/components/conversation/message.tsx +20 -8
  178. package/src/components/conversation/message_attachments.tsx +18 -11
  179. package/src/components/conversations/conversation_actions.tsx +1 -0
  180. package/src/components/conversations/conversation_preview.tsx +24 -3
  181. package/src/components/conversations/conversations.tsx +3 -3
  182. package/src/components/display/action_button.tsx +32 -4
  183. package/src/components/display/avatar.tsx +17 -2
  184. package/src/components/display/avatar_group.tsx +19 -3
  185. package/src/components/display/blank_state.tsx +21 -8
  186. package/src/components/display/child_notice.tsx +7 -4
  187. package/src/components/display/heading.tsx +2 -2
  188. package/src/components/display/icon.tsx +4 -1
  189. package/src/components/display/icon_button.tsx +32 -0
  190. package/src/components/display/image_attachment_preview.tsx +74 -0
  191. package/src/components/display/index.ts +2 -0
  192. package/src/components/display/keyboard_view.tsx +16 -17
  193. package/src/components/display/person.tsx +4 -1
  194. package/src/components/display/platform_modal_header_buttons.tsx +83 -0
  195. package/src/components/display/video_attachment_preview.tsx +105 -0
  196. package/src/components/group_conversation_list.tsx +14 -7
  197. package/src/components/page/error_boundary.tsx +4 -1
  198. package/src/components/primitive/avatar_primitive.tsx +42 -4
  199. package/src/contexts/chat_context.tsx +6 -3
  200. package/src/hooks/groups/use_group_members_for_new_conversation.ts +6 -4
  201. package/src/hooks/use_conversation.ts +7 -1
  202. package/src/hooks/use_giphy.ts +2 -2
  203. package/src/hooks/use_report_bug_action.ts +37 -0
  204. package/src/navigation/index.tsx +5 -0
  205. package/src/screens/attachment_actions/attachment_actions_screen.tsx +35 -16
  206. package/src/screens/attachment_actions/hooks/useDeleteAttachment.tsx +46 -0
  207. package/src/screens/bug_report_screen.tsx +334 -0
  208. package/src/screens/conversation_details_screen.tsx +41 -7
  209. package/src/screens/conversation_new/components/form_list.tsx +17 -1
  210. package/src/screens/conversation_new/components/groups_form.tsx +6 -5
  211. package/src/screens/conversation_new/components/services_form.tsx +3 -1
  212. package/src/screens/conversation_screen.tsx +9 -5
  213. package/src/screens/conversations/conversations_screen.tsx +11 -1
  214. package/src/screens/design_system_screen.tsx +68 -3
  215. package/src/types/resources/denormalized_attachment_resource.ts +2 -2
  216. package/src/types/resources/member_ability.ts +1 -0
  217. package/src/utils/request/conversation.ts +2 -1
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { DenormalizedAttachmentResource } from '../../types/resources/denormalized_attachment_resource';
2
+ import { DenormalizedAttachmentResource, DenormalizedMessageAttachmentResource } from '../../types/resources/denormalized_attachment_resource';
3
3
  import { type MetaProps } from './attachments/image_attachment';
4
4
  export declare function MessageAttachments(props: {
5
5
  attachments: DenormalizedAttachmentResource[];
6
6
  metaProps: MetaProps;
7
- onAttachmentLongPress: (attachment: DenormalizedAttachmentResource) => void;
7
+ onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void;
8
+ onMessageLongPress: () => void;
8
9
  }): React.JSX.Element | null;
9
10
  //# sourceMappingURL=message_attachments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message_attachments.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EACL,8BAA8B,EAE/B,MAAM,wDAAwD,CAAA;AAM/D,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAEhF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,WAAW,EAAE,8BAA8B,EAAE,CAAA;IAC7C,SAAS,EAAE,SAAS,CAAA;IACpB,qBAAqB,EAAE,CAAC,UAAU,EAAE,8BAA8B,KAAK,IAAI,CAAA;CAC5E,4BAuCA"}
1
+ {"version":3,"file":"message_attachments.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EACL,8BAA8B,EAC9B,qCAAqC,EACtC,MAAM,wDAAwD,CAAA;AAM/D,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAEhF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,WAAW,EAAE,8BAA8B,EAAE,CAAA;IAC7C,SAAS,EAAE,SAAS,CAAA;IACpB,4BAA4B,EAAE,CAAC,UAAU,EAAE,qCAAqC,KAAK,IAAI,CAAA;IACzF,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,4BAuCA"}
@@ -8,37 +8,37 @@ import { ExpandedLink } from './attachments/expanded_link';
8
8
  import { ImageAttachment } from './attachments/image_attachment';
9
9
  export function MessageAttachments(props) {
10
10
  const styles = useStyles();
11
- const { attachments, metaProps, onAttachmentLongPress } = props;
11
+ const { attachments, metaProps, onMessageAttachmentLongPress, onMessageLongPress } = props;
12
12
  if (!attachments || attachments.length === 0)
13
13
  return null;
14
14
  return (<View style={styles.attachmentsContainer}>
15
15
  {attachments.map(attachment => {
16
16
  switch (attachment.type) {
17
17
  case 'MessageAttachment':
18
- return (<MessageAttachment key={attachment.id} attachment={attachment} metaProps={metaProps} onAttachmentLongPress={onAttachmentLongPress}/>);
18
+ return (<MessageAttachment key={attachment.id} attachment={attachment} metaProps={metaProps} onMessageAttachmentLongPress={onMessageAttachmentLongPress}/>);
19
19
  case 'giphy':
20
- return (<GiphyAttachment key={attachment.id || attachment.titleLink} attachment={attachment} onAttachmentLongPress={onAttachmentLongPress}/>);
20
+ return (<GiphyAttachment key={attachment.id || attachment.titleLink} attachment={attachment} onMessageLongPress={onMessageLongPress}/>);
21
21
  case 'ExpandedLink':
22
- return (<ExpandedLink key={attachment.id} attachment={attachment} onAttachmentLongPress={onAttachmentLongPress}/>);
22
+ return (<ExpandedLink key={attachment.id} attachment={attachment} onMessageLongPress={onMessageLongPress}/>);
23
23
  default:
24
24
  return null;
25
25
  }
26
26
  })}
27
27
  </View>);
28
28
  }
29
- function MessageAttachment({ attachment, metaProps, onAttachmentLongPress, }) {
29
+ function MessageAttachment({ attachment, metaProps, onMessageAttachmentLongPress, }) {
30
30
  const { attributes } = attachment;
31
31
  const contentType = attributes?.contentType;
32
32
  const basicType = contentType ? contentType.split('/')[0] : '';
33
33
  switch (basicType) {
34
34
  case 'image':
35
- return (<ImageAttachment attachment={attachment} metaProps={metaProps} onAttachmentLongPress={onAttachmentLongPress}/>);
35
+ return (<ImageAttachment attachment={attachment} metaProps={metaProps} onMessageAttachmentLongPress={onMessageAttachmentLongPress}/>);
36
36
  case 'video':
37
- return (<VideoAttachment attachment={attachment} onAttachmentLongPress={onAttachmentLongPress}/>);
37
+ return (<VideoAttachment attachment={attachment} onMessageAttachmentLongPress={onMessageAttachmentLongPress}/>);
38
38
  case 'audio':
39
- return (<AudioAttachment attachment={attachment} onAttachmentLongPress={onAttachmentLongPress}/>);
39
+ return (<AudioAttachment attachment={attachment} onMessageAttachmentLongPress={onMessageAttachmentLongPress}/>);
40
40
  default:
41
- return (<GenericFileAttachment attachment={attachment} onAttachmentLongPress={onAttachmentLongPress}/>);
41
+ return (<GenericFileAttachment attachment={attachment} onMessageAttachmentLongPress={onMessageAttachmentLongPress}/>);
42
42
  }
43
43
  }
44
44
  const useStyles = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"message_attachments.js","sourceRoot":"","sources":["../../../src/components/conversation/message_attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAK/C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,6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H,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,UAAU,EACV,SAAS,EACT,qBAAqB,GAKtB;IACC,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAA;IACjC,MAAM,WAAW,GAAG,UAAU,EAAE,WAAW,CAAA;IAC3C,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9D,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,CACL,CAAC,eAAe,CACd,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,EAC7C,CACH,CAAA;QACH,KAAK,OAAO;YACV,OAAO,CACL,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,EAAG,CAC1F,CAAA;QACH,KAAK,OAAO;YACV,OAAO,CACL,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,EAAG,CAC1F,CAAA;QACH;YACE,OAAO,CACL,CAAC,qBAAqB,CACpB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,EAC7C,CACH,CAAA;IACL,CAAC;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,oBAAoB,EAAE;YACpB,GAAG,EAAE,CAAC;YACN,OAAO,EAAE,CAAC;SACX;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View, StyleSheet } from 'react-native'\nimport {\n DenormalizedAttachmentResource,\n DenormalizedMessageAttachmentResource,\n} from '../../types/resources/denormalized_attachment_resource'\nimport { AudioAttachment } from './attachments/audio_attachment'\nimport { VideoAttachment } from './attachments/video_attachment'\nimport { GiphyAttachment } from './attachments/giphy_attachment'\nimport { GenericFileAttachment } from './attachments/generic_file_attachment'\nimport { ExpandedLink } from './attachments/expanded_link'\nimport { ImageAttachment, type MetaProps } from './attachments/image_attachment'\n\nexport function MessageAttachments(props: {\n attachments: DenormalizedAttachmentResource[]\n metaProps: MetaProps\n onAttachmentLongPress: (attachment: DenormalizedAttachmentResource) => void\n}) {\n const styles = useStyles()\n const { attachments, metaProps, onAttachmentLongPress } = props\n if (!attachments || attachments.length === 0) return null\n return (\n <View style={styles.attachmentsContainer}>\n {attachments.map(attachment => {\n switch (attachment.type) {\n case 'MessageAttachment':\n return (\n <MessageAttachment\n key={attachment.id}\n attachment={attachment}\n metaProps={metaProps}\n onAttachmentLongPress={onAttachmentLongPress}\n />\n )\n case 'giphy':\n return (\n <GiphyAttachment\n key={attachment.id || attachment.titleLink}\n attachment={attachment}\n onAttachmentLongPress={onAttachmentLongPress}\n />\n )\n case 'ExpandedLink':\n return (\n <ExpandedLink\n key={attachment.id}\n attachment={attachment}\n onAttachmentLongPress={onAttachmentLongPress}\n />\n )\n default:\n return null\n }\n })}\n </View>\n )\n}\n\nfunction MessageAttachment({\n attachment,\n metaProps,\n onAttachmentLongPress,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n metaProps: MetaProps\n onAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n}) {\n const { attributes } = attachment\n const contentType = attributes?.contentType\n const basicType = contentType ? contentType.split('/')[0] : ''\n switch (basicType) {\n case 'image':\n return (\n <ImageAttachment\n attachment={attachment}\n metaProps={metaProps}\n onAttachmentLongPress={onAttachmentLongPress}\n />\n )\n case 'video':\n return (\n <VideoAttachment attachment={attachment} onAttachmentLongPress={onAttachmentLongPress} />\n )\n case 'audio':\n return (\n <AudioAttachment attachment={attachment} onAttachmentLongPress={onAttachmentLongPress} />\n )\n default:\n return (\n <GenericFileAttachment\n attachment={attachment}\n onAttachmentLongPress={onAttachmentLongPress}\n />\n )\n }\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n attachmentsContainer: {\n gap: 4,\n padding: 2,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"message_attachments.js","sourceRoot":"","sources":["../../../src/components/conversation/message_attachments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAK/C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAkB,MAAM,gCAAgC,CAAA;AAEhF,MAAM,UAAU,kBAAkB,CAAC,KAKlC;IACC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAA;IAC1F,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACzD,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CACvC;MAAA,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YAC5B,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;gBACxB,KAAK,mBAAmB;oBACtB,OAAO,CACL,CAAC,iBAAiB,CAChB,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CACnB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAA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H,CAAA;QACH,KAAK,OAAO;YACV,OAAO,CACL,CAAC,eAAe,CACd,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,4BAA4B,CAAC,CAAC,4BAA4B,CAAC,EAC3D,CACH,CAAA;QACH;YACE,OAAO,CACL,CAAC,qBAAqB,CACpB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,4BAA4B,CAAC,CAAC,4BAA4B,CAAC,EAC3D,CACH,CAAA;IACL,CAAC;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,oBAAoB,EAAE;YACpB,GAAG,EAAE,CAAC;YACN,OAAO,EAAE,CAAC;SACX;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View, StyleSheet } from 'react-native'\nimport {\n DenormalizedAttachmentResource,\n DenormalizedMessageAttachmentResource,\n} from '../../types/resources/denormalized_attachment_resource'\nimport { AudioAttachment } from './attachments/audio_attachment'\nimport { VideoAttachment } from './attachments/video_attachment'\nimport { GiphyAttachment } from './attachments/giphy_attachment'\nimport { GenericFileAttachment } from './attachments/generic_file_attachment'\nimport { ExpandedLink } from './attachments/expanded_link'\nimport { ImageAttachment, type MetaProps } from './attachments/image_attachment'\n\nexport function MessageAttachments(props: {\n attachments: DenormalizedAttachmentResource[]\n metaProps: MetaProps\n onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n onMessageLongPress: () => void\n}) {\n const styles = useStyles()\n const { attachments, metaProps, onMessageAttachmentLongPress, onMessageLongPress } = props\n if (!attachments || attachments.length === 0) return null\n return (\n <View style={styles.attachmentsContainer}>\n {attachments.map(attachment => {\n switch (attachment.type) {\n case 'MessageAttachment':\n return (\n <MessageAttachment\n key={attachment.id}\n attachment={attachment}\n metaProps={metaProps}\n onMessageAttachmentLongPress={onMessageAttachmentLongPress}\n />\n )\n case 'giphy':\n return (\n <GiphyAttachment\n key={attachment.id || attachment.titleLink}\n attachment={attachment}\n onMessageLongPress={onMessageLongPress}\n />\n )\n case 'ExpandedLink':\n return (\n <ExpandedLink\n key={attachment.id}\n attachment={attachment}\n onMessageLongPress={onMessageLongPress}\n />\n )\n default:\n return null\n }\n })}\n </View>\n )\n}\n\nfunction MessageAttachment({\n attachment,\n metaProps,\n onMessageAttachmentLongPress,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n metaProps: MetaProps\n onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void\n}) {\n const { attributes } = attachment\n const contentType = attributes?.contentType\n const basicType = contentType ? contentType.split('/')[0] : ''\n switch (basicType) {\n case 'image':\n return (\n <ImageAttachment\n attachment={attachment}\n metaProps={metaProps}\n onMessageAttachmentLongPress={onMessageAttachmentLongPress}\n />\n )\n case 'video':\n return (\n <VideoAttachment\n attachment={attachment}\n onMessageAttachmentLongPress={onMessageAttachmentLongPress}\n />\n )\n case 'audio':\n return (\n <AudioAttachment\n attachment={attachment}\n onMessageAttachmentLongPress={onMessageAttachmentLongPress}\n />\n )\n default:\n return (\n <GenericFileAttachment\n attachment={attachment}\n onMessageAttachmentLongPress={onMessageAttachmentLongPress}\n />\n )\n }\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n attachmentsContainer: {\n gap: 4,\n padding: 2,\n },\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_actions.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAA;AAClF,OAAO,EAAuB,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAU1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAIlD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,EAAE,oBAAoB,CAAA;IAClC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,qBA+CA"}
1
+ {"version":3,"file":"conversation_actions.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAA;AAClF,OAAO,EAAuB,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAU1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAIlD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,EAAE,oBAAoB,CAAA;IAClC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,qBAgDA"}
@@ -30,7 +30,7 @@ export function ConversationActions({ children, conversation, style, onPress, })
30
30
  return;
31
31
  handleSwipeableClose();
32
32
  }, [activeConversationId, conversation.id]);
33
- return (<ReanimatedSwipeable ref={swipeableRef} childrenContainerStyle={styles.swipeableChildContainer} containerStyle={styles.swipeableContainer} overshootFriction={8} overshootLeft={overshootLeft} overshootRight={false} onSwipeableOpenStartDrag={handleSwipeableOpen} onSwipeableClose={() => setDisabled(false)} renderLeftActions={() => (<LeftActions conversation={conversation} onClose={handleSwipeableClose}/>)}>
33
+ return (<ReanimatedSwipeable ref={swipeableRef} childrenContainerStyle={styles.swipeableChildContainer} containerStyle={styles.swipeableContainer} overshootFriction={8} overshootLeft={overshootLeft} overshootRight={false} onSwipeableOpenStartDrag={handleSwipeableOpen} onSwipeableClose={() => setDisabled(false)} renderRightActions={() => <></>} renderLeftActions={() => (<LeftActions conversation={conversation} onClose={handleSwipeableClose}/>)}>
34
34
  <Pressable onPress={handlePress} style={style}>
35
35
  {children}
36
36
  </Pressable>
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_actions.js","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAa,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1F,OAAO,mBAEN,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,MAAM,UAAU,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,GAMR;IACC,MAAM,YAAY,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAA;IACnD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,GAAG,uBAAuB,EAAE,CAAA;IACnF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAA;IAE3C,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAChC,WAAW,CAAC,KAAK,CAAC,CAAA;QAClB,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,CAAA;IAC/B,CAAC,CAAA;IAED,MAAM,mBAAmB,GAAG,GAAG,EAAE;QAC/B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;MAAA,CAAC,kBAAkB,CACjB,OAAO,CAAC,CAAC,eAAe,CAAC,CACzB,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAC5B,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CACf,OAAO,CAAC,CAAC,yBAAyB,CAAC,CACnC,aAAa,CAAC,CAAC,gCAAgC,CAAC,CAChD,eAAe,CAAC,CAAC,MAAM,CAAC,gCAAgC,CAAC,EAE3D;MAAA,CAAC,kBAAkB,CACjB,OAAO,CAAC,CAAC,SAAS,CAAC,CACnB,OAAO,CAAC,CAAC,KAAK,CAAC,CACf,OAAO,CAAC,CAAC,UAAU,CAAC,CACpB,aAAa,CAAC,CAAC,iBAAiB,CAAC,CACjC,eAAe,CAAC,CAAC,MAAM,CAAC,kCAAkC,CAAC,EAE/D;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAC/B,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAE7B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,uBAAuB,EAAE;YACvB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,qBAAqB,EAAE;YACrB,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,mBAAmB,GAAG,mBAAmB;YAChD,YAAY,EAAE,SAAS;SACxB;QACD,kBAAkB,EAAE;YAClB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { Platform, Pressable, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'\nimport ReanimatedSwipeable, {\n SwipeableMethods,\n} from 'react-native-gesture-handler/ReanimatedSwipeable'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useTheme } from '../../hooks'\nimport {\n useConversationsMarkRead,\n useConversationsMute,\n} from '../../hooks/use_conversations_actions'\nimport { ConversationResource } from '../../types'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { ActionToggleButton } from './action_toggle_button'\n\nexport function ConversationActions({\n children,\n conversation,\n style,\n onPress,\n}: {\n children: ReactNode\n conversation: ConversationResource\n onPress: () => void\n style?: StyleProp<ViewStyle>\n}) {\n const swipeableRef = useRef<SwipeableMethods>(null)\n const styles = useStyles()\n const { activeConversationId, setActiveConversationId } = useConversationsContext()\n const [disabled, setDisabled] = useState(false)\n const overshootLeft = Platform.OS === 'ios'\n\n const handleSwipeableClose = () => {\n setDisabled(false)\n swipeableRef.current?.close()\n }\n\n const handleSwipeableOpen = () => {\n setDisabled(true)\n setActiveConversationId(conversation.id)\n }\n\n const handlePress = useCallback(() => {\n if (disabled || !onPress) return\n onPress()\n }, [disabled, onPress])\n\n useEffect(() => {\n if (activeConversationId === conversation.id) return\n\n handleSwipeableClose()\n }, [activeConversationId, conversation.id])\n\n return (\n <ReanimatedSwipeable\n ref={swipeableRef}\n childrenContainerStyle={styles.swipeableChildContainer}\n containerStyle={styles.swipeableContainer}\n overshootFriction={8}\n overshootLeft={overshootLeft}\n overshootRight={false}\n onSwipeableOpenStartDrag={handleSwipeableOpen}\n onSwipeableClose={() => setDisabled(false)}\n renderLeftActions={() => (\n <LeftActions conversation={conversation} onClose={handleSwipeableClose} />\n )}\n >\n <Pressable onPress={handlePress} style={style}>\n {children}\n </Pressable>\n </ReanimatedSwipeable>\n )\n}\n\ninterface LeftActionsProps {\n conversation: ConversationResource\n onClose: () => void\n}\n\nfunction LeftActions({ conversation, onClose }: LeftActionsProps) {\n const styles = useStyles()\n const emptyConversation = conversation.lastMessageCreatedAt === null\n\n const muteToggleContent = {\n true: { iconName: 'general.bell', label: 'Unmute' },\n false: { iconName: 'general.bellMuted', label: 'Mute' },\n } as const\n\n const latestMessageUnreadToggleContent = {\n true: { iconName: 'general.outlinedTextMessage', label: 'Mark read' },\n false: { iconName: 'general.textMessageNotifications', label: 'Mark unread' },\n } as const\n const { muted, setMuted, isPending } = useConversationsMute({ conversation })\n const { read, markRead, isPending: markReadPending } = useConversationsMarkRead({ conversation })\n\n const handleMute = useCallback(() => {\n setMuted(!muted)\n onClose()\n }, [muted, onClose, setMuted])\n\n const handleLatestMessageUnread = useCallback(() => {\n markRead(!read)\n onClose()\n }, [read, onClose, markRead])\n\n return (\n <View style={styles.actionButtonContainer}>\n <ActionToggleButton\n loading={markReadPending}\n disabled={emptyConversation}\n toggled={!read}\n onPress={handleLatestMessageUnread}\n toggleContent={latestMessageUnreadToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeDefault}\n />\n <ActionToggleButton\n loading={isPending}\n toggled={muted}\n onPress={handleMute}\n toggleContent={muteToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeSecondary}\n />\n </View>\n )\n}\n\nconst ACTION_BUTTON_WIDTH = 120\nconst ACTION_BUTTON_COUNT = 2\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n swipeableChildContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n actionButtonContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n width: ACTION_BUTTON_WIDTH * ACTION_BUTTON_COUNT,\n alignContent: 'stretch',\n },\n swipeableContainer: {\n backgroundColor: colors.surfaceColor090,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_actions.js","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAa,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1F,OAAO,mBAEN,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAA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CACnB,OAAO,CAAC,CAAC,KAAK,CAAC,CACf,OAAO,CAAC,CAAC,UAAU,CAAC,CACpB,aAAa,CAAC,CAAC,iBAAiB,CAAC,CACjC,eAAe,CAAC,CAAC,MAAM,CAAC,kCAAkC,CAAC,EAE/D;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAC/B,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAE7B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,uBAAuB,EAAE;YACvB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,qBAAqB,EAAE;YACrB,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,mBAAmB,GAAG,mBAAmB;YAChD,YAAY,EAAE,SAAS;SACxB;QACD,kBAAkB,EAAE;YAClB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport { Platform, Pressable, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'\nimport ReanimatedSwipeable, {\n SwipeableMethods,\n} from 'react-native-gesture-handler/ReanimatedSwipeable'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useTheme } from '../../hooks'\nimport {\n useConversationsMarkRead,\n useConversationsMute,\n} from '../../hooks/use_conversations_actions'\nimport { ConversationResource } from '../../types'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { ActionToggleButton } from './action_toggle_button'\n\nexport function ConversationActions({\n children,\n conversation,\n style,\n onPress,\n}: {\n children: ReactNode\n conversation: ConversationResource\n onPress: () => void\n style?: StyleProp<ViewStyle>\n}) {\n const swipeableRef = useRef<SwipeableMethods>(null)\n const styles = useStyles()\n const { activeConversationId, setActiveConversationId } = useConversationsContext()\n const [disabled, setDisabled] = useState(false)\n const overshootLeft = Platform.OS === 'ios'\n\n const handleSwipeableClose = () => {\n setDisabled(false)\n swipeableRef.current?.close()\n }\n\n const handleSwipeableOpen = () => {\n setDisabled(true)\n setActiveConversationId(conversation.id)\n }\n\n const handlePress = useCallback(() => {\n if (disabled || !onPress) return\n onPress()\n }, [disabled, onPress])\n\n useEffect(() => {\n if (activeConversationId === conversation.id) return\n\n handleSwipeableClose()\n }, [activeConversationId, conversation.id])\n\n return (\n <ReanimatedSwipeable\n ref={swipeableRef}\n childrenContainerStyle={styles.swipeableChildContainer}\n containerStyle={styles.swipeableContainer}\n overshootFriction={8}\n overshootLeft={overshootLeft}\n overshootRight={false}\n onSwipeableOpenStartDrag={handleSwipeableOpen}\n onSwipeableClose={() => setDisabled(false)}\n renderRightActions={() => <></>}\n renderLeftActions={() => (\n <LeftActions conversation={conversation} onClose={handleSwipeableClose} />\n )}\n >\n <Pressable onPress={handlePress} style={style}>\n {children}\n </Pressable>\n </ReanimatedSwipeable>\n )\n}\n\ninterface LeftActionsProps {\n conversation: ConversationResource\n onClose: () => void\n}\n\nfunction LeftActions({ conversation, onClose }: LeftActionsProps) {\n const styles = useStyles()\n const emptyConversation = conversation.lastMessageCreatedAt === null\n\n const muteToggleContent = {\n true: { iconName: 'general.bell', label: 'Unmute' },\n false: { iconName: 'general.bellMuted', label: 'Mute' },\n } as const\n\n const latestMessageUnreadToggleContent = {\n true: { iconName: 'general.outlinedTextMessage', label: 'Mark read' },\n false: { iconName: 'general.textMessageNotifications', label: 'Mark unread' },\n } as const\n const { muted, setMuted, isPending } = useConversationsMute({ conversation })\n const { read, markRead, isPending: markReadPending } = useConversationsMarkRead({ conversation })\n\n const handleMute = useCallback(() => {\n setMuted(!muted)\n onClose()\n }, [muted, onClose, setMuted])\n\n const handleLatestMessageUnread = useCallback(() => {\n markRead(!read)\n onClose()\n }, [read, onClose, markRead])\n\n return (\n <View style={styles.actionButtonContainer}>\n <ActionToggleButton\n loading={markReadPending}\n disabled={emptyConversation}\n toggled={!read}\n onPress={handleLatestMessageUnread}\n toggleContent={latestMessageUnreadToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeDefault}\n />\n <ActionToggleButton\n loading={isPending}\n toggled={muted}\n onPress={handleMute}\n toggleContent={muteToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeSecondary}\n />\n </View>\n )\n}\n\nconst ACTION_BUTTON_WIDTH = 120\nconst ACTION_BUTTON_COUNT = 2\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n swipeableChildContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n actionButtonContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n width: ACTION_BUTTON_WIDTH * ACTION_BUTTON_COUNT,\n alignContent: 'stretch',\n },\n swipeableContainer: {\n backgroundColor: colors.surfaceColor090,\n },\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_preview.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAQlD,UAAU,wBAAwB;IAChC,YAAY,EAAE,oBAAoB,CAAA;IAClC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,eAAO,MAAM,mBAAmB,kDAK7B,wBAAwB,sBAsC1B,CAAA"}
1
+ {"version":3,"file":"conversation_preview.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAQlD,UAAU,wBAAwB;IAChC,YAAY,EAAE,oBAAoB,CAAA;IAClC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,eAAO,MAAM,mBAAmB,kDAK7B,wBAAwB,sBAwD1B,CAAA"}
@@ -9,14 +9,21 @@ import { MuteIndicator } from './mute_indicator';
9
9
  export const ConversationPreview = ({ conversation, onPress, showBadges = true, style, }) => {
10
10
  const styles = useStyles();
11
11
  const { lastMessageAuthorName, lastMessageCreatedAt, lastMessageTextPreview, previewAvatarUrls, title, unreadCount, badges, muted, } = conversation;
12
+ const emptyConversation = !lastMessageCreatedAt;
13
+ const hasAvatarUrls = previewAvatarUrls && previewAvatarUrls.length > 0;
14
+ const shouldShowFallback = emptyConversation || !hasAvatarUrls;
15
+ const fallbackIconName = emptyConversation ? 'people.noTextMessage' : 'general.person';
16
+ const conversationPreviewText = lastMessageTextPreview
17
+ ? `${lastMessageAuthorName}: ${lastMessageTextPreview}`
18
+ : 'Send your first message';
12
19
  return (<ConversationActions conversation={conversation} style={[styles.previewRow, style]} onPress={onPress}>
13
- <AvatarGroup size="lg" sourceUris={previewAvatarUrls || []}/>
20
+ <AvatarGroup size="lg" sourceUris={previewAvatarUrls || []} showFallback={shouldShowFallback} fallbackIconName={fallbackIconName}/>
14
21
  <View style={styles.conversationBody}>
15
22
  <Heading numberOfLines={1} variant="h3" style={styles.title}>
16
23
  {title}
17
24
  </Heading>
18
- <Text variant="tertiary" numberOfLines={2}>
19
- {lastMessageAuthorName}: {lastMessageTextPreview}
25
+ <Text variant="tertiary" numberOfLines={2} style={emptyConversation && styles.emptyConversationPreviewText}>
26
+ {conversationPreviewText}
20
27
  </Text>
21
28
  <ConversationBadges visible={showBadges} badges={badges}/>
22
29
  </View>
@@ -58,6 +65,9 @@ const useStyles = () => {
58
65
  flex: 1,
59
66
  rowGap: 2,
60
67
  },
68
+ emptyConversationPreviewText: {
69
+ color: colors.interaction,
70
+ },
61
71
  metaContainer: {
62
72
  rowGap: 4,
63
73
  alignItems: 'flex-end',
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_preview.js","sourceRoot":"","sources":["../../../src/components/conversations/conversation_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAShD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,YAAY,EACZ,OAAO,EACP,UAAU,GAAG,IAAI,EACjB,KAAK,GACoB,EAAE,EAAE;IAC7B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EACJ,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,EACL,WAAW,EACX,MAAM,EACN,KAAK,GACN,GAAG,YAAY,CAAA;IAEhB,OAAO,CACL,CAAC,mBAAmB,CAClB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAClC,OAAO,CAAC,CAAC,OAAO,CAAC,CAEjB;MAAA,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CA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KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { ConversationResource } from '../../types'\nimport { AvatarGroup, Heading, Text, Badge } from '../display'\nimport { formatDatePreview } from '../../utils/date'\nimport { useTheme } from '../../hooks'\nimport { UnreadCountBadge } from './unread_count_badge'\nimport { ConversationActions } from './conversation_actions'\nimport { MuteIndicator } from './mute_indicator'\n\ninterface ConversationPreviewProps {\n conversation: ConversationResource\n onPress: () => void\n showBadges?: boolean\n style?: ViewStyle\n}\n\nexport const ConversationPreview = ({\n conversation,\n onPress,\n showBadges = true,\n style,\n}: ConversationPreviewProps) => {\n const styles = useStyles()\n const {\n lastMessageAuthorName,\n lastMessageCreatedAt,\n lastMessageTextPreview,\n previewAvatarUrls,\n title,\n unreadCount,\n badges,\n muted,\n } = conversation\n\n return (\n <ConversationActions\n conversation={conversation}\n style={[styles.previewRow, style]}\n onPress={onPress}\n >\n <AvatarGroup size=\"lg\" sourceUris={previewAvatarUrls || []} />\n <View style={styles.conversationBody}>\n <Heading numberOfLines={1} variant=\"h3\" style={styles.title}>\n {title}\n </Heading>\n <Text variant=\"tertiary\" numberOfLines={2}>\n {lastMessageAuthorName}: {lastMessageTextPreview}\n </Text>\n <ConversationBadges visible={showBadges} badges={badges} />\n </View>\n <View style={styles.metaContainer}>\n <Text variant=\"tertiary\">{formatDatePreview(lastMessageCreatedAt)}</Text>\n <View style={styles.statusContainer}>\n <UnreadCountBadge count={unreadCount} showDot={muted} />\n <MuteIndicator muted={muted} />\n </View>\n </View>\n </ConversationActions>\n )\n}\n\nconst ConversationBadges = ({ visible, badges }: { visible: boolean; badges?: any[] }) => {\n const styles = useStyles()\n\n if (!visible || !badges || badges.length === 0) {\n return null\n }\n\n return (\n <View style={styles.badges}>\n {badges.map(badge => (\n <Badge\n key={badge.text}\n variant=\"meta\"\n productLogoName={badge.appName}\n label={badge.pcoResourceType}\n metaLabel={badge.text || ''}\n />\n ))}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n previewRow: {\n flexDirection: 'row',\n gap: 8,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultDim,\n paddingTop: 12,\n paddingBottom: 12,\n paddingHorizontal: 16,\n },\n title: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n },\n conversationBody: {\n flex: 1,\n rowGap: 2,\n },\n metaContainer: {\n rowGap: 4,\n alignItems: 'flex-end',\n },\n badges: {\n marginTop: 4,\n alignItems: 'flex-start',\n },\n statusContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_preview.js","sourceRoot":"","sources":["../../../src/components/conversations/conversation_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAShD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,YAAY,EACZ,OAAO,EACP,UAAU,GAAG,IAAI,EACjB,KAAK,GACoB,EAAE,EAAE;IAC7B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EACJ,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EAC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AK,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAC7B,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,EAC5B,CACH,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE;YACV,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,qBAAqB;YAC/C,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE;YACjB,iBAAiB,EAAE,EAAE;SACtB;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,CAAC;YACP,MAAM,EAAE,CAAC;SACV;QACD,4BAA4B,EAAE;YAC5B,KAAK,EAAE,MAAM,CAAC,WAAW;SAC1B;QACD,aAAa,EAAE;YACb,MAAM,EAAE,CAAC;YACT,UAAU,EAAE,UAAU;SACvB;QACD,MAAM,EAAE;YACN,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,YAAY;SACzB;QACD,eAAe,EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { ConversationResource } from '../../types'\nimport { AvatarGroup, Heading, Text, Badge } from '../display'\nimport { formatDatePreview } from '../../utils/date'\nimport { useTheme } from '../../hooks'\nimport { UnreadCountBadge } from './unread_count_badge'\nimport { ConversationActions } from './conversation_actions'\nimport { MuteIndicator } from './mute_indicator'\n\ninterface ConversationPreviewProps {\n conversation: ConversationResource\n onPress: () => void\n showBadges?: boolean\n style?: ViewStyle\n}\n\nexport const ConversationPreview = ({\n conversation,\n onPress,\n showBadges = true,\n style,\n}: ConversationPreviewProps) => {\n const styles = useStyles()\n const {\n lastMessageAuthorName,\n lastMessageCreatedAt,\n lastMessageTextPreview,\n previewAvatarUrls,\n title,\n unreadCount,\n badges,\n muted,\n } = conversation\n\n const emptyConversation = !lastMessageCreatedAt\n const hasAvatarUrls = previewAvatarUrls && previewAvatarUrls.length > 0\n const shouldShowFallback = emptyConversation || !hasAvatarUrls\n const fallbackIconName = emptyConversation ? 'people.noTextMessage' : 'general.person'\n\n const conversationPreviewText = lastMessageTextPreview\n ? `${lastMessageAuthorName}: ${lastMessageTextPreview}`\n : 'Send your first message'\n\n return (\n <ConversationActions\n conversation={conversation}\n style={[styles.previewRow, style]}\n onPress={onPress}\n >\n <AvatarGroup\n size=\"lg\"\n sourceUris={previewAvatarUrls || []}\n showFallback={shouldShowFallback}\n fallbackIconName={fallbackIconName}\n />\n <View style={styles.conversationBody}>\n <Heading numberOfLines={1} variant=\"h3\" style={styles.title}>\n {title}\n </Heading>\n <Text\n variant=\"tertiary\"\n numberOfLines={2}\n style={emptyConversation && styles.emptyConversationPreviewText}\n >\n {conversationPreviewText}\n </Text>\n <ConversationBadges visible={showBadges} badges={badges} />\n </View>\n <View style={styles.metaContainer}>\n <Text variant=\"tertiary\">{formatDatePreview(lastMessageCreatedAt)}</Text>\n <View style={styles.statusContainer}>\n <UnreadCountBadge count={unreadCount} showDot={muted} />\n <MuteIndicator muted={muted} />\n </View>\n </View>\n </ConversationActions>\n )\n}\n\nconst ConversationBadges = ({ visible, badges }: { visible: boolean; badges?: any[] }) => {\n const styles = useStyles()\n\n if (!visible || !badges || badges.length === 0) {\n return null\n }\n\n return (\n <View style={styles.badges}>\n {badges.map(badge => (\n <Badge\n key={badge.text}\n variant=\"meta\"\n productLogoName={badge.appName}\n label={badge.pcoResourceType}\n metaLabel={badge.text || ''}\n />\n ))}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n previewRow: {\n flexDirection: 'row',\n gap: 8,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultDim,\n paddingTop: 12,\n paddingBottom: 12,\n paddingHorizontal: 16,\n },\n title: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n },\n conversationBody: {\n flex: 1,\n rowGap: 2,\n },\n emptyConversationPreviewText: {\n color: colors.interaction,\n },\n metaContainer: {\n rowGap: 4,\n alignItems: 'flex-end',\n },\n badges: {\n marginTop: 4,\n alignItems: 'flex-start',\n },\n statusContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n })\n}\n"]}
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { StyleSheet, View } from 'react-native';
5
5
  import { useConversationsContext } from '../../contexts/conversations_context';
6
6
  import { useTheme } from '../../hooks';
7
- import { Text } from '../display';
7
+ import { BlankState } from '../display';
8
8
  import { ConversationPreview } from './conversation_preview';
9
9
  export const Conversations = ({ ListHeaderComponent }) => {
10
10
  const styles = useStyles();
@@ -13,7 +13,7 @@ export const Conversations = ({ ListHeaderComponent }) => {
13
13
  const showBadges = !chat_group_graph_id;
14
14
  return (<View style={styles.container}>
15
15
  <FlashList data={conversations} estimatedItemSize={97} contentContainerStyle={styles.contentContainer} onRefresh={refetch} refreshing={!isFetched && isRefetching} ListHeaderComponent={ListHeaderComponent} ListEmptyComponent={<View style={styles.listEmpty}>
16
- <Text variant="secondary">No conversations found</Text>
16
+ <BlankState iconName="general.outlinedTextMessage" title="No conversations"/>
17
17
  </View>} renderItem={({ item }) => (<ConversationPreview conversation={item} onPress={() => navigation.navigate('Conversation', { conversation_id: item.id })} showBadges={showBadges}/>)} onEndReached={() => fetchNextPage()}/>
18
18
  </View>);
19
19
  };
@@ -27,7 +27,7 @@ const useStyles = () => {
27
27
  flex: 1,
28
28
  justifyContent: 'center',
29
29
  alignItems: 'center',
30
- paddingVertical: 16,
30
+ paddingVertical: 32,
31
31
  },
32
32
  });
33
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../src/components/conversations/conversations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAU5D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,mBAAmB,EAAsB,EAAE,EAAE;IAC3E,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,MAAM,EACJ,aAAa,EACb,aAAa,EACb,OAAO,EACP,YAAY,EACZ,SAAS,EACT,IAAI,EAAE,EAAE,mBAAmB,EAAE,GAC9B,GAAG,uBAAuB,EAAE,CAAA;IAC7B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,MAAM,UAAU,GAAG,CAAC,mBAAmB,CAAA;IAEvC,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,SAAS,CACR,IAAI,CAAC,CAAC,aAAa,CAAC,CACpB,iBAAiB,CAAC,CAAC,EAAE,CAAC,CACtB,qBAAqB,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAC/C,SAAS,CAAC,CAAC,OAAO,CAAC,CACnB,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,YAAY,CAAC,CACvC,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,kBAAkB,CAAC,CACjB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;YAAA,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,sBAAsB,EAAE,IAAI,CACxD;UAAA,EAAE,IAAI,CACR,CAAC,CACD,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACxB,CAAC,mBAAmB,CAClB,YAAY,CAAC,CAAC,IAAI,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CACjF,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAC,CACF,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,EAExC;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;QACtB,gBAAgB,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE;QACzC,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,mBAAmB,EAAE;QAC/C,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;YACP,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,EAAE;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport { FlashList } from '@shopify/flash-list'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useTheme } from '../../hooks'\nimport { Text } from '../display'\nimport { ConversationPreview } from './conversation_preview'\n\ninterface ConversationsProps {\n ListHeaderComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n | null\n | undefined\n}\n\nexport const Conversations = ({ ListHeaderComponent }: ConversationsProps) => {\n const styles = useStyles()\n\n const {\n conversations,\n fetchNextPage,\n refetch,\n isRefetching,\n isFetched,\n args: { chat_group_graph_id },\n } = useConversationsContext()\n const navigation = useNavigation()\n\n const showBadges = !chat_group_graph_id\n\n return (\n <View style={styles.container}>\n <FlashList\n data={conversations}\n estimatedItemSize={97}\n contentContainerStyle={styles.contentContainer}\n onRefresh={refetch}\n refreshing={!isFetched && isRefetching}\n ListHeaderComponent={ListHeaderComponent}\n ListEmptyComponent={\n <View style={styles.listEmpty}>\n <Text variant=\"secondary\">No conversations found</Text>\n </View>\n }\n renderItem={({ item }) => (\n <ConversationPreview\n conversation={item}\n onPress={() => navigation.navigate('Conversation', { conversation_id: item.id })}\n showBadges={showBadges}\n />\n )}\n onEndReached={() => fetchNextPage()}\n />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: { flex: 1 },\n contentContainer: { paddingVertical: 16 },\n listItem: { color: colors.fillColorNeutral020 },\n listEmpty: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 16,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../src/components/conversations/conversations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,uBAAuB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CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CACjF,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAC,CACF,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,EAExC;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;QACtB,gBAAgB,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE;QACzC,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,mBAAmB,EAAE;QAC/C,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;YACP,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,EAAE;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport { FlashList } from '@shopify/flash-list'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useTheme } from '../../hooks'\nimport { BlankState } from '../display'\nimport { ConversationPreview } from './conversation_preview'\n\ninterface ConversationsProps {\n ListHeaderComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n | null\n | undefined\n}\n\nexport const Conversations = ({ ListHeaderComponent }: ConversationsProps) => {\n const styles = useStyles()\n\n const {\n conversations,\n fetchNextPage,\n refetch,\n isRefetching,\n isFetched,\n args: { chat_group_graph_id },\n } = useConversationsContext()\n const navigation = useNavigation()\n\n const showBadges = !chat_group_graph_id\n\n return (\n <View style={styles.container}>\n <FlashList\n data={conversations}\n estimatedItemSize={97}\n contentContainerStyle={styles.contentContainer}\n onRefresh={refetch}\n refreshing={!isFetched && isRefetching}\n ListHeaderComponent={ListHeaderComponent}\n ListEmptyComponent={\n <View style={styles.listEmpty}>\n <BlankState iconName=\"general.outlinedTextMessage\" title=\"No conversations\" />\n </View>\n }\n renderItem={({ item }) => (\n <ConversationPreview\n conversation={item}\n onPress={() => navigation.navigate('Conversation', { conversation_id: item.id })}\n showBadges={showBadges}\n />\n )}\n onEndReached={() => fetchNextPage()}\n />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: { flex: 1 },\n contentContainer: { paddingVertical: 16 },\n listItem: { color: colors.fillColorNeutral020 },\n listEmpty: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 32,\n },\n })\n}\n"]}
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
- export declare const ActionButton: ({ visible, disabled, onPress, title, infoText, }: {
2
+ import { IconString } from './icon';
3
+ export declare const ActionButton: ({ visible, disabled, onPress, title, infoText, buttonIconNameLeft, secondaryButton, }: {
3
4
  visible?: boolean;
4
5
  disabled?: boolean;
5
6
  onPress: () => void;
6
7
  title: string;
7
8
  infoText?: string;
9
+ buttonIconNameLeft?: IconString;
10
+ secondaryButton?: React.ReactNode;
8
11
  }) => React.JSX.Element | null;
9
12
  //# sourceMappingURL=action_button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAQvC,eAAO,MAAM,YAAY,qDAMtB;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,6BAuBA,CAAA"}
1
+ {"version":3,"file":"action_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAOvC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAEnC,eAAO,MAAM,YAAY,0FAQtB;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,UAAU,CAAA;IAC/B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAClC,6BAkCA,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import React, { useState } from 'react';
2
- import { Animated, LayoutAnimation, StyleSheet } from 'react-native';
2
+ import { Animated, LayoutAnimation, StyleSheet, View } from 'react-native';
3
3
  import { Button } from './button';
4
4
  import { useEffect } from 'react';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { useTheme } from '../../hooks';
7
7
  import { Text } from './text';
8
- export const ActionButton = ({ visible = true, disabled = false, onPress, title, infoText, }) => {
8
+ export const ActionButton = ({ visible = true, disabled = false, onPress, title, infoText, buttonIconNameLeft, secondaryButton, }) => {
9
9
  const styles = useStyles();
10
10
  const [show, setShow] = useState(visible);
11
11
  useEffect(() => {
@@ -20,21 +20,36 @@ export const ActionButton = ({ visible = true, disabled = false, onPress, title,
20
20
  {Boolean(infoText) && (<Text style={styles.infoText} variant="footnote">
21
21
  {infoText}
22
22
  </Text>)}
23
- <Button variant="fill" size="lg" onPress={onPress} title={title} disabled={disabled}/>
23
+ <View style={styles.buttonRow}>
24
+ {secondaryButton}
25
+ <Button variant="fill" size="lg" onPress={onPress} title={title} disabled={disabled} style={secondaryButton ? null : styles.fullWidthButton} iconNameLeft={buttonIconNameLeft}/>
26
+ </View>
24
27
  </Animated.View>);
25
28
  };
26
29
  const useStyles = () => {
27
30
  const { bottom } = useSafeAreaInsets();
28
31
  const { colors } = useTheme();
32
+ const containerVerticalPadding = 16;
29
33
  return StyleSheet.create({
30
34
  container: {
31
- paddingVertical: 16,
35
+ backgroundColor: colors.surfaceColor090,
32
36
  paddingHorizontal: 24,
33
- paddingBottom: bottom,
37
+ paddingTop: containerVerticalPadding,
38
+ paddingBottom: bottom + containerVerticalPadding,
34
39
  borderTopWidth: 1,
35
40
  borderTopColor: colors.fillColorNeutral060,
36
41
  gap: 16,
37
42
  },
43
+ buttonRow: {
44
+ flexDirection: 'row',
45
+ justifyContent: 'space-between',
46
+ alignItems: 'center',
47
+ gap: 16,
48
+ flexWrap: 'wrap-reverse',
49
+ },
50
+ fullWidthButton: {
51
+ flexGrow: 1,
52
+ },
38
53
  infoText: {
39
54
  textAlign: 'center',
40
55
  },
@@ -1 +1 @@
1
- {"version":3,"file":"action_button.js","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,GAAG,IAAI,EACd,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,QAAQ,GAOT,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,SAAS,EAAE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AAc,EAAE,MAAM,CAAC,mBAAmB;YAC1C,GAAG,EAAE,EAAE;SACR;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,QAAQ;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport { Animated, LayoutAnimation, StyleSheet } from 'react-native'\nimport { Button } from './button'\nimport { useEffect } from 'react'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport { Text } from './text'\n\nexport const ActionButton = ({\n visible = true,\n disabled = false,\n onPress,\n title,\n infoText,\n}: {\n visible?: boolean\n disabled?: boolean\n onPress: () => void\n title: string\n infoText?: string\n}) => {\n const styles = useStyles()\n const [show, setShow] = useState(visible)\n\n useEffect(() => {\n if (show === visible) return\n\n setShow(visible)\n LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)\n }, [show, visible])\n\n if (!visible) return null\n\n return (\n <Animated.View style={styles.container}>\n {Boolean(infoText) && (\n <Text style={styles.infoText} variant=\"footnote\">\n {infoText}\n </Text>\n )}\n <Button variant=\"fill\" size=\"lg\" onPress={onPress} title={title} disabled={disabled} />\n </Animated.View>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n paddingVertical: 16,\n paddingHorizontal: 24,\n paddingBottom: bottom,\n borderTopWidth: 1,\n borderTopColor: colors.fillColorNeutral060,\n gap: 16,\n },\n infoText: {\n textAlign: 'center',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"action_button.js","sourceRoot":"","sources":["../../../src/components/display/action_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC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,IAAI,CACT,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CACvD,YAAY,CAAC,CAAC,kBAAkB,CAAC,EAErC;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACtC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,wBAAwB,GAAG,EAAE,CAAA;IAEnC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,wBAAwB;YACpC,aAAa,EAAE,MAAM,GAAG,wBAAwB;YAChD,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,MAAM,CAAC,mBAAmB;YAC1C,GAAG,EAAE,EAAE;SACR;QACD,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,cAAc;SACzB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,CAAC;SACZ;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,QAAQ;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useState } from 'react'\nimport { Animated, LayoutAnimation, StyleSheet, View } from 'react-native'\nimport { Button } from './button'\nimport { useEffect } from 'react'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport { Text } from './text'\nimport { IconString } from './icon'\n\nexport const ActionButton = ({\n visible = true,\n disabled = false,\n onPress,\n title,\n infoText,\n buttonIconNameLeft,\n secondaryButton,\n}: {\n visible?: boolean\n disabled?: boolean\n onPress: () => void\n title: string\n infoText?: string\n buttonIconNameLeft?: IconString\n secondaryButton?: React.ReactNode\n}) => {\n const styles = useStyles()\n const [show, setShow] = useState(visible)\n\n useEffect(() => {\n if (show === visible) return\n\n setShow(visible)\n LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)\n }, [show, visible])\n\n if (!visible) return null\n\n return (\n <Animated.View style={styles.container}>\n {Boolean(infoText) && (\n <Text style={styles.infoText} variant=\"footnote\">\n {infoText}\n </Text>\n )}\n <View style={styles.buttonRow}>\n {secondaryButton}\n <Button\n variant=\"fill\"\n size=\"lg\"\n onPress={onPress}\n title={title}\n disabled={disabled}\n style={secondaryButton ? null : styles.fullWidthButton}\n iconNameLeft={buttonIconNameLeft}\n />\n </View>\n </Animated.View>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n const containerVerticalPadding = 16\n\n return StyleSheet.create({\n container: {\n backgroundColor: colors.surfaceColor090,\n paddingHorizontal: 24,\n paddingTop: containerVerticalPadding,\n paddingBottom: bottom + containerVerticalPadding,\n borderTopWidth: 1,\n borderTopColor: colors.fillColorNeutral060,\n gap: 16,\n },\n buttonRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 16,\n flexWrap: 'wrap-reverse',\n },\n fullWidthButton: {\n flexGrow: 1,\n },\n infoText: {\n textAlign: 'center',\n },\n })\n}\n"]}
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
2
  import { type AvatarImageProps, type AvatarPresenceProps, type AvatarRootProps } from '../primitive/avatar_primitive';
3
+ import { type IconString } from './icon';
3
4
  interface AvatarProps {
4
5
  sourceUri: AvatarImageProps['sourceUri'];
5
6
  size?: AvatarRootProps['size'];
6
7
  presence?: AvatarPresenceProps['presence'];
8
+ showFallback?: boolean;
9
+ fallbackIconName?: IconString;
7
10
  }
8
- export declare function Avatar({ presence, size, sourceUri }: AvatarProps): React.JSX.Element;
11
+ export declare function Avatar({ presence, size, sourceUri, showFallback, fallbackIconName, }: AvatarProps): React.JSX.Element;
9
12
  export {};
10
13
  //# sourceMappingURL=avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAwB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAA;AAEtC,UAAU,WAAW;IACnB,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACxC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;CAC3C;AAED,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,WAAW,qBASvE"}
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAwB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAA;AAExC,UAAU,WAAW;IACnB,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACxC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,UAAU,CAAA;CAC9B;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAW,EACX,SAAS,EACT,YAAoB,EACpB,gBAAmC,GACpC,EAAE,WAAW,qBAeb"}
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import AvatarPrimitive from '../primitive/avatar_primitive';
3
- export function Avatar({ presence, size = 'lg', sourceUri }) {
3
+ export function Avatar({ presence, size = 'lg', sourceUri, showFallback = false, fallbackIconName = 'general.person', }) {
4
+ const shouldShowFallback = showFallback || !sourceUri;
4
5
  return (<AvatarPrimitive.Root size={size}>
5
6
  <AvatarPrimitive.Mask>
6
- <AvatarPrimitive.Image sourceUri={sourceUri}/>
7
+ {shouldShowFallback ? (<AvatarPrimitive.ImageFallback name={fallbackIconName}/>) : (<AvatarPrimitive.Image sourceUri={sourceUri}/>)}
7
8
  </AvatarPrimitive.Mask>
8
9
  {presence && <AvatarPrimitive.Presence presence={presence}/>}
9
10
  </AvatarPrimitive.Root>);
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../src/components/display/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,eAIN,MAAM,+BAA+B,CAAA;AAQtC,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAe;IACtE,OAAO,CACL,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAC/B;MAAA,CAAC,eAAe,CAAC,IAAI,CACnB;QAAA,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,EAC9C;MAAA,EAAE,eAAe,CAAC,IAAI,CACtB;MAAA,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CAC/D;IAAA,EAAE,eAAe,CAAC,IAAI,CAAC,CACxB,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport AvatarPrimitive, {\n type AvatarImageProps,\n type AvatarPresenceProps,\n type AvatarRootProps,\n} from '../primitive/avatar_primitive'\n\ninterface AvatarProps {\n sourceUri: AvatarImageProps['sourceUri']\n size?: AvatarRootProps['size']\n presence?: AvatarPresenceProps['presence']\n}\n\nexport function Avatar({ presence, size = 'lg', sourceUri }: AvatarProps) {\n return (\n <AvatarPrimitive.Root size={size}>\n <AvatarPrimitive.Mask>\n <AvatarPrimitive.Image sourceUri={sourceUri} />\n </AvatarPrimitive.Mask>\n {presence && <AvatarPrimitive.Presence presence={presence} />}\n </AvatarPrimitive.Root>\n )\n}\n"]}
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../src/components/display/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,eAIN,MAAM,+BAA+B,CAAA;AAWtC,MAAM,UAAU,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,SAAS,EACT,YAAY,GAAG,KAAK,EACpB,gBAAgB,GAAG,gBAAgB,GACvB;IACZ,MAAM,kBAAkB,GAAG,YAAY,IAAI,CAAC,SAAS,CAAA;IAErD,OAAO,CACL,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAC/B;MAAA,CAAC,eAAe,CAAC,IAAI,CACnB;QAAA,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACpB,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,EAAG,CAC1D,CAAC,CAAC,CAAC,CACF,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,EAAG,CAChD,CACH;MAAA,EAAE,eAAe,CAAC,IAAI,CACtB;MAAA,CAAC,QAAQ,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CAC/D;IAAA,EAAE,eAAe,CAAC,IAAI,CAAC,CACxB,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport AvatarPrimitive, {\n type AvatarImageProps,\n type AvatarPresenceProps,\n type AvatarRootProps,\n} from '../primitive/avatar_primitive'\nimport { type IconString } from './icon'\n\ninterface AvatarProps {\n sourceUri: AvatarImageProps['sourceUri']\n size?: AvatarRootProps['size']\n presence?: AvatarPresenceProps['presence']\n showFallback?: boolean\n fallbackIconName?: IconString\n}\n\nexport function Avatar({\n presence,\n size = 'lg',\n sourceUri,\n showFallback = false,\n fallbackIconName = 'general.person',\n}: AvatarProps) {\n const shouldShowFallback = showFallback || !sourceUri\n\n return (\n <AvatarPrimitive.Root size={size}>\n <AvatarPrimitive.Mask>\n {shouldShowFallback ? (\n <AvatarPrimitive.ImageFallback name={fallbackIconName} />\n ) : (\n <AvatarPrimitive.Image sourceUri={sourceUri} />\n )}\n </AvatarPrimitive.Mask>\n {presence && <AvatarPrimitive.Presence presence={presence} />}\n </AvatarPrimitive.Root>\n )\n}\n"]}
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
2
  import { type AvatarGroupProps, type AvatarRootProps } from '../primitive/avatar_primitive';
3
+ import { type IconString } from './icon';
3
4
  interface AvatarGroupDisplayProps {
4
5
  sourceUris: AvatarGroupProps['sourceUris'];
6
+ showFallback?: boolean;
7
+ fallbackIconName?: IconString;
5
8
  size?: AvatarRootProps['size'];
6
9
  }
7
- export declare function AvatarGroup({ sourceUris, size }: AvatarGroupDisplayProps): React.JSX.Element;
10
+ export declare function AvatarGroup({ sourceUris, showFallback, fallbackIconName, size, }: AvatarGroupDisplayProps): React.JSX.Element;
8
11
  export {};
9
12
  //# sourceMappingURL=avatar_group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar_group.d.ts","sourceRoot":"","sources":["../../../src/components/display/avatar_group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAwB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAA;AAEtC,UAAU,uBAAuB;IAC/B,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC1C,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;CAC/B;AAED,wBAAgB,WAAW,CAAC,EAAE,UAAU,EAAE,IAAW,EAAE,EAAE,uBAAuB,qBAS/E"}
1
+ {"version":3,"file":"avatar_group.d.ts","sourceRoot":"","sources":["../../../src/components/display/avatar_group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAwB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAA;AAExC,UAAU,uBAAuB;IAC/B,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,UAAU,CAAA;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;CAC/B;AAED,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,YAAoB,EACpB,gBAAmC,EACnC,IAAW,GACZ,EAAE,uBAAuB,qBAiBzB"}
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
2
  import AvatarPrimitive from '../primitive/avatar_primitive';
3
- export function AvatarGroup({ sourceUris, size = 'lg' }) {
3
+ export function AvatarGroup({ sourceUris, showFallback = false, fallbackIconName = 'general.person', size = 'lg', }) {
4
+ const shouldShowFallback = showFallback || !sourceUris || sourceUris.length === 0;
4
5
  return (<AvatarPrimitive.Root size={size}>
5
6
  <AvatarPrimitive.Mask>
6
- <AvatarPrimitive.Group sourceUris={sourceUris}/>
7
- <AvatarPrimitive.GroupLoader />
7
+ {shouldShowFallback ? (<AvatarPrimitive.ImageFallback name={fallbackIconName}/>) : (<>
8
+ <AvatarPrimitive.Group sourceUris={sourceUris}/>
9
+ <AvatarPrimitive.GroupLoader />
10
+ </>)}
8
11
  </AvatarPrimitive.Mask>
9
12
  </AvatarPrimitive.Root>);
10
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"avatar_group.js","sourceRoot":"","sources":["../../../src/components/display/avatar_group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,eAGN,MAAM,+BAA+B,CAAA;AAOtC,MAAM,UAAU,WAAW,CAAC,EAAE,UAAU,EAAE,IAAI,GAAG,IAAI,EAA2B;IAC9E,OAAO,CACL,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAC/B;MAAA,CAAC,eAAe,CAAC,IAAI,CACnB;QAAA,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,EAC9C;QAAA,CAAC,eAAe,CAAC,WAAW,CAAC,AAAD,EAC9B;MAAA,EAAE,eAAe,CAAC,IAAI,CACxB;IAAA,EAAE,eAAe,CAAC,IAAI,CAAC,CACxB,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport AvatarPrimitive, {\n type AvatarGroupProps,\n type AvatarRootProps,\n} from '../primitive/avatar_primitive'\n\ninterface AvatarGroupDisplayProps {\n sourceUris: AvatarGroupProps['sourceUris']\n size?: AvatarRootProps['size']\n}\n\nexport function AvatarGroup({ sourceUris, size = 'lg' }: AvatarGroupDisplayProps) {\n return (\n <AvatarPrimitive.Root size={size}>\n <AvatarPrimitive.Mask>\n <AvatarPrimitive.Group sourceUris={sourceUris} />\n <AvatarPrimitive.GroupLoader />\n </AvatarPrimitive.Mask>\n </AvatarPrimitive.Root>\n )\n}\n"]}
1
+ {"version":3,"file":"avatar_group.js","sourceRoot":"","sources":["../../../src/components/display/avatar_group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,eAGN,MAAM,+BAA+B,CAAA;AAUtC,MAAM,UAAU,WAAW,CAAC,EAC1B,UAAU,EACV,YAAY,GAAG,KAAK,EACpB,gBAAgB,GAAG,gBAAgB,EACnC,IAAI,GAAG,IAAI,GACa;IACxB,MAAM,kBAAkB,GAAG,YAAY,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,CAAA;IAEjF,OAAO,CACL,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAC/B;MAAA,CAAC,eAAe,CAAC,IAAI,CACnB;QAAA,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACpB,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,EAAG,CAC1D,CAAC,CAAC,CAAC,CACF,EACE;YAAA,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,EAC9C;YAAA,CAAC,eAAe,CAAC,WAAW,CAAC,AAAD,EAC9B;UAAA,GAAG,CACJ,CACH;MAAA,EAAE,eAAe,CAAC,IAAI,CACxB;IAAA,EAAE,eAAe,CAAC,IAAI,CAAC,CACxB,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport AvatarPrimitive, {\n type AvatarGroupProps,\n type AvatarRootProps,\n} from '../primitive/avatar_primitive'\nimport { type IconString } from './icon'\n\ninterface AvatarGroupDisplayProps {\n sourceUris: AvatarGroupProps['sourceUris']\n showFallback?: boolean\n fallbackIconName?: IconString\n size?: AvatarRootProps['size']\n}\n\nexport function AvatarGroup({\n sourceUris,\n showFallback = false,\n fallbackIconName = 'general.person',\n size = 'lg',\n}: AvatarGroupDisplayProps) {\n const shouldShowFallback = showFallback || !sourceUris || sourceUris.length === 0\n\n return (\n <AvatarPrimitive.Root size={size}>\n <AvatarPrimitive.Mask>\n {shouldShowFallback ? (\n <AvatarPrimitive.ImageFallback name={fallbackIconName} />\n ) : (\n <>\n <AvatarPrimitive.Group sourceUris={sourceUris} />\n <AvatarPrimitive.GroupLoader />\n </>\n )}\n </AvatarPrimitive.Mask>\n </AvatarPrimitive.Root>\n )\n}\n"]}
@@ -1,13 +1,18 @@
1
1
  import { type ViewStyle } from 'react-native';
2
- import { type IconString } from './icon';
2
+ import { type HeadingProps } from './heading';
3
+ import { type IconString, type IconStyle } from './icon';
4
+ import { type TextProps } from './text';
3
5
  import { type ButtonProps } from './button';
4
6
  interface BlankStateProps {
5
7
  iconName?: IconString;
8
+ iconStyle?: IconStyle;
6
9
  title: string;
10
+ titleStyle?: HeadingProps['style'];
7
11
  subtitle?: string;
12
+ subtitleStyle?: TextProps['style'];
8
13
  style?: ViewStyle;
9
14
  buttonProps?: ButtonProps;
10
15
  }
11
- export declare const BlankState: ({ iconName, title, subtitle, style, buttonProps }: BlankStateProps) => import("react").JSX.Element;
16
+ export declare const BlankState: ({ iconName, title, titleStyle, subtitle, subtitleStyle, style, iconStyle, buttonProps, }: BlankStateProps) => import("react").JSX.Element;
12
17
  export {};
13
18
  //# sourceMappingURL=blank_state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blank_state.d.ts","sourceRoot":"","sources":["../../../src/components/display/blank_state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAc,MAAM,cAAc,CAAA;AAE/D,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAA;AAG9C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAEnD,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,eAAO,MAAM,UAAU,sDAAuD,eAAe,gCAmB5F,CAAA"}
1
+ {"version":3,"file":"blank_state.d.ts","sourceRoot":"","sources":["../../../src/components/display/blank_state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAc,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAQ,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC9D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAEnD,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAClC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,eAAO,MAAM,UAAU,6FASpB,eAAe,gCAoBjB,CAAA"}
@@ -4,15 +4,16 @@ import { Icon } from './icon';
4
4
  import { Text } from './text';
5
5
  import { useTheme } from '../../hooks';
6
6
  import { Button } from './button';
7
- export const BlankState = ({ iconName, title, subtitle, style, buttonProps }) => {
7
+ export const BlankState = ({ iconName, title, titleStyle, subtitle, subtitleStyle, style, iconStyle, buttonProps, }) => {
8
8
  const styles = useStyles();
9
9
  return (<View style={[styles.container, style]}>
10
- {iconName && <Icon name={iconName} size={32} style={styles.icon}/>}
10
+ {iconName && <Icon name={iconName} size={32} style={[styles.icon, iconStyle]}/>}
11
+
11
12
  <View style={styles.content}>
12
- <Heading variant="h3" style={styles.baseText}>
13
+ <Heading variant="h3" style={[styles.baseText, titleStyle]}>
13
14
  {title}
14
15
  </Heading>
15
- {subtitle && (<Text variant="tertiary" style={styles.baseText}>
16
+ {subtitle && (<Text variant="tertiary" style={[styles.baseText, subtitleStyle]}>
16
17
  {subtitle}
17
18
  </Text>)}
18
19
  </View>
@@ -30,7 +31,7 @@ const useStyles = () => {
30
31
  padding: 16,
31
32
  },
32
33
  icon: {
33
- color: colors.iconColorDefaultSecondary,
34
+ color: colors.iconColorDefaultDisabled,
34
35
  },
35
36
  content: {
36
37
  alignItems: 'center',
@@ -1 +1 @@
1
- {"version":3,"file":"blank_state.js","sourceRoot":"","sources":["../../../src/components/display/blank_state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,IAAI,EAAmB,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAA;AAUnD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAmB,EAAE,EAAE;IAC/F,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACrC;MAAA,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAG,CACnE;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAC1B;QAAA,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAC3C;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,OAAO,CACT;QAAA,CAAC,QAAQ,IAAI,CACX,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAC9C;YAAA,CAAC,QAAQ,CACX;UAAA,EAAE,IAAI,CAAC,CACR,CACH;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,EAAG,CACzE;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;YACP,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,GAAG,EAAE,EAAE;YACP,OAAO,EAAE,EAAE;SACZ;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;YACN,QAAQ,EAAE,GAAG;SACd;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, type ViewStyle, StyleSheet } from 'react-native'\nimport { Heading } from './heading'\nimport { Icon, type IconString } from './icon'\nimport { Text } from './text'\nimport { useTheme } from '../../hooks'\nimport { Button, type ButtonProps } from './button'\n\ninterface BlankStateProps {\n iconName?: IconString\n title: string\n subtitle?: string\n style?: ViewStyle\n buttonProps?: ButtonProps\n}\n\nexport const BlankState = ({ iconName, title, subtitle, style, buttonProps }: BlankStateProps) => {\n const styles = useStyles()\n\n return (\n <View style={[styles.container, style]}>\n {iconName && <Icon name={iconName} size={32} style={styles.icon} />}\n <View style={styles.content}>\n <Heading variant=\"h3\" style={styles.baseText}>\n {title}\n </Heading>\n {subtitle && (\n <Text variant=\"tertiary\" style={styles.baseText}>\n {subtitle}\n </Text>\n )}\n </View>\n {buttonProps && <Button variant=\"outline\" size=\"sm\" {...buttonProps} />}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n gap: 16,\n padding: 16,\n },\n icon: {\n color: colors.iconColorDefaultSecondary,\n },\n content: {\n alignItems: 'center',\n gap: 4,\n maxWidth: 250,\n },\n baseText: {\n textAlign: 'center',\n color: colors.textColorDefaultSecondary,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"blank_state.js","sourceRoot":"","sources":["../../../src/components/display/blank_state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAqB,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,IAAI,EAAmC,MAAM,QAAQ,CAAA;AAC9D,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAA;AAanD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,SAAS,EACT,WAAW,GACK,EAAE,EAAE;IACpB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE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J,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;YACN,QAAQ,EAAE,GAAG;SACd;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, type ViewStyle, StyleSheet } from 'react-native'\nimport { Heading, type HeadingProps } from './heading'\nimport { Icon, type IconString, type IconStyle } from './icon'\nimport { Text, type TextProps } from './text'\nimport { useTheme } from '../../hooks'\nimport { Button, type ButtonProps } from './button'\n\ninterface BlankStateProps {\n iconName?: IconString\n iconStyle?: IconStyle\n title: string\n titleStyle?: HeadingProps['style']\n subtitle?: string\n subtitleStyle?: TextProps['style']\n style?: ViewStyle\n buttonProps?: ButtonProps\n}\n\nexport const BlankState = ({\n iconName,\n title,\n titleStyle,\n subtitle,\n subtitleStyle,\n style,\n iconStyle,\n buttonProps,\n}: BlankStateProps) => {\n const styles = useStyles()\n\n return (\n <View style={[styles.container, style]}>\n {iconName && <Icon name={iconName} size={32} style={[styles.icon, iconStyle]} />}\n\n <View style={styles.content}>\n <Heading variant=\"h3\" style={[styles.baseText, titleStyle]}>\n {title}\n </Heading>\n {subtitle && (\n <Text variant=\"tertiary\" style={[styles.baseText, subtitleStyle]}>\n {subtitle}\n </Text>\n )}\n </View>\n {buttonProps && <Button variant=\"outline\" size=\"sm\" {...buttonProps} />}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n gap: 16,\n padding: 16,\n },\n icon: {\n color: colors.iconColorDefaultDisabled,\n },\n content: {\n alignItems: 'center',\n gap: 4,\n maxWidth: 250,\n },\n baseText: {\n textAlign: 'center',\n color: colors.textColorDefaultSecondary,\n },\n })\n}\n"]}
@@ -3,8 +3,9 @@ import { MemberResource } from '../../types';
3
3
  import { type ViewStyle } from 'react-native';
4
4
  interface ChildNoticeProps {
5
5
  childMembers: MemberResource[];
6
+ showMembers?: boolean;
6
7
  style?: ViewStyle;
7
8
  }
8
- export declare function ChildNotice({ childMembers, style }: ChildNoticeProps): React.JSX.Element;
9
+ export declare function ChildNotice({ childMembers, showMembers, style }: ChildNoticeProps): React.JSX.Element;
9
10
  export {};
10
11
  //# sourceMappingURL=child_notice.d.ts.map