@planningcenter/chat-react-native 3.2.0-rc.0 → 3.2.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/message_form.d.ts +2 -2
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +95 -41
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +2 -2
- package/build/components/conversations/action_toggle_button.d.ts +21 -0
- package/build/components/conversations/action_toggle_button.d.ts.map +1 -0
- package/build/components/conversations/action_toggle_button.js +48 -0
- package/build/components/conversations/action_toggle_button.js.map +1 -0
- package/build/components/conversations/conversation_actions.d.ts +10 -0
- package/build/components/conversations/conversation_actions.d.ts.map +1 -0
- package/build/components/conversations/conversation_actions.js +84 -0
- package/build/components/conversations/conversation_actions.js.map +1 -0
- package/build/components/conversations/conversation_preview.d.ts +2 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +27 -9
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +2 -3
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +5 -11
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts +5 -0
- package/build/components/conversations/mute_indicator.d.ts.map +1 -0
- package/build/components/conversations/mute_indicator.js +19 -0
- package/build/components/conversations/mute_indicator.js.map +1 -0
- package/build/components/conversations/unread_count_badge.d.ts +2 -1
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.js +9 -1
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.js +1 -2
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/badge.d.ts +5 -4
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +5 -2
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/button.d.ts +3 -2
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/icon.d.ts +14 -1
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +9 -0
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_button.d.ts +2 -2
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/index.d.ts +1 -0
- package/build/components/display/index.d.ts.map +1 -1
- package/build/components/display/index.js +1 -0
- package/build/components/display/index.js.map +1 -1
- package/build/components/display/person.d.ts +3 -1
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -2
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/toggle_button.d.ts +43 -0
- package/build/components/display/toggle_button.d.ts.map +1 -0
- package/build/components/display/toggle_button.js +67 -0
- package/build/components/display/toggle_button.js.map +1 -0
- package/build/components/display/utils/button_colors.d.ts +3 -3
- package/build/components/display/utils/button_colors.d.ts.map +1 -1
- package/build/components/display/utils/button_colors.js +1 -1
- package/build/components/display/utils/button_colors.js.map +1 -1
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
- package/build/components/primitive/avatar_primitive.js +3 -2
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +2 -1
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +0 -1
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +2 -0
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +6 -1
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +14 -0
- package/build/contexts/conversations_context.d.ts.map +1 -0
- package/build/contexts/conversations_context.js +38 -0
- package/build/contexts/conversations_context.js.map +1 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +214 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.js +50 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -0
- package/build/hooks/use_conversation.d.ts +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +1 -1
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversations.d.ts +6 -32
- package/build/hooks/use_conversations.d.ts.map +1 -1
- package/build/hooks/use_conversations.js +15 -14
- package/build/hooks/use_conversations.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +221 -0
- package/build/hooks/use_conversations_actions.d.ts.map +1 -0
- package/build/hooks/use_conversations_actions.js +93 -0
- package/build/hooks/use_conversations_actions.js.map +1 -0
- package/build/hooks/use_conversations_cache.d.ts +18 -0
- package/build/hooks/use_conversations_cache.d.ts.map +1 -0
- package/build/hooks/{use_conversation_jolt_events.js → use_conversations_cache.js} +27 -17
- package/build/hooks/use_conversations_cache.js.map +1 -0
- package/build/hooks/use_conversations_jolt_events.d.ts +3 -0
- package/build/hooks/use_conversations_jolt_events.d.ts.map +1 -0
- package/build/hooks/use_conversations_jolt_events.js +12 -0
- package/build/hooks/use_conversations_jolt_events.js.map +1 -0
- package/build/hooks/use_create_android_ripple_color.d.ts +1 -1
- package/build/hooks/use_create_android_ripple_color.d.ts.map +1 -1
- package/build/hooks/use_giphy.d.ts +9 -0
- package/build/hooks/use_giphy.d.ts.map +1 -0
- package/build/hooks/use_giphy.js +63 -0
- package/build/hooks/use_giphy.js.map +1 -0
- package/build/hooks/use_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +39 -10
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_message_create.d.ts +11 -0
- package/build/hooks/use_message_create.d.ts.map +1 -0
- package/build/hooks/use_message_create.js +35 -0
- package/build/hooks/use_message_create.js.map +1 -0
- package/build/navigation/index.d.ts +24 -7
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +26 -9
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -0
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +2 -1
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +19 -14
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.js +1 -1
- package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +12 -0
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -0
- package/build/screens/conversation_new/components/form_list.js +42 -0
- package/build/screens/conversation_new/components/form_list.js.map +1 -0
- package/build/screens/conversation_new/components/groups_form.d.ts +7 -0
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -0
- package/build/screens/conversation_new/components/groups_form.js +128 -0
- package/build/screens/conversation_new/components/groups_form.js.map +1 -0
- package/build/screens/conversation_new/components/member_error_card.d.ts +5 -0
- package/build/screens/conversation_new/components/member_error_card.d.ts.map +1 -0
- package/build/screens/conversation_new/components/member_error_card.js +17 -0
- package/build/screens/conversation_new/components/member_error_card.js.map +1 -0
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +2 -0
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -0
- package/build/screens/conversation_new/components/source_app_error_card.js +16 -0
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -0
- package/build/screens/conversation_new/components/team_form.d.ts +8 -0
- package/build/screens/conversation_new/components/team_form.d.ts.map +1 -0
- package/build/screens/conversation_new/components/team_form.js +11 -0
- package/build/screens/conversation_new/components/team_form.js.map +1 -0
- package/build/screens/conversation_new/conversation_new_screen.d.ts +12 -0
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -0
- package/build/screens/conversation_new/conversation_new_screen.js +16 -0
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -0
- package/build/screens/conversation_new/utils/fake_member_data.d.ts +3 -0
- package/build/screens/conversation_new/utils/fake_member_data.d.ts.map +1 -0
- package/build/screens/conversation_new/utils/fake_member_data.js +129 -0
- package/build/screens/conversation_new/utils/fake_member_data.js.map +1 -0
- package/build/screens/conversation_screen.d.ts +1 -0
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +1 -1
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map +1 -0
- package/build/screens/{create → conversation_select_recipients}/conversation_select_recipients_screen.js +6 -5
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +1 -0
- package/build/screens/conversations/components/chat_group_badge.d.ts +3 -0
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -0
- package/build/screens/conversations/components/chat_group_badge.js +40 -0
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -0
- package/build/screens/conversations/components/list_header_component.d.ts +3 -0
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -0
- package/build/screens/conversations/components/list_header_component.js +92 -0
- package/build/screens/conversations/components/list_header_component.js.map +1 -0
- package/build/screens/{conversations_screen.d.ts → conversations/conversations_screen.d.ts} +1 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -0
- package/build/screens/conversations/conversations_screen.js +28 -0
- package/build/screens/conversations/conversations_screen.js.map +1 -0
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +10 -1
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +2 -2
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +1 -1
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +10 -0
- package/build/screens/send_giphy_screen.d.ts.map +1 -0
- package/build/screens/send_giphy_screen.js +98 -0
- package/build/screens/send_giphy_screen.js.map +1 -0
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/groups/groups_member_resource_with_person.d.ts +14 -0
- package/build/types/resources/groups/groups_member_resource_with_person.d.ts.map +1 -0
- package/build/types/resources/groups/groups_member_resource_with_person.js +2 -0
- package/build/types/resources/groups/groups_member_resource_with_person.js.map +1 -0
- package/build/types/resources/member.d.ts +0 -10
- package/build/types/resources/member.d.ts.map +1 -1
- package/build/types/resources/member.js.map +1 -1
- package/build/utils/cache/page_mutations.d.ts +18 -0
- package/build/utils/cache/page_mutations.d.ts.map +1 -1
- package/build/utils/cache/page_mutations.js +13 -0
- package/build/utils/cache/page_mutations.js.map +1 -1
- package/build/utils/client/client.d.ts +2 -2
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js +12 -4
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/client/request_helpers.d.ts +15 -8
- package/build/utils/client/request_helpers.d.ts.map +1 -1
- package/build/utils/client/request_helpers.js +2 -1
- package/build/utils/client/request_helpers.js.map +1 -1
- package/build/utils/client/transform_request_data.d.ts +11 -6
- package/build/utils/client/transform_request_data.d.ts.map +1 -1
- package/build/utils/client/transform_request_data.js +1 -1
- package/build/utils/client/transform_request_data.js.map +1 -1
- package/build/utils/client/transform_response.d.ts +1 -1
- package/build/utils/client/transform_response.d.ts.map +1 -1
- package/build/utils/client/transform_response.js +2 -0
- package/build/utils/client/transform_response.js.map +1 -1
- package/build/utils/client/utils.d.ts +3 -3
- package/build/utils/client/utils.d.ts.map +1 -1
- package/build/utils/client/utils.js +6 -6
- package/build/utils/client/utils.js.map +1 -1
- package/build/utils/date.d.ts.map +1 -1
- package/build/utils/date.js +1 -0
- package/build/utils/date.js.map +1 -1
- package/build/utils/deepCamelCaseKeys.d.ts.map +1 -1
- package/build/utils/deepCamelCaseKeys.js +3 -1
- package/build/utils/deepCamelCaseKeys.js.map +1 -1
- package/build/utils/parse_simple_markdown.d.ts +1 -1
- package/build/utils/parse_simple_markdown.d.ts.map +1 -1
- package/build/utils/parse_simple_markdown.js +2 -1
- package/build/utils/parse_simple_markdown.js.map +1 -1
- package/build/utils/request/conversation.d.ts +1 -3
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +37 -30
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/space.js.map +1 -1
- package/build/utils/uri.d.ts +2 -2
- package/build/utils/uri.d.ts.map +1 -1
- package/build/utils/uri.js +2 -2
- package/build/utils/uri.js.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts +8 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.js +8 -0
- package/build/vendor/tapestry/alias_tokens_color_map.js.map +1 -1
- package/build/vendor/tapestry/tokens.d.ts +2 -0
- package/build/vendor/tapestry/tokens.d.ts.map +1 -1
- package/build/vendor/tapestry/tokens.js +2 -0
- package/build/vendor/tapestry/tokens.js.map +1 -1
- package/package.json +8 -6
- package/src/__tests__/utils/cache/page_mutations.ts +49 -15
- package/src/components/conversation/message_form.tsx +127 -58
- package/src/components/conversations/action_toggle_button.tsx +84 -0
- package/src/components/conversations/conversation_actions.tsx +146 -0
- package/src/components/conversations/conversation_preview.tsx +46 -16
- package/src/components/conversations/conversations.tsx +13 -18
- package/src/components/conversations/mute_indicator.tsx +21 -0
- package/src/components/conversations/unread_count_badge.tsx +8 -1
- package/src/components/display/action_button.tsx +1 -2
- package/src/components/display/badge.tsx +12 -8
- package/src/components/display/button.tsx +3 -3
- package/src/components/display/icon.tsx +16 -3
- package/src/components/display/icon_button.tsx +2 -2
- package/src/components/display/index.ts +1 -0
- package/src/components/display/person.tsx +4 -3
- package/src/components/display/text.tsx +1 -1
- package/src/components/display/toggle_button.tsx +157 -0
- package/src/components/display/utils/button_colors.ts +8 -3
- package/src/components/primitive/avatar_primitive.tsx +5 -3
- package/src/components/primitive/banner_primitive.tsx +2 -3
- package/src/contexts/api_provider.tsx +1 -1
- package/src/contexts/chat_context.tsx +8 -1
- package/src/contexts/conversations_context.tsx +69 -0
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +57 -0
- package/src/hooks/use_conversation.ts +5 -5
- package/src/hooks/use_conversations.ts +34 -16
- package/src/hooks/use_conversations_actions.ts +108 -0
- package/src/hooks/{use_conversation_jolt_events.ts → use_conversations_cache.ts} +35 -20
- package/src/hooks/use_conversations_jolt_events.ts +21 -0
- package/src/hooks/use_giphy.ts +97 -0
- package/src/hooks/use_jolt.ts +53 -12
- package/src/hooks/use_message_create.ts +55 -0
- package/src/navigation/index.tsx +32 -9
- package/src/screens/conversation_filters/components/conversation_filters.tsx +1 -1
- package/src/screens/conversation_filters/components/rows.tsx +44 -14
- package/src/screens/conversation_filters/hooks/filters.ts +1 -1
- package/src/screens/conversation_new/components/form_list.tsx +67 -0
- package/src/screens/conversation_new/components/groups_form.tsx +191 -0
- package/src/screens/conversation_new/components/member_error_card.tsx +20 -0
- package/src/screens/conversation_new/components/source_app_error_card.tsx +24 -0
- package/src/screens/conversation_new/components/team_form.tsx +18 -0
- package/src/screens/conversation_new/conversation_new_screen.tsx +26 -0
- package/src/screens/conversation_new/utils/fake_member_data.ts +130 -0
- package/src/screens/conversation_screen.tsx +2 -1
- package/src/screens/{create → conversation_select_recipients}/conversation_select_recipients_screen.tsx +6 -5
- package/src/screens/conversations/components/chat_group_badge.tsx +47 -0
- package/src/screens/conversations/components/list_header_component.tsx +130 -0
- package/src/screens/conversations/conversations_screen.tsx +43 -0
- package/src/screens/design_system_screen.tsx +29 -0
- package/src/screens/message_actions_screen.tsx +4 -4
- package/src/screens/send_giphy_screen.tsx +155 -0
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/groups/groups_member_resource_with_person.ts +13 -0
- package/src/types/resources/member.ts +0 -11
- package/src/utils/cache/page_mutations.ts +22 -0
- package/src/utils/client/client.ts +15 -7
- package/src/utils/client/request_helpers.ts +15 -6
- package/src/utils/client/transform_request_data.ts +13 -4
- package/src/utils/client/transform_response.ts +3 -0
- package/src/utils/client/types.d.ts +2 -1
- package/src/utils/client/utils.ts +13 -12
- package/src/utils/date.ts +1 -0
- package/src/utils/deepCamelCaseKeys.ts +3 -2
- package/src/utils/parse_simple_markdown.ts +3 -1
- package/src/utils/request/conversation.ts +39 -34
- package/src/utils/space.ts +1 -1
- package/src/utils/uri.ts +2 -2
- package/src/vendor/tapestry/alias_tokens_color_map.ts +12 -0
- package/src/vendor/tapestry/tokens.ts +2 -0
- package/build/hooks/use_conversation_jolt_events.d.ts +0 -2
- package/build/hooks/use_conversation_jolt_events.d.ts.map +0 -1
- package/build/hooks/use_conversation_jolt_events.js.map +0 -1
- package/build/screens/conversations_screen.d.ts.map +0 -1
- package/build/screens/conversations_screen.js +0 -144
- package/build/screens/conversations_screen.js.map +0 -1
- package/build/screens/create/conversation_create_screen.d.ts +0 -9
- package/build/screens/create/conversation_create_screen.d.ts.map +0 -1
- package/build/screens/create/conversation_create_screen.js +0 -123
- package/build/screens/create/conversation_create_screen.js.map +0 -1
- package/build/screens/create/conversation_filter_recipients_screen.d.ts.map +0 -1
- package/build/screens/create/conversation_filter_recipients_screen.js.map +0 -1
- package/build/screens/create/conversation_select_recipients_screen.d.ts.map +0 -1
- package/build/screens/create/conversation_select_recipients_screen.js.map +0 -1
- package/src/screens/conversations_screen.tsx +0 -222
- package/src/screens/create/conversation_create_screen.tsx +0 -148
- /package/build/screens/{create → conversation_filter_recipients}/conversation_filter_recipients_screen.d.ts +0 -0
- /package/build/screens/{create → conversation_filter_recipients}/conversation_filter_recipients_screen.js +0 -0
- /package/build/screens/{create → conversation_select_recipients}/conversation_select_recipients_screen.d.ts +0 -0
- /package/src/screens/{create → conversation_filter_recipients}/conversation_filter_recipients_screen.tsx +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_create_screen.js","sourceRoot":"","sources":["../../../src/screens/create/conversation_create_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EAAE,KAAK,EAAiC,EAAE,EAAE;IACnF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAU,CAAA;IAC5C,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,cAAc,CAAsB;QAC1D,GAAG,EAAE,cAAc,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;QAC1C,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;aACV;YACD,OAAO,EAAE,CAAC,UAAU,CAAC;SACtB;QACD,GAAG,EAAE,QAAQ;KACd,CAAC,CAAA;IACF,MAAM,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YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;SAChC;QACD,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE;YACV,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,MAAM;YACrB,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACrD;QACD,cAAc,EAAE;YACd,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;YACvD,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;SACb;QACD,UAAU,EAAE,EAAE;QACd,EAAE,EAAE;YACF,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACxD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback, useState } from 'react'\nimport { StyleSheet, TextInput, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Text } from '../../components'\nimport { ActionButton } from '../../components/display/action_button'\nimport { useSuspenseGet, useTheme } from '../../hooks'\nimport { useApiClient } from '../../hooks/use_api_client'\nimport { useMutation } from '@tanstack/react-query'\nimport { GroupsGroupResource } from '../../types'\n\ntype ConversationCreateScreenProps = StaticScreenProps<{\n group_id?: string\n team_ids?: string[]\n}>\n\nexport const ConversationCreateScreen = ({ route }: ConversationCreateScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const [title, setTitle] = useState<string>()\n const apiClient = useApiClient()\n const { data: group } = useSuspenseGet<GroupsGroupResource>({\n url: `/me/groups/${route.params.group_id}`,\n data: {\n fields: {\n Group: [],\n },\n include: ['location'],\n },\n app: 'groups',\n })\n const { mutate: handleSave } = useMutation({\n throwOnError: true,\n onSuccess: result => {\n handleRedirectToConversation({ conversation_id: result.data.id })\n },\n mutationFn: () =>\n apiClient.groups\n .post({\n url: `/me/groups/${route.params.group_id}/chat_conversation_payload`,\n data: {\n data: {\n type: '',\n attributes: {\n title,\n },\n },\n },\n })\n .then(res => res.data.value)\n .then(payload =>\n apiClient.chat.post({\n url: '/me/conversations',\n data: {\n data: {\n type: 'Conversation',\n attributes: {\n payload,\n },\n },\n },\n })\n ),\n })\n\n const handleRedirectToConversation = useCallback(\n ({ conversation_id }: { conversation_id: number }) => {\n // exit from the create stack\n navigation.getParent()?.goBack()\n // navigate to the conversation screen\n navigation.dispatch(\n StackActions.push('Conversation', {\n conversation_id,\n })\n )\n },\n [navigation]\n )\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <View style={styles.to}>\n <Text>To:</Text>\n <View>\n <Text>{group.name}</Text>\n <Text>{group.membershipsCount} members</Text>\n </View>\n </View>\n <View style={styles.titleContainer}>\n <Text style={styles.titleLabel}>Title</Text>\n <TextInput\n placeholder=\"Topic of conversation (required)\"\n value={title}\n onChangeText={setTitle}\n style={styles.titleInput}\n />\n </View>\n </View>\n <ActionButton title=\"Start Conversation\" onPress={() => handleSave()} />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const theme = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n gap: 8,\n },\n section: {\n padding: 16,\n flex: 1,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n selectTeamsButton: {},\n routeDebug: {\n alignContent: 'center',\n padding: 16,\n paddingBottom: bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors.fillColorNeutral050Base,\n },\n titleContainer: {\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n gap: 8,\n },\n titleInput: {\n fontSize: 18,\n },\n titleLabel: {},\n to: {\n flexDirection: 'row',\n gap: 8,\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n },\n })\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filter_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/create/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,0CAA0C,EAAE,4BAKxD,CAAA;AAED,KAAK,uCAAuC,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAA;AAEpE,eAAO,MAAM,kCAAkC,OAAQ,uCAAuC,sBAmC7F,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filter_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/create/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEzF,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,CAAC,MAAM,0CAA0C,GAAiC;IACtF,YAAY,EAAE,WAAW;IACzB,WAAW,EAAE,KAAK;IAClB,mBAAmB,EAAE,CAAC,IAAI,CAAC;IAC3B,mBAAmB,EAAE,IAAI;CAC1B,CAAA;AAID,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,E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,IAAI,EAAE,CAAC;SACR;QACD,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE;YACV,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,MAAM;YACrB,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACrD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button } from '../../components'\nimport { useTheme } from '../../hooks'\n\nexport const ConversationFilterReceipientsScreenOptions: NativeStackNavigationOptions = {\n presentation: 'formSheet',\n headerShown: false,\n sheetAllowedDetents: [0.75],\n sheetGrabberVisible: true,\n}\n\ntype ConversationFilterRecipientsScreenProps = StaticScreenProps<{}>\n\nexport const ConversationFilterRecipientsScreen = ({}: ConversationFilterRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <Button\n style={styles.selectTeamsButton}\n onPress={() =>\n navigation.dispatch(\n StackActions.popTo('ConversationSelectRecipients', {\n chat_group_graph_id: 'TBD',\n })\n )\n }\n title=\"Redirect to select\"\n variant=\"outline\"\n />\n\n <Button\n style={styles.selectTeamsButton}\n onPress={() =>\n navigation.dispatch(\n StackActions.popTo('ConversationCreate', {\n chat_group_graph_id: 'TBD',\n })\n )\n }\n title=\"Redirect to form\"\n variant=\"outline\"\n />\n </View>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const theme = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n gap: 8,\n },\n section: {\n padding: 16,\n flexDirection: 'row',\n justifyContent: 'space-between',\n flex: 1,\n },\n selectTeamsButton: {},\n routeDebug: {\n alignContent: 'center',\n padding: 16,\n paddingBottom: bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors.fillColorNeutral050Base,\n },\n })\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_select_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/create/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,KAAK,uCAAuC,GAAG,iBAAiB,CAAC;IAC/D,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAC,CAAA;AAMF,eAAO,MAAM,kCAAkC,OAAQ,uCAAuC,sBAgE7F,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_select_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/create/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAM/D,MAAM,YAAY,GAAG,EAAE,GAAG,CAAC,CAAA;AAC3B,MAAM,eAAe,GAAG,EAAE,CAAA;AAC1B,MAAM,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAA;AAEvD,MAA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GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACtC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,CAAC;SACR;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;SAChC;QACD,iBAAiB,EAAE,EAAE;QACrB,GAAG,EAAE;YACH,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,CAAC;YACpB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SAClD;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,gBAAgB;YACxB,YAAY,EAAE,CAAC;SAChB;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,MAAM;YAClB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,mBAAmB;SACxC;QACD,UAAU,EAAE;YACV,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,MAAM;YACrB,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACrD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { ScrollView, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, Heading, Icon, Image, Text } from '../../components'\nimport { useTheme } from '../../hooks'\nimport { GroupsGroupResource } from '../../types'\nimport { useGroupsGroups } from '../../hooks/use_groups_groups'\n\ntype ConversationSelectRecipientsScreenProps = StaticScreenProps<{\n chat_group_graph_id?: string\n}>\n\nconst ASPECT_RATIO = 16 / 9\nconst THUMBNAIL_WIDTH = 80\nconst THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO\n\nexport const ConversationSelectRecipientsScreen = ({}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { data: groups = [] } = useGroupsGroups()\n const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation)\n\n const handleNavigateToCreateConversation = (group: GroupsGroupResource) => {\n navigation.navigate('Create', {\n screen: 'ConversationCreate',\n params: {\n group_id: group.id,\n },\n })\n }\n\n return (\n <ScrollView style={styles.container}>\n <View style={styles.section}>\n <View style={styles.sectionHeader}>\n <Heading>My groups</Heading>\n </View>\n <View>\n {groupsWithCreatePermission.map(group => (\n <PlatformPressable\n key={group.id}\n style={styles.row}\n onPress={() => handleNavigateToCreateConversation(group)}\n >\n <Image\n source={{ uri: group.headerImage?.thumbnail }}\n resizeMode=\"cover\"\n style={styles.rowImage}\n alt={`Image for ${group.name}`}\n />\n <View>\n <Heading variant=\"h3\">{group.name}</Heading>\n <Text>{group.membershipsCount} members</Text>\n </View>\n <Icon name=\"general.rightChevron\" size={16} style={styles.rowIconRight} />\n </PlatformPressable>\n ))}\n </View>\n </View>\n <View style={styles.section}>\n <View style={styles.sectionHeader}>\n <Heading>Teams I lead</Heading>\n <Button\n style={styles.selectTeamsButton}\n onPress={() =>\n navigation.navigate('Create', {\n screen: 'ConversationFilterRecipients',\n params: {\n conversation_id: '2196252',\n },\n })\n }\n title=\"Select teams\"\n variant=\"outline\"\n iconNameLeft=\"general.search\"\n />\n </View>\n </View>\n </ScrollView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const theme = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n gap: 8,\n },\n section: {\n padding: 16,\n flex: 1,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n selectTeamsButton: {},\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderColor: theme.colors.fillColorNeutral050Base,\n },\n rowImage: {\n width: THUMBNAIL_WIDTH,\n height: THUMBNAIL_HEIGHT,\n borderRadius: 4,\n },\n rowIconRight: {\n marginLeft: 'auto',\n color: theme.colors.fillColorNeutral030,\n },\n routeDebug: {\n alignContent: 'center',\n padding: 16,\n paddingBottom: bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors.fillColorNeutral050Base,\n },\n })\n}\n"]}
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { RouteProp, StaticScreenProps, useNavigation, useRoute } from '@react-navigation/native'
|
|
2
|
-
import React, { useCallback, useMemo } from 'react'
|
|
3
|
-
import { StyleSheet, View } from 'react-native'
|
|
4
|
-
import { Badge, Button, ButtonProps, Conversations, Heading, TextButton } from '../components'
|
|
5
|
-
import { ActionButton } from '../components/display/action_button'
|
|
6
|
-
import { useCanCreateConversations, useTheme } from '../hooks'
|
|
7
|
-
import { useApiGet } from '../hooks/use_api'
|
|
8
|
-
import { GraphId, GroupResource } from '../types/resources/group_resource'
|
|
9
|
-
import { useCanDisplayGroups } from '../hooks/use_groups'
|
|
10
|
-
|
|
11
|
-
export type ConversationScreenProps = StaticScreenProps<{
|
|
12
|
-
title?: string
|
|
13
|
-
chat_group_graph_id?: GraphId
|
|
14
|
-
group_source_app_name?: string
|
|
15
|
-
}>
|
|
16
|
-
|
|
17
|
-
export function ConversationsScreen({ route }: ConversationScreenProps) {
|
|
18
|
-
const navigation = useNavigation()
|
|
19
|
-
const canCreateConversations = useCanCreateConversations()
|
|
20
|
-
const styles = useStyles()
|
|
21
|
-
const { chat_group_graph_id, group_source_app_name } = route.params
|
|
22
|
-
|
|
23
|
-
const filter = useMemo(() => {
|
|
24
|
-
if (chat_group_graph_id) {
|
|
25
|
-
return 'group'
|
|
26
|
-
} else if (group_source_app_name) {
|
|
27
|
-
return 'group_source_app_name'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return 'mine_or_not_empty'
|
|
31
|
-
}, [chat_group_graph_id, group_source_app_name])
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<View style={styles.container}>
|
|
35
|
-
<Conversations
|
|
36
|
-
ListHeaderComponent={ListHeaderComponent}
|
|
37
|
-
group={chat_group_graph_id}
|
|
38
|
-
group_source_app_name={group_source_app_name}
|
|
39
|
-
filter={filter}
|
|
40
|
-
/>
|
|
41
|
-
<ActionButton
|
|
42
|
-
visible={canCreateConversations}
|
|
43
|
-
title="New conversation"
|
|
44
|
-
onPress={() => navigation.navigate('Create')}
|
|
45
|
-
/>
|
|
46
|
-
</View>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
enum FilterTypes {
|
|
51
|
-
All = 'All',
|
|
52
|
-
Groups = 'Groups',
|
|
53
|
-
Teams = 'Teams',
|
|
54
|
-
More = 'More',
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const ListHeaderComponent = () => {
|
|
58
|
-
const styles = useStyles()
|
|
59
|
-
const navigation = useNavigation()
|
|
60
|
-
const canFilterByTeams = useCanDisplayGroups({ source_app_name: 'Services', source_type: 'Team' })
|
|
61
|
-
const canFilterByGroups = useCanDisplayGroups({ source_app_name: 'Groups', source_type: 'Group' })
|
|
62
|
-
const route = useRoute<RouteProp<ConversationScreenProps['route']>>()
|
|
63
|
-
const { chat_group_graph_id, group_source_app_name = '' } = route.params
|
|
64
|
-
|
|
65
|
-
const active: FilterTypes = useMemo(() => {
|
|
66
|
-
if (chat_group_graph_id) {
|
|
67
|
-
return FilterTypes.More
|
|
68
|
-
} else if (/groups/i.test(group_source_app_name)) {
|
|
69
|
-
return FilterTypes.Groups
|
|
70
|
-
} else if (/services/i.test(group_source_app_name)) {
|
|
71
|
-
return FilterTypes.Teams
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return FilterTypes.All
|
|
75
|
-
}, [chat_group_graph_id, group_source_app_name])
|
|
76
|
-
|
|
77
|
-
const hideAppFilters = !canFilterByGroups || !canFilterByTeams
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<View style={styles.listHeader}>
|
|
81
|
-
<View style={styles.titleRow}>
|
|
82
|
-
<Heading numberOfLines={1} variant="h2">
|
|
83
|
-
Conversations
|
|
84
|
-
</Heading>
|
|
85
|
-
<TextButton>Mark all read</TextButton>
|
|
86
|
-
</View>
|
|
87
|
-
<View style={styles.filterRow}>
|
|
88
|
-
<FilterButton
|
|
89
|
-
title={FilterTypes.All}
|
|
90
|
-
activeTitle={active}
|
|
91
|
-
hidden={!canFilterByGroups || !canFilterByTeams}
|
|
92
|
-
onPress={() =>
|
|
93
|
-
navigation.setParams({
|
|
94
|
-
chat_group_graph_id: undefined,
|
|
95
|
-
group_source_app_name: undefined,
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
/>
|
|
99
|
-
<FilterButton
|
|
100
|
-
title={FilterTypes.Groups}
|
|
101
|
-
activeTitle={active}
|
|
102
|
-
hidden={hideAppFilters}
|
|
103
|
-
onPress={() =>
|
|
104
|
-
navigation.setParams({
|
|
105
|
-
chat_group_graph_id: undefined,
|
|
106
|
-
group_source_app_name: 'Groups',
|
|
107
|
-
})
|
|
108
|
-
}
|
|
109
|
-
/>
|
|
110
|
-
<FilterButton
|
|
111
|
-
title={FilterTypes.Teams}
|
|
112
|
-
activeTitle={active}
|
|
113
|
-
hidden={hideAppFilters}
|
|
114
|
-
onPress={() =>
|
|
115
|
-
navigation.setParams({
|
|
116
|
-
chat_group_graph_id: undefined,
|
|
117
|
-
group_source_app_name: 'Services',
|
|
118
|
-
})
|
|
119
|
-
}
|
|
120
|
-
/>
|
|
121
|
-
<Button
|
|
122
|
-
title={hideAppFilters ? 'Filter' : FilterTypes.More}
|
|
123
|
-
onPress={() =>
|
|
124
|
-
navigation.navigate('ConversationFilters', {
|
|
125
|
-
chat_group_graph_id,
|
|
126
|
-
group_source_app_name,
|
|
127
|
-
})
|
|
128
|
-
}
|
|
129
|
-
variant={active === FilterTypes.More ? 'fill' : 'outline'}
|
|
130
|
-
iconNameRight="general.threeReducingHorizontalBars"
|
|
131
|
-
/>
|
|
132
|
-
</View>
|
|
133
|
-
<Badges />
|
|
134
|
-
</View>
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const Badges = () => {
|
|
139
|
-
const styles = useStyles()
|
|
140
|
-
const navigation = useNavigation()
|
|
141
|
-
const route = useRoute<RouteProp<ConversationScreenProps['route']>>()
|
|
142
|
-
const { chat_group_graph_id } = route.params
|
|
143
|
-
const { data: group } = useApiGet<GroupResource>({
|
|
144
|
-
url: `/me/groups/${chat_group_graph_id}`,
|
|
145
|
-
data: {
|
|
146
|
-
fields: {
|
|
147
|
-
Group: [],
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
enabled: !!chat_group_graph_id,
|
|
151
|
-
app: 'chat',
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
const handleBadgePress = useCallback(() => {
|
|
155
|
-
navigation.setParams({
|
|
156
|
-
chat_group_graph_id: undefined,
|
|
157
|
-
group_source_app_name: undefined,
|
|
158
|
-
})
|
|
159
|
-
}, [navigation])
|
|
160
|
-
|
|
161
|
-
if (!group) return null
|
|
162
|
-
|
|
163
|
-
return (
|
|
164
|
-
<View style={styles.groupBadge}>
|
|
165
|
-
<Badge iconNameRight="general.x" label={group?.name || ''} onPress={handleBadgePress} />
|
|
166
|
-
</View>
|
|
167
|
-
)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function FilterButton({
|
|
171
|
-
title,
|
|
172
|
-
activeTitle,
|
|
173
|
-
onPress,
|
|
174
|
-
hidden = false,
|
|
175
|
-
...restProps
|
|
176
|
-
}: {
|
|
177
|
-
title: string
|
|
178
|
-
activeTitle: string
|
|
179
|
-
onPress: () => void
|
|
180
|
-
hidden?: boolean
|
|
181
|
-
} & ButtonProps) {
|
|
182
|
-
if (hidden) return null
|
|
183
|
-
|
|
184
|
-
return (
|
|
185
|
-
<Button
|
|
186
|
-
title={title}
|
|
187
|
-
variant={activeTitle === title ? 'fill' : 'outline'}
|
|
188
|
-
onPress={onPress}
|
|
189
|
-
{...restProps}
|
|
190
|
-
/>
|
|
191
|
-
)
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
const useStyles = () => {
|
|
195
|
-
const theme = useTheme()
|
|
196
|
-
return StyleSheet.create({
|
|
197
|
-
container: {
|
|
198
|
-
flex: 1,
|
|
199
|
-
justifyContent: 'center',
|
|
200
|
-
},
|
|
201
|
-
listHeader: {
|
|
202
|
-
borderBottomWidth: 1,
|
|
203
|
-
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
204
|
-
paddingHorizontal: 16,
|
|
205
|
-
paddingBottom: 16,
|
|
206
|
-
gap: 12,
|
|
207
|
-
},
|
|
208
|
-
titleRow: {
|
|
209
|
-
flexDirection: 'row',
|
|
210
|
-
justifyContent: 'space-between',
|
|
211
|
-
paddingTop: 8,
|
|
212
|
-
},
|
|
213
|
-
filterRow: {
|
|
214
|
-
flexDirection: 'row',
|
|
215
|
-
justifyContent: 'flex-start',
|
|
216
|
-
gap: 8,
|
|
217
|
-
},
|
|
218
|
-
groupBadge: {
|
|
219
|
-
flexDirection: 'row',
|
|
220
|
-
},
|
|
221
|
-
})
|
|
222
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'
|
|
2
|
-
import React, { useCallback, useState } from 'react'
|
|
3
|
-
import { StyleSheet, TextInput, View } from 'react-native'
|
|
4
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
5
|
-
import { Text } from '../../components'
|
|
6
|
-
import { ActionButton } from '../../components/display/action_button'
|
|
7
|
-
import { useSuspenseGet, useTheme } from '../../hooks'
|
|
8
|
-
import { useApiClient } from '../../hooks/use_api_client'
|
|
9
|
-
import { useMutation } from '@tanstack/react-query'
|
|
10
|
-
import { GroupsGroupResource } from '../../types'
|
|
11
|
-
|
|
12
|
-
type ConversationCreateScreenProps = StaticScreenProps<{
|
|
13
|
-
group_id?: string
|
|
14
|
-
team_ids?: string[]
|
|
15
|
-
}>
|
|
16
|
-
|
|
17
|
-
export const ConversationCreateScreen = ({ route }: ConversationCreateScreenProps) => {
|
|
18
|
-
const styles = useStyles()
|
|
19
|
-
const navigation = useNavigation()
|
|
20
|
-
const [title, setTitle] = useState<string>()
|
|
21
|
-
const apiClient = useApiClient()
|
|
22
|
-
const { data: group } = useSuspenseGet<GroupsGroupResource>({
|
|
23
|
-
url: `/me/groups/${route.params.group_id}`,
|
|
24
|
-
data: {
|
|
25
|
-
fields: {
|
|
26
|
-
Group: [],
|
|
27
|
-
},
|
|
28
|
-
include: ['location'],
|
|
29
|
-
},
|
|
30
|
-
app: 'groups',
|
|
31
|
-
})
|
|
32
|
-
const { mutate: handleSave } = useMutation({
|
|
33
|
-
throwOnError: true,
|
|
34
|
-
onSuccess: result => {
|
|
35
|
-
handleRedirectToConversation({ conversation_id: result.data.id })
|
|
36
|
-
},
|
|
37
|
-
mutationFn: () =>
|
|
38
|
-
apiClient.groups
|
|
39
|
-
.post({
|
|
40
|
-
url: `/me/groups/${route.params.group_id}/chat_conversation_payload`,
|
|
41
|
-
data: {
|
|
42
|
-
data: {
|
|
43
|
-
type: '',
|
|
44
|
-
attributes: {
|
|
45
|
-
title,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
})
|
|
50
|
-
.then(res => res.data.value)
|
|
51
|
-
.then(payload =>
|
|
52
|
-
apiClient.chat.post({
|
|
53
|
-
url: '/me/conversations',
|
|
54
|
-
data: {
|
|
55
|
-
data: {
|
|
56
|
-
type: 'Conversation',
|
|
57
|
-
attributes: {
|
|
58
|
-
payload,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
})
|
|
63
|
-
),
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
const handleRedirectToConversation = useCallback(
|
|
67
|
-
({ conversation_id }: { conversation_id: number }) => {
|
|
68
|
-
// exit from the create stack
|
|
69
|
-
navigation.getParent()?.goBack()
|
|
70
|
-
// navigate to the conversation screen
|
|
71
|
-
navigation.dispatch(
|
|
72
|
-
StackActions.push('Conversation', {
|
|
73
|
-
conversation_id,
|
|
74
|
-
})
|
|
75
|
-
)
|
|
76
|
-
},
|
|
77
|
-
[navigation]
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<View style={styles.container}>
|
|
82
|
-
<View style={styles.section}>
|
|
83
|
-
<View style={styles.to}>
|
|
84
|
-
<Text>To:</Text>
|
|
85
|
-
<View>
|
|
86
|
-
<Text>{group.name}</Text>
|
|
87
|
-
<Text>{group.membershipsCount} members</Text>
|
|
88
|
-
</View>
|
|
89
|
-
</View>
|
|
90
|
-
<View style={styles.titleContainer}>
|
|
91
|
-
<Text style={styles.titleLabel}>Title</Text>
|
|
92
|
-
<TextInput
|
|
93
|
-
placeholder="Topic of conversation (required)"
|
|
94
|
-
value={title}
|
|
95
|
-
onChangeText={setTitle}
|
|
96
|
-
style={styles.titleInput}
|
|
97
|
-
/>
|
|
98
|
-
</View>
|
|
99
|
-
</View>
|
|
100
|
-
<ActionButton title="Start Conversation" onPress={() => handleSave()} />
|
|
101
|
-
</View>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const useStyles = () => {
|
|
106
|
-
const { bottom } = useSafeAreaInsets()
|
|
107
|
-
const theme = useTheme()
|
|
108
|
-
|
|
109
|
-
return StyleSheet.create({
|
|
110
|
-
container: {
|
|
111
|
-
flex: 1,
|
|
112
|
-
gap: 8,
|
|
113
|
-
},
|
|
114
|
-
section: {
|
|
115
|
-
padding: 16,
|
|
116
|
-
flex: 1,
|
|
117
|
-
},
|
|
118
|
-
sectionHeader: {
|
|
119
|
-
flexDirection: 'row',
|
|
120
|
-
justifyContent: 'space-between',
|
|
121
|
-
},
|
|
122
|
-
selectTeamsButton: {},
|
|
123
|
-
routeDebug: {
|
|
124
|
-
alignContent: 'center',
|
|
125
|
-
padding: 16,
|
|
126
|
-
paddingBottom: bottom,
|
|
127
|
-
borderTopWidth: 1,
|
|
128
|
-
borderTopColor: theme.colors.fillColorNeutral050Base,
|
|
129
|
-
},
|
|
130
|
-
titleContainer: {
|
|
131
|
-
paddingVertical: 12,
|
|
132
|
-
borderBottomWidth: 1,
|
|
133
|
-
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
134
|
-
gap: 8,
|
|
135
|
-
},
|
|
136
|
-
titleInput: {
|
|
137
|
-
fontSize: 18,
|
|
138
|
-
},
|
|
139
|
-
titleLabel: {},
|
|
140
|
-
to: {
|
|
141
|
-
flexDirection: 'row',
|
|
142
|
-
gap: 8,
|
|
143
|
-
paddingVertical: 12,
|
|
144
|
-
borderBottomWidth: 1,
|
|
145
|
-
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
146
|
-
},
|
|
147
|
-
})
|
|
148
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|