@cuemath/leap 3.2.11-mb → 3.2.11

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.
Files changed (104) hide show
  1. package/dist/assets/lottie/lottie.js +1 -1
  2. package/dist/assets/lottie/lottie.js.map +1 -1
  3. package/dist/features/auth/account-selector/account-selector.js +26 -25
  4. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  5. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +15 -14
  6. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  7. package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -31
  8. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  9. package/dist/features/auth/comps/user-list/user-list.js +35 -34
  10. package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
  11. package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -15
  12. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  13. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +6 -7
  14. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  15. package/dist/features/auth/login/login-styled.js +8 -9
  16. package/dist/features/auth/login/login-styled.js.map +1 -1
  17. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +121 -98
  18. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  19. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +29 -28
  20. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
  21. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +43 -42
  22. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
  23. package/dist/features/circle-games/games/tutorial/tutorial.js +43 -35
  24. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  25. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
  26. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
  27. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
  28. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
  29. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +26 -24
  30. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
  31. package/dist/features/circle-games/sign-up/constants.js +3 -1
  32. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  33. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
  34. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  35. package/dist/features/journey/comps/coachmark/coachmark.js +29 -27
  36. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  37. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  38. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  39. package/dist/features/journey/use-journey/journey-context-provider.js +73 -72
  40. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  41. package/dist/features/journey/use-journey/journey-styled.js +6 -4
  42. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  43. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +6 -0
  44. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +1 -0
  45. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +12 -60
  46. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
  47. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +72 -77
  48. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  49. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +63 -0
  50. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -0
  51. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +21 -0
  52. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -0
  53. package/dist/features/ui/error/error.js +65 -27
  54. package/dist/features/ui/error/error.js.map +1 -1
  55. package/dist/features/ui/modals/modal-styled.js +35 -28
  56. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  57. package/dist/features/ui/modals/modal.js +40 -14
  58. package/dist/features/ui/modals/modal.js.map +1 -1
  59. package/dist/features/ui/nudge/nudge-styled.js +14 -7
  60. package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
  61. package/dist/features/ui/nudge/nudge.js +13 -12
  62. package/dist/features/ui/nudge/nudge.js.map +1 -1
  63. package/dist/features/ui/sticker-grid/sticker-grid-styles.js +86 -0
  64. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +1 -0
  65. package/dist/features/ui/sticker-grid/sticker-grid.js +24 -0
  66. package/dist/features/ui/sticker-grid/sticker-grid.js.map +1 -0
  67. package/dist/features/ui/sticker-grid/sticker.js +57 -0
  68. package/dist/features/ui/sticker-grid/sticker.js.map +1 -0
  69. package/dist/features/ui/stickers/constants.js +6 -0
  70. package/dist/features/ui/stickers/constants.js.map +1 -0
  71. package/dist/features/ui/stickers/stickers-effects.js +64 -0
  72. package/dist/features/ui/stickers/stickers-effects.js.map +1 -0
  73. package/dist/features/ui/stickers/stickers-styled.js +29 -0
  74. package/dist/features/ui/stickers/stickers-styled.js.map +1 -0
  75. package/dist/features/ui/stickers/stickers-utils.js +91 -0
  76. package/dist/features/ui/stickers/stickers-utils.js.map +1 -0
  77. package/dist/features/ui/stickers/stickers.js +40 -0
  78. package/dist/features/ui/stickers/stickers.js.map +1 -0
  79. package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
  80. package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
  81. package/dist/features/ui/streak-icon/streak-icon.js +17 -15
  82. package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
  83. package/dist/features/ui/text/text.js +40 -36
  84. package/dist/features/ui/text/text.js.map +1 -1
  85. package/dist/features/ui/theme/constants.js +4 -2
  86. package/dist/features/ui/theme/constants.js.map +1 -1
  87. package/dist/features/ui/theme/get-device.js +3 -3
  88. package/dist/features/ui/theme/get-device.js.map +1 -1
  89. package/dist/features/worksheet/worksheet/constants.js +12 -13
  90. package/dist/features/worksheet/worksheet/constants.js.map +1 -1
  91. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +246 -260
  92. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  93. package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -28
  94. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  95. package/dist/features/worksheet/worksheet/worksheet.js +166 -164
  96. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  97. package/dist/index.d.ts +48 -16
  98. package/dist/index.js +353 -349
  99. package/dist/index.js.map +1 -1
  100. package/dist/static/nudge-tap.0591aef4.json +1 -0
  101. package/package.json +1 -1
  102. package/dist/features/hooks/use-viewport/use-viewport.js +0 -22
  103. package/dist/features/hooks/use-viewport/use-viewport.js.map +0 -1
  104. package/dist/static/nudge-tap.5cb30093.json +0 -1057
@@ -1,55 +1,55 @@
1
- import { jsxs as L, jsx as O } from "react/jsx-runtime";
2
- import { createContext as N, useState as c, useRef as v, useCallback as h, useMemo as R, useEffect as T } from "react";
3
- import { Coachmark as W } from "../comps/coachmark/coachmark.js";
4
- import { usePostUserJourney as M, useGetUserJourney as V } from "../user-journey-api/user-journey-api.js";
5
- import { Overlay as G } from "./journey-styled.js";
6
- const F = N(null), I = ({ children: b, appId: i, userId: u }) => {
7
- const [U, q] = c(!1), [k, p] = c(null), [a, l] = c([]), [f, x] = c(!1), m = v(-1), t = v(void 0), w = v([]), [z, B] = c(!1), [A, D] = c({
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: _ } = M(), { data: C = null, get: $ } = V(), E = h(
11
- (e, r, o) => {
12
- var J, y;
13
- if (a.length > 0) {
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, l(
20
- r.map((n) => ({
21
- ...n,
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 && (D({
26
- height: ((J = o.current) == null ? void 0 : J.clientHeight) || window.innerHeight,
27
- width: ((y = o.current) == null ? void 0 : y.clientWidth) || window.innerWidth
28
- }), B(!0));
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
- [a.length]
31
- ), s = h(() => {
32
- w.current.forEach((e) => {
30
+ [l.length]
31
+ ), i = h(() => {
32
+ f.current.forEach((e) => {
33
33
  clearTimeout(e);
34
- }), w.current = [], t.current = void 0, m.current = -1, l([]), x(!1);
35
- }, []), P = h(
34
+ }), f.current = [], t.current = void 0, m.current = -1, y([]), x(!1);
35
+ }, []), E = h(
36
36
  (e) => {
37
- s(), p((r) => r && !r.includes(e) ? [...r, e] : r), _({
38
- app_id: i,
39
- user_id: u,
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
- [i, s, _, u]
45
- ), S = h((e, r) => {
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
- l((o) => [
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
- }, []), j = h(
61
- (e, r = !1, o = 0, J = !1) => {
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
- q(J), o !== 0 && l((n) => n.map((d) => ({ ...d, isActive: !1 })));
69
- const y = setTimeout(() => {
70
- clearTimeout(y);
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
- l((d) => {
73
- if (n >= d.length || d.length === 0)
74
- return s(), [];
72
+ y((u) => {
73
+ if (n >= u.length || u.length === 0)
74
+ return i(), [];
75
75
  m.current = n;
76
- const g = [...d];
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
- w.current.push(y);
80
+ f.current.push(d);
81
81
  },
82
- [s]
83
- ), H = R(
82
+ [i]
83
+ ), N = M(
84
84
  () => ({
85
- nextCoachmark: j,
86
- setJourney: E,
87
- addCoachmark: S,
88
- clearJourney: s,
89
- endJourney: P,
90
- coachmarks: a,
91
- userCompletedJourneyIds: k,
92
- isJourneyActive: f
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
- s,
96
+ B,
99
97
  P,
100
- a,
101
- k,
102
- f
98
+ i,
99
+ E,
100
+ l,
101
+ v,
102
+ J
103
103
  ]
104
104
  );
105
- return T(() => {
106
- i && u && $(u, {
107
- app_id: i,
108
- user_id: u,
105
+ return O(() => {
106
+ a && c && _(c, {
107
+ app_id: a,
108
+ user_id: c,
109
109
  journey_status: "COMPLETED"
110
110
  });
111
- }, [i, $, u]), T(() => {
112
- if (C) {
113
- const e = C.map((r) => r.journey_id);
111
+ }, [a, _, c]), O(() => {
112
+ if (w) {
113
+ const e = w.map((r) => r.journey_id);
114
114
  p(e);
115
115
  }
116
- }, [C]), /* @__PURE__ */ L(F.Provider, { value: H, children: [
117
- f && /* @__PURE__ */ O(
118
- G,
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: U,
123
+ $isJourneyBlurred: q,
124
+ $isBlockingJourney: b,
124
125
  "data-testid": t.current,
125
- children: a.map((e, r) => /* @__PURE__ */ O(
126
- W,
126
+ children: l.map((e, r) => /* @__PURE__ */ j(
127
+ V,
127
128
  {
128
129
  coachmark: e,
129
- isInsideScrollView: z
130
+ isInsideScrollView: D
130
131
  },
131
132
  `coachmark-${r}`
132
133
  ))
133
134
  }
134
135
  ),
135
- b
136
+ T
136
137
  ] });
137
138
  };
138
139
  export {
139
- F as JourneyContext,
140
- I as JourneyProvider
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,GA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aW,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,EA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rD;AAAA,EAAA,GACC,CAAC7B,CAAqB,CAAC,GAGvB,gBAAA+B,EAAA1D,EAAe,UAAf,EAAwB,OAAOqD,GAC7B,UAAA;AAAA,IACCtC,KAAA,gBAAA4C;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,QAAQrC,EAAY;AAAA,QACpB,OAAOA,EAAY;AAAA,QACnB,mBAAmBd;AAAA,QACnB,oBAAoBH;AAAA,QACpB,eAAaa,EAAiB;AAAA,QAE7B,UAAcN,EAAA,IAAI,CAACgC,GAAWgB,MAC7B,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YAEC,WAAAjB;AAAA,YACA,oBAAoBxB;AAAA,UAAA;AAAA,UAFf,aAAawC,CAAK;AAAA,QAAA,CAI1B;AAAA,MAAA;AAAA,IACH;AAAA,IAED1D;AAAA,EACH,EAAA,CAAA;AAEJ;"}
@@ -1,14 +1,16 @@
1
- import r, { css as e } from "styled-components";
2
- const p = r.div`
1
+ 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: ${({ theme: t }) => t.zIndex.JOURNEY_OVERLAY};
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 && e`
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 }) => theme.zIndex.JOURNEY_OVERLAY};\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","theme","height","width","$isJourneyBlurred","css"],"mappings":";AAGO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAUjB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,eAAe;AAAA,YAC5C,CAAC,EAAE,QAAAC,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;"}
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,6 @@
1
+ const T = 8, R = 100;
2
+ export {
3
+ T as DEFAULT_ARROW_SIZE,
4
+ R as THROTTLE_DURATION
5
+ };
6
+ //# sourceMappingURL=arrow-tooltip-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-tooltip-constants.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip-constants.ts"],"sourcesContent":["export const DEFAULT_ARROW_SIZE = 8;\nexport const THROTTLE_DURATION = 100;\n"],"names":["DEFAULT_ARROW_SIZE","THROTTLE_DURATION"],"mappings":"AAAO,MAAMA,IAAqB,GACrBC,IAAoB;"}
@@ -1,63 +1,15 @@
1
- import w from "styled-components";
2
- import y from "../layout/flex-view.js";
3
- import { arrowPosition as T, tooltipPosition as k, animateToolTip as m } from "./arrow-tooltip-util.js";
4
- const P = w(y)(({
5
- theme: o,
6
- $arrowColor: r,
7
- $arrowSize: t,
8
- $arrowXCoOrdinates: c,
9
- $arrowYCoOrdinates: d,
10
- $borderColor: p,
11
- $isAnimated: x,
12
- $position: n,
13
- $renderAs: s,
14
- $tooltipCoOrdinates: e,
15
- $tooltipOffset: f,
16
- $tooltipXCoOrdinates: g,
17
- $tooltipYCoOrdinates: u,
18
- $zIndex: C,
19
- $backgroundColor: O
20
- }) => {
21
- const { gutter: l } = o.layout, { REAL_BLACK_15: $ } = o.colors, { tooltipVariants: a } = o.arrowTooltip;
22
- let { backgroundColorName: i } = a[s];
23
- const { textColorName: b } = a[s];
24
- return i = O || i, `
25
- position: fixed;
26
- z-index: ${C || 1};
27
- padding: ${l * 0.25}px ${l * 0.5}px;
28
- color: ${b};
29
- box-shadow: 0px 2px 15px 0px ${$};
30
- background-color: ${o.colors[i]};
31
- border: 1px solid ${p ? o.colors[p] : "transparent"};
32
-
33
- &::after {
34
- content: '';
35
- position: absolute;
36
- height: ${t}px;
37
- width: ${t}px;
38
- clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
39
- background-color: ${r ? o.colors[r] : o.colors[i]};
40
- ${T({
41
- position: n,
42
- arrowXCoOrdinates: c,
43
- arrowYCoOrdinates: d,
44
- arrowSize: t
45
- })};
46
- }
47
-
48
- ${k({
49
- position: n,
50
- arrowSize: t,
51
- tooltipCoOrdinates: e,
52
- tooltipOffset: f,
53
- tooltipXCoOrdinates: g,
54
- tooltipYCoOrdinates: u
55
- })};
56
-
57
- ${m(x)};
58
- `;
59
- });
1
+ import o from "styled-components";
2
+ const i = o.div`
3
+ position: absolute;
4
+ top: 0;
5
+ left: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ width: 100%;
9
+ height: 100%;
10
+ z-index: ${({ theme: t }) => t.zIndex.JOURNEY_OVERLAY};
11
+ `;
60
12
  export {
61
- P as TooltipBody
13
+ i as BackgroundOverlay
62
14
  };
63
15
  //# sourceMappingURL=arrow-tooltip-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-tooltip-styled.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip-styled.tsx"],"sourcesContent":["import type { TArrowTooltipVariants, TColorNames } from '../types';\nimport type { TPositionProps, TTooltipCoOrdinatesProps } from './arrow-tooltip-types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport { animateToolTip, arrowPosition, tooltipPosition } from './arrow-tooltip-util';\n\ninterface ITooltipBodyProps {\n $arrowSize: number;\n $arrowColor?: TColorNames;\n $arrowXCoOrdinates?: number;\n $arrowYCoOrdinates?: number;\n $backgroundColor?: TColorNames;\n $borderColor?: TColorNames;\n $position: TPositionProps;\n $renderAs: TArrowTooltipVariants;\n $tooltipCoOrdinates: TTooltipCoOrdinatesProps | null;\n $tooltipOffset?: number;\n $tooltipXCoOrdinates?: number | string;\n $tooltipYCoOrdinates?: number | string;\n $zIndex?: number;\n $isAnimated?: boolean;\n}\n\nconst TooltipBody = styled(FlexView)<ITooltipBodyProps>(({\n theme,\n $arrowColor,\n $arrowSize,\n $arrowXCoOrdinates,\n $arrowYCoOrdinates,\n $borderColor,\n $isAnimated,\n $position,\n $renderAs,\n $tooltipCoOrdinates,\n $tooltipOffset,\n $tooltipXCoOrdinates,\n $tooltipYCoOrdinates,\n $zIndex,\n $backgroundColor,\n}) => {\n const { gutter } = theme.layout;\n const { REAL_BLACK_15 } = theme.colors;\n const { tooltipVariants } = theme.arrowTooltip;\n let { backgroundColorName } = tooltipVariants[$renderAs];\n const { textColorName } = tooltipVariants[$renderAs];\n\n backgroundColorName = $backgroundColor || backgroundColorName;\n\n return `\n position: fixed;\n z-index: ${$zIndex || 1};\n padding: ${gutter * 0.25}px ${gutter * 0.5}px;\n color: ${textColorName};\n box-shadow: 0px 2px 15px 0px ${REAL_BLACK_15};\n background-color: ${theme.colors[backgroundColorName]};\n border: 1px solid ${$borderColor ? theme.colors[$borderColor] : 'transparent'};\n\n &::after {\n content: '';\n position: absolute;\n height: ${$arrowSize}px;\n width: ${$arrowSize}px;\n clip-path: polygon(0% 0%, 100% 100%, 0% 100%);\n background-color: ${\n $arrowColor ? theme.colors[$arrowColor] : theme.colors[backgroundColorName]\n };\n ${arrowPosition({\n position: $position,\n arrowXCoOrdinates: $arrowXCoOrdinates,\n arrowYCoOrdinates: $arrowYCoOrdinates,\n arrowSize: $arrowSize,\n })};\n }\n\n ${tooltipPosition({\n position: $position,\n arrowSize: $arrowSize,\n tooltipCoOrdinates: $tooltipCoOrdinates,\n tooltipOffset: $tooltipOffset,\n tooltipXCoOrdinates: $tooltipXCoOrdinates,\n tooltipYCoOrdinates: $tooltipYCoOrdinates,\n })};\n\n ${animateToolTip($isAnimated)};\n `;\n});\n\nexport { TooltipBody };\n"],"names":["TooltipBody","styled","FlexView","theme","$arrowColor","$arrowSize","$arrowXCoOrdinates","$arrowYCoOrdinates","$borderColor","$isAnimated","$position","$renderAs","$tooltipCoOrdinates","$tooltipOffset","$tooltipXCoOrdinates","$tooltipYCoOrdinates","$zIndex","$backgroundColor","gutter","REAL_BLACK_15","tooltipVariants","backgroundColorName","textColorName","arrowPosition","tooltipPosition","animateToolTip"],"mappings":";;;AAyBA,MAAMA,IAAcC,EAAOC,CAAQ,EAAqB,CAAC;AAAA,EACvD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,kBAAAC;AACF,MAAM;AACE,QAAA,EAAE,QAAAC,EAAO,IAAIf,EAAM,QACnB,EAAE,eAAAgB,EAAc,IAAIhB,EAAM,QAC1B,EAAE,iBAAAiB,EAAgB,IAAIjB,EAAM;AAClC,MAAI,EAAE,qBAAAkB,EAAA,IAAwBD,EAAgBT,CAAS;AACvD,QAAM,EAAE,eAAAW,EAAA,IAAkBF,EAAgBT,CAAS;AAEnD,SAAAU,IAAsBJ,KAAoBI,GAEnC;AAAA;AAAA,eAEML,KAAW,CAAC;AAAA,eACZE,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA,aACjCI,CAAa;AAAA,mCACSH,CAAa;AAAA,wBACxBhB,EAAM,OAAOkB,CAAmB,CAAC;AAAA,wBACjCb,IAAeL,EAAM,OAAOK,CAAY,IAAI,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKjEH,CAAU;AAAA,eACXA,CAAU;AAAA;AAAA,0BAGjBD,IAAcD,EAAM,OAAOC,CAAW,IAAID,EAAM,OAAOkB,CAAmB,CAC5E;AAAA,QACEE,EAAc;AAAA,IACd,UAAUb;AAAA,IACV,mBAAmBJ;AAAA,IACnB,mBAAmBC;AAAA,IACnB,WAAWF;AAAA,EAAA,CACZ,CAAC;AAAA;AAAA;AAAA,MAGFmB,EAAgB;AAAA,IAChB,UAAUd;AAAA,IACV,WAAWL;AAAA,IACX,oBAAoBO;AAAA,IACpB,eAAeC;AAAA,IACf,qBAAqBC;AAAA,IACrB,qBAAqBC;AAAA,EAAA,CACtB,CAAC;AAAA;AAAA,MAEAU,EAAehB,CAAW,CAAC;AAAA;AAEjC,CAAC;"}
1
+ {"version":3,"file":"arrow-tooltip-styled.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const BackgroundOverlay = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: ${({ theme }) => theme.zIndex.JOURNEY_OVERLAY};\n`;\n"],"names":["BackgroundOverlay","styled","theme"],"mappings":";AAEO,MAAMA,IAAoBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAQ3B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,eAAe;AAAA;"}
@@ -1,105 +1,100 @@
1
- import { jsxs as U, Fragment as W, jsx as e } from "react/jsx-runtime";
2
- import Y from "../../../node_modules/lodash.throttle/index.js";
3
- import { useRef as H, useState as m, useCallback as $, useEffect as C } from "react";
4
- import { useTheme as P } from "styled-components";
5
- import w from "../layout/flex-view.js";
6
- import Z from "../portal/portal.js";
7
- import q from "../text/text.js";
8
- import { TooltipBody as G } from "./arrow-tooltip-styled.js";
1
+ import { jsxs as D, Fragment as U, jsx as e } from "react/jsx-runtime";
2
+ import W from "../../../node_modules/lodash.throttle/index.js";
3
+ import { memo as Y, useRef as H, useState as f, useCallback as p, useEffect as m } from "react";
4
+ import $ from "../layout/flex-view.js";
5
+ import P from "../portal/portal.js";
6
+ import { THROTTLE_DURATION as Z, DEFAULT_ARROW_SIZE as q } from "./arrow-tooltip-constants.js";
7
+ import { BackgroundOverlay as G } from "./arrow-tooltip-styled.js";
9
8
  import { computeTooltipNewCoOrdinates as J } from "./arrow-tooltip-util.js";
10
- const K = 8, Q = 100, V = ({
11
- isAnimated: O,
9
+ import K from "./comps/tooltip-body.js";
10
+ const Q = ({
11
+ isAnimated: C,
12
12
  alwaysVisible: o = !1,
13
- arrowColor: T,
14
- arrowSize: E = K,
15
- arrowXCoOrdinates: g,
16
- arrowYCoOrdinates: h,
13
+ arrowColor: O,
14
+ arrowSize: w = q,
15
+ arrowXCoOrdinates: E,
16
+ arrowYCoOrdinates: T,
17
17
  backgroundColor: v,
18
18
  borderColor: R,
19
- children: x,
19
+ children: h,
20
20
  hidden: t,
21
21
  position: l,
22
- renderAs: s,
22
+ renderAs: A,
23
23
  textVariant: L,
24
- tooltipItem: c,
25
- tooltipOffset: A,
26
- tooltipXCoOrdinates: b,
27
- tooltipYCoOrdinates: N,
28
- width: k,
29
- widthX: z,
30
- zIndex: F,
31
- parentWidth: M
24
+ tooltipItem: g,
25
+ tooltipOffset: x,
26
+ tooltipXCoOrdinates: z,
27
+ tooltipYCoOrdinates: I,
28
+ width: b,
29
+ widthX: k,
30
+ zIndex: B,
31
+ parentWidth: F,
32
+ isBlocking: M = !1
32
33
  }) => {
33
- const { arrowTooltip: S } = P(), { tooltipVariants: a } = S, { backgroundColorName: X } = a[s], d = H(null), [_, f] = m(o), [j, B] = m(
34
+ const u = H(null), [N, d] = f(o), [S, X] = f(
34
35
  null
35
- ), u = $(
36
+ ), s = p(
36
37
  (n, i) => {
37
- B(n), f(i);
38
+ X(n), d(i);
38
39
  },
39
40
  []
40
- ), D = $(() => {
41
+ ), _ = p(() => {
41
42
  if (t || o)
42
43
  return null;
43
- u(null, !1);
44
- }, [o, u, t]), r = Y(() => {
45
- var p;
46
- const { current: n } = d;
44
+ s(null, !1);
45
+ }, [o, s, t]), r = W(() => {
46
+ var a;
47
+ const { current: n } = u;
47
48
  if (t || !n) return null;
48
- const i = (p = n.children[0]) == null ? void 0 : p.getBoundingClientRect(), I = i ? J(l, i) : null;
49
- return u(I, !0), null;
50
- }, Q);
51
- return C(() => {
49
+ const i = (a = n.children[0]) == null ? void 0 : a.getBoundingClientRect(), j = i ? J(l, i) : null;
50
+ return s(j, !0), null;
51
+ }, Z);
52
+ m(() => {
52
53
  if (!(!o || t))
53
54
  return window.addEventListener("scroll", r, !0), window.addEventListener("resize", r), () => {
54
55
  window.removeEventListener("scroll", r, !0), window.removeEventListener("resize", r);
55
56
  };
56
- }, [o, t, l, r]), C(() => {
57
- t && f(!1), o && r();
58
- }, [o, t]), /* @__PURE__ */ U(W, { children: [
57
+ }, [o, t, l, r]), m(() => {
58
+ t && d(!1), o && r();
59
+ }, [o, t]);
60
+ const c = /* @__PURE__ */ e(
61
+ K,
62
+ {
63
+ $arrowSize: w,
64
+ $arrowXCoOrdinates: E,
65
+ $arrowYCoOrdinates: T,
66
+ $position: l,
67
+ $renderAs: A,
68
+ $tooltipCoOrdinates: S,
69
+ $tooltipOffset: x,
70
+ $tooltipXCoOrdinates: z,
71
+ $tooltipYCoOrdinates: I,
72
+ $zIndex: B,
73
+ $backgroundColor: v,
74
+ $arrowColor: O,
75
+ $borderColor: R,
76
+ $isAnimated: C,
77
+ $width: b,
78
+ $widthX: k,
79
+ textVariant: L || "body3",
80
+ children: g
81
+ }
82
+ );
83
+ return /* @__PURE__ */ D(U, { children: [
59
84
  /* @__PURE__ */ e(
60
- w,
85
+ $,
61
86
  {
62
- $width: M || "fit-content",
63
- ref: d,
87
+ $width: F || "fit-content",
88
+ ref: u,
64
89
  onMouseEnter: r,
65
- onMouseLeave: D,
66
- children: /* @__PURE__ */ e(w, { children: x })
90
+ onMouseLeave: _,
91
+ children: /* @__PURE__ */ e($, { children: h })
67
92
  }
68
93
  ),
69
- _ && /* @__PURE__ */ e(Z, { portalId: "tooltip-root", children: /* @__PURE__ */ e(
70
- G,
71
- {
72
- $arrowSize: E,
73
- $arrowXCoOrdinates: g,
74
- $arrowYCoOrdinates: h,
75
- $position: l,
76
- $renderAs: s,
77
- $tooltipCoOrdinates: j,
78
- $tooltipOffset: A,
79
- $tooltipXCoOrdinates: b,
80
- $tooltipYCoOrdinates: N,
81
- $width: k,
82
- $widthX: z,
83
- $zIndex: F,
84
- $background: X,
85
- $backgroundColor: v,
86
- $arrowColor: T,
87
- $borderColor: R,
88
- $isAnimated: O,
89
- children: typeof c == "string" ? /* @__PURE__ */ e(
90
- q,
91
- {
92
- $renderAs: L || "body3",
93
- $color: a[s].textColorName,
94
- $align: "center",
95
- children: c
96
- }
97
- ) : c
98
- }
99
- ) })
94
+ N && /* @__PURE__ */ e(P, { portalId: "tooltip-root", children: M ? /* @__PURE__ */ e(G, { children: c }) : c })
100
95
  ] });
101
- }, co = V;
96
+ }, so = Y(Q);
102
97
  export {
103
- co as default
98
+ so as default
104
99
  };
105
100
  //# sourceMappingURL=arrow-tooltip.js.map