@cuemath/leap 2.8.57-rj-4 → 2.8.57-rj-5
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/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +77 -85
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +61 -60
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +1 -1
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/index.d.ts +0 -28
- package/dist/index.js +173 -175
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/circle-games/game-launcher/api/update-circle-onboarding/constants.js +0 -5
- package/dist/features/circle-games/game-launcher/api/update-circle-onboarding/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/api/update-circle-onboarding/post-circle-coachmark-api.js +0 -9
- package/dist/features/circle-games/game-launcher/api/update-circle-onboarding/post-circle-coachmark-api.js.map +0 -1
- package/dist/features/circle-games/game-launcher/dal/use-post-update-circle-journey-dal/use-post-update-circle-journey-dal.js +0 -23
- package/dist/features/circle-games/game-launcher/dal/use-post-update-circle-journey-dal/use-post-update-circle-journey-dal.js.map +0 -1
@@ -1,111 +1,103 @@
|
|
1
|
-
import { useMemo as
|
2
|
-
import { useGetCircleHomeAPI as
|
3
|
-
import { ProjectType as
|
4
|
-
const
|
5
|
-
const
|
1
|
+
import { useMemo as j, useState as f, useCallback as m, useEffect as y } from "react";
|
2
|
+
import { useGetCircleHomeAPI as k, invalidateCircleHomeAPI as v } from "../../api/get-content-for-today/get-circle-home-api.js";
|
3
|
+
import { ProjectType as r } from "../../../games/web-view/enums/project-type-enum.js";
|
4
|
+
const D = (a, n, l) => {
|
5
|
+
const s = j(
|
6
6
|
() => ({
|
7
7
|
user_id: a,
|
8
8
|
grade: n,
|
9
|
-
country_code:
|
9
|
+
country_code: l
|
10
10
|
}),
|
11
|
-
[a, n,
|
12
|
-
), [
|
13
|
-
data:
|
14
|
-
get:
|
15
|
-
isProcessed:
|
16
|
-
...
|
17
|
-
} =
|
18
|
-
|
19
|
-
}, [
|
20
|
-
|
21
|
-
}, [
|
22
|
-
return
|
23
|
-
let
|
24
|
-
|
25
|
-
points:
|
26
|
-
streakDays:
|
27
|
-
streakReduction:
|
28
|
-
streakDaysBeforeReduction:
|
29
|
-
streakStatus:
|
30
|
-
tournamentRank:
|
11
|
+
[a, n, l]
|
12
|
+
), [d, p] = f(null), {
|
13
|
+
data: e,
|
14
|
+
get: c,
|
15
|
+
isProcessed: o,
|
16
|
+
...u
|
17
|
+
} = k(a, s), _ = m(() => {
|
18
|
+
c(a, s);
|
19
|
+
}, [c, s, a]), b = m(() => {
|
20
|
+
v(a, s);
|
21
|
+
}, [s, a]);
|
22
|
+
return y(() => {
|
23
|
+
let i = null;
|
24
|
+
o && e && (i = {
|
25
|
+
points: e.points,
|
26
|
+
streakDays: e.streak_days,
|
27
|
+
streakReduction: e.streak_reduction,
|
28
|
+
streakDaysBeforeReduction: e.streak_days_before_reduction,
|
29
|
+
streakStatus: e.streak_status,
|
30
|
+
tournamentRank: e.tournament_rank,
|
31
31
|
projects: {
|
32
32
|
games: {
|
33
|
-
label:
|
34
|
-
type:
|
33
|
+
label: e.projects.games.label,
|
34
|
+
type: r.GAME,
|
35
35
|
initialProgressValue: 0,
|
36
|
-
data:
|
37
|
-
id:
|
38
|
-
name:
|
39
|
-
cardLottie:
|
40
|
-
tutorial:
|
41
|
-
variant:
|
42
|
-
isPlayed:
|
36
|
+
data: e.projects.games.data.map((t) => ({
|
37
|
+
id: t.id,
|
38
|
+
name: t.name,
|
39
|
+
cardLottie: t.card,
|
40
|
+
tutorial: t.tutorial,
|
41
|
+
variant: t.variant,
|
42
|
+
isPlayed: t.played
|
43
43
|
}))
|
44
44
|
},
|
45
45
|
puzzles: {
|
46
|
-
label:
|
47
|
-
type:
|
46
|
+
label: e.projects.puzzles.label,
|
47
|
+
type: r.PUZZLE,
|
48
48
|
initialProgressValue: 0,
|
49
|
-
data:
|
50
|
-
id:
|
51
|
-
name:
|
52
|
-
cardLottie:
|
53
|
-
tutorial:
|
54
|
-
variant:
|
55
|
-
question:
|
56
|
-
isHintSeen:
|
57
|
-
solved:
|
49
|
+
data: e.projects.puzzles.data.map((t) => ({
|
50
|
+
id: t.id,
|
51
|
+
name: t.name,
|
52
|
+
cardLottie: t.card,
|
53
|
+
tutorial: t.tutorial,
|
54
|
+
variant: t.variant,
|
55
|
+
question: t.question,
|
56
|
+
isHintSeen: t.is_hint_seen,
|
57
|
+
solved: t.solved
|
58
58
|
}))
|
59
59
|
}
|
60
60
|
},
|
61
61
|
timestamps: {
|
62
|
-
startTimestamp:
|
63
|
-
endTimestamp:
|
64
|
-
current:
|
65
|
-
},
|
66
|
-
coachmarkProgress: {
|
67
|
-
CIRCLE_ACTIVITIES_INTRO_JOURNEY: t.coachmark_completion.CIRCLE_ACTIVITIES_INTRO_JOURNEY,
|
68
|
-
CIRCLE_LEADERBOARD_INTRO_JOURNEY: t.coachmark_completion.CIRCLE_LEADERBOARD_INTRO_JOURNEY,
|
69
|
-
CIRCLE_POINTS_REWARD_JOURNEY: t.coachmark_completion.CIRCLE_POINTS_REWARD_JOURNEY,
|
70
|
-
CIRCLE_STREAK_UPDATE_JOURNEY: t.coachmark_completion.CIRCLE_STREAK_UPDATE_JOURNEY,
|
71
|
-
CIRCLE_TUTORIAL_JOURNEY: t.coachmark_completion.CIRCLE_TUTORIAL_JOURNEY,
|
72
|
-
CIRCLE_TABLES_INTRO_JOURNEY: t.coachmark_completion.CIRCLE_TABLES_INTRO_JOURNEY
|
62
|
+
startTimestamp: e.timestamps.start_timestamp,
|
63
|
+
endTimestamp: e.timestamps.end_timestamp,
|
64
|
+
current: e.timestamps.current
|
73
65
|
}
|
74
|
-
},
|
75
|
-
label:
|
76
|
-
type:
|
66
|
+
}, e.projects.lessons && (i.projects.lessons = {
|
67
|
+
label: e.projects.lessons.label,
|
68
|
+
type: r.LESSON,
|
77
69
|
initialProgressValue: 0,
|
78
|
-
data:
|
79
|
-
id:
|
80
|
-
name:
|
81
|
-
cardLottie:
|
82
|
-
tutorial:
|
83
|
-
variant:
|
84
|
-
sessionId:
|
85
|
-
miniGameIdentifier:
|
86
|
-
targetQuestions:
|
87
|
-
status:
|
70
|
+
data: e.projects.lessons.data.map((t) => ({
|
71
|
+
id: t.id,
|
72
|
+
name: t.name,
|
73
|
+
cardLottie: t.card,
|
74
|
+
tutorial: t.tutorial,
|
75
|
+
variant: t.variant,
|
76
|
+
sessionId: t.session_id,
|
77
|
+
miniGameIdentifier: t.mini_game_identifier,
|
78
|
+
targetQuestions: t.target_questions,
|
79
|
+
status: t.status
|
88
80
|
}))
|
89
|
-
}),
|
90
|
-
label:
|
91
|
-
type:
|
81
|
+
}), e.projects.tables && (i.projects.tables = {
|
82
|
+
label: e.projects.tables.label,
|
83
|
+
type: r.TABLE,
|
92
84
|
data: {
|
93
|
-
infiniteModeHighScore:
|
94
|
-
tableList:
|
95
|
-
tableNumber:
|
96
|
-
stars:
|
85
|
+
infiniteModeHighScore: e.projects.tables.data.infinite_mode_high_score,
|
86
|
+
tableList: e.projects.tables.data.table_wise_details.map((t) => ({
|
87
|
+
tableNumber: t.table_number,
|
88
|
+
stars: t.stars
|
97
89
|
}))
|
98
90
|
}
|
99
|
-
})),
|
100
|
-
}, [
|
101
|
-
data:
|
102
|
-
isProcessed:
|
103
|
-
getCircleHomeDetails:
|
104
|
-
invalidateCircleHomeDetails:
|
105
|
-
...
|
91
|
+
})), p(i);
|
92
|
+
}, [e, o]), {
|
93
|
+
data: d,
|
94
|
+
isProcessed: o,
|
95
|
+
getCircleHomeDetails: _,
|
96
|
+
invalidateCircleHomeDetails: b,
|
97
|
+
...u
|
106
98
|
};
|
107
99
|
};
|
108
100
|
export {
|
109
|
-
|
101
|
+
D as useGetCircleHomeDetailsDal
|
110
102
|
};
|
111
103
|
//# sourceMappingURL=use-get-circle-home-details-dal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-get-circle-home-details-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.ts"],"sourcesContent":["import type {\n ICircleHomeDetails,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { ProjectType } from '../../../games/web-view/enums';\nimport {\n invalidateCircleHomeAPI,\n useGetCircleHomeAPI,\n} from '../../api/get-content-for-today/get-circle-home-api';\n\nexport const useGetCircleHomeDetailsDal = (\n userId: string,\n grade: string,\n countryCode: string,\n): Omit<ReturnType<typeof useGetCircleHomeAPI>, 'data' | 'get'> & {\n data: ICircleHomeDetails | null;\n getCircleHomeDetails: () => void;\n invalidateCircleHomeDetails: () => void;\n} => {\n const initialQuery = useMemo(\n () => ({\n user_id: userId,\n grade,\n country_code: countryCode,\n }),\n [userId, grade, countryCode],\n );\n\n const [contentForToday, setContentForToday] = useState<ICircleHomeDetails | null>(null);\n\n const {\n data,\n get: getHomeDetails,\n isProcessed,\n ...rest\n } = useGetCircleHomeAPI(userId, initialQuery);\n\n const getCircleHomeDetails = useCallback(() => {\n getHomeDetails(userId, initialQuery);\n }, [getHomeDetails, initialQuery, userId]);\n\n const invalidateCircleHomeDetails = useCallback(() => {\n invalidateCircleHomeAPI(userId, initialQuery);\n }, [initialQuery, userId]);\n\n useEffect(() => {\n let circleHomeDetails: ICircleHomeDetails | null = null;\n\n if (isProcessed && data) {\n circleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakReduction: data.streak_reduction,\n streakDaysBeforeReduction: data.streak_days_before_reduction,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n projects: {\n games: {\n label: data.projects.games.label,\n type: ProjectType.GAME,\n initialProgressValue: 0,\n data: data.projects.games.data.map(game => ({\n id: game.id,\n name: game.name,\n cardLottie: game.card,\n tutorial: game.tutorial,\n variant: game.variant,\n isPlayed: game.played,\n })),\n },\n puzzles: {\n label: data.projects.puzzles.label,\n type: ProjectType.PUZZLE,\n initialProgressValue: 0,\n data: data.projects.puzzles.data.map(puzzle => ({\n id: puzzle.id,\n name: puzzle.name,\n cardLottie: puzzle.card,\n tutorial: puzzle.tutorial,\n variant: puzzle.variant,\n question: puzzle.question,\n isHintSeen: puzzle.is_hint_seen,\n solved: puzzle.solved,\n })),\n },\n },\n timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n
|
1
|
+
{"version":3,"file":"use-get-circle-home-details-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.ts"],"sourcesContent":["import type {\n ICircleHomeDetails,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { ProjectType } from '../../../games/web-view/enums';\nimport {\n invalidateCircleHomeAPI,\n useGetCircleHomeAPI,\n} from '../../api/get-content-for-today/get-circle-home-api';\n\nexport const useGetCircleHomeDetailsDal = (\n userId: string,\n grade: string,\n countryCode: string,\n): Omit<ReturnType<typeof useGetCircleHomeAPI>, 'data' | 'get'> & {\n data: ICircleHomeDetails | null;\n getCircleHomeDetails: () => void;\n invalidateCircleHomeDetails: () => void;\n} => {\n const initialQuery = useMemo(\n () => ({\n user_id: userId,\n grade,\n country_code: countryCode,\n }),\n [userId, grade, countryCode],\n );\n\n const [contentForToday, setContentForToday] = useState<ICircleHomeDetails | null>(null);\n\n const {\n data,\n get: getHomeDetails,\n isProcessed,\n ...rest\n } = useGetCircleHomeAPI(userId, initialQuery);\n\n const getCircleHomeDetails = useCallback(() => {\n getHomeDetails(userId, initialQuery);\n }, [getHomeDetails, initialQuery, userId]);\n\n const invalidateCircleHomeDetails = useCallback(() => {\n invalidateCircleHomeAPI(userId, initialQuery);\n }, [initialQuery, userId]);\n\n useEffect(() => {\n let circleHomeDetails: ICircleHomeDetails | null = null;\n\n if (isProcessed && data) {\n circleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakReduction: data.streak_reduction,\n streakDaysBeforeReduction: data.streak_days_before_reduction,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n projects: {\n games: {\n label: data.projects.games.label,\n type: ProjectType.GAME,\n initialProgressValue: 0,\n data: data.projects.games.data.map(game => ({\n id: game.id,\n name: game.name,\n cardLottie: game.card,\n tutorial: game.tutorial,\n variant: game.variant,\n isPlayed: game.played,\n })),\n },\n puzzles: {\n label: data.projects.puzzles.label,\n type: ProjectType.PUZZLE,\n initialProgressValue: 0,\n data: data.projects.puzzles.data.map(puzzle => ({\n id: puzzle.id,\n name: puzzle.name,\n cardLottie: puzzle.card,\n tutorial: puzzle.tutorial,\n variant: puzzle.variant,\n question: puzzle.question,\n isHintSeen: puzzle.is_hint_seen,\n solved: puzzle.solved,\n })),\n },\n },\n timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n };\n\n if (data.projects.lessons) {\n circleHomeDetails.projects.lessons = {\n label: data.projects.lessons.label,\n type: ProjectType.LESSON,\n initialProgressValue: 0,\n data: data.projects.lessons.data.map(lesson => ({\n id: lesson.id,\n name: lesson.name,\n cardLottie: lesson.card,\n tutorial: lesson.tutorial,\n variant: lesson.variant,\n sessionId: lesson.session_id,\n miniGameIdentifier: lesson.mini_game_identifier,\n targetQuestions: lesson.target_questions,\n status: lesson.status,\n })),\n };\n }\n\n if (data.projects.tables) {\n circleHomeDetails.projects.tables = {\n label: data.projects.tables.label,\n type: ProjectType.TABLE,\n data: {\n infiniteModeHighScore: data.projects.tables.data.infinite_mode_high_score,\n tableList: data.projects.tables.data.table_wise_details.map(table => ({\n tableNumber: table.table_number,\n stars: table.stars as TTableMode[],\n })),\n },\n };\n }\n }\n\n setContentForToday(circleHomeDetails);\n }, [data, isProcessed]);\n\n return {\n data: contentForToday,\n isProcessed,\n getCircleHomeDetails,\n invalidateCircleHomeDetails,\n ...rest,\n };\n};\n"],"names":["useGetCircleHomeDetailsDal","userId","grade","countryCode","initialQuery","useMemo","contentForToday","setContentForToday","useState","data","getHomeDetails","isProcessed","rest","useGetCircleHomeAPI","getCircleHomeDetails","useCallback","invalidateCircleHomeDetails","invalidateCircleHomeAPI","useEffect","circleHomeDetails","ProjectType","game","puzzle","lesson","table"],"mappings":";;;AAcO,MAAMA,IAA6B,CACxCC,GACAC,GACAC,MAKG;AACH,QAAMC,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,SAASJ;AAAA,MACT,OAAAC;AAAA,MACA,cAAcC;AAAA,IAAA;AAAA,IAEhB,CAACF,GAAQC,GAAOC,CAAW;AAAA,EAAA,GAGvB,CAACG,GAAiBC,CAAkB,IAAIC,EAAoC,IAAI,GAEhF;AAAA,IACJ,MAAAC;AAAA,IACA,KAAKC;AAAA,IACL,aAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDC,EAAoBZ,GAAQG,CAAY,GAEtCU,IAAuBC,EAAY,MAAM;AAC7C,IAAAL,EAAeT,GAAQG,CAAY;AAAA,EAClC,GAAA,CAACM,GAAgBN,GAAcH,CAAM,CAAC,GAEnCe,IAA8BD,EAAY,MAAM;AACpD,IAAAE,EAAwBhB,GAAQG,CAAY;AAAA,EAAA,GAC3C,CAACA,GAAcH,CAAM,CAAC;AAEzB,SAAAiB,EAAU,MAAM;AACd,QAAIC,IAA+C;AAEnD,IAAIR,KAAeF,MACGU,IAAA;AAAA,MAClB,QAAQV,EAAK;AAAA,MACb,YAAYA,EAAK;AAAA,MACjB,iBAAiBA,EAAK;AAAA,MACtB,2BAA2BA,EAAK;AAAA,MAChC,cAAcA,EAAK;AAAA,MACnB,gBAAgBA,EA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WAAWA,EAAO;AAAA,QAClB,oBAAoBA,EAAO;AAAA,QAC3B,iBAAiBA,EAAO;AAAA,QACxB,QAAQA,EAAO;AAAA,MAAA,EACf;AAAA,IAAA,IAIFd,EAAK,SAAS,WAChBU,EAAkB,SAAS,SAAS;AAAA,MAClC,OAAOV,EAAK,SAAS,OAAO;AAAA,MAC5B,MAAMW,EAAY;AAAA,MAClB,MAAM;AAAA,QACJ,uBAAuBX,EAAK,SAAS,OAAO,KAAK;AAAA,QACjD,WAAWA,EAAK,SAAS,OAAO,KAAK,mBAAmB,IAAI,CAAUe,OAAA;AAAA,UACpE,aAAaA,EAAM;AAAA,UACnB,OAAOA,EAAM;AAAA,QAAA,EACb;AAAA,MACJ;AAAA,IAAA,KAKNjB,EAAmBY,CAAiB;AAAA,EAAA,GACnC,CAACV,GAAME,CAAW,CAAC,GAEf;AAAA,IACL,MAAML;AAAA,IACN,aAAAK;AAAA,IACA,sBAAAG;AAAA,IACA,6BAAAE;AAAA,IACA,GAAGJ;AAAA,EAAA;AAEP;"}
|
@@ -1,108 +1,109 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { createContext as
|
3
|
-
import { Coachmark as
|
4
|
-
import { usePostUserJourney as
|
5
|
-
import {
|
6
|
-
const
|
7
|
-
const [
|
1
|
+
import { jsxs as q, jsx as j } from "react/jsx-runtime";
|
2
|
+
import { createContext as D, useState as h, useRef as C, useCallback as l, useMemo as L, useEffect as R } from "react";
|
3
|
+
import { Coachmark as N } from "../comps/coachmark/coachmark.js";
|
4
|
+
import { usePostUserJourney as M, useGetUserJourney as z } from "../user-journey-api/user-journey-api.js";
|
5
|
+
import { Overlay as G } from "./journey-styled.js";
|
6
|
+
const S = D(null), Q = ({ children: T, appId: u, userId: s }) => {
|
7
|
+
const [k, v] = h([]), [n, c] = h([]), [g, p] = h(!1), a = C(-1), r = C(), f = C([]), { post: x } = M(), {
|
8
|
+
data: m = null,
|
9
|
+
get: _,
|
10
|
+
isProcessing: O
|
11
|
+
} = z(), U = (u === "" || m && !O) && n.length > 0, A = l(
|
8
12
|
(e, t) => {
|
9
|
-
if (
|
13
|
+
if (n.length > 0) {
|
10
14
|
console.error(
|
11
15
|
`setJourney: Other Journey is already active, Current Journey: ${r.current}, New Journey Request: ${e}`
|
12
16
|
);
|
13
17
|
return;
|
14
18
|
}
|
15
|
-
|
19
|
+
p(!0), r.current = e, a.current = -1, c([...t]);
|
16
20
|
},
|
17
|
-
[
|
21
|
+
[n.length]
|
18
22
|
), y = l(() => {
|
19
|
-
|
23
|
+
f.current.forEach((e) => {
|
20
24
|
clearTimeout(e);
|
21
|
-
}),
|
22
|
-
}, []),
|
25
|
+
}), f.current = [], r.current = void 0, a.current = -1, c([]), p(!1);
|
26
|
+
}, []), P = l(
|
23
27
|
(e) => {
|
24
|
-
(
|
25
|
-
|
26
|
-
|
27
|
-
), v((t) => [...t, e]), $({
|
28
|
-
app_id: c,
|
29
|
-
user_id: o,
|
28
|
+
v((t) => [...t, e]), x({
|
29
|
+
app_id: u,
|
30
|
+
user_id: s,
|
30
31
|
journey_id: e,
|
31
32
|
journey_status: "COMPLETED"
|
32
33
|
}), y();
|
33
34
|
},
|
34
|
-
[
|
35
|
-
),
|
35
|
+
[u, y, x, s]
|
36
|
+
), $ = l((e, t) => {
|
36
37
|
if (!r.current || e !== r.current) {
|
37
38
|
console.error(
|
38
39
|
r.current ? `A Journey is already active, Current Journey: ${r.current}, New Journey Request: ${e}` : "addCoachmark was called before setJourney and Journey ID is undefined"
|
39
40
|
);
|
40
41
|
return;
|
41
42
|
}
|
42
|
-
|
43
|
-
}, []),
|
44
|
-
(e, t = !1,
|
43
|
+
c((J) => [...J, t]);
|
44
|
+
}, []), w = l(
|
45
|
+
(e, t = !1, J = 0) => {
|
45
46
|
if (!r.current || e !== r.current) {
|
46
47
|
console.error(
|
47
48
|
r.current ? "nextCoachmark was called before setJourney" : `A Journey is already active, Current Journey: ${r.current}, New Journey Request: ${e}`
|
48
49
|
);
|
49
50
|
return;
|
50
51
|
}
|
51
|
-
|
52
|
-
const
|
53
|
-
clearTimeout(
|
54
|
-
const
|
55
|
-
|
56
|
-
if (
|
52
|
+
J !== 0 && c((o) => o.map((i) => ({ ...i, isActive: !1 })));
|
53
|
+
const E = setTimeout(() => {
|
54
|
+
clearTimeout(E);
|
55
|
+
const o = a.current + 1;
|
56
|
+
c((i) => {
|
57
|
+
if (o >= i.length || i.length === 0)
|
57
58
|
return r.current = void 0, a.current = -1, [];
|
58
|
-
a.current =
|
59
|
+
a.current = o;
|
59
60
|
const d = [...i];
|
60
|
-
return d[
|
61
|
+
return d[o].isActive = !0, o > 0 && (d[o - 1].isActive = t), d;
|
61
62
|
});
|
62
|
-
},
|
63
|
-
|
63
|
+
}, J);
|
64
|
+
f.current.push(E);
|
64
65
|
},
|
65
66
|
[]
|
66
|
-
),
|
67
|
+
), b = L(
|
67
68
|
() => ({
|
68
|
-
nextCoachmark:
|
69
|
-
setJourney:
|
70
|
-
addCoachmark:
|
69
|
+
nextCoachmark: w,
|
70
|
+
setJourney: A,
|
71
|
+
addCoachmark: $,
|
71
72
|
clearJourney: y,
|
72
|
-
endJourney:
|
73
|
-
coachmarks:
|
74
|
-
userCompletedJourneyIds:
|
75
|
-
isJourneyActive:
|
73
|
+
endJourney: P,
|
74
|
+
coachmarks: n,
|
75
|
+
userCompletedJourneyIds: k,
|
76
|
+
isJourneyActive: g
|
76
77
|
}),
|
77
78
|
[
|
78
|
-
|
79
|
-
_,
|
79
|
+
w,
|
80
80
|
A,
|
81
|
+
$,
|
81
82
|
y,
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
P,
|
84
|
+
n,
|
85
|
+
k,
|
86
|
+
g
|
86
87
|
]
|
87
88
|
);
|
88
|
-
return
|
89
|
-
|
90
|
-
app_id:
|
91
|
-
user_id:
|
89
|
+
return R(() => {
|
90
|
+
u && s && _(s, {
|
91
|
+
app_id: u,
|
92
|
+
user_id: s,
|
92
93
|
journey_status: "COMPLETED"
|
93
94
|
});
|
94
|
-
}, [
|
95
|
-
if (
|
96
|
-
const e =
|
95
|
+
}, [u, _, s]), R(() => {
|
96
|
+
if (m) {
|
97
|
+
const e = m.map((t) => t.journey_id);
|
97
98
|
v(e);
|
98
99
|
}
|
99
|
-
}, [
|
100
|
-
|
101
|
-
|
100
|
+
}, [m]), /* @__PURE__ */ q(S.Provider, { value: b, children: [
|
101
|
+
U && /* @__PURE__ */ j(G, { children: n.map((e, t) => /* @__PURE__ */ j(N, { coachmark: e }, `coachmark-${t}`)) }),
|
102
|
+
T
|
102
103
|
] });
|
103
104
|
};
|
104
105
|
export {
|
105
|
-
|
106
|
-
|
106
|
+
S as JourneyContext,
|
107
|
+
Q as JourneyProvider
|
107
108
|
};
|
108
109
|
//# sourceMappingURL=journey-context-provider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[]>([]);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n if (!currentJourneyId.current || journeyId !== currentJourneyId.current) {\n console.error(\n `setJourney was not called before endJourney or Journey ID is different from currentJourney,\n currentJourneyId: ${currentJourneyId.current}, New Journey Request: ${journeyId}`,\n );\n }\n setUserCompletedJourneyIds(prev => [...prev, journeyId]);\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n clearJourney();\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (id: TJourneyId, keepPrevActive: boolean = false, delayInMs: number = 0) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {coachmarkList.length > 0 && (\n <S.BlurOverlay>\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.BlurOverlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","userCompletedJourneyIds","setUserCompletedJourneyIds","useState","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.BlurOverlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAyBC,CAA0B,IAAIC,EAAuB,CAAE,CAAA,GACjF,CAACC,GAAeC,CAAgB,IAAIF,EAA4B,CAAE,CAAA,GAClE,CAACG,GAAiBC,CAAkB,IAAIJ,EAAS,EAAK,GACtDK,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CAACC,GAAgBC,MAAkC;AAC7C,UAAAhB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0BS,CAAE;AAAA,QAAA;AAGvH;AAAA,MACF;AACA,MAAAZ,EAAmB,EAAI,GACvBG,EAAiB,UAAUS,GAC3BX,EAAa,UAAU,IACNH,EAAA,CAAC,GAAGe,CAAU,CAAC;AAAA,IAClC;AAAA,IACA,CAAChB,EAAc,MAAM;AAAA,EAAA,GAGjBiB,I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;AAExF,MAAArC,EAA2BoC,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAACxB,CAAqB,CAAC,GAGvB,gBAAA0B,EAAA7C,EAAe,UAAf,EAAwB,OAAOwC,GAC7B,UAAA;AAAA,IAAA/B,EAAc,SAAS,KACtB,gBAAAqC,EAACC,GAAA,EACE,YAAc,IAAI,CAACf,GAAWgB,wBAC5BC,GAAqC,EAAA,WAAAjB,EAAA,GAAtB,aAAagB,CAAK,EAA0B,CAC7D,GACH;AAAA,IAED7C;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[]>([]);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const {\n data: userCompletedJourneys = null,\n get: getJourneyProgress,\n isProcessing,\n } = useGetUserJourney();\n\n const showCoachmarks =\n appId === '' // Otherwise coachmark stories wont work\n ? coachmarkList.length > 0\n : userCompletedJourneys && !isProcessing && coachmarkList.length > 0;\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n setUserCompletedJourneyIds(prev => [...prev, journeyId]);\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n clearJourney();\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (id: TJourneyId, keepPrevActive: boolean = false, delayInMs: number = 0) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {showCoachmarks && (\n <S.Overlay>\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","userCompletedJourneyIds","setUserCompletedJourneyIds","useState","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","isProcessing","useGetUserJourney","showCoachmarks","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","S.Overlay","index","jsx","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAyBC,CAA0B,IAAIC,EAAuB,CAAE,CAAA,GACjF,CAACC,GAAeC,CAAgB,IAAIF,EAA4B,CAAE,CAAA,GAClE,CAACG,GAAiBC,CAAkB,IAAIJ,EAAS,EAAK,GACtDK,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD;AAAA,IACJ,MAAMC,IAAwB;AAAA,IAC9B,KAAKC;AAAA,IACL,cAAAC;AAAA,MACEC,EAAkB,GAEhBC,KACJnB,MAAU,MAENe,KAAyB,CAACE,MAAgBZ,EAAc,SAAS,GAEjEe,IAAaC;AAAA,IACjB,CAACC,GAAgBC,MAAkC;AAC7C,UAAAlB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0BW,CAAE;AAAA,QAAA;AAGvH;AAAA,MACF;AACA,MAAAd,EAAmB,EAAI,GACvBG,EAAiB,UAAUW,GAC3Bb,EAAa,UAAU,IACNH,EAAA,CAAC,GAAGiB,CAAU,CAAC;AAAA,IAClC;AAAA,IACA,CAAClB,EAAc,MAAM;AAAA,EAAA,GAGjBmB,IAAeH,EAAY,MAAM;AAE3B,IAAAT,EAAA,QAAQ,QAAQ,CAASa,MAAA;AACjC,mBAAa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AAI,CAACyB,GAAWe,MAC7B,gBAAAC,EAACC,KAAqC,WAAAjB,KAAtB,aAAae,CAAK,EAA0B,CAC7D,GACH;AAAA,IAED9C;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const
|
1
|
+
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const Overlay = styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${BLUR_OVERLAY_Z_INDEX};\n`;\n"],"names":["Overlay","styled","BLUR_OVERLAY_Z_INDEX"],"mappings":";;AAIO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjBC,CAAoB;AAAA;"}
|
package/dist/index.d.ts
CHANGED
@@ -842,7 +842,6 @@ export declare interface ICircleHomeDetails {
|
|
842
842
|
tournamentRank: number;
|
843
843
|
projects: IProjects;
|
844
844
|
timestamps: ITodaysContentTimeStamps;
|
845
|
-
coachmarkProgress: ICoachmarkProgress;
|
846
845
|
}
|
847
846
|
|
848
847
|
declare interface ICircularSteps {
|
@@ -906,15 +905,6 @@ declare interface ICoachMarkCompletion {
|
|
906
905
|
CIRCLE_TABLES_INTRO_JOURNEY: boolean;
|
907
906
|
}
|
908
907
|
|
909
|
-
export declare interface ICoachmarkProgress {
|
910
|
-
CIRCLE_ACTIVITIES_INTRO_JOURNEY: boolean;
|
911
|
-
CIRCLE_LEADERBOARD_INTRO_JOURNEY: boolean;
|
912
|
-
CIRCLE_POINTS_REWARD_JOURNEY: boolean;
|
913
|
-
CIRCLE_STREAK_UPDATE_JOURNEY: boolean;
|
914
|
-
CIRCLE_TUTORIAL_JOURNEY: boolean;
|
915
|
-
CIRCLE_TABLES_INTRO_JOURNEY: boolean;
|
916
|
-
}
|
917
|
-
|
918
908
|
/**
|
919
909
|
* Represents a coachmark, an interactive guidance element positioned over an existing element.
|
920
910
|
*/
|
@@ -2168,11 +2158,6 @@ export declare interface IPointsLeaderboardDetails extends IBaseLeaderboardDetai
|
|
2168
2158
|
leaderboardPlayers: ILeaderboardPlayerWithPoints[];
|
2169
2159
|
}
|
2170
2160
|
|
2171
|
-
declare interface IPostCircleOnboardingPayload {
|
2172
|
-
intelenrollment_id: string;
|
2173
|
-
completed_coachmarks: string[];
|
2174
|
-
}
|
2175
|
-
|
2176
2161
|
export declare interface IPostGameStat {
|
2177
2162
|
type: EPostGameStat;
|
2178
2163
|
value: number;
|
@@ -5095,19 +5080,6 @@ export declare const useJourney: () => IJourneyContext;
|
|
5095
5080
|
|
5096
5081
|
export declare const usePointerSync: ({ userType, targetUserId, }: IusePointerSyncProps) => IusePointerSyncMethods;
|
5097
5082
|
|
5098
|
-
declare const usePostUpdateCircleCoachmark: (opts?: {
|
5099
|
-
onComplete?: ((errorMessage: string | null, data?: IGetCircleHomeResponseModel | undefined, permissions?: void | undefined) => void) | undefined;
|
5100
|
-
triggerOnComplete?: boolean | undefined;
|
5101
|
-
} | undefined) => {
|
5102
|
-
post: (body: IPostCircleOnboardingPayload, meta: void) => Promise<void>;
|
5103
|
-
isProcessing: boolean;
|
5104
|
-
onComplete: (() => void) | undefined;
|
5105
|
-
};
|
5106
|
-
|
5107
|
-
export declare const usePostUpdateCircleJourneyDal: () => Omit<ReturnType<typeof usePostUpdateCircleCoachmark>, "data" | "post"> & {
|
5108
|
-
postCircleJourneyCompletion: (userId: string, journeyCompletionIds: TJourneyId[]) => void;
|
5109
|
-
};
|
5110
|
-
|
5111
5083
|
export declare const User2Icon: React.FC<React.SVGProps<SVGSVGElement>>;
|
5112
5084
|
|
5113
5085
|
export declare const UserIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
package/dist/index.js
CHANGED
@@ -20,7 +20,7 @@ import { default as U } 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 w } from "./assets/line-icons/icons/clock2.js";
|
22
22
|
import { default as Y } from "./assets/line-icons/icons/code.js";
|
23
|
-
import { default as
|
23
|
+
import { default as F } from "./assets/line-icons/icons/copy.js";
|
24
24
|
import { default as j } from "./assets/line-icons/icons/cross.js";
|
25
25
|
import { default as q } from "./assets/line-icons/icons/cue-rocket.js";
|
26
26
|
import { default as X } from "./assets/line-icons/icons/dash-arrow.js";
|
@@ -47,7 +47,7 @@ import { default as Ue } from "./assets/line-icons/icons/minus.js";
|
|
47
47
|
import { default as We } from "./assets/line-icons/icons/minus2.js";
|
48
48
|
import { default as we } from "./assets/line-icons/icons/mistake.js";
|
49
49
|
import { default as Ye } from "./assets/line-icons/icons/mobile.js";
|
50
|
-
import { default as
|
50
|
+
import { default as Fe } from "./assets/line-icons/icons/more-vertical.js";
|
51
51
|
import { default as je } from "./assets/line-icons/icons/next.js";
|
52
52
|
import { default as qe } from "./assets/line-icons/icons/pencil.js";
|
53
53
|
import { default as Xe } from "./assets/line-icons/icons/pointer.js";
|
@@ -73,8 +73,8 @@ import { default as bo } from "./assets/line-icons/icons/switch-icon.js";
|
|
73
73
|
import { default as vo } from "./assets/line-icons/icons/tick.js";
|
74
74
|
import { default as Vo } from "./assets/line-icons/icons/trophy.js";
|
75
75
|
import { default as Qo } from "./assets/line-icons/icons/undo.js";
|
76
|
-
import { default as
|
77
|
-
import { default as
|
76
|
+
import { default as Ko } from "./assets/line-icons/icons/unlock.js";
|
77
|
+
import { default as Jo } from "./assets/line-icons/icons/up.js";
|
78
78
|
import { default as Zo } from "./assets/line-icons/icons/user.js";
|
79
79
|
import { default as zo } from "./assets/line-icons/icons/user2.js";
|
80
80
|
import { default as $o, default as er } from "./assets/line-icons/icons/sketch.js";
|
@@ -100,7 +100,7 @@ import { default as Ur } from "./features/ui/buttons/clickable/clickable.js";
|
|
100
100
|
import { default as Wr } from "./features/ui/buttons/icon-button/icon-button.js";
|
101
101
|
import { default as wr } from "./features/ui/buttons/text-button/text-button.js";
|
102
102
|
import { ArcButton as Yr } from "./features/ui/arc-button/arc-button.js";
|
103
|
-
import { default as
|
103
|
+
import { default as Fr } from "./features/ui/error/error.js";
|
104
104
|
import { default as jr } from "./features/ui/inputs/checkbox-input/checkbox-input.js";
|
105
105
|
import { default as qr } from "./features/ui/inputs/checkbox-input-list/checkbox-input-list.js";
|
106
106
|
import { default as Xr } from "./features/ui/inputs/radio-input/radio-input.js";
|
@@ -126,8 +126,8 @@ import { default as bt } from "./features/ui/hooks/use-context-menu-click-handle
|
|
126
126
|
import { getTheme as vt } from "./features/ui/theme/get-theme.js";
|
127
127
|
import { default as Vt } from "./features/ui/avatar/avatar.js";
|
128
128
|
import { default as Qt } from "./features/ui/time-left-timeline/time-left-timeline.js";
|
129
|
-
import { default as
|
130
|
-
import { default as
|
129
|
+
import { default as Kt } from "./features/ui/tab/tab.js";
|
130
|
+
import { default as Jt } from "./features/ui/streak-icon/streak-icon.js";
|
131
131
|
import { default as Zt } from "./features/ui/separator/separator.js";
|
132
132
|
import { default as zt } from "./features/ui/video/index.js";
|
133
133
|
import { default as $t } from "./features/ui/perfect-hits/perfect-hits.js";
|
@@ -153,86 +153,85 @@ import { Tutorial as ba } from "./features/circle-games/games/tutorial/tutorial.
|
|
153
153
|
import { WebView as va } from "./features/circle-games/games/web-view/web-view.js";
|
154
154
|
import { ProjectOutcome as Va } from "./features/circle-games/games/web-view/enums/project-outcomes-enum.js";
|
155
155
|
import { WebViewEvent as Qa } from "./features/circle-games/games/web-view/enums/web-view-events-enum.js";
|
156
|
-
import { ProjectType as
|
157
|
-
import { PlayerType as
|
156
|
+
import { ProjectType as Ka } from "./features/circle-games/games/web-view/enums/project-type-enum.js";
|
157
|
+
import { PlayerType as Ja } from "./features/circle-games/games/web-view/enums/player-type-enum.js";
|
158
158
|
import { IStatsToAwardErrorCode as Za } from "./features/circle-games/games/web-view/web-view-types.js";
|
159
159
|
import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as za } from "./features/circle-games/enum/circle-onboarding-steps.js";
|
160
160
|
import { CIRCLE_ACTION_IDS as $a } from "./features/circle-games/enum/circle-action-ids.js";
|
161
161
|
import { GameLauncher as of } from "./features/circle-games/game-launcher/game-launcher.js";
|
162
162
|
import { useGetCircleHomeDetailsDal as tf } from "./features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js";
|
163
|
-
import {
|
164
|
-
import {
|
165
|
-
import {
|
166
|
-
import {
|
167
|
-
import {
|
168
|
-
import { default as Tf } from "./features/cue-canvas/
|
169
|
-
import { default as Sf } from "./features/cue-canvas/
|
170
|
-
import { default as Af } from "./features/cue-canvas/
|
171
|
-
import { default as Pf } from "./features/
|
172
|
-
import { default as Lf } from "./features/communication/hooks/use-
|
173
|
-
import {
|
174
|
-
import {
|
175
|
-
import {
|
176
|
-
import {
|
177
|
-
import {
|
178
|
-
import {
|
179
|
-
import { default as Wf } from "./features/
|
180
|
-
import {
|
181
|
-
import {
|
182
|
-
import {
|
183
|
-
import {
|
184
|
-
import {
|
185
|
-
import {
|
186
|
-
import {
|
187
|
-
import {
|
188
|
-
import { default as as } from "./features/milestone/create/
|
189
|
-
import { default as ss } from "./features/milestone/create/comps/confirmation-modals/
|
190
|
-
import { default as ps } from "./features/milestone/create/
|
191
|
-
import { default as us } from "./features/milestone/
|
192
|
-
import { default as ds } from "./features/milestone/
|
193
|
-
import { default as cs } from "./features/milestone/outcome/
|
194
|
-
import { default as is } from "./features/milestone/outcome/comps/achievement/
|
195
|
-
import { default as Es } from "./features/milestone/
|
196
|
-
import { default as Cs } from "./features/milestone/edit/
|
197
|
-
import { default as _s } from "./features/milestone/edit/
|
198
|
-
import { default as hs } from "./features/milestone/
|
199
|
-
import { default as ks } from "./features/milestone/milestone-
|
200
|
-
import { default as Ns } from "./features/milestone/
|
201
|
-
import { default as Rs } from "./features/milestone/
|
202
|
-
import { default as Ds } from "./features/milestone/milestone-
|
203
|
-
import {
|
204
|
-
import {
|
205
|
-
import {
|
206
|
-
import {
|
207
|
-
import {
|
208
|
-
import { default as js } from "./features/pointer-sync/pointer.js";
|
209
|
-
import {
|
210
|
-
import {
|
211
|
-
import {
|
212
|
-
import {
|
213
|
-
import { default as al } from "./features/sheet-tools/
|
214
|
-
import { default as sl } from "./features/
|
215
|
-
import { default as pl } from "./features/sheets/
|
216
|
-
import {
|
217
|
-
import {
|
218
|
-
import {
|
219
|
-
import { default as Nl } from "./features/
|
220
|
-
import {
|
221
|
-
import {
|
222
|
-
import {
|
223
|
-
import { default as vl } from "./features/worksheet/worksheet/worksheet-
|
224
|
-
import { default as Vl } from "./features/worksheet/worksheet
|
225
|
-
import { default as Ql } from "./features/worksheet/worksheet/worksheet-permissions/
|
226
|
-
import { default as
|
227
|
-
import { default as
|
228
|
-
import { default as Zl } from "./features/worksheet/
|
229
|
-
import { default as zl } from "./features/
|
230
|
-
import { default as $l } from "./features/maintenance/maintenance.js";
|
163
|
+
import { Leaderboard as ff } from "./features/circle-games/leaderboard/leaderboard.js";
|
164
|
+
import { BackgroundImage as lf, CircularSteps as pf } from "./features/circle-games/sign-up/comp/circular-steps/circular-steps.js";
|
165
|
+
import { SplashScreen as uf } from "./features/circle-games/sign-up/comp/splash-screen/splash-screen.js";
|
166
|
+
import { SignUp as df } from "./features/circle-games/sign-up/sign-up.js";
|
167
|
+
import { default as cf } from "./features/cue-canvas/cue-canvas-provider.js";
|
168
|
+
import { default as Tf } from "./features/cue-canvas/toolbar/toolbar.js";
|
169
|
+
import { default as Sf } from "./features/cue-canvas/cue-canvas.js";
|
170
|
+
import { default as Af } from "./features/cue-canvas/hooks/use-canvas-sync-broker.js";
|
171
|
+
import { default as Pf } from "./features/communication/hooks/use-inclass-message-broker/use-inclass-message-broker.js";
|
172
|
+
import { default as Lf } from "./features/communication/hooks/use-trial-session-message-broker/use-trial-session-message-broker.js";
|
173
|
+
import { EVENTS as Mf } from "./features/communication/pub-sub/constants.js";
|
174
|
+
import { useInClassActionDispatcher as Of, useInClassActionListener as Rf } from "./features/communication/pub-sub/hooks.js";
|
175
|
+
import { default as Df } from "./features/trial-session/trial-session.js";
|
176
|
+
import { EClassTimeAlertLevel as yf } from "./features/trial-session/trial-session-types.js";
|
177
|
+
import { useClassTimeAlerts as Bf } from "./features/trial-session/hooks/use-class-time-alerts.js";
|
178
|
+
import { default as Uf } from "./features/talk-meter/talk-meter.js";
|
179
|
+
import { default as Wf } from "./features/extra-practice/extra-practice.js";
|
180
|
+
import { useAutoPlayPermission as wf } from "./features/hooks/use-auto-play-permission/use-auto-play-permission.js";
|
181
|
+
import { JOURNEY_ID_STUDENT as Yf } from "./features/journey/journey-id/journey-id-student.js";
|
182
|
+
import { useJourney as Ff } from "./features/journey/use-journey/use-journey.js";
|
183
|
+
import { useGetEligibleJourneysViaRoute as jf } from "./features/journey/hooks/use-get-eligible-journeys-via-route.js";
|
184
|
+
import { JourneyProvider as qf } from "./features/journey/use-journey/journey-context-provider.js";
|
185
|
+
import { IndicatorType as Xf } from "./features/journey/use-journey/constants.js";
|
186
|
+
import { Coachmark as es } from "./features/journey/comps/coachmark/coachmark.js";
|
187
|
+
import { default as rs } from "./features/milestone/create/submit-modal/submit-modal.js";
|
188
|
+
import { default as as } from "./features/milestone/create/comps/confirmation-modals/goal-creation-confirmation.js";
|
189
|
+
import { default as ss } from "./features/milestone/create/comps/confirmation-modals/chapter-clearance-confirmation.js";
|
190
|
+
import { default as ps } from "./features/milestone/create/milestone-create-container.js";
|
191
|
+
import { default as us } from "./features/milestone/edit/goal-drafts/goal-draft-edit-container.js";
|
192
|
+
import { default as ds } from "./features/milestone/outcome/milestone-outcome-container.js";
|
193
|
+
import { default as cs } from "./features/milestone/outcome/comps/achievement/reason-submit-modal.js";
|
194
|
+
import { default as is } from "./features/milestone/outcome/comps/achievement/share-instructions-modal.js";
|
195
|
+
import { default as Es } from "./features/milestone/edit/comps/edit-milestone-modal/index.js";
|
196
|
+
import { default as Cs } from "./features/milestone/edit/goal-edit-container.js";
|
197
|
+
import { default as _s } from "./features/milestone/edit/milestone-edit-container.js";
|
198
|
+
import { default as hs } from "./features/milestone/milestone-list-container/milestone-list-container.js";
|
199
|
+
import { default as ks } from "./features/milestone/milestone-action-widget/milestone-action-widget.js";
|
200
|
+
import { default as Ns } from "./features/milestone/start/milestone-start.js";
|
201
|
+
import { default as Rs } from "./features/milestone/milestone-tests/tests-creation/tests-creation.js";
|
202
|
+
import { default as Ds } from "./features/milestone/milestone-resources/resources-assign/resources-assign.js";
|
203
|
+
import { ACHIEVEMENT_ACTIONS as ys, STAGES as gs } from "./features/milestone/outcome/milestone-outcome-constants.js";
|
204
|
+
import { invalidateMilestonesData as bs, useGetAllMilestonesdata as Us } from "./features/milestone/milestone-list-container/api/get-milestones.js";
|
205
|
+
import { invalidateTestHelpData as Ws, useGetTestHelpData as Vs } from "./features/milestone/milestone-list-container/api/get-tests-list.js";
|
206
|
+
import { invalidateMilestoneResources as Qs, useGetMilestoneResources as Ys } from "./features/milestone/milestone-list-container/api/get-milestone-resources.js";
|
207
|
+
import { default as Fs } from "./features/pointer-sync/pointer.js";
|
208
|
+
import { default as js } from "./features/pointer-sync/hooks/use-pointer-sync.js";
|
209
|
+
import { DigitalMeter as qs } from "./features/post-game-stats/digital-meter/digital-meter.js";
|
210
|
+
import { EPostGameStat as Xs } from "./features/post-game-stats/enums/post-game-stats-enum.js";
|
211
|
+
import { PostGameStats as el } from "./features/post-game-stats/post-game-stats.js";
|
212
|
+
import { default as rl } from "./features/sheet-tools/desmos-calculator/desmos-calculator.js";
|
213
|
+
import { default as al } from "./features/sheet-tools/tool-header/tool-header.js";
|
214
|
+
import { default as sl } from "./features/sheets/sheets-list/sheets-list.js";
|
215
|
+
import { default as pl } from "./features/sheets/reference-sheet/reference-sheet.js";
|
216
|
+
import { isV3Worksheet as ul, isV3WorksheetAttempt as xl } from "./features/sheets/utils/is-v3-worksheet.js";
|
217
|
+
import { COMPLETED_SHEET_STATE as nl, NODE_LABELS as cl, NODE_SUB_GROUP as Il, NODE_TYPE as il, PYTHON_NODE_TYPES as Tl, REWARDS_LIST as El, SHEET_ACTIONS as Sl, SHEET_ATTEMPT_LOCATION as Cl, SHEET_ATTEMPT_LOCATION_MAP as Al, SHEET_ATTEMPT_STATE as _l, SHEET_DATA_TYPE as Pl, SHEET_STATE as hl } from "./features/sheets/constants/sheet.js";
|
218
|
+
import { default as kl } from "./features/student-details/student-details.js";
|
219
|
+
import { default as Nl } from "./features/utils/load-script.js";
|
220
|
+
import { ACTION_BAR_HEIGHT as Rl, QUESTIONS_GAP as Hl, QUESTION_WIDTH as Dl, TOP_NAVIGATION_HEIGHT as Gl } from "./features/worksheet/worksheet/constants.js";
|
221
|
+
import { isOkayTypeQuestion as gl } from "./features/worksheet/worksheet/worksheet-helpers.js";
|
222
|
+
import { default as bl } from "./features/worksheet/worksheet/worksheet-container.js";
|
223
|
+
import { default as vl } from "./features/worksheet/worksheet-preview/worksheet-preview.js";
|
224
|
+
import { default as Vl } from "./features/worksheet/worksheet/worksheet-permissions/sheet-locked.js";
|
225
|
+
import { default as Ql } from "./features/worksheet/worksheet/worksheet-permissions/error.js";
|
226
|
+
import { default as Kl } from "./features/worksheet/learnosity-preloader/learnosity-preloader.js";
|
227
|
+
import { default as Jl } from "./features/worksheet/learnosity-preloader/use-is-learnosity-loaded.js";
|
228
|
+
import { default as Zl } from "./features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js";
|
229
|
+
import { default as zl } from "./features/maintenance/maintenance.js";
|
231
230
|
export {
|
232
|
-
|
231
|
+
ys as ACHIEVEMENT_ACTIONS,
|
233
232
|
kr as AccordionSection,
|
234
|
-
|
235
|
-
|
233
|
+
cs as AchievementNotShareReasonModal,
|
234
|
+
is as AchievementShareInstructionModal,
|
236
235
|
d as AlertIcon,
|
237
236
|
Et as AppLoader,
|
238
237
|
Yr as ArcButton,
|
@@ -241,7 +240,7 @@ export {
|
|
241
240
|
Vt as Avatar,
|
242
241
|
rr as Back2Icon,
|
243
242
|
c as BackIcon,
|
244
|
-
|
243
|
+
lf as BackgroundImage,
|
245
244
|
E as Bin2Icon,
|
246
245
|
i as BinIcon,
|
247
246
|
h as Book2Icon,
|
@@ -253,12 +252,12 @@ export {
|
|
253
252
|
Br as Button,
|
254
253
|
$a as CIRCLE_ACTION_IDS,
|
255
254
|
za as CIRCLE_ONBOARDING_ANALYTICS_STEPS,
|
256
|
-
|
255
|
+
nl as COMPLETED_SHEET_STATE,
|
257
256
|
D as CalendarIcon,
|
258
257
|
Rt as Callout,
|
259
258
|
pt as CascadingSelectInput,
|
260
259
|
xa as Chapter,
|
261
|
-
|
260
|
+
ss as ChapterClearanceConfirmationModal,
|
262
261
|
na as ChaptersList,
|
263
262
|
cr as ChatIcon,
|
264
263
|
B as Check2Icon,
|
@@ -270,41 +269,41 @@ export {
|
|
270
269
|
ar as ChevronRightIcon,
|
271
270
|
Oa as CircleSoundKey,
|
272
271
|
Ct as CircularLoader,
|
273
|
-
|
272
|
+
pf as CircularSteps,
|
274
273
|
Ur as Clickable,
|
275
274
|
U as ClipboardIcon,
|
276
275
|
w as Clock2Icon,
|
277
276
|
W as ClockIcon,
|
278
|
-
|
277
|
+
es as Coachmark,
|
279
278
|
Y as CodeIcon,
|
280
279
|
Rr as ContextMenu,
|
281
|
-
|
280
|
+
F as CopyIcon,
|
282
281
|
Dr as CountdownTimer,
|
283
282
|
j as CrossIcon,
|
284
|
-
|
285
|
-
|
286
|
-
|
283
|
+
Sf as CueCanvas,
|
284
|
+
Tf as CueCanvasController,
|
285
|
+
cf as CueCanvasProvider,
|
287
286
|
q as CueRocket,
|
288
287
|
ir as CuemathLogo,
|
289
288
|
X as DashArrowIcon,
|
290
|
-
|
291
|
-
|
289
|
+
rl as DesmosCalculator,
|
290
|
+
qs as DigitalMeter,
|
292
291
|
ee as DownIcon,
|
293
292
|
re as DraftIcon,
|
294
293
|
ae as DragIcon,
|
295
|
-
|
294
|
+
yf as EClassTimeAlertLevel,
|
296
295
|
Ga as ELeaderboardType,
|
297
|
-
|
298
|
-
|
299
|
-
|
296
|
+
Ds as EPResourceAssign,
|
297
|
+
Xs as EPostGameStat,
|
298
|
+
Mf as EVENTS,
|
300
299
|
pe as Edit2Icon,
|
301
300
|
se as EditIcon,
|
302
|
-
|
301
|
+
Es as EditMilestoneModal,
|
303
302
|
ue as EditStarIcon,
|
304
303
|
de as EraserIcon,
|
305
|
-
|
306
|
-
|
307
|
-
|
304
|
+
Fr as Error,
|
305
|
+
al as ExpandableHeader,
|
306
|
+
Wf as ExtraPractice,
|
308
307
|
ie as Eye2Icon,
|
309
308
|
ce as EyeIcon,
|
310
309
|
it as FlexView,
|
@@ -312,9 +311,9 @@ export {
|
|
312
311
|
La as GAME_LAUNCHER_SIZE,
|
313
312
|
ur as GameIcon,
|
314
313
|
of as GameLauncher,
|
315
|
-
|
316
|
-
|
317
|
-
|
314
|
+
as as GoalCreationConfirmationModal,
|
315
|
+
us as GoalDraftEdit,
|
316
|
+
Cs as GoalEdit,
|
318
317
|
at as GooglePlacesSearchInput,
|
319
318
|
r as GradeSelector,
|
320
319
|
Ee as HandIcon,
|
@@ -326,75 +325,75 @@ export {
|
|
326
325
|
Za as IStatsToAwardErrorCode,
|
327
326
|
Wr as IconButton,
|
328
327
|
ke as ImageIcon,
|
329
|
-
|
328
|
+
Xf as IndicatorType,
|
330
329
|
Re as Info2Icon,
|
331
330
|
Ne as InfoIcon,
|
332
|
-
|
333
|
-
|
331
|
+
Yf as JOURNEY_ID_STUDENT,
|
332
|
+
qf as JourneyProvider,
|
334
333
|
u as LOTTIE,
|
335
334
|
Ia as LPARChapter,
|
336
335
|
Ta as LPARMilestoneChapter,
|
337
|
-
|
338
|
-
|
336
|
+
ff as Leaderboard,
|
337
|
+
Kl as LearnosityPreloader,
|
339
338
|
De as LeftIcon,
|
340
339
|
Be as Lock2Icon,
|
341
340
|
ye as LockIcon,
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
341
|
+
zl as Maintenance,
|
342
|
+
ks as MilestoneActionWidget,
|
343
|
+
ps as MilestoneCreate,
|
344
|
+
_s as MilestoneEdit,
|
345
|
+
hs as MilestoneList,
|
346
|
+
ds as MilestoneOutcome,
|
347
|
+
Ns as MilestoneStart,
|
349
348
|
We as Minus2Icon,
|
350
349
|
Ue as MinusIcon,
|
351
350
|
we as MistakeIcon,
|
352
351
|
Ye as Mobile,
|
353
|
-
|
352
|
+
Fe as MoreVerticalIcon,
|
354
353
|
ma as MultiTabBlocker,
|
355
|
-
|
356
|
-
|
357
|
-
|
354
|
+
cl as NODE_LABELS,
|
355
|
+
Il as NODE_SUB_GROUP,
|
356
|
+
il as NODE_TYPE,
|
358
357
|
Er as Next2Icon,
|
359
358
|
je as NextIcon,
|
360
359
|
yr as Nudge,
|
361
360
|
ut as NumRangeInput,
|
362
361
|
oa as PLATFORM_EVENTS_STUDENT,
|
363
362
|
ta as PLATFORM_EVENTS_TEACHER,
|
364
|
-
|
363
|
+
Tl as PYTHON_NODE_TYPES,
|
365
364
|
qe as PencilIcon,
|
366
365
|
dt as PercentileInput,
|
367
366
|
$t as PerfectHits,
|
368
367
|
ro as Play2Icon,
|
369
368
|
eo as PlayIcon,
|
370
|
-
|
369
|
+
Ja as PlayerType,
|
371
370
|
so as Plus2Icon,
|
372
371
|
ao as PlusIcon,
|
373
372
|
Xe as PointerIcon,
|
374
|
-
|
373
|
+
el as PostGameStats,
|
375
374
|
po as PracticeIcon,
|
376
|
-
|
375
|
+
vl as PreviewWorksheet,
|
377
376
|
uo as ProgressIcon,
|
378
377
|
Va as ProjectOutcome,
|
379
|
-
|
378
|
+
Ka as ProjectType,
|
380
379
|
no as QuestionIcon,
|
381
380
|
Io as QuestionLetterIcon,
|
382
|
-
|
381
|
+
El as REWARDS_LIST,
|
383
382
|
_t as RadioCard,
|
384
383
|
Xr as RadioInput,
|
385
384
|
To as RedoIcon,
|
386
|
-
|
387
|
-
|
385
|
+
pl as ReferenceSheet,
|
386
|
+
Fs as RemotePeerPointer,
|
388
387
|
So as RightIcon,
|
389
388
|
Ao as RulerIcon,
|
390
389
|
Sa as SATSheetSummary,
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
390
|
+
Sl as SHEET_ACTIONS,
|
391
|
+
Cl as SHEET_ATTEMPT_LOCATION,
|
392
|
+
Al as SHEET_ATTEMPT_LOCATION_MAP,
|
393
|
+
_l as SHEET_ATTEMPT_STATE,
|
394
|
+
Pl as SHEET_DATA_TYPE,
|
395
|
+
hl as SHEET_STATE,
|
396
|
+
gs as STAGES,
|
398
397
|
$o as ScribbleIcon,
|
399
398
|
Po as SearchIcon,
|
400
399
|
rt as SearchableSelectInput,
|
@@ -402,85 +401,84 @@ export {
|
|
402
401
|
et as SelectInput,
|
403
402
|
ct as SelectionCards,
|
404
403
|
Zt as Separator,
|
405
|
-
|
404
|
+
Ql as SheetError,
|
406
405
|
Lo as SheetIcon,
|
407
|
-
|
408
|
-
|
409
|
-
|
406
|
+
sl as SheetList,
|
407
|
+
Vl as SheetLocked,
|
408
|
+
df as SignUp,
|
410
409
|
er as SketchIcon,
|
411
410
|
Ho as Skip2Icon,
|
412
411
|
Oo as SkipIcon,
|
413
|
-
|
412
|
+
uf as SplashScreen,
|
414
413
|
Go as Star2Icon,
|
415
414
|
Mo as StarIcon,
|
416
415
|
a as Stepper,
|
417
|
-
|
416
|
+
Jt as StreakIcon,
|
418
417
|
ga as StreakReductionLocalStorageUtil,
|
419
418
|
go as StrikedEyeIcon,
|
420
|
-
|
421
|
-
|
419
|
+
kl as StudentDetails,
|
420
|
+
rs as SubmitMilestoneModal,
|
422
421
|
bo as SwitchIcon,
|
423
|
-
|
422
|
+
Kt as TabComponent,
|
424
423
|
Nt as Tag,
|
425
|
-
|
426
|
-
|
424
|
+
Uf as TalkMeter,
|
425
|
+
Rs as TestsCreation,
|
427
426
|
kt as Text,
|
428
427
|
wr as TextButton,
|
429
428
|
st as TextInput,
|
430
429
|
vo as TickIcon,
|
431
430
|
Qt as TimeLeftTimeline,
|
432
|
-
|
431
|
+
Df as TrialSession,
|
433
432
|
Vo as TrophyIcon,
|
434
433
|
ba as Tutorial,
|
435
434
|
dr as TutoringIcon,
|
436
435
|
Dt as UIContext,
|
437
436
|
Qo as UndoIcon,
|
438
|
-
|
439
|
-
|
437
|
+
Ko as UnlockIcon,
|
438
|
+
Jo as UpIcon,
|
440
439
|
zo as User2Icon,
|
441
440
|
Zo as UserIcon,
|
442
441
|
zt as Video,
|
443
442
|
fa as WHITELIST_EVENTS,
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
443
|
+
Rl as WORKSHEET_ACTION_BAR_HEIGHT,
|
444
|
+
Hl as WORKSHEET_QUESTIONS_GAP,
|
445
|
+
Dl as WORKSHEET_QUESTION_WIDTH,
|
446
|
+
Gl as WORKSHEET_TOP_NAVIGATION_HEIGHT,
|
448
447
|
va as WebView,
|
449
448
|
Qa as WebViewEvent,
|
450
|
-
|
449
|
+
bl as Worksheet,
|
451
450
|
Aa as checkIfPPTNodeType,
|
452
451
|
vt as getTheme,
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
452
|
+
Qs as invalidateMilestoneResources,
|
453
|
+
bs as invalidateMilestonesData,
|
454
|
+
Ws as invalidateTestHelpData,
|
455
|
+
gl as isOkayTypeQuestion,
|
456
|
+
ul as isV3Worksheet,
|
457
|
+
xl as isV3WorksheetAttempt,
|
458
|
+
Nl as loadScript,
|
459
|
+
wf as useAutoPlayPermission,
|
460
|
+
Af as useCanvasSyncBroker,
|
462
461
|
Ma as useCircleSounds,
|
463
|
-
|
462
|
+
Bf as useClassTimeAlerts,
|
464
463
|
bt as useContextMenuClickHandler,
|
465
464
|
hr as useForceReload,
|
466
|
-
|
465
|
+
Us as useGetAllMilestonesdata,
|
467
466
|
tf as useGetCircleHomeDetailsDal,
|
468
|
-
|
467
|
+
jf as useGetEligibleJourneysViaRoute,
|
469
468
|
Ha as useGetLeaderboardDal,
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
469
|
+
Ys as useGetMilestoneResources,
|
470
|
+
Vs as useGetTestHelpData,
|
471
|
+
Of as useInClassActionDispatcher,
|
472
|
+
Rf as useInClassActionListener,
|
473
|
+
Pf as useInClassMessageBroker,
|
474
|
+
Jl as useIsLearnosityLoaded,
|
476
475
|
la as useIsTabBlocked,
|
477
|
-
|
478
|
-
|
479
|
-
ff as usePostUpdateCircleJourneyDal,
|
476
|
+
Ff as useJourney,
|
477
|
+
js as usePointerSync,
|
480
478
|
gt as useTrackingContext,
|
481
|
-
|
479
|
+
Lf as useTrialSessionMessageBroker,
|
482
480
|
Gt as useUIContext,
|
483
|
-
|
481
|
+
Zl as useWorksheetLayout,
|
484
482
|
_r as useZoomDisable
|
485
483
|
};
|
486
484
|
//# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
package/dist/features/circle-games/game-launcher/api/update-circle-onboarding/constants.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/api/update-circle-onboarding/constants.ts"],"sourcesContent":["export const BASE_URL = '/api/v1/circle';\n"],"names":["BASE_URL"],"mappings":"AAAO,MAAMA,IAAW;"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { createPostAPI as o } from "@cuemath/rest-api";
|
2
|
-
import { BASE_URL as t } from "./constants.js";
|
3
|
-
const { usePost: a } = o({
|
4
|
-
getURL: () => `${t}/coachmark/`
|
5
|
-
});
|
6
|
-
export {
|
7
|
-
a as usePostUpdateCircleCoachmark
|
8
|
-
};
|
9
|
-
//# sourceMappingURL=post-circle-coachmark-api.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"post-circle-coachmark-api.js","sources":["../../../../../../src/features/circle-games/game-launcher/api/update-circle-onboarding/post-circle-coachmark-api.ts"],"sourcesContent":["import type { IGetCircleHomeResponseModel } from '../get-content-for-today/get-circle-home-api-types';\nimport type { IPostCircleOnboardingPayload } from './post-circle-coachmark-api-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL } from './constants';\n\nexport const { usePost: usePostUpdateCircleCoachmark } = createPostAPI<\n IGetCircleHomeResponseModel,\n IPostCircleOnboardingPayload\n>({\n getURL: () => `${BASE_URL}/coachmark/`,\n});\n"],"names":["usePostUpdateCircleCoachmark","createPostAPI","BASE_URL"],"mappings":";;AAOO,MAAM,EAAE,SAASA,EAA6B,IAAIC,EAGvD;AAAA,EACA,QAAQ,MAAM,GAAGC,CAAQ;AAC3B,CAAC;"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { useCallback as n } from "react";
|
2
|
-
import { usePostUpdateCircleCoachmark as a } from "../../api/update-circle-onboarding/post-circle-coachmark-api.js";
|
3
|
-
const p = () => {
|
4
|
-
const {
|
5
|
-
post: o,
|
6
|
-
isProcessing: e,
|
7
|
-
onComplete: t,
|
8
|
-
...r
|
9
|
-
} = a(), s = n(
|
10
|
-
(c, l) => {
|
11
|
-
o({
|
12
|
-
intelenrollment_id: c,
|
13
|
-
completed_coachmarks: l
|
14
|
-
});
|
15
|
-
},
|
16
|
-
[o]
|
17
|
-
);
|
18
|
-
return { ...r, isProcessing: e, onComplete: t, postCircleJourneyCompletion: s };
|
19
|
-
};
|
20
|
-
export {
|
21
|
-
p as usePostUpdateCircleJourneyDal
|
22
|
-
};
|
23
|
-
//# sourceMappingURL=use-post-update-circle-journey-dal.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"use-post-update-circle-journey-dal.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-post-update-circle-journey-dal/use-post-update-circle-journey-dal.ts"],"sourcesContent":["import type { TJourneyId } from '../../../../journey/journey-id/journey-id-types';\n\nimport { useCallback } from 'react';\n\nimport { usePostUpdateCircleCoachmark } from '../../api/update-circle-onboarding/post-circle-coachmark-api';\n\nexport const usePostUpdateCircleJourneyDal = (): Omit<\n ReturnType<typeof usePostUpdateCircleCoachmark>,\n 'data' | 'post'\n> & {\n postCircleJourneyCompletion: (userId: string, journeyCompletionIds: TJourneyId[]) => void;\n} => {\n const {\n post: postCircleCoachmark,\n isProcessing,\n onComplete,\n ...rest\n } = usePostUpdateCircleCoachmark();\n\n const postCircleJourneyCompletion = useCallback(\n (userId: string, journeyCompletionIds: TJourneyId[]) => {\n postCircleCoachmark({\n intelenrollment_id: userId,\n completed_coachmarks: journeyCompletionIds,\n });\n },\n [postCircleCoachmark],\n );\n\n return { ...rest, isProcessing, onComplete, postCircleJourneyCompletion };\n};\n"],"names":["usePostUpdateCircleJourneyDal","postCircleCoachmark","isProcessing","onComplete","rest","usePostUpdateCircleCoachmark","postCircleJourneyCompletion","useCallback","userId","journeyCompletionIds"],"mappings":";;AAMO,MAAMA,IAAgC,MAKxC;AACG,QAAA;AAAA,IACJ,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,MACDC,EAA6B,GAE3BC,IAA8BC;AAAA,IAClC,CAACC,GAAgBC,MAAuC;AAClC,MAAAR,EAAA;AAAA,QAClB,oBAAoBO;AAAA,QACpB,sBAAsBC;AAAA,MAAA,CACvB;AAAA,IACH;AAAA,IACA,CAACR,CAAmB;AAAA,EAAA;AAGtB,SAAO,EAAE,GAAGG,GAAM,cAAAF,GAAc,YAAAC,GAAY,6BAAAG,EAA4B;AAC1E;"}
|