agora-appbuilder-core 3.0.8 → 4.0.0-api.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/Readme.md +6 -0
- package/package.json +2 -2
- package/template/_package-lock.json +32828 -2777
- package/template/agora-rn-uikit/src/AgoraUIKit.tsx +6 -6
- package/template/agora-rn-uikit/src/Contexts/ContentContext.tsx +10 -0
- package/template/agora-rn-uikit/src/Contexts/DispatchContext.tsx +22 -0
- package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +10 -6
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +28 -8
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +7 -15
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +30 -26
- package/template/agora-rn-uikit/src/Controls/Icons.ts +30 -83
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +6 -6
- package/template/agora-rn-uikit/src/Controls/Local/LocalAudioMute.tsx +4 -2
- package/template/agora-rn-uikit/src/Controls/Local/LocalVideoMute.tsx +4 -2
- package/template/agora-rn-uikit/src/Controls/Local/Recording.tsx +0 -2
- package/template/agora-rn-uikit/src/Controls/Local/SwitchCamera.tsx +6 -6
- package/template/agora-rn-uikit/src/Controls/LocalControls.tsx +5 -5
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteAudioMute.tsx +4 -4
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteVideoMute.tsx +4 -4
- package/template/agora-rn-uikit/src/Controls/RemoteControls.tsx +2 -2
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +6 -6
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +6 -6
- package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +23 -0
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +6 -6
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +7 -7
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +7 -7
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +10 -10
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +6 -6
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +6 -6
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +5 -5
- package/template/agora-rn-uikit/src/Reducer/UserPin.ts +11 -0
- package/template/agora-rn-uikit/src/Reducer/index.ts +2 -0
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +74 -7
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +5 -4
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +76 -49
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +17 -7
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +17 -11
- package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +2 -2
- package/template/agora-rn-uikit/src/index.ts +17 -9
- package/template/android/app/build.gradle +1 -0
- package/template/android/app/src/main/AndroidManifest.xml +22 -15
- package/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
- package/template/android/app/src/main/java/com/helloworld/MainActivity.java +50 -0
- package/template/android/app/src/main/res/values/colors.xml +7 -0
- package/template/android/build.gradle +3 -3
- package/template/babel.config.js +1 -0
- package/template/bridge/rtc/webNg/RtcEngine.ts +110 -17
- package/template/customization-api/action-library.ts +10 -14
- package/template/customization-api/app-state.ts +4 -6
- package/template/customization-api/customEvents.ts +2 -2
- package/template/customization-api/customize.ts +1 -1
- package/template/customization-api/sub-components.ts +4 -12
- package/template/customization-api/typeDefinition.ts +15 -38
- package/template/customization-implementation/createHook.ts +24 -6
- package/template/customization-implementation/index.ts +1 -1
- package/template/customization-implementation/useCustomization.tsx +5 -7
- package/template/electron/index.html +27 -27
- package/template/electron/renderer/index.js +1 -0
- package/template/global.d.ts +26 -4
- package/template/index.rsdk.tsx +1 -0
- package/template/index.web.js +2 -1
- package/template/index.wsdk.tsx +9 -2
- package/template/ios/HelloWorld/Info.plist +14 -1
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +17 -0
- package/template/metro.config.js +1 -1
- package/template/package.json +18 -7
- package/template/react-native-toast-message/index.d.ts +43 -43
- package/template/react-native-toast-message/src/colors/index.js +3 -2
- package/template/react-native-toast-message/src/components/base/index.js +46 -59
- package/template/react-native-toast-message/src/components/base/styles.js +16 -32
- package/template/react-native-toast-message/src/components/checkbox.js +178 -0
- package/template/react-native-toast-message/src/components/error.js +3 -2
- package/template/react-native-toast-message/src/components/info.js +3 -2
- package/template/react-native-toast-message/src/components/success.js +3 -2
- package/template/react-native-toast-message/src/index.js +122 -31
- package/template/react-native-toast-message/src/index.sdk.tsx +125 -35
- package/template/react-native-toast-message/src/styles.js +3 -4
- package/template/react-native-toast-message/src/styles.sdk.ts +3 -4
- package/template/react-native.config.js +7 -0
- package/template/src/App.tsx +19 -14
- package/template/src/AppWrapper.tsx +74 -29
- package/template/src/SDKAppWrapper.tsx +60 -64
- package/template/src/app-state/useLocalUserInfo.ts +3 -3
- package/template/src/assets/font-styles.css +329 -0
- package/template/src/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/permission.png +0 -0
- package/template/src/assets/selection.json +1 -0
- package/template/src/atoms/ActionMenu.tsx +236 -0
- package/template/src/atoms/AnimatedActiveSpeaker.native.tsx +71 -0
- package/template/src/atoms/AnimatedActiveSpeaker.tsx +84 -0
- package/template/src/atoms/AnimatedRings.native.tsx +68 -0
- package/template/src/atoms/AnimatedRings.tsx +70 -0
- package/template/src/atoms/Card.tsx +61 -0
- package/template/src/atoms/CircularProgress.native.tsx +121 -0
- package/template/src/atoms/CircularProgress.tsx +102 -0
- package/template/src/atoms/CustomIcon.tsx +88 -0
- package/template/src/atoms/CustomSwitch.tsx +287 -0
- package/template/src/atoms/Dropdown.tsx +306 -0
- package/template/src/atoms/HorizontalRule.tsx +3 -1
- package/template/src/atoms/IconButton.tsx +162 -0
- package/template/src/atoms/ImageIcon.tsx +98 -0
- package/template/src/atoms/InfoBubble.tsx +291 -0
- package/template/src/atoms/Input.tsx +87 -0
- package/template/src/atoms/InviteInfo.tsx +166 -0
- package/template/src/atoms/LinkButton.tsx +28 -0
- package/template/src/atoms/OutlineButton.tsx +61 -0
- package/template/src/atoms/ParticipantsCount.tsx +74 -0
- package/template/src/atoms/Popup.tsx +147 -0
- package/template/src/atoms/PrimaryButton.tsx +51 -26
- package/template/src/atoms/RecordingInfo.tsx +52 -0
- package/template/src/atoms/SecondaryButton.tsx +8 -5
- package/template/src/atoms/Spacer.tsx +22 -0
- package/template/src/atoms/TertiaryButton.tsx +78 -0
- package/template/src/atoms/TextInput.tsx +12 -14
- package/template/src/atoms/Toggle.tsx +47 -0
- package/template/src/atoms/Toolbar.tsx +68 -0
- package/template/src/atoms/ToolbarItem.tsx +63 -0
- package/template/src/atoms/Tooltip.native.tsx +65 -0
- package/template/src/atoms/Tooltip.tsx +94 -0
- package/template/src/atoms/UserAvatar.tsx +60 -0
- package/template/src/components/Chat.tsx +164 -278
- package/template/src/components/ChatContext.ts +8 -1
- package/template/src/components/ColorConfigure.tsx +1 -1
- package/template/src/components/ColorContext.ts +1 -1
- package/template/src/components/CommonStyles.ts +44 -0
- package/template/src/components/Controls.tsx +331 -73
- package/template/src/components/{Controls.native.tsx → Controls1.native.tsx} +8 -6
- package/template/src/components/DeviceConfigure.tsx +511 -102
- package/template/src/components/DeviceContext.tsx +8 -4
- package/template/src/components/EventsConfigure.tsx +192 -10
- package/template/src/components/GraphQLProvider.tsx +1 -1
- package/template/src/components/GridVideo.tsx +60 -45
- package/template/src/components/HostControlView.tsx +114 -35
- package/template/src/components/Navbar.tsx +219 -437
- package/template/src/components/Navigation.tsx +15 -1
- package/template/src/components/NetworkQualityContext.tsx +22 -22
- package/template/src/components/ParticipantsView.tsx +178 -156
- package/template/src/components/PinnedVideo.tsx +206 -121
- package/template/src/components/Precall.native.tsx +358 -119
- package/template/src/components/Precall.tsx +272 -138
- package/template/src/components/RTMConfigure.tsx +66 -19
- package/template/src/components/Router.electron.ts +1 -0
- package/template/src/components/Router.native.ts +1 -0
- package/template/src/components/Router.sdk.ts +1 -0
- package/template/src/components/Router.ts +1 -0
- package/template/src/components/SdkApiContext.tsx +161 -0
- package/template/src/components/Settings.tsx +26 -95
- package/template/src/components/SettingsView.tsx +251 -56
- package/template/src/components/Share.tsx +305 -276
- package/template/src/components/StorageContext.tsx +30 -3
- package/template/src/components/ToastComponent.tsx +8 -0
- package/template/src/components/chat-messages/useChatMessages.tsx +97 -50
- package/template/src/components/chat-ui/useChatUIControls.tsx +76 -0
- package/template/src/components/common/Error.tsx +20 -6
- package/template/src/components/common/Logo.tsx +16 -15
- package/template/src/components/contexts/LiveStreamDataContext.tsx +16 -11
- package/template/src/components/contexts/VideoMeetingDataContext.tsx +41 -11
- package/template/src/components/contexts/WhiteboardContext.tsx +3 -3
- package/template/src/components/livestream/LiveStreamContext.tsx +284 -50
- package/template/src/components/livestream/Types.ts +39 -14
- package/template/src/components/livestream/index.ts +1 -0
- package/template/src/components/livestream/views/LiveStreamControls.tsx +9 -4
- package/template/src/components/participants/AllAudienceParticipants.tsx +102 -31
- package/template/src/components/participants/AllHostParticipants.tsx +106 -35
- package/template/src/components/participants/Participant.tsx +300 -0
- package/template/src/components/participants/ParticipantName.tsx +13 -7
- package/template/src/components/participants/ParticipantSectionTitle.tsx +35 -10
- package/template/src/components/participants/ScreenshareParticipants.tsx +144 -12
- package/template/src/components/participants/UserActionMenuOptions.tsx +396 -0
- package/template/src/components/popups/InvitePopup.tsx +115 -0
- package/template/src/components/popups/StopRecordingPopup.tsx +114 -0
- package/template/src/components/precall/LocalMute.tsx +84 -14
- package/template/src/components/precall/{LocalMute.native.tsx → LocalMute1.native.tsx} +21 -5
- package/template/src/components/precall/PermissionHelper.native.tsx +5 -0
- package/template/src/components/precall/PermissionHelper.tsx +126 -0
- package/template/src/components/precall/PreCallSettings.tsx +52 -0
- package/template/src/components/precall/VideoPreview.native.tsx +51 -6
- package/template/src/components/precall/VideoPreview.tsx +164 -8
- package/template/src/components/precall/joinCallBtn.native.tsx +2 -2
- package/template/src/components/precall/joinCallBtn.tsx +17 -4
- package/template/src/components/precall/meetingTitle.tsx +17 -14
- package/template/src/components/precall/selectDevice.tsx +1 -21
- package/template/src/components/precall/textInput.tsx +34 -6
- package/template/src/components/precall/usePreCall.tsx +39 -1
- package/template/src/components/{meeting-info/useMeetingInfo.tsx → room-info/useRoomInfo.tsx} +34 -10
- package/template/src/components/{meeting-info/useSetMeetingInfo.tsx → room-info/useSetRoomInfo.tsx} +12 -12
- package/template/src/components/styles.ts +42 -21
- package/template/src/components/useShareLink.tsx +19 -21
- package/template/src/components/useToast.tsx +41 -0
- package/template/src/components/useUserPreference.tsx +9 -6
- package/template/src/components/useVideoCall.tsx +84 -0
- package/template/src/language/default-labels/createScreenLabels.ts +3 -3
- package/template/src/language/default-labels/joinScreenLabels.ts +2 -2
- package/template/src/language/default-labels/precallScreenLabels.ts +3 -3
- package/template/src/language/default-labels/shareLinkScreenLabels.ts +5 -5
- package/template/src/language/default-labels/videoCallScreenLabels.ts +5 -5
- package/template/src/pages/Authenticate.tsx +5 -15
- package/template/src/pages/Create.tsx +304 -191
- package/template/src/pages/Endcall.tsx +148 -0
- package/template/src/pages/Join.tsx +96 -70
- package/template/src/pages/VideoCall.tsx +179 -69
- package/template/src/pages/video-call/ActionSheet.native.tsx +215 -0
- package/template/src/pages/video-call/ActionSheet.tsx +226 -0
- package/template/src/pages/video-call/ActionSheetContent.tsx +479 -0
- package/template/src/pages/video-call/ActionSheetHandle.tsx +38 -0
- package/template/src/pages/video-call/ActionSheetStyles.css +138 -0
- package/template/src/pages/video-call/DefaultLayouts.ts +6 -6
- package/template/src/pages/video-call/NameWithMicIcon.tsx +93 -49
- package/template/src/pages/video-call/RenderComponent.tsx +6 -30
- package/template/src/pages/video-call/SidePanelHeader.tsx +186 -0
- package/template/src/pages/video-call/VideoCallMobileView.tsx +138 -0
- package/template/src/pages/video-call/VideoCallScreen.native.tsx +37 -0
- package/template/src/pages/video-call/VideoCallScreen.tsx +109 -66
- package/template/src/pages/video-call/VideoComponent.tsx +20 -4
- package/template/src/pages/video-call/VideoRenderer.tsx +227 -61
- package/template/src/pages/video-call/index.ts +35 -7
- package/template/src/rtm/RTMEngine.ts +8 -0
- package/template/src/rtm-events/constants.ts +3 -1
- package/template/src/rtm-events-api/Events.ts +5 -4
- package/template/src/rtm-events-api/LocalEvents.ts +6 -0
- package/template/src/rtm-events-api/types.ts +5 -5
- package/template/src/subComponents/ChatBubble.tsx +125 -84
- package/template/src/subComponents/ChatContainer.tsx +280 -93
- package/template/src/subComponents/ChatInput.ios.tsx +175 -0
- package/template/src/subComponents/ChatInput.tsx +72 -115
- package/template/src/subComponents/Checkbox.native.tsx +16 -5
- package/template/src/subComponents/Checkbox.tsx +2 -2
- package/template/src/subComponents/CopyJoinInfo.tsx +36 -58
- package/template/src/subComponents/EndcallPopup.tsx +107 -0
- package/template/src/subComponents/FallbackLogo.tsx +122 -40
- package/template/src/subComponents/LanguageSelector.tsx +1 -1
- package/template/src/subComponents/LayoutIconButton.tsx +201 -0
- package/template/src/subComponents/LayoutIconDropdown.tsx +131 -134
- package/template/src/subComponents/{LayoutIconDropdown.native.tsx → LayoutIconDropdown1.native.tsx} +4 -18
- package/template/src/subComponents/LocalAudioMute.tsx +119 -27
- package/template/src/subComponents/LocalEndCall.tsx +73 -35
- package/template/src/subComponents/LocalSwitchCamera.tsx +19 -32
- package/template/src/subComponents/LocalVideoMute.tsx +117 -27
- package/template/src/subComponents/Logo.tsx +3 -4
- package/template/src/subComponents/LogoutButton.tsx +1 -1
- package/template/src/subComponents/NetworkQualityPill.tsx +66 -68
- package/template/src/subComponents/OpenInNativeButton.tsx +3 -3
- package/template/src/subComponents/Recording.tsx +28 -29
- package/template/src/subComponents/RemoteAudioMute.tsx +83 -29
- package/template/src/subComponents/RemoteEndCall.tsx +8 -5
- package/template/src/subComponents/RemoteMutePopup.tsx +193 -0
- package/template/src/subComponents/RemoteVideoMute.tsx +74 -21
- package/template/src/subComponents/RemoveMeetingPopup.tsx +109 -0
- package/template/src/subComponents/RemoveScreensharePopup.tsx +109 -0
- package/template/src/subComponents/ScreenShareNotice.tsx +83 -8
- package/template/src/subComponents/SelectDevice.tsx +404 -61
- package/template/src/subComponents/SelectDeviceSettings.backup.tsx +207 -0
- package/template/src/subComponents/SelectOAuth.tsx +9 -8
- package/template/src/subComponents/SidePanelButtons.ts +0 -3
- package/template/src/subComponents/SidePanelHeader.tsx +112 -0
- package/template/src/subComponents/ToastConfig.tsx +150 -10
- package/template/src/subComponents/chat/ChatParticipants.tsx +188 -79
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +97 -34
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +29 -33
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +8 -8
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +24 -11
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +17 -10
- package/template/src/subComponents/recording/useRecording.tsx +81 -29
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +52 -70
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +23 -12
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +44 -19
- package/template/src/theme/index.ts +46 -0
- package/template/src/utils/PlatformWrapper.tsx +21 -0
- package/template/src/utils/SdkEvents.ts +23 -14
- package/template/src/utils/SdkMethodEvents.ts +81 -0
- package/template/src/utils/common.tsx +155 -1
- package/template/src/utils/hexadecimalTransparency.ts +108 -0
- package/template/src/utils/index.tsx +19 -0
- package/template/src/utils/isMobileOrTablet.ts +7 -2
- package/template/src/utils/pendingStateUpdateHelper.ts +19 -0
- package/template/src/utils/useActiveSpeaker.ts +42 -0
- package/template/src/utils/{useCreateMeeting.ts → useCreateRoom.ts} +19 -14
- package/template/src/utils/{useButtonTemplate.tsx → useFocus.tsx} +19 -16
- package/template/src/utils/useGetMeetingPhrase.ts +10 -10
- package/template/src/utils/useIsAudioEnabled.ts +3 -3
- package/template/src/utils/useIsHandRaised.ts +13 -0
- package/template/src/utils/useIsPSTN.ts +3 -3
- package/template/src/utils/useIsVideoEnabled.ts +3 -3
- package/template/src/utils/{useJoinMeeting.ts → useJoinRoom.ts} +27 -21
- package/template/src/utils/useMutePSTN.ts +2 -2
- package/template/src/utils/useMuteToggleLocal.ts +58 -5
- package/template/src/utils/useRemoteEndCall.ts +4 -4
- package/template/src/utils/useRemoteEndScreenshare.ts +26 -0
- package/template/src/utils/useRemoteMute.ts +7 -7
- package/template/src/utils/useRemoteRequest.ts +84 -0
- package/template/src/utils/useSwitchCamera.native.tsx +25 -0
- package/template/src/utils/useSwitchCamera.tsx +19 -0
- package/template/src/utils/useToolbar.tsx +59 -0
- package/template/web/index.html +5 -0
- package/template/webpack.commons.js +13 -8
- package/template/webpack.rsdk.config.js +1 -2
- package/template/webpack.web.config.js +1 -0
- package/template/agora-rn-uikit/.git/HEAD +0 -1
- package/template/agora-rn-uikit/.git/config +0 -16
- package/template/agora-rn-uikit/.git/description +0 -1
- package/template/agora-rn-uikit/.git/hooks/applypatch-msg.sample +0 -15
- package/template/agora-rn-uikit/.git/hooks/commit-msg.sample +0 -24
- package/template/agora-rn-uikit/.git/hooks/fsmonitor-watchman.sample +0 -174
- package/template/agora-rn-uikit/.git/hooks/post-update.sample +0 -8
- package/template/agora-rn-uikit/.git/hooks/pre-applypatch.sample +0 -14
- package/template/agora-rn-uikit/.git/hooks/pre-commit.sample +0 -49
- package/template/agora-rn-uikit/.git/hooks/pre-merge-commit.sample +0 -13
- package/template/agora-rn-uikit/.git/hooks/pre-push.sample +0 -53
- package/template/agora-rn-uikit/.git/hooks/pre-rebase.sample +0 -169
- package/template/agora-rn-uikit/.git/hooks/pre-receive.sample +0 -24
- package/template/agora-rn-uikit/.git/hooks/prepare-commit-msg.sample +0 -42
- package/template/agora-rn-uikit/.git/hooks/push-to-checkout.sample +0 -78
- package/template/agora-rn-uikit/.git/hooks/update.sample +0 -128
- package/template/agora-rn-uikit/.git/index +0 -0
- package/template/agora-rn-uikit/.git/info/exclude +0 -6
- package/template/agora-rn-uikit/.git/logs/HEAD +0 -2
- package/template/agora-rn-uikit/.git/logs/refs/heads/master +0 -1
- package/template/agora-rn-uikit/.git/logs/refs/heads/release/fpe-1.0.1 +0 -1
- package/template/agora-rn-uikit/.git/logs/refs/remotes/origin/HEAD +0 -1
- package/template/agora-rn-uikit/.git/objects/pack/pack-baa9cf4109c3e8528f39535764621cee252b2b77.idx +0 -0
- package/template/agora-rn-uikit/.git/objects/pack/pack-baa9cf4109c3e8528f39535764621cee252b2b77.pack +0 -0
- package/template/agora-rn-uikit/.git/packed-refs +0 -49
- package/template/agora-rn-uikit/.git/refs/heads/master +0 -1
- package/template/agora-rn-uikit/.git/refs/heads/release/fpe-1.0.1 +0 -1
- package/template/agora-rn-uikit/.git/refs/remotes/origin/HEAD +0 -1
- package/template/agora-rn-uikit/.gitignore +0 -63
- package/template/agora-rn-uikit/package-lock.json +0 -7612
- package/template/agora-rn-uikit/src/Contexts/RenderContext.tsx +0 -10
- package/template/package-lock.json +0 -22543
- package/template/react-native-toast-message/.gitignore +0 -5
- package/template/react-native-toast-message/.npmignore +0 -5
- package/template/react-native-toast-message/package-lock.json +0 -10553
- package/template/src/.DS_Store +0 -0
- package/template/src/assets/icons.ts +0 -102
- package/template/src/components/chat-ui/useChatUIControl.tsx +0 -69
- package/template/src/components/participants/MeParticipant.tsx +0 -38
- package/template/src/components/participants/RemoteParticipants.tsx +0 -71
- package/template/src/pages/video-call/CustomUserContextHolder.tsx +0 -20
- package/template/src/subComponents/.DS_Store +0 -0
package/template/global.d.ts
CHANGED
|
@@ -47,7 +47,6 @@ interface ConfigInterface {
|
|
|
47
47
|
APP_NAME: string;
|
|
48
48
|
LOGO: string;
|
|
49
49
|
APP_ID: string;
|
|
50
|
-
PRIMARY_COLOR: string;
|
|
51
50
|
FRONTEND_ENDPOINT: string;
|
|
52
51
|
BACKEND_ENDPOINT: string;
|
|
53
52
|
PSTN: boolean;
|
|
@@ -57,11 +56,8 @@ interface ConfigInterface {
|
|
|
57
56
|
SCREEN_SHARING: boolean;
|
|
58
57
|
CLIENT_ID: string;
|
|
59
58
|
LANDING_SUB_HEADING: string;
|
|
60
|
-
BG: string;
|
|
61
59
|
ENCRYPTION_ENABLED: boolean;
|
|
62
60
|
PROFILE: VideoProfile;
|
|
63
|
-
PRIMARY_FONT_COLOR: string;
|
|
64
|
-
SECONDARY_FONT_COLOR: string;
|
|
65
61
|
SENTRY_DSN: string;
|
|
66
62
|
ENABLE_GOOGLE_OAUTH: boolean;
|
|
67
63
|
ENABLE_SLACK_OAUTH: boolean;
|
|
@@ -76,6 +72,32 @@ interface ConfigInterface {
|
|
|
76
72
|
GEO_FENCING: boolean;
|
|
77
73
|
LOG_ENABLED: boolean;
|
|
78
74
|
AUDIO_ROOM: boolean;
|
|
75
|
+
PRIMARY_ACTION_BRAND_COLOR: string;
|
|
76
|
+
PRIMARY_ACTION_TEXT_COLOR: string;
|
|
77
|
+
SECONDARY_ACTION_COLOR: string;
|
|
78
|
+
FONT_COLOR: string;
|
|
79
|
+
BG: string;
|
|
80
|
+
BACKGROUND_COLOR: string;
|
|
81
|
+
VIDEO_AUDIO_TILE_COLOR: string;
|
|
82
|
+
VIDEO_AUDIO_TILE_OVERLAY_COLOR: string;
|
|
83
|
+
VIDEO_AUDIO_TILE_TEXT_COLOR: string;
|
|
84
|
+
VIDEO_AUDIO_TILE_AVATAR_COLOR: string;
|
|
85
|
+
SEMANTIC_ERROR: string;
|
|
86
|
+
SEMANTIC_SUCCESS: string;
|
|
87
|
+
SEMANTIC_WARNING: string;
|
|
88
|
+
SEMANTIC_NEUTRAL: string;
|
|
89
|
+
INPUT_FIELD_BACKGROUND_COLOR: string;
|
|
90
|
+
INPUT_FIELD_BORDER_COLOR: string;
|
|
91
|
+
CARD_LAYER_1_COLOR: string;
|
|
92
|
+
CARD_LAYER_2_COLOR: string;
|
|
93
|
+
CARD_LAYER_3_COLOR: string;
|
|
94
|
+
CARD_LAYER_4_COLOR: string;
|
|
95
|
+
CARD_LAYER_5_COLOR: string;
|
|
96
|
+
HARD_CODED_BLACK_COLOR: string;
|
|
97
|
+
ICON_TEXT: boolean;
|
|
98
|
+
ICON_BG_COLOR: string;
|
|
99
|
+
TOOLBAR_COLOR: string;
|
|
100
|
+
ACTIVE_SPEAKER: boolean;
|
|
79
101
|
}
|
|
80
102
|
declare var $config: ConfigInterface;
|
|
81
103
|
declare module 'customization' {
|
package/template/index.rsdk.tsx
CHANGED
package/template/index.web.js
CHANGED
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
information visit https://appbuilder.agora.io.
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
|
-
import {AppRegistry} from 'react-native';
|
|
12
|
+
import { AppRegistry } from 'react-native';
|
|
13
13
|
import * as Sentry from '@sentry/browser';
|
|
14
14
|
import Video from './src/App';
|
|
15
|
+
import './src/assets/font-styles.css'
|
|
15
16
|
|
|
16
17
|
Sentry.init({
|
|
17
18
|
dsn: 'https://b5df0450fe284baa8376e62ace331580@o615358.ingest.sentry.io/5749898',
|
package/template/index.wsdk.tsx
CHANGED
|
@@ -6,18 +6,25 @@ import SDKAppWrapper, {
|
|
|
6
6
|
import SDKEvents from './src/utils/SdkEvents';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import * as RN from 'react-native-web';
|
|
9
|
-
|
|
9
|
+
import './src/assets/font-styles.css';
|
|
10
10
|
export * from 'customization-api';
|
|
11
11
|
export * from 'customization-implementation';
|
|
12
12
|
|
|
13
13
|
interface AppBuilderWebSdkInterface extends AppBuilderSdkApiInterface {}
|
|
14
14
|
|
|
15
|
+
const clearEvent = {
|
|
16
|
+
clear: () => {},
|
|
17
|
+
};
|
|
18
|
+
|
|
15
19
|
const AppBuilderWebSdkApi: AppBuilderWebSdkInterface = {
|
|
16
20
|
...AppBuilderSdkApi,
|
|
17
21
|
// Override customize function for web-sdk
|
|
18
22
|
customize: (customization) => {
|
|
19
|
-
SDKEvents.
|
|
23
|
+
SDKEvents.emit('addFpe', customization);
|
|
24
|
+
clearEvent.clear = SDKEvents.on('addFpeInit', () => {
|
|
25
|
+
console.log('addFpeInit called');
|
|
20
26
|
SDKEvents.emit('addFpe', customization);
|
|
27
|
+
clearEvent.clear();
|
|
21
28
|
});
|
|
22
29
|
},
|
|
23
30
|
};
|
|
@@ -53,9 +53,18 @@
|
|
|
53
53
|
<key>NSCameraUsageDescription</key>
|
|
54
54
|
<string>Camera access</string>
|
|
55
55
|
<key>NSLocationWhenInUseUsageDescription</key>
|
|
56
|
-
<string
|
|
56
|
+
<string/>
|
|
57
57
|
<key>NSMicrophoneUsageDescription</key>
|
|
58
58
|
<string>Mic access</string>
|
|
59
|
+
<key>UIAppFonts</key>
|
|
60
|
+
<array>
|
|
61
|
+
<string>SourceSansPro-Regular.ttf</string>
|
|
62
|
+
<string>icomoon.ttf</string>
|
|
63
|
+
</array>
|
|
64
|
+
<key>UIBackgroundModes</key>
|
|
65
|
+
<array>
|
|
66
|
+
<string>audio</string>
|
|
67
|
+
</array>
|
|
59
68
|
<key>UILaunchStoryboardName</key>
|
|
60
69
|
<string>LaunchScreen</string>
|
|
61
70
|
<key>UIRequiredDeviceCapabilities</key>
|
|
@@ -65,8 +74,12 @@
|
|
|
65
74
|
<key>UISupportedInterfaceOrientations</key>
|
|
66
75
|
<array>
|
|
67
76
|
<string>UIInterfaceOrientationPortrait</string>
|
|
77
|
+
</array>
|
|
78
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
79
|
+
<array>
|
|
68
80
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
69
81
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
82
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
70
83
|
</array>
|
|
71
84
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
72
85
|
<false/>
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
65580BB1266EDC8000B310B6 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65580BB0266EDC8000B310B6 /* File.swift */; };
|
|
19
19
|
65580BB3266EDD6300B310B6 /* HelloWorld.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 65580BB2266EDCA400B310B6 /* HelloWorld.entitlements */; };
|
|
20
20
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
|
21
|
+
49B7B61E43464F098E87335F /* icomoon.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FF34150ABA37458FB48221FB /* icomoon.ttf */; };
|
|
22
|
+
76624C45E19C435BACC727C7 /* SourceSansPro-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E72FF36D2A984B10BA9C6F91 /* SourceSansPro-Regular.ttf */; };
|
|
21
23
|
/* End PBXBuildFile section */
|
|
22
24
|
|
|
23
25
|
/* Begin PBXContainerItemProxy section */
|
|
@@ -56,6 +58,8 @@
|
|
|
56
58
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = HelloWorld/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
|
57
59
|
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
|
58
60
|
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
|
|
61
|
+
FF34150ABA37458FB48221FB /* icomoon.ttf */ = {isa = PBXFileReference; name = "icomoon.ttf"; path = "../src/assets/fonts/icomoon.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
|
62
|
+
E72FF36D2A984B10BA9C6F91 /* SourceSansPro-Regular.ttf */ = {isa = PBXFileReference; name = "SourceSansPro-Regular.ttf"; path = "../src/assets/fonts/SourceSansPro-Regular.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
|
59
63
|
/* End PBXFileReference section */
|
|
60
64
|
|
|
61
65
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -148,6 +152,7 @@
|
|
|
148
152
|
00E356EF1AD99517003FC87E /* HelloWorldTests */,
|
|
149
153
|
83CBBA001A601CBA00E9B192 /* Products */,
|
|
150
154
|
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
|
155
|
+
A87D6475B3A64BB58397D417 /* Resources */,
|
|
151
156
|
);
|
|
152
157
|
indentWidth = 2;
|
|
153
158
|
sourceTree = "<group>";
|
|
@@ -165,6 +170,16 @@
|
|
|
165
170
|
name = Products;
|
|
166
171
|
sourceTree = "<group>";
|
|
167
172
|
};
|
|
173
|
+
A87D6475B3A64BB58397D417 /* Resources */ = {
|
|
174
|
+
isa = "PBXGroup";
|
|
175
|
+
children = (
|
|
176
|
+
FF34150ABA37458FB48221FB /* icomoon.ttf */,
|
|
177
|
+
E72FF36D2A984B10BA9C6F91 /* SourceSansPro-Regular.ttf */,
|
|
178
|
+
);
|
|
179
|
+
name = Resources;
|
|
180
|
+
sourceTree = "<group>";
|
|
181
|
+
path = "";
|
|
182
|
+
};
|
|
168
183
|
/* End PBXGroup section */
|
|
169
184
|
|
|
170
185
|
/* Begin PBXNativeTarget section */
|
|
@@ -304,6 +319,8 @@
|
|
|
304
319
|
65580BB3266EDD6300B310B6 /* HelloWorld.entitlements in Resources */,
|
|
305
320
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
|
|
306
321
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
|
322
|
+
49B7B61E43464F098E87335F /* icomoon.ttf in Resources */,
|
|
323
|
+
76624C45E19C435BACC727C7 /* SourceSansPro-Regular.ttf in Resources */,
|
|
307
324
|
);
|
|
308
325
|
runOnlyForDeploymentPostprocessing = 0;
|
|
309
326
|
};
|
package/template/metro.config.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* @format
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
const blacklist = require('metro-config/src/defaults/
|
|
19
|
+
const blacklist = require('metro-config/src/defaults/exclusionList');
|
|
20
20
|
|
|
21
21
|
// blacklist is a function that takes an array of regexes and combines
|
|
22
22
|
// them with the default blacklist to return a single regex.
|
package/template/package.json
CHANGED
|
@@ -49,13 +49,15 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@apollo/client": "3.3.20",
|
|
52
|
-
"@
|
|
52
|
+
"@gorhom/bottom-sheet": "4.4.5",
|
|
53
|
+
"@react-native-async-storage/async-storage": "1.17.11",
|
|
53
54
|
"@react-native-community/checkbox": "0.4.2",
|
|
54
55
|
"@react-native-community/clipboard": "1.5.1",
|
|
55
56
|
"@sentry/react": "6.5.1",
|
|
56
57
|
"@sentry/react-native": "2.4.3",
|
|
57
58
|
"@sentry/tracing": "6.2.1",
|
|
58
|
-
"
|
|
59
|
+
"@supersami/rn-foreground-service": "^1.1.1",
|
|
60
|
+
"agora-react-native-rtm": "1.5.1",
|
|
59
61
|
"agora-rtc-sdk-ng": "4.14.0",
|
|
60
62
|
"agora-rtm-sdk": "1.4.3-203",
|
|
61
63
|
"electron-log": "4.3.5",
|
|
@@ -66,19 +68,26 @@
|
|
|
66
68
|
"nanoevents": "7.0.1",
|
|
67
69
|
"nanoid": "4.0.0",
|
|
68
70
|
"nosleep.js": "0.12.0",
|
|
69
|
-
"react": "
|
|
70
|
-
"react-dom": "
|
|
71
|
+
"react": "17.0.1",
|
|
72
|
+
"react-dom": "17.0.1",
|
|
71
73
|
"react-is": "18.0.0",
|
|
72
|
-
"react-native": "0.
|
|
74
|
+
"react-native": "0.64",
|
|
73
75
|
"react-native-agora": "3.7.1",
|
|
76
|
+
"react-native-gesture-handler": "2.8.0",
|
|
74
77
|
"react-native-hyperlink": "0.0.19",
|
|
75
78
|
"react-native-inappbrowser-reborn": "3.5.1",
|
|
76
79
|
"react-native-keep-awake": "4.0.0",
|
|
77
80
|
"react-native-keyboard-manager": "6.5.4-1",
|
|
81
|
+
"react-native-reanimated": "2.12.0",
|
|
78
82
|
"react-native-responsive-fontsize": "0.5.1",
|
|
83
|
+
"react-native-svg": "13.6.0",
|
|
84
|
+
"react-native-vector-icons": "9.2.0",
|
|
85
|
+
"react-native-walkthrough-tooltip": "1.4.0",
|
|
79
86
|
"react-native-web": "0.14.13",
|
|
80
87
|
"react-router-dom": "5.2.0",
|
|
81
|
-
"react-router-native": "5.2.0"
|
|
88
|
+
"react-router-native": "5.2.0",
|
|
89
|
+
"react-spring-bottom-sheet": "3.4.1",
|
|
90
|
+
"react-tooltip": "4.5.1"
|
|
82
91
|
},
|
|
83
92
|
"devDependencies": {
|
|
84
93
|
"@babel/core": "7.14.3",
|
|
@@ -107,6 +116,7 @@
|
|
|
107
116
|
"babel-plugin-module-resolver": "4.1.0",
|
|
108
117
|
"babel-plugin-transform-define": "2.0.1",
|
|
109
118
|
"cross-env": "7.0.3",
|
|
119
|
+
"css-loader": "6.7.2",
|
|
110
120
|
"del": "5.1.0",
|
|
111
121
|
"electron": "16.0.1",
|
|
112
122
|
"electron-builder": "23.6.0",
|
|
@@ -124,7 +134,8 @@
|
|
|
124
134
|
"prettier": "2.3.1",
|
|
125
135
|
"react-devtools-electron": "4.7.0",
|
|
126
136
|
"react-refresh": "0.12.0",
|
|
127
|
-
"react-test-renderer": "
|
|
137
|
+
"react-test-renderer": "17.0.1",
|
|
138
|
+
"style-loader": "3.3.1",
|
|
128
139
|
"ts-loader": "^8.3.0",
|
|
129
140
|
"typescript": "3.9.9",
|
|
130
141
|
"webpack": "5.72.0",
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ViewStyle, TextStyle, ImageSourcePropType } from 'react-native'
|
|
2
|
+
import { ViewStyle, TextStyle, ImageSourcePropType } from 'react-native';
|
|
3
3
|
|
|
4
4
|
declare module 'react-native-toast-message' {
|
|
5
5
|
interface AnyObject {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export type ToastPosition = 'top' | 'bottom'
|
|
9
|
+
export type ToastPosition = 'top' | 'bottom';
|
|
10
10
|
|
|
11
11
|
export interface BaseToastProps {
|
|
12
|
-
leadingIcon?:
|
|
13
|
-
trailingIcon?:
|
|
14
|
-
text1?: string
|
|
15
|
-
text2?: string
|
|
16
|
-
onPress?: () => void
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
text2Style?: TextStyle,
|
|
27
|
-
activeOpacity?: number,
|
|
28
|
-
text1NumberOfLines: number,
|
|
29
|
-
text2NumberOfLines: number,
|
|
12
|
+
leadingIcon?: React.ReactNode;
|
|
13
|
+
trailingIcon?: React.ReactNode;
|
|
14
|
+
text1?: string;
|
|
15
|
+
text2?: string;
|
|
16
|
+
onPress?: () => void;
|
|
17
|
+
style?: ViewStyle;
|
|
18
|
+
contentContainerStyle?: ViewStyle;
|
|
19
|
+
text1Style?: TextStyle;
|
|
20
|
+
text2Style?: TextStyle;
|
|
21
|
+
activeOpacity?: number;
|
|
22
|
+
text1NumberOfLines: number;
|
|
23
|
+
text2NumberOfLines: number;
|
|
24
|
+
primaryBtn?: React.ReactNode;
|
|
25
|
+
secondaryBtn?: React.ReactNode;
|
|
30
26
|
}
|
|
31
|
-
export const BaseToast: React.FC<BaseToastProps
|
|
27
|
+
export const BaseToast: React.FC<BaseToastProps>;
|
|
32
28
|
|
|
33
29
|
export interface ToastProps {
|
|
34
30
|
ref: (ref: any) => any;
|
|
35
|
-
config?: AnyObject
|
|
36
|
-
style?: ViewStyle
|
|
37
|
-
topOffset?: number
|
|
38
|
-
bottomOffset?: number
|
|
39
|
-
keyboardOffset?: number
|
|
40
|
-
visibilityTime?: number
|
|
41
|
-
autoHide?: boolean
|
|
42
|
-
height?: number
|
|
43
|
-
position?: ToastPosition
|
|
44
|
-
type?: string
|
|
31
|
+
config?: AnyObject;
|
|
32
|
+
style?: ViewStyle;
|
|
33
|
+
topOffset?: number;
|
|
34
|
+
bottomOffset?: number;
|
|
35
|
+
keyboardOffset?: number;
|
|
36
|
+
visibilityTime?: number;
|
|
37
|
+
autoHide?: boolean;
|
|
38
|
+
height?: number;
|
|
39
|
+
position?: ToastPosition;
|
|
40
|
+
type?: string;
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
export default class Toast extends React.Component<ToastProps> {
|
|
48
44
|
static show(options: {
|
|
49
|
-
type: string
|
|
50
|
-
position?: ToastPosition
|
|
51
|
-
text1?: string
|
|
52
|
-
text2?: string
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
type: string;
|
|
46
|
+
position?: ToastPosition;
|
|
47
|
+
text1?: string;
|
|
48
|
+
text2?: string;
|
|
49
|
+
primaryBtn?: React.ReactNode;
|
|
50
|
+
secondaryBtn?: React.ReactNode;
|
|
51
|
+
visibilityTime?: number;
|
|
52
|
+
autoHide?: boolean;
|
|
53
|
+
topOffset?: number;
|
|
54
|
+
bottomOffset?: number;
|
|
55
|
+
props?: AnyObject;
|
|
56
|
+
onShow?: () => void;
|
|
57
|
+
onHide?: () => void;
|
|
58
|
+
onPress?: () => void;
|
|
61
59
|
}): void;
|
|
62
60
|
|
|
63
61
|
static hide(): void;
|
|
64
62
|
|
|
63
|
+
static getToastId(): number;
|
|
64
|
+
|
|
65
65
|
static setRef(ref: any): any;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
const colors = {
|
|
2
2
|
white: '#FFF',
|
|
3
|
-
blazeOrange: '#
|
|
3
|
+
blazeOrange: '#FF414D',
|
|
4
4
|
mantis: '#69C779',
|
|
5
5
|
alto: '#D8D8D8',
|
|
6
6
|
dustyGray: '#979797',
|
|
7
|
-
lightSkyBlue: '#87CEFA'
|
|
7
|
+
lightSkyBlue: '#87CEFA',
|
|
8
|
+
black: '#040405'
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
export default colors;
|
|
@@ -13,53 +13,51 @@ function BaseToast({
|
|
|
13
13
|
text1,
|
|
14
14
|
text2,
|
|
15
15
|
onPress,
|
|
16
|
-
onLeadingIconPress,
|
|
17
|
-
onTrailingIconPress,
|
|
18
16
|
style,
|
|
19
|
-
leadingIconContainerStyle,
|
|
20
|
-
trailingIconContainerStyle,
|
|
21
|
-
leadingIconStyle,
|
|
22
|
-
trailingIconStyle,
|
|
23
17
|
contentContainerStyle,
|
|
24
18
|
text1Style,
|
|
25
19
|
text2Style,
|
|
26
20
|
activeOpacity,
|
|
27
21
|
text1NumberOfLines,
|
|
28
|
-
text2NumberOfLines
|
|
22
|
+
text2NumberOfLines,
|
|
23
|
+
primaryBtn,
|
|
24
|
+
secondaryBtn
|
|
29
25
|
}) {
|
|
30
26
|
return (
|
|
31
27
|
<TouchableOpacity
|
|
32
28
|
testID='rootView'
|
|
33
|
-
style={[styles.base, styles.
|
|
29
|
+
style={[styles.base, styles.borderTop, style]}
|
|
34
30
|
onPress={onPress}
|
|
35
31
|
activeOpacity={onPress ? activeOpacity : 1}>
|
|
36
|
-
{leadingIcon && (
|
|
37
|
-
<TouchableOpacity
|
|
38
|
-
testID='leadingIcon'
|
|
39
|
-
style={[styles.leadingIconContainer, leadingIconContainerStyle]}
|
|
40
|
-
onPress={onLeadingIconPress}
|
|
41
|
-
activeOpacity={onLeadingIconPress ? activeOpacity : 1}>
|
|
42
|
-
<Icon
|
|
43
|
-
style={{ ...styles.leadingIcon, ...leadingIconStyle }}
|
|
44
|
-
source={leadingIcon}
|
|
45
|
-
/>
|
|
46
|
-
</TouchableOpacity>
|
|
47
|
-
)}
|
|
48
|
-
|
|
49
32
|
<View
|
|
50
33
|
testID='contentContainer'
|
|
51
34
|
style={[styles.contentContainer, contentContainerStyle]}>
|
|
52
|
-
{text1?.length > 0 && (
|
|
53
|
-
<View
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
35
|
+
{(text1 || text1?.length > 0) && (
|
|
36
|
+
<View
|
|
37
|
+
style={{
|
|
38
|
+
flex: 1,
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
justifyContent: 'space-between'
|
|
41
|
+
}}>
|
|
42
|
+
<View
|
|
43
|
+
style={{
|
|
44
|
+
flexDirection: 'row',
|
|
45
|
+
flex: 1
|
|
46
|
+
}}>
|
|
47
|
+
{leadingIcon ? leadingIcon : <></>}
|
|
48
|
+
<Text
|
|
49
|
+
testID='text1'
|
|
50
|
+
style={[styles.text1, text1Style]}
|
|
51
|
+
numberOfLines={text1NumberOfLines}>
|
|
52
|
+
{text1}
|
|
53
|
+
</Text>
|
|
54
|
+
</View>
|
|
55
|
+
<View style={{ justifyContent: 'flex-start', alignSelf: 'center' }}>
|
|
56
|
+
{trailingIcon ? trailingIcon : <></>}
|
|
57
|
+
</View>
|
|
60
58
|
</View>
|
|
61
59
|
)}
|
|
62
|
-
{text2?.length > 0 && (
|
|
60
|
+
{(text2 || text2?.length > 0) && (
|
|
63
61
|
<View>
|
|
64
62
|
<Text
|
|
65
63
|
testID='text2'
|
|
@@ -69,20 +67,21 @@ function BaseToast({
|
|
|
69
67
|
</Text>
|
|
70
68
|
</View>
|
|
71
69
|
)}
|
|
70
|
+
{primaryBtn || secondaryBtn ? (
|
|
71
|
+
<View
|
|
72
|
+
style={{
|
|
73
|
+
flex: 1,
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
paddingTop: 32,
|
|
76
|
+
paddingBottom: 24
|
|
77
|
+
}}>
|
|
78
|
+
{primaryBtn ? primaryBtn : <></>}
|
|
79
|
+
{secondaryBtn ? secondaryBtn : <></>}
|
|
80
|
+
</View>
|
|
81
|
+
) : (
|
|
82
|
+
<></>
|
|
83
|
+
)}
|
|
72
84
|
</View>
|
|
73
|
-
|
|
74
|
-
{trailingIcon && (
|
|
75
|
-
<TouchableOpacity
|
|
76
|
-
testID='trailingIcon'
|
|
77
|
-
style={[styles.trailingIconContainer, trailingIconContainerStyle]}
|
|
78
|
-
onPress={onTrailingIconPress}
|
|
79
|
-
activeOpacity={onTrailingIconPress ? activeOpacity : 1}>
|
|
80
|
-
<Icon
|
|
81
|
-
style={{ ...styles.trailingIcon, ...trailingIconStyle }}
|
|
82
|
-
source={trailingIcon}
|
|
83
|
-
/>
|
|
84
|
-
</TouchableOpacity>
|
|
85
|
-
)}
|
|
86
85
|
</TouchableOpacity>
|
|
87
86
|
);
|
|
88
87
|
}
|
|
@@ -90,18 +89,12 @@ function BaseToast({
|
|
|
90
89
|
BaseToast.HEIGHT = HEIGHT;
|
|
91
90
|
|
|
92
91
|
BaseToast.propTypes = {
|
|
93
|
-
leadingIcon:
|
|
94
|
-
trailingIcon:
|
|
92
|
+
leadingIcon: PropTypes.node,
|
|
93
|
+
trailingIcon: PropTypes.node,
|
|
95
94
|
text1: PropTypes.string,
|
|
96
95
|
text2: PropTypes.string,
|
|
97
96
|
onPress: PropTypes.func,
|
|
98
|
-
onTrailingIconPress: PropTypes.func,
|
|
99
|
-
onLeadingIconPress: PropTypes.func,
|
|
100
97
|
style: stylePropType,
|
|
101
|
-
leadingIconContainerStyle: stylePropType,
|
|
102
|
-
trailingIconContainerStyle: stylePropType,
|
|
103
|
-
leadingIconStyle: stylePropType,
|
|
104
|
-
trailingIconStyle: stylePropType,
|
|
105
98
|
contentContainerStyle: stylePropType,
|
|
106
99
|
text1Style: stylePropType,
|
|
107
100
|
text2Style: stylePropType,
|
|
@@ -111,18 +104,12 @@ BaseToast.propTypes = {
|
|
|
111
104
|
};
|
|
112
105
|
|
|
113
106
|
BaseToast.defaultProps = {
|
|
114
|
-
leadingIcon:
|
|
115
|
-
trailingIcon:
|
|
107
|
+
leadingIcon: null,
|
|
108
|
+
trailingIcon: null,
|
|
116
109
|
text1: undefined,
|
|
117
110
|
text2: undefined,
|
|
118
111
|
onPress: undefined,
|
|
119
|
-
onLeadingIconPress: undefined,
|
|
120
|
-
onTrailingIconPress: undefined,
|
|
121
112
|
style: undefined,
|
|
122
|
-
leadingIconContainerStyle: undefined,
|
|
123
|
-
trailingIconContainerStyle: undefined,
|
|
124
|
-
leadingIconStyle: undefined,
|
|
125
|
-
trailingIconStyle: undefined,
|
|
126
113
|
contentContainerStyle: undefined,
|
|
127
114
|
text1Style: undefined,
|
|
128
115
|
text2Style: undefined,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import colors from '../../colors';
|
|
3
3
|
|
|
4
|
-
export const HEIGHT =
|
|
4
|
+
export const HEIGHT = 105;
|
|
5
5
|
|
|
6
6
|
export default StyleSheet.create({
|
|
7
7
|
base: {
|
|
8
8
|
flexDirection: 'row',
|
|
9
9
|
height: HEIGHT,
|
|
10
|
-
width: '90%',
|
|
11
10
|
borderRadius: 6,
|
|
12
11
|
backgroundColor: colors.white,
|
|
13
12
|
shadowOffset: { width: 0, height: 0 },
|
|
@@ -15,42 +14,27 @@ export default StyleSheet.create({
|
|
|
15
14
|
shadowRadius: 6,
|
|
16
15
|
elevation: 2
|
|
17
16
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
leadingIconContainer: {
|
|
23
|
-
width: 50,
|
|
24
|
-
justifyContent: 'center',
|
|
25
|
-
alignItems: 'center'
|
|
17
|
+
borderTop: {
|
|
18
|
+
borderTopWidth: 5,
|
|
19
|
+
borderTopColor: colors.alto
|
|
26
20
|
},
|
|
27
21
|
contentContainer: {
|
|
22
|
+
paddingLeft: 20,
|
|
28
23
|
flex: 1,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
trailingIconContainer: {
|
|
33
|
-
width: 40,
|
|
34
|
-
justifyContent: 'center',
|
|
35
|
-
alignItems: 'center'
|
|
36
|
-
},
|
|
37
|
-
leadingIcon: {
|
|
38
|
-
width: 20,
|
|
39
|
-
height: 20
|
|
40
|
-
},
|
|
41
|
-
trailingIcon: {
|
|
42
|
-
width: 9,
|
|
43
|
-
height: 9
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
justifyContent: 'flex-start'
|
|
44
26
|
},
|
|
45
27
|
text1: {
|
|
46
|
-
fontSize:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
28
|
+
fontSize: 15,
|
|
29
|
+
fontFamily: 'Source Sans Pro',
|
|
30
|
+
width: '100%',
|
|
31
|
+
fontWeight: '600',
|
|
32
|
+
marginRight: 2
|
|
50
33
|
},
|
|
51
34
|
text2: {
|
|
52
|
-
fontSize:
|
|
53
|
-
|
|
54
|
-
width: '100%'
|
|
35
|
+
fontSize: 15,
|
|
36
|
+
fontFamily: 'Source Sans Pro',
|
|
37
|
+
width: '100%',
|
|
38
|
+
fontWeight: '400'
|
|
55
39
|
}
|
|
56
40
|
});
|