@planningcenter/chat-react-native 3.17.1 → 3.17.2-rc.1

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,6 +1,6 @@
1
1
  import { Platform } from 'react-native';
2
2
  import { useSharedValue, useAnimatedStyle, withTiming, interpolateColor, Easing, } from 'react-native-reanimated';
3
- import { useTheme } from '../hooks';
3
+ import { useTheme } from './use_theme';
4
4
  export function useAnimatedMessageBackgroundColor() {
5
5
  const { colors } = useTheme();
6
6
  const bgFadeProgress = useSharedValue(0);
@@ -1 +1 @@
1
- {"version":3,"file":"use_animated_message_background_color.js","sourceRoot":"","sources":["../../src/hooks/use_animated_message_background_color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,MAAM,GACP,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,UAAU,iCAAiC;IAC/C,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,cAAc,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;IAExC,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC;QACnC,GAAG,EAAE,MAAM,CAAC,uBAAuB;QACnC,OAAO,EAAE,aAAa;KACvB,CAAC,CAAA;IAEF,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACpD,MAAM,eAAe,GAAG,gBAAgB,CACtC,cAAc,CAAC,KAAK,EACpB,CAAC,CAAC,EAAE,CAAC,CAAC,EACN,CAAC,aAAa,EAAE,YAAY,CAAC,CAC9B,CAAA;QACD,OAAO;YACL,eAAe;SAChB,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAChC,cAAc,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5F,CAAC,CAAA;IAED,MAAM,qBAAqB,GAAG,GAAG,EAAE;QACjC,cAAc,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC5F,CAAC,CAAA;IAED,OAAO;QACL,uBAAuB;QACvB,oBAAoB;QACpB,qBAAqB;KACtB,CAAA;AACH,CAAC","sourcesContent":["import { Platform } from 'react-native'\nimport {\n useSharedValue,\n useAnimatedStyle,\n withTiming,\n interpolateColor,\n Easing,\n} from 'react-native-reanimated'\nimport { useTheme } from '../hooks'\n\nexport function useAnimatedMessageBackgroundColor() {\n const { colors } = useTheme()\n const bgFadeProgress = useSharedValue(0)\n\n const pressedColor = Platform.select({\n ios: colors.fillColorNeutral050Base,\n default: 'transparent',\n })\n\n const animatedBackgroundColor = useAnimatedStyle(() => {\n const backgroundColor = interpolateColor(\n bgFadeProgress.value,\n [0, 1],\n ['transparent', pressedColor]\n )\n return {\n backgroundColor,\n }\n })\n\n const handleMessagePressIn = () => {\n bgFadeProgress.value = withTiming(1, { duration: 300, easing: Easing.inOut(Easing.ease) })\n }\n\n const handleMessagePressOut = () => {\n bgFadeProgress.value = withTiming(0, { duration: 300, easing: Easing.inOut(Easing.ease) })\n }\n\n return {\n animatedBackgroundColor,\n handleMessagePressIn,\n handleMessagePressOut,\n }\n}\n"]}
1
+ {"version":3,"file":"use_animated_message_background_color.js","sourceRoot":"","sources":["../../src/hooks/use_animated_message_background_color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EACL,cAAc,EACd,g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\n Easing,\n} from 'react-native-reanimated'\nimport { useTheme } from './use_theme'\n\nexport function useAnimatedMessageBackgroundColor() {\n const { colors } = useTheme()\n const bgFadeProgress = useSharedValue(0)\n\n const pressedColor = Platform.select({\n ios: colors.fillColorNeutral050Base,\n default: 'transparent',\n })\n\n const animatedBackgroundColor = useAnimatedStyle(() => {\n const backgroundColor = interpolateColor(\n bgFadeProgress.value,\n [0, 1],\n ['transparent', pressedColor]\n )\n return {\n backgroundColor,\n }\n })\n\n const handleMessagePressIn = () => {\n bgFadeProgress.value = withTiming(1, { duration: 300, easing: Easing.inOut(Easing.ease) })\n }\n\n const handleMessagePressOut = () => {\n bgFadeProgress.value = withTiming(0, { duration: 300, easing: Easing.inOut(Easing.ease) })\n }\n\n return {\n animatedBackgroundColor,\n handleMessagePressIn,\n handleMessagePressOut,\n }\n}\n"]}
@@ -1,3 +1,2 @@
1
- import { ConversationRequestArgs } from '../utils/request/conversation';
2
- export declare function useConversationsJoltEvents(args?: Partial<ConversationRequestArgs>): void;
1
+ export declare function useConversationsJoltEvents(): void;
3
2
  //# sourceMappingURL=use_conversations_jolt_events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use_conversations_jolt_events.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversations_jolt_events.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAavE,wBAAgB,0BAA0B,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,QA6BjF"}
1
+ {"version":3,"file":"use_conversations_jolt_events.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversations_jolt_events.ts"],"names":[],"mappings":"AAcA,wBAAgB,0BAA0B,SA8BzC"}
@@ -1,14 +1,16 @@
1
+ import { useConversationsContext } from '../contexts/conversations_context';
2
+ import { completeMessageCreationConversationTracking } from '../utils/performance_tracking';
3
+ import { useApiGet } from './use_api';
4
+ import { useApiClient } from './use_api_client';
1
5
  import { useConversationsCache } from './use_conversations_cache';
2
6
  import { currentPersonRequestArgs, useCurrentPersonCache } from './use_current_person';
3
7
  import { useJoltChannel, useJoltEvent } from './use_jolt';
4
- import { useApiGet } from './use_api';
5
- import { useApiClient } from './use_api_client';
6
- import { completeMessageCreationConversationTracking } from '../utils/performance_tracking';
7
8
  const useCurrentPerson = () => {
8
9
  return useApiGet(currentPersonRequestArgs);
9
10
  };
10
- export function useConversationsJoltEvents(args) {
11
+ export function useConversationsJoltEvents() {
11
12
  const { data: currentPerson } = useCurrentPerson();
13
+ const { args } = useConversationsContext();
12
14
  const cache = useConversationsCache(args);
13
15
  const currentPersonCache = useCurrentPersonCache();
14
16
  const apiClient = useApiClient();
@@ -1 +1 @@
1
- {"version":3,"file":"use_conversations_jolt_events.js","sourceRoot":"","sources":["../../src/hooks/use_conversations_jolt_events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,OAAO,EAAE,2CAA2C,EAAE,MAAM,+BAA+B,CAAA;AAE3F,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,OAAO,SAAS,CAAwB,wBAAwB,CAAC,CAAA;AACnE,CAAC,CAAA;AAED,MAAM,UAAU,0BAA0B,CAAC,IAAuC;IAChF,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,gBAAgB,EAAE,CAAA;IAClD,MAAM,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAA;IACzC,MAAM,kBAAkB,GAAG,qBAAqB,EAAE,CAAA;IAClD,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC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types'\nimport { ConversationRequestArgs } from '../utils/request/conversation'\nimport { useConversationsCache } from './use_conversations_cache'\nimport { currentPersonRequestArgs, useCurrentPersonCache } from './use_current_person'\nimport { useJoltChannel, useJoltEvent } from './use_jolt'\nimport { useApiGet } from './use_api'\nimport { useApiClient } from './use_api_client'\nimport { JoltConversationEvent } from '../types/jolt_events'\nimport { completeMessageCreationConversationTracking } from '../utils/performance_tracking'\n\nconst useCurrentPerson = () => {\n return useApiGet<CurrentPersonResource>(currentPersonRequestArgs)\n}\n\nexport function useConversationsJoltEvents(args?: Partial<ConversationRequestArgs>) {\n const { data: currentPerson } = useCurrentPerson()\n const cache = useConversationsCache(args)\n const currentPersonCache = useCurrentPersonCache()\n const apiClient = useApiClient()\n const enabled = currentPerson?.id ? true : false\n const joltChannel = useJoltChannel(`chat.people.${currentPerson?.id}`, enabled)\n\n useJoltEvent(joltChannel, 'conversation.updated', (e: JoltConversationEvent) => {\n if (\n e.data.data.last_message_idempotent_key &&\n e.data.data.last_message_author_id === currentPerson?.id\n ) {\n completeMessageCreationConversationTracking({\n apiClient,\n idempotentKey: e.data.data.last_message_idempotent_key,\n })\n }\n cache.fetchUpdate({ id: e.data.data.id })\n })\n useJoltEvent(joltChannel, 'conversation.created', (e: JoltConversationEvent) =>\n cache.fetchCreate({ id: e.data.data.id })\n )\n useJoltEvent(joltChannel, 'conversation.destroyed', (e: JoltConversationEvent) =>\n cache.destroy({ id: e.data.data.id })\n )\n\n useJoltEvent(joltChannel, 'STREAM_USER_UPDATED', currentPersonCache.invalidate) // Would be nice to have a non-stream chat event\n useJoltEvent(joltChannel, 'conversation.read', currentPersonCache.invalidate)\n}\n"]}
1
+ {"version":3,"file":"use_conversations_jolt_events.js","sourceRoot":"","sources":["../../src/hooks/use_conversations_jolt_events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAA;AAG3E,OAAO,EAAE,2CAA2C,EAAE,MAAM,+BAA+B,CAAA;AAC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AC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAA;IACF,YAAY,CAAC,WAAW,EAAE,sBAAsB,EAAE,CAAC,CAAwB,EAAE,EAAE,CAC7E,KAAK,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAA;IACD,YAAY,CAAC,WAAW,EAAE,wBAAwB,EAAE,CAAC,CAAwB,EAAE,EAAE,CAC/E,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CACtC,CAAA;IAED,YAAY,CAAC,WAAW,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAA,CAAC,gDAAgD;IAChI,YAAY,CAAC,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAA;AAC/E,CAAC","sourcesContent":["import { useConversationsContext } from '../contexts/conversations_context'\nimport { CurrentPersonResource } from '../types'\nimport { JoltConversationEvent } from '../types/jolt_events'\nimport { completeMessageCreationConversationTracking } from '../utils/performance_tracking'\nimport { useApiGet } from './use_api'\nimport { useApiClient } from './use_api_client'\nimport { useConversationsCache } from './use_conversations_cache'\nimport { currentPersonRequestArgs, useCurrentPersonCache } from './use_current_person'\nimport { useJoltChannel, useJoltEvent } from './use_jolt'\n\nconst useCurrentPerson = () => {\n return useApiGet<CurrentPersonResource>(currentPersonRequestArgs)\n}\n\nexport function useConversationsJoltEvents() {\n const { data: currentPerson } = useCurrentPerson()\n const { args } = useConversationsContext()\n const cache = useConversationsCache(args)\n const currentPersonCache = useCurrentPersonCache()\n const apiClient = useApiClient()\n const enabled = currentPerson?.id ? true : false\n const joltChannel = useJoltChannel(`chat.people.${currentPerson?.id}`, enabled)\n\n useJoltEvent(joltChannel, 'conversation.updated', (e: JoltConversationEvent) => {\n if (\n e.data.data.last_message_idempotent_key &&\n e.data.data.last_message_author_id === currentPerson?.id\n ) {\n completeMessageCreationConversationTracking({\n apiClient,\n idempotentKey: e.data.data.last_message_idempotent_key,\n })\n }\n cache.fetchUpdate({ id: e.data.data.id })\n })\n useJoltEvent(joltChannel, 'conversation.created', (e: JoltConversationEvent) =>\n cache.fetchCreate({ id: e.data.data.id })\n )\n useJoltEvent(joltChannel, 'conversation.destroyed', (e: JoltConversationEvent) =>\n cache.destroy({ id: e.data.data.id })\n )\n\n useJoltEvent(joltChannel, 'STREAM_USER_UPDATED', currentPersonCache.invalidate) // Would be nice to have a non-stream chat event\n useJoltEvent(joltChannel, 'conversation.read', currentPersonCache.invalidate)\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/chat-react-native",
3
- "version": "3.17.1",
3
+ "version": "3.17.2-rc.1",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -59,5 +59,5 @@
59
59
  "react-native-url-polyfill": "^2.0.0",
60
60
  "typescript": "<5.6.0"
61
61
  },
62
- "gitHead": "7c2622a94c9803e4085cf9c58929f76b8614895e"
62
+ "gitHead": "73be1f8df1e9390a3a21021fc5266e32c336df07"
63
63
  }
@@ -6,7 +6,7 @@ import {
6
6
  interpolateColor,
7
7
  Easing,
8
8
  } from 'react-native-reanimated'
9
- import { useTheme } from '../hooks'
9
+ import { useTheme } from './use_theme'
10
10
 
11
11
  export function useAnimatedMessageBackgroundColor() {
12
12
  const { colors } = useTheme()
@@ -1,19 +1,20 @@
1
+ import { useConversationsContext } from '../contexts/conversations_context'
1
2
  import { CurrentPersonResource } from '../types'
2
- import { ConversationRequestArgs } from '../utils/request/conversation'
3
+ import { JoltConversationEvent } from '../types/jolt_events'
4
+ import { completeMessageCreationConversationTracking } from '../utils/performance_tracking'
5
+ import { useApiGet } from './use_api'
6
+ import { useApiClient } from './use_api_client'
3
7
  import { useConversationsCache } from './use_conversations_cache'
4
8
  import { currentPersonRequestArgs, useCurrentPersonCache } from './use_current_person'
5
9
  import { useJoltChannel, useJoltEvent } from './use_jolt'
6
- import { useApiGet } from './use_api'
7
- import { useApiClient } from './use_api_client'
8
- import { JoltConversationEvent } from '../types/jolt_events'
9
- import { completeMessageCreationConversationTracking } from '../utils/performance_tracking'
10
10
 
11
11
  const useCurrentPerson = () => {
12
12
  return useApiGet<CurrentPersonResource>(currentPersonRequestArgs)
13
13
  }
14
14
 
15
- export function useConversationsJoltEvents(args?: Partial<ConversationRequestArgs>) {
15
+ export function useConversationsJoltEvents() {
16
16
  const { data: currentPerson } = useCurrentPerson()
17
+ const { args } = useConversationsContext()
17
18
  const cache = useConversationsCache(args)
18
19
  const currentPersonCache = useCurrentPersonCache()
19
20
  const apiClient = useApiClient()