@planningcenter/chat-react-native 4.4.1-qa-1036.2 → 4.4.1-qa-staging.42

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.
Files changed (113) hide show
  1. package/build/components/conversation/message_list.d.ts.map +1 -1
  2. package/build/components/conversation/message_list.js +155 -123
  3. package/build/components/conversation/message_list.js.map +1 -1
  4. package/build/components/conversations/conversations.d.ts.map +1 -1
  5. package/build/components/conversations/conversations.js +1 -0
  6. package/build/components/conversations/conversations.js.map +1 -1
  7. package/build/components/display/filter_dropdown.d.ts +1 -0
  8. package/build/components/display/filter_dropdown.d.ts.map +1 -1
  9. package/build/components/display/filter_dropdown.js.map +1 -1
  10. package/build/components/display/keyboard_scroll_view.d.ts.map +1 -1
  11. package/build/components/display/keyboard_scroll_view.js +1 -0
  12. package/build/components/display/keyboard_scroll_view.js.map +1 -1
  13. package/build/components/page/page_error_boundary.d.ts +9 -1
  14. package/build/components/page/page_error_boundary.d.ts.map +1 -1
  15. package/build/components/page/page_error_boundary.js +56 -31
  16. package/build/components/page/page_error_boundary.js.map +1 -1
  17. package/build/navigation/index.d.ts.map +1 -1
  18. package/build/navigation/index.js +11 -3
  19. package/build/navigation/index.js.map +1 -1
  20. package/build/navigation/page_error_fallbacks.d.ts +7 -0
  21. package/build/navigation/page_error_fallbacks.d.ts.map +1 -0
  22. package/build/navigation/page_error_fallbacks.js +7 -0
  23. package/build/navigation/page_error_fallbacks.js.map +1 -0
  24. package/build/navigation/screenLayout.d.ts.map +1 -1
  25. package/build/navigation/screenLayout.js +21 -13
  26. package/build/navigation/screenLayout.js.map +1 -1
  27. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  28. package/build/screens/age_check/age_check_required_screen.js +1 -0
  29. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  30. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  31. package/build/screens/conversation_details_screen.js +1 -0
  32. package/build/screens/conversation_details_screen.js.map +1 -1
  33. package/build/screens/conversation_new/components/groups_form.js +25 -18
  34. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  35. package/build/screens/conversation_new/components/services_form.js +51 -40
  36. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  37. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  38. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +1 -0
  39. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  40. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  41. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +332 -291
  42. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  43. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  44. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +1 -0
  45. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  46. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  47. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +1 -0
  48. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  49. package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -1
  50. package/build/screens/conversations/components/filter_dropdown_list_header_component.js +22 -7
  51. package/build/screens/conversations/components/filter_dropdown_list_header_component.js.map +1 -1
  52. package/build/screens/get_help_screen.js +56 -62
  53. package/build/screens/get_help_screen.js.map +1 -1
  54. package/build/screens/group_notification_settings_screen.js +3 -2
  55. package/build/screens/group_notification_settings_screen.js.map +1 -1
  56. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  57. package/build/screens/notification_settings_screen.js +1 -0
  58. package/build/screens/notification_settings_screen.js.map +1 -1
  59. package/build/screens/preferred_app_selection_screen.js +45 -39
  60. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  61. package/build/screens/search/components/search_results_list.d.ts +4 -1
  62. package/build/screens/search/components/search_results_list.d.ts.map +1 -1
  63. package/build/screens/search/components/search_results_list.js +136 -110
  64. package/build/screens/search/components/search_results_list.js.map +1 -1
  65. package/build/screens/search/search_screen.d.ts.map +1 -1
  66. package/build/screens/search/search_screen.js +21 -28
  67. package/build/screens/search/search_screen.js.map +1 -1
  68. package/build/screens/settings_screen.d.ts.map +1 -1
  69. package/build/screens/settings_screen.js +7 -6
  70. package/build/screens/settings_screen.js.map +1 -1
  71. package/build/utils/index.d.ts +1 -0
  72. package/build/utils/index.d.ts.map +1 -1
  73. package/build/utils/index.js +1 -0
  74. package/build/utils/index.js.map +1 -1
  75. package/build/utils/membership_sync_info_text.d.ts +2 -0
  76. package/build/utils/membership_sync_info_text.d.ts.map +1 -0
  77. package/build/utils/membership_sync_info_text.js +4 -0
  78. package/build/utils/membership_sync_info_text.js.map +1 -0
  79. package/package.json +3 -3
  80. package/src/__tests__/navigation/screen_layout.test.tsx +55 -0
  81. package/src/components/conversation/__tests__/message_list.test.tsx +4 -0
  82. package/src/components/conversation/message_list.tsx +6 -0
  83. package/src/components/conversations/conversations.tsx +1 -0
  84. package/src/components/display/filter_dropdown.tsx +1 -0
  85. package/src/components/display/keyboard_scroll_view.tsx +1 -0
  86. package/src/components/page/__tests__/page_error_boundary.test.tsx +33 -0
  87. package/src/components/page/page_error_boundary.tsx +43 -12
  88. package/src/navigation/index.tsx +11 -2
  89. package/src/navigation/page_error_fallbacks.ts +14 -0
  90. package/src/navigation/screenLayout.tsx +6 -3
  91. package/src/screens/age_check/age_check_required_screen.tsx +5 -1
  92. package/src/screens/conversation_details_screen.tsx +1 -0
  93. package/src/screens/conversation_new/components/groups_form.tsx +2 -2
  94. package/src/screens/conversation_new/components/services_form.tsx +2 -2
  95. package/src/screens/conversation_select_recipients/__tests__/conversation_select_direct_message_recipients_screen.test.tsx +100 -0
  96. package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -1
  97. package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +78 -68
  98. package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +1 -0
  99. package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +1 -0
  100. package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +59 -1
  101. package/src/screens/conversations/components/filter_dropdown_list_header_component.tsx +24 -9
  102. package/src/screens/get_help_screen.tsx +4 -4
  103. package/src/screens/group_notification_settings_screen.tsx +3 -3
  104. package/src/screens/notification_settings_screen.tsx +1 -0
  105. package/src/screens/preferred_app_selection_screen.tsx +4 -4
  106. package/src/screens/search/__tests__/search_screen.test.tsx +5 -7
  107. package/src/screens/search/components/__tests__/search_results_list.test.tsx +6 -2
  108. package/src/screens/search/components/search_results_list.tsx +34 -13
  109. package/src/screens/search/search_screen.tsx +8 -18
  110. package/src/screens/settings_screen.tsx +25 -25
  111. package/src/utils/__tests__/membership_sync_info_text.test.ts +15 -0
  112. package/src/utils/index.ts +1 -0
  113. package/src/utils/membership_sync_info_text.ts +3 -0
@@ -6,7 +6,6 @@ import { FlatList, Pressable, StyleSheet, View } from 'react-native';
6
6
  import { Avatar, Badge, Banner, Icon, KeyboardView, Spinner, Text } from '../../components';
7
7
  import { ActionButton } from '../../components/display/action_button';
8
8
  import { AutoFocusAwareTextInput } from '../../components/display/text_input';
9
- import { ComponentErrorBoundary } from '../../components/page/component_error_boundary';
10
9
  import { useTheme } from '../../hooks';
11
10
  import { useDirectMessageAffiliations } from '../../hooks/direct_messages/use_direct_message_affiliations';
12
11
  import { useDirectMessageCandidates } from '../../hooks/direct_messages/use_direct_message_candidates';
@@ -15,10 +14,10 @@ import { useFindOrCreateDirectMessageConversation } from '../../hooks/direct_mes
15
14
  import { useDebouncedSearchTerm } from '../../hooks/use_debounced_search_term';
16
15
  import { availableFeatures, useFeatures } from '../../hooks/use_features';
17
16
  import { ResultsHeading } from './components/results_heading';
18
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
17
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  const MAX_RECIPIENTS = 9;
20
19
  export function ConversationSelectDirectMessageRecipientsScreen(t0) {
21
- const $ = _c(55);
20
+ const $ = _c(51);
22
21
  const {
23
22
  route
24
23
  } = t0;
@@ -205,99 +204,85 @@ export function ConversationSelectDirectMessageRecipientsScreen(t0) {
205
204
  t14 = $[27];
206
205
  }
207
206
  let t15;
208
- if ($[28] !== styles.errorBanner) {
209
- t15 = /*#__PURE__*/_jsx(Banner, {
210
- appearance: "error",
211
- description: "Couldn't load people right now. Try again.",
212
- style: styles.errorBanner
207
+ if ($[28] !== t12 || $[29] !== t14) {
208
+ t15 = /*#__PURE__*/_jsxs(_Fragment, {
209
+ children: [t12, t14]
213
210
  });
214
- $[28] = styles.errorBanner;
215
- $[29] = t15;
211
+ $[28] = t12;
212
+ $[29] = t14;
213
+ $[30] = t15;
216
214
  } else {
217
- t15 = $[29];
215
+ t15 = $[30];
218
216
  }
219
217
  let t16;
220
- if ($[30] !== debouncedTerm || $[31] !== selectPerson || $[32] !== selectedPeople) {
218
+ if ($[31] !== debouncedTerm || $[32] !== selectPerson || $[33] !== selectedPeople || $[34] !== t15) {
221
219
  t16 = /*#__PURE__*/_jsx(CandidateResults, {
222
220
  term: debouncedTerm,
223
221
  selectedPeople: selectedPeople,
224
- onSelect: selectPerson
222
+ onSelect: selectPerson,
223
+ header: t15
225
224
  });
226
- $[30] = debouncedTerm;
227
- $[31] = selectPerson;
228
- $[32] = selectedPeople;
229
- $[33] = t16;
225
+ $[31] = debouncedTerm;
226
+ $[32] = selectPerson;
227
+ $[33] = selectedPeople;
228
+ $[34] = t15;
229
+ $[35] = t16;
230
230
  } else {
231
- t16 = $[33];
231
+ t16 = $[35];
232
232
  }
233
233
  let t17;
234
- if ($[34] !== debouncedTerm || $[35] !== t15 || $[36] !== t16) {
235
- t17 = /*#__PURE__*/_jsx(ComponentErrorBoundary, {
236
- fallback: t15,
237
- children: t16
238
- }, debouncedTerm);
239
- $[34] = debouncedTerm;
240
- $[35] = t15;
241
- $[36] = t16;
242
- $[37] = t17;
243
- } else {
244
- t17 = $[37];
245
- }
246
- let t18;
247
- if ($[38] !== styles.candidateResultsContainer || $[39] !== t17) {
248
- t18 = /*#__PURE__*/_jsx(View, {
234
+ if ($[36] !== styles.candidateResultsContainer || $[37] !== t16) {
235
+ t17 = /*#__PURE__*/_jsx(View, {
249
236
  style: styles.candidateResultsContainer,
250
- children: t17
237
+ children: t16
251
238
  });
252
- $[38] = styles.candidateResultsContainer;
253
- $[39] = t17;
254
- $[40] = t18;
239
+ $[36] = styles.candidateResultsContainer;
240
+ $[37] = t16;
241
+ $[38] = t17;
255
242
  } else {
256
- t18 = $[40];
243
+ t17 = $[38];
257
244
  }
258
- const t19 = selectedPeople.size === 0 || validationPending || warnings.length > 0 || isFinding;
259
- const t20 = validationPending || isFinding;
260
- let t21;
261
- if ($[41] !== findOrCreateConversation || $[42] !== recipientIds) {
262
- t21 = () => findOrCreateConversation(recipientIds);
263
- $[41] = findOrCreateConversation;
264
- $[42] = recipientIds;
265
- $[43] = t21;
245
+ const t18 = selectedPeople.size === 0 || validationPending || warnings.length > 0 || isFinding;
246
+ const t19 = validationPending || isFinding;
247
+ let t20;
248
+ if ($[39] !== findOrCreateConversation || $[40] !== recipientIds) {
249
+ t20 = () => findOrCreateConversation(recipientIds);
250
+ $[39] = findOrCreateConversation;
251
+ $[40] = recipientIds;
252
+ $[41] = t20;
266
253
  } else {
267
- t21 = $[43];
254
+ t20 = $[41];
268
255
  }
269
- let t22;
270
- if ($[44] !== buttonText || $[45] !== t19 || $[46] !== t20 || $[47] !== t21 || $[48] !== warnings) {
271
- t22 = /*#__PURE__*/_jsx(ActionButton, {
256
+ let t21;
257
+ if ($[42] !== buttonText || $[43] !== t18 || $[44] !== t19 || $[45] !== t20 || $[46] !== warnings) {
258
+ t21 = /*#__PURE__*/_jsx(ActionButton, {
272
259
  title: buttonText,
273
- disabled: t19,
274
- loading: t20,
275
- onPress: t21,
260
+ disabled: t18,
261
+ loading: t19,
262
+ onPress: t20,
276
263
  warnings: warnings
277
264
  });
278
- $[44] = buttonText;
279
- $[45] = t19;
280
- $[46] = t20;
265
+ $[42] = buttonText;
266
+ $[43] = t18;
267
+ $[44] = t19;
268
+ $[45] = t20;
269
+ $[46] = warnings;
281
270
  $[47] = t21;
282
- $[48] = warnings;
283
- $[49] = t22;
284
271
  } else {
285
- t22 = $[49];
272
+ t21 = $[47];
286
273
  }
287
- let t23;
288
- if ($[50] !== t12 || $[51] !== t14 || $[52] !== t18 || $[53] !== t22) {
289
- t23 = /*#__PURE__*/_jsxs(KeyboardView, {
290
- children: [t12, t14, t18, t22]
274
+ let t22;
275
+ if ($[48] !== t17 || $[49] !== t21) {
276
+ t22 = /*#__PURE__*/_jsxs(KeyboardView, {
277
+ children: [t17, t21]
291
278
  });
292
- $[50] = t12;
293
- $[51] = t14;
294
- $[52] = t18;
295
- $[53] = t22;
296
- $[54] = t23;
279
+ $[48] = t17;
280
+ $[49] = t21;
281
+ $[50] = t22;
297
282
  } else {
298
- t23 = $[54];
283
+ t22 = $[50];
299
284
  }
300
- return t23;
285
+ return t22;
301
286
  }
302
287
  function _temp(person) {
303
288
  return [person.id, {
@@ -523,11 +508,12 @@ function PersonChip(t0) {
523
508
  return t8;
524
509
  }
525
510
  function CandidateResults(t0) {
526
- const $ = _c(45);
511
+ const $ = _c(50);
527
512
  const {
528
513
  term,
529
514
  selectedPeople,
530
- onSelect
515
+ onSelect,
516
+ header
531
517
  } = t0;
532
518
  const styles = useStyles();
533
519
  const {
@@ -539,211 +525,235 @@ function CandidateResults(t0) {
539
525
  teams,
540
526
  resultsDescription
541
527
  } = useDirectMessageAffiliations();
542
- if (term.length < 1) {
543
- if (selectedPeople.size > 0) {
544
- return null;
545
- }
546
- let t1;
547
- if ($[0] !== styles.emptyStateIcon) {
548
- t1 = /*#__PURE__*/_jsx(Icon, {
549
- name: "churchCenter.people",
550
- size: 40,
551
- style: styles.emptyStateIcon
552
- });
553
- $[0] = styles.emptyStateIcon;
554
- $[1] = t1;
555
- } else {
556
- t1 = $[1];
557
- }
558
- let t2;
559
- if ($[2] !== styles.emptyStateTitle) {
560
- t2 = /*#__PURE__*/_jsx(Text, {
561
- style: styles.emptyStateTitle,
562
- children: "Search for people to direct message"
563
- });
564
- $[2] = styles.emptyStateTitle;
565
- $[3] = t2;
566
- } else {
567
- t2 = $[3];
568
- }
569
- let t3;
570
- if ($[4] !== styles.emptyStateSubtitle) {
571
- t3 = /*#__PURE__*/_jsx(Text, {
572
- variant: "secondary",
573
- style: styles.emptyStateSubtitle,
574
- children: "Start a conversation with people in your groups and teams."
575
- });
576
- $[4] = styles.emptyStateSubtitle;
577
- $[5] = t3;
578
- } else {
579
- t3 = $[5];
580
- }
581
- let t4;
582
- if ($[6] !== styles.emptyState || $[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
583
- t4 = /*#__PURE__*/_jsxs(View, {
584
- style: styles.emptyState,
585
- children: [t1, t2, t3]
586
- });
587
- $[6] = styles.emptyState;
588
- $[7] = t1;
589
- $[8] = t2;
590
- $[9] = t3;
591
- $[10] = t4;
592
- } else {
593
- t4 = $[10];
594
- }
595
- return t4;
596
- }
597
- const isAtLimit = selectedPeople.size >= MAX_RECIPIENTS;
598
- if (isAtLimit) {
599
- let t1;
600
- if ($[11] !== styles.emptyStateSubtitle) {
601
- t1 = /*#__PURE__*/_jsxs(Text, {
602
- variant: "secondary",
603
- style: styles.emptyStateSubtitle,
604
- children: ["You can add up to ", MAX_RECIPIENTS, " people to a direct message."]
605
- });
606
- $[11] = styles.emptyStateSubtitle;
607
- $[12] = t1;
608
- } else {
609
- t1 = $[12];
610
- }
611
- let t2;
612
- if ($[13] !== styles.emptyState || $[14] !== t1) {
613
- t2 = /*#__PURE__*/_jsx(View, {
614
- style: styles.emptyState,
615
- children: t1
616
- });
617
- $[13] = styles.emptyState;
618
- $[14] = t1;
619
- $[15] = t2;
620
- } else {
621
- t2 = $[15];
622
- }
623
- return t2;
624
- }
625
528
  let t1;
626
- if ($[16] !== data?.data) {
529
+ if ($[0] !== data?.data) {
627
530
  t1 = data?.data ?? [];
628
- $[16] = data?.data;
629
- $[17] = t1;
531
+ $[0] = data?.data;
532
+ $[1] = t1;
630
533
  } else {
631
- t1 = $[17];
534
+ t1 = $[1];
632
535
  }
633
536
  let t2;
634
- if ($[18] !== selectedPeople || $[19] !== t1) {
537
+ if ($[2] !== selectedPeople || $[3] !== t1) {
635
538
  let t3;
636
- if ($[21] !== selectedPeople) {
539
+ if ($[5] !== selectedPeople) {
637
540
  t3 = c => !selectedPeople.has(c.id);
638
- $[21] = selectedPeople;
639
- $[22] = t3;
541
+ $[5] = selectedPeople;
542
+ $[6] = t3;
640
543
  } else {
641
- t3 = $[22];
544
+ t3 = $[6];
642
545
  }
643
546
  t2 = t1.filter(t3);
644
- $[18] = selectedPeople;
645
- $[19] = t1;
646
- $[20] = t2;
547
+ $[2] = selectedPeople;
548
+ $[3] = t1;
549
+ $[4] = t2;
647
550
  } else {
648
- t2 = $[20];
551
+ t2 = $[4];
649
552
  }
650
553
  const unselectedCandidates = t2;
651
554
  const hasTruncated = (data?.meta.totalCount ?? 0) > (data?.data.length ?? 0);
652
- if (isFetching && unselectedCandidates.length === 0) {
653
- let t3;
654
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
655
- t3 = /*#__PURE__*/_jsx(Spinner, {});
656
- $[23] = t3;
657
- } else {
658
- t3 = $[23];
555
+ const isAtLimit = selectedPeople.size >= MAX_RECIPIENTS;
556
+ const showsResults = term.length >= 1 && !isAtLimit && unselectedCandidates.length > 0;
557
+ let t3;
558
+ bb0: {
559
+ if (showsResults) {
560
+ t3 = null;
561
+ break bb0;
659
562
  }
660
- let t4;
661
- if ($[24] !== styles.emptyState) {
662
- t4 = /*#__PURE__*/_jsx(View, {
663
- style: styles.emptyState,
664
- children: t3
665
- });
666
- $[24] = styles.emptyState;
667
- $[25] = t4;
668
- } else {
669
- t4 = $[25];
563
+ if (term.length < 1) {
564
+ if (selectedPeople.size > 0) {
565
+ t3 = null;
566
+ break bb0;
567
+ }
568
+ let t4;
569
+ if ($[7] !== styles.emptyStateIcon) {
570
+ t4 = /*#__PURE__*/_jsx(Icon, {
571
+ name: "churchCenter.people",
572
+ size: 40,
573
+ style: styles.emptyStateIcon
574
+ });
575
+ $[7] = styles.emptyStateIcon;
576
+ $[8] = t4;
577
+ } else {
578
+ t4 = $[8];
579
+ }
580
+ let t5;
581
+ if ($[9] !== styles.emptyStateTitle) {
582
+ t5 = /*#__PURE__*/_jsx(Text, {
583
+ style: styles.emptyStateTitle,
584
+ children: "Search for people to direct message"
585
+ });
586
+ $[9] = styles.emptyStateTitle;
587
+ $[10] = t5;
588
+ } else {
589
+ t5 = $[10];
590
+ }
591
+ let t6;
592
+ if ($[11] !== styles.emptyStateSubtitle) {
593
+ t6 = /*#__PURE__*/_jsx(Text, {
594
+ variant: "secondary",
595
+ style: styles.emptyStateSubtitle,
596
+ children: "Start a conversation with people in your groups and teams."
597
+ });
598
+ $[11] = styles.emptyStateSubtitle;
599
+ $[12] = t6;
600
+ } else {
601
+ t6 = $[12];
602
+ }
603
+ let t7;
604
+ if ($[13] !== styles.emptyState || $[14] !== t4 || $[15] !== t5 || $[16] !== t6) {
605
+ t7 = /*#__PURE__*/_jsxs(View, {
606
+ style: styles.emptyState,
607
+ children: [t4, t5, t6]
608
+ });
609
+ $[13] = styles.emptyState;
610
+ $[14] = t4;
611
+ $[15] = t5;
612
+ $[16] = t6;
613
+ $[17] = t7;
614
+ } else {
615
+ t7 = $[17];
616
+ }
617
+ t3 = t7;
618
+ break bb0;
670
619
  }
671
- return t4;
672
- }
673
- if (!isFetching && unselectedCandidates.length === 0) {
674
- let t3;
620
+ if (isAtLimit) {
621
+ let t4;
622
+ if ($[18] !== styles.emptyStateSubtitle) {
623
+ t4 = /*#__PURE__*/_jsxs(Text, {
624
+ variant: "secondary",
625
+ style: styles.emptyStateSubtitle,
626
+ children: ["You can add up to ", MAX_RECIPIENTS, " people to a direct message."]
627
+ });
628
+ $[18] = styles.emptyStateSubtitle;
629
+ $[19] = t4;
630
+ } else {
631
+ t4 = $[19];
632
+ }
633
+ let t5;
634
+ if ($[20] !== styles.emptyState || $[21] !== t4) {
635
+ t5 = /*#__PURE__*/_jsx(View, {
636
+ style: styles.emptyState,
637
+ children: t4
638
+ });
639
+ $[20] = styles.emptyState;
640
+ $[21] = t4;
641
+ $[22] = t5;
642
+ } else {
643
+ t5 = $[22];
644
+ }
645
+ t3 = t5;
646
+ break bb0;
647
+ }
648
+ if (isFetching) {
649
+ let t4;
650
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
651
+ t4 = /*#__PURE__*/_jsx(Spinner, {});
652
+ $[23] = t4;
653
+ } else {
654
+ t4 = $[23];
655
+ }
656
+ let t5;
657
+ if ($[24] !== styles.emptyState) {
658
+ t5 = /*#__PURE__*/_jsx(View, {
659
+ style: styles.emptyState,
660
+ children: t4
661
+ });
662
+ $[24] = styles.emptyState;
663
+ $[25] = t5;
664
+ } else {
665
+ t5 = $[25];
666
+ }
667
+ t3 = t5;
668
+ break bb0;
669
+ }
670
+ let t4;
675
671
  if ($[26] !== styles.emptyStateIcon) {
676
- t3 = /*#__PURE__*/_jsx(Icon, {
672
+ t4 = /*#__PURE__*/_jsx(Icon, {
677
673
  name: "general.search",
678
674
  size: 32,
679
675
  style: styles.emptyStateIcon
680
676
  });
681
677
  $[26] = styles.emptyStateIcon;
682
- $[27] = t3;
678
+ $[27] = t4;
683
679
  } else {
684
- t3 = $[27];
680
+ t4 = $[27];
685
681
  }
686
- let t4;
682
+ let t5;
687
683
  if ($[28] !== styles.emptyStateTitle || $[29] !== term) {
688
- t4 = /*#__PURE__*/_jsxs(Text, {
684
+ t5 = /*#__PURE__*/_jsxs(Text, {
689
685
  style: styles.emptyStateTitle,
690
686
  children: ["No matches for \"", term, "\""]
691
687
  });
692
688
  $[28] = styles.emptyStateTitle;
693
689
  $[29] = term;
694
- $[30] = t4;
690
+ $[30] = t5;
695
691
  } else {
696
- t4 = $[30];
692
+ t5 = $[30];
697
693
  }
698
- let t5;
694
+ let t6;
699
695
  if ($[31] !== styles.emptyStateSubtitle) {
700
- t5 = /*#__PURE__*/_jsx(Text, {
696
+ t6 = /*#__PURE__*/_jsx(Text, {
701
697
  variant: "secondary",
702
698
  style: styles.emptyStateSubtitle,
703
699
  children: "Try a different name, or check that you share a group or team with them."
704
700
  });
705
701
  $[31] = styles.emptyStateSubtitle;
706
- $[32] = t5;
702
+ $[32] = t6;
707
703
  } else {
708
- t5 = $[32];
704
+ t6 = $[32];
709
705
  }
710
- let t6;
711
- if ($[33] !== styles.emptyState || $[34] !== t3 || $[35] !== t4 || $[36] !== t5) {
712
- t6 = /*#__PURE__*/_jsxs(View, {
706
+ let t7;
707
+ if ($[33] !== styles.emptyState || $[34] !== t4 || $[35] !== t5 || $[36] !== t6) {
708
+ t7 = /*#__PURE__*/_jsxs(View, {
713
709
  style: styles.emptyState,
714
- children: [t3, t4, t5]
710
+ children: [t4, t5, t6]
715
711
  });
716
712
  $[33] = styles.emptyState;
717
- $[34] = t3;
718
- $[35] = t4;
719
- $[36] = t5;
720
- $[37] = t6;
713
+ $[34] = t4;
714
+ $[35] = t5;
715
+ $[36] = t6;
716
+ $[37] = t7;
721
717
  } else {
722
- t6 = $[37];
718
+ t7 = $[37];
723
719
  }
724
- return t6;
720
+ t3 = t7;
725
721
  }
726
- let t3;
727
- if ($[38] !== groups || $[39] !== hasTruncated || $[40] !== onSelect || $[41] !== resultsDescription || $[42] !== teams || $[43] !== unselectedCandidates) {
728
- t3 = /*#__PURE__*/_jsx(CandidateList, {
729
- candidates: unselectedCandidates,
722
+ const emptyState = t3;
723
+ let t4;
724
+ if ($[38] !== showsResults || $[39] !== unselectedCandidates) {
725
+ t4 = showsResults ? unselectedCandidates : [];
726
+ $[38] = showsResults;
727
+ $[39] = unselectedCandidates;
728
+ $[40] = t4;
729
+ } else {
730
+ t4 = $[40];
731
+ }
732
+ let t5;
733
+ if ($[41] !== emptyState || $[42] !== groups || $[43] !== hasTruncated || $[44] !== header || $[45] !== onSelect || $[46] !== resultsDescription || $[47] !== t4 || $[48] !== teams) {
734
+ t5 = /*#__PURE__*/_jsx(CandidateList, {
735
+ header: header,
736
+ candidates: t4,
730
737
  hasTruncated: hasTruncated,
731
738
  description: resultsDescription,
739
+ emptyState: emptyState,
732
740
  groups: groups,
733
741
  teams: teams,
734
742
  onSelect: onSelect
735
743
  });
736
- $[38] = groups;
737
- $[39] = hasTruncated;
738
- $[40] = onSelect;
739
- $[41] = resultsDescription;
740
- $[42] = teams;
741
- $[43] = unselectedCandidates;
742
- $[44] = t3;
744
+ $[41] = emptyState;
745
+ $[42] = groups;
746
+ $[43] = hasTruncated;
747
+ $[44] = header;
748
+ $[45] = onSelect;
749
+ $[46] = resultsDescription;
750
+ $[47] = t4;
751
+ $[48] = teams;
752
+ $[49] = t5;
743
753
  } else {
744
- t3 = $[44];
754
+ t5 = $[49];
745
755
  }
746
- return t3;
756
+ return t5;
747
757
  }
748
758
  function candidateBadges(candidate) {
749
759
  const badges = [];
@@ -765,16 +775,19 @@ function candidateAffiliationNames(candidate, groups, teams) {
765
775
  })];
766
776
  }
767
777
  function CandidateList(t0) {
768
- const $ = _c(36);
778
+ const $ = _c(48);
769
779
  const {
780
+ header,
770
781
  candidates,
771
782
  hasTruncated,
772
783
  description,
784
+ emptyState,
773
785
  groups,
774
786
  teams,
775
787
  onSelect
776
788
  } = t0;
777
789
  const styles = useStyles();
790
+ const hasCandidates = candidates.length > 0;
778
791
  let t1;
779
792
  if ($[0] !== candidates) {
780
793
  t1 = candidates.filter(_temp2);
@@ -791,17 +804,20 @@ function CandidateList(t0) {
791
804
  let t5;
792
805
  let t6;
793
806
  let t7;
794
- if ($[2] !== available || $[3] !== candidates || $[4] !== description || $[5] !== groups || $[6] !== onSelect || $[7] !== styles || $[8] !== teams) {
807
+ let t8;
808
+ let t9;
809
+ if ($[2] !== available || $[3] !== candidates || $[4] !== description || $[5] !== emptyState || $[6] !== groups || $[7] !== hasCandidates || $[8] !== header || $[9] !== onSelect || $[10] !== styles || $[11] !== teams) {
795
810
  const dmDisabled = candidates.filter(_temp3);
796
811
  T0 = FlatList;
797
812
  t3 = available;
798
- t4 = "handled";
799
- t5 = _temp4;
800
- if ($[16] !== groups || $[17] !== onSelect || $[18] !== teams) {
801
- t6 = t8 => {
813
+ t4 = "automatic";
814
+ t5 = "handled";
815
+ t6 = _temp4;
816
+ if ($[21] !== groups || $[22] !== onSelect || $[23] !== teams) {
817
+ t7 = t10 => {
802
818
  const {
803
819
  item: item_0
804
- } = t8;
820
+ } = t10;
805
821
  return /*#__PURE__*/_jsx(CandidateItem, {
806
822
  candidate: item_0,
807
823
  badges: candidateBadges(item_0),
@@ -809,22 +825,35 @@ function CandidateList(t0) {
809
825
  onSelect: () => onSelect(item_0)
810
826
  });
811
827
  };
812
- $[16] = groups;
813
- $[17] = onSelect;
814
- $[18] = teams;
815
- $[19] = t6;
828
+ $[21] = groups;
829
+ $[22] = onSelect;
830
+ $[23] = teams;
831
+ $[24] = t7;
816
832
  } else {
817
- t6 = $[19];
833
+ t7 = $[24];
818
834
  }
819
- if ($[20] !== description) {
820
- t7 = /*#__PURE__*/_jsx(ResultsHeading, {
835
+ let t10;
836
+ if ($[25] !== description || $[26] !== hasCandidates) {
837
+ t10 = hasCandidates && /*#__PURE__*/_jsx(ResultsHeading, {
821
838
  description: description
822
839
  });
823
- $[20] = description;
824
- $[21] = t7;
840
+ $[25] = description;
841
+ $[26] = hasCandidates;
842
+ $[27] = t10;
843
+ } else {
844
+ t10 = $[27];
845
+ }
846
+ if ($[28] !== header || $[29] !== t10) {
847
+ t8 = /*#__PURE__*/_jsxs(_Fragment, {
848
+ children: [header, t10]
849
+ });
850
+ $[28] = header;
851
+ $[29] = t10;
852
+ $[30] = t8;
825
853
  } else {
826
- t7 = $[21];
854
+ t8 = $[30];
827
855
  }
856
+ t9 = emptyState;
828
857
  t2 = dmDisabled.length > 0 && /*#__PURE__*/_jsxs(_Fragment, {
829
858
  children: [/*#__PURE__*/_jsx(View, {
830
859
  style: styles.unavailableHeader,
@@ -843,29 +872,36 @@ function CandidateList(t0) {
843
872
  $[2] = available;
844
873
  $[3] = candidates;
845
874
  $[4] = description;
846
- $[5] = groups;
847
- $[6] = onSelect;
848
- $[7] = styles;
849
- $[8] = teams;
850
- $[9] = T0;
851
- $[10] = t2;
852
- $[11] = t3;
853
- $[12] = t4;
854
- $[13] = t5;
855
- $[14] = t6;
856
- $[15] = t7;
875
+ $[5] = emptyState;
876
+ $[6] = groups;
877
+ $[7] = hasCandidates;
878
+ $[8] = header;
879
+ $[9] = onSelect;
880
+ $[10] = styles;
881
+ $[11] = teams;
882
+ $[12] = T0;
883
+ $[13] = t2;
884
+ $[14] = t3;
885
+ $[15] = t4;
886
+ $[16] = t5;
887
+ $[17] = t6;
888
+ $[18] = t7;
889
+ $[19] = t8;
890
+ $[20] = t9;
857
891
  } else {
858
- T0 = $[9];
859
- t2 = $[10];
860
- t3 = $[11];
861
- t4 = $[12];
862
- t5 = $[13];
863
- t6 = $[14];
864
- t7 = $[15];
892
+ T0 = $[12];
893
+ t2 = $[13];
894
+ t3 = $[14];
895
+ t4 = $[15];
896
+ t5 = $[16];
897
+ t6 = $[17];
898
+ t7 = $[18];
899
+ t8 = $[19];
900
+ t9 = $[20];
865
901
  }
866
- let t8;
867
- if ($[22] !== hasTruncated || $[23] !== styles) {
868
- t8 = hasTruncated && /*#__PURE__*/_jsx(View, {
902
+ let t10;
903
+ if ($[31] !== hasCandidates || $[32] !== hasTruncated || $[33] !== styles) {
904
+ t10 = hasCandidates && hasTruncated && /*#__PURE__*/_jsx(View, {
869
905
  style: styles.truncatedFooter,
870
906
  children: /*#__PURE__*/_jsx(Text, {
871
907
  variant: "secondary",
@@ -873,45 +909,50 @@ function CandidateList(t0) {
873
909
  children: "Keep typing to narrow your results."
874
910
  })
875
911
  });
876
- $[22] = hasTruncated;
877
- $[23] = styles;
878
- $[24] = t8;
912
+ $[31] = hasCandidates;
913
+ $[32] = hasTruncated;
914
+ $[33] = styles;
915
+ $[34] = t10;
879
916
  } else {
880
- t8 = $[24];
917
+ t10 = $[34];
881
918
  }
882
- let t9;
883
- if ($[25] !== t2 || $[26] !== t8) {
884
- t9 = /*#__PURE__*/_jsxs(_Fragment, {
885
- children: [t2, t8]
919
+ let t11;
920
+ if ($[35] !== t10 || $[36] !== t2) {
921
+ t11 = /*#__PURE__*/_jsxs(_Fragment, {
922
+ children: [t2, t10]
886
923
  });
887
- $[25] = t2;
888
- $[26] = t8;
889
- $[27] = t9;
924
+ $[35] = t10;
925
+ $[36] = t2;
926
+ $[37] = t11;
890
927
  } else {
891
- t9 = $[27];
928
+ t11 = $[37];
892
929
  }
893
- let t10;
894
- if ($[28] !== T0 || $[29] !== t3 || $[30] !== t4 || $[31] !== t5 || $[32] !== t6 || $[33] !== t7 || $[34] !== t9) {
895
- t10 = /*#__PURE__*/_jsx(T0, {
930
+ let t12;
931
+ if ($[38] !== T0 || $[39] !== t11 || $[40] !== t3 || $[41] !== t4 || $[42] !== t5 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9) {
932
+ t12 = /*#__PURE__*/_jsx(T0, {
896
933
  data: t3,
897
- keyboardShouldPersistTaps: t4,
898
- keyExtractor: t5,
899
- renderItem: t6,
900
- ListHeaderComponent: t7,
901
- ListFooterComponent: t9
934
+ contentInsetAdjustmentBehavior: t4,
935
+ keyboardShouldPersistTaps: t5,
936
+ keyExtractor: t6,
937
+ renderItem: t7,
938
+ ListHeaderComponent: t8,
939
+ ListEmptyComponent: t9,
940
+ ListFooterComponent: t11
902
941
  });
903
- $[28] = T0;
904
- $[29] = t3;
905
- $[30] = t4;
906
- $[31] = t5;
907
- $[32] = t6;
908
- $[33] = t7;
909
- $[34] = t9;
910
- $[35] = t10;
942
+ $[38] = T0;
943
+ $[39] = t11;
944
+ $[40] = t3;
945
+ $[41] = t4;
946
+ $[42] = t5;
947
+ $[43] = t6;
948
+ $[44] = t7;
949
+ $[45] = t8;
950
+ $[46] = t9;
951
+ $[47] = t12;
911
952
  } else {
912
- t10 = $[35];
953
+ t12 = $[47];
913
954
  }
914
- return t10;
955
+ return t12;
915
956
  }
916
957
  function _temp4(item) {
917
958
  return item.id;