@planningcenter/chat-react-native 3.30.0-rc.7 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +9 -3
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/package.json +2 -2
- package/src/screens/conversation_new/components/gender_filter_toggle.tsx +9 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gender_filter_toggle.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/gender_filter_toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"gender_filter_toggle.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/gender_filter_toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAyDzB,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CACrC;AAED,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,UAAU,EACV,OAAO,EACP,QAAQ,GACT,EAAE,uBAAuB,qBAczB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActivityIndicator, StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Heading, Switch, Text } from '../../../components';
|
|
3
|
+
import { Heading, Switch, Text, TextInlineButton } from '../../../components';
|
|
4
4
|
import { useTheme } from '../../../hooks';
|
|
5
5
|
import { genderDisplayLabel } from '../../../utils/gender_display_label';
|
|
6
6
|
function FilterableGenderContent({ genderValue, enabled, onToggle }) {
|
|
@@ -13,7 +13,10 @@ function FilterableGenderContent({ genderValue, enabled, onToggle }) {
|
|
|
13
13
|
<Switch value={enabled} onValueChange={onToggle} accessibilityLabel={`Filter by ${displayLabel}`}/>
|
|
14
14
|
</View>
|
|
15
15
|
<Text style={{ color: colors.textColorDefaultSecondary }}>
|
|
16
|
-
Filter limited to your profile's set gender
|
|
16
|
+
Filter limited to your profile's set gender.{' '}
|
|
17
|
+
<TextInlineButton nativeID="gender-filter-learn-more" onPress={() => { }}>
|
|
18
|
+
Learn more.
|
|
19
|
+
</TextInlineButton>
|
|
17
20
|
</Text>
|
|
18
21
|
</>);
|
|
19
22
|
}
|
|
@@ -22,7 +25,10 @@ function NoGenderContent({ isFetching }) {
|
|
|
22
25
|
return (<>
|
|
23
26
|
<Text>Gender</Text>
|
|
24
27
|
{isFetching ? (<ActivityIndicator size="small"/>) : (<Text style={{ color: colors.textColorDefaultSecondary }}>
|
|
25
|
-
Set a gender in your Church Center profile to enable gender filtering.
|
|
28
|
+
Set a gender in your Church Center profile to enable gender filtering.{' '}
|
|
29
|
+
<TextInlineButton nativeID="gender-filter-learn-more" onPress={() => { }}>
|
|
30
|
+
Learn more.
|
|
31
|
+
</TextInlineButton>
|
|
26
32
|
</Text>)}
|
|
27
33
|
</>);
|
|
28
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gender_filter_toggle.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/gender_filter_toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"gender_filter_toggle.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/gender_filter_toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MA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GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,OAAO,EAAE,EAAE;YACX,GAAG,EAAE,CAAC;SACP;QACD,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,QAAQ;SACrB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { ActivityIndicator, StyleSheet, View } from 'react-native'\nimport { Heading, Switch, Text, TextInlineButton } from '../../../components'\nimport { useTheme } from '../../../hooks'\nimport { genderDisplayLabel } from '../../../utils/gender_display_label'\n\ninterface FilterableGenderContentProps {\n genderValue: string\n enabled: boolean\n onToggle: (enabled: boolean) => void\n}\n\nfunction FilterableGenderContent({ genderValue, enabled, onToggle }: FilterableGenderContentProps) {\n const { colors } = useTheme()\n const styles = useStyles()\n const displayLabel = genderDisplayLabel(genderValue)\n\n return (\n <>\n <View style={styles.toggleRow}>\n <Text>{displayLabel}</Text>\n <Switch\n value={enabled}\n onValueChange={onToggle}\n accessibilityLabel={`Filter by ${displayLabel}`}\n />\n </View>\n <Text style={{ color: colors.textColorDefaultSecondary }}>\n Filter limited to your profile's set gender.{' '}\n <TextInlineButton nativeID=\"gender-filter-learn-more\" onPress={() => {}}>\n Learn more.\n </TextInlineButton>\n </Text>\n </>\n )\n}\n\nfunction NoGenderContent({ isFetching }: { isFetching: boolean }) {\n const { colors } = useTheme()\n\n return (\n <>\n <Text>Gender</Text>\n {isFetching ? (\n <ActivityIndicator size=\"small\" />\n ) : (\n <Text style={{ color: colors.textColorDefaultSecondary }}>\n Set a gender in your Church Center profile to enable gender filtering.{' '}\n <TextInlineButton nativeID=\"gender-filter-learn-more\" onPress={() => {}}>\n Learn more.\n </TextInlineButton>\n </Text>\n )}\n </>\n )\n}\n\ninterface GenderFilterToggleProps {\n genderValue: string | null\n isFetching: boolean\n enabled: boolean\n onToggle: (enabled: boolean) => void\n}\n\nexport function GenderFilterToggle({\n genderValue,\n isFetching,\n enabled,\n onToggle,\n}: GenderFilterToggleProps) {\n const styles = useStyles()\n const hasFilterableGender = genderValue !== null && genderValue !== 'Prefer not to say'\n\n return (\n <View style={styles.container}>\n <Heading variant=\"h3\">Filter by</Heading>\n {hasFilterableGender ? (\n <FilterableGenderContent genderValue={genderValue} enabled={enabled} onToggle={onToggle} />\n ) : (\n <NoGenderContent isFetching={isFetching} />\n )}\n </View>\n )\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n container: {\n padding: 16,\n gap: 8,\n },\n toggleRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n })\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "3.30.0
|
|
3
|
+
"version": "3.30.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react-native-url-polyfill": "^2.0.0",
|
|
64
64
|
"typescript": "<5.6.0"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "f9d8e4cb37b45a51acd77ea80cb7dae10098f1d5"
|
|
67
67
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { ActivityIndicator, StyleSheet, View } from 'react-native'
|
|
3
|
-
import { Heading, Switch, Text } from '../../../components'
|
|
3
|
+
import { Heading, Switch, Text, TextInlineButton } from '../../../components'
|
|
4
4
|
import { useTheme } from '../../../hooks'
|
|
5
5
|
import { genderDisplayLabel } from '../../../utils/gender_display_label'
|
|
6
6
|
|
|
@@ -26,7 +26,10 @@ function FilterableGenderContent({ genderValue, enabled, onToggle }: FilterableG
|
|
|
26
26
|
/>
|
|
27
27
|
</View>
|
|
28
28
|
<Text style={{ color: colors.textColorDefaultSecondary }}>
|
|
29
|
-
Filter limited to your profile's set gender
|
|
29
|
+
Filter limited to your profile's set gender.{' '}
|
|
30
|
+
<TextInlineButton nativeID="gender-filter-learn-more" onPress={() => {}}>
|
|
31
|
+
Learn more.
|
|
32
|
+
</TextInlineButton>
|
|
30
33
|
</Text>
|
|
31
34
|
</>
|
|
32
35
|
)
|
|
@@ -42,7 +45,10 @@ function NoGenderContent({ isFetching }: { isFetching: boolean }) {
|
|
|
42
45
|
<ActivityIndicator size="small" />
|
|
43
46
|
) : (
|
|
44
47
|
<Text style={{ color: colors.textColorDefaultSecondary }}>
|
|
45
|
-
Set a gender in your Church Center profile to enable gender filtering.
|
|
48
|
+
Set a gender in your Church Center profile to enable gender filtering.{' '}
|
|
49
|
+
<TextInlineButton nativeID="gender-filter-learn-more" onPress={() => {}}>
|
|
50
|
+
Learn more.
|
|
51
|
+
</TextInlineButton>
|
|
46
52
|
</Text>
|
|
47
53
|
)}
|
|
48
54
|
</>
|