@100mslive/roomkit-react 0.3.22-alpha.3 → 0.3.22-alpha.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. package/dist/Accordion/Accordion.d.ts +322 -134
  2. package/dist/Accordion/index.d.ts +322 -134
  3. package/dist/Avatar/Avatar.d.ts +141 -47
  4. package/dist/Button/Button.d.ts +141 -47
  5. package/dist/Checkbox/Checkbox.d.ts +322 -134
  6. package/dist/Collapsible/Collapsible.d.ts +483 -201
  7. package/dist/Divider/Divider.d.ts +322 -134
  8. package/dist/Dropdown/Dropdown.d.ts +1932 -804
  9. package/dist/Fieldset/Fieldset.d.ts +141 -47
  10. package/dist/Footer/Footer.d.ts +1288 -536
  11. package/dist/{PDFView-RMR33QH4.css → HLSView-CNAJ5SBZ.css} +3 -3
  12. package/dist/{LeaveScreen-ZAG5UJZL.css.map → HLSView-CNAJ5SBZ.css.map} +1 -1
  13. package/dist/{HLSView-EYGGK6BH.js → HLSView-YIWJTBCT.js} +24 -38
  14. package/dist/HLSView-YIWJTBCT.js.map +7 -0
  15. package/dist/IconButton/IconButton.d.ts +141 -47
  16. package/dist/Input/Input.d.ts +926 -362
  17. package/dist/Label/Label.d.ts +141 -47
  18. package/dist/Layout/Box.d.ts +141 -47
  19. package/dist/Layout/Flex.d.ts +141 -47
  20. package/dist/Link/Link.d.ts +141 -47
  21. package/dist/Modal/Dialog.d.ts +987 -329
  22. package/dist/Modal/DialogContent.d.ts +1127 -469
  23. package/dist/Pagination/StyledPagination.d.ts +644 -268
  24. package/dist/Popover/index.d.ts +483 -201
  25. package/dist/Prebuilt/IconButton.d.ts +322 -134
  26. package/dist/Prebuilt/components/Chat/ChatBody.d.ts +322 -134
  27. package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +805 -335
  28. package/dist/Prebuilt/components/Settings/common.d.ts +322 -134
  29. package/dist/Progress/index.d.ts +322 -134
  30. package/dist/RadioGroup/RadioGroup.d.ts +483 -201
  31. package/dist/ReactSelect/ReactSelect.d.ts +1610 -670
  32. package/dist/Select/Select.d.ts +483 -201
  33. package/dist/Sheet/Sheet.d.ts +987 -329
  34. package/dist/Slider/Slider.d.ts +141 -47
  35. package/dist/Stats/StyledStats.d.ts +966 -402
  36. package/dist/Switch/Switch.d.ts +141 -47
  37. package/dist/Tabs/Tabs.d.ts +644 -268
  38. package/dist/Text/Text.d.ts +141 -47
  39. package/dist/TextArea/TextArea.d.ts +141 -47
  40. package/dist/Theme/base.config.d.ts +78 -26
  41. package/dist/Theme/stitches.config.d.ts +1514 -1067
  42. package/dist/TileMenu/StyledMenuTile.d.ts +1127 -469
  43. package/dist/Toast/Toast.d.ts +946 -382
  44. package/dist/Video/Video.d.ts +141 -47
  45. package/dist/VideoList/StyledVideoList.d.ts +483 -201
  46. package/dist/VideoTile/StyledVideoTile.d.ts +1610 -670
  47. package/dist/chunk-4UCH4XSJ.js +34759 -0
  48. package/dist/chunk-4UCH4XSJ.js.map +7 -0
  49. package/dist/index.cjs.css +2 -2
  50. package/dist/index.cjs.css.map +1 -1
  51. package/dist/index.cjs.js +22367 -22558
  52. package/dist/index.cjs.js.map +4 -4
  53. package/dist/index.css +2 -2
  54. package/dist/index.css.map +1 -1
  55. package/dist/index.js +15 -25
  56. package/dist/meta.cjs.json +5076 -5434
  57. package/dist/meta.esbuild.json +6290 -9146
  58. package/package.json +8 -8
  59. package/src/Avatar/Avatar.tsx +1 -1
  60. package/src/Popover/Popover.stories.tsx +1 -1
  61. package/src/Prebuilt/App.tsx +2 -6
  62. package/src/Prebuilt/components/Chat/Chat.tsx +8 -12
  63. package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -1
  64. package/src/Prebuilt/components/Notifications/Notifications.tsx +171 -13
  65. package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +2 -9
  66. package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +5 -1
  67. package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +5 -7
  68. package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +1 -23
  69. package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +5 -13
  70. package/src/Prebuilt/components/StatsForNerds.jsx +3 -32
  71. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +31 -43
  72. package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +2 -2
  73. package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +1 -3
  74. package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +0 -6
  75. package/src/Prebuilt/layouts/HLSView.jsx +0 -1
  76. package/src/Prebuilt/layouts/PDFView.jsx +0 -1
  77. package/src/Prebuilt/layouts/SidePane.tsx +6 -12
  78. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +34 -35
  79. package/dist/ConferenceScreen-CSVWECB5.js +0 -1778
  80. package/dist/ConferenceScreen-CSVWECB5.js.map +0 -7
  81. package/dist/ConferenceScreen-YRURU3RV.css +0 -2780
  82. package/dist/ConferenceScreen-YRURU3RV.css.map +0 -7
  83. package/dist/EmbedView-N2E4DZQA.js +0 -17
  84. package/dist/EmbedView-N2E4DZQA.js.map +0 -7
  85. package/dist/EmbedView-S54NTHF5.css +0 -2780
  86. package/dist/EmbedView-S54NTHF5.css.map +0 -7
  87. package/dist/EmojiReaction-3X4ST4AU.js +0 -11
  88. package/dist/EmojiReaction-3X4ST4AU.js.map +0 -7
  89. package/dist/HLSView-EYGGK6BH.js.map +0 -7
  90. package/dist/HLSView-LBTFLMI4.css +0 -2780
  91. package/dist/HLSView-LBTFLMI4.css.map +0 -7
  92. package/dist/LeaveScreen-D6XU64JL.js +0 -556
  93. package/dist/LeaveScreen-D6XU64JL.js.map +0 -7
  94. package/dist/LeaveScreen-ZAG5UJZL.css +0 -2780
  95. package/dist/MoreSettings-R7B4BSNT.css +0 -2780
  96. package/dist/MoreSettings-R7B4BSNT.css.map +0 -7
  97. package/dist/MoreSettings-TBJVM7OY.js +0 -16
  98. package/dist/MoreSettings-TBJVM7OY.js.map +0 -7
  99. package/dist/PDFView-JOIJDP65.js +0 -84
  100. package/dist/PDFView-JOIJDP65.js.map +0 -7
  101. package/dist/PDFView-RMR33QH4.css.map +0 -7
  102. package/dist/Polls-IN3V2HFI.js +0 -1584
  103. package/dist/Polls-IN3V2HFI.js.map +0 -7
  104. package/dist/Polls-JW7JWGTE.css +0 -2780
  105. package/dist/Polls-JW7JWGTE.css.map +0 -7
  106. package/dist/Prebuilt/components/Notifications/DeviceChangeNotifications.d.ts +0 -1
  107. package/dist/Prebuilt/components/Notifications/ErrorNotifications.d.ts +0 -1
  108. package/dist/Prebuilt/components/Notifications/MessageNotifications.d.ts +0 -1
  109. package/dist/Prebuilt/components/Notifications/PollNotificationModal.d.ts +0 -1
  110. package/dist/Prebuilt/components/Notifications/RoleChangeNotification.d.ts +0 -1
  111. package/dist/RaiseHand-WES4KKMD.js +0 -10
  112. package/dist/RaiseHand-WES4KKMD.js.map +0 -7
  113. package/dist/RoleProminence-4ZBDBCMU.css +0 -2780
  114. package/dist/RoleProminence-4ZBDBCMU.css.map +0 -7
  115. package/dist/RoleProminence-PB32DLIB.js +0 -116
  116. package/dist/RoleProminence-PB32DLIB.js.map +0 -7
  117. package/dist/RoomDetailsPane-CZH2SNLE.js +0 -53
  118. package/dist/RoomDetailsPane-CZH2SNLE.js.map +0 -7
  119. package/dist/RoomDetailsPane-XWH2KEFI.css +0 -2780
  120. package/dist/RoomDetailsPane-XWH2KEFI.css.map +0 -7
  121. package/dist/ScreenshareLayout-XVENPVK3.js +0 -358
  122. package/dist/ScreenshareLayout-XVENPVK3.js.map +0 -7
  123. package/dist/ScreenshareLayout-YUW3KHAB.css +0 -2780
  124. package/dist/ScreenshareLayout-YUW3KHAB.css.map +0 -7
  125. package/dist/SidePaneTabs-QXCDHOGG.js +0 -1354
  126. package/dist/SidePaneTabs-QXCDHOGG.js.map +0 -7
  127. package/dist/SidePaneTabs-WQGVOWRP.css +0 -2780
  128. package/dist/SidePaneTabs-WQGVOWRP.css.map +0 -7
  129. package/dist/VBPicker-XN74N67R.js +0 -322
  130. package/dist/VBPicker-XN74N67R.js.map +0 -7
  131. package/dist/VBPicker-YDM2YIOM.css +0 -2780
  132. package/dist/VBPicker-YDM2YIOM.css.map +0 -7
  133. package/dist/WaitingView-77PRTIBV.js +0 -10
  134. package/dist/WaitingView-77PRTIBV.js.map +0 -7
  135. package/dist/WhiteboardLayout-FZC7SOSG.js +0 -96
  136. package/dist/WhiteboardLayout-FZC7SOSG.js.map +0 -7
  137. package/dist/WhiteboardLayout-MNTUWEVK.css +0 -2780
  138. package/dist/WhiteboardLayout-MNTUWEVK.css.map +0 -7
  139. package/dist/android-perm-1.png +0 -0
  140. package/dist/audio-level.png +0 -0
  141. package/dist/chunk-26D5FDBW.js +0 -16812
  142. package/dist/chunk-26D5FDBW.js.map +0 -7
  143. package/dist/chunk-2J5WS52X.js +0 -2595
  144. package/dist/chunk-2J5WS52X.js.map +0 -7
  145. package/dist/chunk-2LWOQMYY.js +0 -30
  146. package/dist/chunk-2LWOQMYY.js.map +0 -7
  147. package/dist/chunk-3MRQJSIY.js +0 -171
  148. package/dist/chunk-3MRQJSIY.js.map +0 -7
  149. package/dist/chunk-4X4WB7X3.js +0 -98
  150. package/dist/chunk-4X4WB7X3.js.map +0 -7
  151. package/dist/chunk-7QZJMUHM.js +0 -90
  152. package/dist/chunk-7QZJMUHM.js.map +0 -7
  153. package/dist/chunk-ABCV7TX5.js +0 -71
  154. package/dist/chunk-ABCV7TX5.js.map +0 -7
  155. package/dist/chunk-BQOT4DK7.js +0 -418
  156. package/dist/chunk-BQOT4DK7.js.map +0 -7
  157. package/dist/chunk-ENHSO6YN.js +0 -6337
  158. package/dist/chunk-ENHSO6YN.js.map +0 -7
  159. package/dist/chunk-JKWX7W4K.js +0 -161
  160. package/dist/chunk-JKWX7W4K.js.map +0 -7
  161. package/dist/chunk-LO4BXA4G.js +0 -114
  162. package/dist/chunk-LO4BXA4G.js.map +0 -7
  163. package/dist/chunk-MRVWNFXC.js +0 -59
  164. package/dist/chunk-MRVWNFXC.js.map +0 -7
  165. package/dist/chunk-OA4HW7HW.js +0 -262
  166. package/dist/chunk-OA4HW7HW.js.map +0 -7
  167. package/dist/chunk-PJQSPAFZ.js +0 -178
  168. package/dist/chunk-PJQSPAFZ.js.map +0 -7
  169. package/dist/chunk-QHQKY35W.js +0 -830
  170. package/dist/chunk-QHQKY35W.js.map +0 -7
  171. package/dist/chunk-QKXHQ6DV.js +0 -254
  172. package/dist/chunk-QKXHQ6DV.js.map +0 -7
  173. package/dist/chunk-RTWNTT77.js +0 -62
  174. package/dist/chunk-RTWNTT77.js.map +0 -7
  175. package/dist/chunk-TBXRX6MK.js +0 -576
  176. package/dist/chunk-TBXRX6MK.js.map +0 -7
  177. package/dist/chunk-TCOPR3BK.js +0 -487
  178. package/dist/chunk-TCOPR3BK.js.map +0 -7
  179. package/dist/chunk-VKORP2LF.js +0 -41
  180. package/dist/chunk-VKORP2LF.js.map +0 -7
  181. package/dist/chunk-YYVDCP5Z.js +0 -136
  182. package/dist/chunk-YYVDCP5Z.js.map +0 -7
  183. package/dist/empty-chat.svg +0 -12
  184. package/dist/ios-perm-0.png +0 -0
  185. package/dist/pdf-share.png +0 -0
  186. package/dist/screen-share.png +0 -0
  187. package/dist/transaction_error.svg +0 -12
  188. package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +0 -18
  189. package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +0 -56
  190. package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +0 -24
  191. package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +0 -71
  192. package/src/Prebuilt/components/Notifications/RoleChangeNotification.tsx +0 -24
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/Prebuilt/components/Polls/Polls.tsx", "../src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx", "../src/Prebuilt/components/Streaming/Common.jsx", "../src/Prebuilt/components/Polls/common/StatusIndicator.tsx", "../src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx", "../src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.tsx", "../src/Prebuilt/components/Polls/CreateQuestions/DeleteQuestionModal.tsx", "../src/Prebuilt/components/Polls/common/Line.tsx", "../src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx", "../src/Prebuilt/components/Polls/common/OptionInputWithDelete.tsx", "../src/Prebuilt/components/Polls/common/VoteCount.tsx", "../src/Prebuilt/components/Polls/common/VoteProgress.tsx", "../src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx", "../src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.tsx", "../src/Prebuilt/components/Polls/Voting/LeaderboardSummary.tsx", "../src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx", "../src/Prebuilt/components/Polls/Voting/PeerParticipationSummary.tsx", "../src/Prebuilt/components/Polls/Voting/StatisticBox.tsx", "../src/Prebuilt/components/Polls/Voting/useQuizSummary.tsx", "../src/Prebuilt/components/Polls/Voting/Voting.tsx", "../src/Prebuilt/components/Polls/Voting/StandardVoting.tsx", "../src/Prebuilt/components/Polls/Voting/QuestionCard.jsx", "../src/Prebuilt/components/Polls/Voting/TimedVoting.tsx"],
4
- "sourcesContent": ["import React from 'react';\n// @ts-ignore: No implicit Any\nimport { PollsQuizMenu } from './CreatePollQuiz/PollsQuizMenu';\n// @ts-ignore: No implicit Any\nimport { CreateQuestions } from './CreateQuestions/CreateQuestions';\nimport { LeaderboardSummary } from './Voting/LeaderboardSummary';\n// @ts-ignore: No implicit Any\nimport { Voting } from './Voting/Voting';\n// @ts-ignore: No implicit Any\nimport { usePollViewToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { usePollViewState } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { POLL_VIEWS } from '../../common/constants';\n\nexport const Polls = () => {\n const togglePollView = usePollViewToggle();\n const { pollInView: pollID, view } = usePollViewState();\n\n if (view === POLL_VIEWS.CREATE_POLL_QUIZ) {\n return <PollsQuizMenu />;\n } else if (view === POLL_VIEWS.CREATE_QUESTIONS) {\n return <CreateQuestions />;\n } else if (view === POLL_VIEWS.VOTE) {\n return <Voting toggleVoting={togglePollView} id={pollID} />;\n } else if (view === POLL_VIEWS.RESULTS) {\n return <LeaderboardSummary pollID={pollID} />;\n } else {\n return null;\n }\n};\n", "import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n HMSPollState,\n selectLocalPeerRoleName,\n selectPermissions,\n selectPolls,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { QuestionIcon, StatsIcon } from '@100mslive/react-icons';\nimport { Button, Flex, Input, Switch, Text } from '../../../..';\n// @ts-ignore\nimport { Container, ContentHeader, ErrorText } from '../../Streaming/Common';\n// @ts-ignore\nimport { usePollViewToggle } from '../../AppData/useSidepane';\n// @ts-ignore\nimport { usePollViewState } from '../../AppData/useUISettings';\n// @ts-ignore\nimport { isValidTextInput } from '../../../common/utils';\nimport { StatusIndicator } from '../common/StatusIndicator';\nimport { INTERACTION_TYPE, POLL_STATE, POLL_VIEWS } from '../../../common/constants';\n\nexport const PollsQuizMenu = () => {\n const togglePollView = usePollViewToggle();\n const permissions = useHMSStore(selectPermissions);\n\n return (\n <Container rounded>\n <ContentHeader content=\"Polls and Quizzes\" onClose={togglePollView} />\n <Flex direction=\"column\" css={{ px: '$10', pb: '$10', overflowY: 'auto' }}>\n {permissions?.pollWrite && <AddMenu />}\n <PrevMenu />\n </Flex>\n </Container>\n );\n};\n\nfunction InteractionSelectionCard({\n title,\n icon,\n active,\n onClick,\n}: {\n title: string;\n icon: React.JSX.Element;\n active: boolean;\n onClick: () => void;\n}) {\n const activeBorderStyle = active ? '$space$px solid $primary_default' : '$space$px solid $border_bright';\n return (\n <Flex\n onClick={onClick}\n css={{\n border: activeBorderStyle,\n p: '$4',\n r: '$2',\n w: '100%',\n cursor: 'pointer',\n }}\n align=\"center\"\n >\n <Flex\n css={{\n border: activeBorderStyle,\n p: '$4',\n bg: '$surface_bright',\n c: '$on_surface_high',\n r: '$0',\n }}\n >\n {icon}\n </Flex>\n <Text variant=\"sub1\" css={{ ml: '$md' }}>\n {title}\n </Text>\n </Flex>\n );\n}\n\nconst AddMenu = () => {\n const actions = useHMSActions();\n const [title, setTitle] = useState('');\n const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);\n const [hideVoteCount, setHideVoteCount] = useState(false);\n const [error, setError] = useState();\n const [titleError, setTitleError] = useState('');\n const { setPollState } = usePollViewState();\n const [interactionType, setInteractionType] = useState(INTERACTION_TYPE.POLL);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, [interactionType]);\n\n const handleCreate = (id: string) => {\n setPollState({\n [POLL_STATE.pollInView]: id,\n [POLL_STATE.view]: POLL_VIEWS.CREATE_QUESTIONS,\n });\n };\n\n const validateTitle = useMemo(() => {\n if (!isValidTextInput(title)) {\n if (title) {\n setTitleError('The title should have between 2-100 characters');\n }\n return true;\n } else {\n setTitleError('');\n return false;\n }\n }, [title]);\n\n return (\n <>\n <Text variant=\"caption\" css={{ c: '$on_surface_medium', mb: '$md' }}>\n Select the type you want to continue with\n </Text>\n <Flex css={{ w: '100%', gap: '$10', mb: '$md' }}>\n <InteractionSelectionCard\n title={INTERACTION_TYPE.POLL}\n icon={<StatsIcon width={32} height={32} />}\n onClick={() => setInteractionType(INTERACTION_TYPE.POLL)}\n active={interactionType === INTERACTION_TYPE.POLL}\n />\n <InteractionSelectionCard\n title={INTERACTION_TYPE.QUIZ}\n icon={<QuestionIcon width={32} height={32} />}\n onClick={() => setInteractionType(INTERACTION_TYPE.QUIZ)}\n active={interactionType === INTERACTION_TYPE.QUIZ}\n />\n </Flex>\n <Flex direction=\"column\" css={{ mb: '$10' }}>\n <Text variant=\"body2\" css={{ mb: '$4' }}>{`Name this ${interactionType.toLowerCase()}`}</Text>\n <Input\n ref={inputRef}\n type=\"text\"\n placeholder=\"Enter a name to continue\"\n value={title}\n onChange={event => setTitle(event.target.value.trimStart())}\n css={{\n backgroundColor: '$surface_bright',\n border: '1px solid $border_default',\n }}\n />\n <Flex align=\"center\" css={{ mt: '$10' }}>\n <Switch onCheckedChange={value => setHideVoteCount(value)} css={{ mr: '$6' }} />\n <Text variant=\"body2\" css={{ c: '$on_surface_medium' }}>\n Hide Vote Count\n </Text>\n </Flex>\n\n <Button\n variant=\"primary\"\n disabled={validateTitle}\n css={{ mt: '$10' }}\n onClick={async () => {\n const id = Date.now().toString();\n await actions.interactivityCenter\n .createPoll({\n id,\n title,\n anonymous: false,\n rolesThatCanViewResponses: hideVoteCount && localPeerRoleName ? [localPeerRoleName] : undefined,\n // @ts-ignore\n type: interactionType.toLowerCase(),\n })\n .then(() => handleCreate(id))\n .catch(err => setError(err.message));\n }}\n >\n Create {interactionType}\n </Button>\n <ErrorText error={error || titleError} />\n </Flex>\n </>\n );\n};\n\nconst PrevMenu = () => {\n const hmsActions = useHMSActions();\n const polls = useHMSStore(selectPolls);\n const sortedPolls = useMemo(\n () =>\n polls\n ?.sort((a, b) => (b?.createdAt?.getTime?.() || 0) - (a?.createdAt?.getTime?.() || 0))\n ?.sort((a, b) => (b?.state === 'started' ? 1 : 0) - (a?.state === 'started' ? 1 : 0)),\n [polls],\n );\n const permissions = useHMSStore(selectPermissions);\n\n useEffect(() => {\n const updatePolls = async () => {\n await hmsActions.interactivityCenter.getPolls();\n };\n updatePolls();\n }, [hmsActions.interactivityCenter]);\n\n return polls?.length ? (\n <Flex\n direction=\"column\"\n css={{\n width: '100%',\n ...(permissions?.pollWrite ? { borderTop: '$space$px solid $border_bright', paddingTop: '$10' } : {}),\n }}\n >\n <Text variant=\"h6\" css={{ c: '$on_surface_high' }}>\n Previous Polls and Quizzes\n </Text>\n <Flex direction=\"column\" css={{ gap: '$10', mt: '$8' }}>\n {sortedPolls?.map(poll => (\n <InteractionCard key={poll.id} id={poll.id} title={poll.title} status={poll.state} />\n ))}\n </Flex>\n </Flex>\n ) : null;\n};\n\nconst InteractionCard = ({ id, title, status }: { id: string; title: string; status?: HMSPollState }) => {\n const { setPollState } = usePollViewState();\n\n return (\n <Flex direction=\"column\" css={{ backgroundColor: '$surface_bright', borderRadius: '$1', p: '$8' }}>\n <Flex css={{ w: '100%', justifyContent: 'space-between', mb: '$sm' }}>\n <Text variant=\"sub1\" css={{ c: '$on_surface_high', fontWeight: '$semiBold' }}>\n {title}\n </Text>\n <StatusIndicator status={status} />\n </Flex>\n <Flex css={{ w: '100%', gap: '$4' }} justify=\"end\">\n <Button\n variant=\"primary\"\n onClick={() =>\n setPollState({\n [POLL_STATE.pollInView]: id,\n [POLL_STATE.view]: status === 'created' ? POLL_VIEWS.CREATE_QUESTIONS : POLL_VIEWS.VOTE,\n })\n }\n >\n View\n </Button>\n </Flex>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { selectPermissions, useHMSStore } from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, ChevronRightIcon, CrossIcon, RecordIcon } from '@100mslive/react-icons';\nimport { Box, Flex, IconButton, slideLeftAndFade, Switch, Text } from '../../../';\n\nexport const StreamCard = ({ title, subtitle, Icon, imgSrc = '', css = {}, onClick, testId }) => {\n return (\n <Flex\n css={{\n w: '100%',\n p: '$10',\n r: '$1',\n cursor: 'pointer',\n bg: '$surface_bright',\n mb: '$10',\n mt: '$8',\n ...css,\n }}\n data-testid={testId}\n onClick={onClick}\n >\n <Text css={{ alignSelf: 'center', p: '$4' }}>\n {imgSrc ? <img src={imgSrc} height={40} width={40} alt=\"Streaming\" /> : <Icon width={40} height={40} />}\n </Text>\n <Box css={{ flex: '1 1 0', mx: '$8' }}>\n <Text variant=\"h6\" css={{ mb: '$4' }}>\n {title}\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {subtitle}\n </Text>\n </Box>\n <Text css={{ alignSelf: 'center' }}>\n <ChevronRightIcon />\n </Text>\n </Flex>\n );\n};\n\nexport const ContentHeader = ({ onBack, onClose, title = '', content }) => {\n return (\n <Flex\n css={{ w: '100%', py: '$8', px: '$10', cursor: 'pointer', borderBottom: '1px solid $border_bright', mb: '$8' }}\n >\n {onBack ? (\n <Flex\n align=\"center\"\n css={{\n mr: '$8',\n color: '$on_surface_high',\n }}\n onClick={onBack}\n data-testid=\"go_back\"\n >\n <ChevronLeftIcon />\n </Flex>\n ) : null}\n <Box css={{ flex: '1 1 0', display: 'flex', alignItems: 'center' }}>\n {title ? (\n <Text\n variant=\"tiny\"\n css={{\n textTransform: 'uppercase',\n fontWeight: '$semiBold',\n color: '$on_surface_medium',\n }}\n >\n {title}\n </Text>\n ) : null}\n <Text variant=\"h6\">{content}</Text>\n </Box>\n {onClose ? (\n <IconButton onClick={onClose} css={{ alignSelf: 'flex-start' }} data-testid=\"close_stream_section\">\n <CrossIcon />\n </IconButton>\n ) : null}\n </Flex>\n );\n};\nexport const Container = ({ children, rounded = false }) => {\n return (\n <Box\n css={{\n size: '100%',\n zIndex: 2,\n position: 'absolute',\n top: 0,\n left: 0,\n bg: '$surface_dim',\n transform: 'translateX(10%)',\n animation: `${slideLeftAndFade('10%')} 100ms ease-out forwards`,\n display: 'flex',\n flexDirection: 'column',\n borderRadius: rounded ? '$2' : '0',\n }}\n >\n {children}\n </Box>\n );\n};\n\nexport const ContentBody = ({ Icon, title, removeVerticalPadding = false, children }) => {\n return (\n <Box css={{ p: removeVerticalPadding ? '$0 $10' : '$10' }}>\n <Text css={{ display: 'flex', alignItems: 'center', mb: '$4' }}>\n <Icon />\n <Text as=\"span\" css={{ fontWeight: '$semiBold', ml: '$4' }}>\n {title}\n </Text>\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {children}\n </Text>\n </Box>\n );\n};\n\nexport const RecordStream = ({ record, setRecord, testId }) => {\n const permissions = useHMSStore(selectPermissions);\n return permissions?.browserRecording ? (\n <Flex align=\"center\" css={{ bg: '$surface_bright', m: '$8 $10', p: '$8', r: '$0' }}>\n <Text css={{ color: '$alert_error_default' }}>\n <RecordIcon />\n </Text>\n <Text variant=\"sm\" css={{ flex: '1 1 0', mx: '$8' }}>\n Record the stream\n </Text>\n <Switch checked={record} onCheckedChange={setRecord} data-testid={testId} />\n </Flex>\n ) : null;\n};\n\nexport const ErrorText = ({ error }) => {\n if (!error) {\n return null;\n }\n return (\n <Text variant=\"sm\" css={{ my: '$4', color: '$alert_error_default' }}>\n {error}\n </Text>\n );\n};\n", "import React from 'react';\nimport { HMSPollState } from '@100mslive/react-sdk';\nimport { Flex, Text } from '../../../../';\nimport { PollStage } from './constants';\n\nconst statusMap: Record<HMSPollState, PollStage> = {\n created: PollStage.DRAFT,\n started: PollStage.LIVE,\n stopped: PollStage.ENDED,\n};\n\nexport const StatusIndicator = ({ status }: { status?: HMSPollState }) => {\n if (!status) return null;\n return (\n <Flex align=\"center\">\n <Flex\n css={{\n backgroundColor: statusMap[status] === PollStage.LIVE ? '$alert_error_default' : '$secondary_default',\n p: '$2 $4',\n borderRadius: '$0',\n }}\n >\n <Text\n variant=\"caption\"\n css={{\n fontWeight: '$semiBold',\n color: '$on_primary_high',\n }}\n >\n {statusMap[status]}\n </Text>\n </Flex>\n </Flex>\n );\n};\n", "// @ts-check\nimport React, { useMemo, useState } from 'react';\nimport { v4 as uuid } from 'uuid';\nimport { selectPollByID, useHMSActions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\nimport { AddCircleIcon } from '@100mslive/react-icons';\nimport { Button, Flex, Text } from '../../../../';\nimport { Container, ContentHeader } from '../../Streaming/Common';\nimport { isValidQuestion, QuestionForm } from './QuestionForm';\nimport { SavedQuestion } from './SavedQuestion';\nimport { usePollViewToggle } from '../../AppData/useSidepane';\nimport { usePollViewState } from '../../AppData/useUISettings';\nimport { POLL_VIEWS } from '../../../common/constants';\n\nconst getEditableFormat = questions => {\n const editableQuestions = questions.map(question => {\n return { ...question, saved: true, draftID: uuid() };\n });\n return editableQuestions;\n};\n\nexport function CreateQuestions() {\n const actions = useHMSActions();\n const { isHLSRunning } = useRecordingStreaming();\n const togglePollView = usePollViewToggle();\n const { pollInView: id, setPollView } = usePollViewState();\n const interaction = useHMSStore(selectPollByID(id));\n const [questions, setQuestions] = useState(\n interaction.questions?.length ? getEditableFormat(interaction.questions) : [{ draftID: uuid() }],\n );\n\n const isValidPoll = useMemo(() => questions.length > 0 && questions.every(isValidQuestion), [questions]);\n\n const launchPoll = async () => {\n await actions.interactivityCenter.startPoll(id);\n await sendTimedMetadata(id);\n setPollView(POLL_VIEWS.VOTE);\n };\n\n const sendTimedMetadata = async poll_id => {\n // send hls timedmetadata when it is running\n if (poll_id && isHLSRunning) {\n try {\n await actions.sendHLSTimedMetadata([\n {\n payload: `poll:${poll_id}`,\n duration: 100,\n },\n ]);\n } catch (e) {\n console.error(e);\n }\n }\n };\n\n const headingTitle = interaction?.type\n ? interaction?.type?.[0]?.toUpperCase() + interaction?.type?.slice(1)\n : 'Polls and Quizzes';\n const isQuiz = interaction?.type === 'quiz';\n return (\n <Container rounded>\n <ContentHeader\n content={headingTitle}\n onClose={togglePollView}\n onBack={() => setPollView(POLL_VIEWS.CREATE_POLL_QUIZ)}\n />\n <Flex direction=\"column\" css={{ p: '$10', overflowY: 'auto' }}>\n <Flex direction=\"column\">\n {questions.map((question, index) => (\n <QuestionCard\n key={question.draftID}\n question={question}\n index={index}\n length={questions.length}\n onSave={async questionParams => {\n const updatedQuestions = [...questions.slice(0, index), questionParams, ...questions.slice(index + 1)];\n setQuestions(updatedQuestions);\n const validQuestions = updatedQuestions.filter(question => isValidQuestion(question));\n await actions.interactivityCenter.addQuestionsToPoll(id, validQuestions);\n }}\n isQuiz={isQuiz}\n removeQuestion={async questionID => {\n const updatedQuestions = questions.filter(questionFromSet => questionID !== questionFromSet?.draftID);\n setQuestions(updatedQuestions);\n const validQuestions = updatedQuestions.filter(question => isValidQuestion(question));\n await actions.interactivityCenter.addQuestionsToPoll(id, validQuestions);\n }}\n convertToDraft={questionID =>\n setQuestions(prev => {\n const copyOfQuestions = [...prev];\n copyOfQuestions.forEach(question => {\n if (questionID && question.draftID === questionID) {\n question.saved = false;\n }\n });\n return copyOfQuestions;\n })\n }\n />\n ))}\n </Flex>\n <Flex\n css={{\n c: '$on_surface_low',\n my: '$sm',\n cursor: 'pointer',\n '&:hover': { c: '$on_surface_medium' },\n }}\n onClick={() => setQuestions([...questions, { draftID: uuid() }])}\n >\n <AddCircleIcon />\n <Text variant=\"body1\" css={{ ml: '$md', c: '$inherit' }}>\n Add another question\n </Text>\n </Flex>\n <Flex css={{ w: '100%' }} justify=\"end\">\n <Button disabled={!isValidPoll} onClick={async () => launchPoll()}>\n Launch {interaction?.type}\n </Button>\n </Flex>\n </Flex>\n </Container>\n );\n}\n\nconst QuestionCard = ({ question, onSave, index, length, removeQuestion, isQuiz, convertToDraft }) => {\n return (\n <Flex direction=\"column\" css={{ p: '$md', bg: '$surface_default', r: '$1', mb: '$sm' }}>\n {question.saved ? (\n <SavedQuestion question={question} index={index} length={length} convertToDraft={convertToDraft} />\n ) : (\n <QuestionForm\n question={question}\n removeQuestion={() => removeQuestion(question.draftID)}\n onSave={params => onSave(params)}\n index={index}\n length={length}\n isQuiz={isQuiz}\n />\n )}\n </Flex>\n );\n};\n", "// @ts-check\nimport React, { useCallback, useRef, useState } from 'react';\nimport {\n HMSPollQuestionCreateParams,\n HMSPollQuestionOptionCreateParams,\n HMSPollQuestionType,\n} from '@100mslive/react-sdk';\nimport { AddCircleIcon, TrashIcon } from '@100mslive/react-icons';\n// import { Button, Dropdown, Flex, IconButton, Input, Switch, Text, TextArea, Tooltip } from '../../../..';\nimport { Button, Dropdown, Flex, IconButton, Input, Text, TextArea, Tooltip } from '../../../..';\n// @ts-ignore\nimport { DialogDropdownTrigger } from '../../../primitives/DropdownTrigger';\n// @ts-ignore\nimport { DeleteQuestionModal } from './DeleteQuestionModal';\n// @ts-ignore\nimport { useDropdownSelection } from '../../hooks/useDropdownSelection';\n// @ts-ignore\nimport { isValidTextInput } from '../../../common/utils';\nimport { Line } from '../common/Line';\n// @ts-ignore\nimport { MultipleChoiceOptionInputs } from '../common/MultipleChoiceOptions';\n// @ts-ignore\nimport { SingleChoiceOptionInputs } from '../common/SingleChoiceOptions';\nimport { QUESTION_TYPE, QUESTION_TYPE_TITLE } from '../../../common/constants';\n\nexport const QuestionForm = ({\n question,\n index,\n length,\n onSave,\n removeQuestion,\n isQuiz,\n}: {\n question: HMSPollQuestionCreateParams & { draftID: number };\n index: number;\n length: number;\n onSave: (optionParams: HMSPollQuestionCreateParams & { draftID: number; saved: boolean }) => void;\n removeQuestion: () => void;\n isQuiz: boolean;\n}) => {\n const ref = useRef(null);\n const selectionBg = useDropdownSelection();\n const [openDelete, setOpenDelete] = useState(false);\n const [open, setOpen] = useState(false);\n const [type, setType] = useState<HMSPollQuestionType>(question.type || QUESTION_TYPE.SINGLE_CHOICE);\n const [text, setText] = useState(question.text);\n const [weight, setWeight] = useState(isQuiz ? 10 : 1);\n const [options, setOptions] = useState(\n question?.options || [\n { text: '', isCorrectAnswer: false },\n { text: '', isCorrectAnswer: false },\n ],\n );\n // const [skippable, setSkippable] = useState(false);\n const isValid = isValidQuestion({\n text,\n type,\n options,\n weight,\n isQuiz,\n });\n\n const handleOptionTextChange = useCallback(\n (index: number, text: string) => {\n setOptions(options => [...options.slice(0, index), { ...options[index], text }, ...options.slice(index + 1)]);\n },\n [setOptions],\n );\n\n const removeOption = useCallback(\n (index: number) =>\n setOptions(options => {\n const newOptions = [...options];\n newOptions.splice(index, 1);\n return newOptions;\n }),\n [setOptions],\n );\n\n const selectSingleChoiceAnswer = useCallback(\n (answerIndex: number) => {\n if (!isQuiz) {\n return;\n }\n setOptions(options =>\n options.map((option, index) => ({\n ...option,\n isCorrectAnswer: index === answerIndex,\n })),\n );\n },\n [setOptions, isQuiz],\n );\n\n const selectMultipleChoiceAnswer = useCallback(\n (checked: boolean, index: number) => {\n if (!isQuiz) {\n return;\n }\n setOptions(options => [\n ...options.slice(0, index),\n { ...options[index], isCorrectAnswer: checked },\n ...options.slice(index + 1),\n ]);\n },\n [setOptions, isQuiz],\n );\n\n return (\n <>\n <Text variant=\"overline\" css={{ c: '$on_surface_low', textTransform: 'uppercase' }}>\n Question {index + 1} of {length}\n </Text>\n <Text variant=\"body2\" css={{ mt: '$4', mb: '$md' }}>\n Question Type\n </Text>\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <DialogDropdownTrigger\n ref={ref}\n // @ts-ignore\n title={QUESTION_TYPE_TITLE[type]}\n css={{\n backgroundColor: '$surface_bright',\n border: '1px solid $border_bright',\n }}\n open={open}\n />\n <Dropdown.Portal>\n {/* @ts-ignore */}\n <Dropdown.Content align=\"start\" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1000 }}>\n {Object.keys(QUESTION_TYPE_TITLE).map(value => {\n return (\n <Dropdown.Item\n key={value}\n // @ts-ignore\n onSelect={() => setType(value)}\n css={{\n px: '$9',\n bg: type === value ? selectionBg : undefined,\n }}\n >\n {/* @ts-ignore */}\n {QUESTION_TYPE_TITLE[value]}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n <TextArea\n maxLength={1024}\n placeholder=\"Ask a question\"\n css={{\n mt: '$md',\n backgroundColor: '$surface_bright',\n border: '1px solid $border_bright',\n minHeight: '$14',\n resize: 'vertical',\n maxHeight: '$32',\n }}\n value={text}\n onChange={event => setText(event.target.value.trimStart())}\n />\n <Text variant=\"xs\" css={{ color: '$on_surface_medium', textAlign: 'end', mt: '$4' }}>\n {text?.length || 0}/1024\n </Text>\n <Line />\n {/* @ts-ignore */}\n {type === QUESTION_TYPE.SINGLE_CHOICE || type === QUESTION_TYPE.MULTIPLE_CHOICE ? (\n <>\n <Text variant=\"body2\" css={{ mb: '$6', c: '$on_surface_medium' }}>\n Options\n </Text>\n\n {isQuiz && (\n <Text variant=\"xs\" css={{ c: '$on_surface_medium', mb: '$md' }}>\n {type === QUESTION_TYPE.SINGLE_CHOICE\n ? 'Use the radio buttons to indicate the correct answer'\n : 'Use the checkboxes to indicate the correct answer(s)'}\n </Text>\n )}\n\n {type === QUESTION_TYPE.SINGLE_CHOICE && (\n <SingleChoiceOptionInputs\n isQuiz={isQuiz}\n options={options}\n selectAnswer={selectSingleChoiceAnswer}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n )}\n\n {type === QUESTION_TYPE.MULTIPLE_CHOICE && (\n <MultipleChoiceOptionInputs\n isQuiz={isQuiz}\n options={options}\n selectAnswer={selectMultipleChoiceAnswer}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n )}\n\n {options?.length < 20 && (\n <Flex\n css={{\n c: '$on_surface_medium',\n cursor: 'pointer',\n '&:hover': { c: '$on_surface_high' },\n }}\n onClick={() => setOptions([...options, { text: '', isCorrectAnswer: false }])}\n >\n <AddCircleIcon style={{ position: 'relative', left: '-2px' }} />\n\n <Text\n variant=\"sm\"\n css={{\n ml: '$4',\n c: 'inherit',\n }}\n >\n Add an option\n </Text>\n </Flex>\n )}\n <Line />\n {isQuiz ? (\n <>\n <Flex justify=\"between\" align=\"center\" css={{ gap: '$6', w: '100%' }}>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n Point Weightage\n </Text>\n <Input\n type=\"number\"\n value={weight}\n min={1}\n max={999}\n onChange={e => setWeight(Math.min(Number(e.target.value), 999))}\n css={{\n backgroundColor: '$surface_bright',\n border: '1px solid $border_bright',\n maxWidth: '$20',\n }}\n />\n </Flex>\n {/* <Flex justify=\"between\" css={{ mt: '$md', gap: '$6', w: '100%' }}>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n Allow to skip\n </Text>\n <Switch defaultChecked={skippable} onCheckedChange={checked => setSkippable(checked)} />\n </Flex> */}\n </>\n ) : null}\n </>\n ) : null}\n\n <Flex justify=\"end\" align=\"center\" css={{ mt: '$12', gap: '$8' }}>\n <IconButton css={{ border: '1px solid $border_bright' }}>\n <TrashIcon onClick={() => setOpenDelete(!open)} />\n </IconButton>\n <Tooltip\n disabled={isValid}\n title={\n options.length < 2\n ? 'At least two options must be added'\n : `Please fill all the fields ${isQuiz ? 'and mark the correct answer(s)' : ''} to continue`\n }\n boxCss={{ maxWidth: '$40' }}\n >\n <Button\n variant=\"standard\"\n disabled={!isValid}\n onClick={() => {\n onSave({\n saved: true,\n text,\n type,\n options,\n skippable: false,\n draftID: question.draftID,\n weight,\n });\n }}\n >\n Save\n </Button>\n </Tooltip>\n </Flex>\n\n <DeleteQuestionModal open={openDelete} setOpen={setOpenDelete} removeQuestion={removeQuestion} />\n </>\n );\n};\n\nexport const isValidQuestion = ({\n text,\n type,\n options,\n weight,\n isQuiz = false,\n}: {\n text: string;\n type: string;\n options: HMSPollQuestionOptionCreateParams[];\n weight: number;\n isQuiz?: boolean;\n}) => {\n if (!isValidTextInput(text) || !type) {\n return false;\n }\n\n const everyOptionHasText = options.length > 1 && options.every(option => option && isValidTextInput(option.text, 1));\n const hasCorrectAnswer = options.some(option => option.isCorrectAnswer);\n\n if (!isQuiz) {\n return everyOptionHasText;\n }\n\n // The minimum acceptable value of weight is 1\n if (isQuiz && weight < 1) {\n return false;\n }\n\n return everyOptionHasText && hasCorrectAnswer;\n};\n", "import React from 'react';\nimport { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../../Button';\nimport { Box, Flex } from '../../../../Layout';\nimport { Dialog } from '../../../../Modal';\nimport { Text } from '../../../../Text';\n\nexport const DeleteQuestionModal = ({\n open,\n setOpen,\n removeQuestion,\n}: {\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n removeQuestion: () => void;\n}) => {\n return (\n <Dialog.Root open={open}>\n <Dialog.Overlay />\n <Dialog.Portal>\n <Dialog.Content css={{ p: '$10' }}>\n <Box>\n <Flex\n css={{\n color: '$alert_error_default',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />\n <Text variant=\"lg\" css={{ color: 'inherit', fontWeight: '$semiBold' }}>\n Delete Question?\n </Text>\n\n <Box\n css={{\n ml: 'auto',\n color: '$on_surface_medium',\n '&:hover': { color: '$on_surface_high', cursor: 'pointer' },\n }}\n onClick={() => setOpen(false)}\n >\n <CrossIcon />\n </Box>\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', mb: '$8', mt: '$4' }}>\n The question will be deleted. You can't undo this action.\n </Text>\n <Flex css={{ w: '100%', mt: '$12', gap: '$md' }}>\n <Button\n variant=\"standard\"\n outlined\n onClick={() => setOpen(false)}\n css={{ w: '100%', fontSize: '$md', fontWeight: '$semiBold' }}\n >\n Cancel\n </Button>\n <Button\n css={{ w: '100%', fontSize: '$md', fontWeight: '$semiBold' }}\n variant=\"danger\"\n onClick={() => {\n removeQuestion();\n setOpen(false);\n }}\n >\n Delete\n </Button>\n </Flex>\n </Box>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { Flex } from '../../../../Layout';\n\nexport const Line = () => <Flex css={{ w: '100%', borderBottom: '1px solid $border_bright', h: '1px', my: '$8' }} />;\n", "// @ts-check\nimport React from 'react';\nimport { CheckCircleIcon, CheckIcon } from '@100mslive/react-icons';\nimport { Checkbox, Flex, Label, Text } from '../../../../';\nimport { OptionInputWithDelete } from './OptionInputWithDelete';\nimport { VoteCount } from './VoteCount';\nimport { VoteProgress } from './VoteProgress';\n\nexport const MultipleChoiceOptions = ({\n questionIndex,\n options,\n canRespond,\n totalResponses,\n selectedOptions,\n setSelectedOptions,\n showVoteCount,\n isQuiz,\n correctOptionIndexes,\n localPeerResponse,\n isStopped,\n}) => {\n const handleCheckedChange = (checked, index) => {\n const newSelected = new Set(selectedOptions);\n if (checked) {\n newSelected.add(index);\n } else {\n newSelected.delete(index);\n }\n setSelectedOptions(newSelected);\n };\n\n return (\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map(option => {\n return (\n <Flex align=\"center\" key={`${questionIndex}-${option.index}`} css={{ w: '100%', gap: '$4' }}>\n {!isStopped || !isQuiz ? (\n <Checkbox.Root\n id={`${questionIndex}-${option.index}`}\n disabled={!canRespond}\n checked={localPeerResponse?.options?.includes(option.index)}\n onCheckedChange={checked => handleCheckedChange(checked, option.index)}\n css={{\n cursor: canRespond ? 'pointer' : 'not-allowed',\n flexShrink: 0,\n }}\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n ) : null}\n\n {isStopped && correctOptionIndexes?.includes(option.index) ? (\n <Flex align=\"center\" css={{ color: '$on_surface_high' }}>\n <CheckCircleIcon height={20} width={20} />\n </Flex>\n ) : null}\n\n <Flex direction=\"column\" css={{ flexGrow: '1' }}>\n <Flex css={{ w: '100%' }}>\n <Text css={{ display: 'flex', flexGrow: '1' }}>\n <Label htmlFor={`${questionIndex}-${option.index}`}>{option.text}</Label>\n </Text>\n {showVoteCount && <VoteCount voteCount={option.voteCount} />}\n </Flex>\n {showVoteCount && <VoteProgress option={option} totalResponses={totalResponses} />}\n </Flex>\n\n {isStopped && isQuiz && localPeerResponse?.options.includes(option.index) ? (\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', maxWidth: 'max-content' }}>\n Your Answer\n </Text>\n ) : null}\n </Flex>\n );\n })}\n </Flex>\n );\n};\n\nexport const MultipleChoiceOptionInputs = ({ isQuiz, options, selectAnswer, handleOptionTextChange, removeOption }) => {\n return (\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map((option, index) => {\n return (\n <Flex align=\"center\" key={index} css={{ w: '100%', gap: '$4' }}>\n {isQuiz && (\n <Checkbox.Root\n onCheckedChange={checked => selectAnswer(checked, index)}\n checked={option.isCorrectAnswer}\n css={{\n cursor: 'pointer',\n width: '$9',\n }}\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n )}\n <OptionInputWithDelete\n index={index}\n option={option}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n </Flex>\n );\n })}\n </Flex>\n );\n};\n", "import React from 'react';\nimport { HMSPollQuestionOption } from '@100mslive/react-sdk';\nimport { TrashIcon } from '@100mslive/react-icons';\nimport { Input } from '../../../../Input';\n// @ts-ignore\nimport IconButton from '../../../IconButton';\n\nexport const OptionInputWithDelete = ({\n index,\n option,\n handleOptionTextChange,\n removeOption,\n}: {\n index: number;\n option: HMSPollQuestionOption;\n handleOptionTextChange: (index: number, value: string) => void;\n removeOption: (index: number) => void;\n}) => {\n return (\n <>\n <Input\n placeholder={`Option ${index + 1}`}\n css={{\n w: '100%',\n backgroundColor: '$surface_bright',\n border: '1px solid $border_bright',\n }}\n value={option?.text || ''}\n key={index}\n onChange={event => handleOptionTextChange(index, event.target.value.trimStart())}\n maxLength={250}\n />\n <IconButton onClick={() => removeOption(index)} css={{ bg: 'transparent', border: 'none' }}>\n <TrashIcon />\n </IconButton>\n </>\n );\n};\n", "import React from 'react';\nimport { Flex, Text } from '../../../../';\n\nexport const VoteCount = ({ voteCount }: { voteCount: number }) => {\n return (\n <Flex css={{ alignItems: 'center' }}>\n {voteCount ? (\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {voteCount}&nbsp;\n {voteCount === 1 ? 'vote' : 'votes'}\n </Text>\n ) : null}\n </Flex>\n );\n};\n", "import React from 'react';\nimport { HMSPollQuestionOption } from '@100mslive/react-sdk';\nimport { Progress } from '../../../../';\n\nexport const VoteProgress = ({ option, totalResponses }: { option: HMSPollQuestionOption; totalResponses: number }) => {\n const showProgress = typeof option.voteCount === 'number' && typeof totalResponses === 'number' && totalResponses > 0;\n const progressValue = (100 * (option.voteCount || 0)) / totalResponses;\n\n return showProgress ? (\n <Progress.Root value={progressValue} css={{ mt: '$4' }}>\n <Progress.Content\n style={{\n transform: `translateX(-${100 - progressValue}%)`,\n }}\n />\n </Progress.Root>\n ) : null;\n};\n", "// @ts-check\nimport React from 'react';\nimport { CheckCircleIcon } from '@100mslive/react-icons';\nimport { Flex, Label, RadioGroup, Text } from '../../../..';\nimport { OptionInputWithDelete } from './OptionInputWithDelete';\nimport { VoteCount } from './VoteCount';\nimport { VoteProgress } from './VoteProgress';\n\nexport const SingleChoiceOptions = ({\n questionIndex,\n options,\n canRespond,\n setAnswer,\n totalResponses,\n showVoteCount,\n correctOptionIndex,\n isStopped,\n isQuiz,\n localPeerResponse,\n}) => {\n return (\n <RadioGroup.Root value={localPeerResponse?.option} onValueChange={value => setAnswer(value)}>\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map(option => {\n return (\n <Flex align=\"center\" key={`${questionIndex}-${option.index}`} css={{ w: '100%', gap: '$4' }}>\n {!isStopped || !isQuiz ? (\n <RadioGroup.Item\n css={{\n background: 'none',\n h: '$9',\n w: '$9',\n border: '2px solid',\n borderColor: '$on_surface_high',\n display: 'flex',\n flexShrink: 0,\n pt: '$1',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: canRespond ? 'pointer' : 'not-allowed',\n '&[data-state=\"checked\"]': {\n borderColor: '$primary_bright',\n borderWidth: '2px',\n },\n }}\n disabled={!canRespond}\n value={option.index}\n id={`${questionIndex}-${option.index}`}\n >\n <RadioGroup.Indicator\n css={{\n h: '80%',\n w: '80%',\n background: '$primary_bright',\n borderRadius: '$round',\n }}\n />\n </RadioGroup.Item>\n ) : null}\n\n {isStopped && correctOptionIndex === option.index && isQuiz ? (\n <Flex css={{ color: '$on_surface_high' }}>\n <CheckCircleIcon height={20} width={20} />\n </Flex>\n ) : null}\n\n <Flex direction=\"column\" css={{ flexGrow: '1' }}>\n <Flex css={{ w: '100%' }}>\n <Text css={{ display: 'flex', flexGrow: '1', color: '$on_surface_high' }}>\n <Label style={{ color: 'inherit' }} htmlFor={`${questionIndex}-${option.index}`}>\n {option.text}\n </Label>\n </Text>\n {showVoteCount && <VoteCount voteCount={option.voteCount} />}\n </Flex>\n {showVoteCount && <VoteProgress option={option} totalResponses={totalResponses} />}\n </Flex>\n {isStopped && isQuiz && localPeerResponse?.option === option.index ? (\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', maxWidth: 'max-content' }}>\n Your Answer\n </Text>\n ) : null}\n </Flex>\n );\n })}\n </Flex>\n </RadioGroup.Root>\n );\n};\n\nexport const SingleChoiceOptionInputs = ({ isQuiz, options, selectAnswer, handleOptionTextChange, removeOption }) => {\n const correctOptionIndex = options.findIndex(option => option.isCorrectAnswer);\n\n return (\n <RadioGroup.Root value={correctOptionIndex} onValueChange={selectAnswer}>\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map((option, index) => {\n return (\n <Flex align=\"center\" key={`option-${index}`} css={{ w: '100%', gap: '$4' }}>\n {isQuiz && (\n <RadioGroup.Item\n css={{\n background: 'none',\n w: '$9',\n border: '2px solid',\n borderColor: '$on_surface_high',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer',\n '&[data-state=\"checked\"]': {\n borderColor: '$primary_bright',\n borderWidth: '2px',\n },\n }}\n value={index}\n >\n <RadioGroup.Indicator\n css={{\n h: '80%',\n w: '80%',\n background: '$primary_bright',\n borderRadius: '$round',\n }}\n />\n </RadioGroup.Item>\n )}\n <OptionInputWithDelete\n index={index}\n option={option}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n </Flex>\n );\n })}\n </Flex>\n </RadioGroup.Root>\n );\n};\n", "import React, { useMemo } from 'react';\nimport { HMSPollQuestion } from '@100mslive/react-sdk';\nimport { CheckCircleIcon } from '@100mslive/react-icons';\nimport { Button, Flex, Text } from '../../../../';\nimport { QUESTION_TYPE_TITLE } from '../../../common/constants';\n\nexport const SavedQuestion = ({\n question,\n index,\n length,\n convertToDraft,\n}: {\n question: HMSPollQuestion & { draftID: number };\n index: number;\n length: number;\n convertToDraft: (draftID: number) => void;\n}) => {\n const answerArray = useMemo(() => {\n const updatedAnswerArray = [];\n const { option, options } = question?.answer ?? {};\n if (option) {\n updatedAnswerArray.push(option);\n }\n if (options) {\n updatedAnswerArray.push(...options);\n }\n return updatedAnswerArray;\n }, [question?.answer]);\n\n return (\n <>\n <Text variant=\"overline\" css={{ c: '$on_surface_low', textTransform: 'uppercase' }}>\n {/* @ts-ignore */}\n Question {index + 1} of {length}: {QUESTION_TYPE_TITLE[question.type]}\n </Text>\n <Text variant=\"body2\" css={{ mt: '$4', mb: '$md' }}>\n {question.text}\n </Text>\n {question.options?.map((option, index) => (\n <Flex key={`${option.text}-${index}`} css={{ alignItems: 'center', my: '$xs' }}>\n <Text variant=\"body2\" css={{ c: '$on_surface_medium' }}>\n {option.text}\n </Text>\n {/* @ts-ignore */}\n {(answerArray.includes(index + 1) || option.isCorrectAnswer) && (\n <Flex css={{ color: '$alert_success', mx: '$xs' }}>\n <CheckCircleIcon height={24} width={24} />\n </Flex>\n )}\n </Flex>\n ))}\n {question.skippable ? (\n <Text variant=\"sm\" css={{ color: '$on_surface_low', my: '$md' }}>\n Not required to answer\n </Text>\n ) : null}\n <Flex justify=\"end\" css={{ w: '100%', alignItems: 'center' }}>\n <Button variant=\"standard\" css={{ fontWeight: '$semiBold' }} onClick={() => convertToDraft(question.draftID)}>\n Edit\n </Button>\n </Flex>\n </>\n );\n};\n", "import React, { useState } from 'react';\nimport { selectPollByID, useHMSStore } from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, ChevronRightIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../../Layout';\nimport { Loading } from '../../../../Loading';\nimport { Text } from '../../../../Text';\n// @ts-ignore\nimport { Container } from '../../Streaming/Common';\nimport { LeaderboardEntry } from './LeaderboardEntry';\nimport { PeerParticipationSummary } from './PeerParticipationSummary';\n// @ts-ignore\nimport { useSidepaneToggle } from '../../AppData/useSidepane';\n// @ts-ignore\nimport { usePollViewState } from '../../AppData/useUISettings';\nimport { useQuizSummary } from './useQuizSummary';\n// @ts-ignore\nimport { StatusIndicator } from '../common/StatusIndicator';\nimport { POLL_VIEWS } from '../../../common/constants';\n\nexport const LeaderboardSummary = ({ pollID }: { pollID: string }) => {\n const quiz = useHMSStore(selectPollByID(pollID));\n const { quizLeaderboard, maxPossibleScore } = useQuizSummary(pollID);\n const [viewAllEntries, setViewAllEntries] = useState(false);\n const { setPollView } = usePollViewState();\n const toggleSidepane = useSidepaneToggle();\n\n if (!quiz || !quizLeaderboard)\n return (\n <Flex align=\"center\" justify=\"center\" css={{ size: '100%' }}>\n <Loading />\n </Flex>\n );\n\n const questionCount = quiz.questions?.length || 0;\n\n return (\n <Container rounded>\n <Flex direction=\"column\" css={{ size: '100%', p: '$8' }}>\n <Flex justify=\"between\" align=\"center\" css={{ pb: '$6', borderBottom: '1px solid $border_bright', mb: '$8' }}>\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <Flex\n css={{ color: '$on_surface_medium', '&:hover': { color: '$on_surface_high', cursor: 'pointer' } }}\n onClick={() => setPollView(POLL_VIEWS.VOTE)}\n >\n <ChevronLeftIcon />\n </Flex>\n <Text variant=\"lg\" css={{ fontWeight: '$semiBold' }}>\n {quiz.title}\n </Text>\n <StatusIndicator status={quiz.state} />\n </Flex>\n <Flex\n css={{ color: '$on_surface_medium', '&:hover': { color: '$on_surface_high', cursor: 'pointer' } }}\n onClick={toggleSidepane}\n >\n <CrossIcon />\n </Flex>\n </Flex>\n <Box css={{ overflowY: 'auto', mr: '-$4', pr: '$4' }}>\n {!viewAllEntries ? <PeerParticipationSummary quiz={quiz} /> : null}\n\n <Text variant=\"sm\" css={{ fontWeight: '$semiBold', mt: '$4' }}>\n Leaderboard\n </Text>\n <Text variant=\"xs\" css={{ color: '$on_surface_medium' }}>\n Based on score and time taken to cast the correct answer\n </Text>\n <Box\n css={{\n mt: '$8',\n overflowY: 'auto',\n flex: viewAllEntries ? '1 1 0' : 'unset',\n mr: viewAllEntries ? '-$6' : 'unset',\n px: viewAllEntries ? '0' : '$4',\n pr: viewAllEntries ? '$6' : '$4',\n backgroundColor: viewAllEntries ? '' : '$surface_default',\n borderRadius: '$1',\n }}\n >\n {quizLeaderboard?.entries &&\n quizLeaderboard.entries\n .slice(0, viewAllEntries ? undefined : 5)\n .map(question => (\n <LeaderboardEntry\n key={question.position}\n position={question.position}\n score={question.score}\n questionCount={questionCount}\n correctResponses={question.correctResponses}\n userName={question.peer.username || ''}\n maxPossibleScore={maxPossibleScore}\n duration={question.duration}\n />\n ))}\n {quizLeaderboard?.entries?.length > 5 && !viewAllEntries ? (\n <Flex\n align=\"center\"\n justify=\"end\"\n css={{\n w: '100%',\n borderTop: '1px solid $border_bright',\n cursor: 'pointer',\n color: '$on_surface_high',\n p: '$6 $2',\n }}\n onClick={() => setViewAllEntries(true)}\n >\n <Text variant=\"sm\">View All</Text> <ChevronRightIcon />\n </Flex>\n ) : null}\n </Box>\n </Box>\n </Flex>\n </Container>\n );\n};\n", "import React from 'react';\nimport { CheckCircleIcon, ClockIcon, TrophyFilledIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../../Layout';\nimport { Text } from '../../../../Text';\nimport { getFormattedTime } from '../common/utils';\n\nconst positionColorMap: Record<number, string> = { 1: '#D69516', 2: '#3E3E3E', 3: '#583B0F' };\n\nexport const LeaderboardEntry = ({\n position,\n score,\n questionCount,\n correctResponses,\n userName,\n maxPossibleScore,\n duration,\n}: {\n position: number;\n score: number;\n questionCount: number;\n correctResponses: number;\n userName: string;\n maxPossibleScore: number;\n duration: number;\n}) => {\n return (\n <Flex align=\"center\" justify=\"between\" css={{ my: '$8' }}>\n <Flex align=\"center\" css={{ gap: '$6' }}>\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n backgroundColor: positionColorMap[position] || '',\n h: '$10',\n w: '$10',\n borderRadius: '$round',\n color: position > 3 ? '$on_surface_low' : '#FFF',\n fontSize: '$xs',\n fontWeight: '$semiBold',\n }}\n >\n {position}\n </Flex>\n\n <Box>\n <Text variant=\"sm\" css={{ fontWeight: '$semiBold', color: '$on_surface_high' }}>\n {userName}\n </Text>\n\n <Text variant=\"sm\" css={{ mt: '$1' }}>\n {score} / {maxPossibleScore} points\n </Text>\n </Box>\n </Flex>\n\n <Flex align=\"center\" css={{ gap: '$4', color: '$on_surface_medium' }}>\n {position === 1 && score ? <TrophyFilledIcon height={16} width={16} /> : null}\n {questionCount ? (\n <>\n <CheckCircleIcon height={16} width={16} />\n <Text variant=\"xs\">\n {correctResponses}/{questionCount}\n </Text>\n </>\n ) : null}\n\n {duration ? (\n <Flex align=\"center\" css={{ gap: '$2', color: '$on_surface_medium' }}>\n <ClockIcon height={16} width={16} />\n <Text variant=\"xs\">{getFormattedTime(duration)}</Text>\n </Flex>\n ) : null}\n </Flex>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { HMSPoll, selectLocalPeerID, useHMSStore } from '@100mslive/react-sdk';\nimport { Box } from '../../../../Layout';\nimport { Text } from '../../../../Text';\nimport { StatisticBox } from './StatisticBox';\nimport { useQuizSummary } from './useQuizSummary';\nimport { getFormattedTime } from '../common/utils';\n\nexport const PeerParticipationSummary = ({ quiz }: { quiz: HMSPoll }) => {\n const localPeerId = useHMSStore(selectLocalPeerID);\n const { quizLeaderboard, summary } = useQuizSummary(quiz.id);\n if (quiz.state !== 'stopped') {\n return <></>;\n }\n const isLocalPeerQuizCreator = localPeerId === quiz.startedBy;\n const peerEntry = quizLeaderboard?.entries.find(entry => entry.peer?.peerid === localPeerId);\n\n const boxes = isLocalPeerQuizCreator\n ? [\n {\n title: 'Voted',\n value: `${summary.totalUsers ? ((100 * summary.votedUsers) / summary.totalUsers).toFixed(0) : 0}% (${\n summary.votedUsers\n }/${summary.totalUsers})`,\n },\n {\n title: 'Correct Answers',\n value: `${summary.totalUsers ? ((100 * summary.correctUsers) / summary.totalUsers).toFixed(0) : 0}% (${\n summary.correctUsers\n }/${summary.totalUsers})`,\n },\n // Time in ms\n { title: 'Avg. Time Taken', value: getFormattedTime(summary.avgTime) },\n {\n title: 'Avg. Score',\n value: Number.isInteger(summary.avgScore) ? summary.avgScore : summary.avgScore.toFixed(2),\n },\n ]\n : [\n { title: 'Your rank', value: peerEntry?.position || '-' },\n { title: 'Points', value: peerEntry?.score || 0 },\n // Time in ms\n { title: 'Time Taken', value: getFormattedTime(peerEntry?.duration) },\n {\n title: 'Correct Answers',\n value: peerEntry?.totalResponses ? `${peerEntry?.correctResponses}/${peerEntry.totalResponses}` : '-',\n },\n ];\n\n return (\n <Box>\n <Text css={{ fontWeight: '$semiBold', my: '$8' }}>Participation Summary</Text>\n <Box css={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '$4' }}>\n {boxes.map(box => (\n <StatisticBox key={box.title} title={box.title} value={box.value} />\n ))}\n </Box>\n </Box>\n );\n};\n", "import React from 'react';\nimport { Box } from '../../../../Layout';\nimport { Text } from '../../../../Text';\n\nexport const StatisticBox = ({ title, value = 0 }: { title: string; value: string | number | undefined }) => {\n if (!value && !(typeof value === 'number')) {\n return <></>;\n }\n return (\n <Box css={{ p: '$8', background: '$surface_default', borderRadius: '$1', w: '100%' }}>\n <Text\n variant=\"tiny\"\n css={{ textTransform: 'uppercase', color: '$on_surface_medium', fontWeight: '$semiBold', my: '$4' }}\n >\n {title}\n </Text>\n <Text css={{ fontWeight: '$semiBold' }}>{value}</Text>\n </Box>\n );\n};\n", "import { useEffect, useState } from 'react';\nimport {\n HMSQuizLeaderboardResponse,\n HMSQuizLeaderboardSummary,\n selectPollByID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n\nexport const useQuizSummary = (quizID: string) => {\n const hmsActions = useHMSActions();\n const quiz = useHMSStore(selectPollByID(quizID));\n const [quizLeaderboard, setQuizLeaderboard] = useState<HMSQuizLeaderboardResponse | undefined>();\n\n const summary: HMSQuizLeaderboardSummary = quizLeaderboard?.summary || {\n totalUsers: 0,\n votedUsers: 0,\n avgScore: 0,\n avgTime: 0,\n correctUsers: 0,\n };\n const [calculations, setCalculations] = useState({ maxPossibleScore: 0, totalResponses: 0 });\n\n useEffect(() => {\n const fetchLeaderboardData = async () => {\n if (!quizLeaderboard && quiz && !quiz?.anonymous && quiz.state === 'stopped') {\n const leaderboardData = await hmsActions.interactivityCenter.fetchLeaderboard(quiz.id, 0, 50);\n\n const { maxPossibleScore, totalResponses } =\n quiz?.questions?.reduce((accumulator, question) => {\n accumulator.maxPossibleScore += question.weight || 0;\n accumulator.totalResponses += question?.responses?.length || 0;\n return accumulator;\n }, calculations) || calculations;\n\n setQuizLeaderboard(leaderboardData);\n setCalculations({ maxPossibleScore, totalResponses });\n }\n };\n\n fetchLeaderboardData();\n }, [quiz, hmsActions.interactivityCenter, quizLeaderboard, calculations]);\n\n return {\n quizLeaderboard,\n summary,\n maxPossibleScore: calculations.maxPossibleScore,\n totalResponses: calculations.totalResponses,\n };\n};\n", "import React, { useEffect, useRef, useState } from 'react';\nimport {\n selectLocalPeer,\n selectPeerNameByID,\n selectPermissions,\n selectPollByID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Box, Button, Flex, Text } from '../../../..';\n// @ts-ignore\nimport { Container } from '../../Streaming/Common';\nimport { StandardView } from './StandardVoting';\nimport { TimedView } from './TimedVoting';\n// @ts-ignore\nimport { usePollViewState } from '../../AppData/useUISettings';\n// @ts-ignore\nimport { getPeerResponses } from '../../../common/utils';\nimport { StatusIndicator } from '../common/StatusIndicator';\nimport { POLL_VIEWS } from '../../../common/constants';\n\nexport const Voting = ({ id, toggleVoting }: { id: string; toggleVoting: () => void }) => {\n const actions = useHMSActions();\n const poll = useHMSStore(selectPollByID(id));\n const pollCreatorName = useHMSStore(selectPeerNameByID(poll?.createdBy));\n const permissions = useHMSStore(selectPermissions);\n const canEndActivity = !!permissions?.pollWrite;\n const { setPollView } = usePollViewState();\n // Sets view - linear or vertical, toggles timer indicator\n const showSingleView = poll?.type === 'quiz' && poll.state === 'started';\n const fetchedInitialResponses = useRef(false);\n const [savedResponses, setSavedResponses] = useState<Record<any, any>>({});\n const localPeer = useHMSStore(selectLocalPeer);\n const localPeerId = localPeer?.id;\n const customerUserId = localPeer?.customerUserId;\n\n // To reset whenever a different poll is opened\n useEffect(() => {\n fetchedInitialResponses.current = false;\n setSavedResponses({});\n }, [id, setSavedResponses]);\n\n useEffect(() => {\n const getResponses = async () => {\n if (poll && actions.interactivityCenter && !fetchedInitialResponses.current) {\n await actions.interactivityCenter.getPollResponses(poll, true);\n fetchedInitialResponses.current = true;\n }\n };\n getResponses();\n }, [poll, actions.interactivityCenter]);\n\n useEffect(() => {\n if (poll?.questions) {\n const localPeerResponses = getPeerResponses(poll.questions, localPeerId, customerUserId);\n // @ts-ignore\n localPeerResponses?.forEach(response => {\n if (response) {\n setSavedResponses(prev => {\n const prevCopy = { ...prev };\n prevCopy[response[0]?.questionIndex] = { option: response[0]?.option, options: response[0]?.options };\n return prevCopy;\n });\n }\n });\n }\n }, [localPeerId, poll?.questions, id, customerUserId]);\n\n if (!poll) {\n return null;\n }\n\n const canViewLeaderboard = poll.type === 'quiz' && poll.state === 'stopped' && !poll.anonymous;\n\n return (\n <Container rounded>\n <Flex\n align=\"center\"\n css={{\n gap: '$4',\n py: '$6',\n px: '$8',\n my: '$4',\n w: '100%',\n color: '$on_surface_high',\n borderBottom: '1px solid $border_default',\n }}\n >\n <Flex\n onClick={() => setPollView(POLL_VIEWS.CREATE_POLL_QUIZ)}\n css={{ cursor: 'pointer', c: '$on_surface_medium', '&:hover': { color: '$on_surface_high' } }}\n >\n <ChevronLeftIcon />\n </Flex>\n <Text variant=\"h6\">{poll.title}</Text>\n <StatusIndicator status={poll.state} />\n <Box\n css={{\n marginLeft: 'auto',\n cursor: 'pointer',\n '&:hover': { opacity: '0.8' },\n height: 'fit-content',\n }}\n >\n <CrossIcon onClick={toggleVoting} />\n </Box>\n </Flex>\n\n <Flex direction=\"column\" css={{ p: '$8 $10', flex: '1 1 0', overflowY: 'auto' }}>\n {poll.state === 'started' ? (\n <Text css={{ color: '$on_surface_medium', fontWeight: '$semiBold' }}>\n {pollCreatorName || 'Participant'} started a {poll.type}\n </Text>\n ) : null}\n\n {showSingleView ? (\n <TimedView poll={poll} localPeerResponses={savedResponses} updateSavedResponses={setSavedResponses} />\n ) : (\n <StandardView poll={poll} localPeerResponses={savedResponses} updateSavedResponses={setSavedResponses} />\n )}\n </Flex>\n <Flex\n css={{ w: '100%', justifyContent: 'end', alignItems: 'center', p: '$8', borderTop: '1px solid $border_bright' }}\n >\n {poll.state === 'started' && canEndActivity && (\n <Button\n variant=\"danger\"\n css={{ fontWeight: '$semiBold', w: 'max-content' }}\n onClick={() => actions.interactivityCenter.stopPoll(id)}\n >\n End {poll.type}\n </Button>\n )}\n {canViewLeaderboard ? (\n <Button css={{ fontWeight: '$semiBold', w: 'max-content' }} onClick={() => setPollView(POLL_VIEWS.RESULTS)}>\n View Leaderboard\n </Button>\n ) : null}\n </Flex>\n </Container>\n );\n};\n", "import React, { Dispatch, SetStateAction } from 'react';\nimport { HMSPoll } from '@100mslive/react-sdk';\nimport { PeerParticipationSummary } from './PeerParticipationSummary';\n// @ts-ignore\nimport { QuestionCard } from './QuestionCard';\n\nexport const StandardView = ({\n poll,\n localPeerResponses,\n updateSavedResponses,\n}: {\n poll: HMSPoll;\n localPeerResponses: Record<number, number | number[] | undefined>;\n updateSavedResponses: Dispatch<SetStateAction<Record<any, any>>>;\n}) => {\n if (!poll?.questions) {\n return null;\n }\n\n const isQuiz = poll.type === 'quiz';\n const isStopped = poll.state === 'stopped';\n\n return (\n <>\n {isQuiz && isStopped ? <PeerParticipationSummary quiz={poll} /> : null}\n {poll.questions?.map((question, index) => (\n <QuestionCard\n pollID={poll.id}\n isQuiz={isQuiz}\n startedBy={poll.startedBy}\n pollState={poll.state}\n key={`${question.text}-${index}`}\n index={question.index}\n text={question.text}\n type={question.type}\n result={question.result}\n totalQuestions={poll.questions?.length || 0}\n options={question.options}\n localPeerResponse={localPeerResponses?.[question.index]}\n answer={question.answer}\n updateSavedResponses={updateSavedResponses}\n rolesThatCanViewResponses={poll.rolesThatCanViewResponses}\n />\n ))}\n </>\n );\n};\n", "// @ts-check\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { match } from 'ts-pattern';\nimport { selectLocalPeer, selectLocalPeerRoleName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { CheckCircleIcon, ChevronDownIcon, CrossCircleIcon } from '@100mslive/react-icons';\nimport { Box, Button, Flex, Text } from '../../../../';\nimport { checkCorrectAnswer } from '../../../common/utils';\nimport { MultipleChoiceOptions } from '../common/MultipleChoiceOptions';\nimport { SingleChoiceOptions } from '../common/SingleChoiceOptions';\nimport { QUESTION_TYPE } from '../../../common/constants';\n\nexport const QuestionCard = ({\n pollID,\n isQuiz,\n startedBy,\n pollState,\n index,\n totalQuestions,\n result,\n type,\n text,\n options = [],\n answer,\n localPeerResponse,\n updateSavedResponses,\n rolesThatCanViewResponses,\n}) => {\n const actions = useHMSActions();\n const localPeer = useHMSStore(selectLocalPeer);\n\n const isLocalPeerCreator = localPeer?.id === startedBy;\n const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);\n const roleCanViewResponse =\n !rolesThatCanViewResponses ||\n rolesThatCanViewResponses.length === 0 ||\n rolesThatCanViewResponses.includes(localPeerRoleName || '');\n const [localPeerChoice, setLocalPeerChoice] = useState(localPeerResponse);\n\n useEffect(() => {\n setLocalPeerChoice(localPeerResponse);\n }, [localPeerResponse]);\n\n const showVoteCount =\n roleCanViewResponse && (localPeerChoice || (isLocalPeerCreator && pollState === 'stopped')) && !isQuiz;\n\n const isLive = pollState === 'started';\n const pollEnded = pollState === 'stopped';\n const canRespond = isLive && !localPeerChoice;\n const startTime = useRef(Date.now());\n const isCorrectAnswer = checkCorrectAnswer(answer, localPeerChoice, type);\n\n const [singleOptionAnswer, setSingleOptionAnswer] = useState();\n const [multipleOptionAnswer, setMultipleOptionAnswer] = useState(new Set());\n const [showOptions, setShowOptions] = useState(true);\n\n const respondedToQuiz = isQuiz && localPeerChoice && !localPeerChoice.skipped;\n\n const isValidVote = useMemo(() => {\n if (type === QUESTION_TYPE.SINGLE_CHOICE) {\n return singleOptionAnswer !== undefined;\n } else if (type === QUESTION_TYPE.MULTIPLE_CHOICE) {\n return multipleOptionAnswer.size > 0;\n }\n }, [singleOptionAnswer, multipleOptionAnswer, type]);\n\n const handleVote = useCallback(async () => {\n if (!isValidVote) {\n return;\n }\n const submittedResponse = {\n questionIndex: index,\n option: singleOptionAnswer,\n options: Array.from(multipleOptionAnswer),\n duration: Date.now() - startTime.current,\n };\n await actions.interactivityCenter.addResponsesToPoll(pollID, [submittedResponse]);\n updateSavedResponses(prev => {\n const prevCopy = { ...prev };\n prevCopy[index] = { option: singleOptionAnswer, options: Array.from(multipleOptionAnswer) };\n return prevCopy;\n });\n startTime.current = Date.now();\n }, [\n isValidVote,\n index,\n singleOptionAnswer,\n multipleOptionAnswer,\n actions.interactivityCenter,\n pollID,\n updateSavedResponses,\n ]);\n\n return (\n <Box\n css={{\n backgroundColor: '$surface_bright',\n borderRadius: '$1',\n p: '$md',\n mt: '$md',\n border:\n respondedToQuiz && !isLive\n ? `1px solid ${isCorrectAnswer ? '$alert_success' : '$alert_error_default'}`\n : 'none',\n }}\n >\n <Flex align=\"center\" justify=\"between\">\n <Text\n variant=\"caption\"\n css={{\n color: match({ respondedToQuiz, isLive, isCorrectAnswer })\n .when(\n ({ respondedToQuiz, isLive }) => respondedToQuiz && !isLive,\n ({ isCorrectAnswer }) => (isCorrectAnswer ? '$alert_success' : '$alert_error_default'),\n )\n .otherwise(() => '$on_surface_low'),\n fontWeight: '$semiBold',\n display: 'flex',\n alignItems: 'center',\n gap: '$4',\n }}\n >\n {match({ respondedToQuiz, pollEnded, isCorrectAnswer })\n .when(\n ({ respondedToQuiz, pollEnded }) => respondedToQuiz && pollEnded,\n ({ isCorrectAnswer }) => {\n return isCorrectAnswer ? (\n <CheckCircleIcon height={16} width={16} />\n ) : (\n <CrossCircleIcon height={16} width={16} />\n );\n },\n )\n .otherwise(() => null)}\n QUESTION {index} OF {totalQuestions}: {type.toUpperCase()}\n </Text>\n </Flex>\n\n <Flex justify=\"between\" css={{ my: '$md' }}>\n <Text css={{ color: '$on_surface_high' }}>{text}</Text>\n <Box\n css={{ color: '$on_surface_medium', '&:hover': { color: '$on_surface_high', cursor: 'pointer' } }}\n onClick={() => setShowOptions(prev => !prev)}\n >\n <ChevronDownIcon\n style={{ transform: showOptions ? 'rotate(180deg)' : 'rotate(0deg)', transition: 'transform 0.3s ease' }}\n />\n </Box>\n </Flex>\n\n <Box\n css={{ maxHeight: showOptions ? '$80' : '0', transition: 'max-height 0.3s ease', overflowY: 'auto', mb: '$4' }}\n >\n {type === QUESTION_TYPE.SINGLE_CHOICE ? (\n <SingleChoiceOptions\n key={index}\n questionIndex={index}\n isQuiz={isQuiz}\n canRespond={canRespond}\n correctOptionIndex={answer?.option}\n options={options}\n setAnswer={setSingleOptionAnswer}\n totalResponses={result?.totalResponses}\n showVoteCount={showVoteCount}\n localPeerResponse={localPeerChoice}\n isStopped={pollState === 'stopped'}\n />\n ) : null}\n\n {type === QUESTION_TYPE.MULTIPLE_CHOICE ? (\n <MultipleChoiceOptions\n questionIndex={index}\n isQuiz={isQuiz}\n canRespond={canRespond}\n correctOptionIndexes={answer?.options}\n options={options}\n selectedOptions={multipleOptionAnswer}\n setSelectedOptions={setMultipleOptionAnswer}\n totalResponses={result?.totalResponses}\n showVoteCount={showVoteCount}\n localPeerResponse={localPeerChoice}\n isStopped={pollState === 'stopped'}\n />\n ) : null}\n </Box>\n {isLive && (\n <QuestionActions isValidVote={isValidVote} onVote={handleVote} response={localPeerChoice} isQuiz={isQuiz} />\n )}\n </Box>\n );\n};\n\nconst QuestionActions = ({ isValidVote, response, isQuiz, onVote }) => {\n return (\n <Flex align=\"center\" justify=\"end\" css={{ gap: '$4', w: '100%' }}>\n {response ? (\n <Text css={{ fontWeight: '$semiBold', color: '$on_surface_medium' }}>\n {response.skipped ? 'Skipped' : null}\n {isQuiz && !response.skipped ? 'Answered' : null}\n {!isQuiz && !response.skipped ? 'Voted' : null}\n </Text>\n ) : (\n <Button css={{ p: '$xs $10', fontWeight: '$semiBold' }} disabled={!isValidVote} onClick={onVote}>\n {isQuiz ? 'Answer' : 'Vote'}\n </Button>\n )}\n </Flex>\n );\n};\n", "import React, { Dispatch, SetStateAction, useEffect, useState } from 'react';\nimport { HMSPoll } from '@100mslive/react-sdk';\n// @ts-ignore\nimport { QuestionCard } from './QuestionCard';\n// @ts-ignore\nimport { getIndexToShow } from '../../../common/utils';\n\nexport const TimedView = ({\n poll,\n localPeerResponses,\n updateSavedResponses,\n}: {\n poll: HMSPoll;\n localPeerResponses?: Record<number, number | number[] | undefined>;\n updateSavedResponses: Dispatch<SetStateAction<Record<any, any>>>;\n}) => {\n const [currentIndex, setCurrentIndex] = useState(getIndexToShow(localPeerResponses));\n const activeQuestion = poll.questions?.find(question => question.index === currentIndex);\n const attemptedAll = (poll.questions?.length || 0) < currentIndex;\n\n // Handles increments so only one question is shown at a time in quiz\n useEffect(() => {\n setCurrentIndex(getIndexToShow(localPeerResponses));\n }, [localPeerResponses]);\n\n if ((!activeQuestion && !attemptedAll) || !poll.questions?.length) {\n return null;\n }\n\n return (\n <>\n {poll.questions.map(question => {\n return attemptedAll || activeQuestion?.index === question.index ? (\n <QuestionCard\n key={question.index}\n pollID={poll.id}\n isQuiz={poll.type === 'quiz'}\n startedBy={poll.startedBy}\n pollState={poll.state}\n index={question.index}\n text={question.text}\n type={question.type}\n result={question?.result}\n totalQuestions={poll.questions?.length || 0}\n options={question.options}\n localPeerResponse={localPeerResponses?.[question.index]}\n answer={question.answer}\n rolesThatCanViewResponses={poll.rolesThatCanViewResponses}\n updateSavedResponses={updateSavedResponses}\n />\n ) : null;\n })}\n </>\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,O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AAA,EAC7C,OAAO;AACL,WAAO;AAAA,EACT;AACF;",
6
- "names": ["React", "React", "selectPermissions", "useHMSStore", "React", "React", "useHMSStore", "selectPermissions", "React", "_a", "React", "useMemo", "useState", "useHMSActions", "useHMSStore", "AddCircleIcon", "React", "useRef", "useState", "TrashIcon", "React", "CrossIcon", "React", "CrossIcon", "React", "React", "React", "React", "React", "React", "React", "React", "React", "React", "React", "CheckCircleIcon", "React", "CheckCircleIcon", "useRef", "useState", "index", "text", "options", "React", "TrashIcon", "React", "useMemo", "CheckCircleIcon", "useMemo", "_a", "React", "index", "CheckCircleIcon", "useHMSActions", "useHMSStore", "useState", "useMemo", "React", "question", "AddCircleIcon", "React", "useState", "selectPollByID", "useHMSStore", "ChevronLeftIcon", "ChevronRightIcon", "CrossIcon", "React", "CheckCircleIcon", "React", "CheckCircleIcon", "React", "useHMSStore", "React", "React", "useEffect", "useState", "selectPollByID", "useHMSActions", "useHMSStore", "useHMSActions", "useHMSStore", "selectPollByID", "useState", "useEffect", "_a", "useHMSStore", "React", "useHMSStore", "selectPollByID", "useState", "React", "ChevronLeftIcon", "CrossIcon", "ChevronRightIcon", "React", "useEffect", "useRef", "useState", "selectLocalPeer", "selectPermissions", "selectPollByID", "useHMSActions", "useHMSStore", "ChevronLeftIcon", "CrossIcon", "React", "React", "useCallback", "useEffect", "useMemo", "useRef", "useState", "selectLocalPeerRoleName", "useHMSActions", "useHMSStore", "CheckCircleIcon", "QuestionCard", "useHMSActions", "useHMSStore", "selectLocalPeerRoleName", "useState", "useEffect", "useRef", "useMemo", "useCallback", "React", "respondedToQuiz", "isLive", "isCorrectAnswer", "pollEnded", "CheckCircleIcon", "React", "_a", "QuestionCard", "React", "useEffect", "useState", "useState", "useEffect", "React", "_a", "QuestionCard", "useHMSActions", "useHMSStore", "selectPollByID", "selectPermissions", "useRef", "useState", "selectLocalPeer", "useEffect", "React", "ChevronLeftIcon", "CrossIcon", "React"]
7
- }