@planningcenter/chat-react-native 3.24.4 → 3.24.5-qa-563.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.
Files changed (101) hide show
  1. package/build/components/conversation/message.d.ts +1 -2
  2. package/build/components/conversation/message.d.ts.map +1 -1
  3. package/build/components/conversation/message.js +5 -5
  4. package/build/components/conversation/message.js.map +1 -1
  5. package/build/components/conversation/message_form.d.ts.map +1 -1
  6. package/build/components/conversation/message_form.js +1 -4
  7. package/build/components/conversation/message_form.js.map +1 -1
  8. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  9. package/build/components/conversation/messages_disabled_banners.js +2 -14
  10. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  11. package/build/components/conversations/conversation_actions.js +3 -3
  12. package/build/components/conversations/conversation_actions.js.map +1 -1
  13. package/build/components/conversations/conversations.d.ts.map +1 -1
  14. package/build/components/conversations/conversations.js +1 -0
  15. package/build/components/conversations/conversations.js.map +1 -1
  16. package/build/hooks/use_conversation.d.ts.map +1 -1
  17. package/build/hooks/use_conversation.js +13 -1
  18. package/build/hooks/use_conversation.js.map +1 -1
  19. package/build/hooks/use_conversation_membership.d.ts +5 -0
  20. package/build/hooks/use_conversation_membership.d.ts.map +1 -0
  21. package/build/hooks/use_conversation_membership.js +63 -0
  22. package/build/hooks/use_conversation_membership.js.map +1 -0
  23. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  24. package/build/hooks/use_conversations_actions.js +4 -0
  25. package/build/hooks/use_conversations_actions.js.map +1 -1
  26. package/build/hooks/use_features.d.ts +1 -1
  27. package/build/hooks/use_features.js +1 -1
  28. package/build/hooks/use_features.js.map +1 -1
  29. package/build/navigation/index.d.ts +10 -0
  30. package/build/navigation/index.d.ts.map +1 -1
  31. package/build/navigation/index.js +12 -2
  32. package/build/navigation/index.js.map +1 -1
  33. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  34. package/build/screens/conversation_details_screen.js +51 -19
  35. package/build/screens/conversation_details_screen.js.map +1 -1
  36. package/build/screens/conversation_notification_level_select_screen.d.ts +8 -0
  37. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -0
  38. package/build/screens/conversation_notification_level_select_screen.js +49 -0
  39. package/build/screens/conversation_notification_level_select_screen.js.map +1 -0
  40. package/build/screens/conversation_screen.d.ts +4 -3
  41. package/build/screens/conversation_screen.d.ts.map +1 -1
  42. package/build/screens/conversation_screen.js +20 -14
  43. package/build/screens/conversation_screen.js.map +1 -1
  44. package/build/screens/group_notification_level_select_screen.d.ts +8 -0
  45. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -0
  46. package/build/screens/group_notification_level_select_screen.js +40 -0
  47. package/build/screens/group_notification_level_select_screen.js.map +1 -0
  48. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  49. package/build/screens/group_notification_settings_screen.js +30 -17
  50. package/build/screens/group_notification_settings_screen.js.map +1 -1
  51. package/build/screens/message_actions_screen.js +1 -2
  52. package/build/screens/message_actions_screen.js.map +1 -1
  53. package/build/screens/notification_settings/hooks/groups.d.ts +6 -5
  54. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  55. package/build/screens/notification_settings/hooks/groups.js +63 -36
  56. package/build/screens/notification_settings/hooks/groups.js.map +1 -1
  57. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  58. package/build/screens/notification_settings_screen.js +25 -11
  59. package/build/screens/notification_settings_screen.js.map +1 -1
  60. package/build/types/resources/conversation.d.ts +2 -3
  61. package/build/types/resources/conversation.d.ts.map +1 -1
  62. package/build/types/resources/conversation.js.map +1 -1
  63. package/build/types/resources/conversation_membership.d.ts +16 -0
  64. package/build/types/resources/conversation_membership.d.ts.map +1 -0
  65. package/build/types/resources/conversation_membership.js +2 -0
  66. package/build/types/resources/conversation_membership.js.map +1 -0
  67. package/build/types/resources/group_membership.d.ts +7 -0
  68. package/build/types/resources/group_membership.d.ts.map +1 -1
  69. package/build/types/resources/group_membership.js.map +1 -1
  70. package/build/types/resources/index.d.ts +1 -0
  71. package/build/types/resources/index.d.ts.map +1 -1
  72. package/build/types/resources/index.js +1 -0
  73. package/build/types/resources/index.js.map +1 -1
  74. package/build/utils/deep_snake_case_keys.d.ts +4 -0
  75. package/build/utils/deep_snake_case_keys.d.ts.map +1 -0
  76. package/build/utils/deep_snake_case_keys.js +13 -0
  77. package/build/utils/deep_snake_case_keys.js.map +1 -0
  78. package/package.json +2 -2
  79. package/src/components/conversation/message.tsx +4 -9
  80. package/src/components/conversation/message_form.tsx +1 -4
  81. package/src/components/conversation/messages_disabled_banners.tsx +9 -17
  82. package/src/components/conversations/conversation_actions.tsx +3 -3
  83. package/src/components/conversations/conversations.tsx +1 -0
  84. package/src/hooks/use_conversation.ts +13 -1
  85. package/src/hooks/use_conversation_membership.ts +91 -0
  86. package/src/hooks/use_conversations_actions.ts +4 -0
  87. package/src/hooks/use_features.ts +1 -1
  88. package/src/navigation/index.tsx +19 -1
  89. package/src/screens/conversation_details_screen.tsx +88 -25
  90. package/src/screens/conversation_notification_level_select_screen.tsx +73 -0
  91. package/src/screens/conversation_screen.tsx +20 -17
  92. package/src/screens/group_notification_level_select_screen.tsx +62 -0
  93. package/src/screens/group_notification_settings_screen.tsx +53 -18
  94. package/src/screens/message_actions_screen.tsx +1 -2
  95. package/src/screens/notification_settings/hooks/groups.ts +76 -37
  96. package/src/screens/notification_settings_screen.tsx +24 -21
  97. package/src/types/resources/conversation.ts +2 -3
  98. package/src/types/resources/conversation_membership.ts +17 -0
  99. package/src/types/resources/group_membership.ts +7 -0
  100. package/src/types/resources/index.ts +1 -0
  101. package/src/utils/deep_snake_case_keys.ts +16 -0
@@ -1,6 +1,13 @@
1
1
  import { ResourceObject } from '../api_primitives'
2
2
 
3
+ interface GroupNotificationLevelOption {
4
+ value: string
5
+ description: string
6
+ enabled: boolean
7
+ }
8
+
3
9
  export interface GroupMembership extends ResourceObject {
4
10
  notificationLevel: string
5
11
  notificationLevelDescription: string
12
+ notificationLevelOptions: GroupNotificationLevelOption[]
6
13
  }
@@ -1,5 +1,6 @@
1
1
  export * from './analytics_metadata'
2
2
  export * from './conversation'
3
+ export * from './conversation_membership'
3
4
  export * from './member'
4
5
  export * from './message'
5
6
  export * from './oauth_token'
@@ -0,0 +1,16 @@
1
+ import { isArray, isObject, mapKeys, mapValues, snakeCase } from 'lodash'
2
+
3
+ type ObjType = Record<string, unknown> | unknown[] | unknown
4
+
5
+ export function deepSnakeCaseKeys<T extends ObjType>(obj: T): T {
6
+ if (isArray(obj)) {
7
+ return obj.map(deepSnakeCaseKeys) as T
8
+ } else if (isObject(obj)) {
9
+ return mapValues(
10
+ // @ts-ignore This mutates the object, but we don't care about the type here
11
+ mapKeys(obj, (_value: string, key: string) => snakeCase(key)),
12
+ deepSnakeCaseKeys
13
+ ) as T
14
+ }
15
+ return obj
16
+ }