@cuemath/leap 3.3.36-m → 3.3.36

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 (202) hide show
  1. package/dist/assets/gif/gif.js +4 -1
  2. package/dist/assets/gif/gif.js.map +1 -1
  3. package/dist/assets/illustrations/illustrations.js +1 -1
  4. package/dist/assets/illustrations/illustrations.js.map +1 -1
  5. package/dist/assets/line-icons/icons/chevron-right.js.map +1 -1
  6. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +1 -1
  7. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
  8. package/dist/features/auth/comps/otp-input/otp-input.js +35 -29
  9. package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
  10. package/dist/features/auth/pla-signup/pla-analytics-events.js +12 -3
  11. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  12. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +43 -34
  13. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
  14. package/dist/features/chapters-v2/chapter-details/chapter-details.js +140 -101
  15. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
  16. package/dist/features/chapters-v2/utils/index.js +20 -16
  17. package/dist/features/chapters-v2/utils/index.js.map +1 -1
  18. package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js +6 -6
  19. package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +1 -1
  20. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +20 -21
  21. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
  22. package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
  23. package/dist/features/circle-games/sign-up/sign-up.js +6 -6
  24. package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
  25. package/dist/features/homework/hw-card-list/hw-card-list-view.js +17 -17
  26. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js +86 -0
  27. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map +1 -0
  28. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js +140 -0
  29. package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map +1 -0
  30. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  31. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  32. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  33. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  34. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +400 -0
  35. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
  36. package/dist/features/milestone/constants.js +28 -15
  37. package/dist/features/milestone/constants.js.map +1 -1
  38. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
  39. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +2 -2
  40. package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js +23 -16
  41. package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js.map +1 -1
  42. package/dist/features/milestone/create/milestone-create-helpers.js +13 -7
  43. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  44. package/dist/features/parent-dashboard/api/cancel-subscription.js +9 -0
  45. package/dist/features/parent-dashboard/api/cancel-subscription.js.map +1 -0
  46. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +20 -0
  47. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +1 -0
  48. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +74 -0
  49. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -0
  50. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-constants.js +1 -1
  51. package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +1 -0
  52. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-styled.js +1 -1
  53. package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +1 -0
  54. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps.js +5 -5
  55. package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +1 -0
  56. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +28 -22
  57. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
  58. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +34 -0
  59. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +1 -0
  60. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +137 -0
  61. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +1 -0
  62. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +20 -0
  63. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +1 -0
  64. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +19 -0
  65. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +1 -0
  66. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-status/session-status-styled.js +2 -2
  67. package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +1 -0
  68. package/dist/features/parent-dashboard/comps/session-status/session-status.js +124 -0
  69. package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +1 -0
  70. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/session-summary-constants.js +18 -12
  71. package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +1 -0
  72. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +54 -0
  73. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +1 -0
  74. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/summary-card/summary-card-styled.js +1 -1
  75. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +1 -0
  76. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +72 -0
  77. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +1 -0
  78. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
  79. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
  80. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
  81. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
  82. package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions.js +14 -14
  83. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +1 -0
  84. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +1 -1
  85. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -1
  86. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +48 -46
  87. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  88. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +21 -0
  89. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +1 -0
  90. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +85 -0
  91. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +1 -0
  92. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +23 -0
  93. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +1 -0
  94. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +55 -0
  95. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +1 -0
  96. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +71 -0
  97. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +1 -0
  98. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +119 -0
  99. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -0
  100. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +58 -0
  101. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +1 -0
  102. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +16 -17
  103. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -1
  104. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +4 -8
  105. package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -1
  106. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
  107. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
  108. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +76 -0
  109. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +1 -0
  110. package/dist/features/parent-dashboard/parent-dashboard-constants.js +45 -4
  111. package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
  112. package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -3
  113. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  114. package/dist/features/parent-dashboard/parent-dashboard-view.js +197 -174
  115. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  116. package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js +17 -17
  117. package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js.map +1 -1
  118. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -1
  119. package/dist/features/student-details/class-details/class-details-utils.js +6 -6
  120. package/dist/features/trial-session/api/teacher-availability.js +9 -0
  121. package/dist/features/trial-session/api/teacher-availability.js.map +1 -0
  122. package/dist/features/trial-session/comps/class-preference/class-preference.js +74 -58
  123. package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
  124. package/dist/features/trial-session/comps/class-preference/helpers.js +28 -0
  125. package/dist/features/trial-session/comps/class-preference/helpers.js.map +1 -0
  126. package/dist/features/trial-session/comps/learning-plan/index.js +47 -45
  127. package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
  128. package/dist/features/trial-session/comps/navigation-bar/index.js +41 -40
  129. package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
  130. package/dist/features/trial-session/comps/school-goals/school-goals.js +59 -57
  131. package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
  132. package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
  133. package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
  134. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +41 -40
  135. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
  136. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +5 -0
  137. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
  138. package/dist/features/trial-session/comps/student-feedback/student-feedback.js +96 -51
  139. package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
  140. package/dist/features/trial-session/comps/student-profile/student-profile.js +70 -63
  141. package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
  142. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +43 -44
  143. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
  144. package/dist/features/trial-session/comps/test-prep/test-prep.js +41 -40
  145. package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
  146. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js +60 -61
  147. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
  148. package/dist/features/trial-session/helper.js +76 -61
  149. package/dist/features/trial-session/helper.js.map +1 -1
  150. package/dist/features/trial-session/hooks/use-slide-config-update.js +49 -0
  151. package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -0
  152. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +174 -144
  153. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  154. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  155. package/dist/features/trial-session/trial-session-view.js +99 -110
  156. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  157. package/dist/features/ui/accordion/accordion-items/accordion-items.js +13 -13
  158. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -1
  159. package/dist/features/utils/utils.js +1 -1
  160. package/dist/features/utils/utils.js.map +1 -1
  161. package/dist/index.d.ts +81 -83
  162. package/dist/index.js +316 -317
  163. package/dist/index.js.map +1 -1
  164. package/dist/static/learning-session-grid-bg-mobile.8d2b7258.gif +0 -0
  165. package/dist/static/way-forward-grid-bg-mobile.374043d7.gif +0 -0
  166. package/dist/static/your-goals-grid-bg-mobile.62557024.gif +0 -0
  167. package/package.json +1 -1
  168. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +0 -12
  169. package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +0 -1
  170. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +0 -1
  171. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +0 -1
  172. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +0 -1
  173. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +0 -29
  174. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +0 -1
  175. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +0 -132
  176. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +0 -1
  177. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +0 -11
  178. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +0 -1
  179. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +0 -19
  180. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +0 -1
  181. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +0 -1
  182. package/dist/features/trial-session/comps/pla/session-status/session-status.js +0 -127
  183. package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +0 -1
  184. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +0 -1
  185. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +0 -53
  186. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +0 -1
  187. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +0 -1
  188. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +0 -56
  189. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +0 -1
  190. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
  191. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
  192. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
  193. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +0 -1
  194. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -10
  195. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +0 -1
  196. package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -9
  197. package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +0 -1
  198. package/dist/node_modules/date-fns/differenceInSeconds.js +0 -11
  199. package/dist/node_modules/date-fns/differenceInSeconds.js.map +0 -1
  200. package/dist/static/trophy.a8ea85ef.json +0 -6813
  201. /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
  202. /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-types.js +0 -0
@@ -0,0 +1,55 @@
1
+ const e = {
2
+ title: "We’re sorry to see you go!",
3
+ description: "Tell us why youʼre canceling.",
4
+ reasons: [
5
+ { id: "Looking for more affordable options", label: "Looking for more affordable options" },
6
+ { id: "Taking too long to find a tutor match", label: "Taking too long to find a tutor match" },
7
+ { id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
8
+ { id: "I donʼt have the right device/ setup", label: "I donʼt have the right device/ setup" },
9
+ {
10
+ id: "No longer interested in online tutoring",
11
+ label: "No longer interested in online tutoring"
12
+ },
13
+ { id: "other", label: "Something else" }
14
+ ]
15
+ }, o = {
16
+ title: "We’re sorry to see you go!",
17
+ description: "Tell us why youʼre canceling.",
18
+ reasons: [
19
+ {
20
+ id: "The tutor doesnʼt seem like a good fit",
21
+ label: "The tutor doesnʼt seem like a good fit"
22
+ },
23
+ { id: "Looking for more affordable options", label: "Looking for more affordable options" },
24
+ { id: "Taking too long to find a tutor match", label: "Taking too long to find a tutor match" },
25
+ { id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
26
+ {
27
+ id: "No longer interested in online tutoring",
28
+ label: "No longer interested in online tutoring"
29
+ },
30
+ { id: "I donʼt have the right device/ setup", label: "I donʼt have the right device/ setup" },
31
+ { id: "other", label: "Something else" }
32
+ ]
33
+ }, t = {
34
+ title: "We’re sorry to see you go!",
35
+ description: "Tell us why youʼre canceling.",
36
+ reasons: [
37
+ { id: "Looking for more affordable options", label: "Looking for more affordable options" },
38
+ { id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
39
+ {
40
+ id: "No longer interested in online tutoring",
41
+ label: "No longer interested in online tutoring"
42
+ },
43
+ {
44
+ id: "I want to try other options first",
45
+ label: "I want to try other options first"
46
+ },
47
+ { id: "other", label: "Something else" }
48
+ ]
49
+ };
50
+ export {
51
+ t as cancellationReasonAfterTrial,
52
+ e as cancellationReasonNoTutor,
53
+ o as cancellationReasonWithTutor
54
+ };
55
+ //# sourceMappingURL=cancellation-reason-constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellation-reason-constant.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.ts"],"sourcesContent":["export const cancellationReasonNoTutor = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'Taking too long to find a tutor match', label: 'Taking too long to find a tutor match' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n { id: 'I donʼt have the right device/ setup', label: 'I donʼt have the right device/ setup' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n { id: 'other', label: 'Something else' },\n ],\n};\n\nexport const cancellationReasonWithTutor = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n {\n id: 'The tutor doesnʼt seem like a good fit',\n label: 'The tutor doesnʼt seem like a good fit',\n },\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'Taking too long to find a tutor match', label: 'Taking too long to find a tutor match' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n { id: 'I donʼt have the right device/ setup', label: 'I donʼt have the right device/ setup' },\n { id: 'other', label: 'Something else' },\n ],\n};\n\nexport const cancellationReasonAfterTrial = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n {\n id: 'I want to try other options first',\n label: 'I want to try other options first',\n },\n { id: 'other', label: 'Something else' },\n ],\n};\n"],"names":["cancellationReasonNoTutor","cancellationReasonWithTutor","cancellationReasonAfterTrial"],"mappings":"AAAO,MAAMA,IAA4B;AAAA,EACvC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,yCAAyC,OAAO,wCAAwC;AAAA,IAC9F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF,EAAE,IAAI,wCAAwC,OAAO,uCAAuC;AAAA,IAC5F;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF,GAEaC,IAA8B;AAAA,EACzC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,yCAAyC,OAAO,wCAAwC;AAAA,IAC9F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,wCAAwC,OAAO,uCAAuC;AAAA,IAC5F,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF,GAEaC,IAA+B;AAAA,EAC1C,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF;"}
@@ -0,0 +1,71 @@
1
+ import o from "styled-components";
2
+ import t from "../../../ui/layout/flex-view.js";
3
+ import d from "../../../ui/text/text.js";
4
+ const x = o(t)`
5
+ max-width: 560px;
6
+ border: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
7
+ `, h = o(t)`
8
+ overflow-y: auto;
9
+ max-height: 468px;
10
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
11
+ max-height: unset;
12
+ overflow-y: hidden;
13
+ }
14
+ `, u = o(t)`
15
+ padding-top: 0;
16
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
17
+ max-height: 300px;
18
+ overflow-y: auto;
19
+ }
20
+ `, c = o(t)`
21
+ padding-bottom: 24px;
22
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
23
+ border-top: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
24
+ padding-bottom: 40px;
25
+ }
26
+ `, g = o.textarea(({ theme: e }) => {
27
+ const {
28
+ colors: { WHITE: i, WHITE_T_38: r, BLACK_2: n, BLACK_5: a },
29
+ layout: { gutter: p }
30
+ } = e;
31
+ return `border: 1px solid ${a};
32
+ width: 100%;
33
+ min-height: ${p * 5}px;
34
+ padding: 16px;
35
+ background-color: ${n};
36
+ white-space: pre-line;
37
+ font-family: 'Untitled Sans Regular';
38
+ font-weight: 400;
39
+ font-size: 14px;
40
+ line-height: 24px;
41
+ color: ${i};
42
+ resize: none;
43
+ outline: none;
44
+ &::placeholder {
45
+ color: ${r};
46
+ }
47
+
48
+ &:focus {
49
+ outline: none;
50
+ }
51
+ `;
52
+ }), $ = o(d)(
53
+ ({ theme: e }) => `
54
+ position: absolute;
55
+ top: 0;
56
+ width: 100%;
57
+ transition: all 0.2s ease-in-out;
58
+ ${e.mediaQueries.minWidthTablet} {
59
+ top: 6px;
60
+ }
61
+ `
62
+ );
63
+ export {
64
+ x as Container,
65
+ u as ContentWrapper,
66
+ $ as ErrorWrapper,
67
+ c as FooterWrapper,
68
+ h as OuterWrapper,
69
+ g as StyledTextArea
70
+ };
71
+ //# sourceMappingURL=cancellation-reason-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellation-reason-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nexport const Container = styled(FlexView)`\n max-width: 560px;\n border: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n`;\n\nexport const OuterWrapper = styled(FlexView)`\n overflow-y: auto;\n max-height: 468px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: unset;\n overflow-y: hidden;\n }\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n padding-top: 0;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: 300px;\n overflow-y: auto;\n }\n`;\n\nexport const FooterWrapper = styled(FlexView)`\n padding-bottom: 24px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n border-top: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n padding-bottom: 40px;\n }\n`;\n\nexport const StyledTextArea = styled.textarea(({ theme }) => {\n const {\n colors: { WHITE, WHITE_T_38, BLACK_2, BLACK_5 },\n layout: { gutter },\n } = theme;\n\n return `border: 1px solid ${BLACK_5};\n width: 100%;\n min-height: ${gutter * 5}px;\n padding: 16px;\n background-color: ${BLACK_2};\n white-space: pre-line;\n font-family: 'Untitled Sans Regular';\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ${WHITE};\n resize: none;\n outline: none;\n &::placeholder {\n color: ${WHITE_T_38};\n }\n\n &:focus {\n outline: none;\n }\n`;\n});\n\nexport const ErrorWrapper = styled(Text)(\n ({ theme }) =>\n `\n position: absolute;\n top: 0;\n width: 100%;\n transition: all 0.2s ease-in-out;\n ${theme.mediaQueries.minWidthTablet} {\n top: 6px;\n }\n`,\n);\n"],"names":["Container","styled","FlexView","theme","OuterWrapper","ContentWrapper","FooterWrapper","StyledTextArea","WHITE","WHITE_T_38","BLACK_2","BLACK_5","gutter","ErrorWrapper","Text"],"mappings":";;;AAKa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA,YAE5B,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,GAGjDC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCE,IAAiBJ,EAAOC,CAAQ;AAAA;AAAA,IAEzC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCG,IAAgBL,EAAOC,CAAQ;AAAA;AAAA,IAExC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA,kBAClC,CAAC,EAAE,OAAAA,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA;AAAA,GAKvDI,IAAiBN,EAAO,SAAS,CAAC,EAAE,OAAAE,QAAY;AACrD,QAAA;AAAA,IACJ,QAAQ,EAAE,OAAAK,GAAO,YAAAC,GAAY,SAAAC,GAAS,SAAAC,EAAQ;AAAA,IAC9C,QAAQ,EAAE,QAAAC,EAAO;AAAA,EACf,IAAAT;AAEJ,SAAO,qBAAqBQ,CAAO;AAAA;AAAA,gBAErBC,IAAS,CAAC;AAAA;AAAA,sBAEJF,CAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMlBF,CAAK;AAAA;AAAA;AAAA;AAAA,aAIHC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,CAAC,GAEYI,IAAeZ,EAAOa,CAAI;AAAA,EACrC,CAAC,EAAE,OAAAX,EAAA,MACD;AAAA;AAAA;AAAA;AAAA;AAAA,MAKEA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAIvC;"}
@@ -0,0 +1,119 @@
1
+ import { jsxs as a, jsx as r, Fragment as M } from "react/jsx-runtime";
2
+ import { memo as k, useState as d, useRef as D, useMemo as F, useCallback as c, useEffect as U } from "react";
3
+ import { useTheme as y } from "styled-components";
4
+ import G from "../../../auth/comps/pill-button/pill-button.js";
5
+ import { PLA_ANALYTICS_EVENTS as R } from "../../../auth/pla-signup/pla-analytics-events.js";
6
+ import E from "../../../ui/buttons/text-button/text-button.js";
7
+ import { useUIContext as H } from "../../../ui/context/context.js";
8
+ import V from "../../../ui/layout/flex-view.js";
9
+ import j from "../../../ui/modals/use-modal-actions.js";
10
+ import K from "../../../ui/modals/use-modal-params.js";
11
+ import Y from "../../../ui/separator/separator.js";
12
+ import S from "../../../ui/text/text.js";
13
+ import { EDeviceType as q } from "../../../ui/theme/constants.js";
14
+ import { useCancelSubscriptionPatch as z } from "../../api/cancel-subscription.js";
15
+ import { cancellationReasonAfterTrial as J, cancellationReasonWithTutor as Q, cancellationReasonNoTutor as Z } from "./cancellation-reason-constant.js";
16
+ import { Container as ee, OuterWrapper as oe, ContentWrapper as re, StyledTextArea as te, FooterWrapper as ne, ErrorWrapper as ae } from "./cancellation-reason-styled.js";
17
+ const le = k(() => {
18
+ const { withTutor: p, isTrialDone: f, studentId: h, demoId: C, onCancelConfirmation: $ } = K(), { closeModal: g } = j(), { onEvent: m } = H(), [o, I] = d(""), [x, u] = d(!1), [l, b] = d(""), s = D(null), { device: O } = y(), t = O <= q.MOBILE, _ = F(() => f ? J : p ? Q : Z, [f, p]), { title: L, description: A, reasons: N } = _, w = c(
19
+ (e) => {
20
+ if (e) {
21
+ u(!0), m(R.SUBSCRIPTION_CANCELLATION_FAILED, {
22
+ reason: o,
23
+ error: e
24
+ });
25
+ return;
26
+ }
27
+ m(R.SUBSCRIPTION_CANCELLATION_SUCCESSFUL, {
28
+ reason: o
29
+ }), $();
30
+ },
31
+ [$, o, m]
32
+ ), { patch: T, isProcessing: X } = z({
33
+ onComplete: w
34
+ }), n = o === "other", v = X || !o || n && !l.trim(), P = c(() => {
35
+ T(h, {
36
+ reason: n ? l : o,
37
+ student_demo_id: C
38
+ });
39
+ }, [n, l, o, T, h, C]), W = c((e) => {
40
+ b(""), u(!1), I(e);
41
+ }, []), B = c((e) => {
42
+ u(!1), b(e.target.value);
43
+ }, []);
44
+ return U(() => {
45
+ var e, i;
46
+ n && s.current && ((e = s.current) == null || e.focus(), (i = s.current) == null || i.scrollIntoView({ behavior: "smooth" }));
47
+ }, [n]), /* @__PURE__ */ a(ee, { $background: "BLACK_2", $width: "100%", $borderColor: "BLACK_5", children: [
48
+ /* @__PURE__ */ a(oe, { $flex: 1, children: [
49
+ /* @__PURE__ */ a(V, { $gutterX: t ? 1 : 2.5, $gapX: t ? 1.5 : 2.5, children: [
50
+ /* @__PURE__ */ r(S, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: L }),
51
+ A ? /* @__PURE__ */ a(M, { children: [
52
+ /* @__PURE__ */ r(Y, { heightX: 0.25 }),
53
+ /* @__PURE__ */ r(S, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: A })
54
+ ] }) : null
55
+ ] }),
56
+ /* @__PURE__ */ a(
57
+ re,
58
+ {
59
+ $flex: 1,
60
+ $gutterX: t ? 1 : 2.5,
61
+ $gapX: t ? 1 : 2.5,
62
+ $width: "100%",
63
+ $alignItems: "flex-start",
64
+ $flexRowGapX: 1,
65
+ children: [
66
+ N.map(({ id: e, label: i }) => /* @__PURE__ */ r(
67
+ G,
68
+ {
69
+ selected: o === e,
70
+ label: i,
71
+ id: e,
72
+ onClick: W,
73
+ isTransparent: !0
74
+ },
75
+ e
76
+ )),
77
+ n && /* @__PURE__ */ r(
78
+ te,
79
+ {
80
+ placeholder: "Tell us more about your experience...",
81
+ id: "text-area",
82
+ ref: s,
83
+ value: l,
84
+ onChange: B
85
+ }
86
+ )
87
+ ]
88
+ }
89
+ )
90
+ ] }),
91
+ /* @__PURE__ */ a(
92
+ ne,
93
+ {
94
+ $position: "relative",
95
+ $gutterX: t ? 1 : 2.5,
96
+ $gapX: t ? 1.5 : 2.5,
97
+ $flexDirection: "row",
98
+ $flexColumnGapX: 1.5,
99
+ children: [
100
+ x ? /* @__PURE__ */ r(ae, { $renderAs: "ub3", $color: "ORANGE_4", $align: "left", children: "Something went wrong. Please try again." }) : null,
101
+ /* @__PURE__ */ r(
102
+ E,
103
+ {
104
+ label: "Cancel Subscription",
105
+ onClick: P,
106
+ color: "ORANGE_4",
107
+ disabled: v
108
+ }
109
+ ),
110
+ /* @__PURE__ */ r(E, { label: "Close", onClick: g, color: "WHITE" })
111
+ ]
112
+ }
113
+ )
114
+ ] });
115
+ }), Se = le;
116
+ export {
117
+ Se as default
118
+ };
119
+ //# sourceMappingURL=cancellation-reason.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellation-reason.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.tsx"],"sourcesContent":["import type { ICancelReasonProps } from './cancel-reason-types';\nimport type { ChangeEvent } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport PillButton from '../../../auth/comps/pill-button/pill-button';\nimport { PLA_ANALYTICS_EVENTS } from '../../../auth/pla-signup/pla-analytics-events';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport { useUIContext } from '../../../ui/context/context';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { useCancelSubscriptionPatch } from '../../api/cancel-subscription';\nimport {\n cancellationReasonAfterTrial,\n cancellationReasonNoTutor,\n cancellationReasonWithTutor,\n} from './cancellation-reason-constant';\nimport * as Styled from './cancellation-reason-styled';\n\nconst CancellationReason = memo(() => {\n const { withTutor, isTrialDone, studentId, demoId, onCancelConfirmation } =\n useModalParams<ICancelReasonProps>();\n const { closeModal } = useModalActions();\n const { onEvent: trackEvent } = useUIContext();\n\n const [reason, setReason] = useState('');\n const [isError, setIsError] = useState<boolean>(false);\n const [otherReason, setOtherReason] = useState('');\n\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const config = useMemo(() => {\n if (isTrialDone) return cancellationReasonAfterTrial;\n\n return withTutor ? cancellationReasonWithTutor : cancellationReasonNoTutor;\n }, [isTrialDone, withTutor]);\n const { title, description, reasons } = config;\n\n const handleCancelConfirmation = useCallback(\n (errorMessage: string | null) => {\n if (errorMessage) {\n setIsError(true);\n trackEvent(PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_FAILED, {\n reason,\n error: errorMessage,\n });\n // Need to add analytics event for cancellation failure\n\n return;\n }\n\n trackEvent(PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_SUCCESSFUL, {\n reason,\n });\n onCancelConfirmation();\n },\n [onCancelConfirmation, reason, trackEvent],\n );\n\n const { patch: cancelSubscription, isProcessing } = useCancelSubscriptionPatch({\n onComplete: handleCancelConfirmation,\n });\n\n const isOtherReasonSelected = reason === 'other';\n const isSubmitDisabled =\n isProcessing || !reason || (isOtherReasonSelected && !otherReason.trim());\n\n const handleCancel = useCallback(() => {\n const cancellationReason = isOtherReasonSelected ? otherReason : reason;\n\n cancelSubscription(studentId, {\n reason: cancellationReason,\n student_demo_id: demoId,\n });\n }, [isOtherReasonSelected, otherReason, reason, cancelSubscription, studentId, demoId]);\n\n const handleSelectReason = useCallback((id: string) => {\n setOtherReason('');\n setIsError(false);\n setReason(id);\n }, []);\n\n const handleOtherReasonChange = useCallback((event: ChangeEvent<HTMLTextAreaElement>) => {\n setIsError(false);\n setOtherReason(event.target.value);\n }, []);\n\n useEffect(() => {\n if (isOtherReasonSelected && textAreaRef.current) {\n textAreaRef.current?.focus();\n textAreaRef.current?.scrollIntoView({ behavior: 'smooth' });\n }\n }, [isOtherReasonSelected]);\n\n return (\n <Styled.Container $background=\"BLACK_2\" $width=\"100%\" $borderColor=\"BLACK_5\">\n <Styled.OuterWrapper $flex={1}>\n <FlexView $gutterX={isMobile ? 1 : 2.5} $gapX={isMobile ? 1.5 : 2.5}>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {title}\n </Text>\n {description ? (\n <>\n <Separator heightX={0.25} />\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $color=\"WHITE\">\n {description}\n </Text>\n </>\n ) : null}\n </FlexView>\n <Styled.ContentWrapper\n $flex={1}\n $gutterX={isMobile ? 1 : 2.5}\n $gapX={isMobile ? 1 : 2.5}\n $width={'100%'}\n $alignItems=\"flex-start\"\n $flexRowGapX={1}\n >\n {reasons.map(({ id, label }) => (\n <PillButton\n selected={reason === id}\n key={id}\n label={label}\n id={id}\n onClick={handleSelectReason}\n isTransparent\n />\n ))}\n {isOtherReasonSelected && (\n <Styled.StyledTextArea\n placeholder=\"Tell us more about your experience...\"\n id=\"text-area\"\n ref={textAreaRef}\n value={otherReason}\n onChange={handleOtherReasonChange}\n />\n )}\n </Styled.ContentWrapper>\n </Styled.OuterWrapper>\n <Styled.FooterWrapper\n $position=\"relative\"\n $gutterX={isMobile ? 1 : 2.5}\n $gapX={isMobile ? 1.5 : 2.5}\n $flexDirection=\"row\"\n $flexColumnGapX={1.5}\n >\n {isError ? (\n <Styled.ErrorWrapper $renderAs=\"ub3\" $color=\"ORANGE_4\" $align=\"left\">\n Something went wrong. Please try again.\n </Styled.ErrorWrapper>\n ) : null}\n <TextButton\n label=\"Cancel Subscription\"\n onClick={handleCancel}\n color=\"ORANGE_4\"\n disabled={isSubmitDisabled}\n />\n\n <TextButton label=\"Close\" onClick={closeModal} color=\"WHITE\" />\n </Styled.FooterWrapper>\n </Styled.Container>\n );\n});\n\nexport default CancellationReason;\n"],"names":["CancellationReason","memo","withTutor","isTrialDone","studentId","demoId","onCancelConfirmation","useModalParams","closeModal","useModalActions","trackEvent","useUIContext","reason","setReason","useState","isError","setIsError","otherReason","setOtherReason","textAreaRef","useRef","device","useTheme","isMobile","EDeviceType","config","useMemo","cancellationReasonAfterTrial","cancellationReasonWithTutor","cancellationReasonNoTutor","title","description","reasons","handleCancelConfirmation","useCallback","errorMessage","PLA_ANALYTICS_EVENTS","cancelSubscription","isProcessing","useCancelSubscriptionPatch","isOtherReasonSelected","isSubmitDisabled","handleCancel","handleSelectReason","id","handleOtherReasonChange","event","useEffect","_a","_b","jsxs","Styled.Container","Styled.OuterWrapper","FlexView","jsx","Text","Fragment","Separator","Styled.ContentWrapper","label","PillButton","Styled.StyledTextArea","Styled.FooterWrapper","Styled.ErrorWrapper","TextButton","CancellationReason$1"],"mappings":"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"}
@@ -0,0 +1,58 @@
1
+ import { useCallback as l, useMemo as f } from "react";
2
+ import h from "../../../ui/modals/use-modal-actions.js";
3
+ import { invalidateParentHome as y } from "../../api/parent-home.js";
4
+ const V = ({
5
+ studentId: a,
6
+ demoId: t,
7
+ withTutor: o,
8
+ isTrialDone: e,
9
+ studentName: i,
10
+ billingDetails: d,
11
+ onChangeTutor: m,
12
+ onRescheduleDemo: p
13
+ }) => {
14
+ const { openModal: n } = h(), { payment_method_details: s } = d ?? {}, r = l(() => {
15
+ y(a), n("pla-cancellation-confirmation");
16
+ }, [n, a]), C = l(() => {
17
+ n("pla-cancellation-reason", {
18
+ withTutor: o,
19
+ studentId: a,
20
+ demoId: t,
21
+ isTrialDone: e,
22
+ onCancelConfirmation: r
23
+ });
24
+ }, [t, r, e, n, a, o]), c = l(() => {
25
+ n("pla-cancel-subscription", {
26
+ withTutor: o,
27
+ studentName: i,
28
+ isTrialDone: e,
29
+ onSwitchTutor: m,
30
+ onReschedule: p,
31
+ onCancel: C
32
+ });
33
+ }, [
34
+ n,
35
+ o,
36
+ i,
37
+ e,
38
+ m,
39
+ p,
40
+ C
41
+ ]), M = l(() => {
42
+ n("pla-view-payment-method", {
43
+ paymentMethodDetails: s,
44
+ onCancel: c
45
+ });
46
+ }, [c, n, s]);
47
+ return f(
48
+ () => ({
49
+ onCancelSubscription: c,
50
+ onViewPaymentMethod: M
51
+ }),
52
+ [c, M]
53
+ );
54
+ };
55
+ export {
56
+ V as usePLAModalHandlers
57
+ };
58
+ //# sourceMappingURL=use-pla-model-handlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pla-model-handlers.js","sources":["../../../../../src/features/parent-dashboard/modals/hooks/use-pla-model-handlers.ts"],"sourcesContent":["import type { IBillingDetails } from '../../parent-dashboard-types';\n\nimport { useCallback, useMemo } from 'react';\n\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport { invalidateParentHome } from '../../api/parent-home';\n\ninterface IUsePLAModalHandlers {\n demoId: string | null;\n isTrialDone: boolean;\n studentId: string;\n studentName: string;\n withTutor: boolean;\n billingDetails: IBillingDetails | null;\n onRescheduleDemo: () => void;\n onChangeTutor: () => void;\n}\n\ninterface IUsePLAModalResponse {\n onCancelSubscription: () => void;\n onViewPaymentMethod: () => void;\n}\n\nexport const usePLAModalHandlers = ({\n studentId,\n demoId,\n withTutor,\n isTrialDone,\n studentName,\n billingDetails,\n onChangeTutor,\n onRescheduleDemo,\n}: IUsePLAModalHandlers): IUsePLAModalResponse => {\n const { openModal } = useModalActions();\n\n const { payment_method_details: paymentMethodDetails } = billingDetails ?? {};\n\n const handleCancelConfirmation = useCallback(() => {\n invalidateParentHome(studentId);\n openModal('pla-cancellation-confirmation');\n }, [openModal, studentId]);\n\n const handleViewCancellationReason = useCallback(() => {\n openModal('pla-cancellation-reason', {\n withTutor,\n studentId,\n demoId,\n isTrialDone,\n onCancelConfirmation: handleCancelConfirmation,\n });\n }, [demoId, handleCancelConfirmation, isTrialDone, openModal, studentId, withTutor]);\n\n const handleCancelSubscription = useCallback(() => {\n openModal('pla-cancel-subscription', {\n withTutor,\n studentName,\n isTrialDone,\n onSwitchTutor: onChangeTutor,\n onReschedule: onRescheduleDemo,\n onCancel: handleViewCancellationReason,\n });\n }, [\n openModal,\n withTutor,\n studentName,\n isTrialDone,\n onChangeTutor,\n onRescheduleDemo,\n handleViewCancellationReason,\n ]);\n\n const handleViewPaymentMethod = useCallback(() => {\n openModal('pla-view-payment-method', {\n paymentMethodDetails,\n onCancel: handleCancelSubscription,\n });\n }, [handleCancelSubscription, openModal, paymentMethodDetails]);\n\n return useMemo(\n () => ({\n onCancelSubscription: handleCancelSubscription,\n onViewPaymentMethod: handleViewPaymentMethod,\n }),\n [handleCancelSubscription, handleViewPaymentMethod],\n );\n};\n"],"names":["usePLAModalHandlers","studentId","demoId","withTutor","isTrialDone","studentName","billingDetails","onChangeTutor","onRescheduleDemo","openModal","useModalActions","paymentMethodDetails","handleCancelConfirmation","useCallback","invalidateParentHome","handleViewCancellationReason","handleCancelSubscription","handleViewPaymentMethod","useMemo"],"mappings":";;;AAuBO,MAAMA,IAAsB,CAAC;AAAA,EAClC,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,MAAkD;AAC1C,QAAA,EAAE,WAAAC,MAAcC,KAEhB,EAAE,wBAAwBC,MAAyBL,KAAkB,CAAA,GAErEM,IAA2BC,EAAY,MAAM;AACjD,IAAAC,EAAqBb,CAAS,GAC9BQ,EAAU,+BAA+B;AAAA,EAAA,GACxC,CAACA,GAAWR,CAAS,CAAC,GAEnBc,IAA+BF,EAAY,MAAM;AACrD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,WAAAN;AAAA,MACA,WAAAF;AAAA,MACA,QAAAC;AAAA,MACA,aAAAE;AAAA,MACA,sBAAsBQ;AAAA,IAAA,CACvB;AAAA,EAAA,GACA,CAACV,GAAQU,GAA0BR,GAAaK,GAAWR,GAAWE,CAAS,CAAC,GAE7Ea,IAA2BH,EAAY,MAAM;AACjD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,WAAAN;AAAA,MACA,aAAAE;AAAA,MACA,aAAAD;AAAA,MACA,eAAeG;AAAA,MACf,cAAcC;AAAA,MACd,UAAUO;AAAA,IAAA,CACX;AAAA,EAAA,GACA;AAAA,IACDN;AAAA,IACAN;AAAA,IACAE;AAAA,IACAD;AAAA,IACAG;AAAA,IACAC;AAAA,IACAO;AAAA,EAAA,CACD,GAEKE,IAA0BJ,EAAY,MAAM;AAChD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,sBAAAE;AAAA,MACA,UAAUK;AAAA,IAAA,CACX;AAAA,EACA,GAAA,CAACA,GAA0BP,GAAWE,CAAoB,CAAC;AAEvD,SAAAO;AAAA,IACL,OAAO;AAAA,MACL,sBAAsBF;AAAA,MACtB,qBAAqBC;AAAA,IAAA;AAAA,IAEvB,CAACD,GAA0BC,CAAuB;AAAA,EAAA;AAEtD;"}
@@ -1,21 +1,20 @@
1
- import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import { memo as d, useMemo as u } from "react";
3
- import { useTheme as c } from "styled-components";
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
+ import { memo as u, useMemo as c } from "react";
3
+ import { useTheme as p } from "styled-components";
4
4
  import { ILLUSTRATIONS as r } from "../../../../assets/illustrations/illustrations.js";
5
- import p from "../../../trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js";
6
- import f from "../../../ui/layout/flex-view.js";
5
+ import f from "../../../trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js";
6
+ import o from "../../../ui/layout/flex-view.js";
7
7
  import E from "../../../ui/loader/app-loader/app-loader.js";
8
8
  import L from "../../../ui/modals/use-modal-params.js";
9
9
  import g from "../../../ui/text/text.js";
10
10
  import { EDeviceType as h } from "../../../ui/theme/constants.js";
11
- import { Container as P } from "./student-profile-summary-styled.js";
12
- const _ = () => {
13
- const { studentName: o, summaryData: e } = L(), i = c().device <= h.MOBILE, n = u(() => {
14
- const { studentLevel: m, studentObjectives: s = "", learningPlan: l = "" } = e ?? {};
11
+ const P = () => {
12
+ const { studentName: i, summaryData: e } = L(), n = p().device <= h.MOBILE, m = c(() => {
13
+ const { studentLevel: s, studentObjectives: l = "", learningPlan: a = "" } = e ?? {};
15
14
  return [
16
15
  {
17
16
  title: "Student Level",
18
- description: m,
17
+ description: s,
19
18
  illustration: r.KNOWLEDGE_BLUE,
20
19
  background: "BLUE_1"
21
20
  },
@@ -23,22 +22,22 @@ const _ = () => {
23
22
  illustration: r.ARROW_BOARD_GREEN,
24
23
  background: "GREEN_1",
25
24
  title: "Goals",
26
- description: s
25
+ description: l
27
26
  },
28
27
  {
29
28
  illustration: r.BOOK_CHECKED_PURPLE,
30
29
  background: "PURPLE_1",
31
30
  title: "Learning Plan",
32
- description: l
31
+ description: a
33
32
  }
34
33
  ];
35
34
  }, [e]);
36
- return e ? /* @__PURE__ */ a(P, { $borderColor: "BLACK_1", children: [
37
- i && /* @__PURE__ */ t(f, { $gutterX: 1, $gapX: 1.5, $background: "BLACK_2", children: /* @__PURE__ */ t(g, { $renderAs: "ab1-bold", $color: "WHITE_1", children: `${o}'s Profile` }) }),
38
- /* @__PURE__ */ t(p, { profileHighlights: n })
35
+ return e ? /* @__PURE__ */ d(o, { $borderColor: "BLACK_1", children: [
36
+ n && /* @__PURE__ */ t(o, { $gutterX: 1, $gapX: 1.5, $background: "BLACK_2", children: /* @__PURE__ */ t(g, { $renderAs: "ab1-bold", $color: "WHITE_1", children: `${i}'s Profile` }) }),
37
+ /* @__PURE__ */ t(f, { profileHighlights: m })
39
38
  ] }) : /* @__PURE__ */ t(E, { height: 200, width: 200 });
40
- }, K = d(_);
39
+ }, C = u(P);
41
40
  export {
42
- K as default
41
+ C as default
43
42
  };
44
43
  //# sourceMappingURL=student-profile-summary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"student-profile-summary.js","sources":["../../../../../src/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.tsx"],"sourcesContent":["import type { IStudentProfileSummary } from '../../parent-dashboard-types';\nimport type { TProfileHighlight } from './student-profile-summary-types';\n\nimport { useMemo, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport StudentProfileHighlights from '../../../trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './student-profile-summary-styled';\n\nconst StudentProfileSummary = () => {\n const { studentName, summaryData } = useModalParams<{\n studentName: string;\n summaryData: IStudentProfileSummary;\n }>();\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const profileHighlights: TProfileHighlight[] = useMemo(() => {\n const { studentLevel, studentObjectives = '', learningPlan = '' } = summaryData ?? {};\n\n return [\n {\n title: 'Student Level',\n description: studentLevel,\n illustration: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n background: 'BLUE_1',\n },\n {\n illustration: ILLUSTRATIONS.ARROW_BOARD_GREEN,\n background: 'GREEN_1',\n title: 'Goals',\n description: studentObjectives,\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: learningPlan,\n },\n ];\n }, [summaryData]);\n\n if (!summaryData) {\n return <AppLoader height={200} width={200} />;\n }\n\n return (\n <Styled.Container $borderColor=\"BLACK_1\">\n {isMobile && (\n <FlexView $gutterX={1} $gapX={1.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ab1-bold\" $color=\"WHITE_1\">{`${studentName}'s Profile`}</Text>\n </FlexView>\n )}\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n </Styled.Container>\n );\n};\n\nexport default memo(StudentProfileSummary);\n"],"names":["StudentProfileSummary","studentName","summaryData","useModalParams","isMobile","useTheme","EDeviceType","profileHighlights","useMemo","studentLevel","studentObjectives","learningPlan","ILLUSTRATIONS","jsxs","Styled.Container","FlexView","jsx","Text","StudentProfileHighlights","AppLoader","studentProfileSummary","memo"],"mappings":";;;;;;;;;;;AAeA,MAAMA,IAAwB,MAAM;AAClC,QAAM,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAGlC,GAEGC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAyCC,EAAQ,MAAM;AACrD,UAAA,EAAE,cAAAC,GAAc,mBAAAC,IAAoB,IAAI,cAAAC,IAAe,GAAG,IAAIT,KAAe;AAE5E,WAAA;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,aAAaO;AAAA,QACb,cAAcG,EAAc;AAAA,QAC5B,YAAY;AAAA,MACd;AAAA,MACA;AAAA,QACE,cAAcA,EAAc;AAAA,QAC5B,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,aAAaF;AAAA,MACf;AAAA,MACA;AAAA,QACE,cAAcE,EAAc;AAAA,QAC5B,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,aAAaD;AAAA,MACf;AAAA,IAAA;AAAA,EACF,GACC,CAACT,CAAW,CAAC;AAEhB,SAAKA,IAKF,gBAAAW,EAAAC,GAAA,EAAiB,cAAa,WAC5B,UAAA;AAAA,IAAAV,uBACEW,GAAS,EAAA,UAAU,GAAG,OAAO,KAAK,aAAY,WAC7C,UAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,QAAO,WAAW,UAAG,GAAAhB,CAAW,cAAa,EAC1E,CAAA;AAAA,IAEF,gBAAAe,EAACE,KAAyB,mBAAAX,GAAsC;AAAA,EAClE,EAAA,CAAA,IAXQ,gBAAAS,EAAAG,GAAA,EAAU,QAAQ,KAAK,OAAO,IAAK,CAAA;AAa/C,GAEeC,IAAAC,EAAKrB,CAAqB;"}
1
+ {"version":3,"file":"student-profile-summary.js","sources":["../../../../../src/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.tsx"],"sourcesContent":["import type { IStudentProfileSummary } from '../../parent-dashboard-types';\nimport type { TProfileHighlight } from './student-profile-summary-types';\n\nimport { useMemo, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport StudentProfileHighlights from '../../../trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\n\nconst StudentProfileSummary = () => {\n const { studentName, summaryData } = useModalParams<{\n studentName: string;\n summaryData: IStudentProfileSummary;\n }>();\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const profileHighlights: TProfileHighlight[] = useMemo(() => {\n const { studentLevel, studentObjectives = '', learningPlan = '' } = summaryData ?? {};\n\n return [\n {\n title: 'Student Level',\n description: studentLevel,\n illustration: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n background: 'BLUE_1',\n },\n {\n illustration: ILLUSTRATIONS.ARROW_BOARD_GREEN,\n background: 'GREEN_1',\n title: 'Goals',\n description: studentObjectives,\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: learningPlan,\n },\n ];\n }, [summaryData]);\n\n if (!summaryData) {\n return <AppLoader height={200} width={200} />;\n }\n\n return (\n <FlexView $borderColor=\"BLACK_1\">\n {isMobile && (\n <FlexView $gutterX={1} $gapX={1.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ab1-bold\" $color=\"WHITE_1\">{`${studentName}'s Profile`}</Text>\n </FlexView>\n )}\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n </FlexView>\n );\n};\n\nexport default memo(StudentProfileSummary);\n"],"names":["StudentProfileSummary","studentName","summaryData","useModalParams","isMobile","useTheme","EDeviceType","profileHighlights","useMemo","studentLevel","studentObjectives","learningPlan","ILLUSTRATIONS","jsxs","FlexView","jsx","Text","StudentProfileHighlights","AppLoader","studentProfileSummary","memo"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAwB,MAAM;AAClC,QAAM,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAGlC,GAEGC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAyCC,EAAQ,MAAM;AACrD,UAAA,EAAE,cAAAC,GAAc,mBAAAC,IAAoB,IAAI,cAAAC,IAAe,GAAG,IAAIT,KAAe;AAE5E,WAAA;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,aAAaO;AAAA,QACb,cAAcG,EAAc;AAAA,QAC5B,YAAY;AAAA,MACd;AAAA,MACA;AAAA,QACE,cAAcA,EAAc;AAAA,QAC5B,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,aAAaF;AAAA,MACf;AAAA,MACA;AAAA,QACE,cAAcE,EAAc;AAAA,QAC5B,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,aAAaD;AAAA,MACf;AAAA,IAAA;AAAA,EACF,GACC,CAACT,CAAW,CAAC;AAEhB,SAAKA,IAKH,gBAAAW,EAACC,GAAS,EAAA,cAAa,WACpB,UAAA;AAAA,IAAAV,uBACEU,GAAS,EAAA,UAAU,GAAG,OAAO,KAAK,aAAY,WAC7C,UAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,QAAO,WAAW,UAAG,GAAAf,CAAW,cAAa,EAC1E,CAAA;AAAA,IAEF,gBAAAc,EAACE,KAAyB,mBAAAV,GAAsC;AAAA,EAClE,EAAA,CAAA,IAXQ,gBAAAQ,EAAAG,GAAA,EAAU,QAAQ,KAAK,OAAO,IAAK,CAAA;AAa/C,GAEeC,IAAAC,EAAKpB,CAAqB;"}
@@ -1,13 +1,9 @@
1
- import t from "styled-components";
2
- import e from "../../../ui/layout/flex-view.js";
3
- const r = t(e)`
4
- width: 100%;
1
+ import o from "styled-components";
2
+ import t from "../../../ui/layout/flex-view.js";
3
+ const i = o(t)`
5
4
  max-height: 90vh;
6
- ${({ theme: i }) => i.mediaQueries.minWidthTablet} {
7
- max-width: 720px;
8
- }
9
5
  `;
10
6
  export {
11
- r as Container
7
+ i as Container
12
8
  };
13
9
  //# sourceMappingURL=trial-report-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"trial-report-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/trial-report/trial-report-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n width: 100%;\n max-height: 90vh;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-width: 720px;\n }\n`;\n"],"names":["Container","styled","FlexView","theme"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA;AAAA,IAGpC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"trial-report-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/trial-report/trial-report-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n max-height: 90vh;\n`;\n"],"names":["Container","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA;"}
@@ -11,19 +11,19 @@ const s = o(t)`
11
11
  ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
12
12
  max-height: unset;
13
13
  overflow-y: hidden;
14
- })}
14
+ }
15
15
  `, m = o(t)`
16
16
  padding-top: 0;
17
17
  ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
18
18
  max-height: 300px;
19
19
  overflow-y: auto;
20
- })}
20
+ }
21
21
  `, x = o(t)`
22
22
  padding-bottom: 24px;
23
23
  ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
24
24
  border-top: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
25
25
  padding-bottom: 40px;
26
- })}
26
+ }
27
27
  `, c = o.textarea(({ theme: e }) => {
28
28
  const {
29
29
  colors: { WHITE: i, WHITE_T_38: r, BLACK_2: n, BLACK_5: a },
@@ -1 +1 @@
1
- {"version":3,"file":"tutor-change-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/tutor-change/tutor-change-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n border: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-width: 560px;\n }\n`;\n\nexport const OuterWrapper = styled(FlexView)`\n overflow-y: auto;\n max-height: 468px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: unset;\n overflow-y: hidden;\n })}\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n padding-top: 0;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: 300px;\n overflow-y: auto;\n })}\n`;\n\nexport const FooterWrapper = styled(FlexView)`\n padding-bottom: 24px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n border-top: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n padding-bottom: 40px;\n })}\n`;\n\nexport const StyledTextArea = styled.textarea(({ theme }) => {\n const {\n colors: { WHITE, WHITE_T_38, BLACK_2, BLACK_5 },\n layout: { gutter },\n } = theme;\n\n return `border: 1px solid ${BLACK_5};\n width: 100%;\n min-height: ${gutter * 5}px;\n padding: 16px;\n background-color: ${BLACK_2};\n white-space: pre-line;\n font-family: 'Untitled Sans Regular';\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ${WHITE};\n resize: none;\n outline: none;\n &::placeholder {\n color: ${WHITE_T_38};\n }\n\n &:focus {\n outline: none;\n }\n`;\n});\n"],"names":["Container","styled","FlexView","theme","OuterWrapper","ContentWrapper","FooterWrapper","StyledTextArea","WHITE","WHITE_T_38","BLACK_2","BLACK_5","gutter"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA,YAC5B,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,IAC1D,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA,GAKvCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCE,IAAiBJ,EAAOC,CAAQ;AAAA;AAAA,IAEzC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCG,IAAgBL,EAAOC,CAAQ;AAAA;AAAA,IAExC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA,kBAClC,CAAC,EAAE,OAAAA,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA;AAAA,GAKvDI,IAAiBN,EAAO,SAAS,CAAC,EAAE,OAAAE,QAAY;AACrD,QAAA;AAAA,IACJ,QAAQ,EAAE,OAAAK,GAAO,YAAAC,GAAY,SAAAC,GAAS,SAAAC,EAAQ;AAAA,IAC9C,QAAQ,EAAE,QAAAC,EAAO;AAAA,EACf,IAAAT;AAEJ,SAAO,qBAAqBQ,CAAO;AAAA;AAAA,gBAErBC,IAAS,CAAC;AAAA;AAAA,sBAEJF,CAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMlBF,CAAK;AAAA;AAAA;AAAA;AAAA,aAIHC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,CAAC;"}
1
+ {"version":3,"file":"tutor-change-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/tutor-change/tutor-change-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n border: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-width: 560px;\n }\n`;\n\nexport const OuterWrapper = styled(FlexView)`\n overflow-y: auto;\n max-height: 468px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: unset;\n overflow-y: hidden;\n }\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n padding-top: 0;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: 300px;\n overflow-y: auto;\n }\n`;\n\nexport const FooterWrapper = styled(FlexView)`\n padding-bottom: 24px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n border-top: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n padding-bottom: 40px;\n }\n`;\n\nexport const StyledTextArea = styled.textarea(({ theme }) => {\n const {\n colors: { WHITE, WHITE_T_38, BLACK_2, BLACK_5 },\n layout: { gutter },\n } = theme;\n\n return `border: 1px solid ${BLACK_5};\n width: 100%;\n min-height: ${gutter * 5}px;\n padding: 16px;\n background-color: ${BLACK_2};\n white-space: pre-line;\n font-family: 'Untitled Sans Regular';\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ${WHITE};\n resize: none;\n outline: none;\n &::placeholder {\n color: ${WHITE_T_38};\n }\n\n &:focus {\n outline: none;\n }\n`;\n});\n"],"names":["Container","styled","FlexView","theme","OuterWrapper","ContentWrapper","FooterWrapper","StyledTextArea","WHITE","WHITE_T_38","BLACK_2","BLACK_5","gutter"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA,YAC5B,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,IAC1D,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA,GAKvCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCE,IAAiBJ,EAAOC,CAAQ;AAAA;AAAA,IAEzC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCG,IAAgBL,EAAOC,CAAQ;AAAA;AAAA,IAExC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA,kBAClC,CAAC,EAAE,OAAAA,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA;AAAA,GAKvDI,IAAiBN,EAAO,SAAS,CAAC,EAAE,OAAAE,QAAY;AACrD,QAAA;AAAA,IACJ,QAAQ,EAAE,OAAAK,GAAO,YAAAC,GAAY,SAAAC,GAAS,SAAAC,EAAQ;AAAA,IAC9C,QAAQ,EAAE,QAAAC,EAAO;AAAA,EACf,IAAAT;AAEJ,SAAO,qBAAqBQ,CAAO;AAAA;AAAA,gBAErBC,IAAS,CAAC;AAAA;AAAA,sBAEJF,CAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMlBF,CAAK;AAAA;AAAA;AAAA;AAAA,aAIHC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,CAAC;"}
@@ -0,0 +1,76 @@
1
+ import { jsxs as e, jsx as o, Fragment as $ } from "react/jsx-runtime";
2
+ import { memo as h } from "react";
3
+ import { useTheme as p } from "styled-components";
4
+ import u from "../../../ui/buttons/text-button/text-button.js";
5
+ import t from "../../../ui/layout/flex-view.js";
6
+ import b from "../../../ui/modals/use-modal-params.js";
7
+ import n from "../../../ui/separator/separator.js";
8
+ import i from "../../../ui/text/text.js";
9
+ import { EDeviceType as f } from "../../../ui/theme/constants.js";
10
+ const g = h(() => {
11
+ const { paymentMethodDetails: l, onCancel: a } = b(), {
12
+ exp_month: c,
13
+ exp_year: d,
14
+ last_4_digits: s
15
+ } = l || {}, { device: m } = p(), r = m <= f.MOBILE;
16
+ return /* @__PURE__ */ e(t, { $gapX: r ? 2.25 : 2.5, $gutterX: r ? 1 : 2.5, $background: "BLACK_2", children: [
17
+ /* @__PURE__ */ o(
18
+ i,
19
+ {
20
+ $renderAs: "ah4-bold",
21
+ $renderOnMobileAs: "ac4-black",
22
+ $color: r ? "WHITE_T_60" : "WHITE",
23
+ children: r ? "Payment Method" : "View Payment Method"
24
+ }
25
+ ),
26
+ /* @__PURE__ */ o(n, { heightX: r ? 1 : 2.5 }),
27
+ /* @__PURE__ */ e(
28
+ t,
29
+ {
30
+ $flexDirection: "row",
31
+ $justifyContent: "flex-start",
32
+ $alignItems: "center",
33
+ $flexGapX: 0.5,
34
+ $gapX: 1,
35
+ $gutterX: 1,
36
+ $background: "BLACK_2",
37
+ $borderColor: "BLACK_5",
38
+ children: [
39
+ /* @__PURE__ */ o(t, { $widthX: 3, $heightX: 1.75, $background: "BLACK_4", $borderRadiusX: 0.25 }),
40
+ /* @__PURE__ */ e(t, { children: [
41
+ /* @__PURE__ */ e(i, { $renderAs: "ac4-black", $color: "WHITE", children: [
42
+ "•••• ",
43
+ s
44
+ ] }),
45
+ /* @__PURE__ */ e(i, { $renderAs: "ub3-bold", $color: "WHITE", children: [
46
+ "Card",
47
+ " ",
48
+ /* @__PURE__ */ e(i, { $renderAs: "ub3", $color: "WHITE", $inline: !0, children: [
49
+ "Exp: ",
50
+ c,
51
+ "/",
52
+ d
53
+ ] })
54
+ ] })
55
+ ] })
56
+ ]
57
+ }
58
+ ),
59
+ r ? /* @__PURE__ */ e($, { children: [
60
+ /* @__PURE__ */ o(n, { heightX: 1.5 }),
61
+ /* @__PURE__ */ o(
62
+ u,
63
+ {
64
+ size: "small",
65
+ label: "Cancel subscription",
66
+ color: "WHITE_T_60",
67
+ onClick: a
68
+ }
69
+ )
70
+ ] }) : null
71
+ ] });
72
+ }), I = g;
73
+ export {
74
+ I as default
75
+ };
76
+ //# sourceMappingURL=view-payment-method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-payment-method.js","sources":["../../../../../src/features/parent-dashboard/modals/view-payment-method/view-payment-method.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { type IViewPaymentMethodProps } from './view-payment-method-types';\n\nconst ViewPaymentMethod = memo(() => {\n const { paymentMethodDetails, onCancel } = useModalParams<IViewPaymentMethodProps>();\n\n const {\n exp_month: expMonth,\n exp_year: expYear,\n last_4_digits: last4Digits,\n } = paymentMethodDetails || {};\n\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n return (\n <FlexView $gapX={isMobile ? 2.25 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text\n $renderAs=\"ah4-bold\"\n $renderOnMobileAs=\"ac4-black\"\n $color={isMobile ? 'WHITE_T_60' : 'WHITE'}\n >\n {isMobile ? 'Payment Method' : 'View Payment Method'}\n </Text>\n <Separator heightX={isMobile ? 1 : 2.5} />\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"flex-start\"\n $alignItems=\"center\"\n $flexGapX={0.5}\n $gapX={1}\n $gutterX={1}\n $background=\"BLACK_2\"\n $borderColor=\"BLACK_5\"\n >\n <FlexView $widthX={3} $heightX={1.75} $background=\"BLACK_4\" $borderRadiusX={0.25} />\n <FlexView>\n <Text $renderAs=\"ac4-black\" $color=\"WHITE\">\n •••• {last4Digits}\n </Text>\n <Text $renderAs=\"ub3-bold\" $color=\"WHITE\">\n Card{' '}\n <Text $renderAs=\"ub3\" $color=\"WHITE\" $inline>\n Exp: {expMonth}/{expYear}\n </Text>\n </Text>\n </FlexView>\n </FlexView>\n {isMobile ? (\n <>\n <Separator heightX={1.5} />\n <TextButton\n size=\"small\"\n label=\"Cancel subscription\"\n color=\"WHITE_T_60\"\n onClick={onCancel}\n />\n </>\n ) : null}\n </FlexView>\n );\n});\n\nexport default ViewPaymentMethod;\n"],"names":["ViewPaymentMethod","memo","paymentMethodDetails","onCancel","useModalParams","expMonth","expYear","last4Digits","device","useTheme","isMobile","EDeviceType","jsxs","FlexView","jsx","Text","Separator","Fragment","TextButton","ViewPaymentMethod$1"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAoBC,EAAK,MAAM;AACnC,QAAM,EAAE,sBAAAC,GAAsB,UAAAC,EAAS,IAAIC,EAAwC,GAE7E;AAAA,IACJ,WAAWC;AAAA,IACX,UAAUC;AAAA,IACV,eAAeC;AAAA,EAAA,IACbL,KAAwB,CAAA,GAEtB,EAAE,QAAAM,MAAWC,KACbC,IAAWF,KAAUG,EAAY;AAGrC,SAAA,gBAAAC,EAACC,GAAS,EAAA,OAAOH,IAAW,OAAO,KAAK,UAAUA,IAAW,IAAI,KAAK,aAAY,WAChF,UAAA;AAAA,IAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,mBAAkB;AAAA,QAClB,QAAQL,IAAW,eAAe;AAAA,QAEjC,cAAW,mBAAmB;AAAA,MAAA;AAAA,IACjC;AAAA,IACC,gBAAAI,EAAAE,GAAA,EAAU,SAASN,IAAW,IAAI,KAAK;AAAA,IACxC,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,WAAW;AAAA,QACX,OAAO;AAAA,QACP,UAAU;AAAA,QACV,aAAY;AAAA,QACZ,cAAa;AAAA,QAEb,UAAA;AAAA,UAAC,gBAAAC,EAAAD,GAAA,EAAS,SAAS,GAAG,UAAU,MAAM,aAAY,WAAU,gBAAgB,KAAM,CAAA;AAAA,4BACjFA,GACC,EAAA,UAAA;AAAA,YAAA,gBAAAD,EAACG,GAAK,EAAA,WAAU,aAAY,QAAO,SAAQ,UAAA;AAAA,cAAA;AAAA,cACnCR;AAAA,YAAA,GACR;AAAA,YACC,gBAAAK,EAAAG,GAAA,EAAK,WAAU,YAAW,QAAO,SAAQ,UAAA;AAAA,cAAA;AAAA,cACnC;AAAA,gCACJA,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,SAAO,IAAC,UAAA;AAAA,gBAAA;AAAA,gBACrCV;AAAA,gBAAS;AAAA,gBAAEC;AAAA,cAAA,GACnB;AAAA,YAAA,GACF;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,IACCI,IAEG,gBAAAE,EAAAK,GAAA,EAAA,UAAA;AAAA,MAAC,gBAAAH,EAAAE,GAAA,EAAU,SAAS,IAAK,CAAA;AAAA,MACzB,gBAAAF;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAM;AAAA,UACN,OAAM;AAAA,UACN,SAASf;AAAA,QAAA;AAAA,MACX;AAAA,IAAA,EAAA,CACF,IACE;AAAA,EACN,EAAA,CAAA;AAEJ,CAAC,GAEDgB,IAAenB;"}