@planningcenter/chat-react-native 4.4.1-qa-staging.31 → 4.4.1-qa-1036.0

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