@thanh01.pmt/interactive-quiz-kit 1.0.82 → 1.0.83
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 +1111 -1187
- package/dist/authoring.d.cts +1 -1
- package/dist/authoring.d.ts +1 -1
- package/dist/authoring.mjs +840 -916
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/react-ui.cjs +44 -120
- package/dist/react-ui.d.cts +1 -1
- package/dist/react-ui.d.ts +1 -1
- package/dist/react-ui.mjs +44 -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);
|
|
@@ -139543,13 +139549,34 @@ function LearningObjectiveManager({
|
|
|
139543
139549
|
if (isControlled) {
|
|
139544
139550
|
setItems(initialData || []);
|
|
139545
139551
|
setSubjects(subjectsProp || []);
|
|
139552
|
+
setCategories(categoriesProp || []);
|
|
139553
|
+
setTopics(topicsProp || []);
|
|
139554
|
+
setGradeLevels(gradeLevelsProp || []);
|
|
139546
139555
|
setIsLoading(isLoadingProp || false);
|
|
139547
139556
|
} else {
|
|
139548
139557
|
refreshData();
|
|
139549
139558
|
}
|
|
139550
|
-
}, [isControlled, initialData, subjectsProp, isLoadingProp]);
|
|
139559
|
+
}, [isControlled, initialData, subjectsProp, categoriesProp, topicsProp, gradeLevelsProp, isLoadingProp]);
|
|
139560
|
+
const filteredCategories = React169.useMemo(() => {
|
|
139561
|
+
if (!formState.subjectCode) return [];
|
|
139562
|
+
return categories.filter((c4) => c4.subjectCode === formState.subjectCode);
|
|
139563
|
+
}, [formState.subjectCode, categories]);
|
|
139564
|
+
const filteredTopics = React169.useMemo(() => {
|
|
139565
|
+
if (!formState.categoryCode) return [];
|
|
139566
|
+
return topics.filter((t4) => t4.categoryCode === formState.categoryCode);
|
|
139567
|
+
}, [formState.categoryCode, topics]);
|
|
139551
139568
|
const handleFormChange = (field, value) => {
|
|
139552
|
-
setFormState((prev) =>
|
|
139569
|
+
setFormState((prev) => {
|
|
139570
|
+
const newState = { ...prev, [field]: value };
|
|
139571
|
+
if (field === "subjectCode") {
|
|
139572
|
+
newState.categoryCode = "";
|
|
139573
|
+
newState.topicCode = "";
|
|
139574
|
+
}
|
|
139575
|
+
if (field === "categoryCode") {
|
|
139576
|
+
newState.topicCode = "";
|
|
139577
|
+
}
|
|
139578
|
+
return newState;
|
|
139579
|
+
});
|
|
139553
139580
|
};
|
|
139554
139581
|
const handleAddItem = () => {
|
|
139555
139582
|
setCurrentItem(null);
|
|
@@ -139560,11 +139587,7 @@ function LearningObjectiveManager({
|
|
|
139560
139587
|
};
|
|
139561
139588
|
const handleEditItem = (item) => {
|
|
139562
139589
|
setCurrentItem(item);
|
|
139563
|
-
|
|
139564
|
-
setFormState({
|
|
139565
|
-
...item,
|
|
139566
|
-
subject: subject ? subject.name : item.subject || ""
|
|
139567
|
-
});
|
|
139590
|
+
setFormState({ ...item });
|
|
139568
139591
|
setIsDialogOpen(true);
|
|
139569
139592
|
};
|
|
139570
139593
|
const handleDeleteItem = (item) => {
|
|
@@ -139666,7 +139689,6 @@ function LearningObjectiveManager({
|
|
|
139666
139689
|
acc.valid.push({
|
|
139667
139690
|
code: rec["LO ID"],
|
|
139668
139691
|
name: rec["LO Name"] || rec["LO Description"],
|
|
139669
|
-
// Use description if name is missing
|
|
139670
139692
|
description: rec["LO Description"],
|
|
139671
139693
|
subject: rec["Subject"] || "",
|
|
139672
139694
|
subjectCode: rec["Subject Code"] || rec["Subject"],
|
|
@@ -139734,141 +139756,43 @@ function LearningObjectiveManager({
|
|
|
139734
139756
|
className: "text-destructive hover:text-destructive"
|
|
139735
139757
|
},
|
|
139736
139758
|
/* @__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
|
|
139759
|
+
))))))))), /* @__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
139760
|
Input,
|
|
139739
139761
|
{
|
|
139740
139762
|
id: "code",
|
|
139741
139763
|
value: formState.code || "",
|
|
139742
|
-
onChange: (e3) => handleFormChange(
|
|
139743
|
-
"code",
|
|
139744
|
-
e3.target.value.toUpperCase()
|
|
139745
|
-
),
|
|
139764
|
+
onChange: (e3) => handleFormChange("code", e3.target.value.toUpperCase()),
|
|
139746
139765
|
disabled: !!currentItem
|
|
139747
139766
|
}
|
|
139748
|
-
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139767
|
+
)), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "name" }, "LO Name (Description)"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139749
139768
|
Input,
|
|
139750
139769
|
{
|
|
139751
139770
|
id: "name",
|
|
139752
139771
|
value: formState.name || "",
|
|
139753
|
-
onChange: (e3) => handleFormChange(
|
|
139754
|
-
"name",
|
|
139755
|
-
e3.target.value
|
|
139756
|
-
)
|
|
139757
|
-
}
|
|
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: "subject" }, "Subject Name"), /* @__PURE__ */ React169__namespace.default.createElement(
|
|
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
|
-
)
|
|
139772
|
+
onChange: (e3) => handleFormChange("name", e3.target.value)
|
|
139818
139773
|
}
|
|
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: "
|
|
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(
|
|
139774
|
+
))), /* @__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 }, /* @__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 }, /* @__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
139775
|
Textarea,
|
|
139841
139776
|
{
|
|
139842
139777
|
id: "keywords",
|
|
139843
|
-
value: formState.keywords
|
|
139844
|
-
onChange: (e3) => handleFormChange(
|
|
139845
|
-
"keywords",
|
|
139846
|
-
e3.target.value.split(",").map((s4) => s4.trim())
|
|
139847
|
-
)
|
|
139778
|
+
value: Array.isArray(formState.keywords) ? formState.keywords.join(", ") : "",
|
|
139779
|
+
onChange: (e3) => handleFormChange("keywords", e3.target.value.split(",").map((s4) => s4.trim()))
|
|
139848
139780
|
}
|
|
139849
139781
|
)), /* @__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
139782
|
Textarea,
|
|
139851
139783
|
{
|
|
139852
139784
|
id: "stemElements",
|
|
139853
|
-
value: formState.stemElements
|
|
139854
|
-
onChange: (e3) => handleFormChange(
|
|
139855
|
-
"stemElements",
|
|
139856
|
-
e3.target.value.split(",").map((s4) => s4.trim())
|
|
139857
|
-
)
|
|
139785
|
+
value: Array.isArray(formState.stemElements) ? formState.stemElements.join(", ") : "",
|
|
139786
|
+
onChange: (e3) => handleFormChange("stemElements", e3.target.value.split(",").map((s4) => s4.trim()))
|
|
139858
139787
|
}
|
|
139859
139788
|
)), /* @__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
139789
|
Textarea,
|
|
139861
139790
|
{
|
|
139862
139791
|
id: "bloomLevelsGuideline",
|
|
139863
|
-
value: formState.bloomLevelsGuideline
|
|
139864
|
-
|
|
139865
|
-
) || "",
|
|
139866
|
-
onChange: (e3) => handleFormChange(
|
|
139867
|
-
"bloomLevelsGuideline",
|
|
139868
|
-
e3.target.value.split(",").map((s4) => s4.trim())
|
|
139869
|
-
)
|
|
139792
|
+
value: Array.isArray(formState.bloomLevelsGuideline) ? formState.bloomLevelsGuideline.join(", ") : "",
|
|
139793
|
+
onChange: (e3) => handleFormChange("bloomLevelsGuideline", e3.target.value.split(",").map((s4) => s4.trim()))
|
|
139870
139794
|
}
|
|
139871
|
-
))))
|
|
139795
|
+
)))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, { className: "p-6 pt-4 border-t" }, /* @__PURE__ */ React169__namespace.default.createElement(
|
|
139872
139796
|
Button,
|
|
139873
139797
|
{
|
|
139874
139798
|
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';
|