@planningcenter/chat-react-native 3.2.0-rc.8 → 3.2.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.
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +13 -0
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -0
- package/build/components/conversation/message_form/message_form_attachment_image.js +78 -0
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -0
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +128 -16
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +2 -2
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +3 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +2 -2
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/display/action_button.d.ts +2 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +3 -4
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/banner.d.ts +6 -1
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +2 -2
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +1 -1
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +2 -2
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/child_notice.d.ts +3 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +2 -2
- package/build/components/display/child_notice.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/group_conversation_list.d.ts +19 -0
- package/build/components/group_conversation_list.d.ts.map +1 -0
- package/build/components/group_conversation_list.js +48 -0
- package/build/components/group_conversation_list.js.map +1 -0
- package/build/components/index.d.ts +1 -0
- package/build/components/index.d.ts.map +1 -1
- package/build/components/index.js +1 -0
- package/build/components/index.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +3 -0
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +4 -4
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/contexts/api_provider.d.ts +1 -1
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +3 -3
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +4 -4
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +3 -3
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.js +1 -1
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/hooks/attachments/supported_extensions.d.ts +2 -0
- package/build/hooks/attachments/supported_extensions.d.ts.map +1 -0
- package/build/hooks/attachments/supported_extensions.js +48 -0
- package/build/hooks/attachments/supported_extensions.js.map +1 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +235 -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 +55 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -0
- package/build/hooks/groups/use_groups_conversation_create.d.ts +9 -0
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -0
- package/build/hooks/groups/use_groups_conversation_create.js +36 -0
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -0
- package/build/hooks/index.d.ts +4 -0
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +4 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use_api.d.ts +43 -43
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +5 -0
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +5 -3
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_attachment_uploader.d.ts +26 -0
- package/build/hooks/use_attachment_uploader.d.ts.map +1 -0
- package/build/hooks/use_attachment_uploader.js +111 -0
- package/build/hooks/use_attachment_uploader.js.map +1 -0
- package/build/hooks/use_chat_permissions.d.ts +14 -14
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +1 -0
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +10 -0
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_conversations_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversations_jolt_events.js +4 -1
- package/build/hooks/use_conversations_jolt_events.js.map +1 -1
- package/build/hooks/use_current_person.d.ts +15 -0
- package/build/hooks/use_current_person.d.ts.map +1 -1
- package/build/hooks/use_current_person.js +26 -9
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_groups.d.ts +26 -26
- package/build/hooks/use_groups_groups.d.ts +26 -26
- package/build/hooks/use_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +15 -22
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_message_create.js +2 -2
- package/build/hooks/use_message_create.js.map +1 -1
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +5 -0
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_teams.d.ts +26 -26
- package/build/hooks/use_upload_client.d.ts +28 -0
- package/build/hooks/use_upload_client.d.ts.map +1 -0
- package/build/hooks/use_upload_client.js +32 -0
- package/build/hooks/use_upload_client.js.map +1 -0
- package/build/index.d.ts +3 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -2
- package/build/index.js.map +1 -1
- package/build/navigation/index.d.ts +52 -34
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +16 -2
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_details_screen.js +2 -2
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +74 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/header_row.js +69 -0
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts +5 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.js +46 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.js.map +1 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts +17 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js +37 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js.map +1 -0
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -3
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +67 -32
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js +32 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +8 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +65 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map +1 -0
- package/build/screens/conversation_filter_recipients/types.d.ts +38 -0
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/types.js +6 -0
- package/build/screens/conversation_filter_recipients/types.js.map +1 -0
- package/build/screens/conversation_filters/components/conversation_filters.js +5 -2
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +6 -1
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +12 -4
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +40 -40
- 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_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +12 -4
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.js +1 -0
- package/build/screens/conversation_filters_screen.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 +4 -2
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +82 -90
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/team_form.d.ts +1 -1
- package/build/screens/conversation_new/components/team_form.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +5 -2
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js +2 -2
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +7 -0
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +103 -4
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.d.ts +2 -0
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.js +17 -0
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +12 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +61 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +7 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +21 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +4 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +48 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts +2 -6
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js +37 -49
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts +9 -0
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/types/screen_props.js +2 -0
- package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -0
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +18 -4
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +2 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +32 -1
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.js +29 -1
- package/build/screens/send_giphy_screen.js.map +1 -1
- 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/types/resources/message.d.ts +2 -0
- package/build/types/resources/message.d.ts.map +1 -1
- package/build/types/resources/message.js.map +1 -1
- package/build/types/resources/oauth_token.d.ts +4 -4
- package/build/types/resources/oauth_token.d.ts.map +1 -1
- package/build/types/resources/oauth_token.js.map +1 -1
- package/build/utils/client/client.d.ts +4 -8
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js +10 -9
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/date.d.ts +5 -0
- package/build/utils/date.d.ts.map +1 -1
- package/build/utils/date.js +8 -1
- package/build/utils/date.js.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.d.ts +10 -0
- package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -0
- package/build/utils/destructure_chat_group_graph_id.js +8 -0
- package/build/utils/destructure_chat_group_graph_id.js.map +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/native_adapters/configuration.d.ts +4 -1
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +13 -1
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/native_adapters/image_picker.d.ts +25 -0
- package/build/utils/native_adapters/image_picker.d.ts.map +1 -0
- package/build/utils/native_adapters/image_picker.js +9 -0
- package/build/utils/native_adapters/image_picker.js.map +1 -0
- package/build/utils/native_adapters/index.d.ts +1 -0
- package/build/utils/native_adapters/index.d.ts.map +1 -1
- package/build/utils/native_adapters/index.js +1 -0
- package/build/utils/native_adapters/index.js.map +1 -1
- package/build/utils/session.d.ts +6 -2
- package/build/utils/session.d.ts.map +1 -1
- package/build/utils/session.js +6 -1
- package/build/utils/session.js.map +1 -1
- package/build/utils/upload_uri.d.ts +23 -0
- package/build/utils/upload_uri.d.ts.map +1 -0
- package/build/utils/upload_uri.js +60 -0
- package/build/utils/upload_uri.js.map +1 -0
- package/build/utils/uri.d.ts +10 -2
- package/build/utils/uri.d.ts.map +1 -1
- package/build/utils/uri.js +24 -6
- package/build/utils/uri.js.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.js +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.js.map +1 -1
- package/package.json +4 -3
- package/src/__tests__/hooks/useTheme.tsx +1 -1
- package/src/__tests__/{client.ts → utils/client.ts} +7 -115
- package/src/__tests__/{session.ts → utils/session.ts} +4 -4
- package/src/__tests__/utils/uri.ts +107 -0
- package/src/components/conversation/message_form/message_form_attachment_image.tsx +121 -0
- package/src/components/conversation/message_form.tsx +197 -31
- package/src/components/conversations/conversation_actions.tsx +2 -2
- package/src/components/conversations/conversation_preview.tsx +8 -2
- package/src/components/display/action_button.tsx +4 -3
- package/src/components/display/banner.tsx +7 -1
- package/src/components/display/banner_collapsible.tsx +6 -1
- package/src/components/display/child_notice.tsx +9 -3
- package/src/components/display/person.tsx +4 -3
- package/src/components/group_conversation_list.tsx +82 -0
- package/src/components/index.tsx +1 -0
- package/src/components/primitive/banner_primitive.tsx +12 -5
- package/src/contexts/api_provider.tsx +3 -3
- package/src/contexts/chat_context.tsx +7 -7
- package/src/contexts/conversations_context.tsx +1 -1
- package/src/hooks/attachments/supported_extensions.ts +47 -0
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +74 -0
- package/src/hooks/groups/use_groups_conversation_create.ts +50 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use_api.ts +13 -7
- package/src/hooks/use_api_client.ts +7 -3
- package/src/hooks/use_attachment_uploader.ts +179 -0
- package/src/hooks/use_conversation.ts +1 -0
- package/src/hooks/use_conversations_actions.ts +11 -0
- package/src/hooks/use_conversations_jolt_events.ts +5 -1
- package/src/hooks/use_current_person.ts +37 -9
- package/src/hooks/use_jolt.ts +18 -23
- package/src/hooks/use_message_create.ts +2 -2
- package/src/hooks/use_suspense_api.ts +6 -0
- package/src/hooks/use_upload_client.ts +67 -0
- package/src/index.tsx +3 -1
- package/src/navigation/index.tsx +23 -2
- package/src/screens/conversation_details_screen.tsx +2 -2
- package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +101 -0
- package/src/screens/conversation_filter_recipients/components/header_row.tsx +99 -0
- package/src/screens/conversation_filter_recipients/components/navigation_header.tsx +68 -0
- package/src/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.tsx +53 -0
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +90 -49
- package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx +50 -0
- package/src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts +90 -0
- package/src/screens/conversation_filter_recipients/types.tsx +47 -0
- package/src/screens/conversation_filters/components/conversation_filters.tsx +5 -2
- package/src/screens/conversation_filters/components/rows.tsx +6 -1
- package/src/screens/conversation_filters/group_filters.tsx +23 -14
- package/src/screens/conversation_filters/hooks/filters.ts +1 -1
- package/src/screens/conversation_filters/team_filters.tsx +23 -14
- package/src/screens/conversation_filters_screen.tsx +1 -0
- package/src/screens/conversation_new/components/form_list.tsx +67 -0
- package/src/screens/conversation_new/components/groups_form.tsx +133 -107
- package/src/screens/conversation_new/components/team_form.tsx +1 -1
- package/src/screens/conversation_new/conversation_new_screen.tsx +11 -4
- package/src/screens/conversation_screen.tsx +123 -4
- package/src/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.tsx +21 -0
- package/src/screens/conversation_select_recipients/components/recipient_link_row.tsx +91 -0
- package/src/screens/conversation_select_recipients/components/view_more_link_row.tsx +30 -0
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +79 -0
- package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx +57 -65
- package/src/screens/conversation_select_recipients/types/screen_props.tsx +11 -0
- package/src/screens/conversations/components/list_header_component.tsx +20 -4
- package/src/screens/conversations/conversations_screen.tsx +37 -2
- package/src/screens/send_giphy_screen.tsx +30 -1
- 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/types/resources/message.ts +2 -0
- package/src/types/resources/oauth_token.ts +4 -4
- package/src/utils/client/client.ts +13 -13
- package/src/utils/date.ts +11 -1
- package/src/utils/destructure_chat_group_graph_id.ts +25 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/native_adapters/configuration.ts +15 -1
- package/src/utils/native_adapters/image_picker.ts +31 -0
- package/src/utils/native_adapters/index.ts +1 -0
- package/src/utils/session.ts +10 -4
- package/src/utils/upload_uri.ts +69 -0
- package/src/utils/uri.ts +30 -6
- package/src/vendor/tapestry/alias_tokens_color_map.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/utils/client/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/utils/client/client.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,WAAW,EAEX,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAiB1B,MAAM,OAAO,MAAM;IACjB,OAAO,GAAW,EAAE,CAAA;IACpB,cAAc,GAA2B,EAAE,CAAA;IAC3C,sBAAsB,CAAyB;IAC/C,IAAI,CAAS;IAEb,YAAY,EAAE,OAAO,EAAE,cAAc,GAAG,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAc;QACpF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAA;QACpD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,GAAG,CAAwC,IAAgB;QAC/D,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAAA;QACnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAC/B,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;QACpD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CA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YACjC,GAAG,IAAI,CAAC,cAAc;SACvB,CAAA;IACH,CAAC;CACF;AAED,eAAe,MAAM,CAAA","sourcesContent":["import { ApiCollection, ApiError, ApiResource } from '../../types'\nimport {\n concatRecords,\n ensureNoQueryParamsInDev,\n makeRequest,\n MakeRequestArgs,\n throwErrorIfFieldsMissing,\n throwErrorIfQueryParams,\n} from './request_helpers'\n\nimport { DeleteRequest, GetRequest, PatchRequest, PostRequest, WalkRequest } from './types'\n\nexport interface ResponseError extends Response {\n errors: ApiError['errors']\n}\n\nexport type OnUnauthorizedResponse = (_response: ResponseError) => void\n\ntype ClientArgs = {\n version: string\n defaultHeaders?: Record<string, string>\n onUnauthorizedResponse?: OnUnauthorizedResponse\n root?: string\n}\n\nexport class Client {\n version: string = ''\n defaultHeaders: Record<string, string> = {}\n onUnauthorizedResponse?: OnUnauthorizedResponse\n root?: string\n\n constructor({ version, defaultHeaders = {}, onUnauthorizedResponse, root }: ClientArgs) {\n this.version = version\n this.defaultHeaders = defaultHeaders\n this.onUnauthorizedResponse = onUnauthorizedResponse\n this.root = root\n }\n\n async get<T extends ApiCollection | ApiResource>(args: GetRequest): Promise<T> {\n const { walk, ...data } = args.data\n const isWalking = Boolean(walk)\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n await throwErrorIfQueryParams(url)\n\n const requestArgs: MakeRequestArgs = { data, url, action: 'GET', headers }\n\n const walkRequest = ({\n url: requestUrl,\n data: d = { fields: {} },\n acc = { data: [], included: [], meta: {}, links: {} },\n ...options\n }: WalkRequest): Promise<T> => {\n return makeRequest({\n action: 'GET',\n data: d,\n url: requestUrl,\n ...options,\n headers,\n }).then(({ links, ...rest }) => {\n const records = Array.isArray(rest.data) ? concatRecords(acc, rest) : rest\n\n // `next` will have our params in the link so we do not want to pass them back in\n if (links?.next) {\n return walkRequest({ ...options, data: d, url: links.next, acc: records })\n } else {\n return records\n }\n })\n }\n\n const handler = isWalking\n ? (a: MakeRequestArgs | WalkRequest) => walkRequest(a as WalkRequest)\n : (a: MakeRequestArgs | WalkRequest) => makeRequest(a as MakeRequestArgs)\n\n return throwErrorIfFieldsMissing(handler, requestArgs)\n .then(response => response as T)\n .catch(this.handleNotOk)\n }\n\n async patch<T extends ApiCollection | ApiResource>(args: PatchRequest): Promise<T> {\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n const requestArgs: MakeRequestArgs = { data: args.data, url, action: 'PATCH', headers }\n\n return ensureNoQueryParamsInDev(makeRequest, requestArgs)\n .then(response => response as T)\n .catch(this.handleNotOk)\n }\n\n async post<T extends ApiCollection | ApiResource>(args: PostRequest): Promise<T> {\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n const requestArgs: MakeRequestArgs = { ...args, data: args.data, url, action: 'POST', headers }\n\n return ensureNoQueryParamsInDev(makeRequest, requestArgs)\n .then(response => response as T)\n .catch(this.handleNotOk)\n }\n\n async delete(args: DeleteRequest) {\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n const requestArgs: MakeRequestArgs = { url, action: 'DELETE', headers }\n\n return makeRequest(requestArgs).catch(this.handleNotOk)\n }\n\n handleNotOk = async (response: Response) => {\n if (response.status === 401) {\n const { errors } = await this.parseErrorResponse(response)\n this.onUnauthorizedResponse?.({\n ...response,\n errors: errors || [],\n })\n }\n\n return Promise.reject(response)\n }\n\n parseErrorResponse = async (response: Response): Promise<Partial<ApiError>> => {\n try {\n return (await response.json()) as ApiError\n } catch {\n return {}\n }\n }\n\n appUrl(url: string) {\n return `${this.root}${url}`\n }\n\n get headers() {\n return {\n Accept: 'application/vnd.api+json',\n 'Content-Type': 'application/json',\n 'X-PCO-API-Version': this.version,\n ...this.defaultHeaders,\n }\n }\n}\n\nexport default Client\n"]}
|
package/build/utils/date.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
type DateProps = string | number | Date;
|
|
2
2
|
export declare function formatDatePreview(date?: DateProps): any;
|
|
3
|
+
export declare function getRelativeDateStatus(date: DateProps): {
|
|
4
|
+
isToday: boolean;
|
|
5
|
+
isThisWeek: boolean;
|
|
6
|
+
isThisYear: boolean;
|
|
7
|
+
};
|
|
3
8
|
export {};
|
|
4
9
|
//# sourceMappingURL=date.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAIA,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;AAEvC,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,SAAS,OAcjD"}
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAIA,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;AAEvC,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,SAAS,OAcjD;AAOD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS;;;;EAQpD"}
|
package/build/utils/date.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @ts-
|
|
1
|
+
// @ts-expect-error
|
|
2
2
|
import { date as formatDate } from '@planningcenter/datetime-fmt';
|
|
3
3
|
import moment from 'moment-timezone';
|
|
4
4
|
export function formatDatePreview(date) {
|
|
@@ -21,4 +21,11 @@ const formatShorterDate = (date) => {
|
|
|
21
21
|
// Drop the century from the year
|
|
22
22
|
return formatDate(date, { style: 'short', year: true }).replace(/20(\d{2})/, '$1');
|
|
23
23
|
};
|
|
24
|
+
export function getRelativeDateStatus(date) {
|
|
25
|
+
const now = moment();
|
|
26
|
+
const isToday = now.isSame(date, 'day');
|
|
27
|
+
const isThisWeek = now.isSame(date, 'week');
|
|
28
|
+
const isThisYear = now.isSame(date, 'year');
|
|
29
|
+
return { isToday, isThisWeek, isThisYear };
|
|
30
|
+
}
|
|
24
31
|
//# sourceMappingURL=date.js.map
|
package/build/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAIpC,MAAM,UAAU,iBAAiB,CAAC,IAAgB;IAChD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAA;IAEpB,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IACpB,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IACvC,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAC3C,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAE3C,IAAI,OAAO;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACjD,IAAI,UAAU;QAAE,OAAO,UAAU,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,CAAA;IACpE,IAAI,UAAU;QAAE,OAAO,UAAU,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAA;IAEjE,wBAAwB;IACxB,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAA;AAChC,CAAC;AAED,MAAM,iBAAiB,GAAG,CAAC,IAAe,EAAE,EAAE;IAC5C,iCAAiC;IACjC,OAAO,UAAU,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;AACpF,CAAC,CAAA;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAe;IACnD,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IAEpB,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IACvC,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAC3C,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAE3C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAA;AAC5C,CAAC","sourcesContent":["// @ts-expect-error\nimport { date as formatDate } from '@planningcenter/datetime-fmt'\nimport moment from 'moment-timezone'\n\ntype DateProps = string | number | Date\n\nexport function formatDatePreview(date?: DateProps) {\n if (!date) return ''\n\n const now = moment()\n const isToday = now.isSame(date, 'day')\n const isThisWeek = now.isSame(date, 'week')\n const isThisYear = now.isSame(date, 'year')\n\n if (isToday) return moment(date).format('h:mm a')\n if (isThisWeek) return formatDate(date, { style: 'relative-short' })\n if (isThisYear) return formatDate(date, { style: 'abbreviated' })\n\n // TODO: Org date format\n return formatShorterDate(date)\n}\n\nconst formatShorterDate = (date: DateProps) => {\n // Drop the century from the year\n return formatDate(date, { style: 'short', year: true }).replace(/20(\\d{2})/, '$1')\n}\n\nexport function getRelativeDateStatus(date: DateProps) {\n const now = moment()\n\n const isToday = now.isSame(date, 'day')\n const isThisWeek = now.isSame(date, 'week')\n const isThisYear = now.isSame(date, 'year')\n\n return { isToday, isThisWeek, isThisYear }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AppName } from '../types/resources/app_name';
|
|
2
|
+
import { SourceType, GraphId } from '../types/resources/group_resource';
|
|
3
|
+
interface DestructuredChatGroupGraphIdType {
|
|
4
|
+
sourceAppName?: AppName;
|
|
5
|
+
sourceType?: SourceType;
|
|
6
|
+
sourceId?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function destructureChatGroupGraphId(chatGroupGraphId?: GraphId): DestructuredChatGroupGraphIdType;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=destructure_chat_group_graph_id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructure_chat_group_graph_id.d.ts","sourceRoot":"","sources":["../../src/utils/destructure_chat_group_graph_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAEvE,UAAU,gCAAgC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,2BAA2B,CACzC,gBAAgB,CAAC,EAAE,OAAO,GACzB,gCAAgC,CAalC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function destructureChatGroupGraphId(chatGroupGraphId) {
|
|
2
|
+
if (!chatGroupGraphId)
|
|
3
|
+
return { sourceAppName: undefined, sourceType: undefined, sourceId: undefined };
|
|
4
|
+
const [sourceAppName, sourceType, sourceIdString] = chatGroupGraphId.split('-');
|
|
5
|
+
const sourceIdNumber = Number(sourceIdString);
|
|
6
|
+
return { sourceAppName, sourceType, sourceId: sourceIdNumber };
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=destructure_chat_group_graph_id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructure_chat_group_graph_id.js","sourceRoot":"","sources":["../../src/utils/destructure_chat_group_graph_id.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,2BAA2B,CACzC,gBAA0B;IAE1B,IAAI,CAAC,gBAAgB;QACnB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;IAEjF,MAAM,CAAC,aAAa,EAAE,UAAU,EAAE,cAAc,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAI7E,CAAA;IAED,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;IAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAA;AAChE,CAAC","sourcesContent":["import { AppName } from '../types/resources/app_name'\nimport { SourceType, GraphId } from '../types/resources/group_resource'\n\ninterface DestructuredChatGroupGraphIdType {\n sourceAppName?: AppName\n sourceType?: SourceType\n sourceId?: number\n}\n\nexport function destructureChatGroupGraphId(\n chatGroupGraphId?: GraphId\n): DestructuredChatGroupGraphIdType {\n if (!chatGroupGraphId)\n return { sourceAppName: undefined, sourceType: undefined, sourceId: undefined }\n\n const [sourceAppName, sourceType, sourceIdString] = chatGroupGraphId.split('-') as [\n AppName,\n SourceType,\n string,\n ]\n\n const sourceIdNumber = Number(sourceIdString)\n\n return { sourceAppName, sourceType, sourceId: sourceIdNumber }\n}\n"]}
|
package/build/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,mCAAmC,CAAA"}
|
package/build/utils/index.js
CHANGED
package/build/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA","sourcesContent":["export * from './session'\nexport * from './theme'\nexport * from './styles'\nexport * from './space'\nexport * from './client'\nexport * from './uri'\nexport * from './cache'\nexport * from './native_adapters'\nexport * from './pluralize'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,mCAAmC,CAAA","sourcesContent":["export * from './session'\nexport * from './theme'\nexport * from './styles'\nexport * from './space'\nexport * from './client'\nexport * from './uri'\nexport * from './cache'\nexport * from './native_adapters'\nexport * from './pluralize'\nexport * from './destructure_chat_group_graph_id'\n"]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AudioAdapter } from './audio';
|
|
2
2
|
import { ClipboardAdapter } from './clipboard';
|
|
3
|
+
import { ImagePickerAdapter } from './image_picker';
|
|
3
4
|
import { VideoAdapter } from './video';
|
|
4
5
|
type ChatConfigurations = {
|
|
5
6
|
clipboard: ClipboardAdapter;
|
|
6
7
|
audio: AudioAdapter;
|
|
7
8
|
video: VideoAdapter;
|
|
9
|
+
imagePicker: ImagePickerAdapter;
|
|
8
10
|
};
|
|
9
11
|
export declare class ChatAdapters {
|
|
10
12
|
static configure(configurations: ChatConfigurations): void;
|
|
@@ -12,5 +14,6 @@ export declare class ChatAdapters {
|
|
|
12
14
|
declare let Clipboard: ClipboardAdapter;
|
|
13
15
|
declare let Audio: AudioAdapter;
|
|
14
16
|
declare let Video: VideoAdapter;
|
|
15
|
-
|
|
17
|
+
declare let ImagePicker: ImagePickerAdapter;
|
|
18
|
+
export { Clipboard, Audio, Video, ImagePicker };
|
|
16
19
|
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,KAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,KAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,gBAAgB,CAAA;IAC3B,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAA;AAED,qBAAa,YAAY;IACvB,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE,kBAAkB;CAMpD;AAMD,QAAA,IAAI,SAAS,EAAE,gBAMb,CAAA;AAEF,QAAA,IAAI,KAAK,EAAE,YAKT,CAAA;AAEF,QAAA,IAAI,KAAK,EAAE,YAQT,CAAA;AAEF,QAAA,IAAI,WAAW,EAAE,kBASf,CAAA;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { AudioAdapter } from './audio';
|
|
2
2
|
import { ClipboardAdapter } from './clipboard';
|
|
3
|
+
import { ImagePickerAdapter } from './image_picker';
|
|
3
4
|
import { VideoAdapter } from './video';
|
|
4
5
|
export class ChatAdapters {
|
|
5
6
|
static configure(configurations) {
|
|
6
7
|
Clipboard = configurations.clipboard;
|
|
7
8
|
Audio = configurations.audio;
|
|
8
9
|
Video = configurations.video;
|
|
10
|
+
ImagePicker = configurations.imagePicker;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
13
|
const methodMissing = () => {
|
|
@@ -30,5 +32,15 @@ let Video = new VideoAdapter({
|
|
|
30
32
|
return null;
|
|
31
33
|
}, { $$typeof: Symbol.for('react.forward_ref') }),
|
|
32
34
|
});
|
|
33
|
-
|
|
35
|
+
let ImagePicker = new ImagePickerAdapter({
|
|
36
|
+
openCameraAsync: async () => {
|
|
37
|
+
methodMissing();
|
|
38
|
+
return { canceled: true, assets: null };
|
|
39
|
+
},
|
|
40
|
+
openImageLibraryAsync: async () => {
|
|
41
|
+
methodMissing();
|
|
42
|
+
return { canceled: true, assets: null };
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export { Clipboard, Audio, Video, ImagePicker };
|
|
34
46
|
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAStC,MAAM,OAAO,YAAY;IACvB,MAAM,CAAC,SAAS,CAAC,cAAkC;QACjD,SAAS,GAAG,cAAc,CAAC,SAAS,CAAA;QACpC,KAAK,GAAG,cAAc,CAAC,KAAK,CAAA;QAC5B,KAAK,GAAG,cAAc,CAAC,KAAK,CAAA;QAC5B,WAAW,GAAG,cAAc,CAAC,WAAW,CAAA;IAC1C,CAAC;CACF;AAED,MAAM,aAAa,GAAG,GAAG,EAAE;IACzB,OAAO,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAA;AACnF,CAAC,CAAA;AAED,IAAI,SAAS,GAAqB,IAAI,gBAAgB,CAAC;IACrD,cAAc,EAAE,KAAK,IAAI,EAAE;QACzB,aAAa,EAAE,CAAA;QACf,OAAO,EAAE,CAAA;IACX,CAAC;IACD,cAAc,EAAE,KAAK,EAAE,CAAS,EAAE,EAAE,CAAC,aAAa,EAAE;CACrD,CAAC,CAAA;AAEF,IAAI,KAAK,GAAiB,IAAI,YAAY,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAS,EAAE,EAAE;QACtB,aAAa,EAAE,CAAA;QACf,OAAO,EAAS,CAAA;IAClB,CAAC;CACF,CAAC,CAAA;AAEF,IAAI,KAAK,GAAiB,IAAI,YAAY,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM,CACnB,GAAG,EAAE;QACH,aAAa,EAAE,CAAA;QACf,OAAO,IAAI,CAAA;IACb,CAAC,EACD,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAC9C;CACF,CAAC,CAAA;AAEF,IAAI,WAAW,GAAuB,IAAI,kBAAkB,CAAC;IAC3D,eAAe,EAAE,KAAK,IAAI,EAAE;QAC1B,aAAa,EAAE,CAAA;QACf,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACzC,CAAC;IACD,qBAAqB,EAAE,KAAK,IAAI,EAAE;QAChC,aAAa,EAAE,CAAA;QACf,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACzC,CAAC;CACF,CAAC,CAAA;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAA","sourcesContent":["import { AudioAdapter } from './audio'\nimport { ClipboardAdapter } from './clipboard'\nimport { ImagePickerAdapter } from './image_picker'\nimport { VideoAdapter } from './video'\n\ntype ChatConfigurations = {\n clipboard: ClipboardAdapter\n audio: AudioAdapter\n video: VideoAdapter\n imagePicker: ImagePickerAdapter\n}\n\nexport class ChatAdapters {\n static configure(configurations: ChatConfigurations) {\n Clipboard = configurations.clipboard\n Audio = configurations.audio\n Video = configurations.video\n ImagePicker = configurations.imagePicker\n }\n}\n\nconst methodMissing = () => {\n console.warn('ChatAdapters.configure() must be called before using any adapters')\n}\n\nlet Clipboard: ClipboardAdapter = new ClipboardAdapter({\n getStringAsync: async () => {\n methodMissing()\n return ''\n },\n setStringAsync: async (_: string) => methodMissing(),\n})\n\nlet Audio: AudioAdapter = new AudioAdapter({\n useAudio: (_: string) => {\n methodMissing()\n return {} as any\n },\n})\n\nlet Video: VideoAdapter = new VideoAdapter({\n Player: Object.assign(\n () => {\n methodMissing()\n return null\n },\n { $$typeof: Symbol.for('react.forward_ref') }\n ),\n})\n\nlet ImagePicker: ImagePickerAdapter = new ImagePickerAdapter({\n openCameraAsync: async () => {\n methodMissing()\n return { canceled: true, assets: null }\n },\n openImageLibraryAsync: async () => {\n methodMissing()\n return { canceled: true, assets: null }\n },\n})\n\nexport { Clipboard, Audio, Video, ImagePicker }\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ImagePickerAsset = {
|
|
2
|
+
uri: string;
|
|
3
|
+
assetId?: string | null;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
mimeType?: string;
|
|
7
|
+
fileName?: string | null;
|
|
8
|
+
fileSize?: number;
|
|
9
|
+
};
|
|
10
|
+
type ImagePickerSuccessResult = {
|
|
11
|
+
canceled: false;
|
|
12
|
+
assets: ImagePickerAsset[];
|
|
13
|
+
};
|
|
14
|
+
type ImagePickerCanceledResult = {
|
|
15
|
+
canceled: true;
|
|
16
|
+
assets: null;
|
|
17
|
+
};
|
|
18
|
+
export type ImagePickerResult = ImagePickerSuccessResult | ImagePickerCanceledResult;
|
|
19
|
+
export declare class ImagePickerAdapter {
|
|
20
|
+
openCameraAsync: () => Promise<ImagePickerResult>;
|
|
21
|
+
openImageLibraryAsync: () => Promise<ImagePickerResult>;
|
|
22
|
+
constructor(methods: ImagePickerAdapter);
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=image_picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image_picker.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/image_picker.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAA;IACf,MAAM,EAAE,gBAAgB,EAAE,CAAA;CAC3B,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,EAAE,IAAI,CAAA;IACd,MAAM,EAAE,IAAI,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,GAAG,yBAAyB,CAAA;AAEpF,qBAAa,kBAAkB;IAC7B,eAAe,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;IACjD,qBAAqB,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;gBAE3C,OAAO,EAAE,kBAAkB;CAIxC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export class ImagePickerAdapter {
|
|
2
|
+
openCameraAsync;
|
|
3
|
+
openImageLibraryAsync;
|
|
4
|
+
constructor(methods) {
|
|
5
|
+
this.openCameraAsync = methods.openCameraAsync;
|
|
6
|
+
this.openImageLibraryAsync = methods.openImageLibraryAsync;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=image_picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image_picker.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/image_picker.ts"],"names":[],"mappings":"AAsBA,MAAM,OAAO,kBAAkB;IAC7B,eAAe,CAAkC;IACjD,qBAAqB,CAAkC;IAEvD,YAAY,OAA2B;QACrC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAA;QAC9C,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAA;IAC5D,CAAC;CACF","sourcesContent":["export type ImagePickerAsset = {\n uri: string\n assetId?: string | null\n width: number\n height: number\n mimeType?: string\n fileName?: string | null\n fileSize?: number\n}\n\ntype ImagePickerSuccessResult = {\n canceled: false\n assets: ImagePickerAsset[]\n}\n\ntype ImagePickerCanceledResult = {\n canceled: true\n assets: null\n}\n\nexport type ImagePickerResult = ImagePickerSuccessResult | ImagePickerCanceledResult\n\nexport class ImagePickerAdapter {\n openCameraAsync: () => Promise<ImagePickerResult>\n openImageLibraryAsync: () => Promise<ImagePickerResult>\n\n constructor(methods: ImagePickerAdapter) {\n this.openCameraAsync = methods.openCameraAsync\n this.openImageLibraryAsync = methods.openImageLibraryAsync\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA","sourcesContent":["export * from './clipboard'\nexport * from './configuration'\nexport * from './audio'\nexport * from './video'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/native_adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA","sourcesContent":["export * from './clipboard'\nexport * from './configuration'\nexport * from './audio'\nexport * from './image_picker'\nexport * from './video'\n"]}
|
package/build/utils/session.d.ts
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { OAuthToken } from '../types';
|
|
2
2
|
export type ENV = 'production' | 'staging' | 'development';
|
|
3
|
+
export type OauthType = 'OAuth' | 'ChurchCenterOauth';
|
|
3
4
|
export type PartialToken = Pick<OAuthToken, 'access_token'> & Partial<OAuthToken>;
|
|
4
|
-
export type SessionProps<T
|
|
5
|
+
export type SessionProps<T extends PartialToken> = {
|
|
5
6
|
env?: ENV;
|
|
6
7
|
token?: T;
|
|
8
|
+
type?: OauthType;
|
|
7
9
|
};
|
|
8
10
|
/**
|
|
9
11
|
* Session class to track the environment and token
|
|
10
12
|
* Not intended to make network requests or handle authentication
|
|
11
13
|
*/
|
|
12
|
-
export declare class Session<T = PartialToken> {
|
|
14
|
+
export declare class Session<T extends PartialToken = PartialToken> {
|
|
13
15
|
env: ENV;
|
|
14
16
|
token: T | undefined;
|
|
17
|
+
type: OauthType;
|
|
15
18
|
constructor(props?: SessionProps<T>);
|
|
16
19
|
get isAuthenticated(): boolean;
|
|
20
|
+
get isChurchCenterToken(): boolean;
|
|
17
21
|
toString(): string;
|
|
18
22
|
static hydrate<T extends PartialToken>(sessionString: string): Session<T>;
|
|
19
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,MAAM,MAAM,GAAG,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,MAAM,MAAM,GAAG,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;AAC1D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,mBAAmB,CAAA;AACrD,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AACjF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,YAAY,IAAI;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAE7F;;;GAGG;AACH,qBAAa,OAAO,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IACxD,GAAG,EAAE,GAAG,CAAA;IACR,KAAK,EAAE,CAAC,GAAG,SAAS,CAAA;IACpB,IAAI,EAAE,SAAS,CAAA;gBAEH,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IAOnC,IAAI,eAAe,YAElB;IAED,IAAI,mBAAmB,YAEtB;IAED,QAAQ;IAIR,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,YAAY,EAAE,aAAa,EAAE,MAAM;CAQ7D"}
|
package/build/utils/session.js
CHANGED
|
@@ -5,14 +5,19 @@
|
|
|
5
5
|
export class Session {
|
|
6
6
|
env;
|
|
7
7
|
token;
|
|
8
|
+
type;
|
|
8
9
|
constructor(props) {
|
|
9
|
-
const { env = 'production', token } = props || {};
|
|
10
|
+
const { env = 'production', token, type } = props || {};
|
|
10
11
|
this.env = env;
|
|
11
12
|
this.token = token;
|
|
13
|
+
this.type = type || 'OAuth';
|
|
12
14
|
}
|
|
13
15
|
get isAuthenticated() {
|
|
14
16
|
return Boolean(this.token);
|
|
15
17
|
}
|
|
18
|
+
get isChurchCenterToken() {
|
|
19
|
+
return this.type === 'ChurchCenterOauth';
|
|
20
|
+
}
|
|
16
21
|
toString() {
|
|
17
22
|
return JSON.stringify({ env: this.env, token: this.token });
|
|
18
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MAAM,OAAO,OAAO;IAClB,GAAG,CAAK;IACR,KAAK,CAAe;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/utils/session.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MAAM,OAAO,OAAO;IAClB,GAAG,CAAK;IACR,KAAK,CAAe;IACpB,IAAI,CAAW;IAEf,YAAY,KAAuB;QACjC,MAAM,EAAE,GAAG,GAAG,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,EAAE,CAAA;QACvD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,OAAO,CAAA;IAC7B,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC5B,CAAC;IAED,IAAI,mBAAmB;QACrB,OAAO,IAAI,CAAC,IAAI,KAAK,mBAAmB,CAAA;IAC1C,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;IAC7D,CAAC;IAED,MAAM,CAAC,OAAO,CAAyB,aAAqB;QAC1D,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;YACvC,OAAO,IAAI,OAAO,CAAI,KAAK,CAAC,CAAA;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,OAAO,EAAK,CAAA;QACzB,CAAC;IACH,CAAC;CACF","sourcesContent":["import { OAuthToken } from '../types'\n\nexport type ENV = 'production' | 'staging' | 'development'\nexport type OauthType = 'OAuth' | 'ChurchCenterOauth'\nexport type PartialToken = Pick<OAuthToken, 'access_token'> & Partial<OAuthToken>\nexport type SessionProps<T extends PartialToken> = { env?: ENV; token?: T; type?: OauthType }\n\n/**\n * Session class to track the environment and token\n * Not intended to make network requests or handle authentication\n */\nexport class Session<T extends PartialToken = PartialToken> {\n env: ENV\n token: T | undefined\n type: OauthType\n\n constructor(props?: SessionProps<T>) {\n const { env = 'production', token, type } = props || {}\n this.env = env\n this.token = token\n this.type = type || 'OAuth'\n }\n\n get isAuthenticated() {\n return Boolean(this.token)\n }\n\n get isChurchCenterToken() {\n return this.type === 'ChurchCenterOauth'\n }\n\n toString() {\n return JSON.stringify({ env: this.env, token: this.token })\n }\n\n static hydrate<T extends PartialToken>(sessionString: string) {\n try {\n const props = JSON.parse(sessionString)\n return new Session<T>(props)\n } catch (error) {\n return new Session<T>()\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Session } from './session';
|
|
2
|
+
/**
|
|
3
|
+
* This is for accessing https://github.com/planningcenter/upload
|
|
4
|
+
*/
|
|
5
|
+
export declare class UploadUri {
|
|
6
|
+
session: Session;
|
|
7
|
+
app?: string;
|
|
8
|
+
constructor({ session }: {
|
|
9
|
+
session: Session;
|
|
10
|
+
});
|
|
11
|
+
get schema(): "http" | "https";
|
|
12
|
+
get host(): string;
|
|
13
|
+
get subdomain(): "upload-staging" | "upload";
|
|
14
|
+
get domain(): 'pco' | 'planningcenteronline';
|
|
15
|
+
get tld(): "test" | "com";
|
|
16
|
+
get env(): import("./session").ENV;
|
|
17
|
+
get baseUrl(): string;
|
|
18
|
+
get headers(): {
|
|
19
|
+
'User-Agent': string;
|
|
20
|
+
Authorization: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=upload_uri.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload_uri.d.ts","sourceRoot":"","sources":["../../src/utils/upload_uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC;;GAEG;AACH,qBAAa,SAAS;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;gBAEA,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;IAI7C,IAAI,MAAM,qBAMT;IAED,IAAI,IAAI,WAEP;IAED,IAAI,SAAS,gCAOZ;IAED,IAAI,MAAM,IAAI,KAAK,GAAG,sBAAsB,CAE3C;IAED,IAAI,GAAG,mBAON;IAED,IAAI,GAAG,4BAEN;IAED,IAAI,OAAO,WAEV;IAED,IAAI,OAAO;;;MAKV;CACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import DeviceInfo from 'react-native-device-info';
|
|
2
|
+
const brand = DeviceInfo.getBrand();
|
|
3
|
+
const model = DeviceInfo.getModel();
|
|
4
|
+
const systemName = DeviceInfo.getSystemName();
|
|
5
|
+
const systemVersion = DeviceInfo.getSystemVersion();
|
|
6
|
+
const readableVersion = DeviceInfo.getReadableVersion();
|
|
7
|
+
const appName = DeviceInfo.getApplicationName();
|
|
8
|
+
/**
|
|
9
|
+
* This is for accessing https://github.com/planningcenter/upload
|
|
10
|
+
*/
|
|
11
|
+
export class UploadUri {
|
|
12
|
+
session;
|
|
13
|
+
app;
|
|
14
|
+
constructor({ session }) {
|
|
15
|
+
this.session = session;
|
|
16
|
+
}
|
|
17
|
+
get schema() {
|
|
18
|
+
if (this.env === 'development') {
|
|
19
|
+
return 'http';
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return 'https';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
get host() {
|
|
26
|
+
return `${this.subdomain}.${this.domain}.${this.tld}`;
|
|
27
|
+
}
|
|
28
|
+
get subdomain() {
|
|
29
|
+
switch (this.env) {
|
|
30
|
+
case 'staging':
|
|
31
|
+
return 'upload-staging';
|
|
32
|
+
default:
|
|
33
|
+
return 'upload';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get domain() {
|
|
37
|
+
return this.env === 'development' ? 'pco' : 'planningcenteronline';
|
|
38
|
+
}
|
|
39
|
+
get tld() {
|
|
40
|
+
switch (this.env) {
|
|
41
|
+
case 'development':
|
|
42
|
+
return 'test';
|
|
43
|
+
default:
|
|
44
|
+
return 'com';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
get env() {
|
|
48
|
+
return this.session?.env || 'production';
|
|
49
|
+
}
|
|
50
|
+
get baseUrl() {
|
|
51
|
+
return `${this.schema}://${this.host}`;
|
|
52
|
+
}
|
|
53
|
+
get headers() {
|
|
54
|
+
return {
|
|
55
|
+
'User-Agent': `${appName}/${readableVersion} (${brand}, ${model}, ${systemName}, ${systemVersion})`,
|
|
56
|
+
Authorization: `Bearer ${this.session.token?.access_token}`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=upload_uri.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload_uri.js","sourceRoot":"","sources":["../../src/utils/upload_uri.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAA;AAEjD,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAA;AACnC,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAA;AACnC,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,EAAE,CAAA;AAC7C,MAAM,aAAa,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAA;AACnD,MAAM,eAAe,GAAG,UA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KAAK,KAAK,KAAK,KAAK,KAAK,UAAU,KAAK,aAAa,GAAG;YACnG,aAAa,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE;SAC5D,CAAA;IACH,CAAC;CACF","sourcesContent":["import DeviceInfo from 'react-native-device-info'\nimport { Session } from './session'\nconst brand = DeviceInfo.getBrand()\nconst model = DeviceInfo.getModel()\nconst systemName = DeviceInfo.getSystemName()\nconst systemVersion = DeviceInfo.getSystemVersion()\nconst readableVersion = DeviceInfo.getReadableVersion()\nconst appName = DeviceInfo.getApplicationName()\n\n/**\n * This is for accessing https://github.com/planningcenter/upload\n */\nexport class UploadUri {\n session: Session\n app?: string\n\n constructor({ session }: { session: Session }) {\n this.session = session\n }\n\n get schema() {\n if (this.env === 'development') {\n return 'http'\n } else {\n return 'https'\n }\n }\n\n get host() {\n return `${this.subdomain}.${this.domain}.${this.tld}`\n }\n\n get subdomain() {\n switch (this.env) {\n case 'staging':\n return 'upload-staging'\n default:\n return 'upload'\n }\n }\n\n get domain(): 'pco' | 'planningcenteronline' {\n return this.env === 'development' ? 'pco' : 'planningcenteronline'\n }\n\n get tld() {\n switch (this.env) {\n case 'development':\n return 'test'\n default:\n return 'com'\n }\n }\n\n get env() {\n return this.session?.env || 'production'\n }\n\n get baseUrl() {\n return `${this.schema}://${this.host}`\n }\n\n get headers() {\n return {\n 'User-Agent': `${appName}/${readableVersion} (${brand}, ${model}, ${systemName}, ${systemVersion})`,\n Authorization: `Bearer ${this.session.token?.access_token}`,\n }\n }\n}\n"]}
|
package/build/utils/uri.d.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { Session } from './session';
|
|
2
|
+
type Graph = 'churchcenter' | 'planningcenter';
|
|
2
3
|
export declare class Uri {
|
|
3
4
|
session: Session;
|
|
5
|
+
graph: Graph;
|
|
4
6
|
app?: string;
|
|
5
|
-
constructor({ session, app }: {
|
|
7
|
+
constructor({ session, app, graph }: {
|
|
6
8
|
session: Session;
|
|
7
9
|
app?: string;
|
|
10
|
+
graph?: Graph;
|
|
8
11
|
});
|
|
9
12
|
get schema(): "http" | "https";
|
|
10
|
-
get host():
|
|
13
|
+
get host(): string;
|
|
14
|
+
get subdomain(): "api.staging" | "api-staging" | "api";
|
|
15
|
+
get domain(): 'pco' | 'planningcenteronline' | 'churchcenter';
|
|
16
|
+
get tld(): "test" | "com";
|
|
17
|
+
get isChurchCenter(): boolean;
|
|
11
18
|
get env(): import("./session").ENV;
|
|
12
19
|
get baseUrl(): string;
|
|
13
20
|
get directory(): string;
|
|
@@ -18,4 +25,5 @@ export declare class Uri {
|
|
|
18
25
|
appUrl: (path: string) => string;
|
|
19
26
|
api: (path: string) => string;
|
|
20
27
|
}
|
|
28
|
+
export {};
|
|
21
29
|
//# sourceMappingURL=uri.d.ts.map
|
package/build/utils/uri.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../src/utils/uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,qBAAa,GAAG;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;gBAEA,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE;
|
|
1
|
+
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../src/utils/uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,KAAK,KAAK,GAAG,cAAc,GAAG,gBAAgB,CAAA;AAC9C,qBAAa,GAAG;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAmB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAA;gBAEA,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE;IAMtF,IAAI,MAAM,qBAMT;IAED,IAAI,IAAI,WAEP;IAED,IAAI,SAAS,0CAOZ;IAED,IAAI,MAAM,IAAI,KAAK,GAAG,sBAAsB,GAAG,cAAc,CAM5D;IAED,IAAI,GAAG,mBAON;IAED,IAAI,cAAc,YAEjB;IAED,IAAI,GAAG,4BAEN;IAED,IAAI,OAAO,WAEV;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,OAAO;;;MAKV;IAED,MAAM,SAAU,MAAM,YAIrB;IAED,GAAG,SAAU,MAAM,YAIlB;CACF"}
|
package/build/utils/uri.js
CHANGED
|
@@ -7,10 +7,12 @@ const readableVersion = DeviceInfo.getReadableVersion();
|
|
|
7
7
|
const appName = DeviceInfo.getApplicationName();
|
|
8
8
|
export class Uri {
|
|
9
9
|
session;
|
|
10
|
+
graph = 'planningcenter';
|
|
10
11
|
app;
|
|
11
|
-
constructor({ session, app }) {
|
|
12
|
+
constructor({ session, app, graph }) {
|
|
12
13
|
this.session = session;
|
|
13
14
|
this.app = app;
|
|
15
|
+
this.graph = graph || 'planningcenter';
|
|
14
16
|
}
|
|
15
17
|
get schema() {
|
|
16
18
|
if (this.env === 'development') {
|
|
@@ -21,17 +23,33 @@ export class Uri {
|
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
get host() {
|
|
26
|
+
return `${this.subdomain}.${this.domain}.${this.tld}`;
|
|
27
|
+
}
|
|
28
|
+
get subdomain() {
|
|
24
29
|
switch (this.env) {
|
|
25
|
-
case 'production':
|
|
26
|
-
return 'api.planningcenteronline.com';
|
|
27
30
|
case 'staging':
|
|
28
|
-
return 'api-staging
|
|
31
|
+
return this.isChurchCenter ? 'api.staging' : 'api-staging';
|
|
32
|
+
default:
|
|
33
|
+
return 'api';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get domain() {
|
|
37
|
+
if (this.isChurchCenter) {
|
|
38
|
+
return 'churchcenter';
|
|
39
|
+
}
|
|
40
|
+
return this.env === 'development' ? 'pco' : 'planningcenteronline';
|
|
41
|
+
}
|
|
42
|
+
get tld() {
|
|
43
|
+
switch (this.env) {
|
|
29
44
|
case 'development':
|
|
30
|
-
return '
|
|
45
|
+
return 'test';
|
|
31
46
|
default:
|
|
32
|
-
return '
|
|
47
|
+
return 'com';
|
|
33
48
|
}
|
|
34
49
|
}
|
|
50
|
+
get isChurchCenter() {
|
|
51
|
+
return this.session.isChurchCenterToken;
|
|
52
|
+
}
|
|
35
53
|
get env() {
|
|
36
54
|
return this.session?.env || 'production';
|
|
37
55
|
}
|
package/build/utils/uri.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/utils/uri.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAA;AAEjD,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAA;AACnC,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAA;AACnC,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,EAAE,CAAA;AAC7C,MAAM,aAAa,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAA;AACnD,MAAM,eAAe,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAA;AACvD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/utils/uri.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAA;AAEjD,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAA;AACnC,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAA;AACnC,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,EAAE,CAA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from 'react-native-device-info'\nimport { Session } from './session'\nconst brand = DeviceInfo.getBrand()\nconst model = DeviceInfo.getModel()\nconst systemName = DeviceInfo.getSystemName()\nconst systemVersion = DeviceInfo.getSystemVersion()\nconst readableVersion = DeviceInfo.getReadableVersion()\nconst appName = DeviceInfo.getApplicationName()\n\ntype Graph = 'churchcenter' | 'planningcenter'\nexport class Uri {\n session: Session\n graph: Graph = 'planningcenter'\n app?: string\n\n constructor({ session, app, graph }: { session: Session; app?: string; graph?: Graph }) {\n this.session = session\n this.app = app\n this.graph = graph || 'planningcenter'\n }\n\n get schema() {\n if (this.env === 'development') {\n return 'http'\n } else {\n return 'https'\n }\n }\n\n get host() {\n return `${this.subdomain}.${this.domain}.${this.tld}`\n }\n\n get subdomain() {\n switch (this.env) {\n case 'staging':\n return this.isChurchCenter ? 'api.staging' : 'api-staging'\n default:\n return 'api'\n }\n }\n\n get domain(): 'pco' | 'planningcenteronline' | 'churchcenter' {\n if (this.isChurchCenter) {\n return 'churchcenter'\n }\n\n return this.env === 'development' ? 'pco' : 'planningcenteronline'\n }\n\n get tld() {\n switch (this.env) {\n case 'development':\n return 'test'\n default:\n return 'com'\n }\n }\n\n get isChurchCenter() {\n return this.session.isChurchCenterToken\n }\n\n get env() {\n return this.session?.env || 'production'\n }\n\n get baseUrl() {\n return `${this.schema}://${this.host}`\n }\n\n get directory() {\n return this.app ? `/${this.app}/v2` : ''\n }\n\n get headers() {\n return {\n 'User-Agent': `${appName}/${readableVersion} (${brand}, ${model}, ${systemName}, ${systemVersion})`,\n Authorization: `Bearer ${this.session.token?.access_token}`,\n }\n }\n\n appUrl = (path: string) => {\n if (path.startsWith(`${this.schema}://`)) return path\n\n return `${this.baseUrl}${this.directory}${path || '/'}`\n }\n\n api = (path: string) => {\n if (path.startsWith(`${this.schema}://`)) return path\n\n return `${this.baseUrl}${path || '/'}`\n }\n}\n"]}
|
|
@@ -27,6 +27,7 @@ export declare const aliasTokensColorMap: {
|
|
|
27
27
|
readonly surfaceColorCanvas: string;
|
|
28
28
|
readonly surfaceColor100: string;
|
|
29
29
|
readonly surfaceColor090: string;
|
|
30
|
+
readonly surfaceColor080: string;
|
|
30
31
|
readonly needsDesignPass: string;
|
|
31
32
|
readonly fillColorNeutral000: string;
|
|
32
33
|
readonly fillColorNeutral010: string;
|
|
@@ -68,6 +69,7 @@ export declare const aliasTokensColorMap: {
|
|
|
68
69
|
readonly surfaceColorCanvas: string;
|
|
69
70
|
readonly surfaceColor100: string;
|
|
70
71
|
readonly surfaceColor090: string;
|
|
72
|
+
readonly surfaceColor080: string;
|
|
71
73
|
readonly needsDesignPass: string;
|
|
72
74
|
readonly fillColorNeutral000: string;
|
|
73
75
|
readonly fillColorNeutral010: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias_tokens_color_map.d.ts","sourceRoot":"","sources":["../../../src/vendor/tapestry/alias_tokens_color_map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alias_tokens_color_map.d.ts","sourceRoot":"","sources":["../../../src/vendor/tapestry/alias_tokens_color_map.ts"],"names":[],"mappings":"AAmJA,eAAO,MAAM,mBAAmB;;uBA/FxB,MAAM;yCACY,MAAM;yCACN,MAAM;2CACJ,MAAM;6CACJ,MAAM;wCACX,MAAM;0CACJ,MAAM;0CACN,MAAM;4CACJ,MAAM;sCACZ,MAAM;2CACD,MAAM;2CACN,MAAM;2CACN,MAAM;0CACP,MAAM;4CACJ,MAAM;2CACP,MAAM;8CACH,MAAM;2CACT,MAAM;oDACG,MAAM;8CACZ,MAAM;6CACP,MAAM;sDACG,MAAM;uCACrB,MAAM;mCACV,MAAM;qCACJ,MAAM;kCACT,MAAM;kCACN,MAAM;kCACN,MAAM;kCACN,MAAM;sCAxEF,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;0CACF,MAAM;sCACV,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;8CACE,MAAM;;;uBAkC7B,MAAM;yCACY,MAAM;yCACN,MAAM;2CACJ,MAAM;6CACJ,MAAM;wCACX,MAAM;0CACJ,MAAM;0CACN,MAAM;4CACJ,MAAM;sCACZ,MAAM;2CACD,MAAM;2CACN,MAAM;2CACN,MAAM;0CACP,MAAM;4CACJ,MAAM;2CACP,MAAM;8CACH,MAAM;2CACT,MAAM;oDACG,MAAM;8CACZ,MAAM;6CACP,MAAM;sDACG,MAAM;uCACrB,MAAM;mCACV,MAAM;qCACJ,MAAM;kCACT,MAAM;kCACN,MAAM;kCACN,MAAM;kCACN,MAAM;sCAxEF,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;0CACF,MAAM;sCACV,MAAM;sCACN,MAAM;sCACN,MAAM;sCACN,MAAM;8CACE,MAAM;;CAoI3B,CAAA"}
|