@developer_tribe/react-native-comnyx 0.12.15 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/android/generated/RCTAppDependencyProvider.h +25 -0
  2. package/android/generated/RCTAppDependencyProvider.mm +55 -0
  3. package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  4. package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  5. package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
  6. package/android/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  7. package/android/generated/ReactAppDependencyProvider.podspec +34 -0
  8. package/android/generated/java/com/comnyx/NativeComnyxSpec.java +46 -0
  9. package/android/generated/jni/CMakeLists.txt +36 -0
  10. package/android/generated/jni/RNComnyxSpec-generated.cpp +44 -0
  11. package/android/generated/jni/RNComnyxSpec.h +31 -0
  12. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +38 -0
  13. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +89 -0
  14. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  15. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  16. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  17. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  18. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  19. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  20. package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +53 -0
  21. package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +67 -0
  22. package/ios/generated/RNComnyxSpecJSI-generated.cpp +38 -0
  23. package/ios/generated/RNComnyxSpecJSI.h +89 -0
  24. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  25. package/lib/commonjs/components/ChatList.js +53 -125
  26. package/lib/commonjs/components/ChatList.js.map +1 -1
  27. package/lib/commonjs/constants/translations.js +58 -0
  28. package/lib/commonjs/constants/translations.js.map +1 -1
  29. package/lib/commonjs/hooks/usePolling.js.map +1 -1
  30. package/lib/commonjs/register/Accumulator.js.map +1 -1
  31. package/lib/commonjs/store/store.js +2 -3
  32. package/lib/commonjs/store/store.js.map +1 -1
  33. package/lib/commonjs/utils/formatDate.js +30 -9
  34. package/lib/commonjs/utils/formatDate.js.map +1 -1
  35. package/lib/commonjs/utils/mmkvStorage.js +21 -0
  36. package/lib/commonjs/utils/mmkvStorage.js.map +1 -0
  37. package/lib/commonjs/version.js +1 -1
  38. package/lib/commonjs/version.js.map +1 -1
  39. package/lib/module/components/ChatList.js +54 -126
  40. package/lib/module/components/ChatList.js.map +1 -1
  41. package/lib/module/constants/translations.js +58 -0
  42. package/lib/module/constants/translations.js.map +1 -1
  43. package/lib/module/hooks/usePolling.js.map +1 -1
  44. package/lib/module/register/Accumulator.js.map +1 -1
  45. package/lib/module/store/store.js +2 -2
  46. package/lib/module/store/store.js.map +1 -1
  47. package/lib/module/utils/formatDate.js +28 -8
  48. package/lib/module/utils/formatDate.js.map +1 -1
  49. package/lib/module/utils/mmkvStorage.js +17 -0
  50. package/lib/module/utils/mmkvStorage.js.map +1 -0
  51. package/lib/module/version.js +1 -1
  52. package/lib/module/version.js.map +1 -1
  53. package/lib/typescript/src/NativeComnyx.d.ts +1 -1
  54. package/lib/typescript/src/NativeComnyx.d.ts.map +1 -1
  55. package/lib/typescript/src/api/conversations.d.ts +1 -1
  56. package/lib/typescript/src/api/conversations.d.ts.map +1 -1
  57. package/lib/typescript/src/components/AppText.d.ts +1 -1
  58. package/lib/typescript/src/components/AppText.d.ts.map +1 -1
  59. package/lib/typescript/src/components/ChatList.d.ts.map +1 -1
  60. package/lib/typescript/src/constants/translations.d.ts.map +1 -1
  61. package/lib/typescript/src/hooks/useListenNativeTokenForDebug.d.ts +1 -1
  62. package/lib/typescript/src/hooks/useListenNativeTokenForDebug.d.ts.map +1 -1
  63. package/lib/typescript/src/register/Accumulator.d.ts +1 -1
  64. package/lib/typescript/src/register/Accumulator.d.ts.map +1 -1
  65. package/lib/typescript/src/store/store.d.ts.map +1 -1
  66. package/lib/typescript/src/types/LocalizationKeys.d.ts +2 -0
  67. package/lib/typescript/src/types/LocalizationKeys.d.ts.map +1 -1
  68. package/lib/typescript/src/utils/formatDate.d.ts +1 -0
  69. package/lib/typescript/src/utils/formatDate.d.ts.map +1 -1
  70. package/lib/typescript/src/utils/mmkvStorage.d.ts +3 -0
  71. package/lib/typescript/src/utils/mmkvStorage.d.ts.map +1 -0
  72. package/lib/typescript/src/version.d.ts +1 -1
  73. package/lib/typescript/src/version.d.ts.map +1 -1
  74. package/package.json +19 -10
  75. package/src/components/ChatList.tsx +101 -174
  76. package/src/constants/translations.ts +58 -0
  77. package/src/hooks/usePolling.ts +1 -1
  78. package/src/register/Accumulator.ts +1 -1
  79. package/src/store/store.ts +2 -2
  80. package/src/types/LocalizationKeys.ts +2 -0
  81. package/src/utils/formatDate.ts +46 -9
  82. package/src/utils/mmkvStorage.ts +17 -0
  83. package/src/version.ts +1 -1
  84. package/lib/typescript/jest.config.d.ts +0 -4
  85. package/lib/typescript/jest.config.d.ts.map +0 -1
@@ -9,6 +9,6 @@ interface AppTextProps extends Omit<TextProps, 'children'> {
9
9
  family?: Partial<FamilyWeight>;
10
10
  weight?: Weight;
11
11
  }
12
- export declare function AppText({ style, localization, children, family, weight, ...props }: AppTextProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare function AppText({ style, localization, children, family, weight, ...props }: AppTextProps): import("react/jsx-runtime").JSX.Element;
13
13
  export {};
14
14
  //# sourceMappingURL=AppText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppText.d.ts","sourceRoot":"","sources":["../../../../src/components/AppText.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAA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CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,MAAc,EACd,GAAG,KAAK,EACT,EAAE,YAAY,2CA2Cd"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"AAqGA,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,2CA2oBA"}
1
+ {"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"AAuGA,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,2CA4kBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/constants/translations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAigD1D,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/constants/translations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,gBAAgB,CA2jD1D,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare function useComnyxListenNativeTokenForDebug(): string | null;
1
+ export declare function useComnyxListenNativeTokenForDebug(): string;
2
2
  //# sourceMappingURL=useListenNativeTokenForDebug.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useListenNativeTokenForDebug.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useListenNativeTokenForDebug.ts"],"names":[],"mappings":"AAGA,wBAAgB,kCAAkC,kBAEjD"}
1
+ {"version":3,"file":"useListenNativeTokenForDebug.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useListenNativeTokenForDebug.ts"],"names":[],"mappings":"AAGA,wBAAgB,kCAAkC,WAEjD"}
@@ -12,7 +12,7 @@ export declare class Accumulator {
12
12
  reset(): void;
13
13
  clear(): void;
14
14
  empty(): void;
15
- get(): CreateCustomerRequest | null;
15
+ get(): CreateCustomerRequest;
16
16
  isListenerCalledOnce(): boolean;
17
17
  }
18
18
  export declare const accumulator: Accumulator;
@@ -1 +1 @@
1
- {"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI/D,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,aAAa,CAAyC;IAC9D,OAAO,CAAC,QAAQ,CACT;IACP,OAAO,CAAC,qBAAqB,CAAkB;;IAG/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC;IASjE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IAsCtD,KAAK;IAeX,QAAQ;IAiBR,KAAK;IAML,KAAK;IAQL,KAAK;IAIL,GAAG;IAIH,oBAAoB;CAGrB;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
1
+ {"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI/D,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,aAAa,CAAwD;IAC7E,OAAO,CAAC,QAAQ,CACT;IACP,OAAO,CAAC,qBAAqB,CAAkB;;IAG/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC;IASjE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IAsCtD,KAAK;IAeX,QAAQ;IAiBR,KAAK;IAML,KAAK;IAQL,KAAK;IAIL,GAAG;IAIH,oBAAoB;CAGrB;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/store/store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,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,IAAI,CAAC;IAC/D,WAAW,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,oBAAoB,EAAE,CAAC,MAAM,EAAE;QAC7B,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB,KAAK,IAAI,CAAC;IACX,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,uBAAuB,EAAE,OAAO,CAAC;IACjC,0BAA0B,EAAE,CAAC,uBAAuB,EAAE,OAAO,KAAK,IAAI,CAAC;IACvE,YAAY,EAAE,MAAM,gBAAgB,GAAG,IAAI,CAAC;IAC5C,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;IAClE,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,aAAa,CA+DnD,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;EAYvB,CAAC"}
@@ -27,6 +27,8 @@ export type LocalizationKeys = {
27
27
  'chat.empty.description': string;
28
28
  'chat.live': string;
29
29
  'chat.support-team': string;
30
+ 'chat.date.today': string;
31
+ 'chat.date.yesterday': string;
30
32
  'customer.form.resend': string;
31
33
  'chat.list-failed-message.title': string;
32
34
  'chat.list-failed-message.description': string;
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationKeys.d.ts","sourceRoot":"","sources":["../../../../src/types/LocalizationKeys.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,4BAA4B,EAAE,MAAM,CAAC;IACrC,6BAA6B,EAAE,MAAM,CAAC;IACtC,2BAA2B,EAAE,MAAM,CAAC;IACpC,2BAA2B,EAAE,MAAM,CAAC;IACpC,gCAAgC,EAAE,MAAM,CAAC;IACzC,mCAAmC,EAAE,MAAM,CAAC;IAC5C,iCAAiC,EAAE,MAAM,CAAC;IAC1C,iCAAiC,EAAE,MAAM,CAAC;IAC1C,wCAAwC,EAAE,MAAM,CAAC;IACjD,wCAAwC,EAAE,MAAM,CAAC;IACjD,4CAA4C,EAAE,MAAM,CAAC;IACrD,yCAAyC,EAAE,MAAM,CAAC;IAClD,wCAAwC,EAAE,MAAM,CAAC;IACjD,+BAA+B,EAAE,MAAM,CAAC;IACxC,6BAA6B,EAAE,MAAM,CAAC;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wBAAwB,EAAE,MAAM,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gCAAgC,EAAE,MAAM,CAAC;IACzC,sCAAsC,EAA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AAM,CAAC;IACjD,+BAA+B,EAAE,MAAM,CAAC;IACxC,6BAA6B,EAAE,MAAM,CAAC;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wBAAwB,EAAE,MAAM,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gCAAgC,EAAE,MAAM,CAAC;IACzC,sCAAsC,EAAE,MAAM,CAAC;IAC/C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2BAA2B,EAAE,MAAM,CAAC;IACpC,gCAAgC,EAAE,MAAM,CAAC;IACzC,4BAA4B,EAAE,MAAM,CAAC;IACrC,iCAAiC,EAAE,MAAM,CAAC;IAC1C,4BAA4B,EAAE,MAAM,CAAC;IACrC,iCAAiC,EAAE,MAAM,CAAC;IAC1C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,2BAA2B,EAAE,MAAM,CAAC;IACpC,iCAAiC,EAAE,MAAM,CAAC;IAC1C,4BAA4B,EAAE,MAAM,CAAC;IACrC,kCAAkC,EAAE,MAAM,CAAC;IAC3C,qCAAqC,EAAE,MAAM,CAAC;CAC/C,CAAC"}
@@ -1,2 +1,3 @@
1
+ export declare const getDateKey: (date?: Date | null) => string;
1
2
  export declare const formatDate: (language: string, date?: Date | null) => string;
2
3
  //# sourceMappingURL=formatDate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatDate.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatDate.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,aAAc,MAAM,SAAS,IAAI,GAAG,IAAI,KAAG,MAYjE,CAAC"}
1
+ {"version":3,"file":"formatDate.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatDate.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,UAAW,IAAI,GAAG,IAAI,KAAG,MAU/C,CAAC;AAKF,eAAO,MAAM,UAAU,aAAc,MAAM,SAAS,IAAI,GAAG,IAAI,KAAG,MA0BjE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { StateStorage } from 'zustand/middleware';
2
+ export declare const mmkvStorage: StateStorage;
3
+ //# sourceMappingURL=mmkvStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mmkvStorage.d.ts","sourceRoot":"","sources":["../../../../src/utils/mmkvStorage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,eAAO,MAAM,WAAW,EAAE,YAWzB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.12.15";
1
+ export declare const VERSION = "0.13.1";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@developer_tribe/react-native-comnyx",
3
- "version": "0.12.15",
3
+ "version": "0.13.1",
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.ts",
6
6
  "main": "./src/index.ts",
@@ -26,6 +26,9 @@
26
26
  "cpp",
27
27
  "*.podspec",
28
28
  "react-native.config.js",
29
+ "!node_modules",
30
+ "!example",
31
+ "!example820",
29
32
  "!server-scripts",
30
33
  "!ios/build",
31
34
  "!android/build",
@@ -68,7 +71,6 @@
68
71
  "devDependencies": {
69
72
  "@commitlint/config-conventional": "^19.6.0",
70
73
  "@evilmartians/lefthook": "^1.5.0",
71
- "@react-native-async-storage/async-storage": "^2.1.2",
72
74
  "@react-native-community/cli": "15.0.1",
73
75
  "@react-native/eslint-config": "^0.73.1",
74
76
  "@release-it/conventional-changelog": "^9.0.2",
@@ -83,10 +85,7 @@
83
85
  "eslint-plugin-prettier": "^5.0.1",
84
86
  "jest": "^29.7.0",
85
87
  "prettier": "^3.0.3",
86
- "react": "19.0.0",
87
- "react-native": "0.78.1",
88
88
  "react-native-builder-bob": "^0.33.1",
89
- "react-test-renderer": "^19.0.0",
90
89
  "release-it": "^17.10.0",
91
90
  "ts-jest": "^29.4.5",
92
91
  "ts-node": "^10.9.2",
@@ -95,12 +94,18 @@
95
94
  "zustand": "^5.0.3"
96
95
  },
97
96
  "resolutions": {
98
- "@types/react": "^18.2.44"
97
+ "@types/react": "^18.2.44",
98
+ "react": "19.1.1"
99
99
  },
100
100
  "peerDependencies": {
101
- "@react-native-async-storage/async-storage": ">=2.0.0",
102
- "react": "*",
103
- "react-native": "*"
101
+ "react": ">=19.0.0",
102
+ "react-native": ">=0.78.0",
103
+ "react-native-mmkv": ">=2.0.0"
104
+ },
105
+ "peerDependenciesMeta": {
106
+ "react-native-mmkv": {
107
+ "optional": true
108
+ }
104
109
  },
105
110
  "jest": {
106
111
  "preset": "react-native",
@@ -144,6 +149,7 @@
144
149
  ],
145
150
  "rules": {
146
151
  "react/react-in-jsx-scope": "off",
152
+ "react-native/no-inline-styles": "off",
147
153
  "prettier/prettier": [
148
154
  "error",
149
155
  {
@@ -195,7 +201,10 @@
195
201
  "node": ">=18.0.0"
196
202
  },
197
203
  "dependencies": {
198
- "react-hook-form": "^7.55.0"
204
+ "react-hook-form": "^7.55.0",
205
+ "react-native": "^0.82.1",
206
+ "react-native-mmkv": "^3.1.0",
207
+ "react-native-safe-area-context": "^5.5.2"
199
208
  },
200
209
  "packageManager": "yarn@1.22.19"
201
210
  }
@@ -11,7 +11,9 @@ import {
11
11
  KeyboardAvoidingView,
12
12
  Platform,
13
13
  Animated,
14
+ type SectionListData,
14
15
  } from 'react-native';
16
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
15
17
  import { getCustomerConversation, sendCustomerMessage } from '../api';
16
18
  import type { AppConversationMessage } from '../types/Conversation';
17
19
  import { MessageItem } from './MessageItem';
@@ -23,7 +25,7 @@ import { EmptyList } from './EmptyList';
23
25
  import CustomPopup from './CustomAlert';
24
26
  import type { LocalizationKeys } from '../types/LocalizationKeys';
25
27
  import { ScaledSheet } from './ScaledSheet';
26
- import { formatDate } from '../utils/formatDate';
28
+ import { formatDate, getDateKey } from '../utils/formatDate';
27
29
  import { activeOpacity } from '../constants/activeOpacity';
28
30
  import { useAppStore } from '../store/store';
29
31
 
@@ -108,6 +110,7 @@ export function ChatList({
108
110
  }) {
109
111
  const themeColors = useThemeColors();
110
112
  const { height: windowHeight } = useWindowDimensions();
113
+ const insets = useSafeAreaInsets();
111
114
  const MESSAGE_MIN_HEIGHT = 60;
112
115
  const FLATLIST_PADDING = 20;
113
116
  const MESSAGES_PER_PAGE = Math.ceil(
@@ -129,15 +132,11 @@ export function ChatList({
129
132
  const nextPageStatus = useRef<'fail' | 'loading' | 'empty'>();
130
133
  const [nexPageFailed, setNexPageFailed] = useState(false);
131
134
  const [initFailed, setInitFailed] = useState(false);
132
- const [isScrollingUp, setIsScrollingUp] = useState(false);
135
+ const [showScrollDownButton, setShowScrollDownButton] = useState(false);
133
136
  const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
134
137
  const listChangedRef = useRef(false);
135
138
  const [popupVisible, setPopupVisible] = useState(false);
136
139
  const [selectedMessage, setSelectedMessage] = useState<string>('');
137
- const [currentSection, setCurrentSection] = useState<string>('');
138
- const lastSectionChangeTime = useRef<number>(0);
139
- const pendingSectionRef = useRef<string | null>(null);
140
- const MIN_SECTION_CHANGE_INTERVAL = 150;
141
140
 
142
141
  const sections = useMemo(() => {
143
142
  if (!data || data.length === 0) return [];
@@ -152,54 +151,78 @@ export function ChatList({
152
151
  return message;
153
152
  });
154
153
 
155
- const messagesByDate: Record<string, AppConversationMessage[]> = {};
154
+ type GroupedMessages = {
155
+ label: string;
156
+ timestamp: number;
157
+ messages: AppConversationMessage[];
158
+ };
159
+
160
+ const messagesByDate: Record<string, GroupedMessages> = {};
156
161
 
157
162
  validData.forEach((message: AppConversationMessage) => {
158
- const dateKey = formatDate(language, message.created_at);
163
+ if (!message.created_at) {
164
+ return;
165
+ }
166
+
167
+ const createdAt =
168
+ message.created_at instanceof Date
169
+ ? message.created_at
170
+ : new Date(message.created_at);
171
+
172
+ const dateKey = getDateKey(createdAt);
173
+ if (!dateKey) {
174
+ return;
175
+ }
176
+
177
+ const dayStart = new Date(
178
+ createdAt.getFullYear(),
179
+ createdAt.getMonth(),
180
+ createdAt.getDate()
181
+ ).getTime();
182
+
159
183
  if (!messagesByDate[dateKey]) {
160
- messagesByDate[dateKey] = [];
184
+ messagesByDate[dateKey] = {
185
+ label: formatDate(language, createdAt),
186
+ timestamp: dayStart,
187
+ messages: [],
188
+ };
161
189
  }
162
- // @ts-ignore
163
- messagesByDate[dateKey].push(message);
164
- });
165
190
 
166
- // Check if there are any messages before accessing firstKey
167
- const dateKeys = Object.keys(messagesByDate);
168
- if (dateKeys.length === 0) return [];
191
+ messagesByDate[dateKey].messages.push(message);
192
+ });
169
193
 
170
- return Object.entries(messagesByDate).map(([title, messages]) => ({
171
- title,
172
- data: messages.sort((a, b) => {
173
- try {
174
- if (!a.created_at) {
175
- return 0;
176
- }
177
- if (!b.created_at) {
178
- return 0;
179
- }
194
+ return Object.values(messagesByDate)
195
+ .sort((a, b) => b.timestamp - a.timestamp)
196
+ .map(({ label, messages }) => ({
197
+ title: label,
198
+ data: messages.sort((a, b) => {
199
+ try {
200
+ if (!a.created_at || !b.created_at) {
201
+ return 0;
202
+ }
180
203
 
181
- const dateA =
182
- a.created_at instanceof Date
183
- ? a.created_at
184
- : new Date(a.created_at);
185
- const dateB =
186
- b.created_at instanceof Date
187
- ? b.created_at
188
- : new Date(b.created_at);
204
+ const dateA =
205
+ a.created_at instanceof Date
206
+ ? a.created_at
207
+ : new Date(a.created_at);
208
+ const dateB =
209
+ b.created_at instanceof Date
210
+ ? b.created_at
211
+ : new Date(b.created_at);
212
+
213
+ if (typeof dateA.getTime !== 'function') {
214
+ return 0;
215
+ }
216
+ if (typeof dateB.getTime !== 'function') {
217
+ return 0;
218
+ }
189
219
 
190
- if (typeof dateA.getTime !== 'function') {
220
+ return dateB.getTime() - dateA.getTime();
221
+ } catch (error) {
191
222
  return 0;
192
223
  }
193
- if (typeof dateB.getTime !== 'function') {
194
- return 0;
195
- }
196
-
197
- return dateB.getTime() - dateA.getTime();
198
- } catch (error) {
199
- return 0;
200
- }
201
- }),
202
- }));
224
+ }),
225
+ }));
203
226
  }, [data, language]);
204
227
 
205
228
  const resendMessage = useCallback(() => {
@@ -371,39 +394,30 @@ export function ChatList({
371
394
  []
372
395
  );
373
396
 
374
- const updateSectionSafely = useCallback(
375
- (newSection: string) => {
376
- const now = Date.now();
377
- const timeSinceLastChange = now - lastSectionChangeTime.current;
378
-
379
- // If this is a different section than current and pending
380
- if (
381
- newSection !== currentSection &&
382
- newSection !== pendingSectionRef.current
383
- ) {
384
- // If we recently changed the section, queue this change
385
- if (timeSinceLastChange < MIN_SECTION_CHANGE_INTERVAL) {
386
- // Store the pending section
387
- pendingSectionRef.current = newSection;
388
-
389
- // Schedule an update after the minimum interval has passed
390
- setTimeout(() => {
391
- // Only update if pending section hasn't changed again
392
- if (pendingSectionRef.current === newSection) {
393
- setCurrentSection(newSection);
394
- lastSectionChangeTime.current = Date.now();
395
- pendingSectionRef.current = null;
396
- }
397
- }, MIN_SECTION_CHANGE_INTERVAL - timeSinceLastChange);
398
- } else {
399
- // Enough time has passed, update immediately
400
- setCurrentSection(newSection);
401
- lastSectionChangeTime.current = now;
402
- pendingSectionRef.current = null;
403
- }
404
- }
397
+ const renderSectionFooter = useCallback(
398
+ ({
399
+ section,
400
+ }: {
401
+ section: SectionListData<AppConversationMessage, any>;
402
+ }) => {
403
+ const title = (section as any).title;
404
+ return (
405
+ <View style={styles.sectionHeaderContainer}>
406
+ <AppText
407
+ style={[
408
+ styles.sectionHeader,
409
+ {
410
+ color: themeColors.slate,
411
+ backgroundColor: themeColors.ghost,
412
+ },
413
+ ]}
414
+ >
415
+ {title}
416
+ </AppText>
417
+ </View>
418
+ );
405
419
  },
406
- [currentSection]
420
+ [themeColors]
407
421
  );
408
422
 
409
423
  const handleScroll = useCallback(
@@ -412,67 +426,14 @@ export function ChatList({
412
426
  const contentHeight = event.nativeEvent.contentSize.height;
413
427
  const scrollViewHeight = event.nativeEvent.layoutMeasurement.height;
414
428
 
415
- setIsScrollingUp(currentScrollY > 300);
416
-
417
- // Determine the section at the bottom of the window based on scroll position
418
- if (sections && sections.length > 0) {
419
- let accumulatedHeight = 0;
420
- let lastVisibleSection = null;
421
-
422
- // Check all sections
423
- for (let i = 0; i < sections.length; i++) {
424
- const section = sections[i];
425
- if (!section || !section.data) continue;
426
-
427
- // Calculate section height
428
- const sectionHeight = section.data.length * (MESSAGE_MIN_HEIGHT + 10);
429
-
430
- // Section positions
431
- const sectionStart = accumulatedHeight;
432
- const sectionEnd = sectionStart + sectionHeight;
433
-
434
- // Visible area
435
- const visibleTop = currentScrollY;
436
- const visibleBottom = visibleTop + scrollViewHeight;
437
-
438
- // Find the section visible at the bottom of the screen
439
- const isSectionVisibleAtBottom =
440
- (visibleBottom >= sectionStart && visibleBottom <= sectionEnd) ||
441
- (sectionStart <= visibleTop && sectionEnd >= visibleBottom);
442
-
443
- if (isSectionVisibleAtBottom) {
444
- lastVisibleSection = section;
445
- }
446
-
447
- accumulatedHeight += sectionHeight;
448
- }
449
-
450
- // Display the found section using our safe updater
451
- if (
452
- lastVisibleSection?.title &&
453
- lastVisibleSection.title !== currentSection
454
- ) {
455
- updateSectionSafely(lastVisibleSection.title);
456
- } else if (
457
- !lastVisibleSection &&
458
- currentScrollY <= 10 &&
459
- sections[0]?.title
460
- ) {
461
- updateSectionSafely(sections[0].title);
462
- }
463
- }
429
+ const shouldShowScrollButton = currentScrollY > 300;
430
+ setShowScrollDownButton(shouldShowScrollButton);
464
431
 
465
432
  if (currentScrollY >= contentHeight - scrollViewHeight - 200) {
466
433
  nextPage();
467
434
  }
468
435
  },
469
- [
470
- nextPage,
471
- sections,
472
- currentSection,
473
- MESSAGE_MIN_HEIGHT,
474
- updateSectionSafely,
475
- ]
436
+ [nextPage]
476
437
  );
477
438
 
478
439
  const scrollToBottom = useCallback(
@@ -542,13 +503,6 @@ export function ChatList({
542
503
  }
543
504
  }, [MESSAGES_PER_PAGE, customer?.external_id, initFailed, setData]);
544
505
 
545
- // Initialize the current section when sections are loaded
546
- useEffect(() => {
547
- if (sections.length > 0 && sections[0]?.title) {
548
- setCurrentSection(sections[0].title);
549
- }
550
- }, [sections]);
551
-
552
506
  // Add keyboard listeners
553
507
  useEffect(() => {
554
508
  const keyboardDidShowListener = Keyboard.addListener(
@@ -571,13 +525,6 @@ export function ChatList({
571
525
  };
572
526
  }, []);
573
527
 
574
- // Clear pending updates on unmount
575
- useEffect(() => {
576
- return () => {
577
- pendingSectionRef.current = null;
578
- };
579
- }, []);
580
-
581
528
  if (nexPageFailed) {
582
529
  return (
583
530
  <View
@@ -623,11 +570,14 @@ export function ChatList({
623
570
  <View
624
571
  style={[
625
572
  styles.container,
626
- { backgroundColor: themeColors.background },
573
+ {
574
+ backgroundColor: themeColors.background,
575
+ paddingTop: insets.top || 40,
576
+ },
627
577
  ]}
628
578
  >
629
579
  <TouchableOpacity
630
- style={[styles.iconContainer]}
580
+ style={[styles.iconContainer, { top: insets.top || 40 }]}
631
581
  onPress={onBack}
632
582
  activeOpacity={activeOpacity}
633
583
  >
@@ -671,23 +621,12 @@ export function ChatList({
671
621
  </View>
672
622
 
673
623
  <View style={styles.listContainer}>
674
- <AppText
675
- style={[
676
- styles.dateText,
677
- {
678
- color: themeColors.slate,
679
- backgroundColor: themeColors.ghost,
680
- },
681
- ]}
682
- >
683
- {currentSection}
684
- </AppText>
685
-
686
624
  <SectionList
687
625
  ref={ref}
688
626
  sections={sections}
689
627
  inverted
690
628
  renderItem={renderItem}
629
+ renderSectionFooter={renderSectionFooter}
691
630
  contentContainerStyle={[
692
631
  styles.contentContainer,
693
632
  { backgroundColor: themeColors.background },
@@ -717,7 +656,7 @@ export function ChatList({
717
656
  showsVerticalScrollIndicator={false}
718
657
  />
719
658
  </View>
720
- {isScrollingUp && (
659
+ {showScrollDownButton && (
721
660
  <TouchableOpacity
722
661
  activeOpacity={activeOpacity}
723
662
  style={[
@@ -762,7 +701,6 @@ const styles = ScaledSheet.create({
762
701
  container: {
763
702
  flex: 1,
764
703
  paddingBottom: '20@vs',
765
- paddingTop: '40@vs',
766
704
  position: 'relative',
767
705
  },
768
706
  list: {
@@ -841,7 +779,7 @@ const styles = ScaledSheet.create({
841
779
  },
842
780
  iconContainer: {
843
781
  paddingHorizontal: '20@s',
844
- paddingVertical: '40@vs',
782
+ paddingVertical: '10@vs',
845
783
  position: 'absolute',
846
784
  zIndex: 9999,
847
785
  },
@@ -868,17 +806,6 @@ const styles = ScaledSheet.create({
868
806
  alignSelf: 'center',
869
807
  marginVertical: '8@vs',
870
808
  },
871
- dateText: {
872
- fontSize: '14@vs',
873
- fontWeight: '500',
874
- borderRadius: '12@s',
875
- paddingHorizontal: '8@s',
876
- paddingVertical: '2@s',
877
- position: 'absolute',
878
- top: '10@vs',
879
- zIndex: 10,
880
- alignSelf: 'center',
881
- },
882
809
  listContainer: {
883
810
  flex: 1,
884
811
  position: 'relative',