@cuemath/leap 3.3.21 → 3.3.22
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/milestone/create/comps/add-custom-chapter/add-custom-chapter.js +42 -40
- package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +70 -64
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js +54 -29
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js +48 -28
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +79 -76
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js +97 -94
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js +160 -143
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js +22 -12
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js.map +1 -1
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js +64 -59
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-container.js +17 -15
- package/dist/features/milestone/create/milestone-create-container.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +170 -153
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +19 -17
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
|
@@ -1,61 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getCurriculumStandardsFromConfig as
|
|
9
|
-
import
|
|
10
|
-
import { getCategorizedCurriculumStandards as
|
|
11
|
-
import { getGoalCategories as
|
|
12
|
-
const
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { memo as k, useContext as w, useCallback as A } from "react";
|
|
3
|
+
import B from "../../../../ui/context/use-tracking-context.js";
|
|
4
|
+
import f from "../../../../ui/layout/flex-view.js";
|
|
5
|
+
import D from "../../../../ui/selection-cards/selection-cards.js";
|
|
6
|
+
import P from "../../../../ui/text/text.js";
|
|
7
|
+
import S from "../../milestone-create-context.js";
|
|
8
|
+
import { getCurriculumStandardsFromConfig as F, getDefaultBoard as O, appendPrimaryGoalCategoryToFormState as X } from "../../milestone-create-helpers.js";
|
|
9
|
+
import j from "../body-layout/body-layout.js";
|
|
10
|
+
import { getCategorizedCurriculumStandards as z } from "../class-details-step/class-details-utils.js";
|
|
11
|
+
import { getGoalCategories as M, getTestTypeBasedCategory as C } from "./test-type-utils.js";
|
|
12
|
+
const T = k(
|
|
13
13
|
({
|
|
14
|
-
currentStep:
|
|
15
|
-
formData:
|
|
14
|
+
currentStep: b,
|
|
15
|
+
formData: x,
|
|
16
16
|
config: t,
|
|
17
17
|
courseStream: o,
|
|
18
|
-
classRatio:
|
|
19
|
-
onFormDataChange:
|
|
20
|
-
enrollmentType: r
|
|
18
|
+
classRatio: s,
|
|
19
|
+
onFormDataChange: p,
|
|
20
|
+
enrollmentType: r,
|
|
21
|
+
isTeacherTrainingAccount: l
|
|
21
22
|
}) => {
|
|
22
|
-
const { name:
|
|
23
|
-
step:
|
|
24
|
-
}, { testType: g, grade:
|
|
25
|
-
(
|
|
26
|
-
const
|
|
27
|
-
grade:
|
|
28
|
-
goalCategory:
|
|
29
|
-
countryCode:
|
|
23
|
+
const { name: u, title: h } = b, E = {
|
|
24
|
+
step: u
|
|
25
|
+
}, { testType: g, grade: m, board: n, region: d } = x, { flow: a } = w(S), { onEvent: y } = B(E), G = M(g, t, o, r), $ = A(
|
|
26
|
+
(e) => {
|
|
27
|
+
const v = z(t, {
|
|
28
|
+
grade: m ?? "",
|
|
29
|
+
goalCategory: C(e),
|
|
30
|
+
countryCode: d ?? "",
|
|
30
31
|
courseStream: o,
|
|
31
|
-
classRatio:
|
|
32
|
+
classRatio: s,
|
|
32
33
|
enrollmentType: r,
|
|
33
|
-
flow:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
flow: a,
|
|
35
|
+
isTeacherTrainingAccount: l
|
|
36
|
+
}), I = F(t, {
|
|
37
|
+
grade: m ?? "",
|
|
38
|
+
goalCategory: C(e),
|
|
39
|
+
countryCode: d ?? "",
|
|
38
40
|
courseStream: o,
|
|
39
|
-
classRatio:
|
|
41
|
+
classRatio: s,
|
|
40
42
|
enrollmentType: r,
|
|
41
|
-
flow:
|
|
42
|
-
|
|
43
|
+
flow: a,
|
|
44
|
+
isTeacherTrainingAccount: l
|
|
45
|
+
}), c = n && I.some((L) => L.id === n) ? n : O(v), _ = X(
|
|
43
46
|
t,
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
e,
|
|
48
|
+
m,
|
|
46
49
|
o,
|
|
47
50
|
r,
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
c,
|
|
52
|
+
d,
|
|
53
|
+
a
|
|
50
54
|
);
|
|
51
|
-
|
|
52
|
-
goal_category:
|
|
53
|
-
flow:
|
|
54
|
-
}),
|
|
55
|
-
testType:
|
|
56
|
-
board:
|
|
55
|
+
y("SELECTED_GOAL_CATEGORY", {
|
|
56
|
+
goal_category: C(e),
|
|
57
|
+
flow: a
|
|
58
|
+
}), p({
|
|
59
|
+
testType: e,
|
|
60
|
+
board: c,
|
|
57
61
|
chapterGoalCategory: {
|
|
58
|
-
primaryGoalCategory:
|
|
62
|
+
primaryGoalCategory: _
|
|
59
63
|
},
|
|
60
64
|
committed: {
|
|
61
65
|
testType: !0,
|
|
@@ -66,27 +70,28 @@ const Z = _(
|
|
|
66
70
|
[
|
|
67
71
|
r,
|
|
68
72
|
n,
|
|
69
|
-
|
|
73
|
+
s,
|
|
70
74
|
t,
|
|
71
75
|
o,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
C,
|
|
76
|
+
a,
|
|
77
|
+
l,
|
|
75
78
|
m,
|
|
76
|
-
|
|
79
|
+
p,
|
|
80
|
+
d,
|
|
81
|
+
y
|
|
77
82
|
]
|
|
78
83
|
);
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
|
|
84
|
+
return /* @__PURE__ */ i(
|
|
85
|
+
j,
|
|
81
86
|
{
|
|
82
|
-
stepName:
|
|
83
|
-
headerElement: /* @__PURE__ */
|
|
84
|
-
bodyElement: /* @__PURE__ */
|
|
85
|
-
|
|
87
|
+
stepName: u,
|
|
88
|
+
headerElement: /* @__PURE__ */ i(P, { $renderAs: "ab2", children: h }),
|
|
89
|
+
bodyElement: /* @__PURE__ */ i(f, { $alignItems: "center", $height: "100%", $gapX: 5, children: /* @__PURE__ */ i(f, { $flexDirection: "row", $flexGapX: 1.5, children: /* @__PURE__ */ i(
|
|
90
|
+
D,
|
|
86
91
|
{
|
|
87
|
-
options:
|
|
92
|
+
options: G,
|
|
88
93
|
value: g,
|
|
89
|
-
onChange:
|
|
94
|
+
onChange: $,
|
|
90
95
|
analyticsLabel: "goal_category",
|
|
91
96
|
analyticsProps: { test_type: g },
|
|
92
97
|
type: "radio"
|
|
@@ -97,6 +102,6 @@ const Z = _(
|
|
|
97
102
|
}
|
|
98
103
|
);
|
|
99
104
|
export {
|
|
100
|
-
|
|
105
|
+
T as default
|
|
101
106
|
};
|
|
102
107
|
//# sourceMappingURL=test-type-step.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-type-step.js","sources":["../../../../../../src/features/milestone/create/comps/test-type-step/test-type-step.tsx"],"sourcesContent":["import type { IFormStepProps, IMileStoneFormFields } from '../../milestone-create-types';\n\nimport React, { memo, useCallback, useContext } from 'react';\n\nimport useTrackingContext from '../../../../ui/context/use-tracking-context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SelectionCards from '../../../../ui/selection-cards/selection-cards';\nimport Text from '../../../../ui/text/text';\nimport MilestoneCreateContext from '../../milestone-create-context';\nimport {\n appendPrimaryGoalCategoryToFormState,\n getCurriculumStandardsFromConfig,\n getDefaultBoard,\n} from '../../milestone-create-helpers';\nimport BodyLayout from '../body-layout/body-layout';\nimport { getCategorizedCurriculumStandards } from '../class-details-step/class-details-utils';\nimport { getGoalCategories, getTestTypeBasedCategory } from './test-type-utils';\n\nconst TestTypeStep: React.FC<IFormStepProps> = memo(\n ({\n currentStep,\n formData,\n config,\n courseStream,\n classRatio,\n onFormDataChange,\n enrollmentType,\n }) => {\n const { name, title } = currentStep;\n const analyticsProps = {\n step: name,\n };\n const { testType, grade, board, region } = formData;\n\n const { flow } = useContext(MilestoneCreateContext);\n const { onEvent: trackEvent } = useTrackingContext(analyticsProps);\n\n const goalCategories = getGoalCategories(testType, config, courseStream, enrollmentType);\n\n const handleTestTypeChange = useCallback(\n (selectedTestType: NonNullable<IMileStoneFormFields['testType']>) => {\n //* This is to compensate for kids with no board.\n //* ref: https://www.notion.so/cuemath/FE-Goal-Creator-15a8897caec780f3ae21e34ce6f34371?p=1758897caec7803689f8cfc7acf5f5fc&pm=s\n const boards = getCategorizedCurriculumStandards(config, {\n grade: grade ?? '',\n goalCategory: getTestTypeBasedCategory(selectedTestType),\n countryCode: region ?? '',\n courseStream,\n classRatio,\n enrollmentType,\n flow,\n });\n\n const curriculumStandards = getCurriculumStandardsFromConfig(config, {\n grade: grade ?? '',\n goalCategory: getTestTypeBasedCategory(selectedTestType),\n countryCode: region ?? '',\n courseStream,\n classRatio,\n enrollmentType,\n flow,\n });\n\n const boardIsAvailableInCurriculum =\n board && curriculumStandards.some(boardData => boardData.id === board);\n\n const boardData = boardIsAvailableInCurriculum ? board : getDefaultBoard(boards);\n\n const primaryGoalCategory = appendPrimaryGoalCategoryToFormState(\n config,\n selectedTestType,\n grade,\n courseStream,\n enrollmentType,\n boardData,\n region,\n );\n\n trackEvent('SELECTED_GOAL_CATEGORY', {\n goal_category: getTestTypeBasedCategory(selectedTestType),\n flow,\n });\n\n onFormDataChange({\n testType: selectedTestType,\n board: boardData,\n chapterGoalCategory: {\n primaryGoalCategory,\n },\n committed: {\n testType: true,\n chapterGoalCategory: true,\n },\n });\n },\n [\n enrollmentType,\n board,\n classRatio,\n config,\n courseStream,\n flow,\n grade,\n onFormDataChange,\n region,\n trackEvent,\n ],\n );\n\n return (\n <BodyLayout\n stepName={name}\n headerElement={<Text $renderAs=\"ab2\">{title}</Text>}\n bodyElement={\n <FlexView $alignItems=\"center\" $height=\"100%\" $gapX={5}>\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <SelectionCards\n options={goalCategories}\n value={testType}\n onChange={handleTestTypeChange}\n analyticsLabel=\"goal_category\"\n analyticsProps={{ test_type: testType }}\n type=\"radio\"\n />\n </FlexView>\n </FlexView>\n }\n />\n );\n },\n);\n\nexport default TestTypeStep;\n"],"names":["TestTypeStep","memo","currentStep","formData","config","courseStream","classRatio","onFormDataChange","enrollmentType","name","title","analyticsProps","testType","grade","board","region","flow","useContext","MilestoneCreateContext","trackEvent","useTrackingContext","goalCategories","getGoalCategories","handleTestTypeChange","useCallback","selectedTestType","boards","getCategorizedCurriculumStandards","getTestTypeBasedCategory","curriculumStandards","getCurriculumStandardsFromConfig","boardData","getDefaultBoard","primaryGoalCategory","appendPrimaryGoalCategoryToFormState","jsx","BodyLayout","Text","FlexView","SelectionCards"],"mappings":";;;;;;;;;;;AAkBA,MAAMA,IAAyCC;AAAA,EAC7C,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,gBAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,MAAAC,GAAM,OAAAC,EAAU,
|
|
1
|
+
{"version":3,"file":"test-type-step.js","sources":["../../../../../../src/features/milestone/create/comps/test-type-step/test-type-step.tsx"],"sourcesContent":["import type { IFormStepProps, IMileStoneFormFields } from '../../milestone-create-types';\n\nimport React, { memo, useCallback, useContext } from 'react';\n\nimport useTrackingContext from '../../../../ui/context/use-tracking-context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SelectionCards from '../../../../ui/selection-cards/selection-cards';\nimport Text from '../../../../ui/text/text';\nimport MilestoneCreateContext from '../../milestone-create-context';\nimport {\n appendPrimaryGoalCategoryToFormState,\n getCurriculumStandardsFromConfig,\n getDefaultBoard,\n} from '../../milestone-create-helpers';\nimport BodyLayout from '../body-layout/body-layout';\nimport { getCategorizedCurriculumStandards } from '../class-details-step/class-details-utils';\nimport { getGoalCategories, getTestTypeBasedCategory } from './test-type-utils';\n\nconst TestTypeStep: React.FC<IFormStepProps> = memo(\n ({\n currentStep,\n formData,\n config,\n courseStream,\n classRatio,\n onFormDataChange,\n enrollmentType,\n isTeacherTrainingAccount,\n }) => {\n const { name, title } = currentStep;\n const analyticsProps = {\n step: name,\n };\n const { testType, grade, board, region } = formData;\n\n const { flow } = useContext(MilestoneCreateContext);\n const { onEvent: trackEvent } = useTrackingContext(analyticsProps);\n\n const goalCategories = getGoalCategories(testType, config, courseStream, enrollmentType);\n\n const handleTestTypeChange = useCallback(\n (selectedTestType: NonNullable<IMileStoneFormFields['testType']>) => {\n //* This is to compensate for kids with no board.\n //* ref: https://www.notion.so/cuemath/FE-Goal-Creator-15a8897caec780f3ae21e34ce6f34371?p=1758897caec7803689f8cfc7acf5f5fc&pm=s\n const boards = getCategorizedCurriculumStandards(config, {\n grade: grade ?? '',\n goalCategory: getTestTypeBasedCategory(selectedTestType),\n countryCode: region ?? '',\n courseStream,\n classRatio,\n enrollmentType,\n flow,\n isTeacherTrainingAccount,\n });\n\n const curriculumStandards = getCurriculumStandardsFromConfig(config, {\n grade: grade ?? '',\n goalCategory: getTestTypeBasedCategory(selectedTestType),\n countryCode: region ?? '',\n courseStream,\n classRatio,\n enrollmentType,\n flow,\n isTeacherTrainingAccount,\n });\n\n const boardIsAvailableInCurriculum =\n board && curriculumStandards.some(boardData => boardData.id === board);\n\n const boardData = boardIsAvailableInCurriculum ? board : getDefaultBoard(boards);\n\n const primaryGoalCategory = appendPrimaryGoalCategoryToFormState(\n config,\n selectedTestType,\n grade,\n courseStream,\n enrollmentType,\n boardData,\n region,\n flow,\n );\n\n trackEvent('SELECTED_GOAL_CATEGORY', {\n goal_category: getTestTypeBasedCategory(selectedTestType),\n flow,\n });\n\n onFormDataChange({\n testType: selectedTestType,\n board: boardData,\n chapterGoalCategory: {\n primaryGoalCategory,\n },\n committed: {\n testType: true,\n chapterGoalCategory: true,\n },\n });\n },\n [\n enrollmentType,\n board,\n classRatio,\n config,\n courseStream,\n flow,\n isTeacherTrainingAccount,\n grade,\n onFormDataChange,\n region,\n trackEvent,\n ],\n );\n\n return (\n <BodyLayout\n stepName={name}\n headerElement={<Text $renderAs=\"ab2\">{title}</Text>}\n bodyElement={\n <FlexView $alignItems=\"center\" $height=\"100%\" $gapX={5}>\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <SelectionCards\n options={goalCategories}\n value={testType}\n onChange={handleTestTypeChange}\n analyticsLabel=\"goal_category\"\n analyticsProps={{ test_type: testType }}\n type=\"radio\"\n />\n </FlexView>\n </FlexView>\n }\n />\n );\n },\n);\n\nexport default TestTypeStep;\n"],"names":["TestTypeStep","memo","currentStep","formData","config","courseStream","classRatio","onFormDataChange","enrollmentType","isTeacherTrainingAccount","name","title","analyticsProps","testType","grade","board","region","flow","useContext","MilestoneCreateContext","trackEvent","useTrackingContext","goalCategories","getGoalCategories","handleTestTypeChange","useCallback","selectedTestType","boards","getCategorizedCurriculumStandards","getTestTypeBasedCategory","curriculumStandards","getCurriculumStandardsFromConfig","boardData","getDefaultBoard","primaryGoalCategory","appendPrimaryGoalCategoryToFormState","jsx","BodyLayout","Text","FlexView","SelectionCards"],"mappings":";;;;;;;;;;;AAkBA,MAAMA,IAAyCC;AAAA,EAC7C,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,0BAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,MAAAC,GAAM,OAAAC,EAAU,IAAAT,GAClBU,IAAiB;AAAA,MACrB,MAAMF;AAAA,IAAA,GAEF,EAAE,UAAAG,GAAU,OAAAC,GAAO,OAAAC,GAAO,QAAAC,MAAWb,GAErC,EAAE,MAAAc,EAAA,IAASC,EAAWC,CAAsB,GAC5C,EAAE,SAASC,EAAW,IAAIC,EAAmBT,CAAc,GAE3DU,IAAiBC,EAAkBV,GAAUT,GAAQC,GAAcG,CAAc,GAEjFgB,IAAuBC;AAAA,MAC3B,CAACC,MAAoE;AAG7D,cAAAC,IAASC,EAAkCxB,GAAQ;AAAA,UACvD,OAAOU,KAAS;AAAA,UAChB,cAAce,EAAyBH,CAAgB;AAAA,UACvD,aAAaV,KAAU;AAAA,UACvB,cAAAX;AAAA,UACA,YAAAC;AAAA,UACA,gBAAAE;AAAA,UACA,MAAAS;AAAA,UACA,0BAAAR;AAAA,QAAA,CACD,GAEKqB,IAAsBC,EAAiC3B,GAAQ;AAAA,UACnE,OAAOU,KAAS;AAAA,UAChB,cAAce,EAAyBH,CAAgB;AAAA,UACvD,aAAaV,KAAU;AAAA,UACvB,cAAAX;AAAA,UACA,YAAAC;AAAA,UACA,gBAAAE;AAAA,UACA,MAAAS;AAAA,UACA,0BAAAR;AAAA,QAAA,CACD,GAKKuB,IAFJjB,KAASe,EAAoB,KAAK,CAAAE,MAAaA,EAAU,OAAOjB,CAAK,IAEtBA,IAAQkB,EAAgBN,CAAM,GAEzEO,IAAsBC;AAAA,UAC1B/B;AAAA,UACAsB;AAAA,UACAZ;AAAA,UACAT;AAAA,UACAG;AAAA,UACAwB;AAAA,UACAhB;AAAA,UACAC;AAAA,QAAA;AAGF,QAAAG,EAAW,0BAA0B;AAAA,UACnC,eAAeS,EAAyBH,CAAgB;AAAA,UACxD,MAAAT;AAAA,QAAA,CACD,GAEgBV,EAAA;AAAA,UACf,UAAUmB;AAAA,UACV,OAAOM;AAAA,UACP,qBAAqB;AAAA,YACnB,qBAAAE;AAAA,UACF;AAAA,UACA,WAAW;AAAA,YACT,UAAU;AAAA,YACV,qBAAqB;AAAA,UACvB;AAAA,QAAA,CACD;AAAA,MACH;AAAA,MACA;AAAA,QACE1B;AAAA,QACAO;AAAA,QACAT;AAAA,QACAF;AAAA,QACAC;AAAA,QACAY;AAAA,QACAR;AAAA,QACAK;AAAA,QACAP;AAAA,QACAS;AAAA,QACAI;AAAA,MACF;AAAA,IAAA;AAIA,WAAA,gBAAAgB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAU3B;AAAA,QACV,eAAe,gBAAA0B,EAACE,GAAK,EAAA,WAAU,OAAO,UAAM3B,GAAA;AAAA,QAC5C,aACE,gBAAAyB,EAACG,GAAS,EAAA,aAAY,UAAS,SAAQ,QAAO,OAAO,GACnD,UAAC,gBAAAH,EAAAG,GAAA,EAAS,gBAAe,OAAM,WAAW,KACxC,UAAA,gBAAAH;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAASlB;AAAA,YACT,OAAOT;AAAA,YACP,UAAUW;AAAA,YACV,gBAAe;AAAA,YACf,gBAAgB,EAAE,WAAWX,EAAS;AAAA,YACtC,MAAK;AAAA,UAAA;AAAA,WAET,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { h as
|
|
3
|
-
import { memo as
|
|
4
|
-
import
|
|
5
|
-
import { useGetMileStoneConfig as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
2
|
+
import { h as S } from "../../../node_modules/humanize-plus/dist/humanize.js";
|
|
3
|
+
import { memo as b, useEffect as A } from "react";
|
|
4
|
+
import F from "../../ui/loader/app-loader/app-loader.js";
|
|
5
|
+
import { useGetMileStoneConfig as j } from "./api/milestone-config.js";
|
|
6
|
+
import v from "./milestone-create.js";
|
|
7
|
+
const w = b(
|
|
8
8
|
({
|
|
9
9
|
studentName: n,
|
|
10
10
|
studentId: r,
|
|
@@ -23,19 +23,20 @@ const v = S(
|
|
|
23
23
|
isGoalCreation: E,
|
|
24
24
|
courseStream: d,
|
|
25
25
|
classRatio: x,
|
|
26
|
-
enrollmentType: M
|
|
26
|
+
enrollmentType: M,
|
|
27
|
+
isTeacherTrainingAccount: D
|
|
27
28
|
}) => {
|
|
28
|
-
const { get: o, data: t, isProcessing:
|
|
29
|
-
return
|
|
29
|
+
const { get: o, data: t, isProcessing: P } = j();
|
|
30
|
+
return A(() => {
|
|
30
31
|
o("", void 0);
|
|
31
|
-
}, [o]),
|
|
32
|
-
|
|
32
|
+
}, [o]), P ? /* @__PURE__ */ e(F, { height: "100%" }) : t ? /* @__PURE__ */ e(
|
|
33
|
+
v,
|
|
33
34
|
{
|
|
34
35
|
flow: "CREATE",
|
|
35
36
|
board: u,
|
|
36
37
|
schoolData: l,
|
|
37
38
|
studentId: r,
|
|
38
|
-
studentName:
|
|
39
|
+
studentName: S.titleCase(n),
|
|
39
40
|
height: i,
|
|
40
41
|
minHeight: a,
|
|
41
42
|
formData: m,
|
|
@@ -50,12 +51,13 @@ const v = S(
|
|
|
50
51
|
isGoalCreation: E,
|
|
51
52
|
courseStream: d,
|
|
52
53
|
classRatio: x,
|
|
53
|
-
enrollmentType: M
|
|
54
|
+
enrollmentType: M,
|
|
55
|
+
isTeacherTrainingAccount: D
|
|
54
56
|
}
|
|
55
57
|
) : null;
|
|
56
58
|
}
|
|
57
|
-
),
|
|
59
|
+
), $ = w;
|
|
58
60
|
export {
|
|
59
|
-
|
|
61
|
+
$ as default
|
|
60
62
|
};
|
|
61
63
|
//# sourceMappingURL=milestone-create-container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"milestone-create-container.js","sources":["../../../../src/features/milestone/create/milestone-create-container.tsx"],"sourcesContent":["import type { IMileStoneCreateContainerProps } from './milestone-create-types';\n\nimport { titleCase } from 'humanize-plus';\nimport { memo, useEffect } from 'react';\n\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport { useGetMileStoneConfig } from './api/milestone-config';\nimport MilestoneCreate from './milestone-create';\n\nconst MilestoneCreateContainer: React.FC<IMileStoneCreateContainerProps> = memo(\n ({\n studentName,\n studentId,\n height,\n minHeight,\n formData,\n onChapterExitWarning,\n onFormDataChange: handleFormDataChange,\n onPreSubmit: handlePreSubmit,\n onExit: handleExit,\n userType,\n board,\n schoolData,\n grade,\n currentCountryCode,\n isGoalCreation,\n courseStream,\n classRatio,\n enrollmentType,\n }) => {\n const { get: getConfig, data: configData, isProcessing } = useGetMileStoneConfig();\n\n useEffect(() => {\n getConfig('', undefined);\n }, [getConfig]);\n\n if (isProcessing) return <AppLoader height=\"100%\" />;\n\n return configData ? (\n <MilestoneCreate\n flow=\"CREATE\"\n board={board}\n schoolData={schoolData}\n studentId={studentId}\n studentName={titleCase(studentName)}\n height={height}\n minHeight={minHeight}\n formData={formData}\n config={configData}\n currentCountryCode={currentCountryCode}\n onFormDataChange={handleFormDataChange}\n onChapterExitWarning={onChapterExitWarning}\n onPreSubmit={handlePreSubmit}\n onExit={handleExit}\n userType={userType}\n grade={grade}\n isGoalCreation={isGoalCreation}\n courseStream={courseStream}\n classRatio={classRatio}\n enrollmentType={enrollmentType}\n />\n ) : null;\n },\n);\n\nexport default MilestoneCreateContainer;\n"],"names":["MilestoneCreateContainer","memo","studentName","studentId","height","minHeight","formData","onChapterExitWarning","handleFormDataChange","handlePreSubmit","handleExit","userType","board","schoolData","grade","currentCountryCode","isGoalCreation","courseStream","classRatio","enrollmentType","getConfig","configData","isProcessing","useGetMileStoneConfig","useEffect","jsx","AppLoader","MilestoneCreate","titleCase","MilestoneCreateContainer$1"],"mappings":";;;;;;AASA,MAAMA,IAAqEC;AAAA,EACzE,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,kBAAkBC;AAAA,IAClB,aAAaC;AAAA,IACb,QAAQC;AAAA,IACR,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,gBAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,KAAKC,GAAW,MAAMC,GAAY,cAAAC,EAAA,IAAiBC;AAM3D,WAJAC,EAAU,MAAM;AACd,MAAAJ,EAAU,IAAI,MAAS;AAAA,IAAA,GACtB,CAACA,CAAS,CAAC,GAEVE,IAAsB,gBAAAG,EAAAC,GAAA,EAAU,QAAO,OAAO,CAAA,IAE3CL,IACL,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,
|
|
1
|
+
{"version":3,"file":"milestone-create-container.js","sources":["../../../../src/features/milestone/create/milestone-create-container.tsx"],"sourcesContent":["import type { IMileStoneCreateContainerProps } from './milestone-create-types';\n\nimport { titleCase } from 'humanize-plus';\nimport { memo, useEffect } from 'react';\n\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport { useGetMileStoneConfig } from './api/milestone-config';\nimport MilestoneCreate from './milestone-create';\n\nconst MilestoneCreateContainer: React.FC<IMileStoneCreateContainerProps> = memo(\n ({\n studentName,\n studentId,\n height,\n minHeight,\n formData,\n onChapterExitWarning,\n onFormDataChange: handleFormDataChange,\n onPreSubmit: handlePreSubmit,\n onExit: handleExit,\n userType,\n board,\n schoolData,\n grade,\n currentCountryCode,\n isGoalCreation,\n courseStream,\n classRatio,\n enrollmentType,\n isTeacherTrainingAccount,\n }) => {\n const { get: getConfig, data: configData, isProcessing } = useGetMileStoneConfig();\n\n useEffect(() => {\n getConfig('', undefined);\n }, [getConfig]);\n\n if (isProcessing) return <AppLoader height=\"100%\" />;\n\n return configData ? (\n <MilestoneCreate\n flow=\"CREATE\"\n board={board}\n schoolData={schoolData}\n studentId={studentId}\n studentName={titleCase(studentName)}\n height={height}\n minHeight={minHeight}\n formData={formData}\n config={configData}\n currentCountryCode={currentCountryCode}\n onFormDataChange={handleFormDataChange}\n onChapterExitWarning={onChapterExitWarning}\n onPreSubmit={handlePreSubmit}\n onExit={handleExit}\n userType={userType}\n grade={grade}\n isGoalCreation={isGoalCreation}\n courseStream={courseStream}\n classRatio={classRatio}\n enrollmentType={enrollmentType}\n isTeacherTrainingAccount={isTeacherTrainingAccount}\n />\n ) : null;\n },\n);\n\nexport default MilestoneCreateContainer;\n"],"names":["MilestoneCreateContainer","memo","studentName","studentId","height","minHeight","formData","onChapterExitWarning","handleFormDataChange","handlePreSubmit","handleExit","userType","board","schoolData","grade","currentCountryCode","isGoalCreation","courseStream","classRatio","enrollmentType","isTeacherTrainingAccount","getConfig","configData","isProcessing","useGetMileStoneConfig","useEffect","jsx","AppLoader","MilestoneCreate","titleCase","MilestoneCreateContainer$1"],"mappings":";;;;;;AASA,MAAMA,IAAqEC;AAAA,EACzE,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,kBAAkBC;AAAA,IAClB,aAAaC;AAAA,IACb,QAAQC;AAAA,IACR,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,0BAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,KAAKC,GAAW,MAAMC,GAAY,cAAAC,EAAA,IAAiBC;AAM3D,WAJAC,EAAU,MAAM;AACd,MAAAJ,EAAU,IAAI,MAAS;AAAA,IAAA,GACtB,CAACA,CAAS,CAAC,GAEVE,IAAsB,gBAAAG,EAAAC,GAAA,EAAU,QAAO,OAAO,CAAA,IAE3CL,IACL,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAAhB;AAAA,QACA,YAAAC;AAAA,QACA,WAAAV;AAAA,QACA,aAAa0B,YAAU3B,CAAW;AAAA,QAClC,QAAAE;AAAA,QACA,WAAAC;AAAA,QACA,UAAAC;AAAA,QACA,QAAQgB;AAAA,QACR,oBAAAP;AAAA,QACA,kBAAkBP;AAAA,QAClB,sBAAAD;AAAA,QACA,aAAaE;AAAA,QACb,QAAQC;AAAA,QACR,UAAAC;AAAA,QACA,OAAAG;AAAA,QACA,gBAAAE;AAAA,QACA,cAAAC;AAAA,QACA,YAAAC;AAAA,QACA,gBAAAC;AAAA,QACA,0BAAAC;AAAA,MAAA;AAAA,IAEA,IAAA;AAAA,EACN;AACF,GAEAU,IAAe9B;"}
|