@planningcenter/chat-react-native 3.9.3-rc.0 → 3.9.3-rc.2

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 (42) hide show
  1. package/build/components/display/switch.d.ts.map +1 -1
  2. package/build/components/display/switch.js +1 -4
  3. package/build/components/display/switch.js.map +1 -1
  4. package/build/components/primitive/form_sheet.d.ts +2 -2
  5. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  6. package/build/components/primitive/form_sheet.js +12 -7
  7. package/build/components/primitive/form_sheet.js.map +1 -1
  8. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  9. package/build/screens/attachment_actions/attachment_actions_screen.js +10 -2
  10. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  11. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  12. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +14 -9
  13. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  14. package/build/screens/conversations/components/chat_group_badge.d.ts +3 -1
  15. package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
  16. package/build/screens/conversations/components/chat_group_badge.js +4 -3
  17. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  18. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  19. package/build/screens/conversations/components/list_header_component.js +4 -8
  20. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  21. package/build/screens/message_actions_screen.d.ts.map +1 -1
  22. package/build/screens/message_actions_screen.js +6 -3
  23. package/build/screens/message_actions_screen.js.map +1 -1
  24. package/build/screens/reactions_screen.js +3 -3
  25. package/build/screens/reactions_screen.js.map +1 -1
  26. package/build/screens/send_giphy_screen.js +3 -3
  27. package/build/screens/send_giphy_screen.js.map +1 -1
  28. package/build/utils/theme.d.ts +0 -3
  29. package/build/utils/theme.d.ts.map +1 -1
  30. package/build/utils/theme.js +0 -6
  31. package/build/utils/theme.js.map +1 -1
  32. package/package.json +2 -2
  33. package/src/components/display/switch.tsx +1 -5
  34. package/src/components/primitive/form_sheet.tsx +18 -11
  35. package/src/screens/attachment_actions/attachment_actions_screen.tsx +11 -2
  36. package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +15 -9
  37. package/src/screens/conversations/components/chat_group_badge.tsx +4 -3
  38. package/src/screens/conversations/components/list_header_component.tsx +5 -8
  39. package/src/screens/message_actions_screen.tsx +6 -3
  40. package/src/screens/reactions_screen.tsx +3 -3
  41. package/src/screens/send_giphy_screen.tsx +3 -3
  42. package/src/utils/theme.ts +0 -15
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAO/C,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBA4BhE"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAO/C,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAwBhE"}
@@ -6,11 +6,8 @@ import { useTheme } from '../../hooks';
6
6
  // =================================
7
7
  export function Switch({ disabled, value, ...props }) {
8
8
  const { colors } = useTheme();
9
- // `switchThumbColor` is deprecated. Use `androidSwitchThumbColor` instead.
10
- // TODO: Remove `switchThumbColor` once CCA is updated to use `androidSwitchThumbColor`.
11
- const androidSwitchThumbColor = colors.androidSwitchThumbColor ?? colors.switchThumbColor;
12
9
  const platformThumbColor = Platform.select({
13
- android: value && !disabled ? androidSwitchThumbColor : colors.fillColorNeutral050Base,
10
+ android: value && !disabled ? colors.androidSwitchThumbColor : colors.fillColorNeutral050Base,
14
11
  ios: undefined,
15
12
  });
16
13
  const platformTrackColor = Platform.select({
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAe;IAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,2EAA2E;IAC3E,wFAAwF;IACxF,MAAM,uBAAuB,GAAG,MAAM,CAAC,uBAAuB,IAAI,MAAM,CAAC,gBAAgB,CAAA;IAEzF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;QACtF,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IACF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS;YACvD,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB;SAC1E;QACD,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,iBAAiB,CAChB,IAAI,KAAK,CAAC,CACV,UAAU,CAAC,CAAC,kBAAkB,CAAC,CAC/B,UAAU,CAAC,CAAC,kBAAkB,CAAC,CAC/B,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,QAAQ,CAAC,EACnB,CACH,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { Platform, Switch as ReactNativeSwitch } from 'react-native'\nimport type { SwitchProps } from 'react-native'\nimport { useTheme } from '../../hooks'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport function Switch({ disabled, value, ...props }: SwitchProps) {\n const { colors } = useTheme()\n\n // `switchThumbColor` is deprecated. Use `androidSwitchThumbColor` instead.\n // TODO: Remove `switchThumbColor` once CCA is updated to use `androidSwitchThumbColor`.\n const androidSwitchThumbColor = colors.androidSwitchThumbColor ?? colors.switchThumbColor\n\n const platformThumbColor = Platform.select({\n android: value && !disabled ? androidSwitchThumbColor : colors.fillColorNeutral050Base,\n ios: undefined,\n })\n const platformTrackColor = Platform.select({\n android: {\n true: disabled ? colors.fillColorNeutral060 : undefined,\n false: disabled ? colors.fillColorNeutral060 : colors.fillColorNeutral030,\n },\n ios: undefined,\n })\n\n return (\n <ReactNativeSwitch\n {...props}\n thumbColor={platformThumbColor}\n trackColor={platformTrackColor}\n value={value}\n disabled={disabled}\n />\n )\n}\n"]}
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/components/display/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAe;IAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;QAC7F,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IACF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS;YACvD,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB;SAC1E;QACD,GAAG,EAAE,SAAS;KACf,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,iBAAiB,CAChB,IAAI,KAAK,CAAC,CACV,UAAU,CAAC,CAAC,kBAAkB,CAAC,CAC/B,UAAU,CAAC,CAAC,kBAAkB,CAAC,CAC/B,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,QAAQ,CAAC,EACnB,CACH,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { Platform, Switch as ReactNativeSwitch } from 'react-native'\nimport type { SwitchProps } from 'react-native'\nimport { useTheme } from '../../hooks'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport function Switch({ disabled, value, ...props }: SwitchProps) {\n const { colors } = useTheme()\n\n const platformThumbColor = Platform.select({\n android: value && !disabled ? colors.androidSwitchThumbColor : colors.fillColorNeutral050Base,\n ios: undefined,\n })\n const platformTrackColor = Platform.select({\n android: {\n true: disabled ? colors.fillColorNeutral060 : undefined,\n false: disabled ? colors.fillColorNeutral060 : colors.fillColorNeutral030,\n },\n ios: undefined,\n })\n\n return (\n <ReactNativeSwitch\n {...props}\n thumbColor={platformThumbColor}\n trackColor={platformTrackColor}\n value={value}\n disabled={disabled}\n />\n )\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  import { NativeStackNavigationOptions } from '@react-navigation/native-stack';
2
2
  import React, { ReactNode } from 'react';
3
3
  import { type AccessibilityRole, type StyleProp, type ViewStyle } from 'react-native';
4
- import { IconString } from '../display';
5
4
  import type { ButtonProps, TextButtonProps } from '../display';
5
+ import { IconString } from '../display';
6
6
  /**
7
7
  * Screen options for the formsheet's NativeStackNavigation route
8
8
  * @param {string} options.headerTitle - Doesn't show in UI but good to have for semantic reasons.
@@ -22,7 +22,7 @@ type FormSheetComponents = {
22
22
  };
23
23
  declare const _default: FormSheetComponents;
24
24
  export default _default;
25
- export type { FormSheetRootProps, FormSheetActionProps, FormSheetHeaderProps, FormSheetHeaderTitleProps, FormSheetHeaderActionsProps, FormSheetHeaderSecondaryButtonProps, FormSheetHeaderPrimaryButtonProps, };
25
+ export type { FormSheetActionProps, FormSheetHeaderActionsProps, FormSheetHeaderPrimaryButtonProps, FormSheetHeaderProps, FormSheetHeaderSecondaryButtonProps, FormSheetHeaderTitleProps, FormSheetRootProps, };
26
26
  interface FormSheetRootProps {
27
27
  children: ReactNode;
28
28
  style?: StyleProp<ViewStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"form_sheet.d.ts","sourceRoot":"","sources":["../../../src/components/primitive/form_sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;AAIrB,OAAO,EAAiB,UAAU,EAA4B,MAAM,YAAY,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAM9D;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,mDAInC,4BA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AA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,UAAU,CAAC,EAAE,8BAA8B,CAAA;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
@@ -1,9 +1,9 @@
1
+ import { PlatformPressable, useHeaderHeight } from '@react-navigation/elements';
1
2
  import React from 'react';
2
3
  import { Platform, StyleSheet, View, useWindowDimensions, } from 'react-native';
3
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
5
  import { useTheme } from '../../hooks';
5
- import { PlatformPressable, useHeaderHeight } from '@react-navigation/elements';
6
- import { Heading, Icon, Text, Button, TextButton } from '../display';
6
+ import { Button, Heading, Icon, Text, TextButton } from '../display';
7
7
  // =================================
8
8
  // ====== Exports ==================
9
9
  // =================================
@@ -36,8 +36,8 @@ export default FormSheet;
36
36
  export function FormSheetRoot({ children, style, contentStyle }) {
37
37
  const styles = useStyles();
38
38
  return (<View style={[styles.container, style]} collapsable={false}>
39
- <AndroidSheetGrabber />
40
39
  <View style={[styles.content, contentStyle]}>{children}</View>
40
+ <AndroidSheetGrabber />
41
41
  </View>);
42
42
  }
43
43
  FormSheetRoot.displayName = 'FormSheet.Root';
@@ -53,7 +53,9 @@ function AndroidSheetGrabber() {
53
53
  }
54
54
  function FormSheetHeader({ children }) {
55
55
  const styles = useStyles();
56
- return <View style={styles.header}>{children}</View>;
56
+ return (<View style={styles.header}>
57
+ <View style={styles.headerContent}>{children}</View>
58
+ </View>);
57
59
  }
58
60
  FormSheetHeader.displayName = 'FormSheet.Header';
59
61
  function FormSheetHeaderTitle({ children }) {
@@ -127,7 +129,8 @@ const useStyles = ({ appearance = 'neutral' } = {}) => {
127
129
  }),
128
130
  },
129
131
  androidSheetGrabber: {
130
- marginTop: 5,
132
+ position: 'absolute',
133
+ top: 5,
131
134
  width: 34,
132
135
  height: 5,
133
136
  backgroundColor: colors.fillColorNeutral040,
@@ -135,7 +138,6 @@ const useStyles = ({ appearance = 'neutral' } = {}) => {
135
138
  alignSelf: 'center',
136
139
  },
137
140
  content: {
138
- paddingTop: Platform.select({ android: 16, ios: 20 }),
139
141
  ...Platform.select({
140
142
  android: {
141
143
  maxHeight: '100%', // Ensures content above a list (e.g. FormSheet.Header) don't subtract from the FormSheet's height
@@ -143,12 +145,15 @@ const useStyles = ({ appearance = 'neutral' } = {}) => {
143
145
  }),
144
146
  },
145
147
  header: {
146
- backgroundColor: colors.fillColorNeutral100Inverted,
147
148
  paddingHorizontal: 16,
149
+ paddingTop: 20,
148
150
  paddingBottom: 16,
151
+ backgroundColor: colors.fillColorNeutral100Inverted,
149
152
  gap: 16,
150
153
  borderBottomWidth: 1,
151
154
  borderBottomColor: colors.borderColorDefaultBase,
155
+ },
156
+ headerContent: {
152
157
  flexDirection: 'row',
153
158
  alignItems: 'center',
154
159
  justifyContent: 'space-between',
@@ -1 +1 @@
1
- {"version":3,"file":"form_sheet.js","sourceRoot":"","sources":["../../../src/components/primitive/form_sheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EACL,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,mBAAmB,GAIpB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC/E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAc,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAGhF,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACxC,WAAW,EACX,mBAAmB,GAAG,CAAC,IAAI,CAAC,E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D,GAAG,QAAQ,CAAC,MAAM,CAAC;gBACjB,OAAO,EAAE;oBACP,SAAS,EAAE,MAAM,EAAE,kGAAkG;iBACtH;aACF,CAAC;SACH;QACD,MAAM,EAAE;YACN,eAAe,EAAE,MAAM,CAAC,2BAA2B;YACnD,iBAAiB,EAAE,EAAE;YACrB,aAAa,EAAE,EAAE;YACjB,GAAG,EAAE,EAAE;YACP,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;YAChD,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;SAChC;QACD,WAAW,EAAE;YACX,SAAS,EAAE,MAAM;SAClB;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;SACR;QACD,eAAe,EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,EAAE;YACrB,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;QACD,WAAW,EAAE;YACX,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React, { ReactNode } from 'react'\nimport {\n Platform,\n StyleSheet,\n View,\n useWindowDimensions,\n type AccessibilityRole,\n type StyleProp,\n type ViewStyle,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport { PlatformPressable, useHeaderHeight } from '@react-navigation/elements'\nimport { Heading, Icon, IconString, Text, Button, TextButton } from '../display'\nimport type { ButtonProps, TextButtonProps } from '../display'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\n/**\n * Screen options for the formsheet's NativeStackNavigation route\n * @param {string} options.headerTitle - Doesn't show in UI but good to have for semantic reasons.\n * @param {number[]} [options.sheetAllowedDetents] - Controls the height increments the sheet grows to. To prevent bugs in Android, do not specify more then two values and use [0.94] instead of [1] to go full screen.\n * @param {NativeStackNavigationOptions} [options.rest] - Adds or overrides any valid NativeStackNavigationOptions\n * @returns {NativeStackNavigationOptions} Merged NativeStackNavigationOptions\n */\nexport const getFormSheetScreenOptions = ({\n headerTitle,\n sheetAllowedDetents = [0.25],\n ...rest\n}: NativeStackNavigationOptions = {}): NativeStackNavigationOptions => ({\n presentation: 'formSheet',\n headerShown: false,\n sheetAllowedDetents,\n sheetCornerRadius: 16,\n sheetGrabberVisible: true,\n headerTitle,\n ...rest,\n})\n\nconst FormSheet = {\n Root: FormSheetRoot,\n Action: FormSheetAction,\n Header: FormSheetHeader,\n HeaderTitle: FormSheetHeaderTitle,\n HeaderActions: FormSheetHeaderActions,\n HeaderSecondaryButton: FormSheetHeaderSecondaryButton,\n HeaderPrimaryButton: FormSheetHeaderPrimaryButton,\n} as const\n\ntype FormSheetComponents = {\n Root: React.FC<FormSheetRootProps>\n Action: React.FC<FormSheetActionProps>\n Header: React.FC<FormSheetHeaderProps>\n HeaderTitle: React.FC<FormSheetHeaderTitleProps>\n HeaderActions: React.FC<FormSheetHeaderActionsProps>\n HeaderSecondaryButton: React.FC<FormSheetHeaderSecondaryButtonProps>\n HeaderPrimaryButton: React.FC<FormSheetHeaderPrimaryButtonProps>\n}\n\nexport default FormSheet as FormSheetComponents\nexport type {\n FormSheetRootProps,\n FormSheetActionProps,\n FormSheetHeaderProps,\n FormSheetHeaderTitleProps,\n FormSheetHeaderActionsProps,\n FormSheetHeaderSecondaryButtonProps,\n FormSheetHeaderPrimaryButtonProps,\n}\n\n// ====================================\n// ====== ActionsFormSheetRoot ========\n// ====================================\n\ninterface FormSheetRootProps {\n children: ReactNode\n style?: StyleProp<ViewStyle>\n contentStyle?: StyleProp<ViewStyle>\n}\n\nexport function FormSheetRoot({ children, style, contentStyle }: FormSheetRootProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.container, style]} collapsable={false}>\n <AndroidSheetGrabber />\n <View style={[styles.content, contentStyle]}>{children}</View>\n </View>\n )\n}\n\nFormSheetRoot.displayName = 'FormSheet.Root'\n\n// ====================================\n// ====== AndroidSheetGrabber =========\n// ====================================\n\nfunction AndroidSheetGrabber() {\n const styles = useStyles()\n\n return Platform.select({\n android: <View style={styles.androidSheetGrabber} />,\n ios: null,\n })\n}\n\n// ====================================\n// ====== FormSheetHeader =============\n// ====================================\n\ninterface FormSheetHeaderProps {\n children: ReactNode\n}\n\nfunction FormSheetHeader({ children }: FormSheetHeaderProps) {\n const styles = useStyles()\n\n return <View style={styles.header}>{children}</View>\n}\n\nFormSheetHeader.displayName = 'FormSheet.Header'\n\n// ====================================\n// ====== FormSheetHeaderTitle ========\n// ====================================\n\ninterface FormSheetHeaderTitleProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderTitle({ children }: FormSheetHeaderTitleProps) {\n const styles = useStyles()\n\n return (\n <Heading variant=\"h3\" style={styles.headerTitle} maxFontSizeMultiplier={1}>\n {children}\n </Heading>\n )\n}\n\nFormSheetHeaderTitle.displayName = 'FormSheet.HeaderTitle'\n\n// ====================================\n// ====== FormSheetHeaderActions ======\n// ====================================\n\ninterface FormSheetHeaderActionsProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderActions({ children }: FormSheetHeaderActionsProps) {\n const styles = useStyles()\n\n return <View style={styles.headerActions}>{children}</View>\n}\n\nFormSheetHeaderActions.displayName = 'FormSheet.HeaderActions'\n\n// ===========================================\n// ====== FormSheetHeaderSecondaryButton ====\n// ===========================================\n\ninterface FormSheetHeaderSecondaryButtonProps\n extends Omit<TextButtonProps, 'maxFontSizeMultiplier'> {}\n\nfunction FormSheetHeaderSecondaryButton(props: FormSheetHeaderSecondaryButtonProps) {\n return <TextButton {...props} maxFontSizeMultiplier={1} />\n}\n\nFormSheetHeaderSecondaryButton.displayName = 'FormSheet.HeaderSecondaryButton'\n\n// =========================================\n// ====== FormSheetHeaderPrimaryButton ====\n// =========================================\n\ninterface FormSheetHeaderPrimaryButtonProps extends Omit<ButtonProps, 'maxFontSizeMultiplier'> {}\n\nfunction FormSheetHeaderPrimaryButton(props: FormSheetHeaderPrimaryButtonProps) {\n return <Button {...props} maxFontSizeMultiplier={1} />\n}\n\nFormSheetHeaderPrimaryButton.displayName = 'FormSheet.HeaderPrimaryButton'\n\n// ====================================\n// ====== ActionsFormSheetAction ======\n// ====================================\n\nconst FORM_SHEET_ACTION_APPEARANCES = {\n neutral: 'neutral',\n danger: 'danger',\n} as const\n\ntype FormSheetActionAppearanceUnion =\n (typeof FORM_SHEET_ACTION_APPEARANCES)[keyof typeof FORM_SHEET_ACTION_APPEARANCES]\n\ninterface FormSheetActionProps {\n title: string\n iconName: IconString\n onPress: () => void\n accessibilityLabel?: string\n accessibilityHint?: string\n accessibilityRole?: AccessibilityRole\n appearance?: FormSheetActionAppearanceUnion\n disabled?: boolean\n}\n\nfunction FormSheetAction({\n title,\n iconName,\n onPress,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n appearance = 'neutral',\n disabled = false,\n}: FormSheetActionProps) {\n const styles = useStyles({ appearance })\n\n return (\n <PlatformPressable\n onPress={onPress}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole={accessibilityRole}\n style={styles.actionPressable}\n disabled={disabled}\n >\n <Icon name={iconName} size={16} accessibilityElementsHidden style={styles.actionIcon} />\n <Text style={styles.actionTitle}>{title}</Text>\n </PlatformPressable>\n )\n}\n\nFormSheetAction.displayName = 'FormSheet.Action'\n\n// ==================================\n// ====== Styles ====================\n// ==================================\n\ninterface Styles {\n appearance?: FormSheetActionAppearanceUnion\n}\n\nconst useStyles = ({ appearance = 'neutral' }: Styles = {}) => {\n const { colors } = useTheme()\n const { height } = useWindowDimensions()\n const { bottom, top } = useSafeAreaInsets()\n const headerHeight = useHeaderHeight()\n\n const containerHeight = Platform.select({\n ios: height - top - headerHeight,\n default: null,\n })\n\n const appearanceColorsMap = {\n neutral: {\n iconColor: colors.iconColorDefaultPrimary,\n textColor: colors.textColorDefaultPrimary,\n },\n danger: {\n iconColor: colors.fillColorStatusErrorMedium,\n textColor: colors.fillColorStatusErrorMedium,\n },\n }\n\n return StyleSheet.create({\n container: {\n justifyContent: 'flex-start',\n paddingBottom: bottom,\n width: '100%',\n backgroundColor: colors.fillColorNeutral100Inverted,\n height: containerHeight,\n ...Platform.select({\n ios: {\n flexGrow: 1, // Ensures the FormSheet children respond to the formsheet height changing on iOS\n },\n android: {\n maxHeight: '100%', // Ensures lists to scroll on Android\n },\n }),\n },\n androidSheetGrabber: {\n marginTop: 5,\n width: 34,\n height: 5,\n backgroundColor: colors.fillColorNeutral040,\n borderRadius: 100,\n alignSelf: 'center',\n },\n content: {\n paddingTop: Platform.select({ android: 16, ios: 20 }),\n ...Platform.select({\n android: {\n maxHeight: '100%', // Ensures content above a list (e.g. FormSheet.Header) don't subtract from the FormSheet's height\n },\n }),\n },\n header: {\n backgroundColor: colors.fillColorNeutral100Inverted,\n paddingHorizontal: 16,\n paddingBottom: 16,\n gap: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n headerTitle: {\n textAlign: 'left',\n },\n headerActions: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 16,\n },\n actionPressable: {\n flexDirection: 'row',\n alignItems: 'center',\n paddingVertical: 12,\n paddingHorizontal: 16,\n gap: 8,\n },\n actionIcon: {\n color: appearanceColorsMap[appearance].iconColor,\n },\n actionTitle: {\n color: appearanceColorsMap[appearance].textColor,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"form_sheet.js","sourceRoot":"","sources":["../../../src/components/primitive/form_sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EA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ACrB,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;QACD,WAAW,EAAE;YACX,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable, useHeaderHeight } from '@react-navigation/elements'\nimport { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React, { ReactNode } from 'react'\nimport {\n Platform,\n StyleSheet,\n View,\n useWindowDimensions,\n type AccessibilityRole,\n type StyleProp,\n type ViewStyle,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport type { ButtonProps, TextButtonProps } from '../display'\nimport { Button, Heading, Icon, IconString, Text, TextButton } from '../display'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\n/**\n * Screen options for the formsheet's NativeStackNavigation route\n * @param {string} options.headerTitle - Doesn't show in UI but good to have for semantic reasons.\n * @param {number[]} [options.sheetAllowedDetents] - Controls the height increments the sheet grows to. To prevent bugs in Android, do not specify more then two values and use [0.94] instead of [1] to go full screen.\n * @param {NativeStackNavigationOptions} [options.rest] - Adds or overrides any valid NativeStackNavigationOptions\n * @returns {NativeStackNavigationOptions} Merged NativeStackNavigationOptions\n */\nexport const getFormSheetScreenOptions = ({\n headerTitle,\n sheetAllowedDetents = [0.25],\n ...rest\n}: NativeStackNavigationOptions = {}): NativeStackNavigationOptions => ({\n presentation: 'formSheet',\n headerShown: false,\n sheetAllowedDetents,\n sheetCornerRadius: 16,\n sheetGrabberVisible: true,\n headerTitle,\n ...rest,\n})\n\nconst FormSheet = {\n Root: FormSheetRoot,\n Action: FormSheetAction,\n Header: FormSheetHeader,\n HeaderTitle: FormSheetHeaderTitle,\n HeaderActions: FormSheetHeaderActions,\n HeaderSecondaryButton: FormSheetHeaderSecondaryButton,\n HeaderPrimaryButton: FormSheetHeaderPrimaryButton,\n} as const\n\ntype FormSheetComponents = {\n Root: React.FC<FormSheetRootProps>\n Action: React.FC<FormSheetActionProps>\n Header: React.FC<FormSheetHeaderProps>\n HeaderTitle: React.FC<FormSheetHeaderTitleProps>\n HeaderActions: React.FC<FormSheetHeaderActionsProps>\n HeaderSecondaryButton: React.FC<FormSheetHeaderSecondaryButtonProps>\n HeaderPrimaryButton: React.FC<FormSheetHeaderPrimaryButtonProps>\n}\n\nexport default FormSheet as FormSheetComponents\nexport type {\n FormSheetActionProps,\n FormSheetHeaderActionsProps,\n FormSheetHeaderPrimaryButtonProps,\n FormSheetHeaderProps,\n FormSheetHeaderSecondaryButtonProps,\n FormSheetHeaderTitleProps,\n FormSheetRootProps,\n}\n\n// ====================================\n// ====== ActionsFormSheetRoot ========\n// ====================================\n\ninterface FormSheetRootProps {\n children: ReactNode\n style?: StyleProp<ViewStyle>\n contentStyle?: StyleProp<ViewStyle>\n}\n\nexport function FormSheetRoot({ children, style, contentStyle }: FormSheetRootProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.container, style]} collapsable={false}>\n <View style={[styles.content, contentStyle]}>{children}</View>\n <AndroidSheetGrabber />\n </View>\n )\n}\n\nFormSheetRoot.displayName = 'FormSheet.Root'\n\n// ====================================\n// ====== AndroidSheetGrabber =========\n// ====================================\n\nfunction AndroidSheetGrabber() {\n const styles = useStyles()\n\n return Platform.select({\n android: <View style={styles.androidSheetGrabber} />,\n ios: null,\n })\n}\n\n// ====================================\n// ====== FormSheetHeader =============\n// ====================================\n\ninterface FormSheetHeaderProps {\n children: ReactNode\n}\n\nfunction FormSheetHeader({ children }: FormSheetHeaderProps) {\n const styles = useStyles()\n\n return (\n <View style={styles.header}>\n <View style={styles.headerContent}>{children}</View>\n </View>\n )\n}\n\nFormSheetHeader.displayName = 'FormSheet.Header'\n\n// ====================================\n// ====== FormSheetHeaderTitle ========\n// ====================================\n\ninterface FormSheetHeaderTitleProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderTitle({ children }: FormSheetHeaderTitleProps) {\n const styles = useStyles()\n\n return (\n <Heading variant=\"h3\" style={styles.headerTitle} maxFontSizeMultiplier={1}>\n {children}\n </Heading>\n )\n}\n\nFormSheetHeaderTitle.displayName = 'FormSheet.HeaderTitle'\n\n// ====================================\n// ====== FormSheetHeaderActions ======\n// ====================================\n\ninterface FormSheetHeaderActionsProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderActions({ children }: FormSheetHeaderActionsProps) {\n const styles = useStyles()\n\n return <View style={styles.headerActions}>{children}</View>\n}\n\nFormSheetHeaderActions.displayName = 'FormSheet.HeaderActions'\n\n// ===========================================\n// ====== FormSheetHeaderSecondaryButton ====\n// ===========================================\n\ninterface FormSheetHeaderSecondaryButtonProps\n extends Omit<TextButtonProps, 'maxFontSizeMultiplier'> {}\n\nfunction FormSheetHeaderSecondaryButton(props: FormSheetHeaderSecondaryButtonProps) {\n return <TextButton {...props} maxFontSizeMultiplier={1} />\n}\n\nFormSheetHeaderSecondaryButton.displayName = 'FormSheet.HeaderSecondaryButton'\n\n// =========================================\n// ====== FormSheetHeaderPrimaryButton ====\n// =========================================\n\ninterface FormSheetHeaderPrimaryButtonProps extends Omit<ButtonProps, 'maxFontSizeMultiplier'> {}\n\nfunction FormSheetHeaderPrimaryButton(props: FormSheetHeaderPrimaryButtonProps) {\n return <Button {...props} maxFontSizeMultiplier={1} />\n}\n\nFormSheetHeaderPrimaryButton.displayName = 'FormSheet.HeaderPrimaryButton'\n\n// ====================================\n// ====== ActionsFormSheetAction ======\n// ====================================\n\nconst FORM_SHEET_ACTION_APPEARANCES = {\n neutral: 'neutral',\n danger: 'danger',\n} as const\n\ntype FormSheetActionAppearanceUnion =\n (typeof FORM_SHEET_ACTION_APPEARANCES)[keyof typeof FORM_SHEET_ACTION_APPEARANCES]\n\ninterface FormSheetActionProps {\n title: string\n iconName: IconString\n onPress: () => void\n accessibilityLabel?: string\n accessibilityHint?: string\n accessibilityRole?: AccessibilityRole\n appearance?: FormSheetActionAppearanceUnion\n disabled?: boolean\n}\n\nfunction FormSheetAction({\n title,\n iconName,\n onPress,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n appearance = 'neutral',\n disabled = false,\n}: FormSheetActionProps) {\n const styles = useStyles({ appearance })\n\n return (\n <PlatformPressable\n onPress={onPress}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole={accessibilityRole}\n style={styles.actionPressable}\n disabled={disabled}\n >\n <Icon name={iconName} size={16} accessibilityElementsHidden style={styles.actionIcon} />\n <Text style={styles.actionTitle}>{title}</Text>\n </PlatformPressable>\n )\n}\n\nFormSheetAction.displayName = 'FormSheet.Action'\n\n// ==================================\n// ====== Styles ====================\n// ==================================\n\ninterface Styles {\n appearance?: FormSheetActionAppearanceUnion\n}\n\nconst useStyles = ({ appearance = 'neutral' }: Styles = {}) => {\n const { colors } = useTheme()\n const { height } = useWindowDimensions()\n const { bottom, top } = useSafeAreaInsets()\n const headerHeight = useHeaderHeight()\n\n const containerHeight = Platform.select({\n ios: height - top - headerHeight,\n default: null,\n })\n\n const appearanceColorsMap = {\n neutral: {\n iconColor: colors.iconColorDefaultPrimary,\n textColor: colors.textColorDefaultPrimary,\n },\n danger: {\n iconColor: colors.fillColorStatusErrorMedium,\n textColor: colors.fillColorStatusErrorMedium,\n },\n }\n\n return StyleSheet.create({\n container: {\n justifyContent: 'flex-start',\n paddingBottom: bottom,\n width: '100%',\n backgroundColor: colors.fillColorNeutral100Inverted,\n height: containerHeight,\n ...Platform.select({\n ios: {\n flexGrow: 1, // Ensures the FormSheet children respond to the formsheet height changing on iOS\n },\n android: {\n maxHeight: '100%', // Ensures lists to scroll on Android\n },\n }),\n },\n androidSheetGrabber: {\n position: 'absolute',\n top: 5,\n width: 34,\n height: 5,\n backgroundColor: colors.fillColorNeutral040,\n borderRadius: 100,\n alignSelf: 'center',\n },\n content: {\n ...Platform.select({\n android: {\n maxHeight: '100%', // Ensures content above a list (e.g. FormSheet.Header) don't subtract from the FormSheet's height\n },\n }),\n },\n header: {\n paddingHorizontal: 16,\n paddingTop: 20,\n paddingBottom: 16,\n backgroundColor: colors.fillColorNeutral100Inverted,\n gap: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n headerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n headerTitle: {\n textAlign: 'left',\n },\n headerActions: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 16,\n },\n actionPressable: {\n flexDirection: 'row',\n alignItems: 'center',\n paddingVertical: 12,\n paddingHorizontal: 16,\n gap: 8,\n },\n actionIcon: {\n color: appearanceColorsMap[appearance].iconColor,\n },\n actionTitle: {\n color: appearanceColorsMap[appearance].textColor,\n },\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_actions_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/attachment_actions/attachment_actions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAsB,MAAM,OAAO,CAAA;AAK1C,eAAO,MAAM,8BAA8B,uEAEzC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC3D,YAAY,EAAE,MAAM,CAAA;IACpB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B,EAAE,OAAO,CAAA;IACrC,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,4BAA4B,qBAwD9E"}
1
+ {"version":3,"file":"attachment_actions_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/attachment_actions/attachment_actions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAsB,MAAM,OAAO,CAAA;AAK1C,eAAO,MAAM,8BAA8B,uEAEzC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC3D,YAAY,EAAE,MAAM,CAAA;IACpB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B,EAAE,OAAO,CAAA;IACrC,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,4BAA4B,qBAyD9E"}
@@ -1,6 +1,6 @@
1
1
  import { useNavigation } from '@react-navigation/native';
2
2
  import React, { useCallback } from 'react';
3
- import { Alert, Linking } from 'react-native';
3
+ import { Alert, Linking, StyleSheet } from 'react-native';
4
4
  import FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet';
5
5
  import { useDeleteAttachment } from './hooks/useDeleteAttachment';
6
6
  export const AttachmentActionsScreenOptions = getFormSheetScreenOptions({
@@ -11,6 +11,7 @@ export function AttachmentActionsScreen({ route }) {
11
11
  const { attachmentId, attachmentContentType, attachmentUrl, conversation_id, canDeleteNonAuthoredMessages, myMessage, } = route.params;
12
12
  const attachmentName = getAttachmentLabelName(attachmentContentType);
13
13
  const canDelete = myMessage || canDeleteNonAuthoredMessages;
14
+ const styles = useStyles();
14
15
  const { handleDeleteAttachment } = useDeleteAttachment({
15
16
  conversation_id,
16
17
  attachmentId,
@@ -26,11 +27,18 @@ export function AttachmentActionsScreen({ route }) {
26
27
  Linking.openURL(attachmentUrl);
27
28
  navigation.goBack();
28
29
  };
29
- return (<FormSheet.Root>
30
+ return (<FormSheet.Root contentStyle={styles.formSheetContent}>
30
31
  <FormSheet.Action iconName="general.newWindow" title="Open in browser" accessibilityRole="link" accessibilityLabel={`Open ${attachmentName} in browser`} accessibilityHint={`${attachmentName} can be downloaded and shared through the browser.`} onPress={handleOpenInBrowser}/>
31
32
  {canDelete && (<FormSheet.Action appearance="danger" iconName="publishing.trash" title={`Delete ${attachmentName}`} onPress={handleDeleteConfirm}/>)}
32
33
  </FormSheet.Root>);
33
34
  }
35
+ const useStyles = () => {
36
+ return StyleSheet.create({
37
+ formSheetContent: {
38
+ paddingTop: 16,
39
+ },
40
+ });
41
+ };
34
42
  function getAttachmentLabelName(contentType) {
35
43
  if (contentType.startsWith('image/'))
36
44
  return 'image';
@@ -1 +1 @@
1
- {"version":3,"file":"attachment_actions_screen.js","sourceRoot":"","sources":["../../../src/screens/attachment_actions/attachment_actions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;IACtE,WAAW,EAAE,oBAAoB;CAClC,CAAC,CAAA;AAWF,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAAgC;IAC7E,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,EACJ,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,4BAA4B,EAC5B,SAAS,GACV,GAAG,KAAK,CAAC,MAAM,CAAA;IAEhB,MAAM,cAAc,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAA;IACpE,MAAM,SAAS,GAAG,SAAS,IAAI,4BAA4B,CAAA;IAE3D,MAAM,EAAE,sBAAsB,EAAE,GAAG,mBAAmB,CAAC;QACrD,eAAe;QACf,YAAY;QACZ,cAAc;KACf,CAAC,CA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CAAC,QAAQ,CAAC;QAAE,OAAO,OAAO,CAAA;IACpD,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,OAAO,CAAA;IACpD,IAAI,WAAW,KAAK,iBAAiB;QAAE,OAAO,KAAK,CAAA;IACnD,IAAI,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC;QAAE,OAAO,MAAM,CAAA;IAEzD,OAAO,EAAE,CAAA;AACX,CAAC","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback } from 'react'\nimport { Alert, Linking } from 'react-native'\nimport FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet'\nimport { useDeleteAttachment } from './hooks/useDeleteAttachment'\n\nexport const AttachmentActionsScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Attachment actions',\n})\n\nexport type AttachmentActionsScreenProps = StaticScreenProps<{\n attachmentId: string\n attachmentContentType: string\n attachmentUrl: string\n conversation_id: number\n canDeleteNonAuthoredMessages: boolean\n myMessage: boolean\n}>\n\nexport function AttachmentActionsScreen({ route }: AttachmentActionsScreenProps) {\n const navigation = useNavigation()\n const {\n attachmentId,\n attachmentContentType,\n attachmentUrl,\n conversation_id,\n canDeleteNonAuthoredMessages,\n myMessage,\n } = route.params\n\n const attachmentName = getAttachmentLabelName(attachmentContentType)\n const canDelete = myMessage || canDeleteNonAuthoredMessages\n\n const { handleDeleteAttachment } = useDeleteAttachment({\n conversation_id,\n attachmentId,\n attachmentName,\n })\n\n const handleDeleteConfirm = useCallback(() => {\n Alert.alert(\n `Delete ${attachmentName}`,\n 'Are you sure you want to permanently delete this attachment?',\n [\n { text: 'Cancel', style: 'cancel' },\n { text: 'Delete', style: 'destructive', onPress: () => handleDeleteAttachment() },\n ]\n )\n }, [attachmentName, handleDeleteAttachment])\n\n const handleOpenInBrowser = () => {\n Linking.openURL(attachmentUrl)\n navigation.goBack()\n }\n\n return (\n <FormSheet.Root>\n <FormSheet.Action\n iconName=\"general.newWindow\"\n title=\"Open in browser\"\n accessibilityRole=\"link\"\n accessibilityLabel={`Open ${attachmentName} in browser`}\n accessibilityHint={`${attachmentName} can be downloaded and shared through the browser.`}\n onPress={handleOpenInBrowser}\n />\n {canDelete && (\n <FormSheet.Action\n appearance=\"danger\"\n iconName=\"publishing.trash\"\n title={`Delete ${attachmentName}`}\n onPress={handleDeleteConfirm}\n />\n )}\n </FormSheet.Root>\n )\n}\n\nfunction getAttachmentLabelName(contentType: string) {\n if (contentType.startsWith('image/')) return 'image'\n if (contentType.startsWith('video/')) return 'video'\n if (contentType.startsWith('audio/')) return 'audio'\n if (contentType === 'application/pdf') return 'PDF'\n if (contentType.startsWith('application/')) return 'file'\n\n return ''\n}\n"]}
1
+ {"version":3,"file":"attachment_actions_screen.js","sourceRoot":"","sources":["../../../src/screens/attachment_actions/attachment_actions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;IACtE,WAAW,EAAE,oBAAoB;CAClC,CAAC,CAAA;AAWF,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAAgC;IAC7E,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,EACJ,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,4BAA4B,EAC5B,SAAS,GACV,GAAG,KAAK,CAAC,MAAM,CAAA;IAEhB,MAAM,cAAc,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAA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CAClC,OAAO,CAAC,CAAC,mBAAmB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,SAAS,CAAC,IAAI,CAAC,CAClB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,UAAU,EAAE,EAAE;SACf;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,SAAS,sBAAsB,CAAC,WAAmB;IACjD,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,OAAO,CAAA;IACpD,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,OAAO,CAAA;IACpD,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,OAAO,CAAA;IACpD,IAAI,WAAW,KAAK,iBAAiB;QAAE,OAAO,KAAK,CAAA;IACnD,IAAI,WAAW,CAAC,UAAU,CAAC,cAAc,CAAC;QAAE,OAAO,MAAM,CAAA;IAEzD,OAAO,EAAE,CAAA;AACX,CAAC","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback } from 'react'\nimport { Alert, Linking, StyleSheet } from 'react-native'\nimport FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet'\nimport { useDeleteAttachment } from './hooks/useDeleteAttachment'\n\nexport const AttachmentActionsScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Attachment actions',\n})\n\nexport type AttachmentActionsScreenProps = StaticScreenProps<{\n attachmentId: string\n attachmentContentType: string\n attachmentUrl: string\n conversation_id: number\n canDeleteNonAuthoredMessages: boolean\n myMessage: boolean\n}>\n\nexport function AttachmentActionsScreen({ route }: AttachmentActionsScreenProps) {\n const navigation = useNavigation()\n const {\n attachmentId,\n attachmentContentType,\n attachmentUrl,\n conversation_id,\n canDeleteNonAuthoredMessages,\n myMessage,\n } = route.params\n\n const attachmentName = getAttachmentLabelName(attachmentContentType)\n const canDelete = myMessage || canDeleteNonAuthoredMessages\n const styles = useStyles()\n\n const { handleDeleteAttachment } = useDeleteAttachment({\n conversation_id,\n attachmentId,\n attachmentName,\n })\n\n const handleDeleteConfirm = useCallback(() => {\n Alert.alert(\n `Delete ${attachmentName}`,\n 'Are you sure you want to permanently delete this attachment?',\n [\n { text: 'Cancel', style: 'cancel' },\n { text: 'Delete', style: 'destructive', onPress: () => handleDeleteAttachment() },\n ]\n )\n }, [attachmentName, handleDeleteAttachment])\n\n const handleOpenInBrowser = () => {\n Linking.openURL(attachmentUrl)\n navigation.goBack()\n }\n\n return (\n <FormSheet.Root contentStyle={styles.formSheetContent}>\n <FormSheet.Action\n iconName=\"general.newWindow\"\n title=\"Open in browser\"\n accessibilityRole=\"link\"\n accessibilityLabel={`Open ${attachmentName} in browser`}\n accessibilityHint={`${attachmentName} can be downloaded and shared through the browser.`}\n onPress={handleOpenInBrowser}\n />\n {canDelete && (\n <FormSheet.Action\n appearance=\"danger\"\n iconName=\"publishing.trash\"\n title={`Delete ${attachmentName}`}\n onPress={handleDeleteConfirm}\n />\n )}\n </FormSheet.Root>\n )\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n })\n}\n\nfunction getAttachmentLabelName(contentType: string) {\n if (contentType.startsWith('image/')) return 'image'\n if (contentType.startsWith('video/')) return 'video'\n if (contentType.startsWith('audio/')) return 'audio'\n if (contentType === 'application/pdf') return 'PDF'\n if (contentType.startsWith('application/')) return 'file'\n\n return ''\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_filter_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAO1C,OAAO,EAAE,uCAAuC,EAAgB,MAAM,SAAS,CAAA;AAU/E,eAAO,MAAM,0CAA0C,uEAMrD,CAAA;AAEF,eAAO,MAAM,kCAAkC,eAE5C,uCAAuC,sBA6FzC,CAAA"}
1
+ {"version":3,"file":"conversation_filter_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAY1C,OAAO,EAAE,uCAAuC,EAAgB,MAAM,SAAS,CAAA;AAI/E,eAAO,MAAM,0CAA0C,uEAMrD,CAAA;AAEF,eAAO,MAAM,kCAAkC,eAE5C,uCAAuC,sBAiGzC,CAAA"}
@@ -1,17 +1,17 @@
1
+ import { StackActions, useNavigation } from '@react-navigation/native';
1
2
  import React, { useCallback } from 'react';
2
3
  import { Platform, StyleSheet } from 'react-native';
3
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
4
  import { FlatList } from 'react-native-gesture-handler';
5
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
6
  import { Heading } from '../../components';
7
+ import FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet';
6
8
  import { useTheme } from '../../hooks';
7
- import { useFlattenedArrayOfServiceTypesWithTeams } from './hooks/use_flattened_array_of_service_types_with_teams';
8
- import { SectionTypes } from './types';
9
- import { HeaderRow } from './components/header_row';
10
9
  import { tokens } from '../../vendor/tapestry/tokens';
11
10
  import { CheckboxRow } from './components/checkbox_row';
11
+ import { HeaderRow } from './components/header_row';
12
+ import { useFlattenedArrayOfServiceTypesWithTeams } from './hooks/use_flattened_array_of_service_types_with_teams';
12
13
  import { useServiceTypesWithTeams } from './hooks/use_service_types_with_teams';
13
- import { StackActions, useNavigation } from '@react-navigation/native';
14
- import FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet';
14
+ import { SectionTypes } from './types';
15
15
  const SERVICE_TYPE_LABELLED_BY_PREFIX = 'header-';
16
16
  export const ConversationFilterReceipientsScreenOptions = getFormSheetScreenOptions({
17
17
  sheetAllowedDetents: Platform.select({
@@ -23,6 +23,7 @@ export const ConversationFilterReceipientsScreenOptions = getFormSheetScreenOpti
23
23
  export const ConversationFilterRecipientsScreen = ({ route, }) => {
24
24
  const styles = useStyles();
25
25
  const navigation = useNavigation();
26
+ const { team_ids: teamIds } = route.params;
26
27
  const { serviceTypes } = useServiceTypesWithTeams();
27
28
  const data = useFlattenedArrayOfServiceTypesWithTeams({
28
29
  data: serviceTypes,
@@ -45,9 +46,11 @@ export const ConversationFilterRecipientsScreen = ({ route, }) => {
45
46
  const applyTeamFilters = useCallback(() => {
46
47
  navigation.dispatch(StackActions.popTo('ConversationNew', params));
47
48
  }, [navigation, params]);
48
- return (<FormSheet.Root>
49
+ const teamIdCount = Number(teamIds?.length);
50
+ const count = teamIdCount > 1 ? ` (${teamIdCount})` : '';
51
+ return (<FormSheet.Root style={styles.root}>
49
52
  <FormSheet.Header>
50
- <FormSheet.HeaderTitle>Teams I lead</FormSheet.HeaderTitle>
53
+ <FormSheet.HeaderTitle>Teams I lead{count}</FormSheet.HeaderTitle>
51
54
  <FormSheet.HeaderActions>
52
55
  <FormSheet.HeaderSecondaryButton onPress={resetTeamFilters} accessibilityHint="Cancels any selected teams and closes this modal.">
53
56
  Cancel
@@ -74,8 +77,10 @@ const useStyles = () => {
74
77
  const { colors } = useTheme();
75
78
  const { bottom } = useSafeAreaInsets();
76
79
  return StyleSheet.create({
77
- listContentContainer: {
80
+ root: {
78
81
  backgroundColor: colors.surfaceColor080,
82
+ },
83
+ listContentContainer: {
79
84
  padding: 16,
80
85
  paddingBottom: bottom + Platform.select({ android: 24, default: 16 }),
81
86
  },
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_filter_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACnD,OA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AAG,+BAA+B,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CACxF,cAAc,CAAC,CAAC,cAAc,CAAC,EAC/B,CACH,CAAA;gBACH;oBACE,OAAO,IAAI,CAAA;YACf,CAAC;QACH,CAAC,CAAC,EAEN;IAAA,EAAE,SAAS,CAAC,IAAI,CAAC,CAClB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,oBAAoB,EAAE;YACpB,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;SACtE;QACD,UAAU,EAAE;YACV,aAAa,EAAE,EAAE;SAClB;QACD,QAAQ,EAAE;YACR,oBAAoB,EAAE,MAAM,CAAC,cAAc;YAC3C,kBAAkB,EAAE,MAAM,CAAC,cAAc;SAC1C;QACD,OAAO,EAAE;YACP,uBAAuB,EAAE,MAAM,CAAC,cAAc;YAC9C,qBAAqB,EAAE,MAAM,CAAC,cAAc;YAC5C,YAAY,EAAE,EAAE;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useCallback } from 'react'\nimport { Platform, StyleSheet } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { Heading } from '../../components'\nimport { useTheme } from '../../hooks'\nimport { useFlattenedArrayOfServiceTypesWithTeams } from './hooks/use_flattened_array_of_service_types_with_teams'\nimport { ConversationFilterRecipientsScreenProps, SectionTypes } from './types'\nimport { HeaderRow } from './components/header_row'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { CheckboxRow } from './components/checkbox_row'\nimport { useServiceTypesWithTeams } from './hooks/use_service_types_with_teams'\nimport { StackActions, useNavigation } from '@react-navigation/native'\nimport FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet'\n\nconst SERVICE_TYPE_LABELLED_BY_PREFIX = 'header-'\n\nexport const ConversationFilterReceipientsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.75, 0.94],\n default: [0.75, 1],\n }),\n headerTitle: 'Teams I lead',\n})\n\nexport const ConversationFilterRecipientsScreen = ({\n route,\n}: ConversationFilterRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation =\n useNavigation<NativeStackNavigationProp<ConversationFilterRecipientsScreenProps>>()\n\n const { serviceTypes } = useServiceTypesWithTeams()\n const data = useFlattenedArrayOfServiceTypesWithTeams({\n data: serviceTypes,\n firstRowStyle: styles.firstRow,\n lastRowStyle: styles.lastRow,\n })\n\n const { params } = route\n const noTeamsSelected = params.team_ids?.length === 0 || !params.team_ids\n const applyButtonAccessibilityHint = noTeamsSelected\n ? 'Select at least one team to navigate to the final step in creating your conversation.'\n : 'Saves selected teams and navigates to the final step to create your conversation.'\n\n const setTeamFilters = useCallback(\n ({ team_ids }: { team_ids: number[] }) => {\n navigation.setParams({\n team_ids,\n })\n },\n [navigation]\n )\n\n const resetTeamFilters = useCallback(() => {\n navigation.goBack()\n }, [navigation])\n\n const applyTeamFilters = useCallback(() => {\n navigation.dispatch(StackActions.popTo('ConversationNew', params))\n }, [navigation, params])\n\n return (\n <FormSheet.Root>\n <FormSheet.Header>\n <FormSheet.HeaderTitle>Teams I lead</FormSheet.HeaderTitle>\n <FormSheet.HeaderActions>\n <FormSheet.HeaderSecondaryButton\n onPress={resetTeamFilters}\n accessibilityHint=\"Cancels any selected teams and closes this modal.\"\n >\n Cancel\n </FormSheet.HeaderSecondaryButton>\n <FormSheet.HeaderPrimaryButton\n title=\"Apply\"\n accessibilityHint={applyButtonAccessibilityHint}\n onPress={applyTeamFilters}\n disabled={noTeamsSelected}\n />\n </FormSheet.HeaderActions>\n </FormSheet.Header>\n\n <FlatList\n data={data}\n ListHeaderComponent={\n <Heading variant=\"h3\" style={styles.listHeader}>\n Service Types\n </Heading>\n }\n contentContainerStyle={styles.listContentContainer}\n keyExtractor={item =>\n `${item.type === SectionTypes.header ? item.data.serviceTypeId : item.data.teamId}`\n }\n renderItem={({ item }) => {\n switch (item.type) {\n case SectionTypes.header:\n return (\n <HeaderRow\n data={item.data}\n style={item.sectionStyle}\n nativeID={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n setTeamFilters={setTeamFilters}\n />\n )\n case SectionTypes.team:\n return (\n <CheckboxRow\n data={item.data}\n style={item.sectionStyle}\n accessibilityLabelledBy={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n setTeamFilters={setTeamFilters}\n />\n )\n default:\n return null\n }\n }}\n />\n </FormSheet.Root>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n listContentContainer: {\n backgroundColor: colors.surfaceColor080,\n padding: 16,\n paddingBottom: bottom + Platform.select({ android: 24, default: 16 }),\n },\n listHeader: {\n paddingBottom: 16,\n },\n firstRow: {\n borderTopStartRadius: tokens.borderRadiusLg,\n borderTopEndRadius: tokens.borderRadiusLg,\n },\n lastRow: {\n borderBottomStartRadius: tokens.borderRadiusLg,\n borderBottomEndRadius: tokens.borderRadiusLg,\n marginBottom: 16,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_filter_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEtE,OAAO,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9C,qBAAqB,EAAE,MAAM,CAAC,cAAc;YAC5C,YAAY,EAAE,EAAE;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StackActions, useNavigation } from '@react-navigation/native'\nimport { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useCallback } from 'react'\nimport { Platform, StyleSheet } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Heading } from '../../components'\nimport FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet'\nimport { useTheme } from '../../hooks'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { CheckboxRow } from './components/checkbox_row'\nimport { HeaderRow } from './components/header_row'\nimport { useFlattenedArrayOfServiceTypesWithTeams } from './hooks/use_flattened_array_of_service_types_with_teams'\nimport { useServiceTypesWithTeams } from './hooks/use_service_types_with_teams'\nimport { ConversationFilterRecipientsScreenProps, SectionTypes } from './types'\n\nconst SERVICE_TYPE_LABELLED_BY_PREFIX = 'header-'\n\nexport const ConversationFilterReceipientsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.75, 0.94],\n default: [0.75, 1],\n }),\n headerTitle: 'Teams I lead',\n})\n\nexport const ConversationFilterRecipientsScreen = ({\n route,\n}: ConversationFilterRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation =\n useNavigation<NativeStackNavigationProp<ConversationFilterRecipientsScreenProps>>()\n const { team_ids: teamIds } = route.params\n\n const { serviceTypes } = useServiceTypesWithTeams()\n const data = useFlattenedArrayOfServiceTypesWithTeams({\n data: serviceTypes,\n firstRowStyle: styles.firstRow,\n lastRowStyle: styles.lastRow,\n })\n\n const { params } = route\n const noTeamsSelected = params.team_ids?.length === 0 || !params.team_ids\n const applyButtonAccessibilityHint = noTeamsSelected\n ? 'Select at least one team to navigate to the final step in creating your conversation.'\n : 'Saves selected teams and navigates to the final step to create your conversation.'\n\n const setTeamFilters = useCallback(\n ({ team_ids }: { team_ids: number[] }) => {\n navigation.setParams({\n team_ids,\n })\n },\n [navigation]\n )\n\n const resetTeamFilters = useCallback(() => {\n navigation.goBack()\n }, [navigation])\n\n const applyTeamFilters = useCallback(() => {\n navigation.dispatch(StackActions.popTo('ConversationNew', params))\n }, [navigation, params])\n\n const teamIdCount = Number(teamIds?.length)\n const count = teamIdCount > 1 ? ` (${teamIdCount})` : ''\n\n return (\n <FormSheet.Root style={styles.root}>\n <FormSheet.Header>\n <FormSheet.HeaderTitle>Teams I lead{count}</FormSheet.HeaderTitle>\n <FormSheet.HeaderActions>\n <FormSheet.HeaderSecondaryButton\n onPress={resetTeamFilters}\n accessibilityHint=\"Cancels any selected teams and closes this modal.\"\n >\n Cancel\n </FormSheet.HeaderSecondaryButton>\n <FormSheet.HeaderPrimaryButton\n title=\"Apply\"\n accessibilityHint={applyButtonAccessibilityHint}\n onPress={applyTeamFilters}\n disabled={noTeamsSelected}\n />\n </FormSheet.HeaderActions>\n </FormSheet.Header>\n\n <FlatList\n data={data}\n ListHeaderComponent={\n <Heading variant=\"h3\" style={styles.listHeader}>\n Service Types\n </Heading>\n }\n contentContainerStyle={styles.listContentContainer}\n keyExtractor={item =>\n `${item.type === SectionTypes.header ? item.data.serviceTypeId : item.data.teamId}`\n }\n renderItem={({ item }) => {\n switch (item.type) {\n case SectionTypes.header:\n return (\n <HeaderRow\n data={item.data}\n style={item.sectionStyle}\n nativeID={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n setTeamFilters={setTeamFilters}\n />\n )\n case SectionTypes.team:\n return (\n <CheckboxRow\n data={item.data}\n style={item.sectionStyle}\n accessibilityLabelledBy={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n setTeamFilters={setTeamFilters}\n />\n )\n default:\n return null\n }\n }}\n />\n </FormSheet.Root>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n root: {\n backgroundColor: colors.surfaceColor080,\n },\n listContentContainer: {\n padding: 16,\n paddingBottom: bottom + Platform.select({ android: 24, default: 16 }),\n },\n listHeader: {\n paddingBottom: 16,\n },\n firstRow: {\n borderTopStartRadius: tokens.borderRadiusLg,\n borderTopEndRadius: tokens.borderRadiusLg,\n },\n lastRow: {\n borderBottomStartRadius: tokens.borderRadiusLg,\n borderBottomEndRadius: tokens.borderRadiusLg,\n marginBottom: 16,\n },\n })\n}\n"]}
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- export declare const ChatGroupBadge: () => React.JSX.Element | null;
2
+ export declare const ChatGroupBadge: ({ rowPaddingHorizontal }: {
3
+ rowPaddingHorizontal: number;
4
+ }) => React.JSX.Element | null;
3
5
  //# sourceMappingURL=chat_group_badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat_group_badge.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversations/components/chat_group_badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAO1C,eAAO,MAAM,cAAc,gCA8B1B,CAAA"}
1
+ {"version":3,"file":"chat_group_badge.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversations/components/chat_group_badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAO1C,eAAO,MAAM,cAAc,6BAA8B;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,6BA8BxF,CAAA"}
@@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
3
3
  import { StyleSheet, View } from 'react-native';
4
4
  import { Badge } from '../../../components';
5
5
  import { useApiGet } from '../../../hooks/use_api';
6
- export const ChatGroupBadge = () => {
7
- const styles = useStyles();
6
+ export const ChatGroupBadge = ({ rowPaddingHorizontal }) => {
7
+ const styles = useStyles({ rowPaddingHorizontal });
8
8
  const navigation = useNavigation();
9
9
  const route = useRoute();
10
10
  const { chat_group_graph_id } = route.params || {};
@@ -30,10 +30,11 @@ export const ChatGroupBadge = () => {
30
30
  <Badge iconNameRight="general.x" label={group?.name || ''} onPress={handleBadgePress}/>
31
31
  </View>);
32
32
  };
33
- const useStyles = () => {
33
+ const useStyles = ({ rowPaddingHorizontal }) => {
34
34
  return StyleSheet.create({
35
35
  row: {
36
36
  flexDirection: 'row',
37
+ paddingHorizontal: rowPaddingHorizontal,
37
38
  },
38
39
  });
39
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"chat_group_badge.js","sourceRoot":"","sources":["../../../../src/screens/conversations/components/chat_group_badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIlD,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,KAAK,GAAG,QAAQ,EAA+C,CAAA;IACrE,MAAM,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAA;IAClD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,SAAS,CAAgB;QAC/C,GAAG,EAAE,cAAc,mBAAmB,EAAE;QACxC,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;aACV;SACF;QACD,OAAO,EAAE,CAAC,CAAC,mBAAmB;QAC9B,GAAG,EAAE,MAAM;KACZ,CAAC,CAAA;IAEF,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,EAAE;QACxC,UAAU,CAAC,SAAS,CAAC;YACnB,mBAAmB,EAAE,SAAS;YAC9B,qBAAqB,EAAE,SAAS;SACjC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;IAEhB,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CACtB;MAAA,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,EACvF;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,GAAG,EAAE;YACH,aAAa,EAAE,KAAK;SACrB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'\nimport React, { useCallback } from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { Badge } from '../../../components'\nimport { useApiGet } from '../../../hooks/use_api'\nimport { GroupResource } from '../../../types/resources/group_resource'\nimport { ConversationScreenProps } from '../conversations_screen'\n\nexport const ChatGroupBadge = () => {\n const styles = useStyles()\n const navigation = useNavigation()\n const route = useRoute<RouteProp<ConversationScreenProps['route']>>()\n const { chat_group_graph_id } = route.params || {}\n const { data: group } = useApiGet<GroupResource>({\n url: `/me/groups/${chat_group_graph_id}`,\n data: {\n fields: {\n Group: [],\n },\n },\n enabled: !!chat_group_graph_id,\n app: 'chat',\n })\n\n const handleBadgePress = useCallback(() => {\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n })\n }, [navigation])\n\n if (!group) return null\n\n return (\n <View style={styles.row}>\n <Badge iconNameRight=\"general.x\" label={group?.name || ''} onPress={handleBadgePress} />\n </View>\n )\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n row: {\n flexDirection: 'row',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"chat_group_badge.js","sourceRoot":"","sources":["../../../../src/screens/conversations/components/chat_group_badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIlD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,oBAAoB,EAAoC,EAAE,EAAE;IAC3F,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC,CAAA;IAClD,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,KAAK,GAAG,QAAQ,EAA+C,CAAA;IACrE,MAAM,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAA;IAClD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,SAAS,CAAgB;QAC/C,GAAG,EAAE,cAAc,mBAAmB,EAAE;QACxC,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;aACV;SACF;QACD,OAAO,EAAE,CAAC,CAAC,mBAAmB;QAC9B,GAAG,EAAE,MAAM;KACZ,CAAC,CAAA;IAEF,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,EAAE;QACxC,UAAU,CAAC,SAAS,CAAC;YACnB,mBAAmB,EAAE,SAAS;YAC9B,qBAAqB,EAAE,SAAS;SACjC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;IAEhB,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CACtB;MAAA,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,EACvF;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,CAAC,EAAE,oBAAoB,EAAoC,EAAE,EAAE;IAC/E,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,GAAG,EAAE;YACH,aAAa,EAAE,KAAK;YACpB,iBAAiB,EAAE,oBAAoB;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'\nimport React, { useCallback } from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { Badge } from '../../../components'\nimport { useApiGet } from '../../../hooks/use_api'\nimport { GroupResource } from '../../../types/resources/group_resource'\nimport { ConversationScreenProps } from '../conversations_screen'\n\nexport const ChatGroupBadge = ({ rowPaddingHorizontal }: { rowPaddingHorizontal: number }) => {\n const styles = useStyles({ rowPaddingHorizontal })\n const navigation = useNavigation()\n const route = useRoute<RouteProp<ConversationScreenProps['route']>>()\n const { chat_group_graph_id } = route.params || {}\n const { data: group } = useApiGet<GroupResource>({\n url: `/me/groups/${chat_group_graph_id}`,\n data: {\n fields: {\n Group: [],\n },\n },\n enabled: !!chat_group_graph_id,\n app: 'chat',\n })\n\n const handleBadgePress = useCallback(() => {\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n })\n }, [navigation])\n\n if (!group) return null\n\n return (\n <View style={styles.row}>\n <Badge iconNameRight=\"general.x\" label={group?.name || ''} onPress={handleBadgePress} />\n </View>\n )\n}\n\nconst useStyles = ({ rowPaddingHorizontal }: { rowPaddingHorizontal: number }) => {\n return StyleSheet.create({\n row: {\n flexDirection: 'row',\n paddingHorizontal: rowPaddingHorizontal,\n },\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"list_header_component.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversations/components/list_header_component.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAgBnD,eAAO,MAAM,mBAAmB,yBAgH/B,CAAA"}
1
+ {"version":3,"file":"list_header_component.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversations/components/list_header_component.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAkBnD,eAAO,MAAM,mBAAmB,yBA8G/B,CAAA"}
@@ -6,6 +6,7 @@ import { useCurrentPerson, useCurrentPersonCache, useTheme } from '../../../hook
6
6
  import { useMarkAllRead } from '../../../hooks/use_conversations_actions';
7
7
  import { useCanDisplayGroups } from '../../../hooks/use_groups';
8
8
  import { ChatGroupBadge } from './chat_group_badge';
9
+ const ROW_PADDING_HORIZONTAL = 16;
9
10
  var FilterTypes;
10
11
  (function (FilterTypes) {
11
12
  FilterTypes["All"] = "All";
@@ -78,9 +79,7 @@ export const ListHeaderComponent = () => {
78
79
  group_source_app_name,
79
80
  })} active={active === FilterTypes.More} iconNameRight="general.threeReducingHorizontalBars" accessibilityLabel={showAppFilters ? 'View all filters' : 'View more filters'}/>
80
81
  </ScrollView>
81
- <View style={styles.chatGroupBadgeRow}>
82
- <ChatGroupBadge />
83
- </View>
82
+ <ChatGroupBadge rowPaddingHorizontal={ROW_PADDING_HORIZONTAL}/>
84
83
  </View>);
85
84
  };
86
85
  const useStyles = () => {
@@ -96,16 +95,13 @@ const useStyles = () => {
96
95
  flexDirection: 'row',
97
96
  justifyContent: 'space-between',
98
97
  paddingTop: 8,
99
- paddingHorizontal: 16,
98
+ paddingHorizontal: ROW_PADDING_HORIZONTAL,
100
99
  },
101
100
  filterRow: {
102
101
  flexDirection: 'row',
103
102
  justifyContent: 'flex-start',
104
103
  gap: 8,
105
- paddingHorizontal: 16,
106
- },
107
- chatGroupBadgeRow: {
108
- paddingHorizontal: 16,
104
+ paddingHorizontal: ROW_PADDING_HORIZONTAL,
109
105
  },
110
106
  });
111
107
  };
@@ -1 +1 @@
1
- {"version":3,"file":"list_header_component.js","sourceRoot":"","sources":["../../../../src/screens/conversations/components/list_header_component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,IAAK,WAKJ;AALD,WAAK,WAAW;IACd,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EALI,WAAW,KAAX,WAAW,QAKf;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAA;IAClG,MAAM,iBAAiB,GA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M,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE;YACV,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;YACvD,aAAa,EAAE,EAAE;YACjB,GAAG,EAAE,EAAE;SACR;QACD,QAAQ,EAAE;YACR,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,CAAC;YACb,iBAAiB,EAAE,EAAE;SACtB;QACD,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,YAAY;YAC5B,GAAG,EAAE,CAAC;YACN,iBAAiB,EAAE,EAAE;SACtB;QACD,iBAAiB,EAAE;YACjB,iBAAiB,EAAE,EAAE;SACtB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'\nimport React, { useCallback, useMemo } from 'react'\nimport { Alert, ScrollView, StyleSheet, View } from 'react-native'\nimport { Heading, TextButton, ToggleButton } from '../../../components'\nimport { useCurrentPerson, useCurrentPersonCache, useTheme } from '../../../hooks'\nimport { useMarkAllRead } from '../../../hooks/use_conversations_actions'\nimport { useCanDisplayGroups } from '../../../hooks/use_groups'\nimport { ConversationScreenProps } from '../conversations_screen'\nimport { ChatGroupBadge } from './chat_group_badge'\n\nenum FilterTypes {\n All = 'All',\n Groups = 'Groups',\n Teams = 'Teams',\n More = 'More',\n}\n\nexport const ListHeaderComponent = () => {\n const styles = useStyles()\n const navigation = useNavigation()\n const canFilterByTeams = useCanDisplayGroups({ source_app_name: 'Services', source_type: 'Team' })\n const canFilterByGroups = useCanDisplayGroups({ source_app_name: 'Groups', source_type: 'Group' })\n const route = useRoute<RouteProp<ConversationScreenProps['route']>>()\n const { chat_group_graph_id, group_source_app_name = '' } = route.params || {}\n\n const { unreadCount } = useCurrentPerson()\n const currentPersonCache = useCurrentPersonCache()\n const { markAllRead, isPending } = useMarkAllRead()\n\n const active: FilterTypes = useMemo(() => {\n if (chat_group_graph_id) {\n return FilterTypes.More\n } else if (/groups/i.test(group_source_app_name)) {\n return FilterTypes.Groups\n } else if (/services/i.test(group_source_app_name)) {\n return FilterTypes.Teams\n }\n\n return FilterTypes.All\n }, [chat_group_graph_id, group_source_app_name])\n\n const handleMarkAllRead = useCallback(() => {\n currentPersonCache.update({ unreadCount: 0 })\n markAllRead()\n }, [currentPersonCache, markAllRead])\n\n const alertMarkAllRead = useCallback(() => {\n if (active === FilterTypes.All) return handleMarkAllRead()\n\n Alert.alert('Mark all read', 'This includes conversations not shown by the current filter.', [\n { text: 'Cancel' },\n { text: 'OK', onPress: () => handleMarkAllRead() },\n ])\n }, [active, handleMarkAllRead])\n\n const showAppFilters = canFilterByGroups && canFilterByTeams\n\n return (\n <View style={styles.listHeader}>\n <View style={styles.titleRow}>\n <Heading numberOfLines={1} variant=\"h2\">\n Conversations\n </Heading>\n <TextButton onPress={alertMarkAllRead} disabled={isPending || !unreadCount}>\n Mark all read\n </TextButton>\n </View>\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={styles.filterRow}\n accessibilityRole=\"toolbar\"\n >\n {showAppFilters && (\n <>\n <ToggleButton\n title={FilterTypes.All}\n active={active === FilterTypes.All}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n })\n }\n accessibilityLabel=\"Show all conversations\"\n />\n <ToggleButton\n title={FilterTypes.Groups}\n active={active === FilterTypes.Groups}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Groups',\n })\n }\n accessibilityLabel=\"Filter to group conversations\"\n />\n\n <ToggleButton\n title={FilterTypes.Teams}\n active={active === FilterTypes.Teams}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Services',\n })\n }\n accessibilityLabel=\"Filter to team conversations\"\n />\n </>\n )}\n <ToggleButton\n title={showAppFilters ? FilterTypes.More : 'Filter'}\n onPress={() =>\n navigation.navigate('ConversationFilters', {\n chat_group_graph_id,\n group_source_app_name,\n })\n }\n active={active === FilterTypes.More}\n iconNameRight=\"general.threeReducingHorizontalBars\"\n accessibilityLabel={showAppFilters ? 'View all filters' : 'View more filters'}\n />\n </ScrollView>\n <View style={styles.chatGroupBadgeRow}>\n <ChatGroupBadge />\n </View>\n </View>\n )\n}\n\nconst useStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n listHeader: {\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n paddingBottom: 16,\n gap: 12,\n },\n titleRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingTop: 8,\n paddingHorizontal: 16,\n },\n filterRow: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n gap: 8,\n paddingHorizontal: 16,\n },\n chatGroupBadgeRow: {\n paddingHorizontal: 16,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"list_header_component.js","sourceRoot":"","sources":["../../../../src/screens/conversations/components/list_header_component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAE/D,OAAO,EAAE,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,UAAU,CAAC,QAAQ,CAAC,qBAAqB,EAAE;YACzC,mBAAmB;YACnB,qBAAqB;SACtB,CACH,CAAC,CACD,MAAM,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,IAAI,CAAC,CACpC,aAAa,CAAC,qCAAqC,CACnD,kBAAkB,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC,EAElF;MAAA,EAAE,UAAU,CACZ;MAAA,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,sBAAsB,CAAC,EAC/D;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE;YACV,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;YACvD,aAAa,EAAE,EAAE;YACjB,GAAG,EAAE,EAAE;SACR;QACD,QAAQ,EAAE;YACR,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,CAAC;YACb,iBAAiB,EAAE,sBAAsB;SAC1C;QACD,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,YAAY;YAC5B,GAAG,EAAE,CAAC;YACN,iBAAiB,EAAE,sBAAsB;SAC1C;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'\nimport React, { useCallback, useMemo } from 'react'\nimport { Alert, ScrollView, StyleSheet, View } from 'react-native'\nimport { Heading, TextButton, ToggleButton } from '../../../components'\nimport { useCurrentPerson, useCurrentPersonCache, useTheme } from '../../../hooks'\nimport { useMarkAllRead } from '../../../hooks/use_conversations_actions'\nimport { useCanDisplayGroups } from '../../../hooks/use_groups'\nimport { ConversationScreenProps } from '../conversations_screen'\nimport { ChatGroupBadge } from './chat_group_badge'\n\nconst ROW_PADDING_HORIZONTAL = 16\n\nenum FilterTypes {\n All = 'All',\n Groups = 'Groups',\n Teams = 'Teams',\n More = 'More',\n}\n\nexport const ListHeaderComponent = () => {\n const styles = useStyles()\n const navigation = useNavigation()\n const canFilterByTeams = useCanDisplayGroups({ source_app_name: 'Services', source_type: 'Team' })\n const canFilterByGroups = useCanDisplayGroups({ source_app_name: 'Groups', source_type: 'Group' })\n const route = useRoute<RouteProp<ConversationScreenProps['route']>>()\n const { chat_group_graph_id, group_source_app_name = '' } = route.params || {}\n\n const { unreadCount } = useCurrentPerson()\n const currentPersonCache = useCurrentPersonCache()\n const { markAllRead, isPending } = useMarkAllRead()\n\n const active: FilterTypes = useMemo(() => {\n if (chat_group_graph_id) {\n return FilterTypes.More\n } else if (/groups/i.test(group_source_app_name)) {\n return FilterTypes.Groups\n } else if (/services/i.test(group_source_app_name)) {\n return FilterTypes.Teams\n }\n\n return FilterTypes.All\n }, [chat_group_graph_id, group_source_app_name])\n\n const handleMarkAllRead = useCallback(() => {\n currentPersonCache.update({ unreadCount: 0 })\n markAllRead()\n }, [currentPersonCache, markAllRead])\n\n const alertMarkAllRead = useCallback(() => {\n if (active === FilterTypes.All) return handleMarkAllRead()\n\n Alert.alert('Mark all read', 'This includes conversations not shown by the current filter.', [\n { text: 'Cancel' },\n { text: 'OK', onPress: () => handleMarkAllRead() },\n ])\n }, [active, handleMarkAllRead])\n\n const showAppFilters = canFilterByGroups && canFilterByTeams\n\n return (\n <View style={styles.listHeader}>\n <View style={styles.titleRow}>\n <Heading numberOfLines={1} variant=\"h2\">\n Conversations\n </Heading>\n <TextButton onPress={alertMarkAllRead} disabled={isPending || !unreadCount}>\n Mark all read\n </TextButton>\n </View>\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={styles.filterRow}\n accessibilityRole=\"toolbar\"\n >\n {showAppFilters && (\n <>\n <ToggleButton\n title={FilterTypes.All}\n active={active === FilterTypes.All}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n })\n }\n accessibilityLabel=\"Show all conversations\"\n />\n <ToggleButton\n title={FilterTypes.Groups}\n active={active === FilterTypes.Groups}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Groups',\n })\n }\n accessibilityLabel=\"Filter to group conversations\"\n />\n\n <ToggleButton\n title={FilterTypes.Teams}\n active={active === FilterTypes.Teams}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Services',\n })\n }\n accessibilityLabel=\"Filter to team conversations\"\n />\n </>\n )}\n <ToggleButton\n title={showAppFilters ? FilterTypes.More : 'Filter'}\n onPress={() =>\n navigation.navigate('ConversationFilters', {\n chat_group_graph_id,\n group_source_app_name,\n })\n }\n active={active === FilterTypes.More}\n iconNameRight=\"general.threeReducingHorizontalBars\"\n accessibilityLabel={showAppFilters ? 'View all filters' : 'View more filters'}\n />\n </ScrollView>\n <ChatGroupBadge rowPaddingHorizontal={ROW_PADDING_HORIZONTAL} />\n </View>\n )\n}\n\nconst useStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n listHeader: {\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n paddingBottom: 16,\n gap: 12,\n },\n titleRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingTop: 8,\n paddingHorizontal: ROW_PADDING_HORIZONTAL,\n },\n filterRow: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n gap: 8,\n paddingHorizontal: ROW_PADDING_HORIZONTAL,\n },\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"message_actions_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_actions_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAEzF,OAAO,KAAsB,MAAM,OAAO,CAAA;AAa1C,eAAO,MAAM,2BAA2B,uEAGtC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAA;CACvC,CAAC,CAAA;AAEF,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,yBAAyB,qBAoJxE"}
1
+ {"version":3,"file":"message_actions_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_actions_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAGzF,OAAO,KAAsB,MAAM,OAAO,CAAA;AAY1C,eAAO,MAAM,2BAA2B,uEAGtC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAA;CACvC,CAAC,CAAA;AAEF,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,yBAAyB,qBAoJxE"}
@@ -1,17 +1,17 @@
1
1
  import { PlatformPressable } from '@react-navigation/elements';
2
2
  import { StackActions, useNavigation } from '@react-navigation/native';
3
3
  import { useMutation } from '@tanstack/react-query';
4
+ import { isNil, omitBy } from 'lodash';
4
5
  import React, { useCallback } from 'react';
5
6
  import { Alert, Platform, StyleSheet, View } from 'react-native';
6
7
  import { Text } from '../components';
7
8
  import { REACTION_EMOJIS, useReactionStyles } from '../components/conversation/message_reaction';
9
+ import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
8
10
  import { useCreateAndroidRippleColor, useFontScale, useTheme } from '../hooks';
9
11
  import { useApiClient } from '../hooks/use_api_client';
10
12
  import { useConversationMessages } from '../hooks/use_conversation_messages';
11
13
  import { useMessageReactionToggle } from '../hooks/use_message_reaction_toggle';
12
14
  import { Clipboard } from '../utils/native_adapters';
13
- import { isNil, omitBy } from 'lodash';
14
- import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
15
15
  export const MessageActionsScreenOptions = getFormSheetScreenOptions({
16
16
  sheetAllowedDetents: [0.5],
17
17
  headerTitle: 'Message actions',
@@ -87,7 +87,7 @@ export function MessageActionsScreen({ route }) {
87
87
  }, isNil);
88
88
  navigation.dispatch(StackActions.popTo('MessageReadReceipts', params));
89
89
  }, [navigation, conversation_id, message_id]);
90
- return (<FormSheet.Root>
90
+ return (<FormSheet.Root style={styles.formSheetContent}>
91
91
  <View style={styles.reactionList}>
92
92
  {availableReactions.map((reaction, index) => (<Reaction key={index} reaction={reaction} onPress={() => handleReactionToggle({
93
93
  value: reaction.value,
@@ -122,6 +122,9 @@ const useStyles = () => {
122
122
  android: baseSize + btnBorderWidth * 2,
123
123
  });
124
124
  return StyleSheet.create({
125
+ formSheetContent: {
126
+ paddingTop: 16,
127
+ },
125
128
  reactionList: {
126
129
  flexDirection: 'row',
127
130
  justifyContent: 'center',