@thanh01.pmt/interactive-quiz-kit 1.0.79 → 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/authoring.cjs +188 -194
- package/dist/authoring.mjs +188 -194
- package/dist/react-ui.cjs +188 -194
- package/dist/react-ui.mjs +188 -194
- package/package.json +1 -1
package/dist/react-ui.cjs
CHANGED
|
@@ -139709,200 +139709,194 @@ function LearningObjectiveManager({
|
|
|
139709
139709
|
console.log("[LO Manager] No valid records to import.");
|
|
139710
139710
|
}
|
|
139711
139711
|
};
|
|
139712
|
-
return (
|
|
139713
|
-
|
|
139714
|
-
|
|
139715
|
-
|
|
139716
|
-
|
|
139717
|
-
|
|
139718
|
-
|
|
139719
|
-
|
|
139720
|
-
|
|
139721
|
-
|
|
139722
|
-
|
|
139723
|
-
|
|
139724
|
-
|
|
139725
|
-
|
|
139726
|
-
|
|
139727
|
-
|
|
139728
|
-
|
|
139729
|
-
|
|
139730
|
-
|
|
139731
|
-
|
|
139732
|
-
|
|
139733
|
-
|
|
139734
|
-
|
|
139735
|
-
|
|
139736
|
-
|
|
139737
|
-
|
|
139738
|
-
|
|
139739
|
-
|
|
139740
|
-
|
|
139741
|
-
|
|
139742
|
-
|
|
139743
|
-
|
|
139744
|
-
|
|
139745
|
-
|
|
139746
|
-
|
|
139747
|
-
|
|
139748
|
-
|
|
139749
|
-
|
|
139750
|
-
|
|
139751
|
-
|
|
139752
|
-
|
|
139753
|
-
|
|
139754
|
-
|
|
139755
|
-
|
|
139756
|
-
|
|
139757
|
-
|
|
139758
|
-
|
|
139759
|
-
|
|
139760
|
-
|
|
139761
|
-
|
|
139762
|
-
|
|
139763
|
-
|
|
139764
|
-
|
|
139765
|
-
|
|
139766
|
-
|
|
139767
|
-
|
|
139768
|
-
|
|
139769
|
-
|
|
139770
|
-
|
|
139771
|
-
|
|
139772
|
-
|
|
139773
|
-
|
|
139774
|
-
|
|
139775
|
-
|
|
139776
|
-
|
|
139777
|
-
|
|
139778
|
-
|
|
139779
|
-
|
|
139780
|
-
|
|
139781
|
-
|
|
139782
|
-
|
|
139783
|
-
|
|
139784
|
-
|
|
139785
|
-
|
|
139786
|
-
|
|
139787
|
-
|
|
139788
|
-
|
|
139789
|
-
|
|
139790
|
-
|
|
139791
|
-
|
|
139792
|
-
|
|
139793
|
-
|
|
139794
|
-
|
|
139795
|
-
|
|
139796
|
-
|
|
139797
|
-
|
|
139798
|
-
|
|
139799
|
-
|
|
139800
|
-
|
|
139801
|
-
|
|
139802
|
-
|
|
139803
|
-
|
|
139804
|
-
|
|
139805
|
-
|
|
139806
|
-
|
|
139807
|
-
|
|
139808
|
-
|
|
139809
|
-
|
|
139810
|
-
|
|
139811
|
-
|
|
139812
|
-
|
|
139813
|
-
|
|
139814
|
-
|
|
139815
|
-
|
|
139816
|
-
|
|
139817
|
-
|
|
139818
|
-
|
|
139819
|
-
|
|
139820
|
-
|
|
139821
|
-
|
|
139822
|
-
|
|
139823
|
-
|
|
139824
|
-
|
|
139825
|
-
|
|
139826
|
-
|
|
139827
|
-
|
|
139828
|
-
|
|
139829
|
-
|
|
139830
|
-
|
|
139831
|
-
|
|
139832
|
-
|
|
139833
|
-
|
|
139834
|
-
|
|
139835
|
-
|
|
139836
|
-
|
|
139837
|
-
|
|
139838
|
-
|
|
139839
|
-
|
|
139840
|
-
|
|
139841
|
-
|
|
139842
|
-
|
|
139843
|
-
|
|
139844
|
-
|
|
139845
|
-
|
|
139846
|
-
|
|
139847
|
-
|
|
139848
|
-
|
|
139849
|
-
|
|
139850
|
-
|
|
139851
|
-
|
|
139852
|
-
|
|
139853
|
-
|
|
139854
|
-
|
|
139855
|
-
|
|
139856
|
-
|
|
139857
|
-
|
|
139858
|
-
|
|
139859
|
-
|
|
139860
|
-
|
|
139861
|
-
|
|
139862
|
-
|
|
139863
|
-
|
|
139864
|
-
|
|
139865
|
-
|
|
139866
|
-
|
|
139867
|
-
value
|
|
139868
|
-
|
|
139869
|
-
|
|
139870
|
-
|
|
139871
|
-
|
|
139872
|
-
|
|
139873
|
-
|
|
139874
|
-
|
|
139875
|
-
|
|
139876
|
-
|
|
139877
|
-
|
|
139878
|
-
|
|
139879
|
-
|
|
139880
|
-
|
|
139881
|
-
|
|
139882
|
-
|
|
139883
|
-
|
|
139884
|
-
|
|
139885
|
-
|
|
139886
|
-
|
|
139887
|
-
|
|
139888
|
-
|
|
139889
|
-
|
|
139890
|
-
|
|
139891
|
-
|
|
139892
|
-
|
|
139893
|
-
|
|
139894
|
-
|
|
139895
|
-
|
|
139896
|
-
|
|
139897
|
-
|
|
139898
|
-
|
|
139899
|
-
|
|
139900
|
-
},
|
|
139901
|
-
isPending && /* @__PURE__ */ React169__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
139902
|
-
" ",
|
|
139903
|
-
"Delete"
|
|
139904
|
-
))))))
|
|
139905
|
-
);
|
|
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
|
+
)))));
|
|
139906
139900
|
}
|
|
139907
139901
|
|
|
139908
139902
|
// src/react-ui/components/metadata/ContextManager.tsx
|