@thanh01.pmt/interactive-quiz-kit 1.0.78 → 1.0.80

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,197 +139709,194 @@ function LearningObjectiveManager({
139709
139709
  console.log("[LO Manager] No valid records to import.");
139710
139710
  }
139711
139711
  };
139712
- return (
139713
- // --- START: FIX - Thay đổi cấu trúc layout ---
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-grow flex flex-col min-h-0" }, 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: "flex-grow 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(
139721
- Button,
139722
- {
139723
- variant: "ghost",
139724
- size: "icon",
139725
- onClick: () => handleEditItem(item),
139726
- className: "mr-2"
139727
- },
139728
- /* @__PURE__ */ React169__namespace.default.createElement(PenLine, { className: "h-4 w-4" })
139729
- ), /* @__PURE__ */ React169__namespace.default.createElement(
139730
- Button,
139731
- {
139732
- variant: "ghost",
139733
- size: "icon",
139734
- onClick: () => handleDeleteItem(item),
139735
- className: "text-destructive hover:text-destructive"
139736
- },
139737
- /* @__PURE__ */ React169__namespace.default.createElement(Trash2, { className: "h-4 w-4" })
139738
- )))))))), /* @__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(
139739
- Input,
139740
- {
139741
- id: "code",
139742
- value: formState.code || "",
139743
- onChange: (e3) => handleFormChange(
139744
- "code",
139745
- e3.target.value.toUpperCase()
139746
- ),
139747
- disabled: !!currentItem
139748
- }
139749
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React169__namespace.default.createElement(
139750
- Input,
139751
- {
139752
- id: "name",
139753
- value: formState.name || "",
139754
- onChange: (e3) => handleFormChange(
139755
- "name",
139756
- e3.target.value
139757
- )
139758
- }
139759
- ))), /* @__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(
139760
- Input,
139761
- {
139762
- id: "subject",
139763
- value: formState.subject || "",
139764
- onChange: (e3) => handleFormChange(
139765
- "subject",
139766
- e3.target.value
139767
- )
139768
- }
139769
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139770
- EditableCombobox,
139771
- {
139772
- options: subjects.map((s4) => ({
139773
- value: s4.code,
139774
- label: s4.name
139775
- })),
139776
- value: formState.subjectCode || "",
139777
- onChange: (val) => handleFormChange("subjectCode", val),
139778
- placeholder: "Select a subject..."
139779
- }
139780
- ))), /* @__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(
139781
- Input,
139782
- {
139783
- id: "category",
139784
- value: formState.category || "",
139785
- onChange: (e3) => handleFormChange(
139786
- "category",
139787
- e3.target.value
139788
- )
139789
- }
139790
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "categoryCode" }, "Category Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139791
- Input,
139792
- {
139793
- id: "categoryCode",
139794
- value: formState.categoryCode || "",
139795
- onChange: (e3) => handleFormChange(
139796
- "categoryCode",
139797
- e3.target.value
139798
- )
139799
- }
139800
- ))), /* @__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(
139801
- Input,
139802
- {
139803
- id: "topic",
139804
- value: formState.topic || "",
139805
- onChange: (e3) => handleFormChange(
139806
- "topic",
139807
- e3.target.value
139808
- )
139809
- }
139810
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "topicCode" }, "Topic Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139811
- Input,
139812
- {
139813
- id: "topicCode",
139814
- value: formState.topicCode || "",
139815
- onChange: (e3) => handleFormChange(
139816
- "topicCode",
139817
- e3.target.value
139818
- )
139819
- }
139820
- ))), /* @__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(
139821
- Input,
139822
- {
139823
- id: "grade",
139824
- value: formState.grade || "",
139825
- onChange: (e3) => handleFormChange(
139826
- "grade",
139827
- e3.target.value
139828
- )
139829
- }
139830
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Code"), /* @__PURE__ */ React169__namespace.default.createElement(
139831
- Input,
139832
- {
139833
- id: "gradeCode",
139834
- value: formState.gradeCode || "",
139835
- onChange: (e3) => handleFormChange(
139836
- "gradeCode",
139837
- e3.target.value
139838
- )
139839
- }
139840
- ))), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "keywords" }, "Keywords (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
139841
- Textarea,
139842
- {
139843
- id: "keywords",
139844
- value: formState.keywords?.join(", ") || "",
139845
- onChange: (e3) => handleFormChange(
139846
- "keywords",
139847
- e3.target.value.split(",").map((s4) => s4.trim())
139848
- )
139849
- }
139850
- )), /* @__PURE__ */ React169__namespace.default.createElement("div", null, /* @__PURE__ */ React169__namespace.default.createElement(Label2, { htmlFor: "stemElements" }, "STEM Elements (comma-separated)"), /* @__PURE__ */ React169__namespace.default.createElement(
139851
- Textarea,
139852
- {
139853
- id: "stemElements",
139854
- value: formState.stemElements?.join(", ") || "",
139855
- onChange: (e3) => handleFormChange(
139856
- "stemElements",
139857
- e3.target.value.split(",").map((s4) => s4.trim())
139858
- )
139859
- }
139860
- )), /* @__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(
139861
- Textarea,
139862
- {
139863
- id: "bloomLevelsGuideline",
139864
- value: formState.bloomLevelsGuideline?.join(
139865
- ", "
139866
- ) || "",
139867
- onChange: (e3) => handleFormChange(
139868
- "bloomLevelsGuideline",
139869
- e3.target.value.split(",").map((s4) => s4.trim())
139870
- )
139871
- }
139872
- ))), /* @__PURE__ */ React169__namespace.default.createElement(DialogFooter, null, /* @__PURE__ */ React169__namespace.default.createElement(
139873
- Button,
139874
- {
139875
- type: "button",
139876
- variant: "outline",
139877
- onClick: () => setIsDialogOpen(false),
139878
- disabled: isPending
139879
- },
139880
- "Cancel"
139881
- ), /* @__PURE__ */ React169__namespace.default.createElement(
139882
- Button,
139883
- {
139884
- type: "submit",
139885
- onClick: handleSubmit,
139886
- disabled: isPending || !formState.name?.trim() || !formState.code?.trim()
139887
- },
139888
- isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
139889
- " ",
139890
- "Save"
139891
- )))), /* @__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(
139892
- AlertDialogAction2,
139893
- {
139894
- onClick: confirmDelete,
139895
- disabled: isPending,
139896
- className: "bg-destructive hover:bg-destructive/90"
139897
- },
139898
- isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
139899
- " ",
139900
- "Delete"
139901
- ))))))
139902
- );
139712
+ return /* @__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(
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, { 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("div", { className: "flex flex-col items-center justify-center h-full text-center p-8 border rounded-lg bg-muted/50" }, /* @__PURE__ */ React169__namespace.default.createElement(Lightbulb, { className: "h-12 w-12 text-muted-foreground mb-4" }), /* @__PURE__ */ React169__namespace.default.createElement("h3", { className: "text-xl font-semibold" }, "No Learning Objectives"), /* @__PURE__ */ React169__namespace.default.createElement("p", { className: "text-muted-foreground mt-2" }, "Get started by adding a new learning objective or importing a list.")) : /* @__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(
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" }, /* @__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(
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, { className: "p-6 pt-0" }, /* @__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
+ )))));
139903
139900
  }
139904
139901
 
139905
139902
  // src/react-ui/components/metadata/ContextManager.tsx