@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.
Files changed (362) hide show
  1. package/lib/commonjs/HMSRoomSetup.js +49 -0
  2. package/lib/commonjs/HMSRoomSetup.js.map +1 -1
  3. package/lib/commonjs/Icons/Add/assets/add-circle.png +0 -0
  4. package/lib/commonjs/Icons/Add/assets/add-circle@2x.png +0 -0
  5. package/lib/commonjs/Icons/Add/assets/add-circle@3x.png +0 -0
  6. package/lib/commonjs/Icons/Add/index.js +35 -0
  7. package/lib/commonjs/Icons/Add/index.js.map +1 -0
  8. package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked.png +0 -0
  9. package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
  10. package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
  11. package/lib/commonjs/Icons/CheckBox/assets/checkbox.png +0 -0
  12. package/lib/commonjs/Icons/CheckBox/assets/checkbox@2x.png +0 -0
  13. package/lib/commonjs/Icons/CheckBox/assets/checkbox@3x.png +0 -0
  14. package/lib/commonjs/Icons/CheckBox/index.js +34 -0
  15. package/lib/commonjs/Icons/CheckBox/index.js.map +1 -0
  16. package/lib/commonjs/Icons/Poll/assets/poll.png +0 -0
  17. package/lib/commonjs/Icons/Poll/assets/poll@2x.png +0 -0
  18. package/lib/commonjs/Icons/Poll/assets/poll@3x.png +0 -0
  19. package/lib/commonjs/Icons/Poll/index.js +33 -0
  20. package/lib/commonjs/Icons/Poll/index.js.map +1 -0
  21. package/lib/commonjs/Icons/PollVote/assets/poll-vote.png +0 -0
  22. package/lib/commonjs/Icons/PollVote/assets/poll-vote@2x.png +0 -0
  23. package/lib/commonjs/Icons/PollVote/assets/poll-vote@3x.png +0 -0
  24. package/lib/commonjs/Icons/PollVote/index.js +33 -0
  25. package/lib/commonjs/Icons/PollVote/index.js.map +1 -0
  26. package/lib/commonjs/Icons/Quiz/assets/quiz.png +0 -0
  27. package/lib/commonjs/Icons/Quiz/assets/quiz@2x.png +0 -0
  28. package/lib/commonjs/Icons/Quiz/assets/quiz@3x.png +0 -0
  29. package/lib/commonjs/Icons/Quiz/index.js +33 -0
  30. package/lib/commonjs/Icons/Quiz/index.js.map +1 -0
  31. package/lib/commonjs/Icons/TrashBin/assets/trash-bin.png +0 -0
  32. package/lib/commonjs/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
  33. package/lib/commonjs/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
  34. package/lib/commonjs/Icons/TrashBin/index.js +34 -0
  35. package/lib/commonjs/Icons/TrashBin/index.js.map +1 -0
  36. package/lib/commonjs/Icons/index.js +66 -0
  37. package/lib/commonjs/Icons/index.js.map +1 -1
  38. package/lib/commonjs/components/CheckboxInputRow.js +53 -0
  39. package/lib/commonjs/components/CheckboxInputRow.js.map +1 -0
  40. package/lib/commonjs/components/CreatePoll.js +163 -0
  41. package/lib/commonjs/components/CreatePoll.js.map +1 -0
  42. package/lib/commonjs/components/Footer.js +6 -1
  43. package/lib/commonjs/components/Footer.js.map +1 -1
  44. package/lib/commonjs/components/HLSPlayerEmoticons.js +2 -3
  45. package/lib/commonjs/components/HLSPlayerEmoticons.js.map +1 -1
  46. package/lib/commonjs/components/HMSBaseButton.js +4 -2
  47. package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
  48. package/lib/commonjs/components/HMSNotification.js +5 -1
  49. package/lib/commonjs/components/HMSNotification.js.map +1 -1
  50. package/lib/commonjs/components/HMSNotifications.js +4 -0
  51. package/lib/commonjs/components/HMSNotifications.js.map +1 -1
  52. package/lib/commonjs/components/HMSPollsQuizzesNotification.js +95 -0
  53. package/lib/commonjs/components/HMSPollsQuizzesNotification.js.map +1 -0
  54. package/lib/commonjs/components/HMSRoomOptions.js +2 -1
  55. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
  56. package/lib/commonjs/components/HMSSecondaryButton.js +56 -0
  57. package/lib/commonjs/components/HMSSecondaryButton.js.map +1 -0
  58. package/lib/commonjs/components/PollAndQuizQuestionResponseCard.js +185 -0
  59. package/lib/commonjs/components/PollAndQuizQuestionResponseCard.js.map +1 -0
  60. package/lib/commonjs/components/PollAndQuizVoting.js +136 -0
  61. package/lib/commonjs/components/PollAndQuizVoting.js.map +1 -0
  62. package/lib/commonjs/components/PollAndQuizzStateLabel.js +72 -0
  63. package/lib/commonjs/components/PollAndQuizzStateLabel.js.map +1 -0
  64. package/lib/commonjs/components/PollQDeleteConfirmationSheetView.js +68 -0
  65. package/lib/commonjs/components/PollQDeleteConfirmationSheetView.js.map +1 -0
  66. package/lib/commonjs/components/PollQuestion.js +368 -0
  67. package/lib/commonjs/components/PollQuestion.js.map +1 -0
  68. package/lib/commonjs/components/PollQuestionDeleteConfirmation.js +97 -0
  69. package/lib/commonjs/components/PollQuestionDeleteConfirmation.js.map +1 -0
  70. package/lib/commonjs/components/PollQuestions.js +189 -0
  71. package/lib/commonjs/components/PollQuestions.js.map +1 -0
  72. package/lib/commonjs/components/PollResponseProgressView.js +68 -0
  73. package/lib/commonjs/components/PollResponseProgressView.js.map +1 -0
  74. package/lib/commonjs/components/PollsAndQuizBottomSheet.js +59 -0
  75. package/lib/commonjs/components/PollsAndQuizBottomSheet.js.map +1 -0
  76. package/lib/commonjs/components/PollsAndQuizzesCard.js +97 -0
  77. package/lib/commonjs/components/PollsAndQuizzesCard.js.map +1 -0
  78. package/lib/commonjs/components/PollsAndQuizzesModalContent.js +159 -0
  79. package/lib/commonjs/components/PollsAndQuizzesModalContent.js.map +1 -0
  80. package/lib/commonjs/components/PollsConfigAndList.js +32 -0
  81. package/lib/commonjs/components/PollsConfigAndList.js.map +1 -0
  82. package/lib/commonjs/components/PreviousPollsAndQuizzesList.js +76 -0
  83. package/lib/commonjs/components/PreviousPollsAndQuizzesList.js.map +1 -0
  84. package/lib/commonjs/components/RadioInput.js +42 -0
  85. package/lib/commonjs/components/RadioInput.js.map +1 -0
  86. package/lib/commonjs/components/RadioInputRow.js +57 -0
  87. package/lib/commonjs/components/RadioInputRow.js.map +1 -0
  88. package/lib/commonjs/components/RoomSettingsModalContent.js +31 -6
  89. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  90. package/lib/commonjs/components/SwitchRow.js +2 -1
  91. package/lib/commonjs/components/SwitchRow.js.map +1 -1
  92. package/lib/commonjs/hooks-util.js +26 -1
  93. package/lib/commonjs/hooks-util.js.map +1 -1
  94. package/lib/commonjs/redux/actionTypes.js +38 -1
  95. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  96. package/lib/commonjs/redux/actions/index.js +140 -1
  97. package/lib/commonjs/redux/actions/index.js.map +1 -1
  98. package/lib/commonjs/redux/reducers/index.js +3 -1
  99. package/lib/commonjs/redux/reducers/index.js.map +1 -1
  100. package/lib/commonjs/redux/reducers/polls.js +251 -0
  101. package/lib/commonjs/redux/reducers/polls.js.map +1 -0
  102. package/lib/commonjs/types.js +1 -0
  103. package/lib/commonjs/types.js.map +1 -1
  104. package/lib/commonjs/utils/functions.js +6 -1
  105. package/lib/commonjs/utils/functions.js.map +1 -1
  106. package/lib/commonjs/utils/types.js +1 -0
  107. package/lib/commonjs/utils/types.js.map +1 -1
  108. package/lib/module/HMSRoomSetup.js +52 -3
  109. package/lib/module/HMSRoomSetup.js.map +1 -1
  110. package/lib/module/Icons/Add/assets/add-circle.png +0 -0
  111. package/lib/module/Icons/Add/assets/add-circle@2x.png +0 -0
  112. package/lib/module/Icons/Add/assets/add-circle@3x.png +0 -0
  113. package/lib/module/Icons/Add/index.js +27 -0
  114. package/lib/module/Icons/Add/index.js.map +1 -0
  115. package/lib/module/Icons/CheckBox/assets/checkbox-checked.png +0 -0
  116. package/lib/module/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
  117. package/lib/module/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
  118. package/lib/module/Icons/CheckBox/assets/checkbox.png +0 -0
  119. package/lib/module/Icons/CheckBox/assets/checkbox@2x.png +0 -0
  120. package/lib/module/Icons/CheckBox/assets/checkbox@3x.png +0 -0
  121. package/lib/module/Icons/CheckBox/index.js +26 -0
  122. package/lib/module/Icons/CheckBox/index.js.map +1 -0
  123. package/lib/module/Icons/Poll/assets/poll.png +0 -0
  124. package/lib/module/Icons/Poll/assets/poll@2x.png +0 -0
  125. package/lib/module/Icons/Poll/assets/poll@3x.png +0 -0
  126. package/lib/module/Icons/Poll/index.js +25 -0
  127. package/lib/module/Icons/Poll/index.js.map +1 -0
  128. package/lib/module/Icons/PollVote/assets/poll-vote.png +0 -0
  129. package/lib/module/Icons/PollVote/assets/poll-vote@2x.png +0 -0
  130. package/lib/module/Icons/PollVote/assets/poll-vote@3x.png +0 -0
  131. package/lib/module/Icons/PollVote/index.js +25 -0
  132. package/lib/module/Icons/PollVote/index.js.map +1 -0
  133. package/lib/module/Icons/Quiz/assets/quiz.png +0 -0
  134. package/lib/module/Icons/Quiz/assets/quiz@2x.png +0 -0
  135. package/lib/module/Icons/Quiz/assets/quiz@3x.png +0 -0
  136. package/lib/module/Icons/Quiz/index.js +25 -0
  137. package/lib/module/Icons/Quiz/index.js.map +1 -0
  138. package/lib/module/Icons/TrashBin/assets/trash-bin.png +0 -0
  139. package/lib/module/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
  140. package/lib/module/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
  141. package/lib/module/Icons/TrashBin/index.js +26 -0
  142. package/lib/module/Icons/TrashBin/index.js.map +1 -0
  143. package/lib/module/Icons/index.js +6 -0
  144. package/lib/module/Icons/index.js.map +1 -1
  145. package/lib/module/components/CheckboxInputRow.js +45 -0
  146. package/lib/module/components/CheckboxInputRow.js.map +1 -0
  147. package/lib/module/components/CreatePoll.js +155 -0
  148. package/lib/module/components/CreatePoll.js.map +1 -0
  149. package/lib/module/components/Footer.js +6 -1
  150. package/lib/module/components/Footer.js.map +1 -1
  151. package/lib/module/components/HLSPlayerEmoticons.js +2 -3
  152. package/lib/module/components/HLSPlayerEmoticons.js.map +1 -1
  153. package/lib/module/components/HMSBaseButton.js +5 -3
  154. package/lib/module/components/HMSBaseButton.js.map +1 -1
  155. package/lib/module/components/HMSNotification.js +5 -1
  156. package/lib/module/components/HMSNotification.js.map +1 -1
  157. package/lib/module/components/HMSNotifications.js +4 -0
  158. package/lib/module/components/HMSNotifications.js.map +1 -1
  159. package/lib/module/components/HMSPollsQuizzesNotification.js +86 -0
  160. package/lib/module/components/HMSPollsQuizzesNotification.js.map +1 -0
  161. package/lib/module/components/HMSRoomOptions.js +2 -1
  162. package/lib/module/components/HMSRoomOptions.js.map +1 -1
  163. package/lib/module/components/HMSSecondaryButton.js +47 -0
  164. package/lib/module/components/HMSSecondaryButton.js.map +1 -0
  165. package/lib/module/components/PollAndQuizQuestionResponseCard.js +176 -0
  166. package/lib/module/components/PollAndQuizQuestionResponseCard.js.map +1 -0
  167. package/lib/module/components/PollAndQuizVoting.js +127 -0
  168. package/lib/module/components/PollAndQuizVoting.js.map +1 -0
  169. package/lib/module/components/PollAndQuizzStateLabel.js +63 -0
  170. package/lib/module/components/PollAndQuizzStateLabel.js.map +1 -0
  171. package/lib/module/components/PollQDeleteConfirmationSheetView.js +60 -0
  172. package/lib/module/components/PollQDeleteConfirmationSheetView.js.map +1 -0
  173. package/lib/module/components/PollQuestion.js +359 -0
  174. package/lib/module/components/PollQuestion.js.map +1 -0
  175. package/lib/module/components/PollQuestionDeleteConfirmation.js +88 -0
  176. package/lib/module/components/PollQuestionDeleteConfirmation.js.map +1 -0
  177. package/lib/module/components/PollQuestions.js +180 -0
  178. package/lib/module/components/PollQuestions.js.map +1 -0
  179. package/lib/module/components/PollResponseProgressView.js +59 -0
  180. package/lib/module/components/PollResponseProgressView.js.map +1 -0
  181. package/lib/module/components/PollsAndQuizBottomSheet.js +50 -0
  182. package/lib/module/components/PollsAndQuizBottomSheet.js.map +1 -0
  183. package/lib/module/components/PollsAndQuizzesCard.js +88 -0
  184. package/lib/module/components/PollsAndQuizzesCard.js.map +1 -0
  185. package/lib/module/components/PollsAndQuizzesModalContent.js +150 -0
  186. package/lib/module/components/PollsAndQuizzesModalContent.js.map +1 -0
  187. package/lib/module/components/PollsConfigAndList.js +23 -0
  188. package/lib/module/components/PollsConfigAndList.js.map +1 -0
  189. package/lib/module/components/PreviousPollsAndQuizzesList.js +67 -0
  190. package/lib/module/components/PreviousPollsAndQuizzesList.js.map +1 -0
  191. package/lib/module/components/RadioInput.js +34 -0
  192. package/lib/module/components/RadioInput.js.map +1 -0
  193. package/lib/module/components/RadioInputRow.js +49 -0
  194. package/lib/module/components/RadioInputRow.js.map +1 -0
  195. package/lib/module/components/RoomSettingsModalContent.js +32 -7
  196. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  197. package/lib/module/components/SwitchRow.js +2 -1
  198. package/lib/module/components/SwitchRow.js.map +1 -1
  199. package/lib/module/hooks-util.js +26 -2
  200. package/lib/module/hooks-util.js.map +1 -1
  201. package/lib/module/redux/actionTypes.js +39 -0
  202. package/lib/module/redux/actionTypes.js.map +1 -1
  203. package/lib/module/redux/actions/index.js +116 -1
  204. package/lib/module/redux/actions/index.js.map +1 -1
  205. package/lib/module/redux/reducers/index.js +3 -1
  206. package/lib/module/redux/reducers/index.js.map +1 -1
  207. package/lib/module/redux/reducers/polls.js +245 -0
  208. package/lib/module/redux/reducers/polls.js.map +1 -0
  209. package/lib/module/types.js +1 -0
  210. package/lib/module/types.js.map +1 -1
  211. package/lib/module/utils/functions.js +5 -1
  212. package/lib/module/utils/functions.js.map +1 -1
  213. package/lib/module/utils/types.js +1 -0
  214. package/lib/module/utils/types.js.map +1 -1
  215. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
  216. package/lib/typescript/Icons/Add/index.d.ts +8 -0
  217. package/lib/typescript/Icons/Add/index.d.ts.map +1 -0
  218. package/lib/typescript/Icons/CheckBox/index.d.ts +8 -0
  219. package/lib/typescript/Icons/CheckBox/index.d.ts.map +1 -0
  220. package/lib/typescript/Icons/Poll/index.d.ts +7 -0
  221. package/lib/typescript/Icons/Poll/index.d.ts.map +1 -0
  222. package/lib/typescript/Icons/PollVote/index.d.ts +7 -0
  223. package/lib/typescript/Icons/PollVote/index.d.ts.map +1 -0
  224. package/lib/typescript/Icons/Quiz/index.d.ts +7 -0
  225. package/lib/typescript/Icons/Quiz/index.d.ts.map +1 -0
  226. package/lib/typescript/Icons/TrashBin/index.d.ts +7 -0
  227. package/lib/typescript/Icons/TrashBin/index.d.ts.map +1 -0
  228. package/lib/typescript/Icons/index.d.ts +6 -0
  229. package/lib/typescript/Icons/index.d.ts.map +1 -1
  230. package/lib/typescript/components/CheckboxInputRow.d.ts +13 -0
  231. package/lib/typescript/components/CheckboxInputRow.d.ts.map +1 -0
  232. package/lib/typescript/components/CreatePoll.d.ts +5 -0
  233. package/lib/typescript/components/CreatePoll.d.ts.map +1 -0
  234. package/lib/typescript/components/Footer.d.ts.map +1 -1
  235. package/lib/typescript/components/HLSPlayerEmoticons.d.ts.map +1 -1
  236. package/lib/typescript/components/HMSBaseButton.d.ts +2 -1
  237. package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
  238. package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
  239. package/lib/typescript/components/HMSPollsQuizzesNotification.d.ts +7 -0
  240. package/lib/typescript/components/HMSPollsQuizzesNotification.d.ts.map +1 -0
  241. package/lib/typescript/components/HMSPrimaryButton.d.ts +1 -1
  242. package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -1
  243. package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
  244. package/lib/typescript/components/HMSSecondaryButton.d.ts +15 -0
  245. package/lib/typescript/components/HMSSecondaryButton.d.ts.map +1 -0
  246. package/lib/typescript/components/PollAndQuizQuestionResponseCard.d.ts +13 -0
  247. package/lib/typescript/components/PollAndQuizQuestionResponseCard.d.ts.map +1 -0
  248. package/lib/typescript/components/PollAndQuizVoting.d.ts +6 -0
  249. package/lib/typescript/components/PollAndQuizVoting.d.ts.map +1 -0
  250. package/lib/typescript/components/PollAndQuizzStateLabel.d.ts +7 -0
  251. package/lib/typescript/components/PollAndQuizzStateLabel.d.ts.map +1 -0
  252. package/lib/typescript/components/PollQDeleteConfirmationSheetView.d.ts +6 -0
  253. package/lib/typescript/components/PollQDeleteConfirmationSheetView.d.ts.map +1 -0
  254. package/lib/typescript/components/PollQuestion.d.ts +14 -0
  255. package/lib/typescript/components/PollQuestion.d.ts.map +1 -0
  256. package/lib/typescript/components/PollQuestionDeleteConfirmation.d.ts +6 -0
  257. package/lib/typescript/components/PollQuestionDeleteConfirmation.d.ts.map +1 -0
  258. package/lib/typescript/components/PollQuestions.d.ts +6 -0
  259. package/lib/typescript/components/PollQuestions.d.ts.map +1 -0
  260. package/lib/typescript/components/PollResponseProgressView.d.ts +9 -0
  261. package/lib/typescript/components/PollResponseProgressView.d.ts.map +1 -0
  262. package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts +3 -0
  263. package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts.map +1 -0
  264. package/lib/typescript/components/PollsAndQuizzesCard.d.ts +7 -0
  265. package/lib/typescript/components/PollsAndQuizzesCard.d.ts.map +1 -0
  266. package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts +7 -0
  267. package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts.map +1 -0
  268. package/lib/typescript/components/PollsConfigAndList.d.ts +5 -0
  269. package/lib/typescript/components/PollsConfigAndList.d.ts.map +1 -0
  270. package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts +5 -0
  271. package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts.map +1 -0
  272. package/lib/typescript/components/RadioInput.d.ts +9 -0
  273. package/lib/typescript/components/RadioInput.d.ts.map +1 -0
  274. package/lib/typescript/components/RadioInputRow.d.ts +16 -0
  275. package/lib/typescript/components/RadioInputRow.d.ts.map +1 -0
  276. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  277. package/lib/typescript/components/SwitchRow.d.ts +2 -1
  278. package/lib/typescript/components/SwitchRow.d.ts.map +1 -1
  279. package/lib/typescript/hooks-util.d.ts +1 -0
  280. package/lib/typescript/hooks-util.d.ts.map +1 -1
  281. package/lib/typescript/redux/actionTypes.d.ts +161 -0
  282. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  283. package/lib/typescript/redux/actions/index.d.ts +36 -2
  284. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  285. package/lib/typescript/redux/index.d.ts +13 -0
  286. package/lib/typescript/redux/index.d.ts.map +1 -1
  287. package/lib/typescript/redux/reducers/index.d.ts +13 -0
  288. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  289. package/lib/typescript/redux/reducers/polls.d.ts +19 -0
  290. package/lib/typescript/redux/reducers/polls.d.ts.map +1 -0
  291. package/lib/typescript/types.d.ts +3 -1
  292. package/lib/typescript/types.d.ts.map +1 -1
  293. package/lib/typescript/utils/functions.d.ts +2 -0
  294. package/lib/typescript/utils/functions.d.ts.map +1 -1
  295. package/lib/typescript/utils/types.d.ts +1 -0
  296. package/lib/typescript/utils/types.d.ts.map +1 -1
  297. package/package.json +2 -2
  298. package/src/HMSRoomSetup.tsx +61 -0
  299. package/src/Icons/Add/assets/add-circle.png +0 -0
  300. package/src/Icons/Add/assets/add-circle@2x.png +0 -0
  301. package/src/Icons/Add/assets/add-circle@3x.png +0 -0
  302. package/src/Icons/Add/index.tsx +37 -0
  303. package/src/Icons/CheckBox/assets/checkbox-checked.png +0 -0
  304. package/src/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
  305. package/src/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
  306. package/src/Icons/CheckBox/assets/checkbox.png +0 -0
  307. package/src/Icons/CheckBox/assets/checkbox@2x.png +0 -0
  308. package/src/Icons/CheckBox/assets/checkbox@3x.png +0 -0
  309. package/src/Icons/CheckBox/index.tsx +40 -0
  310. package/src/Icons/Poll/assets/poll.png +0 -0
  311. package/src/Icons/Poll/assets/poll@2x.png +0 -0
  312. package/src/Icons/Poll/assets/poll@3x.png +0 -0
  313. package/src/Icons/Poll/index.tsx +30 -0
  314. package/src/Icons/PollVote/assets/poll-vote.png +0 -0
  315. package/src/Icons/PollVote/assets/poll-vote@2x.png +0 -0
  316. package/src/Icons/PollVote/assets/poll-vote@3x.png +0 -0
  317. package/src/Icons/PollVote/index.tsx +33 -0
  318. package/src/Icons/Quiz/assets/quiz.png +0 -0
  319. package/src/Icons/Quiz/assets/quiz@2x.png +0 -0
  320. package/src/Icons/Quiz/assets/quiz@3x.png +0 -0
  321. package/src/Icons/Quiz/index.tsx +30 -0
  322. package/src/Icons/TrashBin/assets/trash-bin.png +0 -0
  323. package/src/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
  324. package/src/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
  325. package/src/Icons/TrashBin/index.tsx +34 -0
  326. package/src/Icons/index.ts +6 -0
  327. package/src/components/CheckboxInputRow.tsx +68 -0
  328. package/src/components/CreatePoll.tsx +176 -0
  329. package/src/components/Footer.tsx +7 -1
  330. package/src/components/HLSPlayerEmoticons.tsx +2 -3
  331. package/src/components/HMSBaseButton.tsx +8 -3
  332. package/src/components/HMSNotification.tsx +1 -1
  333. package/src/components/HMSNotifications.tsx +7 -0
  334. package/src/components/HMSPollsQuizzesNotification.tsx +110 -0
  335. package/src/components/HMSPrimaryButton.tsx +1 -1
  336. package/src/components/HMSRoomOptions.tsx +3 -0
  337. package/src/components/HMSSecondaryButton.tsx +72 -0
  338. package/src/components/PollAndQuizQuestionResponseCard.tsx +311 -0
  339. package/src/components/PollAndQuizVoting.tsx +157 -0
  340. package/src/components/PollAndQuizzStateLabel.tsx +83 -0
  341. package/src/components/PollQDeleteConfirmationSheetView.tsx +82 -0
  342. package/src/components/PollQuestion.tsx +553 -0
  343. package/src/components/PollQuestionDeleteConfirmation.tsx +110 -0
  344. package/src/components/PollQuestions.tsx +259 -0
  345. package/src/components/PollResponseProgressView.tsx +77 -0
  346. package/src/components/PollsAndQuizBottomSheet.tsx +83 -0
  347. package/src/components/PollsAndQuizzesCard.tsx +111 -0
  348. package/src/components/PollsAndQuizzesModalContent.tsx +198 -0
  349. package/src/components/PollsConfigAndList.tsx +29 -0
  350. package/src/components/PreviousPollsAndQuizzesList.tsx +103 -0
  351. package/src/components/RadioInput.tsx +44 -0
  352. package/src/components/RadioInputRow.tsx +73 -0
  353. package/src/components/RoomSettingsModalContent.tsx +23 -0
  354. package/src/components/SwitchRow.tsx +4 -2
  355. package/src/hooks-util.ts +41 -0
  356. package/src/redux/actionTypes.ts +221 -0
  357. package/src/redux/actions/index.ts +218 -1
  358. package/src/redux/reducers/index.ts +2 -0
  359. package/src/redux/reducers/polls.ts +328 -0
  360. package/src/types.ts +2 -0
  361. package/src/utils/functions.ts +14 -0
  362. package/src/utils/types.ts +1 -0
@@ -1,3 +1,9 @@
1
+ import type {
2
+ HMSPoll,
3
+ HMSPollQuestion,
4
+ HMSPollQuestionType,
5
+ } from '@100mslive/react-native-hms';
6
+
1
7
  const createRequests = (base: String) => {
2
8
  const statusObject = {
3
9
  REQUEST: `${base}_REQUEST`,
@@ -179,3 +185,218 @@ export enum HmsStateActionTypes {
179
185
  SET_RECONNECTING = 'SET_RECONNECTING',
180
186
  SET_INITIAL_ROLE = 'SET_INITIAL_ROLE',
181
187
  }
188
+
189
+ /**
190
+ * Polls
191
+ */
192
+
193
+ export enum CreatePollStages {
194
+ POLL_CONFIG,
195
+ POLL_QUESTION_CONFIG,
196
+ POLL_VOTING,
197
+ }
198
+
199
+ export type PollConfig = {
200
+ voteCountHidden: boolean;
201
+ resultsAnonymous: boolean;
202
+ };
203
+
204
+ export type PollQuestionUI = {
205
+ type: HMSPollQuestionType;
206
+ title: string;
207
+ skippable: boolean;
208
+ responseEditable: boolean;
209
+ options?: string[];
210
+ saved: boolean;
211
+ };
212
+
213
+ export type PollsActionType =
214
+ | SetDeleteConfirmationVisible
215
+ | SetPollNameAction
216
+ | SetPollConfigAction
217
+ | SetPollStageAction
218
+ | AddPollQuestionAction
219
+ | DeletePollQuestionAction
220
+ | SetSelectedQuestionIndexAction
221
+ | SetQuestionTypeAction
222
+ | SetQuestionTitleAction
223
+ | AddQuestionOptionAction
224
+ | DeleteQuestionOptionAction
225
+ | EditQuestionOptionAction
226
+ | SetQuestionSkippable
227
+ | SetQuestionResponseEditable
228
+ | SetQuestionSavedAction
229
+ | SetLaunchingPollAction
230
+ | ClearPollsStateAction
231
+ | ClearPollFormStateAction
232
+ | SetSelectedPollIdAction
233
+ | AddPollAction
234
+ | UpdatePollAction
235
+ | SetPollQuestionResponseAction
236
+ | AddPollQuestionResponseAction
237
+ | RemovePollQuestionResponseAction
238
+ | AddCuedPollIdAction
239
+ | { type: HmsStateActionTypes.CLEAR_STATES };
240
+
241
+ export type ClearPollFormStateAction = {
242
+ type: PollsStateActionTypes.CLEAR_POLL_FORM_STATE;
243
+ };
244
+
245
+ export type SetDeleteConfirmationVisible = {
246
+ type: PollsStateActionTypes.SET_DELETE_CONFIRMATION_VISIBLE;
247
+ deleteConfirmationVisible: boolean;
248
+ };
249
+
250
+ export type SetPollNameAction = {
251
+ type: PollsStateActionTypes.SET_POLL_NAME;
252
+ pollName: string;
253
+ };
254
+
255
+ export type SetPollConfigAction = {
256
+ type: PollsStateActionTypes.SET_POLL_CONFIG;
257
+ pollConfig: Partial<PollConfig>;
258
+ };
259
+
260
+ export type SetPollStageAction = {
261
+ type: PollsStateActionTypes.SET_POLL_STAGE;
262
+ pollStage: CreatePollStages;
263
+ };
264
+
265
+ export type AddPollQuestionAction = {
266
+ type: PollsStateActionTypes.ADD_POLL_QUESTION;
267
+ };
268
+
269
+ export type DeletePollQuestionAction = {
270
+ type: PollsStateActionTypes.DELETE_POLL_QUESTION;
271
+ };
272
+
273
+ export type SetSelectedQuestionIndexAction = {
274
+ type: PollsStateActionTypes.SET_SELECTED_QUESTION_INDEX;
275
+ index: number;
276
+ };
277
+
278
+ export type SetQuestionTypeAction = {
279
+ type: PollsStateActionTypes.SET_QUESTION_TYPE;
280
+ questionIndex: number;
281
+ questionType: HMSPollQuestionType;
282
+ };
283
+
284
+ export type SetQuestionTitleAction = {
285
+ type: PollsStateActionTypes.SET_QUESTION_TITLE;
286
+ questionIndex: number;
287
+ title: string;
288
+ };
289
+
290
+ export type AddQuestionOptionAction = {
291
+ type: PollsStateActionTypes.ADD_QUESTION_OPTION;
292
+ questionIndex: number;
293
+ };
294
+
295
+ export type DeleteQuestionOptionAction = {
296
+ type: PollsStateActionTypes.DELETE_QUESTION_OPTION;
297
+ questionIndex: number;
298
+ index: number;
299
+ };
300
+
301
+ export type EditQuestionOptionAction = {
302
+ type: PollsStateActionTypes.EDIT_QUESTION_OPTION;
303
+ questionIndex: number;
304
+ optionIndex: number;
305
+ option: string;
306
+ };
307
+
308
+ export type SetQuestionSkippable = {
309
+ type: PollsStateActionTypes.SET_QUESTION_SKIPPABLE;
310
+ questionIndex: number;
311
+ skippable: boolean;
312
+ };
313
+
314
+ export type SetQuestionResponseEditable = {
315
+ type: PollsStateActionTypes.SET_QUESTION_RES_EDITABLE;
316
+ questionIndex: number;
317
+ responseEditable: boolean;
318
+ };
319
+
320
+ export type SetQuestionSavedAction = {
321
+ type: PollsStateActionTypes.SET_QUESTION_SAVED;
322
+ questionIndex: number;
323
+ saved: boolean;
324
+ };
325
+
326
+ export type SetLaunchingPollAction = {
327
+ type: PollsStateActionTypes.SET_LAUNCHING_POLL;
328
+ launching: boolean;
329
+ };
330
+
331
+ export type ClearPollsStateAction = {
332
+ type: PollsStateActionTypes.CLEAR_POLLS_STATE;
333
+ };
334
+
335
+ export type SetSelectedPollIdAction = {
336
+ type: PollsStateActionTypes.SET_SELECTED_POLL_ID;
337
+ pollId: HMSPoll['pollId'];
338
+ };
339
+
340
+ export type AddPollAction = {
341
+ type: PollsStateActionTypes.ADD_POLL;
342
+ poll: HMSPoll;
343
+ };
344
+
345
+ export type UpdatePollAction = {
346
+ type: PollsStateActionTypes.UPDATE_POLL;
347
+ poll: HMSPoll;
348
+ };
349
+
350
+ export type SetPollQuestionResponseAction = {
351
+ type: PollsStateActionTypes.SET_POLL_QUESTION_RESPONSE;
352
+ pollId: HMSPoll['pollId'];
353
+ questionIndex: HMSPollQuestion['index'];
354
+ response: number;
355
+ };
356
+
357
+ export type AddPollQuestionResponseAction = {
358
+ type: PollsStateActionTypes.ADD_POLL_QUESTION_RESPONSE;
359
+ pollId: HMSPoll['pollId'];
360
+ questionIndex: HMSPollQuestion['index'];
361
+ response: number;
362
+ };
363
+
364
+ export type RemovePollQuestionResponseAction = {
365
+ type: PollsStateActionTypes.REMOVE_POLL_QUESTION_RESPONSE;
366
+ pollId: HMSPoll['pollId'];
367
+ questionIndex: HMSPollQuestion['index'];
368
+ response: number;
369
+ };
370
+
371
+ export type AddCuedPollIdAction = {
372
+ type: PollsStateActionTypes.ADD_CUED_POLL_ID;
373
+ pollId: HMSPoll['pollId'];
374
+ };
375
+
376
+ export enum PollsStateActionTypes {
377
+ CLEAR_POLL_FORM_STATE = 'CLEAR_POLL_FORM_STATE',
378
+ SET_DELETE_CONFIRMATION_VISIBLE = 'SET_DELETE_CONFIRMATION_VISIBLE',
379
+ SET_POLL_NAME = 'SET_POLL_NAME',
380
+ SET_POLL_CONFIG = 'SET_POLL_CONFIG',
381
+ SET_POLL_STAGE = 'SET_POLL_STAGE',
382
+ ADD_POLL_QUESTION = 'ADD_POLL_QUESTION',
383
+ DELETE_POLL_QUESTION = 'DELETE_POLL_QUESTION',
384
+ SET_SELECTED_QUESTION_INDEX = 'SET_SELECTED_QUESTION_INDEX',
385
+ SET_QUESTION_TYPE = 'SET_QUESTION_TYPE',
386
+ SET_QUESTION_TITLE = 'SET_QUESTION_TITLE',
387
+ ADD_QUESTION_OPTION = 'ADD_QUESTION_OPTION',
388
+ DELETE_QUESTION_OPTION = 'DELETE_QUESTION_OPTION',
389
+ EDIT_QUESTION_OPTION = 'EDIT_QUESTION_OPTION',
390
+ SET_QUESTION_SKIPPABLE = 'SET_QUESTION_SKIPPABLE',
391
+ SET_QUESTION_RES_EDITABLE = 'SET_QUESTION_RES_EDITABLE',
392
+ SET_QUESTION_SAVED = 'SET_QUESTION_SAVED',
393
+ SET_LAUNCHING_POLL = 'SET_LAUNCHING_POLL',
394
+ CLEAR_POLLS_STATE = 'CLEAR_POLLS_STATE',
395
+ SET_SELECTED_POLL_ID = 'SET_SELECTED_POLL_ID',
396
+ ADD_POLL = 'ADD_POLL',
397
+ UPDATE_POLL = 'UPDATE_POLL',
398
+ SET_POLL_QUESTION_RESPONSE = 'SET_POLL_QUESTION_RESPONSE',
399
+ REMOVE_POLL_QUESTION_RESPONSE = 'REMOVE_POLL_QUESTION_RESPONSE',
400
+ ADD_POLL_QUESTION_RESPONSE = 'ADD_POLL_QUESTION_RESPONSE',
401
+ ADD_CUED_POLL_ID = 'ADD_CUED_POLL_ID',
402
+ }
@@ -4,6 +4,8 @@ import type {
4
4
  HMSLocalVideoStats,
5
5
  HMSMessage,
6
6
  HMSPeer,
7
+ HMSPoll,
8
+ HMSPollQuestion,
7
9
  HMSRemoteAudioStats,
8
10
  HMSRemoteVideoStats,
9
11
  HMSRole,
@@ -22,7 +24,35 @@ import type {
22
24
  PeerTrackNode,
23
25
  PipModes,
24
26
  } from '../../utils/types';
25
- import actionTypes, { HmsStateActionTypes } from '../actionTypes';
27
+ import actionTypes, {
28
+ HmsStateActionTypes,
29
+ PollsStateActionTypes,
30
+ } from '../actionTypes';
31
+ import type {
32
+ AddPollQuestionAction,
33
+ SetPollConfigAction,
34
+ SetPollNameAction,
35
+ SetPollStageAction,
36
+ DeletePollQuestionAction,
37
+ SetDeleteConfirmationVisible,
38
+ SetSelectedQuestionIndexAction,
39
+ SetQuestionTypeAction,
40
+ SetQuestionTitleAction,
41
+ AddQuestionOptionAction,
42
+ DeleteQuestionOptionAction,
43
+ EditQuestionOptionAction,
44
+ SetQuestionSkippable,
45
+ SetQuestionResponseEditable,
46
+ SetQuestionSavedAction,
47
+ SetLaunchingPollAction,
48
+ ClearPollsStateAction,
49
+ AddPollAction,
50
+ UpdatePollAction,
51
+ SetSelectedPollIdAction,
52
+ AddPollQuestionResponseAction,
53
+ SetPollQuestionResponseAction,
54
+ RemovePollQuestionResponseAction,
55
+ } from '../actionTypes';
26
56
  import { MeetingState } from '../../types';
27
57
  import type { ChatState, Notification, PinnedMessage } from '../../types';
28
58
 
@@ -433,3 +463,190 @@ export const filterOutMsgsFromBlockedPeers = (chatPeerBlacklist: string[]) => ({
433
463
  type: actionTypes.FILTER_OUT_BLOCKED_MSGS,
434
464
  payload: chatPeerBlacklist,
435
465
  });
466
+
467
+ /**
468
+ * POLLS
469
+ */
470
+
471
+ export const setPollQDeleteConfirmationVisible = (
472
+ deleteConfirmationVisible: SetDeleteConfirmationVisible['deleteConfirmationVisible']
473
+ ): SetDeleteConfirmationVisible => ({
474
+ type: PollsStateActionTypes.SET_DELETE_CONFIRMATION_VISIBLE,
475
+ deleteConfirmationVisible,
476
+ });
477
+
478
+ export const setPollName = (
479
+ pollName: SetPollNameAction['pollName']
480
+ ): SetPollNameAction => ({
481
+ type: PollsStateActionTypes.SET_POLL_NAME,
482
+ pollName,
483
+ });
484
+
485
+ export const setPollConfig = (
486
+ pollConfig: SetPollConfigAction['pollConfig']
487
+ ): SetPollConfigAction => ({
488
+ type: PollsStateActionTypes.SET_POLL_CONFIG,
489
+ pollConfig,
490
+ });
491
+
492
+ export const setPollStage = (
493
+ pollStage: SetPollStageAction['pollStage']
494
+ ): SetPollStageAction => ({
495
+ type: PollsStateActionTypes.SET_POLL_STAGE,
496
+ pollStage,
497
+ });
498
+
499
+ export const addPollQuestion = (): AddPollQuestionAction => ({
500
+ type: PollsStateActionTypes.ADD_POLL_QUESTION,
501
+ });
502
+
503
+ export const deletePollQuestion = (): DeletePollQuestionAction => ({
504
+ type: PollsStateActionTypes.DELETE_POLL_QUESTION,
505
+ });
506
+
507
+ export const setSelectedPollQuestionIndex = (
508
+ index: SetSelectedQuestionIndexAction['index']
509
+ ): SetSelectedQuestionIndexAction => ({
510
+ type: PollsStateActionTypes.SET_SELECTED_QUESTION_INDEX,
511
+ index,
512
+ });
513
+
514
+ export const setPollQuestionType = (
515
+ questionIndex: SetQuestionTypeAction['questionIndex'],
516
+ questionType: SetQuestionTypeAction['questionType']
517
+ ): SetQuestionTypeAction => ({
518
+ type: PollsStateActionTypes.SET_QUESTION_TYPE,
519
+ questionIndex,
520
+ questionType,
521
+ });
522
+
523
+ export const setPollQuestionTitle = (
524
+ questionIndex: SetQuestionTitleAction['questionIndex'],
525
+ title: SetQuestionTitleAction['title']
526
+ ): SetQuestionTitleAction => ({
527
+ type: PollsStateActionTypes.SET_QUESTION_TITLE,
528
+ questionIndex,
529
+ title,
530
+ });
531
+
532
+ export const addPollQuestionOption = (
533
+ questionIndex: AddQuestionOptionAction['questionIndex']
534
+ ): AddQuestionOptionAction => ({
535
+ type: PollsStateActionTypes.ADD_QUESTION_OPTION,
536
+ questionIndex,
537
+ });
538
+
539
+ export const deletePollQuestionOption = (
540
+ questionIndex: DeleteQuestionOptionAction['questionIndex'],
541
+ index: DeleteQuestionOptionAction['index']
542
+ ): DeleteQuestionOptionAction => ({
543
+ type: PollsStateActionTypes.DELETE_QUESTION_OPTION,
544
+ index,
545
+ questionIndex,
546
+ });
547
+
548
+ export const editPollQuestionOption = (
549
+ questionIndex: EditQuestionOptionAction['questionIndex'],
550
+ optionIndex: EditQuestionOptionAction['optionIndex'],
551
+ option: EditQuestionOptionAction['option']
552
+ ): EditQuestionOptionAction => ({
553
+ type: PollsStateActionTypes.EDIT_QUESTION_OPTION,
554
+ questionIndex,
555
+ optionIndex,
556
+ option,
557
+ });
558
+
559
+ export const setPollQuestionSkippable = (
560
+ questionIndex: SetQuestionSkippable['questionIndex'],
561
+ skippable: boolean
562
+ ): SetQuestionSkippable => ({
563
+ type: PollsStateActionTypes.SET_QUESTION_SKIPPABLE,
564
+ questionIndex,
565
+ skippable,
566
+ });
567
+
568
+ export const setPollQuestionResponseEditable = (
569
+ questionIndex: SetQuestionResponseEditable['questionIndex'],
570
+ responseEditable: boolean
571
+ ): SetQuestionResponseEditable => ({
572
+ type: PollsStateActionTypes.SET_QUESTION_RES_EDITABLE,
573
+ questionIndex,
574
+ responseEditable,
575
+ });
576
+
577
+ export const setPollQuestionSaved = (
578
+ questionIndex: SetQuestionResponseEditable['questionIndex'],
579
+ saved: boolean
580
+ ): SetQuestionSavedAction => ({
581
+ type: PollsStateActionTypes.SET_QUESTION_SAVED,
582
+ questionIndex,
583
+ saved,
584
+ });
585
+
586
+ export const setLaunchingPoll = (
587
+ launching: SetLaunchingPollAction['launching']
588
+ ): SetLaunchingPollAction => ({
589
+ type: PollsStateActionTypes.SET_LAUNCHING_POLL,
590
+ launching,
591
+ });
592
+
593
+ export const clearPollsState = (): ClearPollsStateAction => ({
594
+ type: PollsStateActionTypes.CLEAR_POLLS_STATE,
595
+ });
596
+
597
+ export const cleaPollFormState = () => ({
598
+ type: PollsStateActionTypes.CLEAR_POLL_FORM_STATE,
599
+ });
600
+
601
+ export const setSelectedPollId = (pollId: string): SetSelectedPollIdAction => ({
602
+ type: PollsStateActionTypes.SET_SELECTED_POLL_ID,
603
+ pollId,
604
+ });
605
+
606
+ export const addPoll = (poll: HMSPoll): AddPollAction => ({
607
+ type: PollsStateActionTypes.ADD_POLL,
608
+ poll,
609
+ });
610
+
611
+ export const updatePoll = (poll: HMSPoll): UpdatePollAction => ({
612
+ type: PollsStateActionTypes.UPDATE_POLL,
613
+ poll,
614
+ });
615
+
616
+ export const setPollQuestionResponse = (
617
+ pollId: HMSPoll['pollId'],
618
+ questionIndex: HMSPollQuestion['index'],
619
+ response: SetPollQuestionResponseAction['response']
620
+ ): SetPollQuestionResponseAction => ({
621
+ type: PollsStateActionTypes.SET_POLL_QUESTION_RESPONSE,
622
+ pollId,
623
+ questionIndex,
624
+ response,
625
+ });
626
+
627
+ export const addPollQuestionResponse = (
628
+ pollId: HMSPoll['pollId'],
629
+ questionIndex: HMSPollQuestion['index'],
630
+ response: AddPollQuestionResponseAction['response']
631
+ ): AddPollQuestionResponseAction => ({
632
+ type: PollsStateActionTypes.ADD_POLL_QUESTION_RESPONSE,
633
+ pollId,
634
+ questionIndex,
635
+ response,
636
+ });
637
+
638
+ export const removePollQuestionResponse = (
639
+ pollId: HMSPoll['pollId'],
640
+ questionIndex: HMSPollQuestion['index'],
641
+ response: RemovePollQuestionResponseAction['response']
642
+ ): RemovePollQuestionResponseAction => ({
643
+ type: PollsStateActionTypes.REMOVE_POLL_QUESTION_RESPONSE,
644
+ pollId,
645
+ questionIndex,
646
+ response,
647
+ });
648
+
649
+ export const addCuedPollId = (pollId: string) => ({
650
+ type: PollsStateActionTypes.ADD_CUED_POLL_ID,
651
+ pollId,
652
+ });
@@ -3,6 +3,7 @@ import app from './appState';
3
3
  import user from './userState';
4
4
  import hmsStates from './hmsStates';
5
5
  import chatWindow from './chatWindow';
6
+ import polls from './polls';
6
7
  import { combineReducers } from 'redux';
7
8
 
8
9
  export default combineReducers({
@@ -11,4 +12,5 @@ export default combineReducers({
11
12
  user,
12
13
  hmsStates,
13
14
  chatWindow,
15
+ polls,
14
16
  });