@cometchat/chat-uikit-react-native 4.0.1 → 4.0.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.
Files changed (235) hide show
  1. package/README.md +1 -1
  2. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  3. package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
  4. package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
  5. package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/7.4/gc.properties +0 -0
  9. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  11. package/android/.gradle/vcs-1/gc.properties +0 -0
  12. package/android/.idea/gradle.xml +13 -0
  13. package/android/.idea/misc.xml +9 -0
  14. package/android/.idea/vcs.xml +6 -0
  15. package/android/src/main/java/com/reactnativecometchatuikit/{RNSoundModule.java → CometChatSoundModule.java} +22 -22
  16. package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -1
  17. package/ios/{RNSound.h → CometChatSoundModule.h} +1 -1
  18. package/ios/{RNSound.m → CometChatSoundModule.m} +2 -2
  19. package/lib/CometChatConversations/ConversationsConfiguration.d.ts +1 -0
  20. package/lib/CometChatDetails/DetailsConfiguration.d.ts +1 -0
  21. package/lib/CometChatGroupMembers/GroupMemberConfiguration.d.ts +1 -0
  22. package/lib/CometChatGroups/GroupsConfiguration.d.ts +1 -0
  23. package/lib/CometChatMessageComposer/CometChatMessageComposer.js +1 -7
  24. package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
  25. package/lib/CometChatMessageHeader/MessageHeaderConfiguration.d.ts +1 -0
  26. package/lib/CometChatMessageList/CometChatMessageList.js +18 -49
  27. package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
  28. package/lib/CometChatMessageList/MessageListConfiguration.d.ts +1 -0
  29. package/lib/CometChatMessages/MessagesConfiguration.d.ts +1 -0
  30. package/lib/CometChatTabs/TabItems.d.ts +1 -0
  31. package/lib/CometChatThreadedMessages/ThreadedMessagesConfiguration.d.ts +1 -0
  32. package/lib/calls/CometChatCallDetails/CallDetailsConfiguration.d.ts +1 -0
  33. package/lib/calls/CometChatCallHistory/CallHistoryConfiguration.d.ts +1 -0
  34. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +3 -3
  35. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
  36. package/lib/extensions/ImageModeration/ImageModerationDecorator.d.ts +1 -0
  37. package/lib/extensions/ImageModeration/ImageModerationFilter.js +4 -4
  38. package/lib/extensions/ImageModeration/ImageModerationFilter.js.map +1 -1
  39. package/lib/extensions/LinkPreview/LinkPreviewExtentionDecorator.d.ts +1 -0
  40. package/lib/extensions/MessageTranslation/MessageTranslationDecorator.d.ts +1 -0
  41. package/lib/extensions/SmartReplies/SmartRepliesDecorator.js +1 -1
  42. package/lib/extensions/SmartReplies/SmartRepliesDecorator.js.map +1 -1
  43. package/lib/extensions/Stickers/StickersExtensionDecorator.d.ts +1 -1
  44. package/lib/extensions/Stickers/StickersExtensionDecorator.js +2 -4
  45. package/lib/extensions/Stickers/StickersExtensionDecorator.js.map +1 -1
  46. package/lib/extensions/TextModeration/TextModerationExtensionDecorator.d.ts +1 -0
  47. package/lib/index.d.ts +0 -13
  48. package/lib/index.js +0 -14
  49. package/lib/index.js.map +1 -1
  50. package/lib/shared/CometChatUiKit/CometChatUIKit.d.ts +0 -2
  51. package/lib/shared/CometChatUiKit/CometChatUIKit.js +2 -13
  52. package/lib/shared/CometChatUiKit/CometChatUIKit.js.map +1 -1
  53. package/lib/shared/CometChatUiKit/UIKitSettings.d.ts +1 -5
  54. package/lib/shared/CometChatUiKit/UIKitSettings.js +1 -3
  55. package/lib/shared/CometChatUiKit/UIKitSettings.js.map +1 -1
  56. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +0 -2
  57. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
  58. package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +1 -3
  59. package/lib/shared/events/CometChatUIEventHandler/Listener.js +1 -4
  60. package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
  61. package/lib/shared/events/CometChatUIEvents.d.ts +1 -2
  62. package/lib/shared/events/CometChatUIEvents.js +0 -1
  63. package/lib/shared/events/CometChatUIEvents.js.map +1 -1
  64. package/lib/shared/framework/DataSource.d.ts +2 -1
  65. package/lib/shared/framework/DataSourceDecorator.d.ts +2 -1
  66. package/lib/shared/framework/DataSourceDecorator.js +2 -2
  67. package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
  68. package/lib/shared/framework/MessageDataSource.d.ts +1 -1
  69. package/lib/shared/framework/MessageDataSource.js +2 -2
  70. package/lib/shared/framework/MessageDataSource.js.map +1 -1
  71. package/lib/shared/helper/types/index.d.ts +1 -0
  72. package/lib/shared/modals/CometChatDetailsOption.d.ts +1 -0
  73. package/lib/shared/modals/CometChatMessageOption.d.ts +1 -0
  74. package/lib/shared/modals/CometChatMessageTemplate.d.ts +1 -0
  75. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +153 -230
  76. package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +0 -4
  77. package/lib/shared/resources/CometChatLocalize/resources/de/translation.json +0 -4
  78. package/lib/shared/resources/CometChatLocalize/resources/en/translation.json +0 -4
  79. package/lib/shared/resources/CometChatLocalize/resources/es/translation.json +0 -4
  80. package/lib/shared/resources/CometChatLocalize/resources/fr/translation.json +0 -4
  81. package/lib/shared/resources/CometChatLocalize/resources/hi/translation.json +0 -4
  82. package/lib/shared/resources/CometChatLocalize/resources/lt/translation.json +0 -4
  83. package/lib/shared/resources/CometChatLocalize/resources/ms/translation.json +0 -4
  84. package/lib/shared/resources/CometChatLocalize/resources/pt/translation.json +0 -4
  85. package/lib/shared/resources/CometChatLocalize/resources/ru/translation.json +0 -4
  86. package/lib/shared/resources/CometChatLocalize/resources/sv/translation.json +0 -4
  87. package/lib/shared/resources/CometChatLocalize/resources/zh/translation.json +0 -4
  88. package/lib/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +0 -4
  89. package/package.json +2 -2
  90. package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +3 -4
  91. package/src/CometChatConversations/CometChatConversations.tsx +56 -46
  92. package/src/CometChatMessageHeader/listners.ts +5 -4
  93. package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +35 -35
  94. package/src/CometChatMessageList/CometChatMessageList.tsx +251 -142
  95. package/src/CometChatMessages/CometChatMessages.tsx +4 -3
  96. package/src/CometChatTabs/CometChatTabs.tsx +1 -1
  97. package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +3 -9
  98. package/src/index.ts +59 -17
  99. package/src/shared/CometChatUiKit/CometChatUIKit.ts +98 -10
  100. package/src/shared/constants/UIKitConstants.ts +81 -47
  101. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +46 -2
  102. package/src/shared/events/CometChatUIEventHandler/Listener.ts +61 -2
  103. package/src/shared/events/ListenerInitializer.ts +73 -0
  104. package/src/shared/events/messages.ts +14 -0
  105. package/src/shared/framework/DataSource.ts +11 -0
  106. package/src/shared/framework/DataSourceDecorator.tsx +35 -0
  107. package/src/shared/framework/MessageDataSource.tsx +83 -3
  108. package/src/shared/index.ts +44 -0
  109. package/src/shared/modals/InteractiveData/InteractiveActions/APIAction.ts +118 -0
  110. package/src/shared/modals/InteractiveData/InteractiveActions/CustomAction.ts +19 -0
  111. package/src/shared/modals/InteractiveData/InteractiveActions/URLNavigationAction.ts +34 -0
  112. package/src/shared/modals/InteractiveData/InteractiveActions/index.ts +3 -0
  113. package/src/shared/modals/InteractiveData/InteractiveData/InteractiveCardData.ts +69 -0
  114. package/src/shared/modals/InteractiveData/InteractiveData/InteractiveFormData.ts +119 -0
  115. package/src/shared/modals/InteractiveData/InteractiveData/index.ts +2 -0
  116. package/src/shared/modals/InteractiveData/InteractiveElements/BaseInputElement.ts +102 -0
  117. package/src/shared/modals/InteractiveData/InteractiveElements/BaseInteractiveElement.ts +45 -0
  118. package/src/shared/modals/InteractiveData/InteractiveElements/ButtonElement.ts +61 -0
  119. package/src/shared/modals/InteractiveData/InteractiveElements/CheckboxElement.ts +75 -0
  120. package/src/shared/modals/InteractiveData/InteractiveElements/DropdownElement.ts +83 -0
  121. package/src/shared/modals/InteractiveData/InteractiveElements/LabelElement.ts +32 -0
  122. package/src/shared/modals/InteractiveData/InteractiveElements/OptionElement.ts +39 -0
  123. package/src/shared/modals/InteractiveData/InteractiveElements/RadioButtonElement.ts +76 -0
  124. package/src/shared/modals/InteractiveData/InteractiveElements/SingleSelectElement.ts +76 -0
  125. package/src/shared/modals/InteractiveData/InteractiveElements/TextInputElement.ts +101 -0
  126. package/src/shared/modals/InteractiveData/InteractiveElements/index.ts +10 -0
  127. package/src/shared/modals/InteractiveData/InteractiveEntities/ActionEntity.ts +41 -0
  128. package/src/shared/modals/InteractiveData/InteractiveEntities/ElementEntity.ts +64 -0
  129. package/src/shared/modals/InteractiveData/InteractiveEntities/index.ts +2 -0
  130. package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +142 -0
  131. package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +38 -0
  132. package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +152 -0
  133. package/src/shared/modals/InteractiveData/InteractiveMessage/index.ts +3 -0
  134. package/src/shared/modals/InteractiveData/index.ts +28 -0
  135. package/src/shared/modals/index.ts +19 -0
  136. package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +4 -1
  137. package/src/shared/resources/CometChatLocalize/resources/de/translation.json +4 -1
  138. package/src/shared/resources/CometChatLocalize/resources/en/translation.json +4 -1
  139. package/src/shared/resources/CometChatLocalize/resources/es/translation.json +4 -1
  140. package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +4 -1
  141. package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +4 -1
  142. package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +4 -1
  143. package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +4 -1
  144. package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +4 -1
  145. package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +4 -1
  146. package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +4 -1
  147. package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +4 -1
  148. package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +4 -1
  149. package/src/shared/resources/CometChatSoundManager/CometChatSoundManager.js +2 -2
  150. package/src/shared/resources/CometChatSoundManager/sound.js +35 -35
  151. package/src/shared/utils/InteractiveMessageUtils.ts +20 -0
  152. package/src/shared/utils/NetworkUtils.tsx +20 -0
  153. package/src/shared/utils/conversationUtils.ts +9 -6
  154. package/src/shared/views/CometChatButton/CometChatButton.tsx +32 -22
  155. package/src/shared/views/CometChatCardBubble/CardBubbleStyle.tsx +47 -0
  156. package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +173 -0
  157. package/src/shared/views/CometChatCardBubble/index.tsx +1 -0
  158. package/src/shared/views/CometChatCheckBox/CheckBoxStyle.tsx +43 -0
  159. package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +79 -0
  160. package/src/shared/views/CometChatDate/CometChatDate.tsx +2 -3
  161. package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +126 -0
  162. package/src/shared/views/CometChatDropDown/DropDownStyle.tsx +39 -0
  163. package/src/shared/views/CometChatDropDown/resources/downArrowIcon.png +0 -0
  164. package/src/shared/views/CometChatDropDown/resources/index.js +5 -0
  165. package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +464 -0
  166. package/src/shared/views/CometChatFormBubble/FormBubbleStyle.tsx +91 -0
  167. package/src/shared/views/CometChatFormBubble/index.tsx +1 -0
  168. package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +13 -5
  169. package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +14 -3
  170. package/src/shared/views/CometChatLabel/CometChatLabel.tsx +27 -0
  171. package/src/shared/views/CometChatLabel/LabelStyle.ts +19 -0
  172. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +5 -4
  173. package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +66 -0
  174. package/src/shared/views/CometChatQuickView/QuickViewStyle.ts +55 -0
  175. package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +67 -0
  176. package/src/shared/views/CometChatRadioButton/RadioButtonStyle.tsx +38 -0
  177. package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +63 -0
  178. package/src/shared/views/CometChatSingleSelect/SingleStyle.tsx +35 -0
  179. package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +67 -0
  180. package/src/shared/views/CometChatTextInput/TextInputStyle.tsx +26 -0
  181. package/src/shared/views/index.ts +7 -1
  182. package/lib/AI/AIConversationStarter/AIConversationStarter.d.ts +0 -12
  183. package/lib/AI/AIConversationStarter/AIConversationStarter.js +0 -31
  184. package/lib/AI/AIConversationStarter/AIConversationStarter.js.map +0 -1
  185. package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +0 -25
  186. package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js +0 -175
  187. package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js.map +0 -1
  188. package/lib/AI/AIConversationStarter/AIConversationStarterStyle.d.ts +0 -4
  189. package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js +0 -8
  190. package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js.map +0 -1
  191. package/lib/AI/AIConversationStarter/configuration.d.ts +0 -14
  192. package/lib/AI/AIConversationStarter/configuration.js +0 -16
  193. package/lib/AI/AIConversationStarter/configuration.js.map +0 -1
  194. package/lib/AI/AIConversationStarter/style.d.ts +0 -31
  195. package/lib/AI/AIConversationStarter/style.js +0 -62
  196. package/lib/AI/AIConversationStarter/style.js.map +0 -1
  197. package/lib/AI/AIEnabler.d.ts +0 -10
  198. package/lib/AI/AIEnabler.js +0 -102
  199. package/lib/AI/AIEnabler.js.map +0 -1
  200. package/lib/AI/AIEnablerDecorator.d.ts +0 -43
  201. package/lib/AI/AIEnablerDecorator.js +0 -251
  202. package/lib/AI/AIEnablerDecorator.js.map +0 -1
  203. package/lib/AI/AIExtensionDataSource.d.ts +0 -6
  204. package/lib/AI/AIExtensionDataSource.js +0 -10
  205. package/lib/AI/AIExtensionDataSource.js.map +0 -1
  206. package/lib/AI/AISmartReplies/AISmartReplies.d.ts +0 -10
  207. package/lib/AI/AISmartReplies/AISmartReplies.js +0 -23
  208. package/lib/AI/AISmartReplies/AISmartReplies.js.map +0 -1
  209. package/lib/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +0 -7
  210. package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js +0 -12
  211. package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js.map +0 -1
  212. package/lib/AI/AISmartReplies/AISmartRepliesStyle.d.ts +0 -12
  213. package/lib/AI/AISmartReplies/AISmartRepliesStyle.js +0 -15
  214. package/lib/AI/AISmartReplies/AISmartRepliesStyle.js.map +0 -1
  215. package/lib/AI/AISmartReplies/configuration.d.ts +0 -14
  216. package/lib/AI/AISmartReplies/configuration.js +0 -16
  217. package/lib/AI/AISmartReplies/configuration.js.map +0 -1
  218. package/lib/AI/CardView.d.ts +0 -19
  219. package/lib/AI/CardView.js +0 -45
  220. package/lib/AI/CardView.js.map +0 -1
  221. package/lib/AI/CardViewStyle.d.ts +0 -29
  222. package/lib/AI/CardViewStyle.js +0 -36
  223. package/lib/AI/CardViewStyle.js.map +0 -1
  224. package/lib/AI/configuration.d.ts +0 -14
  225. package/lib/AI/configuration.js +0 -16
  226. package/lib/AI/configuration.js.map +0 -1
  227. package/lib/AI/resources/index.d.ts +0 -5
  228. package/lib/AI/resources/index.js +0 -6
  229. package/lib/AI/resources/index.js.map +0 -1
  230. package/lib/AI/style.d.ts +0 -115
  231. package/lib/AI/style.js +0 -139
  232. package/lib/AI/style.js.map +0 -1
  233. package/lib/AI/utils.d.ts +0 -38
  234. package/lib/AI/utils.js +0 -28
  235. package/lib/AI/utils.js.map +0 -1
package/lib/AI/style.d.ts DELETED
@@ -1,115 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
- import { CometChatTheme } from '../shared';
3
- import { CardStyle, CardViewStyle } from './CardViewStyle';
4
- import { AIButtonsStyle } from './utils';
5
- import { AISmartRepliesStyle } from './AISmartReplies/AISmartRepliesStyle';
6
- export declare function viewContainerStyle(style: CardViewStyle): {
7
- justifyContent: string;
8
- alignItems: string;
9
- position: string;
10
- bottom: number;
11
- width: string;
12
- };
13
- export declare function defaultViewStyle(style: CardViewStyle): {
14
- justifyContent: string;
15
- alignItems: string;
16
- textAlign: string;
17
- };
18
- export declare function errorLabelStyle(style: CardViewStyle, aiStyles?: AISmartRepliesStyle): {
19
- color: string;
20
- fontFamily?: string;
21
- fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
22
- fontSize?: number;
23
- };
24
- export declare function emptyLabelStyle(style: CardViewStyle, aiStyles?: AISmartRepliesStyle): {
25
- color: string;
26
- fontFamily?: string;
27
- fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
28
- fontSize?: number;
29
- };
30
- export declare function tabButtonStyle(style: CardViewStyle): {
31
- borderRadius: number;
32
- backgroundColor: string;
33
- borderWidth?: number;
34
- borderStyle?: "solid" | "dotted" | "dashed";
35
- borderColor?: string;
36
- alignItems: string;
37
- opacity: number;
38
- cursor: string;
39
- height: string | number;
40
- width: string | number;
41
- flexDirection: string;
42
- justifyContent: string;
43
- padding: number;
44
- };
45
- export declare function getPopoverStyle(style: CardViewStyle): StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
46
- borderRadius: number;
47
- flexDirection: string;
48
- alignItems: string;
49
- borderWidth?: number;
50
- borderStyle?: "solid" | "dotted" | "dashed";
51
- borderColor?: string;
52
- height: string | number;
53
- width: string | number;
54
- backgroundColor: string;
55
- }>;
56
- export declare function getloadingStateStyle(theme: any, configStyles?: CardViewStyle, AIStyle?: AISmartRepliesStyle): any;
57
- export declare function getCardViewStyle(theme: CometChatTheme, style: CardViewStyle, AiStyles?: AISmartRepliesStyle): import("react-native").ViewStyle | import("react-native").TextStyle | import("react-native").ImageStyle;
58
- export declare const containerStyle: StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
59
- overflow: string;
60
- width: string;
61
- position: string;
62
- justifyContent: string;
63
- alignItems: string;
64
- flexDirection: string;
65
- }>;
66
- export declare const contentContainerStyle: StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
67
- alignItems: string;
68
- width: string;
69
- flexDirection: string;
70
- justifyContent: string;
71
- backgroundColor: string;
72
- overflow: string;
73
- padding: number;
74
- height: string;
75
- }>;
76
- export declare function getRepliesStyle(theme: any, configStyles: any, cardStyle?: CardStyle): any;
77
- export declare function getRepliesWrapperStyle(theme: CometChatTheme, configStyles: AIButtonsStyle, cardStyle?: CardStyle): StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
78
- borderRadius: string | number;
79
- boxSizing: string;
80
- cursor: string;
81
- borderWidth?: number;
82
- borderStyle?: "solid" | "dotted" | "dashed";
83
- borderColor?: string;
84
- flexDirection: string;
85
- padding: number;
86
- marginVertical: number;
87
- backgroundColor: any;
88
- } | {
89
- borderRadius: string | number;
90
- boxSizing: string;
91
- cursor: string;
92
- borderBottomWidth: number;
93
- borderStyle: string;
94
- borderBottomColor: any;
95
- flexDirection: string;
96
- padding: number;
97
- marginVertical: number;
98
- backgroundColor: any;
99
- }>;
100
- export declare function getButtonStyles(theme: CometChatTheme, style: AISmartRepliesStyle, cardStyle?: CardStyle): StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
101
- color: any;
102
- marginBottom: number;
103
- height: string;
104
- width: string;
105
- fontFamily?: string;
106
- fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
107
- fontSize?: number;
108
- backgroundColor: any;
109
- borderWidth?: number;
110
- borderStyle?: "solid" | "dotted" | "dashed";
111
- borderColor?: string;
112
- paddingHorizontal: number;
113
- justifyContent: string;
114
- alignItems: string;
115
- }>;
package/lib/AI/style.js DELETED
@@ -1,139 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
- export function viewContainerStyle(style) {
3
- return {
4
- justifyContent: 'center',
5
- alignItems: 'center',
6
- position: 'absolute',
7
- bottom: 8,
8
- width: '100%',
9
- // height: '100%',
10
- };
11
- }
12
- export function defaultViewStyle(style) {
13
- return {
14
- justifyContent: 'center',
15
- alignItems: 'center',
16
- textAlign: 'center',
17
- };
18
- }
19
- export function errorLabelStyle(style, aiStyles) {
20
- return {
21
- ...aiStyles?.errorStateTextFont || style?.errorStateTextFont,
22
- color: aiStyles?.errorStateTextColor || style?.errorStateTextColor,
23
- };
24
- }
25
- export function emptyLabelStyle(style, aiStyles) {
26
- return {
27
- ...aiStyles?.emptyStateTextFont || style?.emptyStateTextFont,
28
- color: aiStyles?.emptyStateTextColor || style?.emptyStateTextColor,
29
- };
30
- }
31
- export function tabButtonStyle(style) {
32
- return {
33
- alignItems: 'center',
34
- opacity: 1,
35
- cursor: 'pointer',
36
- height: style?.height,
37
- width: style?.width,
38
- flexDirection: 'row-reverse',
39
- justifyContent: 'space-between',
40
- padding: 8,
41
- ...style?.border,
42
- borderRadius: style?.borderRadius,
43
- backgroundColor: style?.backgroundColor,
44
- };
45
- }
46
- export function getPopoverStyle(style) {
47
- return StyleSheet.create({
48
- height: style?.height || 'auto',
49
- // flex: 1,
50
- width: style?.width || '100%',
51
- backgroundColor: style.backgroundColor,
52
- ...style.border,
53
- borderRadius: style.borderRadius,
54
- flexDirection: 'column',
55
- alignItems: 'center',
56
- });
57
- }
58
- export function getloadingStateStyle(theme, configStyles, AIStyle) {
59
- let fontFamily = AIStyle?.loadingStateTextFont || configStyles?.loadingStateTextFont || theme?.typography?.title2;
60
- return StyleSheet.create({
61
- ...fontFamily,
62
- color: AIStyle?.loadingStateTextColor || configStyles?.loadingStateTextColor || theme?.palette?.getAccent700(),
63
- });
64
- }
65
- export function getCardViewStyle(theme, style, AiStyles) {
66
- const defaultStyle = StyleSheet.create({
67
- tintColor: theme?.palette?.getAccent600(),
68
- emptyStateTextColor: theme?.palette?.getAccent600(),
69
- errorStateTextColor: theme?.palette?.getAccent600(),
70
- emptyStateTextFont: theme?.typography?.title2,
71
- errorStateTextFont: theme?.typography?.title2,
72
- loadingStateTextColor: theme?.palette?.getAccent600(),
73
- loadingIconTint: theme?.palette?.getAccent600(),
74
- loadingStateTextFont: theme?.typography?.title2,
75
- errorIconTint: theme?.palette?.getAccent(),
76
- emptyIconTint: theme?.palette?.getAccent600(),
77
- backgroundColor: theme?.palette?.getBackgroundColor(),
78
- border: {},
79
- borderRadius: 8,
80
- width: "100%",
81
- buttonTintColor: theme?.palette?.getAccent600(),
82
- });
83
- return StyleSheet.flatten([defaultStyle, style, AiStyles]);
84
- }
85
- export const containerStyle = StyleSheet.create({
86
- overflow: 'hidden',
87
- width: '100%',
88
- position: 'relative',
89
- justifyContent: 'flex-start',
90
- alignItems: "center",
91
- flexDirection: 'column',
92
- });
93
- export const contentContainerStyle = StyleSheet.create({
94
- alignItems: 'flex-start',
95
- width: '100%',
96
- flexDirection: 'column',
97
- justifyContent: 'center',
98
- backgroundColor: 'transparent',
99
- overflow: 'hidden',
100
- padding: 8,
101
- height: 'auto',
102
- });
103
- export function getRepliesStyle(theme, configStyles, cardStyle) {
104
- let fontFamily = configStyles?.repliesTextFont || cardStyle?.repliesTextFont || theme?.typography?.text3;
105
- return StyleSheet.create({
106
- ...fontFamily,
107
- color: configStyles?.repliesTextColor || cardStyle?.repliesTextColor || theme?.palette?.getAccent(),
108
- backgroundColor: 'transparent',
109
- textAlign: 'left',
110
- });
111
- }
112
- export function getRepliesWrapperStyle(theme, configStyles, cardStyle) {
113
- return StyleSheet.create({
114
- flexDirection: 'row',
115
- padding: 8,
116
- marginVertical: 4,
117
- backgroundColor: configStyles?.repliesTextBackgroundColor || cardStyle?.repliesTextBackgroundColor || theme?.palette?.getBackgroundColor(),
118
- ...configStyles?.repliesTextBorder || cardStyle?.repliesTextBorder || { borderBottomWidth: 1, borderStyle: "solid", borderBottomColor: theme?.palette.getAccent200() },
119
- borderRadius: configStyles?.repliesTextBorderRadius || cardStyle?.repliesTextBorderRadius || 8,
120
- boxSizing: 'border-box',
121
- cursor: 'pointer',
122
- });
123
- }
124
- export function getButtonStyles(theme, style, cardStyle) {
125
- let fontFamily = style?.buttonTextFont || cardStyle?.buttonTextFont || theme?.typography?.text1;
126
- return StyleSheet.create({
127
- paddingHorizontal: 8,
128
- justifyContent: "center",
129
- alignItems: "flex-start",
130
- ...style?.buttonBorder || cardStyle?.buttonBorder,
131
- backgroundColor: style?.buttonBackgroundColor || cardStyle?.buttonBackgroundColor || theme?.palette?.getBackgroundColor(),
132
- ...fontFamily,
133
- color: style?.buttonTextColor || cardStyle?.buttonTextColor || theme?.palette?.getAccent(),
134
- marginBottom: 8,
135
- height: style?.buttonHeight || cardStyle?.buttonHeight,
136
- width: style?.buttonWidth || cardStyle?.buttonWidth || "100%"
137
- });
138
- }
139
- //# sourceMappingURL=style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/AI/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,kBAAkB,CAAC,KAAmB;IACpD,OAAO;QACL,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,UAAU;QACpB,MAAM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EAAC,KAAK,EAAE,WAAW,IAAK,SAAS,EAAE,WAAW,IAAK,MAAM;KACjE,CAAC,CAAC;AACL,CAAC"}
package/lib/AI/utils.d.ts DELETED
@@ -1,38 +0,0 @@
1
- import { BaseStyle, FontStyleInterface, BorderStyleInterface } from "../shared";
2
- import { Card } from "./CardView";
3
- export interface AIConfigurations {
4
- "smart-replies"?: {
5
- enabled: boolean;
6
- configuration?: any;
7
- };
8
- "conversation-starter"?: {
9
- enabled: boolean;
10
- configuration?: any;
11
- };
12
- }
13
- export interface ICard {
14
- smartReply?: Card;
15
- conversationStarter?: Card;
16
- }
17
- export declare class AIButtonsStyle extends BaseStyle {
18
- repliesTextFont?: FontStyleInterface;
19
- repliesTextBorder?: BorderStyleInterface;
20
- repliesTextBorderRadius?: string;
21
- repliesTextColor?: string;
22
- repliesTextBackgroundColor?: string;
23
- emptyStateTextFont?: FontStyleInterface;
24
- emptyStateTextColor?: string;
25
- loadingStateTextFont?: FontStyleInterface;
26
- loadingStateTextColor?: string;
27
- loadingIconTint?: string;
28
- emptyIconTint?: string;
29
- errorIconTint?: string;
30
- errorStateTextFont?: FontStyleInterface;
31
- errorStateTextColor?: string;
32
- constructor(props: Partial<AIButtonsStyle>);
33
- }
34
- export declare enum State {
35
- loading = 0,
36
- error = 1,
37
- empty = 2
38
- }
package/lib/AI/utils.js DELETED
@@ -1,28 +0,0 @@
1
- import { BaseStyle } from "../shared";
2
- export class AIButtonsStyle extends BaseStyle {
3
- repliesTextFont;
4
- repliesTextBorder;
5
- repliesTextBorderRadius;
6
- repliesTextColor;
7
- repliesTextBackgroundColor;
8
- emptyStateTextFont;
9
- emptyStateTextColor;
10
- loadingStateTextFont;
11
- loadingStateTextColor;
12
- loadingIconTint;
13
- emptyIconTint;
14
- errorIconTint;
15
- errorStateTextFont;
16
- errorStateTextColor;
17
- constructor(props) {
18
- super({ ...props });
19
- Object.assign(this, props);
20
- }
21
- }
22
- export var State;
23
- (function (State) {
24
- State[State["loading"] = 0] = "loading";
25
- State[State["error"] = 1] = "error";
26
- State[State["empty"] = 2] = "empty";
27
- })(State || (State = {}));
28
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/AI/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4C,MAAM,WAAW,CAAC;AAY9E,MAAM,OAAO,cAAe,SAAQ,SAAS;IAC3C,eAAe,CAAqB;IACpC,iBAAiB,CAAuB;IACxC,uBAAuB,CAAS;IAChC,gBAAgB,CAAS;IACzB,0BAA0B,CAAS;IACnC,kBAAkB,CAAsB;IACxC,mBAAmB,CAAU;IAC7B,oBAAoB,CAAsB;IAC1C,qBAAqB,CAAU;IAC/B,eAAe,CAAS;IACxB,aAAa,CAAS;IACtB,aAAa,CAAS;IACtB,kBAAkB,CAAsB;IACxC,mBAAmB,CAAS;IAC5B,YAAY,KAA8B;QACxC,KAAK,CAAC,EAAC,GAAG,KAAK,EAAC,CAAC,CAAA;QACjB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF;AAGD,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,uCAAO,CAAA;IACP,mCAAK,CAAA;IACL,mCAAK,CAAA;AACP,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB"}