@planningcenter/chat-react-native 3.39.0-rc.1 → 3.39.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/messages_disabled_banners.d.ts +6 -1
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +8 -2
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/contexts/api_provider.js +2 -1
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +6 -2
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/hooks/direct_messages/use_direct_message_candidates.d.ts.map +1 -1
- package/build/hooks/direct_messages/use_direct_message_candidates.js +1 -0
- package/build/hooks/direct_messages/use_direct_message_candidates.js.map +1 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts.map +1 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.js +2 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.js.map +1 -1
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/services/use_services_chat_conversation_payload.d.ts.map +1 -1
- package/build/hooks/services/use_services_chat_conversation_payload.js +2 -1
- package/build/hooks/services/use_services_chat_conversation_payload.js.map +1 -1
- package/build/hooks/use_api.d.ts +5 -1
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +2 -1
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_chat_configuration.d.ts.map +1 -1
- package/build/hooks/use_chat_configuration.js +2 -1
- package/build/hooks/use_chat_configuration.js.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts.map +1 -1
- package/build/hooks/use_chat_permissions.js +4 -1
- package/build/hooks/use_chat_permissions.js.map +1 -1
- 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_conversation_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +2 -2
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_current_person.d.ts.map +1 -1
- package/build/hooks/use_current_person.js +4 -2
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +2 -1
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_groups.d.ts.map +1 -1
- package/build/hooks/use_groups.js +2 -1
- package/build/hooks/use_groups.js.map +1 -1
- package/build/hooks/use_groups_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js +2 -1
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_has_direct_messages.d.ts +2 -0
- package/build/hooks/use_has_direct_messages.d.ts.map +1 -0
- package/build/hooks/use_has_direct_messages.js +17 -0
- package/build/hooks/use_has_direct_messages.js.map +1 -0
- package/build/hooks/use_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +2 -1
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_organization.d.ts.map +1 -1
- package/build/hooks/use_organization.js +4 -1
- package/build/hooks/use_organization.js.map +1 -1
- package/build/hooks/use_person_settings.d.ts +6 -0
- package/build/hooks/use_person_settings.d.ts.map +1 -0
- package/build/hooks/use_person_settings.js +26 -0
- package/build/hooks/use_person_settings.js.map +1 -0
- package/build/navigation/index.d.ts +13 -0
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +9 -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 +2 -1
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +20 -5
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +2 -1
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +2 -2
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +4 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/filter_types.d.ts +1 -0
- package/build/screens/conversation_filters/filter_types.d.ts.map +1 -1
- package/build/screens/conversation_filters/filter_types.js +1 -0
- package/build/screens/conversation_filters/filter_types.js.map +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts +1 -0
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_filters/screen_props.js.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +1 -1
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +319 -10
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +35 -17
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -0
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +2 -18
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/index.d.ts +1 -0
- package/build/screens/index.d.ts.map +1 -1
- package/build/screens/index.js +1 -0
- package/build/screens/index.js.map +1 -1
- package/build/screens/settings_screen.d.ts +5 -0
- package/build/screens/settings_screen.d.ts.map +1 -0
- package/build/screens/settings_screen.js +56 -0
- package/build/screens/settings_screen.js.map +1 -0
- package/build/types/jolt_events/conversation_events.d.ts +2 -0
- package/build/types/jolt_events/conversation_events.d.ts.map +1 -1
- package/build/types/jolt_events/conversation_events.js.map +1 -1
- package/build/types/resources/conversation.d.ts +2 -0
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/types/resources/organization.d.ts +1 -0
- package/build/types/resources/organization.d.ts.map +1 -1
- package/build/types/resources/organization.js.map +1 -1
- package/build/types/resources/person.d.ts +1 -0
- package/build/types/resources/person.d.ts.map +1 -1
- package/build/types/resources/person.js.map +1 -1
- package/build/utils/request/conversation.d.ts +2 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +15 -6
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/time.d.ts +8 -0
- package/build/utils/time.d.ts.map +1 -0
- package/build/utils/time.js +15 -0
- package/build/utils/time.js.map +1 -0
- package/package.json +2 -2
- package/src/components/conversation/messages_disabled_banners.tsx +16 -2
- package/src/contexts/api_provider.tsx +4 -1
- package/src/contexts/conversations_context.tsx +6 -2
- package/src/hooks/direct_messages/use_direct_message_candidates.ts +1 -0
- package/src/hooks/groups/use_group_chat_conversation_payload.ts +2 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/services/use_services_chat_conversation_payload.ts +2 -1
- package/src/hooks/use_api.ts +10 -1
- package/src/hooks/use_chat_configuration.ts +2 -1
- package/src/hooks/use_chat_permissions.ts +4 -1
- package/src/hooks/use_conversation.ts +1 -0
- package/src/hooks/use_conversation_jolt_events.ts +3 -2
- package/src/hooks/use_current_person.ts +4 -2
- package/src/hooks/use_features.ts +2 -1
- package/src/hooks/use_groups.ts +16 -12
- package/src/hooks/use_groups_groups.ts +19 -15
- package/src/hooks/use_has_direct_messages.ts +21 -0
- package/src/hooks/use_jolt.ts +2 -1
- package/src/hooks/use_organization.ts +4 -1
- package/src/hooks/use_person_settings.ts +29 -0
- package/src/navigation/index.tsx +11 -0
- package/src/screens/conversation_details_screen.tsx +2 -1
- package/src/screens/conversation_filters/components/conversation_filters.tsx +25 -5
- package/src/screens/conversation_filters/components/rows.tsx +16 -3
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +4 -0
- package/src/screens/conversation_filters/filter_types.ts +1 -0
- package/src/screens/conversation_filters/screen_props.ts +1 -0
- package/src/screens/conversation_screen.tsx +2 -1
- package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +513 -10
- package/src/screens/conversations/components/list_header_component.tsx +84 -34
- package/src/screens/conversations/conversations_screen.tsx +1 -0
- package/src/screens/get_help_screen.tsx +2 -29
- package/src/screens/index.ts +1 -0
- package/src/screens/settings_screen.tsx +67 -0
- package/src/types/jolt_events/conversation_events.ts +2 -0
- package/src/types/resources/conversation.ts +3 -0
- package/src/types/resources/organization.ts +1 -0
- package/src/types/resources/person.ts +1 -0
- package/src/utils/__tests__/conversation.test.ts +14 -0
- package/src/utils/request/conversation.ts +13 -5
- package/src/utils/time.ts +17 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_current_person.d.ts","sourceRoot":"","sources":["../../src/hooks/use_current_person.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"use_current_person.d.ts","sourceRoot":"","sources":["../../src/hooks/use_current_person.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAKhD,eAAO,MAAM,wBAAwB;;;;;;;CAgBpC,CAAA;AAED,eAAO,MAAM,qBAAqB,8CAA+C,CAAA;AAEjF,eAAO,MAAM,gBAAgB,6BAO5B,CAAA;AAED,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AAE5D,eAAO,MAAM,qBAAqB;qBAGtB,OAAO,CAAC,qBAAqB,CAAC,kBACvB,aAAa,CAAC,qBAAqB,CAAC;;CActD,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { FIVE_MINUTES, THIRTY_MINUTES } from '../utils/time';
|
|
2
3
|
import { getRequestQueryKey, useSuspenseGet } from './use_suspense_api';
|
|
3
4
|
export const currentPersonRequestArgs = {
|
|
4
5
|
url: '/me',
|
|
@@ -12,6 +13,7 @@ export const currentPersonRequestArgs = {
|
|
|
12
13
|
'unread_count',
|
|
13
14
|
'pco_chat_enabled',
|
|
14
15
|
'age_qualification_status',
|
|
16
|
+
'direct_messages_disabled',
|
|
15
17
|
],
|
|
16
18
|
},
|
|
17
19
|
},
|
|
@@ -19,8 +21,8 @@ export const currentPersonRequestArgs = {
|
|
|
19
21
|
export const currentPersonQueryKey = getRequestQueryKey(currentPersonRequestArgs);
|
|
20
22
|
export const useCurrentPerson = () => {
|
|
21
23
|
const { data: person } = useSuspenseGet(currentPersonRequestArgs, {
|
|
22
|
-
staleTime:
|
|
23
|
-
gcTime:
|
|
24
|
+
staleTime: FIVE_MINUTES,
|
|
25
|
+
gcTime: THIRTY_MINUTES,
|
|
24
26
|
});
|
|
25
27
|
return person;
|
|
26
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_current_person.js","sourceRoot":"","sources":["../../src/hooks/use_current_person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGtD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEvE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,GAAG,EAAE,KAAK;IACV,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,IAAI;gBACJ,MAAM;gBACN,QAAQ;gBACR,UAAU;gBACV,cAAc;gBACd,kBAAkB;gBAClB,0BAA0B;aAC3B;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAA;AAEjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,cAAc,CAAwB,wBAAwB,EAAE;QACvF,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"use_current_person.js","sourceRoot":"","sources":["../../src/hooks/use_current_person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGtD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEvE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,GAAG,EAAE,KAAK;IACV,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,IAAI;gBACJ,MAAM;gBACN,QAAQ;gBACR,UAAU;gBACV,cAAc;gBACd,kBAAkB;gBAClB,0BAA0B;gBAC1B,0BAA0B;aAC3B;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAA;AAEjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,cAAc,CAAwB,wBAAwB,EAAE;QACvF,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,cAAc;KACvB,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAID,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,YAAY,GAAG,CACnB,MAAsC,EACtC,gBAAsD,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,EAChF,EAAE;QACF,WAAW,CAAC,YAAY,CAAqC,qBAAqB,EAAE,IAAI,CAAC,EAAE;YACzF,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAA;YAEtB,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAA;QAC5D,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC5B,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,qBAAqB,EAAE,CAAC,CAAA;IACpE,CAAC,CAAA;IAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAA;AAC/D,CAAC,CAAA","sourcesContent":["import { useQueryClient } from '@tanstack/react-query'\nimport { CurrentPersonResource } from '../types'\nimport { ApiResource } from '../types/api_primitives'\nimport { FIVE_MINUTES, THIRTY_MINUTES } from '../utils/time'\nimport { getRequestQueryKey, useSuspenseGet } from './use_suspense_api'\n\nexport const currentPersonRequestArgs = {\n url: '/me',\n data: {\n fields: {\n Person: [\n 'id',\n 'name',\n 'avatar',\n 'can_chat',\n 'unread_count',\n 'pco_chat_enabled',\n 'age_qualification_status',\n 'direct_messages_disabled',\n ],\n },\n },\n}\n\nexport const currentPersonQueryKey = getRequestQueryKey(currentPersonRequestArgs)\n\nexport const useCurrentPerson = () => {\n const { data: person } = useSuspenseGet<CurrentPersonResource>(currentPersonRequestArgs, {\n staleTime: FIVE_MINUTES,\n gcTime: THIRTY_MINUTES,\n })\n\n return person\n}\n\ntype ProcessRecord<T> = (record: T, update: Partial<T>) => T\n\nexport const useCurrentPersonCache = () => {\n const queryClient = useQueryClient()\n const handleUpdate = (\n update: Partial<CurrentPersonResource>,\n processRecord: ProcessRecord<CurrentPersonResource> = (r, u) => ({ ...r, ...u })\n ) => {\n queryClient.setQueryData<ApiResource<CurrentPersonResource>>(currentPersonQueryKey, data => {\n if (!data) return data\n\n return { ...data, data: processRecord(data.data, update) }\n })\n }\n\n const handleInvalidate = () => {\n queryClient.invalidateQueries({ queryKey: currentPersonQueryKey })\n }\n\n return { update: handleUpdate, invalidate: handleInvalidate }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_features.d.ts","sourceRoot":"","sources":["../../src/hooks/use_features.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"use_features.d.ts","sourceRoot":"","sources":["../../src/hooks/use_features.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAK1E,KAAK,WAAW,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAA;AAE7E,wBAAgB,WAAW;;kCAiBT,WAAW;EAS5B;AAED,eAAO,MAAM,iBAAiB;;;;;;;;CAQ0B,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useSuspenseQuery } from '@tanstack/react-query';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import { getFeaturesRequestArgs, getFeaturesQueryKey } from '../utils/request/get_features';
|
|
4
|
+
import { FIVE_MINUTES } from '../utils/time';
|
|
4
5
|
import { useApiClient } from './use_api_client';
|
|
5
6
|
export function useFeatures() {
|
|
6
7
|
const apiClient = useApiClient();
|
|
@@ -12,7 +13,7 @@ export function useFeatures() {
|
|
|
12
13
|
.get(requestArgs)
|
|
13
14
|
.catch(() => stableEmptyFeatures);
|
|
14
15
|
},
|
|
15
|
-
staleTime:
|
|
16
|
+
staleTime: FIVE_MINUTES,
|
|
16
17
|
});
|
|
17
18
|
const features = data.data;
|
|
18
19
|
const featureEnabled = useCallback((featureName) => features.some(feature => feature.name === featureName && feature.enabled), [features]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_features.js","sourceRoot":"","sources":["../../src/hooks/use_features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAGnC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAI/C,MAAM,UAAU,WAAW;IACzB,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAA;IAE5C,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC;QAChC,QAAQ,EAAE,mBAAmB,EAAE;QAC/B,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,SAAS,CAAC,IAAI;iBAClB,GAAG,CAAiC,WAAW,CAAC;iBAChD,KAAK,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAA;QACrC,CAAC;QACD,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"use_features.js","sourceRoot":"","sources":["../../src/hooks/use_features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAGnC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAI/C,MAAM,UAAU,WAAW;IACzB,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAA;IAE5C,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC;QAChC,QAAQ,EAAE,mBAAmB,EAAE;QAC/B,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,SAAS,CAAC,IAAI;iBAClB,GAAG,CAAiC,WAAW,CAAC;iBAChD,KAAK,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAA;QACrC,CAAC;QACD,SAAS,EAAE,YAAY;KACxB,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;IAE1B,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,WAAwB,EAAE,EAAE,CAC3B,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,EAC3E,CAAC,QAAQ,CAAC,CACX,CAAA;IAED,OAAO;QACL,QAAQ;QACR,cAAc;KACf,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,6BAA6B,EAAE,uCAAuC;IACtE,iBAAiB,EAAE,kCAAkC;IACrD,yBAAyB,EAAE,8CAA8C;IACzE,2BAA2B,EAAE,qCAAqC;IAClE,wBAAwB,EAAE,kCAAkC;IAC5D,gBAAgB,EAAE,iCAAiC;IACnD,mBAAmB,EAAE,6BAA6B;CACI,CAAA;AAExD,MAAM,mBAAmB,GAAmC;IAC1D,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;QACR,UAAU,EAAE,CAAC;KACd;CACF,CAAA","sourcesContent":["import { useSuspenseQuery } from '@tanstack/react-query'\nimport { useCallback } from 'react'\nimport { ApiCollection } from '../types'\nimport type { FeatureResource } from '../types/resources/feature_resource'\nimport { getFeaturesRequestArgs, getFeaturesQueryKey } from '../utils/request/get_features'\nimport { FIVE_MINUTES } from '../utils/time'\nimport { useApiClient } from './use_api_client'\n\ntype FeatureName = (typeof availableFeatures)[keyof typeof availableFeatures]\n\nexport function useFeatures() {\n const apiClient = useApiClient()\n const requestArgs = getFeaturesRequestArgs()\n\n const { data } = useSuspenseQuery({\n queryKey: getFeaturesQueryKey(),\n queryFn: () => {\n return apiClient.chat\n .get<ApiCollection<FeatureResource>>(requestArgs)\n .catch(() => stableEmptyFeatures)\n },\n staleTime: FIVE_MINUTES,\n })\n\n const features = data.data\n\n const featureEnabled = useCallback(\n (featureName: FeatureName) =>\n features.some(feature => feature.name === featureName && feature.enabled),\n [features]\n )\n\n return {\n features,\n featureEnabled,\n }\n}\n\nexport const availableFeatures = {\n gender_specific_conversations: 'ROLLOUT_gender_specific_conversations',\n message_reporting: 'ROLLOUT_MOBILE_message_reporting',\n granular_notifications_ui: 'ROLLOUT_granular_notification_preferences_ui',\n custom_conversation_avatars: 'ROLLOUT_custom_conversation_avatars',\n conversation_safety_lock: 'ROLLOUT_conversation_safety_lock',\n video_moderation: 'ROLLOUT_MOBILE_video_moderation',\n direct_messages_eap: 'ROLLOUT_direct_messages_eap',\n} as const satisfies Record<string, `ROLLOUT_${string}`>\n\nconst stableEmptyFeatures: ApiCollection<FeatureResource> = {\n data: [],\n links: {},\n meta: {\n count: 0,\n totalCount: 0,\n },\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_groups.d.ts","sourceRoot":"","sources":["../../src/hooks/use_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"use_groups.d.ts","sourceRoot":"","sources":["../../src/hooks/use_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAI7E,KAAK,cAAc,GAAG;IACpB,eAAe,EAAE,OAAO,CAAA;IACxB,WAAW,EAAE,UAAU,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,kCAAkC,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBzE,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,cAAc,YAIxD,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FIVE_MINUTES } from '../utils/time';
|
|
1
2
|
import { useApiPaginator } from './use_api';
|
|
2
3
|
export const useGroups = ({ source_app_name, source_type }) => {
|
|
3
4
|
return useApiPaginator({
|
|
@@ -13,7 +14,7 @@ export const useGroups = ({ source_app_name, source_type }) => {
|
|
|
13
14
|
perPage: 100,
|
|
14
15
|
},
|
|
15
16
|
app: 'chat',
|
|
16
|
-
});
|
|
17
|
+
}, { staleTime: FIVE_MINUTES });
|
|
17
18
|
};
|
|
18
19
|
export const useCanDisplayGroups = (props) => {
|
|
19
20
|
const { data: teams = [] } = useGroups(props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_groups.js","sourceRoot":"","sources":["../../src/hooks/use_groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAO3C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,eAAe,EAAE,WAAW,EAAkB,EAAE,EAAE;IAC5E,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"use_groups.js","sourceRoot":"","sources":["../../src/hooks/use_groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAO3C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,eAAe,EAAE,WAAW,EAAkB,EAAE,EAAE;IAC5E,OAAO,eAAe,CACpB;QACE,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;aACV;YACD,KAAK,EAAE;gBACL,eAAe;gBACf,WAAW;aACZ;YACD,OAAO,EAAE,GAAG;SACb;QACD,GAAG,EAAE,MAAM;KACZ,EACD,EAAE,SAAS,EAAE,YAAY,EAAE,CAC5B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC3D,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;IAE7C,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC,CAAA;AAC1B,CAAC,CAAA","sourcesContent":["import { AppName } from '../types/resources/app_name'\nimport { GroupResource, SourceType } from '../types/resources/group_resource'\nimport { FIVE_MINUTES } from '../utils/time'\nimport { useApiPaginator } from './use_api'\n\ntype UseGroupsProps = {\n source_app_name: AppName\n source_type: SourceType\n}\n\nexport const useGroups = ({ source_app_name, source_type }: UseGroupsProps) => {\n return useApiPaginator<GroupResource>(\n {\n url: '/me/groups',\n data: {\n fields: {\n Group: [],\n },\n where: {\n source_app_name,\n source_type,\n },\n perPage: 100,\n },\n app: 'chat',\n },\n { staleTime: FIVE_MINUTES }\n )\n}\n\nexport const useCanDisplayGroups = (props: UseGroupsProps) => {\n const { data: teams = [] } = useGroups(props)\n\n return teams?.length > 0\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_groups_groups.d.ts","sourceRoot":"","sources":["../../src/hooks/use_groups_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"use_groups_groups.d.ts","sourceRoot":"","sources":["../../src/hooks/use_groups_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAI9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAA;AAED,eAAO,MAAM,yBAAyB,eAGrC,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FIVE_MINUTES } from '../utils/time';
|
|
1
2
|
import { useApiPaginator } from './use_api';
|
|
2
3
|
export const useGroupsGroups = () => {
|
|
3
4
|
return useApiPaginator({
|
|
@@ -16,7 +17,7 @@ export const useGroupsGroups = () => {
|
|
|
16
17
|
order: 'name',
|
|
17
18
|
},
|
|
18
19
|
app: 'groups',
|
|
19
|
-
});
|
|
20
|
+
}, { staleTime: FIVE_MINUTES });
|
|
20
21
|
};
|
|
21
22
|
export const useCanDisplayGroupsGroups = () => {
|
|
22
23
|
const { data: groups = [] } = useGroupsGroups();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_groups_groups.js","sourceRoot":"","sources":["../../src/hooks/use_groups_groups.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"use_groups_groups.js","sourceRoot":"","sources":["../../src/hooks/use_groups_groups.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,OAAO,eAAe,CACpB;QACE,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE;YACJ,OAAO,EAAE,GAAG;YACZ,MAAM,EAAE;gBACN,KAAK,EAAE;oBACL,yBAAyB;oBACzB,qCAAqC;oBACrC,MAAM;oBACN,cAAc;oBACd,mBAAmB;iBACpB;aACF;YACD,KAAK,EAAE,MAAM;SACd;QACD,GAAG,EAAE,QAAQ;KACd,EACD,EAAE,SAAS,EAAE,YAAY,EAAE,CAC5B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC5C,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,eAAe,EAAE,CAAA;IAC/C,OAAO,MAAM,EAAE,MAAM,GAAG,CAAC,CAAA;AAC3B,CAAC,CAAA","sourcesContent":["import { GroupsGroupResource } from '../types'\nimport { FIVE_MINUTES } from '../utils/time'\nimport { useApiPaginator } from './use_api'\n\nexport const useGroupsGroups = () => {\n return useApiPaginator<GroupsGroupResource>(\n {\n url: '/me/groups',\n data: {\n perPage: 100,\n fields: {\n Group: [\n 'can_create_conversation',\n 'can_create_conversation_reason_code',\n 'name',\n 'header_image',\n 'memberships_count',\n ],\n },\n order: 'name',\n },\n app: 'groups',\n },\n { staleTime: FIVE_MINUTES }\n )\n}\n\nexport const useCanDisplayGroupsGroups = () => {\n const { data: groups = [] } = useGroupsGroups()\n return groups?.length > 0\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_has_direct_messages.d.ts","sourceRoot":"","sources":["../../src/hooks/use_has_direct_messages.ts"],"names":[],"mappings":"AAIA,wBAAgB,oBAAoB,IAAI,OAAO,CAgB9C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useQuery } from '@tanstack/react-query';
|
|
2
|
+
import { useApiClient } from './use_api_client';
|
|
3
|
+
export function useHasDirectMessages() {
|
|
4
|
+
const apiClient = useApiClient();
|
|
5
|
+
const { data, isFetched } = useQuery({
|
|
6
|
+
queryKey: ['chat', '/me/conversations', 'direct_message', 'has_any'],
|
|
7
|
+
queryFn: () => apiClient.chat.get({
|
|
8
|
+
url: '/me/conversations',
|
|
9
|
+
data: { filter: 'direct_message', perPage: 1, fields: { Conversation: ['id'] } },
|
|
10
|
+
}),
|
|
11
|
+
staleTime: 1000 * 60 * 5,
|
|
12
|
+
});
|
|
13
|
+
if (!isFetched)
|
|
14
|
+
return false;
|
|
15
|
+
return (data?.data.length ?? 0) > 0;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=use_has_direct_messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_has_direct_messages.js","sourceRoot":"","sources":["../../src/hooks/use_has_direct_messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,MAAM,UAAU,oBAAoB;IAClC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAsC;QACxE,QAAQ,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,SAAS,CAAC;QACpE,OAAO,EAAE,GAAG,EAAE,CACZ,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;YACjB,GAAG,EAAE,mBAAmB;YACxB,IAAI,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;SACjF,CAAC;QACJ,SAAS,EAAE,IAAI,GAAG,EAAE,GAAG,CAAC;KACzB,CAAC,CAAA;IAEF,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAA;IAE5B,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;AACrC,CAAC","sourcesContent":["import { useQuery } from '@tanstack/react-query'\nimport { ApiCollection, ConversationResource } from '../types'\nimport { useApiClient } from './use_api_client'\n\nexport function useHasDirectMessages(): boolean {\n const apiClient = useApiClient()\n\n const { data, isFetched } = useQuery<ApiCollection<ConversationResource>>({\n queryKey: ['chat', '/me/conversations', 'direct_message', 'has_any'],\n queryFn: () =>\n apiClient.chat.get({\n url: '/me/conversations',\n data: { filter: 'direct_message', perPage: 1, fields: { Conversation: ['id'] } },\n }),\n staleTime: 1000 * 60 * 5,\n })\n\n if (!isFetched) return false\n\n return (data?.data.length ?? 0) > 0\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_jolt.d.ts","sourceRoot":"","sources":["../../src/hooks/use_jolt.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,EACL,aAAa,EAEd,MAAM,uDAAuD,CAAA;AAC9D,OAAO,EAEL,gBAAgB,EACjB,MAAM,yDAAyD,CAAA;AAKhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"use_jolt.d.ts","sourceRoot":"","sources":["../../src/hooks/use_jolt.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,EACL,aAAa,EAEd,MAAM,uDAAuD,CAAA;AAC9D,OAAO,EAEL,gBAAgB,EACjB,MAAM,yDAAyD,CAAA;AAKhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAUnE,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAmG7C,CAAA;AAED,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,OAAc,GACtB,gBAAgB,GAAG,SAAS,GAAG,IAAI,CAoCrC;AAED,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;AAE5C,wBAAgB,YAAY,CAAC,CAAC,SAAS,aAAa,EAClD,OAAO,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI,EAC5C,SAAS,EAAE,uBAAuB,EAClC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,QAO5B"}
|
package/build/hooks/use_jolt.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useQuery, useQueryClient, useSuspenseQuery } from '@tanstack/react-quer
|
|
|
3
3
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
4
4
|
import { useChatContext } from '../contexts/chat_context';
|
|
5
5
|
import { Client, Uri } from '../utils';
|
|
6
|
+
import { FIVE_SECONDS } from '../utils/time';
|
|
6
7
|
export const useJoltClient = () => {
|
|
7
8
|
const { session } = useChatContext();
|
|
8
9
|
const sessionAccessToken = session.token?.access_token;
|
|
@@ -27,7 +28,7 @@ export const useJoltClient = () => {
|
|
|
27
28
|
},
|
|
28
29
|
});
|
|
29
30
|
},
|
|
30
|
-
staleTime:
|
|
31
|
+
staleTime: FIVE_SECONDS,
|
|
31
32
|
});
|
|
32
33
|
};
|
|
33
34
|
/** The wssUrl is static and doesn't change so we can cache it to infinity and beyond */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_jolt.js","sourceRoot":"","sources":["../../src/hooks/use_jolt.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,6BAA6B,CAAA;AASpD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAClF,OAAO,EAAE,WA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AAO;YAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAA;QAE7B,OAAO,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAM,CAAC,CAAC,CAAA;IACvD,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAA;AACpC,CAAC","sourcesContent":["import JoltClient from '@planningcenter/jolt-client'\nimport {\n CustomMessage,\n FetchAuthToken,\n} from '@planningcenter/jolt-client/dist/types/JoltConnection'\nimport {\n FetchSubscribeToken,\n JoltSubscription,\n} from '@planningcenter/jolt-client/dist/types/JoltSubscription'\nimport { useQuery, useQueryClient, useSuspenseQuery } from '@tanstack/react-query'\nimport { useCallback, useEffect, useMemo } from 'react'\nimport { useChatContext } from '../contexts/chat_context'\nimport { ApiResource } from '../types'\nimport type { JoltSubscriptionPattern } from '../types/jolt_events'\nimport { Client, Uri } from '../utils'\nimport { FIVE_SECONDS } from '../utils/time'\n\ninterface JoltResponse {\n type: 'JoltToken'\n id: string\n wssUrl: string\n}\n\nexport const useJoltClient = (): JoltClient | undefined => {\n const { session } = useChatContext()\n const sessionAccessToken = session.token?.access_token\n const queryClient = useQueryClient()\n const uri = useMemo(() => new Uri({ session }), [session])\n const apiClient = useMemo(\n () =>\n new Client({\n root: uri.api(`/chat/v2`),\n defaultHeaders: uri.headers,\n version: '2018-11-01',\n }),\n [uri]\n )\n\n const fetchJoltToken = async () => {\n return queryClient.fetchQuery({\n queryKey: ['jolt-token'],\n queryFn: () => {\n return apiClient.post<ApiResource<JoltResponse>>({\n url: '/me/jolt_authorize',\n data: {\n data: {\n type: 'JoltToken',\n attributes: {},\n },\n },\n })\n },\n staleTime: FIVE_SECONDS,\n })\n }\n\n /** The wssUrl is static and doesn't change so we can cache it to infinity and beyond */\n const { data: wssUrl } = useSuspenseQuery<string>({\n queryKey: ['wss-url'],\n queryFn: () => fetchJoltToken().then(res => res.data.wssUrl),\n staleTime: Infinity,\n gcTime: Infinity,\n refetchOnWindowFocus: false,\n })\n\n const fetchAuthTokenFn: FetchAuthToken = () => {\n return queryClient.fetchQuery({\n queryKey: ['jolt-auth-token'],\n queryFn: () => fetchJoltToken().then(res => res.data.id),\n })\n }\n\n const fetchSubscribeToken: FetchSubscribeToken = (channel: string, connectionId: string) => {\n return apiClient\n .post<ApiResource<JoltResponse>>({\n url: '/me/jolt_subscribe',\n data: {\n data: {\n type: 'JoltSubscribeToken',\n attributes: { channel, cid: connectionId },\n },\n },\n })\n .then(res => res.data.id)\n .catch((res: unknown) => {\n console.error('failed to subscribe to Jolt channel', res)\n return ''\n })\n }\n\n const fetchSubscribeTokenFn: FetchSubscribeToken = (\n channel: string,\n connectionId: string,\n options\n ) => {\n return queryClient.fetchQuery({\n queryKey: ['jolt-subscribe-token', channel, connectionId],\n queryFn: () => fetchSubscribeToken(channel, connectionId, options),\n })\n }\n\n const { data: joltClient } = useQuery({\n enabled: Boolean(wssUrl),\n queryKey: ['jolt-client', wssUrl, sessionAccessToken],\n queryFn: async () => {\n if (!wssUrl) return undefined\n\n return new JoltClient(\n wssUrl,\n {\n fetchAuthTokenFn,\n fetchSubscribeTokenFn,\n },\n { logToConsole: false }\n )\n },\n refetchOnWindowFocus: false,\n staleTime: Infinity,\n gcTime: Infinity,\n })\n\n return joltClient\n}\n\nexport function useJoltChannel(\n channelName: string,\n enabled: boolean = true\n): JoltSubscription | undefined | null {\n const jolt = useJoltClient()\n const queryClient = useQueryClient()\n const ready = Boolean(jolt) && enabled\n\n const handleSubscribe = useCallback(async () => {\n if (!jolt) return null\n\n // If the subscription already exists, we don't need to subscribe again\n const alreadySubscribed = jolt.subscriptions.find(c => c.channel === channelName)\n if (alreadySubscribed) return alreadySubscribed\n\n return jolt.subscribe(channelName)\n }, [channelName, jolt])\n\n const { data: subscription } = useQuery<JoltSubscription | null>({\n queryKey: ['jolt-subscription', channelName],\n queryFn: handleSubscribe,\n refetchOnWindowFocus: false,\n enabled: ready,\n })\n\n const handleUnsubscribe = useCallback(() => {\n queryClient.removeQueries({\n queryKey: ['jolt-subscription', channelName],\n exact: true,\n })\n\n jolt?.unsubscribe(channelName)\n }, [queryClient, channelName, jolt])\n\n useEffect(() => {\n return handleUnsubscribe\n }, [handleUnsubscribe])\n\n return subscription\n}\n\ntype UserCallbackFn<T> = (_event: T) => void\n\nexport function useJoltEvent<T extends CustomMessage>(\n channel: JoltSubscription | undefined | null,\n eventName: JoltSubscriptionPattern,\n callback: UserCallbackFn<T>\n) {\n useEffect(() => {\n if (!channel) return () => {}\n\n return channel.bind(eventName, e => callback(e as T))\n }, [channel, eventName, callback])\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_organization.d.ts","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"use_organization.d.ts","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAGtC,eAAO,MAAM,uBAAuB;;;;;;;SAOnB,GAAG;CACnB,CAAA;AAED,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;EAI9B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ONE_HOUR } from '../utils/time';
|
|
1
2
|
import { useSuspenseGet } from './use_suspense_api';
|
|
2
3
|
export const organizationRequestArgs = {
|
|
3
4
|
url: '/',
|
|
@@ -9,6 +10,8 @@ export const organizationRequestArgs = {
|
|
|
9
10
|
app: 'chat',
|
|
10
11
|
};
|
|
11
12
|
export function useOrganization() {
|
|
12
|
-
return useSuspenseGet(organizationRequestArgs
|
|
13
|
+
return useSuspenseGet(organizationRequestArgs, {
|
|
14
|
+
staleTime: ONE_HOUR,
|
|
15
|
+
});
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=use_organization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_organization.js","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_organization.js","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,GAAG,EAAE,GAAG;IACR,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,YAAY,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,sBAAsB,CAAC;SAChE;KACF;IACD,GAAG,EAAE,MAAa;CACnB,CAAA;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,cAAc,CAAuB,uBAAuB,EAAE;QACnE,SAAS,EAAE,QAAQ;KACpB,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { OrganizationResource } from '../types'\nimport { ONE_HOUR } from '../utils/time'\nimport { App } from './use_api_client'\nimport { useSuspenseGet } from './use_suspense_api'\n\nexport const organizationRequestArgs = {\n url: '/',\n data: {\n fields: {\n Organization: ['contact_email', 'name', 'contact_phone_number'],\n },\n },\n app: 'chat' as App,\n}\n\nexport function useOrganization() {\n return useSuspenseGet<OrganizationResource>(organizationRequestArgs, {\n staleTime: ONE_HOUR,\n })\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function usePersonSettings(): {
|
|
2
|
+
directMessagesDisabled: boolean;
|
|
3
|
+
setDirectMessagesDisabled: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | import("..").ApiResource, Error, boolean, void>;
|
|
4
|
+
isMutating: boolean;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=use_person_settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_person_settings.d.ts","sourceRoot":"","sources":["../../src/hooks/use_person_settings.ts"],"names":[],"mappings":"AAKA,wBAAgB,iBAAiB;;;;EAuBhC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { throwResponseError } from '../utils/response_error';
|
|
3
|
+
import { useApiClient } from './use_api_client';
|
|
4
|
+
import { useCurrentPerson, useCurrentPersonCache } from './use_current_person';
|
|
5
|
+
export function usePersonSettings() {
|
|
6
|
+
const apiClient = useApiClient();
|
|
7
|
+
const person = useCurrentPerson();
|
|
8
|
+
const { update, invalidate } = useCurrentPersonCache();
|
|
9
|
+
const directMessagesDisabled = person?.directMessagesDisabled ?? false;
|
|
10
|
+
const { mutate: setDirectMessagesDisabled, isPending: isMutating } = useMutation({
|
|
11
|
+
mutationFn: (disabled) => {
|
|
12
|
+
const action = disabled ? 'disable_direct_messages' : 'enable_direct_messages';
|
|
13
|
+
return apiClient.chat
|
|
14
|
+
.post({ url: `/me/${action}`, data: { data: { type: 'Person', attributes: {} } } })
|
|
15
|
+
.catch(throwResponseError);
|
|
16
|
+
},
|
|
17
|
+
onMutate: disabled => {
|
|
18
|
+
update({ directMessagesDisabled: disabled });
|
|
19
|
+
},
|
|
20
|
+
onError: () => {
|
|
21
|
+
invalidate();
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return { directMessagesDisabled, setDirectMessagesDisabled, isMutating };
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=use_person_settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_person_settings.js","sourceRoot":"","sources":["../../src/hooks/use_person_settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE9E,MAAM,UAAU,iBAAiB;IAC/B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAA;IACjC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,qBAAqB,EAAE,CAAA;IAEtD,MAAM,sBAAsB,GAAG,MAAM,EAAE,sBAAsB,IAAI,KAAK,CAAA;IAEtE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC;QAC/E,UAAU,EAAE,CAAC,QAAiB,EAAE,EAAE;YAChC,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,wBAAwB,CAAA;YAC9E,OAAO,SAAS,CAAC,IAAI;iBAClB,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;iBAClF,KAAK,CAAC,kBAAkB,CAAC,CAAA;QAC9B,CAAC;QACD,QAAQ,EAAE,QAAQ,CAAC,EAAE;YACnB,MAAM,CAAC,EAAE,sBAAsB,EAAE,QAAQ,EAAE,CAAC,CAAA;QAC9C,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,UAAU,EAAE,CAAA;QACd,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAA;AAC1E,CAAC","sourcesContent":["import { useMutation } from '@tanstack/react-query'\nimport { throwResponseError } from '../utils/response_error'\nimport { useApiClient } from './use_api_client'\nimport { useCurrentPerson, useCurrentPersonCache } from './use_current_person'\n\nexport function usePersonSettings() {\n const apiClient = useApiClient()\n const person = useCurrentPerson()\n const { update, invalidate } = useCurrentPersonCache()\n\n const directMessagesDisabled = person?.directMessagesDisabled ?? false\n\n const { mutate: setDirectMessagesDisabled, isPending: isMutating } = useMutation({\n mutationFn: (disabled: boolean) => {\n const action = disabled ? 'disable_direct_messages' : 'enable_direct_messages'\n return apiClient.chat\n .post({ url: `/me/${action}`, data: { data: { type: 'Person', attributes: {} } } })\n .catch(throwResponseError)\n },\n onMutate: disabled => {\n update({ directMessagesDisabled: disabled })\n },\n onError: () => {\n invalidate()\n },\n })\n\n return { directMessagesDisabled, setDirectMessagesDisabled, isMutating }\n}\n"]}
|
|
@@ -23,6 +23,7 @@ import { NotificationSettingsScreen } from '../screens/notification_settings_scr
|
|
|
23
23
|
import { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen';
|
|
24
24
|
import { ReactionsScreen } from '../screens/reactions_screen';
|
|
25
25
|
import { SendGiphyScreen } from '../screens/send_giphy_screen';
|
|
26
|
+
import { SettingsScreen } from '../screens/settings_screen';
|
|
26
27
|
import { SystemMessagePeopleScreen } from '../screens/system_message_people_screen';
|
|
27
28
|
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
28
29
|
export declare const NewConversationStack: import("@react-navigation/core").TypedNavigator<{
|
|
@@ -203,6 +204,18 @@ export declare const ChatStack: import("@react-navigation/core").TypedNavigator<
|
|
|
203
204
|
readonly screen: typeof AvatarPickerScreen;
|
|
204
205
|
readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
205
206
|
};
|
|
207
|
+
readonly ChatSettings: {
|
|
208
|
+
readonly screen: typeof SettingsScreen;
|
|
209
|
+
readonly options: ({ navigation }: {
|
|
210
|
+
route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
|
|
211
|
+
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/routers").ParamListBase, string, undefined>;
|
|
212
|
+
theme: ReactNavigation.Theme;
|
|
213
|
+
}) => {
|
|
214
|
+
title: string;
|
|
215
|
+
headerBackVisible: false;
|
|
216
|
+
headerRight: (props: NativeStackHeaderRightProps) => React.JSX.Element;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
206
219
|
readonly NotificationSettings: {
|
|
207
220
|
readonly screen: typeof NotificationSettingsScreen;
|
|
208
221
|
readonly options: ({ navigation }: {
|
|
@@ -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,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,wBAAwB,EAAqB,MAAM,UAAU,CAAA;AACtE,OAAO,EACL,uBAAuB,EAExB,MAAM,yDAAyD,CAAA;AAChE,OAAO,EACL,kBAAkB,EAGnB,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAAE,eAAe,EAA0B,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EAE1B,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAWlF,OAAO,EACL,yCAAyC,EAE1C,MAAM,0DAA0D,CAAA;AACjE,OAAO,EAEL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,+CAA+C,EAAE,MAAM,gGAAgG,CAAA;AAIhK,OAAO,EACL,4BAA4B,EAE7B,MAAM,4CAA4C,CAAA;AACnD,OAAO,EACL,8BAA8B,EAE/B,MAAM,4DAA4D,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AAEnF,OAAO,EACL,kCAAkC,EAEnC,MAAM,mDAAmD,CAAA;AAC1D,OAAO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
33
33
|
import { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen';
|
|
34
34
|
import { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen';
|
|
35
35
|
import { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen';
|
|
36
|
+
import { SettingsScreen } from '../screens/settings_screen';
|
|
36
37
|
import { SystemMessagePeopleScreen, SystemMessagePeopleScreenOptions, } from '../screens/system_message_people_screen';
|
|
37
38
|
import { TeamConversationScreen } from '../screens/team_conversation_screen';
|
|
38
39
|
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
@@ -167,6 +168,14 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
167
168
|
screen: AvatarPickerScreen,
|
|
168
169
|
options: AvatarPickerScreenOptions,
|
|
169
170
|
},
|
|
171
|
+
ChatSettings: {
|
|
172
|
+
screen: SettingsScreen,
|
|
173
|
+
options: ({ navigation }) => ({
|
|
174
|
+
title: 'Chat settings',
|
|
175
|
+
headerBackVisible: false,
|
|
176
|
+
headerRight: (props) => (<HeaderTextButton {...props} onPress={navigation.goBack} title="Done"/>),
|
|
177
|
+
}),
|
|
178
|
+
},
|
|
170
179
|
NotificationSettings: {
|
|
171
180
|
screen: NotificationSettingsScreen,
|
|
172
181
|
options: ({ navigation }) => ({
|
|
@@ -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;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,g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AAmB;YAC3B,OAAO,EAAE,0BAA0B;SACpC;QACD,iBAAiB,EAAE;YACjB,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,8BAA8B;SACxC;QACD,sBAAsB,EAAE;YACtB,MAAM,EAAE,4BAA4B;YACpC,OAAO,EAAE,mCAAmC;SAC7C;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,mBAAmB,EAAE;YACnB,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,gCAAgC;SAC1C;QACD,mBAAmB,EAAE;YACnB,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,gCAAgC;SAC1C;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,OAAO,EAAE;YACP,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC5B,WAAW,EAAE,UAAU;gBACvB,iBAAiB,EAAE,KAAK;gBACxB,YAAY,EAAE,OAAO;gBACrB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CACpB,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,EAAG,CAC1E;aACF,CAAC;SACH;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 { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport {\n HeaderDoneButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { useDirectMessagesEnabled, useQualifiedByAge } from '../hooks'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport {\n AvatarPickerScreen,\n AvatarPickerScreenOptions,\n AvatarPickerCreateScreenOptions,\n} from '../screens/avatar_picker/avatar_picker_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectDirectMessageRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport {\n ConversationsMoreActionsScreen,\n ConversationsMoreActionsScreenOptions,\n} from '../screens/conversations/conversations_more_actions_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport {\n SystemMessagePeopleScreen,\n SystemMessagePeopleScreenOptions,\n} from '../screens/system_message_people_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectDirectMessageRecipients: {\n screen: ConversationSelectDirectMessageRecipientsScreen,\n if: useDirectMessagesEnabled,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n }}\n title=\"Cancel\"\n />\n ),\n }),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerCreateScreenOptions,\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\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 options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerScreenOptions,\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: {\n title: 'Preferred app',\n },\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as { title?: string })?.title || 'Group Settings',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderDoneButton {...props} navigation={navigation} />\n ),\n }),\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n GroupConversationNew: {\n screen: ConversationNewScreen,\n if: useQualifiedByAge,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: props => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.getParent()?.goBack()}\n title=\"Cancel\"\n />\n ),\n }),\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n ConversationsMoreActions: {\n screen: ConversationsMoreActionsScreen,\n options: ConversationsMoreActionsScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n SystemMessagePeople: {\n screen: SystemMessagePeopleScreen,\n options: SystemMessagePeopleScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\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
|
+
{"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;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACtE,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,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AAE;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 { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport {\n HeaderDoneButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { useDirectMessagesEnabled, useQualifiedByAge } from '../hooks'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport {\n AvatarPickerScreen,\n AvatarPickerScreenOptions,\n AvatarPickerCreateScreenOptions,\n} from '../screens/avatar_picker/avatar_picker_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectDirectMessageRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport {\n ConversationsMoreActionsScreen,\n ConversationsMoreActionsScreenOptions,\n} from '../screens/conversations/conversations_more_actions_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { SettingsScreen } from '../screens/settings_screen'\nimport {\n SystemMessagePeopleScreen,\n SystemMessagePeopleScreenOptions,\n} from '../screens/system_message_people_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectDirectMessageRecipients: {\n screen: ConversationSelectDirectMessageRecipientsScreen,\n if: useDirectMessagesEnabled,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n }}\n title=\"Cancel\"\n />\n ),\n }),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerCreateScreenOptions,\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\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 options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerScreenOptions,\n },\n ChatSettings: {\n screen: SettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat settings',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: {\n title: 'Preferred app',\n },\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as { title?: string })?.title || 'Group Settings',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderDoneButton {...props} navigation={navigation} />\n ),\n }),\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n GroupConversationNew: {\n screen: ConversationNewScreen,\n if: useQualifiedByAge,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: props => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.getParent()?.goBack()}\n title=\"Cancel\"\n />\n ),\n }),\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n ConversationsMoreActions: {\n screen: ConversationsMoreActionsScreen,\n options: ConversationsMoreActionsScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n SystemMessagePeople: {\n screen: SystemMessagePeopleScreen,\n options: SystemMessagePeopleScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\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":"AAKA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAQN,MAAM,OAAO,CAAA;AA+Ed,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"conversation_details_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAQN,MAAM,OAAO,CAAA;AA+Ed,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,qBAwXlF"}
|
|
@@ -48,6 +48,7 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
48
48
|
const canDelete = conversation.memberAbility?.canDelete || false;
|
|
49
49
|
const isLeader = conversation.memberAbility?.leader || false;
|
|
50
50
|
const isDisabled = conversation.disabled ?? false;
|
|
51
|
+
const showAdultRequirementNotice = isDisabled && conversation.disabledReason === 'safety_check';
|
|
51
52
|
const { data: members, fetchNextPage: fetchNextPageOfMembers, isFetchingNextPage: isLoadingMembers, } = useSuspensePaginator({
|
|
52
53
|
url: `/me/conversations/${route.params.conversation_id}/members`,
|
|
53
54
|
data: {
|
|
@@ -220,7 +221,7 @@ export function ConversationDetailsScreen({ route }) {
|
|
|
220
221
|
sectionInnerStyle: styles.sectionInnerGenderNotice,
|
|
221
222
|
},
|
|
222
223
|
{
|
|
223
|
-
type:
|
|
224
|
+
type: showAdultRequirementNotice ? SectionTypes.view : SectionTypes.hidden,
|
|
224
225
|
data: {
|
|
225
226
|
children: <AdultRequirementNotice />,
|
|
226
227
|
},
|