@cuemath/leap 2.8.32-beta-0.2 → 2.8.32
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/features/ui/grade-selector/grade-tab.js +15 -15
- package/dist/features/ui/grade-selector/grade-tab.js.map +1 -1
- package/dist/features/ui/tab/tab-styled.js +8 -7
- package/dist/features/ui/tab/tab-styled.js.map +1 -1
- package/dist/features/ui/tab/tab.js +31 -36
- package/dist/features/ui/tab/tab.js.map +1 -1
- package/dist/features/ui/theme/tab.js +1 -1
- package/dist/features/ui/theme/tab.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +90 -88
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/index.d.ts +1 -36
- package/dist/index.js +344 -348
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/sheet.js +0 -54
- package/dist/assets/line-icons/icons/sheet.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js +0 -174
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js +0 -10
- package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +0 -9
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js +0 -9
- package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js +0 -20
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js +0 -47
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js +0 -22
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js +0 -59
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js +0 -6
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js +0 -22
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js +0 -17
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js +0 -95
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js +0 -62
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +0 -183
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +0 -1
- package/dist/features/milestone/milestone-resources/resources-assign/utils.js +0 -8
- package/dist/features/milestone/milestone-resources/resources-assign/utils.js.map +0 -1
- package/dist/features/ui/inputs/searchable-input/searchable-input-styled.js +0 -28
- package/dist/features/ui/inputs/searchable-input/searchable-input-styled.js.map +0 -1
- package/dist/features/ui/inputs/searchable-input/searchable-input.js +0 -100
- package/dist/features/ui/inputs/searchable-input/searchable-input.js.map +0 -1
@@ -1,27 +1,27 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { useCallback as
|
3
|
-
import
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import { useCallback as c } from "react";
|
3
|
+
import d from "../tab/tab.js";
|
4
4
|
const u = ({
|
5
|
-
renderAs:
|
6
|
-
size:
|
7
|
-
label:
|
5
|
+
renderAs: a = "primary",
|
6
|
+
size: o = "regular",
|
7
|
+
label: t,
|
8
8
|
selected: i,
|
9
|
-
width:
|
9
|
+
width: s,
|
10
10
|
onSelect: r,
|
11
11
|
grade: e
|
12
12
|
}) => {
|
13
|
-
const
|
13
|
+
const l = c(() => {
|
14
14
|
r(e);
|
15
15
|
}, [e, r]);
|
16
|
-
return /* @__PURE__ */
|
17
|
-
|
16
|
+
return /* @__PURE__ */ m(
|
17
|
+
d,
|
18
18
|
{
|
19
|
-
label:
|
19
|
+
label: t,
|
20
20
|
$selected: i,
|
21
|
-
$width:
|
22
|
-
$renderAs:
|
23
|
-
$size:
|
24
|
-
onClick:
|
21
|
+
$width: s,
|
22
|
+
$renderAs: a,
|
23
|
+
$size: o,
|
24
|
+
onClick: l
|
25
25
|
}
|
26
26
|
);
|
27
27
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grade-tab.js","sources":["../../../../src/features/ui/grade-selector/grade-tab.tsx"],"sourcesContent":["import type { IGradeTabProps } from './grade-selector-types';\n\nimport React, { useCallback } from 'react';\n\nimport Tab from '../tab/tab';\n\nconst GradeTab: React.FC<IGradeTabProps> = ({\n renderAs = 'primary',\n size = 'regular',\n label,\n selected,\n width,\n onSelect,\n grade,\n}) => {\n const handleClick = useCallback(() => {\n onSelect(grade);\n }, [grade, onSelect]);\n\n return (\n <Tab\n label={label}\n $selected={selected}\n $width={width}\n $renderAs={renderAs}\n $size={size}\n onClick={handleClick}\n />\n );\n};\n\nexport default GradeTab;\n"],"names":["GradeTab","renderAs","size","label","selected","width","onSelect","grade","handleClick","useCallback","jsx","Tab"],"mappings":";;;AAMA,MAAMA,IAAqC,CAAC;AAAA,EAC1C,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACE,QAAAC,IAAcC,EAAY,MAAM;AACpC,IAAAH,EAASC,CAAK;AAAA,EAAA,GACb,CAACA,GAAOD,CAAQ,CAAC;AAGlB,SAAA,gBAAAI;AAAA,IAACC;
|
1
|
+
{"version":3,"file":"grade-tab.js","sources":["../../../../src/features/ui/grade-selector/grade-tab.tsx"],"sourcesContent":["import type { IGradeTabProps } from './grade-selector-types';\n\nimport React, { useCallback } from 'react';\n\nimport Tab from '../tab/tab';\n\nconst GradeTab: React.FC<IGradeTabProps> = ({\n renderAs = 'primary',\n size = 'regular',\n label,\n selected,\n width,\n onSelect,\n grade,\n}) => {\n const handleClick = useCallback(() => {\n onSelect(grade);\n }, [grade, onSelect]);\n\n return (\n <Tab\n label={label}\n $selected={selected}\n $width={width}\n $renderAs={renderAs}\n $size={size}\n onClick={handleClick}\n />\n );\n};\n\nexport default GradeTab;\n"],"names":["GradeTab","renderAs","size","label","selected","width","onSelect","grade","handleClick","useCallback","jsx","Tab"],"mappings":";;;AAMA,MAAMA,IAAqC,CAAC;AAAA,EAC1C,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACE,QAAAC,IAAcC,EAAY,MAAM;AACpC,IAAAH,EAASC,CAAK;AAAA,EAAA,GACb,CAACA,GAAOD,CAAQ,CAAC;AAGlB,SAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAR;AAAA,MACA,WAAWC;AAAA,MACX,QAAQC;AAAA,MACR,WAAWJ;AAAA,MACX,OAAOC;AAAA,MACP,SAASM;AAAA,IAAA;AAAA,EAAA;AAGf;"}
|
@@ -2,19 +2,20 @@ import x from "styled-components";
|
|
2
2
|
import s from "../layout/flex-view.js";
|
3
3
|
const k = x(s)(({
|
4
4
|
theme: v,
|
5
|
+
$width: e,
|
5
6
|
$selected: i,
|
6
7
|
$size: p,
|
7
|
-
$renderAs:
|
8
|
-
$disabled: r
|
9
|
-
$shape: e
|
8
|
+
$renderAs: g,
|
9
|
+
$disabled: r
|
10
10
|
}) => {
|
11
|
-
const { colors: o, tab:
|
11
|
+
const { colors: o, tab: h, layout: d } = v, { sizes: l, variants: b } = h, { height: u, paddingHorizontal: m } = l[p], { backgroundColorName: t, colorName: a, borderColorName: n, fontWeight: c } = b[g];
|
12
12
|
return `
|
13
|
-
|
13
|
+
width: ${e ? `${e}px` : "auto"};
|
14
|
+
height:${u}px;
|
14
15
|
padding:0 ${m}px;
|
16
|
+
border-radius:8px;
|
15
17
|
cursor:${r ? "not-allowed" : "pointer"};
|
16
|
-
margin:${
|
17
|
-
border-radius: ${e === "curved" ? "50px" : "8px"};
|
18
|
+
margin:${d.gutter * 0.5}px;
|
18
19
|
border:1px solid ${r ? o[n.disabled] : i ? o[n.active] : o[n.inactive]};
|
19
20
|
background-color: ${r ? o[t.disabled] : i ? o[t.active] : o[t.inactive]};
|
20
21
|
& div{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab-styled.js","sources":["../../../../src/features/ui/tab/tab-styled.tsx"],"sourcesContent":["import type { ITabWrapperProps } from './tab-types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\nconst TabWrapper = styled(FlexView)<ITabWrapperProps>(({\n theme,\n $selected,\n $size,\n $renderAs,\n $disabled,\n
|
1
|
+
{"version":3,"file":"tab-styled.js","sources":["../../../../src/features/ui/tab/tab-styled.tsx"],"sourcesContent":["import type { ITabWrapperProps } from './tab-types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\nconst TabWrapper = styled(FlexView)<ITabWrapperProps>(({\n theme,\n $width,\n $selected,\n $size,\n $renderAs,\n $disabled,\n}) => {\n const { colors, tab, layout } = theme;\n const { sizes, variants } = tab;\n const { height, paddingHorizontal } = sizes[$size];\n const { backgroundColorName, colorName, borderColorName, fontWeight } = variants[$renderAs];\n\n return `\n width: ${$width ? `${$width}px` : 'auto'};\n height:${height}px;\n padding:0 ${paddingHorizontal}px;\n border-radius:8px;\n cursor:${$disabled ? 'not-allowed' : 'pointer'};\n margin:${layout.gutter * 0.5}px;\n border:1px solid ${\n $disabled\n ? colors[borderColorName.disabled]\n : $selected\n ? colors[borderColorName.active]\n : colors[borderColorName.inactive]\n };\n background-color: ${\n $disabled\n ? colors[backgroundColorName.disabled]\n : $selected\n ? colors[backgroundColorName.active]\n : colors[backgroundColorName.inactive]\n };\n & div{\n font-weight:${\n $disabled ? fontWeight.disabled : $selected ? fontWeight.active : fontWeight.inactive\n };\n color: ${\n $disabled\n ? colors[colorName.disabled]\n : $selected\n ? colors[colorName.active]\n : colors[colorName.inactive]\n };\n }\n &:hover {\n background-color:${\n $disabled\n ? colors[backgroundColorName.disabled]\n : $selected\n ? colors[backgroundColorName.active]\n : colors[backgroundColorName.hover]\n };\n border-color: ${\n $disabled\n ? colors[borderColorName.disabled]\n : $selected\n ? colors[borderColorName.active]\n : colors[borderColorName.hover]\n };\n & div{\n font-weight:${fontWeight.hover};\n color:${\n $disabled\n ? colors[colorName.disabled]\n : $selected\n ? colors[colorName.active]\n : colors[colorName.hover]\n };\n } \n }\n `;\n});\n\nexport { TabWrapper };\n"],"names":["TabWrapper","styled","FlexView","theme","$width","$selected","$size","$renderAs","$disabled","colors","tab","layout","sizes","variants","height","paddingHorizontal","backgroundColorName","colorName","borderColorName","fontWeight"],"mappings":";;AAMA,MAAMA,IAAaC,EAAOC,CAAQ,EAAoB,CAAC;AAAA,EACrD,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACJ,QAAM,EAAE,QAAAC,GAAQ,KAAAC,GAAK,QAAAC,EAAA,IAAWR,GAC1B,EAAE,OAAAS,GAAO,UAAAC,EAAa,IAAAH,GACtB,EAAE,QAAAI,GAAQ,mBAAAC,EAAkB,IAAIH,EAAMN,CAAK,GAC3C,EAAE,qBAAAU,GAAqB,WAAAC,GAAW,iBAAAC,GAAiB,YAAAC,MAAeN,EAASN,CAAS;AAEnF,SAAA;AAAA,eACMH,IAAS,GAAGA,CAAM,OAAO,MAAM;AAAA,eAC/BU,CAAM;AAAA,kBACHC,CAAiB;AAAA;AAAA,eAEpBP,IAAY,gBAAgB,SAAS;AAAA,eACrCG,EAAO,SAAS,GAAG;AAAA,yBAE1BH,IACIC,EAAOS,EAAgB,QAAQ,IAC/Bb,IACEI,EAAOS,EAAgB,MAAM,IAC7BT,EAAOS,EAAgB,QAAQ,CACvC;AAAA,0BAEEV,IACIC,EAAOO,EAAoB,QAAQ,IACnCX,IACEI,EAAOO,EAAoB,MAAM,IACjCP,EAAOO,EAAoB,QAAQ,CAC3C;AAAA;AAAA,sBAGIR,IAAYW,EAAW,WAAWd,IAAYc,EAAW,SAASA,EAAW,QAC/E;AAAA,iBAEEX,IACIC,EAAOQ,EAAU,QAAQ,IACzBZ,IACEI,EAAOQ,EAAU,MAAM,IACvBR,EAAOQ,EAAU,QAAQ,CACjC;AAAA;AAAA;AAAA,2BAIET,IACIC,EAAOO,EAAoB,QAAQ,IACnCX,IACEI,EAAOO,EAAoB,MAAM,IACjCP,EAAOO,EAAoB,KAAK,CACxC;AAAA,wBAEER,IACIC,EAAOS,EAAgB,QAAQ,IAC/Bb,IACEI,EAAOS,EAAgB,MAAM,IAC7BT,EAAOS,EAAgB,KAAK,CACpC;AAAA;AAAA,wBAEgBC,EAAW,KAAK;AAAA,kBAE5BX,IACIC,EAAOQ,EAAU,QAAQ,IACzBZ,IACEI,EAAOQ,EAAU,MAAM,IACvBR,EAAOQ,EAAU,KAAK,CAC9B;AAAA;AAAA;AAAA;AAIV,CAAC;"}
|
@@ -1,40 +1,35 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
children: /* @__PURE__ */ e(u, { $renderAs: s[r].textVariant, color: t ? "WHITE" : "BLACK", children: m })
|
33
|
-
}
|
34
|
-
);
|
35
|
-
}
|
36
|
-
), $ = l;
|
2
|
+
import { useTheme as s } from "styled-components";
|
3
|
+
import c from "../text/text.js";
|
4
|
+
import { TabWrapper as f } from "./tab-styled.js";
|
5
|
+
const T = ({
|
6
|
+
$renderAs: o = "primary",
|
7
|
+
$size: r = "regular",
|
8
|
+
label: n,
|
9
|
+
$selected: t,
|
10
|
+
$width: a,
|
11
|
+
$disabled: m,
|
12
|
+
onClick: i
|
13
|
+
}) => {
|
14
|
+
const {
|
15
|
+
tab: { sizes: p }
|
16
|
+
} = s();
|
17
|
+
return /* @__PURE__ */ e(
|
18
|
+
f,
|
19
|
+
{
|
20
|
+
$selected: t,
|
21
|
+
$width: a,
|
22
|
+
onClick: i,
|
23
|
+
$size: r,
|
24
|
+
$renderAs: o,
|
25
|
+
$disabled: m,
|
26
|
+
$justifyContent: "center",
|
27
|
+
$alignItems: "center",
|
28
|
+
children: /* @__PURE__ */ e(c, { $renderAs: p[r].textVariant, color: t ? "WHITE" : "BLACK", children: n })
|
29
|
+
}
|
30
|
+
);
|
31
|
+
}, d = T;
|
37
32
|
export {
|
38
|
-
|
33
|
+
d as default
|
39
34
|
};
|
40
35
|
//# sourceMappingURL=tab.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab.js","sources":["../../../../src/features/ui/tab/tab.tsx"],"sourcesContent":["import type { ITabProps } from './tab-types';\n\nimport React
|
1
|
+
{"version":3,"file":"tab.js","sources":["../../../../src/features/ui/tab/tab.tsx"],"sourcesContent":["import type { ITabProps } from './tab-types';\n\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Text from '../text/text';\nimport * as Styled from './tab-styled';\n\nconst TabComponent: React.FC<ITabProps> = ({\n $renderAs = 'primary',\n $size = 'regular',\n label,\n $selected,\n $width,\n $disabled,\n onClick,\n}) => {\n const {\n tab: { sizes },\n } = useTheme();\n\n return (\n <Styled.TabWrapper\n $selected={$selected}\n $width={$width}\n onClick={onClick}\n $size={$size}\n $renderAs={$renderAs}\n $disabled={$disabled}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Text $renderAs={sizes[$size].textVariant} color={$selected ? 'WHITE' : 'BLACK'}>\n {label}\n </Text>\n </Styled.TabWrapper>\n );\n};\n\nexport default TabComponent;\n"],"names":["TabComponent","$renderAs","$size","label","$selected","$width","$disabled","onClick","sizes","useTheme","jsx","Styled.TabWrapper","Text","Tab"],"mappings":";;;;AAQA,MAAMA,IAAoC,CAAC;AAAA,EACzC,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ;AAAA,EACR,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAK,EAAE,OAAAC,EAAM;AAAA,MACXC,EAAS;AAGX,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAAP;AAAA,MACA,QAAAC;AAAA,MACA,SAAAE;AAAA,MACA,OAAAL;AAAA,MACA,WAAAD;AAAA,MACA,WAAAK;AAAA,MACA,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEZ,UAAA,gBAAAI,EAACE,GAAK,EAAA,WAAWJ,EAAMN,CAAK,EAAE,aAAa,OAAOE,IAAY,UAAU,SACrE,UACHD,EAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAU,IAAeb;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab.js","sources":["../../../../src/features/ui/theme/tab.ts"],"sourcesContent":["import type { ITabSizeConfig, ITabVariantConfig, TTabSizes, TTabVariants } from '../types';\n\ninterface IGetTabConfig {\n (gutter: number): {\n sizes: Record<TTabSizes, ITabSizeConfig>;\n variants: Record<TTabVariants, ITabVariantConfig>;\n };\n}\n\nconst getTabConfig: IGetTabConfig = (gutter: number) => {\n const sizes: Record<TTabSizes, ITabSizeConfig> = {\n xsmall: {\n height: gutter * 1.625,\n paddingHorizontal: gutter * 0.5,\n textVariant: 'body3',\n },\n small: {\n height: gutter * 2,\n paddingHorizontal: gutter * 0.
|
1
|
+
{"version":3,"file":"tab.js","sources":["../../../../src/features/ui/theme/tab.ts"],"sourcesContent":["import type { ITabSizeConfig, ITabVariantConfig, TTabSizes, TTabVariants } from '../types';\n\ninterface IGetTabConfig {\n (gutter: number): {\n sizes: Record<TTabSizes, ITabSizeConfig>;\n variants: Record<TTabVariants, ITabVariantConfig>;\n };\n}\n\nconst getTabConfig: IGetTabConfig = (gutter: number) => {\n const sizes: Record<TTabSizes, ITabSizeConfig> = {\n xsmall: {\n height: gutter * 1.625,\n paddingHorizontal: gutter * 0.5,\n textVariant: 'body3',\n },\n small: {\n height: gutter * 2,\n paddingHorizontal: gutter * 0.5,\n textVariant: 'body2',\n },\n regular: {\n height: gutter * 2.5,\n paddingHorizontal: gutter,\n textVariant: 'body1',\n },\n medium: {\n height: gutter * 3,\n paddingHorizontal: gutter,\n textVariant: 'body1',\n },\n };\n\n const variants: Record<TTabVariants, ITabVariantConfig> = {\n primary: {\n backgroundColorName: {\n inactive: 'WHITE',\n active: 'BLACK',\n hover: 'WHITE',\n disabled: 'GREY_1',\n },\n colorName: {\n inactive: 'BLACK',\n active: 'WHITE',\n hover: 'BLACK',\n disabled: 'BLACK_50',\n },\n borderColorName: {\n inactive: 'GREY_3',\n active: 'BLACK',\n hover: 'BLACK',\n disabled: 'GREY_1',\n },\n fontWeight: {\n inactive: 400,\n active: 500,\n hover: 500,\n disabled: 400,\n },\n },\n };\n\n return { sizes, variants };\n};\n\nexport default getTabConfig;\n"],"names":["getTabConfig","gutter"],"mappings":"AASM,MAAAA,IAA8B,CAACC,OAqD5B,EAAE,OApDwC;AAAA,EAC/C,QAAQ;AAAA,IACN,QAAQA,IAAS;AAAA,IACjB,mBAAmBA,IAAS;AAAA,IAC5B,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,QAAQA,IAAS;AAAA,IACjB,mBAAmBA,IAAS;AAAA,IAC5B,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,QAAQA,IAAS;AAAA,IACjB,mBAAmBA;AAAA,IACnB,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,QAAQA,IAAS;AAAA,IACjB,mBAAmBA;AAAA,IACnB,aAAa;AAAA,EACf;AAAA,GAgCc,UA7B0C;AAAA,EACxD,SAAS;AAAA,IACP,qBAAqB;AAAA,MACnB,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,IACA,WAAW;AAAA,MACT,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,IACA,iBAAiB;AAAA,MACf,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,IACA,YAAY;AAAA,MACV,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AAAA;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { jsxs as I, jsx as r, Fragment as
|
2
|
-
import { memo as
|
1
|
+
import { jsxs as I, jsx as r, Fragment as zt } from "react/jsx-runtime";
|
2
|
+
import { memo as Dt, useMemo as R, useState as A, useRef as U, useCallback as Ut, useEffect as E, useLayoutEffect as Kt } from "react";
|
3
3
|
import { IMAGES as Vt } from "../../../../assets/images/images.js";
|
4
4
|
import Xt from "../../../cue-canvas/cue-canvas.js";
|
5
5
|
import Pt from "../../../pointer-sync/pointer.js";
|
@@ -16,15 +16,15 @@ import re from "./system-intros/basic-practice-intro.js";
|
|
16
16
|
import oe from "./system-intros/exit-ticket-intro.js";
|
17
17
|
import ie from "./system-intros/regular-practice-intro.js";
|
18
18
|
import { QuestionContainerWrapper as ne, StimulusReview as ce, QuestionContainer as ae, QuestionWrapper as se, LessonOverviewBanner as le, CueCanvasWrapper as me, Hint as ue, Solution as fe } from "./worksheet-question-styled.js";
|
19
|
-
const Le =
|
19
|
+
const Le = Dt(
|
20
20
|
({
|
21
21
|
userType: c,
|
22
22
|
signedRequest: bt,
|
23
|
-
worksheetCompleted:
|
23
|
+
worksheetCompleted: f,
|
24
24
|
question: n,
|
25
25
|
response: e,
|
26
|
-
nextQuestionId:
|
27
|
-
isActive:
|
26
|
+
nextQuestionId: v,
|
27
|
+
isActive: w,
|
28
28
|
isHidden: M,
|
29
29
|
canRender: K,
|
30
30
|
loggerRef: O,
|
@@ -32,12 +32,12 @@ const Le = Ut(
|
|
32
32
|
maxQuestionWidth: V,
|
33
33
|
behavior: X,
|
34
34
|
layout: P,
|
35
|
-
actionbarHeight:
|
36
|
-
learnosity:
|
35
|
+
actionbarHeight: Wt,
|
36
|
+
learnosity: H,
|
37
37
|
intersectionObserver: j,
|
38
38
|
background: G = "paper",
|
39
|
-
onMarkForReview:
|
40
|
-
userId:
|
39
|
+
onMarkForReview: Ct,
|
40
|
+
userId: Bt,
|
41
41
|
onPublishStrokes: Y,
|
42
42
|
onReceiveStrokes: Z,
|
43
43
|
isScribblingEnabled: J,
|
@@ -52,7 +52,7 @@ const Le = Ut(
|
|
52
52
|
responses: Tt,
|
53
53
|
subjectiveProps: rt
|
54
54
|
}) => {
|
55
|
-
const C =
|
55
|
+
const C = R(
|
56
56
|
() => G === "paper" ? Yt(n) : void 0,
|
57
57
|
[G, n]
|
58
58
|
), [B, It] = A(), [ot, At] = A(), {
|
@@ -60,48 +60,48 @@ const Le = Ut(
|
|
60
60
|
review: Q,
|
61
61
|
maximumAttempts: nt,
|
62
62
|
canExceedAttempts: ct,
|
63
|
-
teacherValidationEnabled:
|
63
|
+
teacherValidationEnabled: S,
|
64
64
|
solutionHidden: at
|
65
|
-
} = X, { minQuestionHeight: Mt, topOffset: st, questionsScrollable:
|
66
|
-
type:
|
65
|
+
} = X, { minQuestionHeight: Mt, topOffset: st, questionsScrollable: y } = P, {
|
66
|
+
type: $,
|
67
67
|
response_id: o,
|
68
|
-
stimulus_review:
|
69
|
-
item_type:
|
68
|
+
stimulus_review: p,
|
69
|
+
item_type: h,
|
70
70
|
instructor_stimulus: lt,
|
71
|
-
metadata: { hints:
|
71
|
+
metadata: { hints: d, solution: b, widget_reference: mt },
|
72
72
|
item_reference: ut,
|
73
73
|
question_number: ft
|
74
|
-
} = n, ht =
|
74
|
+
} = n, ht = !!p, x = h === "overview", m = Zt(lt), g = lt === "SystemIntro", dt = m || g, gt = e == null ? void 0 : e.responseEdited, Ot = R(() => {
|
75
75
|
const t = [];
|
76
|
-
return gt && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"),
|
76
|
+
return gt && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), $ === "hotspot" && t.push("correct-answers-hidden"), a && S && $ === "clozetext" && (!m || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), m && t.push("concept-intro"), g && t.push("system-intro"), t.join(" ");
|
77
77
|
}, [
|
78
78
|
a,
|
79
79
|
m,
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
x,
|
81
|
+
g,
|
82
|
+
$,
|
83
83
|
gt,
|
84
|
-
|
84
|
+
S,
|
85
85
|
c
|
86
|
-
]), F =
|
86
|
+
]), F = U({}), L = (e == null ? void 0 : e.hintsUsed) ?? 0, [Et] = A((e == null ? void 0 : e.validatedByTeacher) ?? !1), T = U(null), z = U(null), D = R(() => d == null ? void 0 : d.slice(0, L), [d, L]), $t = R(() => c === "TEACHER" || f ? !0 : !e || !e.response || e.responseEdited ? !1 : it, [e, c, it, f]), pt = R(() => {
|
87
87
|
if (c === "TEACHER") return !0;
|
88
88
|
if (Q) {
|
89
89
|
const { attemptsHistory: t } = e ?? {};
|
90
90
|
return ((t == null ? void 0 : t.length) ?? 0) >= nt && !ct;
|
91
91
|
}
|
92
92
|
return !1;
|
93
|
-
}, [ct, nt, e, Q, c]), Nt =
|
94
|
-
() =>
|
95
|
-
[at,
|
93
|
+
}, [ct, nt, e, Q, c]), Nt = R(
|
94
|
+
() => b && f && !at,
|
95
|
+
[at, b, f]
|
96
96
|
), [_t, Qt] = A({
|
97
97
|
width: 0,
|
98
98
|
height: 0
|
99
|
-
}), Ft =
|
99
|
+
}), Ft = Ut((t) => {
|
100
100
|
At(t);
|
101
101
|
}, []);
|
102
|
-
return
|
103
|
-
|
104
|
-
}, [j]),
|
102
|
+
return E(() => {
|
103
|
+
T.current && j.observe(T.current);
|
104
|
+
}, [j]), E(() => {
|
105
105
|
if (a && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
|
106
106
|
const t = document.querySelectorAll(
|
107
107
|
`.widget-${n.response_id} .lrn_draggable`
|
@@ -114,24 +114,26 @@ const Le = Ut(
|
|
114
114
|
height: i
|
115
115
|
});
|
116
116
|
}
|
117
|
-
}, [a, n.response_id, n.type]),
|
117
|
+
}, [a, n.response_id, n.type]), E(() => {
|
118
118
|
if (a && $t) {
|
119
|
-
const t =
|
119
|
+
const t = H.question(o);
|
120
120
|
t && t.validate({
|
121
121
|
showCorrectAnswers: pt
|
122
122
|
});
|
123
123
|
}
|
124
|
-
}, [a,
|
125
|
-
const t =
|
126
|
-
if (a && t && O.current && F.current[o] === void 0 && !m && !
|
124
|
+
}, [a, H, o, Q, pt, c, $t]), E(() => {
|
125
|
+
const t = z.current;
|
126
|
+
if (a && t && O.current && F.current[o] === void 0 && !m && !g) {
|
127
127
|
const s = t.clientWidth, i = t.querySelectorAll("*");
|
128
128
|
for (let l = 0; l < i.length; l++) {
|
129
|
-
const
|
130
|
-
if (
|
129
|
+
const u = i[l];
|
130
|
+
if (u != null && u.closest(".resize-sensor"))
|
131
|
+
continue;
|
132
|
+
if (((u == null ? void 0 : u.clientWidth) ?? 0) > s) {
|
131
133
|
F.current[o] = !0, O.current(jt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
|
132
134
|
item_reference: ut,
|
133
135
|
widget_reference: mt,
|
134
|
-
question_type:
|
136
|
+
question_type: $,
|
135
137
|
question_number: ft,
|
136
138
|
responseId: o
|
137
139
|
});
|
@@ -143,53 +145,53 @@ const Le = Ut(
|
|
143
145
|
}, [
|
144
146
|
a,
|
145
147
|
m,
|
146
|
-
|
148
|
+
g,
|
147
149
|
ut,
|
148
150
|
O,
|
149
|
-
|
151
|
+
$,
|
150
152
|
ft,
|
151
153
|
o,
|
152
154
|
mt
|
153
|
-
]),
|
154
|
-
const t =
|
155
|
+
]), E(() => {
|
156
|
+
const t = T.current, s = (i) => {
|
155
157
|
const l = i.querySelector(".lrn_response_wrapper");
|
156
158
|
if (!l)
|
157
159
|
return 0;
|
158
|
-
const
|
159
|
-
return
|
160
|
+
const u = i.getBoundingClientRect().bottom, W = l.getBoundingClientRect().bottom, _ = Math.abs(u - W);
|
161
|
+
return _ < Ht ? Ht - _ : 0;
|
160
162
|
};
|
161
163
|
a && t && It((i) => {
|
162
164
|
var vt;
|
163
|
-
const
|
164
|
-
if (
|
165
|
+
const W = ((vt = n.ui_style) == null ? void 0 : vt.type) === "floating-keyboard" && !(S && $ === "clozetext"), _ = t.clientHeight;
|
166
|
+
if (_ === 0)
|
165
167
|
return i;
|
166
168
|
if (!i)
|
167
169
|
return Math.ceil(
|
168
|
-
|
170
|
+
_ + (W ? s(t) : 0)
|
169
171
|
);
|
170
172
|
const Rt = Math.ceil(
|
171
|
-
|
173
|
+
_ + (W ? s(t) : 0)
|
172
174
|
);
|
173
175
|
return Math.abs(Rt - i) > 4 ? Rt : i;
|
174
176
|
});
|
175
177
|
}), Kt(() => {
|
176
|
-
!
|
177
|
-
}, [M,
|
178
|
-
(
|
179
|
-
}, [ht,
|
180
|
-
if (
|
178
|
+
!y && !M && St(o);
|
179
|
+
}, [M, y, o, st]), E(() => {
|
180
|
+
(L || ht || b && f) && H.renderMath("mathjax");
|
181
|
+
}, [ht, L, H, b, f]), E(() => {
|
182
|
+
if (S && v && !Et && (e != null && e.validatedByTeacher)) {
|
181
183
|
const t = setTimeout(() => {
|
182
|
-
|
184
|
+
y ? St(v) : et(v);
|
183
185
|
}, 1e3);
|
184
186
|
return () => {
|
185
187
|
clearTimeout(t);
|
186
188
|
};
|
187
189
|
}
|
188
190
|
}, [
|
189
|
-
|
190
|
-
|
191
|
+
v,
|
192
|
+
S,
|
191
193
|
Et,
|
192
|
-
|
194
|
+
y,
|
193
195
|
et,
|
194
196
|
e == null ? void 0 : e.validatedByTeacher
|
195
197
|
]), /* @__PURE__ */ I(
|
@@ -197,35 +199,35 @@ const Le = Ut(
|
|
197
199
|
{
|
198
200
|
"data-response-id": o,
|
199
201
|
className: `widget-${o}`,
|
200
|
-
ref:
|
202
|
+
ref: T,
|
201
203
|
$topOffset: st,
|
202
|
-
$flexDirection:
|
203
|
-
$alignItems:
|
204
|
+
$flexDirection: p ? "row" : "column",
|
205
|
+
$alignItems: p ? "flex-start" : "center",
|
204
206
|
$hidden: M,
|
205
207
|
$marginBottom: Gt,
|
206
208
|
children: [
|
207
|
-
|
209
|
+
p && /* @__PURE__ */ r(
|
208
210
|
ce,
|
209
211
|
{
|
210
212
|
dangerouslySetInnerHTML: {
|
211
|
-
__html:
|
213
|
+
__html: p
|
212
214
|
}
|
213
215
|
}
|
214
216
|
),
|
215
217
|
/* @__PURE__ */ I(
|
216
218
|
ae,
|
217
219
|
{
|
218
|
-
ref:
|
219
|
-
$width:
|
220
|
+
ref: z,
|
221
|
+
$width: p ? "50%" : `${V}px`,
|
220
222
|
$minHeight: B ? Math.max(B - 72, ot ?? 0) : Mt,
|
221
|
-
$isActive:
|
223
|
+
$isActive: w,
|
222
224
|
$paperColor: C,
|
223
|
-
$opacity:
|
225
|
+
$opacity: w ? 1 : 0.2,
|
224
226
|
children: [
|
225
|
-
|
227
|
+
w && !!k && !!tt && q && /* @__PURE__ */ r(
|
226
228
|
Pt,
|
227
229
|
{
|
228
|
-
containerRef:
|
230
|
+
containerRef: z,
|
229
231
|
onPublish: k,
|
230
232
|
onSubscribe: tt,
|
231
233
|
responseId: o
|
@@ -238,7 +240,7 @@ const Le = Ut(
|
|
238
240
|
$dropzoneMinWidth: _t.width,
|
239
241
|
$dropzoneMinHeight: _t.height,
|
240
242
|
children: [
|
241
|
-
!(
|
243
|
+
!(x || m || g) && /* @__PURE__ */ r(
|
242
244
|
Jt,
|
243
245
|
{
|
244
246
|
userType: c,
|
@@ -247,20 +249,20 @@ const Le = Ut(
|
|
247
249
|
behavior: X,
|
248
250
|
layout: P,
|
249
251
|
paperColor: C,
|
250
|
-
onMarkForReview:
|
251
|
-
actionbarHeight:
|
252
|
+
onMarkForReview: Ct,
|
253
|
+
actionbarHeight: Wt,
|
252
254
|
canResolveDoubt: yt,
|
253
255
|
onResolveDoubt: xt,
|
254
|
-
worksheetCompleted:
|
256
|
+
worksheetCompleted: f
|
255
257
|
}
|
256
258
|
),
|
257
|
-
|
259
|
+
x && /* @__PURE__ */ r(le, { src: Vt.LESSON_OVERVIEW_BANNER }),
|
258
260
|
m && C && /* @__PURE__ */ r(kt, { paperColor: C }),
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
(
|
261
|
+
g ? /* @__PURE__ */ I(zt, { children: [
|
262
|
+
h === "practice-basic" && /* @__PURE__ */ r(re, {}),
|
263
|
+
h === "practice-regular" && /* @__PURE__ */ r(ie, {}),
|
264
|
+
h === "exit-ticket" && /* @__PURE__ */ r(oe, {}),
|
265
|
+
(h == null ? void 0 : h.startsWith("advanced-")) && /* @__PURE__ */ r(ee, {})
|
264
266
|
] }) : void 0,
|
265
267
|
/* @__PURE__ */ r(
|
266
268
|
qt,
|
@@ -269,8 +271,8 @@ const Le = Ut(
|
|
269
271
|
appended: a,
|
270
272
|
question: n,
|
271
273
|
response: e == null ? void 0 : e.response,
|
272
|
-
canRender: K ||
|
273
|
-
learnosity:
|
274
|
+
canRender: K || w,
|
275
|
+
learnosity: H,
|
274
276
|
canForceAppend: c === "TEACHER",
|
275
277
|
isConceptIntro: m
|
276
278
|
}
|
@@ -279,7 +281,7 @@ const Le = Ut(
|
|
279
281
|
Xt,
|
280
282
|
{
|
281
283
|
canRender: K,
|
282
|
-
canScribble: J &&
|
284
|
+
canScribble: J && w,
|
283
285
|
appended: a,
|
284
286
|
responseId: o,
|
285
287
|
width: V,
|
@@ -287,12 +289,12 @@ const Le = Ut(
|
|
287
289
|
onUpdateHeight: Ft,
|
288
290
|
onPublish: Y,
|
289
291
|
onSubscribe: Z,
|
290
|
-
userId:
|
292
|
+
userId: Bt,
|
291
293
|
initialData: N == null ? void 0 : N[o],
|
292
294
|
userType: c
|
293
295
|
}
|
294
296
|
) }),
|
295
|
-
!dt &&
|
297
|
+
!dt && D && D.length > 0 && /* @__PURE__ */ r(
|
296
298
|
wt,
|
297
299
|
{
|
298
300
|
$background: "BLUE_1",
|
@@ -300,11 +302,11 @@ const Le = Ut(
|
|
300
302
|
$gapX: 0.5,
|
301
303
|
$borderRadiusX: 0,
|
302
304
|
$borderColor: "BLUE_2",
|
303
|
-
children:
|
305
|
+
children: D.map((t, s) => /* @__PURE__ */ r(
|
304
306
|
ue,
|
305
307
|
{
|
306
308
|
dangerouslySetInnerHTML: {
|
307
|
-
__html: `<span style="color: #DA5107; font-weight: 600;">Hint${((
|
309
|
+
__html: `<span style="color: #DA5107; font-weight: 600;">Hint${((d == null ? void 0 : d.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span> ${t}`
|
308
310
|
}
|
309
311
|
},
|
310
312
|
t
|
@@ -323,7 +325,7 @@ const Le = Ut(
|
|
323
325
|
fe,
|
324
326
|
{
|
325
327
|
dangerouslySetInnerHTML: {
|
326
|
-
__html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${
|
328
|
+
__html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${b}`
|
327
329
|
}
|
328
330
|
}
|
329
331
|
)
|
@@ -334,7 +336,7 @@ const Le = Ut(
|
|
334
336
|
{
|
335
337
|
responses: Tt,
|
336
338
|
response: e,
|
337
|
-
nextQuestionId:
|
339
|
+
nextQuestionId: v,
|
338
340
|
responseId: o,
|
339
341
|
studentId: Lt,
|
340
342
|
userType: c,
|