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