@100mslive/react-native-room-kit 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/HMSRoomSetup.js +49 -0
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Add/assets/add-circle.png +0 -0
- package/lib/commonjs/Icons/Add/assets/add-circle@2x.png +0 -0
- package/lib/commonjs/Icons/Add/assets/add-circle@3x.png +0 -0
- package/lib/commonjs/Icons/Add/index.js +35 -0
- package/lib/commonjs/Icons/Add/index.js.map +1 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox@2x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox@3x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/index.js +34 -0
- package/lib/commonjs/Icons/CheckBox/index.js.map +1 -0
- package/lib/commonjs/Icons/Poll/assets/poll.png +0 -0
- package/lib/commonjs/Icons/Poll/assets/poll@2x.png +0 -0
- package/lib/commonjs/Icons/Poll/assets/poll@3x.png +0 -0
- package/lib/commonjs/Icons/Poll/index.js +33 -0
- package/lib/commonjs/Icons/Poll/index.js.map +1 -0
- package/lib/commonjs/Icons/PollVote/assets/poll-vote.png +0 -0
- package/lib/commonjs/Icons/PollVote/assets/poll-vote@2x.png +0 -0
- package/lib/commonjs/Icons/PollVote/assets/poll-vote@3x.png +0 -0
- package/lib/commonjs/Icons/PollVote/index.js +33 -0
- package/lib/commonjs/Icons/PollVote/index.js.map +1 -0
- package/lib/commonjs/Icons/Quiz/assets/quiz.png +0 -0
- package/lib/commonjs/Icons/Quiz/assets/quiz@2x.png +0 -0
- package/lib/commonjs/Icons/Quiz/assets/quiz@3x.png +0 -0
- package/lib/commonjs/Icons/Quiz/index.js +33 -0
- package/lib/commonjs/Icons/Quiz/index.js.map +1 -0
- package/lib/commonjs/Icons/TrashBin/assets/trash-bin.png +0 -0
- package/lib/commonjs/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
- package/lib/commonjs/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
- package/lib/commonjs/Icons/TrashBin/index.js +34 -0
- package/lib/commonjs/Icons/TrashBin/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +66 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/CheckboxInputRow.js +53 -0
- package/lib/commonjs/components/CheckboxInputRow.js.map +1 -0
- package/lib/commonjs/components/CreatePoll.js +163 -0
- package/lib/commonjs/components/CreatePoll.js.map +1 -0
- package/lib/commonjs/components/Footer.js +6 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerEmoticons.js +2 -3
- package/lib/commonjs/components/HLSPlayerEmoticons.js.map +1 -1
- package/lib/commonjs/components/HMSBaseButton.js +4 -2
- package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +5 -1
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +4 -0
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js +95 -0
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js.map +1 -0
- package/lib/commonjs/components/HMSRoomOptions.js +2 -1
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSSecondaryButton.js +56 -0
- package/lib/commonjs/components/HMSSecondaryButton.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizQuestionResponseCard.js +185 -0
- package/lib/commonjs/components/PollAndQuizQuestionResponseCard.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizVoting.js +136 -0
- package/lib/commonjs/components/PollAndQuizVoting.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizzStateLabel.js +72 -0
- package/lib/commonjs/components/PollAndQuizzStateLabel.js.map +1 -0
- package/lib/commonjs/components/PollQDeleteConfirmationSheetView.js +68 -0
- package/lib/commonjs/components/PollQDeleteConfirmationSheetView.js.map +1 -0
- package/lib/commonjs/components/PollQuestion.js +368 -0
- package/lib/commonjs/components/PollQuestion.js.map +1 -0
- package/lib/commonjs/components/PollQuestionDeleteConfirmation.js +97 -0
- package/lib/commonjs/components/PollQuestionDeleteConfirmation.js.map +1 -0
- package/lib/commonjs/components/PollQuestions.js +189 -0
- package/lib/commonjs/components/PollQuestions.js.map +1 -0
- package/lib/commonjs/components/PollResponseProgressView.js +68 -0
- package/lib/commonjs/components/PollResponseProgressView.js.map +1 -0
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js +59 -0
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js.map +1 -0
- package/lib/commonjs/components/PollsAndQuizzesCard.js +97 -0
- package/lib/commonjs/components/PollsAndQuizzesCard.js.map +1 -0
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js +159 -0
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js.map +1 -0
- package/lib/commonjs/components/PollsConfigAndList.js +32 -0
- package/lib/commonjs/components/PollsConfigAndList.js.map +1 -0
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js +76 -0
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js.map +1 -0
- package/lib/commonjs/components/RadioInput.js +42 -0
- package/lib/commonjs/components/RadioInput.js.map +1 -0
- package/lib/commonjs/components/RadioInputRow.js +57 -0
- package/lib/commonjs/components/RadioInputRow.js.map +1 -0
- package/lib/commonjs/components/RoomSettingsModalContent.js +31 -6
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/SwitchRow.js +2 -1
- package/lib/commonjs/components/SwitchRow.js.map +1 -1
- package/lib/commonjs/hooks-util.js +26 -1
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +38 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +140 -1
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/index.js +3 -1
- package/lib/commonjs/redux/reducers/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/polls.js +251 -0
- package/lib/commonjs/redux/reducers/polls.js.map +1 -0
- package/lib/commonjs/types.js +1 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/functions.js +6 -1
- package/lib/commonjs/utils/functions.js.map +1 -1
- package/lib/commonjs/utils/types.js +1 -0
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +52 -3
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Add/assets/add-circle.png +0 -0
- package/lib/module/Icons/Add/assets/add-circle@2x.png +0 -0
- package/lib/module/Icons/Add/assets/add-circle@3x.png +0 -0
- package/lib/module/Icons/Add/index.js +27 -0
- package/lib/module/Icons/Add/index.js.map +1 -0
- package/lib/module/Icons/CheckBox/assets/checkbox-checked.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox@2x.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox@3x.png +0 -0
- package/lib/module/Icons/CheckBox/index.js +26 -0
- package/lib/module/Icons/CheckBox/index.js.map +1 -0
- package/lib/module/Icons/Poll/assets/poll.png +0 -0
- package/lib/module/Icons/Poll/assets/poll@2x.png +0 -0
- package/lib/module/Icons/Poll/assets/poll@3x.png +0 -0
- package/lib/module/Icons/Poll/index.js +25 -0
- package/lib/module/Icons/Poll/index.js.map +1 -0
- package/lib/module/Icons/PollVote/assets/poll-vote.png +0 -0
- package/lib/module/Icons/PollVote/assets/poll-vote@2x.png +0 -0
- package/lib/module/Icons/PollVote/assets/poll-vote@3x.png +0 -0
- package/lib/module/Icons/PollVote/index.js +25 -0
- package/lib/module/Icons/PollVote/index.js.map +1 -0
- package/lib/module/Icons/Quiz/assets/quiz.png +0 -0
- package/lib/module/Icons/Quiz/assets/quiz@2x.png +0 -0
- package/lib/module/Icons/Quiz/assets/quiz@3x.png +0 -0
- package/lib/module/Icons/Quiz/index.js +25 -0
- package/lib/module/Icons/Quiz/index.js.map +1 -0
- package/lib/module/Icons/TrashBin/assets/trash-bin.png +0 -0
- package/lib/module/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
- package/lib/module/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
- package/lib/module/Icons/TrashBin/index.js +26 -0
- package/lib/module/Icons/TrashBin/index.js.map +1 -0
- package/lib/module/Icons/index.js +6 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/CheckboxInputRow.js +45 -0
- package/lib/module/components/CheckboxInputRow.js.map +1 -0
- package/lib/module/components/CreatePoll.js +155 -0
- package/lib/module/components/CreatePoll.js.map +1 -0
- package/lib/module/components/Footer.js +6 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/HLSPlayerEmoticons.js +2 -3
- package/lib/module/components/HLSPlayerEmoticons.js.map +1 -1
- package/lib/module/components/HMSBaseButton.js +5 -3
- package/lib/module/components/HMSBaseButton.js.map +1 -1
- package/lib/module/components/HMSNotification.js +5 -1
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +4 -0
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSPollsQuizzesNotification.js +86 -0
- package/lib/module/components/HMSPollsQuizzesNotification.js.map +1 -0
- package/lib/module/components/HMSRoomOptions.js +2 -1
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSSecondaryButton.js +47 -0
- package/lib/module/components/HMSSecondaryButton.js.map +1 -0
- package/lib/module/components/PollAndQuizQuestionResponseCard.js +176 -0
- package/lib/module/components/PollAndQuizQuestionResponseCard.js.map +1 -0
- package/lib/module/components/PollAndQuizVoting.js +127 -0
- package/lib/module/components/PollAndQuizVoting.js.map +1 -0
- package/lib/module/components/PollAndQuizzStateLabel.js +63 -0
- package/lib/module/components/PollAndQuizzStateLabel.js.map +1 -0
- package/lib/module/components/PollQDeleteConfirmationSheetView.js +60 -0
- package/lib/module/components/PollQDeleteConfirmationSheetView.js.map +1 -0
- package/lib/module/components/PollQuestion.js +359 -0
- package/lib/module/components/PollQuestion.js.map +1 -0
- package/lib/module/components/PollQuestionDeleteConfirmation.js +88 -0
- package/lib/module/components/PollQuestionDeleteConfirmation.js.map +1 -0
- package/lib/module/components/PollQuestions.js +180 -0
- package/lib/module/components/PollQuestions.js.map +1 -0
- package/lib/module/components/PollResponseProgressView.js +59 -0
- package/lib/module/components/PollResponseProgressView.js.map +1 -0
- package/lib/module/components/PollsAndQuizBottomSheet.js +50 -0
- package/lib/module/components/PollsAndQuizBottomSheet.js.map +1 -0
- package/lib/module/components/PollsAndQuizzesCard.js +88 -0
- package/lib/module/components/PollsAndQuizzesCard.js.map +1 -0
- package/lib/module/components/PollsAndQuizzesModalContent.js +150 -0
- package/lib/module/components/PollsAndQuizzesModalContent.js.map +1 -0
- package/lib/module/components/PollsConfigAndList.js +23 -0
- package/lib/module/components/PollsConfigAndList.js.map +1 -0
- package/lib/module/components/PreviousPollsAndQuizzesList.js +67 -0
- package/lib/module/components/PreviousPollsAndQuizzesList.js.map +1 -0
- package/lib/module/components/RadioInput.js +34 -0
- package/lib/module/components/RadioInput.js.map +1 -0
- package/lib/module/components/RadioInputRow.js +49 -0
- package/lib/module/components/RadioInputRow.js.map +1 -0
- package/lib/module/components/RoomSettingsModalContent.js +32 -7
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/SwitchRow.js +2 -1
- package/lib/module/components/SwitchRow.js.map +1 -1
- package/lib/module/hooks-util.js +26 -2
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +39 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +116 -1
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/index.js +3 -1
- package/lib/module/redux/reducers/index.js.map +1 -1
- package/lib/module/redux/reducers/polls.js +245 -0
- package/lib/module/redux/reducers/polls.js.map +1 -0
- package/lib/module/types.js +1 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/functions.js +5 -1
- package/lib/module/utils/functions.js.map +1 -1
- package/lib/module/utils/types.js +1 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Add/index.d.ts +8 -0
- package/lib/typescript/Icons/Add/index.d.ts.map +1 -0
- package/lib/typescript/Icons/CheckBox/index.d.ts +8 -0
- package/lib/typescript/Icons/CheckBox/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Poll/index.d.ts +7 -0
- package/lib/typescript/Icons/Poll/index.d.ts.map +1 -0
- package/lib/typescript/Icons/PollVote/index.d.ts +7 -0
- package/lib/typescript/Icons/PollVote/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Quiz/index.d.ts +7 -0
- package/lib/typescript/Icons/Quiz/index.d.ts.map +1 -0
- package/lib/typescript/Icons/TrashBin/index.d.ts +7 -0
- package/lib/typescript/Icons/TrashBin/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +6 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/CheckboxInputRow.d.ts +13 -0
- package/lib/typescript/components/CheckboxInputRow.d.ts.map +1 -0
- package/lib/typescript/components/CreatePoll.d.ts +5 -0
- package/lib/typescript/components/CreatePoll.d.ts.map +1 -0
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerEmoticons.d.ts.map +1 -1
- package/lib/typescript/components/HMSBaseButton.d.ts +2 -1
- package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSPollsQuizzesNotification.d.ts +7 -0
- package/lib/typescript/components/HMSPollsQuizzesNotification.d.ts.map +1 -0
- package/lib/typescript/components/HMSPrimaryButton.d.ts +1 -1
- package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/HMSSecondaryButton.d.ts +15 -0
- package/lib/typescript/components/HMSSecondaryButton.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizQuestionResponseCard.d.ts +13 -0
- package/lib/typescript/components/PollAndQuizQuestionResponseCard.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts +6 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizzStateLabel.d.ts +7 -0
- package/lib/typescript/components/PollAndQuizzStateLabel.d.ts.map +1 -0
- package/lib/typescript/components/PollQDeleteConfirmationSheetView.d.ts +6 -0
- package/lib/typescript/components/PollQDeleteConfirmationSheetView.d.ts.map +1 -0
- package/lib/typescript/components/PollQuestion.d.ts +14 -0
- package/lib/typescript/components/PollQuestion.d.ts.map +1 -0
- package/lib/typescript/components/PollQuestionDeleteConfirmation.d.ts +6 -0
- package/lib/typescript/components/PollQuestionDeleteConfirmation.d.ts.map +1 -0
- package/lib/typescript/components/PollQuestions.d.ts +6 -0
- package/lib/typescript/components/PollQuestions.d.ts.map +1 -0
- package/lib/typescript/components/PollResponseProgressView.d.ts +9 -0
- package/lib/typescript/components/PollResponseProgressView.d.ts.map +1 -0
- package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts +3 -0
- package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/PollsAndQuizzesCard.d.ts +7 -0
- package/lib/typescript/components/PollsAndQuizzesCard.d.ts.map +1 -0
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts +7 -0
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts.map +1 -0
- package/lib/typescript/components/PollsConfigAndList.d.ts +5 -0
- package/lib/typescript/components/PollsConfigAndList.d.ts.map +1 -0
- package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts +5 -0
- package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts.map +1 -0
- package/lib/typescript/components/RadioInput.d.ts +9 -0
- package/lib/typescript/components/RadioInput.d.ts.map +1 -0
- package/lib/typescript/components/RadioInputRow.d.ts +16 -0
- package/lib/typescript/components/RadioInputRow.d.ts.map +1 -0
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/SwitchRow.d.ts +2 -1
- package/lib/typescript/components/SwitchRow.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +1 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +161 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +36 -2
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +13 -0
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +13 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/polls.d.ts +19 -0
- package/lib/typescript/redux/reducers/polls.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +3 -1
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/functions.d.ts +2 -0
- package/lib/typescript/utils/functions.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/HMSRoomSetup.tsx +61 -0
- package/src/Icons/Add/assets/add-circle.png +0 -0
- package/src/Icons/Add/assets/add-circle@2x.png +0 -0
- package/src/Icons/Add/assets/add-circle@3x.png +0 -0
- package/src/Icons/Add/index.tsx +37 -0
- package/src/Icons/CheckBox/assets/checkbox-checked.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox@2x.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox@3x.png +0 -0
- package/src/Icons/CheckBox/index.tsx +40 -0
- package/src/Icons/Poll/assets/poll.png +0 -0
- package/src/Icons/Poll/assets/poll@2x.png +0 -0
- package/src/Icons/Poll/assets/poll@3x.png +0 -0
- package/src/Icons/Poll/index.tsx +30 -0
- package/src/Icons/PollVote/assets/poll-vote.png +0 -0
- package/src/Icons/PollVote/assets/poll-vote@2x.png +0 -0
- package/src/Icons/PollVote/assets/poll-vote@3x.png +0 -0
- package/src/Icons/PollVote/index.tsx +33 -0
- package/src/Icons/Quiz/assets/quiz.png +0 -0
- package/src/Icons/Quiz/assets/quiz@2x.png +0 -0
- package/src/Icons/Quiz/assets/quiz@3x.png +0 -0
- package/src/Icons/Quiz/index.tsx +30 -0
- package/src/Icons/TrashBin/assets/trash-bin.png +0 -0
- package/src/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
- package/src/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
- package/src/Icons/TrashBin/index.tsx +34 -0
- package/src/Icons/index.ts +6 -0
- package/src/components/CheckboxInputRow.tsx +68 -0
- package/src/components/CreatePoll.tsx +176 -0
- package/src/components/Footer.tsx +7 -1
- package/src/components/HLSPlayerEmoticons.tsx +2 -3
- package/src/components/HMSBaseButton.tsx +8 -3
- package/src/components/HMSNotification.tsx +1 -1
- package/src/components/HMSNotifications.tsx +7 -0
- package/src/components/HMSPollsQuizzesNotification.tsx +110 -0
- package/src/components/HMSPrimaryButton.tsx +1 -1
- package/src/components/HMSRoomOptions.tsx +3 -0
- package/src/components/HMSSecondaryButton.tsx +72 -0
- package/src/components/PollAndQuizQuestionResponseCard.tsx +311 -0
- package/src/components/PollAndQuizVoting.tsx +157 -0
- package/src/components/PollAndQuizzStateLabel.tsx +83 -0
- package/src/components/PollQDeleteConfirmationSheetView.tsx +82 -0
- package/src/components/PollQuestion.tsx +553 -0
- package/src/components/PollQuestionDeleteConfirmation.tsx +110 -0
- package/src/components/PollQuestions.tsx +259 -0
- package/src/components/PollResponseProgressView.tsx +77 -0
- package/src/components/PollsAndQuizBottomSheet.tsx +83 -0
- package/src/components/PollsAndQuizzesCard.tsx +111 -0
- package/src/components/PollsAndQuizzesModalContent.tsx +198 -0
- package/src/components/PollsConfigAndList.tsx +29 -0
- package/src/components/PreviousPollsAndQuizzesList.tsx +103 -0
- package/src/components/RadioInput.tsx +44 -0
- package/src/components/RadioInputRow.tsx +73 -0
- package/src/components/RoomSettingsModalContent.tsx +23 -0
- package/src/components/SwitchRow.tsx +4 -2
- package/src/hooks-util.ts +41 -0
- package/src/redux/actionTypes.ts +221 -0
- package/src/redux/actions/index.ts +218 -1
- package/src/redux/reducers/index.ts +2 -0
- package/src/redux/reducers/polls.ts +328 -0
- package/src/types.ts +2 -0
- package/src/utils/functions.ts +14 -0
- package/src/utils/types.ts +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
6
|
+
import { CheckBoxIcon } from '../Icons';
|
|
7
|
+
|
|
8
|
+
interface CheckboxInputRowProps {
|
|
9
|
+
text: string;
|
|
10
|
+
selected: boolean;
|
|
11
|
+
onChange(value: boolean): void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
textStyle?: StyleProp<TextStyle>;
|
|
14
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const CheckboxInputRow: React.FC<CheckboxInputRowProps> = ({
|
|
18
|
+
text,
|
|
19
|
+
containerStyle,
|
|
20
|
+
selected,
|
|
21
|
+
disabled,
|
|
22
|
+
textStyle,
|
|
23
|
+
onChange,
|
|
24
|
+
}) => {
|
|
25
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
26
|
+
surfaceHighRegularText: {
|
|
27
|
+
color: theme.palette.on_surface_high,
|
|
28
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<TouchableOpacity
|
|
34
|
+
disabled={disabled}
|
|
35
|
+
style={[styles.container, containerStyle]}
|
|
36
|
+
onPress={() => onChange(!selected)}
|
|
37
|
+
>
|
|
38
|
+
<View style={styles.radioWrapper}>
|
|
39
|
+
<CheckBoxIcon type={selected ? 'checked' : 'unchecked'} />
|
|
40
|
+
</View>
|
|
41
|
+
|
|
42
|
+
<Text
|
|
43
|
+
style={[
|
|
44
|
+
styles.normalText,
|
|
45
|
+
hmsRoomStyles.surfaceHighRegularText,
|
|
46
|
+
textStyle,
|
|
47
|
+
]}
|
|
48
|
+
>
|
|
49
|
+
{text}
|
|
50
|
+
</Text>
|
|
51
|
+
</TouchableOpacity>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
container: {
|
|
57
|
+
flexDirection: 'row',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
},
|
|
60
|
+
radioWrapper: {
|
|
61
|
+
padding: 8,
|
|
62
|
+
marginRight: 8,
|
|
63
|
+
},
|
|
64
|
+
normalText: {
|
|
65
|
+
fontSize: 16,
|
|
66
|
+
lineHeight: 24,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, Switch } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
|
|
5
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
6
|
+
import { BottomSheet } from './BottomSheet';
|
|
7
|
+
import { HMSTextInput } from './HMSTextInput';
|
|
8
|
+
import { HMSPrimaryButton } from './HMSPrimaryButton';
|
|
9
|
+
import { COLORS } from '../utils/theme';
|
|
10
|
+
import type { RootState } from '../redux';
|
|
11
|
+
import { setPollConfig, setPollName, setPollStage } from '../redux/actions';
|
|
12
|
+
import { CreatePollStages } from '../redux/actionTypes';
|
|
13
|
+
import type { PollConfig } from '../redux/actionTypes';
|
|
14
|
+
|
|
15
|
+
export interface CreatePollProps {}
|
|
16
|
+
|
|
17
|
+
export const CreatePoll: React.FC<CreatePollProps> = ({}) => {
|
|
18
|
+
const dispatch = useDispatch();
|
|
19
|
+
const pollName = useSelector((state: RootState) => state.polls.pollName);
|
|
20
|
+
const pollConfig = useSelector((state: RootState) => state.polls.pollConfig);
|
|
21
|
+
|
|
22
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
23
|
+
typeSelectionLabel: {
|
|
24
|
+
color: theme.palette.on_surface_medium,
|
|
25
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
26
|
+
},
|
|
27
|
+
typeLabel: {
|
|
28
|
+
color: theme.palette.on_surface_high,
|
|
29
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
30
|
+
},
|
|
31
|
+
typeLabelContainer: {
|
|
32
|
+
borderColor: theme.palette.border_bright,
|
|
33
|
+
},
|
|
34
|
+
typeLabelIconContainer: {
|
|
35
|
+
borderColor: theme.palette.border_bright,
|
|
36
|
+
backgroundColor: theme.palette.surface_bright,
|
|
37
|
+
},
|
|
38
|
+
pollNameLabel: {
|
|
39
|
+
color: theme.palette.on_surface_high,
|
|
40
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
41
|
+
},
|
|
42
|
+
}));
|
|
43
|
+
|
|
44
|
+
const handlePollNameChange = (name: string) => {
|
|
45
|
+
dispatch(setPollName(name));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const handleConfigChange = (
|
|
49
|
+
configKey: keyof PollConfig,
|
|
50
|
+
configValue: boolean
|
|
51
|
+
) => {
|
|
52
|
+
dispatch(setPollConfig({ [configKey]: configValue }));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const addQuestions = () => {
|
|
56
|
+
if (pollName.trim().length > 0) {
|
|
57
|
+
dispatch(setPollStage(CreatePollStages.POLL_QUESTION_CONFIG));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<View style={styles.contentContainer}>
|
|
63
|
+
<Text style={[styles.pollNameLabel, hmsRoomStyles.pollNameLabel]}>
|
|
64
|
+
Poll Name
|
|
65
|
+
</Text>
|
|
66
|
+
|
|
67
|
+
<HMSTextInput
|
|
68
|
+
style={styles.textInput}
|
|
69
|
+
value={pollName}
|
|
70
|
+
autoFocus={false}
|
|
71
|
+
onChangeText={handlePollNameChange}
|
|
72
|
+
placeholder={'My Poll'}
|
|
73
|
+
/>
|
|
74
|
+
|
|
75
|
+
<BottomSheet.Divider style={{ marginVertical: 24 }} />
|
|
76
|
+
|
|
77
|
+
{[
|
|
78
|
+
{
|
|
79
|
+
id: 'voteCountHidden' as const,
|
|
80
|
+
label: 'Hide vote count',
|
|
81
|
+
enabled: pollConfig.voteCountHidden,
|
|
82
|
+
},
|
|
83
|
+
].map((item) => {
|
|
84
|
+
return (
|
|
85
|
+
<View key={item.id} style={{ marginTop: 4, flexDirection: 'row' }}>
|
|
86
|
+
<Text
|
|
87
|
+
style={[
|
|
88
|
+
styles.pollNameLabel,
|
|
89
|
+
hmsRoomStyles.typeSelectionLabel,
|
|
90
|
+
{ flexGrow: 1 },
|
|
91
|
+
]}
|
|
92
|
+
>
|
|
93
|
+
{item.label}
|
|
94
|
+
</Text>
|
|
95
|
+
|
|
96
|
+
<Switch
|
|
97
|
+
value={item.enabled}
|
|
98
|
+
thumbColor={COLORS.WHITE}
|
|
99
|
+
trackColor={{
|
|
100
|
+
true: COLORS.PRIMARY.DEFAULT,
|
|
101
|
+
false: COLORS.SECONDARY.DISABLED,
|
|
102
|
+
}}
|
|
103
|
+
onValueChange={(value) => handleConfigChange(item.id, value)}
|
|
104
|
+
/>
|
|
105
|
+
</View>
|
|
106
|
+
);
|
|
107
|
+
})}
|
|
108
|
+
|
|
109
|
+
<HMSPrimaryButton
|
|
110
|
+
disabled={!pollName.trim()}
|
|
111
|
+
title="Create Poll"
|
|
112
|
+
onPress={addQuestions}
|
|
113
|
+
loading={false}
|
|
114
|
+
style={{ marginTop: 24 }}
|
|
115
|
+
/>
|
|
116
|
+
</View>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// {/* <Text style={[styles.typeSelectionLabel, hmsRoomStyles.typeSelectionLabel]}>
|
|
121
|
+
// Select the type you want to continue with
|
|
122
|
+
// </Text>
|
|
123
|
+
// <View style={{ flexDirection: 'row', marginTop: 8, marginBottom: 24, }}>
|
|
124
|
+
// {[
|
|
125
|
+
// {
|
|
126
|
+
// id: 'poll',
|
|
127
|
+
// label: 'Poll',
|
|
128
|
+
// icon: <PollIcon />,
|
|
129
|
+
// pressHandler: undefined,
|
|
130
|
+
// active: true,
|
|
131
|
+
// },
|
|
132
|
+
// {
|
|
133
|
+
// id: 'quiz',
|
|
134
|
+
// label: 'Quiz',
|
|
135
|
+
// icon: <QuizIcon />,
|
|
136
|
+
// pressHandler: undefined,
|
|
137
|
+
// active: false,
|
|
138
|
+
// },
|
|
139
|
+
// ].map((item, idx) => {
|
|
140
|
+
// const isFirst = idx === 0;
|
|
141
|
+
// const isActive = item.active;
|
|
142
|
+
// return (
|
|
143
|
+
// <React.Fragment key={item.id}>
|
|
144
|
+
// {isFirst ? null : <View style={{ width: 16 }} />}
|
|
145
|
+
|
|
146
|
+
// <View style={{ flexGrow: 1 }}>
|
|
147
|
+
// <TouchableOpacity
|
|
148
|
+
// onPress={item.pressHandler}
|
|
149
|
+
// style={[{ flexDirection: 'row', padding: 8, borderRadius: 8, borderWidth: 1, alignItems: 'center', }, hmsRoomStyles.typeLabelContainer]}
|
|
150
|
+
// >
|
|
151
|
+
// <View style={[{ padding: 8, borderRadius: 4, borderWidth: 1, marginRight: 16 }, hmsRoomStyles.typeLabelIconContainer]}>{item.icon}</View>
|
|
152
|
+
// <Text style={[{ fontSize: 16, lineHeight: 24, letterSpacing: 0.15 }, hmsRoomStyles.typeLabel]}>{item.label}</Text>
|
|
153
|
+
// </TouchableOpacity>
|
|
154
|
+
// </View>
|
|
155
|
+
// </React.Fragment>
|
|
156
|
+
// )
|
|
157
|
+
// })}
|
|
158
|
+
// </View> */}
|
|
159
|
+
|
|
160
|
+
const styles = StyleSheet.create({
|
|
161
|
+
contentContainer: {
|
|
162
|
+
marginHorizontal: 24,
|
|
163
|
+
},
|
|
164
|
+
typeSelectionLabel: {
|
|
165
|
+
fontSize: 12,
|
|
166
|
+
lineHeight: 16,
|
|
167
|
+
},
|
|
168
|
+
pollNameLabel: {
|
|
169
|
+
fontSize: 14,
|
|
170
|
+
lineHeight: 20,
|
|
171
|
+
},
|
|
172
|
+
textInput: {
|
|
173
|
+
flex: undefined,
|
|
174
|
+
marginTop: 8,
|
|
175
|
+
},
|
|
176
|
+
});
|
|
@@ -55,6 +55,11 @@ export const _Footer: React.FC<FooterProps> = () => {
|
|
|
55
55
|
!!state.hmsStates.localPeer?.role?.permissions?.browserRecording
|
|
56
56
|
);
|
|
57
57
|
|
|
58
|
+
const canReadOrWritePoll = useSelector((state: RootState) => {
|
|
59
|
+
const permissions = state.hmsStates.localPeer?.role?.permissions;
|
|
60
|
+
return permissions?.pollRead || permissions?.pollWrite;
|
|
61
|
+
});
|
|
62
|
+
|
|
58
63
|
const canEditUsernameFromRoomModal = isViewer && !editUsernameDisabled;
|
|
59
64
|
|
|
60
65
|
const canShowHandRaiseInFooter = !isOnStage && isViewer; // on_stage_exp object undefined && viewer -> show in footer
|
|
@@ -66,7 +71,8 @@ export const _Footer: React.FC<FooterProps> = () => {
|
|
|
66
71
|
canShowBRB ||
|
|
67
72
|
canShowHandRaiseInRoomModal ||
|
|
68
73
|
canStartRecording ||
|
|
69
|
-
canEditUsernameFromRoomModal
|
|
74
|
+
canEditUsernameFromRoomModal ||
|
|
75
|
+
canReadOrWritePoll;
|
|
70
76
|
|
|
71
77
|
const footerActionButtons = useMemo(() => {
|
|
72
78
|
const actions = [];
|
|
@@ -34,9 +34,8 @@ export const HLSPlayerEmoticons = () => {
|
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
} catch (error) {
|
|
37
|
-
const message = `HLS Cue Payload is not JSON: ${error}`;
|
|
38
|
-
console.
|
|
39
|
-
Toast.showWithGravity(message, Toast.LONG, Toast.TOP);
|
|
37
|
+
const message = `HLSPlayerEmoticons: HLS Cue Payload is not JSON: ${error}`;
|
|
38
|
+
console.log(message);
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
}, []);
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
StyleSheet,
|
|
5
5
|
Text,
|
|
6
6
|
TouchableHighlight,
|
|
7
|
+
TouchableOpacity,
|
|
7
8
|
View,
|
|
8
9
|
} from 'react-native';
|
|
9
10
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
@@ -18,7 +19,7 @@ import type {
|
|
|
18
19
|
export interface HMSBaseButtonProps {
|
|
19
20
|
title: string;
|
|
20
21
|
loading: boolean;
|
|
21
|
-
onPress(): void;
|
|
22
|
+
onPress(e: any): void;
|
|
22
23
|
wrapWithGestureDetector?: boolean;
|
|
23
24
|
testID?: TouchableHighlightProps['testID'];
|
|
24
25
|
underlayColor?: ColorValue | undefined;
|
|
@@ -27,6 +28,7 @@ export interface HMSBaseButtonProps {
|
|
|
27
28
|
textStyle?: StyleProp<TextStyle>;
|
|
28
29
|
disabled?: boolean;
|
|
29
30
|
leftComponent?: React.ReactElement | null;
|
|
31
|
+
useTouchableOpacity?: boolean;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export const HMSBaseButton: React.FC<HMSBaseButtonProps> = ({
|
|
@@ -41,9 +43,12 @@ export const HMSBaseButton: React.FC<HMSBaseButtonProps> = ({
|
|
|
41
43
|
disabled,
|
|
42
44
|
leftComponent,
|
|
43
45
|
wrapWithGestureDetector,
|
|
46
|
+
useTouchableOpacity,
|
|
44
47
|
}) => {
|
|
48
|
+
const Touchable = useTouchableOpacity ? TouchableOpacity : TouchableHighlight;
|
|
49
|
+
|
|
45
50
|
const button = (
|
|
46
|
-
<
|
|
51
|
+
<Touchable
|
|
47
52
|
testID={testID}
|
|
48
53
|
underlayColor={underlayColor}
|
|
49
54
|
style={[styles.button, style]}
|
|
@@ -70,7 +75,7 @@ export const HMSBaseButton: React.FC<HMSBaseButtonProps> = ({
|
|
|
70
75
|
<Text style={[styles.text, textStyle]}>{title}</Text>
|
|
71
76
|
</View>
|
|
72
77
|
</>
|
|
73
|
-
</
|
|
78
|
+
</Touchable>
|
|
74
79
|
);
|
|
75
80
|
|
|
76
81
|
if (wrapWithGestureDetector) {
|
|
@@ -12,6 +12,7 @@ import { HMSNotification } from './HMSNotification';
|
|
|
12
12
|
import { AlertTriangleIcon } from '../Icons';
|
|
13
13
|
import { HMSReconnectingNotification } from './HMSReconnectingNotification';
|
|
14
14
|
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
15
|
+
import { HMSPollsQuizzesNotification } from './HMSPollsQuizzesNotification';
|
|
15
16
|
|
|
16
17
|
export interface HMSNotificationsProps {}
|
|
17
18
|
|
|
@@ -149,6 +150,12 @@ export const HMSNotifications: React.FC<HMSNotificationsProps> = () => {
|
|
|
149
150
|
autoDismiss={true}
|
|
150
151
|
dismissable={true}
|
|
151
152
|
/>
|
|
153
|
+
) : notification.type === NotificationTypes.POLLS_AND_QUIZZES &&
|
|
154
|
+
'payload' in notification ? (
|
|
155
|
+
<HMSPollsQuizzesNotification
|
|
156
|
+
id={notification.id}
|
|
157
|
+
payload={notification.payload}
|
|
158
|
+
/>
|
|
152
159
|
) : null}
|
|
153
160
|
</View>
|
|
154
161
|
);
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { batch, useDispatch } from 'react-redux';
|
|
3
|
+
import { StyleSheet, Text, TouchableHighlight } from 'react-native';
|
|
4
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
5
|
+
import type { HMSPoll } from '@100mslive/react-native-hms';
|
|
6
|
+
import { HMSPollType, HMSPollUpdateType } from '@100mslive/react-native-hms';
|
|
7
|
+
|
|
8
|
+
import { PollVoteIcon } from '../Icons';
|
|
9
|
+
import {
|
|
10
|
+
useHMSRoomColorPalette,
|
|
11
|
+
useHMSRoomStyleSheet,
|
|
12
|
+
useModalType,
|
|
13
|
+
} from '../hooks-util';
|
|
14
|
+
import { HMSNotification } from './HMSNotification';
|
|
15
|
+
import { ModalTypes } from '../utils/types';
|
|
16
|
+
import {
|
|
17
|
+
removeNotification,
|
|
18
|
+
setPollStage,
|
|
19
|
+
setSelectedPollId,
|
|
20
|
+
} from '../redux/actions';
|
|
21
|
+
import { CreatePollStages } from '../redux/actionTypes';
|
|
22
|
+
|
|
23
|
+
export interface HMSPollsQuizzesNotificationProps {
|
|
24
|
+
id: string;
|
|
25
|
+
payload: any;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const HMSPollsQuizzesNotification: React.FC<
|
|
29
|
+
HMSPollsQuizzesNotificationProps
|
|
30
|
+
> = ({ id, payload }) => {
|
|
31
|
+
const { poll, pollUpdateType } = payload as {
|
|
32
|
+
poll: HMSPoll;
|
|
33
|
+
pollUpdateType: HMSPollUpdateType;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const dispatch = useDispatch();
|
|
37
|
+
const { handleModalVisibleType } = useModalType();
|
|
38
|
+
const { secondary_dim: secondaryDimColor } = useHMSRoomColorPalette();
|
|
39
|
+
// const canVoteOnPoll = useSelector((state: RootState) => {
|
|
40
|
+
// const permissions = state.hmsStates.localPeer?.role?.permissions;
|
|
41
|
+
// return permissions?.pollRead;
|
|
42
|
+
// });
|
|
43
|
+
|
|
44
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
45
|
+
button: {
|
|
46
|
+
backgroundColor: theme.palette.secondary_default,
|
|
47
|
+
},
|
|
48
|
+
buttonText: {
|
|
49
|
+
color: theme.palette.on_secondary_high,
|
|
50
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
|
|
54
|
+
const handleVotePress = () => {
|
|
55
|
+
// if (!canVoteOnPoll) {
|
|
56
|
+
// return;
|
|
57
|
+
// }
|
|
58
|
+
batch(() => {
|
|
59
|
+
dispatch(setPollStage(CreatePollStages.POLL_VOTING));
|
|
60
|
+
dispatch(setSelectedPollId(poll.pollId));
|
|
61
|
+
handleModalVisibleType(ModalTypes.POLLS_AND_QUIZZES);
|
|
62
|
+
dispatch(removeNotification(id));
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<HMSNotification
|
|
68
|
+
id={id}
|
|
69
|
+
icon={<PollVoteIcon />}
|
|
70
|
+
text={
|
|
71
|
+
poll.createdBy
|
|
72
|
+
? `${poll.createdBy.name} ${
|
|
73
|
+
pollUpdateType === HMSPollUpdateType.started ? 'started' : ''
|
|
74
|
+
} a new ${poll.type === HMSPollType.poll ? 'poll' : 'quiz'}`
|
|
75
|
+
: `A new ${poll.type === HMSPollType.poll ? 'poll' : 'quiz'} has started`
|
|
76
|
+
}
|
|
77
|
+
autoDismiss={false}
|
|
78
|
+
dismissable={true}
|
|
79
|
+
cta={
|
|
80
|
+
// canVoteOnPoll ? (
|
|
81
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
82
|
+
<TouchableHighlight
|
|
83
|
+
underlayColor={secondaryDimColor}
|
|
84
|
+
style={[styles.button, hmsRoomStyles.button]}
|
|
85
|
+
onPress={handleVotePress}
|
|
86
|
+
>
|
|
87
|
+
<Text style={[styles.buttonText, hmsRoomStyles.buttonText]}>
|
|
88
|
+
Vote
|
|
89
|
+
</Text>
|
|
90
|
+
</TouchableHighlight>
|
|
91
|
+
</GestureDetector>
|
|
92
|
+
// ) : undefined
|
|
93
|
+
}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const styles = StyleSheet.create({
|
|
99
|
+
button: {
|
|
100
|
+
paddingVertical: 8,
|
|
101
|
+
paddingHorizontal: 16,
|
|
102
|
+
borderRadius: 8,
|
|
103
|
+
marginRight: 16,
|
|
104
|
+
},
|
|
105
|
+
buttonText: {
|
|
106
|
+
fontSize: 14,
|
|
107
|
+
lineHeight: 20,
|
|
108
|
+
letterSpacing: 0.25,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
@@ -8,7 +8,7 @@ import type { HMSBaseButtonProps } from './HMSBaseButton';
|
|
|
8
8
|
export interface HMSPrimaryButtonProps {
|
|
9
9
|
title: string;
|
|
10
10
|
loading: boolean;
|
|
11
|
-
onPress(): void;
|
|
11
|
+
onPress(e: any): void;
|
|
12
12
|
testId?: HMSBaseButtonProps['testID'];
|
|
13
13
|
style?: StyleProp<ViewStyle>;
|
|
14
14
|
disabled?: boolean;
|
|
@@ -22,6 +22,7 @@ import { BottomSheet } from './BottomSheet';
|
|
|
22
22
|
import { ChangeNameModalContent } from './ChangeNameModalContent';
|
|
23
23
|
import { StopRecordingModalContent } from './StopRecordingModalContent';
|
|
24
24
|
import { TestIds } from '../utils/constants';
|
|
25
|
+
import { PollsAndQuizBottomSheet } from './PollsAndQuizBottomSheet';
|
|
25
26
|
|
|
26
27
|
interface HMSRoomOptionsProps {}
|
|
27
28
|
|
|
@@ -71,6 +72,8 @@ export const HMSRoomOptions: React.FC<HMSRoomOptionsProps> = () => {
|
|
|
71
72
|
/>
|
|
72
73
|
</BottomSheet>
|
|
73
74
|
|
|
75
|
+
<PollsAndQuizBottomSheet />
|
|
76
|
+
|
|
74
77
|
<BottomSheet
|
|
75
78
|
isVisible={modalVisible === ModalTypes.CHANGE_NAME}
|
|
76
79
|
dismissModal={dismissModal}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../hooks-util';
|
|
5
|
+
import { HMSBaseButton } from './HMSBaseButton';
|
|
6
|
+
import type { HMSBaseButtonProps } from './HMSBaseButton';
|
|
7
|
+
|
|
8
|
+
export interface HMSPrimaryButtonProps {
|
|
9
|
+
title: string;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
onPress(): void;
|
|
12
|
+
testId?: HMSBaseButtonProps['testID'];
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
leftComponent?: React.ReactElement | null;
|
|
16
|
+
wrapWithGestureDetector?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const HMSSecondaryButton: React.FC<HMSPrimaryButtonProps> = ({
|
|
20
|
+
title,
|
|
21
|
+
loading,
|
|
22
|
+
onPress,
|
|
23
|
+
testId,
|
|
24
|
+
style,
|
|
25
|
+
disabled,
|
|
26
|
+
leftComponent,
|
|
27
|
+
wrapWithGestureDetector,
|
|
28
|
+
}) => {
|
|
29
|
+
const {
|
|
30
|
+
secondary_dim: secondaryDarkColor,
|
|
31
|
+
on_secondary_high: onSecondaryHighColor,
|
|
32
|
+
} = useHMSRoomColorPalette();
|
|
33
|
+
|
|
34
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
35
|
+
button: {
|
|
36
|
+
backgroundColor: theme.palette.secondary_default,
|
|
37
|
+
},
|
|
38
|
+
disabledButton: {
|
|
39
|
+
backgroundColor: theme.palette.secondary_disabled,
|
|
40
|
+
},
|
|
41
|
+
buttonText: {
|
|
42
|
+
color: theme.palette.on_secondary_high,
|
|
43
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
44
|
+
},
|
|
45
|
+
disabledText: {
|
|
46
|
+
color: theme.palette.on_secondary_low,
|
|
47
|
+
},
|
|
48
|
+
}));
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<HMSBaseButton
|
|
52
|
+
testID={testId}
|
|
53
|
+
loaderColor={onSecondaryHighColor}
|
|
54
|
+
loading={loading}
|
|
55
|
+
onPress={onPress}
|
|
56
|
+
title={title}
|
|
57
|
+
underlayColor={secondaryDarkColor}
|
|
58
|
+
disabled={disabled}
|
|
59
|
+
leftComponent={leftComponent}
|
|
60
|
+
style={[
|
|
61
|
+
hmsRoomStyles.button,
|
|
62
|
+
disabled ? hmsRoomStyles.disabledButton : null,
|
|
63
|
+
style,
|
|
64
|
+
]}
|
|
65
|
+
textStyle={[
|
|
66
|
+
hmsRoomStyles.buttonText,
|
|
67
|
+
disabled ? hmsRoomStyles.disabledText : null,
|
|
68
|
+
]}
|
|
69
|
+
wrapWithGestureDetector={wrapWithGestureDetector}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
};
|