@thanh01.pmt/interactive-quiz-kit 1.0.77 → 1.0.79

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/react-ui.cjs CHANGED
@@ -139709,194 +139709,200 @@ function LearningObjectiveManager({
139709
139709
  console.log("[LO Manager] No valid records to import.");
139710
139710
  }
139711
139711
  };
139712
- 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(Lightbulb, { className: "mr-2 h-5 w-5 text-primary" }), " ", "Manage Learning Objectives"), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex items-center gap-2" }, onBulkAdd && /* @__PURE__ */ React169__namespace.default.createElement(
139713
- MetadataImportControls,
139714
- {
139715
- metadataName: "Learning Objectives",
139716
- onImport: handleImport
139717
- }
139718
- ), /* @__PURE__ */ React169__namespace.default.createElement(Button, { onClick: handleAddItem, size: "sm" }, /* @__PURE__ */ React169__namespace.default.createElement(CirclePlus, { className: "mr-2 h-4 w-4" }), " Add Learning Objective")))), /* @__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" })) : items.length === 0 ? /* @__PURE__ */ React169__namespace.default.createElement("p", { className: "text-center text-muted-foreground py-4" }, "No Learning Objectives found.") : /* @__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, null, "Topic"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, { className: "text-right w-[120px]" }, "Actions"))), /* @__PURE__ */ React169__namespace.default.createElement(TableBody, null, items.map((item) => /* @__PURE__ */ React169__namespace.default.createElement(TableRow, { key: item.id }, /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-mono text-xs" }, item.code), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-medium" }, item.name), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, null, item.subject || item.subjectCode), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, null, item.topic || item.topicCode), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React169__namespace.default.createElement(
139719
- Button,
139720
- {
139721
- variant: "ghost",
139722
- size: "icon",
139723
- onClick: () => handleEditItem(item),
139724
- className: "mr-2"
139725
- },
139726
- /* @__PURE__ */ React169__namespace.default.createElement(PenLine, { className: "h-4 w-4" })
139727
- ), /* @__PURE__ */ React169__namespace.default.createElement(
139728
- Button,
139729
- {
139730
- variant: "ghost",
139731
- size: "icon",
139732
- onClick: () => handleDeleteItem(item),
139733
- className: "text-destructive hover:text-destructive"
139734
- },
139735
- /* @__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 max-h-[90vh] overflow-y-auto" }, /* @__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(
139737
- Input,
139738
- {
139739
- id: "code",
139740
- value: formState.code || "",
139741
- onChange: (e3) => handleFormChange(
139742
- "code",
139743
- e3.target.value.toUpperCase()
139744
- ),
139745
- disabled: !!currentItem
139746
- }
139747
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React169__namespace.default.createElement(
139748
- Input,
139749
- {
139750
- id: "name",
139751
- 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
- )
139787
- }
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(
139839
- Textarea,
139840
- {
139841
- id: "keywords",
139842
- value: formState.keywords?.join(", ") || "",
139843
- onChange: (e3) => handleFormChange(
139844
- "keywords",
139845
- e3.target.value.split(",").map((s4) => s4.trim())
139846
- )
139847
- }
139848
- )), /* @__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
- Textarea,
139850
- {
139851
- id: "stemElements",
139852
- value: formState.stemElements?.join(", ") || "",
139853
- onChange: (e3) => handleFormChange(
139854
- "stemElements",
139855
- e3.target.value.split(",").map((s4) => s4.trim())
139856
- )
139857
- }
139858
- )), /* @__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
- Textarea,
139860
- {
139861
- 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
- )
139869
- }
139870
- ))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(
139871
- Button,
139872
- {
139873
- type: "button",
139874
- variant: "outline",
139875
- onClick: () => setIsDialogOpen(false),
139876
- disabled: isPending
139877
- },
139878
- "Cancel"
139879
- ), /* @__PURE__ */ React169__namespace.default.createElement(
139880
- Button,
139881
- {
139882
- type: "submit",
139883
- onClick: handleSubmit,
139884
- disabled: isPending || !formState.name?.trim() || !formState.code?.trim()
139885
- },
139886
- isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
139887
- " ",
139888
- "Save"
139889
- )))), /* @__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 "', itemToDelete?.name, '".')), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogCancel2, { disabled: isPending }, "Cancel"), /* @__PURE__ */ React169__namespace.default.createElement(
139890
- AlertDialogAction2,
139891
- {
139892
- onClick: confirmDelete,
139893
- disabled: isPending,
139894
- className: "bg-destructive hover:bg-destructive/90"
139895
- },
139896
- isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
139897
- " ",
139898
- "Delete"
139899
- ))))));
139712
+ return (
139713
+ // --- START: FIX ---
139714
+ /* @__PURE__ */ React169__namespace.default.createElement(Card, { className: "flex flex-col h-full" }, /* @__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(Lightbulb, { className: "mr-2 h-5 w-5 text-primary" }), " ", "Manage Learning Objectives"), /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex items-center gap-2" }, onBulkAdd && /* @__PURE__ */ React169__namespace.default.createElement(
139715
+ MetadataImportControls,
139716
+ {
139717
+ metadataName: "Learning Objectives",
139718
+ onImport: handleImport
139719
+ }
139720
+ ), /* @__PURE__ */ React169__namespace.default.createElement(Button, { onClick: handleAddItem, size: "sm" }, /* @__PURE__ */ React169__namespace.default.createElement(CirclePlus, { className: "mr-2 h-4 w-4" }), " Add Learning Objective")))), /* @__PURE__ */ React169__namespace.default.createElement(CardContent, { className: "flex-1 flex flex-col min-h-0" }, isLoading ? /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex justify-center items-center h-full" }, /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "h-8 w-8 animate-spin text-primary" })) : items.length === 0 ? /* @__PURE__ */ React169__namespace.default.createElement("p", { className: "text-center text-muted-foreground py-4" }, "No Learning Objectives found.") : (
139721
+ // --- START: FIX ---
139722
+ /* @__PURE__ */ React169__namespace.default.createElement("div", { className: "flex-1 relative border rounded-md" }, /* @__PURE__ */ React169__namespace.default.createElement(ScrollArea2, { className: "absolute inset-0" }, /* @__PURE__ */ React169__namespace.default.createElement(Table3, null, /* @__PURE__ */ React169__namespace.default.createElement(TableHeader, { className: "sticky top-0 bg-card z-10" }, /* @__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, null, "Topic"), /* @__PURE__ */ React169__namespace.default.createElement(TableHead, { className: "text-right w-[120px]" }, "Actions"))), /* @__PURE__ */ React169__namespace.default.createElement(TableBody, null, items.map((item) => /* @__PURE__ */ React169__namespace.default.createElement(TableRow, { key: item.id }, /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-mono text-xs" }, item.code), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "font-medium" }, item.name), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, null, item.subject || item.subjectCode), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, null, item.topic || item.topicCode), /* @__PURE__ */ React169__namespace.default.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React169__namespace.default.createElement(
139723
+ Button,
139724
+ {
139725
+ variant: "ghost",
139726
+ size: "icon",
139727
+ onClick: () => handleEditItem(item),
139728
+ className: "mr-2"
139729
+ },
139730
+ /* @__PURE__ */ React169__namespace.default.createElement(PenLine, { className: "h-4 w-4" })
139731
+ ), /* @__PURE__ */ React169__namespace.default.createElement(
139732
+ Button,
139733
+ {
139734
+ variant: "ghost",
139735
+ size: "icon",
139736
+ onClick: () => handleDeleteItem(item),
139737
+ className: "text-destructive hover:text-destructive"
139738
+ },
139739
+ /* @__PURE__ */ React169__namespace.default.createElement(Trash2, { className: "h-4 w-4" })
139740
+ ))))))))
139741
+ ), /* @__PURE__ */ React169__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React169__namespace.default.createElement(DialogContent2, { className: "sm:max-w-2xl max-h-[90vh] overflow-y-auto" }, /* @__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(
139742
+ Input,
139743
+ {
139744
+ id: "code",
139745
+ value: formState.code || "",
139746
+ onChange: (e3) => handleFormChange(
139747
+ "code",
139748
+ e3.target.value.toUpperCase()
139749
+ ),
139750
+ disabled: !!currentItem
139751
+ }
139752
+ )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React169__namespace.default.createElement(
139753
+ Input,
139754
+ {
139755
+ id: "name",
139756
+ value: formState.name || "",
139757
+ onChange: (e3) => handleFormChange(
139758
+ "name",
139759
+ e3.target.value
139760
+ )
139761
+ }
139762
+ ))), /* @__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(
139763
+ Input,
139764
+ {
139765
+ id: "subject",
139766
+ value: formState.subject || "",
139767
+ onChange: (e3) => handleFormChange(
139768
+ "subject",
139769
+ e3.target.value
139770
+ )
139771
+ }
139772
+ )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139773
+ EditableCombobox,
139774
+ {
139775
+ options: subjects.map((s4) => ({
139776
+ value: s4.code,
139777
+ label: s4.name
139778
+ })),
139779
+ value: formState.subjectCode || "",
139780
+ onChange: (val) => handleFormChange("subjectCode", val),
139781
+ placeholder: "Select a subject..."
139782
+ }
139783
+ ))), /* @__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(
139784
+ Input,
139785
+ {
139786
+ id: "category",
139787
+ value: formState.category || "",
139788
+ onChange: (e3) => handleFormChange(
139789
+ "category",
139790
+ e3.target.value
139791
+ )
139792
+ }
139793
+ )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "categoryCode" }, "Category Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139794
+ Input,
139795
+ {
139796
+ id: "categoryCode",
139797
+ value: formState.categoryCode || "",
139798
+ onChange: (e3) => handleFormChange(
139799
+ "categoryCode",
139800
+ e3.target.value
139801
+ )
139802
+ }
139803
+ ))), /* @__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(
139804
+ Input,
139805
+ {
139806
+ id: "topic",
139807
+ value: formState.topic || "",
139808
+ onChange: (e3) => handleFormChange(
139809
+ "topic",
139810
+ e3.target.value
139811
+ )
139812
+ }
139813
+ )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "topicCode" }, "Topic Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139814
+ Input,
139815
+ {
139816
+ id: "topicCode",
139817
+ value: formState.topicCode || "",
139818
+ onChange: (e3) => handleFormChange(
139819
+ "topicCode",
139820
+ e3.target.value
139821
+ )
139822
+ }
139823
+ ))), /* @__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(
139824
+ Input,
139825
+ {
139826
+ id: "grade",
139827
+ value: formState.grade || "",
139828
+ onChange: (e3) => handleFormChange(
139829
+ "grade",
139830
+ e3.target.value
139831
+ )
139832
+ }
139833
+ )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139834
+ Input,
139835
+ {
139836
+ id: "gradeCode",
139837
+ value: formState.gradeCode || "",
139838
+ onChange: (e3) => handleFormChange(
139839
+ "gradeCode",
139840
+ e3.target.value
139841
+ )
139842
+ }
139843
+ ))), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "keywords" }, "Keywords (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
139844
+ Textarea,
139845
+ {
139846
+ id: "keywords",
139847
+ value: formState.keywords?.join(", ") || "",
139848
+ onChange: (e3) => handleFormChange(
139849
+ "keywords",
139850
+ e3.target.value.split(",").map((s4) => s4.trim())
139851
+ )
139852
+ }
139853
+ )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "stemElements" }, "STEM Elements (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
139854
+ Textarea,
139855
+ {
139856
+ id: "stemElements",
139857
+ value: formState.stemElements?.join(", ") || "",
139858
+ onChange: (e3) => handleFormChange(
139859
+ "stemElements",
139860
+ e3.target.value.split(",").map((s4) => s4.trim())
139861
+ )
139862
+ }
139863
+ )), /* @__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(
139864
+ Textarea,
139865
+ {
139866
+ id: "bloomLevelsGuideline",
139867
+ value: formState.bloomLevelsGuideline?.join(
139868
+ ", "
139869
+ ) || "",
139870
+ onChange: (e3) => handleFormChange(
139871
+ "bloomLevelsGuideline",
139872
+ e3.target.value.split(",").map((s4) => s4.trim())
139873
+ )
139874
+ }
139875
+ ))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(
139876
+ Button,
139877
+ {
139878
+ type: "button",
139879
+ variant: "outline",
139880
+ onClick: () => setIsDialogOpen(false),
139881
+ disabled: isPending
139882
+ },
139883
+ "Cancel"
139884
+ ), /* @__PURE__ */ React169__namespace.default.createElement(
139885
+ Button,
139886
+ {
139887
+ type: "submit",
139888
+ onClick: handleSubmit,
139889
+ disabled: isPending || !formState.name?.trim() || !formState.code?.trim()
139890
+ },
139891
+ isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
139892
+ " ",
139893
+ "Save"
139894
+ )))), /* @__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 "', itemToDelete?.name, '".')), /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(AlertDialogCancel2, { disabled: isPending }, "Cancel"), /* @__PURE__ */ React169__namespace.default.createElement(
139895
+ AlertDialogAction2,
139896
+ {
139897
+ onClick: confirmDelete,
139898
+ disabled: isPending,
139899
+ className: "bg-destructive hover:bg-destructive/90"
139900
+ },
139901
+ isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
139902
+ " ",
139903
+ "Delete"
139904
+ ))))))
139905
+ );
139900
139906
  }
139901
139907
 
139902
139908
  // src/react-ui/components/metadata/ContextManager.tsx