@planningcenter/chat-react-native 4.7.1-qa-staging.3 → 4.7.1-qa-staging.4
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/hooks/groups/use_group_chat_conversation_payload.d.ts +11 -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 +92 -47
- package/build/hooks/groups/use_group_chat_conversation_payload.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +27 -25
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.js +125 -110
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +39 -31
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
- package/build/hooks/groups/use_groups_proxy.d.ts +2 -0
- package/build/hooks/groups/use_groups_proxy.d.ts.map +1 -0
- package/build/hooks/groups/use_groups_proxy.js +18 -0
- package/build/hooks/groups/use_groups_proxy.js.map +1 -0
- package/build/hooks/use_features.d.ts +1 -0
- 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_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js +25 -9
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_live_relative_time.js +6 -5
- package/build/hooks/use_live_relative_time.js.map +1 -1
- package/build/hooks/use_new_conversation_from_filter.d.ts.map +1 -1
- package/build/hooks/use_new_conversation_from_filter.js +11 -1
- package/build/hooks/use_new_conversation_from_filter.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +96 -93
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/groups/groups_membership_resource.d.ts +11 -0
- package/build/types/resources/groups/groups_membership_resource.d.ts.map +1 -0
- package/build/types/resources/groups/groups_membership_resource.js +2 -0
- package/build/types/resources/groups/groups_membership_resource.js.map +1 -0
- package/build/types/resources/groups/index.d.ts +1 -0
- package/build/types/resources/groups/index.d.ts.map +1 -1
- package/build/types/resources/groups/index.js +1 -0
- package/build/types/resources/groups/index.js.map +1 -1
- package/build/utils/date.d.ts +1 -1
- package/build/utils/date.d.ts.map +1 -1
- package/build/utils/date.js +4 -4
- package/build/utils/date.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/hooks/use_group_chat_conversation_payload.test.tsx +31 -0
- package/src/hooks/__tests__/use_live_relative_time.test.tsx +22 -0
- package/src/hooks/groups/use_group_chat_conversation_payload.ts +30 -12
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +49 -18
- package/src/hooks/groups/use_groups_conversation_create.ts +10 -14
- package/src/hooks/groups/use_groups_proxy.ts +6 -0
- package/src/hooks/use_features.ts +1 -0
- package/src/hooks/use_groups_groups.ts +21 -16
- package/src/hooks/use_live_relative_time.ts +1 -1
- package/src/hooks/use_new_conversation_from_filter.ts +13 -5
- package/src/screens/conversation_new/components/groups_form.tsx +11 -9
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/groups/groups_membership_resource.ts +10 -0
- package/src/types/resources/groups/index.ts +1 -0
- package/src/utils/__tests__/date.test.ts +10 -1
- package/src/utils/date.ts +4 -4
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { FIVE_MINUTES } from '../utils/time';
|
|
3
|
+
import { useGroupsProxy } from './groups/use_groups_proxy';
|
|
3
4
|
import { useApiPaginator } from './use_api';
|
|
5
|
+
const GROUP_FIELDS = ['can_create_conversation', 'can_create_conversation_reason_code', 'name', 'header_image', 'memberships_count'];
|
|
4
6
|
export const useGroupsGroups = () => {
|
|
5
|
-
const $ = _c(
|
|
7
|
+
const $ = _c(3);
|
|
8
|
+
const proxied = useGroupsProxy();
|
|
6
9
|
let t0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
if ($[0] !== proxied) {
|
|
11
|
+
t0 = proxied ? {
|
|
12
|
+
url: "/me/groups_groups",
|
|
13
|
+
data: {
|
|
14
|
+
perPage: 100,
|
|
15
|
+
fields: {
|
|
16
|
+
GroupsGroup: GROUP_FIELDS
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
app: "chat"
|
|
20
|
+
} : {
|
|
10
21
|
url: "/me/groups",
|
|
11
22
|
data: {
|
|
12
23
|
perPage: 100,
|
|
13
24
|
fields: {
|
|
14
|
-
Group:
|
|
25
|
+
Group: GROUP_FIELDS
|
|
15
26
|
},
|
|
16
27
|
order: "name"
|
|
17
28
|
},
|
|
18
29
|
app: "groups"
|
|
19
30
|
};
|
|
31
|
+
$[0] = proxied;
|
|
32
|
+
$[1] = t0;
|
|
33
|
+
} else {
|
|
34
|
+
t0 = $[1];
|
|
35
|
+
}
|
|
36
|
+
let t1;
|
|
37
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
20
38
|
t1 = {
|
|
21
39
|
staleTime: FIVE_MINUTES
|
|
22
40
|
};
|
|
23
|
-
$[
|
|
24
|
-
$[1] = t1;
|
|
41
|
+
$[2] = t1;
|
|
25
42
|
} else {
|
|
26
|
-
|
|
27
|
-
t1 = $[1];
|
|
43
|
+
t1 = $[2];
|
|
28
44
|
}
|
|
29
45
|
return useApiPaginator(t0, t1);
|
|
30
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_groups_groups.js","names":["FIVE_MINUTES","
|
|
1
|
+
{"version":3,"file":"use_groups_groups.js","names":["FIVE_MINUTES","useGroupsProxy","useApiPaginator","GROUP_FIELDS","useGroupsGroups","$","_c","proxied","t0","url","data","perPage","fields","GroupsGroup","app","Group","order","t1","Symbol","for","staleTime","useCanDisplayGroupsGroups","undefined","groups","length"],"sources":["../../src/hooks/use_groups_groups.ts"],"sourcesContent":["import { GroupsGroupResource } from '../types'\nimport { FIVE_MINUTES } from '../utils/time'\nimport { useGroupsProxy } from './groups/use_groups_proxy'\nimport { useApiPaginator } from './use_api'\n\nconst GROUP_FIELDS = [\n 'can_create_conversation',\n 'can_create_conversation_reason_code',\n 'name',\n 'header_image',\n 'memberships_count',\n]\n\nexport const useGroupsGroups = () => {\n const proxied = useGroupsProxy()\n\n return useApiPaginator<GroupsGroupResource>(\n proxied\n ? {\n url: '/me/groups_groups',\n data: { perPage: 100, fields: { GroupsGroup: GROUP_FIELDS } },\n app: 'chat',\n }\n : {\n url: '/me/groups',\n data: { perPage: 100, fields: { Group: GROUP_FIELDS }, order: 'name' },\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"],"mappings":";AACA,SAASA,YAAY,QAAQ,eAAe;AAC5C,SAASC,cAAc,QAAQ,2BAA2B;AAC1D,SAASC,eAAe,QAAQ,WAAW;AAE3C,MAAMC,YAAY,GAAG,CACnB,yBAAyB,EACzB,qCAAqC,EACrC,MAAM,EACN,cAAc,EACd,mBAAmB,CACpB;AAED,OAAO,MAAMC,eAAe,GAAGA,CAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAC7B,MAAAC,OAAA,GAAgBN,cAAc,CAAC,CAAC;EAAA,IAAAO,EAAA;EAAA,IAAAH,CAAA,QAAAE,OAAA;IAG9BC,EAAA,GAAAD,OAAO,GAAP;MAAAE,GAAA,EAEW,mBAAmB;MAAAC,IAAA,EAClB;QAAAC,OAAA,EAAW,GAAG;QAAAC,MAAA,EAAU;UAAAC,WAAA,EAAeV;Q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Symbol.for("react.memo_cache_sentinel")) {
|
|
12
12
|
t0 = Date.now();
|
|
@@ -64,12 +64,13 @@ export function useLiveRelativeTime(date) {
|
|
|
64
64
|
}
|
|
65
65
|
useEffect(t3, t4);
|
|
66
66
|
let t5;
|
|
67
|
-
if ($[8] !== date) {
|
|
68
|
-
t5 = relativeTime(date);
|
|
67
|
+
if ($[8] !== date || $[9] !== timeNow) {
|
|
68
|
+
t5 = relativeTime(date, timeNow);
|
|
69
69
|
$[8] = date;
|
|
70
|
-
$[9] =
|
|
70
|
+
$[9] = timeNow;
|
|
71
|
+
$[10] = t5;
|
|
71
72
|
} else {
|
|
72
|
-
t5 = $[
|
|
73
|
+
t5 = $[10];
|
|
73
74
|
}
|
|
74
75
|
return t5;
|
|
75
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_live_relative_time.js","names":["useEffect","useState","relativeTime","dayjs","MINUTE","HOUR","DAY","useLiveRelativeTime","date","$","_c","t0","Symbol","for","Date","now","timeNow","setTimeNow","t1","t2","tick","then","valueOf","seconds","Math","round","abs","periodInMinutes","setTimeout","timeoutId","clearTimeout","t3","t4","t5"],"sources":["../../src/hooks/use_live_relative_time.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { relativeTime, type DateProps } from '../utils/date'\nimport dayjs from '../utils/dayjs'\n\nconst MINUTE = 60\nconst HOUR = MINUTE * 60\nconst DAY = HOUR * 24\n\nexport function useLiveRelativeTime(date: DateProps) {\n const [timeNow, setTimeNow] = useState(Date.now())\n\n useEffect(() => {\n const tick = () => {\n const then = dayjs(date).valueOf()\n const seconds = Math.round(Math.abs(timeNow - then) / 1000)\n\n const periodInMinutes = seconds < HOUR ? 1 : seconds < DAY ? 60 : 0\n\n if (periodInMinutes) {\n return setTimeout(() => setTimeNow(Date.now()), periodInMinutes * 60000)\n }\n\n return 0\n }\n const timeoutId = tick()\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId)\n }\n }\n }, [date, timeNow])\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AA;QACzE,OAEM,CAAC;MAAA,CACT;MACD,MAAAE,SAAA,GAAkBT,IAAI,CAAC,CAAC;MAAA,OACjB;QACL,IAAIS,SAAS;UACXC,YAAY,CAACD,SAAS,CAAC;QAAA;MACxB,CACF;IAAA,CACF;IAAEV,EAAA,IAACX,IAAI,EAAEQ,OAAO,CAAC;IAAAP,CAAA,MAAAD,IAAA;IAAAC,CAAA,MAAAO,OAAA;IAAAP,CAAA,MAAAS,EAAA;IAAAT,CAAA,MAAAU,EAAA;EAAA;IAAAD,EAAA,GAAAT,CAAA;IAAAU,EAAA,GAAAV,CAAA;EAAA;EAnBlBT,SAAS,CAACkB,EAmBT,EAAEC,EAAe,CAAC;EAAA,IAAAY,EAAA;EAAA,IAAAtB,CAAA,QAAAG,MAAA,CAAAC,GAAA;IAETkB,EAAA,GAAAA,CAAA;MACRd,UAAU,CAACH,IAAI,CAAAC,GAAI,CAAC,CAAC,CAAC;IAAA,CACvB;IAAAN,CAAA,MAAAsB,EAAA;EAAA;IAAAA,EAAA,GAAAtB,CAAA;EAAA;EAAA,IAAAuB,EAAA;EAAA,IAAAvB,CAAA,QAAAD,IAAA;IAAEwB,EAAA,IAACxB,IAAI,CAAC;IAAAC,CAAA,MAAAD,IAAA;IAAAC,CAAA,MAAAuB,EAAA;EAAA;IAAAA,EAAA,GAAAvB,CAAA;EAAA;EAFTT,SAAS,CAAC+B,EAET,EAAEC,EAAM,CAAC;EAAA,IAAAC,EAAA;EAAA,IAAAxB,CAAA,QAAAD,IAAA;
|
|
1
|
+
{"version":3,"file":"use_live_relative_time.js","names":["useEffect","useState","relativeTime","dayjs","MINUTE","HOUR","DAY","useLiveRelativeTime","date","$","_c","t0","Symbol","for","Date","now","timeNow","setTimeNow","t1","t2","tick","then","valueOf","seconds","Math","round","abs","periodInMinutes","setTimeout","timeoutId","clearTimeout","t3","t4","t5"],"sources":["../../src/hooks/use_live_relative_time.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { relativeTime, type DateProps } from '../utils/date'\nimport dayjs from '../utils/dayjs'\n\nconst MINUTE = 60\nconst HOUR = MINUTE * 60\nconst DAY = HOUR * 24\n\nexport function useLiveRelativeTime(date: DateProps) {\n const [timeNow, setTimeNow] = useState(Date.now())\n\n useEffect(() => {\n const tick = () => {\n const then = dayjs(date).valueOf()\n const seconds = Math.round(Math.abs(timeNow - then) / 1000)\n\n const periodInMinutes = seconds < HOUR ? 1 : seconds < DAY ? 60 : 0\n\n if (periodInMinutes) {\n return setTimeout(() => setTimeNow(Date.now()), periodInMinutes * 60000)\n }\n\n return 0\n }\n const timeoutId = tick()\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId)\n }\n }\n }, [date, timeNow])\n\n useEffect(() => {\n setTimeNow(Date.now())\n }, [date])\n\n return relativeTime(date, timeNow)\n}\n"],"mappings":";AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,YAAY,QAAwB,eAAe;AAC5D,OAAOC,KAAK,MAAM,gBAAgB;AAElC,MAAMC,MAAM,GAAG,EAAE;AACjB,MAAMC,IAAI,GAAGD,MAAM,GAAG,EAAE;AACxB,MAAME,GAAG,GAAGD,IAAI,GAAG,EAAE;AAErB,OAAO,SAAAE,oBAAAC,IAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAF,CAAA,QAAAG,MAAA,CAAAC,GAAA;IACkCF,EAAA,GAAAG,IAAI,CAAAC,GAAI,CAAC,CAAC;IAAAN,CAAA,MAAAE,EAAA;EAAA;IAAAA,EAAA,GAAAF,CAAA;EAAA;EAAjD,OAAAO,OAAA,EAAAC,UAAA,IAA8BhB,QAAQ,CAACU,EAAU,CAAC;EAAA,IAAAO,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAV,CAAA,QAAAD,IAAA,IAAAC,CAAA,QAAAO,OAAA;IAExCE,EAAA,GAAAA,CAAA;MACR,MAAAE,IAAA,GAAaA,CAAA;QACX,MAAAC,IAA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AuB,EAAA;EAAA;IAAAA,EAAA,GAAAvB,CAAA;EAAA;EAFTT,SAAS,CAAC+B,EAET,EAAEC,EAAM,CAAC;EAAA,IAAAC,EAAA;EAAA,IAAAxB,CAAA,QAAAD,IAAA,IAAAC,CAAA,QAAAO,OAAA;IAEHiB,EAAA,GAAA/B,YAAY,CAACM,IAAI,EAAEQ,OAAO,CAAC;IAAAP,CAAA,MAAAD,IAAA;IAAAC,CAAA,MAAAO,OAAA;IAAAP,CAAA,OAAAwB,EAAA;EAAA;IAAAA,EAAA,GAAAxB,CAAA;EAAA;EAAA,OAA3BwB,EAA2B;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_new_conversation_from_filter.d.ts","sourceRoot":"","sources":["../../src/hooks/use_new_conversation_from_filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,OAAO,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"use_new_conversation_from_filter.d.ts","sourceRoot":"","sources":["../../src/hooks/use_new_conversation_from_filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAO1E,MAAM,MAAM,yBAAyB,GACjC;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,QAAQ,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;CAChB,GACD;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,UAAU,CAAA;IACzB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAEL,wBAAgB,4BAA4B,CAC1C,gBAAgB,CAAC,EAAE,OAAO,GACzB,yBAAyB,GAAG,SAAS,CAkDvC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { destructureChatGroupGraphId } from '../utils';
|
|
3
|
+
import { useGroupsProxy } from './groups/use_groups_proxy';
|
|
3
4
|
import { useApiGet } from './use_api';
|
|
4
5
|
import { useNewConversationEntry } from './use_new_conversation_entry';
|
|
5
6
|
export function useNewConversationFromFilter(chatGroupGraphId) {
|
|
@@ -9,6 +10,7 @@ export function useNewConversationFromFilter(chatGroupGraphId) {
|
|
|
9
10
|
sourceId
|
|
10
11
|
} = destructureChatGroupGraphId(chatGroupGraphId);
|
|
11
12
|
const entryMode = useNewConversationEntry();
|
|
13
|
+
const proxied = useGroupsProxy();
|
|
12
14
|
const isGroupsGroup = sourceAppName === 'Groups' && sourceType === 'Group';
|
|
13
15
|
const isServicesTeam = sourceAppName === 'Services' && sourceType === 'Team';
|
|
14
16
|
const {
|
|
@@ -26,7 +28,15 @@ export function useNewConversationFromFilter(chatGroupGraphId) {
|
|
|
26
28
|
});
|
|
27
29
|
const {
|
|
28
30
|
data: groupsGroup
|
|
29
|
-
} = useApiGet({
|
|
31
|
+
} = useApiGet(proxied ? {
|
|
32
|
+
url: `/me/groups_groups/${sourceId}`,
|
|
33
|
+
data: {
|
|
34
|
+
fields: {
|
|
35
|
+
GroupsGroup: ['can_create_conversation']
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
app: 'chat'
|
|
39
|
+
} : {
|
|
30
40
|
url: `/me/groups/${sourceId}`,
|
|
31
41
|
data: {
|
|
32
42
|
fields: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_new_conversation_from_filter.js","names":["useMemo","destructureChatGroupGraphId","useApiGet","useNewConversationEntry","useNewConversationFromFilter","chatGroupGraphId","sourceAppName","sourceType","sourceId","entryMode","isGroupsGroup","isServicesTeam","data","group","url","fields","Group","app","enabled","groupsGroup","name","canCreate","undefined","canCreateConversation","groupId","teamIds"],"sources":["../../src/hooks/use_new_conversation_from_filter.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { GroupResource, GraphId } from '../types/resources/group_resource'\nimport { GroupsGroupResource } from '../types/resources/groups/groups_group_resource'\nimport { destructureChatGroupGraphId } from '../utils'\nimport { useApiGet } from './use_api'\nimport { useNewConversationEntry } from './use_new_conversation_entry'\n\nexport type NewConversationFromFilter =\n | {\n name: string\n sourceAppName: 'groups'\n groupId: number\n }\n | {\n name: string\n sourceAppName: 'services'\n teamIds: number[]\n }\n\nexport function useNewConversationFromFilter(\n chatGroupGraphId?: GraphId\n): NewConversationFromFilter | undefined {\n const { sourceAppName, sourceType, sourceId } = destructureChatGroupGraphId(chatGroupGraphId)\n const entryMode = useNewConversationEntry()\n const isGroupsGroup = sourceAppName === 'Groups' && sourceType === 'Group'\n const isServicesTeam = sourceAppName === 'Services' && sourceType === 'Team'\n\n const { data: group } = useApiGet<GroupResource>(\n { url: `/me/groups/${chatGroupGraphId}`, data: { fields: { Group: ['name'] } }, app: 'chat' },\n { enabled: !!chatGroupGraphId }\n )\n\n const { data: groupsGroup } = useApiGet<GroupsGroupResource>(\n {\n url: `/me/groups/${sourceId}`,\n
|
|
1
|
+
{"version":3,"file":"use_new_conversation_from_filter.js","names":["useMemo","destructureChatGroupGraphId","useGroupsProxy","useApiGet","useNewConversationEntry","useNewConversationFromFilter","chatGroupGraphId","sourceAppName","sourceType","sourceId","entryMode","proxied","isGroupsGroup","isServicesTeam","data","group","url","fields","Group","app","enabled","groupsGroup","GroupsGroup","name","canCreate","undefined","canCreateConversation","groupId","teamIds"],"sources":["../../src/hooks/use_new_conversation_from_filter.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { GroupResource, GraphId } from '../types/resources/group_resource'\nimport { GroupsGroupResource } from '../types/resources/groups/groups_group_resource'\nimport { destructureChatGroupGraphId } from '../utils'\nimport { useGroupsProxy } from './groups/use_groups_proxy'\nimport { useApiGet } from './use_api'\nimport { useNewConversationEntry } from './use_new_conversation_entry'\n\nexport type NewConversationFromFilter =\n | {\n name: string\n sourceAppName: 'groups'\n groupId: number\n }\n | {\n name: string\n sourceAppName: 'services'\n teamIds: number[]\n }\n\nexport function useNewConversationFromFilter(\n chatGroupGraphId?: GraphId\n): NewConversationFromFilter | undefined {\n const { sourceAppName, sourceType, sourceId } = destructureChatGroupGraphId(chatGroupGraphId)\n const entryMode = useNewConversationEntry()\n const proxied = useGroupsProxy()\n const isGroupsGroup = sourceAppName === 'Groups' && sourceType === 'Group'\n const isServicesTeam = sourceAppName === 'Services' && sourceType === 'Team'\n\n const { data: group } = useApiGet<GroupResource>(\n { url: `/me/groups/${chatGroupGraphId}`, data: { fields: { Group: ['name'] } }, app: 'chat' },\n { enabled: !!chatGroupGraphId }\n )\n\n const { data: groupsGroup } = useApiGet<GroupsGroupResource>(\n proxied\n ? {\n url: `/me/groups_groups/${sourceId}`,\n data: { fields: { GroupsGroup: ['can_create_conversation'] } },\n app: 'chat',\n }\n : {\n url: `/me/groups/${sourceId}`,\n data: { fields: { Group: ['can_create_conversation'] } },\n app: 'groups',\n },\n { enabled: isGroupsGroup && !!sourceId }\n )\n\n return useMemo(() => {\n if (isGroupsGroup && group?.name && sourceId) {\n const canCreate = entryMode === 'select_type' || entryMode === 'groups'\n if (!canCreate) return undefined\n if (!groupsGroup?.canCreateConversation) return undefined\n return { name: group.name, sourceAppName: 'groups', groupId: sourceId }\n }\n\n if (isServicesTeam && group?.name && sourceId) {\n const canCreate = entryMode === 'select_type' || entryMode === 'teams'\n if (!canCreate) return undefined\n return { name: group.name, sourceAppName: 'services', teamIds: [sourceId] }\n }\n\n return undefined\n }, [\n group?.name,\n sourceId,\n entryMode,\n isGroupsGroup,\n isServicesTeam,\n groupsGroup?.canCreateConversation,\n ])\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAG/B,SAASC,2BAA2B,QAAQ,UAAU;AACtD,SAASC,cAAc,QAAQ,2BAA2B;AAC1D,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,uBAAuB,QAAQ,8BAA8B;AActE,OAAO,SAASC,4BAA4BA,CAC1CC,gBAA0B,EACa;EACvC,MAAM;IAAEC,aAAa;IAAEC,UAAU;IAAEC;EAAS,CAAC,GAAGR,2BAA2B,CAACK,gBAAgB,CAAC;EA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EK,qBAAqB,EAAE,OAAOD,SAAS;MACzD,OAAO;QAAEF,IAAI,EAAER,KAAK,CAACQ,IAAI;QAAEhB,aAAa,EAAE,QAAQ;QAAEoB,OAAO,EAAElB;MAAS,CAAC;IACzE;IAEA,IAAII,cAAc,IAAIE,KAAK,EAAEQ,IAAI,IAAId,QAAQ,EAAE;MAC7C,MAAMe,WAAS,GAAGd,SAAS,KAAK,aAAa,IAAIA,SAAS,KAAK,OAAO;MACtE,IAAI,CAACc,WAAS,EAAE,OAAOC,SAAS;MAChC,OAAO;QAAEF,IAAI,EAAER,KAAK,CAACQ,IAAI;QAAEhB,aAAa,EAAE,UAAU;QAAEqB,OAAO,EAAE,CAACnB,QAAQ;MAAE,CAAC;IAC7E;IAEA,OAAOgB,SAAS;EAClB,CAAC,EAAE,CACDV,KAAK,EAAEQ,IAAI,EACXd,QAAQ,EACRC,SAAS,EACTE,aAAa,EACbC,cAAc,EACdQ,WAAW,EAAEK,qBAAqB,CACnC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups_form.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/groups_form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"groups_form.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/groups_form.tsx"],"names":[],"mappings":"AAeA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,+CAA+C,CAAA;AAMtD,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAA;AAQjE,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,eAAe,CAAC,EAAE,mBAAmB,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,mDAAmD,eAAe,4CAsH5F,CAAA"}
|
|
@@ -10,6 +10,7 @@ import { useApiClient, useCurrentPerson, useSuspenseGet, useTheme } from '../../
|
|
|
10
10
|
import { useGroupChatConversationPayload } from '../../../hooks/groups/use_group_chat_conversation_payload';
|
|
11
11
|
import { useGroupMembersForNewConversation } from '../../../hooks/groups/use_group_members_for_new_conversation';
|
|
12
12
|
import { useGroupsConversationCreate } from '../../../hooks/groups/use_groups_conversation_create';
|
|
13
|
+
import { useGroupsProxy } from '../../../hooks/groups/use_groups_proxy';
|
|
13
14
|
import { patchConversationAvatar } from '../../../hooks/use_conversation_avatar_update';
|
|
14
15
|
import { useConversationValidate } from '../../../hooks/use_conversation_validate';
|
|
15
16
|
import { availableFeatures, useFeatures } from '../../../hooks/use_features';
|
|
@@ -61,54 +62,56 @@ export const GroupsForm = t0 => {
|
|
|
61
62
|
genderValue,
|
|
62
63
|
isFetching: genderFetching
|
|
63
64
|
} = useMyGender();
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
if ($[4]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
const groupsProxied = useGroupsProxy();
|
|
66
|
+
let t3;
|
|
67
|
+
if ($[4] !== groupId || $[5] !== groupsProxied) {
|
|
68
|
+
t3 = groupsProxied ? {
|
|
69
|
+
url: `/me/groups_groups/${groupId}`,
|
|
70
|
+
data: {
|
|
71
|
+
fields: {
|
|
72
|
+
GroupsGroup: ["name", "memberships_count"]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
app: "chat"
|
|
76
|
+
} : {
|
|
77
|
+
url: `/me/groups/${groupId}`,
|
|
78
|
+
data: {
|
|
79
|
+
fields: {
|
|
80
|
+
Group: []
|
|
81
|
+
}
|
|
82
|
+
},
|
|
81
83
|
app: "groups"
|
|
82
84
|
};
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
+
$[4] = groupId;
|
|
86
|
+
$[5] = groupsProxied;
|
|
87
|
+
$[6] = t3;
|
|
85
88
|
} else {
|
|
86
|
-
|
|
89
|
+
t3 = $[6];
|
|
87
90
|
}
|
|
88
91
|
const {
|
|
89
92
|
data: group
|
|
90
|
-
} = useSuspenseGet(
|
|
93
|
+
} = useSuspenseGet(t3);
|
|
91
94
|
const activeGenderId = genderFilterEnabled ? genderId : null;
|
|
92
95
|
const activeGenderValue = genderFilterEnabled ? genderValue : null;
|
|
93
|
-
let
|
|
96
|
+
let t4;
|
|
94
97
|
if ($[7] !== groupId || $[8] !== safetyLockEnabled) {
|
|
95
|
-
|
|
98
|
+
t4 = {
|
|
96
99
|
groupId,
|
|
97
100
|
enabled: safetyLockEnabled
|
|
98
101
|
};
|
|
99
102
|
$[7] = groupId;
|
|
100
103
|
$[8] = safetyLockEnabled;
|
|
101
|
-
$[9] =
|
|
104
|
+
$[9] = t4;
|
|
102
105
|
} else {
|
|
103
|
-
|
|
106
|
+
t4 = $[9];
|
|
104
107
|
}
|
|
105
108
|
const {
|
|
106
109
|
payload,
|
|
107
110
|
isLoading: isLoadingPayload
|
|
108
|
-
} = useGroupChatConversationPayload(
|
|
109
|
-
let
|
|
111
|
+
} = useGroupChatConversationPayload(t4);
|
|
112
|
+
let t5;
|
|
110
113
|
if ($[10] !== activeGenderId || $[11] !== isLoadingPayload || $[12] !== payload || $[13] !== safetyLockEnabled) {
|
|
111
|
-
|
|
114
|
+
t5 = {
|
|
112
115
|
payload,
|
|
113
116
|
isLoadingPayload,
|
|
114
117
|
genderId: activeGenderId,
|
|
@@ -118,30 +121,30 @@ export const GroupsForm = t0 => {
|
|
|
118
121
|
$[11] = isLoadingPayload;
|
|
119
122
|
$[12] = payload;
|
|
120
123
|
$[13] = safetyLockEnabled;
|
|
121
|
-
$[14] =
|
|
124
|
+
$[14] = t5;
|
|
122
125
|
} else {
|
|
123
|
-
|
|
126
|
+
t5 = $[14];
|
|
124
127
|
}
|
|
125
128
|
const {
|
|
126
129
|
warnings,
|
|
127
130
|
validationPending
|
|
128
|
-
} = useConversationValidate(
|
|
129
|
-
let
|
|
131
|
+
} = useConversationValidate(t5);
|
|
132
|
+
let t6;
|
|
130
133
|
if ($[15] !== activeGenderValue || $[16] !== groupId) {
|
|
131
|
-
|
|
134
|
+
t6 = {
|
|
132
135
|
id: groupId,
|
|
133
136
|
gender: activeGenderValue
|
|
134
137
|
};
|
|
135
138
|
$[15] = activeGenderValue;
|
|
136
139
|
$[16] = groupId;
|
|
137
|
-
$[17] =
|
|
140
|
+
$[17] = t6;
|
|
138
141
|
} else {
|
|
139
|
-
|
|
142
|
+
t6 = $[17];
|
|
140
143
|
}
|
|
141
|
-
const groupMemberships = useGroupMembersForNewConversation(
|
|
142
|
-
let
|
|
144
|
+
const groupMemberships = useGroupMembersForNewConversation(t6);
|
|
145
|
+
let t7;
|
|
143
146
|
if ($[18] !== genderValue || $[19] !== group.name || $[20] !== title) {
|
|
144
|
-
|
|
147
|
+
t7 = enabled => {
|
|
145
148
|
const displayLabel = genderValue ? genderDisplayLabel(genderValue) : "";
|
|
146
149
|
const defaultTitle = `${group.name} (${displayLabel})`;
|
|
147
150
|
const shouldAutoPopulateTitle = enabled && genderValue && title === "";
|
|
@@ -158,14 +161,14 @@ export const GroupsForm = t0 => {
|
|
|
158
161
|
$[18] = genderValue;
|
|
159
162
|
$[19] = group.name;
|
|
160
163
|
$[20] = title;
|
|
161
|
-
$[21] =
|
|
164
|
+
$[21] = t7;
|
|
162
165
|
} else {
|
|
163
|
-
|
|
166
|
+
t7 = $[21];
|
|
164
167
|
}
|
|
165
|
-
const handleGenderToggle =
|
|
166
|
-
let
|
|
168
|
+
const handleGenderToggle = t7;
|
|
169
|
+
let t8;
|
|
167
170
|
if ($[22] !== apiClient || $[23] !== avatarSelection || $[24] !== chat_group_graph_id || $[25] !== navigation || $[26] !== uploadClient) {
|
|
168
|
-
|
|
171
|
+
t8 = conversationId => {
|
|
169
172
|
navigation.dispatch(StackActions.popTo("Conversation", {
|
|
170
173
|
conversation_id: conversationId,
|
|
171
174
|
chat_group_graph_id
|
|
@@ -180,14 +183,14 @@ export const GroupsForm = t0 => {
|
|
|
180
183
|
$[24] = chat_group_graph_id;
|
|
181
184
|
$[25] = navigation;
|
|
182
185
|
$[26] = uploadClient;
|
|
183
|
-
$[27] =
|
|
186
|
+
$[27] = t8;
|
|
184
187
|
} else {
|
|
185
|
-
|
|
188
|
+
t8 = $[27];
|
|
186
189
|
}
|
|
187
|
-
const handleCreateSuccess =
|
|
188
|
-
let
|
|
190
|
+
const handleCreateSuccess = t8;
|
|
191
|
+
let t9;
|
|
189
192
|
if ($[28] !== activeGenderId || $[29] !== groupId || $[30] !== handleCreateSuccess || $[31] !== title) {
|
|
190
|
-
|
|
193
|
+
t9 = {
|
|
191
194
|
groupId,
|
|
192
195
|
title,
|
|
193
196
|
genderId: activeGenderId,
|
|
@@ -197,18 +200,18 @@ export const GroupsForm = t0 => {
|
|
|
197
200
|
$[29] = groupId;
|
|
198
201
|
$[30] = handleCreateSuccess;
|
|
199
202
|
$[31] = title;
|
|
200
|
-
$[32] =
|
|
203
|
+
$[32] = t9;
|
|
201
204
|
} else {
|
|
202
|
-
|
|
205
|
+
t9 = $[32];
|
|
203
206
|
}
|
|
204
207
|
const {
|
|
205
208
|
mutate: handleSave,
|
|
206
209
|
isPending
|
|
207
|
-
} = useGroupsConversationCreate(
|
|
208
|
-
const
|
|
209
|
-
let
|
|
210
|
+
} = useGroupsConversationCreate(t9);
|
|
211
|
+
const t10 = groupMemberships.isLoading ? "Loading members..." : undefined;
|
|
212
|
+
let t11;
|
|
210
213
|
if ($[33] !== avatarSelection || $[34] !== customAvatarsEnabled || $[35] !== genderFetching || $[36] !== genderFilterAvailable || $[37] !== genderFilterEnabled || $[38] !== genderValue || $[39] !== group || $[40] !== groupMemberships || $[41] !== handleGenderToggle || $[42] !== title) {
|
|
211
|
-
|
|
214
|
+
t11 = /*#__PURE__*/_jsx(FormContent, {
|
|
212
215
|
group: group,
|
|
213
216
|
title: title,
|
|
214
217
|
setTitle: setTitle,
|
|
@@ -232,72 +235,72 @@ export const GroupsForm = t0 => {
|
|
|
232
235
|
$[40] = groupMemberships;
|
|
233
236
|
$[41] = handleGenderToggle;
|
|
234
237
|
$[42] = title;
|
|
235
|
-
$[43] =
|
|
238
|
+
$[43] = t11;
|
|
236
239
|
} else {
|
|
237
|
-
|
|
240
|
+
t11 = $[43];
|
|
238
241
|
}
|
|
239
|
-
let
|
|
240
|
-
if ($[44] !== groupMemberships.adultMembers || $[45] !== groupMemberships.fetchNextPage || $[46] !== groupMemberships.isFetchingNextPage || $[47] !==
|
|
241
|
-
|
|
242
|
+
let t12;
|
|
243
|
+
if ($[44] !== groupMemberships.adultMembers || $[45] !== groupMemberships.fetchNextPage || $[46] !== groupMemberships.isFetchingNextPage || $[47] !== t10 || $[48] !== t11) {
|
|
244
|
+
t12 = /*#__PURE__*/_jsx(FormList, {
|
|
242
245
|
memberData: groupMemberships.adultMembers,
|
|
243
246
|
loadingMore: groupMemberships.isFetchingNextPage,
|
|
244
247
|
onEndReached: groupMemberships.fetchNextPage,
|
|
245
|
-
listEmptyText:
|
|
246
|
-
FormContent:
|
|
248
|
+
listEmptyText: t10,
|
|
249
|
+
FormContent: t11
|
|
247
250
|
});
|
|
248
251
|
$[44] = groupMemberships.adultMembers;
|
|
249
252
|
$[45] = groupMemberships.fetchNextPage;
|
|
250
253
|
$[46] = groupMemberships.isFetchingNextPage;
|
|
251
|
-
$[47] =
|
|
252
|
-
$[48] =
|
|
253
|
-
$[49] =
|
|
254
|
+
$[47] = t10;
|
|
255
|
+
$[48] = t11;
|
|
256
|
+
$[49] = t12;
|
|
254
257
|
} else {
|
|
255
|
-
|
|
258
|
+
t12 = $[49];
|
|
256
259
|
}
|
|
257
|
-
const
|
|
258
|
-
let
|
|
260
|
+
const t13 = !title || isPending || validationPending || warnings.length > 0;
|
|
261
|
+
let t14;
|
|
259
262
|
if ($[50] !== handleSave) {
|
|
260
|
-
|
|
263
|
+
t14 = () => handleSave();
|
|
261
264
|
$[50] = handleSave;
|
|
262
|
-
$[51] =
|
|
265
|
+
$[51] = t14;
|
|
263
266
|
} else {
|
|
264
|
-
|
|
267
|
+
t14 = $[51];
|
|
265
268
|
}
|
|
266
|
-
let
|
|
269
|
+
let t15;
|
|
267
270
|
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
268
|
-
|
|
269
|
-
$[52] =
|
|
271
|
+
t15 = membershipSyncInfoText("the group");
|
|
272
|
+
$[52] = t15;
|
|
270
273
|
} else {
|
|
271
|
-
|
|
274
|
+
t15 = $[52];
|
|
272
275
|
}
|
|
273
|
-
let
|
|
274
|
-
if ($[53] !==
|
|
275
|
-
|
|
276
|
-
disabled:
|
|
276
|
+
let t16;
|
|
277
|
+
if ($[53] !== t13 || $[54] !== t14 || $[55] !== warnings) {
|
|
278
|
+
t16 = /*#__PURE__*/_jsx(ActionButton, {
|
|
279
|
+
disabled: t13,
|
|
277
280
|
title: "Start Conversation",
|
|
278
|
-
onPress:
|
|
279
|
-
infoText:
|
|
281
|
+
onPress: t14,
|
|
282
|
+
infoText: t15,
|
|
280
283
|
warnings: warnings
|
|
281
284
|
});
|
|
282
|
-
$[53] =
|
|
283
|
-
$[54] =
|
|
285
|
+
$[53] = t13;
|
|
286
|
+
$[54] = t14;
|
|
284
287
|
$[55] = warnings;
|
|
285
|
-
$[56] =
|
|
288
|
+
$[56] = t16;
|
|
286
289
|
} else {
|
|
287
|
-
|
|
290
|
+
t16 = $[56];
|
|
288
291
|
}
|
|
289
|
-
let
|
|
290
|
-
if ($[57] !==
|
|
291
|
-
|
|
292
|
-
children: [
|
|
292
|
+
let t17;
|
|
293
|
+
if ($[57] !== t12 || $[58] !== t16) {
|
|
294
|
+
t17 = /*#__PURE__*/_jsxs(KeyboardView, {
|
|
295
|
+
children: [t12, t16]
|
|
293
296
|
});
|
|
294
|
-
$[57] =
|
|
295
|
-
$[58] =
|
|
296
|
-
$[59] =
|
|
297
|
+
$[57] = t12;
|
|
298
|
+
$[58] = t16;
|
|
299
|
+
$[59] = t17;
|
|
297
300
|
} else {
|
|
298
|
-
|
|
301
|
+
t17 = $[59];
|
|
299
302
|
}
|
|
300
|
-
return
|
|
303
|
+
return t17;
|
|
301
304
|
};
|
|
302
305
|
function FormContent(t0) {
|
|
303
306
|
const $ = _c(58);
|