@cuemath/leap 3.1.2-beta-0.5 → 3.1.2-j2

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 (157) hide show
  1. package/dist/assets/illustrations/illustrations.js +1 -2
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/check.js +3 -3
  4. package/dist/assets/line-icons/icons/check.js.map +1 -1
  5. package/dist/features/auth/account-selector/account-selector-styled.js +9 -0
  6. package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -0
  7. package/dist/features/auth/account-selector/account-selector.js +56 -36
  8. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  9. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js +21 -0
  10. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js.map +1 -0
  11. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +8 -9
  12. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  13. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +1 -1
  14. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -1
  15. package/dist/features/auth/forgot-password/forgot-password-styled.js +15 -3
  16. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  17. package/dist/features/auth/forgot-password/otp-form/otp-form.js +29 -29
  18. package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -1
  19. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +14 -18
  20. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -1
  21. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +23 -24
  22. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -1
  23. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +4 -2
  24. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  25. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +85 -75
  26. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
  27. package/dist/features/auth/login/login-styled.js +13 -0
  28. package/dist/features/auth/login/login-styled.js.map +1 -0
  29. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +26 -20
  30. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -1
  31. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js +9 -0
  32. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js.map +1 -0
  33. package/dist/features/auth/login/social-login-methods/social-login-methods.js +43 -34
  34. package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -1
  35. package/dist/features/auth/login/username-password-form/username-password-form.js +22 -21
  36. package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
  37. package/dist/features/auth/user-list/user-item/user-item.js +25 -24
  38. package/dist/features/auth/user-list/user-item/user-item.js.map +1 -1
  39. package/dist/features/auth/user-list/user-list.js +60 -51
  40. package/dist/features/auth/user-list/user-list.js.map +1 -1
  41. package/dist/features/cue-canvas/cue-canvas-context.js +5 -8
  42. package/dist/features/cue-canvas/cue-canvas-context.js.map +1 -1
  43. package/dist/features/cue-canvas/cue-canvas-core.js +75 -80
  44. package/dist/features/cue-canvas/cue-canvas-core.js.map +1 -1
  45. package/dist/features/cue-canvas/cue-canvas-helpers.js +25 -31
  46. package/dist/features/cue-canvas/cue-canvas-helpers.js.map +1 -1
  47. package/dist/features/cue-canvas/cue-canvas-provider.js +12 -14
  48. package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
  49. package/dist/features/cue-canvas/cue-canvas.js +65 -79
  50. package/dist/features/cue-canvas/cue-canvas.js.map +1 -1
  51. package/dist/features/cue-canvas/cue-cavas-styled.js +42 -45
  52. package/dist/features/cue-canvas/cue-cavas-styled.js.map +1 -1
  53. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +54 -61
  54. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  55. package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js +14 -18
  56. package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js.map +1 -1
  57. package/dist/features/cue-canvas/toolbar/grid-menu.js +13 -13
  58. package/dist/features/cue-canvas/toolbar/grid-menu.js.map +1 -1
  59. package/dist/features/cue-canvas/toolbar/tool.js +20 -22
  60. package/dist/features/cue-canvas/toolbar/tool.js.map +1 -1
  61. package/dist/features/homework/styles.js +4 -5
  62. package/dist/features/homework/styles.js.map +1 -1
  63. package/dist/features/hooks/use-device-type.js +25 -0
  64. package/dist/features/hooks/use-device-type.js.map +1 -0
  65. package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +36 -38
  66. package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
  67. package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js +22 -24
  68. package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js.map +1 -1
  69. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js +22 -23
  70. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
  71. package/dist/features/milestone/create/comps/chapters-selection-step/utils.js +47 -49
  72. package/dist/features/milestone/create/comps/chapters-selection-step/utils.js.map +1 -1
  73. package/dist/features/milestone/create/comps/class-details-step/class-details-step.js +87 -94
  74. package/dist/features/milestone/create/comps/class-details-step/class-details-step.js.map +1 -1
  75. package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js +12 -13
  76. package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js.map +1 -1
  77. package/dist/features/milestone/create/comps/test-type-step/test-type-step.js +21 -23
  78. package/dist/features/milestone/create/comps/test-type-step/test-type-step.js.map +1 -1
  79. package/dist/features/milestone/create/milestone-create-helpers.js +162 -165
  80. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  81. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +124 -103
  82. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  83. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +14 -15
  84. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  85. package/dist/features/trial-session/comps/pricing/pricing.js +35 -36
  86. package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
  87. package/dist/features/ui/buttons/button/button-styled.js +29 -29
  88. package/dist/features/ui/buttons/button/button-styled.js.map +1 -1
  89. package/dist/features/ui/stepper/stepper.js +7 -7
  90. package/dist/features/utils/media.js +16 -0
  91. package/dist/features/utils/media.js.map +1 -0
  92. package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js +19 -22
  93. package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js.map +1 -1
  94. package/dist/index.d.ts +24 -79
  95. package/dist/index.js +265 -268
  96. package/dist/index.js.map +1 -1
  97. package/dist/static/cuemath-app-qr-code.7205ee79.svg +1 -0
  98. package/package.json +1 -1
  99. package/dist/assets/line-icons/icons/puzzle-icon.js +0 -51
  100. package/dist/assets/line-icons/icons/puzzle-icon.js.map +0 -1
  101. package/dist/assets/line-icons/icons/share.js +0 -48
  102. package/dist/assets/line-icons/icons/share.js.map +0 -1
  103. package/dist/assets/line-icons/icons/tile.js +0 -54
  104. package/dist/assets/line-icons/icons/tile.js.map +0 -1
  105. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +0 -12
  106. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +0 -1
  107. package/dist/features/cue-canvas/bottombar/homework-controls.js +0 -73
  108. package/dist/features/cue-canvas/bottombar/homework-controls.js.map +0 -1
  109. package/dist/features/cue-canvas/hooks/use-upload-helper.js +0 -23
  110. package/dist/features/cue-canvas/hooks/use-upload-helper.js.map +0 -1
  111. package/dist/features/cue-canvas/sidebar/homework/helper.js +0 -20
  112. package/dist/features/cue-canvas/sidebar/homework/helper.js.map +0 -1
  113. package/dist/features/cue-canvas/sidebar/homework/homework-menu.js +0 -33
  114. package/dist/features/cue-canvas/sidebar/homework/homework-menu.js.map +0 -1
  115. package/dist/features/cue-canvas/sidebar/homework/homework-request.js +0 -68
  116. package/dist/features/cue-canvas/sidebar/homework/homework-request.js.map +0 -1
  117. package/dist/features/cue-canvas/sidebar/homework/homework-styled.js +0 -25
  118. package/dist/features/cue-canvas/sidebar/homework/homework-styled.js.map +0 -1
  119. package/dist/features/cue-canvas/sidebar/homework/homework.js +0 -39
  120. package/dist/features/cue-canvas/sidebar/homework/homework.js.map +0 -1
  121. package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js +0 -13
  122. package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +0 -1
  123. package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js +0 -60
  124. package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js.map +0 -1
  125. package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js +0 -44
  126. package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js.map +0 -1
  127. package/dist/features/cue-canvas/sidebar/puzzles/filters.js +0 -107
  128. package/dist/features/cue-canvas/sidebar/puzzles/filters.js.map +0 -1
  129. package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js +0 -42
  130. package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js.map +0 -1
  131. package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js +0 -84
  132. package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js.map +0 -1
  133. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js +0 -36
  134. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js.map +0 -1
  135. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js +0 -133
  136. package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js.map +0 -1
  137. package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js +0 -96
  138. package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js.map +0 -1
  139. package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js +0 -29
  140. package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js.map +0 -1
  141. package/dist/features/cue-canvas/sidebar/puzzles/utils.js +0 -120
  142. package/dist/features/cue-canvas/sidebar/puzzles/utils.js.map +0 -1
  143. package/dist/features/cue-canvas/sidebar/sidebar-styled.js +0 -32
  144. package/dist/features/cue-canvas/sidebar/sidebar-styled.js.map +0 -1
  145. package/dist/features/cue-canvas/sidebar/sidebar.js +0 -29
  146. package/dist/features/cue-canvas/sidebar/sidebar.js.map +0 -1
  147. package/dist/features/cue-canvas/sidebar/tiles/tile.js +0 -16
  148. package/dist/features/cue-canvas/sidebar/tiles/tile.js.map +0 -1
  149. package/dist/features/hooks/use-debounce.js +0 -16
  150. package/dist/features/hooks/use-debounce.js.map +0 -1
  151. package/dist/features/milestone/milestone-list-container/api/get-past-milestone-count.js +0 -18
  152. package/dist/features/milestone/milestone-list-container/api/get-past-milestone-count.js.map +0 -1
  153. package/dist/features/trial-session/comps/pricing/india-pricing/index.js +0 -96
  154. package/dist/features/trial-session/comps/pricing/india-pricing/index.js.map +0 -1
  155. package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js +0 -59
  156. package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js.map +0 -1
  157. package/dist/static/ellipse-clip.dfb25608.svg +0 -1
@@ -1,16 +1,16 @@
1
1
  import u from "styled-components";
2
2
  import x from "../../text/text.js";
3
- const d = u.button(
4
- ({ theme: c, $width: e, $widthX: i, $alignSelf: o, $justifyContent: t, $renderAs: a, $size: n, $shape: $ }) => {
5
- const { button: b, colors: r, layout: p } = c, { backgroundColorName: s, borderColorName: l } = b.variants[a], { height: v, paddingHorizontal: g, borderWidth: h } = b.sizes[n];
3
+ const s = u.button(
4
+ ({ theme: c, $width: t, $widthX: i, $alignSelf: o, $justifyContent: e, $renderAs: a, $size: n, $shape: $ }) => {
5
+ const { button: b, colors: r, layout: p } = c, { backgroundColorName: d, borderColorName: l } = b.variants[a], { height: v, paddingHorizontal: g, borderWidth: h } = b.sizes[n];
6
6
  return `
7
7
  position: relative;
8
8
  display: flex;
9
- justify-content: ${t};
9
+ justify-content: ${e};
10
10
  align-items: center;
11
11
  ${o ? `align-self: ${o};` : ""}
12
12
 
13
- width: ${e ? `${e}px` : "auto"};
13
+ width: ${t ? `${t}` : "auto"}${typeof t == "number" ? "px" : ""};
14
14
  ${i ? `width: ${i * p.gutter}px;` : ""}
15
15
  height: ${v}px;
16
16
  padding: 0 ${g}px;
@@ -19,56 +19,56 @@ const d = u.button(
19
19
  border-radius: ${$ === "curved" ? v / 2 : 0}px;
20
20
  outline: none;
21
21
 
22
- background-color: ${r[s.inactive]};
22
+ background-color: ${r[d.inactive]};
23
23
  border-color: ${r[l.inactive]};
24
24
 
25
25
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
26
26
  cursor: pointer;
27
27
 
28
28
  &:hover {
29
- background-color: ${r[s.active]};
29
+ background-color: ${r[d.active]};
30
30
  border-color: ${r[l.active]};
31
31
  }
32
32
 
33
33
  &:active {
34
- background: ${r[s.inactive]};
34
+ background: ${r[d.inactive]};
35
35
  border-color: ${r[l.inactive]};
36
36
  }
37
37
 
38
38
  &[data-busy="true"] {
39
39
  cursor: wait;
40
- background-color: ${r[s.active]};
40
+ background-color: ${r[d.active]};
41
41
  border-color: ${r[l.active]};
42
42
  }
43
43
 
44
44
  &:disabled {
45
- background-color: ${r[s.disabled]};
45
+ background-color: ${r[d.disabled]};
46
46
  border-color: ${r[l.disabled]};
47
47
  cursor: not-allowed;
48
48
  }
49
49
  `;
50
50
  }
51
- ), k = u(x)(({ theme: c, $buttonRenderAs: e }) => {
52
- const { button: i, colors: o } = c, { colorName: t } = i.variants[e];
51
+ ), f = u(x)(({ theme: c, $buttonRenderAs: t }) => {
52
+ const { button: i, colors: o } = c, { colorName: e } = i.variants[t];
53
53
  return `
54
- color: ${o[t.inactive]};
54
+ color: ${o[e.inactive]};
55
55
  transition: color 0.2s ease-in-out;
56
56
 
57
- ${d}:hover & {
58
- color: ${o[t.active]};
57
+ ${s}:hover & {
58
+ color: ${o[e.active]};
59
59
  }
60
60
 
61
- ${d}:active & {
62
- color: ${o[t.inactive]};
61
+ ${s}:active & {
62
+ color: ${o[e.inactive]};
63
63
  }
64
64
 
65
- ${d}:disabled & {
66
- color: ${o[t.disabled]};
65
+ ${s}:disabled & {
66
+ color: ${o[e.disabled]};
67
67
  opacity: 0.5;
68
68
  }
69
69
  `;
70
- }), f = u.div(({ theme: c, $buttonRenderAs: e, $size: i, $iconPosition: o }) => {
71
- const { button: t, colors: a } = c, { colorName: n } = t.variants[e], { iconSize: $, iconPadding: b } = t.sizes[i];
70
+ }), k = u.div(({ theme: c, $buttonRenderAs: t, $size: i, $iconPosition: o }) => {
71
+ const { button: e, colors: a } = c, { colorName: n } = e.variants[t], { iconSize: $, iconPadding: b } = e.sizes[i];
72
72
  return `
73
73
  ${o === "left" ? "padding-right" : "padding-left"}: ${b}px;
74
74
  order: ${o === "left" ? -1 : 1};
@@ -80,31 +80,31 @@ const d = u.button(
80
80
  color: ${a[n.inactive]};
81
81
  transition: color 0.2s ease-in-out;
82
82
 
83
- ${d}:hover & {
83
+ ${s}:hover & {
84
84
  color: ${a[n.active]};
85
85
  }
86
86
 
87
- ${d}:active & {
87
+ ${s}:active & {
88
88
  color: ${a[n.inactive]};
89
89
  }
90
90
 
91
- ${d}:disabled & {
91
+ ${s}:disabled & {
92
92
  color: ${a[n.disabled]};
93
93
  opacity: 0.5;
94
94
  }
95
95
  }
96
96
  `;
97
- }), z = u.img(({ theme: c, $size: e }) => {
98
- const { button: i } = c, { loaderSize: o } = i.sizes[e];
97
+ }), z = u.img(({ theme: c, $size: t }) => {
98
+ const { button: i } = c, { loaderSize: o } = i.sizes[t];
99
99
  return `
100
100
  width: ${o}px;
101
101
  height: ${o}px;
102
102
  `;
103
103
  });
104
104
  export {
105
- d as Button,
106
- f as Icon,
107
- k as Label,
105
+ s as Button,
106
+ k as Icon,
107
+ f as Label,
108
108
  z as Loader
109
109
  };
110
110
  //# sourceMappingURL=button-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-styled.js","sources":["../../../../../src/features/ui/buttons/button/button-styled.tsx"],"sourcesContent":["import type { IButtonProps } from './button-types';\n\nimport styled from 'styled-components';\n\nimport Text from '../../text/text';\n\ninterface IStyledButtonProps {\n $width: IButtonProps['width'];\n $widthX: IButtonProps['widthX'];\n $alignSelf: IButtonProps['alignSelf'];\n $renderAs: IButtonProps['renderAs'];\n $size: Required<IButtonProps>['size'];\n $shape: Required<IButtonProps>['shape'];\n $justifyContent: IButtonProps['justifyContent'];\n}\n\nconst Button = styled.button<IStyledButtonProps>(\n ({ theme, $width, $widthX, $alignSelf, $justifyContent, $renderAs, $size, $shape }) => {\n const { button, colors, layout } = theme;\n const { backgroundColorName, borderColorName } = button.variants[$renderAs];\n const { height, paddingHorizontal, borderWidth } = button.sizes[$size];\n\n return `\n position: relative;\n display: flex;\n justify-content: ${$justifyContent};\n align-items: center;\n ${$alignSelf ? `align-self: ${$alignSelf};` : ''}\n \n width: ${$width ? `${$width}px` : 'auto'};\n ${$widthX ? `width: ${$widthX * layout.gutter}px;` : ''}\n height: ${height}px;\n padding: 0 ${paddingHorizontal}px;\n border-width: ${borderWidth}px;\n border-style: solid;\n border-radius: ${$shape === 'curved' ? height / 2 : 0}px;\n outline: none;\n\n background-color: ${colors[backgroundColorName.inactive]};\n border-color: ${colors[borderColorName.inactive]};\n \n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n\n &:hover {\n background-color: ${colors[backgroundColorName.active]};\n border-color: ${colors[borderColorName.active]};\n }\n\n &:active {\n background: ${colors[backgroundColorName.inactive]};\n border-color: ${colors[borderColorName.inactive]};\n }\n\n &[data-busy=\"true\"] {\n cursor: wait;\n background-color: ${colors[backgroundColorName.active]};\n border-color: ${colors[borderColorName.active]};\n }\n\n &:disabled {\n background-color: ${colors[backgroundColorName.disabled]};\n border-color: ${colors[borderColorName.disabled]};\n cursor: not-allowed;\n }\n `;\n },\n);\n\ninterface IStyledTextProps {\n $buttonRenderAs: IButtonProps['renderAs'];\n}\n\nconst Label = styled(Text)<IStyledTextProps>(({ theme, $buttonRenderAs }) => {\n const { button, colors } = theme;\n const { colorName } = button.variants[$buttonRenderAs];\n\n return `\n color: ${colors[colorName.inactive]};\n transition: color 0.2s ease-in-out;\n\n ${Button}:hover & {\n color: ${colors[colorName.active]};\n }\n \n ${Button}:active & {\n color: ${colors[colorName.inactive]};\n }\n\n ${Button}:disabled & {\n color: ${colors[colorName.disabled]};\n opacity: 0.5;\n }\n `;\n});\n\ninterface IStyledIconProps {\n $size: NonNullable<IButtonProps['size']>;\n $iconPosition: NonNullable<IButtonProps['iconPosition']>;\n $buttonRenderAs: IButtonProps['renderAs'];\n}\n\nconst Icon = styled.div<IStyledIconProps>(({ theme, $buttonRenderAs, $size, $iconPosition }) => {\n const { button, colors } = theme;\n const { colorName } = button.variants[$buttonRenderAs];\n const { iconSize, iconPadding } = button.sizes[$size];\n\n return `\n ${$iconPosition === 'left' ? 'padding-right' : 'padding-left'}: ${iconPadding}px;\n order: ${$iconPosition === 'left' ? -1 : 1};\n \n & svg {\n display: block;\n width: ${iconSize}px;\n height: ${iconSize}px;\n color: ${colors[colorName.inactive]};\n transition: color 0.2s ease-in-out;\n\n ${Button}:hover & {\n color: ${colors[colorName.active]};\n }\n\n ${Button}:active & {\n color: ${colors[colorName.inactive]};\n }\n\n ${Button}:disabled & {\n color: ${colors[colorName.disabled]};\n opacity: 0.5;\n }\n }\n `;\n});\n\ninterface IStyledLoaderProps {\n $size: Required<IButtonProps>['size'];\n}\n\nconst Loader = styled.img<IStyledLoaderProps>(({ theme, $size }) => {\n const { button } = theme;\n const { loaderSize } = button.sizes[$size];\n\n return `\n width: ${loaderSize}px;\n height: ${loaderSize}px;\n `;\n});\n\nexport { Button, Label, Icon, Loader };\n"],"names":["Button","styled","theme","$width","$widthX","$alignSelf","$justifyContent","$renderAs","$size","$shape","button","colors","layout","backgroundColorName","borderColorName","height","paddingHorizontal","borderWidth","Label","Text","$buttonRenderAs","colorName","Icon","$iconPosition","iconSize","iconPadding","Loader","loaderSize"],"mappings":"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"}
1
+ {"version":3,"file":"button-styled.js","sources":["../../../../../src/features/ui/buttons/button/button-styled.tsx"],"sourcesContent":["import type { IButtonProps } from './button-types';\n\nimport styled from 'styled-components';\n\nimport Text from '../../text/text';\n\ninterface IStyledButtonProps {\n $width: IButtonProps['width'];\n $widthX: IButtonProps['widthX'];\n $alignSelf: IButtonProps['alignSelf'];\n $renderAs: IButtonProps['renderAs'];\n $size: Required<IButtonProps>['size'];\n $shape: Required<IButtonProps>['shape'];\n $justifyContent: IButtonProps['justifyContent'];\n}\n\nconst Button = styled.button<IStyledButtonProps>(\n ({ theme, $width, $widthX, $alignSelf, $justifyContent, $renderAs, $size, $shape }) => {\n const { button, colors, layout } = theme;\n const { backgroundColorName, borderColorName } = button.variants[$renderAs];\n const { height, paddingHorizontal, borderWidth } = button.sizes[$size];\n\n return `\n position: relative;\n display: flex;\n justify-content: ${$justifyContent};\n align-items: center;\n ${$alignSelf ? `align-self: ${$alignSelf};` : ''}\n \n width: ${$width ? `${$width}` : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * layout.gutter}px;` : ''}\n height: ${height}px;\n padding: 0 ${paddingHorizontal}px;\n border-width: ${borderWidth}px;\n border-style: solid;\n border-radius: ${$shape === 'curved' ? height / 2 : 0}px;\n outline: none;\n\n background-color: ${colors[backgroundColorName.inactive]};\n border-color: ${colors[borderColorName.inactive]};\n \n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n\n &:hover {\n background-color: ${colors[backgroundColorName.active]};\n border-color: ${colors[borderColorName.active]};\n }\n\n &:active {\n background: ${colors[backgroundColorName.inactive]};\n border-color: ${colors[borderColorName.inactive]};\n }\n\n &[data-busy=\"true\"] {\n cursor: wait;\n background-color: ${colors[backgroundColorName.active]};\n border-color: ${colors[borderColorName.active]};\n }\n\n &:disabled {\n background-color: ${colors[backgroundColorName.disabled]};\n border-color: ${colors[borderColorName.disabled]};\n cursor: not-allowed;\n }\n `;\n },\n);\n\ninterface IStyledTextProps {\n $buttonRenderAs: IButtonProps['renderAs'];\n}\n\nconst Label = styled(Text)<IStyledTextProps>(({ theme, $buttonRenderAs }) => {\n const { button, colors } = theme;\n const { colorName } = button.variants[$buttonRenderAs];\n\n return `\n color: ${colors[colorName.inactive]};\n transition: color 0.2s ease-in-out;\n\n ${Button}:hover & {\n color: ${colors[colorName.active]};\n }\n \n ${Button}:active & {\n color: ${colors[colorName.inactive]};\n }\n\n ${Button}:disabled & {\n color: ${colors[colorName.disabled]};\n opacity: 0.5;\n }\n `;\n});\n\ninterface IStyledIconProps {\n $size: NonNullable<IButtonProps['size']>;\n $iconPosition: NonNullable<IButtonProps['iconPosition']>;\n $buttonRenderAs: IButtonProps['renderAs'];\n}\n\nconst Icon = styled.div<IStyledIconProps>(({ theme, $buttonRenderAs, $size, $iconPosition }) => {\n const { button, colors } = theme;\n const { colorName } = button.variants[$buttonRenderAs];\n const { iconSize, iconPadding } = button.sizes[$size];\n\n return `\n ${$iconPosition === 'left' ? 'padding-right' : 'padding-left'}: ${iconPadding}px;\n order: ${$iconPosition === 'left' ? -1 : 1};\n \n & svg {\n display: block;\n width: ${iconSize}px;\n height: ${iconSize}px;\n color: ${colors[colorName.inactive]};\n transition: color 0.2s ease-in-out;\n\n ${Button}:hover & {\n color: ${colors[colorName.active]};\n }\n\n ${Button}:active & {\n color: ${colors[colorName.inactive]};\n }\n\n ${Button}:disabled & {\n color: ${colors[colorName.disabled]};\n opacity: 0.5;\n }\n }\n `;\n});\n\ninterface IStyledLoaderProps {\n $size: Required<IButtonProps>['size'];\n}\n\nconst Loader = styled.img<IStyledLoaderProps>(({ theme, $size }) => {\n const { button } = theme;\n const { loaderSize } = button.sizes[$size];\n\n return `\n width: ${loaderSize}px;\n height: ${loaderSize}px;\n `;\n});\n\nexport { Button, Label, Icon, Loader };\n"],"names":["Button","styled","theme","$width","$widthX","$alignSelf","$justifyContent","$renderAs","$size","$shape","button","colors","layout","backgroundColorName","borderColorName","height","paddingHorizontal","borderWidth","Label","Text","$buttonRenderAs","colorName","Icon","$iconPosition","iconSize","iconPadding","Loader","loaderSize"],"mappings":";;AAgBA,MAAMA,IAASC,EAAO;AAAA,EACpB,CAAC,EAAE,OAAAC,GAAO,QAAAC,GAAQ,SAAAC,GAAS,YAAAC,GAAY,iBAAAC,GAAiB,WAAAC,GAAW,OAAAC,GAAO,QAAAC,QAAa;AACrF,UAAM,EAAE,QAAAC,GAAQ,QAAAC,GAAQ,QAAAC,EAAA,IAAWV,GAC7B,EAAE,qBAAAW,GAAqB,iBAAAC,EAAA,IAAoBJ,EAAO,SAASH,CAAS,GACpE,EAAE,QAAAQ,GAAQ,mBAAAC,GAAmB,aAAAC,EAAgB,IAAAP,EAAO,MAAMF,CAAK;AAE9D,WAAA;AAAA;AAAA;AAAA,yBAGcF,CAAe;AAAA;AAAA,QAEhCD,IAAa,eAAeA,CAAU,MAAM,EAAE;AAAA;AAAA,eAEvCF,IAAS,GAAGA,CAAM,KAAK,MAAM,GAAG,OAAOA,KAAW,WAAW,OAAO,EAAE;AAAA,QAC7EC,IAAU,UAAUA,IAAUQ,EAAO,MAAM,QAAQ,EAAE;AAAA,gBAC7CG,CAAM;AAAA,mBACHC,CAAiB;AAAA,sBACdC,CAAW;AAAA;AAAA,uBAEVR,MAAW,WAAWM,IAAS,IAAI,CAAC;AAAA;AAAA;AAAA,0BAGjCJ,EAAOE,EAAoB,QAAQ,CAAC;AAAA,sBACxCF,EAAOG,EAAgB,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAM1BH,EAAOE,EAAoB,MAAM,CAAC;AAAA,wBACtCF,EAAOG,EAAgB,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA,sBAIhCH,EAAOE,EAAoB,QAAQ,CAAC;AAAA,wBAClCF,EAAOG,EAAgB,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,4BAK5BH,EAAOE,EAAoB,MAAM,CAAC;AAAA,wBACtCF,EAAOG,EAAgB,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA,4BAI1BH,EAAOE,EAAoB,QAAQ,CAAC;AAAA,wBACxCF,EAAOG,EAAgB,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA,EAItD;AACF,GAMMI,IAAQjB,EAAOkB,CAAI,EAAoB,CAAC,EAAE,OAAAjB,GAAO,iBAAAkB,QAAsB;AACrE,QAAA,EAAE,QAAAV,GAAQ,QAAAC,EAAW,IAAAT,GACrB,EAAE,WAAAmB,EAAc,IAAAX,EAAO,SAASU,CAAe;AAE9C,SAAA;AAAA,eACMT,EAAOU,EAAU,QAAQ,CAAC;AAAA;AAAA;AAAA,QAGjCrB,CAAM;AAAA,iBACGW,EAAOU,EAAU,MAAM,CAAC;AAAA;AAAA;AAAA,QAGjCrB,CAAM;AAAA,iBACGW,EAAOU,EAAU,QAAQ,CAAC;AAAA;AAAA;AAAA,QAGnCrB,CAAM;AAAA,iBACGW,EAAOU,EAAU,QAAQ,CAAC;AAAA;AAAA;AAAA;AAI3C,CAAC,GAQKC,IAAOrB,EAAO,IAAsB,CAAC,EAAE,OAAAC,GAAO,iBAAAkB,GAAiB,OAAAZ,GAAO,eAAAe,QAAoB;AACxF,QAAA,EAAE,QAAAb,GAAQ,QAAAC,EAAW,IAAAT,GACrB,EAAE,WAAAmB,EAAc,IAAAX,EAAO,SAASU,CAAe,GAC/C,EAAE,UAAAI,GAAU,aAAAC,EAAA,IAAgBf,EAAO,MAAMF,CAAK;AAE7C,SAAA;AAAA,QACDe,MAAkB,SAAS,kBAAkB,cAAc,KAAKE,CAAW;AAAA,eACpEF,MAAkB,SAAS,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,iBAI/BC,CAAQ;AAAA,kBACPA,CAAQ;AAAA,iBACTb,EAAOU,EAAU,QAAQ,CAAC;AAAA;AAAA;AAAA,UAGjCrB,CAAM;AAAA,mBACGW,EAAOU,EAAU,MAAM,CAAC;AAAA;AAAA;AAAA,UAGjCrB,CAAM;AAAA,mBACGW,EAAOU,EAAU,QAAQ,CAAC;AAAA;AAAA;AAAA,UAGnCrB,CAAM;AAAA,mBACGW,EAAOU,EAAU,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAK7C,CAAC,GAMKK,IAASzB,EAAO,IAAwB,CAAC,EAAE,OAAAC,GAAO,OAAAM,QAAY;AAC5D,QAAA,EAAE,QAAAE,EAAW,IAAAR,GACb,EAAE,YAAAyB,EAAe,IAAAjB,EAAO,MAAMF,CAAK;AAElC,SAAA;AAAA,aACImB,CAAU;AAAA,cACTA,CAAU;AAAA;AAExB,CAAC;"}
@@ -1,14 +1,14 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import l from "../../../assets/line-icons/icons/check.js";
3
- import m from "../text/text.js";
2
+ import m from "../../../assets/line-icons/icons/check.js";
3
+ import h from "../text/text.js";
4
4
  import { getTheme as p } from "../theme/get-theme.js";
5
5
  import { MainWrapper as a, HorizontalLine as d, Wrapper as g, NumberWrapper as f, StyledText as s } from "./stepper-styled.js";
6
6
  const { layout: u } = p(), { gutter: i } = u;
7
- function W({ stepsInfo: n = [], currentStep: e = 2 }) {
7
+ function j({ stepsInfo: n = [], currentStep: e = 2 }) {
8
8
  const c = n.length && e >= 1 ? (e - 1) / n.length * 100 : 0;
9
9
  return /* @__PURE__ */ o(a, { $flexDirection: "row", $width: "fit-content", $gutterX: 0.625, $gapX: 0.625, children: [
10
10
  /* @__PURE__ */ t(d, { $percentageCompleted: c, $height: 1 }),
11
- n.map(({ id: $, label: h }, r) => /* @__PURE__ */ o(
11
+ n.map(({ id: $, label: l }, r) => /* @__PURE__ */ o(
12
12
  g,
13
13
  {
14
14
  $flexDirection: "row",
@@ -25,10 +25,10 @@ function W({ stepsInfo: n = [], currentStep: e = 2 }) {
25
25
  $justifyContent: "center",
26
26
  $heightX: 1.25,
27
27
  $widthX: 1.25,
28
- children: r + 1 < e ? /* @__PURE__ */ t(l, { height: i, width: i }) : /* @__PURE__ */ t(m, { $renderAs: "body3", $color: "WHITE", children: $ })
28
+ children: r + 1 < e ? /* @__PURE__ */ t(m, { height: i, width: i }) : /* @__PURE__ */ t(h, { $renderAs: "body3", $color: "WHITE", children: $ })
29
29
  }
30
30
  ),
31
- r + 1 === e && /* @__PURE__ */ t(s, { $renderAs: "body2", children: h })
31
+ r + 1 === e && /* @__PURE__ */ t(s, { $renderAs: "body2", children: l })
32
32
  ]
33
33
  },
34
34
  r
@@ -36,6 +36,6 @@ function W({ stepsInfo: n = [], currentStep: e = 2 }) {
36
36
  ] });
37
37
  }
38
38
  export {
39
- W as default
39
+ j as default
40
40
  };
41
41
  //# sourceMappingURL=stepper.js.map
@@ -0,0 +1,16 @@
1
+ const e = {
2
+ mobile: 480,
3
+ tablet: 760,
4
+ desktop: 920,
5
+ large: 1200,
6
+ xl: 1424
7
+ }, t = (r) => r < e.mobile || r >= e.mobile && r < e.tablet ? "mobile" : r >= e.tablet && r < e.desktop ? "tablet" : r >= e.desktop && r < e.large ? "desktop" : r >= e.large && r < e.xl ? "large" : (r >= e.xl, "xl"), l = {
8
+ up920: `@media (min-width: ${e.desktop}px)`,
9
+ down919: `@media (max-width: ${e.desktop - 1}px)`
10
+ };
11
+ export {
12
+ e as BREAKPOINTS,
13
+ t as getDeviceType,
14
+ l as media
15
+ };
16
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.js","sources":["../../../src/features/utils/media.ts"],"sourcesContent":["export const BREAKPOINTS = {\n mobile: 480,\n tablet: 760,\n desktop: 920,\n large: 1200,\n xl: 1424,\n};\nexport type TDeviceType = 'mobile' | 'tablet' | 'desktop' | 'large' | 'xl';\n\nexport const getDeviceType = (width: number): TDeviceType => {\n if (width < BREAKPOINTS.mobile) return 'mobile';\n\n if (width >= BREAKPOINTS.mobile && width < BREAKPOINTS.tablet) return 'mobile';\n\n if (width >= BREAKPOINTS.tablet && width < BREAKPOINTS.desktop) return 'tablet';\n\n if (width >= BREAKPOINTS.desktop && width < BREAKPOINTS.large) return 'desktop';\n\n if (width >= BREAKPOINTS.large && width < BREAKPOINTS.xl) return 'large';\n\n if (width >= BREAKPOINTS.xl) return 'xl';\n\n return 'xl';\n};\n\nexport const media = {\n up920: `@media (min-width: ${BREAKPOINTS.desktop}px)`,\n down919: `@media (max-width: ${BREAKPOINTS.desktop - 1}px)`,\n};\n"],"names":["BREAKPOINTS","getDeviceType","width","media"],"mappings":"AAAO,MAAMA,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,IAAI;AACN,GAGaC,IAAgB,CAACC,MACxBA,IAAQF,EAAY,UAEpBE,KAASF,EAAY,UAAUE,IAAQF,EAAY,SAAe,WAElEE,KAASF,EAAY,UAAUE,IAAQF,EAAY,UAAgB,WAEnEE,KAASF,EAAY,WAAWE,IAAQF,EAAY,QAAc,YAElEE,KAASF,EAAY,SAASE,IAAQF,EAAY,KAAW,WAE7DE,KAASF,EAAY,IAAW,OAKzBG,IAAQ;AAAA,EACnB,OAAO,sBAAsBH,EAAY,OAAO;AAAA,EAChD,SAAS,sBAAsBA,EAAY,UAAU,CAAC;AACxD;"}
@@ -1,36 +1,33 @@
1
- import { useRef as h, useEffect as f, useCallback as k } from "react";
2
- import { useAwsSignedKey as I } from "../api/subjective-review.js";
3
- import S from "../../../../node_modules/uuid/dist/esm-browser/v4.js";
4
- const C = (y) => {
5
- const { studentId: t, query: o, enabled: r = !0 } = y, { data: s, get: d } = I(), c = h(s);
6
- return f(() => {
7
- c.current = s;
8
- }, [s]), f(() => {
9
- r && t && d(t, o);
10
- }, [o, d, t, r]), k(
11
- async ({ images: g, onSuccess: n, onError: p, fileKey: w, fileName: K }) => {
12
- const a = c.current;
1
+ import { useEffect as g, useCallback as w } from "react";
2
+ import { useAwsSignedKey as S } from "../api/subjective-review.js";
3
+ import h from "../../../../node_modules/uuid/dist/esm-browser/v4.js";
4
+ const A = (c) => {
5
+ const { studentId: t, query: o } = c, { data: a, get: s } = S();
6
+ return g(() => {
7
+ s(t, o);
8
+ }, [o, s, t]), w(
9
+ async ({ images: d, onSuccess: i, onError: l, fileKey: u, fileName: m }) => {
13
10
  if (!a) return;
14
- const i = `https://${a.bucketName}.s3.amazonaws.com/`;
11
+ const r = `https://${a.bucketName}.s3.amazonaws.com/`;
15
12
  try {
16
- const l = g.map(async (b) => {
17
- const e = new FormData(), m = `${w}${K ?? S()}`;
18
- if (e.append("key", m), e.append("AWSAccessKeyId", a.awsKey), e.append("acl", "public-read"), e.append("success_action_redirect", ""), e.append("policy", a.policy), e.append("signature", a.signature), e.append("Content-Type", "image/jpeg"), e.append("file", b.file), !(await fetch(i, {
13
+ const n = d.map(async (f) => {
14
+ const e = new FormData(), p = `${u}${m ?? h()}`;
15
+ if (e.append("key", p), e.append("AWSAccessKeyId", a.awsKey), e.append("acl", "public-read"), e.append("success_action_redirect", ""), e.append("policy", a.policy), e.append("signature", a.signature), e.append("Content-Type", "image/jpeg"), e.append("file", f.file), !(await fetch(r, {
19
16
  method: "POST",
20
17
  body: e
21
18
  })).ok)
22
19
  throw new Error("Upload failed");
23
- return `${i}${m}`;
24
- }), u = await Promise.all(l);
25
- return n == null || n(u), u;
20
+ return `${r}${p}`;
21
+ }), y = await Promise.all(n);
22
+ i(y);
26
23
  } catch {
27
- p == null || p();
24
+ l();
28
25
  }
29
26
  },
30
- []
27
+ [a]
31
28
  );
32
29
  };
33
30
  export {
34
- C as default
31
+ A as default
35
32
  };
36
33
  //# sourceMappingURL=use-s3-helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-s3-helper.js","sources":["../../../../../src/features/worksheet/worksheet/hooks/use-s3-helper.ts"],"sourcesContent":["import type { IFile } from '../worksheet-question/subjective-review';\n\nimport { useCallback, useEffect, useRef } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { useAwsSignedKey } from '../api/subjective-review';\n\ninterface IUseS3helperProps {\n studentId: string;\n query: {\n type: string;\n };\n enabled?: boolean;\n}\n\ninterface IUploadImageProps {\n images: IFile[];\n onSuccess?: (urls: string[]) => void;\n onError?: () => void;\n fileKey: string;\n fileName?: string;\n}\n\nconst useS3ImageUploadHelper = (props: IUseS3helperProps) => {\n const { studentId, query, enabled = true } = props;\n const { data, get: getAwsSignedKey } = useAwsSignedKey();\n const awsSignedKeyRef = useRef(data);\n\n useEffect(() => {\n awsSignedKeyRef.current = data;\n }, [data]);\n\n useEffect(() => {\n if (enabled && studentId) {\n getAwsSignedKey(studentId, query);\n }\n }, [query, getAwsSignedKey, studentId, enabled]);\n\n const uploadImagesToS3 = useCallback(\n async ({ images, onSuccess, onError, fileKey, fileName }: IUploadImageProps) => {\n const awsSignedKey = awsSignedKeyRef.current;\n\n if (!awsSignedKey) return;\n\n const url = `https://${awsSignedKey.bucketName}.s3.amazonaws.com/`;\n\n try {\n const uploadPromises = images.map(async (item: { file: string | Blob }) => {\n const formData = new FormData();\n const key = `${fileKey}${fileName ?? uuidv4()}`;\n\n formData.append('key', key);\n formData.append('AWSAccessKeyId', awsSignedKey.awsKey);\n formData.append('acl', 'public-read');\n formData.append('success_action_redirect', '');\n formData.append('policy', awsSignedKey.policy);\n formData.append('signature', awsSignedKey.signature);\n formData.append('Content-Type', 'image/jpeg');\n formData.append('file', item.file);\n\n const res = await fetch(url, {\n method: 'POST',\n body: formData,\n });\n\n if (!res.ok) {\n throw new Error('Upload failed');\n }\n\n return `${url}${key}`;\n });\n\n const uploadedUrls = await Promise.all(uploadPromises);\n\n onSuccess?.(uploadedUrls);\n\n return uploadedUrls;\n } catch (error) {\n onError?.();\n }\n },\n [],\n );\n\n return uploadImagesToS3;\n};\n\nexport default useS3ImageUploadHelper;\n"],"names":["useS3ImageUploadHelper","props","studentId","query","enabled","data","getAwsSignedKey","useAwsSignedKey","awsSignedKeyRef","useRef","useEffect","useCallback","images","onSuccess","onError","fileKey","fileName","awsSignedKey","url","uploadPromises","item","formData","key","uuidv4","uploadedUrls"],"mappings":";;;AAuBM,MAAAA,IAAyB,CAACC,MAA6B;AAC3D,QAAM,EAAE,WAAAC,GAAW,OAAAC,GAAO,SAAAC,IAAU,OAASH,GACvC,EAAE,MAAAI,GAAM,KAAKC,MAAoBC,EAAgB,GACjDC,IAAkBC,EAAOJ,CAAI;AAEnC,SAAAK,EAAU,MAAM;AACd,IAAAF,EAAgB,UAAUH;AAAA,EAAA,GACzB,CAACA,CAAI,CAAC,GAETK,EAAU,MAAM;AACd,IAAIN,KAAWF,KACbI,EAAgBJ,GAAWC,CAAK;AAAA,KAEjC,CAACA,GAAOG,GAAiBJ,GAAWE,CAAO,CAAC,GAEtBO;AAAA,IACvB,OAAO,EAAE,QAAAC,GAAQ,WAAAC,GAAW,SAAAC,GAAS,SAAAC,GAAS,UAAAC,QAAkC;AAC9E,YAAMC,IAAeT,EAAgB;AAErC,UAAI,CAACS,EAAc;AAEb,YAAAC,IAAM,WAAWD,EAAa,UAAU;AAE1C,UAAA;AACF,cAAME,IAAiBP,EAAO,IAAI,OAAOQ,MAAkC;AACnE,gBAAAC,IAAW,IAAI,YACfC,IAAM,GAAGP,CAAO,GAAGC,KAAYO,EAAQ,CAAA;AAgBzC,cAdKF,EAAA,OAAO,OAAOC,CAAG,GACjBD,EAAA,OAAO,kBAAkBJ,EAAa,MAAM,GAC5CI,EAAA,OAAO,OAAO,aAAa,GAC3BA,EAAA,OAAO,2BAA2B,EAAE,GACpCA,EAAA,OAAO,UAAUJ,EAAa,MAAM,GACpCI,EAAA,OAAO,aAAaJ,EAAa,SAAS,GAC1CI,EAAA,OAAO,gBAAgB,YAAY,GACnCA,EAAA,OAAO,QAAQD,EAAK,IAAI,GAO7B,EALQ,MAAM,MAAMF,GAAK;AAAA,YAC3B,QAAQ;AAAA,YACR,MAAMG;AAAA,UAAA,CACP,GAEQ;AACD,kBAAA,IAAI,MAAM,eAAe;AAG1B,iBAAA,GAAGH,CAAG,GAAGI,CAAG;AAAA,QAAA,CACpB,GAEKE,IAAe,MAAM,QAAQ,IAAIL,CAAc;AAErD,eAAAN,KAAA,QAAAA,EAAYW,IAELA;AAAA,cACO;AACJ,QAAAV,KAAA,QAAAA;AAAA,MACZ;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EAAA;AAIL;"}
1
+ {"version":3,"file":"use-s3-helper.js","sources":["../../../../../src/features/worksheet/worksheet/hooks/use-s3-helper.ts"],"sourcesContent":["import type { IFile } from '../worksheet-question/subjective-review';\n\nimport { useCallback, useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { useAwsSignedKey } from '../api/subjective-review';\n\ninterface IUseS3helper {\n (params: {\n studentId: string;\n query: {\n type: string;\n };\n }): (props: IUploadImageProps) => void;\n}\n\ninterface IUploadImageProps {\n images: IFile[];\n onSuccess: (urls: string[]) => void;\n onError: () => void;\n fileKey: string;\n fileName?: string;\n}\n\nconst useS3ImageUploadHelper: IUseS3helper = props => {\n const { studentId, query } = props;\n const { data: awsSignedKey, get: getAwsSignedKey } = useAwsSignedKey();\n\n useEffect(() => {\n getAwsSignedKey(studentId, query);\n }, [query, getAwsSignedKey, studentId]);\n\n const uploadImagesToS3 = useCallback(\n async ({ images, onSuccess, onError, fileKey, fileName }: IUploadImageProps) => {\n if (!awsSignedKey) return;\n\n const url = `https://${awsSignedKey.bucketName}.s3.amazonaws.com/`;\n\n try {\n const uploadPromises = images.map(async (item: { file: string | Blob }) => {\n const formData = new FormData();\n const key = `${fileKey}${fileName ?? uuidv4()}`;\n\n formData.append('key', key);\n formData.append('AWSAccessKeyId', awsSignedKey.awsKey);\n formData.append('acl', 'public-read');\n formData.append('success_action_redirect', '');\n formData.append('policy', awsSignedKey.policy);\n formData.append('signature', awsSignedKey.signature);\n formData.append('Content-Type', 'image/jpeg');\n formData.append('file', item.file);\n\n const res = await fetch(url, {\n method: 'POST',\n body: formData,\n });\n\n if (!res.ok) {\n throw new Error('Upload failed');\n }\n\n return `${url}${key}`;\n });\n\n const uploadedUrls = await Promise.all(uploadPromises);\n\n onSuccess(uploadedUrls);\n } catch (error) {\n onError();\n }\n },\n [awsSignedKey],\n );\n\n return uploadImagesToS3;\n};\n\nexport default useS3ImageUploadHelper;\n"],"names":["useS3ImageUploadHelper","props","studentId","query","awsSignedKey","getAwsSignedKey","useAwsSignedKey","useEffect","useCallback","images","onSuccess","onError","fileKey","fileName","url","uploadPromises","item","formData","key","uuidv4","uploadedUrls"],"mappings":";;;AAwBA,MAAMA,IAAuC,CAASC,MAAA;AAC9C,QAAA,EAAE,WAAAC,GAAW,OAAAC,EAAU,IAAAF,GACvB,EAAE,MAAMG,GAAc,KAAKC,EAAA,IAAoBC;AAErD,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAgBH,GAAWC,CAAK;AAAA,EAC/B,GAAA,CAACA,GAAOE,GAAiBH,CAAS,CAAC,GAEbM;AAAA,IACvB,OAAO,EAAE,QAAAC,GAAQ,WAAAC,GAAW,SAAAC,GAAS,SAAAC,GAAS,UAAAC,QAAkC;AAC9E,UAAI,CAACT,EAAc;AAEb,YAAAU,IAAM,WAAWV,EAAa,UAAU;AAE1C,UAAA;AACF,cAAMW,IAAiBN,EAAO,IAAI,OAAOO,MAAkC;AACnE,gBAAAC,IAAW,IAAI,YACfC,IAAM,GAAGN,CAAO,GAAGC,KAAYM,EAAQ,CAAA;AAgBzC,cAdKF,EAAA,OAAO,OAAOC,CAAG,GACjBD,EAAA,OAAO,kBAAkBb,EAAa,MAAM,GAC5Ca,EAAA,OAAO,OAAO,aAAa,GAC3BA,EAAA,OAAO,2BAA2B,EAAE,GACpCA,EAAA,OAAO,UAAUb,EAAa,MAAM,GACpCa,EAAA,OAAO,aAAab,EAAa,SAAS,GAC1Ca,EAAA,OAAO,gBAAgB,YAAY,GACnCA,EAAA,OAAO,QAAQD,EAAK,IAAI,GAO7B,EALQ,MAAM,MAAMF,GAAK;AAAA,YAC3B,QAAQ;AAAA,YACR,MAAMG;AAAA,UAAA,CACP,GAEQ;AACD,kBAAA,IAAI,MAAM,eAAe;AAG1B,iBAAA,GAAGH,CAAG,GAAGI,CAAG;AAAA,QAAA,CACpB,GAEKE,IAAe,MAAM,QAAQ,IAAIL,CAAc;AAErD,QAAAL,EAAUU,CAAY;AAAA,cACR;AACN,QAAAT;MACV;AAAA,IACF;AAAA,IACA,CAACP,CAAY;AAAA,EAAA;AAIjB;"}
package/dist/index.d.ts CHANGED
@@ -295,14 +295,10 @@ export declare const CueCanvas: React.FC<ICueCanvas>;
295
295
 
296
296
  export declare const CueCanvasController: React_2.FC<IToolbarProps>;
297
297
 
298
- export declare const CueCanvasHomeworkController: NamedExoticComponent<IHomeWorkControllerProps>;
299
-
300
298
  export declare const CueCanvasProvider: FC<PropsWithChildren<{
301
299
  userType: TUserTypes;
302
300
  }>>;
303
301
 
304
- export declare const CueCanvasSideBar: NamedExoticComponent<ISidebar>;
305
-
306
302
  export declare const CuemathLogo: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
307
303
 
308
304
  export declare const CueRocket: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -757,7 +753,7 @@ declare interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>,
757
753
  shape?: 'curved' | 'square';
758
754
  disabled?: boolean;
759
755
  busy?: boolean;
760
- width?: number;
756
+ width?: number | string;
761
757
  widthX?: number;
762
758
  Icon?: React.FC<React.SVGProps<SVGSVGElement>>;
763
759
  iconPosition?: 'left' | 'right';
@@ -803,11 +799,6 @@ declare interface ICalloutProps {
803
799
  marginBottomX: number;
804
800
  }
805
801
 
806
- declare interface ICanvasUpdateConfig {
807
- dimesion?: IViewport;
808
- gridName?: TCueCanvasGridName;
809
- }
810
-
811
802
  declare interface ICascadeSelectValue {
812
803
  variant: string;
813
804
  detail: string;
@@ -1213,8 +1204,6 @@ declare interface ICueCanvas {
1213
1204
  onUpdateHeight?: TUpdateHeight;
1214
1205
  onPublish?: TPublish;
1215
1206
  onSubscribe?: TSubscribe;
1216
- canvasConfig?: ICanvasUpdateConfig | null;
1217
- updateCanvasConfig?: TUpdateCanvasConfig;
1218
1207
  }
1219
1208
 
1220
1209
  declare interface ICueCanvasCallbackProps {
@@ -1462,7 +1451,6 @@ declare interface IGoalCurriculumMap {
1462
1451
  program_code: string;
1463
1452
  program_name: string;
1464
1453
  program_id: string;
1465
- is_live: boolean;
1466
1454
  }
1467
1455
 
1468
1456
  declare interface IGooglePlaceOption extends google.maps.places.AutocompletePrediction, ISelectOption<string> {
@@ -1490,30 +1478,6 @@ export declare interface IHomepageStartJourneyProps {
1490
1478
  userType: TUserTypes;
1491
1479
  }
1492
1480
 
1493
- declare interface IHomeWorkControllerProps {
1494
- width: number;
1495
- hwRequests?: IHomeWorkHelpRequestModel[];
1496
- onMarkAsResolved?: (homeworkId: string, onSuccess: () => void) => void;
1497
- onSendImageToChat?: (homeworkId: string, snapshot: Blob[], onSuccess: () => void) => void;
1498
- }
1499
-
1500
- export declare interface IHomeWorkHelpRequestModel {
1501
- channel_id: string;
1502
- created_on_ts: number;
1503
- homework_id: string;
1504
- id: string;
1505
- message_timestamp: string;
1506
- problem_description: string;
1507
- problem_image_urls: string[];
1508
- state: string;
1509
- student_id: string;
1510
- teacher_id: string;
1511
- }
1512
-
1513
- declare interface IHomeWorkHelpRequestModelWithStudentName extends IHomeWorkHelpRequestModel {
1514
- student_name: string;
1515
- }
1516
-
1517
1481
  declare interface IIconButtonProps extends Omit<IButtonProps, 'label' | 'shape' | 'widthX' | 'width' | 'iconPosition' | 'alignSelf' | 'analyticsLabel' | 'renderAs'>, Required<Pick<IClickableAnalyticsProps, 'analyticsLabel'>> {
1518
1482
  Icon: React.FC<React.SVGProps<SVGSVGElement>>;
1519
1483
  customBgColor?: TColorNames;
@@ -1944,7 +1908,6 @@ export declare const ILLUSTRATIONS: {
1944
1908
  DURATION_60MIN_GRAY: string;
1945
1909
  DURATION_90MIN_GRAY: string;
1946
1910
  EARTH_GREEN: string;
1947
- ELLIPSE_CLIP: string;
1948
1911
  FEMALE_AVATAR: string;
1949
1912
  GAME_PLAY: string;
1950
1913
  GLOBE_WITH_BLUE_FILL: string;
@@ -2477,8 +2440,6 @@ export declare const invalidateMilestoneResources: (id: string, query?: void | u
2477
2440
 
2478
2441
  export declare const invalidateMilestonesData: (query?: TQuery | undefined) => void;
2479
2442
 
2480
- export declare const invalidatePastMilestoneCount: (id: string, query?: void | undefined, allIdsInvalid?: boolean) => void;
2481
-
2482
2443
  export declare const invalidateTestHelpData: (id: string, query?: void | undefined, allIdsInvalid?: boolean) => void;
2483
2444
 
2484
2445
  declare interface IOnChapterExitWarningProps {
@@ -2502,7 +2463,7 @@ declare interface IOTPResendProps {
2502
2463
  showVoiceOTP?: boolean;
2503
2464
  disabled?: boolean;
2504
2465
  renderAs?: 'submit' | 'text';
2505
- width?: number;
2466
+ width?: number | string;
2506
2467
  }
2507
2468
 
2508
2469
  declare interface IOutcomeConfig {
@@ -3010,11 +2971,6 @@ declare interface ISheetsListProps extends ISheetItemCallbackProps {
3010
2971
  section?: TSheetsSection;
3011
2972
  }
3012
2973
 
3013
- declare interface ISidebar {
3014
- grade?: string;
3015
- hwRequests?: IHomeWorkHelpRequestModelWithStudentName[];
3016
- }
3017
-
3018
2974
  declare interface ISignupMethodsProps {
3019
2975
  onEmailSignup: () => void;
3020
2976
  onPhoneSignup: () => void;
@@ -3054,7 +3010,8 @@ declare interface ISingleFieldFormProps {
3054
3010
 
3055
3011
  declare interface ISocialAccountNotFoundProps {
3056
3012
  onRetryLogin: () => void;
3057
- onGoToSignup: () => void;
3013
+ onGoToSignup?: () => void;
3014
+ showGoToSignup?: boolean;
3058
3015
  }
3059
3016
 
3060
3017
  declare interface ISocialLoginMethodsProps {
@@ -3383,8 +3340,6 @@ declare interface ITile {
3383
3340
  toPort?: string;
3384
3341
  toTileId: string;
3385
3342
  }[];
3386
- html?: string;
3387
- width?: number | string;
3388
3343
  }
3389
3344
 
3390
3345
  declare interface ITimeLeftTimelineProps {
@@ -3531,6 +3486,16 @@ declare interface IUseContextMenuClickHandler {
3531
3486
  };
3532
3487
  }
3533
3488
 
3489
+ declare interface IUseDeviceTypeReturn {
3490
+ width: number;
3491
+ isMobile: boolean;
3492
+ isTablet: boolean;
3493
+ isDesktop: boolean;
3494
+ isLarge: boolean;
3495
+ isXL: boolean;
3496
+ deviceType: 'mobile' | 'tablet' | 'desktop' | 'large' | 'xl';
3497
+ }
3498
+
3534
3499
  declare interface IUseForceReload {
3535
3500
  threshold: number;
3536
3501
  trackEvent: (event_name: string, payload: Record<string, unknown>, overrides: Record<string, unknown>) => void;
@@ -4095,6 +4060,11 @@ export declare const Maintenance: React_2.FC<IMaintenanceProps>;
4095
4060
 
4096
4061
  declare const MASTERY: "mastery";
4097
4062
 
4063
+ export declare const media: {
4064
+ up920: string;
4065
+ down919: string;
4066
+ };
4067
+
4098
4068
  export declare const MilestoneActionWidget: React_2.FC<IMilestoneActionWidgetProps>;
4099
4069
 
4100
4070
  export declare const MilestoneCreate: React.FC<IMileStoneCreateContainerProps>;
@@ -4519,7 +4489,7 @@ export declare const SkipColoredIcon: React.FC<React.SVGProps<SVGSVGElement>>;
4519
4489
 
4520
4490
  export declare const SkipIcon: React.FC<React.SVGProps<SVGSVGElement>>;
4521
4491
 
4522
- export declare const SocialAccountNotFound: MemoExoticComponent<({ onRetryLogin, onGoToSignup }: ISocialAccountNotFoundProps) => JSX_2.Element>;
4492
+ export declare const SocialAccountNotFound: MemoExoticComponent<({ onRetryLogin, onGoToSignup, showGoToSignup, }: ISocialAccountNotFoundProps) => JSX_2.Element>;
4523
4493
 
4524
4494
  export declare const SocialLoginMethods: NamedExoticComponent<ISocialLoginMethodsProps>;
4525
4495
 
@@ -5390,11 +5360,6 @@ declare type TQuery = {
5390
5360
  course_stream: TCourseStream;
5391
5361
  };
5392
5362
 
5393
- declare type TQuery_2 = {
5394
- milestone_state_group: 'ALL' | 'DRAFT' | 'STUDENT_ALL' | 'LIVE' | 'STUDENT_LIVE' | 'INACTIVE';
5395
- course_stream: TCourseStream;
5396
- };
5397
-
5398
5363
  declare type TQuestionByQuestionOverviewList = {
5399
5364
  section: string;
5400
5365
  question_no: number;
@@ -5620,8 +5585,6 @@ export declare type TTrialSessionMessage = {
5620
5585
  };
5621
5586
  };
5622
5587
 
5623
- declare type TUpdateCanvasConfig = (data: ICanvasUpdateConfig) => void;
5624
-
5625
5588
  declare type TUpdateHeight = (height: number) => void;
5626
5589
 
5627
5590
  declare type TUserAccount = {
@@ -5673,14 +5636,12 @@ export declare const UpIcon: React.FC<React.SVGProps<SVGSVGElement>>;
5673
5636
 
5674
5637
  export declare const useAutoPlayPermission: () => IAutoPlayPermissionContextType;
5675
5638
 
5676
- export declare const useCanvasSyncBroker: (channelId: string, logEvent: (type: string, payload?: Record<string, unknown>) => void, initialCanvasData?: Array<IChannelMessage>, type?: TRenderAs_2) => {
5677
- publishStrokes: ((message: IPublishData) => boolean) | undefined;
5639
+ export declare const useCanvasSyncBroker: (channelId: string, logEvent: (type: string, payload?: Record<string, unknown>) => void, initialCanvasData?: Array<IChannelMessage>) => {
5640
+ publishStrokes: ((message: unknown) => boolean) | undefined;
5678
5641
  channelStatus: ChannelStatus | undefined;
5679
5642
  closeChannel: () => void;
5680
5643
  initialStrokesData: Record<string, IActionData[]>;
5681
5644
  registerCallback: (qrId: string, cb: (data: IActionData) => void) => void;
5682
- setChannelMetadata: ((metadata: ICanvasUpdateConfig, merge?: boolean) => void) | undefined;
5683
- channelMetadata: ICanvasUpdateConfig | null | undefined;
5684
5645
  };
5685
5646
 
5686
5647
  export declare const useChapterPageJourney: () => {
@@ -5703,6 +5664,8 @@ export declare const useClassTimeAlerts: ({ alertLevel, classStartedOn, classDur
5703
5664
 
5704
5665
  export declare const useContextMenuClickHandler: IUseContextMenuClickHandler;
5705
5666
 
5667
+ export declare const useDeviceType: () => IUseDeviceTypeReturn;
5668
+
5706
5669
  export declare const useForceReload: ({ threshold, trackEvent, shouldNotReload }: IUseForceReload) => void;
5707
5670
 
5708
5671
  export declare const useGetAllMilestonesdata: (initialQuery?: TQuery | undefined) => {
@@ -5773,24 +5736,6 @@ export declare const useGetMilestoneResources: (initialId?: string, initialQuery
5773
5736
  } & Record<string, unknown>) | undefined;
5774
5737
  };
5775
5738
 
5776
- export declare const useGetPastMilestoneCount: (initialId?: string, initialQuery?: void | undefined) => {
5777
- get: (id: string, query: void, meta: TQuery_2) => Promise<void>;
5778
- resource: ResourceModel<{
5779
- user_milestones_count: number;
5780
- }> | undefined;
5781
- data: {
5782
- user_milestones_count: number;
5783
- } | undefined;
5784
- permissions: Record<string, unknown> | undefined;
5785
- isProcessing: boolean;
5786
- isProcessed: boolean;
5787
- isProcessingFailed: boolean;
5788
- isStale: boolean;
5789
- error: ({
5790
- message?: string | undefined;
5791
- } & Record<string, unknown>) | undefined;
5792
- };
5793
-
5794
5739
  export declare const useGetTestHelpData: (initialId?: string, initialQuery?: void | undefined) => {
5795
5740
  get: (id: string, query: void, meta: {
5796
5741
  studentId: string;