@cuemath/leap 3.1.17 → 3.1.19-as1
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/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +64 -59
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/ui/modals/modal-provider.js +40 -37
- package/dist/features/ui/modals/modal-provider.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +4 -3
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/use-modal-actions.js +6 -6
- package/dist/features/ui/modals/use-modal-actions.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/api/get-dynamic-sheet.js +9 -0
- package/dist/features/worksheet/worksheet-preview/api/get-dynamic-sheet.js.map +1 -0
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +57 -0
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.js +56 -54
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,8 +1,8 @@
|
|
1
|
-
import { useCallback as
|
2
|
-
import { CircleSoundKeyMapper as
|
1
|
+
import { useCallback as s, useRef as C, useEffect as A } from "react";
|
2
|
+
import { CircleSoundKeyMapper as O, SWIPE_SOUND_ORDER as S } from "./constants.js";
|
3
3
|
import { CircleSoundKey as e } from "./use-circle-sounds-enums.js";
|
4
|
-
let
|
5
|
-
const
|
4
|
+
let d = 0;
|
5
|
+
const o = {
|
6
6
|
[e.BACKGROUND]: null,
|
7
7
|
[e.BACKGROUND_RUSHHOUR]: null,
|
8
8
|
[e.TUTORIAL]: null,
|
@@ -26,93 +26,98 @@ const r = {
|
|
26
26
|
[e.TIME_INTRO]: null,
|
27
27
|
[e.TIME_TARGET]: null,
|
28
28
|
[e.METER_FILL]: null
|
29
|
-
},
|
30
|
-
const c =
|
31
|
-
if (!
|
32
|
-
const l = new Audio(
|
33
|
-
|
29
|
+
}, I = {}, G = () => {
|
30
|
+
const c = s((n) => {
|
31
|
+
if (!o[n]) {
|
32
|
+
const l = new Audio(O[n]);
|
33
|
+
o[n] = l;
|
34
34
|
}
|
35
|
-
}, []),
|
36
|
-
document.visibilityState === "hidden" ? Object.keys(
|
37
|
-
const l =
|
38
|
-
l && !l.paused && (l.pause(),
|
39
|
-
}) : document.visibilityState === "visible" && (
|
40
|
-
const l =
|
35
|
+
}, []), f = C(/* @__PURE__ */ new Set()), r = C({}), p = s(() => {
|
36
|
+
document.visibilityState === "hidden" ? Object.keys(o).forEach((n) => {
|
37
|
+
const l = o[n];
|
38
|
+
l && !l.paused && (l.pause(), f.current.add(n));
|
39
|
+
}) : document.visibilityState === "visible" && (f.current.forEach((n) => {
|
40
|
+
const l = o[n];
|
41
41
|
l == null || l.play();
|
42
|
-
}),
|
42
|
+
}), f.current.clear());
|
43
43
|
}, []);
|
44
|
-
|
44
|
+
A(() => {
|
45
45
|
document.addEventListener("visibilitychange", p);
|
46
|
-
const n =
|
46
|
+
const n = r.current;
|
47
47
|
return () => {
|
48
48
|
document.removeEventListener("visibilitychange", p);
|
49
49
|
for (const l of Object.values(n))
|
50
50
|
l != null && clearInterval(l);
|
51
51
|
};
|
52
52
|
}, [p]);
|
53
|
-
const
|
53
|
+
const _ = s(() => {
|
54
54
|
var l;
|
55
|
-
|
55
|
+
S.forEach((u) => {
|
56
56
|
c(u);
|
57
57
|
});
|
58
|
-
const n =
|
59
|
-
|
60
|
-
}, [c]), m =
|
58
|
+
const n = S[d] || e.SWIPE_01;
|
59
|
+
d < S.length - 1 ? d++ : d = 0, (l = o[n]) == null || l.play();
|
60
|
+
}, [c]), m = s(() => {
|
61
61
|
var l;
|
62
|
-
return c(e.TOGGLE), (l =
|
63
|
-
}, [c]),
|
62
|
+
return c(e.TOGGLE), (l = o[e.TOGGLE]) == null ? void 0 : l.play();
|
63
|
+
}, [c]), R = s(
|
64
64
|
(n, l = !0, u = !1) => {
|
65
65
|
c(n);
|
66
|
-
const t =
|
66
|
+
const t = o[n];
|
67
67
|
if (!t) return;
|
68
|
-
if (
|
68
|
+
if (r.current[n] && clearInterval(r.current[n]), !t.paused && t.currentTime > 0 && !t.ended)
|
69
69
|
return t;
|
70
70
|
if (t.loop = u, l) {
|
71
71
|
t.volume = 1;
|
72
|
-
const
|
73
|
-
|
72
|
+
const i = t.play();
|
73
|
+
i && (I[n] = i);
|
74
74
|
return;
|
75
75
|
}
|
76
76
|
t.volume = 0;
|
77
|
-
const
|
78
|
-
|
79
|
-
const
|
77
|
+
const a = t.play();
|
78
|
+
I[n] = a;
|
79
|
+
const E = setInterval(() => {
|
80
80
|
if (!t) {
|
81
|
-
clearInterval(
|
81
|
+
clearInterval(E);
|
82
82
|
return;
|
83
83
|
}
|
84
|
-
const
|
85
|
-
|
84
|
+
const i = t.volume || 0;
|
85
|
+
i < 1 ? t.volume = Math.min(i + 0.1, 1) : clearInterval(E);
|
86
86
|
}, 100);
|
87
|
-
return
|
87
|
+
return r.current[n] = E, t;
|
88
88
|
},
|
89
89
|
[c]
|
90
|
-
),
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
90
|
+
), v = s((n, l) => {
|
91
|
+
const u = o[n];
|
92
|
+
if (!u) return;
|
93
|
+
if (r.current[n] && clearInterval(r.current[n]), l) {
|
94
|
+
u.pause();
|
95
|
+
return;
|
96
|
+
}
|
97
|
+
let t = u.volume || 0;
|
98
|
+
const a = setInterval(() => {
|
99
|
+
t - 0.1 <= 0 ? (u.volume = 0, u.pause(), clearInterval(a)) : (t = t - 0.1, u.volume = t);
|
100
|
+
}, 100);
|
101
|
+
r.current[n] = a;
|
102
|
+
}, []), T = s(
|
103
|
+
(n, l = !0) => {
|
104
|
+
var u;
|
105
|
+
if (I[n] !== void 0) {
|
106
|
+
(u = I[n]) == null || u.then(() => {
|
107
|
+
v(n, l);
|
108
|
+
}).catch((t) => {
|
109
|
+
console.log("sound not playing", t);
|
110
|
+
});
|
97
111
|
return;
|
98
112
|
}
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
const i = u.volume || 0;
|
105
|
-
i - 0.1 <= 0 ? (u.volume = 0, u.pause(), clearInterval(s)) : u.volume = i - 0.1;
|
106
|
-
}, 100);
|
107
|
-
o.current[n] = s;
|
108
|
-
}).catch((s) => {
|
109
|
-
console.log("sound not playing", s);
|
110
|
-
}));
|
111
|
-
}, []);
|
112
|
-
return { playSwipSound: S, play: _, stop: R, playButtonSound: m };
|
113
|
+
v(n, l);
|
114
|
+
},
|
115
|
+
[v]
|
116
|
+
);
|
117
|
+
return { playSwipSound: _, play: R, stop: T, playButtonSound: m };
|
113
118
|
};
|
114
119
|
export {
|
115
|
-
|
116
|
-
|
120
|
+
o as soundMapper,
|
121
|
+
G as useCircleSounds
|
117
122
|
};
|
118
123
|
//# sourceMappingURL=use-circle-sounds.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-circle-sounds.js","sources":["../../../../../src/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.ts"],"sourcesContent":["import type { TimeoutMap } from './use-circle-sound-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport { CircleSoundKeyMapper, SWIPE_SOUND_ORDER } from './constants';\nimport { CircleSoundKey } from './use-circle-sounds-enums';\n\nlet swipeSoundIndex = 0;\n\nexport const soundMapper: Record<keyof typeof CircleSoundKeyMapper, null | HTMLAudioElement> = {\n [CircleSoundKey.BACKGROUND]: null,\n [CircleSoundKey.BACKGROUND_RUSHHOUR]: null,\n [CircleSoundKey.TUTORIAL]: null,\n [CircleSoundKey.SWIPE_01]: null,\n [CircleSoundKey.SWIPE_02]: null,\n [CircleSoundKey.SWIPE_03]: null,\n [CircleSoundKey.SWIPE_04]: null,\n [CircleSoundKey.SWIPE_DOWN]: null,\n [CircleSoundKey.TOGGLE]: null,\n [CircleSoundKey.POINTS_AWARDED]: null,\n [CircleSoundKey.POINTS_ADDED]: null,\n [CircleSoundKey.GAME_CARD_CLICK]: null,\n [CircleSoundKey.CLOCK_IN]: null,\n [CircleSoundKey.CLOCK_OUT]: null,\n [CircleSoundKey.ACCURACY_IN]: null,\n [CircleSoundKey.ACCURACY_OUT]: null,\n [CircleSoundKey.STREAK_IN]: null,\n [CircleSoundKey.STREAK_OUT]: null,\n [CircleSoundKey.ACCURACY_INTRO]: null,\n [CircleSoundKey.ACCURACY_TARGET]: null,\n [CircleSoundKey.TIME_INTRO]: null,\n [CircleSoundKey.TIME_TARGET]: null,\n [CircleSoundKey.METER_FILL]: null,\n};\n\nconst soundInstancePromise: Partial<Record<keyof typeof CircleSoundKeyMapper, Promise<void>>> = {};\n\nexport const useCircleSounds = () => {\n const loadSound = useCallback((key: CircleSoundKey) => {\n if (!soundMapper[key]) {\n const loadedSound = new Audio(CircleSoundKeyMapper[key]);\n\n soundMapper[key] = loadedSound;\n }\n }, []);\n\n const pausedSoundsRef = useRef<Set<CircleSoundKey>>(new Set());\n const timeoutRefs = useRef<TimeoutMap>({});\n\n const handleVisibilityChange = useCallback(() => {\n if (document.visibilityState === 'hidden') {\n (Object.keys(soundMapper) as CircleSoundKey[]).forEach(key => {\n const sound = soundMapper[key];\n\n if (sound && !sound.paused) {\n sound.pause();\n pausedSoundsRef.current.add(key);\n }\n });\n } else if (document.visibilityState === 'visible') {\n pausedSoundsRef.current.forEach(key => {\n const sound = soundMapper[key];\n\n sound?.play();\n });\n pausedSoundsRef.current.clear();\n }\n }, []);\n\n useEffect(() => {\n document.addEventListener('visibilitychange', handleVisibilityChange);\n const timeouts = timeoutRefs.current;\n\n return () => {\n document.removeEventListener('visibilitychange', handleVisibilityChange);\n for (const id of Object.values(timeouts)) {\n if (id != null) clearInterval(id);\n }\n };\n }, [handleVisibilityChange]);\n\n const playSwipSound = useCallback(() => {\n SWIPE_SOUND_ORDER.forEach(key => {\n loadSound(key);\n });\n\n const key = SWIPE_SOUND_ORDER[swipeSoundIndex] || CircleSoundKey.SWIPE_01;\n\n if (swipeSoundIndex < SWIPE_SOUND_ORDER.length - 1) {\n swipeSoundIndex++;\n } else {\n swipeSoundIndex = 0;\n }\n soundMapper[key]?.play();\n }, [loadSound]);\n\n const playButtonSound = useCallback(() => {\n loadSound(CircleSoundKey.TOGGLE);\n const sound = soundMapper[CircleSoundKey.TOGGLE]?.play();\n\n return sound;\n }, [loadSound]);\n\n const play = useCallback(\n (key: CircleSoundKey, immediately: boolean = true, loop = false) => {\n loadSound(key);\n const soundInstance = soundMapper[key];\n\n if (!soundInstance) return;\n\n if (timeoutRefs.current[key]) {\n clearInterval(timeoutRefs.current[key]);\n }\n\n if (!soundInstance.paused && soundInstance.currentTime > 0 && !soundInstance.ended) {\n return soundInstance;\n }\n\n soundInstance.loop = loop;\n if (immediately) {\n soundInstance.volume = 1;\n const promise = soundInstance.play();\n\n soundInstancePromise[key] = promise;\n\n return;\n }\n\n soundInstance.volume = 0;\n const promise = soundInstance.play();\n\n soundInstancePromise[key] = promise;\n\n const intervalId = setInterval(() => {\n if (!soundInstance) {\n clearInterval(intervalId);\n\n return;\n }\n\n const vol = soundInstance.volume || 0;\n\n if (vol < 1) {\n soundInstance.volume = Math.min(vol + 0.1, 1);\n } else {\n clearInterval(intervalId);\n }\n }, 100);\n\n timeoutRefs.current[key] = intervalId;\n\n return soundInstance;\n },\n [loadSound],\n );\n\n const stop = useCallback((key: CircleSoundKey, immediately: boolean = true) => {\n const soundInstance = soundMapper[key];\n\n if (soundInstancePromise[key] !== undefined) {\n soundInstancePromise[key]\n ?.then(() => {\n if (!soundInstance) return;\n\n if (timeoutRefs.current[key]) {\n clearInterval(timeoutRefs.current[key]);\n }\n\n if (immediately) {\n soundInstance.pause();\n\n return;\n }\n\n const intervalId = setInterval(() => {\n if (!soundInstance) {\n clearInterval(intervalId);\n\n return;\n }\n\n const vol = soundInstance.volume || 0;\n\n if (vol - 0.1 <= 0) {\n soundInstance.volume = 0;\n soundInstance.pause();\n clearInterval(intervalId);\n } else {\n soundInstance.volume = vol - 0.1;\n }\n }, 100);\n\n timeoutRefs.current[key] = intervalId;\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.log('sound not playing', err);\n });\n }\n }, []);\n\n return { playSwipSound, play, stop, playButtonSound };\n};\n"],"names":["swipeSoundIndex","soundMapper","CircleSoundKey","soundInstancePromise","useCircleSounds","loadSound","useCallback","key","loadedSound","CircleSoundKeyMapper","pausedSoundsRef","useRef","timeoutRefs","handleVisibilityChange","sound","useEffect","timeouts","id","playSwipSound","SWIPE_SOUND_ORDER","_a","playButtonSound","play","immediately","loop","soundInstance","promise","intervalId","vol","stop","err"],"mappings":";;;AAOA,IAAIA,IAAkB;AAEf,MAAMC,IAAkF;AAAA,EAC7F,CAACC,EAAe,UAAU,GAAG;AAAA,EAC7B,CAACA,EAAe,mBAAmB,GAAG;AAAA,EACtC,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,UAAU,GAAG;AAAA,EAC7B,CAACA,EAAe,MAAM,GAAG;AAAA,EACzB,CAACA,EAAe,cAAc,GAAG;AAAA,EACjC,CAACA,EAAe,YAAY,GAAG;AAAA,EAC/B,CAACA,EAAe,eAAe,GAAG;AAAA,EAClC,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,SAAS,GAAG;AAAA,EAC5B,CAACA,EAAe,WAAW,GAAG;AAAA,EAC9B,CAACA,EAAe,YAAY,GAAG;AAAA,EAC/B,CAACA,EAAe,SAAS,GAAG;AAAA,EAC5B,CAACA,EAAe,UAAU,GAAG;AAAA,EAC7B,CAACA,EAAe,cAAc,GAAG;AAAA,EACjC,CAACA,EA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AA,IACT;AAAA,IACA,CAACpB,CAAS;AAAA,EAAA,GAGNwB,IAAOvB,EAAY,CAACC,GAAqBgB,IAAuB,OAAS;;AACvE,UAAAE,IAAgBxB,EAAYM,CAAG;AAEjC,IAAAJ,EAAqBI,CAAG,MAAM,YACXa,IAAAjB,EAAAI,CAAG,MAAH,QAAAa,EACjB,KAAK,MAAM;AACX,UAAI,CAACK,EAAe;AAMpB,UAJIb,EAAY,QAAQL,CAAG,KACX,cAAAK,EAAY,QAAQL,CAAG,CAAC,GAGpCgB,GAAa;AACf,QAAAE,EAAc,MAAM;AAEpB;AAAA,MACF;AAEM,YAAAE,IAAa,YAAY,MAAM;AACnC,YAAI,CAACF,GAAe;AAClB,wBAAcE,CAAU;AAExB;AAAA,QACF;AAEM,cAAAC,IAAMH,EAAc,UAAU;AAEhC,QAAAG,IAAM,OAAO,KACfH,EAAc,SAAS,GACvBA,EAAc,MAAM,GACpB,cAAcE,CAAU,KAExBF,EAAc,SAASG,IAAM;AAAA,SAE9B,GAAG;AAEM,MAAAhB,EAAA,QAAQL,CAAG,IAAIoB;AAAA,IAAA,GAE5B,MAAM,CAAOG,MAAA;AAEJ,cAAA,IAAI,qBAAqBA,CAAG;AAAA,IAAA;AAAA,EAG5C,GAAG,CAAE,CAAA;AAEL,SAAO,EAAE,eAAAZ,GAAe,MAAAI,GAAM,MAAAO,GAAM,iBAAAR,EAAgB;AACtD;"}
|
1
|
+
{"version":3,"file":"use-circle-sounds.js","sources":["../../../../../src/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.ts"],"sourcesContent":["import type { TimeoutMap } from './use-circle-sound-types';\n\nimport { useCallback, useEffect, useRef } from 'react';\n\nimport { CircleSoundKeyMapper, SWIPE_SOUND_ORDER } from './constants';\nimport { CircleSoundKey } from './use-circle-sounds-enums';\n\nlet swipeSoundIndex = 0;\n\nexport const soundMapper: Record<keyof typeof CircleSoundKeyMapper, null | HTMLAudioElement> = {\n [CircleSoundKey.BACKGROUND]: null,\n [CircleSoundKey.BACKGROUND_RUSHHOUR]: null,\n [CircleSoundKey.TUTORIAL]: null,\n [CircleSoundKey.SWIPE_01]: null,\n [CircleSoundKey.SWIPE_02]: null,\n [CircleSoundKey.SWIPE_03]: null,\n [CircleSoundKey.SWIPE_04]: null,\n [CircleSoundKey.SWIPE_DOWN]: null,\n [CircleSoundKey.TOGGLE]: null,\n [CircleSoundKey.POINTS_AWARDED]: null,\n [CircleSoundKey.POINTS_ADDED]: null,\n [CircleSoundKey.GAME_CARD_CLICK]: null,\n [CircleSoundKey.CLOCK_IN]: null,\n [CircleSoundKey.CLOCK_OUT]: null,\n [CircleSoundKey.ACCURACY_IN]: null,\n [CircleSoundKey.ACCURACY_OUT]: null,\n [CircleSoundKey.STREAK_IN]: null,\n [CircleSoundKey.STREAK_OUT]: null,\n [CircleSoundKey.ACCURACY_INTRO]: null,\n [CircleSoundKey.ACCURACY_TARGET]: null,\n [CircleSoundKey.TIME_INTRO]: null,\n [CircleSoundKey.TIME_TARGET]: null,\n [CircleSoundKey.METER_FILL]: null,\n};\n\nconst soundInstancePromise: Partial<Record<keyof typeof CircleSoundKeyMapper, Promise<void>>> = {};\n\nexport const useCircleSounds = () => {\n const loadSound = useCallback((key: CircleSoundKey) => {\n if (!soundMapper[key]) {\n const loadedSound = new Audio(CircleSoundKeyMapper[key]);\n\n soundMapper[key] = loadedSound;\n }\n }, []);\n\n const pausedSoundsRef = useRef<Set<CircleSoundKey>>(new Set());\n const timeoutRefs = useRef<TimeoutMap>({});\n\n const handleVisibilityChange = useCallback(() => {\n if (document.visibilityState === 'hidden') {\n (Object.keys(soundMapper) as CircleSoundKey[]).forEach(key => {\n const sound = soundMapper[key];\n\n if (sound && !sound.paused) {\n sound.pause();\n pausedSoundsRef.current.add(key);\n }\n });\n } else if (document.visibilityState === 'visible') {\n pausedSoundsRef.current.forEach(key => {\n const sound = soundMapper[key];\n\n sound?.play();\n });\n pausedSoundsRef.current.clear();\n }\n }, []);\n\n useEffect(() => {\n document.addEventListener('visibilitychange', handleVisibilityChange);\n const timeouts = timeoutRefs.current;\n\n return () => {\n document.removeEventListener('visibilitychange', handleVisibilityChange);\n for (const id of Object.values(timeouts)) {\n if (id != null) clearInterval(id);\n }\n };\n }, [handleVisibilityChange]);\n\n const playSwipSound = useCallback(() => {\n SWIPE_SOUND_ORDER.forEach(key => {\n loadSound(key);\n });\n\n const key = SWIPE_SOUND_ORDER[swipeSoundIndex] || CircleSoundKey.SWIPE_01;\n\n if (swipeSoundIndex < SWIPE_SOUND_ORDER.length - 1) {\n swipeSoundIndex++;\n } else {\n swipeSoundIndex = 0;\n }\n soundMapper[key]?.play();\n }, [loadSound]);\n\n const playButtonSound = useCallback(() => {\n loadSound(CircleSoundKey.TOGGLE);\n const sound = soundMapper[CircleSoundKey.TOGGLE]?.play();\n\n return sound;\n }, [loadSound]);\n\n const play = useCallback(\n (key: CircleSoundKey, immediately: boolean = true, loop = false) => {\n loadSound(key);\n const soundInstance = soundMapper[key];\n\n if (!soundInstance) return;\n\n if (timeoutRefs.current[key]) {\n clearInterval(timeoutRefs.current[key]);\n }\n\n if (!soundInstance.paused && soundInstance.currentTime > 0 && !soundInstance.ended) {\n return soundInstance;\n }\n\n soundInstance.loop = loop;\n if (immediately) {\n soundInstance.volume = 1;\n const promise = soundInstance.play();\n\n if (promise) {\n soundInstancePromise[key] = promise;\n }\n\n return;\n }\n\n soundInstance.volume = 0;\n const promise = soundInstance.play();\n\n soundInstancePromise[key] = promise;\n\n const intervalId = setInterval(() => {\n if (!soundInstance) {\n clearInterval(intervalId);\n\n return;\n }\n\n const vol = soundInstance.volume || 0;\n\n if (vol < 1) {\n soundInstance.volume = Math.min(vol + 0.1, 1);\n } else {\n clearInterval(intervalId);\n }\n }, 100);\n\n timeoutRefs.current[key] = intervalId;\n\n return soundInstance;\n },\n [loadSound],\n );\n\n const handleSoundStop = useCallback((key: CircleSoundKey, immediately: boolean) => {\n const soundInstance = soundMapper[key];\n\n if (!soundInstance) return;\n\n if (timeoutRefs.current[key]) {\n clearInterval(timeoutRefs.current[key]);\n }\n\n if (immediately) {\n soundInstance.pause();\n\n return;\n }\n\n let vol = soundInstance.volume || 0;\n const intervalId = setInterval(() => {\n if (vol - 0.1 <= 0) {\n soundInstance.volume = 0;\n soundInstance.pause();\n clearInterval(intervalId);\n } else {\n vol = vol - 0.1;\n soundInstance.volume = vol;\n }\n }, 100);\n\n timeoutRefs.current[key] = intervalId;\n }, []);\n\n const stop = useCallback(\n (key: CircleSoundKey, immediately: boolean = true) => {\n // if play returned a promise\n if (soundInstancePromise[key] !== undefined) {\n soundInstancePromise[key]\n ?.then(() => {\n handleSoundStop(key, immediately);\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.log('sound not playing', err);\n });\n\n return;\n }\n\n handleSoundStop(key, immediately);\n },\n [handleSoundStop],\n );\n\n return { playSwipSound, play, stop, playButtonSound };\n};\n"],"names":["swipeSoundIndex","soundMapper","CircleSoundKey","soundInstancePromise","useCircleSounds","loadSound","useCallback","key","loadedSound","CircleSoundKeyMapper","pausedSoundsRef","useRef","timeoutRefs","handleVisibilityChange","sound","useEffect","timeouts","id","playSwipSound","SWIPE_SOUND_ORDER","_a","playButtonSound","play","immediately","loop","soundInstance","promise","intervalId","vol","handleSoundStop","stop","err"],"mappings":";;;AAOA,IAAIA,IAAkB;AAEf,MAAMC,IAAkF;AAAA,EAC7F,CAACC,EAAe,UAAU,GAAG;AAAA,EAC7B,CAACA,EAAe,mBAAmB,GAAG;AAAA,EACtC,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,QAAQ,GAAG;AAAA,EAC3B,CAACA,EAAe,UAAU,GAAG;AAAA,EAC7B,CAACA,EAAe,MAAM,GAAG;AAAA,EACzB,CAACA,EAAe,cAAc,GAAG;AAAA,EACjC,C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tB,GAAKgB,CAAW;AAAA,IAClC;AAAA,IACA,CAACM,CAAe;AAAA,EAAA;AAGlB,SAAO,EAAE,eAAAX,GAAe,MAAAI,GAAM,MAAAQ,GAAM,iBAAAT,EAAgB;AACtD;"}
|
@@ -1,48 +1,51 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { lockScroll as
|
6
|
-
const
|
7
|
-
const [o,
|
8
|
-
(
|
9
|
-
const
|
10
|
-
if (!
|
11
|
-
throw new Error(`Modal with name "${
|
12
|
-
if (
|
1
|
+
import { jsxs as x, jsx as y } from "react/jsx-runtime";
|
2
|
+
import { memo as D, useState as d, useRef as I, useCallback as f, useMemo as S, useEffect as w } from "react";
|
3
|
+
import b from "./modal.js";
|
4
|
+
import h from "./modal-context.js";
|
5
|
+
import { lockScroll as R, unlockScroll as T } from "./modal-helpers.js";
|
6
|
+
const $ = 500, g = D(({ children: p, modals: u, isUserAuthenticated: t }) => {
|
7
|
+
const [o, M] = d(null), [m, C] = d(void 0), [r, i] = d(!1), l = I(void 0), v = f(
|
8
|
+
(e, s, P) => {
|
9
|
+
const c = u.find((E) => E.name === e);
|
10
|
+
if (!c)
|
11
|
+
throw new Error(`Modal with name "${e}" not found`);
|
12
|
+
if (c.isPrivate && !t)
|
13
13
|
throw new Error(
|
14
|
-
`Access violation: Modal "${
|
14
|
+
`Access violation: Modal "${e}" is private and user is not authenticated`
|
15
15
|
);
|
16
|
-
|
16
|
+
l.current = P, i(!1), M(c), C(s), R();
|
17
17
|
},
|
18
|
-
[t,
|
19
|
-
),
|
20
|
-
|
21
|
-
|
22
|
-
},
|
23
|
-
}, []),
|
18
|
+
[t, u]
|
19
|
+
), n = f(() => {
|
20
|
+
i(!0), T(), setTimeout(() => {
|
21
|
+
M(null), i(!1);
|
22
|
+
}, $);
|
23
|
+
}, []), k = S(
|
24
24
|
() => ({
|
25
25
|
modal: o,
|
26
|
-
modalParams:
|
27
|
-
openModal:
|
28
|
-
closeModal:
|
29
|
-
isClosing:
|
26
|
+
modalParams: m,
|
27
|
+
openModal: v,
|
28
|
+
closeModal: n,
|
29
|
+
isClosing: r
|
30
30
|
}),
|
31
|
-
[o,
|
32
|
-
)
|
33
|
-
|
34
|
-
|
35
|
-
}, [
|
36
|
-
|
37
|
-
|
31
|
+
[o, m, v, n, r]
|
32
|
+
), a = f(() => {
|
33
|
+
var e, s;
|
34
|
+
(o == null ? void 0 : o.isDismissable) !== !1 && !r && (n(), l.current && ((s = (e = l.current).onCloseModal) == null || s.call(e), l.current.onCloseModal = void 0));
|
35
|
+
}, [o, n, r]);
|
36
|
+
return w(() => {
|
37
|
+
!t && (o != null && o.isPrivate) && n();
|
38
|
+
}, [t, o, n]), w(() => {
|
39
|
+
const e = (s) => {
|
40
|
+
s.key === "Escape" && a();
|
38
41
|
};
|
39
|
-
return window.addEventListener("keydown",
|
40
|
-
}, [
|
41
|
-
|
42
|
-
o && /* @__PURE__ */
|
42
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
43
|
+
}, [a]), /* @__PURE__ */ x(h.Provider, { value: k, children: [
|
44
|
+
p,
|
45
|
+
o && /* @__PURE__ */ y(b, { modal: o, isClosing: r, onClose: a })
|
43
46
|
] });
|
44
|
-
}),
|
47
|
+
}), K = g;
|
45
48
|
export {
|
46
|
-
|
49
|
+
K as default
|
47
50
|
};
|
48
51
|
//# sourceMappingURL=modal-provider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal-provider.js","sources":["../../../../src/features/ui/modals/modal-provider.tsx"],"sourcesContent":["import type { IModal, IModalContext, IModalProviderProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\n\nimport Modal from './modal';\nimport ModalContext from './modal-context';\nimport { lockScroll, unlockScroll } from './modal-helpers';\n\nconst ANIMATION_DURATION_MS = 500; // Match the animation duration in modal.tsx\n\n/**\n * Provider component that manages modal state and provides modal context to child components\n */\nconst ModalProvider: FC<IModalProviderProps> = memo(({ children, modals, isUserAuthenticated }) => {\n const [modal, setModal] = useState<IModal | null>(null);\n const [modalParams, setModalParams] = useState<Record<string, unknown> | undefined>(undefined);\n const [isClosing, setIsClosing] = useState(false);\n
|
1
|
+
{"version":3,"file":"modal-provider.js","sources":["../../../../src/features/ui/modals/modal-provider.tsx"],"sourcesContent":["import type { IModal, IModalCallbacks, IModalContext, IModalProviderProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport Modal from './modal';\nimport ModalContext from './modal-context';\nimport { lockScroll, unlockScroll } from './modal-helpers';\n\nconst ANIMATION_DURATION_MS = 500; // Match the animation duration in modal.tsx\n\n/**\n * Provider component that manages modal state and provides modal context to child components\n */\nconst ModalProvider: FC<IModalProviderProps> = memo(({ children, modals, isUserAuthenticated }) => {\n const [modal, setModal] = useState<IModal | null>(null);\n const [modalParams, setModalParams] = useState<Record<string, unknown> | undefined>(undefined);\n const [isClosing, setIsClosing] = useState(false);\n const callbackRefs = useRef<IModalCallbacks | undefined>(undefined);\n /**\n * Opens a modal by name with optional parameters\n * Handles authentication check for private modals\n */\n const openModal = useCallback<IModalContext['openModal']>(\n (modalName, newModalParams, callback) => {\n const newModal = modals.find(m => m.name === modalName);\n\n if (!newModal) {\n throw new Error(`Modal with name \"${modalName}\" not found`);\n }\n\n if (newModal.isPrivate && !isUserAuthenticated) {\n throw new Error(\n `Access violation: Modal \"${modalName}\" is private and user is not authenticated`,\n );\n }\n\n callbackRefs.current = callback;\n setIsClosing(false);\n setModal(newModal);\n setModalParams(newModalParams as unknown as Record<string, unknown> | undefined);\n lockScroll(); // Lock scroll while preserving scrollbar width\n },\n [isUserAuthenticated, modals],\n );\n\n const closeModal = useCallback(() => {\n setIsClosing(true);\n // Wait for the animation to complete before removing the modal\n unlockScroll();\n setTimeout(() => {\n setModal(null);\n setIsClosing(false);\n }, ANIMATION_DURATION_MS);\n }, []);\n\n const modalContent = useMemo<IModalContext>(\n () => ({\n modal,\n modalParams,\n openModal,\n closeModal,\n isClosing,\n }),\n [modal, modalParams, openModal, closeModal, isClosing],\n );\n\n const onModalDismiss = useCallback(() => {\n if (modal?.isDismissable !== false && !isClosing) {\n closeModal();\n if (callbackRefs.current) {\n callbackRefs.current.onCloseModal?.();\n callbackRefs.current.onCloseModal = undefined; // Clear callback reference\n }\n }\n }, [modal, closeModal, isClosing]);\n\n useEffect(() => {\n if (!isUserAuthenticated && modal?.isPrivate) {\n // If the modal is private and user is not authenticated, close it\n closeModal();\n }\n }, [isUserAuthenticated, modal, closeModal]);\n\n // Handle ESC key\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onModalDismiss();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [onModalDismiss]);\n\n return (\n <ModalContext.Provider value={modalContent}>\n {children}\n {modal && <Modal modal={modal} isClosing={isClosing} onClose={onModalDismiss} />}\n </ModalContext.Provider>\n );\n});\n\nexport default ModalProvider;\n"],"names":["ANIMATION_DURATION_MS","ModalProvider","memo","children","modals","isUserAuthenticated","modal","setModal","useState","modalParams","setModalParams","isClosing","setIsClosing","callbackRefs","useRef","openModal","useCallback","modalName","newModalParams","callback","newModal","m","lockScroll","closeModal","unlockScroll","modalContent","useMemo","onModalDismiss","_b","_a","useEffect","handleKeyDown","e","jsxs","ModalContext","jsx","Modal","ModalProvider$1"],"mappings":";;;;;AASA,MAAMA,IAAwB,KAKxBC,IAAyCC,EAAK,CAAC,EAAE,UAAAC,GAAU,QAAAC,GAAQ,qBAAAC,QAA0B;AACjG,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAwB,IAAI,GAChD,CAACC,GAAaC,CAAc,IAAIF,EAA8C,MAAS,GACvF,CAACG,GAAWC,CAAY,IAAIJ,EAAS,EAAK,GAC1CK,IAAeC,EAAoC,MAAS,G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AAqB;AACtC,MAAAA,EAAE,QAAQ,YACGL;IACjB;AAGK,kBAAA,iBAAiB,WAAWI,CAAa,GAEzC,MAAM,OAAO,oBAAoB,WAAWA,CAAa;AAAA,EAAA,GAC/D,CAACJ,CAAc,CAAC,GAGhB,gBAAAM,EAAAC,EAAa,UAAb,EAAsB,OAAOT,GAC3B,UAAA;AAAA,IAAAtB;AAAA,IACAG,KAAU,gBAAA6B,EAAAC,GAAA,EAAM,OAAA9B,GAAc,WAAAK,GAAsB,SAASgB,GAAgB;AAAA,EAChF,EAAA,CAAA;AAEJ,CAAC,GAEDU,IAAepC;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import o from "styled-components";
|
2
2
|
const s = o.div(
|
3
|
-
({ theme: { colors: a }, $isClosing:
|
3
|
+
({ theme: { colors: a, zIndex: t }, $isClosing: i }) => `
|
4
4
|
position: fixed;
|
5
5
|
top: 0;
|
6
6
|
left: 0;
|
@@ -9,8 +9,9 @@ const s = o.div(
|
|
9
9
|
background-color: ${a.BLACK_T_60};
|
10
10
|
backdrop-filter: blur(40px);
|
11
11
|
display: flex;
|
12
|
-
animation: ${
|
13
|
-
|
12
|
+
animation: ${i ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
13
|
+
z-index: ${t.MODAL};
|
14
|
+
|
14
15
|
@keyframes backdropFadeIn {
|
15
16
|
from {
|
16
17
|
opacity: 0;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n \n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport { ModalContainer, BaseModal, BaseModalContent, CloseButtonContainer, SpotlightModal };\n"],"names":["ModalContainer","styled","colors","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,YAAAC,
|
1
|
+
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport { ModalContainer, BaseModal, BaseModalContent, CloseButtonContainer, SpotlightModal };\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,E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AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXM,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDP,IACI;AAAA;AAAA,4BAEoBQ,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { useContext as
|
2
|
-
import
|
3
|
-
const
|
4
|
-
const { openModal: o, closeModal: t, isClosing: s } =
|
5
|
-
return { openModal: o, closeModal: t, isClosing: s };
|
6
|
-
}, c =
|
1
|
+
import { useContext as n } from "react";
|
2
|
+
import l from "./modal-context.js";
|
3
|
+
const a = () => {
|
4
|
+
const { openModal: o, closeModal: t, isClosing: s, modal: e } = n(l);
|
5
|
+
return { openModal: o, closeModal: t, isClosing: s, modal: e };
|
6
|
+
}, c = a;
|
7
7
|
export {
|
8
8
|
c as default
|
9
9
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-modal-actions.js","sources":["../../../../src/features/ui/modals/use-modal-actions.ts"],"sourcesContent":["import type { IUseModalActions } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalActions: IUseModalActions = () => {\n const { openModal, closeModal, isClosing } = useContext(ModalContext);\n\n return { openModal, closeModal, isClosing };\n};\n\nexport default useModalActions;\n"],"names":["useModalActions","openModal","closeModal","isClosing","useContext","ModalContext","useModalActions$1"],"mappings":";;AAMA,MAAMA,IAAoC,MAAM;AAC9C,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,WAAAC,
|
1
|
+
{"version":3,"file":"use-modal-actions.js","sources":["../../../../src/features/ui/modals/use-modal-actions.ts"],"sourcesContent":["import type { IUseModalActions } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalActions: IUseModalActions = () => {\n const { openModal, closeModal, isClosing, modal } = useContext(ModalContext);\n\n return { openModal, closeModal, isClosing, modal };\n};\n\nexport default useModalActions;\n"],"names":["useModalActions","openModal","closeModal","isClosing","modal","useContext","ModalContext","useModalActions$1"],"mappings":";;AAMA,MAAMA,IAAoC,MAAM;AAC9C,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,WAAAC,GAAW,OAAAC,MAAUC,EAAWC,CAAY;AAE3E,SAAO,EAAE,WAAAL,GAAW,YAAAC,GAAY,WAAAC,GAAW,OAAAC,EAAM;AACnD,GAEAG,IAAeP;"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { createGetAPI as t } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V2 as o } from "../../../../constants/api.js";
|
3
|
+
const { useGet: s } = t({
|
4
|
+
getURL: (e) => `${o}/student-nodes/${e}/`
|
5
|
+
});
|
6
|
+
export {
|
7
|
+
s as useGetDynamicSheetData
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=get-dynamic-sheet.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-dynamic-sheet.js","sources":["../../../../../src/features/worksheet/worksheet-preview/api/get-dynamic-sheet.ts"],"sourcesContent":["import type { INodeDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V2 } from '../../../../constants/api';\n\nconst { useGet: useGetDynamicSheetData } = createGetAPI<INodeDataProps, void>({\n getURL: userNodeId => `${BASE_URL_V2}/student-nodes/${userNodeId}/`,\n});\n\nexport { useGetDynamicSheetData };\n"],"names":["useGetDynamicSheetData","createGetAPI","userNodeId","BASE_URL_V2"],"mappings":";;AAMA,MAAM,EAAE,QAAQA,EAAuB,IAAIC,EAAmC;AAAA,EAC5E,QAAQ,CAAAC,MAAc,GAAGC,CAAW,kBAAkBD,CAAU;AAClE,CAAC;"}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { jsx as e, jsxs as g } from "react/jsx-runtime";
|
2
|
+
import { memo as y, useCallback as D, useEffect as w } from "react";
|
3
|
+
import k from "../../../ui/buttons/button/button.js";
|
4
|
+
import b from "../../../ui/layout/flex-view.js";
|
5
|
+
import v from "../../../ui/loader/app-loader/app-loader.js";
|
6
|
+
import x from "../../../ui/text/text.js";
|
7
|
+
import { useGetDynamicSheetData as A } from "../api/get-dynamic-sheet.js";
|
8
|
+
import C from "../worksheet-preview.js";
|
9
|
+
const I = y((o) => {
|
10
|
+
const { studentId: t, userNodeId: i, onBackIconClick: m } = o, {
|
11
|
+
get: n,
|
12
|
+
data: c,
|
13
|
+
isProcessing: l,
|
14
|
+
isProcessingFailed: d,
|
15
|
+
error: s
|
16
|
+
} = A(), {
|
17
|
+
items: f = [],
|
18
|
+
title: h,
|
19
|
+
node_type: p = "DYNAMIC"
|
20
|
+
} = c || {}, a = f.map(({ ref: u }) => u), r = D(() => {
|
21
|
+
t && i && n(i);
|
22
|
+
}, [n, t, i]);
|
23
|
+
return w(() => {
|
24
|
+
r();
|
25
|
+
}, [r]), l ? /* @__PURE__ */ e(v, { height: "100%" }) : d ? /* @__PURE__ */ g(b, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
|
26
|
+
/* @__PURE__ */ e(x, { $renderAs: "h6", children: (s == null ? void 0 : s.message) || "Oops! Something went wrong. Please try again later." }),
|
27
|
+
/* @__PURE__ */ e(
|
28
|
+
k,
|
29
|
+
{
|
30
|
+
widthX: 14,
|
31
|
+
size: "small",
|
32
|
+
shape: "square",
|
33
|
+
renderAs: "primary",
|
34
|
+
label: "Try again",
|
35
|
+
onClick: r
|
36
|
+
}
|
37
|
+
)
|
38
|
+
] }) : a ? /* @__PURE__ */ e(
|
39
|
+
C,
|
40
|
+
{
|
41
|
+
activityReference: "test",
|
42
|
+
action: "review",
|
43
|
+
nodeType: p,
|
44
|
+
userType: "TEACHER",
|
45
|
+
studentId: t ?? "student-id",
|
46
|
+
isLessonV3Enabled: !1,
|
47
|
+
worksheetName: h,
|
48
|
+
scribblingEnabled: !1,
|
49
|
+
items: a,
|
50
|
+
onBackIconClick: m
|
51
|
+
}
|
52
|
+
) : null;
|
53
|
+
}), R = I;
|
54
|
+
export {
|
55
|
+
R as default
|
56
|
+
};
|
57
|
+
//# sourceMappingURL=dynamic-worksheet-preview.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dynamic-worksheet-preview.js","sources":["../../../../../src/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.tsx"],"sourcesContent":["import type { TNodeTypes } from '../../../../types/models/worksheet';\nimport type { IDynamicWorksheetPreview } from './dynamic-worksheet-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useGetDynamicSheetData } from '../api/get-dynamic-sheet';\nimport PreviewWorksheet from '../worksheet-preview';\n\nconst DynamicWorksheetPreview: FC<IDynamicWorksheetPreview> = memo(props => {\n const { studentId, userNodeId, onBackIconClick } = props;\n\n const {\n get: getDynamicSheetData,\n data: dynamicSheetData,\n isProcessing,\n isProcessingFailed,\n error,\n } = useGetDynamicSheetData();\n\n const {\n items: itemsToBeAssigned = [],\n title,\n node_type: nodeType = 'DYNAMIC',\n } = dynamicSheetData || {};\n const itemRefs = itemsToBeAssigned.map(({ ref }) => ref);\n\n const fetchDynamicSheetData = useCallback(() => {\n if (studentId && userNodeId) {\n getDynamicSheetData(userNodeId);\n }\n }, [getDynamicSheetData, studentId, userNodeId]);\n\n useEffect(() => {\n fetchDynamicSheetData();\n }, [fetchDynamicSheetData]);\n\n if (isProcessing) {\n return <AppLoader height=\"100%\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">\n {error?.message || 'Oops! Something went wrong. Please try again later.'}\n </Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchDynamicSheetData}\n />\n </FlexView>\n );\n }\n\n if (!itemRefs) {\n return null;\n }\n\n return (\n <PreviewWorksheet\n activityReference=\"test\"\n action=\"review\"\n nodeType={nodeType as TNodeTypes}\n userType=\"TEACHER\"\n studentId={studentId ?? 'student-id'}\n isLessonV3Enabled={false}\n worksheetName={title}\n scribblingEnabled={false}\n items={itemRefs}\n onBackIconClick={onBackIconClick}\n />\n );\n});\n\nexport default DynamicWorksheetPreview;\n"],"names":["DynamicWorksheetPreview","memo","props","studentId","userNodeId","onBackIconClick","getDynamicSheetData","dynamicSheetData","isProcessing","isProcessingFailed","error","useGetDynamicSheetData","itemsToBeAssigned","title","nodeType","itemRefs","ref","fetchDynamicSheetData","useCallback","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","PreviewWorksheet","DynamicWorksheetPreview$1"],"mappings":";;;;;;;;AAaA,MAAMA,IAAwDC,EAAK,CAASC,MAAA;AAC1E,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,iBAAAC,EAAA,IAAoBH,GAE7C;AAAA,IACJ,KAAKI;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,OAAAC;AAAA,MACEC,EAAuB,GAErB;AAAA,IACJ,OAAOC,IAAoB,CAAC;AAAA,IAC5B,OAAAC;AAAA,IACA,WAAWC,IAAW;AAAA,EAAA,IACpBP,KAAoB,CAAA,GAClBQ,IAAWH,EAAkB,IAAI,CAAC,EAAE,KAAAI,EAAA,MAAUA,CAAG,GAEjDC,IAAwBC,EAAY,MAAM;AAC9C,IAAIf,KAAaC,KACfE,EAAoBF,CAAU;AAAA,EAE/B,GAAA,CAACE,GAAqBH,GAAWC,CAAU,CAAC;AAM/C,SAJAe,EAAU,MAAM;AACQ,IAAAF;EAAA,GACrB,CAACA,CAAqB,CAAC,GAEtBT,IACK,gBAAAY,EAACC,GAAU,EAAA,QAAO,OAAO,CAAA,IAG9BZ,IAEA,gBAAAa,EAACC,KAAS,WAAW,KAAK,SAAQ,SAAQ,iBAAgB,UAAS,aAAY,UAC7E,UAAA;AAAA,IAAA,gBAAAH,EAACI,GAAK,EAAA,WAAU,MACb,WAAAd,KAAA,gBAAAA,EAAO,YAAW,uDACrB;AAAA,IACA,gBAAAU;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,MAAK;AAAA,QACL,OAAM;AAAA,QACN,UAAS;AAAA,QACT,OAAM;AAAA,QACN,SAASR;AAAA,MAAA;AAAA,IACX;AAAA,EACF,EAAA,CAAA,IAICF,IAKH,gBAAAK;AAAA,IAACM;AAAA,IAAA;AAAA,MACC,mBAAkB;AAAA,MAClB,QAAO;AAAA,MACP,UAAAZ;AAAA,MACA,UAAS;AAAA,MACT,WAAWX,KAAa;AAAA,MACxB,mBAAmB;AAAA,MACnB,eAAeU;AAAA,MACf,mBAAmB;AAAA,MACnB,OAAOE;AAAA,MACP,iBAAAV;AAAA,IAAA;AAAA,EAAA,IAdK;AAiBX,CAAC,GAEDsB,IAAe3B;"}
|
package/dist/index.d.ts
CHANGED
@@ -334,6 +334,8 @@ export declare const DraftIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
334
334
|
|
335
335
|
export declare const DragIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
336
336
|
|
337
|
+
export declare const DynamicPreviewWorksheet: FC<IDynamicWorksheetPreview>;
|
338
|
+
|
337
339
|
export declare enum EClassTimeAlertLevel {
|
338
340
|
FIVE_MIN = "5min",
|
339
341
|
FIFTEEN_MIN = "15min"
|
@@ -1296,6 +1298,12 @@ declare interface IDigitalMeterProps {
|
|
1296
1298
|
actAsTimer?: boolean;
|
1297
1299
|
}
|
1298
1300
|
|
1301
|
+
declare interface IDynamicWorksheetPreview {
|
1302
|
+
studentId: string;
|
1303
|
+
userNodeId: string;
|
1304
|
+
onBackIconClick: () => void;
|
1305
|
+
}
|
1306
|
+
|
1299
1307
|
declare interface IEditMilestoneModalProps extends IMilestoneEditProps {
|
1300
1308
|
studentId: string;
|
1301
1309
|
isUsingAlternateCurriculum: boolean;
|
@@ -2381,6 +2389,11 @@ export declare interface IModal {
|
|
2381
2389
|
modalWidth: string;
|
2382
2390
|
}
|
2383
2391
|
|
2392
|
+
declare interface IModalCallbacks {
|
2393
|
+
/** Callback when the modal is closed */
|
2394
|
+
onCloseModal?: () => void;
|
2395
|
+
}
|
2396
|
+
|
2384
2397
|
/**
|
2385
2398
|
* Context for managing modals throughout the application
|
2386
2399
|
*/
|
@@ -2390,7 +2403,7 @@ declare interface IModalContext {
|
|
2390
2403
|
/** Parameters passed to the modal when opened */
|
2391
2404
|
modalParams?: Record<string, unknown>;
|
2392
2405
|
/** Opens a modal by name with optional parameters */
|
2393
|
-
openModal: <T = undefined>(name: string, params?: T) => void;
|
2406
|
+
openModal: <T = undefined>(name: string, params?: T, callbacks?: IModalCallbacks) => void;
|
2394
2407
|
/** Closes the currently open modal */
|
2395
2408
|
closeModal: () => void;
|
2396
2409
|
/** Whether the modal is in the process of closing (for animation) */
|
@@ -3608,7 +3621,7 @@ declare interface IUseIsTabBlocked {
|
|
3608
3621
|
}
|
3609
3622
|
|
3610
3623
|
declare interface IUseModalActions {
|
3611
|
-
(): Pick<IModalContext, 'openModal' | 'closeModal' | 'isClosing'>;
|
3624
|
+
(): Pick<IModalContext, 'openModal' | 'closeModal' | 'isClosing' | 'modal'>;
|
3612
3625
|
}
|
3613
3626
|
|
3614
3627
|
declare interface IUseModalParams {
|
package/dist/index.js
CHANGED
@@ -14,9 +14,9 @@ import { default as L } from "./assets/line-icons/icons/bookmark.js";
|
|
14
14
|
import { default as k } from "./assets/line-icons/icons/bulb.js";
|
15
15
|
import { default as O } from "./assets/line-icons/icons/bulb2.js";
|
16
16
|
import { default as D } from "./assets/line-icons/icons/calendar.js";
|
17
|
-
import { default as
|
17
|
+
import { default as y } from "./assets/line-icons/icons/check.js";
|
18
18
|
import { default as U } from "./assets/line-icons/icons/check2.js";
|
19
|
-
import { default as
|
19
|
+
import { default as B } from "./assets/line-icons/icons/clipboard.js";
|
20
20
|
import { default as w } from "./assets/line-icons/icons/clock.js";
|
21
21
|
import { default as V } from "./assets/line-icons/icons/clock2.js";
|
22
22
|
import { default as Y } from "./assets/line-icons/icons/code.js";
|
@@ -41,9 +41,9 @@ import { default as Le } from "./assets/line-icons/icons/home.js";
|
|
41
41
|
import { default as ke } from "./assets/line-icons/icons/image.js";
|
42
42
|
import { default as Oe } from "./assets/line-icons/icons/info.js";
|
43
43
|
import { default as De } from "./assets/line-icons/icons/info2.js";
|
44
|
-
import { default as
|
44
|
+
import { default as ye } from "./assets/line-icons/icons/left.js";
|
45
45
|
import { default as Ue } from "./assets/line-icons/icons/lock.js";
|
46
|
-
import { default as
|
46
|
+
import { default as Be } from "./assets/line-icons/icons/lock2.js";
|
47
47
|
import { default as we } from "./assets/line-icons/icons/lock3.js";
|
48
48
|
import { default as Ve } from "./assets/line-icons/icons/minus.js";
|
49
49
|
import { default as Ye } from "./assets/line-icons/icons/minus2.js";
|
@@ -68,8 +68,8 @@ import { default as Mo } from "./assets/line-icons/icons/search.js";
|
|
68
68
|
import { default as No } from "./assets/line-icons/icons/sheet.js";
|
69
69
|
import { default as Ho } from "./assets/line-icons/icons/star.js";
|
70
70
|
import { default as Go } from "./assets/line-icons/icons/skip-colored.js";
|
71
|
-
import { default as
|
72
|
-
import { default as
|
71
|
+
import { default as go } from "./assets/line-icons/icons/skip.js";
|
72
|
+
import { default as vo } from "./assets/line-icons/icons/skip2.js";
|
73
73
|
import { default as bo } from "./assets/line-icons/icons/star2.js";
|
74
74
|
import { default as Wo } from "./assets/line-icons/icons/status.js";
|
75
75
|
import { default as Fo } from "./assets/line-icons/icons/striked-eye.js";
|
@@ -94,9 +94,9 @@ import { default as Lr } from "./assets/line-icons/icons/cuemath-logo.js";
|
|
94
94
|
import { default as kr } from "./assets/line-icons/icons/next2.js";
|
95
95
|
import { AutoPlayPermissionProvider as Or } from "./features/hooks/use-auto-play-permission/use-auto-play-permission-context-provider.js";
|
96
96
|
import { default as Dr } from "./features/hooks/use-zoom-disable.js";
|
97
|
-
import { default as
|
97
|
+
import { default as yr } from "./features/hooks/use-force-reload.js";
|
98
98
|
import { default as Ur } from "./features/ui/accordion-section/accordion-section.js";
|
99
|
-
import { default as
|
99
|
+
import { default as Br } from "./features/ui/arrow-tooltip/arrow-tooltip.js";
|
100
100
|
import { default as wr } from "./features/ui/context-menu/context-menu.js";
|
101
101
|
import { default as Vr } from "./features/ui/timers/countdown-timer/countdown-timer.js";
|
102
102
|
import { default as Yr } from "./features/ui/nudge/nudge.js";
|
@@ -121,9 +121,9 @@ import { default as Lt } from "./features/ui/layout/flex-view.js";
|
|
121
121
|
import { default as kt } from "./features/ui/loader/app-loader/app-loader.js";
|
122
122
|
import { CircularLoader as Ot } from "./features/ui/loader/circular-loader/circular-loader.js";
|
123
123
|
import { default as Dt } from "./features/ui/modals/modal-provider.js";
|
124
|
-
import { default as
|
124
|
+
import { default as yt } from "./features/ui/modals/use-modal-actions.js";
|
125
125
|
import { default as Ut } from "./features/ui/modals/use-modal-params.js";
|
126
|
-
import { default as
|
126
|
+
import { default as Bt } from "./features/ui/radio-cards/radio-cards.js";
|
127
127
|
import { default as wt } from "./features/ui/section-list/section-list.js";
|
128
128
|
import { default as Vt } from "./features/ui/text/text.js";
|
129
129
|
import { default as Yt } from "./features/ui/tag/tag.js";
|
@@ -148,8 +148,8 @@ import { default as Ma } from "./features/auth/comps/tabs/tabs.js";
|
|
148
148
|
import { default as Na } from "./features/auth/comps/input-status-icon/input-status-icon.js";
|
149
149
|
import { default as Ha } from "./features/auth/comps/resend-otp/resend-otp.js";
|
150
150
|
import { default as Ga } from "./features/auth/signup/user-type-selector/user-type-selector.js";
|
151
|
-
import { default as
|
152
|
-
import { default as
|
151
|
+
import { default as ga } from "./features/auth/signup/claim-user-account/claim-user-account.js";
|
152
|
+
import { default as va } from "./features/auth/signup/custom-input-field/grade-input/grade-input.js";
|
153
153
|
import { default as ba } from "./features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js";
|
154
154
|
import { default as Wa } from "./features/auth/signup/custom-input-field/custom-input-field.js";
|
155
155
|
import { default as Fa } from "./features/auth/signup/circular-step-wrapper/circular-step-wrapper.js";
|
@@ -174,9 +174,9 @@ import { default as Lf } from "./features/chapters/chapters-list/chapters-list.j
|
|
174
174
|
import { default as kf } from "./features/chapters/lpar-chapter/lpar-chapter.js";
|
175
175
|
import { default as Of } from "./features/chapters/lpar-milestone-chapter/lpar-milestone-chapter.js";
|
176
176
|
import { default as Df } from "./features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary.js";
|
177
|
-
import { checkIfPPTNodeType as
|
177
|
+
import { checkIfPPTNodeType as yf } from "./features/chapters/lpar-chapter/utils/index.js";
|
178
178
|
import { default as Uf } from "./features/chapters-v2/chapter-details/chapter-details.js";
|
179
|
-
import { invalidateGetChapterDetails as
|
179
|
+
import { invalidateGetChapterDetails as Bf } from "./features/chapters-v2/api/chapter.js";
|
180
180
|
import { GAME_LAUNCHER_ASSET_PADDING as wf } from "./features/circle-games/game-launcher/comps/segmented-game-card/constants.js";
|
181
181
|
import { GAME_LAUNCHER_SIZE as Vf } from "./features/circle-games/game-launcher/comps/card-container/constants.js";
|
182
182
|
import { useCircleSounds as Yf } from "./features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js";
|
@@ -201,8 +201,8 @@ import { SplashScreen as Ms } from "./features/circle-games/sign-up/comp/splash-
|
|
201
201
|
import { SignUp as Ns } from "./features/circle-games/sign-up/sign-up.js";
|
202
202
|
import { default as Hs } from "./features/cue-canvas/cue-canvas-provider.js";
|
203
203
|
import { default as Gs } from "./features/cue-canvas/toolbar/toolbar.js";
|
204
|
-
import { default as
|
205
|
-
import { default as
|
204
|
+
import { default as gs } from "./features/cue-canvas/cue-canvas.js";
|
205
|
+
import { default as vs } from "./features/cue-canvas/hooks/use-canvas-sync-broker.js";
|
206
206
|
import { default as bs } from "./features/cue-canvas/sidebar/sidebar.js";
|
207
207
|
import { default as Ws } from "./features/cue-canvas/bottombar/homework-controls.js";
|
208
208
|
import { default as Fs } from "./features/communication/hooks/use-inclass-message-broker/use-inclass-message-broker.js";
|
@@ -227,9 +227,9 @@ import { Coachmark as Ll } from "./features/journey/comps/coachmark/coachmark.js
|
|
227
227
|
import { useHomePageJourney as kl } from "./features/journey/hooks/use-home-page-journey/use-home-page-journey.js";
|
228
228
|
import { useChapterPageJourney as Ol } from "./features/journey/hooks/use-chapter-journey.js";
|
229
229
|
import { default as Dl } from "./features/maintenance/maintenance.js";
|
230
|
-
import { default as
|
230
|
+
import { default as yl } from "./features/milestone/create/submit-modal/submit-modal.js";
|
231
231
|
import { default as Ul } from "./features/milestone/create/comps/confirmation-modals/goal-creation-confirmation.js";
|
232
|
-
import { default as
|
232
|
+
import { default as Bl } from "./features/milestone/create/comps/confirmation-modals/chapter-clearance-confirmation.js";
|
233
233
|
import { default as wl } from "./features/milestone/create/milestone-create-container.js";
|
234
234
|
import { default as Vl } from "./features/milestone/edit/goal-drafts/goal-draft-edit-container.js";
|
235
235
|
import { default as Yl } from "./features/milestone/outcome/milestone-outcome-container.js";
|
@@ -252,8 +252,8 @@ import { default as Mp } from "./features/pointer-sync/pointer.js";
|
|
252
252
|
import { default as Np } from "./features/pointer-sync/hooks/use-pointer-sync.js";
|
253
253
|
import { DigitalMeter as Hp } from "./features/post-game-stats/digital-meter/digital-meter.js";
|
254
254
|
import { EPostGameStat as Gp } from "./features/post-game-stats/enums/post-game-stats-enum.js";
|
255
|
-
import { PostGameStats as
|
256
|
-
import { default as
|
255
|
+
import { PostGameStats as gp } from "./features/post-game-stats/post-game-stats.js";
|
256
|
+
import { default as vp } from "./features/recent-chapters/recent-chapters.js";
|
257
257
|
import { SENTRY_DENIED_URLS as bp, SENTRY_IGNORED_ERRORS as wp } from "./features/sentry/constants/ignored.js";
|
258
258
|
import { default as Vp } from "./features/sheet-tools/desmos-calculator/desmos-calculator.js";
|
259
259
|
import { default as Yp } from "./features/sheet-tools/tool-header/tool-header.js";
|
@@ -268,13 +268,14 @@ import { ACTION_BAR_HEIGHT as Tm, QUESTIONS_GAP as Sm, QUESTION_WIDTH as Em, TOP
|
|
268
268
|
import { isOkayTypeQuestion as Pm } from "./features/worksheet/worksheet/worksheet-helpers.js";
|
269
269
|
import { default as hm } from "./features/worksheet/worksheet/worksheet-container.js";
|
270
270
|
import { default as Lm } from "./features/worksheet/worksheet-preview/worksheet-preview.js";
|
271
|
-
import { default as km } from "./features/worksheet/worksheet/worksheet-
|
272
|
-
import { default as Om } from "./features/worksheet/worksheet/worksheet-permissions/
|
273
|
-
import { default as Dm } from "./features/worksheet/
|
274
|
-
import { default as
|
275
|
-
import { default as Um } from "./features/worksheet/
|
276
|
-
import { default as
|
277
|
-
import {
|
271
|
+
import { default as km } from "./features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js";
|
272
|
+
import { default as Om } from "./features/worksheet/worksheet/worksheet-permissions/sheet-locked.js";
|
273
|
+
import { default as Dm } from "./features/worksheet/worksheet/worksheet-permissions/error.js";
|
274
|
+
import { default as ym } from "./features/worksheet/learnosity-preloader/learnosity-preloader.js";
|
275
|
+
import { default as Um } from "./features/worksheet/learnosity-preloader/use-is-learnosity-loaded.js";
|
276
|
+
import { default as Bm } from "./features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js";
|
277
|
+
import { default as wm } from "./features/hooks/use-viewport/use-viewport.js";
|
278
|
+
import { COUNTRY_CODE_MAP as Vm } from "./constants/country.js";
|
278
279
|
export {
|
279
280
|
xp as ACHIEVEMENT_ACTIONS,
|
280
281
|
mf as AUTH_TABS,
|
@@ -286,7 +287,7 @@ export {
|
|
286
287
|
Ea as AnimatedArc,
|
287
288
|
kt as AppLoader,
|
288
289
|
et as ArcButton,
|
289
|
-
|
290
|
+
Br as ArrowTooltip,
|
290
291
|
df as AuthApiErrorCode,
|
291
292
|
_a as AuthPageLayout,
|
292
293
|
Aa as AuthStaticPanel,
|
@@ -307,17 +308,17 @@ export {
|
|
307
308
|
Is as CIRCLE_ACTION_IDS,
|
308
309
|
cs as CIRCLE_ONBOARDING_ANALYTICS_STEPS,
|
309
310
|
Xp as COMPLETED_SHEET_STATE,
|
310
|
-
|
311
|
+
Vm as COUNTRY_CODE_MAP,
|
311
312
|
D as CalendarIcon,
|
312
313
|
Qt as Callout,
|
313
314
|
St as CascadingSelectInput,
|
314
315
|
hf as Chapter,
|
315
|
-
|
316
|
+
Bl as ChapterClearanceConfirmationModal,
|
316
317
|
Uf as ChapterDetails,
|
317
318
|
Lf as ChaptersList,
|
318
319
|
hr as ChatIcon,
|
319
320
|
U as Check2Icon,
|
320
|
-
|
321
|
+
y as CheckIcon,
|
321
322
|
at as CheckboxInput,
|
322
323
|
st as CheckboxInputList,
|
323
324
|
Sr as ChevronDownIcon,
|
@@ -327,9 +328,9 @@ export {
|
|
327
328
|
Ot as CircularLoader,
|
328
329
|
Fa as CircularStepWrapper,
|
329
330
|
Rs as CircularSteps,
|
330
|
-
|
331
|
+
ga as ClaimUserAccount,
|
331
332
|
jr as Clickable,
|
332
|
-
|
333
|
+
B as ClipboardIcon,
|
333
334
|
V as Clock2Icon,
|
334
335
|
w as ClockIcon,
|
335
336
|
Ll as Coachmark,
|
@@ -338,7 +339,7 @@ export {
|
|
338
339
|
Q as CopyIcon,
|
339
340
|
Vr as CountdownTimer,
|
340
341
|
j as CrossIcon,
|
341
|
-
|
342
|
+
gs as CueCanvas,
|
342
343
|
Gs as CueCanvasController,
|
343
344
|
Ws as CueCanvasHomeworkController,
|
344
345
|
Hs as CueCanvasProvider,
|
@@ -353,6 +354,7 @@ export {
|
|
353
354
|
ee as DownIcon,
|
354
355
|
re as DraftIcon,
|
355
356
|
ae as DragIcon,
|
357
|
+
km as DynamicPreviewWorksheet,
|
356
358
|
el as EClassTimeAlertLevel,
|
357
359
|
qf as ELeaderboardType,
|
358
360
|
up as EPResourceAssign,
|
@@ -378,7 +380,7 @@ export {
|
|
378
380
|
Vl as GoalDraftEdit,
|
379
381
|
Xl as GoalEdit,
|
380
382
|
ct as GooglePlacesSearchInput,
|
381
|
-
|
383
|
+
va as GradeInput,
|
382
384
|
r as GradeSelector,
|
383
385
|
Ce as HandIcon,
|
384
386
|
Pe as HelpIcon,
|
@@ -403,9 +405,9 @@ export {
|
|
403
405
|
kf as LPARChapter,
|
404
406
|
Of as LPARMilestoneChapter,
|
405
407
|
Ps as Leaderboard,
|
406
|
-
|
407
|
-
|
408
|
-
|
408
|
+
ym as LearnosityPreloader,
|
409
|
+
ye as LeftIcon,
|
410
|
+
Be as Lock2Icon,
|
409
411
|
we as Lock3Icon,
|
410
412
|
Ue as LockIcon,
|
411
413
|
Dl as Maintenance,
|
@@ -443,7 +445,7 @@ export {
|
|
443
445
|
uo as Plus2Icon,
|
444
446
|
po as PlusIcon,
|
445
447
|
ro as PointerIcon,
|
446
|
-
|
448
|
+
gp as PostGameStats,
|
447
449
|
no as PracticeIcon,
|
448
450
|
Lm as PreviewWorksheet,
|
449
451
|
io as ProgressIcon,
|
@@ -452,9 +454,9 @@ export {
|
|
452
454
|
To as QuestionIcon,
|
453
455
|
Eo as QuestionLetterIcon,
|
454
456
|
tm as REWARDS_LIST,
|
455
|
-
|
457
|
+
Bt as RadioCard,
|
456
458
|
pt as RadioInput,
|
457
|
-
|
459
|
+
vp as RecentChapters,
|
458
460
|
Ao as RedoIcon,
|
459
461
|
jp as ReferenceSheet,
|
460
462
|
Mp as RemotePeerPointer,
|
@@ -479,16 +481,16 @@ export {
|
|
479
481
|
ut as SelectInput,
|
480
482
|
ht as SelectionCards,
|
481
483
|
da as Separator,
|
482
|
-
|
484
|
+
Dm as SheetError,
|
483
485
|
No as SheetIcon,
|
484
486
|
Qp as SheetList,
|
485
|
-
|
487
|
+
Om as SheetLocked,
|
486
488
|
Ns as SignUp,
|
487
489
|
Ja as SignupMethods,
|
488
490
|
ur as SketchIcon,
|
489
|
-
|
491
|
+
vo as Skip2Icon,
|
490
492
|
Go as SkipColoredIcon,
|
491
|
-
|
493
|
+
go as SkipIcon,
|
492
494
|
za as SocialAccountNotFound,
|
493
495
|
Za as SocialLoginMethods,
|
494
496
|
Ms as SplashScreen,
|
@@ -500,7 +502,7 @@ export {
|
|
500
502
|
Xf as StreakReductionLocalStorageUtil,
|
501
503
|
Fo as StrikedEyeIcon,
|
502
504
|
dm as StudentDetails,
|
503
|
-
|
505
|
+
yl as SubmitMilestoneModal,
|
504
506
|
Jo as SwitchIcon,
|
505
507
|
la as TabComponent,
|
506
508
|
Ma as Tabs,
|
@@ -536,9 +538,9 @@ export {
|
|
536
538
|
rs as WebView,
|
537
539
|
ss as WebViewEvent,
|
538
540
|
hm as Worksheet,
|
539
|
-
|
541
|
+
yf as checkIfPPTNodeType,
|
540
542
|
oa as getTheme,
|
541
|
-
|
543
|
+
Bf as invalidateGetChapterDetails,
|
542
544
|
ul as invalidateHomeworks,
|
543
545
|
hp as invalidateMilestoneResources,
|
544
546
|
ip as invalidateMilestonesData,
|
@@ -548,12 +550,12 @@ export {
|
|
548
550
|
nm as loadScript,
|
549
551
|
im as media,
|
550
552
|
xl as useAutoPlayPermission,
|
551
|
-
|
553
|
+
vs as useCanvasSyncBroker,
|
552
554
|
Ol as useChapterPageJourney,
|
553
555
|
Yf as useCircleSounds,
|
554
556
|
rl as useClassTimeAlerts,
|
555
557
|
$t as useContextMenuClickHandler,
|
556
|
-
|
558
|
+
yr as useForceReload,
|
557
559
|
Ip as useGetAllMilestonesdata,
|
558
560
|
Cs as useGetCircleHomeDetailsDal,
|
559
561
|
Cl as useGetEligibleJourneysViaRoute,
|
@@ -565,17 +567,17 @@ export {
|
|
565
567
|
Zs as useInClassActionDispatcher,
|
566
568
|
qs as useInClassActionListener,
|
567
569
|
Fs as useInClassMessageBroker,
|
568
|
-
|
570
|
+
Um as useIsLearnosityLoaded,
|
569
571
|
Cf as useIsTabBlocked,
|
570
572
|
Sl as useJourney,
|
571
|
-
|
573
|
+
yt as useModalActions,
|
572
574
|
Ut as useModalParams,
|
573
575
|
Np as usePointerSync,
|
574
576
|
zt as useTrackingContext,
|
575
577
|
Js as useTrialSessionMessageBroker,
|
576
578
|
Zt as useUIContext,
|
577
|
-
|
578
|
-
|
579
|
+
wm as useViewport,
|
580
|
+
Bm as useWorksheetLayout,
|
579
581
|
Dr as useZoomDisable
|
580
582
|
};
|
581
583
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|