@100mslive/react-native-room-kit 1.1.0 → 1.1.2

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