@planningcenter/chat-react-native 4.6.2 → 4.6.3-rc.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/components/display/version_footer.d.ts.map +1 -1
- package/build/components/display/version_footer.js +6 -36
- package/build/components/display/version_footer.js.map +1 -1
- package/package.json +2 -2
- package/src/components/display/__tests__/version_footer.test.tsx +1 -12
- package/src/components/display/version_footer.tsx +5 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version_footer.d.ts","sourceRoot":"","sources":["../../../src/components/display/version_footer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version_footer.d.ts","sourceRoot":"","sources":["../../../src/components/display/version_footer.tsx"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,4CAQ5B"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import React
|
|
3
|
-
import {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import { chatReactNativeVersion } from '../../utils/package_version';
|
|
5
5
|
import { Text } from './text';
|
|
6
6
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const TAPS_TO_FIND = 5;
|
|
8
7
|
export function VersionFooter() {
|
|
9
|
-
const $ = _c(
|
|
10
|
-
const [taps, setTaps] = useState(0);
|
|
11
|
-
const found = taps >= TAPS_TO_FIND;
|
|
8
|
+
const $ = _c(1);
|
|
12
9
|
let t0;
|
|
13
10
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
14
|
-
t0 = /*#__PURE__*/_jsx(
|
|
15
|
-
|
|
16
|
-
onPress: () => setTaps(_temp),
|
|
11
|
+
t0 = /*#__PURE__*/_jsx(View, {
|
|
12
|
+
style: styles.container,
|
|
17
13
|
children: /*#__PURE__*/_jsxs(Text, {
|
|
18
14
|
variant: "footnote",
|
|
19
15
|
style: styles.text,
|
|
@@ -24,33 +20,7 @@ export function VersionFooter() {
|
|
|
24
20
|
} else {
|
|
25
21
|
t0 = $[0];
|
|
26
22
|
}
|
|
27
|
-
|
|
28
|
-
if ($[1] !== found) {
|
|
29
|
-
t1 = found && /*#__PURE__*/_jsx(Text, {
|
|
30
|
-
variant: "footnote",
|
|
31
|
-
style: styles.text,
|
|
32
|
-
children: "\uD83C\uDF89 You found me! \uD83C\uDF89"
|
|
33
|
-
});
|
|
34
|
-
$[1] = found;
|
|
35
|
-
$[2] = t1;
|
|
36
|
-
} else {
|
|
37
|
-
t1 = $[2];
|
|
38
|
-
}
|
|
39
|
-
let t2;
|
|
40
|
-
if ($[3] !== t1) {
|
|
41
|
-
t2 = /*#__PURE__*/_jsxs(View, {
|
|
42
|
-
style: styles.container,
|
|
43
|
-
children: [t0, t1]
|
|
44
|
-
});
|
|
45
|
-
$[3] = t1;
|
|
46
|
-
$[4] = t2;
|
|
47
|
-
} else {
|
|
48
|
-
t2 = $[4];
|
|
49
|
-
}
|
|
50
|
-
return t2;
|
|
51
|
-
}
|
|
52
|
-
function _temp(count) {
|
|
53
|
-
return count + 1;
|
|
23
|
+
return t0;
|
|
54
24
|
}
|
|
55
25
|
const styles = StyleSheet.create({
|
|
56
26
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version_footer.js","names":["React","
|
|
1
|
+
{"version":3,"file":"version_footer.js","names":["React","StyleSheet","View","chatReactNativeVersion","Text","jsxs","_jsxs","jsx","_jsx","VersionFooter","$","_c","t0","Symbol","for","style","styles","container","children","variant","text","create","alignItems","paddingTop","paddingBottom","paddingHorizontal","textAlign"],"sources":["../../../src/components/display/version_footer.tsx"],"sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { chatReactNativeVersion } from '../../utils/package_version'\nimport { Text } from './text'\n\nexport function VersionFooter() {\n return (\n <View style={styles.container}>\n <Text variant=\"footnote\" style={styles.text}>\n Chat v{chatReactNativeVersion}\n </Text>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n paddingTop: 24,\n paddingBottom: 8,\n paddingHorizontal: 16,\n },\n text: {\n textAlign: 'center',\n },\n})\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,6BAA6B;AACpE,SAASC,IAAI,QAAQ,QAAQ;AAAA,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;AAE7B,OAAO,SAAAC,cAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAF,CAAA,QAAAG,MAAA,CAAAC,GAAA;IAEHF,EAAA,gBAAAJ,IAAA,CAACN,IAAI;MAAQa,KAAgB,EAAhBC,MAAM,CAAAC,SAAU;MAAAC,QAAA,eAC3BZ,KAAA,CAACF,IAAI;QAASe,OAAU,EAAV,UAAU;QAAQJ,KAAW,EAAXC,MAAM,CAAAI,IAAK;QAAAF,QAAA,GAAE,QACrC,EAACf,sBAAsB;MAAA,CACzB;IAAC,CACH,CAAC;IAAAO,CAAA,MAAAE,EAAA;EAAA;IAAAA,EAAA,GAAAF,CAAA;EAAA;EAAA,OAJPE,EAIO;AAAA;AAIX,MAAMI,MAAM,GAAGf,UAAU,CAACoB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,UAAU,EAAE,QAAQ;IACpBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,CAAC;IAChBC,iBAAiB,EAAE;EACrB,CAAC;EACDL,IAAI,EAAE;IACJM,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3-rc.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"sf-symbols-typescript": "^2.2.0",
|
|
85
85
|
"typescript": "~6.0.3"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "1960435d5567caf0124b4cfc1db91aa49d66938d"
|
|
88
88
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
2
|
-
import {
|
|
2
|
+
import { render } from '@testing-library/react-native'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { buildTestQueryClient } from '../../../__utils__/query_client'
|
|
5
5
|
import { ChatProvider } from '../../../contexts/chat_context'
|
|
@@ -45,15 +45,4 @@ describe('VersionFooter', () => {
|
|
|
45
45
|
expect(packageVersion).toMatch(/^\d+\.\d+\.\d+/)
|
|
46
46
|
expect(getByText(`Chat v${packageVersion}`)).toBeTruthy()
|
|
47
47
|
})
|
|
48
|
-
|
|
49
|
-
it('says hello after five taps on the version', () => {
|
|
50
|
-
const { getByText, queryByText } = render(<VersionFooter />, { wrapper: Wrapper })
|
|
51
|
-
const version = getByText(`Chat v${packageVersion}`)
|
|
52
|
-
|
|
53
|
-
for (let i = 0; i < 4; i++) fireEvent.press(version)
|
|
54
|
-
expect(queryByText('🎉 You found me! 🎉')).toBeNull()
|
|
55
|
-
|
|
56
|
-
fireEvent.press(version)
|
|
57
|
-
expect(getByText('🎉 You found me! 🎉')).toBeTruthy()
|
|
58
|
-
})
|
|
59
48
|
})
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
3
|
import { chatReactNativeVersion } from '../../utils/package_version'
|
|
4
4
|
import { Text } from './text'
|
|
5
5
|
|
|
6
|
-
const TAPS_TO_FIND = 5
|
|
7
|
-
|
|
8
6
|
export function VersionFooter() {
|
|
9
|
-
const [taps, setTaps] = useState(0)
|
|
10
|
-
const found = taps >= TAPS_TO_FIND
|
|
11
|
-
|
|
12
7
|
return (
|
|
13
8
|
<View style={styles.container}>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</Text>
|
|
18
|
-
</Pressable>
|
|
19
|
-
{found && (
|
|
20
|
-
<Text variant="footnote" style={styles.text}>
|
|
21
|
-
🎉 You found me! 🎉
|
|
22
|
-
</Text>
|
|
23
|
-
)}
|
|
9
|
+
<Text variant="footnote" style={styles.text}>
|
|
10
|
+
Chat v{chatReactNativeVersion}
|
|
11
|
+
</Text>
|
|
24
12
|
</View>
|
|
25
13
|
)
|
|
26
14
|
}
|