@cuemath/leap 2.8.33 → 2.8.34-beta.0
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/assets/line-icons/icons/sheet.js +54 -0
- package/dist/assets/line-icons/icons/sheet.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js +174 -0
- package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js +10 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +9 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js +9 -0
- package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js +20 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js +47 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js +22 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js +59 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js +6 -0
- package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js +22 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js +17 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js +95 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js +62 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +186 -0
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -0
- package/dist/features/milestone/milestone-resources/resources-assign/utils.js +8 -0
- package/dist/features/milestone/milestone-resources/resources-assign/utils.js.map +1 -0
- 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/inputs/searchable-input/searchable-input-styled.js +28 -0
- package/dist/features/ui/inputs/searchable-input/searchable-input-styled.js.map +1 -0
- package/dist/features/ui/inputs/searchable-input/searchable-input.js +100 -0
- package/dist/features/ui/inputs/searchable-input/searchable-input.js.map +1 -0
- package/dist/features/ui/tab/tab-styled.js +7 -8
- package/dist/features/ui/tab/tab-styled.js.map +1 -1
- package/dist/features/ui/tab/tab.js +36 -31
- 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/index.d.ts +36 -1
- package/dist/index.js +348 -344
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
@@ -0,0 +1,54 @@
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
2
|
+
const d = (l) => /* @__PURE__ */ o(
|
3
|
+
"svg",
|
4
|
+
{
|
5
|
+
width: "56",
|
6
|
+
height: "56",
|
7
|
+
viewBox: "0 0 56 56",
|
8
|
+
fill: "none",
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
10
|
+
...l,
|
11
|
+
children: [
|
12
|
+
/* @__PURE__ */ e(
|
13
|
+
"path",
|
14
|
+
{
|
15
|
+
fillRule: "evenodd",
|
16
|
+
clipRule: "evenodd",
|
17
|
+
d: "M12.6006 9.10059H31.5099L43.4006 21.3667V46.9006H12.6006V9.10059ZM15.4006 11.9006V44.1006H40.6006V23.3339H29.5173V11.9006H15.4006ZM32.3173 13.9562L38.6936 20.5339H32.3173V13.9562Z",
|
18
|
+
fill: "currentColor"
|
19
|
+
}
|
20
|
+
),
|
21
|
+
/* @__PURE__ */ e(
|
22
|
+
"path",
|
23
|
+
{
|
24
|
+
fillRule: "evenodd",
|
25
|
+
clipRule: "evenodd",
|
26
|
+
d: "M20.7673 28.1172H35.2339V30.9172H20.7673V28.1172Z",
|
27
|
+
fill: "currentColor"
|
28
|
+
}
|
29
|
+
),
|
30
|
+
/* @__PURE__ */ e(
|
31
|
+
"path",
|
32
|
+
{
|
33
|
+
fillRule: "evenodd",
|
34
|
+
clipRule: "evenodd",
|
35
|
+
d: "M20.7673 34.1839H35.2339V36.9839H20.7673V34.1839Z",
|
36
|
+
fill: "currentColor"
|
37
|
+
}
|
38
|
+
),
|
39
|
+
/* @__PURE__ */ e(
|
40
|
+
"path",
|
41
|
+
{
|
42
|
+
fillRule: "evenodd",
|
43
|
+
clipRule: "evenodd",
|
44
|
+
d: "M20.7673 22.0506H26.4839V24.8506H20.7673V22.0506Z",
|
45
|
+
fill: "currentColor"
|
46
|
+
}
|
47
|
+
)
|
48
|
+
]
|
49
|
+
}
|
50
|
+
), t = d;
|
51
|
+
export {
|
52
|
+
t as default
|
53
|
+
};
|
54
|
+
//# sourceMappingURL=sheet.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sheet.js","sources":["../../../../src/assets/line-icons/icons/sheet.tsx"],"sourcesContent":["const SheetIcon: React.FC<React.SVGProps<SVGSVGElement>> = props => (\n <svg\n width=\"56\"\n height=\"56\"\n viewBox=\"0 0 56 56\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.6006 9.10059H31.5099L43.4006 21.3667V46.9006H12.6006V9.10059ZM15.4006 11.9006V44.1006H40.6006V23.3339H29.5173V11.9006H15.4006ZM32.3173 13.9562L38.6936 20.5339H32.3173V13.9562Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M20.7673 28.1172H35.2339V30.9172H20.7673V28.1172Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M20.7673 34.1839H35.2339V36.9839H20.7673V34.1839Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M20.7673 22.0506H26.4839V24.8506H20.7673V22.0506Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default SheetIcon;\n"],"names":["SheetIcon","props","jsxs","jsx","SheetIcon$1"],"mappings":";AAAA,MAAMA,IAAqD,CACzDC,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IACL,GAAGD;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,IAAA;AAAA,EAAA;AACF,GAGFC,IAAeJ;"}
|
package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
import { jsxs as o, Fragment as m, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { memo as W, useRef as $, useState as j, useEffect as w, Fragment as G } from "react";
|
3
|
+
import N from "../../../../assets/line-icons/icons/sheet.js";
|
4
|
+
import g from "../../../ui/layout/flex-view.js";
|
5
|
+
import O from "../../../ui/separator/separator.js";
|
6
|
+
import f from "../../../ui/text/text.js";
|
7
|
+
import V from "./comps/filter-item/filter-item.js";
|
8
|
+
import D from "./comps/resource-item/resource-item.js";
|
9
|
+
import { HeaderWrapper as P, FilterTabWrapper as H, ResourceCountWrapper as K, FilterListWrapper as M } from "./resources-assign-styled.js";
|
10
|
+
const U = [
|
11
|
+
{
|
12
|
+
id: "resource-filters",
|
13
|
+
label: "Filters"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
id: "resource-added",
|
17
|
+
label: "Added"
|
18
|
+
}
|
19
|
+
], J = {
|
20
|
+
LEARNING: "Learning",
|
21
|
+
PRACTICE: "Practice",
|
22
|
+
ASSESSMENT: "Assessment",
|
23
|
+
LEVEL2: "Advanced",
|
24
|
+
LEVEL3: "Advanced",
|
25
|
+
SUBJECTIVE: "Subjective"
|
26
|
+
}, oe = W((_) => {
|
27
|
+
var R, L, I;
|
28
|
+
const {
|
29
|
+
boards: i,
|
30
|
+
grades: c,
|
31
|
+
nodeTypes: l,
|
32
|
+
selectedResources: b,
|
33
|
+
onResourceDeSelection: v,
|
34
|
+
onFilterUpdate: d,
|
35
|
+
onViewResource: S
|
36
|
+
} = _, a = $(i), s = $(c), u = $(l), [C, x] = j("resource-filters"), p = b.length, A = (R = a.current.find((e) => e.applied)) == null ? void 0 : R.name, T = (L = s.current.find((e) => e.applied)) == null ? void 0 : L.name, E = (I = u.current.find((e) => e.applied)) == null ? void 0 : I.name, F = (e) => {
|
37
|
+
d({ board: A === e ? "" : e });
|
38
|
+
}, k = (e) => {
|
39
|
+
d({ grade: T === e ? "" : e });
|
40
|
+
}, y = (e) => {
|
41
|
+
d({ node_type: E === e ? "" : e });
|
42
|
+
};
|
43
|
+
w(() => {
|
44
|
+
a.current = i, s.current = c, u.current = l;
|
45
|
+
}, [i, c, l]);
|
46
|
+
const X = [
|
47
|
+
{
|
48
|
+
title: "Curriculum",
|
49
|
+
options: a.current.map(({ code: e, name: r }) => ({
|
50
|
+
id: e,
|
51
|
+
label: r,
|
52
|
+
value: r
|
53
|
+
})),
|
54
|
+
value: A,
|
55
|
+
onClick: F
|
56
|
+
},
|
57
|
+
{
|
58
|
+
title: "Grade",
|
59
|
+
options: s.current.map(({ code: e, name: r }) => ({
|
60
|
+
id: e,
|
61
|
+
label: e,
|
62
|
+
value: r
|
63
|
+
})),
|
64
|
+
value: T,
|
65
|
+
onClick: k
|
66
|
+
},
|
67
|
+
{
|
68
|
+
title: "Type",
|
69
|
+
options: u.current.map(({ code: e, name: r }) => ({
|
70
|
+
id: e,
|
71
|
+
label: J[r] || "",
|
72
|
+
value: r || ""
|
73
|
+
})),
|
74
|
+
value: E,
|
75
|
+
onClick: y
|
76
|
+
}
|
77
|
+
];
|
78
|
+
return /* @__PURE__ */ o(m, { children: [
|
79
|
+
/* @__PURE__ */ t(
|
80
|
+
P,
|
81
|
+
{
|
82
|
+
$heightX: 4,
|
83
|
+
$background: "WHITE_3",
|
84
|
+
$flexDirection: "row",
|
85
|
+
$alignItems: "end",
|
86
|
+
$noBorder: !0,
|
87
|
+
children: U.map((e) => {
|
88
|
+
const { id: r, label: h } = e, n = r === C;
|
89
|
+
return /* @__PURE__ */ o(
|
90
|
+
H,
|
91
|
+
{
|
92
|
+
$flexDirection: "row",
|
93
|
+
$width: "100%",
|
94
|
+
$alignItems: "center",
|
95
|
+
$justifyContent: "center",
|
96
|
+
$gapX: 0.5,
|
97
|
+
$selected: n,
|
98
|
+
onClick: () => x(r),
|
99
|
+
$flexGap: 4,
|
100
|
+
$heightX: 2.5,
|
101
|
+
children: [
|
102
|
+
/* @__PURE__ */ t(
|
103
|
+
f,
|
104
|
+
{
|
105
|
+
$renderAs: n ? "ub3-bold" : "ub3",
|
106
|
+
$align: "center",
|
107
|
+
$color: n ? "BLACK_T_87" : "BLACK_T_38",
|
108
|
+
children: h
|
109
|
+
}
|
110
|
+
),
|
111
|
+
p > 0 && r === "resource-added" && /* @__PURE__ */ t(
|
112
|
+
K,
|
113
|
+
{
|
114
|
+
$borderRadius: 50,
|
115
|
+
$background: "YELLOW_4",
|
116
|
+
$gutter: 4,
|
117
|
+
$justifyContent: "center",
|
118
|
+
$alignItems: "center",
|
119
|
+
$heightX: 1.25,
|
120
|
+
children: /* @__PURE__ */ t(f, { $renderAs: "ac4-black", children: p })
|
121
|
+
}
|
122
|
+
)
|
123
|
+
]
|
124
|
+
},
|
125
|
+
r
|
126
|
+
);
|
127
|
+
})
|
128
|
+
}
|
129
|
+
),
|
130
|
+
/* @__PURE__ */ t(M, { $height: "calc(100vh - 64px - 16px)", children: C === "resource-filters" ? /* @__PURE__ */ t(m, { children: X.map((e) => {
|
131
|
+
const { title: r, value: h, options: n, onClick: B } = e;
|
132
|
+
return /* @__PURE__ */ o(G, { children: [
|
133
|
+
/* @__PURE__ */ t(
|
134
|
+
V,
|
135
|
+
{
|
136
|
+
title: r,
|
137
|
+
value: h ?? "",
|
138
|
+
options: n,
|
139
|
+
onClick: B
|
140
|
+
}
|
141
|
+
),
|
142
|
+
/* @__PURE__ */ t(O, { height: 1, background: "WHITE_5" })
|
143
|
+
] }, r);
|
144
|
+
}) }) : /* @__PURE__ */ o(m, { children: [
|
145
|
+
b.map((e) => /* @__PURE__ */ t(g, { $gapX: 1, $gutterX: 1, children: /* @__PURE__ */ t(
|
146
|
+
D,
|
147
|
+
{
|
148
|
+
resource: e,
|
149
|
+
onViewResource: S,
|
150
|
+
onResourceAdditionOrDeletion: v,
|
151
|
+
selected: !0
|
152
|
+
}
|
153
|
+
) }, e.id)),
|
154
|
+
p === 0 && /* @__PURE__ */ o(
|
155
|
+
g,
|
156
|
+
{
|
157
|
+
$alignItems: "center",
|
158
|
+
$justifyContent: "center",
|
159
|
+
$gapX: 2,
|
160
|
+
$height: "100%",
|
161
|
+
$flexGap: 8,
|
162
|
+
children: [
|
163
|
+
/* @__PURE__ */ t(N, { opacity: 0.38 }),
|
164
|
+
/* @__PURE__ */ t(g, { $widthX: 15, children: /* @__PURE__ */ t(f, { $renderAs: "ub1-bold", $color: "BLACK_T_38", $align: "center", children: "No sheets added" }) })
|
165
|
+
]
|
166
|
+
}
|
167
|
+
)
|
168
|
+
] }) })
|
169
|
+
] });
|
170
|
+
});
|
171
|
+
export {
|
172
|
+
oe as default
|
173
|
+
};
|
174
|
+
//# sourceMappingURL=added-resource-and-filters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"added-resource-and-filters.js","sources":["../../../../../src/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.tsx"],"sourcesContent":["import type { IAddedResourceAndFilters } from './resources-assign-type';\nimport type { FC } from 'react';\n\nimport { Fragment, memo, useEffect, useRef, useState } from 'react';\n\nimport SheetIcon from '../../../../assets/line-icons/icons/sheet';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport FilterItem from './comps/filter-item/filter-item';\nimport ResourceItem from './comps/resource-item/resource-item';\nimport * as Styled from './resources-assign-styled';\n\nconst TABS = [\n {\n id: 'resource-filters',\n label: 'Filters',\n },\n {\n id: 'resource-added',\n label: 'Added',\n },\n];\n\nconst EXTRA_PRACTICE_LABEL_MAP: Record<string, string> = {\n LEARNING: 'Learning',\n PRACTICE: 'Practice',\n ASSESSMENT: 'Assessment',\n LEVEL2: 'Advanced',\n LEVEL3: 'Advanced',\n SUBJECTIVE: 'Subjective',\n};\n\nconst AddedResourceAndFilters: FC<IAddedResourceAndFilters> = memo(props => {\n const {\n boards,\n grades,\n nodeTypes,\n selectedResources,\n onResourceDeSelection,\n onFilterUpdate,\n onViewResource,\n } = props;\n\n const boardsRef = useRef(boards);\n const gradesRef = useRef(grades);\n const nodeTypesRef = useRef(nodeTypes);\n\n const [selectedTab, setSelectedTab] = useState('resource-filters');\n\n const addedResourceCount = selectedResources.length;\n const appliedBoard = boardsRef.current.find(board => board.applied)?.name;\n const appliedGrade = gradesRef.current.find(grade => grade.applied)?.name;\n const appliedNodeType = nodeTypesRef.current.find(grade => grade.applied)?.name;\n\n const handleOnBoardChange = (updatedBoard: string) => {\n onFilterUpdate({ board: appliedBoard === updatedBoard ? '' : updatedBoard });\n };\n\n const handleOnGradeChange = (updatedGrade: string) => {\n onFilterUpdate({ grade: appliedGrade === updatedGrade ? '' : updatedGrade });\n };\n\n const handleOnNodeTypeChange = (updatedNodeType: string) => {\n onFilterUpdate({ node_type: appliedNodeType === updatedNodeType ? '' : updatedNodeType });\n };\n\n useEffect(() => {\n boardsRef.current = boards;\n gradesRef.current = grades;\n nodeTypesRef.current = nodeTypes;\n }, [boards, grades, nodeTypes]);\n\n const filterItemList = [\n {\n title: 'Curriculum',\n options: boardsRef.current.map(({ code, name }) => ({\n id: code,\n label: name,\n value: name,\n })),\n value: appliedBoard,\n onClick: handleOnBoardChange,\n },\n {\n title: 'Grade',\n options: gradesRef.current.map(({ code, name }) => ({\n id: code,\n label: code,\n value: name,\n })),\n value: appliedGrade,\n onClick: handleOnGradeChange,\n },\n {\n title: 'Type',\n options: nodeTypesRef.current.map(({ code, name }) => ({\n id: code,\n label: EXTRA_PRACTICE_LABEL_MAP[name] || '',\n value: name || '',\n })),\n value: appliedNodeType,\n onClick: handleOnNodeTypeChange,\n },\n ];\n\n return (\n <>\n <Styled.HeaderWrapper\n $heightX={4}\n $background=\"WHITE_3\"\n $flexDirection=\"row\"\n $alignItems=\"end\"\n $noBorder\n >\n {TABS.map(tab => {\n const { id, label } = tab;\n const selected = id === selectedTab;\n\n return (\n <Styled.FilterTabWrapper\n key={id}\n $flexDirection=\"row\"\n $width=\"100%\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $gapX={0.5}\n $selected={selected}\n onClick={() => setSelectedTab(id)}\n $flexGap={4}\n $heightX={2.5}\n >\n <Text\n $renderAs={selected ? 'ub3-bold' : 'ub3'}\n $align=\"center\"\n $color={selected ? 'BLACK_T_87' : 'BLACK_T_38'}\n >\n {label}\n </Text>\n {addedResourceCount > 0 && id === 'resource-added' && (\n <Styled.ResourceCountWrapper\n $borderRadius={50}\n $background=\"YELLOW_4\"\n $gutter={4}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $heightX={1.25}\n >\n <Text $renderAs=\"ac4-black\">{addedResourceCount}</Text>\n </Styled.ResourceCountWrapper>\n )}\n </Styled.FilterTabWrapper>\n );\n })}\n </Styled.HeaderWrapper>\n\n <Styled.FilterListWrapper $height=\"calc(100vh - 64px - 16px)\">\n {selectedTab === 'resource-filters' ? (\n <>\n {filterItemList.map(item => {\n const { title, value, options, onClick } = item;\n\n return (\n <Fragment key={title}>\n <FilterItem\n title={title}\n value={value ?? ''}\n options={options}\n onClick={onClick}\n />\n\n <Separator height={1} background=\"WHITE_5\" />\n </Fragment>\n );\n })}\n </>\n ) : (\n <>\n {selectedResources.map(item => (\n <FlexView $gapX={1} $gutterX={1} key={item.id}>\n <ResourceItem\n resource={item}\n onViewResource={onViewResource}\n onResourceAdditionOrDeletion={onResourceDeSelection}\n selected={true}\n />\n </FlexView>\n ))}\n\n {addedResourceCount === 0 && (\n <FlexView\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $gapX={2}\n $height=\"100%\"\n $flexGap={8}\n >\n <SheetIcon opacity={0.38} />\n <FlexView $widthX={15}>\n <Text $renderAs=\"ub1-bold\" $color=\"BLACK_T_38\" $align=\"center\">\n No sheets added\n </Text>\n </FlexView>\n </FlexView>\n )}\n </>\n )}\n </Styled.FilterListWrapper>\n </>\n );\n});\n\nexport default AddedResourceAndFilters;\n"],"names":["TABS","EXTRA_PRACTICE_LABEL_MAP","AddedResourceAndFilters","memo","props","boards","grades","nodeTypes","selectedResources","onResourceDeSelection","onFilterUpdate","onViewResource","boardsRef","useRef","gradesRef","nodeTypesRef","selectedTab","setSelectedTab","useState","addedResourceCount","appliedBoard","_a","board","appliedGrade","_b","grade","appliedNodeType","_c","handleOnBoardChange","updatedBoard","handleOnGradeChange","updatedGrade","handleOnNodeTypeChange","updatedNodeType","useEffect","filterItemList","code","name","jsxs","Fragment","jsx","Styled.HeaderWrapper","tab","id","label","selected","Styled.FilterTabWrapper","Text","Styled.ResourceCountWrapper","Styled.FilterListWrapper","item","title","value","options","onClick","FilterItem","Separator","FlexView","ResourceItem","SheetIcon"],"mappings":";;;;;;;;;AAaA,MAAMA,IAAO;AAAA,EACX;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AACF,GAEMC,IAAmD;AAAA,EACvD,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,YAAY;AACd,GAEMC,KAAwDC,EAAK,CAASC,MAAA;;AACpE,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,EACE,IAAAP,GAEEQ,IAAYC,EAAOR,CAAM,GACzBS,IAAYD,EAAOP,CAAM,GACzBS,IAAeF,EAAON,CAAS,GAE/B,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AAM,CAAA;AAAA,YACzB,gBAAAnB,EAAAiB,GAAA,EAAS,SAAS,IACjB,UAAC,gBAAAjB,EAAAO,GAAA,EAAK,WAAU,YAAW,QAAO,cAAa,QAAO,UAAS,4BAE/D,CAAA,GACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,EAAA,CAEJ,EAEJ,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { createGetAPI as e } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V3 as t } from "../../../../../constants/api.js";
|
3
|
+
import { stringify as o } from "../../../../../helpers/query-string.js";
|
4
|
+
const { useGet: i } = e({
|
5
|
+
getURL: (c, r) => `${t}/curriculum/extra-resources/?${o(r)}`
|
6
|
+
});
|
7
|
+
export {
|
8
|
+
i as useGetSearchResource
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=get-resource.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-resource.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/api/get-resource.ts"],"sourcesContent":["import type { TCourseStream } from '../../../create/milestone-create-types';\nimport type { IResourceData } from '../resources-assign-type';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../../constants/api';\nimport { stringify } from '../../../../../helpers/query-string';\n\ninterface IExtraPracticeQuery {\n board?: string;\n grade?: string;\n stream: TCourseStream;\n search_term?: string;\n node_type?: string;\n page?: number;\n per_page?: number;\n user_milestone_id?: string;\n program_id?: string;\n}\n\nconst { useGet: useGetSearchResource } = createGetAPI<IResourceData, IExtraPracticeQuery>({\n getURL: (_, query) => `${BASE_URL_V3}/curriculum/extra-resources/?${stringify(query)}`,\n});\n\nexport { useGetSearchResource, type IExtraPracticeQuery };\n"],"names":["useGetSearchResource","createGetAPI","_","query","BASE_URL_V3","stringify"],"mappings":";;;AAoBA,MAAM,EAAE,QAAQA,EAAqB,IAAIC,EAAiD;AAAA,EACxF,QAAQ,CAACC,GAAGC,MAAU,GAAGC,CAAW,gCAAgCC,EAAUF,CAAK,CAAC;AACtF,CAAC;"}
|
package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
import { createPostAPI as o } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V3 as s } from "../../../../../constants/api.js";
|
3
|
+
const { usePost: u } = o({
|
4
|
+
getURL: (t, { userMilestoneId: e }) => `${s}/user-milestone/${e}/resources`
|
5
|
+
});
|
6
|
+
export {
|
7
|
+
u as usePostMilestoneResource
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=goal-resource-assign.js.map
|
package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"goal-resource-assign.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.ts"],"sourcesContent":["import { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../../constants/api';\n\nconst { usePost: usePostMilestoneResource } = createPostAPI<\n void,\n {\n node_ids: string[];\n },\n { userMilestoneId: string }\n>({\n getURL: (_, { userMilestoneId }) => `${BASE_URL_V3}/user-milestone/${userMilestoneId}/resources`,\n});\n\nexport { usePostMilestoneResource };\n"],"names":["usePostMilestoneResource","createPostAPI","_","userMilestoneId","BASE_URL_V3"],"mappings":";;AAIA,MAAM,EAAE,SAASA,EAAyB,IAAIC,EAM5C;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,iBAAAC,EAAsB,MAAA,GAAGC,CAAW,mBAAmBD,CAAe;AACtF,CAAC;"}
|
package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
import { createPostAPI as e } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V2 as s } from "../../../../../constants/api.js";
|
3
|
+
const { usePost: P } = e({
|
4
|
+
getURL: (o, { studentId: t }) => `${s}/students/${t}/practice-sheets/`
|
5
|
+
});
|
6
|
+
export {
|
7
|
+
P as usePostLPARResource
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=lpar-resource-assign.js.map
|
package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"lpar-resource-assign.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.ts"],"sourcesContent":["import { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V2 } from '../../../../../constants/api';\n\nconst { usePost: usePostLPARResource } = createPostAPI<\n void,\n {\n program_id: string;\n nodes: { id: string; attempt_location: string }[];\n },\n { studentId: string }\n>({\n getURL: (_, { studentId }) => `${BASE_URL_V2}/students/${studentId}/practice-sheets/`,\n});\n\nexport { usePostLPARResource };\n"],"names":["usePostLPARResource","createPostAPI","_","studentId","BASE_URL_V2"],"mappings":";;AAIA,MAAM,EAAE,SAASA,EAAoB,IAAIC,EAOvC;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,EAAgB,MAAA,GAAGC,CAAW,aAAaD,CAAS;AACpE,CAAC;"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import r from "styled-components";
|
2
|
+
import n from "../../../../../../assets/line-icons/icons/chevron-down.js";
|
3
|
+
import i from "../../../../../ui/layout/flex-view.js";
|
4
|
+
const a = r(i)`
|
5
|
+
cursor: pointer;
|
6
|
+
`, c = r(n)(({ $active: t, theme: e }) => {
|
7
|
+
const { gutter: o } = e.layout;
|
8
|
+
return `
|
9
|
+
width: ${o}px;
|
10
|
+
height: ${o}px;
|
11
|
+
opacity: ${t ? 1 : 0.38};
|
12
|
+
transform: rotate(${t ? 180 : 0}deg);
|
13
|
+
transition: transform 0.3s ease-out;
|
14
|
+
`;
|
15
|
+
});
|
16
|
+
export {
|
17
|
+
a as FilterItemHeader,
|
18
|
+
c as StyledChevronIcon
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=filter-item-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"filter-item-styled.js","sources":["../../../../../../../src/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ChevronDownIcon from '../../../../../../assets/line-icons/icons/chevron-down';\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nconst FilterItemHeader = styled(FlexView)`\n cursor: pointer;\n`;\n\ninterface IChevronIcon {\n $active: boolean;\n}\n\nconst StyledChevronIcon = styled(ChevronDownIcon)<IChevronIcon>(({ $active, theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: ${gutter}px;\n height: ${gutter}px;\n opacity: ${$active ? 1 : 0.38};\n transform: rotate(${$active ? 180 : 0}deg);\n transition: transform 0.3s ease-out;\n `;\n});\n\nexport { FilterItemHeader, StyledChevronIcon };\n"],"names":["FilterItemHeader","styled","FlexView","StyledChevronIcon","ChevronDownIcon","$active","theme","gutter"],"mappings":";;;AAKM,MAAAA,IAAmBC,EAAOC,CAAQ;AAAA;AAAA,GAQlCC,IAAoBF,EAAOG,CAAe,EAAgB,CAAC,EAAE,SAAAC,GAAS,OAAAC,QAAY;AAChF,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA,aACIC,CAAM;AAAA,cACLA,CAAM;AAAA,eACLF,IAAU,IAAI,IAAI;AAAA,wBACTA,IAAU,MAAM,CAAC;AAAA;AAAA;AAGzC,CAAC;"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { memo as f, useState as x } from "react";
|
3
|
+
import l from "../../../../../ui/layout/flex-view.js";
|
4
|
+
import u from "../../../../../ui/tab/tab.js";
|
5
|
+
import h from "../../../../../ui/text/text.js";
|
6
|
+
import { FilterItemHeader as C, StyledChevronIcon as w } from "./filter-item-styled.js";
|
7
|
+
const j = f((i) => {
|
8
|
+
const { options: a, title: c, value: s, onClick: d } = i, [t, m] = x(!0);
|
9
|
+
return /* @__PURE__ */ o(l, { $width: "100%", $gapX: 1, $gutterX: 1, $flexGapX: 1, children: [
|
10
|
+
/* @__PURE__ */ o(
|
11
|
+
C,
|
12
|
+
{
|
13
|
+
$flexDirection: "row",
|
14
|
+
$alignItems: "center",
|
15
|
+
$justifyContent: "space-between",
|
16
|
+
$flexGap: 8,
|
17
|
+
onClick: () => {
|
18
|
+
m((r) => !r);
|
19
|
+
},
|
20
|
+
children: [
|
21
|
+
/* @__PURE__ */ e(h, { $renderAs: "ac4-black", $color: t ? "BLACK_T_60" : "BLACK_T_38", children: c }),
|
22
|
+
/* @__PURE__ */ e(w, { $active: t })
|
23
|
+
]
|
24
|
+
}
|
25
|
+
),
|
26
|
+
t && /* @__PURE__ */ e(l, { $flexDirection: "row", $flexWrap: !0, $flexGap: 12, children: a.map((r) => {
|
27
|
+
const { id: p, label: $, value: n } = r;
|
28
|
+
return /* @__PURE__ */ e(
|
29
|
+
u,
|
30
|
+
{
|
31
|
+
$width: "fit-content",
|
32
|
+
$renderAs: "primary",
|
33
|
+
label: $,
|
34
|
+
$selected: n === s,
|
35
|
+
shape: "curved",
|
36
|
+
$size: "small",
|
37
|
+
onClick: () => d(n)
|
38
|
+
},
|
39
|
+
p
|
40
|
+
);
|
41
|
+
}) })
|
42
|
+
] });
|
43
|
+
});
|
44
|
+
export {
|
45
|
+
j as default
|
46
|
+
};
|
47
|
+
//# sourceMappingURL=filter-item.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"filter-item.js","sources":["../../../../../../../src/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.tsx"],"sourcesContent":["import type { IFilterItem } from './filter-item-types';\nimport type { FC } from 'react';\n\nimport { memo, useState } from 'react';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport TabComponent from '../../../../../ui/tab/tab';\nimport Text from '../../../../../ui/text/text';\nimport * as Styled from './filter-item-styled';\n\nconst FilterItem: FC<IFilterItem> = memo(props => {\n const { options, title, value, onClick } = props;\n const [expandItem, setExpandedItem] = useState(true);\n\n const handleOnExpand = () => {\n setExpandedItem(prev => !prev);\n };\n\n return (\n <FlexView $width=\"100%\" $gapX={1} $gutterX={1} $flexGapX={1}>\n <Styled.FilterItemHeader\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $flexGap={8}\n onClick={handleOnExpand}\n >\n <Text $renderAs=\"ac4-black\" $color={expandItem ? 'BLACK_T_60' : 'BLACK_T_38'}>\n {title}\n </Text>\n\n <Styled.StyledChevronIcon $active={expandItem} />\n </Styled.FilterItemHeader>\n\n {expandItem && (\n <FlexView $flexDirection=\"row\" $flexWrap $flexGap={12}>\n {options.map(option => {\n const { id, label, value: optionValue } = option;\n const selected = optionValue === value;\n\n return (\n <TabComponent\n key={id}\n $width=\"fit-content\"\n $renderAs=\"primary\"\n label={label}\n $selected={selected}\n shape=\"curved\"\n $size=\"small\"\n onClick={() => onClick(optionValue)}\n />\n );\n })}\n </FlexView>\n )}\n </FlexView>\n );\n});\n\nexport default FilterItem;\n"],"names":["FilterItem","memo","props","options","title","value","onClick","expandItem","setExpandedItem","useState","jsxs","FlexView","Styled.FilterItemHeader","prev","jsx","Text","Styled.StyledChevronIcon","option","id","label","optionValue","TabComponent"],"mappings":";;;;;;AAUM,MAAAA,IAA8BC,EAAK,CAASC,MAAA;AAChD,QAAM,EAAE,SAAAC,GAAS,OAAAC,GAAO,OAAAC,GAAO,SAAAC,MAAYJ,GACrC,CAACK,GAAYC,CAAe,IAAIC,EAAS,EAAI;AAOjD,SAAA,gBAAAC,EAACC,KAAS,QAAO,QAAO,OAAO,GAAG,UAAU,GAAG,WAAW,GACxD,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,SAXiB,MAAM;AACX,UAAAJ,EAAA,CAAAK,MAAQ,CAACA,CAAI;AAAA,QAAA;AAAA,QAYzB,UAAA;AAAA,UAAA,gBAAAC,EAACC,KAAK,WAAU,aAAY,QAAQR,IAAa,eAAe,cAC7D,UACHH,EAAA,CAAA;AAAA,UAEC,gBAAAU,EAAAE,GAAA,EAAyB,SAAST,EAAY,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACjD;AAAA,IAECA,KACE,gBAAAO,EAAAH,GAAA,EAAS,gBAAe,OAAM,WAAS,IAAC,UAAU,IAChD,UAAQR,EAAA,IAAI,CAAUc,MAAA;AACrB,YAAM,EAAE,IAAAC,GAAI,OAAAC,GAAO,OAAOC,MAAgBH;AAIxC,aAAA,gBAAAH;AAAA,QAACO;AAAA,QAAA;AAAA,UAEC,QAAO;AAAA,UACP,WAAU;AAAA,UACV,OAAAF;AAAA,UACA,WARaC,MAAgBf;AAAA,UAS7B,OAAM;AAAA,UACN,OAAM;AAAA,UACN,SAAS,MAAMC,EAAQc,CAAW;AAAA,QAAA;AAAA,QAP7BF;AAAA,MAAA;AAAA,IAUV,CAAA,GACH;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import e from "styled-components";
|
2
|
+
import t from "../../../../../ui/text/text.js";
|
3
|
+
const i = e(t)`
|
4
|
+
cursor: pointer;
|
5
|
+
display: -webkit-box;
|
6
|
+
-webkit-box-orient: vertical;
|
7
|
+
-webkit-line-clamp: 2;
|
8
|
+
text-overflow: ellipsis;
|
9
|
+
overflow: hidden;
|
10
|
+
|
11
|
+
&:hover {
|
12
|
+
text-decoration: underline;
|
13
|
+
text-underline-offset: 3px;
|
14
|
+
}
|
15
|
+
`, l = e(t)`
|
16
|
+
word-spacing: 4px;
|
17
|
+
`;
|
18
|
+
export {
|
19
|
+
l as ResourceItemTags,
|
20
|
+
i as ResourceItemTitle
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=resource-item-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resource-item-styled.js","sources":["../../../../../../../src/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Text from '../../../../../ui/text/text';\n\nconst ResourceItemTitle = styled(Text)`\n cursor: pointer;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n\n &:hover {\n text-decoration: underline;\n text-underline-offset: 3px;\n }\n`;\n\nconst ResourceItemTags = styled(Text)`\n word-spacing: 4px;\n`;\n\nexport { ResourceItemTitle, ResourceItemTags };\n"],"names":["ResourceItemTitle","styled","Text","ResourceItemTags"],"mappings":";;AAIM,MAAAA,IAAoBC,EAAOC,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAc/BC,IAAmBF,EAAOC,CAAI;AAAA;AAAA;"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
2
|
+
import { memo as I, useCallback as a } from "react";
|
3
|
+
import _ from "../../../../../../assets/line-icons/icons/cross.js";
|
4
|
+
import b from "../../../../../../assets/line-icons/icons/plus.js";
|
5
|
+
import y from "../../../../../ui/buttons/icon-button/icon-button.js";
|
6
|
+
import s from "../../../../../ui/layout/flex-view.js";
|
7
|
+
import C from "../../../../../ui/separator/separator.js";
|
8
|
+
import { ResourceItemTitle as T, ResourceItemTags as w } from "./resource-item-styled.js";
|
9
|
+
import { getGradeTags as R, getBoardTags as k } from "./utils.js";
|
10
|
+
const P = I((l) => {
|
11
|
+
const { resource: r, selected: e, onResourceAdditionOrDeletion: c, onViewResource: i } = l, { name: d, stream: m, grades: p, boards: u, node_type: f, node_id: t } = r, $ = R(p), g = k(u), h = a(() => {
|
12
|
+
c(e ? "deselect" : "select", t);
|
13
|
+
}, [c, t, e]), x = a(() => {
|
14
|
+
i(r);
|
15
|
+
}, [i, r]);
|
16
|
+
return /* @__PURE__ */ o(s, { $flexGapX: 1.5, children: [
|
17
|
+
/* @__PURE__ */ o(
|
18
|
+
s,
|
19
|
+
{
|
20
|
+
$flexDirection: "row",
|
21
|
+
$alignItems: "center",
|
22
|
+
$justifyContent: "space-between",
|
23
|
+
$flexGapX: 2,
|
24
|
+
children: [
|
25
|
+
/* @__PURE__ */ o(s, { $flexWrap: !0, $flexGap: 4, $widthX: 25.5, children: [
|
26
|
+
/* @__PURE__ */ n(T, { $renderAs: "ab2", onClick: x, children: d }),
|
27
|
+
/* @__PURE__ */ o(w, { $renderAs: "ub3", $color: "BLACK_T_60", children: [
|
28
|
+
m,
|
29
|
+
" ",
|
30
|
+
$,
|
31
|
+
" ",
|
32
|
+
g,
|
33
|
+
" • ",
|
34
|
+
f
|
35
|
+
] })
|
36
|
+
] }),
|
37
|
+
/* @__PURE__ */ n(
|
38
|
+
y,
|
39
|
+
{
|
40
|
+
Icon: e ? _ : b,
|
41
|
+
renderAs: e ? "tertiary" : "secondary",
|
42
|
+
analyticsLabel: `resource_item_${e ? "deselection" : "selection"}`,
|
43
|
+
analyticsProps: {
|
44
|
+
node_id: t
|
45
|
+
},
|
46
|
+
size: "xsmall",
|
47
|
+
onClick: h
|
48
|
+
}
|
49
|
+
)
|
50
|
+
]
|
51
|
+
}
|
52
|
+
),
|
53
|
+
/* @__PURE__ */ n(C, { height: 1, background: "WHITE_5" })
|
54
|
+
] });
|
55
|
+
});
|
56
|
+
export {
|
57
|
+
P as default
|
58
|
+
};
|
59
|
+
//# sourceMappingURL=resource-item.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resource-item.js","sources":["../../../../../../../src/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.tsx"],"sourcesContent":["import type { IResourceItem } from './resource-item-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } from 'react';\n\nimport CrossIcon from '../../../../../../assets/line-icons/icons/cross';\nimport PlusIcon from '../../../../../../assets/line-icons/icons/plus';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport * as Styled from './resource-item-styled';\nimport { getBoardTags, getGradeTags } from './utils';\n\nconst ResourceItem: FC<IResourceItem> = memo(props => {\n const { resource, selected, onResourceAdditionOrDeletion, onViewResource } = props;\n const { name, stream, grades, boards, node_type: nodeType, node_id: nodeId } = resource;\n const grade = getGradeTags(grades);\n const test = getBoardTags(boards);\n\n const handleOnClick = useCallback(() => {\n onResourceAdditionOrDeletion(selected ? 'deselect' : 'select', nodeId);\n }, [onResourceAdditionOrDeletion, nodeId, selected]);\n\n const handleOnResourceView = useCallback(() => {\n onViewResource(resource);\n }, [onViewResource, resource]);\n\n return (\n <FlexView $flexGapX={1.5}>\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $flexGapX={2}\n >\n <FlexView $flexWrap $flexGap={4} $widthX={25.5}>\n <Styled.ResourceItemTitle $renderAs=\"ab2\" onClick={handleOnResourceView}>\n {name}\n </Styled.ResourceItemTitle>\n\n <Styled.ResourceItemTags $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {stream} {grade} {test} • {nodeType}\n </Styled.ResourceItemTags>\n </FlexView>\n\n <IconButton\n Icon={selected ? CrossIcon : PlusIcon}\n renderAs={selected ? 'tertiary' : 'secondary'}\n analyticsLabel={`resource_item_${selected ? 'deselection' : 'selection'}`}\n analyticsProps={{\n node_id: nodeId,\n }}\n size=\"xsmall\"\n onClick={handleOnClick}\n />\n </FlexView>\n\n <Separator height={1} background=\"WHITE_5\" />\n </FlexView>\n );\n});\n\nexport default ResourceItem;\n"],"names":["ResourceItem","memo","props","resource","selected","onResourceAdditionOrDeletion","onViewResource","name","stream","grades","boards","nodeType","nodeId","grade","getGradeTags","test","getBoardTags","handleOnClick","useCallback","handleOnResourceView","jsxs","FlexView","jsx","Styled.ResourceItemTitle","Styled.ResourceItemTags","IconButton","CrossIcon","PlusIcon","Separator"],"mappings":";;;;;;;;;AAaM,MAAAA,IAAkCC,EAAK,CAASC,MAAA;AACpD,QAAM,EAAE,UAAAC,GAAU,UAAAC,GAAU,8BAAAC,GAA8B,gBAAAC,MAAmBJ,GACvE,EAAE,MAAAK,GAAM,QAAAC,GAAQ,QAAAC,GAAQ,QAAAC,GAAQ,WAAWC,GAAU,SAASC,EAAW,IAAAT,GACzEU,IAAQC,EAAaL,CAAM,GAC3BM,IAAOC,EAAaN,CAAM,GAE1BO,IAAgBC,EAAY,MAAM;AACT,IAAAb,EAAAD,IAAW,aAAa,UAAUQ,CAAM;AAAA,EACpE,GAAA,CAACP,GAA8BO,GAAQR,CAAQ,CAAC,GAE7Ce,IAAuBD,EAAY,MAAM;AAC7C,IAAAZ,EAAeH,CAAQ;AAAA,EAAA,GACtB,CAACG,GAAgBH,CAAQ,CAAC;AAG3B,SAAA,gBAAAiB,EAACC,GAAS,EAAA,WAAW,KACnB,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,WAAW;AAAA,QAEX,UAAA;AAAA,UAAA,gBAAAD,EAACC,KAAS,WAAS,IAAC,UAAU,GAAG,SAAS,MACxC,UAAA;AAAA,YAAA,gBAAAC,EAACC,GAAA,EAAyB,WAAU,OAAM,SAASJ,GAChD,UACHZ,GAAA;AAAA,8BAECiB,GAAA,EAAwB,WAAU,OAAM,QAAO,cAC7C,UAAA;AAAA,cAAAhB;AAAA,cAAO;AAAA,cAAEK;AAAA,cAAM;AAAA,cAAEE;AAAA,cAAK;AAAA,cAAIJ;AAAA,YAAA,GAC7B;AAAA,UAAA,GACF;AAAA,UAEA,gBAAAW;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,MAAMrB,IAAWsB,IAAYC;AAAA,cAC7B,UAAUvB,IAAW,aAAa;AAAA,cAClC,gBAAgB,iBAAiBA,IAAW,gBAAgB,WAAW;AAAA,cACvE,gBAAgB;AAAA,gBACd,SAASQ;AAAA,cACX;AAAA,cACA,MAAK;AAAA,cACL,SAASK;AAAA,YAAA;AAAA,UACX;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,IAEC,gBAAAK,EAAAM,GAAA,EAAU,QAAQ,GAAG,YAAW,WAAU;AAAA,EAC7C,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../src/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.ts"],"sourcesContent":["const getGradeTags = (grades: string[]) => {\n return grades.reduce((acc, gradeInfo) => `${acc} • G${gradeInfo}`, '');\n};\n\nconst getBoardTags = (boards: string[]) => {\n return boards.reduce((acc, boardInfo) => `${acc} • ${boardInfo}`, '');\n};\n\nexport { getGradeTags, getBoardTags };\n"],"names":["getGradeTags","grades","acc","gradeInfo","getBoardTags","boards","boardInfo"],"mappings":"AAAM,MAAAA,IAAe,CAACC,MACbA,EAAO,OAAO,CAACC,GAAKC,MAAc,GAAGD,CAAG,OAAOC,CAAS,IAAI,EAAE,GAGjEC,IAAe,CAACC,MACbA,EAAO,OAAO,CAACH,GAAKI,MAAc,GAAGJ,CAAG,MAAMI,CAAS,IAAI,EAAE;"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
2
|
+
import { IMAGES as o } from "../../../../../assets/images/images.js";
|
3
|
+
import i from "../../../../ui/image/image.js";
|
4
|
+
import r from "../../../../ui/layout/flex-view.js";
|
5
|
+
import { NoResourceText as s } from "../resources-assign-styled.js";
|
6
|
+
const l = () => /* @__PURE__ */ e(r, { $alignItems: "center", $justifyContent: "center", $height: "calc(100vh - 64px - 72px)", children: /* @__PURE__ */ t(r, { $width: 620, $height: 620, $position: "relative", children: [
|
7
|
+
/* @__PURE__ */ e(
|
8
|
+
i,
|
9
|
+
{
|
10
|
+
withLoader: !1,
|
11
|
+
src: o.BG_EMPTY_RESOURCES,
|
12
|
+
alt: "Empty resources",
|
13
|
+
width: 620,
|
14
|
+
height: 620
|
15
|
+
}
|
16
|
+
),
|
17
|
+
/* @__PURE__ */ e(s, { $renderAs: "ab2-bold", children: "Type + Search = Resources!" })
|
18
|
+
] }) });
|
19
|
+
export {
|
20
|
+
l as default
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=no-resource-screen.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"no-resource-screen.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport { IMAGES } from '../../../../../assets/images/images';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport * as Styled from '../resources-assign-styled';\n\nconst NoResourceScreen: FC = () => {\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\" $height=\"calc(100vh - 64px - 72px)\">\n <FlexView $width={620} $height={620} $position=\"relative\">\n <Image\n withLoader={false}\n src={IMAGES.BG_EMPTY_RESOURCES}\n alt=\"Empty resources\"\n width={620}\n height={620}\n />\n\n <Styled.NoResourceText $renderAs=\"ab2-bold\">\n Type + Search = Resources!\n </Styled.NoResourceText>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default NoResourceScreen;\n"],"names":["NoResourceScreen","jsx","FlexView","jsxs","Image","IMAGES","Styled.NoResourceText"],"mappings":";;;;;AAOA,MAAMA,IAAuB,MAExB,gBAAAC,EAAAC,GAAA,EAAS,aAAY,UAAS,iBAAgB,UAAS,SAAQ,6BAC9D,UAAA,gBAAAC,EAACD,KAAS,QAAQ,KAAK,SAAS,KAAK,WAAU,YAC7C,UAAA;AAAA,EAAA,gBAAAD;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,YAAY;AAAA,MACZ,KAAKC,EAAO;AAAA,MACZ,KAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,oBAECC,GAAA,EAAsB,WAAU,YAAW,UAE5C,8BAAA;AAAA,EACF,CAAA,EACF,CAAA;"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import p from "../../../../ui/buttons/button/button.js";
|
3
|
+
import t from "../../../../ui/layout/flex-view.js";
|
4
|
+
const n = o(t)`
|
5
|
+
overflow-y: auto;
|
6
|
+
`, i = o(t)`
|
7
|
+
position: sticky;
|
8
|
+
bottom: 0;
|
9
|
+
`, x = o(p)(({ theme: r }) => `
|
10
|
+
box-shadow: 0px 10px 20px 0px ${r.colors.BLACK_T_20};
|
11
|
+
`);
|
12
|
+
export {
|
13
|
+
i as ButtonWrapper,
|
14
|
+
n as ResourceItemWrapper,
|
15
|
+
x as StyledButton
|
16
|
+
};
|
17
|
+
//# sourceMappingURL=resource-items-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resource-items-styled.js","sources":["../../../../../../src/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Button from '../../../../ui/buttons/button/button';\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ResourceItemWrapper = styled(FlexView)`\n overflow-y: auto;\n`;\n\nconst ButtonWrapper = styled(FlexView)`\n position: sticky;\n bottom: 0;\n`;\n\nconst StyledButton = styled(Button)(({ theme }) => {\n return `\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n `;\n});\n\nexport { ResourceItemWrapper, ButtonWrapper, StyledButton };\n"],"names":["ResourceItemWrapper","styled","FlexView","ButtonWrapper","StyledButton","Button","theme"],"mappings":";;;AAKM,MAAAA,IAAsBC,EAAOC,CAAQ;AAAA;AAAA,GAIrCC,IAAgBF,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK/BE,IAAeH,EAAOI,CAAM,EAAE,CAAC,EAAE,OAAAC,QAC9B;AAAA,oCAC2BA,EAAM,OAAO,UAAU;AAAA,GAE1D;"}
|