@planningcenter/chat-react-native 4.4.1-qa-staging.26 → 4.4.1-qa-staging.28
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/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +3 -2
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/display/filter_dropdown.d.ts.map +1 -1
- package/build/components/display/filter_dropdown.js +3 -1
- package/build/components/display/filter_dropdown.js.map +1 -1
- package/build/components/display/index.d.ts +1 -0
- package/build/components/display/index.d.ts.map +1 -1
- package/build/components/display/index.js +1 -0
- package/build/components/display/index.js.map +1 -1
- package/build/components/display/popover_menu_view.d.ts +8 -0
- package/build/components/display/popover_menu_view.d.ts.map +1 -0
- package/build/components/display/popover_menu_view.js +482 -0
- package/build/components/display/popover_menu_view.js.map +1 -0
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +20 -17
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/hooks/use_clear_conversation_filters.d.ts.map +1 -1
- package/build/hooks/use_clear_conversation_filters.js +2 -1
- package/build/hooks/use_clear_conversation_filters.js.map +1 -1
- package/build/hooks/use_conversations_cache.d.ts +1 -1
- package/build/hooks/use_conversations_cache.d.ts.map +1 -1
- package/build/hooks/use_conversations_cache.js +64 -55
- package/build/hooks/use_conversations_cache.js.map +1 -1
- package/build/hooks/use_conversations_jolt_events.js +2 -2
- package/build/hooks/use_conversations_jolt_events.js.map +1 -1
- package/build/hooks/use_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +37 -9
- package/build/hooks/use_jolt.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 +8 -4
- package/build/screens/conversation_filters/context/conversation_filter_context.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/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/filter_dropdown_list_header_component.js +199 -206
- package/build/screens/conversations/components/filter_dropdown_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 +1 -2
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +289 -201
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/utils/native_adapters/menu.d.ts +1 -2
- package/build/utils/native_adapters/menu.d.ts.map +1 -1
- package/build/utils/native_adapters/menu.js +2 -41
- package/build/utils/native_adapters/menu.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 +4 -1
- package/build/utils/request/conversation.js.map +1 -1
- package/package.json +3 -3
- package/src/components/conversations/__tests__/conversations_blank_state.test.tsx +1 -0
- package/src/components/conversations/conversations.tsx +12 -2
- package/src/components/display/__tests__/filter_dropdown.test.tsx +18 -2
- package/src/components/display/__tests__/popover_menu_view.test.tsx +63 -0
- package/src/components/display/filter_dropdown.tsx +4 -2
- package/src/components/display/index.ts +1 -0
- package/src/components/display/popover_menu_view.tsx +239 -0
- package/src/contexts/conversations_context.tsx +8 -1
- package/src/hooks/__tests__/use_conversations_jolt_events.test.tsx +135 -0
- package/src/hooks/__tests__/use_jolt.test.tsx +76 -1
- package/src/hooks/use_clear_conversation_filters.ts +1 -0
- package/src/hooks/use_conversations_cache.ts +29 -24
- package/src/hooks/use_conversations_jolt_events.ts +2 -2
- package/src/hooks/use_jolt.ts +26 -2
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +4 -0
- package/src/screens/conversation_filters/screen_props.ts +1 -0
- package/src/screens/conversations/__tests__/conversations_screen.test.tsx +2 -12
- package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +57 -38
- package/src/screens/conversations/components/filter_dropdown_list_header_component.tsx +25 -27
- package/src/screens/conversations/conversations_screen.tsx +2 -2
- package/src/screens/design_system_screen.tsx +34 -1
- package/src/utils/__tests__/conversation.test.ts +1 -0
- package/src/utils/native_adapters/menu.tsx +4 -18
- package/src/utils/request/conversation.ts +4 -0
- package/src/utils/native_adapters/__tests__/menu.test.tsx +0 -46
|
@@ -3,7 +3,7 @@ import { useNavigation, useRoute } from '@react-navigation/native';
|
|
|
3
3
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import { Alert, StyleSheet, View } from 'react-native';
|
|
5
5
|
import { FilterDropdown, TextButton } from '../../../components';
|
|
6
|
-
import { useCanBrowseArchivedConversations, useCanCreateConversations, useCurrentPersonCache, useDirectMessagesEligible,
|
|
6
|
+
import { useCanBrowseArchivedConversations, useCanCreateConversations, useCurrentPersonCache, useDirectMessagesEligible, useHasDirectMessages, useNewConversationEntry, useTheme } from '../../../hooks';
|
|
7
7
|
import { useApiGet } from '../../../hooks/use_api';
|
|
8
8
|
import { useMarkAllRead } from '../../../hooks/use_conversations_actions';
|
|
9
9
|
import { useCanDisplayGroups } from '../../../hooks/use_groups';
|
|
@@ -15,7 +15,6 @@ import { ListHeaderActionButton } from './list_header_action_button';
|
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
const ROW_PADDING_HORIZONTAL = 16;
|
|
17
17
|
const HEADING_ROW_GAP = 12;
|
|
18
|
-
const DEFAULT_FONT_SCALE = 1;
|
|
19
18
|
const ALL_CONVERSATIONS_LABEL = 'All conversations';
|
|
20
19
|
const ARCHIVED_LABEL = 'Archived';
|
|
21
20
|
var FilterTypes = /*#__PURE__*/function (FilterTypes) {
|
|
@@ -23,6 +22,7 @@ var FilterTypes = /*#__PURE__*/function (FilterTypes) {
|
|
|
23
22
|
FilterTypes["Groups"] = "Groups";
|
|
24
23
|
FilterTypes["Teams"] = "Teams";
|
|
25
24
|
FilterTypes["DMs"] = "DMs";
|
|
25
|
+
FilterTypes["Unread"] = "Unread";
|
|
26
26
|
FilterTypes["More"] = "More";
|
|
27
27
|
return FilterTypes;
|
|
28
28
|
}(FilterTypes || {});
|
|
@@ -36,10 +36,13 @@ const FILTER_PARAMS = {
|
|
|
36
36
|
},
|
|
37
37
|
[FilterTypes.DMs]: {
|
|
38
38
|
show_direct_messages: true
|
|
39
|
+
},
|
|
40
|
+
[FilterTypes.Unread]: {
|
|
41
|
+
show_unread: true
|
|
39
42
|
}
|
|
40
43
|
};
|
|
41
44
|
export const FilterDropdownListHeaderComponent = () => {
|
|
42
|
-
const $ = _c(
|
|
45
|
+
const $ = _c(93);
|
|
43
46
|
const navigation = useNavigation();
|
|
44
47
|
let t0;
|
|
45
48
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -82,7 +85,8 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
82
85
|
chat_group_graph_id,
|
|
83
86
|
group_source_app_name: t3,
|
|
84
87
|
show_direct_messages,
|
|
85
|
-
show_archived
|
|
88
|
+
show_archived,
|
|
89
|
+
show_unread
|
|
86
90
|
} = t2;
|
|
87
91
|
const group_source_app_name = t3 === undefined ? "" : t3;
|
|
88
92
|
const currentPersonCache = useCurrentPersonCache();
|
|
@@ -148,6 +152,11 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
148
152
|
if (show_direct_messages) {
|
|
149
153
|
t9 = FilterTypes.DMs;
|
|
150
154
|
break bb0;
|
|
155
|
+
} else {
|
|
156
|
+
if (show_unread) {
|
|
157
|
+
t9 = FilterTypes.Unread;
|
|
158
|
+
break bb0;
|
|
159
|
+
}
|
|
151
160
|
}
|
|
152
161
|
}
|
|
153
162
|
}
|
|
@@ -199,19 +208,29 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
199
208
|
t13 = $[15];
|
|
200
209
|
}
|
|
201
210
|
let t14;
|
|
202
|
-
if ($[16]
|
|
203
|
-
t14 =
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
$[
|
|
211
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
212
|
+
t14 = {
|
|
213
|
+
id: FilterTypes.Unread,
|
|
214
|
+
label: FilterTypes.Unread
|
|
215
|
+
};
|
|
216
|
+
$[16] = t14;
|
|
208
217
|
} else {
|
|
209
|
-
t14 = $[
|
|
218
|
+
t14 = $[16];
|
|
210
219
|
}
|
|
211
|
-
const options = t14;
|
|
212
220
|
let t15;
|
|
213
|
-
if ($[
|
|
214
|
-
t15 =
|
|
221
|
+
if ($[17] !== t11 || $[18] !== t12 || $[19] !== t13) {
|
|
222
|
+
t15 = [t10, ...t11, ...t12, ...t13, t14];
|
|
223
|
+
$[17] = t11;
|
|
224
|
+
$[18] = t12;
|
|
225
|
+
$[19] = t13;
|
|
226
|
+
$[20] = t15;
|
|
227
|
+
} else {
|
|
228
|
+
t15 = $[20];
|
|
229
|
+
}
|
|
230
|
+
const options = t15;
|
|
231
|
+
let t16;
|
|
232
|
+
if ($[21] !== active || $[22] !== chat_group_graph_id || $[23] !== group?.name || $[24] !== show_archived || $[25] !== title) {
|
|
233
|
+
t16 = () => {
|
|
215
234
|
if (chat_group_graph_id) {
|
|
216
235
|
return group?.name || title || ALL_CONVERSATIONS_LABEL;
|
|
217
236
|
}
|
|
@@ -223,28 +242,28 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
223
242
|
}
|
|
224
243
|
return active;
|
|
225
244
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
245
|
+
$[21] = active;
|
|
246
|
+
$[22] = chat_group_graph_id;
|
|
247
|
+
$[23] = group?.name;
|
|
248
|
+
$[24] = show_archived;
|
|
249
|
+
$[25] = title;
|
|
250
|
+
$[26] = t16;
|
|
232
251
|
} else {
|
|
233
|
-
|
|
252
|
+
t16 = $[26];
|
|
234
253
|
}
|
|
235
254
|
group?.name;
|
|
236
|
-
let
|
|
237
|
-
if ($[
|
|
238
|
-
|
|
239
|
-
$[26] = t15;
|
|
255
|
+
let t17;
|
|
256
|
+
if ($[27] !== t16) {
|
|
257
|
+
t17 = t16();
|
|
240
258
|
$[27] = t16;
|
|
259
|
+
$[28] = t17;
|
|
241
260
|
} else {
|
|
242
|
-
|
|
261
|
+
t17 = $[28];
|
|
243
262
|
}
|
|
244
|
-
const triggerLabel =
|
|
245
|
-
let
|
|
246
|
-
if ($[
|
|
247
|
-
|
|
263
|
+
const triggerLabel = t17;
|
|
264
|
+
let t18;
|
|
265
|
+
if ($[29] !== entryMode || $[30] !== navigation || $[31] !== newConversationFromFilter || $[32] !== route.params) {
|
|
266
|
+
t18 = () => {
|
|
248
267
|
if (newConversationFromFilter || entryMode === "select_type") {
|
|
249
268
|
return navigation.navigate("ConversationSelectType", {
|
|
250
269
|
...route.params,
|
|
@@ -276,108 +295,111 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
276
295
|
});
|
|
277
296
|
}
|
|
278
297
|
};
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
298
|
+
$[29] = entryMode;
|
|
299
|
+
$[30] = navigation;
|
|
300
|
+
$[31] = newConversationFromFilter;
|
|
301
|
+
$[32] = route.params;
|
|
302
|
+
$[33] = t18;
|
|
284
303
|
} else {
|
|
285
|
-
|
|
304
|
+
t18 = $[33];
|
|
286
305
|
}
|
|
287
|
-
const handleNewConversationNavigation =
|
|
288
|
-
let
|
|
289
|
-
if ($[
|
|
290
|
-
|
|
306
|
+
const handleNewConversationNavigation = t18;
|
|
307
|
+
let t19;
|
|
308
|
+
if ($[34] !== navigation) {
|
|
309
|
+
t19 = params => {
|
|
291
310
|
navigation.setParams({
|
|
292
311
|
title: undefined,
|
|
293
312
|
chat_group_graph_id: undefined,
|
|
294
313
|
group_source_app_name: undefined,
|
|
295
314
|
show_direct_messages: undefined,
|
|
296
315
|
show_archived: undefined,
|
|
316
|
+
show_unread: undefined,
|
|
297
317
|
...params
|
|
298
318
|
});
|
|
299
319
|
};
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
320
|
+
$[34] = navigation;
|
|
321
|
+
$[35] = t19;
|
|
302
322
|
} else {
|
|
303
|
-
|
|
323
|
+
t19 = $[35];
|
|
304
324
|
}
|
|
305
|
-
const handleSetFilter =
|
|
306
|
-
let
|
|
307
|
-
if ($[
|
|
308
|
-
|
|
325
|
+
const handleSetFilter = t19;
|
|
326
|
+
let t20;
|
|
327
|
+
if ($[36] !== handleSetFilter) {
|
|
328
|
+
t20 = id => {
|
|
309
329
|
const params_0 = FILTER_PARAMS[id];
|
|
310
330
|
if (params_0) {
|
|
311
331
|
handleSetFilter(params_0);
|
|
312
332
|
}
|
|
313
333
|
};
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
334
|
+
$[36] = handleSetFilter;
|
|
335
|
+
$[37] = t20;
|
|
316
336
|
} else {
|
|
317
|
-
|
|
337
|
+
t20 = $[37];
|
|
318
338
|
}
|
|
319
|
-
const handleSelectFilter =
|
|
320
|
-
let
|
|
321
|
-
if ($[
|
|
322
|
-
|
|
339
|
+
const handleSelectFilter = t20;
|
|
340
|
+
let t21;
|
|
341
|
+
if ($[38] !== navigation) {
|
|
342
|
+
t21 = () => {
|
|
323
343
|
navigation.navigate("Search");
|
|
324
344
|
};
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
345
|
+
$[38] = navigation;
|
|
346
|
+
$[39] = t21;
|
|
327
347
|
} else {
|
|
328
|
-
|
|
348
|
+
t21 = $[39];
|
|
329
349
|
}
|
|
330
|
-
const handleSearch =
|
|
331
|
-
let
|
|
332
|
-
if ($[
|
|
333
|
-
|
|
350
|
+
const handleSearch = t21;
|
|
351
|
+
let t22;
|
|
352
|
+
if ($[40] !== navigation) {
|
|
353
|
+
t22 = () => {
|
|
334
354
|
navigation.navigate("ChatSettings", {});
|
|
335
355
|
};
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
356
|
+
$[40] = navigation;
|
|
357
|
+
$[41] = t22;
|
|
338
358
|
} else {
|
|
339
|
-
|
|
359
|
+
t22 = $[41];
|
|
340
360
|
}
|
|
341
|
-
const handleChatSettings =
|
|
342
|
-
let
|
|
343
|
-
if ($[
|
|
344
|
-
|
|
361
|
+
const handleChatSettings = t22;
|
|
362
|
+
let t23;
|
|
363
|
+
if ($[42] !== chat_group_graph_id || $[43] !== group_source_app_name || $[44] !== navigation || $[45] !== show_archived || $[46] !== show_direct_messages || $[47] !== show_unread) {
|
|
364
|
+
t23 = () => {
|
|
345
365
|
navigation.navigate("ConversationFilters", {
|
|
346
366
|
chat_group_graph_id,
|
|
347
367
|
group_source_app_name,
|
|
348
368
|
show_direct_messages,
|
|
349
|
-
show_archived
|
|
369
|
+
show_archived,
|
|
370
|
+
show_unread
|
|
350
371
|
});
|
|
351
372
|
};
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
373
|
+
$[42] = chat_group_graph_id;
|
|
374
|
+
$[43] = group_source_app_name;
|
|
375
|
+
$[44] = navigation;
|
|
376
|
+
$[45] = show_archived;
|
|
377
|
+
$[46] = show_direct_messages;
|
|
378
|
+
$[47] = show_unread;
|
|
379
|
+
$[48] = t23;
|
|
358
380
|
} else {
|
|
359
|
-
|
|
381
|
+
t23 = $[48];
|
|
360
382
|
}
|
|
361
|
-
const handleOpenConversationFilters =
|
|
362
|
-
let
|
|
363
|
-
if ($[
|
|
364
|
-
|
|
383
|
+
const handleOpenConversationFilters = t23;
|
|
384
|
+
let t24;
|
|
385
|
+
if ($[49] !== currentPersonCache || $[50] !== markAllRead) {
|
|
386
|
+
t24 = () => {
|
|
365
387
|
currentPersonCache.update({
|
|
366
388
|
unreadCount: 0
|
|
367
389
|
});
|
|
368
390
|
Haptic.notificationSuccess();
|
|
369
391
|
markAllRead();
|
|
370
392
|
};
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
393
|
+
$[49] = currentPersonCache;
|
|
394
|
+
$[50] = markAllRead;
|
|
395
|
+
$[51] = t24;
|
|
374
396
|
} else {
|
|
375
|
-
|
|
397
|
+
t24 = $[51];
|
|
376
398
|
}
|
|
377
|
-
const handleMarkAllRead =
|
|
378
|
-
let
|
|
379
|
-
if ($[
|
|
380
|
-
|
|
399
|
+
const handleMarkAllRead = t24;
|
|
400
|
+
let t25;
|
|
401
|
+
if ($[52] !== active || $[53] !== handleMarkAllRead) {
|
|
402
|
+
t25 = () => {
|
|
381
403
|
if (active === FilterTypes.All) {
|
|
382
404
|
return handleMarkAllRead();
|
|
383
405
|
}
|
|
@@ -388,28 +410,16 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
388
410
|
onPress: () => handleMarkAllRead()
|
|
389
411
|
}]);
|
|
390
412
|
};
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[52] = t24;
|
|
394
|
-
} else {
|
|
395
|
-
t24 = $[52];
|
|
396
|
-
}
|
|
397
|
-
const alertMarkAllRead = t24;
|
|
398
|
-
const showMoreFilters = canFilterByGroups || canFilterByTeams || canBrowseArchived;
|
|
399
|
-
const stacked = useFontScale() > DEFAULT_FONT_SCALE;
|
|
400
|
-
let t25;
|
|
401
|
-
if ($[53] !== stacked) {
|
|
402
|
-
t25 = {
|
|
403
|
-
stacked
|
|
404
|
-
};
|
|
405
|
-
$[53] = stacked;
|
|
413
|
+
$[52] = active;
|
|
414
|
+
$[53] = handleMarkAllRead;
|
|
406
415
|
$[54] = t25;
|
|
407
416
|
} else {
|
|
408
417
|
t25 = $[54];
|
|
409
418
|
}
|
|
410
|
-
const
|
|
419
|
+
const alertMarkAllRead = t25;
|
|
420
|
+
const showMoreFilters = canFilterByGroups || canFilterByTeams || canBrowseArchived;
|
|
421
|
+
const styles = useStyles();
|
|
411
422
|
const [rowWidth, setRowWidth] = useState();
|
|
412
|
-
const [actionsWidth, setActionsWidth] = useState();
|
|
413
423
|
let t26;
|
|
414
424
|
if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
|
|
415
425
|
t26 = event => {
|
|
@@ -420,20 +430,10 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
420
430
|
t26 = $[55];
|
|
421
431
|
}
|
|
422
432
|
const handleRowLayout = t26;
|
|
433
|
+
const triggerMaxWidth = rowWidth !== undefined ? rowWidth - ROW_PADDING_HORIZONTAL * 2 : undefined;
|
|
423
434
|
let t27;
|
|
424
|
-
if ($[56]
|
|
425
|
-
t27 =
|
|
426
|
-
setActionsWidth(event_0.nativeEvent.layout.width);
|
|
427
|
-
};
|
|
428
|
-
$[56] = t27;
|
|
429
|
-
} else {
|
|
430
|
-
t27 = $[56];
|
|
431
|
-
}
|
|
432
|
-
const handleActionsLayout = t27;
|
|
433
|
-
const triggerMaxWidth = !stacked && rowWidth !== undefined && actionsWidth !== undefined ? rowWidth - ROW_PADDING_HORIZONTAL * 2 - actionsWidth - HEADING_ROW_GAP : undefined;
|
|
434
|
-
let t28;
|
|
435
|
-
if ($[57] !== active || $[58] !== handleOpenConversationFilters || $[59] !== handleSelectFilter || $[60] !== options || $[61] !== showMoreFilters || $[62] !== triggerLabel || $[63] !== triggerMaxWidth) {
|
|
436
|
-
t28 = /*#__PURE__*/_jsx(FilterDropdown, {
|
|
435
|
+
if ($[56] !== active || $[57] !== handleOpenConversationFilters || $[58] !== handleSelectFilter || $[59] !== options || $[60] !== showMoreFilters || $[61] !== triggerLabel || $[62] !== triggerMaxWidth) {
|
|
436
|
+
t27 = /*#__PURE__*/_jsx(FilterDropdown, {
|
|
437
437
|
options: options,
|
|
438
438
|
selectedId: active,
|
|
439
439
|
onSelect: handleSelectFilter,
|
|
@@ -442,107 +442,105 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
442
442
|
triggerLabel: triggerLabel,
|
|
443
443
|
maxWidth: triggerMaxWidth
|
|
444
444
|
});
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
445
|
+
$[56] = active;
|
|
446
|
+
$[57] = handleOpenConversationFilters;
|
|
447
|
+
$[58] = handleSelectFilter;
|
|
448
|
+
$[59] = options;
|
|
449
|
+
$[60] = showMoreFilters;
|
|
450
|
+
$[61] = triggerLabel;
|
|
451
|
+
$[62] = triggerMaxWidth;
|
|
452
|
+
$[63] = t27;
|
|
453
453
|
} else {
|
|
454
|
-
|
|
454
|
+
t27 = $[63];
|
|
455
455
|
}
|
|
456
|
-
let
|
|
457
|
-
if ($[
|
|
458
|
-
|
|
456
|
+
let t28;
|
|
457
|
+
if ($[64] !== styles.titleContainer || $[65] !== t27) {
|
|
458
|
+
t28 = /*#__PURE__*/_jsx(View, {
|
|
459
459
|
style: styles.titleContainer,
|
|
460
|
-
children:
|
|
460
|
+
children: t27
|
|
461
461
|
});
|
|
462
|
-
$[
|
|
462
|
+
$[64] = styles.titleContainer;
|
|
463
|
+
$[65] = t27;
|
|
463
464
|
$[66] = t28;
|
|
464
|
-
$[67] = t29;
|
|
465
465
|
} else {
|
|
466
|
-
|
|
466
|
+
t28 = $[66];
|
|
467
467
|
}
|
|
468
|
-
let
|
|
469
|
-
if ($[
|
|
470
|
-
|
|
468
|
+
let t29;
|
|
469
|
+
if ($[67] !== handleChatSettings) {
|
|
470
|
+
t29 = /*#__PURE__*/_jsx(ListHeaderActionButton, {
|
|
471
471
|
name: "general.cog",
|
|
472
472
|
onPress: handleChatSettings,
|
|
473
473
|
accessibilityLabel: "Chat settings",
|
|
474
474
|
testID: "conversations-chat-settings-button",
|
|
475
475
|
maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER_LANDMARK
|
|
476
476
|
});
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
477
|
+
$[67] = handleChatSettings;
|
|
478
|
+
$[68] = t29;
|
|
479
479
|
} else {
|
|
480
|
-
|
|
480
|
+
t29 = $[68];
|
|
481
481
|
}
|
|
482
|
-
let
|
|
483
|
-
if ($[
|
|
484
|
-
|
|
482
|
+
let t30;
|
|
483
|
+
if ($[69] !== canCreateConversations || $[70] !== handleNewConversationNavigation) {
|
|
484
|
+
t30 = canCreateConversations && /*#__PURE__*/_jsx(ListHeaderActionButton, {
|
|
485
485
|
name: "churchCenter.signups",
|
|
486
486
|
onPress: handleNewConversationNavigation,
|
|
487
487
|
accessibilityLabel: "New conversation",
|
|
488
488
|
testID: "conversations-new-conversation-button",
|
|
489
489
|
maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER_LANDMARK
|
|
490
490
|
});
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
491
|
+
$[69] = canCreateConversations;
|
|
492
|
+
$[70] = handleNewConversationNavigation;
|
|
493
|
+
$[71] = t30;
|
|
494
494
|
} else {
|
|
495
|
-
|
|
495
|
+
t30 = $[71];
|
|
496
496
|
}
|
|
497
|
-
let
|
|
498
|
-
if ($[
|
|
499
|
-
|
|
497
|
+
let t31;
|
|
498
|
+
if ($[72] !== handleSearch || $[73] !== searchEnabled) {
|
|
499
|
+
t31 = searchEnabled && /*#__PURE__*/_jsx(ListHeaderActionButton, {
|
|
500
500
|
name: "general.search",
|
|
501
501
|
onPress: handleSearch,
|
|
502
502
|
accessibilityLabel: "Search",
|
|
503
503
|
testID: "conversations-search-button",
|
|
504
504
|
maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER_LANDMARK
|
|
505
505
|
});
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
506
|
+
$[72] = handleSearch;
|
|
507
|
+
$[73] = searchEnabled;
|
|
508
|
+
$[74] = t31;
|
|
509
509
|
} else {
|
|
510
|
-
|
|
510
|
+
t31 = $[74];
|
|
511
511
|
}
|
|
512
|
-
let
|
|
513
|
-
if ($[
|
|
514
|
-
|
|
512
|
+
let t32;
|
|
513
|
+
if ($[75] !== styles.actionsContainer || $[76] !== t29 || $[77] !== t30 || $[78] !== t31) {
|
|
514
|
+
t32 = /*#__PURE__*/_jsxs(View, {
|
|
515
515
|
style: styles.actionsContainer,
|
|
516
|
-
|
|
517
|
-
testID: "conversations-filter-actions",
|
|
518
|
-
children: [t30, t31, t32]
|
|
516
|
+
children: [t29, t30, t31]
|
|
519
517
|
});
|
|
520
|
-
$[
|
|
518
|
+
$[75] = styles.actionsContainer;
|
|
519
|
+
$[76] = t29;
|
|
521
520
|
$[77] = t30;
|
|
522
521
|
$[78] = t31;
|
|
523
522
|
$[79] = t32;
|
|
524
|
-
$[80] = t33;
|
|
525
523
|
} else {
|
|
526
|
-
|
|
524
|
+
t32 = $[79];
|
|
527
525
|
}
|
|
528
|
-
let
|
|
529
|
-
if ($[
|
|
530
|
-
|
|
526
|
+
let t33;
|
|
527
|
+
if ($[80] !== styles.headingRow || $[81] !== t28 || $[82] !== t32) {
|
|
528
|
+
t33 = /*#__PURE__*/_jsxs(View, {
|
|
531
529
|
style: styles.headingRow,
|
|
532
530
|
onLayout: handleRowLayout,
|
|
533
531
|
testID: "conversations-filter-heading-row",
|
|
534
|
-
children: [
|
|
532
|
+
children: [t28, t32]
|
|
535
533
|
});
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
534
|
+
$[80] = styles.headingRow;
|
|
535
|
+
$[81] = t28;
|
|
536
|
+
$[82] = t32;
|
|
538
537
|
$[83] = t33;
|
|
539
|
-
$[84] = t34;
|
|
540
538
|
} else {
|
|
541
|
-
|
|
539
|
+
t33 = $[83];
|
|
542
540
|
}
|
|
543
|
-
let
|
|
544
|
-
if ($[
|
|
545
|
-
|
|
541
|
+
let t34;
|
|
542
|
+
if ($[84] !== alertMarkAllRead || $[85] !== isPending || $[86] !== show_archived || $[87] !== styles.markAllReadRow) {
|
|
543
|
+
t34 = !show_archived && /*#__PURE__*/_jsx(View, {
|
|
546
544
|
style: styles.markAllReadRow,
|
|
547
545
|
children: /*#__PURE__*/_jsx(TextButton, {
|
|
548
546
|
onPress: alertMarkAllRead,
|
|
@@ -553,38 +551,35 @@ export const FilterDropdownListHeaderComponent = () => {
|
|
|
553
551
|
children: "Mark all read"
|
|
554
552
|
})
|
|
555
553
|
});
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
559
|
-
$[
|
|
560
|
-
$[
|
|
554
|
+
$[84] = alertMarkAllRead;
|
|
555
|
+
$[85] = isPending;
|
|
556
|
+
$[86] = show_archived;
|
|
557
|
+
$[87] = styles.markAllReadRow;
|
|
558
|
+
$[88] = t34;
|
|
561
559
|
} else {
|
|
562
|
-
|
|
560
|
+
t34 = $[88];
|
|
563
561
|
}
|
|
564
|
-
let
|
|
565
|
-
if ($[
|
|
566
|
-
|
|
562
|
+
let t35;
|
|
563
|
+
if ($[89] !== styles.listHeader || $[90] !== t33 || $[91] !== t34) {
|
|
564
|
+
t35 = /*#__PURE__*/_jsxs(View, {
|
|
567
565
|
style: styles.listHeader,
|
|
568
|
-
children: [
|
|
566
|
+
children: [t33, t34]
|
|
569
567
|
});
|
|
570
|
-
$[
|
|
568
|
+
$[89] = styles.listHeader;
|
|
569
|
+
$[90] = t33;
|
|
571
570
|
$[91] = t34;
|
|
572
571
|
$[92] = t35;
|
|
573
|
-
$[93] = t36;
|
|
574
572
|
} else {
|
|
575
|
-
|
|
573
|
+
t35 = $[92];
|
|
576
574
|
}
|
|
577
|
-
return
|
|
575
|
+
return t35;
|
|
578
576
|
};
|
|
579
|
-
const useStyles =
|
|
580
|
-
const $ = _c(
|
|
581
|
-
const {
|
|
582
|
-
stacked
|
|
583
|
-
} = t0;
|
|
577
|
+
const useStyles = () => {
|
|
578
|
+
const $ = _c(2);
|
|
584
579
|
const theme = useTheme();
|
|
585
|
-
let
|
|
586
|
-
if ($[0] !==
|
|
587
|
-
|
|
580
|
+
let t0;
|
|
581
|
+
if ($[0] !== theme.colors.fillColorNeutral050Base) {
|
|
582
|
+
t0 = StyleSheet.create({
|
|
588
583
|
listHeader: {
|
|
589
584
|
borderBottomWidth: 1,
|
|
590
585
|
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
@@ -593,15 +588,14 @@ const useStyles = t0 => {
|
|
|
593
588
|
},
|
|
594
589
|
headingRow: {
|
|
595
590
|
gap: HEADING_ROW_GAP,
|
|
596
|
-
flexDirection:
|
|
597
|
-
|
|
591
|
+
flexDirection: "row",
|
|
592
|
+
flexWrap: "wrap",
|
|
593
|
+
alignItems: "center",
|
|
598
594
|
justifyContent: "space-between",
|
|
599
|
-
paddingBottom: stacked ? 4 : 0,
|
|
600
595
|
paddingHorizontal: ROW_PADDING_HORIZONTAL
|
|
601
596
|
},
|
|
602
597
|
titleContainer: {
|
|
603
|
-
flexShrink:
|
|
604
|
-
minWidth: 0
|
|
598
|
+
flexShrink: 0
|
|
605
599
|
},
|
|
606
600
|
actionsContainer: {
|
|
607
601
|
flexDirection: "row",
|
|
@@ -613,12 +607,11 @@ const useStyles = t0 => {
|
|
|
613
607
|
paddingHorizontal: ROW_PADDING_HORIZONTAL
|
|
614
608
|
}
|
|
615
609
|
});
|
|
616
|
-
$[0] =
|
|
617
|
-
$[1] =
|
|
618
|
-
$[2] = t1;
|
|
610
|
+
$[0] = theme.colors.fillColorNeutral050Base;
|
|
611
|
+
$[1] = t0;
|
|
619
612
|
} else {
|
|
620
|
-
|
|
613
|
+
t0 = $[1];
|
|
621
614
|
}
|
|
622
|
-
return
|
|
615
|
+
return t0;
|
|
623
616
|
};
|
|
624
617
|
//# sourceMappingURL=filter_dropdown_list_header_component.js.map
|