@developer_tribe/react-native-comnyx 0.3.2 → 0.3.4

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 (179) hide show
  1. package/lib/commonjs/App.js +8 -3
  2. package/lib/commonjs/App.js.map +1 -1
  3. package/lib/commonjs/assets/arrow-right.png +0 -0
  4. package/lib/commonjs/assets/headphones-01.png +0 -0
  5. package/lib/commonjs/assets/iconamoon_clock-fill.png +0 -0
  6. package/lib/commonjs/assets/info-circle.png +0 -0
  7. package/lib/commonjs/assets/message-notification-square.png +0 -0
  8. package/lib/commonjs/assets/x-close.png +0 -0
  9. package/lib/commonjs/components/ChatList.js +356 -50
  10. package/lib/commonjs/components/ChatList.js.map +1 -1
  11. package/lib/commonjs/components/CustomAlert.js +132 -0
  12. package/lib/commonjs/components/CustomAlert.js.map +1 -0
  13. package/lib/commonjs/components/CustomerForm.js +252 -198
  14. package/lib/commonjs/components/CustomerForm.js.map +1 -1
  15. package/lib/commonjs/components/EmptyList.js +36 -11
  16. package/lib/commonjs/components/EmptyList.js.map +1 -1
  17. package/lib/commonjs/components/InitFailed.js +8 -5
  18. package/lib/commonjs/components/InitFailed.js.map +1 -1
  19. package/lib/commonjs/components/MessageInput.js +49 -16
  20. package/lib/commonjs/components/MessageInput.js.map +1 -1
  21. package/lib/commonjs/components/MessageItem.js +133 -42
  22. package/lib/commonjs/components/MessageItem.js.map +1 -1
  23. package/lib/commonjs/components/ScaledSheet.js +67 -0
  24. package/lib/commonjs/components/ScaledSheet.js.map +1 -0
  25. package/lib/commonjs/components/SizeMatter.js +27 -0
  26. package/lib/commonjs/components/SizeMatter.js.map +1 -0
  27. package/lib/commonjs/index.js +7 -0
  28. package/lib/commonjs/index.js.map +1 -1
  29. package/lib/commonjs/store.js +15 -9
  30. package/lib/commonjs/store.js.map +1 -1
  31. package/lib/commonjs/types/Theme.js +20 -2
  32. package/lib/commonjs/types/Theme.js.map +1 -1
  33. package/lib/commonjs/utils/deepMap.js +38 -0
  34. package/lib/commonjs/utils/deepMap.js.map +1 -0
  35. package/lib/commonjs/utils/formatDate.js +20 -0
  36. package/lib/commonjs/utils/formatDate.js.map +1 -0
  37. package/lib/commonjs/utils/scalingUtils.js +33 -0
  38. package/lib/commonjs/utils/scalingUtils.js.map +1 -0
  39. package/lib/commonjs/viewabilityConfig.js +11 -0
  40. package/lib/commonjs/viewabilityConfig.js.map +1 -0
  41. package/lib/module/App.js +8 -3
  42. package/lib/module/App.js.map +1 -1
  43. package/lib/module/assets/arrow-right.png +0 -0
  44. package/lib/module/assets/headphones-01.png +0 -0
  45. package/lib/module/assets/iconamoon_clock-fill.png +0 -0
  46. package/lib/module/assets/info-circle.png +0 -0
  47. package/lib/module/assets/message-notification-square.png +0 -0
  48. package/lib/module/assets/x-close.png +0 -0
  49. package/lib/module/components/ChatList.js +358 -54
  50. package/lib/module/components/ChatList.js.map +1 -1
  51. package/lib/module/components/CustomAlert.js +127 -0
  52. package/lib/module/components/CustomAlert.js.map +1 -0
  53. package/lib/module/components/CustomerForm.js +253 -200
  54. package/lib/module/components/CustomerForm.js.map +1 -1
  55. package/lib/module/components/EmptyList.js +38 -13
  56. package/lib/module/components/EmptyList.js.map +1 -1
  57. package/lib/module/components/InitFailed.js +9 -6
  58. package/lib/module/components/InitFailed.js.map +1 -1
  59. package/lib/module/components/MessageInput.js +50 -17
  60. package/lib/module/components/MessageInput.js.map +1 -1
  61. package/lib/module/components/MessageItem.js +134 -44
  62. package/lib/module/components/MessageItem.js.map +1 -1
  63. package/lib/module/components/ScaledSheet.js +62 -0
  64. package/lib/module/components/ScaledSheet.js.map +1 -0
  65. package/lib/module/components/SizeMatter.js +23 -0
  66. package/lib/module/components/SizeMatter.js.map +1 -0
  67. package/lib/module/index.js +1 -0
  68. package/lib/module/index.js.map +1 -1
  69. package/lib/module/store.js +15 -9
  70. package/lib/module/store.js.map +1 -1
  71. package/lib/module/types/Theme.js +20 -2
  72. package/lib/module/types/Theme.js.map +1 -1
  73. package/lib/module/utils/deepMap.js +34 -0
  74. package/lib/module/utils/deepMap.js.map +1 -0
  75. package/lib/module/utils/formatDate.js +15 -0
  76. package/lib/module/utils/formatDate.js.map +1 -0
  77. package/lib/module/utils/scalingUtils.js +25 -0
  78. package/lib/module/utils/scalingUtils.js.map +1 -0
  79. package/lib/module/viewabilityConfig.js +7 -0
  80. package/lib/module/viewabilityConfig.js.map +1 -0
  81. package/lib/typescript/commonjs/src/App.d.ts +2 -1
  82. package/lib/typescript/commonjs/src/App.d.ts.map +1 -1
  83. package/lib/typescript/commonjs/src/components/ChatList.d.ts +3 -1
  84. package/lib/typescript/commonjs/src/components/ChatList.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/src/components/CustomAlert.d.ts +15 -0
  86. package/lib/typescript/commonjs/src/components/CustomAlert.d.ts.map +1 -0
  87. package/lib/typescript/commonjs/src/components/CustomerForm.d.ts +3 -1
  88. package/lib/typescript/commonjs/src/components/CustomerForm.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/src/components/EmptyList.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/src/components/InitFailed.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/src/components/MessageInput.d.ts +1 -0
  92. package/lib/typescript/commonjs/src/components/MessageInput.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/src/components/MessageItem.d.ts +2 -1
  94. package/lib/typescript/commonjs/src/components/MessageItem.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/src/components/ScaledSheet.d.ts +2 -0
  96. package/lib/typescript/commonjs/src/components/ScaledSheet.d.ts.map +1 -0
  97. package/lib/typescript/commonjs/src/components/SizeMatter.d.ts +7 -0
  98. package/lib/typescript/commonjs/src/components/SizeMatter.d.ts.map +1 -0
  99. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  100. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/store.d.ts +6 -0
  102. package/lib/typescript/commonjs/src/store.d.ts.map +1 -1
  103. package/lib/typescript/commonjs/src/types/Conversation.d.ts +2 -0
  104. package/lib/typescript/commonjs/src/types/Conversation.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/src/types/Theme.d.ts +9 -0
  106. package/lib/typescript/commonjs/src/types/Theme.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/src/utils/deepMap.d.ts +7 -0
  108. package/lib/typescript/commonjs/src/utils/deepMap.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/utils/formatDate.d.ts +2 -0
  110. package/lib/typescript/commonjs/src/utils/formatDate.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/utils/scalingUtils.d.ts +10 -0
  112. package/lib/typescript/commonjs/src/utils/scalingUtils.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/src/viewabilityConfig.d.ts +5 -0
  114. package/lib/typescript/commonjs/src/viewabilityConfig.d.ts.map +1 -0
  115. package/lib/typescript/module/src/App.d.ts +2 -1
  116. package/lib/typescript/module/src/App.d.ts.map +1 -1
  117. package/lib/typescript/module/src/components/ChatList.d.ts +3 -1
  118. package/lib/typescript/module/src/components/ChatList.d.ts.map +1 -1
  119. package/lib/typescript/module/src/components/CustomAlert.d.ts +15 -0
  120. package/lib/typescript/module/src/components/CustomAlert.d.ts.map +1 -0
  121. package/lib/typescript/module/src/components/CustomerForm.d.ts +3 -1
  122. package/lib/typescript/module/src/components/CustomerForm.d.ts.map +1 -1
  123. package/lib/typescript/module/src/components/EmptyList.d.ts.map +1 -1
  124. package/lib/typescript/module/src/components/InitFailed.d.ts.map +1 -1
  125. package/lib/typescript/module/src/components/MessageInput.d.ts +1 -0
  126. package/lib/typescript/module/src/components/MessageInput.d.ts.map +1 -1
  127. package/lib/typescript/module/src/components/MessageItem.d.ts +2 -1
  128. package/lib/typescript/module/src/components/MessageItem.d.ts.map +1 -1
  129. package/lib/typescript/module/src/components/ScaledSheet.d.ts +2 -0
  130. package/lib/typescript/module/src/components/ScaledSheet.d.ts.map +1 -0
  131. package/lib/typescript/module/src/components/SizeMatter.d.ts +7 -0
  132. package/lib/typescript/module/src/components/SizeMatter.d.ts.map +1 -0
  133. package/lib/typescript/module/src/index.d.ts +1 -0
  134. package/lib/typescript/module/src/index.d.ts.map +1 -1
  135. package/lib/typescript/module/src/store.d.ts +6 -0
  136. package/lib/typescript/module/src/store.d.ts.map +1 -1
  137. package/lib/typescript/module/src/types/Conversation.d.ts +2 -0
  138. package/lib/typescript/module/src/types/Conversation.d.ts.map +1 -1
  139. package/lib/typescript/module/src/types/Theme.d.ts +9 -0
  140. package/lib/typescript/module/src/types/Theme.d.ts.map +1 -1
  141. package/lib/typescript/module/src/utils/deepMap.d.ts +7 -0
  142. package/lib/typescript/module/src/utils/deepMap.d.ts.map +1 -0
  143. package/lib/typescript/module/src/utils/formatDate.d.ts +2 -0
  144. package/lib/typescript/module/src/utils/formatDate.d.ts.map +1 -0
  145. package/lib/typescript/module/src/utils/scalingUtils.d.ts +10 -0
  146. package/lib/typescript/module/src/utils/scalingUtils.d.ts.map +1 -0
  147. package/lib/typescript/module/src/viewabilityConfig.d.ts +5 -0
  148. package/lib/typescript/module/src/viewabilityConfig.d.ts.map +1 -0
  149. package/package.json +1 -1
  150. package/src/App.tsx +4 -2
  151. package/src/assets/arrow-right.png +0 -0
  152. package/src/assets/headphones-01.png +0 -0
  153. package/src/assets/iconamoon_clock-fill.png +0 -0
  154. package/src/assets/info-circle.png +0 -0
  155. package/src/assets/message-notification-square.png +0 -0
  156. package/src/assets/x-close.png +0 -0
  157. package/src/components/ChatList.tsx +420 -60
  158. package/src/components/CustomAlert.tsx +132 -0
  159. package/src/components/CustomerForm.tsx +272 -224
  160. package/src/components/EmptyList.tsx +31 -7
  161. package/src/components/InitFailed.tsx +9 -6
  162. package/src/components/MessageInput.tsx +86 -49
  163. package/src/components/MessageItem.tsx +181 -58
  164. package/src/components/ScaledSheet.ts +93 -0
  165. package/src/components/SizeMatter.tsx +22 -0
  166. package/src/index.tsx +1 -0
  167. package/src/store.ts +13 -3
  168. package/src/types/Conversation.ts +2 -0
  169. package/src/types/Theme.ts +27 -0
  170. package/src/utils/deepMap.ts +47 -0
  171. package/src/utils/formatDate.ts +13 -0
  172. package/src/utils/scalingUtils.ts +27 -0
  173. package/src/viewabilityConfig.ts +4 -0
  174. package/lib/commonjs/assets/double-check.png +0 -0
  175. package/lib/commonjs/assets/send.png +0 -0
  176. package/lib/module/assets/double-check.png +0 -0
  177. package/lib/module/assets/send.png +0 -0
  178. package/src/assets/double-check.png +0 -0
  179. package/src/assets/send.png +0 -0
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { LocalizationKeys } from '../types/LocalizationKeys';
3
+ interface CustomPopupProps {
4
+ isVisible: boolean;
5
+ onClose: () => void;
6
+ title: string;
7
+ buttonText?: keyof LocalizationKeys;
8
+ description?: string;
9
+ onCancelButton?: () => void;
10
+ onResendButton?: () => void;
11
+ }
12
+ declare function CustomPopup({ isVisible, onClose, title, description, onCancelButton, onResendButton, buttonText, }: CustomPopupProps): import("react/jsx-runtime").JSX.Element;
13
+ declare const _default: React.MemoExoticComponent<typeof CustomPopup>;
14
+ export default _default;
15
+ //# sourceMappingURL=CustomAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomAlert.d.ts","sourceRoot":"","sources":["../../../../../src/components/CustomAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,UAAU,gBAAgB;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,gBAAgB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAID,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,KAAK,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,UAAU,GACX,EAAE,gBAAgB,2CA4ClB;;AA4DD,wBAAuC"}
@@ -1,2 +1,4 @@
1
- export declare function CustomerForm(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function CustomerForm({ onBack }: {
2
+ onBack: () => void;
3
+ }): import("react/jsx-runtime").JSX.Element;
2
4
  //# sourceMappingURL=CustomerForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomerForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/CustomerForm.tsx"],"names":[],"mappings":"AA0BA,wBAAgB,YAAY,4CAgQ3B"}
1
+ {"version":3,"file":"CustomerForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/CustomerForm.tsx"],"names":[],"mappings":"AAkCA,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,2CAyQ9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyList.d.ts","sourceRoot":"","sources":["../../../../../src/components/EmptyList.tsx"],"names":[],"mappings":"AAIA,wBAAgB,SAAS,4CAaxB"}
1
+ {"version":3,"file":"EmptyList.d.ts","sourceRoot":"","sources":["../../../../../src/components/EmptyList.tsx"],"names":[],"mappings":"AAQA,wBAAgB,SAAS,4CAqBxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"InitFailed.d.ts","sourceRoot":"","sources":["../../../../../src/components/InitFailed.tsx"],"names":[],"mappings":"AAIA,UAAU,eAAe;IACvB,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,wBAAgB,UAAU,CAAC,EAAE,aAAa,EAAE,EAAE,eAAe,2CAkB5D"}
1
+ {"version":3,"file":"InitFailed.d.ts","sourceRoot":"","sources":["../../../../../src/components/InitFailed.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED,wBAAgB,UAAU,CAAC,EAAE,aAAa,EAAE,EAAE,eAAe,2CAkB5D"}
@@ -1,4 +1,5 @@
1
1
  export declare function MessageInput({ scrollToBottom, }: {
2
2
  scrollToBottom: (animated: boolean) => void;
3
+ selectedMessage?: string;
3
4
  }): import("react/jsx-runtime").JSX.Element;
4
5
  //# sourceMappingURL=MessageInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"AAcA,wBAAgB,YAAY,CAAC,EAC3B,cAAc,GACf,EAAE;IACD,cAAc,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,2CAsFA"}
1
+ {"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"AASA,wBAAgB,YAAY,CAAC,EAC3B,cAAc,GACf,EAAE;IACD,cAAc,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,2CA0HA"}
@@ -1,5 +1,6 @@
1
1
  import type { AppConversationMessage } from '../types/Conversation';
2
- export declare function MessageItem({ item }: {
2
+ export declare function MessageItem({ item, onShowPopup, }: {
3
3
  item: AppConversationMessage;
4
+ onShowPopup: () => void;
4
5
  }): import("react/jsx-runtime").JSX.Element;
5
6
  //# sourceMappingURL=MessageItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAOpE,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,sBAAsB,CAAA;CAAE,2CAsErE"}
1
+ {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAsBpE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CA6IA"}
@@ -0,0 +1,2 @@
1
+ export declare const ScaledSheet: any;
2
+ //# sourceMappingURL=ScaledSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScaledSheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScaledSheet.ts"],"names":[],"mappings":"AA4FA,eAAO,MAAM,WAAW,KAAqC,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface ISizeMatter {
2
+ baseWidth: number;
3
+ baseHeight: number;
4
+ }
5
+ export declare function SizeMatter({ baseWidth, baseHeight }: ISizeMatter): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=SizeMatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SizeMatter.d.ts","sourceRoot":"","sources":["../../../../../src/components/SizeMatter.tsx"],"names":[],"mappings":"AAGA,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAe,EAAE,UAAgB,EAAE,EAAE,WAAW,2CAa5E"}
@@ -2,4 +2,5 @@ import './__dev__';
2
2
  export { registerComnyx } from './register';
3
3
  export type { CreateCustomerRequest } from './types/Customer';
4
4
  export { Comnyx } from './App';
5
+ export { SizeMatter } from './components/SizeMatter';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
@@ -2,6 +2,8 @@ import type { Customer } from './types/Customer';
2
2
  import type { AppConversationMessage } from './types/Conversation';
3
3
  import type { LanguageCode } from './types/Language';
4
4
  interface AppStoreState {
5
+ baseHeight: number;
6
+ baseWidth: number;
5
7
  initialized: boolean;
6
8
  customer: Customer | null;
7
9
  data: AppConversationMessage[] | null;
@@ -19,6 +21,10 @@ interface AppStoreState {
19
21
  setLanguage: (language: LanguageCode) => void;
20
22
  setTheme: (theme: 'light' | 'dark') => void;
21
23
  setFake: (fake: boolean) => void;
24
+ updateBaseDimensions: (config: {
25
+ baseHeight: number;
26
+ baseWidth: number;
27
+ }) => void;
22
28
  }
23
29
  export declare const useAppStore: import("zustand/traditional").UseBoundStoreWithEqualityFn<Omit<import("zustand").StoreApi<AppStoreState>, "persist"> & {
24
30
  persist: {
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kB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;
11
+ error?: boolean;
12
+ resending?: boolean;
11
13
  }
12
14
  export interface ConversationPage {
13
15
  current_page: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../../../../src/types/Conversation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,YAAY,CAAC;IACtD,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
1
+ {"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../../../../src/types/Conversation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,YAAY,CAAC;IACtD,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
@@ -8,6 +8,15 @@ export interface ThemeColors {
8
8
  warning: string;
9
9
  info: string;
10
10
  border: string;
11
+ light_text: string;
12
+ dark_background: string;
13
+ gainsboro: string;
14
+ slate: string;
15
+ green: string;
16
+ light_green: string;
17
+ ghost: string;
18
+ navy: string;
19
+ lavender: string;
11
20
  }
12
21
  export declare const lightTheme: ThemeColors;
13
22
  export declare const darkTheme: ThemeColors;
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../../../src/types/Theme.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,EAAE,WAUxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAUvB,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;CACnB"}
1
+ {"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../../../src/types/Theme.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,UAAU,EAAE,WAmBxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAmBvB,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;CACnB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Recursively maps through a nested object/array structure
3
+ * and applies the mapping function to all non-object values
4
+ */
5
+ declare const deepMap: <T, R>(obj: T, fn: (value: any) => R) => T extends any[] ? R[] : T extends Record<string, any> ? Record<string, R> : R;
6
+ export default deepMap;
7
+ //# sourceMappingURL=deepMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMap.d.ts","sourceRoot":"","sources":["../../../../../src/utils/deepMap.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,QAAA,MAAM,OAAO,6BAEC,GAAG,wFAkBhB,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const formatDate: (date?: Date | null) => string;
2
+ //# sourceMappingURL=formatDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatDate.d.ts","sourceRoot":"","sources":["../../../../../src/utils/formatDate.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,UAAW,IAAI,GAAG,IAAI,KAAG,MAY/C,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const s: (size: number) => number;
2
+ export declare const vs: (size: number) => number;
3
+ export declare const ms: (size: number, factor?: number) => number;
4
+ export declare const mvs: (size: number, factor?: number) => number;
5
+ export declare const scale: (size: number) => number;
6
+ export declare const verticalScale: (size: number) => number;
7
+ export declare const fs: (size: number) => number;
8
+ export declare const moderateScale: (size: number, factor?: number) => number;
9
+ export declare const moderateVerticalScale: (size: number, factor?: number) => number;
10
+ //# sourceMappingURL=scalingUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scalingUtils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/scalingUtils.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,CAAC,SAAU,MAAM,WAA6C,CAAC;AAC5E,eAAO,MAAM,EAAE,SAAU,MAAM,WAA6C,CAAC;AAC7E,eAAO,MAAM,EAAE,SAAU,MAAM,4BACO,CAAC;AACvC,eAAO,MAAM,GAAG,SAAU,MAAM,4BACc,CAAC;AAE/C,eAAO,MAAM,KAAK,SAPM,MAAM,WAOR,CAAC;AACvB,eAAO,MAAM,aAAa,SAPD,MAAM,WAOA,CAAC;AAChC,eAAO,MAAM,EAAE,SARU,MAAM,WAQX,CAAC;AACrB,eAAO,MAAM,aAAa,SARD,MAAM,4BAQA,CAAC;AAChC,eAAO,MAAM,qBAAqB,SAPR,MAAM,4BAOQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const viewabilityConfig: {
2
+ itemVisiblePercentThreshold: number;
3
+ minimumViewTime: number;
4
+ };
5
+ //# sourceMappingURL=viewabilityConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewabilityConfig.d.ts","sourceRoot":"","sources":["../../../../src/viewabilityConfig.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@developer_tribe/react-native-comnyx",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "React Native chat component with integrated support panel, enabling real-time customer communication and efficient agent workflow management.",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
package/src/App.tsx CHANGED
@@ -12,12 +12,14 @@ interface ComnyxProps {
12
12
  language?: LanguageCode;
13
13
  theme?: 'light' | 'dark';
14
14
  fake?: boolean;
15
+ onBack: () => void;
15
16
  }
16
17
 
17
18
  export function Comnyx({
18
19
  language = 'en',
19
20
  theme = 'dark',
20
21
  fake = false,
22
+ onBack,
21
23
  }: ComnyxProps) {
22
24
  const { initialized, customer } = useAppStore((s) => ({
23
25
  initialized: s.initialized,
@@ -40,14 +42,14 @@ export function Comnyx({
40
42
  </View>
41
43
  );
42
44
  } else if (!customer) {
43
- return <CustomerForm />;
45
+ return <CustomerForm onBack={onBack} />;
44
46
  }
45
47
 
46
48
  return (
47
49
  <View
48
50
  style={[styles.container, { backgroundColor: themeColors.background }]}
49
51
  >
50
- <ChatList />
52
+ <ChatList onBack={onBack} />
51
53
  </View>
52
54
  );
53
55
  }
Binary file
Binary file
Binary file
Binary file