@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/authoring.cjs
CHANGED
|
@@ -77411,200 +77411,194 @@ function LearningObjectiveManager({
|
|
|
77411
77411
|
console.log("[LO Manager] No valid records to import.");
|
|
77412
77412
|
}
|
|
77413
77413
|
};
|
|
77414
|
-
return (
|
|
77415
|
-
|
|
77416
|
-
|
|
77417
|
-
|
|
77418
|
-
|
|
77419
|
-
|
|
77420
|
-
|
|
77421
|
-
|
|
77422
|
-
|
|
77423
|
-
|
|
77424
|
-
|
|
77425
|
-
|
|
77426
|
-
|
|
77427
|
-
|
|
77428
|
-
|
|
77429
|
-
|
|
77430
|
-
|
|
77431
|
-
|
|
77432
|
-
|
|
77433
|
-
|
|
77434
|
-
|
|
77435
|
-
|
|
77436
|
-
|
|
77437
|
-
|
|
77438
|
-
|
|
77439
|
-
|
|
77440
|
-
|
|
77441
|
-
|
|
77442
|
-
|
|
77443
|
-
|
|
77444
|
-
|
|
77445
|
-
|
|
77446
|
-
|
|
77447
|
-
|
|
77448
|
-
|
|
77449
|
-
|
|
77450
|
-
|
|
77451
|
-
|
|
77452
|
-
|
|
77453
|
-
|
|
77454
|
-
|
|
77455
|
-
|
|
77456
|
-
|
|
77457
|
-
|
|
77458
|
-
|
|
77459
|
-
|
|
77460
|
-
|
|
77461
|
-
|
|
77462
|
-
|
|
77463
|
-
|
|
77464
|
-
|
|
77465
|
-
|
|
77466
|
-
|
|
77467
|
-
|
|
77468
|
-
|
|
77469
|
-
|
|
77470
|
-
|
|
77471
|
-
|
|
77472
|
-
|
|
77473
|
-
|
|
77474
|
-
|
|
77475
|
-
|
|
77476
|
-
|
|
77477
|
-
|
|
77478
|
-
|
|
77479
|
-
|
|
77480
|
-
|
|
77481
|
-
|
|
77482
|
-
|
|
77483
|
-
|
|
77484
|
-
|
|
77485
|
-
|
|
77486
|
-
|
|
77487
|
-
|
|
77488
|
-
|
|
77489
|
-
|
|
77490
|
-
|
|
77491
|
-
|
|
77492
|
-
|
|
77493
|
-
|
|
77494
|
-
|
|
77495
|
-
|
|
77496
|
-
|
|
77497
|
-
|
|
77498
|
-
|
|
77499
|
-
|
|
77500
|
-
|
|
77501
|
-
|
|
77502
|
-
|
|
77503
|
-
|
|
77504
|
-
|
|
77505
|
-
|
|
77506
|
-
|
|
77507
|
-
|
|
77508
|
-
|
|
77509
|
-
|
|
77510
|
-
|
|
77511
|
-
|
|
77512
|
-
|
|
77513
|
-
|
|
77514
|
-
|
|
77515
|
-
|
|
77516
|
-
|
|
77517
|
-
|
|
77518
|
-
|
|
77519
|
-
|
|
77520
|
-
|
|
77521
|
-
|
|
77522
|
-
|
|
77523
|
-
|
|
77524
|
-
|
|
77525
|
-
|
|
77526
|
-
|
|
77527
|
-
|
|
77528
|
-
|
|
77529
|
-
|
|
77530
|
-
|
|
77531
|
-
|
|
77532
|
-
|
|
77533
|
-
|
|
77534
|
-
|
|
77535
|
-
|
|
77536
|
-
|
|
77537
|
-
|
|
77538
|
-
|
|
77539
|
-
|
|
77540
|
-
|
|
77541
|
-
|
|
77542
|
-
|
|
77543
|
-
|
|
77544
|
-
|
|
77545
|
-
|
|
77546
|
-
|
|
77547
|
-
|
|
77548
|
-
|
|
77549
|
-
|
|
77550
|
-
|
|
77551
|
-
|
|
77552
|
-
|
|
77553
|
-
|
|
77554
|
-
|
|
77555
|
-
|
|
77556
|
-
|
|
77557
|
-
|
|
77558
|
-
|
|
77559
|
-
|
|
77560
|
-
|
|
77561
|
-
|
|
77562
|
-
|
|
77563
|
-
|
|
77564
|
-
|
|
77565
|
-
|
|
77566
|
-
|
|
77567
|
-
|
|
77568
|
-
|
|
77569
|
-
value
|
|
77570
|
-
|
|
77571
|
-
|
|
77572
|
-
|
|
77573
|
-
|
|
77574
|
-
|
|
77575
|
-
|
|
77576
|
-
|
|
77577
|
-
|
|
77578
|
-
|
|
77579
|
-
|
|
77580
|
-
|
|
77581
|
-
|
|
77582
|
-
|
|
77583
|
-
|
|
77584
|
-
|
|
77585
|
-
|
|
77586
|
-
|
|
77587
|
-
|
|
77588
|
-
|
|
77589
|
-
|
|
77590
|
-
|
|
77591
|
-
|
|
77592
|
-
|
|
77593
|
-
|
|
77594
|
-
|
|
77595
|
-
|
|
77596
|
-
|
|
77597
|
-
|
|
77598
|
-
|
|
77599
|
-
|
|
77600
|
-
|
|
77601
|
-
|
|
77602
|
-
},
|
|
77603
|
-
isPending && /* @__PURE__ */ React119__namespace.default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
77604
|
-
" ",
|
|
77605
|
-
"Delete"
|
|
77606
|
-
))))))
|
|
77607
|
-
);
|
|
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
|
+
)))));
|
|
77608
77602
|
}
|
|
77609
77603
|
|
|
77610
77604
|
// src/react-ui/components/metadata/ContextManager.tsx
|