@cuemath/leap 3.3.5 → 3.3.6

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 (131) hide show
  1. package/dist/assets/illustrations/illustrations.js +3 -1
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +1 -0
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/constants/config.js +5 -0
  6. package/dist/constants/config.js.map +1 -0
  7. package/dist/features/auth/comps/otp-input/otp-input.js +19 -18
  8. package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
  9. package/dist/features/auth/comps/pill-button/pill-button-styled.js +17 -17
  10. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -1
  11. package/dist/features/auth/comps/pill-button/pill-button.js +35 -33
  12. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
  13. package/dist/features/auth/comps/user-list/user-item/user-item.js +32 -30
  14. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  15. package/dist/features/auth/comps/user-list/user-list.js +20 -19
  16. package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
  17. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +9 -9
  18. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -1
  19. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +58 -29
  20. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -1
  21. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +78 -41
  22. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -1
  23. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +37 -35
  24. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -1
  25. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +76 -71
  26. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
  27. package/dist/features/auth/signup/custom-input-field/custom-input-field.js +55 -50
  28. package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
  29. package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +47 -25
  30. package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +1 -1
  31. package/dist/features/milestone/constants.js +2 -1
  32. package/dist/features/milestone/constants.js.map +1 -1
  33. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
  34. package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js +25 -0
  35. package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js.map +1 -0
  36. package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js +15 -0
  37. package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js.map +1 -0
  38. package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js +90 -0
  39. package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js.map +1 -0
  40. package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js +19 -0
  41. package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js.map +1 -0
  42. package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js +32 -0
  43. package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js.map +1 -0
  44. package/dist/features/parent-dashboard/comps/math-practice/math-practice.js +67 -0
  45. package/dist/features/parent-dashboard/comps/math-practice/math-practice.js.map +1 -0
  46. package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js +42 -0
  47. package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js.map +1 -0
  48. package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js +20 -0
  49. package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js.map +1 -0
  50. package/dist/features/student-details/class-details/class-details-utils.js +6 -6
  51. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js +25 -0
  52. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
  53. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js +43 -0
  54. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
  55. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js +49 -0
  56. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
  57. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +29 -0
  58. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +1 -0
  59. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +131 -0
  60. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +1 -0
  61. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
  62. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
  63. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
  64. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
  65. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js +17 -0
  66. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
  67. package/dist/features/trial-session/comps/pla/session-status/session-status.js +126 -0
  68. package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
  69. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +52 -0
  70. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
  71. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +52 -0
  72. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
  73. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js +17 -0
  74. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
  75. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
  76. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
  77. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js +5 -0
  78. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
  79. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js +17 -0
  80. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
  81. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js +5 -0
  82. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
  83. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +96 -0
  84. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
  85. package/dist/features/trial-session/comps/session-report/report-information/report-card.js +31 -16
  86. package/dist/features/trial-session/comps/session-report/report-information/report-card.js.map +1 -1
  87. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +21 -13
  88. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
  89. package/dist/features/trial-session/comps/session-report/report-information/report-information.js +166 -94
  90. package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
  91. package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js +46 -31
  92. package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js.map +1 -1
  93. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js +12 -0
  94. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js.map +1 -0
  95. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +121 -42
  96. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -1
  97. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +174 -56
  98. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
  99. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  100. package/dist/features/ui/buttons/icon-button/icon-button.js +32 -29
  101. package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
  102. package/dist/features/ui/modals/modal.js +30 -28
  103. package/dist/features/ui/modals/modal.js.map +1 -1
  104. package/dist/index.d.ts +95 -10
  105. package/dist/index.js +388 -368
  106. package/dist/index.js.map +1 -1
  107. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
  108. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
  109. package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
  110. package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
  111. package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
  112. package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
  113. package/dist/node_modules/date-fns/fromUnixTime.js +9 -0
  114. package/dist/node_modules/date-fns/fromUnixTime.js.map +1 -0
  115. package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
  116. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  117. package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
  118. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  119. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
  120. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  121. package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
  122. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  123. package/dist/static/{book-checked-green.c275dbd9.svg → book-checked-green.0436b91e.svg} +1 -1
  124. package/dist/static/community-bulb-yellow-2.f89c30f9.svg +1 -0
  125. package/dist/static/learning-puzzle-bot.6fe93cf6.svg +1 -0
  126. package/dist/static/username-responsive.787b5515.json +1 -0
  127. package/package.json +1 -1
  128. package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
  129. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
  130. package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
  131. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
@@ -1,54 +1,58 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { memo as E, forwardRef as H, useRef as c, useState as g, useCallback as j, useEffect as B, useImperativeHandle as T, useLayoutEffect as F } from "react";
3
- import P from "../../../../assets/line-icons/icons/back2.js";
4
- import z from "../../../../assets/line-icons/icons/next2.js";
5
- import M from "../../../ui/animated-arc/animated-arc.js";
6
- import C from "../../../ui/buttons/icon-button/icon-button.js";
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { memo as j, forwardRef as M, useRef as l, useState as g, useCallback as F, useEffect as O, useImperativeHandle as P, useLayoutEffect as z } from "react";
3
+ import { useTheme as D } from "styled-components";
4
+ import V from "../../../../assets/line-icons/icons/back2.js";
5
+ import X from "../../../../assets/line-icons/icons/next2.js";
6
+ import K from "../../../ui/animated-arc/animated-arc.js";
7
+ import y from "../../../ui/buttons/icon-button/icon-button.js";
7
8
  import N from "../../../ui/layout/flex-view.js";
8
- import O from "../../../ui/lottie-animation/lottie-animation.js";
9
- import V from "../../../ui/separator/separator.js";
10
- import X from "../../../ui/text/text.js";
11
- import { Container as D, CircularStepContainer as K, ContentWrapper as Y, InputContainer as _, FooterWrapper as q, PrevButtonWrapper as G, NextButtonWrapper as J } from "./circular-step-wrapper-styled.js";
12
- const Q = {
9
+ import Y from "../../../ui/lottie-animation/lottie-animation.js";
10
+ import _ from "../../../ui/separator/separator.js";
11
+ import q from "../../../ui/text/text.js";
12
+ import { EDeviceType as G } from "../../../ui/theme/constants.js";
13
+ import { Container as J, CircularStepContainer as Q, ContentWrapper as U, InputContainer as Z, FooterWrapper as ee, PrevButtonWrapper as te, NextButtonWrapper as re } from "./circular-step-wrapper-styled.js";
14
+ const ne = {
13
15
  autoplay: !1,
14
16
  loop: !1,
15
17
  renderer: "canvas",
16
18
  rendererSettings: {
17
19
  preserveAspectRatio: "xMidYMin slice"
18
20
  }
19
- }, U = H(
21
+ }, oe = M(
20
22
  ({
21
- children: y,
22
- onGoBack: I,
23
- onNext: x,
24
- label: a,
25
- showNext: A,
26
- showPrevious: S,
23
+ children: I,
24
+ onGoBack: b,
25
+ onNext: v,
26
+ label: u,
27
+ showNext: S,
28
+ showPrevious: k,
27
29
  animation: r,
28
30
  introFrames: w,
29
- outroFrames: R,
30
- isNextLoading: s,
31
- progressAngle: l,
32
- footerElement: u
31
+ outroFrames: x,
32
+ isNextLoading: i,
33
+ progressAngle: c,
34
+ footerElement: m,
35
+ isNextDisabled: A,
36
+ animationSrcMobile: R
33
37
  }, W) => {
34
- const t = c(null), o = c(null), [m, k] = g(), [v, d] = g(!1), i = c(null), L = j(() => {
35
- r && t.current && (t.current.playSegments(w, !0), d(!0));
38
+ const t = l(null), s = l(null), [d, E] = g(), [L, p] = g(!1), a = l(null), { device: T } = D(), n = T <= G.MOBILE, B = F(() => {
39
+ r && t.current && (t.current.playSegments(w, !0), p(!0));
36
40
  }, [r]);
37
- return B(() => () => {
38
- i.current && clearTimeout(i.current);
39
- }, [r]), T(W, () => ({
40
- playOutroAndFadeOut: async () => new Promise((b) => {
41
- var f, h;
42
- const p = () => {
43
- var $;
44
- b(), ($ = t.current) == null || $.removeEventListener("complete", p);
41
+ return O(() => () => {
42
+ a.current && clearTimeout(a.current);
43
+ }, [r]), P(W, () => ({
44
+ playOutroAndFadeOut: async () => new Promise((H) => {
45
+ var h, $;
46
+ const f = () => {
47
+ var C;
48
+ H(), (C = t.current) == null || C.removeEventListener("complete", f);
45
49
  };
46
- (f = t.current) == null || f.playSegments(R, !0), i.current = setTimeout(() => d(!1), 400), (h = t.current) == null || h.addEventListener("complete", p);
50
+ (h = t.current) == null || h.playSegments(x, !0), a.current = setTimeout(() => p(!1), 400), ($ = t.current) == null || $.addEventListener("complete", f);
47
51
  })
48
- })), F(() => {
49
- o.current && k(o.current.offsetHeight);
50
- }, []), /* @__PURE__ */ n(
51
- D,
52
+ })), z(() => {
53
+ s.current && E(s.current.offsetHeight);
54
+ }, []), /* @__PURE__ */ o(
55
+ J,
52
56
  {
53
57
  $flex: 1,
54
58
  $flexDirection: "column",
@@ -56,78 +60,79 @@ const Q = {
56
60
  $justifyContent: "center",
57
61
  $width: "100%",
58
62
  $height: "100%",
59
- ref: o,
63
+ ref: s,
60
64
  children: [
61
- m && /* @__PURE__ */ e(
62
- O,
65
+ d && /* @__PURE__ */ e(
66
+ Y,
63
67
  {
64
68
  width: 1280,
65
- height: m,
66
- src: r,
69
+ height: d,
70
+ src: n ? R ?? r : r,
67
71
  ref: t,
68
- onRender: L,
69
- settings: Q
72
+ onRender: B,
73
+ settings: ne
70
74
  }
71
75
  ),
72
- /* @__PURE__ */ n(
73
- K,
76
+ /* @__PURE__ */ o(
77
+ Q,
74
78
  {
75
- $width: 400,
76
- $height: 400,
79
+ $width: n ? 290 : 400,
80
+ $height: n ? 290 : 400,
77
81
  $background: "REAL_BLACK",
78
82
  $alignItems: "center",
79
83
  $justifyContent: "center",
80
84
  children: [
81
- l && /* @__PURE__ */ e(
82
- M,
85
+ c && /* @__PURE__ */ e(
86
+ K,
83
87
  {
84
- radius: 200,
88
+ radius: c ? 145 : 200,
85
89
  strokeWidth: 2,
86
90
  color: "WHITE",
87
- targetAngle: l,
91
+ targetAngle: c,
88
92
  mode: "fade",
89
93
  duration: 1
90
94
  }
91
95
  ),
92
- /* @__PURE__ */ n(Y, { $isVisible: v, $width: "100%", children: [
93
- a && /* @__PURE__ */ n(N, { $gutterX: 3.5, children: [
94
- /* @__PURE__ */ e(X, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: a }),
95
- /* @__PURE__ */ e(V, { heightX: 1 })
96
+ /* @__PURE__ */ o(U, { $isVisible: L, $width: "100%", children: [
97
+ u && /* @__PURE__ */ o(N, { $gutterX: n ? 1.5 : 3.5, children: [
98
+ /* @__PURE__ */ e(q, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: u }),
99
+ /* @__PURE__ */ e(_, { heightX: 1 })
96
100
  ] }),
97
- /* @__PURE__ */ e(_, { children: y })
101
+ /* @__PURE__ */ e(Z, { children: I })
98
102
  ] })
99
103
  ]
100
104
  }
101
105
  ),
102
- u && /* @__PURE__ */ e(q, { $alignItems: "center", $justifyContent: "center", children: u }),
103
- S && /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
104
- C,
106
+ m && /* @__PURE__ */ e(ee, { $alignItems: "center", $justifyContent: "center", children: m }),
107
+ k && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
108
+ y,
105
109
  {
106
- Icon: P,
107
- renderAs: "secondary-dark",
110
+ Icon: V,
111
+ renderAs: "black-dark",
108
112
  analyticsLabel: "Prev",
109
- onClick: I,
110
- disabled: s,
113
+ onClick: b,
114
+ disabled: i,
111
115
  size: "small"
112
116
  }
113
117
  ) }),
114
- A && /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
115
- C,
118
+ S && /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(
119
+ y,
116
120
  {
117
121
  size: "small",
118
- Icon: z,
122
+ Icon: X,
119
123
  renderAs: "secondary-dark",
120
124
  analyticsLabel: "Next",
121
- onClick: x,
122
- busy: s
125
+ onClick: v,
126
+ busy: i,
127
+ disabled: i || A
123
128
  }
124
129
  ) })
125
130
  ]
126
131
  }
127
132
  );
128
133
  }
129
- ), ue = E(U);
134
+ ), ge = j(oe);
130
135
  export {
131
- ue as default
136
+ ge as default
132
137
  };
133
138
  //# sourceMappingURL=circular-step-wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n memo,\n type Ref,\n} from 'react';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport AnimatedArc from '../../../ui/animated-arc/animated-arc';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n progressAngle,\n footerElement,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setShowContent(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n timeoutRef.current = setTimeout(() => setShowContent(false), 400);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={400}\n $height={400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={200}\n strokeWidth={2}\n color=\"WHITE\"\n targetAngle={progressAngle}\n mode=\"fade\"\n duration={1}\n />\n )}\n <Styled.ContentWrapper $isVisible={showContent} $width=\"100%\">\n {label && (\n <FlexView $gutterX={3.5}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n )}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {footerElement && (\n <Styled.FooterWrapper $alignItems=\"center\" $justifyContent=\"center\">\n {footerElement}\n </Styled.FooterWrapper>\n )}\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Prev\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"small\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"small\"\n Icon={Next2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default memo(CircularStepWrapper);\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","progressAngle","footerElement","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","timeoutRef","onLottieRender","useCallback","useEffect","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","AnimatedArc","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.FooterWrapper","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","circularStepWrapper","memo"],"mappings":";;;;;;;;;;;AAyBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,IAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,KAEFC,MACG;AACG,UAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAAeD,EAAuB,IAAI,GAC1C,CAACE,GAAiBC,CAAkB,IAAIC,EAA6B,GACrE,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAK,GAC9CG,IAAaP,EAA8B,IAAI,GAE/CQ,IAAiBC,EAAY,MAAM;AACnC,MAAAjB,KAAaO,EAAa,YACfA,EAAA,QAAQ,aAAaN,GAAa,EAAI,GACnDa,EAAe,EAAI;AAAA,IACrB,GAEC,CAACd,CAAS,C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aAAa;AAAA,oBACb,OAAM;AAAA,oBACN,aAAa1B;AAAA,oBACb,MAAK;AAAA,oBACL,UAAU;AAAA,kBAAA;AAAA,gBACZ;AAAA,kCAED2B,GAAA,EAAsB,YAAYlB,GAAa,QAAO,QACpD,UAAA;AAAA,kBACChB,KAAA,gBAAA4B,EAACO,GAAS,EAAA,UAAU,KAClB,UAAA;AAAA,oBAAA,gBAAAL,EAACM,KAAK,WAAU,OAAM,QAAO,SAAQ,QAAO,UACzC,UACHpC,EAAA,CAAA;AAAA,oBACA,gBAAA8B,EAACO,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,kBAAA,GACzB;AAAA,kBAED,gBAAAP,EAAAQ,GAAA,EAAuB,UAAAzC,GAAS;AAAA,gBAAA,GACnC;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,UACCW,uBACE+B,GAAA,EAAqB,aAAY,UAAS,iBAAgB,UACxD,UACH/B,GAAA;AAAA,UAEDN,KACC,gBAAA4B,EAACU,GAAA,EACC,UAAA,gBAAAV;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,MAAMC;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAAS5C;AAAA,cACT,UAAUQ;AAAA,cACV,MAAK;AAAA,YAAA;AAAA,UAAA,GAET;AAAA,UAEDL,KACC,gBAAA6B,EAACa,GAAA,EACC,UAAA,gBAAAb;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAMG;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAAS7C;AAAA,cACT,MAAMO;AAAA,YAAA;AAAA,UAAA,GAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF,GAEeuC,KAAAC,EAAKnD,CAAmB;"}
1
+ {"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n memo,\n type Ref,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport AnimatedArc from '../../../ui/animated-arc/animated-arc';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n progressAngle,\n footerElement,\n isNextDisabled,\n animationSrcMobile,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setShowContent(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n timeoutRef.current = setTimeout(() => setShowContent(false), 400);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={isMobile ? animationSrcMobile ?? animation : animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={isMobile ? 290 : 400}\n $height={isMobile ? 290 : 400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={progressAngle ? 145 : 200}\n strokeWidth={2}\n color=\"WHITE\"\n targetAngle={progressAngle}\n mode=\"fade\"\n duration={1}\n />\n )}\n <Styled.ContentWrapper $isVisible={showContent} $width=\"100%\">\n {label && (\n <FlexView $gutterX={isMobile ? 1.5 : 3.5}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n )}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {footerElement && (\n <Styled.FooterWrapper $alignItems=\"center\" $justifyContent=\"center\">\n {footerElement}\n </Styled.FooterWrapper>\n )}\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"black-dark\"\n analyticsLabel=\"Prev\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"small\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"small\"\n Icon={Next2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n disabled={isNextLoading || isNextDisabled}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default memo(CircularStepWrapper);\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","progressAngle","footerElement","isNextDisabled","animationSrcMobile","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","timeoutRef","device","useTheme","isMobile","EDeviceType","onLottieRender","useCallback","useEffect","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","AnimatedArc","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.FooterWrapper","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","circularStepWrapper","memo"],"mappings":";;;;;;;;;;;;;AA2BA,MAAMA,KAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,KAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,KAEFC,MACG;AACG,UAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAA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AAAA,UAEDL,KACC,gBAAAmC,EAACa,IAAA,EACC,UAAA,gBAAAb;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAMG;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAASnD;AAAA,cACT,MAAMO;AAAA,cACN,UAAUA,KAAiBG;AAAA,YAAA;AAAA,UAAA,GAE/B;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF,GAEe0C,KAAAC,EAAKzD,EAAmB;"}
@@ -1,91 +1,96 @@
1
- import { jsx as c, jsxs as y } from "react/jsx-runtime";
2
- import { memo as A, useState as g, useRef as C, useCallback as a, useMemo as I, useEffect as T } from "react";
3
- import { useTheme as H } from "styled-components";
4
- import L from "../../../ui/layout/flex-view.js";
5
- import M from "./country-selector/country-selector.js";
6
- import { CustomInput as N } from "./custom-input-field-styled.js";
1
+ import { jsx as c, jsxs as K } from "react/jsx-runtime";
2
+ import { memo as L, useState as C, useRef as I, useCallback as p, useMemo as T, useEffect as W } from "react";
3
+ import { useTheme as A } from "styled-components";
4
+ import B from "../../../ui/layout/flex-view.js";
5
+ import { EDeviceType as H } from "../../../ui/theme/constants.js";
6
+ import N from "./country-selector/country-selector.js";
7
+ import { CustomInput as O } from "./custom-input-field-styled.js";
7
8
  import X from "./input-wrapper/input-wrapper.js";
8
9
  import _ from "./password-toggle/password-toggle.js";
9
10
  const q = ({
10
- value: o,
11
- onChange: m,
11
+ value: r,
12
+ onChange: d,
12
13
  error: u,
13
- helperText: W,
14
+ helperText: b,
14
15
  onEnter: n,
15
- isLoading: b,
16
- isValid: p,
17
- type: e = "text",
16
+ isLoading: D,
17
+ isValid: h,
18
+ type: t = "text",
18
19
  placeholder: F,
19
20
  actionElement: R,
20
21
  maxLength: $,
21
- width: D,
22
+ width: E,
22
23
  textTransform: P,
23
- textAlign: S = "center",
24
- selectedCountry: V,
25
- onCountryChange: j,
26
- autoSize: d = !1
24
+ textAlign: v = "center",
25
+ selectedCountry: M,
26
+ onCountryChange: S,
27
+ autoSize: x = !1
27
28
  }) => {
28
- const r = H(), [l, k] = g(!1), [z, h] = g(32), f = C(null), s = C(null), E = a(
29
- (t) => {
30
- t.key === "Enter" && (n == null || n());
29
+ const o = A(), l = o.device <= H.MOBILE, [f, V] = C(!1), [j, m] = C(l ? 24 : 32), a = I(null), s = I(null), k = p(
30
+ (e) => {
31
+ e.key === "Enter" && (n == null || n());
31
32
  },
32
33
  [n]
33
- ), G = I(() => e === "password" ? l ? "text" : "password" : e === "phone" ? "number" : e, [e, l]), K = I(() => u ? r.colors.RED : p ? r.colors.GREEN_4 : r.colors.WHITE, [u, p, r.colors]), x = a((t, w) => {
34
+ ), y = T(() => t === "password" ? f ? "text" : "password" : t === "phone" ? "number" : t, [t, f]), z = T(() => u ? o.colors.RED : h ? o.colors.GREEN_4 : o.colors.WHITE, [u, h, o.colors]), w = p((e, g) => {
34
35
  s.current || (s.current = document.createElement("canvas"));
35
36
  const i = s.current.getContext("2d");
36
- return i ? (i.font = w, i.measureText(t).width) : 0;
37
+ return i ? (i.font = g, i.measureText(e).width) : 0;
37
38
  }, []);
38
- T(() => {
39
- if (!f.current || !o || !d)
39
+ W(() => {
40
+ if (!a.current || !r || !x)
40
41
  return;
41
- const t = f.current.clientWidth;
42
- x(o, "32px 'Athletics-Light'") > t ? h(24) : h(32);
43
- }, [o, x, d]), T(() => () => {
42
+ if (l) {
43
+ m(24);
44
+ return;
45
+ }
46
+ const e = a.current.clientWidth;
47
+ w(r, "32px 'Athletics-Light'") > e ? m(24) : m(32);
48
+ }, [r, w, x, l]), W(() => () => {
44
49
  s.current = null;
45
50
  }, []);
46
- const v = a(
47
- (t) => m(t.target.value),
48
- [m]
51
+ const G = p(
52
+ (e) => d(e.target.value),
53
+ [d]
49
54
  );
50
55
  return /* @__PURE__ */ c(
51
56
  X,
52
57
  {
53
- helperText: u || W,
54
- isLoading: b,
58
+ helperText: u || b,
59
+ isLoading: D,
55
60
  actionElement: R,
56
- children: /* @__PURE__ */ y(
57
- L,
61
+ children: /* @__PURE__ */ K(
62
+ B,
58
63
  {
59
- $width: D ?? "100%",
64
+ $width: E ?? "100%",
60
65
  $flex: 1,
61
66
  $alignItems: "center",
62
67
  $flexDirection: "row",
63
68
  $flexGapX: 0.5,
64
69
  children: [
65
- e === "phone" && /* @__PURE__ */ c(M, { onChange: j, value: V }),
70
+ t === "phone" && /* @__PURE__ */ c(N, { onChange: S, value: M }),
66
71
  /* @__PURE__ */ c(
67
- N,
72
+ O,
68
73
  {
69
- ref: f,
70
- value: o,
71
- onChange: v,
74
+ ref: a,
75
+ value: r,
76
+ onChange: G,
72
77
  autoFocus: !0,
73
78
  placeholder: F,
74
- color: K,
79
+ color: z,
75
80
  autoCapitalize: "none",
76
81
  textTransform: P,
77
- type: G,
78
- onKeyDown: E,
82
+ type: y,
83
+ onKeyDown: k,
79
84
  maxLength: $,
80
- align: S,
81
- fontSize: z
85
+ align: v,
86
+ fontSize: j
82
87
  }
83
88
  ),
84
- e === "password" && /* @__PURE__ */ c(
89
+ t === "password" && /* @__PURE__ */ c(
85
90
  _,
86
91
  {
87
- isVisible: l,
88
- onToggle: () => k((t) => !t)
92
+ isVisible: f,
93
+ onToggle: () => V((e) => !e)
89
94
  }
90
95
  )
91
96
  ]
@@ -93,8 +98,8 @@ const q = ({
93
98
  )
94
99
  }
95
100
  );
96
- }, et = A(q);
101
+ }, ne = L(q);
97
102
  export {
98
- et as default
103
+ ne as default
99
104
  };
100
105
  //# sourceMappingURL=custom-input-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n memo,\n type FC,\n type KeyboardEvent,\n type ChangeEvent,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport PhoneCountrySelector from './country-selector/country-selector';\nimport * as Styled from './custom-input-field-styled';\nimport InputWrapper from './input-wrapper/input-wrapper';\nimport PasswordToggleIcon from './password-toggle/password-toggle';\n\nconst CustomInputField: FC<ICustomInputFieldProps> = ({\n value,\n onChange,\n error,\n helperText,\n onEnter,\n isLoading,\n isValid,\n type = 'text',\n placeholder,\n actionElement,\n maxLength,\n width,\n textTransform,\n textAlign = 'center',\n selectedCountry,\n onCountryChange,\n autoSize = false,\n}) => {\n const theme = useTheme();\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const [fontSize, setFontSize] = useState(32);\n const inputRef = useRef<HTMLInputElement>(null);\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const inputType = useMemo(() => {\n if (type === 'password') return isPasswordVisible ? 'text' : 'password';\n\n if (type === 'phone') return 'number';\n\n return type;\n }, [type, isPasswordVisible]);\n\n const inputColor = useMemo(() => {\n if (error) return theme.colors.RED;\n\n if (isValid) return theme.colors.GREEN_4;\n\n return theme.colors.WHITE;\n }, [error, isValid, theme.colors]);\n\n const measureTextWidth = useCallback((text: string, font: string): number => {\n if (!canvasRef.current) {\n canvasRef.current = document.createElement('canvas');\n }\n\n const context = canvasRef.current.getContext('2d');\n\n if (!context) return 0;\n\n context.font = font;\n\n return context.measureText(text).width;\n }, []);\n\n useEffect(() => {\n if (!inputRef.current || !value || !autoSize) {\n return;\n }\n\n const inputWidth = inputRef.current.clientWidth;\n\n const font32 = \"32px 'Athletics-Light'\";\n\n const textWidth32 = measureTextWidth(value, font32);\n\n if (textWidth32 > inputWidth) {\n setFontSize(24);\n } else {\n setFontSize(32);\n }\n }, [value, measureTextWidth, autoSize]);\n\n useEffect(() => {\n return () => {\n canvasRef.current = null;\n };\n }, []);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.value),\n [onChange],\n );\n\n return (\n <InputWrapper\n helperText={error || helperText}\n isLoading={isLoading}\n actionElement={actionElement}\n >\n <FlexView\n $width={width ?? '100%'}\n $flex={1}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n {type === 'phone' && (\n <PhoneCountrySelector onChange={onCountryChange} value={selectedCountry} />\n )}\n <Styled.CustomInput\n ref={inputRef}\n value={value}\n onChange={handleChange}\n autoFocus\n placeholder={placeholder}\n color={inputColor}\n autoCapitalize=\"none\"\n textTransform={textTransform}\n type={inputType}\n onKeyDown={handleKeyDown}\n maxLength={maxLength}\n align={textAlign}\n fontSize={fontSize}\n />\n {type === 'password' && (\n <PasswordToggleIcon\n isVisible={isPasswordVisible}\n onToggle={() => setIsPasswordVisible(prev => !prev)}\n />\n )}\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default memo(CustomInputField);\n"],"names":["CustomInputField","value","onChange","error","helperText","onEnter","isLoading","isValid","type","placeholder","actionElement","maxLength","width","textTransform","textAlign","selectedCountry","onCountryChange","autoSize","theme","useTheme","isPasswordVisible","setIsPasswordVisible","useState","fontSize","setFontSize","inputRef","useRef","canvasRef","handleKeyDown","useCallback","event","inputType","useMemo","inputColor","measureTextWidth","text","font","context","useEffect","inputWidth","handleChange","jsx","InputWrapper","jsxs","FlexView","PhoneCountrySelector","Styled.CustomInput","PasswordToggleIcon","prev","customInputField","memo"],"mappings":";;;;;;;;AAqBA,MAAMA,IAA+C,CAAC;AAAA,EACpD,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,iBAAAC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eX;AAAA,IACnB,CAACC,MAAyC5B,EAAS4B,EAAM,OAAO,KAAK;AAAA,IACrE,CAAC5B,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAuC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYvC,KAASC;AAAA,MACrB,WAAAE;AAAA,MACA,eAAAI;AAAA,MAEA,UAAA,gBAAAiC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,QAAQhC,KAAS;AAAA,UACjB,OAAO;AAAA,UACP,aAAY;AAAA,UACZ,gBAAe;AAAA,UACf,WAAW;AAAA,UAEV,UAAA;AAAA,YAAAJ,MAAS,WACP,gBAAAiC,EAAAI,GAAA,EAAqB,UAAU7B,GAAiB,OAAOD,GAAiB;AAAA,YAE3E,gBAAA0B;AAAA,cAACK;AAAAA,cAAA;AAAA,gBACC,KAAKrB;AAAA,gBACL,OAAAxB;AAAA,gBACA,UAAUuC;AAAA,gBACV,WAAS;AAAA,gBACT,aAAA/B;AAAA,gBACA,OAAOwB;AAAA,gBACP,gBAAe;AAAA,gBACf,eAAApB;AAAA,gBACA,MAAMkB;AAAA,gBACN,WAAWH;AAAA,gBACX,WAAAjB;AAAA,gBACA,OAAOG;AAAA,gBACP,UAAAS;AAAA,cAAA;AAAA,YACF;AAAA,YACCf,MAAS,cACR,gBAAAiC;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,WAAW3B;AAAA,gBACX,UAAU,MAAMC,EAAqB,CAAA2B,MAAQ,CAACA,CAAI;AAAA,cAAA;AAAA,YACpD;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeC,KAAAC,EAAKlD,CAAgB;"}
1
+ {"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n memo,\n type FC,\n type KeyboardEvent,\n type ChangeEvent,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport PhoneCountrySelector from './country-selector/country-selector';\nimport * as Styled from './custom-input-field-styled';\nimport InputWrapper from './input-wrapper/input-wrapper';\nimport PasswordToggleIcon from './password-toggle/password-toggle';\n\nconst CustomInputField: FC<ICustomInputFieldProps> = ({\n value,\n onChange,\n error,\n helperText,\n onEnter,\n isLoading,\n isValid,\n type = 'text',\n placeholder,\n actionElement,\n maxLength,\n width,\n textTransform,\n textAlign = 'center',\n selectedCountry,\n onCountryChange,\n autoSize = false,\n}) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const [fontSize, setFontSize] = useState(isMobile ? 24 : 32);\n const inputRef = useRef<HTMLInputElement>(null);\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const inputType = useMemo(() => {\n if (type === 'password') return isPasswordVisible ? 'text' : 'password';\n\n if (type === 'phone') return 'number';\n\n return type;\n }, [type, isPasswordVisible]);\n\n const inputColor = useMemo(() => {\n if (error) return theme.colors.RED;\n\n if (isValid) return theme.colors.GREEN_4;\n\n return theme.colors.WHITE;\n }, [error, isValid, theme.colors]);\n\n const measureTextWidth = useCallback((text: string, font: string): number => {\n if (!canvasRef.current) {\n canvasRef.current = document.createElement('canvas');\n }\n\n const context = canvasRef.current.getContext('2d');\n\n if (!context) return 0;\n\n context.font = font;\n\n return context.measureText(text).width;\n }, []);\n\n useEffect(() => {\n if (!inputRef.current || !value || !autoSize) {\n return;\n }\n\n if (isMobile) {\n setFontSize(24);\n\n return;\n }\n\n const inputWidth = inputRef.current.clientWidth;\n\n const font32 = \"32px 'Athletics-Light'\";\n\n const textWidth32 = measureTextWidth(value, font32);\n\n if (textWidth32 > inputWidth) {\n setFontSize(24);\n } else {\n setFontSize(32);\n }\n }, [value, measureTextWidth, autoSize, isMobile]);\n\n useEffect(() => {\n return () => {\n canvasRef.current = null;\n };\n }, []);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.value),\n [onChange],\n );\n\n return (\n <InputWrapper\n helperText={error || helperText}\n isLoading={isLoading}\n actionElement={actionElement}\n >\n <FlexView\n $width={width ?? '100%'}\n $flex={1}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n {type === 'phone' && (\n <PhoneCountrySelector onChange={onCountryChange} value={selectedCountry} />\n )}\n <Styled.CustomInput\n ref={inputRef}\n value={value}\n onChange={handleChange}\n autoFocus\n placeholder={placeholder}\n color={inputColor}\n autoCapitalize=\"none\"\n textTransform={textTransform}\n type={inputType}\n onKeyDown={handleKeyDown}\n maxLength={maxLength}\n align={textAlign}\n fontSize={fontSize}\n />\n {type === 'password' && (\n <PasswordToggleIcon\n isVisible={isPasswordVisible}\n onToggle={() => setIsPasswordVisible(prev => !prev)}\n />\n )}\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default memo(CustomInputField);\n"],"names":["CustomInputField","value","onChange","error","helperText","onEnter","isLoading","isValid","type","placeholder","actionElement","maxLength","width","textTransform","textAlign","selectedCountry","onCountryChange","autoSize","theme","useTheme","isMobile","EDeviceType","isPasswordVisible","setIsPasswordVisible","useState","fontSize","setFontSize","inputRef","useRef","canvasRef","handleKeyDown","useCallback","event","inputType","useMemo","inputColor","measureTextWidth","text","font","context","useEffect","inputWidth","handleChange","jsx","InputWrapper","jsxs","FlexView","PhoneCountrySelector","Styled.CustomInput","PasswordToggleIcon","prev","customInputField","memo"],"mappings":";;;;;;;;;AAsBA,MAAMA,IAA+C,CAAC;AAAA,EACpD,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AA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AACA,CAAI;AAAA,cAAA;AAAA,YACpD;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeC,KAAAC,EAAKpD,CAAgB;"}
@@ -1,29 +1,51 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { memo as c } from "react";
3
- import { LOTTIE as h } from "../../../../../assets/lottie/lottie.js";
4
- import r from "../../../../ui/layout/flex-view.js";
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import { memo as h } from "react";
3
+ import { useTheme as s } from "styled-components";
4
+ import { LOTTIE as f } from "../../../../../assets/lottie/lottie.js";
5
+ import i from "../../../../ui/layout/flex-view.js";
5
6
  import $ from "../../../../ui/lottie-animation/lottie-animation.js";
6
- import i from "../../../../ui/separator/separator.js";
7
- import s from "../../../../ui/text/text.js";
8
- import { ContentWrapper as f } from "./input-wrapper-styled.js";
9
- const l = ({ children: m, helperText: n, actionElement: o, isLoading: p }) => /* @__PURE__ */ t(r, { $flex: 1, $gutterX: 2, $alignItems: "center", $justifyContent: "center", $width: "100%", children: [
10
- m,
11
- /* @__PURE__ */ t(f, { $alignItems: "center", $justifyContent: "center", children: [
12
- n && /* @__PURE__ */ t(r, { $gutterX: 3.5, children: [
13
- /* @__PURE__ */ e(s, { $renderAs: "ub2", $color: "WHITE_T_60", $align: "center", $whiteSpace: "pre-line", children: n }),
14
- /* @__PURE__ */ e(i, { heightX: 0.5 })
15
- ] }),
16
- o && /* @__PURE__ */ t(r, { $justifyContent: "center", $alignItems: "center", children: [
17
- o,
18
- /* @__PURE__ */ e(i, { heightX: 1 })
19
- ] }),
20
- p && /* @__PURE__ */ t(r, { children: [
21
- /* @__PURE__ */ e(i, { heightX: 2 }),
22
- /* @__PURE__ */ e($, { src: h.SPINNER_WHITE, height: 20, width: 40 })
23
- ] })
24
- ] })
25
- ] }), W = c(l);
7
+ import o from "../../../../ui/separator/separator.js";
8
+ import l from "../../../../ui/text/text.js";
9
+ import { EDeviceType as a } from "../../../../ui/theme/constants.js";
10
+ import { ContentWrapper as d } from "./input-wrapper-styled.js";
11
+ const u = ({ children: p, helperText: n, actionElement: m, isLoading: c }) => {
12
+ const e = s().device <= a.MOBILE;
13
+ return /* @__PURE__ */ t(
14
+ i,
15
+ {
16
+ $flex: 1,
17
+ $gutterX: e ? 1.5 : 2,
18
+ $alignItems: "center",
19
+ $justifyContent: "center",
20
+ $width: "100%",
21
+ children: [
22
+ p,
23
+ /* @__PURE__ */ t(d, { $alignItems: "center", $justifyContent: "center", children: [
24
+ n && /* @__PURE__ */ t(i, { $gutterX: e ? 2.25 : 3.5, children: [
25
+ /* @__PURE__ */ r(l, { $renderAs: "ub2", $color: "WHITE_T_60", $align: "center", $whiteSpace: "pre-line", children: n }),
26
+ /* @__PURE__ */ r(o, { heightX: 0.5 })
27
+ ] }),
28
+ m && /* @__PURE__ */ t(i, { $justifyContent: "center", $alignItems: "center", children: [
29
+ m,
30
+ /* @__PURE__ */ r(o, { heightX: 1 })
31
+ ] }),
32
+ c && /* @__PURE__ */ t(i, { children: [
33
+ /* @__PURE__ */ r(o, { heightX: e ? 0.5 : 2 }),
34
+ /* @__PURE__ */ r(
35
+ $,
36
+ {
37
+ src: f.SPINNER_WHITE,
38
+ height: e ? 14 : 20,
39
+ width: e ? 14 : 40
40
+ }
41
+ )
42
+ ] })
43
+ ] })
44
+ ]
45
+ }
46
+ );
47
+ }, L = h(u);
26
48
  export {
27
- W as default
49
+ L as default
28
50
  };
29
51
  //# sourceMappingURL=input-wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-wrapper.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.tsx"],"sourcesContent":["import type { IInputWrapperProps } from './input-wrapper-types';\n\nimport { memo } from 'react';\n\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './input-wrapper-styled';\n\nconst InputWrapper = ({ children, helperText, actionElement, isLoading }: IInputWrapperProps) => {\n return (\n <FlexView $flex={1} $gutterX={2} $alignItems=\"center\" $justifyContent=\"center\" $width=\"100%\">\n {children}\n <Styled.ContentWrapper $alignItems=\"center\" $justifyContent=\"center\">\n {helperText && (\n <FlexView $gutterX={3.5}>\n <Text $renderAs=\"ub2\" $color=\"WHITE_T_60\" $align=\"center\" $whiteSpace=\"pre-line\">\n {helperText}\n </Text>\n <Separator heightX={0.5} />\n </FlexView>\n )}\n {actionElement && (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n {actionElement}\n <Separator heightX={1} />\n </FlexView>\n )}\n {isLoading && (\n <FlexView>\n <Separator heightX={2} />\n <LottieAnimation src={LOTTIE.SPINNER_WHITE} height={20} width={40} />\n </FlexView>\n )}\n </Styled.ContentWrapper>\n </FlexView>\n );\n};\n\nexport default memo(InputWrapper);\n"],"names":["InputWrapper","children","helperText","actionElement","isLoading","jsxs","FlexView","Styled.ContentWrapper","jsx","Text","Separator","LottieAnimation","LOTTIE","InputWrapper$1","memo"],"mappings":";;;;;;;;AAWA,MAAMA,IAAe,CAAC,EAAE,UAAAC,GAAU,YAAAC,GAAY,eAAAC,GAAe,WAAAC,QAEzD,gBAAAC,EAACC,GAAS,EAAA,OAAO,GAAG,UAAU,GAAG,aAAY,UAAS,iBAAgB,UAAS,QAAO,QACnF,UAAA;AAAA,EAAAL;AAAA,oBACAM,GAAA,EAAsB,aAAY,UAAS,iBAAgB,UACzD,UAAA;AAAA,IACCL,KAAA,gBAAAG,EAACC,GAAS,EAAA,UAAU,KAClB,UAAA;AAAA,MAAC,gBAAAE,EAAAC,GAAA,EAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,aAAY,YACnE,UACHP,EAAA,CAAA;AAAA,MACA,gBAAAM,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,IAAA,GAC3B;AAAA,IAEDP,KACE,gBAAAE,EAAAC,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC5C,UAAA;AAAA,MAAAH;AAAA,MACD,gBAAAK,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,IAAA,GACzB;AAAA,IAEDN,uBACEE,GACC,EAAA,UAAA;AAAA,MAAC,gBAAAE,EAAAE,GAAA,EAAU,SAAS,EAAG,CAAA;AAAA,MACvB,gBAAAF,EAACG,KAAgB,KAAKC,EAAO,eAAe,QAAQ,IAAI,OAAO,IAAI;AAAA,IAAA,GACrE;AAAA,EAAA,GAEJ;AACF,EAAA,CAAA,GAIWC,IAAAC,EAAKd,CAAY;"}
1
+ {"version":3,"file":"input-wrapper.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.tsx"],"sourcesContent":["import type { IInputWrapperProps } from './input-wrapper-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport * as Styled from './input-wrapper-styled';\n\nconst InputWrapper = ({ children, helperText, actionElement, isLoading }: IInputWrapperProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n return (\n <FlexView\n $flex={1}\n $gutterX={isMobile ? 1.5 : 2}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n >\n {children}\n <Styled.ContentWrapper $alignItems=\"center\" $justifyContent=\"center\">\n {helperText && (\n <FlexView $gutterX={isMobile ? 2.25 : 3.5}>\n <Text $renderAs=\"ub2\" $color=\"WHITE_T_60\" $align=\"center\" $whiteSpace=\"pre-line\">\n {helperText}\n </Text>\n <Separator heightX={0.5} />\n </FlexView>\n )}\n {actionElement && (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n {actionElement}\n <Separator heightX={1} />\n </FlexView>\n )}\n {isLoading && (\n <FlexView>\n <Separator heightX={isMobile ? 0.5 : 2} />\n <LottieAnimation\n src={LOTTIE.SPINNER_WHITE}\n height={isMobile ? 14 : 20}\n width={isMobile ? 14 : 40}\n />\n </FlexView>\n )}\n </Styled.ContentWrapper>\n </FlexView>\n );\n};\n\nexport default memo(InputWrapper);\n"],"names":["InputWrapper","children","helperText","actionElement","isLoading","isMobile","useTheme","EDeviceType","jsxs","FlexView","Styled.ContentWrapper","jsx","Text","Separator","LottieAnimation","LOTTIE","InputWrapper$1","memo"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAe,CAAC,EAAE,UAAAC,GAAU,YAAAC,GAAY,eAAAC,GAAe,WAAAC,QAAoC;AAEzF,QAAAC,IADQC,IACS,UAAUC,EAAY;AAG3C,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,UAAUJ,IAAW,MAAM;AAAA,MAC3B,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAO;AAAA,MAEN,UAAA;AAAA,QAAAJ;AAAA,0BACAS,GAAA,EAAsB,aAAY,UAAS,iBAAgB,UACzD,UAAA;AAAA,UAAAR,KACE,gBAAAM,EAAAC,GAAA,EAAS,UAAUJ,IAAW,OAAO,KACpC,UAAA;AAAA,YAAC,gBAAAM,EAAAC,GAAA,EAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,aAAY,YACnE,UACHV,EAAA,CAAA;AAAA,YACA,gBAAAS,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,UAAA,GAC3B;AAAA,UAEDV,KACE,gBAAAK,EAAAC,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC5C,UAAA;AAAA,YAAAN;AAAA,YACD,gBAAAQ,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UAAA,GACzB;AAAA,UAEDT,uBACEK,GACC,EAAA,UAAA;AAAA,YAAA,gBAAAE,EAACE,GAAU,EAAA,SAASR,IAAW,MAAM,GAAG;AAAA,YACxC,gBAAAM;AAAA,cAACG;AAAA,cAAA;AAAA,gBACC,KAAKC,EAAO;AAAA,gBACZ,QAAQV,IAAW,KAAK;AAAA,gBACxB,OAAOA,IAAW,KAAK;AAAA,cAAA;AAAA,YACzB;AAAA,UAAA,GACF;AAAA,QAAA,GAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeW,IAAAC,EAAKjB,CAAY;"}
@@ -19,7 +19,8 @@ const S = 31536e3, T = 31536e6, _ = 480, E = {
19
19
  FOCUS: "Focus",
20
20
  BEHAVIOR: "Behaviors",
21
21
  OBJECTIVES: "Objectives",
22
- POSITION: "Position"
22
+ POSITION: "Position",
23
+ COURSE: "Course"
23
24
  }, O = {
24
25
  "no-test": "School Success goals",
25
26
  "non-standardized": "Test Prep goals",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../src/features/milestone/constants.ts"],"sourcesContent":["const ONE_YEAR_TIMESTAMP_IN_SECONDS = 365 * 24 * 60 * 60;\nconst ONE_YEAR_TIMESTAMP_IN_MILLISECONDS = ONE_YEAR_TIMESTAMP_IN_SECONDS * 1000;\n\nconst MILESTONE_WIDGET_MIN_HEIGHT = 480;\n\nconst SAT_COURSES = {\n SAT_DEMO: 'SAT-DEMO',\n SAT_MATH: 'SAT-MATH',\n SAT_ENGLISH: 'SAT-ENGLISH',\n SAT_TESTS: 'SAT-TESTS',\n} as const;\n\nconst COURSE_STREAMS = {\n MATH: 'MATH',\n CODING: 'CODING',\n SCIENCE: 'SCIENCE',\n ELA: 'ELA',\n ELP: 'ELP',\n ...SAT_COURSES,\n} as const;\n\nconst ENROLLMENT_TYPES = {\n ONLINE: 'ONLINE',\n PLUS: 'PLUS',\n REGULAR: 'REGULAR',\n HYBRID: 'HYBRID',\n HYBRID_PLUS: 'HYBRID_PLUS',\n ARMY: 'ARMY',\n CLASS_K5: 'CLASS_K5',\n OLYMPIAD: 'OLYMPIAD',\n HIGH: 'HIGH',\n GROUP_CLASS: 'GROUP_CLASS',\n CUECENTER: 'CUECENTER',\n} as const;\n\nconst GOAL_CATEGORY = {\n SCHOOL_SUCCESS: 'SCHOOL_SUCCESS',\n TEST_PREP: 'TEST_PREP',\n ENRICHMENT: 'ENRICHMENT',\n} as const;\n\nconst PREFERENCE_CATEGORY = {\n LEVEL: 'Level',\n FOCUS: 'Focus',\n BEHAVIOR: 'Behaviors',\n OBJECTIVES: 'Objectives',\n POSITION: 'Position',\n} as const;\n\nconst TEST_TYPE_TO_TEST_NAME = {\n 'no-test': 'School Success goals',\n 'non-standardized': 'Test Prep goals',\n 'standardized': 'Enrichment goals',\n};\n\nconst WARNING_MESSAGES = {\n CHAPTER_EXIT_WARNING:\n 'Going back will clear your currently selected chapters. Do you wish to proceed?',\n GOAL_CHANGE_WARNING:\n 'Choosing a different goal will clear your currently selected chapters. Do you wish to proceed?',\n};\n\nconst GOAL_HEADER_HEIGHT = 60;\nconst GOAL_FOOTER_HEIGHT = 88;\n\nexport {\n ONE_YEAR_TIMESTAMP_IN_SECONDS,\n ONE_YEAR_TIMESTAMP_IN_MILLISECONDS,\n MILESTONE_WIDGET_MIN_HEIGHT,\n COURSE_STREAMS,\n GOAL_CATEGORY,\n GOAL_HEADER_HEIGHT,\n GOAL_FOOTER_HEIGHT,\n WARNING_MESSAGES,\n TEST_TYPE_TO_TEST_NAME,\n PREFERENCE_CATEGORY,\n ENROLLMENT_TYPES,\n};\n"],"names":["ONE_YEAR_TIMESTAMP_IN_SECONDS","ONE_YEAR_TIMESTAMP_IN_MILLISECONDS","MILESTONE_WIDGET_MIN_HEIGHT","SAT_COURSES","COURSE_STREAMS","GOAL_CATEGORY","PREFERENCE_CATEGORY","TEST_TYPE_TO_TEST_NAME","WARNING_MESSAGES","GOAL_HEADER_HEIGHT","GOAL_FOOTER_HEIGHT"],"mappings":"AAAM,MAAAA,IAAgC,SAChCC,IAAqC,SAErCC,IAA8B,KAE9BC,IAAc;AAAA,EAClB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AACb,GAEMC,IAAiB;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,GAAGD;AACL,GAgBME,IAAgB;AAAA,EACpB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,YAAY;AACd,GAEMC,IAAsB;AAAA,EAC1B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AACZ,GAEMC,IAAyB;AAAA,EAC7B,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,cAAgB;AAClB,GAEMC,IAAmB;AAAA,EACvB,sBACE;AAAA,EACF,qBACE;AACJ,GAEMC,IAAqB,IACrBC,IAAqB;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../src/features/milestone/constants.ts"],"sourcesContent":["const ONE_YEAR_TIMESTAMP_IN_SECONDS = 365 * 24 * 60 * 60;\nconst ONE_YEAR_TIMESTAMP_IN_MILLISECONDS = ONE_YEAR_TIMESTAMP_IN_SECONDS * 1000;\n\nconst MILESTONE_WIDGET_MIN_HEIGHT = 480;\n\nconst SAT_COURSES = {\n SAT_DEMO: 'SAT-DEMO',\n SAT_MATH: 'SAT-MATH',\n SAT_ENGLISH: 'SAT-ENGLISH',\n SAT_TESTS: 'SAT-TESTS',\n} as const;\n\nconst COURSE_STREAMS = {\n MATH: 'MATH',\n CODING: 'CODING',\n SCIENCE: 'SCIENCE',\n ELA: 'ELA',\n ELP: 'ELP',\n ...SAT_COURSES,\n} as const;\n\nconst ENROLLMENT_TYPES = {\n ONLINE: 'ONLINE',\n PLUS: 'PLUS',\n REGULAR: 'REGULAR',\n HYBRID: 'HYBRID',\n HYBRID_PLUS: 'HYBRID_PLUS',\n ARMY: 'ARMY',\n CLASS_K5: 'CLASS_K5',\n OLYMPIAD: 'OLYMPIAD',\n HIGH: 'HIGH',\n GROUP_CLASS: 'GROUP_CLASS',\n CUECENTER: 'CUECENTER',\n} as const;\n\nconst GOAL_CATEGORY = {\n SCHOOL_SUCCESS: 'SCHOOL_SUCCESS',\n TEST_PREP: 'TEST_PREP',\n ENRICHMENT: 'ENRICHMENT',\n} as const;\n\nconst PREFERENCE_CATEGORY = {\n LEVEL: 'Level',\n FOCUS: 'Focus',\n BEHAVIOR: 'Behaviors',\n OBJECTIVES: 'Objectives',\n POSITION: 'Position',\n COURSE: 'Course',\n} as const;\n\nconst TEST_TYPE_TO_TEST_NAME = {\n 'no-test': 'School Success goals',\n 'non-standardized': 'Test Prep goals',\n 'standardized': 'Enrichment goals',\n};\n\nconst WARNING_MESSAGES = {\n CHAPTER_EXIT_WARNING:\n 'Going back will clear your currently selected chapters. Do you wish to proceed?',\n GOAL_CHANGE_WARNING:\n 'Choosing a different goal will clear your currently selected chapters. Do you wish to proceed?',\n};\n\nconst GOAL_HEADER_HEIGHT = 60;\nconst GOAL_FOOTER_HEIGHT = 88;\n\nexport {\n ONE_YEAR_TIMESTAMP_IN_SECONDS,\n ONE_YEAR_TIMESTAMP_IN_MILLISECONDS,\n MILESTONE_WIDGET_MIN_HEIGHT,\n COURSE_STREAMS,\n GOAL_CATEGORY,\n GOAL_HEADER_HEIGHT,\n GOAL_FOOTER_HEIGHT,\n WARNING_MESSAGES,\n TEST_TYPE_TO_TEST_NAME,\n PREFERENCE_CATEGORY,\n ENROLLMENT_TYPES,\n};\n"],"names":["ONE_YEAR_TIMESTAMP_IN_SECONDS","ONE_YEAR_TIMESTAMP_IN_MILLISECONDS","MILESTONE_WIDGET_MIN_HEIGHT","SAT_COURSES","COURSE_STREAMS","GOAL_CATEGORY","PREFERENCE_CATEGORY","TEST_TYPE_TO_TEST_NAME","WARNING_MESSAGES","GOAL_HEADER_HEIGHT","GOAL_FOOTER_HEIGHT"],"mappings":"AAAM,MAAAA,IAAgC,SAChCC,IAAqC,SAErCC,IAA8B,KAE9BC,IAAc;AAAA,EAClB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AACb,GAEMC,IAAiB;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,GAAGD;AACL,GAgBME,IAAgB;AAAA,EACpB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,YAAY;AACd,GAEMC,IAAsB;AAAA,EAC1B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,QAAQ;AACV,GAEMC,IAAyB;AAAA,EAC7B,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,cAAgB;AAClB,GAEMC,IAAmB;AAAA,EACvB,sBACE;AAAA,EACF,qBACE;AACJ,GAEMC,IAAqB,IACrBC,IAAqB;"}