@planningcenter/chat-react-native 4.4.1-qa-staging.34 → 4.4.1-qa-1036.1

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 (86) 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/components/page/page_error_boundary.d.ts +1 -9
  11. package/build/components/page/page_error_boundary.d.ts.map +1 -1
  12. package/build/components/page/page_error_boundary.js +31 -56
  13. package/build/components/page/page_error_boundary.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/navigation/screenLayout.d.ts.map +1 -1
  18. package/build/navigation/screenLayout.js +6 -10
  19. package/build/navigation/screenLayout.js.map +1 -1
  20. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  21. package/build/screens/age_check/age_check_required_screen.js +0 -1
  22. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  23. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  24. package/build/screens/conversation_details_screen.js +0 -1
  25. package/build/screens/conversation_details_screen.js.map +1 -1
  26. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  27. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +0 -1
  28. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  29. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  30. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +291 -332
  31. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  32. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  33. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +0 -1
  34. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  35. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  36. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +0 -1
  37. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  38. package/build/screens/get_help_screen.js +62 -56
  39. package/build/screens/get_help_screen.js.map +1 -1
  40. package/build/screens/group_notification_settings_screen.js +2 -3
  41. package/build/screens/group_notification_settings_screen.js.map +1 -1
  42. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  43. package/build/screens/notification_settings_screen.js +0 -1
  44. package/build/screens/notification_settings_screen.js.map +1 -1
  45. package/build/screens/preferred_app_selection_screen.js +39 -45
  46. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  47. package/build/screens/search/components/search_results_list.d.ts +1 -4
  48. package/build/screens/search/components/search_results_list.d.ts.map +1 -1
  49. package/build/screens/search/components/search_results_list.js +110 -136
  50. package/build/screens/search/components/search_results_list.js.map +1 -1
  51. package/build/screens/search/search_screen.d.ts.map +1 -1
  52. package/build/screens/search/search_screen.js +28 -21
  53. package/build/screens/search/search_screen.js.map +1 -1
  54. package/build/screens/settings_screen.d.ts.map +1 -1
  55. package/build/screens/settings_screen.js +6 -7
  56. package/build/screens/settings_screen.js.map +1 -1
  57. package/package.json +3 -3
  58. package/src/components/conversation/__tests__/message_list.test.tsx +0 -4
  59. package/src/components/conversation/message_list.tsx +0 -6
  60. package/src/components/conversations/conversations.tsx +0 -1
  61. package/src/components/display/keyboard_scroll_view.tsx +0 -1
  62. package/src/components/page/__tests__/page_error_boundary.test.tsx +0 -33
  63. package/src/components/page/page_error_boundary.tsx +12 -43
  64. package/src/navigation/index.tsx +2 -11
  65. package/src/navigation/screenLayout.tsx +1 -3
  66. package/src/screens/age_check/age_check_required_screen.tsx +1 -5
  67. package/src/screens/conversation_details_screen.tsx +0 -1
  68. package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +1 -4
  69. package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +68 -78
  70. package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +0 -1
  71. package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +0 -1
  72. package/src/screens/get_help_screen.tsx +4 -4
  73. package/src/screens/group_notification_settings_screen.tsx +3 -3
  74. package/src/screens/notification_settings_screen.tsx +0 -1
  75. package/src/screens/preferred_app_selection_screen.tsx +4 -4
  76. package/src/screens/search/__tests__/search_screen.test.tsx +7 -5
  77. package/src/screens/search/components/__tests__/search_results_list.test.tsx +2 -6
  78. package/src/screens/search/components/search_results_list.tsx +13 -34
  79. package/src/screens/search/search_screen.tsx +18 -8
  80. package/src/screens/settings_screen.tsx +25 -25
  81. package/build/navigation/page_error_fallbacks.d.ts +0 -7
  82. package/build/navigation/page_error_fallbacks.d.ts.map +0 -1
  83. package/build/navigation/page_error_fallbacks.js +0 -7
  84. package/build/navigation/page_error_fallbacks.js.map +0 -1
  85. package/src/navigation/page_error_fallbacks.ts +0 -14
  86. package/src/screens/conversation_select_recipients/__tests__/conversation_select_direct_message_recipients_screen.test.tsx +0 -100
@@ -6,6 +6,7 @@ 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';
9
10
  import { useTheme } from '../../hooks';
10
11
  import { useDirectMessageAffiliations } from '../../hooks/direct_messages/use_direct_message_affiliations';
11
12
  import { useDirectMessageCandidates } from '../../hooks/direct_messages/use_direct_message_candidates';
@@ -14,10 +15,10 @@ import { useFindOrCreateDirectMessageConversation } from '../../hooks/direct_mes
14
15
  import { useDebouncedSearchTerm } from '../../hooks/use_debounced_search_term';
15
16
  import { availableFeatures, useFeatures } from '../../hooks/use_features';
16
17
  import { ResultsHeading } from './components/results_heading';
17
- 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";
18
19
  const MAX_RECIPIENTS = 9;
19
20
  export function ConversationSelectDirectMessageRecipientsScreen(t0) {
20
- const $ = _c(51);
21
+ const $ = _c(55);
21
22
  const {
22
23
  route
23
24
  } = t0;
@@ -204,85 +205,99 @@ export function ConversationSelectDirectMessageRecipientsScreen(t0) {
204
205
  t14 = $[27];
205
206
  }
206
207
  let t15;
207
- if ($[28] !== t12 || $[29] !== t14) {
208
- t15 = /*#__PURE__*/_jsxs(_Fragment, {
209
- 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
210
213
  });
211
- $[28] = t12;
212
- $[29] = t14;
213
- $[30] = t15;
214
+ $[28] = styles.errorBanner;
215
+ $[29] = t15;
214
216
  } else {
215
- t15 = $[30];
217
+ t15 = $[29];
216
218
  }
217
219
  let t16;
218
- if ($[31] !== debouncedTerm || $[32] !== selectPerson || $[33] !== selectedPeople || $[34] !== t15) {
220
+ if ($[30] !== debouncedTerm || $[31] !== selectPerson || $[32] !== selectedPeople) {
219
221
  t16 = /*#__PURE__*/_jsx(CandidateResults, {
220
222
  term: debouncedTerm,
221
223
  selectedPeople: selectedPeople,
222
- onSelect: selectPerson,
223
- header: t15
224
+ onSelect: selectPerson
224
225
  });
225
- $[31] = debouncedTerm;
226
- $[32] = selectPerson;
227
- $[33] = selectedPeople;
228
- $[34] = t15;
229
- $[35] = t16;
226
+ $[30] = debouncedTerm;
227
+ $[31] = selectPerson;
228
+ $[32] = selectedPeople;
229
+ $[33] = t16;
230
230
  } else {
231
- t16 = $[35];
231
+ t16 = $[33];
232
232
  }
233
233
  let t17;
234
- if ($[36] !== styles.candidateResultsContainer || $[37] !== t16) {
235
- t17 = /*#__PURE__*/_jsx(View, {
236
- style: styles.candidateResultsContainer,
234
+ if ($[34] !== debouncedTerm || $[35] !== t15 || $[36] !== t16) {
235
+ t17 = /*#__PURE__*/_jsx(ComponentErrorBoundary, {
236
+ fallback: t15,
237
237
  children: t16
238
- });
239
- $[36] = styles.candidateResultsContainer;
240
- $[37] = t16;
241
- $[38] = t17;
238
+ }, debouncedTerm);
239
+ $[34] = debouncedTerm;
240
+ $[35] = t15;
241
+ $[36] = t16;
242
+ $[37] = t17;
242
243
  } else {
243
- t17 = $[38];
244
+ t17 = $[37];
244
245
  }
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;
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;
253
255
  } else {
254
- t20 = $[41];
256
+ t18 = $[40];
255
257
  }
258
+ const t19 = selectedPeople.size === 0 || validationPending || warnings.length > 0 || isFinding;
259
+ const t20 = validationPending || isFinding;
256
260
  let t21;
257
- if ($[42] !== buttonText || $[43] !== t18 || $[44] !== t19 || $[45] !== t20 || $[46] !== warnings) {
258
- 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, {
259
272
  title: buttonText,
260
- disabled: t18,
261
- loading: t19,
262
- onPress: t20,
273
+ disabled: t19,
274
+ loading: t20,
275
+ onPress: t21,
263
276
  warnings: warnings
264
277
  });
265
- $[42] = buttonText;
266
- $[43] = t18;
267
- $[44] = t19;
268
- $[45] = t20;
269
- $[46] = warnings;
278
+ $[44] = buttonText;
279
+ $[45] = t19;
280
+ $[46] = t20;
270
281
  $[47] = t21;
282
+ $[48] = warnings;
283
+ $[49] = t22;
271
284
  } else {
272
- t21 = $[47];
285
+ t22 = $[49];
273
286
  }
274
- let t22;
275
- if ($[48] !== t17 || $[49] !== t21) {
276
- t22 = /*#__PURE__*/_jsxs(KeyboardView, {
277
- 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]
278
291
  });
279
- $[48] = t17;
280
- $[49] = t21;
281
- $[50] = t22;
292
+ $[50] = t12;
293
+ $[51] = t14;
294
+ $[52] = t18;
295
+ $[53] = t22;
296
+ $[54] = t23;
282
297
  } else {
283
- t22 = $[50];
298
+ t23 = $[54];
284
299
  }
285
- return t22;
300
+ return t23;
286
301
  }
287
302
  function _temp(person) {
288
303
  return [person.id, {
@@ -508,12 +523,11 @@ function PersonChip(t0) {
508
523
  return t8;
509
524
  }
510
525
  function CandidateResults(t0) {
511
- const $ = _c(50);
526
+ const $ = _c(45);
512
527
  const {
513
528
  term,
514
529
  selectedPeople,
515
- onSelect,
516
- header
530
+ onSelect
517
531
  } = t0;
518
532
  const styles = useStyles();
519
533
  const {
@@ -525,235 +539,211 @@ function CandidateResults(t0) {
525
539
  teams,
526
540
  resultsDescription
527
541
  } = 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
+ }
528
625
  let t1;
529
- if ($[0] !== data?.data) {
626
+ if ($[16] !== data?.data) {
530
627
  t1 = data?.data ?? [];
531
- $[0] = data?.data;
532
- $[1] = t1;
628
+ $[16] = data?.data;
629
+ $[17] = t1;
533
630
  } else {
534
- t1 = $[1];
631
+ t1 = $[17];
535
632
  }
536
633
  let t2;
537
- if ($[2] !== selectedPeople || $[3] !== t1) {
634
+ if ($[18] !== selectedPeople || $[19] !== t1) {
538
635
  let t3;
539
- if ($[5] !== selectedPeople) {
636
+ if ($[21] !== selectedPeople) {
540
637
  t3 = c => !selectedPeople.has(c.id);
541
- $[5] = selectedPeople;
542
- $[6] = t3;
638
+ $[21] = selectedPeople;
639
+ $[22] = t3;
543
640
  } else {
544
- t3 = $[6];
641
+ t3 = $[22];
545
642
  }
546
643
  t2 = t1.filter(t3);
547
- $[2] = selectedPeople;
548
- $[3] = t1;
549
- $[4] = t2;
644
+ $[18] = selectedPeople;
645
+ $[19] = t1;
646
+ $[20] = t2;
550
647
  } else {
551
- t2 = $[4];
648
+ t2 = $[20];
552
649
  }
553
650
  const unselectedCandidates = t2;
554
651
  const hasTruncated = (data?.meta.totalCount ?? 0) > (data?.data.length ?? 0);
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;
562
- }
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;
619
- }
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;
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];
669
659
  }
670
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];
670
+ }
671
+ return t4;
672
+ }
673
+ if (!isFetching && unselectedCandidates.length === 0) {
674
+ let t3;
671
675
  if ($[26] !== styles.emptyStateIcon) {
672
- t4 = /*#__PURE__*/_jsx(Icon, {
676
+ t3 = /*#__PURE__*/_jsx(Icon, {
673
677
  name: "general.search",
674
678
  size: 32,
675
679
  style: styles.emptyStateIcon
676
680
  });
677
681
  $[26] = styles.emptyStateIcon;
678
- $[27] = t4;
682
+ $[27] = t3;
679
683
  } else {
680
- t4 = $[27];
684
+ t3 = $[27];
681
685
  }
682
- let t5;
686
+ let t4;
683
687
  if ($[28] !== styles.emptyStateTitle || $[29] !== term) {
684
- t5 = /*#__PURE__*/_jsxs(Text, {
688
+ t4 = /*#__PURE__*/_jsxs(Text, {
685
689
  style: styles.emptyStateTitle,
686
690
  children: ["No matches for \"", term, "\""]
687
691
  });
688
692
  $[28] = styles.emptyStateTitle;
689
693
  $[29] = term;
690
- $[30] = t5;
694
+ $[30] = t4;
691
695
  } else {
692
- t5 = $[30];
696
+ t4 = $[30];
693
697
  }
694
- let t6;
698
+ let t5;
695
699
  if ($[31] !== styles.emptyStateSubtitle) {
696
- t6 = /*#__PURE__*/_jsx(Text, {
700
+ t5 = /*#__PURE__*/_jsx(Text, {
697
701
  variant: "secondary",
698
702
  style: styles.emptyStateSubtitle,
699
703
  children: "Try a different name, or check that you share a group or team with them."
700
704
  });
701
705
  $[31] = styles.emptyStateSubtitle;
702
- $[32] = t6;
706
+ $[32] = t5;
703
707
  } else {
704
- t6 = $[32];
708
+ t5 = $[32];
705
709
  }
706
- let t7;
707
- if ($[33] !== styles.emptyState || $[34] !== t4 || $[35] !== t5 || $[36] !== t6) {
708
- t7 = /*#__PURE__*/_jsxs(View, {
710
+ let t6;
711
+ if ($[33] !== styles.emptyState || $[34] !== t3 || $[35] !== t4 || $[36] !== t5) {
712
+ t6 = /*#__PURE__*/_jsxs(View, {
709
713
  style: styles.emptyState,
710
- children: [t4, t5, t6]
714
+ children: [t3, t4, t5]
711
715
  });
712
716
  $[33] = styles.emptyState;
713
- $[34] = t4;
714
- $[35] = t5;
715
- $[36] = t6;
716
- $[37] = t7;
717
+ $[34] = t3;
718
+ $[35] = t4;
719
+ $[36] = t5;
720
+ $[37] = t6;
717
721
  } else {
718
- t7 = $[37];
722
+ t6 = $[37];
719
723
  }
720
- t3 = t7;
721
- }
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];
724
+ return t6;
731
725
  }
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,
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,
737
730
  hasTruncated: hasTruncated,
738
731
  description: resultsDescription,
739
- emptyState: emptyState,
740
732
  groups: groups,
741
733
  teams: teams,
742
734
  onSelect: onSelect
743
735
  });
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;
736
+ $[38] = groups;
737
+ $[39] = hasTruncated;
738
+ $[40] = onSelect;
739
+ $[41] = resultsDescription;
740
+ $[42] = teams;
741
+ $[43] = unselectedCandidates;
742
+ $[44] = t3;
753
743
  } else {
754
- t5 = $[49];
744
+ t3 = $[44];
755
745
  }
756
- return t5;
746
+ return t3;
757
747
  }
758
748
  function candidateBadges(candidate) {
759
749
  const badges = [];
@@ -775,19 +765,16 @@ function candidateAffiliationNames(candidate, groups, teams) {
775
765
  })];
776
766
  }
777
767
  function CandidateList(t0) {
778
- const $ = _c(48);
768
+ const $ = _c(36);
779
769
  const {
780
- header,
781
770
  candidates,
782
771
  hasTruncated,
783
772
  description,
784
- emptyState,
785
773
  groups,
786
774
  teams,
787
775
  onSelect
788
776
  } = t0;
789
777
  const styles = useStyles();
790
- const hasCandidates = candidates.length > 0;
791
778
  let t1;
792
779
  if ($[0] !== candidates) {
793
780
  t1 = candidates.filter(_temp2);
@@ -804,20 +791,17 @@ function CandidateList(t0) {
804
791
  let t5;
805
792
  let t6;
806
793
  let t7;
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) {
794
+ if ($[2] !== available || $[3] !== candidates || $[4] !== description || $[5] !== groups || $[6] !== onSelect || $[7] !== styles || $[8] !== teams) {
810
795
  const dmDisabled = candidates.filter(_temp3);
811
796
  T0 = FlatList;
812
797
  t3 = available;
813
- t4 = "automatic";
814
- t5 = "handled";
815
- t6 = _temp4;
816
- if ($[21] !== groups || $[22] !== onSelect || $[23] !== teams) {
817
- t7 = t10 => {
798
+ t4 = "handled";
799
+ t5 = _temp4;
800
+ if ($[16] !== groups || $[17] !== onSelect || $[18] !== teams) {
801
+ t6 = t8 => {
818
802
  const {
819
803
  item: item_0
820
- } = t10;
804
+ } = t8;
821
805
  return /*#__PURE__*/_jsx(CandidateItem, {
822
806
  candidate: item_0,
823
807
  badges: candidateBadges(item_0),
@@ -825,35 +809,22 @@ function CandidateList(t0) {
825
809
  onSelect: () => onSelect(item_0)
826
810
  });
827
811
  };
828
- $[21] = groups;
829
- $[22] = onSelect;
830
- $[23] = teams;
831
- $[24] = t7;
812
+ $[16] = groups;
813
+ $[17] = onSelect;
814
+ $[18] = teams;
815
+ $[19] = t6;
832
816
  } else {
833
- t7 = $[24];
817
+ t6 = $[19];
834
818
  }
835
- let t10;
836
- if ($[25] !== description || $[26] !== hasCandidates) {
837
- t10 = hasCandidates && /*#__PURE__*/_jsx(ResultsHeading, {
819
+ if ($[20] !== description) {
820
+ t7 = /*#__PURE__*/_jsx(ResultsHeading, {
838
821
  description: description
839
822
  });
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;
823
+ $[20] = description;
824
+ $[21] = t7;
853
825
  } else {
854
- t8 = $[30];
826
+ t7 = $[21];
855
827
  }
856
- t9 = emptyState;
857
828
  t2 = dmDisabled.length > 0 && /*#__PURE__*/_jsxs(_Fragment, {
858
829
  children: [/*#__PURE__*/_jsx(View, {
859
830
  style: styles.unavailableHeader,
@@ -872,36 +843,29 @@ function CandidateList(t0) {
872
843
  $[2] = available;
873
844
  $[3] = candidates;
874
845
  $[4] = description;
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;
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;
891
857
  } else {
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];
858
+ T0 = $[9];
859
+ t2 = $[10];
860
+ t3 = $[11];
861
+ t4 = $[12];
862
+ t5 = $[13];
863
+ t6 = $[14];
864
+ t7 = $[15];
901
865
  }
902
- let t10;
903
- if ($[31] !== hasCandidates || $[32] !== hasTruncated || $[33] !== styles) {
904
- t10 = hasCandidates && hasTruncated && /*#__PURE__*/_jsx(View, {
866
+ let t8;
867
+ if ($[22] !== hasTruncated || $[23] !== styles) {
868
+ t8 = hasTruncated && /*#__PURE__*/_jsx(View, {
905
869
  style: styles.truncatedFooter,
906
870
  children: /*#__PURE__*/_jsx(Text, {
907
871
  variant: "secondary",
@@ -909,50 +873,45 @@ function CandidateList(t0) {
909
873
  children: "Keep typing to narrow your results."
910
874
  })
911
875
  });
912
- $[31] = hasCandidates;
913
- $[32] = hasTruncated;
914
- $[33] = styles;
915
- $[34] = t10;
876
+ $[22] = hasTruncated;
877
+ $[23] = styles;
878
+ $[24] = t8;
916
879
  } else {
917
- t10 = $[34];
880
+ t8 = $[24];
918
881
  }
919
- let t11;
920
- if ($[35] !== t10 || $[36] !== t2) {
921
- t11 = /*#__PURE__*/_jsxs(_Fragment, {
922
- children: [t2, t10]
882
+ let t9;
883
+ if ($[25] !== t2 || $[26] !== t8) {
884
+ t9 = /*#__PURE__*/_jsxs(_Fragment, {
885
+ children: [t2, t8]
923
886
  });
924
- $[35] = t10;
925
- $[36] = t2;
926
- $[37] = t11;
887
+ $[25] = t2;
888
+ $[26] = t8;
889
+ $[27] = t9;
927
890
  } else {
928
- t11 = $[37];
891
+ t9 = $[27];
929
892
  }
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, {
893
+ let t10;
894
+ if ($[28] !== T0 || $[29] !== t3 || $[30] !== t4 || $[31] !== t5 || $[32] !== t6 || $[33] !== t7 || $[34] !== t9) {
895
+ t10 = /*#__PURE__*/_jsx(T0, {
933
896
  data: t3,
934
- contentInsetAdjustmentBehavior: t4,
935
- keyboardShouldPersistTaps: t5,
936
- keyExtractor: t6,
937
- renderItem: t7,
938
- ListHeaderComponent: t8,
939
- ListEmptyComponent: t9,
940
- ListFooterComponent: t11
897
+ keyboardShouldPersistTaps: t4,
898
+ keyExtractor: t5,
899
+ renderItem: t6,
900
+ ListHeaderComponent: t7,
901
+ ListFooterComponent: t9
941
902
  });
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;
903
+ $[28] = T0;
904
+ $[29] = t3;
905
+ $[30] = t4;
906
+ $[31] = t5;
907
+ $[32] = t6;
908
+ $[33] = t7;
909
+ $[34] = t9;
910
+ $[35] = t10;
952
911
  } else {
953
- t12 = $[47];
912
+ t10 = $[35];
954
913
  }
955
- return t12;
914
+ return t10;
956
915
  }
957
916
  function _temp4(item) {
958
917
  return item.id;