@thanh01.pmt/interactive-quiz-kit 1.0.82 → 1.0.84
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/authoring.cjs +1114 -1187
- package/dist/authoring.d.cts +1 -1
- package/dist/authoring.d.ts +1 -1
- package/dist/authoring.mjs +843 -916
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/react-ui.cjs +47 -120
- package/dist/react-ui.d.cts +1 -1
- package/dist/react-ui.d.ts +1 -1
- package/dist/react-ui.mjs +47 -120
- package/dist/{toaster-Bj78wmSz.d.ts → toaster-DZskgIbn.d.ts} +4 -1
- package/dist/{toaster-CexT11VU.d.cts → toaster-DrUkr-h7.d.cts} +4 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -14,19 +14,21 @@ interface Subject extends CodeNamedEntity {
|
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
16
|
}
|
|
17
|
+
interface Category extends CodeNamedEntity {
|
|
18
|
+
subjectCode?: string;
|
|
19
|
+
}
|
|
20
|
+
interface Topic extends CodeNamedEntity {
|
|
21
|
+
subjectCode?: string;
|
|
22
|
+
categoryCode?: string;
|
|
23
|
+
}
|
|
17
24
|
interface GradeLevel extends CodeNamedEntity {
|
|
18
25
|
}
|
|
19
26
|
interface BloomLevelType extends CodeNamedEntity {
|
|
20
27
|
}
|
|
21
28
|
interface QuestionTypeType extends CodeNamedEntity {
|
|
22
29
|
}
|
|
23
|
-
interface Category extends CodeNamedEntity {
|
|
24
|
-
}
|
|
25
30
|
interface Context extends CodeNamedEntity {
|
|
26
31
|
}
|
|
27
|
-
interface Topic extends CodeNamedEntity {
|
|
28
|
-
subjectCode: string;
|
|
29
|
-
}
|
|
30
32
|
type BloomLevelName = "Remembering" | "Understanding" | "Applying" | "Analyzing" | "Evaluating" | "Creating";
|
|
31
33
|
type KnowledgeDimension = "Factual" | "Conceptual" | "Procedural";
|
|
32
34
|
type StandardDifficulty = "Easy" | "Medium" | "Hard";
|
package/dist/index.d.ts
CHANGED
|
@@ -14,19 +14,21 @@ interface Subject extends CodeNamedEntity {
|
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
16
|
}
|
|
17
|
+
interface Category extends CodeNamedEntity {
|
|
18
|
+
subjectCode?: string;
|
|
19
|
+
}
|
|
20
|
+
interface Topic extends CodeNamedEntity {
|
|
21
|
+
subjectCode?: string;
|
|
22
|
+
categoryCode?: string;
|
|
23
|
+
}
|
|
17
24
|
interface GradeLevel extends CodeNamedEntity {
|
|
18
25
|
}
|
|
19
26
|
interface BloomLevelType extends CodeNamedEntity {
|
|
20
27
|
}
|
|
21
28
|
interface QuestionTypeType extends CodeNamedEntity {
|
|
22
29
|
}
|
|
23
|
-
interface Category extends CodeNamedEntity {
|
|
24
|
-
}
|
|
25
30
|
interface Context extends CodeNamedEntity {
|
|
26
31
|
}
|
|
27
|
-
interface Topic extends CodeNamedEntity {
|
|
28
|
-
subjectCode: string;
|
|
29
|
-
}
|
|
30
32
|
type BloomLevelName = "Remembering" | "Understanding" | "Applying" | "Analyzing" | "Evaluating" | "Creating";
|
|
31
33
|
type KnowledgeDimension = "Factual" | "Conceptual" | "Procedural";
|
|
32
34
|
type StandardDifficulty = "Easy" | "Medium" | "Hard";
|
package/dist/react-ui.cjs
CHANGED
|
@@ -139025,7 +139025,7 @@ function TopicManager({
|
|
|
139025
139025
|
setCurrentItem(topic);
|
|
139026
139026
|
setItemName(topic.name);
|
|
139027
139027
|
setItemCode(topic.code);
|
|
139028
|
-
setSelectedSubjectCode(topic.subjectCode);
|
|
139028
|
+
setSelectedSubjectCode(topic.subjectCode ?? "");
|
|
139029
139029
|
setIsDialogOpen(true);
|
|
139030
139030
|
};
|
|
139031
139031
|
const handleDeleteItem = (topic) => {
|
|
@@ -139103,7 +139103,7 @@ function TopicManager({
|
|
|
139103
139103
|
const getSubjectName = (subjectCode) => {
|
|
139104
139104
|
return subjects.find((s4) => s4.code === subjectCode)?.name || "N/A";
|
|
139105
139105
|
};
|
|
139106
|
-
return /* @__PURE__ */ React169__namespace.default.createElement(Card, null, /* @__PURE__ */ React169__namespace.default.createElement(CardHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(CardTitle, { className: "flex justify-between items-center" }, /* @__PURE__ */ React169__namespace.default.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React169__namespace.default.createElement(Tag, { className: "mr-2 h-5 w-5 text-primary" }), " Manage Topics"), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex items-center gap-2" }, onBulkAdd && /* @__PURE__ */ React169__namespace.default.createElement(MetadataImportControls, { metadataName: "Topics", onImport: handleImport }), /* @__PURE__ */ React169__namespace.default.createElement(Button, { onClick: handleAddItem, size: "sm", disabled: subjects.length === 0 }, /* @__PURE__ */ React169__namespace.default.createElement(CirclePlus, { className: "mr-2 h-4 w-4" }), " Add Topic"))), subjects.length === 0 && !isLoading && /* @__PURE__ */ React169__namespace.default.createElement("p", { className: "text-sm text-destructive" }, "Please add subjects before adding topics.")), /* @__PURE__ */ React169__namespace.default.createElement(CardContent, null, isLoading ? /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex justify-center items-center h-32" }, /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "h-8 w-8 animate-spin text-primary" })) : topics.length === 0 ? /* @__PURE__ */ React169__namespace.default.createElement("p", { className: "text-center text-muted-foreground py-4" }, "No topics found. Add one to get started!") : /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "overflow-x-auto" }, /* @__PURE__ */ React169__namespace.default.createElement(Table3, null, /* @__PURE__ */ React169__namespace.default.createElement(TableHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(TableRow, null, /* @__PURE__ */ React169__namespace.default.createElement(TableHead, null, "Code"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, null, "Name"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, null, "Subject"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, { className: "text-right w-[120px]" }, "Actions"))), /* @__PURE__ */ React169__namespace.default.createElement(TableBody, null, topics.map((topic) => /* @__PURE__ */ React169__namespace.default.createElement(TableRow, { key: topic.id }, /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-mono text-xs" }, topic.code), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-Medium" }, topic.name), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, null, getSubjectName(topic.subjectCode), " (", topic.subjectCode, ")"), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React169__namespace.default.createElement(Button, { variant: "ghost", size: "icon", onClick: () => handleEditItem(topic), className: "mr-2" }, /* @__PURE__ */ React169__namespace.default.createElement(PenLine, { className: "h-4 w-4" })), /* @__PURE__ */ React169__namespace.default.createElement(Button, { variant: "ghost", size: "icon", onClick: () => handleDeleteItem(topic), className: "text-destructive hover:text-destructive" }, /* @__PURE__ */ React169__namespace.default.createElement(Trash2, { className: "h-4 w-4" })))))))), /* @__PURE__ */ React169__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React169__namespace.default.createElement(DialogContent2, { className: "sm:max-w-md" }, /* @__PURE__ */ React169__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(DialogTitle2, null, currentItem ? "Edit Topic" : "Add New Topic")), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-4 py-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "itemCode" }, "Topic Code"), /* @__PURE__ */ React169__namespace.default.createElement(Input, { id: "itemCode", value: itemCode, onChange: (e3) => setItemCode(e3.target.value.toUpperCase()), placeholder: "e.g., ALG-BASICS", disabled: !!currentItem })), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "itemName" }, "Topic Name"), /* @__PURE__ */ React169__namespace.default.createElement(Input, { id: "itemName", value: itemName, onChange: (e3) => setItemName(e3.target.value), placeholder: "e.g., Algebra Basics" })), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject"), /* @__PURE__ */ React169__namespace.default.createElement(Select2, { value: selectedSubjectCode, onValueChange: setSelectedSubjectCode, disabled: subjects.length === 0 }, /* @__PURE__ */ React169__namespace.default.createElement(SelectTrigger2, { id: "subjectCode" }, /* @__PURE__ */ React169__namespace.default.createElement(SelectValue2, { placeholder: "Select a subject" })), /* @__PURE__ */ React169__namespace.default.createElement(SelectContent2, null, subjects.map((subject) => /* @__PURE__ */ React169__namespace.default.createElement(SelectItem2, { key: subject.code, value: subject.code }, subject.name, " (", subject.code, ")")))))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(Button, { type: "button", variant: "outline", onClick: () => setIsDialogOpen(false), disabled: isPending }, "Cancel"), /* @__PURE__ */ React169__namespace.default.createElement(Button, { type: "submit", onClick: handleSubmit, disabled: isPending || !itemName.trim() || !itemCode.trim() || !selectedSubjectCode }, isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }), " Save")))), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialog2, { open: isAlertOpen, onOpenChange: setIsAlertOpen }, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogContent2, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogTitle2, null, "Are you sure?"), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogDescription2, null, 'This will permanently delete topic "', itemToDelete?.name, '".')), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogCancel2, { disabled: isPending }, "Cancel"), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogAction2, { onClick: confirmDelete, disabled: isPending, className: "bg-destructive hover:bg-destructive/90" }, isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }), " Delete"))))));
|
|
139106
|
+
return /* @__PURE__ */ React169__namespace.default.createElement(Card, null, /* @__PURE__ */ React169__namespace.default.createElement(CardHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(CardTitle, { className: "flex justify-between items-center" }, /* @__PURE__ */ React169__namespace.default.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React169__namespace.default.createElement(Tag, { className: "mr-2 h-5 w-5 text-primary" }), " Manage Topics"), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex items-center gap-2" }, onBulkAdd && /* @__PURE__ */ React169__namespace.default.createElement(MetadataImportControls, { metadataName: "Topics", onImport: handleImport }), /* @__PURE__ */ React169__namespace.default.createElement(Button, { onClick: handleAddItem, size: "sm", disabled: subjects.length === 0 }, /* @__PURE__ */ React169__namespace.default.createElement(CirclePlus, { className: "mr-2 h-4 w-4" }), " Add Topic"))), subjects.length === 0 && !isLoading && /* @__PURE__ */ React169__namespace.default.createElement("p", { className: "text-sm text-destructive" }, "Please add subjects before adding topics.")), /* @__PURE__ */ React169__namespace.default.createElement(CardContent, null, isLoading ? /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex justify-center items-center h-32" }, /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "h-8 w-8 animate-spin text-primary" })) : topics.length === 0 ? /* @__PURE__ */ React169__namespace.default.createElement("p", { className: "text-center text-muted-foreground py-4" }, "No topics found. Add one to get started!") : /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "overflow-x-auto" }, /* @__PURE__ */ React169__namespace.default.createElement(Table3, null, /* @__PURE__ */ React169__namespace.default.createElement(TableHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(TableRow, null, /* @__PURE__ */ React169__namespace.default.createElement(TableHead, null, "Code"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, null, "Name"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, null, "Subject"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, { className: "text-right w-[120px]" }, "Actions"))), /* @__PURE__ */ React169__namespace.default.createElement(TableBody, null, topics.map((topic) => /* @__PURE__ */ React169__namespace.default.createElement(TableRow, { key: topic.id }, /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-mono text-xs" }, topic.code), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-Medium" }, topic.name), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, null, getSubjectName(topic.subjectCode ?? ""), " (", topic.subjectCode, ")"), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React169__namespace.default.createElement(Button, { variant: "ghost", size: "icon", onClick: () => handleEditItem(topic), className: "mr-2" }, /* @__PURE__ */ React169__namespace.default.createElement(PenLine, { className: "h-4 w-4" })), /* @__PURE__ */ React169__namespace.default.createElement(Button, { variant: "ghost", size: "icon", onClick: () => handleDeleteItem(topic), className: "text-destructive hover:text-destructive" }, /* @__PURE__ */ React169__namespace.default.createElement(Trash2, { className: "h-4 w-4" })))))))), /* @__PURE__ */ React169__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React169__namespace.default.createElement(DialogContent2, { className: "sm:max-w-md" }, /* @__PURE__ */ React169__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(DialogTitle2, null, currentItem ? "Edit Topic" : "Add New Topic")), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-4 py-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "itemCode" }, "Topic Code"), /* @__PURE__ */ React169__namespace.default.createElement(Input, { id: "itemCode", value: itemCode, onChange: (e3) => setItemCode(e3.target.value.toUpperCase()), placeholder: "e.g., ALG-BASICS", disabled: !!currentItem })), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "itemName" }, "Topic Name"), /* @__PURE__ */ React169__namespace.default.createElement(Input, { id: "itemName", value: itemName, onChange: (e3) => setItemName(e3.target.value), placeholder: "e.g., Algebra Basics" })), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-2" }, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject"), /* @__PURE__ */ React169__namespace.default.createElement(Select2, { value: selectedSubjectCode, onValueChange: setSelectedSubjectCode, disabled: subjects.length === 0 }, /* @__PURE__ */ React169__namespace.default.createElement(SelectTrigger2, { id: "subjectCode" }, /* @__PURE__ */ React169__namespace.default.createElement(SelectValue2, { placeholder: "Select a subject" })), /* @__PURE__ */ React169__namespace.default.createElement(SelectContent2, null, subjects.map((subject) => /* @__PURE__ */ React169__namespace.default.createElement(SelectItem2, { key: subject.code, value: subject.code }, subject.name, " (", subject.code, ")")))))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(Button, { type: "button", variant: "outline", onClick: () => setIsDialogOpen(false), disabled: isPending }, "Cancel"), /* @__PURE__ */ React169__namespace.default.createElement(Button, { type: "submit", onClick: handleSubmit, disabled: isPending || !itemName.trim() || !itemCode.trim() || !selectedSubjectCode }, isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }), " Save")))), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialog2, { open: isAlertOpen, onOpenChange: setIsAlertOpen }, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogContent2, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogTitle2, null, "Are you sure?"), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogDescription2, null, 'This will permanently delete topic "', itemToDelete?.name, '".')), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogCancel2, { disabled: isPending }, "Cancel"), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogAction2, { onClick: confirmDelete, disabled: isPending, className: "bg-destructive hover:bg-destructive/90" }, isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }), " Delete"))))));
|
|
139107
139107
|
}
|
|
139108
139108
|
|
|
139109
139109
|
// src/react-ui/components/metadata/CategoryManager.tsx
|
|
@@ -139501,6 +139501,9 @@ init_react_shim();
|
|
|
139501
139501
|
function LearningObjectiveManager({
|
|
139502
139502
|
initialData,
|
|
139503
139503
|
subjects: subjectsProp,
|
|
139504
|
+
categories: categoriesProp,
|
|
139505
|
+
topics: topicsProp,
|
|
139506
|
+
gradeLevels: gradeLevelsProp,
|
|
139504
139507
|
isLoading: isLoadingProp,
|
|
139505
139508
|
onAdd,
|
|
139506
139509
|
onUpdate,
|
|
@@ -139509,6 +139512,9 @@ function LearningObjectiveManager({
|
|
|
139509
139512
|
}) {
|
|
139510
139513
|
const [items, setItems] = React169.useState([]);
|
|
139511
139514
|
const [subjects, setSubjects] = React169.useState([]);
|
|
139515
|
+
const [categories, setCategories] = React169.useState([]);
|
|
139516
|
+
const [topics, setTopics] = React169.useState([]);
|
|
139517
|
+
const [gradeLevels, setGradeLevels] = React169.useState([]);
|
|
139512
139518
|
const [isLoading, setIsLoading] = React169.useState(true);
|
|
139513
139519
|
const [isDialogOpen, setIsDialogOpen] = React169.useState(false);
|
|
139514
139520
|
const [isAlertOpen, setIsAlertOpen] = React169.useState(false);
|
|
@@ -139528,6 +139534,9 @@ function LearningObjectiveManager({
|
|
|
139528
139534
|
try {
|
|
139529
139535
|
setItems(MetadataService.getLearningObjectives());
|
|
139530
139536
|
setSubjects(MetadataService.getSubjects());
|
|
139537
|
+
setCategories(MetadataService.getCategories());
|
|
139538
|
+
setTopics(MetadataService.getTopics());
|
|
139539
|
+
setGradeLevels(MetadataService.getGradeLevels());
|
|
139531
139540
|
} catch (error) {
|
|
139532
139541
|
toast2({
|
|
139533
139542
|
title: "Error",
|
|
@@ -139543,13 +139552,34 @@ function LearningObjectiveManager({
|
|
|
139543
139552
|
if (isControlled) {
|
|
139544
139553
|
setItems(initialData || []);
|
|
139545
139554
|
setSubjects(subjectsProp || []);
|
|
139555
|
+
setCategories(categoriesProp || []);
|
|
139556
|
+
setTopics(topicsProp || []);
|
|
139557
|
+
setGradeLevels(gradeLevelsProp || []);
|
|
139546
139558
|
setIsLoading(isLoadingProp || false);
|
|
139547
139559
|
} else {
|
|
139548
139560
|
refreshData();
|
|
139549
139561
|
}
|
|
139550
|
-
}, [isControlled, initialData, subjectsProp, isLoadingProp]);
|
|
139562
|
+
}, [isControlled, initialData, subjectsProp, categoriesProp, topicsProp, gradeLevelsProp, isLoadingProp]);
|
|
139563
|
+
const filteredCategories = React169.useMemo(() => {
|
|
139564
|
+
if (!formState.subjectCode) return [];
|
|
139565
|
+
return categories.filter((c4) => c4.subjectCode === formState.subjectCode);
|
|
139566
|
+
}, [formState.subjectCode, categories]);
|
|
139567
|
+
const filteredTopics = React169.useMemo(() => {
|
|
139568
|
+
if (!formState.categoryCode) return [];
|
|
139569
|
+
return topics.filter((t4) => t4.categoryCode === formState.categoryCode);
|
|
139570
|
+
}, [formState.categoryCode, topics]);
|
|
139551
139571
|
const handleFormChange = (field, value) => {
|
|
139552
|
-
setFormState((prev) =>
|
|
139572
|
+
setFormState((prev) => {
|
|
139573
|
+
const newState = { ...prev, [field]: value };
|
|
139574
|
+
if (field === "subjectCode") {
|
|
139575
|
+
newState.categoryCode = "";
|
|
139576
|
+
newState.topicCode = "";
|
|
139577
|
+
}
|
|
139578
|
+
if (field === "categoryCode") {
|
|
139579
|
+
newState.topicCode = "";
|
|
139580
|
+
}
|
|
139581
|
+
return newState;
|
|
139582
|
+
});
|
|
139553
139583
|
};
|
|
139554
139584
|
const handleAddItem = () => {
|
|
139555
139585
|
setCurrentItem(null);
|
|
@@ -139560,11 +139590,7 @@ function LearningObjectiveManager({
|
|
|
139560
139590
|
};
|
|
139561
139591
|
const handleEditItem = (item) => {
|
|
139562
139592
|
setCurrentItem(item);
|
|
139563
|
-
|
|
139564
|
-
setFormState({
|
|
139565
|
-
...item,
|
|
139566
|
-
subject: subject ? subject.name : item.subject || ""
|
|
139567
|
-
});
|
|
139593
|
+
setFormState({ ...item });
|
|
139568
139594
|
setIsDialogOpen(true);
|
|
139569
139595
|
};
|
|
139570
139596
|
const handleDeleteItem = (item) => {
|
|
@@ -139666,7 +139692,6 @@ function LearningObjectiveManager({
|
|
|
139666
139692
|
acc.valid.push({
|
|
139667
139693
|
code: rec["LO ID"],
|
|
139668
139694
|
name: rec["LO Name"] || rec["LO Description"],
|
|
139669
|
-
// Use description if name is missing
|
|
139670
139695
|
description: rec["LO Description"],
|
|
139671
139696
|
subject: rec["Subject"] || "",
|
|
139672
139697
|
subjectCode: rec["Subject Code"] || rec["Subject"],
|
|
@@ -139734,141 +139759,43 @@ function LearningObjectiveManager({
|
|
|
139734
139759
|
className: "text-destructive hover:text-destructive"
|
|
139735
139760
|
},
|
|
139736
139761
|
/* @__PURE__ */ React169__namespace.default.createElement(Trash2, { className: "h-4 w-4" })
|
|
139737
|
-
))))))))), /* @__PURE__ */ React169__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React169__namespace.default.createElement(DialogContent2, { className: "sm:max-w-2xl
|
|
139762
|
+
))))))))), /* @__PURE__ */ React169__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React169__namespace.default.createElement(DialogContent2, { className: "sm:max-w-2xl max-h-[90vh] flex flex-col" }, /* @__PURE__ */ React169__namespace.default.createElement(DialogHeader, { className: "p-6 pb-0" }, /* @__PURE__ */ React169__namespace.default.createElement(DialogTitle2, null, currentItem ? "Edit Learning Objective" : "Add New Learning Objective")), /* @__PURE__ */ React169__namespace.default.createElement(ScrollArea2, { className: "flex-1 pr-1" }, /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "px-6 py-4 grid gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "code" }, "LO Code"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139738
139763
|
Input,
|
|
139739
139764
|
{
|
|
139740
139765
|
id: "code",
|
|
139741
139766
|
value: formState.code || "",
|
|
139742
|
-
onChange: (e3) => handleFormChange(
|
|
139743
|
-
"code",
|
|
139744
|
-
e3.target.value.toUpperCase()
|
|
139745
|
-
),
|
|
139767
|
+
onChange: (e3) => handleFormChange("code", e3.target.value.toUpperCase()),
|
|
139746
139768
|
disabled: !!currentItem
|
|
139747
139769
|
}
|
|
139748
|
-
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139770
|
+
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "name" }, "LO Name (Description)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139749
139771
|
Input,
|
|
139750
139772
|
{
|
|
139751
139773
|
id: "name",
|
|
139752
139774
|
value: formState.name || "",
|
|
139753
|
-
onChange: (e3) => handleFormChange(
|
|
139754
|
-
"name",
|
|
139755
|
-
e3.target.value
|
|
139756
|
-
)
|
|
139775
|
+
onChange: (e3) => handleFormChange("name", e3.target.value)
|
|
139757
139776
|
}
|
|
139758
|
-
))), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "
|
|
139759
|
-
Input,
|
|
139760
|
-
{
|
|
139761
|
-
id: "subject",
|
|
139762
|
-
value: formState.subject || "",
|
|
139763
|
-
onChange: (e3) => handleFormChange(
|
|
139764
|
-
"subject",
|
|
139765
|
-
e3.target.value
|
|
139766
|
-
)
|
|
139767
|
-
}
|
|
139768
|
-
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject Code"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139769
|
-
EditableCombobox,
|
|
139770
|
-
{
|
|
139771
|
-
options: subjects.map((s4) => ({
|
|
139772
|
-
value: s4.code,
|
|
139773
|
-
label: s4.name
|
|
139774
|
-
})),
|
|
139775
|
-
value: formState.subjectCode || "",
|
|
139776
|
-
onChange: (val) => handleFormChange("subjectCode", val),
|
|
139777
|
-
placeholder: "Select a subject..."
|
|
139778
|
-
}
|
|
139779
|
-
))), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "category" }, "Category Name"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139780
|
-
Input,
|
|
139781
|
-
{
|
|
139782
|
-
id: "category",
|
|
139783
|
-
value: formState.category || "",
|
|
139784
|
-
onChange: (e3) => handleFormChange(
|
|
139785
|
-
"category",
|
|
139786
|
-
e3.target.value
|
|
139787
|
-
)
|
|
139788
|
-
}
|
|
139789
|
-
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "categoryCode" }, "Category Code"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139790
|
-
Input,
|
|
139791
|
-
{
|
|
139792
|
-
id: "categoryCode",
|
|
139793
|
-
value: formState.categoryCode || "",
|
|
139794
|
-
onChange: (e3) => handleFormChange(
|
|
139795
|
-
"categoryCode",
|
|
139796
|
-
e3.target.value
|
|
139797
|
-
)
|
|
139798
|
-
}
|
|
139799
|
-
))), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "topic" }, "Topic Name"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139800
|
-
Input,
|
|
139801
|
-
{
|
|
139802
|
-
id: "topic",
|
|
139803
|
-
value: formState.topic || "",
|
|
139804
|
-
onChange: (e3) => handleFormChange(
|
|
139805
|
-
"topic",
|
|
139806
|
-
e3.target.value
|
|
139807
|
-
)
|
|
139808
|
-
}
|
|
139809
|
-
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "topicCode" }, "Topic Code"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139810
|
-
Input,
|
|
139811
|
-
{
|
|
139812
|
-
id: "topicCode",
|
|
139813
|
-
value: formState.topicCode || "",
|
|
139814
|
-
onChange: (e3) => handleFormChange(
|
|
139815
|
-
"topicCode",
|
|
139816
|
-
e3.target.value
|
|
139817
|
-
)
|
|
139818
|
-
}
|
|
139819
|
-
))), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "grade" }, "Grade Name"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139820
|
-
Input,
|
|
139821
|
-
{
|
|
139822
|
-
id: "grade",
|
|
139823
|
-
value: formState.grade || "",
|
|
139824
|
-
onChange: (e3) => handleFormChange(
|
|
139825
|
-
"grade",
|
|
139826
|
-
e3.target.value
|
|
139827
|
-
)
|
|
139828
|
-
}
|
|
139829
|
-
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Code"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139830
|
-
Input,
|
|
139831
|
-
{
|
|
139832
|
-
id: "gradeCode",
|
|
139833
|
-
value: formState.gradeCode || "",
|
|
139834
|
-
onChange: (e3) => handleFormChange(
|
|
139835
|
-
"gradeCode",
|
|
139836
|
-
e3.target.value
|
|
139837
|
-
)
|
|
139838
|
-
}
|
|
139839
|
-
))), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "keywords" }, "Keywords (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139777
|
+
))), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject"), /* @__PURE__ */ React169__namespace.default.createElement(Select2, { value: formState.subjectCode || "", onValueChange: (val) => handleFormChange("subjectCode", val) }, /* @__PURE__ */ React169__namespace.default.createElement(SelectTrigger2, null, /* @__PURE__ */ React169__namespace.default.createElement(SelectValue2, { placeholder: "Select a subject..." })), /* @__PURE__ */ React169__namespace.default.createElement(SelectContent2, null, subjects.map((s4) => /* @__PURE__ */ React169__namespace.default.createElement(SelectItem2, { key: s4.code, value: s4.code }, s4.name))))), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "categoryCode" }, "Category"), /* @__PURE__ */ React169__namespace.default.createElement(Select2, { value: formState.categoryCode || "", onValueChange: (val) => handleFormChange("categoryCode", val), disabled: !formState.subjectCode || filteredCategories.length === 0 }, /* @__PURE__ */ React169__namespace.default.createElement(SelectTrigger2, null, /* @__PURE__ */ React169__namespace.default.createElement(SelectValue2, { placeholder: "Select a category..." })), /* @__PURE__ */ React169__namespace.default.createElement(SelectContent2, null, filteredCategories.map((c4) => /* @__PURE__ */ React169__namespace.default.createElement(SelectItem2, { key: c4.code, value: c4.code }, c4.name)))))), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "topicCode" }, "Topic"), /* @__PURE__ */ React169__namespace.default.createElement(Select2, { value: formState.topicCode || "", onValueChange: (val) => handleFormChange("topicCode", val), disabled: !formState.categoryCode || filteredTopics.length === 0 }, /* @__PURE__ */ React169__namespace.default.createElement(SelectTrigger2, null, /* @__PURE__ */ React169__namespace.default.createElement(SelectValue2, { placeholder: "Select a topic..." })), /* @__PURE__ */ React169__namespace.default.createElement(SelectContent2, null, filteredTopics.map((t4) => /* @__PURE__ */ React169__namespace.default.createElement(SelectItem2, { key: t4.code, value: t4.code }, t4.name))))), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Level"), /* @__PURE__ */ React169__namespace.default.createElement(Select2, { value: formState.gradeCode || "", onValueChange: (val) => handleFormChange("gradeCode", val) }, /* @__PURE__ */ React169__namespace.default.createElement(SelectTrigger2, null, /* @__PURE__ */ React169__namespace.default.createElement(SelectValue2, { placeholder: "Select a grade level..." })), /* @__PURE__ */ React169__namespace.default.createElement(SelectContent2, null, gradeLevels.map((g) => /* @__PURE__ */ React169__namespace.default.createElement(SelectItem2, { key: g.code, value: g.code }, g.name)))))), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "keywords" }, "Keywords (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139840
139778
|
Textarea,
|
|
139841
139779
|
{
|
|
139842
139780
|
id: "keywords",
|
|
139843
|
-
value: formState.keywords
|
|
139844
|
-
onChange: (e3) => handleFormChange(
|
|
139845
|
-
"keywords",
|
|
139846
|
-
e3.target.value.split(",").map((s4) => s4.trim())
|
|
139847
|
-
)
|
|
139781
|
+
value: Array.isArray(formState.keywords) ? formState.keywords.join(", ") : "",
|
|
139782
|
+
onChange: (e3) => handleFormChange("keywords", e3.target.value.split(",").map((s4) => s4.trim()))
|
|
139848
139783
|
}
|
|
139849
139784
|
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "stemElements" }, "STEM Elements (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139850
139785
|
Textarea,
|
|
139851
139786
|
{
|
|
139852
139787
|
id: "stemElements",
|
|
139853
|
-
value: formState.stemElements
|
|
139854
|
-
onChange: (e3) => handleFormChange(
|
|
139855
|
-
"stemElements",
|
|
139856
|
-
e3.target.value.split(",").map((s4) => s4.trim())
|
|
139857
|
-
)
|
|
139788
|
+
value: Array.isArray(formState.stemElements) ? formState.stemElements.join(", ") : "",
|
|
139789
|
+
onChange: (e3) => handleFormChange("stemElements", e3.target.value.split(",").map((s4) => s4.trim()))
|
|
139858
139790
|
}
|
|
139859
139791
|
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "bloomLevelsGuideline" }, "Bloom's Guideline (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139860
139792
|
Textarea,
|
|
139861
139793
|
{
|
|
139862
139794
|
id: "bloomLevelsGuideline",
|
|
139863
|
-
value: formState.bloomLevelsGuideline
|
|
139864
|
-
|
|
139865
|
-
) || "",
|
|
139866
|
-
onChange: (e3) => handleFormChange(
|
|
139867
|
-
"bloomLevelsGuideline",
|
|
139868
|
-
e3.target.value.split(",").map((s4) => s4.trim())
|
|
139869
|
-
)
|
|
139795
|
+
value: Array.isArray(formState.bloomLevelsGuideline) ? formState.bloomLevelsGuideline.join(", ") : "",
|
|
139796
|
+
onChange: (e3) => handleFormChange("bloomLevelsGuideline", e3.target.value.split(",").map((s4) => s4.trim()))
|
|
139870
139797
|
}
|
|
139871
|
-
))))
|
|
139798
|
+
)))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, { className: "p-6 pt-4 border-t" }, /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139872
139799
|
Button,
|
|
139873
139800
|
{
|
|
139874
139801
|
type: "button",
|
package/dist/react-ui.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { Q as QuizResultType, U as UserAnswerType, n as PracticeSession, o as Pr
|
|
|
5
5
|
export { j as AchievementDefinition, r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, y as Goal, G as GoalType, t as ImageContextItem, I as ImportError, K as KnowledgeCard, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DyQYZbyX.cjs';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { ReactNode } from 'react';
|
|
8
|
-
export { c as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, e as APIKeyManagerModal, f as ApiKeySettings, m as ApproachManager, B as BloomLevelManager, C as CategoryManager, l as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, n as MetadataImportControls, M as MetadataTabs, h as QuestionFilters, i as QuestionFormDialog, g as QuestionList, a as QuestionPreviewModal, k as QuestionTypeManager, Q as QuizAuthoringTool, b as QuizSettingsForm, d as SCORMExportModal, S as SelectedQuestionsPanel, j as SubjectManager, o as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-
|
|
8
|
+
export { c as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, e as APIKeyManagerModal, f as ApiKeySettings, m as ApproachManager, B as BloomLevelManager, C as CategoryManager, l as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, n as MetadataImportControls, M as MetadataTabs, h as QuestionFilters, i as QuestionFormDialog, g as QuestionList, a as QuestionPreviewModal, k as QuestionTypeManager, Q as QuizAuthoringTool, b as QuizSettingsForm, d as SCORMExportModal, S as SelectedQuestionsPanel, j as SubjectManager, o as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-DrUkr-h7.cjs';
|
|
9
9
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
10
|
import { VariantProps } from 'class-variance-authority';
|
|
11
11
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
package/dist/react-ui.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Q as QuizResultType, U as UserAnswerType, n as PracticeSession, o as Pr
|
|
|
5
5
|
export { j as AchievementDefinition, r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, y as Goal, G as GoalType, t as ImageContextItem, I as ImportError, K as KnowledgeCard, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-Qa_SdE2T.js';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { ReactNode } from 'react';
|
|
8
|
-
export { c as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, e as APIKeyManagerModal, f as ApiKeySettings, m as ApproachManager, B as BloomLevelManager, C as CategoryManager, l as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, n as MetadataImportControls, M as MetadataTabs, h as QuestionFilters, i as QuestionFormDialog, g as QuestionList, a as QuestionPreviewModal, k as QuestionTypeManager, Q as QuizAuthoringTool, b as QuizSettingsForm, d as SCORMExportModal, S as SelectedQuestionsPanel, j as SubjectManager, o as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-
|
|
8
|
+
export { c as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, e as APIKeyManagerModal, f as ApiKeySettings, m as ApproachManager, B as BloomLevelManager, C as CategoryManager, l as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, n as MetadataImportControls, M as MetadataTabs, h as QuestionFilters, i as QuestionFormDialog, g as QuestionList, a as QuestionPreviewModal, k as QuestionTypeManager, Q as QuizAuthoringTool, b as QuizSettingsForm, d as SCORMExportModal, S as SelectedQuestionsPanel, j as SubjectManager, o as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-DZskgIbn.js';
|
|
9
9
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
10
|
import { VariantProps } from 'class-variance-authority';
|
|
11
11
|
import * as LabelPrimitive from '@radix-ui/react-label';
|