@cuemath/leap 3.1.12-as2 → 3.1.13-aa0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/country.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +1 -1
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/auth-constants.js +13 -0
- package/dist/features/auth/auth-constants.js.map +1 -0
- package/dist/features/auth/{user-list → comps/user-list}/user-item/user-item-styled.js +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js.map +1 -0
- package/dist/features/auth/{user-list → comps/user-list}/user-item/user-item.js +4 -4
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -0
- package/dist/features/auth/comps/user-list/user-list-constants.js.map +1 -0
- package/dist/features/auth/comps/user-list/user-list-styled.js.map +1 -0
- package/dist/features/auth/{user-list → comps/user-list}/user-list.js +3 -3
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +1 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +1 -1
- package/dist/features/auth/signup/signup-constants.js +1 -10
- package/dist/features/auth/signup/signup-constants.js.map +1 -1
- package/dist/features/ui/error/error.js +20 -20
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input-styled.js +18 -13
- package/dist/features/ui/inputs/text-input/text-input-styled.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +3 -4
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/use-modal-actions.js +6 -6
- package/dist/features/ui/modals/use-modal-actions.js.map +1 -1
- package/dist/features/worksheet/worksheet/constants.js +13 -12
- package/dist/features/worksheet/worksheet/constants.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +78 -75
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +78 -78
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js +94 -90
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +84 -82
- package/dist/index.js.map +1 -1
- package/dist/node_modules/react-error-boundary/dist/react-error-boundary.js +33 -0
- package/dist/node_modules/react-error-boundary/dist/react-error-boundary.js.map +1 -0
- package/dist/robots.txt +2 -0
- package/package.json +1 -1
- package/dist/features/auth/user-list/user-item/user-item-styled.js.map +0 -1
- package/dist/features/auth/user-list/user-item/user-item.js.map +0 -1
- package/dist/features/auth/user-list/user-list-constants.js.map +0 -1
- package/dist/features/auth/user-list/user-list-styled.js.map +0 -1
- package/dist/features/auth/user-list/user-list.js.map +0 -1
- /package/dist/features/auth/{user-list → comps/user-list}/user-list-constants.js +0 -0
- /package/dist/features/auth/{user-list → comps/user-list}/user-list-styled.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-input-styled.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input-styled.ts"],"sourcesContent":["import type { IBaseInputProps } from '../base-input/base-input-types';\nimport type { ITextInputProps } from './text-input-types';\n\nimport styled from 'styled-components';\n\ninterface IInputProps {\n $renderAs: ITextInputProps['renderAs'];\n $size: IBaseInputProps['size'];\n $isTransparent?: IBaseInputProps['isTransparent'];\n}\n\nconst Input = styled.input<IInputProps>(({ theme, $size, $renderAs, $isTransparent }) => {\n const { colors, input, text } = theme;\n const { valueColorName, labelColorName, backgroundColorName } = input.variants[$renderAs];\n const { inputTextVariant } = input.sizes[$size];\n const { fontFamily, fontSize, lineHeight, letterSpacing } = text[inputTextVariant];\n const background = $isTransparent ? 'transparent' : colors[backgroundColorName ?? 'WHITE'];\n\n return `\n position: relative;\n width: 100%;\n height: 100%;\n border: 0;\n padding: 0;\n outline: none;\n\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n line-height: ${lineHeight}px;\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n\n \n background-color: ${background};\n color: ${colors[valueColorName.inactive]};\n \n &::placeholder {\n color: ${colors[labelColorName.inactive]};\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n line-height: ${lineHeight}px;\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n }\n\n &:hover, &:focus {\n color: ${colors[valueColorName.active]};\n }\n\n &:read-only {\n cursor: pointer;\n }\n \n &:disabled {\n color: ${colors[valueColorName.disabled]};\n cursor: not-allowed;\n\n &::placeholder {\n color: ${colors[labelColorName.disabled]};\n }\n }\n \n &:hover:not([disabled, focused])::placeholder {\n color: ${colors[labelColorName.active]};\n }\n\n &:focus::placeholder {\n color: transparent;\n }\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &[type=\"date\"]:not(:placeholder-shown){\n color: ${colors.BLACK_T_60};\n text-transform: uppercase;\n }\n `;\n});\n\nexport { Input };\n"],"names":["Input","styled","theme","$size","$renderAs","$isTransparent","colors","input","text","valueColorName","labelColorName","backgroundColorName","inputTextVariant","fontFamily","fontSize","lineHeight","letterSpacing","background"],"mappings":";AAWM,MAAAA,IAAQC,EAAO,MAAmB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAC,GAAW,gBAAAC,QAAqB;AACvF,QAAM,EAAE,QAAAC,GAAQ,OAAAC,GAAO,MAAAC,EAAA,IAASN,GAC1B,EAAE,gBAAAO,GAAgB,gBAAAC,GAAgB,qBAAAC,EAAwB,IAAAJ,EAAM,SAASH,CAAS,GAClF,EAAE,kBAAAQ,EAAqB,IAAAL,EAAM,MAAMJ,CAAK,GACxC,EAAE,YAAAU,GAAY,UAAAC,GAAU,YAAAC,GAAY,eAAAC,MAAkBR,EAAKI,CAAgB,GAC3EK,IAAaZ,IAAiB,gBAAgBC,EAAOK,KAAuB,OAAO;AAElF,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAQUE,CAAU;AAAA,iBACZC,CAAQ;AAAA,mBACNC,CAAU;AAAA,MACvB,OAAOC,KAAkB,WAAW,mBAAmBA,CAAa,QAAQ,EAAE;AAAA;AAAA;AAAA,wBAG5DC,CAAU;AAAA,aACrBX,EAAOG,EAAe,QAAQ,CAAC;AAAA;AAAA;AAAA,eAG7BH,EAAOI,EAAe,QAAQ,CAAC;AAAA,qBACzBG,CAAU;AAAA,mBACZC,CAAQ;AAAA,qBACNC,CAAU;AAAA,QACvB,OAAOC,KAAkB,WAAW,mBAAmBA,CAAa,QAAQ,EAAE;AAAA;AAAA;AAAA;AAAA,eAIvEV,EAAOG,EAAe,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAQ7BH,EAAOG,EAAe,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA,iBAI7BH,EAAOI,EAAe,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,eAKjCJ,EAAOI,EAAe,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAa7BJ,EAAO,UAAU;AAAA;AAAA;AAAA;
|
1
|
+
{"version":3,"file":"text-input-styled.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input-styled.ts"],"sourcesContent":["import type { IBaseInputProps } from '../base-input/base-input-types';\nimport type { ITextInputProps } from './text-input-types';\n\nimport styled from 'styled-components';\n\ninterface IInputProps {\n $renderAs: ITextInputProps['renderAs'];\n $size: IBaseInputProps['size'];\n $isTransparent?: IBaseInputProps['isTransparent'];\n}\n\nconst Input = styled.input<IInputProps>(({ theme, $size, $renderAs, $isTransparent }) => {\n const { colors, input, text } = theme;\n const { valueColorName, labelColorName, backgroundColorName } = input.variants[$renderAs];\n const { inputTextVariant } = input.sizes[$size];\n const { fontFamily, fontSize, lineHeight, letterSpacing } = text[inputTextVariant];\n const background = $isTransparent ? 'transparent' : colors[backgroundColorName ?? 'WHITE'];\n\n return `\n position: relative;\n width: 100%;\n height: 100%;\n border: 0;\n padding: 0;\n outline: none;\n\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n line-height: ${lineHeight}px;\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n\n \n background-color: ${background};\n color: ${colors[valueColorName.inactive]};\n \n &::placeholder {\n color: ${colors[labelColorName.inactive]};\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n line-height: ${lineHeight}px;\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n }\n\n &:hover, &:focus {\n color: ${colors[valueColorName.active]};\n }\n\n &:read-only {\n cursor: pointer;\n }\n \n &:disabled {\n color: ${colors[valueColorName.disabled]};\n cursor: not-allowed;\n\n &::placeholder {\n color: ${colors[labelColorName.disabled]};\n }\n }\n \n &:hover:not([disabled, focused])::placeholder {\n color: ${colors[labelColorName.active]};\n }\n\n &:focus::placeholder {\n color: transparent;\n }\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &[type=\"date\"]:not(:placeholder-shown){\n color: ${colors.BLACK_T_60};\n text-transform: uppercase;\n }\n \n &:-webkit-autofill { \n -webkit-text-fill-color: ${colors[valueColorName.inactive]} !important;\n -webkit-background-clip: text;\n }\n `;\n});\n\nexport { Input };\n"],"names":["Input","styled","theme","$size","$renderAs","$isTransparent","colors","input","text","valueColorName","labelColorName","backgroundColorName","inputTextVariant","fontFamily","fontSize","lineHeight","letterSpacing","background"],"mappings":";AAWM,MAAAA,IAAQC,EAAO,MAAmB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAC,GAAW,gBAAAC,QAAqB;AACvF,QAAM,EAAE,QAAAC,GAAQ,OAAAC,GAAO,MAAAC,EAAA,IAASN,GAC1B,EAAE,gBAAAO,GAAgB,gBAAAC,GAAgB,qBAAAC,EAAwB,IAAAJ,EAAM,SAASH,CAAS,GAClF,EAAE,kBAAAQ,EAAqB,IAAAL,EAAM,MAAMJ,CAAK,GACxC,EAAE,YAAAU,GAAY,UAAAC,GAAU,YAAAC,GAAY,eAAAC,MAAkBR,EAAKI,CAAgB,GAC3EK,IAAaZ,IAAiB,gBAAgBC,EAAOK,KAAuB,OAAO;AAElF,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAQUE,CAAU;AAAA,iBACZC,CAAQ;AAAA,mBACNC,CAAU;AAAA,MACvB,OAAOC,KAAkB,WAAW,mBAAmBA,CAAa,QAAQ,EAAE;AAAA;AAAA;AAAA,wBAG5DC,CAAU;AAAA,aACrBX,EAAOG,EAAe,QAAQ,CAAC;AAAA;AAAA;AAAA,eAG7BH,EAAOI,EAAe,QAAQ,CAAC;AAAA,qBACzBG,CAAU;AAAA,mBACZC,CAAQ;AAAA,qBACNC,CAAU;AAAA,QACvB,OAAOC,KAAkB,WAAW,mBAAmBA,CAAa,QAAQ,EAAE;AAAA;AAAA;AAAA;AAAA,eAIvEV,EAAOG,EAAe,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAQ7BH,EAAOG,EAAe,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA,iBAI7BH,EAAOI,EAAe,QAAQ,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,eAKjCJ,EAAOI,EAAe,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAa7BJ,EAAO,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,iCAKCA,EAAOG,EAAe,QAAQ,CAAC;AAAA;AAAA;AAAA;AAIhE,CAAC;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import o from "styled-components";
|
2
2
|
const s = o.div(
|
3
|
-
({ theme: { colors: a
|
3
|
+
({ theme: { colors: a }, $isClosing: t }) => `
|
4
4
|
position: fixed;
|
5
5
|
top: 0;
|
6
6
|
left: 0;
|
@@ -9,9 +9,8 @@ const s = o.div(
|
|
9
9
|
background-color: ${a.BLACK_T_60};
|
10
10
|
backdrop-filter: blur(40px);
|
11
11
|
display: flex;
|
12
|
-
animation: ${
|
13
|
-
|
14
|
-
|
12
|
+
animation: ${t ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
13
|
+
|
15
14
|
@keyframes backdropFadeIn {
|
16
15
|
from {
|
17
16
|
opacity: 0;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors
|
1
|
+
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n \n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport { ModalContainer, BaseModal, BaseModalContent, CloseButtonContainer, SpotlightModal };\n"],"names":["ModalContainer","styled","colors","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,YAAAC,EAAiB,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMnBD,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBC,IAAa,oBAAoB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBhE,GAKMC,IAAYH,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAC,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKH,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCC,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBL,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAM,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBP,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAK,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BL,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGK,CAAW;AAAA;AAAA;AAAA,aAG1BL,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMO,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBX,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAE,EAAA,MAAiB;AAAA;AAAA,WAEXM,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDP,IACI;AAAA;AAAA,4BAEoBQ,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { useContext as
|
2
|
-
import
|
3
|
-
const
|
4
|
-
const { openModal: o, closeModal: t, isClosing: s
|
5
|
-
return { openModal: o, closeModal: t, isClosing: s
|
6
|
-
}, c =
|
1
|
+
import { useContext as e } from "react";
|
2
|
+
import n from "./modal-context.js";
|
3
|
+
const l = () => {
|
4
|
+
const { openModal: o, closeModal: t, isClosing: s } = e(n);
|
5
|
+
return { openModal: o, closeModal: t, isClosing: s };
|
6
|
+
}, c = l;
|
7
7
|
export {
|
8
8
|
c as default
|
9
9
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-modal-actions.js","sources":["../../../../src/features/ui/modals/use-modal-actions.ts"],"sourcesContent":["import type { IUseModalActions } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalActions: IUseModalActions = () => {\n const { openModal, closeModal, isClosing
|
1
|
+
{"version":3,"file":"use-modal-actions.js","sources":["../../../../src/features/ui/modals/use-modal-actions.ts"],"sourcesContent":["import type { IUseModalActions } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalActions: IUseModalActions = () => {\n const { openModal, closeModal, isClosing } = useContext(ModalContext);\n\n return { openModal, closeModal, isClosing };\n};\n\nexport default useModalActions;\n"],"names":["useModalActions","openModal","closeModal","isClosing","useContext","ModalContext","useModalActions$1"],"mappings":";;AAMA,MAAMA,IAAoC,MAAM;AAC9C,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAWC,CAAY;AAE7D,SAAA,EAAE,WAAAJ,GAAW,YAAAC,GAAY,WAAAC;AAClC,GAEAG,IAAeN;"}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
const t = 792, e = 1008, s = 30, T = 32, n = 28, I = 48,
|
1
|
+
const t = 792, e = 1008, s = 30, T = 32, n = 28, I = 48, E = 42, c = 16, a = 56, _ = 0, o = 360, O = 52, N = { left: 0, top: 56 }, R = [
|
2
2
|
"practice-basic-optional",
|
3
3
|
"practice-regular-optional",
|
4
4
|
"advanced-we-do",
|
5
5
|
"advanced-your-turn",
|
6
6
|
"advanced-explore",
|
7
7
|
"advanced-practice"
|
8
|
-
],
|
8
|
+
], A = 2e3, S = [
|
9
9
|
{ name: "CORRECT", url: "https://static.qumath.in/static/intel-student/cmpress/correct-zap.mp3" },
|
10
10
|
{
|
11
11
|
name: "INCORRECT",
|
12
12
|
url: "https://static.qumath.in/static/intel-student/cmpress/incorrect-zap.mp3"
|
13
13
|
}
|
14
|
-
],
|
14
|
+
], i = [
|
15
15
|
{
|
16
16
|
name: "VALIDATE",
|
17
17
|
url: "https://wmznlejcfq.s3.ap-southeast-1.amazonaws.com/static/intel-student/cmpress/validate-zap.mp3"
|
18
18
|
}
|
19
|
-
],
|
19
|
+
], l = [
|
20
20
|
{
|
21
21
|
label: "Answered all the questions independently.",
|
22
22
|
id: "E"
|
@@ -31,22 +31,23 @@ const t = 792, e = 1008, s = 30, T = 32, n = 28, I = 48, a = 42, c = 16, E = 56,
|
|
31
31
|
}
|
32
32
|
];
|
33
33
|
export {
|
34
|
-
|
34
|
+
a as ACTION_BAR_HEIGHT,
|
35
|
+
A as CLOZE_FORMULA_RESPONSE_LIMIT,
|
35
36
|
N as DESMOS_CALC_POSITION,
|
36
|
-
|
37
|
+
l as EXIT_TICKET_RATING_OPTIONS,
|
37
38
|
s as INTERSECTION_OBSERVER_THRESHOLD_POINTS,
|
38
39
|
T as INTERSECTION_OBSERVER_THROTTLE_TIME,
|
39
|
-
|
40
|
-
|
40
|
+
o as LEARNOSITY_KEYBOARD_HEIGHT,
|
41
|
+
R as OPTIONAL_ITEM_TYPES,
|
41
42
|
c as QUESTIONS_GAP,
|
42
43
|
t as QUESTION_WIDTH,
|
43
44
|
O as SIDEBAR_WIDTH,
|
44
45
|
e as SPLIT_QUESTION_WIDTH,
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
S as SYSTEM_VALIDATION_AUDIO_LIST,
|
47
|
+
i as TEACHER_VALIDATION_AUDIO_LIST,
|
48
|
+
E as TOP_NAVIGATION_ARROW_WIDTH,
|
48
49
|
I as TOP_NAVIGATION_HEIGHT,
|
49
|
-
|
50
|
+
_ as WORKSHEET_CONTAINER_BORDER_RADIUS,
|
50
51
|
n as WORKSHEET_NUDGE_BANNER_HEIGHT
|
51
52
|
};
|
52
53
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/features/worksheet/worksheet/constants.ts"],"sourcesContent":["import type { QUESTIONS_RATING, TItemType } from './worksheet-types';\n\nexport const QUESTION_WIDTH = 792;\nexport const SPLIT_QUESTION_WIDTH = 1008; // 1024 - 16\nexport const INTERSECTION_OBSERVER_THRESHOLD_POINTS = 30;\nexport const INTERSECTION_OBSERVER_THROTTLE_TIME = 32; // in ms, 2 frames\nexport const WORKSHEET_NUDGE_BANNER_HEIGHT = 28;\n\nexport const TOP_NAVIGATION_HEIGHT = 48;\nexport const TOP_NAVIGATION_ARROW_WIDTH = 42;\n\nexport const QUESTIONS_GAP = 16;\nexport const ACTION_BAR_HEIGHT = 56;\nexport const WORKSHEET_CONTAINER_BORDER_RADIUS = 0;\nexport const LEARNOSITY_KEYBOARD_HEIGHT = 360;\nexport const SIDEBAR_WIDTH = 52;\n\nexport const DESMOS_CALC_POSITION = { left: 0, top: 56 };\n\nexport const OPTIONAL_ITEM_TYPES: TItemType[] = [\n 'practice-basic-optional',\n 'practice-regular-optional',\n 'advanced-we-do',\n 'advanced-your-turn',\n 'advanced-explore',\n 'advanced-practice',\n];\n\nexport const SYSTEM_VALIDATION_AUDIO_LIST = [\n { name: 'CORRECT', url: 'https://static.qumath.in/static/intel-student/cmpress/correct-zap.mp3' },\n {\n name: 'INCORRECT',\n url: 'https://static.qumath.in/static/intel-student/cmpress/incorrect-zap.mp3',\n },\n];\nexport const TEACHER_VALIDATION_AUDIO_LIST = [\n {\n name: 'VALIDATE',\n url: 'https://wmznlejcfq.s3.ap-southeast-1.amazonaws.com/static/intel-student/cmpress/validate-zap.mp3',\n },\n];\n\nexport const EXIT_TICKET_RATING_OPTIONS: Array<{\n label: string;\n id: keyof typeof QUESTIONS_RATING;\n}> = [\n {\n label: 'Answered all the questions independently.',\n id: 'E',\n },\n {\n label: 'Needed some help to answer the questions.',\n id: 'S',\n },\n {\n label: 'Needed a lot of help to answer the questions.',\n id: 'H',\n },\n];\n"],"names":["QUESTION_WIDTH","SPLIT_QUESTION_WIDTH","INTERSECTION_OBSERVER_THRESHOLD_POINTS","INTERSECTION_OBSERVER_THROTTLE_TIME","WORKSHEET_NUDGE_BANNER_HEIGHT","TOP_NAVIGATION_HEIGHT","TOP_NAVIGATION_ARROW_WIDTH","QUESTIONS_GAP","ACTION_BAR_HEIGHT","WORKSHEET_CONTAINER_BORDER_RADIUS","LEARNOSITY_KEYBOARD_HEIGHT","SIDEBAR_WIDTH","DESMOS_CALC_POSITION","OPTIONAL_ITEM_TYPES","SYSTEM_VALIDATION_AUDIO_LIST","TEACHER_VALIDATION_AUDIO_LIST","EXIT_TICKET_RATING_OPTIONS"],"mappings":"AAEO,MAAMA,IAAiB,KACjBC,IAAuB,MACvBC,IAAyC,IACzCC,IAAsC,IACtCC,IAAgC,IAEhCC,IAAwB,IACxBC,IAA6B,IAE7BC,IAAgB,IAChBC,IAAoB,IACpBC,IAAoC,GACpCC,IAA6B,KAC7BC,IAAgB,IAEhBC,IAAuB,EAAE,MAAM,GAAG,KAAK,GAAG,GAE1CC,IAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/worksheet/worksheet/constants.ts"],"sourcesContent":["import type { QUESTIONS_RATING, TItemType } from './worksheet-types';\n\nexport const QUESTION_WIDTH = 792;\nexport const SPLIT_QUESTION_WIDTH = 1008; // 1024 - 16\nexport const INTERSECTION_OBSERVER_THRESHOLD_POINTS = 30;\nexport const INTERSECTION_OBSERVER_THROTTLE_TIME = 32; // in ms, 2 frames\nexport const WORKSHEET_NUDGE_BANNER_HEIGHT = 28;\n\nexport const TOP_NAVIGATION_HEIGHT = 48;\nexport const TOP_NAVIGATION_ARROW_WIDTH = 42;\n\nexport const QUESTIONS_GAP = 16;\nexport const ACTION_BAR_HEIGHT = 56;\nexport const WORKSHEET_CONTAINER_BORDER_RADIUS = 0;\nexport const LEARNOSITY_KEYBOARD_HEIGHT = 360;\nexport const SIDEBAR_WIDTH = 52;\n\nexport const DESMOS_CALC_POSITION = { left: 0, top: 56 };\n\nexport const OPTIONAL_ITEM_TYPES: TItemType[] = [\n 'practice-basic-optional',\n 'practice-regular-optional',\n 'advanced-we-do',\n 'advanced-your-turn',\n 'advanced-explore',\n 'advanced-practice',\n];\nexport const CLOZE_FORMULA_RESPONSE_LIMIT = 2000;\n\nexport const SYSTEM_VALIDATION_AUDIO_LIST = [\n { name: 'CORRECT', url: 'https://static.qumath.in/static/intel-student/cmpress/correct-zap.mp3' },\n {\n name: 'INCORRECT',\n url: 'https://static.qumath.in/static/intel-student/cmpress/incorrect-zap.mp3',\n },\n];\nexport const TEACHER_VALIDATION_AUDIO_LIST = [\n {\n name: 'VALIDATE',\n url: 'https://wmznlejcfq.s3.ap-southeast-1.amazonaws.com/static/intel-student/cmpress/validate-zap.mp3',\n },\n];\n\nexport const EXIT_TICKET_RATING_OPTIONS: Array<{\n label: string;\n id: keyof typeof QUESTIONS_RATING;\n}> = [\n {\n label: 'Answered all the questions independently.',\n id: 'E',\n },\n {\n label: 'Needed some help to answer the questions.',\n id: 'S',\n },\n {\n label: 'Needed a lot of help to answer the questions.',\n id: 'H',\n },\n];\n"],"names":["QUESTION_WIDTH","SPLIT_QUESTION_WIDTH","INTERSECTION_OBSERVER_THRESHOLD_POINTS","INTERSECTION_OBSERVER_THROTTLE_TIME","WORKSHEET_NUDGE_BANNER_HEIGHT","TOP_NAVIGATION_HEIGHT","TOP_NAVIGATION_ARROW_WIDTH","QUESTIONS_GAP","ACTION_BAR_HEIGHT","WORKSHEET_CONTAINER_BORDER_RADIUS","LEARNOSITY_KEYBOARD_HEIGHT","SIDEBAR_WIDTH","DESMOS_CALC_POSITION","OPTIONAL_ITEM_TYPES","CLOZE_FORMULA_RESPONSE_LIMIT","SYSTEM_VALIDATION_AUDIO_LIST","TEACHER_VALIDATION_AUDIO_LIST","EXIT_TICKET_RATING_OPTIONS"],"mappings":"AAEO,MAAMA,IAAiB,KACjBC,IAAuB,MACvBC,IAAyC,IACzCC,IAAsC,IACtCC,IAAgC,IAEhCC,IAAwB,IACxBC,IAA6B,IAE7BC,IAAgB,IAChBC,IAAoB,IACpBC,IAAoC,GACpCC,IAA6B,KAC7BC,IAAgB,IAEhBC,IAAuB,EAAE,MAAM,GAAG,KAAK,GAAG,GAE1CC,IAAmC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACaC,IAA+B,KAE/BC,IAA+B;AAAA,EAC1C,EAAE,MAAM,WAAW,KAAK,wEAAwE;AAAA,EAChG;AAAA,IACE,MAAM;AAAA,IACN,KAAK;AAAA,EACP;AACF,GACaC,IAAgC;AAAA,EAC3C;AAAA,IACE,MAAM;AAAA,IACN,KAAK;AAAA,EACP;AACF,GAEaC,IAGR;AAAA,EACH;AAAA,IACE,OAAO;AAAA,IACP,IAAI;AAAA,EACN;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,IAAI;AAAA,EACN;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,IAAI;AAAA,EACN;AACF;"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import b from "../../../assets/line-icons/icons/bulb2.js";
|
2
2
|
import O from "../../../assets/line-icons/icons/edit-star.js";
|
3
3
|
import R from "../../../assets/line-icons/icons/edit2.js";
|
4
|
-
import
|
5
|
-
import
|
4
|
+
import C from "../../../assets/line-icons/icons/question-letter.js";
|
5
|
+
import k from "../../../assets/line-icons/icons/star2.js";
|
6
6
|
import w from "../constants/events.js";
|
7
|
-
import { OPTIONAL_ITEM_TYPES as A, ACTION_BAR_HEIGHT as N, QUESTION_WIDTH as y, SPLIT_QUESTION_WIDTH as Q } from "./constants.js";
|
7
|
+
import { OPTIONAL_ITEM_TYPES as A, ACTION_BAR_HEIGHT as N, QUESTION_WIDTH as y, SPLIT_QUESTION_WIDTH as L, CLOZE_FORMULA_RESPONSE_LIMIT as Q } from "./constants.js";
|
8
8
|
import { QUESTION_TAGS as E } from "./worksheet-types.js";
|
9
9
|
const x = (e) => {
|
10
10
|
switch (e) {
|
@@ -30,46 +30,46 @@ const x = (e) => {
|
|
30
30
|
default:
|
31
31
|
return;
|
32
32
|
}
|
33
|
-
},
|
33
|
+
}, M = (e) => {
|
34
34
|
if (!e)
|
35
35
|
return !1;
|
36
36
|
const r = e.toLowerCase();
|
37
37
|
return r === "intro" || r === "concept-intro";
|
38
38
|
}, I = (e) => e.reduce((r, t) => {
|
39
|
-
const [n, s] = t.split(":"),
|
40
|
-
return !
|
39
|
+
const [n, s] = t.split(":"), o = n == null ? void 0 : n.trim(), c = s == null ? void 0 : s.trim();
|
40
|
+
return !o || !c ? r : {
|
41
41
|
...r,
|
42
|
-
[
|
42
|
+
[o.toLowerCase()]: c
|
43
43
|
};
|
44
|
-
}, {}),
|
44
|
+
}, {}), J = (e, { sectioned: r = !1, adaptive: t = !1 }) => {
|
45
45
|
if (r)
|
46
|
-
return e.reduce((s,
|
46
|
+
return e.reduce((s, o, c) => {
|
47
47
|
var T;
|
48
48
|
let d = !1;
|
49
|
-
const { content: u, questions: i, itemType:
|
49
|
+
const { content: u, questions: i, itemType: a } = o, l = x(a), m = s[s.length - 1], g = l === (m == null ? void 0 : m.section_name) && (m != null && m.item_display_number) ? m.item_display_number + 1 : 1, p = u.match(/question-[^"]*/g), _ = p == null ? void 0 : p.map((f, h) => {
|
50
50
|
const v = i.find(
|
51
51
|
({ response_id: S }) => S === f.replace("question-", "")
|
52
52
|
);
|
53
53
|
if (!v)
|
54
54
|
throw new Error(`Question not found for the response id: ${f}`);
|
55
|
-
return d = d ||
|
55
|
+
return d = d || M(v.instructor_stimulus), {
|
56
56
|
...v,
|
57
57
|
// Some questions are set to limited number of attempts which can show feedback which is causing the question to be stuck in the errored state
|
58
58
|
feedback_attempts: void 0,
|
59
|
-
item_reference:
|
59
|
+
item_reference: o.reference,
|
60
60
|
item_number: c,
|
61
61
|
item_display_number: g,
|
62
62
|
section_name: l,
|
63
|
-
item_type: r ?
|
64
|
-
is_optional:
|
65
|
-
item_tags:
|
66
|
-
item_tags_map: I(
|
63
|
+
item_type: r ? a : void 0,
|
64
|
+
is_optional: a ? A.includes(a) : !1,
|
65
|
+
item_tags: o.tags ?? [],
|
66
|
+
item_tags_map: I(o.tags ?? []),
|
67
67
|
question_number: h - (d ? 1 : 0),
|
68
68
|
total_questions: p.length
|
69
69
|
};
|
70
70
|
});
|
71
71
|
if (d = !1, _ != null && _[0] && c > 0 && e.length > 0) {
|
72
|
-
const f = (T = e[c - 1]) == null ? void 0 : T.itemType, h =
|
72
|
+
const f = (T = e[c - 1]) == null ? void 0 : T.itemType, h = a != null && a.startsWith("advanced-") ? "advanced" : a, v = f != null && f.startsWith("advanced-") ? "advanced" : f;
|
73
73
|
if ((h === "practice-basic" || h === "practice-regular" || h === "exit-ticket" || h === "advanced") && h !== v)
|
74
74
|
return [
|
75
75
|
...s,
|
@@ -82,16 +82,16 @@ const x = (e) => {
|
|
82
82
|
solution: void 0
|
83
83
|
},
|
84
84
|
instructor_stimulus: "SystemIntro",
|
85
|
-
response_id: `${
|
86
|
-
is_optional:
|
85
|
+
response_id: `${a}-system-intro`,
|
86
|
+
is_optional: a == null ? void 0 : a.startsWith("advanced-")
|
87
87
|
},
|
88
88
|
..._ ?? []
|
89
89
|
];
|
90
90
|
}
|
91
91
|
return [...s, ..._ ?? []];
|
92
92
|
}, []);
|
93
|
-
const n = e.reduce((s,
|
94
|
-
const { content: d, questions: u } =
|
93
|
+
const n = e.reduce((s, o, c) => {
|
94
|
+
const { content: d, questions: u } = o, i = d.match(/question-[^"]*/g), a = i == null ? void 0 : i.map(
|
95
95
|
(l, m) => {
|
96
96
|
const g = u.find(
|
97
97
|
({ response_id: p }) => p === l.replace("question-", "")
|
@@ -101,29 +101,29 @@ const x = (e) => {
|
|
101
101
|
return {
|
102
102
|
...g,
|
103
103
|
feedback_attempts: void 0,
|
104
|
-
item_reference:
|
104
|
+
item_reference: o.reference,
|
105
105
|
item_number: c,
|
106
106
|
item_display_number: c + 1,
|
107
|
-
item_tags:
|
108
|
-
item_tags_map: I(
|
107
|
+
item_tags: o.tags ?? [],
|
108
|
+
item_tags_map: I(o.tags ?? []),
|
109
109
|
question_number: m,
|
110
110
|
total_questions: i.length
|
111
111
|
};
|
112
112
|
}
|
113
113
|
);
|
114
|
-
return [...s, ...
|
114
|
+
return [...s, ...a ?? []];
|
115
115
|
}, []);
|
116
116
|
if (t) {
|
117
|
-
const s = [],
|
117
|
+
const s = [], o = {};
|
118
118
|
return n.sort((c, d) => {
|
119
119
|
var m, g;
|
120
120
|
const u = c.item_tags_map[E.TRIAL_TOPIC], i = d.item_tags_map[E.TRIAL_TOPIC];
|
121
|
-
if (u &&
|
121
|
+
if (u && o[u] === void 0 && (o[u] = s.length, s.push(u)), i && o[i] === void 0 && (o[i] = s.length, s.push(i)), !u || !i)
|
122
122
|
return 0;
|
123
|
-
const
|
124
|
-
return
|
123
|
+
const a = `${o[u]}-${((m = c.item_tags_map[E.QUESTION_CODE]) == null ? void 0 : m.length) ?? 0}`, l = `${o[i]}-${((g = d.item_tags_map[E.QUESTION_CODE]) == null ? void 0 : g.length) ?? 0}`;
|
124
|
+
return a > l ? 1 : -1;
|
125
125
|
}).map((c) => {
|
126
|
-
const d =
|
126
|
+
const d = o[c.item_tags_map[E.TRIAL_TOPIC] ?? ""] ?? 0, u = c.item_tags_map[E.QUESTION_CODE] ?? "";
|
127
127
|
return {
|
128
128
|
...c,
|
129
129
|
item_display_number: d * 3 + u.length
|
@@ -131,7 +131,7 @@ const x = (e) => {
|
|
131
131
|
});
|
132
132
|
}
|
133
133
|
return n;
|
134
|
-
},
|
134
|
+
}, V = ({
|
135
135
|
questions: e,
|
136
136
|
initialQuestion: r,
|
137
137
|
initialResponseId: t,
|
@@ -139,11 +139,11 @@ const x = (e) => {
|
|
139
139
|
lastUnlockedQuestionIndex: s
|
140
140
|
}) => {
|
141
141
|
var d, u;
|
142
|
-
const
|
143
|
-
if (t &&
|
142
|
+
const o = e.slice(0, s + 1), c = e[s];
|
143
|
+
if (t && o.find((i) => i.response_id === t))
|
144
144
|
return t;
|
145
145
|
if (typeof n == "number" && n <= c.item_number) {
|
146
|
-
const i = e.find((
|
146
|
+
const i = e.find((a) => a.item_number === n);
|
147
147
|
if (i != null && i.response_id)
|
148
148
|
return i.response_id;
|
149
149
|
}
|
@@ -154,41 +154,41 @@ const x = (e) => {
|
|
154
154
|
if ((u = e[0]) != null && u.response_id)
|
155
155
|
return e[0].response_id;
|
156
156
|
throw new Error("Initial question not found");
|
157
|
-
},
|
157
|
+
}, z = ({
|
158
158
|
questions: e,
|
159
159
|
responses: r,
|
160
160
|
behavior: t,
|
161
161
|
userType: n
|
162
162
|
}) => {
|
163
|
-
const { maximumAttempts: s, teacherValidationEnabled:
|
163
|
+
const { maximumAttempts: s, teacherValidationEnabled: o, validation: c, navigationMode: d } = t, u = [...e].reverse().findIndex((i) => {
|
164
164
|
var _;
|
165
|
-
const
|
166
|
-
if (
|
165
|
+
const a = r[i.response_id], { attemptsHistory: l, validatedByTeacher: m, assignStatus: g } = a ?? {};
|
166
|
+
if (o)
|
167
167
|
return !!(m || g === "skipped");
|
168
168
|
const p = (_ = l == null ? void 0 : l.slice(-1)[0]) == null ? void 0 : _.score;
|
169
|
-
return p ? (p.score ?? 0) === p.max_score ? !0 : ((l == null ? void 0 : l.length) ?? 0) >= s : !!(!c && d === "LINEAR" && (
|
169
|
+
return p ? (p.score ?? 0) === p.max_score ? !0 : ((l == null ? void 0 : l.length) ?? 0) >= s : !!(!c && d === "LINEAR" && (a != null && a.response || a != null && a.skipped));
|
170
170
|
});
|
171
171
|
if (u === -1)
|
172
172
|
return 0;
|
173
173
|
if (u === 0) {
|
174
|
-
if (
|
175
|
-
const i = [...e].reverse().findIndex((
|
174
|
+
if (o) {
|
175
|
+
const i = [...e].reverse().findIndex((a) => {
|
176
176
|
var l;
|
177
|
-
return ((l = r[
|
177
|
+
return ((l = r[a.response_id]) == null ? void 0 : l.assignStatus) !== "skipped";
|
178
178
|
});
|
179
179
|
return e.length - i - 1;
|
180
180
|
}
|
181
181
|
return e.length - 1;
|
182
182
|
}
|
183
|
-
if (
|
184
|
-
const i = e.length - u,
|
185
|
-
return
|
183
|
+
if (o && n === "STUDENT") {
|
184
|
+
const i = e.length - u, a = e[i], { assignStatus: l } = r[a.response_id] ?? {};
|
185
|
+
return a.is_optional && !l ? i - 1 : i;
|
186
186
|
}
|
187
187
|
return e.length - u;
|
188
188
|
};
|
189
|
-
function
|
189
|
+
function U(e, r) {
|
190
190
|
var n, s;
|
191
|
-
const t = Array.isArray(e) ? e.find((
|
191
|
+
const t = Array.isArray(e) ? e.find((o) => o.response_id === r) : e;
|
192
192
|
if (!t)
|
193
193
|
throw new Error(`Question with id ${r} not found`);
|
194
194
|
return {
|
@@ -196,7 +196,7 @@ function M(e, r) {
|
|
196
196
|
itemReference: t.item_reference,
|
197
197
|
itemPosition: t.item_number,
|
198
198
|
questionPosition: t.question_number,
|
199
|
-
isOkayTypeQuestion:
|
199
|
+
isOkayTypeQuestion: P(t),
|
200
200
|
score: {
|
201
201
|
max_score: ((s = (n = t == null ? void 0 : t.validation) == null ? void 0 : n.valid_response) == null ? void 0 : s.score) ?? 0 * t.metadata.valid_response_count
|
202
202
|
},
|
@@ -209,19 +209,19 @@ function M(e, r) {
|
|
209
209
|
const K = (e) => e.reduce(
|
210
210
|
(r, t) => ({
|
211
211
|
...r,
|
212
|
-
[t.response_id]:
|
212
|
+
[t.response_id]: U(e, t.response_id)
|
213
213
|
}),
|
214
214
|
{}
|
215
215
|
), X = (e, r) => {
|
216
216
|
const { actionBar: t } = r;
|
217
217
|
return {
|
218
218
|
questionsContainerWidth: !e.some(
|
219
|
-
(
|
220
|
-
) ? y :
|
219
|
+
(o) => o.questions.some((c) => c.stimulus_review)
|
220
|
+
) ? y : L,
|
221
221
|
maxQuestionWidth: y,
|
222
222
|
actionbarHeight: t === "bottom" ? N : 0
|
223
223
|
};
|
224
|
-
},
|
224
|
+
}, Z = ({
|
225
225
|
questions: e,
|
226
226
|
lastUnlockedQuestionIndex: r,
|
227
227
|
userType: t
|
@@ -231,10 +231,10 @@ const K = (e) => e.reduce(
|
|
231
231
|
block: "start",
|
232
232
|
behavior: r ? "smooth" : "instant"
|
233
233
|
});
|
234
|
-
},
|
234
|
+
}, P = (e) => {
|
235
235
|
const { type: r, options: t, instructor_stimulus: n } = e;
|
236
236
|
return ("item_type" in e ? e.item_type : void 0) === "overview" || n === "Intro" || n === "SystemIntro" || n === "Concept-Intro" ? !0 : r === "mcq" && (t == null ? void 0 : t.length) === 1;
|
237
|
-
},
|
237
|
+
}, q = (e) => {
|
238
238
|
window.MathJax = {
|
239
239
|
options: {
|
240
240
|
enableMenu: !1,
|
@@ -277,7 +277,7 @@ const K = (e) => e.reduce(
|
|
277
277
|
matchFontHeight: !1
|
278
278
|
}
|
279
279
|
};
|
280
|
-
},
|
280
|
+
}, ee = (e) => {
|
281
281
|
const { item_type: r, instructor_stimulus: t } = e, n = t == null ? void 0 : t.toLowerCase();
|
282
282
|
switch (r) {
|
283
283
|
case "overview":
|
@@ -296,7 +296,7 @@ const K = (e) => e.reduce(
|
|
296
296
|
default:
|
297
297
|
return n === "learn" ? "blue" : n === "try" || n === "apply" ? "green" : "yellow";
|
298
298
|
}
|
299
|
-
},
|
299
|
+
}, te = (e) => `https://cuemath-intel.s3.ap-southeast-1.amazonaws.com/media/math-canvas/paper-${e}.png`, re = (e, r) => {
|
300
300
|
if (!r)
|
301
301
|
return "GREY_3";
|
302
302
|
switch (e) {
|
@@ -314,7 +314,7 @@ const K = (e) => e.reduce(
|
|
314
314
|
default:
|
315
315
|
return "GREY_3";
|
316
316
|
}
|
317
|
-
},
|
317
|
+
}, ne = (e) => {
|
318
318
|
switch (e) {
|
319
319
|
case "learning":
|
320
320
|
return "BLUE_1";
|
@@ -328,7 +328,7 @@ const K = (e) => e.reduce(
|
|
328
328
|
default:
|
329
329
|
return "YELLOW_1";
|
330
330
|
}
|
331
|
-
},
|
331
|
+
}, ae = (e) => {
|
332
332
|
switch (e) {
|
333
333
|
case "learning":
|
334
334
|
return "Learning";
|
@@ -352,13 +352,15 @@ const K = (e) => e.reduce(
|
|
352
352
|
case "practice-regular":
|
353
353
|
return O;
|
354
354
|
case "exit-ticket":
|
355
|
-
return k;
|
356
|
-
case "advanced":
|
357
355
|
return C;
|
356
|
+
case "advanced":
|
357
|
+
return k;
|
358
358
|
default:
|
359
359
|
return b;
|
360
360
|
}
|
361
|
-
},
|
361
|
+
}, ie = (e) => Array.isArray(e.value) ? e.value.some(
|
362
|
+
(t) => typeof t == "string" && t.length > Q
|
363
|
+
) : !1, se = (e, r) => {
|
362
364
|
const t = e === "TEACHER";
|
363
365
|
return r ? {
|
364
366
|
bannerBackgroundColor: "GREEN_4",
|
@@ -369,23 +371,24 @@ const K = (e) => e.reduce(
|
|
369
371
|
};
|
370
372
|
};
|
371
373
|
export {
|
372
|
-
|
374
|
+
ie as checkIsClozeFormulaResponseInvalid,
|
375
|
+
V as getInitialQuestionId,
|
373
376
|
K as getInitialResponses,
|
374
|
-
|
375
|
-
|
377
|
+
z as getLastUnlockedQuestionIndex,
|
378
|
+
ne as getNavigationSectionBackgroundColor,
|
376
379
|
oe as getNavigationSectionIcon,
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
380
|
+
ae as getNavigationSectionName,
|
381
|
+
ee as getPaperColorByQuestion,
|
382
|
+
te as getQuestionBackgroundImage,
|
383
|
+
re as getQuestionBorderColor,
|
384
|
+
U as getQuestionMetadata,
|
385
|
+
J as getQuestionsFromItems,
|
386
|
+
Z as getRenderableQuestions,
|
384
387
|
X as getWorksheetDimensions,
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
+
se as getWorksheetNudgeBannerInfo,
|
389
|
+
M as isConceptIntroWidget,
|
390
|
+
P as isOkayTypeQuestion,
|
388
391
|
j as scrollToQuestion,
|
389
|
-
|
392
|
+
q as setMathJaxConfigInWindow
|
390
393
|
};
|
391
394
|
//# sourceMappingURL=worksheet-helpers.js.map
|