@cuemath/leap 3.2.15-link.0 → 3.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +0 -6
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/cue-board-filled.js +33 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board.js +23 -0
- package/dist/assets/line-icons/icons/cue-board.js.map +1 -0
- package/dist/assets/line-icons/icons/hint-fill.js +35 -0
- package/dist/assets/line-icons/icons/hint-fill.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js +35 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab.js +23 -0
- package/dist/assets/line-icons/icons/screen-grab.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker-filled.js +64 -0
- package/dist/assets/line-icons/icons/sticker-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker.js +46 -0
- package/dist/assets/line-icons/icons/sticker.js.map +1 -0
- package/dist/assets/lottie/lottie.js +1 -11
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +13 -18
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +47 -54
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +17 -29
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +10 -22
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +5 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +7 -7
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +29 -28
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +2 -2
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +73 -72
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +6 -4
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +81 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-view.js +120 -0
- package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app.js +62 -0
- package/dist/features/puzzles/app/puzzle-app.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +50 -7
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +69 -15
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +6 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +12 -60
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +72 -77
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +63 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +21 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -0
- package/dist/features/ui/image/image.js +1 -1
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +18 -19
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +8 -43
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +27 -37
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +14 -7
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +13 -12
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/ui/text/text.js +29 -31
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +78 -78
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +24 -24
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/index.d.ts +38 -151
- package/dist/index.js +516 -530
- package/dist/index.js.map +1 -1
- package/dist/static/nudge-tap.0591aef4.json +1 -0
- package/package.json +3 -2
- package/dist/assets/line-icons/icons/after-noon.js +0 -34
- package/dist/assets/line-icons/icons/after-noon.js.map +0 -1
- package/dist/assets/line-icons/icons/apple-icon-white.js +0 -42
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +0 -1
- package/dist/assets/line-icons/icons/evening.js +0 -35
- package/dist/assets/line-icons/icons/evening.js.map +0 -1
- package/dist/assets/line-icons/icons/morning.js +0 -35
- package/dist/assets/line-icons/icons/morning.js.map +0 -1
- package/dist/assets/line-icons/icons/star3.js +0 -32
- package/dist/assets/line-icons/icons/star3.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +0 -9
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +0 -65
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +0 -92
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +0 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -34
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +0 -22
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +0 -1
- package/dist/features/auth/comps/otp-input/otp-input.js +0 -51
- package/dist/features/auth/comps/otp-input/otp-input.js.map +0 -1
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +0 -44
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +0 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +0 -75
- package/dist/features/auth/comps/pill-button/pill-button.js.map +0 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +0 -17
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +0 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +0 -67
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +0 -1
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +0 -19
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +0 -1
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +0 -32
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +0 -1
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +0 -44
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +0 -1
- package/dist/features/auth/signup-v2/signup-header/signup-header.js +0 -54
- package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +0 -1
- package/dist/features/auth/signup-v2/signup-options/signup-options.js +0 -83
- package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +0 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +0 -49
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +0 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +0 -64
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +0 -1
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +0 -28
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +0 -1
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +0 -83
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +0 -1
- package/dist/features/ui/accordion/accordion.js +0 -62
- package/dist/features/ui/accordion/accordion.js.map +0 -1
- package/dist/static/animated-avatar.1ad58b1d.json +0 -1
- package/dist/static/animated-avatar.69b07505.json +0 -1
- package/dist/static/animated-avatar.9c560b46.json +0 -1
- package/dist/static/calendar-purple.1a840b41.svg +0 -1
- package/dist/static/flying-disk.c7f6ed39.json +0 -1
- package/dist/static/graduation-cap.3be3340a.json +0 -1
- package/dist/static/handshake.287e7dfb.svg +0 -1
- package/dist/static/light-bulb.c6db0b23.json +0 -1
- package/dist/static/money.332aacf1.svg +0 -1
- package/dist/static/muscle.9bcfb8a7.json +0 -1
- package/dist/static/nudge-tap.5cb30093.json +0 -1057
- package/dist/static/parent-avatar.822c7b9b.svg +0 -1
- package/dist/static/pencil.23df9da0.json +0 -1
- package/dist/static/plus-sign.de6af957.json +0 -1
- package/dist/static/racing-car.2cbf864e.json +0 -1
- package/dist/static/rocket.0a3ccab0.json +0 -1
- package/dist/static/shovel.abeec04c.json +0 -1
- package/dist/static/stripe-blurple.6abf422f.svg +0 -1
- package/dist/static/trustpilot.bd3d79e1.svg +0 -1
@@ -1,55 +1,55 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { createContext as
|
3
|
-
import { Coachmark as
|
4
|
-
import { usePostUserJourney as
|
5
|
-
import { Overlay as
|
6
|
-
const
|
7
|
-
const [U, q] =
|
1
|
+
import { jsxs as R, jsx as j } from "react/jsx-runtime";
|
2
|
+
import { createContext as W, useState as s, useRef as k, useCallback as h, useMemo as M, useEffect as O } from "react";
|
3
|
+
import { Coachmark as V } from "../comps/coachmark/coachmark.js";
|
4
|
+
import { usePostUserJourney as G, useGetUserJourney as F } from "../user-journey-api/user-journey-api.js";
|
5
|
+
import { Overlay as I } from "./journey-styled.js";
|
6
|
+
const K = W(null), re = ({ children: T, appId: a, userId: c }) => {
|
7
|
+
const [b, U] = s(!0), [q, z] = s(!1), [v, p] = s(null), [l, y] = s([]), [J, x] = s(!1), m = k(-1), t = k(void 0), f = k([]), [D, H] = s(!1), [A, L] = s({
|
8
8
|
height: window.innerHeight,
|
9
9
|
width: window.innerWidth
|
10
|
-
}), { post:
|
11
|
-
(e, r, o) => {
|
12
|
-
var
|
13
|
-
if (
|
10
|
+
}), { post: $ } = G(), { data: w = null, get: _ } = F(), B = h(
|
11
|
+
(e, r, o, C = !0) => {
|
12
|
+
var d, n;
|
13
|
+
if (l.length > 0) {
|
14
14
|
console.error(
|
15
15
|
`setJourney: Other Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
|
16
16
|
);
|
17
17
|
return;
|
18
18
|
}
|
19
|
-
x(!0), t.current = e, m.current = -1,
|
20
|
-
r.map((
|
21
|
-
...
|
19
|
+
x(!0), U(C), t.current = e, m.current = -1, y(
|
20
|
+
r.map((u) => ({
|
21
|
+
...u,
|
22
22
|
isActive: !1
|
23
23
|
// New coachmarks are inactive by default
|
24
24
|
}))
|
25
|
-
), o && (
|
26
|
-
height: ((
|
27
|
-
width: ((
|
28
|
-
}),
|
25
|
+
), o && (L({
|
26
|
+
height: ((d = o.current) == null ? void 0 : d.clientHeight) || window.innerHeight,
|
27
|
+
width: ((n = o.current) == null ? void 0 : n.clientWidth) || window.innerWidth
|
28
|
+
}), H(!0));
|
29
29
|
},
|
30
|
-
[
|
31
|
-
),
|
32
|
-
|
30
|
+
[l.length]
|
31
|
+
), i = h(() => {
|
32
|
+
f.current.forEach((e) => {
|
33
33
|
clearTimeout(e);
|
34
|
-
}),
|
35
|
-
}, []),
|
34
|
+
}), f.current = [], t.current = void 0, m.current = -1, y([]), x(!1);
|
35
|
+
}, []), E = h(
|
36
36
|
(e) => {
|
37
|
-
|
38
|
-
app_id:
|
39
|
-
user_id:
|
37
|
+
i(), p((r) => r && !r.includes(e) ? [...r, e] : r), $({
|
38
|
+
app_id: a,
|
39
|
+
user_id: c,
|
40
40
|
journey_id: e,
|
41
41
|
journey_status: "COMPLETED"
|
42
42
|
});
|
43
43
|
},
|
44
|
-
[
|
45
|
-
),
|
44
|
+
[a, i, $, c]
|
45
|
+
), P = h((e, r) => {
|
46
46
|
if (!t.current || e !== t.current) {
|
47
47
|
console.error(
|
48
48
|
t.current ? `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}` : "addCoachmark was called before setJourney and Journey ID is undefined"
|
49
49
|
);
|
50
50
|
return;
|
51
51
|
}
|
52
|
-
|
52
|
+
y((o) => [
|
53
53
|
...o,
|
54
54
|
{
|
55
55
|
...r,
|
@@ -57,86 +57,87 @@ const F = N(null), I = ({ children: b, appId: i, userId: u }) => {
|
|
57
57
|
// New coachmarks are inactive by default
|
58
58
|
}
|
59
59
|
]);
|
60
|
-
}, []),
|
61
|
-
(e, r = !1, o = 0,
|
60
|
+
}, []), S = h(
|
61
|
+
(e, r = !1, o = 0, C = !1) => {
|
62
62
|
if (!t.current || e !== t.current) {
|
63
63
|
console.error(
|
64
64
|
t.current ? "nextCoachmark was called before setJourney" : `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
|
65
65
|
);
|
66
66
|
return;
|
67
67
|
}
|
68
|
-
|
69
|
-
const
|
70
|
-
clearTimeout(
|
68
|
+
z(C), o !== 0 && y((n) => n.map((u) => ({ ...u, isActive: !1 })));
|
69
|
+
const d = setTimeout(() => {
|
70
|
+
clearTimeout(d);
|
71
71
|
const n = m.current + 1;
|
72
|
-
|
73
|
-
if (n >=
|
74
|
-
return
|
72
|
+
y((u) => {
|
73
|
+
if (n >= u.length || u.length === 0)
|
74
|
+
return i(), [];
|
75
75
|
m.current = n;
|
76
|
-
const g = [...
|
76
|
+
const g = [...u];
|
77
77
|
return g[n].isActive = !0, n > 0 && (g[n - 1].isActive = r), g;
|
78
78
|
});
|
79
79
|
}, o);
|
80
|
-
|
80
|
+
f.current.push(d);
|
81
81
|
},
|
82
|
-
[
|
83
|
-
),
|
82
|
+
[i]
|
83
|
+
), N = M(
|
84
84
|
() => ({
|
85
|
-
nextCoachmark:
|
86
|
-
setJourney:
|
87
|
-
addCoachmark:
|
88
|
-
clearJourney:
|
89
|
-
endJourney:
|
90
|
-
coachmarks:
|
91
|
-
userCompletedJourneyIds:
|
92
|
-
isJourneyActive:
|
85
|
+
nextCoachmark: S,
|
86
|
+
setJourney: B,
|
87
|
+
addCoachmark: P,
|
88
|
+
clearJourney: i,
|
89
|
+
endJourney: E,
|
90
|
+
coachmarks: l,
|
91
|
+
userCompletedJourneyIds: v,
|
92
|
+
isJourneyActive: J
|
93
93
|
}),
|
94
94
|
[
|
95
|
-
j,
|
96
|
-
E,
|
97
95
|
S,
|
98
|
-
|
96
|
+
B,
|
99
97
|
P,
|
100
|
-
|
101
|
-
|
102
|
-
|
98
|
+
i,
|
99
|
+
E,
|
100
|
+
l,
|
101
|
+
v,
|
102
|
+
J
|
103
103
|
]
|
104
104
|
);
|
105
|
-
return
|
106
|
-
|
107
|
-
app_id:
|
108
|
-
user_id:
|
105
|
+
return O(() => {
|
106
|
+
a && c && _(c, {
|
107
|
+
app_id: a,
|
108
|
+
user_id: c,
|
109
109
|
journey_status: "COMPLETED"
|
110
110
|
});
|
111
|
-
}, [
|
112
|
-
if (
|
113
|
-
const e =
|
111
|
+
}, [a, _, c]), O(() => {
|
112
|
+
if (w) {
|
113
|
+
const e = w.map((r) => r.journey_id);
|
114
114
|
p(e);
|
115
115
|
}
|
116
|
-
}, [
|
117
|
-
|
118
|
-
|
116
|
+
}, [w]), /* @__PURE__ */ R(K.Provider, { value: N, children: [
|
117
|
+
J && /* @__PURE__ */ j(
|
118
|
+
I,
|
119
119
|
{
|
120
120
|
about: "journey-overlay",
|
121
121
|
height: A.height,
|
122
122
|
width: A.width,
|
123
|
-
$isJourneyBlurred:
|
123
|
+
$isJourneyBlurred: q,
|
124
|
+
$isBlockingJourney: b,
|
124
125
|
"data-testid": t.current,
|
125
|
-
children:
|
126
|
-
|
126
|
+
children: l.map((e, r) => /* @__PURE__ */ j(
|
127
|
+
V,
|
127
128
|
{
|
128
129
|
coachmark: e,
|
129
|
-
isInsideScrollView:
|
130
|
+
isInsideScrollView: D
|
130
131
|
},
|
131
132
|
`coachmark-${r}`
|
132
133
|
))
|
133
134
|
}
|
134
135
|
),
|
135
|
-
|
136
|
+
T
|
136
137
|
] });
|
137
138
|
};
|
138
139
|
export {
|
139
|
-
|
140
|
-
|
140
|
+
K as JourneyContext,
|
141
|
+
re as JourneyProvider
|
141
142
|
};
|
142
143
|
//# 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 TCoachmarkJourneyProps,\n} from './journey-context-types';\nimport type { FC, RefObject } 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 [isJourneyBlurred, setIsJourneyBlurred] = useState<boolean>(false);\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>(undefined);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const [isScrollableJourney, setIsScrollableJourney] = useState<boolean>(false);\n const [overlaySize, setOverlaySize] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (\n id: TJourneyId,\n coachmarks: TCoachmarkJourneyProps[],\n scrollableContRef?: RefObject<HTMLDivElement | null>,\n ) => {\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(\n coachmarks.map((item: TCoachmarkJourneyProps) => {\n return {\n ...item,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps;\n }),\n );\n if (scrollableContRef) {\n setOverlaySize({\n height: scrollableContRef.current?.clientHeight || window.innerHeight,\n width: scrollableContRef.current?.clientWidth || window.innerWidth,\n });\n setIsScrollableJourney(true);\n }\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 clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: TCoachmarkJourneyProps) => {\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 => [\n ...prev,\n {\n ...coachmark,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps,\n ]);\n }, []);\n\n const nextCoachmark = useCallback(\n (\n id: TJourneyId,\n keepPrevActive: boolean = false,\n delayInMs: number = 0,\n shouldBlurNextJourney: boolean = false,\n ) => {\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 setIsJourneyBlurred(shouldBlurNextJourney);\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: TCoachmarkJourneyProps) => {\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 clearJourney();\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 [clearJourney],\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 {isJourneyActive && (\n <S.Overlay\n about=\"journey-overlay\"\n height={overlaySize.height}\n width={overlaySize.width}\n $isJourneyBlurred={isJourneyBlurred}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark\n key={`coachmark-${index}`}\n coachmark={coachmark}\n isInsideScrollView={isScrollableJourney}\n />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isJourneyBlurred","setIsJourneyBlurred","useState","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","isScrollableJourney","setIsScrollableJourney","overlaySize","setOverlaySize","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","scrollableContRef","item","_a","_b","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAgBa,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAkB,EAAK,GACjE,CAACC,GAAyBC,CAA0B,IAAIF,EAA8B,IAAI,GAC1F,CAACG,GAAeC,CAAgB,IAAIJ,EAA4B,CAAE,CAAA,GAClE,CAACK,GAAiBC,CAAkB,IAAIN,EAAS,EAAK,GACtDO,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,EAA+B,MAAS,GAC3DE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,CAACG,GAAqBC,CAAsB,IAAIZ,EAAkB,EAAK,GACvE,CAACa,GAAaC,CAAc,IAAId,EAAS;AAAA,IAC7C,QAAQ,OAAO;AAAA,IACf,OAAO,OAAO;AAAA,EAAA,CACf,GAEK,EAAE,MAAMe,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CACEC,GACAC,GACAC,MACG;;AACC,UAAArB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0Ba,CAAE;AAAA,QAAA;AAGvH;AAAA,MACF;AACA,MAAAhB,EAAmB,EAAI,GACvBG,EAAiB,UAAUa,GAC3Bf,EAAa,UAAU,IACvBH;AAAA,QACEmB,EAAW,IAAI,CAACE,OACP;AAAA,UACL,GAAGA;AAAA,UACH,UAAU;AAAA;AAAA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AAA;AAIF,SAAAuC,EAAU,MAAM;AACd,IAAIhD,KAASC,KACXqB,EAAmBrB,GAAQ;AAAA,MACzB,QAAQD;AAAA,MACR,SAASC;AAAA,MACT,gBAAgB;AAAA,IAAA,CACjB;AAAA,EAEF,GAAA,CAACD,GAAOsB,GAAoBrB,CAAM,CAAC,GAGtC+C,EAAU,MAAM;AACd,QAAI3B,GAAuB;AACzB,YAAM4B,IAA2B5B,EAAsB,IAAI,CAAA6B,MAAWA,EAAQ,UAAU;AAExF,MAAA5C,EAA2B2C,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAAC5B,CAAqB,CAAC,GAGvB,gBAAA8B,EAAAvD,EAAe,UAAf,EAAwB,OAAOkD,GAC7B,UAAA;AAAA,IACCrC,KAAA,gBAAA2C;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,QAAQpC,EAAY;AAAA,QACpB,OAAOA,EAAY;AAAA,QACnB,mBAAmBf;AAAA,QACnB,eAAaW,EAAiB;AAAA,QAE7B,UAAcN,EAAA,IAAI,CAAC+B,GAAWgB,MAC7B,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YAEC,WAAAjB;AAAA,YACA,oBAAoBvB;AAAA,UAAA;AAAA,UAFf,aAAauC,CAAK;AAAA,QAAA,CAI1B;AAAA,MAAA;AAAA,IACH;AAAA,IAEDvD;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 TCoachmarkJourneyProps,\n} from './journey-context-types';\nimport type { FC, RefObject } 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 [isBlockingJourney, setIsBlockingJourney] = useState<boolean>(true);\n const [isJourneyBlurred, setIsJourneyBlurred] = useState<boolean>(false);\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>(undefined);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const [isScrollableJourney, setIsScrollableJourney] = useState<boolean>(false);\n const [overlaySize, setOverlaySize] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (\n id: TJourneyId,\n coachmarks: TCoachmarkJourneyProps[],\n scrollableContRef?: RefObject<HTMLDivElement | null>,\n isBlocking: boolean = true,\n ) => {\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 setIsBlockingJourney(isBlocking);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList(\n coachmarks.map((item: TCoachmarkJourneyProps) => {\n return {\n ...item,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps;\n }),\n );\n if (scrollableContRef) {\n setOverlaySize({\n height: scrollableContRef.current?.clientHeight || window.innerHeight,\n width: scrollableContRef.current?.clientWidth || window.innerWidth,\n });\n setIsScrollableJourney(true);\n }\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 clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: TCoachmarkJourneyProps) => {\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 => [\n ...prev,\n {\n ...coachmark,\n isActive: false, // New coachmarks are inactive by default\n } as ICoachmarkProps,\n ]);\n }, []);\n\n const nextCoachmark = useCallback(\n (\n id: TJourneyId,\n keepPrevActive: boolean = false,\n delayInMs: number = 0,\n shouldBlurNextJourney: boolean = false,\n ) => {\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 setIsJourneyBlurred(shouldBlurNextJourney);\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: TCoachmarkJourneyProps) => {\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 clearJourney();\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 [clearJourney],\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 {isJourneyActive && (\n <S.Overlay\n about=\"journey-overlay\"\n height={overlaySize.height}\n width={overlaySize.width}\n $isJourneyBlurred={isJourneyBlurred}\n $isBlockingJourney={isBlockingJourney}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark\n key={`coachmark-${index}`}\n coachmark={coachmark}\n isInsideScrollView={isScrollableJourney}\n />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isBlockingJourney","setIsBlockingJourney","useState","isJourneyBlurred","setIsJourneyBlurred","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","isScrollableJourney","setIsScrollableJourney","overlaySize","setOverlaySize","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","scrollableContRef","isBlocking","item","_a","_b","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAgBa,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,KAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAmBC,CAAoB,IAAIC,EAAkB,EAAI,GAClE,CAACC,GAAkBC,CAAmB,IAAIF,EAAkB,EAAK,GACjE,CAACG,GAAyBC,CAA0B,IAAIJ,EAA8B,IAAI,GAC1F,CAACK,GAAeC,CAAgB,IAAIN,EAA4B,CAAE,CAAA,GAClE,CAACO,GAAiBC,CAAkB,IAAIR,EAAS,EAAK,GACtDS,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,EAA+B,MAAS,GAC3DE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,CAACG,GAAqBC,CAAsB,IAAId,EAAkB,EAAK,GACvE,CAACe,GAAaC,CAAc,IAAIhB,EAAS;AAAA,IAC7C,QAAQ,OAAO;AAAA,IACf,OAAO,OAAO;AAAA,EAAA,CACf,GAEK,EAAE,MAAMiB,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CACEC,GACAC,GACAC,GACAC,IAAsB,OACnB;;AACC,UAAAtB,EAAc,SAAS,GAAG;AACpB,gBAAA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
|
+
import e, { css as r } from "styled-components";
|
2
|
+
const p = e.div`
|
3
3
|
position: absolute;
|
4
4
|
top: 0;
|
5
5
|
right: 0;
|
6
6
|
bottom: 0;
|
7
7
|
left: 0;
|
8
|
-
z-index: ${({
|
8
|
+
z-index: ${({ $isBlockingJourney: t, theme: o }) => t ? o.zIndex.JOURNEY_OVERLAY : 0};
|
9
|
+
pointer-events: ${({ $isBlockingJourney: t }) => t ? "auto" : "none"};
|
10
|
+
|
9
11
|
height: ${({ height: t }) => t}px;
|
10
12
|
width: ${({ width: t }) => t}px;
|
11
|
-
${({ $isJourneyBlurred: t, theme: o }) => t &&
|
13
|
+
${({ $isJourneyBlurred: t, theme: o }) => t && r`
|
12
14
|
background: ${o.colors.BLACK_T_38};
|
13
15
|
backdrop-filter: blur(80px);
|
14
16
|
-webkit-backdrop-filter: blur(80px);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { css } from 'styled-components';\n\nexport const Overlay = styled.div<{\n $isJourneyBlurred: boolean;\n height: number;\n width: number;\n}>`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${({ theme })
|
1
|
+
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { css } from 'styled-components';\n\nexport const Overlay = styled.div<{\n $isJourneyBlurred: boolean;\n $isBlockingJourney: boolean;\n height: number;\n width: number;\n}>`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${({ $isBlockingJourney, theme }) =>\n $isBlockingJourney ? theme.zIndex.JOURNEY_OVERLAY : 0};\n pointer-events: ${({ $isBlockingJourney }) => ($isBlockingJourney ? 'auto' : 'none')};\n\n height: ${({ height }) => height}px;\n width: ${({ width }) => width}px;\n ${({ $isJourneyBlurred, theme }) =>\n $isJourneyBlurred &&\n css`\n background: ${theme.colors.BLACK_T_38};\n backdrop-filter: blur(80px);\n -webkit-backdrop-filter: blur(80px);\n `}\n`;\n"],"names":["Overlay","styled","$isBlockingJourney","theme","height","width","$isJourneyBlurred","css"],"mappings":";AAGO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWjB,CAAC,EAAE,oBAAAC,GAAoB,OAAAC,QAChCD,IAAqBC,EAAM,OAAO,kBAAkB,CAAC;AAAA,oBACrC,CAAC,EAAE,oBAAAD,EAAA,MAA0BA,IAAqB,SAAS,MAAO;AAAA;AAAA,YAE1E,CAAC,EAAE,QAAAE,EAAO,MAAMA,CAAM;AAAA,WACvB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,IAC3B,CAAC,EAAE,mBAAAC,GAAmB,OAAAH,EAAA,MACtBG,KACAC;AAAA,oBACgBJ,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA,KAGtC;AAAA;"}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import n from "../../../assets/line-icons/icons/hint-fill.js";
|
3
|
+
import l from "../../ui/layout/flex-view.js";
|
4
|
+
import r from "../../ui/text/text.js";
|
5
|
+
import { getPuzzleCardPattern as p } from "../utils/puzzle-pattern.js";
|
6
|
+
const d = o(l)(({ theme: t, $visible: i }) => {
|
7
|
+
const { gutter: e } = t.layout;
|
8
|
+
return i ? `
|
9
|
+
overflow: scroll;
|
10
|
+
padding-top: ${e * 1.5}px;
|
11
|
+
padding-bottom: ${e * 2}px;
|
12
|
+
` : "";
|
13
|
+
}), g = o(l)`
|
14
|
+
position: relative;
|
15
|
+
margin: 0 auto;
|
16
|
+
box-shadow: inset 0px 0px 0px 4px ${({ theme: t, $imageHue: i }) => t.colors[`${i}_4`]};
|
17
|
+
max-width: 343px;
|
18
|
+
width: 100%;
|
19
|
+
min-height: max-content;
|
20
|
+
|
21
|
+
&::before {
|
22
|
+
content: '';
|
23
|
+
position: absolute;
|
24
|
+
top: 0;
|
25
|
+
left: 0;
|
26
|
+
right: 0;
|
27
|
+
bottom: 0;
|
28
|
+
background-image: ${({ $imageHue: t }) => `url(${p(t)})`};
|
29
|
+
background-size: cover;
|
30
|
+
opacity: 0.2;
|
31
|
+
}
|
32
|
+
`, x = o(n)`
|
33
|
+
color: ${({ theme: t }) => t.colors.BLACK_1};
|
34
|
+
|
35
|
+
& .hint-fill-icon-path {
|
36
|
+
fill: ${({ theme: t }) => t.colors.WHITE_1};
|
37
|
+
}
|
38
|
+
`, u = o(r)`
|
39
|
+
& span {
|
40
|
+
font-weight: 700;
|
41
|
+
margin-right: 4px;
|
42
|
+
}
|
43
|
+
`, h = o.div`
|
44
|
+
color: ${({ theme: t }) => t.colors.BLACK};
|
45
|
+
font-size: 14px;
|
46
|
+
line-height: 1.2;
|
47
|
+
font-family: 'Athletics';
|
48
|
+
|
49
|
+
font-weight: 400;
|
50
|
+
font-style: normal;
|
51
|
+
|
52
|
+
em {
|
53
|
+
font-style: italic;
|
54
|
+
}
|
55
|
+
|
56
|
+
ul,
|
57
|
+
ol {
|
58
|
+
list-style-type: initial;
|
59
|
+
padding-left: 32px;
|
60
|
+
}
|
61
|
+
|
62
|
+
ol {
|
63
|
+
list-style-type: decimal;
|
64
|
+
}
|
65
|
+
|
66
|
+
p {
|
67
|
+
margin: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
li {
|
71
|
+
margin: 4px 0;
|
72
|
+
}
|
73
|
+
`;
|
74
|
+
export {
|
75
|
+
d as PuzzleAppWrapper,
|
76
|
+
g as PuzzleContainer,
|
77
|
+
h as PuzzleQuestionWrapper,
|
78
|
+
u as StyledFeedbackText,
|
79
|
+
x as StyledHintFillIcon
|
80
|
+
};
|
81
|
+
//# sourceMappingURL=puzzle-app-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"puzzle-app-styled.js","sources":["../../../../src/features/puzzles/app/puzzle-app-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled from 'styled-components';\n\nimport HintFillIcon from '../../../assets/line-icons/icons/hint-fill';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\nconst PuzzleAppWrapper = styled(FlexView)<{ $visible: boolean }>(({ theme, $visible }) => {\n const { gutter } = theme.layout;\n\n if (!$visible) {\n return ``;\n }\n\n return `\n overflow: scroll;\n padding-top: ${gutter * 1.5}px;\n padding-bottom: ${gutter * 2}px;\n `;\n});\n\nconst PuzzleContainer = styled(FlexView)<{ $imageHue: THueNames; $backgroundOpacity?: number }>`\n position: relative;\n margin: 0 auto;\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n max-width: 343px;\n width: 100%;\n min-height: max-content;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n opacity: 0.2;\n }\n`;\n\nconst StyledHintFillIcon = styled(HintFillIcon)`\n color: ${({ theme }) => theme.colors.BLACK_1};\n\n & .hint-fill-icon-path {\n fill: ${({ theme }) => theme.colors.WHITE_1};\n }\n`;\n\nconst StyledFeedbackText = styled(Text)`\n & span {\n font-weight: 700;\n margin-right: 4px;\n }\n`;\n\nconst PuzzleQuestionWrapper = styled.div`\n color: ${({ theme }) => theme.colors.BLACK};\n font-size: 14px;\n line-height: 1.2;\n font-family: 'Athletics';\n\n font-weight: 400;\n font-style: normal;\n\n em {\n font-style: italic;\n }\n\n ul,\n ol {\n list-style-type: initial;\n padding-left: 32px;\n }\n\n ol {\n list-style-type: decimal;\n }\n\n p {\n margin: 0;\n }\n\n li {\n margin: 4px 0;\n }\n`;\n\nexport {\n PuzzleAppWrapper,\n PuzzleContainer,\n StyledFeedbackText,\n StyledHintFillIcon,\n PuzzleQuestionWrapper,\n};\n"],"names":["PuzzleAppWrapper","styled","FlexView","theme","$visible","gutter","PuzzleContainer","$imageHue","getPuzzleCardPattern","StyledHintFillIcon","HintFillIcon","StyledFeedbackText","Text","PuzzleQuestionWrapper"],"mappings":";;;;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAyB,CAAC,EAAE,OAAAC,GAAO,UAAAC,QAAe;AAClF,QAAA,EAAE,QAAAC,EAAO,IAAIF,EAAM;AAEzB,SAAKC,IAIE;AAAA;AAAA,mBAEUC,IAAS,GAAG;AAAA,sBACTA,IAAS,CAAC;AAAA,MANrB;AAQX,CAAC,GAEKC,IAAkBL,EAAOC,CAAQ;AAAA;AAAA;AAAA,sCAGD,CAAC,EAAE,OAAAC,GAAO,WAAAI,QAAgBJ,EAAM,OAAO,GAAGI,CAAS,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAYtE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;AAAA;AAAA,GAM9EE,IAAqBR,EAAOS,CAAY;AAAA,WACnC,CAAC,EAAE,OAAAP,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,YAGlC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAIzCQ,IAAqBV,EAAOW,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA,GAOhCC,IAAwBZ,EAAO;AAAA,WAC1B,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1,120 @@
|
|
1
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
2
|
+
import { memo as A, useRef as S, useCallback as _, useEffect as l, useMemo as $ } from "react";
|
3
|
+
import H from "../../ui/image/image.js";
|
4
|
+
import M from "../../ui/layout/flex-view.js";
|
5
|
+
import x from "../../ui/separator/separator.js";
|
6
|
+
import d from "../../worksheet/constants/events.js";
|
7
|
+
import N from "../../worksheet/worksheet/hooks/use-learnosity.js";
|
8
|
+
import Q from "../../worksheet/worksheet/hooks/use-worksheet-data-helper.js";
|
9
|
+
import { getQuestionsFromItems as V } from "../../worksheet/worksheet/worksheet-helpers.js";
|
10
|
+
import { PuzzleQuestionWrapper as P, PuzzleContainer as R } from "./puzzle-app-styled.js";
|
11
|
+
const F = (u) => {
|
12
|
+
if (!u) return null;
|
13
|
+
const t = u.match(/<img[^>]+src="([^">]+)"/);
|
14
|
+
return t ? t[1] : null;
|
15
|
+
}, L = ({
|
16
|
+
worksheetData: u,
|
17
|
+
loggerRef: t,
|
18
|
+
onWorksheetErrored: n,
|
19
|
+
imageHue: I,
|
20
|
+
onLoaded: p
|
21
|
+
}) => {
|
22
|
+
const { signed_request: g, questions_signed_request: w } = u, z = S(null), {
|
23
|
+
loadingState: i,
|
24
|
+
data: o,
|
25
|
+
error: f
|
26
|
+
} = Q({
|
27
|
+
attemptId: void 0,
|
28
|
+
signedRequest: g,
|
29
|
+
loggerRef: t
|
30
|
+
}), E = _(
|
31
|
+
(s) => {
|
32
|
+
n({
|
33
|
+
code: s.code,
|
34
|
+
message: s.detail
|
35
|
+
});
|
36
|
+
},
|
37
|
+
[n]
|
38
|
+
), { learnosity: r } = N(w, E, t);
|
39
|
+
l(() => {
|
40
|
+
i === "error" && n({
|
41
|
+
message: f ?? "Error loading worksheet"
|
42
|
+
});
|
43
|
+
}, [i, n, f]), l(() => {
|
44
|
+
r && t.current(d.WORKSHEET_V3_LEARNOSITY_INITIALIZED);
|
45
|
+
}, [r, t]), l(() => {
|
46
|
+
r && i === "success" && p && (t.current(d.WORKSHEET_V3_READY), p());
|
47
|
+
}, [r, i, t, p]);
|
48
|
+
const m = $(() => i === "success" && (o != null && o.learnosityItems) ? (t.current(d.WORKSHEET_V3_READY), V(o.learnosityItems, {
|
49
|
+
sectioned: !1,
|
50
|
+
adaptive: !1
|
51
|
+
}).map((e) => ({
|
52
|
+
response_id: e.response_id,
|
53
|
+
type: e.type,
|
54
|
+
stimulus: e.stimulus,
|
55
|
+
template: e.template,
|
56
|
+
stimulus_review: e.stimulus_review,
|
57
|
+
options: e.options,
|
58
|
+
metadata: e.metadata,
|
59
|
+
validation: e.validation
|
60
|
+
// Add other properties as needed
|
61
|
+
}))) : [], [i, o, t]);
|
62
|
+
l(() => {
|
63
|
+
if (r && m.length > 0) {
|
64
|
+
const c = requestAnimationFrame(() => {
|
65
|
+
try {
|
66
|
+
r.renderMath("mathjax");
|
67
|
+
} catch (e) {
|
68
|
+
n({
|
69
|
+
message: `MathJax rendering failed: ${e instanceof Error ? e.message : "Unknown error"}`
|
70
|
+
});
|
71
|
+
}
|
72
|
+
});
|
73
|
+
return () => {
|
74
|
+
cancelAnimationFrame(c);
|
75
|
+
};
|
76
|
+
}
|
77
|
+
}, [r, n, m]);
|
78
|
+
const T = _((s) => {
|
79
|
+
const { stimulus: c = "", template: e = "", response_id: v } = s, h = F(c);
|
80
|
+
return /* @__PURE__ */ y(
|
81
|
+
M,
|
82
|
+
{
|
83
|
+
$background: "TRANSPARENT",
|
84
|
+
$alignItems: "center",
|
85
|
+
className: "puzzle-app-view-question-card",
|
86
|
+
children: [
|
87
|
+
h && /* @__PURE__ */ a(
|
88
|
+
H,
|
89
|
+
{
|
90
|
+
src: h,
|
91
|
+
alt: "Puzzle illustration",
|
92
|
+
width: 183,
|
93
|
+
height: 183,
|
94
|
+
withLoader: !0
|
95
|
+
}
|
96
|
+
),
|
97
|
+
/* @__PURE__ */ a(x, { heightX: 1 }),
|
98
|
+
e && /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a("div", { dangerouslySetInnerHTML: { __html: e } }) })
|
99
|
+
]
|
100
|
+
},
|
101
|
+
v
|
102
|
+
);
|
103
|
+
}, []);
|
104
|
+
return m.length ? /* @__PURE__ */ a(
|
105
|
+
R,
|
106
|
+
{
|
107
|
+
ref: z,
|
108
|
+
$gapX: 1,
|
109
|
+
$gutterX: 1,
|
110
|
+
$imageHue: I,
|
111
|
+
$background: "WHITE_1",
|
112
|
+
className: "puzzle-app-view-container",
|
113
|
+
children: m.map((s) => /* @__PURE__ */ a("div", { children: T(s) }, `question-${s.response_id}`))
|
114
|
+
}
|
115
|
+
) : null;
|
116
|
+
}, U = A(L);
|
117
|
+
export {
|
118
|
+
U as default
|
119
|
+
};
|
120
|
+
//# sourceMappingURL=puzzle-app-view.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"puzzle-app-view.js","sources":["../../../../src/features/puzzles/app/puzzle-app-view.tsx"],"sourcesContent":["import type {\n ILearnosityError,\n ILearnosityQuestion,\n} from '../../worksheet/worksheet/worksheet-types';\nimport type { IPuzzleAppViewProps } from './puzzle-app-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport EVENTS from '../../worksheet/constants/events';\nimport useLearnosity from '../../worksheet/worksheet/hooks/use-learnosity';\nimport useWorksheetDataHelper from '../../worksheet/worksheet/hooks/use-worksheet-data-helper';\nimport { getQuestionsFromItems } from '../../worksheet/worksheet/worksheet-helpers';\nimport * as Styled from './puzzle-app-styled';\n\nconst extractImageFromHTML = (htmlString: string) => {\n if (!htmlString) return null;\n\n const imgMatch = htmlString.match(/<img[^>]+src=\"([^\">]+)\"/);\n\n return imgMatch ? imgMatch[1] : null;\n};\n\nconst PuzzleAppView: FC<IPuzzleAppViewProps> = ({\n worksheetData,\n loggerRef,\n onWorksheetErrored,\n imageHue,\n onLoaded,\n}) => {\n const { signed_request: itemsSignedRequest, questions_signed_request: questionSignedRequest } =\n worksheetData;\n\n // Ref for the container to trigger MathJax rendering\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Get Learnosity items using the signed_request (not questions_signed_request)\n const {\n loadingState,\n data: learnosityData,\n error: worksheetError,\n } = useWorksheetDataHelper({\n attemptId: undefined,\n signedRequest: itemsSignedRequest,\n loggerRef,\n });\n\n const onLearnosityErrored = useCallback(\n (err: ILearnosityError) => {\n onWorksheetErrored({\n code: err.code,\n message: err.detail,\n });\n },\n [onWorksheetErrored],\n );\n\n // Initialize Learnosity using questions_signed_request (needed for interactive questions)\n const { learnosity } = useLearnosity(questionSignedRequest, onLearnosityErrored, loggerRef);\n\n useEffect(() => {\n if (loadingState === 'error') {\n onWorksheetErrored({\n message: worksheetError ?? 'Error loading worksheet',\n });\n }\n }, [loadingState, onWorksheetErrored, worksheetError]);\n\n // Log when learnosity is ready for future interactive features\n useEffect(() => {\n if (learnosity) {\n loggerRef.current(EVENTS.WORKSHEET_V3_LEARNOSITY_INITIALIZED);\n }\n }, [learnosity, loggerRef]);\n\n useEffect(() => {\n if (learnosity && loadingState === 'success' && onLoaded) {\n loggerRef.current(EVENTS.WORKSHEET_V3_READY);\n onLoaded();\n }\n }, [learnosity, loadingState, loggerRef, onLoaded]);\n\n // Memoize questions processing to prevent re-render loops\n const questions = useMemo(() => {\n // Extract questions from Learnosity items when data is loaded successfully\n if (loadingState === 'success' && learnosityData?.learnosityItems) {\n loggerRef.current(EVENTS.WORKSHEET_V3_READY);\n\n // Convert learnosityItems to questions using the worksheet helper\n const worksheetQuestions = getQuestionsFromItems(learnosityData.learnosityItems, {\n sectioned: false,\n adaptive: false,\n });\n\n // Extract just the Learnosity questions from worksheet questions\n const learnosityQuestions: ILearnosityQuestion[] = worksheetQuestions.map(q => ({\n response_id: q.response_id,\n type: q.type,\n stimulus: q.stimulus,\n template: q.template,\n stimulus_review: q.stimulus_review,\n options: q.options,\n metadata: q.metadata,\n validation: q.validation,\n // Add other properties as needed\n }));\n\n return learnosityQuestions;\n }\n\n return [];\n }, [loadingState, learnosityData, loggerRef]);\n\n // Force MathJax rendering after questions are loaded and rendered\n // Similar to how useLearnosityAppend does it\n useEffect(() => {\n if (learnosity && questions.length > 0) {\n // Use requestAnimationFrame to ensure DOM is updated before rendering math\n const renderMath = () => {\n try {\n learnosity.renderMath('mathjax');\n } catch (error) {\n onWorksheetErrored({\n message: `MathJax rendering failed: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n });\n }\n };\n\n const animationId = requestAnimationFrame(renderMath);\n\n return () => {\n cancelAnimationFrame(animationId);\n };\n }\n }, [learnosity, onWorksheetErrored, questions]);\n\n const renderQuestionContent = useCallback((question: ILearnosityQuestion) => {\n const { stimulus = '', template = '', response_id: responseId } = question;\n const imageUrl = extractImageFromHTML(stimulus);\n\n return (\n <FlexView\n $background=\"TRANSPARENT\"\n key={responseId}\n $alignItems=\"center\"\n className=\"puzzle-app-view-question-card\"\n >\n {/* Main Image or Interactive Content */}\n {imageUrl && (\n <Image\n src={imageUrl}\n alt=\"Puzzle illustration\"\n width={183}\n height={183}\n withLoader={true}\n />\n )}\n\n <Separator heightX={1} />\n\n {/* Question HTML Content */}\n {template && (\n <Styled.PuzzleQuestionWrapper>\n <div dangerouslySetInnerHTML={{ __html: template }} />\n </Styled.PuzzleQuestionWrapper>\n )}\n </FlexView>\n );\n }, []);\n\n if (!questions.length) return null;\n\n return (\n <Styled.PuzzleContainer\n ref={containerRef}\n $gapX={1}\n $gutterX={1}\n $imageHue={imageHue}\n $background=\"WHITE_1\"\n className=\"puzzle-app-view-container\"\n >\n {questions.map(question => (\n <div key={`question-${question.response_id}`}>{renderQuestionContent(question)}</div>\n ))}\n </Styled.PuzzleContainer>\n );\n};\n\nexport default memo(PuzzleAppView);\n"],"names":["extractImageFromHTML","htmlString","imgMatch","PuzzleAppView","worksheetData","loggerRef","onWorksheetErrored","imageHue","onLoaded","itemsSignedRequest","questionSignedRequest","containerRef","useRef","loadingState","learnosityData","worksheetError","useWorksheetDataHelper","onLearnosityErrored","useCallback","err","learnosity","useLearnosity","useEffect","EVENTS","questions","useMemo","getQuestionsFromItems","q","animationId","error","renderQuestionContent","question","stimulus","template","responseId","imageUrl","jsxs","FlexView","jsx","Image","Separator","Styled.PuzzleQuestionWrapper","Styled.PuzzleContainer","PuzzleAppView$1","memo"],"mappings":";;;;;;;;;;AAkBA,MAAMA,IAAuB,CAACC,MAAuB;AAC/C,MAAA,CAACA,EAAmB,QAAA;AAElB,QAAAC,IAAWD,EAAW,MAAM,yBAAyB;AAEpD,SAAAC,IAAWA,EAAS,CAAC,IAAI;AAClC,GAEMC,IAAyC,CAAC;AAAA,EAC9C,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AACF,MAAM;AACJ,QAAM,EAAE,gBAAgBC,GAAoB,0BAA0BC,MACpEN,GAGIO,IAAeC,EAAuB,IAAI,GAG1C;AAAA,IACJ,cAAAC;AAAA,IACA,MAAMC;AAAA,IACN,OAAOC;AAAA,MACLC,EAAuB;AAAA,IACzB,WAAW;AAAA,IACX,eAAeP;AAAA,IACf,WAAAJ;AAAA,EAAA,CACD,GAEKY,IAAsBC;AAAA,IAC1B,CAACC,MAA0B;AACN,MAAAb,EAAA;AAAA,QACjB,MAAMa,EAAI;AAAA,QACV,SAASA,EAAI;AAAA,MAAA,CACd;AAAA,IACH;AAAA,IACA,CAACb,CAAkB;AAAA,EAAA,GAIf,EAAE,YAAAc,EAAW,IAAIC,EAAcX,GAAuBO,GAAqBZ,CAAS;AAE1F,EAAAiB,EAAU,MAAM;AACd,IAAIT,MAAiB,WACAP,EAAA;AAAA,MACjB,SAASS,KAAkB;AAAA,IAAA,CAC5B;AAAA,EAEF,GAAA,CAACF,GAAcP,GAAoBS,CAAc,CAAC,GAGrDO,EAAU,MAAM;AACd,IAAIF,KACQf,EAAA,QAAQkB,EAAO,mCAAmC;AAAA,EAC9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5C,WAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,aAAY;AAAA,QAEZ,aAAY;AAAA,QACZ,WAAU;AAAA,QAGT,UAAA;AAAA,UACCF,KAAA,gBAAAG;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,KAAKJ;AAAA,cACL,KAAI;AAAA,cACJ,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,YAAY;AAAA,YAAA;AAAA,UACd;AAAA,UAGF,gBAAAG,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UAGtBP,KACC,gBAAAK,EAACG,GAAA,EACC,UAAA,gBAAAH,EAAC,OAAI,EAAA,yBAAyB,EAAE,QAAQL,EAAS,EAAA,CAAG,EACtD,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MArBGC;AAAA,IAAA;AAAA,EAyBX,GAAG,CAAE,CAAA;AAED,SAACV,EAAU,SAGb,gBAAAc;AAAA,IAACI;AAAAA,IAAA;AAAA,MACC,KAAK/B;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,WAAWJ;AAAA,MACX,aAAY;AAAA,MACZ,WAAU;AAAA,MAET,UAAUiB,EAAA,IAAI,CACbO,MAAA,gBAAAO,EAAC,OAA8C,EAAA,UAAAR,EAAsBC,CAAQ,EAAA,GAAnE,YAAYA,EAAS,WAAW,EAAqC,CAChF;AAAA,IAAA;AAAA,EAAA,IAbyB;AAgBhC,GAEeY,IAAAC,EAAKzC,CAAa;"}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as W } from "react/jsx-runtime";
|
2
|
+
import { memo as v, useState as h, useRef as P, useCallback as n, useEffect as R } from "react";
|
3
|
+
import y from "../../ui/error/error.js";
|
4
|
+
import d from "../../ui/layout/flex-view.js";
|
5
|
+
import F from "../../ui/loader/app-loader/app-loader.js";
|
6
|
+
import p from "../../ui/text/text.js";
|
7
|
+
import { usePreviewWorksheetGet as I } from "../../worksheet/worksheet-preview/api/get-preview-worksheet.js";
|
8
|
+
import { PuzzleAppWrapper as L, StyledFeedbackText as T, StyledHintFillIcon as D } from "./puzzle-app-styled.js";
|
9
|
+
import G from "./puzzle-app-view.js";
|
10
|
+
const S = ({ itemRef: s, title: m, imageHue: i, feedbackComments: l, tip: f }) => {
|
11
|
+
const [u, g] = h(), [r, $] = h(!1), { isProcessing: k, get: a, data: c, error: w } = I(), z = P(() => null), A = f || "Celebrate persistence more than correct answers - it's a life skill worth building.", t = n(() => {
|
12
|
+
a("test", {
|
13
|
+
action: "review",
|
14
|
+
node_type: "PUZZLE_CARD",
|
15
|
+
items: [s]
|
16
|
+
});
|
17
|
+
}, [a, s]);
|
18
|
+
R(() => {
|
19
|
+
t();
|
20
|
+
}, [t]);
|
21
|
+
const b = n((E) => {
|
22
|
+
g(E.message);
|
23
|
+
}, []), x = n(() => {
|
24
|
+
$(!0);
|
25
|
+
}, []);
|
26
|
+
return u || w ? /* @__PURE__ */ e(y, { height: "100vh", onTryAgain: t }) : k ? /* @__PURE__ */ e(F, { height: "100vh" }) : /* @__PURE__ */ o(
|
27
|
+
L,
|
28
|
+
{
|
29
|
+
className: "puzzle-app-container",
|
30
|
+
$background: `${i}_2`,
|
31
|
+
$alignItems: "center",
|
32
|
+
$flexGapX: 1,
|
33
|
+
$gutterX: 1,
|
34
|
+
$visible: r,
|
35
|
+
$height: "100vh",
|
36
|
+
children: [
|
37
|
+
r && /* @__PURE__ */ e(p, { $renderAs: "ab1-bold", children: m }),
|
38
|
+
c && /* @__PURE__ */ e(
|
39
|
+
G,
|
40
|
+
{
|
41
|
+
onWorksheetErrored: b,
|
42
|
+
worksheetData: c,
|
43
|
+
loggerRef: z,
|
44
|
+
imageHue: i,
|
45
|
+
onLoaded: x
|
46
|
+
}
|
47
|
+
),
|
48
|
+
r && /* @__PURE__ */ e(W, { children: l ? /* @__PURE__ */ o(T, { $renderAs: "ab2", children: [
|
49
|
+
/* @__PURE__ */ e("span", { children: "Tutor Remark:" }),
|
50
|
+
l
|
51
|
+
] }) : /* @__PURE__ */ o(d, { $flexDirection: "row", $alignItems: "center", $flexGap: 8, children: [
|
52
|
+
/* @__PURE__ */ e(d, { $width: 24, $height: 24, children: /* @__PURE__ */ e(D, {}) }),
|
53
|
+
/* @__PURE__ */ e(p, { $renderAs: "ab2", children: A })
|
54
|
+
] }) })
|
55
|
+
]
|
56
|
+
}
|
57
|
+
);
|
58
|
+
}, B = v(S);
|
59
|
+
export {
|
60
|
+
B as default
|
61
|
+
};
|
62
|
+
//# sourceMappingURL=puzzle-app.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"puzzle-app.js","sources":["../../../../src/features/puzzles/app/puzzle-app.tsx"],"sourcesContent":["import type { IPuzzleAppProps } from './puzzle-app-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useRef, useState } from 'react';\n\nimport Error from '../../ui/error/error';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { usePreviewWorksheetGet } from '../../worksheet/worksheet-preview/api/get-preview-worksheet';\nimport * as Styled from './puzzle-app-styled';\nimport PuzzleAppView from './puzzle-app-view';\n\nconst PuzzleApp: FC<IPuzzleAppProps> = ({ itemRef, title, imageHue, feedbackComments, tip }) => {\n const [error, setError] = useState<string>();\n const [worksheetRendered, setWorksheetRendered] = useState<boolean>(false);\n\n const { isProcessing, get, data: worksheetData, error: fetchError } = usePreviewWorksheetGet();\n const loggerRef = useRef(() => null);\n\n const tipInfo =\n tip || `Celebrate persistence more than correct answers - it's a life skill worth building.`;\n\n const fetchWorksheet = useCallback(() => {\n get('test', {\n action: 'review',\n node_type: 'PUZZLE_CARD',\n items: [itemRef],\n });\n }, [get, itemRef]);\n\n useEffect(() => {\n fetchWorksheet();\n }, [fetchWorksheet]);\n\n const handleWorksheetErrored = useCallback((err: { code?: number; message: string }) => {\n setError(err.message);\n }, []);\n\n const handleWorksheetLoaded = useCallback(() => {\n setWorksheetRendered(true);\n }, []);\n\n if (error || fetchError) {\n return <Error height=\"100vh\" onTryAgain={fetchWorksheet} />;\n }\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.PuzzleAppWrapper\n className=\"puzzle-app-container\"\n $background={`${imageHue}_2`}\n $alignItems=\"center\"\n $flexGapX={1}\n $gutterX={1}\n $visible={worksheetRendered}\n $height=\"100vh\"\n >\n {worksheetRendered && <Text $renderAs=\"ab1-bold\">{title}</Text>}\n\n {worksheetData && (\n <PuzzleAppView\n onWorksheetErrored={handleWorksheetErrored}\n worksheetData={worksheetData}\n loggerRef={loggerRef}\n imageHue={imageHue}\n onLoaded={handleWorksheetLoaded}\n />\n )}\n\n {worksheetRendered && (\n <>\n {feedbackComments ? (\n <Styled.StyledFeedbackText $renderAs=\"ab2\">\n <span>Tutor Remark:</span>\n {feedbackComments}\n </Styled.StyledFeedbackText>\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n <FlexView $width={24} $height={24}>\n <Styled.StyledHintFillIcon />\n </FlexView>\n <Text $renderAs=\"ab2\">{tipInfo}</Text>\n </FlexView>\n )}\n </>\n )}\n </Styled.PuzzleAppWrapper>\n );\n};\n\nexport default memo(PuzzleApp);\n"],"names":["PuzzleApp","itemRef","title","imageHue","feedbackComments","tip","error","setError","useState","worksheetRendered","setWorksheetRendered","isProcessing","get","worksheetData","fetchError","usePreviewWorksheetGet","loggerRef","useRef","tipInfo","fetchWorksheet","useCallback","useEffect","handleWorksheetErrored","err","handleWorksheetLoaded","jsx","Error","AppLoader","jsxs","Styled.PuzzleAppWrapper","Text","PuzzleAppView","Styled.StyledFeedbackText","FlexView","Styled.StyledHintFillIcon","puzzleApp","memo"],"mappings":";;;;;;;;;AAaA,MAAMA,IAAiC,CAAC,EAAE,SAAAC,GAAS,OAAAC,GAAO,UAAAC,GAAU,kBAAAC,GAAkB,KAAAC,QAAU;AAC9F,QAAM,CAACC,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