@thanh01.pmt/interactive-quiz-kit 1.0.81 → 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/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
@@ -102026,17 +102026,13 @@ TopicDataService.HEADER_MAP = {
102026
102026
  "LO Description": "description",
102027
102027
  "Subject": "subject",
102028
102028
  "Subject Code": "subjectCode",
102029
- // New
102030
102029
  "Category": "category",
102031
102030
  "Category Code": "categoryCode",
102032
- // New
102033
102031
  "Topic": "topic",
102034
102032
  "Topic Code": "topicCode",
102035
- // New
102036
102033
  "Keywords": "keywords",
102037
102034
  "Grade": "grade",
102038
102035
  "Grade Code": "gradeCode",
102039
- // New
102040
102036
  "STEM Element(s)": "stemElements",
102041
102037
  "Bloom\u2019s Level(s) Guideline": "bloomLevelsGuideline"
102042
102038
  };
@@ -139029,7 +139025,7 @@ function TopicManager({
139029
139025
  setCurrentItem(topic);
139030
139026
  setItemName(topic.name);
139031
139027
  setItemCode(topic.code);
139032
- setSelectedSubjectCode(topic.subjectCode);
139028
+ setSelectedSubjectCode(topic.subjectCode ?? "");
139033
139029
  setIsDialogOpen(true);
139034
139030
  };
139035
139031
  const handleDeleteItem = (topic) => {
@@ -139107,7 +139103,7 @@ function TopicManager({
139107
139103
  const getSubjectName = (subjectCode) => {
139108
139104
  return subjects.find((s4) => s4.code === subjectCode)?.name || "N/A";
139109
139105
  };
139110
- 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"))))));
139111
139107
  }
139112
139108
 
139113
139109
  // src/react-ui/components/metadata/CategoryManager.tsx
@@ -139505,6 +139501,9 @@ init_react_shim();
139505
139501
  function LearningObjectiveManager({
139506
139502
  initialData,
139507
139503
  subjects: subjectsProp,
139504
+ categories: categoriesProp,
139505
+ topics: topicsProp,
139506
+ gradeLevels: gradeLevelsProp,
139508
139507
  isLoading: isLoadingProp,
139509
139508
  onAdd,
139510
139509
  onUpdate,
@@ -139513,6 +139512,9 @@ function LearningObjectiveManager({
139513
139512
  }) {
139514
139513
  const [items, setItems] = React169.useState([]);
139515
139514
  const [subjects, setSubjects] = React169.useState([]);
139515
+ const [categories, setCategories] = React169.useState([]);
139516
+ const [topics, setTopics] = React169.useState([]);
139517
+ const [gradeLevels, setGradeLevels] = React169.useState([]);
139516
139518
  const [isLoading, setIsLoading] = React169.useState(true);
139517
139519
  const [isDialogOpen, setIsDialogOpen] = React169.useState(false);
139518
139520
  const [isAlertOpen, setIsAlertOpen] = React169.useState(false);
@@ -139547,13 +139549,34 @@ function LearningObjectiveManager({
139547
139549
  if (isControlled) {
139548
139550
  setItems(initialData || []);
139549
139551
  setSubjects(subjectsProp || []);
139552
+ setCategories(categoriesProp || []);
139553
+ setTopics(topicsProp || []);
139554
+ setGradeLevels(gradeLevelsProp || []);
139550
139555
  setIsLoading(isLoadingProp || false);
139551
139556
  } else {
139552
139557
  refreshData();
139553
139558
  }
139554
- }, [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]);
139555
139568
  const handleFormChange = (field, value) => {
139556
- setFormState((prev) => ({ ...prev, [field]: value }));
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
+ });
139557
139580
  };
139558
139581
  const handleAddItem = () => {
139559
139582
  setCurrentItem(null);
@@ -139564,7 +139587,7 @@ function LearningObjectiveManager({
139564
139587
  };
139565
139588
  const handleEditItem = (item) => {
139566
139589
  setCurrentItem(item);
139567
- setFormState(item);
139590
+ setFormState({ ...item });
139568
139591
  setIsDialogOpen(true);
139569
139592
  };
139570
139593
  const handleDeleteItem = (item) => {
@@ -139665,7 +139688,7 @@ function LearningObjectiveManager({
139665
139688
  if (typeof rec["LO ID"] === "string" && rec["LO ID"].trim() && typeof rec["LO Description"] === "string" && rec["LO Description"].trim()) {
139666
139689
  acc.valid.push({
139667
139690
  code: rec["LO ID"],
139668
- name: rec["LO Name"],
139691
+ name: rec["LO Name"] || rec["LO Description"],
139669
139692
  description: rec["LO Description"],
139670
139693
  subject: rec["Subject"] || "",
139671
139694
  subjectCode: rec["Subject Code"] || rec["Subject"],
@@ -139733,141 +139756,43 @@ function LearningObjectiveManager({
139733
139756
  className: "text-destructive hover:text-destructive"
139734
139757
  },
139735
139758
  /* @__PURE__ */ React169__namespace.default.createElement(Trash2, { className: "h-4 w-4" })
139736
- ))))))))), /* @__PURE__ */ React169__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React169__namespace.default.createElement(DialogContent2, { className: "sm:max-w-2xl" }, /* @__PURE__ */ React169__namespace.default.createElement(ScrollArea2, { className: "max-h-[85vh]" }, /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React169__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React169__namespace.default.createElement(DialogTitle2, null, currentItem ? "Edit Learning Objective" : "Add New Learning Objective")), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "grid gap-4 py-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" }, "Code"), /* @__PURE__ */ React169__namespace.default.createElement(
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(
139737
139760
  Input,
139738
139761
  {
139739
139762
  id: "code",
139740
139763
  value: formState.code || "",
139741
- onChange: (e3) => handleFormChange(
139742
- "code",
139743
- e3.target.value.toUpperCase()
139744
- ),
139764
+ onChange: (e3) => handleFormChange("code", e3.target.value.toUpperCase()),
139745
139765
  disabled: !!currentItem
139746
139766
  }
139747
- )), /* @__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(
139748
139768
  Input,
139749
139769
  {
139750
139770
  id: "name",
139751
139771
  value: formState.name || "",
139752
- onChange: (e3) => handleFormChange(
139753
- "name",
139754
- e3.target.value
139755
- )
139756
- }
139757
- ))), /* @__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(
139758
- Input,
139759
- {
139760
- id: "subject",
139761
- value: formState.subject || "",
139762
- onChange: (e3) => handleFormChange(
139763
- "subject",
139764
- e3.target.value
139765
- )
139766
- }
139767
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139768
- EditableCombobox,
139769
- {
139770
- options: subjects.map((s4) => ({
139771
- value: s4.code,
139772
- label: s4.name
139773
- })),
139774
- value: formState.subjectCode || "",
139775
- onChange: (val) => handleFormChange("subjectCode", val),
139776
- placeholder: "Select a subject..."
139777
- }
139778
- ))), /* @__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(
139779
- Input,
139780
- {
139781
- id: "category",
139782
- value: formState.category || "",
139783
- onChange: (e3) => handleFormChange(
139784
- "category",
139785
- e3.target.value
139786
- )
139772
+ onChange: (e3) => handleFormChange("name", e3.target.value)
139787
139773
  }
139788
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "categoryCode" }, "Category Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139789
- Input,
139790
- {
139791
- id: "categoryCode",
139792
- value: formState.categoryCode || "",
139793
- onChange: (e3) => handleFormChange(
139794
- "categoryCode",
139795
- e3.target.value
139796
- )
139797
- }
139798
- ))), /* @__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(
139799
- Input,
139800
- {
139801
- id: "topic",
139802
- value: formState.topic || "",
139803
- onChange: (e3) => handleFormChange(
139804
- "topic",
139805
- e3.target.value
139806
- )
139807
- }
139808
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "topicCode" }, "Topic Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139809
- Input,
139810
- {
139811
- id: "topicCode",
139812
- value: formState.topicCode || "",
139813
- onChange: (e3) => handleFormChange(
139814
- "topicCode",
139815
- e3.target.value
139816
- )
139817
- }
139818
- ))), /* @__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(
139819
- Input,
139820
- {
139821
- id: "grade",
139822
- value: formState.grade || "",
139823
- onChange: (e3) => handleFormChange(
139824
- "grade",
139825
- e3.target.value
139826
- )
139827
- }
139828
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139829
- Input,
139830
- {
139831
- id: "gradeCode",
139832
- value: formState.gradeCode || "",
139833
- onChange: (e3) => handleFormChange(
139834
- "gradeCode",
139835
- e3.target.value
139836
- )
139837
- }
139838
- ))), /* @__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(
139839
139775
  Textarea,
139840
139776
  {
139841
139777
  id: "keywords",
139842
- value: formState.keywords?.join(", ") || "",
139843
- onChange: (e3) => handleFormChange(
139844
- "keywords",
139845
- e3.target.value.split(",").map((s4) => s4.trim())
139846
- )
139778
+ value: Array.isArray(formState.keywords) ? formState.keywords.join(", ") : "",
139779
+ onChange: (e3) => handleFormChange("keywords", e3.target.value.split(",").map((s4) => s4.trim()))
139847
139780
  }
139848
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(
139849
139782
  Textarea,
139850
139783
  {
139851
139784
  id: "stemElements",
139852
- value: formState.stemElements?.join(", ") || "",
139853
- onChange: (e3) => handleFormChange(
139854
- "stemElements",
139855
- e3.target.value.split(",").map((s4) => s4.trim())
139856
- )
139785
+ value: Array.isArray(formState.stemElements) ? formState.stemElements.join(", ") : "",
139786
+ onChange: (e3) => handleFormChange("stemElements", e3.target.value.split(",").map((s4) => s4.trim()))
139857
139787
  }
139858
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(
139859
139789
  Textarea,
139860
139790
  {
139861
139791
  id: "bloomLevelsGuideline",
139862
- value: formState.bloomLevelsGuideline?.join(
139863
- ", "
139864
- ) || "",
139865
- onChange: (e3) => handleFormChange(
139866
- "bloomLevelsGuideline",
139867
- e3.target.value.split(",").map((s4) => s4.trim())
139868
- )
139792
+ value: Array.isArray(formState.bloomLevelsGuideline) ? formState.bloomLevelsGuideline.join(", ") : "",
139793
+ onChange: (e3) => handleFormChange("bloomLevelsGuideline", e3.target.value.split(",").map((s4) => s4.trim()))
139869
139794
  }
139870
- ))))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, { className: "p-6 pt-0" }, /* @__PURE__ */ React169__namespace.default.createElement(
139795
+ )))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, { className: "p-6 pt-4 border-t" }, /* @__PURE__ */ React169__namespace.default.createElement(
139871
139796
  Button,
139872
139797
  {
139873
139798
  type: "button",
@@ -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-CexT11VU.cjs';
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';
@@ -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-Bj78wmSz.js';
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';