@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.
@@ -77411,197 +77411,194 @@ function LearningObjectiveManager({
77411
77411
  console.log("[LO Manager] No valid records to import.");
77412
77412
  }
77413
77413
  };
77414
- return (
77415
- // --- START: FIX - Thay đổi cấu trúc layout ---
77416
- /* @__PURE__ */ React119__namespace.default.createElement(Card, { className: "flex flex-col h-full" }, /* @__PURE__ */ React119__namespace.default.createElement(CardHeader, null, /* @__PURE__ */ React119__namespace.default.createElement(CardTitle, { className: "flex justify-between items-center" }, /* @__PURE__ */ React119__namespace.default.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React119__namespace.default.createElement(Lightbulb, { className: "mr-2 h-5 w-5 text-primary" }), " ", "Manage Learning Objectives"), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "flex items-center gap-2" }, onBulkAdd && /* @__PURE__ */ React119__namespace.default.createElement(
77417
- MetadataImportControls,
77418
- {
77419
- metadataName: "Learning Objectives",
77420
- onImport: handleImport
77421
- }
77422
- ), /* @__PURE__ */ React119__namespace.default.createElement(Button, { onClick: handleAddItem, size: "sm" }, /* @__PURE__ */ React119__namespace.default.createElement(CirclePlus, { className: "mr-2 h-4 w-4" }), " Add Learning Objective")))), /* @__PURE__ */ React119__namespace.default.createElement(CardContent, { className: "flex-grow flex flex-col min-h-0" }, isLoading ? /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "flex justify-center items-center h-32" }, /* @__PURE__ */ React119__namespace.default.createElement(LoaderCircle, { className: "h-8 w-8 animate-spin text-primary" })) : items.length === 0 ? /* @__PURE__ */ React119__namespace.default.createElement("p", { className: "text-center text-muted-foreground py-4" }, "No Learning Objectives found.") : /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "flex-grow relative border rounded-md" }, /* @__PURE__ */ React119__namespace.default.createElement(ScrollArea2, { className: "absolute inset-0" }, /* @__PURE__ */ React119__namespace.default.createElement(Table2, null, /* @__PURE__ */ React119__namespace.default.createElement(TableHeader, { className: "sticky top-0 bg-card z-10" }, /* @__PURE__ */ React119__namespace.default.createElement(TableRow, null, /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Code"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Name"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Subject"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Topic"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, { className: "text-right w-[120px]" }, "Actions"))), /* @__PURE__ */ React119__namespace.default.createElement(TableBody, null, items.map((item) => /* @__PURE__ */ React119__namespace.default.createElement(TableRow, { key: item.id }, /* @__PURE__ */ React119__namespace.default.createElement(TableCell, { className: "font-mono text-xs" }, item.code), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, { className: "font-medium" }, item.name), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, null, item.subject || item.subjectCode), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, null, item.topic || item.topicCode), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React119__namespace.default.createElement(
77423
- Button,
77424
- {
77425
- variant: "ghost",
77426
- size: "icon",
77427
- onClick: () => handleEditItem(item),
77428
- className: "mr-2"
77429
- },
77430
- /* @__PURE__ */ React119__namespace.default.createElement(PenLine, { className: "h-4 w-4" })
77431
- ), /* @__PURE__ */ React119__namespace.default.createElement(
77432
- Button,
77433
- {
77434
- variant: "ghost",
77435
- size: "icon",
77436
- onClick: () => handleDeleteItem(item),
77437
- className: "text-destructive hover:text-destructive"
77438
- },
77439
- /* @__PURE__ */ React119__namespace.default.createElement(Trash2, { className: "h-4 w-4" })
77440
- )))))))), /* @__PURE__ */ React119__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React119__namespace.default.createElement(DialogContent2, { className: "sm:max-w-2xl max-h-[90vh] overflow-y-auto" }, /* @__PURE__ */ React119__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React119__namespace.default.createElement(DialogTitle2, null, currentItem ? "Edit Learning Objective" : "Add New Learning Objective")), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid gap-4 py-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "code" }, "Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77441
- Input,
77442
- {
77443
- id: "code",
77444
- value: formState.code || "",
77445
- onChange: (e2) => handleFormChange(
77446
- "code",
77447
- e2.target.value.toUpperCase()
77448
- ),
77449
- disabled: !!currentItem
77450
- }
77451
- )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React119__namespace.default.createElement(
77452
- Input,
77453
- {
77454
- id: "name",
77455
- value: formState.name || "",
77456
- onChange: (e2) => handleFormChange(
77457
- "name",
77458
- e2.target.value
77459
- )
77460
- }
77461
- ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "subject" }, "Subject Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77462
- Input,
77463
- {
77464
- id: "subject",
77465
- value: formState.subject || "",
77466
- onChange: (e2) => handleFormChange(
77467
- "subject",
77468
- e2.target.value
77469
- )
77470
- }
77471
- )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77472
- EditableCombobox,
77473
- {
77474
- options: subjects.map((s2) => ({
77475
- value: s2.code,
77476
- label: s2.name
77477
- })),
77478
- value: formState.subjectCode || "",
77479
- onChange: (val) => handleFormChange("subjectCode", val),
77480
- placeholder: "Select a subject..."
77481
- }
77482
- ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "category" }, "Category Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77483
- Input,
77484
- {
77485
- id: "category",
77486
- value: formState.category || "",
77487
- onChange: (e2) => handleFormChange(
77488
- "category",
77489
- e2.target.value
77490
- )
77491
- }
77492
- )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "categoryCode" }, "Category Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77493
- Input,
77494
- {
77495
- id: "categoryCode",
77496
- value: formState.categoryCode || "",
77497
- onChange: (e2) => handleFormChange(
77498
- "categoryCode",
77499
- e2.target.value
77500
- )
77501
- }
77502
- ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "topic" }, "Topic Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77503
- Input,
77504
- {
77505
- id: "topic",
77506
- value: formState.topic || "",
77507
- onChange: (e2) => handleFormChange(
77508
- "topic",
77509
- e2.target.value
77510
- )
77511
- }
77512
- )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "topicCode" }, "Topic Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77513
- Input,
77514
- {
77515
- id: "topicCode",
77516
- value: formState.topicCode || "",
77517
- onChange: (e2) => handleFormChange(
77518
- "topicCode",
77519
- e2.target.value
77520
- )
77521
- }
77522
- ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "grade" }, "Grade Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77523
- Input,
77524
- {
77525
- id: "grade",
77526
- value: formState.grade || "",
77527
- onChange: (e2) => handleFormChange(
77528
- "grade",
77529
- e2.target.value
77530
- )
77531
- }
77532
- )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77533
- Input,
77534
- {
77535
- id: "gradeCode",
77536
- value: formState.gradeCode || "",
77537
- onChange: (e2) => handleFormChange(
77538
- "gradeCode",
77539
- e2.target.value
77540
- )
77541
- }
77542
- ))), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "keywords" }, "Keywords (comma-separated)"), /* @__PURE__ */ React119__namespace.default.createElement(
77543
- Textarea,
77544
- {
77545
- id: "keywords",
77546
- value: formState.keywords?.join(", ") || "",
77547
- onChange: (e2) => handleFormChange(
77548
- "keywords",
77549
- e2.target.value.split(",").map((s2) => s2.trim())
77550
- )
77551
- }
77552
- )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "stemElements" }, "STEM Elements (comma-separated)"), /* @__PURE__ */ React119__namespace.default.createElement(
77553
- Textarea,
77554
- {
77555
- id: "stemElements",
77556
- value: formState.stemElements?.join(", ") || "",
77557
- onChange: (e2) => handleFormChange(
77558
- "stemElements",
77559
- e2.target.value.split(",").map((s2) => s2.trim())
77560
- )
77561
- }
77562
- )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "bloomLevelsGuideline" }, "Bloom's Guideline (comma-separated)"), /* @__PURE__ */ React119__namespace.default.createElement(
77563
- Textarea,
77564
- {
77565
- id: "bloomLevelsGuideline",
77566
- value: formState.bloomLevelsGuideline?.join(
77567
- ", "
77568
- ) || "",
77569
- onChange: (e2) => handleFormChange(
77570
- "bloomLevelsGuideline",
77571
- e2.target.value.split(",").map((s2) => s2.trim())
77572
- )
77573
- }
77574
- ))), /* @__PURE__ */ React119__namespace.default.createElement(DialogFooter, null, /* @__PURE__ */ React119__namespace.default.createElement(
77575
- Button,
77576
- {
77577
- type: "button",
77578
- variant: "outline",
77579
- onClick: () => setIsDialogOpen(false),
77580
- disabled: isPending
77581
- },
77582
- "Cancel"
77583
- ), /* @__PURE__ */ React119__namespace.default.createElement(
77584
- Button,
77585
- {
77586
- type: "submit",
77587
- onClick: handleSubmit,
77588
- disabled: isPending || !formState.name?.trim() || !formState.code?.trim()
77589
- },
77590
- isPending && /* @__PURE__ */ React119__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
77591
- " ",
77592
- "Save"
77593
- )))), /* @__PURE__ */ React119__namespace.default.createElement(AlertDialog2, { open: isAlertOpen, onOpenChange: setIsAlertOpen }, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogContent2, null, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogHeader, null, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogTitle2, null, "Are you sure?"), /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogDescription2, null, 'This will permanently delete "', itemToDelete?.name, '".')), /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogCancel2, { disabled: isPending }, "Cancel"), /* @__PURE__ */ React119__namespace.default.createElement(
77594
- AlertDialogAction2,
77595
- {
77596
- onClick: confirmDelete,
77597
- disabled: isPending,
77598
- className: "bg-destructive hover:bg-destructive/90"
77599
- },
77600
- isPending && /* @__PURE__ */ React119__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
77601
- " ",
77602
- "Delete"
77603
- ))))))
77604
- );
77414
+ return /* @__PURE__ */ React119__namespace.default.createElement(Card, { className: "flex flex-col h-full" }, /* @__PURE__ */ React119__namespace.default.createElement(CardHeader, null, /* @__PURE__ */ React119__namespace.default.createElement(CardTitle, { className: "flex justify-between items-center" }, /* @__PURE__ */ React119__namespace.default.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React119__namespace.default.createElement(Lightbulb, { className: "mr-2 h-5 w-5 text-primary" }), " ", "Manage Learning Objectives"), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "flex items-center gap-2" }, onBulkAdd && /* @__PURE__ */ React119__namespace.default.createElement(
77415
+ MetadataImportControls,
77416
+ {
77417
+ metadataName: "Learning Objectives",
77418
+ onImport: handleImport
77419
+ }
77420
+ ), /* @__PURE__ */ React119__namespace.default.createElement(Button, { onClick: handleAddItem, size: "sm" }, /* @__PURE__ */ React119__namespace.default.createElement(CirclePlus, { className: "mr-2 h-4 w-4" }), " Add Learning Objective")))), /* @__PURE__ */ React119__namespace.default.createElement(CardContent, { className: "flex-1 flex flex-col min-h-0" }, isLoading ? /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "flex justify-center items-center h-full" }, /* @__PURE__ */ React119__namespace.default.createElement(LoaderCircle, { className: "h-8 w-8 animate-spin text-primary" })) : items.length === 0 ? /* @__PURE__ */ React119__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__ */ React119__namespace.default.createElement(Lightbulb, { className: "h-12 w-12 text-muted-foreground mb-4" }), /* @__PURE__ */ React119__namespace.default.createElement("h3", { className: "text-xl font-semibold" }, "No Learning Objectives"), /* @__PURE__ */ React119__namespace.default.createElement("p", { className: "text-muted-foreground mt-2" }, "Get started by adding a new learning objective or importing a list.")) : /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "flex-1 relative border rounded-md" }, /* @__PURE__ */ React119__namespace.default.createElement(ScrollArea2, { className: "absolute inset-0" }, /* @__PURE__ */ React119__namespace.default.createElement(Table2, null, /* @__PURE__ */ React119__namespace.default.createElement(TableHeader, { className: "sticky top-0 bg-card z-10" }, /* @__PURE__ */ React119__namespace.default.createElement(TableRow, null, /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Code"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Name"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Subject"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, null, "Topic"), /* @__PURE__ */ React119__namespace.default.createElement(TableHead, { className: "text-right w-[120px]" }, "Actions"))), /* @__PURE__ */ React119__namespace.default.createElement(TableBody, null, items.map((item) => /* @__PURE__ */ React119__namespace.default.createElement(TableRow, { key: item.id }, /* @__PURE__ */ React119__namespace.default.createElement(TableCell, { className: "font-mono text-xs" }, item.code), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, { className: "font-medium" }, item.name), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, null, item.subject || item.subjectCode), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, null, item.topic || item.topicCode), /* @__PURE__ */ React119__namespace.default.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React119__namespace.default.createElement(
77421
+ Button,
77422
+ {
77423
+ variant: "ghost",
77424
+ size: "icon",
77425
+ onClick: () => handleEditItem(item),
77426
+ className: "mr-2"
77427
+ },
77428
+ /* @__PURE__ */ React119__namespace.default.createElement(PenLine, { className: "h-4 w-4" })
77429
+ ), /* @__PURE__ */ React119__namespace.default.createElement(
77430
+ Button,
77431
+ {
77432
+ variant: "ghost",
77433
+ size: "icon",
77434
+ onClick: () => handleDeleteItem(item),
77435
+ className: "text-destructive hover:text-destructive"
77436
+ },
77437
+ /* @__PURE__ */ React119__namespace.default.createElement(Trash2, { className: "h-4 w-4" })
77438
+ ))))))))), /* @__PURE__ */ React119__namespace.default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React119__namespace.default.createElement(DialogContent2, { className: "sm:max-w-2xl" }, /* @__PURE__ */ React119__namespace.default.createElement(ScrollArea2, { className: "max-h-[85vh]" }, /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React119__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React119__namespace.default.createElement(DialogTitle2, null, currentItem ? "Edit Learning Objective" : "Add New Learning Objective")), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid gap-4 py-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "code" }, "Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77439
+ Input,
77440
+ {
77441
+ id: "code",
77442
+ value: formState.code || "",
77443
+ onChange: (e2) => handleFormChange(
77444
+ "code",
77445
+ e2.target.value.toUpperCase()
77446
+ ),
77447
+ disabled: !!currentItem
77448
+ }
77449
+ )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React119__namespace.default.createElement(
77450
+ Input,
77451
+ {
77452
+ id: "name",
77453
+ value: formState.name || "",
77454
+ onChange: (e2) => handleFormChange(
77455
+ "name",
77456
+ e2.target.value
77457
+ )
77458
+ }
77459
+ ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "subject" }, "Subject Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77460
+ Input,
77461
+ {
77462
+ id: "subject",
77463
+ value: formState.subject || "",
77464
+ onChange: (e2) => handleFormChange(
77465
+ "subject",
77466
+ e2.target.value
77467
+ )
77468
+ }
77469
+ )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77470
+ EditableCombobox,
77471
+ {
77472
+ options: subjects.map((s2) => ({
77473
+ value: s2.code,
77474
+ label: s2.name
77475
+ })),
77476
+ value: formState.subjectCode || "",
77477
+ onChange: (val) => handleFormChange("subjectCode", val),
77478
+ placeholder: "Select a subject..."
77479
+ }
77480
+ ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "category" }, "Category Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77481
+ Input,
77482
+ {
77483
+ id: "category",
77484
+ value: formState.category || "",
77485
+ onChange: (e2) => handleFormChange(
77486
+ "category",
77487
+ e2.target.value
77488
+ )
77489
+ }
77490
+ )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "categoryCode" }, "Category Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77491
+ Input,
77492
+ {
77493
+ id: "categoryCode",
77494
+ value: formState.categoryCode || "",
77495
+ onChange: (e2) => handleFormChange(
77496
+ "categoryCode",
77497
+ e2.target.value
77498
+ )
77499
+ }
77500
+ ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "topic" }, "Topic Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77501
+ Input,
77502
+ {
77503
+ id: "topic",
77504
+ value: formState.topic || "",
77505
+ onChange: (e2) => handleFormChange(
77506
+ "topic",
77507
+ e2.target.value
77508
+ )
77509
+ }
77510
+ )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "topicCode" }, "Topic Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77511
+ Input,
77512
+ {
77513
+ id: "topicCode",
77514
+ value: formState.topicCode || "",
77515
+ onChange: (e2) => handleFormChange(
77516
+ "topicCode",
77517
+ e2.target.value
77518
+ )
77519
+ }
77520
+ ))), /* @__PURE__ */ React119__namespace.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "grade" }, "Grade Name"), /* @__PURE__ */ React119__namespace.default.createElement(
77521
+ Input,
77522
+ {
77523
+ id: "grade",
77524
+ value: formState.grade || "",
77525
+ onChange: (e2) => handleFormChange(
77526
+ "grade",
77527
+ e2.target.value
77528
+ )
77529
+ }
77530
+ )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Code"), /* @__PURE__ */ React119__namespace.default.createElement(
77531
+ Input,
77532
+ {
77533
+ id: "gradeCode",
77534
+ value: formState.gradeCode || "",
77535
+ onChange: (e2) => handleFormChange(
77536
+ "gradeCode",
77537
+ e2.target.value
77538
+ )
77539
+ }
77540
+ ))), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "keywords" }, "Keywords (comma-separated)"), /* @__PURE__ */ React119__namespace.default.createElement(
77541
+ Textarea,
77542
+ {
77543
+ id: "keywords",
77544
+ value: formState.keywords?.join(", ") || "",
77545
+ onChange: (e2) => handleFormChange(
77546
+ "keywords",
77547
+ e2.target.value.split(",").map((s2) => s2.trim())
77548
+ )
77549
+ }
77550
+ )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "stemElements" }, "STEM Elements (comma-separated)"), /* @__PURE__ */ React119__namespace.default.createElement(
77551
+ Textarea,
77552
+ {
77553
+ id: "stemElements",
77554
+ value: formState.stemElements?.join(", ") || "",
77555
+ onChange: (e2) => handleFormChange(
77556
+ "stemElements",
77557
+ e2.target.value.split(",").map((s2) => s2.trim())
77558
+ )
77559
+ }
77560
+ )), /* @__PURE__ */ React119__namespace.default.createElement("div", null, /* @__PURE__ */ React119__namespace.default.createElement(Label2, { htmlFor: "bloomLevelsGuideline" }, "Bloom's Guideline (comma-separated)"), /* @__PURE__ */ React119__namespace.default.createElement(
77561
+ Textarea,
77562
+ {
77563
+ id: "bloomLevelsGuideline",
77564
+ value: formState.bloomLevelsGuideline?.join(
77565
+ ", "
77566
+ ) || "",
77567
+ onChange: (e2) => handleFormChange(
77568
+ "bloomLevelsGuideline",
77569
+ e2.target.value.split(",").map((s2) => s2.trim())
77570
+ )
77571
+ }
77572
+ ))))), /* @__PURE__ */ React119__namespace.default.createElement(DialogFooter, { className: "p-6 pt-0" }, /* @__PURE__ */ React119__namespace.default.createElement(
77573
+ Button,
77574
+ {
77575
+ type: "button",
77576
+ variant: "outline",
77577
+ onClick: () => setIsDialogOpen(false),
77578
+ disabled: isPending
77579
+ },
77580
+ "Cancel"
77581
+ ), /* @__PURE__ */ React119__namespace.default.createElement(
77582
+ Button,
77583
+ {
77584
+ type: "submit",
77585
+ onClick: handleSubmit,
77586
+ disabled: isPending || !formState.name?.trim() || !formState.code?.trim()
77587
+ },
77588
+ isPending && /* @__PURE__ */ React119__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
77589
+ " ",
77590
+ "Save"
77591
+ )))), /* @__PURE__ */ React119__namespace.default.createElement(AlertDialog2, { open: isAlertOpen, onOpenChange: setIsAlertOpen }, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogContent2, null, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogHeader, null, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogTitle2, null, "Are you sure?"), /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogDescription2, null, 'This will permanently delete "', itemToDelete?.name, '".')), /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React119__namespace.default.createElement(AlertDialogCancel2, { disabled: isPending }, "Cancel"), /* @__PURE__ */ React119__namespace.default.createElement(
77592
+ AlertDialogAction2,
77593
+ {
77594
+ onClick: confirmDelete,
77595
+ disabled: isPending,
77596
+ className: "bg-destructive hover:bg-destructive/90"
77597
+ },
77598
+ isPending && /* @__PURE__ */ React119__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
77599
+ " ",
77600
+ "Delete"
77601
+ )))));
77605
77602
  }
77606
77603
 
77607
77604
  // src/react-ui/components/metadata/ContextManager.tsx