@developer_tribe/react-native-comnyx 0.6.2 → 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.
- package/Comnyx.podspec +1 -1
- package/README.md +192 -16
- package/android/build.gradle +13 -1
- package/android/generated/RCTAppDependencyProvider.h +25 -0
- package/android/generated/RCTAppDependencyProvider.mm +55 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/android/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/android/generated/ReactAppDependencyProvider.podspec +34 -0
- package/android/generated/jni/RNComnyxSpec-generated.cpp +1 -11
- package/android/generated/jni/RNComnyxSpec.h +0 -7
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +0 -11
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +0 -52
- package/android/src/main/AndroidManifestNew.xml +10 -0
- package/android/src/main/java/com/comnyx/ComnyxModule.kt +107 -5
- package/android/src/main/java/com/comnyx/ComnyxPackage.kt +10 -6
- package/android/src/main/java/com/comnyx/src/messaging/ComnyxMessaging.kt +45 -0
- package/android/src/main/java/com/comnyx/src/messaging/firebase/FCM.kt +38 -0
- package/android/src/main/java/com/comnyx/src/messaging/firebase/FirebaseMessagingService.kt +45 -0
- package/android/src/main/java/com/comnyx/src/messaging/notifications/NotificationsService.kt +82 -0
- package/android/src/main/java/com/comnyx/src/messaging/permissions/Permissions.kt +64 -0
- package/ios/APNService.swift +74 -0
- package/ios/Comnyx-Bridging-Header.h +17 -0
- package/ios/Comnyx.m +15 -0
- package/ios/Comnyx.swift +77 -0
- package/ios/ComnyxMessaging.swift +84 -0
- package/ios/PushService.swift +7 -0
- package/lib/commonjs/NativeComnyx.js +9 -0
- package/lib/commonjs/NativeComnyx.js.map +1 -0
- package/lib/commonjs/api/api.js +14 -4
- package/lib/commonjs/api/api.js.map +1 -1
- package/lib/commonjs/api/customers.js +3 -8
- package/lib/commonjs/api/customers.js.map +1 -1
- package/lib/commonjs/api/index.js +1 -1
- package/lib/commonjs/components/AppText.js +1 -1
- package/lib/commonjs/components/AppText.js.map +1 -1
- package/lib/commonjs/components/ChatList.js +1 -1
- package/lib/commonjs/components/ChatList.js.map +1 -1
- package/lib/commonjs/components/CustomerForm.js +2 -4
- package/lib/commonjs/components/CustomerForm.js.map +1 -1
- package/lib/commonjs/components/MessageInput.js +1 -1
- package/lib/commonjs/components/MessageInput.js.map +1 -1
- package/lib/commonjs/constants/viewabilityConfig.js.map +1 -0
- package/lib/commonjs/hooks/isRtl.js +1 -1
- package/lib/commonjs/hooks/useLocalize.js +1 -1
- package/lib/commonjs/hooks/useLocalize.js.map +1 -1
- package/lib/commonjs/hooks/usePolling.js +1 -1
- package/lib/commonjs/hooks/usePolling.js.map +1 -1
- package/lib/commonjs/hooks/useTheme.js +1 -1
- package/lib/commonjs/hooks/useTheme.js.map +1 -1
- package/lib/commonjs/index.js +9 -16
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/index.js +21 -0
- package/lib/commonjs/notifications/index.js.map +1 -0
- package/lib/commonjs/{Accumulator.js → register/Accumulator.js} +8 -1
- package/lib/commonjs/register/Accumulator.js.map +1 -0
- package/lib/commonjs/{collectData.js → register/collectData.js} +2 -0
- package/lib/commonjs/register/collectData.js.map +1 -0
- package/lib/commonjs/register/index.js +17 -0
- package/lib/commonjs/register/index.js.map +1 -0
- package/lib/commonjs/register/init.js +14 -0
- package/lib/commonjs/register/init.js.map +1 -0
- package/lib/commonjs/register/login.js +24 -0
- package/lib/commonjs/register/login.js.map +1 -0
- package/lib/commonjs/register/logout.js +20 -0
- package/lib/commonjs/register/logout.js.map +1 -0
- package/lib/commonjs/{store.js → store/store.js} +3 -2
- package/lib/commonjs/store/store.js.map +1 -0
- package/lib/commonjs/{App.js → support/ComnyxSupport.js} +39 -14
- package/lib/commonjs/support/ComnyxSupport.js.map +1 -0
- package/lib/commonjs/support/index.js +13 -0
- package/lib/commonjs/support/index.js.map +1 -0
- package/lib/commonjs/utils/scalingUtils.js +1 -1
- package/lib/module/NativeComnyx.js +5 -0
- package/lib/module/NativeComnyx.js.map +1 -0
- package/lib/module/api/api.js +11 -4
- package/lib/module/api/api.js.map +1 -1
- package/lib/module/api/customers.js +3 -7
- package/lib/module/api/customers.js.map +1 -1
- package/lib/module/api/index.js +1 -1
- package/lib/module/api/index.js.map +1 -1
- package/lib/module/components/AppText.js +1 -1
- package/lib/module/components/AppText.js.map +1 -1
- package/lib/module/components/ChatList.js +1 -1
- package/lib/module/components/ChatList.js.map +1 -1
- package/lib/module/components/CustomerForm.js +2 -4
- package/lib/module/components/CustomerForm.js.map +1 -1
- package/lib/module/components/MessageInput.js +1 -1
- package/lib/module/components/MessageInput.js.map +1 -1
- package/lib/module/constants/viewabilityConfig.js.map +1 -0
- package/lib/module/hooks/isRtl.js +1 -1
- package/lib/module/hooks/isRtl.js.map +1 -1
- package/lib/module/hooks/useLocalize.js +1 -1
- package/lib/module/hooks/useLocalize.js.map +1 -1
- package/lib/module/hooks/usePolling.js +1 -1
- package/lib/module/hooks/usePolling.js.map +1 -1
- package/lib/module/hooks/useTheme.js +1 -1
- package/lib/module/hooks/useTheme.js.map +1 -1
- package/lib/module/index.js +8 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/index.js +19 -0
- package/lib/module/notifications/index.js.map +1 -0
- package/lib/module/{Accumulator.js → register/Accumulator.js} +7 -1
- package/lib/module/register/Accumulator.js.map +1 -0
- package/lib/module/{collectData.js → register/collectData.js} +2 -0
- package/lib/module/register/collectData.js.map +1 -0
- package/lib/module/register/index.js +13 -0
- package/lib/module/register/index.js.map +1 -0
- package/lib/module/register/init.js +10 -0
- package/lib/module/register/init.js.map +1 -0
- package/lib/module/register/login.js +20 -0
- package/lib/module/register/login.js.map +1 -0
- package/lib/module/register/logout.js +16 -0
- package/lib/module/register/logout.js.map +1 -0
- package/lib/module/{store.js → store/store.js} +2 -2
- package/lib/module/store/store.js.map +1 -0
- package/lib/module/{App.js → support/ComnyxSupport.js} +40 -15
- package/lib/module/support/ComnyxSupport.js.map +1 -0
- package/lib/module/support/index.js +4 -0
- package/lib/module/support/index.js.map +1 -0
- package/lib/module/utils/scalingUtils.js +1 -1
- package/lib/module/utils/scalingUtils.js.map +1 -1
- package/lib/typescript/jest.config.d.ts +4 -0
- package/lib/typescript/jest.config.d.ts.map +1 -0
- package/lib/typescript/setup-jest.d.ts +1 -0
- package/lib/typescript/setup-jest.d.ts.map +1 -0
- package/lib/typescript/src/NativeComnyx.d.ts +7 -0
- package/lib/typescript/src/NativeComnyx.d.ts.map +1 -0
- package/lib/typescript/src/api/api.d.ts +7 -0
- package/lib/typescript/src/api/api.d.ts.map +1 -0
- package/lib/typescript/src/api/conversations.d.ts.map +1 -0
- package/lib/typescript/src/api/customers.d.ts +5 -0
- package/lib/typescript/src/api/customers.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/api/index.d.ts +1 -1
- package/lib/typescript/src/api/index.d.ts.map +1 -0
- package/lib/typescript/src/api/messages.d.ts.map +1 -0
- package/lib/typescript/src/components/AppText.d.ts.map +1 -0
- package/lib/typescript/src/components/ChatList.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomAlert.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomerForm.d.ts.map +1 -0
- package/lib/typescript/src/components/EmptyList.d.ts.map +1 -0
- package/lib/typescript/src/components/InitFailed.d.ts.map +1 -0
- package/lib/typescript/src/components/MessageInput.d.ts.map +1 -0
- package/lib/typescript/src/components/MessageItem.d.ts.map +1 -0
- package/lib/typescript/src/components/ScaledSheet.d.ts.map +1 -0
- package/lib/typescript/src/constants/activeOpacity.d.ts.map +1 -0
- package/lib/typescript/src/constants/countries.d.ts.map +1 -0
- package/lib/typescript/src/constants/rtl.d.ts.map +1 -0
- package/lib/typescript/src/constants/translations.d.ts.map +1 -0
- package/lib/typescript/src/constants/viewabilityConfig.d.ts.map +1 -0
- package/lib/typescript/src/data/fake/conversations.d.ts.map +1 -0
- package/lib/typescript/src/data/fake/customers.d.ts.map +1 -0
- package/lib/typescript/src/data/fake/messages.d.ts.map +1 -0
- package/lib/typescript/src/hooks/isRtl.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useLocalize.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePolling.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/notifications/index.d.ts +21 -0
- package/lib/typescript/src/notifications/index.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src/register}/Accumulator.d.ts +4 -3
- package/lib/typescript/src/register/Accumulator.d.ts.map +1 -0
- package/lib/typescript/src/register/collectData.d.ts.map +1 -0
- package/lib/typescript/src/register/index.d.ts +11 -0
- package/lib/typescript/src/register/index.d.ts.map +1 -0
- package/lib/typescript/src/register/init.d.ts +6 -0
- package/lib/typescript/src/register/init.d.ts.map +1 -0
- package/lib/typescript/src/register/login.d.ts +6 -0
- package/lib/typescript/src/register/login.d.ts.map +1 -0
- package/lib/typescript/src/register/logout.d.ts +2 -0
- package/lib/typescript/src/register/logout.d.ts.map +1 -0
- package/lib/typescript/{module/src → src/store}/store.d.ts +6 -4
- package/lib/typescript/src/store/store.d.ts.map +1 -0
- package/lib/typescript/src/support/ComnyxSupport.d.ts +12 -0
- package/lib/typescript/src/support/ComnyxSupport.d.ts.map +1 -0
- package/lib/typescript/src/support/index.d.ts +2 -0
- package/lib/typescript/src/support/index.d.ts.map +1 -0
- package/lib/typescript/src/types/ApiOptions.d.ts.map +1 -0
- package/lib/typescript/src/types/Conversation.d.ts.map +1 -0
- package/lib/typescript/src/types/Customer.d.ts.map +1 -0
- package/lib/typescript/src/types/GlobalTheme.d.ts.map +1 -0
- package/lib/typescript/src/types/Language.d.ts.map +1 -0
- package/lib/typescript/src/types/LocalizationKeys.d.ts.map +1 -0
- package/lib/typescript/src/types/MessageResponse.d.ts.map +1 -0
- package/lib/typescript/src/types/Theme.d.ts.map +1 -0
- package/lib/typescript/src/utils/date.d.ts.map +1 -0
- package/lib/typescript/src/utils/deepMap.d.ts.map +1 -0
- package/lib/typescript/src/utils/formatDate.d.ts.map +1 -0
- package/lib/typescript/src/utils/scalingUtils.d.ts.map +1 -0
- package/package.json +13 -27
- package/src/NativeComnyx.ts +6 -5
- package/src/api/api.ts +14 -4
- package/src/api/customers.ts +3 -8
- package/src/api/index.ts +1 -1
- package/src/components/AppText.tsx +1 -1
- package/src/components/ChatList.tsx +1 -1
- package/src/components/CustomerForm.tsx +2 -3
- package/src/components/MessageInput.tsx +1 -1
- package/src/hooks/isRtl.ts +1 -1
- package/src/hooks/useLocalize.ts +1 -1
- package/src/hooks/usePolling.ts +1 -1
- package/src/hooks/useTheme.ts +1 -1
- package/src/index.ts +8 -0
- package/src/notifications/index.ts +49 -0
- package/src/{Accumulator.ts → register/Accumulator.ts} +10 -2
- package/src/{collectData.ts → register/collectData.ts} +1 -0
- package/src/register/index.ts +11 -0
- package/src/register/init.ts +16 -0
- package/src/register/login.ts +23 -0
- package/src/register/logout.ts +14 -0
- package/src/{store.ts → store/store.ts} +7 -7
- package/src/{App.tsx → support/ComnyxSupport.tsx} +41 -14
- package/src/support/index.ts +1 -0
- package/src/utils/scalingUtils.ts +1 -1
- package/android/generated/java/com/comnyx/NativeComnyxSpec.java +0 -37
- package/ios/Comnyx.h +0 -6
- package/ios/Comnyx.mm +0 -18
- package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +0 -39
- package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +0 -63
- package/ios/generated/RNComnyxSpecJSI-generated.cpp +0 -28
- package/ios/generated/RNComnyxSpecJSI.h +0 -71
- package/lib/commonjs/Accumulator.js.map +0 -1
- package/lib/commonjs/App.js.map +0 -1
- package/lib/commonjs/NativeComnyx.ts +0 -8
- package/lib/commonjs/__dev__.js +0 -29
- package/lib/commonjs/__dev__.js.map +0 -1
- package/lib/commonjs/collectData.js.map +0 -1
- package/lib/commonjs/components/SizeMatter.js +0 -27
- package/lib/commonjs/components/SizeMatter.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/commonjs/register.js +0 -26
- package/lib/commonjs/register.js.map +0 -1
- package/lib/commonjs/store.js.map +0 -1
- package/lib/commonjs/viewabilityConfig.js.map +0 -1
- package/lib/module/Accumulator.js.map +0 -1
- package/lib/module/App.js.map +0 -1
- package/lib/module/NativeComnyx.ts +0 -8
- package/lib/module/__dev__.js +0 -29
- package/lib/module/__dev__.js.map +0 -1
- package/lib/module/collectData.js.map +0 -1
- package/lib/module/components/SizeMatter.js +0 -23
- package/lib/module/components/SizeMatter.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/register.js +0 -22
- package/lib/module/register.js.map +0 -1
- package/lib/module/store.js.map +0 -1
- package/lib/module/viewabilityConfig.js.map +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/Accumulator.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/App.d.ts +0 -12
- package/lib/typescript/commonjs/src/App.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/NativeComnyx.d.ts +0 -7
- package/lib/typescript/commonjs/src/NativeComnyx.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/__dev__.d.ts +0 -2
- package/lib/typescript/commonjs/src/__dev__.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/api.d.ts +0 -4
- package/lib/typescript/commonjs/src/api/api.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/conversations.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/customers.d.ts +0 -6
- package/lib/typescript/commonjs/src/api/customers.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/api/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/collectData.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/AppText.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/ChatList.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/CustomAlert.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/CustomerForm.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/EmptyList.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/InitFailed.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/MessageInput.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/MessageItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/ScaledSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/SizeMatter.d.ts +0 -7
- package/lib/typescript/commonjs/src/components/SizeMatter.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/activeOpacity.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/countries.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/rtl.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/constants/translations.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/data/fake/conversations.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/data/fake/customers.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/data/fake/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/isRtl.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useLocalize.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/usePolling.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useTheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -7
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/register.d.ts +0 -6
- package/lib/typescript/commonjs/src/register.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/store.d.ts +0 -40
- package/lib/typescript/commonjs/src/store.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/ApiOptions.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Conversation.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Customer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/GlobalTheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Language.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/LocalizationKeys.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/MessageResponse.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/Theme.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/date.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/deepMap.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/formatDate.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/utils/scalingUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/viewabilityConfig.d.ts.map +0 -1
- package/lib/typescript/module/package.json +0 -1
- package/lib/typescript/module/src/Accumulator.d.ts +0 -18
- package/lib/typescript/module/src/Accumulator.d.ts.map +0 -1
- package/lib/typescript/module/src/App.d.ts +0 -12
- package/lib/typescript/module/src/App.d.ts.map +0 -1
- package/lib/typescript/module/src/NativeComnyx.d.ts +0 -7
- package/lib/typescript/module/src/NativeComnyx.d.ts.map +0 -1
- package/lib/typescript/module/src/__dev__.d.ts +0 -2
- package/lib/typescript/module/src/__dev__.d.ts.map +0 -1
- package/lib/typescript/module/src/api/api.d.ts +0 -4
- package/lib/typescript/module/src/api/api.d.ts.map +0 -1
- package/lib/typescript/module/src/api/conversations.d.ts +0 -7
- package/lib/typescript/module/src/api/conversations.d.ts.map +0 -1
- package/lib/typescript/module/src/api/customers.d.ts +0 -6
- package/lib/typescript/module/src/api/customers.d.ts.map +0 -1
- package/lib/typescript/module/src/api/index.d.ts +0 -4
- package/lib/typescript/module/src/api/index.d.ts.map +0 -1
- package/lib/typescript/module/src/api/messages.d.ts +0 -4
- package/lib/typescript/module/src/api/messages.d.ts.map +0 -1
- package/lib/typescript/module/src/collectData.d.ts +0 -3
- package/lib/typescript/module/src/collectData.d.ts.map +0 -1
- package/lib/typescript/module/src/components/AppText.d.ts +0 -14
- package/lib/typescript/module/src/components/AppText.d.ts.map +0 -1
- package/lib/typescript/module/src/components/ChatList.d.ts +0 -4
- package/lib/typescript/module/src/components/ChatList.d.ts.map +0 -1
- package/lib/typescript/module/src/components/CustomAlert.d.ts +0 -15
- package/lib/typescript/module/src/components/CustomAlert.d.ts.map +0 -1
- package/lib/typescript/module/src/components/CustomerForm.d.ts +0 -4
- package/lib/typescript/module/src/components/CustomerForm.d.ts.map +0 -1
- package/lib/typescript/module/src/components/EmptyList.d.ts +0 -2
- package/lib/typescript/module/src/components/EmptyList.d.ts.map +0 -1
- package/lib/typescript/module/src/components/InitFailed.d.ts +0 -6
- package/lib/typescript/module/src/components/InitFailed.d.ts.map +0 -1
- package/lib/typescript/module/src/components/MessageInput.d.ts +0 -5
- package/lib/typescript/module/src/components/MessageInput.d.ts.map +0 -1
- package/lib/typescript/module/src/components/MessageItem.d.ts +0 -6
- package/lib/typescript/module/src/components/MessageItem.d.ts.map +0 -1
- package/lib/typescript/module/src/components/ScaledSheet.d.ts +0 -2
- package/lib/typescript/module/src/components/ScaledSheet.d.ts.map +0 -1
- package/lib/typescript/module/src/components/SizeMatter.d.ts +0 -7
- package/lib/typescript/module/src/components/SizeMatter.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/activeOpacity.d.ts +0 -2
- package/lib/typescript/module/src/constants/activeOpacity.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/countries.d.ts +0 -7
- package/lib/typescript/module/src/constants/countries.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/rtl.d.ts +0 -2
- package/lib/typescript/module/src/constants/rtl.d.ts.map +0 -1
- package/lib/typescript/module/src/constants/translations.d.ts +0 -4
- package/lib/typescript/module/src/constants/translations.d.ts.map +0 -1
- package/lib/typescript/module/src/data/fake/conversations.d.ts +0 -5
- package/lib/typescript/module/src/data/fake/conversations.d.ts.map +0 -1
- package/lib/typescript/module/src/data/fake/customers.d.ts +0 -3
- package/lib/typescript/module/src/data/fake/customers.d.ts.map +0 -1
- package/lib/typescript/module/src/data/fake/messages.d.ts +0 -3
- package/lib/typescript/module/src/data/fake/messages.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/isRtl.d.ts +0 -2
- package/lib/typescript/module/src/hooks/isRtl.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useLocalize.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useLocalize.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/usePolling.d.ts +0 -2
- package/lib/typescript/module/src/hooks/usePolling.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useTheme.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useTheme.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useThemeColors.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -7
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/register.d.ts +0 -6
- package/lib/typescript/module/src/register.d.ts.map +0 -1
- package/lib/typescript/module/src/store.d.ts.map +0 -1
- package/lib/typescript/module/src/types/ApiOptions.d.ts +0 -4
- package/lib/typescript/module/src/types/ApiOptions.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Conversation.d.ts +0 -33
- package/lib/typescript/module/src/types/Conversation.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Customer.d.ts +0 -39
- package/lib/typescript/module/src/types/Customer.d.ts.map +0 -1
- package/lib/typescript/module/src/types/GlobalTheme.d.ts +0 -6
- package/lib/typescript/module/src/types/GlobalTheme.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Language.d.ts +0 -2
- package/lib/typescript/module/src/types/Language.d.ts.map +0 -1
- package/lib/typescript/module/src/types/LocalizationKeys.d.ts +0 -43
- package/lib/typescript/module/src/types/LocalizationKeys.d.ts.map +0 -1
- package/lib/typescript/module/src/types/MessageResponse.d.ts +0 -61
- package/lib/typescript/module/src/types/MessageResponse.d.ts.map +0 -1
- package/lib/typescript/module/src/types/Theme.d.ts +0 -28
- package/lib/typescript/module/src/types/Theme.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/date.d.ts +0 -7
- package/lib/typescript/module/src/utils/date.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/deepMap.d.ts +0 -7
- package/lib/typescript/module/src/utils/deepMap.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/formatDate.d.ts +0 -2
- package/lib/typescript/module/src/utils/formatDate.d.ts.map +0 -1
- package/lib/typescript/module/src/utils/scalingUtils.d.ts +0 -10
- package/lib/typescript/module/src/utils/scalingUtils.d.ts.map +0 -1
- package/lib/typescript/module/src/viewabilityConfig.d.ts +0 -5
- package/lib/typescript/module/src/viewabilityConfig.d.ts.map +0 -1
- package/src/__dev__.ts +0 -22
- package/src/components/SizeMatter.tsx +0 -22
- package/src/index.tsx +0 -9
- package/src/register.ts +0 -34
- /package/lib/commonjs/{viewabilityConfig.js → constants/viewabilityConfig.js} +0 -0
- /package/lib/module/{viewabilityConfig.js → constants/viewabilityConfig.js} +0 -0
- /package/lib/typescript/{commonjs/src → src}/api/conversations.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/api/messages.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/AppText.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/ChatList.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/CustomAlert.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/CustomerForm.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/EmptyList.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/InitFailed.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/MessageInput.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/MessageItem.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/components/ScaledSheet.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/activeOpacity.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/countries.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/rtl.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/constants/translations.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src/constants}/viewabilityConfig.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/data/fake/conversations.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/data/fake/customers.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/data/fake/messages.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/isRtl.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useLocalize.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/usePolling.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useTheme.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useThemeColors.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src/register}/collectData.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/ApiOptions.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Conversation.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Customer.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/GlobalTheme.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Language.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/LocalizationKeys.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/MessageResponse.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/Theme.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/date.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/deepMap.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/formatDate.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/utils/scalingUtils.d.ts +0 -0
- /package/src/{viewabilityConfig.ts → constants/viewabilityConfig.ts} +0 -0
package/lib/commonjs/index.js
CHANGED
|
@@ -6,25 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "Comnyx", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _index.Comnyx;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "ComnyxNotifications", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _index3.ComnyxNotifications;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "ComnyxSupport", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
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("./
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
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":["
|
|
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":";;;;;;AAEA,MAAMA,+BAA+B,GAAG,IAAI;AAErC,MAAMC,WAAW,CAAC;EACfC,YAAY,GAAiC,IAAI;EACjDC,aAAa,GAA+BC,SAAS;EACrDC,QAAQ,GACd,IAAI;EACEC,qBAAqB,GAAY,KAAK;EAC9CC,WAAWA,CAAA,EAAG,CAAC;EAEfC,QAAQA,CAACH,QAAwD,EAAE;IACjE,IAAI,CAACH,YAAY,GAAG;MAClBO,gBAAgB,EAAE,EAAE;MACpBC,qBAAqB,EAAE,CAAC;IAC1B,CAAC;IACD,IAAI,CAACL,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACM,QAAQ,CAAC,CAAC;EACjB;EAEAC,GAAGA,CAACC,IAAwD,EAAE;IAC5D,IAAI,CAAC,IAAI,CAACX,YAAY,EAAE;MACtB,MAAM,IAAIY,KAAK,CAAC,0BAA0B,CAAC;IAC7C;;IAEA;IACA,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAAiB,CAAC;;IAEjD;IACA,CAAC,IAAI,C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A,IAAI,CAACsB,KAAK,CAAC,CAAC;EACd;EAEAjB,QAAQA,CAAA,EAAG;IACT,IAAI,CAAC,IAAI,CAACT,YAAY,EAAE;MACtB,MAAM,IAAIY,KAAK,CAAC,0BAA0B,CAAC;IAC7C;IACA,IAAI,CAACc,KAAK,CAAC,CAAC;IACZ,IAAI,CAACzB,aAAa,GAAG0B,UAAU,CAAC,MAAM;MACpC,IAAI,IAAI,CAACxB,QAAQ,EAAE;QACjB,IAAI,CAACA,QAAQ,CAAC,IAAI,CAACH,YAAa,CAAC;QACjC,IAAI,CAACA,YAAY,GAAG;UAClB,GAAG,IAAI,CAACA,YAAa;UACrBO,gBAAgB,EAAE;QACpB,CAAC;QACD,IAAI,CAACH,qBAAqB,GAAG,IAAI;MACnC;IACF,CAAC,EAAEN,+BAA+B,CAAC;EACrC;EAEA4B,KAAKA,CAAA,EAAG;IACN,IAAI,IAAI,CAACzB,aAAa,EAAE;MACtB2B,YAAY,CAAC,IAAI,CAAC3B,aAAa,CAAC;IAClC;EACF;EAEA4B,KAAKA,CAAA,EAAG;IACN,IAAI,CAAC7B,YAAY,GAAG,IAAI;EAC1B;EAEA8B,KAAKA,CAAA,EAAG;IACN,IAAI,CAAC9B,YAAY,GAAG,CAAC,CAAC;EACxB;EAEA+B,GAAGA,CAAA,EAAG;IACJ,OAAO,IAAI,CAAC/B,YAAY;EAC1B;EAEAgC,oBAAoBA,CAAA,EAAG;IACrB,OAAO,IAAI,CAAC5B,qBAAqB;EACnC;AACF;AAAC6B,OAAA,CAAAlC,WAAA,GAAAA,WAAA;AAEM,MAAMmC,WAAW,GAAAD,OAAA,CAAAC,WAAA,GAAG,IAAInC,WAAW,CAAC,CAAC","ignoreList":[]}
|
|
@@ -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
|
|
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;EACf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,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.
|
|
6
|
+
exports.ComnyxSupport = ComnyxSupport;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var
|
|
9
|
-
var
|
|
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("
|
|
13
|
-
var _useThemeColors = require("
|
|
14
|
-
var _usePolling = require("
|
|
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
|
-
|
|
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.
|
|
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)(
|
|
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 =
|
|
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=
|
|
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":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAAwD,IAAAS,WAAA,GAAAT,OAAA;AACxD,MAAMU,SAAS,GAAGV,OAAO,CAAC,uBAAuB,CAAC;AAW3C,SAASW,aAAaA,CAAC;EAC5BC,QAAQ,GAAG,IAAI;EACfC,KAAK,GAAG,MAAM;EACdC,IAAI,GAAG,KAAK;EACZC,MAAM;EACNC;AACkB,CAAC,EAAE;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;IACToD,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","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 @@
|
|
|
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":[]}
|
package/lib/module/api/api.js
CHANGED
|
@@ -2,18 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
const axiosInstance = axios.create({
|
|
5
|
-
|
|
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
|
|
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;
|
|
15
|
-
axiosInstance.defaults.headers.common['external-id'] = externalId;
|
|
16
17
|
axiosInstance.defaults.baseURL = baseURL || axiosInstance.defaults.baseURL;
|
|
17
18
|
}
|
|
19
|
+
export function setLoginForAxios(externalId) {
|
|
20
|
+
axiosInstance.defaults.headers.common['external-id'] = externalId;
|
|
21
|
+
}
|
|
22
|
+
export function setLogoutForAxios() {
|
|
23
|
+
axiosInstance.defaults.headers.common['external-id'] = null;
|
|
24
|
+
}
|
|
18
25
|
export { axiosInstance };
|
|
19
26
|
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axios","axiosInstance","create","baseURL","headers","timeout","
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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":["
|
|
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":[]}
|
package/lib/module/api/index.js
CHANGED
|
@@ -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;
|
|
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","
|
|
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');
|