@100mslive/roomkit-react 0.2.6-alpha.1 → 0.2.6-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-Z7XVENMR.js → HLSView-U3DKJBM7.js} +2 -2
- package/dist/{chunk-6ELWJ7YI.js → chunk-DO5NCPPI.js} +16 -24
- package/dist/{chunk-6ELWJ7YI.js.map → chunk-DO5NCPPI.js.map} +3 -3
- package/dist/index.cjs.js +13 -22
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +7 -7
- package/dist/meta.esbuild.json +14 -14
- package/package.json +6 -6
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx +15 -25
- package/src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx +1 -1
- /package/dist/{HLSView-Z7XVENMR.js.map → HLSView-U3DKJBM7.js.map} +0 -0
package/dist/index.js
CHANGED
package/dist/meta.cjs.json
CHANGED
@@ -6272,7 +6272,7 @@
|
|
6272
6272
|
"format": "esm"
|
6273
6273
|
},
|
6274
6274
|
"src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx": {
|
6275
|
-
"bytes":
|
6275
|
+
"bytes": 7747,
|
6276
6276
|
"imports": [
|
6277
6277
|
{
|
6278
6278
|
"path": "react",
|
@@ -6759,7 +6759,7 @@
|
|
6759
6759
|
"format": "esm"
|
6760
6760
|
},
|
6761
6761
|
"src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx": {
|
6762
|
-
"bytes":
|
6762
|
+
"bytes": 2171,
|
6763
6763
|
"imports": [
|
6764
6764
|
{
|
6765
6765
|
"path": "react",
|
@@ -12775,7 +12775,7 @@
|
|
12775
12775
|
"imports": [],
|
12776
12776
|
"exports": [],
|
12777
12777
|
"inputs": {},
|
12778
|
-
"bytes":
|
12778
|
+
"bytes": 3165874
|
12779
12779
|
},
|
12780
12780
|
"dist/index.cjs.js": {
|
12781
12781
|
"imports": [
|
@@ -15479,7 +15479,7 @@
|
|
15479
15479
|
"entryPoint": "src/index.ts",
|
15480
15480
|
"inputs": {
|
15481
15481
|
"<define:process.env>": {
|
15482
|
-
"bytesInOutput":
|
15482
|
+
"bytesInOutput": 18176
|
15483
15483
|
},
|
15484
15484
|
"src/Theme/base.config.ts": {
|
15485
15485
|
"bytesInOutput": 6104
|
@@ -16070,7 +16070,7 @@
|
|
16070
16070
|
"bytesInOutput": 1165
|
16071
16071
|
},
|
16072
16072
|
"src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx": {
|
16073
|
-
"bytesInOutput":
|
16073
|
+
"bytesInOutput": 9104
|
16074
16074
|
},
|
16075
16075
|
"src/Prebuilt/components/Polls/CreateQuestions/DeleteQuestionModal.tsx": {
|
16076
16076
|
"bytesInOutput": 2786
|
@@ -16106,7 +16106,7 @@
|
|
16106
16106
|
"bytesInOutput": 664
|
16107
16107
|
},
|
16108
16108
|
"src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx": {
|
16109
|
-
"bytesInOutput":
|
16109
|
+
"bytesInOutput": 2726
|
16110
16110
|
},
|
16111
16111
|
"src/Prebuilt/components/Polls/Voting/StatisticBox.tsx": {
|
16112
16112
|
"bytesInOutput": 1010
|
@@ -16487,7 +16487,7 @@
|
|
16487
16487
|
"bytesInOutput": 2980
|
16488
16488
|
}
|
16489
16489
|
},
|
16490
|
-
"bytes":
|
16490
|
+
"bytes": 1487720
|
16491
16491
|
}
|
16492
16492
|
}
|
16493
16493
|
}
|
package/dist/meta.esbuild.json
CHANGED
@@ -6272,7 +6272,7 @@
|
|
6272
6272
|
"format": "esm"
|
6273
6273
|
},
|
6274
6274
|
"src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx": {
|
6275
|
-
"bytes":
|
6275
|
+
"bytes": 7747,
|
6276
6276
|
"imports": [
|
6277
6277
|
{
|
6278
6278
|
"path": "react",
|
@@ -6759,7 +6759,7 @@
|
|
6759
6759
|
"format": "esm"
|
6760
6760
|
},
|
6761
6761
|
"src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx": {
|
6762
|
-
"bytes":
|
6762
|
+
"bytes": 2171,
|
6763
6763
|
"imports": [
|
6764
6764
|
{
|
6765
6765
|
"path": "react",
|
@@ -12780,7 +12780,7 @@
|
|
12780
12780
|
"dist/index.js": {
|
12781
12781
|
"imports": [
|
12782
12782
|
{
|
12783
|
-
"path": "dist/chunk-
|
12783
|
+
"path": "dist/chunk-DO5NCPPI.js",
|
12784
12784
|
"kind": "import-statement"
|
12785
12785
|
}
|
12786
12786
|
],
|
@@ -12853,16 +12853,16 @@
|
|
12853
12853
|
"inputs": {},
|
12854
12854
|
"bytes": 1822
|
12855
12855
|
},
|
12856
|
-
"dist/HLSView-
|
12856
|
+
"dist/HLSView-U3DKJBM7.js.map": {
|
12857
12857
|
"imports": [],
|
12858
12858
|
"exports": [],
|
12859
12859
|
"inputs": {},
|
12860
12860
|
"bytes": 59786
|
12861
12861
|
},
|
12862
|
-
"dist/HLSView-
|
12862
|
+
"dist/HLSView-U3DKJBM7.js": {
|
12863
12863
|
"imports": [
|
12864
12864
|
{
|
12865
|
-
"path": "dist/chunk-
|
12865
|
+
"path": "dist/chunk-DO5NCPPI.js",
|
12866
12866
|
"kind": "import-statement"
|
12867
12867
|
},
|
12868
12868
|
{
|
@@ -13026,13 +13026,13 @@
|
|
13026
13026
|
},
|
13027
13027
|
"bytes": 37440
|
13028
13028
|
},
|
13029
|
-
"dist/chunk-
|
13029
|
+
"dist/chunk-DO5NCPPI.js.map": {
|
13030
13030
|
"imports": [],
|
13031
13031
|
"exports": [],
|
13032
13032
|
"inputs": {},
|
13033
|
-
"bytes":
|
13033
|
+
"bytes": 3101904
|
13034
13034
|
},
|
13035
|
-
"dist/chunk-
|
13035
|
+
"dist/chunk-DO5NCPPI.js": {
|
13036
13036
|
"imports": [
|
13037
13037
|
{
|
13038
13038
|
"path": "react",
|
@@ -15280,7 +15280,7 @@
|
|
15280
15280
|
"external": true
|
15281
15281
|
},
|
15282
15282
|
{
|
15283
|
-
"path": "dist/HLSView-
|
15283
|
+
"path": "dist/HLSView-U3DKJBM7.js",
|
15284
15284
|
"kind": "dynamic-import"
|
15285
15285
|
},
|
15286
15286
|
{
|
@@ -15702,7 +15702,7 @@
|
|
15702
15702
|
],
|
15703
15703
|
"inputs": {
|
15704
15704
|
"<define:process.env>": {
|
15705
|
-
"bytesInOutput":
|
15705
|
+
"bytesInOutput": 18176
|
15706
15706
|
},
|
15707
15707
|
"../../node_modules/lodash/lodash.js": {
|
15708
15708
|
"bytesInOutput": 224267
|
@@ -16272,7 +16272,7 @@
|
|
16272
16272
|
"bytesInOutput": 735
|
16273
16273
|
},
|
16274
16274
|
"src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx": {
|
16275
|
-
"bytesInOutput":
|
16275
|
+
"bytesInOutput": 7536
|
16276
16276
|
},
|
16277
16277
|
"src/Prebuilt/components/Streaming/Common.jsx": {
|
16278
16278
|
"bytesInOutput": 2247
|
@@ -16314,7 +16314,7 @@
|
|
16314
16314
|
"bytesInOutput": 4015
|
16315
16315
|
},
|
16316
16316
|
"src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx": {
|
16317
|
-
"bytesInOutput":
|
16317
|
+
"bytesInOutput": 2078
|
16318
16318
|
},
|
16319
16319
|
"src/Prebuilt/components/Polls/common/utils.ts": {
|
16320
16320
|
"bytesInOutput": 480
|
@@ -16629,7 +16629,7 @@
|
|
16629
16629
|
"bytesInOutput": 651
|
16630
16630
|
}
|
16631
16631
|
},
|
16632
|
-
"bytes":
|
16632
|
+
"bytes": 1265343
|
16633
16633
|
}
|
16634
16634
|
}
|
16635
16635
|
}
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"prebuilt",
|
11
11
|
"roomkit"
|
12
12
|
],
|
13
|
-
"version": "0.2.6-alpha.
|
13
|
+
"version": "0.2.6-alpha.2",
|
14
14
|
"author": "100ms",
|
15
15
|
"license": "MIT",
|
16
16
|
"repository": {
|
@@ -82,10 +82,10 @@
|
|
82
82
|
"react": ">=17.0.2 <19.0.0"
|
83
83
|
},
|
84
84
|
"dependencies": {
|
85
|
-
"@100mslive/hls-player": "0.2.6-alpha.
|
86
|
-
"@100mslive/hms-virtual-background": "1.12.6-alpha.
|
87
|
-
"@100mslive/react-icons": "0.9.6-alpha.
|
88
|
-
"@100mslive/react-sdk": "0.9.6-alpha.
|
85
|
+
"@100mslive/hls-player": "0.2.6-alpha.2",
|
86
|
+
"@100mslive/hms-virtual-background": "1.12.6-alpha.2",
|
87
|
+
"@100mslive/react-icons": "0.9.6-alpha.2",
|
88
|
+
"@100mslive/react-sdk": "0.9.6-alpha.2",
|
89
89
|
"@100mslive/types-prebuilt": "0.12.6",
|
90
90
|
"@emoji-mart/data": "^1.0.6",
|
91
91
|
"@emoji-mart/react": "^1.0.1",
|
@@ -120,5 +120,5 @@
|
|
120
120
|
"uuid": "^8.3.2",
|
121
121
|
"worker-timers": "^7.0.40"
|
122
122
|
},
|
123
|
-
"gitHead": "
|
123
|
+
"gitHead": "21fe3fa3f76f115ecedc9ffb68a5a43a7d760bef"
|
124
124
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
2
2
|
import {
|
3
|
-
HMSPoll,
|
4
3
|
HMSPollState,
|
5
4
|
selectLocalPeerRoleName,
|
6
5
|
selectPermissions,
|
6
|
+
selectPolls,
|
7
7
|
useHMSActions,
|
8
8
|
useHMSStore,
|
9
9
|
} from '@100mslive/react-sdk';
|
@@ -133,7 +133,7 @@ const AddMenu = () => {
|
|
133
133
|
active={interactionType === INTERACTION_TYPE.QUIZ}
|
134
134
|
/>
|
135
135
|
</Flex>
|
136
|
-
<Flex direction="column">
|
136
|
+
<Flex direction="column" css={{ mb: '$10' }}>
|
137
137
|
<Text variant="body2" css={{ mb: '$4' }}>{`Name this ${interactionType.toLowerCase()}`}</Text>
|
138
138
|
<Input
|
139
139
|
ref={inputRef}
|
@@ -194,20 +194,12 @@ const AddMenu = () => {
|
|
194
194
|
|
195
195
|
const PrevMenu = () => {
|
196
196
|
const hmsActions = useHMSActions();
|
197
|
-
const
|
197
|
+
const polls = useHMSStore(selectPolls);
|
198
|
+
const permissions = useHMSStore(selectPermissions);
|
198
199
|
|
199
200
|
useEffect(() => {
|
200
|
-
const listPolls = async () => {
|
201
|
-
const polls = await hmsActions.interactivityCenter.getPolls();
|
202
|
-
const sortedPolls = await polls
|
203
|
-
?.sort((a, b) => (b.createdAt?.getTime() || 0) - (a.createdAt?.getTime() || 0))
|
204
|
-
?.sort((a, b) => (b.state === 'started' ? 1 : 0) - (a.state === 'started' ? 1 : 0));
|
205
|
-
return sortedPolls;
|
206
|
-
};
|
207
|
-
|
208
201
|
const updatePolls = async () => {
|
209
|
-
|
210
|
-
setPolls(sortedPolls);
|
202
|
+
await hmsActions.interactivityCenter.getPolls();
|
211
203
|
};
|
212
204
|
|
213
205
|
updatePolls();
|
@@ -215,21 +207,19 @@ const PrevMenu = () => {
|
|
215
207
|
|
216
208
|
return polls?.length ? (
|
217
209
|
<Flex
|
210
|
+
direction="column"
|
218
211
|
css={{
|
219
|
-
|
220
|
-
|
221
|
-
pt: '$10',
|
212
|
+
width: '100%',
|
213
|
+
...(permissions?.pollWrite ? { borderTop: '$space$px solid $border_bright', paddingTop: '$10' } : {}),
|
222
214
|
}}
|
223
215
|
>
|
224
|
-
<
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
{
|
230
|
-
|
231
|
-
))}
|
232
|
-
</Flex>
|
216
|
+
<Text variant="h6" css={{ c: '$on_surface_high' }}>
|
217
|
+
Previous Polls and Quizzes
|
218
|
+
</Text>
|
219
|
+
<Flex direction="column" css={{ gap: '$10', mt: '$8' }}>
|
220
|
+
{polls?.map(poll => (
|
221
|
+
<InteractionCard key={poll.id} id={poll.id} title={poll.title} status={poll.state} />
|
222
|
+
))}
|
233
223
|
</Flex>
|
234
224
|
</Flex>
|
235
225
|
) : null;
|
@@ -54,7 +54,7 @@ export const LeaderboardEntry = ({
|
|
54
54
|
</Flex>
|
55
55
|
|
56
56
|
<Flex align="center" css={{ gap: '$4', color: '$on_surface_medium' }}>
|
57
|
-
{position === 1 ? <TrophyFilledIcon height={16} width={16} /> : null}
|
57
|
+
{position === 1 && score ? <TrophyFilledIcon height={16} width={16} /> : null}
|
58
58
|
{questionCount ? (
|
59
59
|
<>
|
60
60
|
<CheckCircleIcon height={16} width={16} />
|
File without changes
|