@cuemath/leap 3.5.52-as1 → 3.5.53-j1
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/homework/homework-card.js +122 -121
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js +66 -61
- 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 +56 -55
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/search-chapter/search-chapters.js +32 -25
- package/dist/features/milestone/create/comps/add-custom-chapter/search-chapter/search-chapters.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapter-item.js +16 -15
- package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapter-item.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapters.js +17 -10
- package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapters.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.js +6 -6
- package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.js.map +1 -1
- package/dist/features/milestone/create/comps/body-layout/body-layout.js +30 -29
- package/dist/features/milestone/create/comps/body-layout/body-layout.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +77 -74
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +82 -79
- package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js +8 -8
- package/dist/features/milestone/create/milestone-create-styled.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +48 -46
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/edit/goal-draft-edit-sync.js +26 -0
- package/dist/features/milestone/edit/goal-draft-edit-sync.js.map +1 -0
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +72 -66
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/hooks/use-milestone-edit-sync.js +82 -0
- package/dist/features/milestone/edit/hooks/use-milestone-edit-sync.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/hooks/use-milestone-list-sync.js +49 -0
- package/dist/features/milestone/milestone-list-container/hooks/use-milestone-list-sync.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +109 -105
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +2 -2
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +21 -16
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +106 -98
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +136 -117
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +96 -92
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-sync.js +25 -0
- package/dist/features/milestone/milestone-list-container/milestone-list-sync.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js +78 -81
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js +28 -25
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js +39 -33
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/hooks/use-resource-assign-sync.js +50 -0
- package/dist/features/milestone/milestone-resources/resources-assign/hooks/use-resource-assign-sync.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-sync.js +25 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-sync.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js +43 -53
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +218 -174
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/store/resource-assign-store.js +198 -0
- package/dist/features/milestone/milestone-resources/resources-assign/store/resource-assign-store.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +69 -67
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +46 -45
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +34 -32
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/hooks/use-tests-creation-sync.js +52 -0
- package/dist/features/milestone/milestone-tests/tests-creation/hooks/use-tests-creation-sync.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-selection.js +51 -41
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-selection.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js +85 -71
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview-styled.js +5 -5
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview-styled.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js +36 -26
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-sync.js +25 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-sync.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-types.js +5 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation-types.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +150 -89
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +26 -24
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js +218 -91
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/learning-plan-styled.js +7 -6
- package/dist/features/trial-session/comps/learning-plan/learning-plan-styled.js.map +1 -1
- package/dist/features/trial-session/hooks/use-learning-plan-scroll-sync.js +75 -0
- package/dist/features/trial-session/hooks/use-learning-plan-scroll-sync.js.map +1 -0
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +125 -115
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js +3 -2
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +69 -54
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +44 -33
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +25 -22
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +48 -44
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +2 -2
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +138 -2
- package/dist/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js +0 -37
- package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js.map +0 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { memo as l, useCallback as p } from "react";
|
|
3
|
+
import f from "../../../../../../assets/line-icons/icons/cross.js";
|
|
4
|
+
import d from "../../../../../ui/buttons/icon-button/icon-button.js";
|
|
5
5
|
import t from "../../../../../ui/layout/flex-view.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
6
|
+
import x from "../../../../../ui/text/text.js";
|
|
7
|
+
import $ from "./tags-render.js";
|
|
8
|
+
const T = l(function({
|
|
9
9
|
chapter: c,
|
|
10
|
-
handleDeleteClick: r
|
|
10
|
+
handleDeleteClick: r,
|
|
11
|
+
userType: a
|
|
11
12
|
}) {
|
|
12
|
-
const { id: o, name:
|
|
13
|
+
const { id: o, name: i, chapter_tags: m } = c, s = p(() => {
|
|
13
14
|
r(o);
|
|
14
15
|
}, [r, o]);
|
|
15
16
|
return /* @__PURE__ */ n(
|
|
@@ -22,17 +23,17 @@ const j = s(function({
|
|
|
22
23
|
$alignItems: "center",
|
|
23
24
|
children: [
|
|
24
25
|
/* @__PURE__ */ n(t, { $flexRowGap: 4, children: [
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
/* @__PURE__ */ e(t, { $flexDirection: "row", $flexGap: 4, children: /* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ e(x, { $renderAs: "ab3", children: i }),
|
|
27
|
+
/* @__PURE__ */ e(t, { $flexDirection: "row", $flexGap: 4, children: /* @__PURE__ */ e($, { tags: m }) })
|
|
27
28
|
] }),
|
|
28
|
-
/* @__PURE__ */ e(
|
|
29
|
-
|
|
29
|
+
a !== "STUDENT" && /* @__PURE__ */ e(
|
|
30
|
+
d,
|
|
30
31
|
{
|
|
31
32
|
renderAs: "secondary",
|
|
32
33
|
size: "xsmall",
|
|
33
34
|
analyticsLabel: "Remove custom chapter",
|
|
34
|
-
onClick:
|
|
35
|
-
Icon:
|
|
35
|
+
onClick: s,
|
|
36
|
+
Icon: f
|
|
36
37
|
}
|
|
37
38
|
)
|
|
38
39
|
]
|
|
@@ -40,6 +41,6 @@ const j = s(function({
|
|
|
40
41
|
);
|
|
41
42
|
});
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
T as default
|
|
44
45
|
};
|
|
45
46
|
//# sourceMappingURL=selected-chapter-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selected-chapter-item.js","sources":["../../../../../../../src/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapter-item.tsx"],"sourcesContent":["import { type FC, useCallback, memo } from 'react';\n\nimport CrossIcon from '../../../../../../assets/line-icons/icons/cross';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport type { ISelectedChapterItemProps } from './selected-chapters-types';\nimport TagsRenderer from './tags-render';\n\nconst SelectedChapterItem: FC<ISelectedChapterItemProps> = memo(function SelectedChapterItem({\n chapter,\n handleDeleteClick,\n}) {\n const { id, name, chapter_tags: tags } = chapter;\n\n const deleteChapterSelection = useCallback(() => {\n handleDeleteClick(id);\n }, [handleDeleteClick, id]);\n\n return (\n <FlexView\n $gapX={1}\n $gutterX={1}\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n <FlexView $flexRowGap={4}>\n <Text $renderAs=\"ab3\">{name}</Text>\n <FlexView $flexDirection=\"row\" $flexGap={4}>\n <TagsRenderer tags={tags} />\n </FlexView>\n </FlexView>\n\n <IconButton\n
|
|
1
|
+
{"version":3,"file":"selected-chapter-item.js","sources":["../../../../../../../src/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapter-item.tsx"],"sourcesContent":["import { type FC, useCallback, memo } from 'react';\n\nimport CrossIcon from '../../../../../../assets/line-icons/icons/cross';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport type { ISelectedChapterItemProps } from './selected-chapters-types';\nimport TagsRenderer from './tags-render';\n\nconst SelectedChapterItem: FC<ISelectedChapterItemProps> = memo(function SelectedChapterItem({\n chapter,\n handleDeleteClick,\n userType,\n}) {\n const { id, name, chapter_tags: tags } = chapter;\n\n const deleteChapterSelection = useCallback(() => {\n handleDeleteClick(id);\n }, [handleDeleteClick, id]);\n\n return (\n <FlexView\n $gapX={1}\n $gutterX={1}\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n <FlexView $flexRowGap={4}>\n <Text $renderAs=\"ab3\">{name}</Text>\n <FlexView $flexDirection=\"row\" $flexGap={4}>\n <TagsRenderer tags={tags} />\n </FlexView>\n </FlexView>\n\n {userType !== 'STUDENT' && (\n <IconButton\n renderAs=\"secondary\"\n size=\"xsmall\"\n analyticsLabel=\"Remove custom chapter\"\n onClick={deleteChapterSelection}\n Icon={CrossIcon}\n />\n )}\n </FlexView>\n );\n});\n\nexport default SelectedChapterItem;\n"],"names":["SelectedChapterItem","memo","chapter","handleDeleteClick","userType","id","name","tags","deleteChapterSelection","useCallback","jsxs","FlexView","jsx","Text","TagsRenderer","IconButton","CrossIcon"],"mappings":";;;;;;;AASM,MAAAA,IAAqDC,EAAK,SAA6B;AAAA,EAC3F,SAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,UAAAC;AACF,GAAG;AACD,QAAM,EAAE,IAAAC,GAAI,MAAAC,GAAM,cAAcC,MAASL,GAEnCM,IAAyBC,EAAY,MAAM;AAC/C,IAAAN,EAAkBE,CAAE;AAAA,EAAA,GACnB,CAACF,GAAmBE,CAAE,CAAC;AAGxB,SAAA,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,UAAU;AAAA,MACV,gBAAe;AAAA,MACf,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEZ,UAAA;AAAA,QAAC,gBAAAD,EAAAC,GAAA,EAAS,aAAa,GACrB,UAAA;AAAA,UAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,OAAO,UAAKP,GAAA;AAAA,UAC5B,gBAAAM,EAACD,KAAS,gBAAe,OAAM,UAAU,GACvC,UAAA,gBAAAC,EAACE,GAAa,EAAA,MAAAP,EAAA,CAAY,EAC5B,CAAA;AAAA,QAAA,GACF;AAAA,QAECH,MAAa,aACZ,gBAAAQ;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,MAAK;AAAA,YACL,gBAAe;AAAA,YACf,SAASP;AAAA,YACT,MAAMQ;AAAA,UAAA;AAAA,QACR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as t, jsxs as l, Fragment as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsx as t, jsxs as l, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { memo as C, useCallback as $, Fragment as u } from "react";
|
|
3
3
|
import i from "../../../../../ui/layout/flex-view.js";
|
|
4
4
|
import s from "../../../../../ui/separator/separator.js";
|
|
5
5
|
import c from "../../../../../ui/text/text.js";
|
|
6
|
-
import
|
|
6
|
+
import T from "./selected-chapter-item.js";
|
|
7
7
|
import { SelectedChaptersWrapper as _, StyledBook2Icon as w } from "./selected-chapters-styled.js";
|
|
8
|
-
const I =
|
|
9
|
-
const { formData: h, onFormDataChange: n } = d, { selectedChaptersList: e = [], searchedChaptersList: a = [] } = h,
|
|
8
|
+
const I = C(function(d) {
|
|
9
|
+
const { formData: h, onFormDataChange: n, userType: m } = d, { selectedChaptersList: e = [], searchedChaptersList: a = [] } = h, p = $(
|
|
10
10
|
(r) => {
|
|
11
|
-
const
|
|
11
|
+
const f = e.filter(
|
|
12
12
|
({ id: o }) => o !== r
|
|
13
13
|
);
|
|
14
14
|
n({
|
|
15
|
-
selectedChaptersList:
|
|
15
|
+
selectedChaptersList: f,
|
|
16
16
|
searchedChaptersList: a.map(
|
|
17
17
|
(o) => o.id === r ? { ...o, added: !1 } : o
|
|
18
18
|
)
|
|
@@ -25,7 +25,7 @@ const I = g(function(d) {
|
|
|
25
25
|
{
|
|
26
26
|
$widthX: 23,
|
|
27
27
|
$justifyContent: e.length ? "flex-start" : "center",
|
|
28
|
-
children: e.length ? /* @__PURE__ */ l(
|
|
28
|
+
children: e.length ? /* @__PURE__ */ l(g, { children: [
|
|
29
29
|
/* @__PURE__ */ l(i, { $gapX: 1, $gutterX: 1, $background: "WHITE_2", children: [
|
|
30
30
|
/* @__PURE__ */ t(s, { heightX: 0.5, background: "WHITE_2" }),
|
|
31
31
|
/* @__PURE__ */ l(c, { $renderAs: "ac4", $color: "BLACK_T_60", children: [
|
|
@@ -34,8 +34,15 @@ const I = g(function(d) {
|
|
|
34
34
|
")"
|
|
35
35
|
] })
|
|
36
36
|
] }),
|
|
37
|
-
e.map((r) => /* @__PURE__ */ l(
|
|
38
|
-
/* @__PURE__ */ t(
|
|
37
|
+
e.map((r) => /* @__PURE__ */ l(u, { children: [
|
|
38
|
+
/* @__PURE__ */ t(
|
|
39
|
+
T,
|
|
40
|
+
{
|
|
41
|
+
chapter: r,
|
|
42
|
+
handleDeleteClick: p,
|
|
43
|
+
userType: m
|
|
44
|
+
}
|
|
45
|
+
),
|
|
39
46
|
/* @__PURE__ */ t(s, { height: 1, background: "WHITE_5" })
|
|
40
47
|
] }, r.id))
|
|
41
48
|
] }) : /* @__PURE__ */ l(i, { $flexRowGap: 24, $alignItems: "center", $justifyContent: "center", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selected-chapters.js","sources":["../../../../../../../src/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapters.tsx"],"sourcesContent":["import { type FC, Fragment, memo, useCallback } from 'react';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Seperator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport SelectedChapterItem from './selected-chapter-item';\nimport * as Styled from './selected-chapters-styled';\nimport type { ISelectedChapterProps } from './selected-chapters-types';\n\nconst SelectedChapters: FC<ISelectedChapterProps> = memo(function SelectedChapters(props) {\n const { formData, onFormDataChange } = props;\n const { selectedChaptersList = [], searchedChaptersList = [] } = formData;\n\n const handleDeleteClick = useCallback(\n (chapterId: string) => {\n const filteredSelectedChapters = selectedChaptersList.filter(\n ({ id: cId }) => cId !== chapterId,\n );\n\n onFormDataChange({\n selectedChaptersList: filteredSelectedChapters,\n searchedChaptersList: searchedChaptersList.map(chapter =>\n chapter.id === chapterId ? { ...chapter, added: false } : chapter,\n ),\n });\n },\n [selectedChaptersList, onFormDataChange, searchedChaptersList],\n );\n\n return (\n <Styled.SelectedChaptersWrapper\n $widthX={23}\n $justifyContent={selectedChaptersList.length ? 'flex-start' : 'center'}\n >\n {selectedChaptersList.length ? (\n <>\n <FlexView $gapX={1} $gutterX={1} $background=\"WHITE_2\">\n <Seperator heightX={0.5} background=\"WHITE_2\" />\n <Text $renderAs=\"ac4\" $color=\"BLACK_T_60\">\n Selected chapters ({selectedChaptersList.length})\n </Text>\n </FlexView>\n\n {selectedChaptersList.map(chapter => (\n <Fragment key={chapter.id}>\n <SelectedChapterItem
|
|
1
|
+
{"version":3,"file":"selected-chapters.js","sources":["../../../../../../../src/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapters.tsx"],"sourcesContent":["import { type FC, Fragment, memo, useCallback } from 'react';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Seperator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport SelectedChapterItem from './selected-chapter-item';\nimport * as Styled from './selected-chapters-styled';\nimport type { ISelectedChapterProps } from './selected-chapters-types';\n\nconst SelectedChapters: FC<ISelectedChapterProps> = memo(function SelectedChapters(props) {\n const { formData, onFormDataChange, userType } = props;\n const { selectedChaptersList = [], searchedChaptersList = [] } = formData;\n\n const handleDeleteClick = useCallback(\n (chapterId: string) => {\n const filteredSelectedChapters = selectedChaptersList.filter(\n ({ id: cId }) => cId !== chapterId,\n );\n\n onFormDataChange({\n selectedChaptersList: filteredSelectedChapters,\n searchedChaptersList: searchedChaptersList.map(chapter =>\n chapter.id === chapterId ? { ...chapter, added: false } : chapter,\n ),\n });\n },\n [selectedChaptersList, onFormDataChange, searchedChaptersList],\n );\n\n return (\n <Styled.SelectedChaptersWrapper\n $widthX={23}\n $justifyContent={selectedChaptersList.length ? 'flex-start' : 'center'}\n >\n {selectedChaptersList.length ? (\n <>\n <FlexView $gapX={1} $gutterX={1} $background=\"WHITE_2\">\n <Seperator heightX={0.5} background=\"WHITE_2\" />\n <Text $renderAs=\"ac4\" $color=\"BLACK_T_60\">\n Selected chapters ({selectedChaptersList.length})\n </Text>\n </FlexView>\n\n {selectedChaptersList.map(chapter => (\n <Fragment key={chapter.id}>\n <SelectedChapterItem\n chapter={chapter}\n handleDeleteClick={handleDeleteClick}\n userType={userType}\n />\n <Seperator height={1} background=\"WHITE_5\" />\n </Fragment>\n ))}\n </>\n ) : (\n <FlexView $flexRowGap={24} $alignItems=\"center\" $justifyContent=\"center\">\n <Styled.StyledBook2Icon width={60} height={60} color=\"BLACK_T_38\" fill=\"white\" />\n <Text $renderAs=\"ab2\" $align=\"center\" $color=\"BLACK_T_38\" $widthX={14}>\n The chapters you select will be shown here\n </Text>\n </FlexView>\n )}\n </Styled.SelectedChaptersWrapper>\n );\n});\n\nexport default SelectedChapters;\n"],"names":["SelectedChapters","memo","props","formData","onFormDataChange","userType","selectedChaptersList","searchedChaptersList","handleDeleteClick","useCallback","chapterId","filteredSelectedChapters","cId","chapter","jsx","Styled.SelectedChaptersWrapper","jsxs","Fragment","FlexView","Seperator","Text","SelectedChapterItem","Styled.StyledBook2Icon"],"mappings":";;;;;;;AASA,MAAMA,IAA8CC,EAAK,SAA0BC,GAAO;AACxF,QAAM,EAAE,UAAAC,GAAU,kBAAAC,GAAkB,UAAAC,EAAA,IAAaH,GAC3C,EAAE,sBAAAI,IAAuB,IAAI,sBAAAC,IAAuB,OAAOJ,GAE3DK,IAAoBC;AAAA,IACxB,CAACC,MAAsB;AACrB,YAAMC,IAA2BL,EAAqB;AAAA,QACpD,CAAC,EAAE,IAAIM,QAAUA,MAAQF;AAAA,MAAA;AAGV,MAAAN,EAAA;AAAA,QACf,sBAAsBO;AAAA,QACtB,sBAAsBJ,EAAqB;AAAA,UAAI,CAAAM,MAC7CA,EAAQ,OAAOH,IAAY,EAAE,GAAGG,GAAS,OAAO,GAAA,IAAUA;AAAA,QAC5D;AAAA,MAAA,CACD;AAAA,IACH;AAAA,IACA,CAACP,GAAsBF,GAAkBG,CAAoB;AAAA,EAAA;AAI7D,SAAA,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,SAAS;AAAA,MACT,iBAAiBT,EAAqB,SAAS,eAAe;AAAA,MAE7D,UAAAA,EAAqB,SAElB,gBAAAU,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAD,EAACE,KAAS,OAAO,GAAG,UAAU,GAAG,aAAY,WAC3C,UAAA;AAAA,UAAA,gBAAAJ,EAACK,GAAU,EAAA,SAAS,KAAK,YAAW,WAAU;AAAA,UAC7C,gBAAAH,EAAAI,GAAA,EAAK,WAAU,OAAM,QAAO,cAAa,UAAA;AAAA,YAAA;AAAA,YACpBd,EAAqB;AAAA,YAAO;AAAA,UAAA,GAClD;AAAA,QAAA,GACF;AAAA,QAECA,EAAqB,IAAI,CACxBO,MAAA,gBAAAG,EAACC,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAH;AAAA,YAACO;AAAA,YAAA;AAAA,cACC,SAAAR;AAAA,cACA,mBAAAL;AAAA,cACA,UAAAH;AAAA,YAAA;AAAA,UACF;AAAA,UACC,gBAAAS,EAAAK,GAAA,EAAU,QAAQ,GAAG,YAAW,WAAU;AAAA,QAAA,KAN9BN,EAAQ,EAOvB,CACD;AAAA,MACH,EAAA,CAAA,sBAECK,GAAS,EAAA,aAAa,IAAI,aAAY,UAAS,iBAAgB,UAC9D,UAAA;AAAA,QAAC,gBAAAJ,EAAAQ,GAAA,EAAuB,OAAO,IAAI,QAAQ,IAAI,OAAM,cAAa,MAAK,QAAQ,CAAA;AAAA,QAC/E,gBAAAR,EAACM,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,QAAO,cAAa,SAAS,IAAI,UAEvE,6CAAA,CAAA;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
return /* @__PURE__ */ o(
|
|
1
|
+
import { jsx as o, Fragment as n } from "react/jsx-runtime";
|
|
2
|
+
import { memo as t } from "react";
|
|
3
|
+
import m from "../../../../../ui/tag/tag.js";
|
|
4
|
+
const a = t(function({ tags: r }) {
|
|
5
|
+
return !r || r.length === 0 ? null : /* @__PURE__ */ o(n, { children: r.map((e) => /* @__PURE__ */ o(m, { text: e, backgroundColor: "WHITE_1", textColor: "BLACK_T_60" }, e)) });
|
|
6
6
|
});
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
a as default
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=tags-render.js.map
|
package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags-render.js","sources":["../../../../../../../src/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.tsx"],"sourcesContent":["import { type FC, memo } from 'react';\n\nimport Tag from '../../../../../ui/tag/tag';\n\nconst TagsRenderer: FC<{ tags: string[] }> = memo(function TagsRenderer({ tags }) {\n return (\n <>\n {tags.map(tag => (\n <Tag key={tag} text={tag} backgroundColor=\"WHITE_1\" textColor=\"BLACK_T_60\" />\n ))}\n </>\n );\n});\n\nexport default TagsRenderer;\n"],"names":["TagsRenderer","memo","tags","jsx","Fragment","tag","Tag"],"mappings":";;;AAIA,MAAMA,IAAuCC,EAAK,SAAsB,EAAE,MAAAC,KAAQ;AAChF,
|
|
1
|
+
{"version":3,"file":"tags-render.js","sources":["../../../../../../../src/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.tsx"],"sourcesContent":["import { type FC, memo } from 'react';\n\nimport Tag from '../../../../../ui/tag/tag';\n\nconst TagsRenderer: FC<{ tags: string[] }> = memo(function TagsRenderer({ tags }) {\n if (!tags || tags.length === 0) return null;\n\n return (\n <>\n {tags.map(tag => (\n <Tag key={tag} text={tag} backgroundColor=\"WHITE_1\" textColor=\"BLACK_T_60\" />\n ))}\n </>\n );\n});\n\nexport default TagsRenderer;\n"],"names":["TagsRenderer","memo","tags","jsx","Fragment","tag","Tag"],"mappings":";;;AAIA,MAAMA,IAAuCC,EAAK,SAAsB,EAAE,MAAAC,KAAQ;AAChF,SAAI,CAACA,KAAQA,EAAK,WAAW,IAAU,OAIlC,gBAAAC,EAAAC,GAAA,EAAA,UAAAF,EAAK,IAAI,CAAAG,wBACPC,GAAc,EAAA,MAAMD,GAAK,iBAAgB,WAAU,WAAU,gBAApDA,CAAiE,CAC5E,EACH,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { HeaderContainer as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as a, Fragment as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as f, useContext as $, useMemo as g, useCallback as x } from "react";
|
|
3
|
+
import { useTheme as C } from "styled-components";
|
|
4
|
+
import y from "../../../../../assets/line-icons/icons/back2.js";
|
|
5
|
+
import X from "../../../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import b from "../../../../ui/layout/flex-view.js";
|
|
7
|
+
import k from "../../milestone-create-context.js";
|
|
8
|
+
import { HeaderContainer as w, ContentContainer as B, FooterWrapper as F } from "../../milestone-create-styled.js";
|
|
9
|
+
const A = f(function({
|
|
10
10
|
bodyElement: l,
|
|
11
|
-
bodyHeight:
|
|
11
|
+
bodyHeight: s,
|
|
12
12
|
footerElement: r,
|
|
13
|
-
overflowHidden:
|
|
14
|
-
stepName:
|
|
15
|
-
headerElement:
|
|
16
|
-
onBackButtonClick: t
|
|
13
|
+
overflowHidden: c,
|
|
14
|
+
stepName: i,
|
|
15
|
+
headerElement: m,
|
|
16
|
+
onBackButtonClick: t,
|
|
17
|
+
isTrialSession: d
|
|
17
18
|
}) {
|
|
18
19
|
const {
|
|
19
|
-
layout: { gutter:
|
|
20
|
-
} =
|
|
20
|
+
layout: { gutter: n }
|
|
21
|
+
} = C(), { handleBack: o } = $(k), h = g(
|
|
21
22
|
() => ({
|
|
22
|
-
step:
|
|
23
|
+
step: i
|
|
23
24
|
}),
|
|
24
|
-
[
|
|
25
|
-
),
|
|
25
|
+
[i]
|
|
26
|
+
), p = x(() => {
|
|
26
27
|
t ? t(o) : o();
|
|
27
28
|
}, [t, o]);
|
|
28
|
-
return /* @__PURE__ */ a(
|
|
29
|
+
return /* @__PURE__ */ a(u, { children: [
|
|
29
30
|
/* @__PURE__ */ a(
|
|
30
|
-
|
|
31
|
+
w,
|
|
31
32
|
{
|
|
32
33
|
$flexDirection: "row",
|
|
33
34
|
$alignItems: "center",
|
|
@@ -38,23 +39,23 @@ const v = u(function({
|
|
|
38
39
|
$background: "WHITE_3",
|
|
39
40
|
children: [
|
|
40
41
|
/* @__PURE__ */ e(
|
|
41
|
-
|
|
42
|
+
X,
|
|
42
43
|
{
|
|
43
44
|
label: "Back",
|
|
44
|
-
analyticsProps:
|
|
45
|
-
onClick:
|
|
46
|
-
children: /* @__PURE__ */ e(
|
|
45
|
+
analyticsProps: h,
|
|
46
|
+
onClick: p,
|
|
47
|
+
children: /* @__PURE__ */ e(y, { width: n * 1.5, height: n * 1.5 })
|
|
47
48
|
}
|
|
48
49
|
),
|
|
49
|
-
|
|
50
|
+
m
|
|
50
51
|
]
|
|
51
52
|
}
|
|
52
53
|
),
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
r && /* @__PURE__ */ e(
|
|
54
|
+
/* @__PURE__ */ e(B, { $overflowHidden: c, children: /* @__PURE__ */ e(b, { $height: s, children: l }) }),
|
|
55
|
+
r && /* @__PURE__ */ e(F, { $gapX: 1, $gutterX: 1, $isTrialSession: d, children: r })
|
|
55
56
|
] });
|
|
56
57
|
});
|
|
57
58
|
export {
|
|
58
|
-
|
|
59
|
+
A as default
|
|
59
60
|
};
|
|
60
61
|
//# sourceMappingURL=body-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body-layout.js","sources":["../../../../../../src/features/milestone/create/comps/body-layout/body-layout.tsx"],"sourcesContent":["import { memo, useCallback, useContext, useMemo, type ReactElement, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Back2Icon from '../../../../../assets/line-icons/icons/back2';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport MilestoneCreateContext from '../../milestone-create-context';\nimport { ContentContainer, HeaderContainer, FooterWrapper } from '../../milestone-create-styled';\n\ninterface BodyLayoutProps {\n headerElement?: ReactElement; //TODO: Make this mandatory\n bodyElement: ReactElement;\n footerElement?: ReactElement;\n overflowHidden?: boolean;\n onBackButtonClick?: (handleBack: () => void) => void;\n bodyHeight?: string;\n stepName?: string;\n}\n\nconst BodyLayout: FC<BodyLayoutProps> = memo(function BodyLayout({\n bodyElement,\n bodyHeight,\n footerElement,\n overflowHidden,\n stepName,\n headerElement,\n onBackButtonClick,\n}) {\n const {\n layout: { gutter },\n } = useTheme();\n const { handleBack } = useContext(MilestoneCreateContext);\n\n const buttonAnalyticsProps = useMemo(\n () => ({\n step: stepName,\n }),\n [stepName],\n );\n\n const handleBackButtonClick = useCallback(() => {\n if (onBackButtonClick) {\n onBackButtonClick(handleBack);\n } else {\n handleBack();\n }\n }, [onBackButtonClick, handleBack]);\n\n return (\n <>\n <HeaderContainer\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $heightX={3.75}\n $flexGapX={1}\n $gapX={1}\n $gutterX={1}\n $background=\"WHITE_3\"\n >\n <Clickable\n label=\"Back\"\n analyticsProps={buttonAnalyticsProps}\n onClick={handleBackButtonClick}\n >\n <Back2Icon width={gutter * 1.5} height={gutter * 1.5} />\n </Clickable>\n\n {headerElement}\n </HeaderContainer>\n\n <ContentContainer $overflowHidden={overflowHidden}>\n <FlexView $height={bodyHeight}>{bodyElement}</FlexView>\n </ContentContainer>\n\n {footerElement && (\n <FooterWrapper $gapX={1} $gutterX={1}>\n {footerElement}\n </FooterWrapper>\n )}\n </>\n );\n});\n\nexport default BodyLayout;\n"],"names":["BodyLayout","memo","bodyElement","bodyHeight","footerElement","overflowHidden","stepName","headerElement","onBackButtonClick","gutter","useTheme","handleBack","useContext","MilestoneCreateContext","buttonAnalyticsProps","useMemo","handleBackButtonClick","useCallback","jsxs","Fragment","HeaderContainer","jsx","Clickable","Back2Icon","ContentContainer","FlexView","FooterWrapper"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"body-layout.js","sources":["../../../../../../src/features/milestone/create/comps/body-layout/body-layout.tsx"],"sourcesContent":["import { memo, useCallback, useContext, useMemo, type ReactElement, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Back2Icon from '../../../../../assets/line-icons/icons/back2';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport MilestoneCreateContext from '../../milestone-create-context';\nimport { ContentContainer, HeaderContainer, FooterWrapper } from '../../milestone-create-styled';\n\ninterface BodyLayoutProps {\n headerElement?: ReactElement; //TODO: Make this mandatory\n bodyElement: ReactElement;\n footerElement?: ReactElement;\n overflowHidden?: boolean;\n onBackButtonClick?: (handleBack: () => void) => void;\n bodyHeight?: string;\n stepName?: string;\n isTrialSession?: boolean;\n}\n\nconst BodyLayout: FC<BodyLayoutProps> = memo(function BodyLayout({\n bodyElement,\n bodyHeight,\n footerElement,\n overflowHidden,\n stepName,\n headerElement,\n onBackButtonClick,\n isTrialSession,\n}) {\n const {\n layout: { gutter },\n } = useTheme();\n const { handleBack } = useContext(MilestoneCreateContext);\n\n const buttonAnalyticsProps = useMemo(\n () => ({\n step: stepName,\n }),\n [stepName],\n );\n\n const handleBackButtonClick = useCallback(() => {\n if (onBackButtonClick) {\n onBackButtonClick(handleBack);\n } else {\n handleBack();\n }\n }, [onBackButtonClick, handleBack]);\n\n return (\n <>\n <HeaderContainer\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $heightX={3.75}\n $flexGapX={1}\n $gapX={1}\n $gutterX={1}\n $background=\"WHITE_3\"\n >\n <Clickable\n label=\"Back\"\n analyticsProps={buttonAnalyticsProps}\n onClick={handleBackButtonClick}\n >\n <Back2Icon width={gutter * 1.5} height={gutter * 1.5} />\n </Clickable>\n\n {headerElement}\n </HeaderContainer>\n\n <ContentContainer $overflowHidden={overflowHidden}>\n <FlexView $height={bodyHeight}>{bodyElement}</FlexView>\n </ContentContainer>\n\n {footerElement && (\n <FooterWrapper $gapX={1} $gutterX={1} $isTrialSession={isTrialSession}>\n {footerElement}\n </FooterWrapper>\n )}\n </>\n );\n});\n\nexport default BodyLayout;\n"],"names":["BodyLayout","memo","bodyElement","bodyHeight","footerElement","overflowHidden","stepName","headerElement","onBackButtonClick","isTrialSession","gutter","useTheme","handleBack","useContext","MilestoneCreateContext","buttonAnalyticsProps","useMemo","handleBackButtonClick","useCallback","jsxs","Fragment","HeaderContainer","jsx","Clickable","Back2Icon","ContentContainer","FlexView","FooterWrapper"],"mappings":";;;;;;;;AAoBM,MAAAA,IAAkCC,EAAK,SAAoB;AAAA,EAC/D,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,gBAAAC;AACF,GAAG;AACK,QAAA;AAAA,IACJ,QAAQ,EAAE,QAAAC,EAAO;AAAA,MACfC,EAAS,GACP,EAAE,YAAAC,EAAA,IAAeC,EAAWC,CAAsB,GAElDC,IAAuBC;AAAA,IAC3B,OAAO;AAAA,MACL,MAAMV;AAAA,IAAA;AAAA,IAER,CAACA,CAAQ;AAAA,EAAA,GAGLW,IAAwBC,EAAY,MAAM;AAC9C,IAAIV,IACFA,EAAkBI,CAAU,IAEjBA;EACb,GACC,CAACJ,GAAmBI,CAAU,CAAC;AAElC,SAEI,gBAAAO,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,QACX,OAAO;AAAA,QACP,UAAU;AAAA,QACV,aAAY;AAAA,QAEZ,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,OAAM;AAAA,cACN,gBAAgBR;AAAA,cAChB,SAASE;AAAA,cAET,4BAACO,GAAU,EAAA,OAAOd,IAAS,KAAK,QAAQA,IAAS,KAAK;AAAA,YAAA;AAAA,UACxD;AAAA,UAECH;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,IAEA,gBAAAe,EAACG,KAAiB,iBAAiBpB,GACjC,4BAACqB,GAAS,EAAA,SAASvB,GAAa,UAAAD,EAAA,CAAY,EAC9C,CAAA;AAAA,IAECE,uBACEuB,GAAc,EAAA,OAAO,GAAG,UAAU,GAAG,iBAAiBlB,GACpD,UACHL,EAAA,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js
CHANGED
|
@@ -1,57 +1,59 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { memo as K, useContext as Q, useMemo as Y, useCallback as u } from "react";
|
|
3
|
+
import Z from "../../../../../assets/line-icons/icons/bin2.js";
|
|
4
|
+
import ee from "../../../../../assets/line-icons/icons/plus.js";
|
|
5
5
|
import f from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
|
6
|
-
import
|
|
6
|
+
import te from "../../../../ui/buttons/button/button.js";
|
|
7
7
|
import P from "../../../../ui/buttons/icon-button/icon-button.js";
|
|
8
|
-
import { useUIContext as
|
|
8
|
+
import { useUIContext as oe } from "../../../../ui/context/context.js";
|
|
9
9
|
import R from "../../../../ui/layout/flex-view.js";
|
|
10
|
-
import
|
|
11
|
-
import { WARNING_MESSAGES as
|
|
12
|
-
import { GOAL_EDIT_FLOWS as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { BinIconWrapper as
|
|
18
|
-
import { useChapterListUpdate as
|
|
19
|
-
import { computeChangeDetection as
|
|
20
|
-
const
|
|
10
|
+
import re from "../../../../ui/text/text.js";
|
|
11
|
+
import { WARNING_MESSAGES as ne } from "../../../constants.js";
|
|
12
|
+
import { GOAL_EDIT_FLOWS as se } from "../../milestone-create-constants.js";
|
|
13
|
+
import ae from "../../milestone-create-context.js";
|
|
14
|
+
import ie from "../body-layout/body-layout.js";
|
|
15
|
+
import de from "../class-details-step/class-details-step.js";
|
|
16
|
+
import le from "./chapter-selection-step-v2/chapter-selection.js";
|
|
17
|
+
import { BinIconWrapper as ce, ButtonWrapper as G } from "./chapters-selection-step-styled.js";
|
|
18
|
+
import { useChapterListUpdate as me } from "./use-chapter-list-update.js";
|
|
19
|
+
import { computeChangeDetection as pe } from "./utils.js";
|
|
20
|
+
const Ge = K(function(F) {
|
|
21
21
|
const {
|
|
22
22
|
currentStep: g,
|
|
23
23
|
onFormDataChange: s,
|
|
24
24
|
onChapterExitWarning: i,
|
|
25
|
-
formData:
|
|
25
|
+
formData: l,
|
|
26
26
|
studentName: A,
|
|
27
27
|
studentId: I,
|
|
28
28
|
config: m,
|
|
29
29
|
isGoalCreation: a,
|
|
30
|
-
onPreSubmit:
|
|
31
|
-
courseStream:
|
|
32
|
-
classRatio:
|
|
33
|
-
enrollmentType:
|
|
30
|
+
onPreSubmit: c,
|
|
31
|
+
courseStream: S,
|
|
32
|
+
classRatio: _,
|
|
33
|
+
enrollmentType: C,
|
|
34
34
|
canDeleteGoal: L,
|
|
35
|
-
onDeleteGoal:
|
|
36
|
-
isTeacherTrainingAccount: b
|
|
37
|
-
|
|
35
|
+
onDeleteGoal: D,
|
|
36
|
+
isTeacherTrainingAccount: b,
|
|
37
|
+
userType: X,
|
|
38
|
+
isTrialSession: y
|
|
39
|
+
} = F, { flow: o } = Q(ae), { onEvent: E } = oe(), {
|
|
38
40
|
action_plan: {
|
|
39
|
-
green: { share_message_template:
|
|
41
|
+
green: { share_message_template: T }
|
|
40
42
|
}
|
|
41
|
-
} = m, { buttonLabel: z, name: x, title:
|
|
43
|
+
} = m, { buttonLabel: z, name: x, title: O } = g, j = {
|
|
42
44
|
step: x
|
|
43
|
-
}, { testType:
|
|
44
|
-
formData:
|
|
45
|
+
}, { testType: v, primaryChaptersList: e, board: w, major: B, region: $, chapterGoalCategory: M } = l, { primaryGoalCategory: r } = M || {}, W = !!(a && (L && (o === "DRAFT_EDIT" || o === "EDIT")) && D), { isProcessing: p, isProcessed: H } = me({
|
|
46
|
+
formData: l,
|
|
45
47
|
onFormDataChange: s,
|
|
46
48
|
studentId: I
|
|
47
|
-
}),
|
|
49
|
+
}), k = Y(() => e ? e.some((n) => n.added) : !1, [e]), U = u(() => {
|
|
48
50
|
const n = e == null ? void 0 : e.filter((d) => !!d.added), h = (e == null ? void 0 : e.filter(
|
|
49
51
|
(d) => d.program_id !== (r == null ? void 0 : r.program_code) && d.added
|
|
50
|
-
).length) ?? 0,
|
|
51
|
-
|
|
52
|
+
).length) ?? 0, J = (e == null ? void 0 : e.filter((d) => d.program_id === (r == null ? void 0 : r.program_id)).length) ?? 0;
|
|
53
|
+
E("CHAPTER_DETAILS_ADDED", {
|
|
52
54
|
total_chapter_added: (n == null ? void 0 : n.length) ?? 0,
|
|
53
55
|
searched_chapter_added: h,
|
|
54
|
-
suggested_chapter_added:
|
|
56
|
+
suggested_chapter_added: J
|
|
55
57
|
}), a ? s({
|
|
56
58
|
primaryChaptersList: e,
|
|
57
59
|
selectedChaptersList: n,
|
|
@@ -61,24 +63,24 @@ const Pe = V(function(N) {
|
|
|
61
63
|
selectedChaptersList: !0,
|
|
62
64
|
chapterSubStages: !0,
|
|
63
65
|
grade: !0,
|
|
64
|
-
board: !!
|
|
65
|
-
major: !!
|
|
66
|
-
region:
|
|
66
|
+
board: !!w,
|
|
67
|
+
major: !!B,
|
|
68
|
+
region: !!$
|
|
67
69
|
}
|
|
68
|
-
}) : o && (
|
|
70
|
+
}) : o && (c == null || c({ isDraftPlan: !1, flow: o, submitBaseMessage: T }));
|
|
69
71
|
}, [
|
|
70
72
|
e,
|
|
71
|
-
T,
|
|
72
73
|
w,
|
|
73
74
|
B,
|
|
74
|
-
|
|
75
|
+
$,
|
|
76
|
+
E,
|
|
75
77
|
s,
|
|
76
|
-
|
|
78
|
+
c,
|
|
77
79
|
o,
|
|
78
80
|
a,
|
|
79
|
-
|
|
81
|
+
T,
|
|
80
82
|
r
|
|
81
|
-
]),
|
|
83
|
+
]), q = u(() => {
|
|
82
84
|
s({
|
|
83
85
|
chapterSubStages: "custom-chapters",
|
|
84
86
|
selectedChaptersList: void 0,
|
|
@@ -87,40 +89,41 @@ const Pe = V(function(N) {
|
|
|
87
89
|
selectedChaptersList: !1
|
|
88
90
|
}
|
|
89
91
|
});
|
|
90
|
-
}, [s]),
|
|
92
|
+
}, [s]), V = u(
|
|
91
93
|
(n) => {
|
|
92
94
|
if (!o) return null;
|
|
93
|
-
const h =
|
|
94
|
-
|
|
95
|
+
const h = pe(e, r);
|
|
96
|
+
se.includes(o) || !(e != null && e.length) || !h ? n() : i == null || i({
|
|
95
97
|
onSuccess: n,
|
|
96
|
-
description:
|
|
98
|
+
description: ne.CHAPTER_EXIT_WARNING
|
|
97
99
|
});
|
|
98
100
|
},
|
|
99
101
|
[i, o, e, r]
|
|
100
102
|
);
|
|
101
103
|
return /* @__PURE__ */ t(
|
|
102
|
-
|
|
104
|
+
ie,
|
|
103
105
|
{
|
|
104
106
|
stepName: x,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
isTrialSession: y,
|
|
108
|
+
headerElement: /* @__PURE__ */ N(R, { $flexDirection: "row", $alignItems: "center", $flexGapX: 1, $width: "100%", children: [
|
|
109
|
+
/* @__PURE__ */ t(re, { $renderAs: "ab2", children: a ? O : "Chapters" }),
|
|
107
110
|
a && o === "CREATE" && /* @__PURE__ */ t(
|
|
108
|
-
|
|
111
|
+
de,
|
|
109
112
|
{
|
|
110
113
|
studentName: A,
|
|
111
114
|
studentId: I,
|
|
112
115
|
currentStep: g,
|
|
113
116
|
config: m,
|
|
114
|
-
formData:
|
|
115
|
-
courseStream:
|
|
116
|
-
classRatio:
|
|
117
|
+
formData: l,
|
|
118
|
+
courseStream: S,
|
|
119
|
+
classRatio: _,
|
|
117
120
|
onFormDataChange: s,
|
|
118
121
|
onChapterExitWarning: i,
|
|
119
|
-
enrollmentType:
|
|
122
|
+
enrollmentType: C,
|
|
120
123
|
isTeacherTrainingAccount: b
|
|
121
124
|
}
|
|
122
125
|
),
|
|
123
|
-
|
|
126
|
+
W && /* @__PURE__ */ t(ce, { children: /* @__PURE__ */ t(
|
|
124
127
|
f,
|
|
125
128
|
{
|
|
126
129
|
renderAs: "primary",
|
|
@@ -133,35 +136,35 @@ const Pe = V(function(N) {
|
|
|
133
136
|
{
|
|
134
137
|
size: "xsmall",
|
|
135
138
|
renderAs: "tertiary",
|
|
136
|
-
Icon:
|
|
139
|
+
Icon: Z,
|
|
137
140
|
analyticsLabel: "delete_goal_plan",
|
|
138
|
-
onClick:
|
|
141
|
+
onClick: D
|
|
139
142
|
}
|
|
140
143
|
)
|
|
141
144
|
}
|
|
142
145
|
) })
|
|
143
146
|
] }),
|
|
144
147
|
bodyHeight: "100%",
|
|
145
|
-
onBackButtonClick:
|
|
148
|
+
onBackButtonClick: V,
|
|
146
149
|
bodyElement: /* @__PURE__ */ t(
|
|
147
|
-
|
|
150
|
+
le,
|
|
148
151
|
{
|
|
149
152
|
config: m,
|
|
150
|
-
classRatio:
|
|
153
|
+
classRatio: _,
|
|
151
154
|
isGoalCreation: a,
|
|
152
|
-
formData:
|
|
155
|
+
formData: l,
|
|
153
156
|
studentName: A,
|
|
154
|
-
isProcessed:
|
|
157
|
+
isProcessed: H,
|
|
155
158
|
isProcessing: p,
|
|
156
|
-
courseStream:
|
|
159
|
+
courseStream: S,
|
|
157
160
|
onFormDataChange: s,
|
|
158
161
|
onChapterExitWarning: i,
|
|
159
|
-
enrollmentType:
|
|
162
|
+
enrollmentType: C,
|
|
160
163
|
isTeacherTrainingAccount: b
|
|
161
164
|
}
|
|
162
165
|
),
|
|
163
|
-
footerElement: /* @__PURE__ */
|
|
164
|
-
(!a ||
|
|
166
|
+
footerElement: X === "STUDENT" ? void 0 : /* @__PURE__ */ N(R, { $flexDirection: "row", $flexGap: 12, $alignItems: "center", children: [
|
|
167
|
+
(!a || v === "no-test") && /* @__PURE__ */ t(
|
|
165
168
|
f,
|
|
166
169
|
{
|
|
167
170
|
renderAs: "primary",
|
|
@@ -174,9 +177,9 @@ const Pe = V(function(N) {
|
|
|
174
177
|
{
|
|
175
178
|
renderAs: "secondary",
|
|
176
179
|
analyticsLabel: "Add custom chapters",
|
|
177
|
-
Icon:
|
|
180
|
+
Icon: ee,
|
|
178
181
|
disabled: p,
|
|
179
|
-
onClick:
|
|
182
|
+
onClick: q
|
|
180
183
|
}
|
|
181
184
|
) })
|
|
182
185
|
}
|
|
@@ -189,20 +192,20 @@ const Pe = V(function(N) {
|
|
|
189
192
|
widthX: 11,
|
|
190
193
|
zIndex: 20,
|
|
191
194
|
tooltipItem: "Please select atleast one chapter",
|
|
192
|
-
hidden:
|
|
195
|
+
hidden: k,
|
|
193
196
|
children: /* @__PURE__ */ t(G, { children: /* @__PURE__ */ t(
|
|
194
|
-
|
|
197
|
+
te,
|
|
195
198
|
{
|
|
196
199
|
renderAs: "primary",
|
|
197
200
|
size: "small",
|
|
198
201
|
shape: "square",
|
|
199
202
|
widthX: 9,
|
|
200
203
|
label: z,
|
|
201
|
-
onClick:
|
|
204
|
+
onClick: U,
|
|
202
205
|
iconPosition: "right",
|
|
203
206
|
busy: p,
|
|
204
|
-
disabled:
|
|
205
|
-
analyticsProps:
|
|
207
|
+
disabled: !k,
|
|
208
|
+
analyticsProps: j
|
|
206
209
|
}
|
|
207
210
|
) })
|
|
208
211
|
}
|
|
@@ -212,6 +215,6 @@ const Pe = V(function(N) {
|
|
|
212
215
|
);
|
|
213
216
|
});
|
|
214
217
|
export {
|
|
215
|
-
|
|
218
|
+
Ge as default
|
|
216
219
|
};
|
|
217
220
|
//# sourceMappingURL=chapters-selection-step.js.map
|