@planningcenter/chat-react-native 3.35.0-rc.4 → 3.35.0-rc.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"group_notification_settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAoB,MAAM,OAAO,CAAA;AAYxC,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACnE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC,CAAA;AAEF,wBAAgB,+BAA+B,CAAC,EAAE,KAAK,EAAE,EAAE,oCAAoC,qBA0D9F"}
1
+ {"version":3,"file":"group_notification_settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAoB,MAAM,OAAO,CAAA;AAYxC,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACnE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC,CAAA;AAEF,wBAAgB,+BAA+B,CAAC,EAAE,KAAK,EAAE,EAAE,oCAAoC,qBA4D9F"}
@@ -23,12 +23,14 @@ export function GroupNotificationSettingsScreen({ route }) {
23
23
  return (<View style={styles.container}>
24
24
  <View style={styles.sectionOuter}>
25
25
  <View style={styles.sectionInner}>
26
- <Heading variant="h3" style={styles.sectionHeading}>
26
+ <Heading variant="h2" style={styles.sectionHeading}>
27
27
  Group notification settings
28
28
  </Heading>
29
29
  <Text variant="tertiary" style={styles.sectionSubtitle}>
30
30
  The settings are applied to all conversations in{' '}
31
- <Text style={styles.groupNameBold}>{group.name || title}</Text>
31
+ <Text variant="tertiary" style={styles.groupNameBold}>
32
+ {group.name || title}
33
+ </Text>
32
34
  </Text>
33
35
  </View>
34
36
  </View>
@@ -62,10 +64,11 @@ const useStyles = () => {
62
64
  borderBottomColor: colors.borderColorDefaultBase,
63
65
  },
64
66
  sectionHeading: {
65
- paddingBottom: 4,
67
+ paddingBottom: 12,
66
68
  },
67
69
  sectionSubtitle: {
68
70
  color: colors.textColorDefaultSecondary,
71
+ paddingBottom: 2,
69
72
  },
70
73
  groupNameBold: {
71
74
  fontWeight: platformFontWeightBold,
@@ -1 +1 @@
1
- {"version":3,"file":"group_notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAA;AAW/D,MAAM,UAAU,+BAA+B,CAAC,EAAE,KAAK,EAAwC;IAC7F,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IACvC,MAAM,UAAU,GACd,aAAa,EAAsE,CAAA;IACrF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IA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BAAiB,EAAE,MAAM,CAAC,sBAAsB;SACjD;QACD,cAAc,EAAE;YACd,aAAa,EAAE,CAAC;SACjB;QACD,eAAe,EAAE;YACf,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,aAAa,EAAE;YACb,UAAU,EAAE,sBAAsB;SACnC;QACD,mBAAmB,EAAE;YACnB,WAAW,EAAE,EAAE;SAChB;QACD,eAAe,EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;SACpB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport type { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useEffect } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useTheme } from '../hooks'\nimport { platformFontWeightBold } from '../utils/styles'\nimport type { GroupNotificationLevelSelectScreenProps } from './group_notification_level_select_screen'\nimport { useGroup } from './notification_settings/hooks/groups'\n\ntype GroupNotificationSettingsStackParamList = {\n GroupNotificationLevelSelect: GroupNotificationLevelSelectScreenProps['route']['params']\n}\n\nexport type GroupNotificationSettingsScreenProps = StaticScreenProps<{\n groupId: number | string\n title: string\n}>\n\nexport function GroupNotificationSettingsScreen({ route }: GroupNotificationSettingsScreenProps) {\n const { groupId, title } = route.params\n const navigation =\n useNavigation<NativeStackNavigationProp<GroupNotificationSettingsStackParamList>>()\n const styles = useStyles()\n const { data: group } = useGroup({ groupId })\n\n const notificationLevelDescription = group.myGroupMembership?.notificationLevelDescription\n\n useEffect(() => {\n if (!group.name || title === group.name) return\n\n navigation.setOptions({ title: group.name })\n }, [group.name, title, navigation])\n\n const handleOpenSelector = () => {\n navigation.navigate('GroupNotificationLevelSelect', { groupId })\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.sectionOuter}>\n <View style={styles.sectionInner}>\n <Heading variant=\"h3\" style={styles.sectionHeading}>\n Group notification settings\n </Heading>\n <Text variant=\"tertiary\" style={styles.sectionSubtitle}>\n The settings are applied to all conversations in{' '}\n <Text style={styles.groupNameBold}>{group.name || title}</Text>\n </Text>\n </View>\n </View>\n <PlatformPressable\n style={styles.settingRowPressable}\n onPress={handleOpenSelector}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Notify me for\"\n accessibilityHint={`Currently set to ${notificationLevelDescription}. Tap to change.`}\n >\n <View style={styles.settingRowInner}>\n <View style={styles.settingRowText}>\n <Text>Notify me for</Text>\n {Boolean(notificationLevelDescription) && (\n <Text variant=\"tertiary\">{notificationLevelDescription}</Text>\n )}\n </View>\n {Platform.OS === 'ios' && (\n <Icon\n name=\"general.rightChevron\"\n size={16}\n style={styles.chevron}\n accessibilityElementsHidden\n />\n )}\n </View>\n </PlatformPressable>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n sectionOuter: {\n paddingLeft: 16,\n backgroundColor: colors.surfaceColor100,\n },\n sectionInner: {\n paddingRight: 16,\n paddingTop: 24,\n paddingBottom: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n sectionHeading: {\n paddingBottom: 4,\n },\n sectionSubtitle: {\n color: colors.textColorDefaultSecondary,\n },\n groupNameBold: {\n fontWeight: platformFontWeightBold,\n },\n settingRowPressable: {\n paddingLeft: 16,\n },\n settingRowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 12,\n },\n settingRowText: {\n flex: 1,\n gap: 2,\n },\n chevron: {\n color: colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"group_notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAA;AAW/D,MAAM,UAAU,+BAA+B,CAAC,EAAE,KAAK,EAAwC;IAC7F,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IACvC,MAAM,UAAU,GACd,aAAa,EAAsE,CAAA;IACrF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IAE7C,MAAM,4BAA4B,GAAG,KAAK,CAAC,iBAAiB,EAAE,4BAA4B,CAAA;IAE1F,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,IAAI;YAAE,OAAM;QAE/C,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAA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EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;SACpB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport type { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useEffect } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useTheme } from '../hooks'\nimport { platformFontWeightBold } from '../utils/styles'\nimport type { GroupNotificationLevelSelectScreenProps } from './group_notification_level_select_screen'\nimport { useGroup } from './notification_settings/hooks/groups'\n\ntype GroupNotificationSettingsStackParamList = {\n GroupNotificationLevelSelect: GroupNotificationLevelSelectScreenProps['route']['params']\n}\n\nexport type GroupNotificationSettingsScreenProps = StaticScreenProps<{\n groupId: number | string\n title: string\n}>\n\nexport function GroupNotificationSettingsScreen({ route }: GroupNotificationSettingsScreenProps) {\n const { groupId, title } = route.params\n const navigation =\n useNavigation<NativeStackNavigationProp<GroupNotificationSettingsStackParamList>>()\n const styles = useStyles()\n const { data: group } = useGroup({ groupId })\n\n const notificationLevelDescription = group.myGroupMembership?.notificationLevelDescription\n\n useEffect(() => {\n if (!group.name || title === group.name) return\n\n navigation.setOptions({ title: group.name })\n }, [group.name, title, navigation])\n\n const handleOpenSelector = () => {\n navigation.navigate('GroupNotificationLevelSelect', { groupId })\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.sectionOuter}>\n <View style={styles.sectionInner}>\n <Heading variant=\"h2\" style={styles.sectionHeading}>\n Group notification settings\n </Heading>\n <Text variant=\"tertiary\" style={styles.sectionSubtitle}>\n The settings are applied to all conversations in{' '}\n <Text variant=\"tertiary\" style={styles.groupNameBold}>\n {group.name || title}\n </Text>\n </Text>\n </View>\n </View>\n <PlatformPressable\n style={styles.settingRowPressable}\n onPress={handleOpenSelector}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Notify me for\"\n accessibilityHint={`Currently set to ${notificationLevelDescription}. Tap to change.`}\n >\n <View style={styles.settingRowInner}>\n <View style={styles.settingRowText}>\n <Text>Notify me for</Text>\n {Boolean(notificationLevelDescription) && (\n <Text variant=\"tertiary\">{notificationLevelDescription}</Text>\n )}\n </View>\n {Platform.OS === 'ios' && (\n <Icon\n name=\"general.rightChevron\"\n size={16}\n style={styles.chevron}\n accessibilityElementsHidden\n />\n )}\n </View>\n </PlatformPressable>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n sectionOuter: {\n paddingLeft: 16,\n backgroundColor: colors.surfaceColor100,\n },\n sectionInner: {\n paddingRight: 16,\n paddingTop: 24,\n paddingBottom: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n sectionHeading: {\n paddingBottom: 12,\n },\n sectionSubtitle: {\n color: colors.textColorDefaultSecondary,\n paddingBottom: 2,\n },\n groupNameBold: {\n fontWeight: platformFontWeightBold,\n },\n settingRowPressable: {\n paddingLeft: 16,\n },\n settingRowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 12,\n },\n settingRowText: {\n flex: 1,\n gap: 2,\n },\n chevron: {\n color: colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
@@ -56,7 +56,7 @@ export function NotificationSettingsScreen({}) {
56
56
  ...chatTypes.map(type => ({
57
57
  type: SectionTypes.link,
58
58
  data: {
59
- title: `${type.title} Conversations`,
59
+ title: `${type.title} conversations`,
60
60
  rightLabel: type.preferredApp,
61
61
  onPress: () => navigation.navigate('PreferredAppSelection', {
62
62
  chatTypeId: type.id,
@@ -157,7 +157,7 @@ function LinkRow({ title, subtitle, rightLabel, onPress }) {
157
157
  <Text style={styles.title} numberOfLines={2}>
158
158
  {title}
159
159
  </Text>
160
- {Boolean(subtitle) && <Text variant="footnote">{subtitle}</Text>}
160
+ {Boolean(subtitle) && <Text variant="tertiary">{subtitle}</Text>}
161
161
  </View>
162
162
  <View style={styles.rightContent}>
163
163
  {isSourceType ? (<Badge label={rightLabel} appearance="neutral" variant="meta"/>) : (<Text numberOfLines={1} style={styles.rightLabelText}>
@@ -1 +1 @@
1
- {"version":3,"file":"notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/notification_settings_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAA;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAEnE,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAK,YAMJ;AAND,WAAK,YAAY;IACf,mDAAM,CAAA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ACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,KAAK,EAAE,EAAE;QACT,cAAc,EAAE;YACd,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,yBAAyB;SAC9C;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,wBAAwB;SAC7C;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback, useEffect, type ReactNode } from 'react'\nimport { FlatList, Platform, StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Badge, Heading, Icon, Text } from '../components'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport { useTheme } from '../hooks'\nimport { isDefined } from '../types'\nimport { useGroups } from './notification_settings/hooks/groups'\nimport { useChatTypes } from './preferred_app/hooks/use_chat_types'\n\n// =========================================\n// ====== Factory Constants & Types ========\n// =========================================\n\nenum SectionTypes {\n header,\n hidden,\n setting,\n view,\n link,\n}\n\ntype SectionListData = Array<\n | DataItem<{ title: string }, SectionTypes.header>\n | DataItem<ViewProps, SectionTypes.view>\n | DataItem<SettingRowProps, SectionTypes.setting>\n | DataItem<LinkRowProps, SectionTypes.link>\n | DataItem<any, SectionTypes.hidden>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionOuterStyle?: ViewStyle\n sectionInnerStyle?: ViewStyle\n showBottomBorder?: boolean\n}\n\n// =================================\n// ====== Components ===============\n// =================================\n\nexport type NotificationSettingsScreenProps = StaticScreenProps<{}>\n\nexport function NotificationSettingsScreen({}: NotificationSettingsScreenProps) {\n const navigation = useNavigation()\n const styles = useStyles()\n const { data: chatTypes } = useChatTypes()\n const { data: groups } = useGroups()\n\n // Header configuration\n const HeaderRight = useCallback(() => {\n return (\n <HeaderTextButton\n onPress={() => {\n // Save settings logic would go here\n navigation.goBack()\n }}\n title=\"Done\"\n />\n )\n }, [navigation])\n\n useEffect(() => {\n navigation.setOptions({\n headerRight: HeaderRight,\n })\n }, [HeaderRight, navigation])\n\n // Build section data\n const listData = [\n {\n type: SectionTypes.header,\n data: { title: 'Preferred app' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Choose which app receives each type of chat notification\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...chatTypes.map(type => ({\n type: SectionTypes.link,\n data: {\n title: `${type.title} Conversations`,\n rightLabel: type.preferredApp,\n onPress: () =>\n navigation.navigate('PreferredAppSelection', {\n chatTypeId: type.id,\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.header,\n data: {\n title: 'Manage chat settings',\n },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Notification settings for all of your group, team and event related conversations\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...groups.map(group => ({\n type: SectionTypes.link,\n data: {\n title: group.name,\n subtitle: group.myGroupMembership?.notificationLevelDescription,\n rightLabel: group.sourceType,\n onPress: () =>\n navigation.navigate('GroupNotificationSettings', {\n groupId: group.id,\n title: group.name || 'Group',\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n ].filter(item => item.type !== SectionTypes.hidden)\n\n const headerIndices = listData\n .map(({ type }, index) => (type === SectionTypes.header ? index : undefined))\n .filter(isDefined)\n\n return (\n <View style={styles.listContainer}>\n <FlatList\n data={listData as SectionListData}\n contentContainerStyle={styles.contentContainer}\n renderItem={({ item, index }) => {\n const [isStart, isEnd] = [\n index === 0 || headerIndices.includes(index),\n index === listData.length - 1 || headerIndices.includes(index + 1),\n ]\n\n switch (item.type) {\n case SectionTypes.header:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Heading variant=\"h2\">{item.data.title}</Heading>\n </ListSection>\n )\n case SectionTypes.setting:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <SettingRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.view:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <View {...item.data} style={item.data.style} />\n </ListSection>\n )\n case SectionTypes.link:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <LinkRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.hidden:\n default:\n return null\n }\n }}\n />\n </View>\n )\n}\n\ninterface ListSectionProps {\n isStart?: boolean\n isEnd?: boolean\n showBottomBorder?: boolean\n outerStyle?: ViewStyle\n innerStyle?: ViewStyle\n children: ReactNode\n}\n\nfunction ListSection({\n isStart,\n isEnd,\n showBottomBorder,\n outerStyle,\n innerStyle,\n children,\n}: ListSectionProps) {\n const styles = useStyles({ isStart, isEnd })\n const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {}\n\n return (\n <View style={[styles.sectionOuterBase, outerStyle]}>\n <View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>\n </View>\n )\n}\n\ninterface SettingRowProps {\n title: string\n style?: ViewStyle\n rightItem?: ReactNode\n rightLabel?: string\n rightItemStyle?: ViewStyle\n}\n\nfunction SettingRow({ title, style, rightLabel, rightItem, rightItemStyle = {} }: SettingRowProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.settingRow, style]}>\n <View style={styles.settingRowContent}>\n <Text variant=\"plain\" style={styles.settingRowText}>\n {title}\n </Text>\n {Boolean(rightLabel) && <Text variant=\"footnote\">{rightLabel}</Text>}\n </View>\n {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}\n </View>\n )\n}\n\ninterface LinkRowProps {\n title: string\n subtitle?: string\n rightLabel: string\n onPress: () => void\n}\n\nfunction LinkRow({ title, subtitle, rightLabel, onPress }: LinkRowProps) {\n const styles = useLinkRowStyles()\n const isSourceType = rightLabel === 'Team' || rightLabel === 'Group' || rightLabel === 'PlanTeam'\n\n return (\n <PlatformPressable\n style={styles.row}\n onPress={onPress}\n accessibilityRole=\"link\"\n accessibilityLabel={title}\n accessibilityHint={`Navigate to ${title} settings`}\n >\n <View style={styles.innerContainer}>\n <View style={styles.leftContent}>\n <Text style={styles.title} numberOfLines={2}>\n {title}\n </Text>\n {Boolean(subtitle) && <Text variant=\"footnote\">{subtitle}</Text>}\n </View>\n <View style={styles.rightContent}>\n {isSourceType ? (\n <Badge label={rightLabel} appearance=\"neutral\" variant=\"meta\" />\n ) : (\n <Text numberOfLines={1} style={styles.rightLabelText}>\n {rightLabel}\n </Text>\n )}\n {Platform.OS === 'ios' && (\n <Icon name=\"general.rightChevron\" size={16} style={styles.icon} />\n )}\n </View>\n </View>\n </PlatformPressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({}: { isStart?: boolean; isEnd?: boolean } = {}) => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n const headerBottomPadding = 0\n\n return StyleSheet.create({\n listContainer: {\n flex: 1,\n },\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionOuterBase: {\n paddingLeft: 16,\n },\n sectionInnerBase: {\n paddingRight: 16,\n paddingVertical: 16,\n },\n sectionInnerHeader: {\n paddingTop: 24,\n paddingBottom: headerBottomPadding,\n },\n sectionInnerBottomBorder: {\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n sectionDescription: {\n color: colors.textColorDefaultSecondary,\n },\n settingRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n },\n settingRowContent: {\n flex: 1,\n },\n settingRowText: {\n lineHeight: 20,\n },\n })\n}\n\nconst useLinkRowStyles = () => {\n const theme = useTheme()\n\n return StyleSheet.create({\n row: {\n paddingLeft: 0,\n paddingVertical: 16,\n },\n innerContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n },\n leftContent: {\n flex: 1,\n gap: 4,\n },\n rightContent: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n title: {},\n rightLabelText: {\n color: theme.colors.textColorDefaultSecondary,\n },\n icon: {\n color: theme.colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/notification_settings_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAA;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAC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,EAAE,EAAE;SACpB;QACD,cAAc,EAAE;YACd,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,GAAG,EAAE,EAAE;SACR;QACD,WAAW,EAAE;YACX,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,YAAY,EAAE;YACZ,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,KAAK,EAAE,EAAE;QACT,cAAc,EAAE;YACd,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,yBAAyB;SAC9C;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,wBAAwB;SAC7C;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback, useEffect, type ReactNode } from 'react'\nimport { FlatList, Platform, StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Badge, Heading, Icon, Text } from '../components'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport { useTheme } from '../hooks'\nimport { isDefined } from '../types'\nimport { useGroups } from './notification_settings/hooks/groups'\nimport { useChatTypes } from './preferred_app/hooks/use_chat_types'\n\n// =========================================\n// ====== Factory Constants & Types ========\n// =========================================\n\nenum SectionTypes {\n header,\n hidden,\n setting,\n view,\n link,\n}\n\ntype SectionListData = Array<\n | DataItem<{ title: string }, SectionTypes.header>\n | DataItem<ViewProps, SectionTypes.view>\n | DataItem<SettingRowProps, SectionTypes.setting>\n | DataItem<LinkRowProps, SectionTypes.link>\n | DataItem<any, SectionTypes.hidden>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionOuterStyle?: ViewStyle\n sectionInnerStyle?: ViewStyle\n showBottomBorder?: boolean\n}\n\n// =================================\n// ====== Components ===============\n// =================================\n\nexport type NotificationSettingsScreenProps = StaticScreenProps<{}>\n\nexport function NotificationSettingsScreen({}: NotificationSettingsScreenProps) {\n const navigation = useNavigation()\n const styles = useStyles()\n const { data: chatTypes } = useChatTypes()\n const { data: groups } = useGroups()\n\n // Header configuration\n const HeaderRight = useCallback(() => {\n return (\n <HeaderTextButton\n onPress={() => {\n // Save settings logic would go here\n navigation.goBack()\n }}\n title=\"Done\"\n />\n )\n }, [navigation])\n\n useEffect(() => {\n navigation.setOptions({\n headerRight: HeaderRight,\n })\n }, [HeaderRight, navigation])\n\n // Build section data\n const listData = [\n {\n type: SectionTypes.header,\n data: { title: 'Preferred app' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Choose which app receives each type of chat notification\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...chatTypes.map(type => ({\n type: SectionTypes.link,\n data: {\n title: `${type.title} conversations`,\n rightLabel: type.preferredApp,\n onPress: () =>\n navigation.navigate('PreferredAppSelection', {\n chatTypeId: type.id,\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.header,\n data: {\n title: 'Manage chat settings',\n },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Notification settings for all of your group, team and event related conversations\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...groups.map(group => ({\n type: SectionTypes.link,\n data: {\n title: group.name,\n subtitle: group.myGroupMembership?.notificationLevelDescription,\n rightLabel: group.sourceType,\n onPress: () =>\n navigation.navigate('GroupNotificationSettings', {\n groupId: group.id,\n title: group.name || 'Group',\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n ].filter(item => item.type !== SectionTypes.hidden)\n\n const headerIndices = listData\n .map(({ type }, index) => (type === SectionTypes.header ? index : undefined))\n .filter(isDefined)\n\n return (\n <View style={styles.listContainer}>\n <FlatList\n data={listData as SectionListData}\n contentContainerStyle={styles.contentContainer}\n renderItem={({ item, index }) => {\n const [isStart, isEnd] = [\n index === 0 || headerIndices.includes(index),\n index === listData.length - 1 || headerIndices.includes(index + 1),\n ]\n\n switch (item.type) {\n case SectionTypes.header:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Heading variant=\"h2\">{item.data.title}</Heading>\n </ListSection>\n )\n case SectionTypes.setting:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <SettingRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.view:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <View {...item.data} style={item.data.style} />\n </ListSection>\n )\n case SectionTypes.link:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <LinkRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.hidden:\n default:\n return null\n }\n }}\n />\n </View>\n )\n}\n\ninterface ListSectionProps {\n isStart?: boolean\n isEnd?: boolean\n showBottomBorder?: boolean\n outerStyle?: ViewStyle\n innerStyle?: ViewStyle\n children: ReactNode\n}\n\nfunction ListSection({\n isStart,\n isEnd,\n showBottomBorder,\n outerStyle,\n innerStyle,\n children,\n}: ListSectionProps) {\n const styles = useStyles({ isStart, isEnd })\n const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {}\n\n return (\n <View style={[styles.sectionOuterBase, outerStyle]}>\n <View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>\n </View>\n )\n}\n\ninterface SettingRowProps {\n title: string\n style?: ViewStyle\n rightItem?: ReactNode\n rightLabel?: string\n rightItemStyle?: ViewStyle\n}\n\nfunction SettingRow({ title, style, rightLabel, rightItem, rightItemStyle = {} }: SettingRowProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.settingRow, style]}>\n <View style={styles.settingRowContent}>\n <Text variant=\"plain\" style={styles.settingRowText}>\n {title}\n </Text>\n {Boolean(rightLabel) && <Text variant=\"footnote\">{rightLabel}</Text>}\n </View>\n {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}\n </View>\n )\n}\n\ninterface LinkRowProps {\n title: string\n subtitle?: string\n rightLabel: string\n onPress: () => void\n}\n\nfunction LinkRow({ title, subtitle, rightLabel, onPress }: LinkRowProps) {\n const styles = useLinkRowStyles()\n const isSourceType = rightLabel === 'Team' || rightLabel === 'Group' || rightLabel === 'PlanTeam'\n\n return (\n <PlatformPressable\n style={styles.row}\n onPress={onPress}\n accessibilityRole=\"link\"\n accessibilityLabel={title}\n accessibilityHint={`Navigate to ${title} settings`}\n >\n <View style={styles.innerContainer}>\n <View style={styles.leftContent}>\n <Text style={styles.title} numberOfLines={2}>\n {title}\n </Text>\n {Boolean(subtitle) && <Text variant=\"tertiary\">{subtitle}</Text>}\n </View>\n <View style={styles.rightContent}>\n {isSourceType ? (\n <Badge label={rightLabel} appearance=\"neutral\" variant=\"meta\" />\n ) : (\n <Text numberOfLines={1} style={styles.rightLabelText}>\n {rightLabel}\n </Text>\n )}\n {Platform.OS === 'ios' && (\n <Icon name=\"general.rightChevron\" size={16} style={styles.icon} />\n )}\n </View>\n </View>\n </PlatformPressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({}: { isStart?: boolean; isEnd?: boolean } = {}) => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n const headerBottomPadding = 0\n\n return StyleSheet.create({\n listContainer: {\n flex: 1,\n },\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionOuterBase: {\n paddingLeft: 16,\n },\n sectionInnerBase: {\n paddingRight: 16,\n paddingVertical: 16,\n },\n sectionInnerHeader: {\n paddingTop: 24,\n paddingBottom: headerBottomPadding,\n },\n sectionInnerBottomBorder: {\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n sectionDescription: {\n color: colors.textColorDefaultSecondary,\n },\n settingRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n },\n settingRowContent: {\n flex: 1,\n },\n settingRowText: {\n lineHeight: 20,\n },\n })\n}\n\nconst useLinkRowStyles = () => {\n const theme = useTheme()\n\n return StyleSheet.create({\n row: {\n paddingLeft: 0,\n paddingVertical: 16,\n },\n innerContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n },\n leftContent: {\n flex: 1,\n gap: 4,\n },\n rightContent: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n title: {},\n rightLabelText: {\n color: theme.colors.textColorDefaultSecondary,\n },\n icon: {\n color: theme.colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
@@ -29,10 +29,10 @@ export function PreferredAppSelectionScreen({ route }) {
29
29
  const handleSelection = (app) => {
30
30
  updateChatType(app);
31
31
  };
32
- const sectionTitle = `${chatType?.title} Conversations`;
32
+ const sectionTitle = `${chatType?.title} conversations`;
33
33
  return (<View style={styles.container}>
34
34
  <View style={styles.section}>
35
- <Heading variant="h3" style={styles.sectionHeading}>
35
+ <Heading variant="h2" style={styles.sectionHeading}>
36
36
  {sectionTitle}
37
37
  </Heading>
38
38
  {preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (<PressableRow key={`${key}-${option}`} isActive={chatType?.preferredApp === option} onPress={() => handleSelection(option)}>
@@ -80,7 +80,7 @@ const styles = StyleSheet.create({
80
80
  flex: 1,
81
81
  },
82
82
  section: {
83
- paddingTop: 16,
83
+ paddingTop: 24,
84
84
  },
85
85
  sectionHeading: {
86
86
  paddingHorizontal: 16,
@@ -1 +1 @@
1
- {"version":3,"file":"preferred_app_selection_screen.js","sourceRoot":"","sources":["../../src/screens/preferred_app_selection_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAiC,MAAM,OAAO,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAgB,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAQjF,MAAM,UAAU,2BAA2B,CAAC,EAAE,KAAK,EAAoC;IACrF,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IACnC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,YAAY,EAAE,CAAA;IACrE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAE5B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,WAAW,CAAC;QAC7C,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,GAAG,EAAE,CAAC,g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EF,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,KAA6B,EAAE,EAAE,EAAE;IACzE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,WAAW,EAAE,EAAE;YACf,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;SAC9C;QACD,GAAG,EAAE;YACH,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,GAAG,EAAE,EAAE;YACP,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,sBAAsB;YACtD,eAAe,EAAE,EAAE;YACnB,YAAY,EAAE,EAAE;SACjB;QACD,QAAQ,EAAE;YACR,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,CAAC;SACd;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,iBAAiB;YACrC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps } from '@react-navigation/native'\nimport { useMutation } from '@tanstack/react-query'\nimport React, { type PropsWithChildren } from 'react'\nimport { Image, StyleSheet, View, type ViewStyle } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useApiClient, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { throwResponseError } from '../utils/response_error'\nimport { PreferredApp, useChatTypes } from './preferred_app/hooks/use_chat_types'\n\nexport type PreferredAppSelectionScreenProps = StaticScreenProps<{\n chatTypeId: number | string\n conversationType?: 'group' | 'team'\n currentSelection?: PreferredApp\n}>\n\nexport function PreferredAppSelectionScreen({ route }: PreferredAppSelectionScreenProps) {\n const { chatTypeId } = route.params\n const { data: chatTypes, refetch: refetchChatTypes } = useChatTypes()\n const appName = useAppName()\n\n const apiClient = useApiClient()\n\n const { mutate: updateChatType } = useMutation({\n throwOnError: true,\n onSuccess: () => refetchChatTypes(),\n mutationFn: (app: PreferredApp) => {\n return apiClient.chat\n .post({\n url: `/me/chat_types/${chatTypeId}/set_preferred_app`,\n data: { data: { type: 'ChatType', attributes: { app } } },\n })\n .catch(throwResponseError)\n },\n })\n const chatType = chatTypes.find(t => t.id === chatTypeId)\n const { preferredAppOptions } = chatType || {}\n\n const handleSelection = (app: PreferredApp) => {\n updateChatType(app)\n }\n\n const sectionTitle = `${chatType?.title} Conversations`\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <Heading variant=\"h3\" style={styles.sectionHeading}>\n {sectionTitle}\n </Heading>\n {preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (\n <PressableRow\n key={`${key}-${option}`}\n isActive={chatType?.preferredApp === option}\n onPress={() => handleSelection(option)}\n >\n <Image source={getAppImage(option)} style={styles.logo} />\n <Text>\n {option}\n {appName.includes(option.replace(/\\s/, '').toLowerCase()) ? ' ( current )' : ''}\n </Text>\n </PressableRow>\n ))}\n </View>\n </View>\n )\n}\n\nconst sortPreferredApp = (dir?: 'asc' | 'desc') => (a: PreferredApp, b: PreferredApp) => {\n if (a === 'None') return 1\n if (a > b) return dir === 'asc' ? 1 : -1\n if (b > a) return dir === 'asc' ? -1 : 1\n\n return 0\n}\n\nconst getAppImage = (option: PreferredApp) => {\n switch (option) {\n case 'Church Center':\n return require('../../assets/churchCenter.png')\n case 'Services':\n return require('../../assets/servicesApp.png')\n case 'Chat':\n return require('../../assets/chatLogo.png')\n default:\n return undefined\n }\n}\n\nconst PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n}: PropsWithChildren<{ isActive: boolean; onPress: () => void; style?: ViewStyle }>) => {\n const styles = useRowStyles({ isActive })\n return (\n <PlatformPressable\n style={styles.pressable}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={styles.row}>\n <View style={[styles.rowInner, style]}>{children}</View>\n <Icon\n name=\"general.check\"\n style={styles.rowIconRight}\n accessibilityElementsHidden\n maxFontSizeMultiplier={2.5}\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n section: {\n paddingTop: 16,\n },\n sectionHeading: {\n paddingHorizontal: 16,\n paddingBottom: 4,\n },\n logo: {\n width: 32,\n height: 32,\n borderRadius: 8,\n },\n})\n\nconst useRowStyles = ({ isActive = false }: { isActive?: boolean } = {}) => {\n const theme = useTheme()\n\n return StyleSheet.create({\n pressable: {\n paddingLeft: 16,\n backgroundColor: theme.colors.surfaceColor100,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.borderColorDefaultBase,\n paddingVertical: 12,\n paddingRight: 16,\n },\n rowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n flexShrink: 1,\n },\n rowIconRight: {\n fontSize: 16,\n color: theme.colors.statusSuccessIcon,\n opacity: isActive ? 1 : 0,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"preferred_app_selection_screen.js","sourceRoot":"","sources":["../../src/screens/preferred_app_selection_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAiC,MAAM,OAAO,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,YAAY,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AAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,iBAAiB;YACrC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps } from '@react-navigation/native'\nimport { useMutation } from '@tanstack/react-query'\nimport React, { type PropsWithChildren } from 'react'\nimport { Image, StyleSheet, View, type ViewStyle } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useApiClient, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { throwResponseError } from '../utils/response_error'\nimport { PreferredApp, useChatTypes } from './preferred_app/hooks/use_chat_types'\n\nexport type PreferredAppSelectionScreenProps = StaticScreenProps<{\n chatTypeId: number | string\n conversationType?: 'group' | 'team'\n currentSelection?: PreferredApp\n}>\n\nexport function PreferredAppSelectionScreen({ route }: PreferredAppSelectionScreenProps) {\n const { chatTypeId } = route.params\n const { data: chatTypes, refetch: refetchChatTypes } = useChatTypes()\n const appName = useAppName()\n\n const apiClient = useApiClient()\n\n const { mutate: updateChatType } = useMutation({\n throwOnError: true,\n onSuccess: () => refetchChatTypes(),\n mutationFn: (app: PreferredApp) => {\n return apiClient.chat\n .post({\n url: `/me/chat_types/${chatTypeId}/set_preferred_app`,\n data: { data: { type: 'ChatType', attributes: { app } } },\n })\n .catch(throwResponseError)\n },\n })\n const chatType = chatTypes.find(t => t.id === chatTypeId)\n const { preferredAppOptions } = chatType || {}\n\n const handleSelection = (app: PreferredApp) => {\n updateChatType(app)\n }\n\n const sectionTitle = `${chatType?.title} conversations`\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <Heading variant=\"h2\" style={styles.sectionHeading}>\n {sectionTitle}\n </Heading>\n {preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (\n <PressableRow\n key={`${key}-${option}`}\n isActive={chatType?.preferredApp === option}\n onPress={() => handleSelection(option)}\n >\n <Image source={getAppImage(option)} style={styles.logo} />\n <Text>\n {option}\n {appName.includes(option.replace(/\\s/, '').toLowerCase()) ? ' ( current )' : ''}\n </Text>\n </PressableRow>\n ))}\n </View>\n </View>\n )\n}\n\nconst sortPreferredApp = (dir?: 'asc' | 'desc') => (a: PreferredApp, b: PreferredApp) => {\n if (a === 'None') return 1\n if (a > b) return dir === 'asc' ? 1 : -1\n if (b > a) return dir === 'asc' ? -1 : 1\n\n return 0\n}\n\nconst getAppImage = (option: PreferredApp) => {\n switch (option) {\n case 'Church Center':\n return require('../../assets/churchCenter.png')\n case 'Services':\n return require('../../assets/servicesApp.png')\n case 'Chat':\n return require('../../assets/chatLogo.png')\n default:\n return undefined\n }\n}\n\nconst PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n}: PropsWithChildren<{ isActive: boolean; onPress: () => void; style?: ViewStyle }>) => {\n const styles = useRowStyles({ isActive })\n return (\n <PlatformPressable\n style={styles.pressable}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={styles.row}>\n <View style={[styles.rowInner, style]}>{children}</View>\n <Icon\n name=\"general.check\"\n style={styles.rowIconRight}\n accessibilityElementsHidden\n maxFontSizeMultiplier={2.5}\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n section: {\n paddingTop: 24,\n },\n sectionHeading: {\n paddingHorizontal: 16,\n paddingBottom: 4,\n },\n logo: {\n width: 32,\n height: 32,\n borderRadius: 8,\n },\n})\n\nconst useRowStyles = ({ isActive = false }: { isActive?: boolean } = {}) => {\n const theme = useTheme()\n\n return StyleSheet.create({\n pressable: {\n paddingLeft: 16,\n backgroundColor: theme.colors.surfaceColor100,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.borderColorDefaultBase,\n paddingVertical: 12,\n paddingRight: 16,\n },\n rowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n flexShrink: 1,\n },\n rowIconRight: {\n fontSize: 16,\n color: theme.colors.statusSuccessIcon,\n opacity: isActive ? 1 : 0,\n },\n })\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/chat-react-native",
3
- "version": "3.35.0-rc.4",
3
+ "version": "3.35.0-rc.5",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -71,5 +71,5 @@
71
71
  "react-native-url-polyfill": "^2.0.0",
72
72
  "typescript": "~5.9.2"
73
73
  },
74
- "gitHead": "033e05c3a604adc1e36af2b8673719455e9e0f86"
74
+ "gitHead": "944a6cf0bdfa1ada82ec68c9e79c8fd3ae522e15"
75
75
  }
@@ -41,12 +41,14 @@ export function GroupNotificationSettingsScreen({ route }: GroupNotificationSett
41
41
  <View style={styles.container}>
42
42
  <View style={styles.sectionOuter}>
43
43
  <View style={styles.sectionInner}>
44
- <Heading variant="h3" style={styles.sectionHeading}>
44
+ <Heading variant="h2" style={styles.sectionHeading}>
45
45
  Group notification settings
46
46
  </Heading>
47
47
  <Text variant="tertiary" style={styles.sectionSubtitle}>
48
48
  The settings are applied to all conversations in{' '}
49
- <Text style={styles.groupNameBold}>{group.name || title}</Text>
49
+ <Text variant="tertiary" style={styles.groupNameBold}>
50
+ {group.name || title}
51
+ </Text>
50
52
  </Text>
51
53
  </View>
52
54
  </View>
@@ -98,10 +100,11 @@ const useStyles = () => {
98
100
  borderBottomColor: colors.borderColorDefaultBase,
99
101
  },
100
102
  sectionHeading: {
101
- paddingBottom: 4,
103
+ paddingBottom: 12,
102
104
  },
103
105
  sectionSubtitle: {
104
106
  color: colors.textColorDefaultSecondary,
107
+ paddingBottom: 2,
105
108
  },
106
109
  groupNameBold: {
107
110
  fontWeight: platformFontWeightBold,
@@ -90,7 +90,7 @@ export function NotificationSettingsScreen({}: NotificationSettingsScreenProps)
90
90
  ...chatTypes.map(type => ({
91
91
  type: SectionTypes.link,
92
92
  data: {
93
- title: `${type.title} Conversations`,
93
+ title: `${type.title} conversations`,
94
94
  rightLabel: type.preferredApp,
95
95
  onPress: () =>
96
96
  navigation.navigate('PreferredAppSelection', {
@@ -284,7 +284,7 @@ function LinkRow({ title, subtitle, rightLabel, onPress }: LinkRowProps) {
284
284
  <Text style={styles.title} numberOfLines={2}>
285
285
  {title}
286
286
  </Text>
287
- {Boolean(subtitle) && <Text variant="footnote">{subtitle}</Text>}
287
+ {Boolean(subtitle) && <Text variant="tertiary">{subtitle}</Text>}
288
288
  </View>
289
289
  <View style={styles.rightContent}>
290
290
  {isSourceType ? (
@@ -41,12 +41,12 @@ export function PreferredAppSelectionScreen({ route }: PreferredAppSelectionScre
41
41
  updateChatType(app)
42
42
  }
43
43
 
44
- const sectionTitle = `${chatType?.title} Conversations`
44
+ const sectionTitle = `${chatType?.title} conversations`
45
45
 
46
46
  return (
47
47
  <View style={styles.container}>
48
48
  <View style={styles.section}>
49
- <Heading variant="h3" style={styles.sectionHeading}>
49
+ <Heading variant="h2" style={styles.sectionHeading}>
50
50
  {sectionTitle}
51
51
  </Heading>
52
52
  {preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (
@@ -120,7 +120,7 @@ const styles = StyleSheet.create({
120
120
  flex: 1,
121
121
  },
122
122
  section: {
123
- paddingTop: 16,
123
+ paddingTop: 24,
124
124
  },
125
125
  sectionHeading: {
126
126
  paddingHorizontal: 16,