@cuemath/leap 2.8.40-hg1 → 2.8.40-link.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +2 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +0 -6
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/assets/sounds/sounds.js +7 -0
- package/dist/assets/sounds/sounds.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js +3 -3
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +35 -29
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js +11 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js +16 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +42 -35
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +212 -223
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js +7 -8
- package/dist/features/circle-games/game-launcher/game-launcher-analytics-events.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +24 -25
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js +3 -8
- package/dist/features/circle-games/hooks/use-circle-sounds/constants.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js +2 -2
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds-enums.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +17 -22
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/post-game-stats/enums/post-game-stats-enum.js +1 -1
- package/dist/features/post-game-stats/enums/post-game-stats-enum.js.map +1 -1
- package/dist/features/post-game-stats/points/points.js +10 -15
- package/dist/features/post-game-stats/points/points.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats.js +61 -83
- package/dist/features/post-game-stats/post-game-stats.js.map +1 -1
- package/dist/features/talk-meter/helper.js +11 -0
- package/dist/features/talk-meter/helper.js.map +1 -0
- package/dist/features/talk-meter/hooks/use-talk-meter.js +123 -0
- package/dist/features/talk-meter/hooks/use-talk-meter.js.map +1 -0
- package/dist/features/talk-meter/ripple/index.js +62 -0
- package/dist/features/talk-meter/ripple/index.js.map +1 -0
- package/dist/features/talk-meter/talk-meter-styled.js +89 -0
- package/dist/features/talk-meter/talk-meter-styled.js.map +1 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view-styled.js +22 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view-styled.js.map +1 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view.js +101 -0
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view.js.map +1 -0
- package/dist/features/talk-meter/talk-meter.js +75 -0
- package/dist/features/talk-meter/talk-meter.js.map +1 -0
- package/dist/index.d.ts +45 -52
- package/dist/index.js +100 -100
- package/dist/static/female-avatar.b8cd1012.svg +1 -0
- package/dist/static/male-avatar.2febc9eb.svg +1 -0
- package/package.json +2 -3
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star-styled.js +0 -25
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js +0 -57
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star-styled.js +0 -27
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js +0 -37
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js +0 -17
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js +0 -47
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js +0 -6
- package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/constants.js +0 -16
- package/dist/features/post-game-stats/digital-meter/constants.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +0 -87
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +0 -191
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +0 -1
- package/dist/features/post-game-stats/digital-meter/helper.js +0 -33
- package/dist/features/post-game-stats/digital-meter/helper.js.map +0 -1
- package/dist/features/post-game-stats/number-count-animation/number-count-animation.js +0 -27
- package/dist/features/post-game-stats/number-count-animation/number-count-animation.js.map +0 -1
- package/dist/static/point2.7cec6e24.json +0 -1
- package/dist/static/point3.f96fe7aa.json +0 -1
- package/dist/static/point4.fe04fb83.json +0 -1
- package/dist/static/table-mode-star.b8a1d762.json +0 -1
- package/dist/static/table-segment-star.78e851d6.json +0 -1
- package/dist/static/target-achieved-text.053bd142.json +0 -2830
- package/dist/static/target-achieved-text.10db8475.json +0 -1
@@ -0,0 +1,101 @@
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
2
|
+
import { memo as b } from "react";
|
3
|
+
import { ILLUSTRATIONS as d } from "../../../assets/illustrations/illustrations.js";
|
4
|
+
import $ from "../../ui/image/image.js";
|
5
|
+
import t from "../../ui/layout/flex-view.js";
|
6
|
+
import T from "../../ui/separator/separator.js";
|
7
|
+
import o from "../../ui/text/text.js";
|
8
|
+
import { getMeterColor as g } from "../helper.js";
|
9
|
+
import { MeterWrapper as l } from "./talk-meter-view-styled.js";
|
10
|
+
const p = {
|
11
|
+
MALE: "MALE",
|
12
|
+
FEMALE: "FEMALE",
|
13
|
+
OTHER: "OTHER"
|
14
|
+
}, j = b((s) => {
|
15
|
+
const {
|
16
|
+
stdName: h = "Student",
|
17
|
+
tchName: u = "Teacher",
|
18
|
+
stdRatio: i,
|
19
|
+
tchRatio: n,
|
20
|
+
tchGender: E,
|
21
|
+
userType: m
|
22
|
+
} = s, c = g(i), A = Math.abs(n - i), f = n > 0 && i > 0 && A < 95, a = m === "TEACHER";
|
23
|
+
return f ? /* @__PURE__ */ r(
|
24
|
+
l,
|
25
|
+
{
|
26
|
+
$gap: 12,
|
27
|
+
$gutter: 12,
|
28
|
+
$background: "WHITE",
|
29
|
+
$borderColor: "GREY_2",
|
30
|
+
$borderRadius: 12,
|
31
|
+
children: [
|
32
|
+
/* @__PURE__ */ e(o, { $renderAs: "ub3-bold", $align: "center", children: "50:50 TALK METER" }),
|
33
|
+
/* @__PURE__ */ e(T, { height: 8 }),
|
34
|
+
/* @__PURE__ */ r(t, { $flexDirection: "row", $alignItems: "center", $justifyContent: "space-between", children: [
|
35
|
+
/* @__PURE__ */ r(t, { $flexDirection: "row", $justifyContent: "center", $alignItems: "center", $flexGap: 4, children: [
|
36
|
+
/* @__PURE__ */ e($, { src: d.ALIEN_4, width: 20, height: 20, withLoader: !0 }),
|
37
|
+
/* @__PURE__ */ e(o, { $renderAs: "ub3-bold", $color: "BLACK", children: a ? h : "You" })
|
38
|
+
] }),
|
39
|
+
/* @__PURE__ */ r(t, { $flexDirection: "row", $justifyContent: "center", $alignItems: "center", $flexGap: 4, children: [
|
40
|
+
/* @__PURE__ */ e(o, { $renderAs: "ub3-bold", $color: "BLACK", children: a ? "You" : u }),
|
41
|
+
/* @__PURE__ */ e(
|
42
|
+
$,
|
43
|
+
{
|
44
|
+
src: E === p.MALE ? d.MALE_AVATAR : d.FEMALE_AVATAR,
|
45
|
+
width: 20,
|
46
|
+
height: 20,
|
47
|
+
withLoader: !0
|
48
|
+
}
|
49
|
+
)
|
50
|
+
] })
|
51
|
+
] }),
|
52
|
+
/* @__PURE__ */ r(t, { $flexDirection: "row", $gap: 4, children: [
|
53
|
+
/* @__PURE__ */ e(
|
54
|
+
t,
|
55
|
+
{
|
56
|
+
$height: 8,
|
57
|
+
$width: `${i}%`,
|
58
|
+
$borderRadius: 4,
|
59
|
+
$background: c.STUDENT
|
60
|
+
}
|
61
|
+
),
|
62
|
+
/* @__PURE__ */ e(
|
63
|
+
t,
|
64
|
+
{
|
65
|
+
$height: 8,
|
66
|
+
$width: `${n}%`,
|
67
|
+
$borderRadius: 4,
|
68
|
+
$background: c.TEACHER
|
69
|
+
}
|
70
|
+
)
|
71
|
+
] }),
|
72
|
+
/* @__PURE__ */ r(t, { $flexDirection: "row", $alignItems: "center", $justifyContent: "space-between", children: [
|
73
|
+
/* @__PURE__ */ r(o, { $renderAs: "ab2-black", $color: c.STUDENT, children: [
|
74
|
+
i,
|
75
|
+
" %"
|
76
|
+
] }),
|
77
|
+
/* @__PURE__ */ r(o, { $renderAs: "ab2-black", $color: c.TEACHER, children: [
|
78
|
+
n,
|
79
|
+
" %"
|
80
|
+
] })
|
81
|
+
] })
|
82
|
+
]
|
83
|
+
}
|
84
|
+
) : /* @__PURE__ */ e(
|
85
|
+
l,
|
86
|
+
{
|
87
|
+
$gap: 12,
|
88
|
+
$gutter: 12,
|
89
|
+
$borderRadius: 12,
|
90
|
+
$background: "WHITE",
|
91
|
+
$borderColor: "GREY_2",
|
92
|
+
$alignItems: "center",
|
93
|
+
$justifyContent: "center",
|
94
|
+
children: /* @__PURE__ */ e(o, { $renderAs: "ub3-bold", $color: "BLACK", children: "Oops! There was insufficient data to calculate your Talk Ratio." })
|
95
|
+
}
|
96
|
+
);
|
97
|
+
});
|
98
|
+
export {
|
99
|
+
j as default
|
100
|
+
};
|
101
|
+
//# sourceMappingURL=talk-meter-view.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"talk-meter-view.js","sources":["../../../../src/features/talk-meter/talk-meter-view/talk-meter-view.tsx"],"sourcesContent":["import type { TUserTypes } from '../../ui/types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { getMeterColor } from '../helper';\nimport * as Styled from './talk-meter-view-styled';\n\nconst GENDER = {\n MALE: 'MALE',\n FEMALE: 'FEMALE',\n OTHER: 'OTHER',\n};\n\ninterface ITalkMeterView {\n stdName?: string;\n tchName?: string;\n stdRatio: number;\n tchRatio: number;\n tchGender: keyof typeof GENDER;\n userType: TUserTypes;\n}\n\nconst TalkMeterView: FC<ITalkMeterView> = memo(props => {\n const {\n stdName = 'Student',\n tchName = 'Teacher',\n stdRatio,\n tchRatio,\n tchGender,\n userType,\n } = props;\n const colors = getMeterColor(stdRatio);\n const diff = Math.abs(tchRatio - stdRatio);\n const isValid = tchRatio > 0 && stdRatio > 0 && diff < 95;\n const isTeacher = userType === 'TEACHER';\n\n if (!isValid) {\n return (\n <Styled.MeterWrapper\n $gap={12}\n $gutter={12}\n $borderRadius={12}\n $background=\"WHITE\"\n $borderColor=\"GREY_2\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK\">\n Oops! There was insufficient data to calculate your Talk Ratio.\n </Text>\n </Styled.MeterWrapper>\n );\n }\n\n return (\n <Styled.MeterWrapper\n $gap={12}\n $gutter={12}\n $background=\"WHITE\"\n $borderColor=\"GREY_2\"\n $borderRadius={12}\n >\n <Text $renderAs=\"ub3-bold\" $align=\"center\">\n 50:50 TALK METER\n </Text>\n\n <Separator height={8} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <FlexView $flexDirection=\"row\" $justifyContent=\"center\" $alignItems=\"center\" $flexGap={4}>\n <Image src={ILLUSTRATIONS.ALIEN_4} width={20} height={20} withLoader />\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK\">\n {isTeacher ? stdName : 'You'}\n </Text>\n </FlexView>\n <FlexView $flexDirection=\"row\" $justifyContent=\"center\" $alignItems=\"center\" $flexGap={4}>\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK\">\n {isTeacher ? 'You' : tchName}\n </Text>\n <Image\n src={\n tchGender === GENDER.MALE ? ILLUSTRATIONS.MALE_AVATAR : ILLUSTRATIONS.FEMALE_AVATAR\n }\n width={20}\n height={20}\n withLoader\n />\n </FlexView>\n </FlexView>\n <FlexView $flexDirection=\"row\" $gap={4}>\n <FlexView\n $height={8}\n $width={`${stdRatio}%`}\n $borderRadius={4}\n $background={colors.STUDENT}\n />\n <FlexView\n $height={8}\n $width={`${tchRatio}%`}\n $borderRadius={4}\n $background={colors.TEACHER}\n />\n </FlexView>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <Text $renderAs=\"ab2-black\" $color={colors.STUDENT}>\n {stdRatio} %\n </Text>\n <Text $renderAs=\"ab2-black\" $color={colors.TEACHER}>\n {tchRatio} %\n </Text>\n </FlexView>\n </Styled.MeterWrapper>\n );\n});\n\nexport default TalkMeterView;\n"],"names":["GENDER","TalkMeterView","memo","props","stdName","tchName","stdRatio","tchRatio","tchGender","userType","colors","getMeterColor","diff","isValid","isTeacher","jsxs","Styled.MeterWrapper","jsx","Text","Separator","FlexView","Image","ILLUSTRATIONS"],"mappings":";;;;;;;;;AAaA,MAAMA,IAAS;AAAA,EACb,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,GAWMC,IAAoCC,EAAK,CAASC,MAAA;AAChD,QAAA;AAAA,IACJ,SAAAC,IAAU;AAAA,IACV,SAAAC,IAAU;AAAA,IACV,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAAN,GACEO,IAASC,EAAcL,CAAQ,GAC/BM,IAAO,KAAK,IAAIL,IAAWD,CAAQ,GACnCO,IAAUN,IAAW,KAAKD,IAAW,KAAKM,IAAO,IACjDE,IAAYL,MAAa;AAE/B,SAAKI,IAmBH,gBAAAE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAY;AAAA,MACZ,cAAa;AAAA,MACb,eAAe;AAAA,MAEf,UAAA;AAAA,QAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,UAAS,UAE3C,oBAAA;AAAA,QAEA,gBAAAD,EAACE,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,0BACrBC,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,iBAAgB,iBAClE,UAAA;AAAA,UAAC,gBAAAL,EAAAK,GAAA,EAAS,gBAAe,OAAM,iBAAgB,UAAS,aAAY,UAAS,UAAU,GACrF,UAAA;AAAA,YAAC,gBAAAH,EAAAI,GAAA,EAAM,KAAKC,EAAc,SAAS,OAAO,IAAI,QAAQ,IAAI,YAAU,GAAC,CAAA;AAAA,YACrE,gBAAAL,EAACC,KAAK,WAAU,YAAW,QAAO,SAC/B,UAAAJ,IAAYV,IAAU,MACzB,CAAA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AA,MACN,SAAS;AAAA,MACT,eAAe;AAAA,MACf,aAAY;AAAA,MACZ,cAAa;AAAA,MACb,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAEhB,4BAACE,GAAK,EAAA,WAAU,YAAW,QAAO,SAAQ,UAE1C,mEAAA;AAAA,IAAA;AAAA,EAAA;AA+DR,CAAC;"}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { jsxs as c, Fragment as y, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { memo as v } from "react";
|
3
|
+
import { getMeterColor as w } from "./helper.js";
|
4
|
+
import { useTalkMeter as x } from "./hooks/use-talk-meter.js";
|
5
|
+
import n from "./ripple/index.js";
|
6
|
+
import { Wrapper as S, CloseIcon as j } from "./talk-meter-styled.js";
|
7
|
+
import B from "./talk-meter-view/talk-meter-view.js";
|
8
|
+
const G = v((m) => {
|
9
|
+
const {
|
10
|
+
animated: t = !0,
|
11
|
+
userType: a,
|
12
|
+
teacherId: l,
|
13
|
+
studentId: d,
|
14
|
+
studentName: h,
|
15
|
+
teacherName: T,
|
16
|
+
teacherGender: p,
|
17
|
+
classDuration: u,
|
18
|
+
classStartTime: f,
|
19
|
+
canDisplayBatch: k,
|
20
|
+
teacherTalkTime: A,
|
21
|
+
studentTalkTime: M,
|
22
|
+
avPackageEnabled: N,
|
23
|
+
teacherClassroomId: $,
|
24
|
+
lastBatchReceivedNo: g,
|
25
|
+
onDismissMeter: D,
|
26
|
+
onMessageReceive: I
|
27
|
+
} = m, { canAnimateOut: R, canAnimateIn: r, stdRatio: o, tchRatio: C, handleDismiss: E } = x({
|
28
|
+
userType: a,
|
29
|
+
studentId: d,
|
30
|
+
teacherId: l,
|
31
|
+
classStartTime: f,
|
32
|
+
avPackageEnabled: N,
|
33
|
+
teacherClassroomId: $,
|
34
|
+
teacherTalkTime: A,
|
35
|
+
studentTalkTime: M,
|
36
|
+
lastBatchReceivedNo: g,
|
37
|
+
canDisplayBatch: k,
|
38
|
+
classDuration: u,
|
39
|
+
onMessageReceive: I,
|
40
|
+
onDismissMeter: D
|
41
|
+
}), s = w(o), i = a === "TEACHER";
|
42
|
+
return /* @__PURE__ */ c(
|
43
|
+
S,
|
44
|
+
{
|
45
|
+
$gutter: 12,
|
46
|
+
$gap: 12,
|
47
|
+
$isTeacher: i,
|
48
|
+
$animated: t,
|
49
|
+
$canAnimateIn: r,
|
50
|
+
$canAnimateOut: R,
|
51
|
+
children: [
|
52
|
+
t && r && /* @__PURE__ */ c(y, { children: [
|
53
|
+
/* @__PURE__ */ e(n, { delay: 800, withAudio: !0, color: s.STUDENT }),
|
54
|
+
/* @__PURE__ */ e(n, { delay: 1050, withAudio: !1, color: s.STUDENT })
|
55
|
+
] }),
|
56
|
+
/* @__PURE__ */ e(
|
57
|
+
B,
|
58
|
+
{
|
59
|
+
userType: a,
|
60
|
+
tchName: T,
|
61
|
+
stdName: h,
|
62
|
+
tchRatio: C,
|
63
|
+
stdRatio: o,
|
64
|
+
tchGender: p
|
65
|
+
}
|
66
|
+
),
|
67
|
+
t && !i && /* @__PURE__ */ e(j, { onClick: E })
|
68
|
+
]
|
69
|
+
}
|
70
|
+
);
|
71
|
+
}), W = G;
|
72
|
+
export {
|
73
|
+
W as default
|
74
|
+
};
|
75
|
+
//# sourceMappingURL=talk-meter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"talk-meter.js","sources":["../../../src/features/talk-meter/talk-meter.tsx"],"sourcesContent":["import type { ITalkMeterProps } from './talk-meter-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getMeterColor } from './helper';\nimport { useTalkMeter } from './hooks/use-talk-meter';\nimport Ripple from './ripple';\nimport * as Styled from './talk-meter-styled';\nimport TalkMeterView from './talk-meter-view/talk-meter-view';\n\nconst TalkMeter: FC<ITalkMeterProps> = memo(props => {\n const {\n animated = true,\n userType,\n teacherId,\n studentId,\n studentName,\n teacherName,\n teacherGender,\n classDuration,\n classStartTime,\n canDisplayBatch,\n teacherTalkTime,\n studentTalkTime,\n avPackageEnabled,\n teacherClassroomId,\n lastBatchReceivedNo,\n onDismissMeter,\n onMessageReceive,\n } = props;\n\n const { canAnimateOut, canAnimateIn, stdRatio, tchRatio, handleDismiss } = useTalkMeter({\n userType,\n studentId,\n teacherId,\n classStartTime,\n avPackageEnabled,\n teacherClassroomId,\n teacherTalkTime,\n studentTalkTime,\n lastBatchReceivedNo,\n canDisplayBatch,\n classDuration,\n onMessageReceive,\n onDismissMeter,\n });\n\n const colors = getMeterColor(stdRatio);\n const isTeacher = userType === 'TEACHER';\n\n return (\n <Styled.Wrapper\n $gutter={12}\n $gap={12}\n $isTeacher={isTeacher}\n $animated={animated}\n $canAnimateIn={canAnimateIn}\n $canAnimateOut={canAnimateOut}\n >\n {animated && canAnimateIn && (\n <>\n <Ripple delay={800} withAudio color={colors.STUDENT} />\n <Ripple delay={1050} withAudio={false} color={colors.STUDENT} />\n </>\n )}\n <TalkMeterView\n userType={userType}\n tchName={teacherName}\n stdName={studentName}\n tchRatio={tchRatio}\n stdRatio={stdRatio}\n tchGender={teacherGender}\n />\n {animated && !isTeacher && <Styled.CloseIcon onClick={handleDismiss} />}\n </Styled.Wrapper>\n );\n});\n\nexport default TalkMeter;\n"],"names":["TalkMeter","memo","props","animated","userType","teacherId","studentId","studentName","teacherName","teacherGender","classDuration","classStartTime","canDisplayBatch","teacherTalkTime","studentTalkTime","avPackageEnabled","teacherClassroomId","lastBatchReceivedNo","onDismissMeter","onMessageReceive","canAnimateOut","canAnimateIn","stdRatio","tchRatio","handleDismiss","useTalkMeter","colors","getMeterColor","isTeacher","jsxs","Styled.Wrapper","Fragment","jsx","Ripple","TalkMeterView","Styled.CloseIcon","TalkMeter$1"],"mappings":";;;;;;;AAWA,MAAMA,IAAiCC,EAAK,CAASC,MAAA;AAC7C,QAAA;AAAA,IACJ,UAAAC,IAAW;AAAA,IACX,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA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ACCN,KAAY,CAACyB,KAAa,gBAAAI,EAACG,GAAA,EAAiB,SAASX,GAAe;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG3E,CAAC,GAEDY,IAAepC;"}
|
package/dist/index.d.ts
CHANGED
@@ -194,12 +194,7 @@ export declare enum CircleSoundKey {
|
|
194
194
|
ACCURACY_IN = "accuracy-in",
|
195
195
|
ACCURACY_OUT = "accuracy-out",
|
196
196
|
STREAK_IN = "streak-in",
|
197
|
-
STREAK_OUT = "streak-out"
|
198
|
-
ACCURACY_INTRO = "accuracy-intro",
|
199
|
-
ACCURACY_TARGET = "accuracy-target",
|
200
|
-
TIME_INTRO = "time-intro",
|
201
|
-
TIME_TARGET = "time-target",
|
202
|
-
METER_FILL = "meter-fill"
|
197
|
+
STREAK_OUT = "streak-out"
|
203
198
|
}
|
204
199
|
|
205
200
|
export declare const CircularLoader: () => JSX_2.Element;
|
@@ -258,8 +253,6 @@ export declare const DashArrowIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
258
253
|
|
259
254
|
export declare const DesmosCalculator: FC<IDesmosCalculatorProps>;
|
260
255
|
|
261
|
-
export declare const DigitalMeter: FC<IDigitalMeterProps>;
|
262
|
-
|
263
256
|
export declare const DownIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
264
257
|
|
265
258
|
export declare const DraftIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
@@ -303,8 +296,7 @@ export declare enum EPostGameStat {
|
|
303
296
|
STREAK = "streak",
|
304
297
|
ACCURACY = "accuracy",
|
305
298
|
CLOCK = "clock",
|
306
|
-
POINT = "point"
|
307
|
-
DIGITAL_METER = "digital-meter"
|
299
|
+
POINT = "point"
|
308
300
|
}
|
309
301
|
|
310
302
|
export declare const EPResourceAssign: FC<IEPResourceAssign>;
|
@@ -412,6 +404,12 @@ export declare const GameIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
412
404
|
|
413
405
|
export declare const GameLauncher: FC<IGameLauncherProps>;
|
414
406
|
|
407
|
+
declare enum GENDER {
|
408
|
+
MALE = "MALE",
|
409
|
+
FEMALE = "FEMALE",
|
410
|
+
OTHER = "OTHER"
|
411
|
+
}
|
412
|
+
|
415
413
|
declare const getArrowTooltipConfig: IGetArrowTooltipConfig;
|
416
414
|
|
417
415
|
declare const getButtonConfig: IGetButtonConfig;
|
@@ -1015,19 +1013,6 @@ declare interface IDesmosCalculatorProps {
|
|
1015
1013
|
};
|
1016
1014
|
}
|
1017
1015
|
|
1018
|
-
declare interface IDigitalMeterProps {
|
1019
|
-
show: boolean;
|
1020
|
-
value: number;
|
1021
|
-
maxValue: number;
|
1022
|
-
targetValue?: number;
|
1023
|
-
displayText: string;
|
1024
|
-
progressType: 'stepper' | 'linear';
|
1025
|
-
helperTextPrimary: string;
|
1026
|
-
helperTextSecondary: string;
|
1027
|
-
onComplete: () => void;
|
1028
|
-
actAsTimer?: boolean;
|
1029
|
-
}
|
1030
|
-
|
1031
1016
|
declare interface IEditMilestoneModalProps extends IMilestoneEditProps {
|
1032
1017
|
studentId: string;
|
1033
1018
|
isUsingAlternateCurriculum: boolean;
|
@@ -1100,7 +1085,7 @@ declare interface IGame extends IBaseProject {
|
|
1100
1085
|
declare interface IGameLauncherProps {
|
1101
1086
|
onSegmentClick: (projectDetail: Game | Puzzle | Lesson | ITableDetails, projectType: ProjectType) => void;
|
1102
1087
|
isLoading?: boolean;
|
1103
|
-
data:
|
1088
|
+
data: IProjects | null;
|
1104
1089
|
defaultIndex?: number;
|
1105
1090
|
journeyId?: TJourneyId;
|
1106
1091
|
onJourneyComplete: (journeyId: TJourneyId) => void;
|
@@ -1583,6 +1568,7 @@ export declare const ILLUSTRATIONS: {
|
|
1583
1568
|
DURATION_60MIN_GRAY: string;
|
1584
1569
|
DURATION_90MIN_GRAY: string;
|
1585
1570
|
EARTH_GREEN: string;
|
1571
|
+
FEMALE_AVATAR: string;
|
1586
1572
|
GAME_PLAY: string;
|
1587
1573
|
GLOBE_WITH_BLUE_FILL: string;
|
1588
1574
|
GRADE_GRID_BACKGROUND: string;
|
@@ -1600,6 +1586,7 @@ export declare const ILLUSTRATIONS: {
|
|
1600
1586
|
LOADER_1: string;
|
1601
1587
|
LOCKED: string;
|
1602
1588
|
MAINTENANCE: string;
|
1589
|
+
MALE_AVATAR: string;
|
1603
1590
|
MASTERED_BADGE: string;
|
1604
1591
|
MASTERED_SHIELD_GRAY: string;
|
1605
1592
|
MASTERED_SHIELD_GREEN: string;
|
@@ -2078,9 +2065,6 @@ export declare interface IPlayerStats {
|
|
2078
2065
|
errorCode: IStatsToAwardErrorCode;
|
2079
2066
|
outcome: ProjectOutcome;
|
2080
2067
|
value: string;
|
2081
|
-
starEligibleTime?: number;
|
2082
|
-
starEligibleAccuracy?: number;
|
2083
|
-
starRewarded?: boolean;
|
2084
2068
|
}
|
2085
2069
|
|
2086
2070
|
declare interface IPointerData extends Record<string, unknown> {
|
@@ -2117,12 +2101,6 @@ export declare interface IPostGameStat {
|
|
2117
2101
|
onComplete?: () => void;
|
2118
2102
|
helperText?: ReactNode;
|
2119
2103
|
stopAtEnd?: boolean;
|
2120
|
-
targetValue?: number;
|
2121
|
-
maxValue?: number;
|
2122
|
-
helperTextPrimary?: string;
|
2123
|
-
helperTextSecondary?: string;
|
2124
|
-
progressType?: 'linear' | 'stepper';
|
2125
|
-
displayText?: string;
|
2126
2104
|
}
|
2127
2105
|
|
2128
2106
|
export declare interface IPostGameStatsProps {
|
@@ -2177,10 +2155,6 @@ export declare interface IProject<T> {
|
|
2177
2155
|
initialProgressValue?: number;
|
2178
2156
|
}
|
2179
2157
|
|
2180
|
-
export declare interface IProjectData extends IProjects {
|
2181
|
-
tables?: ITablesData;
|
2182
|
-
}
|
2183
|
-
|
2184
2158
|
export declare interface IProjects {
|
2185
2159
|
games: IProject<Game>;
|
2186
2160
|
puzzles: IProject<Puzzle>;
|
@@ -2641,7 +2615,6 @@ export declare interface ITableDetails {
|
|
2641
2615
|
mode: TTableMode;
|
2642
2616
|
tableNumber?: number;
|
2643
2617
|
infiniteModeHighScore?: number;
|
2644
|
-
isStarRewarded?: boolean;
|
2645
2618
|
}
|
2646
2619
|
|
2647
2620
|
export declare interface ITableInfo {
|
@@ -2654,7 +2627,7 @@ declare interface ITableInfo_2 {
|
|
2654
2627
|
stars: ('advance' | 'random' | 'sequence')[];
|
2655
2628
|
}
|
2656
2629
|
|
2657
|
-
|
2630
|
+
declare interface ITables {
|
2658
2631
|
type: ProjectType;
|
2659
2632
|
label: string;
|
2660
2633
|
data: ITable;
|
@@ -2665,13 +2638,6 @@ declare interface ITables_2 {
|
|
2665
2638
|
infinite_mode_high_score: number;
|
2666
2639
|
}
|
2667
2640
|
|
2668
|
-
export declare interface ITablesData extends ITables {
|
2669
|
-
openModesOfTable?: {
|
2670
|
-
tableNumber: number;
|
2671
|
-
rewardStars?: TTableMode[];
|
2672
|
-
};
|
2673
|
-
}
|
2674
|
-
|
2675
2641
|
export declare interface ITableWebGameProps extends IBaseWebGameProps {
|
2676
2642
|
tableNumber: number;
|
2677
2643
|
infiniteModeHighScore?: number;
|
@@ -2728,6 +2694,29 @@ declare interface ITagProps {
|
|
2728
2694
|
textColor?: TColorNames;
|
2729
2695
|
}
|
2730
2696
|
|
2697
|
+
declare interface ITalkMeter {
|
2698
|
+
userType: TUserTypes;
|
2699
|
+
studentId: string;
|
2700
|
+
teacherId: string;
|
2701
|
+
classDuration?: number;
|
2702
|
+
classStartTime?: Date;
|
2703
|
+
avPackageEnabled?: boolean;
|
2704
|
+
teacherClassroomId: string;
|
2705
|
+
teacherTalkTime: number;
|
2706
|
+
studentTalkTime: number;
|
2707
|
+
lastBatchReceivedNo: number;
|
2708
|
+
canDisplayBatch: boolean;
|
2709
|
+
onMessageReceive: (data: TMessageData) => void;
|
2710
|
+
onDismissMeter: () => void;
|
2711
|
+
}
|
2712
|
+
|
2713
|
+
declare interface ITalkMeterProps extends ITalkMeter {
|
2714
|
+
studentName?: string;
|
2715
|
+
teacherName?: string;
|
2716
|
+
teacherGender: GENDER;
|
2717
|
+
animated?: boolean;
|
2718
|
+
}
|
2719
|
+
|
2731
2720
|
declare interface ITeacherReview {
|
2732
2721
|
reviewComment?: string;
|
2733
2722
|
images?: string[];
|
@@ -3418,13 +3407,10 @@ export declare const LOTTIE: {
|
|
3418
3407
|
POINT1: string;
|
3419
3408
|
POINT20: string;
|
3420
3409
|
POINT25: string;
|
3421
|
-
POINT2: string;
|
3422
3410
|
POINT30: string;
|
3423
3411
|
POINT35: string;
|
3424
|
-
POINT3: string;
|
3425
3412
|
POINT40: string;
|
3426
3413
|
POINT45: string;
|
3427
|
-
POINT4: string;
|
3428
3414
|
POINT50: string;
|
3429
3415
|
POINT5: string;
|
3430
3416
|
POINT60: string;
|
@@ -3439,9 +3425,6 @@ export declare const LOTTIE: {
|
|
3439
3425
|
SPLASH_SCREEN: string;
|
3440
3426
|
STAY_CONNECTED_LOTTIE: string;
|
3441
3427
|
TABLE_MODE_REVEAL: string;
|
3442
|
-
TABLE_MODE_STAR: string;
|
3443
|
-
TABLE_SEGMENT_STAR: string;
|
3444
|
-
TARGET_ACHIEVED_TEXT: string;
|
3445
3428
|
TEACHER_VALIDATION: string;
|
3446
3429
|
TOTAL_STREAK: string;
|
3447
3430
|
TOTAL_TIME: string;
|
@@ -3890,6 +3873,8 @@ declare type TAggregateForRewardsData = {
|
|
3890
3873
|
|
3891
3874
|
declare type TAlignSelf = 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch';
|
3892
3875
|
|
3876
|
+
export declare const TalkMeter: FC<ITalkMeterProps>;
|
3877
|
+
|
3893
3878
|
export declare type TArrowTooltipConfig = {
|
3894
3879
|
backgroundColorName: TColorNames;
|
3895
3880
|
textColorName: TColorNames;
|
@@ -4515,6 +4500,14 @@ declare type TMathSectionSummary = {
|
|
4515
4500
|
section_code: 'MATH';
|
4516
4501
|
} & TSectionSummary;
|
4517
4502
|
|
4503
|
+
declare type TMessageData = {
|
4504
|
+
teacher_classroom_id: string;
|
4505
|
+
student_classroom_id: string;
|
4506
|
+
teacher_speech_time?: number;
|
4507
|
+
student_speech_time?: number;
|
4508
|
+
batch_no: number;
|
4509
|
+
};
|
4510
|
+
|
4518
4511
|
declare type TMilestoneChapterBlockData = {
|
4519
4512
|
block_id: string;
|
4520
4513
|
block_type: TBlockType;
|