@thanh01.pmt/interactive-quiz-kit 1.0.38 → 1.0.40

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
@@ -121640,7 +121640,9 @@ var EditQuestionModal = ({
121640
121640
  questionData,
121641
121641
  onSave
121642
121642
  }) => {
121643
- const [editedQuestion, setEditedQuestion] = React162.useState(null);
121643
+ const [editedQuestion, setEditedQuestion] = React162.useState(
121644
+ null
121645
+ );
121644
121646
  React162.useEffect(() => {
121645
121647
  if (questionData) {
121646
121648
  setEditedQuestion(JSON.parse(JSON.stringify(questionData)));
@@ -121650,7 +121652,9 @@ var EditQuestionModal = ({
121650
121652
  return null;
121651
121653
  }
121652
121654
  const handleBaseFieldChange = (field, value) => {
121653
- setEditedQuestion((prev) => prev ? { ...prev, [field]: value } : null);
121655
+ setEditedQuestion(
121656
+ (prev) => prev ? { ...prev, [field]: value } : null
121657
+ );
121654
121658
  };
121655
121659
  const handleSpecificFieldChange = (updates) => {
121656
121660
  setEditedQuestion((prev) => {
@@ -121673,83 +121677,267 @@ var EditQuestionModal = ({
121673
121677
  if (!editedQuestion) return /* @__PURE__ */ React162__namespace.default.createElement("p", null, "Loading question data...");
121674
121678
  switch (editedQuestion.questionType) {
121675
121679
  case "true_false":
121676
- return /* @__PURE__ */ React162__namespace.default.createElement(TrueFalseQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121680
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121681
+ TrueFalseQuestionForm,
121682
+ {
121683
+ question: editedQuestion,
121684
+ onFormChange: handleSpecificFieldChange
121685
+ }
121686
+ );
121677
121687
  case "multiple_choice":
121678
- return /* @__PURE__ */ React162__namespace.default.createElement(MultipleChoiceQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121688
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121689
+ MultipleChoiceQuestionForm,
121690
+ {
121691
+ question: editedQuestion,
121692
+ onFormChange: handleSpecificFieldChange
121693
+ }
121694
+ );
121679
121695
  case "multiple_response":
121680
- return /* @__PURE__ */ React162__namespace.default.createElement(MultipleResponseQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121696
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121697
+ MultipleResponseQuestionForm,
121698
+ {
121699
+ question: editedQuestion,
121700
+ onFormChange: handleSpecificFieldChange
121701
+ }
121702
+ );
121681
121703
  case "short_answer":
121682
- return /* @__PURE__ */ React162__namespace.default.createElement(ShortAnswerQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121704
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121705
+ ShortAnswerQuestionForm,
121706
+ {
121707
+ question: editedQuestion,
121708
+ onFormChange: handleSpecificFieldChange
121709
+ }
121710
+ );
121683
121711
  case "numeric":
121684
- return /* @__PURE__ */ React162__namespace.default.createElement(NumericQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121712
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121713
+ NumericQuestionForm,
121714
+ {
121715
+ question: editedQuestion,
121716
+ onFormChange: handleSpecificFieldChange
121717
+ }
121718
+ );
121685
121719
  case "fill_in_the_blanks":
121686
- return /* @__PURE__ */ React162__namespace.default.createElement(FillInTheBlanksQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121720
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121721
+ FillInTheBlanksQuestionForm,
121722
+ {
121723
+ question: editedQuestion,
121724
+ onFormChange: handleSpecificFieldChange
121725
+ }
121726
+ );
121687
121727
  case "sequence":
121688
- return /* @__PURE__ */ React162__namespace.default.createElement(SequenceQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121728
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121729
+ SequenceQuestionForm,
121730
+ {
121731
+ question: editedQuestion,
121732
+ onFormChange: handleSpecificFieldChange
121733
+ }
121734
+ );
121689
121735
  case "matching":
121690
- return /* @__PURE__ */ React162__namespace.default.createElement(MatchingQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121736
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121737
+ MatchingQuestionForm,
121738
+ {
121739
+ question: editedQuestion,
121740
+ onFormChange: handleSpecificFieldChange
121741
+ }
121742
+ );
121691
121743
  case "drag_and_drop":
121692
- return /* @__PURE__ */ React162__namespace.default.createElement(DragAndDropQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121744
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121745
+ DragAndDropQuestionForm,
121746
+ {
121747
+ question: editedQuestion,
121748
+ onFormChange: handleSpecificFieldChange
121749
+ }
121750
+ );
121693
121751
  case "hotspot":
121694
- return /* @__PURE__ */ React162__namespace.default.createElement(HotspotQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121752
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121753
+ HotspotQuestionForm,
121754
+ {
121755
+ question: editedQuestion,
121756
+ onFormChange: handleSpecificFieldChange
121757
+ }
121758
+ );
121695
121759
  case "blockly_programming":
121696
- return /* @__PURE__ */ React162__namespace.default.createElement(BlocklyProgrammingQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121760
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121761
+ BlocklyProgrammingQuestionForm,
121762
+ {
121763
+ question: editedQuestion,
121764
+ onFormChange: handleSpecificFieldChange
121765
+ }
121766
+ );
121697
121767
  case "scratch_programming":
121698
- return /* @__PURE__ */ React162__namespace.default.createElement(ScratchProgrammingQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121768
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121769
+ ScratchProgrammingQuestionForm,
121770
+ {
121771
+ question: editedQuestion,
121772
+ onFormChange: handleSpecificFieldChange
121773
+ }
121774
+ );
121699
121775
  case "coding":
121700
- return /* @__PURE__ */ React162__namespace.default.createElement(CodingQuestionForm, { question: editedQuestion, onFormChange: handleSpecificFieldChange });
121776
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121777
+ CodingQuestionForm,
121778
+ {
121779
+ question: editedQuestion,
121780
+ onFormChange: handleSpecificFieldChange
121781
+ }
121782
+ );
121701
121783
  default:
121702
121784
  return /* @__PURE__ */ React162__namespace.default.createElement("p", { className: "text-destructive" }, "Unsupported question type for editing");
121703
121785
  }
121704
121786
  };
121705
- return /* @__PURE__ */ React162__namespace.default.createElement(Dialog2, { open: isOpen, onOpenChange: (open2) => {
121706
- if (!open2) onClose();
121707
- } }, /* @__PURE__ */ React162__namespace.default.createElement(DialogContent2, { className: "sm:max-w-[600px] md:max-w-[800px] lg:max-w-[1000px] max-h-[90vh]" }, /* @__PURE__ */ React162__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React162__namespace.default.createElement(DialogTitle2, { className: "font-headline text-2xl" }, questionData?.id && !questionData.id.startsWith("new_") && !questionData.id.startsWith("temp_") ? "Edit Question" : "Add New Question"), /* @__PURE__ */ React162__namespace.default.createElement(DialogDescription2, null, "Configure the details for this question. Current type: ", /* @__PURE__ */ React162__namespace.default.createElement("span", { className: "font-semibold" }, editedQuestion.questionType))), /* @__PURE__ */ React162__namespace.default.createElement(ScrollArea2, { className: "max-h-[calc(80vh-150px)] p-1 pr-6" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-6 p-4" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "prompt", className: "font-semibold" }, "Question Prompt"), /* @__PURE__ */ React162__namespace.default.createElement(
121708
- SimpleMarkdownEditor,
121709
- {
121710
- value: editedQuestion.prompt,
121711
- onChange: (htmlContent) => handleBaseFieldChange("prompt", htmlContent)
121712
- }
121713
- )), renderSpecificForm(), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 pt-4 border-t" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "points" }, "Points"), /* @__PURE__ */ React162__namespace.default.createElement(
121714
- Input,
121715
- {
121716
- id: "points",
121717
- type: "number",
121718
- value: editedQuestion.points || 0,
121719
- onChange: (e3) => handleBaseFieldChange("points", parseInt(e3.target.value, 10) || 0),
121720
- min: "0"
121721
- }
121722
- )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "difficulty" }, "Difficulty"), /* @__PURE__ */ React162__namespace.default.createElement(
121723
- Select2,
121724
- {
121725
- value: editedQuestion.difficulty || "medium",
121726
- onValueChange: (value) => handleBaseFieldChange("difficulty", value)
121727
- },
121728
- /* @__PURE__ */ React162__namespace.default.createElement(SelectTrigger2, null, /* @__PURE__ */ React162__namespace.default.createElement(SelectValue2, null)),
121729
- /* @__PURE__ */ React162__namespace.default.createElement(SelectContent2, null, /* @__PURE__ */ React162__namespace.default.createElement(SelectItem2, { value: "easy" }, "Easy"), /* @__PURE__ */ React162__namespace.default.createElement(SelectItem2, { value: "medium" }, "Medium"), /* @__PURE__ */ React162__namespace.default.createElement(SelectItem2, { value: "hard" }, "Hard"))
121730
- ))), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "explanation" }, "Explanation (Optional)"), /* @__PURE__ */ React162__namespace.default.createElement(
121731
- SimpleMarkdownEditor,
121732
- {
121733
- value: editedQuestion.explanation || "",
121734
- onChange: (htmlContent) => handleBaseFieldChange("explanation", htmlContent),
121735
- minHeight: "100px"
121736
- }
121737
- )), /* @__PURE__ */ React162__namespace.default.createElement("details", { className: "group" }, /* @__PURE__ */ React162__namespace.default.createElement("summary", { className: "cursor-pointer font-semibold text-primary hover:underline" }, "Advanced Metadata (Optional)"), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "mt-4 space-y-4 p-4 border rounded-md group-open:animate-accordion-down" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "learningObjective" }, "Learning Objective"), /* @__PURE__ */ React162__namespace.default.createElement(Input, { id: "learningObjective", value: editedQuestion.learningObjective || "", onChange: (e3) => handleBaseFieldChange("learningObjective", e3.target.value) })), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "category" }, "Category"), /* @__PURE__ */ React162__namespace.default.createElement(Input, { id: "category", value: editedQuestion.category || "", onChange: (e3) => handleBaseFieldChange("category", e3.target.value) })), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "topic" }, "Topic"), /* @__PURE__ */ React162__namespace.default.createElement(Input, { id: "topic", value: editedQuestion.topic || "", onChange: (e3) => handleBaseFieldChange("topic", e3.target.value) })), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "bloomLevel" }, "Bloom's Level"), /* @__PURE__ */ React162__namespace.default.createElement(
121738
- Select2,
121787
+ return /* @__PURE__ */ React162__namespace.default.createElement(
121788
+ Dialog2,
121739
121789
  {
121740
- value: editedQuestion.bloomLevel || "__none__",
121741
- onValueChange: (value) => handleBaseFieldChange("bloomLevel", value === "__none__" ? void 0 : value)
121790
+ open: isOpen,
121791
+ onOpenChange: (open2) => {
121792
+ if (!open2) onClose();
121793
+ }
121742
121794
  },
121743
- /* @__PURE__ */ React162__namespace.default.createElement(SelectTrigger2, { id: "bloomLevel" }, /* @__PURE__ */ React162__namespace.default.createElement(SelectValue2, { placeholder: "Select Bloom Level..." })),
121744
- /* @__PURE__ */ React162__namespace.default.createElement(SelectContent2, null, bloomLevelOptionsForEdit.map((opt) => /* @__PURE__ */ React162__namespace.default.createElement(SelectItem2, { key: opt.value, value: opt.value }, opt.label)))
121745
- )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "gradeBand" }, "Grade Band"), /* @__PURE__ */ React162__namespace.default.createElement(Input, { id: "gradeBand", value: editedQuestion.gradeBand || "", onChange: (e3) => handleBaseFieldChange("gradeBand", e3.target.value) })), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "contextCode" }, "Context Code"), /* @__PURE__ */ React162__namespace.default.createElement(Input, { id: "contextCode", value: editedQuestion.contextCode || "", onChange: (e3) => handleBaseFieldChange("contextCode", e3.target.value) })), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "course" }, "Course"), /* @__PURE__ */ React162__namespace.default.createElement(Input, { id: "course", value: editedQuestion.course || "", onChange: (e3) => handleBaseFieldChange("course", e3.target.value) })), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "glossary" }, "Glossary Terms (comma-separated)"), /* @__PURE__ */ React162__namespace.default.createElement(
121746
- Input,
121747
- {
121748
- id: "glossary",
121749
- value: Array.isArray(editedQuestion.glossary) ? editedQuestion.glossary.join(", ") : "",
121750
- onChange: (e3) => handleBaseFieldChange("glossary", e3.target.value.split(",").map((s4) => s4.trim()).filter((s4) => s4))
121751
- }
121752
- ))))))), /* @__PURE__ */ React162__namespace.default.createElement(DialogFooter, { className: "pt-4 border-t" }, /* @__PURE__ */ React162__namespace.default.createElement(DialogClose2, { asChild: true }, /* @__PURE__ */ React162__namespace.default.createElement(Button, { type: "button", variant: "outline" }, "Cancel")), /* @__PURE__ */ React162__namespace.default.createElement(Button, { type: "button", onClick: handleSaveClick }, /* @__PURE__ */ React162__namespace.default.createElement(Save, { className: "mr-2 h-4 w-4" }), " Save Question"))));
121795
+ /* @__PURE__ */ React162__namespace.default.createElement(DialogContent2, { className: "sm:max-w-[600px] md:max-w-[800px] lg:max-w-[1000px] max-h-[90vh]" }, /* @__PURE__ */ React162__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React162__namespace.default.createElement(DialogTitle2, { className: "font-headline text-2xl" }, questionData?.id && !questionData.id.startsWith("new_") && !questionData.id.startsWith("temp_") ? "Edit Question" : "Add New Question"), /* @__PURE__ */ React162__namespace.default.createElement(DialogDescription2, null, "Configure the details for this question. Current type:", " ", /* @__PURE__ */ React162__namespace.default.createElement("span", { className: "font-semibold" }, editedQuestion.questionType))), /* @__PURE__ */ React162__namespace.default.createElement(ScrollArea2, { className: "max-h-[calc(80vh-150px)] p-1 pr-6" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-6 p-4" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "prompt", className: "font-semibold" }, "Question Prompt"), /* @__PURE__ */ React162__namespace.default.createElement(
121796
+ SimpleMarkdownEditor,
121797
+ {
121798
+ value: editedQuestion.prompt,
121799
+ onChange: (htmlContent) => handleBaseFieldChange("prompt", htmlContent)
121800
+ }
121801
+ )), renderSpecificForm(), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 pt-4 border-t" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "points" }, "Points"), /* @__PURE__ */ React162__namespace.default.createElement(
121802
+ Input,
121803
+ {
121804
+ id: "points",
121805
+ type: "number",
121806
+ value: editedQuestion.points || 0,
121807
+ onChange: (e3) => handleBaseFieldChange(
121808
+ "points",
121809
+ parseInt(e3.target.value, 10) || 0
121810
+ ),
121811
+ min: "0"
121812
+ }
121813
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "difficulty" }, "Difficulty"), /* @__PURE__ */ React162__namespace.default.createElement(
121814
+ Select2,
121815
+ {
121816
+ value: editedQuestion.difficulty || "medium",
121817
+ onValueChange: (value) => handleBaseFieldChange(
121818
+ "difficulty",
121819
+ value
121820
+ )
121821
+ },
121822
+ /* @__PURE__ */ React162__namespace.default.createElement(SelectTrigger2, null, /* @__PURE__ */ React162__namespace.default.createElement(SelectValue2, null)),
121823
+ /* @__PURE__ */ React162__namespace.default.createElement(SelectContent2, null, /* @__PURE__ */ React162__namespace.default.createElement(SelectItem2, { value: "easy" }, "Easy"), /* @__PURE__ */ React162__namespace.default.createElement(SelectItem2, { value: "medium" }, "Medium"), /* @__PURE__ */ React162__namespace.default.createElement(SelectItem2, { value: "hard" }, "Hard"))
121824
+ ))), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "explanation" }, "Explanation (Optional)"), /* @__PURE__ */ React162__namespace.default.createElement(
121825
+ SimpleMarkdownEditor,
121826
+ {
121827
+ value: editedQuestion.explanation || "",
121828
+ onChange: (htmlContent) => handleBaseFieldChange(
121829
+ "explanation",
121830
+ htmlContent
121831
+ ),
121832
+ minHeight: "100px"
121833
+ }
121834
+ )), /* @__PURE__ */ React162__namespace.default.createElement("details", { className: "group" }, /* @__PURE__ */ React162__namespace.default.createElement("summary", { className: "cursor-pointer font-semibold text-primary hover:underline" }, "Advanced Metadata (Optional)"), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "mt-4 space-y-4 p-4 border rounded-md group-open:animate-accordion-down" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "questionCode" }, "Question Code (Business ID)"), /* @__PURE__ */ React162__namespace.default.createElement(
121835
+ Input,
121836
+ {
121837
+ id: "questionCode",
121838
+ value: editedQuestion.code || "",
121839
+ onChange: (e3) => handleBaseFieldChange(
121840
+ "code",
121841
+ e3.target.value.toUpperCase()
121842
+ ),
121843
+ placeholder: "e.g., MATH-ALG-001"
121844
+ }
121845
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "learningObjective" }, "Learning Objective"), /* @__PURE__ */ React162__namespace.default.createElement(
121846
+ Input,
121847
+ {
121848
+ id: "learningObjective",
121849
+ value: editedQuestion.learningObjective || "",
121850
+ onChange: (e3) => handleBaseFieldChange(
121851
+ "learningObjective",
121852
+ e3.target.value
121853
+ )
121854
+ }
121855
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "category" }, "Category"), /* @__PURE__ */ React162__namespace.default.createElement(
121856
+ Input,
121857
+ {
121858
+ id: "category",
121859
+ value: editedQuestion.category || "",
121860
+ onChange: (e3) => handleBaseFieldChange(
121861
+ "category",
121862
+ e3.target.value
121863
+ )
121864
+ }
121865
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "topic" }, "Topic"), /* @__PURE__ */ React162__namespace.default.createElement(
121866
+ Input,
121867
+ {
121868
+ id: "topic",
121869
+ value: editedQuestion.topic || "",
121870
+ onChange: (e3) => handleBaseFieldChange(
121871
+ "topic",
121872
+ e3.target.value
121873
+ )
121874
+ }
121875
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "bloomLevel" }, "Bloom's Level"), /* @__PURE__ */ React162__namespace.default.createElement(
121876
+ Select2,
121877
+ {
121878
+ value: editedQuestion.bloomLevel || "__none__",
121879
+ onValueChange: (value) => handleBaseFieldChange(
121880
+ "bloomLevel",
121881
+ value === "__none__" ? void 0 : value
121882
+ )
121883
+ },
121884
+ /* @__PURE__ */ React162__namespace.default.createElement(SelectTrigger2, { id: "bloomLevel" }, /* @__PURE__ */ React162__namespace.default.createElement(SelectValue2, { placeholder: "Select Bloom Level..." })),
121885
+ /* @__PURE__ */ React162__namespace.default.createElement(SelectContent2, null, bloomLevelOptionsForEdit.map(
121886
+ (opt) => /* @__PURE__ */ React162__namespace.default.createElement(
121887
+ SelectItem2,
121888
+ {
121889
+ key: opt.value,
121890
+ value: opt.value
121891
+ },
121892
+ opt.label
121893
+ )
121894
+ ))
121895
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "gradeBand" }, "Grade Band"), /* @__PURE__ */ React162__namespace.default.createElement(
121896
+ Input,
121897
+ {
121898
+ id: "gradeBand",
121899
+ value: editedQuestion.gradeBand || "",
121900
+ onChange: (e3) => handleBaseFieldChange(
121901
+ "gradeBand",
121902
+ e3.target.value
121903
+ )
121904
+ }
121905
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "contextCode" }, "Context Code"), /* @__PURE__ */ React162__namespace.default.createElement(
121906
+ Input,
121907
+ {
121908
+ id: "contextCode",
121909
+ value: editedQuestion.contextCode || "",
121910
+ onChange: (e3) => handleBaseFieldChange(
121911
+ "contextCode",
121912
+ e3.target.value
121913
+ )
121914
+ }
121915
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "course" }, "Course"), /* @__PURE__ */ React162__namespace.default.createElement(
121916
+ Input,
121917
+ {
121918
+ id: "course",
121919
+ value: editedQuestion.course || "",
121920
+ onChange: (e3) => handleBaseFieldChange(
121921
+ "course",
121922
+ e3.target.value
121923
+ )
121924
+ }
121925
+ )), /* @__PURE__ */ React162__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React162__namespace.default.createElement(Label2, { htmlFor: "glossary" }, "Glossary Terms (comma-separated)"), /* @__PURE__ */ React162__namespace.default.createElement(
121926
+ Input,
121927
+ {
121928
+ id: "glossary",
121929
+ value: Array.isArray(
121930
+ editedQuestion.glossary
121931
+ ) ? editedQuestion.glossary.join(
121932
+ ", "
121933
+ ) : "",
121934
+ onChange: (e3) => handleBaseFieldChange(
121935
+ "glossary",
121936
+ e3.target.value.split(",").map((s4) => s4.trim()).filter((s4) => s4)
121937
+ )
121938
+ }
121939
+ ))))))), /* @__PURE__ */ React162__namespace.default.createElement(DialogFooter, { className: "pt-4 border-t" }, /* @__PURE__ */ React162__namespace.default.createElement(DialogClose2, { asChild: true }, /* @__PURE__ */ React162__namespace.default.createElement(Button, { type: "button", variant: "outline" }, "Cancel")), /* @__PURE__ */ React162__namespace.default.createElement(Button, { type: "button", onClick: handleSaveClick }, /* @__PURE__ */ React162__namespace.default.createElement(Save, { className: "mr-2 h-4 w-4" }), " Save Question")))
121940
+ );
121753
121941
  };
121754
121942
  var APIKeyManagerModal = ({ isOpen, onClose }) => {
121755
121943
  const [geminiApiKey, setGeminiApiKey] = React162.useState("");
@@ -125727,6 +125915,8 @@ var QuizEditorService = class {
125727
125915
  static createNewQuestionTemplate(type) {
125728
125916
  const baseNewQuestion = {
125729
125917
  id: generateUniqueId(`new_${type}_`),
125918
+ // NEW: Initialize the code property
125919
+ code: "",
125730
125920
  questionType: type,
125731
125921
  prompt: "",
125732
125922
  points: 10,
@@ -125792,7 +125982,6 @@ var QuizEditorService = class {
125792
125982
  testCases: [],
125793
125983
  functionSignature: "",
125794
125984
  points: 25
125795
- // Coding questions are worth more by default
125796
125985
  };
125797
125986
  default:
125798
125987
  const _exhaustiveCheck = type;
@@ -163504,9 +163693,9 @@ var ClientTranslation = ({ tKey, options, fallback: fallback2 }) => {
163504
163693
  setIsMounted(true);
163505
163694
  }, []);
163506
163695
  if (!isMounted) {
163507
- return /* @__PURE__ */ React.createElement(React.Fragment, null, fallback2);
163696
+ return /* @__PURE__ */ React162__namespace.default.createElement(React162__namespace.default.Fragment, null, fallback2);
163508
163697
  }
163509
- return /* @__PURE__ */ React.createElement(React.Fragment, null, t4(tKey, options));
163698
+ return /* @__PURE__ */ React162__namespace.default.createElement(React162__namespace.default.Fragment, null, t4(tKey, options));
163510
163699
  };
163511
163700
 
163512
163701
  // src/react-ui/components/app/PersonalPracticeDashboard.tsx
@@ -1,11 +1,11 @@
1
- import { s as QuizConfig, g as QuizQuestion } from './quiz-config-Df_89hFx.cjs';
2
- export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, Q as QuestionTypeStrings, r as QuizSettings, R as RichContentString, q as SCORMSettings, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-Df_89hFx.cjs';
1
+ import { s as QuizConfig, g as QuizQuestion } from './quiz-config-o4j2dfsu.cjs';
2
+ export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, Q as QuestionTypeStrings, r as QuizSettings, R as RichContentString, q as SCORMSettings, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-o4j2dfsu.cjs';
3
3
  export { APIKeyService, AchievementService, Approach, ApproachTableRawDifficulty, BloomLevelName, BloomLevelType, Category, CodeNamedEntity, Context, GEMINI_API_KEY_SERVICE_NAME, GradeLevel, KnowledgeCardService, KnowledgeDimension, LearningObjective, LearningObjectiveMetadata, MetadataService, PracticeHistoryService, QuestionBankService, QuestionImportService, QuestionInBank, QuestionTypeType, QuizEditorService, QuizEngine, QuizEngineCallbacks, QuizEngineConstructorOptions, QuoteService, SCORMService, StandardDifficulty, Subject, Topic, UserConfigService, cn, emptyQuiz, exportQuizAsSCORMZip, generateLauncherHTML, generateSCORMManifest, generateUniqueId, sampleQuiz } from './index.cjs';
4
- import { Q as QuizResultType, U as UserAnswerType, m as PracticeSuggestion, l as PracticeSuggestionTopic, i as Achievement, o as PracticeStats, p as PracticeSessionSummary, h as QuizReviewContent } from './ai-ecosystem-DCPvHU4-.cjs';
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, n as PracticeSession, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DCPvHU4-.cjs';
4
+ import { Q as QuizResultType, U as UserAnswerType, m as PracticeSuggestion, l as PracticeSuggestionTopic, i as Achievement, o as PracticeStats, p as PracticeSessionSummary, h as QuizReviewContent } from './ai-ecosystem-DqFRlFU3.cjs';
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, n as PracticeSession, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DqFRlFU3.cjs';
6
6
  import * as React$1 from 'react';
7
7
  import React__default from 'react';
8
- export { a as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, b as APIKeyManagerModal, i as ApproachManager, B as BloomLevelManager, C as CategoryManager, h as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, M as MetadataTabs, d as QuestionFilters, e as QuestionFormDialog, c as QuestionList, g as QuestionTypeManager, Q as QuizAuthoringTool, S as SCORMExportModal, f as SubjectManager, j as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-D1bLqmd_.cjs';
8
+ export { a as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, b as APIKeyManagerModal, i as ApproachManager, B as BloomLevelManager, C as CategoryManager, h as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, M as MetadataTabs, d as QuestionFilters, e as QuestionFormDialog, c as QuestionList, g as QuestionTypeManager, Q as QuizAuthoringTool, S as SCORMExportModal, f as SubjectManager, j as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-JTJ7cUyP.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';
@@ -1,11 +1,11 @@
1
- import { s as QuizConfig, g as QuizQuestion } from './quiz-config-Df_89hFx.js';
2
- export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, Q as QuestionTypeStrings, r as QuizSettings, R as RichContentString, q as SCORMSettings, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-Df_89hFx.js';
1
+ import { s as QuizConfig, g as QuizQuestion } from './quiz-config-o4j2dfsu.js';
2
+ export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, Q as QuestionTypeStrings, r as QuizSettings, R as RichContentString, q as SCORMSettings, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-o4j2dfsu.js';
3
3
  export { APIKeyService, AchievementService, Approach, ApproachTableRawDifficulty, BloomLevelName, BloomLevelType, Category, CodeNamedEntity, Context, GEMINI_API_KEY_SERVICE_NAME, GradeLevel, KnowledgeCardService, KnowledgeDimension, LearningObjective, LearningObjectiveMetadata, MetadataService, PracticeHistoryService, QuestionBankService, QuestionImportService, QuestionInBank, QuestionTypeType, QuizEditorService, QuizEngine, QuizEngineCallbacks, QuizEngineConstructorOptions, QuoteService, SCORMService, StandardDifficulty, Subject, Topic, UserConfigService, cn, emptyQuiz, exportQuizAsSCORMZip, generateLauncherHTML, generateSCORMManifest, generateUniqueId, sampleQuiz } from './index.js';
4
- import { Q as QuizResultType, U as UserAnswerType, m as PracticeSuggestion, l as PracticeSuggestionTopic, i as Achievement, o as PracticeStats, p as PracticeSessionSummary, h as QuizReviewContent } from './ai-ecosystem-D6vuLxnS.js';
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, n as PracticeSession, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-D6vuLxnS.js';
4
+ import { Q as QuizResultType, U as UserAnswerType, m as PracticeSuggestion, l as PracticeSuggestionTopic, i as Achievement, o as PracticeStats, p as PracticeSessionSummary, h as QuizReviewContent } from './ai-ecosystem-DqVlSO3r.js';
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, n as PracticeSession, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DqVlSO3r.js';
6
6
  import * as React$1 from 'react';
7
7
  import React__default from 'react';
8
- export { a as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, b as APIKeyManagerModal, i as ApproachManager, B as BloomLevelManager, C as CategoryManager, h as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, M as MetadataTabs, d as QuestionFilters, e as QuestionFormDialog, c as QuestionList, g as QuestionTypeManager, Q as QuizAuthoringTool, S as SCORMExportModal, f as SubjectManager, j as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-eWZIxSVc.js';
8
+ export { a as AIFullQuizGeneratorModal, A as AIQuestionGeneratorModal, b as APIKeyManagerModal, i as ApproachManager, B as BloomLevelManager, C as CategoryManager, h as ContextManager, E as EditQuestionModal, G as GradeLevelManager, I as ImportQuestionsModal, L as LearningObjectiveManager, M as MetadataTabs, d as QuestionFilters, e as QuestionFormDialog, c as QuestionList, g as QuestionTypeManager, Q as QuizAuthoringTool, S as SCORMExportModal, f as SubjectManager, j as Toaster, T as TopicManager, t as toast, u as useToast } from './toaster-Cgg3CSob.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';