@planningcenter/chat-react-native 3.34.0-rc.0 → 3.34.0-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.
package/build/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './types';
11
11
  export { platformFontWeightBold, Session, TemporaryDefaultColorsType, Uri } from './utils';
12
12
  export * from './utils/client';
13
13
  export * from './utils/native_adapters';
14
+ export { ResponseError } from './utils/response_error';
14
15
  export { default as Event } from './polyfills/events/Event';
15
16
  export { CustomEvent } from './polyfills/events/CustomEvent';
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACvF,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA;AACtF,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,0BAA0B,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAC1F,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACvF,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA;AACtF,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,0BAA0B,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAC1F,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA"}
package/build/index.js CHANGED
@@ -11,6 +11,7 @@ export * from './types';
11
11
  export { platformFontWeightBold, Session, Uri } from './utils';
12
12
  export * from './utils/client';
13
13
  export * from './utils/native_adapters';
14
+ export { ResponseError } from './utils/response_error';
14
15
  export { default as Event } from './polyfills/events/Event';
15
16
  export { CustomEvent } from './polyfills/events/CustomEvent';
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACvF,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA,CAAC,sBAAsB;AAC7G,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAA8B,GAAG,EAAE,MAAM,SAAS,CAAA;AAC1F,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA","sourcesContent":["import './icons/font_awesome'\n\nexport { GroupConversations } from './components'\nexport { ApiProvider, chatQueryClient, useFocusManager } from './contexts/api_provider'\nexport * from './contexts/chat_context'\nexport * from './contexts/session_context'\nexport * from './navigation'\nexport { ScreenLayout } from './navigation/screenLayout'\nexport * from './screens'\nexport { AgeCheckUnderageScreen } from './screens/age_check/age_check_underage_screen' // TODO: add to barrel\nexport * from './types'\nexport { platformFontWeightBold, Session, TemporaryDefaultColorsType, Uri } from './utils'\nexport * from './utils/client'\nexport * from './utils/native_adapters'\nexport { default as Event } from './polyfills/events/Event'\nexport { CustomEvent } from './polyfills/events/CustomEvent'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACvF,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA,CAAC,sBAAsB;AAC7G,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAA8B,GAAG,EAAE,MAAM,SAAS,CAAA;AAC1F,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA","sourcesContent":["import './icons/font_awesome'\n\nexport { GroupConversations } from './components'\nexport { ApiProvider, chatQueryClient, useFocusManager } from './contexts/api_provider'\nexport * from './contexts/chat_context'\nexport * from './contexts/session_context'\nexport * from './navigation'\nexport { ScreenLayout } from './navigation/screenLayout'\nexport * from './screens'\nexport { AgeCheckUnderageScreen } from './screens/age_check/age_check_underage_screen' // TODO: add to barrel\nexport * from './types'\nexport { platformFontWeightBold, Session, TemporaryDefaultColorsType, Uri } from './utils'\nexport * from './utils/client'\nexport * from './utils/native_adapters'\nexport { ResponseError } from './utils/response_error'\nexport { default as Event } from './polyfills/events/Event'\nexport { CustomEvent } from './polyfills/events/CustomEvent'\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/chat-react-native",
3
- "version": "3.34.0-rc.0",
3
+ "version": "3.34.0-rc.2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -65,5 +65,5 @@
65
65
  "react-native-url-polyfill": "^2.0.0",
66
66
  "typescript": "~5.9.2"
67
67
  },
68
- "gitHead": "515400fc78733bf6f1a6ed53ed85310753eb997c"
68
+ "gitHead": "37a70d6b74bbda7e6f19fda65293ef5f5ae90df4"
69
69
  }
@@ -1,5 +1,5 @@
1
1
  import AsyncStorage from '@react-native-async-storage/async-storage'
2
- import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
2
+ import { QueryClientProvider } from '@tanstack/react-query'
3
3
  import { renderHook, act } from '@testing-library/react-hooks'
4
4
  import React, { useContext, Suspense } from 'react'
5
5
  import {
@@ -11,6 +11,7 @@ import { OAuthToken, FailedResponse } from '../../types'
11
11
  import { StorageAdapter } from '../../utils/native_adapters/storage_adapter'
12
12
  import { Session } from '../../utils/session'
13
13
  import { SessionManager } from '../../utils/session_manager'
14
+ import { buildTestQueryClient } from '../support/query_client'
14
15
 
15
16
  jest.mock('@react-native-async-storage/async-storage')
16
17
 
@@ -67,13 +68,7 @@ const waitForQuery = async () => {
67
68
  }
68
69
 
69
70
  const createWrapper = (config: SessionContextConfig) => {
70
- const queryClient = new QueryClient({
71
- defaultOptions: {
72
- queries: {
73
- retry: false,
74
- },
75
- },
76
- })
71
+ const queryClient = buildTestQueryClient()
77
72
 
78
73
  return ({ children }: { children: React.ReactNode }) => (
79
74
  <QueryClientProvider client={queryClient}>
@@ -3,6 +3,7 @@ import { renderHook } from '@testing-library/react-native'
3
3
  import React from 'react'
4
4
  import { ChatProvider, CreateChatThemeProps } from '../../contexts/chat_context'
5
5
  import { useTheme } from '../../hooks'
6
+ import { buildTestQueryClient } from '../support/query_client'
6
7
 
7
8
  let themeProps: CreateChatThemeProps = {
8
9
  theme: {
@@ -14,11 +15,10 @@ let themeProps: CreateChatThemeProps = {
14
15
  let queryClient: QueryClient
15
16
 
16
17
  beforeEach(() => {
17
- queryClient = new QueryClient({
18
+ queryClient = buildTestQueryClient({
18
19
  defaultOptions: {
19
20
  queries: {
20
- retry: false,
21
- refetchInterval: false, // Disable refetch intervals in tests
21
+ refetchInterval: false,
22
22
  refetchOnWindowFocus: false,
23
23
  refetchOnReconnect: false,
24
24
  },
@@ -1,8 +1,9 @@
1
1
  import AsyncStorage from '@react-native-async-storage/async-storage'
2
- import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
2
+ import { QueryClientProvider } from '@tanstack/react-query'
3
3
  import { renderHook, act } from '@testing-library/react-hooks'
4
4
  import React, { Suspense } from 'react'
5
5
  import { useAsyncStorage } from '../../hooks/use_async_storage'
6
+ import { buildTestQueryClient } from '../support/query_client'
6
7
 
7
8
  jest.mock('@react-native-async-storage/async-storage')
8
9
  jest.useFakeTimers()
@@ -14,13 +15,7 @@ afterAll(() => {
14
15
  const mockAsyncStorage = AsyncStorage as jest.Mocked<typeof AsyncStorage>
15
16
 
16
17
  const createWrapper = () => {
17
- const queryClient = new QueryClient({
18
- defaultOptions: {
19
- queries: {
20
- retry: false,
21
- },
22
- },
23
- })
18
+ const queryClient = buildTestQueryClient()
24
19
 
25
20
  return ({ children }: { children: React.ReactNode }) => (
26
21
  <QueryClientProvider client={queryClient}>
@@ -1,4 +1,4 @@
1
- import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
1
+ import { QueryClientProvider } from '@tanstack/react-query'
2
2
  import { renderHook, act } from '@testing-library/react-hooks'
3
3
  import React from 'react'
4
4
  import { useApiClient } from '../../hooks/use_api_client'
@@ -6,6 +6,7 @@ import { useAttachmentUploader } from '../../hooks/use_attachment_uploader'
6
6
  import { useChatConfiguration } from '../../hooks/use_chat_configuration'
7
7
  import { useUploadClient } from '../../hooks/use_upload_client'
8
8
  import { FileAttachment } from '../../types/resources/denormalized_attachment_resource_for_create'
9
+ import { buildTestQueryClient } from '../support/query_client'
9
10
 
10
11
  jest.mock('../../hooks/use_api_client')
11
12
  jest.mock('../../hooks/use_upload_client')
@@ -18,7 +19,7 @@ const mockedUseChatConfiguration = useChatConfiguration as jest.MockedFunction<
18
19
  >
19
20
 
20
21
  const createWrapper = () => {
21
- const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } })
22
+ const queryClient = buildTestQueryClient()
22
23
  return ({ children }: { children: React.ReactNode }) => (
23
24
  <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
24
25
  )
@@ -1,4 +1,4 @@
1
- import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
1
+ import { QueryClientProvider } from '@tanstack/react-query'
2
2
  import { renderHook, act } from '@testing-library/react-hooks'
3
3
  import React, { Suspense } from 'react'
4
4
  import {
@@ -8,11 +8,10 @@ import {
8
8
  } from '../../hooks/attachments/fallback_chat_configuration'
9
9
  import * as useApiClientModule from '../../hooks/use_api_client'
10
10
  import { useChatConfiguration } from '../../hooks/use_chat_configuration'
11
+ import { buildTestQueryClient } from '../support/query_client'
11
12
 
12
13
  const createWrapper = () => {
13
- const queryClient = new QueryClient({
14
- defaultOptions: { queries: { retry: false } },
15
- })
14
+ const queryClient = buildTestQueryClient()
16
15
 
17
16
  return ({ children }: { children: React.ReactNode }) => (
18
17
  <QueryClientProvider client={queryClient}>
@@ -0,0 +1,14 @@
1
+ import { QueryClient, QueryClientConfig } from '@tanstack/react-query'
2
+ import { merge } from 'lodash'
3
+
4
+ const baseConfig: QueryClientConfig = {
5
+ defaultOptions: {
6
+ queries: {
7
+ retry: false,
8
+ gcTime: 0,
9
+ },
10
+ },
11
+ }
12
+
13
+ export const buildTestQueryClient = (overrides: QueryClientConfig = {}) =>
14
+ new QueryClient(merge({}, baseConfig, overrides))
package/src/index.tsx CHANGED
@@ -12,5 +12,6 @@ export * from './types'
12
12
  export { platformFontWeightBold, Session, TemporaryDefaultColorsType, Uri } from './utils'
13
13
  export * from './utils/client'
14
14
  export * from './utils/native_adapters'
15
+ export { ResponseError } from './utils/response_error'
15
16
  export { default as Event } from './polyfills/events/Event'
16
17
  export { CustomEvent } from './polyfills/events/CustomEvent'