@developer_tribe/react-native-comnyx 0.6.1 → 0.7.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 (448) hide show
  1. package/Comnyx.podspec +1 -1
  2. package/README.md +192 -16
  3. package/android/build.gradle +13 -1
  4. package/android/generated/RCTAppDependencyProvider.h +25 -0
  5. package/android/generated/RCTAppDependencyProvider.mm +55 -0
  6. package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  7. package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  8. package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
  9. package/android/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  10. package/android/generated/ReactAppDependencyProvider.podspec +34 -0
  11. package/android/generated/jni/RNComnyxSpec-generated.cpp +1 -11
  12. package/android/generated/jni/RNComnyxSpec.h +0 -7
  13. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +0 -11
  14. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +0 -52
  15. package/android/src/main/AndroidManifestNew.xml +10 -0
  16. package/android/src/main/java/com/comnyx/ComnyxModule.kt +107 -5
  17. package/android/src/main/java/com/comnyx/ComnyxPackage.kt +10 -6
  18. package/android/src/main/java/com/comnyx/src/messaging/ComnyxMessaging.kt +45 -0
  19. package/android/src/main/java/com/comnyx/src/messaging/firebase/FCM.kt +38 -0
  20. package/android/src/main/java/com/comnyx/src/messaging/firebase/FirebaseMessagingService.kt +45 -0
  21. package/android/src/main/java/com/comnyx/src/messaging/notifications/NotificationsService.kt +82 -0
  22. package/android/src/main/java/com/comnyx/src/messaging/permissions/Permissions.kt +64 -0
  23. package/ios/APNService.swift +74 -0
  24. package/ios/Comnyx-Bridging-Header.h +17 -0
  25. package/ios/Comnyx.m +15 -0
  26. package/ios/Comnyx.swift +77 -0
  27. package/ios/ComnyxMessaging.swift +84 -0
  28. package/ios/PushService.swift +7 -0
  29. package/lib/commonjs/NativeComnyx.js +9 -0
  30. package/lib/commonjs/NativeComnyx.js.map +1 -0
  31. package/lib/commonjs/api/api.js +14 -3
  32. package/lib/commonjs/api/api.js.map +1 -1
  33. package/lib/commonjs/api/customers.js +3 -8
  34. package/lib/commonjs/api/customers.js.map +1 -1
  35. package/lib/commonjs/api/index.js +1 -1
  36. package/lib/commonjs/components/AppText.js +1 -1
  37. package/lib/commonjs/components/AppText.js.map +1 -1
  38. package/lib/commonjs/components/ChatList.js +1 -1
  39. package/lib/commonjs/components/ChatList.js.map +1 -1
  40. package/lib/commonjs/components/CustomerForm.js +2 -4
  41. package/lib/commonjs/components/CustomerForm.js.map +1 -1
  42. package/lib/commonjs/components/MessageInput.js +1 -1
  43. package/lib/commonjs/components/MessageInput.js.map +1 -1
  44. package/lib/commonjs/constants/viewabilityConfig.js.map +1 -0
  45. package/lib/commonjs/hooks/isRtl.js +1 -1
  46. package/lib/commonjs/hooks/useLocalize.js +1 -1
  47. package/lib/commonjs/hooks/useLocalize.js.map +1 -1
  48. package/lib/commonjs/hooks/usePolling.js +1 -1
  49. package/lib/commonjs/hooks/usePolling.js.map +1 -1
  50. package/lib/commonjs/hooks/useTheme.js +1 -1
  51. package/lib/commonjs/hooks/useTheme.js.map +1 -1
  52. package/lib/commonjs/index.js +9 -16
  53. package/lib/commonjs/index.js.map +1 -1
  54. package/lib/commonjs/notifications/index.js +21 -0
  55. package/lib/commonjs/notifications/index.js.map +1 -0
  56. package/lib/commonjs/{Accumulator.js → register/Accumulator.js} +8 -1
  57. package/lib/commonjs/register/Accumulator.js.map +1 -0
  58. package/lib/commonjs/{collectData.js → register/collectData.js} +2 -0
  59. package/lib/commonjs/register/collectData.js.map +1 -0
  60. package/lib/commonjs/register/index.js +17 -0
  61. package/lib/commonjs/register/index.js.map +1 -0
  62. package/lib/commonjs/register/init.js +14 -0
  63. package/lib/commonjs/register/init.js.map +1 -0
  64. package/lib/commonjs/register/login.js +24 -0
  65. package/lib/commonjs/register/login.js.map +1 -0
  66. package/lib/commonjs/register/logout.js +20 -0
  67. package/lib/commonjs/register/logout.js.map +1 -0
  68. package/lib/commonjs/{store.js → store/store.js} +3 -2
  69. package/lib/commonjs/store/store.js.map +1 -0
  70. package/lib/commonjs/{App.js → support/ComnyxSupport.js} +39 -14
  71. package/lib/commonjs/support/ComnyxSupport.js.map +1 -0
  72. package/lib/commonjs/support/index.js +13 -0
  73. package/lib/commonjs/support/index.js.map +1 -0
  74. package/lib/commonjs/utils/scalingUtils.js +1 -1
  75. package/lib/module/NativeComnyx.js +5 -0
  76. package/lib/module/NativeComnyx.js.map +1 -0
  77. package/lib/module/api/api.js +11 -3
  78. package/lib/module/api/api.js.map +1 -1
  79. package/lib/module/api/customers.js +3 -7
  80. package/lib/module/api/customers.js.map +1 -1
  81. package/lib/module/api/index.js +1 -1
  82. package/lib/module/api/index.js.map +1 -1
  83. package/lib/module/components/AppText.js +1 -1
  84. package/lib/module/components/AppText.js.map +1 -1
  85. package/lib/module/components/ChatList.js +1 -1
  86. package/lib/module/components/ChatList.js.map +1 -1
  87. package/lib/module/components/CustomerForm.js +2 -4
  88. package/lib/module/components/CustomerForm.js.map +1 -1
  89. package/lib/module/components/MessageInput.js +1 -1
  90. package/lib/module/components/MessageInput.js.map +1 -1
  91. package/lib/module/constants/viewabilityConfig.js.map +1 -0
  92. package/lib/module/hooks/isRtl.js +1 -1
  93. package/lib/module/hooks/isRtl.js.map +1 -1
  94. package/lib/module/hooks/useLocalize.js +1 -1
  95. package/lib/module/hooks/useLocalize.js.map +1 -1
  96. package/lib/module/hooks/usePolling.js +1 -1
  97. package/lib/module/hooks/usePolling.js.map +1 -1
  98. package/lib/module/hooks/useTheme.js +1 -1
  99. package/lib/module/hooks/useTheme.js.map +1 -1
  100. package/lib/module/index.js +8 -5
  101. package/lib/module/index.js.map +1 -1
  102. package/lib/module/notifications/index.js +19 -0
  103. package/lib/module/notifications/index.js.map +1 -0
  104. package/lib/module/{Accumulator.js → register/Accumulator.js} +7 -1
  105. package/lib/module/register/Accumulator.js.map +1 -0
  106. package/lib/module/{collectData.js → register/collectData.js} +2 -0
  107. package/lib/module/register/collectData.js.map +1 -0
  108. package/lib/module/register/index.js +13 -0
  109. package/lib/module/register/index.js.map +1 -0
  110. package/lib/module/register/init.js +10 -0
  111. package/lib/module/register/init.js.map +1 -0
  112. package/lib/module/register/login.js +20 -0
  113. package/lib/module/register/login.js.map +1 -0
  114. package/lib/module/register/logout.js +16 -0
  115. package/lib/module/register/logout.js.map +1 -0
  116. package/lib/module/{store.js → store/store.js} +2 -2
  117. package/lib/module/store/store.js.map +1 -0
  118. package/lib/module/{App.js → support/ComnyxSupport.js} +40 -15
  119. package/lib/module/support/ComnyxSupport.js.map +1 -0
  120. package/lib/module/support/index.js +4 -0
  121. package/lib/module/support/index.js.map +1 -0
  122. package/lib/module/utils/scalingUtils.js +1 -1
  123. package/lib/module/utils/scalingUtils.js.map +1 -1
  124. package/lib/typescript/jest.config.d.ts +4 -0
  125. package/lib/typescript/jest.config.d.ts.map +1 -0
  126. package/lib/typescript/setup-jest.d.ts +1 -0
  127. package/lib/typescript/setup-jest.d.ts.map +1 -0
  128. package/lib/typescript/src/NativeComnyx.d.ts +7 -0
  129. package/lib/typescript/src/NativeComnyx.d.ts.map +1 -0
  130. package/lib/typescript/src/api/api.d.ts +7 -0
  131. package/lib/typescript/src/api/api.d.ts.map +1 -0
  132. package/lib/typescript/src/api/conversations.d.ts.map +1 -0
  133. package/lib/typescript/src/api/customers.d.ts +5 -0
  134. package/lib/typescript/src/api/customers.d.ts.map +1 -0
  135. package/lib/typescript/{commonjs/src → src}/api/index.d.ts +1 -1
  136. package/lib/typescript/src/api/index.d.ts.map +1 -0
  137. package/lib/typescript/src/api/messages.d.ts.map +1 -0
  138. package/lib/typescript/src/components/AppText.d.ts.map +1 -0
  139. package/lib/typescript/src/components/ChatList.d.ts.map +1 -0
  140. package/lib/typescript/src/components/CustomAlert.d.ts.map +1 -0
  141. package/lib/typescript/src/components/CustomerForm.d.ts.map +1 -0
  142. package/lib/typescript/src/components/EmptyList.d.ts.map +1 -0
  143. package/lib/typescript/src/components/InitFailed.d.ts.map +1 -0
  144. package/lib/typescript/src/components/MessageInput.d.ts.map +1 -0
  145. package/lib/typescript/src/components/MessageItem.d.ts.map +1 -0
  146. package/lib/typescript/src/components/ScaledSheet.d.ts.map +1 -0
  147. package/lib/typescript/src/constants/activeOpacity.d.ts.map +1 -0
  148. package/lib/typescript/src/constants/countries.d.ts.map +1 -0
  149. package/lib/typescript/src/constants/rtl.d.ts.map +1 -0
  150. package/lib/typescript/src/constants/translations.d.ts.map +1 -0
  151. package/lib/typescript/src/constants/viewabilityConfig.d.ts.map +1 -0
  152. package/lib/typescript/src/data/fake/conversations.d.ts.map +1 -0
  153. package/lib/typescript/src/data/fake/customers.d.ts.map +1 -0
  154. package/lib/typescript/src/data/fake/messages.d.ts.map +1 -0
  155. package/lib/typescript/src/hooks/isRtl.d.ts.map +1 -0
  156. package/lib/typescript/src/hooks/useLocalize.d.ts.map +1 -0
  157. package/lib/typescript/src/hooks/usePolling.d.ts.map +1 -0
  158. package/lib/typescript/src/hooks/useTheme.d.ts.map +1 -0
  159. package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
  160. package/lib/typescript/src/index.d.ts +5 -0
  161. package/lib/typescript/src/index.d.ts.map +1 -0
  162. package/lib/typescript/src/notifications/index.d.ts +21 -0
  163. package/lib/typescript/src/notifications/index.d.ts.map +1 -0
  164. package/lib/typescript/{commonjs/src → src/register}/Accumulator.d.ts +4 -3
  165. package/lib/typescript/src/register/Accumulator.d.ts.map +1 -0
  166. package/lib/typescript/src/register/collectData.d.ts.map +1 -0
  167. package/lib/typescript/src/register/index.d.ts +11 -0
  168. package/lib/typescript/src/register/index.d.ts.map +1 -0
  169. package/lib/typescript/src/register/init.d.ts +6 -0
  170. package/lib/typescript/src/register/init.d.ts.map +1 -0
  171. package/lib/typescript/src/register/login.d.ts +6 -0
  172. package/lib/typescript/src/register/login.d.ts.map +1 -0
  173. package/lib/typescript/src/register/logout.d.ts +2 -0
  174. package/lib/typescript/src/register/logout.d.ts.map +1 -0
  175. package/lib/typescript/{module/src → src/store}/store.d.ts +6 -4
  176. package/lib/typescript/src/store/store.d.ts.map +1 -0
  177. package/lib/typescript/src/support/ComnyxSupport.d.ts +12 -0
  178. package/lib/typescript/src/support/ComnyxSupport.d.ts.map +1 -0
  179. package/lib/typescript/src/support/index.d.ts +2 -0
  180. package/lib/typescript/src/support/index.d.ts.map +1 -0
  181. package/lib/typescript/src/types/ApiOptions.d.ts.map +1 -0
  182. package/lib/typescript/src/types/Conversation.d.ts.map +1 -0
  183. package/lib/typescript/src/types/Customer.d.ts.map +1 -0
  184. package/lib/typescript/src/types/GlobalTheme.d.ts.map +1 -0
  185. package/lib/typescript/src/types/Language.d.ts.map +1 -0
  186. package/lib/typescript/src/types/LocalizationKeys.d.ts.map +1 -0
  187. package/lib/typescript/src/types/MessageResponse.d.ts.map +1 -0
  188. package/lib/typescript/src/types/Theme.d.ts.map +1 -0
  189. package/lib/typescript/src/utils/date.d.ts.map +1 -0
  190. package/lib/typescript/src/utils/deepMap.d.ts.map +1 -0
  191. package/lib/typescript/src/utils/formatDate.d.ts.map +1 -0
  192. package/lib/typescript/src/utils/scalingUtils.d.ts.map +1 -0
  193. package/package.json +13 -27
  194. package/src/NativeComnyx.ts +6 -5
  195. package/src/api/api.ts +14 -3
  196. package/src/api/customers.ts +3 -8
  197. package/src/api/index.ts +1 -1
  198. package/src/components/AppText.tsx +1 -1
  199. package/src/components/ChatList.tsx +1 -1
  200. package/src/components/CustomerForm.tsx +2 -3
  201. package/src/components/MessageInput.tsx +1 -1
  202. package/src/hooks/isRtl.ts +1 -1
  203. package/src/hooks/useLocalize.ts +1 -1
  204. package/src/hooks/usePolling.ts +1 -1
  205. package/src/hooks/useTheme.ts +1 -1
  206. package/src/index.ts +8 -0
  207. package/src/notifications/index.ts +49 -0
  208. package/src/{Accumulator.ts → register/Accumulator.ts} +10 -2
  209. package/src/{collectData.ts → register/collectData.ts} +1 -0
  210. package/src/register/index.ts +11 -0
  211. package/src/register/init.ts +16 -0
  212. package/src/register/login.ts +23 -0
  213. package/src/register/logout.ts +14 -0
  214. package/src/{store.ts → store/store.ts} +7 -7
  215. package/src/{App.tsx → support/ComnyxSupport.tsx} +41 -14
  216. package/src/support/index.ts +1 -0
  217. package/src/utils/scalingUtils.ts +1 -1
  218. package/android/generated/java/com/comnyx/NativeComnyxSpec.java +0 -37
  219. package/ios/Comnyx.h +0 -6
  220. package/ios/Comnyx.mm +0 -18
  221. package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +0 -39
  222. package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +0 -63
  223. package/ios/generated/RNComnyxSpecJSI-generated.cpp +0 -28
  224. package/ios/generated/RNComnyxSpecJSI.h +0 -71
  225. package/lib/commonjs/Accumulator.js.map +0 -1
  226. package/lib/commonjs/App.js.map +0 -1
  227. package/lib/commonjs/NativeComnyx.ts +0 -8
  228. package/lib/commonjs/__dev__.js +0 -29
  229. package/lib/commonjs/__dev__.js.map +0 -1
  230. package/lib/commonjs/collectData.js.map +0 -1
  231. package/lib/commonjs/components/SizeMatter.js +0 -27
  232. package/lib/commonjs/components/SizeMatter.js.map +0 -1
  233. package/lib/commonjs/package.json +0 -1
  234. package/lib/commonjs/register.js +0 -26
  235. package/lib/commonjs/register.js.map +0 -1
  236. package/lib/commonjs/store.js.map +0 -1
  237. package/lib/commonjs/viewabilityConfig.js.map +0 -1
  238. package/lib/module/Accumulator.js.map +0 -1
  239. package/lib/module/App.js.map +0 -1
  240. package/lib/module/NativeComnyx.ts +0 -8
  241. package/lib/module/__dev__.js +0 -29
  242. package/lib/module/__dev__.js.map +0 -1
  243. package/lib/module/collectData.js.map +0 -1
  244. package/lib/module/components/SizeMatter.js +0 -23
  245. package/lib/module/components/SizeMatter.js.map +0 -1
  246. package/lib/module/package.json +0 -1
  247. package/lib/module/register.js +0 -22
  248. package/lib/module/register.js.map +0 -1
  249. package/lib/module/store.js.map +0 -1
  250. package/lib/module/viewabilityConfig.js.map +0 -1
  251. package/lib/typescript/commonjs/package.json +0 -1
  252. package/lib/typescript/commonjs/src/Accumulator.d.ts.map +0 -1
  253. package/lib/typescript/commonjs/src/App.d.ts +0 -12
  254. package/lib/typescript/commonjs/src/App.d.ts.map +0 -1
  255. package/lib/typescript/commonjs/src/NativeComnyx.d.ts +0 -7
  256. package/lib/typescript/commonjs/src/NativeComnyx.d.ts.map +0 -1
  257. package/lib/typescript/commonjs/src/__dev__.d.ts +0 -2
  258. package/lib/typescript/commonjs/src/__dev__.d.ts.map +0 -1
  259. package/lib/typescript/commonjs/src/api/api.d.ts +0 -4
  260. package/lib/typescript/commonjs/src/api/api.d.ts.map +0 -1
  261. package/lib/typescript/commonjs/src/api/conversations.d.ts.map +0 -1
  262. package/lib/typescript/commonjs/src/api/customers.d.ts +0 -6
  263. package/lib/typescript/commonjs/src/api/customers.d.ts.map +0 -1
  264. package/lib/typescript/commonjs/src/api/index.d.ts.map +0 -1
  265. package/lib/typescript/commonjs/src/api/messages.d.ts.map +0 -1
  266. package/lib/typescript/commonjs/src/collectData.d.ts.map +0 -1
  267. package/lib/typescript/commonjs/src/components/AppText.d.ts.map +0 -1
  268. package/lib/typescript/commonjs/src/components/ChatList.d.ts.map +0 -1
  269. package/lib/typescript/commonjs/src/components/CustomAlert.d.ts.map +0 -1
  270. package/lib/typescript/commonjs/src/components/CustomerForm.d.ts.map +0 -1
  271. package/lib/typescript/commonjs/src/components/EmptyList.d.ts.map +0 -1
  272. package/lib/typescript/commonjs/src/components/InitFailed.d.ts.map +0 -1
  273. package/lib/typescript/commonjs/src/components/MessageInput.d.ts.map +0 -1
  274. package/lib/typescript/commonjs/src/components/MessageItem.d.ts.map +0 -1
  275. package/lib/typescript/commonjs/src/components/ScaledSheet.d.ts.map +0 -1
  276. package/lib/typescript/commonjs/src/components/SizeMatter.d.ts +0 -7
  277. package/lib/typescript/commonjs/src/components/SizeMatter.d.ts.map +0 -1
  278. package/lib/typescript/commonjs/src/constants/activeOpacity.d.ts.map +0 -1
  279. package/lib/typescript/commonjs/src/constants/countries.d.ts.map +0 -1
  280. package/lib/typescript/commonjs/src/constants/rtl.d.ts.map +0 -1
  281. package/lib/typescript/commonjs/src/constants/translations.d.ts.map +0 -1
  282. package/lib/typescript/commonjs/src/data/fake/conversations.d.ts.map +0 -1
  283. package/lib/typescript/commonjs/src/data/fake/customers.d.ts.map +0 -1
  284. package/lib/typescript/commonjs/src/data/fake/messages.d.ts.map +0 -1
  285. package/lib/typescript/commonjs/src/hooks/isRtl.d.ts.map +0 -1
  286. package/lib/typescript/commonjs/src/hooks/useLocalize.d.ts.map +0 -1
  287. package/lib/typescript/commonjs/src/hooks/usePolling.d.ts.map +0 -1
  288. package/lib/typescript/commonjs/src/hooks/useTheme.d.ts.map +0 -1
  289. package/lib/typescript/commonjs/src/hooks/useThemeColors.d.ts.map +0 -1
  290. package/lib/typescript/commonjs/src/index.d.ts +0 -7
  291. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  292. package/lib/typescript/commonjs/src/register.d.ts +0 -5
  293. package/lib/typescript/commonjs/src/register.d.ts.map +0 -1
  294. package/lib/typescript/commonjs/src/store.d.ts +0 -40
  295. package/lib/typescript/commonjs/src/store.d.ts.map +0 -1
  296. package/lib/typescript/commonjs/src/types/ApiOptions.d.ts.map +0 -1
  297. package/lib/typescript/commonjs/src/types/Conversation.d.ts.map +0 -1
  298. package/lib/typescript/commonjs/src/types/Customer.d.ts.map +0 -1
  299. package/lib/typescript/commonjs/src/types/GlobalTheme.d.ts.map +0 -1
  300. package/lib/typescript/commonjs/src/types/Language.d.ts.map +0 -1
  301. package/lib/typescript/commonjs/src/types/LocalizationKeys.d.ts.map +0 -1
  302. package/lib/typescript/commonjs/src/types/MessageResponse.d.ts.map +0 -1
  303. package/lib/typescript/commonjs/src/types/Theme.d.ts.map +0 -1
  304. package/lib/typescript/commonjs/src/utils/date.d.ts.map +0 -1
  305. package/lib/typescript/commonjs/src/utils/deepMap.d.ts.map +0 -1
  306. package/lib/typescript/commonjs/src/utils/formatDate.d.ts.map +0 -1
  307. package/lib/typescript/commonjs/src/utils/scalingUtils.d.ts.map +0 -1
  308. package/lib/typescript/commonjs/src/viewabilityConfig.d.ts.map +0 -1
  309. package/lib/typescript/module/package.json +0 -1
  310. package/lib/typescript/module/src/Accumulator.d.ts +0 -18
  311. package/lib/typescript/module/src/Accumulator.d.ts.map +0 -1
  312. package/lib/typescript/module/src/App.d.ts +0 -12
  313. package/lib/typescript/module/src/App.d.ts.map +0 -1
  314. package/lib/typescript/module/src/NativeComnyx.d.ts +0 -7
  315. package/lib/typescript/module/src/NativeComnyx.d.ts.map +0 -1
  316. package/lib/typescript/module/src/__dev__.d.ts +0 -2
  317. package/lib/typescript/module/src/__dev__.d.ts.map +0 -1
  318. package/lib/typescript/module/src/api/api.d.ts +0 -4
  319. package/lib/typescript/module/src/api/api.d.ts.map +0 -1
  320. package/lib/typescript/module/src/api/conversations.d.ts +0 -7
  321. package/lib/typescript/module/src/api/conversations.d.ts.map +0 -1
  322. package/lib/typescript/module/src/api/customers.d.ts +0 -6
  323. package/lib/typescript/module/src/api/customers.d.ts.map +0 -1
  324. package/lib/typescript/module/src/api/index.d.ts +0 -4
  325. package/lib/typescript/module/src/api/index.d.ts.map +0 -1
  326. package/lib/typescript/module/src/api/messages.d.ts +0 -4
  327. package/lib/typescript/module/src/api/messages.d.ts.map +0 -1
  328. package/lib/typescript/module/src/collectData.d.ts +0 -3
  329. package/lib/typescript/module/src/collectData.d.ts.map +0 -1
  330. package/lib/typescript/module/src/components/AppText.d.ts +0 -14
  331. package/lib/typescript/module/src/components/AppText.d.ts.map +0 -1
  332. package/lib/typescript/module/src/components/ChatList.d.ts +0 -4
  333. package/lib/typescript/module/src/components/ChatList.d.ts.map +0 -1
  334. package/lib/typescript/module/src/components/CustomAlert.d.ts +0 -15
  335. package/lib/typescript/module/src/components/CustomAlert.d.ts.map +0 -1
  336. package/lib/typescript/module/src/components/CustomerForm.d.ts +0 -4
  337. package/lib/typescript/module/src/components/CustomerForm.d.ts.map +0 -1
  338. package/lib/typescript/module/src/components/EmptyList.d.ts +0 -2
  339. package/lib/typescript/module/src/components/EmptyList.d.ts.map +0 -1
  340. package/lib/typescript/module/src/components/InitFailed.d.ts +0 -6
  341. package/lib/typescript/module/src/components/InitFailed.d.ts.map +0 -1
  342. package/lib/typescript/module/src/components/MessageInput.d.ts +0 -5
  343. package/lib/typescript/module/src/components/MessageInput.d.ts.map +0 -1
  344. package/lib/typescript/module/src/components/MessageItem.d.ts +0 -6
  345. package/lib/typescript/module/src/components/MessageItem.d.ts.map +0 -1
  346. package/lib/typescript/module/src/components/ScaledSheet.d.ts +0 -2
  347. package/lib/typescript/module/src/components/ScaledSheet.d.ts.map +0 -1
  348. package/lib/typescript/module/src/components/SizeMatter.d.ts +0 -7
  349. package/lib/typescript/module/src/components/SizeMatter.d.ts.map +0 -1
  350. package/lib/typescript/module/src/constants/activeOpacity.d.ts +0 -2
  351. package/lib/typescript/module/src/constants/activeOpacity.d.ts.map +0 -1
  352. package/lib/typescript/module/src/constants/countries.d.ts +0 -7
  353. package/lib/typescript/module/src/constants/countries.d.ts.map +0 -1
  354. package/lib/typescript/module/src/constants/rtl.d.ts +0 -2
  355. package/lib/typescript/module/src/constants/rtl.d.ts.map +0 -1
  356. package/lib/typescript/module/src/constants/translations.d.ts +0 -4
  357. package/lib/typescript/module/src/constants/translations.d.ts.map +0 -1
  358. package/lib/typescript/module/src/data/fake/conversations.d.ts +0 -5
  359. package/lib/typescript/module/src/data/fake/conversations.d.ts.map +0 -1
  360. package/lib/typescript/module/src/data/fake/customers.d.ts +0 -3
  361. package/lib/typescript/module/src/data/fake/customers.d.ts.map +0 -1
  362. package/lib/typescript/module/src/data/fake/messages.d.ts +0 -3
  363. package/lib/typescript/module/src/data/fake/messages.d.ts.map +0 -1
  364. package/lib/typescript/module/src/hooks/isRtl.d.ts +0 -2
  365. package/lib/typescript/module/src/hooks/isRtl.d.ts.map +0 -1
  366. package/lib/typescript/module/src/hooks/useLocalize.d.ts +0 -3
  367. package/lib/typescript/module/src/hooks/useLocalize.d.ts.map +0 -1
  368. package/lib/typescript/module/src/hooks/usePolling.d.ts +0 -2
  369. package/lib/typescript/module/src/hooks/usePolling.d.ts.map +0 -1
  370. package/lib/typescript/module/src/hooks/useTheme.d.ts +0 -3
  371. package/lib/typescript/module/src/hooks/useTheme.d.ts.map +0 -1
  372. package/lib/typescript/module/src/hooks/useThemeColors.d.ts +0 -3
  373. package/lib/typescript/module/src/hooks/useThemeColors.d.ts.map +0 -1
  374. package/lib/typescript/module/src/index.d.ts +0 -7
  375. package/lib/typescript/module/src/index.d.ts.map +0 -1
  376. package/lib/typescript/module/src/register.d.ts +0 -5
  377. package/lib/typescript/module/src/register.d.ts.map +0 -1
  378. package/lib/typescript/module/src/store.d.ts.map +0 -1
  379. package/lib/typescript/module/src/types/ApiOptions.d.ts +0 -4
  380. package/lib/typescript/module/src/types/ApiOptions.d.ts.map +0 -1
  381. package/lib/typescript/module/src/types/Conversation.d.ts +0 -33
  382. package/lib/typescript/module/src/types/Conversation.d.ts.map +0 -1
  383. package/lib/typescript/module/src/types/Customer.d.ts +0 -39
  384. package/lib/typescript/module/src/types/Customer.d.ts.map +0 -1
  385. package/lib/typescript/module/src/types/GlobalTheme.d.ts +0 -6
  386. package/lib/typescript/module/src/types/GlobalTheme.d.ts.map +0 -1
  387. package/lib/typescript/module/src/types/Language.d.ts +0 -2
  388. package/lib/typescript/module/src/types/Language.d.ts.map +0 -1
  389. package/lib/typescript/module/src/types/LocalizationKeys.d.ts +0 -43
  390. package/lib/typescript/module/src/types/LocalizationKeys.d.ts.map +0 -1
  391. package/lib/typescript/module/src/types/MessageResponse.d.ts +0 -61
  392. package/lib/typescript/module/src/types/MessageResponse.d.ts.map +0 -1
  393. package/lib/typescript/module/src/types/Theme.d.ts +0 -28
  394. package/lib/typescript/module/src/types/Theme.d.ts.map +0 -1
  395. package/lib/typescript/module/src/utils/date.d.ts +0 -7
  396. package/lib/typescript/module/src/utils/date.d.ts.map +0 -1
  397. package/lib/typescript/module/src/utils/deepMap.d.ts +0 -7
  398. package/lib/typescript/module/src/utils/deepMap.d.ts.map +0 -1
  399. package/lib/typescript/module/src/utils/formatDate.d.ts +0 -2
  400. package/lib/typescript/module/src/utils/formatDate.d.ts.map +0 -1
  401. package/lib/typescript/module/src/utils/scalingUtils.d.ts +0 -10
  402. package/lib/typescript/module/src/utils/scalingUtils.d.ts.map +0 -1
  403. package/lib/typescript/module/src/viewabilityConfig.d.ts +0 -5
  404. package/lib/typescript/module/src/viewabilityConfig.d.ts.map +0 -1
  405. package/src/__dev__.ts +0 -22
  406. package/src/components/SizeMatter.tsx +0 -22
  407. package/src/index.tsx +0 -9
  408. package/src/register.ts +0 -29
  409. /package/lib/commonjs/{viewabilityConfig.js → constants/viewabilityConfig.js} +0 -0
  410. /package/lib/module/{viewabilityConfig.js → constants/viewabilityConfig.js} +0 -0
  411. /package/lib/typescript/{commonjs/src → src}/api/conversations.d.ts +0 -0
  412. /package/lib/typescript/{commonjs/src → src}/api/messages.d.ts +0 -0
  413. /package/lib/typescript/{commonjs/src → src}/components/AppText.d.ts +0 -0
  414. /package/lib/typescript/{commonjs/src → src}/components/ChatList.d.ts +0 -0
  415. /package/lib/typescript/{commonjs/src → src}/components/CustomAlert.d.ts +0 -0
  416. /package/lib/typescript/{commonjs/src → src}/components/CustomerForm.d.ts +0 -0
  417. /package/lib/typescript/{commonjs/src → src}/components/EmptyList.d.ts +0 -0
  418. /package/lib/typescript/{commonjs/src → src}/components/InitFailed.d.ts +0 -0
  419. /package/lib/typescript/{commonjs/src → src}/components/MessageInput.d.ts +0 -0
  420. /package/lib/typescript/{commonjs/src → src}/components/MessageItem.d.ts +0 -0
  421. /package/lib/typescript/{commonjs/src → src}/components/ScaledSheet.d.ts +0 -0
  422. /package/lib/typescript/{commonjs/src → src}/constants/activeOpacity.d.ts +0 -0
  423. /package/lib/typescript/{commonjs/src → src}/constants/countries.d.ts +0 -0
  424. /package/lib/typescript/{commonjs/src → src}/constants/rtl.d.ts +0 -0
  425. /package/lib/typescript/{commonjs/src → src}/constants/translations.d.ts +0 -0
  426. /package/lib/typescript/{commonjs/src → src/constants}/viewabilityConfig.d.ts +0 -0
  427. /package/lib/typescript/{commonjs/src → src}/data/fake/conversations.d.ts +0 -0
  428. /package/lib/typescript/{commonjs/src → src}/data/fake/customers.d.ts +0 -0
  429. /package/lib/typescript/{commonjs/src → src}/data/fake/messages.d.ts +0 -0
  430. /package/lib/typescript/{commonjs/src → src}/hooks/isRtl.d.ts +0 -0
  431. /package/lib/typescript/{commonjs/src → src}/hooks/useLocalize.d.ts +0 -0
  432. /package/lib/typescript/{commonjs/src → src}/hooks/usePolling.d.ts +0 -0
  433. /package/lib/typescript/{commonjs/src → src}/hooks/useTheme.d.ts +0 -0
  434. /package/lib/typescript/{commonjs/src → src}/hooks/useThemeColors.d.ts +0 -0
  435. /package/lib/typescript/{commonjs/src → src/register}/collectData.d.ts +0 -0
  436. /package/lib/typescript/{commonjs/src → src}/types/ApiOptions.d.ts +0 -0
  437. /package/lib/typescript/{commonjs/src → src}/types/Conversation.d.ts +0 -0
  438. /package/lib/typescript/{commonjs/src → src}/types/Customer.d.ts +0 -0
  439. /package/lib/typescript/{commonjs/src → src}/types/GlobalTheme.d.ts +0 -0
  440. /package/lib/typescript/{commonjs/src → src}/types/Language.d.ts +0 -0
  441. /package/lib/typescript/{commonjs/src → src}/types/LocalizationKeys.d.ts +0 -0
  442. /package/lib/typescript/{commonjs/src → src}/types/MessageResponse.d.ts +0 -0
  443. /package/lib/typescript/{commonjs/src → src}/types/Theme.d.ts +0 -0
  444. /package/lib/typescript/{commonjs/src → src}/utils/date.d.ts +0 -0
  445. /package/lib/typescript/{commonjs/src → src}/utils/deepMap.d.ts +0 -0
  446. /package/lib/typescript/{commonjs/src → src}/utils/formatDate.d.ts +0 -0
  447. /package/lib/typescript/{commonjs/src → src}/utils/scalingUtils.d.ts +0 -0
  448. /package/src/{viewabilityConfig.ts → constants/viewabilityConfig.ts} +0 -0
@@ -6,25 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "Comnyx", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _App.Comnyx;
9
+ return _index.Comnyx;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "SizeMatter", {
12
+ Object.defineProperty(exports, "ComnyxNotifications", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _SizeMatter.SizeMatter;
15
+ return _index3.ComnyxNotifications;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "collectDataForComnyx", {
18
+ Object.defineProperty(exports, "ComnyxSupport", {
19
19
  enumerable: true,
20
20
  get: function () {
21
- return _collectData.collectData;
22
- }
23
- });
24
- Object.defineProperty(exports, "registerComnyx", {
25
- enumerable: true,
26
- get: function () {
27
- return _register.registerComnyx;
21
+ return _index2.ComnyxSupport;
28
22
  }
29
23
  });
30
24
  Object.defineProperty(exports, "registerOneSignalForComnyx", {
@@ -33,9 +27,8 @@ Object.defineProperty(exports, "registerOneSignalForComnyx", {
33
27
  return _collectData.registerOneSignalForComnyx;
34
28
  }
35
29
  });
36
- require("./__dev__.js");
37
- var _collectData = require("./collectData.js");
38
- var _register = require("./register.js");
39
- var _App = require("./App.js");
40
- var _SizeMatter = require("./components/SizeMatter.js");
30
+ var _index = require("./register/index.js");
31
+ var _index2 = require("./support/index.js");
32
+ var _index3 = require("./notifications/index.js");
33
+ var _collectData = require("./register/collectData.js");
41
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["require","_collectData","_register","_App","_SizeMatter"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_index","require","_index2","_index3","_collectData"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ComnyxNotifications = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _NativeComnyx = require("../NativeComnyx.js");
9
+ const comnyxEmitter = _reactNative.Platform.OS === 'android' ? new _reactNative.NativeEventEmitter() //TODO2: fix
10
+ : new _reactNative.NativeEventEmitter(_reactNative.NativeModules.Comnyx);
11
+ const ComnyxNotifications = exports.ComnyxNotifications = {
12
+ initialize: _NativeComnyx.nativeComnyx.initialize,
13
+ optIn: _NativeComnyx.nativeComnyx.optIn,
14
+ checkOptIn: _NativeComnyx.nativeComnyx.checkOptIn,
15
+ addEventListener: function (eventType, listener) {
16
+ return comnyxEmitter.addListener(eventType, event => {
17
+ listener(event);
18
+ });
19
+ }
20
+ };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_NativeComnyx","comnyxEmitter","Platform","OS","NativeEventEmitter","NativeModules","Comnyx","ComnyxNotifications","exports","initialize","nativeComnyx","optIn","checkOptIn","addEventListener","eventType","listener","addListener","event"],"sourceRoot":"../../../src","sources":["notifications/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AAEA,MAAME,aAAa,GACjBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrB,IAAIC,+BAAkB,CAAC,CAAC,CAAC;AAAA,EACzB,IAAIA,+BAAkB,CAACC,0BAAa,CAACC,MAAM,CAAC;AA4B3C,MAAMC,mBAA4C,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EAC1DE,UAAU,EAAEC,0BAAY,CAACD,UAAU;EACnCE,KAAK,EAAED,0BAAY,CAACC,KAAK;EACzBC,UAAU,EAAEF,0BAAY,CAACE,UAAU;EACnCC,gBAAgB,EAAE,SAAAA,CAChBC,SAAY,EACZC,QAA4D,EACvC;IACrB,OAAOd,aAAa,CAACe,WAAW,CAACF,SAAS,EAAGG,KAAK,IAAK;MACrDF,QAAQ,CAACE,KAAK,CAAC;IACjB,CAAC,CAAC;EACJ;AACF,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.accumulator = void 0;
6
+ exports.accumulator = exports.Accumulator = void 0;
7
7
  const ACCUMULATOR_DEBOUNCE_TIME_IN_MS = 3000;
8
8
  class Accumulator {
9
9
  registerData = null;
@@ -88,6 +88,12 @@ class Accumulator {
88
88
  clearTimeout(this.__select_time);
89
89
  }
90
90
  }
91
+ clear() {
92
+ this.registerData = null;
93
+ }
94
+ empty() {
95
+ this.registerData = {};
96
+ }
91
97
  get() {
92
98
  return this.registerData;
93
99
  }
@@ -95,5 +101,6 @@ class Accumulator {
95
101
  return this._isListenerCalledOnce;
96
102
  }
97
103
  }
104
+ exports.Accumulator = Accumulator;
98
105
  const accumulator = exports.accumulator = new Accumulator();
99
106
  //# sourceMappingURL=Accumulator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ACCUMULATOR_DEBOUNCE_TIME_IN_MS","Accumulator","registerData","__select_time","undefined","listener","_isListenerCalledOnce","constructor","register","customParameters","integrationParameters","debounce","add","data","Error","customParamsMap","Map","forEach","param","set","name","value","mergedCustomParameters","Array","from","entries","map","flush","reset","setTimeout","clearTimeout","clear","empty","get","isListenerCalledOnce","exports","accumulator"],"sourceRoot":"../../../src","sources":["register/Accumulator.ts"],"mappings":"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","ignoreList":[]}
@@ -14,6 +14,8 @@ function collectData(key, value) {
14
14
  }]
15
15
  });
16
16
  }
17
+
18
+ //* @deprecated
17
19
  function registerOneSignalForComnyx(external_id) {
18
20
  _Accumulator.accumulator.add({
19
21
  integrationParameters: {
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Accumulator","require","collectData","key","value","accumulator","add","customParameters","name","registerOneSignalForComnyx","external_id","integrationParameters","onesignal"],"sourceRoot":"../../../src","sources":["register/collectData.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,SAASC,WAAWA,CAACC,GAAW,EAAEC,KAAa,EAAE;EACtDC,wBAAW,CAACC,GAAG,CAAC;IACdC,gBAAgB,EAAE,CAChB;MACEC,IAAI,EAAEL,GAAG;MACTC;IACF,CAAC;EAEL,CAAC,CAAC;AACJ;;AAEA;AACO,SAASK,0BAA0BA,CAACC,WAAmB,EAAE;EAC9DL,wBAAW,CAACC,GAAG,CAAC;IACdK,qBAAqB,EAAE;MACrBC,SAAS,EAAE;QACTF;MACF;IACF;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Comnyx = void 0;
7
+ var _login = require("./login.js");
8
+ var _collectData = require("./collectData.js");
9
+ var _logout = require("./logout.js");
10
+ var _init = require("./init.js");
11
+ const Comnyx = exports.Comnyx = {
12
+ init: _init.init,
13
+ login: _login.login,
14
+ logout: _logout.logout,
15
+ collectData: _collectData.collectData
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_login","require","_collectData","_logout","_init","Comnyx","exports","init","login","logout","collectData"],"sourceRoot":"../../../src","sources":["register/index.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEO,MAAMI,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACpBE,IAAI,EAAEA,UAAI;EACVC,KAAK,EAAEA,YAAK;EACZC,MAAM,EAAEA,cAAM;EACdC,WAAW,EAAEA;AACf,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.init = init;
7
+ var _api = require("../api/api.js");
8
+ function init(initOptions) {
9
+ if (!initOptions.token) {
10
+ throw new Error('App token is required');
11
+ }
12
+ (0, _api.initApi)(initOptions.token, initOptions.baseURL);
13
+ }
14
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_api","require","init","initOptions","token","Error","initApi","baseURL"],"sourceRoot":"../../../src","sources":["register/init.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAUO,SAASC,IAAIA,CAACC,WAAwB,EAAE;EAC7C,IAAI,CAACA,WAAW,CAACC,KAAK,EAAE;IACtB,MAAM,IAAIC,KAAK,CAAC,uBAAuB,CAAC;EAC1C;EACA,IAAAC,YAAO,EAACH,WAAW,CAACC,KAAK,EAAGD,WAAW,CAAyBI,OAAO,CAAC;AAC1E","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.login = login;
7
+ var _Accumulator = require("./Accumulator.js");
8
+ var _api = require("../api/api.js");
9
+ var _store = require("../store/store.js");
10
+ var _customers = require("../api/customers.js");
11
+ function login(loginOptions) {
12
+ if (!(0, _api.isInitCalled)()) {
13
+ throw new Error('Please initialize the Comnyx SDK first');
14
+ }
15
+ if (!loginOptions.externalId) {
16
+ throw new Error('External ID is required for initialization');
17
+ }
18
+ _Accumulator.accumulator.register(async accumulatedData => {
19
+ const data = await (0, _customers.updateCustomer)(accumulatedData, loginOptions.externalId);
20
+ (0, _api.setLoginForAxios)(loginOptions.externalId);
21
+ _store.useAppStore.getState().setCustomer(data.customer);
22
+ });
23
+ }
24
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Accumulator","require","_api","_store","_customers","login","loginOptions","isInitCalled","Error","externalId","accumulator","register","accumulatedData","data","updateCustomer","setLoginForAxios","useAppStore","getState","setCustomer","customer"],"sourceRoot":"../../../src","sources":["register/login.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAMO,SAASI,KAAKA,CAACC,YAA0B,EAAE;EAChD,IAAI,CAAC,IAAAC,iBAAY,EAAC,CAAC,EAAE;IACnB,MAAM,IAAIC,KAAK,CAAC,wCAAwC,CAAC;EAC3D;EACA,IAAI,CAACF,YAAY,CAACG,UAAU,EAAE;IAC5B,MAAM,IAAID,KAAK,CAAC,4CAA4C,CAAC;EAC/D;EACAE,wBAAW,CAACC,QAAQ,CAAC,MAAOC,eAAsC,IAAK;IACrE,MAAMC,IAAI,GAAG,MAAM,IAAAC,yBAAc,EAACF,eAAe,EAAEN,YAAY,CAACG,UAAU,CAAC;IAC3E,IAAAM,qBAAgB,EAACT,YAAY,CAACG,UAAU,CAAC;IACzCO,kBAAW,CAACC,QAAQ,CAAC,CAAC,CAACC,WAAW,CAACL,IAAI,CAACM,QAAQ,CAAC;EACnD,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.logout = logout;
7
+ var _api = require("../api/api.js");
8
+ var _store = require("../store/store.js");
9
+ var _Accumulator = require("./Accumulator.js");
10
+ async function logout() {
11
+ _Accumulator.accumulator.empty();
12
+ await _Accumulator.accumulator.flush();
13
+ (0, _api.setLogoutForAxios)();
14
+ //TODO: state
15
+ _store.useAppStore.setState({
16
+ customer: null,
17
+ formSubmitted: false
18
+ });
19
+ }
20
+ //# sourceMappingURL=logout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_api","require","_store","_Accumulator","logout","accumulator","empty","flush","setLogoutForAxios","useAppStore","setState","customer","formSubmitted"],"sourceRoot":"../../../src","sources":["register/logout.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEO,eAAeG,MAAMA,CAAA,EAAG;EAC7BC,wBAAW,CAACC,KAAK,CAAC,CAAC;EACnB,MAAMD,wBAAW,CAACE,KAAK,CAAC,CAAC;EACzB,IAAAC,sBAAiB,EAAC,CAAC;EACnB;EACAC,kBAAW,CAACC,QAAQ,CAAC;IACnBC,QAAQ,EAAE,IAAI;IACdC,aAAa,EAAE;EACjB,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useAppStore = void 0;
6
+ exports.useAppStore = exports.storeCreator = void 0;
7
7
  var _middleware = require("zustand/middleware");
8
8
  var _shallow = require("zustand/shallow");
9
9
  var _traditional = require("zustand/traditional");
@@ -35,7 +35,7 @@ const storeCreator = (set, get) => ({
35
35
  setCustomer: createCustomerResponse => {
36
36
  set({
37
37
  customer: createCustomerResponse,
38
- formSubmitted: !!createCustomerResponse.name
38
+ formSubmitted: !!createCustomerResponse?.name
39
39
  });
40
40
  },
41
41
  setLanguage: language => {
@@ -74,6 +74,7 @@ const storeCreator = (set, get) => ({
74
74
  });
75
75
  }
76
76
  });
77
+ exports.storeCreator = storeCreator;
77
78
  const useAppStore = exports.useAppStore = (0, _traditional.createWithEqualityFn)()((0, _middleware.persist)(storeCreator, {
78
79
  name: 'commonyx_appStore-12',
79
80
  storage: (0, _middleware.createJSONStorage)(() => _asyncStorage.default),
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_middleware","require","_shallow","_traditional","_asyncStorage","_interopRequireDefault","e","__esModule","default","storeCreator","set","get","baseWidth","baseHeight","initialized","customer","data","language","theme","fake","themes","firstMessage","formSubmitted","setData","cb","newData","setFirstMessage","message","setCustomer","createCustomerResponse","name","setLanguage","setTheme","setFake","setThemes","updateBaseDimensions","setForm","form","exports","useAppStore","createWithEqualityFn","persist","storage","createJSONStorage","AsyncStorage","skipHydration","partialize","state","shallow"],"sourceRoot":"../../../src","sources":["store/store.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAqE,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAkC9D,MAAMG,YAAyC,GAAGA,CAACC,GAAG,EAAEC,GAAG,MAAM;EACtEC,SAAS,EAAE,GAAG;EACdC,UAAU,EAAE,GAAG;EACfC,WAAW,EAAE,KAAK;EAClBC,QAAQ,EAAE,IAAI;EACdC,IAAI,EAAE,IAAI;EACVC,QAAQ,EAAE,IAAI;EACdC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE,CAAC,CAAC;EACVC,YAAY,EAAE,IAAI;EAClBC,aAAa,EAAE,KAAK;EACpBC,OAAO,EAAGC,EAAE,IAAK;IACf,MAAMC,OAAO,GAAGD,EAAE,CAACb,GAAG,CAAC,CAAC,CAACK,IAAI,CAAC;IAC9BN,GAAG,CAAC;MAAEM,IAAI,EAAES;IAAQ,CAAC,CAAC;EACxB,CAAC;EACDC,eAAe,EAAGC,OAAO,IAAK;IAC5BjB,GAAG,CAAC;MAAEW,YAAY,EAAEM;IAAQ,CAAC,CAAC;EAChC,CAAC;EACDC,WAAW,EAAGC,sBAAuC,IAAK;IACxDnB,GAAG,CAAC;MACFK,QAAQ,EAAEc,sBAAsB;MAChCP,aAAa,EAAE,CAAC,CAACO,sBAAsB,EAAEC;IAC3C,CAAC,CAAC;EACJ,CAAC;EACDC,WAAW,EAAGd,QAAsB,IAAK;IACvCP,GAAG,CAAC;MAAEO;IAAS,CAAC,CAAC;EACnB,CAAC;EACDe,QAAQ,EAAGd,KAAuB,IAAK;IACrCR,GAAG,CAAC;MAAEQ;IAAM,CAAC,CAAC;EAChB,CAAC;EACDe,OAAO,EAAGd,IAAa,IAAK;IAC1BT,GAAG,CAAC;MAAES;IAAK,CAAC,CAAC;EACf,CAAC;EACDe,SAAS,EAAGd,MAAW,IAAK;IAC1BV,GAAG,CAAC;MAAEU;IAAO,CAAC,CAAC;EACjB,CAAC;EACDe,oBAAoB,EAAEA,CAAC;IAAEvB,SAAS;IAAEC;EAAW,CAAC,KAAK;IACnDH,GAAG,CAAC;MAAEE,SAAS;MAAEC;IAAW,CAAC,CAAC;EAChC,CAAC;EACDuB,OAAO,EAAGC,IAAc,IAAK;IAC3B3B,GAAG,CAAC;MAAEY,aAAa,EAAE,IAAI;MAAEP,QAAQ,EAAEsB;IAAK,CAAC,CAAC;EAC9C;AACF,CAAC,CAAC;AAACC,OAAA,CAAA7B,YAAA,GAAAA,YAAA;AAEI,MAAM8B,WAAW,GAAAD,OAAA,CAAAC,WAAA,GAAG,IAAAC,iCAAoB,EAAgB,CAAC,CAC9D,IAAAC,mBAAO,EAAChC,YAAY,EAAE;EACpBqB,IAAI,EAAE,sBAAsB;EAC5BY,OAAO,EAAE,IAAAC,6BAAiB,EAAC,MAAMC,qBAAY,CAAC;EAC9CC,aAAa,EAAE,KAAK;EACpBC,UAAU,EAAGC,KAAK,KAAM;IACtBhC,QAAQ,EAAEgC,KAAK,CAAChC,QAAQ;IACxBO,aAAa,EAAEyB,KAAK,CAACzB;EACvB,CAAC;AACH,CAAC,CAAC,EACF0B,gBACF,CAAC","ignoreList":[]}
@@ -3,17 +3,19 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Comnyx = Comnyx;
6
+ exports.ComnyxSupport = ComnyxSupport;
7
7
  var _reactNative = require("react-native");
8
- var _store = require("./store.js");
9
- var _ChatList = require("./components/ChatList.js");
10
- var _CustomerForm = require("./components/CustomerForm.js");
8
+ var _ChatList = require("../components/ChatList.js");
9
+ var _CustomerForm = require("../components/CustomerForm.js");
11
10
  var _react = require("react");
12
- var _AppText = require("./components/AppText.js");
13
- var _useThemeColors = require("./hooks/useThemeColors.js");
14
- var _usePolling = require("./hooks/usePolling.js");
11
+ var _AppText = require("../components/AppText.js");
12
+ var _useThemeColors = require("../hooks/useThemeColors.js");
13
+ var _usePolling = require("../hooks/usePolling.js");
14
+ var _store = require("../store/store.js");
15
+ var _ScaledSheet = require("../components/ScaledSheet.js");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
16
- function Comnyx({
17
+ const closeIcon = require('../assets/x-close.png');
18
+ function ComnyxSupport({
17
19
  language = 'en',
18
20
  theme = 'dark',
19
21
  fake = false,
@@ -47,13 +49,27 @@ function Comnyx({
47
49
  }, [language, theme, fake, themes]);
48
50
  if (!customer) {
49
51
  //NOTE: customer yoksa register hiç çalışmamış
50
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
52
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
51
53
  style: [styles.container, {
52
- backgroundColor: themeColors.background
54
+ backgroundColor: themeColors.background,
55
+ justifyContent: 'center'
53
56
  }],
54
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
57
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
58
+ activeOpacity: 1,
59
+ style: [styles.iconContainer],
60
+ onPress: onBack,
61
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
62
+ source: closeIcon,
63
+ style: [styles.closeIcon, {
64
+ tintColor: themeColors.text
65
+ }]
66
+ })
67
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
68
+ style: {
69
+ textAlign: 'center'
70
+ },
55
71
  localization: "app.initialization.required"
56
- })
72
+ })]
57
73
  });
58
74
  } else if (!formSubmitted) {
59
75
  //NOTE: customer var ama forSubmitted false (name===null)
@@ -70,9 +86,18 @@ function Comnyx({
70
86
  })
71
87
  });
72
88
  }
73
- const styles = _reactNative.StyleSheet.create({
89
+ const styles = _ScaledSheet.ScaledSheet.create({
74
90
  container: {
75
91
  flex: 1
92
+ },
93
+ iconContainer: {
94
+ position: 'absolute',
95
+ top: '60@vs',
96
+ left: '24@s'
97
+ },
98
+ closeIcon: {
99
+ width: '24@vs',
100
+ height: '24@vs'
76
101
  }
77
102
  });
78
- //# sourceMappingURL=App.js.map
103
+ //# sourceMappingURL=ComnyxSupport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_ChatList","_CustomerForm","_react","_AppText","_useThemeColors","_usePolling","_store","_ScaledSheet","_jsxRuntime","closeIcon","ComnyxSupport","language","theme","fake","onBack","themes","customer","formSubmitted","useAppStore","s","themeColors","useThemeColors","usePolling","useEffect","external_id","setState","data","getState","setLanguage","setTheme","setFake","setThemes","jsxs","View","style","styles","container","backgroundColor","background","justifyContent","children","jsx","TouchableOpacity","activeOpacity","iconContainer","onPress","Image","source","tintColor","text","AppText","textAlign","localization","CustomerForm","ChatList","ScaledSheet","create","flex","position","top","left","width","height"],"sourceRoot":"../../../src","sources":["support/ComnyxSupport.tsx"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ComnyxSupport", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _ComnyxSupport.ComnyxSupport;
10
+ }
11
+ });
12
+ var _ComnyxSupport = require("./ComnyxSupport.js");
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_ComnyxSupport","require"],"sourceRoot":"../../../src","sources":["support/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.vs = exports.verticalScale = exports.scale = exports.s = exports.mvs = exports.ms = exports.moderateVerticalScale = exports.moderateScale = exports.fs = void 0;
7
7
  var _reactNative = require("react-native");
8
- var _store = require("../store.js");
8
+ var _store = require("../store/store.js");
9
9
  const {
10
10
  width,
11
11
  height
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { NativeModules } from 'react-native';
4
+ export const nativeComnyx = NativeModules.Comnyx;
5
+ //# sourceMappingURL=NativeComnyx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeModules","nativeComnyx","Comnyx"],"sourceRoot":"../../src","sources":["NativeComnyx.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;AAQ5C,OAAO,MAAMC,YAAY,GAAGD,aAAa,CAACE,MAAsB","ignoreList":[]}
@@ -2,17 +2,25 @@
2
2
 
3
3
  import axios from 'axios';
4
4
  const axiosInstance = axios.create({
5
- //baseURL: 'https://api.comnyx.com',
6
- baseURL: 'https://stage.comnyx.com',
5
+ baseURL: 'https://api.comnyx.com',
7
6
  headers: {
8
7
  'Content-Type': 'application/json'
9
8
  },
10
9
  timeout: 1000
11
10
  });
12
- export function initApi(token, externalId) {
11
+ export function isInitCalled() {
12
+ return !!axiosInstance.defaults.headers.common.Authorization;
13
+ }
14
+ export function initApi(token, baseURL) {
13
15
  axiosInstance.defaults.headers.common['Content-Type'] = 'application/json';
14
16
  axiosInstance.defaults.headers.common.Authorization = 'Bearer ' + token;
17
+ axiosInstance.defaults.baseURL = baseURL || axiosInstance.defaults.baseURL;
18
+ }
19
+ export function setLoginForAxios(externalId) {
15
20
  axiosInstance.defaults.headers.common['external-id'] = externalId;
16
21
  }
22
+ export function setLogoutForAxios() {
23
+ axiosInstance.defaults.headers.common['external-id'] = null;
24
+ }
17
25
  export { axiosInstance };
18
26
  //# sourceMappingURL=api.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["axios","axiosInstance","create","baseURL","headers","timeout","initApi","token","externalId","defaults","common","Authorization"],"sourceRoot":"../../../src","sources":["api/api.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,MAAMC,aAAa,GAAGD,KAAK,CAACE,MAAM,CAAC;EACjC;EACAC,OAAO,EAAE,0BAA0B;EACnCC,OAAO,EAAE;IACP,cAAc,EAAE;EAClB,CAAC;EACDC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,SAASC,OAAOA,CAACC,KAAa,EAAEC,UAAkB,EAAE;EACzDP,aAAa,CAACQ,QAAQ,CAACL,OAAO,CAACM,MAAM,CAAC,cAAc,CAAC,GAAG,kBAAkB;EAC1ET,aAAa,CAACQ,QAAQ,CAACL,OAAO,CAACM,MAAM,CAACC,aAAa,GAAG,SAAS,GAAGJ,KAAK;EACvEN,aAAa,CAACQ,QAAQ,CAACL,OAAO,CAACM,MAAM,CAAC,aAAa,CAAC,GAAGF,UAAU;AACnE;AAEA,SAASP,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["axios","axiosInstance","create","baseURL","headers","timeout","isInitCalled","defaults","common","Authorization","initApi","token","setLoginForAxios","externalId","setLogoutForAxios"],"sourceRoot":"../../../src","sources":["api/api.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,MAAMC,aAAa,GAAGD,KAAK,CAACE,MAAM,CAAC;EACjCC,OAAO,EAAE,wBAAwB;EACjCC,OAAO,EAAE;IACP,cAAc,EAAE;EAClB,CAAC;EACDC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,SAASC,YAAYA,CAAA,EAAG;EAC7B,OAAO,CAAC,CAACL,aAAa,CAACM,QAAQ,CAACH,OAAO,CAACI,MAAM,CAACC,aAAa;AAC9D;AAEA,OAAO,SAASC,OAAOA,CAACC,KAAa,EAAER,OAAgB,EAAE;EACvDF,aAAa,CAACM,QAAQ,CAACH,OAAO,CAACI,MAAM,CAAC,cAAc,CAAC,GAAG,kBAAkB;EAC1EP,aAAa,CAACM,QAAQ,CAACH,OAAO,CAACI,MAAM,CAACC,aAAa,GAAG,SAAS,GAAGE,KAAK;EACvEV,aAAa,CAACM,QAAQ,CAACJ,OAAO,GAAGA,OAAO,IAAIF,aAAa,CAACM,QAAQ,CAACJ,OAAO;AAC5E;AAEA,OAAO,SAASS,gBAAgBA,CAACC,UAAkB,EAAE;EACnDZ,aAAa,CAACM,QAAQ,CAACH,OAAO,CAACI,MAAM,CAAC,aAAa,CAAC,GAAGK,UAAU;AACnE;AAEA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EAClCb,aAAa,CAACM,QAAQ,CAACH,OAAO,CAACI,MAAM,CAAC,aAAa,CAAC,GAAG,IAAI;AAC7D;AAEA,SAASP,aAAa","ignoreList":[]}
@@ -1,13 +1,9 @@
1
1
  "use strict";
2
2
 
3
- import { getFakeCustomer } from "../data/fake/customers.js";
4
3
  import { axiosInstance } from "./api.js";
5
- export function createCustomer(customerData, options, externalId) {
6
- if (options.fake) {
7
- return Promise.resolve({
8
- customer: getFakeCustomer(customerData)
9
- });
10
- }
4
+
5
+ // NOTE: This is not a REST API endpoint. Data is collected with debounce and sent to the server at an appropriate time.
6
+ export function updateCustomer(customerData, externalId) {
11
7
  console.info('[Comnyx] Adding customer info');
12
8
  return axiosInstance.post('/api/customers/create', customerData, {
13
9
  headers: {
@@ -1 +1 @@
1
- {"version":3,"names":["getFakeCustomer","axiosInstance","createCustomer","customerData","options","externalId","fake","Promise","resolve","customer","console","info","post","headers","then","res","data"],"sourceRoot":"../../../src","sources":["api/customers.ts"],"mappings":";;AAEA,SAASA,eAAe,QAAQ,2BAAwB;AACxD,SAASC,aAAa,QAAQ,UAAO;AAErC,OAAO,SAASC,cAAcA,CAC5BC,YAAmC,EACnCC,OAAmB,EACnBC,UAAkB,EACe;EACjC,IAAID,OAAO,CAACE,IAAI,EAAE;IAChB,OAAOC,OAAO,CAACC,OAAO,CAAC;MAAEC,QAAQ,EAAET,eAAe,CAACG,YAAY;IAAE,CAAC,CAAC;EACrE;EACAO,OAAO,CAACC,IAAI,CAAC,+BAA+B,CAAC;EAC7C,OAAOV,aAAa,CACjBW,IAAI,CAAC,uBAAuB,EAAET,YAAY,EAAE;IAC3CU,OAAO,EAAE;MACP,aAAa,EAAER;IACjB;EACF,CAAC,CAAC,CACDS,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC;AAC5B","ignoreList":[]}
1
+ {"version":3,"names":["axiosInstance","updateCustomer","customerData","externalId","console","info","post","headers","then","res","data"],"sourceRoot":"../../../src","sources":["api/customers.ts"],"mappings":";;AACA,SAASA,aAAa,QAAQ,UAAO;;AAErC;AACA,OAAO,SAASC,cAAcA,CAC5BC,YAAmC,EACnCC,UAAmB,EACc;EACjCC,OAAO,CAACC,IAAI,CAAC,+BAA+B,CAAC;EAC7C,OAAOL,aAAa,CACjBM,IAAI,CAAC,uBAAuB,EAAEJ,YAAY,EAAE;IAC3CK,OAAO,EAAE;MACP,aAAa,EAAEJ;IACjB;EACF,CAAC,CAAC,CACDK,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC;AAC5B","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- export { createCustomer } from "./customers.js";
3
+ export { updateCustomer as createCustomer } from "./customers.js";
4
4
  export { getCustomerConversation, getNewCustomerConversation } from "./conversations.js";
5
5
  export { sendCustomerMessage } from "./messages.js";
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createCustomer","getCustomerConversation","getNewCustomerConversation","sendCustomerMessage"],"sourceRoot":"../../../src","sources":["api/index.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,gBAAa;AAC5C,SACEC,uBAAuB,EACvBC,0BAA0B,QACrB,oBAAiB;AACxB,SAASC,mBAAmB,QAAQ,eAAY","ignoreList":[]}
1
+ {"version":3,"names":["updateCustomer","createCustomer","getCustomerConversation","getNewCustomerConversation","sendCustomerMessage"],"sourceRoot":"../../../src","sources":["api/index.ts"],"mappings":";;AAAA,SAASA,cAAc,IAAIC,cAAc,QAAQ,gBAAa;AAC9D,SACEC,uBAAuB,EACvBC,0BAA0B,QACrB,oBAAiB;AACxB,SAASC,mBAAmB,QAAQ,eAAY","ignoreList":[]}
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { Text } from 'react-native';
4
4
  import { LocalizationList } from "../constants/translations.js";
5
- import { useAppStore } from "../store.js";
6
5
  import { useThemeColors } from "../hooks/useThemeColors.js";
7
6
  import { useGlobalTheme } from "../hooks/useTheme.js";
7
+ import { useAppStore } from "../store/store.js";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  export function AppText({
10
10
  style,
@@ -1 +1 @@
1
- {"version":3,"names":["Text","LocalizationList","useAppStore","useThemeColors","useGlobalTheme","jsx","_jsx","AppText","style","localization","children","family","weight","props","themeColors","theme","language","s","localizedText","en","undefined","content","console","warn","fontFamily","color","text","fontWeight"],"sourceRoot":"../../../src","sources":["components/AppText.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AAEnC,SAASC,gBAAgB,QAAQ,8BAA2B;AAC5D,SAASC,WAAW,QAAQ,aAAU;AACtC,SAASC,cAAc,QAAQ,4BAAyB;AAExD,SAASC,cAAc,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwBnD,OAAO,SAASC,OAAOA,CAAC;EACtBC,KAAK;EACLC,YAAY;EACZC,QAAQ;EACRC,MAAM;EACNC,MAAM,GAAG,KAAK;EACd,GAAGC;AACS,CAAC,EAAE;EACf,MAAMC,WAAW,GAAGX,cAAc,CAAC,CAAC;EACpC,MAAMY,KAAK,GAAGX,cAAc,CAAC,CAAC;EAE9B,MAAM;IAAEY;EAAS,CAAC,GAAGd,WAAW,CAAEe,CAAC,KAAM;IACvCD,QAAQ,EAAEC,CAAC,CAACD;EACd,CAAC,CAAC,CAAC;EAEH,MAAME,aAAa,GAAGT,YAAY,GAC9B,CAACR,gBAAgB,CAACe,QAAQ,CAAkC,IAC1Df,gBAAgB,CAACkB,EAAE,EAAEV,YAAY,CAAC,GACpCW,SAAS;EAEb,MAAMC,OAAO,GAAGH,aAAa,IAAIR,QAAQ;EAEzC,IAAI,CAACW,OAAO,EAAE;IACZC,OAAO,CAACC,IAAI,CACV,iFACF,CAAC;IACD,OAAO,IAAI;EACb;EAEA,IAAI,CAACZ,MAAM,IAAII,KAAK,CAACJ,MAAM,IAAIK,QAAQ,EAAE;IACvCL,MAAM,GAAGI,KAAK,CAACJ,MAAM,CAACK,QAAQ,CAAC;EACjC;EAEA,MAAMQ,UAAU,GAAGb,MAAM,GAAGC,MAAM,IAAI,KAAK,CAAC;EAE5C,oBACEN,IAAA,CAACN,IAAI;IACHQ,KAAK,EAAE,CACL;MACEiB,KAAK,EAAEX,WAAW,CAACY,IAAI;MACvBF,UAAU;MACVG,UAAU,EAAEH,UAAU,GAAGJ,SAAS,GAAGR,MAAM,IAAI;IACjD,CAAC,EACDJ,KAAK,CACL;IAAA,GACEK,KAAK;IAAAH,QAAA,EAERW;EAAO,CACJ,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["Text","LocalizationList","useThemeColors","useGlobalTheme","useAppStore","jsx","_jsx","AppText","style","localization","children","family","weight","props","themeColors","theme","language","s","localizedText","en","undefined","content","console","warn","fontFamily","color","text","fontWeight"],"sourceRoot":"../../../src","sources":["components/AppText.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AAEnC,SAASC,gBAAgB,QAAQ,8BAA2B;AAC5D,SAASC,cAAc,QAAQ,4BAAyB;AAExD,SAASC,cAAc,QAAQ,sBAAmB;AAClD,SAASC,WAAW,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwB7C,OAAO,SAASC,OAAOA,CAAC;EACtBC,KAAK;EACLC,YAAY;EACZC,QAAQ;EACRC,MAAM;EACNC,MAAM,GAAG,KAAK;EACd,GAAGC;AACS,CAAC,EAAE;EACf,MAAMC,WAAW,GAAGZ,cAAc,CAAC,CAAC;EACpC,MAAMa,KAAK,GAAGZ,cAAc,CAAC,CAAC;EAE9B,MAAM;IAAEa;EAAS,CAAC,GAAGZ,WAAW,CAAEa,CAAC,KAAM;IACvCD,QAAQ,EAAEC,CAAC,CAACD;EACd,CAAC,CAAC,CAAC;EAEH,MAAME,aAAa,GAAGT,YAAY,GAC9B,CAACR,gBAAgB,CAACe,QAAQ,CAAkC,IAC1Df,gBAAgB,CAACkB,EAAE,EAAEV,YAAY,CAAC,GACpCW,SAAS;EAEb,MAAMC,OAAO,GAAGH,aAAa,IAAIR,QAAQ;EAEzC,IAAI,CAACW,OAAO,EAAE;IACZC,OAAO,CAACC,IAAI,CACV,iFACF,CAAC;IACD,OAAO,IAAI;EACb;EAEA,IAAI,CAACZ,MAAM,IAAII,KAAK,CAACJ,MAAM,IAAIK,QAAQ,EAAE;IACvCL,MAAM,GAAGI,KAAK,CAACJ,MAAM,CAACK,QAAQ,CAAC;EACjC;EAEA,MAAMQ,UAAU,GAAGb,MAAM,GAAGC,MAAM,IAAI,KAAK,CAAC;EAE5C,oBACEN,IAAA,CAACN,IAAI;IACHQ,KAAK,EAAE,CACL;MACEiB,KAAK,EAAEX,WAAW,CAACY,IAAI;MACvBF,UAAU;MACVG,UAAU,EAAEH,UAAU,GAAGJ,SAAS,GAAGR,MAAM,IAAI;IACjD,CAAC,EACDJ,KAAK,CACL;IAAA,GACEK,KAAK;IAAAH,QAAA,EAERW;EAAO,CACJ,CAAC;AAEX","ignoreList":[]}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  import { useCallback, useEffect, useRef, useState, useMemo } from 'react';
4
- import { useAppStore } from "../store.js";
5
4
  import { SectionList, View, useWindowDimensions, ActivityIndicator, Image, TouchableOpacity, Keyboard, StatusBar } from 'react-native';
6
5
  import { getCustomerConversation, sendCustomerMessage } from "../api/index.js";
7
6
  import { MessageItem } from "./MessageItem.js";
@@ -14,6 +13,7 @@ import CustomPopup from "./CustomAlert.js";
14
13
  import { ScaledSheet } from "./ScaledSheet.js";
15
14
  import { formatDate } from "../utils/formatDate.js";
16
15
  import { activeOpacity } from "../constants/activeOpacity.js";
16
+ import { useAppStore } from "../store/store.js";
17
17
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
18
18
  const headphonesIcon = require('../assets/headphones-01.png');
19
19
  const closeIcon = require('../assets/x-close.png');