@thanh01.pmt/interactive-quiz-kit 1.0.79 → 1.0.81
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 +189 -195
- package/dist/authoring.mjs +189 -195
- package/dist/react-ui.cjs +189 -195
- package/dist/react-ui.mjs +189 -195
- package/package.json +1 -1
package/dist/authoring.mjs
CHANGED
|
@@ -77302,7 +77302,7 @@ function LearningObjectiveManager({
|
|
|
77302
77302
|
if (typeof rec["LO ID"] === "string" && rec["LO ID"].trim() && typeof rec["LO Description"] === "string" && rec["LO Description"].trim()) {
|
|
77303
77303
|
acc.valid.push({
|
|
77304
77304
|
code: rec["LO ID"],
|
|
77305
|
-
name: rec["LO
|
|
77305
|
+
name: rec["LO Name"],
|
|
77306
77306
|
description: rec["LO Description"],
|
|
77307
77307
|
subject: rec["Subject"] || "",
|
|
77308
77308
|
subjectCode: rec["Subject Code"] || rec["Subject"],
|
|
@@ -77346,200 +77346,194 @@ function LearningObjectiveManager({
|
|
|
77346
77346
|
console.log("[LO Manager] No valid records to import.");
|
|
77347
77347
|
}
|
|
77348
77348
|
};
|
|
77349
|
-
return (
|
|
77350
|
-
|
|
77351
|
-
|
|
77352
|
-
|
|
77353
|
-
|
|
77354
|
-
|
|
77355
|
-
|
|
77356
|
-
|
|
77357
|
-
|
|
77358
|
-
|
|
77359
|
-
|
|
77360
|
-
|
|
77361
|
-
|
|
77362
|
-
|
|
77363
|
-
|
|
77364
|
-
|
|
77365
|
-
|
|
77366
|
-
|
|
77367
|
-
|
|
77368
|
-
|
|
77369
|
-
|
|
77370
|
-
|
|
77371
|
-
|
|
77372
|
-
|
|
77373
|
-
|
|
77374
|
-
|
|
77375
|
-
|
|
77376
|
-
|
|
77377
|
-
|
|
77378
|
-
|
|
77379
|
-
|
|
77380
|
-
|
|
77381
|
-
|
|
77382
|
-
|
|
77383
|
-
|
|
77384
|
-
|
|
77385
|
-
|
|
77386
|
-
|
|
77387
|
-
|
|
77388
|
-
|
|
77389
|
-
|
|
77390
|
-
|
|
77391
|
-
|
|
77392
|
-
|
|
77393
|
-
|
|
77394
|
-
|
|
77395
|
-
|
|
77396
|
-
|
|
77397
|
-
|
|
77398
|
-
|
|
77399
|
-
|
|
77400
|
-
|
|
77401
|
-
|
|
77402
|
-
|
|
77403
|
-
|
|
77404
|
-
|
|
77405
|
-
|
|
77406
|
-
|
|
77407
|
-
|
|
77408
|
-
|
|
77409
|
-
|
|
77410
|
-
|
|
77411
|
-
|
|
77412
|
-
|
|
77413
|
-
|
|
77414
|
-
|
|
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
|
-
value
|
|
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
|
-
isPending && /* @__PURE__ */ React119__default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
77539
|
-
" ",
|
|
77540
|
-
"Delete"
|
|
77541
|
-
))))))
|
|
77542
|
-
);
|
|
77349
|
+
return /* @__PURE__ */ React119__default.createElement(Card, { className: "flex flex-col h-full" }, /* @__PURE__ */ React119__default.createElement(CardHeader, null, /* @__PURE__ */ React119__default.createElement(CardTitle, { className: "flex justify-between items-center" }, /* @__PURE__ */ React119__default.createElement("span", { className: "flex items-center" }, /* @__PURE__ */ React119__default.createElement(Lightbulb, { className: "mr-2 h-5 w-5 text-primary" }), " ", "Manage Learning Objectives"), /* @__PURE__ */ React119__default.createElement("div", { className: "flex items-center gap-2" }, onBulkAdd && /* @__PURE__ */ React119__default.createElement(
|
|
77350
|
+
MetadataImportControls,
|
|
77351
|
+
{
|
|
77352
|
+
metadataName: "Learning Objectives",
|
|
77353
|
+
onImport: handleImport
|
|
77354
|
+
}
|
|
77355
|
+
), /* @__PURE__ */ React119__default.createElement(Button, { onClick: handleAddItem, size: "sm" }, /* @__PURE__ */ React119__default.createElement(CirclePlus, { className: "mr-2 h-4 w-4" }), " Add Learning Objective")))), /* @__PURE__ */ React119__default.createElement(CardContent, { className: "flex-1 flex flex-col min-h-0" }, isLoading ? /* @__PURE__ */ React119__default.createElement("div", { className: "flex justify-center items-center h-full" }, /* @__PURE__ */ React119__default.createElement(LoaderCircle, { className: "h-8 w-8 animate-spin text-primary" })) : items.length === 0 ? /* @__PURE__ */ React119__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__default.createElement(Lightbulb, { className: "h-12 w-12 text-muted-foreground mb-4" }), /* @__PURE__ */ React119__default.createElement("h3", { className: "text-xl font-semibold" }, "No Learning Objectives"), /* @__PURE__ */ React119__default.createElement("p", { className: "text-muted-foreground mt-2" }, "Get started by adding a new learning objective or importing a list.")) : /* @__PURE__ */ React119__default.createElement("div", { className: "flex-1 relative border rounded-md" }, /* @__PURE__ */ React119__default.createElement(ScrollArea2, { className: "absolute inset-0" }, /* @__PURE__ */ React119__default.createElement(Table2, null, /* @__PURE__ */ React119__default.createElement(TableHeader, { className: "sticky top-0 bg-card z-10" }, /* @__PURE__ */ React119__default.createElement(TableRow, null, /* @__PURE__ */ React119__default.createElement(TableHead, null, "Code"), /* @__PURE__ */ React119__default.createElement(TableHead, null, "Name"), /* @__PURE__ */ React119__default.createElement(TableHead, null, "Subject"), /* @__PURE__ */ React119__default.createElement(TableHead, null, "Topic"), /* @__PURE__ */ React119__default.createElement(TableHead, { className: "text-right w-[120px]" }, "Actions"))), /* @__PURE__ */ React119__default.createElement(TableBody, null, items.map((item) => /* @__PURE__ */ React119__default.createElement(TableRow, { key: item.id }, /* @__PURE__ */ React119__default.createElement(TableCell, { className: "font-mono text-xs" }, item.code), /* @__PURE__ */ React119__default.createElement(TableCell, { className: "font-medium" }, item.name), /* @__PURE__ */ React119__default.createElement(TableCell, null, item.subject || item.subjectCode), /* @__PURE__ */ React119__default.createElement(TableCell, null, item.topic || item.topicCode), /* @__PURE__ */ React119__default.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React119__default.createElement(
|
|
77356
|
+
Button,
|
|
77357
|
+
{
|
|
77358
|
+
variant: "ghost",
|
|
77359
|
+
size: "icon",
|
|
77360
|
+
onClick: () => handleEditItem(item),
|
|
77361
|
+
className: "mr-2"
|
|
77362
|
+
},
|
|
77363
|
+
/* @__PURE__ */ React119__default.createElement(PenLine, { className: "h-4 w-4" })
|
|
77364
|
+
), /* @__PURE__ */ React119__default.createElement(
|
|
77365
|
+
Button,
|
|
77366
|
+
{
|
|
77367
|
+
variant: "ghost",
|
|
77368
|
+
size: "icon",
|
|
77369
|
+
onClick: () => handleDeleteItem(item),
|
|
77370
|
+
className: "text-destructive hover:text-destructive"
|
|
77371
|
+
},
|
|
77372
|
+
/* @__PURE__ */ React119__default.createElement(Trash2, { className: "h-4 w-4" })
|
|
77373
|
+
))))))))), /* @__PURE__ */ React119__default.createElement(Dialog2, { open: isDialogOpen, onOpenChange: setIsDialogOpen }, /* @__PURE__ */ React119__default.createElement(DialogContent2, { className: "sm:max-w-2xl" }, /* @__PURE__ */ React119__default.createElement(ScrollArea2, { className: "max-h-[85vh]" }, /* @__PURE__ */ React119__default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React119__default.createElement(DialogHeader, null, /* @__PURE__ */ React119__default.createElement(DialogTitle2, null, currentItem ? "Edit Learning Objective" : "Add New Learning Objective")), /* @__PURE__ */ React119__default.createElement("div", { className: "grid gap-4 py-4" }, /* @__PURE__ */ React119__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "code" }, "Code"), /* @__PURE__ */ React119__default.createElement(
|
|
77374
|
+
Input,
|
|
77375
|
+
{
|
|
77376
|
+
id: "code",
|
|
77377
|
+
value: formState.code || "",
|
|
77378
|
+
onChange: (e2) => handleFormChange(
|
|
77379
|
+
"code",
|
|
77380
|
+
e2.target.value.toUpperCase()
|
|
77381
|
+
),
|
|
77382
|
+
disabled: !!currentItem
|
|
77383
|
+
}
|
|
77384
|
+
)), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "name" }, "Name (Description)"), /* @__PURE__ */ React119__default.createElement(
|
|
77385
|
+
Input,
|
|
77386
|
+
{
|
|
77387
|
+
id: "name",
|
|
77388
|
+
value: formState.name || "",
|
|
77389
|
+
onChange: (e2) => handleFormChange(
|
|
77390
|
+
"name",
|
|
77391
|
+
e2.target.value
|
|
77392
|
+
)
|
|
77393
|
+
}
|
|
77394
|
+
))), /* @__PURE__ */ React119__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "subject" }, "Subject Name"), /* @__PURE__ */ React119__default.createElement(
|
|
77395
|
+
Input,
|
|
77396
|
+
{
|
|
77397
|
+
id: "subject",
|
|
77398
|
+
value: formState.subject || "",
|
|
77399
|
+
onChange: (e2) => handleFormChange(
|
|
77400
|
+
"subject",
|
|
77401
|
+
e2.target.value
|
|
77402
|
+
)
|
|
77403
|
+
}
|
|
77404
|
+
)), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "subjectCode" }, "Subject Code"), /* @__PURE__ */ React119__default.createElement(
|
|
77405
|
+
EditableCombobox,
|
|
77406
|
+
{
|
|
77407
|
+
options: subjects.map((s2) => ({
|
|
77408
|
+
value: s2.code,
|
|
77409
|
+
label: s2.name
|
|
77410
|
+
})),
|
|
77411
|
+
value: formState.subjectCode || "",
|
|
77412
|
+
onChange: (val) => handleFormChange("subjectCode", val),
|
|
77413
|
+
placeholder: "Select a subject..."
|
|
77414
|
+
}
|
|
77415
|
+
))), /* @__PURE__ */ React119__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "category" }, "Category Name"), /* @__PURE__ */ React119__default.createElement(
|
|
77416
|
+
Input,
|
|
77417
|
+
{
|
|
77418
|
+
id: "category",
|
|
77419
|
+
value: formState.category || "",
|
|
77420
|
+
onChange: (e2) => handleFormChange(
|
|
77421
|
+
"category",
|
|
77422
|
+
e2.target.value
|
|
77423
|
+
)
|
|
77424
|
+
}
|
|
77425
|
+
)), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "categoryCode" }, "Category Code"), /* @__PURE__ */ React119__default.createElement(
|
|
77426
|
+
Input,
|
|
77427
|
+
{
|
|
77428
|
+
id: "categoryCode",
|
|
77429
|
+
value: formState.categoryCode || "",
|
|
77430
|
+
onChange: (e2) => handleFormChange(
|
|
77431
|
+
"categoryCode",
|
|
77432
|
+
e2.target.value
|
|
77433
|
+
)
|
|
77434
|
+
}
|
|
77435
|
+
))), /* @__PURE__ */ React119__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "topic" }, "Topic Name"), /* @__PURE__ */ React119__default.createElement(
|
|
77436
|
+
Input,
|
|
77437
|
+
{
|
|
77438
|
+
id: "topic",
|
|
77439
|
+
value: formState.topic || "",
|
|
77440
|
+
onChange: (e2) => handleFormChange(
|
|
77441
|
+
"topic",
|
|
77442
|
+
e2.target.value
|
|
77443
|
+
)
|
|
77444
|
+
}
|
|
77445
|
+
)), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "topicCode" }, "Topic Code"), /* @__PURE__ */ React119__default.createElement(
|
|
77446
|
+
Input,
|
|
77447
|
+
{
|
|
77448
|
+
id: "topicCode",
|
|
77449
|
+
value: formState.topicCode || "",
|
|
77450
|
+
onChange: (e2) => handleFormChange(
|
|
77451
|
+
"topicCode",
|
|
77452
|
+
e2.target.value
|
|
77453
|
+
)
|
|
77454
|
+
}
|
|
77455
|
+
))), /* @__PURE__ */ React119__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "grade" }, "Grade Name"), /* @__PURE__ */ React119__default.createElement(
|
|
77456
|
+
Input,
|
|
77457
|
+
{
|
|
77458
|
+
id: "grade",
|
|
77459
|
+
value: formState.grade || "",
|
|
77460
|
+
onChange: (e2) => handleFormChange(
|
|
77461
|
+
"grade",
|
|
77462
|
+
e2.target.value
|
|
77463
|
+
)
|
|
77464
|
+
}
|
|
77465
|
+
)), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "gradeCode" }, "Grade Code"), /* @__PURE__ */ React119__default.createElement(
|
|
77466
|
+
Input,
|
|
77467
|
+
{
|
|
77468
|
+
id: "gradeCode",
|
|
77469
|
+
value: formState.gradeCode || "",
|
|
77470
|
+
onChange: (e2) => handleFormChange(
|
|
77471
|
+
"gradeCode",
|
|
77472
|
+
e2.target.value
|
|
77473
|
+
)
|
|
77474
|
+
}
|
|
77475
|
+
))), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "keywords" }, "Keywords (comma-separated)"), /* @__PURE__ */ React119__default.createElement(
|
|
77476
|
+
Textarea,
|
|
77477
|
+
{
|
|
77478
|
+
id: "keywords",
|
|
77479
|
+
value: formState.keywords?.join(", ") || "",
|
|
77480
|
+
onChange: (e2) => handleFormChange(
|
|
77481
|
+
"keywords",
|
|
77482
|
+
e2.target.value.split(",").map((s2) => s2.trim())
|
|
77483
|
+
)
|
|
77484
|
+
}
|
|
77485
|
+
)), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "stemElements" }, "STEM Elements (comma-separated)"), /* @__PURE__ */ React119__default.createElement(
|
|
77486
|
+
Textarea,
|
|
77487
|
+
{
|
|
77488
|
+
id: "stemElements",
|
|
77489
|
+
value: formState.stemElements?.join(", ") || "",
|
|
77490
|
+
onChange: (e2) => handleFormChange(
|
|
77491
|
+
"stemElements",
|
|
77492
|
+
e2.target.value.split(",").map((s2) => s2.trim())
|
|
77493
|
+
)
|
|
77494
|
+
}
|
|
77495
|
+
)), /* @__PURE__ */ React119__default.createElement("div", null, /* @__PURE__ */ React119__default.createElement(Label2, { htmlFor: "bloomLevelsGuideline" }, "Bloom's Guideline (comma-separated)"), /* @__PURE__ */ React119__default.createElement(
|
|
77496
|
+
Textarea,
|
|
77497
|
+
{
|
|
77498
|
+
id: "bloomLevelsGuideline",
|
|
77499
|
+
value: formState.bloomLevelsGuideline?.join(
|
|
77500
|
+
", "
|
|
77501
|
+
) || "",
|
|
77502
|
+
onChange: (e2) => handleFormChange(
|
|
77503
|
+
"bloomLevelsGuideline",
|
|
77504
|
+
e2.target.value.split(",").map((s2) => s2.trim())
|
|
77505
|
+
)
|
|
77506
|
+
}
|
|
77507
|
+
))))), /* @__PURE__ */ React119__default.createElement(DialogFooter, { className: "p-6 pt-0" }, /* @__PURE__ */ React119__default.createElement(
|
|
77508
|
+
Button,
|
|
77509
|
+
{
|
|
77510
|
+
type: "button",
|
|
77511
|
+
variant: "outline",
|
|
77512
|
+
onClick: () => setIsDialogOpen(false),
|
|
77513
|
+
disabled: isPending
|
|
77514
|
+
},
|
|
77515
|
+
"Cancel"
|
|
77516
|
+
), /* @__PURE__ */ React119__default.createElement(
|
|
77517
|
+
Button,
|
|
77518
|
+
{
|
|
77519
|
+
type: "submit",
|
|
77520
|
+
onClick: handleSubmit,
|
|
77521
|
+
disabled: isPending || !formState.name?.trim() || !formState.code?.trim()
|
|
77522
|
+
},
|
|
77523
|
+
isPending && /* @__PURE__ */ React119__default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
77524
|
+
" ",
|
|
77525
|
+
"Save"
|
|
77526
|
+
)))), /* @__PURE__ */ React119__default.createElement(AlertDialog2, { open: isAlertOpen, onOpenChange: setIsAlertOpen }, /* @__PURE__ */ React119__default.createElement(AlertDialogContent2, null, /* @__PURE__ */ React119__default.createElement(AlertDialogHeader, null, /* @__PURE__ */ React119__default.createElement(AlertDialogTitle2, null, "Are you sure?"), /* @__PURE__ */ React119__default.createElement(AlertDialogDescription2, null, 'This will permanently delete "', itemToDelete?.name, '".')), /* @__PURE__ */ React119__default.createElement(AlertDialogFooter, null, /* @__PURE__ */ React119__default.createElement(AlertDialogCancel2, { disabled: isPending }, "Cancel"), /* @__PURE__ */ React119__default.createElement(
|
|
77527
|
+
AlertDialogAction2,
|
|
77528
|
+
{
|
|
77529
|
+
onClick: confirmDelete,
|
|
77530
|
+
disabled: isPending,
|
|
77531
|
+
className: "bg-destructive hover:bg-destructive/90"
|
|
77532
|
+
},
|
|
77533
|
+
isPending && /* @__PURE__ */ React119__default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
77534
|
+
" ",
|
|
77535
|
+
"Delete"
|
|
77536
|
+
)))));
|
|
77543
77537
|
}
|
|
77544
77538
|
|
|
77545
77539
|
// src/react-ui/components/metadata/ContextManager.tsx
|