@planningcenter/chat-react-native 3.1.0-rc.13 → 3.1.0-rc.15
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/attachments/attachment_card.d.ts +9 -0
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -0
- package/build/components/conversation/attachments/attachment_card.js +35 -0
- package/build/components/conversation/attachments/attachment_card.js.map +1 -0
- package/build/components/conversation/attachments/audio_attachment.d.ts +6 -0
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/audio_attachment.js +84 -0
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -0
- package/build/components/conversation/attachments/constants.d.ts +3 -0
- package/build/components/conversation/attachments/constants.d.ts.map +1 -0
- package/build/components/conversation/attachments/constants.js +4 -0
- package/build/components/conversation/attachments/constants.js.map +1 -0
- package/build/components/conversation/attachments/download_attachment_button.d.ts +9 -0
- package/build/components/conversation/attachments/download_attachment_button.d.ts.map +1 -0
- package/build/components/conversation/attachments/download_attachment_button.js +29 -0
- package/build/components/conversation/attachments/download_attachment_button.js.map +1 -0
- package/build/components/conversation/attachments/expanded_link.d.ts +5 -0
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -0
- package/build/components/conversation/attachments/expanded_link.js +44 -0
- package/build/components/conversation/attachments/expanded_link.js.map +1 -0
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +7 -0
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/generic_file_attachment.js +63 -0
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts +6 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/giphy_attachment.js +42 -0
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -0
- package/build/components/conversation/attachments/image_attachment.d.ts +5 -0
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/image_attachment.js +24 -0
- package/build/components/conversation/attachments/image_attachment.js.map +1 -0
- package/build/components/conversation/attachments/video_attachment.d.ts +6 -0
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/video_attachment.js +64 -0
- package/build/components/conversation/attachments/video_attachment.js.map +1 -0
- package/build/components/conversation/message.d.ts +1 -1
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +13 -7
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +6 -0
- package/build/components/conversation/message_attachments.d.ts.map +1 -0
- package/build/components/conversation/message_attachments.js +52 -0
- package/build/components/conversation/message_attachments.js.map +1 -0
- package/build/components/conversation/message_markdown.d.ts +7 -0
- package/build/components/conversation/message_markdown.d.ts.map +1 -0
- package/build/components/conversation/message_markdown.js +38 -0
- package/build/components/conversation/message_markdown.js.map +1 -0
- package/build/components/conversations/conversation_preview.d.ts +9 -0
- package/build/components/conversations/conversation_preview.d.ts.map +1 -0
- package/build/components/conversations/conversation_preview.js +58 -0
- package/build/components/conversations/conversation_preview.js.map +1 -0
- package/build/components/conversations/conversations.d.ts +8 -0
- package/build/components/conversations/conversations.d.ts.map +1 -0
- package/build/components/conversations/conversations.js +40 -0
- package/build/components/conversations/conversations.js.map +1 -0
- package/build/components/conversations/unread_count_badge.d.ts +5 -0
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -0
- package/build/components/conversations/unread_count_badge.js +33 -0
- package/build/components/conversations/unread_count_badge.js.map +1 -0
- package/build/components/display/badge.d.ts +9 -1
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +22 -10
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/button.d.ts +1 -1
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js.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/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +10 -8
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/text.js +2 -8
- package/build/components/display/text.js.map +1 -1
- package/build/components/index.d.ts +1 -1
- package/build/components/index.d.ts.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/hooks/use_api.d.ts +6 -4
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +5 -2
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts +1 -2
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_conversation.js +1 -1
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +1 -1
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_conversations.d.ts +2 -3
- package/build/hooks/use_conversations.d.ts.map +1 -1
- package/build/hooks/use_conversations.js +3 -29
- package/build/hooks/use_conversations.js.map +1 -1
- package/build/hooks/use_groups.d.ts +214 -0
- package/build/hooks/use_groups.d.ts.map +1 -0
- package/build/hooks/use_groups.js +22 -0
- package/build/hooks/use_groups.js.map +1 -0
- package/build/hooks/use_groups_groups.d.ts +208 -0
- package/build/hooks/use_groups_groups.d.ts.map +1 -0
- package/build/hooks/use_groups_groups.js +18 -0
- package/build/hooks/use_groups_groups.js.map +1 -0
- package/build/hooks/use_services_team.d.ts +4 -0
- package/build/hooks/use_services_team.d.ts.map +1 -0
- package/build/hooks/use_services_team.js +22 -0
- package/build/hooks/use_services_team.js.map +1 -0
- package/build/hooks/use_suspense_api.d.ts +2 -1
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +2 -1
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_teams.d.ts +208 -0
- package/build/hooks/use_teams.d.ts.map +1 -0
- package/build/hooks/use_teams.js +22 -0
- package/build/hooks/use_teams.js.map +1 -0
- package/build/navigation/index.d.ts +11 -0
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +5 -0
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +86 -62
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts +13 -0
- package/build/screens/conversation_filters_screen.d.ts.map +1 -0
- package/build/screens/conversation_filters_screen.js +346 -0
- package/build/screens/conversation_filters_screen.js.map +1 -0
- package/build/screens/conversation_screen.js +2 -1
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversations_screen.d.ts +4 -2
- package/build/screens/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations_screen.js +139 -11
- package/build/screens/conversations_screen.js.map +1 -1
- package/build/screens/create/conversation_select_recipients_screen.d.ts.map +1 -1
- package/build/screens/create/conversation_select_recipients_screen.js +3 -11
- package/build/screens/create/conversation_select_recipients_screen.js.map +1 -1
- package/build/types/resources/group_resource.d.ts +4 -2
- package/build/types/resources/group_resource.d.ts.map +1 -1
- package/build/types/resources/group_resource.js.map +1 -1
- package/build/types/resources/index.d.ts +1 -0
- package/build/types/resources/index.d.ts.map +1 -1
- package/build/types/resources/index.js +1 -0
- package/build/types/resources/index.js.map +1 -1
- package/build/types/resources/services/index.d.ts +2 -0
- package/build/types/resources/services/index.d.ts.map +1 -0
- package/build/types/resources/services/index.js +2 -0
- package/build/types/resources/services/index.js.map +1 -0
- package/build/types/resources/services/team_resource.d.ts +48 -0
- package/build/types/resources/services/team_resource.d.ts.map +1 -0
- package/build/types/resources/services/team_resource.js +7 -0
- package/build/types/resources/services/team_resource.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/audio.d.ts +13 -0
- package/build/utils/native_adapters/audio.d.ts.map +1 -0
- package/build/utils/native_adapters/audio.js +7 -0
- package/build/utils/native_adapters/audio.js.map +1 -0
- package/build/utils/native_adapters/configuration.d.ts +7 -1
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +17 -1
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/native_adapters/index.d.ts +2 -0
- package/build/utils/native_adapters/index.d.ts.map +1 -1
- package/build/utils/native_adapters/index.js +2 -0
- package/build/utils/native_adapters/index.js.map +1 -1
- package/build/utils/native_adapters/video.d.ts +25 -0
- package/build/utils/native_adapters/video.d.ts.map +1 -0
- package/build/utils/native_adapters/video.js +7 -0
- package/build/utils/native_adapters/video.js.map +1 -0
- package/build/utils/parse_simple_markdown.d.ts +7 -0
- package/build/utils/parse_simple_markdown.d.ts.map +1 -0
- package/build/utils/parse_simple_markdown.js +32 -0
- package/build/utils/parse_simple_markdown.js.map +1 -0
- package/build/utils/pluralize.d.ts +2 -0
- package/build/utils/pluralize.d.ts.map +1 -0
- package/build/utils/pluralize.js +10 -0
- package/build/utils/pluralize.js.map +1 -0
- package/build/utils/request/conversation.d.ts +10 -0
- package/build/utils/request/conversation.d.ts.map +1 -0
- package/build/utils/request/conversation.js +32 -0
- package/build/utils/request/conversation.js.map +1 -0
- package/build/utils/request/messages.d.ts +15 -0
- package/build/utils/request/messages.d.ts.map +1 -0
- package/build/utils/request/messages.js +22 -0
- package/build/utils/request/messages.js.map +1 -0
- package/build/utils/theme.d.ts +1 -1
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +1 -1
- package/build/utils/theme.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/utils/parse_simple_markdown.ts +93 -0
- package/src/__tests__/utils/pluralize.tsx +17 -0
- package/src/components/conversation/attachments/attachment_card.tsx +46 -0
- package/src/components/conversation/attachments/audio_attachment.tsx +102 -0
- package/src/components/conversation/attachments/constants.ts +5 -0
- package/src/components/conversation/attachments/download_attachment_button.tsx +46 -0
- package/src/components/conversation/attachments/expanded_link.tsx +54 -0
- package/src/components/conversation/attachments/generic_file_attachment.tsx +75 -0
- package/src/components/conversation/attachments/giphy_attachment.tsx +56 -0
- package/src/components/conversation/attachments/image_attachment.tsx +31 -0
- package/src/components/conversation/attachments/video_attachment.tsx +92 -0
- package/src/components/conversation/message.tsx +15 -6
- package/src/components/conversation/message_attachments.tsx +61 -0
- package/src/components/conversation/message_markdown.tsx +52 -0
- package/src/components/conversations/conversation_preview.tsx +84 -0
- package/src/components/conversations/conversations.tsx +79 -0
- package/src/components/conversations/unread_count_badge.tsx +38 -0
- package/src/components/display/badge.tsx +41 -10
- package/src/components/display/button.tsx +1 -1
- package/src/components/display/child_notice.tsx +2 -2
- package/src/components/display/icon.tsx +10 -8
- package/src/components/display/text.tsx +1 -7
- package/src/components/index.tsx +1 -1
- package/src/hooks/use_api.ts +11 -10
- package/src/hooks/use_api_client.ts +1 -1
- package/src/hooks/use_conversation.ts +1 -1
- package/src/hooks/use_conversation_jolt_events.ts +1 -1
- package/src/hooks/use_conversation_messages_jolt_events.ts +1 -1
- package/src/hooks/use_conversations.ts +3 -31
- package/src/hooks/use_groups.ts +31 -0
- package/src/hooks/use_groups_groups.ts +20 -0
- package/src/hooks/use_services_team.ts +30 -0
- package/src/hooks/use_suspense_api.ts +4 -4
- package/src/hooks/use_teams.ts +25 -0
- package/src/navigation/index.tsx +8 -0
- package/src/screens/conversation_details_screen.tsx +149 -117
- package/src/screens/conversation_filters_screen.tsx +488 -0
- package/src/screens/conversation_screen.tsx +8 -1
- package/src/screens/conversations_screen.tsx +210 -13
- package/src/screens/create/conversation_select_recipients_screen.tsx +3 -11
- package/src/types/resources/group_resource.ts +5 -2
- package/src/types/resources/index.ts +1 -0
- package/src/types/resources/services/index.ts +1 -0
- package/src/types/resources/services/team_resource.ts +60 -0
- package/src/utils/client/types.d.ts +2 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/native_adapters/audio.ts +15 -0
- package/src/utils/native_adapters/configuration.ts +24 -1
- package/src/utils/native_adapters/index.ts +2 -0
- package/src/utils/native_adapters/video.ts +30 -0
- package/src/utils/parse_simple_markdown.ts +40 -0
- package/src/utils/pluralize.ts +11 -0
- package/src/utils/request/conversation.ts +46 -0
- package/src/utils/request/messages.ts +21 -0
- package/src/utils/theme.ts +2 -2
- package/build/components/conversations.d.ts +0 -3
- package/build/components/conversations.d.ts.map +0 -1
- package/build/components/conversations.js +0 -100
- package/build/components/conversations.js.map +0 -1
- package/src/components/conversations.tsx +0 -144
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_suspense_api.js","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAgB,GACjB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,
|
|
1
|
+
{"version":3,"file":"use_suspense_api.js","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAgB,GACjB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAO,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAMpD,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAwB,EACxB,EAAE;IAGF,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,gBAAgB,CAAqB;QAC9D,QAAQ,EAAE,kBAAkB,CAAC,IAAI,CAAC;KACnC,CAAC,CAAA;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,CAAA;AAC9B,CAAC,CAAA;AAYD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAwB,EACxB,IAA+B,EAC/B,EAAE;IACF,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,KAAK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AC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;IAEpE,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,CAAA;AAC3B,CAAC,CAAA;AAQD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAwB,EAAmB,EAAE,CAAC;IAC/E,IAAI,CAAC,GAAG;IACR,IAAI,CAAC,IAAI;IACT,IAAI,CAAC,OAAO;IACZ,IAAI,CAAC,GAAG,IAAI,MAAM;CACnB,CAAA","sourcesContent":["import {\n AnyUseSuspenseInfiniteQueryOptions,\n InfiniteData,\n useSuspenseInfiniteQuery,\n useSuspenseQuery,\n} from '@tanstack/react-query'\nimport { ApiCollection, ApiResource, ResourceObject } from '../types'\nimport { GetRequest, RequestData } from '../utils/client/types'\nimport { App, useApiClient } from './use_api_client'\n\ninterface SuspenseGetOptions extends GetRequest {\n app?: App\n}\n\nexport const useSuspenseGet = <T extends ResourceObject | ResourceObject[]>(\n args: SuspenseGetOptions\n) => {\n type Resource = ApiResource<T>\n\n const { data, ...query } = useSuspenseQuery<Resource, Response>({\n queryKey: getRequestQueryKey(args),\n })\n\n return { ...data, ...query }\n}\n\ntype NextMeta = Partial<{\n offset: string\n idLt: string\n}>\n\nexport type SuspensePaginatorOptions = Omit<\n AnyUseSuspenseInfiniteQueryOptions,\n 'getNextPageParam' | 'initialPageParam' | 'queryFn' | 'queryKey'\n>\n\nexport const useSuspensePaginator = <T extends ResourceObject>(\n args: SuspenseGetOptions,\n opts?: SuspensePaginatorOptions\n) => {\n const apiClient = useApiClient()\n const query = useSuspenseInfiniteQuery<\n ApiCollection<T>,\n Response,\n InfiniteData<ApiCollection<T>>,\n any,\n Partial<RequestData> | undefined\n >({\n queryKey: getRequestQueryKey(args),\n queryFn: ({ pageParam }) => {\n const pageParmWhere = pageParam?.where || {}\n const argsWhere = args.data.where || {}\n const where = { ...argsWhere, ...pageParmWhere }\n const app = args.app || 'chat'\n const offset = pageParam?.offset || args.data.offset\n const data = { ...args.data, where, offset }\n\n return apiClient[app].get({\n url: args.url,\n data,\n })\n },\n initialPageParam: {} as Partial<RequestData>,\n getNextPageParam: lastPage => {\n const next: NextMeta = lastPage.meta?.next || {}\n const { offset, idLt } = next\n\n if (idLt) return { where: { id_lt: idLt } }\n if (offset) return { offset: Number(offset) }\n\n return undefined\n },\n ...(opts || {}),\n })\n\n const data: T[] = query.data?.pages.flatMap(page => page.data) || []\n\n return { ...query, data }\n}\n\nexport type RequestQueryKey = [\n SuspenseGetOptions['url'],\n SuspenseGetOptions['data'],\n SuspenseGetOptions['headers'],\n SuspenseGetOptions['app'],\n]\nexport const getRequestQueryKey = (args: SuspenseGetOptions): RequestQueryKey => [\n args.url,\n args.data,\n args.headers,\n args.app || 'chat',\n]\n"]}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { GroupResource } from '../types/resources/group_resource';
|
|
2
|
+
export declare const useTeams: () => {
|
|
3
|
+
data: GroupResource[];
|
|
4
|
+
error: Response;
|
|
5
|
+
isError: true;
|
|
6
|
+
isPending: false;
|
|
7
|
+
isLoading: false;
|
|
8
|
+
isLoadingError: false;
|
|
9
|
+
isRefetchError: true;
|
|
10
|
+
isSuccess: false;
|
|
11
|
+
isPlaceholderData: false;
|
|
12
|
+
status: "error";
|
|
13
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
14
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
15
|
+
hasNextPage: boolean;
|
|
16
|
+
hasPreviousPage: boolean;
|
|
17
|
+
isFetchNextPageError: boolean;
|
|
18
|
+
isFetchingNextPage: boolean;
|
|
19
|
+
isFetchPreviousPageError: boolean;
|
|
20
|
+
isFetchingPreviousPage: boolean;
|
|
21
|
+
dataUpdatedAt: number;
|
|
22
|
+
errorUpdatedAt: number;
|
|
23
|
+
failureCount: number;
|
|
24
|
+
failureReason: Response | null;
|
|
25
|
+
errorUpdateCount: number;
|
|
26
|
+
isFetched: boolean;
|
|
27
|
+
isFetchedAfterMount: boolean;
|
|
28
|
+
isFetching: boolean;
|
|
29
|
+
isInitialLoading: boolean;
|
|
30
|
+
isPaused: boolean;
|
|
31
|
+
isRefetching: boolean;
|
|
32
|
+
isStale: boolean;
|
|
33
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
34
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>>;
|
|
36
|
+
} | {
|
|
37
|
+
data: GroupResource[];
|
|
38
|
+
error: null;
|
|
39
|
+
isError: false;
|
|
40
|
+
isPending: false;
|
|
41
|
+
isLoading: false;
|
|
42
|
+
isLoadingError: false;
|
|
43
|
+
isRefetchError: false;
|
|
44
|
+
isFetchNextPageError: false;
|
|
45
|
+
isFetchPreviousPageError: false;
|
|
46
|
+
isSuccess: true;
|
|
47
|
+
isPlaceholderData: false;
|
|
48
|
+
status: "success";
|
|
49
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
50
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
51
|
+
hasNextPage: boolean;
|
|
52
|
+
hasPreviousPage: boolean;
|
|
53
|
+
isFetchingNextPage: boolean;
|
|
54
|
+
isFetchingPreviousPage: boolean;
|
|
55
|
+
dataUpdatedAt: number;
|
|
56
|
+
errorUpdatedAt: number;
|
|
57
|
+
failureCount: number;
|
|
58
|
+
failureReason: Response | null;
|
|
59
|
+
errorUpdateCount: number;
|
|
60
|
+
isFetched: boolean;
|
|
61
|
+
isFetchedAfterMount: boolean;
|
|
62
|
+
isFetching: boolean;
|
|
63
|
+
isInitialLoading: boolean;
|
|
64
|
+
isPaused: boolean;
|
|
65
|
+
isRefetching: boolean;
|
|
66
|
+
isStale: boolean;
|
|
67
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
68
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
69
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>>;
|
|
70
|
+
} | {
|
|
71
|
+
data: GroupResource[];
|
|
72
|
+
error: Response;
|
|
73
|
+
isError: true;
|
|
74
|
+
isPending: false;
|
|
75
|
+
isLoading: false;
|
|
76
|
+
isLoadingError: true;
|
|
77
|
+
isRefetchError: false;
|
|
78
|
+
isFetchNextPageError: false;
|
|
79
|
+
isFetchPreviousPageError: false;
|
|
80
|
+
isSuccess: false;
|
|
81
|
+
isPlaceholderData: false;
|
|
82
|
+
status: "error";
|
|
83
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
84
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
85
|
+
hasNextPage: boolean;
|
|
86
|
+
hasPreviousPage: boolean;
|
|
87
|
+
isFetchingNextPage: boolean;
|
|
88
|
+
isFetchingPreviousPage: boolean;
|
|
89
|
+
dataUpdatedAt: number;
|
|
90
|
+
errorUpdatedAt: number;
|
|
91
|
+
failureCount: number;
|
|
92
|
+
failureReason: Response | null;
|
|
93
|
+
errorUpdateCount: number;
|
|
94
|
+
isFetched: boolean;
|
|
95
|
+
isFetchedAfterMount: boolean;
|
|
96
|
+
isFetching: boolean;
|
|
97
|
+
isInitialLoading: boolean;
|
|
98
|
+
isPaused: boolean;
|
|
99
|
+
isRefetching: boolean;
|
|
100
|
+
isStale: boolean;
|
|
101
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
102
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
103
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>>;
|
|
104
|
+
} | {
|
|
105
|
+
data: GroupResource[];
|
|
106
|
+
error: null;
|
|
107
|
+
isError: false;
|
|
108
|
+
isPending: true;
|
|
109
|
+
isLoading: true;
|
|
110
|
+
isLoadingError: false;
|
|
111
|
+
isRefetchError: false;
|
|
112
|
+
isFetchNextPageError: false;
|
|
113
|
+
isFetchPreviousPageError: false;
|
|
114
|
+
isSuccess: false;
|
|
115
|
+
isPlaceholderData: false;
|
|
116
|
+
status: "pending";
|
|
117
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
118
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
119
|
+
hasNextPage: boolean;
|
|
120
|
+
hasPreviousPage: boolean;
|
|
121
|
+
isFetchingNextPage: boolean;
|
|
122
|
+
isFetchingPreviousPage: boolean;
|
|
123
|
+
dataUpdatedAt: number;
|
|
124
|
+
errorUpdatedAt: number;
|
|
125
|
+
failureCount: number;
|
|
126
|
+
failureReason: Response | null;
|
|
127
|
+
errorUpdateCount: number;
|
|
128
|
+
isFetched: boolean;
|
|
129
|
+
isFetchedAfterMount: boolean;
|
|
130
|
+
isFetching: boolean;
|
|
131
|
+
isInitialLoading: boolean;
|
|
132
|
+
isPaused: boolean;
|
|
133
|
+
isRefetching: boolean;
|
|
134
|
+
isStale: boolean;
|
|
135
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
136
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
137
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>>;
|
|
138
|
+
} | {
|
|
139
|
+
data: GroupResource[];
|
|
140
|
+
error: null;
|
|
141
|
+
isError: false;
|
|
142
|
+
isPending: true;
|
|
143
|
+
isLoadingError: false;
|
|
144
|
+
isRefetchError: false;
|
|
145
|
+
isFetchNextPageError: false;
|
|
146
|
+
isFetchPreviousPageError: false;
|
|
147
|
+
isSuccess: false;
|
|
148
|
+
isPlaceholderData: false;
|
|
149
|
+
status: "pending";
|
|
150
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
151
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
152
|
+
hasNextPage: boolean;
|
|
153
|
+
hasPreviousPage: boolean;
|
|
154
|
+
isFetchingNextPage: boolean;
|
|
155
|
+
isFetchingPreviousPage: boolean;
|
|
156
|
+
dataUpdatedAt: number;
|
|
157
|
+
errorUpdatedAt: number;
|
|
158
|
+
failureCount: number;
|
|
159
|
+
failureReason: Response | null;
|
|
160
|
+
errorUpdateCount: number;
|
|
161
|
+
isFetched: boolean;
|
|
162
|
+
isFetchedAfterMount: boolean;
|
|
163
|
+
isFetching: boolean;
|
|
164
|
+
isLoading: boolean;
|
|
165
|
+
isInitialLoading: boolean;
|
|
166
|
+
isPaused: boolean;
|
|
167
|
+
isRefetching: boolean;
|
|
168
|
+
isStale: boolean;
|
|
169
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
170
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
171
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>>;
|
|
172
|
+
} | {
|
|
173
|
+
data: GroupResource[];
|
|
174
|
+
isError: false;
|
|
175
|
+
error: null;
|
|
176
|
+
isPending: false;
|
|
177
|
+
isLoading: false;
|
|
178
|
+
isLoadingError: false;
|
|
179
|
+
isRefetchError: false;
|
|
180
|
+
isSuccess: true;
|
|
181
|
+
isPlaceholderData: true;
|
|
182
|
+
isFetchNextPageError: false;
|
|
183
|
+
isFetchPreviousPageError: false;
|
|
184
|
+
status: "success";
|
|
185
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
186
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
187
|
+
hasNextPage: boolean;
|
|
188
|
+
hasPreviousPage: boolean;
|
|
189
|
+
isFetchingNextPage: boolean;
|
|
190
|
+
isFetchingPreviousPage: boolean;
|
|
191
|
+
dataUpdatedAt: number;
|
|
192
|
+
errorUpdatedAt: number;
|
|
193
|
+
failureCount: number;
|
|
194
|
+
failureReason: Response | null;
|
|
195
|
+
errorUpdateCount: number;
|
|
196
|
+
isFetched: boolean;
|
|
197
|
+
isFetchedAfterMount: boolean;
|
|
198
|
+
isFetching: boolean;
|
|
199
|
+
isInitialLoading: boolean;
|
|
200
|
+
isPaused: boolean;
|
|
201
|
+
isRefetching: boolean;
|
|
202
|
+
isStale: boolean;
|
|
203
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>, Response>>;
|
|
204
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
205
|
+
promise: Promise<import("@tanstack/query-core").InfiniteData<import("..").ApiCollection<GroupResource>, unknown>>;
|
|
206
|
+
};
|
|
207
|
+
export declare const useCanDisplayTeams: () => boolean;
|
|
208
|
+
//# sourceMappingURL=use_teams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_teams.d.ts","sourceRoot":"","sources":["../../src/hooks/use_teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAGjE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAepB,CAAA;AAED,eAAO,MAAM,kBAAkB,eAI9B,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useApiPaginator } from './use_api';
|
|
2
|
+
export const useTeams = () => {
|
|
3
|
+
return useApiPaginator({
|
|
4
|
+
url: '/me/groups',
|
|
5
|
+
data: {
|
|
6
|
+
fields: {
|
|
7
|
+
Group: [],
|
|
8
|
+
},
|
|
9
|
+
where: {
|
|
10
|
+
source_app_name: 'Services',
|
|
11
|
+
source_type: 'Team',
|
|
12
|
+
},
|
|
13
|
+
perPage: 100,
|
|
14
|
+
},
|
|
15
|
+
app: 'chat',
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export const useCanDisplayTeams = () => {
|
|
19
|
+
const { data: teams = [] } = useTeams();
|
|
20
|
+
return teams?.length > 0;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=use_teams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_teams.js","sourceRoot":"","sources":["../../src/hooks/use_teams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,OAAO,eAAe,CAAgB;QACpC,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;aACV;YACD,KAAK,EAAE;gBACL,eAAe,EAAE,UAAU;gBAC3B,WAAW,EAAE,MAAM;aACpB;YACD,OAAO,EAAE,GAAG;SACb;QACD,GAAG,EAAE,MAAM;KACZ,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAA;IAEvC,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC,CAAA;AAC1B,CAAC,CAAA","sourcesContent":["import { GroupResource } from '../types/resources/group_resource'\nimport { useApiPaginator } from './use_api'\n\nexport const useTeams = () => {\n return useApiPaginator<GroupResource>({\n url: '/me/groups',\n data: {\n fields: {\n Group: [],\n },\n where: {\n source_app_name: 'Services',\n source_type: 'Team',\n },\n perPage: 100,\n },\n app: 'chat',\n })\n}\n\nexport const useCanDisplayTeams = () => {\n const { data: teams = [] } = useTeams()\n\n return teams?.length > 0\n}\n"]}
|
|
@@ -93,6 +93,17 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
|
|
|
93
93
|
headerRight: (props: NativeStackHeaderRightProps) => React.JSX.Element;
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
+
readonly ConversationFilters: {
|
|
97
|
+
readonly screen: ({}: {
|
|
98
|
+
route: {
|
|
99
|
+
params: {
|
|
100
|
+
chat_group_graph_id?: import("../types/resources/group_resource").GraphId;
|
|
101
|
+
group_source_app_name?: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
}) => React.JSX.Element;
|
|
105
|
+
readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
106
|
+
};
|
|
96
107
|
readonly Conversation: {
|
|
97
108
|
readonly screen: typeof ConversationScreen;
|
|
98
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC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;;;qCA1Cp2c,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDA0Co0c,KAAK;;;iDA9Fp2c,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqFtD,CAAA;AAEF,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,SAAS,CAAC,CAAA;AAE3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAe,CAAC;QACxB,UAAU,aAAc,SAAQ,kBAAkB;SAAG;KACtD;CACF"}
|
|
@@ -13,6 +13,7 @@ import { NotFound } from '../screens/not_found';
|
|
|
13
13
|
import { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen';
|
|
14
14
|
import { HeaderRightButton } from './header';
|
|
15
15
|
import { ScreenLayout } from './screenLayout';
|
|
16
|
+
import { ConversationFiltersScreen, ConversationFiltersScreenOptions, } from '../screens/conversation_filters_screen';
|
|
16
17
|
export const CreateConversationStack = createNativeStackNavigator({
|
|
17
18
|
initialRouteName: 'ConversationSelectRecipients',
|
|
18
19
|
screenOptions: {
|
|
@@ -55,6 +56,10 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
55
56
|
headerRight: (props) => (<HeaderBackButton backImage={() => <Icon name="general.x" size={18} color={props.tintColor}/>} onPress={navigation.goBack} {...props}/>),
|
|
56
57
|
}),
|
|
57
58
|
},
|
|
59
|
+
ConversationFilters: {
|
|
60
|
+
screen: ConversationFiltersScreen,
|
|
61
|
+
options: ConversationFiltersScreenOptions,
|
|
62
|
+
},
|
|
58
63
|
Conversation: {
|
|
59
64
|
screen: ConversationScreen,
|
|
60
65
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;A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AO;aACtB;SACF;QACD,cAAc,EAAE;YACd,MAAM,EAAE,oBAAoB;YAC5B,gEAAgE;YAChE,OAAO,EAAE,2BAA2B;SACrC;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Icon } from '../components'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport { ConversationScreen } from '../screens/conversation_screen'\nimport { ConversationsScreen } from '../screens/conversations_screen'\nimport { ConversationCreateScreen } from '../screens/create/conversation_create_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/create/conversation_filter_recipients_screen'\nimport { ConversationSelectRecipientsScreen } from '../screens/create/conversation_select_recipients_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { NotFound } from '../screens/not_found'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { HeaderRightButton } from './header'\nimport { ScreenLayout } from './screenLayout'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\n\nexport const CreateConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationSelectRecipients',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n ConversationSelectRecipients: {\n screen: ConversationSelectRecipientsScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Cancel\n </HeaderRightButton>\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationCreate: {\n screen: ConversationCreateScreen,\n options: {\n title: 'New conversation',\n headerLeft: () => null,\n },\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Done\n </HeaderRightButton>\n ),\n }),\n },\n Create: {\n screen: CreateConversationStack,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_details_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAQN,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"conversation_details_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAQN,MAAM,OAAO,CAAA;AA8Dd,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,qBA4QlF"}
|
|
@@ -44,21 +44,32 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
});
|
|
47
|
+
const memberSectionStyleMap = {
|
|
48
|
+
first: styles.sectionInnerFirstMember,
|
|
49
|
+
middle: styles.sectionInnerMiddleMiddle,
|
|
50
|
+
last: styles.sectionInnerLastMember,
|
|
51
|
+
};
|
|
52
|
+
const memberItems = members.map((data, index) => {
|
|
53
|
+
const isFirst = index === 0;
|
|
54
|
+
const isLast = index === members.length - 1;
|
|
55
|
+
const memberPosition = isFirst ? 'first' : isLast ? 'last' : 'middle';
|
|
56
|
+
const memberSectionStyle = memberSectionStyleMap[memberPosition];
|
|
57
|
+
return {
|
|
58
|
+
type: data.child ? SectionTypes.hidden : SectionTypes.members,
|
|
59
|
+
data,
|
|
60
|
+
sectionInnerStyle: memberSectionStyle,
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
const childMembers = members.filter(member => member.child);
|
|
64
|
+
const hasChildren = childMembers.length > 0;
|
|
47
65
|
const teamsGroup = conversation.groups
|
|
48
66
|
?.filter(g => g.sourceAppName === 'Services')
|
|
49
67
|
?.filter(g => ['Team', 'PlanTeam'].includes(g.sourceType))
|
|
50
68
|
?.filter(g => g.name !== null) || [];
|
|
51
69
|
const hasTeams = teamsGroup.length > 0;
|
|
52
|
-
const memberItems = members.map(data => ({
|
|
53
|
-
type: data.child ? SectionTypes.hidden : SectionTypes.members,
|
|
54
|
-
data,
|
|
55
|
-
sectionOuterStyle: styles.memberSectionOuter,
|
|
56
|
-
sectionInnerStyle: styles.memberSectionInner,
|
|
57
|
-
}));
|
|
58
|
-
const childMembers = members.filter(member => member.child);
|
|
59
|
-
const hasChildren = childMembers.length > 0;
|
|
60
70
|
const badge = conversation.badges?.[0];
|
|
61
71
|
const resourceType = badge?.pcoResourceType || '';
|
|
72
|
+
const productName = badge?.appName;
|
|
62
73
|
const name = badge?.text || undefined;
|
|
63
74
|
const handleDelete = useCallback(() => {
|
|
64
75
|
Alert.alert('Delete conversation', `All messages in ${title} will be deleted for everyone. This action cannot be undone.`, [
|
|
@@ -79,9 +90,9 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
79
90
|
const HeaderTitle = useCallback((props) => {
|
|
80
91
|
return (<View style={styles.headerTitleContainer}>
|
|
81
92
|
<ElementsHeaderTitle {...props}/>
|
|
82
|
-
<Badge variant="metaSubtle" label={resourceType} metaLabel={name} style={styles.headerTitleBadge}/>
|
|
93
|
+
<Badge variant="metaSubtle" label={resourceType} metaLabel={name} style={styles.headerTitleBadge} productLogoName={productName}/>
|
|
83
94
|
</View>);
|
|
84
|
-
}, [name, resourceType, styles.headerTitleBadge, styles.headerTitleContainer]);
|
|
95
|
+
}, [name, productName, resourceType, styles.headerTitleBadge, styles.headerTitleContainer]);
|
|
85
96
|
const HeaderRight = useCallback(() => {
|
|
86
97
|
return (<HeaderRightButton onPress={() => {
|
|
87
98
|
saveTitle({ title: trimmedTitle || conversation.title });
|
|
@@ -102,11 +113,13 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
102
113
|
data: {
|
|
103
114
|
children: (<TitleInput canUpdate={canUpdate} title={title} setTitle={setTitle} isEmpty={emptyTitle}/>),
|
|
104
115
|
},
|
|
116
|
+
sectionInnerStyle: styles.sectionInnerTitleInput,
|
|
105
117
|
},
|
|
106
118
|
{
|
|
107
119
|
type: SectionTypes.header,
|
|
108
120
|
data: { title: 'Settings' },
|
|
109
|
-
|
|
121
|
+
showBottomBorder: true,
|
|
122
|
+
sectionInnerStyle: styles.sectionInnerHeaderWithBottomBorder,
|
|
110
123
|
},
|
|
111
124
|
{
|
|
112
125
|
type: SectionTypes.setting,
|
|
@@ -114,7 +127,7 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
114
127
|
title: 'Mute',
|
|
115
128
|
rightItem: <Switch value={muted} onChange={() => setMuted(!muted)}/>,
|
|
116
129
|
},
|
|
117
|
-
|
|
130
|
+
showBottomBorder: true,
|
|
118
131
|
},
|
|
119
132
|
{
|
|
120
133
|
type: canUpdate ? SectionTypes.setting : SectionTypes.hidden,
|
|
@@ -123,13 +136,12 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
123
136
|
subtitle: 'Disables replies for everyone except leaders.',
|
|
124
137
|
rightItem: (<Switch value={repliesDisabled} onChange={() => setRepliesDisabled(!repliesDisabled)}/>),
|
|
125
138
|
},
|
|
126
|
-
|
|
139
|
+
showBottomBorder: true,
|
|
127
140
|
},
|
|
128
141
|
{
|
|
129
142
|
type: canDelete ? SectionTypes.setting : SectionTypes.hidden,
|
|
130
143
|
data: {
|
|
131
144
|
title: 'Delete conversation…',
|
|
132
|
-
style: styles.deleteButton,
|
|
133
145
|
buttonTextStyle: styles.deleteButtonText,
|
|
134
146
|
appearance: 'danger',
|
|
135
147
|
onPress: handleDelete,
|
|
@@ -138,6 +150,7 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
138
150
|
{
|
|
139
151
|
type: hasTeams ? SectionTypes.header : SectionTypes.hidden,
|
|
140
152
|
data: { title: 'Teams' },
|
|
153
|
+
sectionInnerStyle: styles.sectionInnerHeader,
|
|
141
154
|
},
|
|
142
155
|
{
|
|
143
156
|
type: hasTeams ? SectionTypes.view : SectionTypes.hidden,
|
|
@@ -147,57 +160,55 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
147
160
|
},
|
|
148
161
|
{
|
|
149
162
|
type: SectionTypes.header,
|
|
150
|
-
data: { title: '
|
|
163
|
+
data: { title: 'People' },
|
|
164
|
+
sectionInnerStyle: styles.sectionInnerHeader,
|
|
151
165
|
},
|
|
152
166
|
{
|
|
153
167
|
type: hasChildren && isLeader ? SectionTypes.view : SectionTypes.hidden,
|
|
154
168
|
data: {
|
|
155
169
|
children: <ChildNotice childMembers={childMembers}/>,
|
|
156
170
|
},
|
|
157
|
-
|
|
171
|
+
sectionInnerStyle: styles.sectionInnerChildNotice,
|
|
158
172
|
},
|
|
159
173
|
...memberItems,
|
|
160
174
|
].filter(item => item.type !== SectionTypes.hidden);
|
|
161
175
|
const headerIndices = listData
|
|
162
176
|
.map(({ type }, index) => (type === SectionTypes.header ? index : undefined))
|
|
163
177
|
.filter(isDefined);
|
|
164
|
-
return (<
|
|
178
|
+
return (<View style={styles.listContainer}>
|
|
179
|
+
<FlashList data={listData} estimatedItemSize={52} contentContainerStyle={styles.contentContainer} renderItem={({ item, index }) => {
|
|
165
180
|
const [isStart, isEnd] = [
|
|
166
181
|
index === 0 || headerIndices.includes(index),
|
|
167
182
|
index === listData.length - 1 || headerIndices.includes(index + 1),
|
|
168
183
|
];
|
|
169
184
|
switch (item.type) {
|
|
170
185
|
case SectionTypes.header:
|
|
171
|
-
return (<ListSection isStart={isStart} isEnd={isEnd} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
172
|
-
|
|
173
|
-
|
|
186
|
+
return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
187
|
+
<Heading variant="h3">{item.data.title}</Heading>
|
|
188
|
+
</ListSection>);
|
|
174
189
|
case SectionTypes.members:
|
|
175
|
-
return (<ListSection isStart={isStart} isEnd={isEnd} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
176
|
-
|
|
177
|
-
|
|
190
|
+
return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
191
|
+
<Person person={{ ...item.data }}/>
|
|
192
|
+
</ListSection>);
|
|
178
193
|
case SectionTypes.setting:
|
|
179
|
-
return (<ListSection isStart={isStart} isEnd={isEnd} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
180
|
-
|
|
181
|
-
|
|
194
|
+
return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
195
|
+
<SettingRow {...item.data}/>
|
|
196
|
+
</ListSection>);
|
|
182
197
|
case SectionTypes.view:
|
|
183
|
-
return (<ListSection isStart={isStart} isEnd={isEnd} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
184
|
-
|
|
185
|
-
|
|
198
|
+
return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
|
|
199
|
+
<View {...item.data} style={item.data.style}/>
|
|
200
|
+
</ListSection>);
|
|
186
201
|
default:
|
|
187
202
|
return null;
|
|
188
203
|
}
|
|
189
|
-
}}/>
|
|
190
|
-
}
|
|
191
|
-
function ListSection({ isStart, isEnd, outerStyle, innerStyle, children }) {
|
|
192
|
-
const styles = useStyles({ isStart, isEnd });
|
|
193
|
-
return (<View style={[styles.sectionOuter, outerStyle]}>
|
|
194
|
-
<View style={[styles.sectionInner, innerStyle]}>{children}</View>
|
|
204
|
+
}}/>
|
|
195
205
|
</View>);
|
|
196
206
|
}
|
|
197
|
-
function
|
|
198
|
-
const styles = useStyles();
|
|
199
|
-
|
|
200
|
-
|
|
207
|
+
function ListSection({ isStart, isEnd, showBottomBorder, outerStyle, innerStyle, children, }) {
|
|
208
|
+
const styles = useStyles({ isStart, isEnd });
|
|
209
|
+
const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {};
|
|
210
|
+
return (<View style={[styles.sectionOuterBase, outerStyle]}>
|
|
211
|
+
<View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>
|
|
201
212
|
</View>);
|
|
202
213
|
}
|
|
203
214
|
function TitleInput({ canUpdate, title, setTitle, style, isEmpty }) {
|
|
@@ -252,13 +263,16 @@ function TeamsGroup({ teams }) {
|
|
|
252
263
|
// =================================
|
|
253
264
|
const useStyles = ({ isStart, isEnd } = {}) => {
|
|
254
265
|
const { colors } = useTheme();
|
|
266
|
+
const headerBottomPadding = space(0.5);
|
|
255
267
|
return StyleSheet.create({
|
|
256
|
-
|
|
268
|
+
listContainer: {
|
|
269
|
+
flex: 1,
|
|
257
270
|
backgroundColor: colors.fillColorNeutral080,
|
|
271
|
+
},
|
|
272
|
+
contentContainer: {
|
|
258
273
|
padding: space(2),
|
|
259
274
|
},
|
|
260
|
-
|
|
261
|
-
paddingTop: space(1),
|
|
275
|
+
sectionOuterBase: {
|
|
262
276
|
paddingLeft: space(2),
|
|
263
277
|
backgroundColor: colors.fillColorNeutral100Inverted,
|
|
264
278
|
borderTopLeftRadius: isStart ? space(1) : 0,
|
|
@@ -267,15 +281,40 @@ const useStyles = ({ isStart, isEnd } = {}) => {
|
|
|
267
281
|
borderBottomRightRadius: isEnd ? space(1) : 0,
|
|
268
282
|
marginBottom: isEnd ? space(2) : 0,
|
|
269
283
|
},
|
|
270
|
-
|
|
271
|
-
borderBottomWidth: 0,
|
|
272
|
-
borderBottomColor: colors.borderColorDefaultBase,
|
|
284
|
+
sectionInnerBase: {
|
|
273
285
|
paddingRight: space(2),
|
|
274
|
-
|
|
286
|
+
paddingTop: isStart ? space(2) : space(1.5),
|
|
287
|
+
paddingBottom: isEnd ? space(2) : space(1.5),
|
|
288
|
+
},
|
|
289
|
+
sectionInnerHeader: {
|
|
290
|
+
paddingBottom: headerBottomPadding,
|
|
275
291
|
},
|
|
276
|
-
|
|
292
|
+
sectionInnerHeaderWithBottomBorder: {
|
|
293
|
+
paddingBottom: space(2),
|
|
294
|
+
},
|
|
295
|
+
sectionInnerBottomBorder: {
|
|
296
|
+
borderBottomColor: colors.borderColorDefaultBase,
|
|
277
297
|
borderBottomWidth: isEnd ? 0 : 1,
|
|
278
298
|
},
|
|
299
|
+
sectionInnerTitleInput: {
|
|
300
|
+
paddingTop: space(1.5), // paddingVertical doesn't override the sectionInner padding
|
|
301
|
+
paddingBottom: space(1.5),
|
|
302
|
+
},
|
|
303
|
+
sectionInnerChildNotice: {
|
|
304
|
+
paddingBottom: headerBottomPadding,
|
|
305
|
+
},
|
|
306
|
+
sectionInnerMiddleMiddle: {
|
|
307
|
+
paddingTop: 0,
|
|
308
|
+
paddingBottom: space(1.5),
|
|
309
|
+
},
|
|
310
|
+
sectionInnerFirstMember: {
|
|
311
|
+
paddingTop: space(1.5),
|
|
312
|
+
paddingBottom: space(1.5),
|
|
313
|
+
},
|
|
314
|
+
sectionInnerLastMember: {
|
|
315
|
+
paddingTop: 0,
|
|
316
|
+
paddingBottom: space(2),
|
|
317
|
+
},
|
|
279
318
|
titleContainer: {
|
|
280
319
|
gap: 4,
|
|
281
320
|
},
|
|
@@ -303,9 +342,6 @@ const useStyles = ({ isStart, isEnd } = {}) => {
|
|
|
303
342
|
borderTopWidth: 1,
|
|
304
343
|
borderColor: colors.borderColorStatusError,
|
|
305
344
|
},
|
|
306
|
-
header: {
|
|
307
|
-
paddingVertical: space(1.5),
|
|
308
|
-
},
|
|
309
345
|
settingRow: {
|
|
310
346
|
flexDirection: 'row',
|
|
311
347
|
justifyContent: 'space-between',
|
|
@@ -315,9 +351,6 @@ const useStyles = ({ isStart, isEnd } = {}) => {
|
|
|
315
351
|
settingRowContent: {
|
|
316
352
|
flex: 1,
|
|
317
353
|
},
|
|
318
|
-
deleteButton: {
|
|
319
|
-
paddingVertical: 4,
|
|
320
|
-
},
|
|
321
354
|
deleteButtonText: {
|
|
322
355
|
fontWeight: 'normal',
|
|
323
356
|
},
|
|
@@ -329,15 +362,6 @@ const useStyles = ({ isStart, isEnd } = {}) => {
|
|
|
329
362
|
gap: 4,
|
|
330
363
|
flexWrap: 'wrap',
|
|
331
364
|
},
|
|
332
|
-
childNoticeSectionOuter: {
|
|
333
|
-
paddingTop: 0,
|
|
334
|
-
},
|
|
335
|
-
memberSectionOuter: {
|
|
336
|
-
paddingTop: 6,
|
|
337
|
-
},
|
|
338
|
-
memberSectionInner: {
|
|
339
|
-
paddingBottom: 6,
|
|
340
|
-
},
|
|
341
365
|
headerTitleBadge: {
|
|
342
366
|
alignSelf: Platform.select({ android: 'flex-start', default: 'center' }),
|
|
343
367
|
marginTop: 2,
|